diff --git a/externals/ace/win/VC90/ace.vcproj b/externals/ace/win/VC90/ace.vcproj deleted file mode 100644 index 39b0872d0a..0000000000 --- a/externals/ace/win/VC90/ace.vcproj +++ /dev/null @@ -1,5308 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/externals/ace/win/ace.sln b/externals/ace/win/ace.sln deleted file mode 100644 index 6b09a5f85b..0000000000 --- a/externals/ace/win/ace.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACE_Wrappers", "VC90\ace.vcproj", "{BD537C9A-FECA-1BAD-6757-8A6348EA12C8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.Build.0 = Debug|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.ActiveCfg = Debug|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.Build.0 = Debug|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.ActiveCfg = Release|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.Build.0 = Release|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.ActiveCfg = Release|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/externals/bzip2/win/VC90/bzip2.vcproj b/externals/bzip2/win/VC90/bzip2.vcproj deleted file mode 100644 index 98b3a33d9b..0000000000 --- a/externals/bzip2/win/VC90/bzip2.vcproj +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/externals/bzip2/win/bzip2.sln b/externals/bzip2/win/bzip2.sln deleted file mode 100644 index 1a637e4a9f..0000000000 --- a/externals/bzip2/win/bzip2.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "VC90\bzip2.vcproj", "{CE773400-763E-4B71-B5E2-C9B60A752EB1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Debug|Win32.ActiveCfg = Debug|Win32 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Debug|Win32.Build.0 = Debug|Win32 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Debug|x64.ActiveCfg = Debug|x64 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Debug|x64.Build.0 = Debug|x64 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Release|Win32.ActiveCfg = Release|Win32 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Release|Win32.Build.0 = Release|Win32 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Release|x64.ActiveCfg = Release|x64 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/externals/g3dlite/win/VC90/g3dlite.vcproj b/externals/g3dlite/win/VC90/g3dlite.vcproj deleted file mode 100644 index 6d6c4c07fc..0000000000 --- a/externals/g3dlite/win/VC90/g3dlite.vcproj +++ /dev/null @@ -1,965 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/externals/g3dlite/win/g3dlite.sln b/externals/g3dlite/win/g3dlite.sln deleted file mode 100644 index 875374e394..0000000000 --- a/externals/g3dlite/win/g3dlite.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "VC90\g3dlite.vcproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/externals/gsoap/VC90/gsoap.vcproj b/externals/gsoap/VC90/gsoap.vcproj deleted file mode 100644 index 2d52f32bfd..0000000000 --- a/externals/gsoap/VC90/gsoap.vcproj +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/externals/libmpq/win/VC90/libmpq.vcproj b/externals/libmpq/win/VC90/libmpq.vcproj deleted file mode 100644 index 8394785713..0000000000 --- a/externals/libmpq/win/VC90/libmpq.vcproj +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/externals/libmpq/win/VS100/libmpq.vcxproj b/externals/libmpq/win/VS100/libmpq.vcxproj deleted file mode 100644 index e68a67ccd5..0000000000 --- a/externals/libmpq/win/VS100/libmpq.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - libmpq - {03AB0F44-628E-4855-99A0-C98A1EB52C50} - libmpq - - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\bin\$(Platform)_$(Configuration)\ - ..\bin\$(ProjectName)__$(Platform)_$(Configuration)\ - ..\..\bin\$(Platform)_$(Configuration)\ - ..\bin\$(ProjectName)__$(Platform)_$(Configuration)\ - - - - Disabled - ..\; ..\..\..\..\dep\include\zlib; ..\..\..\..\dep\include\bzip2;%(AdditionalIncludeDirectories) - WIN32;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - EditAndContinue - CompileAsC - - - true - - - ..\dep\lib\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories) - - - - - MaxSpeed - true - ..\; ..\..\..\..\dep\include\zlib; ..\..\..\..\dep\include\bzip2;%(AdditionalIncludeDirectories) - WIN32;%(PreprocessorDefinitions) - MultiThreadedDLL - true - StreamingSIMDExtensions - Level3 - ProgramDatabase - CompileAsC - - - true - - - ..\dep\lib\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories) - - - - - - - - - - - - - - - - - - - - - - - {b96f612a-c91d-43b3-a4c3-d4294817ec6c} - false - - - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} - false - - - - - - \ No newline at end of file diff --git a/externals/libmpq/win/libmpq_VC100.sln b/externals/libmpq/win/libmpq_VC100.sln deleted file mode 100644 index 5c88e2e495..0000000000 --- a/externals/libmpq/win/libmpq_VC100.sln +++ /dev/null @@ -1,31 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpq", "VS100\libmpq.vcxproj", "{03AB0F44-628E-4855-99A0-C98A1EB52C50}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\..\win\VC100\zlib.vcxproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "..\..\..\win\VC100\bzip2.vcxproj", "{B96F612A-C91D-43B3-A4C3-D4294817EC6C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.ActiveCfg = Debug|Win32 - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.Build.0 = Debug|Win32 - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.ActiveCfg = Release|Win32 - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.Build.0 = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32 - {B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Debug|Win32.ActiveCfg = Debug|Win32 - {B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Debug|Win32.Build.0 = Debug|Win32 - {B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Release|Win32.ActiveCfg = Release|Win32 - {B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/externals/libmpq/win/libmpq_VC90.sln b/externals/libmpq/win/libmpq_VC90.sln deleted file mode 100644 index c55968a73a..0000000000 --- a/externals/libmpq/win/libmpq_VC90.sln +++ /dev/null @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpq", "VC90\libmpq.vcproj", "{03AB0F44-628E-4855-99A0-C98A1EB52C50}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.ActiveCfg = Debug|Win32 - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.Build.0 = Debug|Win32 - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.ActiveCfg = Release|Win32 - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/externals/mysql/atomic/gcc_builtins.h b/externals/mysql/atomic/gcc_builtins.h deleted file mode 100644 index 4600a0ef4b..0000000000 --- a/externals/mysql/atomic/gcc_builtins.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2008 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#define MY_ATOMIC_MODE "atomic_builtins" - -#define make_atomic_add_body(S) \ - v= __sync_fetch_and_add(a, v); -#define make_atomic_swap_body(S) \ - v= __sync_lock_test_and_set(a, v); -#define make_atomic_cas_body(S) \ - int ## S sav; \ - sav= __sync_val_compare_and_swap(a, *cmp, set); \ - if (!(ret= (sav == *cmp))) *cmp= sav; - -#ifdef MY_ATOMIC_MODE_DUMMY -#define make_atomic_load_body(S) ret= *a -#define make_atomic_store_body(S) *a= v -#define MY_ATOMIC_MODE "gcc-builtins-up" - -#else -#define MY_ATOMIC_MODE "gcc-builtins-smp" -#define make_atomic_load_body(S) \ - ret= __sync_fetch_and_or(a, 0); -#define make_atomic_store_body(S) \ - (void) __sync_lock_test_and_set(a, v); -#endif diff --git a/externals/mysql/atomic/generic-msvc.h b/externals/mysql/atomic/generic-msvc.h deleted file mode 100644 index a8601e993b..0000000000 --- a/externals/mysql/atomic/generic-msvc.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _atomic_h_cleanup_ -#define _atomic_h_cleanup_ "atomic/generic-msvc.h" - -/* - We don't implement anything specific for MY_ATOMIC_MODE_DUMMY, always use - intrinsics. - 8 and 16-bit atomics are not implemented, but it can be done if necessary. -*/ - -/* - x86 compilers (both VS2003 or VS2005) never use instrinsics, but generate - function calls to kernel32 instead, even in the optimized build. - We force intrinsics as described in MSDN documentation for - _InterlockedCompareExchange. -*/ -#ifdef _M_IX86 - -#if (_MSC_VER >= 1500) -#include -#else -C_MODE_START -/*Visual Studio 2003 and earlier do not have prototypes for atomic intrinsics*/ -LONG _InterlockedExchange (LONG volatile *Target,LONG Value); -LONG _InterlockedCompareExchange (LONG volatile *Target, LONG Value, LONG Comp); -LONG _InterlockedExchangeAdd (LONG volatile *Addend, LONG Value); -C_MODE_END - -#pragma intrinsic(_InterlockedExchangeAdd) -#pragma intrinsic(_InterlockedCompareExchange) -#pragma intrinsic(_InterlockedExchange) -#endif - -#define InterlockedExchange _InterlockedExchange -#define InterlockedExchangeAdd _InterlockedExchangeAdd -#define InterlockedCompareExchange _InterlockedCompareExchange -/* - No need to do something special for InterlockedCompareExchangePointer - as it is a #define to InterlockedCompareExchange. The same applies to - InterlockedExchangePointer. -*/ -#endif /*_M_IX86*/ - -#define MY_ATOMIC_MODE "msvc-intrinsics" -#define IL_EXCHG_ADD32(X,Y) InterlockedExchangeAdd((volatile LONG *)(X),(Y)) -#define IL_COMP_EXCHG32(X,Y,Z) InterlockedCompareExchange((volatile LONG *)(X),(Y),(Z)) -#define IL_COMP_EXCHGptr InterlockedCompareExchangePointer -#define IL_EXCHG32(X,Y) InterlockedExchange((volatile LONG *)(X),(Y)) -#define IL_EXCHGptr InterlockedExchangePointer -#define make_atomic_add_body(S) \ - v= IL_EXCHG_ADD ## S (a, v) -#define make_atomic_cas_body(S) \ - int ## S initial_cmp= *cmp; \ - int ## S initial_a= IL_COMP_EXCHG ## S (a, set, initial_cmp); \ - if (!(ret= (initial_a == initial_cmp))) *cmp= initial_a; -#define make_atomic_swap_body(S) \ - v= IL_EXCHG ## S (a, v) -#define make_atomic_load_body(S) \ - ret= 0; /* avoid compiler warning */ \ - ret= IL_COMP_EXCHG ## S (a, ret, ret); - -/* - my_yield_processor (equivalent of x86 PAUSE instruction) should be used - to improve performance on hyperthreaded CPUs. Intel recommends to use it in - spin loops also on non-HT machines to reduce power consumption (see e.g - http://softwarecommunity.intel.com/articles/eng/2004.htm) - - Running benchmarks for spinlocks implemented with InterlockedCompareExchange - and YieldProcessor shows that much better performance is achieved by calling - YieldProcessor in a loop - that is, yielding longer. On Intel boxes setting - loop count in the range 200-300 brought best results. - */ -#ifndef YIELD_LOOPS -#define YIELD_LOOPS 200 -#endif - -static __inline int my_yield_processor() -{ - int i; - for(i=0; irw) -#define my_atomic_rwlock_init(name) pthread_mutex_init(& (name)->rw, 0) -#define my_atomic_rwlock_rdlock(name) pthread_mutex_lock(& (name)->rw) -#define my_atomic_rwlock_wrlock(name) pthread_mutex_lock(& (name)->rw) -#define my_atomic_rwlock_rdunlock(name) pthread_mutex_unlock(& (name)->rw) -#define my_atomic_rwlock_wrunlock(name) pthread_mutex_unlock(& (name)->rw) -#define MY_ATOMIC_MODE "mutex" -#ifndef MY_ATOMIC_MODE_RWLOCKS -#define MY_ATOMIC_MODE_RWLOCKS 1 -#endif -#endif - -#define make_atomic_add_body(S) int ## S sav; sav= *a; *a+= v; v=sav; -#define make_atomic_fas_body(S) int ## S sav; sav= *a; *a= v; v=sav; -#define make_atomic_cas_body(S) if ((ret= (*a == *cmp))) *a= set; else *cmp=*a; -#define make_atomic_load_body(S) ret= *a; -#define make_atomic_store_body(S) *a= v; - diff --git a/externals/mysql/atomic/x86-gcc.h b/externals/mysql/atomic/x86-gcc.h deleted file mode 100644 index 5a34bc22f9..0000000000 --- a/externals/mysql/atomic/x86-gcc.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - XXX 64-bit atomic operations can be implemented using - cmpxchg8b, if necessary. Though I've heard that not all 64-bit - architectures support double-word (128-bit) cas. -*/ - -#ifdef __x86_64__ -# ifdef MY_ATOMIC_NO_XADD -# define MY_ATOMIC_MODE "gcc-amd64" LOCK_prefix "-no-xadd" -# else -# define MY_ATOMIC_MODE "gcc-amd64" LOCK_prefix -# endif -#else -# ifdef MY_ATOMIC_NO_XADD -# define MY_ATOMIC_MODE "gcc-x86" LOCK_prefix "-no-xadd" -# else -# define MY_ATOMIC_MODE "gcc-x86" LOCK_prefix -# endif -#endif - -/* fix -ansi errors while maintaining readability */ -#ifndef asm -#define asm __asm__ -#endif - -#ifndef MY_ATOMIC_NO_XADD -#define make_atomic_add_body(S) \ - asm volatile (LOCK_prefix "; xadd %0, %1;" : "+r" (v) , "+m" (*a)) -#endif -#define make_atomic_fas_body(S) \ - asm volatile ("xchg %0, %1;" : "+r" (v) , "+m" (*a)) -#define make_atomic_cas_body(S) \ - asm volatile (LOCK_prefix "; cmpxchg %3, %0; setz %2;" \ - : "+m" (*a), "+a" (*cmp), "=q" (ret): "r" (set)) - -#ifdef MY_ATOMIC_MODE_DUMMY -#define make_atomic_load_body(S) ret=*a -#define make_atomic_store_body(S) *a=v -#else -/* - Actually 32-bit reads/writes are always atomic on x86 - But we add LOCK_prefix here anyway to force memory barriers -*/ -#define make_atomic_load_body(S) \ - ret=0; \ - asm volatile (LOCK_prefix "; cmpxchg %2, %0" \ - : "+m" (*a), "+a" (ret): "r" (ret)) -#define make_atomic_store_body(S) \ - asm volatile ("; xchg %0, %1;" : "+m" (*a), "+r" (v)) -#endif - -/* TODO test on intel whether the below helps. on AMD it makes no difference */ -//#define LF_BACKOFF ({asm volatile ("rep; nop"); 1; }) - diff --git a/externals/mysql/base64.h b/externals/mysql/base64.h deleted file mode 100644 index 155d6691b9..0000000000 --- a/externals/mysql/base64.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef __BASE64_H_INCLUDED__ -#define __BASE64_H_INCLUDED__ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - Calculate how much memory needed for dst of base64_encode() -*/ -int my_base64_needed_encoded_length(int length_of_data); - -/* - Calculate how much memory needed for dst of base64_decode() -*/ -int my_base64_needed_decoded_length(int length_of_encoded_data); - - -/* - Encode data as a base64 string -*/ -int my_base64_encode(const void *src, size_t src_len, char *dst); - -/* - Decode a base64 string into data -*/ -int my_base64_decode(const char *src, size_t src_len, - void *dst, const char **end_ptr); - - -#ifdef __cplusplus -} -#endif -#endif /* !__BASE64_H_INCLUDED__ */ diff --git a/externals/mysql/config-win.h b/externals/mysql/config-win.h deleted file mode 100644 index 94577211eb..0000000000 --- a/externals/mysql/config-win.h +++ /dev/null @@ -1,392 +0,0 @@ -/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Defines for Win32 to make it compatible for MySQL */ - -#define BIG_TABLES - -/* - Minimal version of Windows we should be able to run on. - Currently Windows 2000 -*/ -#define _WIN32_WINNT 0x0500 - - -#if defined(_MSC_VER) && _MSC_VER >= 1400 -/* Avoid endless warnings about sprintf() etc. being unsafe. */ -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif - -#include -#include /* chmod() constants*/ -#include -#include -#include -#include -#include -#include -#include /* getpid()*/ - -#define HAVE_SMEM 1 - -#if defined(_WIN64) || defined(WIN64) -#define SYSTEM_TYPE "Win64" -#elif defined(_WIN32) || defined(WIN32) -#define SYSTEM_TYPE "Win32" -#else -#define SYSTEM_TYPE "Windows" -#endif - -#if defined(_M_IA64) -#define MACHINE_TYPE "ia64" -#elif defined(_M_IX86) -#define MACHINE_TYPE "ia32" -#elif defined(_M_ALPHA) -#define MACHINE_TYPE "axp" -#else -#define MACHINE_TYPE "unknown" /* Define to machine type name */ -#endif - -#if !(defined(_WIN64) || defined(WIN64)) -#ifndef _WIN32 -#define _WIN32 /* Compatible with old source */ -#endif -#ifndef __WIN32__ -#define __WIN32__ -#endif -#endif /* _WIN64 */ -#ifndef __WIN__ -#define __WIN__ /* To make it easier in VC++ */ -#endif - -#ifndef MAX_INDEXES -#define MAX_INDEXES 64 -#endif - -/* File and lock constants */ -#ifdef __BORLANDC__ -#define F_RDLCK LK_NBLCK /* read lock */ -#define F_WRLCK LK_NBRLCK /* write lock */ -#define F_UNLCK LK_UNLCK /* remove lock(s) */ -#else -#define F_RDLCK _LK_NBLCK /* read lock */ -#define F_WRLCK _LK_NBRLCK /* write lock */ -#define F_UNLCK _LK_UNLCK /* remove lock(s) */ -#endif - -#define F_EXCLUSIVE 1 /* We have only exclusive locking */ -#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */ -#define F_OK 0 /* parameter to access() */ -#define W_OK 2 - -#define S_IROTH S_IREAD /* for my_lib */ - -/* for MY_S_ISFIFO() macro from my_lib */ -#if defined (_S_IFIFO) && !defined (S_IFIFO) -#define S_IFIFO _S_IFIFO -#endif - -/* Winsock2 constant (Vista SDK and later)*/ -#define IPPROTO_IPV6 41 -#ifndef IPV6_V6ONLY -#define IPV6_V6ONLY 27 -#endif - -/* - Constants used by chmod. Note, that group/others is ignored - - because unsupported by Windows due to different access control model. -*/ -#define S_IRWXU S_IREAD|S_IWRITE -#define S_IRWXG 0 -#define S_IRWXO 0 -typedef int mode_t; - -#ifdef __BORLANDC__ -#define FILE_BINARY O_BINARY /* my_fopen in binary mode */ -#define O_TEMPORARY 0 -#define O_SHORT_LIVED 0 -#define SH_DENYNO _SH_DENYNO -#else -#define O_BINARY _O_BINARY /* compability with older style names */ -#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */ -#define O_TEMPORARY _O_TEMPORARY -#define O_SHORT_LIVED _O_SHORT_LIVED -#define SH_DENYNO _SH_DENYNO -#endif -#define NO_OPEN_3 /* For my_create() */ - -#define SIGQUIT SIGTERM /* No SIGQUIT */ - -#undef _REENTRANT /* Crashes something for win32 */ -#undef SAFE_MUTEX /* Can't be used on windows */ - -#define LONGLONG_MIN 0x8000000000000000LL -#define LONGLONG_MAX 0x7FFFFFFFFFFFFFFFLL -#define ULONGLONG_MAX 0xFFFFFFFFFFFFFFFFULL - -/* Type information */ - -#if !defined(HAVE_UINT) -#undef HAVE_UINT -#define HAVE_UINT -typedef unsigned short ushort; -typedef unsigned int uint; -#endif /* !defined(HAVE_UINT) */ - -typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */ -typedef __int64 longlong; -#ifndef HAVE_SIGSET_T -typedef int sigset_t; -#endif -#define longlong_defined -/* - off_t should not be __int64 because of conflicts in header files; - Use my_off_t or os_off_t instead -*/ -#ifndef HAVE_OFF_T -typedef long off_t; -#endif -typedef __int64 os_off_t; -#ifdef _WIN64 -typedef UINT_PTR rf_SetTimer; -#else -typedef uint rf_SetTimer; -#endif - -#ifndef HAVE_SIZE_T -#ifndef _SIZE_T_DEFINED -typedef SIZE_T size_t; -#define _SIZE_T_DEFINED -#endif -#endif - -#ifndef HAVE_SSIZE_T -#ifndef _SSIZE_T_DEFINED -typedef SSIZE_T ssize_t; -#define _SSIZE_T_DEFINED -#endif -#endif - -#define Socket_defined -#define my_socket SOCKET -#define SIGPIPE SIGINT -#define RETQSORTTYPE void -#define QSORT_TYPE_IS_VOID -#define SOCKET_SIZE_TYPE int -#define my_socket_defined -#define byte_defined -#define HUGE_PTR -#define STDCALL __stdcall /* Used by libmysql.dll */ -#define isnan(X) _isnan(X) -#define finite(X) _finite(X) - -#ifndef UNDEF_THREAD_HACK -#define THREAD -#endif -#define VOID_SIGHANDLER -#define SIZEOF_CHAR 1 -#define SIZEOF_INT 4 -#define SIZEOF_LONG 4 -#define SIZEOF_LONG_LONG 8 -#define SIZEOF_OFF_T 8 -#ifdef _WIN64 -#define SIZEOF_CHARP 8 -#else -#define SIZEOF_CHARP 4 -#endif -#define HAVE_BROKEN_NETINET_INCLUDES -#ifdef _WIN32 -#define HAVE_NAMED_PIPE /* We can only create pipes on NT */ -#endif - -/* ERROR is defined in wingdi.h */ -#undef ERROR - -/* We need to close files to break connections on shutdown */ -#ifndef SIGNAL_WITH_VIO_CLOSE -#define SIGNAL_WITH_VIO_CLOSE -#endif - -/* All windows servers should support .sym files */ -#undef USE_SYMDIR -#define USE_SYMDIR - -/* If LOAD DATA LOCAL INFILE should be enabled by default */ -#define ENABLED_LOCAL_INFILE 1 - -/* If query profiling should be enabled by default */ -#define ENABLED_PROFILING 1 - -/* Convert some simple functions to Posix */ - -#define my_sigset(A,B) signal((A),(B)) -#define finite(A) _finite(A) -#define sleep(A) Sleep((A)*1000) -#define popen(A,B) _popen((A),(B)) -#define pclose(A) _pclose(A) - -#ifndef __BORLANDC__ -#define access(A,B) _access(A,B) -#endif - -#if !defined(__cplusplus) -#define inline __inline -#endif /* __cplusplus */ - -#ifdef _WIN64 -#define ulonglong2double(A) ((double) (ulonglong) (A)) -#define my_off_t2double(A) ((double) (my_off_t) (A)) - -#else -inline double ulonglong2double(ulonglong value) -{ - longlong nr=(longlong) value; - if (nr >= 0) - return (double) nr; - return (18446744073709551616.0 + (double) nr); -} -#define my_off_t2double(A) ulonglong2double(A) -#endif /* _WIN64 */ - -inline ulonglong double2ulonglong(double d) -{ - double t= d - (double) 0x8000000000000000ULL; - - if (t >= 0) - return ((ulonglong) t) + 0x8000000000000000ULL; - return (ulonglong) d; -} - -#if SIZEOF_OFF_T > 4 -#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C)) -#define tell(A) _telli64(A) -#endif - -#define STACK_DIRECTION -1 - -/* Difference between GetSystemTimeAsFileTime() and now() */ -#define OFFSET_TO_EPOCH 116444736000000000ULL - -#define HAVE_PERROR -#define HAVE_VFPRINT -#define HAVE_RENAME /* Have rename() as function */ -#define HAVE_BINARY_STREAMS /* Have "b" flag in streams */ -#define HAVE_LONG_JMP /* Have long jump function */ -#define HAVE_LOCKING /* have locking() call */ -#define HAVE_ERRNO_AS_DEFINE /* errno is a define */ -#define HAVE_STDLIB /* everything is include in this file */ -#define HAVE_MEMCPY -#define HAVE_MEMMOVE -#define HAVE_GETCWD -#define HAVE_TELL -#define HAVE_TZNAME -#define HAVE_PUTENV -#define HAVE_SELECT -#define HAVE_SETLOCALE -#define HAVE_SOCKET /* Giangi */ -#define HAVE_FLOAT_H -#define HAVE_LIMITS_H -#define HAVE_STDDEF_H -#define NO_FCNTL_NONBLOCK /* No FCNTL */ -#define HAVE_ALLOCA -#define HAVE_STRPBRK -#define HAVE_STRSTR -#define HAVE_COMPRESS -#define HAVE_CREATESEMAPHORE -#define HAVE_ISNAN -#define HAVE_FINITE -#define HAVE_QUERY_CACHE -#define SPRINTF_RETURNS_INT -#define HAVE_SETFILEPOINTER -#define HAVE_VIO_READ_BUFF -#if defined(_MSC_VER) && _MSC_VER >= 1400 -/* strnlen() appeared in Studio 2005 */ -#define HAVE_STRNLEN -#endif -#define HAVE_WINSOCK2 - -#define strcasecmp stricmp -#define strncasecmp strnicmp - -#ifndef _WIN32 -#undef FILE_SHARE_DELETE -#define FILE_SHARE_DELETE 0 /* Not implemented on Win 98/ME */ -#endif - -#ifdef NOT_USED -#define HAVE_SNPRINTF /* Gave link error */ -#define _snprintf snprintf -#endif - -#ifdef _MSC_VER -#define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */ -#define HAVE_ANSI_INCLUDE -#define HAVE_SYS_UTIME_H -#define HAVE_STRTOUL -#endif -#define my_reinterpret_cast(A) reinterpret_cast -#define my_const_cast(A) const_cast - - -/* MYSQL OPTIONS */ - -#ifdef _CUSTOMCONFIG_ -#include -#else -#define DEFAULT_MYSQL_HOME "c:\\mysql" -#define DATADIR "c:\\mysql\\data" -#define PACKAGE "mysql" -#define DEFAULT_BASEDIR "C:\\" -#define SHAREDIR "share" -#define DEFAULT_CHARSET_HOME "C:/mysql/" -#endif -#ifndef DEFAULT_HOME_ENV -#define DEFAULT_HOME_ENV MYSQL_HOME -#endif -#ifndef DEFAULT_GROUP_SUFFIX_ENV -#define DEFAULT_GROUP_SUFFIX_ENV MYSQL_GROUP_SUFFIX -#endif - -/* File name handling */ - -#define FN_LIBCHAR '\\' -#define FN_ROOTDIR "\\" -#define FN_DEVCHAR ':' -#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */ -#define FN_NO_CASE_SENCE /* Files are not case-sensitive */ -#define OS_FILE_LIMIT UINT_MAX /* No limit*/ - -#define DO_NOT_REMOVE_THREAD_WRAPPERS -#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V)) -#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V)) -/* The following is only used for statistics, so it should be good enough */ -#ifdef _WIN32 /* This should also work on Win98 but .. */ -#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C)) -#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C)) -#endif - -#define shared_memory_buffer_length 16000 -#define default_shared_memory_base_name "MYSQL" - -#define HAVE_SPATIAL 1 -#define HAVE_RTREE_KEYS 1 - -#define HAVE_OPENSSL 1 -#define HAVE_YASSL 1 - -#define COMMUNITY_SERVER 1 -#define ENABLED_PROFILING 1 - -#define HAVE_BOOL 1 diff --git a/externals/mysql/decimal.h b/externals/mysql/decimal.h deleted file mode 100644 index 530ed9e175..0000000000 --- a/externals/mysql/decimal.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _decimal_h -#define _decimal_h - -typedef enum -{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR} - decimal_round_mode; -typedef int32 decimal_digit_t; - -typedef struct st_decimal_t { - int intg, frac, len; - my_bool sign; - decimal_digit_t *buf; -} decimal_t; - -int internal_str2dec(const char *from, decimal_t *to, char **end, - my_bool fixed); -int decimal2string(decimal_t *from, char *to, int *to_len, - int fixed_precision, int fixed_decimals, - char filler); -int decimal2ulonglong(decimal_t *from, ulonglong *to); -int ulonglong2decimal(ulonglong from, decimal_t *to); -int decimal2longlong(decimal_t *from, longlong *to); -int longlong2decimal(longlong from, decimal_t *to); -int decimal2double(decimal_t *from, double *to); -int double2decimal(double from, decimal_t *to); -int decimal_actual_fraction(decimal_t *from); -int decimal2bin(decimal_t *from, uchar *to, int precision, int scale); -int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale); - -int decimal_size(int precision, int scale); -int decimal_bin_size(int precision, int scale); -int decimal_result_size(decimal_t *from1, decimal_t *from2, char op, - int param); - -int decimal_intg(decimal_t *from); -int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to); -int decimal_sub(decimal_t *from1, decimal_t *from2, decimal_t *to); -int decimal_cmp(decimal_t *from1, decimal_t *from2); -int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to); -int decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to, - int scale_incr); -int decimal_mod(decimal_t *from1, decimal_t *from2, decimal_t *to); -int decimal_round(decimal_t *from, decimal_t *to, int new_scale, - decimal_round_mode mode); -int decimal_is_zero(decimal_t *from); -void max_decimal(int precision, int frac, decimal_t *to); - -#define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0) -#define string2decimal_fixed(A,B,C) internal_str2dec((A), (B), (C), 1) - -/* set a decimal_t to zero */ - -#define decimal_make_zero(dec) do { \ - (dec)->buf[0]=0; \ - (dec)->intg=1; \ - (dec)->frac=0; \ - (dec)->sign=0; \ - } while(0) - -/* - returns the length of the buffer to hold string representation - of the decimal (including decimal dot, possible sign and \0) -*/ - -#define decimal_string_size(dec) (((dec)->intg ? (dec)->intg : 1) + \ - (dec)->frac + ((dec)->frac > 0) + 2) - -/* negate a decimal */ -#define decimal_neg(dec) do { (dec)->sign^=1; } while(0) - -/* - conventions: - - decimal_smth() == 0 -- everything's ok - decimal_smth() <= 1 -- result is usable, but precision loss is possible - decimal_smth() <= 2 -- result can be unusable, most significant digits - could've been lost - decimal_smth() > 2 -- no result was generated -*/ - -#define E_DEC_OK 0 -#define E_DEC_TRUNCATED 1 -#define E_DEC_OVERFLOW 2 -#define E_DEC_DIV_ZERO 4 -#define E_DEC_BAD_NUM 8 -#define E_DEC_OOM 16 - -#define E_DEC_ERROR 31 -#define E_DEC_FATAL_ERROR 30 - -#endif - diff --git a/externals/mysql/errmsg.h b/externals/mysql/errmsg.h deleted file mode 100644 index 92d70abb9f..0000000000 --- a/externals/mysql/errmsg.h +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Error messages for MySQL clients */ -/* (Error messages for the daemon are in sql/share/errmsg.txt) */ - -#ifdef __cplusplus -extern "C" { -#endif -void init_client_errs(void); -void finish_client_errs(void); -extern const char *client_errors[]; /* Error messages */ -#ifdef __cplusplus -} -#endif - -#define CR_MIN_ERROR 2000 /* For easier client code */ -#define CR_MAX_ERROR 2999 -#if !defined(ER) -#define ER(X) client_errors[(X)-CR_MIN_ERROR] -#endif -#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */ - -/* Do not add error numbers before CR_ERROR_FIRST. */ -/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */ -#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/ -#define CR_UNKNOWN_ERROR 2000 -#define CR_SOCKET_CREATE_ERROR 2001 -#define CR_CONNECTION_ERROR 2002 -#define CR_CONN_HOST_ERROR 2003 -#define CR_IPSOCK_ERROR 2004 -#define CR_UNKNOWN_HOST 2005 -#define CR_SERVER_GONE_ERROR 2006 -#define CR_VERSION_ERROR 2007 -#define CR_OUT_OF_MEMORY 2008 -#define CR_WRONG_HOST_INFO 2009 -#define CR_LOCALHOST_CONNECTION 2010 -#define CR_TCP_CONNECTION 2011 -#define CR_SERVER_HANDSHAKE_ERR 2012 -#define CR_SERVER_LOST 2013 -#define CR_COMMANDS_OUT_OF_SYNC 2014 -#define CR_NAMEDPIPE_CONNECTION 2015 -#define CR_NAMEDPIPEWAIT_ERROR 2016 -#define CR_NAMEDPIPEOPEN_ERROR 2017 -#define CR_NAMEDPIPESETSTATE_ERROR 2018 -#define CR_CANT_READ_CHARSET 2019 -#define CR_NET_PACKET_TOO_LARGE 2020 -#define CR_EMBEDDED_CONNECTION 2021 -#define CR_PROBE_SLAVE_STATUS 2022 -#define CR_PROBE_SLAVE_HOSTS 2023 -#define CR_PROBE_SLAVE_CONNECT 2024 -#define CR_PROBE_MASTER_CONNECT 2025 -#define CR_SSL_CONNECTION_ERROR 2026 -#define CR_MALFORMED_PACKET 2027 -#define CR_WRONG_LICENSE 2028 - -/* new 4.1 error codes */ -#define CR_NULL_POINTER 2029 -#define CR_NO_PREPARE_STMT 2030 -#define CR_PARAMS_NOT_BOUND 2031 -#define CR_DATA_TRUNCATED 2032 -#define CR_NO_PARAMETERS_EXISTS 2033 -#define CR_INVALID_PARAMETER_NO 2034 -#define CR_INVALID_BUFFER_USE 2035 -#define CR_UNSUPPORTED_PARAM_TYPE 2036 - -#define CR_SHARED_MEMORY_CONNECTION 2037 -#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2038 -#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2039 -#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040 -#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041 -#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042 -#define CR_SHARED_MEMORY_MAP_ERROR 2043 -#define CR_SHARED_MEMORY_EVENT_ERROR 2044 -#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045 -#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046 -#define CR_CONN_UNKNOW_PROTOCOL 2047 -#define CR_INVALID_CONN_HANDLE 2048 -#define CR_SECURE_AUTH 2049 -#define CR_FETCH_CANCELED 2050 -#define CR_NO_DATA 2051 -#define CR_NO_STMT_METADATA 2052 -#define CR_NO_RESULT_SET 2053 -#define CR_NOT_IMPLEMENTED 2054 -#define CR_SERVER_LOST_EXTENDED 2055 -#define CR_STMT_CLOSED 2056 -#define CR_NEW_STMT_METADATA 2057 -#define CR_ALREADY_CONNECTED 2058 -#define CR_ERROR_LAST /*Copy last error nr:*/ 2058 -/* Add error numbers before CR_ERROR_LAST and change it accordingly. */ - diff --git a/externals/mysql/extlib/dbug/dbug.c b/externals/mysql/extlib/dbug/dbug.c deleted file mode 100644 index 68932adf1e..0000000000 --- a/externals/mysql/extlib/dbug/dbug.c +++ /dev/null @@ -1,2583 +0,0 @@ -/****************************************************************************** - * * - * N O T I C E * - * * - * Copyright Abandoned, 1987, Fred Fish * - * * - * * - * This previously copyrighted work has been placed into the public * - * domain by the author and may be freely used for any purpose, * - * private or commercial. * - * * - * Because of the number of inquiries I was receiving about the use * - * of this product in commercially developed works I have decided to * - * simply make it public domain to further its unrestricted use. I * - * specifically would be most happy to see this material become a * - * part of the standard Unix distributions by AT&T and the Berkeley * - * Computer Science Research Group, and a standard part of the GNU * - * system from the Free Software Foundation. * - * * - * I would appreciate it, as a courtesy, if this notice is left in * - * all copies and derivative works. Thank you. * - * * - * The author makes no warranty of any kind with respect to this * - * product and explicitly disclaims any implied warranties of mer- * - * chantability or fitness for any particular purpose. * - * * - ****************************************************************************** - */ - -/* - * FILE - * - * dbug.c runtime support routines for dbug package - * - * SCCS - * - * @(#)dbug.c 1.25 7/25/89 - * - * DESCRIPTION - * - * These are the runtime support routines for the dbug package. - * The dbug package has two main components; the user include - * file containing various macro definitions, and the runtime - * support routines which are called from the macro expansions. - * - * Externally visible functions in the runtime support module - * use the naming convention pattern "_db_xx...xx_", thus - * they are unlikely to collide with user defined function names. - * - * AUTHOR(S) - * - * Fred Fish (base code) - * Enhanced Software Technologies, Tempe, AZ - * asuvax!mcdphx!estinc!fnf - * - * Binayak Banerjee (profiling enhancements) - * seismo!bpa!sjuvax!bbanerje - * - * Michael Widenius: - * DBUG_DUMP - To dump a block of memory. - * PUSH_FLAG "O" - To be used insted of "o" if we - * want flushing after each write - * PUSH_FLAG "A" - as 'O', but we will append to the out file instead - * of creating a new one. - * Check of malloc on entry/exit (option "S") - * - * Sergei Golubchik: - * DBUG_EXECUTE_IF - * incremental mode (-#+t:-d,info ...) - * DBUG_SET, _db_explain_ - * thread-local settings - * negative lists (-#-d,info => everything but "info") - * - * function/ syntax - * (the logic is - think of a call stack as of a path. - * "function" means only this function, "function/" means the hierarchy. - * in the future, filters like function1/function2 could be supported. - * following this logic glob(7) wildcards are supported.) - * - */ - -/* - We can't have SAFE_MUTEX defined here as this will cause recursion - in pthread_mutex_lock -*/ - -#undef SAFE_MUTEX -#include -#include -#include - -#ifdef HAVE_FNMATCH_H -#include -#else -#define fnmatch(A,B,C) strcmp(A,B) -#endif - -#if defined(MSDOS) || defined(__WIN__) -#include -#endif - -#ifndef DBUG_OFF - - -/* - * Manifest constants which may be "tuned" if desired. - */ - -#define PRINTBUF 1024 /* Print buffer size */ -#define INDENT 2 /* Indentation per trace level */ -#define MAXDEPTH 200 /* Maximum trace depth default */ - -/* - * The following flags are used to determine which - * capabilities the user has enabled with the settings - * push macro. - * - * TRACE_ON is also used in _db_stack_frame_->level - * (until we add flags to _db_stack_frame_, increasing it by 4 bytes) - */ - -#define DEBUG_ON (1 << 1) /* Debug enabled */ -#define FILE_ON (1 << 2) /* File name print enabled */ -#define LINE_ON (1 << 3) /* Line number print enabled */ -#define DEPTH_ON (1 << 4) /* Function nest level print enabled */ -#define PROCESS_ON (1 << 5) /* Process name print enabled */ -#define NUMBER_ON (1 << 6) /* Number each line of output */ -#define PROFILE_ON (1 << 7) /* Print out profiling code */ -#define PID_ON (1 << 8) /* Identify each line with process id */ -#define TIMESTAMP_ON (1 << 9) /* timestamp every line of output */ -#define SANITY_CHECK_ON (1 << 10) /* Check safemalloc on DBUG_ENTER */ -#define FLUSH_ON_WRITE (1 << 11) /* Flush on every write */ -#define OPEN_APPEND (1 << 12) /* Open for append */ -#define TRACE_ON ((uint)1 << 31) /* Trace enabled. MUST be the highest bit!*/ - -#define TRACING (cs->stack->flags & TRACE_ON) -#define DEBUGGING (cs->stack->flags & DEBUG_ON) -#define PROFILING (cs->stack->flags & PROFILE_ON) - -/* - * Typedefs to make things more obvious. - */ - -#define BOOLEAN my_bool - -/* - * Make it easy to change storage classes if necessary. - */ - -#define IMPORT extern /* Names defined externally */ -#define EXPORT /* Allocated here, available globally */ -#define AUTO auto /* Names to be allocated on stack */ -#define REGISTER register /* Names to be placed in registers */ - -/* - * The default file for profiling. Could also add another flag - * (G?) which allowed the user to specify this. - * - * If the automatic variables get allocated on the stack in - * reverse order from their declarations, then define AUTOS_REVERSE to 1. - * This is used by the code that keeps track of stack usage. For - * forward allocation, the difference in the dbug frame pointers - * represents stack used by the callee function. For reverse allocation, - * the difference represents stack used by the caller function. - * - */ - -#define PROF_FILE "dbugmon.out" -#define PROF_EFMT "E\t%ld\t%s\n" -#define PROF_SFMT "S\t%lx\t%lx\t%s\n" -#define PROF_XFMT "X\t%ld\t%s\n" - -#ifdef M_I386 /* predefined by xenix 386 compiler */ -#define AUTOS_REVERSE 1 -#else -#define AUTOS_REVERSE 0 -#endif - -/* - * Externally supplied functions. - */ - -#ifndef HAVE_PERROR -static void perror(); /* Fake system/library error print routine */ -#endif - -#ifdef SAFEMALLOC -IMPORT int _sanity(const char *file,uint line); /* safemalloc sanity checker */ -#else -#define _sanity(X,Y) (1) -#endif - -/* - * The user may specify a list of functions to trace or - * debug. These lists are kept in a linear linked list, - * a very simple implementation. - */ - -struct link { - struct link *next_link; /* Pointer to the next link */ - char flags; - char str[1]; /* Pointer to link's contents */ -}; - -/* flags for struct link and return flags of InList */ -#define SUBDIR 1 /* this MUST be 1 */ -#define INCLUDE 2 -#define EXCLUDE 4 -/* this is not a struct link flag, but only a return flags of InList */ -#define MATCHED 65536 -#define NOT_MATCHED 0 - -/* - * Debugging settings can be pushed or popped off of a - * stack which is implemented as a linked list. Note - * that the head of the list is the current settings and the - * stack is pushed by adding a new settings to the head of the - * list or popped by removing the first link. - * - * Note: if out_file is NULL, the other fields are not initialized at all! - */ - -struct settings { - uint flags; /* Current settings flags */ - uint maxdepth; /* Current maximum trace depth */ - uint delay; /* Delay after each output line */ - uint sub_level; /* Sub this from code_state->level */ - FILE *out_file; /* Current output stream */ - FILE *prof_file; /* Current profiling stream */ - char name[FN_REFLEN]; /* Name of output file */ - struct link *functions; /* List of functions */ - struct link *p_functions; /* List of profiled functions */ - struct link *keywords; /* List of debug keywords */ - struct link *processes; /* List of process names */ - struct settings *next; /* Next settings in the list */ -}; - -#define is_shared(S, V) ((S)->next && (S)->next->V == (S)->V) - -/* - * Local variables not seen by user. - */ - - -static BOOLEAN init_done= FALSE; /* Set to TRUE when initialization done */ -static struct settings init_settings; -static const char *db_process= 0;/* Pointer to process name; argv[0] */ -my_bool _dbug_on_= TRUE; /* FALSE if no debugging at all */ - -typedef struct _db_code_state_ { - const char *process; /* Pointer to process name; usually argv[0] */ - const char *func; /* Name of current user function */ - const char *file; /* Name of current user file */ - struct _db_stack_frame_ *framep; /* Pointer to current frame */ - struct settings *stack; /* debugging settings */ - const char *jmpfunc; /* Remember current function for setjmp */ - const char *jmpfile; /* Remember current file for setjmp */ - int lineno; /* Current debugger output line number */ - uint level; /* Current function nesting level */ - int jmplevel; /* Remember nesting level at setjmp() */ - -/* - * The following variables are used to hold the state information - * between the call to _db_pargs_() and _db_doprnt_(), during - * expansion of the DBUG_PRINT macro. This is the only macro - * that currently uses these variables. - * - * These variables are currently used only by _db_pargs_() and - * _db_doprnt_(). - */ - - uint u_line; /* User source code line number */ - int locked; /* If locked with _db_lock_file_ */ - const char *u_keyword; /* Keyword for current macro */ -} CODE_STATE; - -/* - The test below is so we could call functions with DBUG_ENTER before - my_thread_init(). -*/ -#define get_code_state_if_not_set_or_return if (!cs && !((cs=code_state()))) return -#define get_code_state_or_return if (!((cs=code_state()))) return - - /* Handling lists */ -#define ListAdd(A,B,C) ListAddDel(A,B,C,INCLUDE) -#define ListDel(A,B,C) ListAddDel(A,B,C,EXCLUDE) -static struct link *ListAddDel(struct link *, const char *, const char *, int); -static struct link *ListCopy(struct link *); -static int InList(struct link *linkp,const char *cp); -static uint ListFlags(struct link *linkp); -static void FreeList(struct link *linkp); - - /* OpenClose debug output stream */ -static void DBUGOpenFile(CODE_STATE *,const char *, const char *, int); -static void DBUGCloseFile(CODE_STATE *cs, FILE *fp); - /* Push current debug settings */ -static void PushState(CODE_STATE *cs); - /* Free memory associated with debug state. */ -static void FreeState (CODE_STATE *cs, struct settings *state, int free_state); - /* Test for tracing enabled */ -static int DoTrace(CODE_STATE *cs); -/* - return values of DoTrace. - Can also be used as bitmask: ret & DO_TRACE -*/ -#define DO_TRACE 1 -#define DONT_TRACE 2 -#define ENABLE_TRACE 3 -#define DISABLE_TRACE 4 - - /* Test to see if file is writable */ -#if defined(HAVE_ACCESS) && !defined(MSDOS) -static BOOLEAN Writable(const char *pathname); - /* Change file owner and group */ -static void ChangeOwner(CODE_STATE *cs, char *pathname); - /* Allocate memory for runtime support */ -#endif - -static void DoPrefix(CODE_STATE *cs, uint line); - -static char *DbugMalloc(size_t size); -static const char *BaseName(const char *pathname); -static void Indent(CODE_STATE *cs, int indent); -static void DbugFlush(CODE_STATE *); -static void DbugExit(const char *why); -static const char *DbugStrTok(const char *s); -static void DbugFprintf(FILE *stream, const char* format, va_list args); - -#ifndef THREAD - /* Open profile output stream */ -static FILE *OpenProfile(CODE_STATE *cs, const char *name); - /* Profile if asked for it */ -static BOOLEAN DoProfile(CODE_STATE *); - /* Return current user time (ms) */ -static unsigned long Clock(void); -#endif - -/* - * Miscellaneous printf format strings. - */ - -#define ERR_MISSING_RETURN "%s: missing DBUG_RETURN or DBUG_VOID_RETURN macro in function \"%s\"\n" -#define ERR_OPEN "%s: can't open debug output stream \"%s\": " -#define ERR_CLOSE "%s: can't close debug file: " -#define ERR_ABORT "%s: debugger aborting because %s\n" -#define ERR_CHOWN "%s: can't change owner/group of \"%s\": " - -/* - * Macros and defines for testing file accessibility under UNIX and MSDOS. - */ - -#undef EXISTS -#if !defined(HAVE_ACCESS) || defined(MSDOS) -#define EXISTS(pathname) (FALSE) /* Assume no existance */ -#define Writable(name) (TRUE) -#else -#define EXISTS(pathname) (access(pathname, F_OK) == 0) -#define WRITABLE(pathname) (access(pathname, W_OK) == 0) -#endif -#ifndef MSDOS -#define ChangeOwner(cs,name) -#endif - - -/* -** Macros to allow dbugging with threads -*/ - -#ifdef THREAD -#include -static pthread_mutex_t THR_LOCK_dbug; - -static CODE_STATE *code_state(void) -{ - CODE_STATE *cs, **cs_ptr; - - /* - _dbug_on_ is reset if we don't plan to use any debug commands at all and - we want to run on maximum speed - */ - if (!_dbug_on_) - return 0; - - if (!init_done) - { - init_done=TRUE; - pthread_mutex_init(&THR_LOCK_dbug,MY_MUTEX_INIT_FAST); - bzero(&init_settings, sizeof(init_settings)); - init_settings.out_file=stderr; - init_settings.flags=OPEN_APPEND; - } - - if (!(cs_ptr= (CODE_STATE**) my_thread_var_dbug())) - return 0; /* Thread not initialised */ - if (!(cs= *cs_ptr)) - { - cs=(CODE_STATE*) DbugMalloc(sizeof(*cs)); - bzero((uchar*) cs,sizeof(*cs)); - cs->process= db_process ? db_process : "dbug"; - cs->func="?func"; - cs->file="?file"; - cs->stack=&init_settings; - *cs_ptr= cs; - } - return cs; -} - -#else /* !THREAD */ - -static CODE_STATE static_code_state= -{ - "dbug", "?func", "?file", NULL, &init_settings, - NullS, NullS, 0,0,0,0,0,NullS -}; - -static CODE_STATE *code_state(void) -{ - if (!init_done) - { - bzero(&init_settings, sizeof(init_settings)); - init_settings.out_file=stderr; - init_settings.flags=OPEN_APPEND; - init_done=TRUE; - } - return &static_code_state; -} - -#define pthread_mutex_lock(A) {} -#define pthread_mutex_unlock(A) {} -#endif - -/* - * Translate some calls among different systems. - */ - -#ifdef HAVE_SLEEP -/* sleep() wants seconds */ -#define Delay(A) sleep(((uint) A)/10) -#else -#define Delay(A) (0) -#endif - -/* - * FUNCTION - * - * _db_process_ give the name to the current process/thread - * - * SYNOPSIS - * - * VOID _process_(name) - * char *name; - * - */ - -void _db_process_(const char *name) -{ - CODE_STATE *cs; - - if (!db_process) - db_process= name; - - get_code_state_or_return; - cs->process= name; -} - -/* - * FUNCTION - * - * DbugParse parse control string and set current debugger settings - * - * DESCRIPTION - * - * Given pointer to a debug control string in "control", - * parses the control string, and sets - * up a current debug settings. - * - * The debug control string is a sequence of colon separated fields - * as follows: - * - * [+]::...: - * - * Each field consists of a mandatory flag character followed by - * an optional "," and comma separated list of modifiers: - * - * [sign]flag[,modifier,modifier,...,modifier] - * - * See the manual for the list of supported signs, flags, and modifiers - * - * For convenience, any leading "-#" is stripped off. - * - * RETURN - * 1 - a list of functions ("f" flag) was possibly changed - * 0 - a list of functions was not changed - */ - -int DbugParse(CODE_STATE *cs, const char *control) -{ - const char *end; - int rel, f_used=0; - struct settings *stack; - - stack= cs->stack; - - if (control[0] == '-' && control[1] == '#') - control+=2; - - rel= control[0] == '+' || control[0] == '-'; - if ((!rel || (!stack->out_file && !stack->next))) - { - FreeState(cs, stack, 0); - stack->flags= 0; - stack->delay= 0; - stack->maxdepth= 0; - stack->sub_level= 0; - stack->out_file= stderr; - stack->prof_file= NULL; - stack->functions= NULL; - stack->p_functions= NULL; - stack->keywords= NULL; - stack->processes= NULL; - } - else if (!stack->out_file) - { - stack->flags= stack->next->flags; - stack->delay= stack->next->delay; - stack->maxdepth= stack->next->maxdepth; - stack->sub_level= stack->next->sub_level; - strcpy(stack->name, stack->next->name); - stack->out_file= stack->next->out_file; - stack->prof_file= stack->next->prof_file; - if (stack->next == &init_settings) - { - /* never share with the global parent - it can change under your feet */ - stack->functions= ListCopy(init_settings.functions); - stack->p_functions= ListCopy(init_settings.p_functions); - stack->keywords= ListCopy(init_settings.keywords); - stack->processes= ListCopy(init_settings.processes); - } - else - { - stack->functions= stack->next->functions; - stack->p_functions= stack->next->p_functions; - stack->keywords= stack->next->keywords; - stack->processes= stack->next->processes; - } - } - - end= DbugStrTok(control); - while (control < end) - { - int c, sign= (*control == '+') ? 1 : (*control == '-') ? -1 : 0; - if (sign) control++; - c= *control++; - if (*control == ',') control++; - /* XXX when adding new cases here, don't forget _db_explain_ ! */ - switch (c) { - case 'd': - if (sign < 0 && control == end) - { - if (!is_shared(stack, keywords)) - FreeList(stack->keywords); - stack->keywords=NULL; - stack->flags &= ~DEBUG_ON; - break; - } - if (rel && is_shared(stack, keywords)) - stack->keywords= ListCopy(stack->keywords); - if (sign < 0) - { - if (DEBUGGING) - stack->keywords= ListDel(stack->keywords, control, end); - break; - } - stack->keywords= ListAdd(stack->keywords, control, end); - stack->flags |= DEBUG_ON; - break; - case 'D': - stack->delay= atoi(control); - break; - case 'f': - f_used= 1; - if (sign < 0 && control == end) - { - if (!is_shared(stack,functions)) - FreeList(stack->functions); - stack->functions=NULL; - break; - } - if (rel && is_shared(stack,functions)) - stack->functions= ListCopy(stack->functions); - if (sign < 0) - stack->functions= ListDel(stack->functions, control, end); - else - stack->functions= ListAdd(stack->functions, control, end); - break; - case 'F': - if (sign < 0) - stack->flags &= ~FILE_ON; - else - stack->flags |= FILE_ON; - break; - case 'i': - if (sign < 0) - stack->flags &= ~PID_ON; - else - stack->flags |= PID_ON; - break; -#ifndef THREAD - case 'g': - if (OpenProfile(cs, PROF_FILE)) - { - stack->flags |= PROFILE_ON; - stack->p_functions= ListAdd(stack->p_functions, control, end); - } - break; -#endif - case 'L': - if (sign < 0) - stack->flags &= ~LINE_ON; - else - stack->flags |= LINE_ON; - break; - case 'n': - if (sign < 0) - stack->flags &= ~DEPTH_ON; - else - stack->flags |= DEPTH_ON; - break; - case 'N': - if (sign < 0) - stack->flags &= ~NUMBER_ON; - else - stack->flags |= NUMBER_ON; - break; - case 'A': - case 'O': - stack->flags |= FLUSH_ON_WRITE; - /* fall through */ - case 'a': - case 'o': - if (sign < 0) - { - if (!is_shared(stack, out_file)) - DBUGCloseFile(cs, stack->out_file); - stack->flags &= ~FLUSH_ON_WRITE; - stack->out_file= stderr; - break; - } - if (c == 'a' || c == 'A') - stack->flags |= OPEN_APPEND; - else - stack->flags &= ~OPEN_APPEND; - if (control != end) - DBUGOpenFile(cs, control, end, stack->flags & OPEN_APPEND); - else - DBUGOpenFile(cs, "-",0,0); - break; - case 'p': - if (sign < 0 && control == end) - { - if (!is_shared(stack,processes)) - FreeList(stack->processes); - stack->processes=NULL; - break; - } - if (rel && is_shared(stack, processes)) - stack->processes= ListCopy(stack->processes); - if (sign < 0) - stack->processes= ListDel(stack->processes, control, end); - else - stack->processes= ListAdd(stack->processes, control, end); - break; - case 'P': - if (sign < 0) - stack->flags &= ~PROCESS_ON; - else - stack->flags |= PROCESS_ON; - break; - case 'r': - stack->sub_level= cs->level; - break; - case 't': - if (sign < 0) - { - if (control != end) - stack->maxdepth-= atoi(control); - else - stack->maxdepth= 0; - } - else - { - if (control != end) - stack->maxdepth+= atoi(control); - else - stack->maxdepth= MAXDEPTH; - } - if (stack->maxdepth > 0) - stack->flags |= TRACE_ON; - else - stack->flags &= ~TRACE_ON; - break; - case 'T': - if (sign < 0) - stack->flags &= ~TIMESTAMP_ON; - else - stack->flags |= TIMESTAMP_ON; - break; - case 'S': - if (sign < 0) - stack->flags &= ~SANITY_CHECK_ON; - else - stack->flags |= SANITY_CHECK_ON; - break; - } - if (!*end) - break; - control=end+1; - end= DbugStrTok(control); - } - return !rel || f_used; -} - -#define framep_trace_flag(cs, frp) (frp ? \ - frp->level & TRACE_ON : \ - (ListFlags(cs->stack->functions) & INCLUDE) ? \ - 0 : (uint)TRACE_ON) - -void FixTraceFlags_helper(CODE_STATE *cs, const char *func, - struct _db_stack_frame_ *framep) -{ - if (framep->prev) - FixTraceFlags_helper(cs, framep->func, framep->prev); - - cs->func= func; - cs->level= framep->level & ~TRACE_ON; - framep->level= cs->level | framep_trace_flag(cs, framep->prev); - /* - we don't set cs->framep correctly, even though DoTrace uses it. - It's ok, because cs->framep may only affect DO_TRACE/DONT_TRACE return - values, but we ignore them here anyway - */ - switch(DoTrace(cs)) { - case ENABLE_TRACE: - framep->level|= TRACE_ON; - break; - case DISABLE_TRACE: - framep->level&= ~TRACE_ON; - break; - } -} - -#define fflags(cs) cs->stack->out_file ? ListFlags(cs->stack->functions) : TRACE_ON; - -void FixTraceFlags(uint old_fflags, CODE_STATE *cs) -{ - const char *func; - uint new_fflags, traceon, level; - struct _db_stack_frame_ *framep; - - /* - first (a.k.a. safety) check: - if we haven't started tracing yet, no call stack at all - we're safe. - */ - framep=cs->framep; - if (framep == 0) - return; - - /* - Ok, the tracing has started, call stack isn't empty. - - second check: does the new list have a SUBDIR rule ? - */ - new_fflags=fflags(cs); - if (new_fflags & SUBDIR) - goto yuck; - - /* - Ok, new list doesn't use SUBDIR. - - third check: we do NOT need to re-scan if - neither old nor new lists used SUBDIR flag and if a default behavior - (whether an unlisted function is traced) hasn't changed. - Default behavior depends on whether there're INCLUDE elements in the list. - */ - if (!(old_fflags & SUBDIR) && !((new_fflags^old_fflags) & INCLUDE)) - return; - - /* - Ok, old list may've used SUBDIR, or defaults could've changed. - - fourth check: are we inside a currently active SUBDIR rule ? - go up the call stack, if TRACE_ON flag ever changes its value - we are. - */ - for (traceon=framep->level; framep; framep=framep->prev) - if ((traceon ^ framep->level) & TRACE_ON) - goto yuck; - - /* - Ok, TRACE_ON flag doesn't change in the call stack. - - fifth check: but is the top-most value equal to a default one ? - */ - if (((traceon & TRACE_ON) != 0) == ((new_fflags & INCLUDE) == 0)) - return; - -yuck: - /* - Yuck! function list was changed, and one of the currently active rules - was possibly affected. For example, a tracing could've been enabled or - disabled for a function somewhere up the call stack. - To react correctly, we must go up the call stack all the way to - the top and re-match rules to set TRACE_ON bit correctly. - - We must traverse the stack forwards, not backwards. - That's what a recursive helper is doing. - It'll destroy two CODE_STATE fields, save them now. - */ - func= cs->func; - level= cs->level; - FixTraceFlags_helper(cs, func, cs->framep); - /* now we only need to restore CODE_STATE fields, and we're done */ - cs->func= func; - cs->level= level; -} - -/* - * FUNCTION - * - * _db_set_ set current debugger settings - * - * SYNOPSIS - * - * VOID _db_set_(control) - * char *control; - * - * DESCRIPTION - * - * Given pointer to a debug control string in "control", - * parses the control string, and sets up a current debug - * settings. Pushes a new debug settings if the current is - * set to the initial debugger settings. - * - */ - -void _db_set_(const char *control) -{ - CODE_STATE *cs; - uint old_fflags; - get_code_state_or_return; - old_fflags=fflags(cs); - if (cs->stack == &init_settings) - PushState(cs); - if (DbugParse(cs, control)) - FixTraceFlags(old_fflags, cs); -} - -/* - * FUNCTION - * - * _db_push_ push current debugger settings and set up new one - * - * SYNOPSIS - * - * VOID _db_push_(control) - * char *control; - * - * DESCRIPTION - * - * Given pointer to a debug control string in "control", pushes - * the current debug settings, parses the control string, and sets - * up a new debug settings with DbugParse() - * - */ - -void _db_push_(const char *control) -{ - CODE_STATE *cs; - uint old_fflags; - get_code_state_or_return; - old_fflags=fflags(cs); - PushState(cs); - if (DbugParse(cs, control)) - FixTraceFlags(old_fflags, cs); -} - - -/** - Returns TRUE if session-local settings have been set. -*/ - -int _db_is_pushed_() -{ - CODE_STATE *cs= NULL; - get_code_state_or_return FALSE; - return (cs->stack != &init_settings); -} - -/* - * FUNCTION - * - * _db_set_init_ set initial debugger settings - * - * SYNOPSIS - * - * VOID _db_set_init_(control) - * char *control; - * - * DESCRIPTION - * see _db_set_ - * - */ - -void _db_set_init_(const char *control) -{ - CODE_STATE tmp_cs; - bzero((uchar*) &tmp_cs, sizeof(tmp_cs)); - tmp_cs.stack= &init_settings; - DbugParse(&tmp_cs, control); -} - -/* - * FUNCTION - * - * _db_pop_ pop the debug stack - * - * DESCRIPTION - * - * Pops the debug stack, returning the debug settings to its - * condition prior to the most recent _db_push_ invocation. - * Note that the pop will fail if it would remove the last - * valid settings from the stack. This prevents user errors - * in the push/pop sequence from screwing up the debugger. - * Maybe there should be some kind of warning printed if the - * user tries to pop too many states. - * - */ - -void _db_pop_() -{ - struct settings *discard; - uint old_fflags; - CODE_STATE *cs; - - get_code_state_or_return; - - discard= cs->stack; - if (discard != &init_settings) - { - old_fflags=fflags(cs); - cs->stack= discard->next; - FreeState(cs, discard, 1); - FixTraceFlags(old_fflags, cs); - } -} - -/* - * FUNCTION - * - * _db_explain_ generates 'control' string for the current settings - * - * RETURN - * 0 - ok - * 1 - buffer too short, output truncated - * - */ - -/* helper macros */ -#define char_to_buf(C) do { \ - *buf++=(C); \ - if (buf >= end) goto overflow; \ - } while (0) -#define str_to_buf(S) do { \ - char_to_buf(','); \ - buf=strnmov(buf, (S), len+1); \ - if (buf >= end) goto overflow; \ - } while (0) -#define list_to_buf(l, f) do { \ - struct link *listp=(l); \ - while (listp) \ - { \ - if (listp->flags & (f)) \ - { \ - str_to_buf(listp->str); \ - if (listp->flags & SUBDIR) \ - char_to_buf('/'); \ - } \ - listp=listp->next_link; \ - } \ - } while (0) -#define int_to_buf(i) do { \ - char b[50]; \ - int10_to_str((i), b, 10); \ - str_to_buf(b); \ - } while (0) -#define colon_to_buf do { \ - if (buf != start) char_to_buf(':'); \ - } while(0) -#define op_int_to_buf(C, val, def) do { \ - if ((val) != (def)) \ - { \ - colon_to_buf; \ - char_to_buf((C)); \ - int_to_buf(val); \ - } \ - } while (0) -#define op_intf_to_buf(C, val, def, cond) do { \ - if ((cond)) \ - { \ - colon_to_buf; \ - char_to_buf((C)); \ - if ((val) != (def)) int_to_buf(val); \ - } \ - } while (0) -#define op_str_to_buf(C, val, cond) do { \ - if ((cond)) \ - { \ - char *s=(val); \ - colon_to_buf; \ - char_to_buf((C)); \ - if (*s) str_to_buf(s); \ - } \ - } while (0) -#define op_list_to_buf(C, val, cond) do { \ - if ((cond)) \ - { \ - int f=ListFlags(val); \ - colon_to_buf; \ - char_to_buf((C)); \ - if (f & INCLUDE) \ - list_to_buf(val, INCLUDE); \ - if (f & EXCLUDE) \ - { \ - colon_to_buf; \ - char_to_buf('-'); \ - char_to_buf((C)); \ - list_to_buf(val, EXCLUDE); \ - } \ - } \ - } while (0) -#define op_bool_to_buf(C, cond) do { \ - if ((cond)) \ - { \ - colon_to_buf; \ - char_to_buf((C)); \ - } \ - } while (0) - -int _db_explain_ (CODE_STATE *cs, char *buf, size_t len) -{ - char *start=buf, *end=buf+len-4; - - get_code_state_if_not_set_or_return *buf=0; - - op_list_to_buf('d', cs->stack->keywords, DEBUGGING); - op_int_to_buf ('D', cs->stack->delay, 0); - op_list_to_buf('f', cs->stack->functions, cs->stack->functions); - op_bool_to_buf('F', cs->stack->flags & FILE_ON); - op_bool_to_buf('i', cs->stack->flags & PID_ON); - op_list_to_buf('g', cs->stack->p_functions, PROFILING); - op_bool_to_buf('L', cs->stack->flags & LINE_ON); - op_bool_to_buf('n', cs->stack->flags & DEPTH_ON); - op_bool_to_buf('N', cs->stack->flags & NUMBER_ON); - op_str_to_buf( - ((cs->stack->flags & FLUSH_ON_WRITE ? 0 : 32) | - (cs->stack->flags & OPEN_APPEND ? 'A' : 'O')), - cs->stack->name, cs->stack->out_file != stderr); - op_list_to_buf('p', cs->stack->processes, cs->stack->processes); - op_bool_to_buf('P', cs->stack->flags & PROCESS_ON); - op_bool_to_buf('r', cs->stack->sub_level != 0); - op_intf_to_buf('t', cs->stack->maxdepth, MAXDEPTH, TRACING); - op_bool_to_buf('T', cs->stack->flags & TIMESTAMP_ON); - op_bool_to_buf('S', cs->stack->flags & SANITY_CHECK_ON); - - *buf= '\0'; - return 0; - -overflow: - *end++= '.'; - *end++= '.'; - *end++= '.'; - *end= '\0'; - return 1; -} - -#undef char_to_buf -#undef str_to_buf -#undef list_to_buf -#undef int_to_buf -#undef colon_to_buf -#undef op_int_to_buf -#undef op_intf_to_buf -#undef op_str_to_buf -#undef op_list_to_buf -#undef op_bool_to_buf - -/* - * FUNCTION - * - * _db_explain_init_ explain initial debugger settings - * - * DESCRIPTION - * see _db_explain_ - */ - -int _db_explain_init_(char *buf, size_t len) -{ - CODE_STATE cs; - bzero((uchar*) &cs,sizeof(cs)); - cs.stack=&init_settings; - return _db_explain_(&cs, buf, len); -} - -/* - * FUNCTION - * - * _db_enter_ process entry point to user function - * - * SYNOPSIS - * - * VOID _db_enter_(_func_, _file_, _line_, _stack_frame_) - * char *_func_; points to current function name - * char *_file_; points to current file name - * int _line_; called from source line number - * struct _db_stack_frame_ allocated on the caller's stack - * - * DESCRIPTION - * - * Called at the beginning of each user function to tell - * the debugger that a new function has been entered. - * Note that the pointers to the previous user function - * name and previous user file name are stored on the - * caller's stack (this is why the ENTER macro must be - * the first "executable" code in a function, since it - * allocates these storage locations). The previous nesting - * level is also stored on the callers stack for internal - * self consistency checks. - * - * Also prints a trace line if tracing is enabled and - * increments the current function nesting depth. - * - * Note that this mechanism allows the debugger to know - * what the current user function is at all times, without - * maintaining an internal stack for the function names. - * - */ - -void _db_enter_(const char *_func_, const char *_file_, - uint _line_, struct _db_stack_frame_ *_stack_frame_) -{ - int save_errno; - CODE_STATE *cs; - if (!((cs=code_state()))) - { - _stack_frame_->level= 0; /* Set to avoid valgrind warnings if dbug is enabled later */ - _stack_frame_->prev= 0; - return; - } - save_errno= errno; - - _stack_frame_->func= cs->func; - _stack_frame_->file= cs->file; - cs->func= _func_; - cs->file= _file_; - _stack_frame_->prev= cs->framep; - _stack_frame_->level= ++cs->level | framep_trace_flag(cs, cs->framep); - cs->framep= _stack_frame_; -#ifndef THREAD - if (DoProfile(cs)) - { - long stackused; - if (cs->framep->prev == NULL) - stackused= 0; - else - { - stackused= (char*)(cs->framep->prev) - (char*)(cs->framep); - stackused= stackused > 0 ? stackused : -stackused; - } - (void) fprintf(cs->stack->prof_file, PROF_EFMT , Clock(), cs->func); - (void) fprintf(cs->stack->prof_file, PROF_SFMT, (ulong) cs->framep, stackused, - AUTOS_REVERSE ? _stack_frame_->func : cs->func); - (void) fflush(cs->stack->prof_file); - } -#endif - switch (DoTrace(cs)) { - case ENABLE_TRACE: - cs->framep->level|= TRACE_ON; - if (!TRACING) break; - /* fall through */ - case DO_TRACE: - if ((cs->stack->flags & SANITY_CHECK_ON) && _sanity(_file_,_line_)) - cs->stack->flags &= ~SANITY_CHECK_ON; - if (TRACING) - { - if (!cs->locked) - pthread_mutex_lock(&THR_LOCK_dbug); - DoPrefix(cs, _line_); - Indent(cs, cs->level); - (void) fprintf(cs->stack->out_file, ">%s\n", cs->func); - DbugFlush(cs); /* This does a unlock */ - } - break; - case DISABLE_TRACE: - cs->framep->level&= ~TRACE_ON; - /* fall through */ - case DONT_TRACE: - break; - } - errno=save_errno; -} - -/* - * FUNCTION - * - * _db_return_ process exit from user function - * - * SYNOPSIS - * - * VOID _db_return_(_line_, _stack_frame_) - * int _line_; current source line number - * struct _db_stack_frame_ allocated on the caller's stack - * - * DESCRIPTION - * - * Called just before user function executes an explicit or implicit - * return. Prints a trace line if trace is enabled, decrements - * the current nesting level, and restores the current function and - * file names from the defunct function's stack. - * - */ - -/* helper macro */ -void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame_) -{ - int save_errno=errno; - uint _slevel_= _stack_frame_->level & ~TRACE_ON; - CODE_STATE *cs; - get_code_state_or_return; - - if (cs->level != _slevel_) - { - if (!cs->locked) - pthread_mutex_lock(&THR_LOCK_dbug); - (void) fprintf(cs->stack->out_file, ERR_MISSING_RETURN, cs->process, - cs->func); - DbugFlush(cs); - } - else - { -#ifndef THREAD - if (DoProfile(cs)) - (void) fprintf(cs->stack->prof_file, PROF_XFMT, Clock(), cs->func); -#endif - if (DoTrace(cs) & DO_TRACE) - { - if ((cs->stack->flags & SANITY_CHECK_ON) && - _sanity(_stack_frame_->file,_line_)) - cs->stack->flags &= ~SANITY_CHECK_ON; - if (TRACING) - { - if (!cs->locked) - pthread_mutex_lock(&THR_LOCK_dbug); - DoPrefix(cs, _line_); - Indent(cs, cs->level); - (void) fprintf(cs->stack->out_file, "<%s\n", cs->func); - DbugFlush(cs); - } - } - } - /* - Check to not set level < 0. This can happen if DBUG was disabled when - function was entered and enabled in function. - */ - cs->level= _slevel_ != 0 ? _slevel_ - 1 : 0; - cs->func= _stack_frame_->func; - cs->file= _stack_frame_->file; - if (cs->framep != NULL) - cs->framep= cs->framep->prev; - errno=save_errno; -} - - -/* - * FUNCTION - * - * _db_pargs_ log arguments for subsequent use by _db_doprnt_() - * - * SYNOPSIS - * - * VOID _db_pargs_(_line_, keyword) - * int _line_; - * char *keyword; - * - * DESCRIPTION - * - * The new universal printing macro DBUG_PRINT, which replaces - * all forms of the DBUG_N macros, needs two calls to runtime - * support routines. The first, this function, remembers arguments - * that are used by the subsequent call to _db_doprnt_(). - * - */ - -void _db_pargs_(uint _line_, const char *keyword) -{ - CODE_STATE *cs; - get_code_state_or_return; - cs->u_line= _line_; - cs->u_keyword= keyword; -} - - -/* - * FUNCTION - * - * _db_doprnt_ handle print of debug lines - * - * SYNOPSIS - * - * VOID _db_doprnt_(format, va_alist) - * char *format; - * va_dcl; - * - * DESCRIPTION - * - * When invoked via one of the DBUG macros, tests the current keyword - * set by calling _db_pargs_() to see if that macro has been selected - * for processing via the debugger control string, and if so, handles - * printing of the arguments via the format string. The line number - * of the DBUG macro in the source is found in u_line. - * - * Note that the format string SHOULD NOT include a terminating - * newline, this is supplied automatically. - * - */ - -#include - -void _db_doprnt_(const char *format,...) -{ - va_list args; - CODE_STATE *cs; - get_code_state_or_return; - - va_start(args,format); - - if (_db_keyword_(cs, cs->u_keyword, 0)) - { - int save_errno=errno; - if (!cs->locked) - pthread_mutex_lock(&THR_LOCK_dbug); - DoPrefix(cs, cs->u_line); - if (TRACING) - Indent(cs, cs->level + 1); - else - (void) fprintf(cs->stack->out_file, "%s: ", cs->func); - (void) fprintf(cs->stack->out_file, "%s: ", cs->u_keyword); - DbugFprintf(cs->stack->out_file, format, args); - DbugFlush(cs); - errno=save_errno; - } - va_end(args); -} - -/* - * fprintf clone with consistent, platform independent output for - * problematic formats like %p, %zd and %lld. - */ -static void DbugFprintf(FILE *stream, const char* format, va_list args) -{ - char cvtbuf[1024]; - size_t len; - len = my_vsnprintf(cvtbuf, sizeof(cvtbuf), format, args); - (void) fprintf(stream, "%s\n", cvtbuf); -} - - -/* - * FUNCTION - * - * _db_dump_ dump a string in hex - * - * SYNOPSIS - * - * void _db_dump_(_line_,keyword,memory,length) - * int _line_; current source line number - * char *keyword; - * char *memory; Memory to print - * int length; Bytes to print - * - * DESCRIPTION - * Dump N characters in a binary array. - * Is used to examine corrputed memory or arrays. - */ - -void _db_dump_(uint _line_, const char *keyword, - const unsigned char *memory, size_t length) -{ - int pos; - char dbuff[90]; - CODE_STATE *cs; - get_code_state_or_return; - - if (_db_keyword_(cs, keyword, 0)) - { - if (!cs->locked) - pthread_mutex_lock(&THR_LOCK_dbug); - DoPrefix(cs, _line_); - if (TRACING) - { - Indent(cs, cs->level + 1); - pos= min(max(cs->level-cs->stack->sub_level,0)*INDENT,80); - } - else - { - fprintf(cs->stack->out_file, "%s: ", cs->func); - } - sprintf(dbuff,"%s: Memory: 0x%lx Bytes: (%ld)\n", - keyword, (ulong) memory, (long) length); - (void) fputs(dbuff,cs->stack->out_file); - - pos=0; - while (length-- > 0) - { - uint tmp= *((unsigned char*) memory++); - if ((pos+=3) >= 80) - { - fputc('\n',cs->stack->out_file); - pos=3; - } - fputc(_dig_vec_upper[((tmp >> 4) & 15)], cs->stack->out_file); - fputc(_dig_vec_upper[tmp & 15], cs->stack->out_file); - fputc(' ',cs->stack->out_file); - } - (void) fputc('\n',cs->stack->out_file); - DbugFlush(cs); - } -} - - -/* - * FUNCTION - * - * ListAddDel modify the list according to debug control string - * - * DESCRIPTION - * - * Given pointer to a comma separated list of strings in "cltp", - * parses the list, and modifies "listp", returning a pointer - * to the new list. - * - * The mode of operation is defined by "todo" parameter. - * - * If it is INCLUDE, elements (strings from "cltp") are added to the - * list, they will have INCLUDE flag set. If the list already contains - * the string in question, new element is not added, but a flag of - * the existing element is adjusted (INCLUDE bit is set, EXCLUDE bit - * is removed). - * - * If it is EXCLUDE, elements are added to the list with the EXCLUDE - * flag set. If the list already contains the string in question, - * it is removed, new element is not added. - */ - -static struct link *ListAddDel(struct link *head, const char *ctlp, - const char *end, int todo) -{ - const char *start; - struct link **cur; - size_t len; - int subdir; - - ctlp--; -next: - while (++ctlp < end) - { - start= ctlp; - subdir=0; - while (ctlp < end && *ctlp != ',') - ctlp++; - len=ctlp-start; - if (start[len-1] == '/') - { - len--; - subdir=SUBDIR; - } - if (len == 0) continue; - for (cur=&head; *cur; cur=&((*cur)->next_link)) - { - if (!strncmp((*cur)->str, start, len)) - { - if ((*cur)->flags & todo) /* same action ? */ - (*cur)->flags|= subdir; /* just merge the SUBDIR flag */ - else if (todo == EXCLUDE) - { - struct link *delme=*cur; - *cur=(*cur)->next_link; - free((void*) delme); - } - else - { - (*cur)->flags&=~(EXCLUDE & SUBDIR); - (*cur)->flags|=INCLUDE | subdir; - } - goto next; - } - } - *cur= (struct link *) DbugMalloc(sizeof(struct link)+len); - memcpy((*cur)->str, start, len); - (*cur)->str[len]=0; - (*cur)->flags=todo | subdir; - (*cur)->next_link=0; - } - return head; -} - -/* - * FUNCTION - * - * ListCopy make a copy of the list - * - * SYNOPSIS - * - * static struct link *ListCopy(orig) - * struct link *orig; - * - * DESCRIPTION - * - * Given pointer to list, which contains a copy of every element from - * the original list. - * - * the orig pointer can be NULL - * - * Note that since each link is added at the head of the list, - * the final list will be in "reverse order", which is not - * significant for our usage here. - * - */ - -static struct link *ListCopy(struct link *orig) -{ - struct link *new_malloc; - struct link *head; - size_t len; - - head= NULL; - while (orig != NULL) - { - len= strlen(orig->str); - new_malloc= (struct link *) DbugMalloc(sizeof(struct link)+len); - memcpy(new_malloc->str, orig->str, len); - new_malloc->str[len]= 0; - new_malloc->flags=orig->flags; - new_malloc->next_link= head; - head= new_malloc; - orig= orig->next_link; - } - return head; -} - -/* - * FUNCTION - * - * InList test a given string for member of a given list - * - * DESCRIPTION - * - * Tests the string pointed to by "cp" to determine if it is in - * the list pointed to by "linkp". Linkp points to the first - * link in the list. If linkp is NULL or contains only EXCLUDE - * elements then the string is treated as if it is in the list. - * This may seem rather strange at first but leads to the desired - * operation if no list is given. The net effect is that all - * strings will be accepted when there is no list, and when there - * is a list, only those strings in the list will be accepted. - * - * RETURN - * combination of SUBDIR, INCLUDE, EXCLUDE, MATCHED flags - * - */ - -static int InList(struct link *linkp, const char *cp) -{ - int result; - - for (result=MATCHED; linkp != NULL; linkp= linkp->next_link) - { - if (!fnmatch(linkp->str, cp, 0)) - return linkp->flags; - if (!(linkp->flags & EXCLUDE)) - result=NOT_MATCHED; - if (linkp->flags & SUBDIR) - result|=SUBDIR; - } - return result; -} - -/* - * FUNCTION - * - * ListFlags returns aggregated list flags (ORed over all elements) - * - */ - -static uint ListFlags(struct link *linkp) -{ - uint f; - for (f=0; linkp != NULL; linkp= linkp->next_link) - f|= linkp->flags; - return f; -} - -/* - * FUNCTION - * - * PushState push current settings onto stack and set up new one - * - * SYNOPSIS - * - * static VOID PushState() - * - * DESCRIPTION - * - * Pushes the current settings on the settings stack, and creates - * a new settings. The new settings is NOT initialized - * - * The settings stack is a linked list of settings, with the new - * settings added at the head. This allows the stack to grow - * to the limits of memory if necessary. - * - */ - -static void PushState(CODE_STATE *cs) -{ - struct settings *new_malloc; - - new_malloc= (struct settings *) DbugMalloc(sizeof(struct settings)); - bzero(new_malloc, sizeof(*new_malloc)); - new_malloc->next= cs->stack; - cs->stack= new_malloc; -} - -/* - * FUNCTION - * - * FreeState Free memory associated with a struct state. - * - * SYNOPSIS - * - * static void FreeState (state) - * struct state *state; - * int free_state; - * - * DESCRIPTION - * - * Deallocates the memory allocated for various information in a - * state. If free_state is set, also free 'state' - * - */ -static void FreeState(CODE_STATE *cs, struct settings *state, int free_state) -{ - if (!is_shared(state, keywords)) - FreeList(state->keywords); - if (!is_shared(state, functions)) - FreeList(state->functions); - if (!is_shared(state, processes)) - FreeList(state->processes); - if (!is_shared(state, p_functions)) - FreeList(state->p_functions); - - if (!is_shared(state, out_file)) - DBUGCloseFile(cs, state->out_file); - else - (void) fflush(state->out_file); - - if (!is_shared(state, prof_file)) - DBUGCloseFile(cs, state->prof_file); - else - (void) fflush(state->prof_file); - - if (free_state) - free((void*) state); -} - - -/* - * FUNCTION - * - * _db_end_ End debugging, freeing state stack memory. - * - * SYNOPSIS - * - * static VOID _db_end_ () - * - * DESCRIPTION - * - * Ends debugging, de-allocating the memory allocated to the - * state stack. - * - * To be called at the very end of the program. - * - */ -void _db_end_() -{ - struct settings *discard; - static struct settings tmp; - CODE_STATE *cs; - /* - Set _dbug_on_ to be able to do full reset even when DEBUGGER_OFF was - called after dbug was initialized - */ - _dbug_on_= 1; - get_code_state_or_return; - - while ((discard= cs->stack)) - { - if (discard == &init_settings) - break; - cs->stack= discard->next; - FreeState(cs, discard, 1); - } - tmp= init_settings; - - /* Use mutex lock to make it less likely anyone access out_file */ - pthread_mutex_lock(&THR_LOCK_dbug); - init_settings.flags= OPEN_APPEND; - init_settings.out_file= stderr; - init_settings.prof_file= stderr; - init_settings.maxdepth= 0; - init_settings.delay= 0; - init_settings.sub_level= 0; - init_settings.functions= 0; - init_settings.p_functions= 0; - init_settings.keywords= 0; - init_settings.processes= 0; - pthread_mutex_unlock(&THR_LOCK_dbug); - FreeState(cs, &tmp, 0); -} - - -/* - * FUNCTION - * - * DoTrace check to see if tracing is current enabled - * - * DESCRIPTION - * - * Checks to see if dbug in this function is enabled based on - * whether the maximum trace depth has been reached, the current - * function is selected, and the current process is selected. - * - */ - -static int DoTrace(CODE_STATE *cs) -{ - if ((cs->stack->maxdepth == 0 || cs->level <= cs->stack->maxdepth) && - InList(cs->stack->processes, cs->process) & (MATCHED|INCLUDE)) - switch(InList(cs->stack->functions, cs->func)) { - case INCLUDE|SUBDIR: return ENABLE_TRACE; - case INCLUDE: return DO_TRACE; - case MATCHED|SUBDIR: - case NOT_MATCHED|SUBDIR: - case MATCHED: return framep_trace_flag(cs, cs->framep) ? - DO_TRACE : DONT_TRACE; - case EXCLUDE: - case NOT_MATCHED: return DONT_TRACE; - case EXCLUDE|SUBDIR: return DISABLE_TRACE; - } - return DONT_TRACE; -} - - -/* - * FUNCTION - * - * DoProfile check to see if profiling is current enabled - * - * SYNOPSIS - * - * static BOOLEAN DoProfile() - * - * DESCRIPTION - * - * Checks to see if profiling is enabled based on whether the - * user has specified profiling, the maximum trace depth has - * not yet been reached, the current function is selected, - * and the current process is selected. Returns TRUE if - * profiling is enabled, FALSE otherwise. - * - */ - -#ifndef THREAD -static BOOLEAN DoProfile(CODE_STATE *cs) -{ - return PROFILING && - cs->level <= cs->stack->maxdepth && - InList(cs->stack->p_functions, cs->func) & (INCLUDE|MATCHED) && - InList(cs->stack->processes, cs->process) & (INCLUDE|MATCHED); -} -#endif - -FILE *_db_fp_(void) -{ - CODE_STATE *cs; - get_code_state_or_return NULL; - return cs->stack->out_file; -} - -/* - * FUNCTION - * - * _db_keyword_ test keyword for member of keyword list - * - * DESCRIPTION - * - * Test a keyword to determine if it is in the currently active - * keyword list. If strict=0, a keyword is accepted - * if the list is null, otherwise it must match one of the list - * members. When debugging is not on, no keywords are accepted. - * After the maximum trace level is exceeded, no keywords are - * accepted (this behavior subject to change). Additionally, - * the current function and process must be accepted based on - * their respective lists. - * - * Returns TRUE if keyword accepted, FALSE otherwise. - * - */ - -BOOLEAN _db_keyword_(CODE_STATE *cs, const char *keyword, int strict) -{ - get_code_state_if_not_set_or_return FALSE; - strict=strict ? INCLUDE : INCLUDE|MATCHED; - - return DEBUGGING && DoTrace(cs) & DO_TRACE && - InList(cs->stack->keywords, keyword) & strict; -} - -/* - * FUNCTION - * - * Indent indent a line to the given indentation level - * - * SYNOPSIS - * - * static VOID Indent(indent) - * int indent; - * - * DESCRIPTION - * - * Indent a line to the given level. Note that this is - * a simple minded but portable implementation. - * There are better ways. - * - * Also, the indent must be scaled by the compile time option - * of character positions per nesting level. - * - */ - -static void Indent(CODE_STATE *cs, int indent) -{ - REGISTER int count; - - indent= max(indent-1-cs->stack->sub_level,0)*INDENT; - for (count= 0; count < indent ; count++) - { - if ((count % INDENT) == 0) - fputc('|',cs->stack->out_file); - else - fputc(' ',cs->stack->out_file); - } -} - - -/* - * FUNCTION - * - * FreeList free all memory associated with a linked list - * - * SYNOPSIS - * - * static VOID FreeList(linkp) - * struct link *linkp; - * - * DESCRIPTION - * - * Given pointer to the head of a linked list, frees all - * memory held by the list and the members of the list. - * - */ - -static void FreeList(struct link *linkp) -{ - REGISTER struct link *old; - - while (linkp != NULL) - { - old= linkp; - linkp= linkp->next_link; - free((void*) old); - } -} - - -/* - * FUNCTION - * - * DoPrefix print debugger line prefix prior to indentation - * - * SYNOPSIS - * - * static VOID DoPrefix(_line_) - * int _line_; - * - * DESCRIPTION - * - * Print prefix common to all debugger output lines, prior to - * doing indentation if necessary. Print such information as - * current process name, current source file name and line number, - * and current function nesting depth. - * - */ - -static void DoPrefix(CODE_STATE *cs, uint _line_) -{ - cs->lineno++; - if (cs->stack->flags & PID_ON) - { -#ifdef THREAD - (void) fprintf(cs->stack->out_file, "%-7s: ", my_thread_name()); -#else - (void) fprintf(cs->stack->out_file, "%5d: ", (int) getpid()); -#endif - } - if (cs->stack->flags & NUMBER_ON) - (void) fprintf(cs->stack->out_file, "%5d: ", cs->lineno); - if (cs->stack->flags & TIMESTAMP_ON) - { -#ifdef __WIN__ - /* FIXME This doesn't give microseconds as in Unix case, and the resolution is - in system ticks, 10 ms intervals. See my_getsystime.c for high res */ - SYSTEMTIME loc_t; - GetLocalTime(&loc_t); - (void) fprintf (cs->stack->out_file, - /* "%04d-%02d-%02d " */ - "%02d:%02d:%02d.%06d ", - /*tm_p->tm_year + 1900, tm_p->tm_mon + 1, tm_p->tm_mday,*/ - loc_t.wHour, loc_t.wMinute, loc_t.wSecond, loc_t.wMilliseconds); -#else - struct timeval tv; - struct tm *tm_p; - if (gettimeofday(&tv, NULL) != -1) - { - if ((tm_p= localtime((const time_t *)&tv.tv_sec))) - { - (void) fprintf (cs->stack->out_file, - /* "%04d-%02d-%02d " */ - "%02d:%02d:%02d.%06d ", - /*tm_p->tm_year + 1900, tm_p->tm_mon + 1, tm_p->tm_mday,*/ - tm_p->tm_hour, tm_p->tm_min, tm_p->tm_sec, - (int) (tv.tv_usec)); - } - } -#endif - } - if (cs->stack->flags & PROCESS_ON) - (void) fprintf(cs->stack->out_file, "%s: ", cs->process); - if (cs->stack->flags & FILE_ON) - (void) fprintf(cs->stack->out_file, "%14s: ", BaseName(cs->file)); - if (cs->stack->flags & LINE_ON) - (void) fprintf(cs->stack->out_file, "%5d: ", _line_); - if (cs->stack->flags & DEPTH_ON) - (void) fprintf(cs->stack->out_file, "%4d: ", cs->level); -} - - -/* - * FUNCTION - * - * DBUGOpenFile open new output stream for debugger output - * - * SYNOPSIS - * - * static VOID DBUGOpenFile(name) - * char *name; - * - * DESCRIPTION - * - * Given name of a new file (or "-" for stdout) opens the file - * and sets the output stream to the new file. - * - */ - -static void DBUGOpenFile(CODE_STATE *cs, - const char *name,const char *end,int append) -{ - REGISTER FILE *fp; - REGISTER BOOLEAN newfile; - - if (name != NULL) - { - if (end) - { - size_t len=end-name; - memcpy(cs->stack->name, name, len); - cs->stack->name[len]=0; - } - else - strmov(cs->stack->name,name); - name=cs->stack->name; - if (strcmp(name, "-") == 0) - { - cs->stack->out_file= stdout; - cs->stack->flags |= FLUSH_ON_WRITE; - cs->stack->name[0]=0; - } - else - { - if (!Writable(name)) - { - (void) fprintf(stderr, ERR_OPEN, cs->process, name); - perror(""); - fflush(stderr); - } - else - { - newfile= !EXISTS(name); - if (!(fp= fopen(name, append ? "a+" : "w"))) - { - (void) fprintf(stderr, ERR_OPEN, cs->process, name); - perror(""); - fflush(stderr); - } - else - { - cs->stack->out_file= fp; - if (newfile) - { - ChangeOwner(cs, name); - } - } - } - } - } -} - - -/* - * FUNCTION - * - * OpenProfile open new output stream for profiler output - * - * SYNOPSIS - * - * static FILE *OpenProfile(name) - * char *name; - * - * DESCRIPTION - * - * Given name of a new file, opens the file - * and sets the profiler output stream to the new file. - * - * It is currently unclear whether the prefered behavior is - * to truncate any existing file, or simply append to it. - * The latter behavior would be desirable for collecting - * accumulated runtime history over a number of separate - * runs. It might take some changes to the analyzer program - * though, and the notes that Binayak sent with the profiling - * diffs indicated that append was the normal mode, but this - * does not appear to agree with the actual code. I haven't - * investigated at this time [fnf; 24-Jul-87]. - */ - -#ifndef THREAD -static FILE *OpenProfile(CODE_STATE *cs, const char *name) -{ - REGISTER FILE *fp; - REGISTER BOOLEAN newfile; - - fp=0; - if (!Writable(name)) - { - (void) fprintf(cs->stack->out_file, ERR_OPEN, cs->process, name); - perror(""); - (void) Delay(cs->stack->delay); - } - else - { - newfile= !EXISTS(name); - if (!(fp= fopen(name, "w"))) - { - (void) fprintf(cs->stack->out_file, ERR_OPEN, cs->process, name); - perror(""); - } - else - { - cs->stack->prof_file= fp; - if (newfile) - { - ChangeOwner(cs, name); - } - } - } - return fp; -} -#endif - -/* - * FUNCTION - * - * DBUGCloseFile close the debug output stream - * - * SYNOPSIS - * - * static VOID DBUGCloseFile(fp) - * FILE *fp; - * - * DESCRIPTION - * - * Closes the debug output stream unless it is standard output - * or standard error. - * - */ - -static void DBUGCloseFile(CODE_STATE *cs, FILE *fp) -{ - if (fp && fp != stderr && fp != stdout && fclose(fp) == EOF) - { - pthread_mutex_lock(&THR_LOCK_dbug); - (void) fprintf(cs->stack->out_file, ERR_CLOSE, cs->process); - perror(""); - DbugFlush(cs); - } -} - - -/* - * FUNCTION - * - * DbugExit print error message and exit - * - * SYNOPSIS - * - * static VOID DbugExit(why) - * char *why; - * - * DESCRIPTION - * - * Prints error message using current process name, the reason for - * aborting (typically out of memory), and exits with status 1. - * This should probably be changed to use a status code - * defined in the user's debugger include file. - * - */ - -static void DbugExit(const char *why) -{ - CODE_STATE *cs=code_state(); - (void) fprintf(stderr, ERR_ABORT, cs ? cs->process : "(null)", why); - (void) fflush(stderr); - exit(1); -} - - -/* - * FUNCTION - * - * DbugMalloc allocate memory for debugger runtime support - * - * SYNOPSIS - * - * static long *DbugMalloc(size) - * int size; - * - * DESCRIPTION - * - * Allocate more memory for debugger runtime support functions. - * Failure to to allocate the requested number of bytes is - * immediately fatal to the current process. This may be - * rather unfriendly behavior. It might be better to simply - * print a warning message, freeze the current debugger cs, - * and continue execution. - * - */ - -static char *DbugMalloc(size_t size) -{ - register char *new_malloc; - - if (!(new_malloc= (char*) malloc(size))) - DbugExit("out of memory"); - return new_malloc; -} - - -/* - * strtok lookalike - splits on ':', magically handles ::, :\ and :/ - */ - -static const char *DbugStrTok(const char *s) -{ - while (s[0] && (s[0] != ':' || - (s[1] == '\\' || s[1] == '/' || (s[1] == ':' && s++)))) - s++; - return s; -} - - -/* - * FUNCTION - * - * BaseName strip leading pathname components from name - * - * SYNOPSIS - * - * static char *BaseName(pathname) - * char *pathname; - * - * DESCRIPTION - * - * Given pointer to a complete pathname, locates the base file - * name at the end of the pathname and returns a pointer to - * it. - * - */ - -static const char *BaseName(const char *pathname) -{ - register const char *base; - - base= strrchr(pathname, FN_LIBCHAR); - if (base++ == NullS) - base= pathname; - return base; -} - - -/* - * FUNCTION - * - * Writable test to see if a pathname is writable/creatable - * - * SYNOPSIS - * - * static BOOLEAN Writable(pathname) - * char *pathname; - * - * DESCRIPTION - * - * Because the debugger might be linked in with a program that - * runs with the set-uid-bit (suid) set, we have to be careful - * about opening a user named file for debug output. This consists - * of checking the file for write access with the real user id, - * or checking the directory where the file will be created. - * - * Returns TRUE if the user would normally be allowed write or - * create access to the named file. Returns FALSE otherwise. - * - */ - - -#ifndef Writable - -static BOOLEAN Writable(const char *pathname) -{ - REGISTER BOOLEAN granted; - REGISTER char *lastslash; - - granted= FALSE; - if (EXISTS(pathname)) - { - if (WRITABLE(pathname)) - granted= TRUE; - } - else - { - lastslash= strrchr(pathname, '/'); - if (lastslash != NULL) - *lastslash= '\0'; - else - pathname= "."; - if (WRITABLE(pathname)) - granted= TRUE; - if (lastslash != NULL) - *lastslash= '/'; - } - return granted; -} -#endif - - -/* - * FUNCTION - * - * ChangeOwner change owner to real user for suid programs - * - * SYNOPSIS - * - * static VOID ChangeOwner(pathname) - * - * DESCRIPTION - * - * For unix systems, change the owner of the newly created debug - * file to the real owner. This is strictly for the benefit of - * programs that are running with the set-user-id bit set. - * - * Note that at this point, the fact that pathname represents - * a newly created file has already been established. If the - * program that the debugger is linked to is not running with - * the suid bit set, then this operation is redundant (but - * harmless). - * - */ - -#ifndef ChangeOwner -static void ChangeOwner(CODE_STATE *cs, char *pathname) -{ - if (chown(pathname, getuid(), getgid()) == -1) - { - (void) fprintf(stderr, ERR_CHOWN, cs->process, pathname); - perror(""); - (void) fflush(stderr); - } -} -#endif - - -/* - * FUNCTION - * - * _db_setjmp_ save debugger environment - * - * SYNOPSIS - * - * VOID _db_setjmp_() - * - * DESCRIPTION - * - * Invoked as part of the user's DBUG_SETJMP macro to save - * the debugger environment in parallel with saving the user's - * environment. - * - */ - -#ifdef HAVE_LONGJMP - -EXPORT void _db_setjmp_() -{ - CODE_STATE *cs; - get_code_state_or_return; - - cs->jmplevel= cs->level; - cs->jmpfunc= cs->func; - cs->jmpfile= cs->file; -} - -/* - * FUNCTION - * - * _db_longjmp_ restore previously saved debugger environment - * - * SYNOPSIS - * - * VOID _db_longjmp_() - * - * DESCRIPTION - * - * Invoked as part of the user's DBUG_LONGJMP macro to restore - * the debugger environment in parallel with restoring the user's - * previously saved environment. - * - */ - -EXPORT void _db_longjmp_() -{ - CODE_STATE *cs; - get_code_state_or_return; - - cs->level= cs->jmplevel; - if (cs->jmpfunc) - cs->func= cs->jmpfunc; - if (cs->jmpfile) - cs->file= cs->jmpfile; -} -#endif - -/* - * FUNCTION - * - * perror perror simulation for systems that don't have it - * - * SYNOPSIS - * - * static VOID perror(s) - * char *s; - * - * DESCRIPTION - * - * Perror produces a message on the standard error stream which - * provides more information about the library or system error - * just encountered. The argument string s is printed, followed - * by a ':', a blank, and then a message and a newline. - * - * An undocumented feature of the unix perror is that if the string - * 's' is a null string (NOT a NULL pointer!), then the ':' and - * blank are not printed. - * - * This version just complains about an "unknown system error". - * - */ - -#ifndef HAVE_PERROR -static void perror(s) -char *s; -{ - if (s && *s != '\0') - (void) fprintf(stderr, "%s: ", s); - (void) fprintf(stderr, "\n"); -} -#endif /* HAVE_PERROR */ - - - /* flush dbug-stream, free mutex lock & wait delay */ - /* This is because some systems (MSDOS!!) dosn't flush fileheader */ - /* and dbug-file isn't readable after a system crash !! */ - -static void DbugFlush(CODE_STATE *cs) -{ - if (cs->stack->flags & FLUSH_ON_WRITE) - { - (void) fflush(cs->stack->out_file); - if (cs->stack->delay) - (void) Delay(cs->stack->delay); - } - if (!cs->locked) - pthread_mutex_unlock(&THR_LOCK_dbug); -} /* DbugFlush */ - - -/* For debugging */ - -void _db_flush_() -{ - CODE_STATE *cs; - get_code_state_or_return; - (void) fflush(cs->stack->out_file); -} - - -void _db_lock_file_() -{ - CODE_STATE *cs; - get_code_state_or_return; - pthread_mutex_lock(&THR_LOCK_dbug); - cs->locked=1; -} - -void _db_unlock_file_() -{ - CODE_STATE *cs; - get_code_state_or_return; - cs->locked=0; - pthread_mutex_unlock(&THR_LOCK_dbug); -} - -/* - * Here we need the definitions of the clock routine. Add your - * own for whatever system that you have. - */ - -#ifndef THREAD -#if defined(HAVE_GETRUSAGE) - -#include -#include - -/* extern int getrusage(int, struct rusage *); */ - -/* - * Returns the user time in milliseconds used by this process so - * far. - */ - -static unsigned long Clock() -{ - struct rusage ru; - - (void) getrusage(RUSAGE_SELF, &ru); - return ru.ru_utime.tv_sec*1000 + ru.ru_utime.tv_usec/1000; -} - -#elif defined(MSDOS) || defined(__WIN__) - -static ulong Clock() -{ - return clock()*(1000/CLOCKS_PER_SEC); -} -#elif defined(amiga) - -struct DateStamp { /* Yes, this is a hack, but doing it right */ - long ds_Days; /* is incredibly ugly without splitting this */ - long ds_Minute; /* off into a separate file */ - long ds_Tick; -}; - -static int first_clock= TRUE; -static struct DateStamp begin; -static struct DateStamp elapsed; - -static unsigned long Clock() -{ - register struct DateStamp *now; - register unsigned long millisec= 0; - extern VOID *AllocMem(); - - now= (struct DateStamp *) AllocMem((long) sizeof(struct DateStamp), 0L); - if (now != NULL) - { - if (first_clock == TRUE) - { - first_clock= FALSE; - (void) DateStamp(now); - begin= *now; - } - (void) DateStamp(now); - millisec= 24 * 3600 * (1000 / HZ) * (now->ds_Days - begin.ds_Days); - millisec += 60 * (1000 / HZ) * (now->ds_Minute - begin.ds_Minute); - millisec += (1000 / HZ) * (now->ds_Tick - begin.ds_Tick); - (void) FreeMem(now, (long) sizeof(struct DateStamp)); - } - return millisec; -} -#else -static unsigned long Clock() -{ - return 0; -} -#endif /* RUSAGE */ -#endif /* THREADS */ - -#ifdef NO_VARARGS - -/* - * Fake vfprintf for systems that don't support it. If this - * doesn't work, you are probably SOL... - */ - -static int vfprintf(stream, format, ap) -FILE *stream; -char *format; -va_list ap; -{ - int rtnval; - ARGS_DCL; - - ARG0= va_arg(ap, ARGS_TYPE); - ARG1= va_arg(ap, ARGS_TYPE); - ARG2= va_arg(ap, ARGS_TYPE); - ARG3= va_arg(ap, ARGS_TYPE); - ARG4= va_arg(ap, ARGS_TYPE); - ARG5= va_arg(ap, ARGS_TYPE); - ARG6= va_arg(ap, ARGS_TYPE); - ARG7= va_arg(ap, ARGS_TYPE); - ARG8= va_arg(ap, ARGS_TYPE); - ARG9= va_arg(ap, ARGS_TYPE); - rtnval= fprintf(stream, format, ARGS_LIST); - return rtnval; -} - -#endif /* NO_VARARGS */ - -#else - -/* - * Dummy function, workaround for MySQL bug#14420 related - * build failure on a platform where linking with an empty - * archive fails. - * - * This block can be removed as soon as a fix for bug#14420 - * is implemented. - */ -int i_am_a_dummy_function() { - return 0; -} - -#endif diff --git a/externals/mysql/extlib/dbug/dbug_analyze.c b/externals/mysql/extlib/dbug/dbug_analyze.c deleted file mode 100644 index 3263b2ccc5..0000000000 --- a/externals/mysql/extlib/dbug/dbug_analyze.c +++ /dev/null @@ -1,726 +0,0 @@ -/* - * Analyze the profile file (cmon.out) written out by the dbug - * routines with profiling enabled. - * - * Copyright June 1987, Binayak Banerjee - * All rights reserved. - * - * This program may be freely distributed under the same terms and - * conditions as Fred Fish's Dbug package. - * - * Compile with -- cc -O -s -o %s analyze.c - * - * Analyze will read an trace file created by the dbug package - * (when run with traceing enabled). It will then produce a - * summary on standard output listing the name of each traced - * function, the number of times it was called, the percentage - * of total calls, the time spent executing the function, the - * proportion of the total time and the 'importance'. The last - * is a metric which is obtained by multiplying the proportions - * of calls and the proportions of time for each function. The - * greater the importance, the more likely it is that a speedup - * could be obtained by reducing the time taken by that function. - * - * Note that the timing values that you obtain are only rough - * measures. The overhead of the dbug package is included - * within. However, there is no need to link in special profiled - * libraries and the like. - * - * CHANGES: - * - * 2-Mar-89: fnf - * Changes to support tracking of stack usage. This required - * reordering the fields in the profile log file to make - * parsing of different record types easier. Corresponding - * changes made in dbug runtime library. Also used this - * opportunity to reformat the code more to my liking (my - * apologies to Binayak Banerjee for "uglifying" his code). - * - * 24-Jul-87: fnf - * Because I tend to use functions names like - * "ExternalFunctionDoingSomething", I've rearranged the - * printout to put the function name last in each line, so - * long names don't screw up the formatting unless they are - * *very* long and wrap around the screen width... - * - * 24-Jul-87: fnf - * Modified to put out table very similar to Unix profiler - * by default, but also puts out original verbose table - * if invoked with -v flag. - */ - -#include -#include -#include - -static char *my_name; -static int verbose; - -/* - * Structure of the stack. - */ - -#define PRO_FILE "dbugmon.out" /* Default output file name */ -#define STACKSIZ 100 /* Maximum function nesting */ -#define MAXPROCS 10000 /* Maximum number of function calls */ - -# ifdef BSD -# include -# else -# define EX_SOFTWARE 1 -# define EX_DATAERR 1 -# define EX_USAGE 1 -# define EX_OSERR 1 -# define EX_IOERR 1 -#ifndef EX_OK -# define EX_OK 0 -#endif -# endif - -#define __MERF_OO_ "%s: Malloc Failed in %s: %d\n" - -#define MALLOC(Ptr,Num,Typ) do /* Malloc w/error checking & exit */ \ - if (!(Ptr = (Typ *)malloc((Num)*(sizeof(Typ))))) \ - {fprintf(stderr,__MERF_OO_,my_name,__FILE__,__LINE__);\ - exit(EX_OSERR);} while(0) - -#define Malloc(Ptr,Num,Typ) do /* Weaker version of above */\ - if (!(Ptr = (Typ *)malloc((Num)*(sizeof(Typ))))) \ - fprintf(stderr,__MERF_OO_,my_name,__FILE__,__LINE__);\ - while(0) - -#define FILEOPEN(Fp,Fn,Mod) do /* File open with error exit */ \ - if (!(Fp = fopen(Fn,Mod)))\ - {fprintf(stderr,"%s: Couldn't open %s\n",my_name,Fn);\ - exit(EX_IOERR);} while(0) - -#define Fileopen(Fp,Fn,Mod) do /* Weaker version of above */ \ - if(!(Fp = fopen(Fn,Mod))) \ - fprintf(stderr,"%s: Couldn't open %s\n",my_name,Fn);\ - while(0) - - -struct stack_t { - unsigned int pos; /* which function? */ - unsigned long time; /* Time that this was entered */ - unsigned long children; /* Time spent in called funcs */ -}; - -static struct stack_t fn_stack[STACKSIZ+1]; - -static unsigned int stacktop = 0; /* Lowest stack position is a dummy */ - -static unsigned long tot_time = 0; -static unsigned long tot_calls = 0; -static unsigned long highstack = 0; -static unsigned long lowstack = (ulong) ~0; - -/* - * top() returns a pointer to the top item on the stack. - * (was a function, now a macro) - */ - -#define top() &fn_stack[stacktop] - -/* - * Push - Push the given record on the stack. - */ - -void push (name_pos, time_entered) -register unsigned int name_pos; -register unsigned long time_entered; -{ - register struct stack_t *t; - - DBUG_ENTER("push"); - if (++stacktop > STACKSIZ) { - fprintf (DBUG_FILE,"%s: stack overflow (%s:%d)\n", - my_name, __FILE__, __LINE__); - exit (EX_SOFTWARE); - } - DBUG_PRINT ("push", ("%d %ld",name_pos,time_entered)); - t = &fn_stack[stacktop]; - t -> pos = name_pos; - t -> time = time_entered; - t -> children = 0; - DBUG_VOID_RETURN; -} - -/* - * Pop - pop the top item off the stack, assigning the field values - * to the arguments. Returns 0 on stack underflow, or on popping first - * item off stack. - */ - -unsigned int pop (name_pos, time_entered, child_time) -register unsigned int *name_pos; -register unsigned long *time_entered; -register unsigned long *child_time; -{ - register struct stack_t *temp; - register unsigned int rtnval; - - DBUG_ENTER ("pop"); - - if (stacktop < 1) { - rtnval = 0; - } else { - temp = &fn_stack[stacktop]; - *name_pos = temp->pos; - *time_entered = temp->time; - *child_time = temp->children; - DBUG_PRINT ("pop", ("%d %lu %lu",*name_pos,*time_entered,*child_time)); - rtnval = stacktop--; - } - DBUG_RETURN (rtnval); -} - -/* - * We keep the function info in another array (serves as a simple - * symbol table) - */ - -struct module_t { - char *name; - unsigned long m_time; - unsigned long m_calls; - unsigned long m_stkuse; -}; - -static struct module_t modules[MAXPROCS]; - -/* - * We keep a binary search tree in order to look up function names - * quickly (and sort them at the end. - */ - -struct bnode { - unsigned int lchild; /* Index of left subtree */ - unsigned int rchild; /* Index of right subtree */ - unsigned int pos; /* Index of module_name entry */ -}; - -static struct bnode s_table[MAXPROCS]; - -static unsigned int n_items = 0; /* No. of items in the array so far */ - -/* - * Need a function to allocate space for a string and squirrel it away. - */ - -char *strsave (s) -char *s; -{ - register char *retval; - register unsigned int len; - - DBUG_ENTER ("strsave"); - DBUG_PRINT ("strsave", ("%s",s)); - if (!s || (len = strlen (s)) == 0) { - DBUG_RETURN (0); - } - MALLOC (retval, ++len, char); - strcpy (retval, s); - DBUG_RETURN (retval); -} - -/* - * add() - adds m_name to the table (if not already there), and returns - * the index of its location in the table. Checks s_table (which is a - * binary search tree) to see whether or not it should be added. - */ - -unsigned int add (m_name) -char *m_name; -{ - register unsigned int ind = 0; - register int cmp; - - DBUG_ENTER ("add"); - if (n_items == 0) { /* First item to be added */ - s_table[0].pos = ind; - s_table[0].lchild = s_table[0].rchild = MAXPROCS; - addit: - modules[n_items].name = strsave (m_name); - modules[n_items].m_time = 0; - modules[n_items].m_calls = 0; - modules[n_items].m_stkuse = 0; - DBUG_RETURN (n_items++); - } - while ((cmp = strcmp (m_name,modules[ind].name))) { - if (cmp < 0) { /* In left subtree */ - if (s_table[ind].lchild == MAXPROCS) { - /* Add as left child */ - if (n_items >= MAXPROCS) { - fprintf (DBUG_FILE, - "%s: Too many functions being profiled\n", - my_name); - exit (EX_SOFTWARE); - } - s_table[n_items].pos = s_table[ind].lchild = n_items; - s_table[n_items].lchild = s_table[n_items].rchild = MAXPROCS; -#ifdef notdef - modules[n_items].name = strsave (m_name); - modules[n_items].m_time = modules[n_items].m_calls = 0; - DBUG_RETURN (n_items++); -#else - goto addit; -#endif - - } - ind = s_table[ind].lchild; /* else traverse l-tree */ - } else { - if (s_table[ind].rchild == MAXPROCS) { - /* Add as right child */ - if (n_items >= MAXPROCS) { - fprintf (DBUG_FILE, - "%s: Too many functions being profiled\n", - my_name); - exit (EX_SOFTWARE); - } - s_table[n_items].pos = s_table[ind].rchild = n_items; - s_table[n_items].lchild = s_table[n_items].rchild = MAXPROCS; -#ifdef notdef - modules[n_items].name = strsave (m_name); - modules[n_items].m_time = modules[n_items].m_calls = 0; - DBUG_RETURN (n_items++); -#else - goto addit; -#endif - - } - ind = s_table[ind].rchild; /* else traverse r-tree */ - } - } - DBUG_RETURN (ind); -} - -/* - * process() - process the input file, filling in the modules table. - */ - -void process (inf) -FILE *inf; -{ - char buf[BUFSIZ]; - char fn_name[64]; /* Max length of fn_name */ - unsigned long fn_time; - unsigned long fn_sbot; - unsigned long fn_ssz; - unsigned long lastuse; - unsigned int pos; - unsigned long local_time; - unsigned int oldpos; - unsigned long oldtime; - unsigned long oldchild; - struct stack_t *t; - - DBUG_ENTER ("process"); - while (fgets (buf,BUFSIZ,inf) != NULL) { - switch (buf[0]) { - case 'E': - sscanf (buf+2, "%ld %64s", &fn_time, fn_name); - DBUG_PRINT ("erec", ("%ld %s", fn_time, fn_name)); - pos = add (fn_name); - push (pos, fn_time); - break; - case 'X': - sscanf (buf+2, "%ld %64s", &fn_time, fn_name); - DBUG_PRINT ("xrec", ("%ld %s", fn_time, fn_name)); - pos = add (fn_name); - /* - * An exited function implies that all stacked - * functions are also exited, until the matching - * function is found on the stack. - */ - while (pop (&oldpos, &oldtime, &oldchild)) { - DBUG_PRINT ("popped", ("%lu %lu", oldtime, oldchild)); - local_time = fn_time - oldtime; - t = top (); - t -> children += local_time; - DBUG_PRINT ("update", ("%s", modules[t -> pos].name)); - DBUG_PRINT ("update", ("%lu", t -> children)); - local_time -= oldchild; - modules[oldpos].m_time += local_time; - modules[oldpos].m_calls++; - tot_time += local_time; - tot_calls++; - if (pos == oldpos) { - goto next_line; /* Should be a break2 */ - } - } - /* - * Assume that item seen started at time 0. - * (True for function main). But initialize - * it so that it works the next time too. - */ - t = top (); - local_time = fn_time - t -> time - t -> children; - t -> time = fn_time; t -> children = 0; - modules[pos].m_time += local_time; - modules[pos].m_calls++; - tot_time += local_time; - tot_calls++; - break; - case 'S': - sscanf (buf+2, "%lx %lx %64s", &fn_sbot, &fn_ssz, fn_name); - DBUG_PRINT ("srec", ("%lx %lx %s", fn_sbot, fn_ssz, fn_name)); - pos = add (fn_name); - lastuse = modules[pos].m_stkuse; -#if 0 - /* - * Needs further thought. Stack use is determined by - * difference in stack between two functions with DBUG_ENTER - * macros. If A calls B calls C, where A and C have the - * macros, and B doesn't, then B's stack use will be lumped - * in with either A's or C's. If somewhere else A calls - * C directly, the stack use will seem to change. Just - * take the biggest for now... - */ - if (lastuse > 0 && lastuse != fn_ssz) { - fprintf (stderr, - "warning - %s stack use changed (%lx to %lx)\n", - fn_name, lastuse, fn_ssz); - } -#endif - if (fn_ssz > lastuse) { - modules[pos].m_stkuse = fn_ssz; - } - if (fn_sbot > highstack) { - highstack = fn_sbot; - } else if (fn_sbot < lowstack) { - lowstack = fn_sbot; - } - break; - default: - fprintf (stderr, "unknown record type '%c'\n", buf[0]); - break; - } - next_line:; - } - - /* - * Now, we've hit eof. If we still have stuff stacked, then we - * assume that the user called exit, so give everything the exited - * time of fn_time. - */ - while (pop (&oldpos,&oldtime,&oldchild)) { - local_time = fn_time - oldtime; - t = top (); - t -> children += local_time; - local_time -= oldchild; - modules[oldpos].m_time += local_time; - modules[oldpos].m_calls++; - tot_time += local_time; - tot_calls++; - } - DBUG_VOID_RETURN; -} - -/* - * out_header () -- print out the header of the report. - */ - -void out_header (outf) -FILE *outf; -{ - DBUG_ENTER ("out_header"); - if (verbose) { - fprintf (outf, "Profile of Execution\n"); - fprintf (outf, "Execution times are in milliseconds\n\n"); - fprintf (outf, " Calls\t\t\t Time\n"); - fprintf (outf, " -----\t\t\t ----\n"); - fprintf (outf, "Times\tPercentage\tTime Spent\tPercentage\n"); - fprintf (outf, "Called\tof total\tin Function\tof total Importance\tFunction\n"); - fprintf (outf, "======\t==========\t===========\t========== ==========\t========\t\n"); - } else { - fprintf (outf, "%ld bytes of stack used, from %lx down to %lx\n\n", - highstack - lowstack, highstack, lowstack); - fprintf (outf, - " %%time sec #call ms/call %%calls weight stack name\n"); - } - DBUG_VOID_RETURN; -} - -/* - * out_trailer () - writes out the summary line of the report. - */ - -void out_trailer (outf,sum_calls,sum_time) -FILE *outf; -unsigned long int sum_calls, sum_time; -{ - DBUG_ENTER ("out_trailer"); - if (verbose) - { - fprintf(outf, "======\t==========\t===========\t==========\t========\n"); - fprintf(outf, "%6ld\t%10.2f\t%11ld\t%10.2f\t\t%-15s\n", - sum_calls, 100.0, sum_time, 100.0, "Totals"); - } - DBUG_VOID_RETURN; -} - -/* - * out_item () - prints out the output line for a single entry, - * and sets the calls and time fields appropriately. - */ - -void out_item (outf, m,called,timed) -FILE *outf; -register struct module_t *m; -unsigned long int *called, *timed; -{ - char *name = m -> name; - register unsigned int calls = m -> m_calls; - register unsigned long local_time = m -> m_time; - register unsigned long stkuse = m -> m_stkuse; - unsigned int import; - double per_time = 0.0; - double per_calls = 0.0; - double ms_per_call, local_ftime; - - DBUG_ENTER ("out_item"); - - if (tot_time > 0) { - per_time = (double) (local_time * 100) / (double) tot_time; - } - if (tot_calls > 0) { - per_calls = (double) (calls * 100) / (double) tot_calls; - } - import = (unsigned int) (per_time * per_calls); - - if (verbose) { - fprintf (outf, "%6d\t%10.2f\t%11ld\t%10.2f %10d\t%-15s\n", - calls, per_calls, local_time, per_time, import, name); - } else { - ms_per_call = local_time; - ms_per_call /= calls; - local_ftime = local_time; - local_ftime /= 1000; - fprintf(outf, "%8.2f%8.3f%8u%8.3f%8.2f%8u%8lu %-s\n", - per_time, local_ftime, calls, ms_per_call, per_calls, import, - stkuse, name); - } - *called = calls; - *timed = local_time; - DBUG_VOID_RETURN; -} - -/* - * out_body (outf, root,s_calls,s_time) -- Performs an inorder traversal - * on the binary search tree (root). Calls out_item to actually print - * the item out. - */ - -void out_body (outf, root,s_calls,s_time) -FILE *outf; -register unsigned int root; -register unsigned long int *s_calls, *s_time; -{ - unsigned long int calls, local_time; - - DBUG_ENTER ("out_body"); - DBUG_PRINT ("out_body", ("%lu,%lu",*s_calls,*s_time)); - if (root == MAXPROCS) { - DBUG_PRINT ("out_body", ("%lu,%lu",*s_calls,*s_time)); - } else { - while (root != MAXPROCS) { - out_body (outf, s_table[root].lchild,s_calls,s_time); - out_item (outf, &modules[s_table[root].pos],&calls,&local_time); - DBUG_PRINT ("out_body", ("-- %lu -- %lu --", calls, local_time)); - *s_calls += calls; - *s_time += local_time; - root = s_table[root].rchild; - } - DBUG_PRINT ("out_body", ("%lu,%lu", *s_calls, *s_time)); - } - DBUG_VOID_RETURN; -} - -/* - * output () - print out a nice sorted output report on outf. - */ - -void output (outf) -FILE *outf; -{ - unsigned long int sum_calls = 0; - unsigned long int sum_time = 0; - - DBUG_ENTER ("output"); - if (n_items == 0) { - fprintf (outf, "%s: No functions to trace\n", my_name); - exit (EX_DATAERR); - } - out_header (outf); - out_body (outf, 0,&sum_calls,&sum_time); - out_trailer (outf, sum_calls,sum_time); - DBUG_VOID_RETURN; -} - - -#define usage() fprintf (DBUG_FILE,"Usage: %s [-v] [prof-file]\n",my_name) - -#ifdef MSDOS -extern int getopt(int argc, char **argv, char *opts); -#endif -extern int optind; -extern char *optarg; - -int main (int argc, char **argv) -{ - register int c; - int badflg = 0; - FILE *infile; - FILE *outfile = {stdout}; - -#ifdef THREAD -#if defined(HAVE_PTHREAD_INIT) - pthread_init(); /* Must be called before DBUG_ENTER */ -#endif - my_thread_global_init(); -#endif /* THREAD */ - { - DBUG_ENTER ("main"); - DBUG_PROCESS (argv[0]); - my_name = argv[0]; - while ((c = getopt (argc,argv,"#:v")) != EOF) { - switch (c) { - case '#': /* Debugging Macro enable */ - DBUG_PUSH (optarg); - break; - case 'v': /* Verbose mode */ - verbose++; - break; - default: - badflg++; - break; - } - } - if (badflg) { - usage (); - DBUG_RETURN (EX_USAGE); - } - if (optind < argc) { - FILEOPEN (infile, argv[optind], "r"); - } else { - FILEOPEN (infile, PRO_FILE, "r"); - } - process (infile); - output (outfile); - DBUG_RETURN (EX_OK); -} -} - -#ifdef MSDOS - -/* - * From std-unix@ut-sally.UUCP (Moderator, John Quarterman) Sun Nov 3 14:34:15 1985 - * Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site gatech.CSNET - * Posting-Version: version B 2.10.2 9/18/84; site ut-sally.UUCP - * Path: gatech!akgua!mhuxv!mhuxt!mhuxr!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!ut-sally!std-unix - * From: std-unix@ut-sally.UUCP (Moderator, John Quarterman) - * Newsgroups: mod.std.unix - * Subject: public domain AT&T getopt source - * Message-ID: <3352@ut-sally.UUCP> - * Date: 3 Nov 85 19:34:15 GMT - * Date-Received: 4 Nov 85 12:25:09 GMT - * Organization: IEEE/P1003 Portable Operating System Environment Committee - * Lines: 91 - * Approved: jsq@ut-sally.UUCP - * - * Here's something you've all been waiting for: the AT&T public domain - * source for getopt(3). It is the code which was given out at the 1985 - * UNIFORUM conference in Dallas. I obtained it by electronic mail - * directly from AT&T. The people there assure me that it is indeed - * in the public domain. - * - * There is no manual page. That is because the one they gave out at - * UNIFORUM was slightly different from the current System V Release 2 - * manual page. The difference apparently involved a note about the - * famous rules 5 and 6, recommending using white space between an option - * and its first argument, and not grouping options that have arguments. - * Getopt itself is currently lenient about both of these things White - * space is allowed, but not mandatory, and the last option in a group can - * have an argument. That particular version of the man page evidently - * has no official existence, and my source at AT&T did not send a copy. - * The current SVR2 man page reflects the actual behavor of this getopt. - * However, I am not about to post a copy of anything licensed by AT&T. - * - * I will submit this source to Berkeley as a bug fix. - * - * I, personally, make no claims or guarantees of any kind about the - * following source. I did compile it to get some confidence that - * it arrived whole, but beyond that you're on your own. - * - */ - -/*LINTLIBRARY*/ - -int opterr = 1; -int optind = 1; -int optopt; -char *optarg; - -static void _ERR(s,c,argv) -char *s; -int c; -char *argv[]; -{ - char errbuf[3]; - - if (opterr) { - errbuf[0] = c; - errbuf[1] = '\n'; - (void) fprintf(stderr, "%s", argv[0]); - (void) fprintf(stderr, "%s", s); - (void) fprintf(stderr, "%s", errbuf); - } -} - -int getopt(argc, argv, opts) -int argc; -char **argv, *opts; -{ - static int sp = 1; - register int c; - register char *cp; - - if(sp == 1) - if(optind >= argc || - argv[optind][0] != '-' || argv[optind][1] == '\0') - return(EOF); - else if(strcmp(argv[optind], "--") == 0) { - optind++; - return(EOF); - } - optopt = c = argv[optind][sp]; - if(c == ':' || (cp=strchr(opts, c)) == NULL) { - _ERR(": illegal option -- ", c, argv); - if(argv[optind][++sp] == '\0') { - optind++; - sp = 1; - } - return('?'); - } - if(*++cp == ':') { - if(argv[optind][sp+1] != '\0') - optarg = &argv[optind++][sp+1]; - else if(++optind >= argc) { - _ERR(": option requires an argument -- ", c, argv); - sp = 1; - return('?'); - } else - optarg = argv[optind++]; - sp = 1; - } else { - if(argv[optind][++sp] == '\0') { - sp = 1; - optind++; - } - optarg = NULL; - } - return(c); -} - -#endif /* !unix && !xenix */ diff --git a/externals/mysql/extlib/dbug/dbug_long.h b/externals/mysql/extlib/dbug/dbug_long.h deleted file mode 100644 index 829df181ef..0000000000 --- a/externals/mysql/extlib/dbug/dbug_long.h +++ /dev/null @@ -1,160 +0,0 @@ -#error This file is not used in MySQL - see ../include/my_dbug.h instead -/****************************************************************************** - * * - * N O T I C E * - * * - * Copyright Abandoned, 1987, Fred Fish * - * * - * * - * This previously copyrighted work has been placed into the public * - * domain by the author and may be freely used for any purpose, * - * private or commercial. * - * * - * Because of the number of inquiries I was receiving about the use * - * of this product in commercially developed works I have decided to * - * simply make it public domain to further its unrestricted use. I * - * specifically would be most happy to see this material become a * - * part of the standard Unix distributions by AT&T and the Berkeley * - * Computer Science Research Group, and a standard part of the GNU * - * system from the Free Software Foundation. * - * * - * I would appreciate it, as a courtesy, if this notice is left in * - * all copies and derivative works. Thank you. * - * * - * The author makes no warranty of any kind with respect to this * - * product and explicitly disclaims any implied warranties of mer- * - * chantability or fitness for any particular purpose. * - * * - ****************************************************************************** - */ - -/* - * FILE - * - * dbug.h user include file for programs using the dbug package - * - * SYNOPSIS - * - * #include - * - * SCCS ID - * - * @(#)dbug.h 1.13 7/17/89 - * - * DESCRIPTION - * - * Programs which use the dbug package must include this file. - * It contains the appropriate macros to call support routines - * in the dbug runtime library. - * - * To disable compilation of the macro expansions define the - * preprocessor symbol "DBUG_OFF". This will result in null - * macros expansions so that the resulting code will be smaller - * and faster. (The difference may be smaller than you think - * so this step is recommended only when absolutely necessary). - * In general, tradeoffs between space and efficiency are - * decided in favor of efficiency since space is seldom a - * problem on the new machines). - * - * All externally visible symbol names follow the pattern - * "_db_xxx..xx_" to minimize the possibility of a dbug package - * symbol colliding with a user defined symbol. - * - * The DBUG_ style macros are obsolete and should not be used - * in new code. Macros to map them to instances of DBUG_PRINT - * are provided for compatibility with older code. They may go - * away completely in subsequent releases. - * - * AUTHOR - * - * Fred Fish - * (Currently employed by Motorola Computer Division, Tempe, Az.) - * hao!noao!mcdsun!fnf - * (602) 438-3614 - * - */ - -/* - * Internally used dbug variables which must be global. - */ - -#ifndef DBUG_OFF - extern int _db_on_; /* TRUE if debug currently enabled */ - extern FILE *_db_fp_; /* Current debug output stream */ - extern char *_db_process_; /* Name of current process */ - extern int _db_keyword_ (); /* Accept/reject keyword */ - extern void _db_push_ (); /* Push state, set up new state */ - extern void _db_pop_ (); /* Pop previous debug state */ - extern void _db_enter_ (); /* New user function entered */ - extern void _db_return_ (); /* User function return */ - extern void _db_pargs_ (); /* Remember args for line */ - extern void _db_doprnt_ (); /* Print debug output */ - extern void _db_setjmp_ (); /* Save debugger environment */ - extern void _db_longjmp_ (); /* Restore debugger environment */ - extern void _db_dump_(); /* Dump memory */ -# endif - - -/* - * These macros provide a user interface into functions in the - * dbug runtime support library. They isolate users from changes - * in the MACROS and/or runtime support. - * - * The symbols "__LINE__" and "__FILE__" are expanded by the - * preprocessor to the current source file line number and file - * name respectively. - * - * WARNING --- Because the DBUG_ENTER macro allocates space on - * the user function's stack, it must precede any executable - * statements in the user function. - * - */ - -# ifdef DBUG_OFF -# define DBUG_ENTER(a1) -# define DBUG_RETURN(a1) return(a1) -# define DBUG_VOID_RETURN return -# define DBUG_EXECUTE(keyword,a1) -# define DBUG_PRINT(keyword,arglist) -# define DBUG_2(keyword,format) /* Obsolete */ -# define DBUG_3(keyword,format,a1) /* Obsolete */ -# define DBUG_4(keyword,format,a1,a2) /* Obsolete */ -# define DBUG_5(keyword,format,a1,a2,a3) /* Obsolete */ -# define DBUG_PUSH(a1) -# define DBUG_POP() -# define DBUG_PROCESS(a1) -# define DBUG_FILE (stderr) -# define DBUG_SETJMP setjmp -# define DBUG_LONGJMP longjmp -# define DBUG_DUMP(keyword,a1) -# else -# define DBUG_ENTER(a) \ - auto char *_db_func_; auto char *_db_file_; auto int _db_level_; \ - auto char **_db_framep_; \ - _db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_, \ - &_db_framep_) -# define DBUG_LEAVE \ - (_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_)) -# define DBUG_RETURN(a1) return (DBUG_LEAVE, (a1)) -/* define DBUG_RETURN(a1) {DBUG_LEAVE; return(a1);} Alternate form */ -# define DBUG_VOID_RETURN {DBUG_LEAVE; return;} -# define DBUG_EXECUTE(keyword,a1) \ - {if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}} -# define DBUG_PRINT(keyword,arglist) \ - {if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;}} -# define DBUG_2(keyword,format) \ - DBUG_PRINT(keyword,(format)) /* Obsolete */ -# define DBUG_3(keyword,format,a1) \ - DBUG_PRINT(keyword,(format,a1)) /* Obsolete */ -# define DBUG_4(keyword,format,a1,a2) \ - DBUG_PRINT(keyword,(format,a1,a2)) /* Obsolete */ -# define DBUG_5(keyword,format,a1,a2,a3) \ - DBUG_PRINT(keyword,(format,a1,a2,a3)) /* Obsolete */ -# define DBUG_PUSH(a1) _db_push_ (a1) -# define DBUG_POP() _db_pop_ () -# define DBUG_PROCESS(a1) (_db_process_ = a1) -# define DBUG_FILE (_db_fp_) -# define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1)) -# define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2)) -# define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2) -# endif diff --git a/externals/mysql/extlib/dbug/example1.c b/externals/mysql/extlib/dbug/example1.c deleted file mode 100644 index 7b3c3fcd63..0000000000 --- a/externals/mysql/extlib/dbug/example1.c +++ /dev/null @@ -1,10 +0,0 @@ -main (argc, argv) -int argc; -char *argv[]; -{ - printf ("argv[0] = %d\n", argv[0]); - /* - * Rest of program - */ - printf ("== done ==\n"); -} diff --git a/externals/mysql/extlib/dbug/example2.c b/externals/mysql/extlib/dbug/example2.c deleted file mode 100644 index 75fc1321b1..0000000000 --- a/externals/mysql/extlib/dbug/example2.c +++ /dev/null @@ -1,15 +0,0 @@ -int debug = 0; - -main (argc, argv) -int argc; -char *argv[]; -{ - /* printf ("argv = %x\n", argv) */ - if (debug) printf ("argv[0] = %d\n", argv[0]); - /* - * Rest of program - */ -#ifdef DEBUG - printf ("== done ==\n"); -#endif -} diff --git a/externals/mysql/extlib/dbug/example3.c b/externals/mysql/extlib/dbug/example3.c deleted file mode 100644 index c035cdfffa..0000000000 --- a/externals/mysql/extlib/dbug/example3.c +++ /dev/null @@ -1,14 +0,0 @@ -main (argc, argv) -int argc; -char *argv[]; -{ -# ifdef DEBUG - printf ("argv[0] = %d\n", argv[0]); -# endif - /* - * Rest of program - */ -# ifdef DEBUG - printf ("== done ==\n"); -# endif -} diff --git a/externals/mysql/extlib/dbug/factorial.c b/externals/mysql/extlib/dbug/factorial.c deleted file mode 100644 index 7b190ea8d8..0000000000 --- a/externals/mysql/extlib/dbug/factorial.c +++ /dev/null @@ -1,27 +0,0 @@ -#ifdef DBUG_OFF /* We are testing dbug */ - -int factorial(register int value) { - if(value > 1) { - value *= factorial(value-1); - } - return value; -} - -#else - -#include - -int factorial ( -register int value) -{ - DBUG_ENTER ("factorial"); - DBUG_PRINT ("find", ("find %d factorial", value)); - if (value > 1) { - value *= factorial (value - 1); - } - DBUG_PRINT ("result", ("result is %d", value)); - DBUG_RETURN (value); -} - -#endif - diff --git a/externals/mysql/extlib/dbug/main.c b/externals/mysql/extlib/dbug/main.c deleted file mode 100644 index 00e80c8ba3..0000000000 --- a/externals/mysql/extlib/dbug/main.c +++ /dev/null @@ -1,24 +0,0 @@ -#include - -int main (argc, argv) -int argc; -char *argv[]; -{ - int result, ix; - extern int factorial(int); - DBUG_ENTER ("main"); - DBUG_PROCESS (argv[0]); - for (ix = 1; ix < argc && argv[ix][0] == '-'; ix++) { - switch (argv[ix][1]) { - case '#': - DBUG_PUSH (&(argv[ix][2])); - break; - } - } - for (; ix < argc; ix++) { - DBUG_PRINT ("args", ("argv[%d] = %s", ix, argv[ix])); - result = factorial (atoi(argv[ix])); - printf ("%d\n", result); - } - DBUG_RETURN (0); -} diff --git a/externals/mysql/extlib/dbug/my_main.c b/externals/mysql/extlib/dbug/my_main.c deleted file mode 100644 index 31c15aa67a..0000000000 --- a/externals/mysql/extlib/dbug/my_main.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - this is modified version of the original example main.c - fixed so that it could compile and run in MySQL source tree -*/ - -#ifdef DBUG_OFF /* We are testing dbug */ -#undef DBUG_OFF -#endif - -#include /* This includes dbug.h */ -#include - -int main (argc, argv) -int argc; -char *argv[]; -{ - register int result, ix; - extern int factorial(int); -#if defined(HAVE_PTHREAD_INIT) && defined(THREAD) - pthread_init(); /* Must be called before DBUG_ENTER */ -#endif -#ifdef THREAD - my_thread_global_init(); -#endif - { - DBUG_ENTER ("main"); - DBUG_PROCESS (argv[0]); - for (ix = 1; ix < argc && argv[ix][0] == '-'; ix++) { - switch (argv[ix][1]) { - case '#': - DBUG_PUSH (&(argv[ix][2])); - break; - } - } - for (; ix < argc; ix++) { - DBUG_PRINT ("args", ("argv[%d] = %s", ix, argv[ix])); - result = factorial (atoi(argv[ix])); - printf ("%d\n", result); - } - DBUG_RETURN (0); - } -} diff --git a/externals/mysql/extlib/dbug/sanity.c b/externals/mysql/extlib/dbug/sanity.c deleted file mode 100644 index df43fc14ba..0000000000 --- a/externals/mysql/extlib/dbug/sanity.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Declarate _sanity() if not declared in main program */ - -#include - -extern int _sanity(const char *file,uint line); - -#if defined(SAFEMALLOC) && !defined(MASTER) /* Avoid errors in MySQL */ -int _sanity(const char * file __attribute__((unused)), - uint line __attribute__((unused))) -{ - return 0; -} -#endif diff --git a/externals/mysql/extlib/dbug/tests.c b/externals/mysql/extlib/dbug/tests.c deleted file mode 100644 index d76266d34a..0000000000 --- a/externals/mysql/extlib/dbug/tests.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - A program to test DBUG features. Used by tests-t.pl -*/ - -char *push1=0; - -#include /* This includes dbug.h */ -#include -#include - -const char *func3() -{ - DBUG_ENTER("func3"); - DBUG_RETURN(DBUG_EVALUATE("ret3", "ok", "ko")); -} - -void func2() -{ - const char *s; - DBUG_ENTER("func2"); - s=func3(); - DBUG_PRINT("info", ("s=%s", s)); - DBUG_VOID_RETURN; -} - -int func1() -{ - DBUG_ENTER("func1"); - func2(); - if (push1) - { - DBUG_PUSH(push1); - fprintf(DBUG_FILE, "=> push1\n"); - } - DBUG_RETURN(10); -} - -int main (int argc, char *argv[]) -{ - int i; -#ifdef DBUG_OFF - return 1; -#endif - if (argc == 1) - return 0; - -#if defined(HAVE_PTHREAD_INIT) && defined(THREAD) - pthread_init(); /* Must be called before DBUG_ENTER */ -#endif -#ifdef THREAD - my_thread_global_init(); -#endif - dup2(1, 2); - for (i = 1; i < argc; i++) - { - if (strncmp(argv[i], "--push1=", 8) == 0) - push1=argv[i]+8; - else - DBUG_PUSH (argv[i]); - } - { - DBUG_ENTER ("main"); - DBUG_PROCESS ("dbug-tests"); - func1(); - DBUG_EXECUTE_IF("dump", - { - char s[1000]; - DBUG_EXPLAIN(s, sizeof(s)-1); - DBUG_DUMP("dump", (uchar*)s, strlen(s)); - }); - DBUG_EXECUTE_IF("push", DBUG_PUSH("+t"); ); - DBUG_EXECUTE("execute", fprintf(DBUG_FILE, "=> execute\n"); ); - DBUG_EXECUTE_IF("set", DBUG_SET("+F"); ); - fprintf(DBUG_FILE, "=> evaluate: %s\n", - DBUG_EVALUATE("evaluate", "ON", "OFF")); - fprintf(DBUG_FILE, "=> evaluate_if: %s\n", - DBUG_EVALUATE_IF("evaluate_if", "ON", "OFF")); - DBUG_EXECUTE_IF("pop", DBUG_POP(); ); - { - char s[1000] __attribute__((unused)); - DBUG_EXPLAIN(s, sizeof(s)-1); - DBUG_PRINT("explain", ("dbug explained: %s", s)); - } - func2(); - DBUG_RETURN (0); - } -} diff --git a/externals/mysql/extlib/regex/cclass.h b/externals/mysql/extlib/regex/cclass.h deleted file mode 100644 index b877b5dee6..0000000000 --- a/externals/mysql/extlib/regex/cclass.h +++ /dev/null @@ -1,22 +0,0 @@ -/* character-class table */ - -#define CCLASS_ALNUM 0 -#define CCLASS_ALPHA 1 -#define CCLASS_BLANK 2 -#define CCLASS_CNTRL 3 -#define CCLASS_DIGIT 4 -#define CCLASS_GRAPH 5 -#define CCLASS_LOWER 6 -#define CCLASS_PRINT 7 -#define CCLASS_PUNCT 8 -#define CCLASS_SPACE 9 -#define CCLASS_UPPER 10 -#define CCLASS_XDIGIT 11 -#define CCLASS_LAST 12 - -extern struct cclass { - const char *name; - const char *chars; - const char *multis; - uint mask; -} cclasses[]; diff --git a/externals/mysql/extlib/regex/cname.h b/externals/mysql/extlib/regex/cname.h deleted file mode 100644 index 06865f3e10..0000000000 --- a/externals/mysql/extlib/regex/cname.h +++ /dev/null @@ -1,104 +0,0 @@ -/* character-name table */ -static struct cname { - const char *name; - const char code; -} cnames[] = { - {"NUL", '\0'}, - {"SOH", '\001'}, - {"STX", '\002'}, - {"ETX", '\003'}, - {"EOT", '\004'}, - {"ENQ", '\005'}, - {"ACK", '\006'}, - {"BEL", '\007'}, - {"alert", '\007'}, - {"BS", '\010'}, - {"backspace", '\b'}, - {"HT", '\011'}, - {"tab", '\t'}, - {"LF", '\012'}, - {"newline", '\n'}, - {"VT", '\013'}, - {"vertical-tab",'\v'}, - {"FF", '\014'}, - {"form-feed", '\f'}, - {"CR", '\015'}, - {"carriage-return", '\r'}, - {"SO", '\016'}, - {"SI", '\017'}, - {"DLE", '\020'}, - {"DC1", '\021'}, - {"DC2", '\022'}, - {"DC3", '\023'}, - {"DC4", '\024'}, - {"NAK", '\025'}, - {"SYN", '\026'}, - {"ETB", '\027'}, - {"CAN", '\030'}, - {"EM", '\031'}, - {"SUB", '\032'}, - {"ESC", '\033'}, - {"IS4", '\034'}, - {"FS", '\034'}, - {"IS3", '\035'}, - {"GS", '\035'}, - {"IS2", '\036'}, - {"RS", '\036'}, - {"IS1", '\037'}, - {"US", '\037'}, - {"space", ' '}, - {"exclamation-mark", '!'}, - {"quotation-mark", '"'}, - {"number-sign", '#'}, - {"dollar-sign", '$'}, - {"percent-sign", '%'}, - {"ampersand", '&'}, - {"apostrophe", '\''}, - {"left-parenthesis", '('}, - {"right-parenthesis", ')'}, - {"asterisk", '*'}, - {"plus-sign", '+'}, - {"comma", ','}, - {"hyphen", '-'}, - {"hyphen-minus", '-'}, - {"period", '.'}, - {"full-stop", '.'}, - {"slash", '/'}, - {"solidus", '/'}, - {"zero", '0'}, - {"one", '1'}, - {"two", '2'}, - {"three", '3'}, - {"four", '4'}, - {"five", '5'}, - {"six", '6'}, - {"seven", '7'}, - {"eight", '8'}, - {"nine", '9'}, - {"colon", ':'}, - {"semicolon", ';'}, - {"less-than-sign", '<'}, - {"equals-sign", '='}, - {"greater-than-sign", '>'}, - {"question-mark", '?'}, - {"commercial-at", '@'}, - {"left-square-bracket", '['}, - {"backslash", '\\'}, - {"reverse-solidus", '\\'}, - {"right-square-bracket",']'}, - {"circumflex", '^'}, - {"circumflex-accent", '^'}, - {"underscore", '_'}, - {"low-line", '_'}, - {"grave-accent", '`'}, - {"left-brace", '{'}, - {"left-curly-bracket", '{'}, - {"vertical-line", '|'}, - {"right-brace", '}'}, - {"right-curly-bracket", '}'}, - {"tilde", '~'}, - {"DEL", '\177'}, - {NULL, 0}, -}; - - diff --git a/externals/mysql/extlib/regex/debug.c b/externals/mysql/extlib/regex/debug.c deleted file mode 100644 index 271b09bb27..0000000000 --- a/externals/mysql/extlib/regex/debug.c +++ /dev/null @@ -1,246 +0,0 @@ -#include -#include -#include -#include - -#include "my_regex.h" -#include "utils.h" -#include "regex2.h" -#include "debug.ih" - -/* Added extra paramter to regchar to remove static buffer ; Monty 96.11.27 */ - -/* - - regprint - print a regexp for debugging - == void regprint(regex_t *r, FILE *d); - */ -void -regprint(r, d) -my_regex_t *r; -FILE *d; -{ - register struct re_guts *g = r->re_g; - register int i; - register int c; - register int last; - int nincat[NC]; - char buf[10]; - - fprintf(d, "%ld states, %d categories", (long)g->nstates, - g->ncategories); - fprintf(d, ", first %ld last %ld", (long)g->firststate, - (long)g->laststate); - if (g->iflags&USEBOL) - fprintf(d, ", USEBOL"); - if (g->iflags&USEEOL) - fprintf(d, ", USEEOL"); - if (g->iflags&BAD) - fprintf(d, ", BAD"); - if (g->nsub > 0) - fprintf(d, ", nsub=%ld", (long)g->nsub); - if (g->must != NULL) - fprintf(d, ", must(%ld) `%*s'", (long)g->mlen, (int)g->mlen, - g->must); - if (g->backrefs) - fprintf(d, ", backrefs"); - if (g->nplus > 0) - fprintf(d, ", nplus %ld", (long)g->nplus); - fprintf(d, "\n"); - s_print(r->charset, g, d); - for (i = 0; i < g->ncategories; i++) { - nincat[i] = 0; - for (c = CHAR_MIN; c <= CHAR_MAX; c++) - if (g->categories[c] == i) - nincat[i]++; - } - fprintf(d, "cc0#%d", nincat[0]); - for (i = 1; i < g->ncategories; i++) - if (nincat[i] == 1) { - for (c = CHAR_MIN; c <= CHAR_MAX; c++) - if (g->categories[c] == i) - break; - fprintf(d, ", %d=%s", i, regchar(r->charset,c,buf)); - } - fprintf(d, "\n"); - for (i = 1; i < g->ncategories; i++) - if (nincat[i] != 1) { - fprintf(d, "cc%d\t", i); - last = -1; - for (c = CHAR_MIN; c <= CHAR_MAX+1; c++) /* +1 does flush */ - if (c <= CHAR_MAX && g->categories[c] == i) { - if (last < 0) { - fprintf(d, "%s", regchar(r->charset,c,buf)); - last = c; - } - } else { - if (last >= 0) { - if (last != c-1) - fprintf(d, "-%s", - regchar(r->charset,c-1,buf)); - last = -1; - } - } - fprintf(d, "\n"); - } -} - -/* - - s_print - print the strip for debugging - == static void s_print(register struct re_guts *g, FILE *d); - */ -static void -s_print(charset, g, d) -CHARSET_INFO *charset; -register struct re_guts *g; -FILE *d; -{ - register sop *s; - register cset *cs; - register int i; - register int done = 0; - register sop opnd; - register int col = 0; - register int last; - register sopno offset = 2; - char buf[10]; -# define GAP() { if (offset % 5 == 0) { \ - if (col > 40) { \ - fprintf(d, "\n\t"); \ - col = 0; \ - } else { \ - fprintf(d, " "); \ - col++; \ - } \ - } else \ - col++; \ - offset++; \ - } - - if (OP(g->strip[0]) != OEND) - fprintf(d, "missing initial OEND!\n"); - for (s = &g->strip[1]; !done; s++) { - opnd = OPND(*s); - switch (OP(*s)) { - case OEND: - fprintf(d, "\n"); - done = 1; - break; - case OCHAR: - if (strchr("\\|()^$.[+*?{}!<> ", (char)opnd) != NULL) - fprintf(d, "\\%c", (char)opnd); - else - fprintf(d, "%s", regchar(charset,(char)opnd,buf)); - break; - case OBOL: - fprintf(d, "^"); - break; - case OEOL: - fprintf(d, "$"); - break; - case OBOW: - fprintf(d, "\\{"); - break; - case OEOW: - fprintf(d, "\\}"); - break; - case OANY: - fprintf(d, "."); - break; - case OANYOF: - fprintf(d, "[(%ld)", (long)opnd); - cs = &g->sets[opnd]; - last = -1; - for (i = 0; i < g->csetsize+1; i++) /* +1 flushes */ - if (CHIN(cs, i) && i < g->csetsize) { - if (last < 0) { - fprintf(d, "%s", regchar(charset,i,buf)); - last = i; - } - } else { - if (last >= 0) { - if (last != i-1) - fprintf(d, "-%s", - regchar(charset,i-1,buf)); - last = -1; - } - } - fprintf(d, "]"); - break; - case OBACK_: - fprintf(d, "(\\<%ld>", (long)opnd); - break; - case O_BACK: - fprintf(d, "<%ld>\\)", (long)opnd); - break; - case OPLUS_: - fprintf(d, "(+"); - if (OP(*(s+opnd)) != O_PLUS) - fprintf(d, "<%ld>", (long)opnd); - break; - case O_PLUS: - if (OP(*(s-opnd)) != OPLUS_) - fprintf(d, "<%ld>", (long)opnd); - fprintf(d, "+)"); - break; - case OQUEST_: - fprintf(d, "(?"); - if (OP(*(s+opnd)) != O_QUEST) - fprintf(d, "<%ld>", (long)opnd); - break; - case O_QUEST: - if (OP(*(s-opnd)) != OQUEST_) - fprintf(d, "<%ld>", (long)opnd); - fprintf(d, "?)"); - break; - case OLPAREN: - fprintf(d, "((<%ld>", (long)opnd); - break; - case ORPAREN: - fprintf(d, "<%ld>))", (long)opnd); - break; - case OCH_: - fprintf(d, "<"); - if (OP(*(s+opnd)) != OOR2) - fprintf(d, "<%ld>", (long)opnd); - break; - case OOR1: - if (OP(*(s-opnd)) != OOR1 && OP(*(s-opnd)) != OCH_) - fprintf(d, "<%ld>", (long)opnd); - fprintf(d, "|"); - break; - case OOR2: - fprintf(d, "|"); - if (OP(*(s+opnd)) != OOR2 && OP(*(s+opnd)) != O_CH) - fprintf(d, "<%ld>", (long)opnd); - break; - case O_CH: - if (OP(*(s-opnd)) != OOR1) - fprintf(d, "<%ld>", (long)opnd); - fprintf(d, ">"); - break; - default: - fprintf(d, "!%ld(%ld)!", OP(*s), opnd); - break; - } - if (!done) - GAP(); - } -} - -/* - - regchar - make a character printable - == static char *regchar(int ch); - */ -static char * /* -> representation */ -regchar(charset,ch,buf) -CHARSET_INFO *charset; -int ch; -char *buf; -{ - - if (my_isprint(charset,ch) || ch == ' ') - sprintf(buf, "%c", ch); - else - sprintf(buf, "\\%o", ch); - return(buf); -} diff --git a/externals/mysql/extlib/regex/engine.c b/externals/mysql/extlib/regex/engine.c deleted file mode 100644 index 1968ca61a9..0000000000 --- a/externals/mysql/extlib/regex/engine.c +++ /dev/null @@ -1,1031 +0,0 @@ -/* - * The matching engine and friends. This file is #included by regexec.c - * after suitable #defines of a variety of macros used herein, so that - * different state representations can be used without duplicating masses - * of code. - */ - -#ifdef SNAMES -#define matcher smatcher -#define fast sfast -#define slow sslow -#define dissect sdissect -#define backref sbackref -#define step sstep -#define print sprint -#define at sat -#define match smat -#endif -#ifdef LNAMES -#define matcher lmatcher -#define fast lfast -#define slow lslow -#define dissect ldissect -#define backref lbackref -#define step lstep -#define print lprint -#define at lat -#define match lmat -#endif - -/* another structure passed up and down to avoid zillions of parameters */ -struct match { - struct re_guts *g; - int eflags; - my_regmatch_t *pmatch; /* [nsub+1] (0 element unused) */ - char *offp; /* offsets work from here */ - char *beginp; /* start of string -- virtual NUL precedes */ - char *endp; /* end of string -- virtual NUL here */ - char *coldp; /* can be no match starting before here */ - char **lastpos; /* [nplus+1] */ - STATEVARS; - states st; /* current states */ - states fresh; /* states for a fresh start */ - states tmp; /* temporary */ - states empty; /* empty set of states */ -}; - -#include "engine.ih" - -#ifdef REDEBUG -#define SP(t, s, c) print(m, t, s, c, stdout) -#define AT(t, p1, p2, s1, s2) at(m, t, p1, p2, s1, s2) -#define NOTE(str) { if (m->eflags®_TRACE) printf("=%s\n", (str)); } -#else -#define SP(t, s, c) /* nothing */ -#define AT(t, p1, p2, s1, s2) /* nothing */ -#define NOTE(s) /* nothing */ -#endif - -/* - - matcher - the actual matching engine - == static int matcher(register struct re_guts *g, char *string, \ - == size_t nmatch, regmatch_t pmatch[], int eflags); - */ -static int /* 0 success, REG_NOMATCH failure */ -matcher(charset,g, str, nmatch, pmatch, eflags) -CHARSET_INFO *charset; -register struct re_guts *g; -char *str; -size_t nmatch; -my_regmatch_t pmatch[]; -int eflags; -{ - register char *endp; - register uint i; - struct match mv; - register struct match *m = &mv; - register char *dp; - register const sopno gf = g->firststate+1; /* +1 for OEND */ - register const sopno gl = g->laststate; - char *start; - char *stop; - - /* simplify the situation where possible */ - if (g->cflags®_NOSUB) - nmatch = 0; - if (eflags®_STARTEND) { - start = str + pmatch[0].rm_so; - stop = str + pmatch[0].rm_eo; - } else { - start = str; - stop = start + strlen(start); - } - if (stop < start) - return(REG_INVARG); - - /* prescreening; this does wonders for this rather slow code */ - if (g->must != NULL) { - for (dp = start; dp < stop; dp++) - if (*dp == g->must[0] && stop - dp >= g->mlen && - memcmp(dp, g->must, (size_t)g->mlen) == 0) - break; - if (dp == stop) /* we didn't find g->must */ - return(REG_NOMATCH); - } - - /* match struct setup */ - m->g = g; - m->eflags = eflags; - m->pmatch = NULL; - m->lastpos = NULL; - m->offp = str; - m->beginp = start; - m->endp = stop; - STATESETUP(m, 4); - SETUP(m->st); - SETUP(m->fresh); - SETUP(m->tmp); - SETUP(m->empty); - CLEAR(m->empty); - - /* this loop does only one repetition except for backrefs */ - for (;;) { - endp = fast(charset, m, start, stop, gf, gl); - if (endp == NULL) { /* a miss */ - if (m->pmatch != NULL) - free((char *)m->pmatch); - if (m->lastpos != NULL) - free((char *)m->lastpos); - STATETEARDOWN(m); - return(REG_NOMATCH); - } - if (nmatch == 0 && !g->backrefs) - break; /* no further info needed */ - - /* where? */ - assert(m->coldp != NULL); - for (;;) { - NOTE("finding start"); - endp = slow(charset, m, m->coldp, stop, gf, gl); - if (endp != NULL) - break; - assert(m->coldp < m->endp); - m->coldp++; - } - if (nmatch == 1 && !g->backrefs) - break; /* no further info needed */ - - /* oh my, he wants the subexpressions... */ - if (m->pmatch == NULL) - m->pmatch = (my_regmatch_t *)malloc((m->g->nsub + 1) * - sizeof(my_regmatch_t)); - if (m->pmatch == NULL) { - if (m->lastpos != NULL) - free((char *)m->lastpos); - STATETEARDOWN(m); - return(REG_ESPACE); - } - for (i = 1; i <= m->g->nsub; i++) - m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; - if (!g->backrefs && !(m->eflags®_BACKR)) { - NOTE("dissecting"); - dp = dissect(charset, m, m->coldp, endp, gf, gl); - } else { - if (g->nplus > 0 && m->lastpos == NULL) - m->lastpos = (char **)malloc((g->nplus+1) * - sizeof(char *)); - if (g->nplus > 0 && m->lastpos == NULL) { - free(m->pmatch); - STATETEARDOWN(m); - return(REG_ESPACE); - } - NOTE("backref dissect"); - dp = backref(charset, m, m->coldp, endp, gf, gl, (sopno)0); - } - if (dp != NULL) - break; - - /* uh-oh... we couldn't find a subexpression-level match */ - assert(g->backrefs); /* must be back references doing it */ - assert(g->nplus == 0 || m->lastpos != NULL); - for (;;) { - if (dp != NULL || endp <= m->coldp) - break; /* defeat */ - NOTE("backoff"); - endp = slow(charset, m, m->coldp, endp-1, gf, gl); - if (endp == NULL) - break; /* defeat */ - /* try it on a shorter possibility */ -#ifndef NDEBUG - for (i = 1; i <= m->g->nsub; i++) { - assert(m->pmatch[i].rm_so == -1); - assert(m->pmatch[i].rm_eo == -1); - } -#endif - NOTE("backoff dissect"); - dp = backref(charset, m, m->coldp, endp, gf, gl, (sopno)0); - } - assert(dp == NULL || dp == endp); - if (dp != NULL) /* found a shorter one */ - break; - - /* despite initial appearances, there is no match here */ - NOTE("false alarm"); - start = m->coldp + 1; /* recycle starting later */ - assert(start <= stop); - } - - /* fill in the details if requested */ - if (nmatch > 0) { - pmatch[0].rm_so = m->coldp - m->offp; - pmatch[0].rm_eo = endp - m->offp; - } - if (nmatch > 1) { - assert(m->pmatch != NULL); - for (i = 1; i < nmatch; i++) - if (i <= m->g->nsub) - pmatch[i] = m->pmatch[i]; - else { - pmatch[i].rm_so = -1; - pmatch[i].rm_eo = -1; - } - } - - if (m->pmatch != NULL) - free((char *)m->pmatch); - if (m->lastpos != NULL) - free((char *)m->lastpos); - STATETEARDOWN(m); - return(0); -} - -/* - - dissect - figure out what matched what, no back references - == static char *dissect(register struct match *m, char *start, \ - == char *stop, sopno startst, sopno stopst); - */ -static char * /* == stop (success) always */ -dissect(charset, m, start, stop, startst, stopst) -CHARSET_INFO *charset; -register struct match *m; -char *start; -char *stop; -sopno startst; -sopno stopst; -{ - register uint i; - register sopno ss; /* start sop of current subRE */ - register sopno es; /* end sop of current subRE */ - register char *sp; /* start of string matched by it */ - register char *stp; /* string matched by it cannot pass here */ - register char *rest; /* start of rest of string */ - register char *tail; /* string unmatched by rest of RE */ - register sopno ssub; /* start sop of subsubRE */ - register sopno esub; /* end sop of subsubRE */ - register char *ssp; /* start of string matched by subsubRE */ - register char *sep; /* end of string matched by subsubRE */ - register char *oldssp; /* previous ssp */ - register char *dp; /* used in debug mode to check asserts */ - - AT("diss", start, stop, startst, stopst); - sp = start; - for (ss = startst; ss < stopst; ss = es) { - /* identify end of subRE */ - es = ss; - switch (OP(m->g->strip[es])) { - case OPLUS_: - case OQUEST_: - es += OPND(m->g->strip[es]); - break; - case OCH_: - while (OP(m->g->strip[es]) != O_CH) - es += OPND(m->g->strip[es]); - break; - } - es++; - - /* figure out what it matched */ - switch (OP(m->g->strip[ss])) { - case OEND: - assert(nope); - break; - case OCHAR: - sp++; - break; - case OBOL: - case OEOL: - case OBOW: - case OEOW: - break; - case OANY: - case OANYOF: - sp++; - break; - case OBACK_: - case O_BACK: - assert(nope); - break; - /* cases where length of match is hard to find */ - case OQUEST_: - stp = stop; - for (;;) { - /* how long could this one be? */ - rest = slow(charset, m, sp, stp, ss, es); - assert(rest != NULL); /* it did match */ - /* could the rest match the rest? */ - tail = slow(charset, m, rest, stop, es, stopst); - if (tail == stop) - break; /* yes! */ - /* no -- try a shorter match for this one */ - stp = rest - 1; - assert(stp >= sp); /* it did work */ - } - ssub = ss + 1; - esub = es - 1; - /* did innards match? */ - if (slow(charset, m, sp, rest, ssub, esub) != NULL) { - dp = dissect(charset, m, sp, rest, ssub, esub); - assert(dp == rest); - } else /* no */ - assert(sp == rest); - sp = rest; - break; - case OPLUS_: - stp = stop; - for (;;) { - /* how long could this one be? */ - rest = slow(charset, m, sp, stp, ss, es); - assert(rest != NULL); /* it did match */ - /* could the rest match the rest? */ - tail = slow(charset, m, rest, stop, es, stopst); - if (tail == stop) - break; /* yes! */ - /* no -- try a shorter match for this one */ - stp = rest - 1; - assert(stp >= sp); /* it did work */ - } - ssub = ss + 1; - esub = es - 1; - ssp = sp; - oldssp = ssp; - for (;;) { /* find last match of innards */ - sep = slow(charset, m, ssp, rest, ssub, esub); - if (sep == NULL || sep == ssp) - break; /* failed or matched null */ - oldssp = ssp; /* on to next try */ - ssp = sep; - } - if (sep == NULL) { - /* last successful match */ - sep = ssp; - ssp = oldssp; - } - assert(sep == rest); /* must exhaust substring */ - assert(slow(charset, m, ssp, sep, ssub, esub) == rest); - dp = dissect(charset, m, ssp, sep, ssub, esub); - assert(dp == sep); - sp = rest; - break; - case OCH_: - stp = stop; - for (;;) { - /* how long could this one be? */ - rest = slow(charset, m, sp, stp, ss, es); - assert(rest != NULL); /* it did match */ - /* could the rest match the rest? */ - tail = slow(charset, m, rest, stop, es, stopst); - if (tail == stop) - break; /* yes! */ - /* no -- try a shorter match for this one */ - stp = rest - 1; - assert(stp >= sp); /* it did work */ - } - ssub = ss + 1; - esub = ss + OPND(m->g->strip[ss]) - 1; - assert(OP(m->g->strip[esub]) == OOR1); - for (;;) { /* find first matching branch */ - if (slow(charset, m, sp, rest, ssub, esub) == rest) - break; /* it matched all of it */ - /* that one missed, try next one */ - assert(OP(m->g->strip[esub]) == OOR1); - esub++; - assert(OP(m->g->strip[esub]) == OOR2); - ssub = esub + 1; - esub += OPND(m->g->strip[esub]); - if (OP(m->g->strip[esub]) == OOR2) - esub--; - else - assert(OP(m->g->strip[esub]) == O_CH); - } - dp = dissect(charset, m, sp, rest, ssub, esub); - assert(dp == rest); - sp = rest; - break; - case O_PLUS: - case O_QUEST: - case OOR1: - case OOR2: - case O_CH: - assert(nope); - break; - case OLPAREN: - i = OPND(m->g->strip[ss]); - assert(0 < i && i <= m->g->nsub); - m->pmatch[i].rm_so = sp - m->offp; - break; - case ORPAREN: - i = OPND(m->g->strip[ss]); - assert(0 < i && i <= m->g->nsub); - m->pmatch[i].rm_eo = sp - m->offp; - break; - default: /* uh oh */ - assert(nope); - break; - } - } - - assert(sp == stop); - return(sp); -} - -/* - - backref - figure out what matched what, figuring in back references - == static char *backref(register struct match *m, char *start, \ - == char *stop, sopno startst, sopno stopst, sopno lev); - */ -static char * /* == stop (success) or NULL (failure) */ -backref(charset,m, start, stop, startst, stopst, lev) -CHARSET_INFO *charset; -register struct match *m; -char *start; -char *stop; -sopno startst; -sopno stopst; -sopno lev; /* PLUS nesting level */ -{ - register uint i; - register sopno ss; /* start sop of current subRE */ - register char *sp; /* start of string matched by it */ - register sopno ssub; /* start sop of subsubRE */ - register sopno esub; /* end sop of subsubRE */ - register char *ssp; /* start of string matched by subsubRE */ - register char *dp; - register size_t len; - register int hard; - register sop s; - register regoff_t offsave; - register cset *cs; - - AT("back", start, stop, startst, stopst); - sp = start; - - /* get as far as we can with easy stuff */ - hard = 0; - for (ss = startst; !hard && ss < stopst; ss++) - switch (OP(s = m->g->strip[ss])) { - case OCHAR: - if (sp == stop || *sp++ != (char)OPND(s)) - return(NULL); - break; - case OANY: - if (sp == stop) - return(NULL); - sp++; - break; - case OANYOF: - cs = &m->g->sets[OPND(s)]; - if (sp == stop || !CHIN(cs, *sp++)) - return(NULL); - break; - case OBOL: - if ( (sp == m->beginp && !(m->eflags®_NOTBOL)) || - (sp < m->endp && *(sp-1) == '\n' && - (m->g->cflags®_NEWLINE)) ) - { /* yes */ } - else - return(NULL); - break; - case OEOL: - if ( (sp == m->endp && !(m->eflags®_NOTEOL)) || - (sp < m->endp && *sp == '\n' && - (m->g->cflags®_NEWLINE)) ) - { /* yes */ } - else - return(NULL); - break; - case OBOW: - if (( (sp == m->beginp && !(m->eflags®_NOTBOL)) || - (sp < m->endp && *(sp-1) == '\n' && - (m->g->cflags®_NEWLINE)) || - (sp > m->beginp && - !ISWORD(charset,*(sp-1))) ) && - (sp < m->endp && ISWORD(charset,*sp)) ) - { /* yes */ } - else - return(NULL); - break; - case OEOW: - if (( (sp == m->endp && !(m->eflags®_NOTEOL)) || - (sp < m->endp && *sp == '\n' && - (m->g->cflags®_NEWLINE)) || - (sp < m->endp && !ISWORD(charset,*sp)) ) && - (sp > m->beginp && ISWORD(charset,*(sp-1))) ) - { /* yes */ } - else - return(NULL); - break; - case O_QUEST: - break; - case OOR1: /* matches null but needs to skip */ - ss++; - s = m->g->strip[ss]; - do { - assert(OP(s) == OOR2); - ss += OPND(s); - } while (OP(s = m->g->strip[ss]) != O_CH); - /* note that the ss++ gets us past the O_CH */ - break; - default: /* have to make a choice */ - hard = 1; - break; - } - if (!hard) { /* that was it! */ - if (sp != stop) - return(NULL); - return(sp); - } - ss--; /* adjust for the for's final increment */ - - /* the hard stuff */ - AT("hard", sp, stop, ss, stopst); - s = m->g->strip[ss]; - switch (OP(s)) { - case OBACK_: /* the vilest depths */ - i = OPND(s); - assert(0 < i && i <= m->g->nsub); - if (m->pmatch[i].rm_eo == -1) - return(NULL); - assert(m->pmatch[i].rm_so != -1); - len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so; - assert((size_t) (stop - m->beginp) >= len); - if (sp > stop - len) - return(NULL); /* not enough left to match */ - ssp = m->offp + m->pmatch[i].rm_so; - if (memcmp(sp, ssp, len) != 0) - return(NULL); - while (m->g->strip[ss] != SOP(O_BACK, i)) - ss++; - return(backref(charset, m, sp+len, stop, ss+1, stopst, lev)); - break; - case OQUEST_: /* to null or not */ - dp = backref(charset, m, sp, stop, ss+1, stopst, lev); - if (dp != NULL) - return(dp); /* not */ - return(backref(charset, m, sp, stop, ss+OPND(s)+1, stopst, lev)); - break; - case OPLUS_: - assert(m->lastpos != NULL); - assert(lev+1 <= m->g->nplus); - m->lastpos[lev+1] = sp; - return(backref(charset, m, sp, stop, ss+1, stopst, lev+1)); - break; - case O_PLUS: - if (sp == m->lastpos[lev]) /* last pass matched null */ - return(backref(charset, m, sp, stop, ss+1, stopst, lev-1)); - /* try another pass */ - m->lastpos[lev] = sp; - dp = backref(charset, m, sp, stop, ss-OPND(s)+1, stopst, lev); - if (dp == NULL) - return(backref(charset, m, sp, stop, ss+1, stopst, lev-1)); - else - return(dp); - break; - case OCH_: /* find the right one, if any */ - ssub = ss + 1; - esub = ss + OPND(s) - 1; - assert(OP(m->g->strip[esub]) == OOR1); - for (;;) { /* find first matching branch */ - dp = backref(charset, m, sp, stop, ssub, esub, lev); - if (dp != NULL) - return(dp); - /* that one missed, try next one */ - if (OP(m->g->strip[esub]) == O_CH) - return(NULL); /* there is none */ - esub++; - assert(OP(m->g->strip[esub]) == OOR2); - ssub = esub + 1; - esub += OPND(m->g->strip[esub]); - if (OP(m->g->strip[esub]) == OOR2) - esub--; - else - assert(OP(m->g->strip[esub]) == O_CH); - } - break; - case OLPAREN: /* must undo assignment if rest fails */ - i = OPND(s); - assert(0 < i && i <= m->g->nsub); - offsave = m->pmatch[i].rm_so; - m->pmatch[i].rm_so = sp - m->offp; - dp = backref(charset, m, sp, stop, ss+1, stopst, lev); - if (dp != NULL) - return(dp); - m->pmatch[i].rm_so = offsave; - return(NULL); - break; - case ORPAREN: /* must undo assignment if rest fails */ - i = OPND(s); - assert(0 < i && i <= m->g->nsub); - offsave = m->pmatch[i].rm_eo; - m->pmatch[i].rm_eo = sp - m->offp; - dp = backref(charset, m, sp, stop, ss+1, stopst, lev); - if (dp != NULL) - return(dp); - m->pmatch[i].rm_eo = offsave; - return(NULL); - break; - default: /* uh oh */ - assert(nope); - break; - } - - /* "can't happen" */ - assert(nope); - /* NOTREACHED */ - return 0; /* Keep gcc happy */ -} - -/* - - fast - step through the string at top speed - == static char *fast(register struct match *m, char *start, \ - == char *stop, sopno startst, sopno stopst); - */ -static char * /* where tentative match ended, or NULL */ -fast(charset, m, start, stop, startst, stopst) -CHARSET_INFO *charset; -register struct match *m; -char *start; -char *stop; -sopno startst; -sopno stopst; -{ - register states st = m->st; - register states fresh = m->fresh; - register states tmp = m->tmp; - register char *p = start; - register int c = (start == m->beginp) ? OUT : *(start-1); - register int lastc; /* previous c */ - register int flagch; - register int i; - register char *coldp; /* last p after which no match was underway */ - - CLEAR(st); - SET1(st, startst); - st = step(m->g, startst, stopst, st, NOTHING, st); - ASSIGN(fresh, st); - SP("start", st, *p); - coldp = NULL; - for (;;) { - /* next character */ - lastc = c; - c = (p == m->endp) ? OUT : *p; - if (EQ(st, fresh)) - coldp = p; - - /* is there an EOL and/or BOL between lastc and c? */ - flagch = '\0'; - i = 0; - if ( (lastc == '\n' && m->g->cflags®_NEWLINE) || - (lastc == OUT && !(m->eflags®_NOTBOL)) ) { - flagch = BOL; - i = m->g->nbol; - } - if ( (c == '\n' && m->g->cflags®_NEWLINE) || - (c == OUT && !(m->eflags®_NOTEOL)) ) { - flagch = (flagch == BOL) ? BOLEOL : EOL; - i += m->g->neol; - } - if (i != 0) { - for (; i > 0; i--) - st = step(m->g, startst, stopst, st, flagch, st); - SP("boleol", st, c); - } - - /* how about a word boundary? */ - if ( (flagch == BOL || (lastc != OUT && !ISWORD(charset,lastc))) && - (c != OUT && ISWORD(charset,c)) ) { - flagch = BOW; - } - if ( (lastc != OUT && ISWORD(charset,lastc)) && - (flagch == EOL || (c != OUT && !ISWORD(charset,c))) ) { - flagch = EOW; - } - if (flagch == BOW || flagch == EOW) { - st = step(m->g, startst, stopst, st, flagch, st); - SP("boweow", st, c); - } - - /* are we done? */ - if (ISSET(st, stopst) || p == stop) - break; /* NOTE BREAK OUT */ - - /* no, we must deal with this character */ - ASSIGN(tmp, st); - ASSIGN(st, fresh); - assert(c != OUT); - st = step(m->g, startst, stopst, tmp, c, st); - SP("aft", st, c); - assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st)); - p++; - } - - assert(coldp != NULL); - m->coldp = coldp; - if (ISSET(st, stopst)) - return(p+1); - else - return(NULL); -} - -/* - - slow - step through the string more deliberately - == static char *slow(register struct match *m, char *start, \ - == char *stop, sopno startst, sopno stopst); - */ -static char * /* where it ended */ -slow(charset, m, start, stop, startst, stopst) -CHARSET_INFO *charset; -register struct match *m; -char *start; -char *stop; -sopno startst; -sopno stopst; -{ - register states st = m->st; - register states empty = m->empty; - register states tmp = m->tmp; - register char *p = start; - register int c = (start == m->beginp) ? OUT : *(start-1); - register int lastc; /* previous c */ - register int flagch; - register int i; - register char *matchp; /* last p at which a match ended */ - - AT("slow", start, stop, startst, stopst); - CLEAR(st); - SET1(st, startst); - SP("sstart", st, *p); - st = step(m->g, startst, stopst, st, NOTHING, st); - matchp = NULL; - for (;;) { - /* next character */ - lastc = c; - c = (p == m->endp) ? OUT : *p; - - /* is there an EOL and/or BOL between lastc and c? */ - flagch = '\0'; - i = 0; - if ( (lastc == '\n' && m->g->cflags®_NEWLINE) || - (lastc == OUT && !(m->eflags®_NOTBOL)) ) { - flagch = BOL; - i = m->g->nbol; - } - if ( (c == '\n' && m->g->cflags®_NEWLINE) || - (c == OUT && !(m->eflags®_NOTEOL)) ) { - flagch = (flagch == BOL) ? BOLEOL : EOL; - i += m->g->neol; - } - if (i != 0) { - for (; i > 0; i--) - st = step(m->g, startst, stopst, st, flagch, st); - SP("sboleol", st, c); - } - - /* how about a word boundary? */ - if ( (flagch == BOL || (lastc != OUT && !ISWORD(charset,lastc))) && - (c != OUT && ISWORD(charset,c)) ) { - flagch = BOW; - } - if ( (lastc != OUT && ISWORD(charset,lastc)) && - (flagch == EOL || (c != OUT && !ISWORD(charset,c))) ) { - flagch = EOW; - } - if (flagch == BOW || flagch == EOW) { - st = step(m->g, startst, stopst, st, flagch, st); - SP("sboweow", st, c); - } - - /* are we done? */ - if (ISSET(st, stopst)) - matchp = p; - if (EQ(st, empty) || p == stop) - break; /* NOTE BREAK OUT */ - - /* no, we must deal with this character */ - ASSIGN(tmp, st); - ASSIGN(st, empty); - assert(c != OUT); - st = step(m->g, startst, stopst, tmp, c, st); - SP("saft", st, c); - assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st)); - p++; - } - - return(matchp); -} - - -/* - - step - map set of states reachable before char to set reachable after - == static states step(register struct re_guts *g, sopno start, sopno stop, \ - == register states bef, int ch, register states aft); - == #define BOL (OUT+1) - == #define EOL (BOL+1) - == #define BOLEOL (BOL+2) - == #define NOTHING (BOL+3) - == #define BOW (BOL+4) - == #define EOW (BOL+5) - == #define CODEMAX (BOL+5) // highest code used - == #define NONCHAR(c) ((c) > CHAR_MAX) - == #define NNONCHAR (CODEMAX-CHAR_MAX) - */ -static states -step(g, start, stop, bef, ch, aft) -register struct re_guts *g; -sopno start; /* start state within strip */ -sopno stop; /* state after stop state within strip */ -register states bef; /* states reachable before */ -int ch; /* character or NONCHAR code */ -register states aft; /* states already known reachable after */ -{ - register cset *cs; - register sop s; - register sopno pc; - register onestate here; /* note, macros know this name */ - register sopno look; - register onestate i; /* Changed from int by Monty */ - - for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) { - s = g->strip[pc]; - switch (OP(s)) { - case OEND: - assert(pc == stop-1); - break; - case OCHAR: - /* only characters can match */ - assert(!NONCHAR(ch) || ch != (char)OPND(s)); - if (ch == (char)OPND(s)) - FWD(aft, bef, 1); - break; - case OBOL: - if (ch == BOL || ch == BOLEOL) - FWD(aft, bef, 1); - break; - case OEOL: - if (ch == EOL || ch == BOLEOL) - FWD(aft, bef, 1); - break; - case OBOW: - if (ch == BOW) - FWD(aft, bef, 1); - break; - case OEOW: - if (ch == EOW) - FWD(aft, bef, 1); - break; - case OANY: - if (!NONCHAR(ch)) - FWD(aft, bef, 1); - break; - case OANYOF: - cs = &g->sets[OPND(s)]; - if (!NONCHAR(ch) && CHIN(cs, ch)) - FWD(aft, bef, 1); - break; - case OBACK_: /* ignored here */ - case O_BACK: - FWD(aft, aft, 1); - break; - case OPLUS_: /* forward, this is just an empty */ - FWD(aft, aft, 1); - break; - case O_PLUS: /* both forward and back */ - FWD(aft, aft, 1); - i = ISSETBACK(aft, OPND(s)); - BACK(aft, aft, OPND(s)); - if (!i && ISSETBACK(aft, OPND(s))) { - /* oho, must reconsider loop body */ - pc -= OPND(s) + 1; - INIT(here, pc); - } - break; - case OQUEST_: /* two branches, both forward */ - FWD(aft, aft, 1); - FWD(aft, aft, OPND(s)); - break; - case O_QUEST: /* just an empty */ - FWD(aft, aft, 1); - break; - case OLPAREN: /* not significant here */ - case ORPAREN: - FWD(aft, aft, 1); - break; - case OCH_: /* mark the first two branches */ - FWD(aft, aft, 1); - assert(OP(g->strip[pc+OPND(s)]) == OOR2); - FWD(aft, aft, OPND(s)); - break; - case OOR1: /* done a branch, find the O_CH */ - if (ISSTATEIN(aft, here)) { - for (look = 1; - OP(s = g->strip[pc+look]) != O_CH; - look += OPND(s)) - assert(OP(s) == OOR2); - FWD(aft, aft, look); - } - break; - case OOR2: /* propagate OCH_'s marking */ - FWD(aft, aft, 1); - if (OP(g->strip[pc+OPND(s)]) != O_CH) { - assert(OP(g->strip[pc+OPND(s)]) == OOR2); - FWD(aft, aft, OPND(s)); - } - break; - case O_CH: /* just empty */ - FWD(aft, aft, 1); - break; - default: /* ooooops... */ - assert(nope); - break; - } - } - - return(aft); -} - -#ifdef REDEBUG -/* - - print - print a set of states - == #ifdef REDEBUG - == static void print(struct match *m, char *caption, states st, \ - == int ch, FILE *d); - == #endif - */ -static void -print(m, caption, st, ch, d) -struct match *m; -char *caption; -states st; -int ch; -FILE *d; -{ - register struct re_guts *g = m->g; - register int i; - register int first = 1; - char buf[10]; - - if (!(m->eflags®_TRACE)) - return; - - fprintf(d, "%s", caption); - if (ch != '\0') - fprintf(d, " %s", printchar(ch,buf)); - for (i = 0; i < g->nstates; i++) - if (ISSET(st, i)) { - fprintf(d, "%s%d", (first) ? "\t" : ", ", i); - first = 0; - } - fprintf(d, "\n"); -} - -/* - - at - print current situation - == #ifdef REDEBUG - == static void at(struct match *m, char *title, char *start, char *stop, \ - == sopno startst, sopno stopst); - == #endif - */ -static void -at(m, title, start, stop, startst, stopst) -struct match *m; -char *title; -char *start; -char *stop; -sopno startst; -sopno stopst; -{ - char buf[10]; - if (!(m->eflags®_TRACE)) - return; - - printf("%s %s-", title, printchar(*start,buf)); - printf("%s ", printchar(*stop,buf)); - printf("%ld-%ld\n", (long)startst, (long)stopst,buf); -} - -#ifndef PCHARDONE -#define PCHARDONE /* never again */ -/* - - printchar - make a character printable - == #ifdef REDEBUG - == static char *printchar(int ch); - == #endif - * - * Is this identical to regchar() over in debug.c? Well, yes. But a - * duplicate here avoids having a debugging-capable regexec.o tied to - * a matching debug.o, and this is convenient. It all disappears in - * the non-debug compilation anyway, so it doesn't matter much. - */ -static char * /* -> representation */ -printchar(ch,pbuf) -int ch; -char *pbuf; -{ - if (isprint(ch) || ch == ' ') - sprintf(pbuf, "%c", ch); - else - sprintf(pbuf, "\\%o", ch); - return(pbuf); -} -#endif -#endif - -#undef matcher -#undef fast -#undef slow -#undef dissect -#undef backref -#undef step -#undef print -#undef at -#undef match diff --git a/externals/mysql/extlib/regex/main.c b/externals/mysql/extlib/regex/main.c deleted file mode 100644 index fa97ca8904..0000000000 --- a/externals/mysql/extlib/regex/main.c +++ /dev/null @@ -1,509 +0,0 @@ -#include -#include -#include -#include - -#include "my_regex.h" -#include "main.ih" - -char *progname; -int debug = 0; -int line = 0; -int status = 0; - -int copts = REG_EXTENDED; -int eopts = 0; -regoff_t startoff = 0; -regoff_t endoff = 0; - - -extern int split(); -extern void regprint(); - -/* - - main - do the simple case, hand off to regress() for regression - */ -int main(argc, argv) -int argc; -char *argv[]; -{ - my_regex_t re; -# define NS 10 - my_regmatch_t subs[NS]; - char erbuf[100]; - int err; - size_t len; - int c; - int errflg = 0; - register int i; - extern int optind; - extern char *optarg; - - progname = argv[0]; - - while ((c = getopt(argc, argv, "c:e:S:E:x")) != EOF) - switch (c) { - case 'c': /* compile options */ - copts = options('c', optarg); - break; - case 'e': /* execute options */ - eopts = options('e', optarg); - break; - case 'S': /* start offset */ - startoff = (regoff_t)atoi(optarg); - break; - case 'E': /* end offset */ - endoff = (regoff_t)atoi(optarg); - break; - case 'x': /* Debugging. */ - debug++; - break; - case '?': - default: - errflg++; - break; - } - if (errflg) { - fprintf(stderr, "usage: %s ", progname); - fprintf(stderr, "[-c copt][-C][-d] [re]\n"); - exit(2); - } - - if (optind >= argc) { - regress(stdin); - exit(status); - } - - err = my_regcomp(&re, argv[optind++], copts, &my_charset_latin1); - if (err) { - len = my_regerror(err, &re, erbuf, sizeof(erbuf)); - fprintf(stderr, "error %s, %d/%d `%s'\n", - eprint(err), (int) len, (int) sizeof(erbuf), erbuf); - exit(status); - } - regprint(&re, stdout); - - if (optind >= argc) { - my_regfree(&re); - exit(status); - } - - if (eopts®_STARTEND) { - subs[0].rm_so = startoff; - subs[0].rm_eo = strlen(argv[optind]) - endoff; - } - err = my_regexec(&re, argv[optind], (size_t)NS, subs, eopts); - if (err) { - len = my_regerror(err, &re, erbuf, sizeof(erbuf)); - fprintf(stderr, "error %s, %d/%d `%s'\n", - eprint(err), (int) len, (int) sizeof(erbuf), erbuf); - exit(status); - } - if (!(copts®_NOSUB)) { - len = (int)(subs[0].rm_eo - subs[0].rm_so); - if (subs[0].rm_so != -1) { - if (len != 0) - printf("match `%.*s'\n", (int)len, - argv[optind] + subs[0].rm_so); - else - printf("match `'@%.1s\n", - argv[optind] + subs[0].rm_so); - } - for (i = 1; i < NS; i++) - if (subs[i].rm_so != -1) - printf("(%d) `%.*s'\n", i, - (int)(subs[i].rm_eo - subs[i].rm_so), - argv[optind] + subs[i].rm_so); - } - exit(status); -} - -/* - - regress - main loop of regression test - == void regress(FILE *in); - */ -void -regress(in) -FILE *in; -{ - char inbuf[1000]; -# define MAXF 10 - char *f[MAXF]; - int nf; - int i; - char erbuf[100]; - size_t ne; - const char *badpat = "invalid regular expression"; -# define SHORT 10 - const char *bpname = "REG_BADPAT"; - my_regex_t re; - - while (fgets(inbuf, sizeof(inbuf), in) != NULL) { - line++; - if (inbuf[0] == '#' || inbuf[0] == '\n') - continue; /* NOTE CONTINUE */ - inbuf[strlen(inbuf)-1] = '\0'; /* get rid of stupid \n */ - if (debug) - fprintf(stdout, "%d:\n", line); - nf = split(inbuf, f, MAXF, "\t\t"); - if (nf < 3) { - fprintf(stderr, "bad input, line %d\n", line); - exit(1); - } - for (i = 0; i < nf; i++) - if (strcmp(f[i], "\"\"") == 0) - f[i] = (char*) ""; - if (nf <= 3) - f[3] = NULL; - if (nf <= 4) - f[4] = NULL; - rx_try(f[0], f[1], f[2], f[3], f[4], options('c', f[1])); - if (opt('&', f[1])) /* try with either type of RE */ - rx_try(f[0], f[1], f[2], f[3], f[4], - options('c', f[1]) &~ REG_EXTENDED); - } - - ne = my_regerror(REG_BADPAT, (my_regex_t *)NULL, erbuf, sizeof(erbuf)); - if (strcmp(erbuf, badpat) != 0 || ne != strlen(badpat)+1) { - fprintf(stderr, "end: regerror() test gave `%s' not `%s'\n", - erbuf, badpat); - status = 1; - } - ne = my_regerror(REG_BADPAT, (my_regex_t *)NULL, erbuf, (size_t)SHORT); - if (strncmp(erbuf, badpat, SHORT-1) != 0 || erbuf[SHORT-1] != '\0' || - ne != strlen(badpat)+1) { - fprintf(stderr, "end: regerror() short test gave `%s' not `%.*s'\n", - erbuf, SHORT-1, badpat); - status = 1; - } - ne = my_regerror(REG_ITOA|REG_BADPAT, (my_regex_t *)NULL, erbuf, sizeof(erbuf)); - if (strcmp(erbuf, bpname) != 0 || ne != strlen(bpname)+1) { - fprintf(stderr, "end: regerror() ITOA test gave `%s' not `%s'\n", - erbuf, bpname); - status = 1; - } - re.re_endp = bpname; - ne = my_regerror(REG_ATOI, &re, erbuf, sizeof(erbuf)); - if (atoi(erbuf) != (int)REG_BADPAT) { - fprintf(stderr, "end: regerror() ATOI test gave `%s' not `%ld'\n", - erbuf, (long)REG_BADPAT); - status = 1; - } else if (ne != strlen(erbuf)+1) { - fprintf(stderr, "end: regerror() ATOI test len(`%s') = %ld\n", - erbuf, (long)REG_BADPAT); - status = 1; - } -} - -/* - - rx_try - try it, and report on problems - == void rx_try(char *f0, char *f1, char *f2, char *f3, char *f4, int opts); - */ -void -rx_try(f0, f1, f2, f3, f4, opts) -char *f0; -char *f1; -char *f2; -char *f3; -char *f4; -int opts; /* may not match f1 */ -{ - my_regex_t re; -# define NSUBS 10 - my_regmatch_t subs[NSUBS]; -# define NSHOULD 15 - char *should[NSHOULD]; - int nshould; - char erbuf[100]; - int err; - int len; - const char *type = (opts & REG_EXTENDED) ? "ERE" : "BRE"; - register int i; - char *grump; - char f0copy[1000]; - char f2copy[1000]; - - strcpy(f0copy, f0); - re.re_endp = (opts®_PEND) ? f0copy + strlen(f0copy) : NULL; - fixstr(f0copy); - err = my_regcomp(&re, f0copy, opts, &my_charset_latin1); - if (err != 0 && (!opt('C', f1) || err != efind(f2))) { - /* unexpected error or wrong error */ - len = my_regerror(err, &re, erbuf, sizeof(erbuf)); - fprintf(stderr, "%d: %s error %s, %d/%d `%s'\n", - line, type, eprint(err), len, - (int) sizeof(erbuf), erbuf); - status = 1; - } else if (err == 0 && opt('C', f1)) { - /* unexpected success */ - fprintf(stderr, "%d: %s should have given REG_%s\n", - line, type, f2); - status = 1; - err = 1; /* so we won't try regexec */ - } - - if (err != 0) { - my_regfree(&re); - return; - } - - strcpy(f2copy, f2); - fixstr(f2copy); - - if (options('e', f1)®_STARTEND) { - if (strchr(f2, '(') == NULL || strchr(f2, ')') == NULL) - fprintf(stderr, "%d: bad STARTEND syntax\n", line); - subs[0].rm_so = strchr(f2, '(') - f2 + 1; - subs[0].rm_eo = strchr(f2, ')') - f2; - } - err = my_regexec(&re, f2copy, NSUBS, subs, options('e', f1)); - - if (err != 0 && (f3 != NULL || err != REG_NOMATCH)) { - /* unexpected error or wrong error */ - len = my_regerror(err, &re, erbuf, sizeof(erbuf)); - fprintf(stderr, "%d: %s exec error %s, %d/%d `%s'\n", - line, type, eprint(err), len, - (int) sizeof(erbuf), erbuf); - status = 1; - } else if (err != 0) { - /* nothing more to check */ - } else if (f3 == NULL) { - /* unexpected success */ - fprintf(stderr, "%d: %s exec should have failed\n", - line, type); - status = 1; - err = 1; /* just on principle */ - } else if (opts®_NOSUB) { - /* nothing more to check */ - } else if ((grump = check(f2, subs[0], f3)) != NULL) { - fprintf(stderr, "%d: %s %s\n", line, type, grump); - status = 1; - err = 1; - } - - if (err != 0 || f4 == NULL) { - my_regfree(&re); - return; - } - - for (i = 1; i < NSHOULD; i++) - should[i] = NULL; - nshould = split(f4, should+1, NSHOULD-1, ","); - if (nshould == 0) { - nshould = 1; - should[1] = (char*) ""; - } - for (i = 1; i < NSUBS; i++) { - grump = check(f2, subs[i], should[i]); - if (grump != NULL) { - fprintf(stderr, "%d: %s $%d %s\n", line, - type, i, grump); - status = 1; - err = 1; - } - } - - my_regfree(&re); -} - -/* - - options - pick options out of a regression-test string - == int options(int type, char *s); - */ -int -options(type, s) -int type; /* 'c' compile, 'e' exec */ -char *s; -{ - register char *p; - register int o = (type == 'c') ? copts : eopts; - register const char *legal = (type == 'c') ? "bisnmp" : "^$#tl"; - - for (p = s; *p != '\0'; p++) - if (strchr(legal, *p) != NULL) - switch (*p) { - case 'b': - o &= ~REG_EXTENDED; - break; - case 'i': - o |= REG_ICASE; - break; - case 's': - o |= REG_NOSUB; - break; - case 'n': - o |= REG_NEWLINE; - break; - case 'm': - o &= ~REG_EXTENDED; - o |= REG_NOSPEC; - break; - case 'p': - o |= REG_PEND; - break; - case '^': - o |= REG_NOTBOL; - break; - case '$': - o |= REG_NOTEOL; - break; - case '#': - o |= REG_STARTEND; - break; - case 't': /* trace */ - o |= REG_TRACE; - break; - case 'l': /* force long representation */ - o |= REG_LARGE; - break; - case 'r': /* force backref use */ - o |= REG_BACKR; - break; - } - return(o); -} - -/* - - opt - is a particular option in a regression string? - == int opt(int c, char *s); - */ -int /* predicate */ -opt(c, s) -int c; -char *s; -{ - return(strchr(s, c) != NULL); -} - -/* - - fixstr - transform magic characters in strings - == void fixstr(register char *p); - */ -void -fixstr(p) -register char *p; -{ - if (p == NULL) - return; - - for (; *p != '\0'; p++) - if (*p == 'N') - *p = '\n'; - else if (*p == 'T') - *p = '\t'; - else if (*p == 'S') - *p = ' '; - else if (*p == 'Z') - *p = '\0'; -} - -/* - - check - check a substring match - == char *check(char *str, regmatch_t sub, char *should); - */ -char * /* NULL or complaint */ -check(str, sub, should) -char *str; -my_regmatch_t sub; -char *should; -{ - register int len; - register int shlen; - register char *p; - static char grump[500]; - register char *at = NULL; - - if (should != NULL && strcmp(should, "-") == 0) - should = NULL; - if (should != NULL && should[0] == '@') { - at = should + 1; - should = (char*) ""; - } - - /* check rm_so and rm_eo for consistency */ - if (sub.rm_so > sub.rm_eo || (sub.rm_so == -1 && sub.rm_eo != -1) || - (sub.rm_so != -1 && sub.rm_eo == -1) || - (sub.rm_so != -1 && sub.rm_so < 0) || - (sub.rm_eo != -1 && sub.rm_eo < 0) ) { - sprintf(grump, "start %ld end %ld", (long)sub.rm_so, - (long)sub.rm_eo); - return(grump); - } - - /* check for no match */ - if (sub.rm_so == -1 && should == NULL) - return(NULL); - if (sub.rm_so == -1) - return((char*) "did not match"); - - /* check for in range */ - if ((int) sub.rm_eo > (int) strlen(str)) { - sprintf(grump, "start %ld end %ld, past end of string", - (long)sub.rm_so, (long)sub.rm_eo); - return(grump); - } - - len = (int)(sub.rm_eo - sub.rm_so); - shlen = (int)strlen(should); - p = str + sub.rm_so; - - /* check for not supposed to match */ - if (should == NULL) { - sprintf(grump, "matched `%.*s'", len, p); - return(grump); - } - - /* check for wrong match */ - if (len != shlen || strncmp(p, should, (size_t)shlen) != 0) { - sprintf(grump, "matched `%.*s' instead", len, p); - return(grump); - } - if (shlen > 0) - return(NULL); - - /* check null match in right place */ - if (at == NULL) - return(NULL); - shlen = strlen(at); - if (shlen == 0) - shlen = 1; /* force check for end-of-string */ - if (strncmp(p, at, shlen) != 0) { - sprintf(grump, "matched null at `%.20s'", p); - return(grump); - } - return(NULL); -} - -/* - - eprint - convert error number to name - == static char *eprint(int err); - */ -static char * -eprint(err) -int err; -{ - static char epbuf[100]; - size_t len; - - len = my_regerror(REG_ITOA|err, (my_regex_t *)NULL, epbuf, sizeof(epbuf)); - assert(len <= sizeof(epbuf)); - return(epbuf); -} - -/* - - efind - convert error name to number - == static int efind(char *name); - */ -static int -efind(name) -char *name; -{ - static char efbuf[100]; - my_regex_t re; - - sprintf(efbuf, "REG_%s", name); - assert(strlen(efbuf) < sizeof(efbuf)); - re.re_endp = efbuf; - (void) my_regerror(REG_ATOI, &re, efbuf, sizeof(efbuf)); - return(atoi(efbuf)); -} diff --git a/externals/mysql/extlib/regex/my_regex.h b/externals/mysql/extlib/regex/my_regex.h deleted file mode 100644 index 0d1cedf543..0000000000 --- a/externals/mysql/extlib/regex/my_regex.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef _REGEX_H_ -#define _REGEX_H_ /* never again */ -/* ========= begin header generated by ./mkh ========= */ -#ifdef __cplusplus -extern "C" { -#endif - -#include "m_ctype.h" - -/* === regex2.h === */ -#ifdef _WIN64 -typedef __int64 regoff_t; -#else -typedef off_t regoff_t; -#endif -struct re_guts; /* none of your business :-) */ -typedef struct { - int re_magic; - size_t re_nsub; /* number of parenthesized subexpressions */ - const char *re_endp; /* end pointer for REG_PEND */ - struct re_guts *re_g; /* none of your business :-) */ - CHARSET_INFO *charset; /* For ctype things */ -} my_regex_t; -typedef struct { - regoff_t rm_so; /* start of match */ - regoff_t rm_eo; /* end of match */ -} my_regmatch_t; - - -/* === regcomp.c === */ -extern int my_regcomp(my_regex_t *, const char *, int, CHARSET_INFO *charset); -#define REG_BASIC 0000 -#define REG_EXTENDED 0001 -#define REG_ICASE 0002 -#define REG_NOSUB 0004 -#define REG_NEWLINE 0010 -#define REG_NOSPEC 0020 -#define REG_PEND 0040 -#define REG_DUMP 0200 - - -/* === regerror.c === */ -#define REG_NOMATCH 1 -#define REG_BADPAT 2 -#define REG_ECOLLATE 3 -#define REG_ECTYPE 4 -#define REG_EESCAPE 5 -#define REG_ESUBREG 6 -#define REG_EBRACK 7 -#define REG_EPAREN 8 -#define REG_EBRACE 9 -#define REG_BADBR 10 -#define REG_ERANGE 11 -#define REG_ESPACE 12 -#define REG_BADRPT 13 -#define REG_EMPTY 14 -#define REG_ASSERT 15 -#define REG_INVARG 16 -#define REG_ATOI 255 /* convert name to number (!) */ -#define REG_ITOA 0400 /* convert number to name (!) */ -extern size_t my_regerror(int, const my_regex_t *, char *, size_t); - - -/* === regexec.c === */ -extern int my_regexec(const my_regex_t *, const char *, size_t, my_regmatch_t [], int); -#define REG_NOTBOL 00001 -#define REG_NOTEOL 00002 -#define REG_STARTEND 00004 -#define REG_TRACE 00400 /* tracing of execution */ -#define REG_LARGE 01000 /* force large representation */ -#define REG_BACKR 02000 /* force use of backref code */ - - -/* === regfree.c === */ -extern void my_regfree(my_regex_t *); - -/* === reginit.c === */ - -extern void my_regex_init(CHARSET_INFO *cs); /* Should be called for multithread progs */ -extern void my_regex_end(void); /* If one wants a clean end */ - -#ifdef __cplusplus -} -#endif -/* ========= end header generated by ./mkh ========= */ -#endif diff --git a/externals/mysql/extlib/regex/regcomp.c b/externals/mysql/extlib/regex/regcomp.c deleted file mode 100644 index 398e132d97..0000000000 --- a/externals/mysql/extlib/regex/regcomp.c +++ /dev/null @@ -1,1672 +0,0 @@ -#include -#include -#include -#ifdef __WIN__ -#include -#endif - -#include "my_regex.h" -#include "utils.h" -#include "regex2.h" - -#include "cclass.h" -#include "cname.h" - -/* - * parse structure, passed up and down to avoid global variables and - * other clumsinesses - */ -struct parse { - char *next; /* next character in RE */ - char *end; /* end of string (-> NUL normally) */ - int error; /* has an error been seen? */ - sop *strip; /* malloced strip */ - sopno ssize; /* malloced strip size (allocated) */ - sopno slen; /* malloced strip length (used) */ - int ncsalloc; /* number of csets allocated */ - struct re_guts *g; -# define NPAREN 10 /* we need to remember () 1-9 for back refs */ - sopno pbegin[NPAREN]; /* -> ( ([0] unused) */ - sopno pend[NPAREN]; /* -> ) ([0] unused) */ - CHARSET_INFO *charset; /* for ctype things */ -}; - -#include "regcomp.ih" - -static char nuls[10]; /* place to point scanner in event of error */ - -struct cclass cclasses[CCLASS_LAST+1]= { - { "alnum", "","", _MY_U | _MY_L | _MY_NMR}, - { "alpha", "","", _MY_U | _MY_L }, - { "blank", "","", _MY_B }, - { "cntrl", "","", _MY_CTR }, - { "digit", "","", _MY_NMR }, - { "graph", "","", _MY_PNT | _MY_U | _MY_L | _MY_NMR}, - { "lower", "","", _MY_L }, - { "print", "","", _MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B }, - { "punct", "","", _MY_PNT }, - { "space", "","", _MY_SPC }, - { "upper", "","", _MY_U }, - { "xdigit", "","", _MY_X }, - { NULL,NULL,NULL, 0 } -}; - -/* - * macros for use with parse structure - * BEWARE: these know that the parse structure is named `p' !!! - */ -#define PEEK() (*p->next) -#define PEEK2() (*(p->next+1)) -#define MORE() (p->next < p->end) -#define MORE2() (p->next+1 < p->end) -#define SEE(c) (MORE() && PEEK() == (c)) -#define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b)) -#define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0) -#define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0) -#define NEXT() (p->next++) -#define NEXT2() (p->next += 2) -#define NEXTn(n) (p->next += (n)) -#define GETNEXT() (*p->next++) -#define SETERROR(e) seterr(p, (e)) -#define REQUIRE(co, e) ((co) || SETERROR(e)) -#define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e)) -#define MUSTEAT(c, e) (REQUIRE(MORE() && GETNEXT() == (c), e)) -#define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e)) -#define EMIT(op, sopnd) doemit(p, (sop)(op), (size_t)(sopnd)) -#define INSERT(op, pos) doinsert(p, (sop)(op), HERE()-(pos)+1, pos) -#define AHEAD(pos) dofwd(p, pos, HERE()-(pos)) -#define ASTERN(sop, pos) EMIT(sop, HERE()-pos) -#define HERE() (p->slen) -#define THERE() (p->slen - 1) -#define THERETHERE() (p->slen - 2) -#define DROP(n) (p->slen -= (n)) - -#ifndef NDEBUG -static int never = 0; /* for use in asserts; shuts lint up */ -#else -#define never 0 /* some s have bugs too */ -#endif - -/* - - regcomp - interface for parser and compilation - = extern int regcomp(regex_t *, const char *, int); - = #define REG_BASIC 0000 - = #define REG_EXTENDED 0001 - = #define REG_ICASE 0002 - = #define REG_NOSUB 0004 - = #define REG_NEWLINE 0010 - = #define REG_NOSPEC 0020 - = #define REG_PEND 0040 - = #define REG_DUMP 0200 - */ -int /* 0 success, otherwise REG_something */ -my_regcomp(preg, pattern, cflags, charset) -my_regex_t *preg; -const char *pattern; -int cflags; -CHARSET_INFO *charset; -{ - struct parse pa; - register struct re_guts *g; - register struct parse *p = &pa; - register int i; - register size_t len; -#ifdef REDEBUG -# define GOODFLAGS(f) (f) -#else -# define GOODFLAGS(f) ((f)&~REG_DUMP) -#endif - - my_regex_init(charset); /* Init cclass if neaded */ - preg->charset=charset; - cflags = GOODFLAGS(cflags); - if ((cflags®_EXTENDED) && (cflags®_NOSPEC)) - return(REG_INVARG); - - if (cflags®_PEND) { - if (preg->re_endp < pattern) - return(REG_INVARG); - len = preg->re_endp - pattern; - } else - len = strlen((char *)pattern); - - /* do the mallocs early so failure handling is easy */ - g = (struct re_guts *)malloc(sizeof(struct re_guts) + - (NC-1)*sizeof(cat_t)); - if (g == NULL) - return(REG_ESPACE); - p->ssize = (long) (len/(size_t)2*(size_t)3 + (size_t)1); /* ugh */ - p->strip = (sop *)malloc(p->ssize * sizeof(sop)); - p->slen = 0; - if (p->strip == NULL) { - free((char *)g); - return(REG_ESPACE); - } - - /* set things up */ - p->g = g; - p->next = (char *)pattern; /* convenience; we do not modify it */ - p->end = p->next + len; - p->error = 0; - p->ncsalloc = 0; - p->charset = preg->charset; - for (i = 0; i < NPAREN; i++) { - p->pbegin[i] = 0; - p->pend[i] = 0; - } - g->csetsize = NC; - g->sets = NULL; - g->setbits = NULL; - g->ncsets = 0; - g->cflags = cflags; - g->iflags = 0; - g->nbol = 0; - g->neol = 0; - g->must = NULL; - g->mlen = 0; - g->nsub = 0; - g->ncategories = 1; /* category 0 is "everything else" */ - g->categories = &g->catspace[-(CHAR_MIN)]; - (void) memset((char *)g->catspace, 0, NC*sizeof(cat_t)); - g->backrefs = 0; - - /* do it */ - EMIT(OEND, 0); - g->firststate = THERE(); - if (cflags®_EXTENDED) - p_ere(p, OUT); - else if (cflags®_NOSPEC) - p_str(p); - else - p_bre(p, OUT, OUT); - EMIT(OEND, 0); - g->laststate = THERE(); - - /* tidy up loose ends and fill things in */ - categorize(p, g); - stripsnug(p, g); - findmust(p, g); - g->nplus = pluscount(p, g); - g->magic = MAGIC2; - preg->re_nsub = g->nsub; - preg->re_g = g; - preg->re_magic = MAGIC1; -#ifndef REDEBUG - /* not debugging, so can't rely on the assert() in regexec() */ - if (g->iflags&BAD) - SETERROR(REG_ASSERT); -#endif - - /* win or lose, we're done */ - if (p->error != 0) /* lose */ - my_regfree(preg); - return(p->error); -} - -/* - - p_ere - ERE parser top level, concatenation and alternation - == static void p_ere(register struct parse *p, int stop); - */ -static void -p_ere(p, stop) -register struct parse *p; -int stop; /* character this ERE should end at */ -{ - register char c; - register sopno prevback; - register sopno prevfwd; - register sopno conc; - register int first = 1; /* is this the first alternative? */ - LINT_INIT(prevback); LINT_INIT(prevfwd); - for (;;) { - /* do a bunch of concatenated expressions */ - conc = HERE(); - while (MORE() && (c = PEEK()) != '|' && c != stop) - p_ere_exp(p); - if(REQUIRE(HERE() != conc, REG_EMPTY)) {}/* require nonempty */ - - if (!EAT('|')) - break; /* NOTE BREAK OUT */ - - if (first) { - INSERT(OCH_, conc); /* offset is wrong */ - prevfwd = conc; - prevback = conc; - first = 0; - } - ASTERN(OOR1, prevback); - prevback = THERE(); - AHEAD(prevfwd); /* fix previous offset */ - prevfwd = HERE(); - EMIT(OOR2, 0); /* offset is very wrong */ - } - - if (!first) { /* tail-end fixups */ - AHEAD(prevfwd); - ASTERN(O_CH, prevback); - } - - assert(!MORE() || SEE(stop)); -} - -/* - - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op - == static void p_ere_exp(register struct parse *p); - */ -static void -p_ere_exp(p) -register struct parse *p; -{ - register char c; - register sopno pos; - register int count; - register int count2; - register sopno subno; - int wascaret = 0; - - assert(MORE()); /* caller should have ensured this */ - c = GETNEXT(); - - pos = HERE(); - switch (c) { - case '(': - if(REQUIRE(MORE(), REG_EPAREN)) {} - p->g->nsub++; - subno = (sopno) p->g->nsub; - if (subno < NPAREN) - p->pbegin[subno] = HERE(); - EMIT(OLPAREN, subno); - if (!SEE(')')) - p_ere(p, ')'); - if (subno < NPAREN) { - p->pend[subno] = HERE(); - assert(p->pend[subno] != 0); - } - EMIT(ORPAREN, subno); - if(MUSTEAT(')', REG_EPAREN)) {} - break; -#ifndef POSIX_MISTAKE - case ')': /* happens only if no current unmatched ( */ - /* - * You may ask, why the ifndef? Because I didn't notice - * this until slightly too late for 1003.2, and none of the - * other 1003.2 regular-expression reviewers noticed it at - * all. So an unmatched ) is legal POSIX, at least until - * we can get it fixed. - */ - SETERROR(REG_EPAREN); - break; -#endif - case '^': - EMIT(OBOL, 0); - p->g->iflags |= USEBOL; - p->g->nbol++; - wascaret = 1; - break; - case '$': - EMIT(OEOL, 0); - p->g->iflags |= USEEOL; - p->g->neol++; - break; - case '|': - SETERROR(REG_EMPTY); - break; - case '*': - case '+': - case '?': - SETERROR(REG_BADRPT); - break; - case '.': - if (p->g->cflags®_NEWLINE) - nonnewline(p); - else - EMIT(OANY, 0); - break; - case '[': - p_bracket(p); - break; - case '\\': - if(REQUIRE(MORE(), REG_EESCAPE)) {} - c = GETNEXT(); - ordinary(p, c); - break; - case '{': /* okay as ordinary except if digit follows */ - if(REQUIRE(!MORE() || !my_isdigit(p->charset,PEEK()), REG_BADRPT)) {} - /* FALLTHROUGH */ - default: - ordinary(p, c); - break; - } - - if (!MORE()) - return; - c = PEEK(); - /* we call { a repetition if followed by a digit */ - if (!( c == '*' || c == '+' || c == '?' || - (c == '{' && MORE2() && - my_isdigit(p->charset,PEEK2())) )) - return; /* no repetition, we're done */ - NEXT(); - - if(REQUIRE(!wascaret, REG_BADRPT)) {} - switch (c) { - case '*': /* implemented as +? */ - /* this case does not require the (y|) trick, noKLUDGE */ - INSERT(OPLUS_, pos); - ASTERN(O_PLUS, pos); - INSERT(OQUEST_, pos); - ASTERN(O_QUEST, pos); - break; - case '+': - INSERT(OPLUS_, pos); - ASTERN(O_PLUS, pos); - break; - case '?': - /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */ - INSERT(OCH_, pos); /* offset slightly wrong */ - ASTERN(OOR1, pos); /* this one's right */ - AHEAD(pos); /* fix the OCH_ */ - EMIT(OOR2, 0); /* offset very wrong... */ - AHEAD(THERE()); /* ...so fix it */ - ASTERN(O_CH, THERETHERE()); - break; - case '{': - count = p_count(p); - if (EAT(',')) { - if (my_isdigit(p->charset,PEEK())) { - count2 = p_count(p); - if(REQUIRE(count <= count2, REG_BADBR)) {} - } else /* single number with comma */ - count2 = RE_INFINITY; - } else /* just a single number */ - count2 = count; - repeat(p, pos, count, count2); - if (!EAT('}')) { /* error heuristics */ - while (MORE() && PEEK() != '}') - NEXT(); - if(REQUIRE(MORE(), REG_EBRACE)) {} - SETERROR(REG_BADBR); - } - break; - } - - if (!MORE()) - return; - c = PEEK(); - if (!( c == '*' || c == '+' || c == '?' || - (c == '{' && MORE2() && - my_isdigit(p->charset,PEEK2())) ) ) - return; - SETERROR(REG_BADRPT); -} - -/* - - p_str - string (no metacharacters) "parser" - == static void p_str(register struct parse *p); - */ -static void -p_str(p) -register struct parse *p; -{ - if(REQUIRE(MORE(), REG_EMPTY)) {} - while (MORE()) - ordinary(p, GETNEXT()); -} - -/* - - p_bre - BRE parser top level, anchoring and concatenation - == static void p_bre(register struct parse *p, register int end1, \ - == register int end2); - * Giving end1 as OUT essentially eliminates the end1/end2 check. - * - * This implementation is a bit of a kludge, in that a trailing $ is first - * taken as an ordinary character and then revised to be an anchor. The - * only undesirable side effect is that '$' gets included as a character - * category in such cases. This is fairly harmless; not worth fixing. - * The amount of lookahead needed to avoid this kludge is excessive. - */ -static void -p_bre(p, end1, end2) -register struct parse *p; -register int end1; /* first terminating character */ -register int end2; /* second terminating character */ -{ - register sopno start = HERE(); - register int first = 1; /* first subexpression? */ - register int wasdollar = 0; - - if (EAT('^')) { - EMIT(OBOL, 0); - p->g->iflags |= USEBOL; - p->g->nbol++; - } - while (MORE() && !SEETWO(end1, end2)) { - wasdollar = p_simp_re(p, first); - first = 0; - } - if (wasdollar) { /* oops, that was a trailing anchor */ - DROP(1); - EMIT(OEOL, 0); - p->g->iflags |= USEEOL; - p->g->neol++; - } - - if(REQUIRE(HERE() != start, REG_EMPTY)) {} /* require nonempty */ -} - -/* - - p_simp_re - parse a simple RE, an atom possibly followed by a repetition - == static int p_simp_re(register struct parse *p, int starordinary); - */ -static int /* was the simple RE an unbackslashed $? */ -p_simp_re(p, starordinary) -register struct parse *p; -int starordinary; /* is a leading * an ordinary character? */ -{ - register int c; - register int count; - register int count2; - register sopno pos; - register int i; - register sopno subno; -# define BACKSL (1<g->cflags®_NEWLINE) - nonnewline(p); - else - EMIT(OANY, 0); - break; - case '[': - p_bracket(p); - break; - case BACKSL|'{': - SETERROR(REG_BADRPT); - break; - case BACKSL|'(': - p->g->nsub++; - subno = (sopno) p->g->nsub; - if (subno < NPAREN) - p->pbegin[subno] = HERE(); - EMIT(OLPAREN, subno); - /* the MORE here is an error heuristic */ - if (MORE() && !SEETWO('\\', ')')) - p_bre(p, '\\', ')'); - if (subno < NPAREN) { - p->pend[subno] = HERE(); - assert(p->pend[subno] != 0); - } - EMIT(ORPAREN, subno); - if(REQUIRE(EATTWO('\\', ')'), REG_EPAREN)) {} - break; - case BACKSL|')': /* should not get here -- must be user */ - case BACKSL|'}': - SETERROR(REG_EPAREN); - break; - case BACKSL|'1': - case BACKSL|'2': - case BACKSL|'3': - case BACKSL|'4': - case BACKSL|'5': - case BACKSL|'6': - case BACKSL|'7': - case BACKSL|'8': - case BACKSL|'9': - i = (c&~BACKSL) - '0'; - assert(i < NPAREN); - if (p->pend[i] != 0) { - assert((uint) i <= p->g->nsub); - EMIT(OBACK_, i); - assert(p->pbegin[i] != 0); - assert(OP(p->strip[p->pbegin[i]]) == OLPAREN); - assert(OP(p->strip[p->pend[i]]) == ORPAREN); - (void) dupl(p, p->pbegin[i]+1, p->pend[i]); - EMIT(O_BACK, i); - } else - SETERROR(REG_ESUBREG); - p->g->backrefs = 1; - break; - case '*': - if(REQUIRE(starordinary, REG_BADRPT)) {} - /* FALLTHROUGH */ - default: - ordinary(p, c &~ BACKSL); - break; - } - - if (EAT('*')) { /* implemented as +? */ - /* this case does not require the (y|) trick, noKLUDGE */ - INSERT(OPLUS_, pos); - ASTERN(O_PLUS, pos); - INSERT(OQUEST_, pos); - ASTERN(O_QUEST, pos); - } else if (EATTWO('\\', '{')) { - count = p_count(p); - if (EAT(',')) { - if (MORE() && my_isdigit(p->charset,PEEK())) { - count2 = p_count(p); - if(REQUIRE(count <= count2, REG_BADBR)) {} - } else /* single number with comma */ - count2 = RE_INFINITY; - } else /* just a single number */ - count2 = count; - repeat(p, pos, count, count2); - if (!EATTWO('\\', '}')) { /* error heuristics */ - while (MORE() && !SEETWO('\\', '}')) - NEXT(); - if(REQUIRE(MORE(), REG_EBRACE)) {} - SETERROR(REG_BADBR); - } - } else if (c == (unsigned char)'$') /* $ (but not \$) ends it */ - return(1); - - return(0); -} - -/* - - p_count - parse a repetition count - == static int p_count(register struct parse *p); - */ -static int /* the value */ -p_count(p) -register struct parse *p; -{ - register int count = 0; - register int ndigits = 0; - - while (MORE() && my_isdigit(p->charset,PEEK()) && count <= DUPMAX) { - count = count*10 + (GETNEXT() - '0'); - ndigits++; - } - - if(REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR)) {} - return(count); -} - -/* - - p_bracket - parse a bracketed character list - == static void p_bracket(register struct parse *p); - * - * Note a significant property of this code: if the allocset() did SETERROR, - * no set operations are done. - */ -static void -p_bracket(p) -register struct parse *p; -{ - register cset *cs = allocset(p); - register int invert = 0; - - /* Dept of Truly Sickening Special-Case Kludges */ - if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]", 6) == 0) { - EMIT(OBOW, 0); - NEXTn(6); - return; - } - if (p->next + 5 < p->end && strncmp(p->next, "[:>:]]", 6) == 0) { - EMIT(OEOW, 0); - NEXTn(6); - return; - } - - if (EAT('^')) - invert++; /* make note to invert set at end */ - if (EAT(']')) - CHadd(cs, ']'); - else if (EAT('-')) - CHadd(cs, '-'); - while (MORE() && PEEK() != ']' && !SEETWO('-', ']')) - p_b_term(p, cs); - if (EAT('-')) - CHadd(cs, '-'); - if(MUSTEAT(']', REG_EBRACK)) {} - - if (p->error != 0) /* don't mess things up further */ - return; - - if (p->g->cflags®_ICASE) { - register int i; - register int ci; - - for (i = p->g->csetsize - 1; i >= 0; i--) - if (CHIN(cs, i) && my_isalpha(p->charset,i)) { - ci = othercase(p->charset,i); - if (ci != i) - CHadd(cs, ci); - } - if (cs->multis != NULL) - mccase(p, cs); - } - if (invert) { - register int i; - - for (i = p->g->csetsize - 1; i >= 0; i--) - if (CHIN(cs, i)) - CHsub(cs, i); - else - CHadd(cs, i); - if (p->g->cflags®_NEWLINE) - CHsub(cs, '\n'); - if (cs->multis != NULL) - mcinvert(p, cs); - } - - assert(cs->multis == NULL); /* xxx */ - - if (nch(p, cs) == 1) { /* optimize singleton sets */ - ordinary(p, firstch(p, cs)); - freeset(p, cs); - } else - EMIT(OANYOF, freezeset(p, cs)); -} - -/* - - p_b_term - parse one term of a bracketed character list - == static void p_b_term(register struct parse *p, register cset *cs); - */ -static void -p_b_term(p, cs) -register struct parse *p; -register cset *cs; -{ - register char c; - register char start, finish; - register int i; - - /* classify what we've got */ - switch ((MORE()) ? PEEK() : '\0') { - case '[': - c = (MORE2()) ? PEEK2() : '\0'; - break; - case '-': - SETERROR(REG_ERANGE); - return; /* NOTE RETURN */ - break; - default: - c = '\0'; - break; - } - - switch (c) { - case ':': /* character class */ - NEXT2(); - if(REQUIRE(MORE(), REG_EBRACK)) {} - c = PEEK(); - if(REQUIRE(c != '-' && c != ']', REG_ECTYPE)) {} - p_b_cclass(p, cs); - if(REQUIRE(MORE(), REG_EBRACK)) {} - if(REQUIRE(EATTWO(':', ']'), REG_ECTYPE)) {} - break; - case '=': /* equivalence class */ - NEXT2(); - if(REQUIRE(MORE(), REG_EBRACK)) {} - c = PEEK(); - if(REQUIRE(c != '-' && c != ']', REG_ECOLLATE)) {} - p_b_eclass(p, cs); - if(REQUIRE(MORE(), REG_EBRACK)) {} - if(REQUIRE(EATTWO('=', ']'), REG_ECOLLATE)) {} - break; - default: /* symbol, ordinary character, or range */ -/* xxx revision needed for multichar stuff */ - start = p_b_symbol(p); - if (SEE('-') && MORE2() && PEEK2() != ']') { - /* range */ - NEXT(); - if (EAT('-')) - finish = '-'; - else - finish = p_b_symbol(p); - } else - finish = start; -/* xxx what about signed chars here... */ - if(REQUIRE(start <= finish, REG_ERANGE)) {} - for (i = start; i <= finish; i++) - CHadd(cs, i); - break; - } -} - -/* - - p_b_cclass - parse a character-class name and deal with it - == static void p_b_cclass(register struct parse *p, register cset *cs); - */ -static void -p_b_cclass(p, cs) -register struct parse *p; -register cset *cs; -{ - register char *sp = p->next; - register struct cclass *cp; - register size_t len; - - while (MORE() && my_isalpha(p->charset,PEEK())) - NEXT(); - len = p->next - sp; - for (cp = cclasses; cp->name != NULL; cp++) - if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0') - break; - if (cp->name == NULL) { - /* oops, didn't find it */ - SETERROR(REG_ECTYPE); - return; - } - -#ifndef USE_ORIG_REGEX_CODE - { - register size_t i; - for (i=1 ; i<256 ; i++) - if (p->charset->ctype[i+1] & cp->mask) - CHadd(cs, i); - } -#else - { - register char *u = (char*) cp->chars; - register char c; - - while ((c = *u++) != '\0') - CHadd(cs, c); - - for (u = (char*) cp->multis; *u != '\0'; u += strlen(u) + 1) - MCadd(p, cs, u); - } -#endif - -} - -/* - - p_b_eclass - parse an equivalence-class name and deal with it - == static void p_b_eclass(register struct parse *p, register cset *cs); - * - * This implementation is incomplete. xxx - */ -static void -p_b_eclass(p, cs) -register struct parse *p; -register cset *cs; -{ - register char c; - - c = p_b_coll_elem(p, '='); - CHadd(cs, c); -} - -/* - - p_b_symbol - parse a character or [..]ed multicharacter collating symbol - == static char p_b_symbol(register struct parse *p); - */ -static char /* value of symbol */ -p_b_symbol(p) -register struct parse *p; -{ - register char value; - - if(REQUIRE(MORE(), REG_EBRACK)) {} - if (!EATTWO('[', '.')) - return(GETNEXT()); - - /* collating symbol */ - value = p_b_coll_elem(p, '.'); - if(REQUIRE(EATTWO('.', ']'), REG_ECOLLATE)) {} - return(value); -} - -/* - - p_b_coll_elem - parse a collating-element name and look it up - == static char p_b_coll_elem(register struct parse *p, int endc); - */ -static char /* value of collating element */ -p_b_coll_elem(p, endc) -register struct parse *p; -int endc; /* name ended by endc,']' */ -{ - register char *sp = p->next; - register struct cname *cp; -#ifdef _WIN64 - register __int64 len; -#else - register int len; -#endif - while (MORE() && !SEETWO(endc, ']')) - NEXT(); - if (!MORE()) { - SETERROR(REG_EBRACK); - return(0); - } - len = p->next - sp; - for (cp = cnames; cp->name != NULL; cp++) - if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0') - return(cp->code); /* known name */ - if (len == 1) - return(*sp); /* single character */ - SETERROR(REG_ECOLLATE); /* neither */ - return(0); -} - -/* - - othercase - return the case counterpart of an alphabetic - == static char othercase(int ch); - */ -static char /* if no counterpart, return ch */ -othercase(charset,ch) -CHARSET_INFO *charset; -int ch; -{ - /* - In MySQL some multi-byte character sets - have 'ctype' array but don't have 'to_lower' - and 'to_upper' arrays. In this case we handle - only basic latin letters a..z and A..Z. - - If 'to_lower' and 'to_upper' arrays are empty in a character set, - then my_isalpha(cs, ch) should never return TRUE for characters - other than basic latin letters. Otherwise it should be - considered as a mistake in character set definition. - */ - assert(my_isalpha(charset,ch)); - if (my_isupper(charset,ch)) - { - return(charset->to_lower ? my_tolower(charset,ch) : - ch - 'A' + 'a'); - } - else if (my_islower(charset,ch)) - { - return(charset->to_upper ? my_toupper(charset,ch) : - ch - 'a' + 'A'); - } - else /* peculiar, but could happen */ - return(ch); -} - -/* - - bothcases - emit a dualcase version of a two-case character - == static void bothcases(register struct parse *p, int ch); - * - * Boy, is this implementation ever a kludge... - */ -static void -bothcases(p, ch) -register struct parse *p; -int ch; -{ - register char *oldnext = p->next; - register char *oldend = p->end; - char bracket[3]; - - assert(othercase(p->charset, ch) != ch); /* p_bracket() would recurse */ - p->next = bracket; - p->end = bracket+2; - bracket[0] = ch; - bracket[1] = ']'; - bracket[2] = '\0'; - p_bracket(p); - assert(p->next == bracket+2); - p->next = oldnext; - p->end = oldend; -} - -/* - - ordinary - emit an ordinary character - == static void ordinary(register struct parse *p, register int ch); - */ -static void -ordinary(p, ch) -register struct parse *p; -register int ch; -{ - register cat_t *cap = p->g->categories; - - if ((p->g->cflags®_ICASE) && my_isalpha(p->charset,ch) && - othercase(p->charset,ch) != ch) - bothcases(p, ch); - else { - EMIT(OCHAR, (unsigned char)ch); - if (cap[ch] == 0) - cap[ch] = p->g->ncategories++; - } -} - -/* - - nonnewline - emit REG_NEWLINE version of OANY - == static void nonnewline(register struct parse *p); - * - * Boy, is this implementation ever a kludge... - */ -static void -nonnewline(p) -register struct parse *p; -{ - register char *oldnext = p->next; - register char *oldend = p->end; - char bracket[4]; - - p->next = bracket; - p->end = bracket+3; - bracket[0] = '^'; - bracket[1] = '\n'; - bracket[2] = ']'; - bracket[3] = '\0'; - p_bracket(p); - assert(p->next == bracket+3); - p->next = oldnext; - p->end = oldend; -} - -/* - - repeat - generate code for a bounded repetition, recursively if needed - == static void repeat(register struct parse *p, sopno start, int from, int to); - */ -static void -repeat(p, start, from, to) -register struct parse *p; -sopno start; /* operand from here to end of strip */ -int from; /* repeated from this number */ -int to; /* to this number of times (maybe RE_INFINITY) */ -{ - register sopno finish = HERE(); -# define N 2 -# define INF 3 -# define REP(f, t) ((f)*8 + (t)) -# define MAP(n) (((n) <= 1) ? (n) : ((n) == RE_INFINITY) ? INF : N) - register sopno copy; - - if (p->error != 0) /* head off possible runaway recursion */ - return; - - assert(from <= to); - - switch (REP(MAP(from), MAP(to))) { - case REP(0, 0): /* must be user doing this */ - DROP(finish-start); /* drop the operand */ - break; - case REP(0, 1): /* as x{1,1}? */ - case REP(0, N): /* as x{1,n}? */ - case REP(0, INF): /* as x{1,}? */ - /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */ - INSERT(OCH_, start); /* offset is wrong... */ - repeat(p, start+1, 1, to); - ASTERN(OOR1, start); - AHEAD(start); /* ... fix it */ - EMIT(OOR2, 0); - AHEAD(THERE()); - ASTERN(O_CH, THERETHERE()); - break; - case REP(1, 1): /* trivial case */ - /* done */ - break; - case REP(1, N): /* as x?x{1,n-1} */ - /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */ - INSERT(OCH_, start); - ASTERN(OOR1, start); - AHEAD(start); - EMIT(OOR2, 0); /* offset very wrong... */ - AHEAD(THERE()); /* ...so fix it */ - ASTERN(O_CH, THERETHERE()); - copy = dupl(p, start+1, finish+1); - assert(copy == finish+4); - repeat(p, copy, 1, to-1); - break; - case REP(1, INF): /* as x+ */ - INSERT(OPLUS_, start); - ASTERN(O_PLUS, start); - break; - case REP(N, N): /* as xx{m-1,n-1} */ - copy = dupl(p, start, finish); - repeat(p, copy, from-1, to-1); - break; - case REP(N, INF): /* as xx{n-1,INF} */ - copy = dupl(p, start, finish); - repeat(p, copy, from-1, to); - break; - default: /* "can't happen" */ - SETERROR(REG_ASSERT); /* just in case */ - break; - } -} - -/* - - seterr - set an error condition - == static int seterr(register struct parse *p, int e); - */ -static int /* useless but makes type checking happy */ -seterr(p, e) -register struct parse *p; -int e; -{ - if (p->error == 0) /* keep earliest error condition */ - p->error = e; - p->next = nuls; /* try to bring things to a halt */ - p->end = nuls; - return(0); /* make the return value well-defined */ -} - -/* - - allocset - allocate a set of characters for [] - == static cset *allocset(register struct parse *p); - */ -static cset * -allocset(p) -register struct parse *p; -{ - register int no = p->g->ncsets++; - register size_t nc; - register size_t nbytes; - register cset *cs; - register size_t css = (size_t)p->g->csetsize; - register int i; - - if (no >= p->ncsalloc) { /* need another column of space */ - p->ncsalloc += CHAR_BIT; - nc = p->ncsalloc; - assert(nc % CHAR_BIT == 0); - nbytes = nc / CHAR_BIT * css; - if (p->g->sets == NULL) - p->g->sets = (cset *)malloc(nc * sizeof(cset)); - else - p->g->sets = (cset *)realloc((char *)p->g->sets, - nc * sizeof(cset)); - if (p->g->setbits == NULL) - p->g->setbits = (uch *)malloc(nbytes); - else { - p->g->setbits = (uch *)realloc((char *)p->g->setbits, - nbytes); - /* xxx this isn't right if setbits is now NULL */ - for (i = 0; i < no; i++) - p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT); - } - if (p->g->sets != NULL && p->g->setbits != NULL) - (void) memset((char *)p->g->setbits + (nbytes - css), - 0, css); - else { - no = 0; - SETERROR(REG_ESPACE); - /* caller's responsibility not to do set ops */ - } - } - - assert(p->g->sets != NULL); /* xxx */ - cs = &p->g->sets[no]; - cs->ptr = p->g->setbits + css*((no)/CHAR_BIT); - cs->mask = 1 << ((no) % CHAR_BIT); - cs->hash = 0; - cs->smultis = 0; - cs->multis = NULL; - - return(cs); -} - -/* - - freeset - free a now-unused set - == static void freeset(register struct parse *p, register cset *cs); - */ -static void -freeset(p, cs) -register struct parse *p; -register cset *cs; -{ - register size_t i; - register cset *top = &p->g->sets[p->g->ncsets]; - register size_t css = (size_t)p->g->csetsize; - - for (i = 0; i < css; i++) - CHsub(cs, i); - if (cs == top-1) /* recover only the easy case */ - p->g->ncsets--; -} - -/* - - freezeset - final processing on a set of characters - == static int freezeset(register struct parse *p, register cset *cs); - * - * The main task here is merging identical sets. This is usually a waste - * of time (although the hash code minimizes the overhead), but can win - * big if REG_ICASE is being used. REG_ICASE, by the way, is why the hash - * is done using addition rather than xor -- all ASCII [aA] sets xor to - * the same value! - */ -static int /* set number */ -freezeset(p, cs) -register struct parse *p; -register cset *cs; -{ - register uch h = cs->hash; - register size_t i; - register cset *top = &p->g->sets[p->g->ncsets]; - register cset *cs2; - register size_t css = (size_t)p->g->csetsize; - - /* look for an earlier one which is the same */ - for (cs2 = &p->g->sets[0]; cs2 < top; cs2++) - if (cs2->hash == h && cs2 != cs) { - /* maybe */ - for (i = 0; i < css; i++) - if (!!CHIN(cs2, i) != !!CHIN(cs, i)) - break; /* no */ - if (i == css) - break; /* yes */ - } - - if (cs2 < top) { /* found one */ - freeset(p, cs); - cs = cs2; - } - - return((int)(cs - p->g->sets)); -} - -/* - - firstch - return first character in a set (which must have at least one) - == static int firstch(register struct parse *p, register cset *cs); - */ -static int /* character; there is no "none" value */ -firstch(p, cs) -register struct parse *p; -register cset *cs; -{ - register size_t i; - register size_t css = (size_t)p->g->csetsize; - - for (i = 0; i < css; i++) - if (CHIN(cs, i)) - return((char)i); - assert(never); - return(0); /* arbitrary */ -} - -/* - - nch - number of characters in a set - == static int nch(register struct parse *p, register cset *cs); - */ -static int -nch(p, cs) -register struct parse *p; -register cset *cs; -{ - register size_t i; - register size_t css = (size_t)p->g->csetsize; - register int n = 0; - - for (i = 0; i < css; i++) - if (CHIN(cs, i)) - n++; - return(n); -} - -#ifdef USE_ORIG_REGEX_CODE -/* - - mcadd - add a collating element to a cset - == static void mcadd(register struct parse *p, register cset *cs, \ - == register char *cp); - */ -static void -mcadd(p, cs, cp) -register struct parse *p; -register cset *cs; -register char *cp; -{ - register size_t oldend = cs->smultis; - - cs->smultis += strlen(cp) + 1; - if (cs->multis == NULL) - cs->multis = malloc(cs->smultis); - else - cs->multis = realloc(cs->multis, cs->smultis); - if (cs->multis == NULL) { - SETERROR(REG_ESPACE); - return; - } - - (void) strcpy(cs->multis + oldend - 1, cp); - cs->multis[cs->smultis - 1] = '\0'; -} -#endif - -#ifdef NOT_USED -/* - - mcsub - subtract a collating element from a cset - == static void mcsub(register cset *cs, register char *cp); - */ -static void -mcsub(cs, cp) -register cset *cs; -register char *cp; -{ - register char *fp = mcfind(cs, cp); - register size_t len = strlen(fp); - - assert(fp != NULL); - (void) memmove(fp, fp + len + 1, - cs->smultis - (fp + len + 1 - cs->multis)); - cs->smultis -= len; - - if (cs->smultis == 0) { - free(cs->multis); - cs->multis = NULL; - return; - } - - cs->multis = realloc(cs->multis, cs->smultis); - assert(cs->multis != NULL); -} - -/* - - mcin - is a collating element in a cset? - == static int mcin(register cset *cs, register char *cp); - */ -static int -mcin(cs, cp) -register cset *cs; -register char *cp; -{ - return(mcfind(cs, cp) != NULL); -} - -/* - - mcfind - find a collating element in a cset - == static char *mcfind(register cset *cs, register char *cp); - */ -static char * -mcfind(cs, cp) -register cset *cs; -register char *cp; -{ - register char *p; - - if (cs->multis == NULL) - return(NULL); - for (p = cs->multis; *p != '\0'; p += strlen(p) + 1) - if (strcmp(cp, p) == 0) - return(p); - return(NULL); -} -#endif - -/* - - mcinvert - invert the list of collating elements in a cset - == static void mcinvert(register struct parse *p, register cset *cs); - * - * This would have to know the set of possibilities. Implementation - * is deferred. - */ -static void -mcinvert(p, cs) - register struct parse *p __attribute__((unused)); - register cset *cs __attribute__((unused)); -{ - assert(cs->multis == NULL); /* xxx */ -} - -/* - - mccase - add case counterparts of the list of collating elements in a cset - == static void mccase(register struct parse *p, register cset *cs); - * - * This would have to know the set of possibilities. Implementation - * is deferred. - */ -static void -mccase(p, cs) -register struct parse *p __attribute__((unused)); -register cset *cs __attribute__((unused)); -{ - assert(cs->multis == NULL); /* xxx */ -} - -/* - - isinsets - is this character in any sets? - == static int isinsets(register struct re_guts *g, int c); - */ -static int /* predicate */ -isinsets(g, c) -register struct re_guts *g; -int c; -{ - register uch *col; - register int i; - register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT; - register unsigned uc = (unsigned char)c; - - for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize) - if (col[uc] != 0) - return(1); - return(0); -} - -/* - - samesets - are these two characters in exactly the same sets? - == static int samesets(register struct re_guts *g, int c1, int c2); - */ -static int /* predicate */ -samesets(g, c1, c2) -register struct re_guts *g; -int c1; -int c2; -{ - register uch *col; - register int i; - register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT; - register unsigned uc1 = (unsigned char)c1; - register unsigned uc2 = (unsigned char)c2; - - for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize) - if (col[uc1] != col[uc2]) - return(0); - return(1); -} - -/* - - categorize - sort out character categories - == static void categorize(struct parse *p, register struct re_guts *g); - */ -static void -categorize(p, g) -struct parse *p; -register struct re_guts *g; -{ - register cat_t *cats = g->categories; - register int c; - register int c2; - register cat_t cat; - - /* avoid making error situations worse */ - if (p->error != 0) - return; - - for (c = CHAR_MIN; c <= CHAR_MAX; c++) - if (cats[c] == 0 && isinsets(g, c)) { - cat = g->ncategories++; - cats[c] = cat; - for (c2 = c+1; c2 <= CHAR_MAX; c2++) - if (cats[c2] == 0 && samesets(g, c, c2)) - cats[c2] = cat; - } -} - -/* - - dupl - emit a duplicate of a bunch of sops - == static sopno dupl(register struct parse *p, sopno start, sopno finish); - */ -static sopno /* start of duplicate */ -dupl(p, start, finish) -register struct parse *p; -sopno start; /* from here */ -sopno finish; /* to this less one */ -{ - register sopno ret = HERE(); - register sopno len = finish - start; - - assert(finish >= start); - if (len == 0) - return(ret); - enlarge(p, p->ssize + len); /* this many unexpected additions */ - assert(p->ssize >= p->slen + len); - (void) memcpy((char *)(p->strip + p->slen), - (char *)(p->strip + start), (size_t)len*sizeof(sop)); - p->slen += len; - return(ret); -} - -/* - - doemit - emit a strip operator - == static void doemit(register struct parse *p, sop op, size_t opnd); - * - * It might seem better to implement this as a macro with a function as - * hard-case backup, but it's just too big and messy unless there are - * some changes to the data structures. Maybe later. - */ -static void -doemit(p, op, opnd) -register struct parse *p; -sop op; -size_t opnd; -{ - /* avoid making error situations worse */ - if (p->error != 0) - return; - - /* deal with oversize operands ("can't happen", more or less) */ - assert(opnd < 1<slen >= p->ssize) - enlarge(p, (p->ssize+1) / 2 * 3); /* +50% */ - assert(p->slen < p->ssize); - - /* finally, it's all reduced to the easy case */ - p->strip[p->slen++] = SOP(op, opnd); -} - -/* - - doinsert - insert a sop into the strip - == static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos); - */ -static void -doinsert(p, op, opnd, pos) -register struct parse *p; -sop op; -size_t opnd; -sopno pos; -{ - register sopno sn; - register sop s; - register int i; - - /* avoid making error situations worse */ - if (p->error != 0) - return; - - sn = HERE(); - EMIT(op, opnd); /* do checks, ensure space */ - assert(HERE() == sn+1); - s = p->strip[sn]; - - /* adjust paren pointers */ - assert(pos > 0); - for (i = 1; i < NPAREN; i++) { - if (p->pbegin[i] >= pos) { - p->pbegin[i]++; - } - if (p->pend[i] >= pos) { - p->pend[i]++; - } - } - { - int length=(HERE()-pos-1)*sizeof(sop); - bmove_upp((uchar *) &p->strip[pos+1]+length, - (uchar *) &p->strip[pos]+length, - length); - } -#ifdef OLD_CODE - memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos], - (HERE()-pos-1)*sizeof(sop)); -#endif - p->strip[pos] = s; -} - -/* - - dofwd - complete a forward reference - == static void dofwd(register struct parse *p, sopno pos, sop value); - */ -static void -dofwd(p, pos, value) -register struct parse *p; -register sopno pos; -sop value; -{ - /* avoid making error situations worse */ - if (p->error != 0) - return; - - assert(value < 1<strip[pos] = OP(p->strip[pos]) | value; -} - -/* - - enlarge - enlarge the strip - == static void enlarge(register struct parse *p, sopno size); - */ -static void -enlarge(p, size) -register struct parse *p; -register sopno size; -{ - register sop *sp; - - if (p->ssize >= size) - return; - - sp = (sop *)realloc(p->strip, size*sizeof(sop)); - if (sp == NULL) { - SETERROR(REG_ESPACE); - return; - } - p->strip = sp; - p->ssize = size; -} - -/* - - stripsnug - compact the strip - == static void stripsnug(register struct parse *p, register struct re_guts *g); - */ -static void -stripsnug(p, g) -register struct parse *p; -register struct re_guts *g; -{ - g->nstates = p->slen; - g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop)); - if (g->strip == NULL) { - SETERROR(REG_ESPACE); - g->strip = p->strip; - } -} - -/* - - findmust - fill in must and mlen with longest mandatory literal string - == static void findmust(register struct parse *p, register struct re_guts *g); - * - * This algorithm could do fancy things like analyzing the operands of | - * for common subsequences. Someday. This code is simple and finds most - * of the interesting cases. - * - * Note that must and mlen got initialized during setup. - */ -static void -findmust(p, g) -struct parse *p; -register struct re_guts *g; -{ - register sop *scan; - sop *start; - register sop *newstart; - register sopno newlen; - register sop s; - register char *cp; - register sopno i; - LINT_INIT(start); LINT_INIT(newstart); - /* avoid making error situations worse */ - if (p->error != 0) - return; - - /* find the longest OCHAR sequence in strip */ - newlen = 0; - scan = g->strip + 1; - do { - s = *scan++; - switch (OP(s)) { - case OCHAR: /* sequence member */ - if (newlen == 0) /* new sequence */ - newstart = scan - 1; - newlen++; - break; - case OPLUS_: /* things that don't break one */ - case OLPAREN: - case ORPAREN: - break; - case OQUEST_: /* things that must be skipped */ - case OCH_: - scan--; - do { - scan += OPND(s); - s = *scan; - /* assert() interferes w debug printouts */ - if (OP(s) != O_QUEST && OP(s) != O_CH && - OP(s) != OOR2) { - g->iflags |= BAD; - return; - } - } while (OP(s) != O_QUEST && OP(s) != O_CH); - /* fallthrough */ - default: /* things that break a sequence */ - if (newlen > g->mlen) { /* ends one */ - start = newstart; - g->mlen = newlen; - } - newlen = 0; - break; - } - } while (OP(s) != OEND); - - if (g->mlen == 0) /* there isn't one */ - return; - - /* turn it into a character string */ - g->must = malloc((size_t)g->mlen + 1); - if (g->must == NULL) { /* argh; just forget it */ - g->mlen = 0; - return; - } - cp = g->must; - scan = start; - for (i = g->mlen; i > 0; i--) { - while (OP(s = *scan++) != OCHAR) - continue; - assert(cp < g->must + g->mlen); - *cp++ = (char)OPND(s); - } - assert(cp == g->must + g->mlen); - *cp++ = '\0'; /* just on general principles */ -} - -/* - - pluscount - count + nesting - == static sopno pluscount(register struct parse *p, register struct re_guts *g); - */ -static sopno /* nesting depth */ -pluscount(p, g) -struct parse *p; -register struct re_guts *g; -{ - register sop *scan; - register sop s; - register sopno plusnest = 0; - register sopno maxnest = 0; - - if (p->error != 0) - return(0); /* there may not be an OEND */ - - scan = g->strip + 1; - do { - s = *scan++; - switch (OP(s)) { - case OPLUS_: - plusnest++; - break; - case O_PLUS: - if (plusnest > maxnest) - maxnest = plusnest; - plusnest--; - break; - } - } while (OP(s) != OEND); - if (plusnest != 0) - g->iflags |= BAD; - return(maxnest); -} diff --git a/externals/mysql/extlib/regex/regerror.c b/externals/mysql/extlib/regex/regerror.c deleted file mode 100644 index 489f2e35ab..0000000000 --- a/externals/mysql/extlib/regex/regerror.c +++ /dev/null @@ -1,116 +0,0 @@ -#include -#include -#include - -#include "my_regex.h" -#include "utils.h" -#include "regerror.ih" - -/* - = #define REG_NOMATCH 1 - = #define REG_BADPAT 2 - = #define REG_ECOLLATE 3 - = #define REG_ECTYPE 4 - = #define REG_EESCAPE 5 - = #define REG_ESUBREG 6 - = #define REG_EBRACK 7 - = #define REG_EPAREN 8 - = #define REG_EBRACE 9 - = #define REG_BADBR 10 - = #define REG_ERANGE 11 - = #define REG_ESPACE 12 - = #define REG_BADRPT 13 - = #define REG_EMPTY 14 - = #define REG_ASSERT 15 - = #define REG_INVARG 16 - = #define REG_ATOI 255 // convert name to number (!) - = #define REG_ITOA 0400 // convert number to name (!) - */ -static struct rerr { - int code; - const char *name; - const char *explain; -} rerrs[] = { - {REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match"}, - {REG_BADPAT, "REG_BADPAT", "invalid regular expression"}, - {REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element"}, - {REG_ECTYPE, "REG_ECTYPE", "invalid character class"}, - {REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)"}, - {REG_ESUBREG, "REG_ESUBREG", "invalid backreference number"}, - {REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced"}, - {REG_EPAREN, "REG_EPAREN", "parentheses not balanced"}, - {REG_EBRACE, "REG_EBRACE", "braces not balanced"}, - {REG_BADBR, "REG_BADBR", "invalid repetition count(s)"}, - {REG_ERANGE, "REG_ERANGE", "invalid character range"}, - {REG_ESPACE, "REG_ESPACE", "out of memory"}, - {REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid"}, - {REG_EMPTY, "REG_EMPTY", "empty (sub)expression"}, - {REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug"}, - {REG_INVARG, "REG_INVARG", "invalid argument to regex routine"}, - {0, "", "*** unknown regexp error code ***"}, -}; - -/* - - regerror - the interface to error numbers - = extern size_t regerror(int, const regex_t *, char *, size_t); - */ -/* ARGSUSED */ -size_t -my_regerror(int errcode, const my_regex_t *preg, char *errbuf, size_t errbuf_size) -{ - register struct rerr *r; - register size_t len; - register int target = errcode &~ REG_ITOA; - register char *s; - char convbuf[50]; - - if (errcode == REG_ATOI) - s = regatoi(preg, convbuf); - else { - for (r = rerrs; r->code != 0; r++) - if (r->code == target) - break; - - if (errcode®_ITOA) { - if (r->code != 0) - (void) strcpy(convbuf, r->name); - else - sprintf(convbuf, "REG_0x%x", target); - assert(strlen(convbuf) < sizeof(convbuf)); - s = convbuf; - } else - s = (char*) r->explain; - } - - len = strlen(s) + 1; - if (errbuf_size > 0) { - if (errbuf_size > len) - (void) strcpy(errbuf, s); - else { - (void) strncpy(errbuf, s, errbuf_size-1); - errbuf[errbuf_size-1] = '\0'; - } - } - - return(len); -} - -/* - - regatoi - internal routine to implement REG_ATOI - == static char *regatoi(const regex_t *preg, char *localbuf); - */ -static char * -regatoi(preg, localbuf) -const my_regex_t *preg; -char *localbuf; -{ - register struct rerr *r; - for (r = rerrs; r->code != 0; r++) - if (strcmp(r->name, preg->re_endp) == 0) - break; - if (r->code == 0) - return((char*) "0"); - - sprintf(localbuf, "%d", r->code); - return(localbuf); -} diff --git a/externals/mysql/extlib/regex/regex2.h b/externals/mysql/extlib/regex/regex2.h deleted file mode 100644 index bba54ea205..0000000000 --- a/externals/mysql/extlib/regex/regex2.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * First, the stuff that ends up in the outside-world include file - = typedef off_t regoff_t; - = typedef struct { - = int re_magic; - = size_t re_nsub; // number of parenthesized subexpressions - = const char *re_endp; // end pointer for REG_PEND - = struct re_guts *re_g; // none of your business :-) - = } regex_t; - = typedef struct { - = regoff_t rm_so; // start of match - = regoff_t rm_eo; // end of match - = } regmatch_t; - */ -/* - * internals of regex_t - */ -#ifndef __regex2_h__ -#define __regex2_h__ - -#define MAGIC1 ((('r'^0200)<<8) | 'e') - -/* - * The internal representation is a *strip*, a sequence of - * operators ending with an endmarker. (Some terminology etc. is a - * historical relic of earlier versions which used multiple strips.) - * Certain oddities in the representation are there to permit running - * the machinery backwards; in particular, any deviation from sequential - * flow must be marked at both its source and its destination. Some - * fine points: - * - * - OPLUS_ and O_PLUS are *inside* the loop they create. - * - OQUEST_ and O_QUEST are *outside* the bypass they create. - * - OCH_ and O_CH are *outside* the multi-way branch they create, while - * OOR1 and OOR2 are respectively the end and the beginning of one of - * the branches. Note that there is an implicit OOR2 following OCH_ - * and an implicit OOR1 preceding O_CH. - * - * In state representations, an operator's bit is on to signify a state - * immediately *preceding* "execution" of that operator. - */ -typedef unsigned long sop; /* strip operator */ -typedef long sopno; -#define OPRMASK 0xf8000000 -#define OPDMASK 0x07ffffff -#define OPSHIFT ((unsigned long)27) -#define OP(n) ((unsigned long) ((n)&OPRMASK)) -#define OPND(n) ((unsigned long) ((n)&OPDMASK)) -#define SOP(op, opnd) (unsigned long) ((op)|(opnd)) -#define OSHIFT(A) ((unsigned long) (A) << OPSHIFT) -/* operators meaning operand */ -/* (back, fwd are offsets) */ -#define OEND OSHIFT(1) /* endmarker - */ -#define OCHAR OSHIFT(2) /* character unsigned char */ -#define OBOL OSHIFT(3) /* left anchor - */ -#define OEOL OSHIFT(4) /* right anchor - */ -#define OANY OSHIFT(5) /* . - */ -#define OANYOF OSHIFT(6) /* [...] set number */ -#define OBACK_ OSHIFT(7) /* begin \d paren number */ -#define O_BACK OSHIFT(8) /* end \d paren number */ -#define OPLUS_ OSHIFT(9) /* + prefix fwd to suffix */ -#define O_PLUS OSHIFT(10) /* + suffix back to prefix */ -#define OQUEST_ OSHIFT(11) /* ? prefix fwd to suffix */ -#define O_QUEST OSHIFT(12) /* ? suffix back to prefix */ -#define OLPAREN OSHIFT(13) /* ( fwd to ) */ -#define ORPAREN OSHIFT(14) /* ) back to ( */ -#define OCH_ OSHIFT(15) /* begin choice fwd to OOR2 */ -#define OOR1 OSHIFT(16) /* | pt. 1 back to OOR1 or OCH_ */ -#define OOR2 OSHIFT(17) /* | pt. 2 fwd to OOR2 or O_CH */ -#define O_CH OSHIFT(18) /* end choice back to OOR1 */ -#define OBOW OSHIFT(19) /* begin word - */ -#define OEOW OSHIFT(20) /* end word - */ - -/* - * Structure for [] character-set representation. Character sets are - * done as bit vectors, grouped 8 to a byte vector for compactness. - * The individual set therefore has both a pointer to the byte vector - * and a mask to pick out the relevant bit of each byte. A hash code - * simplifies testing whether two sets could be identical. - * - * This will get trickier for multicharacter collating elements. As - * preliminary hooks for dealing with such things, we also carry along - * a string of multi-character elements, and decide the size of the - * vectors at run time. - */ -#ifdef __WIN__ -typedef unsigned char uch ; -#endif - -typedef struct { - uch *ptr; /* -> uch [csetsize] */ - uch mask; /* bit within array */ - uch hash; /* hash code */ - size_t smultis; - char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */ -} cset; -/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */ -#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (uch) (c)) -#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (uch)(c)) -#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask) -#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal fns */ -#define MCsub(p, cs, cp) mcsub(p, cs, cp) -#define MCin(p, cs, cp) mcin(p, cs, cp) - -/* stuff for character categories */ -typedef unsigned char cat_t; - -/* - * main compiled-expression structure - */ -struct re_guts { - int magic; -# define MAGIC2 ((('R'^0200)<<8)|'E') - sop *strip; /* malloced area for strip */ - int csetsize; /* number of bits in a cset vector */ - int ncsets; /* number of csets in use */ - cset *sets; /* -> cset [ncsets] */ - uch *setbits; /* -> uch[csetsize][ncsets/CHAR_BIT] */ - int cflags; /* copy of regcomp() cflags argument */ - sopno nstates; /* = number of sops */ - sopno firststate; /* the initial OEND (normally 0) */ - sopno laststate; /* the final OEND */ - int iflags; /* internal flags */ -# define USEBOL 01 /* used ^ */ -# define USEEOL 02 /* used $ */ -# define BAD 04 /* something wrong */ - int nbol; /* number of ^ used */ - int neol; /* number of $ used */ - int ncategories; /* how many character categories */ - cat_t *categories; /* ->catspace[-CHAR_MIN] */ - char *must; /* match must contain this string */ - int mlen; /* length of must */ - size_t nsub; /* copy of re_nsub */ - int backrefs; /* does it use back references? */ - sopno nplus; /* how deep does it nest +s? */ - /* catspace must be last */ - cat_t catspace[1]; /* actually [NC] */ -}; - -/* misc utilities */ -#undef OUT /* May be defined in windows */ -#define OUT (CHAR_MAX+1) /* a non-character value */ -#define ISWORD(s,c) (my_isalnum(s,c) || (c) == '_') - -#endif /* __regex2_h__ */ diff --git a/externals/mysql/extlib/regex/regexec.c b/externals/mysql/extlib/regex/regexec.c deleted file mode 100644 index 338c1bfa7f..0000000000 --- a/externals/mysql/extlib/regex/regexec.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * the outer shell of regexec() - * - * This file includes engine.c *twice*, after muchos fiddling with the - * macros that code uses. This lets the same code operate on two different - * representations for state sets. - */ -#include -#include -#include -#ifdef __WIN__ -#include -#endif -#include "my_regex.h" -#include "utils.h" -#include "regex2.h" - -/* for use in asserts */ -#define nope 0 - -/* macros for manipulating states, small version */ -#define states long -#define states1 long /* for later use in regexec() decision. Ensure Win64 definition is correct.*/ -#define CLEAR(v) ((v) = 0) -#define SET0(v, n) ((v) &= ~((states) 1 << (n))) -#define SET1(v, n) ((v) |= (states) 1 << (n)) -#define ISSET(v, n) ((v) & ((states) 1 << (n))) -#define ASSIGN(d, s) ((d) = (s)) -#define EQ(a, b) ((a) == (b)) -#define STATEVARS int dummy /* dummy version */ -#define STATESETUP(m, n) /* nothing */ -#define STATETEARDOWN(m) /* nothing */ -#define SETUP(v) ((v) = 0) -#define onestate long /* Changed from int by Monty */ -#define INIT(o, n) ((o) = (unsigned states)1 << (n)) -#define INC(o) ((o) <<= 1) -#define ISSTATEIN(v, o) ((v) & (o)) -/* some abbreviations; note that some of these know variable names! */ -/* do "if I'm here, I can also be there" etc without branches */ -#define FWD(dst, src, n) ((dst) |= ((unsigned states)(src)&(here)) << (n)) -#define BACK(dst, src, n) ((dst) |= ((unsigned states)(src)&(here)) >> (n)) -#define ISSETBACK(v, n) ((v) & ((unsigned states)here >> (n))) -/* function names */ -#define SNAMES /* engine.c looks after details */ - -#include "engine.c" - -/* now undo things */ -#undef states -#undef CLEAR -#undef SET0 -#undef SET1 -#undef ISSET -#undef ASSIGN -#undef EQ -#undef STATEVARS -#undef STATESETUP -#undef STATETEARDOWN -#undef SETUP -#undef onestate -#undef INIT -#undef INC -#undef ISSTATEIN -#undef FWD -#undef BACK -#undef ISSETBACK -#undef SNAMES - -/* macros for manipulating states, large version */ -#define states char * -#define CLEAR(v) memset(v, 0, m->g->nstates) -#define SET0(v, n) ((v)[n] = 0) -#define SET1(v, n) ((v)[n] = 1) -#define ISSET(v, n) ((v)[n]) -#define ASSIGN(d, s) memcpy(d, s, m->g->nstates) -#define EQ(a, b) (memcmp(a, b, m->g->nstates) == 0) -#define STATEVARS int vn; char *space -#define STATESETUP(m, nv) { (m)->space = malloc((nv)*(m)->g->nstates); \ - if ((m)->space == NULL) return(REG_ESPACE); \ - (m)->vn = 0; } -#define STATETEARDOWN(m) { free((m)->space); } -#define SETUP(v) ((v) = &m->space[m->vn++ * m->g->nstates]) -#define onestate int -#define INIT(o, n) ((o) = (n)) -#define INC(o) ((o)++) -#define ISSTATEIN(v, o) ((v)[o]) -/* some abbreviations; note that some of these know variable names! */ -/* do "if I'm here, I can also be there" etc without branches */ -#define FWD(dst, src, n) ((dst)[here+(n)] |= (src)[here]) -#define BACK(dst, src, n) ((dst)[here-(n)] |= (src)[here]) -#define ISSETBACK(v, n) ((v)[here - (n)]) -/* function names */ -#define LNAMES /* flag */ - -#include "engine.c" - -/* - - regexec - interface for matching - = extern int regexec(const regex_t *, const char *, size_t, \ - = regmatch_t [], int); - = #define REG_NOTBOL 00001 - = #define REG_NOTEOL 00002 - = #define REG_STARTEND 00004 - = #define REG_TRACE 00400 // tracing of execution - = #define REG_LARGE 01000 // force large representation - = #define REG_BACKR 02000 // force use of backref code - * - * We put this here so we can exploit knowledge of the state representation - * when choosing which matcher to call. Also, by this point the matchers - * have been prototyped. - */ -int /* 0 success, REG_NOMATCH failure */ -my_regexec(preg, str, nmatch, pmatch, eflags) -const my_regex_t *preg; -const char *str; -size_t nmatch; -my_regmatch_t pmatch[]; -int eflags; -{ - register struct re_guts *g = preg->re_g; -#ifdef REDEBUG -# define GOODFLAGS(f) (f) -#else -# define GOODFLAGS(f) ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND)) -#endif - - if (preg->re_magic != MAGIC1 || g->magic != MAGIC2) - return(REG_BADPAT); - assert(!(g->iflags&BAD)); - if (g->iflags&BAD) /* backstop for no-debug case */ - return(REG_BADPAT); - eflags = GOODFLAGS(eflags); - - if ((size_t) g->nstates <= CHAR_BIT*sizeof(states1) && - !(eflags®_LARGE)) - return(smatcher(preg->charset, g, (char *)str, nmatch, pmatch, eflags)); - else - return(lmatcher(preg->charset, g, (char *)str, nmatch, pmatch, eflags)); -} diff --git a/externals/mysql/extlib/regex/regexp.c b/externals/mysql/extlib/regex/regexp.c deleted file mode 100644 index 8ddf90f294..0000000000 --- a/externals/mysql/extlib/regex/regexp.c +++ /dev/null @@ -1,1348 +0,0 @@ -/* - * - * regexp.c - regular expression matching - * - * DESCRIPTION - * - * Underneath the reformatting and comment blocks which were added to - * make it consistent with the rest of the code, you will find a - * modified version of Henry Specer's regular expression library. - * Henry's functions were modified to provide the minimal regular - * expression matching, as required by P1003. Henry's code was - * copyrighted, and copy of the copyright message and restrictions - * are provided, verbatim, below: - * - * Copyright (c) 1986 by University of Toronto. - * Written by Henry Spencer. Not derived from licensed software. - * - * Permission is granted to anyone to use this software for any - * purpose on any computer system, and to redistribute it freely, - * subject to the following restrictions: - * - * 1. The author is not responsible for the consequences of use of - * this software, no matter how awful, even if they arise - * from defects in it. - * - * 2. The origin of this software must not be misrepresented, either - * by explicit claim or by omission. - * - * 3. Altered versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * - * - * This version modified by Ian Phillipps to return pointer to terminating - * NUL on substitution string. [ Temp mail address ex-igp@camcon.co.uk ] - * - * Altered by amylaar to support excompatible option and the - * operators \< and >\ . ( 7.Sep. 1991 ) - * - * regsub altered by amylaar to take an additional parameter specifying - * maximum number of bytes that can be written to the memory region - * pointed to by dest - * - * Also altered by Fredrik Hubinette to handle the + operator and - * eight-bit chars. Mars 22 1996 - * - * - * Beware that some of this code is subtly aware of the way operator - * precedence is structured in regular expressions. Serious changes in - * regular-expression syntax might require a total rethink. - * - * AUTHORS - * - * Mark H. Colburn, NAPS International (mark@jhereg.mn.org) - * Henry Spencer, University of Torronto (henry@utzoo.edu) - * - * Sponsored by The USENIX Association for public distribution. - * - */ - -/* Headers */ -#include "my_global.h" -#include -#include "regexp.h" -#ifdef __WIN__ -#include -#else -#include "memory.h" -#include "error.h" -#endif - -/* - * The "internal use only" fields in regexp.h are present to pass info from - * compile to execute that permits the execute phase to run lots faster on - * simple cases. They are: - * - * regstart char that must begin a match; '\0' if none obvious - * reganch is the match anchored (at beginning-of-line only)? - * regmust string (pointer into program) that match must include, or NULL - * regmlen length of regmust string - * - * Regstart and reganch permit very fast decisions on suitable starting points - * for a match, cutting down the work a lot. Regmust permits fast rejection - * of lines that cannot possibly match. The regmust tests are costly enough - * that regcomp() supplies a regmust only if the r.e. contains something - * potentially expensive (at present, the only such thing detected is * or + - * at the start of the r.e., which can involve a lot of backup). Regmlen is - * supplied because the test in regexec() needs it and regcomp() is computing - * it anyway. - */ - -/* - * Structure for regexp "program". This is essentially a linear encoding - * of a nondeterministic finite-state machine (aka syntax charts or - * "railroad normal form" in parsing technology). Each node is an opcode - * plus a "nxt" pointer, possibly plus an operand. "Nxt" pointers of - * all nodes except BRANCH implement concatenation; a "nxt" pointer with - * a BRANCH on both ends of it is connecting two alternatives. (Here we - * have one of the subtle syntax dependencies: an individual BRANCH (as - * opposed to a collection of them) is never concatenated with anything - * because of operator precedence.) The operand of some types of node is - * a literal string; for others, it is a node leading into a sub-FSM. In - * particular, the operand of a BRANCH node is the first node of the branch. - * (NB this is *not* a tree structure: the tail of the branch connects - * to the thing following the set of BRANCHes.) The opcodes are: - */ - -/* definition number opnd? meaning */ -#define END 0 /* no End of program. */ -#define BOL 1 /* no Match "" at beginning of line. */ -#define EOL 2 /* no Match "" at end of line. */ -#define ANY 3 /* no Match any one character. */ -#define ANYOF 4 /* str Match any character in this string. */ -#define ANYBUT 5 /* str Match any character not in this - * string. */ -#define BRANCH 6 /* node Match this alternative, or the - * nxt... */ -#define BACK 7 /* no Match "", "nxt" ptr points backward. */ -#define EXACTLY 8 /* str Match this string. */ -#define NOTHING 9 /* no Match empty string. */ -#define STAR 10 /* node Match this (simple) thing 0 or more - * times. */ -#define WORDSTART 11 /* node matching a start of a word */ -#define WORDEND 12 /* node matching an end of a word */ -#define OPEN 20 /* no Mark this point in input as start of - * #n. */ - /* OPEN+1 is number 1, etc. */ -#define CLOSE 30 /* no Analogous to OPEN. */ - -/* - * Opcode notes: - * - * BRANCH The set of branches constituting a single choice are hooked - * together with their "nxt" pointers, since precedence prevents - * anything being concatenated to any individual branch. The - * "nxt" pointer of the last BRANCH in a choice points to the - * thing following the whole choice. This is also where the - * final "nxt" pointer of each individual branch points; each - * branch starts with the operand node of a BRANCH node. - * - * BACK Normal "nxt" pointers all implicitly point forward; BACK - * exists to make loop structures possible. - * - * STAR complex '*', are implemented as circular BRANCH structures - * using BACK. Simple cases (one character per match) are - * implemented with STAR for speed and to minimize recursive - * plunges. - * - * OPEN,CLOSE ...are numbered at compile time. - */ - -/* - * A node is one char of opcode followed by two chars of "nxt" pointer. - * "Nxt" pointers are stored as two 8-bit pieces, high order first. The - * value is a positive offset from the opcode of the node containing it. - * An operand, if any, simply follows the node. (Note that much of the - * code generation knows about this implicit relationship.) - * - * Using two bytes for the "nxt" pointer is vast overkill for most things, - * but allows patterns to get big without disasters. - */ -#define OP(p) (*(p)) -#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377)) -#define OPERAND(p) ((p) + 3) - -/* - * The first byte of the regexp internal "program" is actually this magic - * number; the start node begins in the second byte. - */ -#define MAGIC 0234 - -/* - * Utility definitions. - */ - -#ifdef __WIN__ -#define error(X,Y) fprintf(stderr, X, Y) -#endif -#define regerror(X) error("Regexp: %s\n",X); -#define SPECIAL 0x100 -#define LBRAC ('('|SPECIAL) -#define RBRAC (')'|SPECIAL) -#define ASTERIX ('*'|SPECIAL) -#define PLUS ('+'|SPECIAL) -#define OR_OP ('|'|SPECIAL) -#define DOLLAR ('$'|SPECIAL) -#define DOT ('.'|SPECIAL) -#define CARET ('^'|SPECIAL) -#define LSQBRAC ('['|SPECIAL) -#define RSQBRAC (']'|SPECIAL) -#define LSHBRAC ('<'|SPECIAL) -#define RSHBRAC ('>'|SPECIAL) -#define FAIL(m) { regerror(m); return(NULL); } -#define ISMULT(c) ((c) == ASTERIX || (c)==PLUS) -#define META "^$.[()|*+\\" -#ifndef CHARBITS -#define CHARBITS 0xff -#define UCHARAT(p) ((int)*(unsigned char *)(p)) -#else -#define UCHARAT(p) ((int)*(p)&CHARBITS) -#endif -#define ISWORDPART(c) ( isalnum(c) || (c) == '_' ) - -/* - * Flags to be passed up and down. - */ -#define HASWIDTH 01 /* Known never to match null string. */ -#define SIMPLE 02 /* Simple enough to be STAR operand. */ -#define SPSTART 04 /* Starts with * */ -#define WORST 0 /* Worst case. */ -#ifdef __WIN__ -#define STRCHR(A,B) strchr(A,B) -#endif - -/* - * Global work variables for regcomp(). - */ -static short *regparse; /* Input-scan pointer. */ -static int regnpar; /* () count. */ -static char regdummy; -static char *regcode; /* Code-emit pointer; ®dummy = don't. */ -static long regsize; /* Code size. */ - -/* - * Forward declarations for regcomp()'s friends. - */ -#ifndef STATIC -#define STATIC static -#endif -STATIC char *reg(); -STATIC char *regbranch(); -STATIC char *regpiece(); -STATIC char *regatom(); -STATIC char *regnode(); -STATIC char *regnext(); -STATIC void regc(); -STATIC void reginsert(); -STATIC void regtail(); -STATIC void regoptail(); - -/* - - regcomp - compile a regular expression into internal code - * - * We can't allocate space until we know how big the compiled form will be, - * but we can't compile it (and thus know how big it is) until we've got a - * place to put the code. So we cheat: we compile it twice, once with code - * generation turned off and size counting turned on, and once "for real". - * This also means that we don't allocate space until we are sure that the - * thing really will compile successfully, and we never have to move the - * code and thus invalidate pointers into it. (Note that it has to be in - * one piece because free() must be able to free it all.) - * - * Beware that the optimization-preparation code in here knows about some - * of the structure of the compiled regexp. - */ -regexp *regcomp(exp,excompat) -char *exp; -int excompat; /* \( \) operators like in unix ex */ -{ - register regexp *r; - register char *scan; - register char *longest; - register int len; - int flags; - short *exp2,*dest,c; - - if (exp == (char *)NULL) - FAIL("NULL argument"); - - exp2=(short*)malloc( (strlen(exp)+1) * (sizeof(short[8])/sizeof(char[8])) ); - for ( scan=exp,dest=exp2;( c= UCHARAT(scan++)); ) { - switch (c) { - case '(': - case ')': - *dest++ = excompat ? c : c | SPECIAL; - break; - case '.': - case '*': - case '+': - case '|': - case '$': - case '^': - case '[': - case ']': - *dest++ = c | SPECIAL; - break; - case '\\': - switch ( c = *scan++ ) { - case '(': - case ')': - *dest++ = excompat ? c | SPECIAL : c; - break; - case '<': - case '>': - *dest++ = c | SPECIAL; - break; - case '{': - case '}': - FAIL("sorry, unimplemented operator"); - case 'b': *dest++ = '\b'; break; - case 't': *dest++ = '\t'; break; - case 'r': *dest++ = '\r'; break; - default: - *dest++ = c; - } - break; - default: - *dest++ = c; - } - } - *dest=0; - /* First pass: determine size, legality. */ - regparse = exp2; - regnpar = 1; - regsize = 0L; - regcode = ®dummy; - regc(MAGIC); - if (reg(0, &flags) == (char *)NULL) - return ((regexp *)NULL); - - /* Small enough for pointer-storage convention? */ - if (regsize >= 32767L) /* Probably could be 65535L. */ - FAIL("regexp too big"); - - /* Allocate space. */ - r = (regexp *) malloc(sizeof(regexp) + (unsigned) regsize); - if (r == (regexp *) NULL) - FAIL("out of space"); - (void) bzero(r, sizeof(regexp) + (unsigned)regsize); - - /* Second pass: emit code. */ - regparse = exp2; - regnpar = 1; - regcode = r->program; - regc(MAGIC); - if (reg(0, &flags) == NULL) - return ((regexp *) NULL); - - /* Dig out information for optimizations. */ - r->regstart = '\0'; /* Worst-case defaults. */ - r->reganch = 0; - r->regmust = NULL; - r->regmlen = 0; - scan = r->program + 1; /* First BRANCH. */ - if (OP(regnext(scan)) == END) { /* Only one top-level choice. */ - scan = OPERAND(scan); - - /* Starting-point info. */ - if (OP(scan) == EXACTLY) - r->regstart = *OPERAND(scan); - else if (OP(scan) == BOL) - r->reganch++; - - /* - * If there's something expensive in the r.e., find the longest - * literal string that must appear and make it the regmust. Resolve - * ties in favor of later strings, since the regstart check works - * with the beginning of the r.e. and avoiding duplication - * strengthens checking. Not a strong reason, but sufficient in the - * absence of others. - */ - if (flags & SPSTART) { - longest = NULL; - len = 0; - for (; scan != NULL; scan = regnext(scan)) - if (OP(scan) == EXACTLY && - (int)strlen(OPERAND(scan)) >= len) { - longest = OPERAND(scan); - len = strlen(OPERAND(scan)); - } - r->regmust = longest; - r->regmlen = len; - } - } - free((char*)exp2); - return (r); -} - -/* - - reg - regular expression, i.e. main body or parenthesized thing - * - * Caller must absorb opening parenthesis. - * - * Combining parenthesis handling with the base level of regular expression - * is a trifle forced, but the need to tie the tails of the branches to what - * follows makes it hard to avoid. - */ -static char *reg(paren, flagp) -int paren; /* Parenthesized? */ -int *flagp; -{ - register char *ret; - register char *br; - register char *ender; - register int parno=0; /* make gcc happy */ - int flags; - - *flagp = HASWIDTH; /* Tentatively. */ - - /* Make an OPEN node, if parenthesized. */ - if (paren) { - if (regnpar >= NSUBEXP) - FAIL("too many ()"); - parno = regnpar; - regnpar++; - ret = regnode(OPEN + parno); - } else - ret = (char *)NULL; - - /* Pick up the branches, linking them together. */ - br = regbranch(&flags); - if (br == (char *)NULL) - return ((char *)NULL); - if (ret != (char *)NULL) - regtail(ret, br); /* OPEN -> first. */ - else - ret = br; - if (!(flags & HASWIDTH)) - *flagp &= ~HASWIDTH; - *flagp |= flags & SPSTART; - while (*regparse == OR_OP) { - regparse++; - br = regbranch(&flags); - if (br == (char *)NULL) - return ((char *)NULL); - regtail(ret, br); /* BRANCH -> BRANCH. */ - if (!(flags & HASWIDTH)) - *flagp &= ~HASWIDTH; - *flagp |= flags & SPSTART; - } - - /* Make a closing node, and hook it on the end. */ - ender = regnode((paren) ? CLOSE + parno : END); - regtail(ret, ender); - - /* Hook the tails of the branches to the closing node. */ - for (br = ret; br != (char *)NULL; br = regnext(br)) - regoptail(br, ender); - - /* Check for proper termination. */ - if (paren && *regparse++ != RBRAC) { - FAIL("unmatched ()"); - } else if (!paren && *regparse != '\0') { - if (*regparse == RBRAC) { - FAIL("unmatched ()"); - } else - FAIL("junk on end");/* "Can't happen". */ - /* NOTREACHED */ - } - return (ret); -} - -/* - - regbranch - one alternative of an | operator - * - * Implements the concatenation operator. - */ -static char *regbranch(flagp) -int *flagp; -{ - register char *ret; - register char *chain; - register char *latest; - int flags; - - *flagp = WORST; /* Tentatively. */ - - ret = regnode(BRANCH); - chain = (char *)NULL; - while (*regparse != '\0' && *regparse != OR_OP && *regparse != RBRAC) { - latest = regpiece(&flags); - if (latest == (char *)NULL) - return ((char *)NULL); - *flagp |= flags & HASWIDTH; - if (chain == (char *)NULL) /* First piece. */ - *flagp |= flags & SPSTART; - else - regtail(chain, latest); - chain = latest; - } - if (chain == (char *)NULL) /* Loop ran zero times. */ - regnode(NOTHING); - - return (ret); -} - -/* - - regpiece - something followed by possible [*] - * - * Note that the branching code sequence used for * is somewhat optimized: - * they use the same NOTHING node as both the endmarker for their branch - * list and the body of the last branch. It might seem that this node could - * be dispensed with entirely, but the endmarker role is not redundant. - */ -static char *regpiece(flagp) -int *flagp; -{ - register char *ret; - register short op; - /* register char *nxt; */ - int flags; - - ret = regatom(&flags); - if (ret == (char *)NULL) - return ((char *)NULL); - - op = *regparse; - if (!ISMULT(op)) { - *flagp = flags; - return (ret); - } - if (!(flags & HASWIDTH)) - FAIL("* or + operand could be empty"); - *flagp = (WORST | SPSTART); - - if(op == ASTERIX) - { - if (flags & SIMPLE) - { - reginsert(STAR, ret); - } - else - { - /* Emit x* as (x&|), where & means "self". */ - reginsert(BRANCH, ret); /* Either x */ - regoptail(ret, regnode(BACK)); /* and loop */ - regoptail(ret, ret); /* back */ - regtail(ret, regnode(BRANCH)); /* or */ - regtail(ret, regnode(NOTHING)); /* null. */ - } - } - else if(op == PLUS) - { - /* Emit a+ as (a&) where & means "self" /Fredrik Hubinette */ - char *tmp; - tmp=regnode(BACK); - reginsert(BRANCH, tmp); - regtail(ret, tmp); - regoptail(tmp, ret); - regtail(ret, regnode(BRANCH)); - regtail(ret, regnode(NOTHING)); - } - - regparse++; - if (ISMULT(*regparse)) - FAIL("nested * or +"); - - return (ret); -} - - -/* - - regatom - the lowest level - * - * Optimization: gobbles an entire sequence of ordinary characters so that - * it can turn them into a single node, which is smaller to store and - * faster to run. - */ -static char *regatom(flagp) -int *flagp; -{ - register char *ret; - int flags; - - *flagp = WORST; /* Tentatively. */ - - switch (*regparse++) { - case CARET: - ret = regnode(BOL); - break; - case DOLLAR: - ret = regnode(EOL); - break; - case DOT: - ret = regnode(ANY); - *flagp |= HASWIDTH | SIMPLE; - break; - case LSHBRAC: - ret = regnode(WORDSTART); - break; - case RSHBRAC: - ret = regnode(WORDEND); - break; - case LSQBRAC:{ - register int class; - register int classend; - - if (*regparse == CARET) { /* Complement of range. */ - ret = regnode(ANYBUT); - regparse++; - } else - ret = regnode(ANYOF); - if (*regparse == RSQBRAC || *regparse == '-') - regc(*regparse++); - while (*regparse != '\0' && *regparse != RSQBRAC) { - if (*regparse == '-') { - regparse++; - if (*regparse == RSQBRAC || *regparse == '\0') - regc('-'); - else { - class = (CHARBITS & *(regparse - 2)) + 1; - classend = (CHARBITS & *(regparse)); - if (class > classend + 1) - FAIL("invalid [] range"); - for (; class <= classend; class++) - regc(class); - regparse++; - } - } else - regc(*regparse++); - } - regc('\0'); - if (*regparse != RSQBRAC) - FAIL("unmatched []"); - regparse++; - *flagp |= HASWIDTH | SIMPLE; - } - break; - case LBRAC: - ret = reg(1, &flags); - if (ret == (char *)NULL) - return ((char *)NULL); - *flagp |= flags & (HASWIDTH | SPSTART); - break; - case '\0': - case OR_OP: - case RBRAC: - FAIL("internal urp"); /* Supposed to be caught earlier. */ - - case ASTERIX: - FAIL("* follows nothing\n"); - - default:{ - register int len; - register short ender; - - regparse--; - for (len=0; regparse[len] && - !(regparse[len]&SPECIAL) && regparse[len] != RSQBRAC; len++) ; - if (len <= 0) - { - FAIL("internal disaster"); - } - ender = *(regparse + len); - if (len > 1 && ISMULT(ender)) - len--; /* Back off clear of * operand. */ - *flagp |= HASWIDTH; - if (len == 1) - *flagp |= SIMPLE; - ret = regnode(EXACTLY); - while (len > 0) { - regc(*regparse++); - len--; - } - regc('\0'); - } - break; - } - - return (ret); -} - -/* - - regnode - emit a node - */ -static char *regnode(op) -char op; -{ - register char *ret; - register char *ptr; - - ret = regcode; - if (ret == ®dummy) { - regsize += 3; - return (ret); - } - ptr = ret; - *ptr++ = op; - *ptr++ = '\0'; /* Null "nxt" pointer. */ - *ptr++ = '\0'; - regcode = ptr; - - return (ret); -} - -/* - - regc - emit (if appropriate) a byte of code - */ -static void regc(b) -char b; -{ - if (regcode != ®dummy) - *regcode++ = b; - else - regsize++; -} - -/* - - reginsert - insert an operator in front of already-emitted operand - * - * Means relocating the operand. - */ -static void reginsert(op, opnd) -char op; -char *opnd; -{ - register char *src; - register char *dst; - register char *place; - - if (regcode == ®dummy) { - regsize += 3; - return; - } - src = regcode; - regcode += 3; - dst = regcode; - while (src > opnd) - *--dst = *--src; - - place = opnd; /* Op node, where operand used to be. */ - *place++ = op; - *place++ = '\0'; - *place++ = '\0'; -} - -/* - - regtail - set the next-pointer at the end of a node chain - */ -static void regtail(p, val) -char *p; -char *val; -{ - register char *scan; - register char *temp; - register int offset; - - if (p == ®dummy) - return; - - /* Find last node. */ - scan = p; - for (;;) { - temp = regnext(scan); - if (temp == (char *)NULL) - break; - scan = temp; - } - - if (OP(scan) == BACK) - offset = scan - val; - else - offset = val - scan; - *(scan + 1) = (offset >> 8) & 0377; - *(scan + 2) = offset & 0377; -} - -/* - - regoptail - regtail on operand of first argument; nop if operandless - */ -static void regoptail(p, val) -char *p; -char *val; -{ - /* "Operandless" and "op != BRANCH" are synonymous in practice. */ - if (p == (char *)NULL || p == ®dummy || OP(p) != BRANCH) - return; - regtail(OPERAND(p), val); -} - -/* - * regexec and friends - */ - -/* - * Global work variables for regexec(). - */ -static char *reginput; /* String-input pointer. */ -static char *regbol; /* Beginning of input, for ^ check. */ -static char **regstartp; /* Pointer to startp array. */ -static char **regendp; /* Ditto for endp. */ - -/* - * Forwards. - */ -STATIC int regtry(); -STATIC int regmatch(); -STATIC int regrepeat(); - -#ifdef DEBUG -int regnarrate = 0; -void regdump(); -STATIC char *regprop(); -#endif - -/* - - regexec - match a regexp against a string - */ -int regexec(prog, string) -register regexp *prog; -register char *string; -{ - register char *s; - - /* Be paranoid... */ - if (prog == (regexp *)NULL || string == (char *)NULL) { - regerror("NULL parameter"); - return (0); - } - /* Check validity of program. */ - if (UCHARAT(prog->program) != MAGIC) { - regerror("corrupted program"); - return (0); - } - /* If there is a "must appear" string, look for it. */ - if (prog->regmust != (char *)NULL) { - s = string; - while ((s = STRCHR(s, prog->regmust[0])) != (char *)NULL) { - if (strncmp(s, prog->regmust, prog->regmlen) == 0) - break; /* Found it. */ - s++; - } - if (s == (char *)NULL) /* Not present. */ - return (0); - } - /* Mark beginning of line for ^ . */ - regbol = string; - - /* Simplest case: anchored match need be tried only once. */ - if (prog->reganch) - return (regtry(prog, string)); - - /* Messy cases: unanchored match. */ - s = string; - if (prog->regstart != '\0') - /* We know what char it must start with. */ - while ((s = STRCHR(s, prog->regstart)) != (char *)NULL) { - if (regtry(prog, s)) - return (1); - s++; - } - else - /* We don't -- general case. */ - do { - if (regtry(prog, s)) - return (1); - } while (*s++ != '\0'); - - /* Failure. */ - return (0); -} - -/* - - regtry - try match at specific point - */ - -static int regtry(regexp *prog, char *string) -{ - register int i; - register char **sp; - register char **ep; - - reginput = string; - regstartp = prog->startp; - regendp = prog->endp; - - sp = prog->startp; - ep = prog->endp; - for (i = NSUBEXP; i > 0; i--) { - *sp++ = (char *)NULL; - *ep++ = (char *)NULL; - } - if (regmatch(prog->program + 1)) { - prog->startp[0] = string; - prog->endp[0] = reginput; - return (1); - } else - return (0); -} - -/* - - regmatch - main matching routine - * - * Conceptually the strategy is simple: check to see whether the current - * node matches, call self recursively to see whether the rest matches, - * and then act accordingly. In practice we make some effort to avoid - * recursion, in particular by going through "ordinary" nodes (that don't - * need to know whether the rest of the match failed) by a loop instead of - * by recursion. - */ - -static int regmatch(char *prog) -{ - register char *scan; /* Current node. */ - char *nxt; /* nxt node. */ - - scan = prog; -#ifdef DEBUG - if (scan != (char *)NULL && regnarrate) - fprintf(stderr, "%s(\n", regprop(scan)); -#endif - while (scan != (char *)NULL) { -#ifdef DEBUG - if (regnarrate) - fprintf(stderr, "%s...\n", regprop(scan)); -#endif - nxt = regnext(scan); - - switch (OP(scan)) { - case BOL: - if (reginput != regbol) - return (0); - break; - case EOL: - if (*reginput != '\0') - return (0); - break; - case ANY: - if (*reginput == '\0') - return (0); - reginput++; - break; - case WORDSTART: - if (reginput == regbol) - break; - if (*reginput == '\0' || - ISWORDPART( *(reginput-1) ) || !ISWORDPART( *reginput ) ) - return (0); - break; - case WORDEND: - if (*reginput == '\0') - break; - if ( reginput == regbol || - !ISWORDPART( *(reginput-1) ) || ISWORDPART( *reginput ) ) - return (0); - break; - case EXACTLY:{ - register int len; - register char *opnd; - - opnd = OPERAND(scan); - /* Inline the first character, for speed. */ - if (*opnd != *reginput) - return (0); - len = strlen(opnd); - if (len > 1 && strncmp(opnd, reginput, len) != 0) - return (0); - reginput += len; - } - break; - case ANYOF: - if (*reginput == '\0' || - STRCHR(OPERAND(scan), *reginput) == (char *)NULL) - return (0); - reginput++; - break; - case ANYBUT: - if (*reginput == '\0' || - STRCHR(OPERAND(scan), *reginput) != (char *)NULL) - return (0); - reginput++; - break; - case NOTHING: - break; - case BACK: - break; - case OPEN + 1: - case OPEN + 2: - case OPEN + 3: - case OPEN + 4: - case OPEN + 5: - case OPEN + 6: - case OPEN + 7: - case OPEN + 8: - case OPEN + 9:{ - register int no; - register char *save; - - no = OP(scan) - OPEN; - save = reginput; - - if (regmatch(nxt)) { - /* - * Don't set startp if some later invocation of the same - * parentheses already has. - */ - if (regstartp[no] == (char *)NULL) - regstartp[no] = save; - return (1); - } else - return (0); - } - - case CLOSE + 1: - case CLOSE + 2: - case CLOSE + 3: - case CLOSE + 4: - case CLOSE + 5: - case CLOSE + 6: - case CLOSE + 7: - case CLOSE + 8: - case CLOSE + 9:{ - register int no; - register char *save; - - no = OP(scan) - CLOSE; - save = reginput; - - if (regmatch(nxt)) { - /* - * Don't set endp if some later invocation of the same - * parentheses already has. - */ - if (regendp[no] == (char *)NULL) - regendp[no] = save; - return (1); - } else - return (0); - } - - case BRANCH:{ - register char *save; - - if (OP(nxt) != BRANCH) /* No choice. */ - nxt = OPERAND(scan); /* Avoid recursion. */ - else { - do { - save = reginput; - if (regmatch(OPERAND(scan))) - return (1); - reginput = save; - scan = regnext(scan); - } while (scan != (char *)NULL && OP(scan) == BRANCH); - return (0); - /* NOTREACHED */ - } - } - break; - case STAR:{ - register char nextch; - register int no; - register char *save; - register int minimum; - - /* - * Lookahead to avoid useless match attempts when we know - * what character comes next. - */ - nextch = '\0'; - if (OP(nxt) == EXACTLY) - nextch = *OPERAND(nxt); - minimum = (OP(scan) == STAR) ? 0 : 1; - save = reginput; - no = regrepeat(OPERAND(scan)); - while (no >= minimum) { - /* If it could work, try it. */ - if (nextch == '\0' || *reginput == nextch) - if (regmatch(nxt)) - return (1); - /* Couldn't or didn't -- back up. */ - no--; - reginput = save + no; - } - return (0); - } - - case END: - return (1); /* Success! */ - - default: - regerror("memory corruption"); - return (0); - - } - - scan = nxt; - } - - /* - * We get here only if there's trouble -- normally "case END" is the - * terminating point. - */ - regerror("corrupted pointers"); - return (0); -} - -/* - - regrepeat - repeatedly match something simple, report how many - */ - -static int regrepeat(char *p) -{ - register int count = 0; - register char *scan; - register char *opnd; - - scan = reginput; - opnd = OPERAND(p); - switch (OP(p)) { - case ANY: - count = strlen(scan); - scan += count; - break; - case EXACTLY: - while (*opnd == *scan) { - count++; - scan++; - } - break; - case ANYOF: - while (*scan != '\0' && STRCHR(opnd, *scan) != (char *)NULL) { - count++; - scan++; - } - break; - case ANYBUT: - while (*scan != '\0' && STRCHR(opnd, *scan) == (char *)NULL) { - count++; - scan++; - } - break; - default: /* Oh dear. Called inappropriately. */ - regerror("internal foulup"); - count = 0; /* Best compromise. */ - break; - } - reginput = scan; - - return (count); -} - - -/* - - regnext - dig the "nxt" pointer out of a node - */ - -static char *regnext(register char *p) -{ - register int offset; - - if (p == ®dummy) - return ((char *)NULL); - - offset = NEXT(p); - if (offset == 0) - return ((char *)NULL); - - if (OP(p) == BACK) - return (p - offset); - else - return (p + offset); -} - -#ifdef DEBUG - -STATIC char *regprop(); - -/* - - regdump - dump a regexp onto stdout in vaguely comprehensible form - */ -void regdump(regexp *r) -{ - register char *s; - register char op = EXACTLY; /* Arbitrary non-END op. */ - register char *nxt; - - s = r->program + 1; - while (op != END) { /* While that wasn't END last time... */ - op = OP(s); - printf("%2ld%s", (long)(s - r->program), regprop(s)); /* Where, what. */ - nxt = regnext(s); - if (nxt == (char *)NULL) /* nxt ptr. */ - printf("(0)"); - else - printf("(%ld)", (long)( (s - r->program) + (nxt - s))); - s += 3; - if (op == ANYOF || op == ANYBUT || op == EXACTLY) { - /* Literal string, where present. */ - while (*s != '\0') { - putchar(*s); - s++; - } - s++; - } - putchar('\n'); - } - - /* Header fields of interest. */ - if (r->regstart != '\0') - printf("start `%c' ", r->regstart); - if (r->reganch) - printf("anchored "); - if (r->regmust != (char *)NULL) - printf("must have \"%s\"", r->regmust); - printf("\n"); -} - -/* - - regprop - printable representation of opcode - */ - -static char *regprop(char *op) -{ - register char *p; - static char buf[50]; - - strcpy(buf, ":"); - - switch (OP(op)) { - case BOL: - p = "BOL"; - break; - case EOL: - p = "EOL"; - break; - case ANY: - p = "ANY"; - break; - case ANYOF: - p = "ANYOF"; - break; - case ANYBUT: - p = "ANYBUT"; - break; - case BRANCH: - p = "BRANCH"; - break; - case EXACTLY: - p = "EXACTLY"; - break; - case NOTHING: - p = "NOTHING"; - break; - case BACK: - p = "BACK"; - break; - case END: - p = "END"; - break; - case OPEN + 1: - case OPEN + 2: - case OPEN + 3: - case OPEN + 4: - case OPEN + 5: - case OPEN + 6: - case OPEN + 7: - case OPEN + 8: - case OPEN + 9: - sprintf(buf + strlen(buf), "OPEN%d", OP(op) - OPEN); - p = (char *)NULL; - break; - case CLOSE + 1: - case CLOSE + 2: - case CLOSE + 3: - case CLOSE + 4: - case CLOSE + 5: - case CLOSE + 6: - case CLOSE + 7: - case CLOSE + 8: - case CLOSE + 9: - sprintf(buf + strlen(buf), "CLOSE%d", OP(op) - CLOSE); - p = (char *)NULL; - break; - case STAR: - p = "STAR"; - break; - default: - regerror("corrupted opcode"); - p=(char *)NULL; - break; - } - if (p != (char *)NULL) - strcat(buf, p); - return (buf); -} -#endif - -/* - - regsub - perform substitutions after a regexp match - */ - -char *regsub(regexp *prog, char *source, char *dest, int n) -{ - register char *src; - register char *dst; - register char c; - register int no; - register int len; - extern char *strncpy(); - - if (prog == (regexp *)NULL || - source == (char *)NULL || dest == (char *)NULL) { - regerror("NULL parm to regsub"); - return NULL; - } - if (UCHARAT(prog->program) != MAGIC) { - regerror("damaged regexp fed to regsub"); - return NULL; - } - src = source; - dst = dest; - while ((c = *src++) != '\0') { - if (c == '&') - no = 0; - else if (c == '\\' && '0' <= *src && *src <= '9') - no = *src++ - '0'; - else - no = -1; - - if (no < 0) { /* Ordinary character. */ - if (c == '\\' && (*src == '\\' || *src == '&')) - c = *src++; - if (--n < 0) { /* amylaar */ - regerror("line too long"); - return NULL; - } - *dst++ = c; - } else if (prog->startp[no] != (char *)NULL && - prog->endp[no] != (char *)NULL) { - len = prog->endp[no] - prog->startp[no]; - if ( (n-=len) < 0 ) { /* amylaar */ - regerror("line too long"); - return NULL; - } - strncpy(dst, prog->startp[no], len); - dst += len; - if (len != 0 && *(dst - 1) == '\0') { /* strncpy hit NUL. */ - regerror("damaged match string"); - return NULL; - } - } - } - if (--n < 0) { /* amylaar */ - regerror("line too long"); - return NULL; - } - *dst = '\0'; - return dst; -} - - -#if 0 /* Use the local regerror() in ed.c */ - -void regerror(char *s) -{ - fprintf(stderr, "regexp(3): %s", s); - exit(1); -} -#endif /* 0 */ diff --git a/externals/mysql/extlib/regex/regfree.c b/externals/mysql/extlib/regex/regfree.c deleted file mode 100644 index f764fcdf84..0000000000 --- a/externals/mysql/extlib/regex/regfree.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include -#include -#include "my_regex.h" - -#include "utils.h" -#include "regex2.h" - -/* - - regfree - free everything - = extern void regfree(regex_t *); - */ -void -my_regfree(preg) -my_regex_t *preg; -{ - register struct re_guts *g; - - if (preg->re_magic != MAGIC1) /* oops */ - return; /* nice to complain, but hard */ - - g = preg->re_g; - if (g == NULL || g->magic != MAGIC2) /* oops again */ - return; - preg->re_magic = 0; /* mark it invalid */ - g->magic = 0; /* mark it invalid */ - - if (g->strip != NULL) - free((char *)g->strip); - if (g->sets != NULL) - free((char *)g->sets); - if (g->setbits != NULL) - free((char *)g->setbits); - if (g->must != NULL) - free(g->must); - free((char *)g); -} diff --git a/externals/mysql/extlib/regex/reginit.c b/externals/mysql/extlib/regex/reginit.c deleted file mode 100644 index 5980de2403..0000000000 --- a/externals/mysql/extlib/regex/reginit.c +++ /dev/null @@ -1,81 +0,0 @@ -/* Init cclasses array from ctypes */ - -#include -#include -#include -#include "cclass.h" - -static my_bool regex_inited=0; - -void my_regex_init(CHARSET_INFO *cs) -{ - char buff[CCLASS_LAST][256]; - int count[CCLASS_LAST]; - uint i; - - if (!regex_inited) - { - regex_inited=1; - bzero((uchar*) &count,sizeof(count)); - - for (i=1 ; i<= 255; i++) - { - if (my_isalnum(cs,i)) - buff[CCLASS_ALNUM][count[CCLASS_ALNUM]++]=(char) i; - if (my_isalpha(cs,i)) - buff[CCLASS_ALPHA][count[CCLASS_ALPHA]++]=(char) i; - if (my_iscntrl(cs,i)) - buff[CCLASS_CNTRL][count[CCLASS_CNTRL]++]=(char) i; - if (my_isdigit(cs,i)) - buff[CCLASS_DIGIT][count[CCLASS_DIGIT]++]=(char) i; - if (my_isgraph(cs,i)) - buff[CCLASS_GRAPH][count[CCLASS_GRAPH]++]=(char) i; - if (my_islower(cs,i)) - buff[CCLASS_LOWER][count[CCLASS_LOWER]++]=(char) i; - if (my_isprint(cs,i)) - buff[CCLASS_PRINT][count[CCLASS_PRINT]++]=(char) i; - if (my_ispunct(cs,i)) - buff[CCLASS_PUNCT][count[CCLASS_PUNCT]++]=(char) i; - if (my_isspace(cs,i)) - buff[CCLASS_SPACE][count[CCLASS_SPACE]++]=(char) i; - if (my_isupper(cs,i)) - buff[CCLASS_UPPER][count[CCLASS_UPPER]++]=(char) i; - if (my_isxdigit(cs,i)) - buff[CCLASS_XDIGIT][count[CCLASS_XDIGIT]++]=(char) i; - } - buff[CCLASS_BLANK][0]=' '; - buff[CCLASS_BLANK][1]='\t'; - count[CCLASS_BLANK]=2; - for (i=0; i < CCLASS_LAST ; i++) - { - char *tmp=(char*) malloc(count[i]+1); - if (!tmp) - { - /* - This is very unlikely to happen as this function is called once - at program startup - */ - fprintf(stderr, - "Fatal error: Can't allocate memory in regex_init\n"); - exit(1); - } - memcpy(tmp,buff[i],count[i]*sizeof(char)); - tmp[count[i]]=0; - cclasses[i].chars=tmp; - } - } - return; -} - -void my_regex_end() -{ - if (regex_inited) - { - int i; - for (i=0; i < CCLASS_LAST ; i++) - free((char*) cclasses[i].chars); - regex_inited=0; - } -} - - diff --git a/externals/mysql/extlib/regex/split.c b/externals/mysql/extlib/regex/split.c deleted file mode 100644 index bd2a53c01e..0000000000 --- a/externals/mysql/extlib/regex/split.c +++ /dev/null @@ -1,316 +0,0 @@ -#include -#include - -/* - - split - divide a string into fields, like awk split() - = int split(char *string, char *fields[], int nfields, char *sep); - */ -int /* number of fields, including overflow */ -split(string, fields, nfields, sep) -char *string; -char *fields[]; /* list is not NULL-terminated */ -int nfields; /* number of entries available in fields[] */ -char *sep; /* "" white, "c" single char, "ab" [ab]+ */ -{ - register char *p = string; - register char c; /* latest character */ - register char sepc = sep[0]; - register char sepc2; - register int fn; - register char **fp = fields; - register char *sepp; - register int trimtrail; - - /* white space */ - if (sepc == '\0') { - while ((c = *p++) == ' ' || c == '\t') - continue; - p--; - trimtrail = 1; - sep = (char*) " \t"; /* note, code below knows this is 2 long */ - sepc = ' '; - } else - trimtrail = 0; - sepc2 = sep[1]; /* now we can safely pick this up */ - - /* catch empties */ - if (*p == '\0') - return(0); - - /* single separator */ - if (sepc2 == '\0') { - fn = nfields; - for (;;) { - *fp++ = p; - fn--; - if (fn == 0) - break; - while ((c = *p++) != sepc) - if (c == '\0') - return(nfields - fn); - *(p-1) = '\0'; - } - /* we have overflowed the fields vector -- just count them */ - fn = nfields; - for (;;) { - while ((c = *p++) != sepc) - if (c == '\0') - return(fn); - fn++; - } - /* not reached */ - } - - /* two separators */ - if (sep[2] == '\0') { - fn = nfields; - for (;;) { - *fp++ = p; - fn--; - while ((c = *p++) != sepc && c != sepc2) - if (c == '\0') { - if (trimtrail && **(fp-1) == '\0') - fn++; - return(nfields - fn); - } - if (fn == 0) - break; - *(p-1) = '\0'; - while ((c = *p++) == sepc || c == sepc2) - continue; - p--; - } - /* we have overflowed the fields vector -- just count them */ - fn = nfields; - while (c != '\0') { - while ((c = *p++) == sepc || c == sepc2) - continue; - p--; - fn++; - while ((c = *p++) != '\0' && c != sepc && c != sepc2) - continue; - } - /* might have to trim trailing white space */ - if (trimtrail) { - p--; - while ((c = *--p) == sepc || c == sepc2) - continue; - p++; - if (*p != '\0') { - if (fn == nfields+1) - *p = '\0'; - fn--; - } - } - return(fn); - } - - /* n separators */ - fn = 0; - for (;;) { - if (fn < nfields) - *fp++ = p; - fn++; - for (;;) { - c = *p++; - if (c == '\0') - return(fn); - sepp = sep; - while ((sepc = *sepp++) != '\0' && sepc != c) - continue; - if (sepc != '\0') /* it was a separator */ - break; - } - if (fn < nfields) - *(p-1) = '\0'; - for (;;) { - c = *p++; - sepp = sep; - while ((sepc = *sepp++) != '\0' && sepc != c) - continue; - if (sepc == '\0') /* it wasn't a separator */ - break; - } - p--; - } - - /* not reached */ -} - -#ifdef TEST_SPLIT - - -/* - * test program - * pgm runs regression - * pgm sep splits stdin lines by sep - * pgm str sep splits str by sep - * pgm str sep n splits str by sep n times - */ -int -main(argc, argv) -int argc; -char *argv[]; -{ - char buf[512]; - register int n; -# define MNF 10 - char *fields[MNF]; - - if (argc > 4) - for (n = atoi(argv[3]); n > 0; n--) { - (void) strcpy(buf, argv[1]); - } - else if (argc > 3) - for (n = atoi(argv[3]); n > 0; n--) { - (void) strcpy(buf, argv[1]); - (void) split(buf, fields, MNF, argv[2]); - } - else if (argc > 2) - dosplit(argv[1], argv[2]); - else if (argc > 1) - while (fgets(buf, sizeof(buf), stdin) != NULL) { - buf[strlen(buf)-1] = '\0'; /* stomp newline */ - dosplit(buf, argv[1]); - } - else - regress(); - - exit(0); -} - -dosplit(string, seps) -char *string; -char *seps; -{ -# define NF 5 - char *fields[NF]; - register int nf; - - nf = split(string, fields, NF, seps); - print(nf, NF, fields); -} - -print(nf, nfp, fields) -int nf; -int nfp; -char *fields[]; -{ - register int fn; - register int bound; - - bound = (nf > nfp) ? nfp : nf; - printf("%d:\t", nf); - for (fn = 0; fn < bound; fn++) - printf("\"%s\"%s", fields[fn], (fn+1 < nf) ? ", " : "\n"); -} - -#define RNF 5 /* some table entries know this */ -struct { - char *str; - char *seps; - int nf; - char *fi[RNF]; -} tests[] = { - "", " ", 0, { "" }, - " ", " ", 2, { "", "" }, - "x", " ", 1, { "x" }, - "xy", " ", 1, { "xy" }, - "x y", " ", 2, { "x", "y" }, - "abc def g ", " ", 5, { "abc", "def", "", "g", "" }, - " a bcd", " ", 4, { "", "", "a", "bcd" }, - "a b c d e f", " ", 6, { "a", "b", "c", "d", "e f" }, - " a b c d ", " ", 6, { "", "a", "b", "c", "d " }, - - "", " _", 0, { "" }, - " ", " _", 2, { "", "" }, - "x", " _", 1, { "x" }, - "x y", " _", 2, { "x", "y" }, - "ab _ cd", " _", 2, { "ab", "cd" }, - " a_b c ", " _", 5, { "", "a", "b", "c", "" }, - "a b c_d e f", " _", 6, { "a", "b", "c", "d", "e f" }, - " a b c d ", " _", 6, { "", "a", "b", "c", "d " }, - - "", " _~", 0, { "" }, - " ", " _~", 2, { "", "" }, - "x", " _~", 1, { "x" }, - "x y", " _~", 2, { "x", "y" }, - "ab _~ cd", " _~", 2, { "ab", "cd" }, - " a_b c~", " _~", 5, { "", "a", "b", "c", "" }, - "a b_c d~e f", " _~", 6, { "a", "b", "c", "d", "e f" }, - "~a b c d ", " _~", 6, { "", "a", "b", "c", "d " }, - - "", " _~-", 0, { "" }, - " ", " _~-", 2, { "", "" }, - "x", " _~-", 1, { "x" }, - "x y", " _~-", 2, { "x", "y" }, - "ab _~- cd", " _~-", 2, { "ab", "cd" }, - " a_b c~", " _~-", 5, { "", "a", "b", "c", "" }, - "a b_c-d~e f", " _~-", 6, { "a", "b", "c", "d", "e f" }, - "~a-b c d ", " _~-", 6, { "", "a", "b", "c", "d " }, - - "", " ", 0, { "" }, - " ", " ", 2, { "", "" }, - "x", " ", 1, { "x" }, - "xy", " ", 1, { "xy" }, - "x y", " ", 2, { "x", "y" }, - "abc def g ", " ", 4, { "abc", "def", "g", "" }, - " a bcd", " ", 3, { "", "a", "bcd" }, - "a b c d e f", " ", 6, { "a", "b", "c", "d", "e f" }, - " a b c d ", " ", 6, { "", "a", "b", "c", "d " }, - - "", "", 0, { "" }, - " ", "", 0, { "" }, - "x", "", 1, { "x" }, - "xy", "", 1, { "xy" }, - "x y", "", 2, { "x", "y" }, - "abc def g ", "", 3, { "abc", "def", "g" }, - "\t a bcd", "", 2, { "a", "bcd" }, - " a \tb\t c ", "", 3, { "a", "b", "c" }, - "a b c d e ", "", 5, { "a", "b", "c", "d", "e" }, - "a b\tc d e f", "", 6, { "a", "b", "c", "d", "e f" }, - " a b c d e f ", "", 6, { "a", "b", "c", "d", "e f " }, - - NULL, NULL, 0, { NULL }, -}; - -regress() -{ - char buf[512]; - register int n; - char *fields[RNF+1]; - register int nf; - register int i; - register int printit; - register char *f; - - for (n = 0; tests[n].str != NULL; n++) { - (void) strcpy(buf, tests[n].str); - fields[RNF] = NULL; - nf = split(buf, fields, RNF, tests[n].seps); - printit = 0; - if (nf != tests[n].nf) { - printf("split `%s' by `%s' gave %d fields, not %d\n", - tests[n].str, tests[n].seps, nf, tests[n].nf); - printit = 1; - } else if (fields[RNF] != NULL) { - printf("split() went beyond array end\n"); - printit = 1; - } else { - for (i = 0; i < nf && i < RNF; i++) { - f = fields[i]; - if (f == NULL) - f = "(NULL)"; - if (strcmp(f, tests[n].fi[i]) != 0) { - printf("split `%s' by `%s', field %d is `%s', not `%s'\n", - tests[n].str, tests[n].seps, - i, fields[i], tests[n].fi[i]); - printit = 1; - } - } - } - if (printit) - print(nf, RNF, fields); - } -} -#endif diff --git a/externals/mysql/extlib/regex/utils.h b/externals/mysql/extlib/regex/utils.h deleted file mode 100644 index 8f85b705bb..0000000000 --- a/externals/mysql/extlib/regex/utils.h +++ /dev/null @@ -1,22 +0,0 @@ -/* utility definitions */ -#ifdef _POSIX2_RE_DUP_MAX -#define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */ -#else -#define DUPMAX 255 -#endif -#define RE_INFINITY (DUPMAX + 1) -#define NC (CHAR_MAX - CHAR_MIN + 1) -typedef unsigned char uch; - -/* switch off assertions (if not already off) if no REDEBUG */ -#ifndef REDEBUG -#ifndef NDEBUG -#define NDEBUG /* no assertions please */ -#endif -#endif -#include - -/* for old systems with bcopy() but no memmove() */ -#ifdef USEBCOPY -#define memmove(d, s, c) bcopy(s, d, c) -#endif diff --git a/externals/mysql/extlib/yassl/include/buffer.hpp b/externals/mysql/extlib/yassl/include/buffer.hpp deleted file mode 100644 index a51bca9a63..0000000000 --- a/externals/mysql/extlib/yassl/include/buffer.hpp +++ /dev/null @@ -1,207 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* yaSSL buffer header defines input and output buffers to simulate streaming - * with SSL types and sockets - */ - -#ifndef yaSSL_BUFFER_HPP -#define yaSSL_BUFFER_HPP - -#include // assert -#include "yassl_types.hpp" // ysDelete -#include "memory.hpp" // mySTL::auto_ptr -#include STL_ALGORITHM_FILE - - -namespace STL = STL_NAMESPACE; - - -#ifdef _MSC_VER - // disable truncated debug symbols - #pragma warning(disable:4786) -#endif - - -namespace yaSSL { - -typedef unsigned char byte; -typedef unsigned int uint; -const uint AUTO = 0xFEEDBEEF; - - -// Checking Policy should implement a check function that tests whether the -// index is within the size limit of the array -struct Check { - void check(uint i, uint limit); -}; - - -struct NoCheck { - void check(uint, uint); -}; - -/* input_buffer operates like a smart c style array with a checking option, - * meant to be read from through [] with AUTO index or read(). - * Should only write to at/near construction with assign() or raw (e.g., recv) - * followed by add_size with the number of elements added by raw write. - * - * Not using vector because need checked []access, offset, and the ability to - * write to the buffer bulk wise and have the correct size - */ - -class input_buffer : public Check { - uint size_; // number of elements in buffer - uint current_; // current offset position in buffer - byte* buffer_; // storage for buffer - byte* end_; // end of storage marker -public: - input_buffer(); - - explicit input_buffer(uint s); - - // with assign - input_buffer(uint s, const byte* t, uint len); - - ~input_buffer(); - - // users can pass defualt zero length buffer and then allocate - void allocate(uint s); - - // for passing to raw writing functions at beginning, then use add_size - byte* get_buffer() const; - - // after a raw write user can set new size - // if you know the size before the write use assign() - void add_size(uint i); - - uint get_capacity() const; - - uint get_current() const; - - uint get_size() const; - - uint get_remaining() const; - - void set_current(uint i); - - // read only access through [], advance current - // user passes in AUTO index for ease of use - const byte& operator[](uint i); - - // end of input test - bool eof(); - - // peek ahead - byte peek() const; - - // write function, should use at/near construction - void assign(const byte* t, uint s); - - // use read to query input, adjusts current - void read(byte* dst, uint length); - -private: - input_buffer(const input_buffer&); // hide copy - input_buffer& operator=(const input_buffer&); // and assign -}; - - -/* output_buffer operates like a smart c style array with a checking option. - * Meant to be written to through [] with AUTO index or write(). - * Size (current) counter increases when written to. Can be constructed with - * zero length buffer but be sure to allocate before first use. - * Don't use add write for a couple bytes, use [] instead, way less overhead. - * - * Not using vector because need checked []access and the ability to - * write to the buffer bulk wise and retain correct size - */ -class output_buffer : public Check { - uint current_; // current offset and elements in buffer - byte* buffer_; // storage for buffer - byte* end_; // end of storage marker -public: - // default - output_buffer(); - - // with allocate - explicit output_buffer(uint s); - - // with assign - output_buffer(uint s, const byte* t, uint len); - - ~output_buffer(); - - uint get_size() const; - - uint get_capacity() const; - - void set_current(uint c); - - // users can pass defualt zero length buffer and then allocate - void allocate(uint s); - - // for passing to reading functions when finished - const byte* get_buffer() const; - - // allow write access through [], update current - // user passes in AUTO as index for ease of use - byte& operator[](uint i); - - // end of output test - bool eof(); - - void write(const byte* t, uint s); - -private: - output_buffer(const output_buffer&); // hide copy - output_buffer& operator=(const output_buffer&); // and assign -}; - - - - -// turn delete an incomplete type into comipler error instead of warning -template -inline void checked_delete(T* p) -{ - typedef char complete_type[sizeof(T) ? 1 : -1]; - (void)sizeof(complete_type); - ysDelete(p); -} - - -// checked delete functor increases effeciency, no indirection on function call -// sets pointer to zero so safe for std conatiners -struct del_ptr_zero -{ - template - void operator()(T*& p) const - { - T* tmp = 0; - STL::swap(tmp, p); - checked_delete(tmp); - } -}; - - - -} // naemspace - -#endif // yaSSL_BUUFER_HPP diff --git a/externals/mysql/extlib/yassl/include/cert_wrapper.hpp b/externals/mysql/extlib/yassl/include/cert_wrapper.hpp deleted file mode 100644 index 572b9f8729..0000000000 --- a/externals/mysql/extlib/yassl/include/cert_wrapper.hpp +++ /dev/null @@ -1,132 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* The certificate wrapper header defines certificate management functions - * - */ - - -#ifndef yaSSL_CERT_WRAPPER_HPP -#define yaSSL_CERT_WRAPPER_HPP - -#ifdef _MSC_VER - // disable truncated debug symbols - #pragma warning(disable:4786) -#endif - - -#include "yassl_types.hpp" // SignatureAlgorithm -#include "buffer.hpp" // input_buffer -#include "asn.hpp" // SignerList -#include "openssl/ssl.h" // internal and external use -#include STL_LIST_FILE -#include STL_ALGORITHM_FILE - - -namespace STL = STL_NAMESPACE; - - -namespace yaSSL { - -typedef unsigned char opaque; -class X509; // forward openSSL type - -using TaoCrypt::SignerList; - -// an x509 version 3 certificate -class x509 { - uint length_; - opaque* buffer_; -public: - explicit x509(uint sz); - ~x509(); - - uint get_length() const; - const opaque* get_buffer() const; - opaque* use_buffer(); - - x509(const x509&); - x509& operator=(const x509&); -private: - void Swap(x509&); -}; - - -// Certificate Manager keeps a list of the cert chain and public key -class CertManager { - typedef STL::list CertList; - - CertList list_; // self - input_buffer privateKey_; - - CertList peerList_; // peer - input_buffer peerPublicKey_; - X509* peerX509_; // peer's openSSL X509 - - SignatureAlgorithm keyType_; // self key type - SignatureAlgorithm peerKeyType_; // peer's key type - - SignerList signers_; // decoded CA keys and names - // plus verified chained certs - bool verifyPeer_; - bool verifyNone_; // no error if verify fails - bool failNoCert_; - bool sendVerify_; - VerifyCallback verifyCallback_; // user verify callback -public: - CertManager(); - ~CertManager(); - - void AddPeerCert(x509* x); // take ownership - void CopySelfCert(const x509* x); - int CopyCaCert(const x509* x); - int Validate(); - - int SetPrivateKey(const x509&); - - const x509* get_cert() const; - const opaque* get_peerKey() const; - const opaque* get_privateKey() const; - X509* get_peerX509() const; - SignatureAlgorithm get_keyType() const; - SignatureAlgorithm get_peerKeyType() const; - - uint get_peerKeyLength() const; - uint get_privateKeyLength() const; - - bool verifyPeer() const; - bool verifyNone() const; - bool failNoCert() const; - bool sendVerify() const; - - void setVerifyPeer(); - void setVerifyNone(); - void setFailNoCert(); - void setSendVerify(); - void setPeerX509(X509*); - void setVerifyCallback(VerifyCallback); -private: - CertManager(const CertManager&); // hide copy - CertManager& operator=(const CertManager&); // and assign -}; - - -} // naemspace - -#endif // yaSSL_CERT_WRAPPER_HPP diff --git a/externals/mysql/extlib/yassl/include/config.h b/externals/mysql/extlib/yassl/include/config.h deleted file mode 100644 index adea8dbe8e..0000000000 --- a/externals/mysql/extlib/yassl/include/config.h +++ /dev/null @@ -1,295 +0,0 @@ - -/* Headers we may want to use. */ -/* #undef HAVE_ALLOCA_H */ -/* #undef HAVE_ARPA_INET_H */ -/* #undef HAVE_CRYPT_H */ -/* #undef HAVE_DIRENT_H */ -/* #undef HAVE_EXECINFO_H */ -#define HAVE_FCNTL_H 1 -/* #undef HAVE_FENV_H */ -#define HAVE_FLOAT_H 1 -/* #undef HAVE_FPU_CONTROL_H */ -/* #undef HAVE_GRP_H */ -/* #undef HAVE_IEEEFP_H */ -#define HAVE_LIMITS_H 1 -#define HAVE_MALLOC_H 1 -#define HAVE_MEMORY_H 1 -/* #undef HAVE_NETINET_IN_H */ -/* #undef HAVE_PATHS_H */ -/* #undef HAVE_PWD_H */ -/* #undef HAVE_SCHED_H */ -/* #undef HAVE_SELECT_H */ -#define HAVE_STDDEF_H 1 -#define HAVE_STDLIB_H 1 -/* #undef HAVE_STRINGS_H */ -#define HAVE_STRING_H 1 -/* #undef HAVE_SYNCH_H */ -/* #undef HAVE_SYSENT_H */ -/* #undef HAVE_SYS_FPU_H */ -/* #undef HAVE_SYS_IOCTL_H */ -/* #undef HAVE_SYS_IPC_H */ -/* #undef HAVE_SYS_MMAN_H */ -/* #undef HAVE_SYS_PRCTL_H */ -/* #undef HAVE_SYS_SELECT_H */ -/* #undef HAVE_SYS_SHM_H */ -/* #undef HAVE_SYS_SOCKET_H */ -#define HAVE_SYS_STAT_H 1 -/* #undef HAVE_SYS_STREAM_H */ -#define HAVE_SYS_TIMEB_H 1 -#define HAVE_SYS_TYPES_H 1 -/* #undef HAVE_SYS_UN_H */ -/* #undef HAVE_TERMIOS_H */ -/* #undef HAVE_TERMIO_H */ -/* #undef HAVE_UNISTD_H */ -/* #undef HAVE_UTIME_H */ - -/* Functions we may want to use. */ -#define HAVE_ACCESS 1 -/* #undef HAVE_AIOWAIT */ -/* #undef HAVE_ALARM */ -/* #undef HAVE_ALLOCA */ -/* #undef HAVE_BCMP */ -/* #undef HAVE_BFILL */ -/* #undef HAVE_BMOVE */ -/* #undef HAVE_BZERO */ -/* #undef HAVE_CLOCK_GETTIME */ -/* #undef HAVE_COMPRESS */ -/* #undef HAVE_CRYPT */ -/* #undef HAVE_DLERROR */ -/* #undef HAVE_DLOPEN */ -/* #undef HAVE_FCHMOD */ -/* #undef HAVE_FCNTL */ -/* #undef HAVE_FCONVERT */ -/* #undef HAVE_FDATASYNC */ -/* #undef HAVE_FESETROUND */ -/* #undef HAVE_FINITE */ -/* #undef HAVE_FP_EXCEPT */ -/* #undef HAVE_FSEEKO */ -/* #undef HAVE_FSYNC */ -/* #undef HAVE_GETADDRINFO */ -#define HAVE_GETCWD 1 -/* #undef HAVE_GETHOSTBYADDR_R */ -/* #undef HAVE_GETHOSTBYNAME_R */ -/* #undef HAVE_GETHRTIME */ -/* #undef HAVE_GETNAMEINFO */ -/* #undef HAVE_GETPAGESIZE */ -/* #undef HAVE_GETPASS */ -/* #undef HAVE_GETPASSPHRASE */ -/* #undef HAVE_GETPWNAM */ -/* #undef HAVE_GETPWUID */ -/* #undef HAVE_GETRLIMIT */ -/* #undef HAVE_GETRUSAGE */ -/* #undef HAVE_GETWD */ -/* #undef HAVE_GMTIME_R */ -/* #undef HAVE_INITGROUPS */ -/* #undef HAVE_ISNAN */ -#define HAVE_LDIV 1 -/* #undef HAVE_LOCALTIME_R */ -/* #undef HAVE_LOG2 */ -#define HAVE_LONGJMP 1 -/* #undef HAVE_LSTAT */ -/* #undef HAVE_MADVISE */ -/* #undef HAVE_DECL_MADVISE */ -/* #undef HAVE_MALLINFO */ -#define HAVE_MEMCPY 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMMOVE 1 -/* #undef HAVE_MKSTEMP */ -/* #undef HAVE_MLOCK */ -/* #undef HAVE_MLOCKALL */ -/* #undef HAVE_MMAP */ -/* #undef HAVE_MMAP64 */ -#define HAVE_PERROR 1 -/* #undef HAVE_POLL */ -/* #undef HAVE_PREAD */ -/* #undef HAVE_PTHREAD_ATTR_CREATE */ -/* #undef HAVE_PTHREAD_ATTR_GETSTACKSIZE */ -/* #undef HAVE_PTHREAD_ATTR_SETPRIO */ -/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */ -/* #undef HAVE_PTHREAD_ATTR_SETSCOPE */ -/* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */ -/* #undef HAVE_PTHREAD_CONDATTR_CREATE */ -/* #undef HAVE_PTHREAD_INIT */ -/* #undef HAVE_PTHREAD_KEY_DELETE */ -/* #undef HAVE_PTHREAD_KEY_DELETE */ -/* #undef HAVE_PTHREAD_KILL */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK */ -/* #undef HAVE_PTHREAD_SETPRIO_NP */ -/* #undef HAVE_PTHREAD_SETSCHEDPARAM */ -/* #undef HAVE_PTHREAD_SIGMASK */ -/* #undef HAVE_PTHREAD_THREADMASK */ -/* #undef HAVE_PTHREAD_YIELD_NP */ -/* #undef HAVE_READDIR_R */ -/* #undef HAVE_READLINK */ -/* #undef HAVE_REALPATH */ -#define HAVE_RENAME 1 -/* #undef HAVE_RINT */ -/* #undef HAVE_SCHED_YIELD */ -/* #undef HAVE_SELECT */ -/* #undef HAVE_SETFD */ -/* #undef HAVE_SETFILEPOINTER */ -/* #undef HAVE_SIGACTION */ -/* #undef HAVE_SIGTHREADMASK */ -/* #undef HAVE_SIGWAIT */ -/* #undef HAVE_SLEEP */ -/* #undef HAVE_SNPRINTF */ -/* #undef HAVE_STPCPY */ -#define HAVE_STRERROR 1 -/* #undef HAVE_STRLCPY */ -#define HAVE_STRNLEN 1 -#define HAVE_STRPBRK 1 -/* #undef HAVE_STRSEP */ -#define HAVE_STRSTR 1 -/* #undef HAVE_STRTOK_R */ -/* #undef HAVE_STRTOK_R */ -#define HAVE_STRTOL 1 -/* #undef HAVE_STRTOLL */ -#define HAVE_STRTOUL 1 -/* #undef HAVE_STRTOULL */ -#define HAVE_TELL 1 -/* #undef HAVE_THR_SETCONCURRENCY */ -/* #undef HAVE_THR_YIELD */ -/* #undef HAVE_VASPRINTF */ -#define HAVE_VSNPRINTF 1 - -/* Symbols we may use */ -/* #undef HAVE_SYS_ERRLIST */ -/* used by stacktrace functions */ -/* #undef HAVE_BSS_START */ - -/* Does "struct timespec" have a "sec" and "nsec" field? */ -/* #undef HAVE_TIMESPEC_TS_SEC */ - -/* Types we may use */ -#define SIZEOF_CHAR 1 -#if SIZEOF_CHAR -# define HAVE_CHAR 1 -#endif - -#define SIZEOF_CHARP 4 -#if SIZEOF_CHARP -# define HAVE_CHARP 1 -#endif - -#define SIZEOF_SHORT 2 -#if SIZEOF_SHORT -# define HAVE_SHORT 1 -#endif - -#define SIZEOF_INT 4 -#if SIZEOF_INT -# define HAVE_INT 1 -#endif - -#define SIZEOF_LONG 4 -#if SIZEOF_LONG -# define HAVE_LONG 1 -#endif - -#define SIZEOF_LONG_LONG 8 -#if SIZEOF_LONG_LONG -# define HAVE_LONG_LONG 1 -#endif - -#define SIZEOF_OFF_T 4 -#if SIZEOF_OFF_T -# define HAVE_OFF_T 1 -#endif - -/* #undef SIZEOF_SIGSET_T */ -#if SIZEOF_SIGSET_T -# define HAVE_SIGSET_T 1 -#endif - -#define SIZEOF_SIZE_T 4 -#if SIZEOF_SIZE_T -# define HAVE_SIZE_T 1 -#endif - -/* #undef SIZEOF_UCHAR */ -#if SIZEOF_UCHAR -# define HAVE_UCHAR 1 -#endif - -/* #undef SIZEOF_UINT */ -#if SIZEOF_UINT -# define HAVE_UINT 1 -#endif - -/* #undef SIZEOF_ULONG */ -#if SIZEOF_ULONG -# define HAVE_ULONG 1 -#endif - -/* #undef SIZEOF_INT8 */ -#if SIZEOF_INT8 -# define HAVE_INT8 1 -#endif -/* #undef SIZEOF_UINT8 */ -#if SIZEOF_UINT8 -# define HAVE_UINT8 1 -#endif - -/* #undef SIZEOF_INT16 */ -#if SIZEOF_INT16 -# define HAVE_INT16 1 -#endif -/* #undef SIZEOF_UINT16 */ -#if SIZEOF_UINT16 -# define HAVE_UINT16 1 -#endif - -/* #undef SIZEOF_INT32 */ -#if SIZEOF_INT32 -# define HAVE_INT32 1 -#endif -/* #undef SIZEOF_UINT32 */ -#if SIZEOF_UINT32 -# define HAVE_UINT32 1 -#endif -/* #undef SIZEOF_U_INT32_T */ -#if SIZEOF_U_INT32_T -# define HAVE_U_INT32_T 1 -#endif - -/* #undef SIZEOF_INT64 */ -#if SIZEOF_INT64 -# define HAVE_INT64 1 -#endif -/* #undef SIZEOF_UINT64 */ -#if SIZEOF_UINT64 -# define HAVE_UINT64 1 -#endif - -/* #undef SIZEOF_SOCKLEN_T */ -#if SIZEOF_SOCKLEN_T -# define HAVE_SOCKLEN_T 1 -#endif - -/* XXX mysql_client_test uses this -- rip it out, please! */ -#define MAX_INDEXES 64 - -#define QSORT_TYPE_IS_VOID 1 -#define RETQSORTTYPE void - -#define SIGNAL_RETURN_TYPE_IS_VOID 1 -#define RETSIGTYPE void - -/* #undef WORDS_BIGENDIAN */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler calls - it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -# define inline -#endif - -#define TIME_WITH_SYS_TIME 1 - -#define STACK_DIRECTION -1 - -#define SHAREDIR "share" -#define THREAD 1 -#define THREAD_SAFE_CLIENT 1 - -#define DEFAULT_CHARSET_HOME "C:/mysql/" diff --git a/externals/mysql/extlib/yassl/include/crypto_wrapper.hpp b/externals/mysql/extlib/yassl/include/crypto_wrapper.hpp deleted file mode 100644 index 07b5925265..0000000000 --- a/externals/mysql/extlib/yassl/include/crypto_wrapper.hpp +++ /dev/null @@ -1,427 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* The crypto wrapper header is used to define policies for the cipher - * components used by SSL. There are 3 policies to consider: - * - * 1) MAC, the Message Authentication Code used for each Message - * 2) Bulk Cipher, the Cipher used to encrypt/decrypt each Message - * 3) Atuhentication, the Digitial Signing/Verifiaction scheme used - * - * This header doesn't rely on a specific crypto libraries internals, - * only the implementation should. - */ - - -#ifndef yaSSL_CRYPTO_WRAPPER_HPP -#define yaSSL_CRYPTO_WRAPPER_HPP - -#include "yassl_types.hpp" -#include // FILE - - -namespace yaSSL { - - -// Digest policy should implement a get_digest, update, and get sizes for pad -// and digest -struct Digest : public virtual_base { - virtual void get_digest(byte*) = 0; - virtual void get_digest(byte*, const byte*, unsigned int) = 0; - virtual void update(const byte*, unsigned int) = 0; - virtual uint get_digestSize() const = 0; - virtual uint get_padSize() const = 0; - virtual ~Digest() {} -}; - - -// For use with NULL Digests -struct NO_MAC : public Digest { - void get_digest(byte*); - void get_digest(byte*, const byte*, unsigned int); - void update(const byte*, unsigned int); - uint get_digestSize() const; - uint get_padSize() const; -}; - - -// MD5 Digest -class MD5 : public Digest { -public: - void get_digest(byte*); - void get_digest(byte*, const byte*, unsigned int); - void update(const byte*, unsigned int); - uint get_digestSize() const; - uint get_padSize() const; - MD5(); - ~MD5(); - MD5(const MD5&); - MD5& operator=(const MD5&); -private: - struct MD5Impl; - MD5Impl* pimpl_; -}; - - -// SHA-1 Digest -class SHA : public Digest { -public: - void get_digest(byte*); - void get_digest(byte*, const byte*, unsigned int); - void update(const byte*, unsigned int); - uint get_digestSize() const; - uint get_padSize() const; - SHA(); - ~SHA(); - SHA(const SHA&); - SHA& operator=(const SHA&); -private: - struct SHAImpl; - SHAImpl* pimpl_; - -}; - - -// RIPEMD-160 Digest -class RMD : public Digest { -public: - void get_digest(byte*); - void get_digest(byte*, const byte*, unsigned int); - void update(const byte*, unsigned int); - uint get_digestSize() const; - uint get_padSize() const; - RMD(); - ~RMD(); - RMD(const RMD&); - RMD& operator=(const RMD&); -private: - struct RMDImpl; - RMDImpl* pimpl_; - -}; - - -// HMAC_MD5 -class HMAC_MD5 : public Digest { -public: - void get_digest(byte*); - void get_digest(byte*, const byte*, unsigned int); - void update(const byte*, unsigned int); - uint get_digestSize() const; - uint get_padSize() const; - HMAC_MD5(const byte*, unsigned int); - ~HMAC_MD5(); -private: - struct HMAC_MD5Impl; - HMAC_MD5Impl* pimpl_; - - HMAC_MD5(const HMAC_MD5&); - HMAC_MD5& operator=(const HMAC_MD5&); -}; - - -// HMAC_SHA-1 -class HMAC_SHA : public Digest { -public: - void get_digest(byte*); - void get_digest(byte*, const byte*, unsigned int); - void update(const byte*, unsigned int); - uint get_digestSize() const; - uint get_padSize() const; - HMAC_SHA(const byte*, unsigned int); - ~HMAC_SHA(); -private: - struct HMAC_SHAImpl; - HMAC_SHAImpl* pimpl_; - - HMAC_SHA(const HMAC_SHA&); - HMAC_SHA& operator=(const HMAC_SHA&); -}; - - -// HMAC_RMD -class HMAC_RMD : public Digest { -public: - void get_digest(byte*); - void get_digest(byte*, const byte*, unsigned int); - void update(const byte*, unsigned int); - uint get_digestSize() const; - uint get_padSize() const; - HMAC_RMD(const byte*, unsigned int); - ~HMAC_RMD(); -private: - struct HMAC_RMDImpl; - HMAC_RMDImpl* pimpl_; - - HMAC_RMD(const HMAC_RMD&); - HMAC_RMD& operator=(const HMAC_RMD&); -}; - - -// BulkCipher policy should implement encrypt, decrypt, get block size, -// and set keys for encrypt and decrypt -struct BulkCipher : public virtual_base { - virtual void encrypt(byte*, const byte*, unsigned int) = 0; - virtual void decrypt(byte*, const byte*, unsigned int) = 0; - virtual void set_encryptKey(const byte*, const byte* = 0) = 0; - virtual void set_decryptKey(const byte*, const byte* = 0) = 0; - virtual uint get_blockSize() const = 0; - virtual int get_keySize() const = 0; - virtual int get_ivSize() const = 0; - virtual ~BulkCipher() {} -}; - - -// For use with NULL Ciphers -struct NO_Cipher : public BulkCipher { - void encrypt(byte*, const byte*, unsigned int) {} - void decrypt(byte*, const byte*, unsigned int) {} - void set_encryptKey(const byte*, const byte*) {} - void set_decryptKey(const byte*, const byte*) {} - uint get_blockSize() const { return 0; } - int get_keySize() const { return 0; } - int get_ivSize() const { return 0; } -}; - - -// SSLv3 and TLSv1 always use DES in CBC mode so IV is required -class DES : public BulkCipher { -public: - void encrypt(byte*, const byte*, unsigned int); - void decrypt(byte*, const byte*, unsigned int); - void set_encryptKey(const byte*, const byte*); - void set_decryptKey(const byte*, const byte*); - uint get_blockSize() const { return DES_BLOCK; } - int get_keySize() const { return DES_KEY_SZ; } - int get_ivSize() const { return DES_IV_SZ; } - DES(); - ~DES(); -private: - struct DESImpl; - DESImpl* pimpl_; - - DES(const DES&); // hide copy - DES& operator=(const DES&); // & assign -}; - - -// 3DES Encrypt-Decrypt-Encrypt in CBC mode -class DES_EDE : public BulkCipher { -public: - void encrypt(byte*, const byte*, unsigned int); - void decrypt(byte*, const byte*, unsigned int); - void set_encryptKey(const byte*, const byte*); - void set_decryptKey(const byte*, const byte*); - uint get_blockSize() const { return DES_BLOCK; } - int get_keySize() const { return DES_EDE_KEY_SZ; } - int get_ivSize() const { return DES_IV_SZ; } - DES_EDE(); - ~DES_EDE(); -private: - struct DES_EDEImpl; - DES_EDEImpl* pimpl_; - - DES_EDE(const DES_EDE&); // hide copy - DES_EDE& operator=(const DES_EDE&); // & assign -}; - - -// Alledged RC4 -class RC4 : public BulkCipher { -public: - void encrypt(byte*, const byte*, unsigned int); - void decrypt(byte*, const byte*, unsigned int); - void set_encryptKey(const byte*, const byte*); - void set_decryptKey(const byte*, const byte*); - uint get_blockSize() const { return 0; } - int get_keySize() const { return RC4_KEY_SZ; } - int get_ivSize() const { return 0; } - RC4(); - ~RC4(); -private: - struct RC4Impl; - RC4Impl* pimpl_; - - RC4(const RC4&); // hide copy - RC4& operator=(const RC4&); // & assign -}; - - -// AES -class AES : public BulkCipher { -public: - void encrypt(byte*, const byte*, unsigned int); - void decrypt(byte*, const byte*, unsigned int); - void set_encryptKey(const byte*, const byte*); - void set_decryptKey(const byte*, const byte*); - uint get_blockSize() const { return AES_BLOCK_SZ; } - int get_keySize() const; - int get_ivSize() const { return AES_IV_SZ; } - explicit AES(unsigned int = AES_128_KEY_SZ); - ~AES(); -private: - struct AESImpl; - AESImpl* pimpl_; - - AES(const AES&); // hide copy - AES& operator=(const AES&); // & assign -}; - - -// Random number generator -class RandomPool { -public: - void Fill(opaque* dst, uint sz) const; - RandomPool(); - ~RandomPool(); - - int GetError() const; - - friend class RSA; - friend class DSS; - friend class DiffieHellman; -private: - struct RandomImpl; - RandomImpl* pimpl_; - - RandomPool(const RandomPool&); // hide copy - RandomPool& operator=(const RandomPool&); // & assign -}; - - -// Authentication policy should implement sign, and verify -struct Auth : public virtual_base { - virtual void sign(byte*, const byte*, unsigned int, const RandomPool&) = 0; - virtual bool verify(const byte*, unsigned int, const byte*, - unsigned int) = 0; - virtual uint get_signatureLength() const = 0; - virtual ~Auth() {} -}; - - -// For use with NULL Authentication schemes -struct NO_Auth : public Auth { - void sign(byte*, const byte*, unsigned int, const RandomPool&) {} - bool verify(const byte*, unsigned int, const byte*, unsigned int) - { return true; } -}; - - -// Digitial Signature Standard scheme -class DSS : public Auth { -public: - void sign(byte*, const byte*, unsigned int, const RandomPool&); - bool verify(const byte*, unsigned int, const byte*, unsigned int); - uint get_signatureLength() const; - DSS(const byte*, unsigned int, bool publicKey = true); - ~DSS(); -private: - struct DSSImpl; - DSSImpl* pimpl_; - - DSS(const DSS&); - DSS& operator=(const DSS&); -}; - - -// RSA Authentication and exchange -class RSA : public Auth { -public: - void sign(byte*, const byte*, unsigned int, const RandomPool&); - bool verify(const byte*, unsigned int, const byte*, unsigned int); - void encrypt(byte*, const byte*, unsigned int, const RandomPool&); - void decrypt(byte*, const byte*, unsigned int, const RandomPool&); - uint get_signatureLength() const; - uint get_cipherLength() const; - RSA(const byte*, unsigned int, bool publicKey = true); - ~RSA(); -private: - struct RSAImpl; - RSAImpl* pimpl_; - - RSA(const RSA&); // hide copy - RSA& operator=(const RSA&); // & assing -}; - - -class Integer; - -// Diffie-Hellman agreement -// hide for now TODO: figure out a way to give access to C clients p and g args -class DiffieHellman { -public: - DiffieHellman(const byte*, unsigned int, const byte*, unsigned int, - const byte*, unsigned int, const RandomPool& random); - //DiffieHellman(const char*, const RandomPool&); - DiffieHellman(const Integer&, const Integer&, const RandomPool&); - ~DiffieHellman(); - - DiffieHellman(const DiffieHellman&); - DiffieHellman& operator=(const DiffieHellman&); - - uint get_agreedKeyLength() const; - const byte* get_agreedKey() const; - const byte* get_publicKey() const; - void makeAgreement(const byte*, unsigned int); - - void set_sizes(int&, int&, int&) const; - void get_parms(byte*, byte*, byte*) const; -private: - struct DHImpl; - DHImpl* pimpl_; -}; - - -// Lagrge Integer -class Integer { -public: - Integer(); - ~Integer(); - - Integer(const Integer&); - Integer& operator=(const Integer&); - - void assign(const byte*, unsigned int); - - friend class DiffieHellman; -private: - struct IntegerImpl; - IntegerImpl* pimpl_; -}; - - -class x509; - - -struct EncryptedInfo { - enum { IV_SZ = 32, NAME_SZ = 80 }; - char name[NAME_SZ]; // max one line - byte iv[IV_SZ]; // in base16 rep - uint ivSz; - bool set; - - EncryptedInfo() : ivSz(0), set(false) {} -}; - -x509* PemToDer(FILE*, CertType, EncryptedInfo* info = 0); - - -} // naemspace - -#endif // yaSSL_CRYPTO_WRAPPER_HPP diff --git a/externals/mysql/extlib/yassl/include/factory.hpp b/externals/mysql/extlib/yassl/include/factory.hpp deleted file mode 100644 index e66e32dcdf..0000000000 --- a/externals/mysql/extlib/yassl/include/factory.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* The factory header defines an Object Factory, used by SSL message and - * handshake types. - * - * See Desgin Pattern in GoF and Alexandrescu's chapter in Modern C++ Design, - * page 208 - */ - - - -#ifndef yaSSL_FACTORY_HPP -#define yaSSL_FACTORY_HPP - -#include STL_VECTOR_FILE -#include STL_PAIR_FILE - - -namespace STL = STL_NAMESPACE; - - - - - -namespace yaSSL { - - -// Factory uses its callback map to create objects by id, -// returning an abstract base pointer -template -class Factory { - typedef STL::pair CallBack; - typedef STL::vector CallBackVector; - - CallBackVector callbacks_; -public: - // pass function pointer to register all callbacks upon creation - explicit Factory(void (*init)(Factory&)) - { - init(*this); - } - - // reserve place in vector before registering, used by init funcion - void Reserve(size_t sz) - { - callbacks_.reserve(sz); - } - - // register callback - void Register(const IdentifierType& id, ProductCreator pc) - { - callbacks_.push_back(STL::make_pair(id, pc)); - } - - // THE Creator, returns a new object of the proper type or 0 - AbstractProduct* CreateObject(const IdentifierType& id) const - { - typedef typename STL::vector::const_iterator cIter; - - cIter first = callbacks_.begin(); - cIter last = callbacks_.end(); - - while (first != last) { - if (first->first == id) - break; - ++first; - } - - if (first == callbacks_.end()) - return 0; - return (first->second)(); - } -private: - Factory(const Factory&); // hide copy - Factory& operator=(const Factory&); // and assign -}; - - -} // naemspace - -#endif // yaSSL_FACTORY_HPP diff --git a/externals/mysql/extlib/yassl/include/handshake.hpp b/externals/mysql/extlib/yassl/include/handshake.hpp deleted file mode 100644 index 549a31bf3e..0000000000 --- a/externals/mysql/extlib/yassl/include/handshake.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* The handshake header declares function prototypes for creating and reading - * the various handshake messages. - */ - - - -#ifndef yaSSL_HANDSHAKE_HPP -#define yaSSL_HANDSHAKE_HPP - -#include "yassl_types.hpp" - - -namespace yaSSL { - -// forward decls -class SSL; -class Finished; -class Data; -class Alert; -struct Hashes; - -enum BufferOutput { buffered, unbuffered }; - -void sendClientHello(SSL&); -void sendServerHello(SSL&, BufferOutput = buffered); -void sendServerHelloDone(SSL&, BufferOutput = buffered); -void sendClientKeyExchange(SSL&, BufferOutput = buffered); -void sendServerKeyExchange(SSL&, BufferOutput = buffered); -void sendChangeCipher(SSL&, BufferOutput = buffered); -void sendFinished(SSL&, ConnectionEnd, BufferOutput = buffered); -void sendCertificate(SSL&, BufferOutput = buffered); -void sendCertificateRequest(SSL&, BufferOutput = buffered); -void sendCertificateVerify(SSL&, BufferOutput = buffered); -int sendData(SSL&, const void*, int); -int sendAlert(SSL& ssl, const Alert& alert); - -int receiveData(SSL&, Data&, bool peek = false); -void processReply(SSL&); - -void buildFinished(SSL&, Finished&, const opaque*); -void build_certHashes(SSL&, Hashes&); - -void hmac(SSL&, byte*, const byte*, uint, ContentType, bool verify = false); -void TLS_hmac(SSL&, byte*, const byte*, uint, ContentType, - bool verify = false); -void PRF(byte* digest, uint digLen, const byte* secret, uint secLen, - const byte* label, uint labLen, const byte* seed, uint seedLen); - -} // naemspace - -#endif // yaSSL_HANDSHAKE_HPP diff --git a/externals/mysql/extlib/yassl/include/lock.hpp b/externals/mysql/extlib/yassl/include/lock.hpp deleted file mode 100644 index 0525943e45..0000000000 --- a/externals/mysql/extlib/yassl/include/lock.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* lock.hpp provides an os specific Lock, locks mutex on entry and unlocks - * automatically upon exit, no-ops provided for Single Threaded -*/ - -#ifndef yaSSL_LOCK_HPP -#define yaSSL_LOCK_HPP - - -namespace yaSSL { - - -#ifdef MULTI_THREADED - #ifdef _WIN32 - #include - - class Mutex { - CRITICAL_SECTION cs_; - public: - Mutex(); - ~Mutex(); - - class Lock; - friend class Lock; - - class Lock { - Mutex& mutex_; - public: - explicit Lock(Mutex& lm); - ~Lock(); - }; - }; - #else // _WIN32 - #include - - class Mutex { - pthread_mutex_t mutex_; - public: - - Mutex(); - ~Mutex(); - - class Lock; - friend class Lock; - - class Lock { - Mutex& mutex_; - public: - explicit Lock(Mutex& lm); - ~Lock(); - }; - }; - - #endif // _WIN32 -#else // MULTI_THREADED (WE'RE SINGLE) - - class Mutex { - public: - class Lock { - public: - explicit Lock(Mutex&) {} - }; - }; - -#endif // MULTI_THREADED - - - -} // namespace -#endif // yaSSL_LOCK_HPP diff --git a/externals/mysql/extlib/yassl/include/log.hpp b/externals/mysql/extlib/yassl/include/log.hpp deleted file mode 100644 index fb480eeefb..0000000000 --- a/externals/mysql/extlib/yassl/include/log.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* yaSSL log interface - * - */ - -#ifndef yaSSL_LOG_HPP -#define yaSSL_LOG_HPP - -#include "socket_wrapper.hpp" - -#ifdef YASSL_LOG -#include -#endif - -namespace yaSSL { - -typedef unsigned int uint; - - -// Debug logger -class Log { -#ifdef YASSL_LOG - FILE* log_; -#endif -public: - explicit Log(const char* str = "yaSSL.log"); - ~Log(); - - void Trace(const char*); - void ShowTCP(socket_t, bool ended = false); - void ShowData(uint, bool sent = false); -}; - - -} // naemspace - -#endif // yaSSL_LOG_HPP diff --git a/externals/mysql/extlib/yassl/include/openssl/crypto.h b/externals/mysql/extlib/yassl/include/openssl/crypto.h deleted file mode 100644 index f53e523102..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/crypto.h +++ /dev/null @@ -1,18 +0,0 @@ -/* crypto.h for openSSL */ - -#ifndef ysSSL_crypto_h__ -#define yaSSL_crypto_h__ - -#ifdef YASSL_PREFIX -#include "prefix_crypto.h" -#endif - -const char* SSLeay_version(int type); - -#define SSLEAY_NUMBER_DEFINED -#define SSLEAY_VERSION 0x0900L -#define SSLEAY_VERSION_NUMBER SSLEAY_VERSION - - -#endif /* yaSSL_crypto_h__ */ - diff --git a/externals/mysql/extlib/yassl/include/openssl/des.h b/externals/mysql/extlib/yassl/include/openssl/des.h deleted file mode 100644 index 67be7eecfb..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/des.h +++ /dev/null @@ -1 +0,0 @@ -/* des.h for openssl */ diff --git a/externals/mysql/extlib/yassl/include/openssl/des_old.h b/externals/mysql/extlib/yassl/include/openssl/des_old.h deleted file mode 100644 index 40e8fbc02a..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/des_old.h +++ /dev/null @@ -1 +0,0 @@ -/* des_old.h for openvn */ diff --git a/externals/mysql/extlib/yassl/include/openssl/engine.h b/externals/mysql/extlib/yassl/include/openssl/engine.h deleted file mode 100644 index 39952fcae8..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/engine.h +++ /dev/null @@ -1,5 +0,0 @@ -/* engine.h for libcurl */ - -#undef HAVE_OPENSSL_ENGINE_H - - diff --git a/externals/mysql/extlib/yassl/include/openssl/err.h b/externals/mysql/extlib/yassl/include/openssl/err.h deleted file mode 100644 index 45ac1ca246..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/err.h +++ /dev/null @@ -1,8 +0,0 @@ -/* err.h for openssl */ - -#ifndef yaSSL_err_h__ -#define yaSSL_err_h__ - - - -#endif /* yaSSL_err_h__ */ diff --git a/externals/mysql/extlib/yassl/include/openssl/evp.h b/externals/mysql/extlib/yassl/include/openssl/evp.h deleted file mode 100644 index 1d66b08df4..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/evp.h +++ /dev/null @@ -1,10 +0,0 @@ -/* evp.h for openSSL */ - -#ifndef SSLEAY_NUMBER_DEFINED -#define SSLEAY_NUMBER_DEFINED - -/* for OpenVPN */ -#define SSLEAY_VERSION_NUMBER 0x0090700f - - -#endif /* SSLEAY_NUMBER_DEFINED */ diff --git a/externals/mysql/extlib/yassl/include/openssl/generate_prefix_files.pl b/externals/mysql/extlib/yassl/include/openssl/generate_prefix_files.pl deleted file mode 100644 index da591b3133..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/generate_prefix_files.pl +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/perl -# -# This script generates defines for all functions -# in yassl/include/openssl/ so they are renamed to -# ya. Hopefully that is unique enough. -# -# The script is to be run manually when we import -# a new version of yaSSL -# - - - -# Find all functions in "input" and add macros -# to prefix/rename them into "output -sub generate_prefix($$) -{ - my $input= shift; - my $output= shift; - open(IN, $input) - or die("Can't open input file $input: $!"); - open(OUT, ">", $output) - or mtr_error("Can't open output file $output: $!"); - - while () - { - chomp; - - if ( /typedef/ ) - { - next; - } - - if ( /^\s*[a-zA-Z0-9*_ ]+\s+\*?([_a-zA-Z0-9]+)\s*\(/ ) - { - print OUT "#define $1 ya$1\n"; - } - } - - close OUT; - close IN; -} - -generate_prefix("ssl.h", "prefix_ssl.h"); -generate_prefix("crypto.h", "prefix_crypto.h"); - diff --git a/externals/mysql/extlib/yassl/include/openssl/hmac.h b/externals/mysql/extlib/yassl/include/openssl/hmac.h deleted file mode 100644 index a2eae4c08c..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/hmac.h +++ /dev/null @@ -1 +0,0 @@ -/* hmac.h for openvpn */ diff --git a/externals/mysql/extlib/yassl/include/openssl/lhash.h b/externals/mysql/extlib/yassl/include/openssl/lhash.h deleted file mode 100644 index 01f8535f86..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/lhash.h +++ /dev/null @@ -1,2 +0,0 @@ -/* lhash.h for openSSL */ - diff --git a/externals/mysql/extlib/yassl/include/openssl/md4.h b/externals/mysql/extlib/yassl/include/openssl/md4.h deleted file mode 100644 index 2e99f977fc..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/md4.h +++ /dev/null @@ -1 +0,0 @@ -/* md4.h for libcurl */ diff --git a/externals/mysql/extlib/yassl/include/openssl/md5.h b/externals/mysql/extlib/yassl/include/openssl/md5.h deleted file mode 100644 index dfaf9799c4..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/md5.h +++ /dev/null @@ -1,4 +0,0 @@ -/* md5.h for openssl */ - -#include "ssl.h" /* in there for now */ - diff --git a/externals/mysql/extlib/yassl/include/openssl/objects.h b/externals/mysql/extlib/yassl/include/openssl/objects.h deleted file mode 100644 index 99f2326e51..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/objects.h +++ /dev/null @@ -1 +0,0 @@ -/* objects.h for openvpn */ diff --git a/externals/mysql/extlib/yassl/include/openssl/opensslv.h b/externals/mysql/extlib/yassl/include/openssl/opensslv.h deleted file mode 100644 index d932130684..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/opensslv.h +++ /dev/null @@ -1,12 +0,0 @@ -/* opensslv.h compatibility */ - -#ifndef yaSSL_opensslv_h__ -#define yaSSL_opensslv_h__ - - -/* api version compatibility */ -#define OPENSSL_VERSION_NUMBER 0x0090700f - - -#endif /* yaSSLopensslv_h__ */ - diff --git a/externals/mysql/extlib/yassl/include/openssl/pem.h b/externals/mysql/extlib/yassl/include/openssl/pem.h deleted file mode 100644 index b4c63d56a4..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/pem.h +++ /dev/null @@ -1 +0,0 @@ -/* pem.h for libcurl */ diff --git a/externals/mysql/extlib/yassl/include/openssl/pkcs12.h b/externals/mysql/extlib/yassl/include/openssl/pkcs12.h deleted file mode 100644 index e452fc879c..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/pkcs12.h +++ /dev/null @@ -1,5 +0,0 @@ -/* pkcs12.h for libcurl */ - - -#undef HAVE_OPENSSL_PKCS12_H - diff --git a/externals/mysql/extlib/yassl/include/openssl/prefix_crypto.h b/externals/mysql/extlib/yassl/include/openssl/prefix_crypto.h deleted file mode 100644 index 3fa5f32c62..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/prefix_crypto.h +++ /dev/null @@ -1 +0,0 @@ -#define SSLeay_version yaSSLeay_version diff --git a/externals/mysql/extlib/yassl/include/openssl/prefix_ssl.h b/externals/mysql/extlib/yassl/include/openssl/prefix_ssl.h deleted file mode 100644 index 138d9fb882..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/prefix_ssl.h +++ /dev/null @@ -1,169 +0,0 @@ -#define Copyright yaCopyright -#define yaSSL_CleanUp yayaSSL_CleanUp -#define BN_bin2bn yaBN_bin2bn -#define DH_new yaDH_new -#define DH_free yaDH_free -#define RSA_free yaRSA_free -#define RSA_generate_key yaRSA_generate_key -#define X509_free yaX509_free -#define X509_STORE_CTX_get_current_cert yaX509_STORE_CTX_get_current_cert -#define X509_STORE_CTX_get_error yaX509_STORE_CTX_get_error -#define X509_STORE_CTX_get_error_depth yaX509_STORE_CTX_get_error_depth -#define X509_NAME_oneline yaX509_NAME_oneline -#define X509_get_issuer_name yaX509_get_issuer_name -#define X509_get_subject_name yaX509_get_subject_name -#define X509_verify_cert_error_string yaX509_verify_cert_error_string -#define X509_LOOKUP_add_dir yaX509_LOOKUP_add_dir -#define X509_LOOKUP_load_file yaX509_LOOKUP_load_file -#define X509_LOOKUP_hash_dir yaX509_LOOKUP_hash_dir -#define X509_LOOKUP_file yaX509_LOOKUP_file -#define X509_STORE_add_lookup yaX509_STORE_add_lookup -#define X509_STORE_new yaX509_STORE_new -#define X509_STORE_get_by_subject yaX509_STORE_get_by_subject -#define ERR_get_error_line_data yaERR_get_error_line_data -#define ERR_print_errors_fp yaERR_print_errors_fp -#define ERR_error_string yaERR_error_string -#define ERR_remove_state yaERR_remove_state -#define ERR_get_error yaERR_get_error -#define ERR_peek_error yaERR_peek_error -#define ERR_GET_REASON yaERR_GET_REASON -#define SSL_CTX_new yaSSL_CTX_new -#define SSL_new yaSSL_new -#define SSL_set_fd yaSSL_set_fd -#define SSL_get_fd yaSSL_get_fd -#define SSL_connect yaSSL_connect -#define SSL_write yaSSL_write -#define SSL_read yaSSL_read -#define SSL_accept yaSSL_accept -#define SSL_CTX_free yaSSL_CTX_free -#define SSL_free yaSSL_free -#define SSL_clear yaSSL_clear -#define SSL_shutdown yaSSL_shutdown -#define SSL_set_connect_state yaSSL_set_connect_state -#define SSL_set_accept_state yaSSL_set_accept_state -#define SSL_do_handshake yaSSL_do_handshake -#define SSL_get_cipher yaSSL_get_cipher -#define SSL_get_cipher_name yaSSL_get_cipher_name -#define SSL_get_shared_ciphers yaSSL_get_shared_ciphers -#define SSL_get_cipher_list yaSSL_get_cipher_list -#define SSL_get_version yaSSL_get_version -#define SSLeay_version yaSSLeay_version -#define SSL_get_error yaSSL_get_error -#define SSL_load_error_strings yaSSL_load_error_strings -#define SSL_set_session yaSSL_set_session -#define SSL_get_session yaSSL_get_session -#define SSL_flush_sessions yaSSL_flush_sessions -#define SSL_SESSION_set_timeout yaSSL_SESSION_set_timeout -#define SSL_CTX_set_session_cache_mode yaSSL_CTX_set_session_cache_mode -#define SSL_get_peer_certificate yaSSL_get_peer_certificate -#define SSL_get_verify_result yaSSL_get_verify_result -#define SSL_CTX_set_verify yaSSL_CTX_set_verify -#define SSL_CTX_load_verify_locations yaSSL_CTX_load_verify_locations -#define SSL_CTX_set_default_verify_paths yaSSL_CTX_set_default_verify_paths -#define SSL_CTX_check_private_key yaSSL_CTX_check_private_key -#define SSL_CTX_set_session_id_context yaSSL_CTX_set_session_id_context -#define SSL_CTX_set_tmp_rsa_callback yaSSL_CTX_set_tmp_rsa_callback -#define SSL_CTX_set_options yaSSL_CTX_set_options -#define SSL_CTX_set_session_cache_mode yaSSL_CTX_set_session_cache_mode -#define SSL_CTX_set_timeout yaSSL_CTX_set_timeout -#define SSL_CTX_use_certificate_chain_file yaSSL_CTX_use_certificate_chain_file -#define SSL_CTX_set_default_passwd_cb yaSSL_CTX_set_default_passwd_cb -#define SSL_CTX_use_RSAPrivateKey_file yaSSL_CTX_use_RSAPrivateKey_file -#define SSL_CTX_set_info_callback yaSSL_CTX_set_info_callback -#define SSL_CTX_sess_accept yaSSL_CTX_sess_accept -#define SSL_CTX_sess_connect yaSSL_CTX_sess_connect -#define SSL_CTX_sess_accept_good yaSSL_CTX_sess_accept_good -#define SSL_CTX_sess_connect_good yaSSL_CTX_sess_connect_good -#define SSL_CTX_sess_accept_renegotiate yaSSL_CTX_sess_accept_renegotiate -#define SSL_CTX_sess_connect_renegotiate yaSSL_CTX_sess_connect_renegotiate -#define SSL_CTX_sess_hits yaSSL_CTX_sess_hits -#define SSL_CTX_sess_cb_hits yaSSL_CTX_sess_cb_hits -#define SSL_CTX_sess_cache_full yaSSL_CTX_sess_cache_full -#define SSL_CTX_sess_misses yaSSL_CTX_sess_misses -#define SSL_CTX_sess_timeouts yaSSL_CTX_sess_timeouts -#define SSL_CTX_sess_number yaSSL_CTX_sess_number -#define SSL_CTX_sess_get_cache_size yaSSL_CTX_sess_get_cache_size -#define SSL_CTX_get_verify_mode yaSSL_CTX_get_verify_mode -#define SSL_get_verify_mode yaSSL_get_verify_mode -#define SSL_CTX_get_verify_depth yaSSL_CTX_get_verify_depth -#define SSL_get_verify_depth yaSSL_get_verify_depth -#define SSL_get_default_timeout yaSSL_get_default_timeout -#define SSL_CTX_get_session_cache_mode yaSSL_CTX_get_session_cache_mode -#define SSL_session_reused yaSSL_session_reused -#define SSL_set_rfd yaSSL_set_rfd -#define SSL_set_wfd yaSSL_set_wfd -#define SSL_set_shutdown yaSSL_set_shutdown -#define SSL_set_quiet_shutdown yaSSL_set_quiet_shutdown -#define SSL_get_quiet_shutdown yaSSL_get_quiet_shutdown -#define SSL_want_read yaSSL_want_read -#define SSL_want_write yaSSL_want_write -#define SSL_pending yaSSL_pending -#define SSLv3_method yaSSLv3_method -#define SSLv3_server_method yaSSLv3_server_method -#define SSLv3_client_method yaSSLv3_client_method -#define TLSv1_server_method yaTLSv1_server_method -#define TLSv1_client_method yaTLSv1_client_method -#define TLSv1_1_server_method yaTLSv1_1_server_method -#define TLSv1_1_client_method yaTLSv1_1_client_method -#define SSLv23_server_method yaSSLv23_server_method -#define SSL_CTX_use_certificate_file yaSSL_CTX_use_certificate_file -#define SSL_CTX_use_PrivateKey_file yaSSL_CTX_use_PrivateKey_file -#define SSL_CTX_set_cipher_list yaSSL_CTX_set_cipher_list -#define SSL_CTX_sess_set_cache_size yaSSL_CTX_sess_set_cache_size -#define SSL_CTX_set_tmp_dh yaSSL_CTX_set_tmp_dh -#define OpenSSL_add_all_algorithms yaOpenSSL_add_all_algorithms -#define SSL_library_init yaSSL_library_init -#define SSLeay_add_ssl_algorithms yaSSLeay_add_ssl_algorithms -#define SSL_get_current_cipher yaSSL_get_current_cipher -#define SSL_CIPHER_description yaSSL_CIPHER_description -#define SSL_alert_type_string_long yaSSL_alert_type_string_long -#define SSL_alert_desc_string_long yaSSL_alert_desc_string_long -#define SSL_state_string_long yaSSL_state_string_long -#define EVP_md5 yaEVP_md5 -#define EVP_des_ede3_cbc yaEVP_des_ede3_cbc -#define EVP_BytesToKey yaEVP_BytesToKey -#define DES_set_key_unchecked yaDES_set_key_unchecked -#define DES_ede3_cbc_encrypt yaDES_ede3_cbc_encrypt -#define RAND_screen yaRAND_screen -#define RAND_file_name yaRAND_file_name -#define RAND_write_file yaRAND_write_file -#define RAND_load_file yaRAND_load_file -#define RAND_status yaRAND_status -#define RAND_bytes yaRAND_bytes -#define DES_set_key yaDES_set_key -#define DES_set_odd_parity yaDES_set_odd_parity -#define DES_ecb_encrypt yaDES_ecb_encrypt -#define SSL_CTX_set_default_passwd_cb_userdata yaSSL_CTX_set_default_passwd_cb_userdata -#define SSL_SESSION_free yaSSL_SESSION_free -#define SSL_peek yaSSL_peek -#define SSL_get_certificate yaSSL_get_certificate -#define SSL_get_privatekey yaSSL_get_privatekey -#define X509_get_pubkey yaX509_get_pubkey -#define EVP_PKEY_copy_parameters yaEVP_PKEY_copy_parameters -#define EVP_PKEY_free yaEVP_PKEY_free -#define ERR_error_string_n yaERR_error_string_n -#define ERR_free_strings yaERR_free_strings -#define EVP_cleanup yaEVP_cleanup -#define X509_get_ext_d2i yaX509_get_ext_d2i -#define GENERAL_NAMES_free yaGENERAL_NAMES_free -#define sk_GENERAL_NAME_num yask_GENERAL_NAME_num -#define sk_GENERAL_NAME_value yask_GENERAL_NAME_value -#define ASN1_STRING_data yaASN1_STRING_data -#define ASN1_STRING_length yaASN1_STRING_length -#define ASN1_STRING_type yaASN1_STRING_type -#define X509_NAME_get_index_by_NID yaX509_NAME_get_index_by_NID -#define X509_NAME_ENTRY_get_data yaX509_NAME_ENTRY_get_data -#define X509_NAME_get_entry yaX509_NAME_get_entry -#define ASN1_STRING_to_UTF8 yaASN1_STRING_to_UTF8 -#define SSLv23_client_method yaSSLv23_client_method -#define SSLv2_client_method yaSSLv2_client_method -#define SSL_get1_session yaSSL_get1_session -#define X509_get_notBefore yaX509_get_notBefore -#define X509_get_notAfter yaX509_get_notAfter -#define MD4_Init yaMD4_Init -#define MD4_Update yaMD4_Update -#define MD4_Final yaMD4_Final -#define MD5_Init yaMD5_Init -#define MD5_Update yaMD5_Update -#define MD5_Final yaMD5_Final -#define SSL_set_compression yaSSL_set_compression diff --git a/externals/mysql/extlib/yassl/include/openssl/rand.h b/externals/mysql/extlib/yassl/include/openssl/rand.h deleted file mode 100644 index df9c902034..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/rand.h +++ /dev/null @@ -1,2 +0,0 @@ -/* rand.h for openSSL */ - diff --git a/externals/mysql/extlib/yassl/include/openssl/rsa.h b/externals/mysql/extlib/yassl/include/openssl/rsa.h deleted file mode 100644 index fe64e655bd..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/rsa.h +++ /dev/null @@ -1,10 +0,0 @@ -/* rsa.h for openSSL */ - - -#ifndef yaSSL_rsa_h__ -#define yaSSL_rsa_h__ - -enum { RSA_F4 = 1 }; - - -#endif /* yaSSL_rsa_h__ */ diff --git a/externals/mysql/extlib/yassl/include/openssl/sha.h b/externals/mysql/extlib/yassl/include/openssl/sha.h deleted file mode 100644 index bb487c05c2..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/sha.h +++ /dev/null @@ -1 +0,0 @@ -/* sha.h for openvpn */ diff --git a/externals/mysql/extlib/yassl/include/openssl/ssl.h b/externals/mysql/extlib/yassl/include/openssl/ssl.h deleted file mode 100644 index 05b34a0dc4..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/ssl.h +++ /dev/null @@ -1,554 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* ssl.h defines openssl compatibility layer - * - */ - - - -#ifndef yaSSL_openssl_h__ -#define yaSSL_openssl_h__ - -#ifdef YASSL_PREFIX -#include "prefix_ssl.h" -#endif - -#include /* ERR_print fp */ -#include "opensslv.h" /* for version number */ -#include "rsa.h" - - -#define YASSL_VERSION "1.7.2" - - -#if defined(__cplusplus) -extern "C" { -#endif - - void yaSSL_CleanUp(); /* call once at end of application use to - free static singleton memory holders, - not a leak per se, but helpful when - looking for them */ - -#if defined(__cplusplus) -} // extern -#endif - -#if defined(__cplusplus) && !defined(YASSL_MYSQL_COMPATIBLE) -namespace yaSSL { -extern "C" { -#endif - -#undef X509_NAME /* wincrypt.h clash */ - -#if defined(__cplusplus) && !defined(YASSL_MYSQL_COMPATIBLE) - class SSL; - class SSL_SESSION; - class SSL_METHOD; - class SSL_CTX; - class SSL_CIPHER; - - class RSA; - - class X509; - class X509_NAME; -#else - typedef struct SSL SSL; - typedef struct SSL_SESSION SSL_SESSION; - typedef struct SSL_METHOD SSL_METHOD; - typedef struct SSL_CTX SSL_CTX; - typedef struct SSL_CIPHER SSL_CIPHER; - - typedef struct RSA RSA; - - typedef struct X509 X509; - typedef struct X509_NAME X509_NAME; -#endif - - -/* Big Number stuff, different file? */ -typedef struct BIGNUM BIGNUM; - -BIGNUM *BN_bin2bn(const unsigned char*, int, BIGNUM*); - - -/* Diffie-Hellman stuff, different file? */ -/* mySQL deferences to set group parameters */ -typedef struct DH { - BIGNUM* p; - BIGNUM* g; -} DH; - -DH* DH_new(void); -void DH_free(DH*); - -/* RSA stuff */ - -void RSA_free(RSA*); -RSA* RSA_generate_key(int, unsigned long, void(*)(int, int, void*), void*); - - -/* X509 stuff, different file? */ - -typedef struct X509_STORE X509_STORE; -typedef struct X509_LOOKUP X509_LOOKUP; -typedef struct X509_OBJECT { char c; } X509_OBJECT; -typedef struct X509_CRL X509_CRL; -typedef struct X509_REVOKED X509_REVOKED; -typedef struct X509_LOOKUP_METHOD X509_LOOKUP_METHOD; - - -void X509_free(X509*); - - -/* bio stuff */ -typedef struct BIO BIO; - -/* ASN stuff */ - - - -/* because mySQL dereferences to use error and current_cert, even after calling - * get functions for local references */ -typedef struct X509_STORE_CTX { - int error; - int error_depth; - X509* current_cert; -} X509_STORE_CTX; - - - -X509* X509_STORE_CTX_get_current_cert(X509_STORE_CTX*); -int X509_STORE_CTX_get_error(X509_STORE_CTX*); -int X509_STORE_CTX_get_error_depth(X509_STORE_CTX*); - -char* X509_NAME_oneline(X509_NAME*, char*, int); -X509_NAME* X509_get_issuer_name(X509*); -X509_NAME* X509_get_subject_name(X509*); -const char* X509_verify_cert_error_string(long); - -int X509_LOOKUP_add_dir(X509_LOOKUP*, const char*, long); -int X509_LOOKUP_load_file(X509_LOOKUP*, const char*, long); -X509_LOOKUP_METHOD* X509_LOOKUP_hash_dir(void); -X509_LOOKUP_METHOD* X509_LOOKUP_file(void); - -X509_LOOKUP* X509_STORE_add_lookup(X509_STORE*, X509_LOOKUP_METHOD*); -X509_STORE* X509_STORE_new(void); -int X509_STORE_get_by_subject(X509_STORE_CTX*, int, X509_NAME*, - X509_OBJECT*); - - - - -enum { /* X509 Constants */ - X509_V_OK = 0, - X509_V_ERR_CERT_CHAIN_TOO_LONG = 1, - X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT = 2, - X509_V_ERR_CERT_NOT_YET_VALID = 3, - X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD = 4, - X509_V_ERR_CERT_HAS_EXPIRED = 5, - X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD = 6, - X509_FILETYPE_PEM = 7, - X509_LU_X509 = 8, - X509_LU_CRL = 9, - X509_V_ERR_CRL_SIGNATURE_FAILURE = 10, - X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD = 11, - X509_V_ERR_CRL_HAS_EXPIRED = 12, - X509_V_ERR_CERT_REVOKED = 13, - X509_V_FLAG_CRL_CHECK = 14, - X509_V_FLAG_CRL_CHECK_ALL = 15 -}; - - -/* Error stuff, could move to yassl_error */ -unsigned long ERR_get_error_line_data(const char**, int*, const char**, int *); -void ERR_print_errors_fp(FILE*); -char* ERR_error_string(unsigned long,char*); -void ERR_remove_state(unsigned long); -unsigned long ERR_get_error(void); -unsigned long ERR_peek_error(void); -int ERR_GET_REASON(int); - - -enum { /* ERR Constants */ - ERR_TXT_STRING = 1, - EVP_R_BAD_DECRYPT = 2 -}; - -/* - Allow type used by SSL_set_fd to be changed, default to int - in order to be compatible with OpenSSL - */ -#ifndef YASSL_SOCKET_T_DEFINED -typedef int YASSL_SOCKET_T; -#endif - -SSL_CTX* SSL_CTX_new(SSL_METHOD*); -SSL* SSL_new(SSL_CTX*); -int SSL_set_fd (SSL*, YASSL_SOCKET_T); -YASSL_SOCKET_T SSL_get_fd(const SSL*); -int SSL_connect(SSL*); /* if you get an error from connect - see note at top of REAMDE */ -int SSL_write(SSL*, const void*, int); -int SSL_read(SSL*, void*, int); -int SSL_accept(SSL*); -void SSL_CTX_free(SSL_CTX*); -void SSL_free(SSL*); -int SSL_clear(SSL*); -int SSL_shutdown(SSL*); - -void SSL_set_connect_state(SSL*); -void SSL_set_accept_state(SSL*); -int SSL_do_handshake(SSL*); - -const char* SSL_get_cipher(SSL*); -const char* SSL_get_cipher_name(SSL*); /* uses SSL_get_cipher */ -char* SSL_get_shared_ciphers(SSL*, char*, int); -const char* SSL_get_cipher_list(SSL*, int); -const char* SSL_get_version(SSL*); -const char* SSLeay_version(int); - -int SSL_get_error(SSL*, int); -void SSL_load_error_strings(void); - -int SSL_set_session(SSL *ssl, SSL_SESSION *session); -SSL_SESSION* SSL_get_session(SSL* ssl); -void SSL_flush_sessions(SSL_CTX *ctx, long tm); -long SSL_SESSION_set_timeout(SSL_SESSION*, long); -long SSL_CTX_set_session_cache_mode(SSL_CTX* ctx, long mode); -X509* SSL_get_peer_certificate(SSL*); -long SSL_get_verify_result(SSL*); - - -typedef int (*VerifyCallback)(int, X509_STORE_CTX*); -typedef int (*pem_password_cb)(char*, int, int, void*); - -void SSL_CTX_set_verify(SSL_CTX*, int, VerifyCallback verify_callback); -int SSL_CTX_load_verify_locations(SSL_CTX*, const char*, const char*); -int SSL_CTX_set_default_verify_paths(SSL_CTX*); -int SSL_CTX_check_private_key(SSL_CTX*); -int SSL_CTX_set_session_id_context(SSL_CTX*, const unsigned char*, - unsigned int); - -void SSL_CTX_set_tmp_rsa_callback(SSL_CTX*, RSA*(*)(SSL*, int, int)); -long SSL_CTX_set_options(SSL_CTX*, long); -long SSL_CTX_set_session_cache_mode(SSL_CTX*, long); -long SSL_CTX_set_timeout(SSL_CTX*, long); -int SSL_CTX_use_certificate_chain_file(SSL_CTX*, const char*); -void SSL_CTX_set_default_passwd_cb(SSL_CTX*, pem_password_cb); -int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX*, const char*, int); -void SSL_CTX_set_info_callback(SSL_CTX*, void (*)()); - -long SSL_CTX_sess_accept(SSL_CTX*); -long SSL_CTX_sess_connect(SSL_CTX*); -long SSL_CTX_sess_accept_good(SSL_CTX*); -long SSL_CTX_sess_connect_good(SSL_CTX*); -long SSL_CTX_sess_accept_renegotiate(SSL_CTX*); -long SSL_CTX_sess_connect_renegotiate(SSL_CTX*); -long SSL_CTX_sess_hits(SSL_CTX*); -long SSL_CTX_sess_cb_hits(SSL_CTX*); -long SSL_CTX_sess_cache_full(SSL_CTX*); -long SSL_CTX_sess_misses(SSL_CTX*); -long SSL_CTX_sess_timeouts(SSL_CTX*); -long SSL_CTX_sess_number(SSL_CTX*); -long SSL_CTX_sess_get_cache_size(SSL_CTX*); - -int SSL_CTX_get_verify_mode(SSL_CTX*); -int SSL_get_verify_mode(SSL*); -int SSL_CTX_get_verify_depth(SSL_CTX*); -int SSL_get_verify_depth(SSL*); - -long SSL_get_default_timeout(SSL*); -long SSL_CTX_get_session_cache_mode(SSL_CTX*); -int SSL_session_reused(SSL*); - -int SSL_set_rfd(SSL*, int); -int SSL_set_wfd(SSL*, int); -void SSL_set_shutdown(SSL*, int); -void SSL_set_quiet_shutdown(SSL *ssl,int mode); -int SSL_get_quiet_shutdown(SSL *ssl); - -int SSL_want_read(SSL*); -int SSL_want_write(SSL*); - -int SSL_pending(SSL*); - - -enum { /* ssl Constants */ - SSL_WOULD_BLOCK = -8, - SSL_BAD_STAT = -7, - SSL_BAD_PATH = -6, - SSL_BAD_FILETYPE = -5, - SSL_BAD_FILE = -4, - SSL_NOT_IMPLEMENTED = -3, - SSL_UNKNOWN = -2, - SSL_FATAL_ERROR = -1, - SSL_NORMAL_SHUTDOWN = 0, - SSL_ERROR_NONE = 0, /* for most functions */ - SSL_FAILURE = 0, /* for some functions */ - SSL_SUCCESS = 1, - - SSL_FILETYPE_ASN1 = 10, - SSL_FILETYPE_PEM = 11, - SSL_FILETYPE_DEFAULT = 10, /* ASN1 */ - - SSL_VERIFY_NONE = 0, - SSL_VERIFY_PEER = 1, - SSL_VERIFY_FAIL_IF_NO_PEER_CERT = 2, - SSL_VERIFY_CLIENT_ONCE = 4, - - SSL_SESS_CACHE_OFF = 30, - SSL_SESS_CACHE_CLIENT = 31, - SSL_SESS_CACHE_SERVER = 32, - SSL_SESS_CACHE_BOTH = 33, - SSL_SESS_CACHE_NO_AUTO_CLEAR = 34, - SSL_SESS_CACHE_NO_INTERNAL_LOOKUP = 35, - - SSL_OP_MICROSOFT_SESS_ID_BUG = 50, - SSL_OP_NETSCAPE_CHALLENGE_BUG = 51, - SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG = 52, - SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG = 53, - SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER = 54, - SSL_OP_MSIE_SSLV2_RSA_PADDING = 55, - SSL_OP_SSLEAY_080_CLIENT_DH_BUG = 56, - SSL_OP_TLS_D5_BUG = 57, - SSL_OP_TLS_BLOCK_PADDING_BUG = 58, - SSL_OP_TLS_ROLLBACK_BUG = 59, - SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 60, - SSL_OP_ALL = 61, - SSL_OP_SINGLE_DH_USE = 62, - SSL_OP_EPHEMERAL_RSA = 63, - SSL_OP_NO_SSLv2 = 64, - SSL_OP_NO_SSLv3 = 65, - SSL_OP_NO_TLSv1 = 66, - SSL_OP_PKCS1_CHECK_1 = 67, - SSL_OP_PKCS1_CHECK_2 = 68, - SSL_OP_NETSCAPE_CA_DN_BUG = 69, - SSL_OP_NON_EXPORT_FIRST = 70, - SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG = 71, - - SSL_ERROR_WANT_READ = 80, - SSL_ERROR_WANT_WRITE = 81, - SSL_ERROR_SYSCALL = 82, - SSL_ERROR_WANT_X509_LOOKUP = 83, - SSL_ERROR_ZERO_RETURN = 84, - SSL_ERROR_SSL = 85, - - SSL_SENT_SHUTDOWN = 90, - SSL_RECEIVED_SHUTDOWN = 91, - SSL_CB_LOOP = 92, - SSL_ST_CONNECT = 93, - SSL_ST_ACCEPT = 94, - SSL_CB_ALERT = 95, - SSL_CB_READ = 96, - SSL_CB_HANDSHAKE_DONE = 97 - -}; - - -SSL_METHOD *SSLv3_method(void); -SSL_METHOD *SSLv3_server_method(void); -SSL_METHOD *SSLv3_client_method(void); -SSL_METHOD *TLSv1_server_method(void); -SSL_METHOD *TLSv1_client_method(void); -SSL_METHOD *TLSv1_1_server_method(void); -SSL_METHOD *TLSv1_1_client_method(void); -SSL_METHOD *SSLv23_server_method(void); - -int SSL_CTX_use_certificate_file(SSL_CTX*, const char*, int); -int SSL_CTX_use_PrivateKey_file(SSL_CTX*, const char*, int); -int SSL_CTX_set_cipher_list(SSL_CTX*, const char*); - -long SSL_CTX_sess_set_cache_size(SSL_CTX*, long); -long SSL_CTX_set_tmp_dh(SSL_CTX*, DH*); - -void OpenSSL_add_all_algorithms(void); -int SSL_library_init(); -int SSLeay_add_ssl_algorithms(void); - - -SSL_CIPHER* SSL_get_current_cipher(SSL*); -char* SSL_CIPHER_description(SSL_CIPHER*, char*, int); - - -char* SSL_alert_type_string_long(int); -char* SSL_alert_desc_string_long(int); -char* SSL_state_string_long(SSL*); - - -/* EVP stuff, des and md5, different file? */ -typedef char EVP_MD; - -typedef char EVP_CIPHER; - -typedef struct EVP_PKEY EVP_PKEY; - -typedef unsigned char DES_cblock[8]; -typedef const DES_cblock const_DES_cblock; -typedef DES_cblock DES_key_schedule; - -enum { - DES_ENCRYPT = 1, - DES_DECRYPT = 0 -}; - -const EVP_MD* EVP_md5(void); -const EVP_CIPHER* EVP_des_ede3_cbc(void); - -typedef unsigned char opaque; - -int EVP_BytesToKey(const EVP_CIPHER*, const EVP_MD*, const opaque*, - const opaque*, int, int, opaque*, opaque*); - -void DES_set_key_unchecked(const_DES_cblock*, DES_key_schedule*); -void DES_ede3_cbc_encrypt(const opaque*, opaque*, long, DES_key_schedule*, - DES_key_schedule*, DES_key_schedule*, DES_cblock*, int); - - -/* RAND stuff */ -void RAND_screen(void); -const char* RAND_file_name(char*, size_t); -int RAND_write_file(const char*); -int RAND_load_file(const char*, long); - - -/* for libcurl */ -int RAND_status(void); -int RAND_bytes(unsigned char* buf, int num); - -int DES_set_key(const_DES_cblock*, DES_key_schedule*); -void DES_set_odd_parity(DES_cblock*); -void DES_ecb_encrypt(DES_cblock*, DES_cblock*, DES_key_schedule*, int); - -void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX*, void* userdata); -void SSL_SESSION_free(SSL_SESSION* session); -int SSL_peek(SSL* ssl, void* buf, int num); - -X509* SSL_get_certificate(SSL* ssl); -EVP_PKEY* SSL_get_privatekey(SSL* ssl); -EVP_PKEY* X509_get_pubkey(X509* x); - -int EVP_PKEY_copy_parameters(EVP_PKEY* to, const EVP_PKEY* from); -void EVP_PKEY_free(EVP_PKEY* pkey); -void ERR_error_string_n(unsigned long e, char *buf, size_t len); -void ERR_free_strings(void); -void EVP_cleanup(void); - -void* X509_get_ext_d2i(X509* x, int nid, int* crit, int* idx); - -#define GEN_IPADD 7 -#define NID_subject_alt_name 85 -#define STACK_OF(x) x - - -/* defined here because libcurl dereferences */ -typedef struct ASN1_STRING { - int type; - int length; - unsigned char* data; -} ASN1_STRING; - - -typedef struct GENERAL_NAME { - int type; - union { - ASN1_STRING* ia5; - } d; -} GENERAL_NAME; - -void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *x); - -int sk_GENERAL_NAME_num(STACK_OF(GENERAL_NAME) *x); -GENERAL_NAME* sk_GENERAL_NAME_value(STACK_OF(GENERAL_NAME) *x, int i); - - -unsigned char* ASN1_STRING_data(ASN1_STRING* x); -int ASN1_STRING_length(ASN1_STRING* x); -int ASN1_STRING_type(ASN1_STRING *x); - -typedef ASN1_STRING X509_NAME_ENTRY; - -int X509_NAME_get_index_by_NID(X509_NAME* name,int nid, int lastpos); - -ASN1_STRING* X509_NAME_ENTRY_get_data(X509_NAME_ENTRY* ne); -X509_NAME_ENTRY* X509_NAME_get_entry(X509_NAME* name, int loc); - -#define OPENSSL_malloc(x) malloc(x) -#define OPENSSL_free(x) free(x) - -int ASN1_STRING_to_UTF8(unsigned char** out, ASN1_STRING* in); - -SSL_METHOD* SSLv23_client_method(void); /* doesn't actually roll back */ -SSL_METHOD* SSLv2_client_method(void); /* will never work, no v 2 */ - - -SSL_SESSION* SSL_get1_session(SSL* ssl); /* what's ref count */ - - -#define CRYPTO_free(x) free(x) -#define ASN1_TIME ASN1_STRING - -ASN1_TIME* X509_get_notBefore(X509* x); -ASN1_TIME* X509_get_notAfter(X509* x); - - -#define ASN1_UTCTIME ASN1_STRING -#define NID_commonName 13 -#define V_ASN1_UTF8STRING 12 -#define GEN_DNS 2 - -#define CERTFICATE_ERROR 0x14090086 /* SSLv3 error */ - - -typedef struct MD4_CTX { - int buffer[32]; /* big enough to hold, check size in Init */ -} MD4_CTX; - -void MD4_Init(MD4_CTX*); -void MD4_Update(MD4_CTX*, const void*, unsigned long); -void MD4_Final(unsigned char*, MD4_CTX*); - - -typedef struct MD5_CTX { - int buffer[32]; /* big enough to hold, check size in Init */ -} MD5_CTX; - -void MD5_Init(MD5_CTX*); -void MD5_Update(MD5_CTX*, const void*, unsigned long); -void MD5_Final(unsigned char*, MD5_CTX*); - -#define MD5_DIGEST_LENGTH 16 - - -#define SSL_DEFAULT_CIPHER_LIST "" /* default all */ - - -/* yaSSL adds */ -int SSL_set_compression(SSL*); /* turn on yaSSL zlib compression */ - - - - -#if defined(__cplusplus) && !defined(YASSL_MYSQL_COMPATIBLE) -} /* namespace */ -} /* extern "C" */ -#endif - - -#endif /* yaSSL_openssl_h__ */ diff --git a/externals/mysql/extlib/yassl/include/openssl/x509.h b/externals/mysql/extlib/yassl/include/openssl/x509.h deleted file mode 100644 index dcd847c033..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/x509.h +++ /dev/null @@ -1 +0,0 @@ -/* x509.h for libcurl */ diff --git a/externals/mysql/extlib/yassl/include/openssl/x509v3.h b/externals/mysql/extlib/yassl/include/openssl/x509v3.h deleted file mode 100644 index adf94af8f4..0000000000 --- a/externals/mysql/extlib/yassl/include/openssl/x509v3.h +++ /dev/null @@ -1 +0,0 @@ -/* x509v3.h for libcurl */ diff --git a/externals/mysql/extlib/yassl/include/socket_wrapper.hpp b/externals/mysql/extlib/yassl/include/socket_wrapper.hpp deleted file mode 100644 index 308704c2af..0000000000 --- a/externals/mysql/extlib/yassl/include/socket_wrapper.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* The socket wrapper header defines a Socket class that hides the differences - * between Berkely style sockets and Windows sockets, allowing transparent TCP - * access. - */ - - -#ifndef yaSSL_SOCKET_WRAPPER_HPP -#define yaSSL_SOCKET_WRAPPER_HPP - -#include - -#ifdef _WIN32 - #include -#else - #include - #include - #include - #include - #include - #include -#endif - - -namespace yaSSL { - -typedef unsigned int uint; - -#ifdef _WIN32 - typedef SOCKET socket_t; -#else - typedef int socket_t; - const socket_t INVALID_SOCKET = -1; - const int SD_RECEIVE = 0; - const int SD_SEND = 1; - const int SD_BOTH = 2; - const int SOCKET_ERROR = -1; -#endif - - - -typedef unsigned char byte; - - -// Wraps Windows Sockets and BSD Sockets -class Socket { - socket_t socket_; // underlying socket descriptor - bool wouldBlock_; // if non-blocking data, for last read - bool nonBlocking_; // is option set -public: - explicit Socket(socket_t s = INVALID_SOCKET); - ~Socket(); - - void set_fd(socket_t s); - uint get_ready() const; - socket_t get_fd() const; - - uint send(const byte* buf, unsigned int len, int flags = 0) const; - uint receive(byte* buf, unsigned int len, int flags = 0); - - bool wait(); - bool WouldBlock() const; - bool IsNonBlocking() const; - - void closeSocket(); - void shutDown(int how = SD_SEND); - - static int get_lastError(); - static void set_lastError(int error); -private: - Socket(const Socket&); // hide copy - Socket& operator= (const Socket&); // and assign -}; - - -} // naemspace - -#endif // yaSSL_SOCKET_WRAPPER_HPP diff --git a/externals/mysql/extlib/yassl/include/timer.hpp b/externals/mysql/extlib/yassl/include/timer.hpp deleted file mode 100644 index 725e73cf45..0000000000 --- a/externals/mysql/extlib/yassl/include/timer.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* timer.hpp provides a high res and low res timers - * -*/ - - -#ifndef yaSSL_TIMER_HPP -#define yaSSL_TIMER_HPP - -namespace yaSSL { - -typedef double timer_d; -typedef unsigned int uint; - - - -timer_d timer(); -uint lowResTimer(); - - - -} // namespace -#endif // yaSSL_TIMER_HPP diff --git a/externals/mysql/extlib/yassl/include/yassl.hpp b/externals/mysql/extlib/yassl/include/yassl.hpp deleted file mode 100644 index 29e0a5d94e..0000000000 --- a/externals/mysql/extlib/yassl/include/yassl.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* yaSSL externel header defines yaSSL API - */ - - -#ifndef yaSSL_EXT_HPP -#define yaSSL_EXT_HPP - - -namespace yaSSL { - - -#ifdef _WIN32 - typedef unsigned int SOCKET_T; -#else - typedef int SOCKET_T; -#endif - - -class Client { -public: - Client(); - ~Client(); - - // basics - int Connect(SOCKET_T); - int Write(const void*, int); - int Read(void*, int); - - // options - void SetCA(const char*); - void SetCert(const char*); - void SetKey(const char*); -private: - struct ClientImpl; - ClientImpl* pimpl_; - - Client(const Client&); // hide copy - Client& operator=(const Client&); // and assign -}; - - -class Server { -public: - Server(); - ~Server(); - - // basics - int Accept(SOCKET_T); - int Write(const void*, int); - int Read(void*, int); - - // options - void SetCA(const char*); - void SetCert(const char*); - void SetKey(const char*); -private: - struct ServerImpl; - ServerImpl* pimpl_; - - Server(const Server&); // hide copy - Server& operator=(const Server&); // and assign -}; - - -} // namespace yaSSL -#endif // yaSSL_EXT_HPP diff --git a/externals/mysql/extlib/yassl/include/yassl_error.hpp b/externals/mysql/extlib/yassl/include/yassl_error.hpp deleted file mode 100644 index 63fa9a761b..0000000000 --- a/externals/mysql/extlib/yassl/include/yassl_error.hpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* yaSSL error header defines error codes and an exception class - */ - -#ifndef yaSSL_ERROR_HPP -#define yaSSL_ERROR_HPP - - - -namespace yaSSL { - - -enum YasslError { - no_error = 0, - - // 10 - 47 from AlertDescription, 0 also close_notify - - range_error = 101, - realloc_error = 102, - factory_error = 103, - unknown_cipher = 104, - prefix_error = 105, - record_layer = 106, - handshake_layer = 107, - out_of_order = 108, - bad_input = 109, - match_error = 110, - no_key_file = 111, - verify_error = 112, - send_error = 113, - receive_error = 114, - certificate_error = 115, - privateKey_error = 116, - badVersion_error = 117, - compress_error = 118, - decompress_error = 119, - pms_version_error = 120 - - // !!!! add error message to .cpp !!!! - - // 1000+ from TaoCrypt error.hpp - -}; - - -enum Library { yaSSL_Lib = 0, CryptoLib, SocketLib }; -enum { MAX_ERROR_SZ = 80 }; - -void SetErrorString(YasslError, char*); - -/* remove for now, if go back to exceptions use this wrapper -// Base class for all yaSSL exceptions -class Error : public mySTL::runtime_error { - YasslError error_; - Library lib_; -public: - explicit Error(const char* s = "", YasslError e = no_error, - Library l = yaSSL_Lib); - - YasslError get_number() const; - Library get_lib() const; -}; -*/ - - -} // naemspace - -#endif // yaSSL_ERROR_HPP diff --git a/externals/mysql/extlib/yassl/include/yassl_imp.hpp b/externals/mysql/extlib/yassl/include/yassl_imp.hpp deleted file mode 100644 index 8893ba8a8b..0000000000 --- a/externals/mysql/extlib/yassl/include/yassl_imp.hpp +++ /dev/null @@ -1,748 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* yaSSL implementation header defines all strucutres from the SSL.v3 - * specification "draft-freier-ssl-version3-02.txt" - * all page citations refer to this document unless otherwise noted. - */ - - -#ifndef yaSSL_IMP_HPP -#define yaSSL_IMP_HPP - -#ifdef _MSC_VER - // disable truncated debug symbols - #pragma warning(disable:4786) -#endif - -#include "yassl_types.hpp" -#include "factory.hpp" -#include STL_LIST_FILE - - -namespace STL = STL_NAMESPACE; - - -namespace yaSSL { - - -class SSL; // forward decls -class input_buffer; -class output_buffer; - - -struct ProtocolVersion { - uint8 major_; - uint8 minor_; // major and minor SSL/TLS version numbers - - ProtocolVersion(uint8 maj = 3, uint8 min = 0); -}; - - -// Record Layer Header for PlainText, Compressed, and CipherText -struct RecordLayerHeader { - ContentType type_; - ProtocolVersion version_; - uint16 length_; // should not exceed 2^14 -}; - - -// base for all messages -struct Message : public virtual_base { - virtual input_buffer& set(input_buffer&) =0; - virtual output_buffer& get(output_buffer&) const =0; - - virtual void Process(input_buffer&, SSL&) =0; - virtual ContentType get_type() const =0; - virtual uint16 get_length() const =0; - - virtual ~Message() {} -}; - - -class ChangeCipherSpec : public Message { - CipherChoice type_; -public: - ChangeCipherSpec(); - - friend input_buffer& operator>>(input_buffer&, ChangeCipherSpec&); - friend output_buffer& operator<<(output_buffer&, const ChangeCipherSpec&); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - ContentType get_type() const; - uint16 get_length() const; - void Process(input_buffer&, SSL&); -private: - ChangeCipherSpec(const ChangeCipherSpec&); // hide copy - ChangeCipherSpec& operator=(const ChangeCipherSpec&); // and assign -}; - - - -class Alert : public Message { - AlertLevel level_; - AlertDescription description_; -public: - Alert() {} - Alert(AlertLevel al, AlertDescription ad); - - ContentType get_type() const; - uint16 get_length() const; - void Process(input_buffer&, SSL&); - - friend input_buffer& operator>>(input_buffer&, Alert&); - friend output_buffer& operator<<(output_buffer&, const Alert&); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; -private: - Alert(const Alert&); // hide copy - Alert& operator=(const Alert&); // and assign -}; - - -class Data : public Message { - uint16 length_; - opaque* buffer_; // read buffer used by fillData input - const opaque* write_buffer_; // write buffer used by output operator -public: - Data(); - Data(uint16 len, opaque* b); - - friend output_buffer& operator<<(output_buffer&, const Data&); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - ContentType get_type() const; - uint16 get_length() const; - void set_length(uint16 l); - opaque* set_buffer(); - void SetData(uint16, const opaque*); - void Process(input_buffer&, SSL&); -private: - Data(const Data&); // hide copy - Data& operator=(const Data&); // and assign -}; - - -uint32 c24to32(const uint24); // forward form internal header -void c32to24(uint32, uint24&); - - -// HandShake header, same for each message type from page 20/21 -class HandShakeHeader : public Message { - HandShakeType type_; - uint24 length_; // length of message -public: - HandShakeHeader() {} - - ContentType get_type() const; - uint16 get_length() const; - HandShakeType get_handshakeType() const; - void Process(input_buffer&, SSL&); - - void set_type(HandShakeType hst); - void set_length(uint32 u32); - - friend input_buffer& operator>>(input_buffer&, HandShakeHeader&); - friend output_buffer& operator<<(output_buffer&, const HandShakeHeader&); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; -private: - HandShakeHeader(const HandShakeHeader&); // hide copy - HandShakeHeader& operator=(const HandShakeHeader&); // and assign -}; - - -// Base Class for all handshake messages -class HandShakeBase : public virtual_base { - int length_; -public: - int get_length() const; - void set_length(int); - - // for building buffer's type field - virtual HandShakeType get_type() const =0; - - // handles dispactch of proper >> - virtual input_buffer& set(input_buffer& in) =0; - virtual output_buffer& get(output_buffer& out) const =0; - - virtual void Process(input_buffer&, SSL&) =0; - - virtual ~HandShakeBase() {} -}; - - -struct HelloRequest : public HandShakeBase { - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - void Process(input_buffer&, SSL&); - - HandShakeType get_type() const; -}; - - -// The Client's Hello Message from page 23 -class ClientHello : public HandShakeBase { - ProtocolVersion client_version_; - Random random_; - uint8 id_len_; // session id length - opaque session_id_[ID_LEN]; - uint16 suite_len_; // cipher suite length - opaque cipher_suites_[MAX_SUITE_SZ]; - uint8 comp_len_; // compression length - CompressionMethod compression_methods_; -public: - friend input_buffer& operator>>(input_buffer&, ClientHello&); - friend output_buffer& operator<<(output_buffer&, const ClientHello&); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - HandShakeType get_type() const; - void Process(input_buffer&, SSL&); - - const opaque* get_random() const; - friend void buildClientHello(SSL&, ClientHello&); - friend void ProcessOldClientHello(input_buffer& input, SSL& ssl); - - ClientHello(); - ClientHello(ProtocolVersion pv, bool useCompression); -private: - ClientHello(const ClientHello&); // hide copy - ClientHello& operator=(const ClientHello&); // and assign -}; - - - -// The Server's Hello Message from page 24 -class ServerHello : public HandShakeBase { - ProtocolVersion server_version_; - Random random_; - uint8 id_len_; // session id length - opaque session_id_[ID_LEN]; - opaque cipher_suite_[SUITE_LEN]; - CompressionMethod compression_method_; -public: - ServerHello(ProtocolVersion pv, bool useCompression); - ServerHello(); - - friend input_buffer& operator>>(input_buffer&, ServerHello&); - friend output_buffer& operator<<(output_buffer&, const ServerHello&); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - HandShakeType get_type() const; - void Process(input_buffer&, SSL&); - - const opaque* get_random() const; - friend void buildServerHello(SSL&, ServerHello&); -private: - ServerHello(const ServerHello&); // hide copy - ServerHello& operator=(const ServerHello&); // and assign -}; - - -class x509; - -// Certificate could be a chain -class Certificate : public HandShakeBase { - const x509* cert_; -public: - Certificate(); - explicit Certificate(const x509* cert); - friend output_buffer& operator<<(output_buffer&, const Certificate&); - - const opaque* get_buffer() const; - - // Process handles input, needs SSL - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - HandShakeType get_type() const; - void Process(input_buffer&, SSL&); -private: - Certificate(const Certificate&); // hide copy - Certificate& operator=(const Certificate&); // and assign -}; - - - -// RSA Public Key -struct ServerRSAParams { - opaque* rsa_modulus_; - opaque* rsa_exponent_; -}; - - -// Ephemeral Diffie-Hellman Parameters -class ServerDHParams { - int pSz_; - int gSz_; - int pubSz_; - opaque* p_; - opaque* g_; - opaque* Ys_; -public: - ServerDHParams(); - ~ServerDHParams(); - - int get_pSize() const; - int get_gSize() const; - int get_pubSize() const; - - const opaque* get_p() const; - const opaque* get_g() const; - const opaque* get_pub() const; - - opaque* alloc_p(int sz); - opaque* alloc_g(int sz); - opaque* alloc_pub(int sz); -private: - ServerDHParams(const ServerDHParams&); // hide copy - ServerDHParams& operator=(const ServerDHParams&); // and assign -}; - - -struct ServerKeyBase : public virtual_base { - virtual ~ServerKeyBase() {} - virtual void build(SSL&) {} - virtual void read(SSL&, input_buffer&) {} - virtual int get_length() const; - virtual opaque* get_serverKey() const; -}; - - -// Server random number for FORTEZZA KEA -struct Fortezza_Server : public ServerKeyBase { - opaque r_s_[FORTEZZA_MAX]; -}; - - -struct SignatureBase : public virtual_base { - virtual ~SignatureBase() {} -}; - -struct anonymous_sa : public SignatureBase {}; - - -struct Hashes { - uint8 md5_[MD5_LEN]; - uint8 sha_[SHA_LEN]; -}; - - -struct rsa_sa : public SignatureBase { - Hashes hashes_; -}; - - -struct dsa_sa : public SignatureBase { - uint8 sha_[SHA_LEN]; -}; - - -// Server's Diffie-Hellman exchange -class DH_Server : public ServerKeyBase { - ServerDHParams parms_; - opaque* signature_; - - int length_; // total length of message - opaque* keyMessage_; // total exchange message -public: - DH_Server(); - ~DH_Server(); - - void build(SSL&); - void read(SSL&, input_buffer&); - int get_length() const; - opaque* get_serverKey() const; -private: - DH_Server(const DH_Server&); // hide copy - DH_Server& operator=(const DH_Server&); // and assign -}; - - -// Server's RSA exchange -struct RSA_Server : public ServerKeyBase { - ServerRSAParams params_; - opaque* signature_; // signed rsa_sa hashes -}; - - -class ServerKeyExchange : public HandShakeBase { - ServerKeyBase* server_key_; -public: - explicit ServerKeyExchange(SSL&); - ServerKeyExchange(); - ~ServerKeyExchange(); - - void createKey(SSL&); - void build(SSL& ssl); - - const opaque* getKey() const; - int getKeyLength() const; - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - friend output_buffer& operator<<(output_buffer&, const ServerKeyExchange&); - - void Process(input_buffer&, SSL&); - HandShakeType get_type() const; -private: - ServerKeyExchange(const ServerKeyExchange&); // hide copy - ServerKeyExchange& operator=(const ServerKeyExchange&); // and assign -}; - - - -class CertificateRequest : public HandShakeBase { - ClientCertificateType certificate_types_[CERT_TYPES]; - int typeTotal_; - STL::list certificate_authorities_; -public: - CertificateRequest(); - ~CertificateRequest(); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - friend input_buffer& operator>>(input_buffer&, CertificateRequest&); - friend output_buffer& operator<<(output_buffer&, - const CertificateRequest&); - - void Process(input_buffer&, SSL&); - HandShakeType get_type() const; - - void Build(); -private: - CertificateRequest(const CertificateRequest&); // hide copy - CertificateRequest& operator=(const CertificateRequest&); // and assign -}; - - -struct ServerHelloDone : public HandShakeBase { - ServerHelloDone(); - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - void Process(input_buffer& input, SSL& ssl); - - HandShakeType get_type() const; -}; - - -struct PreMasterSecret { - opaque random_[SECRET_LEN]; // first two bytes Protocol Version -}; - - -struct ClientKeyBase : public virtual_base { - virtual ~ClientKeyBase() {} - virtual void build(SSL&) {} - virtual void read(SSL&, input_buffer&) {} - virtual int get_length() const; - virtual opaque* get_clientKey() const; -}; - - -class EncryptedPreMasterSecret : public ClientKeyBase { - opaque* secret_; - int length_; -public: - EncryptedPreMasterSecret(); - ~EncryptedPreMasterSecret(); - - void build(SSL&); - void read(SSL&, input_buffer&); - int get_length() const; - opaque* get_clientKey() const; - void alloc(int sz); -private: - // hide copy and assign - EncryptedPreMasterSecret(const EncryptedPreMasterSecret&); - EncryptedPreMasterSecret& operator=(const EncryptedPreMasterSecret&); -}; - - -// Fortezza Key Parameters from page 29 -// hard code lengths cause only used here -struct FortezzaKeys : public ClientKeyBase { - opaque y_c_ [128]; // client's Yc, public value - opaque r_c_ [128]; // client's Rc - opaque y_signature_ [40]; // DSS signed public key - opaque wrapped_client_write_key_ [12]; // wrapped by the TEK - opaque wrapped_server_write_key_ [12]; // wrapped by the TEK - opaque client_write_iv_ [24]; - opaque server_write_iv_ [24]; - opaque master_secret_iv_ [24]; // IV used to encrypt preMaster - opaque encrypted_preMasterSecret_[48]; // random & crypted by the TEK -}; - - - -// Diffie-Hellman public key from page 40/41 -class ClientDiffieHellmanPublic : public ClientKeyBase { - PublicValueEncoding public_value_encoding_; - int length_; // includes two byte length for message - opaque* Yc_; // length + Yc_ - // dh_Yc only if explicit, otherwise sent in certificate - enum { KEY_OFFSET = 2 }; -public: - ClientDiffieHellmanPublic(); - ~ClientDiffieHellmanPublic(); - - void build(SSL&); - void read(SSL&, input_buffer&); - int get_length() const; - opaque* get_clientKey() const; - void alloc(int sz, bool offset = false); -private: - // hide copy and assign - ClientDiffieHellmanPublic(const ClientDiffieHellmanPublic&); - ClientDiffieHellmanPublic& operator=(const ClientDiffieHellmanPublic&); -}; - - -class ClientKeyExchange : public HandShakeBase { - ClientKeyBase* client_key_; -public: - explicit ClientKeyExchange(SSL& ssl); - ClientKeyExchange(); - ~ClientKeyExchange(); - - void createKey(SSL&); - void build(SSL& ssl); - - const opaque* getKey() const; - int getKeyLength() const; - - friend output_buffer& operator<<(output_buffer&, const ClientKeyExchange&); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - HandShakeType get_type() const; - void Process(input_buffer&, SSL&); -private: - ClientKeyExchange(const ClientKeyExchange&); // hide copy - ClientKeyExchange& operator=(const ClientKeyExchange&); // and assign -}; - - -class CertificateVerify : public HandShakeBase { - Hashes hashes_; - byte* signature_; // owns -public: - CertificateVerify(); - ~CertificateVerify(); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - friend input_buffer& operator>>(input_buffer&, CertificateVerify&); - friend output_buffer& operator<<(output_buffer&, const CertificateVerify&); - - void Process(input_buffer&, SSL&); - HandShakeType get_type() const; - - void Build(SSL&); -private: - CertificateVerify(const CertificateVerify&); // hide copy - CertificateVerify& operator=(const CertificateVerify&); // and assign -}; - - -class Finished : public HandShakeBase { - Hashes hashes_; -public: - Finished(); - - uint8* set_md5(); - uint8* set_sha(); - - friend input_buffer& operator>>(input_buffer&, Finished&); - friend output_buffer& operator<<(output_buffer&, const Finished&); - - input_buffer& set(input_buffer& in); - output_buffer& get(output_buffer& out) const; - - void Process(input_buffer&, SSL&); - - HandShakeType get_type() const; -private: - Finished(const Finished&); // hide copy - Finished& operator=(const Finished&); // and assign -}; - - -class RandomPool; // forward for connection - - -// SSL Connection defined on page 11 -struct Connection { - opaque *pre_master_secret_; - opaque master_secret_[SECRET_LEN]; - opaque client_random_[RAN_LEN]; - opaque server_random_[RAN_LEN]; - opaque sessionID_[ID_LEN]; - opaque client_write_MAC_secret_[SHA_LEN]; // sha is max size - opaque server_write_MAC_secret_[SHA_LEN]; - opaque client_write_key_[AES_256_KEY_SZ]; // aes 256bit is max sz - opaque server_write_key_[AES_256_KEY_SZ]; - opaque client_write_IV_[AES_IV_SZ]; // aes is max size - opaque server_write_IV_[AES_IV_SZ]; - uint32 sequence_number_; - uint32 peer_sequence_number_; - uint32 pre_secret_len_; // pre master length - bool send_server_key_; // server key exchange? - bool master_clean_; // master secret clean? - bool TLS_; // TLSv1 or greater - bool TLSv1_1_; // TLSv1.1 or greater - bool sessionID_Set_; // do we have a session - bool compression_; // zlib compression? - ProtocolVersion version_; // negotiated version - ProtocolVersion chVersion_; // client hello version - RandomPool& random_; - - Connection(ProtocolVersion v, RandomPool& ran); - ~Connection(); - - void AllocPreSecret(uint sz); - void CleanPreMaster(); - void CleanMaster(); - void TurnOffTLS(); - void TurnOffTLS1_1(); -private: - Connection(const Connection&); // hide copy - Connection& operator=(const Connection&); // and assign -}; - - -struct Ciphers; // forward - - -// TLSv1 Security Spec, defined on page 56 of RFC 2246 -struct Parameters { - ConnectionEnd entity_; - BulkCipherAlgorithm bulk_cipher_algorithm_; - CipherType cipher_type_; - uint8 key_size_; - uint8 iv_size_; - IsExportable is_exportable_; - MACAlgorithm mac_algorithm_; - uint8 hash_size_; - CompressionMethod compression_algorithm_; - KeyExchangeAlgorithm kea_; // yassl additions - SignatureAlgorithm sig_algo_; // signature auth type - SignatureAlgorithm verify_algo_; // cert verify auth type - bool pending_; - bool resumable_; // new conns by session - uint16 encrypt_size_; // current msg encrypt sz - Cipher suite_[SUITE_LEN]; // choosen suite - uint8 suites_size_; - Cipher suites_[MAX_SUITE_SZ]; - char cipher_name_[MAX_SUITE_NAME]; - char cipher_list_[MAX_CIPHERS][MAX_SUITE_NAME]; - bool removeDH_; // for server's later use - - Parameters(ConnectionEnd, const Ciphers&, ProtocolVersion, bool haveDH); - - void SetSuites(ProtocolVersion pv, bool removeDH = false, - bool removeRSA = false, bool removeDSA = false); - void SetCipherNames(); -private: - Parameters(const Parameters&); // hide copy - Parameters& operator=(const Parameters&); // and assing -}; - - -input_buffer& operator>>(input_buffer&, RecordLayerHeader&); -output_buffer& operator<<(output_buffer&, const RecordLayerHeader&); - -input_buffer& operator>>(input_buffer&, Message&); -output_buffer& operator<<(output_buffer&, const Message&); - -input_buffer& operator>>(input_buffer&, HandShakeBase&); -output_buffer& operator<<(output_buffer&, const HandShakeBase&); - - -// Message Factory definition -// uses the ContentType enumeration for unique id -typedef Factory MessageFactory; -void InitMessageFactory(MessageFactory&); // registers derived classes - -// HandShake Factory definition -// uses the HandShakeType enumeration for unique id -typedef Factory HandShakeFactory; -void InitHandShakeFactory(HandShakeFactory&); // registers derived classes - -// ServerKey Factory definition -// uses KeyExchangeAlgorithm enumeration for unique id -typedef Factory ServerKeyFactory; -void InitServerKeyFactory(ServerKeyFactory&); - -// ClientKey Factory definition -// uses KeyExchangeAlgorithm enumeration for unique id -typedef Factory ClientKeyFactory; -void InitClientKeyFactory(ClientKeyFactory&); - - -// Message Creators -Message* CreateHandShake(); -Message* CreateCipherSpec(); -Message* CreateAlert(); -Message* CreateData(); - - -// HandShake Creators -HandShakeBase* CreateCertificate(); -HandShakeBase* CreateHelloRequest(); -HandShakeBase* CreateClientHello(); -HandShakeBase* CreateServerHello(); -HandShakeBase* CreateServerKeyExchange(); -HandShakeBase* CreateCertificateRequest(); -HandShakeBase* CreateServerHelloDone(); -HandShakeBase* CreateClientKeyExchange(); -HandShakeBase* CreateCertificateVerify(); -HandShakeBase* CreateFinished(); - - -// ServerKey Exchange Creators -ServerKeyBase* CreateRSAServerKEA(); -ServerKeyBase* CreateDHServerKEA(); -ServerKeyBase* CreateFortezzaServerKEA(); - -// ClientKey Exchange Creators -ClientKeyBase* CreateRSAClient(); -ClientKeyBase* CreateDHClient(); -ClientKeyBase* CreateFortezzaClient(); - - - -} // naemspace - -#endif // yaSSL_IMP_HPP diff --git a/externals/mysql/extlib/yassl/include/yassl_int.hpp b/externals/mysql/extlib/yassl/include/yassl_int.hpp deleted file mode 100644 index d18dc41860..0000000000 --- a/externals/mysql/extlib/yassl/include/yassl_int.hpp +++ /dev/null @@ -1,693 +0,0 @@ -/* - Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* yaSSL internal header defines SSL supporting types not specified in the - * draft along with type conversion functions and openssl compatibility - */ - - -#ifndef yaSSL_INT_HPP -#define yaSSL_INT_HPP - -#include "yassl_imp.hpp" -#include "yassl_error.hpp" -#include "crypto_wrapper.hpp" -#include "cert_wrapper.hpp" -#include "log.hpp" -#include "lock.hpp" -#include "openssl/ssl.h" // ASN1_STRING and DH - -// Check if _POSIX_THREADS should be forced -#if !defined(_POSIX_THREADS) && (defined(__NETWARE__) || defined(__hpux)) -// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented -// Netware supports pthreads but does not announce it -#define _POSIX_THREADS -#endif - -#ifdef _POSIX_THREADS - #include -#endif - - -namespace STL = STL_NAMESPACE; - - -namespace yaSSL { - - -// State Machine for Record Layer Protocol -enum RecordLayerState { - recordNotReady = 0, // fatal error, no more processing - recordReady -}; - - -// State Machine for HandShake Protocol -enum HandShakeState { - handShakeNotReady = 0, // fatal error, no more processing - preHandshake, // initial state - inHandshake, // handshake started - handShakeReady // handshake done -}; - - -// client input HandShake state, use if HandShakeState == inHandShake -enum ClientState { - serverNull = 0, - serverHelloComplete, - serverCertComplete, - serverKeyExchangeComplete, - serverHelloDoneComplete, - serverFinishedComplete -}; - - -// server input HandShake state, use if HandShakeState == inHandShake -enum ServerState { - clientNull = 0, - clientHelloComplete, - clientKeyExchangeComplete, - clientFinishedComplete -}; - - -// client connect state for nonblocking restart -enum ConnectState { - CONNECT_BEGIN = 0, - CLIENT_HELLO_SENT, - FIRST_REPLY_DONE, - FINISHED_DONE, - SECOND_REPLY_DONE -}; - - -// server accpet state for nonblocking restart -enum AcceptState { - ACCEPT_BEGIN = 0, - ACCEPT_FIRST_REPLY_DONE, - SERVER_HELLO_DONE, - ACCEPT_SECOND_REPLY_DONE, - ACCEPT_FINISHED_DONE, - ACCEPT_THIRD_REPLY_DONE -}; - - -// combines all states -class States { - RecordLayerState recordLayer_; - HandShakeState handshakeLayer_; - ClientState clientState_; - ServerState serverState_; - ConnectState connectState_; - AcceptState acceptState_; - char errorString_[MAX_ERROR_SZ]; - YasslError what_; -public: - States(); - - const RecordLayerState& getRecord() const; - const HandShakeState& getHandShake() const; - const ClientState& getClient() const; - const ServerState& getServer() const; - const ConnectState& GetConnect() const; - const AcceptState& GetAccept() const; - const char* getString() const; - YasslError What() const; - - RecordLayerState& useRecord(); - HandShakeState& useHandShake(); - ClientState& useClient(); - ServerState& useServer(); - ConnectState& UseConnect(); - AcceptState& UseAccept(); - char* useString(); - void SetError(YasslError); -private: - States(const States&); // hide copy - States& operator=(const States&); // and assign -}; - - -// holds all factories -class sslFactory { - MessageFactory messageFactory_; // creates new messages by type - HandShakeFactory handShakeFactory_; // creates new handshake types - ServerKeyFactory serverKeyFactory_; // creates new server key types - ClientKeyFactory clientKeyFactory_; // creates new client key types - - sslFactory(); // only GetSSL_Factory creates -public: - const MessageFactory& getMessage() const; - const HandShakeFactory& getHandShake() const; - const ServerKeyFactory& getServerKey() const; - const ClientKeyFactory& getClientKey() const; - - friend sslFactory& GetSSL_Factory(); // singleton creator -private: - sslFactory(const sslFactory&); // hide copy - sslFactory& operator=(const sslFactory&); // and assign -}; - - -#undef X509_NAME // wincrypt.h clash - -// openSSL X509 names -class X509_NAME { - char* name_; - size_t sz_; - ASN1_STRING entry_; -public: - X509_NAME(const char*, size_t sz); - ~X509_NAME(); - - const char* GetName() const; - ASN1_STRING* GetEntry(int i); - size_t GetLength() const; -private: - X509_NAME(const X509_NAME&); // hide copy - X509_NAME& operator=(const X509_NAME&); // and assign -}; - - -class StringHolder { - ASN1_STRING asnString_; -public: - StringHolder(const char* str, int sz); - ~StringHolder(); - - ASN1_STRING* GetString(); -private: - StringHolder(const StringHolder&); // hide copy - StringHolder& operator=(const StringHolder&); // and assign -}; - - -// openSSL X509 -class X509 { - X509_NAME issuer_; - X509_NAME subject_; - StringHolder beforeDate_; // not valid before - StringHolder afterDate_; // not valid after -public: - X509(const char* i, size_t, const char* s, size_t, - const char* b, int, const char* a, int); - ~X509() {} - - X509_NAME* GetIssuer(); - X509_NAME* GetSubject(); - - ASN1_STRING* GetBefore(); - ASN1_STRING* GetAfter(); - -private: - X509(const X509&); // hide copy - X509& operator=(const X509&); // and assign -}; - - -// openSSL bignum -struct BIGNUM { - /* - gcc 2.96 fix: because of two Integer classes (yaSSL::Integer and - TaoCrypt::Integer), we need to explicitly state the namespace - here to let gcc 2.96 deduce the correct type. - */ - yaSSL::Integer int_; - void assign(const byte* b, uint s) { int_.assign(b,s); } -}; - - -// openSSL session -class SSL_SESSION { - opaque sessionID_[ID_LEN]; - opaque master_secret_[SECRET_LEN]; - Cipher suite_[SUITE_LEN]; - uint bornOn_; // create time in seconds - uint timeout_; // timeout in seconds - RandomPool& random_; // will clean master secret - X509* peerX509_; -public: - explicit SSL_SESSION(RandomPool&); - SSL_SESSION(const SSL&, RandomPool&); - ~SSL_SESSION(); - - const opaque* GetID() const; - const opaque* GetSecret() const; - const Cipher* GetSuite() const; - uint GetBornOn() const; - uint GetTimeOut() const; - X509* GetPeerX509() const; - void SetTimeOut(uint); - - SSL_SESSION& operator=(const SSL_SESSION&); // allow assign for resumption -private: - SSL_SESSION(const SSL_SESSION&); // hide copy - - void CopyX509(X509*); -}; - - -// holds all sessions -class Sessions { - STL::list list_; - RandomPool random_; // for session cleaning - Mutex mutex_; // no-op for single threaded - int count_; // flush counter - - Sessions() : count_(0) {} // only GetSessions can create -public: - SSL_SESSION* lookup(const opaque*, SSL_SESSION* copy = 0); - void add(const SSL&); - void remove(const opaque*); - void Flush(); - - ~Sessions(); - - friend Sessions& GetSessions(); // singleton creator -private: - Sessions(const Sessions&); // hide copy - Sessions& operator=(const Sessions&); // and assign -}; - - -#ifdef _POSIX_THREADS - typedef pthread_t THREAD_ID_T; -#else - typedef DWORD THREAD_ID_T; -#endif - -// thread error data -struct ThreadError { - THREAD_ID_T threadID_; - int errorID_; -}; - - -// holds all errors -class Errors { - STL::list list_; - Mutex mutex_; - - Errors() {} // only GetErrors can create -public: - int Lookup(bool peek); // self lookup - void Add(int); - void Remove(); // remove self - - ~Errors() {} - - friend Errors& GetErrors(); // singleton creator -private: - Errors(const Errors&); // hide copy - Errors& operator=(const Errors); // and assign -}; - - -Sessions& GetSessions(); // forward singletons -sslFactory& GetSSL_Factory(); -Errors& GetErrors(); - - -// openSSL method and context types -class SSL_METHOD { - ProtocolVersion version_; - ConnectionEnd side_; - bool verifyPeer_; // request or send certificate - bool verifyNone_; // whether to verify certificate - bool failNoCert_; - bool multipleProtocol_; // for SSLv23 compatibility -public: - SSL_METHOD(ConnectionEnd ce, ProtocolVersion pv, - bool multipleProtocol = false); - - ProtocolVersion getVersion() const; - ConnectionEnd getSide() const; - - void setVerifyPeer(); - void setVerifyNone(); - void setFailNoCert(); - - bool verifyPeer() const; - bool verifyNone() const; - bool failNoCert() const; - bool multipleProtocol() const; -private: - SSL_METHOD(const SSL_METHOD&); // hide copy - SSL_METHOD& operator=(const SSL_METHOD&); // and assign -}; - - -struct Ciphers { - bool setSuites_; // user set suites from default - byte suites_[MAX_SUITE_SZ]; // new suites - int suiteSz_; // suite length in bytes - - Ciphers() : setSuites_(false), suiteSz_(0) {} -}; - - -struct DH; // forward - - -// save for SSL construction -struct DH_Parms { - Integer p_; - Integer g_; - bool set_; // if set by user - - DH_Parms() : set_(false) {} -}; - - -enum StatsField { - Accept, Connect, AcceptGood, ConnectGood, AcceptRenegotiate, - ConnectRenegotiate, Hits, CbHits, CacheFull, Misses, Timeouts, Number, - GetCacheSize, VerifyMode, VerifyDepth -}; - - -// SSL stats -struct Stats { - long accept_; - long connect_; - long acceptGood_; - long connectGood_; - long acceptRenegotiate_; - long connectRenegotiate_; - - long hits_; - long cbHits_; - long cacheFull_; - long misses_; - long timeouts_; - long number_; - long getCacheSize_; - - int verifyMode_; - int verifyDepth_; -public: - Stats() : accept_(0), connect_(0), acceptGood_(0), connectGood_(0), - acceptRenegotiate_(0), connectRenegotiate_(0), hits_(0), cbHits_(0), - cacheFull_(0), misses_(0), timeouts_(0), number_(0), getCacheSize_(0), - verifyMode_(0), verifyDepth_(0) - {} -private: - Stats(const Stats&); // hide copy - Stats& operator=(const Stats&); // and assign -}; - - -// the SSL context -class SSL_CTX { -public: - typedef STL::list CertList; -private: - SSL_METHOD* method_; - x509* certificate_; - x509* privateKey_; - CertList caList_; - Ciphers ciphers_; - DH_Parms dhParms_; - pem_password_cb passwordCb_; - void* userData_; - bool sessionCacheOff_; - bool sessionCacheFlushOff_; - Stats stats_; - Mutex mutex_; // for Stats - VerifyCallback verifyCallback_; -public: - explicit SSL_CTX(SSL_METHOD* meth); - ~SSL_CTX(); - - const x509* getCert() const; - const x509* getKey() const; - const SSL_METHOD* getMethod() const; - const Ciphers& GetCiphers() const; - const DH_Parms& GetDH_Parms() const; - const Stats& GetStats() const; - const VerifyCallback getVerifyCallback() const; - pem_password_cb GetPasswordCb() const; - void* GetUserData() const; - bool GetSessionCacheOff() const; - bool GetSessionCacheFlushOff() const; - - void setVerifyPeer(); - void setVerifyNone(); - void setFailNoCert(); - void setVerifyCallback(VerifyCallback); - bool SetCipherList(const char*); - bool SetDH(const DH&); - void SetPasswordCb(pem_password_cb cb); - void SetUserData(void*); - void SetSessionCacheOff(); - void SetSessionCacheFlushOff(); - - void IncrementStats(StatsField); - void AddCA(x509* ca); - const CertList& GetCA_List() const; - - friend int read_file(SSL_CTX*, const char*, int, CertType); -private: - SSL_CTX(const SSL_CTX&); // hide copy - SSL_CTX& operator=(const SSL_CTX&); // and assign -}; - - -// holds all cryptographic types -class Crypto { - Digest* digest_; // agreed upon digest - BulkCipher* cipher_; // agreed upon cipher - DiffieHellman* dh_; // dh parms - RandomPool random_; // random number generator - CertManager cert_; // manages certificates -public: - explicit Crypto(); - ~Crypto(); - - const Digest& get_digest() const; - const BulkCipher& get_cipher() const; - const DiffieHellman& get_dh() const; - const RandomPool& get_random() const; - const CertManager& get_certManager() const; - - Digest& use_digest(); - BulkCipher& use_cipher(); - DiffieHellman& use_dh(); - RandomPool& use_random(); - CertManager& use_certManager(); - - void SetDH(DiffieHellman*); - void SetDH(const DH_Parms&); - void setDigest(Digest*); - void setCipher(BulkCipher*); - - bool DhSet(); -private: - Crypto(const Crypto&); // hide copy - Crypto& operator=(const Crypto&); // and assign -}; - - -// holds all handshake and verify hashes -class sslHashes { - MD5 md5HandShake_; // md5 handshake hash - SHA shaHandShake_; // sha handshake hash - Finished verify_; // peer's verify hash - Hashes certVerify_; // peer's cert verify hash -public: - sslHashes() {} - - const MD5& get_MD5() const; - const SHA& get_SHA() const; - const Finished& get_verify() const; - const Hashes& get_certVerify() const; - - MD5& use_MD5(); - SHA& use_SHA(); - Finished& use_verify(); - Hashes& use_certVerify(); -private: - sslHashes(const sslHashes&); // hide copy - sslHashes& operator=(const sslHashes&); // and assign -}; - - -// holds input and output buffers -class Buffers { -public: - typedef STL::list inputList; - typedef STL::list outputList; -private: - inputList dataList_; // list of users app data / handshake - outputList handShakeList_; // buffered handshake msgs - input_buffer* rawInput_; // buffered raw input yet to process -public: - Buffers(); - ~Buffers(); - - const inputList& getData() const; - const outputList& getHandShake() const; - - inputList& useData(); - outputList& useHandShake(); - - void SetRawInput(input_buffer*); // takes ownership - input_buffer* TakeRawInput(); // takes ownership -private: - Buffers(const Buffers&); // hide copy - Buffers& operator=(const Buffers&); // and assign -}; - - -// wraps security parameters -class Security { - Connection conn_; // connection information - Parameters parms_; // may be pending - SSL_SESSION resumeSession_; // if resuming - SSL_CTX* ctx_; // context used to init - bool resuming_; // trying to resume -public: - Security(ProtocolVersion, RandomPool&, ConnectionEnd, const Ciphers&, - SSL_CTX*, bool); - - const SSL_CTX* GetContext() const; - const Connection& get_connection() const; - const Parameters& get_parms() const; - const SSL_SESSION& get_resume() const; - bool get_resuming() const; - - Connection& use_connection(); - Parameters& use_parms(); - SSL_SESSION& use_resume(); - - void set_resuming(bool b); -private: - Security(const Security&); // hide copy - Security& operator=(const Security&); // and assign -}; - - -// THE SSL type -class SSL { - Crypto crypto_; // agreed crypto agents - Security secure_; // Connection and Session parms - States states_; // Record and HandShake states - sslHashes hashes_; // handshake, finished hashes - Socket socket_; // socket wrapper - Buffers buffers_; // buffered handshakes and data - Log log_; // logger - bool quietShutdown_; - - // optimization variables - bool has_data_; // buffered data ready? -public: - SSL(SSL_CTX* ctx); - - // gets and uses - const Crypto& getCrypto() const; - const Security& getSecurity() const; - const States& getStates() const; - const sslHashes& getHashes() const; - const sslFactory& getFactory() const; - const Socket& getSocket() const; - YasslError GetError() const; - bool GetMultiProtocol() const; - bool CompressionOn() const; - - Crypto& useCrypto(); - Security& useSecurity(); - States& useStates(); - sslHashes& useHashes(); - Socket& useSocket(); - Log& useLog(); - Buffers& useBuffers(); - - bool HasData() const; - bool GetQuietShutdown() const; - - // sets - void set_pending(Cipher suite); - void set_random(const opaque*, ConnectionEnd); - void set_sessionID(const opaque*); - void set_session(SSL_SESSION*); - void set_preMaster(const opaque*, uint); - void set_masterSecret(const opaque*); - void SetError(YasslError); - int SetCompression(); - void UnSetCompression(); - void SetQuietShutdown(bool mode); - - // helpers - bool isTLS() const; - bool isTLSv1_1() const; - void order_error(); - void makeMasterSecret(); - void makeTLSMasterSecret(); - void addData(input_buffer* data); - void fillData(Data&); - void PeekData(Data&); - void addBuffer(output_buffer* b); - void flushBuffer(); - void verifyState(const RecordLayerHeader&); - void verifyState(const HandShakeHeader&); - void verifyState(ClientState); - void verifyState(ServerState); - void verfiyHandShakeComplete(); - void matchSuite(const opaque*, uint length); - void deriveKeys(); - void deriveTLSKeys(); - void Send(const byte*, uint); - - uint bufferedData(); - uint get_SEQIncrement(bool); - - const byte* get_macSecret(bool); -private: - void storeKeys(const opaque*); - void setKeys(); - void verifyClientState(HandShakeType); - void verifyServerState(HandShakeType); - - SSL(const SSL&); // hide copy - const SSL& operator=(const SSL&); // and assign -}; - - -// compression -int Compress(const byte*, int, input_buffer&); -int DeCompress(input_buffer&, int, input_buffer&); - - -// conversion functions -void c32to24(uint32, uint24&); -void c24to32(const uint24, uint32&); - -uint32 c24to32(const uint24); - -void ato16(const opaque*, uint16&); -void ato24(const opaque*, uint24&); - -void c16toa(uint16, opaque*); -void c24toa(const uint24, opaque*); -void c32toa(uint32 u32, opaque*); - - -} // naemspace - -#endif // yaSSL_INT_HPP diff --git a/externals/mysql/extlib/yassl/include/yassl_types.hpp b/externals/mysql/extlib/yassl/include/yassl_types.hpp deleted file mode 100644 index 1af9e90f90..0000000000 --- a/externals/mysql/extlib/yassl/include/yassl_types.hpp +++ /dev/null @@ -1,528 +0,0 @@ -/* - Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* yaSSL types header defines all constants, enums, and typedefs - * from the SSL.v3 specification "draft-freier-ssl-version3-02.txt" - */ - - -#ifndef yaSSL_TYPES_HPP -#define yaSSL_TYPES_HPP - -#include -#include -#include "type_traits.hpp" - - -#ifdef _MSC_VER - // disable conversion warning - // 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy - #pragma warning(disable:4244 4996) -#endif - - -namespace yaSSL { - -#define YASSL_LIB - - -#ifdef YASSL_PURE_C - - // library allocation - struct new_t {}; // yaSSL New type - extern new_t ys; // pass in parameter - - } // namespace yaSSL - - void* operator new (size_t, yaSSL::new_t); - void* operator new[](size_t, yaSSL::new_t); - - void operator delete (void*, yaSSL::new_t); - void operator delete[](void*, yaSSL::new_t); - - - namespace yaSSL { - - - template - void ysDelete(T* ptr) - { - if (ptr) ptr->~T(); - ::operator delete(ptr, yaSSL::ys); - } - - template - void ysArrayDelete(T* ptr) - { - // can't do array placement destruction since not tracking size in - // allocation, only allow builtins to use array placement since they - // don't need destructors called - typedef char builtin[TaoCrypt::IsFundamentalType::Yes ? 1 : -1]; - (void)sizeof(builtin); - - ::operator delete[](ptr, yaSSL::ys); - } - - #define NEW_YS new (yaSSL::ys) - - // to resolve compiler generated operator delete on base classes with - // virtual destructors (when on stack), make sure doesn't get called - class virtual_base { - public: - static void operator delete(void*) { assert(0); } - }; - - -#else // YASSL_PURE_C - - - template - void ysDelete(T* ptr) - { - delete ptr; - } - - template - void ysArrayDelete(T* ptr) - { - delete[] ptr; - } - - #define NEW_YS new - - class virtual_base {}; - - - -#endif // YASSL_PURE_C - - -typedef unsigned char uint8; -typedef unsigned short uint16; -typedef unsigned int uint32; -typedef uint8 uint24[3]; -typedef uint32 uint64[2]; - -typedef uint8 opaque; -typedef opaque byte; - -typedef unsigned int uint; - - -#ifdef USE_SYS_STL - // use system STL - #define STL_VECTOR_FILE - #define STL_LIST_FILE - #define STL_ALGORITHM_FILE - #define STL_MEMORY_FILE - #define STL_PAIR_FILE - - #define STL_NAMESPACE std -#else - // use mySTL - #define STL_VECTOR_FILE "vector.hpp" - #define STL_LIST_FILE "list.hpp" - #define STL_ALGORITHM_FILE "algorithm.hpp" - #define STL_MEMORY_FILE "memory.hpp" - #define STL_PAIR_FILE "pair.hpp" - - #define STL_NAMESPACE mySTL -#endif - - -#ifndef min -template -T min(T a, T b) -{ - return a < b ? a : b; -} -#endif - - - -// all length constants in bytes -const int ID_LEN = 32; // session id length -const int SUITE_LEN = 2; // cipher suite length -const int SECRET_LEN = 48; // pre RSA and all master secret length -const int MASTER_ROUNDS = 3; // master secret derivation rounds -const int RAN_LEN = 32; // client and server random length -const int MAC_BLOCK_SZ = 64; // MAC block size, & padding -const int MD5_LEN = 16; // MD5 digest length -const int SHA_LEN = 20; // SHA digest length -const int RMD_LEN = 20; // RIPEMD-160 digest length -const int PREFIX = 3; // up to 3 prefix letters for secret rounds -const int KEY_PREFIX = 7; // up to 7 prefix letters for key rounds -const int FORTEZZA_MAX = 128; // Maximum Fortezza Key length -const int MAX_SUITE_SZ = 128; // 64 max suites * sizeof(suite) -const int MAX_SUITE_NAME = 48; // max length of suite name -const int MAX_CIPHERS = 32; // max supported ciphers for cipher list -const int SIZEOF_ENUM = 1; // SSL considers an enum 1 byte, not 4 -const int SIZEOF_SENDER = 4; // Sender constant, for finished generation -const int PAD_MD5 = 48; // pad length 1 and 2 for md5 finished -const int PAD_SHA = 40; // should be 44, specd wrong by netscape -const int PAD_RMD = 44; // pad length for RIPEMD-160, some use 40?? -const int CERT_HEADER = 3; // always use 3 bytes for certificate -const int CERT_TYPES = 7; // certificate request types -const int REQUEST_HEADER = 2; // request uses 2 bytes -const int VERIFY_HEADER = 2; // verify length field -const int MIN_CERT_TYPES = 1; // minimum certificate request types -const int MIN_DIS_NAMES = 3; // minimum distinguished names -const int MIN_DIS_SIZE = 1; // minimum distinguished name size -const int RECORD_HEADER = 5; // type + version + length(2) -const int HANDSHAKE_HEADER = 4; // type + length(3) -const int FINISHED_SZ = MD5_LEN + SHA_LEN; // sizeof finished data -const int TLS_FINISHED_SZ = 12; // TLS verify data size -const int SEQ_SZ = 8; // 64 bit sequence number -const int LENGTH_SZ = 2; // length field for HMAC, data only -const int VERSION_SZ = SIZEOF_ENUM * 2; // SSL/TLS length of version -const int DES_KEY_SZ = 8; // DES Key length -const int DES_EDE_KEY_SZ = 24; // DES EDE Key length -const int DES_BLOCK = 8; // DES is always fixed block size 8 -const int DES_IV_SZ = DES_BLOCK; // Init Vector length for DES -const int RC4_KEY_SZ = 16; // RC4 Key length -const int AES_128_KEY_SZ = 16; // AES 128bit Key length -const int AES_192_KEY_SZ = 24; // AES 192bit Key length -const int AES_256_KEY_SZ = 32; // AES 256bit Key length -const int AES_BLOCK_SZ = 16; // AES 128bit block size, rfc 3268 -const int AES_IV_SZ = AES_BLOCK_SZ; // AES Init Vector length -const int DSS_SIG_SZ = 40; // two 20 byte high byte first Integers -const int DSS_ENCODED_EXTRA = 6; // seqID + len(1) + (intID + len(1)) * 2 -const int EVP_SALT_SZ = 8; -const int MASTER_LABEL_SZ = 13; // TLS master secret label size -const int KEY_LABEL_SZ = 13; // TLS key block expansion size -const int FINISHED_LABEL_SZ = 15; // TLS finished lable length -const int SEED_LEN = RAN_LEN * 2; // TLS seed, client + server random -const int DEFAULT_TIMEOUT = 500; // Default Session timeout in seconds -const int MAX_RECORD_SIZE = 16384; // 2^14, max size by standard -const int COMPRESS_EXTRA = 1024; // extra compression possible addition -const int SESSION_FLUSH_COUNT = 256; // when to flush session cache - - -typedef uint8 Cipher; // first byte is always 0x00 for SSLv3 & TLS - -typedef opaque Random[RAN_LEN]; - -typedef opaque* DistinguishedName; - -typedef bool IsExportable; - - -enum CompressionMethod { no_compression = 0, zlib = 221 }; - -enum CipherType { stream, block }; - -enum CipherChoice { change_cipher_spec_choice = 1 }; - -enum PublicValueEncoding { implicit_encoding, explicit_encoding }; - -enum ConnectionEnd { server_end, client_end }; - -enum AlertLevel { warning = 1, fatal = 2 }; - - - -// Record Layer Header identifier from page 12 -enum ContentType { - no_type = 0, - change_cipher_spec = 20, - alert = 21, - handshake = 22, - application_data = 23 -}; - - -// HandShake Layer Header identifier from page 20 -enum HandShakeType { - no_shake = -1, - hello_request = 0, - client_hello = 1, - server_hello = 2, - certificate = 11, - server_key_exchange = 12, - certificate_request = 13, - server_hello_done = 14, - certificate_verify = 15, - client_key_exchange = 16, - finished = 20 -}; - - -// Valid Alert types from page 16/17 -enum AlertDescription { - close_notify = 0, - unexpected_message = 10, - bad_record_mac = 20, - decompression_failure = 30, - handshake_failure = 40, - no_certificate = 41, - bad_certificate = 42, - unsupported_certificate = 43, - certificate_revoked = 44, - certificate_expired = 45, - certificate_unknown = 46, - illegal_parameter = 47 -}; - - -// Supported Key Exchange Protocols -enum KeyExchangeAlgorithm { - no_kea = 0, - rsa_kea, - diffie_hellman_kea, - fortezza_kea -}; - - -// Supported Authentication Schemes -enum SignatureAlgorithm { - anonymous_sa_algo = 0, - rsa_sa_algo, - dsa_sa_algo -}; - - -// Valid client certificate request types from page 27 -enum ClientCertificateType { - rsa_sign = 1, - dss_sign = 2, - rsa_fixed_dh = 3, - dss_fixed_dh = 4, - rsa_ephemeral_dh = 5, - dss_ephemeral_dh = 6, - fortezza_kea_cert = 20 -}; - - -// Supported Ciphers from page 43 -enum BulkCipherAlgorithm { - cipher_null, - rc4, - rc2, - des, - triple_des, // leading 3 (3des) not valid identifier - des40, - idea, - aes -}; - - -// Supported Message Authentication Codes from page 43 -enum MACAlgorithm { - no_mac, - md5, - sha, - rmd -}; - - -// Certificate file Type -enum CertType { Cert = 0, PrivateKey, CA }; - - -// all Cipher Suites from pages 41/42 -const Cipher SSL_NULL_WITH_NULL_NULL = 0; // { 0x00, 0x00 } -const Cipher SSL_RSA_WITH_NULL_MD5 = 1; // { 0x00, 0x01 } -const Cipher SSL_RSA_WITH_NULL_SHA = 2; // { 0x00, 0x02 } -const Cipher SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; // { 0x00, 0x03 } -const Cipher SSL_RSA_WITH_RC4_128_MD5 = 4; // { 0x00, 0x04 } -const Cipher SSL_RSA_WITH_RC4_128_SHA = 5; // { 0x00, 0x05 } -const Cipher SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; // { 0x00, 0x06 } -const Cipher SSL_RSA_WITH_IDEA_CBC_SHA = 7; // { 0x00, 0x07 } -const Cipher SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; // { 0x00, 0x08 } -const Cipher SSL_RSA_WITH_DES_CBC_SHA = 9; // { 0x00, 0x09 } -const Cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; // { 0x00, 0x0A } -const Cipher SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; // { 0x00, 0x0B } -const Cipher SSL_DH_DSS_WITH_DES_CBC_SHA = 12; // { 0x00, 0x0C } -const Cipher SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; // { 0x00, 0x0D } -const Cipher SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; // { 0x00, 0x0E } -const Cipher SSL_DH_RSA_WITH_DES_CBC_SHA = 15; // { 0x00, 0x0F } -const Cipher SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; // { 0x00, 0x10 } -const Cipher SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; // { 0x00, 0x11 } -const Cipher SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; // { 0x00, 0x12 } -const Cipher SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; // { 0x00, 0x13 } -const Cipher SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; // { 0x00, 0x14 } -const Cipher SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; // { 0x00, 0x15 } -const Cipher SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; // { 0x00, 0x16 } -const Cipher SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; // { 0x00, 0x17 } -const Cipher SSL_DH_anon_WITH_RC4_128_MD5 = 24; // { 0x00, 0x18 } -const Cipher SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; // { 0x00, 0x19 } -const Cipher SSL_DH_anon_WITH_DES_CBC_SHA = 26; // { 0x00, 0x1A } -const Cipher SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; // { 0x00, 0x1B } -const Cipher SSL_FORTEZZA_KEA_WITH_NULL_SHA = 28; // { 0x00, 0x1C } -const Cipher SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA = 29; // { 0x00, 0x1D } -const Cipher SSL_FORTEZZA_KEA_WITH_RC4_128_SHA = 30; // { 0x00, 0x1E } - -// .. to 0x2B uses Kerberos Authentication - - -// TLS AES extensions -const Cipher TLS_RSA_WITH_AES_128_CBC_SHA = 47; // { 0x00, 0x2F } -const Cipher TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; // { 0x00, 0x30 } -const Cipher TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; // { 0x00, 0x31 } -const Cipher TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; // { 0x00, 0x32 } -const Cipher TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; // { 0x00, 0x33 } -const Cipher TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; // { 0x00, 0x34 } - -const Cipher TLS_RSA_WITH_AES_256_CBC_SHA = 53; // { 0x00, 0x35 } -const Cipher TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; // { 0x00, 0x36 } -const Cipher TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; // { 0x00, 0x37 } -const Cipher TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; // { 0x00, 0x38 } -const Cipher TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; // { 0x00, 0x39 } -const Cipher TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; // { 0x00, 0x3A } - - -// OpenPGP extensions - -const Cipher TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160 = 114; // { 0x00, 0x72 }; -const Cipher TLS_DHE_DSS_WITH_AES_128_CBC_RMD160 = 115; // { 0x00, 0x73 }; -const Cipher TLS_DHE_DSS_WITH_AES_256_CBC_RMD160 = 116; // { 0x00, 0x74 }; -const Cipher TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160 = 119; // { 0x00, 0x77 }; -const Cipher TLS_DHE_RSA_WITH_AES_128_CBC_RMD160 = 120; // { 0x00, 0x78 }; -const Cipher TLS_DHE_RSA_WITH_AES_256_CBC_RMD160 = 121; // { 0x00, 0x79 }; -const Cipher TLS_RSA_WITH_3DES_EDE_CBC_RMD160 = 124; // { 0x00, 0x7C }; -const Cipher TLS_RSA_WITH_AES_128_CBC_RMD160 = 125; // { 0x00, 0x7D }; -const Cipher TLS_RSA_WITH_AES_256_CBC_RMD160 = 126; // { 0x00, 0x7E }; - - -const char* const null_str = ""; - -const char* const cipher_names[128] = -{ - null_str, // SSL_NULL_WITH_NULL_NULL = 0 - null_str, // SSL_RSA_WITH_NULL_MD5 = 1 - null_str, // SSL_RSA_WITH_NULL_SHA = 2 - null_str, // SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3 - "RC4-MD5", // SSL_RSA_WITH_RC4_128_MD5 = 4 - "RC4-SHA", // SSL_RSA_WITH_RC4_128_SHA = 5 - null_str, // SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6 - null_str, // SSL_RSA_WITH_IDEA_CBC_SHA = 7 - null_str, // SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8 - "DES-CBC-SHA", // SSL_RSA_WITH_DES_CBC_SHA = 9 - "DES-CBC3-SHA", // SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10 - - null_str, // SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11 - null_str, // SSL_DH_DSS_WITH_DES_CBC_SHA = 12 - null_str, // SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13 - null_str, // SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14 - null_str, // SSL_DH_RSA_WITH_DES_CBC_SHA = 15 - null_str, // SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16 - null_str, // SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17 - "EDH-DSS-DES-CBC-SHA", // SSL_DHE_DSS_WITH_DES_CBC_SHA = 18 - "EDH-DSS-DES-CBC3-SHA", // SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19 - null_str, // SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20 - - "EDH-RSA-DES-CBC-SHA", // SSL_DHE_RSA_WITH_DES_CBC_SHA = 21 - "EDH-RSA-DES-CBC3-SHA", // SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22 - null_str, // SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23 - null_str, // SSL_DH_anon_WITH_RC4_128_MD5 = 24 - null_str, // SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25 - null_str, // SSL_DH_anon_WITH_DES_CBC_SHA = 26 - null_str, // SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27 - null_str, // SSL_FORTEZZA_KEA_WITH_NULL_SHA = 28 - null_str, // SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA = 29 - null_str, // SSL_FORTEZZA_KEA_WITH_RC4_128_SHA = 30 - - null_str, null_str, null_str, null_str, null_str, // 31 - 35 - null_str, null_str, null_str, null_str, null_str, // 36 - 40 - null_str, null_str, null_str, null_str, null_str, // 41 - 45 - null_str, // 46 - - // TLS AES extensions - "AES128-SHA", // TLS_RSA_WITH_AES_128_CBC_SHA = 47 - null_str, // TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48 - null_str, // TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49 - "DHE-DSS-AES128-SHA", // TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50 - "DHE-RSA-AES128-SHA", // TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51 - null_str, // TLS_DH_anon_WITH_AES_128_CBC_SHA = 52 - - "AES256-SHA", // TLS_RSA_WITH_AES_256_CBC_SHA = 53 - null_str, // TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54 - null_str, // TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55 - "DHE-DSS-AES256-SHA", // TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56 - "DHE-RSA-AES256-SHA", // TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57 - null_str, // TLS_DH_anon_WITH_AES_256_CBC_SHA = 58 - - null_str, // 59 - null_str, // 60 - null_str, null_str, null_str, null_str, null_str, // 61 - 65 - null_str, null_str, null_str, null_str, null_str, // 66 - 70 - null_str, null_str, null_str, null_str, null_str, // 71 - 75 - null_str, null_str, null_str, null_str, null_str, // 76 - 80 - null_str, null_str, null_str, null_str, null_str, // 81 - 85 - null_str, null_str, null_str, null_str, null_str, // 86 - 90 - null_str, null_str, null_str, null_str, null_str, // 91 - 95 - null_str, null_str, null_str, null_str, null_str, // 96 - 100 - null_str, null_str, null_str, null_str, null_str, // 101 - 105 - null_str, null_str, null_str, null_str, null_str, // 106 - 110 - null_str, null_str, null_str, // 111 - 113 - - "DHE-DSS-DES-CBC3-RMD", // TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160 = 114 - "DHE-DSS-AES128-RMD", // TLS_DHE_DSS_WITH_AES_128_CBC_RMD160 = 115 - "DHE-DSS-AES256-RMD", // TLS_DHE_DSS_WITH_AES_256_CBC_RMD160 = 116 - null_str, // 117 - null_str, // 118 - "DHE-RSA-DES-CBC3-RMD", // TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160 = 119 - "DHE-RSA-AES128-RMD", // TLS_DHE_RSA_WITH_AES_128_CBC_RMD160 = 120 - "DHE-RSA-AES256-RMD", // TLS_DHE_RSA_WITH_AES_256_CBC_RMD160 = 121 - null_str, // 122 - null_str, // 123 - "DES-CBC3-RMD", // TLS_RSA_WITH_3DES_EDE_CBC_RMD160 = 124 - "AES128-RMD", // TLS_RSA_WITH_AES_128_CBC_RMD160 = 125 - "AES256-RMD", // TLS_RSA_WITH_AES_256_CBC_RMD160 = 126 - null_str // 127 -}; - -// fill with MD5 pad size since biggest required -const opaque PAD1[PAD_MD5] = { 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - }; -const opaque PAD2[PAD_MD5] = { 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, - 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c - }; - -const opaque client[SIZEOF_SENDER] = { 0x43, 0x4C, 0x4E, 0x54 }; -const opaque server[SIZEOF_SENDER] = { 0x53, 0x52, 0x56, 0x52 }; - -const opaque tls_client[FINISHED_LABEL_SZ + 1] = "client finished"; -const opaque tls_server[FINISHED_LABEL_SZ + 1] = "server finished"; - -const opaque master_label[MASTER_LABEL_SZ + 1] = "master secret"; -const opaque key_label [KEY_LABEL_SZ + 1] = "key expansion"; - - -} // naemspace - -#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 -/* - gcc 2.96 bails out because of two declarations of byte: yaSSL::byte and - TaoCrypt::byte. TODO: define global types.hpp and move the declaration of - 'byte' there. -*/ -using yaSSL::byte; -#endif - - -#endif // yaSSL_TYPES_HPP diff --git a/externals/mysql/extlib/yassl/src/buffer.cpp b/externals/mysql/extlib/yassl/src/buffer.cpp deleted file mode 100644 index 0c3f23b0cb..0000000000 --- a/externals/mysql/extlib/yassl/src/buffer.cpp +++ /dev/null @@ -1,279 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* yaSSL buffer header implements input/output buffers to simulate streaming - * with SSL types and sockets - */ - - -#include // memcpy -#include "runtime.hpp" -#include "buffer.hpp" -#include "yassl_types.hpp" - -namespace yaSSL { - - - -// Checking Policy should implement a check function that tests whether the -// index is within the size limit of the array - -void Check::check(uint i, uint limit) -{ - assert(i < limit); -} - - -void NoCheck::check(uint, uint) -{ -} - - -/* input_buffer operates like a smart c style array with a checking option, - * meant to be read from through [] with AUTO index or read(). - * Should only write to at/near construction with assign() or raw (e.g., recv) - * followed by add_size with the number of elements added by raw write. - * - * Not using vector because need checked []access, offset, and the ability to - * write to the buffer bulk wise and have the correct size - */ - - -input_buffer::input_buffer() - : size_(0), current_(0), buffer_(0), end_(0) -{} - - -input_buffer::input_buffer(uint s) - : size_(0), current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s) -{} - - -// with assign -input_buffer::input_buffer(uint s, const byte* t, uint len) - : size_(0), current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s) -{ - assign(t, len); -} - - -input_buffer::~input_buffer() -{ - ysArrayDelete(buffer_); -} - - -// users can pass defualt zero length buffer and then allocate -void input_buffer::allocate(uint s) -{ - assert(!buffer_); // find realloc error - buffer_ = NEW_YS byte[s]; - end_ = buffer_ + s; -} - - -// for passing to raw writing functions at beginning, then use add_size -byte* input_buffer::get_buffer() const -{ - return buffer_; -} - - -// after a raw write user can set NEW_YS size -// if you know the size before the write use assign() -void input_buffer::add_size(uint i) -{ - check(size_ + i-1, get_capacity()); - size_ += i; -} - - -uint input_buffer::get_capacity() const -{ - return end_ - buffer_; -} - - -uint input_buffer::get_current() const -{ - return current_; -} - - -uint input_buffer::get_size() const -{ - return size_; -} - - -uint input_buffer::get_remaining() const -{ - return size_ - current_; -} - - -void input_buffer::set_current(uint i) -{ - if (i) - check(i - 1, size_); - current_ = i; -} - - -// read only access through [], advance current -// user passes in AUTO index for ease of use -const byte& input_buffer::operator[](uint i) -{ - assert (i == AUTO); - check(current_, size_); - return buffer_[current_++]; -} - - -// end of input test -bool input_buffer::eof() -{ - return current_ >= size_; -} - - -// peek ahead -byte input_buffer::peek() const -{ - return buffer_[current_]; -} - - -// write function, should use at/near construction -void input_buffer::assign(const byte* t, uint s) -{ - check(current_, get_capacity()); - add_size(s); - memcpy(&buffer_[current_], t, s); -} - - -// use read to query input, adjusts current -void input_buffer::read(byte* dst, uint length) -{ - check(current_ + length - 1, size_); - memcpy(dst, &buffer_[current_], length); - current_ += length; -} - - - -/* output_buffer operates like a smart c style array with a checking option. - * Meant to be written to through [] with AUTO index or write(). - * Size (current) counter increases when written to. Can be constructed with - * zero length buffer but be sure to allocate before first use. - * Don't use add write for a couple bytes, use [] instead, way less overhead. - * - * Not using vector because need checked []access and the ability to - * write to the buffer bulk wise and retain correct size - */ - - -output_buffer::output_buffer() - : current_(0), buffer_(0), end_(0) -{} - - -// with allocate -output_buffer::output_buffer(uint s) - : current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s) -{} - - -// with assign -output_buffer::output_buffer(uint s, const byte* t, uint len) - : current_(0), buffer_(NEW_YS byte[s]), end_(buffer_+ s) -{ - write(t, len); -} - - -output_buffer::~output_buffer() -{ - ysArrayDelete(buffer_); -} - - -uint output_buffer::get_size() const -{ - return current_; -} - - -uint output_buffer::get_capacity() const -{ - return end_ - buffer_; -} - - -void output_buffer::set_current(uint c) -{ - check(c, get_capacity()); - current_ = c; -} - - -// users can pass defualt zero length buffer and then allocate -void output_buffer::allocate(uint s) -{ - assert(!buffer_); // find realloc error - buffer_ = NEW_YS byte[s]; end_ = buffer_ + s; -} - - -// for passing to reading functions when finished -const byte* output_buffer::get_buffer() const -{ - return buffer_; -} - - -// allow write access through [], update current -// user passes in AUTO as index for ease of use -byte& output_buffer::operator[](uint i) -{ - assert(i == AUTO); - check(current_, get_capacity()); - return buffer_[current_++]; -} - - -// end of output test -bool output_buffer::eof() -{ - return current_ >= get_capacity(); -} - - -void output_buffer::write(const byte* t, uint s) -{ - check(current_ + s - 1, get_capacity()); - memcpy(&buffer_[current_], t, s); - current_ += s; -} - - - -} // naemspace - diff --git a/externals/mysql/extlib/yassl/src/cert_wrapper.cpp b/externals/mysql/extlib/yassl/src/cert_wrapper.cpp deleted file mode 100644 index ebec088226..0000000000 --- a/externals/mysql/extlib/yassl/src/cert_wrapper.cpp +++ /dev/null @@ -1,370 +0,0 @@ -/* - Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* The certificate wrapper source implements certificate management functions - * - */ - -#include "runtime.hpp" -#include "cert_wrapper.hpp" -#include "yassl_int.hpp" -#include "error.hpp" - -#if defined(USE_CML_LIB) - #include "cmapi_cpp.h" -#else - #include "asn.hpp" - #include "file.hpp" -#endif // USE_CML_LIB - - -namespace yaSSL { - - -x509::x509(uint sz) : length_(sz), buffer_(NEW_YS opaque[sz]) -{ -} - - -x509::~x509() -{ - ysArrayDelete(buffer_); -} - - -x509::x509(const x509& that) : length_(that.length_), - buffer_(NEW_YS opaque[length_]) -{ - memcpy(buffer_, that.buffer_, length_); -} - - -void x509::Swap(x509& that) -{ - STL::swap(length_, that.length_); - STL::swap(buffer_, that.buffer_); -} - - -x509& x509::operator=(const x509& that) -{ - x509 temp(that); - Swap(temp); - return *this; -} - - -uint x509::get_length() const -{ - return length_; -} - - -const opaque* x509::get_buffer() const -{ - return buffer_; -} - - -opaque* x509::use_buffer() -{ - return buffer_; -} - - -//CertManager -CertManager::CertManager() - : peerX509_(0), verifyPeer_(false), verifyNone_(false), failNoCert_(false), - sendVerify_(false), verifyCallback_(0) -{} - - -CertManager::~CertManager() -{ - ysDelete(peerX509_); - - STL::for_each(signers_.begin(), signers_.end(), del_ptr_zero()) ; - - STL::for_each(peerList_.begin(), peerList_.end(), del_ptr_zero()) ; - - STL::for_each(list_.begin(), list_.end(), del_ptr_zero()) ; -} - - -bool CertManager::verifyPeer() const -{ - return verifyPeer_; -} - - -bool CertManager::verifyNone() const -{ - return verifyNone_; -} - - -bool CertManager::failNoCert() const -{ - return failNoCert_; -} - - -bool CertManager::sendVerify() const -{ - return sendVerify_; -} - - -void CertManager::setVerifyPeer() -{ - verifyPeer_ = true; -} - - -void CertManager::setVerifyNone() -{ - verifyNone_ = true; -} - - -void CertManager::setFailNoCert() -{ - failNoCert_ = true; -} - - -void CertManager::setSendVerify() -{ - sendVerify_ = true; -} - - -void CertManager::setVerifyCallback(VerifyCallback vc) -{ - verifyCallback_ = vc; -} - - -void CertManager::AddPeerCert(x509* x) -{ - peerList_.push_back(x); // take ownership -} - - -void CertManager::CopySelfCert(const x509* x) -{ - if (x) - list_.push_back(NEW_YS x509(*x)); -} - - -// add to signers -int CertManager::CopyCaCert(const x509* x) -{ - TaoCrypt::Source source(x->get_buffer(), x->get_length()); - TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_, - TaoCrypt::CertDecoder::CA); - - if (!cert.GetError().What()) { - const TaoCrypt::PublicKey& key = cert.GetPublicKey(); - signers_.push_back(NEW_YS TaoCrypt::Signer(key.GetKey(), key.size(), - cert.GetCommonName(), cert.GetHash())); - } - // just don't add, not an error return cert.GetError().What(); - return 0; -} - - -const x509* CertManager::get_cert() const -{ - return list_.front(); -} - - -const opaque* CertManager::get_peerKey() const -{ - return peerPublicKey_.get_buffer(); -} - - -X509* CertManager::get_peerX509() const -{ - return peerX509_; -} - - -SignatureAlgorithm CertManager::get_peerKeyType() const -{ - return peerKeyType_; -} - - -SignatureAlgorithm CertManager::get_keyType() const -{ - return keyType_; -} - - -uint CertManager::get_peerKeyLength() const -{ - return peerPublicKey_.get_size(); -} - - -const opaque* CertManager::get_privateKey() const -{ - return privateKey_.get_buffer(); -} - - -uint CertManager::get_privateKeyLength() const -{ - return privateKey_.get_size(); -} - - -// Validate the peer's certificate list, from root to peer (last to first) -int CertManager::Validate() -{ - CertList::reverse_iterator last = peerList_.rbegin(); - size_t count = peerList_.size(); - - while ( count > 1 ) { - TaoCrypt::Source source((*last)->get_buffer(), (*last)->get_length()); - TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_); - - if (int err = cert.GetError().What()) - return err; - - const TaoCrypt::PublicKey& key = cert.GetPublicKey(); - signers_.push_back(NEW_YS TaoCrypt::Signer(key.GetKey(), key.size(), - cert.GetCommonName(), cert.GetHash())); - ++last; - --count; - } - - if (count) { - // peer's is at the front - TaoCrypt::Source source((*last)->get_buffer(), (*last)->get_length()); - TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_); - - int err = cert.GetError().What(); - if ( err ) - return err; - - uint sz = cert.GetPublicKey().size(); - peerPublicKey_.allocate(sz); - peerPublicKey_.assign(cert.GetPublicKey().GetKey(), sz); - - if (cert.GetKeyType() == TaoCrypt::RSAk) - peerKeyType_ = rsa_sa_algo; - else - peerKeyType_ = dsa_sa_algo; - - size_t iSz = strlen(cert.GetIssuer()) + 1; - size_t sSz = strlen(cert.GetCommonName()) + 1; - int bSz = (int)strlen(cert.GetBeforeDate()) + 1; - int aSz = (int)strlen(cert.GetAfterDate()) + 1; - peerX509_ = NEW_YS X509(cert.GetIssuer(), iSz, cert.GetCommonName(), - sSz, cert.GetBeforeDate(), bSz, - cert.GetAfterDate(), aSz); - - if (err == TaoCrypt::SIG_OTHER_E && verifyCallback_) { - X509_STORE_CTX store; - store.error = err; - store.error_depth = static_cast(count) - 1; - store.current_cert = peerX509_; - - int ok = verifyCallback_(0, &store); - if (ok) return 0; - } - - if (err == TaoCrypt::SIG_OTHER_E) return err; - } - return 0; -} - - -// Set the private key -int CertManager::SetPrivateKey(const x509& key) -{ - privateKey_.allocate(key.get_length()); - privateKey_.assign(key.get_buffer(), key.get_length()); - - // set key type - if (x509* cert = list_.front()) { - TaoCrypt::Source source(cert->get_buffer(), cert->get_length()); - TaoCrypt::CertDecoder cd(source, false); - cd.DecodeToKey(); - if (int err = cd.GetError().What()) - return err; - if (cd.GetKeyType() == TaoCrypt::RSAk) - keyType_ = rsa_sa_algo; - else - keyType_ = dsa_sa_algo; - } - return 0; -} - - -// Store OpenSSL type peer's cert -void CertManager::setPeerX509(X509* x) -{ - assert(peerX509_ == 0); - if (x == 0) return; - - X509_NAME* issuer = x->GetIssuer(); - X509_NAME* subject = x->GetSubject(); - ASN1_STRING* before = x->GetBefore(); - ASN1_STRING* after = x->GetAfter(); - - peerX509_ = NEW_YS X509(issuer->GetName(), issuer->GetLength(), - subject->GetName(), subject->GetLength(), (const char*) before->data, - before->length, (const char*) after->data, after->length); -} - - -#if defined(USE_CML_LIB) - -// Get the peer's certificate, extract and save public key -void CertManager::SetPeerKey() -{ - // first cert is the peer's - x509* main = peerList_.front(); - - Bytes_struct cert; - cert.num = main->get_length(); - cert.data = main->set_buffer(); - - CML::Certificate cm(cert); - const CML::ASN::Cert& raw = cm.base(); - CTIL::CSM_Buffer key = raw.pubKeyInfo.key; - - uint sz; - opaque* key_buffer = reinterpret_cast(key.Get(sz)); - peerPublicKey_.allocate(sz); - peerPublicKey_.assign(key_buffer, sz); -} - - -#endif // USE_CML_LIB - - - -} // namespace diff --git a/externals/mysql/extlib/yassl/src/crypto_wrapper.cpp b/externals/mysql/extlib/yassl/src/crypto_wrapper.cpp deleted file mode 100644 index 28d7f1b569..0000000000 --- a/externals/mysql/extlib/yassl/src/crypto_wrapper.cpp +++ /dev/null @@ -1,1013 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* The crypto wrapper source implements the policies for the cipher - * components used by SSL. - * - * The implementation relies on a specfic library, taoCrypt. - */ - -#if !defined(USE_CRYPTOPP_LIB) - -#include "runtime.hpp" -#include "crypto_wrapper.hpp" -#include "cert_wrapper.hpp" - -#include "md5.hpp" -#include "sha.hpp" -#include "ripemd.hpp" -#include "hmac.hpp" -#include "modes.hpp" -#include "des.hpp" -#include "arc4.hpp" -#include "aes.hpp" -#include "rsa.hpp" -#include "dsa.hpp" -#include "dh.hpp" -#include "random.hpp" -#include "file.hpp" -#include "coding.hpp" - - -namespace yaSSL { - - -// MD5 Implementation -struct MD5::MD5Impl { - TaoCrypt::MD5 md5_; - MD5Impl() {} - explicit MD5Impl(const TaoCrypt::MD5& md5) : md5_(md5) {} -}; - - -MD5::MD5() : pimpl_(NEW_YS MD5Impl) {} - - -MD5::~MD5() { ysDelete(pimpl_); } - - -MD5::MD5(const MD5& that) : Digest(), pimpl_(NEW_YS - MD5Impl(that.pimpl_->md5_)) {} - - -MD5& MD5::operator=(const MD5& that) -{ - pimpl_->md5_ = that.pimpl_->md5_; - return *this; -} - - -uint MD5::get_digestSize() const -{ - return MD5_LEN; -} - - -uint MD5::get_padSize() const -{ - return PAD_MD5; -} - - -// Fill out with MD5 digest from in that is sz bytes, out must be >= digest sz -void MD5::get_digest(byte* out, const byte* in, unsigned int sz) -{ - pimpl_->md5_.Update(in, sz); - pimpl_->md5_.Final(out); -} - -// Fill out with MD5 digest from previous updates -void MD5::get_digest(byte* out) -{ - pimpl_->md5_.Final(out); -} - - -// Update the current digest -void MD5::update(const byte* in, unsigned int sz) -{ - pimpl_->md5_.Update(in, sz); -} - - -// SHA Implementation -struct SHA::SHAImpl { - TaoCrypt::SHA sha_; - SHAImpl() {} - explicit SHAImpl(const TaoCrypt::SHA& sha) : sha_(sha) {} -}; - - -SHA::SHA() : pimpl_(NEW_YS SHAImpl) {} - - -SHA::~SHA() { ysDelete(pimpl_); } - - -SHA::SHA(const SHA& that) : Digest(), pimpl_(NEW_YS SHAImpl(that.pimpl_->sha_)) {} - -SHA& SHA::operator=(const SHA& that) -{ - pimpl_->sha_ = that.pimpl_->sha_; - return *this; -} - - -uint SHA::get_digestSize() const -{ - return SHA_LEN; -} - - -uint SHA::get_padSize() const -{ - return PAD_SHA; -} - - -// Fill out with SHA digest from in that is sz bytes, out must be >= digest sz -void SHA::get_digest(byte* out, const byte* in, unsigned int sz) -{ - pimpl_->sha_.Update(in, sz); - pimpl_->sha_.Final(out); -} - - -// Fill out with SHA digest from previous updates -void SHA::get_digest(byte* out) -{ - pimpl_->sha_.Final(out); -} - - -// Update the current digest -void SHA::update(const byte* in, unsigned int sz) -{ - pimpl_->sha_.Update(in, sz); -} - - -// RMD-160 Implementation -struct RMD::RMDImpl { - TaoCrypt::RIPEMD160 rmd_; - RMDImpl() {} - explicit RMDImpl(const TaoCrypt::RIPEMD160& rmd) : rmd_(rmd) {} -}; - - -RMD::RMD() : pimpl_(NEW_YS RMDImpl) {} - - -RMD::~RMD() { ysDelete(pimpl_); } - - -RMD::RMD(const RMD& that) : Digest(), pimpl_(NEW_YS RMDImpl(that.pimpl_->rmd_)) {} - -RMD& RMD::operator=(const RMD& that) -{ - pimpl_->rmd_ = that.pimpl_->rmd_; - return *this; -} - - -uint RMD::get_digestSize() const -{ - return RMD_LEN; -} - - -uint RMD::get_padSize() const -{ - return PAD_RMD; -} - - -// Fill out with RMD digest from in that is sz bytes, out must be >= digest sz -void RMD::get_digest(byte* out, const byte* in, unsigned int sz) -{ - pimpl_->rmd_.Update(in, sz); - pimpl_->rmd_.Final(out); -} - - -// Fill out with RMD digest from previous updates -void RMD::get_digest(byte* out) -{ - pimpl_->rmd_.Final(out); -} - - -// Update the current digest -void RMD::update(const byte* in, unsigned int sz) -{ - pimpl_->rmd_.Update(in, sz); -} - - -// HMAC_MD5 Implementation -struct HMAC_MD5::HMAC_MD5Impl { - TaoCrypt::HMAC mac_; - HMAC_MD5Impl() {} -}; - - -HMAC_MD5::HMAC_MD5(const byte* secret, unsigned int len) - : pimpl_(NEW_YS HMAC_MD5Impl) -{ - pimpl_->mac_.SetKey(secret, len); -} - - -HMAC_MD5::~HMAC_MD5() { ysDelete(pimpl_); } - - -uint HMAC_MD5::get_digestSize() const -{ - return MD5_LEN; -} - - -uint HMAC_MD5::get_padSize() const -{ - return PAD_MD5; -} - - -// Fill out with MD5 digest from in that is sz bytes, out must be >= digest sz -void HMAC_MD5::get_digest(byte* out, const byte* in, unsigned int sz) -{ - pimpl_->mac_.Update(in, sz); - pimpl_->mac_.Final(out); -} - -// Fill out with MD5 digest from previous updates -void HMAC_MD5::get_digest(byte* out) -{ - pimpl_->mac_.Final(out); -} - - -// Update the current digest -void HMAC_MD5::update(const byte* in, unsigned int sz) -{ - pimpl_->mac_.Update(in, sz); -} - - -// HMAC_SHA Implementation -struct HMAC_SHA::HMAC_SHAImpl { - TaoCrypt::HMAC mac_; - HMAC_SHAImpl() {} -}; - - -HMAC_SHA::HMAC_SHA(const byte* secret, unsigned int len) - : pimpl_(NEW_YS HMAC_SHAImpl) -{ - pimpl_->mac_.SetKey(secret, len); -} - - -HMAC_SHA::~HMAC_SHA() { ysDelete(pimpl_); } - - -uint HMAC_SHA::get_digestSize() const -{ - return SHA_LEN; -} - - -uint HMAC_SHA::get_padSize() const -{ - return PAD_SHA; -} - - -// Fill out with SHA digest from in that is sz bytes, out must be >= digest sz -void HMAC_SHA::get_digest(byte* out, const byte* in, unsigned int sz) -{ - pimpl_->mac_.Update(in, sz); - pimpl_->mac_.Final(out); -} - -// Fill out with SHA digest from previous updates -void HMAC_SHA::get_digest(byte* out) -{ - pimpl_->mac_.Final(out); -} - - -// Update the current digest -void HMAC_SHA::update(const byte* in, unsigned int sz) -{ - pimpl_->mac_.Update(in, sz); -} - - - -// HMAC_RMD Implementation -struct HMAC_RMD::HMAC_RMDImpl { - TaoCrypt::HMAC mac_; - HMAC_RMDImpl() {} -}; - - -HMAC_RMD::HMAC_RMD(const byte* secret, unsigned int len) - : pimpl_(NEW_YS HMAC_RMDImpl) -{ - pimpl_->mac_.SetKey(secret, len); -} - - -HMAC_RMD::~HMAC_RMD() { ysDelete(pimpl_); } - - -uint HMAC_RMD::get_digestSize() const -{ - return RMD_LEN; -} - - -uint HMAC_RMD::get_padSize() const -{ - return PAD_RMD; -} - - -// Fill out with RMD digest from in that is sz bytes, out must be >= digest sz -void HMAC_RMD::get_digest(byte* out, const byte* in, unsigned int sz) -{ - pimpl_->mac_.Update(in, sz); - pimpl_->mac_.Final(out); -} - -// Fill out with RMD digest from previous updates -void HMAC_RMD::get_digest(byte* out) -{ - pimpl_->mac_.Final(out); -} - - -// Update the current digest -void HMAC_RMD::update(const byte* in, unsigned int sz) -{ - pimpl_->mac_.Update(in, sz); -} - - -struct DES::DESImpl { - TaoCrypt::DES_CBC_Encryption encryption; - TaoCrypt::DES_CBC_Decryption decryption; -}; - - -DES::DES() : pimpl_(NEW_YS DESImpl) {} - -DES::~DES() { ysDelete(pimpl_); } - - -void DES::set_encryptKey(const byte* k, const byte* iv) -{ - pimpl_->encryption.SetKey(k, DES_KEY_SZ, iv); -} - - -void DES::set_decryptKey(const byte* k, const byte* iv) -{ - pimpl_->decryption.SetKey(k, DES_KEY_SZ, iv); -} - -// DES encrypt plain of length sz into cipher -void DES::encrypt(byte* cipher, const byte* plain, unsigned int sz) -{ - pimpl_->encryption.Process(cipher, plain, sz); -} - - -// DES decrypt cipher of length sz into plain -void DES::decrypt(byte* plain, const byte* cipher, unsigned int sz) -{ - pimpl_->decryption.Process(plain, cipher, sz); -} - - -struct DES_EDE::DES_EDEImpl { - TaoCrypt::DES_EDE3_CBC_Encryption encryption; - TaoCrypt::DES_EDE3_CBC_Decryption decryption; -}; - - -DES_EDE::DES_EDE() : pimpl_(NEW_YS DES_EDEImpl) {} - -DES_EDE::~DES_EDE() { ysDelete(pimpl_); } - - -void DES_EDE::set_encryptKey(const byte* k, const byte* iv) -{ - pimpl_->encryption.SetKey(k, DES_EDE_KEY_SZ, iv); -} - - -void DES_EDE::set_decryptKey(const byte* k, const byte* iv) -{ - pimpl_->decryption.SetKey(k, DES_EDE_KEY_SZ, iv); -} - - -// 3DES encrypt plain of length sz into cipher -void DES_EDE::encrypt(byte* cipher, const byte* plain, unsigned int sz) -{ - pimpl_->encryption.Process(cipher, plain, sz); -} - - -// 3DES decrypt cipher of length sz into plain -void DES_EDE::decrypt(byte* plain, const byte* cipher, unsigned int sz) -{ - pimpl_->decryption.Process(plain, cipher, sz); -} - - -// Implementation of alledged RC4 -struct RC4::RC4Impl { - TaoCrypt::ARC4::Encryption encryption; - TaoCrypt::ARC4::Decryption decryption; -}; - - -RC4::RC4() : pimpl_(NEW_YS RC4Impl) {} - -RC4::~RC4() { ysDelete(pimpl_); } - - -void RC4::set_encryptKey(const byte* k, const byte*) -{ - pimpl_->encryption.SetKey(k, RC4_KEY_SZ); -} - - -void RC4::set_decryptKey(const byte* k, const byte*) -{ - pimpl_->decryption.SetKey(k, RC4_KEY_SZ); -} - - -// RC4 encrypt plain of length sz into cipher -void RC4::encrypt(byte* cipher, const byte* plain, unsigned int sz) -{ - pimpl_->encryption.Process(cipher, plain, sz); -} - - -// RC4 decrypt cipher of length sz into plain -void RC4::decrypt(byte* plain, const byte* cipher, unsigned int sz) -{ - pimpl_->decryption.Process(plain, cipher, sz); -} - - - -// Implementation of AES -struct AES::AESImpl { - TaoCrypt::AES_CBC_Encryption encryption; - TaoCrypt::AES_CBC_Decryption decryption; - unsigned int keySz_; - - AESImpl(unsigned int ks) : keySz_(ks) {} -}; - - -AES::AES(unsigned int ks) : pimpl_(NEW_YS AESImpl(ks)) {} - -AES::~AES() { ysDelete(pimpl_); } - - -int AES::get_keySize() const -{ - return pimpl_->keySz_; -} - - -void AES::set_encryptKey(const byte* k, const byte* iv) -{ - pimpl_->encryption.SetKey(k, pimpl_->keySz_, iv); -} - - -void AES::set_decryptKey(const byte* k, const byte* iv) -{ - pimpl_->decryption.SetKey(k, pimpl_->keySz_, iv); -} - - -// AES encrypt plain of length sz into cipher -void AES::encrypt(byte* cipher, const byte* plain, unsigned int sz) -{ - pimpl_->encryption.Process(cipher, plain, sz); -} - - -// AES decrypt cipher of length sz into plain -void AES::decrypt(byte* plain, const byte* cipher, unsigned int sz) -{ - pimpl_->decryption.Process(plain, cipher, sz); -} - - -struct RandomPool::RandomImpl { - TaoCrypt::RandomNumberGenerator RNG_; -}; - -RandomPool::RandomPool() : pimpl_(NEW_YS RandomImpl) {} - -RandomPool::~RandomPool() { ysDelete(pimpl_); } - -int RandomPool::GetError() const -{ - return pimpl_->RNG_.GetError(); -} - -void RandomPool::Fill(opaque* dst, uint sz) const -{ - pimpl_->RNG_.GenerateBlock(dst, sz); -} - - -// Implementation of DSS Authentication -struct DSS::DSSImpl { - void SetPublic (const byte*, unsigned int); - void SetPrivate(const byte*, unsigned int); - TaoCrypt::DSA_PublicKey publicKey_; - TaoCrypt::DSA_PrivateKey privateKey_; -}; - - -// Decode and store the public key -void DSS::DSSImpl::SetPublic(const byte* key, unsigned int sz) -{ - TaoCrypt::Source source(key, sz); - publicKey_.Initialize(source); -} - - -// Decode and store the public key -void DSS::DSSImpl::SetPrivate(const byte* key, unsigned int sz) -{ - TaoCrypt::Source source(key, sz); - privateKey_.Initialize(source); - publicKey_ = TaoCrypt::DSA_PublicKey(privateKey_); - -} - - -// Set public or private key -DSS::DSS(const byte* key, unsigned int sz, bool publicKey) - : pimpl_(NEW_YS DSSImpl) -{ - if (publicKey) - pimpl_->SetPublic(key, sz); - else - pimpl_->SetPrivate(key, sz); -} - - -DSS::~DSS() -{ - ysDelete(pimpl_); -} - - -uint DSS::get_signatureLength() const -{ - return pimpl_->publicKey_.SignatureLength(); -} - - -// DSS Sign message of length sz into sig -void DSS::sign(byte* sig, const byte* sha_digest, unsigned int /* shaSz */, - const RandomPool& random) -{ - using namespace TaoCrypt; - - DSA_Signer signer(pimpl_->privateKey_); - signer.Sign(sha_digest, sig, random.pimpl_->RNG_); -} - - -// DSS Verify message of length sz against sig, is it correct? -bool DSS::verify(const byte* sha_digest, unsigned int /* shaSz */, - const byte* sig, unsigned int /* sigSz */) -{ - using namespace TaoCrypt; - - DSA_Verifier ver(pimpl_->publicKey_); - return ver.Verify(sha_digest, sig); -} - - -// Implementation of RSA key interface -struct RSA::RSAImpl { - void SetPublic (const byte*, unsigned int); - void SetPrivate(const byte*, unsigned int); - TaoCrypt::RSA_PublicKey publicKey_; - TaoCrypt::RSA_PrivateKey privateKey_; -}; - - -// Decode and store the public key -void RSA::RSAImpl::SetPublic(const byte* key, unsigned int sz) -{ - TaoCrypt::Source source(key, sz); - publicKey_.Initialize(source); -} - - -// Decode and store the private key -void RSA::RSAImpl::SetPrivate(const byte* key, unsigned int sz) -{ - TaoCrypt::Source source(key, sz); - privateKey_.Initialize(source); - publicKey_ = TaoCrypt::RSA_PublicKey(privateKey_); -} - - -// Set public or private key -RSA::RSA(const byte* key, unsigned int sz, bool publicKey) - : pimpl_(NEW_YS RSAImpl) -{ - if (publicKey) - pimpl_->SetPublic(key, sz); - else - pimpl_->SetPrivate(key, sz); -} - -RSA::~RSA() -{ - ysDelete(pimpl_); -} - - -// get cipher text length, varies on key size -unsigned int RSA::get_cipherLength() const -{ - return pimpl_->publicKey_.FixedCiphertextLength(); -} - - -// get signautre length, varies on key size -unsigned int RSA::get_signatureLength() const -{ - return get_cipherLength(); -} - - -// RSA Sign message of length sz into sig -void RSA::sign(byte* sig, const byte* message, unsigned int sz, - const RandomPool& random) -{ - TaoCrypt::RSAES_Decryptor dec(pimpl_->privateKey_); - dec.SSL_Sign(message, sz, sig, random.pimpl_->RNG_); -} - - -// RSA Verify message of length sz against sig -bool RSA::verify(const byte* message, unsigned int sz, const byte* sig, - unsigned int) -{ - TaoCrypt::RSAES_Encryptor enc(pimpl_->publicKey_); - return enc.SSL_Verify(message, sz, sig); -} - - -// RSA public encrypt plain of length sz into cipher -void RSA::encrypt(byte* cipher, const byte* plain, unsigned int sz, - const RandomPool& random) -{ - - TaoCrypt::RSAES_Encryptor enc(pimpl_->publicKey_); - enc.Encrypt(plain, sz, cipher, random.pimpl_->RNG_); -} - - -// RSA private decrypt cipher of length sz into plain -void RSA::decrypt(byte* plain, const byte* cipher, unsigned int sz, - const RandomPool& random) -{ - TaoCrypt::RSAES_Decryptor dec(pimpl_->privateKey_); - dec.Decrypt(cipher, sz, plain, random.pimpl_->RNG_); -} - - -struct Integer::IntegerImpl { - TaoCrypt::Integer int_; - - IntegerImpl() {} - explicit IntegerImpl(const TaoCrypt::Integer& i) : int_(i) {} -}; - -Integer::Integer() : pimpl_(NEW_YS IntegerImpl) {} - -Integer::~Integer() { ysDelete(pimpl_); } - - - -Integer::Integer(const Integer& other) : pimpl_(NEW_YS - IntegerImpl(other.pimpl_->int_)) -{} - - -Integer& Integer::operator=(const Integer& that) -{ - pimpl_->int_ = that.pimpl_->int_; - - return *this; -} - - -void Integer::assign(const byte* num, unsigned int sz) -{ - pimpl_->int_ = TaoCrypt::Integer(num, sz); -} - - -struct DiffieHellman::DHImpl { - TaoCrypt::DH dh_; - TaoCrypt::RandomNumberGenerator& ranPool_; - byte* publicKey_; - byte* privateKey_; - byte* agreedKey_; - - DHImpl(TaoCrypt::RandomNumberGenerator& r) : ranPool_(r), publicKey_(0), - privateKey_(0), agreedKey_(0) {} - ~DHImpl() - { - ysArrayDelete(agreedKey_); - ysArrayDelete(privateKey_); - ysArrayDelete(publicKey_); - } - - DHImpl(const DHImpl& that) : dh_(that.dh_), ranPool_(that.ranPool_), - publicKey_(0), privateKey_(0), agreedKey_(0) - { - uint length = dh_.GetByteLength(); - AllocKeys(length, length, length); - } - - void AllocKeys(unsigned int pubSz, unsigned int privSz, unsigned int agrSz) - { - publicKey_ = NEW_YS byte[pubSz]; - privateKey_ = NEW_YS byte[privSz]; - agreedKey_ = NEW_YS byte[agrSz]; - } -}; - - - -/* -// server Side DH, server's view -DiffieHellman::DiffieHellman(const char* file, const RandomPool& random) - : pimpl_(NEW_YS DHImpl(random.pimpl_->RNG_)) -{ - using namespace TaoCrypt; - Source source; - FileSource(file, source); - if (source.size() == 0) - return; // TODO add error state, and force check - HexDecoder hd(source); - - pimpl_->dh_.Initialize(source); - - uint length = pimpl_->dh_.GetByteLength(); - - pimpl_->AllocKeys(length, length, length); - pimpl_->dh_.GenerateKeyPair(pimpl_->ranPool_, pimpl_->privateKey_, - pimpl_->publicKey_); -} -*/ - - -// server Side DH, client's view -DiffieHellman::DiffieHellman(const byte* p, unsigned int pSz, const byte* g, - unsigned int gSz, const byte* pub, - unsigned int pubSz, const RandomPool& random) - : pimpl_(NEW_YS DHImpl(random.pimpl_->RNG_)) -{ - using TaoCrypt::Integer; - - pimpl_->dh_.Initialize(Integer(p, pSz).Ref(), Integer(g, gSz).Ref()); - pimpl_->publicKey_ = NEW_YS opaque[pubSz]; - memcpy(pimpl_->publicKey_, pub, pubSz); -} - - -// Server Side DH, server's view -DiffieHellman::DiffieHellman(const Integer& p, const Integer& g, - const RandomPool& random) -: pimpl_(NEW_YS DHImpl(random.pimpl_->RNG_)) -{ - using TaoCrypt::Integer; - - pimpl_->dh_.Initialize(p.pimpl_->int_, g.pimpl_->int_); - - uint length = pimpl_->dh_.GetByteLength(); - - pimpl_->AllocKeys(length, length, length); - pimpl_->dh_.GenerateKeyPair(pimpl_->ranPool_, pimpl_->privateKey_, - pimpl_->publicKey_); -} - -DiffieHellman::~DiffieHellman() { ysDelete(pimpl_); } - - -// Client side and view, use server that for p and g -DiffieHellman::DiffieHellman(const DiffieHellman& that) - : pimpl_(NEW_YS DHImpl(*that.pimpl_)) -{ - pimpl_->dh_.GenerateKeyPair(pimpl_->ranPool_, pimpl_->privateKey_, - pimpl_->publicKey_); -} - - -DiffieHellman& DiffieHellman::operator=(const DiffieHellman& that) -{ - pimpl_->dh_ = that.pimpl_->dh_; - pimpl_->dh_.GenerateKeyPair(pimpl_->ranPool_, pimpl_->privateKey_, - pimpl_->publicKey_); - return *this; -} - - -void DiffieHellman::makeAgreement(const byte* other, unsigned int otherSz) -{ - pimpl_->dh_.Agree(pimpl_->agreedKey_, pimpl_->privateKey_, other, otherSz); -} - - -uint DiffieHellman::get_agreedKeyLength() const -{ - return pimpl_->dh_.GetByteLength(); -} - - -const byte* DiffieHellman::get_agreedKey() const -{ - return pimpl_->agreedKey_; -} - - -const byte* DiffieHellman::get_publicKey() const -{ - return pimpl_->publicKey_; -} - - -void DiffieHellman::set_sizes(int& pSz, int& gSz, int& pubSz) const -{ - using TaoCrypt::Integer; - Integer p = pimpl_->dh_.GetP(); - Integer g = pimpl_->dh_.GetG(); - - pSz = p.ByteCount(); - gSz = g.ByteCount(); - pubSz = pimpl_->dh_.GetByteLength(); -} - - -void DiffieHellman::get_parms(byte* bp, byte* bg, byte* bpub) const -{ - using TaoCrypt::Integer; - Integer p = pimpl_->dh_.GetP(); - Integer g = pimpl_->dh_.GetG(); - - p.Encode(bp, p.ByteCount()); - g.Encode(bg, g.ByteCount()); - memcpy(bpub, pimpl_->publicKey_, pimpl_->dh_.GetByteLength()); -} - - -// convert PEM file to DER x509 type -x509* PemToDer(FILE* file, CertType type, EncryptedInfo* info) -{ - using namespace TaoCrypt; - - char header[80]; - char footer[80]; - - if (type == Cert) { - strncpy(header, "-----BEGIN CERTIFICATE-----", sizeof(header)); - strncpy(footer, "-----END CERTIFICATE-----", sizeof(footer)); - } else { - strncpy(header, "-----BEGIN RSA PRIVATE KEY-----", sizeof(header)); - strncpy(footer, "-----END RSA PRIVATE KEY-----", sizeof(header)); - } - - long begin = -1; - long end = 0; - bool foundEnd = false; - - char line[80]; - - while(fgets(line, sizeof(line), file)) - if (strncmp(header, line, strlen(header)) == 0) { - begin = ftell(file); - break; - } - - // remove encrypted header if there - if (fgets(line, sizeof(line), file)) { - char encHeader[] = "Proc-Type"; - if (strncmp(encHeader, line, strlen(encHeader)) == 0 && - fgets(line,sizeof(line), file)) { - - char* start = strstr(line, "DES"); - char* finish = strstr(line, ","); - if (!start) - start = strstr(line, "AES"); - - if (!info) return 0; - - if ( start && finish && (start < finish)) { - memcpy(info->name, start, finish - start); - info->name[finish - start] = 0; - memcpy(info->iv, finish + 1, sizeof(info->iv)); - - char* newline = strstr(line, "\r"); - if (!newline) newline = strstr(line, "\n"); - if (newline && (newline > finish)) { - info->ivSz = newline - (finish + 1); - info->set = true; - } - } - fgets(line,sizeof(line), file); // get blank line - begin = ftell(file); - } - - } - - while(fgets(line, sizeof(line), file)) - if (strncmp(footer, line, strlen(footer)) == 0) { - foundEnd = true; - break; - } - else - end = ftell(file); - - if (begin == -1 || !foundEnd) - return 0; - - input_buffer tmp(end - begin); - fseek(file, begin, SEEK_SET); - size_t bytes = fread(tmp.get_buffer(), end - begin, 1, file); - if (bytes != 1) - return 0; - - Source der(tmp.get_buffer(), end - begin); - Base64Decoder b64Dec(der); - - uint sz = der.size(); - mySTL::auto_ptr x(NEW_YS x509(sz)); - memcpy(x->use_buffer(), der.get_buffer(), sz); - - return x.release(); -} - - -} // namespace - - -#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION -namespace yaSSL { -template void ysDelete(DiffieHellman::DHImpl*); -template void ysDelete(Integer::IntegerImpl*); -template void ysDelete(RSA::RSAImpl*); -template void ysDelete(DSS::DSSImpl*); -template void ysDelete(RandomPool::RandomImpl*); -template void ysDelete(AES::AESImpl*); -template void ysDelete(RC4::RC4Impl*); -template void ysDelete(DES_EDE::DES_EDEImpl*); -template void ysDelete(DES::DESImpl*); -template void ysDelete(HMAC_RMD::HMAC_RMDImpl*); -template void ysDelete(HMAC_SHA::HMAC_SHAImpl*); -template void ysDelete(HMAC_MD5::HMAC_MD5Impl*); -template void ysDelete(RMD::RMDImpl*); -template void ysDelete(SHA::SHAImpl*); -template void ysDelete(MD5::MD5Impl*); -} -#endif // HAVE_EXPLICIT_TEMPLATE_INSTANTIATION - -#endif // !USE_CRYPTOPP_LIB diff --git a/externals/mysql/extlib/yassl/src/dummy.cpp b/externals/mysql/extlib/yassl/src/dummy.cpp deleted file mode 100644 index 19b7fe887c..0000000000 --- a/externals/mysql/extlib/yassl/src/dummy.cpp +++ /dev/null @@ -1,4 +0,0 @@ -/* - To make libtool always use a C++ linker when compiling with yaSSL we need - to add a dummy C++ file to the source list. -*/ diff --git a/externals/mysql/extlib/yassl/src/handshake.cpp b/externals/mysql/extlib/yassl/src/handshake.cpp deleted file mode 100644 index 262b5cb3b8..0000000000 --- a/externals/mysql/extlib/yassl/src/handshake.cpp +++ /dev/null @@ -1,1117 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* The handshake source implements functions for creating and reading - * the various handshake messages. - */ - - - -#include "runtime.hpp" -#include "handshake.hpp" -#include "yassl_int.hpp" - - -namespace yaSSL { - - - -// Build a client hello message from cipher suites and compression method -void buildClientHello(SSL& ssl, ClientHello& hello) -{ - // store for pre master secret - ssl.useSecurity().use_connection().chVersion_ = hello.client_version_; - - ssl.getCrypto().get_random().Fill(hello.random_, RAN_LEN); - if (ssl.getSecurity().get_resuming()) { - hello.id_len_ = ID_LEN; - memcpy(hello.session_id_, ssl.getSecurity().get_resume().GetID(), - ID_LEN); - } - else - hello.id_len_ = 0; - hello.suite_len_ = ssl.getSecurity().get_parms().suites_size_; - memcpy(hello.cipher_suites_, ssl.getSecurity().get_parms().suites_, - hello.suite_len_); - hello.comp_len_ = 1; - - hello.set_length(sizeof(ProtocolVersion) + - RAN_LEN + - hello.id_len_ + sizeof(hello.id_len_) + - hello.suite_len_ + sizeof(hello.suite_len_) + - hello.comp_len_ + sizeof(hello.comp_len_)); -} - - -// Build a server hello message -void buildServerHello(SSL& ssl, ServerHello& hello) -{ - if (ssl.getSecurity().get_resuming()) { - memcpy(hello.random_,ssl.getSecurity().get_connection().server_random_, - RAN_LEN); - memcpy(hello.session_id_, ssl.getSecurity().get_resume().GetID(), - ID_LEN); - } - else { - ssl.getCrypto().get_random().Fill(hello.random_, RAN_LEN); - ssl.getCrypto().get_random().Fill(hello.session_id_, ID_LEN); - } - hello.id_len_ = ID_LEN; - ssl.set_sessionID(hello.session_id_); - - hello.cipher_suite_[0] = ssl.getSecurity().get_parms().suite_[0]; - hello.cipher_suite_[1] = ssl.getSecurity().get_parms().suite_[1]; - hello.compression_method_ = hello.compression_method_; - - hello.set_length(sizeof(ProtocolVersion) + RAN_LEN + ID_LEN + - sizeof(hello.id_len_) + SUITE_LEN + SIZEOF_ENUM); -} - - -// add handshake from buffer into md5 and sha hashes, use handshake header -void hashHandShake(SSL& ssl, const input_buffer& input, uint sz) -{ - const opaque* buffer = input.get_buffer() + input.get_current() - - HANDSHAKE_HEADER; - sz += HANDSHAKE_HEADER; - ssl.useHashes().use_MD5().update(buffer, sz); - ssl.useHashes().use_SHA().update(buffer, sz); -} - - -// locals -namespace { - -// Write a plaintext record to buffer -void buildOutput(output_buffer& buffer, const RecordLayerHeader& rlHdr, - const Message& msg) -{ - buffer.allocate(RECORD_HEADER + rlHdr.length_); - buffer << rlHdr << msg; -} - - -// Write a plaintext record to buffer -void buildOutput(output_buffer& buffer, const RecordLayerHeader& rlHdr, - const HandShakeHeader& hsHdr, const HandShakeBase& shake) -{ - buffer.allocate(RECORD_HEADER + rlHdr.length_); - buffer << rlHdr << hsHdr << shake; -} - - -// Build Record Layer header for Message without handshake header -void buildHeader(SSL& ssl, RecordLayerHeader& rlHeader, const Message& msg) -{ - ProtocolVersion pv = ssl.getSecurity().get_connection().version_; - rlHeader.type_ = msg.get_type(); - rlHeader.version_.major_ = pv.major_; - rlHeader.version_.minor_ = pv.minor_; - rlHeader.length_ = msg.get_length(); -} - - -// Build HandShake and RecordLayer Headers for handshake output -void buildHeaders(SSL& ssl, HandShakeHeader& hsHeader, - RecordLayerHeader& rlHeader, const HandShakeBase& shake) -{ - int sz = shake.get_length(); - - hsHeader.set_type(shake.get_type()); - hsHeader.set_length(sz); - - ProtocolVersion pv = ssl.getSecurity().get_connection().version_; - rlHeader.type_ = handshake; - rlHeader.version_.major_ = pv.major_; - rlHeader.version_.minor_ = pv.minor_; - rlHeader.length_ = sz + HANDSHAKE_HEADER; -} - - -// add handshake from buffer into md5 and sha hashes, exclude record header -void hashHandShake(SSL& ssl, const output_buffer& output, bool removeIV = false) -{ - uint sz = output.get_size() - RECORD_HEADER; - - const opaque* buffer = output.get_buffer() + RECORD_HEADER; - - if (removeIV) { // TLSv1_1 IV - uint blockSz = ssl.getCrypto().get_cipher().get_blockSize(); - sz -= blockSz; - buffer += blockSz; - } - - ssl.useHashes().use_MD5().update(buffer, sz); - ssl.useHashes().use_SHA().update(buffer, sz); -} - - -// calculate MD5 hash for finished -void buildMD5(SSL& ssl, Finished& fin, const opaque* sender) -{ - - opaque md5_result[MD5_LEN]; - opaque md5_inner[SIZEOF_SENDER + SECRET_LEN + PAD_MD5]; - opaque md5_outer[SECRET_LEN + PAD_MD5 + MD5_LEN]; - - const opaque* master_secret = - ssl.getSecurity().get_connection().master_secret_; - - // make md5 inner - memcpy(md5_inner, sender, SIZEOF_SENDER); - memcpy(&md5_inner[SIZEOF_SENDER], master_secret, SECRET_LEN); - memcpy(&md5_inner[SIZEOF_SENDER + SECRET_LEN], PAD1, PAD_MD5); - - ssl.useHashes().use_MD5().get_digest(md5_result, md5_inner, - sizeof(md5_inner)); - - // make md5 outer - memcpy(md5_outer, master_secret, SECRET_LEN); - memcpy(&md5_outer[SECRET_LEN], PAD2, PAD_MD5); - memcpy(&md5_outer[SECRET_LEN + PAD_MD5], md5_result, MD5_LEN); - - ssl.useHashes().use_MD5().get_digest(fin.set_md5(), md5_outer, - sizeof(md5_outer)); -} - - -// calculate SHA hash for finished -void buildSHA(SSL& ssl, Finished& fin, const opaque* sender) -{ - - opaque sha_result[SHA_LEN]; - opaque sha_inner[SIZEOF_SENDER + SECRET_LEN + PAD_SHA]; - opaque sha_outer[SECRET_LEN + PAD_SHA + SHA_LEN]; - - const opaque* master_secret = - ssl.getSecurity().get_connection().master_secret_; - - // make sha inner - memcpy(sha_inner, sender, SIZEOF_SENDER); - memcpy(&sha_inner[SIZEOF_SENDER], master_secret, SECRET_LEN); - memcpy(&sha_inner[SIZEOF_SENDER + SECRET_LEN], PAD1, PAD_SHA); - - ssl.useHashes().use_SHA().get_digest(sha_result, sha_inner, - sizeof(sha_inner)); - - // make sha outer - memcpy(sha_outer, master_secret, SECRET_LEN); - memcpy(&sha_outer[SECRET_LEN], PAD2, PAD_SHA); - memcpy(&sha_outer[SECRET_LEN + PAD_SHA], sha_result, SHA_LEN); - - ssl.useHashes().use_SHA().get_digest(fin.set_sha(), sha_outer, - sizeof(sha_outer)); -} - - -// decrypt input message in place, store size in case needed later -void decrypt_message(SSL& ssl, input_buffer& input, uint sz) -{ - input_buffer plain(sz); - opaque* cipher = input.get_buffer() + input.get_current(); - - ssl.useCrypto().use_cipher().decrypt(plain.get_buffer(), cipher, sz); - memcpy(cipher, plain.get_buffer(), sz); - ssl.useSecurity().use_parms().encrypt_size_ = sz; - - if (ssl.isTLSv1_1()) // IV - input.set_current(input.get_current() + - ssl.getCrypto().get_cipher().get_blockSize()); -} - - -// output operator for input_buffer -output_buffer& operator<<(output_buffer& output, const input_buffer& input) -{ - output.write(input.get_buffer(), input.get_size()); - return output; -} - - -// write headers, handshake hash, mac, pad, and encrypt -void cipherFinished(SSL& ssl, Finished& fin, output_buffer& output) -{ - uint digestSz = ssl.getCrypto().get_digest().get_digestSize(); - uint finishedSz = ssl.isTLS() ? TLS_FINISHED_SZ : FINISHED_SZ; - uint sz = RECORD_HEADER + HANDSHAKE_HEADER + finishedSz + digestSz; - uint pad = 0; - uint blockSz = ssl.getCrypto().get_cipher().get_blockSize(); - - if (ssl.getSecurity().get_parms().cipher_type_ == block) { - if (ssl.isTLSv1_1()) - sz += blockSz; // IV - sz += 1; // pad byte - pad = (sz - RECORD_HEADER) % blockSz; - pad = blockSz - pad; - sz += pad; - } - - RecordLayerHeader rlHeader; - HandShakeHeader hsHeader; - buildHeaders(ssl, hsHeader, rlHeader, fin); - rlHeader.length_ = sz - RECORD_HEADER; // record header includes mac - // and pad, hanshake doesn't - input_buffer iv; - if (ssl.isTLSv1_1() && ssl.getSecurity().get_parms().cipher_type_== block){ - iv.allocate(blockSz); - ssl.getCrypto().get_random().Fill(iv.get_buffer(), blockSz); - iv.add_size(blockSz); - } - uint ivSz = iv.get_size(); - output.allocate(sz); - output << rlHeader << iv << hsHeader << fin; - - hashHandShake(ssl, output, ssl.isTLSv1_1() ? true : false); - opaque digest[SHA_LEN]; // max size - if (ssl.isTLS()) - TLS_hmac(ssl, digest, output.get_buffer() + RECORD_HEADER + ivSz, - output.get_size() - RECORD_HEADER - ivSz, handshake); - else - hmac(ssl, digest, output.get_buffer() + RECORD_HEADER, - output.get_size() - RECORD_HEADER, handshake); - output.write(digest, digestSz); - - if (ssl.getSecurity().get_parms().cipher_type_ == block) - for (uint i = 0; i <= pad; i++) output[AUTO] = pad; // pad byte gets - // pad value too - input_buffer cipher(rlHeader.length_); - ssl.useCrypto().use_cipher().encrypt(cipher.get_buffer(), - output.get_buffer() + RECORD_HEADER, output.get_size() - RECORD_HEADER); - output.set_current(RECORD_HEADER); - output.write(cipher.get_buffer(), cipher.get_capacity()); -} - - -// build an encrypted data or alert message for output -void buildMessage(SSL& ssl, output_buffer& output, const Message& msg) -{ - uint digestSz = ssl.getCrypto().get_digest().get_digestSize(); - uint sz = RECORD_HEADER + msg.get_length() + digestSz; - uint pad = 0; - uint blockSz = ssl.getCrypto().get_cipher().get_blockSize(); - - if (ssl.getSecurity().get_parms().cipher_type_ == block) { - if (ssl.isTLSv1_1()) // IV - sz += blockSz; - sz += 1; // pad byte - pad = (sz - RECORD_HEADER) % blockSz; - pad = blockSz - pad; - sz += pad; - } - - RecordLayerHeader rlHeader; - buildHeader(ssl, rlHeader, msg); - rlHeader.length_ = sz - RECORD_HEADER; // record header includes mac - // and pad, hanshake doesn't - input_buffer iv; - if (ssl.isTLSv1_1() && ssl.getSecurity().get_parms().cipher_type_== block){ - iv.allocate(blockSz); - ssl.getCrypto().get_random().Fill(iv.get_buffer(), blockSz); - iv.add_size(blockSz); - } - - uint ivSz = iv.get_size(); - output.allocate(sz); - output << rlHeader << iv << msg; - - opaque digest[SHA_LEN]; // max size - if (ssl.isTLS()) - TLS_hmac(ssl, digest, output.get_buffer() + RECORD_HEADER + ivSz, - output.get_size() - RECORD_HEADER - ivSz, msg.get_type()); - else - hmac(ssl, digest, output.get_buffer() + RECORD_HEADER, - output.get_size() - RECORD_HEADER, msg.get_type()); - output.write(digest, digestSz); - - if (ssl.getSecurity().get_parms().cipher_type_ == block) - for (uint i = 0; i <= pad; i++) output[AUTO] = pad; // pad byte gets - // pad value too - input_buffer cipher(rlHeader.length_); - ssl.useCrypto().use_cipher().encrypt(cipher.get_buffer(), - output.get_buffer() + RECORD_HEADER, output.get_size() - RECORD_HEADER); - output.set_current(RECORD_HEADER); - output.write(cipher.get_buffer(), cipher.get_capacity()); -} - - -// build alert message -void buildAlert(SSL& ssl, output_buffer& output, const Alert& alert) -{ - if (ssl.getSecurity().get_parms().pending_ == false) // encrypted - buildMessage(ssl, output, alert); - else { - RecordLayerHeader rlHeader; - buildHeader(ssl, rlHeader, alert); - buildOutput(output, rlHeader, alert); - } -} - - -// build TLS finished message -void buildFinishedTLS(SSL& ssl, Finished& fin, const opaque* sender) -{ - opaque handshake_hash[FINISHED_SZ]; - - ssl.useHashes().use_MD5().get_digest(handshake_hash); - ssl.useHashes().use_SHA().get_digest(&handshake_hash[MD5_LEN]); - - const opaque* side; - if ( strncmp((const char*)sender, (const char*)client, SIZEOF_SENDER) == 0) - side = tls_client; - else - side = tls_server; - - PRF(fin.set_md5(), TLS_FINISHED_SZ, - ssl.getSecurity().get_connection().master_secret_, SECRET_LEN, - side, FINISHED_LABEL_SZ, - handshake_hash, FINISHED_SZ); - - fin.set_length(TLS_FINISHED_SZ); // shorter length for TLS -} - - -// compute p_hash for MD5 or SHA-1 for TLSv1 PRF -void p_hash(output_buffer& result, const output_buffer& secret, - const output_buffer& seed, MACAlgorithm hash) -{ - uint len = hash == md5 ? MD5_LEN : SHA_LEN; - uint times = result.get_capacity() / len; - uint lastLen = result.get_capacity() % len; - opaque previous[SHA_LEN]; // max size - opaque current[SHA_LEN]; // max size - mySTL::auto_ptr hmac; - - if (lastLen) times += 1; - - if (hash == md5) - hmac.reset(NEW_YS HMAC_MD5(secret.get_buffer(), secret.get_size())); - else - hmac.reset(NEW_YS HMAC_SHA(secret.get_buffer(), secret.get_size())); - // A0 = seed - hmac->get_digest(previous, seed.get_buffer(), seed.get_size());// A1 - uint lastTime = times - 1; - - for (uint i = 0; i < times; i++) { - hmac->update(previous, len); - hmac->get_digest(current, seed.get_buffer(), seed.get_size()); - - if (lastLen && (i == lastTime)) - result.write(current, lastLen); - else { - result.write(current, len); - //memcpy(previous, current, len); - hmac->get_digest(previous, previous, len); - } - } -} - - -// calculate XOR for TLSv1 PRF -void get_xor(byte *digest, uint digLen, output_buffer& md5, - output_buffer& sha) -{ - for (uint i = 0; i < digLen; i++) - digest[i] = md5[AUTO] ^ sha[AUTO]; -} - - -// build MD5 part of certificate verify -void buildMD5_CertVerify(SSL& ssl, byte* digest) -{ - opaque md5_result[MD5_LEN]; - opaque md5_inner[SECRET_LEN + PAD_MD5]; - opaque md5_outer[SECRET_LEN + PAD_MD5 + MD5_LEN]; - - const opaque* master_secret = - ssl.getSecurity().get_connection().master_secret_; - - // make md5 inner - memcpy(md5_inner, master_secret, SECRET_LEN); - memcpy(&md5_inner[SECRET_LEN], PAD1, PAD_MD5); - - ssl.useHashes().use_MD5().get_digest(md5_result, md5_inner, - sizeof(md5_inner)); - - // make md5 outer - memcpy(md5_outer, master_secret, SECRET_LEN); - memcpy(&md5_outer[SECRET_LEN], PAD2, PAD_MD5); - memcpy(&md5_outer[SECRET_LEN + PAD_MD5], md5_result, MD5_LEN); - - ssl.useHashes().use_MD5().get_digest(digest, md5_outer, sizeof(md5_outer)); -} - - -// build SHA part of certificate verify -void buildSHA_CertVerify(SSL& ssl, byte* digest) -{ - opaque sha_result[SHA_LEN]; - opaque sha_inner[SECRET_LEN + PAD_SHA]; - opaque sha_outer[SECRET_LEN + PAD_SHA + SHA_LEN]; - - const opaque* master_secret = - ssl.getSecurity().get_connection().master_secret_; - - // make sha inner - memcpy(sha_inner, master_secret, SECRET_LEN); - memcpy(&sha_inner[SECRET_LEN], PAD1, PAD_SHA); - - ssl.useHashes().use_SHA().get_digest(sha_result, sha_inner, - sizeof(sha_inner)); - - // make sha outer - memcpy(sha_outer, master_secret, SECRET_LEN); - memcpy(&sha_outer[SECRET_LEN], PAD2, PAD_SHA); - memcpy(&sha_outer[SECRET_LEN + PAD_SHA], sha_result, SHA_LEN); - - ssl.useHashes().use_SHA().get_digest(digest, sha_outer, sizeof(sha_outer)); -} - - -} // namespace for locals - - -// some clients still send sslv2 client hello -void ProcessOldClientHello(input_buffer& input, SSL& ssl) -{ - if (input.get_remaining() < 2) { - ssl.SetError(bad_input); - return; - } - byte b0 = input[AUTO]; - byte b1 = input[AUTO]; - - uint16 sz = ((b0 & 0x7f) << 8) | b1; - - if (sz > input.get_remaining()) { - ssl.SetError(bad_input); - return; - } - - // hashHandShake manually - const opaque* buffer = input.get_buffer() + input.get_current(); - ssl.useHashes().use_MD5().update(buffer, sz); - ssl.useHashes().use_SHA().update(buffer, sz); - - b1 = input[AUTO]; // does this value mean client_hello? - - ClientHello ch; - ch.client_version_.major_ = input[AUTO]; - ch.client_version_.minor_ = input[AUTO]; - - byte len[2]; - - input.read(len, sizeof(len)); - ato16(len, ch.suite_len_); - - input.read(len, sizeof(len)); - uint16 sessionLen; - ato16(len, sessionLen); - ch.id_len_ = sessionLen; - - input.read(len, sizeof(len)); - uint16 randomLen; - ato16(len, randomLen); - if (ch.suite_len_ > MAX_SUITE_SZ || sessionLen > ID_LEN || - randomLen > RAN_LEN) { - ssl.SetError(bad_input); - return; - } - - int j = 0; - for (uint16 i = 0; i < ch.suite_len_; i += 3) { - byte first = input[AUTO]; - if (first) // sslv2 type - input.read(len, SUITE_LEN); // skip - else { - input.read(&ch.cipher_suites_[j], SUITE_LEN); - j += SUITE_LEN; - } - } - ch.suite_len_ = j; - - if (ch.id_len_) - input.read(ch.session_id_, ch.id_len_); - - if (randomLen < RAN_LEN) - memset(ch.random_, 0, RAN_LEN - randomLen); - input.read(&ch.random_[RAN_LEN - randomLen], randomLen); - - - ch.Process(input, ssl); -} - - -// Build a finished message, see 7.6.9 -void buildFinished(SSL& ssl, Finished& fin, const opaque* sender) -{ - // store current states, building requires get_digest which resets state - MD5 md5(ssl.getHashes().get_MD5()); - SHA sha(ssl.getHashes().get_SHA()); - - if (ssl.isTLS()) - buildFinishedTLS(ssl, fin, sender); - else { - buildMD5(ssl, fin, sender); - buildSHA(ssl, fin, sender); - } - - // restore - ssl.useHashes().use_MD5() = md5; - ssl.useHashes().use_SHA() = sha; -} - - -/* compute SSLv3 HMAC into digest see - * buffer is of sz size and includes HandShake Header but not a Record Header - * verify means to check peers hmac -*/ -void hmac(SSL& ssl, byte* digest, const byte* buffer, uint sz, - ContentType content, bool verify) -{ - Digest& mac = ssl.useCrypto().use_digest(); - opaque inner[SHA_LEN + PAD_MD5 + SEQ_SZ + SIZEOF_ENUM + LENGTH_SZ]; - opaque outer[SHA_LEN + PAD_MD5 + SHA_LEN]; - opaque result[SHA_LEN]; // max possible sizes - uint digestSz = mac.get_digestSize(); // actual sizes - uint padSz = mac.get_padSize(); - uint innerSz = digestSz + padSz + SEQ_SZ + SIZEOF_ENUM + LENGTH_SZ; - uint outerSz = digestSz + padSz + digestSz; - - // data - const opaque* mac_secret = ssl.get_macSecret(verify); - opaque seq[SEQ_SZ] = { 0x00, 0x00, 0x00, 0x00 }; - opaque length[LENGTH_SZ]; - c16toa(sz, length); - c32toa(ssl.get_SEQIncrement(verify), &seq[sizeof(uint32)]); - - // make inner - memcpy(inner, mac_secret, digestSz); - memcpy(&inner[digestSz], PAD1, padSz); - memcpy(&inner[digestSz + padSz], seq, SEQ_SZ); - inner[digestSz + padSz + SEQ_SZ] = content; - memcpy(&inner[digestSz + padSz + SEQ_SZ + SIZEOF_ENUM], length, LENGTH_SZ); - - mac.update(inner, innerSz); - mac.get_digest(result, buffer, sz); // append content buffer - - // make outer - memcpy(outer, mac_secret, digestSz); - memcpy(&outer[digestSz], PAD2, padSz); - memcpy(&outer[digestSz + padSz], result, digestSz); - - mac.get_digest(digest, outer, outerSz); -} - - -// TLS type HAMC -void TLS_hmac(SSL& ssl, byte* digest, const byte* buffer, uint sz, - ContentType content, bool verify) -{ - mySTL::auto_ptr hmac; - opaque seq[SEQ_SZ] = { 0x00, 0x00, 0x00, 0x00 }; - opaque length[LENGTH_SZ]; - opaque inner[SIZEOF_ENUM + VERSION_SZ + LENGTH_SZ]; // type + version + len - - c16toa(sz, length); - c32toa(ssl.get_SEQIncrement(verify), &seq[sizeof(uint32)]); - - MACAlgorithm algo = ssl.getSecurity().get_parms().mac_algorithm_; - - if (algo == sha) - hmac.reset(NEW_YS HMAC_SHA(ssl.get_macSecret(verify), SHA_LEN)); - else if (algo == rmd) - hmac.reset(NEW_YS HMAC_RMD(ssl.get_macSecret(verify), RMD_LEN)); - else - hmac.reset(NEW_YS HMAC_MD5(ssl.get_macSecret(verify), MD5_LEN)); - - hmac->update(seq, SEQ_SZ); // seq_num - inner[0] = content; // type - inner[SIZEOF_ENUM] = ssl.getSecurity().get_connection().version_.major_; - inner[SIZEOF_ENUM + SIZEOF_ENUM] = - ssl.getSecurity().get_connection().version_.minor_; // version - memcpy(&inner[SIZEOF_ENUM + VERSION_SZ], length, LENGTH_SZ); // length - hmac->update(inner, sizeof(inner)); - hmac->get_digest(digest, buffer, sz); // content -} - - -// compute TLSv1 PRF (pseudo random function using HMAC) -void PRF(byte* digest, uint digLen, const byte* secret, uint secLen, - const byte* label, uint labLen, const byte* seed, uint seedLen) -{ - uint half = (secLen + 1) / 2; - - output_buffer md5_half(half); - output_buffer sha_half(half); - output_buffer labelSeed(labLen + seedLen); - - md5_half.write(secret, half); - sha_half.write(secret + half - secLen % 2, half); - labelSeed.write(label, labLen); - labelSeed.write(seed, seedLen); - - output_buffer md5_result(digLen); - output_buffer sha_result(digLen); - - p_hash(md5_result, md5_half, labelSeed, md5); - p_hash(sha_result, sha_half, labelSeed, sha); - - md5_result.set_current(0); - sha_result.set_current(0); - get_xor(digest, digLen, md5_result, sha_result); -} - - -// build certificate hashes -void build_certHashes(SSL& ssl, Hashes& hashes) -{ - // store current states, building requires get_digest which resets state - MD5 md5(ssl.getHashes().get_MD5()); - SHA sha(ssl.getHashes().get_SHA()); - - if (ssl.isTLS()) { - ssl.useHashes().use_MD5().get_digest(hashes.md5_); - ssl.useHashes().use_SHA().get_digest(hashes.sha_); - } - else { - buildMD5_CertVerify(ssl, hashes.md5_); - buildSHA_CertVerify(ssl, hashes.sha_); - } - - // restore - ssl.useHashes().use_MD5() = md5; - ssl.useHashes().use_SHA() = sha; -} - - - -// do process input requests, return 0 is done, 1 is call again to complete -int DoProcessReply(SSL& ssl) -{ - // wait for input if blocking - if (!ssl.useSocket().wait()) { - ssl.SetError(receive_error); - return 0; - } - uint ready = ssl.getSocket().get_ready(); - if (!ready) return 1; - - // add buffered data if its there - input_buffer* buffered = ssl.useBuffers().TakeRawInput(); - uint buffSz = buffered ? buffered->get_size() : 0; - input_buffer buffer(buffSz + ready); - if (buffSz) { - buffer.assign(buffered->get_buffer(), buffSz); - ysDelete(buffered); - buffered = 0; - } - - // add new data - uint read = ssl.useSocket().receive(buffer.get_buffer() + buffSz, ready); - if (read == static_cast(-1)) { - ssl.SetError(receive_error); - return 0; - } - buffer.add_size(read); - uint offset = 0; - const MessageFactory& mf = ssl.getFactory().getMessage(); - - // old style sslv2 client hello? - if (ssl.getSecurity().get_parms().entity_ == server_end && - ssl.getStates().getServer() == clientNull) - if (buffer.peek() != handshake) { - ProcessOldClientHello(buffer, ssl); - if (ssl.GetError()) - return 0; - } - - while(!buffer.eof()) { - // each record - RecordLayerHeader hdr; - bool needHdr = false; - - if (static_cast(RECORD_HEADER) > buffer.get_remaining()) - needHdr = true; - else { - buffer >> hdr; - ssl.verifyState(hdr); - } - - // make sure we have enough input in buffer to process this record - if (needHdr || hdr.length_ > buffer.get_remaining()) { - // put header in front for next time processing - uint extra = needHdr ? 0 : RECORD_HEADER; - uint sz = buffer.get_remaining() + extra; - ssl.useBuffers().SetRawInput(NEW_YS input_buffer(sz, - buffer.get_buffer() + buffer.get_current() - extra, sz)); - return 1; - } - - while (buffer.get_current() < hdr.length_ + RECORD_HEADER + offset) { - // each message in record, can be more than 1 if not encrypted - if (ssl.getSecurity().get_parms().pending_ == false) // cipher on - decrypt_message(ssl, buffer, hdr.length_); - - mySTL::auto_ptr msg(mf.CreateObject(hdr.type_)); - if (!msg.get()) { - ssl.SetError(factory_error); - return 0; - } - buffer >> *msg; - msg->Process(buffer, ssl); - if (ssl.GetError()) - return 0; - } - offset += hdr.length_ + RECORD_HEADER; - } - return 0; -} - - -// process input requests -void processReply(SSL& ssl) -{ - if (ssl.GetError()) return; - - if (DoProcessReply(ssl)) - // didn't complete process - if (!ssl.getSocket().IsNonBlocking()) { - // keep trying now, blocking ok - while (!ssl.GetError()) - if (DoProcessReply(ssl) == 0) break; - } - else - // user will have try again later, non blocking - ssl.SetError(YasslError(SSL_ERROR_WANT_READ)); -} - - -// send client_hello, no buffering -void sendClientHello(SSL& ssl) -{ - ssl.verifyState(serverNull); - if (ssl.GetError()) return; - - ClientHello ch(ssl.getSecurity().get_connection().version_, - ssl.getSecurity().get_connection().compression_); - RecordLayerHeader rlHeader; - HandShakeHeader hsHeader; - output_buffer out; - - buildClientHello(ssl, ch); - ssl.set_random(ch.get_random(), client_end); - buildHeaders(ssl, hsHeader, rlHeader, ch); - buildOutput(out, rlHeader, hsHeader, ch); - hashHandShake(ssl, out); - - ssl.Send(out.get_buffer(), out.get_size()); -} - - -// send client key exchange -void sendClientKeyExchange(SSL& ssl, BufferOutput buffer) -{ - ssl.verifyState(serverHelloDoneComplete); - if (ssl.GetError()) return; - - ClientKeyExchange ck(ssl); - ck.build(ssl); - ssl.makeMasterSecret(); - - RecordLayerHeader rlHeader; - HandShakeHeader hsHeader; - mySTL::auto_ptr out(NEW_YS output_buffer); - buildHeaders(ssl, hsHeader, rlHeader, ck); - buildOutput(*out.get(), rlHeader, hsHeader, ck); - hashHandShake(ssl, *out.get()); - - if (buffer == buffered) - ssl.addBuffer(out.release()); - else - ssl.Send(out->get_buffer(), out->get_size()); -} - - -// send server key exchange -void sendServerKeyExchange(SSL& ssl, BufferOutput buffer) -{ - if (ssl.GetError()) return; - ServerKeyExchange sk(ssl); - sk.build(ssl); - - RecordLayerHeader rlHeader; - HandShakeHeader hsHeader; - mySTL::auto_ptr out(NEW_YS output_buffer); - buildHeaders(ssl, hsHeader, rlHeader, sk); - buildOutput(*out.get(), rlHeader, hsHeader, sk); - hashHandShake(ssl, *out.get()); - - if (buffer == buffered) - ssl.addBuffer(out.release()); - else - ssl.Send(out->get_buffer(), out->get_size()); -} - - -// send change cipher -void sendChangeCipher(SSL& ssl, BufferOutput buffer) -{ - if (ssl.getSecurity().get_parms().entity_ == server_end) - if (ssl.getSecurity().get_resuming()) - ssl.verifyState(clientKeyExchangeComplete); - else - ssl.verifyState(clientFinishedComplete); - if (ssl.GetError()) return; - - ChangeCipherSpec ccs; - RecordLayerHeader rlHeader; - buildHeader(ssl, rlHeader, ccs); - mySTL::auto_ptr out(NEW_YS output_buffer); - buildOutput(*out.get(), rlHeader, ccs); - - if (buffer == buffered) - ssl.addBuffer(out.release()); - else - ssl.Send(out->get_buffer(), out->get_size()); -} - - -// send finished -void sendFinished(SSL& ssl, ConnectionEnd side, BufferOutput buffer) -{ - if (ssl.GetError()) return; - - Finished fin; - buildFinished(ssl, fin, side == client_end ? client : server); - mySTL::auto_ptr out(NEW_YS output_buffer); - cipherFinished(ssl, fin, *out.get()); // hashes handshake - - if (ssl.getSecurity().get_resuming()) { - if (side == server_end) - buildFinished(ssl, ssl.useHashes().use_verify(), client); // client - } - else { - if (!ssl.getSecurity().GetContext()->GetSessionCacheOff()) - GetSessions().add(ssl); // store session - if (side == client_end) - buildFinished(ssl, ssl.useHashes().use_verify(), server); // server - } - ssl.useSecurity().use_connection().CleanMaster(); - - if (buffer == buffered) - ssl.addBuffer(out.release()); - else - ssl.Send(out->get_buffer(), out->get_size()); -} - - -// send data -int sendData(SSL& ssl, const void* buffer, int sz) -{ - if (ssl.GetError() == YasslError(SSL_ERROR_WANT_READ)) - ssl.SetError(no_error); - - ssl.verfiyHandShakeComplete(); - if (ssl.GetError()) return -1; - int sent = 0; - - for (;;) { - int len = min(sz - sent, MAX_RECORD_SIZE); - output_buffer out; - input_buffer tmp; - - Data data; - - if (ssl.CompressionOn()) { - if (Compress(static_cast(buffer) + sent, len, - tmp) == -1) { - ssl.SetError(compress_error); - return -1; - } - data.SetData(tmp.get_size(), tmp.get_buffer()); - } - else - data.SetData(len, static_cast(buffer) + sent); - - buildMessage(ssl, out, data); - ssl.Send(out.get_buffer(), out.get_size()); - - if (ssl.GetError()) return -1; - sent += len; - if (sent == sz) break; - } - ssl.useLog().ShowData(sent, true); - return sent; -} - - -// send alert -int sendAlert(SSL& ssl, const Alert& alert) -{ - output_buffer out; - buildAlert(ssl, out, alert); - ssl.Send(out.get_buffer(), out.get_size()); - - return alert.get_length(); -} - - -// process input data -int receiveData(SSL& ssl, Data& data, bool peek) -{ - if (ssl.GetError() == YasslError(SSL_ERROR_WANT_READ)) - ssl.SetError(no_error); - - ssl.verfiyHandShakeComplete(); - if (ssl.GetError()) return -1; - - if (!ssl.HasData()) - processReply(ssl); - - if (peek) - ssl.PeekData(data); - else - ssl.fillData(data); - - ssl.useLog().ShowData(data.get_length()); - if (ssl.GetError()) return -1; - - if (data.get_length() == 0 && ssl.getSocket().WouldBlock()) { - ssl.SetError(YasslError(SSL_ERROR_WANT_READ)); - return SSL_WOULD_BLOCK; - } - return data.get_length(); -} - - -// send server hello -void sendServerHello(SSL& ssl, BufferOutput buffer) -{ - if (ssl.getSecurity().get_resuming()) - ssl.verifyState(clientKeyExchangeComplete); - else - ssl.verifyState(clientHelloComplete); - if (ssl.GetError()) return; - - ServerHello sh(ssl.getSecurity().get_connection().version_, - ssl.getSecurity().get_connection().compression_); - RecordLayerHeader rlHeader; - HandShakeHeader hsHeader; - mySTL::auto_ptr out(NEW_YS output_buffer); - - buildServerHello(ssl, sh); - ssl.set_random(sh.get_random(), server_end); - buildHeaders(ssl, hsHeader, rlHeader, sh); - buildOutput(*out.get(), rlHeader, hsHeader, sh); - hashHandShake(ssl, *out.get()); - - if (buffer == buffered) - ssl.addBuffer(out.release()); - else - ssl.Send(out->get_buffer(), out->get_size()); -} - - -// send server hello done -void sendServerHelloDone(SSL& ssl, BufferOutput buffer) -{ - if (ssl.GetError()) return; - - ServerHelloDone shd; - RecordLayerHeader rlHeader; - HandShakeHeader hsHeader; - mySTL::auto_ptr out(NEW_YS output_buffer); - - buildHeaders(ssl, hsHeader, rlHeader, shd); - buildOutput(*out.get(), rlHeader, hsHeader, shd); - hashHandShake(ssl, *out.get()); - - if (buffer == buffered) - ssl.addBuffer(out.release()); - else - ssl.Send(out->get_buffer(), out->get_size()); -} - - -// send certificate -void sendCertificate(SSL& ssl, BufferOutput buffer) -{ - if (ssl.GetError()) return; - - Certificate cert(ssl.getCrypto().get_certManager().get_cert()); - RecordLayerHeader rlHeader; - HandShakeHeader hsHeader; - mySTL::auto_ptr out(NEW_YS output_buffer); - - buildHeaders(ssl, hsHeader, rlHeader, cert); - buildOutput(*out.get(), rlHeader, hsHeader, cert); - hashHandShake(ssl, *out.get()); - - if (buffer == buffered) - ssl.addBuffer(out.release()); - else - ssl.Send(out->get_buffer(), out->get_size()); -} - - -// send certificate request -void sendCertificateRequest(SSL& ssl, BufferOutput buffer) -{ - if (ssl.GetError()) return; - - CertificateRequest request; - request.Build(); - RecordLayerHeader rlHeader; - HandShakeHeader hsHeader; - mySTL::auto_ptr out(NEW_YS output_buffer); - - buildHeaders(ssl, hsHeader, rlHeader, request); - buildOutput(*out.get(), rlHeader, hsHeader, request); - hashHandShake(ssl, *out.get()); - - if (buffer == buffered) - ssl.addBuffer(out.release()); - else - ssl.Send(out->get_buffer(), out->get_size()); -} - - -// send certificate verify -void sendCertificateVerify(SSL& ssl, BufferOutput buffer) -{ - if (ssl.GetError()) return; - - CertificateVerify verify; - verify.Build(ssl); - RecordLayerHeader rlHeader; - HandShakeHeader hsHeader; - mySTL::auto_ptr out(NEW_YS output_buffer); - - buildHeaders(ssl, hsHeader, rlHeader, verify); - buildOutput(*out.get(), rlHeader, hsHeader, verify); - hashHandShake(ssl, *out.get()); - - if (buffer == buffered) - ssl.addBuffer(out.release()); - else - ssl.Send(out->get_buffer(), out->get_size()); -} - - -} // namespace diff --git a/externals/mysql/extlib/yassl/src/lock.cpp b/externals/mysql/extlib/yassl/src/lock.cpp deleted file mode 100644 index 6d8e9c1747..0000000000 --- a/externals/mysql/extlib/yassl/src/lock.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* Locking functions - */ - -#include "runtime.hpp" -#include "lock.hpp" - - -namespace yaSSL { - - -#ifdef MULTI_THREADED - #ifdef _WIN32 - - Mutex::Mutex() - { - InitializeCriticalSection(&cs_); - } - - - Mutex::~Mutex() - { - DeleteCriticalSection(&cs_); - } - - - Mutex::Lock::Lock(Mutex& lm) : mutex_(lm) - { - EnterCriticalSection(&mutex_.cs_); - } - - - Mutex::Lock::~Lock() - { - LeaveCriticalSection(&mutex_.cs_); - } - - #else // _WIN32 - - Mutex::Mutex() - { - pthread_mutex_init(&mutex_, 0); - } - - - Mutex::~Mutex() - { - pthread_mutex_destroy(&mutex_); - } - - - Mutex::Lock::Lock(Mutex& lm) : mutex_(lm) - { - pthread_mutex_lock(&mutex_.mutex_); - } - - - Mutex::Lock::~Lock() - { - pthread_mutex_unlock(&mutex_.mutex_); - } - - - #endif // _WIN32 -#endif // MULTI_THREADED - - - -} // namespace yaSSL - diff --git a/externals/mysql/extlib/yassl/src/log.cpp b/externals/mysql/extlib/yassl/src/log.cpp deleted file mode 100644 index 35db4136a5..0000000000 --- a/externals/mysql/extlib/yassl/src/log.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* Debug logging functions - */ - - -#include "runtime.hpp" -#include "log.hpp" - -#ifdef YASSL_LOG - #include - #include - #include -#endif - - - -namespace yaSSL { - - -#ifdef YASSL_LOG - - enum { MAX_MSG = 81 }; - - Log::Log(const char* str) - { - log_ = fopen(str, "w"); - Trace("********** Logger Attached **********"); - } - - - Log::~Log() - { - Trace("********** Logger Detached **********"); - fclose(log_); - } - - - // Trace a message - void Log::Trace(const char* str) - { - if (!log_) return; - - time_t clicks = time(0); - char timeStr[32]; - - // get rid of newline - strncpy(timeStr, ctime(&clicks), sizeof(timeStr)); - unsigned int len = strlen(timeStr); - timeStr[len - 1] = 0; - - char msg[MAX_MSG]; - - strncpy(msg, timeStr, sizeof(timeStr)); - strncat(msg, ":", 1); - strncat(msg, str, MAX_MSG - sizeof(timeStr) - 2); - strncat(msg, "\n", 1); - msg[MAX_MSG - 1] = 0; - - fputs(msg, log_); - } - - - #if defined(_WIN32) || defined(__MACH__) || defined(__hpux__) - typedef int socklen_t; - #endif - - - // write tcp address - void Log::ShowTCP(socket_t fd, bool ended) - { - sockaddr_in peeraddr; - socklen_t len = sizeof(peeraddr); - if (getpeername(fd, (sockaddr*)&peeraddr, &len) != 0) - return; - - const char* p = reinterpret_cast(&peeraddr.sin_addr); - char msg[MAX_MSG]; - char number[16]; - - if (ended) - strncpy(msg, "yaSSL conn DONE w/ peer ", 26); - else - strncpy(msg, "yaSSL conn BEGUN w/ peer ", 26); - for (int i = 0; i < 4; ++i) { - sprintf(number, "%u", static_cast(p[i])); - strncat(msg, number, 8); - if (i < 3) - strncat(msg, ".", 1); - } - strncat(msg, " port ", 8); - sprintf(number, "%d", htons(peeraddr.sin_port)); - strncat(msg, number, 8); - - msg[MAX_MSG - 1] = 0; - Trace(msg); - } - - - // log processed data - void Log::ShowData(uint bytes, bool sent) - { - char msg[MAX_MSG]; - char number[16]; - - if (sent) - strncpy(msg, "Sent ", 10); - else - strncpy(msg, "Received ", 10); - sprintf(number, "%u", bytes); - strncat(msg, number, 8); - strncat(msg, " bytes of application data", 27); - - msg[MAX_MSG - 1] = 0; - Trace(msg); - } - - -#else // no YASSL_LOG - - - Log::Log(const char*) {} - Log::~Log() {} - void Log::Trace(const char*) {} - void Log::ShowTCP(socket_t, bool) {} - void Log::ShowData(uint, bool) {} - - -#endif // YASSL_LOG -} // namespace diff --git a/externals/mysql/extlib/yassl/src/socket_wrapper.cpp b/externals/mysql/extlib/yassl/src/socket_wrapper.cpp deleted file mode 100644 index eee5d47377..0000000000 --- a/externals/mysql/extlib/yassl/src/socket_wrapper.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* The socket wrapper source implements a Socket class that hides the - * differences between Berkely style sockets and Windows sockets, allowing - * transparent TCP access. - */ - - -#include "runtime.hpp" -#include "socket_wrapper.hpp" - -#ifndef _WIN32 - #include - #include - #include - #include - #include - #include - #include - #include -#endif // _WIN32 - -#if defined(__sun) || defined(__SCO_VERSION__) || defined(__NETWARE__) - #include -#endif - -#ifdef _WIN32 - const int SOCKET_EINVAL = WSAEINVAL; - const int SOCKET_EWOULDBLOCK = WSAEWOULDBLOCK; - const int SOCKET_EAGAIN = WSAEWOULDBLOCK; -#else - const int SOCKET_EINVAL = EINVAL; - const int SOCKET_EWOULDBLOCK = EWOULDBLOCK; - const int SOCKET_EAGAIN = EAGAIN; -#endif // _WIN32 - - -namespace yaSSL { - - -Socket::Socket(socket_t s) - : socket_(s), wouldBlock_(false), nonBlocking_(false) -{} - - -void Socket::set_fd(socket_t s) -{ - socket_ = s; -} - - -socket_t Socket::get_fd() const -{ - return socket_; -} - - -Socket::~Socket() -{ - // don't close automatically now -} - - -void Socket::closeSocket() -{ - if (socket_ != INVALID_SOCKET) { -#ifdef _WIN32 - closesocket(socket_); -#else - close(socket_); -#endif - socket_ = INVALID_SOCKET; - } -} - - -uint Socket::get_ready() const -{ -#ifdef _WIN32 - unsigned long ready = 0; - ioctlsocket(socket_, FIONREAD, &ready); -#else - /* - 64-bit Solaris requires the variable passed to - FIONREAD be a 32-bit value. - */ - unsigned int ready = 0; - ioctl(socket_, FIONREAD, &ready); -#endif - - return ready; -} - - -uint Socket::send(const byte* buf, unsigned int sz, int flags) const -{ - const byte* pos = buf; - const byte* end = pos + sz; - - while (pos != end) { - int sent = ::send(socket_, reinterpret_cast(pos), - static_cast(end - pos), flags); - - if (sent == -1) - return 0; - - pos += sent; - } - - return sz; -} - - -uint Socket::receive(byte* buf, unsigned int sz, int flags) -{ - wouldBlock_ = false; - - int recvd = ::recv(socket_, reinterpret_cast(buf), sz, flags); - - // idea to seperate error from would block by arnetheduck@gmail.com - if (recvd == -1) { - if (get_lastError() == SOCKET_EWOULDBLOCK || - get_lastError() == SOCKET_EAGAIN) { - wouldBlock_ = true; // would have blocked this time only - nonBlocking_ = true; // socket nonblocking, win32 only way to tell - return 0; - } - } - else if (recvd == 0) - return static_cast(-1); - - return recvd; -} - - -// wait if blocking for input, return false for error -bool Socket::wait() -{ - byte b; - return receive(&b, 1, MSG_PEEK) != static_cast(-1); -} - - -void Socket::shutDown(int how) -{ - shutdown(socket_, how); -} - - -int Socket::get_lastError() -{ -#ifdef _WIN32 - return WSAGetLastError(); -#else - return errno; -#endif -} - - -bool Socket::WouldBlock() const -{ - return wouldBlock_; -} - - -bool Socket::IsNonBlocking() const -{ - return nonBlocking_; -} - - -void Socket::set_lastError(int errorCode) -{ -#ifdef _WIN32 - WSASetLastError(errorCode); -#else - errno = errorCode; -#endif -} - - -} // namespace diff --git a/externals/mysql/extlib/yassl/src/ssl.cpp b/externals/mysql/extlib/yassl/src/ssl.cpp deleted file mode 100644 index 29aa034f88..0000000000 --- a/externals/mysql/extlib/yassl/src/ssl.cpp +++ /dev/null @@ -1,1672 +0,0 @@ -/* - Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* SSL source implements all openssl compatibility API functions - * - * TODO: notes are mostly api additions to allow compilation with mysql - * they don't affect normal modes but should be provided for completeness - - * stunnel functions at end of file - */ - - - - -/* see man pages for function descriptions */ - -#include "runtime.hpp" -#include "openssl/ssl.h" -#include "handshake.hpp" -#include "yassl_int.hpp" -#include "md5.hpp" // for TaoCrypt MD5 size assert -#include "md4.hpp" // for TaoCrypt MD4 size assert -#include "file.hpp" // for TaoCrypt Source -#include "coding.hpp" // HexDecoder -#include "helpers.hpp" // for placement new hack -#include - -#ifdef _WIN32 - #include // FindFirstFile etc.. -#else - #include // file helper - #include // stat - #include // opendir -#endif - - -namespace yaSSL { - - - -int read_file(SSL_CTX* ctx, const char* file, int format, CertType type) -{ - if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM) - return SSL_BAD_FILETYPE; - - if (file == NULL || !file[0]) - return SSL_BAD_FILE; - - FILE* input = fopen(file, "rb"); - if (!input) - return SSL_BAD_FILE; - - if (type == CA) { - // may have a bunch of CAs - x509* ptr; - while ( (ptr = PemToDer(input, Cert)) ) - ctx->AddCA(ptr); - - if (!feof(input)) { - fclose(input); - return SSL_BAD_FILE; - } - } - else { - x509*& x = (type == Cert) ? ctx->certificate_ : ctx->privateKey_; - - if (format == SSL_FILETYPE_ASN1) { - fseek(input, 0, SEEK_END); - long sz = ftell(input); - rewind(input); - x = NEW_YS x509(sz); // takes ownership - size_t bytes = fread(x->use_buffer(), sz, 1, input); - if (bytes != 1) { - fclose(input); - return SSL_BAD_FILE; - } - } - else { - EncryptedInfo info; - x = PemToDer(input, type, &info); - if (!x) { - fclose(input); - return SSL_BAD_FILE; - } - if (info.set) { - // decrypt - char password[80]; - pem_password_cb cb = ctx->GetPasswordCb(); - if (!cb) { - fclose(input); - return SSL_BAD_FILE; - } - int passwordSz = cb(password, sizeof(password), 0, - ctx->GetUserData()); - byte key[AES_256_KEY_SZ]; // max sizes - byte iv[AES_IV_SZ]; - - // use file's salt for key derivation, but not real iv - TaoCrypt::Source source(info.iv, info.ivSz); - TaoCrypt::HexDecoder dec(source); - memcpy(info.iv, source.get_buffer(), min((uint)sizeof(info.iv), - source.size())); - EVP_BytesToKey(info.name, "MD5", info.iv, (byte*)password, - passwordSz, 1, key, iv); - - mySTL::auto_ptr cipher; - if (strncmp(info.name, "DES-CBC", 7) == 0) - cipher.reset(NEW_YS DES); - else if (strncmp(info.name, "DES-EDE3-CBC", 13) == 0) - cipher.reset(NEW_YS DES_EDE); - else if (strncmp(info.name, "AES-128-CBC", 13) == 0) - cipher.reset(NEW_YS AES(AES_128_KEY_SZ)); - else if (strncmp(info.name, "AES-192-CBC", 13) == 0) - cipher.reset(NEW_YS AES(AES_192_KEY_SZ)); - else if (strncmp(info.name, "AES-256-CBC", 13) == 0) - cipher.reset(NEW_YS AES(AES_256_KEY_SZ)); - else { - fclose(input); - return SSL_BAD_FILE; - } - cipher->set_decryptKey(key, info.iv); - mySTL::auto_ptr newx(NEW_YS x509(x->get_length())); - cipher->decrypt(newx->use_buffer(), x->get_buffer(), - x->get_length()); - ysDelete(x); - x = newx.release(); - } - } - } - fclose(input); - return SSL_SUCCESS; -} - - -extern "C" { - - -SSL_METHOD* SSLv3_method() -{ - return SSLv3_client_method(); -} - - -SSL_METHOD* SSLv3_server_method() -{ - return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,0)); -} - - -SSL_METHOD* SSLv3_client_method() -{ - return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,0)); -} - - -SSL_METHOD* TLSv1_server_method() -{ - return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,1)); -} - - -SSL_METHOD* TLSv1_client_method() -{ - return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,1)); -} - - -SSL_METHOD* TLSv1_1_server_method() -{ - return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,2)); -} - - -SSL_METHOD* TLSv1_1_client_method() -{ - return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,2)); -} - - -SSL_METHOD* SSLv23_server_method() -{ - // compatibility only, no version 2 support, but does SSL 3 and TLS 1 - return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,2), true); -} - - -SSL_METHOD* SSLv23_client_method() -{ - // compatibility only, no version 2 support, but does SSL 3 and TLS 1 - // though it sends TLS1 hello not SSLv2 so SSLv3 only servers will decline - // TODO: maybe add support to send SSLv2 hello ??? - return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,2), true); -} - - -SSL_CTX* SSL_CTX_new(SSL_METHOD* method) -{ - return NEW_YS SSL_CTX(method); -} - - -void SSL_CTX_free(SSL_CTX* ctx) -{ - ysDelete(ctx); -} - - -SSL* SSL_new(SSL_CTX* ctx) -{ - return NEW_YS SSL(ctx); -} - - -void SSL_free(SSL* ssl) -{ - ysDelete(ssl); -} - - -int SSL_set_fd(SSL* ssl, YASSL_SOCKET_T fd) -{ - ssl->useSocket().set_fd(fd); - return SSL_SUCCESS; -} - - -YASSL_SOCKET_T SSL_get_fd(const SSL* ssl) -{ - return ssl->getSocket().get_fd(); -} - - -// if you get an error from connect see note at top of README -int SSL_connect(SSL* ssl) -{ - if (ssl->GetError() == YasslError(SSL_ERROR_WANT_READ)) - ssl->SetError(no_error); - - ClientState neededState; - - switch (ssl->getStates().GetConnect()) { - - case CONNECT_BEGIN : - sendClientHello(*ssl); - if (!ssl->GetError()) - ssl->useStates().UseConnect() = CLIENT_HELLO_SENT; - - case CLIENT_HELLO_SENT : - neededState = ssl->getSecurity().get_resuming() ? - serverFinishedComplete : serverHelloDoneComplete; - while (ssl->getStates().getClient() < neededState) { - if (ssl->GetError()) break; - processReply(*ssl); - } - if (!ssl->GetError()) - ssl->useStates().UseConnect() = FIRST_REPLY_DONE; - - case FIRST_REPLY_DONE : - if(ssl->getCrypto().get_certManager().sendVerify()) - sendCertificate(*ssl); - - if (!ssl->getSecurity().get_resuming()) - sendClientKeyExchange(*ssl); - - if(ssl->getCrypto().get_certManager().sendVerify()) - sendCertificateVerify(*ssl); - - sendChangeCipher(*ssl); - sendFinished(*ssl, client_end); - ssl->flushBuffer(); - - if (!ssl->GetError()) - ssl->useStates().UseConnect() = FINISHED_DONE; - - case FINISHED_DONE : - if (!ssl->getSecurity().get_resuming()) - while (ssl->getStates().getClient() < serverFinishedComplete) { - if (ssl->GetError()) break; - processReply(*ssl); - } - if (!ssl->GetError()) - ssl->useStates().UseConnect() = SECOND_REPLY_DONE; - - case SECOND_REPLY_DONE : - ssl->verifyState(serverFinishedComplete); - ssl->useLog().ShowTCP(ssl->getSocket().get_fd()); - - if (ssl->GetError()) { - GetErrors().Add(ssl->GetError()); - return SSL_FATAL_ERROR; - } - return SSL_SUCCESS; - - default : - return SSL_FATAL_ERROR; // unkown state - } -} - - -int SSL_write(SSL* ssl, const void* buffer, int sz) -{ - return sendData(*ssl, buffer, sz); -} - - -int SSL_read(SSL* ssl, void* buffer, int sz) -{ - Data data(min(sz, MAX_RECORD_SIZE), static_cast(buffer)); - return receiveData(*ssl, data); -} - - -int SSL_accept(SSL* ssl) -{ - if (ssl->GetError() == YasslError(SSL_ERROR_WANT_READ)) - ssl->SetError(no_error); - - switch (ssl->getStates().GetAccept()) { - - case ACCEPT_BEGIN : - processReply(*ssl); - if (!ssl->GetError()) - ssl->useStates().UseAccept() = ACCEPT_FIRST_REPLY_DONE; - - case ACCEPT_FIRST_REPLY_DONE : - sendServerHello(*ssl); - - if (!ssl->getSecurity().get_resuming()) { - sendCertificate(*ssl); - - if (ssl->getSecurity().get_connection().send_server_key_) - sendServerKeyExchange(*ssl); - - if(ssl->getCrypto().get_certManager().verifyPeer()) - sendCertificateRequest(*ssl); - - sendServerHelloDone(*ssl); - ssl->flushBuffer(); - } - - if (!ssl->GetError()) - ssl->useStates().UseAccept() = SERVER_HELLO_DONE; - - case SERVER_HELLO_DONE : - if (!ssl->getSecurity().get_resuming()) { - while (ssl->getStates().getServer() < clientFinishedComplete) { - if (ssl->GetError()) break; - processReply(*ssl); - } - } - if (!ssl->GetError()) - ssl->useStates().UseAccept() = ACCEPT_SECOND_REPLY_DONE; - - case ACCEPT_SECOND_REPLY_DONE : - sendChangeCipher(*ssl); - sendFinished(*ssl, server_end); - ssl->flushBuffer(); - - if (!ssl->GetError()) - ssl->useStates().UseAccept() = ACCEPT_FINISHED_DONE; - - case ACCEPT_FINISHED_DONE : - if (ssl->getSecurity().get_resuming()) { - while (ssl->getStates().getServer() < clientFinishedComplete) { - if (ssl->GetError()) break; - processReply(*ssl); - } - } - if (!ssl->GetError()) - ssl->useStates().UseAccept() = ACCEPT_THIRD_REPLY_DONE; - - case ACCEPT_THIRD_REPLY_DONE : - ssl->useLog().ShowTCP(ssl->getSocket().get_fd()); - - if (ssl->GetError()) { - GetErrors().Add(ssl->GetError()); - return SSL_FATAL_ERROR; - } - return SSL_SUCCESS; - - default: - return SSL_FATAL_ERROR; // unknown state - } -} - - -int SSL_do_handshake(SSL* ssl) -{ - if (ssl->getSecurity().get_parms().entity_ == client_end) - return SSL_connect(ssl); - else - return SSL_accept(ssl); -} - - -int SSL_clear(SSL* ssl) -{ - GetErrors().Remove(); - - return SSL_SUCCESS; -} - - -int SSL_shutdown(SSL* ssl) -{ - if (!ssl->GetQuietShutdown()) { - Alert alert(warning, close_notify); - sendAlert(*ssl, alert); - } - ssl->useLog().ShowTCP(ssl->getSocket().get_fd(), true); - - GetErrors().Remove(); - - return SSL_SUCCESS; -} - - -void SSL_set_quiet_shutdown(SSL *ssl,int mode) -{ - ssl->SetQuietShutdown(mode != 0); -} - - -int SSL_get_quiet_shutdown(SSL *ssl) -{ - return ssl->GetQuietShutdown(); -} - - -/* on by default but allow user to turn off */ -long SSL_CTX_set_session_cache_mode(SSL_CTX* ctx, long mode) -{ - if (mode == SSL_SESS_CACHE_OFF) - ctx->SetSessionCacheOff(); - - if (mode == SSL_SESS_CACHE_NO_AUTO_CLEAR) - ctx->SetSessionCacheFlushOff(); - - return SSL_SUCCESS; -} - - -SSL_SESSION* SSL_get_session(SSL* ssl) -{ - if (ssl->getSecurity().GetContext()->GetSessionCacheOff()) - return 0; - - return GetSessions().lookup( - ssl->getSecurity().get_connection().sessionID_); -} - - -int SSL_set_session(SSL* ssl, SSL_SESSION* session) -{ - if (ssl->getSecurity().GetContext()->GetSessionCacheOff()) - return SSL_FAILURE; - - ssl->set_session(session); - return SSL_SUCCESS; -} - - -int SSL_session_reused(SSL* ssl) -{ - return ssl->getSecurity().get_resuming(); -} - - -long SSL_SESSION_set_timeout(SSL_SESSION* sess, long t) -{ - if (!sess) - return SSL_ERROR_NONE; - - sess->SetTimeOut(t); - return SSL_SUCCESS; -} - - -long SSL_get_default_timeout(SSL* /*ssl*/) -{ - return DEFAULT_TIMEOUT; -} - - -void SSL_flush_sessions(SSL_CTX *ctx, long /* tm */) -{ - if (ctx->GetSessionCacheOff()) - return; - - GetSessions().Flush(); -} - - -const char* SSL_get_cipher_name(SSL* ssl) -{ - return SSL_get_cipher(ssl); -} - - -const char* SSL_get_cipher(SSL* ssl) -{ - return ssl->getSecurity().get_parms().cipher_name_; -} - - -// SSLv2 only, not implemented -char* SSL_get_shared_ciphers(SSL* /*ssl*/, char* buf, int len) -{ - return strncpy(buf, "Not Implemented, SSLv2 only", len); -} - - -const char* SSL_get_cipher_list(SSL* ssl, int priority) -{ - if (priority < 0 || priority >= MAX_CIPHERS) - return 0; - - if (ssl->getSecurity().get_parms().cipher_list_[priority][0]) - return ssl->getSecurity().get_parms().cipher_list_[priority]; - - return 0; -} - - -int SSL_CTX_set_cipher_list(SSL_CTX* ctx, const char* list) -{ - if (ctx->SetCipherList(list)) - return SSL_SUCCESS; - else - return SSL_FAILURE; -} - - -const char* SSL_get_version(SSL* ssl) -{ - static const char* version3 = "SSLv3"; - static const char* version31 = "TLSv1"; - - return ssl->isTLS() ? version31 : version3; -} - -const char* SSLeay_version(int) -{ - static const char* version = "SSLeay yaSSL compatibility"; - return version; -} - - -int SSL_get_error(SSL* ssl, int /*previous*/) -{ - return ssl->getStates().What(); -} - - - -/* turn on yaSSL zlib compression - returns 0 for success, else error (not built in) - only need to turn on for client, becuase server on by default if built in - but calling for server will tell you whether it's available or not -*/ -int SSL_set_compression(SSL* ssl) /* Chad didn't rename to ya~ because it is prob. bug. */ -{ - return ssl->SetCompression(); -} - - - -X509* SSL_get_peer_certificate(SSL* ssl) -{ - return ssl->getCrypto().get_certManager().get_peerX509(); -} - - -void X509_free(X509* /*x*/) -{ - // peer cert set for deletion during destruction - // no need to delete now -} - - -X509* X509_STORE_CTX_get_current_cert(X509_STORE_CTX* ctx) -{ - return ctx->current_cert; -} - - -int X509_STORE_CTX_get_error(X509_STORE_CTX* ctx) -{ - return ctx->error; -} - - -int X509_STORE_CTX_get_error_depth(X509_STORE_CTX* ctx) -{ - return ctx->error_depth; -} - - -// copy name into buffer, at most sz bytes, if buffer is null -// will malloc buffer, caller responsible for freeing -char* X509_NAME_oneline(X509_NAME* name, char* buffer, int sz) -{ - if (!name->GetName()) return buffer; - - int len = (int)strlen(name->GetName()) + 1; - int copySz = min(len, sz); - - if (!buffer) { - buffer = (char*)malloc(len); - if (!buffer) return buffer; - copySz = len; - } - - if (copySz == 0) - return buffer; - - memcpy(buffer, name->GetName(), copySz - 1); - buffer[copySz - 1] = 0; - - return buffer; -} - - -X509_NAME* X509_get_issuer_name(X509* x) -{ - return x->GetIssuer(); -} - - -X509_NAME* X509_get_subject_name(X509* x) -{ - return x->GetSubject(); -} - - -void SSL_load_error_strings() // compatibility only -{} - - -void SSL_set_connect_state(SSL*) -{ - // already a client by default -} - - -void SSL_set_accept_state(SSL* ssl) -{ - ssl->useSecurity().use_parms().entity_ = server_end; -} - - -long SSL_get_verify_result(SSL*) -{ - // won't get here if not OK - return X509_V_OK; -} - - -long SSL_CTX_sess_set_cache_size(SSL_CTX* /*ctx*/, long /*sz*/) -{ - // unlimited size, can't set for now - return 0; -} - - -long SSL_CTX_get_session_cache_mode(SSL_CTX*) -{ - // always 0, unlimited size for now - return 0; -} - - -long SSL_CTX_set_tmp_dh(SSL_CTX* ctx, DH* dh) -{ - if (ctx->SetDH(*dh)) - return SSL_SUCCESS; - else - return SSL_FAILURE; -} - - -int SSL_CTX_use_certificate_file(SSL_CTX* ctx, const char* file, int format) -{ - return read_file(ctx, file, format, Cert); -} - - -int SSL_CTX_use_PrivateKey_file(SSL_CTX* ctx, const char* file, int format) -{ - return read_file(ctx, file, format, PrivateKey); -} - - -void SSL_CTX_set_verify(SSL_CTX* ctx, int mode, VerifyCallback vc) -{ - if (mode & SSL_VERIFY_PEER) - ctx->setVerifyPeer(); - - if (mode == SSL_VERIFY_NONE) - ctx->setVerifyNone(); - - if (mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT) - ctx->setFailNoCert(); - - ctx->setVerifyCallback(vc); -} - - -int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file, - const char* path) -{ - int ret = SSL_SUCCESS; - const int HALF_PATH = 128; - - if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA); - - if (ret == SSL_SUCCESS && path) { - // call read_file for each reqular file in path -#ifdef _WIN32 - - WIN32_FIND_DATA FindFileData; - HANDLE hFind; - - char name[MAX_PATH + 1]; // directory specification - strncpy(name, path, MAX_PATH - 3); - strncat(name, "\\*", 3); - - hFind = FindFirstFile(name, &FindFileData); - if (hFind == INVALID_HANDLE_VALUE) return SSL_BAD_PATH; - - do { - if (FindFileData.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY) { - strncpy(name, path, MAX_PATH - 2 - HALF_PATH); - strncat(name, "\\", 2); - strncat(name, FindFileData.cFileName, HALF_PATH); - ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA); - } - } while (ret == SSL_SUCCESS && FindNextFile(hFind, &FindFileData)); - - FindClose(hFind); - -#else // _WIN32 - - const int MAX_PATH = 260; - - DIR* dir = opendir(path); - if (!dir) return SSL_BAD_PATH; - - struct dirent* entry; - struct stat buf; - char name[MAX_PATH + 1]; - - while (ret == SSL_SUCCESS && (entry = readdir(dir))) { - strncpy(name, path, MAX_PATH - 1 - HALF_PATH); - strncat(name, "/", 1); - strncat(name, entry->d_name, HALF_PATH); - if (stat(name, &buf) < 0) return SSL_BAD_STAT; - - if (S_ISREG(buf.st_mode)) - ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA); - } - - closedir(dir); - -#endif - } - - return ret; -} - - -int SSL_CTX_set_default_verify_paths(SSL_CTX* /*ctx*/) -{ - // TODO: figure out way to set/store default path, then call load_verify - return SSL_NOT_IMPLEMENTED; -} - - -int SSL_CTX_set_session_id_context(SSL_CTX*, const unsigned char*, - unsigned int) -{ - // No application specific context needed for yaSSL - return SSL_SUCCESS; -} - - -int SSL_CTX_check_private_key(SSL_CTX* /*ctx*/) -{ - // TODO: check private against public for RSA match - return SSL_NOT_IMPLEMENTED; -} - - -// TODO: all session stats -long SSL_CTX_sess_accept(SSL_CTX* ctx) -{ - return ctx->GetStats().accept_; -} - - -long SSL_CTX_sess_connect(SSL_CTX* ctx) -{ - return ctx->GetStats().connect_; -} - - -long SSL_CTX_sess_accept_good(SSL_CTX* ctx) -{ - return ctx->GetStats().acceptGood_; -} - - -long SSL_CTX_sess_connect_good(SSL_CTX* ctx) -{ - return ctx->GetStats().connectGood_; -} - - -long SSL_CTX_sess_accept_renegotiate(SSL_CTX* ctx) -{ - return ctx->GetStats().acceptRenegotiate_; -} - - -long SSL_CTX_sess_connect_renegotiate(SSL_CTX* ctx) -{ - return ctx->GetStats().connectRenegotiate_; -} - - -long SSL_CTX_sess_hits(SSL_CTX* ctx) -{ - return ctx->GetStats().hits_; -} - - -long SSL_CTX_sess_cb_hits(SSL_CTX* ctx) -{ - return ctx->GetStats().cbHits_; -} - - -long SSL_CTX_sess_cache_full(SSL_CTX* ctx) -{ - return ctx->GetStats().cacheFull_; -} - - -long SSL_CTX_sess_misses(SSL_CTX* ctx) -{ - return ctx->GetStats().misses_; -} - - -long SSL_CTX_sess_timeouts(SSL_CTX* ctx) -{ - return ctx->GetStats().timeouts_; -} - - -long SSL_CTX_sess_number(SSL_CTX* ctx) -{ - return ctx->GetStats().number_; -} - - -long SSL_CTX_sess_get_cache_size(SSL_CTX* ctx) -{ - return ctx->GetStats().getCacheSize_; -} -// end session stats TODO: - - -int SSL_CTX_get_verify_mode(SSL_CTX* ctx) -{ - return ctx->GetStats().verifyMode_; -} - - -int SSL_get_verify_mode(SSL* ssl) -{ - return ssl->getSecurity().GetContext()->GetStats().verifyMode_; -} - - -int SSL_CTX_get_verify_depth(SSL_CTX* ctx) -{ - return ctx->GetStats().verifyDepth_; -} - - -int SSL_get_verify_depth(SSL* ssl) -{ - return ssl->getSecurity().GetContext()->GetStats().verifyDepth_; -} - - -long SSL_CTX_set_options(SSL_CTX*, long) -{ - // TDOD: - return SSL_SUCCESS; -} - - -void SSL_CTX_set_info_callback(SSL_CTX*, void (*)()) -{ - // TDOD: -} - - -void OpenSSL_add_all_algorithms() // compatibility only -{} - - -int SSL_library_init() // compatiblity only -{ - return 1; -} - - -DH* DH_new(void) -{ - DH* dh = NEW_YS DH; - if (dh) - dh->p = dh->g = 0; - return dh; -} - - -void DH_free(DH* dh) -{ - ysDelete(dh->g); - ysDelete(dh->p); - ysDelete(dh); -} - - -// convert positive big-endian num of length sz into retVal, which may need to -// be created -BIGNUM* BN_bin2bn(const unsigned char* num, int sz, BIGNUM* retVal) -{ - bool created = false; - mySTL::auto_ptr bn; - - if (!retVal) { - created = true; - bn.reset(NEW_YS BIGNUM); - retVal = bn.get(); - } - - retVal->assign(num, sz); - - if (created) - return bn.release(); - else - return retVal; -} - - -unsigned long ERR_get_error_line_data(const char**, int*, const char**, int *) -{ - //return SSL_NOT_IMPLEMENTED; - return 0; -} - - -void ERR_print_errors_fp(FILE* /*fp*/) -{ - // need ssl access to implement TODO: - //fprintf(fp, "%s", ssl.get_states().errorString_.c_str()); -} - - -char* ERR_error_string(unsigned long errNumber, char* buffer) -{ - static char* msg = (char*)"Please supply a buffer for error string"; - - if (buffer) { - SetErrorString(YasslError(errNumber), buffer); - return buffer; - } - - return msg; -} - - -const char* X509_verify_cert_error_string(long /* error */) -{ - // TODO: - static const char* msg = "Not Implemented"; - return msg; -} - - -const EVP_MD* EVP_md5(void) -{ - static const char* type = "MD5"; - return type; -} - - -const EVP_CIPHER* EVP_des_ede3_cbc(void) -{ - static const char* type = "DES-EDE3-CBC"; - return type; -} - - -int EVP_BytesToKey(const EVP_CIPHER* type, const EVP_MD* md, const byte* salt, - const byte* data, int sz, int count, byte* key, byte* iv) -{ - // only support MD5 for now - if (strncmp(md, "MD5", 3)) return 0; - - int keyLen = 0; - int ivLen = 0; - - // only support CBC DES and AES for now - if (strncmp(type, "DES-CBC", 7) == 0) { - keyLen = DES_KEY_SZ; - ivLen = DES_IV_SZ; - } - else if (strncmp(type, "DES-EDE3-CBC", 12) == 0) { - keyLen = DES_EDE_KEY_SZ; - ivLen = DES_IV_SZ; - } - else if (strncmp(type, "AES-128-CBC", 11) == 0) { - keyLen = AES_128_KEY_SZ; - ivLen = AES_IV_SZ; - } - else if (strncmp(type, "AES-192-CBC", 11) == 0) { - keyLen = AES_192_KEY_SZ; - ivLen = AES_IV_SZ; - } - else if (strncmp(type, "AES-256-CBC", 11) == 0) { - keyLen = AES_256_KEY_SZ; - ivLen = AES_IV_SZ; - } - else - return 0; - - yaSSL::MD5 myMD; - uint digestSz = myMD.get_digestSize(); - byte digest[SHA_LEN]; // max size - - int keyLeft = keyLen; - int ivLeft = ivLen; - int keyOutput = 0; - - while (keyOutput < (keyLen + ivLen)) { - int digestLeft = digestSz; - // D_(i - 1) - if (keyOutput) // first time D_0 is empty - myMD.update(digest, digestSz); - // data - myMD.update(data, sz); - // salt - if (salt) - myMD.update(salt, EVP_SALT_SZ); - myMD.get_digest(digest); - // count - for (int j = 1; j < count; j++) { - myMD.update(digest, digestSz); - myMD.get_digest(digest); - } - - if (keyLeft) { - int store = min(keyLeft, static_cast(digestSz)); - memcpy(&key[keyLen - keyLeft], digest, store); - - keyOutput += store; - keyLeft -= store; - digestLeft -= store; - } - - if (ivLeft && digestLeft) { - int store = min(ivLeft, digestLeft); - memcpy(&iv[ivLen - ivLeft], &digest[digestSz - digestLeft], store); - - keyOutput += store; - ivLeft -= store; - } - } - assert(keyOutput == (keyLen + ivLen)); - return keyOutput; -} - - - -void DES_set_key_unchecked(const_DES_cblock* key, DES_key_schedule* schedule) -{ - memcpy(schedule, key, sizeof(const_DES_cblock)); -} - - -void DES_ede3_cbc_encrypt(const byte* input, byte* output, long sz, - DES_key_schedule* ks1, DES_key_schedule* ks2, - DES_key_schedule* ks3, DES_cblock* ivec, int enc) -{ - DES_EDE des; - byte key[DES_EDE_KEY_SZ]; - - memcpy(key, *ks1, DES_BLOCK); - memcpy(&key[DES_BLOCK], *ks2, DES_BLOCK); - memcpy(&key[DES_BLOCK * 2], *ks3, DES_BLOCK); - - if (enc) { - des.set_encryptKey(key, *ivec); - des.encrypt(output, input, sz); - } - else { - des.set_decryptKey(key, *ivec); - des.decrypt(output, input, sz); - } -} - - -// functions for libcurl -int RAND_status() -{ - return 1; /* TaoCrypt provides enough seed */ -} - - -int DES_set_key(const_DES_cblock* key, DES_key_schedule* schedule) -{ - memcpy(schedule, key, sizeof(const_DES_cblock)); - return 1; -} - - -void DES_set_odd_parity(DES_cblock* key) -{ - // not needed now for TaoCrypt -} - - -void DES_ecb_encrypt(DES_cblock* input, DES_cblock* output, - DES_key_schedule* key, int enc) -{ - DES des; - - if (enc) { - des.set_encryptKey(*key, 0); - des.encrypt(*output, *input, DES_BLOCK); - } - else { - des.set_decryptKey(*key, 0); - des.decrypt(*output, *input, DES_BLOCK); - } -} - - -void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX* ctx, void* userdata) -{ - ctx->SetUserData(userdata); -} - - -X509* SSL_get_certificate(SSL* ssl) -{ - // only used to pass to get_privatekey which isn't used - return 0; -} - - -EVP_PKEY* SSL_get_privatekey(SSL* ssl) -{ - // only called, not used - return 0; -} - - -void SSL_SESSION_free(SSL_SESSION* session) -{ - // managed by singleton -} - - - -EVP_PKEY* X509_get_pubkey(X509* x) -{ - // called, not used though - return 0; -} - - -int EVP_PKEY_copy_parameters(EVP_PKEY* to, const EVP_PKEY* from) -{ - // called, not used though - return 0; -} - - -void EVP_PKEY_free(EVP_PKEY* pkey) -{ - // never allocated from above -} - - -void ERR_error_string_n(unsigned long e, char *buf, size_t len) -{ - if (len) ERR_error_string(e, buf); -} - - -void ERR_free_strings(void) -{ - // handled internally -} - - -void EVP_cleanup(void) -{ - // nothing to do yet -} - - -ASN1_TIME* X509_get_notBefore(X509* x) -{ - if (x) return x->GetBefore(); - return 0; -} - - -ASN1_TIME* X509_get_notAfter(X509* x) -{ - if (x) return x->GetAfter(); - return 0; -} - - -SSL_METHOD* SSLv2_client_method(void) /* will never work, no v 2 */ -{ - return 0; -} - - -SSL_SESSION* SSL_get1_session(SSL* ssl) /* what's ref count */ -{ - return SSL_get_session(ssl); -} - - -void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *x) -{ - // no extension names supported yet -} - - -int sk_GENERAL_NAME_num(STACK_OF(GENERAL_NAME) *x) -{ - // no extension names supported yet - return 0; -} - - -GENERAL_NAME* sk_GENERAL_NAME_value(STACK_OF(GENERAL_NAME) *x, int i) -{ - // no extension names supported yet - return 0; -} - - -unsigned char* ASN1_STRING_data(ASN1_STRING* x) -{ - if (x) return x->data; - return 0; -} - - -int ASN1_STRING_length(ASN1_STRING* x) -{ - if (x) return x->length; - return 0; -} - - -int ASN1_STRING_type(ASN1_STRING *x) -{ - if (x) return x->type; - return 0; -} - - -int X509_NAME_get_index_by_NID(X509_NAME* name,int nid, int lastpos) -{ - int idx = -1; // not found - const char* start = &name->GetName()[lastpos + 1]; - - switch (nid) { - case NID_commonName: - const char* found = strstr(start, "/CN="); - if (found) { - found += 4; // advance to str - idx = found - start + lastpos + 1; - } - break; - } - - return idx; -} - - -ASN1_STRING* X509_NAME_ENTRY_get_data(X509_NAME_ENTRY* ne) -{ - // the same in yaSSL - return ne; -} - - -X509_NAME_ENTRY* X509_NAME_get_entry(X509_NAME* name, int loc) -{ - return name->GetEntry(loc); -} - - -// already formatted, caller responsible for freeing *out -int ASN1_STRING_to_UTF8(unsigned char** out, ASN1_STRING* in) -{ - if (!in) return 0; - - *out = (unsigned char*)malloc(in->length + 1); - if (*out) { - memcpy(*out, in->data, in->length); - (*out)[in->length] = 0; - } - return in->length; -} - - -void* X509_get_ext_d2i(X509* x, int nid, int* crit, int* idx) -{ - // no extensions supported yet - return 0; -} - - -void MD4_Init(MD4_CTX* md4) -{ - // make sure we have a big enough buffer - typedef char ok[sizeof(md4->buffer) >= sizeof(TaoCrypt::MD4) ? 1 : -1]; - (void) sizeof(ok); - - // using TaoCrypt since no dynamic memory allocated - // and no destructor will be called - new (reinterpret_cast(md4->buffer)) TaoCrypt::MD4(); -} - - -void MD4_Update(MD4_CTX* md4, const void* data, unsigned long sz) -{ - reinterpret_cast(md4->buffer)->Update( - static_cast(data), static_cast(sz)); -} - - -void MD4_Final(unsigned char* hash, MD4_CTX* md4) -{ - reinterpret_cast(md4->buffer)->Final(hash); -} - - -void MD5_Init(MD5_CTX* md5) -{ - // make sure we have a big enough buffer - typedef char ok[sizeof(md5->buffer) >= sizeof(TaoCrypt::MD5) ? 1 : -1]; - (void) sizeof(ok); - - // using TaoCrypt since no dynamic memory allocated - // and no destructor will be called - new (reinterpret_cast(md5->buffer)) TaoCrypt::MD5(); -} - - -void MD5_Update(MD5_CTX* md5, const void* data, unsigned long sz) -{ - reinterpret_cast(md5->buffer)->Update( - static_cast(data), static_cast(sz)); -} - - -void MD5_Final(unsigned char* hash, MD5_CTX* md5) -{ - reinterpret_cast(md5->buffer)->Final(hash); -} - - -int RAND_bytes(unsigned char* buf, int num) -{ - RandomPool ran; - - if (ran.GetError()) return 0; - - ran.Fill(buf, num); - return 1; -} - - -int SSL_peek(SSL* ssl, void* buffer, int sz) -{ - Data data(min(sz, MAX_RECORD_SIZE), static_cast(buffer)); - return receiveData(*ssl, data, true); -} - - -int SSL_pending(SSL* ssl) -{ - // Just in case there's pending data that hasn't been processed yet... - char c; - SSL_peek(ssl, &c, 1); - - return ssl->bufferedData(); -} - - -void SSL_CTX_set_default_passwd_cb(SSL_CTX* ctx, pem_password_cb cb) -{ - ctx->SetPasswordCb(cb); -} - - -int SSLeay_add_ssl_algorithms() // compatibility only -{ - return 1; -} - - -void ERR_remove_state(unsigned long) -{ - GetErrors().Remove(); -} - - -int ERR_GET_REASON(int l) -{ - return l & 0xfff; -} - - -unsigned long err_helper(bool peek = false) -{ - int ysError = GetErrors().Lookup(peek); - - // translate cert error for libcurl, it uses OpenSSL hex code - switch (ysError) { - case TaoCrypt::SIG_OTHER_E: - return CERTFICATE_ERROR; - break; - default : - return 0; - } - - return 0; // shut up compiler -} - - -unsigned long ERR_peek_error() -{ - return err_helper(true); -} - - -unsigned long ERR_get_error() -{ - return err_helper(); -} - - - // functions for stunnel - - void RAND_screen() - { - // TODO: - } - - - const char* RAND_file_name(char*, size_t) - { - // TODO: - return 0; - } - - - int RAND_write_file(const char*) - { - // TODO: - return 0; - } - - - int RAND_load_file(const char*, long) - { - // TODO: - return 0; - } - - - void RSA_free(RSA*) - { - // TODO: - } - - - RSA* RSA_generate_key(int, unsigned long, void(*)(int, int, void*), void*) - { - // TODO: - return 0; - } - - - int X509_LOOKUP_add_dir(X509_LOOKUP*, const char*, long) - { - // TODO: - return SSL_SUCCESS; - } - - - int X509_LOOKUP_load_file(X509_LOOKUP*, const char*, long) - { - // TODO: - return SSL_SUCCESS; - } - - - X509_LOOKUP_METHOD* X509_LOOKUP_hash_dir(void) - { - // TODO: - return 0; - } - - - X509_LOOKUP_METHOD* X509_LOOKUP_file(void) - { - // TODO: - return 0; - } - - - X509_LOOKUP* X509_STORE_add_lookup(X509_STORE*, X509_LOOKUP_METHOD*) - { - // TODO: - return 0; - } - - - int X509_STORE_get_by_subject(X509_STORE_CTX*, int, X509_NAME*, X509_OBJECT*) - { - // TODO: - return SSL_SUCCESS; - } - - - X509_STORE* X509_STORE_new(void) - { - // TODO: - return 0; - } - - char* SSL_alert_type_string_long(int) - { - // TODO: - return 0; - } - - - char* SSL_alert_desc_string_long(int) - { - // TODO: - return 0; - } - - - char* SSL_state_string_long(SSL*) - { - // TODO: - return 0; - } - - - void SSL_CTX_set_tmp_rsa_callback(SSL_CTX*, RSA*(*)(SSL*, int, int)) - { - // TDOD: - } - - - long SSL_CTX_set_timeout(SSL_CTX*, long) - { - // TDOD: - return SSL_SUCCESS; - } - - - int SSL_CTX_use_certificate_chain_file(SSL_CTX*, const char*) - { - // TDOD: - return SSL_SUCCESS; - } - - - int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX*, const char*, int) - { - // TDOD: - return SSL_SUCCESS; - } - - - int SSL_set_rfd(SSL*, int) - { - return SSL_SUCCESS; // TODO: - } - - - int SSL_set_wfd(SSL*, int) - { - return SSL_SUCCESS; // TODO: - } - - - int SSL_want_read(SSL*) - { - return 0; // TODO: - } - - - int SSL_want_write(SSL*) - { - return 0; // TODO: - } - - - void SSL_set_shutdown(SSL*, int) - { - // TODO: - } - - - SSL_CIPHER* SSL_get_current_cipher(SSL*) - { - // TODO: - return 0; - } - - - char* SSL_CIPHER_description(SSL_CIPHER*, char*, int) - { - // TODO: - return 0; - } - - - - // end stunnel needs - - -} // extern "C" -} // namespace diff --git a/externals/mysql/extlib/yassl/src/template_instnt.cpp b/externals/mysql/extlib/yassl/src/template_instnt.cpp deleted file mode 100644 index fe3a251b86..0000000000 --- a/externals/mysql/extlib/yassl/src/template_instnt.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* Explicit template instantiation requests - */ - - -#include "runtime.hpp" -#include "handshake.hpp" -#include "yassl_int.hpp" -#include "crypto_wrapper.hpp" -#include "hmac.hpp" -#include "md5.hpp" -#include "sha.hpp" -#include "ripemd.hpp" -#include "openssl/ssl.h" - -#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION - -namespace mySTL { -template class list; -template yaSSL::del_ptr_zero for_each(mySTL::list::iterator, mySTL::list::iterator, yaSSL::del_ptr_zero); -template pair* uninit_copy*, mySTL::pair*>(mySTL::pair*, mySTL::pair*, mySTL::pair*); -template pair* uninit_copy*, mySTL::pair*>(mySTL::pair*, mySTL::pair*, mySTL::pair*); -template void destroy*>(mySTL::pair*, mySTL::pair*); -template void destroy*>(mySTL::pair*, mySTL::pair*); -template pair* uninit_copy*, mySTL::pair*>(mySTL::pair*, mySTL::pair*, mySTL::pair*); -template void destroy*>(mySTL::pair*, mySTL::pair*); -template pair* uninit_copy*, mySTL::pair*>(mySTL::pair*, mySTL::pair*, mySTL::pair*); -template class list; -template class list; -template class list; -template class list; -template class list; -template class list; -template class list; -template void destroy*>(mySTL::pair*, mySTL::pair*); -template yaSSL::del_ptr_zero for_each::iterator, yaSSL::del_ptr_zero>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::del_ptr_zero); -template yaSSL::del_ptr_zero for_each::iterator, yaSSL::del_ptr_zero>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::del_ptr_zero); -template yaSSL::del_ptr_zero for_each::iterator, yaSSL::del_ptr_zero>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::del_ptr_zero); -template yaSSL::del_ptr_zero for_each::iterator, yaSSL::del_ptr_zero>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::del_ptr_zero); -template yaSSL::del_ptr_zero for_each::iterator, yaSSL::del_ptr_zero>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::del_ptr_zero); -template yaSSL::del_ptr_zero for_each::iterator, yaSSL::del_ptr_zero>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::del_ptr_zero); -template yaSSL::del_ptr_zero for_each::iterator, yaSSL::del_ptr_zero>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::del_ptr_zero); -template bool list::erase(list::iterator); -template void list::push_back(yaSSL::ThreadError); -template void list::pop_front(); -template void list::pop_back(); -template list::~list(); -template pair* GetArrayMemory >(size_t); -template void FreeArrayMemory >(pair*); -template pair* GetArrayMemory >(size_t); -template void FreeArrayMemory >(pair*); -template pair* GetArrayMemory >(size_t); -template void FreeArrayMemory >(pair*); -template pair* GetArrayMemory >(size_t); -template void FreeArrayMemory >(pair*); -} - -namespace yaSSL { -template void ysDelete(yaSSL::SSL_CTX*); -template void ysDelete(yaSSL::SSL*); -template void ysDelete(yaSSL::BIGNUM*); -template void ysDelete(unsigned char*); -template void ysDelete(yaSSL::DH*); -template void ysDelete(TaoCrypt::Signer*); -template void ysDelete(yaSSL::SSL_SESSION*); -template void ysDelete(input_buffer*); -template void ysDelete(output_buffer*); -template void ysDelete(x509*); -template void ysDelete(Auth*); -template void ysDelete(HandShakeBase*); -template void ysDelete(ServerKeyBase*); -template void ysDelete(ClientKeyBase*); -template void ysDelete(SSL_METHOD*); -template void ysDelete(DiffieHellman*); -template void ysDelete(BulkCipher*); -template void ysDelete(Digest*); -template void ysDelete(X509*); -template void ysDelete(Message*); -template void ysDelete(sslFactory*); -template void ysDelete(Sessions*); -template void ysDelete(Errors*); -template void ysArrayDelete(unsigned char*); -template void ysArrayDelete(char*); - -template int min(int, int); -template uint16 min(uint16, uint16); -template unsigned int min(unsigned int, unsigned int); -template unsigned long min(unsigned long, unsigned long); -} - -#endif // HAVE_EXPLICIT_TEMPLATE_INSTANTIATION - diff --git a/externals/mysql/extlib/yassl/src/timer.cpp b/externals/mysql/extlib/yassl/src/timer.cpp deleted file mode 100644 index c1286b0724..0000000000 --- a/externals/mysql/extlib/yassl/src/timer.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* timer.cpp implements a high res and low res timer - * -*/ - -#include "runtime.hpp" -#include "timer.hpp" - -#ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#else -#include -#endif - -namespace yaSSL { - -#ifdef _WIN32 - - timer_d timer() - { - static bool init(false); - static LARGE_INTEGER freq; - - if (!init) { - QueryPerformanceFrequency(&freq); - init = true; - } - - LARGE_INTEGER count; - QueryPerformanceCounter(&count); - - return static_cast(count.QuadPart) / freq.QuadPart; - } - - - uint lowResTimer() - { - return static_cast(timer()); - } - -#else // _WIN32 - - timer_d timer() - { - struct timeval tv; - gettimeofday(&tv, 0); - - return static_cast(tv.tv_sec) - + static_cast(tv.tv_usec) / 1000000; - } - - - uint lowResTimer() - { - struct timeval tv; - gettimeofday(&tv, 0); - - return tv.tv_sec; - } - - -#endif // _WIN32 -} // namespace yaSSL diff --git a/externals/mysql/extlib/yassl/src/yassl.cpp b/externals/mysql/extlib/yassl/src/yassl.cpp deleted file mode 100644 index 815277ce6f..0000000000 --- a/externals/mysql/extlib/yassl/src/yassl.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* yaSSL implements external API - */ - -#include "runtime.hpp" -#include "yassl.hpp" -#include "yassl_int.hpp" -#include "handshake.hpp" -#include - -#include "openssl/ssl.h" // get rid of this - - - -namespace yaSSL { - - - -struct Base { - SSL_METHOD* method_; - SSL_CTX* ctx_; - SSL* ssl_; - - char* ca_; - char* cert_; - char* key_; - - DH* dh_; - - Base() : method_(0), ctx_(0), ssl_(0), ca_(0), cert_(0), key_(0), dh_(0) - {} - - ~Base() - { - if (dh_) DH_free(dh_); - delete[] key_; - delete[] cert_; - delete[] ca_; - SSL_CTX_free(ctx_); // frees method_ too - SSL_free(ssl_); - } -}; - - -void SetDH(Base&); - -void SetUpBase(Base& base, ConnectionEnd end, SOCKET_T s) -{ - base.method_ = new SSL_METHOD(end, ProtocolVersion(3,1)); - base.ctx_ = new SSL_CTX(base.method_); - - if (base.ca_) - if (SSL_CTX_load_verify_locations(base.ctx_, - base.ca_, 0) != SSL_SUCCESS) assert(0); - if (base.cert_) - if (SSL_CTX_use_certificate_file(base.ctx_, - base.cert_, SSL_FILETYPE_PEM) != SSL_SUCCESS) assert(0); - if (base.key_) - if (SSL_CTX_use_PrivateKey_file(base.ctx_, base.key_, - SSL_FILETYPE_PEM) != SSL_SUCCESS) assert(0); - - if (end == server_end) SetDH(base); - - base.ssl_ = new SSL(base.ctx_); - base.ssl_->useSocket().set_fd(s); -} - - -void SetDH(Base& base) -{ - static unsigned char dh512_p[] = - { - 0xDA,0x58,0x3C,0x16,0xD9,0x85,0x22,0x89,0xD0,0xE4,0xAF,0x75, - 0x6F,0x4C,0xCA,0x92,0xDD,0x4B,0xE5,0x33,0xB8,0x04,0xFB,0x0F, - 0xED,0x94,0xEF,0x9C,0x8A,0x44,0x03,0xED,0x57,0x46,0x50,0xD3, - 0x69,0x99,0xDB,0x29,0xD7,0x76,0x27,0x6B,0xA2,0xD3,0xD4,0x12, - 0xE2,0x18,0xF4,0xDD,0x1E,0x08,0x4C,0xF6,0xD8,0x00,0x3E,0x7C, - 0x47,0x74,0xE8,0x33, - }; - - static unsigned char dh512_g[] = - { - 0x02, - }; - - if ( (base.dh_ = DH_new()) ) { - base.dh_->p = BN_bin2bn(dh512_p, sizeof(dh512_p), 0); - base.dh_->g = BN_bin2bn(dh512_g, sizeof(dh512_g), 0); - } - if (!base.dh_->p || !base.dh_->g) { - DH_free(base.dh_); - base.dh_ = 0; - } - SSL_CTX_set_tmp_dh(base.ctx_, base.dh_); -} - - -void NewCopy(char*& dst, const char* src) -{ - size_t len = strlen(src) + 1; - dst = new char[len]; - - strncpy(dst, src, len); -} - - -// Client Implementation -struct Client::ClientImpl { - Base base_; -}; - - -Client::Client() : pimpl_(new ClientImpl) -{} - - -Client::~Client() { delete pimpl_; } - - -int Client::Connect(SOCKET_T s) -{ - SetUpBase(pimpl_->base_, client_end, s); - return SSL_connect(pimpl_->base_.ssl_); -} - - -int Client::Write(const void* buffer, int sz) -{ - return sendData(*pimpl_->base_.ssl_, buffer, sz); -} - - -int Client::Read(void* buffer, int sz) -{ - Data data(min(sz, MAX_RECORD_SIZE), static_cast(buffer)); - return receiveData(*pimpl_->base_.ssl_, data); -} - - -void Client::SetCA(const char* name) -{ - NewCopy(pimpl_->base_.ca_, name); -} - - -void Client::SetCert(const char* name) -{ - NewCopy(pimpl_->base_.cert_, name); -} - - -void Client::SetKey(const char* name) -{ - NewCopy(pimpl_->base_.key_, name); -} - - - -// Server Implementation -struct Server::ServerImpl { - Base base_; -}; - - -Server::Server() : pimpl_(new ServerImpl) -{} - - -Server::~Server() { delete pimpl_; } - - -int Server::Accept(SOCKET_T s) -{ - SetUpBase(pimpl_->base_, server_end, s); - return SSL_accept(pimpl_->base_.ssl_); -} - - -int Server::Write(const void* buffer, int sz) -{ - return sendData(*pimpl_->base_.ssl_, buffer, sz); -} - - -int Server::Read(void* buffer, int sz) -{ - Data data(min(sz, MAX_RECORD_SIZE), static_cast(buffer)); - return receiveData(*pimpl_->base_.ssl_, data); -} - - -void Server::SetCA(const char* name) -{ - NewCopy(pimpl_->base_.ca_, name); -} - - -void Server::SetCert(const char* name) -{ - NewCopy(pimpl_->base_.cert_, name); -} - - -void Server::SetKey(const char* name) -{ - NewCopy(pimpl_->base_.key_, name); -} - - - -} // namespace yaSSL diff --git a/externals/mysql/extlib/yassl/src/yassl_error.cpp b/externals/mysql/extlib/yassl/src/yassl_error.cpp deleted file mode 100644 index a1ef8578da..0000000000 --- a/externals/mysql/extlib/yassl/src/yassl_error.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/* - Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* yaSSL error implements and an exception class - */ - -#include "runtime.hpp" -#include "yassl_error.hpp" -#include "error.hpp" // TaoCrypt error numbers -#include "openssl/ssl.h" // SSL_ERROR_WANT_READ -#include // strncpy - -#ifdef _MSC_VER - // 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy - #pragma warning(disable: 4996) -#endif - -namespace yaSSL { - - -/* may bring back in future -Error::Error(const char* s, YasslError e, Library l) - : mySTL::runtime_error(s), error_(e), lib_(l) -{ -} - - -YasslError Error::get_number() const -{ - return error_; -} - - -Library Error::get_lib() const -{ - - return lib_; -} -*/ - - -void SetErrorString(YasslError error, char* buffer) -{ - using namespace TaoCrypt; - const int max = MAX_ERROR_SZ; // shorthand - - switch (error) { - - // yaSSL proper errors - case range_error : - strncpy(buffer, "buffer index error, out of range", max); - break; - - case realloc_error : - strncpy(buffer, "trying to realloc a fixed buffer", max); - break; - - case factory_error : - strncpy(buffer, "unknown factory create request", max); - break; - - case unknown_cipher : - strncpy(buffer, "trying to use an unknown cipher", max); - break; - - case prefix_error : - strncpy(buffer, "bad master secret derivation, prefix too big", max); - break; - - case record_layer : - strncpy(buffer, "record layer not ready yet", max); - break; - - case handshake_layer : - strncpy(buffer, "handshake layer not ready yet", max); - break; - - case out_of_order : - strncpy(buffer, "handshake message received in wrong order", max); - break; - - case bad_input : - strncpy(buffer, "bad cipher suite input", max); - break; - - case match_error : - strncpy(buffer, "unable to match a supported cipher suite", max); - break; - - case no_key_file : - strncpy(buffer, "the server needs a private key file", max); - break; - - case verify_error : - strncpy(buffer, "unable to verify peer checksum", max); - break; - - case send_error : - strncpy(buffer, "socket layer send error", max); - break; - - case receive_error : - strncpy(buffer, "socket layer receive error", max); - break; - - case certificate_error : - strncpy(buffer, "unable to proccess cerificate", max); - break; - - case privateKey_error : - strncpy(buffer, "unable to proccess private key, bad format", max); - break; - - case badVersion_error : - strncpy(buffer, "protocl version mismatch", max); - break; - - case compress_error : - strncpy(buffer, "compression error", max); - break; - - case decompress_error : - strncpy(buffer, "decompression error", max); - break; - - case pms_version_error : - strncpy(buffer, "bad PreMasterSecret version error", max); - break; - - // openssl errors - case SSL_ERROR_WANT_READ : - strncpy(buffer, "the read operation would block", max); - break; - - case CERTFICATE_ERROR : - strncpy(buffer, "Unable to verify certificate", max); - break; - - // TaoCrypt errors - case NO_ERROR_E : - strncpy(buffer, "not in error state", max); - break; - - case WINCRYPT_E : - strncpy(buffer, "bad wincrypt acquire", max); - break; - - case CRYPTGEN_E : - strncpy(buffer, "CryptGenRandom error", max); - break; - - case OPEN_RAN_E : - strncpy(buffer, "unable to use random device", max); - break; - - case READ_RAN_E : - strncpy(buffer, "unable to use random device", max); - break; - - case INTEGER_E : - strncpy(buffer, "ASN: bad DER Integer Header", max); - break; - - case SEQUENCE_E : - strncpy(buffer, "ASN: bad Sequence Header", max); - break; - - case SET_E : - strncpy(buffer, "ASN: bad Set Header", max); - break; - - case VERSION_E : - strncpy(buffer, "ASN: version length not 1", max); - break; - - case SIG_OID_E : - strncpy(buffer, "ASN: signature OID mismatch", max); - break; - - case BIT_STR_E : - strncpy(buffer, "ASN: bad BitString Header", max); - break; - - case UNKNOWN_OID_E : - strncpy(buffer, "ASN: unknown key OID type", max); - break; - - case OBJECT_ID_E : - strncpy(buffer, "ASN: bad Ojbect ID Header", max); - break; - - case TAG_NULL_E : - strncpy(buffer, "ASN: expected TAG NULL", max); - break; - - case EXPECT_0_E : - strncpy(buffer, "ASN: expected 0", max); - break; - - case OCTET_STR_E : - strncpy(buffer, "ASN: bad Octet String Header", max); - break; - - case TIME_E : - strncpy(buffer, "ASN: bad TIME", max); - break; - - case DATE_SZ_E : - strncpy(buffer, "ASN: bad Date Size", max); - break; - - case SIG_LEN_E : - strncpy(buffer, "ASN: bad Signature Length", max); - break; - - case UNKOWN_SIG_E : - strncpy(buffer, "ASN: unknown signature OID", max); - break; - - case UNKOWN_HASH_E : - strncpy(buffer, "ASN: unknown hash OID", max); - break; - - case DSA_SZ_E : - strncpy(buffer, "ASN: bad DSA r or s size", max); - break; - - case BEFORE_DATE_E : - strncpy(buffer, "ASN: before date in the future", max); - break; - - case AFTER_DATE_E : - strncpy(buffer, "ASN: after date in the past", max); - break; - - case SIG_CONFIRM_E : - strncpy(buffer, "ASN: bad self signature confirmation", max); - break; - - case SIG_OTHER_E : - strncpy(buffer, "ASN: bad other signature confirmation", max); - break; - - case CONTENT_E : - strncpy(buffer, "bad content processing", max); - break; - - case PEM_E : - strncpy(buffer, "bad PEM format processing", max); - break; - - default : - strncpy(buffer, "unknown error number", max); - } -} - - - -} // namespace yaSSL diff --git a/externals/mysql/extlib/yassl/src/yassl_imp.cpp b/externals/mysql/extlib/yassl/src/yassl_imp.cpp deleted file mode 100644 index 20dfe50f13..0000000000 --- a/externals/mysql/extlib/yassl/src/yassl_imp.cpp +++ /dev/null @@ -1,2287 +0,0 @@ -/* - Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* yaSSL source implements all SSL.v3 secification structures. - */ - -#include "runtime.hpp" -#include "yassl_int.hpp" -#include "handshake.hpp" - -#include "asn.hpp" // provide crypto wrapper?? - - - -namespace yaSSL { - - -namespace { // locals - -bool isTLS(ProtocolVersion pv) -{ - if (pv.major_ >= 3 && pv.minor_ >= 1) - return true; - - return false; -} - - -} // namespace (locals) - - -void hashHandShake(SSL&, const input_buffer&, uint); - - -ProtocolVersion::ProtocolVersion(uint8 maj, uint8 min) - : major_(maj), minor_(min) -{} - - -// construct key exchange with known ssl parms -void ClientKeyExchange::createKey(SSL& ssl) -{ - const ClientKeyFactory& ckf = ssl.getFactory().getClientKey(); - client_key_ = ckf.CreateObject(ssl.getSecurity().get_parms().kea_); - - if (!client_key_) - ssl.SetError(factory_error); -} - - -// construct key exchange with known ssl parms -void ServerKeyExchange::createKey(SSL& ssl) -{ - const ServerKeyFactory& skf = ssl.getFactory().getServerKey(); - server_key_ = skf.CreateObject(ssl.getSecurity().get_parms().kea_); - - if (!server_key_) - ssl.SetError(factory_error); -} - - -// build/set PreMaster secret and encrypt, client side -void EncryptedPreMasterSecret::build(SSL& ssl) -{ - opaque tmp[SECRET_LEN]; - memset(tmp, 0, sizeof(tmp)); - ssl.getCrypto().get_random().Fill(tmp, SECRET_LEN); - ProtocolVersion pv = ssl.getSecurity().get_connection().chVersion_; - tmp[0] = pv.major_; - tmp[1] = pv.minor_; - ssl.set_preMaster(tmp, SECRET_LEN); - - const CertManager& cert = ssl.getCrypto().get_certManager(); - RSA rsa(cert.get_peerKey(), cert.get_peerKeyLength()); - bool tls = ssl.isTLS(); // if TLS, put length for encrypted data - alloc(rsa.get_cipherLength() + (tls ? 2 : 0)); - byte* holder = secret_; - if (tls) { - byte len[2]; - c16toa(rsa.get_cipherLength(), len); - memcpy(secret_, len, sizeof(len)); - holder += 2; - } - rsa.encrypt(holder, tmp, SECRET_LEN, ssl.getCrypto().get_random()); -} - - -// build/set premaster and Client Public key, client side -void ClientDiffieHellmanPublic::build(SSL& ssl) -{ - DiffieHellman& dhServer = ssl.useCrypto().use_dh(); - DiffieHellman dhClient(dhServer); - - uint keyLength = dhClient.get_agreedKeyLength(); // pub and agree same - - alloc(keyLength, true); - dhClient.makeAgreement(dhServer.get_publicKey(), keyLength); - c16toa(keyLength, Yc_); - memcpy(Yc_ + KEY_OFFSET, dhClient.get_publicKey(), keyLength); - - // because of encoding first byte might be zero, don't use it for preMaster - if (*dhClient.get_agreedKey() == 0) - ssl.set_preMaster(dhClient.get_agreedKey() + 1, keyLength - 1); - else - ssl.set_preMaster(dhClient.get_agreedKey(), keyLength); -} - - -// build server exhange, server side -void DH_Server::build(SSL& ssl) -{ - DiffieHellman& dhServer = ssl.useCrypto().use_dh(); - - int pSz, gSz, pubSz; - dhServer.set_sizes(pSz, gSz, pubSz); - dhServer.get_parms(parms_.alloc_p(pSz), parms_.alloc_g(gSz), - parms_.alloc_pub(pubSz)); - - short sigSz = 0; - mySTL::auto_ptr auth; - const CertManager& cert = ssl.getCrypto().get_certManager(); - - if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) - { - if (cert.get_keyType() != rsa_sa_algo) { - ssl.SetError(privateKey_error); - return; - } - auth.reset(NEW_YS RSA(cert.get_privateKey(), - cert.get_privateKeyLength(), false)); - } - else { - if (cert.get_keyType() != dsa_sa_algo) { - ssl.SetError(privateKey_error); - return; - } - auth.reset(NEW_YS DSS(cert.get_privateKey(), - cert.get_privateKeyLength(), false)); - sigSz += DSS_ENCODED_EXTRA; - } - - sigSz += auth->get_signatureLength(); - if (!sigSz) { - ssl.SetError(privateKey_error); - return; - } - - length_ = 8; // pLen + gLen + YsLen + SigLen - length_ += pSz + gSz + pubSz + sigSz; - - output_buffer tmp(length_); - byte len[2]; - // P - c16toa(pSz, len); - tmp.write(len, sizeof(len)); - tmp.write(parms_.get_p(), pSz); - // G - c16toa(gSz, len); - tmp.write(len, sizeof(len)); - tmp.write(parms_.get_g(), gSz); - // Ys - c16toa(pubSz, len); - tmp.write(len, sizeof(len)); - tmp.write(parms_.get_pub(), pubSz); - - // Sig - byte hash[FINISHED_SZ]; - MD5 md5; - SHA sha; - signature_ = NEW_YS byte[sigSz]; - - const Connection& conn = ssl.getSecurity().get_connection(); - // md5 - md5.update(conn.client_random_, RAN_LEN); - md5.update(conn.server_random_, RAN_LEN); - md5.update(tmp.get_buffer(), tmp.get_size()); - md5.get_digest(hash); - - // sha - sha.update(conn.client_random_, RAN_LEN); - sha.update(conn.server_random_, RAN_LEN); - sha.update(tmp.get_buffer(), tmp.get_size()); - sha.get_digest(&hash[MD5_LEN]); - - if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) - auth->sign(signature_, hash, sizeof(hash), - ssl.getCrypto().get_random()); - else { - auth->sign(signature_, &hash[MD5_LEN], SHA_LEN, - ssl.getCrypto().get_random()); - byte encoded[DSS_SIG_SZ + DSS_ENCODED_EXTRA]; - TaoCrypt::EncodeDSA_Signature(signature_, encoded); - memcpy(signature_, encoded, sizeof(encoded)); - } - - c16toa(sigSz, len); - tmp.write(len, sizeof(len)); - tmp.write(signature_, sigSz); - - // key message - keyMessage_ = NEW_YS opaque[length_]; - memcpy(keyMessage_, tmp.get_buffer(), tmp.get_size()); -} - - -// read PreMaster secret and decrypt, server side -void EncryptedPreMasterSecret::read(SSL& ssl, input_buffer& input) -{ - const CertManager& cert = ssl.getCrypto().get_certManager(); - RSA rsa(cert.get_privateKey(), cert.get_privateKeyLength(), false); - uint16 cipherLen = rsa.get_cipherLength(); - if (ssl.isTLS()) { - byte len[2]; - input.read(len, sizeof(len)); - ato16(len, cipherLen); - } - alloc(cipherLen); - input.read(secret_, length_); - - opaque preMasterSecret[SECRET_LEN]; - rsa.decrypt(preMasterSecret, secret_, length_, - ssl.getCrypto().get_random()); - - ProtocolVersion pv = ssl.getSecurity().get_connection().chVersion_; - if (pv.major_ != preMasterSecret[0] || pv.minor_ != preMasterSecret[1]) - ssl.SetError(pms_version_error); // continue deriving for timing attack - - ssl.set_preMaster(preMasterSecret, SECRET_LEN); - ssl.makeMasterSecret(); -} - - -EncryptedPreMasterSecret::EncryptedPreMasterSecret() - : secret_(0), length_(0) -{} - - -EncryptedPreMasterSecret::~EncryptedPreMasterSecret() -{ - ysArrayDelete(secret_); -} - - -int EncryptedPreMasterSecret::get_length() const -{ - return length_; -} - - -opaque* EncryptedPreMasterSecret::get_clientKey() const -{ - return secret_; -} - - -void EncryptedPreMasterSecret::alloc(int sz) -{ - length_ = sz; - secret_ = NEW_YS opaque[sz]; -} - - -// read client's public key, server side -void ClientDiffieHellmanPublic::read(SSL& ssl, input_buffer& input) -{ - DiffieHellman& dh = ssl.useCrypto().use_dh(); - - uint16 keyLength; - byte tmp[2]; - tmp[0] = input[AUTO]; - tmp[1] = input[AUTO]; - ato16(tmp, keyLength); - - alloc(keyLength); - input.read(Yc_, keyLength); - dh.makeAgreement(Yc_, keyLength); - - // because of encoding, first byte might be 0, don't use for preMaster - if (*dh.get_agreedKey() == 0) - ssl.set_preMaster(dh.get_agreedKey() + 1, dh.get_agreedKeyLength() - 1); - else - ssl.set_preMaster(dh.get_agreedKey(), dh.get_agreedKeyLength()); - ssl.makeMasterSecret(); -} - - -ClientDiffieHellmanPublic::ClientDiffieHellmanPublic() - : length_(0), Yc_(0) -{} - - -ClientDiffieHellmanPublic::~ClientDiffieHellmanPublic() -{ - ysArrayDelete(Yc_); -} - - -int ClientDiffieHellmanPublic::get_length() const -{ - return length_; -} - - -opaque* ClientDiffieHellmanPublic::get_clientKey() const -{ - return Yc_; -} - - -void ClientDiffieHellmanPublic::alloc(int sz, bool offset) -{ - length_ = sz + (offset ? KEY_OFFSET : 0); - Yc_ = NEW_YS opaque[length_]; -} - - -// read server's p, g, public key and sig, client side -void DH_Server::read(SSL& ssl, input_buffer& input) -{ - uint16 length, messageTotal = 6; // pSz + gSz + pubSz - byte tmp[2]; - - // p - tmp[0] = input[AUTO]; - tmp[1] = input[AUTO]; - ato16(tmp, length); - messageTotal += length; - - input.read(parms_.alloc_p(length), length); - - // g - tmp[0] = input[AUTO]; - tmp[1] = input[AUTO]; - ato16(tmp, length); - messageTotal += length; - - input.read(parms_.alloc_g(length), length); - - // pub - tmp[0] = input[AUTO]; - tmp[1] = input[AUTO]; - ato16(tmp, length); - messageTotal += length; - - input.read(parms_.alloc_pub(length), length); - - // save message for hash verify - input_buffer message(messageTotal); - input.set_current(input.get_current() - messageTotal); - input.read(message.get_buffer(), messageTotal); - message.add_size(messageTotal); - - // signature - tmp[0] = input[AUTO]; - tmp[1] = input[AUTO]; - ato16(tmp, length); - - signature_ = NEW_YS byte[length]; - input.read(signature_, length); - - // verify signature - byte hash[FINISHED_SZ]; - MD5 md5; - SHA sha; - - const Connection& conn = ssl.getSecurity().get_connection(); - // md5 - md5.update(conn.client_random_, RAN_LEN); - md5.update(conn.server_random_, RAN_LEN); - md5.update(message.get_buffer(), message.get_size()); - md5.get_digest(hash); - - // sha - sha.update(conn.client_random_, RAN_LEN); - sha.update(conn.server_random_, RAN_LEN); - sha.update(message.get_buffer(), message.get_size()); - sha.get_digest(&hash[MD5_LEN]); - - const CertManager& cert = ssl.getCrypto().get_certManager(); - - if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) { - RSA rsa(cert.get_peerKey(), cert.get_peerKeyLength()); - if (!rsa.verify(hash, sizeof(hash), signature_, length)) - ssl.SetError(verify_error); - } - else { - byte decodedSig[DSS_SIG_SZ]; - length = TaoCrypt::DecodeDSA_Signature(decodedSig, signature_, length); - - DSS dss(cert.get_peerKey(), cert.get_peerKeyLength()); - if (!dss.verify(&hash[MD5_LEN], SHA_LEN, decodedSig, length)) - ssl.SetError(verify_error); - } - - // save input - ssl.useCrypto().SetDH(NEW_YS DiffieHellman(parms_.get_p(), - parms_.get_pSize(), parms_.get_g(), parms_.get_gSize(), - parms_.get_pub(), parms_.get_pubSize(), - ssl.getCrypto().get_random())); -} - - -DH_Server::DH_Server() - : signature_(0), length_(0), keyMessage_(0) -{} - - -DH_Server::~DH_Server() -{ - ysArrayDelete(keyMessage_); - ysArrayDelete(signature_); -} - - -int DH_Server::get_length() const -{ - return length_; -} - - -opaque* DH_Server::get_serverKey() const -{ - return keyMessage_; -} - - -// set available suites -Parameters::Parameters(ConnectionEnd ce, const Ciphers& ciphers, - ProtocolVersion pv, bool haveDH) : entity_(ce) -{ - pending_ = true; // suite not set yet - strncpy(cipher_name_, "NONE", 5); - - removeDH_ = !haveDH; // only use on server side for set suites - - if (ciphers.setSuites_) { // use user set list - suites_size_ = ciphers.suiteSz_; - memcpy(suites_, ciphers.suites_, ciphers.suiteSz_); - SetCipherNames(); - } - else - SetSuites(pv, ce == server_end && removeDH_); // defaults - -} - - -void Parameters::SetSuites(ProtocolVersion pv, bool removeDH, bool removeRSA, - bool removeDSA) -{ - int i = 0; - // available suites, best first - // when adding more, make sure cipher_names is updated and - // MAX_CIPHERS is big enough - - if (isTLS(pv)) { - if (!removeDH) { - if (!removeRSA) { - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA; - } - if (!removeDSA) { - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_DSS_WITH_AES_256_CBC_SHA; - } - } - if (!removeRSA) { - suites_[i++] = 0x00; - suites_[i++] = TLS_RSA_WITH_AES_256_CBC_SHA; - } - if (!removeDH) { - if (!removeRSA) { - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA; - } - if (!removeDSA) { - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_DSS_WITH_AES_128_CBC_SHA; - } - } - if (!removeRSA) { - suites_[i++] = 0x00; - suites_[i++] = TLS_RSA_WITH_AES_128_CBC_SHA; - suites_[i++] = 0x00; - suites_[i++] = TLS_RSA_WITH_AES_256_CBC_RMD160; - suites_[i++] = 0x00; - suites_[i++] = TLS_RSA_WITH_AES_128_CBC_RMD160; - suites_[i++] = 0x00; - suites_[i++] = TLS_RSA_WITH_3DES_EDE_CBC_RMD160; - } - if (!removeDH) { - if (!removeRSA) { - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_RSA_WITH_AES_256_CBC_RMD160; - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_RSA_WITH_AES_128_CBC_RMD160; - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160; - } - if (!removeDSA) { - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_DSS_WITH_AES_256_CBC_RMD160; - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_DSS_WITH_AES_128_CBC_RMD160; - suites_[i++] = 0x00; - suites_[i++] = TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160; - } - } - } - - if (!removeRSA) { - suites_[i++] = 0x00; - suites_[i++] = SSL_RSA_WITH_RC4_128_SHA; - suites_[i++] = 0x00; - suites_[i++] = SSL_RSA_WITH_RC4_128_MD5; - - suites_[i++] = 0x00; - suites_[i++] = SSL_RSA_WITH_3DES_EDE_CBC_SHA; - suites_[i++] = 0x00; - suites_[i++] = SSL_RSA_WITH_DES_CBC_SHA; - } - if (!removeDH) { - if (!removeRSA) { - suites_[i++] = 0x00; - suites_[i++] = SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA; - } - if (!removeDSA) { - suites_[i++] = 0x00; - suites_[i++] = SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA; - } - if (!removeRSA) { - suites_[i++] = 0x00; - suites_[i++] = SSL_DHE_RSA_WITH_DES_CBC_SHA; - } - if (!removeDSA) { - suites_[i++] = 0x00; - suites_[i++] = SSL_DHE_DSS_WITH_DES_CBC_SHA; - } - } - - suites_size_ = i; - - SetCipherNames(); -} - - -void Parameters::SetCipherNames() -{ - const int suites = suites_size_ / 2; - int pos = 0; - - for (int j = 0; j < suites; j++) { - int index = suites_[j*2 + 1]; // every other suite is suite id - size_t len = strlen(cipher_names[index]) + 1; - strncpy(cipher_list_[pos++], cipher_names[index], len); - } - cipher_list_[pos][0] = 0; -} - - -// input operator for RecordLayerHeader, adjust stream -input_buffer& operator>>(input_buffer& input, RecordLayerHeader& hdr) -{ - hdr.type_ = ContentType(input[AUTO]); - hdr.version_.major_ = input[AUTO]; - hdr.version_.minor_ = input[AUTO]; - - // length - byte tmp[2]; - tmp[0] = input[AUTO]; - tmp[1] = input[AUTO]; - ato16(tmp, hdr.length_); - - return input; -} - - -// output operator for RecordLayerHeader -output_buffer& operator<<(output_buffer& output, const RecordLayerHeader& hdr) -{ - output[AUTO] = hdr.type_; - output[AUTO] = hdr.version_.major_; - output[AUTO] = hdr.version_.minor_; - - // length - byte tmp[2]; - c16toa(hdr.length_, tmp); - output[AUTO] = tmp[0]; - output[AUTO] = tmp[1]; - - return output; -} - - -// virtual input operator for Messages -input_buffer& operator>>(input_buffer& input, Message& msg) -{ - return msg.set(input); -} - -// virtual output operator for Messages -output_buffer& operator<<(output_buffer& output, const Message& msg) -{ - return msg.get(output); -} - - -// input operator for HandShakeHeader -input_buffer& operator>>(input_buffer& input, HandShakeHeader& hs) -{ - hs.type_ = HandShakeType(input[AUTO]); - - hs.length_[0] = input[AUTO]; - hs.length_[1] = input[AUTO]; - hs.length_[2] = input[AUTO]; - - return input; -} - - -// output operator for HandShakeHeader -output_buffer& operator<<(output_buffer& output, const HandShakeHeader& hdr) -{ - output[AUTO] = hdr.type_; - output.write(hdr.length_, sizeof(hdr.length_)); - return output; -} - - -// HandShake Header Processing function -void HandShakeHeader::Process(input_buffer& input, SSL& ssl) -{ - ssl.verifyState(*this); - if (ssl.GetError()) return; - const HandShakeFactory& hsf = ssl.getFactory().getHandShake(); - mySTL::auto_ptr hs(hsf.CreateObject(type_)); - if (!hs.get()) { - ssl.SetError(factory_error); - return; - } - - uint len = c24to32(length_); - if (len > input.get_remaining()) { - ssl.SetError(bad_input); - return; - } - hashHandShake(ssl, input, len); - - hs->set_length(len); - input >> *hs; - hs->Process(input, ssl); -} - - -ContentType HandShakeHeader::get_type() const -{ - return handshake; -} - - -uint16 HandShakeHeader::get_length() const -{ - return c24to32(length_); -} - - -HandShakeType HandShakeHeader::get_handshakeType() const -{ - return type_; -} - - -void HandShakeHeader::set_type(HandShakeType hst) -{ - type_ = hst; -} - - -void HandShakeHeader::set_length(uint32 u32) -{ - c32to24(u32, length_); -} - - -input_buffer& HandShakeHeader::set(input_buffer& in) -{ - return in >> *this; -} - - -output_buffer& HandShakeHeader::get(output_buffer& out) const -{ - return out << *this; -} - - - -int HandShakeBase::get_length() const -{ - return length_; -} - - -void HandShakeBase::set_length(int l) -{ - length_ = l; -} - - -// for building buffer's type field -HandShakeType HandShakeBase::get_type() const -{ - return no_shake; -} - - -input_buffer& HandShakeBase::set(input_buffer& in) -{ - return in; -} - - -output_buffer& HandShakeBase::get(output_buffer& out) const -{ - return out; -} - - -void HandShakeBase::Process(input_buffer&, SSL&) -{} - - -input_buffer& HelloRequest::set(input_buffer& in) -{ - return in; -} - - -output_buffer& HelloRequest::get(output_buffer& out) const -{ - return out; -} - - -void HelloRequest::Process(input_buffer&, SSL&) -{} - - -HandShakeType HelloRequest::get_type() const -{ - return hello_request; -} - - -// input operator for CipherSpec -input_buffer& operator>>(input_buffer& input, ChangeCipherSpec& cs) -{ - cs.type_ = CipherChoice(input[AUTO]); - return input; -} - -// output operator for CipherSpec -output_buffer& operator<<(output_buffer& output, const ChangeCipherSpec& cs) -{ - output[AUTO] = cs.type_; - return output; -} - - -ChangeCipherSpec::ChangeCipherSpec() - : type_(change_cipher_spec_choice) -{} - - -input_buffer& ChangeCipherSpec::set(input_buffer& in) -{ - return in >> *this; -} - - -output_buffer& ChangeCipherSpec::get(output_buffer& out) const -{ - return out << *this; -} - - -ContentType ChangeCipherSpec::get_type() const -{ - return change_cipher_spec; -} - - -uint16 ChangeCipherSpec::get_length() const -{ - return SIZEOF_ENUM; -} - - -// CipherSpec processing handler -void ChangeCipherSpec::Process(input_buffer&, SSL& ssl) -{ - ssl.useSecurity().use_parms().pending_ = false; - if (ssl.getSecurity().get_resuming()) { - if (ssl.getSecurity().get_parms().entity_ == client_end) - buildFinished(ssl, ssl.useHashes().use_verify(), server); // server - } - else if (ssl.getSecurity().get_parms().entity_ == server_end) - buildFinished(ssl, ssl.useHashes().use_verify(), client); // client -} - - -Alert::Alert(AlertLevel al, AlertDescription ad) - : level_(al), description_(ad) -{} - - -ContentType Alert::get_type() const -{ - return alert; -} - - -uint16 Alert::get_length() const -{ - return SIZEOF_ENUM * 2; -} - - -input_buffer& Alert::set(input_buffer& in) -{ - return in >> *this; -} - - -output_buffer& Alert::get(output_buffer& out) const -{ - return out << *this; -} - - -// input operator for Alert -input_buffer& operator>>(input_buffer& input, Alert& a) -{ - a.level_ = AlertLevel(input[AUTO]); - a.description_ = AlertDescription(input[AUTO]); - - return input; -} - - -// output operator for Alert -output_buffer& operator<<(output_buffer& output, const Alert& a) -{ - output[AUTO] = a.level_; - output[AUTO] = a.description_; - return output; -} - - -// Alert processing handler -void Alert::Process(input_buffer& input, SSL& ssl) -{ - if (ssl.getSecurity().get_parms().pending_ == false) { // encrypted alert - int aSz = get_length(); // alert size already read on input - opaque verify[SHA_LEN]; - const opaque* data = input.get_buffer() + input.get_current() - aSz; - - if (ssl.isTLS()) - TLS_hmac(ssl, verify, data, aSz, alert, true); - else - hmac(ssl, verify, data, aSz, alert, true); - - // read mac and fill - int digestSz = ssl.getCrypto().get_digest().get_digestSize(); - opaque mac[SHA_LEN]; - input.read(mac, digestSz); - - if (ssl.getSecurity().get_parms().cipher_type_ == block) { - int ivExtra = 0; - opaque fill; - - if (ssl.isTLSv1_1()) - ivExtra = ssl.getCrypto().get_cipher().get_blockSize(); - int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra - - aSz - digestSz; - for (int i = 0; i < padSz; i++) - fill = input[AUTO]; - } - - // verify - if (memcmp(mac, verify, digestSz)) { - ssl.SetError(verify_error); - return; - } - } - if (level_ == fatal) { - ssl.useStates().useRecord() = recordNotReady; - ssl.useStates().useHandShake() = handShakeNotReady; - ssl.SetError(YasslError(description_)); - } -} - - -Data::Data() - : length_(0), buffer_(0), write_buffer_(0) -{} - - -Data::Data(uint16 len, opaque* b) - : length_(len), buffer_(b), write_buffer_(0) -{} - - -void Data::SetData(uint16 len, const opaque* buffer) -{ - assert(write_buffer_ == 0); - - length_ = len; - write_buffer_ = buffer; -} - -input_buffer& Data::set(input_buffer& in) -{ - return in; -} - - -output_buffer& Data::get(output_buffer& out) const -{ - return out << *this; -} - - -ContentType Data::get_type() const -{ - return application_data; -} - - -uint16 Data::get_length() const -{ - return length_; -} - - -void Data::set_length(uint16 l) -{ - length_ = l; -} - - -opaque* Data::set_buffer() -{ - return buffer_; -} - - -// output operator for Data -output_buffer& operator<<(output_buffer& output, const Data& data) -{ - output.write(data.write_buffer_, data.length_); - return output; -} - - -// Process handler for Data -void Data::Process(input_buffer& input, SSL& ssl) -{ - int msgSz = ssl.getSecurity().get_parms().encrypt_size_; - int pad = 0, padByte = 0; - int ivExtra = 0; - - if (ssl.getSecurity().get_parms().cipher_type_ == block) { - if (ssl.isTLSv1_1()) // IV - ivExtra = ssl.getCrypto().get_cipher().get_blockSize(); - pad = *(input.get_buffer() + input.get_current() + msgSz -ivExtra - 1); - padByte = 1; - } - int digestSz = ssl.getCrypto().get_digest().get_digestSize(); - int dataSz = msgSz - ivExtra - digestSz - pad - padByte; - opaque verify[SHA_LEN]; - - const byte* rawData = input.get_buffer() + input.get_current(); - - // read data - if (dataSz) { // could be compressed - if (ssl.CompressionOn()) { - input_buffer tmp; - if (DeCompress(input, dataSz, tmp) == -1) { - ssl.SetError(decompress_error); - return; - } - ssl.addData(NEW_YS input_buffer(tmp.get_size(), - tmp.get_buffer(), tmp.get_size())); - } - else { - input_buffer* data; - ssl.addData(data = NEW_YS input_buffer(dataSz)); - input.read(data->get_buffer(), dataSz); - data->add_size(dataSz); - } - - if (ssl.isTLS()) - TLS_hmac(ssl, verify, rawData, dataSz, application_data, true); - else - hmac(ssl, verify, rawData, dataSz, application_data, true); - } - - // read mac and fill - opaque mac[SHA_LEN]; - opaque fill; - input.read(mac, digestSz); - for (int i = 0; i < pad; i++) - fill = input[AUTO]; - if (padByte) - fill = input[AUTO]; - - // verify - if (dataSz) { - if (memcmp(mac, verify, digestSz)) { - ssl.SetError(verify_error); - return; - } - } - else - ssl.get_SEQIncrement(true); // even though no data, increment verify -} - - -// virtual input operator for HandShakes -input_buffer& operator>>(input_buffer& input, HandShakeBase& hs) -{ - return hs.set(input); -} - - -// virtual output operator for HandShakes -output_buffer& operator<<(output_buffer& output, const HandShakeBase& hs) -{ - return hs.get(output); -} - - -Certificate::Certificate(const x509* cert) : cert_(cert) -{ - set_length(cert_->get_length() + 2 * CERT_HEADER); // list and cert size -} - - -const opaque* Certificate::get_buffer() const -{ - return cert_->get_buffer(); -} - - -// output operator for Certificate -output_buffer& operator<<(output_buffer& output, const Certificate& cert) -{ - uint sz = cert.get_length() - 2 * CERT_HEADER; - opaque tmp[CERT_HEADER]; - - c32to24(sz + CERT_HEADER, tmp); - output.write(tmp, CERT_HEADER); - c32to24(sz, tmp); - output.write(tmp, CERT_HEADER); - output.write(cert.get_buffer(), sz); - - return output; -} - - -// certificate processing handler -void Certificate::Process(input_buffer& input, SSL& ssl) -{ - CertManager& cm = ssl.useCrypto().use_certManager(); - - uint32 list_sz; - byte tmp[3]; - - tmp[0] = input[AUTO]; - tmp[1] = input[AUTO]; - tmp[2] = input[AUTO]; - c24to32(tmp, list_sz); - - while (list_sz) { - // cert size - uint32 cert_sz; - tmp[0] = input[AUTO]; - tmp[1] = input[AUTO]; - tmp[2] = input[AUTO]; - c24to32(tmp, cert_sz); - - x509* myCert; - cm.AddPeerCert(myCert = NEW_YS x509(cert_sz)); - input.read(myCert->use_buffer(), myCert->get_length()); - - list_sz -= cert_sz + CERT_HEADER; - } - if (int err = cm.Validate()) - ssl.SetError(YasslError(err)); - else if (ssl.getSecurity().get_parms().entity_ == client_end) - ssl.useStates().useClient() = serverCertComplete; -} - - -Certificate::Certificate() - : cert_(0) -{} - - -input_buffer& Certificate::set(input_buffer& in) -{ - return in; -} - - -output_buffer& Certificate::get(output_buffer& out) const -{ - return out << *this; -} - - -HandShakeType Certificate::get_type() const -{ - return certificate; -} - - -ServerDHParams::ServerDHParams() - : pSz_(0), gSz_(0), pubSz_(0), p_(0), g_(0), Ys_(0) -{} - - -ServerDHParams::~ServerDHParams() -{ - ysArrayDelete(Ys_); - ysArrayDelete(g_); - ysArrayDelete(p_); -} - - -int ServerDHParams::get_pSize() const -{ - return pSz_; -} - - -int ServerDHParams::get_gSize() const -{ - return gSz_; -} - - -int ServerDHParams::get_pubSize() const -{ - return pubSz_; -} - - -const opaque* ServerDHParams::get_p() const -{ - return p_; -} - - -const opaque* ServerDHParams::get_g() const -{ - return g_; -} - - -const opaque* ServerDHParams::get_pub() const -{ - return Ys_; -} - - -opaque* ServerDHParams::alloc_p(int sz) -{ - p_ = NEW_YS opaque[pSz_ = sz]; - return p_; -} - - -opaque* ServerDHParams::alloc_g(int sz) -{ - g_ = NEW_YS opaque[gSz_ = sz]; - return g_; -} - - -opaque* ServerDHParams::alloc_pub(int sz) -{ - Ys_ = NEW_YS opaque[pubSz_ = sz]; - return Ys_; -} - - -int ServerKeyBase::get_length() const -{ - return 0; -} - - -opaque* ServerKeyBase::get_serverKey() const -{ - return 0; -} - - -// input operator for ServerHello -input_buffer& operator>>(input_buffer& input, ServerHello& hello) -{ - // Protocol - hello.server_version_.major_ = input[AUTO]; - hello.server_version_.minor_ = input[AUTO]; - - // Random - input.read(hello.random_, RAN_LEN); - - // Session - hello.id_len_ = input[AUTO]; - if (hello.id_len_) - input.read(hello.session_id_, hello.id_len_); - - // Suites - hello.cipher_suite_[0] = input[AUTO]; - hello.cipher_suite_[1] = input[AUTO]; - - // Compression - hello.compression_method_ = CompressionMethod(input[AUTO]); - - return input; -} - - -// output operator for ServerHello -output_buffer& operator<<(output_buffer& output, const ServerHello& hello) -{ - // Protocol - output[AUTO] = hello.server_version_.major_; - output[AUTO] = hello.server_version_.minor_; - - // Random - output.write(hello.random_, RAN_LEN); - - // Session - output[AUTO] = hello.id_len_; - output.write(hello.session_id_, ID_LEN); - - // Suites - output[AUTO] = hello.cipher_suite_[0]; - output[AUTO] = hello.cipher_suite_[1]; - - // Compression - output[AUTO] = hello.compression_method_; - - return output; -} - - -// Server Hello processing handler -void ServerHello::Process(input_buffer&, SSL& ssl) -{ - if (ssl.GetMultiProtocol()) { // SSLv23 support - if (ssl.isTLS() && server_version_.minor_ < 1) - // downgrade to SSLv3 - ssl.useSecurity().use_connection().TurnOffTLS(); - else if (ssl.isTLSv1_1() && server_version_.minor_ == 1) - // downdrage to TLSv1 - ssl.useSecurity().use_connection().TurnOffTLS1_1(); - } - else if (ssl.isTLSv1_1() && server_version_.minor_ < 2) { - ssl.SetError(badVersion_error); - return; - } - else if (ssl.isTLS() && server_version_.minor_ < 1) { - ssl.SetError(badVersion_error); - return; - } - else if (!ssl.isTLS() && (server_version_.major_ == 3 && - server_version_.minor_ >= 1)) { - ssl.SetError(badVersion_error); - return; - } - ssl.set_pending(cipher_suite_[1]); - ssl.set_random(random_, server_end); - if (id_len_) - ssl.set_sessionID(session_id_); - else - ssl.useSecurity().use_connection().sessionID_Set_ = false; - - if (ssl.getSecurity().get_resuming()) - if (memcmp(session_id_, ssl.getSecurity().get_resume().GetID(), - ID_LEN) == 0) { - ssl.set_masterSecret(ssl.getSecurity().get_resume().GetSecret()); - if (ssl.isTLS()) - ssl.deriveTLSKeys(); - else - ssl.deriveKeys(); - ssl.useStates().useClient() = serverHelloDoneComplete; - return; - } - else { - ssl.useSecurity().set_resuming(false); - ssl.useLog().Trace("server denied resumption"); - } - - if (ssl.CompressionOn() && !compression_method_) - ssl.UnSetCompression(); // server isn't supporting yaSSL zlib request - - ssl.useStates().useClient() = serverHelloComplete; -} - - -ServerHello::ServerHello() -{ - memset(random_, 0, RAN_LEN); - memset(session_id_, 0, ID_LEN); -} - - -ServerHello::ServerHello(ProtocolVersion pv, bool useCompression) - : server_version_(pv), - compression_method_(useCompression ? zlib : no_compression) -{ - memset(random_, 0, RAN_LEN); - memset(session_id_, 0, ID_LEN); -} - - -input_buffer& ServerHello::set(input_buffer& in) -{ - return in >> *this; -} - - -output_buffer& ServerHello::get(output_buffer& out) const -{ - return out << *this; -} - - -HandShakeType ServerHello::get_type() const -{ - return server_hello; -} - - -const opaque* ServerHello::get_random() const -{ - return random_; -} - - -// Server Hello Done processing handler -void ServerHelloDone::Process(input_buffer&, SSL& ssl) -{ - ssl.useStates().useClient() = serverHelloDoneComplete; -} - - -ServerHelloDone::ServerHelloDone() -{ - set_length(0); -} - - -input_buffer& ServerHelloDone::set(input_buffer& in) -{ - return in; -} - - -output_buffer& ServerHelloDone::get(output_buffer& out) const -{ - return out; -} - - -HandShakeType ServerHelloDone::get_type() const -{ - return server_hello_done; -} - - -int ClientKeyBase::get_length() const -{ - return 0; -} - - -opaque* ClientKeyBase::get_clientKey() const -{ - return 0; -} - - -// input operator for Client Hello -input_buffer& operator>>(input_buffer& input, ClientHello& hello) -{ - uint begin = input.get_current(); // could have extensions at end - - // Protocol - hello.client_version_.major_ = input[AUTO]; - hello.client_version_.minor_ = input[AUTO]; - - // Random - input.read(hello.random_, RAN_LEN); - - // Session - hello.id_len_ = input[AUTO]; - if (hello.id_len_) input.read(hello.session_id_, ID_LEN); - - // Suites - byte tmp[2]; - uint16 len; - tmp[0] = input[AUTO]; - tmp[1] = input[AUTO]; - ato16(tmp, len); - - hello.suite_len_ = min(len, static_cast(MAX_SUITE_SZ)); - input.read(hello.cipher_suites_, hello.suite_len_); - if (len > hello.suite_len_) // ignore extra suites - input.set_current(input.get_current() + len - hello.suite_len_); - - // Compression - hello.comp_len_ = input[AUTO]; - hello.compression_methods_ = no_compression; - while (hello.comp_len_--) { - CompressionMethod cm = CompressionMethod(input[AUTO]); - if (cm == zlib) - hello.compression_methods_ = zlib; - } - - uint read = input.get_current() - begin; - uint expected = hello.get_length(); - - // ignore client hello extensions for now - if (read < expected) - input.set_current(input.get_current() + expected - read); - - return input; -} - - -// output operaotr for Client Hello -output_buffer& operator<<(output_buffer& output, const ClientHello& hello) -{ - // Protocol - output[AUTO] = hello.client_version_.major_; - output[AUTO] = hello.client_version_.minor_; - - // Random - output.write(hello.random_, RAN_LEN); - - // Session - output[AUTO] = hello.id_len_; - if (hello.id_len_) output.write(hello.session_id_, ID_LEN); - - // Suites - byte tmp[2]; - c16toa(hello.suite_len_, tmp); - output[AUTO] = tmp[0]; - output[AUTO] = tmp[1]; - output.write(hello.cipher_suites_, hello.suite_len_); - - // Compression - output[AUTO] = hello.comp_len_; - output[AUTO] = hello.compression_methods_; - - return output; -} - - -// Client Hello processing handler -void ClientHello::Process(input_buffer&, SSL& ssl) -{ - // store version for pre master secret - ssl.useSecurity().use_connection().chVersion_ = client_version_; - - if (client_version_.major_ != 3) { - ssl.SetError(badVersion_error); - return; - } - if (ssl.GetMultiProtocol()) { // SSLv23 support - if (ssl.isTLS() && client_version_.minor_ < 1) { - // downgrade to SSLv3 - ssl.useSecurity().use_connection().TurnOffTLS(); - ProtocolVersion pv = ssl.getSecurity().get_connection().version_; - bool removeDH = ssl.getSecurity().get_parms().removeDH_; - bool removeRSA = false; - bool removeDSA = false; - - const CertManager& cm = ssl.getCrypto().get_certManager(); - if (cm.get_keyType() == rsa_sa_algo) - removeDSA = true; - else - removeRSA = true; - - // reset w/ SSL suites - ssl.useSecurity().use_parms().SetSuites(pv, removeDH, removeRSA, - removeDSA); - } - else if (ssl.isTLSv1_1() && client_version_.minor_ == 1) - // downgrade to TLSv1, but use same suites - ssl.useSecurity().use_connection().TurnOffTLS1_1(); - } - else if (ssl.isTLSv1_1() && client_version_.minor_ < 2) { - ssl.SetError(badVersion_error); - return; - } - else if (ssl.isTLS() && client_version_.minor_ < 1) { - ssl.SetError(badVersion_error); - return; - } - else if (!ssl.isTLS() && client_version_.minor_ >= 1) { - ssl.SetError(badVersion_error); - return; - } - - ssl.set_random(random_, client_end); - - while (id_len_) { // trying to resume - SSL_SESSION* session = 0; - if (!ssl.getSecurity().GetContext()->GetSessionCacheOff()) - session = GetSessions().lookup(session_id_); - if (!session) { - ssl.useLog().Trace("session lookup failed"); - break; - } - ssl.set_session(session); - ssl.useSecurity().set_resuming(true); - ssl.matchSuite(session->GetSuite(), SUITE_LEN); - ssl.set_pending(ssl.getSecurity().get_parms().suite_[1]); - ssl.set_masterSecret(session->GetSecret()); - - opaque serverRandom[RAN_LEN]; - ssl.getCrypto().get_random().Fill(serverRandom, sizeof(serverRandom)); - ssl.set_random(serverRandom, server_end); - if (ssl.isTLS()) - ssl.deriveTLSKeys(); - else - ssl.deriveKeys(); - ssl.useStates().useServer() = clientKeyExchangeComplete; - return; - } - ssl.matchSuite(cipher_suites_, suite_len_); - if (ssl.GetError()) return; - ssl.set_pending(ssl.getSecurity().get_parms().suite_[1]); - - if (compression_methods_ == zlib) - ssl.SetCompression(); - - ssl.useStates().useServer() = clientHelloComplete; -} - - -input_buffer& ClientHello::set(input_buffer& in) -{ - return in >> *this; -} - - -output_buffer& ClientHello::get(output_buffer& out) const -{ - return out << *this; -} - - -HandShakeType ClientHello::get_type() const -{ - return client_hello; -} - - -const opaque* ClientHello::get_random() const -{ - return random_; -} - - -ClientHello::ClientHello() -{ - memset(random_, 0, RAN_LEN); -} - - -ClientHello::ClientHello(ProtocolVersion pv, bool useCompression) - : client_version_(pv), - compression_methods_(useCompression ? zlib : no_compression) -{ - memset(random_, 0, RAN_LEN); -} - - -// output operator for ServerKeyExchange -output_buffer& operator<<(output_buffer& output, const ServerKeyExchange& sk) -{ - output.write(sk.getKey(), sk.getKeyLength()); - return output; -} - - -// Server Key Exchange processing handler -void ServerKeyExchange::Process(input_buffer& input, SSL& ssl) -{ - createKey(ssl); - if (ssl.GetError()) return; - server_key_->read(ssl, input); - - ssl.useStates().useClient() = serverKeyExchangeComplete; -} - - -ServerKeyExchange::ServerKeyExchange(SSL& ssl) -{ - createKey(ssl); -} - - -ServerKeyExchange::ServerKeyExchange() - : server_key_(0) -{} - - -ServerKeyExchange::~ServerKeyExchange() -{ - ysDelete(server_key_); -} - - -void ServerKeyExchange::build(SSL& ssl) -{ - server_key_->build(ssl); - set_length(server_key_->get_length()); -} - - -const opaque* ServerKeyExchange::getKey() const -{ - return server_key_->get_serverKey(); -} - - -int ServerKeyExchange::getKeyLength() const -{ - return server_key_->get_length(); -} - - -input_buffer& ServerKeyExchange::set(input_buffer& in) -{ - return in; // process does -} - - -output_buffer& ServerKeyExchange::get(output_buffer& out) const -{ - return out << *this; -} - - -HandShakeType ServerKeyExchange::get_type() const -{ - return server_key_exchange; -} - - -// CertificateRequest -CertificateRequest::CertificateRequest() - : typeTotal_(0) -{ - memset(certificate_types_, 0, sizeof(certificate_types_)); -} - - -CertificateRequest::~CertificateRequest() -{ - - STL::for_each(certificate_authorities_.begin(), - certificate_authorities_.end(), - del_ptr_zero()) ; -} - - -void CertificateRequest::Build() -{ - certificate_types_[0] = rsa_sign; - certificate_types_[1] = dss_sign; - - typeTotal_ = 2; - - uint16 authCount = 0; - uint16 authSz = 0; - - for (int j = 0; j < authCount; j++) { - int sz = REQUEST_HEADER + MIN_DIS_SIZE; - DistinguishedName dn; - certificate_authorities_.push_back(dn = NEW_YS byte[sz]); - - opaque tmp[REQUEST_HEADER]; - c16toa(MIN_DIS_SIZE, tmp); - memcpy(dn, tmp, sizeof(tmp)); - - // fill w/ junk for now - memcpy(dn, tmp, MIN_DIS_SIZE); - authSz += sz; - } - - set_length(SIZEOF_ENUM + typeTotal_ + REQUEST_HEADER + authSz); -} - - -input_buffer& CertificateRequest::set(input_buffer& in) -{ - return in >> *this; -} - - -output_buffer& CertificateRequest::get(output_buffer& out) const -{ - return out << *this; -} - - -// input operator for CertificateRequest -input_buffer& operator>>(input_buffer& input, CertificateRequest& request) -{ - // types - request.typeTotal_ = input[AUTO]; - for (int i = 0; i < request.typeTotal_; i++) - request.certificate_types_[i] = ClientCertificateType(input[AUTO]); - - byte tmp[REQUEST_HEADER]; - input.read(tmp, sizeof(tmp)); - uint16 sz; - ato16(tmp, sz); - - // authorities - while (sz) { - uint16 dnSz; - input.read(tmp, sizeof(tmp)); - ato16(tmp, dnSz); - - DistinguishedName dn; - request.certificate_authorities_.push_back(dn = NEW_YS - byte[REQUEST_HEADER + dnSz]); - memcpy(dn, tmp, REQUEST_HEADER); - input.read(&dn[REQUEST_HEADER], dnSz); - - sz -= dnSz + REQUEST_HEADER; - } - - return input; -} - - -// output operator for CertificateRequest -output_buffer& operator<<(output_buffer& output, - const CertificateRequest& request) -{ - // types - output[AUTO] = request.typeTotal_; - for (int i = 0; i < request.typeTotal_; i++) - output[AUTO] = request.certificate_types_[i]; - - // authorities - opaque tmp[REQUEST_HEADER]; - c16toa(request.get_length() - SIZEOF_ENUM - - request.typeTotal_ - REQUEST_HEADER, tmp); - output.write(tmp, sizeof(tmp)); - - STL::list::const_iterator first = - request.certificate_authorities_.begin(); - STL::list::const_iterator last = - request.certificate_authorities_.end(); - while (first != last) { - uint16 sz; - ato16(*first, sz); - output.write(*first, sz + REQUEST_HEADER); - - ++first; - } - - return output; -} - - -// CertificateRequest processing handler -void CertificateRequest::Process(input_buffer&, SSL& ssl) -{ - CertManager& cm = ssl.useCrypto().use_certManager(); - - // make sure user provided cert and key before sending and using - if (cm.get_cert() && cm.get_privateKey()) - cm.setSendVerify(); -} - - -HandShakeType CertificateRequest::get_type() const -{ - return certificate_request; -} - - -// CertificateVerify -CertificateVerify::CertificateVerify() : signature_(0) -{} - - -CertificateVerify::~CertificateVerify() -{ - ysArrayDelete(signature_); -} - - -void CertificateVerify::Build(SSL& ssl) -{ - build_certHashes(ssl, hashes_); - - uint16 sz = 0; - byte len[VERIFY_HEADER]; - mySTL::auto_array sig; - - // sign - const CertManager& cert = ssl.getCrypto().get_certManager(); - if (cert.get_keyType() == rsa_sa_algo) { - RSA rsa(cert.get_privateKey(), cert.get_privateKeyLength(), false); - - sz = rsa.get_cipherLength() + VERIFY_HEADER; - sig.reset(NEW_YS byte[sz]); - - c16toa(sz - VERIFY_HEADER, len); - memcpy(sig.get(), len, VERIFY_HEADER); - rsa.sign(sig.get() + VERIFY_HEADER, hashes_.md5_, sizeof(Hashes), - ssl.getCrypto().get_random()); - } - else { // DSA - DSS dss(cert.get_privateKey(), cert.get_privateKeyLength(), false); - - sz = DSS_SIG_SZ + DSS_ENCODED_EXTRA + VERIFY_HEADER; - sig.reset(NEW_YS byte[sz]); - - c16toa(sz - VERIFY_HEADER, len); - memcpy(sig.get(), len, VERIFY_HEADER); - dss.sign(sig.get() + VERIFY_HEADER, hashes_.sha_, SHA_LEN, - ssl.getCrypto().get_random()); - - byte encoded[DSS_SIG_SZ + DSS_ENCODED_EXTRA]; - TaoCrypt::EncodeDSA_Signature(sig.get() + VERIFY_HEADER, encoded); - memcpy(sig.get() + VERIFY_HEADER, encoded, sizeof(encoded)); - } - set_length(sz); - signature_ = sig.release(); -} - - -input_buffer& CertificateVerify::set(input_buffer& in) -{ - return in >> *this; -} - - -output_buffer& CertificateVerify::get(output_buffer& out) const -{ - return out << *this; -} - - -// input operator for CertificateVerify -input_buffer& operator>>(input_buffer& input, CertificateVerify& request) -{ - byte tmp[VERIFY_HEADER]; - input.read(tmp, sizeof(tmp)); - - uint16 sz = 0; - ato16(tmp, sz); - request.set_length(sz); - - request.signature_ = NEW_YS byte[sz]; - input.read(request.signature_, sz); - - return input; -} - - -// output operator for CertificateVerify -output_buffer& operator<<(output_buffer& output, - const CertificateVerify& verify) -{ - output.write(verify.signature_, verify.get_length()); - - return output; -} - - -// CertificateVerify processing handler -void CertificateVerify::Process(input_buffer&, SSL& ssl) -{ - const Hashes& hashVerify = ssl.getHashes().get_certVerify(); - const CertManager& cert = ssl.getCrypto().get_certManager(); - - if (cert.get_peerKeyType() == rsa_sa_algo) { - RSA rsa(cert.get_peerKey(), cert.get_peerKeyLength()); - - if (!rsa.verify(hashVerify.md5_, sizeof(hashVerify), signature_, - get_length())) - ssl.SetError(verify_error); - } - else { // DSA - byte decodedSig[DSS_SIG_SZ]; - TaoCrypt::DecodeDSA_Signature(decodedSig, signature_, get_length()); - - DSS dss(cert.get_peerKey(), cert.get_peerKeyLength()); - if (!dss.verify(hashVerify.sha_, SHA_LEN, decodedSig, get_length())) - ssl.SetError(verify_error); - } -} - - -HandShakeType CertificateVerify::get_type() const -{ - return certificate_verify; -} - - -// output operator for ClientKeyExchange -output_buffer& operator<<(output_buffer& output, const ClientKeyExchange& ck) -{ - output.write(ck.getKey(), ck.getKeyLength()); - return output; -} - - -// Client Key Exchange processing handler -void ClientKeyExchange::Process(input_buffer& input, SSL& ssl) -{ - createKey(ssl); - if (ssl.GetError()) return; - client_key_->read(ssl, input); - - if (ssl.getCrypto().get_certManager().verifyPeer()) - build_certHashes(ssl, ssl.useHashes().use_certVerify()); - - ssl.useStates().useServer() = clientKeyExchangeComplete; -} - - -ClientKeyExchange::ClientKeyExchange(SSL& ssl) -{ - createKey(ssl); -} - - -ClientKeyExchange::ClientKeyExchange() - : client_key_(0) -{} - - -ClientKeyExchange::~ClientKeyExchange() -{ - ysDelete(client_key_); -} - - -void ClientKeyExchange::build(SSL& ssl) -{ - client_key_->build(ssl); - set_length(client_key_->get_length()); -} - -const opaque* ClientKeyExchange::getKey() const -{ - return client_key_->get_clientKey(); -} - - -int ClientKeyExchange::getKeyLength() const -{ - return client_key_->get_length(); -} - - -input_buffer& ClientKeyExchange::set(input_buffer& in) -{ - return in; -} - - -output_buffer& ClientKeyExchange::get(output_buffer& out) const -{ - return out << *this; -} - - -HandShakeType ClientKeyExchange::get_type() const -{ - return client_key_exchange; -} - - -// input operator for Finished -input_buffer& operator>>(input_buffer& input, Finished&) -{ - /* do in process */ - - return input; -} - -// output operator for Finished -output_buffer& operator<<(output_buffer& output, const Finished& fin) -{ - if (fin.get_length() == FINISHED_SZ) { - output.write(fin.hashes_.md5_, MD5_LEN); - output.write(fin.hashes_.sha_, SHA_LEN); - } - else // TLS_FINISHED_SZ - output.write(fin.hashes_.md5_, TLS_FINISHED_SZ); - - return output; -} - - -// Finished processing handler -void Finished::Process(input_buffer& input, SSL& ssl) -{ - // verify hashes - const Finished& verify = ssl.getHashes().get_verify(); - uint finishedSz = ssl.isTLS() ? TLS_FINISHED_SZ : FINISHED_SZ; - - input.read(hashes_.md5_, finishedSz); - - if (memcmp(&hashes_, &verify.hashes_, finishedSz)) { - ssl.SetError(verify_error); - return; - } - - // read verify mac - opaque verifyMAC[SHA_LEN]; - uint macSz = finishedSz + HANDSHAKE_HEADER; - - if (ssl.isTLS()) - TLS_hmac(ssl, verifyMAC, input.get_buffer() + input.get_current() - - macSz, macSz, handshake, true); - else - hmac(ssl, verifyMAC, input.get_buffer() + input.get_current() - macSz, - macSz, handshake, true); - - // read mac and fill - opaque mac[SHA_LEN]; // max size - int digestSz = ssl.getCrypto().get_digest().get_digestSize(); - input.read(mac, digestSz); - - uint ivExtra = 0; - if (ssl.getSecurity().get_parms().cipher_type_ == block) - if (ssl.isTLSv1_1()) - ivExtra = ssl.getCrypto().get_cipher().get_blockSize(); - - opaque fill; - int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra - - HANDSHAKE_HEADER - finishedSz - digestSz; - for (int i = 0; i < padSz; i++) - fill = input[AUTO]; - - // verify mac - if (memcmp(mac, verifyMAC, digestSz)) { - ssl.SetError(verify_error); - return; - } - - // update states - ssl.useStates().useHandShake() = handShakeReady; - if (ssl.getSecurity().get_parms().entity_ == client_end) - ssl.useStates().useClient() = serverFinishedComplete; - else - ssl.useStates().useServer() = clientFinishedComplete; -} - - -Finished::Finished() -{ - set_length(FINISHED_SZ); -} - - -uint8* Finished::set_md5() -{ - return hashes_.md5_; -} - - -uint8* Finished::set_sha() -{ - return hashes_.sha_; -} - - -input_buffer& Finished::set(input_buffer& in) -{ - return in >> *this; -} - - -output_buffer& Finished::get(output_buffer& out) const -{ - return out << *this; -} - - -HandShakeType Finished::get_type() const -{ - return finished; -} - - -void clean(volatile opaque* p, uint sz, RandomPool& ran) -{ - uint i(0); - - for (i = 0; i < sz; ++i) - p[i] = 0; - - ran.Fill(const_cast(p), sz); - - for (i = 0; i < sz; ++i) - p[i] = 0; -} - - - -Connection::Connection(ProtocolVersion v, RandomPool& ran) - : pre_master_secret_(0), sequence_number_(0), peer_sequence_number_(0), - pre_secret_len_(0), send_server_key_(false), master_clean_(false), - TLS_(v.major_ >= 3 && v.minor_ >= 1), - TLSv1_1_(v.major_ >= 3 && v.minor_ >= 2), compression_(false), - version_(v), random_(ran) -{ - memset(sessionID_, 0, sizeof(sessionID_)); -} - - -Connection::~Connection() -{ - CleanMaster(); CleanPreMaster(); ysArrayDelete(pre_master_secret_); -} - - -void Connection::AllocPreSecret(uint sz) -{ - pre_master_secret_ = NEW_YS opaque[pre_secret_len_ = sz]; -} - - -void Connection::TurnOffTLS() -{ - TLS_ = false; - version_.minor_ = 0; -} - - -void Connection::TurnOffTLS1_1() -{ - TLSv1_1_ = false; - version_.minor_ = 1; -} - - -// wipeout master secret -void Connection::CleanMaster() -{ - if (!master_clean_) { - volatile opaque* p = master_secret_; - clean(p, SECRET_LEN, random_); - master_clean_ = true; - } -} - - -// wipeout pre master secret -void Connection::CleanPreMaster() -{ - if (pre_master_secret_) { - volatile opaque* p = pre_master_secret_; - clean(p, pre_secret_len_, random_); - - ysArrayDelete(pre_master_secret_); - pre_master_secret_ = 0; - } -} - - -// Create functions for message factory -Message* CreateCipherSpec() { return NEW_YS ChangeCipherSpec; } -Message* CreateAlert() { return NEW_YS Alert; } -Message* CreateHandShake() { return NEW_YS HandShakeHeader; } -Message* CreateData() { return NEW_YS Data; } - -// Create functions for handshake factory -HandShakeBase* CreateHelloRequest() { return NEW_YS HelloRequest; } -HandShakeBase* CreateClientHello() { return NEW_YS ClientHello; } -HandShakeBase* CreateServerHello() { return NEW_YS ServerHello; } -HandShakeBase* CreateCertificate() { return NEW_YS Certificate; } -HandShakeBase* CreateServerKeyExchange() { return NEW_YS ServerKeyExchange;} -HandShakeBase* CreateCertificateRequest() { return NEW_YS - CertificateRequest; } -HandShakeBase* CreateServerHelloDone() { return NEW_YS ServerHelloDone; } -HandShakeBase* CreateCertificateVerify() { return NEW_YS CertificateVerify;} -HandShakeBase* CreateClientKeyExchange() { return NEW_YS ClientKeyExchange;} -HandShakeBase* CreateFinished() { return NEW_YS Finished; } - -// Create functions for server key exchange factory -ServerKeyBase* CreateRSAServerKEA() { return NEW_YS RSA_Server; } -ServerKeyBase* CreateDHServerKEA() { return NEW_YS DH_Server; } -ServerKeyBase* CreateFortezzaServerKEA() { return NEW_YS Fortezza_Server; } - -// Create functions for client key exchange factory -ClientKeyBase* CreateRSAClient() { return NEW_YS - EncryptedPreMasterSecret; } -ClientKeyBase* CreateDHClient() { return NEW_YS - ClientDiffieHellmanPublic; } -ClientKeyBase* CreateFortezzaClient() { return NEW_YS FortezzaKeys; } - - -// Constructor calls this to Register compile time callbacks -void InitMessageFactory(MessageFactory& mf) -{ - mf.Reserve(4); - mf.Register(alert, CreateAlert); - mf.Register(change_cipher_spec, CreateCipherSpec); - mf.Register(handshake, CreateHandShake); - mf.Register(application_data, CreateData); -} - - -// Constructor calls this to Register compile time callbacks -void InitHandShakeFactory(HandShakeFactory& hsf) -{ - hsf.Reserve(10); - hsf.Register(hello_request, CreateHelloRequest); - hsf.Register(client_hello, CreateClientHello); - hsf.Register(server_hello, CreateServerHello); - hsf.Register(certificate, CreateCertificate); - hsf.Register(server_key_exchange, CreateServerKeyExchange); - hsf.Register(certificate_request, CreateCertificateRequest); - hsf.Register(server_hello_done, CreateServerHelloDone); - hsf.Register(certificate_verify, CreateCertificateVerify); - hsf.Register(client_key_exchange, CreateClientKeyExchange); - hsf.Register(finished, CreateFinished); -} - - -// Constructor calls this to Register compile time callbacks -void InitServerKeyFactory(ServerKeyFactory& skf) -{ - skf.Reserve(3); - skf.Register(rsa_kea, CreateRSAServerKEA); - skf.Register(diffie_hellman_kea, CreateDHServerKEA); - skf.Register(fortezza_kea, CreateFortezzaServerKEA); -} - - -// Constructor calls this to Register compile time callbacks -void InitClientKeyFactory(ClientKeyFactory& ckf) -{ - ckf.Reserve(3); - ckf.Register(rsa_kea, CreateRSAClient); - ckf.Register(diffie_hellman_kea, CreateDHClient); - ckf.Register(fortezza_kea, CreateFortezzaClient); -} - - -} // namespace diff --git a/externals/mysql/extlib/yassl/src/yassl_int.cpp b/externals/mysql/extlib/yassl/src/yassl_int.cpp deleted file mode 100644 index b7f91d7216..0000000000 --- a/externals/mysql/extlib/yassl/src/yassl_int.cpp +++ /dev/null @@ -1,2580 +0,0 @@ -/* - Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* yaSSL internal source implements SSL supporting types not specified in the - * draft along with type conversion functions. - */ - -#include "runtime.hpp" -#include "yassl_int.hpp" -#include "handshake.hpp" -#include "timer.hpp" - -#ifdef _POSIX_THREADS - #include "pthread.h" -#endif - - -#ifdef HAVE_LIBZ - #include "zlib.h" -#endif - - -#ifdef YASSL_PURE_C - - void* operator new(size_t sz, yaSSL::new_t) - { - void* ptr = malloc(sz ? sz : 1); - if (!ptr) abort(); - - return ptr; - } - - - void operator delete(void* ptr, yaSSL::new_t) - { - if (ptr) free(ptr); - } - - - void* operator new[](size_t sz, yaSSL::new_t nt) - { - return ::operator new(sz, nt); - } - - - void operator delete[](void* ptr, yaSSL::new_t nt) - { - ::operator delete(ptr, nt); - } - - namespace yaSSL { - - new_t ys; // for yaSSL library new - - } - -#endif // YASSL_PURE_C - - -namespace yaSSL { - - - - - - -// convert a 32 bit integer into a 24 bit one -void c32to24(uint32 u32, uint24& u24) -{ - u24[0] = (u32 >> 16) & 0xff; - u24[1] = (u32 >> 8) & 0xff; - u24[2] = u32 & 0xff; -} - - -// convert a 24 bit integer into a 32 bit one -void c24to32(const uint24 u24, uint32& u32) -{ - u32 = 0; - u32 = (u24[0] << 16) | (u24[1] << 8) | u24[2]; -} - - -// convert with return for ease of use -uint32 c24to32(const uint24 u24) -{ - uint32 ret; - c24to32(u24, ret); - - return ret; -} - - -// using a for opaque since underlying type is unsgined char and o is not a -// good leading identifier - -// convert opaque to 16 bit integer -void ato16(const opaque* c, uint16& u16) -{ - u16 = 0; - u16 = (c[0] << 8) | (c[1]); -} - - -// convert (copy) opaque to 24 bit integer -void ato24(const opaque* c, uint24& u24) -{ - u24[0] = c[0]; - u24[1] = c[1]; - u24[2] = c[2]; -} - - -// convert 16 bit integer to opaque -void c16toa(uint16 u16, opaque* c) -{ - c[0] = (u16 >> 8) & 0xff; - c[1] = u16 & 0xff; -} - - -// convert 24 bit integer to opaque -void c24toa(const uint24 u24, opaque* c) -{ - c[0] = u24[0]; - c[1] = u24[1]; - c[2] = u24[2]; -} - - -// convert 32 bit integer to opaque -void c32toa(uint32 u32, opaque* c) -{ - c[0] = (u32 >> 24) & 0xff; - c[1] = (u32 >> 16) & 0xff; - c[2] = (u32 >> 8) & 0xff; - c[3] = u32 & 0xff; -} - - -States::States() : recordLayer_(recordReady), handshakeLayer_(preHandshake), - clientState_(serverNull), serverState_(clientNull), - connectState_(CONNECT_BEGIN), acceptState_(ACCEPT_BEGIN), - what_(no_error) {} - -const RecordLayerState& States::getRecord() const -{ - return recordLayer_; -} - - -const HandShakeState& States::getHandShake() const -{ - return handshakeLayer_; -} - - -const ClientState& States::getClient() const -{ - return clientState_; -} - - -const ServerState& States::getServer() const -{ - return serverState_; -} - - -const ConnectState& States::GetConnect() const -{ - return connectState_; -} - - -const AcceptState& States::GetAccept() const -{ - return acceptState_; -} - - -const char* States::getString() const -{ - return errorString_; -} - - -YasslError States::What() const -{ - return what_; -} - - -RecordLayerState& States::useRecord() -{ - return recordLayer_; -} - - -HandShakeState& States::useHandShake() -{ - return handshakeLayer_; -} - - -ClientState& States::useClient() -{ - return clientState_; -} - - -ServerState& States::useServer() -{ - return serverState_; -} - - -ConnectState& States::UseConnect() -{ - return connectState_; -} - - -AcceptState& States::UseAccept() -{ - return acceptState_; -} - - -char* States::useString() -{ - return errorString_; -} - - -void States::SetError(YasslError ye) -{ - what_ = ye; -} - - -sslFactory::sslFactory() : - messageFactory_(InitMessageFactory), - handShakeFactory_(InitHandShakeFactory), - serverKeyFactory_(InitServerKeyFactory), - clientKeyFactory_(InitClientKeyFactory) -{} - - -const MessageFactory& sslFactory::getMessage() const -{ - return messageFactory_; -} - - -const HandShakeFactory& sslFactory::getHandShake() const -{ - return handShakeFactory_; -} - - -const ServerKeyFactory& sslFactory::getServerKey() const -{ - return serverKeyFactory_; -} - - -const ClientKeyFactory& sslFactory::getClientKey() const -{ - return clientKeyFactory_; -} - - -// extract context parameters and store -SSL::SSL(SSL_CTX* ctx) - : secure_(ctx->getMethod()->getVersion(), crypto_.use_random(), - ctx->getMethod()->getSide(), ctx->GetCiphers(), ctx, - ctx->GetDH_Parms().set_), quietShutdown_(false), has_data_(false) -{ - if (int err = crypto_.get_random().GetError()) { - SetError(YasslError(err)); - return; - } - - CertManager& cm = crypto_.use_certManager(); - cm.CopySelfCert(ctx->getCert()); - - bool serverSide = secure_.use_parms().entity_ == server_end; - - if (ctx->getKey()) { - if (int err = cm.SetPrivateKey(*ctx->getKey())) { - SetError(YasslError(err)); - return; - } - else if (serverSide) { - // remove RSA or DSA suites depending on cert key type - ProtocolVersion pv = secure_.get_connection().version_; - - bool removeDH = secure_.use_parms().removeDH_; - bool removeRSA = false; - bool removeDSA = false; - - if (cm.get_keyType() == rsa_sa_algo) - removeDSA = true; - else - removeRSA = true; - secure_.use_parms().SetSuites(pv, removeDH, removeRSA, removeDSA); - } - } - else if (serverSide) { - SetError(no_key_file); - return; - } - - if (ctx->getMethod()->verifyPeer()) - cm.setVerifyPeer(); - if (ctx->getMethod()->verifyNone()) - cm.setVerifyNone(); - if (ctx->getMethod()->failNoCert()) - cm.setFailNoCert(); - cm.setVerifyCallback(ctx->getVerifyCallback()); - - if (serverSide) - crypto_.SetDH(ctx->GetDH_Parms()); - - const SSL_CTX::CertList& ca = ctx->GetCA_List(); - SSL_CTX::CertList::const_iterator first(ca.begin()); - SSL_CTX::CertList::const_iterator last(ca.end()); - - while (first != last) { - if (int err = cm.CopyCaCert(*first)) { - SetError(YasslError(err)); - return; - } - ++first; - } -} - - -// store pending security parameters from Server Hello -void SSL::set_pending(Cipher suite) -{ - Parameters& parms = secure_.use_parms(); - - switch (suite) { - - case TLS_RSA_WITH_AES_256_CBC_SHA: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = sha; - parms.kea_ = rsa_kea; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = AES_256_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ)); - strncpy(parms.cipher_name_, cipher_names[TLS_RSA_WITH_AES_256_CBC_SHA], - MAX_SUITE_NAME); - break; - - case TLS_RSA_WITH_AES_128_CBC_SHA: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = sha; - parms.kea_ = rsa_kea; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = AES_128_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS AES); - strncpy(parms.cipher_name_, cipher_names[TLS_RSA_WITH_AES_128_CBC_SHA], - MAX_SUITE_NAME); - break; - - case SSL_RSA_WITH_3DES_EDE_CBC_SHA: - parms.bulk_cipher_algorithm_ = triple_des; - parms.mac_algorithm_ = sha; - parms.kea_ = rsa_kea; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = DES_EDE_KEY_SZ; - parms.iv_size_ = DES_IV_SZ; - parms.cipher_type_ = block; - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS DES_EDE); - strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_3DES_EDE_CBC_SHA] - , MAX_SUITE_NAME); - break; - - case SSL_RSA_WITH_DES_CBC_SHA: - parms.bulk_cipher_algorithm_ = des; - parms.mac_algorithm_ = sha; - parms.kea_ = rsa_kea; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = DES_KEY_SZ; - parms.iv_size_ = DES_IV_SZ; - parms.cipher_type_ = block; - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS DES); - strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_DES_CBC_SHA], - MAX_SUITE_NAME); - break; - - case SSL_RSA_WITH_RC4_128_SHA: - parms.bulk_cipher_algorithm_ = rc4; - parms.mac_algorithm_ = sha; - parms.kea_ = rsa_kea; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = RC4_KEY_SZ; - parms.iv_size_ = 0; - parms.cipher_type_ = stream; - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS RC4); - strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_RC4_128_SHA], - MAX_SUITE_NAME); - break; - - case SSL_RSA_WITH_RC4_128_MD5: - parms.bulk_cipher_algorithm_ = rc4; - parms.mac_algorithm_ = md5; - parms.kea_ = rsa_kea; - parms.hash_size_ = MD5_LEN; - parms.key_size_ = RC4_KEY_SZ; - parms.iv_size_ = 0; - parms.cipher_type_ = stream; - crypto_.setDigest(NEW_YS MD5); - crypto_.setCipher(NEW_YS RC4); - strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_RC4_128_MD5], - MAX_SUITE_NAME); - break; - - case SSL_DHE_RSA_WITH_DES_CBC_SHA: - parms.bulk_cipher_algorithm_ = des; - parms.mac_algorithm_ = sha; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = rsa_sa_algo; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = DES_KEY_SZ; - parms.iv_size_ = DES_IV_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS DES); - strncpy(parms.cipher_name_, cipher_names[SSL_DHE_RSA_WITH_DES_CBC_SHA], - MAX_SUITE_NAME); - break; - - case SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA: - parms.bulk_cipher_algorithm_ = triple_des; - parms.mac_algorithm_ = sha; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = rsa_sa_algo; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = DES_EDE_KEY_SZ; - parms.iv_size_ = DES_IV_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS DES_EDE); - strncpy(parms.cipher_name_, - cipher_names[SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA], MAX_SUITE_NAME); - break; - - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = sha; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = rsa_sa_algo; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = AES_256_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ)); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_RSA_WITH_AES_256_CBC_SHA], MAX_SUITE_NAME); - break; - - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = sha; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = rsa_sa_algo; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = AES_128_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS AES); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_RSA_WITH_AES_128_CBC_SHA], MAX_SUITE_NAME); - break; - - case SSL_DHE_DSS_WITH_DES_CBC_SHA: - parms.bulk_cipher_algorithm_ = des; - parms.mac_algorithm_ = sha; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = dsa_sa_algo; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = DES_KEY_SZ; - parms.iv_size_ = DES_IV_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS DES); - strncpy(parms.cipher_name_, cipher_names[SSL_DHE_DSS_WITH_DES_CBC_SHA], - MAX_SUITE_NAME); - break; - - case SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA: - parms.bulk_cipher_algorithm_ = triple_des; - parms.mac_algorithm_ = sha; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = dsa_sa_algo; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = DES_EDE_KEY_SZ; - parms.iv_size_ = DES_IV_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS DES_EDE); - strncpy(parms.cipher_name_, - cipher_names[SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA], MAX_SUITE_NAME); - break; - - case TLS_DHE_DSS_WITH_AES_256_CBC_SHA: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = sha; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = dsa_sa_algo; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = AES_256_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ)); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_DSS_WITH_AES_256_CBC_SHA], MAX_SUITE_NAME); - break; - - case TLS_DHE_DSS_WITH_AES_128_CBC_SHA: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = sha; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = dsa_sa_algo; - parms.hash_size_ = SHA_LEN; - parms.key_size_ = AES_128_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS SHA); - crypto_.setCipher(NEW_YS AES); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_DSS_WITH_AES_128_CBC_SHA], MAX_SUITE_NAME); - break; - - case TLS_RSA_WITH_AES_256_CBC_RMD160: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = rmd; - parms.kea_ = rsa_kea; - parms.hash_size_ = RMD_LEN; - parms.key_size_ = AES_256_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - crypto_.setDigest(NEW_YS RMD); - crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ)); - strncpy(parms.cipher_name_, - cipher_names[TLS_RSA_WITH_AES_256_CBC_RMD160], MAX_SUITE_NAME); - break; - - case TLS_RSA_WITH_AES_128_CBC_RMD160: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = rmd; - parms.kea_ = rsa_kea; - parms.hash_size_ = RMD_LEN; - parms.key_size_ = AES_128_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - crypto_.setDigest(NEW_YS RMD); - crypto_.setCipher(NEW_YS AES); - strncpy(parms.cipher_name_, - cipher_names[TLS_RSA_WITH_AES_128_CBC_RMD160], MAX_SUITE_NAME); - break; - - case TLS_RSA_WITH_3DES_EDE_CBC_RMD160: - parms.bulk_cipher_algorithm_ = triple_des; - parms.mac_algorithm_ = rmd; - parms.kea_ = rsa_kea; - parms.hash_size_ = RMD_LEN; - parms.key_size_ = DES_EDE_KEY_SZ; - parms.iv_size_ = DES_IV_SZ; - parms.cipher_type_ = block; - crypto_.setDigest(NEW_YS RMD); - crypto_.setCipher(NEW_YS DES_EDE); - strncpy(parms.cipher_name_, - cipher_names[TLS_RSA_WITH_3DES_EDE_CBC_RMD160], MAX_SUITE_NAME); - break; - - case TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160: - parms.bulk_cipher_algorithm_ = triple_des; - parms.mac_algorithm_ = rmd; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = rsa_sa_algo; - parms.hash_size_ = RMD_LEN; - parms.key_size_ = DES_EDE_KEY_SZ; - parms.iv_size_ = DES_IV_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS RMD); - crypto_.setCipher(NEW_YS DES_EDE); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160], - MAX_SUITE_NAME); - break; - - case TLS_DHE_RSA_WITH_AES_256_CBC_RMD160: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = rmd; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = rsa_sa_algo; - parms.hash_size_ = RMD_LEN; - parms.key_size_ = AES_256_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS RMD); - crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ)); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_RSA_WITH_AES_256_CBC_RMD160], - MAX_SUITE_NAME); - break; - - case TLS_DHE_RSA_WITH_AES_128_CBC_RMD160: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = rmd; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = rsa_sa_algo; - parms.hash_size_ = RMD_LEN; - parms.key_size_ = AES_128_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS RMD); - crypto_.setCipher(NEW_YS AES); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_RSA_WITH_AES_128_CBC_RMD160], - MAX_SUITE_NAME); - break; - - case TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160: - parms.bulk_cipher_algorithm_ = triple_des; - parms.mac_algorithm_ = rmd; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = dsa_sa_algo; - parms.hash_size_ = RMD_LEN; - parms.key_size_ = DES_EDE_KEY_SZ; - parms.iv_size_ = DES_IV_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS RMD); - crypto_.setCipher(NEW_YS DES_EDE); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160], - MAX_SUITE_NAME); - break; - - case TLS_DHE_DSS_WITH_AES_256_CBC_RMD160: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = rmd; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = dsa_sa_algo; - parms.hash_size_ = RMD_LEN; - parms.key_size_ = AES_256_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS RMD); - crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ)); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_DSS_WITH_AES_256_CBC_RMD160], - MAX_SUITE_NAME); - break; - - case TLS_DHE_DSS_WITH_AES_128_CBC_RMD160: - parms.bulk_cipher_algorithm_ = aes; - parms.mac_algorithm_ = rmd; - parms.kea_ = diffie_hellman_kea; - parms.sig_algo_ = dsa_sa_algo; - parms.hash_size_ = RMD_LEN; - parms.key_size_ = AES_128_KEY_SZ; - parms.iv_size_ = AES_BLOCK_SZ; - parms.cipher_type_ = block; - secure_.use_connection().send_server_key_ = true; // eph - crypto_.setDigest(NEW_YS RMD); - crypto_.setCipher(NEW_YS AES); - strncpy(parms.cipher_name_, - cipher_names[TLS_DHE_DSS_WITH_AES_128_CBC_RMD160], - MAX_SUITE_NAME); - break; - - default: - SetError(unknown_cipher); - } -} - - -// store peer's random -void SSL::set_random(const opaque* random, ConnectionEnd sender) -{ - if (sender == client_end) - memcpy(secure_.use_connection().client_random_, random, RAN_LEN); - else - memcpy(secure_.use_connection().server_random_, random, RAN_LEN); -} - - -// store client pre master secret -void SSL::set_preMaster(const opaque* pre, uint sz) -{ - secure_.use_connection().AllocPreSecret(sz); - memcpy(secure_.use_connection().pre_master_secret_, pre, sz); -} - - -// set yaSSL zlib type compression -int SSL::SetCompression() -{ -#ifdef HAVE_LIBZ - secure_.use_connection().compression_ = true; - return 0; -#else - return -1; // not built in -#endif -} - - -// unset yaSSL zlib type compression -void SSL::UnSetCompression() -{ - secure_.use_connection().compression_ = false; -} - - -// is yaSSL zlib compression on -bool SSL::CompressionOn() const -{ - return secure_.get_connection().compression_; -} - - -// store master secret -void SSL::set_masterSecret(const opaque* sec) -{ - memcpy(secure_.use_connection().master_secret_, sec, SECRET_LEN); -} - -// store server issued id -void SSL::set_sessionID(const opaque* sessionID) -{ - memcpy(secure_.use_connection().sessionID_, sessionID, ID_LEN); - secure_.use_connection().sessionID_Set_ = true; -} - - -// store error -void SSL::SetError(YasslError ye) -{ - states_.SetError(ye); - //strncpy(states_.useString(), e.what(), mySTL::named_exception::NAME_SIZE); - // TODO: add string here -} - - -// set the quiet shutdown mode (close_nofiy not sent or received on shutdown) -void SSL::SetQuietShutdown(bool mode) -{ - quietShutdown_ = mode; -} - - -Buffers& SSL::useBuffers() -{ - return buffers_; -} - - -// locals -namespace { - -// DeriveKeys and MasterSecret helper sets prefix letters -static bool setPrefix(opaque* sha_input, int i) -{ - switch (i) { - case 0: - memcpy(sha_input, "A", 1); - break; - case 1: - memcpy(sha_input, "BB", 2); - break; - case 2: - memcpy(sha_input, "CCC", 3); - break; - case 3: - memcpy(sha_input, "DDDD", 4); - break; - case 4: - memcpy(sha_input, "EEEEE", 5); - break; - case 5: - memcpy(sha_input, "FFFFFF", 6); - break; - case 6: - memcpy(sha_input, "GGGGGGG", 7); - break; - default: - return false; // prefix_error - } - return true; -} - - -const char handshake_order[] = "Out of order HandShake Message!"; - - -} // namespcae for locals - - -void SSL::order_error() -{ - SetError(out_of_order); -} - - -// Create and store the master secret see page 32, 6.1 -void SSL::makeMasterSecret() -{ - if (isTLS()) - makeTLSMasterSecret(); - else { - opaque sha_output[SHA_LEN]; - - const uint& preSz = secure_.get_connection().pre_secret_len_; - output_buffer md5_input(preSz + SHA_LEN); - output_buffer sha_input(PREFIX + preSz + 2 * RAN_LEN); - - MD5 md5; - SHA sha; - - md5_input.write(secure_.get_connection().pre_master_secret_, preSz); - - for (int i = 0; i < MASTER_ROUNDS; ++i) { - opaque prefix[PREFIX]; - if (!setPrefix(prefix, i)) { - SetError(prefix_error); - return; - } - - sha_input.set_current(0); - sha_input.write(prefix, i + 1); - - sha_input.write(secure_.get_connection().pre_master_secret_,preSz); - sha_input.write(secure_.get_connection().client_random_, RAN_LEN); - sha_input.write(secure_.get_connection().server_random_, RAN_LEN); - sha.get_digest(sha_output, sha_input.get_buffer(), - sha_input.get_size()); - - md5_input.set_current(preSz); - md5_input.write(sha_output, SHA_LEN); - md5.get_digest(&secure_.use_connection().master_secret_[i*MD5_LEN], - md5_input.get_buffer(), md5_input.get_size()); - } - deriveKeys(); - } - secure_.use_connection().CleanPreMaster(); -} - - -// create TLSv1 master secret -void SSL::makeTLSMasterSecret() -{ - opaque seed[SEED_LEN]; - - memcpy(seed, secure_.get_connection().client_random_, RAN_LEN); - memcpy(&seed[RAN_LEN], secure_.get_connection().server_random_, RAN_LEN); - - PRF(secure_.use_connection().master_secret_, SECRET_LEN, - secure_.get_connection().pre_master_secret_, - secure_.get_connection().pre_secret_len_, - master_label, MASTER_LABEL_SZ, - seed, SEED_LEN); - - deriveTLSKeys(); -} - - -// derive mac, write, and iv keys for server and client, see page 34, 6.2.2 -void SSL::deriveKeys() -{ - int length = 2 * secure_.get_parms().hash_size_ + - 2 * secure_.get_parms().key_size_ + - 2 * secure_.get_parms().iv_size_; - int rounds = (length + MD5_LEN - 1 ) / MD5_LEN; - input_buffer key_data(rounds * MD5_LEN); - - opaque sha_output[SHA_LEN]; - opaque md5_input[SECRET_LEN + SHA_LEN]; - opaque sha_input[KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN]; - - MD5 md5; - SHA sha; - - memcpy(md5_input, secure_.get_connection().master_secret_, SECRET_LEN); - - for (int i = 0; i < rounds; ++i) { - int j = i + 1; - if (!setPrefix(sha_input, i)) { - SetError(prefix_error); - return; - } - - memcpy(&sha_input[j], secure_.get_connection().master_secret_, - SECRET_LEN); - memcpy(&sha_input[j+SECRET_LEN], - secure_.get_connection().server_random_, RAN_LEN); - memcpy(&sha_input[j + SECRET_LEN + RAN_LEN], - secure_.get_connection().client_random_, RAN_LEN); - sha.get_digest(sha_output, sha_input, - sizeof(sha_input) - KEY_PREFIX + j); - - memcpy(&md5_input[SECRET_LEN], sha_output, SHA_LEN); - md5.get_digest(key_data.get_buffer() + i * MD5_LEN, - md5_input, sizeof(md5_input)); - } - storeKeys(key_data.get_buffer()); -} - - -// derive mac, write, and iv keys for server and client -void SSL::deriveTLSKeys() -{ - int length = 2 * secure_.get_parms().hash_size_ + - 2 * secure_.get_parms().key_size_ + - 2 * secure_.get_parms().iv_size_; - opaque seed[SEED_LEN]; - input_buffer key_data(length); - - memcpy(seed, secure_.get_connection().server_random_, RAN_LEN); - memcpy(&seed[RAN_LEN], secure_.get_connection().client_random_, RAN_LEN); - - PRF(key_data.get_buffer(), length, secure_.get_connection().master_secret_, - SECRET_LEN, key_label, KEY_LABEL_SZ, seed, SEED_LEN); - - storeKeys(key_data.get_buffer()); -} - - -// store mac, write, and iv keys for client and server -void SSL::storeKeys(const opaque* key_data) -{ - int sz = secure_.get_parms().hash_size_; - memcpy(secure_.use_connection().client_write_MAC_secret_, key_data, sz); - int i = sz; - memcpy(secure_.use_connection().server_write_MAC_secret_,&key_data[i], sz); - i += sz; - - sz = secure_.get_parms().key_size_; - memcpy(secure_.use_connection().client_write_key_, &key_data[i], sz); - i += sz; - memcpy(secure_.use_connection().server_write_key_, &key_data[i], sz); - i += sz; - - sz = secure_.get_parms().iv_size_; - memcpy(secure_.use_connection().client_write_IV_, &key_data[i], sz); - i += sz; - memcpy(secure_.use_connection().server_write_IV_, &key_data[i], sz); - - setKeys(); -} - - -// set encrypt/decrypt keys and ivs -void SSL::setKeys() -{ - Connection& conn = secure_.use_connection(); - - if (secure_.get_parms().entity_ == client_end) { - crypto_.use_cipher().set_encryptKey(conn.client_write_key_, - conn.client_write_IV_); - crypto_.use_cipher().set_decryptKey(conn.server_write_key_, - conn.server_write_IV_); - } - else { - crypto_.use_cipher().set_encryptKey(conn.server_write_key_, - conn.server_write_IV_); - crypto_.use_cipher().set_decryptKey(conn.client_write_key_, - conn.client_write_IV_); - } -} - - - -// local functors -namespace yassl_int_cpp_local1 { // for explicit templates - -struct SumData { - uint total_; - SumData() : total_(0) {} - void operator()(input_buffer* data) { total_ += data->get_remaining(); } -}; - - -struct SumBuffer { - uint total_; - SumBuffer() : total_(0) {} - void operator()(output_buffer* buffer) { total_ += buffer->get_size(); } -}; - -} // namespace for locals -using namespace yassl_int_cpp_local1; - - -uint SSL::bufferedData() -{ - return STL::for_each(buffers_.getData().begin(),buffers_.getData().end(), - SumData()).total_; -} - - -// use input buffer to fill data -void SSL::fillData(Data& data) -{ - if (GetError()) return; - uint dataSz = data.get_length(); // input, data size to fill - size_t elements = buffers_.getData().size(); - - data.set_length(0); // output, actual data filled - dataSz = min(dataSz, bufferedData()); - - for (size_t i = 0; i < elements; i++) { - input_buffer* front = buffers_.getData().front(); - uint frontSz = front->get_remaining(); - uint readSz = min(dataSz - data.get_length(), frontSz); - - front->read(data.set_buffer() + data.get_length(), readSz); - data.set_length(data.get_length() + readSz); - - if (readSz == frontSz) { - buffers_.useData().pop_front(); - ysDelete(front); - } - if (data.get_length() == dataSz) - break; - } - - if (buffers_.getData().size() == 0) has_data_ = false; // none left -} - - -// like Fill but keep data in buffer -void SSL::PeekData(Data& data) -{ - if (GetError()) return; - uint dataSz = data.get_length(); // input, data size to fill - size_t elements = buffers_.getData().size(); - - data.set_length(0); // output, actual data filled - dataSz = min(dataSz, bufferedData()); - - Buffers::inputList::iterator front = buffers_.useData().begin(); - - while (elements) { - uint frontSz = (*front)->get_remaining(); - uint readSz = min(dataSz - data.get_length(), frontSz); - uint before = (*front)->get_current(); - - (*front)->read(data.set_buffer() + data.get_length(), readSz); - data.set_length(data.get_length() + readSz); - (*front)->set_current(before); - - if (data.get_length() == dataSz) - break; - - elements--; - front++; - } -} - - -// flush output buffer -void SSL::flushBuffer() -{ - if (GetError()) return; - - uint sz = STL::for_each(buffers_.getHandShake().begin(), - buffers_.getHandShake().end(), - SumBuffer()).total_; - output_buffer out(sz); - size_t elements = buffers_.getHandShake().size(); - - for (size_t i = 0; i < elements; i++) { - output_buffer* front = buffers_.getHandShake().front(); - out.write(front->get_buffer(), front->get_size()); - - buffers_.useHandShake().pop_front(); - ysDelete(front); - } - Send(out.get_buffer(), out.get_size()); -} - - -void SSL::Send(const byte* buffer, uint sz) -{ - if (socket_.send(buffer, sz) != sz) - SetError(send_error); -} - - -// get sequence number, if verify get peer's -uint SSL::get_SEQIncrement(bool verify) -{ - if (verify) - return secure_.use_connection().peer_sequence_number_++; - else - return secure_.use_connection().sequence_number_++; -} - - -const byte* SSL::get_macSecret(bool verify) -{ - if ( (secure_.get_parms().entity_ == client_end && !verify) || - (secure_.get_parms().entity_ == server_end && verify) ) - return secure_.get_connection().client_write_MAC_secret_; - else - return secure_.get_connection().server_write_MAC_secret_; -} - - -void SSL::verifyState(const RecordLayerHeader& rlHeader) -{ - if (GetError()) return; - - if (rlHeader.version_.major_ != 3 || rlHeader.version_.minor_ > 2) { - SetError(badVersion_error); - return; - } - - if (states_.getRecord() == recordNotReady || - (rlHeader.type_ == application_data && // data and handshake - states_.getHandShake() != handShakeReady) ) // isn't complete yet - SetError(record_layer); -} - - -void SSL::verifyState(const HandShakeHeader& hsHeader) -{ - if (GetError()) return; - - if (states_.getHandShake() == handShakeNotReady) { - SetError(handshake_layer); - return; - } - - if (secure_.get_parms().entity_ == client_end) - verifyClientState(hsHeader.get_handshakeType()); - else - verifyServerState(hsHeader.get_handshakeType()); -} - - -void SSL::verifyState(ClientState cs) -{ - if (GetError()) return; - if (states_.getClient() != cs) order_error(); -} - - -void SSL::verifyState(ServerState ss) -{ - if (GetError()) return; - if (states_.getServer() != ss) order_error(); -} - - -void SSL::verfiyHandShakeComplete() -{ - if (GetError()) return; - if (states_.getHandShake() != handShakeReady) order_error(); -} - - -void SSL::verifyClientState(HandShakeType hsType) -{ - if (GetError()) return; - - switch(hsType) { - case server_hello : - if (states_.getClient() != serverNull) - order_error(); - break; - case certificate : - if (states_.getClient() != serverHelloComplete) - order_error(); - break; - case server_key_exchange : - if (states_.getClient() != serverCertComplete) - order_error(); - break; - case certificate_request : - if (states_.getClient() != serverCertComplete && - states_.getClient() != serverKeyExchangeComplete) - order_error(); - break; - case server_hello_done : - if (states_.getClient() != serverCertComplete && - states_.getClient() != serverKeyExchangeComplete) - order_error(); - break; - case finished : - if (states_.getClient() != serverHelloDoneComplete || - secure_.get_parms().pending_) // no change - order_error(); // cipher yet - break; - default : - order_error(); - }; -} - - -void SSL::verifyServerState(HandShakeType hsType) -{ - if (GetError()) return; - - switch(hsType) { - case client_hello : - if (states_.getServer() != clientNull) - order_error(); - break; - case certificate : - if (states_.getServer() != clientHelloComplete) - order_error(); - break; - case client_key_exchange : - if (states_.getServer() != clientHelloComplete) - order_error(); - break; - case certificate_verify : - if (states_.getServer() != clientKeyExchangeComplete) - order_error(); - break; - case finished : - if (states_.getServer() != clientKeyExchangeComplete || - secure_.get_parms().pending_) // no change - order_error(); // cipher yet - break; - default : - order_error(); - }; -} - - -// try to find a suite match -void SSL::matchSuite(const opaque* peer, uint length) -{ - if (length == 0 || (length % 2) != 0) { - SetError(bad_input); - return; - } - - // start with best, if a match we are good, Ciphers are at odd index - // since all SSL and TLS ciphers have 0x00 first byte - for (uint i = 1; i < secure_.get_parms().suites_size_; i += 2) - for (uint j = 1; j < length; j+= 2) - if (secure_.use_parms().suites_[i] == peer[j]) { - secure_.use_parms().suite_[0] = 0x00; - secure_.use_parms().suite_[1] = peer[j]; - - return; - } - - SetError(match_error); -} - - -void SSL::set_session(SSL_SESSION* s) -{ - if (getSecurity().GetContext()->GetSessionCacheOff()) - return; - - if (s && GetSessions().lookup(s->GetID(), &secure_.use_resume())) { - secure_.set_resuming(true); - crypto_.use_certManager().setPeerX509(s->GetPeerX509()); - } -} - - -const Crypto& SSL::getCrypto() const -{ - return crypto_; -} - - -const Security& SSL::getSecurity() const -{ - return secure_; -} - - -const States& SSL::getStates() const -{ - return states_; -} - - -const sslHashes& SSL::getHashes() const -{ - return hashes_; -} - - -const sslFactory& SSL::getFactory() const -{ - return GetSSL_Factory(); -} - - -const Socket& SSL::getSocket() const -{ - return socket_; -} - - -YasslError SSL::GetError() const -{ - return states_.What(); -} - - -bool SSL::GetQuietShutdown() const -{ - return quietShutdown_; -} - - -bool SSL::GetMultiProtocol() const -{ - return secure_.GetContext()->getMethod()->multipleProtocol(); -} - - -Crypto& SSL::useCrypto() -{ - return crypto_; -} - - -Security& SSL::useSecurity() -{ - return secure_; -} - - -States& SSL::useStates() -{ - return states_; -} - - -sslHashes& SSL::useHashes() -{ - return hashes_; -} - - -Socket& SSL::useSocket() -{ - return socket_; -} - - -Log& SSL::useLog() -{ - return log_; -} - - -bool SSL::isTLS() const -{ - return secure_.get_connection().TLS_; -} - - -bool SSL::isTLSv1_1() const -{ - return secure_.get_connection().TLSv1_1_; -} - - -// is there buffered data available, optimization to remove iteration on buffer -bool SSL::HasData() const -{ - return has_data_; -} - - -void SSL::addData(input_buffer* data) -{ - buffers_.useData().push_back(data); - if (!has_data_) has_data_ = true; -} - - -void SSL::addBuffer(output_buffer* b) -{ - buffers_.useHandShake().push_back(b); -} - - -void SSL_SESSION::CopyX509(X509* x) -{ - assert(peerX509_ == 0); - if (x == 0) return; - - X509_NAME* issuer = x->GetIssuer(); - X509_NAME* subject = x->GetSubject(); - ASN1_STRING* before = x->GetBefore(); - ASN1_STRING* after = x->GetAfter(); - - peerX509_ = NEW_YS X509(issuer->GetName(), issuer->GetLength(), - subject->GetName(), subject->GetLength(), (const char*) before->data, - before->length, (const char*) after->data, after->length); -} - - -// store connection parameters -SSL_SESSION::SSL_SESSION(const SSL& ssl, RandomPool& ran) - : timeout_(DEFAULT_TIMEOUT), random_(ran), peerX509_(0) -{ - const Connection& conn = ssl.getSecurity().get_connection(); - - memcpy(sessionID_, conn.sessionID_, ID_LEN); - memcpy(master_secret_, conn.master_secret_, SECRET_LEN); - memcpy(suite_, ssl.getSecurity().get_parms().suite_, SUITE_LEN); - - bornOn_ = lowResTimer(); - - CopyX509(ssl.getCrypto().get_certManager().get_peerX509()); -} - - -// for resumption copy in ssl::parameters -SSL_SESSION::SSL_SESSION(RandomPool& ran) - : bornOn_(0), timeout_(0), random_(ran), peerX509_(0) -{ - memset(sessionID_, 0, ID_LEN); - memset(master_secret_, 0, SECRET_LEN); - memset(suite_, 0, SUITE_LEN); -} - - -SSL_SESSION& SSL_SESSION::operator=(const SSL_SESSION& that) -{ - memcpy(sessionID_, that.sessionID_, ID_LEN); - memcpy(master_secret_, that.master_secret_, SECRET_LEN); - memcpy(suite_, that.suite_, SUITE_LEN); - - bornOn_ = that.bornOn_; - timeout_ = that.timeout_; - - if (peerX509_) { - ysDelete(peerX509_); - peerX509_ = 0; - } - CopyX509(that.peerX509_); - - return *this; -} - - -const opaque* SSL_SESSION::GetID() const -{ - return sessionID_; -} - - -const opaque* SSL_SESSION::GetSecret() const -{ - return master_secret_; -} - - -const Cipher* SSL_SESSION::GetSuite() const -{ - return suite_; -} - - -X509* SSL_SESSION::GetPeerX509() const -{ - return peerX509_; -} - - -uint SSL_SESSION::GetBornOn() const -{ - return bornOn_; -} - - -uint SSL_SESSION::GetTimeOut() const -{ - return timeout_; -} - - -void SSL_SESSION::SetTimeOut(uint t) -{ - timeout_ = t; -} - - -extern void clean(volatile opaque*, uint, RandomPool&); - - -// clean up secret data -SSL_SESSION::~SSL_SESSION() -{ - volatile opaque* p = master_secret_; - clean(p, SECRET_LEN, random_); - - ysDelete(peerX509_); -} - - -static Sessions* sessionsInstance = 0; - -Sessions& GetSessions() -{ - if (!sessionsInstance) - sessionsInstance = NEW_YS Sessions; - return *sessionsInstance; -} - - -static sslFactory* sslFactoryInstance = 0; - -sslFactory& GetSSL_Factory() -{ - if (!sslFactoryInstance) - sslFactoryInstance = NEW_YS sslFactory; - return *sslFactoryInstance; -} - - -static Errors* errorsInstance = 0; - -Errors& GetErrors() -{ - if (!errorsInstance) - errorsInstance = NEW_YS Errors; - return *errorsInstance; -} - - -typedef Mutex::Lock Lock; - - - -void Sessions::add(const SSL& ssl) -{ - if (ssl.getSecurity().get_connection().sessionID_Set_) { - Lock guard(mutex_); - list_.push_back(NEW_YS SSL_SESSION(ssl, random_)); - count_++; - } - - if (count_ > SESSION_FLUSH_COUNT) - if (!ssl.getSecurity().GetContext()->GetSessionCacheFlushOff()) - Flush(); -} - - -Sessions::~Sessions() -{ - STL::for_each(list_.begin(), list_.end(), del_ptr_zero()); -} - - -// locals -namespace yassl_int_cpp_local2 { // for explicit templates - -typedef STL::list::iterator sess_iterator; -typedef STL::list::iterator thr_iterator; - -struct sess_match { - const opaque* id_; - explicit sess_match(const opaque* p) : id_(p) {} - - bool operator()(SSL_SESSION* sess) - { - if ( memcmp(sess->GetID(), id_, ID_LEN) == 0) - return true; - return false; - } -}; - - -THREAD_ID_T GetSelf() -{ -#ifndef _POSIX_THREADS - return GetCurrentThreadId(); -#else - return pthread_self(); -#endif -} - -struct thr_match { - THREAD_ID_T id_; - explicit thr_match() : id_(GetSelf()) {} - - bool operator()(ThreadError thr) - { - if (thr.threadID_ == id_) - return true; - return false; - } -}; - - -} // local namespace -using namespace yassl_int_cpp_local2; - - -// lookup session by id, return a copy if space provided -SSL_SESSION* Sessions::lookup(const opaque* id, SSL_SESSION* copy) -{ - Lock guard(mutex_); - sess_iterator find = STL::find_if(list_.begin(), list_.end(), - sess_match(id)); - if (find != list_.end()) { - uint current = lowResTimer(); - if ( ((*find)->GetBornOn() + (*find)->GetTimeOut()) < current) { - del_ptr_zero()(*find); - list_.erase(find); - return 0; - } - if (copy) - *copy = *(*find); - return *find; - } - return 0; -} - - -// remove a session by id -void Sessions::remove(const opaque* id) -{ - Lock guard(mutex_); - sess_iterator find = STL::find_if(list_.begin(), list_.end(), - sess_match(id)); - if (find != list_.end()) { - del_ptr_zero()(*find); - list_.erase(find); - } -} - - -// flush expired sessions from cache -void Sessions::Flush() -{ - Lock guard(mutex_); - sess_iterator next = list_.begin(); - uint current = lowResTimer(); - - while (next != list_.end()) { - sess_iterator si = next; - ++next; - if ( ((*si)->GetBornOn() + (*si)->GetTimeOut()) < current) { - del_ptr_zero()(*si); - list_.erase(si); - } - } - count_ = 0; // reset flush counter -} - - -// remove a self thread error -void Errors::Remove() -{ - Lock guard(mutex_); - thr_iterator find = STL::find_if(list_.begin(), list_.end(), - thr_match()); - if (find != list_.end()) - list_.erase(find); -} - - -// lookup self error code -int Errors::Lookup(bool peek) -{ - Lock guard(mutex_); - thr_iterator find = STL::find_if(list_.begin(), list_.end(), - thr_match()); - if (find != list_.end()) { - int ret = find->errorID_; - if (!peek) - list_.erase(find); - return ret; - } - else - return 0; -} - - -// add a new error code for self -void Errors::Add(int error) -{ - ThreadError add; - add.errorID_ = error; - add.threadID_ = GetSelf(); - - Remove(); // may have old error - - Lock guard(mutex_); - list_.push_back(add); -} - - -SSL_METHOD::SSL_METHOD(ConnectionEnd ce, ProtocolVersion pv, bool multiProto) - : version_(pv), side_(ce), verifyPeer_(false), verifyNone_(false), - failNoCert_(false), multipleProtocol_(multiProto) -{} - - -ProtocolVersion SSL_METHOD::getVersion() const -{ - return version_; -} - - -ConnectionEnd SSL_METHOD::getSide() const -{ - return side_; -} - - -void SSL_METHOD::setVerifyPeer() -{ - verifyPeer_ = true; -} - - -void SSL_METHOD::setVerifyNone() -{ - verifyNone_ = true; -} - - -void SSL_METHOD::setFailNoCert() -{ - failNoCert_ = true; -} - - -bool SSL_METHOD::verifyPeer() const -{ - return verifyPeer_; -} - - -bool SSL_METHOD::verifyNone() const -{ - return verifyNone_; -} - - -bool SSL_METHOD::failNoCert() const -{ - return failNoCert_; -} - - -bool SSL_METHOD::multipleProtocol() const -{ - return multipleProtocol_; -} - - -SSL_CTX::SSL_CTX(SSL_METHOD* meth) - : method_(meth), certificate_(0), privateKey_(0), passwordCb_(0), - userData_(0), sessionCacheOff_(false), sessionCacheFlushOff_(false), - verifyCallback_(0) -{} - - -SSL_CTX::~SSL_CTX() -{ - ysDelete(method_); - ysDelete(certificate_); - ysDelete(privateKey_); - - STL::for_each(caList_.begin(), caList_.end(), del_ptr_zero()); -} - - -void SSL_CTX::AddCA(x509* ca) -{ - caList_.push_back(ca); -} - - -const SSL_CTX::CertList& -SSL_CTX::GetCA_List() const -{ - return caList_; -} - - -const VerifyCallback SSL_CTX::getVerifyCallback() const -{ - return verifyCallback_; -} - - -const x509* SSL_CTX::getCert() const -{ - return certificate_; -} - - -const x509* SSL_CTX::getKey() const -{ - return privateKey_; -} - - -const SSL_METHOD* SSL_CTX::getMethod() const -{ - return method_; -} - - -const Ciphers& SSL_CTX::GetCiphers() const -{ - return ciphers_; -} - - -const DH_Parms& SSL_CTX::GetDH_Parms() const -{ - return dhParms_; -} - - -const Stats& SSL_CTX::GetStats() const -{ - return stats_; -} - - -pem_password_cb SSL_CTX::GetPasswordCb() const -{ - return passwordCb_; -} - - -void SSL_CTX::SetPasswordCb(pem_password_cb cb) -{ - passwordCb_ = cb; -} - - -void* SSL_CTX::GetUserData() const -{ - return userData_; -} - - -bool SSL_CTX::GetSessionCacheOff() const -{ - return sessionCacheOff_; -} - - -bool SSL_CTX::GetSessionCacheFlushOff() const -{ - return sessionCacheFlushOff_; -} - - -void SSL_CTX::SetUserData(void* data) -{ - userData_ = data; -} - - -void SSL_CTX::SetSessionCacheOff() -{ - sessionCacheOff_ = true; -} - - -void SSL_CTX::SetSessionCacheFlushOff() -{ - sessionCacheFlushOff_ = true; -} - - -void SSL_CTX::setVerifyPeer() -{ - method_->setVerifyPeer(); -} - - -void SSL_CTX::setVerifyNone() -{ - method_->setVerifyNone(); -} - - -void SSL_CTX::setFailNoCert() -{ - method_->setFailNoCert(); -} - - -void SSL_CTX::setVerifyCallback(VerifyCallback vc) -{ - verifyCallback_ = vc; -} - - -bool SSL_CTX::SetDH(const DH& dh) -{ - dhParms_.p_ = dh.p->int_; - dhParms_.g_ = dh.g->int_; - - return dhParms_.set_ = true; -} - - -bool SSL_CTX::SetCipherList(const char* list) -{ - if (!list) - return false; - - bool ret = false; - char name[MAX_SUITE_NAME]; - - char needle[] = ":"; - char* haystack = const_cast(list); - char* prev; - - const int suiteSz = sizeof(cipher_names) / sizeof(cipher_names[0]); - int idx = 0; - - for(;;) { - size_t len; - prev = haystack; - haystack = strstr(haystack, needle); - - if (!haystack) // last cipher - len = min(sizeof(name), strlen(prev)); - else - len = min(sizeof(name), (size_t)(haystack - prev)); - - strncpy(name, prev, len); - name[(len == sizeof(name)) ? len - 1 : len] = 0; - - for (int i = 0; i < suiteSz; i++) - if (strncmp(name, cipher_names[i], sizeof(name)) == 0) { - - ciphers_.suites_[idx++] = 0x00; // first byte always zero - ciphers_.suites_[idx++] = i; - - if (!ret) ret = true; // found at least one - break; - } - if (!haystack) break; - haystack++; - } - - if (ret) { - ciphers_.setSuites_ = true; - ciphers_.suiteSz_ = idx; - } - - return ret; -} - - -void SSL_CTX::IncrementStats(StatsField fd) -{ - - Lock guard(mutex_); - - switch (fd) { - - case Accept: - ++stats_.accept_; - break; - - case Connect: - ++stats_.connect_; - break; - - case AcceptGood: - ++stats_.acceptGood_; - break; - - case ConnectGood: - ++stats_.connectGood_; - break; - - case AcceptRenegotiate: - ++stats_.acceptRenegotiate_; - break; - - case ConnectRenegotiate: - ++stats_.connectRenegotiate_; - break; - - case Hits: - ++stats_.hits_; - break; - - case CbHits: - ++stats_.cbHits_; - break; - - case CacheFull: - ++stats_.cacheFull_; - break; - - case Misses: - ++stats_.misses_; - break; - - case Timeouts: - ++stats_.timeouts_; - break; - - case Number: - ++stats_.number_; - break; - - case GetCacheSize: - ++stats_.getCacheSize_; - break; - - case VerifyMode: - ++stats_.verifyMode_; - break; - - case VerifyDepth: - ++stats_.verifyDepth_; - break; - - default: - break; - } -} - - -Crypto::Crypto() - : digest_(0), cipher_(0), dh_(0) -{} - - -Crypto::~Crypto() -{ - ysDelete(dh_); - ysDelete(cipher_); - ysDelete(digest_); -} - - -const Digest& Crypto::get_digest() const -{ - return *digest_; -} - - -const BulkCipher& Crypto::get_cipher() const -{ - return *cipher_; -} - - -const DiffieHellman& Crypto::get_dh() const -{ - return *dh_; -} - - -const RandomPool& Crypto::get_random() const -{ - return random_; -} - - -const CertManager& Crypto::get_certManager() const -{ - return cert_; -} - - - -Digest& Crypto::use_digest() -{ - return *digest_; -} - - -BulkCipher& Crypto::use_cipher() -{ - return *cipher_; -} - - -DiffieHellman& Crypto::use_dh() -{ - return *dh_; -} - - -RandomPool& Crypto::use_random() -{ - return random_; -} - - -CertManager& Crypto::use_certManager() -{ - return cert_; -} - - - -void Crypto::SetDH(DiffieHellman* dh) -{ - dh_ = dh; -} - - -void Crypto::SetDH(const DH_Parms& dh) -{ - if (dh.set_) - dh_ = NEW_YS DiffieHellman(dh.p_, dh.g_, random_); -} - - -bool Crypto::DhSet() -{ - return dh_ != 0; -} - - -void Crypto::setDigest(Digest* digest) -{ - digest_ = digest; -} - - -void Crypto::setCipher(BulkCipher* c) -{ - cipher_ = c; -} - - -const MD5& sslHashes::get_MD5() const -{ - return md5HandShake_; -} - - -const SHA& sslHashes::get_SHA() const -{ - return shaHandShake_; -} - - -const Finished& sslHashes::get_verify() const -{ - return verify_; -} - - -const Hashes& sslHashes::get_certVerify() const -{ - return certVerify_; -} - - -MD5& sslHashes::use_MD5(){ - return md5HandShake_; -} - - -SHA& sslHashes::use_SHA() -{ - return shaHandShake_; -} - - -Finished& sslHashes::use_verify() -{ - return verify_; -} - - -Hashes& sslHashes::use_certVerify() -{ - return certVerify_; -} - - -Buffers::Buffers() : rawInput_(0) -{} - - -Buffers::~Buffers() -{ - STL::for_each(handShakeList_.begin(), handShakeList_.end(), - del_ptr_zero()) ; - STL::for_each(dataList_.begin(), dataList_.end(), - del_ptr_zero()) ; - ysDelete(rawInput_); -} - - -void Buffers::SetRawInput(input_buffer* ib) -{ - assert(rawInput_ == 0); - rawInput_ = ib; -} - - -input_buffer* Buffers::TakeRawInput() -{ - input_buffer* ret = rawInput_; - rawInput_ = 0; - - return ret; -} - - -const Buffers::inputList& Buffers::getData() const -{ - return dataList_; -} - - -const Buffers::outputList& Buffers::getHandShake() const -{ - return handShakeList_; -} - - -Buffers::inputList& Buffers::useData() -{ - return dataList_; -} - - -Buffers::outputList& Buffers::useHandShake() -{ - return handShakeList_; -} - - -Security::Security(ProtocolVersion pv, RandomPool& ran, ConnectionEnd ce, - const Ciphers& ciphers, SSL_CTX* ctx, bool haveDH) - : conn_(pv, ran), parms_(ce, ciphers, pv, haveDH), resumeSession_(ran), - ctx_(ctx), resuming_(false) -{} - - -const Connection& Security::get_connection() const -{ - return conn_; -} - - -const SSL_CTX* Security::GetContext() const -{ - return ctx_; -} - - -const Parameters& Security::get_parms() const -{ - return parms_; -} - - -const SSL_SESSION& Security::get_resume() const -{ - return resumeSession_; -} - - -bool Security::get_resuming() const -{ - return resuming_; -} - - -Connection& Security::use_connection() -{ - return conn_; -} - - -Parameters& Security::use_parms() -{ - return parms_; -} - - -SSL_SESSION& Security::use_resume() -{ - return resumeSession_; -} - - -void Security::set_resuming(bool b) -{ - resuming_ = b; -} - - -X509_NAME::X509_NAME(const char* n, size_t sz) - : name_(0), sz_(sz) -{ - if (sz) { - name_ = NEW_YS char[sz]; - memcpy(name_, n, sz); - } - entry_.data = 0; -} - - -X509_NAME::~X509_NAME() -{ - ysArrayDelete(name_); - ysArrayDelete(entry_.data); -} - - -const char* X509_NAME::GetName() const -{ - return name_; -} - - -size_t X509_NAME::GetLength() const -{ - return sz_; -} - - -X509::X509(const char* i, size_t iSz, const char* s, size_t sSz, - const char* b, int bSz, const char* a, int aSz) - : issuer_(i, iSz), subject_(s, sSz), - beforeDate_(b, bSz), afterDate_(a, aSz) -{} - - -X509_NAME* X509::GetIssuer() -{ - return &issuer_; -} - - -X509_NAME* X509::GetSubject() -{ - return &subject_; -} - - -ASN1_STRING* X509::GetBefore() -{ - return beforeDate_.GetString(); -} - - -ASN1_STRING* X509::GetAfter() -{ - return afterDate_.GetString(); -} - - -ASN1_STRING* X509_NAME::GetEntry(int i) -{ - if (i < 0 || i >= int(sz_)) - return 0; - - if (entry_.data) - ysArrayDelete(entry_.data); - entry_.data = NEW_YS byte[sz_]; // max size; - - memcpy(entry_.data, &name_[i], sz_ - i); - if (entry_.data[sz_ -i - 1]) { - entry_.data[sz_ - i] = 0; - entry_.length = int(sz_) - i; - } - else - entry_.length = int(sz_) - i - 1; - entry_.type = 0; - - return &entry_; -} - - -StringHolder::StringHolder(const char* str, int sz) -{ - asnString_.length = sz; - asnString_.data = NEW_YS byte[sz + 1]; - memcpy(asnString_.data, str, sz); - asnString_.type = 0; // not used for now -} - - -StringHolder::~StringHolder() -{ - ysArrayDelete(asnString_.data); -} - - -ASN1_STRING* StringHolder::GetString() -{ - return &asnString_; -} - - -#ifdef HAVE_LIBZ - - void* myAlloc(void* /* opaque */, unsigned int item, unsigned int size) - { - return NEW_YS unsigned char[item * size]; - } - - - void myFree(void* /* opaque */, void* memory) - { - unsigned char* ptr = static_cast(memory); - yaSSL::ysArrayDelete(ptr); - } - - - // put size in front of compressed data - int Compress(const byte* in, int sz, input_buffer& buffer) - { - byte tmp[LENGTH_SZ]; - z_stream c_stream; /* compression stream */ - - buffer.allocate(sz + sizeof(uint16) + COMPRESS_EXTRA); - - c_stream.zalloc = myAlloc; - c_stream.zfree = myFree; - c_stream.opaque = (voidpf)0; - - c_stream.next_in = const_cast(in); - c_stream.avail_in = sz; - c_stream.next_out = buffer.get_buffer() + sizeof(tmp); - c_stream.avail_out = buffer.get_capacity() - sizeof(tmp); - - if (deflateInit(&c_stream, 8) != Z_OK) return -1; - int err = deflate(&c_stream, Z_FINISH); - deflateEnd(&c_stream); - if (err != Z_OK && err != Z_STREAM_END) return -1; - - c16toa(sz, tmp); - memcpy(buffer.get_buffer(), tmp, sizeof(tmp)); - buffer.add_size(c_stream.total_out + sizeof(tmp)); - - return 0; - } - - - // get uncompressed size in front - int DeCompress(input_buffer& in, int sz, input_buffer& out) - { - byte tmp[LENGTH_SZ]; - - in.read(tmp, sizeof(tmp)); - - uint16 len; - ato16(tmp, len); - - out.allocate(len); - - z_stream d_stream; /* decompression stream */ - - d_stream.zalloc = myAlloc; - d_stream.zfree = myFree; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = in.get_buffer() + in.get_current(); - d_stream.avail_in = sz - sizeof(tmp); - d_stream.next_out = out.get_buffer(); - d_stream.avail_out = out.get_capacity(); - - if (inflateInit(&d_stream) != Z_OK) return -1; - int err = inflate(&d_stream, Z_FINISH); - inflateEnd(&d_stream); - if (err != Z_OK && err != Z_STREAM_END) return -1; - - out.add_size(d_stream.total_out); - in.set_current(in.get_current() + sz - sizeof(tmp)); - - return 0; - } - - -#else // LIBZ - - // these versions should never get called - int Compress(const byte* in, int sz, input_buffer& buffer) - { - assert(0); - return -1; - } - - - int DeCompress(input_buffer& in, int sz, input_buffer& out) - { - assert(0); - return -1; - } - - -#endif // LIBZ - - -} // namespace - - - -extern "C" void yaSSL_CleanUp() -{ - TaoCrypt::CleanUp(); - yaSSL::ysDelete(yaSSL::sslFactoryInstance); - yaSSL::ysDelete(yaSSL::sessionsInstance); - yaSSL::ysDelete(yaSSL::errorsInstance); - - // In case user calls more than once, prevent seg fault - yaSSL::sslFactoryInstance = 0; - yaSSL::sessionsInstance = 0; - yaSSL::errorsInstance = 0; -} - - -#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION -namespace mySTL { -template yaSSL::yassl_int_cpp_local1::SumData for_each::iterator, yaSSL::yassl_int_cpp_local1::SumData>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::yassl_int_cpp_local1::SumData); -template yaSSL::yassl_int_cpp_local1::SumBuffer for_each::iterator, yaSSL::yassl_int_cpp_local1::SumBuffer>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::yassl_int_cpp_local1::SumBuffer); -template mySTL::list::iterator find_if::iterator, yaSSL::yassl_int_cpp_local2::sess_match>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::yassl_int_cpp_local2::sess_match); -template mySTL::list::iterator find_if::iterator, yaSSL::yassl_int_cpp_local2::thr_match>(mySTL::list::iterator, mySTL::list::iterator, yaSSL::yassl_int_cpp_local2::thr_match); -} -#endif - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/aes.hpp b/externals/mysql/extlib/yassl/taocrypt/include/aes.hpp deleted file mode 100644 index dc19c98a83..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/aes.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* aes.hpp defines AES -*/ - - -#ifndef TAO_CRYPT_AES_HPP -#define TAO_CRYPT_AES_HPP - -#include "misc.hpp" -#include "modes.hpp" - - -#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM) - #define DO_AES_ASM -#endif - - - -namespace TaoCrypt { - - -enum { AES_BLOCK_SIZE = 16 }; - - -// AES encryption and decryption, see FIPS-197 -class AES : public Mode_BASE { -public: - enum { BLOCK_SIZE = AES_BLOCK_SIZE }; - - AES(CipherDir DIR, Mode MODE) - : Mode_BASE(BLOCK_SIZE, DIR, MODE) {} - -#ifdef DO_AES_ASM - void Process(byte*, const byte*, word32); -#endif - void SetKey(const byte* key, word32 sz, CipherDir fake = ENCRYPTION); - void SetIV(const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); } -private: - static const word32 rcon_[]; - - word32 rounds_; - word32 key_[60]; // max size - - static const word32 Te[5][256]; - static const word32 Td[5][256]; - - static const word32* Te0; - static const word32* Te1; - static const word32* Te2; - static const word32* Te3; - static const word32* Te4; - - static const word32* Td0; - static const word32* Td1; - static const word32* Td2; - static const word32* Td3; - static const word32* Td4; - - void encrypt(const byte*, const byte*, byte*) const; - void AsmEncrypt(const byte*, byte*, void*) const; - void decrypt(const byte*, const byte*, byte*) const; - void AsmDecrypt(const byte*, byte*, void*) const; - - void ProcessAndXorBlock(const byte*, const byte*, byte*) const; - - AES(const AES&); // hide copy - AES& operator=(const AES&); // and assign -}; - - -typedef BlockCipher AES_ECB_Encryption; -typedef BlockCipher AES_ECB_Decryption; - -typedef BlockCipher AES_CBC_Encryption; -typedef BlockCipher AES_CBC_Decryption; - - - -} // naemspace - -#endif // TAO_CRYPT_AES_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/algebra.hpp b/externals/mysql/extlib/yassl/taocrypt/include/algebra.hpp deleted file mode 100644 index 298ef115a4..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/algebra.hpp +++ /dev/null @@ -1,226 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's algebra.h from CryptoPP */ - -#ifndef TAO_CRYPT_ALGEBRA_HPP -#define TAO_CRYPT_ALGEBRA_HPP - -#include "integer.hpp" - -namespace TaoCrypt { - - -// "const Element&" returned by member functions are references -// to internal data members. Since each object may have only -// one such data member for holding results, the following code -// will produce incorrect results: -// abcd = group.Add(group.Add(a,b), group.Add(c,d)); -// But this should be fine: -// abcd = group.Add(a, group.Add(b, group.Add(c,d)); - -// Abstract Group -class TAOCRYPT_NO_VTABLE AbstractGroup : public virtual_base -{ -public: - typedef Integer Element; - - virtual ~AbstractGroup() {} - - virtual bool Equal(const Element &a, const Element &b) const =0; - virtual const Element& Identity() const =0; - virtual const Element& Add(const Element &a, const Element &b) const =0; - virtual const Element& Inverse(const Element &a) const =0; - virtual bool InversionIsFast() const {return false;} - - virtual const Element& Double(const Element &a) const; - virtual const Element& Subtract(const Element &a, const Element &b) const; - virtual Element& Accumulate(Element &a, const Element &b) const; - virtual Element& Reduce(Element &a, const Element &b) const; - - virtual Element ScalarMultiply(const Element &a, const Integer &e) const; - virtual Element CascadeScalarMultiply(const Element &x, const Integer &e1, - const Element &y, const Integer &e2) const; - - virtual void SimultaneousMultiply(Element *results, const Element &base, - const Integer *exponents, unsigned int exponentsCount) const; -}; - -// Abstract Ring -class TAOCRYPT_NO_VTABLE AbstractRing : public AbstractGroup -{ -public: - typedef Integer Element; - - AbstractRing() : AbstractGroup() {m_mg.m_pRing = this;} - AbstractRing(const AbstractRing &source) : AbstractGroup() - {m_mg.m_pRing = this;} - AbstractRing& operator=(const AbstractRing &source) {return *this;} - - virtual bool IsUnit(const Element &a) const =0; - virtual const Element& MultiplicativeIdentity() const =0; - virtual const Element& Multiply(const Element&, const Element&) const =0; - virtual const Element& MultiplicativeInverse(const Element &a) const =0; - - virtual const Element& Square(const Element &a) const; - virtual const Element& Divide(const Element &a, const Element &b) const; - - virtual Element Exponentiate(const Element &a, const Integer &e) const; - virtual Element CascadeExponentiate(const Element &x, const Integer &e1, - const Element &y, const Integer &e2) const; - - virtual void SimultaneousExponentiate(Element *results, const Element&, - const Integer *exponents, unsigned int exponentsCount) const; - - virtual const AbstractGroup& MultiplicativeGroup() const - {return m_mg;} - -private: - class MultiplicativeGroupT : public AbstractGroup - { - public: - const AbstractRing& GetRing() const - {return *m_pRing;} - - bool Equal(const Element &a, const Element &b) const - {return GetRing().Equal(a, b);} - - const Element& Identity() const - {return GetRing().MultiplicativeIdentity();} - - const Element& Add(const Element &a, const Element &b) const - {return GetRing().Multiply(a, b);} - - Element& Accumulate(Element &a, const Element &b) const - {return a = GetRing().Multiply(a, b);} - - const Element& Inverse(const Element &a) const - {return GetRing().MultiplicativeInverse(a);} - - const Element& Subtract(const Element &a, const Element &b) const - {return GetRing().Divide(a, b);} - - Element& Reduce(Element &a, const Element &b) const - {return a = GetRing().Divide(a, b);} - - const Element& Double(const Element &a) const - {return GetRing().Square(a);} - - Element ScalarMultiply(const Element &a, const Integer &e) const - {return GetRing().Exponentiate(a, e);} - - Element CascadeScalarMultiply(const Element &x, const Integer &e1, - const Element &y, const Integer &e2) const - {return GetRing().CascadeExponentiate(x, e1, y, e2);} - - void SimultaneousMultiply(Element *results, const Element &base, - const Integer *exponents, unsigned int exponentsCount) const - {GetRing().SimultaneousExponentiate(results, base, exponents, - exponentsCount);} - - const AbstractRing* m_pRing; - }; - - MultiplicativeGroupT m_mg; -}; - - -// Abstract Euclidean Domain -class TAOCRYPT_NO_VTABLE AbstractEuclideanDomain - : public AbstractRing -{ -public: - typedef Integer Element; - - virtual void DivisionAlgorithm(Element &r, Element &q, const Element &a, - const Element &d) const =0; - - virtual const Element& Mod(const Element &a, const Element &b) const =0; - virtual const Element& Gcd(const Element &a, const Element &b) const; - -protected: - mutable Element result; -}; - - -// EuclideanDomainOf -class EuclideanDomainOf : public AbstractEuclideanDomain -{ -public: - typedef Integer Element; - - EuclideanDomainOf() {} - - bool Equal(const Element &a, const Element &b) const - {return a==b;} - - const Element& Identity() const - {return Element::Zero();} - - const Element& Add(const Element &a, const Element &b) const - {return result = a+b;} - - Element& Accumulate(Element &a, const Element &b) const - {return a+=b;} - - const Element& Inverse(const Element &a) const - {return result = -a;} - - const Element& Subtract(const Element &a, const Element &b) const - {return result = a-b;} - - Element& Reduce(Element &a, const Element &b) const - {return a-=b;} - - const Element& Double(const Element &a) const - {return result = a.Doubled();} - - const Element& MultiplicativeIdentity() const - {return Element::One();} - - const Element& Multiply(const Element &a, const Element &b) const - {return result = a*b;} - - const Element& Square(const Element &a) const - {return result = a.Squared();} - - bool IsUnit(const Element &a) const - {return a.IsUnit();} - - const Element& MultiplicativeInverse(const Element &a) const - {return result = a.MultiplicativeInverse();} - - const Element& Divide(const Element &a, const Element &b) const - {return result = a/b;} - - const Element& Mod(const Element &a, const Element &b) const - {return result = a%b;} - - void DivisionAlgorithm(Element &r, Element &q, const Element &a, - const Element &d) const - {Element::Divide(r, q, a, d);} - -private: - mutable Element result; -}; - - - -} // namespace - -#endif // TAO_CRYPT_ALGEBRA_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/arc4.hpp b/externals/mysql/extlib/yassl/taocrypt/include/arc4.hpp deleted file mode 100644 index 757e1a50d7..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/arc4.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* arc4.hpp defines ARC4 -*/ - - -#ifndef TAO_CRYPT_ARC4_HPP -#define TAO_CRYPT_ARC4_HPP - -#include "misc.hpp" - -namespace TaoCrypt { - - -// ARC4 encryption and decryption -class ARC4 { -public: - enum { STATE_SIZE = 256 }; - - typedef ARC4 Encryption; - typedef ARC4 Decryption; - - ARC4() {} - - void Process(byte*, const byte*, word32); - void SetKey(const byte*, word32); -private: - byte x_; - byte y_; - byte state_[STATE_SIZE]; - - ARC4(const ARC4&); // hide copy - const ARC4 operator=(const ARC4&); // and assign - - void AsmProcess(byte*, const byte*, word32); -}; - -} // namespace - - -#endif // TAO_CRYPT_ARC4_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/asn.hpp b/externals/mysql/extlib/yassl/taocrypt/include/asn.hpp deleted file mode 100644 index 1c1850cb47..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/asn.hpp +++ /dev/null @@ -1,372 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* asn.hpp provides ASN1 BER, PublicKey, and x509v3 decoding -*/ - - -#ifndef TAO_CRYPT_ASN_HPP -#define TAO_CRYPT_ASN_HPP - - -#include "misc.hpp" -#include "block.hpp" -#include "error.hpp" -#ifdef USE_SYS_STL - #include -#else - #include "list.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - -namespace TaoCrypt { - -// these tags and flags are not complete -enum ASNTag -{ - BOOLEAN = 0x01, - INTEGER = 0x02, - BIT_STRING = 0x03, - OCTET_STRING = 0x04, - TAG_NULL = 0x05, - OBJECT_IDENTIFIER = 0x06, - OBJECT_DESCRIPTOR = 0x07, - EXTERNAL = 0x08, - REAL = 0x09, - ENUMERATED = 0x0a, - UTF8_STRING = 0x0c, - SEQUENCE = 0x10, - SET = 0x11, - NUMERIC_STRING = 0x12, - PRINTABLE_STRING = 0x13, - T61_STRING = 0x14, - VIDEOTEXT_STRING = 0x15, - IA5_STRING = 0x16, - UTC_TIME = 0x17, - GENERALIZED_TIME = 0x18, - GRAPHIC_STRING = 0x19, - VISIBLE_STRING = 0x1a, - GENERAL_STRING = 0x1b, - LONG_LENGTH = 0x80 -}; - -enum ASNIdFlag -{ - UNIVERSAL = 0x00, - DATA = 0x01, - HEADER = 0x02, - CONSTRUCTED = 0x20, - APPLICATION = 0x40, - CONTEXT_SPECIFIC = 0x80, - PRIVATE = 0xc0 -}; - - -enum DNTags -{ - COMMON_NAME = 0x03, // CN - SUR_NAME = 0x04, // SN - COUNTRY_NAME = 0x06, // C - LOCALITY_NAME = 0x07, // L - STATE_NAME = 0x08, // ST - ORG_NAME = 0x0a, // O - ORGUNIT_NAME = 0x0b // OU -}; - - -enum PCKS12_Tags -{ - /* DATA = 1, */ // from ASN1 - SIGNED_DATA = 2, - ENVELOPED_DATA = 3, - SIGNED_AND_ENVELOPED_DATA = 4, - DIGESTED_DATA = 5, - ENCRYPTED_DATA = 6 -}; - - -enum Constants -{ - MIN_DATE_SZ = 13, - MAX_DATE_SZ = 16, - MAX_ALGO_SZ = 16, - MAX_LENGTH_SZ = 5, - MAX_SEQ_SZ = 5, // enum(seq|con) + length(4) - MAX_ALGO_SIZE = 9, - MAX_DIGEST_SZ = 25, // SHA + enum(Bit or Octet) + length(4) - DSA_SIG_SZ = 40, - ASN_NAME_MAX = 512 // max total of all included names -}; - - -class Source; -class RSA_PublicKey; -class RSA_PrivateKey; -class DSA_PublicKey; -class DSA_PrivateKey; -class Integer; -class DH; - - -// General BER decoding -class BER_Decoder : public virtual_base { -protected: - Source& source_; -public: - explicit BER_Decoder(Source& s) : source_(s) {} - virtual ~BER_Decoder() {} - - Integer& GetInteger(Integer&); - word32 GetSequence(); - word32 GetSet(); - word32 GetVersion(); - word32 GetExplicitVersion(); - - Error GetError(); -private: - virtual void ReadHeader() = 0; - - BER_Decoder(const BER_Decoder&); // hide copy - BER_Decoder& operator=(const BER_Decoder&); // and assign -}; - - -// RSA Private Key BER Decoder -class RSA_Private_Decoder : public BER_Decoder { -public: - explicit RSA_Private_Decoder(Source& s) : BER_Decoder(s) {} - void Decode(RSA_PrivateKey&); -private: - void ReadHeader(); -}; - - -// RSA Public Key BER Decoder -class RSA_Public_Decoder : public BER_Decoder { -public: - explicit RSA_Public_Decoder(Source& s) : BER_Decoder(s) {} - void Decode(RSA_PublicKey&); -private: - void ReadHeader(); -}; - - -// DSA Private Key BER Decoder -class DSA_Private_Decoder : public BER_Decoder { -public: - explicit DSA_Private_Decoder(Source& s) : BER_Decoder(s) {} - void Decode(DSA_PrivateKey&); -private: - void ReadHeader(); -}; - - -// DSA Public Key BER Decoder -class DSA_Public_Decoder : public BER_Decoder { -public: - explicit DSA_Public_Decoder(Source& s) : BER_Decoder(s) {} - void Decode(DSA_PublicKey&); -private: - void ReadHeader(); -}; - - -// DH Key BER Decoder -class DH_Decoder : public BER_Decoder { -public: - explicit DH_Decoder(Source& s) : BER_Decoder(s) {} - void Decode(DH&); -private: - void ReadHeader(); -}; - - -// PKCS12 BER Decoder -class PKCS12_Decoder : public BER_Decoder { -public: - explicit PKCS12_Decoder(Source& s) : BER_Decoder(s) {} - void Decode(); -private: - void ReadHeader(); -}; - - -// General PublicKey -class PublicKey { - byte* key_; - word32 sz_; -public: - explicit PublicKey(const byte* k = 0, word32 s = 0); - ~PublicKey() { tcArrayDelete(key_); } - - const byte* GetKey() const { return key_; } - word32 size() const { return sz_; } - - void SetKey(const byte*); - void SetSize(word32 s); - - void AddToEnd(const byte*, word32); -private: - PublicKey(const PublicKey&); // hide copy - PublicKey& operator=(const PublicKey&); // and assign -}; - - -enum { SHA_SIZE = 20 }; - - -// A Signing Authority -class Signer { - PublicKey key_; - char name_[ASN_NAME_MAX]; - byte hash_[SHA_SIZE]; -public: - Signer(const byte* k, word32 kSz, const char* n, const byte* h); - ~Signer(); - - const PublicKey& GetPublicKey() const { return key_; } - const char* GetName() const { return name_; } - const byte* GetHash() const { return hash_; } - -private: - Signer(const Signer&); // hide copy - Signer& operator=(const Signer&); // and assign -}; - - -typedef STL::list SignerList; - - -enum ContentType { HUH = 651 }; -enum SigType { SHAwDSA = 517, MD2wRSA = 646, MD5wRSA = 648, SHAwRSA =649}; -enum HashType { MD2h = 646, MD5h = 649, SHAh = 88 }; -enum KeyType { DSAk = 515, RSAk = 645 }; // sums of algo OID - - -// an x509v Certificate BER Decoder -class CertDecoder : public BER_Decoder { -public: - enum DateType { BEFORE, AFTER }; - enum NameType { ISSUER, SUBJECT }; - enum CertType { CA, USER }; - - explicit CertDecoder(Source&, bool decode = true, SignerList* sl = 0, - bool noVerify = false, CertType ct = USER); - ~CertDecoder(); - - const PublicKey& GetPublicKey() const { return key_; } - KeyType GetKeyType() const { return KeyType(keyOID_); } - const char* GetIssuer() const { return issuer_; } - const char* GetCommonName() const { return subject_; } - const byte* GetHash() const { return subjectHash_; } - const char* GetBeforeDate() const { return beforeDate_; } - const char* GetAfterDate() const { return afterDate_; } - - void DecodeToKey(); -private: - PublicKey key_; - word32 certBegin_; // offset to start of cert - word32 sigIndex_; // offset to start of signature - word32 sigLength_; // length of signature - word32 signatureOID_; // sum of algorithm object id - word32 keyOID_; // sum of key algo object id - byte subjectHash_[SHA_SIZE]; // hash of all Names - byte issuerHash_[SHA_SIZE]; // hash of all Names - byte* signature_; - char issuer_[ASN_NAME_MAX]; // Names - char subject_[ASN_NAME_MAX]; // Names - char beforeDate_[MAX_DATE_SZ]; // valid before date - char afterDate_[MAX_DATE_SZ]; // valid after date - bool verify_; // Default to yes, but could be off - - void ReadHeader(); - void Decode(SignerList*, CertType); - void StoreKey(); - void AddDSA(); - bool ValidateSelfSignature(); - bool ValidateSignature(SignerList*); - bool ConfirmSignature(Source&); - void GetKey(); - void GetName(NameType); - void GetValidity(); - void GetDate(DateType); - void GetCompareHash(const byte*, word32, byte*, word32); - word32 GetAlgoId(); - word32 GetSignature(); - word32 GetDigest(); -}; - - -word32 GetLength(Source&); - -word32 SetLength(word32, byte*); -word32 SetSequence(word32, byte*); - -word32 EncodeDSA_Signature(const byte* signature, byte* output); -word32 EncodeDSA_Signature(const Integer& r, const Integer& s, byte* output); -word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz); - - -// General DER encoding -class DER_Encoder : public virtual_base { -public: - DER_Encoder() {} - virtual ~DER_Encoder() {} - - word32 SetAlgoID(HashType, byte*); - - Error GetError() const { return error_; } -private: - //virtual void WriteHeader() = 0; - Error error_; - - DER_Encoder(const DER_Encoder&); // hide copy - DER_Encoder& operator=(const DER_Encoder&); // and assign -}; - - - -class Signature_Encoder : public DER_Encoder { - const byte* digest_; - word32 digestSz_; - SigType digestOID_; -public: - explicit Signature_Encoder(const byte*, word32, HashType, Source&); - -private: - void WriteHeader(); - word32 SetDigest(const byte*, word32, byte*); - - Signature_Encoder(const Signature_Encoder&); // hide copy - Signature_Encoder& operator=(const Signature_Encoder&); // and assign -}; - - -// Get Cert in PEM format from BEGIN to END -int GetCert(Source&); - -// Get Cert in PEM format from pkcs12 file -int GetPKCS_Cert(const char* password, Source&); - -} // namespace - - -#endif // TAO_CRYPT_ASN_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/block.hpp b/externals/mysql/extlib/yassl/taocrypt/include/block.hpp deleted file mode 100644 index 529a91eee0..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/block.hpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* block.hpp provides word and byte blocks with configurable allocators -*/ - - -#ifndef TAO_CRYPT_BLOCK_HPP -#define TAO_CRYPT_BLOCK_HPP - -#include "misc.hpp" -#include // memcpy -#include // ptrdiff_t - -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - -namespace TaoCrypt { - - -// a Base class for Allocators -template -class AllocatorBase -{ -public: - typedef T value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef T* pointer; - typedef const T* const_pointer; - typedef T& reference; - typedef const T& const_reference; - - pointer address(reference r) const {return (&r);} - const_pointer address(const_reference r) const {return (&r); } - void construct(pointer p, const T& val) {new (p) T(val);} - void destroy(pointer p) {p->~T();} - size_type max_size() const {return ~size_type(0)/sizeof(T);} -protected: - static void CheckSize(size_t n) - { - assert(n <= ~size_t(0) / sizeof(T)); - } -}; - - -// General purpose realloc -template -typename A::pointer StdReallocate(A& a, T* p, typename A::size_type oldSize, - typename A::size_type newSize, bool preserve) -{ - if (oldSize == newSize) - return p; - - if (preserve) { - A b = A(); - typename A::pointer newPointer = b.allocate(newSize, 0); - memcpy(newPointer, p, sizeof(T) * min(oldSize, newSize)); - a.deallocate(p, oldSize); - STL::swap(a, b); - return newPointer; - } - else { - a.deallocate(p, oldSize); - return a.allocate(newSize, 0); - } -} - - -// Allocator that zeros out memory on deletion -template -class AllocatorWithCleanup : public AllocatorBase -{ -public: - typedef typename AllocatorBase::pointer pointer; - typedef typename AllocatorBase::size_type size_type; - - pointer allocate(size_type n, const void* = 0) - { - this->CheckSize(n); - if (n == 0) - return 0; - return NEW_TC T[n]; - } - - void deallocate(void* p, size_type n) - { - memset(p, 0, n * sizeof(T)); - tcArrayDelete((T*)p); - } - - pointer reallocate(T* p, size_type oldSize, size_type newSize, - bool preserve) - { - return StdReallocate(*this, p, oldSize, newSize, preserve); - } - - // VS.NET STL enforces the policy of "All STL-compliant allocators have to - // provide a template class member called rebind". - template struct rebind { typedef AllocatorWithCleanup other;}; -}; - - -// Block class template -template > -class Block { -public: - explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_)) - { CleanNew(sz_); } - - Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_)) - { memcpy(buffer_, buff, sz_ * sizeof(T)); } - - Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_)) - { memcpy(buffer_, that.buffer_, sz_ * sizeof(T)); } - - Block& operator=(const Block& that) { - Block tmp(that); - Swap(tmp); - return *this; - } - - T& operator[] (word32 i) { assert(i < sz_); return buffer_[i]; } - const T& operator[] (word32 i) const - { assert(i < sz_); return buffer_[i]; } - - T* operator+ (word32 i) { return buffer_ + i; } - const T* operator+ (word32 i) const { return buffer_ + i; } - - word32 size() const { return sz_; } - - T* get_buffer() const { return buffer_; } - T* begin() const { return get_buffer(); } - - void CleanGrow(word32 newSize) - { - if (newSize > sz_) { - buffer_ = allocator_.reallocate(buffer_, sz_, newSize, true); - memset(buffer_ + sz_, 0, (newSize - sz_) * sizeof(T)); - sz_ = newSize; - } - } - - void CleanNew(word32 newSize) - { - New(newSize); - memset(buffer_, 0, sz_ * sizeof(T)); - } - - void New(word32 newSize) - { - buffer_ = allocator_.reallocate(buffer_, sz_, newSize, false); - sz_ = newSize; - } - - void resize(word32 newSize) - { - buffer_ = allocator_.reallocate(buffer_, sz_, newSize, true); - sz_ = newSize; - } - - void Swap(Block& other) { - STL::swap(sz_, other.sz_); - STL::swap(buffer_, other.buffer_); - STL::swap(allocator_, other.allocator_); - } - - ~Block() { allocator_.deallocate(buffer_, sz_); } -private: - word32 sz_; // size in Ts - T* buffer_; - A allocator_; -}; - - -typedef Block ByteBlock; -typedef Block WordBlock; -typedef Block Word32Block; - - -} // namespace - -#endif // TAO_CRYPT_BLOCK_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/blowfish.hpp b/externals/mysql/extlib/yassl/taocrypt/include/blowfish.hpp deleted file mode 100644 index 90d2c014b4..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/blowfish.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* blowfish.hpp defines Blowfish -*/ - - -#ifndef TAO_CRYPT_BLOWFISH_HPP -#define TAO_CRYPT_BLOWFISH_HPP - -#include "misc.hpp" -#include "modes.hpp" -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - -#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM) - #define DO_BLOWFISH_ASM -#endif - - -namespace TaoCrypt { - -enum { BLOWFISH_BLOCK_SIZE = 8 }; - - -// Blowfish encryption and decryption, see -class Blowfish : public Mode_BASE { -public: - enum { BLOCK_SIZE = BLOWFISH_BLOCK_SIZE, ROUNDS = 16 }; - - Blowfish(CipherDir DIR, Mode MODE) - : Mode_BASE(BLOCK_SIZE, DIR, MODE) {} - -#ifdef DO_BLOWFISH_ASM - void Process(byte*, const byte*, word32); -#endif - void SetKey(const byte* key, word32 sz, CipherDir fake = ENCRYPTION); - void SetIV(const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); } -private: - static const word32 p_init_[ROUNDS + 2]; - static const word32 s_init_[4 * 256]; - - word32 pbox_[ROUNDS + 2]; - word32 sbox_[4 * 256]; - - void crypt_block(const word32 in[2], word32 out[2]) const; - void AsmProcess(const byte* in, byte* out) const; - void ProcessAndXorBlock(const byte*, const byte*, byte*) const; - - Blowfish(const Blowfish&); // hide copy - Blowfish& operator=(const Blowfish&); // and assign -}; - - -typedef BlockCipher Blowfish_ECB_Encryption; -typedef BlockCipher Blowfish_ECB_Decryption; - -typedef BlockCipher Blowfish_CBC_Encryption; -typedef BlockCipher Blowfish_CBC_Decryption; - - - -} // namespace - -#endif // TAO_CRYPT_BLOWFISH_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/coding.hpp b/externals/mysql/extlib/yassl/taocrypt/include/coding.hpp deleted file mode 100644 index 3b1c068760..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/coding.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* coding.hpp defines hex and base64 encoding/decoing -*/ - -#ifndef TAO_CRYPT_CODING_HPP -#define TAO_CRYPT_CODING_HPP - -#include "misc.hpp" -#include "block.hpp" - -namespace TaoCrypt { - -class Source; - - -// Hex Encoding, see RFC 3548 -class HexEncoder { - ByteBlock encoded_; - Source& plain_; -public: - explicit HexEncoder(Source& s) : plain_(s) { Encode(); } -private: - void Encode(); - - HexEncoder(const HexEncoder&); // hide copy - HexEncoder& operator=(const HexEncoder&); // and assign -}; - - -// Hex Decoding, see RFC 3548 -class HexDecoder { - ByteBlock decoded_; - Source& coded_; -public: - explicit HexDecoder(Source& s) : coded_(s) { Decode(); } -private: - void Decode(); - - HexDecoder(const HexDecoder&); // hide copy - HexDecoder& operator=(const HexDecoder&); // and assign -}; - - -// Base 64 encoding, see RFC 3548 -class Base64Encoder { - ByteBlock encoded_; - Source& plain_; -public: - explicit Base64Encoder(Source& s) : plain_(s) { Encode(); } -private: - void Encode(); - - Base64Encoder(const Base64Encoder&); // hide copy - Base64Encoder& operator=(const Base64Encoder&); // and assign -}; - - -// Base 64 decoding, see RFC 3548 -class Base64Decoder { - ByteBlock decoded_; - Source& coded_; -public: - explicit Base64Decoder(Source& s) : coded_(s) { Decode(); } -private: - void Decode(); - - Base64Decoder(const Base64Decoder&); // hide copy - Base64Decoder& operator=(const Base64Decoder&); // and assign -}; - - -} // namespace - -#endif // TAO_CRYPT_CODING_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/des.hpp b/externals/mysql/extlib/yassl/taocrypt/include/des.hpp deleted file mode 100644 index f99a289392..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/des.hpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* des.hpp defines DES, DES_EDE2, and DES_EDE3 - see FIPS 46-2 and FIPS 81 -*/ - - -#ifndef TAO_CRYPT_DES_HPP -#define TAO_CRYPT_DES_HPP - -#include "misc.hpp" -#include "modes.hpp" - - -#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM) - #define DO_DES_ASM -#endif - - -namespace TaoCrypt { - - -enum { DES_BLOCK_SIZE = 8, DES_KEY_SIZE = 32 }; - - -class BasicDES { -public: - void SetKey(const byte*, word32, CipherDir dir); - void RawProcessBlock(word32&, word32&) const; -protected: - word32 k_[DES_KEY_SIZE]; -}; - - -// DES -class DES : public Mode_BASE, public BasicDES { -public: - DES(CipherDir DIR, Mode MODE) - : Mode_BASE(DES_BLOCK_SIZE, DIR, MODE) {} - -private: - void ProcessAndXorBlock(const byte*, const byte*, byte*) const; - - DES(const DES&); // hide copy - DES& operator=(const DES&); // and assign -}; - - -// DES_EDE2 -class DES_EDE2 : public Mode_BASE { -public: - DES_EDE2(CipherDir DIR, Mode MODE) - : Mode_BASE(DES_BLOCK_SIZE, DIR, MODE) {} - - void SetKey(const byte*, word32, CipherDir dir); -private: - BasicDES des1_; - BasicDES des2_; - - void ProcessAndXorBlock(const byte*, const byte*, byte*) const; - - DES_EDE2(const DES_EDE2&); // hide copy - DES_EDE2& operator=(const DES_EDE2&); // and assign -}; - - - -// DES_EDE3 -class DES_EDE3 : public Mode_BASE { -public: - DES_EDE3(CipherDir DIR, Mode MODE) - : Mode_BASE(DES_BLOCK_SIZE, DIR, MODE) {} - - void SetKey(const byte*, word32, CipherDir dir); - void SetIV(const byte* iv) { memcpy(r_, iv, DES_BLOCK_SIZE); } -#ifdef DO_DES_ASM - void Process(byte*, const byte*, word32); -#endif -private: - BasicDES des1_; - BasicDES des2_; - BasicDES des3_; - - void AsmProcess(const byte* in, byte* out, void* box) const; - void ProcessAndXorBlock(const byte*, const byte*, byte*) const; - - DES_EDE3(const DES_EDE3&); // hide copy - DES_EDE3& operator=(const DES_EDE3&); // and assign -}; - - -typedef BlockCipher DES_ECB_Encryption; -typedef BlockCipher DES_ECB_Decryption; - -typedef BlockCipher DES_CBC_Encryption; -typedef BlockCipher DES_CBC_Decryption; - -typedef BlockCipher DES_EDE2_ECB_Encryption; -typedef BlockCipher DES_EDE2_ECB_Decryption; - -typedef BlockCipher DES_EDE2_CBC_Encryption; -typedef BlockCipher DES_EDE2_CBC_Decryption; - -typedef BlockCipher DES_EDE3_ECB_Encryption; -typedef BlockCipher DES_EDE3_ECB_Decryption; - -typedef BlockCipher DES_EDE3_CBC_Encryption; -typedef BlockCipher DES_EDE3_CBC_Decryption; - - -} // namespace - - -#endif // TAO_CRYPT_DES_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/dh.hpp b/externals/mysql/extlib/yassl/taocrypt/include/dh.hpp deleted file mode 100644 index b7724cbd80..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/dh.hpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* dh.hpp provides Diffie-Hellman support -*/ - - -#ifndef TAO_CRYPT_DH_HPP -#define TAO_CRYPT_DH_HPP - -#include "misc.hpp" -#include "integer.hpp" - -namespace TaoCrypt { - - -class Source; - - -// Diffie-Hellman -class DH { -public: - DH() {} - DH(Integer& p, Integer& g) : p_(p), g_(g) {} - explicit DH(Source&); - - DH(const DH& that) : p_(that.p_), g_(that.g_) {} - DH& operator=(const DH& that) - { - DH tmp(that); - Swap(tmp); - return *this; - } - - void Swap(DH& other) - { - p_.Swap(other.p_); - g_.Swap(other.g_); - } - - void Initialize(Source&); - void Initialize(Integer& p, Integer& g) - { - SetP(p); - SetG(g); - } - - void GenerateKeyPair(RandomNumberGenerator&, byte*, byte*); - void Agree(byte*, const byte*, const byte*, word32 otherSz = 0); - - void SetP(const Integer& p) { p_ = p; } - void SetG(const Integer& g) { g_ = g; } - - Integer& GetP() { return p_; } - Integer& GetG() { return g_; } - - // for p and agree - word32 GetByteLength() const { return p_.ByteCount(); } -private: - // group parms - Integer p_; - Integer g_; - - void GeneratePrivate(RandomNumberGenerator&, byte*); - void GeneratePublic(const byte*, byte*); -}; - - -} // namespace - -#endif // TAO_CRYPT_DH_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/dsa.hpp b/externals/mysql/extlib/yassl/taocrypt/include/dsa.hpp deleted file mode 100644 index f185b852cd..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/dsa.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* dsa.hpp provides Digitial Signautre Algorithm see FIPS 186-2 -*/ - -#ifndef TAO_CRYPT_DSA_HPP -#define TAO_CRYPT_DSA_HPP - -#include "integer.hpp" - - -namespace TaoCrypt { - -class Source; - - -class DSA_PublicKey { -protected: - Integer p_; - Integer q_; - Integer g_; - Integer y_; -public: - DSA_PublicKey() {} - explicit DSA_PublicKey(Source&); - - void Initialize(Source&); - void Initialize(const Integer& p, const Integer& q, const Integer& g, - const Integer& y); - - const Integer& GetModulus() const; - const Integer& GetSubGroupOrder() const; - const Integer& GetSubGroupGenerator() const; - const Integer& GetPublicPart() const; - - void SetModulus(const Integer&); - void SetSubGroupOrder(const Integer&); - void SetSubGroupGenerator(const Integer&); - void SetPublicPart(const Integer&); - - word32 SignatureLength() const; - - DSA_PublicKey(const DSA_PublicKey&); - DSA_PublicKey& operator=(const DSA_PublicKey&); - - void Swap(DSA_PublicKey& other); -}; - - - -class DSA_PrivateKey : public DSA_PublicKey { - Integer x_; -public: - DSA_PrivateKey() {} - explicit DSA_PrivateKey(Source&); - - void Initialize(Source&); - void Initialize(const Integer& p, const Integer& q, const Integer& g, - const Integer& y, const Integer& x); - - const Integer& GetPrivatePart() const; - - void SetPrivatePart(const Integer&); -private: - DSA_PrivateKey(const DSA_PrivateKey&); // hide copy - DSA_PrivateKey& operator=(const DSA_PrivateKey&); // and assign -}; - - - -class DSA_Signer { - const DSA_PrivateKey& key_; - Integer r_; - Integer s_; -public: - explicit DSA_Signer(const DSA_PrivateKey&); - - word32 Sign(const byte* sha_digest, byte* sig, RandomNumberGenerator&); - - const Integer& GetR() const; - const Integer& GetS() const; -private: - DSA_Signer(const DSA_Signer&); // hide copy - DSA_Signer& operator=(DSA_Signer&); // and assign -}; - - -class DSA_Verifier { - const DSA_PublicKey& key_; - Integer r_; - Integer s_; -public: - explicit DSA_Verifier(const DSA_PublicKey&); - - bool Verify(const byte* sha_digest, const byte* sig); - - const Integer& GetR() const; - const Integer& GetS() const; -private: - DSA_Verifier(const DSA_Verifier&); // hide copy - DSA_Verifier& operator=(const DSA_Verifier&); // and assign -}; - - - - - -} // namespace - -#endif // TAO_CRYPT_DSA_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/error.hpp b/externals/mysql/extlib/yassl/taocrypt/include/error.hpp deleted file mode 100644 index ef8b065d2f..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/error.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* error.hpp provides a taocrypt error numbers - * - */ - - -#ifndef TAO_CRYPT_ERROR_HPP -#define TAO_CRYPT_ERROR_HPP - - -namespace TaoCrypt { - - -enum ErrorNumber { - -NO_ERROR_E = 0, // "not in error state" - -// RandomNumberGenerator -WINCRYPT_E = 1001, // "bad wincrypt acquire" -CRYPTGEN_E = 1002, // "CryptGenRandom error" -OPEN_RAN_E = 1003, // "open /dev/urandom error" -READ_RAN_E = 1004, // "read /dev/urandom error" - -// Integer -INTEGER_E = 1010, // "bad DER Integer Header" - - -// ASN.1 -SEQUENCE_E = 1020, // "bad Sequence Header" -SET_E = 1021, // "bad Set Header" -VERSION_E = 1022, // "version length not 1" -SIG_OID_E = 1023, // "signature OID mismatch" -BIT_STR_E = 1024, // "bad BitString Header" -UNKNOWN_OID_E = 1025, // "unknown key OID type" -OBJECT_ID_E = 1026, // "bad Ojbect ID Header" -TAG_NULL_E = 1027, // "expected TAG NULL" -EXPECT_0_E = 1028, // "expected 0" -OCTET_STR_E = 1029, // "bad Octet String Header" -TIME_E = 1030, // "bad TIME" - -DATE_SZ_E = 1031, // "bad Date Size" -SIG_LEN_E = 1032, // "bad Signature Length" -UNKOWN_SIG_E = 1033, // "unknown signature OID" -UNKOWN_HASH_E = 1034, // "unknown hash OID" -DSA_SZ_E = 1035, // "bad DSA r or s size" -BEFORE_DATE_E = 1036, // "before date in the future" -AFTER_DATE_E = 1037, // "after date in the past" -SIG_CONFIRM_E = 1038, // "bad self signature confirmation" -SIG_OTHER_E = 1039, // "bad other signature confirmation" - -CONTENT_E = 1040, // "bad content processing" -PEM_E = 1041 // "bad pem format error" - - // add error string to yassl/src/yassl_error.cpp !!! -}; - - -struct Error { - ErrorNumber what_; // description number, 0 for no error - - explicit Error(ErrorNumber w = NO_ERROR_E) : what_(w) {} - - ErrorNumber What() const { return what_; } - void SetError(ErrorNumber w) { what_ = w; } -}; - - - -} // namespace TaoCrypt - -#endif // TAO_CRYPT_ERROR_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/file.hpp b/externals/mysql/extlib/yassl/taocrypt/include/file.hpp deleted file mode 100644 index 0f85b46fdb..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/file.hpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* file.hpp provies File Sources and Sinks -*/ - - -#ifndef TAO_CRYPT_FILE_HPP -#define TAO_CRYPT_FILE_HPP - -#include "misc.hpp" -#include "block.hpp" -#include "error.hpp" -#include - -namespace TaoCrypt { - - -class Source { - ByteBlock buffer_; - word32 current_; - Error error_; -public: - explicit Source(word32 sz = 0) : buffer_(sz), current_(0) {} - Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {} - - word32 size() const { return buffer_.size(); } - void grow(word32 sz) { buffer_.CleanGrow(sz); } - - const byte* get_buffer() const { return buffer_.get_buffer(); } - const byte* get_current() const { return &buffer_[current_]; } - word32 get_index() const { return current_; } - void set_index(word32 i) { current_ = i; } - - byte operator[] (word32 i) { current_ = i; return next(); } - byte next() { return buffer_[current_++]; } - byte prev() { return buffer_[--current_]; } - - void add(const byte* data, word32 len) - { - memcpy(buffer_.get_buffer() + current_, data, len); - current_ += len; - } - - void advance(word32 i) { current_ += i; } - void reset(ByteBlock&); - - Error GetError() { return error_; } - void SetError(ErrorNumber w) { error_.SetError(w); } - - friend class FileSource; // for get() - - Source(const Source& that) - : buffer_(that.buffer_), current_(that.current_) {} - - Source& operator=(const Source& that) - { - Source tmp(that); - Swap(tmp); - return *this; - } - - void Swap(Source& other) - { - buffer_.Swap(other.buffer_); - STL::swap(current_, other.current_); - } - -}; - - -// File Source -class FileSource { - FILE* file_; -public: - FileSource(const char* fname, Source& source); - ~FileSource(); - - word32 size(bool use_current = false); -private: - word32 get(Source&); - word32 size_left(); - - FileSource(const FileSource&); // hide - FileSource& operator=(const FileSource&); // hide -}; - - -// File Sink -class FileSink { - FILE* file_; -public: - FileSink(const char* fname, Source& source); - ~FileSink(); - - word32 size(bool use_current = false); -private: - void put(Source&); - - FileSink(const FileSink&); // hide - FileSink& operator=(const FileSink&); // hide -}; - - - -} // namespace - -#endif // TAO_CRYPT_FILE_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/hash.hpp b/externals/mysql/extlib/yassl/taocrypt/include/hash.hpp deleted file mode 100644 index fa5f6c0472..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/hash.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* hash.hpp provides a base for digest types -*/ - - -#ifndef TAO_CRYPT_HASH_HPP -#define TAO_CRYPT_HASH_HPP - -#include "misc.hpp" - -namespace TaoCrypt { - - -// HASH -class HASH : public virtual_base { -public: - virtual ~HASH() {} - - virtual void Update(const byte*, word32) = 0; - virtual void Final(byte*) = 0; - - virtual void Init() = 0; - - virtual word32 getBlockSize() const = 0; - virtual word32 getDigestSize() const = 0; -}; - - -// HASH with Transform -class HASHwithTransform : public HASH { -public: - HASHwithTransform(word32 digSz, word32 buffSz); - virtual ~HASHwithTransform() {} - virtual ByteOrder getByteOrder() const = 0; - virtual word32 getPadSize() const = 0; - - virtual void Update(const byte*, word32); - virtual void Final(byte*); - - word32 GetBitCountLo() const { return loLen_ << 3; } - word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) + - (hiLen_ << 3); } - enum { MaxDigestSz = 8, MaxBufferSz = 64 }; -protected: - typedef word32 HashLengthType; - word32 buffLen_; // in bytes - HashLengthType loLen_; // length in bytes - HashLengthType hiLen_; // length in bytes - word32 digest_[MaxDigestSz]; - word32 buffer_[MaxBufferSz / sizeof(word32)]; - - virtual void Transform() = 0; - - void AddLength(word32); -}; - - -#ifdef WORD64_AVAILABLE - -// 64-bit HASH with Transform -class HASH64withTransform : public HASH { -public: - HASH64withTransform(word32 digSz, word32 buffSz); - virtual ~HASH64withTransform() {} - virtual ByteOrder getByteOrder() const = 0; - virtual word32 getPadSize() const = 0; - - virtual void Update(const byte*, word32); - virtual void Final(byte*); - - word32 GetBitCountLo() const { return loLen_ << 3; } - word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) + - (hiLen_ << 3); } - enum { MaxDigestSz = 8, MaxBufferSz = 128 }; -protected: - typedef word32 HashLengthType; - word32 buffLen_; // in bytes - HashLengthType loLen_; // length in bytes - HashLengthType hiLen_; // length in bytes - word64 digest_[MaxDigestSz]; - word64 buffer_[MaxBufferSz / sizeof(word64)]; - - virtual void Transform() = 0; - - void AddLength(word32); -}; - -#endif // WORD64_AVAILABLE - - -} // namespace - -#endif // TAO_CRYPT_HASH_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/hmac.hpp b/externals/mysql/extlib/yassl/taocrypt/include/hmac.hpp deleted file mode 100644 index 1d486514e0..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/hmac.hpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* hamc.hpp implements HMAC, see RFC 2104 -*/ - - -#ifndef TAO_CRYPT_HMAC_HPP -#define TAO_CRYPT_HMAC_HPP - -#include "hash.hpp" - -namespace TaoCrypt { - - -// HMAC class template -template -class HMAC { -public: - enum { IPAD = 0x36, OPAD = 0x5C }; - - HMAC() : ipad_(reinterpret_cast(&ip_)), - opad_(reinterpret_cast(&op_)), - innerHash_(reinterpret_cast(&innerH_)) - { - Init(); - } - void Update(const byte*, word32); - void Final(byte*); - void Init(); - - void SetKey(const byte*, word32); -private: - byte* ipad_; - byte* opad_; - byte* innerHash_; - bool innerHashKeyed_; - T mac_; - - // MSVC 6 HACK, gives compiler error if calculated in array - enum { HMAC_BSIZE = T::BLOCK_SIZE / sizeof(word32), - HMAC_DSIZE = T::DIGEST_SIZE / sizeof(word32) }; - - word32 ip_[HMAC_BSIZE]; // align ipad_ on word32 - word32 op_[HMAC_BSIZE]; // align opad_ on word32 - word32 innerH_[HMAC_DSIZE]; // align innerHash_ on word32 - - void KeyInnerHash(); - - HMAC(const HMAC&); - HMAC& operator= (const HMAC&); -}; - - -// Setup -template -void HMAC::Init() -{ - mac_.Init(); - innerHashKeyed_ = false; -} - - -// Key generation -template -void HMAC::SetKey(const byte* key, word32 length) -{ - Init(); - - if (length <= T::BLOCK_SIZE) - memcpy(ipad_, key, length); - else { - mac_.Update(key, length); - mac_.Final(ipad_); - length = T::DIGEST_SIZE; - } - memset(ipad_ + length, 0, T::BLOCK_SIZE - length); - - for (word32 i = 0; i < T::BLOCK_SIZE; i++) { - opad_[i] = ipad_[i] ^ OPAD; - ipad_[i] ^= IPAD; - } -} - - -// Inner Key Hash -template -void HMAC::KeyInnerHash() -{ - mac_.Update(ipad_, T::BLOCK_SIZE); - innerHashKeyed_ = true; -} - - -// Update -template -void HMAC::Update(const byte* msg, word32 length) -{ - if (!innerHashKeyed_) - KeyInnerHash(); - mac_.Update(msg, length); -} - - -// Final -template -void HMAC::Final(byte* hash) -{ - if (!innerHashKeyed_) - KeyInnerHash(); - mac_.Final(innerHash_); - - mac_.Update(opad_, T::BLOCK_SIZE); - mac_.Update(innerHash_, T::DIGEST_SIZE); - mac_.Final(hash); - - innerHashKeyed_ = false; -} - - -} // namespace - -#endif // TAO_CRYPT_HMAC_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/integer.hpp b/externals/mysql/extlib/yassl/taocrypt/include/integer.hpp deleted file mode 100644 index 186d62bb86..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/integer.hpp +++ /dev/null @@ -1,328 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's integer.h from CryptoPP */ - - -#ifndef TAO_CRYPT_INTEGER_HPP -#define TAO_CRYPT_INTEGER_HPP - - -#ifdef _MSC_VER - // 4250: dominance - // 4660: explicitly instantiating a class already implicitly instantiated - // 4661: no suitable definition provided for explicit template request - // 4786: identifer was truncated in debug information - // 4355: 'this' : used in base member initializer list -# pragma warning(disable: 4250 4660 4661 4786 4355) -#endif - - -#include "misc.hpp" -#include "block.hpp" -#include "random.hpp" -#include "file.hpp" -#include -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - - -#ifdef TAOCRYPT_X86ASM_AVAILABLE - -#ifdef _M_IX86 - #if (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 500)) || \ - (defined(__ICL) && (__ICL >= 500)) - #define SSE2_INTRINSICS_AVAILABLE - #define TAOCRYPT_MM_MALLOC_AVAILABLE - #elif defined(_MSC_VER) - // _mm_free seems to be the only way to tell if the Processor Pack is - //installed or not - #include - #if defined(_mm_free) - #define SSE2_INTRINSICS_AVAILABLE - #define TAOCRYPT_MM_MALLOC_AVAILABLE - #endif - #endif -#endif - -// SSE2 intrinsics work in GCC 3.3 or later -#if defined(__SSE2__) && (__GNUC__ == 4 || __GNUC_MAJOR__ > 3 || \ - __GNUC_MINOR__ > 2) - #define SSE2_INTRINSICS_AVAILABLE -#endif - -#endif // X86ASM - - - - -namespace TaoCrypt { - -#if defined(SSE2_INTRINSICS_AVAILABLE) - - // Allocator handling proper alignment - template - class AlignedAllocator : public AllocatorBase - { - public: - typedef typename AllocatorBase::pointer pointer; - typedef typename AllocatorBase::size_type size_type; - - pointer allocate(size_type n, const void* = 0); - void deallocate(void* p, size_type n); - pointer reallocate(T* p, size_type oldSize, size_type newSize, - bool preserve) - { - return StdReallocate(*this, p, oldSize, newSize, preserve); - } - - #if !(defined(TAOCRYPT_MALLOC_ALIGNMENT_IS_16) || \ - defined(TAOCRYPT_MEMALIGN_AVAILABLE) || \ - defined(TAOCRYPT_MM_MALLOC_AVAILABLE)) - #define TAOCRYPT_NO_ALIGNED_ALLOC - AlignedAllocator() : m_pBlock(0) {} - protected: - void *m_pBlock; - #endif - }; - - typedef Block > AlignedWordBlock; -#else - typedef WordBlock AlignedWordBlock; -#endif - - -// general MIN -template inline -const T& min(const T& a, const T& b) -{ - return a < b ? a : b; -} - - -// general MAX -template inline -const T& max(const T& a, const T& b) -{ - return a > b ? a : b; -} - - -// Large Integer class -class Integer { -public: - enum Sign {POSITIVE = 0, NEGATIVE = 1 }; - enum Signedness { UNSIGNED, SIGNED }; - enum RandomNumberType { ANY, PRIME }; - - class DivideByZero {}; - - Integer(); - Integer(const Integer& t); - Integer(signed long value); - Integer(Sign s, word highWord, word lowWord); - - // BER Decode Source - explicit Integer(Source&); - - Integer(const byte* encodedInteger, unsigned int byteCount, - Signedness s = UNSIGNED); - - ~Integer() {} - - static const Integer& Zero(); - static const Integer& One(); - - Integer& Ref() { return *this; } - - Integer(RandomNumberGenerator& rng, const Integer& min, - const Integer& max); - - static Integer Power2(unsigned int e); - - unsigned int MinEncodedSize(Signedness = UNSIGNED) const; - unsigned int Encode(byte* output, unsigned int outputLen, - Signedness = UNSIGNED) const; - - void Decode(const byte* input, unsigned int inputLen, - Signedness = UNSIGNED); - void Decode(Source&); - - bool IsConvertableToLong() const; - signed long ConvertToLong() const; - - unsigned int BitCount() const; - unsigned int ByteCount() const; - unsigned int WordCount() const; - - bool GetBit(unsigned int i) const; - byte GetByte(unsigned int i) const; - unsigned long GetBits(unsigned int i, unsigned int n) const; - - bool IsZero() const { return !*this; } - bool NotZero() const { return !IsZero(); } - bool IsNegative() const { return sign_ == NEGATIVE; } - bool NotNegative() const { return !IsNegative(); } - bool IsPositive() const { return NotNegative() && NotZero(); } - bool NotPositive() const { return !IsPositive(); } - bool IsEven() const { return GetBit(0) == 0; } - bool IsOdd() const { return GetBit(0) == 1; } - - Integer& operator=(const Integer& t); - Integer& operator+=(const Integer& t); - Integer& operator-=(const Integer& t); - Integer& operator*=(const Integer& t) { return *this = Times(t); } - Integer& operator/=(const Integer& t) - { return *this = DividedBy(t);} - Integer& operator%=(const Integer& t) { return *this = Modulo(t); } - Integer& operator/=(word t) { return *this = DividedBy(t); } - Integer& operator%=(word t) { return *this = Modulo(t); } - Integer& operator<<=(unsigned int); - Integer& operator>>=(unsigned int); - - - void Randomize(RandomNumberGenerator &rng, unsigned int bitcount); - void Randomize(RandomNumberGenerator &rng, const Integer &min, - const Integer &max); - - void SetBit(unsigned int n, bool value = 1); - void SetByte(unsigned int n, byte value); - - void Negate(); - void SetPositive() { sign_ = POSITIVE; } - void SetNegative() { if (!!(*this)) sign_ = NEGATIVE; } - void Swap(Integer& a); - - bool operator!() const; - Integer operator+() const {return *this;} - Integer operator-() const; - Integer& operator++(); - Integer& operator--(); - Integer operator++(int) - { Integer temp = *this; ++*this; return temp; } - Integer operator--(int) - { Integer temp = *this; --*this; return temp; } - - int Compare(const Integer& a) const; - - Integer Plus(const Integer &b) const; - Integer Minus(const Integer &b) const; - Integer Times(const Integer &b) const; - Integer DividedBy(const Integer &b) const; - Integer Modulo(const Integer &b) const; - Integer DividedBy(word b) const; - word Modulo(word b) const; - - Integer operator>>(unsigned int n) const { return Integer(*this)>>=n; } - Integer operator<<(unsigned int n) const { return Integer(*this)<<=n; } - - Integer AbsoluteValue() const; - Integer Doubled() const { return Plus(*this); } - Integer Squared() const { return Times(*this); } - Integer SquareRoot() const; - - bool IsSquare() const; - bool IsUnit() const; - - Integer MultiplicativeInverse() const; - - friend Integer a_times_b_mod_c(const Integer& x, const Integer& y, - const Integer& m); - friend Integer a_exp_b_mod_c(const Integer& x, const Integer& e, - const Integer& m); - - static void Divide(Integer& r, Integer& q, const Integer& a, - const Integer& d); - static void Divide(word& r, Integer& q, const Integer& a, word d); - static void DivideByPowerOf2(Integer& r, Integer& q, const Integer& a, - unsigned int n); - static Integer Gcd(const Integer& a, const Integer& n); - - Integer InverseMod(const Integer& n) const; - word InverseMod(word n) const; - -private: - friend class ModularArithmetic; - friend class MontgomeryRepresentation; - - Integer(word value, unsigned int length); - int PositiveCompare(const Integer& t) const; - - friend void PositiveAdd(Integer& sum, const Integer& a, const Integer& b); - friend void PositiveSubtract(Integer& diff, const Integer& a, - const Integer& b); - friend void PositiveMultiply(Integer& product, const Integer& a, - const Integer& b); - friend void PositiveDivide(Integer& remainder, Integer& quotient, const - Integer& dividend, const Integer& divisor); - AlignedWordBlock reg_; - Sign sign_; -}; - -inline bool operator==(const Integer& a, const Integer& b) - {return a.Compare(b)==0;} -inline bool operator!=(const Integer& a, const Integer& b) - {return a.Compare(b)!=0;} -inline bool operator> (const Integer& a, const Integer& b) - {return a.Compare(b)> 0;} -inline bool operator>=(const Integer& a, const Integer& b) - {return a.Compare(b)>=0;} -inline bool operator< (const Integer& a, const Integer& b) - {return a.Compare(b)< 0;} -inline bool operator<=(const Integer& a, const Integer& b) - {return a.Compare(b)<=0;} - -inline Integer operator+(const Integer &a, const Integer &b) - {return a.Plus(b);} -inline Integer operator-(const Integer &a, const Integer &b) - {return a.Minus(b);} -inline Integer operator*(const Integer &a, const Integer &b) - {return a.Times(b);} -inline Integer operator/(const Integer &a, const Integer &b) - {return a.DividedBy(b);} -inline Integer operator%(const Integer &a, const Integer &b) - {return a.Modulo(b);} -inline Integer operator/(const Integer &a, word b) {return a.DividedBy(b);} -inline word operator%(const Integer &a, word b) {return a.Modulo(b);} - -inline void swap(Integer &a, Integer &b) -{ - a.Swap(b); -} - - -Integer CRT(const Integer& xp, const Integer& p, const Integer& xq, - const Integer& q, const Integer& u); - -inline Integer ModularExponentiation(const Integer& a, const Integer& e, - const Integer& m) -{ - return a_exp_b_mod_c(a, e, m); -} - -Integer ModularRoot(const Integer& a, const Integer& dp, const Integer& dq, - const Integer& p, const Integer& q, const Integer& u); - - - -} // namespace - -#endif // TAO_CRYPT_INTEGER_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/kernelc.hpp b/externals/mysql/extlib/yassl/taocrypt/include/kernelc.hpp deleted file mode 100644 index daa3762d5d..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/kernelc.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* kernelc.hpp provides support for C std lib when compiled in kernel mode -*/ - -#ifndef TAOCRYPT_KERNELC_HPP -#define TAOCRYPT_KERNELC_HPP - -#include // get right size_t - -// system functions that c++ doesn't like headers for - -extern "C" void* memcpy(void*, const void*, size_t); -extern "C" void* memset(void*, int, size_t); -extern "C" void printk(char *fmt, ...); - -#define KERN_ERR "<3>" /* error conditions */ - -#if defined(NDEBUG) - #define assert(p) ((void)0) -#else - #define assert(expr) \ - if (!(expr)) { \ - printk(KERN_ERR "Assertion failed! %s,%s,%s,line=%d\n", \ - #expr,__FILE__,__FUNCTION__,__LINE__); } -#endif - - - -#endif // TAOCRYPT_KERNELC_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/md2.hpp b/externals/mysql/extlib/yassl/taocrypt/include/md2.hpp deleted file mode 100644 index cb13d86ec0..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/md2.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* md2.hpp provides MD2 digest support, see RFC 1319 -*/ - -#ifndef TAO_CRYPT_MD2_HPP -#define TAO_CRYPT_MD2_HPP - - -#include "hash.hpp" -#include "block.hpp" - - -namespace TaoCrypt { - - -// MD2 digest -class MD2 : public HASH { -public: - enum { BLOCK_SIZE = 16, DIGEST_SIZE = 16, PAD_SIZE = 16, X_SIZE = 48 }; - MD2(); - - word32 getBlockSize() const { return BLOCK_SIZE; } - word32 getDigestSize() const { return DIGEST_SIZE; } - - void Update(const byte*, word32); - void Final(byte*); - - void Init(); - void Swap(MD2&); -private: - ByteBlock X_, C_, buffer_; - word32 count_; // bytes % PAD_SIZE - - MD2(const MD2&); - MD2& operator=(const MD2&); -}; - -inline void swap(MD2& a, MD2& b) -{ - a.Swap(b); -} - - -} // namespace - -#endif // TAO_CRYPT_MD2_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/md4.hpp b/externals/mysql/extlib/yassl/taocrypt/include/md4.hpp deleted file mode 100644 index 28c2bc7efd..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/md4.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* md4.hpp provides MD4 digest support - * WANRING: MD4 is considered insecure, only use if you have to, e.g., yaSSL - * libcurl supports needs this for NTLM authentication -*/ - -#ifndef TAO_CRYPT_MD4_HPP -#define TAO_CRYPT_MD4_HPP - -#include "hash.hpp" - -namespace TaoCrypt { - - -// MD4 digest -class MD4 : public HASHwithTransform { -public: - enum { BLOCK_SIZE = 64, DIGEST_SIZE = 16, PAD_SIZE = 56, - TAO_BYTE_ORDER = LittleEndianOrder }; // in Bytes - MD4() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) - { Init(); } - ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } - word32 getBlockSize() const { return BLOCK_SIZE; } - word32 getDigestSize() const { return DIGEST_SIZE; } - word32 getPadSize() const { return PAD_SIZE; } - - MD4(const MD4&); - MD4& operator= (const MD4&); - - void Init(); - void Swap(MD4&); -private: - void Transform(); -}; - -inline void swap(MD4& a, MD4& b) -{ - a.Swap(b); -} - - -} // namespace - -#endif // TAO_CRYPT_MD4_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/md5.hpp b/externals/mysql/extlib/yassl/taocrypt/include/md5.hpp deleted file mode 100644 index 9b46154367..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/md5.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* md5.hpp provides MD5 digest support, see RFC 1321 -*/ - -#ifndef TAO_CRYPT_MD5_HPP -#define TAO_CRYPT_MD5_HPP - -#include "hash.hpp" - - -#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM) - #define DO_MD5_ASM -#endif - -namespace TaoCrypt { - - -// MD5 digest -class MD5 : public HASHwithTransform { -public: - enum { BLOCK_SIZE = 64, DIGEST_SIZE = 16, PAD_SIZE = 56, - TAO_BYTE_ORDER = LittleEndianOrder }; // in Bytes - MD5() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) - { Init(); } - ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } - word32 getBlockSize() const { return BLOCK_SIZE; } - word32 getDigestSize() const { return DIGEST_SIZE; } - word32 getPadSize() const { return PAD_SIZE; } - - MD5(const MD5&); - MD5& operator= (const MD5&); - -#ifdef DO_MD5_ASM - void Update(const byte*, word32); -#endif - - void Init(); - void Swap(MD5&); -private: - void Transform(); - void AsmTransform(const byte* data, word32 times); -}; - -inline void swap(MD5& a, MD5& b) -{ - a.Swap(b); -} - - -} // namespace - -#endif // TAO_CRYPT_MD5_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/misc.hpp b/externals/mysql/extlib/yassl/taocrypt/include/misc.hpp deleted file mode 100644 index a101a14bcd..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/misc.hpp +++ /dev/null @@ -1,886 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's misc.h from CryptoPP */ - -#ifndef TAO_CRYPT_MISC_HPP -#define TAO_CRYPT_MISC_HPP - - -#if !defined(DO_TAOCRYPT_KERNEL_MODE) - #include - #include - #include -#else - #include "kernelc.hpp" -#endif - -#include "types.hpp" -#include "type_traits.hpp" - - - -namespace TaoCrypt { - - -// Delete static singleton holders -void CleanUp(); - - -#ifdef YASSL_PURE_C - - // library allocation - struct new_t {}; // TaoCrypt New type - extern new_t tc; // pass in parameter - - } // namespace TaoCrypt - - void* operator new (size_t, TaoCrypt::new_t); - void* operator new[](size_t, TaoCrypt::new_t); - - void operator delete (void*, TaoCrypt::new_t); - void operator delete[](void*, TaoCrypt::new_t); - - - namespace TaoCrypt { - - template - void tcDelete(T* ptr) - { - if (ptr) ptr->~T(); - ::operator delete(ptr, TaoCrypt::tc); - } - - template - void tcArrayDelete(T* ptr) - { - // can't do array placement destruction since not tracking size in - // allocation, only allow builtins to use array placement since they - // don't need destructors called - typedef char builtin[IsFundamentalType::Yes ? 1 : -1]; - (void)sizeof(builtin); - - ::operator delete[](ptr, TaoCrypt::tc); - } - - #define NEW_TC new (TaoCrypt::tc) - - - // to resolve compiler generated operator delete on base classes with - // virtual destructors (when on stack), make sure doesn't get called - class virtual_base { - public: - static void operator delete(void*) { assert(0); } - }; - -#else // YASSL_PURE_C - - - template - void tcDelete(T* ptr) - { - delete ptr; - } - - template - void tcArrayDelete(T* ptr) - { - delete[] ptr; - } - - #define NEW_TC new - - class virtual_base {}; - - -#endif // YASSL_PURE_C - - -#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) - #define INTEL_INTRINSICS - #define FAST_ROTATE -#elif defined(__MWERKS__) && TARGET_CPU_PPC - #define PPC_INTRINSICS - #define FAST_ROTATE -#elif defined(__GNUC__) && defined(__i386__) - // GCC does peephole optimizations which should result in using rotate - // instructions - #define FAST_ROTATE -#endif - - -// no gas on these systems ?, disable for now -#if defined(__sun__) || defined (__QNX__) || defined (__APPLE__) - #define TAOCRYPT_DISABLE_X86ASM -#endif - -// icc problem with -03 and integer, disable for now -#if defined(__INTEL_COMPILER) - #define TAOCRYPT_DISABLE_X86ASM -#endif - - -// Turn on ia32 ASM for Big Integer -// CodeWarrior defines _MSC_VER -#if !defined(TAOCRYPT_DISABLE_X86ASM) && ((defined(_MSC_VER) && \ - !defined(__MWERKS__) && defined(_M_IX86)) || \ - (defined(__GNUC__) && defined(__i386__))) - #define TAOCRYPT_X86ASM_AVAILABLE -#endif - - -#ifdef TAOCRYPT_X86ASM_AVAILABLE - bool HaveCpuId(); - bool IsPentium(); - void CpuId(word32 input, word32 *output); - - extern bool isMMX; -#endif - - - - -// Turn on ia32 ASM for Ciphers and Message Digests -// Seperate define since these are more complex, use member offsets -// and user may want to turn off while leaving Big Integer optos on -#if defined(TAOCRYPT_X86ASM_AVAILABLE) && !defined(DISABLE_TAO_ASM) - #define TAO_ASM -#endif - - -// Extra word in older vtable implementations, for ASM member offset -#if defined(__GNUC__) && __GNUC__ < 3 - #define OLD_GCC_OFFSET -#endif - - -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) -# define TAOCRYPT_MALLOC_ALIGNMENT_IS_16 -#endif - -#if defined(__linux__) || defined(__sun__) || defined(__CYGWIN__) -# define TAOCRYPT_MEMALIGN_AVAILABLE -#endif - - -#if defined(_WIN32) || defined(__CYGWIN__) - #define TAOCRYPT_WIN32_AVAILABLE -#endif - -#if defined(__unix__) || defined(__MACH__) - #define TAOCRYPT_UNIX_AVAILABLE -#endif - - -// VC60 workaround: it doesn't allow typename in some places -#if defined(_MSC_VER) && (_MSC_VER < 1300) - #define CPP_TYPENAME -#else - #define CPP_TYPENAME typename -#endif - - -#ifdef _MSC_VER - #define TAOCRYPT_NO_VTABLE __declspec(novtable) -#else - #define TAOCRYPT_NO_VTABLE -#endif - - -#ifdef USE_SYS_STL - // use system STL - #define STL_NAMESPACE std -#else - // use mySTL - #define STL_NAMESPACE mySTL -#endif - - -// ***************** DLL related ******************** - -#ifdef TAOCRYPT_WIN32_AVAILABLE - -#ifdef TAOCRYPT_EXPORTS - #define TAOCRYPT_IS_DLL - #define TAOCRYPT_DLL __declspec(dllexport) -#elif defined(TAOCRYPT_IMPORTS) - #define TAOCRYPT_IS_DLL - #define TAOCRYPT_DLL __declspec(dllimport) -#else - #define TAOCRYPT_DLL -#endif // EXPORTS - -#define TAOCRYPT_API __stdcall -#define TAOCRYPT_CDECL __cdecl - -#else // TAOCRYPT_WIN32_AVAILABLE - -#define TAOCRYPT_DLL -#define TAOCRYPT_API -#define TAOCRYPT_CDECL - -#endif // TAOCRYPT_WIN32_AVAILABLE - - -// ****************** tempalte stuff ******************* - - -#if defined(TAOCRYPT_MANUALLY_INSTANTIATE_TEMPLATES) && \ - !defined(TAOCRYPT_IMPORTS) - #define TAOCRYPT_DLL_TEMPLATE_CLASS template class TAOCRYPT_DLL -#elif defined(__MWERKS__) - #define TAOCRYPT_DLL_TEMPLATE_CLASS extern class TAOCRYPT_DLL -#else - #define TAOCRYPT_DLL_TEMPLATE_CLASS extern template class TAOCRYPT_DLL -#endif - - -#if defined(TAOCRYPT_MANUALLY_INSTANTIATE_TEMPLATES) && \ - !defined(TAOCRYPT_EXPORTS) - #define TAOCRYPT_STATIC_TEMPLATE_CLASS template class -#elif defined(__MWERKS__) - #define TAOCRYPT_STATIC_TEMPLATE_CLASS extern class -#else - #define TAOCRYPT_STATIC_TEMPLATE_CLASS extern template class -#endif - - -// ************** compile-time assertion *************** - -template -struct CompileAssert -{ - static char dummy[2*b-1]; -}; - -#define TAOCRYPT_COMPILE_ASSERT(assertion) \ - TAOCRYPT_COMPILE_ASSERT_INSTANCE(assertion, __LINE__) - -#if defined(TAOCRYPT_EXPORTS) || defined(TAOCRYPT_IMPORTS) - #define TAOCRYPT_COMPILE_ASSERT_INSTANCE(assertion, instance) -#else - #define TAOCRYPT_COMPILE_ASSERT_INSTANCE(assertion, instance) \ - (void)sizeof(CompileAssert<(assertion)>) -#endif - -#define TAOCRYPT_ASSERT_JOIN(X, Y) TAOCRYPT_DO_ASSERT_JOIN(X, Y) - -#define TAOCRYPT_DO_ASSERT_JOIN(X, Y) X##Y - - -/*************** helpers *****************************/ - -inline unsigned int BitsToBytes(unsigned int bitCount) -{ - return ((bitCount+7)/(8)); -} - -inline unsigned int BytesToWords(unsigned int byteCount) -{ - return ((byteCount+WORD_SIZE-1)/WORD_SIZE); -} - -inline unsigned int BitsToWords(unsigned int bitCount) -{ - return ((bitCount+WORD_BITS-1)/(WORD_BITS)); -} - -inline void CopyWords(word* r, const word* a, word32 n) -{ - for (word32 i = 0; i < n; i++) - r[i] = a[i]; -} - -inline unsigned int CountWords(const word* X, unsigned int N) -{ - while (N && X[N-1]==0) - N--; - return N; -} - -inline void SetWords(word* r, word a, unsigned int n) -{ - for (unsigned int i=0; i -struct EnumToType -{ - static ENUM_TYPE ToEnum() { return (ENUM_TYPE)VALUE; } -}; - -typedef EnumToType LittleEndian; -typedef EnumToType BigEndian; - - -#ifndef BIG_ENDIAN_ORDER - typedef LittleEndian HostByteOrder; -#else - typedef BigEndian HostByteOrder; -#endif - -inline ByteOrder GetHostByteOrder() -{ - return HostByteOrder::ToEnum(); -} - -inline bool HostByteOrderIs(ByteOrder order) -{ - return order == GetHostByteOrder(); -} - - -void xorbuf(byte*, const byte*, unsigned int); - - -template -inline bool IsPowerOf2(T n) -{ - return n > 0 && (n & (n-1)) == 0; -} - -template -inline T2 ModPowerOf2(T1 a, T2 b) -{ - assert(IsPowerOf2(b)); - return T2(a) & (b-1); -} - -template -inline T RoundDownToMultipleOf(T n, T m) -{ - return n - (IsPowerOf2(m) ? ModPowerOf2(n, m) : (n%m)); -} - -template -inline T RoundUpToMultipleOf(T n, T m) -{ - return RoundDownToMultipleOf(n+m-1, m); -} - -template -inline unsigned int GetAlignment(T* dummy = 0) // VC60 workaround -{ -#if (_MSC_VER >= 1300) - return __alignof(T); -#elif defined(__GNUC__) - return __alignof__(T); -#else - return sizeof(T); -#endif -} - -inline bool IsAlignedOn(const void* p, unsigned int alignment) -{ - return IsPowerOf2(alignment) ? ModPowerOf2((size_t)p, alignment) == 0 - : (size_t)p % alignment == 0; -} - -template -inline bool IsAligned(const void* p, T* dummy = 0) // VC60 workaround -{ - return IsAlignedOn(p, GetAlignment()); -} - - -template inline T rotlFixed(T x, unsigned int y) -{ - assert(y < sizeof(T)*8); - return (x<>(sizeof(T)*8-y)); -} - -template inline T rotrFixed(T x, unsigned int y) -{ - assert(y < sizeof(T)*8); - return (x>>y) | (x<<(sizeof(T)*8-y)); -} - -#ifdef INTEL_INTRINSICS - -#pragma intrinsic(_lrotl, _lrotr) - -template<> inline word32 rotlFixed(word32 x, word32 y) -{ - assert(y < 32); - return y ? _lrotl(x, y) : x; -} - -template<> inline word32 rotrFixed(word32 x, word32 y) -{ - assert(y < 32); - return y ? _lrotr(x, y) : x; -} - -#endif // INTEL_INTRINSICS - -#ifndef min -inline word32 min(word32 a, word32 b) -{ - return a < b ? a : b; -} -#endif - - -inline word32 ByteReverse(word32 value) -{ -#ifdef PPC_INTRINSICS - // PPC: load reverse indexed instruction - return (word32)__lwbrx(&value,0); -#elif defined(FAST_ROTATE) - // 5 instructions with rotate instruction, 9 without - return (rotrFixed(value, 8U) & 0xff00ff00) | - (rotlFixed(value, 8U) & 0x00ff00ff); -#else - // 6 instructions with rotate instruction, 8 without - value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); - return rotlFixed(value, 16U); -#endif -} - - -#ifdef WORD64_AVAILABLE - -inline word64 ByteReverse(word64 value) -{ -#ifdef TAOCRYPT_SLOW_WORD64 - return (word64(ByteReverse(word32(value))) << 32) | - ByteReverse(word32(value>>32)); -#else - value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) | - ((value & W64LIT(0x00FF00FF00FF00FF)) << 8); - value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) | - ((value & W64LIT(0x0000FFFF0000FFFF)) << 16); - return rotlFixed(value, 32U); -#endif -} - -#endif // WORD64_AVAILABLE - - -template -inline void ByteReverse(T* out, const T* in, word32 byteCount) -{ - assert(byteCount % sizeof(T) == 0); - word32 count = byteCount/sizeof(T); - for (word32 i=0; i(out); - const word32* i = reinterpret_cast(in); - ByteReverse(o, i, byteCount); -} - - -template -inline T ByteReverseIf(T value, ByteOrder order) -{ - return HostByteOrderIs(order) ? value : ByteReverse(value); -} - - -template -inline void ByteReverseIf(T* out, const T* in, word32 bc, ByteOrder order) -{ - if (!HostByteOrderIs(order)) - ByteReverse(out, in, bc); - else if (out != in) - memcpy(out, in, bc); -} - - - -// do Asm Reverse is host is Little and x86asm -#ifdef LITTLE_ENDIAN_ORDER - #ifdef TAOCRYPT_X86ASM_AVAILABLE - #define LittleReverse AsmReverse - #else - #define LittleReverse ByteReverse - #endif -#else - #define LittleReverse -#endif - - -// do Asm Reverse is host is Big and x86asm -#ifdef BIG_ENDIAN_ORDER - #ifdef TAOCRYPT_X86ASM_AVAILABLE - #define BigReverse AsmReverse - #else - #define BigReverse ByteReverse - #endif -#else - #define BigReverse -#endif - - -#ifdef TAOCRYPT_X86ASM_AVAILABLE - - // faster than rotate, use bswap - - inline word32 AsmReverse(word32 wd) - { - #ifdef __GNUC__ - __asm__ - ( - "bswap %1" - : "=r"(wd) - : "0"(wd) - ); - #else - __asm - { - mov eax, wd - bswap eax - mov wd, eax - } - #endif - return wd; - } - -#endif - - -template -inline void GetUserKey(ByteOrder order, T* out, word32 outlen, const byte* in, - word32 inlen) -{ - const unsigned int U = sizeof(T); - assert(inlen <= outlen*U); - memcpy(out, in, inlen); - memset((byte *)out+inlen, 0, outlen*U-inlen); - ByteReverseIf(out, out, RoundUpToMultipleOf(inlen, U), order); -} - - -#ifdef _MSC_VER - // disable conversion warning - #pragma warning(disable:4244) -#endif - - -inline byte UnalignedGetWordNonTemplate(ByteOrder order, const byte *block, - byte*) -{ - return block[0]; -} - -inline word16 UnalignedGetWordNonTemplate(ByteOrder order, const byte* block, - word16*) -{ - return (order == BigEndianOrder) - ? block[1] | (block[0] << 8) - : block[0] | (block[1] << 8); -} - -inline word32 UnalignedGetWordNonTemplate(ByteOrder order, const byte* block, - word32*) -{ - return (order == BigEndianOrder) - ? word32(block[3]) | (word32(block[2]) << 8) | (word32(block[1]) << 16) - | (word32(block[0]) << 24) - : word32(block[0]) | (word32(block[1]) << 8) | (word32(block[2]) << 16) - | (word32(block[3]) << 24); -} - -template -inline T UnalignedGetWord(ByteOrder order, const byte *block, T* dummy = 0) -{ - return UnalignedGetWordNonTemplate(order, block, dummy); -} - -inline void UnalignedPutWord(ByteOrder order, byte *block, byte value, - const byte *xorBlock = 0) -{ - block[0] = xorBlock ? (value ^ xorBlock[0]) : value; -} - -#define GETBYTE(x, y) (unsigned int)byte((x)>>(8*(y))) - -inline void UnalignedPutWord(ByteOrder order, byte *block, word16 value, - const byte *xorBlock = 0) -{ - if (order == BigEndianOrder) - { - block[0] = GETBYTE(value, 1); - block[1] = GETBYTE(value, 0); - } - else - { - block[0] = GETBYTE(value, 0); - block[1] = GETBYTE(value, 1); - } - - if (xorBlock) - { - block[0] ^= xorBlock[0]; - block[1] ^= xorBlock[1]; - } -} - -inline void UnalignedPutWord(ByteOrder order, byte* block, word32 value, - const byte* xorBlock = 0) -{ - if (order == BigEndianOrder) - { - block[0] = GETBYTE(value, 3); - block[1] = GETBYTE(value, 2); - block[2] = GETBYTE(value, 1); - block[3] = GETBYTE(value, 0); - } - else - { - block[0] = GETBYTE(value, 0); - block[1] = GETBYTE(value, 1); - block[2] = GETBYTE(value, 2); - block[3] = GETBYTE(value, 3); - } - - if (xorBlock) - { - block[0] ^= xorBlock[0]; - block[1] ^= xorBlock[1]; - block[2] ^= xorBlock[2]; - block[3] ^= xorBlock[3]; - } -} - - -template -inline T GetWord(bool assumeAligned, ByteOrder order, const byte *block) -{ - if (assumeAligned) - { - assert(IsAligned(block)); - return ByteReverseIf(*reinterpret_cast(block), order); - } - else - return UnalignedGetWord(order, block); -} - -template -inline void GetWord(bool assumeAligned, ByteOrder order, T &result, - const byte *block) -{ - result = GetWord(assumeAligned, order, block); -} - -template -inline void PutWord(bool assumeAligned, ByteOrder order, byte* block, T value, - const byte *xorBlock = 0) -{ - if (assumeAligned) - { - assert(IsAligned(block)); - if (xorBlock) - *reinterpret_cast(block) = ByteReverseIf(value, order) - ^ *reinterpret_cast(xorBlock); - else - *reinterpret_cast(block) = ByteReverseIf(value, order); - } - else - UnalignedPutWord(order, block, value, xorBlock); -} - -template -class GetBlock -{ -public: - GetBlock(const void *block) - : m_block((const byte *)block) {} - - template - inline GetBlock & operator()(U &x) - { - TAOCRYPT_COMPILE_ASSERT(sizeof(U) >= sizeof(T)); - x = GetWord(A, B::ToEnum(), m_block); - m_block += sizeof(T); - return *this; - } - -private: - const byte *m_block; -}; - -template -class PutBlock -{ -public: - PutBlock(const void *xorBlock, void *block) - : m_xorBlock((const byte *)xorBlock), m_block((byte *)block) {} - - template - inline PutBlock & operator()(U x) - { - PutWord(A, B::ToEnum(), m_block, (T)x, m_xorBlock); - m_block += sizeof(T); - if (m_xorBlock) - m_xorBlock += sizeof(T); - return *this; - } - -private: - const byte *m_xorBlock; - byte *m_block; -}; - -template -struct BlockGetAndPut -{ - // function needed because of C++ grammatical ambiguity between - // expression-statements and declarations - static inline GetBlock Get(const void *block) - {return GetBlock(block);} - typedef PutBlock Put; -}; - - - -template struct SafeShifter; - -template<> struct SafeShifter -{ - template - static inline T RightShift(T value, unsigned int bits) - { - return 0; - } - - template - static inline T LeftShift(T value, unsigned int bits) - { - return 0; - } -}; - -template<> struct SafeShifter -{ - template - static inline T RightShift(T value, unsigned int bits) - { - return value >> bits; - } - - template - static inline T LeftShift(T value, unsigned int bits) - { - return value << bits; - } -}; - -template -inline T SafeRightShift(T value) -{ - return SafeShifter<(bits>=(8*sizeof(T)))>::RightShift(value, bits); -} - -template -inline T SafeLeftShift(T value) -{ - return SafeShifter<(bits>=(8*sizeof(T)))>::LeftShift(value, bits); -} - - -inline -word ShiftWordsLeftByBits(word* r, unsigned int n, unsigned int shiftBits) -{ - assert (shiftBits> (WORD_BITS-shiftBits); - } - return carry; -} - - -inline -word ShiftWordsRightByBits(word* r, unsigned int n, unsigned int shiftBits) -{ - assert (shiftBits=0; i--) - { - u = r[i]; - r[i] = (u >> shiftBits) | carry; - carry = u << (WORD_BITS-shiftBits); - } - return carry; -} - - -inline -void ShiftWordsLeftByWords(word* r, unsigned int n, unsigned int shiftWords) -{ - shiftWords = min(shiftWords, n); - if (shiftWords) - { - for (unsigned int i=n-1; i>=shiftWords; i--) - r[i] = r[i-shiftWords]; - SetWords(r, 0, shiftWords); - } -} - - -inline -void ShiftWordsRightByWords(word* r, unsigned int n, unsigned int shiftWords) -{ - shiftWords = min(shiftWords, n); - if (shiftWords) - { - for (unsigned int i=0; i+shiftWords -inline T1 SaturatingSubtract(T1 a, T2 b) -{ - TAOCRYPT_COMPILE_ASSERT_INSTANCE(T1(-1)>0, 0); // T1 is unsigned type - TAOCRYPT_COMPILE_ASSERT_INSTANCE(T2(-1)>0, 1); // T2 is unsigned type - return T1((a > b) ? (a - b) : 0); -} - - -// declares -unsigned int BytePrecision(word value); -unsigned int BitPrecision(word); -word Crop(word value, unsigned int size); - - - -} // namespace - -#endif // TAO_CRYPT_MISC_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/modarith.hpp b/externals/mysql/extlib/yassl/taocrypt/include/modarith.hpp deleted file mode 100644 index 501a8129b9..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/modarith.hpp +++ /dev/null @@ -1,165 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* based on Wei Dai's modarith.h from CryptoPP */ - - -#ifndef TAO_CRYPT_MODARITH_HPP -#define TAO_CRYPT_MODARITH_HPP - -#include "misc.hpp" -#include "algebra.hpp" - -namespace TaoCrypt { - - -// ModularArithmetic -class ModularArithmetic : public AbstractRing -{ -public: - - typedef int RandomizationParameter; - typedef Integer Element; - - ModularArithmetic(const Integer &modulus = Integer::One()) - : modulus(modulus), result((word)0, modulus.reg_.size()) {} - - ModularArithmetic(const ModularArithmetic &ma) - : AbstractRing(), - modulus(ma.modulus), result((word)0, modulus.reg_.size()) {} - - const Integer& GetModulus() const {return modulus;} - void SetModulus(const Integer &newModulus) - { - modulus = newModulus; - result.reg_.resize(modulus.reg_.size()); - } - - virtual bool IsMontgomeryRepresentation() const {return false;} - - virtual Integer ConvertIn(const Integer &a) const - {return a%modulus;} - - virtual Integer ConvertOut(const Integer &a) const - {return a;} - - const Integer& Half(const Integer &a) const; - - bool Equal(const Integer &a, const Integer &b) const - {return a==b;} - - const Integer& Identity() const - {return Integer::Zero();} - - const Integer& Add(const Integer &a, const Integer &b) const; - - Integer& Accumulate(Integer &a, const Integer &b) const; - - const Integer& Inverse(const Integer &a) const; - - const Integer& Subtract(const Integer &a, const Integer &b) const; - - Integer& Reduce(Integer &a, const Integer &b) const; - - const Integer& Double(const Integer &a) const - {return Add(a, a);} - - const Integer& MultiplicativeIdentity() const - {return Integer::One();} - - const Integer& Multiply(const Integer &a, const Integer &b) const - {return result1 = a*b%modulus;} - - const Integer& Square(const Integer &a) const - {return result1 = a.Squared()%modulus;} - - bool IsUnit(const Integer &a) const - {return Integer::Gcd(a, modulus).IsUnit();} - - const Integer& MultiplicativeInverse(const Integer &a) const - {return result1 = a.InverseMod(modulus);} - - const Integer& Divide(const Integer &a, const Integer &b) const - {return Multiply(a, MultiplicativeInverse(b));} - - Integer CascadeExponentiate(const Integer &x, const Integer &e1, - const Integer &y, const Integer &e2) const; - - void SimultaneousExponentiate(Element *results, const Element &base, - const Integer *exponents, unsigned int exponentsCount) const; - - unsigned int MaxElementBitLength() const - {return (modulus-1).BitCount();} - - unsigned int MaxElementByteLength() const - {return (modulus-1).ByteCount();} - - - static const RandomizationParameter DefaultRandomizationParameter; - -protected: - Integer modulus; - mutable Integer result, result1; - -}; - - - -//! do modular arithmetics in Montgomery representation for increased speed -class MontgomeryRepresentation : public ModularArithmetic -{ -public: - MontgomeryRepresentation(const Integer &modulus); // modulus must be odd - - bool IsMontgomeryRepresentation() const {return true;} - - Integer ConvertIn(const Integer &a) const - {return (a<<(WORD_BITS*modulus.reg_.size()))%modulus;} - - Integer ConvertOut(const Integer &a) const; - - const Integer& MultiplicativeIdentity() const - {return result1 = Integer::Power2(WORD_BITS*modulus.reg_.size())%modulus;} - - const Integer& Multiply(const Integer &a, const Integer &b) const; - - const Integer& Square(const Integer &a) const; - - const Integer& MultiplicativeInverse(const Integer &a) const; - - Integer CascadeExponentiate(const Integer &x, const Integer &e1, - const Integer &y, const Integer &e2) const - {return AbstractRing::CascadeExponentiate(x, e1, y, e2);} - - void SimultaneousExponentiate(Element *results, const Element &base, - const Integer *exponents, unsigned int exponentsCount) const - {AbstractRing::SimultaneousExponentiate(results, base, - exponents, exponentsCount);} - -private: - Integer u; - mutable AlignedWordBlock workspace; -}; - - - - -} // namespace - -#endif // TAO_CRYPT_MODARITH_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/modes.hpp b/externals/mysql/extlib/yassl/taocrypt/include/modes.hpp deleted file mode 100644 index d1ebce7568..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/modes.hpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* modes.hpp provides ECB and CBC modes for block cipher encryption/decryption -*/ - - -#ifndef TAO_CRYPT_MODES_HPP -#define TAO_CRYPT_MODES_HPP - -#include "misc.hpp" - -namespace TaoCrypt { - - -enum Mode { ECB, CBC }; - - - -// BlockCipher abstraction -template -class BlockCipher { -public: - BlockCipher() : cipher_(DIR, MODE) {} - - void Process(byte* c, const byte* p, word32 sz) - { cipher_.Process(c, p, sz); } - void SetKey(const byte* k, word32 sz) - { cipher_.SetKey(k, sz, DIR); } - void SetKey(const byte* k, word32 sz, const byte* iv) - { cipher_.SetKey(k, sz, DIR); cipher_.SetIV(iv); } -private: - T cipher_; - - BlockCipher(const BlockCipher&); // hide copy - BlockCipher& operator=(const BlockCipher&); // and assign -}; - - -// Mode Base for block ciphers, static size -class Mode_BASE : public virtual_base { -public: - enum { MaxBlockSz = 16 }; - - explicit Mode_BASE(int sz, CipherDir dir, Mode mode) - : blockSz_(sz), reg_(reinterpret_cast(r_)), - tmp_(reinterpret_cast(t_)), dir_(dir), mode_(mode) - { - assert(sz <= MaxBlockSz); - } - virtual ~Mode_BASE() {} - - virtual void Process(byte*, const byte*, word32); - - void SetIV(const byte* iv) { memcpy(reg_, iv, blockSz_); } -protected: - int blockSz_; - byte* reg_; - byte* tmp_; - - word32 r_[MaxBlockSz / sizeof(word32)]; // align reg_ on word32 - word32 t_[MaxBlockSz / sizeof(word32)]; // align tmp_ on word32 - - CipherDir dir_; - Mode mode_; - - void ECB_Process(byte*, const byte*, word32); - void CBC_Encrypt(byte*, const byte*, word32); - void CBC_Decrypt(byte*, const byte*, word32); - - Mode_BASE(const Mode_BASE&); // hide copy - Mode_BASE& operator=(const Mode_BASE&); // and assign - -private: - virtual void ProcessAndXorBlock(const byte*, const byte*, byte*) const = 0; -}; - - -inline void Mode_BASE::Process(byte* out, const byte* in, word32 sz) -{ - if (mode_ == ECB) - ECB_Process(out, in, sz); - else if (mode_ == CBC) - if (dir_ == ENCRYPTION) - CBC_Encrypt(out, in, sz); - else - CBC_Decrypt(out, in, sz); -} - - -// ECB Process blocks -inline void Mode_BASE::ECB_Process(byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / blockSz_; - - while (blocks--) { - ProcessAndXorBlock(in, 0, out); - out += blockSz_; - in += blockSz_; - } -} - - -// CBC Encrypt -inline void Mode_BASE::CBC_Encrypt(byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / blockSz_; - - while (blocks--) { - xorbuf(reg_, in, blockSz_); - ProcessAndXorBlock(reg_, 0, reg_); - memcpy(out, reg_, blockSz_); - out += blockSz_; - in += blockSz_; - } -} - - -// CBC Decrypt -inline void Mode_BASE::CBC_Decrypt(byte* out, const byte* in, word32 sz) -{ - word32 blocks = sz / blockSz_; - byte hold[MaxBlockSz]; - - while (blocks--) { - memcpy(tmp_, in, blockSz_); - ProcessAndXorBlock(tmp_, 0, out); - xorbuf(out, reg_, blockSz_); - memcpy(hold, reg_, blockSz_); // swap reg_ and tmp_ - memcpy(reg_, tmp_, blockSz_); - memcpy(tmp_, hold, blockSz_); - out += blockSz_; - in += blockSz_; - } -} - - -} // namespace - -#endif // TAO_CRYPT_MODES_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/pwdbased.hpp b/externals/mysql/extlib/yassl/taocrypt/include/pwdbased.hpp deleted file mode 100644 index 5ece1a8f43..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/pwdbased.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* pwdbased.hpp defines PBKDF2 from PKCS #5 -*/ - - -#ifndef TAO_CRYPT_PWDBASED_HPP -#define TAO_CRYPT_PWDBASED_HPP - -#include -#include "misc.hpp" -#include "block.hpp" -#include "hmac.hpp" - -namespace TaoCrypt { - - -// From PKCS #5, T must be type suitable for HMAC -template -class PBKDF2_HMAC { -public: - word32 MaxDerivedKeyLength() const { return 0xFFFFFFFFU;} // avoid overflow - - word32 DeriveKey(byte* derived, word32 dLen, const byte* pwd, word32 pLen, - const byte* salt, word32 sLen, word32 iterations) const; -}; - - - -template -word32 PBKDF2_HMAC::DeriveKey(byte* derived, word32 dLen, const byte* pwd, - word32 pLen, const byte* salt, word32 sLen, - word32 iterations) const -{ - assert(dLen <= MaxDerivedKeyLength()); - assert(iterations > 0); - - ByteBlock buffer(T::DIGEST_SIZE); - HMAC hmac; - - hmac.SetKey(pwd, pLen); - - word32 i = 1; - - while (dLen > 0) { - hmac.Update(salt, sLen); - word32 j; - for (j = 0; j < 4; j++) { - byte b = i >> ((3-j)*8); - hmac.Update(&b, 1); - } - hmac.Final(buffer.get_buffer()); - - word32 segmentLen = min(dLen, buffer.size()); - memcpy(derived, buffer.get_buffer(), segmentLen); - - for (j = 1; j < iterations; j++) { - hmac.Update(buffer.get_buffer(), buffer.size()); - hmac.Final(buffer.get_buffer()); - xorbuf(derived, buffer.get_buffer(), segmentLen); - } - derived += segmentLen; - dLen -= segmentLen; - i++; - } - return iterations; -} - - - - -} // naemspace - -#endif // TAO_CRYPT_PWDBASED_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/random.hpp b/externals/mysql/extlib/yassl/taocrypt/include/random.hpp deleted file mode 100644 index 91058e8c5c..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/random.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* random.hpp provides a crypto secure Random Number Generator using an OS - specific seed -*/ - - -#ifndef TAO_CRYPT_RANDOM_HPP -#define TAO_CRYPT_RANDOM_HPP - -#include "arc4.hpp" -#include "error.hpp" - -namespace TaoCrypt { - - -// OS specific seeder -class OS_Seed { -public: - OS_Seed(); - ~OS_Seed(); - - void GenerateSeed(byte*, word32 sz); - Error GetError() const { return error_; } -private: -#if defined(_WIN32) - #if defined(_WIN64) - typedef unsigned __int64 ProviderHandle; - // type HCRYPTPROV, avoid #include - #else - typedef unsigned long ProviderHandle; - #endif - ProviderHandle handle_; -#else - int fd_; -#endif - Error error_; - - OS_Seed(const OS_Seed&); // hide copy - OS_Seed& operator=(const OS_Seed&); // hide assign -}; - - -// secure Random Nnumber Generator -class RandomNumberGenerator { -public: - RandomNumberGenerator(); - ~RandomNumberGenerator() {} - - void GenerateBlock(byte*, word32 sz); - byte GenerateByte(); - - ErrorNumber GetError() const { return seed_.GetError().What(); } -private: - OS_Seed seed_; - ARC4 cipher_; - - RandomNumberGenerator(const RandomNumberGenerator&); // hide copy - RandomNumberGenerator operator=(const RandomNumberGenerator&); // && assign -}; - - - - -} // namespace - -#endif // TAO_CRYPT_RANDOM_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/ripemd.hpp b/externals/mysql/extlib/yassl/taocrypt/include/ripemd.hpp deleted file mode 100644 index a63f92cead..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/ripemd.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* ripemd.hpp provides RIPEMD digest support -*/ - -#ifndef TAO_CRYPT_RIPEMD_HPP -#define TAO_CRYPT_RIPEMD_HPP - -#include "hash.hpp" - - -#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM) - #define DO_RIPEMD_ASM -#endif - -namespace TaoCrypt { - - -// RIPEMD160 digest -class RIPEMD160 : public HASHwithTransform { -public: - enum { BLOCK_SIZE = 64, DIGEST_SIZE = 20, PAD_SIZE = 56, - TAO_BYTE_ORDER = LittleEndianOrder }; // in Bytes - RIPEMD160() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) - { Init(); } - ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } - word32 getBlockSize() const { return BLOCK_SIZE; } - word32 getDigestSize() const { return DIGEST_SIZE; } - word32 getPadSize() const { return PAD_SIZE; } - - RIPEMD160(const RIPEMD160&); - RIPEMD160& operator= (const RIPEMD160&); - -#ifdef DO_RIPEMD_ASM - void Update(const byte*, word32); -#endif - void Init(); - void Swap(RIPEMD160&); -private: - void Transform(); - void AsmTransform(const byte* data, word32 times); -}; - -inline void swap(RIPEMD160& a, RIPEMD160& b) -{ - a.Swap(b); -} - - -} // namespace - -#endif // TAO_CRYPT_RIPEMD_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/rsa.hpp b/externals/mysql/extlib/yassl/taocrypt/include/rsa.hpp deleted file mode 100644 index c895ab6fd3..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/rsa.hpp +++ /dev/null @@ -1,250 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* rsa.hpp provides RSA ES encrypt/decrypt, SSL (block type 1) sign and verify -*/ - -#ifndef TAO_CRYPT_RSA_HPP -#define TAO_CRYPT_RSA_HPP - -#include "integer.hpp" -#include "random.hpp" - - -namespace TaoCrypt { - -class Source; - - -// Public Key Length helper -class PK_Lengths { - const Integer& image_; -public: - explicit PK_Lengths(const Integer& i) : image_(i) {} - - word32 PaddedBlockBitLength() const {return image_.BitCount() - 1;} - word32 PaddedBlockByteLength() const - {return BitsToBytes(PaddedBlockBitLength());} - - word32 FixedCiphertextLength() const {return image_.ByteCount();} - word32 FixedMaxPlaintextLength() const - {return SaturatingSubtract(PaddedBlockBitLength() / 8, 10U); } -}; - - -// RSA Public Key -class RSA_PublicKey { -protected: - Integer n_; - Integer e_; -public: - RSA_PublicKey() {} - explicit RSA_PublicKey(Source&); - - void Initialize(const Integer& n, const Integer& e) {n_ = n; e_ = e;} - void Initialize(Source&); - - Integer ApplyFunction(const Integer& x) const; - - const Integer& GetModulus() const {return n_;} - const Integer& GetPublicExponent() const {return e_;} - - void SetModulus(const Integer& n) {n_ = n;} - void SetPublicExponent(const Integer& e) {e_ = e;} - - word32 FixedCiphertextLength() - { - return PK_Lengths(n_).FixedCiphertextLength(); - } - - RSA_PublicKey(const RSA_PublicKey& other) : n_(other.n_), e_(other.e_) {} - RSA_PublicKey& operator=(const RSA_PublicKey& that) - { - RSA_PublicKey tmp(that); - Swap(tmp); - return *this; - } - - void Swap(RSA_PublicKey& other) - { - n_.Swap(other.n_); - e_.Swap(other.e_); - } -}; - - -// RSA Private Key -class RSA_PrivateKey : public RSA_PublicKey { - Integer d_; - Integer p_; - Integer q_; - Integer dp_; - Integer dq_; - Integer u_; -public: - RSA_PrivateKey() {} - explicit RSA_PrivateKey(Source&); - - void Initialize(const Integer& n, const Integer& e, const Integer& d, - const Integer& p, const Integer& q, const Integer& dp, - const Integer& dq, const Integer& u) - {n_ = n; e_ = e; d_ = d; p_ = p; q_ = q; dp_ = dp; dq_ = dq; u_ = u;} - void Initialize(Source&); - - Integer CalculateInverse(RandomNumberGenerator&, const Integer&) const; - - const Integer& GetPrime1() const {return p_;} - const Integer& GetPrime2() const {return q_;} - const Integer& GetPrivateExponent() const {return d_;} - const Integer& GetModPrime1PrivateExponent() const {return dp_;} - const Integer& GetModPrime2PrivateExponent() const {return dq_;} - const Integer& GetMultiplicativeInverseOfPrime2ModPrime1() const - {return u_;} - - void SetPrime1(const Integer& p) {p_ = p;} - void SetPrime2(const Integer& q) {q_ = q;} - void SetPrivateExponent(const Integer& d) {d_ = d;} - void SetModPrime1PrivateExponent(const Integer& dp) {dp_ = dp;} - void SetModPrime2PrivateExponent(const Integer& dq) {dq_ = dq;} - void SetMultiplicativeInverseOfPrime2ModPrime1(const Integer& u) {u_ = u;} -private: - RSA_PrivateKey(const RSA_PrivateKey&); // hide copy - RSA_PrivateKey& operator=(const RSA_PrivateKey&); // and assign -}; - - -// block type 2 padding -class RSA_BlockType2 { -public: - void Pad(const byte*, word32, byte*, word32, - RandomNumberGenerator&) const; - word32 UnPad(const byte*, word32, byte*) const; -}; - - -// block type 1 padding -class RSA_BlockType1 { -public: - void Pad(const byte*, word32, byte*, word32, - RandomNumberGenerator&) const; - word32 UnPad(const byte*, word32, byte*) const; -}; - - -// RSA Encryptor, can use any padding -template -class RSA_Encryptor { - const RSA_PublicKey& key_; - Pad padding_; -public: - explicit RSA_Encryptor(const RSA_PublicKey& k) : key_(k) {} - - void Encrypt(const byte*, word32, byte*, RandomNumberGenerator&); - bool SSL_Verify(const byte* msg, word32 sz, const byte* sig); -}; - - -// RSA Decryptor, can use any padding -template -class RSA_Decryptor { - const RSA_PrivateKey& key_; - Pad padding_; -public: - explicit RSA_Decryptor(const RSA_PrivateKey& k) : key_(k) {} - - word32 Decrypt(const byte*, word32, byte*, RandomNumberGenerator&); - void SSL_Sign(const byte*, word32, byte*, RandomNumberGenerator&); -}; - - -// Public Encrypt -template -void RSA_Encryptor::Encrypt(const byte* plain, word32 sz, byte* cipher, - RandomNumberGenerator& rng) -{ - PK_Lengths lengths(key_.GetModulus()); - assert(sz <= lengths.FixedMaxPlaintextLength()); - - ByteBlock paddedBlock(lengths.PaddedBlockByteLength()); - padding_.Pad(plain, sz, paddedBlock.get_buffer(), - lengths.PaddedBlockBitLength(), rng); - - key_.ApplyFunction(Integer(paddedBlock.get_buffer(), paddedBlock.size())). - Encode(cipher, lengths.FixedCiphertextLength()); -} - - -// Private Decrypt -template -word32 RSA_Decryptor::Decrypt(const byte* cipher, word32 sz, byte* plain, - RandomNumberGenerator& rng) -{ - PK_Lengths lengths(key_.GetModulus()); - assert(sz == lengths.FixedCiphertextLength()); - - if (sz != lengths.FixedCiphertextLength()) - return 0; - - ByteBlock paddedBlock(lengths.PaddedBlockByteLength()); - Integer x = key_.CalculateInverse(rng, Integer(cipher, - lengths.FixedCiphertextLength()).Ref()); - if (x.ByteCount() > paddedBlock.size()) - x = Integer::Zero(); // don't return false, prevents timing attack - x.Encode(paddedBlock.get_buffer(), paddedBlock.size()); - return padding_.UnPad(paddedBlock.get_buffer(), - lengths.PaddedBlockBitLength(), plain); -} - - -// Private SSL type (block 1) Encrypt -template -void RSA_Decryptor::SSL_Sign(const byte* message, word32 sz, byte* sig, - RandomNumberGenerator& rng) -{ - RSA_PublicKey inverse; - inverse.Initialize(key_.GetModulus(), key_.GetPrivateExponent()); - RSA_Encryptor enc(inverse); // SSL Type - enc.Encrypt(message, sz, sig, rng); -} - - -word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain); - - -// Public SSL type (block 1) Decrypt -template -bool RSA_Encryptor::SSL_Verify(const byte* message, word32 sz, - const byte* sig) -{ - ByteBlock plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength()); - if (SSL_Decrypt(key_, sig, plain.get_buffer()) != sz) - return false; // not right justified or bad padding - - if ( (memcmp(plain.get_buffer(), message, sz)) == 0) - return true; - return false; -} - - -typedef RSA_Encryptor<> RSAES_Encryptor; -typedef RSA_Decryptor<> RSAES_Decryptor; - - -} // namespace - -#endif // TAO_CRYPT_RSA_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/runtime.hpp b/externals/mysql/extlib/yassl/taocrypt/include/runtime.hpp deleted file mode 100644 index 6ece50d635..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/runtime.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* runtime.hpp provides C++ runtime support functions when building a pure C - * version of yaSSL, user must define YASSL_PURE_C -*/ - - - -#ifndef yaSSL_NEW_HPP -#define yaSSL_NEW_HPP - -#ifdef HAVE_CONFIG_H - #include "config.h" -#endif - -#ifdef __sun - -#include - -// Handler for pure virtual functions -namespace __Crun { - static void pure_error(void) - { - assert("Pure virtual method called." == "Aborted"); - } -} // namespace __Crun - -#endif // __sun - - -#if defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) - -#if __GNUC__ > 2 - -extern "C" { -#if !defined(DO_TAOCRYPT_KERNEL_MODE) - #include -#else - #include "kernelc.hpp" -#endif - -/* Disallow inline __cxa_pure_virtual() */ -static int __cxa_pure_virtual() __attribute__((noinline, used)); -static int __cxa_pure_virtual() -{ - // oops, pure virtual called! - assert("Pure virtual method called." == "Aborted"); - return 0; -} - -} // extern "C" - -#endif // __GNUC__ > 2 -#endif // compiler check -#endif // yaSSL_NEW_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/sha.hpp b/externals/mysql/extlib/yassl/taocrypt/include/sha.hpp deleted file mode 100644 index c0b4368121..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/sha.hpp +++ /dev/null @@ -1,168 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* sha.hpp provides SHA-1 digests, see RFC 3174 -*/ - -#ifndef TAO_CRYPT_SHA_HPP -#define TAO_CRYPT_SHA_HPP - -#include "hash.hpp" - - -#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM) - #define DO_SHA_ASM -#endif - -namespace TaoCrypt { - - -// SHA-1 digest -class SHA : public HASHwithTransform { -public: - enum { BLOCK_SIZE = 64, DIGEST_SIZE = 20, PAD_SIZE = 56, - TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes - SHA() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) - { Init(); } - ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } - word32 getBlockSize() const { return BLOCK_SIZE; } - word32 getDigestSize() const { return DIGEST_SIZE; } - word32 getPadSize() const { return PAD_SIZE; } - -#ifdef DO_SHA_ASM - void Update(const byte* data, word32 len); -#endif - void Init(); - - SHA(const SHA&); - SHA& operator= (const SHA&); - - void Swap(SHA&); -private: - void Transform(); - void AsmTransform(const byte* data, word32 times); -}; - - -inline void swap(SHA& a, SHA& b) -{ - a.Swap(b); -} - -// SHA-256 digest -class SHA256 : public HASHwithTransform { -public: - enum { BLOCK_SIZE = 64, DIGEST_SIZE = 32, PAD_SIZE = 56, - TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes - SHA256() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) - { Init(); } - ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } - word32 getBlockSize() const { return BLOCK_SIZE; } - word32 getDigestSize() const { return DIGEST_SIZE; } - word32 getPadSize() const { return PAD_SIZE; } - - void Init(); - - SHA256(const SHA256&); - SHA256& operator= (const SHA256&); - - void Swap(SHA256&); -private: - void Transform(); -}; - - -// SHA-224 digest -class SHA224 : public HASHwithTransform { -public: - enum { BLOCK_SIZE = 64, DIGEST_SIZE = 28, PAD_SIZE = 56, - TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes - SHA224() : HASHwithTransform(SHA256::DIGEST_SIZE /sizeof(word32),BLOCK_SIZE) - { Init(); } - ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } - word32 getBlockSize() const { return BLOCK_SIZE; } - word32 getDigestSize() const { return DIGEST_SIZE; } - word32 getPadSize() const { return PAD_SIZE; } - - void Init(); - - SHA224(const SHA224&); - SHA224& operator= (const SHA224&); - - void Swap(SHA224&); -private: - void Transform(); -}; - - -#ifdef WORD64_AVAILABLE - -// SHA-512 digest -class SHA512 : public HASH64withTransform { -public: - enum { BLOCK_SIZE = 128, DIGEST_SIZE = 64, PAD_SIZE = 112, - TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes - SHA512() : HASH64withTransform(DIGEST_SIZE / sizeof(word64), BLOCK_SIZE) - { Init(); } - ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } - word32 getBlockSize() const { return BLOCK_SIZE; } - word32 getDigestSize() const { return DIGEST_SIZE; } - word32 getPadSize() const { return PAD_SIZE; } - - void Init(); - - SHA512(const SHA512&); - SHA512& operator= (const SHA512&); - - void Swap(SHA512&); -private: - void Transform(); -}; - - -// SHA-384 digest -class SHA384 : public HASH64withTransform { -public: - enum { BLOCK_SIZE = 128, DIGEST_SIZE = 48, PAD_SIZE = 112, - TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes - SHA384() : HASH64withTransform(SHA512::DIGEST_SIZE/ sizeof(word64), - BLOCK_SIZE) - { Init(); } - ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } - word32 getBlockSize() const { return BLOCK_SIZE; } - word32 getDigestSize() const { return DIGEST_SIZE; } - word32 getPadSize() const { return PAD_SIZE; } - - void Init(); - - SHA384(const SHA384&); - SHA384& operator= (const SHA384&); - - void Swap(SHA384&); -private: - void Transform(); -}; - -#endif // WORD64_AVAILABLE - - -} // namespace - - -#endif // TAO_CRYPT_SHA_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/twofish.hpp b/externals/mysql/extlib/yassl/taocrypt/include/twofish.hpp deleted file mode 100644 index bc6f89a9f3..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/twofish.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* twofish.hpp defines Twofish -*/ - - -#ifndef TAO_CRYPT_TWOFISH_HPP -#define TAO_CRYPT_TWOFISH_HPP - -#include "misc.hpp" -#include "modes.hpp" -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - -#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM) - #define DO_TWOFISH_ASM -#endif - -namespace TaoCrypt { - -enum { TWOFISH_BLOCK_SIZE = 16 }; - - -// Twofish encryption and decryption, see -class Twofish : public Mode_BASE { -public: - enum { BLOCK_SIZE = TWOFISH_BLOCK_SIZE }; - - Twofish(CipherDir DIR, Mode MODE) - : Mode_BASE(BLOCK_SIZE, DIR, MODE) {} - -#ifdef DO_TWOFISH_ASM - void Process(byte*, const byte*, word32); -#endif - void SetKey(const byte* key, word32 sz, CipherDir fake = ENCRYPTION); - void SetIV(const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); } -private: - static const byte q_[2][256]; - static const word32 mds_[4][256]; - - word32 k_[40]; - word32 s_[4][256]; - - static word32 h0(word32 x, const word32 *key, unsigned int kLen); - static word32 h(word32 x, const word32 *key, unsigned int kLen); - - void ProcessAndXorBlock(const byte*, const byte*, byte*) const; - - void encrypt(const byte*, const byte*, byte*) const; - void decrypt(const byte*, const byte*, byte*) const; - - void AsmEncrypt(const byte* inBlock, byte* outBlock) const; - void AsmDecrypt(const byte* inBlock, byte* outBlock) const; - - Twofish(const Twofish&); // hide copy - Twofish& operator=(const Twofish&); // and assign -}; - - -typedef BlockCipher Twofish_ECB_Encryption; -typedef BlockCipher Twofish_ECB_Decryption; - -typedef BlockCipher Twofish_CBC_Encryption; -typedef BlockCipher Twofish_CBC_Decryption; - - - -} // naemspace - -#endif // TAO_CRYPT_TWOFISH_HPP - diff --git a/externals/mysql/extlib/yassl/taocrypt/include/type_traits.hpp b/externals/mysql/extlib/yassl/taocrypt/include/type_traits.hpp deleted file mode 100644 index 7a664c816b..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/type_traits.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* type_traits defines fundamental types - * see discussion in C++ Templates, $19.1 -*/ - - -#ifndef TAO_CRYPT_TYPE_TRAITS_HPP -#define TAO_CRYPT_TYPE_TRAITS_HPP - -#include "types.hpp" - -namespace TaoCrypt { - - -// primary template: in general T is not a fundamental type - -template -class IsFundamentalType { - public: - enum { Yes = 0, No = 1 }; -}; - - -// macro to specialize for fundamental types -#define MK_FUNDAMENTAL_TYPE(T) \ - template<> class IsFundamentalType { \ - public: \ - enum { Yes = 1, No = 0 }; \ - }; - - -MK_FUNDAMENTAL_TYPE(void) - -#ifndef bool_defined -MK_FUNDAMENTAL_TYPE(bool) -#endif - -MK_FUNDAMENTAL_TYPE( char) -MK_FUNDAMENTAL_TYPE(signed char) -MK_FUNDAMENTAL_TYPE(unsigned char) - -MK_FUNDAMENTAL_TYPE(signed short) -MK_FUNDAMENTAL_TYPE(unsigned short) -MK_FUNDAMENTAL_TYPE(signed int) -MK_FUNDAMENTAL_TYPE(unsigned int) -MK_FUNDAMENTAL_TYPE(signed long) -MK_FUNDAMENTAL_TYPE(unsigned long) - -MK_FUNDAMENTAL_TYPE(float) -MK_FUNDAMENTAL_TYPE( double) -MK_FUNDAMENTAL_TYPE(long double) - -#if defined(WORD64_AVAILABLE) && defined(WORD64_IS_DISTINCT_TYPE) - MK_FUNDAMENTAL_TYPE(word64) -#endif - - -#undef MK_FUNDAMENTAL_TYPE - - -} // namespace - -#endif // TAO_CRYPT_TYPE_TRAITS_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/include/types.hpp b/externals/mysql/extlib/yassl/taocrypt/include/types.hpp deleted file mode 100644 index 3efdcdfbcc..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/include/types.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's misc.h from CryptoPP, basic crypt types */ - - -#ifndef TAO_CRYPT_TYPES_HPP -#define TAO_CRYPT_TYPES_HPP - -#ifdef HAVE_CONFIG_H - #include "config.h" -#endif - -namespace TaoCrypt { - - -#if defined(WORDS_BIGENDIAN) || (defined(__MWERKS__) && !defined(__INTEL__)) - #define BIG_ENDIAN_ORDER -#endif - -#ifndef BIG_ENDIAN_ORDER - #define LITTLE_ENDIAN_ORDER -#endif - - -typedef unsigned char byte; -typedef unsigned short word16; -typedef unsigned int word32; - -#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) - #define WORD64_AVAILABLE - #define WORD64_IS_DISTINCT_TYPE - typedef unsigned __int64 word64; - #define W64LIT(x) x##ui64 -#elif SIZEOF_LONG == 8 - #define WORD64_AVAILABLE - typedef unsigned long word64; - #define W64LIT(x) x##LL -#elif SIZEOF_LONG_LONG == 8 - #define WORD64_AVAILABLE - #define WORD64_IS_DISTINCT_TYPE - typedef unsigned long long word64; - #define W64LIT(x) x##LL -#endif - - -// compilers we've found 64-bit multiply insructions for -#if defined(__GNUC__) || defined(_MSC_VER) || defined(__DECCXX) - #if !(defined(__ICC) || defined(__INTEL_COMPILER)) - #define HAVE_64_MULTIPLY - #endif -#endif - - -#if defined(HAVE_64_MULTIPLY) && (defined(__alpha__) || defined(__ia64__) \ - || defined(_ARCH_PPC64) || defined(__mips64) || defined(__x86_64__) \ - || defined(_M_X64) || defined(_M_IA64)) -// These platforms have 64-bit CPU registers. Unfortunately most C++ compilers -// don't allow any way to access the 64-bit by 64-bit multiply instruction -// without using assembly, so in order to use word64 as word, the assembly -// instruction must be defined in Dword::Multiply(). - typedef word32 hword; - typedef word64 word; -#else - #define TAOCRYPT_NATIVE_DWORD_AVAILABLE - #ifdef WORD64_AVAILABLE - #define TAOCRYPT_SLOW_WORD64 - typedef word16 hword; - typedef word32 word; - typedef word64 dword; - #else - typedef byte hword; - typedef word16 word; - typedef word32 dword; - #endif -#endif - -const word32 WORD_SIZE = sizeof(word); -const word32 WORD_BITS = WORD_SIZE * 8; - - -} // namespace - -#endif // TAO_CRYPT_TYPES_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/mySTL/algorithm.hpp b/externals/mysql/extlib/yassl/taocrypt/mySTL/algorithm.hpp deleted file mode 100644 index d8bc29a0bb..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/mySTL/algorithm.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* mySTL algorithm implements max, min, for_each, swap, find_if, copy, - * copy_backward, fill - */ - -#ifndef mySTL_ALGORITHM_HPP -#define mySTL_ALGORITHM_HPP - - -namespace mySTL { - - -template -inline const T& max(const T& a, const T&b) -{ - return a < b ? b : a; -} - - -template -inline const T& min(const T& a, const T&b) -{ - return b < a ? b : a; -} - - -template -Func for_each(InIter first, InIter last, Func op) -{ - while (first != last) { - op(*first); - ++first; - } - return op; -} - - -template -inline void swap(T& a, T& b) -{ - T tmp = a; - a = b; - b = tmp; -} - - -template -InIter find_if(InIter first, InIter last, Pred pred) -{ - while (first != last && !pred(*first)) - ++first; - return first; -} - - -template -inline OutputIter copy(InputIter first, InputIter last, OutputIter place) -{ - while (first != last) { - *place = *first; - ++first; - ++place; - } - return place; -} - - -template -inline OutputIter -copy_backward(InputIter first, InputIter last, OutputIter place) -{ - while (first != last) - *--place = *--last; - return place; -} - - -template -void fill(InputIter first, InputIter last, const T& v) -{ - while (first != last) { - *first = v; - ++first; - } -} - - -} // namespace mySTL - -#endif // mySTL_ALGORITHM_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/mySTL/helpers.hpp b/externals/mysql/extlib/yassl/taocrypt/mySTL/helpers.hpp deleted file mode 100644 index c0495a71d8..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/mySTL/helpers.hpp +++ /dev/null @@ -1,153 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* mySTL helpers implements misc constructs for vector and list - * - */ - -#ifndef mySTL_HELPERS_HPP -#define mySTL_HELPERS_HPP - -#include -#ifdef _MSC_VER - #include -#endif - -/* - Workaround for the lack of operator new(size_t, void*) - in IBM VA C++ 6.0 - Also used as a workaround to avoid including -*/ - struct Dummy {}; - - inline void* operator new(size_t size, Dummy* d) - { - return static_cast(d); - } - - // for compilers that want matching delete - inline void operator delete(void* ptr, Dummy* d) - { - } - - typedef Dummy* yassl_pointer; - -namespace mySTL { - - -template -inline void construct(T* p, const T2& value) -{ - new (reinterpret_cast(p)) T(value); -} - - -template -inline void construct(T* p) -{ - new (reinterpret_cast(p)) T(); -} - - -template -inline void destroy(T* p) -{ - p->~T(); -} - - -template -void destroy(Iter first, Iter last) -{ - while (first != last) { - destroy(&*first); - ++first; - } -} - - -template -PlaceIter uninit_copy(Iter first, Iter last, PlaceIter place) -{ - while (first != last) { - construct(&*place, *first); - ++first; - ++place; - } - return place; -} - - -template -PlaceIter uninit_fill_n(PlaceIter place, Size n, const T& value) -{ - while (n) { - construct(&*place, value); - --n; - ++place; - } - return place; -} - - -template -T* GetArrayMemory(size_t items) -{ - unsigned char* ret; - - #ifdef YASSL_LIB - ret = NEW_YS unsigned char[sizeof(T) * items]; - #else - ret = NEW_TC unsigned char[sizeof(T) * items]; - #endif - - return reinterpret_cast(ret); -} - - -template -void FreeArrayMemory(T* ptr) -{ - unsigned char* p = reinterpret_cast(ptr); - - #ifdef YASSL_LIB - yaSSL::ysArrayDelete(p); - #else - TaoCrypt::tcArrayDelete(p); - #endif -} - - - -inline void* GetMemory(size_t bytes) -{ - return GetArrayMemory(bytes); -} - - -inline void FreeMemory(void* ptr) -{ - FreeArrayMemory(ptr); -} - - - -} // namespace mySTL - -#endif // mySTL_HELPERS_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/mySTL/list.hpp b/externals/mysql/extlib/yassl/taocrypt/mySTL/list.hpp deleted file mode 100644 index 6a081cba5a..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/mySTL/list.hpp +++ /dev/null @@ -1,367 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* mySTL list implements a simple list - * - */ - -#ifndef mySTL_LIST_HPP -#define mySTL_LIST_HPP - - -#include "helpers.hpp" - - -namespace mySTL { - - - -template -class list { - -#ifdef __SUNPRO_CC -/* - Sun Forte 7 C++ v. 5.4 needs class 'node' public to be visible to - the nested class 'iterator' (a non-standard behaviour). -*/ -public: -#endif - - struct node { - node(T t) : prev_(0), next_(0), value_(t) {} - - node* prev_; - node* next_; - T value_; - }; -public: - list() : head_(0), tail_(0), sz_(0) {} - ~list(); - - void push_front(T); - void pop_front(); - T front() const; - void push_back(T); - void pop_back(); - T back() const; - bool remove(T); - size_t size() const { return sz_; } - bool empty() const { return sz_ == 0; } - - class iterator { - node* current_; - public: - explicit iterator(node* p = 0) : current_(p) {} - - T& operator*() const - { - return current_->value_; - } - - T* operator->() const - { - return &(operator*()); - } - - iterator& operator++() - { - current_ = current_->next_; - return *this; - } - - iterator& operator--() - { - current_ = current_->prev_; - return *this; - } - - iterator operator++(int) - { - iterator tmp = *this; - current_ = current_->next_; - return tmp; - } - - iterator operator--(int) - { - iterator tmp = *this; - current_ = current_->prev_; - return tmp; - } - - bool operator==(const iterator& other) const - { - return current_ == other.current_; - } - - bool operator!=(const iterator& other) const - { - return current_ != other.current_; - } - - friend class list; - }; - - - class reverse_iterator { - node* current_; - public: - explicit reverse_iterator(node* p = 0) : current_(p) {} - - T& operator*() const - { - return current_->value_; - } - - T* operator->() const - { - return &(operator*()); - } - - reverse_iterator& operator++() - { - current_ = current_->prev_; - return *this; - } - - reverse_iterator& operator--() - { - current_ = current_->next_; - return *this; - } - - reverse_iterator operator++(int) - { - reverse_iterator tmp = *this; - current_ = current_->prev_; - return tmp; - } - - reverse_iterator operator--(int) - { - reverse_iterator tmp = *this; - current_ = current_->next_; - return tmp; - } - - bool operator==(const reverse_iterator& other) const - { - return current_ == other.current_; - } - - bool operator!=(const reverse_iterator& other) const - { - return current_ != other.current_; - } - - friend class list; - }; - - bool erase(iterator); - - iterator begin() const { return iterator(head_); } - reverse_iterator rbegin() const { return reverse_iterator(tail_); } - iterator end() const { return iterator(); } - reverse_iterator rend() const { return reverse_iterator(); } - - typedef iterator const_iterator; // for now - - class underflow {}; - class overflow {}; -private: - node* head_; - node* tail_; - size_t sz_; - - node* look_up(T); - - list(const list&); // hide copy - list& operator=(const list&); // and assign -}; - - -template -list::~list() -{ - node* start = head_; - node* next_; - - for (; start; start = next_) { - next_ = start->next_; - destroy(start); - FreeMemory(start); - } -} - - -template -void list::push_front(T t) -{ - void* mem = GetMemory(sizeof(node)); - node* add = new (reinterpret_cast(mem)) node(t); - - if (head_) { - add->next_ = head_; - head_->prev_ = add; - } - else - tail_ = add; - - head_ = add; - ++sz_; -} - - -template -void list::pop_front() -{ - node* front = head_; - - if (head_ == 0) - return; - else if (head_ == tail_) - head_ = tail_ = 0; - else { - head_ = head_->next_; - head_->prev_ = 0; - } - destroy(front); - FreeMemory(front); - --sz_; -} - - -template -T list::front() const -{ - if (head_ == 0) return T(); - return head_->value_; -} - - -template -void list::push_back(T t) -{ - void* mem = GetMemory(sizeof(node)); - node* add = new (reinterpret_cast(mem)) node(t); - - if (tail_) { - tail_->next_ = add; - add->prev_ = tail_; - } - else - head_ = add; - - tail_ = add; - ++sz_; -} - - -template -void list::pop_back() -{ - node* rear = tail_; - - if (tail_ == 0) - return; - else if (tail_ == head_) - tail_ = head_ = 0; - else { - tail_ = tail_->prev_; - tail_->next_ = 0; - } - destroy(rear); - FreeMemory(rear); - --sz_; -} - - -template -T list::back() const -{ - if (tail_ == 0) return T(); - return tail_->value_; -} - - -template -typename list::node* list::look_up(T t) -{ - node* list = head_; - - if (list == 0) return 0; - - for (; list; list = list->next_) - if (list->value_ == t) - return list; - - return 0; -} - - -template -bool list::remove(T t) -{ - node* del = look_up(t); - - if (del == 0) - return false; - else if (del == head_) - pop_front(); - else if (del == tail_) - pop_back(); - else { - del->prev_->next_ = del->next_; - del->next_->prev_ = del->prev_; - - destroy(del); - FreeMemory(del); - --sz_; - } - return true; -} - - -template -bool list::erase(iterator iter) -{ - node* del = iter.current_; - - if (del == 0) - return false; - else if (del == head_) - pop_front(); - else if (del == tail_) - pop_back(); - else { - del->prev_->next_ = del->next_; - del->next_->prev_ = del->prev_; - - destroy(del); - FreeMemory(del); - --sz_; - } - return true; -} - - - -} // namespace mySTL - -#endif // mySTL_LIST_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/mySTL/memory.hpp b/externals/mysql/extlib/yassl/taocrypt/mySTL/memory.hpp deleted file mode 100644 index b239aa6f90..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/mySTL/memory.hpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* mySTL memory implements auto_ptr - * - */ - -#ifndef mySTL_MEMORY_HPP -#define mySTL_MEMORY_HPP - -#include "memory_array.hpp" // for auto_array - -#ifdef _MSC_VER - // disable operator-> warning for builtins - #pragma warning(disable:4284) -#endif - - -namespace mySTL { - - -template -struct auto_ptr_ref { - T* ptr_; - explicit auto_ptr_ref(T* p) : ptr_(p) {} -}; - - -template -class auto_ptr { - T* ptr_; - - void Destroy() - { - #ifdef YASSL_LIB - yaSSL::ysDelete(ptr_); - #else - TaoCrypt::tcDelete(ptr_); - #endif - } -public: - explicit auto_ptr(T* p = 0) : ptr_(p) {} - - ~auto_ptr() - { - Destroy(); - } - - - auto_ptr(auto_ptr& other) : ptr_(other.release()) {} - - auto_ptr& operator=(auto_ptr& that) - { - if (this != &that) { - Destroy(); - ptr_ = that.release(); - } - return *this; - } - - - T* operator->() const - { - return ptr_; - } - - T& operator*() const - { - return *ptr_; - } - - T* get() const - { - return ptr_; - } - - T* release() - { - T* tmp = ptr_; - ptr_ = 0; - return tmp; - } - - void reset(T* p = 0) - { - if (ptr_ != p) { - Destroy(); - ptr_ = p; - } - } - - // auto_ptr_ref conversions - auto_ptr(auto_ptr_ref ref) : ptr_(ref.ptr_) {} - - auto_ptr& operator=(auto_ptr_ref ref) - { - if (this->ptr_ != ref.ptr_) { - Destroy(); - ptr_ = ref.ptr_; - } - return *this; - } - - template - operator auto_ptr() - { - return auto_ptr(this->release()); - } - - template - operator auto_ptr_ref() - { - return auto_ptr_ref(this->release()); - } -}; - - -} // namespace mySTL - -#endif // mySTL_MEMORY_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/mySTL/memory_array.hpp b/externals/mysql/extlib/yassl/taocrypt/mySTL/memory_array.hpp deleted file mode 100644 index a044498cd9..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/mySTL/memory_array.hpp +++ /dev/null @@ -1,135 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* mySTL memory_arry implements auto_array - * - */ - -#ifndef mySTL_MEMORY_ARRAY_HPP -#define mySTL_MEMORY_ARRAY_HPP - - -#ifdef _MSC_VER - // disable operator-> warning for builtins - #pragma warning(disable:4284) -#endif - - -namespace mySTL { - - -template -struct auto_array_ref { - T* ptr_; - explicit auto_array_ref(T* p) : ptr_(p) {} -}; - - -template -class auto_array { - T* ptr_; - - void Destroy() - { - #ifdef YASSL_LIB - yaSSL::ysArrayDelete(ptr_); - #else - TaoCrypt::tcArrayDelete(ptr_); - #endif - } -public: - explicit auto_array(T* p = 0) : ptr_(p) {} - - ~auto_array() - { - Destroy(); - } - - - auto_array(auto_array& other) : ptr_(other.release()) {} - - auto_array& operator=(auto_array& that) - { - if (this != &that) { - Destroy(); - ptr_ = that.release(); - } - return *this; - } - - - T* operator->() const - { - return ptr_; - } - - T& operator*() const - { - return *ptr_; - } - - T* get() const - { - return ptr_; - } - - T* release() - { - T* tmp = ptr_; - ptr_ = 0; - return tmp; - } - - void reset(T* p = 0) - { - if (ptr_ != p) { - Destroy(); - ptr_ = p; - } - } - - // auto_array_ref conversions - auto_array(auto_array_ref ref) : ptr_(ref.ptr_) {} - - auto_array& operator=(auto_array_ref ref) - { - if (this->ptr_ != ref.ptr_) { - Destroy(); - ptr_ = ref.ptr_; - } - return *this; - } - - template - operator auto_array() - { - return auto_array(this->release()); - } - - template - operator auto_array_ref() - { - return auto_array_ref(this->release()); - } -}; - - -} // namespace mySTL - -#endif // mySTL_MEMORY_ARRAY_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/mySTL/pair.hpp b/externals/mysql/extlib/yassl/taocrypt/mySTL/pair.hpp deleted file mode 100644 index be2dbb14b8..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/mySTL/pair.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* mySTL pair implements pair - * - */ - -#ifndef mySTL_PAIR_HPP -#define mySTL_PAIR_HPP - - - -namespace mySTL { - - -template -struct pair { - typedef T1 first_type; - typedef T2 second_type; - - first_type first; - second_type second; - - pair() {} - pair(const T1& t1, const T2& t2) : first(t1), second(t2) {} - - template - pair(const pair& p) : first(p.first), second(p.second) {} -}; - - -template -inline pair make_pair(const T1& a, const T2& b) -{ - return pair(a, b); -} - - - -} // namespace mySTL - -#endif // mySTL_PAIR_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/mySTL/stdexcept.hpp b/externals/mysql/extlib/yassl/taocrypt/mySTL/stdexcept.hpp deleted file mode 100644 index 9696995248..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/mySTL/stdexcept.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* mySTL memory implements exception, runtime_error - * - */ - -#ifndef mySTL_STDEXCEPT_HPP -#define mySTL_STDEXCEPT_HPP - - -#include // strncpy -#include // assert -#include // size_t - - -namespace mySTL { - - -class exception { -public: - exception() {} - virtual ~exception() {} // to shut up compiler warnings - - virtual const char* what() const { return ""; } - - // for compiler generated call, never used - static void operator delete(void*) { assert(0); } -private: - // don't allow dynamic creation of exceptions - static void* operator new(size_t); -}; - - -class named_exception : public exception { -public: - enum { NAME_SIZE = 80 }; - - explicit named_exception(const char* str) - { - strncpy(name_, str, NAME_SIZE); - name_[NAME_SIZE - 1] = 0; - } - - virtual const char* what() const { return name_; } -private: - char name_[NAME_SIZE]; -}; - - -class runtime_error : public named_exception { -public: - explicit runtime_error(const char* str) : named_exception(str) {} -}; - - - - -} // namespace mySTL - -#endif // mySTL_STDEXCEPT_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/mySTL/vector.hpp b/externals/mysql/extlib/yassl/taocrypt/mySTL/vector.hpp deleted file mode 100644 index 8ba8813ca7..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/mySTL/vector.hpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* mySTL vector implements simple vector, w/ swap - * - */ - -#ifndef mySTL_VECTOR_HPP -#define mySTL_VECTOR_HPP - -#include "helpers.hpp" // construct, destory, fill, etc. -#include "algorithm.hpp" // swap -#include // assert - - -namespace mySTL { - - -template -struct vector_base { - T* start_; - T* finish_; - T* end_of_storage_; - - vector_base() : start_(0), finish_(0), end_of_storage_(0) {} - vector_base(size_t n) - { - start_ = GetArrayMemory(n); - finish_ = start_; - end_of_storage_ = start_ + n; - } - - ~vector_base() - { - FreeArrayMemory(start_); - } - - void Swap(vector_base& that) - { - swap(start_, that.start_); - swap(finish_, that.finish_); - swap(end_of_storage_, that.end_of_storage_); - } -}; - - - -template -class vector { -public: - typedef T* iterator; - typedef const T* const_iterator; - - vector() {} - explicit vector(size_t n) : vec_(n) - { - vec_.finish_ = uninit_fill_n(vec_.start_, n, T()); - } - - ~vector() { destroy(vec_.start_, vec_.finish_); } - - vector(const vector& other) : vec_(other.size()) - { - vec_.finish_ = uninit_copy(other.vec_.start_, other.vec_.finish_, - vec_.start_); - } - - size_t capacity() const { return vec_.end_of_storage_ - vec_.start_; } - - size_t size() const { return vec_.finish_ - vec_.start_; } - - T& operator[](size_t idx) { return *(vec_.start_ + idx); } - const T& operator[](size_t idx) const { return *(vec_.start_ + idx); } - - const T* begin() const { return vec_.start_; } - const T* end() const { return vec_.finish_; } - - void push_back(const T& v) - { - if (vec_.finish_ != vec_.end_of_storage_) { - construct(vec_.finish_, v); - ++vec_.finish_; - } - else { - vector tmp(size() * 2 + 1, *this); - construct(tmp.vec_.finish_, v); - ++tmp.vec_.finish_; - Swap(tmp); - } - } - - void resize(size_t n, const T& v) - { - if (n == size()) return; - - if (n < size()) { - T* first = vec_.start_ + n; - destroy(first, vec_.finish_); - vec_.finish_ -= vec_.finish_ - first; - } - else { - vector tmp(n, *this); - tmp.vec_.finish_ = uninit_fill_n(tmp.vec_.finish_, n - size(), v); - Swap(tmp); - } - } - - void reserve(size_t n) - { - if (capacity() < n) { - vector tmp(n, *this); - Swap(tmp); - } - } - - void Swap(vector& that) - { - vec_.Swap(that.vec_); - } -private: - vector_base vec_; - - vector& operator=(const vector&); // hide assign - - // for growing, n must be bigger than other size - vector(size_t n, const vector& other) : vec_(n) - { - assert(n > other.size()); - vec_.finish_ = uninit_copy(other.vec_.start_, other.vec_.finish_, - vec_.start_); - } -}; - - - -} // namespace mySTL - -#endif // mySTL_VECTOR_HPP diff --git a/externals/mysql/extlib/yassl/taocrypt/src/aes.cpp b/externals/mysql/extlib/yassl/taocrypt/src/aes.cpp deleted file mode 100644 index b2b42d3dcf..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/aes.cpp +++ /dev/null @@ -1,1814 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* C++ based on Wei Dai's aes.cpp from CryptoPP */ -/* x86 asm original */ - -#if defined(TAOCRYPT_KERNEL_MODE) - #define DO_TAOCRYPT_KERNEL_MODE -#endif // only some modules now support this - -#include "runtime.hpp" -#include "aes.hpp" - - -namespace TaoCrypt { - - -#if defined(DO_AES_ASM) - -// ia32 optimized version -void AES::Process(byte* out, const byte* in, word32 sz) -{ - if (!isMMX) { - Mode_BASE::Process(out, in, sz); - return; - } - - word32 blocks = sz / BLOCK_SIZE; - - if (mode_ == ECB) - while (blocks--) { - if (dir_ == ENCRYPTION) - AsmEncrypt(in, out, (void*)Te0); - else - AsmDecrypt(in, out, (void*)Td0); - out += BLOCK_SIZE; - in += BLOCK_SIZE; - } - else if (mode_ == CBC) - if (dir_ == ENCRYPTION) - while (blocks--) { - r_[0] ^= *(word32*)in; - r_[1] ^= *(word32*)(in + 4); - r_[2] ^= *(word32*)(in + 8); - r_[3] ^= *(word32*)(in + 12); - - AsmEncrypt((byte*)r_, (byte*)r_, (void*)Te0); - - memcpy(out, r_, BLOCK_SIZE); - out += BLOCK_SIZE; - in += BLOCK_SIZE; - } - else - while (blocks--) { - AsmDecrypt(in, out, (void*)Td0); - - *(word32*)out ^= r_[0]; - *(word32*)(out + 4) ^= r_[1]; - *(word32*)(out + 8) ^= r_[2]; - *(word32*)(out + 12) ^= r_[3]; - - memcpy(r_, in, BLOCK_SIZE); - out += BLOCK_SIZE; - in += BLOCK_SIZE; - } -} - -#endif // DO_AES_ASM - - -void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) -{ - assert( (keylen == 16) || (keylen == 24) || (keylen == 32) ); - - rounds_ = keylen/4 + 6; - - word32 temp, *rk = key_; - unsigned int i=0; - - GetUserKey(BigEndianOrder, rk, keylen/4, userKey, keylen); - - switch(keylen) - { - case 16: - while (true) - { - temp = rk[3]; - rk[4] = rk[0] ^ - (Te4[GETBYTE(temp, 2)] & 0xff000000) ^ - (Te4[GETBYTE(temp, 1)] & 0x00ff0000) ^ - (Te4[GETBYTE(temp, 0)] & 0x0000ff00) ^ - (Te4[GETBYTE(temp, 3)] & 0x000000ff) ^ - rcon_[i]; - rk[5] = rk[1] ^ rk[4]; - rk[6] = rk[2] ^ rk[5]; - rk[7] = rk[3] ^ rk[6]; - if (++i == 10) - break; - rk += 4; - } - break; - - case 24: - while (true) // for (;;) here triggers a bug in VC60 SP4 w/ Pro Pack - { - temp = rk[ 5]; - rk[ 6] = rk[ 0] ^ - (Te4[GETBYTE(temp, 2)] & 0xff000000) ^ - (Te4[GETBYTE(temp, 1)] & 0x00ff0000) ^ - (Te4[GETBYTE(temp, 0)] & 0x0000ff00) ^ - (Te4[GETBYTE(temp, 3)] & 0x000000ff) ^ - rcon_[i]; - rk[ 7] = rk[ 1] ^ rk[ 6]; - rk[ 8] = rk[ 2] ^ rk[ 7]; - rk[ 9] = rk[ 3] ^ rk[ 8]; - if (++i == 8) - break; - rk[10] = rk[ 4] ^ rk[ 9]; - rk[11] = rk[ 5] ^ rk[10]; - rk += 6; - } - break; - - case 32: - while (true) - { - temp = rk[ 7]; - rk[ 8] = rk[ 0] ^ - (Te4[GETBYTE(temp, 2)] & 0xff000000) ^ - (Te4[GETBYTE(temp, 1)] & 0x00ff0000) ^ - (Te4[GETBYTE(temp, 0)] & 0x0000ff00) ^ - (Te4[GETBYTE(temp, 3)] & 0x000000ff) ^ - rcon_[i]; - rk[ 9] = rk[ 1] ^ rk[ 8]; - rk[10] = rk[ 2] ^ rk[ 9]; - rk[11] = rk[ 3] ^ rk[10]; - if (++i == 7) - break; - temp = rk[11]; - rk[12] = rk[ 4] ^ - (Te4[GETBYTE(temp, 3)] & 0xff000000) ^ - (Te4[GETBYTE(temp, 2)] & 0x00ff0000) ^ - (Te4[GETBYTE(temp, 1)] & 0x0000ff00) ^ - (Te4[GETBYTE(temp, 0)] & 0x000000ff); - rk[13] = rk[ 5] ^ rk[12]; - rk[14] = rk[ 6] ^ rk[13]; - rk[15] = rk[ 7] ^ rk[14]; - - rk += 8; - } - break; - } - - if (dir_ == DECRYPTION) - { - unsigned int i, j; - rk = key_; - - /* invert the order of the round keys: */ - for (i = 0, j = 4*rounds_; i < j; i += 4, j -= 4) { - temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp; - temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; - temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; - temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; - } - // apply the inverse MixColumn transform to all round keys but the - // first and the last: - for (i = 1; i < rounds_; i++) { - rk += 4; - rk[0] = - Td0[Te4[GETBYTE(rk[0], 3)] & 0xff] ^ - Td1[Te4[GETBYTE(rk[0], 2)] & 0xff] ^ - Td2[Te4[GETBYTE(rk[0], 1)] & 0xff] ^ - Td3[Te4[GETBYTE(rk[0], 0)] & 0xff]; - rk[1] = - Td0[Te4[GETBYTE(rk[1], 3)] & 0xff] ^ - Td1[Te4[GETBYTE(rk[1], 2)] & 0xff] ^ - Td2[Te4[GETBYTE(rk[1], 1)] & 0xff] ^ - Td3[Te4[GETBYTE(rk[1], 0)] & 0xff]; - rk[2] = - Td0[Te4[GETBYTE(rk[2], 3)] & 0xff] ^ - Td1[Te4[GETBYTE(rk[2], 2)] & 0xff] ^ - Td2[Te4[GETBYTE(rk[2], 1)] & 0xff] ^ - Td3[Te4[GETBYTE(rk[2], 0)] & 0xff]; - rk[3] = - Td0[Te4[GETBYTE(rk[3], 3)] & 0xff] ^ - Td1[Te4[GETBYTE(rk[3], 2)] & 0xff] ^ - Td2[Te4[GETBYTE(rk[3], 1)] & 0xff] ^ - Td3[Te4[GETBYTE(rk[3], 0)] & 0xff]; - } - } -} - - -void AES::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out) const -{ - if (dir_ == ENCRYPTION) - encrypt(in, xOr, out); - else - decrypt(in, xOr, out); -} - - -typedef BlockGetAndPut gpBlock; - - -void AES::encrypt(const byte* inBlock, const byte* xorBlock, - byte* outBlock) const -{ - word32 s0, s1, s2, s3; - word32 t0, t1, t2, t3; - - const word32 *rk = key_; - /* - * map byte array block to cipher state - * and add initial round key: - */ - gpBlock::Get(inBlock)(s0)(s1)(s2)(s3); - s0 ^= rk[0]; - s1 ^= rk[1]; - s2 ^= rk[2]; - s3 ^= rk[3]; - - /* - * Nr - 1 full rounds: - */ - - unsigned int r = rounds_ >> 1; - for (;;) { - t0 = - Te0[GETBYTE(s0, 3)] ^ - Te1[GETBYTE(s1, 2)] ^ - Te2[GETBYTE(s2, 1)] ^ - Te3[GETBYTE(s3, 0)] ^ - rk[4]; - t1 = - Te0[GETBYTE(s1, 3)] ^ - Te1[GETBYTE(s2, 2)] ^ - Te2[GETBYTE(s3, 1)] ^ - Te3[GETBYTE(s0, 0)] ^ - rk[5]; - t2 = - Te0[GETBYTE(s2, 3)] ^ - Te1[GETBYTE(s3, 2)] ^ - Te2[GETBYTE(s0, 1)] ^ - Te3[GETBYTE(s1, 0)] ^ - rk[6]; - t3 = - Te0[GETBYTE(s3, 3)] ^ - Te1[GETBYTE(s0, 2)] ^ - Te2[GETBYTE(s1, 1)] ^ - Te3[GETBYTE(s2, 0)] ^ - rk[7]; - - rk += 8; - if (--r == 0) { - break; - } - - s0 = - Te0[GETBYTE(t0, 3)] ^ - Te1[GETBYTE(t1, 2)] ^ - Te2[GETBYTE(t2, 1)] ^ - Te3[GETBYTE(t3, 0)] ^ - rk[0]; - s1 = - Te0[GETBYTE(t1, 3)] ^ - Te1[GETBYTE(t2, 2)] ^ - Te2[GETBYTE(t3, 1)] ^ - Te3[GETBYTE(t0, 0)] ^ - rk[1]; - s2 = - Te0[GETBYTE(t2, 3)] ^ - Te1[GETBYTE(t3, 2)] ^ - Te2[GETBYTE(t0, 1)] ^ - Te3[GETBYTE(t1, 0)] ^ - rk[2]; - s3 = - Te0[GETBYTE(t3, 3)] ^ - Te1[GETBYTE(t0, 2)] ^ - Te2[GETBYTE(t1, 1)] ^ - Te3[GETBYTE(t2, 0)] ^ - rk[3]; - } - - /* - * apply last round and - * map cipher state to byte array block: - */ - - s0 = - (Te4[GETBYTE(t0, 3)] & 0xff000000) ^ - (Te4[GETBYTE(t1, 2)] & 0x00ff0000) ^ - (Te4[GETBYTE(t2, 1)] & 0x0000ff00) ^ - (Te4[GETBYTE(t3, 0)] & 0x000000ff) ^ - rk[0]; - s1 = - (Te4[GETBYTE(t1, 3)] & 0xff000000) ^ - (Te4[GETBYTE(t2, 2)] & 0x00ff0000) ^ - (Te4[GETBYTE(t3, 1)] & 0x0000ff00) ^ - (Te4[GETBYTE(t0, 0)] & 0x000000ff) ^ - rk[1]; - s2 = - (Te4[GETBYTE(t2, 3)] & 0xff000000) ^ - (Te4[GETBYTE(t3, 2)] & 0x00ff0000) ^ - (Te4[GETBYTE(t0, 1)] & 0x0000ff00) ^ - (Te4[GETBYTE(t1, 0)] & 0x000000ff) ^ - rk[2]; - s3 = - (Te4[GETBYTE(t3, 3)] & 0xff000000) ^ - (Te4[GETBYTE(t0, 2)] & 0x00ff0000) ^ - (Te4[GETBYTE(t1, 1)] & 0x0000ff00) ^ - (Te4[GETBYTE(t2, 0)] & 0x000000ff) ^ - rk[3]; - - - gpBlock::Put(xorBlock, outBlock)(s0)(s1)(s2)(s3); -} - - -void AES::decrypt(const byte* inBlock, const byte* xorBlock, - byte* outBlock) const -{ - word32 s0, s1, s2, s3; - word32 t0, t1, t2, t3; - const word32* rk = key_; - - /* - * map byte array block to cipher state - * and add initial round key: - */ - gpBlock::Get(inBlock)(s0)(s1)(s2)(s3); - s0 ^= rk[0]; - s1 ^= rk[1]; - s2 ^= rk[2]; - s3 ^= rk[3]; - - /* - * Nr - 1 full rounds: - */ - - unsigned int r = rounds_ >> 1; - for (;;) { - t0 = - Td0[GETBYTE(s0, 3)] ^ - Td1[GETBYTE(s3, 2)] ^ - Td2[GETBYTE(s2, 1)] ^ - Td3[GETBYTE(s1, 0)] ^ - rk[4]; - t1 = - Td0[GETBYTE(s1, 3)] ^ - Td1[GETBYTE(s0, 2)] ^ - Td2[GETBYTE(s3, 1)] ^ - Td3[GETBYTE(s2, 0)] ^ - rk[5]; - t2 = - Td0[GETBYTE(s2, 3)] ^ - Td1[GETBYTE(s1, 2)] ^ - Td2[GETBYTE(s0, 1)] ^ - Td3[GETBYTE(s3, 0)] ^ - rk[6]; - t3 = - Td0[GETBYTE(s3, 3)] ^ - Td1[GETBYTE(s2, 2)] ^ - Td2[GETBYTE(s1, 1)] ^ - Td3[GETBYTE(s0, 0)] ^ - rk[7]; - - rk += 8; - if (--r == 0) { - break; - } - - s0 = - Td0[GETBYTE(t0, 3)] ^ - Td1[GETBYTE(t3, 2)] ^ - Td2[GETBYTE(t2, 1)] ^ - Td3[GETBYTE(t1, 0)] ^ - rk[0]; - s1 = - Td0[GETBYTE(t1, 3)] ^ - Td1[GETBYTE(t0, 2)] ^ - Td2[GETBYTE(t3, 1)] ^ - Td3[GETBYTE(t2, 0)] ^ - rk[1]; - s2 = - Td0[GETBYTE(t2, 3)] ^ - Td1[GETBYTE(t1, 2)] ^ - Td2[GETBYTE(t0, 1)] ^ - Td3[GETBYTE(t3, 0)] ^ - rk[2]; - s3 = - Td0[GETBYTE(t3, 3)] ^ - Td1[GETBYTE(t2, 2)] ^ - Td2[GETBYTE(t1, 1)] ^ - Td3[GETBYTE(t0, 0)] ^ - rk[3]; - } - /* - * apply last round and - * map cipher state to byte array block: - */ - s0 = - (Td4[GETBYTE(t0, 3)] & 0xff000000) ^ - (Td4[GETBYTE(t3, 2)] & 0x00ff0000) ^ - (Td4[GETBYTE(t2, 1)] & 0x0000ff00) ^ - (Td4[GETBYTE(t1, 0)] & 0x000000ff) ^ - rk[0]; - s1 = - (Td4[GETBYTE(t1, 3)] & 0xff000000) ^ - (Td4[GETBYTE(t0, 2)] & 0x00ff0000) ^ - (Td4[GETBYTE(t3, 1)] & 0x0000ff00) ^ - (Td4[GETBYTE(t2, 0)] & 0x000000ff) ^ - rk[1]; - s2 = - (Td4[GETBYTE(t2, 3)] & 0xff000000) ^ - (Td4[GETBYTE(t1, 2)] & 0x00ff0000) ^ - (Td4[GETBYTE(t0, 1)] & 0x0000ff00) ^ - (Td4[GETBYTE(t3, 0)] & 0x000000ff) ^ - rk[2]; - s3 = - (Td4[GETBYTE(t3, 3)] & 0xff000000) ^ - (Td4[GETBYTE(t2, 2)] & 0x00ff0000) ^ - (Td4[GETBYTE(t1, 1)] & 0x0000ff00) ^ - (Td4[GETBYTE(t0, 0)] & 0x000000ff) ^ - rk[3]; - - gpBlock::Put(xorBlock, outBlock)(s0)(s1)(s2)(s3); -} - - -#if defined(DO_AES_ASM) - #ifdef __GNUC__ - #define AS1(x) asm(#x); - #define AS2(x, y) asm(#x ", " #y); - - #define PROLOG() \ - asm(".intel_syntax noprefix"); \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( sub esp, 4 ) \ - AS2( movd mm7, ebp ) \ - AS2( mov [ebp - 4], esi ) \ - AS2( mov ecx, DWORD PTR [ebp + 8] ) \ - AS2( mov esi, DWORD PTR [ebp + 12] ) \ - AS2( mov ebp, DWORD PTR [ebp + 20] ) - - #define EPILOG() \ - AS2( mov esi, [ebp - 4] ) \ - AS2( mov esp, ebp ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS1( emms ) \ - asm(".att_syntax"); - #else - #define AS1(x) __asm x - #define AS2(x, y) __asm x, y - - #define PROLOG() \ - AS1( push ebp ) \ - AS2( mov ebp, esp ) \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( sub esp, 4 ) \ - AS2( movd mm7, ebp ) \ - AS2( mov [ebp - 4], esi ) \ - AS2( mov esi, DWORD PTR [ebp + 8] ) \ - AS2( mov ebp, DWORD PTR [ebp + 16] ) - - // ebp is restored at end - #define EPILOG() \ - AS2( mov esi, [ebp - 4] ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS2( mov esp, ebp ) \ - AS1( pop ebp ) \ - AS1( emms ) \ - AS1( ret 12 ) - - - #endif - - -#ifdef _MSC_VER - __declspec(naked) -#endif -void AES::AsmEncrypt(const byte* inBlock, byte* outBlock, void* boxes) const -{ - - PROLOG() - - #ifdef OLD_GCC_OFFSET - AS2( mov edx, DWORD PTR [ecx + 60] ) // rounds - AS2( lea edi, [ecx + 64] ) // rk - #else - AS2( mov edx, DWORD PTR [ecx + 56] ) // rounds - AS2( lea edi, [ecx + 60] ) // rk - #endif - - AS1( dec edx ) - AS2( movd mm6, edi ) // save rk - AS2( movd mm5, edx ) // save rounds - - AS2( mov eax, DWORD PTR [esi] ) - AS2( mov ebx, DWORD PTR [esi + 4] ) - AS2( mov ecx, DWORD PTR [esi + 8] ) - AS2( mov edx, DWORD PTR [esi + 12] ) - - AS1( bswap eax ) - AS1( bswap ebx ) - AS1( bswap ecx ) - AS1( bswap edx ) - - AS2( xor eax, DWORD PTR [edi] ) // s0 - AS2( xor ebx, DWORD PTR [edi + 4] ) // s1 - AS2( xor ecx, DWORD PTR [edi + 8] ) // s2 - AS2( xor edx, DWORD PTR [edi + 12] ) // s3 - - AS1(loop1: ) - /* Put0 (mm0) = - Te0[get0,rs 24] ^ - Te1[get1,rs 16] ^ - Te2[get2,rs 8] ^ - Te3[get3,rs 0] - */ - - AS2( mov esi, eax ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + esi*4] ) - - AS2( mov edi, ebx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) - - AS2( movzx edi, ch ) - AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) - - AS2( movzx edi, dl ) - AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) - - AS2( movd mm0, esi ) - - /* Put1 (mm1) = - Te0[get1,rs 24] ^ - Te1[get2,rs 16] ^ - Te2[get3,rs 8] ^ - Te3[get0,rs 0] - */ - - AS2( mov esi, ebx ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + esi*4] ) - - AS2( mov edi, ecx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) - - AS2( movzx edi, dh ) - AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) - - AS2( movzx edi, al ) - AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) - - AS2( movd mm1, esi ) - - - /* Put2 (mm2) = - Te0[get2,rs 24] ^ - Te1[get3,rs 16] ^ - Te2[get0,rs 8] ^ - Te3[get1,rs 0] - */ - - AS2( mov esi, ecx ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + esi*4] ) - - AS2( mov edi, edx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) - - AS2( movzx edi, ah ) - AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) - - AS2( movzx edi, bl ) - AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) - - AS2( movd mm2, esi ) - - /* Put3 (edx) = - Te0[get3,rs 24] ^ - Te1[get0,rs 16] ^ - Te2[get1,rs 8] ^ - Te3[get2,rs 0] - */ - - AS2( mov esi, edx ) - AS2( shr esi, 24 ) - AS2( mov edx, DWORD PTR [ebp + esi*4] ) - - AS2( mov edi, eax ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( xor edx, DWORD PTR [ebp + 1024 + edi*4] ) - - AS2( movzx esi, bh ) - AS2( xor edx, DWORD PTR [ebp + 2048 + esi*4] ) - - AS2( movzx edi, cl ) - AS2( xor edx, DWORD PTR [ebp + 3072 + edi*4] ) - - // xOr - - AS2( movd esi, mm6 ) // rk - - AS2( movd eax, mm0 ) - AS2( add esi, 16 ) - AS2( movd ebx, mm1 ) - AS2( movd mm6, esi ) // save back - AS2( movd ecx, mm2 ) - - AS2( xor eax, DWORD PTR [esi] ) - AS2( xor ebx, DWORD PTR [esi + 4] ) - AS2( movd edi, mm5 ) - AS2( xor ecx, DWORD PTR [esi + 8] ) - AS2( xor edx, DWORD PTR [esi + 12] ) - - AS1( dec edi ) - AS2( movd mm5, edi ) - - AS1( jnz loop1 ) - - // last round - /* - Put0 (mm0) = - (Te4[get0, rs24] & 0xff000000) ^ h = 4278190080 - (Te4[get1, rs16] & 0x00ff0000) ^ h = 16711680 - (Te4[get2, rs 8] & 0x0000ff00) ^ h = 65280 - (Te4[get3, rs 0] & 0x000000ff) h = 255 - */ - AS2( mov esi, eax ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and esi, 4278190080 ) - - AS2( mov edi, ebx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 16711680 ) - AS2( xor esi, edi ) - - AS2( movzx edi, ch ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 65280 ) - AS2( xor esi, edi ) - - AS2( movzx edi, dl ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 255 ) - AS2( xor esi, edi ) - - AS2( movd mm0, esi ) - - /* - Put1 (mm1) = - (Te4[get1, rs24] & 0xff000000) ^ h = 4278190080 - (Te4[get2, rs16] & 0x00ff0000) ^ h = 16711680 - (Te4[get3, rs 8] & 0x0000ff00) ^ h = 65280 - (Te4[get0, rs 0] & 0x000000ff) h = 255 - */ - AS2( mov esi, ebx ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and esi, 4278190080 ) - - AS2( mov edi, ecx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 16711680 ) - AS2( xor esi, edi ) - - AS2( movzx edi, dh ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 65280 ) - AS2( xor esi, edi ) - - AS2( movzx edi, al ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 255 ) - AS2( xor esi, edi ) - - AS2( movd mm1, esi ) - - /* - Put2 (mm2) = - (Te4[get2, rs24] & 0xff000000) ^ h = 4278190080 - (Te4[get3, rs16] & 0x00ff0000) ^ h = 16711680 - (Te4[get0, rs 8] & 0x0000ff00) ^ h = 65280 - (Te4[get1, rs 0] & 0x000000ff) h = 255 - */ - AS2( mov esi, ecx ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and esi, 4278190080 ) - - AS2( mov edi, edx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 16711680 ) - AS2( xor esi, edi ) - - AS2( movzx edi, ah ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 65280 ) - AS2( xor esi, edi ) - - AS2( movzx edi, bl ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 255 ) - AS2( xor esi, edi ) - - AS2( movd mm2, esi ) - - /* - Put3 (edx) = - (Te4[get3, rs24] & 0xff000000) ^ h = 4278190080 - (Te4[get0, rs16] & 0x00ff0000) ^ h = 16711680 - (Te4[get1, rs 8] & 0x0000ff00) ^ h = 65280 - (Te4[get2, rs 0] & 0x000000ff) h = 255 - */ - AS2( mov esi, edx ) - AS2( shr esi, 24 ) - AS2( mov edx, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and edx, 4278190080 ) - - AS2( mov edi, eax ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and esi, 16711680 ) - AS2( xor edx, esi ) - - AS2( movzx esi, bh ) - AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and edi, 65280 ) - AS2( xor edx, edi ) - - AS2( movzx edi, cl ) - AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and esi, 255 ) - AS2( xor edx, esi ) - - - // xOr - AS2( movd eax, mm0 ) - AS2( movd esi, mm6 ) // rk - AS2( movd ebx, mm1 ) - AS2( add esi, 16 ) - AS2( movd ecx, mm2 ) - - AS2( xor eax, DWORD PTR [esi] ) - AS2( xor ebx, DWORD PTR [esi + 4] ) - AS2( xor ecx, DWORD PTR [esi + 8] ) - AS2( xor edx, DWORD PTR [esi + 12] ) - - // end - AS2( movd ebp, mm7 ) - - // swap - AS1( bswap eax ) - AS1( bswap ebx ) - - // store - #ifdef __GNUC__ - AS2( mov esi, DWORD PTR [ebp + 16] ) // outBlock - #else - AS2( mov esi, DWORD PTR [ebp + 12] ) // outBlock - #endif - - AS1( bswap ecx ) - AS1( bswap edx ) - - AS2( mov DWORD PTR [esi], eax ) - AS2( mov DWORD PTR [esi + 4], ebx ) - AS2( mov DWORD PTR [esi + 8], ecx ) - AS2( mov DWORD PTR [esi + 12], edx ) - - - EPILOG() -} - - -#ifdef _MSC_VER - __declspec(naked) -#endif -void AES::AsmDecrypt(const byte* inBlock, byte* outBlock, void* boxes) const -{ - - PROLOG() - - #ifdef OLD_GCC_OFFSET - AS2( mov edx, DWORD PTR [ecx + 60] ) // rounds - AS2( lea edi, [ecx + 64] ) // rk - #else - AS2( mov edx, DWORD PTR [ecx + 56] ) // rounds - AS2( lea edi, [ecx + 60] ) // rk - #endif - - AS1( dec edx ) - AS2( movd mm6, edi ) // save rk - AS2( movd mm5, edx ) // save rounds - - AS2( mov eax, DWORD PTR [esi] ) - AS2( mov ebx, DWORD PTR [esi + 4] ) - AS2( mov ecx, DWORD PTR [esi + 8] ) - AS2( mov edx, DWORD PTR [esi + 12] ) - - AS1( bswap eax ) - AS1( bswap ebx ) - AS1( bswap ecx ) - AS1( bswap edx ) - - AS2( xor eax, DWORD PTR [edi] ) // s0 - AS2( xor ebx, DWORD PTR [edi + 4] ) // s1 - AS2( xor ecx, DWORD PTR [edi + 8] ) // s2 - AS2( xor edx, DWORD PTR [edi + 12] ) // s3 - - - AS1(loop2: ) - /* Put0 (mm0) = - Td0[GETBYTE(get0, rs24)] ^ - Td1[GETBYTE(get3, rs16)] ^ - Td2[GETBYTE(get2, rs 8)] ^ - Td3[GETBYTE(tet1, )] - */ - AS2( mov esi, eax ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + esi*4] ) - - AS2( mov edi, edx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) - - AS2( movzx edi, ch ) - AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) - - AS2( movzx edi, bl ) - AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) - - AS2( movd mm0, esi ) - - /* Put1 (mm1) = - Td0[GETBYTE(get1, rs24)] ^ - Td1[GETBYTE(get0, rs16)] ^ - Td2[GETBYTE(get3, rs 8)] ^ - Td3[GETBYTE(tet2, )] - */ - AS2( mov esi, ebx ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + esi*4] ) - - AS2( mov edi, eax ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) - - AS2( movzx edi, dh ) - AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) - - AS2( movzx edi, cl ) - AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) - - AS2( movd mm1, esi ) - - /* Put2 (mm2) = - Td0[GETBYTE(get2, rs24)] ^ - Td1[GETBYTE(get1, rs16)] ^ - Td2[GETBYTE(get0, rs 8)] ^ - Td3[GETBYTE(tet3, )] - */ - AS2( mov esi, ecx ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + esi*4] ) - - AS2( mov edi, ebx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) - - AS2( movzx edi, ah ) - AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) - - AS2( movzx edi, dl ) - AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) - - AS2( movd mm2, esi ) - - /* Put3 (edx) = - Td0[GETBYTE(get3, rs24)] ^ - Td1[GETBYTE(get2, rs16)] ^ - Td2[GETBYTE(get1, rs 8)] ^ - Td3[GETBYTE(tet0, )] - */ - AS2( mov esi, edx ) - AS2( shr esi, 24 ) - AS2( mov edx, DWORD PTR [ebp + esi*4] ) - - AS2( mov edi, ecx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( xor edx, DWORD PTR [ebp + 1024 + edi*4] ) - - AS2( movzx esi, bh ) - AS2( xor edx, DWORD PTR [ebp + 2048 + esi*4] ) - - AS2( movzx edi, al ) - AS2( xor edx, DWORD PTR [ebp + 3072 + edi*4] ) - - - // xOr - - AS2( movd esi, mm6 ) // rk - AS2( add esi, 16 ) - AS2( movd mm6, esi ) // save back - - AS2( movd eax, mm0 ) - AS2( movd ebx, mm1 ) - AS2( movd ecx, mm2 ) - - AS2( xor eax, DWORD PTR [esi] ) - AS2( xor ebx, DWORD PTR [esi + 4] ) - AS2( xor ecx, DWORD PTR [esi + 8] ) - AS2( xor edx, DWORD PTR [esi + 12] ) - - AS2( movd edi, mm5 ) - AS1( dec edi ) - AS2( movd mm5, edi ) - - AS1( jnz loop2 ) - - // last round - /* - Put0 (mm0) = - (Td4[get0, rs24] & 0xff000000) ^ h = 4278190080 - (Td4[get3, rs16] & 0x00ff0000) ^ h = 16711680 - (Td4[get2, rs 8] & 0x0000ff00) ^ h = 65280 - (Td4[get1, rs 0] & 0x000000ff) h = 255 - */ - AS2( mov esi, eax ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and esi, 4278190080 ) - - AS2( mov edi, edx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 16711680 ) - AS2( xor esi, edi ) - - AS2( movzx edi, ch ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 65280 ) - AS2( xor esi, edi ) - - AS2( movzx edi, bl ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 255 ) - AS2( xor esi, edi ) - - AS2( movd mm0, esi ) - - /* - Put1 (mm1) = - (Td4[get1, rs24] & 0xff000000) ^ h = 4278190080 - (Td4[get0, rs16] & 0x00ff0000) ^ h = 16711680 - (Td4[get3, rs 8] & 0x0000ff00) ^ h = 65280 - (Td4[get2, rs 0] & 0x000000ff) h = 255 - */ - AS2( mov esi, ebx ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and esi, 4278190080 ) - - AS2( mov edi, eax ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 16711680 ) - AS2( xor esi, edi ) - - AS2( movzx edi, dh ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 65280 ) - AS2( xor esi, edi ) - - AS2( movzx edi, cl ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 255 ) - AS2( xor esi, edi ) - - AS2( movd mm1, esi ) - - /* - Put2 (mm2) = - (Td4[get2, rs24] & 0xff000000) ^ h = 4278190080 - (Td4[get1, rs16] & 0x00ff0000) ^ h = 16711680 - (Td4[get0, rs 8] & 0x0000ff00) ^ h = 65280 - (Td4[get3, rs 0] & 0x000000ff) h = 255 - */ - AS2( mov esi, ecx ) - AS2( shr esi, 24 ) - AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and esi, 4278190080 ) - - AS2( mov edi, ebx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 16711680 ) - AS2( xor esi, edi ) - - AS2( movzx edi, ah ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 65280 ) - AS2( xor esi, edi ) - - AS2( movzx edi, dl ) - AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and edi, 255 ) - AS2( xor esi, edi ) - - AS2( movd mm2, esi ) - - /* - Put3 (edx) = - (Td4[get3, rs24] & 0xff000000) ^ h = 4278190080 - (Td4[get2, rs16] & 0x00ff0000) ^ h = 16711680 - (Td4[get1, rs 8] & 0x0000ff00) ^ h = 65280 - (Td4[get0, rs 0] & 0x000000ff) h = 255 - */ - AS2( mov esi, edx ) - AS2( shr esi, 24 ) - AS2( mov edx, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and edx, 4278190080 ) - - AS2( mov edi, ecx ) - AS2( shr edi, 16 ) - AS2( and edi, 255 ) - AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and esi, 16711680 ) - AS2( xor edx, esi ) - - AS2( movzx esi, bh ) - AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] ) - AS2( and edi, 65280 ) - AS2( xor edx, edi ) - - AS2( movzx edi, al ) - AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) - AS2( and esi, 255 ) - AS2( xor edx, esi ) - - - // xOr - AS2( movd esi, mm6 ) // rk - AS2( add esi, 16 ) - - AS2( movd eax, mm0 ) - AS2( movd ebx, mm1 ) - AS2( movd ecx, mm2 ) - - AS2( xor eax, DWORD PTR [esi] ) - AS2( xor ebx, DWORD PTR [esi + 4] ) - AS2( xor ecx, DWORD PTR [esi + 8] ) - AS2( xor edx, DWORD PTR [esi + 12] ) - - // end - AS2( movd ebp, mm7 ) - - // swap - AS1( bswap eax ) - AS1( bswap ebx ) - AS1( bswap ecx ) - AS1( bswap edx ) - - // store - #ifdef __GNUC__ - AS2( mov esi, DWORD PTR [ebp + 16] ) // outBlock - #else - AS2( mov esi, DWORD PTR [ebp + 12] ) // outBlock - #endif - AS2( mov DWORD PTR [esi], eax ) - AS2( mov DWORD PTR [esi + 4], ebx ) - AS2( mov DWORD PTR [esi + 8], ecx ) - AS2( mov DWORD PTR [esi + 12], edx ) - - - EPILOG() -} - - - -#endif // defined(DO_AES_ASM) - - - -const word32 AES::Te[5][256] = { -{ - 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, - 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, - 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, - 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, - 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, - 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, - 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, - 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, - 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, - 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, - 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, - 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, - 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, - 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, - 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, - 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, - 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, - 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, - 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, - 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, - 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, - 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, - 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, - 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, - 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, - 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, - 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, - 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, - 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, - 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, - 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, - 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, - 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, - 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, - 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, - 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, - 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, - 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, - 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, - 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, - 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, - 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, - 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, - 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, - 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, - 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, - 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, - 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, - 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, - 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, - 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, - 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, - 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, - 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, - 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, - 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, - 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, - 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, - 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, - 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, - 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, - 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, - 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, - 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, -}, -{ - 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, - 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, - 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, - 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, - 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, - 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, - 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, - 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, - 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, - 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, - 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, - 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, - 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, - 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, - 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, - 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, - 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, - 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, - 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, - 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, - 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, - 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, - 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, - 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, - 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, - 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, - 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, - 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, - 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, - 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, - 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, - 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, - 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, - 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, - 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, - 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, - 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, - 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, - 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, - 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, - 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, - 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, - 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, - 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, - 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, - 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, - 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, - 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, - 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, - 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, - 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, - 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, - 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, - 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, - 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, - 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, - 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, - 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, - 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, - 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, - 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, - 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, - 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, - 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, -}, -{ - 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, - 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, - 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, - 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, - 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, - 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, - 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, - 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, - 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, - 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, - 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, - 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, - 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, - 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, - 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, - 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, - 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, - 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, - 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, - 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, - 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, - 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, - 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, - 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, - 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, - 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, - 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, - 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, - 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, - 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, - 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, - 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, - 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, - 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, - 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, - 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, - 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, - 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, - 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, - 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, - 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, - 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, - 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, - 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, - 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, - 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, - 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, - 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, - 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, - 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, - 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, - 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, - 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, - 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, - 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, - 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, - 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, - 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, - 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, - 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, - 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, - 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, - 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, - 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, -}, -{ - 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, - 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, - 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, - 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, - 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, - 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, - 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, - 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, - 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, - 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, - 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, - 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, - 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, - 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, - 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, - 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, - 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, - 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, - 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, - 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, - 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, - 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, - 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, - 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, - 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, - 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, - 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, - 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, - 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, - 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, - 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, - 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, - 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, - 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, - 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, - 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, - 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, - 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, - 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, - 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, - 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, - 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, - 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, - 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, - 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, - 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, - 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, - 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, - 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, - 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, - 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, - 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, - 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, - 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, - 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, - 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, - 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, - 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, - 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, - 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, - 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, - 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, - 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, - 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, -}, -{ - 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, - 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, - 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, - 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, - 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, - 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, - 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, - 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, - 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, - 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, - 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, - 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, - 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, - 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, - 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, - 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, - 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, - 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, - 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, - 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, - 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, - 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, - 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, - 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, - 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, - 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, - 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, - 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, - 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, - 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, - 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, - 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, - 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, - 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, - 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, - 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, - 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, - 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, - 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, - 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, - 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, - 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, - 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, - 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, - 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, - 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, - 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, - 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, - 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, - 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, - 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, - 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, - 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, - 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, - 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, - 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, - 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, - 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, - 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, - 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, - 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, - 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, - 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, - 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, -} -}; - - -const word32 AES::Td[5][256] = { -{ - 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, - 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, - 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, - 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, - 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, - 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, - 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, - 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, - 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, - 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, - 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, - 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, - 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, - 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, - 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, - 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, - 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, - 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, - 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, - 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, - 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, - 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, - 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, - 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, - 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, - 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, - 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, - 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, - 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, - 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, - 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, - 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, - 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, - 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, - 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, - 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, - 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, - 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, - 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, - 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, - 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, - 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, - 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, - 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, - 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, - 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, - 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, - 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, - 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, - 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, - 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, - 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, - 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, - 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, - 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, - 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, - 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, - 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, - 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, - 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, - 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, - 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, - 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, - 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, -}, -{ - 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, - 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, - 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, - 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, - 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, - 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, - 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, - 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, - 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, - 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, - 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, - 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, - 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, - 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, - 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, - 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, - 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, - 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, - 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, - 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, - 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, - 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, - 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, - 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, - 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, - 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, - 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, - 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, - 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, - 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, - 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, - 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, - 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, - 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, - 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, - 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, - 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, - 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, - 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, - 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, - 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, - 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, - 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, - 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, - 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, - 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, - 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, - 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, - 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, - 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, - 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, - 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, - 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, - 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, - 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, - 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, - 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, - 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, - 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, - 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, - 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, - 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, - 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, - 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, -}, -{ - 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, - 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, - 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, - 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, - 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, - 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, - 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, - 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, - 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, - 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, - 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, - 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, - 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, - 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, - 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, - 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, - 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, - 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, - 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, - 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, - - 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, - 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, - 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, - 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, - 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, - 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, - 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, - 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, - 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, - 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, - 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, - 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, - 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, - 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, - 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, - 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, - 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, - 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, - 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, - 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, - 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, - 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, - 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, - 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, - 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, - 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, - 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, - 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, - 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, - 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, - 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, - 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, - 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, - 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, - 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, - 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, - 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, - 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, - 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, - 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, - 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, - 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, - 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, - 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, -}, -{ - 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, - 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, - 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, - 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, - 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, - 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, - 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, - 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, - 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, - 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, - 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, - 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, - 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, - 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, - 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, - 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, - 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, - 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, - 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, - 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, - 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, - 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, - 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, - 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, - 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, - 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, - 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, - 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, - 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, - 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, - 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, - 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, - 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, - 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, - 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, - 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, - 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, - 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, - 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, - 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, - 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, - 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, - 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, - 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, - 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, - 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, - 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, - 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, - 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, - 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, - 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, - 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, - 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, - 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, - 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, - 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, - 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, - 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, - 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, - 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, - 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, - 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, - 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, - 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, -}, -{ - 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U, - 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U, - 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU, - 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU, - 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U, - 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U, - 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U, - 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU, - 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U, - 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU, - 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU, - 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU, - 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U, - 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U, - 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U, - 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U, - 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U, - 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U, - 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU, - 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U, - 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U, - 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU, - 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U, - 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U, - 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U, - 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU, - 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U, - 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U, - 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU, - 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U, - 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U, - 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU, - 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U, - 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU, - 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU, - 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U, - 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U, - 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U, - 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U, - 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU, - 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U, - 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U, - 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU, - 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU, - 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU, - 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U, - 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU, - 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U, - 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U, - 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U, - 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U, - 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU, - 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U, - 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU, - 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU, - 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU, - 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU, - 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U, - 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU, - 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U, - 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU, - 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U, - 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, - 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, -} -}; - - -const word32* AES::Te0 = AES::Te[0]; -const word32* AES::Te1 = AES::Te[1]; -const word32* AES::Te2 = AES::Te[2]; -const word32* AES::Te3 = AES::Te[3]; -const word32* AES::Te4 = AES::Te[4]; - -const word32* AES::Td0 = AES::Td[0]; -const word32* AES::Td1 = AES::Td[1]; -const word32* AES::Td2 = AES::Td[2]; -const word32* AES::Td3 = AES::Td[3]; -const word32* AES::Td4 = AES::Td[4]; - - - -} // namespace - diff --git a/externals/mysql/extlib/yassl/taocrypt/src/aestables.cpp b/externals/mysql/extlib/yassl/taocrypt/src/aestables.cpp deleted file mode 100644 index e9d6b7a80c..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/aestables.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's aestables.cpp from CryptoPP */ - -#include "runtime.hpp" -#include "aes.hpp" - - -namespace TaoCrypt { - - -const word32 AES::rcon_[] = { - 0x01000000, 0x02000000, 0x04000000, 0x08000000, - 0x10000000, 0x20000000, 0x40000000, 0x80000000, - 0x1B000000, 0x36000000, - /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ -}; - - - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/algebra.cpp b/externals/mysql/extlib/yassl/taocrypt/src/algebra.cpp deleted file mode 100644 index cb597c4155..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/algebra.cpp +++ /dev/null @@ -1,339 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's algebra.cpp from CryptoPP */ -#undef NDEBUG -#define DEBUG // GCC 4.0 bug if NDEBUG and Optimize > 1 - -#include "runtime.hpp" -#include "algebra.hpp" -#ifdef USE_SYS_STL - #include -#else - #include "vector.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - -namespace TaoCrypt { - - -const Integer& AbstractGroup::Double(const Element &a) const -{ - return Add(a, a); -} - -const Integer& AbstractGroup::Subtract(const Element &a, const Element &b) const -{ - // make copy of a in case Inverse() overwrites it - Element a1(a); - return Add(a1, Inverse(b)); -} - -Integer& AbstractGroup::Accumulate(Element &a, const Element &b) const -{ - return a = Add(a, b); -} - -Integer& AbstractGroup::Reduce(Element &a, const Element &b) const -{ - return a = Subtract(a, b); -} - -const Integer& AbstractRing::Square(const Element &a) const -{ - return Multiply(a, a); -} - - -const Integer& AbstractRing::Divide(const Element &a, const Element &b) const -{ - // make copy of a in case MultiplicativeInverse() overwrites it - Element a1(a); - return Multiply(a1, MultiplicativeInverse(b)); -} - - -const Integer& AbstractEuclideanDomain::Mod(const Element &a, - const Element &b) const -{ - Element q; - DivisionAlgorithm(result, q, a, b); - return result; -} - -const Integer& AbstractEuclideanDomain::Gcd(const Element &a, - const Element &b) const -{ - STL::vector g(3); - g[0]= b; - g[1]= a; - unsigned int i0=0, i1=1, i2=2; - - while (!Equal(g[i1], this->Identity())) - { - g[i2] = Mod(g[i0], g[i1]); - unsigned int t = i0; i0 = i1; i1 = i2; i2 = t; - } - - return result = g[i0]; -} - - -Integer AbstractGroup::ScalarMultiply(const Element &base, - const Integer &exponent) const -{ - Element result; - SimultaneousMultiply(&result, base, &exponent, 1); - return result; -} - - -Integer AbstractGroup::CascadeScalarMultiply(const Element &x, - const Integer &e1, const Element &y, const Integer &e2) const -{ - const unsigned expLen = max(e1.BitCount(), e2.BitCount()); - if (expLen==0) - return Identity(); - - const unsigned w = (expLen <= 46 ? 1 : (expLen <= 260 ? 2 : 3)); - const unsigned tableSize = 1< powerTable(tableSize << w); - - powerTable[1] = x; - powerTable[tableSize] = y; - if (w==1) - powerTable[3] = Add(x,y); - else - { - powerTable[2] = Double(x); - powerTable[2*tableSize] = Double(y); - - unsigned i, j; - - for (i=3; i=0; i--) - { - power1 = 2*power1 + e1.GetBit(i); - power2 = 2*power2 + e2.GetBit(i); - - if (i==0 || 2*power1 >= tableSize || 2*power2 >= tableSize) - { - unsigned squaresBefore = prevPosition-i; - unsigned squaresAfter = 0; - prevPosition = i; - while ((power1 || power2) && power1%2 == 0 && power2%2==0) - { - power1 /= 2; - power2 /= 2; - squaresBefore--; - squaresAfter++; - } - if (firstTime) - { - result = powerTable[(power2<= expLen) - { - finished = true; - return; - } - skipCount++; - } - - exp >>= skipCount; - windowBegin += skipCount; - expWindow = exp % (1 << windowSize); - - if (fastNegate && exp.GetBit(windowSize)) - { - negateNext = true; - expWindow = (1 << windowSize) - expWindow; - exp += windowModulus; - } - else - negateNext = false; - } - - Integer exp, windowModulus; - unsigned int windowSize, windowBegin, expWindow; - bool fastNegate, negateNext, firstTime, finished; -}; - - -void AbstractGroup::SimultaneousMultiply(Integer *results, const Integer &base, - const Integer *expBegin, unsigned int expCount) const -{ - STL::vector > buckets(expCount); - STL::vector exponents; - exponents.reserve(expCount); - unsigned int i; - - for (i=0; iNotNegative()); - exponents.push_back(WindowSlider(*expBegin++, InversionIsFast(), 0)); - exponents[i].FindNextWindow(); - buckets[i].resize(1<<(exponents[i].windowSize-1), Identity()); - } - - unsigned int expBitPosition = 0; - Element g = base; - bool notDone = true; - - while (notDone) - { - notDone = false; - for (i=0; i 1) - { - for (int j = buckets[i].size()-2; j >= 1; j--) - { - Accumulate(buckets[i][j], buckets[i][j+1]); - Accumulate(r, buckets[i][j]); - } - Accumulate(buckets[i][0], buckets[i][1]); - r = Add(Double(r), buckets[i][0]); - } - } -} - -Integer AbstractRing::Exponentiate(const Element &base, - const Integer &exponent) const -{ - Element result; - SimultaneousExponentiate(&result, base, &exponent, 1); - return result; -} - - -Integer AbstractRing::CascadeExponentiate(const Element &x, - const Integer &e1, const Element &y, const Integer &e2) const -{ - return MultiplicativeGroup().AbstractGroup::CascadeScalarMultiply( - x, e1, y, e2); -} - - -void AbstractRing::SimultaneousExponentiate(Integer *results, - const Integer &base, - const Integer *exponents, unsigned int expCount) const -{ - MultiplicativeGroup().AbstractGroup::SimultaneousMultiply(results, base, - exponents, expCount); -} - - -} // namespace - - -#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION -namespace mySTL { -template TaoCrypt::WindowSlider* uninit_copy(TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*); -template void destroy(TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*); -template TaoCrypt::WindowSlider* GetArrayMemory(size_t); -template void FreeArrayMemory(TaoCrypt::WindowSlider*); -} -#endif - diff --git a/externals/mysql/extlib/yassl/taocrypt/src/arc4.cpp b/externals/mysql/extlib/yassl/taocrypt/src/arc4.cpp deleted file mode 100644 index 0944cc3183..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/arc4.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's arc4.cpp from CryptoPP */ - -#include "runtime.hpp" -#include "arc4.hpp" - - -#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM) - #define DO_ARC4_ASM -#endif - - -namespace TaoCrypt { - -void ARC4::SetKey(const byte* key, word32 length) -{ - x_ = 1; - y_ = 0; - - word32 i; - - for (i = 0; i < STATE_SIZE; i++) - state_[i] = i; - - word32 keyIndex = 0, stateIndex = 0; - - for (i = 0; i < STATE_SIZE; i++) { - word32 a = state_[i]; - stateIndex += key[keyIndex] + a; - stateIndex &= 0xFF; - state_[i] = state_[stateIndex]; - state_[stateIndex] = a; - - if (++keyIndex >= length) - keyIndex = 0; - } -} - - -// local -namespace { - -inline unsigned int MakeByte(word32& x, word32& y, byte* s) -{ - word32 a = s[x]; - y = (y+a) & 0xff; - - word32 b = s[y]; - s[x] = b; - s[y] = a; - x = (x+1) & 0xff; - - return s[(a+b) & 0xff]; -} - -} // namespace - - - -void ARC4::Process(byte* out, const byte* in, word32 length) -{ - if (length == 0) return; - -#ifdef DO_ARC4_ASM - if (isMMX) { - AsmProcess(out, in, length); - return; - } -#endif - - byte *const s = state_; - word32 x = x_; - word32 y = y_; - - if (in == out) - while (length--) - *out++ ^= MakeByte(x, y, s); - else - while(length--) - *out++ = *in++ ^ MakeByte(x, y, s); - x_ = x; - y_ = y; -} - - - -#ifdef DO_ARC4_ASM - -#ifdef _MSC_VER - __declspec(naked) -#else - __attribute__ ((noinline)) -#endif -void ARC4::AsmProcess(byte* out, const byte* in, word32 length) -{ -#ifdef __GNUC__ - #define AS1(x) asm(#x); - #define AS2(x, y) asm(#x ", " #y); - - #define PROLOG() \ - asm(".intel_syntax noprefix"); \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov ecx, DWORD PTR [ebp + 8] ) \ - AS2( mov edi, DWORD PTR [ebp + 12] ) \ - AS2( mov esi, DWORD PTR [ebp + 16] ) \ - AS2( mov ebp, DWORD PTR [ebp + 20] ) - - #define EPILOG() \ - AS2( movd ebp, mm6 ) \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( mov esp, ebp ) \ - AS2( movd edi, mm3 ) \ - AS1( emms ) \ - asm(".att_syntax"); -#else - #define AS1(x) __asm x - #define AS2(x, y) __asm x, y - - #define PROLOG() \ - AS1( push ebp ) \ - AS2( mov ebp, esp ) \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov edi, DWORD PTR [ebp + 8] ) \ - AS2( mov esi, DWORD PTR [ebp + 12] ) \ - AS2( mov ebp, DWORD PTR [ebp + 16] ) - - #define EPILOG() \ - AS2( movd ebp, mm6 ) \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS2( mov esp, ebp ) \ - AS1( pop ebp ) \ - AS1( emms ) \ - AS1( ret 12 ) - -#endif - - PROLOG() - - AS2( sub esp, 4 ) // make room - - AS2( cmp ebp, 0 ) - AS1( jz nothing ) - - AS2( mov [esp], ebp ) // length - - AS2( movzx edx, BYTE PTR [ecx + 1] ) // y - AS2( lea ebp, [ecx + 2] ) // state_ - AS2( movzx ecx, BYTE PTR [ecx] ) // x - - // setup loop - // a = s[x]; - AS2( movzx eax, BYTE PTR [ebp + ecx] ) - - -AS1( begin: ) - - // y = (y+a) & 0xff; - AS2( add edx, eax ) - AS2( and edx, 255 ) - - // b = s[y]; - AS2( movzx ebx, BYTE PTR [ebp + edx] ) - - // s[x] = b; - AS2( mov [ebp + ecx], bl ) - - // s[y] = a; - AS2( mov [ebp + edx], al ) - - // x = (x+1) & 0xff; - AS1( inc ecx ) - AS2( and ecx, 255 ) - - //return s[(a+b) & 0xff]; - AS2( add eax, ebx ) - AS2( and eax, 255 ) - - AS2( movzx ebx, BYTE PTR [ebp + eax] ) - - // a = s[x]; for next round - AS2( movzx eax, BYTE PTR [ebp + ecx] ) - - // xOr w/ inByte - AS2( xor bl, BYTE PTR [esi] ) - AS1( inc esi ) - - // write to outByte - AS2( mov [edi], bl ) - AS1( inc edi ) - - AS1( dec DWORD PTR [esp] ) - AS1( jnz begin ) - - - // write back to x_ and y_ - AS2( mov [ebp - 2], cl ) - AS2( mov [ebp - 1], dl ) - - -AS1( nothing: ) - - - EPILOG() -} - -#endif // DO_ARC4_ASM - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/asn.cpp b/externals/mysql/extlib/yassl/taocrypt/src/asn.cpp deleted file mode 100644 index a06ab658c7..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/asn.cpp +++ /dev/null @@ -1,1185 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* asn.cpp implements ASN1 BER, PublicKey, and x509v3 decoding -*/ - -#include "runtime.hpp" -#include "asn.hpp" -#include "file.hpp" -#include "integer.hpp" -#include "rsa.hpp" -#include "dsa.hpp" -#include "dh.hpp" -#include "md5.hpp" -#include "md2.hpp" -#include "sha.hpp" -#include "coding.hpp" -#include // gmtime(); -#include "memory.hpp" // some auto_ptr don't have reset, also need auto_array - - -namespace TaoCrypt { - -namespace { // locals - - -// to the minute -bool operator>(tm& a, tm& b) -{ - if (a.tm_year > b.tm_year) - return true; - - if (a.tm_year == b.tm_year && a.tm_mon > b.tm_mon) - return true; - - if (a.tm_year == b.tm_year && a.tm_mon == b.tm_mon && a.tm_mday >b.tm_mday) - return true; - - if (a.tm_year == b.tm_year && a.tm_mon == b.tm_mon && - a.tm_mday == b.tm_mday && a.tm_hour > b.tm_hour) - return true; - - if (a.tm_year == b.tm_year && a.tm_mon == b.tm_mon && - a.tm_mday == b.tm_mday && a.tm_hour == b.tm_hour && - a.tm_min > b.tm_min) - return true; - - return false; -} - - -bool operator<(tm& a, tm&b) -{ - return !(a>b); -} - - -// like atoi but only use first byte -word32 btoi(byte b) -{ - return b - 0x30; -} - - -// two byte date/time, add to value -void GetTime(int& value, const byte* date, int& i) -{ - value += btoi(date[i++]) * 10; - value += btoi(date[i++]); -} - - -// Make sure before and after dates are valid -bool ValidateDate(const byte* date, byte format, CertDecoder::DateType dt) -{ - tm certTime; - memset(&certTime, 0, sizeof(certTime)); - int i = 0; - - if (format == UTC_TIME) { - if (btoi(date[0]) >= 5) - certTime.tm_year = 1900; - else - certTime.tm_year = 2000; - } - else { // format == GENERALIZED_TIME - certTime.tm_year += btoi(date[i++]) * 1000; - certTime.tm_year += btoi(date[i++]) * 100; - } - - GetTime(certTime.tm_year, date, i); certTime.tm_year -= 1900; // adjust - GetTime(certTime.tm_mon, date, i); certTime.tm_mon -= 1; // adjust - GetTime(certTime.tm_mday, date, i); - GetTime(certTime.tm_hour, date, i); - GetTime(certTime.tm_min, date, i); - GetTime(certTime.tm_sec, date, i); - - assert(date[i] == 'Z'); // only Zulu supported for this profile - - time_t ltime = time(0); - tm* localTime = gmtime(<ime); - - if (dt == CertDecoder::BEFORE) { - if (*localTime < certTime) - return false; - } - else - if (*localTime > certTime) - return false; - - return true; -} - - -class BadCertificate {}; - -} // local namespace - - - -// used by Integer as well -word32 GetLength(Source& source) -{ - word32 length = 0; - - byte b = source.next(); - if (b >= LONG_LENGTH) { - word32 bytes = b & 0x7F; - - while (bytes--) { - b = source.next(); - length = (length << 8) | b; - } - } - else - length = b; - - return length; -} - - -word32 SetLength(word32 length, byte* output) -{ - word32 i = 0; - - if (length < LONG_LENGTH) - output[i++] = length; - else { - output[i++] = BytePrecision(length) | 0x80; - - for (int j = BytePrecision(length); j; --j) { - output[i] = length >> (j - 1) * 8; - i++; - } - } - return i; -} - - -PublicKey::PublicKey(const byte* k, word32 s) : key_(0), sz_(0) -{ - if (s) { - SetSize(s); - SetKey(k); - } -} - - -void PublicKey::SetSize(word32 s) -{ - sz_ = s; - key_ = NEW_TC byte[sz_]; -} - - -void PublicKey::SetKey(const byte* k) -{ - memcpy(key_, k, sz_); -} - - -void PublicKey::AddToEnd(const byte* data, word32 len) -{ - mySTL::auto_array tmp(NEW_TC byte[sz_ + len]); - - memcpy(tmp.get(), key_, sz_); - memcpy(tmp.get() + sz_, data, len); - - byte* del = 0; - STL::swap(del, key_); - tcArrayDelete(del); - - key_ = tmp.release(); - sz_ += len; -} - - -Signer::Signer(const byte* k, word32 kSz, const char* n, const byte* h) - : key_(k, kSz) -{ - int sz = strlen(n); - memcpy(name_, n, sz); - name_[sz] = 0; - - memcpy(hash_, h, SHA::DIGEST_SIZE); -} - -Signer::~Signer() -{ -} - - -Error BER_Decoder::GetError() -{ - return source_.GetError(); -} - - -Integer& BER_Decoder::GetInteger(Integer& integer) -{ - if (!source_.GetError().What()) - integer.Decode(source_); - return integer; -} - - -// Read a Sequence, return length -word32 BER_Decoder::GetSequence() -{ - if (source_.GetError().What()) return 0; - - byte b = source_.next(); - if (b != (SEQUENCE | CONSTRUCTED)) { - source_.SetError(SEQUENCE_E); - return 0; - } - - return GetLength(source_); -} - - -// Read a Sequence, return length -word32 BER_Decoder::GetSet() -{ - if (source_.GetError().What()) return 0; - - byte b = source_.next(); - if (b != (SET | CONSTRUCTED)) { - source_.SetError(SET_E); - return 0; - } - - return GetLength(source_); -} - - -// Read Version, return it -word32 BER_Decoder::GetVersion() -{ - if (source_.GetError().What()) return 0; - - byte b = source_.next(); - if (b != INTEGER) { - source_.SetError(INTEGER_E); - return 0; - } - - b = source_.next(); - if (b != 0x01) { - source_.SetError(VERSION_E); - return 0; - } - - return source_.next(); -} - - -// Read ExplicitVersion, return it or 0 if not there (not an error) -word32 BER_Decoder::GetExplicitVersion() -{ - if (source_.GetError().What()) return 0; - - byte b = source_.next(); - - if (b == (CONTEXT_SPECIFIC | CONSTRUCTED)) { // not an error if not here - source_.next(); - return GetVersion(); - } - else - source_.prev(); // put back - - return 0; -} - - -// Decode a BER encoded RSA Private Key -void RSA_Private_Decoder::Decode(RSA_PrivateKey& key) -{ - ReadHeader(); - if (source_.GetError().What()) return; - // public - key.SetModulus(GetInteger(Integer().Ref())); - key.SetPublicExponent(GetInteger(Integer().Ref())); - - // private - key.SetPrivateExponent(GetInteger(Integer().Ref())); - key.SetPrime1(GetInteger(Integer().Ref())); - key.SetPrime2(GetInteger(Integer().Ref())); - key.SetModPrime1PrivateExponent(GetInteger(Integer().Ref())); - key.SetModPrime2PrivateExponent(GetInteger(Integer().Ref())); - key.SetMultiplicativeInverseOfPrime2ModPrime1(GetInteger(Integer().Ref())); -} - - -void RSA_Private_Decoder::ReadHeader() -{ - GetSequence(); - GetVersion(); -} - - -// Decode a BER encoded DSA Private Key -void DSA_Private_Decoder::Decode(DSA_PrivateKey& key) -{ - ReadHeader(); - if (source_.GetError().What()) return; - // group parameters - key.SetModulus(GetInteger(Integer().Ref())); - key.SetSubGroupOrder(GetInteger(Integer().Ref())); - key.SetSubGroupGenerator(GetInteger(Integer().Ref())); - - // key - key.SetPublicPart(GetInteger(Integer().Ref())); - key.SetPrivatePart(GetInteger(Integer().Ref())); -} - - -void DSA_Private_Decoder::ReadHeader() -{ - GetSequence(); - GetVersion(); -} - - -// Decode a BER encoded RSA Public Key -void RSA_Public_Decoder::Decode(RSA_PublicKey& key) -{ - ReadHeader(); - if (source_.GetError().What()) return; - - // public key - key.SetModulus(GetInteger(Integer().Ref())); - key.SetPublicExponent(GetInteger(Integer().Ref())); -} - - -void RSA_Public_Decoder::ReadHeader() -{ - GetSequence(); -} - - -// Decode a BER encoded DSA Public Key -void DSA_Public_Decoder::Decode(DSA_PublicKey& key) -{ - ReadHeader(); - if (source_.GetError().What()) return; - - // group parameters - key.SetModulus(GetInteger(Integer().Ref())); - key.SetSubGroupOrder(GetInteger(Integer().Ref())); - key.SetSubGroupGenerator(GetInteger(Integer().Ref())); - - // key - key.SetPublicPart(GetInteger(Integer().Ref())); -} - - -void DSA_Public_Decoder::ReadHeader() -{ - GetSequence(); -} - - -void DH_Decoder::ReadHeader() -{ - GetSequence(); -} - - -// Decode a BER encoded Diffie-Hellman Key -void DH_Decoder::Decode(DH& key) -{ - ReadHeader(); - if (source_.GetError().What()) return; - - // group parms - key.SetP(GetInteger(Integer().Ref())); - key.SetG(GetInteger(Integer().Ref())); -} - - -CertDecoder::CertDecoder(Source& s, bool decode, SignerList* signers, - bool noVerify, CertType ct) - : BER_Decoder(s), certBegin_(0), sigIndex_(0), sigLength_(0), - signature_(0), verify_(!noVerify) -{ - issuer_[0] = 0; - subject_[0] = 0; - - if (decode) - Decode(signers, ct); - -} - - -CertDecoder::~CertDecoder() -{ - tcArrayDelete(signature_); -} - - -// process certificate header, set signature offset -void CertDecoder::ReadHeader() -{ - if (source_.GetError().What()) return; - - GetSequence(); // total - certBegin_ = source_.get_index(); - - sigIndex_ = GetSequence(); // this cert - sigIndex_ += source_.get_index(); - - GetExplicitVersion(); // version - GetInteger(Integer().Ref()); // serial number -} - - -// Decode a x509v3 Certificate -void CertDecoder::Decode(SignerList* signers, CertType ct) -{ - if (source_.GetError().What()) return; - DecodeToKey(); - if (source_.GetError().What()) return; - - if (source_.get_index() != sigIndex_) - source_.set_index(sigIndex_); - - word32 confirmOID = GetAlgoId(); - GetSignature(); - if (source_.GetError().What()) return; - - if ( confirmOID != signatureOID_ ) { - source_.SetError(SIG_OID_E); - return; - } - - if (ct != CA && verify_ && !ValidateSignature(signers)) - source_.SetError(SIG_OTHER_E); -} - - -void CertDecoder::DecodeToKey() -{ - ReadHeader(); - signatureOID_ = GetAlgoId(); - GetName(ISSUER); - GetValidity(); - GetName(SUBJECT); - GetKey(); -} - - -// Read public key -void CertDecoder::GetKey() -{ - if (source_.GetError().What()) return; - - GetSequence(); - keyOID_ = GetAlgoId(); - - if (keyOID_ == RSAk) { - byte b = source_.next(); - if (b != BIT_STRING) { - source_.SetError(BIT_STR_E); - return; - } - b = source_.next(); // length, future - b = source_.next(); - while(b != 0) - b = source_.next(); - } - else if (keyOID_ == DSAk) - ; // do nothing - else { - source_.SetError(UNKNOWN_OID_E); - return; - } - - StoreKey(); - if (keyOID_ == DSAk) - AddDSA(); -} - - -// Save public key -void CertDecoder::StoreKey() -{ - if (source_.GetError().What()) return; - - word32 read = source_.get_index(); - word32 length = GetSequence(); - - read = source_.get_index() - read; - length += read; - - while (read--) source_.prev(); - - key_.SetSize(length); - key_.SetKey(source_.get_current()); - source_.advance(length); -} - - -// DSA has public key after group -void CertDecoder::AddDSA() -{ - if (source_.GetError().What()) return; - - byte b = source_.next(); - if (b != BIT_STRING) { - source_.SetError(BIT_STR_E); - return; - } - b = source_.next(); // length, future - b = source_.next(); - while(b != 0) - b = source_.next(); - - word32 idx = source_.get_index(); - b = source_.next(); - if (b != INTEGER) { - source_.SetError(INTEGER_E); - return; - } - - word32 length = GetLength(source_); - length += source_.get_index() - idx; - - key_.AddToEnd(source_.get_buffer() + idx, length); -} - - -// process algo OID by summing, return it -word32 CertDecoder::GetAlgoId() -{ - if (source_.GetError().What()) return 0; - word32 length = GetSequence(); - - byte b = source_.next(); - if (b != OBJECT_IDENTIFIER) { - source_.SetError(OBJECT_ID_E); - return 0; - } - - length = GetLength(source_); - word32 oid = 0; - - while(length--) - oid += source_.next(); // just sum it up for now - - if (oid != SHAwDSA && oid != DSAk) { - b = source_.next(); // should have NULL tag and 0 - - if (b != TAG_NULL) { - source_.SetError(TAG_NULL_E); - return 0; - } - - b = source_.next(); - if (b != 0) { - source_.SetError(EXPECT_0_E); - return 0; - } - } - - return oid; -} - - -// read cert signature, store in signature_ -word32 CertDecoder::GetSignature() -{ - if (source_.GetError().What()) return 0; - byte b = source_.next(); - - if (b != BIT_STRING) { - source_.SetError(BIT_STR_E); - return 0; - } - - sigLength_ = GetLength(source_); - - b = source_.next(); - if (b != 0) { - source_.SetError(EXPECT_0_E); - return 0; - } - sigLength_--; - - signature_ = NEW_TC byte[sigLength_]; - memcpy(signature_, source_.get_current(), sigLength_); - source_.advance(sigLength_); - - return sigLength_; -} - - -// read cert digest, store in signature_ -word32 CertDecoder::GetDigest() -{ - if (source_.GetError().What()) return 0; - byte b = source_.next(); - - if (b != OCTET_STRING) { - source_.SetError(OCTET_STR_E); - return 0; - } - - sigLength_ = GetLength(source_); - - signature_ = NEW_TC byte[sigLength_]; - memcpy(signature_, source_.get_current(), sigLength_); - source_.advance(sigLength_); - - return sigLength_; -} - - -// process NAME, either issuer or subject -void CertDecoder::GetName(NameType nt) -{ - if (source_.GetError().What()) return; - - SHA sha; - word32 length = GetSequence(); // length of all distinguished names - assert (length < ASN_NAME_MAX); - length += source_.get_index(); - - char* ptr = (nt == ISSUER) ? issuer_ : subject_; - word32 idx = 0; - - while (source_.get_index() < length) { - GetSet(); - GetSequence(); - - byte b = source_.next(); - if (b != OBJECT_IDENTIFIER) { - source_.SetError(OBJECT_ID_E); - return; - } - - word32 oidSz = GetLength(source_); - byte joint[2]; - memcpy(joint, source_.get_current(), sizeof(joint)); - - // v1 name types - if (joint[0] == 0x55 && joint[1] == 0x04) { - source_.advance(2); - byte id = source_.next(); - b = source_.next(); // strType - word32 strLen = GetLength(source_); - bool copy = false; - - if (id == COMMON_NAME) { - memcpy(&ptr[idx], "/CN=", 4); - idx += 4; - copy = true; - } - else if (id == SUR_NAME) { - memcpy(&ptr[idx], "/SN=", 4); - idx += 4; - copy = true; - } - else if (id == COUNTRY_NAME) { - memcpy(&ptr[idx], "/C=", 3); - idx += 3; - copy = true; - } - else if (id == LOCALITY_NAME) { - memcpy(&ptr[idx], "/L=", 3); - idx += 3; - copy = true; - } - else if (id == STATE_NAME) { - memcpy(&ptr[idx], "/ST=", 4); - idx += 4; - copy = true; - } - else if (id == ORG_NAME) { - memcpy(&ptr[idx], "/O=", 3); - idx += 3; - copy = true; - } - else if (id == ORGUNIT_NAME) { - memcpy(&ptr[idx], "/OU=", 4); - idx += 4; - copy = true; - } - - if (copy) { - memcpy(&ptr[idx], source_.get_current(), strLen); - idx += strLen; - } - - sha.Update(source_.get_current(), strLen); - source_.advance(strLen); - } - else { - bool email = false; - if (joint[0] == 0x2a && joint[1] == 0x86) // email id hdr - email = true; - - source_.advance(oidSz + 1); - word32 length = GetLength(source_); - - if (email) { - memcpy(&ptr[idx], "/emailAddress=", 14); - idx += 14; - - memcpy(&ptr[idx], source_.get_current(), length); - idx += length; - } - - source_.advance(length); - } - } - ptr[idx++] = 0; - - if (nt == ISSUER) - sha.Final(issuerHash_); - else - sha.Final(subjectHash_); -} - - -// process a Date, either BEFORE or AFTER -void CertDecoder::GetDate(DateType dt) -{ - if (source_.GetError().What()) return; - - byte b = source_.next(); - if (b != UTC_TIME && b != GENERALIZED_TIME) { - source_.SetError(TIME_E); - return; - } - - word32 length = GetLength(source_); - byte date[MAX_DATE_SZ]; - if (length > MAX_DATE_SZ || length < MIN_DATE_SZ) { - source_.SetError(DATE_SZ_E); - return; - } - - memcpy(date, source_.get_current(), length); - source_.advance(length); - - if (!ValidateDate(date, b, dt) && verify_) - if (dt == BEFORE) - source_.SetError(BEFORE_DATE_E); - else - source_.SetError(AFTER_DATE_E); - - // save for later use - if (dt == BEFORE) { - memcpy(beforeDate_, date, length); - beforeDate_[length] = 0; - } - else { // after - memcpy(afterDate_, date, length); - afterDate_[length] = 0; - } -} - - -void CertDecoder::GetValidity() -{ - if (source_.GetError().What()) return; - - GetSequence(); - GetDate(BEFORE); - GetDate(AFTER); -} - - -bool CertDecoder::ValidateSelfSignature() -{ - Source pub(key_.GetKey(), key_.size()); - return ConfirmSignature(pub); -} - - -// extract compare signature hash from plain and place into digest -void CertDecoder::GetCompareHash(const byte* plain, word32 sz, byte* digest, - word32 digSz) -{ - if (source_.GetError().What()) return; - - Source s(plain, sz); - CertDecoder dec(s, false); - - dec.GetSequence(); - dec.GetAlgoId(); - dec.GetDigest(); - - if (dec.sigLength_ > digSz) { - source_.SetError(SIG_LEN_E); - return; - } - - memcpy(digest, dec.signature_, dec.sigLength_); -} - - -// validate signature signed by someone else -bool CertDecoder::ValidateSignature(SignerList* signers) -{ - assert(signers); - - SignerList::iterator first = signers->begin(); - SignerList::iterator last = signers->end(); - - while (first != last) { - if ( memcmp(issuerHash_, (*first)->GetHash(), SHA::DIGEST_SIZE) == 0) { - - const PublicKey& iKey = (*first)->GetPublicKey(); - Source pub(iKey.GetKey(), iKey.size()); - return ConfirmSignature(pub); - } - ++first; - } - return false; -} - - -// confirm certificate signature -bool CertDecoder::ConfirmSignature(Source& pub) -{ - HashType ht; - mySTL::auto_ptr hasher; - - if (signatureOID_ == MD5wRSA) { - hasher.reset(NEW_TC MD5); - ht = MD5h; - } - else if (signatureOID_ == MD2wRSA) { - hasher.reset(NEW_TC MD2); - ht = MD2h; - } - else if (signatureOID_ == SHAwRSA || signatureOID_ == SHAwDSA) { - hasher.reset(NEW_TC SHA); - ht = SHAh; - } - else { - source_.SetError(UNKOWN_SIG_E); - return false; - } - - byte digest[SHA::DIGEST_SIZE]; // largest size - - hasher->Update(source_.get_buffer() + certBegin_, sigIndex_ - certBegin_); - hasher->Final(digest); - - if (keyOID_ == RSAk) { - // put in ASN.1 signature format - Source build; - Signature_Encoder(digest, hasher->getDigestSize(), ht, build); - - RSA_PublicKey pubKey(pub); - RSAES_Encryptor enc(pubKey); - - return enc.SSL_Verify(build.get_buffer(), build.size(), signature_); - } - else { // DSA - // extract r and s from sequence - byte seqDecoded[DSA_SIG_SZ]; - DecodeDSA_Signature(seqDecoded, signature_, sigLength_); - - DSA_PublicKey pubKey(pub); - DSA_Verifier ver(pubKey); - - return ver.Verify(digest, seqDecoded); - } -} - - -Signature_Encoder::Signature_Encoder(const byte* dig, word32 digSz, - HashType digOID, Source& source) -{ - // build bottom up - - // Digest - byte digArray[MAX_DIGEST_SZ]; - word32 digestSz = SetDigest(dig, digSz, digArray); - - // AlgoID - byte algoArray[MAX_ALGO_SZ]; - word32 algoSz = SetAlgoID(digOID, algoArray); - - // Sequence - byte seqArray[MAX_SEQ_SZ]; - word32 seqSz = SetSequence(digestSz + algoSz, seqArray); - - source.grow(seqSz + algoSz + digestSz); // make sure enough room - source.add(seqArray, seqSz); - source.add(algoArray, algoSz); - source.add(digArray, digestSz); -} - - - -word32 Signature_Encoder::SetDigest(const byte* d, word32 dSz, byte* output) -{ - output[0] = OCTET_STRING; - output[1] = dSz; - memcpy(&output[2], d, dSz); - - return dSz + 2; -} - - - -word32 DER_Encoder::SetAlgoID(HashType aOID, byte* output) -{ - // adding TAG_NULL and 0 to end - static const byte shaAlgoID[] = { 0x2b, 0x0e, 0x03, 0x02, 0x1a, - 0x05, 0x00 }; - static const byte md5AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, - 0x02, 0x05, 0x05, 0x00 }; - static const byte md2AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, - 0x02, 0x02, 0x05, 0x00}; - - int algoSz = 0; - const byte* algoName = 0; - - switch (aOID) { - case SHAh: - algoSz = sizeof(shaAlgoID); - algoName = shaAlgoID; - break; - - case MD2h: - algoSz = sizeof(md2AlgoID); - algoName = md2AlgoID; - break; - - case MD5h: - algoSz = sizeof(md5AlgoID); - algoName = md5AlgoID; - break; - - default: - error_.SetError(UNKOWN_HASH_E); - return 0; - } - - - byte ID_Length[MAX_LENGTH_SZ]; - word32 idSz = SetLength(algoSz - 2, ID_Length); // don't include TAG_NULL/0 - - byte seqArray[MAX_SEQ_SZ + 1]; // add object_id to end - word32 seqSz = SetSequence(idSz + algoSz + 1, seqArray); - seqArray[seqSz++] = OBJECT_IDENTIFIER; - - memcpy(output, seqArray, seqSz); - memcpy(output + seqSz, ID_Length, idSz); - memcpy(output + seqSz + idSz, algoName, algoSz); - - return seqSz + idSz + algoSz; -} - - -word32 SetSequence(word32 len, byte* output) -{ - - output[0] = SEQUENCE | CONSTRUCTED; - return SetLength(len, output + 1) + 1; -} - - -word32 EncodeDSA_Signature(const byte* signature, byte* output) -{ - Integer r(signature, 20); - Integer s(signature + 20, 20); - - return EncodeDSA_Signature(r, s, output); -} - - -word32 EncodeDSA_Signature(const Integer& r, const Integer& s, byte* output) -{ - word32 rSz = r.ByteCount(); - word32 sSz = s.ByteCount(); - - byte rLen[MAX_LENGTH_SZ + 1]; - byte sLen[MAX_LENGTH_SZ + 1]; - - rLen[0] = INTEGER; - sLen[0] = INTEGER; - - word32 rLenSz = SetLength(rSz, &rLen[1]) + 1; - word32 sLenSz = SetLength(sSz, &sLen[1]) + 1; - - byte seqArray[MAX_SEQ_SZ]; - - word32 seqSz = SetSequence(rLenSz + rSz + sLenSz + sSz, seqArray); - - // seq - memcpy(output, seqArray, seqSz); - // r - memcpy(output + seqSz, rLen, rLenSz); - r.Encode(output + seqSz + rLenSz, rSz); - // s - memcpy(output + seqSz + rLenSz + rSz, sLen, sLenSz); - s.Encode(output + seqSz + rLenSz + rSz + sLenSz, sSz); - - return seqSz + rLenSz + rSz + sLenSz + sSz; -} - - -// put sequence encoded dsa signature into decoded in 2 20 byte integers -word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz) -{ - Source source(encoded, sz); - - if (source.next() != (SEQUENCE | CONSTRUCTED)) { - source.SetError(SEQUENCE_E); - return 0; - } - - GetLength(source); // total - - // r - if (source.next() != INTEGER) { - source.SetError(INTEGER_E); - return 0; - } - word32 rLen = GetLength(source); - if (rLen != 20) - if (rLen == 21) { // zero at front, eat - source.next(); - --rLen; - } - else if (rLen == 19) { // add zero to front so 20 bytes - decoded[0] = 0; - decoded++; - } - else { - source.SetError(DSA_SZ_E); - return 0; - } - memcpy(decoded, source.get_buffer() + source.get_index(), rLen); - source.advance(rLen); - - // s - if (source.next() != INTEGER) { - source.SetError(INTEGER_E); - return 0; - } - word32 sLen = GetLength(source); - if (sLen != 20) - if (sLen == 21) { - source.next(); // zero at front, eat - --sLen; - } - else if (sLen == 19) { - decoded[rLen] = 0; // add zero to front so 20 bytes - decoded++; - } - else { - source.SetError(DSA_SZ_E); - return 0; - } - memcpy(decoded + rLen, source.get_buffer() + source.get_index(), sLen); - source.advance(sLen); - - return 40; -} - - -// Get Cert in PEM format from BEGIN to END -int GetCert(Source& source) -{ - char header[] = "-----BEGIN CERTIFICATE-----"; - char footer[] = "-----END CERTIFICATE-----"; - - char* begin = strstr((char*)source.get_buffer(), header); - char* end = strstr((char*)source.get_buffer(), footer); - - if (!begin || !end || begin >= end) return -1; - - end += strlen(footer); - if (*end == '\r') end++; - - Source tmp((byte*)begin, end - begin + 1); - source.Swap(tmp); - - return 0; -} - - - -// Decode a BER encoded PKCS12 structure -void PKCS12_Decoder::Decode() -{ - ReadHeader(); - if (source_.GetError().What()) return; - - // Get AuthSafe - - GetSequence(); - - // get object id - byte obj_id = source_.next(); - if (obj_id != OBJECT_IDENTIFIER) { - source_.SetError(OBJECT_ID_E); - return; - } - - word32 length = GetLength(source_); - - word32 algo_sum = 0; - while (length--) - algo_sum += source_.next(); - - - - - - - // Get MacData optional - /* - mac digestInfo like certdecoder::getdigest? - macsalt octet string - iter integer - - */ -} - - -void PKCS12_Decoder::ReadHeader() -{ - // Gets Version - GetSequence(); - GetVersion(); -} - - -// Get Cert in PEM format from pkcs12 file -int GetPKCS_Cert(const char* password, Source& source) -{ - PKCS12_Decoder pkcs12(source); - pkcs12.Decode(); - - return 0; -} - - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/bftables.cpp b/externals/mysql/extlib/yassl/taocrypt/src/bftables.cpp deleted file mode 100644 index 46469472e6..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/bftables.cpp +++ /dev/null @@ -1,303 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's bfinit.cpp from CryptoPP */ - -#include "runtime.hpp" -#include "blowfish.hpp" - - -namespace TaoCrypt { - -const word32 Blowfish::p_init_[Blowfish::ROUNDS+2] = -{ - 608135816U, 2242054355U, 320440878U, 57701188U, - 2752067618U, 698298832U, 137296536U, 3964562569U, - 1160258022U, 953160567U, 3193202383U, 887688300U, - 3232508343U, 3380367581U, 1065670069U, 3041331479U, - 2450970073U, 2306472731U -} ; - - -const word32 Blowfish::s_init_[4*256] = { - 3509652390U, 2564797868U, 805139163U, 3491422135U, - 3101798381U, 1780907670U, 3128725573U, 4046225305U, - 614570311U, 3012652279U, 134345442U, 2240740374U, - 1667834072U, 1901547113U, 2757295779U, 4103290238U, - 227898511U, 1921955416U, 1904987480U, 2182433518U, - 2069144605U, 3260701109U, 2620446009U, 720527379U, - 3318853667U, 677414384U, 3393288472U, 3101374703U, - 2390351024U, 1614419982U, 1822297739U, 2954791486U, - 3608508353U, 3174124327U, 2024746970U, 1432378464U, - 3864339955U, 2857741204U, 1464375394U, 1676153920U, - 1439316330U, 715854006U, 3033291828U, 289532110U, - 2706671279U, 2087905683U, 3018724369U, 1668267050U, - 732546397U, 1947742710U, 3462151702U, 2609353502U, - 2950085171U, 1814351708U, 2050118529U, 680887927U, - 999245976U, 1800124847U, 3300911131U, 1713906067U, - 1641548236U, 4213287313U, 1216130144U, 1575780402U, - 4018429277U, 3917837745U, 3693486850U, 3949271944U, - 596196993U, 3549867205U, 258830323U, 2213823033U, - 772490370U, 2760122372U, 1774776394U, 2652871518U, - 566650946U, 4142492826U, 1728879713U, 2882767088U, - 1783734482U, 3629395816U, 2517608232U, 2874225571U, - 1861159788U, 326777828U, 3124490320U, 2130389656U, - 2716951837U, 967770486U, 1724537150U, 2185432712U, - 2364442137U, 1164943284U, 2105845187U, 998989502U, - 3765401048U, 2244026483U, 1075463327U, 1455516326U, - 1322494562U, 910128902U, 469688178U, 1117454909U, - 936433444U, 3490320968U, 3675253459U, 1240580251U, - 122909385U, 2157517691U, 634681816U, 4142456567U, - 3825094682U, 3061402683U, 2540495037U, 79693498U, - 3249098678U, 1084186820U, 1583128258U, 426386531U, - 1761308591U, 1047286709U, 322548459U, 995290223U, - 1845252383U, 2603652396U, 3431023940U, 2942221577U, - 3202600964U, 3727903485U, 1712269319U, 422464435U, - 3234572375U, 1170764815U, 3523960633U, 3117677531U, - 1434042557U, 442511882U, 3600875718U, 1076654713U, - 1738483198U, 4213154764U, 2393238008U, 3677496056U, - 1014306527U, 4251020053U, 793779912U, 2902807211U, - 842905082U, 4246964064U, 1395751752U, 1040244610U, - 2656851899U, 3396308128U, 445077038U, 3742853595U, - 3577915638U, 679411651U, 2892444358U, 2354009459U, - 1767581616U, 3150600392U, 3791627101U, 3102740896U, - 284835224U, 4246832056U, 1258075500U, 768725851U, - 2589189241U, 3069724005U, 3532540348U, 1274779536U, - 3789419226U, 2764799539U, 1660621633U, 3471099624U, - 4011903706U, 913787905U, 3497959166U, 737222580U, - 2514213453U, 2928710040U, 3937242737U, 1804850592U, - 3499020752U, 2949064160U, 2386320175U, 2390070455U, - 2415321851U, 4061277028U, 2290661394U, 2416832540U, - 1336762016U, 1754252060U, 3520065937U, 3014181293U, - 791618072U, 3188594551U, 3933548030U, 2332172193U, - 3852520463U, 3043980520U, 413987798U, 3465142937U, - 3030929376U, 4245938359U, 2093235073U, 3534596313U, - 375366246U, 2157278981U, 2479649556U, 555357303U, - 3870105701U, 2008414854U, 3344188149U, 4221384143U, - 3956125452U, 2067696032U, 3594591187U, 2921233993U, - 2428461U, 544322398U, 577241275U, 1471733935U, - 610547355U, 4027169054U, 1432588573U, 1507829418U, - 2025931657U, 3646575487U, 545086370U, 48609733U, - 2200306550U, 1653985193U, 298326376U, 1316178497U, - 3007786442U, 2064951626U, 458293330U, 2589141269U, - 3591329599U, 3164325604U, 727753846U, 2179363840U, - 146436021U, 1461446943U, 4069977195U, 705550613U, - 3059967265U, 3887724982U, 4281599278U, 3313849956U, - 1404054877U, 2845806497U, 146425753U, 1854211946U, - - 1266315497U, 3048417604U, 3681880366U, 3289982499U, - 2909710000U, 1235738493U, 2632868024U, 2414719590U, - 3970600049U, 1771706367U, 1449415276U, 3266420449U, - 422970021U, 1963543593U, 2690192192U, 3826793022U, - 1062508698U, 1531092325U, 1804592342U, 2583117782U, - 2714934279U, 4024971509U, 1294809318U, 4028980673U, - 1289560198U, 2221992742U, 1669523910U, 35572830U, - 157838143U, 1052438473U, 1016535060U, 1802137761U, - 1753167236U, 1386275462U, 3080475397U, 2857371447U, - 1040679964U, 2145300060U, 2390574316U, 1461121720U, - 2956646967U, 4031777805U, 4028374788U, 33600511U, - 2920084762U, 1018524850U, 629373528U, 3691585981U, - 3515945977U, 2091462646U, 2486323059U, 586499841U, - 988145025U, 935516892U, 3367335476U, 2599673255U, - 2839830854U, 265290510U, 3972581182U, 2759138881U, - 3795373465U, 1005194799U, 847297441U, 406762289U, - 1314163512U, 1332590856U, 1866599683U, 4127851711U, - 750260880U, 613907577U, 1450815602U, 3165620655U, - 3734664991U, 3650291728U, 3012275730U, 3704569646U, - 1427272223U, 778793252U, 1343938022U, 2676280711U, - 2052605720U, 1946737175U, 3164576444U, 3914038668U, - 3967478842U, 3682934266U, 1661551462U, 3294938066U, - 4011595847U, 840292616U, 3712170807U, 616741398U, - 312560963U, 711312465U, 1351876610U, 322626781U, - 1910503582U, 271666773U, 2175563734U, 1594956187U, - 70604529U, 3617834859U, 1007753275U, 1495573769U, - 4069517037U, 2549218298U, 2663038764U, 504708206U, - 2263041392U, 3941167025U, 2249088522U, 1514023603U, - 1998579484U, 1312622330U, 694541497U, 2582060303U, - 2151582166U, 1382467621U, 776784248U, 2618340202U, - 3323268794U, 2497899128U, 2784771155U, 503983604U, - 4076293799U, 907881277U, 423175695U, 432175456U, - 1378068232U, 4145222326U, 3954048622U, 3938656102U, - 3820766613U, 2793130115U, 2977904593U, 26017576U, - 3274890735U, 3194772133U, 1700274565U, 1756076034U, - 4006520079U, 3677328699U, 720338349U, 1533947780U, - 354530856U, 688349552U, 3973924725U, 1637815568U, - 332179504U, 3949051286U, 53804574U, 2852348879U, - 3044236432U, 1282449977U, 3583942155U, 3416972820U, - 4006381244U, 1617046695U, 2628476075U, 3002303598U, - 1686838959U, 431878346U, 2686675385U, 1700445008U, - 1080580658U, 1009431731U, 832498133U, 3223435511U, - 2605976345U, 2271191193U, 2516031870U, 1648197032U, - 4164389018U, 2548247927U, 300782431U, 375919233U, - 238389289U, 3353747414U, 2531188641U, 2019080857U, - 1475708069U, 455242339U, 2609103871U, 448939670U, - 3451063019U, 1395535956U, 2413381860U, 1841049896U, - 1491858159U, 885456874U, 4264095073U, 4001119347U, - 1565136089U, 3898914787U, 1108368660U, 540939232U, - 1173283510U, 2745871338U, 3681308437U, 4207628240U, - 3343053890U, 4016749493U, 1699691293U, 1103962373U, - 3625875870U, 2256883143U, 3830138730U, 1031889488U, - 3479347698U, 1535977030U, 4236805024U, 3251091107U, - 2132092099U, 1774941330U, 1199868427U, 1452454533U, - 157007616U, 2904115357U, 342012276U, 595725824U, - 1480756522U, 206960106U, 497939518U, 591360097U, - 863170706U, 2375253569U, 3596610801U, 1814182875U, - 2094937945U, 3421402208U, 1082520231U, 3463918190U, - 2785509508U, 435703966U, 3908032597U, 1641649973U, - 2842273706U, 3305899714U, 1510255612U, 2148256476U, - 2655287854U, 3276092548U, 4258621189U, 236887753U, - 3681803219U, 274041037U, 1734335097U, 3815195456U, - 3317970021U, 1899903192U, 1026095262U, 4050517792U, - 356393447U, 2410691914U, 3873677099U, 3682840055U, - - 3913112168U, 2491498743U, 4132185628U, 2489919796U, - 1091903735U, 1979897079U, 3170134830U, 3567386728U, - 3557303409U, 857797738U, 1136121015U, 1342202287U, - 507115054U, 2535736646U, 337727348U, 3213592640U, - 1301675037U, 2528481711U, 1895095763U, 1721773893U, - 3216771564U, 62756741U, 2142006736U, 835421444U, - 2531993523U, 1442658625U, 3659876326U, 2882144922U, - 676362277U, 1392781812U, 170690266U, 3921047035U, - 1759253602U, 3611846912U, 1745797284U, 664899054U, - 1329594018U, 3901205900U, 3045908486U, 2062866102U, - 2865634940U, 3543621612U, 3464012697U, 1080764994U, - 553557557U, 3656615353U, 3996768171U, 991055499U, - 499776247U, 1265440854U, 648242737U, 3940784050U, - 980351604U, 3713745714U, 1749149687U, 3396870395U, - 4211799374U, 3640570775U, 1161844396U, 3125318951U, - 1431517754U, 545492359U, 4268468663U, 3499529547U, - 1437099964U, 2702547544U, 3433638243U, 2581715763U, - 2787789398U, 1060185593U, 1593081372U, 2418618748U, - 4260947970U, 69676912U, 2159744348U, 86519011U, - 2512459080U, 3838209314U, 1220612927U, 3339683548U, - 133810670U, 1090789135U, 1078426020U, 1569222167U, - 845107691U, 3583754449U, 4072456591U, 1091646820U, - 628848692U, 1613405280U, 3757631651U, 526609435U, - 236106946U, 48312990U, 2942717905U, 3402727701U, - 1797494240U, 859738849U, 992217954U, 4005476642U, - 2243076622U, 3870952857U, 3732016268U, 765654824U, - 3490871365U, 2511836413U, 1685915746U, 3888969200U, - 1414112111U, 2273134842U, 3281911079U, 4080962846U, - 172450625U, 2569994100U, 980381355U, 4109958455U, - 2819808352U, 2716589560U, 2568741196U, 3681446669U, - 3329971472U, 1835478071U, 660984891U, 3704678404U, - 4045999559U, 3422617507U, 3040415634U, 1762651403U, - 1719377915U, 3470491036U, 2693910283U, 3642056355U, - 3138596744U, 1364962596U, 2073328063U, 1983633131U, - 926494387U, 3423689081U, 2150032023U, 4096667949U, - 1749200295U, 3328846651U, 309677260U, 2016342300U, - 1779581495U, 3079819751U, 111262694U, 1274766160U, - 443224088U, 298511866U, 1025883608U, 3806446537U, - 1145181785U, 168956806U, 3641502830U, 3584813610U, - 1689216846U, 3666258015U, 3200248200U, 1692713982U, - 2646376535U, 4042768518U, 1618508792U, 1610833997U, - 3523052358U, 4130873264U, 2001055236U, 3610705100U, - 2202168115U, 4028541809U, 2961195399U, 1006657119U, - 2006996926U, 3186142756U, 1430667929U, 3210227297U, - 1314452623U, 4074634658U, 4101304120U, 2273951170U, - 1399257539U, 3367210612U, 3027628629U, 1190975929U, - 2062231137U, 2333990788U, 2221543033U, 2438960610U, - 1181637006U, 548689776U, 2362791313U, 3372408396U, - 3104550113U, 3145860560U, 296247880U, 1970579870U, - 3078560182U, 3769228297U, 1714227617U, 3291629107U, - 3898220290U, 166772364U, 1251581989U, 493813264U, - 448347421U, 195405023U, 2709975567U, 677966185U, - 3703036547U, 1463355134U, 2715995803U, 1338867538U, - 1343315457U, 2802222074U, 2684532164U, 233230375U, - 2599980071U, 2000651841U, 3277868038U, 1638401717U, - 4028070440U, 3237316320U, 6314154U, 819756386U, - 300326615U, 590932579U, 1405279636U, 3267499572U, - 3150704214U, 2428286686U, 3959192993U, 3461946742U, - 1862657033U, 1266418056U, 963775037U, 2089974820U, - 2263052895U, 1917689273U, 448879540U, 3550394620U, - 3981727096U, 150775221U, 3627908307U, 1303187396U, - 508620638U, 2975983352U, 2726630617U, 1817252668U, - 1876281319U, 1457606340U, 908771278U, 3720792119U, - 3617206836U, 2455994898U, 1729034894U, 1080033504U, - - 976866871U, 3556439503U, 2881648439U, 1522871579U, - 1555064734U, 1336096578U, 3548522304U, 2579274686U, - 3574697629U, 3205460757U, 3593280638U, 3338716283U, - 3079412587U, 564236357U, 2993598910U, 1781952180U, - 1464380207U, 3163844217U, 3332601554U, 1699332808U, - 1393555694U, 1183702653U, 3581086237U, 1288719814U, - 691649499U, 2847557200U, 2895455976U, 3193889540U, - 2717570544U, 1781354906U, 1676643554U, 2592534050U, - 3230253752U, 1126444790U, 2770207658U, 2633158820U, - 2210423226U, 2615765581U, 2414155088U, 3127139286U, - 673620729U, 2805611233U, 1269405062U, 4015350505U, - 3341807571U, 4149409754U, 1057255273U, 2012875353U, - 2162469141U, 2276492801U, 2601117357U, 993977747U, - 3918593370U, 2654263191U, 753973209U, 36408145U, - 2530585658U, 25011837U, 3520020182U, 2088578344U, - 530523599U, 2918365339U, 1524020338U, 1518925132U, - 3760827505U, 3759777254U, 1202760957U, 3985898139U, - 3906192525U, 674977740U, 4174734889U, 2031300136U, - 2019492241U, 3983892565U, 4153806404U, 3822280332U, - 352677332U, 2297720250U, 60907813U, 90501309U, - 3286998549U, 1016092578U, 2535922412U, 2839152426U, - 457141659U, 509813237U, 4120667899U, 652014361U, - 1966332200U, 2975202805U, 55981186U, 2327461051U, - 676427537U, 3255491064U, 2882294119U, 3433927263U, - 1307055953U, 942726286U, 933058658U, 2468411793U, - 3933900994U, 4215176142U, 1361170020U, 2001714738U, - 2830558078U, 3274259782U, 1222529897U, 1679025792U, - 2729314320U, 3714953764U, 1770335741U, 151462246U, - 3013232138U, 1682292957U, 1483529935U, 471910574U, - 1539241949U, 458788160U, 3436315007U, 1807016891U, - 3718408830U, 978976581U, 1043663428U, 3165965781U, - 1927990952U, 4200891579U, 2372276910U, 3208408903U, - 3533431907U, 1412390302U, 2931980059U, 4132332400U, - 1947078029U, 3881505623U, 4168226417U, 2941484381U, - 1077988104U, 1320477388U, 886195818U, 18198404U, - 3786409000U, 2509781533U, 112762804U, 3463356488U, - 1866414978U, 891333506U, 18488651U, 661792760U, - 1628790961U, 3885187036U, 3141171499U, 876946877U, - 2693282273U, 1372485963U, 791857591U, 2686433993U, - 3759982718U, 3167212022U, 3472953795U, 2716379847U, - 445679433U, 3561995674U, 3504004811U, 3574258232U, - 54117162U, 3331405415U, 2381918588U, 3769707343U, - 4154350007U, 1140177722U, 4074052095U, 668550556U, - 3214352940U, 367459370U, 261225585U, 2610173221U, - 4209349473U, 3468074219U, 3265815641U, 314222801U, - 3066103646U, 3808782860U, 282218597U, 3406013506U, - 3773591054U, 379116347U, 1285071038U, 846784868U, - 2669647154U, 3771962079U, 3550491691U, 2305946142U, - 453669953U, 1268987020U, 3317592352U, 3279303384U, - 3744833421U, 2610507566U, 3859509063U, 266596637U, - 3847019092U, 517658769U, 3462560207U, 3443424879U, - 370717030U, 4247526661U, 2224018117U, 4143653529U, - 4112773975U, 2788324899U, 2477274417U, 1456262402U, - 2901442914U, 1517677493U, 1846949527U, 2295493580U, - 3734397586U, 2176403920U, 1280348187U, 1908823572U, - 3871786941U, 846861322U, 1172426758U, 3287448474U, - 3383383037U, 1655181056U, 3139813346U, 901632758U, - 1897031941U, 2986607138U, 3066810236U, 3447102507U, - 1393639104U, 373351379U, 950779232U, 625454576U, - 3124240540U, 4148612726U, 2007998917U, 544563296U, - 2244738638U, 2330496472U, 2058025392U, 1291430526U, - 424198748U, 50039436U, 29584100U, 3605783033U, - 2429876329U, 2791104160U, 1057563949U, 3255363231U, - 3075367218U, 3463963227U, 1469046755U, 985887462U -}; - - - - -} // namespace - diff --git a/externals/mysql/extlib/yassl/taocrypt/src/blowfish.cpp b/externals/mysql/extlib/yassl/taocrypt/src/blowfish.cpp deleted file mode 100644 index 66ff4d829d..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/blowfish.cpp +++ /dev/null @@ -1,342 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* C++ code based on Wei Dai's blowfish.cpp from CryptoPP */ -/* x86 asm is original */ - - -#if defined(TAOCRYPT_KERNEL_MODE) - #define DO_TAOCRYPT_KERNEL_MODE -#endif // only some modules now support this - - -#include "runtime.hpp" -#include "blowfish.hpp" - - - - - -namespace TaoCrypt { - - -#if defined(DO_BLOWFISH_ASM) - -// ia32 optimized version -void Blowfish::Process(byte* out, const byte* in, word32 sz) -{ - if (!isMMX) { - Mode_BASE::Process(out, in, sz); - return; - } - - word32 blocks = sz / BLOCK_SIZE; - - if (mode_ == ECB) - while (blocks--) { - AsmProcess(in, out); - out += BLOCK_SIZE; - in += BLOCK_SIZE; - } - else if (mode_ == CBC) - if (dir_ == ENCRYPTION) - while (blocks--) { - r_[0] ^= *(word32*)in; - r_[1] ^= *(word32*)(in + 4); - - AsmProcess((byte*)r_, (byte*)r_); - - memcpy(out, r_, BLOCK_SIZE); - - out += BLOCK_SIZE; - in += BLOCK_SIZE; - } - else - while (blocks--) { - AsmProcess(in, out); - - *(word32*)out ^= r_[0]; - *(word32*)(out + 4) ^= r_[1]; - - memcpy(r_, in, BLOCK_SIZE); - - out += BLOCK_SIZE; - in += BLOCK_SIZE; - } -} - -#endif // DO_BLOWFISH_ASM - - -void Blowfish::SetKey(const byte* key_string, word32 keylength, CipherDir dir) -{ - assert(keylength >= 4 && keylength <= 56); - - unsigned i, j=0, k; - word32 data, dspace[2] = {0, 0}; - - memcpy(pbox_, p_init_, sizeof(p_init_)); - memcpy(sbox_, s_init_, sizeof(s_init_)); - - // Xor key string into encryption key vector - for (i=0 ; i> 8)&0xFF) -#define BFBYTE_2(x) ((x>>16)&0xFF) -#define BFBYTE_3(x) ( x>>24) - - -#define BF_S(Put, Get, I) (\ - Put ^= p[I], \ - tmp = p[18 + BFBYTE_3(Get)], \ - tmp += p[274+ BFBYTE_2(Get)], \ - tmp ^= p[530+ BFBYTE_1(Get)], \ - tmp += p[786+ BFBYTE_0(Get)], \ - Put ^= tmp \ - ) - - -#define BF_ROUNDS \ - BF_S(right, left, 1); \ - BF_S(left, right, 2); \ - BF_S(right, left, 3); \ - BF_S(left, right, 4); \ - BF_S(right, left, 5); \ - BF_S(left, right, 6); \ - BF_S(right, left, 7); \ - BF_S(left, right, 8); \ - BF_S(right, left, 9); \ - BF_S(left, right, 10); \ - BF_S(right, left, 11); \ - BF_S(left, right, 12); \ - BF_S(right, left, 13); \ - BF_S(left, right, 14); \ - BF_S(right, left, 15); \ - BF_S(left, right, 16); - -#define BF_EXTRA_ROUNDS \ - BF_S(right, left, 17); \ - BF_S(left, right, 18); \ - BF_S(right, left, 19); \ - BF_S(left, right, 20); - - -// Used by key setup, no byte swapping -void Blowfish::crypt_block(const word32 in[2], word32 out[2]) const -{ - word32 left = in[0]; - word32 right = in[1]; - - const word32* p = pbox_; - word32 tmp; - - left ^= p[0]; - - BF_ROUNDS - -#if ROUNDS == 20 - BF_EXTRA_ROUNDS -#endif - - right ^= p[ROUNDS + 1]; - - out[0] = right; - out[1] = left; -} - - -typedef BlockGetAndPut gpBlock; - -void Blowfish::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out) - const -{ - word32 tmp, left, right; - const word32* p = pbox_; - - gpBlock::Get(in)(left)(right); - left ^= p[0]; - - BF_ROUNDS - -#if ROUNDS == 20 - BF_EXTRA_ROUNDS -#endif - - right ^= p[ROUNDS + 1]; - - gpBlock::Put(xOr, out)(right)(left); -} - - -#if defined(DO_BLOWFISH_ASM) - #ifdef __GNUC__ - #define AS1(x) asm(#x); - #define AS2(x, y) asm(#x ", " #y); - - #define PROLOG() \ - asm(".intel_syntax noprefix"); \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( mov ecx, DWORD PTR [ebp + 8] ) \ - AS2( mov esi, DWORD PTR [ebp + 12] ) - - #define EPILOG() \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS1( emms ) \ - asm(".att_syntax"); - #else - #define AS1(x) __asm x - #define AS2(x, y) __asm x, y - - #define PROLOG() \ - AS1( push ebp ) \ - AS2( mov ebp, esp ) \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( mov esi, DWORD PTR [ebp + 8] ) - - #define EPILOG() \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS2( mov esp, ebp ) \ - AS1( pop ebp ) \ - AS1( emms ) \ - AS1( ret 8 ) - - #endif - - -#define BF_ROUND(P, G, I) \ - /* Put ^= p[I] */ \ - AS2( xor P, [edi + I*4] ) \ - /* tmp = p[18 + BFBYTE_3(Get)] */ \ - AS2( mov ecx, G ) \ - AS2( shr ecx, 16 ) \ - AS2( movzx edx, ch ) \ - AS2( mov esi, [edi + edx*4 + 72] ) \ - /* tmp += p[274+ BFBYTE_2(Get)] */ \ - AS2( movzx ecx, cl ) \ - AS2( add esi, [edi + ecx*4 + 1096] ) \ - /* tmp ^= p[530+ BFBYTE_1(Get)] */ \ - AS2( mov ecx, G ) \ - AS2( movzx edx, ch ) \ - AS2( xor esi, [edi + edx*4 + 2120] ) \ - /* tmp += p[786+ BFBYTE_0(Get)] */ \ - AS2( movzx ecx, cl ) \ - AS2( add esi, [edi + ecx*4 + 3144] ) \ - /* Put ^= tmp */ \ - AS2( xor P, esi ) - - -#ifdef _MSC_VER - __declspec(naked) -#endif -void Blowfish::AsmProcess(const byte* inBlock, byte* outBlock) const -{ - PROLOG() - - #ifdef OLD_GCC_OFFSET - AS2( lea edi, [ecx + 60] ) // pbox - #else - AS2( lea edi, [ecx + 56] ) // pbox - #endif - - AS2( mov eax, DWORD PTR [esi] ) - AS2( mov edx, DWORD PTR [edi] ) - AS1( bswap eax ) - - AS2( mov ebx, DWORD PTR [esi + 4] ) - AS2( xor eax, edx ) // left - AS1( bswap ebx ) // right - - - BF_ROUND(ebx, eax, 1) - BF_ROUND(eax, ebx, 2) - BF_ROUND(ebx, eax, 3) - BF_ROUND(eax, ebx, 4) - BF_ROUND(ebx, eax, 5) - BF_ROUND(eax, ebx, 6) - BF_ROUND(ebx, eax, 7) - BF_ROUND(eax, ebx, 8) - BF_ROUND(ebx, eax, 9) - BF_ROUND(eax, ebx, 10) - BF_ROUND(ebx, eax, 11) - BF_ROUND(eax, ebx, 12) - BF_ROUND(ebx, eax, 13) - BF_ROUND(eax, ebx, 14) - BF_ROUND(ebx, eax, 15) - BF_ROUND(eax, ebx, 16) - #if ROUNDS == 20 - BF_ROUND(ebx, eax, 17) - BF_ROUND(eax, ebx, 18) - BF_ROUND(ebx, eax, 19) - BF_ROUND(eax, ebx, 20) - - AS2( xor ebx, [edi + 84] ) // 20 + 1 (x4) - #else - AS2( xor ebx, [edi + 68] ) // 16 + 1 (x4) - #endif - - #ifdef __GNUC__ - AS2( mov edi, [ebp + 16] ) // outBlock - #else - AS2( mov edi, [ebp + 12] ) // outBlock - #endif - - AS1( bswap ebx ) - AS1( bswap eax ) - - AS2( mov [edi] , ebx ) - AS2( mov [edi + 4], eax ) - - EPILOG() -} - - -#endif // DO_BLOWFISH_ASM - - -} // namespace - diff --git a/externals/mysql/extlib/yassl/taocrypt/src/coding.cpp b/externals/mysql/extlib/yassl/taocrypt/src/coding.cpp deleted file mode 100644 index 7a9d50aaac..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/coding.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* coding.cpp implements hex and base64 encoding/decoing -*/ - -#include "runtime.hpp" -#include "coding.hpp" -#include "file.hpp" - - -namespace TaoCrypt { - - -namespace { // locals - -const byte bad = 0xFF; // invalid encoding - -const byte hexEncode[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'A', 'B', 'C', 'D', 'E', 'F' - }; - -const byte hexDecode[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - bad, bad, bad, bad, bad, bad, bad, - 10, 11, 12, 13, 14, 15 - }; // A starts at 0x41 not 0x3A - - -const byte base64Encode[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', - 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', - 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - '+', '/' - }; - -const byte base64Decode[] = { 62, bad, bad, bad, 63, // + starts at 0x2B - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - bad, bad, bad, bad, bad, bad, bad, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, - bad, bad, bad, bad, bad, bad, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51 - }; - -const byte pad = '='; -const int pemLineSz = 64; - -} // local namespace - - -// Hex Encode -void HexEncoder::Encode() -{ - word32 bytes = plain_.size(); - encoded_.New(bytes * 2); - - word32 i = 0; - - while (bytes--) { - byte p = plain_.next(); - - byte b = p >> 4; - byte b2 = p & 0xF; - - encoded_[i++] = hexEncode[b]; - encoded_[i++] = hexEncode[b2]; - } - - plain_.reset(encoded_); -} - - -// Hex Decode -void HexDecoder::Decode() -{ - word32 bytes = coded_.size(); - assert((bytes % 2) == 0); - decoded_.New(bytes / 2); - - word32 i(0); - - while (bytes) { - byte b = coded_.next() - 0x30; // 0 starts at 0x30 - byte b2 = coded_.next() - 0x30; - - // sanity checks - assert( b < sizeof(hexDecode)/sizeof(hexDecode[0]) ); - assert( b2 < sizeof(hexDecode)/sizeof(hexDecode[0]) ); - - b = hexDecode[b]; - b2 = hexDecode[b2]; - - assert( b != bad && b2 != bad ); - - decoded_[i++] = (b << 4) | b2; - bytes -= 2; - } - - coded_.reset(decoded_); -} - - -// Base 64 Encode -void Base64Encoder::Encode() -{ - word32 bytes = plain_.size(); - word32 outSz = (bytes + 3 - 1) / 3 * 4; - - outSz += (outSz + pemLineSz - 1) / pemLineSz; // new lines - encoded_.New(outSz); - - word32 i = 0; - word32 j = 0; - - while (bytes > 2) { - byte b1 = plain_.next(); - byte b2 = plain_.next(); - byte b3 = plain_.next(); - - // encoded idx - byte e1 = b1 >> 2; - byte e2 = ((b1 & 0x3) << 4) | (b2 >> 4); - byte e3 = ((b2 & 0xF) << 2) | (b3 >> 6); - byte e4 = b3 & 0x3F; - - // store - encoded_[i++] = base64Encode[e1]; - encoded_[i++] = base64Encode[e2]; - encoded_[i++] = base64Encode[e3]; - encoded_[i++] = base64Encode[e4]; - - bytes -= 3; - - if ((++j % 16) == 0 && bytes) - encoded_[i++] = '\n'; - } - - // last integral - if (bytes) { - bool twoBytes = (bytes == 2); - - byte b1 = plain_.next(); - byte b2 = (twoBytes) ? plain_.next() : 0; - - byte e1 = b1 >> 2; - byte e2 = ((b1 & 0x3) << 4) | (b2 >> 4); - byte e3 = (b2 & 0xF) << 2; - - encoded_[i++] = base64Encode[e1]; - encoded_[i++] = base64Encode[e2]; - encoded_[i++] = (twoBytes) ? base64Encode[e3] : pad; - encoded_[i++] = pad; - } - - encoded_[i++] = '\n'; - assert(i == outSz); - - plain_.reset(encoded_); -} - - -// Base 64 Decode -void Base64Decoder::Decode() -{ - word32 bytes = coded_.size(); - word32 plainSz = bytes - ((bytes + (pemLineSz - 1)) / pemLineSz); - plainSz = (plainSz * 3 + 3) / 4; - decoded_.New(plainSz); - - word32 i = 0; - word32 j = 0; - - while (bytes > 3) { - byte e1 = coded_.next(); - byte e2 = coded_.next(); - byte e3 = coded_.next(); - byte e4 = coded_.next(); - - // do asserts first - if (e1 == 0) // end file 0's - break; - - bool pad3 = false; - bool pad4 = false; - if (e3 == pad) - pad3 = true; - if (e4 == pad) - pad4 = true; - - e1 = base64Decode[e1 - 0x2B]; - e2 = base64Decode[e2 - 0x2B]; - e3 = (e3 == pad) ? 0 : base64Decode[e3 - 0x2B]; - e4 = (e4 == pad) ? 0 : base64Decode[e4 - 0x2B]; - - byte b1 = (e1 << 2) | (e2 >> 4); - byte b2 = ((e2 & 0xF) << 4) | (e3 >> 2); - byte b3 = ((e3 & 0x3) << 6) | e4; - - decoded_[i++] = b1; - if (!pad3) - decoded_[i++] = b2; - if (!pad4) - decoded_[i++] = b3; - else - break; - - bytes -= 4; - if ((++j % 16) == 0) { - byte endLine = coded_.next(); - bytes--; - while (endLine == ' ') { // remove possible whitespace - endLine = coded_.next(); - bytes--; - } - if (endLine == '\r') { - endLine = coded_.next(); - bytes--; - } - if (endLine != '\n') { - coded_.SetError(PEM_E); - return; - } - } - } - - if (i != decoded_.size()) - decoded_.resize(i); - coded_.reset(decoded_); -} - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/crypto.cpp b/externals/mysql/extlib/yassl/taocrypt/src/crypto.cpp deleted file mode 100644 index 90d406bf0c..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/crypto.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* put features that other apps expect from OpenSSL type crypto */ - - - -extern "C" { - - // for libcurl configure test, these are the signatures they use - // locking handled internally by library - char CRYPTO_lock() { return 0;} - char CRYPTO_add_lock() { return 0;} - - - // for openvpn, test are the signatures they use - char EVP_CIPHER_CTX_init() { return 0; } - char CRYPTO_mem_ctrl() { return 0; } -} // extern "C" - - - diff --git a/externals/mysql/extlib/yassl/taocrypt/src/des.cpp b/externals/mysql/extlib/yassl/taocrypt/src/des.cpp deleted file mode 100644 index 5cffeaea9c..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/des.cpp +++ /dev/null @@ -1,776 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* C++ part based on Wei Dai's des.cpp from CryptoPP */ -/* x86 asm is original */ - - -#if defined(TAOCRYPT_KERNEL_MODE) - #define DO_TAOCRYPT_KERNEL_MODE -#endif // only some modules now support this - - -#include "runtime.hpp" -#include "des.hpp" -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - - -namespace TaoCrypt { - - -/* permuted choice table (key) */ -static const byte pc1[] = { - 57, 49, 41, 33, 25, 17, 9, - 1, 58, 50, 42, 34, 26, 18, - 10, 2, 59, 51, 43, 35, 27, - 19, 11, 3, 60, 52, 44, 36, - - 63, 55, 47, 39, 31, 23, 15, - 7, 62, 54, 46, 38, 30, 22, - 14, 6, 61, 53, 45, 37, 29, - 21, 13, 5, 28, 20, 12, 4 -}; - -/* number left rotations of pc1 */ -static const byte totrot[] = { - 1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28 -}; - -/* permuted choice key (table) */ -static const byte pc2[] = { - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, - 41, 52, 31, 37, 47, 55, - 30, 40, 51, 45, 33, 48, - 44, 49, 39, 56, 34, 53, - 46, 42, 50, 36, 29, 32 -}; - -/* End of DES-defined tables */ - -/* bit 0 is left-most in byte */ -static const int bytebit[] = { - 0200,0100,040,020,010,04,02,01 -}; - -const word32 Spbox[8][64] = { -{ -0x01010400,0x00000000,0x00010000,0x01010404, -0x01010004,0x00010404,0x00000004,0x00010000, -0x00000400,0x01010400,0x01010404,0x00000400, -0x01000404,0x01010004,0x01000000,0x00000004, -0x00000404,0x01000400,0x01000400,0x00010400, -0x00010400,0x01010000,0x01010000,0x01000404, -0x00010004,0x01000004,0x01000004,0x00010004, -0x00000000,0x00000404,0x00010404,0x01000000, -0x00010000,0x01010404,0x00000004,0x01010000, -0x01010400,0x01000000,0x01000000,0x00000400, -0x01010004,0x00010000,0x00010400,0x01000004, -0x00000400,0x00000004,0x01000404,0x00010404, -0x01010404,0x00010004,0x01010000,0x01000404, -0x01000004,0x00000404,0x00010404,0x01010400, -0x00000404,0x01000400,0x01000400,0x00000000, -0x00010004,0x00010400,0x00000000,0x01010004}, -{ -0x80108020,0x80008000,0x00008000,0x00108020, -0x00100000,0x00000020,0x80100020,0x80008020, -0x80000020,0x80108020,0x80108000,0x80000000, -0x80008000,0x00100000,0x00000020,0x80100020, -0x00108000,0x00100020,0x80008020,0x00000000, -0x80000000,0x00008000,0x00108020,0x80100000, -0x00100020,0x80000020,0x00000000,0x00108000, -0x00008020,0x80108000,0x80100000,0x00008020, -0x00000000,0x00108020,0x80100020,0x00100000, -0x80008020,0x80100000,0x80108000,0x00008000, -0x80100000,0x80008000,0x00000020,0x80108020, -0x00108020,0x00000020,0x00008000,0x80000000, -0x00008020,0x80108000,0x00100000,0x80000020, -0x00100020,0x80008020,0x80000020,0x00100020, -0x00108000,0x00000000,0x80008000,0x00008020, -0x80000000,0x80100020,0x80108020,0x00108000}, -{ -0x00000208,0x08020200,0x00000000,0x08020008, -0x08000200,0x00000000,0x00020208,0x08000200, -0x00020008,0x08000008,0x08000008,0x00020000, -0x08020208,0x00020008,0x08020000,0x00000208, -0x08000000,0x00000008,0x08020200,0x00000200, -0x00020200,0x08020000,0x08020008,0x00020208, -0x08000208,0x00020200,0x00020000,0x08000208, -0x00000008,0x08020208,0x00000200,0x08000000, -0x08020200,0x08000000,0x00020008,0x00000208, -0x00020000,0x08020200,0x08000200,0x00000000, -0x00000200,0x00020008,0x08020208,0x08000200, -0x08000008,0x00000200,0x00000000,0x08020008, -0x08000208,0x00020000,0x08000000,0x08020208, -0x00000008,0x00020208,0x00020200,0x08000008, -0x08020000,0x08000208,0x00000208,0x08020000, -0x00020208,0x00000008,0x08020008,0x00020200}, -{ -0x00802001,0x00002081,0x00002081,0x00000080, -0x00802080,0x00800081,0x00800001,0x00002001, -0x00000000,0x00802000,0x00802000,0x00802081, -0x00000081,0x00000000,0x00800080,0x00800001, -0x00000001,0x00002000,0x00800000,0x00802001, -0x00000080,0x00800000,0x00002001,0x00002080, -0x00800081,0x00000001,0x00002080,0x00800080, -0x00002000,0x00802080,0x00802081,0x00000081, -0x00800080,0x00800001,0x00802000,0x00802081, -0x00000081,0x00000000,0x00000000,0x00802000, -0x00002080,0x00800080,0x00800081,0x00000001, -0x00802001,0x00002081,0x00002081,0x00000080, -0x00802081,0x00000081,0x00000001,0x00002000, -0x00800001,0x00002001,0x00802080,0x00800081, -0x00002001,0x00002080,0x00800000,0x00802001, -0x00000080,0x00800000,0x00002000,0x00802080}, -{ -0x00000100,0x02080100,0x02080000,0x42000100, -0x00080000,0x00000100,0x40000000,0x02080000, -0x40080100,0x00080000,0x02000100,0x40080100, -0x42000100,0x42080000,0x00080100,0x40000000, -0x02000000,0x40080000,0x40080000,0x00000000, -0x40000100,0x42080100,0x42080100,0x02000100, -0x42080000,0x40000100,0x00000000,0x42000000, -0x02080100,0x02000000,0x42000000,0x00080100, -0x00080000,0x42000100,0x00000100,0x02000000, -0x40000000,0x02080000,0x42000100,0x40080100, -0x02000100,0x40000000,0x42080000,0x02080100, -0x40080100,0x00000100,0x02000000,0x42080000, -0x42080100,0x00080100,0x42000000,0x42080100, -0x02080000,0x00000000,0x40080000,0x42000000, -0x00080100,0x02000100,0x40000100,0x00080000, -0x00000000,0x40080000,0x02080100,0x40000100}, -{ -0x20000010,0x20400000,0x00004000,0x20404010, -0x20400000,0x00000010,0x20404010,0x00400000, -0x20004000,0x00404010,0x00400000,0x20000010, -0x00400010,0x20004000,0x20000000,0x00004010, -0x00000000,0x00400010,0x20004010,0x00004000, -0x00404000,0x20004010,0x00000010,0x20400010, -0x20400010,0x00000000,0x00404010,0x20404000, -0x00004010,0x00404000,0x20404000,0x20000000, -0x20004000,0x00000010,0x20400010,0x00404000, -0x20404010,0x00400000,0x00004010,0x20000010, -0x00400000,0x20004000,0x20000000,0x00004010, -0x20000010,0x20404010,0x00404000,0x20400000, -0x00404010,0x20404000,0x00000000,0x20400010, -0x00000010,0x00004000,0x20400000,0x00404010, -0x00004000,0x00400010,0x20004010,0x00000000, -0x20404000,0x20000000,0x00400010,0x20004010}, -{ -0x00200000,0x04200002,0x04000802,0x00000000, -0x00000800,0x04000802,0x00200802,0x04200800, -0x04200802,0x00200000,0x00000000,0x04000002, -0x00000002,0x04000000,0x04200002,0x00000802, -0x04000800,0x00200802,0x00200002,0x04000800, -0x04000002,0x04200000,0x04200800,0x00200002, -0x04200000,0x00000800,0x00000802,0x04200802, -0x00200800,0x00000002,0x04000000,0x00200800, -0x04000000,0x00200800,0x00200000,0x04000802, -0x04000802,0x04200002,0x04200002,0x00000002, -0x00200002,0x04000000,0x04000800,0x00200000, -0x04200800,0x00000802,0x00200802,0x04200800, -0x00000802,0x04000002,0x04200802,0x04200000, -0x00200800,0x00000000,0x00000002,0x04200802, -0x00000000,0x00200802,0x04200000,0x00000800, -0x04000002,0x04000800,0x00000800,0x00200002}, -{ -0x10001040,0x00001000,0x00040000,0x10041040, -0x10000000,0x10001040,0x00000040,0x10000000, -0x00040040,0x10040000,0x10041040,0x00041000, -0x10041000,0x00041040,0x00001000,0x00000040, -0x10040000,0x10000040,0x10001000,0x00001040, -0x00041000,0x00040040,0x10040040,0x10041000, -0x00001040,0x00000000,0x00000000,0x10040040, -0x10000040,0x10001000,0x00041040,0x00040000, -0x00041040,0x00040000,0x10041000,0x00001000, -0x00000040,0x10040040,0x00001000,0x00041040, -0x10001000,0x00000040,0x10000040,0x10040000, -0x10040040,0x10000000,0x00040000,0x10001040, -0x00000000,0x10041040,0x00040040,0x10000040, -0x10040000,0x10001000,0x10001040,0x00000000, -0x10041040,0x00041000,0x00041000,0x00001040, -0x00001040,0x00040040,0x10000000,0x10041000} -}; - - -void BasicDES::SetKey(const byte* key, word32 /*length*/, CipherDir dir) -{ - byte buffer[56+56+8]; - byte *const pc1m = buffer; /* place to modify pc1 into */ - byte *const pcr = pc1m + 56; /* place to rotate pc1 into */ - byte *const ks = pcr + 56; - register int i,j,l; - int m; - - for (j = 0; j < 56; j++) { /* convert pc1 to bits of key */ - l = pc1[j] - 1; /* integer bit location */ - m = l & 07; /* find bit */ - pc1m[j] = (key[l >> 3] & /* find which key byte l is in */ - bytebit[m]) /* and which bit of that byte */ - ? 1 : 0; /* and store 1-bit result */ - } - for (i = 0; i < 16; i++) { /* key chunk for each iteration */ - memset(ks, 0, 8); /* Clear key schedule */ - for (j = 0; j < 56; j++) /* rotate pc1 the right amount */ - pcr[j] = pc1m[(l = j + totrot[i]) < (j < 28 ? 28 : 56) ? l: l-28]; - /* rotate left and right halves independently */ - for (j = 0; j < 48; j++){ /* select bits individually */ - /* check bit that goes to ks[j] */ - if (pcr[pc2[j] - 1]){ - /* mask it in if it's there */ - l= j % 6; - ks[j/6] |= bytebit[l] >> 2; - } - } - /* Now convert to odd/even interleaved form for use in F */ - k_[2*i] = ((word32)ks[0] << 24) - | ((word32)ks[2] << 16) - | ((word32)ks[4] << 8) - | ((word32)ks[6]); - k_[2*i + 1] = ((word32)ks[1] << 24) - | ((word32)ks[3] << 16) - | ((word32)ks[5] << 8) - | ((word32)ks[7]); - } - - // reverse key schedule order - if (dir == DECRYPTION) - for (i = 0; i < 16; i += 2) { - STL::swap(k_[i], k_[32 - 2 - i]); - STL::swap(k_[i+1], k_[32 - 1 - i]); - } - -} - -static inline void IPERM(word32& left, word32& right) -{ - word32 work; - - right = rotlFixed(right, 4U); - work = (left ^ right) & 0xf0f0f0f0; - left ^= work; - - right = rotrFixed(right^work, 20U); - work = (left ^ right) & 0xffff0000; - left ^= work; - - right = rotrFixed(right^work, 18U); - work = (left ^ right) & 0x33333333; - left ^= work; - - right = rotrFixed(right^work, 6U); - work = (left ^ right) & 0x00ff00ff; - left ^= work; - - right = rotlFixed(right^work, 9U); - work = (left ^ right) & 0xaaaaaaaa; - left = rotlFixed(left^work, 1U); - right ^= work; -} - -static inline void FPERM(word32& left, word32& right) -{ - word32 work; - - right = rotrFixed(right, 1U); - work = (left ^ right) & 0xaaaaaaaa; - right ^= work; - left = rotrFixed(left^work, 9U); - work = (left ^ right) & 0x00ff00ff; - right ^= work; - left = rotlFixed(left^work, 6U); - work = (left ^ right) & 0x33333333; - right ^= work; - left = rotlFixed(left^work, 18U); - work = (left ^ right) & 0xffff0000; - right ^= work; - left = rotlFixed(left^work, 20U); - work = (left ^ right) & 0xf0f0f0f0; - right ^= work; - left = rotrFixed(left^work, 4U); -} - - -void BasicDES::RawProcessBlock(word32& lIn, word32& rIn) const -{ - word32 l = lIn, r = rIn; - const word32* kptr = k_; - - for (unsigned i=0; i<8; i++) - { - word32 work = rotrFixed(r, 4U) ^ kptr[4*i+0]; - l ^= Spbox[6][(work) & 0x3f] - ^ Spbox[4][(work >> 8) & 0x3f] - ^ Spbox[2][(work >> 16) & 0x3f] - ^ Spbox[0][(work >> 24) & 0x3f]; - work = r ^ kptr[4*i+1]; - l ^= Spbox[7][(work) & 0x3f] - ^ Spbox[5][(work >> 8) & 0x3f] - ^ Spbox[3][(work >> 16) & 0x3f] - ^ Spbox[1][(work >> 24) & 0x3f]; - - work = rotrFixed(l, 4U) ^ kptr[4*i+2]; - r ^= Spbox[6][(work) & 0x3f] - ^ Spbox[4][(work >> 8) & 0x3f] - ^ Spbox[2][(work >> 16) & 0x3f] - ^ Spbox[0][(work >> 24) & 0x3f]; - work = l ^ kptr[4*i+3]; - r ^= Spbox[7][(work) & 0x3f] - ^ Spbox[5][(work >> 8) & 0x3f] - ^ Spbox[3][(work >> 16) & 0x3f] - ^ Spbox[1][(work >> 24) & 0x3f]; - } - - lIn = l; rIn = r; -} - - - -typedef BlockGetAndPut Block; - - -void DES::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out) const -{ - word32 l,r; - Block::Get(in)(l)(r); - IPERM(l,r); - - RawProcessBlock(l, r); - - FPERM(l,r); - Block::Put(xOr, out)(r)(l); -} - - -void DES_EDE2::SetKey(const byte* key, word32 sz, CipherDir dir) -{ - des1_.SetKey(key, sz, dir); - des2_.SetKey(key + 8, sz, ReverseDir(dir)); -} - - -void DES_EDE2::ProcessAndXorBlock(const byte* in, const byte* xOr, - byte* out) const -{ - word32 l,r; - Block::Get(in)(l)(r); - IPERM(l,r); - - des1_.RawProcessBlock(l, r); - des2_.RawProcessBlock(r, l); - des1_.RawProcessBlock(l, r); - - FPERM(l,r); - Block::Put(xOr, out)(r)(l); -} - - -void DES_EDE3::SetKey(const byte* key, word32 sz, CipherDir dir) -{ - des1_.SetKey(key+(dir==ENCRYPTION?0:2*8), sz, dir); - des2_.SetKey(key+8, sz, ReverseDir(dir)); - des3_.SetKey(key+(dir==DECRYPTION?0:2*8), sz, dir); -} - - - -#if defined(DO_DES_ASM) - -// ia32 optimized version -void DES_EDE3::Process(byte* out, const byte* in, word32 sz) -{ - if (!isMMX) { - Mode_BASE::Process(out, in, sz); - return; - } - - word32 blocks = sz / DES_BLOCK_SIZE; - - if (mode_ == CBC) - if (dir_ == ENCRYPTION) - while (blocks--) { - r_[0] ^= *(word32*)in; - r_[1] ^= *(word32*)(in + 4); - - AsmProcess((byte*)r_, (byte*)r_, (void*)Spbox); - - memcpy(out, r_, DES_BLOCK_SIZE); - - in += DES_BLOCK_SIZE; - out += DES_BLOCK_SIZE; - } - else - while (blocks--) { - AsmProcess(in, out, (void*)Spbox); - - *(word32*)out ^= r_[0]; - *(word32*)(out + 4) ^= r_[1]; - - memcpy(r_, in, DES_BLOCK_SIZE); - - out += DES_BLOCK_SIZE; - in += DES_BLOCK_SIZE; - } - else - while (blocks--) { - AsmProcess(in, out, (void*)Spbox); - - out += DES_BLOCK_SIZE; - in += DES_BLOCK_SIZE; - } -} - -#endif // DO_DES_ASM - - -void DES_EDE3::ProcessAndXorBlock(const byte* in, const byte* xOr, - byte* out) const -{ - word32 l,r; - Block::Get(in)(l)(r); - IPERM(l,r); - - des1_.RawProcessBlock(l, r); - des2_.RawProcessBlock(r, l); - des3_.RawProcessBlock(l, r); - - FPERM(l,r); - Block::Put(xOr, out)(r)(l); -} - - -#if defined(DO_DES_ASM) - -/* Uses IPERM algorithm from above - - left is in eax - right is in ebx - - uses ecx -*/ -#define AsmIPERM() {\ - AS2( rol ebx, 4 ) \ - AS2( mov ecx, eax ) \ - AS2( xor ecx, ebx ) \ - AS2( and ecx, 0xf0f0f0f0 ) \ - AS2( xor ebx, ecx ) \ - AS2( xor eax, ecx ) \ - AS2( ror ebx, 20 ) \ - AS2( mov ecx, eax ) \ - AS2( xor ecx, ebx ) \ - AS2( and ecx, 0xffff0000 ) \ - AS2( xor ebx, ecx ) \ - AS2( xor eax, ecx ) \ - AS2( ror ebx, 18 ) \ - AS2( mov ecx, eax ) \ - AS2( xor ecx, ebx ) \ - AS2( and ecx, 0x33333333 ) \ - AS2( xor ebx, ecx ) \ - AS2( xor eax, ecx ) \ - AS2( ror ebx, 6 ) \ - AS2( mov ecx, eax ) \ - AS2( xor ecx, ebx ) \ - AS2( and ecx, 0x00ff00ff ) \ - AS2( xor ebx, ecx ) \ - AS2( xor eax, ecx ) \ - AS2( rol ebx, 9 ) \ - AS2( mov ecx, eax ) \ - AS2( xor ecx, ebx ) \ - AS2( and ecx, 0xaaaaaaaa ) \ - AS2( xor eax, ecx ) \ - AS2( rol eax, 1 ) \ - AS2( xor ebx, ecx ) } - - -/* Uses FPERM algorithm from above - - left is in eax - right is in ebx - - uses ecx -*/ -#define AsmFPERM() {\ - AS2( ror ebx, 1 ) \ - AS2( mov ecx, eax ) \ - AS2( xor ecx, ebx ) \ - AS2( and ecx, 0xaaaaaaaa ) \ - AS2( xor eax, ecx ) \ - AS2( xor ebx, ecx ) \ - AS2( ror eax, 9 ) \ - AS2( mov ecx, ebx ) \ - AS2( xor ecx, eax ) \ - AS2( and ecx, 0x00ff00ff ) \ - AS2( xor eax, ecx ) \ - AS2( xor ebx, ecx ) \ - AS2( rol eax, 6 ) \ - AS2( mov ecx, ebx ) \ - AS2( xor ecx, eax ) \ - AS2( and ecx, 0x33333333 ) \ - AS2( xor eax, ecx ) \ - AS2( xor ebx, ecx ) \ - AS2( rol eax, 18 ) \ - AS2( mov ecx, ebx ) \ - AS2( xor ecx, eax ) \ - AS2( and ecx, 0xffff0000 ) \ - AS2( xor eax, ecx ) \ - AS2( xor ebx, ecx ) \ - AS2( rol eax, 20 ) \ - AS2( mov ecx, ebx ) \ - AS2( xor ecx, eax ) \ - AS2( and ecx, 0xf0f0f0f0 ) \ - AS2( xor eax, ecx ) \ - AS2( xor ebx, ecx ) \ - AS2( ror eax, 4 ) } - - - - -/* DesRound implements this algorithm: - - word32 work = rotrFixed(r, 4U) ^ key[0]; - l ^= Spbox[6][(work) & 0x3f] - ^ Spbox[4][(work >> 8) & 0x3f] - ^ Spbox[2][(work >> 16) & 0x3f] - ^ Spbox[0][(work >> 24) & 0x3f]; - work = r ^ key[1]; - l ^= Spbox[7][(work) & 0x3f] - ^ Spbox[5][(work >> 8) & 0x3f] - ^ Spbox[3][(work >> 16) & 0x3f] - ^ Spbox[1][(work >> 24) & 0x3f]; - - work = rotrFixed(l, 4U) ^ key[2]; - r ^= Spbox[6][(work) & 0x3f] - ^ Spbox[4][(work >> 8) & 0x3f] - ^ Spbox[2][(work >> 16) & 0x3f] - ^ Spbox[0][(work >> 24) & 0x3f]; - work = l ^ key[3]; - r ^= Spbox[7][(work) & 0x3f] - ^ Spbox[5][(work >> 8) & 0x3f] - ^ Spbox[3][(work >> 16) & 0x3f] - ^ Spbox[1][(work >> 24) & 0x3f]; - - left is in aex - right is in ebx - key is in edx - - edvances key for next round - - uses ecx, esi, and edi -*/ -#define DesRound() \ - AS2( mov ecx, ebx )\ - AS2( mov esi, DWORD PTR [edx] )\ - AS2( ror ecx, 4 )\ - AS2( xor ecx, esi )\ - AS2( and ecx, 0x3f3f3f3f )\ - AS2( movzx esi, cl )\ - AS2( movzx edi, ch )\ - AS2( xor eax, [ebp + esi*4 + 6*256] )\ - AS2( shr ecx, 16 )\ - AS2( xor eax, [ebp + edi*4 + 4*256] )\ - AS2( movzx esi, cl )\ - AS2( movzx edi, ch )\ - AS2( xor eax, [ebp + esi*4 + 2*256] )\ - AS2( mov esi, DWORD PTR [edx + 4] )\ - AS2( xor eax, [ebp + edi*4] )\ - AS2( mov ecx, ebx )\ - AS2( xor ecx, esi )\ - AS2( and ecx, 0x3f3f3f3f )\ - AS2( movzx esi, cl )\ - AS2( movzx edi, ch )\ - AS2( xor eax, [ebp + esi*4 + 7*256] )\ - AS2( shr ecx, 16 )\ - AS2( xor eax, [ebp + edi*4 + 5*256] )\ - AS2( movzx esi, cl )\ - AS2( movzx edi, ch )\ - AS2( xor eax, [ebp + esi*4 + 3*256] )\ - AS2( mov esi, DWORD PTR [edx + 8] )\ - AS2( xor eax, [ebp + edi*4 + 1*256] )\ - AS2( mov ecx, eax )\ - AS2( ror ecx, 4 )\ - AS2( xor ecx, esi )\ - AS2( and ecx, 0x3f3f3f3f )\ - AS2( movzx esi, cl )\ - AS2( movzx edi, ch )\ - AS2( xor ebx, [ebp + esi*4 + 6*256] )\ - AS2( shr ecx, 16 )\ - AS2( xor ebx, [ebp + edi*4 + 4*256] )\ - AS2( movzx esi, cl )\ - AS2( movzx edi, ch )\ - AS2( xor ebx, [ebp + esi*4 + 2*256] )\ - AS2( mov esi, DWORD PTR [edx + 12] )\ - AS2( xor ebx, [ebp + edi*4] )\ - AS2( mov ecx, eax )\ - AS2( xor ecx, esi )\ - AS2( and ecx, 0x3f3f3f3f )\ - AS2( movzx esi, cl )\ - AS2( movzx edi, ch )\ - AS2( xor ebx, [ebp + esi*4 + 7*256] )\ - AS2( shr ecx, 16 )\ - AS2( xor ebx, [ebp + edi*4 + 5*256] )\ - AS2( movzx esi, cl )\ - AS2( movzx edi, ch )\ - AS2( xor ebx, [ebp + esi*4 + 3*256] )\ - AS2( add edx, 16 )\ - AS2( xor ebx, [ebp + edi*4 + 1*256] ) - - -#ifdef _MSC_VER - __declspec(naked) -#endif -void DES_EDE3::AsmProcess(const byte* in, byte* out, void* box) const -{ -#ifdef __GNUC__ - #define AS1(x) asm(#x); - #define AS2(x, y) asm(#x ", " #y); - - asm(".intel_syntax noprefix"); - - #define PROLOG() \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov edx, DWORD PTR [ebp + 8] ) \ - AS2( mov esi, DWORD PTR [ebp + 12] ) \ - AS2( mov ebp, DWORD PTR [ebp + 20] ) - - // ebp restored at end - #define EPILOG() \ - AS2( movd edi, mm3 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd esi, mm5 ) \ - AS1( emms ) \ - asm(".att_syntax"); - -#else - #define AS1(x) __asm x - #define AS2(x, y) __asm x, y - - #define PROLOG() \ - AS1( push ebp ) \ - AS2( mov ebp, esp ) \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov esi, DWORD PTR [ebp + 8] ) \ - AS2( mov edx, ecx ) \ - AS2( mov ebp, DWORD PTR [ebp + 16] ) - - // ebp restored at end - #define EPILOG() \ - AS2( movd edi, mm3 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd esi, mm5 ) \ - AS2( mov esp, ebp ) \ - AS1( pop ebp ) \ - AS1( emms ) \ - AS1( ret 12 ) - -#endif - - - PROLOG() - - AS2( movd mm2, edx ) - - #ifdef OLD_GCC_OFFSET - AS2( add edx, 60 ) // des1 = des1 key - #else - AS2( add edx, 56 ) // des1 = des1 key - #endif - - AS2( mov eax, DWORD PTR [esi] ) - AS2( mov ebx, DWORD PTR [esi + 4] ) - AS1( bswap eax ) // left - AS1( bswap ebx ) // right - - AsmIPERM() - - DesRound() // 1 - DesRound() // 2 - DesRound() // 3 - DesRound() // 4 - DesRound() // 5 - DesRound() // 6 - DesRound() // 7 - DesRound() // 8 - - // swap left and right - AS2( xchg eax, ebx ) - - DesRound() // 1 - DesRound() // 2 - DesRound() // 3 - DesRound() // 4 - DesRound() // 5 - DesRound() // 6 - DesRound() // 7 - DesRound() // 8 - - // swap left and right - AS2( xchg eax, ebx ) - - DesRound() // 1 - DesRound() // 2 - DesRound() // 3 - DesRound() // 4 - DesRound() // 5 - DesRound() // 6 - DesRound() // 7 - DesRound() // 8 - - AsmFPERM() - - //end - AS2( movd ebp, mm6 ) - - // swap and write out - AS1( bswap ebx ) - AS1( bswap eax ) - -#ifdef __GNUC__ - AS2( mov esi, DWORD PTR [ebp + 16] ) // outBlock -#else - AS2( mov esi, DWORD PTR [ebp + 12] ) // outBlock -#endif - - AS2( mov DWORD PTR [esi], ebx ) // right first - AS2( mov DWORD PTR [esi + 4], eax ) - - - EPILOG() -} - - - -#endif // defined(DO_DES_ASM) - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/dh.cpp b/externals/mysql/extlib/yassl/taocrypt/src/dh.cpp deleted file mode 100644 index d6a61cfb1f..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/dh.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* dh.cpp implements Diffie-Hellman support -*/ - -#include "runtime.hpp" -#include "dh.hpp" -#include "asn.hpp" -#include - -namespace TaoCrypt { - - -namespace { // locals - -unsigned int DiscreteLogWorkFactor(unsigned int n) -{ - // assuming discrete log takes about the same time as factoring - if (n<5) - return 0; - else - return (unsigned int)(2.4 * pow((double)n, 1.0/3.0) * - pow(log(double(n)), 2.0/3.0) - 5); -} - -} // namespace locals - - -// Generate a DH Key Pair -void DH::GenerateKeyPair(RandomNumberGenerator& rng, byte* priv, byte* pub) -{ - GeneratePrivate(rng, priv); - GeneratePublic(priv, pub); -} - - -// Generate private value -void DH::GeneratePrivate(RandomNumberGenerator& rng, byte* priv) -{ - Integer x(rng, Integer::One(), min(p_ - 1, - Integer::Power2(2*DiscreteLogWorkFactor(p_.BitCount())) ) ); - x.Encode(priv, p_.ByteCount()); -} - - -// Generate public value -void DH::GeneratePublic(const byte* priv, byte* pub) -{ - const word32 bc(p_.ByteCount()); - Integer x(priv, bc); - Integer y(a_exp_b_mod_c(g_, x, p_)); - y.Encode(pub, bc); -} - - -// Generate Agreement -void DH::Agree(byte* agree, const byte* priv, const byte* otherPub, word32 - otherSz) -{ - const word32 bc(p_.ByteCount()); - Integer x(priv, bc); - Integer y; - if (otherSz) - y.Decode(otherPub, otherSz); - else - y.Decode(otherPub, bc); - - Integer z(a_exp_b_mod_c(y, x, p_)); - z.Encode(agree, bc); -} - - -DH::DH(Source& source) -{ - Initialize(source); -} - - -void DH::Initialize(Source& source) -{ - DH_Decoder decoder(source); - decoder.Decode(*this); -} - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/dsa.cpp b/externals/mysql/extlib/yassl/taocrypt/src/dsa.cpp deleted file mode 100644 index 79ee91e76f..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/dsa.cpp +++ /dev/null @@ -1,271 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -#include "runtime.hpp" -#include "dsa.hpp" -#include "sha.hpp" -#include "asn.hpp" -#include "modarith.hpp" - - -namespace TaoCrypt { - - -void DSA_PublicKey::Swap(DSA_PublicKey& other) -{ - p_.Swap(other.p_); - q_.Swap(other.q_); - g_.Swap(other.g_); - y_.Swap(other.y_); -} - - -DSA_PublicKey::DSA_PublicKey(const DSA_PublicKey& other) - : p_(other.p_), q_(other.q_), g_(other.g_), y_(other.y_) -{} - - -DSA_PublicKey& DSA_PublicKey::operator=(const DSA_PublicKey& that) -{ - DSA_PublicKey tmp(that); - Swap(tmp); - return *this; -} - - -DSA_PublicKey::DSA_PublicKey(Source& source) -{ - Initialize(source); -} - - -void DSA_PublicKey::Initialize(Source& source) -{ - DSA_Public_Decoder decoder(source); - decoder.Decode(*this); -} - - -void DSA_PublicKey::Initialize(const Integer& p, const Integer& q, - const Integer& g, const Integer& y) -{ - p_ = p; - q_ = q; - g_ = g; - y_ = y; -} - - -const Integer& DSA_PublicKey::GetModulus() const -{ - return p_; -} - -const Integer& DSA_PublicKey::GetSubGroupOrder() const -{ - return q_; -} - - -const Integer& DSA_PublicKey::GetSubGroupGenerator() const -{ - return g_; -} - - -const Integer& DSA_PublicKey::GetPublicPart() const -{ - return y_; -} - - -void DSA_PublicKey::SetModulus(const Integer& p) -{ - p_ = p; -} - - -void DSA_PublicKey::SetSubGroupOrder(const Integer& q) -{ - q_ = q; -} - - -void DSA_PublicKey::SetSubGroupGenerator(const Integer& g) -{ - g_ = g; -} - - -void DSA_PublicKey::SetPublicPart(const Integer& y) -{ - y_ = y; -} - - -word32 DSA_PublicKey::SignatureLength() const -{ - return GetSubGroupOrder().ByteCount() * 2; // r and s -} - - - -DSA_PrivateKey::DSA_PrivateKey(Source& source) -{ - Initialize(source); -} - - -void DSA_PrivateKey::Initialize(Source& source) -{ - DSA_Private_Decoder decoder(source); - decoder.Decode(*this); -} - - -void DSA_PrivateKey::Initialize(const Integer& p, const Integer& q, - const Integer& g, const Integer& y, - const Integer& x) -{ - DSA_PublicKey::Initialize(p, q, g, y); - x_ = x; -} - - -const Integer& DSA_PrivateKey::GetPrivatePart() const -{ - return x_; -} - - -void DSA_PrivateKey::SetPrivatePart(const Integer& x) -{ - x_ = x; -} - - -DSA_Signer::DSA_Signer(const DSA_PrivateKey& key) - : key_(key) -{} - - -word32 DSA_Signer::Sign(const byte* sha_digest, byte* sig, - RandomNumberGenerator& rng) -{ - const Integer& p = key_.GetModulus(); - const Integer& q = key_.GetSubGroupOrder(); - const Integer& g = key_.GetSubGroupGenerator(); - const Integer& x = key_.GetPrivatePart(); - - Integer k(rng, 1, q - 1); - - r_ = a_exp_b_mod_c(g, k, p); - r_ %= q; - - Integer H(sha_digest, SHA::DIGEST_SIZE); // sha Hash(m) - - Integer kInv = k.InverseMod(q); - s_ = (kInv * (H + x*r_)) % q; - - assert(!!r_ && !!s_); - - int rSz = r_.ByteCount(); - - if (rSz == 19) { - sig[0] = 0; - sig++; - } - - r_.Encode(sig, rSz); - - int sSz = s_.ByteCount(); - - if (sSz == 19) { - sig[rSz] = 0; - sig++; - } - - s_.Encode(sig + rSz, sSz); - - return 40; -} - - -DSA_Verifier::DSA_Verifier(const DSA_PublicKey& key) - : key_(key) -{} - - -bool DSA_Verifier::Verify(const byte* sha_digest, const byte* sig) -{ - const Integer& p = key_.GetModulus(); - const Integer& q = key_.GetSubGroupOrder(); - const Integer& g = key_.GetSubGroupGenerator(); - const Integer& y = key_.GetPublicPart(); - - int sz = q.ByteCount(); - - r_.Decode(sig, sz); - s_.Decode(sig + sz, sz); - - if (r_ >= q || r_ < 1 || s_ >= q || s_ < 1) - return false; - - Integer H(sha_digest, SHA::DIGEST_SIZE); // sha Hash(m) - - Integer w = s_.InverseMod(q); - Integer u1 = (H * w) % q; - Integer u2 = (r_ * w) % q; - - // verify r == ((g^u1 * y^u2) mod p) mod q - ModularArithmetic ma(p); - Integer v = ma.CascadeExponentiate(g, u1, y, u2); - v %= q; - - return r_ == v; -} - - - - -const Integer& DSA_Signer::GetR() const -{ - return r_; -} - - -const Integer& DSA_Signer::GetS() const -{ - return s_; -} - - -const Integer& DSA_Verifier::GetR() const -{ - return r_; -} - - -const Integer& DSA_Verifier::GetS() const -{ - return s_; -} - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/file.cpp b/externals/mysql/extlib/yassl/taocrypt/src/file.cpp deleted file mode 100644 index 0498038a04..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/file.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* file.cpp implements File Sources and Sinks -*/ - -#include "runtime.hpp" -#include "file.hpp" - - -namespace TaoCrypt { - - -FileSource::FileSource(const char* fname, Source& source) -{ - file_ = fopen(fname, "rb"); - if (file_) get(source); -} - - -FileSource::~FileSource() -{ - if (file_) - fclose(file_); -} - - - -// return size of source from beginning or current position -word32 FileSource::size(bool use_current) -{ - long current = ftell(file_); - long begin = current; - - if (!use_current) { - fseek(file_, 0, SEEK_SET); - begin = ftell(file_); - } - - fseek(file_, 0, SEEK_END); - long end = ftell(file_); - - fseek(file_, current, SEEK_SET); - - return end - begin; -} - - -word32 FileSource::size_left() -{ - return size(true); -} - - -// fill file source from source -word32 FileSource::get(Source& source) -{ - word32 sz(size()); - if (source.size() < sz) - source.grow(sz); - - size_t bytes = fread(source.buffer_.get_buffer(), 1, sz, file_); - - if (bytes == 1) - return sz; - else - return 0; -} - - -FileSink::FileSink(const char* fname, Source& source) -{ - file_ = fopen(fname, "wb"); - if (file_) put(source); -} - - -FileSink::~FileSink() -{ - if (file_) - fclose(file_); -} - - -// fill source from file sink -void FileSink::put(Source& source) -{ - fwrite(source.get_buffer(), 1, source.size(), file_); -} - - -// swap with other and reset to beginning -void Source::reset(ByteBlock& otherBlock) -{ - buffer_.Swap(otherBlock); - current_ = 0; -} - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/hash.cpp b/externals/mysql/extlib/yassl/taocrypt/src/hash.cpp deleted file mode 100644 index c51dc42a90..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/hash.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* hash.cpp implements a base for digest types -*/ - -#include "runtime.hpp" -#include -#include - -#include "hash.hpp" - - -namespace TaoCrypt { - - -HASHwithTransform::HASHwithTransform(word32 digSz, word32 buffSz) -{ - assert(digSz <= MaxDigestSz); - assert(buffSz <= MaxBufferSz); -} - - -void HASHwithTransform::AddLength(word32 len) -{ - HashLengthType tmp = loLen_; - if ( (loLen_ += len) < tmp) - hiLen_++; // carry low to high - hiLen_ += SafeRightShift<8*sizeof(HashLengthType)>(len); -} - - -// Update digest with data of size len, do in blocks -void HASHwithTransform::Update(const byte* data, word32 len) -{ - // do block size increments - word32 blockSz = getBlockSize(); - byte* local = reinterpret_cast(buffer_); - - while (len) { - word32 add = min(len, blockSz - buffLen_); - memcpy(&local[buffLen_], data, add); - - buffLen_ += add; - data += add; - len -= add; - - if (buffLen_ == blockSz) { - ByteReverseIf(local, local, blockSz, getByteOrder()); - Transform(); - AddLength(blockSz); - buffLen_ = 0; - } - } -} - - -// Final process, place digest in hash -void HASHwithTransform::Final(byte* hash) -{ - word32 blockSz = getBlockSize(); - word32 digestSz = getDigestSize(); - word32 padSz = getPadSize(); - ByteOrder order = getByteOrder(); - - AddLength(buffLen_); // before adding pads - HashLengthType preLoLen = GetBitCountLo(); - HashLengthType preHiLen = GetBitCountHi(); - byte* local = reinterpret_cast(buffer_); - - local[buffLen_++] = 0x80; // add 1 - - // pad with zeros - if (buffLen_ > padSz) { - memset(&local[buffLen_], 0, blockSz - buffLen_); - buffLen_ += blockSz - buffLen_; - - ByteReverseIf(local, local, blockSz, order); - Transform(); - buffLen_ = 0; - } - memset(&local[buffLen_], 0, padSz - buffLen_); - - ByteReverseIf(local, local, blockSz, order); - - memcpy(&local[padSz], order ? &preHiLen : &preLoLen, sizeof(preLoLen)); - memcpy(&local[padSz+4], order ? &preLoLen : &preHiLen, sizeof(preLoLen)); - - Transform(); - ByteReverseIf(digest_, digest_, digestSz, order); - memcpy(hash, digest_, digestSz); - - Init(); // reset state -} - - -#ifdef WORD64_AVAILABLE - -HASH64withTransform::HASH64withTransform(word32 digSz, word32 buffSz) -{ - assert(digSz <= MaxDigestSz); - assert(buffSz <= MaxBufferSz); -} - - -void HASH64withTransform::AddLength(word32 len) -{ - HashLengthType tmp = loLen_; - if ( (loLen_ += len) < tmp) - hiLen_++; // carry low to high - hiLen_ += SafeRightShift<8*sizeof(HashLengthType)>(len); -} - - -// Update digest with data of size len, do in blocks -void HASH64withTransform::Update(const byte* data, word32 len) -{ - // do block size increments - word32 blockSz = getBlockSize(); - byte* local = reinterpret_cast(buffer_); - - while (len) { - word32 add = min(len, blockSz - buffLen_); - memcpy(&local[buffLen_], data, add); - - buffLen_ += add; - data += add; - len -= add; - - if (buffLen_ == blockSz) { - ByteReverseIf(buffer_, buffer_, blockSz, getByteOrder()); - Transform(); - AddLength(blockSz); - buffLen_ = 0; - } - } -} - - -// Final process, place digest in hash -void HASH64withTransform::Final(byte* hash) -{ - word32 blockSz = getBlockSize(); - word32 digestSz = getDigestSize(); - word32 padSz = getPadSize(); - ByteOrder order = getByteOrder(); - - AddLength(buffLen_); // before adding pads - HashLengthType preLoLen = GetBitCountLo(); - HashLengthType preHiLen = GetBitCountHi(); - byte* local = reinterpret_cast(buffer_); - - local[buffLen_++] = 0x80; // add 1 - - // pad with zeros - if (buffLen_ > padSz) { - memset(&local[buffLen_], 0, blockSz - buffLen_); - buffLen_ += blockSz - buffLen_; - - ByteReverseIf(buffer_, buffer_, blockSz, order); - Transform(); - buffLen_ = 0; - } - memset(&local[buffLen_], 0, padSz - buffLen_); - - ByteReverseIf(buffer_, buffer_, padSz, order); - - buffer_[blockSz / sizeof(word64) - 2] = order ? preHiLen : preLoLen; - buffer_[blockSz / sizeof(word64) - 1] = order ? preLoLen : preHiLen; - - Transform(); - ByteReverseIf(digest_, digest_, digestSz, order); - memcpy(hash, digest_, digestSz); - - Init(); // reset state -} - -#endif // WORD64_AVAILABLE - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/integer.cpp b/externals/mysql/extlib/yassl/taocrypt/src/integer.cpp deleted file mode 100644 index 85733b88aa..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/integer.cpp +++ /dev/null @@ -1,3964 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - - -/* based on Wei Dai's integer.cpp from CryptoPP */ - -#include "runtime.hpp" -#include "integer.hpp" -#include "modarith.hpp" -#include "asn.hpp" - - - -#ifdef __DECCXX - #include // for asm overflow assembly -#endif - -#if defined(_M_X64) || defined(_M_IA64) - #include -#pragma intrinsic(_umul128) -#endif - - -#ifdef __GNUC__ - #include - #include -#endif - - -#ifdef SSE2_INTRINSICS_AVAILABLE - #ifdef __GNUC__ - #include - #ifdef TAOCRYPT_MEMALIGN_AVAILABLE - #include - #else - #include - #endif - #else - #include - #endif -#elif defined(_MSC_VER) && defined(_M_IX86) - #pragma message("You do not seem to have the Visual C++ Processor Pack ") - #pragma message("installed, so use of SSE2 intrinsics will be disabled.") -#elif defined(__GNUC__) && defined(__i386__) -/* #warning You do not have GCC 3.3 or later, or did not specify the -msse2 \ - compiler option. Use of SSE2 intrinsics will be disabled. -*/ -#endif - - -namespace TaoCrypt { - - -#ifdef SSE2_INTRINSICS_AVAILABLE - -template -CPP_TYPENAME AlignedAllocator::pointer AlignedAllocator::allocate( - size_type n, const void *) -{ - CheckSize(n); - if (n == 0) - return 0; - if (n >= 4) - { - void* p; - #ifdef TAOCRYPT_MM_MALLOC_AVAILABLE - p = _mm_malloc(sizeof(T)*n, 16); - #elif defined(TAOCRYPT_MEMALIGN_AVAILABLE) - p = memalign(16, sizeof(T)*n); - #elif defined(TAOCRYPT_MALLOC_ALIGNMENT_IS_16) - p = malloc(sizeof(T)*n); - #else - p = (byte *)malloc(sizeof(T)*n + 8); - // assume malloc alignment is at least 8 - #endif - - #ifdef TAOCRYPT_NO_ALIGNED_ALLOC - assert(m_pBlock == 0); - m_pBlock = p; - if (!IsAlignedOn(p, 16)) - { - assert(IsAlignedOn(p, 8)); - p = (byte *)p + 8; - } - #endif - - assert(IsAlignedOn(p, 16)); - return (T*)p; - } - return NEW_TC T[n]; -} - - -template -void AlignedAllocator::deallocate(void* p, size_type n) -{ - memset(p, 0, n*sizeof(T)); - if (n >= 4) - { - #ifdef TAOCRYPT_MM_MALLOC_AVAILABLE - _mm_free(p); - #elif defined(TAOCRYPT_NO_ALIGNED_ALLOC) - assert(m_pBlock == p || (byte*)m_pBlock+8 == p); - free(m_pBlock); - m_pBlock = 0; - #else - free(p); - #endif - } - else - tcArrayDelete((T *)p); -} - -#endif // SSE2 - - -// ******** start of integer needs - -// start 5.2.1 adds DWord and Word ******** - -// ******************************************************** - -class DWord { -public: -DWord() {} - -#ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - explicit DWord(word low) - { - whole_ = low; - } -#else - explicit DWord(word low) - { - halfs_.low = low; - halfs_.high = 0; - } -#endif - - DWord(word low, word high) - { - halfs_.low = low; - halfs_.high = high; - } - - static DWord Multiply(word a, word b) - { - DWord r; - - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - r.whole_ = (dword)a * b; - - #elif defined(_M_X64) || defined(_M_IA64) - r.halfs_.low = _umul128(a, b, &r.halfs_.high); - - #elif defined(__alpha__) - r.halfs_.low = a*b; - #ifdef __GNUC__ - __asm__("umulh %1,%2,%0" : "=r" (r.halfs_.high) - : "r" (a), "r" (b)); - #elif defined(__DECCXX) - r.halfs_.high = asm("umulh %a0, %a1, %v0", a, b); - #else - #error unknown alpha compiler - #endif - - #elif defined(__ia64__) - r.halfs_.low = a*b; - __asm__("xmpy.hu %0=%1,%2" : "=f" (r.halfs_.high) - : "f" (a), "f" (b)); - - #elif defined(_ARCH_PPC64) - r.halfs_.low = a*b; - __asm__("mulhdu %0,%1,%2" : "=r" (r.halfs_.high) - : "r" (a), "r" (b) : "cc"); - - #elif defined(__x86_64__) - __asm__("mulq %3" : "=d" (r.halfs_.high), "=a" (r.halfs_.low) : - "a" (a), "rm" (b) : "cc"); - - #elif defined(__mips64) - __asm__("dmultu %2,%3" : "=h" (r.halfs_.high), "=l" (r.halfs_.low) - : "r" (a), "r" (b)); - - #elif defined(_M_IX86) - // for testing - word64 t = (word64)a * b; - r.halfs_.high = ((word32 *)(&t))[1]; - r.halfs_.low = (word32)t; - #else - #error can not implement DWord - #endif - - return r; - } - - static DWord MultiplyAndAdd(word a, word b, word c) - { - DWord r = Multiply(a, b); - return r += c; - } - - DWord & operator+=(word a) - { - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - whole_ = whole_ + a; - #else - halfs_.low += a; - halfs_.high += (halfs_.low < a); - #endif - return *this; - } - - DWord operator+(word a) - { - DWord r; - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - r.whole_ = whole_ + a; - #else - r.halfs_.low = halfs_.low + a; - r.halfs_.high = halfs_.high + (r.halfs_.low < a); - #endif - return r; - } - - DWord operator-(DWord a) - { - DWord r; - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - r.whole_ = whole_ - a.whole_; - #else - r.halfs_.low = halfs_.low - a.halfs_.low; - r.halfs_.high = halfs_.high - a.halfs_.high - - (r.halfs_.low > halfs_.low); - #endif - return r; - } - - DWord operator-(word a) - { - DWord r; - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - r.whole_ = whole_ - a; - #else - r.halfs_.low = halfs_.low - a; - r.halfs_.high = halfs_.high - (r.halfs_.low > halfs_.low); - #endif - return r; - } - - // returns quotient, which must fit in a word - word operator/(word divisor); - - word operator%(word a); - - bool operator!() const - { - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - return !whole_; - #else - return !halfs_.high && !halfs_.low; - #endif - } - - word GetLowHalf() const {return halfs_.low;} - word GetHighHalf() const {return halfs_.high;} - word GetHighHalfAsBorrow() const {return 0-halfs_.high;} - -private: - union - { - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - dword whole_; - #endif - struct - { - #ifdef LITTLE_ENDIAN_ORDER - word low; - word high; - #else - word high; - word low; - #endif - } halfs_; - }; -}; - - -class Word { -public: - Word() {} - - Word(word value) - { - whole_ = value; - } - - Word(hword low, hword high) - { - whole_ = low | (word(high) << (WORD_BITS/2)); - } - - static Word Multiply(hword a, hword b) - { - Word r; - r.whole_ = (word)a * b; - return r; - } - - Word operator-(Word a) - { - Word r; - r.whole_ = whole_ - a.whole_; - return r; - } - - Word operator-(hword a) - { - Word r; - r.whole_ = whole_ - a; - return r; - } - - // returns quotient, which must fit in a word - hword operator/(hword divisor) - { - return hword(whole_ / divisor); - } - - bool operator!() const - { - return !whole_; - } - - word GetWhole() const {return whole_;} - hword GetLowHalf() const {return hword(whole_);} - hword GetHighHalf() const {return hword(whole_>>(WORD_BITS/2));} - hword GetHighHalfAsBorrow() const {return 0-hword(whole_>>(WORD_BITS/2));} - -private: - word whole_; -}; - - -// dummy is VC60 compiler bug workaround -// do a 3 word by 2 word divide, returns quotient and leaves remainder in A -template -S DivideThreeWordsByTwo(S* A, S B0, S B1, D* dummy_VC6_WorkAround = 0) -{ - // assert {A[2],A[1]} < {B1,B0}, so quotient can fit in a S - assert(A[2] < B1 || (A[2]==B1 && A[1] < B0)); - - // estimate the quotient: do a 2 S by 1 S divide - S Q; - if (S(B1+1) == 0) - Q = A[2]; - else - Q = D(A[1], A[2]) / S(B1+1); - - // now subtract Q*B from A - D p = D::Multiply(B0, Q); - D u = (D) A[0] - p.GetLowHalf(); - A[0] = u.GetLowHalf(); - u = (D) A[1] - p.GetHighHalf() - u.GetHighHalfAsBorrow() - - D::Multiply(B1, Q); - A[1] = u.GetLowHalf(); - A[2] += u.GetHighHalf(); - - // Q <= actual quotient, so fix it - while (A[2] || A[1] > B1 || (A[1]==B1 && A[0]>=B0)) - { - u = (D) A[0] - B0; - A[0] = u.GetLowHalf(); - u = (D) A[1] - B1 - u.GetHighHalfAsBorrow(); - A[1] = u.GetLowHalf(); - A[2] += u.GetHighHalf(); - Q++; - assert(Q); // shouldn't overflow - } - - return Q; -} - - -// do a 4 word by 2 word divide, returns 2 word quotient in Q0 and Q1 -template -inline D DivideFourWordsByTwo(S *T, const D &Al, const D &Ah, const D &B) -{ - if (!B) // if divisor is 0, we assume divisor==2**(2*WORD_BITS) - return D(Ah.GetLowHalf(), Ah.GetHighHalf()); - else - { - S Q[2]; - T[0] = Al.GetLowHalf(); - T[1] = Al.GetHighHalf(); - T[2] = Ah.GetLowHalf(); - T[3] = Ah.GetHighHalf(); - Q[1] = DivideThreeWordsByTwo(T+1, B.GetLowHalf(), - B.GetHighHalf()); - Q[0] = DivideThreeWordsByTwo(T, B.GetLowHalf(), B.GetHighHalf()); - return D(Q[0], Q[1]); - } -} - - -// returns quotient, which must fit in a word -inline word DWord::operator/(word a) -{ - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - return word(whole_ / a); - #else - hword r[4]; - return DivideFourWordsByTwo(r, halfs_.low, - halfs_.high, a).GetWhole(); - #endif -} - -inline word DWord::operator%(word a) -{ - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - return word(whole_ % a); - #else - if (a < (word(1) << (WORD_BITS/2))) - { - hword h = hword(a); - word r = halfs_.high % h; - r = ((halfs_.low >> (WORD_BITS/2)) + (r << (WORD_BITS/2))) % h; - return hword((hword(halfs_.low) + (r << (WORD_BITS/2))) % h); - } - else - { - hword r[4]; - DivideFourWordsByTwo(r, halfs_.low, halfs_.high, a); - return Word(r[0], r[1]).GetWhole(); - } - #endif -} - - - -// end 5.2.1 DWord and Word adds - - - - - -static const unsigned int RoundupSizeTable[] = {2, 2, 2, 4, 4, 8, 8, 8, 8}; - -static inline unsigned int RoundupSize(unsigned int n) -{ - if (n<=8) - return RoundupSizeTable[n]; - else if (n<=16) - return 16; - else if (n<=32) - return 32; - else if (n<=64) - return 64; - else return 1U << BitPrecision(n-1); -} - - -static int Compare(const word *A, const word *B, unsigned int N) -{ - while (N--) - if (A[N] > B[N]) - return 1; - else if (A[N] < B[N]) - return -1; - - return 0; -} - -static word Increment(word *A, unsigned int N, word B=1) -{ - assert(N); - word t = A[0]; - A[0] = t+B; - if (A[0] >= t) - return 0; - for (unsigned i=1; i= A0) - if (B0 >= B1) - { - s = 0; - d = (dword)(A1-A0)*(B0-B1); - } - else - { - s = (A1-A0); - d = (dword)s*(word)(B0-B1); - } - else - if (B0 > B1) - { - s = (B0-B1); - d = (word)(A1-A0)*(dword)s; - } - else - { - s = 0; - d = (dword)(A0-A1)*(B1-B0); - } -*/ - // this segment is the branchless equivalent of above - word D[4] = {A[1]-A[0], A[0]-A[1], B[0]-B[1], B[1]-B[0]}; - unsigned int ai = A[1] < A[0]; - unsigned int bi = B[0] < B[1]; - unsigned int di = ai & bi; - DWord d = DWord::Multiply(D[di], D[di+2]); - D[1] = D[3] = 0; - unsigned int si = ai + !bi; - word s = D[si]; - - DWord A0B0 = DWord::Multiply(A[0], B[0]); - C[0] = A0B0.GetLowHalf(); - - DWord A1B1 = DWord::Multiply(A[1], B[1]); - DWord t = (DWord) A0B0.GetHighHalf() + A0B0.GetLowHalf() + d.GetLowHalf() - + A1B1.GetLowHalf(); - C[1] = t.GetLowHalf(); - - t = A1B1 + t.GetHighHalf() + A0B0.GetHighHalf() + d.GetHighHalf() - + A1B1.GetHighHalf() - s; - C[2] = t.GetLowHalf(); - C[3] = t.GetHighHalf(); -} - -void Portable::Multiply2Bottom(word *C, const word *A, const word *B) -{ - DWord t = DWord::Multiply(A[0], B[0]); - C[0] = t.GetLowHalf(); - C[1] = t.GetHighHalf() + A[0]*B[1] + A[1]*B[0]; -} - -word Portable::Multiply2Add(word *C, const word *A, const word *B) -{ - word D[4] = {A[1]-A[0], A[0]-A[1], B[0]-B[1], B[1]-B[0]}; - unsigned int ai = A[1] < A[0]; - unsigned int bi = B[0] < B[1]; - unsigned int di = ai & bi; - DWord d = DWord::Multiply(D[di], D[di+2]); - D[1] = D[3] = 0; - unsigned int si = ai + !bi; - word s = D[si]; - - DWord A0B0 = DWord::Multiply(A[0], B[0]); - DWord t = A0B0 + C[0]; - C[0] = t.GetLowHalf(); - - DWord A1B1 = DWord::Multiply(A[1], B[1]); - t = (DWord) t.GetHighHalf() + A0B0.GetLowHalf() + d.GetLowHalf() + - A1B1.GetLowHalf() + C[1]; - C[1] = t.GetLowHalf(); - - t = (DWord) t.GetHighHalf() + A1B1.GetLowHalf() + A0B0.GetHighHalf() + - d.GetHighHalf() + A1B1.GetHighHalf() - s + C[2]; - C[2] = t.GetLowHalf(); - - t = (DWord) t.GetHighHalf() + A1B1.GetHighHalf() + C[3]; - C[3] = t.GetLowHalf(); - return t.GetHighHalf(); -} - - -#define MulAcc(x, y) \ - p = DWord::MultiplyAndAdd(A[x], B[y], c); \ - c = p.GetLowHalf(); \ - p = (DWord) d + p.GetHighHalf(); \ - d = p.GetLowHalf(); \ - e += p.GetHighHalf(); - -#define SaveMulAcc(s, x, y) \ - R[s] = c; \ - p = DWord::MultiplyAndAdd(A[x], B[y], d); \ - c = p.GetLowHalf(); \ - p = (DWord) e + p.GetHighHalf(); \ - d = p.GetLowHalf(); \ - e = p.GetHighHalf(); - -#define SquAcc(x, y) \ - q = DWord::Multiply(A[x], A[y]); \ - p = q + c; \ - c = p.GetLowHalf(); \ - p = (DWord) d + p.GetHighHalf(); \ - d = p.GetLowHalf(); \ - e += p.GetHighHalf(); \ - p = q + c; \ - c = p.GetLowHalf(); \ - p = (DWord) d + p.GetHighHalf(); \ - d = p.GetLowHalf(); \ - e += p.GetHighHalf(); - -#define SaveSquAcc(s, x, y) \ - R[s] = c; \ - q = DWord::Multiply(A[x], A[y]); \ - p = q + d; \ - c = p.GetLowHalf(); \ - p = (DWord) e + p.GetHighHalf(); \ - d = p.GetLowHalf(); \ - e = p.GetHighHalf(); \ - p = q + c; \ - c = p.GetLowHalf(); \ - p = (DWord) d + p.GetHighHalf(); \ - d = p.GetLowHalf(); \ - e += p.GetHighHalf(); - - -void Portable::Multiply4(word *R, const word *A, const word *B) -{ - DWord p; - word c, d, e; - - p = DWord::Multiply(A[0], B[0]); - R[0] = p.GetLowHalf(); - c = p.GetHighHalf(); - d = e = 0; - - MulAcc(0, 1); - MulAcc(1, 0); - - SaveMulAcc(1, 2, 0); - MulAcc(1, 1); - MulAcc(0, 2); - - SaveMulAcc(2, 0, 3); - MulAcc(1, 2); - MulAcc(2, 1); - MulAcc(3, 0); - - SaveMulAcc(3, 3, 1); - MulAcc(2, 2); - MulAcc(1, 3); - - SaveMulAcc(4, 2, 3); - MulAcc(3, 2); - - R[5] = c; - p = DWord::MultiplyAndAdd(A[3], B[3], d); - R[6] = p.GetLowHalf(); - R[7] = e + p.GetHighHalf(); -} - -void Portable::Square2(word *R, const word *A) -{ - DWord p, q; - word c, d, e; - - p = DWord::Multiply(A[0], A[0]); - R[0] = p.GetLowHalf(); - c = p.GetHighHalf(); - d = e = 0; - - SquAcc(0, 1); - - R[1] = c; - p = DWord::MultiplyAndAdd(A[1], A[1], d); - R[2] = p.GetLowHalf(); - R[3] = e + p.GetHighHalf(); -} - -void Portable::Square4(word *R, const word *A) -{ -#ifdef _MSC_VER - // VC60 workaround: MSVC 6.0 has an optimization bug that makes - // (dword)A*B where either A or B has been cast to a dword before - // very expensive. Revisit this function when this - // bug is fixed. - Multiply4(R, A, A); -#else - const word *B = A; - DWord p, q; - word c, d, e; - - p = DWord::Multiply(A[0], A[0]); - R[0] = p.GetLowHalf(); - c = p.GetHighHalf(); - d = e = 0; - - SquAcc(0, 1); - - SaveSquAcc(1, 2, 0); - MulAcc(1, 1); - - SaveSquAcc(2, 0, 3); - SquAcc(1, 2); - - SaveSquAcc(3, 3, 1); - MulAcc(2, 2); - - SaveSquAcc(4, 2, 3); - - R[5] = c; - p = DWord::MultiplyAndAdd(A[3], A[3], d); - R[6] = p.GetLowHalf(); - R[7] = e + p.GetHighHalf(); -#endif -} - -void Portable::Multiply8(word *R, const word *A, const word *B) -{ - DWord p; - word c, d, e; - - p = DWord::Multiply(A[0], B[0]); - R[0] = p.GetLowHalf(); - c = p.GetHighHalf(); - d = e = 0; - - MulAcc(0, 1); - MulAcc(1, 0); - - SaveMulAcc(1, 2, 0); - MulAcc(1, 1); - MulAcc(0, 2); - - SaveMulAcc(2, 0, 3); - MulAcc(1, 2); - MulAcc(2, 1); - MulAcc(3, 0); - - SaveMulAcc(3, 0, 4); - MulAcc(1, 3); - MulAcc(2, 2); - MulAcc(3, 1); - MulAcc(4, 0); - - SaveMulAcc(4, 0, 5); - MulAcc(1, 4); - MulAcc(2, 3); - MulAcc(3, 2); - MulAcc(4, 1); - MulAcc(5, 0); - - SaveMulAcc(5, 0, 6); - MulAcc(1, 5); - MulAcc(2, 4); - MulAcc(3, 3); - MulAcc(4, 2); - MulAcc(5, 1); - MulAcc(6, 0); - - SaveMulAcc(6, 0, 7); - MulAcc(1, 6); - MulAcc(2, 5); - MulAcc(3, 4); - MulAcc(4, 3); - MulAcc(5, 2); - MulAcc(6, 1); - MulAcc(7, 0); - - SaveMulAcc(7, 1, 7); - MulAcc(2, 6); - MulAcc(3, 5); - MulAcc(4, 4); - MulAcc(5, 3); - MulAcc(6, 2); - MulAcc(7, 1); - - SaveMulAcc(8, 2, 7); - MulAcc(3, 6); - MulAcc(4, 5); - MulAcc(5, 4); - MulAcc(6, 3); - MulAcc(7, 2); - - SaveMulAcc(9, 3, 7); - MulAcc(4, 6); - MulAcc(5, 5); - MulAcc(6, 4); - MulAcc(7, 3); - - SaveMulAcc(10, 4, 7); - MulAcc(5, 6); - MulAcc(6, 5); - MulAcc(7, 4); - - SaveMulAcc(11, 5, 7); - MulAcc(6, 6); - MulAcc(7, 5); - - SaveMulAcc(12, 6, 7); - MulAcc(7, 6); - - R[13] = c; - p = DWord::MultiplyAndAdd(A[7], B[7], d); - R[14] = p.GetLowHalf(); - R[15] = e + p.GetHighHalf(); -} - -void Portable::Multiply4Bottom(word *R, const word *A, const word *B) -{ - DWord p; - word c, d, e; - - p = DWord::Multiply(A[0], B[0]); - R[0] = p.GetLowHalf(); - c = p.GetHighHalf(); - d = e = 0; - - MulAcc(0, 1); - MulAcc(1, 0); - - SaveMulAcc(1, 2, 0); - MulAcc(1, 1); - MulAcc(0, 2); - - R[2] = c; - R[3] = d + A[0] * B[3] + A[1] * B[2] + A[2] * B[1] + A[3] * B[0]; -} - -void Portable::Multiply8Bottom(word *R, const word *A, const word *B) -{ - DWord p; - word c, d, e; - - p = DWord::Multiply(A[0], B[0]); - R[0] = p.GetLowHalf(); - c = p.GetHighHalf(); - d = e = 0; - - MulAcc(0, 1); - MulAcc(1, 0); - - SaveMulAcc(1, 2, 0); - MulAcc(1, 1); - MulAcc(0, 2); - - SaveMulAcc(2, 0, 3); - MulAcc(1, 2); - MulAcc(2, 1); - MulAcc(3, 0); - - SaveMulAcc(3, 0, 4); - MulAcc(1, 3); - MulAcc(2, 2); - MulAcc(3, 1); - MulAcc(4, 0); - - SaveMulAcc(4, 0, 5); - MulAcc(1, 4); - MulAcc(2, 3); - MulAcc(3, 2); - MulAcc(4, 1); - MulAcc(5, 0); - - SaveMulAcc(5, 0, 6); - MulAcc(1, 5); - MulAcc(2, 4); - MulAcc(3, 3); - MulAcc(4, 2); - MulAcc(5, 1); - MulAcc(6, 0); - - R[6] = c; - R[7] = d + A[0] * B[7] + A[1] * B[6] + A[2] * B[5] + A[3] * B[4] + - A[4] * B[3] + A[5] * B[2] + A[6] * B[1] + A[7] * B[0]; -} - - -#undef MulAcc -#undef SaveMulAcc -#undef SquAcc -#undef SaveSquAcc - -// optimized - -#ifdef TAOCRYPT_X86ASM_AVAILABLE - -// ************** x86 feature detection *************** - - -#ifdef SSE2_INTRINSICS_AVAILABLE - -#ifndef _MSC_VER - static jmp_buf s_env; - static void SigIllHandler(int) - { - longjmp(s_env, 1); - } -#endif - -static bool HasSSE2() -{ - if (!IsPentium()) - return false; - - word32 cpuid[4]; - CpuId(1, cpuid); - if ((cpuid[3] & (1 << 26)) == 0) - return false; - -#ifdef _MSC_VER - __try - { - __asm xorpd xmm0, xmm0 // executing SSE2 instruction - } - __except (1) - { - return false; - } - return true; -#else - typedef void (*SigHandler)(int); - - SigHandler oldHandler = signal(SIGILL, SigIllHandler); - if (oldHandler == SIG_ERR) - return false; - - bool result = true; - if (setjmp(s_env)) - result = false; - else - __asm __volatile ("xorpd %xmm0, %xmm0"); - - signal(SIGILL, oldHandler); - return result; -#endif -} -#endif // SSE2_INTRINSICS_AVAILABLE - - -static bool IsP4() -{ - if (!IsPentium()) - return false; - - word32 cpuid[4]; - - CpuId(1, cpuid); - return ((cpuid[0] >> 8) & 0xf) == 0xf; -} - -// ************** Pentium/P4 optimizations *************** - -class PentiumOptimized : public Portable -{ -public: - static word TAOCRYPT_CDECL Add(word *C, const word *A, const word *B, - unsigned int N); - static word TAOCRYPT_CDECL Subtract(word *C, const word *A, const word *B, - unsigned int N); - static void TAOCRYPT_CDECL Multiply4(word *C, const word *A, - const word *B); - static void TAOCRYPT_CDECL Multiply8(word *C, const word *A, - const word *B); - static void TAOCRYPT_CDECL Multiply8Bottom(word *C, const word *A, - const word *B); -}; - -class P4Optimized -{ -public: - static word TAOCRYPT_CDECL Add(word *C, const word *A, const word *B, - unsigned int N); - static word TAOCRYPT_CDECL Subtract(word *C, const word *A, const word *B, - unsigned int N); -#ifdef SSE2_INTRINSICS_AVAILABLE - static void TAOCRYPT_CDECL Multiply4(word *C, const word *A, - const word *B); - static void TAOCRYPT_CDECL Multiply8(word *C, const word *A, - const word *B); - static void TAOCRYPT_CDECL Multiply8Bottom(word *C, const word *A, - const word *B); -#endif -}; - -typedef word (TAOCRYPT_CDECL * PAddSub)(word *C, const word *A, const word *B, - unsigned int N); -typedef void (TAOCRYPT_CDECL * PMul)(word *C, const word *A, const word *B); - -static PAddSub s_pAdd, s_pSub; -#ifdef SSE2_INTRINSICS_AVAILABLE -static PMul s_pMul4, s_pMul8, s_pMul8B; -#endif - -static void SetPentiumFunctionPointers() -{ - if (!IsPentium()) - { - s_pAdd = &Portable::Add; - s_pSub = &Portable::Subtract; - } - else if (IsP4()) - { - s_pAdd = &P4Optimized::Add; - s_pSub = &P4Optimized::Subtract; - } - else - { - s_pAdd = &PentiumOptimized::Add; - s_pSub = &PentiumOptimized::Subtract; - } - -#ifdef SSE2_INTRINSICS_AVAILABLE - if (!IsPentium()) - { - s_pMul4 = &Portable::Multiply4; - s_pMul8 = &Portable::Multiply8; - s_pMul8B = &Portable::Multiply8Bottom; - } - else if (HasSSE2()) - { - s_pMul4 = &P4Optimized::Multiply4; - s_pMul8 = &P4Optimized::Multiply8; - s_pMul8B = &P4Optimized::Multiply8Bottom; - } - else - { - s_pMul4 = &PentiumOptimized::Multiply4; - s_pMul8 = &PentiumOptimized::Multiply8; - s_pMul8B = &PentiumOptimized::Multiply8Bottom; - } -#endif -} - -static const char s_RunAtStartupSetPentiumFunctionPointers = - (SetPentiumFunctionPointers(), 0); - - -class LowLevel : public PentiumOptimized -{ -public: - inline static word Add(word *C, const word *A, const word *B, - unsigned int N) - {return s_pAdd(C, A, B, N);} - inline static word Subtract(word *C, const word *A, const word *B, - unsigned int N) - {return s_pSub(C, A, B, N);} - inline static void Square4(word *R, const word *A) - {Multiply4(R, A, A);} -#ifdef SSE2_INTRINSICS_AVAILABLE - inline static void Multiply4(word *C, const word *A, const word *B) - {s_pMul4(C, A, B);} - inline static void Multiply8(word *C, const word *A, const word *B) - {s_pMul8(C, A, B);} - inline static void Multiply8Bottom(word *C, const word *A, const word *B) - {s_pMul8B(C, A, B);} -#endif -}; - -// use some tricks to share assembly code between MSVC and GCC -#ifdef _MSC_VER - #define TAOCRYPT_NAKED __declspec(naked) - #define AS1(x) __asm x - #define AS2(x, y) __asm x, y - #define AddPrologue \ - __asm push ebp \ - __asm push ebx \ - __asm push esi \ - __asm push edi \ - __asm mov ecx, [esp+20] \ - __asm mov edx, [esp+24] \ - __asm mov ebx, [esp+28] \ - __asm mov esi, [esp+32] - #define AddEpilogue \ - __asm pop edi \ - __asm pop esi \ - __asm pop ebx \ - __asm pop ebp \ - __asm ret - #define MulPrologue \ - __asm push ebp \ - __asm push ebx \ - __asm push esi \ - __asm push edi \ - __asm mov ecx, [esp+28] \ - __asm mov esi, [esp+24] \ - __asm push [esp+20] - #define MulEpilogue \ - __asm add esp, 4 \ - __asm pop edi \ - __asm pop esi \ - __asm pop ebx \ - __asm pop ebp \ - __asm ret -#else - #define TAOCRYPT_NAKED - #define AS1(x) #x ";" - #define AS2(x, y) #x ", " #y ";" - #define AddPrologue \ - __asm__ __volatile__ \ - ( \ - "push %%ebx;" /* save this manually, in case of -fPIC */ \ - "mov %2, %%ebx;" \ - ".intel_syntax noprefix;" \ - "push ebp;" - #define AddEpilogue \ - "pop ebp;" \ - ".att_syntax prefix;" \ - "pop %%ebx;" \ - : \ - : "c" (C), "d" (A), "m" (B), "S" (N) \ - : "%edi", "memory", "cc" \ - ); - #define MulPrologue \ - __asm__ __volatile__ \ - ( \ - "push %%ebx;" /* save this manually, in case of -fPIC */ \ - "push %%ebp;" \ - "push %0;" \ - ".intel_syntax noprefix;" - #define MulEpilogue \ - "add esp, 4;" \ - "pop ebp;" \ - "pop ebx;" \ - ".att_syntax prefix;" \ - : \ - : "rm" (Z), "S" (X), "c" (Y) \ - : "%eax", "%edx", "%edi", "memory", "cc" \ - ); -#endif - -TAOCRYPT_NAKED word PentiumOptimized::Add(word *C, const word *A, - const word *B, unsigned int N) -{ - AddPrologue - - // now: ebx = B, ecx = C, edx = A, esi = N - AS2( sub ecx, edx) // hold the distance between C & A so we - // can add this to A to get C - AS2( xor eax, eax) // clear eax - - AS2( sub eax, esi) // eax is a negative index from end of B - AS2( lea ebx, [ebx+4*esi]) // ebx is end of B - - AS2( sar eax, 1) // unit of eax is now dwords; this also - // clears the carry flag - AS1( jz loopendAdd) // if no dwords then nothing to do - - AS1(loopstartAdd:) - AS2( mov esi,[edx]) // load lower word of A - AS2( mov ebp,[edx+4]) // load higher word of A - - AS2( mov edi,[ebx+8*eax]) // load lower word of B - AS2( lea edx,[edx+8]) // advance A and C - - AS2( adc esi,edi) // add lower words - AS2( mov edi,[ebx+8*eax+4]) // load higher word of B - - AS2( adc ebp,edi) // add higher words - AS1( inc eax) // advance B - - AS2( mov [edx+ecx-8],esi) // store lower word result - AS2( mov [edx+ecx-4],ebp) // store higher word result - - AS1( jnz loopstartAdd) // loop until eax overflows and becomes zero - - AS1(loopendAdd:) - AS2( adc eax, 0) // store carry into eax (return result register) - - AddEpilogue -} - -TAOCRYPT_NAKED word PentiumOptimized::Subtract(word *C, const word *A, - const word *B, unsigned int N) -{ - AddPrologue - - // now: ebx = B, ecx = C, edx = A, esi = N - AS2( sub ecx, edx) // hold the distance between C & A so we - // can add this to A to get C - AS2( xor eax, eax) // clear eax - - AS2( sub eax, esi) // eax is a negative index from end of B - AS2( lea ebx, [ebx+4*esi]) // ebx is end of B - - AS2( sar eax, 1) // unit of eax is now dwords; this also - // clears the carry flag - AS1( jz loopendSub) // if no dwords then nothing to do - - AS1(loopstartSub:) - AS2( mov esi,[edx]) // load lower word of A - AS2( mov ebp,[edx+4]) // load higher word of A - - AS2( mov edi,[ebx+8*eax]) // load lower word of B - AS2( lea edx,[edx+8]) // advance A and C - - AS2( sbb esi,edi) // subtract lower words - AS2( mov edi,[ebx+8*eax+4]) // load higher word of B - - AS2( sbb ebp,edi) // subtract higher words - AS1( inc eax) // advance B - - AS2( mov [edx+ecx-8],esi) // store lower word result - AS2( mov [edx+ecx-4],ebp) // store higher word result - - AS1( jnz loopstartSub) // loop until eax overflows and becomes zero - - AS1(loopendSub:) - AS2( adc eax, 0) // store carry into eax (return result register) - - AddEpilogue -} - -// On Pentium 4, the adc and sbb instructions are very expensive, so avoid them. - -TAOCRYPT_NAKED word P4Optimized::Add(word *C, const word *A, const word *B, - unsigned int N) -{ - AddPrologue - - // now: ebx = B, ecx = C, edx = A, esi = N - AS2( xor eax, eax) - AS1( neg esi) - AS1( jz loopendAddP4) // if no dwords then nothing to do - - AS2( mov edi, [edx]) - AS2( mov ebp, [ebx]) - AS1( jmp carry1AddP4) - - AS1(loopstartAddP4:) - AS2( mov edi, [edx+8]) - AS2( add ecx, 8) - AS2( add edx, 8) - AS2( mov ebp, [ebx]) - AS2( add edi, eax) - AS1( jc carry1AddP4) - AS2( xor eax, eax) - - AS1(carry1AddP4:) - AS2( add edi, ebp) - AS2( mov ebp, 1) - AS2( mov [ecx], edi) - AS2( mov edi, [edx+4]) - AS2( cmovc eax, ebp) - AS2( mov ebp, [ebx+4]) - AS2( add ebx, 8) - AS2( add edi, eax) - AS1( jc carry2AddP4) - AS2( xor eax, eax) - - AS1(carry2AddP4:) - AS2( add edi, ebp) - AS2( mov ebp, 1) - AS2( cmovc eax, ebp) - AS2( mov [ecx+4], edi) - AS2( add esi, 2) - AS1( jnz loopstartAddP4) - - AS1(loopendAddP4:) - - AddEpilogue -} - -TAOCRYPT_NAKED word P4Optimized::Subtract(word *C, const word *A, - const word *B, unsigned int N) -{ - AddPrologue - - // now: ebx = B, ecx = C, edx = A, esi = N - AS2( xor eax, eax) - AS1( neg esi) - AS1( jz loopendSubP4) // if no dwords then nothing to do - - AS2( mov edi, [edx]) - AS2( mov ebp, [ebx]) - AS1( jmp carry1SubP4) - - AS1(loopstartSubP4:) - AS2( mov edi, [edx+8]) - AS2( add edx, 8) - AS2( add ecx, 8) - AS2( mov ebp, [ebx]) - AS2( sub edi, eax) - AS1( jc carry1SubP4) - AS2( xor eax, eax) - - AS1(carry1SubP4:) - AS2( sub edi, ebp) - AS2( mov ebp, 1) - AS2( mov [ecx], edi) - AS2( mov edi, [edx+4]) - AS2( cmovc eax, ebp) - AS2( mov ebp, [ebx+4]) - AS2( add ebx, 8) - AS2( sub edi, eax) - AS1( jc carry2SubP4) - AS2( xor eax, eax) - - AS1(carry2SubP4:) - AS2( sub edi, ebp) - AS2( mov ebp, 1) - AS2( cmovc eax, ebp) - AS2( mov [ecx+4], edi) - AS2( add esi, 2) - AS1( jnz loopstartSubP4) - - AS1(loopendSubP4:) - - AddEpilogue -} - -// multiply assembly code originally contributed by Leonard Janke - -#define MulStartup \ - AS2(xor ebp, ebp) \ - AS2(xor edi, edi) \ - AS2(xor ebx, ebx) - -#define MulShiftCarry \ - AS2(mov ebp, edx) \ - AS2(mov edi, ebx) \ - AS2(xor ebx, ebx) - -#define MulAccumulateBottom(i,j) \ - AS2(mov eax, [ecx+4*j]) \ - AS2(imul eax, dword ptr [esi+4*i]) \ - AS2(add ebp, eax) - -#define MulAccumulate(i,j) \ - AS2(mov eax, [ecx+4*j]) \ - AS1(mul dword ptr [esi+4*i]) \ - AS2(add ebp, eax) \ - AS2(adc edi, edx) \ - AS2(adc bl, bh) - -#define MulStoreDigit(i) \ - AS2(mov edx, edi) \ - AS2(mov edi, [esp]) \ - AS2(mov [edi+4*i], ebp) - -#define MulLastDiagonal(digits) \ - AS2(mov eax, [ecx+4*(digits-1)]) \ - AS1(mul dword ptr [esi+4*(digits-1)]) \ - AS2(add ebp, eax) \ - AS2(adc edx, edi) \ - AS2(mov edi, [esp]) \ - AS2(mov [edi+4*(2*digits-2)], ebp) \ - AS2(mov [edi+4*(2*digits-1)], edx) - -TAOCRYPT_NAKED void PentiumOptimized::Multiply4(word* Z, const word* X, - const word* Y) -{ - MulPrologue - // now: [esp] = Z, esi = X, ecx = Y - MulStartup - MulAccumulate(0,0) - MulStoreDigit(0) - MulShiftCarry - - MulAccumulate(1,0) - MulAccumulate(0,1) - MulStoreDigit(1) - MulShiftCarry - - MulAccumulate(2,0) - MulAccumulate(1,1) - MulAccumulate(0,2) - MulStoreDigit(2) - MulShiftCarry - - MulAccumulate(3,0) - MulAccumulate(2,1) - MulAccumulate(1,2) - MulAccumulate(0,3) - MulStoreDigit(3) - MulShiftCarry - - MulAccumulate(3,1) - MulAccumulate(2,2) - MulAccumulate(1,3) - MulStoreDigit(4) - MulShiftCarry - - MulAccumulate(3,2) - MulAccumulate(2,3) - MulStoreDigit(5) - MulShiftCarry - - MulLastDiagonal(4) - MulEpilogue -} - -TAOCRYPT_NAKED void PentiumOptimized::Multiply8(word* Z, const word* X, - const word* Y) -{ - MulPrologue - // now: [esp] = Z, esi = X, ecx = Y - MulStartup - MulAccumulate(0,0) - MulStoreDigit(0) - MulShiftCarry - - MulAccumulate(1,0) - MulAccumulate(0,1) - MulStoreDigit(1) - MulShiftCarry - - MulAccumulate(2,0) - MulAccumulate(1,1) - MulAccumulate(0,2) - MulStoreDigit(2) - MulShiftCarry - - MulAccumulate(3,0) - MulAccumulate(2,1) - MulAccumulate(1,2) - MulAccumulate(0,3) - MulStoreDigit(3) - MulShiftCarry - - MulAccumulate(4,0) - MulAccumulate(3,1) - MulAccumulate(2,2) - MulAccumulate(1,3) - MulAccumulate(0,4) - MulStoreDigit(4) - MulShiftCarry - - MulAccumulate(5,0) - MulAccumulate(4,1) - MulAccumulate(3,2) - MulAccumulate(2,3) - MulAccumulate(1,4) - MulAccumulate(0,5) - MulStoreDigit(5) - MulShiftCarry - - MulAccumulate(6,0) - MulAccumulate(5,1) - MulAccumulate(4,2) - MulAccumulate(3,3) - MulAccumulate(2,4) - MulAccumulate(1,5) - MulAccumulate(0,6) - MulStoreDigit(6) - MulShiftCarry - - MulAccumulate(7,0) - MulAccumulate(6,1) - MulAccumulate(5,2) - MulAccumulate(4,3) - MulAccumulate(3,4) - MulAccumulate(2,5) - MulAccumulate(1,6) - MulAccumulate(0,7) - MulStoreDigit(7) - MulShiftCarry - - MulAccumulate(7,1) - MulAccumulate(6,2) - MulAccumulate(5,3) - MulAccumulate(4,4) - MulAccumulate(3,5) - MulAccumulate(2,6) - MulAccumulate(1,7) - MulStoreDigit(8) - MulShiftCarry - - MulAccumulate(7,2) - MulAccumulate(6,3) - MulAccumulate(5,4) - MulAccumulate(4,5) - MulAccumulate(3,6) - MulAccumulate(2,7) - MulStoreDigit(9) - MulShiftCarry - - MulAccumulate(7,3) - MulAccumulate(6,4) - MulAccumulate(5,5) - MulAccumulate(4,6) - MulAccumulate(3,7) - MulStoreDigit(10) - MulShiftCarry - - MulAccumulate(7,4) - MulAccumulate(6,5) - MulAccumulate(5,6) - MulAccumulate(4,7) - MulStoreDigit(11) - MulShiftCarry - - MulAccumulate(7,5) - MulAccumulate(6,6) - MulAccumulate(5,7) - MulStoreDigit(12) - MulShiftCarry - - MulAccumulate(7,6) - MulAccumulate(6,7) - MulStoreDigit(13) - MulShiftCarry - - MulLastDiagonal(8) - MulEpilogue -} - -TAOCRYPT_NAKED void PentiumOptimized::Multiply8Bottom(word* Z, const word* X, - const word* Y) -{ - MulPrologue - // now: [esp] = Z, esi = X, ecx = Y - MulStartup - MulAccumulate(0,0) - MulStoreDigit(0) - MulShiftCarry - - MulAccumulate(1,0) - MulAccumulate(0,1) - MulStoreDigit(1) - MulShiftCarry - - MulAccumulate(2,0) - MulAccumulate(1,1) - MulAccumulate(0,2) - MulStoreDigit(2) - MulShiftCarry - - MulAccumulate(3,0) - MulAccumulate(2,1) - MulAccumulate(1,2) - MulAccumulate(0,3) - MulStoreDigit(3) - MulShiftCarry - - MulAccumulate(4,0) - MulAccumulate(3,1) - MulAccumulate(2,2) - MulAccumulate(1,3) - MulAccumulate(0,4) - MulStoreDigit(4) - MulShiftCarry - - MulAccumulate(5,0) - MulAccumulate(4,1) - MulAccumulate(3,2) - MulAccumulate(2,3) - MulAccumulate(1,4) - MulAccumulate(0,5) - MulStoreDigit(5) - MulShiftCarry - - MulAccumulate(6,0) - MulAccumulate(5,1) - MulAccumulate(4,2) - MulAccumulate(3,3) - MulAccumulate(2,4) - MulAccumulate(1,5) - MulAccumulate(0,6) - MulStoreDigit(6) - MulShiftCarry - - MulAccumulateBottom(7,0) - MulAccumulateBottom(6,1) - MulAccumulateBottom(5,2) - MulAccumulateBottom(4,3) - MulAccumulateBottom(3,4) - MulAccumulateBottom(2,5) - MulAccumulateBottom(1,6) - MulAccumulateBottom(0,7) - MulStoreDigit(7) - MulEpilogue -} - -#undef AS1 -#undef AS2 - -#else // not x86 - no processor specific code at this layer - -typedef Portable LowLevel; - -#endif - -#ifdef SSE2_INTRINSICS_AVAILABLE - -#ifdef __GNUC__ -#define TAOCRYPT_FASTCALL -#else -#define TAOCRYPT_FASTCALL __fastcall -#endif - -static void TAOCRYPT_FASTCALL P4_Mul(__m128i *C, const __m128i *A, - const __m128i *B) -{ - __m128i a3210 = _mm_load_si128(A); - __m128i b3210 = _mm_load_si128(B); - - __m128i sum; - - __m128i z = _mm_setzero_si128(); - __m128i a2b2_a0b0 = _mm_mul_epu32(a3210, b3210); - C[0] = a2b2_a0b0; - - __m128i a3120 = _mm_shuffle_epi32(a3210, _MM_SHUFFLE(3, 1, 2, 0)); - __m128i b3021 = _mm_shuffle_epi32(b3210, _MM_SHUFFLE(3, 0, 2, 1)); - __m128i a1b0_a0b1 = _mm_mul_epu32(a3120, b3021); - __m128i a1b0 = _mm_unpackhi_epi32(a1b0_a0b1, z); - __m128i a0b1 = _mm_unpacklo_epi32(a1b0_a0b1, z); - C[1] = _mm_add_epi64(a1b0, a0b1); - - __m128i a31 = _mm_srli_epi64(a3210, 32); - __m128i b31 = _mm_srli_epi64(b3210, 32); - __m128i a3b3_a1b1 = _mm_mul_epu32(a31, b31); - C[6] = a3b3_a1b1; - - __m128i a1b1 = _mm_unpacklo_epi32(a3b3_a1b1, z); - __m128i b3012 = _mm_shuffle_epi32(b3210, _MM_SHUFFLE(3, 0, 1, 2)); - __m128i a2b0_a0b2 = _mm_mul_epu32(a3210, b3012); - __m128i a0b2 = _mm_unpacklo_epi32(a2b0_a0b2, z); - __m128i a2b0 = _mm_unpackhi_epi32(a2b0_a0b2, z); - sum = _mm_add_epi64(a1b1, a0b2); - C[2] = _mm_add_epi64(sum, a2b0); - - __m128i a2301 = _mm_shuffle_epi32(a3210, _MM_SHUFFLE(2, 3, 0, 1)); - __m128i b2103 = _mm_shuffle_epi32(b3210, _MM_SHUFFLE(2, 1, 0, 3)); - __m128i a3b0_a1b2 = _mm_mul_epu32(a2301, b3012); - __m128i a2b1_a0b3 = _mm_mul_epu32(a3210, b2103); - __m128i a3b0 = _mm_unpackhi_epi32(a3b0_a1b2, z); - __m128i a1b2 = _mm_unpacklo_epi32(a3b0_a1b2, z); - __m128i a2b1 = _mm_unpackhi_epi32(a2b1_a0b3, z); - __m128i a0b3 = _mm_unpacklo_epi32(a2b1_a0b3, z); - __m128i sum1 = _mm_add_epi64(a3b0, a1b2); - sum = _mm_add_epi64(a2b1, a0b3); - C[3] = _mm_add_epi64(sum, sum1); - - __m128i a3b1_a1b3 = _mm_mul_epu32(a2301, b2103); - __m128i a2b2 = _mm_unpackhi_epi32(a2b2_a0b0, z); - __m128i a3b1 = _mm_unpackhi_epi32(a3b1_a1b3, z); - __m128i a1b3 = _mm_unpacklo_epi32(a3b1_a1b3, z); - sum = _mm_add_epi64(a2b2, a3b1); - C[4] = _mm_add_epi64(sum, a1b3); - - __m128i a1302 = _mm_shuffle_epi32(a3210, _MM_SHUFFLE(1, 3, 0, 2)); - __m128i b1203 = _mm_shuffle_epi32(b3210, _MM_SHUFFLE(1, 2, 0, 3)); - __m128i a3b2_a2b3 = _mm_mul_epu32(a1302, b1203); - __m128i a3b2 = _mm_unpackhi_epi32(a3b2_a2b3, z); - __m128i a2b3 = _mm_unpacklo_epi32(a3b2_a2b3, z); - C[5] = _mm_add_epi64(a3b2, a2b3); -} - -void P4Optimized::Multiply4(word *C, const word *A, const word *B) -{ - __m128i temp[7]; - const word *w = (word *)temp; - const __m64 *mw = (__m64 *)w; - - P4_Mul(temp, (__m128i *)A, (__m128i *)B); - - C[0] = w[0]; - - __m64 s1, s2; - - __m64 w1 = _mm_cvtsi32_si64(w[1]); - __m64 w4 = mw[2]; - __m64 w6 = mw[3]; - __m64 w8 = mw[4]; - __m64 w10 = mw[5]; - __m64 w12 = mw[6]; - __m64 w14 = mw[7]; - __m64 w16 = mw[8]; - __m64 w18 = mw[9]; - __m64 w20 = mw[10]; - __m64 w22 = mw[11]; - __m64 w26 = _mm_cvtsi32_si64(w[26]); - - s1 = _mm_add_si64(w1, w4); - C[1] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s2 = _mm_add_si64(w6, w8); - s1 = _mm_add_si64(s1, s2); - C[2] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s2 = _mm_add_si64(w10, w12); - s1 = _mm_add_si64(s1, s2); - C[3] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s2 = _mm_add_si64(w14, w16); - s1 = _mm_add_si64(s1, s2); - C[4] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s2 = _mm_add_si64(w18, w20); - s1 = _mm_add_si64(s1, s2); - C[5] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s2 = _mm_add_si64(w22, w26); - s1 = _mm_add_si64(s1, s2); - C[6] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - C[7] = _mm_cvtsi64_si32(s1) + w[27]; - _mm_empty(); -} - -void P4Optimized::Multiply8(word *C, const word *A, const word *B) -{ - __m128i temp[28]; - const word *w = (word *)temp; - const __m64 *mw = (__m64 *)w; - const word *x = (word *)temp+7*4; - const __m64 *mx = (__m64 *)x; - const word *y = (word *)temp+7*4*2; - const __m64 *my = (__m64 *)y; - const word *z = (word *)temp+7*4*3; - const __m64 *mz = (__m64 *)z; - - P4_Mul(temp, (__m128i *)A, (__m128i *)B); - - P4_Mul(temp+7, (__m128i *)A+1, (__m128i *)B); - - P4_Mul(temp+14, (__m128i *)A, (__m128i *)B+1); - - P4_Mul(temp+21, (__m128i *)A+1, (__m128i *)B+1); - - C[0] = w[0]; - - __m64 s1, s2, s3, s4; - - __m64 w1 = _mm_cvtsi32_si64(w[1]); - __m64 w4 = mw[2]; - __m64 w6 = mw[3]; - __m64 w8 = mw[4]; - __m64 w10 = mw[5]; - __m64 w12 = mw[6]; - __m64 w14 = mw[7]; - __m64 w16 = mw[8]; - __m64 w18 = mw[9]; - __m64 w20 = mw[10]; - __m64 w22 = mw[11]; - __m64 w26 = _mm_cvtsi32_si64(w[26]); - __m64 w27 = _mm_cvtsi32_si64(w[27]); - - __m64 x0 = _mm_cvtsi32_si64(x[0]); - __m64 x1 = _mm_cvtsi32_si64(x[1]); - __m64 x4 = mx[2]; - __m64 x6 = mx[3]; - __m64 x8 = mx[4]; - __m64 x10 = mx[5]; - __m64 x12 = mx[6]; - __m64 x14 = mx[7]; - __m64 x16 = mx[8]; - __m64 x18 = mx[9]; - __m64 x20 = mx[10]; - __m64 x22 = mx[11]; - __m64 x26 = _mm_cvtsi32_si64(x[26]); - __m64 x27 = _mm_cvtsi32_si64(x[27]); - - __m64 y0 = _mm_cvtsi32_si64(y[0]); - __m64 y1 = _mm_cvtsi32_si64(y[1]); - __m64 y4 = my[2]; - __m64 y6 = my[3]; - __m64 y8 = my[4]; - __m64 y10 = my[5]; - __m64 y12 = my[6]; - __m64 y14 = my[7]; - __m64 y16 = my[8]; - __m64 y18 = my[9]; - __m64 y20 = my[10]; - __m64 y22 = my[11]; - __m64 y26 = _mm_cvtsi32_si64(y[26]); - __m64 y27 = _mm_cvtsi32_si64(y[27]); - - __m64 z0 = _mm_cvtsi32_si64(z[0]); - __m64 z1 = _mm_cvtsi32_si64(z[1]); - __m64 z4 = mz[2]; - __m64 z6 = mz[3]; - __m64 z8 = mz[4]; - __m64 z10 = mz[5]; - __m64 z12 = mz[6]; - __m64 z14 = mz[7]; - __m64 z16 = mz[8]; - __m64 z18 = mz[9]; - __m64 z20 = mz[10]; - __m64 z22 = mz[11]; - __m64 z26 = _mm_cvtsi32_si64(z[26]); - - s1 = _mm_add_si64(w1, w4); - C[1] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s2 = _mm_add_si64(w6, w8); - s1 = _mm_add_si64(s1, s2); - C[2] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s2 = _mm_add_si64(w10, w12); - s1 = _mm_add_si64(s1, s2); - C[3] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x0, y0); - s2 = _mm_add_si64(w14, w16); - s1 = _mm_add_si64(s1, s3); - s1 = _mm_add_si64(s1, s2); - C[4] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x1, y1); - s4 = _mm_add_si64(x4, y4); - s1 = _mm_add_si64(s1, w18); - s3 = _mm_add_si64(s3, s4); - s1 = _mm_add_si64(s1, w20); - s1 = _mm_add_si64(s1, s3); - C[5] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x6, y6); - s4 = _mm_add_si64(x8, y8); - s1 = _mm_add_si64(s1, w22); - s3 = _mm_add_si64(s3, s4); - s1 = _mm_add_si64(s1, w26); - s1 = _mm_add_si64(s1, s3); - C[6] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x10, y10); - s4 = _mm_add_si64(x12, y12); - s1 = _mm_add_si64(s1, w27); - s3 = _mm_add_si64(s3, s4); - s1 = _mm_add_si64(s1, s3); - C[7] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x14, y14); - s4 = _mm_add_si64(x16, y16); - s1 = _mm_add_si64(s1, z0); - s3 = _mm_add_si64(s3, s4); - s1 = _mm_add_si64(s1, s3); - C[8] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x18, y18); - s4 = _mm_add_si64(x20, y20); - s1 = _mm_add_si64(s1, z1); - s3 = _mm_add_si64(s3, s4); - s1 = _mm_add_si64(s1, z4); - s1 = _mm_add_si64(s1, s3); - C[9] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x22, y22); - s4 = _mm_add_si64(x26, y26); - s1 = _mm_add_si64(s1, z6); - s3 = _mm_add_si64(s3, s4); - s1 = _mm_add_si64(s1, z8); - s1 = _mm_add_si64(s1, s3); - C[10] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x27, y27); - s1 = _mm_add_si64(s1, z10); - s1 = _mm_add_si64(s1, z12); - s1 = _mm_add_si64(s1, s3); - C[11] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(z14, z16); - s1 = _mm_add_si64(s1, s3); - C[12] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(z18, z20); - s1 = _mm_add_si64(s1, s3); - C[13] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(z22, z26); - s1 = _mm_add_si64(s1, s3); - C[14] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - C[15] = z[27] + _mm_cvtsi64_si32(s1); - _mm_empty(); -} - -void P4Optimized::Multiply8Bottom(word *C, const word *A, const word *B) -{ - __m128i temp[21]; - const word *w = (word *)temp; - const __m64 *mw = (__m64 *)w; - const word *x = (word *)temp+7*4; - const __m64 *mx = (__m64 *)x; - const word *y = (word *)temp+7*4*2; - const __m64 *my = (__m64 *)y; - - P4_Mul(temp, (__m128i *)A, (__m128i *)B); - - P4_Mul(temp+7, (__m128i *)A+1, (__m128i *)B); - - P4_Mul(temp+14, (__m128i *)A, (__m128i *)B+1); - - C[0] = w[0]; - - __m64 s1, s2, s3, s4; - - __m64 w1 = _mm_cvtsi32_si64(w[1]); - __m64 w4 = mw[2]; - __m64 w6 = mw[3]; - __m64 w8 = mw[4]; - __m64 w10 = mw[5]; - __m64 w12 = mw[6]; - __m64 w14 = mw[7]; - __m64 w16 = mw[8]; - __m64 w18 = mw[9]; - __m64 w20 = mw[10]; - __m64 w22 = mw[11]; - __m64 w26 = _mm_cvtsi32_si64(w[26]); - - __m64 x0 = _mm_cvtsi32_si64(x[0]); - __m64 x1 = _mm_cvtsi32_si64(x[1]); - __m64 x4 = mx[2]; - __m64 x6 = mx[3]; - __m64 x8 = mx[4]; - - __m64 y0 = _mm_cvtsi32_si64(y[0]); - __m64 y1 = _mm_cvtsi32_si64(y[1]); - __m64 y4 = my[2]; - __m64 y6 = my[3]; - __m64 y8 = my[4]; - - s1 = _mm_add_si64(w1, w4); - C[1] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s2 = _mm_add_si64(w6, w8); - s1 = _mm_add_si64(s1, s2); - C[2] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s2 = _mm_add_si64(w10, w12); - s1 = _mm_add_si64(s1, s2); - C[3] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x0, y0); - s2 = _mm_add_si64(w14, w16); - s1 = _mm_add_si64(s1, s3); - s1 = _mm_add_si64(s1, s2); - C[4] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x1, y1); - s4 = _mm_add_si64(x4, y4); - s1 = _mm_add_si64(s1, w18); - s3 = _mm_add_si64(s3, s4); - s1 = _mm_add_si64(s1, w20); - s1 = _mm_add_si64(s1, s3); - C[5] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - s3 = _mm_add_si64(x6, y6); - s4 = _mm_add_si64(x8, y8); - s1 = _mm_add_si64(s1, w22); - s3 = _mm_add_si64(s3, s4); - s1 = _mm_add_si64(s1, w26); - s1 = _mm_add_si64(s1, s3); - C[6] = _mm_cvtsi64_si32(s1); - s1 = _mm_srli_si64(s1, 32); - - C[7] = _mm_cvtsi64_si32(s1) + w[27] + x[10] + y[10] + x[12] + y[12]; - _mm_empty(); -} - -#endif // #ifdef SSE2_INTRINSICS_AVAILABLE - -// end optimized - -// ******************************************************** - -#define A0 A -#define A1 (A+N2) -#define B0 B -#define B1 (B+N2) - -#define T0 T -#define T1 (T+N2) -#define T2 (T+N) -#define T3 (T+N+N2) - -#define R0 R -#define R1 (R+N2) -#define R2 (R+N) -#define R3 (R+N+N2) - -//VC60 workaround: compiler bug triggered without the extra dummy parameters - -// R[2*N] - result = A*B -// T[2*N] - temporary work space -// A[N] --- multiplier -// B[N] --- multiplicant - - -void RecursiveMultiply(word *R, word *T, const word *A, const word *B, - unsigned int N) -{ - assert(N>=2 && N%2==0); - - if (LowLevel::MultiplyRecursionLimit() >= 8 && N==8) - LowLevel::Multiply8(R, A, B); - else if (LowLevel::MultiplyRecursionLimit() >= 4 && N==4) - LowLevel::Multiply4(R, A, B); - else if (N==2) - LowLevel::Multiply2(R, A, B); - else - { - const unsigned int N2 = N/2; - int carry; - - int aComp = Compare(A0, A1, N2); - int bComp = Compare(B0, B1, N2); - - switch (2*aComp + aComp + bComp) - { - case -4: - LowLevel::Subtract(R0, A1, A0, N2); - LowLevel::Subtract(R1, B0, B1, N2); - RecursiveMultiply(T0, T2, R0, R1, N2); - LowLevel::Subtract(T1, T1, R0, N2); - carry = -1; - break; - case -2: - LowLevel::Subtract(R0, A1, A0, N2); - LowLevel::Subtract(R1, B0, B1, N2); - RecursiveMultiply(T0, T2, R0, R1, N2); - carry = 0; - break; - case 2: - LowLevel::Subtract(R0, A0, A1, N2); - LowLevel::Subtract(R1, B1, B0, N2); - RecursiveMultiply(T0, T2, R0, R1, N2); - carry = 0; - break; - case 4: - LowLevel::Subtract(R0, A1, A0, N2); - LowLevel::Subtract(R1, B0, B1, N2); - RecursiveMultiply(T0, T2, R0, R1, N2); - LowLevel::Subtract(T1, T1, R1, N2); - carry = -1; - break; - default: - SetWords(T0, 0, N); - carry = 0; - } - - RecursiveMultiply(R0, T2, A0, B0, N2); - RecursiveMultiply(R2, T2, A1, B1, N2); - - // now T[01] holds (A1-A0)*(B0-B1),R[01] holds A0*B0, R[23] holds A1*B1 - - carry += LowLevel::Add(T0, T0, R0, N); - carry += LowLevel::Add(T0, T0, R2, N); - carry += LowLevel::Add(R1, R1, T0, N); - - assert (carry >= 0 && carry <= 2); - Increment(R3, N2, carry); - } -} - - -void RecursiveSquare(word *R, word *T, const word *A, unsigned int N) -{ - assert(N && N%2==0); - if (LowLevel::SquareRecursionLimit() >= 8 && N==8) - LowLevel::Square8(R, A); - if (LowLevel::SquareRecursionLimit() >= 4 && N==4) - LowLevel::Square4(R, A); - else if (N==2) - LowLevel::Square2(R, A); - else - { - const unsigned int N2 = N/2; - - RecursiveSquare(R0, T2, A0, N2); - RecursiveSquare(R2, T2, A1, N2); - RecursiveMultiply(T0, T2, A0, A1, N2); - - word carry = LowLevel::Add(R1, R1, T0, N); - carry += LowLevel::Add(R1, R1, T0, N); - Increment(R3, N2, carry); - } -} - - -// R[N] - bottom half of A*B -// T[N] - temporary work space -// A[N] - multiplier -// B[N] - multiplicant - - -void RecursiveMultiplyBottom(word *R, word *T, const word *A, const word *B, - unsigned int N) -{ - assert(N>=2 && N%2==0); - if (LowLevel::MultiplyBottomRecursionLimit() >= 8 && N==8) - LowLevel::Multiply8Bottom(R, A, B); - else if (LowLevel::MultiplyBottomRecursionLimit() >= 4 && N==4) - LowLevel::Multiply4Bottom(R, A, B); - else if (N==2) - LowLevel::Multiply2Bottom(R, A, B); - else - { - const unsigned int N2 = N/2; - - RecursiveMultiply(R, T, A0, B0, N2); - RecursiveMultiplyBottom(T0, T1, A1, B0, N2); - LowLevel::Add(R1, R1, T0, N2); - RecursiveMultiplyBottom(T0, T1, A0, B1, N2); - LowLevel::Add(R1, R1, T0, N2); - } -} - - -void RecursiveMultiplyTop(word *R, word *T, const word *L, const word *A, - const word *B, unsigned int N) -{ - assert(N>=2 && N%2==0); - - if (N==4) - { - LowLevel::Multiply4(T, A, B); - memcpy(R, T+4, 4*WORD_SIZE); - } - else if (N==2) - { - LowLevel::Multiply2(T, A, B); - memcpy(R, T+2, 2*WORD_SIZE); - } - else - { - const unsigned int N2 = N/2; - int carry; - - int aComp = Compare(A0, A1, N2); - int bComp = Compare(B0, B1, N2); - - switch (2*aComp + aComp + bComp) - { - case -4: - LowLevel::Subtract(R0, A1, A0, N2); - LowLevel::Subtract(R1, B0, B1, N2); - RecursiveMultiply(T0, T2, R0, R1, N2); - LowLevel::Subtract(T1, T1, R0, N2); - carry = -1; - break; - case -2: - LowLevel::Subtract(R0, A1, A0, N2); - LowLevel::Subtract(R1, B0, B1, N2); - RecursiveMultiply(T0, T2, R0, R1, N2); - carry = 0; - break; - case 2: - LowLevel::Subtract(R0, A0, A1, N2); - LowLevel::Subtract(R1, B1, B0, N2); - RecursiveMultiply(T0, T2, R0, R1, N2); - carry = 0; - break; - case 4: - LowLevel::Subtract(R0, A1, A0, N2); - LowLevel::Subtract(R1, B0, B1, N2); - RecursiveMultiply(T0, T2, R0, R1, N2); - LowLevel::Subtract(T1, T1, R1, N2); - carry = -1; - break; - default: - SetWords(T0, 0, N); - carry = 0; - } - - RecursiveMultiply(T2, R0, A1, B1, N2); - - // now T[01] holds (A1-A0)*(B0-B1), T[23] holds A1*B1 - - word c2 = LowLevel::Subtract(R0, L+N2, L, N2); - c2 += LowLevel::Subtract(R0, R0, T0, N2); - word t = (Compare(R0, T2, N2) == -1); - - carry += t; - carry += Increment(R0, N2, c2+t); - carry += LowLevel::Add(R0, R0, T1, N2); - carry += LowLevel::Add(R0, R0, T3, N2); - assert (carry >= 0 && carry <= 2); - - CopyWords(R1, T3, N2); - Increment(R1, N2, carry); - } -} - - -inline word Add(word *C, const word *A, const word *B, unsigned int N) -{ - return LowLevel::Add(C, A, B, N); -} - -inline word Subtract(word *C, const word *A, const word *B, unsigned int N) -{ - return LowLevel::Subtract(C, A, B, N); -} - -inline void Multiply(word *R, word *T, const word *A, const word *B, - unsigned int N) -{ - RecursiveMultiply(R, T, A, B, N); -} - -inline void Square(word *R, word *T, const word *A, unsigned int N) -{ - RecursiveSquare(R, T, A, N); -} - - -void AsymmetricMultiply(word *R, word *T, const word *A, unsigned int NA, - const word *B, unsigned int NB) -{ - if (NA == NB) - { - if (A == B) - Square(R, T, A, NA); - else - Multiply(R, T, A, B, NA); - - return; - } - - if (NA > NB) - { - STL::swap(A, B); - STL::swap(NA, NB); - } - - assert(NB % NA == 0); - assert((NB/NA)%2 == 0); // NB is an even multiple of NA - - if (NA==2 && !A[1]) - { - switch (A[0]) - { - case 0: - SetWords(R, 0, NB+2); - return; - case 1: - CopyWords(R, B, NB); - R[NB] = R[NB+1] = 0; - return; - default: - R[NB] = LinearMultiply(R, B, A[0], NB); - R[NB+1] = 0; - return; - } - } - - Multiply(R, T, A, B, NA); - CopyWords(T+2*NA, R+NA, NA); - - unsigned i; - - for (i=2*NA; i>=1; - i++; - } - k+=i; - - if (t==1 && f[1]==0 && EvenWordCount(f, fgLen)==2) - { - if (s%2==0) - CopyWords(R, b, N); - else - Subtract(R, M, b, N); - return k; - } - - ShiftWordsRightByBits(f, fgLen, i); - t=ShiftWordsLeftByBits(c, bcLen, i); - if (t) - { - c[bcLen] = t; - bcLen+=2; - assert(bcLen <= N); - } - - if (f[fgLen-2]==0 && g[fgLen-2]==0 && f[fgLen-1]==0 && g[fgLen-1]==0) - fgLen-=2; - - if (Compare(f, g, fgLen)==-1) - { - STL::swap(f, g); - STL::swap(b, c); - s++; - } - - Subtract(f, f, g, fgLen); - - if (Add(b, b, c, bcLen)) - { - b[bcLen] = 1; - bcLen+=2; - assert(bcLen <= N); - } - } -} - -// R[N] - result = A/(2^k) mod M -// A[N] - input -// M[N] - modulus - -void DivideByPower2Mod(word *R, const word *A, unsigned int k, const word *M, - unsigned int N) -{ - CopyWords(R, A, N); - - while (k--) - { - if (R[0]%2==0) - ShiftWordsRightByBits(R, N, 1); - else - { - word carry = Add(R, R, M, N); - ShiftWordsRightByBits(R, N, 1); - R[N-1] += carry<<(WORD_BITS-1); - } - } -} - -// R[N] - result = A*(2^k) mod M -// A[N] - input -// M[N] - modulus - -void MultiplyByPower2Mod(word *R, const word *A, unsigned int k, const word *M, - unsigned int N) -{ - CopyWords(R, A, N); - - while (k--) - if (ShiftWordsLeftByBits(R, N, 1) || Compare(R, M, N)>=0) - Subtract(R, R, M, N); -} - - -// ********** end of integer needs - - -Integer::Integer() - : reg_(2), sign_(POSITIVE) -{ - reg_[0] = reg_[1] = 0; -} - - -Integer::Integer(const Integer& t) - : reg_(RoundupSize(t.WordCount())), sign_(t.sign_) -{ - CopyWords(reg_.get_buffer(), t.reg_.get_buffer(), reg_.size()); -} - - -Integer::Integer(signed long value) - : reg_(2) -{ - if (value >= 0) - sign_ = POSITIVE; - else - { - sign_ = NEGATIVE; - value = -value; - } - reg_[0] = word(value); - reg_[1] = word(SafeRightShift(value)); -} - - -Integer::Integer(Sign s, word high, word low) - : reg_(2), sign_(s) -{ - reg_[0] = low; - reg_[1] = high; -} - - -Integer::Integer(word value, unsigned int length) - : reg_(RoundupSize(length)), sign_(POSITIVE) -{ - reg_[0] = value; - SetWords(reg_ + 1, 0, reg_.size() - 1); -} - - -Integer::Integer(const byte *encodedInteger, unsigned int byteCount, - Signedness s) -{ - Decode(encodedInteger, byteCount, s); -} - -class BadBER {}; - -// BER Decode Source -Integer::Integer(Source& source) - : reg_(2), sign_(POSITIVE) -{ - Decode(source); -} - -void Integer::Decode(Source& source) -{ - byte b = source.next(); - if (b != INTEGER) { - source.SetError(INTEGER_E); - return; - } - - word32 length = GetLength(source); - - if ( (b = source.next()) == 0x00) - length--; - else - source.prev(); - - unsigned int words = (length + WORD_SIZE - 1) / WORD_SIZE; - words = RoundupSize(words); - if (words > reg_.size()) reg_.CleanNew(words); - - for (int j = length; j > 0; j--) { - b = source.next(); - reg_ [(j-1) / WORD_SIZE] |= (word)b << ((j-1) % WORD_SIZE) * 8; - } -} - - -void Integer::Decode(const byte* input, unsigned int inputLen, Signedness s) -{ - unsigned int idx(0); - byte b = input[idx++]; - sign_ = ((s==SIGNED) && (b & 0x80)) ? NEGATIVE : POSITIVE; - - while (inputLen>0 && (sign_==POSITIVE ? b==0 : b==0xff)) - { - inputLen--; - b = input[idx++]; - } - - reg_.CleanNew(RoundupSize(BytesToWords(inputLen))); - - --idx; - for (unsigned int i=inputLen; i > 0; i--) - { - b = input[idx++]; - reg_[(i-1)/WORD_SIZE] |= (word)b << ((i-1)%WORD_SIZE)*8; - } - - if (sign_ == NEGATIVE) - { - for (unsigned i=inputLen; i 0; i--) - output[idx++] = GetByte(i-1); - } - else - { - // take two's complement of *this - Integer temp = Integer::Power2(8*max(ByteCount(), outputLen)) + *this; - for (unsigned i=0; i range); - - *this += min; -} - - -Integer Integer::Power2(unsigned int e) -{ - Integer r((word)0, BitsToWords(e + 1)); - r.SetBit(e); - return r; -} - - -void Integer::SetBit(unsigned int n, bool value) -{ - if (value) - { - reg_.CleanGrow(RoundupSize(BitsToWords(n + 1))); - reg_[n / WORD_BITS] |= (word(1) << (n % WORD_BITS)); - } - else - { - if (n / WORD_BITS < reg_.size()) - reg_[n / WORD_BITS] &= ~(word(1) << (n % WORD_BITS)); - } -} - - -void Integer::SetByte(unsigned int n, byte value) -{ - reg_.CleanGrow(RoundupSize(BytesToWords(n+1))); - reg_[n/WORD_SIZE] &= ~(word(0xff) << 8*(n%WORD_SIZE)); - reg_[n/WORD_SIZE] |= (word(value) << 8*(n%WORD_SIZE)); -} - - -void Integer::Negate() -{ - if (!!(*this)) // don't flip sign if *this==0 - sign_ = Sign(1 - sign_); -} - - -bool Integer::operator!() const -{ - return IsNegative() ? false : (reg_[0]==0 && WordCount()==0); -} - - -Integer& Integer::operator=(const Integer& t) -{ - if (this != &t) - { - reg_.New(RoundupSize(t.WordCount())); - CopyWords(reg_.get_buffer(), t.reg_.get_buffer(), reg_.size()); - sign_ = t.sign_; - } - return *this; -} - - -Integer& Integer::operator+=(const Integer& t) -{ - reg_.CleanGrow(t.reg_.size()); - if (NotNegative()) - { - if (t.NotNegative()) - PositiveAdd(*this, *this, t); - else - PositiveSubtract(*this, *this, t); - } - else - { - if (t.NotNegative()) - PositiveSubtract(*this, t, *this); - else - { - PositiveAdd(*this, *this, t); - sign_ = Integer::NEGATIVE; - } - } - return *this; -} - - -Integer Integer::operator-() const -{ - Integer result(*this); - result.Negate(); - return result; -} - - -Integer& Integer::operator-=(const Integer& t) -{ - reg_.CleanGrow(t.reg_.size()); - if (NotNegative()) - { - if (t.NotNegative()) - PositiveSubtract(*this, *this, t); - else - PositiveAdd(*this, *this, t); - } - else - { - if (t.NotNegative()) - { - PositiveAdd(*this, *this, t); - sign_ = Integer::NEGATIVE; - } - else - PositiveSubtract(*this, t, *this); - } - return *this; -} - - -Integer& Integer::operator++() -{ - if (NotNegative()) - { - if (Increment(reg_.get_buffer(), reg_.size())) - { - reg_.CleanGrow(2*reg_.size()); - reg_[reg_.size()/2]=1; - } - } - else - { - word borrow = Decrement(reg_.get_buffer(), reg_.size()); - assert(!borrow); - if (WordCount()==0) - *this = Zero(); - } - return *this; -} - -Integer& Integer::operator--() -{ - if (IsNegative()) - { - if (Increment(reg_.get_buffer(), reg_.size())) - { - reg_.CleanGrow(2*reg_.size()); - reg_[reg_.size()/2]=1; - } - } - else - { - if (Decrement(reg_.get_buffer(), reg_.size())) - *this = -One(); - } - return *this; -} - - -Integer& Integer::operator<<=(unsigned int n) -{ - const unsigned int wordCount = WordCount(); - const unsigned int shiftWords = n / WORD_BITS; - const unsigned int shiftBits = n % WORD_BITS; - - reg_.CleanGrow(RoundupSize(wordCount+BitsToWords(n))); - ShiftWordsLeftByWords(reg_.get_buffer(), wordCount + shiftWords, - shiftWords); - ShiftWordsLeftByBits(reg_+shiftWords, wordCount+BitsToWords(shiftBits), - shiftBits); - return *this; -} - -Integer& Integer::operator>>=(unsigned int n) -{ - const unsigned int wordCount = WordCount(); - const unsigned int shiftWords = n / WORD_BITS; - const unsigned int shiftBits = n % WORD_BITS; - - ShiftWordsRightByWords(reg_.get_buffer(), wordCount, shiftWords); - if (wordCount > shiftWords) - ShiftWordsRightByBits(reg_.get_buffer(), wordCount-shiftWords, - shiftBits); - if (IsNegative() && WordCount()==0) // avoid -0 - *this = Zero(); - return *this; -} - - -void PositiveAdd(Integer& sum, const Integer& a, const Integer& b) -{ - word carry; - if (a.reg_.size() == b.reg_.size()) - carry = Add(sum.reg_.get_buffer(), a.reg_.get_buffer(), - b.reg_.get_buffer(), a.reg_.size()); - else if (a.reg_.size() > b.reg_.size()) - { - carry = Add(sum.reg_.get_buffer(), a.reg_.get_buffer(), - b.reg_.get_buffer(), b.reg_.size()); - CopyWords(sum.reg_+b.reg_.size(), a.reg_+b.reg_.size(), - a.reg_.size()-b.reg_.size()); - carry = Increment(sum.reg_+b.reg_.size(), a.reg_.size()-b.reg_.size(), - carry); - } - else - { - carry = Add(sum.reg_.get_buffer(), a.reg_.get_buffer(), - b.reg_.get_buffer(), a.reg_.size()); - CopyWords(sum.reg_+a.reg_.size(), b.reg_+a.reg_.size(), - b.reg_.size()-a.reg_.size()); - carry = Increment(sum.reg_+a.reg_.size(), b.reg_.size()-a.reg_.size(), - carry); - } - - if (carry) - { - sum.reg_.CleanGrow(2*sum.reg_.size()); - sum.reg_[sum.reg_.size()/2] = 1; - } - sum.sign_ = Integer::POSITIVE; -} - -void PositiveSubtract(Integer &diff, const Integer &a, const Integer& b) -{ - unsigned aSize = a.WordCount(); - aSize += aSize%2; - unsigned bSize = b.WordCount(); - bSize += bSize%2; - - if (aSize == bSize) - { - if (Compare(a.reg_.get_buffer(), b.reg_.get_buffer(), aSize) >= 0) - { - Subtract(diff.reg_.get_buffer(), a.reg_.get_buffer(), - b.reg_.get_buffer(), aSize); - diff.sign_ = Integer::POSITIVE; - } - else - { - Subtract(diff.reg_.get_buffer(), b.reg_.get_buffer(), - a.reg_.get_buffer(), aSize); - diff.sign_ = Integer::NEGATIVE; - } - } - else if (aSize > bSize) - { - word borrow = Subtract(diff.reg_.get_buffer(), a.reg_.get_buffer(), - b.reg_.get_buffer(), bSize); - CopyWords(diff.reg_+bSize, a.reg_+bSize, aSize-bSize); - borrow = Decrement(diff.reg_+bSize, aSize-bSize, borrow); - assert(!borrow); - diff.sign_ = Integer::POSITIVE; - } - else - { - word borrow = Subtract(diff.reg_.get_buffer(), b.reg_.get_buffer(), - a.reg_.get_buffer(), aSize); - CopyWords(diff.reg_+aSize, b.reg_+aSize, bSize-aSize); - borrow = Decrement(diff.reg_+aSize, bSize-aSize, borrow); - assert(!borrow); - diff.sign_ = Integer::NEGATIVE; - } -} - - -unsigned int Integer::MinEncodedSize(Signedness signedness) const -{ - unsigned int outputLen = max(1U, ByteCount()); - if (signedness == UNSIGNED) - return outputLen; - if (NotNegative() && (GetByte(outputLen-1) & 0x80)) - outputLen++; - if (IsNegative() && *this < -Power2(outputLen*8-1)) - outputLen++; - return outputLen; -} - - -int Integer::Compare(const Integer& t) const -{ - if (NotNegative()) - { - if (t.NotNegative()) - return PositiveCompare(t); - else - return 1; - } - else - { - if (t.NotNegative()) - return -1; - else - return -PositiveCompare(t); - } -} - - -int Integer::PositiveCompare(const Integer& t) const -{ - unsigned size = WordCount(), tSize = t.WordCount(); - - if (size == tSize) - return TaoCrypt::Compare(reg_.get_buffer(), t.reg_.get_buffer(), size); - else - return size > tSize ? 1 : -1; -} - - -bool Integer::GetBit(unsigned int n) const -{ - if (n/WORD_BITS >= reg_.size()) - return 0; - else - return bool((reg_[n/WORD_BITS] >> (n % WORD_BITS)) & 1); -} - - -unsigned long Integer::GetBits(unsigned int i, unsigned int n) const -{ - assert(n <= sizeof(unsigned long)*8); - unsigned long v = 0; - for (unsigned int j=0; j= reg_.size()) - return 0; - else - return byte(reg_[n/WORD_SIZE] >> ((n%WORD_SIZE)*8)); -} - - -unsigned int Integer::BitCount() const -{ - unsigned wordCount = WordCount(); - if (wordCount) - return (wordCount-1)*WORD_BITS + BitPrecision(reg_[wordCount-1]); - else - return 0; -} - - -unsigned int Integer::ByteCount() const -{ - unsigned wordCount = WordCount(); - if (wordCount) - return (wordCount-1)*WORD_SIZE + BytePrecision(reg_[wordCount-1]); - else - return 0; -} - - -unsigned int Integer::WordCount() const -{ - return CountWords(reg_.get_buffer(), reg_.size()); -} - - -bool Integer::IsConvertableToLong() const -{ - if (ByteCount() > sizeof(long)) - return false; - - unsigned long value = reg_[0]; - value += SafeLeftShift(reg_[1]); - - if (sign_ == POSITIVE) - return (signed long)value >= 0; - else - return -(signed long)value < 0; -} - - -signed long Integer::ConvertToLong() const -{ - assert(IsConvertableToLong()); - - unsigned long value = reg_[0]; - value += SafeLeftShift(reg_[1]); - return sign_ == POSITIVE ? value : -(signed long)value; -} - - -void Integer::Swap(Integer& a) -{ - reg_.Swap(a.reg_); - STL::swap(sign_, a.sign_); -} - - -Integer Integer::Plus(const Integer& b) const -{ - Integer sum((word)0, max(reg_.size(), b.reg_.size())); - if (NotNegative()) - { - if (b.NotNegative()) - PositiveAdd(sum, *this, b); - else - PositiveSubtract(sum, *this, b); - } - else - { - if (b.NotNegative()) - PositiveSubtract(sum, b, *this); - else - { - PositiveAdd(sum, *this, b); - sum.sign_ = Integer::NEGATIVE; - } - } - return sum; -} - - -Integer Integer::Minus(const Integer& b) const -{ - Integer diff((word)0, max(reg_.size(), b.reg_.size())); - if (NotNegative()) - { - if (b.NotNegative()) - PositiveSubtract(diff, *this, b); - else - PositiveAdd(diff, *this, b); - } - else - { - if (b.NotNegative()) - { - PositiveAdd(diff, *this, b); - diff.sign_ = Integer::NEGATIVE; - } - else - PositiveSubtract(diff, b, *this); - } - return diff; -} - - -Integer Integer::Times(const Integer &b) const -{ - Integer product; - Multiply(product, *this, b); - return product; -} - - -#undef A0 -#undef A1 -#undef B0 -#undef B1 - -#undef T0 -#undef T1 -#undef T2 -#undef T3 - -#undef R0 -#undef R1 -#undef R2 -#undef R3 - - -static inline void AtomicDivide(word *Q, const word *A, const word *B) -{ - word T[4]; - DWord q = DivideFourWordsByTwo(T, DWord(A[0], A[1]), - DWord(A[2], A[3]), DWord(B[0], B[1])); - Q[0] = q.GetLowHalf(); - Q[1] = q.GetHighHalf(); - -#ifndef NDEBUG - if (B[0] || B[1]) - { - // multiply quotient and divisor and add remainder, make sure it - // equals dividend - assert(!T[2] && !T[3] && (T[1] < B[1] || (T[1]==B[1] && T[0]= 0) - { - R[N] -= Subtract(R, R, B, N); - Q[1] += (++Q[0]==0); - assert(Q[0] || Q[1]); // no overflow - } -} - -// R[NB] -------- remainder = A%B -// Q[NA-NB+2] --- quotient = A/B -// T[NA+2*NB+4] - temp work space -// A[NA] -------- dividend -// B[NB] -------- divisor - - -void Divide(word* R, word* Q, word* T, const word* A, unsigned int NA, - const word* B, unsigned int NB) -{ - assert(NA && NB && NA%2==0 && NB%2==0); - assert(B[NB-1] || B[NB-2]); - assert(NB <= NA); - - // set up temporary work space - word *const TA=T; - word *const TB=T+NA+2; - word *const TP=T+NA+2+NB; - - // copy B into TB and normalize it so that TB has highest bit set to 1 - unsigned shiftWords = (B[NB-1]==0); - TB[0] = TB[NB-1] = 0; - CopyWords(TB+shiftWords, B, NB-shiftWords); - unsigned shiftBits = WORD_BITS - BitPrecision(TB[NB-1]); - assert(shiftBits < WORD_BITS); - ShiftWordsLeftByBits(TB, NB, shiftBits); - - // copy A into TA and normalize it - TA[0] = TA[NA] = TA[NA+1] = 0; - CopyWords(TA+shiftWords, A, NA); - ShiftWordsLeftByBits(TA, NA+2, shiftBits); - - if (TA[NA+1]==0 && TA[NA] <= 1) - { - Q[NA-NB+1] = Q[NA-NB] = 0; - while (TA[NA] || Compare(TA+NA-NB, TB, NB) >= 0) - { - TA[NA] -= Subtract(TA+NA-NB, TA+NA-NB, TB, NB); - ++Q[NA-NB]; - } - } - else - { - NA+=2; - assert(Compare(TA+NA-NB, TB, NB) < 0); - } - - word BT[2]; - BT[0] = TB[NB-2] + 1; - BT[1] = TB[NB-1] + (BT[0]==0); - - // start reducing TA mod TB, 2 words at a time - for (unsigned i=NA-2; i>=NB; i-=2) - { - AtomicDivide(Q+i-NB, TA+i-2, BT); - CorrectQuotientEstimate(TA+i-NB, TP, Q+i-NB, TB, NB); - } - - // copy TA into R, and denormalize it - CopyWords(R, TA+shiftWords, NB); - ShiftWordsRightByBits(R, NB, shiftBits); -} - - -void PositiveDivide(Integer& remainder, Integer& quotient, - const Integer& a, const Integer& b) -{ - unsigned aSize = a.WordCount(); - unsigned bSize = b.WordCount(); - - assert(bSize); - - if (a.PositiveCompare(b) == -1) - { - remainder = a; - remainder.sign_ = Integer::POSITIVE; - quotient = Integer::Zero(); - return; - } - - aSize += aSize%2; // round up to next even number - bSize += bSize%2; - - remainder.reg_.CleanNew(RoundupSize(bSize)); - remainder.sign_ = Integer::POSITIVE; - quotient.reg_.CleanNew(RoundupSize(aSize-bSize+2)); - quotient.sign_ = Integer::POSITIVE; - - AlignedWordBlock T(aSize+2*bSize+4); - Divide(remainder.reg_.get_buffer(), quotient.reg_.get_buffer(), - T.get_buffer(), a.reg_.get_buffer(), aSize, b.reg_.get_buffer(), - bSize); -} - -void Integer::Divide(Integer &remainder, Integer "ient, - const Integer ÷nd, const Integer &divisor) -{ - PositiveDivide(remainder, quotient, dividend, divisor); - - if (dividend.IsNegative()) - { - quotient.Negate(); - if (remainder.NotZero()) - { - --quotient; - remainder = divisor.AbsoluteValue() - remainder; - } - } - - if (divisor.IsNegative()) - quotient.Negate(); -} - -void Integer::DivideByPowerOf2(Integer &r, Integer &q, const Integer &a, - unsigned int n) -{ - q = a; - q >>= n; - - const unsigned int wordCount = BitsToWords(n); - if (wordCount <= a.WordCount()) - { - r.reg_.resize(RoundupSize(wordCount)); - CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount); - SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount); - if (n % WORD_BITS != 0) - r.reg_[wordCount-1] %= (word(1) << (n % WORD_BITS)); - } - else - { - r.reg_.resize(RoundupSize(a.WordCount())); - CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), r.reg_.size()); - } - r.sign_ = POSITIVE; - - if (a.IsNegative() && r.NotZero()) - { - --q; - r = Power2(n) - r; - } -} - -Integer Integer::DividedBy(const Integer &b) const -{ - Integer remainder, quotient; - Integer::Divide(remainder, quotient, *this, b); - return quotient; -} - -Integer Integer::Modulo(const Integer &b) const -{ - Integer remainder, quotient; - Integer::Divide(remainder, quotient, *this, b); - return remainder; -} - -void Integer::Divide(word &remainder, Integer "ient, - const Integer ÷nd, word divisor) -{ - assert(divisor); - - if ((divisor & (divisor-1)) == 0) // divisor is a power of 2 - { - quotient = dividend >> (BitPrecision(divisor)-1); - remainder = dividend.reg_[0] & (divisor-1); - return; - } - - unsigned int i = dividend.WordCount(); - quotient.reg_.CleanNew(RoundupSize(i)); - remainder = 0; - while (i--) - { - quotient.reg_[i] = DWord(dividend.reg_[i], remainder) / divisor; - remainder = DWord(dividend.reg_[i], remainder) % divisor; - } - - if (dividend.NotNegative()) - quotient.sign_ = POSITIVE; - else - { - quotient.sign_ = NEGATIVE; - if (remainder) - { - --quotient; - remainder = divisor - remainder; - } - } -} - -Integer Integer::DividedBy(word b) const -{ - word remainder; - Integer quotient; - Integer::Divide(remainder, quotient, *this, b); - return quotient; -} - -word Integer::Modulo(word divisor) const -{ - assert(divisor); - - word remainder; - - if ((divisor & (divisor-1)) == 0) // divisor is a power of 2 - remainder = reg_[0] & (divisor-1); - else - { - unsigned int i = WordCount(); - - if (divisor <= 5) - { - DWord sum(0, 0); - while (i--) - sum += reg_[i]; - remainder = sum % divisor; - } - else - { - remainder = 0; - while (i--) - remainder = DWord(reg_[i], remainder) % divisor; - } - } - - if (IsNegative() && remainder) - remainder = divisor - remainder; - - return remainder; -} - - -Integer Integer::AbsoluteValue() const -{ - Integer result(*this); - result.sign_ = POSITIVE; - return result; -} - - -Integer Integer::SquareRoot() const -{ - if (!IsPositive()) - return Zero(); - - // overestimate square root - Integer x, y = Power2((BitCount()+1)/2); - assert(y*y >= *this); - - do - { - x = y; - y = (x + *this/x) >> 1; - } while (y=m) - return (*this%m).InverseMod(m); - - if (m.IsEven()) - { - if (!m || IsEven()) - return Zero(); // no inverse - if (*this == One()) - return One(); - - Integer u = m.InverseMod(*this); - return !u ? Zero() : (m*(*this-u)+1)/(*this); - } - - AlignedWordBlock T(m.reg_.size() * 4); - Integer r((word)0, m.reg_.size()); - unsigned k = AlmostInverse(r.reg_.get_buffer(), T.get_buffer(), - reg_.get_buffer(), reg_.size(), - m.reg_.get_buffer(), m.reg_.size()); - DivideByPower2Mod(r.reg_.get_buffer(), r.reg_.get_buffer(), k, - m.reg_.get_buffer(), m.reg_.size()); - return r; -} - -word Integer::InverseMod(const word mod) const -{ - word g0 = mod, g1 = *this % mod; - word v0 = 0, v1 = 1; - word y; - - while (g1) - { - if (g1 == 1) - return v1; - y = g0 / g1; - g0 = g0 % g1; - v0 += y * v1; - - if (!g0) - break; - if (g0 == 1) - return mod-v0; - y = g1 / g0; - g1 = g1 % g0; - v1 += y * v0; - } - return 0; -} - -// ********* ModArith stuff - -const Integer& ModularArithmetic::Half(const Integer &a) const -{ - if (a.reg_.size()==modulus.reg_.size()) - { - TaoCrypt::DivideByPower2Mod(result.reg_.begin(), a.reg_.begin(), 1, - modulus.reg_.begin(), a.reg_.size()); - return result; - } - else - return result1 = (a.IsEven() ? (a >> 1) : ((a+modulus) >> 1)); -} - -const Integer& ModularArithmetic::Add(const Integer &a, const Integer &b) const -{ - if (a.reg_.size()==modulus.reg_.size() && - b.reg_.size()==modulus.reg_.size()) - { - if (TaoCrypt::Add(result.reg_.begin(), a.reg_.begin(), b.reg_.begin(), - a.reg_.size()) - || Compare(result.reg_.get_buffer(), modulus.reg_.get_buffer(), - a.reg_.size()) >= 0) - { - TaoCrypt::Subtract(result.reg_.begin(), result.reg_.begin(), - modulus.reg_.begin(), a.reg_.size()); - } - return result; - } - else - { - result1 = a+b; - if (result1 >= modulus) - result1 -= modulus; - return result1; - } -} - -Integer& ModularArithmetic::Accumulate(Integer &a, const Integer &b) const -{ - if (a.reg_.size()==modulus.reg_.size() && - b.reg_.size()==modulus.reg_.size()) - { - if (TaoCrypt::Add(a.reg_.get_buffer(), a.reg_.get_buffer(), - b.reg_.get_buffer(), a.reg_.size()) - || Compare(a.reg_.get_buffer(), modulus.reg_.get_buffer(), - a.reg_.size()) >= 0) - { - TaoCrypt::Subtract(a.reg_.get_buffer(), a.reg_.get_buffer(), - modulus.reg_.get_buffer(), a.reg_.size()); - } - } - else - { - a+=b; - if (a>=modulus) - a-=modulus; - } - - return a; -} - -const Integer& ModularArithmetic::Subtract(const Integer &a, - const Integer &b) const -{ - if (a.reg_.size()==modulus.reg_.size() && - b.reg_.size()==modulus.reg_.size()) - { - if (TaoCrypt::Subtract(result.reg_.begin(), a.reg_.begin(), - b.reg_.begin(), a.reg_.size())) - TaoCrypt::Add(result.reg_.begin(), result.reg_.begin(), - modulus.reg_.begin(), a.reg_.size()); - return result; - } - else - { - result1 = a-b; - if (result1.IsNegative()) - result1 += modulus; - return result1; - } -} - -Integer& ModularArithmetic::Reduce(Integer &a, const Integer &b) const -{ - if (a.reg_.size()==modulus.reg_.size() && - b.reg_.size()==modulus.reg_.size()) - { - if (TaoCrypt::Subtract(a.reg_.get_buffer(), a.reg_.get_buffer(), - b.reg_.get_buffer(), a.reg_.size())) - TaoCrypt::Add(a.reg_.get_buffer(), a.reg_.get_buffer(), - modulus.reg_.get_buffer(), a.reg_.size()); - } - else - { - a-=b; - if (a.IsNegative()) - a+=modulus; - } - - return a; -} - -const Integer& ModularArithmetic::Inverse(const Integer &a) const -{ - if (!a) - return a; - - CopyWords(result.reg_.begin(), modulus.reg_.begin(), modulus.reg_.size()); - if (TaoCrypt::Subtract(result.reg_.begin(), result.reg_.begin(), - a.reg_.begin(), a.reg_.size())) - Decrement(result.reg_.begin()+a.reg_.size(), 1, - modulus.reg_.size()-a.reg_.size()); - - return result; -} - -Integer ModularArithmetic::CascadeExponentiate(const Integer &x, - const Integer &e1, const Integer &y, const Integer &e2) const -{ - if (modulus.IsOdd()) - { - MontgomeryRepresentation dr(modulus); - return dr.ConvertOut(dr.CascadeExponentiate(dr.ConvertIn(x), e1, - dr.ConvertIn(y), e2)); - } - else - return AbstractRing::CascadeExponentiate(x, e1, y, e2); -} - -void ModularArithmetic::SimultaneousExponentiate(Integer *results, - const Integer &base, const Integer *exponents, - unsigned int exponentsCount) const -{ - if (modulus.IsOdd()) - { - MontgomeryRepresentation dr(modulus); - dr.SimultaneousExponentiate(results, dr.ConvertIn(base), exponents, - exponentsCount); - for (unsigned int i=0; i - -namespace TaoCrypt { - - -MD2::MD2() - : X_(X_SIZE), C_(BLOCK_SIZE), buffer_(BLOCK_SIZE) -{ - Init(); -} - -void MD2::Init() -{ - memset(X_.get_buffer(), 0, X_SIZE); - memset(C_.get_buffer(), 0, BLOCK_SIZE); - memset(buffer_.get_buffer(), 0, BLOCK_SIZE); - count_ = 0; -} - - -void MD2::Update(const byte* data, word32 len) -{ - - static const byte S[256] = - { - 41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6, - 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188, - 76, 130, 202, 30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24, - 138, 23, 229, 18, 190, 78, 196, 214, 218, 158, 222, 73, 160, 251, - 245, 142, 187, 47, 238, 122, 169, 104, 121, 145, 21, 178, 7, 63, - 148, 194, 16, 137, 11, 34, 95, 33, 128, 127, 93, 154, 90, 144, 50, - 39, 53, 62, 204, 231, 191, 247, 151, 3, 255, 25, 48, 179, 72, 165, - 181, 209, 215, 94, 146, 42, 172, 86, 170, 198, 79, 184, 56, 210, - 150, 164, 125, 182, 118, 252, 107, 226, 156, 116, 4, 241, 69, 157, - 112, 89, 100, 113, 135, 32, 134, 91, 207, 101, 230, 45, 168, 2, 27, - 96, 37, 173, 174, 176, 185, 246, 28, 70, 97, 105, 52, 64, 126, 15, - 85, 71, 163, 35, 221, 81, 175, 58, 195, 92, 249, 206, 186, 197, - 234, 38, 44, 83, 13, 110, 133, 40, 132, 9, 211, 223, 205, 244, 65, - 129, 77, 82, 106, 220, 55, 200, 108, 193, 171, 250, 36, 225, 123, - 8, 12, 189, 177, 74, 120, 136, 149, 139, 227, 99, 232, 109, 233, - 203, 213, 254, 59, 0, 29, 57, 242, 239, 183, 14, 102, 88, 208, 228, - 166, 119, 114, 248, 235, 117, 75, 10, 49, 68, 80, 180, 143, 237, - 31, 26, 219, 153, 141, 51, 159, 17, 131, 20 - }; - - while (len) { - word32 L = (PAD_SIZE - count_) < len ? (PAD_SIZE - count_) : len; - memcpy(buffer_.get_buffer() + count_, data, L); - count_ += L; - data += L; - len -= L; - - if (count_==PAD_SIZE) { - count_ = 0; - memcpy(X_.get_buffer() + PAD_SIZE, buffer_.get_buffer(), PAD_SIZE); - byte t = C_[15]; - - int i; - for(i = 0; i < PAD_SIZE; i++) { - X_[32 + i] = X_[PAD_SIZE + i] ^ X_[i]; - t = C_[i] ^= S[buffer_[i] ^ t]; - } - - t=0; - for(i = 0; i < 18; i++) { - for(int j = 0; j < X_SIZE; j += 8) { - t = X_[j+0] ^= S[t]; - t = X_[j+1] ^= S[t]; - t = X_[j+2] ^= S[t]; - t = X_[j+3] ^= S[t]; - t = X_[j+4] ^= S[t]; - t = X_[j+5] ^= S[t]; - t = X_[j+6] ^= S[t]; - t = X_[j+7] ^= S[t]; - } - t = (t + i) & 0xFF; - } - } - } -} - - -void MD2::Final(byte *hash) -{ - byte padding[BLOCK_SIZE]; - word32 padLen = PAD_SIZE - count_; - - for (word32 i = 0; i < padLen; i++) - padding[i] = static_cast(padLen); - - Update(padding, padLen); - Update(C_.get_buffer(), BLOCK_SIZE); - - memcpy(hash, X_.get_buffer(), DIGEST_SIZE); - - Init(); -} - - - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/md4.cpp b/externals/mysql/extlib/yassl/taocrypt/src/md4.cpp deleted file mode 100644 index cf17c21880..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/md4.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* based on Wei Dai's md4.cpp from CryptoPP */ - -#include "runtime.hpp" -#include "md4.hpp" -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - -namespace TaoCrypt { - -void MD4::Init() -{ - digest_[0] = 0x67452301L; - digest_[1] = 0xefcdab89L; - digest_[2] = 0x98badcfeL; - digest_[3] = 0x10325476L; - - buffLen_ = 0; - loLen_ = 0; - hiLen_ = 0; -} - - -MD4::MD4(const MD4& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32), - BLOCK_SIZE) -{ - buffLen_ = that.buffLen_; - loLen_ = that.loLen_; - hiLen_ = that.hiLen_; - - memcpy(digest_, that.digest_, DIGEST_SIZE); - memcpy(buffer_, that.buffer_, BLOCK_SIZE); -} - -MD4& MD4::operator= (const MD4& that) -{ - MD4 tmp(that); - Swap(tmp); - - return *this; -} - - -void MD4::Swap(MD4& other) -{ - STL::swap(loLen_, other.loLen_); - STL::swap(hiLen_, other.hiLen_); - STL::swap(buffLen_, other.buffLen_); - - memcpy(digest_, other.digest_, DIGEST_SIZE); - memcpy(buffer_, other.buffer_, BLOCK_SIZE); -} - - -void MD4::Transform() -{ -#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) -#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) -#define H(x, y, z) ((x) ^ (y) ^ (z)) - - word32 A, B, C, D; - - A = digest_[0]; - B = digest_[1]; - C = digest_[2]; - D = digest_[3]; - -#define function(a,b,c,d,k,s) a=rotlFixed(a+F(b,c,d)+buffer_[k],s); - function(A,B,C,D, 0, 3); - function(D,A,B,C, 1, 7); - function(C,D,A,B, 2,11); - function(B,C,D,A, 3,19); - function(A,B,C,D, 4, 3); - function(D,A,B,C, 5, 7); - function(C,D,A,B, 6,11); - function(B,C,D,A, 7,19); - function(A,B,C,D, 8, 3); - function(D,A,B,C, 9, 7); - function(C,D,A,B,10,11); - function(B,C,D,A,11,19); - function(A,B,C,D,12, 3); - function(D,A,B,C,13, 7); - function(C,D,A,B,14,11); - function(B,C,D,A,15,19); - -#undef function -#define function(a,b,c,d,k,s) a=rotlFixed(a+G(b,c,d)+buffer_[k]+0x5a827999,s); - function(A,B,C,D, 0, 3); - function(D,A,B,C, 4, 5); - function(C,D,A,B, 8, 9); - function(B,C,D,A,12,13); - function(A,B,C,D, 1, 3); - function(D,A,B,C, 5, 5); - function(C,D,A,B, 9, 9); - function(B,C,D,A,13,13); - function(A,B,C,D, 2, 3); - function(D,A,B,C, 6, 5); - function(C,D,A,B,10, 9); - function(B,C,D,A,14,13); - function(A,B,C,D, 3, 3); - function(D,A,B,C, 7, 5); - function(C,D,A,B,11, 9); - function(B,C,D,A,15,13); - -#undef function -#define function(a,b,c,d,k,s) a=rotlFixed(a+H(b,c,d)+buffer_[k]+0x6ed9eba1,s); - function(A,B,C,D, 0, 3); - function(D,A,B,C, 8, 9); - function(C,D,A,B, 4,11); - function(B,C,D,A,12,15); - function(A,B,C,D, 2, 3); - function(D,A,B,C,10, 9); - function(C,D,A,B, 6,11); - function(B,C,D,A,14,15); - function(A,B,C,D, 1, 3); - function(D,A,B,C, 9, 9); - function(C,D,A,B, 5,11); - function(B,C,D,A,13,15); - function(A,B,C,D, 3, 3); - function(D,A,B,C,11, 9); - function(C,D,A,B, 7,11); - function(B,C,D,A,15,15); - - digest_[0] += A; - digest_[1] += B; - digest_[2] += C; - digest_[3] += D; -} - - -} // namespace - diff --git a/externals/mysql/extlib/yassl/taocrypt/src/md5.cpp b/externals/mysql/extlib/yassl/taocrypt/src/md5.cpp deleted file mode 100644 index f18e0290c9..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/md5.cpp +++ /dev/null @@ -1,498 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* based on Wei Dai's md5.cpp from CryptoPP */ - -#include "runtime.hpp" -#include "md5.hpp" -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - - -namespace TaoCrypt { - -void MD5::Init() -{ - digest_[0] = 0x67452301L; - digest_[1] = 0xefcdab89L; - digest_[2] = 0x98badcfeL; - digest_[3] = 0x10325476L; - - buffLen_ = 0; - loLen_ = 0; - hiLen_ = 0; -} - - -MD5::MD5(const MD5& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32), - BLOCK_SIZE) -{ - buffLen_ = that.buffLen_; - loLen_ = that.loLen_; - hiLen_ = that.hiLen_; - - memcpy(digest_, that.digest_, DIGEST_SIZE); - memcpy(buffer_, that.buffer_, BLOCK_SIZE); -} - -MD5& MD5::operator= (const MD5& that) -{ - MD5 tmp(that); - Swap(tmp); - - return *this; -} - - -void MD5::Swap(MD5& other) -{ - STL::swap(loLen_, other.loLen_); - STL::swap(hiLen_, other.hiLen_); - STL::swap(buffLen_, other.buffLen_); - - memcpy(digest_, other.digest_, DIGEST_SIZE); - memcpy(buffer_, other.buffer_, BLOCK_SIZE); -} - - -#ifdef DO_MD5_ASM - -// Update digest with data of size len -void MD5::Update(const byte* data, word32 len) -{ - if (!isMMX) { - HASHwithTransform::Update(data, len); - return; - } - - byte* local = reinterpret_cast(buffer_); - - // remove buffered data if possible - if (buffLen_) { - word32 add = min(len, BLOCK_SIZE - buffLen_); - memcpy(&local[buffLen_], data, add); - - buffLen_ += add; - data += add; - len -= add; - - if (buffLen_ == BLOCK_SIZE) { - Transform(); - AddLength(BLOCK_SIZE); - buffLen_ = 0; - } - } - - // at once for asm - if (buffLen_ == 0) { - word32 times = len / BLOCK_SIZE; - if (times) { - AsmTransform(data, times); - const word32 add = BLOCK_SIZE * times; - AddLength(add); - len -= add; - data += add; - } - } - - // cache any data left - if (len) { - memcpy(&local[buffLen_], data, len); - buffLen_ += len; - } -} - - - - -/* - // w = rotlFixed(w + f(x, y, z) + index[edi] + data, s) + x -#define ASMMD5STEP(f, w, x, y, z, index, data, s) \ - f(x, y, z) \ - AS2( mov ebp, [edi + index * 4] ) \ - AS2( lea w, [esi + w + data] ) \ - AS2( add w, ebp ) \ - AS2( rol w, s ) \ - AS2( add w, x ) - - - // F1(x, y, z) (z ^ (x & (y ^ z))) - // place in esi -#define ASMF1(x, y, z) \ - AS2( mov esi, y ) \ - AS2( xor esi, z ) \ - AS2( and esi, x ) \ - AS2( xor esi, z ) - - -#define ASMF2(x, y, z) ASMF1(z, x, y) - - - // F3(x ^ y ^ z) - // place in esi -#define ASMF3(x, y, z) \ - AS2( mov esi, x ) \ - AS2( xor esi, y ) \ - AS2( xor esi, z ) - - - - // F4(x, y, z) (y ^ (x | ~z)) - // place in esi -#define ASMF4(x, y, z) \ - AS2( mov esi, z ) \ - AS1( not esi ) \ - AS2( or esi, x ) \ - AS2( xor esi, y ) -*/ - - - // combine above ASMMD5STEP(f w/ each f ASMF1 - F4 - - // esi already set up, after using set for next round - // ebp already set up, set up using next round index - -#define MD5STEP1(w, x, y, z, index, data, s) \ - AS2( xor esi, z ) \ - AS2( and esi, x ) \ - AS2( lea w, [ebp + w + data] ) \ - AS2( xor esi, z ) \ - AS2( add w, esi ) \ - AS2( mov esi, x ) \ - AS2( rol w, s ) \ - AS2( mov ebp, [edi + index * 4] ) \ - AS2( add w, x ) - -#define MD5STEP2(w, x, y, z, index, data, s) \ - AS2( xor esi, x ) \ - AS2( and esi, z ) \ - AS2( lea w, [ebp + w + data] ) \ - AS2( xor esi, y ) \ - AS2( add w, esi ) \ - AS2( mov esi, x ) \ - AS2( rol w, s ) \ - AS2( mov ebp, [edi + index * 4] ) \ - AS2( add w, x ) - - -#define MD5STEP3(w, x, y, z, index, data, s) \ - AS2( xor esi, z ) \ - AS2( lea w, [ebp + w + data] ) \ - AS2( xor esi, x ) \ - AS2( add w, esi ) \ - AS2( mov esi, x ) \ - AS2( rol w, s ) \ - AS2( mov ebp, [edi + index * 4] ) \ - AS2( add w, x ) - - -#define MD5STEP4(w, x, y, z, index, data, s) \ - AS2( or esi, x ) \ - AS2( lea w, [ebp + w + data] ) \ - AS2( xor esi, y ) \ - AS2( add w, esi ) \ - AS2( mov esi, y ) \ - AS2( rol w, s ) \ - AS1( not esi ) \ - AS2( mov ebp, [edi + index * 4] ) \ - AS2( add w, x ) - - - -#ifdef _MSC_VER - __declspec(naked) -#endif -void MD5::AsmTransform(const byte* data, word32 times) -{ -#ifdef __GNUC__ - #define AS1(x) asm(#x); - #define AS2(x, y) asm(#x ", " #y); - - #define PROLOG() \ - asm(".intel_syntax noprefix"); \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov ecx, DWORD PTR [ebp + 8] ) \ - AS2( mov edi, DWORD PTR [ebp + 12] ) \ - AS2( mov eax, DWORD PTR [ebp + 16] ) - - #define EPILOG() \ - AS2( movd ebp, mm6 ) \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( mov esp, ebp ) \ - AS2( movd edi, mm3 ) \ - AS1( emms ) \ - asm(".att_syntax"); -#else - #define AS1(x) __asm x - #define AS2(x, y) __asm x, y - - #define PROLOG() \ - AS1( push ebp ) \ - AS2( mov ebp, esp ) \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov edi, DWORD PTR [ebp + 8] ) \ - AS2( mov eax, DWORD PTR [ebp + 12] ) - - #define EPILOG() \ - AS2( movd ebp, mm6 ) \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS2( mov esp, ebp ) \ - AS1( pop ebp ) \ - AS1( emms ) \ - AS1( ret 8 ) - -#endif - - - PROLOG() - - AS2( mov esi, ecx ) - - #ifdef OLD_GCC_OFFSET - AS2( add esi, 20 ) // digest_[0] - #else - AS2( add esi, 16 ) // digest_[0] - #endif - - AS2( movd mm2, eax ) // store times_ - AS2( movd mm1, esi ) // store digest_ - - AS2( mov eax, [esi] ) // a - AS2( mov ebx, [esi + 4] ) // b - AS2( mov ecx, [esi + 8] ) // c - AS2( mov edx, [esi + 12] ) // d - -AS1(loopStart:) - - // set up - AS2( mov esi, ecx ) - AS2( mov ebp, [edi] ) - - MD5STEP1( eax, ebx, ecx, edx, 1, 0xd76aa478, 7) - MD5STEP1( edx, eax, ebx, ecx, 2, 0xe8c7b756, 12) - MD5STEP1( ecx, edx, eax, ebx, 3, 0x242070db, 17) - MD5STEP1( ebx, ecx, edx, eax, 4, 0xc1bdceee, 22) - MD5STEP1( eax, ebx, ecx, edx, 5, 0xf57c0faf, 7) - MD5STEP1( edx, eax, ebx, ecx, 6, 0x4787c62a, 12) - MD5STEP1( ecx, edx, eax, ebx, 7, 0xa8304613, 17) - MD5STEP1( ebx, ecx, edx, eax, 8, 0xfd469501, 22) - MD5STEP1( eax, ebx, ecx, edx, 9, 0x698098d8, 7) - MD5STEP1( edx, eax, ebx, ecx, 10, 0x8b44f7af, 12) - MD5STEP1( ecx, edx, eax, ebx, 11, 0xffff5bb1, 17) - MD5STEP1( ebx, ecx, edx, eax, 12, 0x895cd7be, 22) - MD5STEP1( eax, ebx, ecx, edx, 13, 0x6b901122, 7) - MD5STEP1( edx, eax, ebx, ecx, 14, 0xfd987193, 12) - MD5STEP1( ecx, edx, eax, ebx, 15, 0xa679438e, 17) - MD5STEP1( ebx, ecx, edx, eax, 1, 0x49b40821, 22) - - MD5STEP2( eax, ebx, ecx, edx, 6, 0xf61e2562, 5) - MD5STEP2( edx, eax, ebx, ecx, 11, 0xc040b340, 9) - MD5STEP2( ecx, edx, eax, ebx, 0, 0x265e5a51, 14) - MD5STEP2( ebx, ecx, edx, eax, 5, 0xe9b6c7aa, 20) - MD5STEP2( eax, ebx, ecx, edx, 10, 0xd62f105d, 5) - MD5STEP2( edx, eax, ebx, ecx, 15, 0x02441453, 9) - MD5STEP2( ecx, edx, eax, ebx, 4, 0xd8a1e681, 14) - MD5STEP2( ebx, ecx, edx, eax, 9, 0xe7d3fbc8, 20) - MD5STEP2( eax, ebx, ecx, edx, 14, 0x21e1cde6, 5) - MD5STEP2( edx, eax, ebx, ecx, 3, 0xc33707d6, 9) - MD5STEP2( ecx, edx, eax, ebx, 8, 0xf4d50d87, 14) - MD5STEP2( ebx, ecx, edx, eax, 13, 0x455a14ed, 20) - MD5STEP2( eax, ebx, ecx, edx, 2, 0xa9e3e905, 5) - MD5STEP2( edx, eax, ebx, ecx, 7, 0xfcefa3f8, 9) - MD5STEP2( ecx, edx, eax, ebx, 12, 0x676f02d9, 14) - MD5STEP2( ebx, ecx, edx, eax, 5, 0x8d2a4c8a, 20) - - MD5STEP3( eax, ebx, ecx, edx, 8, 0xfffa3942, 4) - MD5STEP3( edx, eax, ebx, ecx, 11, 0x8771f681, 11) - MD5STEP3( ecx, edx, eax, ebx, 14, 0x6d9d6122, 16) - MD5STEP3( ebx, ecx, edx, eax, 1, 0xfde5380c, 23) - MD5STEP3( eax, ebx, ecx, edx, 4, 0xa4beea44, 4) - MD5STEP3( edx, eax, ebx, ecx, 7, 0x4bdecfa9, 11) - MD5STEP3( ecx, edx, eax, ebx, 10, 0xf6bb4b60, 16) - MD5STEP3( ebx, ecx, edx, eax, 13, 0xbebfbc70, 23) - MD5STEP3( eax, ebx, ecx, edx, 0, 0x289b7ec6, 4) - MD5STEP3( edx, eax, ebx, ecx, 3, 0xeaa127fa, 11) - MD5STEP3( ecx, edx, eax, ebx, 6, 0xd4ef3085, 16) - MD5STEP3( ebx, ecx, edx, eax, 9, 0x04881d05, 23) - MD5STEP3( eax, ebx, ecx, edx, 12, 0xd9d4d039, 4) - MD5STEP3( edx, eax, ebx, ecx, 15, 0xe6db99e5, 11) - MD5STEP3( ecx, edx, eax, ebx, 2, 0x1fa27cf8, 16) - MD5STEP3( ebx, ecx, edx, eax, 0, 0xc4ac5665, 23) - - // setup - AS2( mov esi, edx ) - AS1( not esi ) - - MD5STEP4( eax, ebx, ecx, edx, 7, 0xf4292244, 6) - MD5STEP4( edx, eax, ebx, ecx, 14, 0x432aff97, 10) - MD5STEP4( ecx, edx, eax, ebx, 5, 0xab9423a7, 15) - MD5STEP4( ebx, ecx, edx, eax, 12, 0xfc93a039, 21) - MD5STEP4( eax, ebx, ecx, edx, 3, 0x655b59c3, 6) - MD5STEP4( edx, eax, ebx, ecx, 10, 0x8f0ccc92, 10) - MD5STEP4( ecx, edx, eax, ebx, 1, 0xffeff47d, 15) - MD5STEP4( ebx, ecx, edx, eax, 8, 0x85845dd1, 21) - MD5STEP4( eax, ebx, ecx, edx, 15, 0x6fa87e4f, 6) - MD5STEP4( edx, eax, ebx, ecx, 6, 0xfe2ce6e0, 10) - MD5STEP4( ecx, edx, eax, ebx, 13, 0xa3014314, 15) - MD5STEP4( ebx, ecx, edx, eax, 4, 0x4e0811a1, 21) - MD5STEP4( eax, ebx, ecx, edx, 11, 0xf7537e82, 6) - MD5STEP4( edx, eax, ebx, ecx, 2, 0xbd3af235, 10) - MD5STEP4( ecx, edx, eax, ebx, 9, 0x2ad7d2bb, 15) - MD5STEP4( ebx, ecx, edx, eax, 9, 0xeb86d391, 21) - - AS2( movd esi, mm1 ) // digest_ - - AS2( add [esi], eax ) // write out - AS2( add [esi + 4], ebx ) - AS2( add [esi + 8], ecx ) - AS2( add [esi + 12], edx ) - - AS2( add edi, 64 ) - - AS2( mov eax, [esi] ) - AS2( mov ebx, [esi + 4] ) - AS2( mov ecx, [esi + 8] ) - AS2( mov edx, [esi + 12] ) - - AS2( movd ebp, mm2 ) // times - AS1( dec ebp ) - AS2( movd mm2, ebp ) - AS1( jnz loopStart ) - - - EPILOG() -} - - -#endif // DO_MD5_ASM - - -void MD5::Transform() -{ -#define F1(x, y, z) (z ^ (x & (y ^ z))) -#define F2(x, y, z) F1(z, x, y) -#define F3(x, y, z) (x ^ y ^ z) -#define F4(x, y, z) (y ^ (x | ~z)) - -#define MD5STEP(f, w, x, y, z, data, s) \ - w = rotlFixed(w + f(x, y, z) + data, s) + x - - // Copy context->state[] to working vars - word32 a = digest_[0]; - word32 b = digest_[1]; - word32 c = digest_[2]; - word32 d = digest_[3]; - - MD5STEP(F1, a, b, c, d, buffer_[0] + 0xd76aa478, 7); - MD5STEP(F1, d, a, b, c, buffer_[1] + 0xe8c7b756, 12); - MD5STEP(F1, c, d, a, b, buffer_[2] + 0x242070db, 17); - MD5STEP(F1, b, c, d, a, buffer_[3] + 0xc1bdceee, 22); - MD5STEP(F1, a, b, c, d, buffer_[4] + 0xf57c0faf, 7); - MD5STEP(F1, d, a, b, c, buffer_[5] + 0x4787c62a, 12); - MD5STEP(F1, c, d, a, b, buffer_[6] + 0xa8304613, 17); - MD5STEP(F1, b, c, d, a, buffer_[7] + 0xfd469501, 22); - MD5STEP(F1, a, b, c, d, buffer_[8] + 0x698098d8, 7); - MD5STEP(F1, d, a, b, c, buffer_[9] + 0x8b44f7af, 12); - MD5STEP(F1, c, d, a, b, buffer_[10] + 0xffff5bb1, 17); - MD5STEP(F1, b, c, d, a, buffer_[11] + 0x895cd7be, 22); - MD5STEP(F1, a, b, c, d, buffer_[12] + 0x6b901122, 7); - MD5STEP(F1, d, a, b, c, buffer_[13] + 0xfd987193, 12); - MD5STEP(F1, c, d, a, b, buffer_[14] + 0xa679438e, 17); - MD5STEP(F1, b, c, d, a, buffer_[15] + 0x49b40821, 22); - - MD5STEP(F2, a, b, c, d, buffer_[1] + 0xf61e2562, 5); - MD5STEP(F2, d, a, b, c, buffer_[6] + 0xc040b340, 9); - MD5STEP(F2, c, d, a, b, buffer_[11] + 0x265e5a51, 14); - MD5STEP(F2, b, c, d, a, buffer_[0] + 0xe9b6c7aa, 20); - MD5STEP(F2, a, b, c, d, buffer_[5] + 0xd62f105d, 5); - MD5STEP(F2, d, a, b, c, buffer_[10] + 0x02441453, 9); - MD5STEP(F2, c, d, a, b, buffer_[15] + 0xd8a1e681, 14); - MD5STEP(F2, b, c, d, a, buffer_[4] + 0xe7d3fbc8, 20); - MD5STEP(F2, a, b, c, d, buffer_[9] + 0x21e1cde6, 5); - MD5STEP(F2, d, a, b, c, buffer_[14] + 0xc33707d6, 9); - MD5STEP(F2, c, d, a, b, buffer_[3] + 0xf4d50d87, 14); - MD5STEP(F2, b, c, d, a, buffer_[8] + 0x455a14ed, 20); - MD5STEP(F2, a, b, c, d, buffer_[13] + 0xa9e3e905, 5); - MD5STEP(F2, d, a, b, c, buffer_[2] + 0xfcefa3f8, 9); - MD5STEP(F2, c, d, a, b, buffer_[7] + 0x676f02d9, 14); - MD5STEP(F2, b, c, d, a, buffer_[12] + 0x8d2a4c8a, 20); - - MD5STEP(F3, a, b, c, d, buffer_[5] + 0xfffa3942, 4); - MD5STEP(F3, d, a, b, c, buffer_[8] + 0x8771f681, 11); - MD5STEP(F3, c, d, a, b, buffer_[11] + 0x6d9d6122, 16); - MD5STEP(F3, b, c, d, a, buffer_[14] + 0xfde5380c, 23); - MD5STEP(F3, a, b, c, d, buffer_[1] + 0xa4beea44, 4); - MD5STEP(F3, d, a, b, c, buffer_[4] + 0x4bdecfa9, 11); - MD5STEP(F3, c, d, a, b, buffer_[7] + 0xf6bb4b60, 16); - MD5STEP(F3, b, c, d, a, buffer_[10] + 0xbebfbc70, 23); - MD5STEP(F3, a, b, c, d, buffer_[13] + 0x289b7ec6, 4); - MD5STEP(F3, d, a, b, c, buffer_[0] + 0xeaa127fa, 11); - MD5STEP(F3, c, d, a, b, buffer_[3] + 0xd4ef3085, 16); - MD5STEP(F3, b, c, d, a, buffer_[6] + 0x04881d05, 23); - MD5STEP(F3, a, b, c, d, buffer_[9] + 0xd9d4d039, 4); - MD5STEP(F3, d, a, b, c, buffer_[12] + 0xe6db99e5, 11); - MD5STEP(F3, c, d, a, b, buffer_[15] + 0x1fa27cf8, 16); - MD5STEP(F3, b, c, d, a, buffer_[2] + 0xc4ac5665, 23); - - MD5STEP(F4, a, b, c, d, buffer_[0] + 0xf4292244, 6); - MD5STEP(F4, d, a, b, c, buffer_[7] + 0x432aff97, 10); - MD5STEP(F4, c, d, a, b, buffer_[14] + 0xab9423a7, 15); - MD5STEP(F4, b, c, d, a, buffer_[5] + 0xfc93a039, 21); - MD5STEP(F4, a, b, c, d, buffer_[12] + 0x655b59c3, 6); - MD5STEP(F4, d, a, b, c, buffer_[3] + 0x8f0ccc92, 10); - MD5STEP(F4, c, d, a, b, buffer_[10] + 0xffeff47d, 15); - MD5STEP(F4, b, c, d, a, buffer_[1] + 0x85845dd1, 21); - MD5STEP(F4, a, b, c, d, buffer_[8] + 0x6fa87e4f, 6); - MD5STEP(F4, d, a, b, c, buffer_[15] + 0xfe2ce6e0, 10); - MD5STEP(F4, c, d, a, b, buffer_[6] + 0xa3014314, 15); - MD5STEP(F4, b, c, d, a, buffer_[13] + 0x4e0811a1, 21); - MD5STEP(F4, a, b, c, d, buffer_[4] + 0xf7537e82, 6); - MD5STEP(F4, d, a, b, c, buffer_[11] + 0xbd3af235, 10); - MD5STEP(F4, c, d, a, b, buffer_[2] + 0x2ad7d2bb, 15); - MD5STEP(F4, b, c, d, a, buffer_[9] + 0xeb86d391, 21); - - // Add the working vars back into digest state[] - digest_[0] += a; - digest_[1] += b; - digest_[2] += c; - digest_[3] += d; - - // Wipe variables - a = b = c = d = 0; -} - - -} // namespace - diff --git a/externals/mysql/extlib/yassl/taocrypt/src/misc.cpp b/externals/mysql/extlib/yassl/taocrypt/src/misc.cpp deleted file mode 100644 index 402645c93f..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/misc.cpp +++ /dev/null @@ -1,296 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's misc.cpp from CryptoPP */ - - -#include "runtime.hpp" -#include "misc.hpp" - - -#ifdef __GNUC__ - #include - #include -#endif - -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - -namespace STL = STL_NAMESPACE; - - -#ifdef YASSL_PURE_C - - void* operator new(size_t sz, TaoCrypt::new_t) - { - void* ptr = malloc(sz ? sz : 1); - if (!ptr) abort(); - - return ptr; - } - - - void operator delete(void* ptr, TaoCrypt::new_t) - { - if (ptr) free(ptr); - } - - - void* operator new[](size_t sz, TaoCrypt::new_t nt) - { - return ::operator new(sz, nt); - } - - - void operator delete[](void* ptr, TaoCrypt::new_t nt) - { - ::operator delete(ptr, nt); - } - - - /* uncomment to test - // make sure not using globals anywhere by forgetting to use overloaded - void* operator new(size_t sz); - - void operator delete(void* ptr); - - void* operator new[](size_t sz); - - void operator delete[](void* ptr); - */ - - - namespace TaoCrypt { - - new_t tc; // for library new - - } - -#if defined(__ICC) || defined(__INTEL_COMPILER) - -extern "C" { - - int __cxa_pure_virtual() { - assert("Pure virtual method called." == "Aborted"); - return 0; - } - -} // extern "C" - -#endif - -#endif // YASSL_PURE_C - - -namespace TaoCrypt { - - -inline void XorWords(word* r, const word* a, unsigned int n) -{ - for (unsigned int i=0; i> (i-1)*8) - break; - - return i; -} - - -unsigned int BitPrecision(word value) -{ - if (!value) - return 0; - - unsigned int l = 0, - h = 8 * sizeof(value); - - while (h-l > 1) - { - unsigned int t = (l+h)/2; - if (value >> t) - l = t; - else - h = t; - } - - return h; -} - - -word Crop(word value, unsigned int size) -{ - if (size < 8*sizeof(value)) - return (value & ((1L << size) - 1)); - else - return value; -} - - - -#ifdef TAOCRYPT_X86ASM_AVAILABLE - -#ifndef _MSC_VER - static jmp_buf s_env; - static void SigIllHandler(int) - { - longjmp(s_env, 1); - } -#endif - - -bool HaveCpuId() -{ -#ifdef _MSC_VER - __try - { - __asm - { - mov eax, 0 - cpuid - } - } - __except (1) - { - return false; - } - return true; -#else - word32 eax, ebx; - __asm__ __volatile - ( - /* Put EFLAGS in eax and ebx */ - "pushf;" - "pushf;" - "pop %0;" - "movl %0,%1;" - - /* Flip the cpuid bit and store back in EFLAGS */ - "xorl $0x200000,%0;" - "push %0;" - "popf;" - - /* Read EFLAGS again */ - "pushf;" - "pop %0;" - "popf" - : "=r" (eax), "=r" (ebx) - : - : "cc" - ); - - if (eax == ebx) - return false; - return true; -#endif -} - - -void CpuId(word32 input, word32 *output) -{ -#ifdef __GNUC__ - __asm__ - ( - // save ebx in case -fPIC is being used - "push %%ebx; cpuid; mov %%ebx, %%edi; pop %%ebx" - : "=a" (output[0]), "=D" (output[1]), "=c" (output[2]), "=d"(output[3]) - : "a" (input) - ); -#else - __asm - { - mov eax, input - cpuid - mov edi, output - mov [edi], eax - mov [edi+4], ebx - mov [edi+8], ecx - mov [edi+12], edx - } -#endif -} - - -bool IsPentium() -{ - if (!HaveCpuId()) - return false; - - word32 cpuid[4]; - - CpuId(0, cpuid); - STL::swap(cpuid[2], cpuid[3]); - if (memcmp(cpuid+1, "GenuineIntel", 12) != 0) - return false; - - CpuId(1, cpuid); - byte family = ((cpuid[0] >> 8) & 0xf); - if (family < 5) - return false; - - return true; -} - - - -static bool IsMmx() -{ - if (!IsPentium()) - return false; - - word32 cpuid[4]; - - CpuId(1, cpuid); - if ((cpuid[3] & (1 << 23)) == 0) - return false; - - return true; -} - - -bool isMMX = IsMmx(); - - -#endif // TAOCRYPT_X86ASM_AVAILABLE - - - - -} // namespace - diff --git a/externals/mysql/extlib/yassl/taocrypt/src/random.cpp b/externals/mysql/extlib/yassl/taocrypt/src/random.cpp deleted file mode 100644 index 89fd5f7c7b..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/random.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* random.cpp implements a crypto secure Random Number Generator using an OS - specific seed, switch to /dev/random for more security but may block -*/ - -#include "runtime.hpp" -#include "random.hpp" -#include -#include - -#if defined(_WIN32) - #define _WIN32_WINNT 0x0400 - #include - #include -#else - #include - #include - #include -#endif // _WIN32 - -namespace TaoCrypt { - - -// Get seed and key cipher -RandomNumberGenerator::RandomNumberGenerator() -{ - byte key[32]; - byte junk[256]; - - seed_.GenerateSeed(key, sizeof(key)); - cipher_.SetKey(key, sizeof(key)); - GenerateBlock(junk, sizeof(junk)); // rid initial state -} - - -// place a generated block in output -void RandomNumberGenerator::GenerateBlock(byte* output, word32 sz) -{ - memset(output, 0, sz); - cipher_.Process(output, output, sz); -} - - -byte RandomNumberGenerator::GenerateByte() -{ - byte b; - GenerateBlock(&b, 1); - - return b; -} - - -#if defined(_WIN32) - -/* The OS_Seed implementation for windows */ - -OS_Seed::OS_Seed() -{ - if(!CryptAcquireContext(&handle_, 0, 0, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) - error_.SetError(WINCRYPT_E); -} - - -OS_Seed::~OS_Seed() -{ - CryptReleaseContext(handle_, 0); -} - - -void OS_Seed::GenerateSeed(byte* output, word32 sz) -{ - if (!CryptGenRandom(handle_, sz, output)) - error_.SetError(CRYPTGEN_E); -} - - -#elif defined(__NETWARE__) - -/* The OS_Seed implementation for Netware */ - -#include -#include - -// Loop on high resulution Read Time Stamp Counter -static void NetwareSeed(byte* output, word32 sz) -{ - word32 tscResult; - - for (word32 i = 0; i < sz; i += sizeof(tscResult)) { - #if defined(__GNUC__) - asm volatile("rdtsc" : "=A" (tscResult)); - #else - #ifdef __MWERKS__ - asm { - #else - __asm { - #endif - rdtsc - mov tscResult, eax - } - #endif - - memcpy(output, &tscResult, sizeof(tscResult)); - output += sizeof(tscResult); - - NXThreadYield(); // induce more variance - } -} - - -OS_Seed::OS_Seed() -{ -} - - -OS_Seed::~OS_Seed() -{ -} - - -void OS_Seed::GenerateSeed(byte* output, word32 sz) -{ - /* - Try to use NXSeedRandom as it will generate a strong - seed using the onboard 82802 chip - - As it's not always supported, fallback to default - implementation if an error is returned - */ - - if (NXSeedRandom(sz, output) != 0) - { - NetwareSeed(output, sz); - } -} - - -#else - -/* The default OS_Seed implementation */ - -OS_Seed::OS_Seed() -{ - fd_ = open("/dev/urandom",O_RDONLY); - if (fd_ == -1) { - fd_ = open("/dev/random",O_RDONLY); - if (fd_ == -1) - error_.SetError(OPEN_RAN_E); - } -} - - -OS_Seed::~OS_Seed() -{ - close(fd_); -} - - -// may block -void OS_Seed::GenerateSeed(byte* output, word32 sz) -{ - while (sz) { - int len = read(fd_, output, sz); - if (len == -1) { - error_.SetError(READ_RAN_E); - return; - } - - sz -= len; - output += len; - - if (sz) - sleep(1); - } -} - -#endif // _WIN32 - - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/ripemd.cpp b/externals/mysql/extlib/yassl/taocrypt/src/ripemd.cpp deleted file mode 100644 index a738c197bf..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/ripemd.cpp +++ /dev/null @@ -1,834 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* based on Wei Dai's ripemd.cpp from CryptoPP */ - -#include "runtime.hpp" -#include "ripemd.hpp" -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - - -namespace TaoCrypt { - -void RIPEMD160::Init() -{ - digest_[0] = 0x67452301L; - digest_[1] = 0xefcdab89L; - digest_[2] = 0x98badcfeL; - digest_[3] = 0x10325476L; - digest_[4] = 0xc3d2e1f0L; - - buffLen_ = 0; - loLen_ = 0; - hiLen_ = 0; -} - - -RIPEMD160::RIPEMD160(const RIPEMD160& that) - : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) -{ - buffLen_ = that.buffLen_; - loLen_ = that.loLen_; - hiLen_ = that.hiLen_; - - memcpy(digest_, that.digest_, DIGEST_SIZE); - memcpy(buffer_, that.buffer_, BLOCK_SIZE); -} - - -RIPEMD160& RIPEMD160::operator= (const RIPEMD160& that) -{ - RIPEMD160 tmp(that); - Swap(tmp); - - return *this; -} - - -void RIPEMD160::Swap(RIPEMD160& other) -{ - STL::swap(loLen_, other.loLen_); - STL::swap(hiLen_, other.hiLen_); - STL::swap(buffLen_, other.buffLen_); - - memcpy(digest_, other.digest_, DIGEST_SIZE); - memcpy(buffer_, other.buffer_, BLOCK_SIZE); -} - - -#ifdef DO_RIPEMD_ASM - -// Update digest with data of size len -void RIPEMD160::Update(const byte* data, word32 len) -{ - if (!isMMX) { - HASHwithTransform::Update(data, len); - return; - } - - byte* local = reinterpret_cast(buffer_); - - // remove buffered data if possible - if (buffLen_) { - word32 add = min(len, BLOCK_SIZE - buffLen_); - memcpy(&local[buffLen_], data, add); - - buffLen_ += add; - data += add; - len -= add; - - if (buffLen_ == BLOCK_SIZE) { - Transform(); - AddLength(BLOCK_SIZE); - buffLen_ = 0; - } - } - - // all at once for asm - if (buffLen_ == 0) { - word32 times = len / BLOCK_SIZE; - if (times) { - AsmTransform(data, times); - const word32 add = BLOCK_SIZE * times; - AddLength(add); - len -= add; - data += add; - } - } - - // cache any data left - if (len) { - memcpy(&local[buffLen_], data, len); - buffLen_ += len; - } -} - -#endif // DO_RIPEMD_ASM - - -// for all -#define F(x, y, z) (x ^ y ^ z) -#define G(x, y, z) (z ^ (x & (y^z))) -#define H(x, y, z) (z ^ (x | ~y)) -#define I(x, y, z) (y ^ (z & (x^y))) -#define J(x, y, z) (x ^ (y | ~z)) - -#define k0 0 -#define k1 0x5a827999 -#define k2 0x6ed9eba1 -#define k3 0x8f1bbcdc -#define k4 0xa953fd4e -#define k5 0x50a28be6 -#define k6 0x5c4dd124 -#define k7 0x6d703ef3 -#define k8 0x7a6d76e9 -#define k9 0 - -// for 160 and 320 -#define Subround(f, a, b, c, d, e, x, s, k) \ - a += f(b, c, d) + x + k;\ - a = rotlFixed((word32)a, s) + e;\ - c = rotlFixed((word32)c, 10U) - - -void RIPEMD160::Transform() -{ - unsigned long a1, b1, c1, d1, e1, a2, b2, c2, d2, e2; - a1 = a2 = digest_[0]; - b1 = b2 = digest_[1]; - c1 = c2 = digest_[2]; - d1 = d2 = digest_[3]; - e1 = e2 = digest_[4]; - - Subround(F, a1, b1, c1, d1, e1, buffer_[ 0], 11, k0); - Subround(F, e1, a1, b1, c1, d1, buffer_[ 1], 14, k0); - Subround(F, d1, e1, a1, b1, c1, buffer_[ 2], 15, k0); - Subround(F, c1, d1, e1, a1, b1, buffer_[ 3], 12, k0); - Subround(F, b1, c1, d1, e1, a1, buffer_[ 4], 5, k0); - Subround(F, a1, b1, c1, d1, e1, buffer_[ 5], 8, k0); - Subround(F, e1, a1, b1, c1, d1, buffer_[ 6], 7, k0); - Subround(F, d1, e1, a1, b1, c1, buffer_[ 7], 9, k0); - Subround(F, c1, d1, e1, a1, b1, buffer_[ 8], 11, k0); - Subround(F, b1, c1, d1, e1, a1, buffer_[ 9], 13, k0); - Subround(F, a1, b1, c1, d1, e1, buffer_[10], 14, k0); - Subround(F, e1, a1, b1, c1, d1, buffer_[11], 15, k0); - Subround(F, d1, e1, a1, b1, c1, buffer_[12], 6, k0); - Subround(F, c1, d1, e1, a1, b1, buffer_[13], 7, k0); - Subround(F, b1, c1, d1, e1, a1, buffer_[14], 9, k0); - Subround(F, a1, b1, c1, d1, e1, buffer_[15], 8, k0); - - Subround(G, e1, a1, b1, c1, d1, buffer_[ 7], 7, k1); - Subround(G, d1, e1, a1, b1, c1, buffer_[ 4], 6, k1); - Subround(G, c1, d1, e1, a1, b1, buffer_[13], 8, k1); - Subround(G, b1, c1, d1, e1, a1, buffer_[ 1], 13, k1); - Subround(G, a1, b1, c1, d1, e1, buffer_[10], 11, k1); - Subround(G, e1, a1, b1, c1, d1, buffer_[ 6], 9, k1); - Subround(G, d1, e1, a1, b1, c1, buffer_[15], 7, k1); - Subround(G, c1, d1, e1, a1, b1, buffer_[ 3], 15, k1); - Subround(G, b1, c1, d1, e1, a1, buffer_[12], 7, k1); - Subround(G, a1, b1, c1, d1, e1, buffer_[ 0], 12, k1); - Subround(G, e1, a1, b1, c1, d1, buffer_[ 9], 15, k1); - Subround(G, d1, e1, a1, b1, c1, buffer_[ 5], 9, k1); - Subround(G, c1, d1, e1, a1, b1, buffer_[ 2], 11, k1); - Subround(G, b1, c1, d1, e1, a1, buffer_[14], 7, k1); - Subround(G, a1, b1, c1, d1, e1, buffer_[11], 13, k1); - Subround(G, e1, a1, b1, c1, d1, buffer_[ 8], 12, k1); - - Subround(H, d1, e1, a1, b1, c1, buffer_[ 3], 11, k2); - Subround(H, c1, d1, e1, a1, b1, buffer_[10], 13, k2); - Subround(H, b1, c1, d1, e1, a1, buffer_[14], 6, k2); - Subround(H, a1, b1, c1, d1, e1, buffer_[ 4], 7, k2); - Subround(H, e1, a1, b1, c1, d1, buffer_[ 9], 14, k2); - Subround(H, d1, e1, a1, b1, c1, buffer_[15], 9, k2); - Subround(H, c1, d1, e1, a1, b1, buffer_[ 8], 13, k2); - Subround(H, b1, c1, d1, e1, a1, buffer_[ 1], 15, k2); - Subround(H, a1, b1, c1, d1, e1, buffer_[ 2], 14, k2); - Subround(H, e1, a1, b1, c1, d1, buffer_[ 7], 8, k2); - Subround(H, d1, e1, a1, b1, c1, buffer_[ 0], 13, k2); - Subround(H, c1, d1, e1, a1, b1, buffer_[ 6], 6, k2); - Subround(H, b1, c1, d1, e1, a1, buffer_[13], 5, k2); - Subround(H, a1, b1, c1, d1, e1, buffer_[11], 12, k2); - Subround(H, e1, a1, b1, c1, d1, buffer_[ 5], 7, k2); - Subround(H, d1, e1, a1, b1, c1, buffer_[12], 5, k2); - - Subround(I, c1, d1, e1, a1, b1, buffer_[ 1], 11, k3); - Subround(I, b1, c1, d1, e1, a1, buffer_[ 9], 12, k3); - Subround(I, a1, b1, c1, d1, e1, buffer_[11], 14, k3); - Subround(I, e1, a1, b1, c1, d1, buffer_[10], 15, k3); - Subround(I, d1, e1, a1, b1, c1, buffer_[ 0], 14, k3); - Subround(I, c1, d1, e1, a1, b1, buffer_[ 8], 15, k3); - Subround(I, b1, c1, d1, e1, a1, buffer_[12], 9, k3); - Subround(I, a1, b1, c1, d1, e1, buffer_[ 4], 8, k3); - Subround(I, e1, a1, b1, c1, d1, buffer_[13], 9, k3); - Subround(I, d1, e1, a1, b1, c1, buffer_[ 3], 14, k3); - Subround(I, c1, d1, e1, a1, b1, buffer_[ 7], 5, k3); - Subround(I, b1, c1, d1, e1, a1, buffer_[15], 6, k3); - Subround(I, a1, b1, c1, d1, e1, buffer_[14], 8, k3); - Subround(I, e1, a1, b1, c1, d1, buffer_[ 5], 6, k3); - Subround(I, d1, e1, a1, b1, c1, buffer_[ 6], 5, k3); - Subround(I, c1, d1, e1, a1, b1, buffer_[ 2], 12, k3); - - Subround(J, b1, c1, d1, e1, a1, buffer_[ 4], 9, k4); - Subround(J, a1, b1, c1, d1, e1, buffer_[ 0], 15, k4); - Subround(J, e1, a1, b1, c1, d1, buffer_[ 5], 5, k4); - Subround(J, d1, e1, a1, b1, c1, buffer_[ 9], 11, k4); - Subround(J, c1, d1, e1, a1, b1, buffer_[ 7], 6, k4); - Subround(J, b1, c1, d1, e1, a1, buffer_[12], 8, k4); - Subround(J, a1, b1, c1, d1, e1, buffer_[ 2], 13, k4); - Subround(J, e1, a1, b1, c1, d1, buffer_[10], 12, k4); - Subround(J, d1, e1, a1, b1, c1, buffer_[14], 5, k4); - Subround(J, c1, d1, e1, a1, b1, buffer_[ 1], 12, k4); - Subround(J, b1, c1, d1, e1, a1, buffer_[ 3], 13, k4); - Subround(J, a1, b1, c1, d1, e1, buffer_[ 8], 14, k4); - Subround(J, e1, a1, b1, c1, d1, buffer_[11], 11, k4); - Subround(J, d1, e1, a1, b1, c1, buffer_[ 6], 8, k4); - Subround(J, c1, d1, e1, a1, b1, buffer_[15], 5, k4); - Subround(J, b1, c1, d1, e1, a1, buffer_[13], 6, k4); - - Subround(J, a2, b2, c2, d2, e2, buffer_[ 5], 8, k5); - Subround(J, e2, a2, b2, c2, d2, buffer_[14], 9, k5); - Subround(J, d2, e2, a2, b2, c2, buffer_[ 7], 9, k5); - Subround(J, c2, d2, e2, a2, b2, buffer_[ 0], 11, k5); - Subround(J, b2, c2, d2, e2, a2, buffer_[ 9], 13, k5); - Subround(J, a2, b2, c2, d2, e2, buffer_[ 2], 15, k5); - Subround(J, e2, a2, b2, c2, d2, buffer_[11], 15, k5); - Subround(J, d2, e2, a2, b2, c2, buffer_[ 4], 5, k5); - Subround(J, c2, d2, e2, a2, b2, buffer_[13], 7, k5); - Subround(J, b2, c2, d2, e2, a2, buffer_[ 6], 7, k5); - Subround(J, a2, b2, c2, d2, e2, buffer_[15], 8, k5); - Subround(J, e2, a2, b2, c2, d2, buffer_[ 8], 11, k5); - Subround(J, d2, e2, a2, b2, c2, buffer_[ 1], 14, k5); - Subround(J, c2, d2, e2, a2, b2, buffer_[10], 14, k5); - Subround(J, b2, c2, d2, e2, a2, buffer_[ 3], 12, k5); - Subround(J, a2, b2, c2, d2, e2, buffer_[12], 6, k5); - - Subround(I, e2, a2, b2, c2, d2, buffer_[ 6], 9, k6); - Subround(I, d2, e2, a2, b2, c2, buffer_[11], 13, k6); - Subround(I, c2, d2, e2, a2, b2, buffer_[ 3], 15, k6); - Subround(I, b2, c2, d2, e2, a2, buffer_[ 7], 7, k6); - Subround(I, a2, b2, c2, d2, e2, buffer_[ 0], 12, k6); - Subround(I, e2, a2, b2, c2, d2, buffer_[13], 8, k6); - Subround(I, d2, e2, a2, b2, c2, buffer_[ 5], 9, k6); - Subround(I, c2, d2, e2, a2, b2, buffer_[10], 11, k6); - Subround(I, b2, c2, d2, e2, a2, buffer_[14], 7, k6); - Subround(I, a2, b2, c2, d2, e2, buffer_[15], 7, k6); - Subround(I, e2, a2, b2, c2, d2, buffer_[ 8], 12, k6); - Subround(I, d2, e2, a2, b2, c2, buffer_[12], 7, k6); - Subround(I, c2, d2, e2, a2, b2, buffer_[ 4], 6, k6); - Subround(I, b2, c2, d2, e2, a2, buffer_[ 9], 15, k6); - Subround(I, a2, b2, c2, d2, e2, buffer_[ 1], 13, k6); - Subround(I, e2, a2, b2, c2, d2, buffer_[ 2], 11, k6); - - Subround(H, d2, e2, a2, b2, c2, buffer_[15], 9, k7); - Subround(H, c2, d2, e2, a2, b2, buffer_[ 5], 7, k7); - Subround(H, b2, c2, d2, e2, a2, buffer_[ 1], 15, k7); - Subround(H, a2, b2, c2, d2, e2, buffer_[ 3], 11, k7); - Subround(H, e2, a2, b2, c2, d2, buffer_[ 7], 8, k7); - Subround(H, d2, e2, a2, b2, c2, buffer_[14], 6, k7); - Subround(H, c2, d2, e2, a2, b2, buffer_[ 6], 6, k7); - Subround(H, b2, c2, d2, e2, a2, buffer_[ 9], 14, k7); - Subround(H, a2, b2, c2, d2, e2, buffer_[11], 12, k7); - Subround(H, e2, a2, b2, c2, d2, buffer_[ 8], 13, k7); - Subround(H, d2, e2, a2, b2, c2, buffer_[12], 5, k7); - Subround(H, c2, d2, e2, a2, b2, buffer_[ 2], 14, k7); - Subround(H, b2, c2, d2, e2, a2, buffer_[10], 13, k7); - Subround(H, a2, b2, c2, d2, e2, buffer_[ 0], 13, k7); - Subround(H, e2, a2, b2, c2, d2, buffer_[ 4], 7, k7); - Subround(H, d2, e2, a2, b2, c2, buffer_[13], 5, k7); - - Subround(G, c2, d2, e2, a2, b2, buffer_[ 8], 15, k8); - Subround(G, b2, c2, d2, e2, a2, buffer_[ 6], 5, k8); - Subround(G, a2, b2, c2, d2, e2, buffer_[ 4], 8, k8); - Subround(G, e2, a2, b2, c2, d2, buffer_[ 1], 11, k8); - Subround(G, d2, e2, a2, b2, c2, buffer_[ 3], 14, k8); - Subround(G, c2, d2, e2, a2, b2, buffer_[11], 14, k8); - Subround(G, b2, c2, d2, e2, a2, buffer_[15], 6, k8); - Subround(G, a2, b2, c2, d2, e2, buffer_[ 0], 14, k8); - Subround(G, e2, a2, b2, c2, d2, buffer_[ 5], 6, k8); - Subround(G, d2, e2, a2, b2, c2, buffer_[12], 9, k8); - Subround(G, c2, d2, e2, a2, b2, buffer_[ 2], 12, k8); - Subround(G, b2, c2, d2, e2, a2, buffer_[13], 9, k8); - Subround(G, a2, b2, c2, d2, e2, buffer_[ 9], 12, k8); - Subround(G, e2, a2, b2, c2, d2, buffer_[ 7], 5, k8); - Subround(G, d2, e2, a2, b2, c2, buffer_[10], 15, k8); - Subround(G, c2, d2, e2, a2, b2, buffer_[14], 8, k8); - - Subround(F, b2, c2, d2, e2, a2, buffer_[12], 8, k9); - Subround(F, a2, b2, c2, d2, e2, buffer_[15], 5, k9); - Subround(F, e2, a2, b2, c2, d2, buffer_[10], 12, k9); - Subround(F, d2, e2, a2, b2, c2, buffer_[ 4], 9, k9); - Subround(F, c2, d2, e2, a2, b2, buffer_[ 1], 12, k9); - Subround(F, b2, c2, d2, e2, a2, buffer_[ 5], 5, k9); - Subround(F, a2, b2, c2, d2, e2, buffer_[ 8], 14, k9); - Subround(F, e2, a2, b2, c2, d2, buffer_[ 7], 6, k9); - Subround(F, d2, e2, a2, b2, c2, buffer_[ 6], 8, k9); - Subround(F, c2, d2, e2, a2, b2, buffer_[ 2], 13, k9); - Subround(F, b2, c2, d2, e2, a2, buffer_[13], 6, k9); - Subround(F, a2, b2, c2, d2, e2, buffer_[14], 5, k9); - Subround(F, e2, a2, b2, c2, d2, buffer_[ 0], 15, k9); - Subround(F, d2, e2, a2, b2, c2, buffer_[ 3], 13, k9); - Subround(F, c2, d2, e2, a2, b2, buffer_[ 9], 11, k9); - Subround(F, b2, c2, d2, e2, a2, buffer_[11], 11, k9); - - c1 = digest_[1] + c1 + d2; - digest_[1] = digest_[2] + d1 + e2; - digest_[2] = digest_[3] + e1 + a2; - digest_[3] = digest_[4] + a1 + b2; - digest_[4] = digest_[0] + b1 + c2; - digest_[0] = c1; -} - - -#ifdef DO_RIPEMD_ASM - -/* - // F(x ^ y ^ z) - // place in esi -#define ASMF(x, y, z) \ - AS2( mov esi, x ) \ - AS2( xor esi, y ) \ - AS2( xor esi, z ) - - - // G(z ^ (x & (y^z))) - // place in esi -#define ASMG(x, y, z) \ - AS2( mov esi, z ) \ - AS2( xor esi, y ) \ - AS2( and esi, x ) \ - AS2( xor esi, z ) - - - // H(z ^ (x | ~y)) - // place in esi -#define ASMH(x, y, z) \ - AS2( mov esi, y ) \ - AS1( not esi ) \ - AS2( or esi, x ) \ - AS2( xor esi, z ) - - - // I(y ^ (z & (x^y))) - // place in esi -#define ASMI(x, y, z) \ - AS2( mov esi, y ) \ - AS2( xor esi, x ) \ - AS2( and esi, z ) \ - AS2( xor esi, y ) - - - // J(x ^ (y | ~z))) - // place in esi -#define ASMJ(x, y, z) \ - AS2( mov esi, z ) \ - AS1( not esi ) \ - AS2( or esi, y ) \ - AS2( xor esi, x ) - - -// for 160 and 320 -// #define ASMSubround(f, a, b, c, d, e, i, s, k) -// a += f(b, c, d) + data[i] + k; -// a = rotlFixed((word32)a, s) + e; -// c = rotlFixed((word32)c, 10U) - -#define ASMSubround(f, a, b, c, d, e, index, s, k) \ - // a += f(b, c, d) + data[i] + k \ - AS2( mov esp, [edi + index * 4] ) \ - f(b, c, d) \ - AS2( add esi, k ) \ - AS2( add esi, esp ) \ - AS2( add a, esi ) \ - // a = rotlFixed((word32)a, s) + e \ - AS2( rol a, s ) \ - AS2( rol c, 10 ) \ - // c = rotlFixed((word32)c, 10U) \ - AS2( add a, e ) -*/ - - -// combine F into subround w/ setup -// esi already has c, setup for next round when done -// esp already has edi[index], setup for next round when done - -#define ASMSubroundF(a, b, c, d, e, index, s) \ - /* a += (b ^ c ^ d) + data[i] + k */ \ - AS2( xor esi, b ) \ - AS2( add a, [edi + index * 4] ) \ - AS2( xor esi, d ) \ - AS2( add a, esi ) \ - /* a = rotlFixed((word32)a, s) + e */ \ - AS2( mov esi, b ) \ - AS2( rol a, s ) \ - /* c = rotlFixed((word32)c, 10U) */ \ - AS2( rol c, 10 ) \ - AS2( add a, e ) - - -// combine G into subround w/ setup -// esi already has c, setup for next round when done -// esp already has edi[index], setup for next round when done - -#define ASMSubroundG(a, b, c, d, e, index, s, k) \ - /* a += (d ^ (b & (c^d))) + data[i] + k */ \ - AS2( xor esi, d ) \ - AS2( and esi, b ) \ - AS2( add a, [edi + index * 4] ) \ - AS2( xor esi, d ) \ - AS2( lea a, [esi + a + k] ) \ - /* a = rotlFixed((word32)a, s) + e */ \ - AS2( mov esi, b ) \ - AS2( rol a, s ) \ - /* c = rotlFixed((word32)c, 10U) */ \ - AS2( rol c, 10 ) \ - AS2( add a, e ) - - -// combine H into subround w/ setup -// esi already has c, setup for next round when done -// esp already has edi[index], setup for next round when done - -#define ASMSubroundH(a, b, c, d, e, index, s, k) \ - /* a += (d ^ (b | ~c)) + data[i] + k */ \ - AS1( not esi ) \ - AS2( or esi, b ) \ - AS2( add a, [edi + index * 4] ) \ - AS2( xor esi, d ) \ - AS2( lea a, [esi + a + k] ) \ - /* a = rotlFixed((word32)a, s) + e */ \ - AS2( mov esi, b ) \ - AS2( rol a, s ) \ - /* c = rotlFixed((word32)c, 10U) */ \ - AS2( rol c, 10 ) \ - AS2( add a, e ) - - -// combine I into subround w/ setup -// esi already has c, setup for next round when done -// esp already has edi[index], setup for next round when done - -#define ASMSubroundI(a, b, c, d, e, index, s, k) \ - /* a += (c ^ (d & (b^c))) + data[i] + k */ \ - AS2( xor esi, b ) \ - AS2( and esi, d ) \ - AS2( add a, [edi + index * 4] ) \ - AS2( xor esi, c ) \ - AS2( lea a, [esi + a + k] ) \ - /* a = rotlFixed((word32)a, s) + e */ \ - AS2( mov esi, b ) \ - AS2( rol a, s ) \ - /* c = rotlFixed((word32)c, 10U) */ \ - AS2( rol c, 10 ) \ - AS2( add a, e ) - - -// combine J into subround w/ setup -// esi already has d, setup for next round when done -// esp already has edi[index], setup for next round when done - -#define ASMSubroundJ(a, b, c, d, e, index, s, k) \ - /* a += (b ^ (c | ~d))) + data[i] + k */ \ - AS1( not esi ) \ - AS2( or esi, c ) \ - /* c = rotlFixed((word32)c, 10U) */ \ - AS2( add a, [edi + index * 4] ) \ - AS2( xor esi, b ) \ - AS2( rol c, 10 ) \ - AS2( lea a, [esi + a + k] ) \ - /* a = rotlFixed((word32)a, s) + e */ \ - AS2( rol a, s ) \ - AS2( mov esi, c ) \ - AS2( add a, e ) - - -#ifdef _MSC_VER - __declspec(naked) -#endif -void RIPEMD160::AsmTransform(const byte* data, word32 times) -{ -#ifdef __GNUC__ - #define AS1(x) asm(#x); - #define AS2(x, y) asm(#x ", " #y); - - #define PROLOG() \ - asm(".intel_syntax noprefix"); \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov ecx, DWORD PTR [ebp + 8] ) \ - AS2( mov edi, DWORD PTR [ebp + 12] ) \ - AS2( mov edx, DWORD PTR [ebp + 16] ) - - #define EPILOG() \ - AS2( movd ebp, mm6 ) \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( mov esp, ebp ) \ - AS2( movd edi, mm3 ) \ - AS1( emms ) \ - asm(".att_syntax"); -#else - #define AS1(x) __asm x - #define AS2(x, y) __asm x, y - - #define PROLOG() \ - AS1( push ebp ) \ - AS2( mov ebp, esp ) \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov edi, DWORD PTR [ebp + 8] ) \ - AS2( mov edx, DWORD PTR [ebp + 12] ) - - #define EPILOG() \ - AS2( movd ebp, mm6 ) \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS2( mov esp, ebp ) \ - AS1( pop ebp ) \ - AS1( emms ) \ - AS1( ret 8 ) - -#endif - - PROLOG() - - #ifdef OLD_GCC_OFFSET - AS2( lea esi, [ecx + 20] ) // digest_[0] - #else - AS2( lea esi, [ecx + 16] ) // digest_[0] - #endif - - AS2( sub esp, 24 ) // make room for tmp a1 - e1 - AS2( movd mm1, esi ) // store digest_ - -AS1( loopStart: ) - - AS2( movd mm2, edx ) // store times_ - - AS2( mov eax, [esi] ) // a1 - AS2( mov ebx, [esi + 4] ) // b1 - AS2( mov ecx, [esi + 8] ) // c1 - AS2( mov edx, [esi + 12] ) // d1 - AS2( mov ebp, [esi + 16] ) // e1 - - // setup - AS2( mov esi, ecx ) - - ASMSubroundF( eax, ebx, ecx, edx, ebp, 0, 11) - ASMSubroundF( ebp, eax, ebx, ecx, edx, 1, 14) - ASMSubroundF( edx, ebp, eax, ebx, ecx, 2, 15) - ASMSubroundF( ecx, edx, ebp, eax, ebx, 3, 12) - ASMSubroundF( ebx, ecx, edx, ebp, eax, 4, 5) - ASMSubroundF( eax, ebx, ecx, edx, ebp, 5, 8) - ASMSubroundF( ebp, eax, ebx, ecx, edx, 6, 7) - ASMSubroundF( edx, ebp, eax, ebx, ecx, 7, 9) - ASMSubroundF( ecx, edx, ebp, eax, ebx, 8, 11) - ASMSubroundF( ebx, ecx, edx, ebp, eax, 9, 13) - ASMSubroundF( eax, ebx, ecx, edx, ebp, 10, 14) - ASMSubroundF( ebp, eax, ebx, ecx, edx, 11, 15) - ASMSubroundF( edx, ebp, eax, ebx, ecx, 12, 6) - ASMSubroundF( ecx, edx, ebp, eax, ebx, 13, 7) - ASMSubroundF( ebx, ecx, edx, ebp, eax, 14, 9) - ASMSubroundF( eax, ebx, ecx, edx, ebp, 15, 8) - - ASMSubroundG( ebp, eax, ebx, ecx, edx, 7, 7, k1) - ASMSubroundG( edx, ebp, eax, ebx, ecx, 4, 6, k1) - ASMSubroundG( ecx, edx, ebp, eax, ebx, 13, 8, k1) - ASMSubroundG( ebx, ecx, edx, ebp, eax, 1, 13, k1) - ASMSubroundG( eax, ebx, ecx, edx, ebp, 10, 11, k1) - ASMSubroundG( ebp, eax, ebx, ecx, edx, 6, 9, k1) - ASMSubroundG( edx, ebp, eax, ebx, ecx, 15, 7, k1) - ASMSubroundG( ecx, edx, ebp, eax, ebx, 3, 15, k1) - ASMSubroundG( ebx, ecx, edx, ebp, eax, 12, 7, k1) - ASMSubroundG( eax, ebx, ecx, edx, ebp, 0, 12, k1) - ASMSubroundG( ebp, eax, ebx, ecx, edx, 9, 15, k1) - ASMSubroundG( edx, ebp, eax, ebx, ecx, 5, 9, k1) - ASMSubroundG( ecx, edx, ebp, eax, ebx, 2, 11, k1) - ASMSubroundG( ebx, ecx, edx, ebp, eax, 14, 7, k1) - ASMSubroundG( eax, ebx, ecx, edx, ebp, 11, 13, k1) - ASMSubroundG( ebp, eax, ebx, ecx, edx, 8, 12, k1) - - ASMSubroundH( edx, ebp, eax, ebx, ecx, 3, 11, k2) - ASMSubroundH( ecx, edx, ebp, eax, ebx, 10, 13, k2) - ASMSubroundH( ebx, ecx, edx, ebp, eax, 14, 6, k2) - ASMSubroundH( eax, ebx, ecx, edx, ebp, 4, 7, k2) - ASMSubroundH( ebp, eax, ebx, ecx, edx, 9, 14, k2) - ASMSubroundH( edx, ebp, eax, ebx, ecx, 15, 9, k2) - ASMSubroundH( ecx, edx, ebp, eax, ebx, 8, 13, k2) - ASMSubroundH( ebx, ecx, edx, ebp, eax, 1, 15, k2) - ASMSubroundH( eax, ebx, ecx, edx, ebp, 2, 14, k2) - ASMSubroundH( ebp, eax, ebx, ecx, edx, 7, 8, k2) - ASMSubroundH( edx, ebp, eax, ebx, ecx, 0, 13, k2) - ASMSubroundH( ecx, edx, ebp, eax, ebx, 6, 6, k2) - ASMSubroundH( ebx, ecx, edx, ebp, eax, 13, 5, k2) - ASMSubroundH( eax, ebx, ecx, edx, ebp, 11, 12, k2) - ASMSubroundH( ebp, eax, ebx, ecx, edx, 5, 7, k2) - ASMSubroundH( edx, ebp, eax, ebx, ecx, 12, 5, k2) - - ASMSubroundI( ecx, edx, ebp, eax, ebx, 1, 11, k3) - ASMSubroundI( ebx, ecx, edx, ebp, eax, 9, 12, k3) - ASMSubroundI( eax, ebx, ecx, edx, ebp, 11, 14, k3) - ASMSubroundI( ebp, eax, ebx, ecx, edx, 10, 15, k3) - ASMSubroundI( edx, ebp, eax, ebx, ecx, 0, 14, k3) - ASMSubroundI( ecx, edx, ebp, eax, ebx, 8, 15, k3) - ASMSubroundI( ebx, ecx, edx, ebp, eax, 12, 9, k3) - ASMSubroundI( eax, ebx, ecx, edx, ebp, 4, 8, k3) - ASMSubroundI( ebp, eax, ebx, ecx, edx, 13, 9, k3) - ASMSubroundI( edx, ebp, eax, ebx, ecx, 3, 14, k3) - ASMSubroundI( ecx, edx, ebp, eax, ebx, 7, 5, k3) - ASMSubroundI( ebx, ecx, edx, ebp, eax, 15, 6, k3) - ASMSubroundI( eax, ebx, ecx, edx, ebp, 14, 8, k3) - ASMSubroundI( ebp, eax, ebx, ecx, edx, 5, 6, k3) - ASMSubroundI( edx, ebp, eax, ebx, ecx, 6, 5, k3) - ASMSubroundI( ecx, edx, ebp, eax, ebx, 2, 12, k3) - - // setup - AS2( mov esi, ebp ) - - ASMSubroundJ( ebx, ecx, edx, ebp, eax, 4, 9, k4) - ASMSubroundJ( eax, ebx, ecx, edx, ebp, 0, 15, k4) - ASMSubroundJ( ebp, eax, ebx, ecx, edx, 5, 5, k4) - ASMSubroundJ( edx, ebp, eax, ebx, ecx, 9, 11, k4) - ASMSubroundJ( ecx, edx, ebp, eax, ebx, 7, 6, k4) - ASMSubroundJ( ebx, ecx, edx, ebp, eax, 12, 8, k4) - ASMSubroundJ( eax, ebx, ecx, edx, ebp, 2, 13, k4) - ASMSubroundJ( ebp, eax, ebx, ecx, edx, 10, 12, k4) - ASMSubroundJ( edx, ebp, eax, ebx, ecx, 14, 5, k4) - ASMSubroundJ( ecx, edx, ebp, eax, ebx, 1, 12, k4) - ASMSubroundJ( ebx, ecx, edx, ebp, eax, 3, 13, k4) - ASMSubroundJ( eax, ebx, ecx, edx, ebp, 8, 14, k4) - ASMSubroundJ( ebp, eax, ebx, ecx, edx, 11, 11, k4) - ASMSubroundJ( edx, ebp, eax, ebx, ecx, 6, 8, k4) - ASMSubroundJ( ecx, edx, ebp, eax, ebx, 15, 5, k4) - ASMSubroundJ( ebx, ecx, edx, ebp, eax, 13, 6, k4) - - // store a1 - e1 on stack - AS2( movd esi, mm1 ) // digest_ - - AS2( mov [esp], eax ) - AS2( mov [esp + 4], ebx ) - AS2( mov [esp + 8], ecx ) - AS2( mov [esp + 12], edx ) - AS2( mov [esp + 16], ebp ) - - AS2( mov eax, [esi] ) // a2 - AS2( mov ebx, [esi + 4] ) // b2 - AS2( mov ecx, [esi + 8] ) // c2 - AS2( mov edx, [esi + 12] ) // d2 - AS2( mov ebp, [esi + 16] ) // e2 - - - // setup - AS2( mov esi, edx ) - - ASMSubroundJ( eax, ebx, ecx, edx, ebp, 5, 8, k5) - ASMSubroundJ( ebp, eax, ebx, ecx, edx, 14, 9, k5) - ASMSubroundJ( edx, ebp, eax, ebx, ecx, 7, 9, k5) - ASMSubroundJ( ecx, edx, ebp, eax, ebx, 0, 11, k5) - ASMSubroundJ( ebx, ecx, edx, ebp, eax, 9, 13, k5) - ASMSubroundJ( eax, ebx, ecx, edx, ebp, 2, 15, k5) - ASMSubroundJ( ebp, eax, ebx, ecx, edx, 11, 15, k5) - ASMSubroundJ( edx, ebp, eax, ebx, ecx, 4, 5, k5) - ASMSubroundJ( ecx, edx, ebp, eax, ebx, 13, 7, k5) - ASMSubroundJ( ebx, ecx, edx, ebp, eax, 6, 7, k5) - ASMSubroundJ( eax, ebx, ecx, edx, ebp, 15, 8, k5) - ASMSubroundJ( ebp, eax, ebx, ecx, edx, 8, 11, k5) - ASMSubroundJ( edx, ebp, eax, ebx, ecx, 1, 14, k5) - ASMSubroundJ( ecx, edx, ebp, eax, ebx, 10, 14, k5) - ASMSubroundJ( ebx, ecx, edx, ebp, eax, 3, 12, k5) - ASMSubroundJ( eax, ebx, ecx, edx, ebp, 12, 6, k5) - - // setup - AS2( mov esi, ebx ) - - ASMSubroundI( ebp, eax, ebx, ecx, edx, 6, 9, k6) - ASMSubroundI( edx, ebp, eax, ebx, ecx, 11, 13, k6) - ASMSubroundI( ecx, edx, ebp, eax, ebx, 3, 15, k6) - ASMSubroundI( ebx, ecx, edx, ebp, eax, 7, 7, k6) - ASMSubroundI( eax, ebx, ecx, edx, ebp, 0, 12, k6) - ASMSubroundI( ebp, eax, ebx, ecx, edx, 13, 8, k6) - ASMSubroundI( edx, ebp, eax, ebx, ecx, 5, 9, k6) - ASMSubroundI( ecx, edx, ebp, eax, ebx, 10, 11, k6) - ASMSubroundI( ebx, ecx, edx, ebp, eax, 14, 7, k6) - ASMSubroundI( eax, ebx, ecx, edx, ebp, 15, 7, k6) - ASMSubroundI( ebp, eax, ebx, ecx, edx, 8, 12, k6) - ASMSubroundI( edx, ebp, eax, ebx, ecx, 12, 7, k6) - ASMSubroundI( ecx, edx, ebp, eax, ebx, 4, 6, k6) - ASMSubroundI( ebx, ecx, edx, ebp, eax, 9, 15, k6) - ASMSubroundI( eax, ebx, ecx, edx, ebp, 1, 13, k6) - ASMSubroundI( ebp, eax, ebx, ecx, edx, 2, 11, k6) - - ASMSubroundH( edx, ebp, eax, ebx, ecx, 15, 9, k7) - ASMSubroundH( ecx, edx, ebp, eax, ebx, 5, 7, k7) - ASMSubroundH( ebx, ecx, edx, ebp, eax, 1, 15, k7) - ASMSubroundH( eax, ebx, ecx, edx, ebp, 3, 11, k7) - ASMSubroundH( ebp, eax, ebx, ecx, edx, 7, 8, k7) - ASMSubroundH( edx, ebp, eax, ebx, ecx, 14, 6, k7) - ASMSubroundH( ecx, edx, ebp, eax, ebx, 6, 6, k7) - ASMSubroundH( ebx, ecx, edx, ebp, eax, 9, 14, k7) - ASMSubroundH( eax, ebx, ecx, edx, ebp, 11, 12, k7) - ASMSubroundH( ebp, eax, ebx, ecx, edx, 8, 13, k7) - ASMSubroundH( edx, ebp, eax, ebx, ecx, 12, 5, k7) - ASMSubroundH( ecx, edx, ebp, eax, ebx, 2, 14, k7) - ASMSubroundH( ebx, ecx, edx, ebp, eax, 10, 13, k7) - ASMSubroundH( eax, ebx, ecx, edx, ebp, 0, 13, k7) - ASMSubroundH( ebp, eax, ebx, ecx, edx, 4, 7, k7) - ASMSubroundH( edx, ebp, eax, ebx, ecx, 13, 5, k7) - - ASMSubroundG( ecx, edx, ebp, eax, ebx, 8, 15, k8) - ASMSubroundG( ebx, ecx, edx, ebp, eax, 6, 5, k8) - ASMSubroundG( eax, ebx, ecx, edx, ebp, 4, 8, k8) - ASMSubroundG( ebp, eax, ebx, ecx, edx, 1, 11, k8) - ASMSubroundG( edx, ebp, eax, ebx, ecx, 3, 14, k8) - ASMSubroundG( ecx, edx, ebp, eax, ebx, 11, 14, k8) - ASMSubroundG( ebx, ecx, edx, ebp, eax, 15, 6, k8) - ASMSubroundG( eax, ebx, ecx, edx, ebp, 0, 14, k8) - ASMSubroundG( ebp, eax, ebx, ecx, edx, 5, 6, k8) - ASMSubroundG( edx, ebp, eax, ebx, ecx, 12, 9, k8) - ASMSubroundG( ecx, edx, ebp, eax, ebx, 2, 12, k8) - ASMSubroundG( ebx, ecx, edx, ebp, eax, 13, 9, k8) - ASMSubroundG( eax, ebx, ecx, edx, ebp, 9, 12, k8) - ASMSubroundG( ebp, eax, ebx, ecx, edx, 7, 5, k8) - ASMSubroundG( edx, ebp, eax, ebx, ecx, 10, 15, k8) - ASMSubroundG( ecx, edx, ebp, eax, ebx, 14, 8, k8) - - ASMSubroundF( ebx, ecx, edx, ebp, eax, 12, 8) - ASMSubroundF( eax, ebx, ecx, edx, ebp, 15, 5) - ASMSubroundF( ebp, eax, ebx, ecx, edx, 10, 12) - ASMSubroundF( edx, ebp, eax, ebx, ecx, 4, 9) - ASMSubroundF( ecx, edx, ebp, eax, ebx, 1, 12) - ASMSubroundF( ebx, ecx, edx, ebp, eax, 5, 5) - ASMSubroundF( eax, ebx, ecx, edx, ebp, 8, 14) - ASMSubroundF( ebp, eax, ebx, ecx, edx, 7, 6) - ASMSubroundF( edx, ebp, eax, ebx, ecx, 6, 8) - ASMSubroundF( ecx, edx, ebp, eax, ebx, 2, 13) - ASMSubroundF( ebx, ecx, edx, ebp, eax, 13, 6) - ASMSubroundF( eax, ebx, ecx, edx, ebp, 14, 5) - ASMSubroundF( ebp, eax, ebx, ecx, edx, 0, 15) - ASMSubroundF( edx, ebp, eax, ebx, ecx, 3, 13) - ASMSubroundF( ecx, edx, ebp, eax, ebx, 9, 11) - ASMSubroundF( ebx, ecx, edx, ebp, eax, 11, 11) - - // advance data and store for next round - AS2( add edi, 64 ) - AS2( movd esi, mm1 ) // digest_ - AS2( movd mm0, edi ) // store - - // now edi as tmp - - // c1 = digest_[1] + c1 + d2; - AS2( add [esp + 8], edx ) // + d2 - AS2( mov edi, [esi + 4] ) // digest_[1] - AS2( add [esp + 8], edi ) - - // digest_[1] = digest_[2] + d1 + e2; - AS2( mov [esi + 4], ebp ) // e2 - AS2( mov edi, [esp + 12] ) // d1 - AS2( add edi, [esi + 8] ) // digest_[2] - AS2( add [esi + 4], edi ) - - // digest_[2] = digest_[3] + e1 + a2; - AS2( mov [esi + 8], eax ) // a2 - AS2( mov edi, [esp + 16] ) // e1 - AS2( add edi, [esi + 12] ) // digest_[3] - AS2( add [esi + 8], edi ) - - // digest_[3] = digest_[4] + a1 + b2; - AS2( mov [esi + 12], ebx ) // b2 - AS2( mov edi, [esp] ) // a1 - AS2( add edi, [esi + 16] ) // digest_[4] - AS2( add [esi + 12], edi ) - - // digest_[4] = digest_[0] + b1 + c2; - AS2( mov [esi + 16], ecx ) // c2 - AS2( mov edi, [esp + 4] ) // b1 - AS2( add edi, [esi] ) // digest_[0] - AS2( add [esi + 16], edi ) - - // digest_[0] = c1; - AS2( mov edi, [esp + 8] ) // c1 - AS2( mov [esi], edi ) - - // setup for loop back - AS2( movd edx, mm2 ) // times - AS2( movd edi, mm0 ) // data, already advanced - AS1( dec edx ) - AS1( jnz loopStart ) - - - EPILOG() -} - - -#endif // DO_RIPEMD_ASM - - -} // namespace TaoCrypt diff --git a/externals/mysql/extlib/yassl/taocrypt/src/rsa.cpp b/externals/mysql/extlib/yassl/taocrypt/src/rsa.cpp deleted file mode 100644 index 57d19a59c7..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/rsa.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's rsa.cpp from CryptoPP */ - -#include "runtime.hpp" -#include "rsa.hpp" -#include "asn.hpp" -#include "modarith.hpp" - - - -namespace TaoCrypt { - - -Integer RSA_PublicKey::ApplyFunction(const Integer& x) const -{ - return a_exp_b_mod_c(x, e_, n_); -} - - -RSA_PublicKey::RSA_PublicKey(Source& source) -{ - Initialize(source); -} - - -void RSA_PublicKey::Initialize(Source& source) -{ - RSA_Public_Decoder decoder(source); - decoder.Decode(*this); -} - - -Integer RSA_PrivateKey::CalculateInverse(RandomNumberGenerator& rng, - const Integer& x) const -{ - ModularArithmetic modn(n_); - - Integer r(rng, Integer::One(), n_ - Integer::One()); - Integer re = modn.Exponentiate(r, e_); - re = modn.Multiply(re, x); // blind - - // here we follow the notation of PKCS #1 and let u=q inverse mod p - // but in ModRoot, u=p inverse mod q, so we reverse the order of p and q - - Integer y = ModularRoot(re, dq_, dp_, q_, p_, u_); - y = modn.Divide(y, r); // unblind - assert(modn.Exponentiate(y, e_) == x); // check - - return y; -} - - -RSA_PrivateKey::RSA_PrivateKey(Source& source) -{ - Initialize(source); -} - - -void RSA_PrivateKey::Initialize(Source& source) -{ - RSA_Private_Decoder decoder(source); - decoder.Decode(*this); -} - - -void RSA_BlockType2::Pad(const byte *input, word32 inputLen, byte *pkcsBlock, - word32 pkcsBlockLen, RandomNumberGenerator& rng) const -{ - // convert from bit length to byte length - if (pkcsBlockLen % 8 != 0) - { - pkcsBlock[0] = 0; - pkcsBlock++; - } - pkcsBlockLen /= 8; - - pkcsBlock[0] = 2; // block type 2 - - // pad with non-zero random bytes - word32 padLen = pkcsBlockLen - inputLen - 1; - rng.GenerateBlock(&pkcsBlock[1], padLen); - for (word32 i = 1; i < padLen; i++) - if (pkcsBlock[i] == 0) pkcsBlock[i] = 0x01; - - pkcsBlock[pkcsBlockLen-inputLen-1] = 0; // separator - memcpy(pkcsBlock+pkcsBlockLen-inputLen, input, inputLen); -} - -word32 RSA_BlockType2::UnPad(const byte *pkcsBlock, unsigned int pkcsBlockLen, - byte *output) const -{ - bool invalid = false; - unsigned int maxOutputLen = SaturatingSubtract(pkcsBlockLen / 8, 10U); - - // convert from bit length to byte length - if (pkcsBlockLen % 8 != 0) - { - invalid = (pkcsBlock[0] != 0) || invalid; - pkcsBlock++; - } - pkcsBlockLen /= 8; - - // Require block type 2. - invalid = (pkcsBlock[0] != 2) || invalid; - - // skip past the padding until we find the separator - unsigned i=1; - while (i maxOutputLen) || invalid; - - if (invalid) - return 0; - - memcpy (output, pkcsBlock+i, outputLen); - return outputLen; -} - - -void RSA_BlockType1::Pad(const byte* input, word32 inputLen, byte* pkcsBlock, - word32 pkcsBlockLen, RandomNumberGenerator&) const -{ - // convert from bit length to byte length - if (pkcsBlockLen % 8 != 0) - { - pkcsBlock[0] = 0; - pkcsBlock++; - } - pkcsBlockLen /= 8; - - pkcsBlock[0] = 1; // block type 1 for SSL - - // pad with 0xff bytes - memset(&pkcsBlock[1], 0xFF, pkcsBlockLen - inputLen - 2); - - pkcsBlock[pkcsBlockLen-inputLen-1] = 0; // separator - memcpy(pkcsBlock+pkcsBlockLen-inputLen, input, inputLen); -} - - -word32 RSA_BlockType1::UnPad(const byte* pkcsBlock, word32 pkcsBlockLen, - byte* output) const -{ - bool invalid = false; - unsigned int maxOutputLen = SaturatingSubtract(pkcsBlockLen / 8, 10U); - - // convert from bit length to byte length - if (pkcsBlockLen % 8 != 0) - { - invalid = (pkcsBlock[0] != 0) || invalid; - pkcsBlock++; - } - pkcsBlockLen /= 8; - - // Require block type 1 for SSL. - invalid = (pkcsBlock[0] != 1) || invalid; - - // skip past the padding until we find the separator - unsigned i=1; - while (i maxOutputLen) || invalid; - - if (invalid) - return 0; - - memcpy(output, pkcsBlock+i, outputLen); - return outputLen; -} - - -word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain) -{ - PK_Lengths lengths(key.GetModulus()); - - ByteBlock paddedBlock(BitsToBytes(lengths.PaddedBlockBitLength())); - Integer x = key.ApplyFunction(Integer(sig, - lengths.FixedCiphertextLength())); - if (x.ByteCount() > paddedBlock.size()) - x = Integer::Zero(); - x.Encode(paddedBlock.get_buffer(), paddedBlock.size()); - return RSA_BlockType1().UnPad(paddedBlock.get_buffer(), - lengths.PaddedBlockBitLength(), plain); -} - - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/sha.cpp b/externals/mysql/extlib/yassl/taocrypt/src/sha.cpp deleted file mode 100644 index ef165a342a..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/sha.cpp +++ /dev/null @@ -1,1023 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's sha.cpp from CryptoPP */ - -#include "runtime.hpp" -#include -#include "sha.hpp" -#ifdef USE_SYS_STL - #include -#else - #include "algorithm.hpp" -#endif - - -namespace STL = STL_NAMESPACE; - - - -namespace TaoCrypt { - -#define blk0(i) (W[i] = buffer_[i]) -#define blk1(i) (W[i&15] = \ - rotlFixed(W[(i+13)&15]^W[(i+8)&15]^W[(i+2)&15]^W[i&15],1)) - -#define f1(x,y,z) (z^(x &(y^z))) -#define f2(x,y,z) (x^y^z) -#define f3(x,y,z) ((x&y)|(z&(x|y))) -#define f4(x,y,z) (x^y^z) - -// (R0+R1), R2, R3, R4 are the different operations used in SHA1 -#define R0(v,w,x,y,z,i) z+= f1(w,x,y) + blk0(i) + 0x5A827999+ \ - rotlFixed(v,5); w = rotlFixed(w,30); -#define R1(v,w,x,y,z,i) z+= f1(w,x,y) + blk1(i) + 0x5A827999+ \ - rotlFixed(v,5); w = rotlFixed(w,30); -#define R2(v,w,x,y,z,i) z+= f2(w,x,y) + blk1(i) + 0x6ED9EBA1+ \ - rotlFixed(v,5); w = rotlFixed(w,30); -#define R3(v,w,x,y,z,i) z+= f3(w,x,y) + blk1(i) + 0x8F1BBCDC+ \ - rotlFixed(v,5); w = rotlFixed(w,30); -#define R4(v,w,x,y,z,i) z+= f4(w,x,y) + blk1(i) + 0xCA62C1D6+ \ - rotlFixed(v,5); w = rotlFixed(w,30); - - -void SHA::Init() -{ - digest_[0] = 0x67452301L; - digest_[1] = 0xEFCDAB89L; - digest_[2] = 0x98BADCFEL; - digest_[3] = 0x10325476L; - digest_[4] = 0xC3D2E1F0L; - - buffLen_ = 0; - loLen_ = 0; - hiLen_ = 0; -} - -void SHA256::Init() -{ - digest_[0] = 0x6A09E667L; - digest_[1] = 0xBB67AE85L; - digest_[2] = 0x3C6EF372L; - digest_[3] = 0xA54FF53AL; - digest_[4] = 0x510E527FL; - digest_[5] = 0x9B05688CL; - digest_[6] = 0x1F83D9ABL; - digest_[7] = 0x5BE0CD19L; - - buffLen_ = 0; - loLen_ = 0; - hiLen_ = 0; -} - - -void SHA224::Init() -{ - digest_[0] = 0xc1059ed8; - digest_[1] = 0x367cd507; - digest_[2] = 0x3070dd17; - digest_[3] = 0xf70e5939; - digest_[4] = 0xffc00b31; - digest_[5] = 0x68581511; - digest_[6] = 0x64f98fa7; - digest_[7] = 0xbefa4fa4; - - buffLen_ = 0; - loLen_ = 0; - hiLen_ = 0; -} - - -#ifdef WORD64_AVAILABLE - -void SHA512::Init() -{ - digest_[0] = W64LIT(0x6a09e667f3bcc908); - digest_[1] = W64LIT(0xbb67ae8584caa73b); - digest_[2] = W64LIT(0x3c6ef372fe94f82b); - digest_[3] = W64LIT(0xa54ff53a5f1d36f1); - digest_[4] = W64LIT(0x510e527fade682d1); - digest_[5] = W64LIT(0x9b05688c2b3e6c1f); - digest_[6] = W64LIT(0x1f83d9abfb41bd6b); - digest_[7] = W64LIT(0x5be0cd19137e2179); - - buffLen_ = 0; - loLen_ = 0; - hiLen_ = 0; -} - - -void SHA384::Init() -{ - digest_[0] = W64LIT(0xcbbb9d5dc1059ed8); - digest_[1] = W64LIT(0x629a292a367cd507); - digest_[2] = W64LIT(0x9159015a3070dd17); - digest_[3] = W64LIT(0x152fecd8f70e5939); - digest_[4] = W64LIT(0x67332667ffc00b31); - digest_[5] = W64LIT(0x8eb44a8768581511); - digest_[6] = W64LIT(0xdb0c2e0d64f98fa7); - digest_[7] = W64LIT(0x47b5481dbefa4fa4); - - buffLen_ = 0; - loLen_ = 0; - hiLen_ = 0; -} - -#endif // WORD64_AVAILABLE - - -SHA::SHA(const SHA& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32), - BLOCK_SIZE) -{ - buffLen_ = that.buffLen_; - loLen_ = that.loLen_; - hiLen_ = that.hiLen_; - - memcpy(digest_, that.digest_, DIGEST_SIZE); - memcpy(buffer_, that.buffer_, BLOCK_SIZE); -} - - -SHA256::SHA256(const SHA256& that) : HASHwithTransform(DIGEST_SIZE / - sizeof(word32), BLOCK_SIZE) -{ - buffLen_ = that.buffLen_; - loLen_ = that.loLen_; - hiLen_ = that.hiLen_; - - memcpy(digest_, that.digest_, DIGEST_SIZE); - memcpy(buffer_, that.buffer_, BLOCK_SIZE); -} - - -SHA224::SHA224(const SHA224& that) : HASHwithTransform(SHA256::DIGEST_SIZE / - sizeof(word32), BLOCK_SIZE) -{ - buffLen_ = that.buffLen_; - loLen_ = that.loLen_; - hiLen_ = that.hiLen_; - - memcpy(digest_, that.digest_, DIGEST_SIZE); - memcpy(buffer_, that.buffer_, BLOCK_SIZE); -} - - -#ifdef WORD64_AVAILABLE - -SHA512::SHA512(const SHA512& that) : HASH64withTransform(DIGEST_SIZE / - sizeof(word64), BLOCK_SIZE) -{ - buffLen_ = that.buffLen_; - loLen_ = that.loLen_; - hiLen_ = that.hiLen_; - - memcpy(digest_, that.digest_, DIGEST_SIZE); - memcpy(buffer_, that.buffer_, BLOCK_SIZE); -} - - -SHA384::SHA384(const SHA384& that) : HASH64withTransform(SHA512::DIGEST_SIZE / - sizeof(word64), BLOCK_SIZE) -{ - buffLen_ = that.buffLen_; - loLen_ = that.loLen_; - hiLen_ = that.hiLen_; - - memcpy(digest_, that.digest_, DIGEST_SIZE); - memcpy(buffer_, that.buffer_, BLOCK_SIZE); -} - -#endif // WORD64_AVAILABLE - - -SHA& SHA::operator= (const SHA& that) -{ - SHA tmp(that); - Swap(tmp); - - return *this; -} - - -SHA256& SHA256::operator= (const SHA256& that) -{ - SHA256 tmp(that); - Swap(tmp); - - return *this; -} - - -SHA224& SHA224::operator= (const SHA224& that) -{ - SHA224 tmp(that); - Swap(tmp); - - return *this; -} - - -#ifdef WORD64_AVAILABLE - -SHA512& SHA512::operator= (const SHA512& that) -{ - SHA512 tmp(that); - Swap(tmp); - - return *this; -} - - -SHA384& SHA384::operator= (const SHA384& that) -{ - SHA384 tmp(that); - Swap(tmp); - - return *this; -} - -#endif // WORD64_AVAILABLE - - -void SHA::Swap(SHA& other) -{ - STL::swap(loLen_, other.loLen_); - STL::swap(hiLen_, other.hiLen_); - STL::swap(buffLen_, other.buffLen_); - - memcpy(digest_, other.digest_, DIGEST_SIZE); - memcpy(buffer_, other.buffer_, BLOCK_SIZE); -} - - -void SHA256::Swap(SHA256& other) -{ - STL::swap(loLen_, other.loLen_); - STL::swap(hiLen_, other.hiLen_); - STL::swap(buffLen_, other.buffLen_); - - memcpy(digest_, other.digest_, DIGEST_SIZE); - memcpy(buffer_, other.buffer_, BLOCK_SIZE); -} - - -void SHA224::Swap(SHA224& other) -{ - STL::swap(loLen_, other.loLen_); - STL::swap(hiLen_, other.hiLen_); - STL::swap(buffLen_, other.buffLen_); - - memcpy(digest_, other.digest_, DIGEST_SIZE); - memcpy(buffer_, other.buffer_, BLOCK_SIZE); -} - - -#ifdef WORD64_AVAILABLE - -void SHA512::Swap(SHA512& other) -{ - STL::swap(loLen_, other.loLen_); - STL::swap(hiLen_, other.hiLen_); - STL::swap(buffLen_, other.buffLen_); - - memcpy(digest_, other.digest_, DIGEST_SIZE); - memcpy(buffer_, other.buffer_, BLOCK_SIZE); -} - - -void SHA384::Swap(SHA384& other) -{ - STL::swap(loLen_, other.loLen_); - STL::swap(hiLen_, other.hiLen_); - STL::swap(buffLen_, other.buffLen_); - - memcpy(digest_, other.digest_, DIGEST_SIZE); - memcpy(buffer_, other.buffer_, BLOCK_SIZE); -} - -#endif // WORD64_AVIALABLE - - -#ifdef DO_SHA_ASM - -// Update digest with data of size len -void SHA::Update(const byte* data, word32 len) -{ - if (!isMMX) { - HASHwithTransform::Update(data, len); - return; - } - - byte* local = reinterpret_cast(buffer_); - - // remove buffered data if possible - if (buffLen_) { - word32 add = min(len, BLOCK_SIZE - buffLen_); - memcpy(&local[buffLen_], data, add); - - buffLen_ += add; - data += add; - len -= add; - - if (buffLen_ == BLOCK_SIZE) { - ByteReverse(local, local, BLOCK_SIZE); - Transform(); - AddLength(BLOCK_SIZE); - buffLen_ = 0; - } - } - - // all at once for asm - if (buffLen_ == 0) { - word32 times = len / BLOCK_SIZE; - if (times) { - AsmTransform(data, times); - const word32 add = BLOCK_SIZE * times; - AddLength(add); - len -= add; - data += add; - } - } - - // cache any data left - if (len) { - memcpy(&local[buffLen_], data, len); - buffLen_ += len; - } -} - -#endif // DO_SHA_ASM - - -void SHA::Transform() -{ - word32 W[BLOCK_SIZE / sizeof(word32)]; - - // Copy context->state[] to working vars - word32 a = digest_[0]; - word32 b = digest_[1]; - word32 c = digest_[2]; - word32 d = digest_[3]; - word32 e = digest_[4]; - - // 4 rounds of 20 operations each. Loop unrolled. - R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); - R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); - R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); - R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); - - R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); - - R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); - R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); - R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); - R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); - R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); - - R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); - R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); - R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); - R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); - R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); - - R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); - R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); - R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); - R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); - R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); - - // Add the working vars back into digest state[] - digest_[0] += a; - digest_[1] += b; - digest_[2] += c; - digest_[3] += d; - digest_[4] += e; - - // Wipe variables - a = b = c = d = e = 0; - memset(W, 0, sizeof(W)); -} - - -#define blk2(i) (W[i&15]+=s1(W[(i-2)&15])+W[(i-7)&15]+s0(W[(i-15)&15])) - -#define Ch(x,y,z) (z^(x&(y^z))) -#define Maj(x,y,z) ((x&y)|(z&(x|y))) - -#define a(i) T[(0-i)&7] -#define b(i) T[(1-i)&7] -#define c(i) T[(2-i)&7] -#define d(i) T[(3-i)&7] -#define e(i) T[(4-i)&7] -#define f(i) T[(5-i)&7] -#define g(i) T[(6-i)&7] -#define h(i) T[(7-i)&7] - -#define R(i) h(i)+=S1(e(i))+Ch(e(i),f(i),g(i))+K[i+j]+(j?blk2(i):blk0(i));\ - d(i)+=h(i);h(i)+=S0(a(i))+Maj(a(i),b(i),c(i)) - -// for SHA256 -#define S0(x) (rotrFixed(x,2)^rotrFixed(x,13)^rotrFixed(x,22)) -#define S1(x) (rotrFixed(x,6)^rotrFixed(x,11)^rotrFixed(x,25)) -#define s0(x) (rotrFixed(x,7)^rotrFixed(x,18)^(x>>3)) -#define s1(x) (rotrFixed(x,17)^rotrFixed(x,19)^(x>>10)) - - -static const word32 K256[64] = { - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -}; - - -static void Transform256(word32* digest_, word32* buffer_) -{ - const word32* K = K256; - - word32 W[16]; - word32 T[8]; - - // Copy digest to working vars - memcpy(T, digest_, sizeof(T)); - - // 64 operations, partially loop unrolled - for (unsigned int j = 0; j < 64; j += 16) { - R( 0); R( 1); R( 2); R( 3); - R( 4); R( 5); R( 6); R( 7); - R( 8); R( 9); R(10); R(11); - R(12); R(13); R(14); R(15); - } - - // Add the working vars back into digest - digest_[0] += a(0); - digest_[1] += b(0); - digest_[2] += c(0); - digest_[3] += d(0); - digest_[4] += e(0); - digest_[5] += f(0); - digest_[6] += g(0); - digest_[7] += h(0); - - // Wipe variables - memset(W, 0, sizeof(W)); - memset(T, 0, sizeof(T)); -} - - -// undef for 256 -#undef S0 -#undef S1 -#undef s0 -#undef s1 - - -void SHA256::Transform() -{ - Transform256(digest_, buffer_); -} - - -void SHA224::Transform() -{ - Transform256(digest_, buffer_); -} - - -#ifdef WORD64_AVAILABLE - -static const word64 K512[80] = { - W64LIT(0x428a2f98d728ae22), W64LIT(0x7137449123ef65cd), - W64LIT(0xb5c0fbcfec4d3b2f), W64LIT(0xe9b5dba58189dbbc), - W64LIT(0x3956c25bf348b538), W64LIT(0x59f111f1b605d019), - W64LIT(0x923f82a4af194f9b), W64LIT(0xab1c5ed5da6d8118), - W64LIT(0xd807aa98a3030242), W64LIT(0x12835b0145706fbe), - W64LIT(0x243185be4ee4b28c), W64LIT(0x550c7dc3d5ffb4e2), - W64LIT(0x72be5d74f27b896f), W64LIT(0x80deb1fe3b1696b1), - W64LIT(0x9bdc06a725c71235), W64LIT(0xc19bf174cf692694), - W64LIT(0xe49b69c19ef14ad2), W64LIT(0xefbe4786384f25e3), - W64LIT(0x0fc19dc68b8cd5b5), W64LIT(0x240ca1cc77ac9c65), - W64LIT(0x2de92c6f592b0275), W64LIT(0x4a7484aa6ea6e483), - W64LIT(0x5cb0a9dcbd41fbd4), W64LIT(0x76f988da831153b5), - W64LIT(0x983e5152ee66dfab), W64LIT(0xa831c66d2db43210), - W64LIT(0xb00327c898fb213f), W64LIT(0xbf597fc7beef0ee4), - W64LIT(0xc6e00bf33da88fc2), W64LIT(0xd5a79147930aa725), - W64LIT(0x06ca6351e003826f), W64LIT(0x142929670a0e6e70), - W64LIT(0x27b70a8546d22ffc), W64LIT(0x2e1b21385c26c926), - W64LIT(0x4d2c6dfc5ac42aed), W64LIT(0x53380d139d95b3df), - W64LIT(0x650a73548baf63de), W64LIT(0x766a0abb3c77b2a8), - W64LIT(0x81c2c92e47edaee6), W64LIT(0x92722c851482353b), - W64LIT(0xa2bfe8a14cf10364), W64LIT(0xa81a664bbc423001), - W64LIT(0xc24b8b70d0f89791), W64LIT(0xc76c51a30654be30), - W64LIT(0xd192e819d6ef5218), W64LIT(0xd69906245565a910), - W64LIT(0xf40e35855771202a), W64LIT(0x106aa07032bbd1b8), - W64LIT(0x19a4c116b8d2d0c8), W64LIT(0x1e376c085141ab53), - W64LIT(0x2748774cdf8eeb99), W64LIT(0x34b0bcb5e19b48a8), - W64LIT(0x391c0cb3c5c95a63), W64LIT(0x4ed8aa4ae3418acb), - W64LIT(0x5b9cca4f7763e373), W64LIT(0x682e6ff3d6b2b8a3), - W64LIT(0x748f82ee5defb2fc), W64LIT(0x78a5636f43172f60), - W64LIT(0x84c87814a1f0ab72), W64LIT(0x8cc702081a6439ec), - W64LIT(0x90befffa23631e28), W64LIT(0xa4506cebde82bde9), - W64LIT(0xbef9a3f7b2c67915), W64LIT(0xc67178f2e372532b), - W64LIT(0xca273eceea26619c), W64LIT(0xd186b8c721c0c207), - W64LIT(0xeada7dd6cde0eb1e), W64LIT(0xf57d4f7fee6ed178), - W64LIT(0x06f067aa72176fba), W64LIT(0x0a637dc5a2c898a6), - W64LIT(0x113f9804bef90dae), W64LIT(0x1b710b35131c471b), - W64LIT(0x28db77f523047d84), W64LIT(0x32caab7b40c72493), - W64LIT(0x3c9ebe0a15c9bebc), W64LIT(0x431d67c49c100d4c), - W64LIT(0x4cc5d4becb3e42b6), W64LIT(0x597f299cfc657e2a), - W64LIT(0x5fcb6fab3ad6faec), W64LIT(0x6c44198c4a475817) -}; - - -// for SHA512 -#define S0(x) (rotrFixed(x,28)^rotrFixed(x,34)^rotrFixed(x,39)) -#define S1(x) (rotrFixed(x,14)^rotrFixed(x,18)^rotrFixed(x,41)) -#define s0(x) (rotrFixed(x,1)^rotrFixed(x,8)^(x>>7)) -#define s1(x) (rotrFixed(x,19)^rotrFixed(x,61)^(x>>6)) - - -static void Transform512(word64* digest_, word64* buffer_) -{ - const word64* K = K512; - - word64 W[16]; - word64 T[8]; - - // Copy digest to working vars - memcpy(T, digest_, sizeof(T)); - - // 64 operations, partially loop unrolled - for (unsigned int j = 0; j < 80; j += 16) { - R( 0); R( 1); R( 2); R( 3); - R( 4); R( 5); R( 6); R( 7); - R( 8); R( 9); R(10); R(11); - R(12); R(13); R(14); R(15); - } - - // Add the working vars back into digest - - digest_[0] += a(0); - digest_[1] += b(0); - digest_[2] += c(0); - digest_[3] += d(0); - digest_[4] += e(0); - digest_[5] += f(0); - digest_[6] += g(0); - digest_[7] += h(0); - - // Wipe variables - memset(W, 0, sizeof(W)); - memset(T, 0, sizeof(T)); -} - - -void SHA512::Transform() -{ - Transform512(digest_, buffer_); -} - - -void SHA384::Transform() -{ - Transform512(digest_, buffer_); -} - -#endif // WORD64_AVIALABLE - - -#ifdef DO_SHA_ASM - -// f1(x,y,z) (z^(x &(y^z))) -// place in esi -#define ASMf1(x,y,z) \ - AS2( mov esi, y ) \ - AS2( xor esi, z ) \ - AS2( and esi, x ) \ - AS2( xor esi, z ) - - -// R0(v,w,x,y,z,i) = -// z+= f1(w,x,y) + W[i] + 0x5A827999 + rotlFixed(v,5); -// w = rotlFixed(w,30); - -// use esi for f -// use edi as tmp - - -#define ASMR0(v,w,x,y,z,i) \ - AS2( mov esi, x ) \ - AS2( mov edi, [esp + i * 4] ) \ - AS2( xor esi, y ) \ - AS2( and esi, w ) \ - AS2( lea z, [edi + z + 0x5A827999] ) \ - AS2( mov edi, v ) \ - AS2( xor esi, y ) \ - AS2( rol edi, 5 ) \ - AS2( add z, esi ) \ - AS2( rol w, 30 ) \ - AS2( add z, edi ) - - -/* Some macro stuff, but older gas ( < 2,16 ) can't process &, so do by hand - % won't work on gas at all - -#define xstr(s) str(s) -#define str(s) #s - -#define WOFF1(a) ( a & 15) -#define WOFF2(a) ((a + 2) & 15) -#define WOFF3(a) ((a + 8) & 15) -#define WOFF4(a) ((a + 13) & 15) - -#ifdef __GNUC__ - #define WGET1(i) asm("mov esp, [edi - "xstr(WOFF1(i))" * 4] "); - #define WGET2(i) asm("xor esp, [edi - "xstr(WOFF2(i))" * 4] "); - #define WGET3(i) asm("xor esp, [edi - "xstr(WOFF3(i))" * 4] "); - #define WGET4(i) asm("xor esp, [edi - "xstr(WOFF4(i))" * 4] "); - #define WPUT1(i) asm("mov [edi - "xstr(WOFF1(i))" * 4], esp "); -#else - #define WGET1(i) AS2( mov esp, [edi - WOFF1(i) * 4] ) - #define WGET2(i) AS2( xor esp, [edi - WOFF2(i) * 4] ) - #define WGET3(i) AS2( xor esp, [edi - WOFF3(i) * 4] ) - #define WGET4(i) AS2( xor esp, [edi - WOFF4(i) * 4] ) - #define WPUT1(i) AS2( mov [edi - WOFF1(i) * 4], esp ) -#endif -*/ - -// ASMR1 = ASMR0 but use esp for W calcs - -#define ASMR1(v,w,x,y,z,i,W1,W2,W3,W4) \ - AS2( mov edi, [esp + W1 * 4] ) \ - AS2( mov esi, x ) \ - AS2( xor edi, [esp + W2 * 4] ) \ - AS2( xor esi, y ) \ - AS2( xor edi, [esp + W3 * 4] ) \ - AS2( and esi, w ) \ - AS2( xor edi, [esp + W4 * 4] ) \ - AS2( rol edi, 1 ) \ - AS2( xor esi, y ) \ - AS2( mov [esp + W1 * 4], edi ) \ - AS2( lea z, [edi + z + 0x5A827999] ) \ - AS2( mov edi, v ) \ - AS2( rol edi, 5 ) \ - AS2( add z, esi ) \ - AS2( rol w, 30 ) \ - AS2( add z, edi ) - - -// ASMR2 = ASMR1 but f is xor, xor instead - -#define ASMR2(v,w,x,y,z,i,W1,W2,W3,W4) \ - AS2( mov edi, [esp + W1 * 4] ) \ - AS2( mov esi, x ) \ - AS2( xor edi, [esp + W2 * 4] ) \ - AS2( xor esi, y ) \ - AS2( xor edi, [esp + W3 * 4] ) \ - AS2( xor esi, w ) \ - AS2( xor edi, [esp + W4 * 4] ) \ - AS2( rol edi, 1 ) \ - AS2( add z, esi ) \ - AS2( mov [esp + W1 * 4], edi ) \ - AS2( lea z, [edi + z + 0x6ED9EBA1] ) \ - AS2( mov edi, v ) \ - AS2( rol edi, 5 ) \ - AS2( rol w, 30 ) \ - AS2( add z, edi ) - - -// ASMR3 = ASMR2 but f is (x&y)|(z&(x|y)) -// which is (w&x)|(y&(w|x)) - -#define ASMR3(v,w,x,y,z,i,W1,W2,W3,W4) \ - AS2( mov edi, [esp + W1 * 4] ) \ - AS2( mov esi, x ) \ - AS2( xor edi, [esp + W2 * 4] ) \ - AS2( or esi, w ) \ - AS2( xor edi, [esp + W3 * 4] ) \ - AS2( and esi, y ) \ - AS2( xor edi, [esp + W4 * 4] ) \ - AS2( movd mm0, esi ) \ - AS2( rol edi, 1 ) \ - AS2( mov esi, x ) \ - AS2( mov [esp + W1 * 4], edi ) \ - AS2( and esi, w ) \ - AS2( lea z, [edi + z + 0x8F1BBCDC] ) \ - AS2( movd edi, mm0 ) \ - AS2( or esi, edi ) \ - AS2( mov edi, v ) \ - AS2( rol edi, 5 ) \ - AS2( add z, esi ) \ - AS2( rol w, 30 ) \ - AS2( add z, edi ) - - -// ASMR4 = ASMR2 but different constant - -#define ASMR4(v,w,x,y,z,i,W1,W2,W3,W4) \ - AS2( mov edi, [esp + W1 * 4] ) \ - AS2( mov esi, x ) \ - AS2( xor edi, [esp + W2 * 4] ) \ - AS2( xor esi, y ) \ - AS2( xor edi, [esp + W3 * 4] ) \ - AS2( xor esi, w ) \ - AS2( xor edi, [esp + W4 * 4] ) \ - AS2( rol edi, 1 ) \ - AS2( add z, esi ) \ - AS2( mov [esp + W1 * 4], edi ) \ - AS2( lea z, [edi + z + 0xCA62C1D6] ) \ - AS2( mov edi, v ) \ - AS2( rol edi, 5 ) \ - AS2( rol w, 30 ) \ - AS2( add z, edi ) - - -#ifdef _MSC_VER - __declspec(naked) -#endif -void SHA::AsmTransform(const byte* data, word32 times) -{ -#ifdef __GNUC__ - #define AS1(x) asm(#x); - #define AS2(x, y) asm(#x ", " #y); - - #define PROLOG() \ - asm(".intel_syntax noprefix"); \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov ecx, DWORD PTR [ebp + 8] ) \ - AS2( mov edi, DWORD PTR [ebp + 12] ) \ - AS2( mov eax, DWORD PTR [ebp + 16] ) - - #define EPILOG() \ - AS2( movd ebp, mm6 ) \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( mov esp, ebp ) \ - AS2( movd edi, mm3 ) \ - AS1( emms ) \ - asm(".att_syntax"); -#else - #define AS1(x) __asm x - #define AS2(x, y) __asm x, y - - #define PROLOG() \ - AS1( push ebp ) \ - AS2( mov ebp, esp ) \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov edi, data ) \ - AS2( mov eax, times ) - - #define EPILOG() \ - AS2( movd ebp, mm6 ) \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS2( mov esp, ebp ) \ - AS1( pop ebp ) \ - AS1( emms ) \ - AS1( ret 8 ) -#endif - - PROLOG() - - AS2( mov esi, ecx ) - - #ifdef OLD_GCC_OFFSET - AS2( add esi, 20 ) // digest_[0] - #else - AS2( add esi, 16 ) // digest_[0] - #endif - - AS2( movd mm2, eax ) // store times_ - AS2( movd mm1, esi ) // store digest_ - - AS2( sub esp, 68 ) // make room on stack - -AS1( loopStart: ) - - // byte reverse 16 words of input, 4 at a time, put on stack for W[] - - // part 1 - AS2( mov eax, [edi] ) - AS2( mov ebx, [edi + 4] ) - AS2( mov ecx, [edi + 8] ) - AS2( mov edx, [edi + 12] ) - - AS1( bswap eax ) - AS1( bswap ebx ) - AS1( bswap ecx ) - AS1( bswap edx ) - - AS2( mov [esp], eax ) - AS2( mov [esp + 4], ebx ) - AS2( mov [esp + 8], ecx ) - AS2( mov [esp + 12], edx ) - - // part 2 - AS2( mov eax, [edi + 16] ) - AS2( mov ebx, [edi + 20] ) - AS2( mov ecx, [edi + 24] ) - AS2( mov edx, [edi + 28] ) - - AS1( bswap eax ) - AS1( bswap ebx ) - AS1( bswap ecx ) - AS1( bswap edx ) - - AS2( mov [esp + 16], eax ) - AS2( mov [esp + 20], ebx ) - AS2( mov [esp + 24], ecx ) - AS2( mov [esp + 28], edx ) - - - // part 3 - AS2( mov eax, [edi + 32] ) - AS2( mov ebx, [edi + 36] ) - AS2( mov ecx, [edi + 40] ) - AS2( mov edx, [edi + 44] ) - - AS1( bswap eax ) - AS1( bswap ebx ) - AS1( bswap ecx ) - AS1( bswap edx ) - - AS2( mov [esp + 32], eax ) - AS2( mov [esp + 36], ebx ) - AS2( mov [esp + 40], ecx ) - AS2( mov [esp + 44], edx ) - - - // part 4 - AS2( mov eax, [edi + 48] ) - AS2( mov ebx, [edi + 52] ) - AS2( mov ecx, [edi + 56] ) - AS2( mov edx, [edi + 60] ) - - AS1( bswap eax ) - AS1( bswap ebx ) - AS1( bswap ecx ) - AS1( bswap edx ) - - AS2( mov [esp + 48], eax ) - AS2( mov [esp + 52], ebx ) - AS2( mov [esp + 56], ecx ) - AS2( mov [esp + 60], edx ) - - AS2( mov [esp + 64], edi ) // store edi for end - - // read from digest_ - AS2( mov eax, [esi] ) // a1 - AS2( mov ebx, [esi + 4] ) // b1 - AS2( mov ecx, [esi + 8] ) // c1 - AS2( mov edx, [esi + 12] ) // d1 - AS2( mov ebp, [esi + 16] ) // e1 - - - ASMR0(eax, ebx, ecx, edx, ebp, 0) - ASMR0(ebp, eax, ebx, ecx, edx, 1) - ASMR0(edx, ebp, eax, ebx, ecx, 2) - ASMR0(ecx, edx, ebp, eax, ebx, 3) - ASMR0(ebx, ecx, edx, ebp, eax, 4) - ASMR0(eax, ebx, ecx, edx, ebp, 5) - ASMR0(ebp, eax, ebx, ecx, edx, 6) - ASMR0(edx, ebp, eax, ebx, ecx, 7) - ASMR0(ecx, edx, ebp, eax, ebx, 8) - ASMR0(ebx, ecx, edx, ebp, eax, 9) - ASMR0(eax, ebx, ecx, edx, ebp, 10) - ASMR0(ebp, eax, ebx, ecx, edx, 11) - ASMR0(edx, ebp, eax, ebx, ecx, 12) - ASMR0(ecx, edx, ebp, eax, ebx, 13) - ASMR0(ebx, ecx, edx, ebp, eax, 14) - ASMR0(eax, ebx, ecx, edx, ebp, 15) - - ASMR1(ebp, eax, ebx, ecx, edx, 16, 0, 2, 8, 13) - ASMR1(edx, ebp, eax, ebx, ecx, 17, 1, 3, 9, 14) - ASMR1(ecx, edx, ebp, eax, ebx, 18, 2, 4, 10, 15) - ASMR1(ebx, ecx, edx, ebp, eax, 19, 3, 5, 11, 0) - - ASMR2(eax, ebx, ecx, edx, ebp, 20, 4, 6, 12, 1) - ASMR2(ebp, eax, ebx, ecx, edx, 21, 5, 7, 13, 2) - ASMR2(edx, ebp, eax, ebx, ecx, 22, 6, 8, 14, 3) - ASMR2(ecx, edx, ebp, eax, ebx, 23, 7, 9, 15, 4) - ASMR2(ebx, ecx, edx, ebp, eax, 24, 8, 10, 0, 5) - ASMR2(eax, ebx, ecx, edx, ebp, 25, 9, 11, 1, 6) - ASMR2(ebp, eax, ebx, ecx, edx, 26, 10, 12, 2, 7) - ASMR2(edx, ebp, eax, ebx, ecx, 27, 11, 13, 3, 8) - ASMR2(ecx, edx, ebp, eax, ebx, 28, 12, 14, 4, 9) - ASMR2(ebx, ecx, edx, ebp, eax, 29, 13, 15, 5, 10) - ASMR2(eax, ebx, ecx, edx, ebp, 30, 14, 0, 6, 11) - ASMR2(ebp, eax, ebx, ecx, edx, 31, 15, 1, 7, 12) - ASMR2(edx, ebp, eax, ebx, ecx, 32, 0, 2, 8, 13) - ASMR2(ecx, edx, ebp, eax, ebx, 33, 1, 3, 9, 14) - ASMR2(ebx, ecx, edx, ebp, eax, 34, 2, 4, 10, 15) - ASMR2(eax, ebx, ecx, edx, ebp, 35, 3, 5, 11, 0) - ASMR2(ebp, eax, ebx, ecx, edx, 36, 4, 6, 12, 1) - ASMR2(edx, ebp, eax, ebx, ecx, 37, 5, 7, 13, 2) - ASMR2(ecx, edx, ebp, eax, ebx, 38, 6, 8, 14, 3) - ASMR2(ebx, ecx, edx, ebp, eax, 39, 7, 9, 15, 4) - - - ASMR3(eax, ebx, ecx, edx, ebp, 40, 8, 10, 0, 5) - ASMR3(ebp, eax, ebx, ecx, edx, 41, 9, 11, 1, 6) - ASMR3(edx, ebp, eax, ebx, ecx, 42, 10, 12, 2, 7) - ASMR3(ecx, edx, ebp, eax, ebx, 43, 11, 13, 3, 8) - ASMR3(ebx, ecx, edx, ebp, eax, 44, 12, 14, 4, 9) - ASMR3(eax, ebx, ecx, edx, ebp, 45, 13, 15, 5, 10) - ASMR3(ebp, eax, ebx, ecx, edx, 46, 14, 0, 6, 11) - ASMR3(edx, ebp, eax, ebx, ecx, 47, 15, 1, 7, 12) - ASMR3(ecx, edx, ebp, eax, ebx, 48, 0, 2, 8, 13) - ASMR3(ebx, ecx, edx, ebp, eax, 49, 1, 3, 9, 14) - ASMR3(eax, ebx, ecx, edx, ebp, 50, 2, 4, 10, 15) - ASMR3(ebp, eax, ebx, ecx, edx, 51, 3, 5, 11, 0) - ASMR3(edx, ebp, eax, ebx, ecx, 52, 4, 6, 12, 1) - ASMR3(ecx, edx, ebp, eax, ebx, 53, 5, 7, 13, 2) - ASMR3(ebx, ecx, edx, ebp, eax, 54, 6, 8, 14, 3) - ASMR3(eax, ebx, ecx, edx, ebp, 55, 7, 9, 15, 4) - ASMR3(ebp, eax, ebx, ecx, edx, 56, 8, 10, 0, 5) - ASMR3(edx, ebp, eax, ebx, ecx, 57, 9, 11, 1, 6) - ASMR3(ecx, edx, ebp, eax, ebx, 58, 10, 12, 2, 7) - ASMR3(ebx, ecx, edx, ebp, eax, 59, 11, 13, 3, 8) - - ASMR4(eax, ebx, ecx, edx, ebp, 60, 12, 14, 4, 9) - ASMR4(ebp, eax, ebx, ecx, edx, 61, 13, 15, 5, 10) - ASMR4(edx, ebp, eax, ebx, ecx, 62, 14, 0, 6, 11) - ASMR4(ecx, edx, ebp, eax, ebx, 63, 15, 1, 7, 12) - ASMR4(ebx, ecx, edx, ebp, eax, 64, 0, 2, 8, 13) - ASMR4(eax, ebx, ecx, edx, ebp, 65, 1, 3, 9, 14) - ASMR4(ebp, eax, ebx, ecx, edx, 66, 2, 4, 10, 15) - ASMR4(edx, ebp, eax, ebx, ecx, 67, 3, 5, 11, 0) - ASMR4(ecx, edx, ebp, eax, ebx, 68, 4, 6, 12, 1) - ASMR4(ebx, ecx, edx, ebp, eax, 69, 5, 7, 13, 2) - ASMR4(eax, ebx, ecx, edx, ebp, 70, 6, 8, 14, 3) - ASMR4(ebp, eax, ebx, ecx, edx, 71, 7, 9, 15, 4) - ASMR4(edx, ebp, eax, ebx, ecx, 72, 8, 10, 0, 5) - ASMR4(ecx, edx, ebp, eax, ebx, 73, 9, 11, 1, 6) - ASMR4(ebx, ecx, edx, ebp, eax, 74, 10, 12, 2, 7) - ASMR4(eax, ebx, ecx, edx, ebp, 75, 11, 13, 3, 8) - ASMR4(ebp, eax, ebx, ecx, edx, 76, 12, 14, 4, 9) - ASMR4(edx, ebp, eax, ebx, ecx, 77, 13, 15, 5, 10) - ASMR4(ecx, edx, ebp, eax, ebx, 78, 14, 0, 6, 11) - ASMR4(ebx, ecx, edx, ebp, eax, 79, 15, 1, 7, 12) - - - AS2( movd esi, mm1 ) // digest_ - - AS2( add [esi], eax ) // write out - AS2( add [esi + 4], ebx ) - AS2( add [esi + 8], ecx ) - AS2( add [esi + 12], edx ) - AS2( add [esi + 16], ebp ) - - // setup next round - AS2( movd ebp, mm2 ) // times - - AS2( mov edi, DWORD PTR [esp + 64] ) // data - - AS2( add edi, 64 ) // next round of data - AS2( mov [esp + 64], edi ) // restore - - AS1( dec ebp ) - AS2( movd mm2, ebp ) - AS1( jnz loopStart ) - - - EPILOG() -} - - -#endif // DO_SHA_ASM - -} // namespace diff --git a/externals/mysql/extlib/yassl/taocrypt/src/template_instnt.cpp b/externals/mysql/extlib/yassl/taocrypt/src/template_instnt.cpp deleted file mode 100644 index 390da58e19..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/template_instnt.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - - -/* Explicit template instantiation requests - */ - - -#include "runtime.hpp" -#include "integer.hpp" -#include "rsa.hpp" -#include "sha.hpp" -#include "md5.hpp" -#include "hmac.hpp" -#include "ripemd.hpp" -#include "pwdbased.hpp" -#include "algebra.hpp" -#include "vector.hpp" -#include "hash.hpp" - -#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION -namespace TaoCrypt { - -#if defined(SSE2_INTRINSICS_AVAILABLE) -template AlignedAllocator::pointer StdReallocate >(AlignedAllocator&, unsigned int*, AlignedAllocator::size_type, AlignedAllocator::size_type, bool); -#endif - -template class RSA_Decryptor; -template class RSA_Encryptor; -template class RSA_Encryptor; -template void tcDelete(HASH*); -template void tcDelete(Integer*); -template void tcArrayDelete(byte*); -template AllocatorWithCleanup::pointer StdReallocate >(AllocatorWithCleanup&, byte*, AllocatorWithCleanup::size_type, AllocatorWithCleanup::size_type, bool); -template void tcArrayDelete(word*); -template AllocatorWithCleanup::pointer StdReallocate >(AllocatorWithCleanup&, word*, AllocatorWithCleanup::size_type, AllocatorWithCleanup::size_type, bool); - -#ifndef TAOCRYPT_SLOW_WORD64 // defined when word != word32 -template void tcArrayDelete(word32*); -template AllocatorWithCleanup::pointer StdReallocate >(AllocatorWithCleanup&, word32*, AllocatorWithCleanup::size_type, AllocatorWithCleanup::size_type, bool); -#endif - -template void tcArrayDelete(char*); - -template class PBKDF2_HMAC; -template class HMAC; -template class HMAC; -template class HMAC; - -} - -namespace mySTL { -template vector* uninit_fill_n*, size_t, vector >(vector*, size_t, vector const&); -template void destroy*>(vector*, vector*); -template TaoCrypt::Integer* uninit_copy(TaoCrypt::Integer*, TaoCrypt::Integer*, TaoCrypt::Integer*); -template TaoCrypt::Integer* uninit_fill_n(TaoCrypt::Integer*, size_t, TaoCrypt::Integer const&); -template void destroy(TaoCrypt::Integer*, TaoCrypt::Integer*); -template TaoCrypt::byte* GetArrayMemory(size_t); -template void FreeArrayMemory(TaoCrypt::byte*); -template TaoCrypt::Integer* GetArrayMemory(size_t); -template void FreeArrayMemory(TaoCrypt::Integer*); -template vector* GetArrayMemory >(size_t); -template void FreeArrayMemory >(vector*); -template void FreeArrayMemory(void*); -} - -#endif diff --git a/externals/mysql/extlib/yassl/taocrypt/src/tftables.cpp b/externals/mysql/extlib/yassl/taocrypt/src/tftables.cpp deleted file mode 100644 index 6917507b8b..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/tftables.cpp +++ /dev/null @@ -1,349 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* based on Wei Dai's tftables.cpp from CryptoPP */ - -#include "runtime.hpp" -#include "twofish.hpp" - - -namespace TaoCrypt { - - -const byte Twofish::q_[2][256] = { -{ - 0xA9, 0x67, 0xB3, 0xE8, 0x04, 0xFD, 0xA3, 0x76, 0x9A, 0x92, 0x80, 0x78, - 0xE4, 0xDD, 0xD1, 0x38, 0x0D, 0xC6, 0x35, 0x98, 0x18, 0xF7, 0xEC, 0x6C, - 0x43, 0x75, 0x37, 0x26, 0xFA, 0x13, 0x94, 0x48, 0xF2, 0xD0, 0x8B, 0x30, - 0x84, 0x54, 0xDF, 0x23, 0x19, 0x5B, 0x3D, 0x59, 0xF3, 0xAE, 0xA2, 0x82, - 0x63, 0x01, 0x83, 0x2E, 0xD9, 0x51, 0x9B, 0x7C, 0xA6, 0xEB, 0xA5, 0xBE, - 0x16, 0x0C, 0xE3, 0x61, 0xC0, 0x8C, 0x3A, 0xF5, 0x73, 0x2C, 0x25, 0x0B, - 0xBB, 0x4E, 0x89, 0x6B, 0x53, 0x6A, 0xB4, 0xF1, 0xE1, 0xE6, 0xBD, 0x45, - 0xE2, 0xF4, 0xB6, 0x66, 0xCC, 0x95, 0x03, 0x56, 0xD4, 0x1C, 0x1E, 0xD7, - 0xFB, 0xC3, 0x8E, 0xB5, 0xE9, 0xCF, 0xBF, 0xBA, 0xEA, 0x77, 0x39, 0xAF, - 0x33, 0xC9, 0x62, 0x71, 0x81, 0x79, 0x09, 0xAD, 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0xDF, 0x34, 0x35, 0x6A, 0xCF, 0xDC, 0x22, 0xC9, 0xC0, 0x9B, - 0x89, 0xD4, 0xED, 0xAB, 0x12, 0xA2, 0x0D, 0x52, 0xBB, 0x02, 0x2F, 0xA9, - 0xD7, 0x61, 0x1E, 0xB4, 0x50, 0x04, 0xF6, 0xC2, 0x16, 0x25, 0x86, 0x56, - 0x55, 0x09, 0xBE, 0x91 -} -}; - - -const word32 Twofish::mds_[4][256] = { - { - 0xbcbc3275, 0xecec21f3, 0x202043c6, 0xb3b3c9f4, - 0xdada03db, 0x02028b7b, 0xe2e22bfb, 0x9e9efac8, - 0xc9c9ec4a, 0xd4d409d3, 0x18186be6, 0x1e1e9f6b, - 0x98980e45, 0xb2b2387d, 0xa6a6d2e8, 0x2626b74b, - 0x3c3c57d6, 0x93938a32, 0x8282eed8, 0x525298fd, - 0x7b7bd437, 0xbbbb3771, 0x5b5b97f1, 0x474783e1, - 0x24243c30, 0x5151e20f, 0xbabac6f8, 0x4a4af31b, - 0xbfbf4887, 0x0d0d70fa, 0xb0b0b306, 0x7575de3f, - 0xd2d2fd5e, 0x7d7d20ba, 0x666631ae, 0x3a3aa35b, - 0x59591c8a, 0x00000000, 0xcdcd93bc, 0x1a1ae09d, - 0xaeae2c6d, 0x7f7fabc1, 0x2b2bc7b1, 0xbebeb90e, - 0xe0e0a080, 0x8a8a105d, 0x3b3b52d2, 0x6464bad5, - 0xd8d888a0, 0xe7e7a584, 0x5f5fe807, 0x1b1b1114, - 0x2c2cc2b5, 0xfcfcb490, 0x3131272c, 0x808065a3, - 0x73732ab2, 0x0c0c8173, 0x79795f4c, 0x6b6b4154, - 0x4b4b0292, 0x53536974, 0x94948f36, 0x83831f51, - 0x2a2a3638, 0xc4c49cb0, 0x2222c8bd, 0xd5d5f85a, - 0xbdbdc3fc, 0x48487860, 0xffffce62, 0x4c4c0796, - 0x4141776c, 0xc7c7e642, 0xebeb24f7, 0x1c1c1410, - 0x5d5d637c, 0x36362228, 0x6767c027, 0xe9e9af8c, - 0x4444f913, 0x1414ea95, 0xf5f5bb9c, 0xcfcf18c7, - 0x3f3f2d24, 0xc0c0e346, 0x7272db3b, 0x54546c70, - 0x29294cca, 0xf0f035e3, 0x0808fe85, 0xc6c617cb, - 0xf3f34f11, 0x8c8ce4d0, 0xa4a45993, 0xcaca96b8, - 0x68683ba6, 0xb8b84d83, 0x38382820, 0xe5e52eff, - 0xadad569f, 0x0b0b8477, 0xc8c81dc3, 0x9999ffcc, - 0x5858ed03, 0x19199a6f, 0x0e0e0a08, 0x95957ebf, - 0x70705040, 0xf7f730e7, 0x6e6ecf2b, 0x1f1f6ee2, - 0xb5b53d79, 0x09090f0c, 0x616134aa, 0x57571682, - 0x9f9f0b41, 0x9d9d803a, 0x111164ea, 0x2525cdb9, - 0xafafdde4, 0x4545089a, 0xdfdf8da4, 0xa3a35c97, - 0xeaead57e, 0x353558da, 0xededd07a, 0x4343fc17, - 0xf8f8cb66, 0xfbfbb194, 0x3737d3a1, 0xfafa401d, - 0xc2c2683d, 0xb4b4ccf0, 0x32325dde, 0x9c9c71b3, - 0x5656e70b, 0xe3e3da72, 0x878760a7, 0x15151b1c, - 0xf9f93aef, 0x6363bfd1, 0x3434a953, 0x9a9a853e, - 0xb1b1428f, 0x7c7cd133, 0x88889b26, 0x3d3da65f, - 0xa1a1d7ec, 0xe4e4df76, 0x8181942a, 0x91910149, - 0x0f0ffb81, 0xeeeeaa88, 0x161661ee, 0xd7d77321, - 0x9797f5c4, 0xa5a5a81a, 0xfefe3feb, 0x6d6db5d9, - 0x7878aec5, 0xc5c56d39, 0x1d1de599, 0x7676a4cd, - 0x3e3edcad, 0xcbcb6731, 0xb6b6478b, 0xefef5b01, - 0x12121e18, 0x6060c523, 0x6a6ab0dd, 0x4d4df61f, - 0xcecee94e, 0xdede7c2d, 0x55559df9, 0x7e7e5a48, - 0x2121b24f, 0x03037af2, 0xa0a02665, 0x5e5e198e, - 0x5a5a6678, 0x65654b5c, 0x62624e58, 0xfdfd4519, - 0x0606f48d, 0x404086e5, 0xf2f2be98, 0x3333ac57, - 0x17179067, 0x05058e7f, 0xe8e85e05, 0x4f4f7d64, - 0x89896aaf, 0x10109563, 0x74742fb6, 0x0a0a75fe, - 0x5c5c92f5, 0x9b9b74b7, 0x2d2d333c, 0x3030d6a5, - 0x2e2e49ce, 0x494989e9, 0x46467268, 0x77775544, - 0xa8a8d8e0, 0x9696044d, 0x2828bd43, 0xa9a92969, - 0xd9d97929, 0x8686912e, 0xd1d187ac, 0xf4f44a15, - 0x8d8d1559, 0xd6d682a8, 0xb9b9bc0a, 0x42420d9e, - 0xf6f6c16e, 0x2f2fb847, 0xdddd06df, 0x23233934, - 0xcccc6235, 0xf1f1c46a, 0xc1c112cf, 0x8585ebdc, - 0x8f8f9e22, 0x7171a1c9, 0x9090f0c0, 0xaaaa539b, - 0x0101f189, 0x8b8be1d4, 0x4e4e8ced, 0x8e8e6fab, - 0xababa212, 0x6f6f3ea2, 0xe6e6540d, 0xdbdbf252, - 0x92927bbb, 0xb7b7b602, 0x6969ca2f, 0x3939d9a9, - 0xd3d30cd7, 0xa7a72361, 0xa2a2ad1e, 0xc3c399b4, - 0x6c6c4450, 0x07070504, 0x04047ff6, 0x272746c2, - 0xacaca716, 0xd0d07625, 0x50501386, 0xdcdcf756, - 0x84841a55, 0xe1e15109, 0x7a7a25be, 0x1313ef91 - }, - { - 0xa9d93939, 0x67901717, 0xb3719c9c, 0xe8d2a6a6, - 0x04050707, 0xfd985252, 0xa3658080, 0x76dfe4e4, - 0x9a084545, 0x92024b4b, 0x80a0e0e0, 0x78665a5a, - 0xe4ddafaf, 0xddb06a6a, 0xd1bf6363, 0x38362a2a, - 0x0d54e6e6, 0xc6432020, 0x3562cccc, 0x98bef2f2, - 0x181e1212, 0xf724ebeb, 0xecd7a1a1, 0x6c774141, - 0x43bd2828, 0x7532bcbc, 0x37d47b7b, 0x269b8888, - 0xfa700d0d, 0x13f94444, 0x94b1fbfb, 0x485a7e7e, - 0xf27a0303, 0xd0e48c8c, 0x8b47b6b6, 0x303c2424, - 0x84a5e7e7, 0x54416b6b, 0xdf06dddd, 0x23c56060, - 0x1945fdfd, 0x5ba33a3a, 0x3d68c2c2, 0x59158d8d, - 0xf321ecec, 0xae316666, 0xa23e6f6f, 0x82165757, - 0x63951010, 0x015befef, 0x834db8b8, 0x2e918686, - 0xd9b56d6d, 0x511f8383, 0x9b53aaaa, 0x7c635d5d, - 0xa63b6868, 0xeb3ffefe, 0xa5d63030, 0xbe257a7a, - 0x16a7acac, 0x0c0f0909, 0xe335f0f0, 0x6123a7a7, - 0xc0f09090, 0x8cafe9e9, 0x3a809d9d, 0xf5925c5c, - 0x73810c0c, 0x2c273131, 0x2576d0d0, 0x0be75656, - 0xbb7b9292, 0x4ee9cece, 0x89f10101, 0x6b9f1e1e, - 0x53a93434, 0x6ac4f1f1, 0xb499c3c3, 0xf1975b5b, - 0xe1834747, 0xe66b1818, 0xbdc82222, 0x450e9898, - 0xe26e1f1f, 0xf4c9b3b3, 0xb62f7474, 0x66cbf8f8, - 0xccff9999, 0x95ea1414, 0x03ed5858, 0x56f7dcdc, - 0xd4e18b8b, 0x1c1b1515, 0x1eada2a2, 0xd70cd3d3, - 0xfb2be2e2, 0xc31dc8c8, 0x8e195e5e, 0xb5c22c2c, - 0xe9894949, 0xcf12c1c1, 0xbf7e9595, 0xba207d7d, - 0xea641111, 0x77840b0b, 0x396dc5c5, 0xaf6a8989, - 0x33d17c7c, 0xc9a17171, 0x62ceffff, 0x7137bbbb, - 0x81fb0f0f, 0x793db5b5, 0x0951e1e1, 0xaddc3e3e, - 0x242d3f3f, 0xcda47676, 0xf99d5555, 0xd8ee8282, - 0xe5864040, 0xc5ae7878, 0xb9cd2525, 0x4d049696, - 0x44557777, 0x080a0e0e, 0x86135050, 0xe730f7f7, - 0xa1d33737, 0x1d40fafa, 0xaa346161, 0xed8c4e4e, - 0x06b3b0b0, 0x706c5454, 0xb22a7373, 0xd2523b3b, - 0x410b9f9f, 0x7b8b0202, 0xa088d8d8, 0x114ff3f3, - 0x3167cbcb, 0xc2462727, 0x27c06767, 0x90b4fcfc, - 0x20283838, 0xf67f0404, 0x60784848, 0xff2ee5e5, - 0x96074c4c, 0x5c4b6565, 0xb1c72b2b, 0xab6f8e8e, - 0x9e0d4242, 0x9cbbf5f5, 0x52f2dbdb, 0x1bf34a4a, - 0x5fa63d3d, 0x9359a4a4, 0x0abcb9b9, 0xef3af9f9, - 0x91ef1313, 0x85fe0808, 0x49019191, 0xee611616, - 0x2d7cdede, 0x4fb22121, 0x8f42b1b1, 0x3bdb7272, - 0x47b82f2f, 0x8748bfbf, 0x6d2caeae, 0x46e3c0c0, - 0xd6573c3c, 0x3e859a9a, 0x6929a9a9, 0x647d4f4f, - 0x2a948181, 0xce492e2e, 0xcb17c6c6, 0x2fca6969, - 0xfcc3bdbd, 0x975ca3a3, 0x055ee8e8, 0x7ad0eded, - 0xac87d1d1, 0x7f8e0505, 0xd5ba6464, 0x1aa8a5a5, - 0x4bb72626, 0x0eb9bebe, 0xa7608787, 0x5af8d5d5, - 0x28223636, 0x14111b1b, 0x3fde7575, 0x2979d9d9, - 0x88aaeeee, 0x3c332d2d, 0x4c5f7979, 0x02b6b7b7, - 0xb896caca, 0xda583535, 0xb09cc4c4, 0x17fc4343, - 0x551a8484, 0x1ff64d4d, 0x8a1c5959, 0x7d38b2b2, - 0x57ac3333, 0xc718cfcf, 0x8df40606, 0x74695353, - 0xb7749b9b, 0xc4f59797, 0x9f56adad, 0x72dae3e3, - 0x7ed5eaea, 0x154af4f4, 0x229e8f8f, 0x12a2abab, - 0x584e6262, 0x07e85f5f, 0x99e51d1d, 0x34392323, - 0x6ec1f6f6, 0x50446c6c, 0xde5d3232, 0x68724646, - 0x6526a0a0, 0xbc93cdcd, 0xdb03dada, 0xf8c6baba, - 0xc8fa9e9e, 0xa882d6d6, 0x2bcf6e6e, 0x40507070, - 0xdceb8585, 0xfe750a0a, 0x328a9393, 0xa48ddfdf, - 0xca4c2929, 0x10141c1c, 0x2173d7d7, 0xf0ccb4b4, - 0xd309d4d4, 0x5d108a8a, 0x0fe25151, 0x00000000, - 0x6f9a1919, 0x9de01a1a, 0x368f9494, 0x42e6c7c7, - 0x4aecc9c9, 0x5efdd2d2, 0xc1ab7f7f, 0xe0d8a8a8 - }, - { - 0xbc75bc32, 0xecf3ec21, 0x20c62043, 0xb3f4b3c9, - 0xdadbda03, 0x027b028b, 0xe2fbe22b, 0x9ec89efa, - 0xc94ac9ec, 0xd4d3d409, 0x18e6186b, 0x1e6b1e9f, - 0x9845980e, 0xb27db238, 0xa6e8a6d2, 0x264b26b7, - 0x3cd63c57, 0x9332938a, 0x82d882ee, 0x52fd5298, - 0x7b377bd4, 0xbb71bb37, 0x5bf15b97, 0x47e14783, - 0x2430243c, 0x510f51e2, 0xbaf8bac6, 0x4a1b4af3, - 0xbf87bf48, 0x0dfa0d70, 0xb006b0b3, 0x753f75de, - 0xd25ed2fd, 0x7dba7d20, 0x66ae6631, 0x3a5b3aa3, - 0x598a591c, 0x00000000, 0xcdbccd93, 0x1a9d1ae0, - 0xae6dae2c, 0x7fc17fab, 0x2bb12bc7, 0xbe0ebeb9, - 0xe080e0a0, 0x8a5d8a10, 0x3bd23b52, 0x64d564ba, - 0xd8a0d888, 0xe784e7a5, 0x5f075fe8, 0x1b141b11, - 0x2cb52cc2, 0xfc90fcb4, 0x312c3127, 0x80a38065, - 0x73b2732a, 0x0c730c81, 0x794c795f, 0x6b546b41, - 0x4b924b02, 0x53745369, 0x9436948f, 0x8351831f, - 0x2a382a36, 0xc4b0c49c, 0x22bd22c8, 0xd55ad5f8, - 0xbdfcbdc3, 0x48604878, 0xff62ffce, 0x4c964c07, - 0x416c4177, 0xc742c7e6, 0xebf7eb24, 0x1c101c14, - 0x5d7c5d63, 0x36283622, 0x672767c0, 0xe98ce9af, - 0x441344f9, 0x149514ea, 0xf59cf5bb, 0xcfc7cf18, - 0x3f243f2d, 0xc046c0e3, 0x723b72db, 0x5470546c, - 0x29ca294c, 0xf0e3f035, 0x088508fe, 0xc6cbc617, - 0xf311f34f, 0x8cd08ce4, 0xa493a459, 0xcab8ca96, - 0x68a6683b, 0xb883b84d, 0x38203828, 0xe5ffe52e, - 0xad9fad56, 0x0b770b84, 0xc8c3c81d, 0x99cc99ff, - 0x580358ed, 0x196f199a, 0x0e080e0a, 0x95bf957e, - 0x70407050, 0xf7e7f730, 0x6e2b6ecf, 0x1fe21f6e, - 0xb579b53d, 0x090c090f, 0x61aa6134, 0x57825716, - 0x9f419f0b, 0x9d3a9d80, 0x11ea1164, 0x25b925cd, - 0xafe4afdd, 0x459a4508, 0xdfa4df8d, 0xa397a35c, - 0xea7eead5, 0x35da3558, 0xed7aedd0, 0x431743fc, - 0xf866f8cb, 0xfb94fbb1, 0x37a137d3, 0xfa1dfa40, - 0xc23dc268, 0xb4f0b4cc, 0x32de325d, 0x9cb39c71, - 0x560b56e7, 0xe372e3da, 0x87a78760, 0x151c151b, - 0xf9eff93a, 0x63d163bf, 0x345334a9, 0x9a3e9a85, - 0xb18fb142, 0x7c337cd1, 0x8826889b, 0x3d5f3da6, - 0xa1eca1d7, 0xe476e4df, 0x812a8194, 0x91499101, - 0x0f810ffb, 0xee88eeaa, 0x16ee1661, 0xd721d773, - 0x97c497f5, 0xa51aa5a8, 0xfeebfe3f, 0x6dd96db5, - 0x78c578ae, 0xc539c56d, 0x1d991de5, 0x76cd76a4, - 0x3ead3edc, 0xcb31cb67, 0xb68bb647, 0xef01ef5b, - 0x1218121e, 0x602360c5, 0x6add6ab0, 0x4d1f4df6, - 0xce4ecee9, 0xde2dde7c, 0x55f9559d, 0x7e487e5a, - 0x214f21b2, 0x03f2037a, 0xa065a026, 0x5e8e5e19, - 0x5a785a66, 0x655c654b, 0x6258624e, 0xfd19fd45, - 0x068d06f4, 0x40e54086, 0xf298f2be, 0x335733ac, - 0x17671790, 0x057f058e, 0xe805e85e, 0x4f644f7d, - 0x89af896a, 0x10631095, 0x74b6742f, 0x0afe0a75, - 0x5cf55c92, 0x9bb79b74, 0x2d3c2d33, 0x30a530d6, - 0x2ece2e49, 0x49e94989, 0x46684672, 0x77447755, - 0xa8e0a8d8, 0x964d9604, 0x284328bd, 0xa969a929, - 0xd929d979, 0x862e8691, 0xd1acd187, 0xf415f44a, - 0x8d598d15, 0xd6a8d682, 0xb90ab9bc, 0x429e420d, - 0xf66ef6c1, 0x2f472fb8, 0xdddfdd06, 0x23342339, - 0xcc35cc62, 0xf16af1c4, 0xc1cfc112, 0x85dc85eb, - 0x8f228f9e, 0x71c971a1, 0x90c090f0, 0xaa9baa53, - 0x018901f1, 0x8bd48be1, 0x4eed4e8c, 0x8eab8e6f, - 0xab12aba2, 0x6fa26f3e, 0xe60de654, 0xdb52dbf2, - 0x92bb927b, 0xb702b7b6, 0x692f69ca, 0x39a939d9, - 0xd3d7d30c, 0xa761a723, 0xa21ea2ad, 0xc3b4c399, - 0x6c506c44, 0x07040705, 0x04f6047f, 0x27c22746, - 0xac16aca7, 0xd025d076, 0x50865013, 0xdc56dcf7, - 0x8455841a, 0xe109e151, 0x7abe7a25, 0x139113ef - }, - { - 0xd939a9d9, 0x90176790, 0x719cb371, 0xd2a6e8d2, - 0x05070405, 0x9852fd98, 0x6580a365, 0xdfe476df, - 0x08459a08, 0x024b9202, 0xa0e080a0, 0x665a7866, - 0xddafe4dd, 0xb06addb0, 0xbf63d1bf, 0x362a3836, - 0x54e60d54, 0x4320c643, 0x62cc3562, 0xbef298be, - 0x1e12181e, 0x24ebf724, 0xd7a1ecd7, 0x77416c77, - 0xbd2843bd, 0x32bc7532, 0xd47b37d4, 0x9b88269b, - 0x700dfa70, 0xf94413f9, 0xb1fb94b1, 0x5a7e485a, - 0x7a03f27a, 0xe48cd0e4, 0x47b68b47, 0x3c24303c, - 0xa5e784a5, 0x416b5441, 0x06dddf06, 0xc56023c5, - 0x45fd1945, 0xa33a5ba3, 0x68c23d68, 0x158d5915, - 0x21ecf321, 0x3166ae31, 0x3e6fa23e, 0x16578216, - 0x95106395, 0x5bef015b, 0x4db8834d, 0x91862e91, - 0xb56dd9b5, 0x1f83511f, 0x53aa9b53, 0x635d7c63, - 0x3b68a63b, 0x3ffeeb3f, 0xd630a5d6, 0x257abe25, - 0xa7ac16a7, 0x0f090c0f, 0x35f0e335, 0x23a76123, - 0xf090c0f0, 0xafe98caf, 0x809d3a80, 0x925cf592, - 0x810c7381, 0x27312c27, 0x76d02576, 0xe7560be7, - 0x7b92bb7b, 0xe9ce4ee9, 0xf10189f1, 0x9f1e6b9f, - 0xa93453a9, 0xc4f16ac4, 0x99c3b499, 0x975bf197, - 0x8347e183, 0x6b18e66b, 0xc822bdc8, 0x0e98450e, - 0x6e1fe26e, 0xc9b3f4c9, 0x2f74b62f, 0xcbf866cb, - 0xff99ccff, 0xea1495ea, 0xed5803ed, 0xf7dc56f7, - 0xe18bd4e1, 0x1b151c1b, 0xada21ead, 0x0cd3d70c, - 0x2be2fb2b, 0x1dc8c31d, 0x195e8e19, 0xc22cb5c2, - 0x8949e989, 0x12c1cf12, 0x7e95bf7e, 0x207dba20, - 0x6411ea64, 0x840b7784, 0x6dc5396d, 0x6a89af6a, - 0xd17c33d1, 0xa171c9a1, 0xceff62ce, 0x37bb7137, - 0xfb0f81fb, 0x3db5793d, 0x51e10951, 0xdc3eaddc, - 0x2d3f242d, 0xa476cda4, 0x9d55f99d, 0xee82d8ee, - 0x8640e586, 0xae78c5ae, 0xcd25b9cd, 0x04964d04, - 0x55774455, 0x0a0e080a, 0x13508613, 0x30f7e730, - 0xd337a1d3, 0x40fa1d40, 0x3461aa34, 0x8c4eed8c, - 0xb3b006b3, 0x6c54706c, 0x2a73b22a, 0x523bd252, - 0x0b9f410b, 0x8b027b8b, 0x88d8a088, 0x4ff3114f, - 0x67cb3167, 0x4627c246, 0xc06727c0, 0xb4fc90b4, - 0x28382028, 0x7f04f67f, 0x78486078, 0x2ee5ff2e, - 0x074c9607, 0x4b655c4b, 0xc72bb1c7, 0x6f8eab6f, - 0x0d429e0d, 0xbbf59cbb, 0xf2db52f2, 0xf34a1bf3, - 0xa63d5fa6, 0x59a49359, 0xbcb90abc, 0x3af9ef3a, - 0xef1391ef, 0xfe0885fe, 0x01914901, 0x6116ee61, - 0x7cde2d7c, 0xb2214fb2, 0x42b18f42, 0xdb723bdb, - 0xb82f47b8, 0x48bf8748, 0x2cae6d2c, 0xe3c046e3, - 0x573cd657, 0x859a3e85, 0x29a96929, 0x7d4f647d, - 0x94812a94, 0x492ece49, 0x17c6cb17, 0xca692fca, - 0xc3bdfcc3, 0x5ca3975c, 0x5ee8055e, 0xd0ed7ad0, - 0x87d1ac87, 0x8e057f8e, 0xba64d5ba, 0xa8a51aa8, - 0xb7264bb7, 0xb9be0eb9, 0x6087a760, 0xf8d55af8, - 0x22362822, 0x111b1411, 0xde753fde, 0x79d92979, - 0xaaee88aa, 0x332d3c33, 0x5f794c5f, 0xb6b702b6, - 0x96cab896, 0x5835da58, 0x9cc4b09c, 0xfc4317fc, - 0x1a84551a, 0xf64d1ff6, 0x1c598a1c, 0x38b27d38, - 0xac3357ac, 0x18cfc718, 0xf4068df4, 0x69537469, - 0x749bb774, 0xf597c4f5, 0x56ad9f56, 0xdae372da, - 0xd5ea7ed5, 0x4af4154a, 0x9e8f229e, 0xa2ab12a2, - 0x4e62584e, 0xe85f07e8, 0xe51d99e5, 0x39233439, - 0xc1f66ec1, 0x446c5044, 0x5d32de5d, 0x72466872, - 0x26a06526, 0x93cdbc93, 0x03dadb03, 0xc6baf8c6, - 0xfa9ec8fa, 0x82d6a882, 0xcf6e2bcf, 0x50704050, - 0xeb85dceb, 0x750afe75, 0x8a93328a, 0x8ddfa48d, - 0x4c29ca4c, 0x141c1014, 0x73d72173, 0xccb4f0cc, - 0x09d4d309, 0x108a5d10, 0xe2510fe2, 0x00000000, - 0x9a196f9a, 0xe01a9de0, 0x8f94368f, 0xe6c742e6, - 0xecc94aec, 0xfdd25efd, 0xab7fc1ab, 0xd8a8e0d8 - } -}; - - -} // namespace - diff --git a/externals/mysql/extlib/yassl/taocrypt/src/twofish.cpp b/externals/mysql/extlib/yassl/taocrypt/src/twofish.cpp deleted file mode 100644 index 84dd35f919..0000000000 --- a/externals/mysql/extlib/yassl/taocrypt/src/twofish.cpp +++ /dev/null @@ -1,575 +0,0 @@ -/* - Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA. -*/ - -/* C++ based on Wei Dai's twofish.cpp from CryptoPP */ -/* x86 asm original */ - - -#if defined(TAOCRYPT_KERNEL_MODE) - #define DO_TAOCRYPT_KERNEL_MODE -#endif // only some modules now support this - -#include "runtime.hpp" -#include "twofish.hpp" - - - -namespace TaoCrypt { - - -#if defined(DO_TWOFISH_ASM) - -// ia32 optimized version -void Twofish::Process(byte* out, const byte* in, word32 sz) -{ - if (!isMMX) { - Mode_BASE::Process(out, in, sz); - return; - } - - word32 blocks = sz / BLOCK_SIZE; - - if (mode_ == ECB) - while (blocks--) { - if (dir_ == ENCRYPTION) - AsmEncrypt(in, out); - else - AsmDecrypt(in, out); - - out += BLOCK_SIZE; - in += BLOCK_SIZE; - } - else if (mode_ == CBC) - if (dir_ == ENCRYPTION) - while (blocks--) { - r_[0] ^= *(word32*)in; - r_[1] ^= *(word32*)(in + 4); - r_[2] ^= *(word32*)(in + 8); - r_[3] ^= *(word32*)(in + 12); - - AsmEncrypt((byte*)r_, (byte*)r_); - memcpy(out, r_, BLOCK_SIZE); - - out += BLOCK_SIZE; - in += BLOCK_SIZE; - } - else - while (blocks--) { - AsmDecrypt(in, out); - - *(word32*)out ^= r_[0]; - *(word32*)(out + 4) ^= r_[1]; - *(word32*)(out + 8) ^= r_[2]; - *(word32*)(out + 12) ^= r_[3]; - - memcpy(r_, in, BLOCK_SIZE); - - out += BLOCK_SIZE; - in += BLOCK_SIZE; - } -} - -#endif // DO_TWOFISH_ASM - - -namespace { // locals - -// compute (c * x^4) mod (x^4 + (a + 1/a) * x^3 + a * x^2 + (a + 1/a) * x + 1) -// over GF(256) -static inline unsigned int Mod(unsigned int c) -{ - static const unsigned int modulus = 0x14d; - unsigned int c2 = (c<<1) ^ ((c & 0x80) ? modulus : 0); - unsigned int c1 = c2 ^ (c>>1) ^ ((c & 1) ? (modulus>>1) : 0); - return c | (c1 << 8) | (c2 << 16) | (c1 << 24); -} - -// compute RS(12,8) code with the above polynomial as generator -// this is equivalent to multiplying by the RS matrix -static word32 ReedSolomon(word32 high, word32 low) -{ - for (unsigned int i=0; i<8; i++) { - high = Mod(high>>24) ^ (high<<8) ^ (low>>24); - low <<= 8; - } - return high; -} - -} // local namespace - - - -inline word32 Twofish::h0(word32 x, const word32* key, unsigned int kLen) -{ - x = x | (x<<8) | (x<<16) | (x<<24); - switch(kLen) - { -#define Q(a, b, c, d, t) q_[a][GETBYTE(t,0)] ^ (q_[b][GETBYTE(t,1)] << 8) ^ \ - (q_[c][GETBYTE(t,2)] << 16) ^ (q_[d][GETBYTE(t,3)] << 24) - case 4: x = Q(1, 0, 0, 1, x) ^ key[6]; - case 3: x = Q(1, 1, 0, 0, x) ^ key[4]; - case 2: x = Q(0, 1, 0, 1, x) ^ key[2]; - x = Q(0, 0, 1, 1, x) ^ key[0]; - } - return x; -} - -inline word32 Twofish::h(word32 x, const word32* key, unsigned int kLen) -{ - x = h0(x, key, kLen); - return mds_[0][GETBYTE(x,0)] ^ mds_[1][GETBYTE(x,1)] ^ - mds_[2][GETBYTE(x,2)] ^ mds_[3][GETBYTE(x,3)]; -} - - -void Twofish::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) -{ - assert(keylen >= 16 && keylen <= 32); - - unsigned int len = (keylen <= 16 ? 2 : (keylen <= 24 ? 3 : 4)); - word32 key[8]; - GetUserKey(LittleEndianOrder, key, len*2, userKey, keylen); - - unsigned int i; - for (i=0; i<40; i+=2) { - word32 a = h(i, key, len); - word32 b = rotlFixed(h(i+1, key+1, len), 8); - k_[i] = a+b; - k_[i+1] = rotlFixed(a+2*b, 9); - } - - word32 svec[8]; - for (i=0; i gpBlock; - -void Twofish::encrypt(const byte* inBlock, const byte* xorBlock, - byte* outBlock) const -{ - word32 x, y, a, b, c, d; - - gpBlock::Get(inBlock)(a)(b)(c)(d); - - a ^= k_[0]; - b ^= k_[1]; - c ^= k_[2]; - d ^= k_[3]; - - const word32 *k = k_+8; - - ENCCYCLE (0); - ENCCYCLE (1); - ENCCYCLE (2); - ENCCYCLE (3); - ENCCYCLE (4); - ENCCYCLE (5); - ENCCYCLE (6); - ENCCYCLE (7); - - c ^= k_[4]; - d ^= k_[5]; - a ^= k_[6]; - b ^= k_[7]; - - gpBlock::Put(xorBlock, outBlock)(c)(d)(a)(b); -} - - -void Twofish::decrypt(const byte* inBlock, const byte* xorBlock, - byte* outBlock) const -{ - word32 x, y, a, b, c, d; - - gpBlock::Get(inBlock)(c)(d)(a)(b); - - c ^= k_[4]; - d ^= k_[5]; - a ^= k_[6]; - b ^= k_[7]; - - const word32 *k = k_+8; - DECCYCLE (7); - DECCYCLE (6); - DECCYCLE (5); - DECCYCLE (4); - DECCYCLE (3); - DECCYCLE (2); - DECCYCLE (1); - DECCYCLE (0); - - a ^= k_[0]; - b ^= k_[1]; - c ^= k_[2]; - d ^= k_[3]; - - gpBlock::Put(xorBlock, outBlock)(a)(b)(c)(d); -} - - - -#if defined(DO_TWOFISH_ASM) - #ifdef __GNUC__ - #define AS1(x) asm(#x); - #define AS2(x, y) asm(#x ", " #y); - - #define PROLOG() \ - asm(".intel_syntax noprefix"); \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov edi, DWORD PTR [ebp + 8] ) \ - AS2( mov esi, DWORD PTR [ebp + 12] ) - - #define EPILOG() \ - AS2( movd esp, mm6 ) \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS1( emms ) \ - asm(".att_syntax"); - #else - #define AS1(x) __asm x - #define AS2(x, y) __asm x, y - - #define PROLOG() \ - AS1( push ebp ) \ - AS2( mov ebp, esp ) \ - AS2( movd mm3, edi ) \ - AS2( movd mm4, ebx ) \ - AS2( movd mm5, esi ) \ - AS2( movd mm6, ebp ) \ - AS2( mov edi, ecx ) \ - AS2( mov esi, DWORD PTR [ebp + 8] ) - - /* ebp already set */ - #define EPILOG() \ - AS2( movd esi, mm5 ) \ - AS2( movd ebx, mm4 ) \ - AS2( movd edi, mm3 ) \ - AS2( mov esp, ebp ) \ - AS1( pop ebp ) \ - AS1( emms ) \ - AS1( ret 8 ) - - #endif - - - - - // x = esi, y = [esp], s_ = ebp - // edi always open for G1 and G2 - // G1 also uses edx after save and restore - // G2 also uses eax after save and restore - // and ecx for tmp [esp] which Rounds also use - // and restore from mm7 - - // x = G1(a) bytes(0,1,2,3) -#define ASMG1(z, zl, zh) \ - AS2( movd mm2, edx ) \ - AS2( movzx edi, zl ) \ - AS2( mov esi, DWORD PTR [ebp + edi*4] ) \ - AS2( movzx edx, zh ) \ - AS2( xor esi, DWORD PTR 1024[ebp + edx*4] ) \ - \ - AS2( mov edx, z ) \ - AS2( shr edx, 16 ) \ - AS2( movzx edi, dl ) \ - AS2( xor esi, DWORD PTR 2048[ebp + edi*4] ) \ - AS2( movzx edx, dh ) \ - AS2( xor esi, DWORD PTR 3072[ebp + edx*4] ) \ - AS2( movd edx, mm2 ) - - - // y = G2(b) bytes(3,0,1,2) [ put y into ecx for Rounds ] -#define ASMG2(z, zl, zh) \ - AS2( movd mm7, ecx ) \ - AS2( movd mm2, eax ) \ - AS2( mov edi, z ) \ - AS2( shr edi, 24 ) \ - AS2( mov ecx, DWORD PTR [ebp + edi*4] ) \ - AS2( movzx eax, zl ) \ - AS2( xor ecx, DWORD PTR 1024[ebp + eax*4] ) \ - \ - AS2( mov eax, z ) \ - AS2( shr eax, 16 ) \ - AS2( movzx edi, zh ) \ - AS2( xor ecx, DWORD PTR 2048[ebp + edi*4] ) \ - AS2( movzx eax, al ) \ - AS2( xor ecx, DWORD PTR 3072[ebp + eax*4] ) \ - AS2( movd eax, mm2 ) - - - // encrypt Round (n), - // x = esi, k = ebp, edi open - // y is in ecx from G2, restore when done from mm7 - // before C (which be same register!) -#define ASMENCROUND(N, A, A2, A3, B, B2, B3, C, D) \ - /* setup s_ */ \ - AS2( movd ebp, mm1 ) \ - ASMG1(A, A2, A3) \ - ASMG2(B, B2, B3) \ - /* setup k */ \ - AS2( movd ebp, mm0 ) \ - /* x += y */ \ - AS2( add esi, ecx ) \ - AS2( add ebp, 32 ) \ - /* y += x + k[2 * (n) + 1] */ \ - AS2( add ecx, esi ) \ - AS2( rol D, 1 ) \ - AS2( add ecx, DWORD PTR [ebp + 8 * N + 4] ) \ - /* (d) = rotlFixed(d, 1) ^ y */ \ - AS2( xor D, ecx ) \ - AS2( movd ecx, mm7 ) \ - /* (c) ^= x + k[2 * (n)] */ \ - AS2( mov edi, esi ) \ - AS2( add edi, DWORD PTR [ebp + 8 * N] ) \ - AS2( xor C, edi ) \ - /* (c) = rotrFixed(c, 1) */ \ - AS2( ror C, 1 ) - - - // decrypt Round (n), - // x = esi, k = ebp, edi open - // y is in ecx from G2, restore ecx from mm7 when done -#define ASMDECROUND(N, A, A2, A3, B, B2, B3, C, D) \ - /* setup s_ */ \ - AS2( movd ebp, mm1 ) \ - ASMG1(A, A2, A3) \ - ASMG2(B, B2, B3) \ - /* setup k */ \ - AS2( movd ebp, mm0 ) \ - /* x += y */ \ - AS2( add esi, ecx ) \ - AS2( add ebp, 32 ) \ - /* y += x */ \ - AS2( add ecx, esi ) \ - /* (d) ^= y + k[2 * (n) + 1] */ \ - AS2( mov edi, DWORD PTR [ebp + 8 * N + 4] ) \ - AS2( add edi, ecx ) \ - AS2( movd ecx, mm7 ) \ - AS2( xor D, edi ) \ - /* (d) = rotrFixed(d, 1) */ \ - AS2( ror D, 1 ) \ - /* (c) = rotlFixed(c, 1) */ \ - AS2( rol C, 1 ) \ - /* (c) ^= (x + k[2 * (n)]) */ \ - AS2( mov edi, esi ) \ - AS2( add edi, DWORD PTR [ebp + 8 * N] ) \ - AS2( xor C, edi ) - - -#ifdef _MSC_VER - __declspec(naked) -#endif -void Twofish::AsmEncrypt(const byte* inBlock, byte* outBlock) const -{ - PROLOG() - - #ifdef OLD_GCC_OFFSET - AS2( add edi, 60 ) // k_ - #else - AS2( add edi, 56 ) // k_ - #endif - - AS2( mov ebp, edi ) - - AS2( mov eax, DWORD PTR [esi] ) // a - AS2( movd mm0, edi ) // store k_ - AS2( mov ebx, DWORD PTR [esi + 4] ) // b - AS2( add ebp, 160 ) // s_[0] - AS2( mov ecx, DWORD PTR [esi + 8] ) // c - AS2( movd mm1, ebp ) // store s_ - AS2( mov edx, DWORD PTR [esi + 12] ) // d - - AS2( xor eax, DWORD PTR [edi] ) // k_[0] - AS2( xor ebx, DWORD PTR [edi + 4] ) // [1] - AS2( xor ecx, DWORD PTR [edi + 8] ) // [2] - AS2( xor edx, DWORD PTR [edi + 12] ) // [3] - - - ASMENCROUND( 0, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMENCROUND( 1, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMENCROUND( 2, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMENCROUND( 3, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMENCROUND( 4, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMENCROUND( 5, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMENCROUND( 6, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMENCROUND( 7, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMENCROUND( 8, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMENCROUND( 9, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMENCROUND(10, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMENCROUND(11, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMENCROUND(12, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMENCROUND(13, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMENCROUND(14, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMENCROUND(15, ecx, cl, ch, edx, dl, dh, eax, ebx) - - - AS2( movd ebp, mm6 ) - AS2( movd esi, mm0 ) // k_ - #ifdef __GNUC__ - AS2( mov edi, [ebp + 16] ) // outBlock - #else - AS2( mov edi, [ebp + 12] ) // outBlock - #endif - - AS2( xor ecx, DWORD PTR [esi + 16] ) // k_[4] - AS2( xor edx, DWORD PTR [esi + 20] ) // k_[5] - AS2( xor eax, DWORD PTR [esi + 24] ) // k_[6] - AS2( xor ebx, DWORD PTR [esi + 28] ) // k_[7] - - AS2( mov [edi], ecx ) // write out - AS2( mov [edi + 4], edx ) // write out - AS2( mov [edi + 8], eax ) // write out - AS2( mov [edi + 12], ebx ) // write out - - - EPILOG() -} - - -#ifdef _MSC_VER - __declspec(naked) -#endif -void Twofish::AsmDecrypt(const byte* inBlock, byte* outBlock) const -{ - PROLOG() - - #ifdef OLD_GCC_OFFSET - AS2( add edi, 60 ) // k_ - #else - AS2( add edi, 56 ) // k_ - #endif - - AS2( mov ebp, edi ) - - AS2( mov ecx, DWORD PTR [esi] ) // c - AS2( movd mm0, edi ) // store k_ - AS2( mov edx, DWORD PTR [esi + 4] ) // d - AS2( add ebp, 160 ) // s_[0] - AS2( mov eax, DWORD PTR [esi + 8] ) // a - AS2( movd mm1, ebp ) // store s_ - AS2( mov ebx, DWORD PTR [esi + 12] ) // b - - AS2( xor ecx, DWORD PTR [edi + 16] ) // k_[4] - AS2( xor edx, DWORD PTR [edi + 20] ) // [5] - AS2( xor eax, DWORD PTR [edi + 24] ) // [6] - AS2( xor ebx, DWORD PTR [edi + 28] ) // [7] - - - ASMDECROUND(15, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMDECROUND(14, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMDECROUND(13, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMDECROUND(12, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMDECROUND(11, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMDECROUND(10, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMDECROUND( 9, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMDECROUND( 8, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMDECROUND( 7, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMDECROUND( 6, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMDECROUND( 5, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMDECROUND( 4, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMDECROUND( 3, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMDECROUND( 2, eax, al, ah, ebx, bl, bh, ecx, edx) - ASMDECROUND( 1, ecx, cl, ch, edx, dl, dh, eax, ebx) - ASMDECROUND( 0, eax, al, ah, ebx, bl, bh, ecx, edx) - - - AS2( movd ebp, mm6 ) - AS2( movd esi, mm0 ) // k_ - #ifdef __GNUC__ - AS2( mov edi, [ebp + 16] ) // outBlock - #else - AS2( mov edi, [ebp + 12] ) // outBlock - #endif - - AS2( xor eax, DWORD PTR [esi ] ) // k_[0] - AS2( xor ebx, DWORD PTR [esi + 4] ) // k_[1] - AS2( xor ecx, DWORD PTR [esi + 8] ) // k_[2] - AS2( xor edx, DWORD PTR [esi + 12] ) // k_[3] - - AS2( mov [edi], eax ) // write out - AS2( mov [edi + 4], ebx ) // write out - AS2( mov [edi + 8], ecx ) // write out - AS2( mov [edi + 12], edx ) // write out - - - EPILOG() -} - - - -#endif // defined(DO_TWOFISH_ASM) - - - - - -} // namespace - - diff --git a/externals/mysql/hash.h b/externals/mysql/hash.h deleted file mode 100644 index c1797c8293..0000000000 --- a/externals/mysql/hash.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Dynamic hashing of record with different key-length */ - -#ifndef _hash_h -#define _hash_h -#ifdef __cplusplus -extern "C" { -#endif - -/* - Overhead to store an element in hash - Can be used to approximate memory consumption for a hash - */ -#define HASH_OVERHEAD (sizeof(char*)*2) - -/* flags for hash_init */ -#define HASH_UNIQUE 1 /* hash_insert fails on duplicate key */ - -typedef uchar *(*my_hash_get_key)(const uchar *,size_t*,my_bool); -typedef void (*my_hash_free_key)(void *); -typedef my_bool (*my_hash_walk_action)(void *,void *); - -typedef struct st_hash { - size_t key_offset,key_length; /* Length of key if const length */ - size_t blength; - ulong records; - uint flags; - DYNAMIC_ARRAY array; /* Place for hash_keys */ - my_hash_get_key get_key; - void (*free)(void *); - CHARSET_INFO *charset; -} HASH; - -/* A search iterator state */ -typedef uint HASH_SEARCH_STATE; - -#define my_hash_init(A,B,C,D,E,F,G,H) \ - _my_hash_init(A,0,B,C,D,E,F,G,H CALLER_INFO) -#define my_hash_init2(A,B,C,D,E,F,G,H,I) \ - _my_hash_init(A,B,C,D,E,F,G,H,I CALLER_INFO) -my_bool _my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset, - ulong default_array_elements, size_t key_offset, - size_t key_length, my_hash_get_key get_key, - void (*free_element)(void*), - uint flags CALLER_INFO_PROTO); -void my_hash_free(HASH *tree); -void my_hash_reset(HASH *hash); -uchar *my_hash_element(HASH *hash, ulong idx); -uchar *my_hash_search(const HASH *info, const uchar *key, size_t length); -uchar *my_hash_first(const HASH *info, const uchar *key, size_t length, - HASH_SEARCH_STATE *state); -uchar *my_hash_next(const HASH *info, const uchar *key, size_t length, - HASH_SEARCH_STATE *state); -my_bool my_hash_insert(HASH *info, const uchar *data); -my_bool my_hash_delete(HASH *hash, uchar *record); -my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, - size_t old_key_length); -void my_hash_replace(HASH *hash, HASH_SEARCH_STATE *state, uchar *new_row); -my_bool my_hash_check(HASH *hash); /* Only in debug library */ -my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument); - -#define my_hash_clear(H) bzero((char*) (H), sizeof(*(H))) -#define my_hash_inited(H) ((H)->array.buffer != 0) -#define my_hash_init_opt(A,B,C,D,E,F,G,H) \ - (!my_hash_inited(A) && _my_hash_init(A,0,B,C,D,E,F,G, H CALLER_INFO)) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/mysql/keycache.h b/externals/mysql/keycache.h deleted file mode 100644 index 0375d1099b..0000000000 --- a/externals/mysql/keycache.h +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/** - @file - Key cache API -*/ - -#ifndef _keycache_h -#define _keycache_h -C_MODE_START - -/* declare structures that is used by st_key_cache */ - -struct st_block_link; -typedef struct st_block_link BLOCK_LINK; -struct st_keycache_page; -typedef struct st_keycache_page KEYCACHE_PAGE; -struct st_hash_link; -typedef struct st_hash_link HASH_LINK; - -/* info about requests in a waiting queue */ -typedef struct st_keycache_wqueue -{ - struct st_my_thread_var *last_thread; /* circular list of waiting threads */ -} KEYCACHE_WQUEUE; - -/** Callback called when any block is flushed */ -typedef int (*KEYCACHE_POST_WRITE_CALLBACK)(void *arg, const uchar *buffert, - uint length, my_off_t filepos); - -#define CHANGED_BLOCKS_HASH 128 /* must be power of 2 */ - -/* - The key cache structure - It also contains read-only statistics parameters. -*/ - -typedef struct st_key_cache -{ - my_bool key_cache_inited; - my_bool in_resize; /* true during resize operation */ - my_bool resize_in_flush; /* true during flush of resize operation */ - my_bool can_be_used; /* usage of cache for read/write is allowed */ - size_t key_cache_mem_size; /* specified size of the cache memory */ - uint key_cache_block_size; /* size of the page buffer of a cache block */ - ulong min_warm_blocks; /* min number of warm blocks; */ - ulong age_threshold; /* age threshold for hot blocks */ - ulonglong keycache_time; /* total number of block link operations */ - uint hash_entries; /* max number of entries in the hash table */ - int hash_links; /* max number of hash links */ - int hash_links_used; /* number of hash links currently used */ - int disk_blocks; /* max number of blocks in the cache */ - ulong blocks_used; /* maximum number of concurrently used blocks */ - ulong blocks_unused; /* number of currently unused blocks */ - ulong blocks_changed; /* number of currently dirty blocks */ - ulong warm_blocks; /* number of blocks in warm sub-chain */ - ulong cnt_for_resize_op; /* counter to block resize operation */ - long blocks_available; /* number of blocks available in the LRU chain */ - HASH_LINK **hash_root; /* arr. of entries into hash table buckets */ - HASH_LINK *hash_link_root; /* memory for hash table links */ - HASH_LINK *free_hash_list; /* list of free hash links */ - BLOCK_LINK *free_block_list; /* list of free blocks */ - BLOCK_LINK *block_root; /* memory for block links */ - uchar HUGE_PTR *block_mem; /* memory for block buffers */ - BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */ - BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */ - pthread_mutex_t cache_lock; /* to lock access to the cache structure */ - KEYCACHE_WQUEUE resize_queue; /* threads waiting during resize operation */ - /* - Waiting for a zero resize count. Using a queue for symmetry though - only one thread can wait here. - */ - KEYCACHE_WQUEUE waiting_for_resize_cnt; - KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link */ - KEYCACHE_WQUEUE waiting_for_block; /* requests waiting for a free block */ - BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file bl.*/ - BLOCK_LINK *file_blocks[CHANGED_BLOCKS_HASH]; /* hash for other file bl.*/ - KEYCACHE_POST_WRITE_CALLBACK post_write;/**< Called when flushing any block*/ - - /* - The following variables are and variables used to hold parameters for - initializing the key cache. - */ - - ulonglong param_buff_size; /* size the memory allocated for the cache */ - ulong param_block_size; /* size of the blocks in the key cache */ - ulong param_division_limit; /* min. percentage of warm blocks */ - ulong param_age_threshold; /* determines when hot block is downgraded */ - - /* Statistics variables. These are reset in reset_key_cache_counters(). */ - ulong global_blocks_changed; /* number of currently dirty blocks */ - ulonglong global_cache_w_requests;/* number of write requests (write hits) */ - ulonglong global_cache_write; /* number of writes from cache to files */ - ulonglong global_cache_r_requests;/* number of read requests (read hits) */ - ulonglong global_cache_read; /* number of reads from files to cache */ - - int blocks; /* max number of blocks in the cache */ - my_bool in_init; /* Set to 1 in MySQL during init/resize */ -} KEY_CACHE; - -/* The default key cache */ -extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache; - -extern int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, - size_t use_mem, uint division_limit, - uint age_threshold); -extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, - size_t use_mem, uint division_limit, - uint age_threshold); -extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit, - uint age_threshold); -extern uchar *key_cache_read(KEY_CACHE *keycache, - File file, my_off_t filepos, int level, - uchar *buff, uint length, - uint block_length,int return_buffer); -extern int key_cache_insert(KEY_CACHE *keycache, - File file, my_off_t filepos, int level, - uchar *buff, uint length); -extern int key_cache_write(KEY_CACHE *keycache, - File file, my_off_t filepos, int level, - uchar *buff, uint length, - uint block_length, int force_write, - void *post_write_arg); -extern int flush_key_blocks(KEY_CACHE *keycache, - int file, enum flush_type type); -extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup); - -/* Functions to handle multiple key caches */ -extern my_bool multi_keycache_init(void); -extern void multi_keycache_free(void); -extern KEY_CACHE *multi_key_cache_search(uchar *key, uint length, - KEY_CACHE *def); -extern my_bool multi_key_cache_set(const uchar *key, uint length, - KEY_CACHE *key_cache); -extern void multi_key_cache_change(KEY_CACHE *old_data, - KEY_CACHE *new_data); -extern int reset_key_cache_counters(const char *name, - KEY_CACHE *key_cache); -C_MODE_END -#endif /* _keycache_h */ diff --git a/externals/mysql/lf.h b/externals/mysql/lf.h deleted file mode 100644 index 83358aa8e0..0000000000 --- a/externals/mysql/lf.h +++ /dev/null @@ -1,260 +0,0 @@ -/* Copyright (C) 2007-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _lf_h -#define _lf_h - -#include - -/* - Helpers to define both func() and _func(), where - func() is a _func() protected by my_atomic_rwlock_wrlock() -*/ - -#define lock_wrap(f, t, proto_args, args, lock) \ -t _ ## f proto_args; \ -static inline t f proto_args \ -{ \ - t ret; \ - my_atomic_rwlock_wrlock(lock); \ - ret= _ ## f args; \ - my_atomic_rwlock_wrunlock(lock); \ - return ret; \ -} - -#define lock_wrap_void(f, proto_args, args, lock) \ -void _ ## f proto_args; \ -static inline void f proto_args \ -{ \ - my_atomic_rwlock_wrlock(lock); \ - _ ## f args; \ - my_atomic_rwlock_wrunlock(lock); \ -} - -#define nolock_wrap(f, t, proto_args, args) \ -t _ ## f proto_args; \ -static inline t f proto_args \ -{ \ - return _ ## f args; \ -} - -#define nolock_wrap_void(f, proto_args, args) \ -void _ ## f proto_args; \ -static inline void f proto_args \ -{ \ - _ ## f args; \ -} - -/* - wait-free dynamic array, see lf_dynarray.c - - 4 levels of 256 elements each mean 4311810304 elements in an array - it - should be enough for a while -*/ -#define LF_DYNARRAY_LEVEL_LENGTH 256 -#define LF_DYNARRAY_LEVELS 4 - -typedef struct { - void * volatile level[LF_DYNARRAY_LEVELS]; - uint size_of_element; - my_atomic_rwlock_t lock; -} LF_DYNARRAY; - -typedef int (*lf_dynarray_func)(void *, void *); - -void lf_dynarray_init(LF_DYNARRAY *array, uint element_size); -void lf_dynarray_destroy(LF_DYNARRAY *array); - -nolock_wrap(lf_dynarray_value, void *, - (LF_DYNARRAY *array, uint idx), - (array, idx)) -lock_wrap(lf_dynarray_lvalue, void *, - (LF_DYNARRAY *array, uint idx), - (array, idx), - &array->lock) -nolock_wrap(lf_dynarray_iterate, int, - (LF_DYNARRAY *array, lf_dynarray_func func, void *arg), - (array, func, arg)) - -/* - pin manager for memory allocator, lf_alloc-pin.c -*/ - -#define LF_PINBOX_PINS 4 -#define LF_PURGATORY_SIZE 10 - -typedef void lf_pinbox_free_func(void *, void *, void*); - -typedef struct { - LF_DYNARRAY pinarray; - lf_pinbox_free_func *free_func; - void *free_func_arg; - uint free_ptr_offset; - uint32 volatile pinstack_top_ver; /* this is a versioned pointer */ - uint32 volatile pins_in_array; /* number of elements in array */ -} LF_PINBOX; - -typedef struct { - void * volatile pin[LF_PINBOX_PINS]; - LF_PINBOX *pinbox; - void **stack_ends_here; - void *purgatory; - uint32 purgatory_count; - uint32 volatile link; -/* we want sizeof(LF_PINS) to be 64 to avoid false sharing */ -#if SIZEOF_INT*2+SIZEOF_CHARP*(LF_PINBOX_PINS+3) != 64 - char pad[64-sizeof(uint32)*2-sizeof(void*)*(LF_PINBOX_PINS+3)]; -#endif -} LF_PINS; - -/* - shortcut macros to do an atomic_wrlock on a structure that uses pins - (e.g. lf_hash). -*/ -#define lf_rwlock_by_pins(PINS) \ - my_atomic_rwlock_wrlock(&(PINS)->pinbox->pinarray.lock) -#define lf_rwunlock_by_pins(PINS) \ - my_atomic_rwlock_wrunlock(&(PINS)->pinbox->pinarray.lock) - -/* - compile-time assert, to require "no less than N" pins - it's enough if it'll fail on at least one compiler, so - we'll enable it on GCC only, which supports zero-length arrays. -*/ -#if defined(__GNUC__) && defined(MY_LF_EXTRA_DEBUG) -#define LF_REQUIRE_PINS(N) \ - static const char require_pins[LF_PINBOX_PINS-N] \ - __attribute__ ((unused)); \ - static const int LF_NUM_PINS_IN_THIS_FILE= N; -#define _lf_pin(PINS, PIN, ADDR) \ - ( \ - assert(PIN < LF_NUM_PINS_IN_THIS_FILE), \ - my_atomic_storeptr(&(PINS)->pin[PIN], (ADDR)) \ - ) -#else -#define LF_REQUIRE_PINS(N) -#define _lf_pin(PINS, PIN, ADDR) my_atomic_storeptr(&(PINS)->pin[PIN], (ADDR)) -#endif - -#define _lf_unpin(PINS, PIN) _lf_pin(PINS, PIN, NULL) -#define lf_pin(PINS, PIN, ADDR) \ - do { \ - lf_rwlock_by_pins(PINS); \ - _lf_pin(PINS, PIN, ADDR); \ - lf_rwunlock_by_pins(PINS); \ - } while (0) -#define lf_unpin(PINS, PIN) lf_pin(PINS, PIN, NULL) -#define _lf_assert_pin(PINS, PIN) assert((PINS)->pin[PIN] != 0) -#define _lf_assert_unpin(PINS, PIN) assert((PINS)->pin[PIN] == 0) - -void lf_pinbox_init(LF_PINBOX *pinbox, uint free_ptr_offset, - lf_pinbox_free_func *free_func, void * free_func_arg); -void lf_pinbox_destroy(LF_PINBOX *pinbox); - -lock_wrap(lf_pinbox_get_pins, LF_PINS *, - (LF_PINBOX *pinbox), - (pinbox), - &pinbox->pinarray.lock) -lock_wrap_void(lf_pinbox_put_pins, - (LF_PINS *pins), - (pins), - &pins->pinbox->pinarray.lock) -lock_wrap_void(lf_pinbox_free, - (LF_PINS *pins, void *addr), - (pins, addr), - &pins->pinbox->pinarray.lock) - -/* - memory allocator, lf_alloc-pin.c -*/ - -typedef struct st_lf_allocator { - LF_PINBOX pinbox; - uchar * volatile top; - uint element_size; - uint32 volatile mallocs; - void (*constructor)(uchar *); /* called, when an object is malloc()'ed */ - void (*destructor)(uchar *); /* called, when an object is free()'d */ -} LF_ALLOCATOR; - -void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset); -void lf_alloc_destroy(LF_ALLOCATOR *allocator); -uint lf_alloc_pool_count(LF_ALLOCATOR *allocator); -/* - shortcut macros to access underlying pinbox functions from an LF_ALLOCATOR - see _lf_pinbox_get_pins() and _lf_pinbox_put_pins() -*/ -#define _lf_alloc_free(PINS, PTR) _lf_pinbox_free((PINS), (PTR)) -#define lf_alloc_free(PINS, PTR) lf_pinbox_free((PINS), (PTR)) -#define _lf_alloc_get_pins(A) _lf_pinbox_get_pins(&(A)->pinbox) -#define lf_alloc_get_pins(A) lf_pinbox_get_pins(&(A)->pinbox) -#define _lf_alloc_put_pins(PINS) _lf_pinbox_put_pins(PINS) -#define lf_alloc_put_pins(PINS) lf_pinbox_put_pins(PINS) -#define lf_alloc_direct_free(ALLOC, ADDR) my_free((uchar*)(ADDR), MYF(0)) - -lock_wrap(lf_alloc_new, void *, - (LF_PINS *pins), - (pins), - &pins->pinbox->pinarray.lock) - -/* - extendible hash, lf_hash.c -*/ -#include - -#define LF_HASH_UNIQUE 1 - -/* lf_hash overhead per element (that is, sizeof(LF_SLIST) */ -extern const int LF_HASH_OVERHEAD; - -typedef struct { - LF_DYNARRAY array; /* hash itself */ - LF_ALLOCATOR alloc; /* allocator for elements */ - my_hash_get_key get_key; /* see HASH */ - CHARSET_INFO *charset; /* see HASH */ - uint key_offset, key_length; /* see HASH */ - uint element_size; /* size of memcpy'ed area on insert */ - uint flags; /* LF_HASH_UNIQUE, etc */ - int32 volatile size; /* size of array */ - int32 volatile count; /* number of elements in the hash */ -} LF_HASH; - -void lf_hash_init(LF_HASH *hash, uint element_size, uint flags, - uint key_offset, uint key_length, my_hash_get_key get_key, - CHARSET_INFO *charset); -void lf_hash_destroy(LF_HASH *hash); -int lf_hash_insert(LF_HASH *hash, LF_PINS *pins, const void *data); -void *lf_hash_search(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen); -int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen); -/* - shortcut macros to access underlying pinbox functions from an LF_HASH - see _lf_pinbox_get_pins() and _lf_pinbox_put_pins() -*/ -#define _lf_hash_get_pins(HASH) _lf_alloc_get_pins(&(HASH)->alloc) -#define lf_hash_get_pins(HASH) lf_alloc_get_pins(&(HASH)->alloc) -#define _lf_hash_put_pins(PINS) _lf_pinbox_put_pins(PINS) -#define lf_hash_put_pins(PINS) lf_pinbox_put_pins(PINS) -#define lf_hash_search_unpin(PINS) lf_unpin((PINS), 2) -/* - cleanup -*/ - -#undef lock_wrap_void -#undef lock_wrap -#undef nolock_wrap_void -#undef nolock_wrap - -#endif - diff --git a/externals/mysql/libmysql/client.c b/externals/mysql/libmysql/client.c deleted file mode 100644 index bf4cf36339..0000000000 --- a/externals/mysql/libmysql/client.c +++ /dev/null @@ -1,3268 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - This file is included by both libmysql.c (the MySQL client C API) - and the mysqld server to connect to another MYSQL server. - - The differences for the two cases are: - - - Things that only works for the client: - - Trying to automaticly determinate user name if not supplied to - mysql_real_connect() - - Support for reading local file with LOAD DATA LOCAL - - SHARED memory handling - - Protection against sigpipe - - Prepared statements - - - Things that only works for the server - - Alarm handling on connect - - In all other cases, the code should be idential for the client and - server. -*/ - -#include - -#include "mysql.h" - -#ifndef __WIN__ -#include -#endif - -/* Remove client convenience wrappers */ -#undef max_allowed_packet -#undef net_buffer_length - -#ifdef EMBEDDED_LIBRARY - -#undef MYSQL_SERVER - -#ifndef MYSQL_CLIENT -#define MYSQL_CLIENT -#endif - -#define CLI_MYSQL_REAL_CONNECT STDCALL cli_mysql_real_connect - -#undef net_flush -my_bool net_flush(NET *net); - -#else /*EMBEDDED_LIBRARY*/ -#define CLI_MYSQL_REAL_CONNECT STDCALL mysql_real_connect -#endif /*EMBEDDED_LIBRARY*/ -#include -#include -#include -#include -#include "mysql_version.h" -#include "mysqld_error.h" -#include "errmsg.h" -#include -#if defined(THREAD) && !defined(__WIN__) -#include /* because of signal() */ -#endif /* defined(THREAD) && !defined(__WIN__) */ - -#include -#include -#include -#ifdef HAVE_PWD_H -#include -#endif -#if !defined(MSDOS) && !defined(__WIN__) -#include -#include -#include -#include -#ifdef HAVE_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#endif /*!defined(MSDOS) && !defined(__WIN__) */ -#ifdef HAVE_SYS_UN_H -# include -#endif - -#if defined(MSDOS) || defined(__WIN__) -#define perror(A) -#else -#include -#define SOCKET_ERROR -1 -#endif - -#ifdef __WIN__ -#define CONNECT_TIMEOUT 20 -#else -#define CONNECT_TIMEOUT 0 -#endif - -#include "client_settings.h" -#include - -uint mysql_port=0; -char *mysql_unix_port= 0; -const char *unknown_sqlstate= "HY000"; -const char *not_error_sqlstate= "00000"; -const char *cant_connect_sqlstate= "08001"; -#ifdef HAVE_SMEM -char *shared_memory_base_name= 0; -const char *def_shared_memory_base_name= default_shared_memory_base_name; -#endif - -static void mysql_close_free_options(MYSQL *mysql); -static void mysql_close_free(MYSQL *mysql); - -#if !(defined(__WIN__) || defined(__NETWARE__)) -static int wait_for_data(my_socket fd, uint timeout); -#endif - -CHARSET_INFO *default_client_charset_info = &my_charset_latin1; - -/* Server error code and message */ -unsigned int mysql_server_last_errno; -char mysql_server_last_error[MYSQL_ERRMSG_SIZE]; - -/**************************************************************************** - A modified version of connect(). my_connect() allows you to specify - a timeout value, in seconds, that we should wait until we - derermine we can't connect to a particular host. If timeout is 0, - my_connect() will behave exactly like connect(). - - Base version coded by Steve Bernacki, Jr. -*****************************************************************************/ - -int my_connect(my_socket fd, const struct sockaddr *name, uint namelen, - uint timeout) -{ -#if defined(__WIN__) || defined(__NETWARE__) - return connect(fd, (struct sockaddr*) name, namelen); -#else - int flags, res, s_err; - - /* - If they passed us a timeout of zero, we should behave - exactly like the normal connect() call does. - */ - - if (timeout == 0) - return connect(fd, (struct sockaddr*) name, namelen); - - flags = fcntl(fd, F_GETFL, 0); /* Set socket to not block */ -#ifdef O_NONBLOCK - fcntl(fd, F_SETFL, flags | O_NONBLOCK); /* and save the flags.. */ -#endif - - res= connect(fd, (struct sockaddr*) name, namelen); - s_err= errno; /* Save the error... */ - fcntl(fd, F_SETFL, flags); - if ((res != 0) && (s_err != EINPROGRESS)) - { - errno= s_err; /* Restore it */ - return(-1); - } - if (res == 0) /* Connected quickly! */ - return(0); - return wait_for_data(fd, timeout); -#endif -} - - -/* - Wait up to timeout seconds for a connection to be established. - - We prefer to do this with poll() as there is no limitations with this. - If not, we will use select() -*/ - -#if !(defined(__WIN__) || defined(__NETWARE__)) - -static int wait_for_data(my_socket fd, uint timeout) -{ -#ifdef HAVE_POLL - struct pollfd ufds; - int res; - - ufds.fd= fd; - ufds.events= POLLIN | POLLPRI; - if (!(res= poll(&ufds, 1, (int) timeout*1000))) - { - errno= EINTR; - return -1; - } - if (res < 0 || !(ufds.revents & (POLLIN | POLLPRI))) - return -1; - return 0; -#else - socklen_t s_err_size = sizeof(uint); - fd_set sfds; - struct timeval tv; - time_t start_time, now_time; - int res, s_err; - - if (fd >= FD_SETSIZE) /* Check if wrong error */ - return 0; /* Can't use timeout */ - - /* - Our connection is "in progress." We can use the select() call to wait - up to a specified period of time for the connection to suceed. - If select() returns 0 (after waiting howevermany seconds), our socket - never became writable (host is probably unreachable.) Otherwise, if - select() returns 1, then one of two conditions exist: - - 1. An error occured. We use getsockopt() to check for this. - 2. The connection was set up sucessfully: getsockopt() will - return 0 as an error. - - Thanks goes to Andrew Gierth - who posted this method of timing out a connect() in - comp.unix.programmer on August 15th, 1997. - */ - - FD_ZERO(&sfds); - FD_SET(fd, &sfds); - /* - select could be interrupted by a signal, and if it is, - the timeout should be adjusted and the select restarted - to work around OSes that don't restart select and - implementations of select that don't adjust tv upon - failure to reflect the time remaining - */ - start_time= my_time(0); - for (;;) - { - tv.tv_sec = (long) timeout; - tv.tv_usec = 0; -#if defined(HPUX10) && defined(THREAD) - if ((res = select(fd+1, NULL, (int*) &sfds, NULL, &tv)) > 0) - break; -#else - if ((res = select(fd+1, NULL, &sfds, NULL, &tv)) > 0) - break; -#endif - if (res == 0) /* timeout */ - return -1; - now_time= my_time(0); - timeout-= (uint) (now_time - start_time); - if (errno != EINTR || (int) timeout <= 0) - return -1; - } - - /* - select() returned something more interesting than zero, let's - see if we have any errors. If the next two statements pass, - we've got an open socket! - */ - - s_err=0; - if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (char*) &s_err, &s_err_size) != 0) - return(-1); - - if (s_err) - { /* getsockopt could succeed */ - errno = s_err; - return(-1); /* but return an error... */ - } - return (0); /* ok */ -#endif /* HAVE_POLL */ -} -#endif /* defined(__WIN__) || defined(__NETWARE__) */ - -/** - Set the internal error message to mysql handler - - @param mysql connection handle (client side) - @param errcode CR_ error code, passed to ER macro to get - error text - @parma sqlstate SQL standard sqlstate -*/ - -void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate) -{ - NET *net; - DBUG_ENTER("set_mysql_error"); - DBUG_PRINT("enter", ("error :%d '%s'", errcode, ER(errcode))); - DBUG_ASSERT(mysql != 0); - - if (mysql) - { - net= &mysql->net; - net->last_errno= errcode; - strmov(net->last_error, ER(errcode)); - strmov(net->sqlstate, sqlstate); - } - else - { - mysql_server_last_errno= errcode; - strmov(mysql_server_last_error, ER(errcode)); - } - DBUG_VOID_RETURN; -} - -/** - Clear possible error state of struct NET - - @param net clear the state of the argument -*/ - -void net_clear_error(NET *net) -{ - net->last_errno= 0; - net->last_error[0]= '\0'; - strmov(net->sqlstate, not_error_sqlstate); -} - -/** - Set an error message on the client. - - @param mysql connection handle - @param errcode CR_* errcode, for client errors - @param sqlstate SQL standard sql state, unknown_sqlstate for the - majority of client errors. - @param format error message template, in sprintf format - @param ... variable number of arguments -*/ - -static void set_mysql_extended_error(MYSQL *mysql, int errcode, - const char *sqlstate, - const char *format, ...) -{ - NET *net; - va_list args; - DBUG_ENTER("set_mysql_extended_error"); - DBUG_PRINT("enter", ("error :%d '%s'", errcode, format)); - DBUG_ASSERT(mysql != 0); - - net= &mysql->net; - net->last_errno= errcode; - va_start(args, format); - my_vsnprintf(net->last_error, sizeof(net->last_error)-1, - format, args); - va_end(args); - strmov(net->sqlstate, sqlstate); - - DBUG_VOID_RETURN; -} - - - -/* - Create a named pipe connection -*/ - -#ifdef __WIN__ - -HANDLE create_named_pipe(MYSQL *mysql, uint connect_timeout, char **arg_host, - char **arg_unix_socket) -{ - HANDLE hPipe=INVALID_HANDLE_VALUE; - char pipe_name[1024]; - DWORD dwMode; - int i; - my_bool testing_named_pipes=0; - char *host= *arg_host, *unix_socket= *arg_unix_socket; - - if ( ! unix_socket || (unix_socket)[0] == 0x00) - unix_socket = mysql_unix_port; - if (!host || !strcmp(host,LOCAL_HOST)) - host=LOCAL_HOST_NAMEDPIPE; - - - pipe_name[sizeof(pipe_name)-1]= 0; /* Safety if too long string */ - strxnmov(pipe_name, sizeof(pipe_name)-1, "\\\\", host, "\\pipe\\", - unix_socket, NullS); - DBUG_PRINT("info",("Server name: '%s'. Named Pipe: %s", host, unix_socket)); - - for (i=0 ; i < 100 ; i++) /* Don't retry forever */ - { - if ((hPipe = CreateFile(pipe_name, - GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - OPEN_EXISTING, - 0, - NULL )) != INVALID_HANDLE_VALUE) - break; - if (GetLastError() != ERROR_PIPE_BUSY) - { - set_mysql_extended_error(mysql, CR_NAMEDPIPEOPEN_ERROR, - unknown_sqlstate, ER(CR_NAMEDPIPEOPEN_ERROR), - host, unix_socket, (ulong) GetLastError()); - return INVALID_HANDLE_VALUE; - } - /* wait for for an other instance */ - if (! WaitNamedPipe(pipe_name, connect_timeout*1000) ) - { - set_mysql_extended_error(mysql, CR_NAMEDPIPEWAIT_ERROR, unknown_sqlstate, - ER(CR_NAMEDPIPEWAIT_ERROR), - host, unix_socket, (ulong) GetLastError()); - return INVALID_HANDLE_VALUE; - } - } - if (hPipe == INVALID_HANDLE_VALUE) - { - set_mysql_extended_error(mysql, CR_NAMEDPIPEOPEN_ERROR, unknown_sqlstate, - ER(CR_NAMEDPIPEOPEN_ERROR), host, unix_socket, - (ulong) GetLastError()); - return INVALID_HANDLE_VALUE; - } - dwMode = PIPE_READMODE_BYTE | PIPE_WAIT; - if ( !SetNamedPipeHandleState(hPipe, &dwMode, NULL, NULL) ) - { - CloseHandle( hPipe ); - set_mysql_extended_error(mysql, CR_NAMEDPIPESETSTATE_ERROR, - unknown_sqlstate, ER(CR_NAMEDPIPESETSTATE_ERROR), - host, unix_socket, (ulong) GetLastError()); - return INVALID_HANDLE_VALUE; - } - *arg_host=host ; *arg_unix_socket=unix_socket; /* connect arg */ - return (hPipe); -} -#endif - - -/* - Create new shared memory connection, return handler of connection - - SYNOPSIS - create_shared_memory() - mysql Pointer of mysql structure - net Pointer of net structure - connect_timeout Timeout of connection -*/ - -#ifdef HAVE_SMEM -HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout) -{ - ulong smem_buffer_length = shared_memory_buffer_length + 4; - /* - event_connect_request is event object for start connection actions - event_connect_answer is event object for confirm, that server put data - handle_connect_file_map is file-mapping object, use for create shared - memory - handle_connect_map is pointer on shared memory - handle_map is pointer on shared memory for client - event_server_wrote, - event_server_read, - event_client_wrote, - event_client_read are events for transfer data between server and client - handle_file_map is file-mapping object, use for create shared memory - */ - HANDLE event_connect_request = NULL; - HANDLE event_connect_answer = NULL; - HANDLE handle_connect_file_map = NULL; - char *handle_connect_map = NULL; - - char *handle_map = NULL; - HANDLE event_server_wrote = NULL; - HANDLE event_server_read = NULL; - HANDLE event_client_wrote = NULL; - HANDLE event_client_read = NULL; - HANDLE event_conn_closed = NULL; - HANDLE handle_file_map = NULL; - ulong connect_number; - char connect_number_char[22], *p; - char *tmp= NULL; - char *suffix_pos; - DWORD error_allow = 0; - DWORD error_code = 0; - DWORD event_access_rights= SYNCHRONIZE | EVENT_MODIFY_STATE; - char *shared_memory_base_name = mysql->options.shared_memory_base_name; - - /* - get enough space base-name + '_' + longest suffix we might ever send - */ - if (!(tmp= (char *)my_malloc(strlen(shared_memory_base_name) + 32L, MYF(MY_FAE)))) - goto err; - - /* - The name of event and file-mapping events create agree next rule: - shared_memory_base_name+unique_part - Where: - shared_memory_base_name is unique value for each server - unique_part is uniquel value for each object (events and file-mapping) - */ - suffix_pos = strxmov(tmp, "Global\\", shared_memory_base_name, "_", NullS); - strmov(suffix_pos, "CONNECT_REQUEST"); - if (!(event_connect_request= OpenEvent(event_access_rights, FALSE, tmp))) - { - error_allow = CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR; - goto err; - } - strmov(suffix_pos, "CONNECT_ANSWER"); - if (!(event_connect_answer= OpenEvent(event_access_rights,FALSE,tmp))) - { - error_allow = CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR; - goto err; - } - strmov(suffix_pos, "CONNECT_DATA"); - if (!(handle_connect_file_map= OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp))) - { - error_allow = CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR; - goto err; - } - if (!(handle_connect_map= MapViewOfFile(handle_connect_file_map, - FILE_MAP_WRITE,0,0,sizeof(DWORD)))) - { - error_allow = CR_SHARED_MEMORY_CONNECT_MAP_ERROR; - goto err; - } - - /* Send to server request of connection */ - if (!SetEvent(event_connect_request)) - { - error_allow = CR_SHARED_MEMORY_CONNECT_SET_ERROR; - goto err; - } - - /* Wait of answer from server */ - if (WaitForSingleObject(event_connect_answer,connect_timeout*1000) != - WAIT_OBJECT_0) - { - error_allow = CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR; - goto err; - } - - /* Get number of connection */ - connect_number = uint4korr(handle_connect_map);/*WAX2*/ - p= int10_to_str(connect_number, connect_number_char, 10); - - /* - The name of event and file-mapping events create agree next rule: - shared_memory_base_name+unique_part+number_of_connection - - Where: - shared_memory_base_name is uniquel value for each server - unique_part is uniquel value for each object (events and file-mapping) - number_of_connection is number of connection between server and client - */ - suffix_pos = strxmov(tmp, "Global\\", shared_memory_base_name, "_", connect_number_char, - "_", NullS); - strmov(suffix_pos, "DATA"); - if ((handle_file_map = OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_FILE_MAP_ERROR; - goto err2; - } - if ((handle_map = MapViewOfFile(handle_file_map,FILE_MAP_WRITE,0,0, - smem_buffer_length)) == NULL) - { - error_allow = CR_SHARED_MEMORY_MAP_ERROR; - goto err2; - } - - strmov(suffix_pos, "SERVER_WROTE"); - if ((event_server_wrote = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - - strmov(suffix_pos, "SERVER_READ"); - if ((event_server_read = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - - strmov(suffix_pos, "CLIENT_WROTE"); - if ((event_client_wrote = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - - strmov(suffix_pos, "CLIENT_READ"); - if ((event_client_read = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - - strmov(suffix_pos, "CONNECTION_CLOSED"); - if ((event_conn_closed = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - /* - Set event that server should send data - */ - SetEvent(event_server_read); - -err2: - if (error_allow == 0) - { - net->vio= vio_new_win32shared_memory(net,handle_file_map,handle_map, - event_server_wrote, - event_server_read,event_client_wrote, - event_client_read,event_conn_closed); - } - else - { - error_code = GetLastError(); - if (event_server_read) - CloseHandle(event_server_read); - if (event_server_wrote) - CloseHandle(event_server_wrote); - if (event_client_read) - CloseHandle(event_client_read); - if (event_client_wrote) - CloseHandle(event_client_wrote); - if (event_conn_closed) - CloseHandle(event_conn_closed); - if (handle_map) - UnmapViewOfFile(handle_map); - if (handle_file_map) - CloseHandle(handle_file_map); - } -err: - if (tmp) - my_free(tmp, MYF(0)); - if (error_allow) - error_code = GetLastError(); - if (event_connect_request) - CloseHandle(event_connect_request); - if (event_connect_answer) - CloseHandle(event_connect_answer); - if (handle_connect_map) - UnmapViewOfFile(handle_connect_map); - if (handle_connect_file_map) - CloseHandle(handle_connect_file_map); - if (error_allow) - { - if (error_allow == CR_SHARED_MEMORY_EVENT_ERROR) - set_mysql_extended_error(mysql, error_allow, unknown_sqlstate, - ER(error_allow), suffix_pos, error_code); - else - set_mysql_extended_error(mysql, error_allow, unknown_sqlstate, - ER(error_allow), error_code); - return(INVALID_HANDLE_VALUE); - } - return(handle_map); -} -#endif - -/** - Read a packet from server. Give error message if socket was down - or packet is an error message - - @retval packet_error An error occurred during reading. - Error message is set. - @retval -*/ - -ulong -cli_safe_read(MYSQL *mysql) -{ - NET *net= &mysql->net; - ulong len=0; - init_sigpipe_variables - - /* Don't give sigpipe errors if the client doesn't want them */ - set_sigpipe(mysql); - if (net->vio != 0) - len=my_net_read(net); - reset_sigpipe(mysql); - - if (len == packet_error || len == 0) - { - DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %lu", - vio_description(net->vio),len)); -#ifdef MYSQL_SERVER - if (net->vio && vio_was_interrupted(net->vio)) - return (packet_error); -#endif /*MYSQL_SERVER*/ - end_server(mysql); - set_mysql_error(mysql, net->last_errno == ER_NET_PACKET_TOO_LARGE ? - CR_NET_PACKET_TOO_LARGE: CR_SERVER_LOST, unknown_sqlstate); - return (packet_error); - } - if (net->read_pos[0] == 255) - { - if (len > 3) - { - char *pos=(char*) net->read_pos+1; - net->last_errno=uint2korr(pos); - pos+=2; - len-=2; - if (protocol_41(mysql) && pos[0] == '#') - { - strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH); - pos+= SQLSTATE_LENGTH+1; - } - else - { - /* - The SQL state hasn't been received -- it should be reset to HY000 - (unknown error sql state). - */ - - strmov(net->sqlstate, unknown_sqlstate); - } - - (void) strmake(net->last_error,(char*) pos, - min((uint) len,(uint) sizeof(net->last_error)-1)); - } - else - set_mysql_error(mysql, CR_UNKNOWN_ERROR, unknown_sqlstate); - /* - Cover a protocol design error: error packet does not - contain the server status. Therefore, the client has no way - to find out whether there are more result sets of - a multiple-result-set statement pending. Luckily, in 5.0 an - error always aborts execution of a statement, wherever it is - a multi-statement or a stored procedure, so it should be - safe to unconditionally turn off the flag here. - */ - mysql->server_status&= ~SERVER_MORE_RESULTS_EXISTS; - - DBUG_PRINT("error",("Got error: %d/%s (%s)", - net->last_errno, - net->sqlstate, - net->last_error)); - return(packet_error); - } - return len; -} - -void free_rows(MYSQL_DATA *cur) -{ - if (cur) - { - free_root(&cur->alloc,MYF(0)); - my_free((uchar*) cur,MYF(0)); - } -} - -my_bool -cli_advanced_command(MYSQL *mysql, enum enum_server_command command, - const uchar *header, ulong header_length, - const uchar *arg, ulong arg_length, my_bool skip_check, - MYSQL_STMT *stmt) -{ - NET *net= &mysql->net; - my_bool result= 1; - init_sigpipe_variables - my_bool stmt_skip= stmt ? stmt->state != MYSQL_STMT_INIT_DONE : FALSE; - DBUG_ENTER("cli_advanced_command"); - - /* Don't give sigpipe errors if the client doesn't want them */ - set_sigpipe(mysql); - - if (mysql->net.vio == 0) - { /* Do reconnect if possible */ - if (mysql_reconnect(mysql) || stmt_skip) - DBUG_RETURN(1); - } - if (mysql->status != MYSQL_STATUS_READY || - mysql->server_status & SERVER_MORE_RESULTS_EXISTS) - { - DBUG_PRINT("error",("state: %d", mysql->status)); - set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate); - DBUG_RETURN(1); - } - - net_clear_error(net); - mysql->info=0; - mysql->affected_rows= ~(my_ulonglong) 0; - /* - We don't want to clear the protocol buffer on COM_QUIT, because if - the previous command was a shutdown command, we may have the - response for the COM_QUIT already in the communication buffer - */ - net_clear(&mysql->net, (command != COM_QUIT)); - - if (net_write_command(net,(uchar) command, header, header_length, - arg, arg_length)) - { - DBUG_PRINT("error",("Can't send command to server. Error: %d", - socket_errno)); - if (net->last_errno == ER_NET_PACKET_TOO_LARGE) - { - set_mysql_error(mysql, CR_NET_PACKET_TOO_LARGE, unknown_sqlstate); - goto end; - } - end_server(mysql); - if (mysql_reconnect(mysql) || stmt_skip) - goto end; - if (net_write_command(net,(uchar) command, header, header_length, - arg, arg_length)) - { - set_mysql_error(mysql, CR_SERVER_GONE_ERROR, unknown_sqlstate); - goto end; - } - } - result=0; - if (!skip_check) - result= ((mysql->packet_length=cli_safe_read(mysql)) == packet_error ? - 1 : 0); -end: - reset_sigpipe(mysql); - DBUG_PRINT("exit",("result: %d", result)); - DBUG_RETURN(result); -} - -void free_old_query(MYSQL *mysql) -{ - DBUG_ENTER("free_old_query"); - if (mysql->fields) - free_root(&mysql->field_alloc,MYF(0)); - init_alloc_root(&mysql->field_alloc,8192,0); /* Assume rowlength < 8192 */ - mysql->fields= 0; - mysql->field_count= 0; /* For API */ - mysql->warning_count= 0; - mysql->info= 0; - DBUG_VOID_RETURN; -} - - -/** - Finish reading of a partial result set from the server. - Get the EOF packet, and update mysql->status - and mysql->warning_count. - - @return TRUE if a communication or protocol error, an error - is set in this case, FALSE otherwise. -*/ - -my_bool flush_one_result(MYSQL *mysql) -{ - ulong packet_length; - - DBUG_ASSERT(mysql->status != MYSQL_STATUS_READY); - - do - { - packet_length= cli_safe_read(mysql); - /* - There is an error reading from the connection, - or (sic!) there were no error and no - data in the stream, i.e. no more data from the server. - Since we know our position in the stream (somewhere in - the middle of a result set), this latter case is an error too - -- each result set must end with a EOF packet. - cli_safe_read() has set an error for us, just return. - */ - if (packet_length == packet_error) - return TRUE; - } - while (packet_length > 8 || mysql->net.read_pos[0] != 254); - - /* Analyze EOF packet of the result set. */ - - if (protocol_41(mysql)) - { - char *pos= (char*) mysql->net.read_pos + 1; - mysql->warning_count=uint2korr(pos); - pos+=2; - mysql->server_status=uint2korr(pos); - pos+=2; - } - return FALSE; -} - - -/** - Read a packet from network. If it's an OK packet, flush it. - - @return TRUE if error, FALSE otherwise. In case of - success, is_ok_packet is set to TRUE or FALSE, - based on what we got from network. -*/ - -my_bool opt_flush_ok_packet(MYSQL *mysql, my_bool *is_ok_packet) -{ - ulong packet_length= cli_safe_read(mysql); - - if (packet_length == packet_error) - return TRUE; - - /* cli_safe_read always reads a non-empty packet. */ - DBUG_ASSERT(packet_length); - - *is_ok_packet= mysql->net.read_pos[0] == 0; - if (*is_ok_packet) - { - uchar *pos= mysql->net.read_pos + 1; - - net_field_length_ll(&pos); /* affected rows */ - net_field_length_ll(&pos); /* insert id */ - - mysql->server_status=uint2korr(pos); - pos+=2; - - if (protocol_41(mysql)) - { - mysql->warning_count=uint2korr(pos); - pos+=2; - } - } - return FALSE; -} - - -/* - Flush result set sent from server -*/ - -static void cli_flush_use_result(MYSQL *mysql, my_bool flush_all_results) -{ - /* Clear the current execution status */ - DBUG_ENTER("cli_flush_use_result"); - DBUG_PRINT("warning",("Not all packets read, clearing them")); - - if (flush_one_result(mysql)) - DBUG_VOID_RETURN; /* An error occurred */ - - if (! flush_all_results) - DBUG_VOID_RETURN; - - while (mysql->server_status & SERVER_MORE_RESULTS_EXISTS) - { - my_bool is_ok_packet; - if (opt_flush_ok_packet(mysql, &is_ok_packet)) - DBUG_VOID_RETURN; /* An error occurred. */ - if (is_ok_packet) - { - /* - Indeed what we got from network was an OK packet, and we - know that OK is the last one in a multi-result-set, so - just return. - */ - DBUG_VOID_RETURN; - } - /* - It's a result set, not an OK packet. A result set contains - of two result set subsequences: field metadata, terminated - with EOF packet, and result set data, again terminated with - EOF packet. Read and flush them. - */ - if (flush_one_result(mysql) || flush_one_result(mysql)) - DBUG_VOID_RETURN; /* An error occurred. */ - } - - DBUG_VOID_RETURN; -} - - -#ifdef __WIN__ -static my_bool is_NT(void) -{ - char *os=getenv("OS"); - return (os && !strcmp(os, "Windows_NT")) ? 1 : 0; -} -#endif - - -#ifdef CHECK_LICENSE -/** - Check server side variable 'license'. - - If the variable does not exist or does not contain 'Commercial', - we're talking to non-commercial server from commercial client. - - @retval 0 success - @retval !0 network error or the server is not commercial. - Error code is saved in mysql->net.last_errno. -*/ - -static int check_license(MYSQL *mysql) -{ - MYSQL_ROW row; - MYSQL_RES *res; - NET *net= &mysql->net; - static const char query[]= "SELECT @@license"; - static const char required_license[]= STRINGIFY_ARG(LICENSE); - - if (mysql_real_query(mysql, query, sizeof(query)-1)) - { - if (net->last_errno == ER_UNKNOWN_SYSTEM_VARIABLE) - { - set_mysql_extended_error(mysql, CR_WRONG_LICENSE, unknown_sqlstate, - ER(CR_WRONG_LICENSE), required_license); - } - return 1; - } - if (!(res= mysql_use_result(mysql))) - return 1; - row= mysql_fetch_row(res); - /* - If no rows in result set, or column value is NULL (none of these - two is ever true for server variables now), or column value - mismatch, set wrong license error. - */ - if (!net->last_errno && - (!row || !row[0] || - strncmp(row[0], required_license, sizeof(required_license)))) - { - set_mysql_extended_error(mysql, CR_WRONG_LICENSE, unknown_sqlstate, - ER(CR_WRONG_LICENSE), required_license); - } - mysql_free_result(res); - return net->last_errno; -} -#endif /* CHECK_LICENSE */ - - -/************************************************************************** - Shut down connection -**************************************************************************/ - -void end_server(MYSQL *mysql) -{ - int save_errno= errno; - DBUG_ENTER("end_server"); - if (mysql->net.vio != 0) - { - init_sigpipe_variables - DBUG_PRINT("info",("Net: %s", vio_description(mysql->net.vio))); - set_sigpipe(mysql); - vio_delete(mysql->net.vio); - reset_sigpipe(mysql); - mysql->net.vio= 0; /* Marker */ - } - net_end(&mysql->net); - free_old_query(mysql); - errno= save_errno; - DBUG_VOID_RETURN; -} - - -void STDCALL -mysql_free_result(MYSQL_RES *result) -{ - DBUG_ENTER("mysql_free_result"); - DBUG_PRINT("enter",("mysql_res: %p", result)); - if (result) - { - MYSQL *mysql= result->handle; - if (mysql) - { - if (mysql->unbuffered_fetch_owner == &result->unbuffered_fetch_cancelled) - mysql->unbuffered_fetch_owner= 0; - if (mysql->status == MYSQL_STATUS_USE_RESULT) - { - (*mysql->methods->flush_use_result)(mysql, FALSE); - mysql->status=MYSQL_STATUS_READY; - if (mysql->unbuffered_fetch_owner) - *mysql->unbuffered_fetch_owner= TRUE; - } - } - free_rows(result->data); - if (result->fields) - free_root(&result->field_alloc,MYF(0)); - if (result->row) - my_free((uchar*) result->row,MYF(0)); - my_free((uchar*) result,MYF(0)); - } - DBUG_VOID_RETURN; -} - -/**************************************************************************** - Get options from my.cnf -****************************************************************************/ - -static const char *default_options[]= -{ - "port","socket","compress","password","pipe", "timeout", "user", - "init-command", "host", "database", "debug", "return-found-rows", - "ssl-key" ,"ssl-cert" ,"ssl-ca" ,"ssl-capath", - "character-sets-dir", "default-character-set", "interactive-timeout", - "connect-timeout", "local-infile", "disable-local-infile", - "ssl-cipher", "max-allowed-packet", "protocol", "shared-memory-base-name", - "multi-results", "multi-statements", "multi-queries", "secure-auth", - "report-data-truncation", - NullS -}; - -static TYPELIB option_types={array_elements(default_options)-1, - "options",default_options, NULL}; - -const char *sql_protocol_names_lib[] = -{ "TCP", "SOCKET", "PIPE", "MEMORY", NullS }; -TYPELIB sql_protocol_typelib = {array_elements(sql_protocol_names_lib)-1,"", - sql_protocol_names_lib, NULL}; - -static int add_init_command(struct st_mysql_options *options, const char *cmd) -{ - char *tmp; - - if (!options->init_commands) - { - options->init_commands= (DYNAMIC_ARRAY*)my_malloc(sizeof(DYNAMIC_ARRAY), - MYF(MY_WME)); - init_dynamic_array(options->init_commands,sizeof(char*),5,5 CALLER_INFO); - } - - if (!(tmp= my_strdup(cmd,MYF(MY_WME))) || - insert_dynamic(options->init_commands, (uchar*)&tmp)) - { - my_free(tmp, MYF(MY_ALLOW_ZERO_PTR)); - return 1; - } - - return 0; -} - -void mysql_read_default_options(struct st_mysql_options *options, - const char *filename,const char *group) -{ - int argc; - char *argv_buff[1],**argv; - const char *groups[3]; - DBUG_ENTER("mysql_read_default_options"); - DBUG_PRINT("enter",("file: %s group: %s",filename,group ? group :"NULL")); - - argc=1; argv=argv_buff; argv_buff[0]= (char*) "client"; - groups[0]= (char*) "client"; groups[1]= (char*) group; groups[2]=0; - - my_load_defaults(filename, groups, &argc, &argv, NULL); - if (argc != 1) /* If some default option */ - { - char **option=argv; - while (*++option) - { - if (option[0] == args_separator) /* skip arguments separator */ - continue; - /* DBUG_PRINT("info",("option: %s",option[0])); */ - if (option[0][0] == '-' && option[0][1] == '-') - { - char *end=strcend(*option,'='); - char *opt_arg=0; - if (*end) - { - opt_arg=end+1; - *end=0; /* Remove '=' */ - } - /* Change all '_' in variable name to '-' */ - for (end= *option ; *(end= strcend(end,'_')) ; ) - *end= '-'; - switch (find_type(*option+2,&option_types,2)) { - case 1: /* port */ - if (opt_arg) - options->port=atoi(opt_arg); - break; - case 2: /* socket */ - if (opt_arg) - { - my_free(options->unix_socket,MYF(MY_ALLOW_ZERO_PTR)); - options->unix_socket=my_strdup(opt_arg,MYF(MY_WME)); - } - break; - case 3: /* compress */ - options->compress=1; - options->client_flag|= CLIENT_COMPRESS; - break; - case 4: /* password */ - if (opt_arg) - { - my_free(options->password,MYF(MY_ALLOW_ZERO_PTR)); - options->password=my_strdup(opt_arg,MYF(MY_WME)); - } - break; - case 5: - options->protocol = MYSQL_PROTOCOL_PIPE; - case 20: /* connect_timeout */ - case 6: /* timeout */ - if (opt_arg) - options->connect_timeout=atoi(opt_arg); - break; - case 7: /* user */ - if (opt_arg) - { - my_free(options->user,MYF(MY_ALLOW_ZERO_PTR)); - options->user=my_strdup(opt_arg,MYF(MY_WME)); - } - break; - case 8: /* init-command */ - add_init_command(options,opt_arg); - break; - case 9: /* host */ - if (opt_arg) - { - my_free(options->host,MYF(MY_ALLOW_ZERO_PTR)); - options->host=my_strdup(opt_arg,MYF(MY_WME)); - } - break; - case 10: /* database */ - if (opt_arg) - { - my_free(options->db,MYF(MY_ALLOW_ZERO_PTR)); - options->db=my_strdup(opt_arg,MYF(MY_WME)); - } - break; - case 11: /* debug */ -#ifdef MYSQL_CLIENT - mysql_debug(opt_arg ? opt_arg : "d:t:o,/tmp/client.trace"); - break; -#endif - case 12: /* return-found-rows */ - options->client_flag|=CLIENT_FOUND_ROWS; - break; -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - case 13: /* ssl_key */ - my_free(options->ssl_key, MYF(MY_ALLOW_ZERO_PTR)); - options->ssl_key = my_strdup(opt_arg, MYF(MY_WME)); - break; - case 14: /* ssl_cert */ - my_free(options->ssl_cert, MYF(MY_ALLOW_ZERO_PTR)); - options->ssl_cert = my_strdup(opt_arg, MYF(MY_WME)); - break; - case 15: /* ssl_ca */ - my_free(options->ssl_ca, MYF(MY_ALLOW_ZERO_PTR)); - options->ssl_ca = my_strdup(opt_arg, MYF(MY_WME)); - break; - case 16: /* ssl_capath */ - my_free(options->ssl_capath, MYF(MY_ALLOW_ZERO_PTR)); - options->ssl_capath = my_strdup(opt_arg, MYF(MY_WME)); - break; - case 23: /* ssl_cipher */ - my_free(options->ssl_cipher, MYF(MY_ALLOW_ZERO_PTR)); - options->ssl_cipher= my_strdup(opt_arg, MYF(MY_WME)); - break; -#else - case 13: /* Ignore SSL options */ - case 14: - case 15: - case 16: - case 23: - break; -#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ - case 17: /* charset-lib */ - my_free(options->charset_dir,MYF(MY_ALLOW_ZERO_PTR)); - options->charset_dir = my_strdup(opt_arg, MYF(MY_WME)); - break; - case 18: - my_free(options->charset_name,MYF(MY_ALLOW_ZERO_PTR)); - options->charset_name = my_strdup(opt_arg, MYF(MY_WME)); - break; - case 19: /* Interactive-timeout */ - options->client_flag|= CLIENT_INTERACTIVE; - break; - case 21: - if (!opt_arg || atoi(opt_arg) != 0) - options->client_flag|= CLIENT_LOCAL_FILES; - else - options->client_flag&= ~CLIENT_LOCAL_FILES; - break; - case 22: - options->client_flag&= ~CLIENT_LOCAL_FILES; - break; - case 24: /* max-allowed-packet */ - if (opt_arg) - options->max_allowed_packet= atoi(opt_arg); - break; - case 25: /* protocol */ - if ((options->protocol= find_type(opt_arg, - &sql_protocol_typelib,0)) <= 0) - { - fprintf(stderr, "Unknown option to protocol: %s\n", opt_arg); - exit(1); - } - break; - case 26: /* shared_memory_base_name */ -#ifdef HAVE_SMEM - if (options->shared_memory_base_name != def_shared_memory_base_name) - my_free(options->shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); - options->shared_memory_base_name=my_strdup(opt_arg,MYF(MY_WME)); -#endif - break; - case 27: /* multi-results */ - options->client_flag|= CLIENT_MULTI_RESULTS; - break; - case 28: /* multi-statements */ - case 29: /* multi-queries */ - options->client_flag|= CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS; - break; - case 30: /* secure-auth */ - options->secure_auth= TRUE; - break; - case 31: /* report-data-truncation */ - options->report_data_truncation= opt_arg ? test(atoi(opt_arg)) : 1; - break; - default: - DBUG_PRINT("warning",("unknown option: %s",option[0])); - } - } - } - } - free_defaults(argv); - DBUG_VOID_RETURN; -} - - -/************************************************************************** - Get column lengths of the current row - If one uses mysql_use_result, res->lengths contains the length information, - else the lengths are calculated from the offset between pointers. -**************************************************************************/ - -static void cli_fetch_lengths(ulong *to, MYSQL_ROW column, - unsigned int field_count) -{ - ulong *prev_length; - char *start=0; - MYSQL_ROW end; - - prev_length=0; /* Keep gcc happy */ - for (end=column + field_count + 1 ; column != end ; column++, to++) - { - if (!*column) - { - *to= 0; /* Null */ - continue; - } - if (start) /* Found end of prev string */ - *prev_length= (ulong) (*column-start-1); - start= *column; - prev_length= to; - } -} - -/*************************************************************************** - Change field rows to field structs -***************************************************************************/ - -MYSQL_FIELD * -unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, - my_bool default_value, uint server_capabilities) -{ - MYSQL_ROWS *row; - MYSQL_FIELD *field,*result; - ulong lengths[9]; /* Max of fields */ - DBUG_ENTER("unpack_fields"); - - field= result= (MYSQL_FIELD*) alloc_root(alloc, - (uint) sizeof(*field)*fields); - if (!result) - { - free_rows(data); /* Free old data */ - DBUG_RETURN(0); - } - bzero((char*) field, (uint) sizeof(MYSQL_FIELD)*fields); - if (server_capabilities & CLIENT_PROTOCOL_41) - { - /* server is 4.1, and returns the new field result format */ - for (row=data->data; row ; row = row->next,field++) - { - uchar *pos; - /* fields count may be wrong */ - DBUG_ASSERT((uint) (field - result) < fields); - cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7); - field->catalog= strmake_root(alloc,(char*) row->data[0], lengths[0]); - field->db= strmake_root(alloc,(char*) row->data[1], lengths[1]); - field->table= strmake_root(alloc,(char*) row->data[2], lengths[2]); - field->org_table= strmake_root(alloc,(char*) row->data[3], lengths[3]); - field->name= strmake_root(alloc,(char*) row->data[4], lengths[4]); - field->org_name= strmake_root(alloc,(char*) row->data[5], lengths[5]); - - field->catalog_length= lengths[0]; - field->db_length= lengths[1]; - field->table_length= lengths[2]; - field->org_table_length= lengths[3]; - field->name_length= lengths[4]; - field->org_name_length= lengths[5]; - - /* Unpack fixed length parts */ - pos= (uchar*) row->data[6]; - field->charsetnr= uint2korr(pos); - field->length= (uint) uint4korr(pos+2); - field->type= (enum enum_field_types) pos[6]; - field->flags= uint2korr(pos+7); - field->decimals= (uint) pos[9]; - - if (INTERNAL_NUM_FIELD(field)) - field->flags|= NUM_FLAG; - if (default_value && row->data[7]) - { - field->def=strmake_root(alloc,(char*) row->data[7], lengths[7]); - field->def_length= lengths[7]; - } - else - field->def=0; - field->max_length= 0; - } - } -#ifndef DELETE_SUPPORT_OF_4_0_PROTOCOL - else - { - /* old protocol, for backward compatibility */ - for (row=data->data; row ; row = row->next,field++) - { - cli_fetch_lengths(&lengths[0], row->data, default_value ? 6 : 5); - field->org_table= field->table= strdup_root(alloc,(char*) row->data[0]); - field->name= strdup_root(alloc,(char*) row->data[1]); - field->length= (uint) uint3korr(row->data[2]); - field->type= (enum enum_field_types) (uchar) row->data[3][0]; - - field->catalog=(char*) ""; - field->db= (char*) ""; - field->catalog_length= 0; - field->db_length= 0; - field->org_table_length= field->table_length= lengths[0]; - field->name_length= lengths[1]; - - if (server_capabilities & CLIENT_LONG_FLAG) - { - field->flags= uint2korr(row->data[4]); - field->decimals=(uint) (uchar) row->data[4][2]; - } - else - { - field->flags= (uint) (uchar) row->data[4][0]; - field->decimals=(uint) (uchar) row->data[4][1]; - } - if (INTERNAL_NUM_FIELD(field)) - field->flags|= NUM_FLAG; - if (default_value && row->data[5]) - { - field->def=strdup_root(alloc,(char*) row->data[5]); - field->def_length= lengths[5]; - } - else - field->def=0; - field->max_length= 0; - } - } -#endif /* DELETE_SUPPORT_OF_4_0_PROTOCOL */ - free_rows(data); /* Free old data */ - DBUG_RETURN(result); -} - -/* Read all rows (fields or data) from server */ - -MYSQL_DATA *cli_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields, - unsigned int fields) -{ - uint field; - ulong pkt_len; - ulong len; - uchar *cp; - char *to, *end_to; - MYSQL_DATA *result; - MYSQL_ROWS **prev_ptr,*cur; - NET *net = &mysql->net; - DBUG_ENTER("cli_read_rows"); - - if ((pkt_len= cli_safe_read(mysql)) == packet_error) - DBUG_RETURN(0); - if (!(result=(MYSQL_DATA*) my_malloc(sizeof(MYSQL_DATA), - MYF(MY_WME | MY_ZEROFILL)))) - { - set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate); - DBUG_RETURN(0); - } - init_alloc_root(&result->alloc,8192,0); /* Assume rowlength < 8192 */ - result->alloc.min_malloc=sizeof(MYSQL_ROWS); - prev_ptr= &result->data; - result->rows=0; - result->fields=fields; - - /* - The last EOF packet is either a single 254 character or (in MySQL 4.1) - 254 followed by 1-7 status bytes. - - This doesn't conflict with normal usage of 254 which stands for a - string where the length of the string is 8 bytes. (see net_field_length()) - */ - - while (*(cp=net->read_pos) != 254 || pkt_len >= 8) - { - result->rows++; - if (!(cur= (MYSQL_ROWS*) alloc_root(&result->alloc, - sizeof(MYSQL_ROWS))) || - !(cur->data= ((MYSQL_ROW) - alloc_root(&result->alloc, - (fields+1)*sizeof(char *)+pkt_len)))) - { - free_rows(result); - set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate); - DBUG_RETURN(0); - } - *prev_ptr=cur; - prev_ptr= &cur->next; - to= (char*) (cur->data+fields+1); - end_to=to+pkt_len-1; - for (field=0 ; field < fields ; field++) - { - if ((len=(ulong) net_field_length(&cp)) == NULL_LENGTH) - { /* null field */ - cur->data[field] = 0; - } - else - { - cur->data[field] = to; - if (len > (ulong) (end_to - to)) - { - free_rows(result); - set_mysql_error(mysql, CR_MALFORMED_PACKET, unknown_sqlstate); - DBUG_RETURN(0); - } - memcpy(to,(char*) cp,len); to[len]=0; - to+=len+1; - cp+=len; - if (mysql_fields) - { - if (mysql_fields[field].max_length < len) - mysql_fields[field].max_length=len; - } - } - } - cur->data[field]=to; /* End of last field */ - if ((pkt_len=cli_safe_read(mysql)) == packet_error) - { - free_rows(result); - DBUG_RETURN(0); - } - } - *prev_ptr=0; /* last pointer is null */ - if (pkt_len > 1) /* MySQL 4.1 protocol */ - { - mysql->warning_count= uint2korr(cp+1); - mysql->server_status= uint2korr(cp+3); - DBUG_PRINT("info",("status: %u warning_count: %u", - mysql->server_status, mysql->warning_count)); - } - DBUG_PRINT("exit", ("Got %lu rows", (ulong) result->rows)); - DBUG_RETURN(result); -} - -/* - Read one row. Uses packet buffer as storage for fields. - When next packet is read, the previous field values are destroyed -*/ - - -static int -read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths) -{ - uint field; - ulong pkt_len,len; - uchar *pos, *prev_pos, *end_pos; - NET *net= &mysql->net; - - if ((pkt_len=cli_safe_read(mysql)) == packet_error) - return -1; - if (pkt_len <= 8 && net->read_pos[0] == 254) - { - if (pkt_len > 1) /* MySQL 4.1 protocol */ - { - mysql->warning_count= uint2korr(net->read_pos+1); - mysql->server_status= uint2korr(net->read_pos+3); - } - return 1; /* End of data */ - } - prev_pos= 0; /* allowed to write at packet[-1] */ - pos=net->read_pos; - end_pos=pos+pkt_len; - for (field=0 ; field < fields ; field++) - { - if ((len=(ulong) net_field_length(&pos)) == NULL_LENGTH) - { /* null field */ - row[field] = 0; - *lengths++=0; - } - else - { - if (len > (ulong) (end_pos - pos)) - { - set_mysql_error(mysql, CR_UNKNOWN_ERROR, unknown_sqlstate); - return -1; - } - row[field] = (char*) pos; - pos+=len; - *lengths++=len; - } - if (prev_pos) - *prev_pos=0; /* Terminate prev field */ - prev_pos=pos; - } - row[field]=(char*) prev_pos+1; /* End of last field */ - *prev_pos=0; /* Terminate last field */ - return 0; -} - - -/**************************************************************************** - Init MySQL structure or allocate one -****************************************************************************/ - -MYSQL * STDCALL -mysql_init(MYSQL *mysql) -{ - if (mysql_server_init(0, NULL, NULL)) - return 0; - if (!mysql) - { - if (!(mysql=(MYSQL*) my_malloc(sizeof(*mysql),MYF(MY_WME | MY_ZEROFILL)))) - { - set_mysql_error(NULL, CR_OUT_OF_MEMORY, unknown_sqlstate); - return 0; - } - mysql->free_me=1; - } - else - bzero((char*) (mysql), sizeof(*(mysql))); - mysql->options.connect_timeout= CONNECT_TIMEOUT; - mysql->charset=default_client_charset_info; - strmov(mysql->net.sqlstate, not_error_sqlstate); - - /* - Only enable LOAD DATA INFILE by default if configured with - --enable-local-infile - */ - -#if defined(ENABLED_LOCAL_INFILE) && !defined(MYSQL_SERVER) - mysql->options.client_flag|= CLIENT_LOCAL_FILES; -#endif - -#ifdef HAVE_SMEM - mysql->options.shared_memory_base_name= (char*) def_shared_memory_base_name; -#endif - - mysql->options.methods_to_use= MYSQL_OPT_GUESS_CONNECTION; - mysql->options.report_data_truncation= TRUE; /* default */ - - /* - By default we don't reconnect because it could silently corrupt data (after - reconnection you potentially lose table locks, user variables, session - variables (transactions but they are specifically dealt with in - mysql_reconnect()). - This is a change: < 5.0.3 mysql->reconnect was set to 1 by default. - How this change impacts existing apps: - - existing apps which relyed on the default will see a behaviour change; - they will have to set reconnect=1 after mysql_real_connect(). - - existing apps which explicitely asked for reconnection (the only way they - could do it was by setting mysql.reconnect to 1 after mysql_real_connect()) - will not see a behaviour change. - - existing apps which explicitely asked for no reconnection - (mysql.reconnect=0) will not see a behaviour change. - */ - mysql->reconnect= 0; - - return mysql; -} - - -/* - Fill in SSL part of MYSQL structure and set 'use_ssl' flag. - NB! Errors are not reported until you do mysql_real_connect. -*/ - -#define strdup_if_not_null(A) (A) == 0 ? 0 : my_strdup((A),MYF(MY_WME)) - -my_bool STDCALL -mysql_ssl_set(MYSQL *mysql __attribute__((unused)) , - const char *key __attribute__((unused)), - const char *cert __attribute__((unused)), - const char *ca __attribute__((unused)), - const char *capath __attribute__((unused)), - const char *cipher __attribute__((unused))) -{ - DBUG_ENTER("mysql_ssl_set"); -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - mysql->options.ssl_key= strdup_if_not_null(key); - mysql->options.ssl_cert= strdup_if_not_null(cert); - mysql->options.ssl_ca= strdup_if_not_null(ca); - mysql->options.ssl_capath= strdup_if_not_null(capath); - mysql->options.ssl_cipher= strdup_if_not_null(cipher); -#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ - DBUG_RETURN(0); -} - - -/* - Free strings in the SSL structure and clear 'use_ssl' flag. - NB! Errors are not reported until you do mysql_real_connect. -*/ - -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - -static void -mysql_ssl_free(MYSQL *mysql __attribute__((unused))) -{ - struct st_VioSSLFd *ssl_fd= (struct st_VioSSLFd*) mysql->connector_fd; - DBUG_ENTER("mysql_ssl_free"); - - my_free(mysql->options.ssl_key, MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.ssl_cert, MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.ssl_ca, MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.ssl_capath, MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.ssl_cipher, MYF(MY_ALLOW_ZERO_PTR)); - if (ssl_fd) - SSL_CTX_free(ssl_fd->ssl_context); - my_free(mysql->connector_fd,MYF(MY_ALLOW_ZERO_PTR)); - mysql->options.ssl_key = 0; - mysql->options.ssl_cert = 0; - mysql->options.ssl_ca = 0; - mysql->options.ssl_capath = 0; - mysql->options.ssl_cipher= 0; - mysql->options.use_ssl = FALSE; - mysql->connector_fd = 0; - DBUG_VOID_RETURN; -} - -#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ - -/* - Return the SSL cipher (if any) used for current - connection to the server. - - SYNOPSYS - mysql_get_ssl_cipher() - mysql pointer to the mysql connection - -*/ - -const char * STDCALL -mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) -{ - DBUG_ENTER("mysql_get_ssl_cipher"); -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - if (mysql->net.vio && mysql->net.vio->ssl_arg) - DBUG_RETURN(SSL_get_cipher_name((SSL*)mysql->net.vio->ssl_arg)); -#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ - DBUG_RETURN(NULL); -} - - -/* - Check the server's (subject) Common Name against the - hostname we connected to - - SYNOPSIS - ssl_verify_server_cert() - vio pointer to a SSL connected vio - server_hostname name of the server that we connected to - - RETURN VALUES - 0 Success - 1 Failed to validate server - - */ - -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - -static int ssl_verify_server_cert(Vio *vio, const char* server_hostname) -{ - SSL *ssl; - X509 *server_cert; - char *cp1, *cp2; - char buf[256]; - DBUG_ENTER("ssl_verify_server_cert"); - DBUG_PRINT("enter", ("server_hostname: %s", server_hostname)); - - if (!(ssl= (SSL*)vio->ssl_arg)) - { - DBUG_PRINT("error", ("No SSL pointer found")); - DBUG_RETURN(1); - } - - if (!server_hostname) - { - DBUG_PRINT("error", ("No server hostname supplied")); - DBUG_RETURN(1); - } - - if (!(server_cert= SSL_get_peer_certificate(ssl))) - { - DBUG_PRINT("error", ("Could not get server certificate")); - DBUG_RETURN(1); - } - - /* - We already know that the certificate exchanged was valid; the SSL library - handled that. Now we need to verify that the contents of the certificate - are what we expect. - */ - - X509_NAME_oneline(X509_get_subject_name(server_cert), buf, sizeof(buf)); - X509_free (server_cert); - - DBUG_PRINT("info", ("hostname in cert: %s", buf)); - cp1= strstr(buf, "/CN="); - if (cp1) - { - cp1+= 4; /* Skip the "/CN=" that we found */ - /* Search for next / which might be the delimiter for email */ - cp2= strchr(cp1, '/'); - if (cp2) - *cp2= '\0'; - DBUG_PRINT("info", ("Server hostname in cert: %s", cp1)); - if (!strcmp(cp1, server_hostname)) - { - /* Success */ - DBUG_RETURN(0); - } - } - DBUG_PRINT("error", ("SSL certificate validation failure")); - DBUG_RETURN(1); -} - -#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ - - -/* - Note that the mysql argument must be initialized with mysql_init() - before calling mysql_real_connect ! -*/ - -static my_bool cli_read_query_result(MYSQL *mysql); -static MYSQL_RES *cli_use_result(MYSQL *mysql); - -static MYSQL_METHODS client_methods= -{ - cli_read_query_result, /* read_query_result */ - cli_advanced_command, /* advanced_command */ - cli_read_rows, /* read_rows */ - cli_use_result, /* use_result */ - cli_fetch_lengths, /* fetch_lengths */ - cli_flush_use_result /* flush_use_result */ -#ifndef MYSQL_SERVER - ,cli_list_fields, /* list_fields */ - cli_read_prepare_result, /* read_prepare_result */ - cli_stmt_execute, /* stmt_execute */ - cli_read_binary_rows, /* read_binary_rows */ - cli_unbuffered_fetch, /* unbuffered_fetch */ - NULL, /* free_embedded_thd */ - cli_read_statistics, /* read_statistics */ - cli_read_query_result, /* next_result */ - cli_read_change_user_result, /* read_change_user_result */ - cli_read_binary_rows /* read_rows_from_cursor */ -#endif -}; - -C_MODE_START -int mysql_init_character_set(MYSQL *mysql) -{ - const char *default_collation_name; - - /* Set character set */ - if (!mysql->options.charset_name) - { - default_collation_name= MYSQL_DEFAULT_COLLATION_NAME; - if (!(mysql->options.charset_name= - my_strdup(MYSQL_DEFAULT_CHARSET_NAME,MYF(MY_WME)))) - return 1; - } - else - default_collation_name= NULL; - - { - const char *save= charsets_dir; - if (mysql->options.charset_dir) - charsets_dir=mysql->options.charset_dir; - mysql->charset=get_charset_by_csname(mysql->options.charset_name, - MY_CS_PRIMARY, MYF(MY_WME)); - if (mysql->charset && default_collation_name) - { - CHARSET_INFO *collation; - if ((collation= - get_charset_by_name(default_collation_name, MYF(MY_WME)))) - { - if (!my_charset_same(mysql->charset, collation)) - { - my_printf_error(ER_UNKNOWN_ERROR, - "COLLATION %s is not valid for CHARACTER SET %s", - MYF(0), - default_collation_name, mysql->options.charset_name); - mysql->charset= NULL; - } - else - { - mysql->charset= collation; - } - } - else - mysql->charset= NULL; - } - charsets_dir= save; - } - - if (!mysql->charset) - { - if (mysql->options.charset_dir) - set_mysql_extended_error(mysql, CR_CANT_READ_CHARSET, unknown_sqlstate, - ER(CR_CANT_READ_CHARSET), - mysql->options.charset_name, - mysql->options.charset_dir); - else - { - char cs_dir_name[FN_REFLEN]; - get_charsets_dir(cs_dir_name); - set_mysql_extended_error(mysql, CR_CANT_READ_CHARSET, unknown_sqlstate, - ER(CR_CANT_READ_CHARSET), - mysql->options.charset_name, - cs_dir_name); - } - return 1; - } - return 0; -} -C_MODE_END - - -MYSQL * STDCALL -CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, - const char *passwd, const char *db, - uint port, const char *unix_socket,ulong client_flag) -{ - char buff[NAME_LEN+USERNAME_LENGTH+100]; - char *end,*host_info; - ulong pkt_length; - NET *net= &mysql->net; -#ifdef MYSQL_SERVER - thr_alarm_t alarmed; - ALARM alarm_buff; -#endif -#ifdef __WIN__ - HANDLE hPipe=INVALID_HANDLE_VALUE; -#endif -#ifdef HAVE_SYS_UN_H - struct sockaddr_un UNIXaddr; -#endif - init_sigpipe_variables - DBUG_ENTER("mysql_real_connect"); - LINT_INIT(host_info); - - DBUG_PRINT("enter",("host: %s db: %s user: %s", - host ? host : "(Null)", - db ? db : "(Null)", - user ? user : "(Null)")); - - /* Test whether we're already connected */ - if (net->vio) - { - set_mysql_error(mysql, CR_ALREADY_CONNECTED, unknown_sqlstate); - DBUG_RETURN(0); - } - - /* Don't give sigpipe errors if the client doesn't want them */ - set_sigpipe(mysql); - mysql->methods= &client_methods; - net->vio = 0; /* If something goes wrong */ - mysql->client_flag=0; /* For handshake */ - - /* use default options */ - if (mysql->options.my_cnf_file || mysql->options.my_cnf_group) - { - mysql_read_default_options(&mysql->options, - (mysql->options.my_cnf_file ? - mysql->options.my_cnf_file : "my"), - mysql->options.my_cnf_group); - my_free(mysql->options.my_cnf_file,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.my_cnf_group,MYF(MY_ALLOW_ZERO_PTR)); - mysql->options.my_cnf_file=mysql->options.my_cnf_group=0; - } - - /* Some empty-string-tests are done because of ODBC */ - if (!host || !host[0]) - host=mysql->options.host; - if (!user || !user[0]) - { - user=mysql->options.user; - if (!user) - user= ""; - } - if (!passwd) - { - passwd=mysql->options.password; -#if !defined(DONT_USE_MYSQL_PWD) && !defined(MYSQL_SERVER) - if (!passwd) - passwd=getenv("MYSQL_PWD"); /* get it from environment */ -#endif - if (!passwd) - passwd= ""; - } - if (!db || !db[0]) - db=mysql->options.db; - if (!port) - port=mysql->options.port; - if (!unix_socket) - unix_socket=mysql->options.unix_socket; - - mysql->server_status=SERVER_STATUS_AUTOCOMMIT; - - /* - Part 0: Grab a socket and connect it to the server - */ -#if defined(HAVE_SMEM) - if ((!mysql->options.protocol || - mysql->options.protocol == MYSQL_PROTOCOL_MEMORY) && - (!host || !strcmp(host,LOCAL_HOST))) - { - if ((create_shared_memory(mysql,net, mysql->options.connect_timeout)) == - INVALID_HANDLE_VALUE) - { - DBUG_PRINT("error", - ("host: '%s' socket: '%s' shared memory: %s have_tcpip: %d", - host ? host : "", - unix_socket ? unix_socket : "", - (int) mysql->options.shared_memory_base_name, - (int) have_tcpip)); - if (mysql->options.protocol == MYSQL_PROTOCOL_MEMORY) - goto error; - - /* - Try also with PIPE or TCP/IP. Clear the error from - create_shared_memory(). - */ - - net_clear_error(net); - } - else - { - mysql->options.protocol=MYSQL_PROTOCOL_MEMORY; - unix_socket = 0; - host=mysql->options.shared_memory_base_name; - my_snprintf(host_info=buff, sizeof(buff)-1, - ER(CR_SHARED_MEMORY_CONNECTION), host); - } - } -#endif /* HAVE_SMEM */ -#if defined(HAVE_SYS_UN_H) - if (!net->vio && - (!mysql->options.protocol || - mysql->options.protocol == MYSQL_PROTOCOL_SOCKET) && - (unix_socket || mysql_unix_port) && - (!host || !strcmp(host,LOCAL_HOST))) - { - my_socket sock= socket(AF_UNIX, SOCK_STREAM, 0); - if (sock == SOCKET_ERROR) - { - set_mysql_extended_error(mysql, CR_SOCKET_CREATE_ERROR, - unknown_sqlstate, - ER(CR_SOCKET_CREATE_ERROR), - socket_errno); - goto error; - } - - net->vio= vio_new(sock, VIO_TYPE_SOCKET, - VIO_LOCALHOST | VIO_BUFFERED_READ); - if (!net->vio) - { - DBUG_PRINT("error",("Unknow protocol %d ", mysql->options.protocol)); - set_mysql_error(mysql, CR_CONN_UNKNOW_PROTOCOL, unknown_sqlstate); - closesocket(sock); - goto error; - } - - host= LOCAL_HOST; - if (!unix_socket) - unix_socket= mysql_unix_port; - host_info= (char*) ER(CR_LOCALHOST_CONNECTION); - DBUG_PRINT("info", ("Using UNIX sock '%s'", unix_socket)); - - bzero((char*) &UNIXaddr, sizeof(UNIXaddr)); - UNIXaddr.sun_family= AF_UNIX; - strmake(UNIXaddr.sun_path, unix_socket, sizeof(UNIXaddr.sun_path)-1); - - if (my_connect(sock, (struct sockaddr *) &UNIXaddr, sizeof(UNIXaddr), - mysql->options.connect_timeout)) - { - DBUG_PRINT("error",("Got error %d on connect to local server", - socket_errno)); - set_mysql_extended_error(mysql, CR_CONNECTION_ERROR, - unknown_sqlstate, - ER(CR_CONNECTION_ERROR), - unix_socket, socket_errno); - vio_delete(net->vio); - net->vio= 0; - goto error; - } - mysql->options.protocol=MYSQL_PROTOCOL_SOCKET; - } -#elif defined(__WIN__) - if (!net->vio && - (mysql->options.protocol == MYSQL_PROTOCOL_PIPE || - (host && !strcmp(host,LOCAL_HOST_NAMEDPIPE)) || - (! have_tcpip && (unix_socket || !host && is_NT())))) - { - if ((hPipe= create_named_pipe(mysql, mysql->options.connect_timeout, - (char**) &host, (char**) &unix_socket)) == - INVALID_HANDLE_VALUE) - { - DBUG_PRINT("error", - ("host: '%s' socket: '%s' have_tcpip: %d", - host ? host : "", - unix_socket ? unix_socket : "", - (int) have_tcpip)); - if (mysql->options.protocol == MYSQL_PROTOCOL_PIPE || - (host && !strcmp(host,LOCAL_HOST_NAMEDPIPE)) || - (unix_socket && !strcmp(unix_socket,MYSQL_NAMEDPIPE))) - goto error; - /* Try also with TCP/IP */ - } - else - { - net->vio=vio_new_win32pipe(hPipe); - my_snprintf(host_info=buff, sizeof(buff)-1, - ER(CR_NAMEDPIPE_CONNECTION), unix_socket); - } - } -#endif - if (!net->vio && - (!mysql->options.protocol || - mysql->options.protocol == MYSQL_PROTOCOL_TCP)) - { - struct addrinfo *res_lst, hints, *t_res; - int gai_errno; - char port_buf[NI_MAXSERV]; - - unix_socket=0; /* This is not used */ - - if (!port) - port= mysql_port; - - if (!host) - host= LOCAL_HOST; - - my_snprintf(host_info=buff, sizeof(buff)-1, ER(CR_TCP_CONNECTION), host); - DBUG_PRINT("info",("Server name: '%s'. TCP sock: %d", host, port)); -#ifdef MYSQL_SERVER - thr_alarm_init(&alarmed); - thr_alarm(&alarmed, mysql->options.connect_timeout, &alarm_buff); -#endif - - DBUG_PRINT("info",("IP '%s'", "client")); - -#ifdef MYSQL_SERVER - thr_end_alarm(&alarmed); -#endif - - memset(&hints, 0, sizeof(hints)); - hints.ai_socktype= SOCK_STREAM; - hints.ai_protocol= IPPROTO_TCP; - hints.ai_family= AF_UNSPEC; - - DBUG_PRINT("info",("IPV6 getaddrinfo %s", host)); - my_snprintf(port_buf, NI_MAXSERV, "%d", port); - gai_errno= getaddrinfo(host, port_buf, &hints, &res_lst); - - if (gai_errno != 0) - { - /* - For DBUG we are keeping the right message but for client we default to - historical error message. - */ - DBUG_PRINT("info",("IPV6 getaddrinfo error %d", gai_errno)); - set_mysql_extended_error(mysql, CR_UNKNOWN_HOST, unknown_sqlstate, - ER(CR_UNKNOWN_HOST), host, errno); - - goto error; - } - - /* We only look at the first item (something to think about changing in the future) */ - t_res= res_lst; - { - my_socket sock= socket(t_res->ai_family, t_res->ai_socktype, - t_res->ai_protocol); - if (sock == SOCKET_ERROR) - { - set_mysql_extended_error(mysql, CR_IPSOCK_ERROR, unknown_sqlstate, - ER(CR_IPSOCK_ERROR), socket_errno); - freeaddrinfo(res_lst); - goto error; - } - - net->vio= vio_new(sock, VIO_TYPE_TCPIP, VIO_BUFFERED_READ); - if (! net->vio ) - { - DBUG_PRINT("error",("Unknow protocol %d ", mysql->options.protocol)); - set_mysql_error(mysql, CR_CONN_UNKNOW_PROTOCOL, unknown_sqlstate); - closesocket(sock); - freeaddrinfo(res_lst); - goto error; - } - - if (my_connect(sock, t_res->ai_addr, t_res->ai_addrlen, - mysql->options.connect_timeout)) - { - DBUG_PRINT("error",("Got error %d on connect to '%s'",socket_errno, - host)); - set_mysql_extended_error(mysql, CR_CONN_HOST_ERROR, unknown_sqlstate, - ER(CR_CONN_HOST_ERROR), host, socket_errno); - vio_delete(net->vio); - net->vio= 0; - freeaddrinfo(res_lst); - goto error; - } - } - - freeaddrinfo(res_lst); - } - - if (!net->vio) - { - DBUG_PRINT("error",("Unknow protocol %d ",mysql->options.protocol)); - set_mysql_error(mysql, CR_CONN_UNKNOW_PROTOCOL, unknown_sqlstate); - goto error; - } - - if (my_net_init(net, net->vio)) - { - vio_delete(net->vio); - net->vio = 0; - set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate); - goto error; - } - vio_keepalive(net->vio,TRUE); - - /* If user set read_timeout, let it override the default */ - if (mysql->options.read_timeout) - my_net_set_read_timeout(net, mysql->options.read_timeout); - - /* If user set write_timeout, let it override the default */ - if (mysql->options.write_timeout) - my_net_set_write_timeout(net, mysql->options.write_timeout); - - if (mysql->options.max_allowed_packet) - net->max_packet_size= mysql->options.max_allowed_packet; - - /* Get version info */ - mysql->protocol_version= PROTOCOL_VERSION; /* Assume this */ - if (mysql->options.connect_timeout && - vio_poll_read(net->vio, mysql->options.connect_timeout)) - { - set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, - ER(CR_SERVER_LOST_EXTENDED), - "waiting for initial communication packet", - errno); - goto error; - } - - /* - Part 1: Connection established, read and parse first packet - */ - - if ((pkt_length=cli_safe_read(mysql)) == packet_error) - { - if (mysql->net.last_errno == CR_SERVER_LOST) - set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, - ER(CR_SERVER_LOST_EXTENDED), - "reading initial communication packet", - errno); - goto error; - } - /* Check if version of protocol matches current one */ - - mysql->protocol_version= net->read_pos[0]; - DBUG_DUMP("packet",(uchar*) net->read_pos,10); - DBUG_PRINT("info",("mysql protocol version %d, server=%d", - PROTOCOL_VERSION, mysql->protocol_version)); - if (mysql->protocol_version != PROTOCOL_VERSION) - { - set_mysql_extended_error(mysql, CR_VERSION_ERROR, unknown_sqlstate, - ER(CR_VERSION_ERROR), mysql->protocol_version, - PROTOCOL_VERSION); - goto error; - } - end=strend((char*) net->read_pos+1); - mysql->thread_id=uint4korr(end+1); - end+=5; - /* - Scramble is split into two parts because old clients does not understand - long scrambles; here goes the first part. - */ - strmake(mysql->scramble, end, SCRAMBLE_LENGTH_323); - end+= SCRAMBLE_LENGTH_323+1; - - if (pkt_length >= (uint) (end+1 - (char*) net->read_pos)) - mysql->server_capabilities=uint2korr(end); - if (pkt_length >= (uint) (end+18 - (char*) net->read_pos)) - { - /* New protocol with 16 bytes to describe server characteristics */ - mysql->server_language=end[2]; - mysql->server_status=uint2korr(end+3); - } - end+= 18; - if (pkt_length >= (uint) (end + SCRAMBLE_LENGTH - SCRAMBLE_LENGTH_323 + 1 - - (char *) net->read_pos)) - strmake(mysql->scramble+SCRAMBLE_LENGTH_323, end, - SCRAMBLE_LENGTH-SCRAMBLE_LENGTH_323); - else - mysql->server_capabilities&= ~CLIENT_SECURE_CONNECTION; - - if (mysql->options.secure_auth && passwd[0] && - !(mysql->server_capabilities & CLIENT_SECURE_CONNECTION)) - { - set_mysql_error(mysql, CR_SECURE_AUTH, unknown_sqlstate); - goto error; - } - - if (mysql_init_character_set(mysql)) - goto error; - - /* Save connection information */ - if (!my_multi_malloc(MYF(0), - &mysql->host_info, (uint) strlen(host_info)+1, - &mysql->host, (uint) strlen(host)+1, - &mysql->unix_socket,unix_socket ? - (uint) strlen(unix_socket)+1 : (uint) 1, - &mysql->server_version, - (uint) (end - (char*) net->read_pos), - NullS) || - !(mysql->user=my_strdup(user,MYF(0))) || - !(mysql->passwd=my_strdup(passwd,MYF(0)))) - { - set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate); - goto error; - } - strmov(mysql->host_info,host_info); - strmov(mysql->host,host); - if (unix_socket) - strmov(mysql->unix_socket,unix_socket); - else - mysql->unix_socket=0; - strmov(mysql->server_version,(char*) net->read_pos+1); - mysql->port=port; - - /* - Part 2: format and send client info to the server for access check - */ - - client_flag|=mysql->options.client_flag; - client_flag|=CLIENT_CAPABILITIES; - if (client_flag & CLIENT_MULTI_STATEMENTS) - client_flag|= CLIENT_MULTI_RESULTS; - -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - if (mysql->options.ssl_key || mysql->options.ssl_cert || - mysql->options.ssl_ca || mysql->options.ssl_capath || - mysql->options.ssl_cipher) - mysql->options.use_ssl= 1; - if (mysql->options.use_ssl) - client_flag|=CLIENT_SSL; -#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY*/ - if (db) - client_flag|=CLIENT_CONNECT_WITH_DB; - - /* Remove options that server doesn't support */ - client_flag= ((client_flag & - ~(CLIENT_COMPRESS | CLIENT_SSL | CLIENT_PROTOCOL_41)) | - (client_flag & mysql->server_capabilities)); -#ifndef HAVE_COMPRESS - client_flag&= ~CLIENT_COMPRESS; -#endif - - if (client_flag & CLIENT_PROTOCOL_41) - { - /* 4.1 server and 4.1 client has a 32 byte option flag */ - int4store(buff,client_flag); - int4store(buff+4, net->max_packet_size); - buff[8]= (char) mysql->charset->number; - /* - Character set 45 (4-byte UTF-8) is not available on servers - before version 6.0, so we need to go ahead and switch to utf8_mb3. - */ - if (mysql->charset->number == 45 && mysql->server_version[0] < '6') - buff[8]= 33; - else - buff[8]= (char)mysql->charset->number; - - bzero(buff+9, 32-9); - end= buff+32; - } - else - { - int2store(buff,client_flag); - int3store(buff+2,net->max_packet_size); - end= buff+5; - } - mysql->client_flag=client_flag; - -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - if (client_flag & CLIENT_SSL) - { - /* Do the SSL layering. */ - struct st_mysql_options *options= &mysql->options; - struct st_VioSSLFd *ssl_fd; - - /* - Send client_flag, max_packet_size - unencrypted otherwise - the server does not know we want to do SSL - */ - if (my_net_write(net, (uchar*) buff, (uint) (end-buff)) || net_flush(net)) - { - set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, - ER(CR_SERVER_LOST_EXTENDED), - "sending connection information to server", - errno); - goto error; - } - - /* Create the VioSSLConnectorFd - init SSL and load certs */ - if (!(ssl_fd= new_VioSSLConnectorFd(options->ssl_key, - options->ssl_cert, - options->ssl_ca, - options->ssl_capath, - options->ssl_cipher))) - { - set_mysql_error(mysql, CR_SSL_CONNECTION_ERROR, unknown_sqlstate); - goto error; - } - mysql->connector_fd= (void*)ssl_fd; - - /* Connect to the server */ - DBUG_PRINT("info", ("IO layer change in progress...")); - if (sslconnect(ssl_fd, mysql->net.vio, - (long) (mysql->options.connect_timeout))) - { - set_mysql_error(mysql, CR_SSL_CONNECTION_ERROR, unknown_sqlstate); - goto error; - } - DBUG_PRINT("info", ("IO layer change done!")); - - /* Verify server cert */ - if ((client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) && - ssl_verify_server_cert(mysql->net.vio, mysql->host)) - { - set_mysql_error(mysql, CR_SSL_CONNECTION_ERROR, unknown_sqlstate); - goto error; - } - - } -#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ - - DBUG_PRINT("info",("Server version = '%s' capabilites: %lu status: %u client_flag: %lu", - mysql->server_version,mysql->server_capabilities, - mysql->server_status, client_flag)); - /* This needs to be changed as it's not useful with big packets */ - if (user && user[0]) - strmake(end,user,USERNAME_LENGTH); /* Max user name */ - else - read_user_name((char*) end); - - /* We have to handle different version of handshake here */ -#ifdef _CUSTOMCONFIG_ -#include "_cust_libmysql.h" -#endif - DBUG_PRINT("info",("user: %s",end)); - end= strend(end) + 1; - if (passwd[0]) - { - if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION) - { - *end++= SCRAMBLE_LENGTH; - scramble(end, mysql->scramble, passwd); - end+= SCRAMBLE_LENGTH; - } - else - { - scramble_323(end, mysql->scramble, passwd); - end+= SCRAMBLE_LENGTH_323 + 1; - } - } - else - *end++= '\0'; /* empty password */ - - /* Add database if needed */ - if (db && (mysql->server_capabilities & CLIENT_CONNECT_WITH_DB)) - { - end= strmake(end, db, NAME_LEN) + 1; - mysql->db= my_strdup(db,MYF(MY_WME)); - db= 0; - } - /* Write authentication package */ - if (my_net_write(net, (uchar*) buff, (size_t) (end-buff)) || net_flush(net)) - { - set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, - ER(CR_SERVER_LOST_EXTENDED), - "sending authentication information", - errno); - goto error; - } - - /* - Part 3: Authorization data's been sent. Now server can reply with - OK-packet, or re-request scrambled password. - */ - - if ((pkt_length=cli_safe_read(mysql)) == packet_error) - { - if (mysql->net.last_errno == CR_SERVER_LOST) - set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, - ER(CR_SERVER_LOST_EXTENDED), - "reading authorization packet", - errno); - goto error; - } - - if (pkt_length == 1 && net->read_pos[0] == 254 && - mysql->server_capabilities & CLIENT_SECURE_CONNECTION) - { - /* - By sending this very specific reply server asks us to send scrambled - password in old format. - */ - scramble_323(buff, mysql->scramble, passwd); - if (my_net_write(net, (uchar*) buff, SCRAMBLE_LENGTH_323 + 1) || - net_flush(net)) - { - set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, - ER(CR_SERVER_LOST_EXTENDED), - "sending password information", - errno); - goto error; - } - /* Read what server thinks about out new auth message report */ - if (cli_safe_read(mysql) == packet_error) - { - if (mysql->net.last_errno == CR_SERVER_LOST) - set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, - ER(CR_SERVER_LOST_EXTENDED), - "reading final connect information", - errno); - goto error; - } - } - - if (client_flag & CLIENT_COMPRESS) /* We will use compression */ - net->compress=1; - -#ifdef CHECK_LICENSE - if (check_license(mysql)) - goto error; -#endif - - if (db && mysql_select_db(mysql, db)) - { - if (mysql->net.last_errno == CR_SERVER_LOST) - set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, - ER(CR_SERVER_LOST_EXTENDED), - "Setting intital database", - errno); - goto error; - } - - if (mysql->options.init_commands) - { - DYNAMIC_ARRAY *init_commands= mysql->options.init_commands; - char **ptr= (char**)init_commands->buffer; - char **end_command= ptr + init_commands->elements; - - my_bool reconnect=mysql->reconnect; - mysql->reconnect=0; - - for (; ptr < end_command; ptr++) - { - MYSQL_RES *res; - if (mysql_real_query(mysql,*ptr, (ulong) strlen(*ptr))) - goto error; - if (mysql->fields) - { - if (!(res= cli_use_result(mysql))) - goto error; - mysql_free_result(res); - } - } - mysql->reconnect=reconnect; - } - - DBUG_PRINT("exit", ("Mysql handler: %p", mysql)); - reset_sigpipe(mysql); - DBUG_RETURN(mysql); - -error: - reset_sigpipe(mysql); - DBUG_PRINT("error",("message: %u/%s (%s)", - net->last_errno, - net->sqlstate, - net->last_error)); - { - /* Free alloced memory */ - end_server(mysql); - mysql_close_free(mysql); - if (!(((ulong) client_flag) & CLIENT_REMEMBER_OPTIONS)) - mysql_close_free_options(mysql); - } - DBUG_RETURN(0); -} - - -my_bool mysql_reconnect(MYSQL *mysql) -{ - MYSQL tmp_mysql; - DBUG_ENTER("mysql_reconnect"); - DBUG_ASSERT(mysql); - DBUG_PRINT("enter", ("mysql->reconnect: %d", mysql->reconnect)); - - if (!mysql->reconnect || - (mysql->server_status & SERVER_STATUS_IN_TRANS) || !mysql->host_info) - { - /* Allow reconnect next time */ - mysql->server_status&= ~SERVER_STATUS_IN_TRANS; - set_mysql_error(mysql, CR_SERVER_GONE_ERROR, unknown_sqlstate); - DBUG_RETURN(1); - } - mysql_init(&tmp_mysql); - tmp_mysql.options= mysql->options; - tmp_mysql.options.my_cnf_file= tmp_mysql.options.my_cnf_group= 0; - - if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd, - mysql->db, mysql->port, mysql->unix_socket, - mysql->client_flag | CLIENT_REMEMBER_OPTIONS)) - { - mysql->net.last_errno= tmp_mysql.net.last_errno; - strmov(mysql->net.last_error, tmp_mysql.net.last_error); - strmov(mysql->net.sqlstate, tmp_mysql.net.sqlstate); - DBUG_RETURN(1); - } - if (mysql_set_character_set(&tmp_mysql, mysql->charset->csname)) - { - DBUG_PRINT("error", ("mysql_set_character_set() failed")); - bzero((char*) &tmp_mysql.options,sizeof(tmp_mysql.options)); - mysql_close(&tmp_mysql); - mysql->net.last_errno= tmp_mysql.net.last_errno; - strmov(mysql->net.last_error, tmp_mysql.net.last_error); - strmov(mysql->net.sqlstate, tmp_mysql.net.sqlstate); - DBUG_RETURN(1); - } - - DBUG_PRINT("info", ("reconnect succeded")); - tmp_mysql.reconnect= 1; - tmp_mysql.free_me= mysql->free_me; - - /* - For each stmt in mysql->stmts, move it to tmp_mysql if it is - in state MYSQL_STMT_INIT_DONE, otherwise close it. - */ - { - LIST *element= mysql->stmts; - for (; element; element= element->next) - { - MYSQL_STMT *stmt= (MYSQL_STMT *) element->data; - if (stmt->state != MYSQL_STMT_INIT_DONE) - { - stmt->mysql= 0; - stmt->last_errno= CR_SERVER_LOST; - strmov(stmt->last_error, ER(CR_SERVER_LOST)); - strmov(stmt->sqlstate, unknown_sqlstate); - } - else - { - tmp_mysql.stmts= list_add(tmp_mysql.stmts, &stmt->list); - } - /* No need to call list_delete for statement here */ - } - mysql->stmts= NULL; - } - - /* Don't free options as these are now used in tmp_mysql */ - bzero((char*) &mysql->options,sizeof(mysql->options)); - mysql->free_me=0; - mysql_close(mysql); - *mysql=tmp_mysql; - net_clear(&mysql->net, 1); - mysql->affected_rows= ~(my_ulonglong) 0; - DBUG_RETURN(0); -} - - -/************************************************************************** - Set current database -**************************************************************************/ - -int STDCALL -mysql_select_db(MYSQL *mysql, const char *db) -{ - int error; - DBUG_ENTER("mysql_select_db"); - DBUG_PRINT("enter",("db: '%s'",db)); - - if ((error=simple_command(mysql,COM_INIT_DB, (const uchar*) db, - (ulong) strlen(db),0))) - DBUG_RETURN(error); - my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR)); - mysql->db=my_strdup(db,MYF(MY_WME)); - DBUG_RETURN(0); -} - - -/************************************************************************* - Send a QUIT to the server and close the connection - If handle is alloced by mysql connect free it. -*************************************************************************/ - -static void mysql_close_free_options(MYSQL *mysql) -{ - DBUG_ENTER("mysql_close_free_options"); - - my_free(mysql->options.user,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.host,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.password,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.unix_socket,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.db,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.my_cnf_file,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.my_cnf_group,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.charset_dir,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.charset_name,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.client_ip,MYF(MY_ALLOW_ZERO_PTR)); - if (mysql->options.init_commands) - { - DYNAMIC_ARRAY *init_commands= mysql->options.init_commands; - char **ptr= (char**)init_commands->buffer; - char **end= ptr + init_commands->elements; - for (; ptroptions.shared_memory_base_name != def_shared_memory_base_name) - my_free(mysql->options.shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); -#endif /* HAVE_SMEM */ - bzero((char*) &mysql->options,sizeof(mysql->options)); - DBUG_VOID_RETURN; -} - - -static void mysql_close_free(MYSQL *mysql) -{ - my_free((uchar*) mysql->host_info,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->user,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->passwd,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR)); -#if defined(EMBEDDED_LIBRARY) || MYSQL_VERSION_ID >= 50100 - my_free(mysql->info_buffer,MYF(MY_ALLOW_ZERO_PTR)); - mysql->info_buffer= 0; -#endif - /* Clear pointers for better safety */ - mysql->host_info= mysql->user= mysql->passwd= mysql->db= 0; -} - - -/* - Clear connection pointer of every statement: this is necessary - to give error on attempt to use a prepared statement of closed - connection. - - SYNOPSYS - mysql_detach_stmt_list() - stmt_list pointer to mysql->stmts - func_name name of calling function - - NOTE - There is similar code in mysql_reconnect(), so changes here - should also be reflected there. -*/ - -void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)), - const char *func_name __attribute__((unused))) -{ -#ifdef MYSQL_CLIENT - /* Reset connection handle in all prepared statements. */ - LIST *element= *stmt_list; - char buff[MYSQL_ERRMSG_SIZE]; - DBUG_ENTER("mysql_detach_stmt_list"); - - my_snprintf(buff, sizeof(buff)-1, ER(CR_STMT_CLOSED), func_name); - for (; element; element= element->next) - { - MYSQL_STMT *stmt= (MYSQL_STMT *) element->data; - set_stmt_error(stmt, CR_STMT_CLOSED, unknown_sqlstate, buff); - stmt->mysql= 0; - /* No need to call list_delete for statement here */ - } - *stmt_list= 0; - DBUG_VOID_RETURN; -#endif /* MYSQL_CLIENT */ -} - - -void STDCALL mysql_close(MYSQL *mysql) -{ - DBUG_ENTER("mysql_close"); - if (mysql) /* Some simple safety */ - { - /* If connection is still up, send a QUIT message */ - if (mysql->net.vio != 0) - { - free_old_query(mysql); - mysql->status=MYSQL_STATUS_READY; /* Force command */ - mysql->reconnect=0; - simple_command(mysql,COM_QUIT,(uchar*) 0,0,1); - end_server(mysql); /* Sets mysql->net.vio= 0 */ - } - mysql_close_free_options(mysql); - mysql_close_free(mysql); - mysql_detach_stmt_list(&mysql->stmts, "mysql_close"); -#ifndef MYSQL_SERVER - if (mysql->thd) - (*mysql->methods->free_embedded_thd)(mysql); -#endif - if (mysql->free_me) - my_free((uchar*) mysql,MYF(0)); - } - DBUG_VOID_RETURN; -} - - -static my_bool cli_read_query_result(MYSQL *mysql) -{ - uchar *pos; - ulong field_count; - MYSQL_DATA *fields; - ulong length; - DBUG_ENTER("cli_read_query_result"); - - if ((length = cli_safe_read(mysql)) == packet_error) - DBUG_RETURN(1); - free_old_query(mysql); /* Free old result */ -#ifdef MYSQL_CLIENT /* Avoid warn of unused labels*/ -get_info: -#endif - pos=(uchar*) mysql->net.read_pos; - if ((field_count= net_field_length(&pos)) == 0) - { - mysql->affected_rows= net_field_length_ll(&pos); - mysql->insert_id= net_field_length_ll(&pos); - DBUG_PRINT("info",("affected_rows: %lu insert_id: %lu", - (ulong) mysql->affected_rows, - (ulong) mysql->insert_id)); - if (protocol_41(mysql)) - { - mysql->server_status=uint2korr(pos); pos+=2; - mysql->warning_count=uint2korr(pos); pos+=2; - } - else if (mysql->server_capabilities & CLIENT_TRANSACTIONS) - { - /* MySQL 4.0 protocol */ - mysql->server_status=uint2korr(pos); pos+=2; - mysql->warning_count= 0; - } - DBUG_PRINT("info",("status: %u warning_count: %u", - mysql->server_status, mysql->warning_count)); - if (pos < mysql->net.read_pos+length && net_field_length(&pos)) - mysql->info=(char*) pos; - DBUG_RETURN(0); - } -#ifdef MYSQL_CLIENT - if (field_count == NULL_LENGTH) /* LOAD DATA LOCAL INFILE */ - { - int error; - - if (!(mysql->options.client_flag & CLIENT_LOCAL_FILES)) - { - set_mysql_error(mysql, CR_MALFORMED_PACKET, unknown_sqlstate); - DBUG_RETURN(1); - } - - error= handle_local_infile(mysql,(char*) pos); - if ((length= cli_safe_read(mysql)) == packet_error || error) - DBUG_RETURN(1); - goto get_info; /* Get info packet */ - } -#endif - if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT)) - mysql->server_status|= SERVER_STATUS_IN_TRANS; - - if (!(fields=cli_read_rows(mysql,(MYSQL_FIELD*)0, protocol_41(mysql) ? 7:5))) - DBUG_RETURN(1); - if (!(mysql->fields=unpack_fields(fields,&mysql->field_alloc, - (uint) field_count,0, - mysql->server_capabilities))) - DBUG_RETURN(1); - mysql->status= MYSQL_STATUS_GET_RESULT; - mysql->field_count= (uint) field_count; - DBUG_PRINT("exit",("ok")); - DBUG_RETURN(0); -} - - -/* - Send the query and return so we can do something else. - Needs to be followed by mysql_read_query_result() when we want to - finish processing it. -*/ - -int STDCALL -mysql_send_query(MYSQL* mysql, const char* query, ulong length) -{ - DBUG_ENTER("mysql_send_query"); - DBUG_RETURN(simple_command(mysql, COM_QUERY, (uchar*) query, length, 1)); -} - - -int STDCALL -mysql_real_query(MYSQL *mysql, const char *query, ulong length) -{ - DBUG_ENTER("mysql_real_query"); - DBUG_PRINT("enter",("handle: %p", mysql)); - DBUG_PRINT("query",("Query = '%-.4096s'",query)); - - if (mysql_send_query(mysql,query,length)) - DBUG_RETURN(1); - DBUG_RETURN((int) (*mysql->methods->read_query_result)(mysql)); -} - - -/************************************************************************** - Alloc result struct for buffered results. All rows are read to buffer. - mysql_data_seek may be used. -**************************************************************************/ - -MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql) -{ - MYSQL_RES *result; - DBUG_ENTER("mysql_store_result"); - - if (!mysql->fields) - DBUG_RETURN(0); - if (mysql->status != MYSQL_STATUS_GET_RESULT) - { - set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate); - DBUG_RETURN(0); - } - mysql->status=MYSQL_STATUS_READY; /* server is ready */ - if (!(result=(MYSQL_RES*) my_malloc((uint) (sizeof(MYSQL_RES)+ - sizeof(ulong) * - mysql->field_count), - MYF(MY_WME | MY_ZEROFILL)))) - { - set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate); - DBUG_RETURN(0); - } - result->methods= mysql->methods; - result->eof=1; /* Marker for buffered */ - result->lengths=(ulong*) (result+1); - if (!(result->data= - (*mysql->methods->read_rows)(mysql,mysql->fields,mysql->field_count))) - { - my_free((uchar*) result,MYF(0)); - DBUG_RETURN(0); - } - mysql->affected_rows= result->row_count= result->data->rows; - result->data_cursor= result->data->data; - result->fields= mysql->fields; - result->field_alloc= mysql->field_alloc; - result->field_count= mysql->field_count; - /* The rest of result members is bzeroed in malloc */ - mysql->fields=0; /* fields is now in result */ - clear_alloc_root(&mysql->field_alloc); - /* just in case this was mistakenly called after mysql_stmt_execute() */ - mysql->unbuffered_fetch_owner= 0; - DBUG_RETURN(result); /* Data fetched */ -} - - -/************************************************************************** - Alloc struct for use with unbuffered reads. Data is fetched by domand - when calling to mysql_fetch_row. - mysql_data_seek is a noop. - - No other queries may be specified with the same MYSQL handle. - There shouldn't be much processing per row because mysql server shouldn't - have to wait for the client (and will not wait more than 30 sec/packet). -**************************************************************************/ - -static MYSQL_RES * cli_use_result(MYSQL *mysql) -{ - MYSQL_RES *result; - DBUG_ENTER("cli_use_result"); - - if (!mysql->fields) - DBUG_RETURN(0); - if (mysql->status != MYSQL_STATUS_GET_RESULT) - { - set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate); - DBUG_RETURN(0); - } - if (!(result=(MYSQL_RES*) my_malloc(sizeof(*result)+ - sizeof(ulong)*mysql->field_count, - MYF(MY_WME | MY_ZEROFILL)))) - DBUG_RETURN(0); - result->lengths=(ulong*) (result+1); - result->methods= mysql->methods; - if (!(result->row=(MYSQL_ROW) - my_malloc(sizeof(result->row[0])*(mysql->field_count+1), MYF(MY_WME)))) - { /* Ptrs: to one row */ - my_free((uchar*) result,MYF(0)); - DBUG_RETURN(0); - } - result->fields= mysql->fields; - result->field_alloc= mysql->field_alloc; - result->field_count= mysql->field_count; - result->current_field=0; - result->handle= mysql; - result->current_row= 0; - mysql->fields=0; /* fields is now in result */ - clear_alloc_root(&mysql->field_alloc); - mysql->status=MYSQL_STATUS_USE_RESULT; - mysql->unbuffered_fetch_owner= &result->unbuffered_fetch_cancelled; - DBUG_RETURN(result); /* Data is read to be fetched */ -} - - -/************************************************************************** - Return next row of the query results -**************************************************************************/ - -MYSQL_ROW STDCALL -mysql_fetch_row(MYSQL_RES *res) -{ - DBUG_ENTER("mysql_fetch_row"); - if (!res->data) - { /* Unbufferred fetch */ - if (!res->eof) - { - MYSQL *mysql= res->handle; - if (mysql->status != MYSQL_STATUS_USE_RESULT) - { - set_mysql_error(mysql, - res->unbuffered_fetch_cancelled ? - CR_FETCH_CANCELED : CR_COMMANDS_OUT_OF_SYNC, - unknown_sqlstate); - } - else if (!(read_one_row(mysql, res->field_count, res->row, res->lengths))) - { - res->row_count++; - DBUG_RETURN(res->current_row=res->row); - } - DBUG_PRINT("info",("end of data")); - res->eof=1; - mysql->status=MYSQL_STATUS_READY; - /* - Reset only if owner points to us: there is a chance that somebody - started new query after mysql_stmt_close(): - */ - if (mysql->unbuffered_fetch_owner == &res->unbuffered_fetch_cancelled) - mysql->unbuffered_fetch_owner= 0; - /* Don't clear handle in mysql_free_result */ - res->handle=0; - } - DBUG_RETURN((MYSQL_ROW) NULL); - } - { - MYSQL_ROW tmp; - if (!res->data_cursor) - { - DBUG_PRINT("info",("end of data")); - DBUG_RETURN(res->current_row=(MYSQL_ROW) NULL); - } - tmp = res->data_cursor->data; - res->data_cursor = res->data_cursor->next; - DBUG_RETURN(res->current_row=tmp); - } -} - - -/************************************************************************** - Get column lengths of the current row - If one uses mysql_use_result, res->lengths contains the length information, - else the lengths are calculated from the offset between pointers. -**************************************************************************/ - -ulong * STDCALL -mysql_fetch_lengths(MYSQL_RES *res) -{ - MYSQL_ROW column; - - if (!(column=res->current_row)) - return 0; /* Something is wrong */ - if (res->data) - (*res->methods->fetch_lengths)(res->lengths, column, res->field_count); - return res->lengths; -} - - -int STDCALL -mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) -{ - DBUG_ENTER("mysql_option"); - DBUG_PRINT("enter",("option: %d",(int) option)); - switch (option) { - case MYSQL_OPT_CONNECT_TIMEOUT: - mysql->options.connect_timeout= *(uint*) arg; - break; - case MYSQL_OPT_READ_TIMEOUT: - mysql->options.read_timeout= *(uint*) arg; - break; - case MYSQL_OPT_WRITE_TIMEOUT: - mysql->options.write_timeout= *(uint*) arg; - break; - case MYSQL_OPT_COMPRESS: - mysql->options.compress= 1; /* Remember for connect */ - mysql->options.client_flag|= CLIENT_COMPRESS; - break; - case MYSQL_OPT_NAMED_PIPE: /* This option is depricated */ - mysql->options.protocol=MYSQL_PROTOCOL_PIPE; /* Force named pipe */ - break; - case MYSQL_OPT_LOCAL_INFILE: /* Allow LOAD DATA LOCAL ?*/ - if (!arg || test(*(uint*) arg)) - mysql->options.client_flag|= CLIENT_LOCAL_FILES; - else - mysql->options.client_flag&= ~CLIENT_LOCAL_FILES; - break; - case MYSQL_INIT_COMMAND: - add_init_command(&mysql->options,arg); - break; - case MYSQL_READ_DEFAULT_FILE: - my_free(mysql->options.my_cnf_file,MYF(MY_ALLOW_ZERO_PTR)); - mysql->options.my_cnf_file=my_strdup(arg,MYF(MY_WME)); - break; - case MYSQL_READ_DEFAULT_GROUP: - my_free(mysql->options.my_cnf_group,MYF(MY_ALLOW_ZERO_PTR)); - mysql->options.my_cnf_group=my_strdup(arg,MYF(MY_WME)); - break; - case MYSQL_SET_CHARSET_DIR: - my_free(mysql->options.charset_dir,MYF(MY_ALLOW_ZERO_PTR)); - mysql->options.charset_dir=my_strdup(arg,MYF(MY_WME)); - break; - case MYSQL_SET_CHARSET_NAME: - my_free(mysql->options.charset_name,MYF(MY_ALLOW_ZERO_PTR)); - mysql->options.charset_name=my_strdup(arg,MYF(MY_WME)); - break; - case MYSQL_OPT_PROTOCOL: - mysql->options.protocol= *(uint*) arg; - break; - case MYSQL_SHARED_MEMORY_BASE_NAME: -#ifdef HAVE_SMEM - if (mysql->options.shared_memory_base_name != def_shared_memory_base_name) - my_free(mysql->options.shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); - mysql->options.shared_memory_base_name=my_strdup(arg,MYF(MY_WME)); -#endif - break; - case MYSQL_OPT_USE_REMOTE_CONNECTION: - case MYSQL_OPT_USE_EMBEDDED_CONNECTION: - case MYSQL_OPT_GUESS_CONNECTION: - mysql->options.methods_to_use= option; - break; - case MYSQL_SET_CLIENT_IP: - mysql->options.client_ip= my_strdup(arg, MYF(MY_WME)); - break; - case MYSQL_SECURE_AUTH: - mysql->options.secure_auth= *(my_bool *) arg; - break; - case MYSQL_REPORT_DATA_TRUNCATION: - mysql->options.report_data_truncation= test(*(my_bool *) arg); - break; - case MYSQL_OPT_RECONNECT: - mysql->reconnect= *(my_bool *) arg; - break; - case MYSQL_OPT_SSL_VERIFY_SERVER_CERT: - if (*(my_bool*) arg) - mysql->options.client_flag|= CLIENT_SSL_VERIFY_SERVER_CERT; - else - mysql->options.client_flag&= ~CLIENT_SSL_VERIFY_SERVER_CERT; - break; - default: - DBUG_RETURN(1); - } - DBUG_RETURN(0); -} - - -/**************************************************************************** - Functions to get information from the MySQL structure - These are functions to make shared libraries more usable. -****************************************************************************/ - -/* MYSQL_RES */ -my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res) -{ - return res->row_count; -} - -unsigned int STDCALL mysql_num_fields(MYSQL_RES *res) -{ - return res->field_count; -} - -uint STDCALL mysql_errno(MYSQL *mysql) -{ - return mysql ? mysql->net.last_errno : mysql_server_last_errno; -} - - -const char * STDCALL mysql_error(MYSQL *mysql) -{ - return mysql ? mysql->net.last_error : mysql_server_last_error; -} - - -/* - Get version number for server in a form easy to test on - - SYNOPSIS - mysql_get_server_version() - mysql Connection - - EXAMPLE - 4.1.0-alfa -> 40100 - - NOTES - We will ensure that a newer server always has a bigger number. - - RETURN - Signed number > 323000 -*/ - -ulong STDCALL -mysql_get_server_version(MYSQL *mysql) -{ - uint major, minor, version; - char *pos= mysql->server_version, *end_pos; - major= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1; - minor= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1; - version= (uint) strtoul(pos, &end_pos, 10); - return (ulong) major*10000L+(ulong) (minor*100+version); -} - - -/* - mysql_set_character_set function sends SET NAMES cs_name to - the server (which changes character_set_client, character_set_result - and character_set_connection) and updates mysql->charset so other - functions like mysql_real_escape will work correctly. -*/ -int STDCALL mysql_set_character_set(MYSQL *mysql, const char *cs_name) -{ - struct charset_info_st *cs; - const char *save_csdir= charsets_dir; - - if (mysql->options.charset_dir) - charsets_dir= mysql->options.charset_dir; - - if (strlen(cs_name) < MY_CS_NAME_SIZE && - (cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, MYF(0)))) - { - char buff[MY_CS_NAME_SIZE + 10]; - charsets_dir= save_csdir; - /* Skip execution of "SET NAMES" for pre-4.1 servers */ - if (mysql_get_server_version(mysql) < 40100) - return 0; - sprintf(buff, "SET NAMES %s", cs_name); - if (!mysql_real_query(mysql, buff, strlen(buff))) - { - mysql->charset= cs; - } - } - else - { - char cs_dir_name[FN_REFLEN]; - get_charsets_dir(cs_dir_name); - set_mysql_extended_error(mysql, CR_CANT_READ_CHARSET, unknown_sqlstate, - ER(CR_CANT_READ_CHARSET), cs_name, cs_dir_name); - } - charsets_dir= save_csdir; - return mysql->net.last_errno; -} - - diff --git a/externals/mysql/libmysql/client_settings.h b/externals/mysql/libmysql/client_settings.h deleted file mode 100644 index ec63f49555..0000000000 --- a/externals/mysql/libmysql/client_settings.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (C) 2003-2005 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -extern uint mysql_port; -extern char * mysql_unix_port; - -#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | \ - CLIENT_LONG_FLAG | \ - CLIENT_TRANSACTIONS | \ - CLIENT_PROTOCOL_41 | \ - CLIENT_SECURE_CONNECTION | \ - CLIENT_MULTI_RESULTS | \ - CLIENT_PS_MULTI_RESULTS) - -sig_handler my_pipe_sig_handler(int sig); -void read_user_name(char *name); -my_bool handle_local_infile(MYSQL *mysql, const char *net_filename); - -/* - Let the user specify that we don't want SIGPIPE; This doesn't however work - with threaded applications as we can have multiple read in progress. -*/ - -#if !defined(__WIN__) && defined(SIGPIPE) && !defined(THREAD) -#define init_sigpipe_variables sig_return old_signal_handler=(sig_return) 0; -#define set_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) old_signal_handler=signal(SIGPIPE, my_pipe_sig_handler) -#define reset_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) signal(SIGPIPE,old_signal_handler); -#else -#define init_sigpipe_variables -#define set_sigpipe(mysql) -#define reset_sigpipe(mysql) -#endif - -void mysql_read_default_options(struct st_mysql_options *options, - const char *filename,const char *group); -void mysql_detach_stmt_list(LIST **stmt_list, const char *func_name); -MYSQL * STDCALL -cli_mysql_real_connect(MYSQL *mysql,const char *host, const char *user, - const char *passwd, const char *db, - uint port, const char *unix_socket,ulong client_flag); - -void cli_mysql_close(MYSQL *mysql); - -MYSQL_FIELD * cli_list_fields(MYSQL *mysql); -my_bool cli_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt); -MYSQL_DATA * cli_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields, - uint fields); -int cli_stmt_execute(MYSQL_STMT *stmt); -int cli_read_binary_rows(MYSQL_STMT *stmt); -int cli_unbuffered_fetch(MYSQL *mysql, char **row); -const char * cli_read_statistics(MYSQL *mysql); -int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd); - -#ifdef EMBEDDED_LIBRARY -int init_embedded_server(int argc, char **argv, char **groups); -void end_embedded_server(); -#endif /*EMBEDDED_LIBRARY*/ - -C_MODE_START -extern int mysql_init_character_set(MYSQL *mysql); -C_MODE_END diff --git a/externals/mysql/libmysql/conf_to_src.c b/externals/mysql/libmysql/conf_to_src.c deleted file mode 100644 index 785e3cad4c..0000000000 --- a/externals/mysql/libmysql/conf_to_src.c +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 2000-2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation. - - There are special exceptions to the terms and conditions of the GPL as it - is applied to this software. View the full text of the exception in file - EXCEPTIONS-CLIENT in the directory of this software distribution. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* can't use -lmysys because this prog is used to create -lstrings */ - - -#include -#include -#include -#include - -#define CHARSETS_SUBDIR "sql/share/charsets" -#define CTYPE_TABLE_SIZE 257 -#define TO_LOWER_TABLE_SIZE 256 -#define TO_UPPER_TABLE_SIZE 256 -#define SORT_ORDER_TABLE_SIZE 256 -#define ROW_LEN 16 - -void print_arrays_for(char *set); - -char *prog; -char buf[1024], *p, *endptr; - -int -main(int argc, char **argv) -{ - prog = *argv; - - if (argc < 2) { - fprintf(stderr, "usage: %s source-dir [charset [, charset]]\n", prog); - exit(EXIT_FAILURE); - } - - --argc; ++argv; /* skip program name */ - - if (chdir(*argv) != 0) { - fprintf(stderr, "%s: can't cd to %s\n", prog, *argv); - exit(EXIT_FAILURE); - } - --argc; ++argv; - - if (chdir(CHARSETS_SUBDIR) != 0) { - fprintf(stderr, "%s: can't cd to %s\n", prog, CHARSETS_SUBDIR); - exit(EXIT_FAILURE); - } - - while (argc--) - print_arrays_for(*argv++); - - exit(EXIT_SUCCESS); -} - -void -print_array(FILE *f, const char *set, const char *name, int n) -{ - int i; - char val[100]; - - printf("uchar %s_%s[] = {\n", name, set); - - p = buf; - *buf = '\0'; - for (i = 0; i < n; ++i) - { - /* get a word from f */ - endptr = p; - for (;;) - { - while (isspace(*endptr)) - ++endptr; - if (*endptr && *endptr != '#') /* not comment */ - break; - if ((fgets(buf, sizeof(buf), f)) == NULL) - return; /* XXX: break silently */ - endptr = buf; - } - - p = val; - while (!isspace(*endptr)) - *p++ = *endptr++; - *p = '\0'; - p = endptr; - - /* write the value out */ - - if (i == 0 || i % ROW_LEN == n % ROW_LEN) - printf(" "); - - printf("%3d", (unsigned char) strtol(val, (char **) NULL, 16)); - - if (i < n - 1) - printf(","); - - if ((i+1) % ROW_LEN == n % ROW_LEN) - printf("\n"); - } - - printf("};\n\n"); -} - -void -print_arrays_for(char *set) -{ - FILE *f; - - sprintf(buf, "%s.conf", set); - - if ((f = fopen(buf, "r")) == NULL) { - fprintf(stderr, "%s: can't read conf file for charset %s\n", prog, set); - exit(EXIT_FAILURE); - } - - printf("\ -/* The %s character set. Generated automatically by configure and\n\ - * the %s program\n\ - */\n\n", - set, prog); - - /* it would be nice if this used the code in mysys/charset.c, but... */ - print_array(f, set, "ctype", CTYPE_TABLE_SIZE); - print_array(f, set, "to_lower", TO_LOWER_TABLE_SIZE); - print_array(f, set, "to_upper", TO_UPPER_TABLE_SIZE); - print_array(f, set, "sort_order", SORT_ORDER_TABLE_SIZE); - printf("\n"); - - fclose(f); - - return; -} diff --git a/externals/mysql/libmysql/errmsg.c b/externals/mysql/libmysql/errmsg.c deleted file mode 100644 index abdf65322e..0000000000 --- a/externals/mysql/libmysql/errmsg.c +++ /dev/null @@ -1,255 +0,0 @@ -/* Copyright (C) 2000-2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation. - - There are special exceptions to the terms and conditions of the GPL as it - is applied to this software. View the full text of the exception in file - EXCEPTIONS-CLIENT in the directory of this software distribution. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Error messages for MySQL clients */ -/* (Error messages for the daemon are in share/language/errmsg.sys) */ - -#include -#include -#include "errmsg.h" - -#ifdef GERMAN -const char *client_errors[]= -{ - "Unbekannter MySQL Fehler", - "Kann UNIX-Socket nicht anlegen (%d)", - "Keine Verbindung zu lokalem MySQL Server, socket: '%-.100s' (%d)", - "Keine Verbindung zu MySQL Server auf %-.100s (%d)", - "Kann TCP/IP-Socket nicht anlegen (%d)", - "Unbekannter MySQL Server Host (%-.100s) (%d)", - "MySQL Server nicht vorhanden", - "Protokolle ungleich; Server Version = %d, Client Version = %d", - "MySQL client ran out of memory", - "Wrong host info", - "Localhost via UNIX socket", - "%-.100s via TCP/IP", - "Error in server handshake", - "Lost connection to MySQL server during query", - "Commands out of sync; you can't run this command now", - "Verbindung ueber Named Pipe: %-.32s", - "Kann nicht auf Named Pipe warten. Host: %-.64s pipe: %-.32s (%lu)", - "Kann Named Pipe nicht oeffnen. Host: %-.64s pipe: %-.32s (%lu)", - "Kann den Status der Named Pipe nicht setzen. Host: %-.64s pipe: %-.32s (%lu)", - "Can't initialize character set %-.32s (path: %-.100s)", - "Got packet bigger than 'max_allowed_packet' bytes", - "Embedded server", - "Error on SHOW SLAVE STATUS:", - "Error on SHOW SLAVE HOSTS:", - "Error connecting to slave:", - "Error connecting to master:", - "SSL connection error", - "Malformed packet", - "This client library is licensed only for use with MySQL servers having '%s' license", - "Invalid use of null pointer", - "Statement not prepared", - "No data supplied for parameters in prepared statement", - "Data truncated", - "No parameters exist in the statement", - "Invalid parameter number", - "Can't send long data for non-string/non-binary data types (parameter: %d)", - "Using unsupported buffer type: %d (parameter: %d)", - "Shared memory: %-.100s", - "Can't open shared memory; client could not create request event (%lu)", - "Can't open shared memory; no answer event received from server (%lu)", - "Can't open shared memory; server could not allocate file mapping (%lu)", - "Can't open shared memory; server could not get pointer to file mapping (%lu)", - "Can't open shared memory; client could not allocate file mapping (%lu)", - "Can't open shared memory; client could not get pointer to file mapping (%lu)", - "Can't open shared memory; client could not create %s event (%lu)", - "Can't open shared memory; no answer from server (%lu)", - "Can't open shared memory; cannot send request event to server (%lu)", - "Wrong or unknown protocol", - "Invalid connection handle", - "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)", - "Row retrieval was canceled by mysql_stmt_close() call", - "Attempt to read column without prior row fetch", - "Prepared statement contains no metadata", - "Attempt to read a row while there is no result set associated with the statement", - "This feature is not implemented yet", - "Lost connection to MySQL server at '%s', system error: %d", - "Statement closed indirectly because of a preceeding %s() call", - "The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again", - "This handle is already connected. Use a separate handle for each connection." - "" -}; - -/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */ - -#elif defined PORTUGUESE -const char *client_errors[]= -{ - "Erro desconhecido do MySQL", - "Não pode criar 'UNIX socket' (%d)", - "Não pode se conectar ao servidor MySQL local através do 'socket' '%-.100s' (%d)", - "Não pode se conectar ao servidor MySQL em '%-.100s' (%d)", - "Não pode criar 'socket TCP/IP' (%d)", - "'Host' servidor MySQL '%-.100s' (%d) desconhecido", - "Servidor MySQL desapareceu", - "Incompatibilidade de protocolos; versão do servidor = %d, versão do cliente = %d", - "Cliente do MySQL com falta de memória", - "Informação inválida de 'host'", - "Localhost via 'UNIX socket'", - "%-.100s via 'TCP/IP'", - "Erro na negociação de acesso ao servidor", - "Conexão perdida com servidor MySQL durante 'query'", - "Comandos fora de sincronismo; você não pode executar este comando agora", - "Named pipe: %-.32s", - "Não pode esperar pelo 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)", - "Não pode abrir 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)", - "Não pode estabelecer o estado do 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)", - "Não pode inicializar conjunto de caracteres %-.32s (caminho %-.100s)", - "Obteve pacote maior do que 'max_allowed_packet' bytes", - "Embedded server" - "Error on SHOW SLAVE STATUS:", - "Error on SHOW SLAVE HOSTS:", - "Error connecting to slave:", - "Error connecting to master:", - "SSL connection error", - "Malformed packet", - "This client library is licensed only for use with MySQL servers having '%s' license", - "Invalid use of null pointer", - "Statement not prepared", - "No data supplied for parameters in prepared statement", - "Data truncated", - "No parameters exist in the statement", - "Invalid parameter number", - "Can't send long data for non-string/non-binary data types (parameter: %d)", - "Using unsupported buffer type: %d (parameter: %d)", - "Shared memory: %-.100s", - "Can't open shared memory; client could not create request event (%lu)", - "Can't open shared memory; no answer event received from server (%lu)", - "Can't open shared memory; server could not allocate file mapping (%lu)", - "Can't open shared memory; server could not get pointer to file mapping (%lu)", - "Can't open shared memory; client could not allocate file mapping (%lu)", - "Can't open shared memory; client could not get pointer to file mapping (%lu)", - "Can't open shared memory; client could not create %s event (%lu)", - "Can't open shared memory; no answer from server (%lu)", - "Can't open shared memory; cannot send request event to server (%lu)", - "Wrong or unknown protocol", - "Invalid connection handle", - "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)", - "Row retrieval was canceled by mysql_stmt_close() call", - "Attempt to read column without prior row fetch", - "Prepared statement contains no metadata", - "Attempt to read a row while there is no result set associated with the statement", - "This feature is not implemented yet", - "Lost connection to MySQL server at '%s', system error: %d", - "Statement closed indirectly because of a preceeding %s() call", - "The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again", - "This handle is already connected. Use a separate handle for each connection." - "" -}; - -#else /* ENGLISH */ -const char *client_errors[]= -{ - "Unknown MySQL error", - "Can't create UNIX socket (%d)", - "Can't connect to local MySQL server through socket '%-.100s' (%d)", - "Can't connect to MySQL server on '%-.100s' (%d)", - "Can't create TCP/IP socket (%d)", - "Unknown MySQL server host '%-.100s' (%d)", - "MySQL server has gone away", - "Protocol mismatch; server version = %d, client version = %d", - "MySQL client ran out of memory", - "Wrong host info", - "Localhost via UNIX socket", - "%-.100s via TCP/IP", - "Error in server handshake", - "Lost connection to MySQL server during query", - "Commands out of sync; you can't run this command now", - "Named pipe: %-.32s", - "Can't wait for named pipe to host: %-.64s pipe: %-.32s (%lu)", - "Can't open named pipe to host: %-.64s pipe: %-.32s (%lu)", - "Can't set state of named pipe to host: %-.64s pipe: %-.32s (%lu)", - "Can't initialize character set %-.32s (path: %-.100s)", - "Got packet bigger than 'max_allowed_packet' bytes", - "Embedded server", - "Error on SHOW SLAVE STATUS:", - "Error on SHOW SLAVE HOSTS:", - "Error connecting to slave:", - "Error connecting to master:", - "SSL connection error", - "Malformed packet", - "This client library is licensed only for use with MySQL servers having '%s' license", - "Invalid use of null pointer", - "Statement not prepared", - "No data supplied for parameters in prepared statement", - "Data truncated", - "No parameters exist in the statement", - "Invalid parameter number", - "Can't send long data for non-string/non-binary data types (parameter: %d)", - "Using unsupported buffer type: %d (parameter: %d)", - "Shared memory: %-.100s", - "Can't open shared memory; client could not create request event (%lu)", - "Can't open shared memory; no answer event received from server (%lu)", - "Can't open shared memory; server could not allocate file mapping (%lu)", - "Can't open shared memory; server could not get pointer to file mapping (%lu)", - "Can't open shared memory; client could not allocate file mapping (%lu)", - "Can't open shared memory; client could not get pointer to file mapping (%lu)", - "Can't open shared memory; client could not create %s event (%lu)", - "Can't open shared memory; no answer from server (%lu)", - "Can't open shared memory; cannot send request event to server (%lu)", - "Wrong or unknown protocol", - "Invalid connection handle", - "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)", - "Row retrieval was canceled by mysql_stmt_close() call", - "Attempt to read column without prior row fetch", - "Prepared statement contains no metadata", - "Attempt to read a row while there is no result set associated with the statement", - "This feature is not implemented yet", - "Lost connection to MySQL server at '%s', system error: %d", - "Statement closed indirectly because of a preceeding %s() call", - "The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again", - "This handle is already connected. Use a separate handle for each connection." - "" -}; -#endif - - -/* - Register client error messages for use with my_error(). - - SYNOPSIS - init_client_errs() - - RETURN - void -*/ - -void init_client_errs(void) -{ - (void) my_error_register(client_errors, CR_ERROR_FIRST, CR_ERROR_LAST); -} - - -/* - Unregister client error messages. - - SYNOPSIS - finish_client_errs() - - RETURN - void -*/ - -void finish_client_errs(void) -{ - (void) my_error_unregister(CR_ERROR_FIRST, CR_ERROR_LAST); -} diff --git a/externals/mysql/libmysql/get_password.c b/externals/mysql/libmysql/get_password.c deleted file mode 100644 index cbe5fce694..0000000000 --- a/externals/mysql/libmysql/get_password.c +++ /dev/null @@ -1,220 +0,0 @@ -/* Copyright (C) 2000-2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation. - - There are special exceptions to the terms and conditions of the GPL as it - is applied to this software. View the full text of the exception in file - EXCEPTIONS-CLIENT in the directory of this software distribution. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* -** Ask for a password from tty -** This is an own file to avoid conflicts with curses -*/ -#include -#include -#include "mysql.h" -#include -#include - -#if defined(HAVE_BROKEN_GETPASS) && !defined(HAVE_GETPASSPHRASE) -#undef HAVE_GETPASS -#endif - -#ifdef HAVE_GETPASS -#ifdef HAVE_PWD_H -#include -#endif /* HAVE_PWD_H */ -#else /* ! HAVE_GETPASS */ -#if !defined(__WIN__) && !defined(__NETWARE__) -#include -#ifdef HAVE_TERMIOS_H /* For tty-password */ -#include -#define TERMIO struct termios -#else -#ifdef HAVE_TERMIO_H /* For tty-password */ -#include -#define TERMIO struct termio -#else -#include -#define TERMIO struct sgttyb -#endif -#endif -#ifdef alpha_linux_port -#include /* QQ; Fix this in configure */ -#include -#endif -#else -#ifndef __NETWARE__ -#include -#endif /* __NETWARE__ */ -#endif /* __WIN__ */ -#endif /* HAVE_GETPASS */ - -#ifdef HAVE_GETPASSPHRASE /* For Solaris */ -#define getpass(A) getpassphrase(A) -#endif - -#if defined( __WIN__) || defined(__NETWARE__) -/* were just going to fake it here and get input from the keyboard */ - -#ifdef __NETWARE__ -#undef _getch -#undef _cputs -#define _getch getcharacter -#define _cputs(A) putstring(A) -#endif - -char *get_tty_password(const char *opt_message) -{ - char to[80]; - char *pos=to,*end=to+sizeof(to)-1; - int i=0; - DBUG_ENTER("get_tty_password"); - _cputs(opt_message ? opt_message : "Enter password: "); - for (;;) - { - char tmp; - tmp=_getch(); - if (tmp == '\b' || (int) tmp == 127) - { - if (pos != to) - { - _cputs("\b \b"); - pos--; - continue; - } - } - if (tmp == '\n' || tmp == '\r' || tmp == 3) - break; - if (iscntrl(tmp) || pos == end) - continue; - _cputs("*"); - *(pos++) = tmp; - } - while (pos != to && isspace(pos[-1]) == ' ') - pos--; /* Allow dummy space at end */ - *pos=0; - _cputs("\n"); - DBUG_RETURN(my_strdup(to,MYF(MY_FAE))); -} - -#else - -#ifndef HAVE_GETPASS -/* - Can't use fgets, because readline will get confused - length is max number of chars in to, not counting \0 - to will not include the eol characters. -*/ - -static void get_password(char *to,uint length,int fd, my_bool echo) -{ - char *pos=to,*end=to+length; - - for (;;) - { - char tmp; - if (my_read(fd,&tmp,1,MYF(0)) != 1) - break; - if (tmp == '\b' || (int) tmp == 127) - { - if (pos != to) - { - if (echo) - { - fputs("\b \b",stdout); - fflush(stdout); - } - pos--; - continue; - } - } - if (tmp == '\n' || tmp == '\r' || tmp == 3) - break; - if (iscntrl(tmp) || pos == end) - continue; - if (echo) - { - fputc('*',stdout); - fflush(stdout); - } - *(pos++) = tmp; - } - while (pos != to && isspace(pos[-1]) == ' ') - pos--; /* Allow dummy space at end */ - *pos=0; - return; -} -#endif /* ! HAVE_GETPASS */ - - -char *get_tty_password(const char *opt_message) -{ -#ifdef HAVE_GETPASS - char *passbuff; -#else /* ! HAVE_GETPASS */ - TERMIO org,tmp; -#endif /* HAVE_GETPASS */ - char buff[80]; - - DBUG_ENTER("get_tty_password"); - -#ifdef HAVE_GETPASS - passbuff = getpass(opt_message ? opt_message : "Enter password: "); - - /* copy the password to buff and clear original (static) buffer */ - strnmov(buff, passbuff, sizeof(buff) - 1); -#ifdef _PASSWORD_LEN - memset(passbuff, 0, _PASSWORD_LEN); -#endif -#else - if (isatty(fileno(stdout))) - { - fputs(opt_message ? opt_message : "Enter password: ",stdout); - fflush(stdout); - } -#if defined(HAVE_TERMIOS_H) - tcgetattr(fileno(stdin), &org); - tmp = org; - tmp.c_lflag &= ~(ECHO | ISIG | ICANON); - tmp.c_cc[VMIN] = 1; - tmp.c_cc[VTIME] = 0; - tcsetattr(fileno(stdin), TCSADRAIN, &tmp); - get_password(buff, sizeof(buff)-1, fileno(stdin), isatty(fileno(stdout))); - tcsetattr(fileno(stdin), TCSADRAIN, &org); -#elif defined(HAVE_TERMIO_H) - ioctl(fileno(stdin), (int) TCGETA, &org); - tmp=org; - tmp.c_lflag &= ~(ECHO | ISIG | ICANON); - tmp.c_cc[VMIN] = 1; - tmp.c_cc[VTIME]= 0; - ioctl(fileno(stdin),(int) TCSETA, &tmp); - get_password(buff,sizeof(buff)-1,fileno(stdin),isatty(fileno(stdout))); - ioctl(fileno(stdin),(int) TCSETA, &org); -#else - gtty(fileno(stdin), &org); - tmp=org; - tmp.sg_flags &= ~ECHO; - tmp.sg_flags |= RAW; - stty(fileno(stdin), &tmp); - get_password(buff,sizeof(buff)-1,fileno(stdin),isatty(fileno(stdout))); - stty(fileno(stdin), &org); -#endif - if (isatty(fileno(stdout))) - fputc('\n',stdout); -#endif /* HAVE_GETPASS */ - - DBUG_RETURN(my_strdup(buff,MYF(MY_FAE))); -} -#endif /*__WIN__*/ diff --git a/externals/mysql/libmysql/libmysql.c b/externals/mysql/libmysql/libmysql.c deleted file mode 100644 index 299a5677ff..0000000000 --- a/externals/mysql/libmysql/libmysql.c +++ /dev/null @@ -1,4902 +0,0 @@ -/* Copyright (C) 2000-2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation. - - There are special exceptions to the terms and conditions of the GPL as it - is applied to this software. View the full text of the exception in file - EXCEPTIONS-CLIENT in the directory of this software distribution. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include -#include "mysql.h" -#include "mysql_version.h" -#include "mysqld_error.h" -#include "errmsg.h" -#include -#include -#include -#include -#ifdef HAVE_PWD_H -#include -#endif -#if !defined(MSDOS) && !defined(__WIN__) -#include -#include -#include -#include -#ifdef HAVE_SELECT_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#endif /* !defined(MSDOS) && !defined(__WIN__) */ -#ifdef HAVE_POLL -#include -#endif -#ifdef HAVE_SYS_UN_H -#include -#endif -#if defined(THREAD) && !defined(__WIN__) -#include /* because of signal() */ -#endif -#ifndef INADDR_NONE -#define INADDR_NONE -1 -#endif - -#include -#include "client_settings.h" - -#undef net_buffer_length -#undef max_allowed_packet - -ulong net_buffer_length=8192; -ulong max_allowed_packet= 1024L*1024L*1024L; - - -#ifdef EMBEDDED_LIBRARY -#undef net_flush -my_bool net_flush(NET *net); -#endif - -#if defined(MSDOS) || defined(__WIN__) -/* socket_errno is defined in my_global.h for all platforms */ -#define perror(A) -#else -#include -#define SOCKET_ERROR -1 -#endif /* __WIN__ */ - -/* - If allowed through some configuration, then this needs to - be changed -*/ -#define MAX_LONG_DATA_LENGTH 8192 -#define unsigned_field(A) ((A)->flags & UNSIGNED_FLAG) - -static void append_wild(char *to,char *end,const char *wild); -sig_handler my_pipe_sig_handler(int sig); - -static my_bool mysql_client_init= 0; -static my_bool org_my_init_done= 0; - - -/* - Initialize the MySQL client library - - SYNOPSIS - mysql_server_init() - - NOTES - Should be called before doing any other calls to the MySQL - client library to initialize thread specific variables etc. - It's called by mysql_init() to ensure that things will work for - old not threaded applications that doesn't call mysql_server_init() - directly. - - RETURN - 0 ok - 1 could not initialize environment (out of memory or thread keys) -*/ - -int STDCALL mysql_server_init(int argc __attribute__((unused)), - char **argv __attribute__((unused)), - char **groups __attribute__((unused))) -{ - int result= 0; - if (!mysql_client_init) - { - mysql_client_init=1; - org_my_init_done=my_init_done; - if (my_init()) /* Will init threads */ - return 1; - init_client_errs(); - if (!mysql_port) - { - mysql_port = MYSQL_PORT; -#ifndef MSDOS - { - struct servent *serv_ptr; - char *env; - - /* - if builder specifically requested a default port, use that - (even if it coincides with our factory default). - only if they didn't do we check /etc/services (and, failing - on that, fall back to the factory default of 3306). - either default can be overridden by the environment variable - MYSQL_TCP_PORT, which in turn can be overridden with command - line options. - */ - -#if MYSQL_PORT_DEFAULT == 0 - if ((serv_ptr = getservbyname("mysql", "tcp"))) - mysql_port = (uint) ntohs((ushort) serv_ptr->s_port); -#endif - if ((env = getenv("MYSQL_TCP_PORT"))) - mysql_port =(uint) atoi(env); - } -#endif - } - if (!mysql_unix_port) - { - char *env; -#ifdef __WIN__ - mysql_unix_port = (char*) MYSQL_NAMEDPIPE; -#else - mysql_unix_port = (char*) MYSQL_UNIX_ADDR; -#endif - if ((env = getenv("MYSQL_UNIX_PORT"))) - mysql_unix_port = env; - } - mysql_debug(NullS); -#if defined(SIGPIPE) && !defined(__WIN__) && !defined(__NETWARE__) - (void) signal(SIGPIPE, SIG_IGN); -#endif -#ifdef EMBEDDED_LIBRARY - if (argc > -1) - result= init_embedded_server(argc, argv, groups); -#endif - } -#ifdef THREAD - else - result= (int)my_thread_init(); /* Init if new thread */ -#endif - return result; -} - - -/* - Free all memory and resources used by the client library - - NOTES - When calling this there should not be any other threads using - the library. - - To make things simpler when used with windows dll's (which calls this - function automaticly), it's safe to call this function multiple times. -*/ - - -void STDCALL mysql_server_end() -{ - if (!mysql_client_init) - return; - -#ifdef EMBEDDED_LIBRARY - end_embedded_server(); -#endif - finish_client_errs(); - vio_end(); - - /* If library called my_init(), free memory allocated by it */ - if (!org_my_init_done) - { - my_end(0); - } - else - { - free_charsets(); - mysql_thread_end(); - } - - mysql_client_init= org_my_init_done= 0; -#ifdef EMBEDDED_SERVER - if (stderror_file) - { - fclose(stderror_file); - stderror_file= 0; - } -#endif -} - -static MYSQL_PARAMETERS mysql_internal_parameters= -{&max_allowed_packet, &net_buffer_length, 0}; - -MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void) -{ - return &mysql_internal_parameters; -} - -my_bool STDCALL mysql_thread_init() -{ -#ifdef THREAD - return my_thread_init(); -#else - return 0; -#endif -} - -void STDCALL mysql_thread_end() -{ -#ifdef THREAD - my_thread_end(); -#endif -} - - -/* - Expand wildcard to a sql string -*/ - -static void -append_wild(char *to, char *end, const char *wild) -{ - end-=5; /* Some extra */ - if (wild && wild[0]) - { - to=strmov(to," like '"); - while (*wild && to < end) - { - if (*wild == '\\' || *wild == '\'') - *to++='\\'; - *to++= *wild++; - } - if (*wild) /* Too small buffer */ - *to++='%'; /* Nicer this way */ - to[0]='\''; - to[1]=0; - } -} - - -/************************************************************************** - Init debugging if MYSQL_DEBUG environment variable is found -**************************************************************************/ - -void STDCALL -mysql_debug(const char *debug __attribute__((unused))) -{ -#ifndef DBUG_OFF - char *env; - if (debug) - { - DBUG_PUSH(debug); - } - else if ((env = getenv("MYSQL_DEBUG"))) - { - DBUG_PUSH(env); -#if !defined(_WINVER) && !defined(WINVER) - puts("\n-------------------------------------------------------"); - puts("MYSQL_DEBUG found. libmysql started with the following:"); - puts(env); - puts("-------------------------------------------------------\n"); -#else - { - char buff[80]; - buff[sizeof(buff)-1]= 0; - strxnmov(buff,sizeof(buff)-1,"libmysql: ", env, NullS); - MessageBox((HWND) 0,"Debugging variable MYSQL_DEBUG used",buff,MB_OK); - } -#endif - } -#endif -} - - -/************************************************************************** - Ignore SIGPIPE handler - ARGSUSED -**************************************************************************/ - -sig_handler -my_pipe_sig_handler(int sig __attribute__((unused))) -{ - DBUG_PRINT("info",("Hit by signal %d",sig)); -#ifdef DONT_REMEMBER_SIGNAL - (void) signal(SIGPIPE, my_pipe_sig_handler); -#endif -} - - -/************************************************************************** - Connect to sql server - If host == 0 then use localhost -**************************************************************************/ - -#ifdef USE_OLD_FUNCTIONS -MYSQL * STDCALL -mysql_connect(MYSQL *mysql,const char *host, - const char *user, const char *passwd) -{ - MYSQL *res; - mysql=mysql_init(mysql); /* Make it thread safe */ - { - DBUG_ENTER("mysql_connect"); - if (!(res=mysql_real_connect(mysql,host,user,passwd,NullS,0,NullS,0))) - { - if (mysql->free_me) - my_free((uchar*) mysql,MYF(0)); - } - mysql->reconnect= 1; - DBUG_RETURN(res); - } -} -#endif - - -/************************************************************************** - Change user and database -**************************************************************************/ - -int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd) -{ - NET *net= &mysql->net; - ulong pkt_length; - - pkt_length= cli_safe_read(mysql); - - if (pkt_length == packet_error) - return 1; - - if (pkt_length == 1 && net->read_pos[0] == 254 && - mysql->server_capabilities & CLIENT_SECURE_CONNECTION) - { - /* - By sending this very specific reply server asks us to send scrambled - password in old format. The reply contains scramble_323. - */ - scramble_323(buff, mysql->scramble, passwd); - if (my_net_write(net, (uchar*) buff, SCRAMBLE_LENGTH_323 + 1) || - net_flush(net)) - { - set_mysql_error(mysql, CR_SERVER_LOST, unknown_sqlstate); - return 1; - } - /* Read what server thinks about out new auth message report */ - if (cli_safe_read(mysql) == packet_error) - return 1; - } - return 0; -} - -my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, - const char *passwd, const char *db) -{ - char buff[USERNAME_LENGTH+SCRAMBLED_PASSWORD_CHAR_LENGTH+NAME_LEN+2]; - char *end= buff; - int rc; - CHARSET_INFO *saved_cs= mysql->charset; - - DBUG_ENTER("mysql_change_user"); - - /* Get the connection-default character set. */ - - if (mysql_init_character_set(mysql)) - { - mysql->charset= saved_cs; - DBUG_RETURN(TRUE); - } - - /* Use an empty string instead of NULL. */ - - if (!user) - user=""; - if (!passwd) - passwd=""; - - /* Store user into the buffer */ - end= strmake(end, user, USERNAME_LENGTH) + 1; - - /* write scrambled password according to server capabilities */ - if (passwd[0]) - { - if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION) - { - *end++= SCRAMBLE_LENGTH; - scramble(end, mysql->scramble, passwd); - end+= SCRAMBLE_LENGTH; - } - else - { - scramble_323(end, mysql->scramble, passwd); - end+= SCRAMBLE_LENGTH_323 + 1; - } - } - else - *end++= '\0'; /* empty password */ - /* Add database if needed */ - end= strmake(end, db ? db : "", NAME_LEN) + 1; - - /* Add character set number. */ - - if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION) - { - /* - Character set 45 (4-byte UTF-8) is not available on servers - before version 6.0, so we need to go ahead and switch to utf8_mb3. - */ - if (mysql->charset->number == 45 && mysql->server_version[0] < '6') - int2store(end, 33); - else - int2store(end, (ushort) mysql->charset->number); - end+= 2; - } - - /* Write authentication package */ - simple_command(mysql,COM_CHANGE_USER, (uchar*) buff, (ulong) (end-buff), 1); - - rc= (*mysql->methods->read_change_user_result)(mysql, buff, passwd); - - /* - The server will close all statements no matter was the attempt - to change user successful or not. - */ - mysql_detach_stmt_list(&mysql->stmts, "mysql_change_user"); - if (rc == 0) - { - /* Free old connect information */ - my_free(mysql->user,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->passwd,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR)); - - /* alloc new connect information */ - mysql->user= my_strdup(user,MYF(MY_WME)); - mysql->passwd=my_strdup(passwd,MYF(MY_WME)); - mysql->db= db ? my_strdup(db,MYF(MY_WME)) : 0; - } - else - { - mysql->charset= saved_cs; - } - - DBUG_RETURN(rc); -} - -#if defined(HAVE_GETPWUID) && defined(NO_GETPWUID_DECL) -struct passwd *getpwuid(uid_t); -char* getlogin(void); -#endif - -#if defined(__NETWARE__) -/* Default to value of USER on NetWare, if unset use "UNKNOWN_USER" */ -void read_user_name(char *name) -{ - char *str=getenv("USER"); - strmake(name, str ? str : "UNKNOWN_USER", USERNAME_LENGTH); -} - -#elif !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__) - -void read_user_name(char *name) -{ - DBUG_ENTER("read_user_name"); - if (geteuid() == 0) - (void) strmov(name,"root"); /* allow use of surun */ - else - { -#ifdef HAVE_GETPWUID - struct passwd *skr; - const char *str; - if ((str=getlogin()) == NULL) - { - if ((skr=getpwuid(geteuid())) != NULL) - str=skr->pw_name; - else if (!(str=getenv("USER")) && !(str=getenv("LOGNAME")) && - !(str=getenv("LOGIN"))) - str="UNKNOWN_USER"; - } - (void) strmake(name,str,USERNAME_LENGTH); -#elif HAVE_CUSERID - (void) cuserid(name); -#else - strmov(name,"UNKNOWN_USER"); -#endif - } - DBUG_VOID_RETURN; -} - -#else /* If MSDOS || VMS */ - -void read_user_name(char *name) -{ - char *str=getenv("USER"); /* ODBC will send user variable */ - strmake(name,str ? str : "ODBC", USERNAME_LENGTH); -} - -#endif - -my_bool handle_local_infile(MYSQL *mysql, const char *net_filename) -{ - my_bool result= 1; - uint packet_length=MY_ALIGN(mysql->net.max_packet-16,IO_SIZE); - NET *net= &mysql->net; - int readcount; - void *li_ptr; /* pass state to local_infile functions */ - char *buf; /* buffer to be filled by local_infile_read */ - struct st_mysql_options *options= &mysql->options; - DBUG_ENTER("handle_local_infile"); - - /* check that we've got valid callback functions */ - if (!(options->local_infile_init && - options->local_infile_read && - options->local_infile_end && - options->local_infile_error)) - { - /* if any of the functions is invalid, set the default */ - mysql_set_local_infile_default(mysql); - } - - /* copy filename into local memory and allocate read buffer */ - if (!(buf=my_malloc(packet_length, MYF(0)))) - { - set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate); - DBUG_RETURN(1); - } - - /* initialize local infile (open file, usually) */ - if ((*options->local_infile_init)(&li_ptr, net_filename, - options->local_infile_userdata)) - { - (void) my_net_write(net,(const uchar*) "",0); /* Server needs one packet */ - net_flush(net); - strmov(net->sqlstate, unknown_sqlstate); - net->last_errno= - (*options->local_infile_error)(li_ptr, - net->last_error, - sizeof(net->last_error)-1); - goto err; - } - - /* read blocks of data from local infile callback */ - while ((readcount = - (*options->local_infile_read)(li_ptr, buf, - packet_length)) > 0) - { - if (my_net_write(net, (uchar*) buf, readcount)) - { - DBUG_PRINT("error", - ("Lost connection to MySQL server during LOAD DATA of local file")); - set_mysql_error(mysql, CR_SERVER_LOST, unknown_sqlstate); - goto err; - } - } - - /* Send empty packet to mark end of file */ - if (my_net_write(net, (const uchar*) "", 0) || net_flush(net)) - { - set_mysql_error(mysql, CR_SERVER_LOST, unknown_sqlstate); - goto err; - } - - if (readcount < 0) - { - net->last_errno= - (*options->local_infile_error)(li_ptr, - net->last_error, - sizeof(net->last_error)-1); - goto err; - } - - result=0; /* Ok */ - -err: - /* free up memory allocated with _init, usually */ - (*options->local_infile_end)(li_ptr); - my_free(buf, MYF(0)); - DBUG_RETURN(result); -} - - -/**************************************************************************** - Default handlers for LOAD LOCAL INFILE -****************************************************************************/ - -typedef struct st_default_local_infile -{ - int fd; - int error_num; - const char *filename; - char error_msg[LOCAL_INFILE_ERROR_LEN]; -} default_local_infile_data; - - -/* - Open file for LOAD LOCAL INFILE - - SYNOPSIS - default_local_infile_init() - ptr Store pointer to internal data here - filename File name to open. This may be in unix format ! - - - NOTES - Even if this function returns an error, the load data interface - guarantees that default_local_infile_end() is called. - - RETURN - 0 ok - 1 error -*/ - -static int default_local_infile_init(void **ptr, const char *filename, - void *userdata __attribute__ ((unused))) -{ - default_local_infile_data *data; - char tmp_name[FN_REFLEN]; - - if (!(*ptr= data= ((default_local_infile_data *) - my_malloc(sizeof(default_local_infile_data), MYF(0))))) - return 1; /* out of memory */ - - data->error_msg[0]= 0; - data->error_num= 0; - data->filename= filename; - - fn_format(tmp_name, filename, "", "", MY_UNPACK_FILENAME); - if ((data->fd = my_open(tmp_name, O_RDONLY, MYF(0))) < 0) - { - data->error_num= my_errno; - my_snprintf(data->error_msg, sizeof(data->error_msg)-1, - EE(EE_FILENOTFOUND), tmp_name, data->error_num); - return 1; - } - return 0; /* ok */ -} - - -/* - Read data for LOAD LOCAL INFILE - - SYNOPSIS - default_local_infile_read() - ptr Points to handle allocated by _init - buf Read data here - buf_len Ammount of data to read - - RETURN - > 0 number of bytes read - == 0 End of data - < 0 Error -*/ - -static int default_local_infile_read(void *ptr, char *buf, uint buf_len) -{ - int count; - default_local_infile_data*data = (default_local_infile_data *) ptr; - - if ((count= (int) my_read(data->fd, (uchar *) buf, buf_len, MYF(0))) < 0) - { - data->error_num= EE_READ; /* the errmsg for not entire file read */ - my_snprintf(data->error_msg, sizeof(data->error_msg)-1, - EE(EE_READ), - data->filename, my_errno); - } - return count; -} - - -/* - Read data for LOAD LOCAL INFILE - - SYNOPSIS - default_local_infile_end() - ptr Points to handle allocated by _init - May be NULL if _init failed! - - RETURN -*/ - -static void default_local_infile_end(void *ptr) -{ - default_local_infile_data *data= (default_local_infile_data *) ptr; - if (data) /* If not error on open */ - { - if (data->fd >= 0) - my_close(data->fd, MYF(MY_WME)); - my_free(ptr, MYF(MY_WME)); - } -} - - -/* - Return error from LOAD LOCAL INFILE - - SYNOPSIS - default_local_infile_end() - ptr Points to handle allocated by _init - May be NULL if _init failed! - error_msg Store error text here - error_msg_len Max lenght of error_msg - - RETURN - error message number -*/ - -static int -default_local_infile_error(void *ptr, char *error_msg, uint error_msg_len) -{ - default_local_infile_data *data = (default_local_infile_data *) ptr; - if (data) /* If not error on open */ - { - strmake(error_msg, data->error_msg, error_msg_len); - return data->error_num; - } - /* This can only happen if we got error on malloc of handle */ - strmov(error_msg, ER(CR_OUT_OF_MEMORY)); - return CR_OUT_OF_MEMORY; -} - - -void -mysql_set_local_infile_handler(MYSQL *mysql, - int (*local_infile_init)(void **, const char *, - void *), - int (*local_infile_read)(void *, char *, uint), - void (*local_infile_end)(void *), - int (*local_infile_error)(void *, char *, uint), - void *userdata) -{ - mysql->options.local_infile_init= local_infile_init; - mysql->options.local_infile_read= local_infile_read; - mysql->options.local_infile_end= local_infile_end; - mysql->options.local_infile_error= local_infile_error; - mysql->options.local_infile_userdata = userdata; -} - - -void mysql_set_local_infile_default(MYSQL *mysql) -{ - mysql->options.local_infile_init= default_local_infile_init; - mysql->options.local_infile_read= default_local_infile_read; - mysql->options.local_infile_end= default_local_infile_end; - mysql->options.local_infile_error= default_local_infile_error; -} - - -/************************************************************************** - Do a query. If query returned rows, free old rows. - Read data by mysql_store_result or by repeat call of mysql_fetch_row -**************************************************************************/ - -int STDCALL -mysql_query(MYSQL *mysql, const char *query) -{ - return mysql_real_query(mysql,query, (uint) strlen(query)); -} - - -/************************************************************************** - Return next field of the query results -**************************************************************************/ - -MYSQL_FIELD * STDCALL -mysql_fetch_field(MYSQL_RES *result) -{ - if (result->current_field >= result->field_count) - return(NULL); - return &result->fields[result->current_field++]; -} - - -/************************************************************************** - Move to a specific row and column -**************************************************************************/ - -void STDCALL -mysql_data_seek(MYSQL_RES *result, my_ulonglong row) -{ - MYSQL_ROWS *tmp=0; - DBUG_PRINT("info",("mysql_data_seek(%ld)",(long) row)); - if (result->data) - for (tmp=result->data->data; row-- && tmp ; tmp = tmp->next) ; - result->current_row=0; - result->data_cursor = tmp; -} - - -/************************************************************************* - put the row or field cursor one a position one got from mysql_row_tell() - This doesn't restore any data. The next mysql_fetch_row or - mysql_fetch_field will return the next row or field after the last used -*************************************************************************/ - -MYSQL_ROW_OFFSET STDCALL -mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET row) -{ - MYSQL_ROW_OFFSET return_value=result->data_cursor; - result->current_row= 0; - result->data_cursor= row; - return return_value; -} - - -MYSQL_FIELD_OFFSET STDCALL -mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET field_offset) -{ - MYSQL_FIELD_OFFSET return_value=result->current_field; - result->current_field=field_offset; - return return_value; -} - - -/***************************************************************************** - List all databases -*****************************************************************************/ - -MYSQL_RES * STDCALL -mysql_list_dbs(MYSQL *mysql, const char *wild) -{ - char buff[255]; - DBUG_ENTER("mysql_list_dbs"); - - append_wild(strmov(buff,"show databases"),buff+sizeof(buff),wild); - if (mysql_query(mysql,buff)) - DBUG_RETURN(0); - DBUG_RETURN (mysql_store_result(mysql)); -} - - -/***************************************************************************** - List all tables in a database - If wild is given then only the tables matching wild is returned -*****************************************************************************/ - -MYSQL_RES * STDCALL -mysql_list_tables(MYSQL *mysql, const char *wild) -{ - char buff[255]; - DBUG_ENTER("mysql_list_tables"); - - append_wild(strmov(buff,"show tables"),buff+sizeof(buff),wild); - if (mysql_query(mysql,buff)) - DBUG_RETURN(0); - DBUG_RETURN (mysql_store_result(mysql)); -} - - -MYSQL_FIELD *cli_list_fields(MYSQL *mysql) -{ - MYSQL_DATA *query; - if (!(query= cli_read_rows(mysql,(MYSQL_FIELD*) 0, - protocol_41(mysql) ? 8 : 6))) - return NULL; - - mysql->field_count= (uint) query->rows; - return unpack_fields(query,&mysql->field_alloc, - mysql->field_count, 1, mysql->server_capabilities); -} - - -/************************************************************************** - List all fields in a table - If wild is given then only the fields matching wild is returned - Instead of this use query: - show fields in 'table' like "wild" -**************************************************************************/ - -MYSQL_RES * STDCALL -mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) -{ - MYSQL_RES *result; - MYSQL_FIELD *fields; - char buff[257],*end; - DBUG_ENTER("mysql_list_fields"); - DBUG_PRINT("enter",("table: '%s' wild: '%s'",table,wild ? wild : "")); - - end=strmake(strmake(buff, table,128)+1,wild ? wild : "",128); - free_old_query(mysql); - if (simple_command(mysql, COM_FIELD_LIST, (uchar*) buff, - (ulong) (end-buff), 1) || - !(fields= (*mysql->methods->list_fields)(mysql))) - DBUG_RETURN(NULL); - - if (!(result = (MYSQL_RES *) my_malloc(sizeof(MYSQL_RES), - MYF(MY_WME | MY_ZEROFILL)))) - DBUG_RETURN(NULL); - - result->methods= mysql->methods; - result->field_alloc=mysql->field_alloc; - mysql->fields=0; - result->field_count = mysql->field_count; - result->fields= fields; - result->eof=1; - DBUG_RETURN(result); -} - -/* List all running processes (threads) in server */ - -MYSQL_RES * STDCALL -mysql_list_processes(MYSQL *mysql) -{ - MYSQL_DATA *fields; - uint field_count; - uchar *pos; - DBUG_ENTER("mysql_list_processes"); - - LINT_INIT(fields); - if (simple_command(mysql,COM_PROCESS_INFO,0,0,0)) - DBUG_RETURN(0); - free_old_query(mysql); - pos=(uchar*) mysql->net.read_pos; - field_count=(uint) net_field_length(&pos); - if (!(fields = (*mysql->methods->read_rows)(mysql,(MYSQL_FIELD*) 0, - protocol_41(mysql) ? 7 : 5))) - DBUG_RETURN(NULL); - if (!(mysql->fields=unpack_fields(fields,&mysql->field_alloc,field_count,0, - mysql->server_capabilities))) - DBUG_RETURN(0); - mysql->status=MYSQL_STATUS_GET_RESULT; - mysql->field_count=field_count; - DBUG_RETURN(mysql_store_result(mysql)); -} - - -#ifdef USE_OLD_FUNCTIONS -int STDCALL -mysql_create_db(MYSQL *mysql, const char *db) -{ - DBUG_ENTER("mysql_createdb"); - DBUG_PRINT("enter",("db: %s",db)); - DBUG_RETURN(simple_command(mysql,COM_CREATE_DB,db, (ulong) strlen(db),0)); -} - - -int STDCALL -mysql_drop_db(MYSQL *mysql, const char *db) -{ - DBUG_ENTER("mysql_drop_db"); - DBUG_PRINT("enter",("db: %s",db)); - DBUG_RETURN(simple_command(mysql,COM_DROP_DB,db,(ulong) strlen(db),0)); -} -#endif - - -int STDCALL -mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level) -{ - uchar level[1]; - DBUG_ENTER("mysql_shutdown"); - level[0]= (uchar) shutdown_level; - DBUG_RETURN(simple_command(mysql, COM_SHUTDOWN, level, 1, 0)); -} - - -int STDCALL -mysql_refresh(MYSQL *mysql,uint options) -{ - uchar bits[1]; - DBUG_ENTER("mysql_refresh"); - bits[0]= (uchar) options; - DBUG_RETURN(simple_command(mysql, COM_REFRESH, bits, 1, 0)); -} - - -int STDCALL -mysql_kill(MYSQL *mysql,ulong pid) -{ - uchar buff[4]; - DBUG_ENTER("mysql_kill"); - int4store(buff,pid); - DBUG_RETURN(simple_command(mysql,COM_PROCESS_KILL,buff,sizeof(buff),0)); -} - - -int STDCALL -mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option) -{ - uchar buff[2]; - DBUG_ENTER("mysql_set_server_option"); - int2store(buff, (uint) option); - DBUG_RETURN(simple_command(mysql, COM_SET_OPTION, buff, sizeof(buff), 0)); -} - - -int STDCALL -mysql_dump_debug_info(MYSQL *mysql) -{ - DBUG_ENTER("mysql_dump_debug_info"); - DBUG_RETURN(simple_command(mysql,COM_DEBUG,0,0,0)); -} - - -const char *cli_read_statistics(MYSQL *mysql) -{ - mysql->net.read_pos[mysql->packet_length]=0; /* End of stat string */ - if (!mysql->net.read_pos[0]) - { - set_mysql_error(mysql, CR_WRONG_HOST_INFO, unknown_sqlstate); - return mysql->net.last_error; - } - return (char*) mysql->net.read_pos; -} - - -const char * STDCALL -mysql_stat(MYSQL *mysql) -{ - DBUG_ENTER("mysql_stat"); - if (simple_command(mysql,COM_STATISTICS,0,0,0)) - DBUG_RETURN(mysql->net.last_error); - DBUG_RETURN((*mysql->methods->read_statistics)(mysql)); -} - - -int STDCALL -mysql_ping(MYSQL *mysql) -{ - int res; - DBUG_ENTER("mysql_ping"); - res= simple_command(mysql,COM_PING,0,0,0); - if (res == CR_SERVER_LOST && mysql->reconnect) - res= simple_command(mysql,COM_PING,0,0,0); - DBUG_RETURN(res); -} - - -const char * STDCALL -mysql_get_server_info(MYSQL *mysql) -{ - return((char*) mysql->server_version); -} - - -const char * STDCALL -mysql_get_host_info(MYSQL *mysql) -{ - return(mysql->host_info); -} - - -uint STDCALL -mysql_get_proto_info(MYSQL *mysql) -{ - return (mysql->protocol_version); -} - -const char * STDCALL -mysql_get_client_info(void) -{ - return (char*) MYSQL_SERVER_VERSION; -} - -ulong STDCALL mysql_get_client_version(void) -{ - return MYSQL_VERSION_ID; -} - -my_bool STDCALL mysql_eof(MYSQL_RES *res) -{ - return res->eof; -} - -MYSQL_FIELD * STDCALL mysql_fetch_field_direct(MYSQL_RES *res,uint fieldnr) -{ - return &(res)->fields[fieldnr]; -} - -MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res) -{ - return (res)->fields; -} - -MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res) -{ - return res->data_cursor; -} - -MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res) -{ - return (res)->current_field; -} - -/* MYSQL */ - -unsigned int STDCALL mysql_field_count(MYSQL *mysql) -{ - return mysql->field_count; -} - -my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql) -{ - return mysql->affected_rows; -} - -my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql) -{ - return mysql->insert_id; -} - -const char *STDCALL mysql_sqlstate(MYSQL *mysql) -{ - return mysql ? mysql->net.sqlstate : cant_connect_sqlstate; -} - -uint STDCALL mysql_warning_count(MYSQL *mysql) -{ - return mysql->warning_count; -} - -const char *STDCALL mysql_info(MYSQL *mysql) -{ - return mysql->info; -} - -ulong STDCALL mysql_thread_id(MYSQL *mysql) -{ - return (mysql)->thread_id; -} - -const char * STDCALL mysql_character_set_name(MYSQL *mysql) -{ - return mysql->charset->csname; -} - -void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo) -{ - csinfo->number = mysql->charset->number; - csinfo->state = mysql->charset->state; - csinfo->csname = mysql->charset->csname; - csinfo->name = mysql->charset->name; - csinfo->comment = mysql->charset->comment; - csinfo->mbminlen = mysql->charset->mbminlen; - csinfo->mbmaxlen = mysql->charset->mbmaxlen; - - if (mysql->options.charset_dir) - csinfo->dir = mysql->options.charset_dir; - else - csinfo->dir = charsets_dir; -} - -uint STDCALL mysql_thread_safe(void) -{ -#ifdef THREAD - return 1; -#else - return 0; -#endif -} - - -my_bool STDCALL mysql_embedded(void) -{ -#ifdef EMBEDDED_LIBRARY - return 1; -#else - return 0; -#endif -} - -/**************************************************************************** - Some support functions -****************************************************************************/ - -/* - Functions called my my_net_init() to set some application specific variables -*/ - -void my_net_local_init(NET *net) -{ - net->max_packet= (uint) net_buffer_length; - my_net_set_read_timeout(net, CLIENT_NET_READ_TIMEOUT); - my_net_set_write_timeout(net, CLIENT_NET_WRITE_TIMEOUT); - net->retry_count= 1; - net->max_packet_size= max(net_buffer_length, max_allowed_packet); -} - -/* - This function is used to create HEX string that you - can use in a SQL statement in of the either ways: - INSERT INTO blob_column VALUES (0xAABBCC); (any MySQL version) - INSERT INTO blob_column VALUES (X'AABBCC'); (4.1 and higher) - - The string in "from" is encoded to a HEX string. - The result is placed in "to" and a terminating null byte is appended. - - The string pointed to by "from" must be "length" bytes long. - You must allocate the "to" buffer to be at least length*2+1 bytes long. - Each character needs two bytes, and you need room for the terminating - null byte. When mysql_hex_string() returns, the contents of "to" will - be a null-terminated string. The return value is the length of the - encoded string, not including the terminating null character. - - The return value does not contain any leading 0x or a leading X' and - trailing '. The caller must supply whichever of those is desired. -*/ - -ulong STDCALL -mysql_hex_string(char *to, const char *from, ulong length) -{ - char *to0= to; - const char *end; - - for (end= from + length; from < end; from++) - { - *to++= _dig_vec_upper[((unsigned char) *from) >> 4]; - *to++= _dig_vec_upper[((unsigned char) *from) & 0x0F]; - } - *to= '\0'; - return (ulong) (to-to0); -} - -/* - Add escape characters to a string (blob?) to make it suitable for a insert - to should at least have place for length*2+1 chars - Returns the length of the to string -*/ - -ulong STDCALL -mysql_escape_string(char *to,const char *from,ulong length) -{ - return escape_string_for_mysql(default_charset_info, to, 0, from, length); -} - -ulong STDCALL -mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, - ulong length) -{ - if (mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES) - return escape_quotes_for_mysql(mysql->charset, to, 0, from, length); - return escape_string_for_mysql(mysql->charset, to, 0, from, length); -} - -void STDCALL -myodbc_remove_escape(MYSQL *mysql,char *name) -{ - char *to; -#ifdef USE_MB - my_bool use_mb_flag=use_mb(mysql->charset); - char *end; - LINT_INIT(end); - if (use_mb_flag) - for (end=name; *end ; end++) ; -#endif - - for (to=name ; *name ; name++) - { -#ifdef USE_MB - int l; - if (use_mb_flag && (l = my_ismbchar( mysql->charset, name , end ) ) ) - { - while (l--) - *to++ = *name++; - name--; - continue; - } -#endif - if (*name == '\\' && name[1]) - name++; - *to++= *name; - } - *to=0; -} - -/******************************************************************** - Implementation of new client API for 4.1 version. - - mysql_stmt_* are real prototypes used by applications. - - To make API work in embedded library all functions performing - real I/O are prefixed with 'cli_' (abbreviated from 'Call Level - Interface'). This functions are invoked via pointers set in - MYSQL::methods structure. Embedded counterparts, prefixed with - 'emb_' reside in libmysqld/lib_sql.cc. -*********************************************************************/ - -/******************* Declarations ***********************************/ - -/* Default number of rows fetched per one COM_STMT_FETCH command. */ - -#define DEFAULT_PREFETCH_ROWS (ulong) 1 - -/* - These functions are called by function pointer MYSQL_STMT::read_row_func. - Each function corresponds to one of the read methods: - - mysql_stmt_fetch without prior mysql_stmt_store_result, - - mysql_stmt_fetch when result is stored, - - mysql_stmt_fetch when there are no rows (always returns MYSQL_NO_DATA) -*/ - -static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row); -static int stmt_read_row_buffered(MYSQL_STMT *stmt, unsigned char **row); -static int stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row); -static int stmt_read_row_no_data(MYSQL_STMT *stmt, unsigned char **row); -static int stmt_read_row_no_result_set(MYSQL_STMT *stmt, unsigned char **row); - -/* - This function is used in mysql_stmt_store_result if - STMT_ATTR_UPDATE_MAX_LENGTH attribute is set. -*/ -static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data); -static my_bool setup_one_fetch_function(MYSQL_BIND *, MYSQL_FIELD *field); - -/* Auxilary function used to reset statement handle. */ - -#define RESET_SERVER_SIDE 1 -#define RESET_LONG_DATA 2 -#define RESET_STORE_RESULT 4 -#define RESET_CLEAR_ERROR 8 - -static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags); - -/* - Maximum sizes of MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME - values stored in network buffer. -*/ - -/* 1 (length) + 2 (year) + 1 (month) + 1 (day) */ -#define MAX_DATE_REP_LENGTH 5 - -/* - 1 (length) + 1 (is negative) + 4 (day count) + 1 (hour) - + 1 (minute) + 1 (seconds) + 4 (microseconds) -*/ -#define MAX_TIME_REP_LENGTH 13 - -/* - 1 (length) + 2 (year) + 1 (month) + 1 (day) + - 1 (hour) + 1 (minute) + 1 (second) + 4 (microseconds) -*/ -#define MAX_DATETIME_REP_LENGTH 12 - -#define MAX_DOUBLE_STRING_REP_LENGTH 331 - -/* A macro to check truncation errors */ - -#define IS_TRUNCATED(value, is_unsigned, min, max, umax) \ - ((is_unsigned) ? (((value) > (umax) || (value) < 0) ? 1 : 0) : \ - (((value) > (max) || (value) < (min)) ? 1 : 0)) - -#define BIND_RESULT_DONE 1 -/* - We report truncations only if at least one of MYSQL_BIND::error - pointers is set. In this case stmt->bind_result_done |-ed with - this flag. -*/ -#define REPORT_DATA_TRUNCATION 2 - -/**************** Misc utility functions ****************************/ - -/* - Reallocate the NET package to have at least length bytes available. - - SYNPOSIS - my_realloc_str() - net The NET structure to modify. - length Ensure that net->buff has space for at least - this number of bytes. - - RETURN VALUES - 0 Success. - 1 Error, i.e. out of memory or requested packet size is bigger - than max_allowed_packet. The error code is stored in net->last_errno. -*/ - -static my_bool my_realloc_str(NET *net, ulong length) -{ - ulong buf_length= (ulong) (net->write_pos - net->buff); - my_bool res=0; - DBUG_ENTER("my_realloc_str"); - if (buf_length + length > net->max_packet) - { - res= net_realloc(net, buf_length + length); - if (res) - { - strmov(net->sqlstate, unknown_sqlstate); - strmov(net->last_error, ER(net->last_errno)); - } - net->write_pos= net->buff+ buf_length; - } - DBUG_RETURN(res); -} - - -static void stmt_clear_error(MYSQL_STMT *stmt) -{ - if (stmt->last_errno) - { - stmt->last_errno= 0; - stmt->last_error[0]= '\0'; - strmov(stmt->sqlstate, not_error_sqlstate); - } -} - -/** - Set statement error code, sqlstate, and error message - from given errcode and sqlstate. -*/ - -void set_stmt_error(MYSQL_STMT * stmt, int errcode, - const char *sqlstate, const char *err) -{ - DBUG_ENTER("set_stmt_error"); - DBUG_PRINT("enter", ("error: %d '%s'", errcode, ER(errcode))); - DBUG_ASSERT(stmt != 0); - - if (err == 0) - err= ER(errcode); - - stmt->last_errno= errcode; - strmov(stmt->last_error, ER(errcode)); - strmov(stmt->sqlstate, sqlstate); - - DBUG_VOID_RETURN; -} - - -/** - Set statement error code, sqlstate, and error message from NET. - - @param stmt a statement handle. Copy the error here. - @param net mysql->net. Source of the error. -*/ - -void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net) -{ - DBUG_ENTER("set_stmt_errmsg"); - DBUG_PRINT("enter", ("error: %d/%s '%s'", - net->last_errno, - net->sqlstate, - net->last_error)); - DBUG_ASSERT(stmt != 0); - - stmt->last_errno= net->last_errno; - if (net->last_error && net->last_error[0]) - strmov(stmt->last_error, net->last_error); - strmov(stmt->sqlstate, net->sqlstate); - - DBUG_VOID_RETURN; -} - -/* - Read and unpack server reply to COM_STMT_PREPARE command (sent from - mysql_stmt_prepare). - - SYNOPSIS - cli_read_prepare_result() - mysql connection handle - stmt statement handle - - RETURN VALUES - 0 ok - 1 error -*/ - -my_bool cli_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt) -{ - uchar *pos; - uint field_count, param_count; - ulong packet_length; - MYSQL_DATA *fields_data; - DBUG_ENTER("cli_read_prepare_result"); - - if ((packet_length= cli_safe_read(mysql)) == packet_error) - DBUG_RETURN(1); - mysql->warning_count= 0; - - pos= (uchar*) mysql->net.read_pos; - stmt->stmt_id= uint4korr(pos+1); pos+= 5; - /* Number of columns in result set */ - field_count= uint2korr(pos); pos+= 2; - /* Number of placeholders in the statement */ - param_count= uint2korr(pos); pos+= 2; - if (packet_length >= 12) - mysql->warning_count= uint2korr(pos+1); - - if (param_count != 0) - { - MYSQL_DATA *param_data; - - /* skip parameters data: we don't support it yet */ - if (!(param_data= (*mysql->methods->read_rows)(mysql, (MYSQL_FIELD*)0, 7))) - DBUG_RETURN(1); - free_rows(param_data); - } - - if (field_count != 0) - { - if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT)) - mysql->server_status|= SERVER_STATUS_IN_TRANS; - - if (!(fields_data= (*mysql->methods->read_rows)(mysql,(MYSQL_FIELD*)0,7))) - DBUG_RETURN(1); - if (!(stmt->fields= unpack_fields(fields_data,&stmt->mem_root, - field_count,0, - mysql->server_capabilities))) - DBUG_RETURN(1); - } - stmt->field_count= field_count; - stmt->param_count= (ulong) param_count; - DBUG_PRINT("exit",("field_count: %u param_count: %u warning_count: %u", - field_count, param_count, (uint) mysql->warning_count)); - - DBUG_RETURN(0); -} - - -/* - Allocate memory and init prepared statement structure. - - SYNOPSIS - mysql_stmt_init() - mysql connection handle - - DESCRIPTION - This is an entry point of the new API. Returned handle stands for - a server-side prepared statement. Memory for this structure (~700 - bytes) is allocated using 'malloc'. Once created, the handle can be - reused many times. Created statement handle is bound to connection - handle provided to this call: its lifetime is limited by lifetime - of connection. - 'mysql_stmt_init()' is a pure local call, server side structure is - created only in mysql_stmt_prepare. - Next steps you may want to make: - - set a statement attribute (mysql_stmt_attr_set()), - - prepare statement handle with a query (mysql_stmt_prepare()), - - close statement handle and free its memory (mysql_stmt_close()), - - reset statement with mysql_stmt_reset() (a no-op which will - just return). - Behaviour of the rest of API calls on this statement is not defined yet - (though we're working on making each wrong call sequence return - error). - - RETURN VALUE - statement structure upon success and NULL if out of - memory -*/ - -MYSQL_STMT * STDCALL -mysql_stmt_init(MYSQL *mysql) -{ - MYSQL_STMT *stmt; - DBUG_ENTER("mysql_stmt_init"); - - if (!(stmt= (MYSQL_STMT *) my_malloc(sizeof(MYSQL_STMT), - MYF(MY_WME | MY_ZEROFILL)))) - { - set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate); - DBUG_RETURN(0); - } - - init_alloc_root(&stmt->mem_root, 2048, 2048); - init_alloc_root(&stmt->result.alloc, 4096, 4096); - stmt->result.alloc.min_malloc= sizeof(MYSQL_ROWS); - mysql->stmts= list_add(mysql->stmts, &stmt->list); - stmt->list.data= stmt; - stmt->state= MYSQL_STMT_INIT_DONE; - stmt->mysql= mysql; - stmt->read_row_func= stmt_read_row_no_result_set; - stmt->prefetch_rows= DEFAULT_PREFETCH_ROWS; - strmov(stmt->sqlstate, not_error_sqlstate); - /* The rest of statement members was bzeroed inside malloc */ - - DBUG_RETURN(stmt); -} - - -/* - Prepare server side statement with query. - - SYNOPSIS - mysql_stmt_prepare() - stmt statement handle - query statement to prepare - length statement length - - DESCRIPTION - Associate statement with statement handle. This is done both on - client and server sides. At this point the server parses given query - and creates an internal structure to represent it. - Next steps you may want to make: - - find out if this statement returns a result set by - calling mysql_stmt_field_count(), and get result set metadata - with mysql_stmt_result_metadata(), - - if query contains placeholders, bind input parameters to placeholders - using mysql_stmt_bind_param(), - - otherwise proceed directly to mysql_stmt_execute(). - - IMPLEMENTATION NOTES - - if this is a re-prepare of the statement, first close previous data - structure on the server and free old statement data - - then send the query to server and get back number of placeholders, - number of columns in result set (if any), and result set metadata. - At the same time allocate memory for input and output parameters - to have less checks in mysql_stmt_bind_{param, result}. - - RETURN VALUES - 0 success - !0 error -*/ - -int STDCALL -mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) -{ - MYSQL *mysql= stmt->mysql; - DBUG_ENTER("mysql_stmt_prepare"); - - if (!mysql) - { - /* mysql can be reset in mysql_close called from mysql_reconnect */ - set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - - /* - Reset the last error in any case: that would clear the statement - if the previous prepare failed. - */ - stmt->last_errno= 0; - stmt->last_error[0]= '\0'; - - if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE) - { - /* This is second prepare with another statement */ - uchar buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */ - - if (reset_stmt_handle(stmt, RESET_LONG_DATA | RESET_STORE_RESULT)) - DBUG_RETURN(1); - /* - These members must be reset for API to - function in case of error or misuse. - */ - stmt->bind_param_done= stmt->bind_result_done= FALSE; - stmt->param_count= stmt->field_count= 0; - free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC)); - - int4store(buff, stmt->stmt_id); - - /* - Close statement in server - - If there was a 'use' result from another statement, or from - mysql_use_result it won't be freed in mysql_stmt_free_result and - we should get 'Commands out of sync' here. - */ - stmt->state= MYSQL_STMT_INIT_DONE; - if (stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt)) - { - set_stmt_errmsg(stmt, &mysql->net); - DBUG_RETURN(1); - } - } - - if (stmt_command(mysql, COM_STMT_PREPARE, (const uchar*) query, length, stmt)) - { - set_stmt_errmsg(stmt, &mysql->net); - DBUG_RETURN(1); - } - - if ((*mysql->methods->read_prepare_result)(mysql, stmt)) - { - set_stmt_errmsg(stmt, &mysql->net); - DBUG_RETURN(1); - } - - /* - alloc_root will return valid address even in case when param_count - and field_count are zero. Thus we should never rely on stmt->bind - or stmt->params when checking for existence of placeholders or - result set. - */ - if (!(stmt->params= (MYSQL_BIND *) alloc_root(&stmt->mem_root, - sizeof(MYSQL_BIND)* - (stmt->param_count + - stmt->field_count)))) - { - set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - stmt->bind= stmt->params + stmt->param_count; - stmt->state= MYSQL_STMT_PREPARE_DONE; - DBUG_PRINT("info", ("Parameter count: %u", stmt->param_count)); - DBUG_RETURN(0); -} - -/* - Get result set metadata from reply to mysql_stmt_execute. - This is used mainly for SHOW commands, as metadata for these - commands is sent only with result set. - To be removed when all commands will fully support prepared mode. -*/ - -static void alloc_stmt_fields(MYSQL_STMT *stmt) -{ - MYSQL_FIELD *fields, *field, *end; - MEM_ROOT *alloc= &stmt->mem_root; - MYSQL *mysql= stmt->mysql; - - DBUG_ASSERT(mysql->field_count); - - stmt->field_count= mysql->field_count; - - /* - Get the field information for non-select statements - like SHOW and DESCRIBE commands - */ - if (!(stmt->fields= (MYSQL_FIELD *) alloc_root(alloc, - sizeof(MYSQL_FIELD) * - stmt->field_count)) || - !(stmt->bind= (MYSQL_BIND *) alloc_root(alloc, - sizeof(MYSQL_BIND) * - stmt->field_count))) - { - set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL); - return; - } - - for (fields= mysql->fields, end= fields+stmt->field_count, - field= stmt->fields; - field && fields < end; fields++, field++) - { - *field= *fields; /* To copy all numeric parts. */ - field->catalog= strmake_root(alloc, fields->catalog, - fields->catalog_length); - field->db= strmake_root(alloc, fields->db, fields->db_length); - field->table= strmake_root(alloc, fields->table, fields->table_length); - field->org_table= strmake_root(alloc, fields->org_table, - fields->org_table_length); - field->name= strmake_root(alloc, fields->name, fields->name_length); - field->org_name= strmake_root(alloc, fields->org_name, - fields->org_name_length); - field->def = fields->def ? strmake_root(alloc, fields->def, - fields->def_length) : 0; - field->def_length= field->def ? fields->def_length : 0; - field->extension= 0; /* Avoid dangling links. */ - field->max_length= 0; /* max_length is set in mysql_stmt_store_result() */ - } -} - - -/** - Update result set columns metadata if it was sent again in - reply to COM_STMT_EXECUTE. - - @note If the new field count is different from the original one, - an error is set and no update is performed. -*/ - -static void update_stmt_fields(MYSQL_STMT *stmt) -{ - MYSQL_FIELD *field= stmt->mysql->fields; - MYSQL_FIELD *field_end= field + stmt->field_count; - MYSQL_FIELD *stmt_field= stmt->fields; - MYSQL_BIND *my_bind= stmt->bind_result_done ? stmt->bind : 0; - - if (stmt->field_count != stmt->mysql->field_count) - { - /* - The tables used in the statement were altered, - and the query now returns a different number of columns. - There is no way to continue without reallocating the bind - array: - - if the number of columns increased, mysql_stmt_fetch() - will write beyond allocated memory - - if the number of columns decreased, some user-bound - buffers will be left unassigned without user knowing - that. - */ - set_stmt_error(stmt, CR_NEW_STMT_METADATA, unknown_sqlstate, NULL); - return; - } - - for (; field < field_end; ++field, ++stmt_field) - { - stmt_field->charsetnr= field->charsetnr; - stmt_field->length = field->length; - stmt_field->type = field->type; - stmt_field->flags = field->flags; - stmt_field->decimals = field->decimals; - if (my_bind) - { - /* Ignore return value: it should be 0 if bind_result succeeded. */ - (void) setup_one_fetch_function(my_bind++, stmt_field); - } - } -} - -/* - Returns prepared statement metadata in the form of a result set. - - SYNOPSIS - mysql_stmt_result_metadata() - stmt statement handle - - DESCRIPTION - This function should be used after mysql_stmt_execute(). - You can safely check that prepared statement has a result set by calling - mysql_stmt_field_count(): if number of fields is not zero, you can call - this function to get fields metadata. - Next steps you may want to make: - - find out number of columns in result set by calling - mysql_num_fields(res) (the same value is returned by - mysql_stmt_field_count()) - - fetch metadata for any column with mysql_fetch_field, - mysql_fetch_field_direct, mysql_fetch_fields, mysql_field_seek. - - free returned MYSQL_RES structure with mysql_free_result. - - proceed to binding of output parameters. - - RETURN - NULL statement contains no result set or out of memory. - In the latter case you can retreive error message - with mysql_stmt_error. - MYSQL_RES a result set with no rows -*/ - -MYSQL_RES * STDCALL -mysql_stmt_result_metadata(MYSQL_STMT *stmt) -{ - MYSQL_RES *result; - DBUG_ENTER("mysql_stmt_result_metadata"); - - /* - stmt->fields is only defined if stmt->field_count is not null; - stmt->field_count is initialized in prepare. - */ - if (!stmt->field_count) - DBUG_RETURN(0); - - if (!(result=(MYSQL_RES*) my_malloc(sizeof(*result), - MYF(MY_WME | MY_ZEROFILL)))) - { - set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL); - DBUG_RETURN(0); - } - - result->methods= stmt->mysql->methods; - result->eof= 1; /* Marker for buffered */ - result->fields= stmt->fields; - result->field_count= stmt->field_count; - /* The rest of members of 'result' was bzeroed inside malloc */ - DBUG_RETURN(result); -} - - -/* - Returns parameter columns meta information in the form of - result set. - - SYNOPSYS - mysql_stmt_param_metadata() - stmt statement handle - - DESCRIPTION - This function can be called after you prepared the statement handle - with mysql_stmt_prepare(). - XXX: not implemented yet. - - RETURN - MYSQL_RES on success, 0 if there is no metadata. - Currently this function always returns 0. -*/ - -MYSQL_RES * STDCALL -mysql_stmt_param_metadata(MYSQL_STMT *stmt) -{ - DBUG_ENTER("mysql_stmt_param_metadata"); - - if (!stmt->param_count) - DBUG_RETURN(0); - - /* - TODO: Fix this when server sends the information. - Till then keep a dummy prototype. - */ - DBUG_RETURN(0); -} - - -/* Store type of parameter in network buffer. */ - -static void store_param_type(char **pos, MYSQL_BIND *param) -{ - uint typecode= param->buffer_type | (param->is_unsigned ? 32768 : 0); - int2store(*pos, typecode); - *pos+= 2; -} - - -/* - Functions to store parameter data in network packet. - - SYNOPSIS - store_param_xxx() - net MySQL NET connection - param MySQL bind param - - DESCRIPTION - These funtions are invoked from mysql_stmt_execute() by - MYSQL_BIND::store_param_func pointer. This pointer is set once per - many executions in mysql_stmt_bind_param(). The caller must ensure - that network buffer have enough capacity to store parameter - (MYSQL_BIND::buffer_length contains needed number of bytes). -*/ - -static void store_param_tinyint(NET *net, MYSQL_BIND *param) -{ - *(net->write_pos++)= *(uchar *) param->buffer; -} - -static void store_param_short(NET *net, MYSQL_BIND *param) -{ - short value= *(short*) param->buffer; - int2store(net->write_pos,value); - net->write_pos+=2; -} - -static void store_param_int32(NET *net, MYSQL_BIND *param) -{ - int32 value= *(int32*) param->buffer; - int4store(net->write_pos,value); - net->write_pos+=4; -} - -static void store_param_int64(NET *net, MYSQL_BIND *param) -{ - longlong value= *(longlong*) param->buffer; - int8store(net->write_pos,value); - net->write_pos+= 8; -} - -static void store_param_float(NET *net, MYSQL_BIND *param) -{ - float value= *(float*) param->buffer; - float4store(net->write_pos, value); - net->write_pos+= 4; -} - -static void store_param_double(NET *net, MYSQL_BIND *param) -{ - double value= *(double*) param->buffer; - float8store(net->write_pos, value); - net->write_pos+= 8; -} - -static void store_param_time(NET *net, MYSQL_BIND *param) -{ - MYSQL_TIME *tm= (MYSQL_TIME *) param->buffer; - char buff[MAX_TIME_REP_LENGTH], *pos; - uint length; - - pos= buff+1; - pos[0]= tm->neg ? 1: 0; - int4store(pos+1, tm->day); - pos[5]= (uchar) tm->hour; - pos[6]= (uchar) tm->minute; - pos[7]= (uchar) tm->second; - int4store(pos+8, tm->second_part); - if (tm->second_part) - length= 12; - else if (tm->hour || tm->minute || tm->second || tm->day) - length= 8; - else - length= 0; - buff[0]= (char) length++; - memcpy((char *)net->write_pos, buff, length); - net->write_pos+= length; -} - -static void net_store_datetime(NET *net, MYSQL_TIME *tm) -{ - char buff[MAX_DATETIME_REP_LENGTH], *pos; - uint length; - - pos= buff+1; - - int2store(pos, tm->year); - pos[2]= (uchar) tm->month; - pos[3]= (uchar) tm->day; - pos[4]= (uchar) tm->hour; - pos[5]= (uchar) tm->minute; - pos[6]= (uchar) tm->second; - int4store(pos+7, tm->second_part); - if (tm->second_part) - length= 11; - else if (tm->hour || tm->minute || tm->second) - length= 7; - else if (tm->year || tm->month || tm->day) - length= 4; - else - length= 0; - buff[0]= (char) length++; - memcpy((char *)net->write_pos, buff, length); - net->write_pos+= length; -} - -static void store_param_date(NET *net, MYSQL_BIND *param) -{ - MYSQL_TIME tm= *((MYSQL_TIME *) param->buffer); - tm.hour= tm.minute= tm.second= tm.second_part= 0; - net_store_datetime(net, &tm); -} - -static void store_param_datetime(NET *net, MYSQL_BIND *param) -{ - MYSQL_TIME *tm= (MYSQL_TIME *) param->buffer; - net_store_datetime(net, tm); -} - -static void store_param_str(NET *net, MYSQL_BIND *param) -{ - /* param->length is always set in mysql_stmt_bind_param */ - ulong length= *param->length; - uchar *to= net_store_length(net->write_pos, length); - memcpy(to, param->buffer, length); - net->write_pos= to+length; -} - - -/* - Mark if the parameter is NULL. - - SYNOPSIS - store_param_null() - net MySQL NET connection - param MySQL bind param - - DESCRIPTION - A data package starts with a string of bits where we set a bit - if a parameter is NULL. Unlike bit string in result set row, here - we don't have reserved bits for OK/error packet. -*/ - -static void store_param_null(NET *net, MYSQL_BIND *param) -{ - uint pos= param->param_number; - net->buff[pos/8]|= (uchar) (1 << (pos & 7)); -} - - -/* - Store one parameter in network packet: data is read from - client buffer and saved in network packet by means of one - of store_param_xxxx functions. -*/ - -static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param) -{ - NET *net= &stmt->mysql->net; - DBUG_ENTER("store_param"); - DBUG_PRINT("enter",("type: %d buffer: %p length: %lu is_null: %d", - param->buffer_type, - (param->buffer ? param->buffer : NullS), - *param->length, *param->is_null)); - - if (*param->is_null) - store_param_null(net, param); - else - { - /* - Param->length should ALWAYS point to the correct length for the type - Either to the length pointer given by the user or param->buffer_length - */ - if ((my_realloc_str(net, *param->length))) - { - set_stmt_errmsg(stmt, net); - DBUG_RETURN(1); - } - (*param->store_param_func)(net, param); - } - DBUG_RETURN(0); -} - - -/* - Auxilary function to send COM_STMT_EXECUTE packet to server and read reply. - Used from cli_stmt_execute, which is in turn used by mysql_stmt_execute. -*/ - -static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length) -{ - MYSQL *mysql= stmt->mysql; - NET *net= &mysql->net; - uchar buff[4 /* size of stmt id */ + - 5 /* execution flags */]; - my_bool res; - DBUG_ENTER("execute"); - DBUG_DUMP("packet", (uchar *) packet, length); - - int4store(buff, stmt->stmt_id); /* Send stmt id to server */ - buff[4]= (char) stmt->flags; - int4store(buff+5, 1); /* iteration count */ - - res= test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), - (uchar*) packet, length, 1, stmt) || - (*mysql->methods->read_query_result)(mysql)); - stmt->affected_rows= mysql->affected_rows; - stmt->server_status= mysql->server_status; - stmt->insert_id= mysql->insert_id; - if (res) - { - set_stmt_errmsg(stmt, net); - DBUG_RETURN(1); - } - DBUG_RETURN(0); -} - - -int cli_stmt_execute(MYSQL_STMT *stmt) -{ - DBUG_ENTER("cli_stmt_execute"); - - if (stmt->param_count) - { - MYSQL *mysql= stmt->mysql; - NET *net= &mysql->net; - MYSQL_BIND *param, *param_end; - char *param_data; - ulong length; - uint null_count; - my_bool result; - - if (!stmt->bind_param_done) - { - set_stmt_error(stmt, CR_PARAMS_NOT_BOUND, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - if (mysql->status != MYSQL_STATUS_READY || - mysql->server_status & SERVER_MORE_RESULTS_EXISTS) - { - set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - - net_clear(net, 1); /* Sets net->write_pos */ - /* Reserve place for null-marker bytes */ - null_count= (stmt->param_count+7) /8; - if (my_realloc_str(net, null_count + 1)) - { - set_stmt_errmsg(stmt, net); - DBUG_RETURN(1); - } - bzero((char*) net->write_pos, null_count); - net->write_pos+= null_count; - param_end= stmt->params + stmt->param_count; - - /* In case if buffers (type) altered, indicate to server */ - *(net->write_pos)++= (uchar) stmt->send_types_to_server; - if (stmt->send_types_to_server) - { - if (my_realloc_str(net, 2 * stmt->param_count)) - { - set_stmt_errmsg(stmt, net); - DBUG_RETURN(1); - } - /* - Store types of parameters in first in first package - that is sent to the server. - */ - for (param= stmt->params; param < param_end ; param++) - store_param_type((char**) &net->write_pos, param); - } - - for (param= stmt->params; param < param_end; param++) - { - /* check if mysql_stmt_send_long_data() was used */ - if (param->long_data_used) - param->long_data_used= 0; /* Clear for next execute call */ - else if (store_param(stmt, param)) - DBUG_RETURN(1); - } - length= (ulong) (net->write_pos - net->buff); - /* TODO: Look into avoding the following memdup */ - if (!(param_data= my_memdup(net->buff, length, MYF(0)))) - { - set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - result= execute(stmt, param_data, length); - stmt->send_types_to_server=0; - my_free(param_data, MYF(MY_WME)); - DBUG_RETURN(result); - } - DBUG_RETURN((int) execute(stmt,0,0)); -} - -/* - Read one row from buffered result set. Result set is created by prior - call to mysql_stmt_store_result(). - SYNOPSIS - stmt_read_row_buffered() - - RETURN VALUE - 0 - success; *row is set to valid row pointer (row data - is stored in result set buffer) - MYSQL_NO_DATA - end of result set. *row is set to NULL -*/ - -static int stmt_read_row_buffered(MYSQL_STMT *stmt, unsigned char **row) -{ - if (stmt->data_cursor) - { - *row= (uchar *) stmt->data_cursor->data; - stmt->data_cursor= stmt->data_cursor->next; - return 0; - } - *row= 0; - return MYSQL_NO_DATA; -} - -/* - Read one row from network: unbuffered non-cursor fetch. - If last row was read, or error occured, erase this statement - from record pointing to object unbuffered fetch is performed from. - - SYNOPSIS - stmt_read_row_unbuffered() - stmt statement handle - row pointer to write pointer to row data; - - RETURN VALUE - 0 - success; *row contains valid address of a row; - row data is stored in network buffer - 1 - error; error code is written to - stmt->last_{errno,error}; *row is not changed - MYSQL_NO_DATA - end of file was read from network; - *row is set to NULL -*/ - -static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row) -{ - int rc= 1; - MYSQL *mysql= stmt->mysql; - /* - This function won't be called if stmt->field_count is zero - or execution wasn't done: this is ensured by mysql_stmt_execute. - */ - if (!mysql) - { - set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL); - return 1; - } - if (mysql->status != MYSQL_STATUS_GET_RESULT) - { - set_stmt_error(stmt, stmt->unbuffered_fetch_cancelled ? - CR_FETCH_CANCELED : CR_COMMANDS_OUT_OF_SYNC, - unknown_sqlstate, NULL); - goto error; - } - if ((*mysql->methods->unbuffered_fetch)(mysql, (char**) row)) - { - set_stmt_errmsg(stmt, &mysql->net); - /* - If there was an error, there are no more pending rows: - reset statement status to not hang up in following - mysql_stmt_close (it will try to flush result set before - closing the statement). - */ - mysql->status= MYSQL_STATUS_READY; - goto error; - } - if (!*row) - { - mysql->status= MYSQL_STATUS_READY; - rc= MYSQL_NO_DATA; - goto error; - } - return 0; -error: - if (mysql->unbuffered_fetch_owner == &stmt->unbuffered_fetch_cancelled) - mysql->unbuffered_fetch_owner= 0; - return rc; -} - - -/* - Fetch statement row using server side cursor. - - SYNOPSIS - stmt_read_row_from_cursor() - - RETURN VALUE - 0 success - 1 error - MYSQL_NO_DATA end of data -*/ - -static int -stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row) -{ - if (stmt->data_cursor) - return stmt_read_row_buffered(stmt, row); - if (stmt->server_status & SERVER_STATUS_LAST_ROW_SENT) - stmt->server_status &= ~SERVER_STATUS_LAST_ROW_SENT; - else - { - MYSQL *mysql= stmt->mysql; - NET *net= &mysql->net; - MYSQL_DATA *result= &stmt->result; - uchar buff[4 /* statement id */ + - 4 /* number of rows to fetch */]; - - free_root(&result->alloc, MYF(MY_KEEP_PREALLOC)); - result->data= NULL; - result->rows= 0; - /* Send row request to the server */ - int4store(buff, stmt->stmt_id); - int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */ - if ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH, - buff, sizeof(buff), (uchar*) 0, 0, - 1, stmt)) - { - set_stmt_errmsg(stmt, net); - return 1; - } - if ((*mysql->methods->read_rows_from_cursor)(stmt)) - return 1; - stmt->server_status= mysql->server_status; - - stmt->data_cursor= result->data; - return stmt_read_row_buffered(stmt, row); - } - *row= 0; - return MYSQL_NO_DATA; -} - - -/* - Default read row function to not SIGSEGV in client in - case of wrong sequence of API calls. -*/ - -static int -stmt_read_row_no_data(MYSQL_STMT *stmt __attribute__((unused)), - unsigned char **row __attribute__((unused))) -{ - return MYSQL_NO_DATA; -} - -static int -stmt_read_row_no_result_set(MYSQL_STMT *stmt __attribute__((unused)), - unsigned char **row __attribute__((unused))) -{ - set_stmt_error(stmt, CR_NO_RESULT_SET, unknown_sqlstate, NULL); - return 1; -} - - -/* - Get/set statement attributes - - SYNOPSIS - mysql_stmt_attr_get() - mysql_stmt_attr_set() - - attr_type statement attribute - value casted to const void * pointer to value. - - RETURN VALUE - 0 success - !0 wrong attribute type -*/ - -my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, - enum enum_stmt_attr_type attr_type, - const void *value) -{ - switch (attr_type) { - case STMT_ATTR_UPDATE_MAX_LENGTH: - stmt->update_max_length= value ? *(const my_bool*) value : 0; - break; - case STMT_ATTR_CURSOR_TYPE: - { - ulong cursor_type; - cursor_type= value ? *(ulong*) value : 0UL; - if (cursor_type > (ulong) CURSOR_TYPE_READ_ONLY) - goto err_not_implemented; - stmt->flags= cursor_type; - break; - } - case STMT_ATTR_PREFETCH_ROWS: - { - ulong prefetch_rows= value ? *(ulong*) value : DEFAULT_PREFETCH_ROWS; - if (value == 0) - return TRUE; - stmt->prefetch_rows= prefetch_rows; - break; - } - default: - goto err_not_implemented; - } - return FALSE; -err_not_implemented: - set_stmt_error(stmt, CR_NOT_IMPLEMENTED, unknown_sqlstate, NULL); - return TRUE; -} - - -my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, - enum enum_stmt_attr_type attr_type, - void *value) -{ - switch (attr_type) { - case STMT_ATTR_UPDATE_MAX_LENGTH: - *(my_bool*) value= stmt->update_max_length; - break; - case STMT_ATTR_CURSOR_TYPE: - *(ulong*) value= stmt->flags; - break; - case STMT_ATTR_PREFETCH_ROWS: - *(ulong*) value= stmt->prefetch_rows; - break; - default: - return TRUE; - } - return FALSE; -} - - -/** - Update statement result set metadata from with the new field - information sent during statement execute. - - @pre mysql->field_count is not zero - - @retval TRUE if error: out of memory or the new - result set has a different number of columns - @retval FALSE success -*/ - -static void reinit_result_set_metadata(MYSQL_STMT *stmt) -{ - /* Server has sent result set metadata */ - if (stmt->field_count == 0) - { - /* - This is 'SHOW'/'EXPLAIN'-like query. Current implementation of - prepared statements can't send result set metadata for these queries - on prepare stage. Read it now. - */ - alloc_stmt_fields(stmt); - } - else - { - /* - Update result set metadata if it for some reason changed between - prepare and execute, i.e.: - - in case of 'SELECT ?' we don't know column type unless data was - supplied to mysql_stmt_execute, so updated column type is sent - now. - - if data dictionary changed between prepare and execute, for - example a table used in the query was altered. - Note, that now (4.1.3) we always send metadata in reply to - COM_STMT_EXECUTE (even if it is not necessary), so either this or - previous branch always works. - TODO: send metadata only when it's really necessary and add a warning - 'Metadata changed' when it's sent twice. - */ - update_stmt_fields(stmt); - } -} - - -static void prepare_to_fetch_result(MYSQL_STMT *stmt) -{ - if (stmt->server_status & SERVER_STATUS_CURSOR_EXISTS) - { - stmt->mysql->status= MYSQL_STATUS_READY; - stmt->read_row_func= stmt_read_row_from_cursor; - } - else if (stmt->flags & CURSOR_TYPE_READ_ONLY) - { - /* - This is a single-row result set, a result set with no rows, EXPLAIN, - SHOW VARIABLES, or some other command which either a) bypasses the - cursors framework in the server and writes rows directly to the - network or b) is more efficient if all (few) result set rows are - precached on client and server's resources are freed. - */ - mysql_stmt_store_result(stmt); - } - else - { - stmt->mysql->unbuffered_fetch_owner= &stmt->unbuffered_fetch_cancelled; - stmt->unbuffered_fetch_cancelled= FALSE; - stmt->read_row_func= stmt_read_row_unbuffered; - } -} - - -/* - Send placeholders data to server (if there are placeholders) - and execute prepared statement. - - SYNOPSIS - mysql_stmt_execute() - stmt statement handle. The handle must be created - with mysql_stmt_init() and prepared with - mysql_stmt_prepare(). If there are placeholders - in the statement they must be bound to local - variables with mysql_stmt_bind_param(). - - DESCRIPTION - This function will automatically flush pending result - set (if there is one), send parameters data to the server - and read result of statement execution. - If previous result set was cached with mysql_stmt_store_result() - it will also be freed in the beginning of this call. - The server can return 3 types of responses to this command: - - error, can be retrieved with mysql_stmt_error() - - ok, no result set pending. In this case we just update - stmt->insert_id and stmt->affected_rows. - - the query returns a result set: there could be 0 .. N - rows in it. In this case the server can also send updated - result set metadata. - - Next steps you may want to make: - - find out if there is result set with mysql_stmt_field_count(). - If there is one: - - optionally, cache entire result set on client to unblock - connection with mysql_stmt_store_result() - - bind client variables to result set columns and start read rows - with mysql_stmt_fetch(). - - reset statement with mysql_stmt_reset() or close it with - mysql_stmt_close() - Otherwise: - - find out last insert id and number of affected rows with - mysql_stmt_insert_id(), mysql_stmt_affected_rows() - - RETURN - 0 success - 1 error, message can be retrieved with mysql_stmt_error(). -*/ - -int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt) -{ - MYSQL *mysql= stmt->mysql; - DBUG_ENTER("mysql_stmt_execute"); - - if (!mysql) - { - /* Error is already set in mysql_detatch_stmt_list */ - DBUG_RETURN(1); - } - - if (reset_stmt_handle(stmt, RESET_STORE_RESULT | RESET_CLEAR_ERROR)) - DBUG_RETURN(1); - /* - No need to check for stmt->state: if the statement wasn't - prepared we'll get 'unknown statement handler' error from server. - */ - if (mysql->methods->stmt_execute(stmt)) - DBUG_RETURN(1); - stmt->state= MYSQL_STMT_EXECUTE_DONE; - if (mysql->field_count) - { - reinit_result_set_metadata(stmt); - prepare_to_fetch_result(stmt); - } - DBUG_RETURN(test(stmt->last_errno)); -} - - -/* - Return total parameters count in the statement -*/ - -ulong STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt) -{ - DBUG_ENTER("mysql_stmt_param_count"); - DBUG_RETURN(stmt->param_count); -} - -/* - Return total affected rows from the last statement -*/ - -my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt) -{ - return stmt->affected_rows; -} - - -/* - Returns the number of result columns for the most recent query - run on this statement. -*/ - -unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt) -{ - return stmt->field_count; -} - -/* - Return last inserted id for auto_increment columns. - - SYNOPSIS - mysql_stmt_insert_id() - stmt statement handle - - DESCRIPTION - Current implementation of this call has a caveat: stmt->insert_id is - unconditionally updated from mysql->insert_id in the end of each - mysql_stmt_execute(). This works OK if mysql->insert_id contains new - value (sent in reply to mysql_stmt_execute()), otherwise stmt->insert_id - value gets undefined, as it's updated from some arbitrary value saved in - connection structure during some other call. -*/ - -my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt) -{ - return stmt->insert_id; -} - - -static my_bool int_is_null_true= 1; /* Used for MYSQL_TYPE_NULL */ -static my_bool int_is_null_false= 0; - - -/* - Set up input data buffers for a statement. - - SYNOPSIS - mysql_stmt_bind_param() - stmt statement handle - The statement must be prepared with mysql_stmt_prepare(). - my_bind Array of mysql_stmt_param_count() bind parameters. - This function doesn't check that size of this argument - is >= mysql_stmt_field_count(): it's user's responsibility. - - DESCRIPTION - Use this call after mysql_stmt_prepare() to bind user variables to - placeholders. - Each element of bind array stands for a placeholder. Placeholders - are counted from 0. For example statement - 'INSERT INTO t (a, b) VALUES (?, ?)' - contains two placeholders, and for such statement you should supply - bind array of two elements (MYSQL_BIND bind[2]). - - By properly initializing bind array you can bind virtually any - C language type to statement's placeholders: - First, it's strongly recommended to always zero-initialize entire - bind structure before setting its members. This will both shorten - your application code and make it robust to future extensions of - MYSQL_BIND structure. - Then you need to assign typecode of your application buffer to - MYSQL_BIND::buffer_type. The following typecodes with their - correspondence to C language types are supported: - MYSQL_TYPE_TINY for 8-bit integer variables. Normally it's - 'signed char' and 'unsigned char'; - MYSQL_TYPE_SHORT for 16-bit signed and unsigned variables. This - is usually 'short' and 'unsigned short'; - MYSQL_TYPE_LONG for 32-bit signed and unsigned variables. It - corresponds to 'int' and 'unsigned int' on - vast majority of platforms. On IA-32 and some - other 32-bit systems you can also use 'long' - here; - MYSQL_TYPE_LONGLONG 64-bit signed or unsigned integer. Stands for - '[unsigned] long long' on most platforms; - MYSQL_TYPE_FLOAT 32-bit floating point type, 'float' on most - systems; - MYSQL_TYPE_DOUBLE 64-bit floating point type, 'double' on most - systems; - MYSQL_TYPE_TIME broken-down time stored in MYSQL_TIME - structure - MYSQL_TYPE_DATE date stored in MYSQL_TIME structure - MYSQL_TYPE_DATETIME datetime stored in MYSQL_TIME structure See - more on how to use these types for sending - dates and times below; - MYSQL_TYPE_STRING character string, assumed to be in - character-set-client. If character set of - client is not equal to character set of - column, value for this placeholder will be - converted to destination character set before - insert. - MYSQL_TYPE_BLOB sequence of bytes. This sequence is assumed to - be in binary character set (which is the same - as no particular character set), and is never - converted to any other character set. See also - notes about supplying string/blob length - below. - MYSQL_TYPE_NULL special typecode for binding nulls. - These C/C++ types are not supported yet by the API: long double, - bool. - - As you can see from the list above, it's responsibility of - application programmer to ensure that chosen typecode properly - corresponds to host language type. For example on all platforms - where we build MySQL packages (as of MySQL 4.1.4) int is a 32-bit - type. So for int you can always assume that proper typecode is - MYSQL_TYPE_LONG (however queer it sounds, the name is legacy of the - old MySQL API). In contrary sizeof(long) can be 4 or 8 8-bit bytes, - depending on platform. - - TODO: provide client typedefs for each integer and floating point - typecode, i. e. int8, uint8, float32, etc. - - Once typecode was set, it's necessary to assign MYSQL_BIND::buffer - to point to the buffer of given type. Finally, additional actions - may be taken for some types or use cases: - - Binding integer types. - For integer types you might also need to set MYSQL_BIND::is_unsigned - member. Set it to TRUE when binding unsigned char, unsigned short, - unsigned int, unsigned long, unsigned long long. - - Binding floating point types. - For floating point types you just need to set - MYSQL_BIND::buffer_type and MYSQL_BIND::buffer. The rest of the - members should be zero-initialized. - - Binding NULLs. - You might have a column always NULL, never NULL, or sometimes - NULL. For an always NULL column set MYSQL_BIND::buffer_type to - MYSQL_TYPE_NULL. The rest of the members just need to be - zero-initialized. For never NULL columns set - MYSQL_BIND::is_null to 0, or this has already been done if you - zero-initialized the entire structure. If you set - MYSQL_TYPE::is_null to point to an application buffer of type - 'my_bool', then this buffer will be checked on each execution: - this way you can set the buffer to TRUE, or any non-0 value for - NULLs, and to FALSE or 0 for not NULL data. - - Binding text strings and sequences of bytes. - For strings, in addition to MYSQL_BIND::buffer_type and - MYSQL_BIND::buffer you need to set MYSQL_BIND::length or - MYSQL_BIND::buffer_length. If 'length' is set, 'buffer_length' - is ignored. 'buffer_length' member should be used when size of - string doesn't change between executions. If you want to vary - buffer length for each value, set 'length' to point to an - application buffer of type 'unsigned long' and set this long to - length of the string before each mysql_stmt_execute(). - - Binding dates and times. - For binding dates and times prepared statements API provides - clients with MYSQL_TIME structure. A pointer to instance of this - structure should be assigned to MYSQL_BIND::buffer whenever - MYSQL_TYPE_TIME, MYSQL_TYPE_DATE, MYSQL_TYPE_DATETIME typecodes - are used. When typecode is MYSQL_TYPE_TIME, only members - 'hour', 'minute', 'second' and 'neg' (is time offset negative) - are used. These members only will be sent to the server. - MYSQL_TYPE_DATE implies use of 'year', 'month', 'day', 'neg'. - MYSQL_TYPE_DATETIME utilizes both parts of MYSQL_TIME structure. - You don't have to set MYSQL_TIME::time_type member: it's not - used when sending data to the server, typecode information is - enough. 'second_part' member can hold microsecond precision of - time value, but now it's only supported on protocol level: you - can't store microsecond in a column, or use in temporal - calculations. However, if you send a time value with microsecond - part for 'SELECT ?', statement, you'll get it back unchanged - from the server. - - Data conversion. - If conversion from host language type to data representation, - corresponding to SQL type, is required it's done on the server. - Data truncation is possible when conversion is lossy. For - example, if you supply MYSQL_TYPE_DATETIME value out of valid - SQL type TIMESTAMP range, the same conversion will be applied as - if this value would have been sent as string in the old - protocol. TODO: document how the server will behave in case of - truncation/data loss. - - After variables were bound, you can repeatedly set/change their - values and mysql_stmt_execute() the statement. - - See also: mysql_stmt_send_long_data() for sending long text/blob - data in pieces, examples in tests/mysql_client_test.c. - Next steps you might want to make: - - execute statement with mysql_stmt_execute(), - - reset statement using mysql_stmt_reset() or reprepare it with - another query using mysql_stmt_prepare() - - close statement with mysql_stmt_close(). - - IMPLEMENTATION - The function copies given bind array to internal storage of the - statement, and sets up typecode-specific handlers to perform - serialization of bound data. This means that although you don't need - to call this routine after each assignment to bind buffers, you - need to call it each time you change parameter typecodes, or other - members of MYSQL_BIND array. - This is a pure local call. Data types of client buffers are sent - along with buffers' data at first execution of the statement. - - RETURN - 0 success - 1 error, can be retrieved with mysql_stmt_error. -*/ - -my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) -{ - uint count=0; - MYSQL_BIND *param, *end; - DBUG_ENTER("mysql_stmt_bind_param"); - - if (!stmt->param_count) - { - if ((int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE) - { - set_stmt_error(stmt, CR_NO_PREPARE_STMT, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - DBUG_RETURN(0); - } - - /* Allocated on prepare */ - memcpy((char*) stmt->params, (char*) my_bind, - sizeof(MYSQL_BIND) * stmt->param_count); - - for (param= stmt->params, end= param+stmt->param_count; - param < end ; - param++) - { - param->param_number= count++; - param->long_data_used= 0; - - /* If param->is_null is not set, then the value can never be NULL */ - if (!param->is_null) - param->is_null= &int_is_null_false; - - /* Setup data copy functions for the different supported types */ - switch (param->buffer_type) { - case MYSQL_TYPE_NULL: - param->is_null= &int_is_null_true; - break; - case MYSQL_TYPE_TINY: - /* Force param->length as this is fixed for this type */ - param->length= ¶m->buffer_length; - param->buffer_length= 1; - param->store_param_func= store_param_tinyint; - break; - case MYSQL_TYPE_SHORT: - param->length= ¶m->buffer_length; - param->buffer_length= 2; - param->store_param_func= store_param_short; - break; - case MYSQL_TYPE_LONG: - param->length= ¶m->buffer_length; - param->buffer_length= 4; - param->store_param_func= store_param_int32; - break; - case MYSQL_TYPE_LONGLONG: - param->length= ¶m->buffer_length; - param->buffer_length= 8; - param->store_param_func= store_param_int64; - break; - case MYSQL_TYPE_FLOAT: - param->length= ¶m->buffer_length; - param->buffer_length= 4; - param->store_param_func= store_param_float; - break; - case MYSQL_TYPE_DOUBLE: - param->length= ¶m->buffer_length; - param->buffer_length= 8; - param->store_param_func= store_param_double; - break; - case MYSQL_TYPE_TIME: - param->store_param_func= store_param_time; - param->buffer_length= MAX_TIME_REP_LENGTH; - break; - case MYSQL_TYPE_DATE: - param->store_param_func= store_param_date; - param->buffer_length= MAX_DATE_REP_LENGTH; - break; - case MYSQL_TYPE_DATETIME: - case MYSQL_TYPE_TIMESTAMP: - param->store_param_func= store_param_datetime; - param->buffer_length= MAX_DATETIME_REP_LENGTH; - break; - case MYSQL_TYPE_TINY_BLOB: - case MYSQL_TYPE_MEDIUM_BLOB: - case MYSQL_TYPE_LONG_BLOB: - case MYSQL_TYPE_BLOB: - case MYSQL_TYPE_VARCHAR: - case MYSQL_TYPE_VAR_STRING: - case MYSQL_TYPE_STRING: - case MYSQL_TYPE_DECIMAL: - case MYSQL_TYPE_NEWDECIMAL: - param->store_param_func= store_param_str; - /* - For variable length types user must set either length or - buffer_length. - */ - break; - default: - strmov(stmt->sqlstate, unknown_sqlstate); - sprintf(stmt->last_error, - ER(stmt->last_errno= CR_UNSUPPORTED_PARAM_TYPE), - param->buffer_type, count); - DBUG_RETURN(1); - } - /* - If param->length is not given, change it to point to buffer_length. - This way we can always use *param->length to get the length of data - */ - if (!param->length) - param->length= ¶m->buffer_length; - } - /* We have to send/resend type information to MySQL */ - stmt->send_types_to_server= TRUE; - stmt->bind_param_done= TRUE; - DBUG_RETURN(0); -} - - -/******************************************************************** - Long data implementation -*********************************************************************/ - -/* - Send long data in pieces to the server - - SYNOPSIS - mysql_stmt_send_long_data() - stmt Statement handler - param_number Parameter number (0 - N-1) - data Data to send to server - length Length of data to send (may be 0) - - DESCRIPTION - This call can be used repeatedly to send long data in pieces - for any string/binary placeholder. Data supplied for - a placeholder is saved at server side till execute, and then - used instead of value from MYSQL_BIND object. More precisely, - if long data for a parameter was supplied, MYSQL_BIND object - corresponding to this parameter is not sent to server. In the - end of execution long data states of placeholders are reset, - so next time values of such placeholders will be taken again - from MYSQL_BIND array. - The server does not reply to this call: if there was an error - in data handling (which now only can happen if server run out - of memory) it would be returned in reply to - mysql_stmt_execute(). - You should choose type of long data carefully if you care - about character set conversions performed by server when the - statement is executed. No conversion is performed at all for - MYSQL_TYPE_BLOB and other binary typecodes. For - MYSQL_TYPE_STRING and the rest of text placeholders data is - converted from client character set to character set of - connection. If these character sets are different, this - conversion may require additional memory at server, equal to - total size of supplied pieces. - - RETURN VALUES - 0 ok - 1 error -*/ - -my_bool STDCALL -mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, - const char *data, ulong length) -{ - MYSQL_BIND *param; - DBUG_ENTER("mysql_stmt_send_long_data"); - DBUG_ASSERT(stmt != 0); - DBUG_PRINT("enter",("param no: %d data: %p, length : %ld", - param_number, data, length)); - - /* - We only need to check for stmt->param_count, if it's not null - prepare was done. - */ - if (param_number >= stmt->param_count) - { - set_stmt_error(stmt, CR_INVALID_PARAMETER_NO, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - - param= stmt->params+param_number; - if (!IS_LONGDATA(param->buffer_type)) - { - /* Long data handling should be used only for string/binary types */ - strmov(stmt->sqlstate, unknown_sqlstate); - sprintf(stmt->last_error, ER(stmt->last_errno= CR_INVALID_BUFFER_USE), - param->param_number); - DBUG_RETURN(1); - } - - /* - Send long data packet if there is data or we're sending long data - for the first time. - */ - if (length || param->long_data_used == 0) - { - MYSQL *mysql= stmt->mysql; - /* Packet header: stmt id (4 bytes), param no (2 bytes) */ - uchar buff[MYSQL_LONG_DATA_HEADER]; - - int4store(buff, stmt->stmt_id); - int2store(buff + 4, param_number); - param->long_data_used= 1; - - /* - Note that we don't get any ok packet from the server in this case - This is intentional to save bandwidth. - */ - if ((*mysql->methods->advanced_command)(mysql, COM_STMT_SEND_LONG_DATA, - buff, sizeof(buff), (uchar*) data, - length, 1, stmt)) - { - set_stmt_errmsg(stmt, &mysql->net); - DBUG_RETURN(1); - } - } - DBUG_RETURN(0); -} - - -/******************************************************************** - Fetch and conversion of result set rows (binary protocol). -*********************************************************************/ - -/* - Read date, (time, datetime) value from network buffer and store it - in MYSQL_TIME structure. - - SYNOPSIS - read_binary_{date,time,datetime}() - tm MYSQL_TIME structure to fill - pos pointer to current position in network buffer. - These functions increase pos to point to the beginning of the - next column. - - Auxiliary functions to read time (date, datetime) values from network - buffer and store in MYSQL_TIME structure. Jointly used by conversion - and no-conversion fetching. -*/ - -static void read_binary_time(MYSQL_TIME *tm, uchar **pos) -{ - /* net_field_length will set pos to the first byte of data */ - uint length= net_field_length(pos); - - if (length) - { - uchar *to= *pos; - tm->neg= to[0]; - - tm->day= (ulong) sint4korr(to+1); - tm->hour= (uint) to[5]; - tm->minute= (uint) to[6]; - tm->second= (uint) to[7]; - tm->second_part= (length > 8) ? (ulong) sint4korr(to+8) : 0; - tm->year= tm->month= 0; - if (tm->day) - { - /* Convert days to hours at once */ - tm->hour+= tm->day*24; - tm->day= 0; - } - tm->time_type= MYSQL_TIMESTAMP_TIME; - - *pos+= length; - } - else - set_zero_time(tm, MYSQL_TIMESTAMP_TIME); -} - -static void read_binary_datetime(MYSQL_TIME *tm, uchar **pos) -{ - uint length= net_field_length(pos); - - if (length) - { - uchar *to= *pos; - - tm->neg= 0; - tm->year= (uint) sint2korr(to); - tm->month= (uint) to[2]; - tm->day= (uint) to[3]; - - if (length > 4) - { - tm->hour= (uint) to[4]; - tm->minute= (uint) to[5]; - tm->second= (uint) to[6]; - } - else - tm->hour= tm->minute= tm->second= 0; - tm->second_part= (length > 7) ? (ulong) sint4korr(to+7) : 0; - tm->time_type= MYSQL_TIMESTAMP_DATETIME; - - *pos+= length; - } - else - set_zero_time(tm, MYSQL_TIMESTAMP_DATETIME); -} - -static void read_binary_date(MYSQL_TIME *tm, uchar **pos) -{ - uint length= net_field_length(pos); - - if (length) - { - uchar *to= *pos; - tm->year = (uint) sint2korr(to); - tm->month= (uint) to[2]; - tm->day= (uint) to[3]; - - tm->hour= tm->minute= tm->second= 0; - tm->second_part= 0; - tm->neg= 0; - tm->time_type= MYSQL_TIMESTAMP_DATE; - - *pos+= length; - } - else - set_zero_time(tm, MYSQL_TIMESTAMP_DATE); -} - - -/* - Convert string to supplied buffer of any type. - - SYNOPSIS - fetch_string_with_conversion() - param output buffer descriptor - value column data - length data length -*/ - -static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, - uint length) -{ - char *buffer= (char *)param->buffer; - int err= 0; - char *endptr= value + length; - - /* - This function should support all target buffer types: the rest - of conversion functions can delegate conversion to it. - */ - switch (param->buffer_type) { - case MYSQL_TYPE_NULL: /* do nothing */ - break; - case MYSQL_TYPE_TINY: - { - longlong data= my_strtoll10(value, &endptr, &err); - *param->error= (IS_TRUNCATED(data, param->is_unsigned, - INT_MIN8, INT_MAX8, UINT_MAX8) || err > 0); - *buffer= (uchar) data; - break; - } - case MYSQL_TYPE_SHORT: - { - longlong data= my_strtoll10(value, &endptr, &err); - *param->error= (IS_TRUNCATED(data, param->is_unsigned, - INT_MIN16, INT_MAX16, UINT_MAX16) || err > 0); - shortstore(buffer, (short) data); - break; - } - case MYSQL_TYPE_LONG: - { - longlong data= my_strtoll10(value, &endptr, &err); - *param->error= (IS_TRUNCATED(data, param->is_unsigned, - INT_MIN32, INT_MAX32, UINT_MAX32) || err > 0); - longstore(buffer, (int32) data); - break; - } - case MYSQL_TYPE_LONGLONG: - { - longlong data= my_strtoll10(value, &endptr, &err); - *param->error= param->is_unsigned ? err != 0 : - (err > 0 || (err == 0 && data < 0)); - longlongstore(buffer, data); - break; - } - case MYSQL_TYPE_FLOAT: - { - double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err); - float fdata= (float) data; - *param->error= (fdata != data) | test(err); - floatstore(buffer, fdata); - break; - } - case MYSQL_TYPE_DOUBLE: - { - double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err); - *param->error= test(err); - doublestore(buffer, data); - break; - } - case MYSQL_TYPE_TIME: - { - MYSQL_TIME *tm= (MYSQL_TIME *)buffer; - str_to_time(value, length, tm, &err); - *param->error= test(err); - break; - } - case MYSQL_TYPE_DATE: - case MYSQL_TYPE_DATETIME: - case MYSQL_TYPE_TIMESTAMP: - { - MYSQL_TIME *tm= (MYSQL_TIME *)buffer; - (void) str_to_datetime(value, length, tm, TIME_FUZZY_DATE, &err); - *param->error= test(err) && (param->buffer_type == MYSQL_TYPE_DATE && - tm->time_type != MYSQL_TIMESTAMP_DATE); - break; - } - case MYSQL_TYPE_TINY_BLOB: - case MYSQL_TYPE_MEDIUM_BLOB: - case MYSQL_TYPE_LONG_BLOB: - case MYSQL_TYPE_BLOB: - case MYSQL_TYPE_DECIMAL: - case MYSQL_TYPE_NEWDECIMAL: - default: - { - /* - Copy column data to the buffer taking into account offset, - data length and buffer length. - */ - char *start= value + param->offset; - char *end= value + length; - ulong copy_length; - if (start < end) - { - copy_length= end - start; - /* We've got some data beyond offset: copy up to buffer_length bytes */ - if (param->buffer_length) - memcpy(buffer, start, min(copy_length, param->buffer_length)); - } - else - copy_length= 0; - if (copy_length < param->buffer_length) - buffer[copy_length]= '\0'; - *param->error= copy_length > param->buffer_length; - /* - param->length will always contain length of entire column; - number of copied bytes may be way different: - */ - *param->length= length; - break; - } - } -} - - -/* - Convert integer value to client buffer of any type. - - SYNOPSIS - fetch_long_with_conversion() - param output buffer descriptor - field column metadata - value column data -*/ - -static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field, - longlong value, my_bool is_unsigned) -{ - char *buffer= (char *)param->buffer; - - switch (param->buffer_type) { - case MYSQL_TYPE_NULL: /* do nothing */ - break; - case MYSQL_TYPE_TINY: - *param->error= IS_TRUNCATED(value, param->is_unsigned, - INT_MIN8, INT_MAX8, UINT_MAX8); - *(uchar *)param->buffer= (uchar) value; - break; - case MYSQL_TYPE_SHORT: - *param->error= IS_TRUNCATED(value, param->is_unsigned, - INT_MIN16, INT_MAX16, UINT_MAX16); - shortstore(buffer, (short) value); - break; - case MYSQL_TYPE_LONG: - *param->error= IS_TRUNCATED(value, param->is_unsigned, - INT_MIN32, INT_MAX32, UINT_MAX32); - longstore(buffer, (int32) value); - break; - case MYSQL_TYPE_LONGLONG: - longlongstore(buffer, value); - *param->error= param->is_unsigned != is_unsigned && value < 0; - break; - case MYSQL_TYPE_FLOAT: - { - /* - We need to mark the local variable volatile to - workaround Intel FPU executive precision feature. - (See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 for details) - */ - volatile float data; - if (is_unsigned) - { - data= (float) ulonglong2double(value); - *param->error= ((ulonglong) value) != ((ulonglong) data); - } - else - { - data= (float)value; - *param->error= value != ((longlong) data); - } - floatstore(buffer, data); - break; - } - case MYSQL_TYPE_DOUBLE: - { - volatile double data; - if (is_unsigned) - { - data= ulonglong2double(value); - *param->error= ((ulonglong) value) != ((ulonglong) data); - } - else - { - data= (double)value; - *param->error= value != ((longlong) data); - } - doublestore(buffer, data); - break; - } - case MYSQL_TYPE_TIME: - case MYSQL_TYPE_DATE: - case MYSQL_TYPE_TIMESTAMP: - case MYSQL_TYPE_DATETIME: - { - int error; - value= number_to_datetime(value, (MYSQL_TIME *) buffer, TIME_FUZZY_DATE, - &error); - *param->error= test(error); - break; - } - default: - { - uchar buff[22]; /* Enough for longlong */ - uchar *end= (uchar*) longlong10_to_str(value, (char*) buff, - is_unsigned ? 10: -10); - /* Resort to string conversion which supports all typecodes */ - uint length= (uint) (end-buff); - - if (field->flags & ZEROFILL_FLAG && length < field->length && - field->length < 21) - { - bmove_upp(buff+field->length,buff+length, length); - bfill(buff, field->length - length,'0'); - length= field->length; - } - fetch_string_with_conversion(param, (char*) buff, length); - break; - } - } -} - -/* - Convert double/float column to supplied buffer of any type. - - SYNOPSIS - fetch_float_with_conversion() - param output buffer descriptor - field column metadata - value column data - type either MY_GCVT_ARG_FLOAT or MY_GCVT_ARG_DOUBLE. - Affects the maximum number of significant digits - returned by my_gcvt(). -*/ - -static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field, - double value, my_gcvt_arg_type type) -{ - char *buffer= (char *)param->buffer; - double val64 = (value < 0 ? -floor(-value) : floor(value)); - - switch (param->buffer_type) { - case MYSQL_TYPE_NULL: /* do nothing */ - break; - case MYSQL_TYPE_TINY: - /* - We need to _store_ data in the buffer before the truncation check to - workaround Intel FPU executive precision feature. - (See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 for details) - Sic: AFAIU it does not guarantee to work. - */ - if (param->is_unsigned) - *buffer= (uint8) value; - else - *buffer= (int8) value; - *param->error= val64 != (param->is_unsigned ? (double)((uint8) *buffer) : - (double)((int8) *buffer)); - break; - case MYSQL_TYPE_SHORT: - if (param->is_unsigned) - { - ushort data= (ushort) value; - shortstore(buffer, data); - } - else - { - short data= (short) value; - shortstore(buffer, data); - } - *param->error= val64 != (param->is_unsigned ? (double) (*(ushort*) buffer): - (double) (*(short*) buffer)); - break; - case MYSQL_TYPE_LONG: - if (param->is_unsigned) - { - uint32 data= (uint32) value; - longstore(buffer, data); - } - else - { - int32 data= (int32) value; - longstore(buffer, data); - } - *param->error= val64 != (param->is_unsigned ? (double) (*(uint32*) buffer): - (double) (*(int32*) buffer)); - break; - case MYSQL_TYPE_LONGLONG: - if (param->is_unsigned) - { - ulonglong data= (ulonglong) value; - longlongstore(buffer, data); - } - else - { - longlong data= (longlong) value; - longlongstore(buffer, data); - } - *param->error= val64 != (param->is_unsigned ? - ulonglong2double(*(ulonglong*) buffer) : - (double) (*(longlong*) buffer)); - break; - case MYSQL_TYPE_FLOAT: - { - float data= (float) value; - floatstore(buffer, data); - *param->error= (*(float*) buffer) != value; - break; - } - case MYSQL_TYPE_DOUBLE: - { - doublestore(buffer, value); - break; - } - default: - { - /* - Resort to fetch_string_with_conversion: this should handle - floating point -> string conversion nicely, honor all typecodes - and param->offset possibly set in mysql_stmt_fetch_column - */ - char buff[FLOATING_POINT_BUFFER]; - size_t len; - if (field->decimals >= NOT_FIXED_DEC) - len= my_gcvt(value, type, - (int) min(sizeof(buff)-1, param->buffer_length), - buff, NULL); - else - len= my_fcvt(value, (int) field->decimals, buff, NULL); - - if (field->flags & ZEROFILL_FLAG && len < field->length && - field->length < MAX_DOUBLE_STRING_REP_LENGTH - 1) - { - bmove_upp((uchar*) buff + field->length, (uchar*) buff + len, - len); - bfill((char*) buff, field->length - len, '0'); - len= field->length; - } - fetch_string_with_conversion(param, buff, len); - - break; - } - } -} - - -/* - Fetch time/date/datetime to supplied buffer of any type - - SYNOPSIS - param output buffer descriptor - time column data -*/ - -static void fetch_datetime_with_conversion(MYSQL_BIND *param, - MYSQL_FIELD *field, - MYSQL_TIME *my_time) -{ - switch (param->buffer_type) { - case MYSQL_TYPE_NULL: /* do nothing */ - break; - case MYSQL_TYPE_DATE: - *(MYSQL_TIME *)(param->buffer)= *my_time; - *param->error= my_time->time_type != MYSQL_TIMESTAMP_DATE; - break; - case MYSQL_TYPE_TIME: - *(MYSQL_TIME *)(param->buffer)= *my_time; - *param->error= my_time->time_type != MYSQL_TIMESTAMP_TIME; - break; - case MYSQL_TYPE_DATETIME: - case MYSQL_TYPE_TIMESTAMP: - *(MYSQL_TIME *)(param->buffer)= *my_time; - /* No error: time and date are compatible with datetime */ - break; - case MYSQL_TYPE_YEAR: - shortstore(param->buffer, my_time->year); - *param->error= 1; - break; - case MYSQL_TYPE_FLOAT: - case MYSQL_TYPE_DOUBLE: - { - ulonglong value= TIME_to_ulonglong(my_time); - fetch_float_with_conversion(param, field, - ulonglong2double(value), MY_GCVT_ARG_DOUBLE); - break; - } - case MYSQL_TYPE_TINY: - case MYSQL_TYPE_SHORT: - case MYSQL_TYPE_INT24: - case MYSQL_TYPE_LONG: - case MYSQL_TYPE_LONGLONG: - { - longlong value= (longlong) TIME_to_ulonglong(my_time); - fetch_long_with_conversion(param, field, value, TRUE); - break; - } - default: - { - /* - Convert time value to string and delegate the rest to - fetch_string_with_conversion: - */ - char buff[MAX_DATE_STRING_REP_LENGTH]; - uint length= my_TIME_to_str(my_time, buff); - /* Resort to string conversion */ - fetch_string_with_conversion(param, (char *)buff, length); - break; - } - } -} - - -/* - Fetch and convert result set column to output buffer. - - SYNOPSIS - fetch_result_with_conversion() - param output buffer descriptor - field column metadata - row points to a column of result set tuple in binary format - - DESCRIPTION - This is a fallback implementation of column fetch used - if column and output buffer types do not match. - Increases tuple pointer to point at the next column within the - tuple. -*/ - -static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field, - uchar **row) -{ - enum enum_field_types field_type= field->type; - uint field_is_unsigned= field->flags & UNSIGNED_FLAG; - - switch (field_type) { - case MYSQL_TYPE_TINY: - { - uchar value= **row; - /* sic: we need to cast to 'signed char' as 'char' may be unsigned */ - longlong data= field_is_unsigned ? (longlong) value : - (longlong) (signed char) value; - fetch_long_with_conversion(param, field, data, 0); - *row+= 1; - break; - } - case MYSQL_TYPE_SHORT: - case MYSQL_TYPE_YEAR: - { - short value= sint2korr(*row); - longlong data= field_is_unsigned ? (longlong) (unsigned short) value : - (longlong) value; - fetch_long_with_conversion(param, field, data, 0); - *row+= 2; - break; - } - case MYSQL_TYPE_INT24: /* mediumint is sent as 4 bytes int */ - case MYSQL_TYPE_LONG: - { - int32 value= sint4korr(*row); - longlong data= field_is_unsigned ? (longlong) (uint32) value : - (longlong) value; - fetch_long_with_conversion(param, field, data, 0); - *row+= 4; - break; - } - case MYSQL_TYPE_LONGLONG: - { - longlong value= (longlong)sint8korr(*row); - fetch_long_with_conversion(param, field, value, - field->flags & UNSIGNED_FLAG); - *row+= 8; - break; - } - case MYSQL_TYPE_FLOAT: - { - float value; - float4get(value,*row); - fetch_float_with_conversion(param, field, value, MY_GCVT_ARG_FLOAT); - *row+= 4; - break; - } - case MYSQL_TYPE_DOUBLE: - { - double value; - float8get(value,*row); - fetch_float_with_conversion(param, field, value, MY_GCVT_ARG_DOUBLE); - *row+= 8; - break; - } - case MYSQL_TYPE_DATE: - { - MYSQL_TIME tm; - - read_binary_date(&tm, row); - fetch_datetime_with_conversion(param, field, &tm); - break; - } - case MYSQL_TYPE_TIME: - { - MYSQL_TIME tm; - - read_binary_time(&tm, row); - fetch_datetime_with_conversion(param, field, &tm); - break; - } - case MYSQL_TYPE_DATETIME: - case MYSQL_TYPE_TIMESTAMP: - { - MYSQL_TIME tm; - - read_binary_datetime(&tm, row); - fetch_datetime_with_conversion(param, field, &tm); - break; - } - default: - { - ulong length= net_field_length(row); - fetch_string_with_conversion(param, (char*) *row, length); - *row+= length; - break; - } - } -} - - -/* - Functions to fetch data to application buffers without conversion. - - All functions have the following characteristics: - - SYNOPSIS - fetch_result_xxx() - param MySQL bind param - pos Row value - - DESCRIPTION - These are no-conversion functions, used in binary protocol to store - rows in application buffers. A function used only if type of binary data - is compatible with type of application buffer. - - RETURN - none -*/ - -static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field, - uchar **row) -{ - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); - uchar data= **row; - *(uchar *)param->buffer= data; - *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX8; - (*row)++; -} - -static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field, - uchar **row) -{ - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); - ushort data= (ushort) sint2korr(*row); - shortstore(param->buffer, data); - *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX16; - *row+= 2; -} - -static void fetch_result_int32(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) -{ - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); - uint32 data= (uint32) sint4korr(*row); - longstore(param->buffer, data); - *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX32; - *row+= 4; -} - -static void fetch_result_int64(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) -{ - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); - ulonglong data= (ulonglong) sint8korr(*row); - *param->error= param->is_unsigned != field_is_unsigned && data > LONGLONG_MAX; - longlongstore(param->buffer, data); - *row+= 8; -} - -static void fetch_result_float(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) -{ - float value; - float4get(value,*row); - floatstore(param->buffer, value); - *row+= 4; -} - -static void fetch_result_double(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) -{ - double value; - float8get(value,*row); - doublestore(param->buffer, value); - *row+= 8; -} - -static void fetch_result_time(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) -{ - MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer; - read_binary_time(tm, row); -} - -static void fetch_result_date(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) -{ - MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer; - read_binary_date(tm, row); -} - -static void fetch_result_datetime(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) -{ - MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer; - read_binary_datetime(tm, row); -} - -static void fetch_result_bin(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) -{ - ulong length= net_field_length(row); - ulong copy_length= min(length, param->buffer_length); - memcpy(param->buffer, (char *)*row, copy_length); - *param->length= length; - *param->error= copy_length < length; - *row+= length; -} - -static void fetch_result_str(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) -{ - ulong length= net_field_length(row); - ulong copy_length= min(length, param->buffer_length); - memcpy(param->buffer, (char *)*row, copy_length); - /* Add an end null if there is room in the buffer */ - if (copy_length != param->buffer_length) - ((uchar *)param->buffer)[copy_length]= '\0'; - *param->length= length; /* return total length */ - *param->error= copy_length < length; - *row+= length; -} - - -/* - functions to calculate max lengths for strings during - mysql_stmt_store_result() -*/ - -static void skip_result_fixed(MYSQL_BIND *param, - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) - -{ - (*row)+= param->pack_length; -} - - -static void skip_result_with_length(MYSQL_BIND *param __attribute__((unused)), - MYSQL_FIELD *field __attribute__((unused)), - uchar **row) - -{ - ulong length= net_field_length(row); - (*row)+= length; -} - - -static void skip_result_string(MYSQL_BIND *param __attribute__((unused)), - MYSQL_FIELD *field, - uchar **row) - -{ - ulong length= net_field_length(row); - (*row)+= length; - if (field->max_length < length) - field->max_length= length; -} - - -/* - Check that two field types are binary compatible i. e. - have equal representation in the binary protocol and - require client-side buffers of the same type. - - SYNOPSIS - is_binary_compatible() - type1 parameter type supplied by user - type2 field type, obtained from result set metadata - - RETURN - TRUE or FALSE -*/ - -static my_bool is_binary_compatible(enum enum_field_types type1, - enum enum_field_types type2) -{ - static const enum enum_field_types - range1[]= { MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR, MYSQL_TYPE_NULL }, - range2[]= { MYSQL_TYPE_INT24, MYSQL_TYPE_LONG, MYSQL_TYPE_NULL }, - range3[]= { MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, MYSQL_TYPE_NULL }, - range4[]= { MYSQL_TYPE_ENUM, MYSQL_TYPE_SET, MYSQL_TYPE_TINY_BLOB, - MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB, - MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING, MYSQL_TYPE_GEOMETRY, - MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NULL }; - static const enum enum_field_types - *range_list[]= { range1, range2, range3, range4 }, - **range_list_end= range_list + sizeof(range_list)/sizeof(*range_list); - const enum enum_field_types **range, *type; - - if (type1 == type2) - return TRUE; - for (range= range_list; range != range_list_end; ++range) - { - /* check that both type1 and type2 are in the same range */ - my_bool type1_found= FALSE, type2_found= FALSE; - for (type= *range; *type != MYSQL_TYPE_NULL; type++) - { - type1_found|= type1 == *type; - type2_found|= type2 == *type; - } - if (type1_found || type2_found) - return type1_found && type2_found; - } - return FALSE; -} - - -/* - Setup a fetch function for one column of a result set. - - SYNOPSIS - setup_one_fetch_function() - param output buffer descriptor - field column descriptor - - DESCRIPTION - When user binds result set buffers or when result set - metadata is changed, we need to setup fetch (and possibly - conversion) functions for all columns of the result set. - In addition to that here we set up skip_result function, used - to update result set metadata in case when - STMT_ATTR_UPDATE_MAX_LENGTH attribute is set. - Notice that while fetch_result is chosen depending on both - field->type and param->type, skip_result depends on field->type - only. - - RETURN - TRUE fetch function for this typecode was not found (typecode - is not supported by the client library) - FALSE success -*/ - -static my_bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field) -{ - DBUG_ENTER("setup_one_fetch_function"); - - /* Setup data copy functions for the different supported types */ - switch (param->buffer_type) { - case MYSQL_TYPE_NULL: /* for dummy binds */ - /* - It's not binary compatible with anything the server can return: - no need to setup fetch_result, as it'll be reset anyway - */ - *param->length= 0; - break; - case MYSQL_TYPE_TINY: - param->fetch_result= fetch_result_tinyint; - *param->length= 1; - break; - case MYSQL_TYPE_SHORT: - case MYSQL_TYPE_YEAR: - param->fetch_result= fetch_result_short; - *param->length= 2; - break; - case MYSQL_TYPE_INT24: - case MYSQL_TYPE_LONG: - param->fetch_result= fetch_result_int32; - *param->length= 4; - break; - case MYSQL_TYPE_LONGLONG: - param->fetch_result= fetch_result_int64; - *param->length= 8; - break; - case MYSQL_TYPE_FLOAT: - param->fetch_result= fetch_result_float; - *param->length= 4; - break; - case MYSQL_TYPE_DOUBLE: - param->fetch_result= fetch_result_double; - *param->length= 8; - break; - case MYSQL_TYPE_TIME: - param->fetch_result= fetch_result_time; - *param->length= sizeof(MYSQL_TIME); - break; - case MYSQL_TYPE_DATE: - param->fetch_result= fetch_result_date; - *param->length= sizeof(MYSQL_TIME); - break; - case MYSQL_TYPE_DATETIME: - case MYSQL_TYPE_TIMESTAMP: - param->fetch_result= fetch_result_datetime; - *param->length= sizeof(MYSQL_TIME); - break; - case MYSQL_TYPE_TINY_BLOB: - case MYSQL_TYPE_MEDIUM_BLOB: - case MYSQL_TYPE_LONG_BLOB: - case MYSQL_TYPE_BLOB: - case MYSQL_TYPE_BIT: - DBUG_ASSERT(param->buffer_length != 0); - param->fetch_result= fetch_result_bin; - break; - case MYSQL_TYPE_VAR_STRING: - case MYSQL_TYPE_STRING: - case MYSQL_TYPE_DECIMAL: - case MYSQL_TYPE_NEWDECIMAL: - case MYSQL_TYPE_NEWDATE: - DBUG_ASSERT(param->buffer_length != 0); - param->fetch_result= fetch_result_str; - break; - default: - DBUG_PRINT("error", ("Unknown param->buffer_type: %u", - (uint) param->buffer_type)); - DBUG_RETURN(TRUE); - } - if (! is_binary_compatible(param->buffer_type, field->type)) - param->fetch_result= fetch_result_with_conversion; - - /* Setup skip_result functions (to calculate max_length) */ - param->skip_result= skip_result_fixed; - switch (field->type) { - case MYSQL_TYPE_NULL: /* for dummy binds */ - param->pack_length= 0; - field->max_length= 0; - break; - case MYSQL_TYPE_TINY: - param->pack_length= 1; - field->max_length= 4; /* as in '-127' */ - break; - case MYSQL_TYPE_YEAR: - case MYSQL_TYPE_SHORT: - param->pack_length= 2; - field->max_length= 6; /* as in '-32767' */ - break; - case MYSQL_TYPE_INT24: - field->max_length= 9; /* as in '16777216' or in '-8388607' */ - param->pack_length= 4; - break; - case MYSQL_TYPE_LONG: - field->max_length= 11; /* '-2147483647' */ - param->pack_length= 4; - break; - case MYSQL_TYPE_LONGLONG: - field->max_length= 21; /* '18446744073709551616' */ - param->pack_length= 8; - break; - case MYSQL_TYPE_FLOAT: - param->pack_length= 4; - field->max_length= MAX_DOUBLE_STRING_REP_LENGTH; - break; - case MYSQL_TYPE_DOUBLE: - param->pack_length= 8; - field->max_length= MAX_DOUBLE_STRING_REP_LENGTH; - break; - case MYSQL_TYPE_TIME: - field->max_length= 15; /* 19:23:48.123456 */ - param->skip_result= skip_result_with_length; - case MYSQL_TYPE_DATE: - field->max_length= 10; /* 2003-11-11 */ - param->skip_result= skip_result_with_length; - break; - case MYSQL_TYPE_DATETIME: - case MYSQL_TYPE_TIMESTAMP: - param->skip_result= skip_result_with_length; - field->max_length= MAX_DATE_STRING_REP_LENGTH; - break; - case MYSQL_TYPE_DECIMAL: - case MYSQL_TYPE_NEWDECIMAL: - case MYSQL_TYPE_ENUM: - case MYSQL_TYPE_SET: - case MYSQL_TYPE_GEOMETRY: - case MYSQL_TYPE_TINY_BLOB: - case MYSQL_TYPE_MEDIUM_BLOB: - case MYSQL_TYPE_LONG_BLOB: - case MYSQL_TYPE_BLOB: - case MYSQL_TYPE_VAR_STRING: - case MYSQL_TYPE_STRING: - case MYSQL_TYPE_BIT: - case MYSQL_TYPE_NEWDATE: - param->skip_result= skip_result_string; - break; - default: - DBUG_PRINT("error", ("Unknown field->type: %u", (uint) field->type)); - DBUG_RETURN(TRUE); - } - DBUG_RETURN(FALSE); -} - - -/* - Setup the bind buffers for resultset processing -*/ - -my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) -{ - MYSQL_BIND *param, *end; - MYSQL_FIELD *field; - ulong bind_count= stmt->field_count; - uint param_count= 0; - DBUG_ENTER("mysql_stmt_bind_result"); - DBUG_PRINT("enter",("field_count: %lu", bind_count)); - - if (!bind_count) - { - int errorcode= (int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE ? - CR_NO_PREPARE_STMT : CR_NO_STMT_METADATA; - set_stmt_error(stmt, errorcode, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - - /* - We only need to check that stmt->field_count - if it is not null - stmt->bind was initialized in mysql_stmt_prepare - stmt->bind overlaps with bind if mysql_stmt_bind_param - is called from mysql_stmt_store_result. - */ - - if (stmt->bind != my_bind) - memcpy((char*) stmt->bind, (char*) my_bind, - sizeof(MYSQL_BIND) * bind_count); - - for (param= stmt->bind, end= param + bind_count, field= stmt->fields ; - param < end ; - param++, field++) - { - DBUG_PRINT("info",("buffer_type: %u field_type: %u", - (uint) param->buffer_type, (uint) field->type)); - /* - Set param->is_null to point to a dummy variable if it's not set. - This is to make the execute code easier - */ - if (!param->is_null) - param->is_null= ¶m->is_null_value; - - if (!param->length) - param->length= ¶m->length_value; - - if (!param->error) - param->error= ¶m->error_value; - - param->param_number= param_count++; - param->offset= 0; - - if (setup_one_fetch_function(param, field)) - { - strmov(stmt->sqlstate, unknown_sqlstate); - sprintf(stmt->last_error, - ER(stmt->last_errno= CR_UNSUPPORTED_PARAM_TYPE), - field->type, param_count); - DBUG_RETURN(1); - } - } - stmt->bind_result_done= BIND_RESULT_DONE; - if (stmt->mysql->options.report_data_truncation) - stmt->bind_result_done|= REPORT_DATA_TRUNCATION; - - DBUG_RETURN(0); -} - - -/* - Fetch row data to bind buffers -*/ - -static int stmt_fetch_row(MYSQL_STMT *stmt, uchar *row) -{ - MYSQL_BIND *my_bind, *end; - MYSQL_FIELD *field; - uchar *null_ptr, bit; - int truncation_count= 0; - /* - Precondition: if stmt->field_count is zero or row is NULL, read_row_* - function must return no data. - */ - DBUG_ASSERT(stmt->field_count); - DBUG_ASSERT(row); - - if (!stmt->bind_result_done) - { - /* If output parameters were not bound we should just return success */ - return 0; - } - - null_ptr= row; - row+= (stmt->field_count+9)/8; /* skip null bits */ - bit= 4; /* first 2 bits are reserved */ - - /* Copy complete row to application buffers */ - for (my_bind= stmt->bind, end= my_bind + stmt->field_count, - field= stmt->fields ; - my_bind < end ; - my_bind++, field++) - { - *my_bind->error= 0; - if (*null_ptr & bit) - { - /* - We should set both row_ptr and is_null to be able to see - nulls in mysql_stmt_fetch_column. This is because is_null may point - to user data which can be overwritten between mysql_stmt_fetch and - mysql_stmt_fetch_column, and in this case nullness of column will be - lost. See mysql_stmt_fetch_column for details. - */ - my_bind->row_ptr= NULL; - *my_bind->is_null= 1; - } - else - { - *my_bind->is_null= 0; - my_bind->row_ptr= row; - (*my_bind->fetch_result)(my_bind, field, &row); - truncation_count+= *my_bind->error; - } - if (!((bit<<=1) & 255)) - { - bit= 1; /* To next uchar */ - null_ptr++; - } - } - if (truncation_count && (stmt->bind_result_done & REPORT_DATA_TRUNCATION)) - return MYSQL_DATA_TRUNCATED; - return 0; -} - - -int cli_unbuffered_fetch(MYSQL *mysql, char **row) -{ - if (packet_error == cli_safe_read(mysql)) - return 1; - - *row= ((mysql->net.read_pos[0] == 254) ? NULL : - (char*) (mysql->net.read_pos+1)); - return 0; -} - - -/* - Fetch and return row data to bound buffers, if any -*/ - -int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt) -{ - int rc; - uchar *row; - DBUG_ENTER("mysql_stmt_fetch"); - - if ((rc= (*stmt->read_row_func)(stmt, &row)) || - ((rc= stmt_fetch_row(stmt, row)) && rc != MYSQL_DATA_TRUNCATED)) - { - stmt->state= MYSQL_STMT_PREPARE_DONE; /* XXX: this is buggy */ - stmt->read_row_func= (rc == MYSQL_NO_DATA) ? - stmt_read_row_no_data : stmt_read_row_no_result_set; - } - else - { - /* This is to know in mysql_stmt_fetch_column that data was fetched */ - stmt->state= MYSQL_STMT_FETCH_DONE; - } - DBUG_RETURN(rc); -} - - -/* - Fetch data for one specified column data - - SYNOPSIS - mysql_stmt_fetch_column() - stmt Prepared statement handler - my_bind Where data should be placed. Should be filled in as - when calling mysql_stmt_bind_result() - column Column to fetch (first column is 0) - ulong offset Offset in result data (to fetch blob in pieces) - This is normally 0 - RETURN - 0 ok - 1 error -*/ - -int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind, - uint column, ulong offset) -{ - MYSQL_BIND *param= stmt->bind+column; - DBUG_ENTER("mysql_stmt_fetch_column"); - - if ((int) stmt->state < (int) MYSQL_STMT_FETCH_DONE) - { - set_stmt_error(stmt, CR_NO_DATA, unknown_sqlstate, NULL); - return 1; - } - if (column >= stmt->field_count) - { - set_stmt_error(stmt, CR_INVALID_PARAMETER_NO, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - - if (!my_bind->error) - my_bind->error= &my_bind->error_value; - *my_bind->error= 0; - if (param->row_ptr) - { - MYSQL_FIELD *field= stmt->fields+column; - uchar *row= param->row_ptr; - my_bind->offset= offset; - if (my_bind->is_null) - *my_bind->is_null= 0; - if (my_bind->length) /* Set the length if non char/binary types */ - *my_bind->length= *param->length; - else - my_bind->length= ¶m->length_value; /* Needed for fetch_result() */ - fetch_result_with_conversion(my_bind, field, &row); - } - else - { - if (my_bind->is_null) - *my_bind->is_null= 1; - } - DBUG_RETURN(0); -} - - -/* - Read all rows of data from server (binary format) -*/ - -int cli_read_binary_rows(MYSQL_STMT *stmt) -{ - ulong pkt_len; - uchar *cp; - MYSQL *mysql= stmt->mysql; - MYSQL_DATA *result= &stmt->result; - MYSQL_ROWS *cur, **prev_ptr= &result->data; - NET *net; - - DBUG_ENTER("cli_read_binary_rows"); - - if (!mysql) - { - set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - - net = &mysql->net; - - while ((pkt_len= cli_safe_read(mysql)) != packet_error) - { - cp= net->read_pos; - if (cp[0] != 254 || pkt_len >= 8) - { - if (!(cur= (MYSQL_ROWS*) alloc_root(&result->alloc, - sizeof(MYSQL_ROWS) + pkt_len - 1))) - { - set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL); - goto err; - } - cur->data= (MYSQL_ROW) (cur+1); - *prev_ptr= cur; - prev_ptr= &cur->next; - memcpy((char *) cur->data, (char *) cp+1, pkt_len-1); - cur->length= pkt_len; /* To allow us to do sanity checks */ - result->rows++; - } - else - { - /* end of data */ - *prev_ptr= 0; - mysql->warning_count= uint2korr(cp+1); - mysql->server_status= uint2korr(cp+3); - DBUG_PRINT("info",("status: %u warning_count: %u", - mysql->server_status, mysql->warning_count)); - DBUG_RETURN(0); - } - } - set_stmt_errmsg(stmt, net); - -err: - DBUG_RETURN(1); -} - - -/* - Update meta data for statement - - SYNOPSIS - stmt_update_metadata() - stmt Statement handler - row Binary data - - NOTES - Only updates MYSQL_FIELD->max_length for strings -*/ - -static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data) -{ - MYSQL_BIND *my_bind, *end; - MYSQL_FIELD *field; - uchar *null_ptr, bit; - uchar *row= (uchar*) data->data; -#ifndef DBUG_OFF - uchar *row_end= row + data->length; -#endif - - null_ptr= row; - row+= (stmt->field_count+9)/8; /* skip null bits */ - bit= 4; /* first 2 bits are reserved */ - - /* Go through all fields and calculate metadata */ - for (my_bind= stmt->bind, end= my_bind + stmt->field_count, field= stmt->fields ; - my_bind < end ; - my_bind++, field++) - { - if (!(*null_ptr & bit)) - (*my_bind->skip_result)(my_bind, field, &row); - DBUG_ASSERT(row <= row_end); - if (!((bit<<=1) & 255)) - { - bit= 1; /* To next uchar */ - null_ptr++; - } - } -} - - -/* - Store or buffer the binary results to stmt -*/ - -int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt) -{ - MYSQL *mysql= stmt->mysql; - MYSQL_DATA *result= &stmt->result; - DBUG_ENTER("mysql_stmt_store_result"); - - if (!mysql) - { - /* mysql can be reset in mysql_close called from mysql_reconnect */ - set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - - if (!stmt->field_count) - DBUG_RETURN(0); - - if ((int) stmt->state < (int) MYSQL_STMT_EXECUTE_DONE) - { - set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - - if (stmt->last_errno) - { - /* An attempt to use an invalid statement handle. */ - DBUG_RETURN(1); - } - - if (mysql->status == MYSQL_STATUS_READY && - stmt->server_status & SERVER_STATUS_CURSOR_EXISTS) - { - /* - Server side cursor exist, tell server to start sending the rows - */ - NET *net= &mysql->net; - uchar buff[4 /* statement id */ + - 4 /* number of rows to fetch */]; - - /* Send row request to the server */ - int4store(buff, stmt->stmt_id); - int4store(buff + 4, (int)~0); /* number of rows to fetch */ - if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff), - (uchar*) 0, 0, 1, stmt)) - { - set_stmt_errmsg(stmt, net); - DBUG_RETURN(1); - } - } - else if (mysql->status != MYSQL_STATUS_GET_RESULT) - { - set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - - if (stmt->update_max_length && !stmt->bind_result_done) - { - /* - We must initalize the bind structure to be able to calculate - max_length - */ - MYSQL_BIND *my_bind, *end; - MYSQL_FIELD *field; - bzero((char*) stmt->bind, sizeof(*stmt->bind)* stmt->field_count); - - for (my_bind= stmt->bind, end= my_bind + stmt->field_count, - field= stmt->fields; - my_bind < end ; - my_bind++, field++) - { - my_bind->buffer_type= MYSQL_TYPE_NULL; - my_bind->buffer_length=1; - } - - if (mysql_stmt_bind_result(stmt, stmt->bind)) - DBUG_RETURN(1); - stmt->bind_result_done= 0; /* No normal bind done */ - } - - if ((*mysql->methods->read_binary_rows)(stmt)) - { - free_root(&result->alloc, MYF(MY_KEEP_PREALLOC)); - result->data= NULL; - result->rows= 0; - mysql->status= MYSQL_STATUS_READY; - DBUG_RETURN(1); - } - - /* Assert that if there was a cursor, all rows have been fetched */ - DBUG_ASSERT(mysql->status != MYSQL_STATUS_READY || - (mysql->server_status & SERVER_STATUS_LAST_ROW_SENT)); - - if (stmt->update_max_length) - { - MYSQL_ROWS *cur= result->data; - for(; cur; cur=cur->next) - stmt_update_metadata(stmt, cur); - } - - stmt->data_cursor= result->data; - mysql->affected_rows= stmt->affected_rows= result->rows; - stmt->read_row_func= stmt_read_row_buffered; - mysql->unbuffered_fetch_owner= 0; /* set in stmt_execute */ - mysql->status= MYSQL_STATUS_READY; /* server is ready */ - DBUG_RETURN(0); /* Data buffered, must be fetched with mysql_stmt_fetch() */ -} - - -/* - Seek to desired row in the statement result set -*/ - -MYSQL_ROW_OFFSET STDCALL -mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) -{ - MYSQL_ROW_OFFSET offset= stmt->data_cursor; - DBUG_ENTER("mysql_stmt_row_seek"); - - stmt->data_cursor= row; - DBUG_RETURN(offset); -} - - -/* - Return the current statement row cursor position -*/ - -MYSQL_ROW_OFFSET STDCALL -mysql_stmt_row_tell(MYSQL_STMT *stmt) -{ - DBUG_ENTER("mysql_stmt_row_tell"); - - DBUG_RETURN(stmt->data_cursor); -} - - -/* - Move the stmt result set data cursor to specified row -*/ - -void STDCALL -mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) -{ - MYSQL_ROWS *tmp= stmt->result.data; - DBUG_ENTER("mysql_stmt_data_seek"); - DBUG_PRINT("enter",("row id to seek: %ld",(long) row)); - - for (; tmp && row; --row, tmp= tmp->next) - ; - stmt->data_cursor= tmp; - if (!row && tmp) - { - /* Rewind the counter */ - stmt->read_row_func= stmt_read_row_buffered; - stmt->state= MYSQL_STMT_EXECUTE_DONE; - } - DBUG_VOID_RETURN; -} - - -/* - Return total rows the current statement result set -*/ - -my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt) -{ - DBUG_ENTER("mysql_stmt_num_rows"); - - DBUG_RETURN(stmt->result.rows); -} - - -/* - Free the client side memory buffers, reset long data state - on client if necessary, and reset the server side statement if - this has been requested. -*/ - -static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags) -{ - /* If statement hasn't been prepared there is nothing to reset */ - if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE) - { - MYSQL *mysql= stmt->mysql; - MYSQL_DATA *result= &stmt->result; - - /* - Reset stored result set if so was requested or it's a part - of cursor fetch. - */ - if (flags & RESET_STORE_RESULT) - { - /* Result buffered */ - free_root(&result->alloc, MYF(MY_KEEP_PREALLOC)); - result->data= NULL; - result->rows= 0; - stmt->data_cursor= NULL; - } - if (flags & RESET_LONG_DATA) - { - MYSQL_BIND *param= stmt->params, *param_end= param + stmt->param_count; - /* Clear long_data_used flags */ - for (; param < param_end; param++) - param->long_data_used= 0; - } - stmt->read_row_func= stmt_read_row_no_result_set; - if (mysql) - { - if ((int) stmt->state > (int) MYSQL_STMT_PREPARE_DONE) - { - if (mysql->unbuffered_fetch_owner == &stmt->unbuffered_fetch_cancelled) - mysql->unbuffered_fetch_owner= 0; - if (stmt->field_count && mysql->status != MYSQL_STATUS_READY) - { - /* There is a result set and it belongs to this statement */ - (*mysql->methods->flush_use_result)(mysql, FALSE); - if (mysql->unbuffered_fetch_owner) - *mysql->unbuffered_fetch_owner= TRUE; - mysql->status= MYSQL_STATUS_READY; - } - } - if (flags & RESET_SERVER_SIDE) - { - /* - Reset the server side statement and close the server side - cursor if it exists. - */ - uchar buff[MYSQL_STMT_HEADER]; /* packet header: 4 bytes for stmt id */ - int4store(buff, stmt->stmt_id); - if ((*mysql->methods->advanced_command)(mysql, COM_STMT_RESET, buff, - sizeof(buff), 0, 0, 0, stmt)) - { - set_stmt_errmsg(stmt, &mysql->net); - stmt->state= MYSQL_STMT_INIT_DONE; - return 1; - } - } - } - if (flags & RESET_CLEAR_ERROR) - stmt_clear_error(stmt); - stmt->state= MYSQL_STMT_PREPARE_DONE; - } - return 0; -} - -my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt) -{ - DBUG_ENTER("mysql_stmt_free_result"); - - /* Free the client side and close the server side cursor if there is one */ - DBUG_RETURN(reset_stmt_handle(stmt, RESET_LONG_DATA | RESET_STORE_RESULT | - RESET_CLEAR_ERROR)); -} - -/******************************************************************** - statement error handling and close -*********************************************************************/ - -/* - Close the statement handle by freeing all alloced resources - - SYNOPSIS - mysql_stmt_close() - stmt Statement handle - - RETURN VALUES - 0 ok - 1 error -*/ - -my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt) -{ - MYSQL *mysql= stmt->mysql; - int rc= 0; - DBUG_ENTER("mysql_stmt_close"); - - free_root(&stmt->result.alloc, MYF(0)); - free_root(&stmt->mem_root, MYF(0)); - - if (mysql) - { - mysql->stmts= list_delete(mysql->stmts, &stmt->list); - /* - Clear NET error state: if the following commands come through - successfully, connection will still be usable for other commands. - */ - net_clear_error(&mysql->net); - if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE) - { - uchar buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */ - - if (mysql->unbuffered_fetch_owner == &stmt->unbuffered_fetch_cancelled) - mysql->unbuffered_fetch_owner= 0; - if (mysql->status != MYSQL_STATUS_READY) - { - /* - Flush result set of the connection. If it does not belong - to this statement, set a warning. - */ - (*mysql->methods->flush_use_result)(mysql, TRUE); - if (mysql->unbuffered_fetch_owner) - *mysql->unbuffered_fetch_owner= TRUE; - mysql->status= MYSQL_STATUS_READY; - } - int4store(buff, stmt->stmt_id); - if ((rc= stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt))) - { - set_stmt_errmsg(stmt, &mysql->net); - } - } - } - - my_free((uchar*) stmt, MYF(MY_WME)); - - DBUG_RETURN(test(rc)); -} - -/* - Reset the statement buffers in server -*/ - -my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt) -{ - DBUG_ENTER("mysql_stmt_reset"); - DBUG_ASSERT(stmt != 0); - if (!stmt->mysql) - { - /* mysql can be reset in mysql_close called from mysql_reconnect */ - set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL); - DBUG_RETURN(1); - } - /* Reset the client and server sides of the prepared statement */ - DBUG_RETURN(reset_stmt_handle(stmt, - RESET_SERVER_SIDE | RESET_LONG_DATA | - RESET_CLEAR_ERROR)); -} - -/* - Return statement error code -*/ - -uint STDCALL mysql_stmt_errno(MYSQL_STMT * stmt) -{ - DBUG_ENTER("mysql_stmt_errno"); - DBUG_RETURN(stmt->last_errno); -} - -const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt) -{ - DBUG_ENTER("mysql_stmt_sqlstate"); - DBUG_RETURN(stmt->sqlstate); -} - -/* - Return statement error message -*/ - -const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt) -{ - DBUG_ENTER("mysql_stmt_error"); - DBUG_RETURN(stmt->last_error); -} - - -/******************************************************************** - Transactional APIs -*********************************************************************/ - -/* - Commit the current transaction -*/ - -my_bool STDCALL mysql_commit(MYSQL * mysql) -{ - DBUG_ENTER("mysql_commit"); - DBUG_RETURN((my_bool) mysql_real_query(mysql, "commit", 6)); -} - -/* - Rollback the current transaction -*/ - -my_bool STDCALL mysql_rollback(MYSQL * mysql) -{ - DBUG_ENTER("mysql_rollback"); - DBUG_RETURN((my_bool) mysql_real_query(mysql, "rollback", 8)); -} - - -/* - Set autocommit to either true or false -*/ - -my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode) -{ - DBUG_ENTER("mysql_autocommit"); - DBUG_PRINT("enter", ("mode : %d", auto_mode)); - - DBUG_RETURN((my_bool) mysql_real_query(mysql, auto_mode ? - "set autocommit=1":"set autocommit=0", - 16)); -} - - -/******************************************************************** - Multi query execution + SPs APIs -*********************************************************************/ - -/* - Returns true/false to indicate whether any more query results exist - to be read using mysql_next_result() -*/ - -my_bool STDCALL mysql_more_results(MYSQL *mysql) -{ - my_bool res; - DBUG_ENTER("mysql_more_results"); - - res= ((mysql->server_status & SERVER_MORE_RESULTS_EXISTS) ? 1: 0); - DBUG_PRINT("exit",("More results exists ? %d", res)); - DBUG_RETURN(res); -} - - -/* - Reads and returns the next query results -*/ -int STDCALL mysql_next_result(MYSQL *mysql) -{ - DBUG_ENTER("mysql_next_result"); - - if (mysql->status != MYSQL_STATUS_READY) - { - set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate); - DBUG_RETURN(1); - } - - net_clear_error(&mysql->net); - mysql->affected_rows= ~(my_ulonglong) 0; - - if (mysql->server_status & SERVER_MORE_RESULTS_EXISTS) - DBUG_RETURN((*mysql->methods->next_result)(mysql)); - - DBUG_RETURN(-1); /* No more results */ -} - - -int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt) -{ - MYSQL *mysql= stmt->mysql; - int rc; - DBUG_ENTER("mysql_stmt_next_result"); - - if (!mysql) - DBUG_RETURN(1); - - if (stmt->last_errno) - DBUG_RETURN(stmt->last_errno); - - if (mysql->server_status & SERVER_MORE_RESULTS_EXISTS) - { - if (reset_stmt_handle(stmt, RESET_STORE_RESULT)) - DBUG_RETURN(1); - } - - rc= mysql_next_result(mysql); - - if (rc) - { - set_stmt_errmsg(stmt, &mysql->net); - DBUG_RETURN(rc); - } - - stmt->state= MYSQL_STMT_EXECUTE_DONE; - stmt->bind_result_done= FALSE; - - if (mysql->field_count) - { - alloc_stmt_fields(stmt); - prepare_to_fetch_result(stmt); - } - else - { - stmt->field_count= mysql->field_count; - } - - DBUG_RETURN(0); -} - - -MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql) -{ - return (*mysql->methods->use_result)(mysql); -} - -my_bool STDCALL mysql_read_query_result(MYSQL *mysql) -{ - return (*mysql->methods->read_query_result)(mysql); -} - diff --git a/externals/mysql/libmysql/libmysql.def b/externals/mysql/libmysql/libmysql.def deleted file mode 100644 index 869298497d..0000000000 --- a/externals/mysql/libmysql/libmysql.def +++ /dev/null @@ -1,107 +0,0 @@ -LIBRARY LIBMYSQL -VERSION 6.0 -EXPORTS - mysql_get_parameters - mysql_thread_end - mysql_thread_init - myodbc_remove_escape - mysql_affected_rows - mysql_autocommit - mysql_stmt_bind_param - mysql_stmt_bind_result - mysql_change_user - mysql_character_set_name - mysql_close - mysql_commit - mysql_data_seek - mysql_debug - mysql_dump_debug_info - mysql_eof - mysql_errno - mysql_error - mysql_escape_string - mysql_hex_string - mysql_stmt_execute - mysql_stmt_fetch - mysql_stmt_fetch_column - mysql_fetch_field - mysql_fetch_field_direct - mysql_fetch_fields - mysql_fetch_lengths - mysql_fetch_row - mysql_field_count - mysql_field_seek - mysql_field_tell - mysql_free_result - mysql_get_client_info - mysql_get_host_info - mysql_get_proto_info - mysql_get_server_info - mysql_get_client_version - mysql_get_ssl_cipher - mysql_info - mysql_init - mysql_insert_id - mysql_kill - mysql_set_server_option - mysql_list_dbs - mysql_list_fields - mysql_list_processes - mysql_list_tables - mysql_more_results - mysql_next_result - mysql_num_fields - mysql_num_rows - mysql_options - mysql_stmt_param_count - mysql_stmt_param_metadata - mysql_ping - mysql_stmt_result_metadata - mysql_query - mysql_read_query_result - mysql_real_connect - mysql_real_escape_string - mysql_real_query - mysql_refresh - mysql_rollback - mysql_row_seek - mysql_row_tell - mysql_select_db - mysql_stmt_send_long_data - mysql_send_query - mysql_shutdown - mysql_ssl_set - mysql_stat - mysql_stmt_affected_rows - mysql_stmt_close - mysql_stmt_reset - mysql_stmt_data_seek - mysql_stmt_errno - mysql_stmt_error - mysql_stmt_free_result - mysql_stmt_num_rows - mysql_stmt_row_seek - mysql_stmt_row_tell - mysql_stmt_store_result - mysql_store_result - mysql_thread_id - mysql_thread_safe - mysql_use_result - mysql_warning_count - mysql_stmt_sqlstate - mysql_sqlstate - mysql_get_server_version - mysql_stmt_prepare - mysql_stmt_init - mysql_stmt_insert_id - mysql_stmt_attr_get - mysql_stmt_attr_set - mysql_stmt_field_count - mysql_set_local_infile_default - mysql_set_local_infile_handler - mysql_embedded - mysql_server_init - mysql_server_end - mysql_set_character_set - mysql_get_character_set_info - mysql_stmt_next_result diff --git a/externals/mysql/libmysql/my_time.c b/externals/mysql/libmysql/my_time.c deleted file mode 100644 index 9dd0502b63..0000000000 --- a/externals/mysql/libmysql/my_time.c +++ /dev/null @@ -1,1263 +0,0 @@ -/* Copyright (C) 2004-2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -/* Windows version of localtime_r() is declared in my_ptrhead.h */ -#include - -ulonglong log_10_int[20]= -{ - 1, 10, 100, 1000, 10000UL, 100000UL, 1000000UL, 10000000UL, - 100000000ULL, 1000000000ULL, 10000000000ULL, 100000000000ULL, - 1000000000000ULL, 10000000000000ULL, 100000000000000ULL, - 1000000000000000ULL, 10000000000000000ULL, 100000000000000000ULL, - 1000000000000000000ULL, 10000000000000000000ULL -}; - - -/* Position for YYYY-DD-MM HH-MM-DD.FFFFFF AM in default format */ - -static uchar internal_format_positions[]= -{0, 1, 2, 3, 4, 5, 6, (uchar) 255}; - -static char time_separator=':'; - -static ulong const days_at_timestart=719528; /* daynr at 1970.01.01 */ -uchar days_in_month[]= {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0}; - -/* - Offset of system time zone from UTC in seconds used to speed up - work of my_system_gmt_sec() function. -*/ -static long my_time_zone=0; - - -/* Calc days in one year. works with 0 <= year <= 99 */ - -uint calc_days_in_year(uint year) -{ - return ((year & 3) == 0 && (year%100 || (year%400 == 0 && year)) ? - 366 : 365); -} - -/** - @brief Check datetime value for validity according to flags. - - @param[in] ltime Date to check. - @param[in] not_zero_date ltime is not the zero date - @param[in] flags flags to check - (see str_to_datetime() flags in my_time.h) - @param[out] was_cut set to 2 if value was invalid according to flags. - (Feb 29 in non-leap etc.) This remains unchanged - if value is not invalid. - - @details Here we assume that year and month is ok! - If month is 0 we allow any date. (This only happens if we allow zero - date parts in str_to_datetime()) - Disallow dates with zero year and non-zero month and/or day. - - @return - 0 OK - 1 error -*/ - -my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, - ulong flags, int *was_cut) -{ - if (not_zero_date) - { - if ((((flags & TIME_NO_ZERO_IN_DATE) || !(flags & TIME_FUZZY_DATE)) && - (ltime->month == 0 || ltime->day == 0)) || - (!(flags & TIME_INVALID_DATES) && - ltime->month && ltime->day > days_in_month[ltime->month-1] && - (ltime->month != 2 || calc_days_in_year(ltime->year) != 366 || - ltime->day != 29))) - { - *was_cut= 2; - return TRUE; - } - } - else if (flags & TIME_NO_ZERO_DATE) - { - /* - We don't set *was_cut here to signal that the problem was a zero date - and not an invalid date - */ - return TRUE; - } - return FALSE; -} - - -/* - Convert a timestamp string to a MYSQL_TIME value. - - SYNOPSIS - str_to_datetime() - str String to parse - length Length of string - l_time Date is stored here - flags Bitmap of following items - TIME_FUZZY_DATE Set if we should allow partial dates - TIME_DATETIME_ONLY Set if we only allow full datetimes. - TIME_NO_ZERO_IN_DATE Don't allow partial dates - TIME_NO_ZERO_DATE Don't allow 0000-00-00 date - TIME_INVALID_DATES Allow 2000-02-31 - was_cut 0 Value OK - 1 If value was cut during conversion - 2 check_date(date,flags) considers date invalid - - DESCRIPTION - At least the following formats are recogniced (based on number of digits) - YYMMDD, YYYYMMDD, YYMMDDHHMMSS, YYYYMMDDHHMMSS - YY-MM-DD, YYYY-MM-DD, YY-MM-DD HH.MM.SS - YYYYMMDDTHHMMSS where T is a the character T (ISO8601) - Also dates where all parts are zero are allowed - - The second part may have an optional .###### fraction part. - - NOTES - This function should work with a format position vector as long as the - following things holds: - - All date are kept together and all time parts are kept together - - Date and time parts must be separated by blank - - Second fractions must come after second part and be separated - by a '.'. (The second fractions are optional) - - AM/PM must come after second fractions (or after seconds if no fractions) - - Year must always been specified. - - If time is before date, then we will use datetime format only if - the argument consist of two parts, separated by space. - Otherwise we will assume the argument is a date. - - The hour part must be specified in hour-minute-second order. - - RETURN VALUES - MYSQL_TIMESTAMP_NONE String wasn't a timestamp, like - [DD [HH:[MM:[SS]]]].fraction. - l_time is not changed. - MYSQL_TIMESTAMP_DATE DATE string (YY MM and DD parts ok) - MYSQL_TIMESTAMP_DATETIME Full timestamp - MYSQL_TIMESTAMP_ERROR Timestamp with wrong values. - All elements in l_time is set to 0 -*/ - -#define MAX_DATE_PARTS 8 - -enum enum_mysql_timestamp_type -str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, - uint flags, int *was_cut) -{ - uint field_length, year_length, digits, i, number_of_fields; - uint date[MAX_DATE_PARTS], date_len[MAX_DATE_PARTS]; - uint add_hours= 0, start_loop; - ulong not_zero_date, allow_space; - my_bool is_internal_format; - const char *pos, *last_field_pos; - const char *end=str+length; - const uchar *format_position; - my_bool found_delimitier= 0, found_space= 0; - uint frac_pos, frac_len; - DBUG_ENTER("str_to_datetime"); - DBUG_PRINT("ENTER",("str: %.*s",length,str)); - - LINT_INIT(field_length); - LINT_INIT(year_length); - LINT_INIT(last_field_pos); - - *was_cut= 0; - - /* Skip space at start */ - for (; str != end && my_isspace(&my_charset_latin1, *str) ; str++) - ; - if (str == end || ! my_isdigit(&my_charset_latin1, *str)) - { - *was_cut= 1; - DBUG_RETURN(MYSQL_TIMESTAMP_NONE); - } - - is_internal_format= 0; - /* This has to be changed if want to activate different timestamp formats */ - format_position= internal_format_positions; - - /* - Calculate number of digits in first part. - If length= 8 or >= 14 then year is of format YYYY. - (YYYY-MM-DD, YYYYMMDD, YYYYYMMDDHHMMSS) - */ - for (pos=str; - pos != end && (my_isdigit(&my_charset_latin1,*pos) || *pos == 'T'); - pos++) - ; - - digits= (uint) (pos-str); - start_loop= 0; /* Start of scan loop */ - date_len[format_position[0]]= 0; /* Length of year field */ - if (pos == end || *pos == '.') - { - /* Found date in internal format (only numbers like YYYYMMDD) */ - year_length= (digits == 4 || digits == 8 || digits >= 14) ? 4 : 2; - field_length= year_length; - is_internal_format= 1; - format_position= internal_format_positions; - } - else - { - if (format_position[0] >= 3) /* If year is after HHMMDD */ - { - /* - If year is not in first part then we have to determinate if we got - a date field or a datetime field. - We do this by checking if there is two numbers separated by - space in the input. - */ - while (pos < end && !my_isspace(&my_charset_latin1, *pos)) - pos++; - while (pos < end && !my_isdigit(&my_charset_latin1, *pos)) - pos++; - if (pos == end) - { - if (flags & TIME_DATETIME_ONLY) - { - *was_cut= 1; - DBUG_RETURN(MYSQL_TIMESTAMP_NONE); /* Can't be a full datetime */ - } - /* Date field. Set hour, minutes and seconds to 0 */ - date[0]= date[1]= date[2]= date[3]= date[4]= 0; - start_loop= 5; /* Start with first date part */ - } - } - - field_length= format_position[0] == 0 ? 4 : 2; - } - - /* - Only allow space in the first "part" of the datetime field and: - - after days, part seconds - - before and after AM/PM (handled by code later) - - 2003-03-03 20:00:20 AM - 20:00:20.000000 AM 03-03-2000 - */ - i= max((uint) format_position[0], (uint) format_position[1]); - set_if_bigger(i, (uint) format_position[2]); - allow_space= ((1 << i) | (1 << format_position[6])); - allow_space&= (1 | 2 | 4 | 8); - - not_zero_date= 0; - for (i = start_loop; - i < MAX_DATE_PARTS-1 && str != end && - my_isdigit(&my_charset_latin1,*str); - i++) - { - const char *start= str; - ulong tmp_value= (uint) (uchar) (*str++ - '0'); - - /* - Internal format means no delimiters; every field has a fixed - width. Otherwise, we scan until we find a delimiter and discard - leading zeroes -- except for the microsecond part, where leading - zeroes are significant, and where we never process more than six - digits. - */ - my_bool scan_until_delim= !is_internal_format && - ((i != format_position[6])); - - while (str != end && my_isdigit(&my_charset_latin1,str[0]) && - (scan_until_delim || --field_length)) - { - tmp_value=tmp_value*10 + (ulong) (uchar) (*str - '0'); - str++; - } - date_len[i]= (uint) (str - start); - if (tmp_value > 999999) /* Impossible date part */ - { - *was_cut= 1; - DBUG_RETURN(MYSQL_TIMESTAMP_NONE); - } - date[i]=tmp_value; - not_zero_date|= tmp_value; - - /* Length of next field */ - field_length= format_position[i+1] == 0 ? 4 : 2; - - if ((last_field_pos= str) == end) - { - i++; /* Register last found part */ - break; - } - /* Allow a 'T' after day to allow CCYYMMDDT type of fields */ - if (i == format_position[2] && *str == 'T') - { - str++; /* ISO8601: CCYYMMDDThhmmss */ - continue; - } - if (i == format_position[5]) /* Seconds */ - { - if (*str == '.') /* Followed by part seconds */ - { - str++; - field_length= 6; /* 6 digits */ - } - continue; - } - while (str != end && - (my_ispunct(&my_charset_latin1,*str) || - my_isspace(&my_charset_latin1,*str))) - { - if (my_isspace(&my_charset_latin1,*str)) - { - if (!(allow_space & (1 << i))) - { - *was_cut= 1; - DBUG_RETURN(MYSQL_TIMESTAMP_NONE); - } - found_space= 1; - } - str++; - found_delimitier= 1; /* Should be a 'normal' date */ - } - /* Check if next position is AM/PM */ - if (i == format_position[6]) /* Seconds, time for AM/PM */ - { - i++; /* Skip AM/PM part */ - if (format_position[7] != 255) /* If using AM/PM */ - { - if (str+2 <= end && (str[1] == 'M' || str[1] == 'm')) - { - if (str[0] == 'p' || str[0] == 'P') - add_hours= 12; - else if (str[0] != 'a' || str[0] != 'A') - continue; /* Not AM/PM */ - str+= 2; /* Skip AM/PM */ - /* Skip space after AM/PM */ - while (str != end && my_isspace(&my_charset_latin1,*str)) - str++; - } - } - } - last_field_pos= str; - } - if (found_delimitier && !found_space && (flags & TIME_DATETIME_ONLY)) - { - *was_cut= 1; - DBUG_RETURN(MYSQL_TIMESTAMP_NONE); /* Can't be a datetime */ - } - - str= last_field_pos; - - number_of_fields= i - start_loop; - while (i < MAX_DATE_PARTS) - { - date_len[i]= 0; - date[i++]= 0; - } - - if (!is_internal_format) - { - year_length= date_len[(uint) format_position[0]]; - if (!year_length) /* Year must be specified */ - { - *was_cut= 1; - DBUG_RETURN(MYSQL_TIMESTAMP_NONE); - } - - l_time->year= date[(uint) format_position[0]]; - l_time->month= date[(uint) format_position[1]]; - l_time->day= date[(uint) format_position[2]]; - l_time->hour= date[(uint) format_position[3]]; - l_time->minute= date[(uint) format_position[4]]; - l_time->second= date[(uint) format_position[5]]; - - frac_pos= (uint) format_position[6]; - frac_len= date_len[frac_pos]; - if (frac_len < 6) - date[frac_pos]*= (uint) log_10_int[6 - frac_len]; - l_time->second_part= date[frac_pos]; - - if (format_position[7] != (uchar) 255) - { - if (l_time->hour > 12) - { - *was_cut= 1; - goto err; - } - l_time->hour= l_time->hour%12 + add_hours; - } - } - else - { - l_time->year= date[0]; - l_time->month= date[1]; - l_time->day= date[2]; - l_time->hour= date[3]; - l_time->minute= date[4]; - l_time->second= date[5]; - if (date_len[6] < 6) - date[6]*= (uint) log_10_int[6 - date_len[6]]; - l_time->second_part=date[6]; - } - l_time->neg= 0; - - if (year_length == 2 && not_zero_date) - l_time->year+= (l_time->year < YY_PART_YEAR ? 2000 : 1900); - - if (number_of_fields < 3 || - l_time->year > 9999 || l_time->month > 12 || - l_time->day > 31 || l_time->hour > 23 || - l_time->minute > 59 || l_time->second > 59) - { - /* Only give warning for a zero date if there is some garbage after */ - if (!not_zero_date) /* If zero date */ - { - for (; str != end ; str++) - { - if (!my_isspace(&my_charset_latin1, *str)) - { - not_zero_date= 1; /* Give warning */ - break; - } - } - } - *was_cut= test(not_zero_date); - goto err; - } - - if (check_date(l_time, not_zero_date != 0, flags, was_cut)) - goto err; - - l_time->time_type= (number_of_fields <= 3 ? - MYSQL_TIMESTAMP_DATE : MYSQL_TIMESTAMP_DATETIME); - - for (; str != end ; str++) - { - if (!my_isspace(&my_charset_latin1,*str)) - { - *was_cut= 1; - break; - } - } - - DBUG_RETURN(l_time->time_type= - (number_of_fields <= 3 ? MYSQL_TIMESTAMP_DATE : - MYSQL_TIMESTAMP_DATETIME)); - -err: - bzero((char*) l_time, sizeof(*l_time)); - DBUG_RETURN(MYSQL_TIMESTAMP_ERROR); -} - - -/* - Convert a time string to a MYSQL_TIME struct. - - SYNOPSIS - str_to_time() - str A string in full TIMESTAMP format or - [-] DAYS [H]H:MM:SS, [H]H:MM:SS, [M]M:SS, [H]HMMSS, - [M]MSS or [S]S - There may be an optional [.second_part] after seconds - length Length of str - l_time Store result here - warning Set MYSQL_TIME_WARN_TRUNCATED flag if the input string - was cut during conversion, and/or - MYSQL_TIME_WARN_OUT_OF_RANGE flag, if the value is - out of range. - - NOTES - Because of the extra days argument, this function can only - work with times where the time arguments are in the above order. - - RETURN - 0 ok - 1 error -*/ - -my_bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time, - int *warning) -{ - ulong date[5]; - ulonglong value; - const char *end=str+length, *end_of_days; - my_bool found_days,found_hours; - uint state; - - l_time->neg=0; - *warning= 0; - for (; str != end && my_isspace(&my_charset_latin1,*str) ; str++) - length--; - if (str != end && *str == '-') - { - l_time->neg=1; - str++; - length--; - } - if (str == end) - return 1; - - /* Check first if this is a full TIMESTAMP */ - if (length >= 12) - { /* Probably full timestamp */ - int was_cut; - enum enum_mysql_timestamp_type - res= str_to_datetime(str, length, l_time, - (TIME_FUZZY_DATE | TIME_DATETIME_ONLY), &was_cut); - if ((int) res >= (int) MYSQL_TIMESTAMP_ERROR) - { - if (was_cut) - *warning|= MYSQL_TIME_WARN_TRUNCATED; - return res == MYSQL_TIMESTAMP_ERROR; - } - } - - /* Not a timestamp. Try to get this as a DAYS_TO_SECOND string */ - for (value=0; str != end && my_isdigit(&my_charset_latin1,*str) ; str++) - value=value*10L + (long) (*str - '0'); - - /* Skip all space after 'days' */ - end_of_days= str; - for (; str != end && my_isspace(&my_charset_latin1, str[0]) ; str++) - ; - - LINT_INIT(state); - found_days=found_hours=0; - if ((uint) (end-str) > 1 && str != end_of_days && - my_isdigit(&my_charset_latin1, *str)) - { /* Found days part */ - date[0]= (ulong) value; - state= 1; /* Assume next is hours */ - found_days= 1; - } - else if ((end-str) > 1 && *str == time_separator && - my_isdigit(&my_charset_latin1, str[1])) - { - date[0]= 0; /* Assume we found hours */ - date[1]= (ulong) value; - state=2; - found_hours=1; - str++; /* skip ':' */ - } - else - { - /* String given as one number; assume HHMMSS format */ - date[0]= 0; - date[1]= (ulong) (value/10000); - date[2]= (ulong) (value/100 % 100); - date[3]= (ulong) (value % 100); - state=4; - goto fractional; - } - - /* Read hours, minutes and seconds */ - for (;;) - { - for (value=0; str != end && my_isdigit(&my_charset_latin1,*str) ; str++) - value=value*10L + (long) (*str - '0'); - date[state++]= (ulong) value; - if (state == 4 || (end-str) < 2 || *str != time_separator || - !my_isdigit(&my_charset_latin1,str[1])) - break; - str++; /* Skip time_separator (':') */ - } - - if (state != 4) - { /* Not HH:MM:SS */ - /* Fix the date to assume that seconds was given */ - if (!found_hours && !found_days) - { - bmove_upp((uchar*) (date+4), (uchar*) (date+state), - sizeof(long)*(state-1)); - bzero((uchar*) date, sizeof(long)*(4-state)); - } - else - bzero((uchar*) (date+state), sizeof(long)*(4-state)); - } - -fractional: - /* Get fractional second part */ - if ((end-str) >= 2 && *str == '.' && my_isdigit(&my_charset_latin1,str[1])) - { - int field_length= 5; - str++; value=(uint) (uchar) (*str - '0'); - while (++str != end && my_isdigit(&my_charset_latin1, *str)) - { - if (field_length-- > 0) - value= value*10 + (uint) (uchar) (*str - '0'); - } - if (field_length > 0) - value*= (long) log_10_int[field_length]; - else if (field_length < 0) - *warning|= MYSQL_TIME_WARN_TRUNCATED; - date[4]= (ulong) value; - } - else - date[4]=0; - - /* Check for exponent part: E | E */ - /* (may occur as result of %g formatting of time value) */ - if ((end - str) > 1 && - (*str == 'e' || *str == 'E') && - (my_isdigit(&my_charset_latin1, str[1]) || - ((str[1] == '-' || str[1] == '+') && - (end - str) > 2 && - my_isdigit(&my_charset_latin1, str[2])))) - return 1; - - if (internal_format_positions[7] != 255) - { - /* Read a possible AM/PM */ - while (str != end && my_isspace(&my_charset_latin1, *str)) - str++; - if (str+2 <= end && (str[1] == 'M' || str[1] == 'm')) - { - if (str[0] == 'p' || str[0] == 'P') - { - str+= 2; - date[1]= date[1]%12 + 12; - } - else if (str[0] == 'a' || str[0] == 'A') - str+=2; - } - } - - /* Integer overflow checks */ - if (date[0] > UINT_MAX || date[1] > UINT_MAX || - date[2] > UINT_MAX || date[3] > UINT_MAX || - date[4] > UINT_MAX) - return 1; - - l_time->year= 0; /* For protocol::store_time */ - l_time->month= 0; - l_time->day= date[0]; - l_time->hour= date[1]; - l_time->minute= date[2]; - l_time->second= date[3]; - l_time->second_part= date[4]; - l_time->time_type= MYSQL_TIMESTAMP_TIME; - - /* Check if the value is valid and fits into MYSQL_TIME range */ - if (check_time_range(l_time, warning)) - return 1; - - /* Check if there is garbage at end of the MYSQL_TIME specification */ - if (str != end) - { - do - { - if (!my_isspace(&my_charset_latin1,*str)) - { - *warning|= MYSQL_TIME_WARN_TRUNCATED; - break; - } - } while (++str != end); - } - return 0; -} - - -/* - Check 'time' value to lie in the MYSQL_TIME range - - SYNOPSIS: - check_time_range() - time pointer to MYSQL_TIME value - warning set MYSQL_TIME_WARN_OUT_OF_RANGE flag if the value is out of range - - DESCRIPTION - If the time value lies outside of the range [-838:59:59, 838:59:59], - set it to the closest endpoint of the range and set - MYSQL_TIME_WARN_OUT_OF_RANGE flag in the 'warning' variable. - - RETURN - 0 time value is valid, but was possibly truncated - 1 time value is invalid -*/ - -int check_time_range(struct st_mysql_time *my_time, int *warning) -{ - longlong hour; - - if (my_time->minute >= 60 || my_time->second >= 60) - return 1; - - hour= my_time->hour + (24*my_time->day); - if (hour <= TIME_MAX_HOUR && - (hour != TIME_MAX_HOUR || my_time->minute != TIME_MAX_MINUTE || - my_time->second != TIME_MAX_SECOND || !my_time->second_part)) - return 0; - - my_time->day= 0; - my_time->hour= TIME_MAX_HOUR; - my_time->minute= TIME_MAX_MINUTE; - my_time->second= TIME_MAX_SECOND; - my_time->second_part= 0; - *warning|= MYSQL_TIME_WARN_OUT_OF_RANGE; - return 0; -} - - -/* - Prepare offset of system time zone from UTC for my_system_gmt_sec() func. - - SYNOPSIS - my_init_time() -*/ -void my_init_time(void) -{ - time_t seconds; - struct tm *l_time,tm_tmp; - MYSQL_TIME my_time; - my_bool not_used; - - seconds= (time_t) time((time_t*) 0); - localtime_r(&seconds,&tm_tmp); - l_time= &tm_tmp; - my_time_zone= 3600; /* Comp. for -3600 in my_gmt_sec */ - my_time.year= (uint) l_time->tm_year+1900; - my_time.month= (uint) l_time->tm_mon+1; - my_time.day= (uint) l_time->tm_mday; - my_time.hour= (uint) l_time->tm_hour; - my_time.minute= (uint) l_time->tm_min; - my_time.second= (uint) l_time->tm_sec; - my_system_gmt_sec(&my_time, &my_time_zone, ¬_used); /* Init my_time_zone */ -} - - -/* - Handle 2 digit year conversions - - SYNOPSIS - year_2000_handling() - year 2 digit year - - RETURN - Year between 1970-2069 -*/ - -uint year_2000_handling(uint year) -{ - if ((year=year+1900) < 1900+YY_PART_YEAR) - year+=100; - return year; -} - - -/* - Calculate nr of day since year 0 in new date-system (from 1615) - - SYNOPSIS - calc_daynr() - year Year (exact 4 digit year, no year conversions) - month Month - day Day - - NOTES: 0000-00-00 is a valid date, and will return 0 - - RETURN - Days since 0000-00-00 -*/ - -long calc_daynr(uint year,uint month,uint day) -{ - long delsum; - int temp; - int y= year; /* may be < 0 temporarily */ - DBUG_ENTER("calc_daynr"); - - if (y == 0 && month == 0 && day == 0) - DBUG_RETURN(0); /* Skip errors */ - delsum= (long) (365L * y+ 31*(month-1) +day); - if (month <= 2) - y--; - else - delsum-= (long) (month*4+23)/10; - temp=(int) ((y/100+1)*3)/4; - DBUG_PRINT("exit",("year: %d month: %d day: %d -> daynr: %ld", - y+(month <= 2),month,day,delsum+y/4-temp)); - DBUG_RETURN(delsum+(int) y/4-temp); -} /* calc_daynr */ - - -/* - Convert time in MYSQL_TIME representation in system time zone to its - my_time_t form (number of seconds in UTC since begginning of Unix Epoch). - - SYNOPSIS - my_system_gmt_sec() - t - time value to be converted - my_timezone - pointer to long where offset of system time zone - from UTC will be stored for caching - in_dst_time_gap - set to true if time falls into spring time-gap - - NOTES - The idea is to cache the time zone offset from UTC (including daylight - saving time) for the next call to make things faster. But currently we - just calculate this offset during startup (by calling my_init_time() - function) and use it all the time. - Time value provided should be legal time value (e.g. '2003-01-01 25:00:00' - is not allowed). - - RETURN VALUE - Time in UTC seconds since Unix Epoch representation. -*/ -my_time_t -my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone, - my_bool *in_dst_time_gap) -{ - uint loop; - time_t tmp= 0; - int shift= 0; - MYSQL_TIME tmp_time; - MYSQL_TIME *t= &tmp_time; - struct tm *l_time,tm_tmp; - long diff, current_timezone; - - /* - Use temp variable to avoid trashing input data, which could happen in - case of shift required for boundary dates processing. - */ - memcpy(&tmp_time, t_src, sizeof(MYSQL_TIME)); - - if (!validate_timestamp_range(t)) - return 0; - - /* - Calculate the gmt time based on current time and timezone - The -1 on the end is to ensure that if have a date that exists twice - (like 2002-10-27 02:00:0 MET), we will find the initial date. - - By doing -3600 we will have to call localtime_r() several times, but - I couldn't come up with a better way to get a repeatable result :( - - We can't use mktime() as it's buggy on many platforms and not thread safe. - - Note: this code assumes that our time_t estimation is not too far away - from real value (we assume that localtime_r(tmp) will return something - within 24 hrs from t) which is probably true for all current time zones. - - Note2: For the dates, which have time_t representation close to - MAX_INT32 (efficient time_t limit for supported platforms), we should - do a small trick to avoid overflow. That is, convert the date, which is - two days earlier, and then add these days to the final value. - - The same trick is done for the values close to 0 in time_t - representation for platfroms with unsigned time_t (QNX). - - To be more verbose, here is a sample (extracted from the code below): - (calc_daynr(2038, 1, 19) - (long) days_at_timestart)*86400L + 4*3600L - would return -2147480896 because of the long type overflow. In result - we would get 1901 year in localtime_r(), which is an obvious error. - - Alike problem raises with the dates close to Epoch. E.g. - (calc_daynr(1969, 12, 31) - (long) days_at_timestart)*86400L + 23*3600L - will give -3600. - - On some platforms, (E.g. on QNX) time_t is unsigned and localtime(-3600) - wil give us a date around 2106 year. Which is no good. - - Theoreticaly, there could be problems with the latter conversion: - there are at least two timezones, which had time switches near 1 Jan - of 1970 (because of political reasons). These are America/Hermosillo and - America/Mazatlan time zones. They changed their offset on - 1970-01-01 08:00:00 UTC from UTC-8 to UTC-7. For these zones - the code below will give incorrect results for dates close to - 1970-01-01, in the case OS takes into account these historical switches. - Luckily, it seems that we support only one platform with unsigned - time_t. It's QNX. And QNX does not support historical timezone data at all. - E.g. there are no /usr/share/zoneinfo/ files or any other mean to supply - historical information for localtime_r() etc. That is, the problem is not - relevant to QNX. - - We are safe with shifts close to MAX_INT32, as there are no known - time switches on Jan 2038 yet :) - */ - if ((t->year == TIMESTAMP_MAX_YEAR) && (t->month == 1) && (t->day > 4)) - { - /* - Below we will pass (uint) (t->day - shift) to calc_daynr. - As we don't want to get an overflow here, we will shift - only safe dates. That's why we have (t->day > 4) above. - */ - t->day-= 2; - shift= 2; - } -#ifdef TIME_T_UNSIGNED - else - { - /* - We can get 0 in time_t representaion only on 1969, 31 of Dec or on - 1970, 1 of Jan. For both dates we use shift, which is added - to t->day in order to step out a bit from the border. - This is required for platforms, where time_t is unsigned. - As far as I know, among the platforms we support it's only QNX. - Note: the order of below if-statements is significant. - */ - - if ((t->year == TIMESTAMP_MIN_YEAR + 1) && (t->month == 1) - && (t->day <= 10)) - { - t->day+= 2; - shift= -2; - } - - if ((t->year == TIMESTAMP_MIN_YEAR) && (t->month == 12) - && (t->day == 31)) - { - t->year++; - t->month= 1; - t->day= 2; - shift= -2; - } - } -#endif - - tmp= (time_t) (((calc_daynr((uint) t->year, (uint) t->month, (uint) t->day) - - (long) days_at_timestart)*86400L + (long) t->hour*3600L + - (long) (t->minute*60 + t->second)) + (time_t) my_time_zone - - 3600); - - current_timezone= my_time_zone; - localtime_r(&tmp,&tm_tmp); - l_time=&tm_tmp; - for (loop=0; - loop < 2 && - (t->hour != (uint) l_time->tm_hour || - t->minute != (uint) l_time->tm_min || - t->second != (uint) l_time->tm_sec); - loop++) - { /* One check should be enough ? */ - /* Get difference in days */ - int days= t->day - l_time->tm_mday; - if (days < -1) - days= 1; /* Month has wrapped */ - else if (days > 1) - days= -1; - diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour)) + - (long) (60*((int) t->minute - (int) l_time->tm_min)) + - (long) ((int) t->second - (int) l_time->tm_sec)); - current_timezone+= diff+3600; /* Compensate for -3600 above */ - tmp+= (time_t) diff; - localtime_r(&tmp,&tm_tmp); - l_time=&tm_tmp; - } - /* - Fix that if we are in the non existing daylight saving time hour - we move the start of the next real hour. - - This code doesn't handle such exotical thing as time-gaps whose length - is more than one hour or non-integer (latter can theoretically happen - if one of seconds will be removed due leap correction, or because of - general time correction like it happened for Africa/Monrovia time zone - in year 1972). - */ - if (loop == 2 && t->hour != (uint) l_time->tm_hour) - { - int days= t->day - l_time->tm_mday; - if (days < -1) - days=1; /* Month has wrapped */ - else if (days > 1) - days= -1; - diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour))+ - (long) (60*((int) t->minute - (int) l_time->tm_min)) + - (long) ((int) t->second - (int) l_time->tm_sec)); - if (diff == 3600) - tmp+=3600 - t->minute*60 - t->second; /* Move to next hour */ - else if (diff == -3600) - tmp-=t->minute*60 + t->second; /* Move to previous hour */ - - *in_dst_time_gap= 1; - } - *my_timezone= current_timezone; - - - /* shift back, if we were dealing with boundary dates */ - tmp+= shift*86400L; - - /* - This is possible for dates, which slightly exceed boundaries. - Conversion will pass ok for them, but we don't allow them. - First check will pass for platforms with signed time_t. - instruction above (tmp+= shift*86400L) could exceed - MAX_INT32 (== TIMESTAMP_MAX_VALUE) and overflow will happen. - So, tmp < TIMESTAMP_MIN_VALUE will be triggered. On platfroms - with unsigned time_t tmp+= shift*86400L might result in a number, - larger then TIMESTAMP_MAX_VALUE, so another check will work. - */ - if ((tmp < TIMESTAMP_MIN_VALUE) || (tmp > TIMESTAMP_MAX_VALUE)) - tmp= 0; - - return (my_time_t) tmp; -} /* my_system_gmt_sec */ - - -/* Set MYSQL_TIME structure to 0000-00-00 00:00:00.000000 */ - -void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type) -{ - bzero((void*) tm, sizeof(*tm)); - tm->time_type= time_type; -} - - -/* - Functions to convert time/date/datetime value to a string, - using default format. - This functions don't check that given MYSQL_TIME structure members are - in valid range. If they are not, return value won't reflect any - valid date either. Additionally, make_time doesn't take into - account time->day member: it's assumed that days have been converted - to hours already. - - RETURN - number of characters written to 'to' -*/ - -int my_time_to_str(const MYSQL_TIME *l_time, char *to) -{ - uint extra_hours= 0; - return my_sprintf(to, (to, "%s%02u:%02u:%02u", - (l_time->neg ? "-" : ""), - extra_hours+ l_time->hour, - l_time->minute, - l_time->second)); -} - -int my_date_to_str(const MYSQL_TIME *l_time, char *to) -{ - return my_sprintf(to, (to, "%04u-%02u-%02u", - l_time->year, - l_time->month, - l_time->day)); -} - -int my_datetime_to_str(const MYSQL_TIME *l_time, char *to) -{ - return my_sprintf(to, (to, "%04u-%02u-%02u %02u:%02u:%02u", - l_time->year, - l_time->month, - l_time->day, - l_time->hour, - l_time->minute, - l_time->second)); -} - - -/* - Convert struct DATE/TIME/DATETIME value to string using built-in - MySQL time conversion formats. - - SYNOPSIS - my_TIME_to_string() - - NOTE - The string must have at least MAX_DATE_STRING_REP_LENGTH bytes reserved. -*/ - -int my_TIME_to_str(const MYSQL_TIME *l_time, char *to) -{ - switch (l_time->time_type) { - case MYSQL_TIMESTAMP_DATETIME: - return my_datetime_to_str(l_time, to); - case MYSQL_TIMESTAMP_DATE: - return my_date_to_str(l_time, to); - case MYSQL_TIMESTAMP_TIME: - return my_time_to_str(l_time, to); - case MYSQL_TIMESTAMP_NONE: - case MYSQL_TIMESTAMP_ERROR: - to[0]='\0'; - return 0; - default: - DBUG_ASSERT(0); - return 0; - } -} - - -/* - Convert datetime value specified as number to broken-down TIME - representation and form value of DATETIME type as side-effect. - - SYNOPSIS - number_to_datetime() - nr - datetime value as number - time_res - pointer for structure for broken-down representation - flags - flags to use in validating date, as in str_to_datetime() - was_cut 0 Value ok - 1 If value was cut during conversion - 2 check_date(date,flags) considers date invalid - - DESCRIPTION - Convert a datetime value of formats YYMMDD, YYYYMMDD, YYMMDDHHMSS, - YYYYMMDDHHMMSS to broken-down MYSQL_TIME representation. Return value in - YYYYMMDDHHMMSS format as side-effect. - - This function also checks if datetime value fits in DATETIME range. - - RETURN VALUE - -1 Timestamp with wrong values - anything else DATETIME as integer in YYYYMMDDHHMMSS format - Datetime value in YYYYMMDDHHMMSS format. -*/ - -longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res, - uint flags, int *was_cut) -{ - long part1,part2; - - *was_cut= 0; - bzero((char*) time_res, sizeof(*time_res)); - time_res->time_type=MYSQL_TIMESTAMP_DATE; - - if (nr == 0LL || nr >= 10000101000000LL) - { - time_res->time_type=MYSQL_TIMESTAMP_DATETIME; - goto ok; - } - if (nr < 101) - goto err; - if (nr <= (YY_PART_YEAR-1)*10000L+1231L) - { - nr= (nr+20000000L)*1000000L; /* YYMMDD, year: 2000-2069 */ - goto ok; - } - if (nr < (YY_PART_YEAR)*10000L+101L) - goto err; - if (nr <= 991231L) - { - nr= (nr+19000000L)*1000000L; /* YYMMDD, year: 1970-1999 */ - goto ok; - } - if (nr < 10000101L) - goto err; - if (nr <= 99991231L) - { - nr= nr*1000000L; - goto ok; - } - if (nr < 101000000L) - goto err; - - time_res->time_type=MYSQL_TIMESTAMP_DATETIME; - - if (nr <= (YY_PART_YEAR-1)*10000000000LL+1231235959LL) - { - nr= nr+20000000000000LL; /* YYMMDDHHMMSS, 2000-2069 */ - goto ok; - } - if (nr < YY_PART_YEAR*10000000000LL+ 101000000LL) - goto err; - if (nr <= 991231235959LL) - nr= nr+19000000000000LL; /* YYMMDDHHMMSS, 1970-1999 */ - - ok: - part1=(long) (nr/1000000LL); - part2=(long) (nr - (longlong) part1*1000000LL); - time_res->year= (int) (part1/10000L); part1%=10000L; - time_res->month= (int) part1 / 100; - time_res->day= (int) part1 % 100; - time_res->hour= (int) (part2/10000L); part2%=10000L; - time_res->minute=(int) part2 / 100; - time_res->second=(int) part2 % 100; - - if (time_res->year <= 9999 && time_res->month <= 12 && - time_res->day <= 31 && time_res->hour <= 23 && - time_res->minute <= 59 && time_res->second <= 59 && - !check_date(time_res, (nr != 0), flags, was_cut)) - return nr; - - /* Don't want to have was_cut get set if NO_ZERO_DATE was violated. */ - if (!nr && (flags & TIME_NO_ZERO_DATE)) - return -1LL; - - err: - *was_cut= 1; - return -1LL; -} - - -/* Convert time value to integer in YYYYMMDDHHMMSS format */ - -ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *my_time) -{ - return ((ulonglong) (my_time->year * 10000UL + - my_time->month * 100UL + - my_time->day) * 1000000ULL + - (ulonglong) (my_time->hour * 10000UL + - my_time->minute * 100UL + - my_time->second)); -} - - -/* Convert MYSQL_TIME value to integer in YYYYMMDD format */ - -ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *my_time) -{ - return (ulonglong) (my_time->year * 10000UL + my_time->month * 100UL + - my_time->day); -} - - -/* - Convert MYSQL_TIME value to integer in HHMMSS format. - This function doesn't take into account time->day member: - it's assumed that days have been converted to hours already. -*/ - -ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *my_time) -{ - return (ulonglong) (my_time->hour * 10000UL + - my_time->minute * 100UL + - my_time->second); -} - - -/* - Convert struct MYSQL_TIME (date and time split into year/month/day/hour/... - to a number in format YYYYMMDDHHMMSS (DATETIME), - YYYYMMDD (DATE) or HHMMSS (TIME). - - SYNOPSIS - TIME_to_ulonglong() - - DESCRIPTION - The function is used when we need to convert value of time item - to a number if it's used in numeric context, i. e.: - SELECT NOW()+1, CURDATE()+0, CURTIMIE()+0; - SELECT ?+1; - - NOTE - This function doesn't check that given MYSQL_TIME structure members are - in valid range. If they are not, return value won't reflect any - valid date either. -*/ - -ulonglong TIME_to_ulonglong(const MYSQL_TIME *my_time) -{ - switch (my_time->time_type) { - case MYSQL_TIMESTAMP_DATETIME: - return TIME_to_ulonglong_datetime(my_time); - case MYSQL_TIMESTAMP_DATE: - return TIME_to_ulonglong_date(my_time); - case MYSQL_TIMESTAMP_TIME: - return TIME_to_ulonglong_time(my_time); - case MYSQL_TIMESTAMP_NONE: - case MYSQL_TIMESTAMP_ERROR: - return 0ULL; - default: - DBUG_ASSERT(0); - } - return 0; -} - diff --git a/externals/mysql/libmysql/net_serv.c b/externals/mysql/libmysql/net_serv.c deleted file mode 100644 index 7dd224b20e..0000000000 --- a/externals/mysql/libmysql/net_serv.c +++ /dev/null @@ -1,1177 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/** - @file - - This file is the net layer API for the MySQL client/server protocol, - which is a tightly coupled, proprietary protocol owned by MySQL AB. - @note - Any re-implementations of this protocol must also be under GPL - unless one has got an license from MySQL AB stating otherwise. - - Write and read of logical packets to/from socket. - - Writes are cached into net_buffer_length big packets. - Read packets are reallocated dynamicly when reading big packets. - Each logical packet has the following pre-info: - 3 byte length & 1 byte package-number. - - This file needs to be written in C as it's used by the libmysql client as a - C file. -*/ - -/* - HFTODO this must be hidden if we don't want client capabilities in - embedded library - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef __NETWARE__ -#include -#endif - -#ifdef EMBEDDED_LIBRARY -#undef MYSQL_SERVER -#undef MYSQL_CLIENT -#define MYSQL_CLIENT -#endif /*EMBEDDED_LIBRARY */ - -#ifdef HAVE_DTRACE -/* Limit DTrace probes to server code for now */ -#ifndef MYSQL_SERVER -#undef _DTRACE_VERSION -#endif -#endif -#include "probes.h" - -/* - The following handles the differences when this is linked between the - client and the server. - - This gives an error if a too big packet is found - The server can change this with the -O switch, but because the client - can't normally do this the client should have a bigger max_allowed_packet. -*/ - -#if defined(__WIN__) || !defined(MYSQL_SERVER) - /* The following is because alarms doesn't work on windows. */ -#define NO_ALARM -#endif - -#ifndef NO_ALARM -#include "my_pthread.h" -void sql_print_error(const char *format,...); -#else -#define DONT_USE_THR_ALARM -#endif /* NO_ALARM */ - -#include "thr_alarm.h" - -#ifdef MYSQL_SERVER -/* - The following variables/functions should really not be declared - extern, but as it's hard to include mysql_priv.h here, we have to - live with this for a while. -*/ -extern uint test_flags; -extern ulong bytes_sent, bytes_received, net_big_packet_count; -#ifndef MYSQL_INSTANCE_MANAGER -#ifdef HAVE_QUERY_CACHE -#define USE_QUERY_CACHE -extern void query_cache_insert(const char *packet, ulong length, - unsigned pkt_nr); -#endif // HAVE_QUERY_CACHE -#define update_statistics(A) A -#endif /* MYSQL_INSTANCE_MANGER */ -#endif /* defined(MYSQL_SERVER) && !defined(MYSQL_INSTANCE_MANAGER) */ - -#if !defined(MYSQL_SERVER) || defined(MYSQL_INSTANCE_MANAGER) -#define update_statistics(A) -#define thd_increment_bytes_sent(N) -#endif - -#define TEST_BLOCKING 8 -#define MAX_PACKET_LENGTH (256L*256L*256L-1) - -static my_bool net_write_buff(NET *net,const uchar *packet,ulong len); - - -/** Init with packet info. */ - -my_bool my_net_init(NET *net, Vio* vio) -{ - DBUG_ENTER("my_net_init"); - net->vio = vio; - my_net_local_init(net); /* Set some limits */ - if (!(net->buff=(uchar*) my_malloc((size_t) net->max_packet+ - NET_HEADER_SIZE + COMP_HEADER_SIZE, - MYF(MY_WME)))) - DBUG_RETURN(1); - net->buff_end=net->buff+net->max_packet; - net->error=0; net->return_status=0; - net->pkt_nr=net->compress_pkt_nr=0; - net->write_pos=net->read_pos = net->buff; - net->last_error[0]=0; - net->compress=0; net->reading_or_writing=0; - net->where_b = net->remain_in_buf=0; - net->last_errno=0; - net->unused= 0; - - if (vio != 0) /* If real connection */ - { - net->fd = vio_fd(vio); /* For perl DBI/DBD */ -#if defined(MYSQL_SERVER) && !defined(__WIN__) - if (!(test_flags & TEST_BLOCKING)) - { - my_bool old_mode; - vio_blocking(vio, FALSE, &old_mode); - } -#endif - vio_fastsend(vio); - } - DBUG_RETURN(0); -} - - -void net_end(NET *net) -{ - DBUG_ENTER("net_end"); - my_free(net->buff,MYF(MY_ALLOW_ZERO_PTR)); - net->buff=0; - DBUG_VOID_RETURN; -} - - -/** Realloc the packet buffer. */ - -my_bool net_realloc(NET *net, size_t length) -{ - uchar *buff; - size_t pkt_length; - DBUG_ENTER("net_realloc"); - DBUG_PRINT("enter",("length: %lu", (ulong) length)); - - if (length >= net->max_packet_size) - { - DBUG_PRINT("error", ("Packet too large. Max size: %lu", - net->max_packet_size)); - /* @todo: 1 and 2 codes are identical. */ - net->error= 1; - net->last_errno= ER_NET_PACKET_TOO_LARGE; -#ifdef MYSQL_SERVER - my_error(ER_NET_PACKET_TOO_LARGE, MYF(0)); -#endif - DBUG_RETURN(1); - } - pkt_length = (length+IO_SIZE-1) & ~(IO_SIZE-1); - /* - We must allocate some extra bytes for the end 0 and to be able to - read big compressed blocks - */ - if (!(buff= (uchar*) my_realloc((char*) net->buff, pkt_length + - NET_HEADER_SIZE + COMP_HEADER_SIZE, - MYF(MY_WME)))) - { - /* @todo: 1 and 2 codes are identical. */ - net->error= 1; - net->last_errno= ER_OUT_OF_RESOURCES; - /* In the server the error is reported by MY_WME flag. */ - DBUG_RETURN(1); - } - net->buff=net->write_pos=buff; - net->buff_end=buff+(net->max_packet= (ulong) pkt_length); - DBUG_RETURN(0); -} - - -/** - Check if there is any data to be read from the socket. - - @param sd socket descriptor - - @retval - 0 No data to read - @retval - 1 Data or EOF to read - @retval - -1 Don't know if data is ready or not -*/ - -#if !defined(EMBEDDED_LIBRARY) - -static int net_data_is_ready(my_socket sd) -{ -#ifdef HAVE_POLL - struct pollfd ufds; - int res; - - ufds.fd= sd; - ufds.events= POLLIN | POLLPRI; - if (!(res= poll(&ufds, 1, 0))) - return 0; - if (res < 0 || !(ufds.revents & (POLLIN | POLLPRI))) - return 0; - return 1; -#else - fd_set sfds; - struct timeval tv; - int res; - -#ifndef __WIN__ - /* Windows uses an _array_ of 64 fd's as default, so it's safe */ - if (sd >= FD_SETSIZE) - return -1; -#define NET_DATA_IS_READY_CAN_RETURN_MINUS_ONE -#endif - - FD_ZERO(&sfds); - FD_SET(sd, &sfds); - - tv.tv_sec= tv.tv_usec= 0; - - if ((res= select(sd+1, &sfds, NULL, NULL, &tv)) < 0) - return 0; - else - return test(res ? FD_ISSET(sd, &sfds) : 0); -#endif /* HAVE_POLL */ -} - -#endif /* EMBEDDED_LIBRARY */ - -/** - Remove unwanted characters from connection - and check if disconnected. - - Read from socket until there is nothing more to read. Discard - what is read. - - If there is anything when to read 'net_clear' is called this - normally indicates an error in the protocol. - - When connection is properly closed (for TCP it means with - a FIN packet), then select() considers a socket "ready to read", - in the sense that there's EOF to read, but read() returns 0. - - @param net NET handler - @param clear_buffer if <> 0, then clear all data from comm buff -*/ - -void net_clear(NET *net, my_bool clear_buffer) -{ -#if !defined(EMBEDDED_LIBRARY) - size_t count; - int ready; -#endif - DBUG_ENTER("net_clear"); - -#if !defined(EMBEDDED_LIBRARY) - if (clear_buffer) - { - while ((ready= net_data_is_ready(net->vio->sd)) > 0) - { - /* The socket is ready */ - if ((long) (count= vio_read(net->vio, net->buff, - (size_t) net->max_packet)) > 0) - { - DBUG_PRINT("info",("skipped %ld bytes from file: %s", - (long) count, vio_description(net->vio))); -#if defined(EXTRA_DEBUG) - fprintf(stderr,"Note: net_clear() skipped %ld bytes from file: %s\n", - (long) count, vio_description(net->vio)); -#endif - } - else - { - DBUG_PRINT("info",("socket ready but only EOF to read - disconnected")); - net->error= 2; - break; - } - } -#ifdef NET_DATA_IS_READY_CAN_RETURN_MINUS_ONE - /* 'net_data_is_ready' returned "don't know" */ - if (ready == -1) - { - /* Read unblocking to clear net */ - my_bool old_mode; - if (!vio_blocking(net->vio, FALSE, &old_mode)) - { - while ((long) (count= vio_read(net->vio, net->buff, - (size_t) net->max_packet)) > 0) - DBUG_PRINT("info",("skipped %ld bytes from file: %s", - (long) count, vio_description(net->vio))); - vio_blocking(net->vio, TRUE, &old_mode); - } - } -#endif /* NET_DATA_IS_READY_CAN_RETURN_MINUS_ONE */ - } -#endif /* EMBEDDED_LIBRARY */ - net->pkt_nr=net->compress_pkt_nr=0; /* Ready for new command */ - net->write_pos=net->buff; - DBUG_VOID_RETURN; -} - - -/** Flush write_buffer if not empty. */ - -my_bool net_flush(NET *net) -{ - my_bool error= 0; - DBUG_ENTER("net_flush"); - if (net->buff != net->write_pos) - { - error=test(net_real_write(net, net->buff, - (size_t) (net->write_pos - net->buff))); - net->write_pos=net->buff; - } - /* Sync packet number if using compression */ - if (net->compress) - net->pkt_nr=net->compress_pkt_nr; - DBUG_RETURN(error); -} - - -/***************************************************************************** -** Write something to server/client buffer -*****************************************************************************/ - -/** - Write a logical packet with packet header. - - Format: Packet length (3 bytes), packet number(1 byte) - When compression is used a 3 byte compression length is added - - @note - If compression is used the original package is modified! -*/ - -my_bool -my_net_write(NET *net,const uchar *packet,size_t len) -{ - uchar buff[NET_HEADER_SIZE]; - my_bool rc; - if (unlikely(!net->vio)) /* nowhere to write */ - return 0; - - MYSQL_NET_WRITE_START(len); - - /* - Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH - length. The last packet is always a packet that is < MAX_PACKET_LENGTH. - (The last packet may even have a length of 0) - */ - while (len >= MAX_PACKET_LENGTH) - { - const ulong z_size = MAX_PACKET_LENGTH; - int3store(buff, z_size); - buff[3]= (uchar) net->pkt_nr++; - if (net_write_buff(net, buff, NET_HEADER_SIZE) || - net_write_buff(net, packet, z_size)) - { - MYSQL_NET_WRITE_DONE(1); - return 1; - } - packet += z_size; - len-= z_size; - } - /* Write last packet */ - int3store(buff,len); - buff[3]= (uchar) net->pkt_nr++; - if (net_write_buff(net, buff, NET_HEADER_SIZE)) - { - MYSQL_NET_WRITE_DONE(1); - return 1; - } -#ifndef DEBUG_DATA_PACKETS - DBUG_DUMP("packet_header", buff, NET_HEADER_SIZE); -#endif - rc= test(net_write_buff(net,packet,len)); - MYSQL_NET_WRITE_DONE(rc); - return rc; -} - -/** - Send a command to the server. - - The reason for having both header and packet is so that libmysql - can easy add a header to a special command (like prepared statements) - without having to re-alloc the string. - - As the command is part of the first data packet, we have to do some data - juggling to put the command in there, without having to create a new - packet. - - This function will split big packets into sub-packets if needed. - (Each sub packet can only be 2^24 bytes) - - @param net NET handler - @param command Command in MySQL server (enum enum_server_command) - @param header Header to write after command - @param head_len Length of header - @param packet Query or parameter to query - @param len Length of packet - - @retval - 0 ok - @retval - 1 error -*/ - -my_bool -net_write_command(NET *net,uchar command, - const uchar *header, size_t head_len, - const uchar *packet, size_t len) -{ - ulong length=len+1+head_len; /* 1 extra byte for command */ - uchar buff[NET_HEADER_SIZE+1]; - uint header_size=NET_HEADER_SIZE+1; - my_bool rc; - DBUG_ENTER("net_write_command"); - DBUG_PRINT("enter",("length: %lu", (ulong) len)); - - MYSQL_NET_WRITE_START(length); - - buff[4]=command; /* For first packet */ - - if (length >= MAX_PACKET_LENGTH) - { - /* Take into account that we have the command in the first header */ - len= MAX_PACKET_LENGTH - 1 - head_len; - do - { - int3store(buff, MAX_PACKET_LENGTH); - buff[3]= (uchar) net->pkt_nr++; - if (net_write_buff(net, buff, header_size) || - net_write_buff(net, header, head_len) || - net_write_buff(net, packet, len)) - { - MYSQL_NET_WRITE_DONE(1); - DBUG_RETURN(1); - } - packet+= len; - length-= MAX_PACKET_LENGTH; - len= MAX_PACKET_LENGTH; - head_len= 0; - header_size= NET_HEADER_SIZE; - } while (length >= MAX_PACKET_LENGTH); - len=length; /* Data left to be written */ - } - int3store(buff,length); - buff[3]= (uchar) net->pkt_nr++; - rc= test(net_write_buff(net, buff, header_size) || - (head_len && net_write_buff(net, header, head_len)) || - net_write_buff(net, packet, len) || net_flush(net)); - MYSQL_NET_WRITE_DONE(rc); - DBUG_RETURN(rc); -} - -/** - Caching the data in a local buffer before sending it. - - Fill up net->buffer and send it to the client when full. - - If the rest of the to-be-sent-packet is bigger than buffer, - send it in one big block (to avoid copying to internal buffer). - If not, copy the rest of the data to the buffer and return without - sending data. - - @param net Network handler - @param packet Packet to send - @param len Length of packet - - @note - The cached buffer can be sent as it is with 'net_flush()'. - In this code we have to be careful to not send a packet longer than - MAX_PACKET_LENGTH to net_real_write() if we are using the compressed - protocol as we store the length of the compressed packet in 3 bytes. - - @retval - 0 ok - @retval - 1 -*/ - -static my_bool -net_write_buff(NET *net, const uchar *packet, ulong len) -{ - ulong left_length; - if (net->compress && net->max_packet > MAX_PACKET_LENGTH) - left_length= MAX_PACKET_LENGTH - (net->write_pos - net->buff); - else - left_length= (ulong) (net->buff_end - net->write_pos); - -#ifdef DEBUG_DATA_PACKETS - DBUG_DUMP("data", packet, len); -#endif - if (len > left_length) - { - if (net->write_pos != net->buff) - { - /* Fill up already used packet and write it */ - memcpy((char*) net->write_pos,packet,left_length); - if (net_real_write(net, net->buff, - (size_t) (net->write_pos - net->buff) + left_length)) - return 1; - net->write_pos= net->buff; - packet+= left_length; - len-= left_length; - } - if (net->compress) - { - /* - We can't have bigger packets than 16M with compression - Because the uncompressed length is stored in 3 bytes - */ - left_length= MAX_PACKET_LENGTH; - while (len > left_length) - { - if (net_real_write(net, packet, left_length)) - return 1; - packet+= left_length; - len-= left_length; - } - } - if (len > net->max_packet) - return net_real_write(net, packet, len) ? 1 : 0; - /* Send out rest of the blocks as full sized blocks */ - } - memcpy((char*) net->write_pos,packet,len); - net->write_pos+= len; - return 0; -} - - -/** - Read and write one packet using timeouts. - If needed, the packet is compressed before sending. - - @todo - - TODO is it needed to set this variable if we have no socket -*/ - -int -net_real_write(NET *net,const uchar *packet, size_t len) -{ - size_t length; - const uchar *pos,*end; - thr_alarm_t alarmed; -#ifndef NO_ALARM - ALARM alarm_buff; -#endif - uint retry_count=0; - my_bool net_blocking = vio_is_blocking(net->vio); - DBUG_ENTER("net_real_write"); - -#if defined(MYSQL_SERVER) && defined(USE_QUERY_CACHE) - query_cache_insert((char*) packet, len, net->pkt_nr); -#endif - - if (net->error == 2) - DBUG_RETURN(-1); /* socket can't be used */ - - net->reading_or_writing=2; -#ifdef HAVE_COMPRESS - if (net->compress) - { - size_t complen; - uchar *b; - uint header_length=NET_HEADER_SIZE+COMP_HEADER_SIZE; - if (!(b= (uchar*) my_malloc(len + NET_HEADER_SIZE + - COMP_HEADER_SIZE, MYF(MY_WME)))) - { - net->error= 2; - net->last_errno= ER_OUT_OF_RESOURCES; - /* In the server, the error is reported by MY_WME flag. */ - net->reading_or_writing= 0; - DBUG_RETURN(1); - } - memcpy(b+header_length,packet,len); - - if (my_compress(b+header_length, &len, &complen)) - complen=0; - int3store(&b[NET_HEADER_SIZE],complen); - int3store(b,len); - b[3]=(uchar) (net->compress_pkt_nr++); - len+= header_length; - packet= b; - } -#endif /* HAVE_COMPRESS */ - -#ifdef DEBUG_DATA_PACKETS - DBUG_DUMP("data", packet, len); -#endif - -#ifndef NO_ALARM - thr_alarm_init(&alarmed); - if (net_blocking) - thr_alarm(&alarmed, net->write_timeout, &alarm_buff); -#else - alarmed=0; - /* Write timeout is set in my_net_set_write_timeout */ -#endif /* NO_ALARM */ - - pos= packet; - end=pos+len; - while (pos != end) - { - if ((long) (length= vio_write(net->vio,pos,(size_t) (end-pos))) <= 0) - { - my_bool interrupted = vio_should_retry(net->vio); -#if !defined(__WIN__) - if ((interrupted || length == 0) && !thr_alarm_in_use(&alarmed)) - { - if (!thr_alarm(&alarmed, net->write_timeout, &alarm_buff)) - { /* Always true for client */ - my_bool old_mode; - while (vio_blocking(net->vio, TRUE, &old_mode) < 0) - { - if (vio_should_retry(net->vio) && retry_count++ < net->retry_count) - continue; -#ifdef EXTRA_DEBUG - fprintf(stderr, - "%s: my_net_write: fcntl returned error %d, aborting thread\n", - my_progname,vio_errno(net->vio)); -#endif /* EXTRA_DEBUG */ - net->error= 2; /* Close socket */ - net->last_errno= ER_NET_PACKET_TOO_LARGE; -#ifdef MYSQL_SERVER - my_error(ER_NET_PACKET_TOO_LARGE, MYF(0)); -#endif - goto end; - } - retry_count=0; - continue; - } - } - else -#endif /* !defined(__WIN__) */ - if (thr_alarm_in_use(&alarmed) && !thr_got_alarm(&alarmed) && - interrupted) - { - if (retry_count++ < net->retry_count) - continue; -#ifdef EXTRA_DEBUG - fprintf(stderr, "%s: write looped, aborting thread\n", - my_progname); -#endif /* EXTRA_DEBUG */ - } -#if defined(THREAD_SAFE_CLIENT) && !defined(MYSQL_SERVER) - if (vio_errno(net->vio) == SOCKET_EINTR) - { - DBUG_PRINT("warning",("Interrupted write. Retrying...")); - continue; - } -#endif /* defined(THREAD_SAFE_CLIENT) && !defined(MYSQL_SERVER) */ - net->error= 2; /* Close socket */ - net->last_errno= (interrupted ? ER_NET_WRITE_INTERRUPTED : - ER_NET_ERROR_ON_WRITE); -#ifdef MYSQL_SERVER - my_error(net->last_errno, MYF(0)); -#endif /* MYSQL_SERVER */ - break; - } - pos+=length; - update_statistics(thd_increment_bytes_sent(length)); - } -#ifndef __WIN__ - end: -#endif -#ifdef HAVE_COMPRESS - if (net->compress) - my_free((char*) packet,MYF(0)); -#endif - if (thr_alarm_in_use(&alarmed)) - { - my_bool old_mode; - thr_end_alarm(&alarmed); - vio_blocking(net->vio, net_blocking, &old_mode); - } - net->reading_or_writing=0; - DBUG_RETURN(((int) (pos != end))); -} - - -/***************************************************************************** -** Read something from server/clinet -*****************************************************************************/ - -#ifndef NO_ALARM - -static my_bool net_safe_read(NET *net, uchar *buff, size_t length, - thr_alarm_t *alarmed) -{ - uint retry_count=0; - while (length > 0) - { - size_t tmp; - if ((long) (tmp= vio_read(net->vio, buff, length)) <= 0) - { - my_bool interrupted = vio_should_retry(net->vio); - if (!thr_got_alarm(alarmed) && interrupted) - { /* Probably in MIT threads */ - if (retry_count++ < net->retry_count) - continue; - } - return 1; - } - length-= tmp; - buff+= tmp; - } - return 0; -} - -/** - Help function to clear the commuication buffer when we get a too big packet. - - @param net Communication handle - @param remain Bytes to read - @param alarmed Parameter for thr_alarm() - @param alarm_buff Parameter for thr_alarm() - - @retval - 0 Was able to read the whole packet - @retval - 1 Got mailformed packet from client -*/ - -static my_bool my_net_skip_rest(NET *net, uint32 remain, thr_alarm_t *alarmed, - ALARM *alarm_buff) -{ - uint32 old=remain; - DBUG_ENTER("my_net_skip_rest"); - DBUG_PRINT("enter",("bytes_to_skip: %u", (uint) remain)); - - /* The following is good for debugging */ - update_statistics(thd_increment_net_big_packet_count(1)); - - if (!thr_alarm_in_use(alarmed)) - { - my_bool old_mode; - if (thr_alarm(alarmed,net->read_timeout, alarm_buff) || - vio_blocking(net->vio, TRUE, &old_mode) < 0) - DBUG_RETURN(1); /* Can't setup, abort */ - } - for (;;) - { - while (remain > 0) - { - size_t length= min(remain, net->max_packet); - if (net_safe_read(net, net->buff, length, alarmed)) - DBUG_RETURN(1); - update_statistics(thd_increment_bytes_received(length)); - remain -= (uint32) length; - } - if (old != MAX_PACKET_LENGTH) - break; - if (net_safe_read(net, net->buff, NET_HEADER_SIZE, alarmed)) - DBUG_RETURN(1); - old=remain= uint3korr(net->buff); - net->pkt_nr++; - } - DBUG_RETURN(0); -} -#endif /* NO_ALARM */ - - -/** - Reads one packet to net->buff + net->where_b. - Long packets are handled by my_net_read(). - This function reallocates the net->buff buffer if necessary. - - @return - Returns length of packet. -*/ - -static ulong -my_real_read(NET *net, size_t *complen) -{ - uchar *pos; - size_t length; - uint i,retry_count=0; - ulong len=packet_error; - thr_alarm_t alarmed; -#ifndef NO_ALARM - ALARM alarm_buff; -#endif - my_bool net_blocking=vio_is_blocking(net->vio); - uint32 remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE : - NET_HEADER_SIZE); - *complen = 0; - - net->reading_or_writing=1; - thr_alarm_init(&alarmed); -#ifndef NO_ALARM - if (net_blocking) - thr_alarm(&alarmed,net->read_timeout,&alarm_buff); -#else - /* Read timeout is set in my_net_set_read_timeout */ -#endif /* NO_ALARM */ - - pos = net->buff + net->where_b; /* net->packet -4 */ - for (i=0 ; i < 2 ; i++) - { - while (remain > 0) - { - /* First read is done with non blocking mode */ - if ((long) (length= vio_read(net->vio, pos, remain)) <= 0L) - { - my_bool interrupted = vio_should_retry(net->vio); - - DBUG_PRINT("info",("vio_read returned %ld errno: %d", - (long) length, vio_errno(net->vio))); -#if !defined(__WIN__) || defined(MYSQL_SERVER) - /* - We got an error that there was no data on the socket. We now set up - an alarm to not 'read forever', change the socket to non blocking - mode and try again - */ - if ((interrupted || length == 0) && !thr_alarm_in_use(&alarmed)) - { - if (!thr_alarm(&alarmed,net->read_timeout,&alarm_buff)) /* Don't wait too long */ - { - my_bool old_mode; - while (vio_blocking(net->vio, TRUE, &old_mode) < 0) - { - if (vio_should_retry(net->vio) && - retry_count++ < net->retry_count) - continue; - DBUG_PRINT("error", - ("fcntl returned error %d, aborting thread", - vio_errno(net->vio))); -#ifdef EXTRA_DEBUG - fprintf(stderr, - "%s: read: fcntl returned error %d, aborting thread\n", - my_progname,vio_errno(net->vio)); -#endif /* EXTRA_DEBUG */ - len= packet_error; - net->error= 2; /* Close socket */ - net->last_errno= ER_NET_FCNTL_ERROR; -#ifdef MYSQL_SERVER - my_error(ER_NET_FCNTL_ERROR, MYF(0)); -#endif - goto end; - } - retry_count=0; - continue; - } - } -#endif /* (!defined(__WIN__) || defined(MYSQL_SERVER) */ - if (thr_alarm_in_use(&alarmed) && !thr_got_alarm(&alarmed) && - interrupted) - { /* Probably in MIT threads */ - if (retry_count++ < net->retry_count) - continue; -#ifdef EXTRA_DEBUG - fprintf(stderr, "%s: read looped with error %d, aborting thread\n", - my_progname,vio_errno(net->vio)); -#endif /* EXTRA_DEBUG */ - } -#if defined(THREAD_SAFE_CLIENT) && !defined(MYSQL_SERVER) - if (vio_errno(net->vio) == SOCKET_EINTR) - { - DBUG_PRINT("warning",("Interrupted read. Retrying...")); - continue; - } -#endif - DBUG_PRINT("error",("Couldn't read packet: remain: %u errno: %d length: %ld", - remain, vio_errno(net->vio), (long) length)); - len= packet_error; - net->error= 2; /* Close socket */ - net->last_errno= (vio_was_interrupted(net->vio) ? - ER_NET_READ_INTERRUPTED : - ER_NET_READ_ERROR); -#ifdef MYSQL_SERVER - my_error(net->last_errno, MYF(0)); -#endif - goto end; - } - remain -= (uint32) length; - pos+= length; - update_statistics(thd_increment_bytes_received(length)); - } - if (i == 0) - { /* First parts is packet length */ - ulong helping; - DBUG_DUMP("packet_header", net->buff+net->where_b, - NET_HEADER_SIZE); - if (net->buff[net->where_b + 3] != (uchar) net->pkt_nr) - { - if (net->buff[net->where_b] != (uchar) 255) - { - DBUG_PRINT("error", - ("Packets out of order (Found: %d, expected %u)", - (int) net->buff[net->where_b + 3], - net->pkt_nr)); -#ifdef EXTRA_DEBUG - fflush(stdout); - fprintf(stderr,"Error: Packets out of order (Found: %d, expected %d)\n", - (int) net->buff[net->where_b + 3], - (uint) (uchar) net->pkt_nr); - fflush(stderr); - DBUG_ASSERT(0); -#endif - } - len= packet_error; - /* Not a NET error on the client. XXX: why? */ -#ifdef MYSQL_SERVER - my_error(ER_NET_PACKETS_OUT_OF_ORDER, MYF(0)); -#endif - goto end; - } - net->compress_pkt_nr= ++net->pkt_nr; -#ifdef HAVE_COMPRESS - if (net->compress) - { - /* - If the packet is compressed then complen > 0 and contains the - number of bytes in the uncompressed packet - */ - *complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE])); - } -#endif - - len=uint3korr(net->buff+net->where_b); - if (!len) /* End of big multi-packet */ - goto end; - helping = max(len,*complen) + net->where_b; - /* The necessary size of net->buff */ - if (helping >= net->max_packet) - { - if (net_realloc(net,helping)) - { -#if defined(MYSQL_SERVER) && !defined(NO_ALARM) - if (!net->compress && - !my_net_skip_rest(net, (uint32) len, &alarmed, &alarm_buff)) - net->error= 3; /* Successfully skiped packet */ -#endif - len= packet_error; /* Return error and close connection */ - goto end; - } - } - pos=net->buff + net->where_b; - remain = (uint32) len; - } - } - -end: - if (thr_alarm_in_use(&alarmed)) - { - my_bool old_mode; - thr_end_alarm(&alarmed); - vio_blocking(net->vio, net_blocking, &old_mode); - } - net->reading_or_writing=0; -#ifdef DEBUG_DATA_PACKETS - if (len != packet_error) - DBUG_DUMP("data", net->buff+net->where_b, len); -#endif - return(len); -} - - -/** - Read a packet from the client/server and return it without the internal - package header. - - If the packet is the first packet of a multi-packet packet - (which is indicated by the length of the packet = 0xffffff) then - all sub packets are read and concatenated. - - If the packet was compressed, its uncompressed and the length of the - uncompressed packet is returned. - - @return - The function returns the length of the found packet or packet_error. - net->read_pos points to the read data. -*/ - -ulong -my_net_read(NET *net) -{ - size_t len, complen; - - MYSQL_NET_READ_START(); - -#ifdef HAVE_COMPRESS - if (!net->compress) - { -#endif - len = my_real_read(net,&complen); - if (len == MAX_PACKET_LENGTH) - { - /* First packet of a multi-packet. Concatenate the packets */ - ulong save_pos = net->where_b; - size_t total_length= 0; - do - { - net->where_b += len; - total_length += len; - len = my_real_read(net,&complen); - } while (len == MAX_PACKET_LENGTH); - if (len != packet_error) - len+= total_length; - net->where_b = save_pos; - } - net->read_pos = net->buff + net->where_b; - if (len != packet_error) - net->read_pos[len]=0; /* Safeguard for mysql_use_result */ - MYSQL_NET_READ_DONE(0, len); - return len; -#ifdef HAVE_COMPRESS - } - else - { - /* We are using the compressed protocol */ - - ulong buf_length; - ulong start_of_packet; - ulong first_packet_offset; - uint read_length, multi_byte_packet=0; - - if (net->remain_in_buf) - { - buf_length= net->buf_length; /* Data left in old packet */ - first_packet_offset= start_of_packet= (net->buf_length - - net->remain_in_buf); - /* Restore the character that was overwritten by the end 0 */ - net->buff[start_of_packet]= net->save_char; - } - else - { - /* reuse buffer, as there is nothing in it that we need */ - buf_length= start_of_packet= first_packet_offset= 0; - } - for (;;) - { - ulong packet_len; - - if (buf_length - start_of_packet >= NET_HEADER_SIZE) - { - read_length = uint3korr(net->buff+start_of_packet); - if (!read_length) - { - /* End of multi-byte packet */ - start_of_packet += NET_HEADER_SIZE; - break; - } - if (read_length + NET_HEADER_SIZE <= buf_length - start_of_packet) - { - if (multi_byte_packet) - { - /* Remove packet header for second packet */ - memmove(net->buff + first_packet_offset + start_of_packet, - net->buff + first_packet_offset + start_of_packet + - NET_HEADER_SIZE, - buf_length - start_of_packet); - start_of_packet += read_length; - buf_length -= NET_HEADER_SIZE; - } - else - start_of_packet+= read_length + NET_HEADER_SIZE; - - if (read_length != MAX_PACKET_LENGTH) /* last package */ - { - multi_byte_packet= 0; /* No last zero len packet */ - break; - } - multi_byte_packet= NET_HEADER_SIZE; - /* Move data down to read next data packet after current one */ - if (first_packet_offset) - { - memmove(net->buff,net->buff+first_packet_offset, - buf_length-first_packet_offset); - buf_length-=first_packet_offset; - start_of_packet -= first_packet_offset; - first_packet_offset=0; - } - continue; - } - } - /* Move data down to read next data packet after current one */ - if (first_packet_offset) - { - memmove(net->buff,net->buff+first_packet_offset, - buf_length-first_packet_offset); - buf_length-=first_packet_offset; - start_of_packet -= first_packet_offset; - first_packet_offset=0; - } - - net->where_b=buf_length; - if ((packet_len = my_real_read(net,&complen)) == packet_error) - { - MYSQL_NET_READ_DONE(1, 0); - return packet_error; - } - if (my_uncompress(net->buff + net->where_b, packet_len, - &complen)) - { - net->error= 2; /* caller will close socket */ - net->last_errno= ER_NET_UNCOMPRESS_ERROR; -#ifdef MYSQL_SERVER - my_error(ER_NET_UNCOMPRESS_ERROR, MYF(0)); -#endif - MYSQL_NET_READ_DONE(1, 0); - return packet_error; - } - buf_length+= complen; - } - - net->read_pos= net->buff+ first_packet_offset + NET_HEADER_SIZE; - net->buf_length= buf_length; - net->remain_in_buf= (ulong) (buf_length - start_of_packet); - len = ((ulong) (start_of_packet - first_packet_offset) - NET_HEADER_SIZE - - multi_byte_packet); - net->save_char= net->read_pos[len]; /* Must be saved */ - net->read_pos[len]=0; /* Safeguard for mysql_use_result */ - } -#endif /* HAVE_COMPRESS */ - MYSQL_NET_READ_DONE(0, len); - return len; -} - - -void my_net_set_read_timeout(NET *net, uint timeout) -{ - DBUG_ENTER("my_net_set_read_timeout"); - DBUG_PRINT("enter", ("timeout: %d", timeout)); - net->read_timeout= timeout; -#ifdef NO_ALARM - if (net->vio) - vio_timeout(net->vio, 0, timeout); -#endif - DBUG_VOID_RETURN; -} - - -void my_net_set_write_timeout(NET *net, uint timeout) -{ - DBUG_ENTER("my_net_set_write_timeout"); - DBUG_PRINT("enter", ("timeout: %d", timeout)); - net->write_timeout= timeout; -#ifdef NO_ALARM - if (net->vio) - vio_timeout(net->vio, 1, timeout); -#endif - DBUG_VOID_RETURN; -} diff --git a/externals/mysql/libmysql/pack.c b/externals/mysql/libmysql/pack.c deleted file mode 100644 index 02b117fde9..0000000000 --- a/externals/mysql/libmysql/pack.c +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include - -/* Get the length of next field. Change parameter to point at fieldstart */ -ulong STDCALL net_field_length(uchar **packet) -{ - reg1 uchar *pos= (uchar *)*packet; - if (*pos < 251) - { - (*packet)++; - return (ulong) *pos; - } - if (*pos == 251) - { - (*packet)++; - return NULL_LENGTH; - } - if (*pos == 252) - { - (*packet)+=3; - return (ulong) uint2korr(pos+1); - } - if (*pos == 253) - { - (*packet)+=4; - return (ulong) uint3korr(pos+1); - } - (*packet)+=9; /* Must be 254 when here */ - return (ulong) uint4korr(pos+1); -} - -/* The same as above but returns longlong */ -my_ulonglong net_field_length_ll(uchar **packet) -{ - reg1 uchar *pos= *packet; - if (*pos < 251) - { - (*packet)++; - return (my_ulonglong) *pos; - } - if (*pos == 251) - { - (*packet)++; - return (my_ulonglong) NULL_LENGTH; - } - if (*pos == 252) - { - (*packet)+=3; - return (my_ulonglong) uint2korr(pos+1); - } - if (*pos == 253) - { - (*packet)+=4; - return (my_ulonglong) uint3korr(pos+1); - } - (*packet)+=9; /* Must be 254 when here */ -#ifdef NO_CLIENT_LONGLONG - return (my_ulonglong) uint4korr(pos+1); -#else - return (my_ulonglong) uint8korr(pos+1); -#endif -} - -/* - Store an integer with simple packing into a output package - - SYNOPSIS - net_store_length() - pkg Store the packed integer here - length integers to store - - NOTES - This is mostly used to store lengths of strings. - - RETURN - Position in 'pkg' after the packed length -*/ - -uchar *net_store_length(uchar *packet, ulonglong length) -{ - if (length < 251ULL) - { - *packet=(uchar) length; - return packet+1; - } - /* 251 is reserved for NULL */ - if (length < 65536ULL) - { - *packet++=252; - int2store(packet,(uint) length); - return packet+2; - } - if (length < 16777216ULL) - { - *packet++=253; - int3store(packet,(ulong) length); - return packet+3; - } - *packet++=254; - int8store(packet,length); - return packet+8; -} - diff --git a/externals/mysql/libmysql/password.c b/externals/mysql/libmysql/password.c deleted file mode 100644 index 43430f37f9..0000000000 --- a/externals/mysql/libmysql/password.c +++ /dev/null @@ -1,496 +0,0 @@ -/* Copyright (C) 2000-2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* password checking routines */ -/***************************************************************************** - The main idea is that no password are sent between client & server on - connection and that no password are saved in mysql in a decodable form. - - On connection a random string is generated and sent to the client. - The client generates a new string with a random generator inited with - the hash values from the password and the sent string. - This 'check' string is sent to the server where it is compared with - a string generated from the stored hash_value of the password and the - random string. - - The password is saved (in user.password) by using the PASSWORD() function in - mysql. - - This is .c file because it's used in libmysqlclient, which is entirely in C. - (we need it to be portable to a variety of systems). - Example: - update user set password=PASSWORD("hello") where user="test" - This saves a hashed number as a string in the password field. - - The new authentication is performed in following manner: - - SERVER: public_seed=create_random_string() - send(public_seed) - - CLIENT: recv(public_seed) - hash_stage1=sha1("password") - hash_stage2=sha1(hash_stage1) - reply=xor(hash_stage1, sha1(public_seed,hash_stage2) - - // this three steps are done in scramble() - - send(reply) - - - SERVER: recv(reply) - hash_stage1=xor(reply, sha1(public_seed,hash_stage2)) - candidate_hash2=sha1(hash_stage1) - check(candidate_hash2==hash_stage2) - - // this three steps are done in check_scramble() - -*****************************************************************************/ - -#include -#include -#include -#include -#include "mysql.h" - -/************ MySQL 3.23-4.0 authentication routines: untouched ***********/ - -/* - New (MySQL 3.21+) random generation structure initialization - SYNOPSIS - my_rnd_init() - rand_st OUT Structure to initialize - seed1 IN First initialization parameter - seed2 IN Second initialization parameter -*/ - -/* - Generate binary hash from raw text string - Used for Pre-4.1 password handling - SYNOPSIS - hash_password() - result OUT store hash in this location - password IN plain text password to build hash - password_len IN password length (password may be not null-terminated) -*/ - -void hash_password(ulong *result, const char *password, uint password_len) -{ - register ulong nr=1345345333L, add=7, nr2=0x12345671L; - ulong tmp; - const char *password_end= password + password_len; - for (; password < password_end; password++) - { - if (*password == ' ' || *password == '\t') - continue; /* skip space in password */ - tmp= (ulong) (uchar) *password; - nr^= (((nr & 63)+add)*tmp)+ (nr << 8); - nr2+=(nr2 << 8) ^ nr; - add+=tmp; - } - result[0]=nr & (((ulong) 1L << 31) -1L); /* Don't use sign bit (str2int) */; - result[1]=nr2 & (((ulong) 1L << 31) -1L); -} - - -/* - Create password to be stored in user database from raw string - Used for pre-4.1 password handling - SYNOPSIS - make_scrambled_password_323() - to OUT store scrambled password here - password IN user-supplied password -*/ - -void make_scrambled_password_323(char *to, const char *password) -{ - ulong hash_res[2]; - hash_password(hash_res, password, (uint) strlen(password)); - sprintf(to, "%08lx%08lx", hash_res[0], hash_res[1]); -} - - -/* - Scramble string with password. - Used in pre 4.1 authentication phase. - SYNOPSIS - scramble_323() - to OUT Store scrambled message here. Buffer must be at least - SCRAMBLE_LENGTH_323+1 bytes long - message IN Message to scramble. Message must be at least - SRAMBLE_LENGTH_323 bytes long. - password IN Password to use while scrambling -*/ - -void scramble_323(char *to, const char *message, const char *password) -{ - struct my_rnd_struct rand_st; - ulong hash_pass[2], hash_message[2]; - - if (password && password[0]) - { - char extra, *to_start=to; - const char *message_end= message + SCRAMBLE_LENGTH_323; - hash_password(hash_pass,password, (uint) strlen(password)); - hash_password(hash_message, message, SCRAMBLE_LENGTH_323); - my_rnd_init(&rand_st,hash_pass[0] ^ hash_message[0], - hash_pass[1] ^ hash_message[1]); - for (; message < message_end; message++) - *to++= (char) (floor(my_rnd(&rand_st)*31)+64); - extra=(char) (floor(my_rnd(&rand_st)*31)); - while (to_start != to) - *(to_start++)^=extra; - } - *to= 0; -} - - -/* - Check scrambled message - Used in pre 4.1 password handling - SYNOPSIS - check_scramble_323() - scrambled scrambled message to check. - message original random message which was used for scrambling; must - be exactly SCRAMBLED_LENGTH_323 bytes long and - NULL-terminated. - hash_pass password which should be used for scrambling - All params are IN. - - RETURN VALUE - 0 - password correct - !0 - password invalid -*/ - -my_bool -check_scramble_323(const char *scrambled, const char *message, - ulong *hash_pass) -{ - struct my_rnd_struct rand_st; - ulong hash_message[2]; - char buff[16],*to,extra; /* Big enough for check */ - const char *pos; - - hash_password(hash_message, message, SCRAMBLE_LENGTH_323); - my_rnd_init(&rand_st,hash_pass[0] ^ hash_message[0], - hash_pass[1] ^ hash_message[1]); - to=buff; - DBUG_ASSERT(sizeof(buff) > SCRAMBLE_LENGTH_323); - for (pos=scrambled ; *pos && to < buff+sizeof(buff) ; pos++) - *to++=(char) (floor(my_rnd(&rand_st)*31)+64); - if (pos-scrambled != SCRAMBLE_LENGTH_323) - return 1; - extra=(char) (floor(my_rnd(&rand_st)*31)); - to=buff; - while (*scrambled) - { - if (*scrambled++ != (char) (*to++ ^ extra)) - return 1; /* Wrong password */ - } - return 0; -} - -static inline uint8 char_val(uint8 X) -{ - return (uint) (X >= '0' && X <= '9' ? X-'0' : - X >= 'A' && X <= 'Z' ? X-'A'+10 : X-'a'+10); -} - - -/* - Convert password from hex string (as stored in mysql.user) to binary form. - SYNOPSIS - get_salt_from_password_323() - res OUT store salt here - password IN password string as stored in mysql.user - NOTE - This function does not have length check for passwords. It will just crash - Password hashes in old format must have length divisible by 8 -*/ - -void get_salt_from_password_323(ulong *res, const char *password) -{ - res[0]= res[1]= 0; - if (password) - { - while (*password) - { - ulong val=0; - uint i; - for (i=0 ; i < 8 ; i++) - val=(val << 4)+char_val(*password++); - *res++=val; - } - } -} - - -/* - Convert scrambled password from binary form to asciiz hex string. - SYNOPSIS - make_password_from_salt_323() - to OUT store resulting string password here, at least 17 bytes - salt IN password in salt format, 2 ulongs -*/ - -void make_password_from_salt_323(char *to, const ulong *salt) -{ - sprintf(to,"%08lx%08lx", salt[0], salt[1]); -} - - -/* - **************** MySQL 4.1.1 authentication routines ************* -*/ - -/* - Generate string of printable random characters of requested length - SYNOPSIS - create_random_string() - to OUT buffer for generation; must be at least length+1 bytes - long; result string is always null-terminated - length IN how many random characters to put in buffer - rand_st INOUT structure used for number generation -*/ - -void create_random_string(char *to, uint length, - struct my_rnd_struct *rand_st) -{ - char *end= to + length; - /* Use pointer arithmetics as it is faster way to do so. */ - for (; to < end; to++) - *to= (char) (my_rnd(rand_st)*94+33); - *to= '\0'; -} - - -/* Character to use as version identifier for version 4.1 */ - -#define PVERSION41_CHAR '*' - - -/* - Convert given octet sequence to asciiz string of hex characters; - str..str+len and 'to' may not overlap. - SYNOPSIS - octet2hex() - buf OUT output buffer. Must be at least 2*len+1 bytes - str, len IN the beginning and the length of the input string - - RETURN - buf+len*2 -*/ - -char *octet2hex(char *to, const char *str, uint len) -{ - const char *str_end= str + len; - for (; str != str_end; ++str) - { - *to++= _dig_vec_upper[((uchar) *str) >> 4]; - *to++= _dig_vec_upper[((uchar) *str) & 0x0F]; - } - *to= '\0'; - return to; -} - - -/* - Convert given asciiz string of hex (0..9 a..f) characters to octet - sequence. - SYNOPSIS - hex2octet() - to OUT buffer to place result; must be at least len/2 bytes - str, len IN begin, length for character string; str and to may not - overlap; len % 2 == 0 -*/ - -static void -hex2octet(uint8 *to, const char *str, uint len) -{ - const char *str_end= str + len; - while (str < str_end) - { - register char tmp= char_val(*str++); - *to++= (tmp << 4) | char_val(*str++); - } -} - - -/* - Encrypt/Decrypt function used for password encryption in authentication. - Simple XOR is used here but it is OK as we crypt random strings. Note, - that XOR(s1, XOR(s1, s2)) == s2, XOR(s1, s2) == XOR(s2, s1) - SYNOPSIS - my_crypt() - to OUT buffer to hold crypted string; must be at least len bytes - long; to and s1 (or s2) may be the same. - s1, s2 IN input strings (of equal length) - len IN length of s1 and s2 -*/ - -static void -my_crypt(char *to, const uchar *s1, const uchar *s2, uint len) -{ - const uint8 *s1_end= s1 + len; - while (s1 < s1_end) - *to++= *s1++ ^ *s2++; -} - - -/* - MySQL 4.1.1 password hashing: SHA conversion (see RFC 2289, 3174) twice - applied to the password string, and then produced octet sequence is - converted to hex string. - The result of this function is used as return value from PASSWORD() and - is stored in the database. - SYNOPSIS - make_scrambled_password() - buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string - password IN NULL-terminated password string -*/ - -void -make_scrambled_password(char *to, const char *password) -{ - SHA1_CONTEXT sha1_context; - uint8 hash_stage2[SHA1_HASH_SIZE]; - - mysql_sha1_reset(&sha1_context); - /* stage 1: hash password */ - mysql_sha1_input(&sha1_context, (uint8 *) password, (uint) strlen(password)); - mysql_sha1_result(&sha1_context, (uint8 *) to); - /* stage 2: hash stage1 output */ - mysql_sha1_reset(&sha1_context); - mysql_sha1_input(&sha1_context, (uint8 *) to, SHA1_HASH_SIZE); - /* separate buffer is used to pass 'to' in octet2hex */ - mysql_sha1_result(&sha1_context, hash_stage2); - /* convert hash_stage2 to hex string */ - *to++= PVERSION41_CHAR; - octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE); -} - - -/* - Produce an obscure octet sequence from password and random - string, recieved from the server. This sequence corresponds to the - password, but password can not be easily restored from it. The sequence - is then sent to the server for validation. Trailing zero is not stored - in the buf as it is not needed. - This function is used by client to create authenticated reply to the - server's greeting. - SYNOPSIS - scramble() - buf OUT store scrambled string here. The buf must be at least - SHA1_HASH_SIZE bytes long. - message IN random message, must be exactly SCRAMBLE_LENGTH long and - NULL-terminated. - password IN users' password -*/ - -void -scramble(char *to, const char *message, const char *password) -{ - SHA1_CONTEXT sha1_context; - uint8 hash_stage1[SHA1_HASH_SIZE]; - uint8 hash_stage2[SHA1_HASH_SIZE]; - - mysql_sha1_reset(&sha1_context); - /* stage 1: hash password */ - mysql_sha1_input(&sha1_context, (uint8 *) password, (uint) strlen(password)); - mysql_sha1_result(&sha1_context, hash_stage1); - /* stage 2: hash stage 1; note that hash_stage2 is stored in the database */ - mysql_sha1_reset(&sha1_context); - mysql_sha1_input(&sha1_context, hash_stage1, SHA1_HASH_SIZE); - mysql_sha1_result(&sha1_context, hash_stage2); - /* create crypt string as sha1(message, hash_stage2) */; - mysql_sha1_reset(&sha1_context); - mysql_sha1_input(&sha1_context, (const uint8 *) message, SCRAMBLE_LENGTH); - mysql_sha1_input(&sha1_context, hash_stage2, SHA1_HASH_SIZE); - /* xor allows 'from' and 'to' overlap: lets take advantage of it */ - mysql_sha1_result(&sha1_context, (uint8 *) to); - my_crypt(to, (const uchar *) to, hash_stage1, SCRAMBLE_LENGTH); -} - - -/* - Check that scrambled message corresponds to the password; the function - is used by server to check that recieved reply is authentic. - This function does not check lengths of given strings: message must be - null-terminated, reply and hash_stage2 must be at least SHA1_HASH_SIZE - long (if not, something fishy is going on). - SYNOPSIS - check_scramble() - scramble clients' reply, presumably produced by scramble() - message original random string, previously sent to client - (presumably second argument of scramble()), must be - exactly SCRAMBLE_LENGTH long and NULL-terminated. - hash_stage2 hex2octet-decoded database entry - All params are IN. - - RETURN VALUE - 0 password is correct - !0 password is invalid -*/ - -my_bool -check_scramble(const char *scramble_arg, const char *message, - const uint8 *hash_stage2) -{ - SHA1_CONTEXT sha1_context; - uint8 buf[SHA1_HASH_SIZE]; - uint8 hash_stage2_reassured[SHA1_HASH_SIZE]; - - mysql_sha1_reset(&sha1_context); - /* create key to encrypt scramble */ - mysql_sha1_input(&sha1_context, (const uint8 *) message, SCRAMBLE_LENGTH); - mysql_sha1_input(&sha1_context, hash_stage2, SHA1_HASH_SIZE); - mysql_sha1_result(&sha1_context, buf); - /* encrypt scramble */ - my_crypt((char *) buf, buf, (const uchar *) scramble_arg, SCRAMBLE_LENGTH); - /* now buf supposedly contains hash_stage1: so we can get hash_stage2 */ - mysql_sha1_reset(&sha1_context); - mysql_sha1_input(&sha1_context, buf, SHA1_HASH_SIZE); - mysql_sha1_result(&sha1_context, hash_stage2_reassured); - return memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE); -} - - -/* - Convert scrambled password from asciiz hex string to binary form. - - SYNOPSIS - get_salt_from_password() - res OUT buf to hold password. Must be at least SHA1_HASH_SIZE - bytes long. - password IN 4.1.1 version value of user.password -*/ - -void get_salt_from_password(uint8 *hash_stage2, const char *password) -{ - hex2octet(hash_stage2, password+1 /* skip '*' */, SHA1_HASH_SIZE * 2); -} - -/* - Convert scrambled password from binary form to asciiz hex string. - SYNOPSIS - make_password_from_salt() - to OUT store resulting string here, 2*SHA1_HASH_SIZE+2 bytes - salt IN password in salt format -*/ - -void make_password_from_salt(char *to, const uint8 *hash_stage2) -{ - *to++= PVERSION41_CHAR; - octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE); -} diff --git a/externals/mysql/libmysql/probes.h b/externals/mysql/libmysql/probes.h deleted file mode 100644 index 2bcf627e68..0000000000 --- a/externals/mysql/libmysql/probes.h +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Generated by dtrace(1M). - */ - -#ifndef _PROBES_H -#define _PROBES_H - - - -#ifdef __cplusplus -extern "C" { -#endif - -#if _DTRACE_VERSION && defined(HAVE_DTRACE) - -#define MYSQL_COMMAND_DONE(arg0) \ - __dtrace_mysql___command__done(arg0) -#define MYSQL_COMMAND_DONE_ENABLED() \ - __dtraceenabled_mysql___command__done() -#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3) \ - __dtrace_mysql___command__start(arg0, arg1, arg2, arg3) -#define MYSQL_COMMAND_START_ENABLED() \ - __dtraceenabled_mysql___command__start() -#define MYSQL_CONNECTION_DONE(arg0, arg1) \ - __dtrace_mysql___connection__done(arg0, arg1) -#define MYSQL_CONNECTION_DONE_ENABLED() \ - __dtraceenabled_mysql___connection__done() -#define MYSQL_CONNECTION_START(arg0, arg1, arg2) \ - __dtrace_mysql___connection__start(arg0, arg1, arg2) -#define MYSQL_CONNECTION_START_ENABLED() \ - __dtraceenabled_mysql___connection__start() -#define MYSQL_DELETE_DONE(arg0, arg1) \ - __dtrace_mysql___delete__done(arg0, arg1) -#define MYSQL_DELETE_DONE_ENABLED() \ - __dtraceenabled_mysql___delete__done() -#define MYSQL_DELETE_ROW_DONE(arg0) \ - __dtrace_mysql___delete__row__done(arg0) -#define MYSQL_DELETE_ROW_DONE_ENABLED() \ - __dtraceenabled_mysql___delete__row__done() -#define MYSQL_DELETE_ROW_START(arg0, arg1) \ - __dtrace_mysql___delete__row__start(arg0, arg1) -#define MYSQL_DELETE_ROW_START_ENABLED() \ - __dtraceenabled_mysql___delete__row__start() -#define MYSQL_DELETE_START(arg0) \ - __dtrace_mysql___delete__start(arg0) -#define MYSQL_DELETE_START_ENABLED() \ - __dtraceenabled_mysql___delete__start() -#define MYSQL_FILESORT_DONE(arg0, arg1) \ - __dtrace_mysql___filesort__done(arg0, arg1) -#define MYSQL_FILESORT_DONE_ENABLED() \ - __dtraceenabled_mysql___filesort__done() -#define MYSQL_FILESORT_START(arg0, arg1) \ - __dtrace_mysql___filesort__start(arg0, arg1) -#define MYSQL_FILESORT_START_ENABLED() \ - __dtraceenabled_mysql___filesort__start() -#define MYSQL_HANDLER_RDLOCK_DONE(arg0) \ - __dtrace_mysql___handler__rdlock__done(arg0) -#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() \ - __dtraceenabled_mysql___handler__rdlock__done() -#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1) \ - __dtrace_mysql___handler__rdlock__start(arg0, arg1) -#define MYSQL_HANDLER_RDLOCK_START_ENABLED() \ - __dtraceenabled_mysql___handler__rdlock__start() -#define MYSQL_HANDLER_UNLOCK_DONE(arg0) \ - __dtrace_mysql___handler__unlock__done(arg0) -#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() \ - __dtraceenabled_mysql___handler__unlock__done() -#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1) \ - __dtrace_mysql___handler__unlock__start(arg0, arg1) -#define MYSQL_HANDLER_UNLOCK_START_ENABLED() \ - __dtraceenabled_mysql___handler__unlock__start() -#define MYSQL_HANDLER_WRLOCK_DONE(arg0) \ - __dtrace_mysql___handler__wrlock__done(arg0) -#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() \ - __dtraceenabled_mysql___handler__wrlock__done() -#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1) \ - __dtrace_mysql___handler__wrlock__start(arg0, arg1) -#define MYSQL_HANDLER_WRLOCK_START_ENABLED() \ - __dtraceenabled_mysql___handler__wrlock__start() -#define MYSQL_INSERT_DONE(arg0, arg1) \ - __dtrace_mysql___insert__done(arg0, arg1) -#define MYSQL_INSERT_DONE_ENABLED() \ - __dtraceenabled_mysql___insert__done() -#define MYSQL_INSERT_ROW_DONE(arg0) \ - __dtrace_mysql___insert__row__done(arg0) -#define MYSQL_INSERT_ROW_DONE_ENABLED() \ - __dtraceenabled_mysql___insert__row__done() -#define MYSQL_INSERT_ROW_START(arg0, arg1) \ - __dtrace_mysql___insert__row__start(arg0, arg1) -#define MYSQL_INSERT_ROW_START_ENABLED() \ - __dtraceenabled_mysql___insert__row__start() -#define MYSQL_INSERT_SELECT_DONE(arg0, arg1) \ - __dtrace_mysql___insert__select__done(arg0, arg1) -#define MYSQL_INSERT_SELECT_DONE_ENABLED() \ - __dtraceenabled_mysql___insert__select__done() -#define MYSQL_INSERT_SELECT_START(arg0) \ - __dtrace_mysql___insert__select__start(arg0) -#define MYSQL_INSERT_SELECT_START_ENABLED() \ - __dtraceenabled_mysql___insert__select__start() -#define MYSQL_INSERT_START(arg0) \ - __dtrace_mysql___insert__start(arg0) -#define MYSQL_INSERT_START_ENABLED() \ - __dtraceenabled_mysql___insert__start() -#define MYSQL_MULTI_DELETE_DONE(arg0, arg1) \ - __dtrace_mysql___multi__delete__done(arg0, arg1) -#define MYSQL_MULTI_DELETE_DONE_ENABLED() \ - __dtraceenabled_mysql___multi__delete__done() -#define MYSQL_MULTI_DELETE_START(arg0) \ - __dtrace_mysql___multi__delete__start(arg0) -#define MYSQL_MULTI_DELETE_START_ENABLED() \ - __dtraceenabled_mysql___multi__delete__start() -#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2) \ - __dtrace_mysql___multi__update__done(arg0, arg1, arg2) -#define MYSQL_MULTI_UPDATE_DONE_ENABLED() \ - __dtraceenabled_mysql___multi__update__done() -#define MYSQL_MULTI_UPDATE_START(arg0) \ - __dtrace_mysql___multi__update__start(arg0) -#define MYSQL_MULTI_UPDATE_START_ENABLED() \ - __dtraceenabled_mysql___multi__update__start() -#define MYSQL_NET_READ_DONE(arg0, arg1) \ - __dtrace_mysql___net__read__done(arg0, arg1) -#define MYSQL_NET_READ_DONE_ENABLED() \ - __dtraceenabled_mysql___net__read__done() -#define MYSQL_NET_READ_START() \ - __dtrace_mysql___net__read__start() -#define MYSQL_NET_READ_START_ENABLED() \ - __dtraceenabled_mysql___net__read__start() -#define MYSQL_NET_WRITE_DONE(arg0) \ - __dtrace_mysql___net__write__done(arg0) -#define MYSQL_NET_WRITE_DONE_ENABLED() \ - __dtraceenabled_mysql___net__write__done() -#define MYSQL_NET_WRITE_START(arg0) \ - __dtrace_mysql___net__write__start(arg0) -#define MYSQL_NET_WRITE_START_ENABLED() \ - __dtraceenabled_mysql___net__write__start() -#define MYSQL_QUERY_CACHE_HIT(arg0, arg1) \ - __dtrace_mysql___query__cache__hit(arg0, arg1) -#define MYSQL_QUERY_CACHE_HIT_ENABLED() \ - __dtraceenabled_mysql___query__cache__hit() -#define MYSQL_QUERY_CACHE_MISS(arg0) \ - __dtrace_mysql___query__cache__miss(arg0) -#define MYSQL_QUERY_CACHE_MISS_ENABLED() \ - __dtraceenabled_mysql___query__cache__miss() -#define MYSQL_QUERY_DONE(arg0) \ - __dtrace_mysql___query__done(arg0) -#define MYSQL_QUERY_DONE_ENABLED() \ - __dtraceenabled_mysql___query__done() -#define MYSQL_QUERY_EXEC_DONE(arg0) \ - __dtrace_mysql___query__exec__done(arg0) -#define MYSQL_QUERY_EXEC_DONE_ENABLED() \ - __dtraceenabled_mysql___query__exec__done() -#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5) \ - __dtrace_mysql___query__exec__start(arg0, arg1, arg2, arg3, arg4, arg5) -#define MYSQL_QUERY_EXEC_START_ENABLED() \ - __dtraceenabled_mysql___query__exec__start() -#define MYSQL_QUERY_PARSE_DONE(arg0) \ - __dtrace_mysql___query__parse__done(arg0) -#define MYSQL_QUERY_PARSE_DONE_ENABLED() \ - __dtraceenabled_mysql___query__parse__done() -#define MYSQL_QUERY_PARSE_START(arg0) \ - __dtrace_mysql___query__parse__start(arg0) -#define MYSQL_QUERY_PARSE_START_ENABLED() \ - __dtraceenabled_mysql___query__parse__start() -#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4) \ - __dtrace_mysql___query__start(arg0, arg1, arg2, arg3, arg4) -#define MYSQL_QUERY_START_ENABLED() \ - __dtraceenabled_mysql___query__start() -#define MYSQL_SELECT_DONE(arg0, arg1) \ - __dtrace_mysql___select__done(arg0, arg1) -#define MYSQL_SELECT_DONE_ENABLED() \ - __dtraceenabled_mysql___select__done() -#define MYSQL_SELECT_START(arg0) \ - __dtrace_mysql___select__start(arg0) -#define MYSQL_SELECT_START_ENABLED() \ - __dtraceenabled_mysql___select__start() -#define MYSQL_UPDATE_DONE(arg0, arg1, arg2) \ - __dtrace_mysql___update__done(arg0, arg1, arg2) -#define MYSQL_UPDATE_DONE_ENABLED() \ - __dtraceenabled_mysql___update__done() -#define MYSQL_UPDATE_ROW_DONE(arg0) \ - __dtrace_mysql___update__row__done(arg0) -#define MYSQL_UPDATE_ROW_DONE_ENABLED() \ - __dtraceenabled_mysql___update__row__done() -#define MYSQL_UPDATE_ROW_START(arg0, arg1) \ - __dtrace_mysql___update__row__start(arg0, arg1) -#define MYSQL_UPDATE_ROW_START_ENABLED() \ - __dtraceenabled_mysql___update__row__start() -#define MYSQL_UPDATE_START(arg0) \ - __dtrace_mysql___update__start(arg0) -#define MYSQL_UPDATE_START_ENABLED() \ - __dtraceenabled_mysql___update__start() - - -extern void __dtrace_mysql___command__done(int); -extern int __dtraceenabled_mysql___command__done(void); -extern void __dtrace_mysql___command__start(unsigned long, int, char *, char *); -extern int __dtraceenabled_mysql___command__start(void); -extern void __dtrace_mysql___connection__done(int, unsigned long); -extern int __dtraceenabled_mysql___connection__done(void); -extern void __dtrace_mysql___connection__start(unsigned long, char *, char *); -extern int __dtraceenabled_mysql___connection__start(void); -extern void __dtrace_mysql___delete__done(int, unsigned long); -extern int __dtraceenabled_mysql___delete__done(void); -extern void __dtrace_mysql___delete__row__done(int); -extern int __dtraceenabled_mysql___delete__row__done(void); -extern void __dtrace_mysql___delete__row__start(char *, char *); -extern int __dtraceenabled_mysql___delete__row__start(void); -extern void __dtrace_mysql___delete__start(char *); -extern int __dtraceenabled_mysql___delete__start(void); -extern void __dtrace_mysql___filesort__done(int, unsigned long); -extern int __dtraceenabled_mysql___filesort__done(void); -extern void __dtrace_mysql___filesort__start(char *, char *); -extern int __dtraceenabled_mysql___filesort__start(void); -extern void __dtrace_mysql___handler__rdlock__done(int); -extern int __dtraceenabled_mysql___handler__rdlock__done(void); -extern void __dtrace_mysql___handler__rdlock__start(char *, char *); -extern int __dtraceenabled_mysql___handler__rdlock__start(void); -extern void __dtrace_mysql___handler__unlock__done(int); -extern int __dtraceenabled_mysql___handler__unlock__done(void); -extern void __dtrace_mysql___handler__unlock__start(char *, char *); -extern int __dtraceenabled_mysql___handler__unlock__start(void); -extern void __dtrace_mysql___handler__wrlock__done(int); -extern int __dtraceenabled_mysql___handler__wrlock__done(void); -extern void __dtrace_mysql___handler__wrlock__start(char *, char *); -extern int __dtraceenabled_mysql___handler__wrlock__start(void); -extern void __dtrace_mysql___insert__done(int, unsigned long); -extern int __dtraceenabled_mysql___insert__done(void); -extern void __dtrace_mysql___insert__row__done(int); -extern int __dtraceenabled_mysql___insert__row__done(void); -extern void __dtrace_mysql___insert__row__start(char *, char *); -extern int __dtraceenabled_mysql___insert__row__start(void); -extern void __dtrace_mysql___insert__select__done(int, unsigned long); -extern int __dtraceenabled_mysql___insert__select__done(void); -extern void __dtrace_mysql___insert__select__start(char *); -extern int __dtraceenabled_mysql___insert__select__start(void); -extern void __dtrace_mysql___insert__start(char *); -extern int __dtraceenabled_mysql___insert__start(void); -extern void __dtrace_mysql___multi__delete__done(int, unsigned long); -extern int __dtraceenabled_mysql___multi__delete__done(void); -extern void __dtrace_mysql___multi__delete__start(char *); -extern int __dtraceenabled_mysql___multi__delete__start(void); -extern void __dtrace_mysql___multi__update__done(int, unsigned long, unsigned long); -extern int __dtraceenabled_mysql___multi__update__done(void); -extern void __dtrace_mysql___multi__update__start(char *); -extern int __dtraceenabled_mysql___multi__update__start(void); -extern void __dtrace_mysql___net__read__done(int, unsigned long); -extern int __dtraceenabled_mysql___net__read__done(void); -extern void __dtrace_mysql___net__read__start(void); -extern int __dtraceenabled_mysql___net__read__start(void); -extern void __dtrace_mysql___net__write__done(int); -extern int __dtraceenabled_mysql___net__write__done(void); -extern void __dtrace_mysql___net__write__start(unsigned long); -extern int __dtraceenabled_mysql___net__write__start(void); -extern void __dtrace_mysql___query__cache__hit(char *, unsigned long); -extern int __dtraceenabled_mysql___query__cache__hit(void); -extern void __dtrace_mysql___query__cache__miss(char *); -extern int __dtraceenabled_mysql___query__cache__miss(void); -extern void __dtrace_mysql___query__done(int); -extern int __dtraceenabled_mysql___query__done(void); -extern void __dtrace_mysql___query__exec__done(int); -extern int __dtraceenabled_mysql___query__exec__done(void); -extern void __dtrace_mysql___query__exec__start(char *, unsigned long, char *, char *, char *, int); -extern int __dtraceenabled_mysql___query__exec__start(void); -extern void __dtrace_mysql___query__parse__done(int); -extern int __dtraceenabled_mysql___query__parse__done(void); -extern void __dtrace_mysql___query__parse__start(char *); -extern int __dtraceenabled_mysql___query__parse__start(void); -extern void __dtrace_mysql___query__start(char *, unsigned long, char *, char *, char *); -extern int __dtraceenabled_mysql___query__start(void); -extern void __dtrace_mysql___select__done(int, unsigned long); -extern int __dtraceenabled_mysql___select__done(void); -extern void __dtrace_mysql___select__start(char *); -extern int __dtraceenabled_mysql___select__start(void); -extern void __dtrace_mysql___update__done(int, unsigned long, unsigned long); -extern int __dtraceenabled_mysql___update__done(void); -extern void __dtrace_mysql___update__row__done(int); -extern int __dtraceenabled_mysql___update__row__done(void); -extern void __dtrace_mysql___update__row__start(char *, char *); -extern int __dtraceenabled_mysql___update__row__start(void); -extern void __dtrace_mysql___update__start(char *); -extern int __dtraceenabled_mysql___update__start(void); - -#else - -#define MYSQL_COMMAND_DONE(arg0) -#define MYSQL_COMMAND_DONE_ENABLED() (0) -#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3) -#define MYSQL_COMMAND_START_ENABLED() (0) -#define MYSQL_CONNECTION_DONE(arg0, arg1) -#define MYSQL_CONNECTION_DONE_ENABLED() (0) -#define MYSQL_CONNECTION_START(arg0, arg1, arg2) -#define MYSQL_CONNECTION_START_ENABLED() (0) -#define MYSQL_DELETE_DONE(arg0, arg1) -#define MYSQL_DELETE_DONE_ENABLED() (0) -#define MYSQL_DELETE_ROW_DONE(arg0) -#define MYSQL_DELETE_ROW_DONE_ENABLED() (0) -#define MYSQL_DELETE_ROW_START(arg0, arg1) -#define MYSQL_DELETE_ROW_START_ENABLED() (0) -#define MYSQL_DELETE_START(arg0) -#define MYSQL_DELETE_START_ENABLED() (0) -#define MYSQL_FILESORT_DONE(arg0, arg1) -#define MYSQL_FILESORT_DONE_ENABLED() (0) -#define MYSQL_FILESORT_START(arg0, arg1) -#define MYSQL_FILESORT_START_ENABLED() (0) -#define MYSQL_HANDLER_RDLOCK_DONE(arg0) -#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (0) -#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1) -#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (0) -#define MYSQL_HANDLER_UNLOCK_DONE(arg0) -#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (0) -#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1) -#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (0) -#define MYSQL_HANDLER_WRLOCK_DONE(arg0) -#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (0) -#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1) -#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (0) -#define MYSQL_INSERT_DONE(arg0, arg1) -#define MYSQL_INSERT_DONE_ENABLED() (0) -#define MYSQL_INSERT_ROW_DONE(arg0) -#define MYSQL_INSERT_ROW_DONE_ENABLED() (0) -#define MYSQL_INSERT_ROW_START(arg0, arg1) -#define MYSQL_INSERT_ROW_START_ENABLED() (0) -#define MYSQL_INSERT_SELECT_DONE(arg0, arg1) -#define MYSQL_INSERT_SELECT_DONE_ENABLED() (0) -#define MYSQL_INSERT_SELECT_START(arg0) -#define MYSQL_INSERT_SELECT_START_ENABLED() (0) -#define MYSQL_INSERT_START(arg0) -#define MYSQL_INSERT_START_ENABLED() (0) -#define MYSQL_MULTI_DELETE_DONE(arg0, arg1) -#define MYSQL_MULTI_DELETE_DONE_ENABLED() (0) -#define MYSQL_MULTI_DELETE_START(arg0) -#define MYSQL_MULTI_DELETE_START_ENABLED() (0) -#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2) -#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (0) -#define MYSQL_MULTI_UPDATE_START(arg0) -#define MYSQL_MULTI_UPDATE_START_ENABLED() (0) -#define MYSQL_NET_READ_DONE(arg0, arg1) -#define MYSQL_NET_READ_DONE_ENABLED() (0) -#define MYSQL_NET_READ_START() -#define MYSQL_NET_READ_START_ENABLED() (0) -#define MYSQL_NET_WRITE_DONE(arg0) -#define MYSQL_NET_WRITE_DONE_ENABLED() (0) -#define MYSQL_NET_WRITE_START(arg0) -#define MYSQL_NET_WRITE_START_ENABLED() (0) -#define MYSQL_QUERY_CACHE_HIT(arg0, arg1) -#define MYSQL_QUERY_CACHE_HIT_ENABLED() (0) -#define MYSQL_QUERY_CACHE_MISS(arg0) -#define MYSQL_QUERY_CACHE_MISS_ENABLED() (0) -#define MYSQL_QUERY_DONE(arg0) -#define MYSQL_QUERY_DONE_ENABLED() (0) -#define MYSQL_QUERY_EXEC_DONE(arg0) -#define MYSQL_QUERY_EXEC_DONE_ENABLED() (0) -#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5) -#define MYSQL_QUERY_EXEC_START_ENABLED() (0) -#define MYSQL_QUERY_PARSE_DONE(arg0) -#define MYSQL_QUERY_PARSE_DONE_ENABLED() (0) -#define MYSQL_QUERY_PARSE_START(arg0) -#define MYSQL_QUERY_PARSE_START_ENABLED() (0) -#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4) -#define MYSQL_QUERY_START_ENABLED() (0) -#define MYSQL_SELECT_DONE(arg0, arg1) -#define MYSQL_SELECT_DONE_ENABLED() (0) -#define MYSQL_SELECT_START(arg0) -#define MYSQL_SELECT_START_ENABLED() (0) -#define MYSQL_UPDATE_DONE(arg0, arg1, arg2) -#define MYSQL_UPDATE_DONE_ENABLED() (0) -#define MYSQL_UPDATE_ROW_DONE(arg0) -#define MYSQL_UPDATE_ROW_DONE_ENABLED() (0) -#define MYSQL_UPDATE_ROW_START(arg0, arg1) -#define MYSQL_UPDATE_ROW_START_ENABLED() (0) -#define MYSQL_UPDATE_START(arg0) -#define MYSQL_UPDATE_START_ENABLED() (0) - -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* _PROBES_H */ diff --git a/externals/mysql/m_ctype.h b/externals/mysql/m_ctype.h deleted file mode 100644 index 33229a3347..0000000000 --- a/externals/mysql/m_ctype.h +++ /dev/null @@ -1,654 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - A better inplementation of the UNIX ctype(3) library. - Notes: my_global.h should be included before ctype.h -*/ - -#ifndef _m_ctype_h -#define _m_ctype_h - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define MY_CS_NAME_SIZE 32 -#define MY_CS_CTYPE_TABLE_SIZE 257 -#define MY_CS_TO_LOWER_TABLE_SIZE 256 -#define MY_CS_TO_UPPER_TABLE_SIZE 256 -#define MY_CS_SORT_ORDER_TABLE_SIZE 256 -#define MY_CS_TO_UNI_TABLE_SIZE 256 - -#define CHARSET_DIR "charsets/" - -#define my_wc_t ulong - -typedef struct unicase_info_st -{ - uint16 toupper; - uint16 tolower; - uint16 sort; -} MY_UNICASE_INFO; - - -extern MY_UNICASE_INFO *my_unicase_default[256]; -extern MY_UNICASE_INFO *my_unicase_turkish[256]; - -typedef struct uni_ctype_st -{ - uchar pctype; - uchar *ctype; -} MY_UNI_CTYPE; - -extern MY_UNI_CTYPE my_uni_ctype[256]; - -/* wm_wc and wc_mb return codes */ -#define MY_CS_ILSEQ 0 /* Wrong by sequence: wb_wc */ -#define MY_CS_ILUNI 0 /* Cannot encode Unicode to charset: wc_mb */ -#define MY_CS_TOOSMALL -101 /* Need at least one byte: wc_mb and mb_wc */ -#define MY_CS_TOOSMALL2 -102 /* Need at least two bytes: wc_mb and mb_wc */ -#define MY_CS_TOOSMALL3 -103 /* Need at least three bytes: wc_mb and mb_wc */ -/* These following three are currently not really used */ -#define MY_CS_TOOSMALL4 -104 /* Need at least 4 bytes: wc_mb and mb_wc */ -#define MY_CS_TOOSMALL5 -105 /* Need at least 5 bytes: wc_mb and mb_wc */ -#define MY_CS_TOOSMALL6 -106 /* Need at least 6 bytes: wc_mb and mb_wc */ -/* A helper macros for "need at least n bytes" */ -#define MY_CS_TOOSMALLN(n) (-100-(n)) - -#define MY_SEQ_INTTAIL 1 -#define MY_SEQ_SPACES 2 - - /* My charsets_list flags */ -#define MY_CS_COMPILED 1 /* compiled-in sets */ -#define MY_CS_CONFIG 2 /* sets that have a *.conf file */ -#define MY_CS_INDEX 4 /* sets listed in the Index file */ -#define MY_CS_LOADED 8 /* sets that are currently loaded */ -#define MY_CS_BINSORT 16 /* if binary sort order */ -#define MY_CS_PRIMARY 32 /* if primary collation */ -#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */ -#define MY_CS_UNICODE 128 /* is a charset is full unicode */ -#define MY_CS_READY 256 /* if a charset is initialized */ -#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/ -#define MY_CS_CSSORT 1024 /* if case sensitive sort order */ -#define MY_CS_HIDDEN 2048 /* don't display in SHOW */ -#define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */ -#define MY_CS_NONASCII 8192 /* if not ASCII-compatible */ -#define MY_CHARSET_UNDEFINED 0 - -/* Character repertoire flags */ -#define MY_REPERTOIRE_ASCII 1 /* Pure ASCII U+0000..U+007F */ -#define MY_REPERTOIRE_EXTENDED 2 /* Extended characters: U+0080..U+FFFF */ -#define MY_REPERTOIRE_UNICODE30 3 /* ASCII | EXTENDED: U+0000..U+FFFF */ - -/* Flags for strxfrm */ -#define MY_STRXFRM_LEVEL1 0x00000001 /* for primary weights */ -#define MY_STRXFRM_LEVEL2 0x00000002 /* for secondary weights */ -#define MY_STRXFRM_LEVEL3 0x00000004 /* for tertiary weights */ -#define MY_STRXFRM_LEVEL4 0x00000008 /* fourth level weights */ -#define MY_STRXFRM_LEVEL5 0x00000010 /* fifth level weights */ -#define MY_STRXFRM_LEVEL6 0x00000020 /* sixth level weights */ -#define MY_STRXFRM_LEVEL_ALL 0x0000003F /* Bit OR for the above six */ -#define MY_STRXFRM_NLEVELS 6 /* Number of possible levels*/ - -#define MY_STRXFRM_PAD_WITH_SPACE 0x00000040 /* if pad result with spaces */ -#define MY_STRXFRM_PAD_TO_MAXLEN 0x00000080 /* if pad tail(for filesort) */ - -#define MY_STRXFRM_DESC_LEVEL1 0x00000100 /* if desc order for level1 */ -#define MY_STRXFRM_DESC_LEVEL2 0x00000200 /* if desc order for level2 */ -#define MY_STRXFRM_DESC_LEVEL3 0x00000300 /* if desc order for level3 */ -#define MY_STRXFRM_DESC_LEVEL4 0x00000800 /* if desc order for level4 */ -#define MY_STRXFRM_DESC_LEVEL5 0x00001000 /* if desc order for level5 */ -#define MY_STRXFRM_DESC_LEVEL6 0x00002000 /* if desc order for level6 */ -#define MY_STRXFRM_DESC_SHIFT 8 - -#define MY_STRXFRM_UNUSED_00004000 0x00004000 /* for future extensions */ -#define MY_STRXFRM_UNUSED_00008000 0x00008000 /* for future extensions */ - -#define MY_STRXFRM_REVERSE_LEVEL1 0x00010000 /* if reverse order for level1 */ -#define MY_STRXFRM_REVERSE_LEVEL2 0x00020000 /* if reverse order for level2 */ -#define MY_STRXFRM_REVERSE_LEVEL3 0x00040000 /* if reverse order for level3 */ -#define MY_STRXFRM_REVERSE_LEVEL4 0x00080000 /* if reverse order for level4 */ -#define MY_STRXFRM_REVERSE_LEVEL5 0x00100000 /* if reverse order for level5 */ -#define MY_STRXFRM_REVERSE_LEVEL6 0x00200000 /* if reverse order for level6 */ -#define MY_STRXFRM_REVERSE_SHIFT 16 - - -typedef struct my_uni_idx_st -{ - uint16 from; - uint16 to; - uchar *tab; -} MY_UNI_IDX; - -typedef struct -{ - uint beg; - uint end; - uint mb_len; -} my_match_t; - -enum my_lex_states -{ - MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT, - MY_LEX_IDENT_SEP, MY_LEX_IDENT_START, - MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER, - MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END, - MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL, - MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE, - MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON, - MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP, - MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR, - MY_LEX_IDENT_OR_KEYWORD, - MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR, - MY_LEX_STRING_OR_DELIMITER -}; - -struct charset_info_st; - - -/* See strings/CHARSET_INFO.txt for information about this structure */ -typedef struct my_collation_handler_st -{ - my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t)); - /* Collation routines */ - int (*strnncoll)(struct charset_info_st *, - const uchar *, size_t, const uchar *, size_t, my_bool); - int (*strnncollsp)(struct charset_info_st *, - const uchar *, size_t, const uchar *, size_t, - my_bool diff_if_only_endspace_difference); - size_t (*strnxfrm)(struct charset_info_st *, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags); - size_t (*strnxfrmlen)(struct charset_info_st *, size_t); - my_bool (*like_range)(struct charset_info_st *, - const char *s, size_t s_length, - pchar w_prefix, pchar w_one, pchar w_many, - size_t res_length, - char *min_str, char *max_str, - size_t *min_len, size_t *max_len); - int (*wildcmp)(struct charset_info_st *, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape,int w_one, int w_many); - - int (*strcasecmp)(struct charset_info_st *, const char *, const char *); - - uint (*instr)(struct charset_info_st *, - const char *b, size_t b_length, - const char *s, size_t s_length, - my_match_t *match, uint nmatch); - - /* Hash calculation */ - void (*hash_sort)(struct charset_info_st *cs, const uchar *key, size_t len, - ulong *nr1, ulong *nr2); - my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, size_t len); -} MY_COLLATION_HANDLER; - -extern MY_COLLATION_HANDLER my_collation_mb_bin_handler; -extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler; -extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler; -extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler; - -/* Some typedef to make it easy for C++ to make function pointers */ -typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *, - const uchar *, const uchar *); -typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t, - uchar *, uchar *); -typedef size_t (*my_charset_conv_case)(struct charset_info_st *, - char *, size_t, char *, size_t); - - -/* See strings/CHARSET_INFO.txt about information on this structure */ -typedef struct my_charset_handler_st -{ - my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t)); - /* Multibyte routines */ - uint (*ismbchar)(struct charset_info_st *, const char *, const char *); - uint (*mbcharlen)(struct charset_info_st *, uint c); - size_t (*numchars)(struct charset_info_st *, const char *b, const char *e); - size_t (*charpos)(struct charset_info_st *, const char *b, const char *e, - size_t pos); - size_t (*well_formed_len)(struct charset_info_st *, - const char *b,const char *e, - size_t nchars, int *error); - size_t (*lengthsp)(struct charset_info_st *, const char *ptr, size_t length); - size_t (*numcells)(struct charset_info_st *, const char *b, const char *e); - - /* Unicode conversion */ - my_charset_conv_mb_wc mb_wc; - my_charset_conv_wc_mb wc_mb; - - /* CTYPE scanner */ - int (*ctype)(struct charset_info_st *cs, int *ctype, - const uchar *s, const uchar *e); - - /* Functions for case and sort conversion */ - size_t (*caseup_str)(struct charset_info_st *, char *); - size_t (*casedn_str)(struct charset_info_st *, char *); - - my_charset_conv_case caseup; - my_charset_conv_case casedn; - - /* Charset dependant snprintf() */ - size_t (*snprintf)(struct charset_info_st *, char *to, size_t n, - const char *fmt, - ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5); - size_t (*long10_to_str)(struct charset_info_st *, char *to, size_t n, - int radix, long int val); - size_t (*longlong10_to_str)(struct charset_info_st *, char *to, size_t n, - int radix, longlong val); - - void (*fill)(struct charset_info_st *, char *to, size_t len, int fill); - - /* String-to-number conversion routines */ - long (*strntol)(struct charset_info_st *, const char *s, size_t l, - int base, char **e, int *err); - ulong (*strntoul)(struct charset_info_st *, const char *s, size_t l, - int base, char **e, int *err); - longlong (*strntoll)(struct charset_info_st *, const char *s, size_t l, - int base, char **e, int *err); - ulonglong (*strntoull)(struct charset_info_st *, const char *s, size_t l, - int base, char **e, int *err); - double (*strntod)(struct charset_info_st *, char *s, size_t l, char **e, - int *err); - longlong (*strtoll10)(struct charset_info_st *cs, - const char *nptr, char **endptr, int *error); - ulonglong (*strntoull10rnd)(struct charset_info_st *cs, - const char *str, size_t length, - int unsigned_fl, - char **endptr, int *error); - size_t (*scan)(struct charset_info_st *, const char *b, const char *e, - int sq); -} MY_CHARSET_HANDLER; - -extern MY_CHARSET_HANDLER my_charset_8bit_handler; -extern MY_CHARSET_HANDLER my_charset_ucs2_handler; - - -/* See strings/CHARSET_INFO.txt about information on this structure */ -typedef struct charset_info_st -{ - uint number; - uint primary_number; - uint binary_number; - uint state; - const char *csname; - const char *name; - const char *comment; - const char *tailoring; - uchar *ctype; - uchar *to_lower; - uchar *to_upper; - uchar *sort_order; - uint16 *contractions; - uint16 **sort_order_big; - uint16 *tab_to_uni; - MY_UNI_IDX *tab_from_uni; - MY_UNICASE_INFO **caseinfo; - uchar *state_map; - uchar *ident_map; - uint strxfrm_multiply; - uchar caseup_multiply; - uchar casedn_multiply; - uint mbminlen; - uint mbmaxlen; - uint16 min_sort_char; - uint16 max_sort_char; /* For LIKE optimization */ - uchar pad_char; - my_bool escape_with_backslash_is_dangerous; - uchar levels_for_compare; - uchar levels_for_order; - - MY_CHARSET_HANDLER *cset; - MY_COLLATION_HANDLER *coll; - -} CHARSET_INFO; -#define ILLEGAL_CHARSET_INFO_NUMBER (~0U) - - -extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin; -extern CHARSET_INFO my_charset_big5_chinese_ci; -extern CHARSET_INFO my_charset_big5_bin; -extern CHARSET_INFO my_charset_cp932_japanese_ci; -extern CHARSET_INFO my_charset_cp932_bin; -extern CHARSET_INFO my_charset_cp1250_czech_ci; -extern CHARSET_INFO my_charset_eucjpms_japanese_ci; -extern CHARSET_INFO my_charset_eucjpms_bin; -extern CHARSET_INFO my_charset_euckr_korean_ci; -extern CHARSET_INFO my_charset_euckr_bin; -extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename; -extern CHARSET_INFO my_charset_gb2312_chinese_ci; -extern CHARSET_INFO my_charset_gb2312_bin; -extern CHARSET_INFO my_charset_gbk_chinese_ci; -extern CHARSET_INFO my_charset_gbk_bin; -extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1; -extern CHARSET_INFO my_charset_latin1_german2_ci; -extern CHARSET_INFO my_charset_latin1_bin; -extern CHARSET_INFO my_charset_latin2_czech_ci; -extern CHARSET_INFO my_charset_sjis_japanese_ci; -extern CHARSET_INFO my_charset_sjis_bin; -extern CHARSET_INFO my_charset_tis620_thai_ci; -extern CHARSET_INFO my_charset_tis620_bin; -extern CHARSET_INFO my_charset_ucs2_general_ci; -extern CHARSET_INFO my_charset_ucs2_bin; -extern CHARSET_INFO my_charset_ucs2_unicode_ci; -extern CHARSET_INFO my_charset_ujis_japanese_ci; -extern CHARSET_INFO my_charset_ujis_bin; -extern CHARSET_INFO my_charset_utf16_bin; -extern CHARSET_INFO my_charset_utf16_general_ci; -extern CHARSET_INFO my_charset_utf16_unicode_ci; -extern CHARSET_INFO my_charset_utf32_bin; -extern CHARSET_INFO my_charset_utf32_general_ci; -extern CHARSET_INFO my_charset_utf32_unicode_ci; -extern CHARSET_INFO my_charset_utf8mb3_bin; -extern CHARSET_INFO my_charset_utf8mb3_general_ci; -extern CHARSET_INFO my_charset_utf8mb3_unicode_ci; -extern CHARSET_INFO my_charset_utf8mb4_bin; -extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_general_ci; -extern CHARSET_INFO my_charset_utf8mb4_unicode_ci; - -#define MY_UTF8MB3 "utf8mb3" -#define MY_UTF8MB4 "utf8" -#define my_charset_utf8_general_ci my_charset_utf8mb4_general_ci -#define my_charset_utf8_bin my_charset_utf8mb4_bin - - -/* declarations for simple charsets */ -extern size_t my_strnxfrm_simple(CHARSET_INFO *, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags); -size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t); -extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t, - const uchar *, size_t, my_bool); - -extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t, - const uchar *, size_t, - my_bool diff_if_only_endspace_difference); - -extern void my_hash_sort_simple(CHARSET_INFO *cs, - const uchar *key, size_t len, - ulong *nr1, ulong *nr2); - -extern size_t my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, size_t length); - -extern uint my_instr_simple(struct charset_info_st *, - const char *b, size_t b_length, - const char *s, size_t s_length, - my_match_t *match, uint nmatch); - - -/* Functions for 8bit */ -extern size_t my_caseup_str_8bit(CHARSET_INFO *, char *); -extern size_t my_casedn_str_8bit(CHARSET_INFO *, char *); -extern size_t my_caseup_8bit(CHARSET_INFO *, char *src, size_t srclen, - char *dst, size_t dstlen); -extern size_t my_casedn_8bit(CHARSET_INFO *, char *src, size_t srclen, - char *dst, size_t dstlen); - -extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *); - -int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e); -int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e); - -int my_mb_ctype_8bit(CHARSET_INFO *,int *, const uchar *,const uchar *); -int my_mb_ctype_mb(CHARSET_INFO *,int *, const uchar *,const uchar *); - -size_t my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq); - -size_t my_snprintf_8bit(struct charset_info_st *, char *to, size_t n, - const char *fmt, ...) - ATTRIBUTE_FORMAT(printf, 4, 5); - -long my_strntol_8bit(CHARSET_INFO *, const char *s, size_t l, int base, - char **e, int *err); -ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, size_t l, int base, - char **e, int *err); -longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, size_t l, int base, - char **e, int *err); -ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, size_t l, int base, - char **e, int *err); -double my_strntod_8bit(CHARSET_INFO *, char *s, size_t l,char **e, - int *err); -size_t my_long10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix, - long int val); -size_t my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix, - longlong val); - -longlong my_strtoll10_8bit(CHARSET_INFO *cs, - const char *nptr, char **endptr, int *error); -longlong my_strtoll10_ucs2(CHARSET_INFO *cs, - const char *nptr, char **endptr, int *error); - -ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs, - const char *str, size_t length, int - unsigned_fl, char **endptr, int *error); -ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs, - const char *str, size_t length, - int unsigned_fl, char **endptr, int *error); - -void my_fill_8bit(CHARSET_INFO *cs, char* to, size_t l, int fill); - -my_bool my_like_range_simple(CHARSET_INFO *cs, - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str, char *max_str, - size_t *min_length, size_t *max_length); - -my_bool my_like_range_mb(CHARSET_INFO *cs, - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str, char *max_str, - size_t *min_length, size_t *max_length); - -my_bool my_like_range_ucs2(CHARSET_INFO *cs, - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str, char *max_str, - size_t *min_length, size_t *max_length); - -my_bool my_like_range_utf16(CHARSET_INFO *cs, - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str, char *max_str, - size_t *min_length, size_t *max_length); - -my_bool my_like_range_utf32(CHARSET_INFO *cs, - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str, char *max_str, - size_t *min_length, size_t *max_length); - - -int my_wildcmp_8bit(CHARSET_INFO *, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many); - -int my_wildcmp_bin(CHARSET_INFO *, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many); - -size_t my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e); -size_t my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e); -size_t my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, size_t pos); -size_t my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e, - size_t pos, int *error); -uint my_mbcharlen_8bit(CHARSET_INFO *, uint c); - - -/* Functions for multibyte charsets */ -extern size_t my_caseup_str_mb(CHARSET_INFO *, char *); -extern size_t my_casedn_str_mb(CHARSET_INFO *, char *); -extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen, - char *dst, size_t dstlen); -extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen, - char *dst, size_t dstlen); -extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *); - -int my_wildcmp_mb(CHARSET_INFO *, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many); -size_t my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); -size_t my_numcells_mb(CHARSET_INFO *, const char *b, const char *e); -size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t pos); -size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, - size_t pos, int *error); -uint my_instr_mb(struct charset_info_st *, - const char *b, size_t b_length, - const char *s, size_t s_length, - my_match_t *match, uint nmatch); - -int my_strnncoll_mb_bin(CHARSET_INFO * cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix); - -int my_strnncollsp_mb_bin(CHARSET_INFO *cs, - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool diff_if_only_endspace_difference); - -int my_wildcmp_mb_bin(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many); - -int my_strcasecmp_mb_bin(CHARSET_INFO * cs __attribute__((unused)), - const char *s, const char *t); - -void my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)), - const uchar *key, size_t len,ulong *nr1, ulong *nr2); - -size_t my_strnxfrm_mb(CHARSET_INFO *, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags); - -size_t my_strnxfrm_unicode(CHARSET_INFO *, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags); - -int my_wildcmp_unicode(CHARSET_INFO *cs, - const char *str, const char *str_end, - const char *wildstr, const char *wildend, - int escape, int w_one, int w_many, - MY_UNICASE_INFO **weights); - -extern my_bool my_parse_charset_xml(const char *bug, size_t len, - int (*add)(CHARSET_INFO *cs)); -extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end, - pchar c); - -my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len); -my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len); - - -uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len); -my_bool my_charset_is_ascii_based(CHARSET_INFO *cs); -my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs); -uint my_charset_repertoire(CHARSET_INFO *cs); - - -uint my_strxfrm_flag_normalize(uint flags, uint nlevels); -void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, - uint flags, uint level); -size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs, - uchar *str, uchar *frmend, uchar *strend, - uint nweights, uint flags, uint level); - -my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs); - -#define _MY_U 01 /* Upper case */ -#define _MY_L 02 /* Lower case */ -#define _MY_NMR 04 /* Numeral (digit) */ -#define _MY_SPC 010 /* Spacing character */ -#define _MY_PNT 020 /* Punctuation */ -#define _MY_CTR 040 /* Control character */ -#define _MY_B 0100 /* Blank */ -#define _MY_X 0200 /* heXadecimal digit */ - - -#define my_isascii(c) (!((c) & ~0177)) -#define my_toascii(c) ((c) & 0177) -#define my_tocntrl(c) ((c) & 31) -#define my_toprint(c) ((c) | 64) -#define my_toupper(s,c) (char) ((s)->to_upper[(uchar) (c)]) -#define my_tolower(s,c) (char) ((s)->to_lower[(uchar) (c)]) -#define my_isalpha(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L)) -#define my_isupper(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_U) -#define my_islower(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_L) -#define my_isdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_NMR) -#define my_isxdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_X) -#define my_isalnum(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L | _MY_NMR)) -#define my_isspace(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_SPC) -#define my_ispunct(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_PNT) -#define my_isprint(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B)) -#define my_isgraph(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR)) -#define my_iscntrl(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_CTR) - -/* Some macros that should be cleaned up a little */ -#define my_isvar(s,c) (my_isalnum(s,c) || (c) == '_') -#define my_isvar_start(s,c) (my_isalpha(s,c) || (c) == '_') - -#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT) -#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM) -#define my_strnxfrm(cs, d, dl, s, sl) \ - ((cs)->coll->strnxfrm((cs), (d), (dl), (dl), (s), (sl), MY_STRXFRM_PAD_WITH_SPACE)) -#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0)) -#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \ - ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j))) -#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m))) -#define my_strcasecmp(s, a, b) ((s)->coll->strcasecmp((s), (a), (b))) -#define my_charpos(cs, b, e, num) (cs)->cset->charpos((cs), (const char*) (b), (const char *)(e), (num)) - - -#define use_mb(s) ((s)->cset->ismbchar != NULL) -#define my_ismbchar(s, a, b) ((s)->cset->ismbchar((s), (a), (b))) -#ifdef USE_MB -#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s),(a))) -#else -#define my_mbcharlen(s, a) 1 -#endif - -#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a))) -#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a))) -#define my_strntol(s, a, b, c, d, e) ((s)->cset->strntol((s),(a),(b),(c),(d),(e))) -#define my_strntoul(s, a, b, c, d, e) ((s)->cset->strntoul((s),(a),(b),(c),(d),(e))) -#define my_strntoll(s, a, b, c, d, e) ((s)->cset->strntoll((s),(a),(b),(c),(d),(e))) -#define my_strntoull(s, a, b, c,d, e) ((s)->cset->strntoull((s),(a),(b),(c),(d),(e))) -#define my_strntod(s, a, b, c, d) ((s)->cset->strntod((s),(a),(b),(c),(d))) - - -/* XXX: still need to take care of this one */ -#ifdef MY_CHARSET_TIS620 -#error The TIS620 charset is broken at the moment. Tell tim to fix it. -#define USE_TIS620 -#include "t_ctype.h" -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _m_ctype_h */ diff --git a/externals/mysql/m_string.h b/externals/mysql/m_string.h deleted file mode 100644 index bb8bad4b53..0000000000 --- a/externals/mysql/m_string.h +++ /dev/null @@ -1,393 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* There may be prolems include all of theese. Try to test in - configure with ones are needed? */ - -/* This is needed for the definitions of strchr... on solaris */ - -#ifndef _m_string_h -#define _m_string_h -#ifndef __USE_GNU -#define __USE_GNU /* We want to use stpcpy */ -#endif -#if defined(HAVE_STRINGS_H) -#include -#endif -#if defined(HAVE_STRING_H) -#include -#endif - -/* need by my_vsnprintf */ -#include - -#ifdef _AIX -#undef HAVE_BCMP -#endif - -/* This is needed for the definitions of bzero... on solaris */ -#if defined(HAVE_STRINGS_H) -#include -#endif - -/* This is needed for the definitions of memcpy... on solaris */ -#if defined(HAVE_MEMORY_H) && !defined(__cplusplus) -#include -#endif - -#if !defined(HAVE_MEMCPY) && !defined(HAVE_MEMMOVE) -# define memcpy(d, s, n) bcopy ((s), (d), (n)) -# define memset(A,C,B) bfill((A),(B),(C)) -# define memmove(d, s, n) bmove ((d), (s), (n)) -#elif defined(HAVE_MEMMOVE) -# define bmove(d, s, n) memmove((d), (s), (n)) -#else -# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */ -#endif - -/* Unixware 7 */ -#if !defined(HAVE_BFILL) -# define bfill(A,B,C) memset((A),(C),(B)) -# define bmove_align(A,B,C) memcpy((A),(B),(C)) -#endif - -#if !defined(HAVE_BCMP) -# define bcopy(s, d, n) memcpy((d), (s), (n)) -# define bcmp(A,B,C) memcmp((A),(B),(C)) -# define bzero(A,B) memset((A),0,(B)) -# define bmove_align(A,B,C) memcpy((A),(B),(C)) -#endif - -#if defined(__cplusplus) -extern "C" { -#endif - -/* - my_str_malloc() and my_str_free() are assigned to implementations in - strings/alloc.c, but can be overridden in the calling program. - */ -extern void *(*my_str_malloc)(size_t); -extern void (*my_str_free)(void *); - -#if defined(HAVE_STPCPY) -#define strmov(A,B) stpcpy((A),(B)) -#ifndef stpcpy -extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */ -#endif -#endif - -/* Declared in int2str() */ -extern char NEAR _dig_vec_upper[]; -extern char NEAR _dig_vec_lower[]; - -#ifdef BAD_STRING_COMPILER -#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1) -#else -#define strmov_overlapp(A,B) strmov(A,B) -#define strmake_overlapp(A,B,C) strmake(A,B,C) -#endif - -#ifdef BAD_MEMCPY /* Problem with gcc on Alpha */ -#define memcpy_fixed(A,B,C) bmove((A),(B),(C)) -#else -#define memcpy_fixed(A,B,C) memcpy((A),(B),(C)) -#endif - -#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512) -#define bmove512(A,B,C) memcpy(A,B,C) -#endif - - /* Prototypes for string functions */ - -#if !defined(bfill) && !defined(HAVE_BFILL) -extern void bfill(uchar *dst,size_t len,pchar fill); -#endif - -#if !defined(bzero) && !defined(HAVE_BZERO) -extern void bzero(uchar * dst,size_t len); -#endif - -#if !defined(bcmp) && !defined(HAVE_BCMP) -extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len); -#endif -#ifdef HAVE_purify -extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len); -#undef bcmp -#define bcmp(A,B,C) my_bcmp((A),(B),(C)) -#define bzero_if_purify(A,B) bzero(A,B) -#else -#define bzero_if_purify(A,B) -#endif /* HAVE_purify */ - -#if defined(_lint) || defined(FORCE_INIT_OF_VARS) -#define LINT_INIT_STRUCT(var) bzero(&var, sizeof(var)) /* No uninitialize-warning */ -#else -#define LINT_INIT_STRUCT(var) -#endif - -#ifndef bmove512 -extern void bmove512(uchar *dst,const uchar *src,size_t len); -#endif - -#if !defined(HAVE_BMOVE) && !defined(bmove) -extern void bmove(uuchar *dst, const uchar *src,size_t len); -#endif - -extern void bmove_upp(uchar *dst,const uchar *src,size_t len); -extern void bchange(uchar *dst,size_t old_len,const uchar *src, - size_t new_len,size_t tot_len); -extern void strappend(char *s,size_t len,pchar fill); -extern char *strend(const char *s); -extern char *strcend(const char *, pchar); -extern char *strfield(char *src,int fields,int chars,int blanks, - int tabch); -extern char *strfill(char * s,size_t len,pchar fill); -extern size_t strinstr(const char *str,const char *search); -extern size_t r_strinstr(const char *str, size_t from, const char *search); -extern char *strkey(char *dst,char *head,char *tail,char *flags); -extern char *strmake(char *dst,const char *src,size_t length); -#ifndef strmake_overlapp -extern char *strmake_overlapp(char *dst,const char *src, size_t length); -#endif - -#ifndef strmov -extern char *strmov(char *dst,const char *src); -#endif -extern char *strnmov(char *dst,const char *src,size_t n); -extern char *strsuff(const char *src,const char *suffix); -extern char *strcont(const char *src,const char *set); -extern char *strxcat _VARARGS((char *dst,const char *src, ...)); -extern char *strxmov _VARARGS((char *dst,const char *src, ...)); -extern char *strxcpy _VARARGS((char *dst,const char *src, ...)); -extern char *strxncat _VARARGS((char *dst,size_t len, const char *src, ...)); -extern char *strxnmov _VARARGS((char *dst,size_t len, const char *src, ...)); -extern char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...)); - -/* Prototypes of normal stringfunctions (with may ours) */ - -#ifdef WANT_STRING_PROTOTYPES -extern char *strcat(char *, const char *); -extern char *strchr(const char *, pchar); -extern char *strrchr(const char *, pchar); -extern char *strcpy(char *, const char *); -extern int strcmp(const char *, const char *); -#ifndef __GNUC__ -extern size_t strlen(const char *); -#endif -#endif -#ifndef HAVE_STRNLEN -extern size_t strnlen(const char *s, size_t n); -#endif - -#if !defined(__cplusplus) -#ifndef HAVE_STRPBRK -extern char *strpbrk(const char *, const char *); -#endif -#ifndef HAVE_STRSTR -extern char *strstr(const char *, const char *); -#endif -#endif -extern int is_prefix(const char *, const char *); - -/* Conversion routines */ -typedef enum { - MY_GCVT_ARG_FLOAT, - MY_GCVT_ARG_DOUBLE -} my_gcvt_arg_type; - -double my_strtod(const char *str, char **end, int *error); -double my_atof(const char *nptr); -size_t my_fcvt(double x, int precision, char *to, my_bool *error); -size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to, - my_bool *error); - -#define NOT_FIXED_DEC 31 - -/* - The longest string my_fcvt can return is 311 + "precision" bytes. - Here we assume that we never cal my_fcvt() with precision >= NOT_FIXED_DEC - (+ 1 byte for the terminating '\0'). -*/ -#define FLOATING_POINT_BUFFER (311 + NOT_FIXED_DEC) - -/* - We want to use the 'e' format in some cases even if we have enough space - for the 'f' one just to mimic sprintf("%.15g") behavior for large integers, - and to improve it for numbers < 10^(-4). - That is, for |x| < 1 we require |x| >= 10^(-15), and for |x| > 1 we require - it to be integer and be <= 10^DBL_DIG for the 'f' format to be used. - We don't lose precision, but make cases like "1e200" or "0.00001" look nicer. -*/ -#define MAX_DECPT_FOR_F_FORMAT DBL_DIG - -/* - The maximum possible field width for my_gcvt() conversion. - (DBL_DIG + 2) significant digits + sign + "." + ("e-NNN" or - MAX_DECPT_FOR_F_FORMAT zeros for cases when |x|<1 and the 'f' format is used). -*/ -#define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + max(5, MAX_DECPT_FOR_F_FORMAT)) - - -extern char *llstr(longlong value,char *buff); -extern char *ullstr(longlong value,char *buff); -#ifndef HAVE_STRTOUL -extern long strtol(const char *str, char **ptr, int base); -extern ulong strtoul(const char *str, char **ptr, int base); -#endif - -extern char *int2str(long val, char *dst, int radix, int upcase); -extern char *int10_to_str(long val,char *dst,int radix); -extern char *str2int(const char *src,int radix,long lower,long upper, - long *val); -longlong my_strtoll10(const char *nptr, char **endptr, int *error); -#if SIZEOF_LONG == SIZEOF_LONG_LONG -#define ll2str(A,B,C,D) int2str((A),(B),(C),(D)) -#define longlong2str(A,B,C) int2str((A),(B),(C),1) -#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C)) -#undef strtoll -#define strtoll(A,B,C) strtol((A),(B),(C)) -#define strtoull(A,B,C) strtoul((A),(B),(C)) -#ifndef HAVE_STRTOULL -#define HAVE_STRTOULL -#endif -#ifndef HAVE_STRTOLL -#define HAVE_STRTOLL -#endif -#else -#ifdef HAVE_LONG_LONG -extern char *ll2str(longlong val,char *dst,int radix, int upcase); -#define longlong2str(A,B,C) ll2str((A),(B),(C),1) -extern char *longlong10_to_str(longlong val,char *dst,int radix); -#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO)) -extern longlong strtoll(const char *str, char **ptr, int base); -extern ulonglong strtoull(const char *str, char **ptr, int base); -#endif -#endif -#endif - -/* my_vsnprintf.c */ - -extern size_t my_vsnprintf(char *str, size_t n, - const char *format, va_list ap); -extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...) - ATTRIBUTE_FORMAT(printf, 3, 4); - -#if defined(__cplusplus) -} -#endif - -/* - LEX_STRING -- a pair of a C-string and its length. - (it's part of the plugin API as a MYSQL_LEX_STRING) -*/ - -typedef struct st_mysql_lex_string LEX_STRING; - -#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1)) -#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1)) -#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1)) - -/* A variant with const */ -struct st_mysql_const_lex_string -{ - const char *str; - size_t length; -}; -typedef struct st_mysql_const_lex_string LEX_CSTRING; - -/* A variant with const and unsigned */ -struct st_mysql_const_unsigned_lex_string -{ - const uchar *str; - size_t length; -}; -typedef struct st_mysql_const_unsigned_lex_string LEX_CUSTRING; - -/* SPACE_INT is a word that contains only spaces */ -#if SIZEOF_INT == 4 -#define SPACE_INT 0x20202020 -#elif SIZEOF_INT == 8 -#define SPACE_INT 0x2020202020202020 -#else -#error define the appropriate constant for a word full of spaces -#endif - -/** - Skip trailing space. - - On most systems reading memory in larger chunks (ideally equal to the size of - the chinks that the machine physically reads from memory) causes fewer memory - access loops and hence increased performance. - This is why the 'int' type is used : it's closest to that (according to how - it's defined in C). - So when we determine the amount of whitespace at the end of a string we do - the following : - 1. We divide the string into 3 zones : - a) from the start of the string (__start) to the first multiple - of sizeof(int) (__start_words) - b) from the end of the string (__end) to the last multiple of sizeof(int) - (__end_words) - c) a zone that is aligned to sizeof(int) and can be safely accessed - through an int * - 2. We start comparing backwards from (c) char-by-char. If all we find is - space then we continue - 3. If there are elements in zone (b) we compare them as unsigned ints to a - int mask (SPACE_INT) consisting of all spaces - 4. Finally we compare the remaining part (a) of the string char by char. - This covers for the last non-space unsigned int from 3. (if any) - - This algorithm works well for relatively larger strings, but it will slow - the things down for smaller strings (because of the additional calculations - and checks compared to the naive method). Thus the barrier of length 20 - is added. - - @param ptr pointer to the input string - @param len the length of the string - @return the last non-space character -*/ - -static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len) -{ - const uchar *end= ptr + len; - - if (len > 20) - { - const uchar *end_words= (const uchar *)(intptr) - (((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT); - const uchar *start_words= (const uchar *)(intptr) - ((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT); - - DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT); - if (end_words > ptr) - { - while (end > end_words && end[-1] == 0x20) - end--; - if (end[-1] == 0x20 && start_words < end_words) - while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT) - end -= SIZEOF_INT; - } - } - while (end > ptr && end[-1] == 0x20) - end--; - return (end); -} - -#ifdef SAFEMALLOC -#define TRASH(A,B) bfill(A, B, 0x8F) -#else -#define TRASH(A,B) /* nothing */ -#endif /* SAFEMALLOC */ - -#endif /* _m_string_h */ diff --git a/externals/mysql/my_aes.h b/externals/mysql/my_aes.h deleted file mode 100644 index 8ea128ca26..0000000000 --- a/externals/mysql/my_aes.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -/* Header file for my_aes.c */ -/* Wrapper to give simple interface for MySQL to AES standard encryption */ - -#include "mysys/rijndael.h" - -C_MODE_START - -#define AES_KEY_LENGTH 128 /* Must be 128 192 or 256 */ - -/* - my_aes_encrypt - Crypt buffer with AES encryption algorithm. - source - Pointer to data for encryption - source_length - size of encryption data - dest - buffer to place encrypted data (must be large enough) - key - Key to be used for encryption - kel_length - Length of the key. Will handle keys of any length - - returns - size of encrypted data, or negative in case of error. -*/ - -int my_aes_encrypt(const char *source, int source_length, char *dest, - const char *key, int key_length); - -/* - my_aes_decrypt - DeCrypt buffer with AES encryption algorithm. - source - Pointer to data for decryption - source_length - size of encrypted data - dest - buffer to place decrypted data (must be large enough) - key - Key to be used for decryption - kel_length - Length of the key. Will handle keys of any length - - returns - size of original data, or negative in case of error. -*/ - - -int my_aes_decrypt(const char *source, int source_length, char *dest, - const char *key, int key_length); - -/* - my_aes_get_size - get size of buffer which will be large enough for encrypted - data - source_length - length of data to be encrypted - - returns - size of buffer required to store encrypted data -*/ - -int my_aes_get_size(int source_length); - -C_MODE_END diff --git a/externals/mysql/my_alarm.h b/externals/mysql/my_alarm.h deleted file mode 100644 index dd2d5642f5..0000000000 --- a/externals/mysql/my_alarm.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - File to include when we want to use alarm or a loop_counter to display - some information when a program is running -*/ -#ifndef _my_alarm_h -#define _my_alarm_h -#ifdef __cplusplus -extern "C" { -#endif - -extern int volatile my_have_got_alarm; -extern ulong my_time_to_wait_for_lock; - -#if defined(HAVE_ALARM) && !defined(NO_ALARM_LOOP) -#include -#define ALARM_VARIABLES uint alarm_old=0; \ - sig_return alarm_signal=0 -#define ALARM_INIT my_have_got_alarm=0 ; \ - alarm_old=(uint) alarm(MY_HOW_OFTEN_TO_ALARM); \ - alarm_signal=signal(SIGALRM,my_set_alarm_variable); -#define ALARM_END (void) signal(SIGALRM,alarm_signal); \ - (void) alarm(alarm_old); -#define ALARM_TEST my_have_got_alarm -#ifdef DONT_REMEMBER_SIGNAL -#define ALARM_REINIT (void) alarm(MY_HOW_OFTEN_TO_ALARM); \ - (void) signal(SIGALRM,my_set_alarm_variable);\ - my_have_got_alarm=0; -#else -#define ALARM_REINIT (void) alarm((uint) MY_HOW_OFTEN_TO_ALARM); \ - my_have_got_alarm=0; -#endif /* DONT_REMEMBER_SIGNAL */ -#else -#define ALARM_VARIABLES long alarm_pos=0,alarm_end_pos=MY_HOW_OFTEN_TO_WRITE-1 -#define ALARM_INIT -#define ALARM_END -#define ALARM_TEST (alarm_pos++ >= alarm_end_pos) -#define ALARM_REINIT alarm_end_pos+=MY_HOW_OFTEN_TO_WRITE -#endif /* HAVE_ALARM */ - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/mysql/my_alloc.h b/externals/mysql/my_alloc.h deleted file mode 100644 index 6ade4d0898..0000000000 --- a/externals/mysql/my_alloc.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Data structures for mysys/my_alloc.c (root memory allocator) -*/ - -#ifndef _my_alloc_h -#define _my_alloc_h - -#define ALLOC_MAX_BLOCK_TO_DROP 4096 -#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10 - -typedef struct st_used_mem -{ /* struct for once_alloc (block) */ - struct st_used_mem *next; /* Next block in use */ - size_t left; /* memory left in block */ - size_t size; /* size of block */ -} USED_MEM; - - -typedef struct st_mem_root -{ - USED_MEM *free; /* blocks with free memory in it */ - USED_MEM *used; /* blocks almost without free memory */ - USED_MEM *pre_alloc; /* preallocated block */ - /* if block have less memory it will be put in 'used' list */ - size_t min_malloc; - size_t block_size; /* initial block size */ - unsigned int block_num; /* allocated blocks counter */ - /* - first free block in queue test counter (if it exceed - MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list) - */ - unsigned int first_block_usage; - - void (*error_handler)(void); -} MEM_ROOT; -#endif diff --git a/externals/mysql/my_atomic.h b/externals/mysql/my_atomic.h deleted file mode 100644 index 40b8895657..0000000000 --- a/externals/mysql/my_atomic.h +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright (C) 2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - This header defines five atomic operations: - - my_atomic_add#(&var, what) - add 'what' to *var, and return the old value of *var - - my_atomic_fas#(&var, what) - 'Fetch And Store' - store 'what' in *var, and return the old value of *var - - my_atomic_cas#(&var, &old, new) - 'Compare And Swap' - if *var is equal to *old, then store 'new' in *var, and return TRUE - otherwise store *var in *old, and return FALSE - - my_atomic_load#(&var) - return *var - - my_atomic_store#(&var, what) - store 'what' in *var - - '#' is substituted by a size suffix - 8, 16, 32, or ptr - (e.g. my_atomic_add8, my_atomic_fas32, my_atomic_casptr). - - NOTE This operations are not always atomic, so they always must be - enclosed in my_atomic_rwlock_rdlock(lock)/my_atomic_rwlock_rdunlock(lock) - or my_atomic_rwlock_wrlock(lock)/my_atomic_rwlock_wrunlock(lock). - Hint: if a code block makes intensive use of atomic ops, it make sense - to take/release rwlock once for the whole block, not for every statement. - - On architectures where these operations are really atomic, rwlocks will - be optimized away. - 8- and 16-bit atomics aren't implemented for windows (see generic-msvc.h), - but can be added, if necessary. -*/ - -#ifndef my_atomic_rwlock_init - -#define intptr void * - -#ifndef MY_ATOMIC_MODE_RWLOCKS -#include "atomic/nolock.h" -#endif - -#ifndef make_atomic_cas_body -/* nolock.h was not able to generate even a CAS function, fall back */ -#include "atomic/rwlock.h" -#else -/* define missing functions by using the already generated ones */ -#ifndef make_atomic_add_body -#define make_atomic_add_body(S) \ - int ## S tmp=*a; \ - while (!my_atomic_cas ## S(a, &tmp, tmp+v)); \ - v=tmp; -#endif -#ifndef make_atomic_fas_body -#define make_atomic_fas_body(S) \ - int ## S tmp=*a; \ - while (!my_atomic_cas ## S(a, &tmp, v)); \ - v=tmp; -#endif -#ifndef make_atomic_load_body -#define make_atomic_load_body(S) \ - ret= 0; /* avoid compiler warning */ \ - (void)(my_atomic_cas ## S(a, &ret, ret)); -#endif -#ifndef make_atomic_store_body -#define make_atomic_store_body(S) \ - (void)(my_atomic_fas ## S (a, v)); -#endif -#endif - -/* - transparent_union doesn't work in g++ - Bug ? - - Darwin's gcc doesn't want to put pointers in a transparent_union - when built with -arch ppc64. Complains: - warning: 'transparent_union' attribute ignored -*/ -#if defined(__GNUC__) && !defined(__cplusplus) && \ - ! (defined(__APPLE__) && defined(_ARCH_PPC64)) -/* - we want to be able to use my_atomic_xxx functions with - both signed and unsigned integers. But gcc will issue a warning - "passing arg N of `my_atomic_XXX' as [un]signed due to prototype" - if the signedness of the argument doesn't match the prototype, or - "pointer targets in passing argument N of my_atomic_XXX differ in signedness" - if int* is used where uint* is expected (or vice versa). - Let's shut these warnings up -*/ -#define make_transparent_unions(S) \ - typedef union { \ - int ## S i; \ - uint ## S u; \ - } U_ ## S __attribute__ ((transparent_union)); \ - typedef union { \ - int ## S volatile *i; \ - uint ## S volatile *u; \ - } Uv_ ## S __attribute__ ((transparent_union)); -#define uintptr intptr -make_transparent_unions(8) -make_transparent_unions(16) -make_transparent_unions(32) -make_transparent_unions(ptr) -#undef uintptr -#undef make_transparent_unions -#define a U_a.i -#define cmp U_cmp.i -#define v U_v.i -#define set U_set.i -#else -#define U_32 int32 -#define U_ptr intptr -#define Uv_32 int32 -#define Uv_ptr intptr -#define U_a volatile *a -#define U_cmp *cmp -#define U_v v -#define U_set set -#endif /* __GCC__ transparent_union magic */ - -#ifdef HAVE_INLINE - -#define make_atomic_cas(S) \ -STATIC_INLINE int my_atomic_cas ## S(Uv_ ## S U_a, \ - Uv_ ## S U_cmp, U_ ## S U_set) \ -{ \ - int8 ret; \ - make_atomic_cas_body(S); \ - return ret; \ -} - -#define make_atomic_add(S) \ -STATIC_INLINE int ## S my_atomic_add ## S( \ - Uv_ ## S U_a, U_ ## S U_v) \ -{ \ - make_atomic_add_body(S); \ - return v; \ -} - -#define make_atomic_fas(S) \ -STATIC_INLINE int ## S my_atomic_fas ## S( \ - Uv_ ## S U_a, U_ ## S U_v) \ -{ \ - make_atomic_fas_body(S); \ - return v; \ -} - -#define make_atomic_load(S) \ -STATIC_INLINE int ## S my_atomic_load ## S(Uv_ ## S U_a) \ -{ \ - int ## S ret; \ - make_atomic_load_body(S); \ - return ret; \ -} - -#define make_atomic_store(S) \ -STATIC_INLINE void my_atomic_store ## S( \ - Uv_ ## S U_a, U_ ## S U_v) \ -{ \ - make_atomic_store_body(S); \ -} - -#else /* no inline functions */ - -#define make_atomic_add(S) \ -extern int ## S my_atomic_add ## S(Uv_ ## S U_a, U_ ## S U_v); - -#define make_atomic_fas(S) \ -extern int ## S my_atomic_fas ## S(Uv_ ## S U_a, U_ ## S U_v); - -#define make_atomic_cas(S) \ -extern int my_atomic_cas ## S(Uv_ ## S U_a, Uv_ ## S U_cmp, U_ ## S U_set); - -#define make_atomic_load(S) \ -extern int ## S my_atomic_load ## S(Uv_ ## S U_a); - -#define make_atomic_store(S) \ -extern void my_atomic_store ## S(Uv_ ## S U_a, U_ ## S U_v); - -#endif - -make_atomic_cas(32) -make_atomic_cas(ptr) - -make_atomic_add(32) - -make_atomic_load(32) -make_atomic_load(ptr) - -make_atomic_fas(32) -make_atomic_fas(ptr) - -make_atomic_store(32) -make_atomic_store(ptr) - -#ifdef _atomic_h_cleanup_ -#include _atomic_h_cleanup_ -#undef _atomic_h_cleanup_ -#endif - -#undef U_32 -#undef U_ptr -#undef a -#undef cmp -#undef v -#undef set -#undef U_a -#undef U_cmp -#undef U_v -#undef U_set -#undef make_atomic_add -#undef make_atomic_cas -#undef make_atomic_load -#undef make_atomic_store -#undef make_atomic_fas -#undef make_atomic_add_body -#undef make_atomic_cas_body -#undef make_atomic_load_body -#undef make_atomic_store_body -#undef make_atomic_fas_body -#undef intptr - -/* - the macro below defines (as an expression) the code that - will be run in spin-loops. Intel manuals recummend to have PAUSE there. - It is expected to be defined in include/atomic/ *.h files -*/ -#ifndef LF_BACKOFF -#define LF_BACKOFF (1) -#endif - -#define MY_ATOMIC_OK 0 -#define MY_ATOMIC_NOT_1CPU 1 -extern int my_atomic_initialize(); - -#endif - diff --git a/externals/mysql/my_attribute.h b/externals/mysql/my_attribute.h deleted file mode 100644 index 8309d85f20..0000000000 --- a/externals/mysql/my_attribute.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Helper macros used for setting different __attributes__ - on functions in a portable fashion -*/ - -#ifndef _my_attribute_h -#define _my_attribute_h - -/* - Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers. - Some forms of __attribute__ are actually supported in earlier versions of - g++, but we just disable them all because we only use them to generate - compilation warnings. -*/ -#ifndef __attribute__ -# if !defined(__GNUC__) -# define __attribute__(A) -# elif GCC_VERSION < 2008 -# define __attribute__(A) -# elif defined(__cplusplus) && GCC_VERSION < 3004 -# define __attribute__(A) -# endif -#endif - -/* - __attribute__((format(...))) is only supported in gcc >= 2.8 and g++ >= 3.4 - But that's already covered by the __attribute__ tests above, so this is - just a convenience macro. -*/ -#ifndef ATTRIBUTE_FORMAT -# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n))) -#endif - -/* - - __attribute__((format(...))) on a function pointer is not supported - until gcc 3.1 -*/ -#ifndef ATTRIBUTE_FORMAT_FPTR -# if (GCC_VERSION >= 3001) -# define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n) -# else -# define ATTRIBUTE_FORMAT_FPTR(style, m, n) -# endif /* GNUC >= 3.1 */ -#endif - - -#endif diff --git a/externals/mysql/my_base.h b/externals/mysql/my_base.h deleted file mode 100644 index e228b3975d..0000000000 --- a/externals/mysql/my_base.h +++ /dev/null @@ -1,626 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This file includes constants used with all databases */ - -#ifndef _my_base_h -#define _my_base_h - -#ifndef stdin /* Included first in handler */ -#define CHSIZE_USED -#include -#include /* This includes types */ -#include -#include -#include - -#ifndef EOVERFLOW -#define EOVERFLOW 84 -#endif - -#if !defined(USE_MY_FUNC) && !defined(THREAD) -#include /* For faster code, after test */ -#endif /* USE_MY_FUNC */ -#endif /* stdin */ -#include - -/* The following is bits in the flag parameter to ha_open() */ - -#define HA_OPEN_ABORT_IF_LOCKED 0 /* default */ -#define HA_OPEN_WAIT_IF_LOCKED 1 -#define HA_OPEN_IGNORE_IF_LOCKED 2 -#define HA_OPEN_TMP_TABLE 4 /* Table is a temp table */ -#define HA_OPEN_DELAY_KEY_WRITE 8 /* Don't update index */ -#define HA_OPEN_ABORT_IF_CRASHED 16 -#define HA_OPEN_FOR_REPAIR 32 /* open even if crashed */ -#define HA_OPEN_FROM_SQL_LAYER 64 -#define HA_OPEN_MMAP 128 /* open memory mapped */ -#define HA_OPEN_COPY 256 /* Open copy (for repair) */ -/* Internal temp table, used for temporary results */ -#define HA_OPEN_INTERNAL_TABLE 512 - -/* The following is parameter to ha_rkey() how to use key */ - -/* - We define a complete-field prefix of a key value as a prefix where - the last included field in the prefix contains the full field, not - just some bytes from the start of the field. A partial-field prefix - is allowed to contain only a few first bytes from the last included - field. - - Below HA_READ_KEY_EXACT, ..., HA_READ_BEFORE_KEY can take a - complete-field prefix of a key value as the search - key. HA_READ_PREFIX and HA_READ_PREFIX_LAST could also take a - partial-field prefix, but currently (4.0.10) they are only used with - complete-field prefixes. MySQL uses a padding trick to implement - LIKE 'abc%' queries. - - NOTE that in InnoDB HA_READ_PREFIX_LAST will NOT work with a - partial-field prefix because InnoDB currently strips spaces from the - end of varchar fields! -*/ - -enum ha_rkey_function { - HA_READ_KEY_EXACT, /* Find first record else error */ - HA_READ_KEY_OR_NEXT, /* Record or next record */ - HA_READ_KEY_OR_PREV, /* Record or previous */ - HA_READ_AFTER_KEY, /* Find next rec. after key-record */ - HA_READ_BEFORE_KEY, /* Find next rec. before key-record */ - HA_READ_PREFIX, /* Key which as same prefix */ - HA_READ_PREFIX_LAST, /* Last key with the same prefix */ - HA_READ_PREFIX_LAST_OR_PREV, /* Last or prev key with the same prefix */ - HA_READ_MBR_CONTAIN, - HA_READ_MBR_INTERSECT, - HA_READ_MBR_WITHIN, - HA_READ_MBR_DISJOINT, - HA_READ_MBR_EQUAL -}; - - /* Key algorithm types */ - -enum ha_key_alg { - HA_KEY_ALG_UNDEF= 0, /* Not specified (old file) */ - HA_KEY_ALG_BTREE= 1, /* B-tree, default one */ - HA_KEY_ALG_RTREE= 2, /* R-tree, for spatial searches */ - HA_KEY_ALG_HASH= 3, /* HASH keys (HEAP tables) */ - HA_KEY_ALG_FULLTEXT= 4 /* FULLTEXT (MyISAM tables) */ -}; - - /* Index and table build methods */ - -enum ha_build_method { - HA_BUILD_DEFAULT, - HA_BUILD_ONLINE, - HA_BUILD_OFFLINE -}; - - /* Storage media types */ - -enum ha_storage_media { - HA_SM_DEFAULT= 0, /* Not specified (engine default) */ - HA_SM_DISK= 1, /* DISK storage */ - HA_SM_MEMORY= 2 /* MAIN MEMORY storage */ -}; - - /* The following is parameter to ha_extra() */ - -enum ha_extra_function { - HA_EXTRA_NORMAL=0, /* Optimize for space (def) */ - HA_EXTRA_QUICK=1, /* Optimize for speed */ - HA_EXTRA_NOT_USED=2, - HA_EXTRA_CACHE=3, /* Cache record in HA_rrnd() */ - HA_EXTRA_NO_CACHE=4, /* End caching of records (def) */ - HA_EXTRA_NO_READCHECK=5, /* No readcheck on update */ - HA_EXTRA_READCHECK=6, /* Use readcheck (def) */ - HA_EXTRA_KEYREAD=7, /* Read only key to database */ - HA_EXTRA_NO_KEYREAD=8, /* Normal read of records (def) */ - HA_EXTRA_NO_USER_CHANGE=9, /* No user is allowed to write */ - HA_EXTRA_KEY_CACHE=10, - HA_EXTRA_NO_KEY_CACHE=11, - HA_EXTRA_WAIT_LOCK=12, /* Wait until file is avalably (def) */ - HA_EXTRA_NO_WAIT_LOCK=13, /* If file is locked, return quickly */ - HA_EXTRA_WRITE_CACHE=14, /* Use write cache in ha_write() */ - HA_EXTRA_FLUSH_CACHE=15, /* flush write_record_cache */ - HA_EXTRA_NO_KEYS=16, /* Remove all update of keys */ - HA_EXTRA_KEYREAD_CHANGE_POS=17, /* Keyread, but change pos */ - /* xxxxchk -r must be used */ - HA_EXTRA_REMEMBER_POS=18, /* Remember pos for next/prev */ - HA_EXTRA_RESTORE_POS=19, - HA_EXTRA_REINIT_CACHE=20, /* init cache from current record */ - HA_EXTRA_FORCE_REOPEN=21, /* Datafile have changed on disk */ - HA_EXTRA_FLUSH, /* Flush tables to disk */ - HA_EXTRA_NO_ROWS, /* Don't write rows */ - HA_EXTRA_RESET_STATE, /* Reset positions */ - HA_EXTRA_IGNORE_DUP_KEY, /* Dup keys don't rollback everything*/ - HA_EXTRA_NO_IGNORE_DUP_KEY, - HA_EXTRA_PREPARE_FOR_DROP, - HA_EXTRA_PREPARE_FOR_UPDATE, /* Remove read cache if problems */ - HA_EXTRA_PRELOAD_BUFFER_SIZE, /* Set buffer size for preloading */ - /* - On-the-fly switching between unique and non-unique key inserting. - */ - HA_EXTRA_CHANGE_KEY_TO_UNIQUE, - HA_EXTRA_CHANGE_KEY_TO_DUP, - /* - When using HA_EXTRA_KEYREAD, overwrite only key member fields and keep - other fields intact. When this is off (by default) InnoDB will use memcpy - to overwrite entire row. - */ - HA_EXTRA_KEYREAD_PRESERVE_FIELDS, - HA_EXTRA_MMAP, - /* - Ignore if the a tuple is not found, continue processing the - transaction and ignore that 'row'. Needed for idempotency - handling on the slave - - Currently only used by NDB storage engine. Partition handler ignores flag. - */ - HA_EXTRA_IGNORE_NO_KEY, - HA_EXTRA_NO_IGNORE_NO_KEY, - /* - Mark the table as a log table. For some handlers (e.g. CSV) this results - in a special locking for the table. - */ - HA_EXTRA_MARK_AS_LOG_TABLE, - /* - Informs handler that write_row() which tries to insert new row into the - table and encounters some already existing row with same primary/unique - key can replace old row with new row instead of reporting error (basically - it informs handler that we do REPLACE instead of simple INSERT). - Off by default. - */ - HA_EXTRA_WRITE_CAN_REPLACE, - HA_EXTRA_WRITE_CANNOT_REPLACE, - /* - Inform handler that delete_row()/update_row() cannot batch deletes/updates - and should perform them immediately. This may be needed when table has - AFTER DELETE/UPDATE triggers which access to subject table. - These flags are reset by the handler::extra(HA_EXTRA_RESET) call. - */ - HA_EXTRA_DELETE_CANNOT_BATCH, - HA_EXTRA_UPDATE_CANNOT_BATCH, - /* - Inform handler that an "INSERT...ON DUPLICATE KEY UPDATE" will be - executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY. - */ - HA_EXTRA_INSERT_WITH_UPDATE, - /* Inform handler that we will do a rename */ - HA_EXTRA_PREPARE_FOR_RENAME, - /* - Special actions for MERGE tables. - */ - HA_EXTRA_ADD_CHILDREN_LIST, - HA_EXTRA_ATTACH_CHILDREN, - HA_EXTRA_IS_ATTACHED_CHILDREN, - HA_EXTRA_DETACH_CHILDREN, - HA_EXTRA_ORDERBY_LIMIT, - HA_EXTRA_NO_ORDERBY_LIMIT, - /* Inform handler we will force a close as part of flush */ - HA_EXTRA_PREPARE_FOR_FORCED_CLOSE, - HA_EXTRA_ALLOW_LOG_DELETE -}; - -/* Compatible option, to be deleted in 6.0 */ -#define HA_EXTRA_PREPARE_FOR_DELETE HA_EXTRA_PREPARE_FOR_DROP - - /* The following is parameter to ha_panic() */ - -enum ha_panic_function { - HA_PANIC_CLOSE, /* Close all databases */ - HA_PANIC_WRITE, /* Unlock and write status */ - HA_PANIC_READ /* Lock and read keyinfo */ -}; - - /* The following is parameter to ha_create(); keytypes */ - -enum ha_base_keytype { - HA_KEYTYPE_END=0, - HA_KEYTYPE_TEXT=1, /* Key is sorted as letters */ - HA_KEYTYPE_BINARY=2, /* Key is sorted as unsigned chars */ - HA_KEYTYPE_SHORT_INT=3, - HA_KEYTYPE_LONG_INT=4, - HA_KEYTYPE_FLOAT=5, - HA_KEYTYPE_DOUBLE=6, - HA_KEYTYPE_NUM=7, /* Not packed num with pre-space */ - HA_KEYTYPE_USHORT_INT=8, - HA_KEYTYPE_ULONG_INT=9, - HA_KEYTYPE_LONGLONG=10, - HA_KEYTYPE_ULONGLONG=11, - HA_KEYTYPE_INT24=12, - HA_KEYTYPE_UINT24=13, - HA_KEYTYPE_INT8=14, - /* Varchar (0-255 bytes) with length packed with 1 byte */ - HA_KEYTYPE_VARTEXT1=15, /* Key is sorted as letters */ - HA_KEYTYPE_VARBINARY1=16, /* Key is sorted as unsigned chars */ - /* Varchar (0-65535 bytes) with length packed with 2 bytes */ - HA_KEYTYPE_VARTEXT2=17, /* Key is sorted as letters */ - HA_KEYTYPE_VARBINARY2=18, /* Key is sorted as unsigned chars */ - HA_KEYTYPE_BIT=19 -}; - -#define HA_MAX_KEYTYPE 31 /* Must be log2-1 */ - -/* - These flags kan be OR:ed to key-flag - Note that these can only be up to 16 bits! -*/ - -#define HA_NOSAME 1 /* Set if not dupplicated records */ -#define HA_PACK_KEY 2 /* Pack string key to previous key */ -#define HA_AUTO_KEY 16 -#define HA_BINARY_PACK_KEY 32 /* Packing of all keys to prev key */ -#define HA_FULLTEXT 128 /* For full-text search */ -#define HA_UNIQUE_CHECK 256 /* Check the key for uniqueness */ -#define HA_SPATIAL 1024 /* For spatial search */ -#define HA_NULL_ARE_EQUAL 2048 /* NULL in key are cmp as equal */ -#define HA_GENERATED_KEY 8192 /* Automaticly generated key */ -#define HA_RTREE_INDEX 16384 /* For RTREE search */ - - /* The combination of the above can be used for key type comparison. */ -#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \ - HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \ - HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY | \ - HA_RTREE_INDEX) - -#define HA_KEY_HAS_PART_KEY_SEG 65536 /* Key contains partial segments */ - - /* Automatic bits in key-flag */ - -#define HA_SPACE_PACK_USED 4 /* Test for if SPACE_PACK used */ -#define HA_VAR_LENGTH_KEY 8 -#define HA_NULL_PART_KEY 64 -#define HA_USES_COMMENT 4096 -#define HA_USES_PARSER 16384 /* Fulltext index uses [pre]parser */ -#define HA_USES_BLOCK_SIZE ((uint) 32768) -#define HA_SORT_ALLOWS_SAME 512 /* Intern bit when sorting records */ -#if MYSQL_VERSION_ID < 0x50200 -/* - Key has a part that can have end space. If this is an unique key - we have to handle it differently from other unique keys as we can find - many matching rows for one key (because end space are not compared) -*/ -#define HA_END_SPACE_KEY 0 /* was: 4096 */ -#else -#error HA_END_SPACE_KEY is obsolete, please remove it -#endif - - - /* These flags can be added to key-seg-flag */ - -#define HA_SPACE_PACK 1 /* Pack space in key-seg */ -#define HA_PART_KEY_SEG 4 /* Used by MySQL for part-key-cols */ -#define HA_VAR_LENGTH_PART 8 -#define HA_NULL_PART 16 -#define HA_BLOB_PART 32 -#define HA_SWAP_KEY 64 -#define HA_REVERSE_SORT 128 /* Sort key in reverse order */ -#define HA_NO_SORT 256 /* do not bother sorting on this keyseg */ -/* - End space in unique/varchar are considered equal. (Like 'a' and 'a ') - Only needed for internal temporary tables. -*/ -#define HA_END_SPACE_ARE_EQUAL 512 -#define HA_BIT_PART 1024 - - /* optionbits for database */ -#define HA_OPTION_PACK_RECORD 1 -#define HA_OPTION_PACK_KEYS 2 -#define HA_OPTION_COMPRESS_RECORD 4 -#define HA_OPTION_LONG_BLOB_PTR 8 /* new ISAM format */ -#define HA_OPTION_TMP_TABLE 16 -#define HA_OPTION_CHECKSUM 32 -#define HA_OPTION_DELAY_KEY_WRITE 64 -#define HA_OPTION_NO_PACK_KEYS 128 /* Reserved for MySQL */ -#define HA_OPTION_CREATE_FROM_ENGINE 256 -#define HA_OPTION_RELIES_ON_SQL_LAYER 512 -#define HA_OPTION_NULL_FIELDS 1024 -#define HA_OPTION_PAGE_CHECKSUM 2048 -#define HA_OPTION_TEMP_COMPRESS_RECORD (1L << 15) /* set by isamchk */ -#define HA_OPTION_READ_ONLY_DATA (1L << 16) /* Set by isamchk */ -#define HA_OPTION_NO_CHECKSUM (1L << 17) -#define HA_OPTION_NO_DELAY_KEY_WRITE (1L << 18) - - /* Bits in flag to create() */ - -#define HA_DONT_TOUCH_DATA 1 /* Don't empty datafile (isamchk) */ -#define HA_PACK_RECORD 2 /* Request packed record format */ -#define HA_CREATE_TMP_TABLE 4 -#define HA_CREATE_CHECKSUM 8 -#define HA_CREATE_KEEP_FILES 16 /* don't overwrite .MYD and MYI */ -#define HA_CREATE_PAGE_CHECKSUM 32 -#define HA_CREATE_DELAY_KEY_WRITE 64 -#define HA_CREATE_RELIES_ON_SQL_LAYER 128 - -/* - The following flags (OR-ed) are passed to handler::info() method. - The method copies misc handler information out of the storage engine - to data structures accessible from MySQL - - Same flags are also passed down to mi_status, myrg_status, etc. -*/ - -/* this one is not used */ -#define HA_STATUS_POS 1 -/* - assuming the table keeps shared actual copy of the 'info' and - local, possibly outdated copy, the following flag means that - it should not try to get the actual data (locking the shared structure) - slightly outdated version will suffice -*/ -#define HA_STATUS_NO_LOCK 2 -/* update the time of the last modification (in handler::update_time) */ -#define HA_STATUS_TIME 4 -/* - update the 'constant' part of the info: - handler::max_data_file_length, max_index_file_length, create_time - sortkey, ref_length, block_size, data_file_name, index_file_name. - handler::table->s->keys_in_use, keys_for_keyread, rec_per_key -*/ -#define HA_STATUS_CONST 8 -/* - update the 'variable' part of the info: - handler::records, deleted, data_file_length, index_file_length, - delete_length, check_time, mean_rec_length -*/ -#define HA_STATUS_VARIABLE 16 -/* - get the information about the key that caused last duplicate value error - update handler::errkey and handler::dupp_ref - see handler::get_dup_key() -*/ -#define HA_STATUS_ERRKEY 32 -/* - update handler::auto_increment_value -*/ -#define HA_STATUS_AUTO 64 - -/* - Errorcodes given by handler functions - - opt_sum_query() assumes these codes are > 1 - Do not add error numbers before HA_ERR_FIRST. - If necessary to add lower numbers, change HA_ERR_FIRST accordingly. -*/ -#define HA_ERR_FIRST 120 /* Copy of first error nr.*/ - -#define HA_ERR_KEY_NOT_FOUND 120 /* Didn't find key on read or update */ -#define HA_ERR_FOUND_DUPP_KEY 121 /* Dupplicate key on write */ -#define HA_ERR_INTERNAL_ERROR 122 /* Internal error */ -#define HA_ERR_RECORD_CHANGED 123 /* Uppdate with is recoverable */ -#define HA_ERR_WRONG_INDEX 124 /* Wrong index given to function */ -#define HA_ERR_CRASHED 126 /* Indexfile is crashed */ -#define HA_ERR_WRONG_IN_RECORD 127 /* Record-file is crashed */ -#define HA_ERR_OUT_OF_MEM 128 /* Record-file is crashed */ -#define HA_ERR_NOT_A_TABLE 130 /* not a MYI file - no signature */ -#define HA_ERR_WRONG_COMMAND 131 /* Command not supported */ -#define HA_ERR_OLD_FILE 132 /* old databasfile */ -#define HA_ERR_NO_ACTIVE_RECORD 133 /* No record read in update() */ -#define HA_ERR_RECORD_DELETED 134 /* A record is not there */ -#define HA_ERR_RECORD_FILE_FULL 135 /* No more room in file */ -#define HA_ERR_INDEX_FILE_FULL 136 /* No more room in file */ -#define HA_ERR_END_OF_FILE 137 /* end in next/prev/first/last */ -#define HA_ERR_UNSUPPORTED 138 /* unsupported extension used */ -#define HA_ERR_TO_BIG_ROW 139 /* Too big row */ -#define HA_WRONG_CREATE_OPTION 140 /* Wrong create option */ -#define HA_ERR_FOUND_DUPP_UNIQUE 141 /* Dupplicate unique on write */ -#define HA_ERR_UNKNOWN_CHARSET 142 /* Can't open charset */ -#define HA_ERR_WRONG_MRG_TABLE_DEF 143 /* conflicting tables in MERGE */ -#define HA_ERR_CRASHED_ON_REPAIR 144 /* Last (automatic?) repair failed */ -#define HA_ERR_CRASHED_ON_USAGE 145 /* Table must be repaired */ -#define HA_ERR_LOCK_WAIT_TIMEOUT 146 -#define HA_ERR_LOCK_TABLE_FULL 147 -#define HA_ERR_READ_ONLY_TRANSACTION 148 /* Updates not allowed */ -#define HA_ERR_LOCK_DEADLOCK 149 -#define HA_ERR_CANNOT_ADD_FOREIGN 150 /* Cannot add a foreign key constr. */ -#define HA_ERR_NO_REFERENCED_ROW 151 /* Cannot add a child row */ -#define HA_ERR_ROW_IS_REFERENCED 152 /* Cannot delete a parent row */ -#define HA_ERR_NO_SAVEPOINT 153 /* No savepoint with that name */ -#define HA_ERR_NON_UNIQUE_BLOCK_SIZE 154 /* Non unique key block size */ -#define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */ -#define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */ -#define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */ -/* NULLs are not supported in spatial index */ -#define HA_ERR_NULL_IN_SPATIAL 158 -#define HA_ERR_TABLE_DEF_CHANGED 159 /* The table changed in storage engine */ -/* There's no partition in table for given value */ -#define HA_ERR_NO_PARTITION_FOUND 160 -#define HA_ERR_RBR_LOGGING_FAILED 161 /* Row-based binlogging of row failed */ -#define HA_ERR_DROP_INDEX_FK 162 /* Index needed in foreign key constr */ -/* - Upholding foreign key constraints would lead to a duplicate key error - in some other table. -*/ -#define HA_ERR_FOREIGN_DUPLICATE_KEY 163 -/* The table changed in storage engine */ -#define HA_ERR_TABLE_NEEDS_UPGRADE 164 -#define HA_ERR_TABLE_READONLY 165 /* The table is not writable */ - -#define HA_ERR_AUTOINC_READ_FAILED 166 /* Failed to get next autoinc value */ -#define HA_ERR_AUTOINC_ERANGE 167 /* Failed to set row autoinc value */ -#define HA_ERR_GENERIC 168 /* Generic error */ -/* row not actually updated: new values same as the old values */ -#define HA_ERR_RECORD_IS_THE_SAME 169 -/* It is not possible to log this statement */ -#define HA_ERR_LOGGING_IMPOSSIBLE 170 -#define HA_ERR_TABLESPACE_EXIST 171 -/* The event was corrupt, leading to illegal data being read */ -#define HA_ERR_CORRUPT_EVENT 172 -#define HA_ERR_NEW_FILE 173 /* New file format */ -/* The event could not be processed no other handler error happened */ -#define HA_ERR_ROWS_EVENT_APPLY 174 -#define HA_ERR_INITIALIZATION 175 /* Error during initialization */ -#define HA_ERR_FILE_TOO_SHORT 176 /* File too short */ -#define HA_ERR_WRONG_CRC 177 /* Wrong CRC on page */ -#define HA_ERR_LOCK_OR_ACTIVE_TRANSACTION 178 -#define HA_ERR_NO_SUCH_TABLESPACE 179 -#define HA_ERR_TABLESPACE_NOT_EMPTY 180 -#define HA_ERR_TABLESPACE_DATAFILE_EXIST 181 -#define HA_ERR_ROW_NOT_VISIBLE 182 -#define HA_ERR_LAST 182 /* Copy of last error nr */ - -/* Number of different errors */ -#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) - - /* Other constants */ - -#define HA_NAMELEN 64 /* Max length of saved filename */ -#define NO_SUCH_KEY (~(uint)0) /* used as a key no. */ - -typedef ulong key_part_map; -#define HA_WHOLE_KEY (~(key_part_map)0) - - /* Intern constants in databases */ - - /* bits in _search */ -#define SEARCH_FIND 1 -#define SEARCH_NO_FIND 2 -#define SEARCH_SAME 4 -#define SEARCH_BIGGER 8 -#define SEARCH_SMALLER 16 -#define SEARCH_SAVE_BUFF 32 -#define SEARCH_UPDATE 64 -#define SEARCH_PREFIX 128 -#define SEARCH_LAST 256 -#define MBR_CONTAIN 512 -#define MBR_INTERSECT 1024 -#define MBR_WITHIN 2048 -#define MBR_DISJOINT 4096 -#define MBR_EQUAL 8192 -#define MBR_DATA 16384 -#define SEARCH_NULL_ARE_EQUAL 32768 /* NULL in keys are equal */ -#define SEARCH_NULL_ARE_NOT_EQUAL 65536 /* NULL in keys are not equal */ -/* Use this when inserting a key in position order */ -#define SEARCH_INSERT SEARCH_NULL_ARE_NOT_EQUAL*2 -/* Only part of the key is specified while reading */ -#define SEARCH_PART_KEY SEARCH_INSERT*2 -/* Used when user key (key 2) contains transaction id's */ -#define SEARCH_USER_KEY_HAS_TRANSID SEARCH_PART_KEY*2 -/* Used when page key (key 1) contains transaction id's */ -#define SEARCH_PAGE_KEY_HAS_TRANSID SEARCH_USER_KEY_HAS_TRANSID*2 - - /* bits in opt_flag */ -#define QUICK_USED 1 -#define READ_CACHE_USED 2 -#define READ_CHECK_USED 4 -#define KEY_READ_USED 8 -#define WRITE_CACHE_USED 16 -#define OPT_NO_ROWS 32 - - /* bits in update */ -#define HA_STATE_CHANGED 1 /* Database has changed */ -#define HA_STATE_AKTIV 2 /* Has a current record */ -#define HA_STATE_WRITTEN 4 /* Record is written */ -#define HA_STATE_DELETED 8 -#define HA_STATE_NEXT_FOUND 16 /* Next found record (record before) */ -#define HA_STATE_PREV_FOUND 32 /* Prev found record (record after) */ -#define HA_STATE_NO_KEY 64 /* Last read didn't find record */ -#define HA_STATE_KEY_CHANGED 128 -#define HA_STATE_WRITE_AT_END 256 /* set in _ps_find_writepos */ -#define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */ -#define HA_STATE_ROW_CHANGED 1024 /* To invalide ROW cache */ -#define HA_STATE_EXTEND_BLOCK 2048 -#define HA_STATE_RNEXT_SAME 4096 /* rnext_same occupied lastkey2 */ - -/* myisampack expects no more than 32 field types. */ -enum en_fieldtype { - FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIP_ENDSPACE,FIELD_SKIP_PRESPACE, - FIELD_SKIP_ZERO,FIELD_BLOB,FIELD_CONSTANT,FIELD_INTERVALL,FIELD_ZERO, - FIELD_VARCHAR,FIELD_CHECK, - FIELD_enum_val_count -}; - -enum data_file_type { - STATIC_RECORD, DYNAMIC_RECORD, COMPRESSED_RECORD, BLOCK_RECORD -}; - -/* For key ranges */ - -/* from -inf */ -#define NO_MIN_RANGE 1 - -/* to +inf */ -#define NO_MAX_RANGE 2 - -/* X < key, i.e. not including the left endpoint */ -#define NEAR_MIN 4 - -/* X > key, i.e. not including the right endpoint */ -#define NEAR_MAX 8 - -/* - This flag means that index is a unique index, and the interval is - equivalent to "AND(keypart_i = const_i)", where all of const_i are not NULLs. -*/ -#define UNIQUE_RANGE 16 - -/* - This flag means that the interval is equivalent to - "AND(keypart_i = const_i)", where not all key parts may be used but all of - const_i are not NULLs. -*/ -#define EQ_RANGE 32 - -/* - This flag has the same meaning as UNIQUE_RANGE, except that for at least - one keypart the condition is "keypart IS NULL". -*/ -#define NULL_RANGE 64 - -#define GEOM_FLAG 128 - -#define SKIP_RANGE 256 -#define EMPTY_RANGE 512 - -typedef struct st_key_range -{ - const uchar *key; - uint length; - key_part_map keypart_map; - enum ha_rkey_function flag; -} key_range; - -typedef struct st_key_multi_range -{ - key_range start_key; - key_range end_key; - char *ptr; /* Free to use by caller (ptr to row etc) */ - uint range_flag; /* key range flags see above */ -} KEY_MULTI_RANGE; - - -/* For number of records */ -#ifdef BIG_TABLES -#define rows2double(A) ulonglong2double(A) -typedef my_off_t ha_rows; -#else -#define rows2double(A) (double) (A) -typedef ulong ha_rows; -#endif - -#define HA_POS_ERROR (~ (ha_rows) 0) -#define HA_OFFSET_ERROR (~ (my_off_t) 0) - -#if SYSTEM_SIZEOF_OFF_T == 4 -#define MAX_FILE_SIZE INT_MAX32 -#else -#define MAX_FILE_SIZE LONGLONG_MAX -#endif - -#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2) - -/* invalidator function reference for Query Cache */ -typedef void (* invalidator_by_filename)(const char * filename); - -#endif /* _my_base_h */ diff --git a/externals/mysql/my_bit.h b/externals/mysql/my_bit.h deleted file mode 100644 index 2e464e8904..0000000000 --- a/externals/mysql/my_bit.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - Some useful bit functions -*/ - -C_MODE_START -#ifdef HAVE_INLINE - -extern const char _my_bits_nbits[256]; -extern const uchar _my_bits_reverse_table[256]; - -/* - Find smallest X in 2^X >= value - This can be used to divide a number with value by doing a shift instead -*/ - -STATIC_INLINE uint my_bit_log2(ulong value) -{ - uint bit; - for (bit=0 ; value > 1 ; value>>=1, bit++) ; - return bit; -} - -STATIC_INLINE uint my_count_bits(ulonglong v) -{ -#if SIZEOF_LONG_LONG > 4 - /* The following code is a bit faster on 16 bit machines than if we would - only shift v */ - ulong v2=(ulong) (v >> 32); - return (uint) (uchar) (_my_bits_nbits[(uchar) v] + - _my_bits_nbits[(uchar) (v >> 8)] + - _my_bits_nbits[(uchar) (v >> 16)] + - _my_bits_nbits[(uchar) (v >> 24)] + - _my_bits_nbits[(uchar) (v2)] + - _my_bits_nbits[(uchar) (v2 >> 8)] + - _my_bits_nbits[(uchar) (v2 >> 16)] + - _my_bits_nbits[(uchar) (v2 >> 24)]); -#else - return (uint) (uchar) (_my_bits_nbits[(uchar) v] + - _my_bits_nbits[(uchar) (v >> 8)] + - _my_bits_nbits[(uchar) (v >> 16)] + - _my_bits_nbits[(uchar) (v >> 24)]); -#endif -} - -STATIC_INLINE uint my_count_bits_ushort(ushort v) -{ - return _my_bits_nbits[v]; -} - - -/* - Next highest power of two - - SYNOPSIS - my_round_up_to_next_power() - v Value to check - - RETURN - Next or equal power of 2 - Note: 0 will return 0 - - NOTES - Algorithm by Sean Anderson, according to: - http://graphics.stanford.edu/~seander/bithacks.html - (Orignal code public domain) - - Comments shows how this works with 01100000000000000000000000001011 -*/ - -STATIC_INLINE uint32 my_round_up_to_next_power(uint32 v) -{ - v--; /* 01100000000000000000000000001010 */ - v|= v >> 1; /* 01110000000000000000000000001111 */ - v|= v >> 2; /* 01111100000000000000000000001111 */ - v|= v >> 4; /* 01111111110000000000000000001111 */ - v|= v >> 8; /* 01111111111111111100000000001111 */ - v|= v >> 16; /* 01111111111111111111111111111111 */ - return v+1; /* 10000000000000000000000000000000 */ -} - -STATIC_INLINE uint32 my_clear_highest_bit(uint32 v) -{ - uint32 w=v >> 1; - w|= w >> 1; - w|= w >> 2; - w|= w >> 4; - w|= w >> 8; - w|= w >> 16; - return v & w; -} - -STATIC_INLINE uint32 my_reverse_bits(uint32 key) -{ - return - (_my_bits_reverse_table[ key & 255] << 24) | - (_my_bits_reverse_table[(key>> 8) & 255] << 16) | - (_my_bits_reverse_table[(key>>16) & 255] << 8) | - _my_bits_reverse_table[(key>>24) ]; -} - -#else /* HAVE_INLINE */ -extern uint my_bit_log2(ulong value); -extern uint32 my_round_up_to_next_power(uint32 v); -uint32 my_clear_highest_bit(uint32 v); -uint32 my_reverse_bits(uint32 key); -extern uint my_count_bits(ulonglong v); -extern uint my_count_bits_ushort(ushort v); -#endif /* HAVE_INLINE */ -C_MODE_END diff --git a/externals/mysql/my_bitmap.h b/externals/mysql/my_bitmap.h deleted file mode 100644 index d8c9a0c2b6..0000000000 --- a/externals/mysql/my_bitmap.h +++ /dev/null @@ -1,182 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _my_bitmap_h_ -#define _my_bitmap_h_ - -#define MY_BIT_NONE (~(uint) 0) - -#include - -typedef uint32 my_bitmap_map; - -typedef struct st_bitmap -{ - my_bitmap_map *bitmap; - uint n_bits; /* number of bits occupied by the above */ - my_bitmap_map last_word_mask; - my_bitmap_map *last_word_ptr; - /* - mutex will be acquired for the duration of each bitmap operation if - thread_safe flag in bitmap_init was set. Otherwise, we optimize by not - acquiring the mutex - */ -#ifdef THREAD - pthread_mutex_t *mutex; -#endif -} MY_BITMAP; - -#ifdef __cplusplus -extern "C" { -#endif -extern void create_last_word_mask(MY_BITMAP *map); -extern my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, - my_bool thread_safe); -extern my_bool bitmap_is_clear_all(const MY_BITMAP *map); -extern my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size); -extern my_bool bitmap_is_set_all(const MY_BITMAP *map); -extern my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2); -extern my_bool bitmap_is_overlapping(const MY_BITMAP *map1, - const MY_BITMAP *map2); -extern my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit); -extern my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit); -extern my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit); -extern uint bitmap_set_next(MY_BITMAP *map); -extern uint bitmap_get_first(const MY_BITMAP *map); -extern uint bitmap_get_first_set(const MY_BITMAP *map); -extern uint bitmap_bits_set(const MY_BITMAP *map); -extern void bitmap_free(MY_BITMAP *map); -extern void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit); -extern void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size); -extern void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2); -extern void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2); -extern void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2); -extern void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2); -extern void bitmap_invert(MY_BITMAP *map); -extern void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2); - -extern uint bitmap_lock_set_next(MY_BITMAP *map); -extern void bitmap_lock_clear_bit(MY_BITMAP *map, uint bitmap_bit); -#ifdef NOT_USED -extern uint bitmap_lock_bits_set(const MY_BITMAP *map); -extern my_bool bitmap_lock_is_set_all(const MY_BITMAP *map); -extern uint bitmap_lock_get_first(const MY_BITMAP *map); -extern uint bitmap_lock_get_first_set(const MY_BITMAP *map); -extern my_bool bitmap_lock_is_subset(const MY_BITMAP *map1, - const MY_BITMAP *map2); -extern my_bool bitmap_lock_is_prefix(const MY_BITMAP *map, uint prefix_size); -extern my_bool bitmap_lock_is_set(const MY_BITMAP *map, uint bitmap_bit); -extern my_bool bitmap_lock_is_clear_all(const MY_BITMAP *map); -extern my_bool bitmap_lock_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2); -extern void bitmap_lock_set_all(MY_BITMAP *map); -extern void bitmap_lock_clear_all(MY_BITMAP *map); -extern void bitmap_lock_set_bit(MY_BITMAP *map, uint bitmap_bit); -extern void bitmap_lock_flip_bit(MY_BITMAP *map, uint bitmap_bit); -extern void bitmap_lock_set_prefix(MY_BITMAP *map, uint prefix_size); -extern void bitmap_lock_intersect(MY_BITMAP *map, const MY_BITMAP *map2); -extern void bitmap_lock_subtract(MY_BITMAP *map, const MY_BITMAP *map2); -extern void bitmap_lock_union(MY_BITMAP *map, const MY_BITMAP *map2); -extern void bitmap_lock_xor(MY_BITMAP *map, const MY_BITMAP *map2); -extern void bitmap_lock_invert(MY_BITMAP *map); -#endif -/* Fast, not thread safe, bitmap functions */ -#define bitmap_buffer_size(bits) (((bits)+31)/32)*4 -#define no_bytes_in_map(map) (((map)->n_bits + 7)/8) -#define no_words_in_map(map) (((map)->n_bits + 31)/32) -#define bytes_word_aligned(bytes) (4*((bytes + 3)/4)) -#define _bitmap_set_bit(MAP, BIT) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \ - |= (1 << ((BIT) & 7))) -#define _bitmap_flip_bit(MAP, BIT) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \ - ^= (1 << ((BIT) & 7))) -#define _bitmap_clear_bit(MAP, BIT) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \ - &= ~ (1 << ((BIT) & 7))) -#define _bitmap_is_set(MAP, BIT) (uint) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \ - & (1 << ((BIT) & 7))) -/* - WARNING! - - The below symbols are inline functions in DEBUG builds and macros in - non-DEBUG builds. The latter evaluate their 'bit' argument twice. - - NEVER use an increment/decrement operator with the 'bit' argument. - It would work with DEBUG builds, but fails later in production builds! - - FORBIDDEN: bitmap_set_bit($my_bitmap, (field++)->field_index); -*/ -#ifndef DBUG_OFF -static inline void -bitmap_set_bit(MY_BITMAP *map,uint bit) -{ - DBUG_ASSERT(bit < (map)->n_bits); - _bitmap_set_bit(map,bit); -} -static inline void -bitmap_flip_bit(MY_BITMAP *map,uint bit) -{ - DBUG_ASSERT(bit < (map)->n_bits); - _bitmap_flip_bit(map,bit); -} -static inline void -bitmap_clear_bit(MY_BITMAP *map,uint bit) -{ - DBUG_ASSERT(bit < (map)->n_bits); - _bitmap_clear_bit(map,bit); -} -static inline uint -bitmap_is_set(const MY_BITMAP *map,uint bit) -{ - DBUG_ASSERT(bit < (map)->n_bits); - return _bitmap_is_set(map,bit); -} -#else -#define bitmap_set_bit(MAP, BIT) _bitmap_set_bit(MAP, BIT) -#define bitmap_flip_bit(MAP, BIT) _bitmap_flip_bit(MAP, BIT) -#define bitmap_clear_bit(MAP, BIT) _bitmap_clear_bit(MAP, BIT) -#define bitmap_is_set(MAP, BIT) _bitmap_is_set(MAP, BIT) -#endif - -static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2) -{ - *(map1)->last_word_ptr|= (map1)->last_word_mask; - *(map2)->last_word_ptr|= (map2)->last_word_mask; - return memcmp((map1)->bitmap, (map2)->bitmap, 4*no_words_in_map((map1)))==0; -} - -#define bitmap_clear_all(MAP) \ - { memset((MAP)->bitmap, 0, 4*no_words_in_map((MAP))); } -#define bitmap_set_all(MAP) \ - (memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP)))) - -/** - check, set and clear a bit of interest of an integer. - - If the bit is out of range @retval -1. Otherwise - bit_is_set @return 0 or 1 reflecting the bit is set or not; - bit_do_set @return 1 (bit is set 1) - bit_do_clear @return 0 (bit is cleared to 0) -*/ - -#define bit_is_set(I,B) (sizeof(I) * CHAR_BIT > (B) ? \ - (((I) & (1ULL << (B))) == 0 ? 0 : 1) : -1) -#define bit_do_set(I,B) (sizeof(I) * CHAR_BIT > (B) ? \ - ((I) |= (1ULL << (B)), 1) : -1) -#define bit_do_clear(I,B) (sizeof(I) * CHAR_BIT > (B) ? \ - ((I) &= ~(1ULL << (B)), 0) : -1) - -#ifdef __cplusplus -} -#endif - -#endif /* _my_bitmap_h_ */ diff --git a/externals/mysql/my_charsets.h b/externals/mysql/my_charsets.h deleted file mode 100644 index ecb0de94f7..0000000000 --- a/externals/mysql/my_charsets.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Character set configuration (hard-coded) */ -#define HAVE_CHARSET_armscii8 1 -#define HAVE_CHARSET_ascii 1 -#define HAVE_CHARSET_big5 1 -#define HAVE_CHARSET_cp1250 1 -#define HAVE_CHARSET_cp1251 1 -#define HAVE_CHARSET_cp1256 1 -#define HAVE_CHARSET_cp1257 1 -#define HAVE_CHARSET_cp850 1 -#define HAVE_CHARSET_cp852 1 -#define HAVE_CHARSET_cp866 1 -#define HAVE_CHARSET_cp932 1 -#define HAVE_CHARSET_dec8 1 -#define HAVE_CHARSET_eucjpms 1 -#define HAVE_CHARSET_euckr 1 -#define HAVE_CHARSET_gb2312 1 -#define HAVE_CHARSET_gbk 1 -#define HAVE_CHARSET_greek 1 -#define HAVE_CHARSET_hebrew 1 -#define HAVE_CHARSET_hp8 1 -#define HAVE_CHARSET_keybcs2 1 -#define HAVE_CHARSET_koi8r 1 -#define HAVE_CHARSET_koi8u 1 -#define HAVE_CHARSET_latin1 1 -#define HAVE_CHARSET_latin2 1 -#define HAVE_CHARSET_latin5 1 -#define HAVE_CHARSET_latin7 1 -#define HAVE_CHARSET_macce 1 -#define HAVE_CHARSET_macroman 1 -#define HAVE_CHARSET_sjis 1 -#define HAVE_CHARSET_swe7 1 -#define HAVE_CHARSET_tis620 1 -#define HAVE_CHARSET_ucs2 1 -#define HAVE_CHARSET_ujis 1 -#define HAVE_CHARSET_utf16 1 -#define HAVE_CHARSET_utf32 1 -#define HAVE_CHARSET_utf8mb3 1 -#define HAVE_CHARSET_utf8mb4 1 -#define HAVE_UCA_COLLATIONS 1 -#define MYSQL_DEFAULT_CHARSET_NAME "latin1" -#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci" -#define USE_MB 1 diff --git a/externals/mysql/my_config.h b/externals/mysql/my_config.h deleted file mode 100644 index adea8dbe8e..0000000000 --- a/externals/mysql/my_config.h +++ /dev/null @@ -1,295 +0,0 @@ - -/* Headers we may want to use. */ -/* #undef HAVE_ALLOCA_H */ -/* #undef HAVE_ARPA_INET_H */ -/* #undef HAVE_CRYPT_H */ -/* #undef HAVE_DIRENT_H */ -/* #undef HAVE_EXECINFO_H */ -#define HAVE_FCNTL_H 1 -/* #undef HAVE_FENV_H */ -#define HAVE_FLOAT_H 1 -/* #undef HAVE_FPU_CONTROL_H */ -/* #undef HAVE_GRP_H */ -/* #undef HAVE_IEEEFP_H */ -#define HAVE_LIMITS_H 1 -#define HAVE_MALLOC_H 1 -#define HAVE_MEMORY_H 1 -/* #undef HAVE_NETINET_IN_H */ -/* #undef HAVE_PATHS_H */ -/* #undef HAVE_PWD_H */ -/* #undef HAVE_SCHED_H */ -/* #undef HAVE_SELECT_H */ -#define HAVE_STDDEF_H 1 -#define HAVE_STDLIB_H 1 -/* #undef HAVE_STRINGS_H */ -#define HAVE_STRING_H 1 -/* #undef HAVE_SYNCH_H */ -/* #undef HAVE_SYSENT_H */ -/* #undef HAVE_SYS_FPU_H */ -/* #undef HAVE_SYS_IOCTL_H */ -/* #undef HAVE_SYS_IPC_H */ -/* #undef HAVE_SYS_MMAN_H */ -/* #undef HAVE_SYS_PRCTL_H */ -/* #undef HAVE_SYS_SELECT_H */ -/* #undef HAVE_SYS_SHM_H */ -/* #undef HAVE_SYS_SOCKET_H */ -#define HAVE_SYS_STAT_H 1 -/* #undef HAVE_SYS_STREAM_H */ -#define HAVE_SYS_TIMEB_H 1 -#define HAVE_SYS_TYPES_H 1 -/* #undef HAVE_SYS_UN_H */ -/* #undef HAVE_TERMIOS_H */ -/* #undef HAVE_TERMIO_H */ -/* #undef HAVE_UNISTD_H */ -/* #undef HAVE_UTIME_H */ - -/* Functions we may want to use. */ -#define HAVE_ACCESS 1 -/* #undef HAVE_AIOWAIT */ -/* #undef HAVE_ALARM */ -/* #undef HAVE_ALLOCA */ -/* #undef HAVE_BCMP */ -/* #undef HAVE_BFILL */ -/* #undef HAVE_BMOVE */ -/* #undef HAVE_BZERO */ -/* #undef HAVE_CLOCK_GETTIME */ -/* #undef HAVE_COMPRESS */ -/* #undef HAVE_CRYPT */ -/* #undef HAVE_DLERROR */ -/* #undef HAVE_DLOPEN */ -/* #undef HAVE_FCHMOD */ -/* #undef HAVE_FCNTL */ -/* #undef HAVE_FCONVERT */ -/* #undef HAVE_FDATASYNC */ -/* #undef HAVE_FESETROUND */ -/* #undef HAVE_FINITE */ -/* #undef HAVE_FP_EXCEPT */ -/* #undef HAVE_FSEEKO */ -/* #undef HAVE_FSYNC */ -/* #undef HAVE_GETADDRINFO */ -#define HAVE_GETCWD 1 -/* #undef HAVE_GETHOSTBYADDR_R */ -/* #undef HAVE_GETHOSTBYNAME_R */ -/* #undef HAVE_GETHRTIME */ -/* #undef HAVE_GETNAMEINFO */ -/* #undef HAVE_GETPAGESIZE */ -/* #undef HAVE_GETPASS */ -/* #undef HAVE_GETPASSPHRASE */ -/* #undef HAVE_GETPWNAM */ -/* #undef HAVE_GETPWUID */ -/* #undef HAVE_GETRLIMIT */ -/* #undef HAVE_GETRUSAGE */ -/* #undef HAVE_GETWD */ -/* #undef HAVE_GMTIME_R */ -/* #undef HAVE_INITGROUPS */ -/* #undef HAVE_ISNAN */ -#define HAVE_LDIV 1 -/* #undef HAVE_LOCALTIME_R */ -/* #undef HAVE_LOG2 */ -#define HAVE_LONGJMP 1 -/* #undef HAVE_LSTAT */ -/* #undef HAVE_MADVISE */ -/* #undef HAVE_DECL_MADVISE */ -/* #undef HAVE_MALLINFO */ -#define HAVE_MEMCPY 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMMOVE 1 -/* #undef HAVE_MKSTEMP */ -/* #undef HAVE_MLOCK */ -/* #undef HAVE_MLOCKALL */ -/* #undef HAVE_MMAP */ -/* #undef HAVE_MMAP64 */ -#define HAVE_PERROR 1 -/* #undef HAVE_POLL */ -/* #undef HAVE_PREAD */ -/* #undef HAVE_PTHREAD_ATTR_CREATE */ -/* #undef HAVE_PTHREAD_ATTR_GETSTACKSIZE */ -/* #undef HAVE_PTHREAD_ATTR_SETPRIO */ -/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */ -/* #undef HAVE_PTHREAD_ATTR_SETSCOPE */ -/* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */ -/* #undef HAVE_PTHREAD_CONDATTR_CREATE */ -/* #undef HAVE_PTHREAD_INIT */ -/* #undef HAVE_PTHREAD_KEY_DELETE */ -/* #undef HAVE_PTHREAD_KEY_DELETE */ -/* #undef HAVE_PTHREAD_KILL */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK */ -/* #undef HAVE_PTHREAD_SETPRIO_NP */ -/* #undef HAVE_PTHREAD_SETSCHEDPARAM */ -/* #undef HAVE_PTHREAD_SIGMASK */ -/* #undef HAVE_PTHREAD_THREADMASK */ -/* #undef HAVE_PTHREAD_YIELD_NP */ -/* #undef HAVE_READDIR_R */ -/* #undef HAVE_READLINK */ -/* #undef HAVE_REALPATH */ -#define HAVE_RENAME 1 -/* #undef HAVE_RINT */ -/* #undef HAVE_SCHED_YIELD */ -/* #undef HAVE_SELECT */ -/* #undef HAVE_SETFD */ -/* #undef HAVE_SETFILEPOINTER */ -/* #undef HAVE_SIGACTION */ -/* #undef HAVE_SIGTHREADMASK */ -/* #undef HAVE_SIGWAIT */ -/* #undef HAVE_SLEEP */ -/* #undef HAVE_SNPRINTF */ -/* #undef HAVE_STPCPY */ -#define HAVE_STRERROR 1 -/* #undef HAVE_STRLCPY */ -#define HAVE_STRNLEN 1 -#define HAVE_STRPBRK 1 -/* #undef HAVE_STRSEP */ -#define HAVE_STRSTR 1 -/* #undef HAVE_STRTOK_R */ -/* #undef HAVE_STRTOK_R */ -#define HAVE_STRTOL 1 -/* #undef HAVE_STRTOLL */ -#define HAVE_STRTOUL 1 -/* #undef HAVE_STRTOULL */ -#define HAVE_TELL 1 -/* #undef HAVE_THR_SETCONCURRENCY */ -/* #undef HAVE_THR_YIELD */ -/* #undef HAVE_VASPRINTF */ -#define HAVE_VSNPRINTF 1 - -/* Symbols we may use */ -/* #undef HAVE_SYS_ERRLIST */ -/* used by stacktrace functions */ -/* #undef HAVE_BSS_START */ - -/* Does "struct timespec" have a "sec" and "nsec" field? */ -/* #undef HAVE_TIMESPEC_TS_SEC */ - -/* Types we may use */ -#define SIZEOF_CHAR 1 -#if SIZEOF_CHAR -# define HAVE_CHAR 1 -#endif - -#define SIZEOF_CHARP 4 -#if SIZEOF_CHARP -# define HAVE_CHARP 1 -#endif - -#define SIZEOF_SHORT 2 -#if SIZEOF_SHORT -# define HAVE_SHORT 1 -#endif - -#define SIZEOF_INT 4 -#if SIZEOF_INT -# define HAVE_INT 1 -#endif - -#define SIZEOF_LONG 4 -#if SIZEOF_LONG -# define HAVE_LONG 1 -#endif - -#define SIZEOF_LONG_LONG 8 -#if SIZEOF_LONG_LONG -# define HAVE_LONG_LONG 1 -#endif - -#define SIZEOF_OFF_T 4 -#if SIZEOF_OFF_T -# define HAVE_OFF_T 1 -#endif - -/* #undef SIZEOF_SIGSET_T */ -#if SIZEOF_SIGSET_T -# define HAVE_SIGSET_T 1 -#endif - -#define SIZEOF_SIZE_T 4 -#if SIZEOF_SIZE_T -# define HAVE_SIZE_T 1 -#endif - -/* #undef SIZEOF_UCHAR */ -#if SIZEOF_UCHAR -# define HAVE_UCHAR 1 -#endif - -/* #undef SIZEOF_UINT */ -#if SIZEOF_UINT -# define HAVE_UINT 1 -#endif - -/* #undef SIZEOF_ULONG */ -#if SIZEOF_ULONG -# define HAVE_ULONG 1 -#endif - -/* #undef SIZEOF_INT8 */ -#if SIZEOF_INT8 -# define HAVE_INT8 1 -#endif -/* #undef SIZEOF_UINT8 */ -#if SIZEOF_UINT8 -# define HAVE_UINT8 1 -#endif - -/* #undef SIZEOF_INT16 */ -#if SIZEOF_INT16 -# define HAVE_INT16 1 -#endif -/* #undef SIZEOF_UINT16 */ -#if SIZEOF_UINT16 -# define HAVE_UINT16 1 -#endif - -/* #undef SIZEOF_INT32 */ -#if SIZEOF_INT32 -# define HAVE_INT32 1 -#endif -/* #undef SIZEOF_UINT32 */ -#if SIZEOF_UINT32 -# define HAVE_UINT32 1 -#endif -/* #undef SIZEOF_U_INT32_T */ -#if SIZEOF_U_INT32_T -# define HAVE_U_INT32_T 1 -#endif - -/* #undef SIZEOF_INT64 */ -#if SIZEOF_INT64 -# define HAVE_INT64 1 -#endif -/* #undef SIZEOF_UINT64 */ -#if SIZEOF_UINT64 -# define HAVE_UINT64 1 -#endif - -/* #undef SIZEOF_SOCKLEN_T */ -#if SIZEOF_SOCKLEN_T -# define HAVE_SOCKLEN_T 1 -#endif - -/* XXX mysql_client_test uses this -- rip it out, please! */ -#define MAX_INDEXES 64 - -#define QSORT_TYPE_IS_VOID 1 -#define RETQSORTTYPE void - -#define SIGNAL_RETURN_TYPE_IS_VOID 1 -#define RETSIGTYPE void - -/* #undef WORDS_BIGENDIAN */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler calls - it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -# define inline -#endif - -#define TIME_WITH_SYS_TIME 1 - -#define STACK_DIRECTION -1 - -#define SHAREDIR "share" -#define THREAD 1 -#define THREAD_SAFE_CLIENT 1 - -#define DEFAULT_CHARSET_HOME "C:/mysql/" diff --git a/externals/mysql/my_dbug.h b/externals/mysql/my_dbug.h deleted file mode 100644 index c4a2f881e4..0000000000 --- a/externals/mysql/my_dbug.h +++ /dev/null @@ -1,140 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _dbug_h -#define _dbug_h - -#ifdef __cplusplus -extern "C" { -#endif -#if !defined(DBUG_OFF) && !defined(_lint) - -struct _db_stack_frame_ { - const char *func; /* function name of the previous stack frame */ - const char *file; /* filename of the function of previous frame */ - uint level; /* this nesting level, highest bit enables tracing */ - struct _db_stack_frame_ *prev; /* pointer to the previous frame */ -}; - -struct _db_code_state_; -extern my_bool _dbug_on_; -extern my_bool _db_keyword_(struct _db_code_state_ *, const char *, int); -extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len); -extern int _db_explain_init_(char *buf, size_t len); -extern int _db_is_pushed_(void); -extern void _db_setjmp_(void); -extern void _db_longjmp_(void); -extern void _db_process_(const char *name); -extern void _db_push_(const char *control); -extern void _db_pop_(void); -extern void _db_set_(const char *control); -extern void _db_set_init_(const char *control); -extern void _db_enter_(const char *_func_, const char *_file_, uint _line_, - struct _db_stack_frame_ *_stack_frame_); -extern void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame_); -extern void _db_pargs_(uint _line_,const char *keyword); -extern void _db_doprnt_ _VARARGS((const char *format,...)) - ATTRIBUTE_FORMAT(printf, 1, 2); -extern void _db_dump_(uint _line_,const char *keyword, - const unsigned char *memory, size_t length); -extern void _db_end_(void); -extern void _db_lock_file_(void); -extern void _db_unlock_file_(void); -extern FILE *_db_fp_(void); -extern void _db_flush_(); - -#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \ - _db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_) -#define DBUG_LEAVE _db_return_ (__LINE__, &_db_stack_frame_) -#define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0) -#define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0) -#define DBUG_EXECUTE(keyword,a1) \ - do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0) -#define DBUG_EXECUTE_IF(keyword,a1) \ - do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0) -#define DBUG_EVALUATE(keyword,a1,a2) \ - (_db_keyword_(0,(keyword), 0) ? (a1) : (a2)) -#define DBUG_EVALUATE_IF(keyword,a1,a2) \ - (_db_keyword_(0,(keyword), 1) ? (a1) : (a2)) -#define DBUG_PRINT(keyword,arglist) \ - do {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;} while(0) -#define DBUG_PUSH(a1) _db_push_ (a1) -#define DBUG_POP() _db_pop_ () -#define DBUG_SET(a1) _db_set_ (a1) -#define DBUG_SET_INITIAL(a1) _db_set_init_ (a1) -#define DBUG_PROCESS(a1) _db_process_(a1) -#define DBUG_FILE _db_fp_() -#define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1)) -#define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2)) -#define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2) -#define DBUG_END() _db_end_ () -#define DBUG_LOCK_FILE _db_lock_file_() -#define DBUG_UNLOCK_FILE _db_unlock_file_() -#define DBUG_ASSERT(A) assert(A) -#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) -#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) -#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0) -#define DEBUGGER_ON do { _dbug_on_= 1; } while(0) -#define IF_DBUG(A) A -#ifndef __WIN__ -#define DBUG_ABORT() (_db_flush_(), abort()) -#else -/* - Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we can - call abort() instead of _exit(3) (now it would cause a "test signal" popup). -*/ -#include -#define DBUG_ABORT() (_db_flush_(),\ - (void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE),\ - (void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR),\ - _exit(3)) -#endif - -#else /* No debugger */ - -#define DBUG_ENTER(a1) -#define DBUG_LEAVE -#define DBUG_RETURN(a1) do { return(a1); } while(0) -#define DBUG_VOID_RETURN do { return; } while(0) -#define DBUG_EXECUTE(keyword,a1) do { } while(0) -#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0) -#define DBUG_EVALUATE(keyword,a1,a2) (a2) -#define DBUG_EVALUATE_IF(keyword,a1,a2) (a2) -#define DBUG_PRINT(keyword,arglist) do { } while(0) -#define DBUG_PUSH(a1) do { } while(0) -#define DBUG_SET(a1) do { } while(0) -#define DBUG_SET_INITIAL(a1) do { } while(0) -#define DBUG_POP() do { } while(0) -#define DBUG_PROCESS(a1) do { } while(0) -#define DBUG_SETJMP(a1) setjmp(a1) -#define DBUG_LONGJMP(a1) longjmp(a1) -#define DBUG_DUMP(keyword,a1,a2) do { } while(0) -#define DBUG_END() do { } while(0) -#define DBUG_ASSERT(A) do { } while(0) -#define DBUG_LOCK_FILE do { } while(0) -#define DBUG_FILE (stderr) -#define DBUG_UNLOCK_FILE do { } while(0) -#define DBUG_EXPLAIN(buf,len) -#define DBUG_EXPLAIN_INITIAL(buf,len) -#define DEBUGGER_OFF do { } while(0) -#define DEBUGGER_ON do { } while(0) -#define IF_DBUG(A) -#define DBUG_ABORT() abort() - -#endif -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/mysql/my_dir.h b/externals/mysql/my_dir.h deleted file mode 100644 index 90d708ac81..0000000000 --- a/externals/mysql/my_dir.h +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _my_dir_h -#define _my_dir_h -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef MY_DIR_H -#define MY_DIR_H - -#include - - /* Defines for my_dir and my_stat */ - -#define MY_S_IFMT S_IFMT /* type of file */ -#define MY_S_IFDIR S_IFDIR /* directory */ -#define MY_S_IFCHR S_IFCHR /* character special */ -#define MY_S_IFBLK S_IFBLK /* block special */ -#define MY_S_IFREG S_IFREG /* regular */ -#define MY_S_IFIFO S_IFIFO /* fifo */ -#define MY_S_ISUID S_ISUID /* set user id on execution */ -#define MY_S_ISGID S_ISGID /* set group id on execution */ -#define MY_S_ISVTX S_ISVTX /* save swapped text even after use */ -#define MY_S_IREAD S_IREAD /* read permission, owner */ -#define MY_S_IWRITE S_IWRITE /* write permission, owner */ -#define MY_S_IEXEC S_IEXEC /* execute/search permission, owner */ - -#define MY_S_ISDIR(m) (((m) & MY_S_IFMT) == MY_S_IFDIR) -#define MY_S_ISCHR(m) (((m) & MY_S_IFMT) == MY_S_IFCHR) -#define MY_S_ISBLK(m) (((m) & MY_S_IFMT) == MY_S_IFBLK) -#define MY_S_ISREG(m) (((m) & MY_S_IFMT) == MY_S_IFREG) -#define MY_S_ISFIFO(m) (((m) & MY_S_IFMT) == MY_S_IFIFO) - -#define MY_DONT_SORT 512 /* my_lib; Don't sort files */ -#define MY_WANT_STAT 1024 /* my_lib; stat files */ - - /* typedefs for my_dir & my_stat */ - -#ifdef USE_MY_STAT_STRUCT - -typedef struct my_stat -{ - dev_t st_dev; /* major & minor device numbers */ - ino_t st_ino; /* inode number */ - ushort st_mode; /* file permissons (& suid sgid .. bits) */ - short st_nlink; /* number of links to file */ - ushort st_uid; /* user id */ - ushort st_gid; /* group id */ - dev_t st_rdev; /* more major & minor device numbers (???) */ - off_t st_size; /* size of file */ - time_t st_atime; /* time for last read */ - time_t st_mtime; /* time for last contens modify */ - time_t st_ctime; /* time for last inode or contents modify */ -} MY_STAT; - -#else - -#if(_MSC_VER) -#define MY_STAT struct _stati64 /* 64 bit file size */ -#else -#define MY_STAT struct stat /* Orginal struct have what we need */ -#endif - -#endif /* USE_MY_STAT_STRUCT */ - -/* Struct describing one file returned from my_dir */ -typedef struct fileinfo -{ - char *name; - MY_STAT *mystat; -} FILEINFO; - -typedef struct st_my_dir /* Struct returned from my_dir */ -{ - /* - These members are just copies of parts of DYNAMIC_ARRAY structure, - which is allocated right after the end of MY_DIR structure (MEM_ROOT - for storing names is also resides there). We've left them here because - we don't want to change code that uses my_dir. - */ - struct fileinfo *dir_entry; - uint number_off_files; -} MY_DIR; - -extern MY_DIR *my_dir(const char *path,myf MyFlags); -extern void my_dirend(MY_DIR *buffer); -extern MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags); -extern int my_fstat(int filenr, MY_STAT *stat_area, myf MyFlags); - -#endif /* MY_DIR_H */ - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/mysql/my_getopt.h b/externals/mysql/my_getopt.h deleted file mode 100644 index 7cbad607aa..0000000000 --- a/externals/mysql/my_getopt.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (C) 2002-2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _my_getopt_h -#define _my_getopt_h - -C_MODE_START - -#define GET_NO_ARG 1 -#define GET_BOOL 2 -#define GET_INT 3 -#define GET_UINT 4 -#define GET_LONG 5 -#define GET_ULONG 6 -#define GET_LL 7 -#define GET_ULL 8 -#define GET_STR 9 -#define GET_STR_ALLOC 10 -#define GET_DISABLED 11 -#define GET_ENUM 12 -#define GET_SET 13 -#define GET_DOUBLE 14 - -#define GET_ASK_ADDR 128 -#define GET_TYPE_MASK 127 - -enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; - -struct st_typelib; - -struct my_option -{ - const char *name; /* Name of the option */ - int id; /* unique id or short option */ - const char *comment; /* option comment, for autom. --help */ - uchar **value; /* The variable value */ - uchar **u_max_value; /* The user def. max variable value */ - struct st_typelib *typelib; /* Pointer to possible values */ - ulong var_type; - enum get_opt_arg_type arg_type; - longlong def_value; /* Default value */ - longlong min_value; /* Min allowed value */ - longlong max_value; /* Max allowed value */ - longlong sub_size; /* Subtract this from given value */ - long block_size; /* Value should be a mult. of this */ - void *app_type; /* To be used by an application */ -}; - -typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * ); -typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... ); - -extern char *disabled_my_option; -extern my_bool my_getopt_print_errors; -extern my_bool my_getopt_skip_unknown; -extern my_error_reporter my_getopt_error_reporter; - -extern int handle_options (int *argc, char ***argv, - const struct my_option *longopts, my_get_one_option); -extern void my_cleanup_options(const struct my_option *options); -extern void my_print_help(const struct my_option *options); -extern void my_print_variables(const struct my_option *options); -extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, uint, - const struct my_option *, int *)); - -ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, - my_bool *fix); -longlong getopt_ll_limit_value(longlong, const struct my_option *, - my_bool *fix); -my_bool getopt_compare_strings(const char *s, const char *t, uint length); - -C_MODE_END - -#endif /* _my_getopt_h */ - diff --git a/externals/mysql/my_global.h b/externals/mysql/my_global.h deleted file mode 100644 index 131507c0bc..0000000000 --- a/externals/mysql/my_global.h +++ /dev/null @@ -1,1616 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This is the include file that should be included 'first' in every C file. */ - -#ifndef _global_h -#define _global_h - -/* - InnoDB depends on some MySQL internals which other plugins should not - need. This is because of InnoDB's foreign key support, "safe" binlog - truncation, and other similar legacy features. - - We define accessors for these internals unconditionally, but do not - expose them in mysql/plugin.h. They are declared in ha_innodb.h for - InnoDB's use. -*/ -#define INNODB_COMPATIBILITY_HOOKS - -#ifdef __CYGWIN__ -/* We use a Unix API, so pretend it's not Windows */ -#undef WIN -#undef WIN32 -#undef _WIN -#undef _WIN32 -#undef _WIN64 -#undef __WIN__ -#undef __WIN32__ -#define HAVE_ERRNO_AS_DEFINE -#endif /* __CYGWIN__ */ - -#if defined(__QNXNTO__) && !defined(FD_SETSIZE) -#define FD_SETSIZE 1024 /* Max number of file descriptor bits in - fd_set, used when calling 'select' - Must be defined before including - "sys/select.h" and "sys/time.h" - */ -#endif - - -/* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#define USE_PRAGMA_INTERFACE -#endif - -#if defined(i386) && !defined(__i386__) -#define __i386__ -#endif - -/* Macros to make switching between C and C++ mode easier */ -#ifdef __cplusplus -#define C_MODE_START extern "C" { -#define C_MODE_END } -#define STATIC_CAST(TYPE) static_cast -#else -#define C_MODE_START -#define C_MODE_END -#define STATIC_CAST(TYPE) (TYPE) -#endif - -#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32) -#include -#else -#include -#if defined(__cplusplus) && defined(inline) -#undef inline /* fix configure problem */ -#endif -#endif /* _WIN32... */ - -#include - -/* Make it easier to add conditional code for windows */ -#ifdef __WIN__ -#define IF_WIN(A,B) (A) -#else -#define IF_WIN(A,B) (B) -#endif - -#ifndef EMBEDDED_LIBRARY -#ifdef WITH_NDB_BINLOG -#define HAVE_NDB_BINLOG 1 -#endif -#endif /* !EMBEDDED_LIBRARY */ - -#ifndef EMBEDDED_LIBRARY -#define HAVE_REPLICATION -#define HAVE_EXTERNAL_CLIENT -#endif - -/* Some defines to avoid ifdefs in the code */ -#ifndef NETWARE_YIELD -#define NETWARE_YIELD -#define NETWARE_SET_SCREEN_MODE(A) -#endif - -/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */ -#if defined(_AIX) && defined(_LARGE_FILE_API) -#undef _LARGE_FILE_API -#endif - -/* - The macros below are used to allow build of Universal/fat binaries of - MySQL and MySQL applications under darwin. -*/ -#if defined(__APPLE__) && defined(__MACH__) -# undef SIZEOF_CHARP -# undef SIZEOF_SHORT -# undef SIZEOF_INT -# undef SIZEOF_LONG -# undef SIZEOF_LONG_LONG -# undef SIZEOF_OFF_T -# undef WORDS_BIGENDIAN -# define SIZEOF_SHORT 2 -# define SIZEOF_INT 4 -# define SIZEOF_LONG_LONG 8 -# define SIZEOF_OFF_T 8 -# if defined(__i386__) || defined(__ppc__) -# define SIZEOF_CHARP 4 -# define SIZEOF_LONG 4 -# elif defined(__x86_64__) || defined(__ppc64__) -# define SIZEOF_CHARP 8 -# define SIZEOF_LONG 8 -# else -# error Building FAT binary for an unknown architecture. -# endif -# if defined(__ppc__) || defined(__ppc64__) -# define WORDS_BIGENDIAN -# endif -#endif /* defined(__APPLE__) && defined(__MACH__) */ - - -/* - The macros below are borrowed from include/linux/compiler.h in the - Linux kernel. Use them to indicate the likelyhood of the truthfulness - of a condition. This serves two purposes - newer versions of gcc will be - able to optimize for branch predication, which could yield siginficant - performance gains in frequently executed sections of the code, and the - other reason to use them is for documentation -*/ - -#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) -#define __builtin_expect(x, expected_value) (x) -#endif - -/** - The semantics of builtin_expect() are that - 1) its two arguments are long - 2) it's likely that they are == - Those of our likely(x) are that x can be bool/int/longlong/pointer. -*/ -#define likely(x) __builtin_expect(((x) != 0),1) -#define unlikely(x) __builtin_expect(((x) != 0),0) - -/* - The macros below are useful in optimising places where it has been - discovered that cache misses stall the process and where a prefetch - of the cache line can improve matters. This is available in GCC 3.1.1 - and later versions. - PREFETCH_READ says that addr is going to be used for reading and that - it is to be kept in caches if possible for a while - PREFETCH_WRITE also says that the item to be cached is likely to be - updated. - The *LOCALITY scripts are also available for experimentation purposes - mostly and should only be used if they are verified to improve matters. - For more input see GCC manual (available in GCC 3.1.1 and later) -*/ - -#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10) -#define PREFETCH_READ(addr) __builtin_prefetch(addr, 0, 3) -#define PREFETCH_WRITE(addr) \ - __builtin_prefetch(addr, 1, 3) -#define PREFETCH_READ_LOCALITY(addr, locality) \ - __builtin_prefetch(addr, 0, locality) -#define PREFETCH_WRITE_LOCALITY(addr, locality) \ - __builtin_prefetch(addr, 1, locality) -#else -#define PREFETCH_READ(addr) -#define PREFETCH_READ_LOCALITY(addr, locality) -#define PREFETCH_WRITE(addr) -#define PREFETCH_WRITE_LOCALITY(addr, locality) -#endif - -/* - The following macro is used to ensure that code often used in most - SQL statements and definitely for parts of the SQL processing are - kept in a code segment by itself. This has the advantage that the - risk of common code being overlapping in caches of the CPU is less. - This can be a cause of big performance problems. - Routines should be put in this category with care and when they are - put there one should also strive to make as much of the error handling - as possible (or uncommon code of the routine) to execute in a - separate method to avoid moving to much code to this code segment. - - It is very easy to use, simply add HOT_METHOD at the end of the - function declaration. - For more input see GCC manual (available in GCC 2.95 and later) -*/ - -#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94) -#define HOT_METHOD \ - __attribute__ ((section ("hot_code_section"))) -#else -#define HOT_METHOD -#endif - -/* - The following macro is used to ensure that popular global variables - are located next to each other to avoid that they contend for the - same cache lines. - - It is very easy to use, simply add HOT_DATA at the end of the declaration - of the variable, the variable must be initialised because of the way - that linker works so a declaration using HOT_DATA should look like: - uint global_hot_data HOT_DATA = 0; - For more input see GCC manual (available in GCC 2.95 and later) -*/ - -#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94) -#define HOT_DATA \ - __attribute__ ((section ("hot_data_section"))) -#else -#define HOT_DATA -#endif - -/* - now let's figure out if inline functions are supported - autoconf defines 'inline' to be empty, if not -*/ -#define inline_test_1(X) X ## 1 -#define inline_test_2(X) inline_test_1(X) -#if inline_test_2(inline) != 1 -#define HAVE_INLINE -#endif -#undef inline_test_2 -#undef inline_test_1 -/* helper macro for "instantiating" inline functions */ -#define STATIC_INLINE static inline - -/* - The following macros are used to control inlining a bit more than - usual. These macros are used to ensure that inlining always or - never occurs (independent of compilation mode). - For more input see GCC manual (available in GCC 3.1.1 and later) -*/ - -#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10) -#define ALWAYS_INLINE __attribute__ ((always_inline)) -#define NEVER_INLINE __attribute__ ((noinline)) -#else -#define ALWAYS_INLINE -#define NEVER_INLINE -#endif - - -/* Fix problem with S_ISLNK() on Linux */ -#if defined(TARGET_OS_LINUX) || defined(__GLIBC__) -#undef _GNU_SOURCE -#define _GNU_SOURCE 1 -#endif - -/* - Temporary solution to solve bug#7156. Include "sys/types.h" before - the thread headers, else the function madvise() will not be defined -*/ -#if defined(HAVE_SYS_TYPES_H) && ( defined(sun) || defined(__sun) ) -#include -#endif - -/* The client defines this to avoid all thread code */ -#if defined(UNDEF_THREADS_HACK) -#undef THREAD -#undef HAVE_LINUXTHREADS -#undef HAVE_NPTL -#endif - -#ifdef HAVE_THREADS_WITHOUT_SOCKETS -/* MIT pthreads does not work with unix sockets */ -#undef HAVE_SYS_UN_H -#endif - -#define __EXTENSIONS__ 1 /* We want some extension */ -#ifndef __STDC_EXT__ -#define __STDC_EXT__ 1 /* To get large file support on hpux */ -#endif - -/* - Solaris 9 include file refers to X/Open document - - System Interfaces and Headers, Issue 5 - - saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes, - but apparently other systems (namely FreeBSD) don't agree. - - On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600. - Furthermore, it tests that if a program requires older standard - (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be - run on a new compiler (that defines _STDC_C99) and issues an #error. - It's also an #error if a program requires new standard (_XOPEN_SOURCE=600 - or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99. - - To add more to this mess, Sun Studio C compiler defines _STDC_C99 while - C++ compiler does not! - - So, in a desperate attempt to get correct prototypes for both - C and C++ code, we define either _XOPEN_SOURCE=600 or _XOPEN_SOURCE=500 - depending on the compiler's announced C standard support. - - Cleaner solutions are welcome. -*/ -#ifdef __sun -#if __STDC_VERSION__ - 0 >= 199901L -#define _XOPEN_SOURCE 600 -#else -#define _XOPEN_SOURCE 500 -#endif -#endif - -#if defined(THREAD) && !defined(__WIN__) -#ifndef _POSIX_PTHREAD_SEMANTICS -#define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */ -#endif - -#if !defined(SCO) -#define _REENTRANT 1 /* Some thread libraries require this */ -#endif -#if !defined(_THREAD_SAFE) && !defined(_AIX) -#define _THREAD_SAFE /* Required for OSF1 */ -#endif -#if defined(HPUX10) || defined(HPUX11) -C_MODE_START /* HPUX needs this, signal.h bug */ -#include -C_MODE_END -#else -#include /* AIX must have this included first */ -#endif -#if !defined(SCO) && !defined(_REENTRANT) -#define _REENTRANT 1 /* Threads requires reentrant code */ -#endif -#endif /* THREAD */ - -/* Go around some bugs in different OS and compilers */ -#ifdef _AIX /* By soren@t.dk */ -#define _H_STRINGS -#define _SYS_STREAM_H -/* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */ -#define ulonglong2double(A) my_ulonglong2double(A) -#define my_off_t2double(A) my_ulonglong2double(A) -C_MODE_START -double my_ulonglong2double(unsigned long long A); -C_MODE_END -#endif /* _AIX */ - -#ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ -#undef HAVE_SNPRINTF -#endif -#ifdef HAVE_BROKEN_PREAD -/* - pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without - installing the kernel patch PHKL_20349 or greater -*/ -#undef HAVE_PREAD -#undef HAVE_PWRITE -#endif -#if defined(HAVE_BROKEN_INLINE) && !defined(__cplusplus) -#undef inline -#define inline -#endif - -#ifdef UNDEF_HAVE_GETHOSTBYNAME_R /* For OSF4.x */ -#undef HAVE_GETHOSTBYNAME_R -#endif -#ifdef UNDEF_HAVE_INITGROUPS /* For AIX 4.3 */ -#undef HAVE_INITGROUPS -#endif - -/* gcc/egcs issues */ - -#if defined(__GNUC) && defined(__EXCEPTIONS) -#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile" -#endif - - -/* Fix a bug in gcc 2.8.0 on IRIX 6.2 */ -#if SIZEOF_LONG == 4 && defined(__LONG_MAX__) && (__GNUC__ == 2 && __GNUC_MINOR__ == 8) -#undef __LONG_MAX__ /* Is a longlong value in gcc 2.8.0 ??? */ -#define __LONG_MAX__ 2147483647 -#endif - -/* egcs 1.1.2 has a problem with memcpy on Alpha */ -#if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) -#define BAD_MEMCPY -#endif - -#if defined(_lint) && !defined(lint) -#define lint -#endif -#if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG) -#define _LONG_LONG 1 /* For AIX string library */ -#endif - -#ifndef stdin -#include -#endif -#include -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STDDEF_H -#include -#endif - -#include -#ifdef HAVE_LIMITS_H -#include -#endif -#ifdef HAVE_FLOAT_H -#include -#endif -#ifdef HAVE_FENV_H -#include /* For fesetround() */ -#endif - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_SYS_TIMEB_H -#include /* Avoid warnings on SCO */ -#endif -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif /* TIME_WITH_SYS_TIME */ -#ifdef HAVE_UNISTD_H -#include -#endif -#if defined(__cplusplus) && defined(NO_CPLUSPLUS_ALLOCA) -#undef HAVE_ALLOCA -#undef HAVE_ALLOCA_H -#endif -#ifdef HAVE_ALLOCA_H -#include -#endif - -#include /* Recommended by debian */ -/* We need the following to go around a problem with openssl on solaris */ -#if defined(HAVE_CRYPT_H) -#include -#endif - -/* - A lot of our programs uses asserts, so better to always include it - This also fixes a problem when people uses DBUG_ASSERT without including - assert.h -*/ -#include - -/* an assert that works at compile-time. only for constant expression */ -#ifdef _some_old_compiler_that_does_not_understand_the_construct_below_ -#define compile_time_assert(X) do { } while(0) -#else -#define compile_time_assert(X) \ - do \ - { \ - typedef char compile_time_assert[(X) ? 1 : -1]; \ - } while(0) -#endif - -/* Go around some bugs in different OS and compilers */ -#if defined (HPUX11) && defined(_LARGEFILE_SOURCE) -#define _LARGEFILE64_SOURCE -#endif -#if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H) -#include /* HPUX 10.20 defines ulong here. UGLY !!! */ -#define HAVE_ULONG -#endif -#if defined(HPUX10) && defined(_LARGEFILE64_SOURCE) && defined(THREAD) -/* Fix bug in setrlimit */ -#undef setrlimit -#define setrlimit cma_setrlimit64 -#endif -/* Declare madvise where it is not declared for C++, like Solaris */ -#if HAVE_MADVISE && !HAVE_DECL_MADVISE && defined(__cplusplus) -extern "C" int madvise(void *addr, size_t len, int behav); -#endif - -#ifdef __QNXNTO__ -/* This has to be after include limits.h */ -#define HAVE_ERRNO_AS_DEFINE -#define HAVE_FCNTL_LOCK -#undef HAVE_FINITE -#undef LONGLONG_MIN /* These get wrongly defined in QNX 6.2 */ -#undef LONGLONG_MAX /* standard system library 'limits.h' */ -#endif - -/* We can not live without the following defines */ - -#define USE_MYFUNC 1 /* Must use syscall indirection */ -#define MASTER 1 /* Compile without unireg */ -#define ENGLISH 1 /* Messages in English */ -#define POSIX_MISTAKE 1 /* regexp: Fix stupid spec error */ -#define USE_REGEX 1 /* We want the use the regex library */ -/* Do not define for ultra sparcs */ -#define USE_BMOVE512 1 /* Use this unless system bmove is faster */ - -#define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ -#define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ - -/* Paranoid settings. Define I_AM_PARANOID if you are paranoid */ -#ifdef I_AM_PARANOID -#define DONT_ALLOW_USER_CHANGE 1 -#define DONT_USE_MYSQL_PWD 1 -#endif - -/* Does the system remember a signal handler after a signal ? */ -#ifndef HAVE_BSD_SIGNALS -#define DONT_REMEMBER_SIGNAL -#endif - -#if defined(_lint) || defined(FORCE_INIT_OF_VARS) -#define LINT_INIT(var) var=0 /* No uninitialize-warning */ -#else -#define LINT_INIT(var) -#endif - -#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(HAVE_purify) -#define PURIFY_OR_LINT_INIT(var) var=0 -#else -#define PURIFY_OR_LINT_INIT(var) -#endif - -#if !defined(HAVE_UINT) -#undef HAVE_UINT -#define HAVE_UINT -typedef unsigned int uint; -typedef unsigned short ushort; -#endif - -#define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1) -#define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0) -#define swap_variables(t, a, b) { t swap_dummy; swap_dummy= a; a= b; b= swap_dummy; } -#define test(a) ((a) ? 1 : 0) -#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0) -#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0) -#define test_all_bits(a,b) (((a) & (b)) == (b)) -#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1)) -#define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0]))) - -/* Define some general constants */ -#ifndef TRUE -#define TRUE (1) /* Logical true */ -#define FALSE (0) /* Logical false */ -#endif - -#if defined(__GNUC__) -#define function_volatile volatile -#define my_reinterpret_cast(A) reinterpret_cast -#define my_const_cast(A) const_cast -# ifndef GCC_VERSION -# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) -# endif -#elif !defined(my_reinterpret_cast) -#define my_reinterpret_cast(A) (A) -#define my_const_cast(A) (A) -#endif - -#include - -/* - Wen using the embedded library, users might run into link problems, - duplicate declaration of __cxa_pure_virtual, solved by declaring it a - weak symbol. -*/ -#if defined(USE_MYSYS_NEW) && ! defined(DONT_DECLARE_CXA_PURE_VIRTUAL) -C_MODE_START -int __cxa_pure_virtual () __attribute__ ((weak)); -C_MODE_END -#endif - -/* From old s-system.h */ - -/* - Support macros for non ansi & other old compilers. Since such - things are no longer supported we do nothing. We keep then since - some of our code may still be needed to upgrade old customers. -*/ -#define _VARARGS(X) X -#define _STATIC_VARARGS(X) X - -/* The DBUG_ON flag always takes precedence over default DBUG_OFF */ -#if defined(DBUG_ON) && defined(DBUG_OFF) -#undef DBUG_OFF -#endif - -/* We might be forced to turn debug off, if not turned off already */ -#if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF) -# define DBUG_OFF -# ifdef DBUG_ON -# undef DBUG_ON -# endif -#endif - -typedef char my_bool; /* Small bool */ -#include - -#define MIN_ARRAY_SIZE 0 /* Zero or One. Gcc allows zero*/ -#define ASCII_BITS_USED 8 /* Bit char used */ -#define NEAR_F /* No near function handling */ - -/* Some types that is different between systems */ - -typedef int File; /* File descriptor */ -#ifndef Socket_defined -typedef int my_socket; /* File descriptor for sockets */ -#define INVALID_SOCKET -1 -#endif -/* Type for fuctions that handles signals */ -#define sig_handler void -C_MODE_START -typedef void (*sig_return)();/* Returns type from signal */ -C_MODE_END -#if defined(__GNUC__) && !defined(_lint) -typedef char pchar; /* Mixed prototypes can take char */ -typedef char puchar; /* Mixed prototypes can take char */ -typedef char pbool; /* Mixed prototypes can take char */ -typedef short pshort; /* Mixed prototypes can take short int */ -typedef float pfloat; /* Mixed prototypes can take float */ -#else -typedef int pchar; /* Mixed prototypes can't take char */ -typedef uint puchar; /* Mixed prototypes can't take char */ -typedef int pbool; /* Mixed prototypes can't take char */ -typedef int pshort; /* Mixed prototypes can't take short int */ -typedef double pfloat; /* Mixed prototypes can't take float */ -#endif -C_MODE_START -typedef int (*qsort_cmp)(const void *,const void *); -typedef int (*qsort_cmp2)(void*, const void *,const void *); -C_MODE_END -#define qsort_t RETQSORTTYPE /* Broken GCC cant handle typedef !!!! */ -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -/* file create flags */ - -#ifndef O_SHARE /* Probably not windows */ -#define O_SHARE 0 /* Flag to my_open for shared files */ -#ifndef O_BINARY -#define O_BINARY 0 /* Flag to my_open for binary files */ -#endif -#ifndef FILE_BINARY -#define FILE_BINARY O_BINARY /* Flag to my_fopen for binary streams */ -#endif -#ifdef HAVE_FCNTL -#define HAVE_FCNTL_LOCK -#define F_TO_EOF 0L /* Param to lockf() to lock rest of file */ -#endif -#endif /* O_SHARE */ - -#ifndef O_TEMPORARY -#define O_TEMPORARY 0 -#endif -#ifndef O_SHORT_LIVED -#define O_SHORT_LIVED 0 -#endif -#ifndef O_NOFOLLOW -#define O_NOFOLLOW 0 -#endif - -/* additional file share flags for win32 */ -#ifdef __WIN__ -#define _SH_DENYRWD 0x110 /* deny read/write mode & delete */ -#define _SH_DENYWRD 0x120 /* deny write mode & delete */ -#define _SH_DENYRDD 0x130 /* deny read mode & delete */ -#define _SH_DENYDEL 0x140 /* deny delete only */ -#endif /* __WIN__ */ - - -/* #define USE_RECORD_LOCK */ - - /* Unsigned types supported by the compiler */ -#define UNSINT8 /* unsigned int8 (char) */ -#define UNSINT16 /* unsigned int16 */ -#define UNSINT32 /* unsigned int32 */ - - /* General constants */ -#define FN_LEN 256 /* Max file name len */ -#define FN_HEADLEN 253 /* Max length of filepart of file name */ -#define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */ -#define FN_REFLEN 512 /* Max length of full path-name */ -#define FN_EXTCHAR '.' -#define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */ -#define FN_CURLIB '.' /* ./ is used as abbrev for current dir */ -#define FN_PARENTDIR ".." /* Parent directory; Must be a string */ - -#ifndef FN_LIBCHAR -#define FN_LIBCHAR '/' -#define FN_ROOTDIR "/" -#endif - -/* - MY_FILE_MIN is Windows speciality and is used to quickly detect - the mismatch of CRT and mysys file IO usage on Windows at runtime. - CRT file descriptors can be in the range 0-2047, whereas descriptors returned - by my_open() will start with 2048. If a file descriptor with value less then - MY_FILE_MIN is passed to mysys IO function, chances are it stemms from - open()/fileno() and not my_open()/my_fileno. - - For Posix, mysys functions are light wrappers around libc, and MY_FILE_MIN - is logically 0. -*/ - -#ifdef _WIN32 -#define MY_FILE_MIN 2048 -#else -#define MY_FILE_MIN 0 -#endif - -/* - MY_NFILE is the default size of my_file_info array. - - It is larger on Windows, because it all file handles are stored in my_file_info - Default size is 16384 and this should be enough for most cases.If it is not - enough, --max-open-files with larger value can be used. - - For Posix , my_file_info array is only used to store filenames for - error reporting and its size is not a limitation for number of open files. -*/ -#ifdef _WIN32 -#define MY_NFILE (16384 + MY_FILE_MIN) -#else -#define MY_NFILE 64 -#endif - -#ifndef OS_FILE_LIMIT -#define OS_FILE_LIMIT 65535 -#endif - -/* #define EXT_IN_LIBNAME */ -/* #define FN_NO_CASE_SENCE */ -/* #define FN_UPPER_CASE TRUE */ - -/* - Io buffer size; Must be a power of 2 and a multiple of 512. May be - smaller what the disk page size. This influences the speed of the - isam btree library. eg to big to slow. -*/ -#define IO_SIZE 4096 -/* - How much overhead does malloc have. The code often allocates - something like 1024-MALLOC_OVERHEAD bytes -*/ -#ifdef SAFEMALLOC -#define MALLOC_OVERHEAD (8+24+4) -#else -#define MALLOC_OVERHEAD 8 -#endif - /* get memory in huncs */ -#define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD) - /* Typical record cash */ -#define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD) - /* Typical key cash */ -#define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD) - /* Default size of a key cache block */ -#define KEY_CACHE_BLOCK_SIZE (uint) 1024 - - - /* Some things that this system doesn't have */ - -#define NO_HASH /* Not needed anymore */ -#ifdef _WIN32 -#define NO_DIR_LIBRARY /* Not standard dir-library */ -#endif - -/* Some defines of functions for portability */ - -#undef remove /* Crashes MySQL on SCO 5.0.0 */ -#ifndef __WIN__ -#define closesocket(A) close(A) -#ifndef ulonglong2double -#define ulonglong2double(A) ((double) (ulonglong) (A)) -#define my_off_t2double(A) ((double) (my_off_t) (A)) -#endif -#ifndef double2ulonglong -#define double2ulonglong(A) ((ulonglong) (double) (A)) -#endif -#endif - -#ifndef offsetof -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif -#define ulong_to_double(X) ((double) (ulong) (X)) -#define SET_STACK_SIZE(X) /* Not needed on real machines */ - -#ifndef STACK_DIRECTION -#error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS" -#endif - -#if !defined(HAVE_STRTOK_R) -inline char *strtok_r(char *str, const char *delim, char **saveptr) -{ - return strtok(str,delim); -} -#endif - -/* This is from the old m-machine.h file */ - -#if SIZEOF_LONG_LONG > 4 -#define HAVE_LONG_LONG 1 -#endif - -/* - Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define - ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined. - Also on Windows we define these constants by hand in config-win.h. -*/ - -#if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN) -#define LONGLONG_MIN ((long long) 0x8000000000000000LL) -#define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL) -#endif - -#if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX) -/* First check for ANSI C99 definition: */ -#ifdef ULLONG_MAX -#define ULONGLONG_MAX ULLONG_MAX -#else -#define ULONGLONG_MAX ((unsigned long long)(~0ULL)) -#endif -#endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/ - -#define INT_MIN32 (~0x7FFFFFFFL) -#define INT_MAX32 0x7FFFFFFFL -#define UINT_MAX32 0xFFFFFFFFL -#define INT_MIN24 (~0x007FFFFF) -#define INT_MAX24 0x007FFFFF -#define UINT_MAX24 0x00FFFFFF -#define INT_MIN16 (~0x7FFF) -#define INT_MAX16 0x7FFF -#define UINT_MAX16 0xFFFF -#define INT_MIN8 (~0x7F) -#define INT_MAX8 0x7F -#define UINT_MAX8 0xFF - -/* From limits.h instead */ -#ifndef DBL_MIN -#define DBL_MIN 4.94065645841246544e-324 -#define FLT_MIN ((float)1.40129846432481707e-45) -#endif -#ifndef DBL_MAX -#define DBL_MAX 1.79769313486231470e+308 -#define FLT_MAX ((float)3.40282346638528860e+38) -#endif -#ifndef SIZE_T_MAX -#define SIZE_T_MAX ~((size_t) 0) -#endif - -#ifndef isfinite -#ifdef HAVE_FINITE -#define isfinite(x) finite(x) -#else -#define finite(x) (1.0 / fabs(x) > 0.0) -#endif /* HAVE_FINITE */ -#endif /* isfinite */ - -#ifndef HAVE_ISNAN -#define isnan(x) ((x) != (x)) -#endif - -#ifdef HAVE_ISINF -/* Check if C compiler is affected by GCC bug #39228 */ -#if !defined(__cplusplus) && defined(HAVE_BROKEN_ISINF) -/* Force store/reload of the argument to/from a 64-bit double */ -static inline double my_isinf(double x) -{ - volatile double t= x; - return isinf(t); -} -#else -/* System-provided isinf() is available and safe to use */ -#define my_isinf(X) isinf(X) -#endif -#else /* !HAVE_ISINF */ -#define my_isinf(X) (!finite(X) && !isnan(X)) -#endif - -/* Define missing math constants. */ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif -#ifndef M_E -#define M_E 2.7182818284590452354 -#endif -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 -#endif - -/* - Max size that must be added to a so that we know Size to make - adressable obj. -*/ -#if SIZEOF_CHARP == 4 -typedef long my_ptrdiff_t; -#else -typedef long long my_ptrdiff_t; -#endif - -#define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) -#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) -/* Size to make adressable obj. */ -#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t))) - /* Offset of field f in structure t */ -#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f) -#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size) -#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B)) - -#define MY_DIV_UP(A, B) (((A) + (B) - 1) / (B)) -#define MY_ALIGNED_BYTE_ARRAY(N, S, T) T N[MY_DIV_UP(S, sizeof(T))] - -/* - Custom version of standard offsetof() macro which can be used to get - offsets of members in class for non-POD types (according to the current - version of C++ standard offsetof() macro can't be used in such cases and - attempt to do so causes warnings to be emitted, OTOH in many cases it is - still OK to assume that all instances of the class has the same offsets - for the same members). - - This is temporary solution which should be removed once File_parser class - and related routines are refactored. -*/ - -#define my_offsetof(TYPE, MEMBER) \ - ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10)) - -#define NullS STATIC_CAST(char *)(0) -/* Nowdays we do not support MessyDos */ -#ifndef NEAR -#define NEAR /* Who needs segments ? */ -#define FAR /* On a good machine */ -#ifndef HUGE_PTR -#define HUGE_PTR -#endif -#endif -#if defined(__IBMC__) || defined(__IBMCPP__) -/* This was _System _Export but caused a lot of warnings on _AIX43 */ -#define STDCALL -#elif !defined( STDCALL) -#define STDCALL -#endif - -/* Typdefs for easyier portability */ - -#ifndef HAVE_UCHAR -typedef unsigned char uchar; /* Short for unsigned char */ -#endif - -#ifndef HAVE_INT8 -typedef signed char int8; /* Signed integer >= 8 bits */ -#endif -#ifndef HAVE_UINT8 -typedef unsigned char uint8; /* Unsigned integer >= 8 bits */ -#endif -#ifndef HAVE_INT16 -typedef short int16; -#endif -#ifndef HAVE_UINT16 -typedef unsigned short uint16; -#endif -#if SIZEOF_INT == 4 -#ifndef HAVE_INT32 -typedef int int32; -#endif -#ifndef HAVE_UINT32 -typedef unsigned int uint32; -#endif -#elif SIZEOF_LONG == 4 -#ifndef HAVE_INT32 -typedef long int32; -#endif -#ifndef HAVE_UINT32 -typedef unsigned long uint32; -#endif -#else -#error Neither int or long is of 4 bytes width -#endif - -#if !defined(HAVE_ULONG) && !defined(__USE_MISC) -typedef unsigned long ulong; /* Short for unsigned long */ -#endif -#ifndef longlong_defined -/* - Using [unsigned] long long is preferable as [u]longlong because we use - [unsigned] long long unconditionally in many places, - for example in constants with [U]LL suffix. -*/ -#if defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8 -typedef unsigned long long int ulonglong; /* ulong or unsigned long long */ -typedef long long int longlong; -#else -typedef unsigned long ulonglong; /* ulong or unsigned long long */ -typedef long longlong; -#endif -#endif -#ifndef HAVE_INT64 -typedef longlong int64; -#endif -#ifndef HAVE_UINT64 -typedef ulonglong uint64; -#endif - -#if defined(NO_CLIENT_LONG_LONG) -typedef unsigned long my_ulonglong; -#elif defined (__WIN__) -typedef unsigned __int64 my_ulonglong; -#else -typedef unsigned long long my_ulonglong; -#endif - -#if SIZEOF_CHARP == SIZEOF_INT -typedef int intptr; -#elif SIZEOF_CHARP == SIZEOF_LONG -typedef long intptr; -#elif SIZEOF_CHARP == SIZEOF_LONG_LONG -typedef long long intptr; -#else -#error sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(long long) -#endif - -#define MY_ERRPTR ((void*)(intptr)1) - -#ifdef USE_RAID -/* - The following is done with a if to not get problems with pre-processors - with late define evaluation -*/ -#if SIZEOF_OFF_T == 4 -#define SYSTEM_SIZEOF_OFF_T 4 -#else -#define SYSTEM_SIZEOF_OFF_T 8 -#endif -#undef SIZEOF_OFF_T -#define SIZEOF_OFF_T 8 -#else -#define SYSTEM_SIZEOF_OFF_T SIZEOF_OFF_T -#endif /* USE_RAID */ - -#if SIZEOF_OFF_T > 4 -typedef ulonglong my_off_t; -#else -typedef unsigned long my_off_t; -#endif -#define MY_FILEPOS_ERROR (~STATIC_CAST(my_off_t)(0)) -#if !defined(__WIN__) -typedef off_t os_off_t; -#endif - -#if defined(__WIN__) -#define socket_errno WSAGetLastError() -#define SOCKET_EINTR WSAEINTR -#define SOCKET_EAGAIN WSAEINPROGRESS -#define SOCKET_ETIMEDOUT WSAETIMEDOUT -#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK -#define SOCKET_EADDRINUSE WSAEADDRINUSE -#define SOCKET_ENFILE ENFILE -#define SOCKET_EMFILE EMFILE -#else /* Unix */ -#define socket_errno errno -#define closesocket(A) close(A) -#define SOCKET_EINTR EINTR -#define SOCKET_EAGAIN EAGAIN -#define SOCKET_ETIMEDOUT SOCKET_EINTR -#define SOCKET_EWOULDBLOCK EWOULDBLOCK -#define SOCKET_EADDRINUSE EADDRINUSE -#define SOCKET_ENFILE ENFILE -#define SOCKET_EMFILE EMFILE -#endif - -typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */ -typedef short int15; /* Most effective integer 0 <= x <= 32767 */ -typedef int myf; /* Type of MyFlags in my_funcs */ - /* Macros for converting *constants* to the right type */ -#define INT8(v) (int8) (v) -#define INT16(v) (int16) (v) -#define INT32(v) (int32) (v) -#define MYF(v) STATIC_CAST(myf)(v) - -/* - Defines to make it possible to prioritize register assignments. No - longer that important with modern compilers. -*/ -#ifndef USING_X -#define reg1 register -#define reg2 register -#define reg3 register -#define reg4 register -#define reg5 register -#define reg6 register -#define reg7 register -#define reg8 register -#define reg9 register -#define reg10 register -#define reg11 register -#define reg12 register -#define reg13 register -#define reg14 register -#define reg15 register -#define reg16 register -#endif - -/* - Sometimes we want to make sure that the variable is not put into - a register in debugging mode so we can see its value in the core -*/ - -#ifndef DBUG_OFF -#define dbug_volatile volatile -#else -#define dbug_volatile -#endif - -/* Some helper macros */ -#define YESNO(X) ((X) ? "yes" : "no") - -/* Defines for time function */ -#define SCALE_SEC 100 -#define SCALE_USEC 10000 -#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */ -#define MY_HOW_OFTEN_TO_WRITE 10000 /* How often we want info on screen */ - -/* - Define-funktions for reading and storing in machine independent format - (low byte first) -*/ - -/* Optimized store functions for Intel x86 */ -#if defined(__i386__) || defined(_WIN32) -#define sint2korr(A) (*((const int16 *) (A))) -#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ - (((uint32) 255L << 24) | \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0])) : \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0]))) -#define sint4korr(A) (*((const long *) (A))) -#define uint2korr(A) (*((const uint16 *) (A))) -#if defined(HAVE_purify) && !defined(_WIN32) -#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16)) -#else -/* - ATTENTION ! - - Please, note, uint3korr reads 4 bytes (not 3) ! - It means, that you have to provide enough allocated space ! -*/ -#define uint3korr(A) (long) (*((const unsigned int *) (A)) & 0xFFFFFF) -#endif /* HAVE_purify && !_WIN32 */ -#define uint4korr(A) (*((const uint32 *) (A))) -#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16) +\ - (((uint32) ((uchar) (A)[3])) << 24)) +\ - (((ulonglong) ((uchar) (A)[4])) << 32)) -#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \ - (((uint32) ((uchar) (A)[1])) << 8) + \ - (((uint32) ((uchar) (A)[2])) << 16) + \ - (((uint32) ((uchar) (A)[3])) << 24)) + \ - (((ulonglong) ((uchar) (A)[4])) << 32) + \ - (((ulonglong) ((uchar) (A)[5])) << 40)) -#define uint8korr(A) (*((const ulonglong *) (A))) -#define sint8korr(A) (*((const longlong *) (A))) -#define int2store(T,A) *((uint16*) (T))= (uint16) (A) -#define int3store(T,A) do { *(T)= (uchar) ((A));\ - *(T+1)=(uchar) (((uint) (A) >> 8));\ - *(T+2)=(uchar) (((A) >> 16)); } while (0) -#define int4store(T,A) *((long *) (T))= (long) (A) -#define int5store(T,A) do { *(T)= (uchar)((A));\ - *((T)+1)=(uchar) (((A) >> 8));\ - *((T)+2)=(uchar) (((A) >> 16));\ - *((T)+3)=(uchar) (((A) >> 24)); \ - *((T)+4)=(uchar) (((A) >> 32)); } while(0) -#define int6store(T,A) do { *(T)= (uchar)((A)); \ - *((T)+1)=(uchar) (((A) >> 8)); \ - *((T)+2)=(uchar) (((A) >> 16)); \ - *((T)+3)=(uchar) (((A) >> 24)); \ - *((T)+4)=(uchar) (((A) >> 32)); \ - *((T)+5)=(uchar) (((A) >> 40)); } while(0) -#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A) - -typedef union { - double v; - long m[2]; -} doubleget_union; -#define doubleget(V,M) \ -do { doubleget_union _tmp; \ - _tmp.m[0] = *((const long*)(M)); \ - _tmp.m[1] = *(((const long*) (M))+1); \ - (V) = _tmp.v; } while(0) -#define doublestore(T,V) do { *((long *) T) = ((const doubleget_union *)&V)->m[0]; \ - *(((long *) T)+1) = ((const doubleget_union *)&V)->m[1]; \ - } while (0) -#define float4get(V,M) do { *((float *) &(V)) = *((const float*) (M)); } while(0) -#define float8get(V,M) doubleget((V),(M)) -#define float4store(V,M) memcpy((uchar*) V,(const uchar*) (&M),sizeof(float)) -#define floatstore(T,V) memcpy((uchar*)(T), (const uchar*)(&V),sizeof(float)) -#define floatget(V,M) memcpy((uchar*) &V,(const uchar*) (M),sizeof(float)) -#define float8store(V,M) doublestore((V),(M)) -#else - -/* - We're here if it's not a IA-32 architecture (Win32 and UNIX IA-32 defines - were done before) -*/ -#define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\ - ((int16) ((int16) (A)[1]) << 8)) -#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ - (((uint32) 255L << 24) | \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0])) : \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0]))) -#define sint4korr(A) (int32) (((int32) ((uchar) (A)[0])) +\ - (((int32) ((uchar) (A)[1]) << 8)) +\ - (((int32) ((uchar) (A)[2]) << 16)) +\ - (((int32) ((int16) (A)[3]) << 24))) -#define sint8korr(A) (longlong) uint8korr(A) -#define uint2korr(A) (uint16) (((uint16) ((uchar) (A)[0])) +\ - ((uint16) ((uchar) (A)[1]) << 8)) -#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16)) -#define uint4korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16) +\ - (((uint32) ((uchar) (A)[3])) << 24)) -#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16) +\ - (((uint32) ((uchar) (A)[3])) << 24)) +\ - (((ulonglong) ((uchar) (A)[4])) << 32)) -#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \ - (((uint32) ((uchar) (A)[1])) << 8) + \ - (((uint32) ((uchar) (A)[2])) << 16) + \ - (((uint32) ((uchar) (A)[3])) << 24)) + \ - (((ulonglong) ((uchar) (A)[4])) << 32) + \ - (((ulonglong) ((uchar) (A)[5])) << 40)) -#define uint8korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16) +\ - (((uint32) ((uchar) (A)[3])) << 24)) +\ - (((ulonglong) (((uint32) ((uchar) (A)[4])) +\ - (((uint32) ((uchar) (A)[5])) << 8) +\ - (((uint32) ((uchar) (A)[6])) << 16) +\ - (((uint32) ((uchar) (A)[7])) << 24))) <<\ - 32)) -#define int2store(T,A) do { uint def_temp= (uint) (A) ;\ - *((uchar*) (T))= (uchar)(def_temp); \ - *((uchar*) (T)+1)=(uchar)((def_temp >> 8)); \ - } while(0) -#define int3store(T,A) do { /*lint -save -e734 */\ - *((uchar*)(T))=(uchar) ((A));\ - *((uchar*) (T)+1)=(uchar) (((A) >> 8));\ - *((uchar*)(T)+2)=(uchar) (((A) >> 16)); \ - /*lint -restore */} while(0) -#define int4store(T,A) do { *((char *)(T))=(char) ((A));\ - *(((char *)(T))+1)=(char) (((A) >> 8));\ - *(((char *)(T))+2)=(char) (((A) >> 16));\ - *(((char *)(T))+3)=(char) (((A) >> 24)); } while(0) -#define int5store(T,A) do { *((char *)(T))= (char)((A)); \ - *(((char *)(T))+1)= (char)(((A) >> 8)); \ - *(((char *)(T))+2)= (char)(((A) >> 16)); \ - *(((char *)(T))+3)= (char)(((A) >> 24)); \ - *(((char *)(T))+4)= (char)(((A) >> 32)); \ - } while(0) -#define int6store(T,A) do { *((char *)(T))= (char)((A)); \ - *(((char *)(T))+1)= (char)(((A) >> 8)); \ - *(((char *)(T))+2)= (char)(((A) >> 16)); \ - *(((char *)(T))+3)= (char)(((A) >> 24)); \ - *(((char *)(T))+4)= (char)(((A) >> 32)); \ - *(((char *)(T))+5)= (char)(((A) >> 40)); \ - } while(0) -#define int8store(T,A) do { uint def_temp= (uint) (A), def_temp2= (uint) ((A) >> 32); \ - int4store((T),def_temp); \ - int4store((T+4),def_temp2); } while(0) -#ifdef WORDS_BIGENDIAN -#define float4store(T,A) do { *(T)= ((uchar *) &A)[3];\ - *((T)+1)=(char) ((uchar *) &A)[2];\ - *((T)+2)=(char) ((uchar *) &A)[1];\ - *((T)+3)=(char) ((uchar *) &A)[0]; } while(0) - -#define float4get(V,M) do { float def_temp;\ - ((uchar*) &def_temp)[0]=(M)[3];\ - ((uchar*) &def_temp)[1]=(M)[2];\ - ((uchar*) &def_temp)[2]=(M)[1];\ - ((uchar*) &def_temp)[3]=(M)[0];\ - (V)=def_temp; } while(0) -#define float8store(T,V) do { *(T)= ((uchar *) &V)[7];\ - *((T)+1)=(char) ((uchar *) &V)[6];\ - *((T)+2)=(char) ((uchar *) &V)[5];\ - *((T)+3)=(char) ((uchar *) &V)[4];\ - *((T)+4)=(char) ((uchar *) &V)[3];\ - *((T)+5)=(char) ((uchar *) &V)[2];\ - *((T)+6)=(char) ((uchar *) &V)[1];\ - *((T)+7)=(char) ((uchar *) &V)[0]; } while(0) - -#define float8get(V,M) do { double def_temp;\ - ((uchar*) &def_temp)[0]=(M)[7];\ - ((uchar*) &def_temp)[1]=(M)[6];\ - ((uchar*) &def_temp)[2]=(M)[5];\ - ((uchar*) &def_temp)[3]=(M)[4];\ - ((uchar*) &def_temp)[4]=(M)[3];\ - ((uchar*) &def_temp)[5]=(M)[2];\ - ((uchar*) &def_temp)[6]=(M)[1];\ - ((uchar*) &def_temp)[7]=(M)[0];\ - (V) = def_temp; } while(0) -#else -#define float4get(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float)) -#define float4store(V,M) memcpy_fixed((uchar*) V,(uchar*) (&M),sizeof(float)) - -#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN) -#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((uchar *) &V)[4];\ - *(((char*)T)+1)=(char) ((uchar *) &V)[5];\ - *(((char*)T)+2)=(char) ((uchar *) &V)[6];\ - *(((char*)T)+3)=(char) ((uchar *) &V)[7];\ - *(((char*)T)+4)=(char) ((uchar *) &V)[0];\ - *(((char*)T)+5)=(char) ((uchar *) &V)[1];\ - *(((char*)T)+6)=(char) ((uchar *) &V)[2];\ - *(((char*)T)+7)=(char) ((uchar *) &V)[3]; }\ - while(0) -#define doubleget(V,M) do { double def_temp;\ - ((uchar*) &def_temp)[0]=(M)[4];\ - ((uchar*) &def_temp)[1]=(M)[5];\ - ((uchar*) &def_temp)[2]=(M)[6];\ - ((uchar*) &def_temp)[3]=(M)[7];\ - ((uchar*) &def_temp)[4]=(M)[0];\ - ((uchar*) &def_temp)[5]=(M)[1];\ - ((uchar*) &def_temp)[6]=(M)[2];\ - ((uchar*) &def_temp)[7]=(M)[3];\ - (V) = def_temp; } while(0) -#endif /* __FLOAT_WORD_ORDER */ - -#define float8get(V,M) doubleget((V),(M)) -#define float8store(V,M) doublestore((V),(M)) -#endif /* WORDS_BIGENDIAN */ - -#endif /* __i386__ OR _WIN32 */ - -/* - Macro for reading 32-bit integer from network byte order (big-endian) - from unaligned memory location. -*/ -#define int4net(A) (int32) (((uint32) ((uchar) (A)[3])) |\ - (((uint32) ((uchar) (A)[2])) << 8) |\ - (((uint32) ((uchar) (A)[1])) << 16) |\ - (((uint32) ((uchar) (A)[0])) << 24)) -/* - Define-funktions for reading and storing in machine format from/to - short/long to/from some place in memory V should be a (not - register) variable, M is a pointer to byte -*/ - -#ifdef WORDS_BIGENDIAN - -#define ushortget(V,M) do { V = (uint16) (((uint16) ((uchar) (M)[1]))+\ - ((uint16) ((uint16) (M)[0]) << 8)); } while(0) -#define shortget(V,M) do { V = (short) (((short) ((uchar) (M)[1]))+\ - ((short) ((short) (M)[0]) << 8)); } while(0) -#define longget(V,M) do { int32 def_temp;\ - ((uchar*) &def_temp)[0]=(M)[0];\ - ((uchar*) &def_temp)[1]=(M)[1];\ - ((uchar*) &def_temp)[2]=(M)[2];\ - ((uchar*) &def_temp)[3]=(M)[3];\ - (V)=def_temp; } while(0) -#define ulongget(V,M) do { uint32 def_temp;\ - ((uchar*) &def_temp)[0]=(M)[0];\ - ((uchar*) &def_temp)[1]=(M)[1];\ - ((uchar*) &def_temp)[2]=(M)[2];\ - ((uchar*) &def_temp)[3]=(M)[3];\ - (V)=def_temp; } while(0) -#define shortstore(T,A) do { uint def_temp=(uint) (A) ;\ - *(((char*)T)+1)=(char)(def_temp); \ - *(((char*)T)+0)=(char)(def_temp >> 8); } while(0) -#define longstore(T,A) do { *(((char*)T)+3)=((A));\ - *(((char*)T)+2)=(((A) >> 8));\ - *(((char*)T)+1)=(((A) >> 16));\ - *(((char*)T)+0)=(((A) >> 24)); } while(0) - -#define floatget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float)) -#define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*)(&V),sizeof(float)) -#define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double)) -#define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(double)) -#define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulonglong)) -#define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulonglong)) - -#else - -#define ushortget(V,M) do { V = uint2korr(M); } while(0) -#define shortget(V,M) do { V = sint2korr(M); } while(0) -#define longget(V,M) do { V = sint4korr(M); } while(0) -#define ulongget(V,M) do { V = uint4korr(M); } while(0) -#define shortstore(T,V) int2store(T,V) -#define longstore(T,V) int4store(T,V) -#ifndef floatstore -#define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) (&V),sizeof(float)) -#define floatget(V,M) memcpy_fixed((uchar*) &V, (uchar*) (M), sizeof(float)) -#endif -#ifndef doubleget -#define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double)) -#define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(double)) -#endif /* doubleget */ -#define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulonglong)) -#define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulonglong)) - -#endif /* WORDS_BIGENDIAN */ - -/* sprintf does not always return the number of bytes :- */ -#ifdef SPRINTF_RETURNS_INT -#define my_sprintf(buff,args) sprintf args -#else -#ifdef SPRINTF_RETURNS_PTR -#define my_sprintf(buff,args) ((int)(sprintf args - buff)) -#else -#define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff)) -#endif -#endif - -#ifndef THREAD -#define thread_safe_increment(V,L) (V)++ -#define thread_safe_decrement(V,L) (V)-- -#define thread_safe_add(V,C,L) (V)+=(C) -#define thread_safe_sub(V,C,L) (V)-=(C) -#define statistic_increment(V,L) (V)++ -#define statistic_decrement(V,L) (V)-- -#define statistic_add(V,C,L) (V)+=(C) -#define statistic_sub(V,C,L) (V)-=(C) -#endif - -#if defined(HAVE_CHARSET_utf8mb3) || defined(HAVE_CHARSET_utf8mb4) -#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8" -#else -#define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME -#endif - -#if defined(EMBEDDED_LIBRARY) && !defined(HAVE_EMBEDDED_PRIVILEGE_CONTROL) -#define NO_EMBEDDED_ACCESS_CHECKS -#endif - -#ifdef HAVE_DLOPEN -#if defined(__WIN__) -#define dlsym(lib, name) GetProcAddress((HMODULE)lib, name) -#define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0) -#define dlclose(lib) FreeLibrary((HMODULE)lib) -#elif defined(HAVE_DLFCN_H) -#include -#endif -#endif - -/* FreeBSD 2.2.2 does not define RTLD_NOW) */ -#ifndef RTLD_NOW -#define RTLD_NOW 1 -#endif - -#ifndef HAVE_DLERROR -#define dlerror() "" -#endif - - -#ifndef __NETWARE__ -/* - * Include standard definitions of operator new and delete. - */ -#ifdef __cplusplus -#include -#endif -#else -/* - * Define placement versions of operator new and operator delete since - * we don't have when building for Netware. - */ -#ifdef __cplusplus -inline void *operator new(size_t, void *ptr) { return ptr; } -inline void *operator new[](size_t, void *ptr) { return ptr; } -inline void operator delete(void*, void*) { /* Do nothing */ } -inline void operator delete[](void*, void*) { /* Do nothing */ } -#endif -#endif - -/* Length of decimal number represented by INT32. */ -#define MY_INT32_NUM_DECIMAL_DIGITS 11 - -/* Length of decimal number represented by INT64. */ -#define MY_INT64_NUM_DECIMAL_DIGITS 21 - -/* Define some useful general macros (should be done after all headers). */ -#if !defined(max) -#define max(a, b) ((a) > (b) ? (a) : (b)) -#define min(a, b) ((a) < (b) ? (a) : (b)) -#endif -/* - Only Linux is known to need an explicit sync of the directory to make sure a - file creation/deletion/renaming in(from,to) this directory durable. -*/ -#ifdef TARGET_OS_LINUX -#define NEED_EXPLICIT_SYNC_DIR 1 -#else -/* - On linux default rwlock scheduling policy is good enough for - waiting_threads.c, on other systems use our special implementation - (which is slower). - - QQ perhaps this should be tested in configure ? how ? -*/ -#define WT_RWLOCKS_USE_MUTEXES 1 -#endif - -#if !defined(__cplusplus) && !defined(bool) -#define bool In_C_you_should_use_my_bool_instead() -#endif - -/* Provide __func__ macro definition for platforms that miss it. */ -#if __STDC_VERSION__ < 199901L -# if __GNUC__ >= 2 -# define __func__ __FUNCTION__ -# else -# define __func__ "" -# endif -#elif defined(_MSC_VER) -# if _MSC_VER < 1300 -# define __func__ "" -# else -# define __func__ __FUNCTION__ -# endif -#elif defined(__BORLANDC__) -# define __func__ __FUNC__ -#else -# define __func__ "" -#endif - -#ifndef HAVE_RINT -/** - All integers up to this number can be represented exactly as double precision - values (DBL_MANT_DIG == 53 for IEEE 754 hardware). -*/ -#define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1) - -/** - rint(3) implementation for platforms that do not have it. - Always rounds to the nearest integer with ties being rounded to the nearest - even integer to mimic glibc's rint() behavior in the "round-to-nearest" - FPU mode. Hardware-specific optimizations are possible (frndint on x86). - Unlike this implementation, hardware will also honor the FPU rounding mode. -*/ - -static inline double rint(double x) -{ - double f, i; - f = modf(x, &i); - - /* - All doubles with absolute values > MAX_EXACT_INTEGER are even anyway, - no need to check it. - */ - if (x > 0.0) - i += (double) ((f > 0.5) || (f == 0.5 && - i <= (double) MAX_EXACT_INTEGER && - (longlong) i % 2)); - else - i -= (double) ((f < -0.5) || (f == -0.5 && - i >= (double) -MAX_EXACT_INTEGER && - (longlong) i % 2)); - return i; -} -#endif /* HAVE_RINT */ - -/* - MYSQL_PLUGIN_IMPORT macro is used to export mysqld data - (i.e variables) for usage in storage engine loadable plugins. - Outside of Windows, it is dummy. -*/ -#ifndef MYSQL_PLUGIN_IMPORT -#if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN)) -#define MYSQL_PLUGIN_IMPORT __declspec(dllimport) -#else -#define MYSQL_PLUGIN_IMPORT -#endif -#endif - -#endif /* my_global_h */ diff --git a/externals/mysql/my_libwrap.h b/externals/mysql/my_libwrap.h deleted file mode 100644 index 9a8579475f..0000000000 --- a/externals/mysql/my_libwrap.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifdef HAVE_LIBWRAP -#include -#include -#ifdef NEED_SYS_SYSLOG_H -#include -#endif /* NEED_SYS_SYSLOG_H */ - -extern void my_fromhost(struct request_info *req); -extern int my_hosts_access(struct request_info *req); -extern char *my_eval_client(struct request_info *req); - -#endif /* HAVE_LIBWRAP */ diff --git a/externals/mysql/my_list.h b/externals/mysql/my_list.h deleted file mode 100644 index 775b56587b..0000000000 --- a/externals/mysql/my_list.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _list_h_ -#define _list_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct st_list { - struct st_list *prev,*next; - void *data; -} LIST; - -typedef int (*list_walk_action)(void *,void *); - -extern LIST *list_add(LIST *root,LIST *element); -extern LIST *list_delete(LIST *root,LIST *element); -extern LIST *list_cons(void *data,LIST *root); -extern LIST *list_reverse(LIST *root); -extern void list_free(LIST *root,unsigned int free_data); -extern unsigned int list_length(LIST *); -extern int list_walk(LIST *,list_walk_action action,unsigned char * argument); - -#define list_rest(a) ((a)->next) -#define list_push(a,b) (a)=list_cons((b),(a)) -#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((unsigned char *) old,MYF(MY_FAE)); } - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/mysql/my_md5.h b/externals/mysql/my_md5.h deleted file mode 100644 index 6458f27c5c..0000000000 --- a/externals/mysql/my_md5.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* See md5.c for explanation and copyright information. */ - -/* - * $FreeBSD: src/contrib/cvs/lib/md5.h,v 1.2 1999/12/11 15:10:02 peter Exp $ - */ - -/* Unlike previous versions of this code, uint32 need not be exactly - 32 bits, merely 32 bits or more. Choosing a data type which is 32 - bits instead of 64 is not important; speed is considerably more - important. ANSI guarantees that "unsigned long" will be big enough, - and always using it seems to have few disadvantages. */ -typedef uint32 cvs_uint32; - -typedef struct { - cvs_uint32 buf[4]; - cvs_uint32 bits[2]; - unsigned char in[64]; -} my_MD5Context; - -#ifdef __cplusplus -extern "C" { -#endif -void my_MD5Init (my_MD5Context *context); -void my_MD5Update (my_MD5Context *context, - unsigned char const *buf, unsigned len); -void my_MD5Final (unsigned char digest[16], - my_MD5Context *context); - -#ifdef __cplusplus -} -#endif - -#define MY_MD5_HASH(digest,buf,len) \ -do { \ - my_MD5Context ctx; \ - my_MD5Init (&ctx); \ - my_MD5Update (&ctx, buf, len); \ - my_MD5Final (digest, &ctx); \ -} while (0) diff --git a/externals/mysql/my_net.h b/externals/mysql/my_net.h deleted file mode 100644 index 18fb3db8e8..0000000000 --- a/externals/mysql/my_net.h +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - thread safe version of some common functions: - my_inet_ntoa - - This file is also used to make handling of sockets and ioctl() - portable accross systems. - -*/ - -#ifndef _my_net_h -#define _my_net_h -C_MODE_START - -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_POLL -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__NETWARE__) -#include -#include -#include -#if !defined(alpha_linux_port) -#include -#endif -#endif - -#if defined(__WIN__) -#define O_NONBLOCK 1 /* For emulation of fcntl() */ - -/* - SHUT_RDWR is called SD_BOTH in windows and - is defined to 2 in winsock2.h - #define SD_BOTH 0x02 -*/ -#define SHUT_RDWR 0x02 - -#endif - -/* - On OSes which don't have the in_addr_t, we guess that using uint32 is the best - possible choice. We guess this from the fact that on HP-UX64bit & FreeBSD64bit - & Solaris64bit, in_addr_t is equivalent to uint32. And on Linux32bit too. -*/ -#ifndef HAVE_IN_ADDR_T -#define in_addr_t uint32 -#endif - -/* Thread safe or portable version of some functions */ - -void my_inet_ntoa(struct in_addr in, char *buf); - -/* - Handling of gethostbyname_r() -*/ - -#if !defined(HAVE_GETHOSTBYNAME_R) -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop); -void my_gethostbyname_r_free(); -#elif defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop); -#define my_gethostbyname_r_free() -#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) && !defined(HPUX10) -#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) -#endif /* !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ - -#elif defined(HAVE_GETHOSTBYNAME_R_RETURN_INT) -#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop); -#define my_gethostbyname_r_free() -#else -#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E)) -#define my_gethostbyname_r_free() -#endif /* !defined(HAVE_GETHOSTBYNAME_R) */ - -#ifndef GETHOSTBYNAME_BUFF_SIZE -#define GETHOSTBYNAME_BUFF_SIZE 2048 -#endif - -C_MODE_END -#endif diff --git a/externals/mysql/my_no_pthread.h b/externals/mysql/my_no_pthread.h deleted file mode 100644 index b11dbff42f..0000000000 --- a/externals/mysql/my_no_pthread.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#if !defined(_my_no_pthread_h) && !defined(THREAD) -#define _my_no_pthread_h - - -/* - This block is to access some thread-related type definitions - even in builds which do not need thread functions, - as some variables (based on these types) are declared - even in non-threaded builds. - Case in point: 'mf_keycache.c' -*/ -#if defined(__WIN__) -#else /* Normal threads */ -#include - -#endif /* defined(__WIN__) */ - - -/* - This undefs some pthread mutex locks when one isn't using threads - to make thread safe code, that should also work in single thread - environment, easier to use. -*/ -#define pthread_mutex_init(A,B) -#define pthread_mutex_lock(A) -#define pthread_mutex_unlock(A) -#define pthread_mutex_destroy(A) -#define my_rwlock_init(A,B) -#define rw_rdlock(A) -#define rw_wrlock(A) -#define rw_unlock(A) -#define rwlock_destroy(A) - -#endif diff --git a/externals/mysql/my_nosys.h b/externals/mysql/my_nosys.h deleted file mode 100644 index df5639b81e..0000000000 --- a/externals/mysql/my_nosys.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Header to remove use of my_functions in functions where we need speed and - where calls to posix functions should work -*/ -#ifndef _my_nosys_h -#define _my_nosys_h -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef __MY_NOSYS__ -#define __MY_NOSYS__ - -#ifndef HAVE_STDLIB_H -#include -#endif - -#undef my_read /* Can be predefined in raid.h */ -#undef my_write -#undef my_seek -#define my_read(a,b,c,d) my_quick_read(a,b,c,d) -#define my_write(a,b,c,d) my_quick_write(a,b,c) -extern size_t my_quick_read(File Filedes,uchar *Buffer,size_t Count, - myf myFlags); -extern size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count); - -#if !defined(SAFEMALLOC) && defined(USE_HALLOC) -#define my_malloc(a,b) halloc(a,1) -#define my_no_flags_free(a) hfree(a) -#endif - -#endif /* __MY_NOSYS__ */ - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/mysql/my_pthread.h b/externals/mysql/my_pthread.h deleted file mode 100644 index ab26860db4..0000000000 --- a/externals/mysql/my_pthread.h +++ /dev/null @@ -1,734 +0,0 @@ -/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Defines to make different thread packages compatible */ - -#ifndef _my_pthread_h -#define _my_pthread_h - -#ifndef ETIME -#define ETIME ETIMEDOUT /* For FreeBSD */ -#endif - -#ifdef __cplusplus -#define EXTERNC extern "C" -extern "C" { -#else -#define EXTERNC -#endif /* __cplusplus */ - -#if defined(__WIN__) -typedef CRITICAL_SECTION pthread_mutex_t; -typedef DWORD pthread_t; -typedef struct thread_attr { - DWORD dwStackSize ; - DWORD dwCreatingFlag ; -} pthread_attr_t ; - -typedef struct { int dummy; } pthread_condattr_t; - -/* Implementation of posix conditions */ - -typedef struct st_pthread_link { - DWORD thread_id; - struct st_pthread_link *next; -} pthread_link; - -typedef struct { - uint32 waiting; - CRITICAL_SECTION lock_waiting; - - enum { - SIGNAL= 0, - BROADCAST= 1, - MAX_EVENTS= 2 - } EVENTS; - - HANDLE events[MAX_EVENTS]; - HANDLE broadcast_block_event; - -} pthread_cond_t; - - -typedef int pthread_mutexattr_t; -#define pthread_self() GetCurrentThreadId() -#define pthread_handler_t EXTERNC void * __cdecl -typedef void * (__cdecl *pthread_handler)(void *); - -/* - Struct and macros to be used in combination with the - windows implementation of pthread_cond_timedwait -*/ - -/* - Declare a union to make sure FILETIME is properly aligned - so it can be used directly as a 64 bit value. The value - stored is in 100ns units. - */ -union ft64 { - FILETIME ft; - __int64 i64; -}; - -struct timespec { - union ft64 tv; - /* The max timeout value in millisecond for pthread_cond_timedwait */ - long max_timeout_msec; -}; - -#define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \ - (ABSTIME).tv.i64= (TIME)+(__int64)(NSEC)/100; \ - (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \ -} while(0) - -#define set_timespec_nsec(ABSTIME,NSEC) do { \ - union ft64 tv; \ - GetSystemTimeAsFileTime(&tv.ft); \ - set_timespec_time_nsec((ABSTIME), tv.i64, (NSEC)); \ -} while(0) - -int win_pthread_mutex_trylock(pthread_mutex_t *mutex); -int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *); -int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr); -int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); -int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - struct timespec *abstime); -int pthread_cond_signal(pthread_cond_t *cond); -int pthread_cond_broadcast(pthread_cond_t *cond); -int pthread_cond_destroy(pthread_cond_t *cond); -int pthread_attr_init(pthread_attr_t *connect_att); -int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack); -int pthread_attr_destroy(pthread_attr_t *connect_att); -struct tm *localtime_r(const time_t *timep,struct tm *tmp); -struct tm *gmtime_r(const time_t *timep,struct tm *tmp); - -void pthread_exit(void *a); -int pthread_join(pthread_t thread, void **value_ptr); - - -#define ETIMEDOUT 145 /* Win32 doesn't have this */ -#define HAVE_LOCALTIME_R 1 -#define _REENTRANT 1 -#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 - - -#undef SAFE_MUTEX /* This will cause conflicts */ -#define pthread_key(T,V) DWORD V -#define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF) -#define pthread_key_delete(A) TlsFree(A) -#define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V))) -#define pthread_setspecific(A,B) (!TlsSetValue((A),(B))) -#define pthread_getspecific(A) (TlsGetValue(A)) -#define my_pthread_getspecific(T,A) ((T) TlsGetValue(A)) -#define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V)) - -#define pthread_equal(A,B) ((A) == (B)) -#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0) -#define pthread_mutex_lock(A) (EnterCriticalSection(A),0) -#define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A)) -#define pthread_mutex_unlock(A) (LeaveCriticalSection(A),0) -#define pthread_mutex_destroy(A) DeleteCriticalSection(A) -#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) - - -/* Dummy defines for easier code */ -#define pthread_attr_setdetachstate(A,B) pthread_dummy(0) -#define pthread_attr_setscope(A,B) -#define pthread_detach_this_thread() -#define pthread_condattr_init(A) -#define pthread_condattr_destroy(A) -#define pthread_yield() SwitchToThread() - - -#else /* Normal threads */ - -#ifdef HAVE_rts_threads -#define sigwait org_sigwait -#include -#undef sigwait -#endif -#include -#ifndef _REENTRANT -#define _REENTRANT -#endif -#ifdef HAVE_THR_SETCONCURRENCY -#include /* Probably solaris */ -#endif -#ifdef HAVE_SCHED_H -#include -#endif -#ifdef HAVE_SYNCH_H -#include -#endif - -#ifdef __NETWARE__ -void my_pthread_exit(void *status); -#define pthread_exit(A) my_pthread_exit(A) -#endif - -#define pthread_key(T,V) pthread_key_t V -#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V)) -#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V)) -#define pthread_detach_this_thread() -#define pthread_handler_t EXTERNC void * -typedef void *(* pthread_handler)(void *); - -/* Test first for RTS or FSU threads */ - -#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) -#define HAVE_rts_threads -extern int my_pthread_create_detached; -#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) -#define PTHREAD_CREATE_DETACHED &my_pthread_create_detached -#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL -#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL -#define USE_ALARM_THREAD -#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */ - -#if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910 -int sigwait(sigset_t *set, int *sig); -#endif - -#ifndef HAVE_NONPOSIX_SIGWAIT -#define my_sigwait(A,B) sigwait((A),(B)) -#else -int my_sigwait(const sigset_t *set,int *sig); -#endif - -#ifdef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT -#ifndef SAFE_MUTEX -#define pthread_mutex_init(a,b) my_pthread_mutex_noposix_init((a),(b)) -extern int my_pthread_mutex_noposix_init(pthread_mutex_t *mp, - const pthread_mutexattr_t *attr); -#endif /* SAFE_MUTEX */ -#define pthread_cond_init(a,b) my_pthread_cond_noposix_init((a),(b)) -extern int my_pthread_cond_noposix_init(pthread_cond_t *mp, - const pthread_condattr_t *attr); -#endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */ - -#if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK) -#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C)) -#endif - -#if !defined(HAVE_SIGWAIT) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX) -int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */ -#endif - - -/* - We define my_sigset() and use that instead of the system sigset() so that - we can favor an implementation based on sigaction(). On some systems, such - as Mac OS X, sigset() results in flags such as SA_RESTART being set, and - we want to make sure that no such flags are set. -*/ -#if defined(HAVE_SIGACTION) && !defined(my_sigset) -#define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; int l_rc; \ - DBUG_ASSERT((A) != 0); \ - sigemptyset(&l_set); \ - l_s.sa_handler = (B); \ - l_s.sa_mask = l_set; \ - l_s.sa_flags = 0; \ - l_rc= sigaction((A), &l_s, (struct sigaction *) NULL);\ - DBUG_ASSERT(l_rc == 0); \ - } while (0) -#elif defined(HAVE_SIGSET) && !defined(my_sigset) -#define my_sigset(A,B) sigset((A),(B)) -#elif !defined(my_sigset) -#define my_sigset(A,B) signal((A),(B)) -#endif - -#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS) -#define pthread_attr_setscope(A,B) -#undef HAVE_GETHOSTBYADDR_R /* No definition */ -#endif - -#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX) -extern int my_pthread_cond_timedwait(pthread_cond_t *cond, - pthread_mutex_t *mutex, - struct timespec *abstime); -#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C)) -#endif - -#if !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC) -#define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B)) -#else -#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B)) -void *my_pthread_getspecific_imp(pthread_key_t key); -#endif - -#ifndef HAVE_LOCALTIME_R -struct tm *localtime_r(const time_t *clock, struct tm *res); -#endif - -#ifndef HAVE_GMTIME_R -struct tm *gmtime_r(const time_t *clock, struct tm *res); -#endif - -#ifdef HAVE_PTHREAD_CONDATTR_CREATE -/* DCE threads on HPUX 10.20 */ -#define pthread_condattr_init pthread_condattr_create -#define pthread_condattr_destroy pthread_condattr_delete -#endif - -/* FSU THREADS */ -#if !defined(HAVE_PTHREAD_KEY_DELETE) && !defined(pthread_key_delete) -#define pthread_key_delete(A) pthread_dummy(0) -#endif - -#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) -/* This is set on AIX_3_2 and Siemens unix (and DEC OSF/1 3.2 too) */ -#define pthread_key_create(A,B) \ - pthread_keycreate(A,(B) ?\ - (pthread_destructor_t) (B) :\ - (pthread_destructor_t) pthread_dummy) -#define pthread_attr_init(A) pthread_attr_create(A) -#define pthread_attr_destroy(A) pthread_attr_delete(A) -#define pthread_attr_setdetachstate(A,B) pthread_dummy(0) -#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D)) -#ifndef pthread_sigmask -#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) -#endif -#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) -#undef pthread_detach_this_thread -#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); } -#elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */ -#ifndef HAVE_PTHREAD_KILL -# define HAVE_PTHREAD_KILL -#endif -#endif - -#endif /* defined(__WIN__) */ - -#if defined(HPUX10) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS) -#undef pthread_cond_timedwait -#define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c)) -int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - struct timespec *abstime); -#endif - -#if defined(HPUX10) -#define pthread_attr_getstacksize(A,B) my_pthread_attr_getstacksize(A,B) -void my_pthread_attr_getstacksize(pthread_attr_t *attrib, size_t *size); -#endif - -#if defined(HAVE_POSIX1003_4a_MUTEX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS) -#undef pthread_mutex_trylock -#define pthread_mutex_trylock(a) my_pthread_mutex_trylock((a)) -int my_pthread_mutex_trylock(pthread_mutex_t *mutex); -#endif - -#if !defined(HAVE_PTHREAD_YIELD_ONE_ARG) && !defined(HAVE_PTHREAD_YIELD_ZERO_ARG) -/* no pthread_yield() available */ -#ifdef HAVE_SCHED_YIELD -#define pthread_yield() sched_yield() -#elif defined(HAVE_PTHREAD_YIELD_NP) /* can be Mac OS X */ -#define pthread_yield() pthread_yield_np() -#elif defined(HAVE_THR_YIELD) -#define pthread_yield() thr_yield() -#endif -#endif - -/* - The defines set_timespec and set_timespec_nsec should be used - for calculating an absolute time at which - pthread_cond_timedwait should timeout -*/ - -#define set_timespec(ABSTIME,SEC) set_timespec_nsec((ABSTIME),(SEC)*1000000000ULL) - -#ifndef set_timespec_nsec -#define set_timespec_nsec(ABSTIME,NSEC) \ - set_timespec_time_nsec((ABSTIME),my_getsystime(),(NSEC)) -#endif /* !set_timespec_nsec */ - -/* adapt for two different flavors of struct timespec */ -#ifdef HAVE_TIMESPEC_TS_SEC -#define MY_tv_sec ts_sec -#define MY_tv_nsec ts_nsec -#else -#define MY_tv_sec tv_sec -#define MY_tv_nsec tv_nsec -#endif /* HAVE_TIMESPEC_TS_SEC */ - -#ifndef set_timespec_time_nsec -#define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \ - ulonglong nsec= (NSEC); \ - ulonglong now= (TIME) + (nsec/100); \ - (ABSTIME).MY_tv_sec= (now / 10000000ULL); \ - (ABSTIME).MY_tv_nsec= (now % 10000000ULL * 100 + (nsec % 100)); \ -} while(0) -#endif /* !set_timespec_time_nsec */ - -/* safe_mutex adds checking to mutex for easier debugging */ - -#if defined(__NETWARE__) && !defined(SAFE_MUTEX_DETECT_DESTROY) -#define SAFE_MUTEX_DETECT_DESTROY -#endif -struct st_hash; - -typedef struct st_safe_mutex_t -{ - pthread_mutex_t global,mutex; - const char *file, *name; - uint line,count; - myf create_flags, active_flags; - ulong id; - pthread_t thread; - struct st_hash *locked_mutex, *used_mutex; - struct st_safe_mutex_t *prev, *next; -#ifdef SAFE_MUTEX_DETECT_DESTROY - struct st_safe_mutex_info_t *info; /* to track destroying of mutexes */ -#endif -} safe_mutex_t; - -typedef struct st_safe_mutex_deadlock_t -{ - const char *file, *name; - safe_mutex_t *mutex; - uint line; - ulong count; - ulong id; - my_bool warning_only; -} safe_mutex_deadlock_t; - -#ifdef SAFE_MUTEX_DETECT_DESTROY -/* - Used to track the destroying of mutexes. This needs to be a seperate - structure because the safe_mutex_t structure could be freed before - the mutexes are destroyed. -*/ - -typedef struct st_safe_mutex_info_t -{ - struct st_safe_mutex_info_t *next; - struct st_safe_mutex_info_t *prev; - const char *init_file; - uint32 init_line; -} safe_mutex_info_t; -#endif /* SAFE_MUTEX_DETECT_DESTROY */ - -int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr, - const char *name, myf my_flags, - const char *file, uint line); -int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file, - uint line); -int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line); -int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line); -int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file, - uint line); -int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, - struct timespec *abstime, const char *file, uint line); -void safe_mutex_global_init(void); -void safe_mutex_end(FILE *file); -void safe_mutex_free_deadlock_data(safe_mutex_t *mp); - - /* Wrappers if safe mutex is actually used */ -#define MYF_TRY_LOCK 1 -#define MYF_NO_DEADLOCK_DETECTION 2 - -#ifdef SAFE_MUTEX -#undef pthread_mutex_init -#undef pthread_mutex_lock -#undef pthread_mutex_unlock -#undef pthread_mutex_destroy -#undef pthread_mutex_wait -#undef pthread_mutex_timedwait -#undef pthread_mutex_t -#undef pthread_cond_wait -#undef pthread_cond_timedwait -#undef pthread_mutex_trylock -#define my_pthread_mutex_init(A,B,C,D) safe_mutex_init((A),(B),(C),(D),__FILE__,__LINE__) -#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),#A,0,__FILE__,__LINE__) -#define pthread_mutex_lock(A) safe_mutex_lock((A), 0, __FILE__, __LINE__) -#define my_pthread_mutex_lock(A,B) safe_mutex_lock((A), (B), __FILE__, __LINE__) -#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__) -#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__) -#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__) -#define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__) -#define pthread_mutex_trylock(A) safe_mutex_lock((A), MYF_TRY_LOCK, __FILE__, __LINE__) -#define pthread_mutex_t safe_mutex_t -#define safe_mutex_assert_owner(mp) \ - DBUG_ASSERT((mp)->count > 0 && \ - pthread_equal(pthread_self(), (mp)->thread)) -#define safe_mutex_assert_not_owner(mp) \ - DBUG_ASSERT(! (mp)->count || \ - ! pthread_equal(pthread_self(), (mp)->thread)) -#else -#define my_pthread_mutex_init(A,B,C,D) pthread_mutex_init((A),(B)) -#define my_pthread_mutex_lock(A,B) pthread_mutex_lock(A) -#define safe_mutex_assert_owner(mp) -#define safe_mutex_assert_not_owner(mp) -#endif /* SAFE_MUTEX */ - -#if defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) -typedef struct st_my_pthread_fastmutex_t -{ - pthread_mutex_t mutex; - uint spins; - uint rng_state; -} my_pthread_fastmutex_t; -void fastmutex_global_init(void); - -int my_pthread_fastmutex_init(my_pthread_fastmutex_t *mp, - const pthread_mutexattr_t *attr); -int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp); - -#undef pthread_mutex_init -#undef pthread_mutex_lock -#undef pthread_mutex_unlock -#undef pthread_mutex_destroy -#undef pthread_mutex_wait -#undef pthread_mutex_timedwait -#undef pthread_mutex_t -#undef pthread_cond_wait -#undef pthread_cond_timedwait -#undef pthread_mutex_trylock -#define pthread_mutex_init(A,B) my_pthread_fastmutex_init((A),(B)) -#define pthread_mutex_lock(A) my_pthread_fastmutex_lock(A) -#define pthread_mutex_unlock(A) pthread_mutex_unlock(&(A)->mutex) -#define pthread_mutex_destroy(A) pthread_mutex_destroy(&(A)->mutex) -#define pthread_cond_wait(A,B) pthread_cond_wait((A),&(B)->mutex) -#define pthread_cond_timedwait(A,B,C) pthread_cond_timedwait((A),&(B)->mutex,(C)) -#define pthread_mutex_trylock(A) pthread_mutex_trylock(&(A)->mutex) -#define pthread_mutex_t my_pthread_fastmutex_t -#endif /* defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) */ - - /* READ-WRITE thread locking */ - -#ifdef HAVE_BROKEN_RWLOCK /* For OpenUnix */ -#undef HAVE_PTHREAD_RWLOCK_RDLOCK -#undef HAVE_RWLOCK_INIT -#undef HAVE_RWLOCK_T -#endif - -#if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS) -/* use these defs for simple mutex locking */ -#define rw_lock_t pthread_mutex_t -#define my_rwlock_init(A,B) pthread_mutex_init((A),(B)) -#define rw_rdlock(A) pthread_mutex_lock((A)) -#define rw_wrlock(A) pthread_mutex_lock((A)) -#define rw_tryrdlock(A) pthread_mutex_trylock((A)) -#define rw_trywrlock(A) pthread_mutex_trylock((A)) -#define rw_unlock(A) pthread_mutex_unlock((A)) -#define rwlock_destroy(A) pthread_mutex_destroy((A)) -#elif defined(HAVE_PTHREAD_RWLOCK_RDLOCK) -#define rw_lock_t pthread_rwlock_t -#define my_rwlock_init(A,B) pthread_rwlock_init((A),(B)) -#define rw_rdlock(A) pthread_rwlock_rdlock(A) -#define rw_wrlock(A) pthread_rwlock_wrlock(A) -#define rw_tryrdlock(A) pthread_rwlock_tryrdlock((A)) -#define rw_trywrlock(A) pthread_rwlock_trywrlock((A)) -#define rw_unlock(A) pthread_rwlock_unlock(A) -#define rwlock_destroy(A) pthread_rwlock_destroy(A) -#elif defined(HAVE_RWLOCK_INIT) -#ifdef HAVE_RWLOCK_T /* For example Solaris 2.6-> */ -#define rw_lock_t rwlock_t -#endif -#define my_rwlock_init(A,B) rwlock_init((A),USYNC_THREAD,0) -#else -/* Use our own version of read/write locks */ -typedef struct _my_rw_lock_t { - pthread_mutex_t lock; /* lock for structure */ - pthread_cond_t readers; /* waiting readers */ - pthread_cond_t writers; /* waiting writers */ - int state; /* -1:writer,0:free,>0:readers */ - int waiters; /* number of waiting writers */ -} my_rw_lock_t; - -#define rw_lock_t my_rw_lock_t -#define rw_rdlock(A) my_rw_rdlock((A)) -#define rw_wrlock(A) my_rw_wrlock((A)) -#define rw_tryrdlock(A) my_rw_tryrdlock((A)) -#define rw_trywrlock(A) my_rw_trywrlock((A)) -#define rw_unlock(A) my_rw_unlock((A)) -#define rwlock_destroy(A) my_rwlock_destroy((A)) - -extern int my_rwlock_init(my_rw_lock_t *, void *); -extern int my_rwlock_destroy(my_rw_lock_t *); -extern int my_rw_rdlock(my_rw_lock_t *); -extern int my_rw_wrlock(my_rw_lock_t *); -extern int my_rw_unlock(my_rw_lock_t *); -extern int my_rw_tryrdlock(my_rw_lock_t *); -extern int my_rw_trywrlock(my_rw_lock_t *); -#endif /* USE_MUTEX_INSTEAD_OF_RW_LOCKS */ - -#define GETHOSTBYADDR_BUFF_SIZE 2048 - -#ifndef HAVE_THR_SETCONCURRENCY -#define thr_setconcurrency(A) pthread_dummy(0) -#endif -#if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_setstacksize) -#define pthread_attr_setstacksize(A,B) pthread_dummy(0) -#endif - -/* Define mutex types, see my_thr_init.c */ -#define MY_MUTEX_INIT_SLOW NULL -#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP -extern pthread_mutexattr_t my_fast_mutexattr; -#define MY_MUTEX_INIT_FAST &my_fast_mutexattr -#else -#define MY_MUTEX_INIT_FAST NULL -#endif -#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP -extern pthread_mutexattr_t my_errorcheck_mutexattr; -#define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr -#else -#define MY_MUTEX_INIT_ERRCHK NULL -#endif - -#ifndef ESRCH -/* Define it to something */ -#define ESRCH 1 -#endif - -typedef ulong my_thread_id; - -extern void my_threadattr_global_init(void); -extern my_bool my_thread_global_init(void); -extern void my_thread_global_end(void); -extern my_bool my_thread_init(void); -extern void my_thread_end(void); -extern const char *my_thread_name(void); -extern my_thread_id my_thread_dbug_id(void); -extern int pthread_dummy(int); - -/* All thread specific variables are in the following struct */ - -#define THREAD_NAME_SIZE 10 -#ifndef DEFAULT_THREAD_STACK -#if SIZEOF_CHARP > 4 -/* - MySQL can survive with 32K, but some glibc libraries require > 128K stack - To resolve hostnames. Also recursive stored procedures needs stack. -*/ -#define DEFAULT_THREAD_STACK (256*1024L) -#else -#define DEFAULT_THREAD_STACK (195*1024) -#endif -#endif - -#define MY_PTHREAD_LOCK_READ 0 -#define MY_PTHREAD_LOCK_WRITE 1 - -struct st_my_thread_var -{ - int thr_errno; - pthread_cond_t suspend; - pthread_mutex_t mutex; - pthread_mutex_t * volatile current_mutex; - pthread_cond_t * volatile current_cond; - pthread_t pthread_self; - my_thread_id id; - int cmp_length; - int volatile abort; - my_bool init; - struct st_my_thread_var *next,**prev; - void *opt_info; - uint lock_type; /* used by conditional release the queue */ - void *stack_ends_here; - safe_mutex_t *mutex_in_use; -#ifndef DBUG_OFF - void *dbug; - char name[THREAD_NAME_SIZE+1]; -#endif -}; - -extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const)); -extern void **my_thread_var_dbug(); -extern safe_mutex_t **my_thread_var_mutex_in_use(); -extern uint my_thread_end_wait_time; -extern my_bool safe_mutex_deadlock_detector; -#define my_thread_var (_my_thread_var()) -#define my_errno my_thread_var->thr_errno -/* - Keep track of shutdown,signal, and main threads so that my_end() will not - report errors with them -*/ - -/* Which kind of thread library is in use */ - -#define THD_LIB_OTHER 1 -#define THD_LIB_NPTL 2 -#define THD_LIB_LT 4 - -extern uint thd_lib_detected; - -/* - thread_safe_xxx functions are for critical statistic or counters. - The implementation is guaranteed to be thread safe, on all platforms. - Note that the calling code should *not* assume the counter is protected - by the mutex given, as the implementation of these helpers may change - to use my_atomic operations instead. -*/ - -/* - Warning: - When compiling without threads, this file is not included. - See the *other* declarations of thread_safe_xxx in include/my_global.h - - Second warning: - See include/config-win.h, for yet another implementation. -*/ -#ifdef THREAD -#ifndef thread_safe_increment -#define thread_safe_increment(V,L) \ - (pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L))) -#define thread_safe_decrement(V,L) \ - (pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L))) -#endif - -#ifndef thread_safe_add -#define thread_safe_add(V,C,L) \ - (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L))) -#define thread_safe_sub(V,C,L) \ - (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L))) -#endif -#endif - -/* - statistics_xxx functions are for non critical statistic, - maintained in global variables. - When compiling with SAFE_STATISTICS: - - race conditions can not occur. - - some locking occurs, which may cause performance degradation. - - When compiling without SAFE_STATISTICS: - - race conditions can occur, making the result slightly inaccurate. - - the lock given is not honored. -*/ -#ifdef SAFE_STATISTICS -#define statistic_increment(V,L) thread_safe_increment((V),(L)) -#define statistic_decrement(V,L) thread_safe_decrement((V),(L)) -#define statistic_add(V,C,L) thread_safe_add((V),(C),(L)) -#define statistic_sub(V,C,L) thread_safe_sub((V),(C),(L)) -#else -#define statistic_decrement(V,L) (V)-- -#define statistic_increment(V,L) (V)++ -#define statistic_add(V,C,L) (V)+=(C) -#define statistic_sub(V,C,L) (V)-=(C) -#endif /* SAFE_STATISTICS */ - -/* - No locking needed, the counter is owned by the thread -*/ -#define status_var_increment(V) (V)++ -#define status_var_decrement(V) (V)-- -#define status_var_add(V,C) (V)+=(C) -#define status_var_sub(V,C) (V)-=(C) - -#ifdef __cplusplus -} -#endif -#endif /* _my_ptread_h */ diff --git a/externals/mysql/my_stacktrace.h b/externals/mysql/my_stacktrace.h deleted file mode 100644 index e7ce42c1f4..0000000000 --- a/externals/mysql/my_stacktrace.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _my_stacktrace_h_ -#define _my_stacktrace_h_ - -#include - -#ifdef TARGET_OS_LINUX -#if defined (__x86_64__) || defined (__i386__) || \ - (defined(__alpha__) && defined(__GNUC__)) -#define HAVE_STACKTRACE 1 -#endif -#elif defined(__WIN__) -#define HAVE_STACKTRACE 1 -#endif - -#if HAVE_BACKTRACE && (HAVE_BACKTRACE_SYMBOLS || HAVE_BACKTRACE_SYMBOLS_FD) -#undef HAVE_STACKTRACE -#define HAVE_STACKTRACE 1 -#endif - -#if !defined(__NETWARE__) -#define HAVE_WRITE_CORE -#endif - -#if HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS && \ - HAVE_CXXABI_H && HAVE_ABI_CXA_DEMANGLE && \ - HAVE_WEAK_SYMBOL -#define BACKTRACE_DEMANGLE 1 -#endif - -C_MODE_START - -#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE) -void my_init_stacktrace(); -void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack); -void my_safe_print_str(const char* name, const char* val, int max_len); -void my_write_core(int sig); -#if BACKTRACE_DEMANGLE -char *my_demangle(const char *mangled_name, int *status); -#endif -#ifdef __WIN__ -void my_set_exception_pointers(EXCEPTION_POINTERS *ep); -#endif -#endif - -#ifdef HAVE_WRITE_CORE -void my_write_core(int sig); -#endif - -C_MODE_END - -#endif /* _my_stacktrace_h_ */ diff --git a/externals/mysql/my_sys.h b/externals/mysql/my_sys.h deleted file mode 100644 index c8ec79165d..0000000000 --- a/externals/mysql/my_sys.h +++ /dev/null @@ -1,1082 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/** - @file - mysys library API -*/ - -#ifndef _my_sys_h -#define _my_sys_h -C_MODE_START - -#ifdef HAVE_AIOWAIT -#include /* Used by record-cache */ -typedef struct my_aio_result { - aio_result_t result; - int pending; -} my_aio_result; -#endif - -#ifndef THREAD -extern int NEAR my_errno; /* Last error in mysys */ -#else -#include -#endif - -#include /* for CHARSET_INFO */ -#include -#include - -#define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;} -#define MY_INIT(name); { my_progname= name; my_init(); } - -/** - Max length of an error message generated by mysys utilities. - Some mysys functions produce error messages. These mostly go - to stderr. - This constant defines the size of the buffer used to format - the message. It should be kept in sync with MYSQL_ERRMSG_SIZE, - since sometimes mysys errors are stored in the server diagnostics - area, and we would like to avoid unexpected truncation. -*/ -#define MYSYS_ERRMSG_SIZE (512) - -#define MY_FILE_ERROR ((size_t) -1) - - /* General bitmaps for my_func's */ -#define MY_FFNF 1 /* Fatal if file not found */ -#define MY_FNABP 2 /* Fatal if not all bytes read/writen */ -#define MY_NABP 4 /* Error if not all bytes read/writen */ -#define MY_FAE 8 /* Fatal if any error */ -#define MY_WME 16 /* Write message on error */ -#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ -#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */ -#define MY_SYNC_DIR 1024 /* my_create/delete/rename: sync directory */ -#define MY_RAID 64 /* Support for RAID */ -#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */ -#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */ -#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */ -#define MY_COPYTIME 64 /* my_redel() copys time */ -#define MY_DELETE_OLD 256 /* my_create_with_symlink() */ -#define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */ -#define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */ -#define MY_REDEL_MAKE_BACKUP 256 -#define MY_SEEK_NOT_DONE 32 /* my_lock may have to do a seek */ -#define MY_SHORT_WAIT 64 /* my_lock() don't wait if can't lock */ -#define MY_FORCE_LOCK 128 /* use my_lock() even if disable_locking */ -#define MY_NO_WAIT 256 /* my_lock() don't wait at all */ -#define MY_ZEROFILL 32 /* my_malloc(), fill array with zero */ -#define MY_ALLOW_ZERO_PTR 64 /* my_realloc() ; zero ptr -> malloc */ -#define MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */ -#define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */ -#define MY_DONT_OVERWRITE_FILE 2048 /* my_copy: Don't overwrite file */ -#define MY_THREADSAFE 2048 /* my_seek(): lock fd mutex */ - -#define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */ -#define MY_GIVE_INFO 2 /* Give time info about process*/ -#define MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */ - -#define MY_REMOVE_NONE 0 /* Params for modify_defaults_file */ -#define MY_REMOVE_OPTION 1 -#define MY_REMOVE_SECTION 2 - -#define ME_HIGHBYTE 8 /* Shift for colours */ -#define ME_NOCUR 1 /* Don't use curses message */ -#define ME_OLDWIN 2 /* Use old window */ -#define ME_BELL 4 /* Ring bell then printing message */ -#define ME_HOLDTANG 8 /* Don't delete last keys */ -#define ME_WAITTOT 16 /* Wait for errtime secs of for a action */ -#define ME_WAITTANG 32 /* Wait for a user action */ -#define ME_NOREFRESH 64 /* Dont refresh screen */ -#define ME_NOINPUT 128 /* Dont use the input libary */ -#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */ -#define ME_COLOUR2 ((2 << ME_HIGHBYTE)) -#define ME_COLOUR3 ((3 << ME_HIGHBYTE)) -#define ME_FATALERROR 1024 /* Fatal statement error */ -#define ME_JUST_INFO 8192 /**< not error but just info */ -#define ME_JUST_WARNING 16384 /**< not error but just warning */ - - /* Bits in last argument to fn_format */ -#define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */ -#define MY_REPLACE_EXT 2 /* replace extension with 'ext' */ -#define MY_UNPACK_FILENAME 4 /* Unpack name (~ -> home) */ -#define MY_PACK_FILENAME 8 /* Pack name (home -> ~) */ -#define MY_RESOLVE_SYMLINKS 16 /* Resolve all symbolic links */ -#define MY_RETURN_REAL_PATH 32 /* return full path for file */ -#define MY_SAFE_PATH 64 /* Return NULL if too long path */ -#define MY_RELATIVE_PATH 128 /* name is relative to 'dir' */ -#define MY_APPEND_EXT 256 /* add 'ext' as additional extension*/ - - - /* My seek flags */ -#define MY_SEEK_SET 0 -#define MY_SEEK_CUR 1 -#define MY_SEEK_END 2 - - /* Some constants */ -#define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */ -#define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */ -#define MIN_COMPRESS_LENGTH 50 /* Don't compress small bl. */ -#define DFLT_INIT_HITS 3 - - /* root_alloc flags */ -#define MY_KEEP_PREALLOC 1 -#define MY_MARK_BLOCKS_FREE 2 /* move used to free list and reuse them */ - - /* Internal error numbers (for assembler functions) */ -#define MY_ERRNO_EDOM 33 -#define MY_ERRNO_ERANGE 34 - - /* Bits for get_date timeflag */ -#define GETDATE_DATE_TIME 1 -#define GETDATE_SHORT_DATE 2 -#define GETDATE_HHMMSSTIME 4 -#define GETDATE_GMT 8 -#define GETDATE_FIXEDLENGTH 16 - - /* defines when allocating data */ -#ifdef SAFEMALLOC -#define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG ) -#define my_malloc_ci(SZ,FLAG) _mymalloc((SZ), sFile, uLine, FLAG ) -#define my_realloc(PTR,SZ,FLAG) _myrealloc((PTR), (SZ), __FILE__, __LINE__, FLAG ) -#define my_checkmalloc() _sanity( __FILE__, __LINE__ ) -#define my_free(PTR,FLAG) _myfree((PTR), __FILE__, __LINE__,FLAG) -#define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C) -#define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C) -#define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C) -#define QUICK_SAFEMALLOC sf_malloc_quick=1 -#define NORMAL_SAFEMALLOC sf_malloc_quick=0 -extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick; -extern ulonglong sf_malloc_mem_limit; - -#define CALLER_INFO_PROTO , const char *sFile, uint uLine -#define CALLER_INFO , __FILE__, __LINE__ -#define ORIG_CALLER_INFO , sFile, uLine -#else -#define my_checkmalloc() -#undef TERMINATE -#define TERMINATE(A,B) {} -#define QUICK_SAFEMALLOC -#define NORMAL_SAFEMALLOC -extern void *my_malloc(size_t Size,myf MyFlags); -#define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG ) -extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags); -extern void my_no_flags_free(void *ptr); -extern void *my_memdup(const void *from,size_t length,myf MyFlags); -extern char *my_strdup(const char *from,myf MyFlags); -extern char *my_strndup(const char *from, size_t length, - myf MyFlags); -/* we do use FG (as a no-op) in below so that a typo on FG is caught */ -#define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR)) -#define CALLER_INFO_PROTO /* nothing */ -#define CALLER_INFO /* nothing */ -#define ORIG_CALLER_INFO /* nothing */ -#endif - -/* - ERROR INJECTION: Non-thread-safe global variable to request error inject. - Set this variable to non-zero to request the next my_malloc() to fail. - This works with my_malloc.c:my_malloc() and safemalloc.c:_mymalloc(). - If using this in tests, note that the error messages produced by - my_malloc and safemalloc are different. You may need to modify the - results with --replace_regex. You may find examples in - client/backup_stream.c and backup_client_coverage.test. - The global variable is defined in my_static.c. -*/ -IF_DBUG(extern int my_malloc_error_inject); - -#ifdef HAVE_LARGE_PAGES -extern uint my_get_large_page_size(void); -extern uchar * my_large_malloc(size_t size, myf my_flags); -extern void my_large_free(uchar * ptr, myf my_flags); -#else -#define my_get_large_page_size() (0) -#define my_large_malloc(A,B) my_malloc_lock((A),(B)) -#define my_large_free(A,B) my_free_lock((A),(B)) -#endif /* HAVE_LARGE_PAGES */ - -#ifdef HAVE_ALLOCA -#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) -#pragma alloca -#endif /* _AIX */ -#if defined(__MWERKS__) -#undef alloca -#define alloca _alloca -#endif /* __MWERKS__ */ -#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca) -#define alloca __builtin_alloca -#endif /* GNUC */ -#define my_alloca(SZ) alloca((size_t) (SZ)) -#define my_afree(PTR) {} -#else -#define my_alloca(SZ) my_malloc(SZ,MYF(0)) -#define my_afree(PTR) my_free(PTR,MYF(MY_WME)) -#endif /* HAVE_ALLOCA */ - -#ifndef errno /* did we already get it? */ -#ifdef HAVE_ERRNO_AS_DEFINE -#include /* errno is a define */ -#else -extern int errno; /* declare errno */ -#endif -#endif /* #ifndef errno */ -extern char *home_dir; /* Home directory for user */ -extern const char *my_progname; /* program-name (printed in errors) */ -extern const char *my_progname_short; /* like above but without directory */ -extern char NEAR curr_dir[]; /* Current directory for user */ -extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags); -extern void (*fatal_error_handler_hook)(uint my_err, const char *str, - myf MyFlags); -extern uint my_file_limit; -extern ulong my_thread_stack_size; - -extern const char *(*proc_info_hook)(void *, const char *, const char *, - const char *, const unsigned int); - -#if defined(ENABLED_DEBUG_SYNC) -extern void (*debug_sync_C_callback_ptr)(const char *, size_t); -#define DEBUG_SYNC_C(_sync_point_name_) do { \ - if (debug_sync_C_callback_ptr != NULL) \ - (*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \ - while(0) -#else -#define DEBUG_SYNC_C(_sync_point_name_) -#endif /* defined(ENABLED_DEBUG_SYNC) */ - -#ifdef HAVE_LARGE_PAGES -extern my_bool my_use_large_pages; -extern uint my_large_page_size; -#endif - -/* charsets */ -#define MY_ALL_CHARSETS_SIZE 2048 -extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; -extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE]; -extern CHARSET_INFO compiled_charsets[]; - -/* statistics */ -extern ulong my_file_opened,my_stream_opened, my_tmp_file_created; -extern ulong my_file_total_opened; -extern uint mysys_usage_id; -extern my_bool my_init_done; - - /* Point to current my_message() */ -extern void (*my_sigtstp_cleanup)(void), - /* Executed before jump to shell */ - (*my_sigtstp_restart)(void), - (*my_abort_hook)(int); - /* Executed when comming from shell */ -extern MYSQL_PLUGIN_IMPORT int NEAR my_umask; /* Default creation mask */ -extern int NEAR my_umask_dir, - NEAR my_recived_signals, /* Signals we have got */ - NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */ - NEAR my_dont_interrupt; /* call remember_intr when set */ -extern my_bool NEAR mysys_uses_curses, my_use_symdir; -extern size_t sf_malloc_cur_memory, sf_malloc_max_memory; - -extern ulong my_default_record_cache_size; -extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io, - NEAR my_disable_flush_key_blocks, NEAR my_disable_symlinks; -extern char wild_many,wild_one,wild_prefix; -extern const char *charsets_dir; -/* from default.c */ -extern char *my_defaults_extra_file; -extern const char *my_defaults_group_suffix; -extern const char *my_defaults_file; - -extern my_bool timed_mutexes; - -typedef struct wild_file_pack /* Struct to hold info when selecting files */ -{ - uint wilds; /* How many wildcards */ - uint not_pos; /* Start of not-theese-files */ - char * *wild; /* Pointer to wildcards */ -} WF_PACK; - -enum loglevel { - ERROR_LEVEL, - WARNING_LEVEL, - INFORMATION_LEVEL -}; - -enum cache_type -{ - TYPE_NOT_SET= 0, READ_CACHE, WRITE_CACHE, - SEQ_READ_APPEND /* sequential read or append */, - READ_FIFO, READ_NET,WRITE_NET}; - -enum flush_type -{ - FLUSH_KEEP, /* flush block and keep it in the cache */ - FLUSH_RELEASE, /* flush block and remove it from the cache */ - FLUSH_IGNORE_CHANGED, /* remove block from the cache */ - /* - As my_disable_flush_pagecache_blocks is always 0, the following option - is strictly equivalent to FLUSH_KEEP - */ - FLUSH_FORCE_WRITE, - /** - @brief like FLUSH_KEEP but return immediately if file is already being - flushed (even partially) by another thread; only for page cache, - forbidden for key cache. - */ - FLUSH_KEEP_LAZY -}; - -typedef struct st_record_cache /* Used when cacheing records */ -{ - File file; - int rc_seek,error,inited; - uint rc_length,read_length,reclength; - my_off_t rc_record_pos,end_of_file; - uchar *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos; -#ifdef HAVE_AIOWAIT - int use_async_io; - my_aio_result aio_result; -#endif - enum cache_type type; -} RECORD_CACHE; - -enum file_type -{ - UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE, STREAM_BY_FOPEN, STREAM_BY_FDOPEN, - FILE_BY_MKSTEMP, FILE_BY_DUP -}; - -struct st_my_file_info -{ - char *name; -#ifdef _WIN32 - HANDLE fhandle; /* win32 file handle */ - int oflag; /* open flags, e.g O_APPEND */ -#endif - enum file_type type; -#if defined(THREAD) && !defined(HAVE_PREAD) && !defined(_WIN32) - pthread_mutex_t mutex; -#endif -}; - -extern struct st_my_file_info *my_file_info; - -typedef struct st_dynamic_array -{ - uchar *buffer; - uint elements,max_element; - uint alloc_increment; - uint size_of_element; -} DYNAMIC_ARRAY; - -typedef struct st_my_tmpdir -{ - DYNAMIC_ARRAY full_list; - char **list; - uint cur, max; -#ifdef THREAD - pthread_mutex_t mutex; -#endif -} MY_TMPDIR; - -typedef struct st_dynamic_string -{ - char *str; - size_t length,max_length,alloc_increment; -} DYNAMIC_STRING; - -struct st_io_cache; -/** Function called when certain events happen to an IO_CACHE */ -typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache *cache, - const uchar *buffert, uint length, - my_off_t filepos); - -#ifdef THREAD -typedef struct st_io_cache_share -{ - pthread_mutex_t mutex; /* To sync on reads into buffer. */ - pthread_cond_t cond; /* To wait for signals. */ - pthread_cond_t cond_writer; /* For a synchronized writer. */ - /* Offset in file corresponding to the first byte of buffer. */ - my_off_t pos_in_file; - /* If a synchronized write cache is the source of the data. */ - struct st_io_cache *source_cache; - uchar *buffer; /* The read buffer. */ - uchar *read_end; /* Behind last valid byte of buffer. */ - int running_threads; /* threads not in lock. */ - int total_threads; /* threads sharing the cache. */ - int error; /* Last error. */ -#ifdef NOT_YET_IMPLEMENTED - /* whether the structure should be free'd */ - my_bool alloced; -#endif -} IO_CACHE_SHARE; -#endif - -typedef struct st_io_cache /* Used when cacheing files */ -{ - /* Offset in file corresponding to the first byte of uchar* buffer. */ - my_off_t pos_in_file; - /* - The offset of end of file for READ_CACHE and WRITE_CACHE. - For SEQ_READ_APPEND it the maximum of the actual end of file and - the position represented by read_end. - */ - my_off_t end_of_file; - /* Points to current read position in the buffer */ - uchar *read_pos; - /* the non-inclusive boundary in the buffer for the currently valid read */ - uchar *read_end; - uchar *buffer; /* The read buffer */ - /* Used in ASYNC_IO */ - uchar *request_pos; - - /* Only used in WRITE caches and in SEQ_READ_APPEND to buffer writes */ - uchar *write_buffer; - /* - Only used in SEQ_READ_APPEND, and points to the current read position - in the write buffer. Note that reads in SEQ_READ_APPEND caches can - happen from both read buffer (uchar* buffer) and write buffer - (uchar* write_buffer). - */ - uchar *append_read_pos; - /* Points to current write position in the write buffer */ - uchar *write_pos; - /* The non-inclusive boundary of the valid write area */ - uchar *write_end; - - /* - Current_pos and current_end are convenience variables used by - my_b_tell() and other routines that need to know the current offset - current_pos points to &write_pos, and current_end to &write_end in a - WRITE_CACHE, and &read_pos and &read_end respectively otherwise - */ - uchar **current_pos, **current_end; -#ifdef THREAD - /* - The lock is for append buffer used in SEQ_READ_APPEND cache - need mutex copying from append buffer to read buffer. - */ - pthread_mutex_t append_buffer_lock; - /* - The following is used when several threads are reading the - same file in parallel. They are synchronized on disk - accesses reading the cached part of the file asynchronously. - It should be set to NULL to disable the feature. Only - READ_CACHE mode is supported. - */ - IO_CACHE_SHARE *share; -#endif - /* - A caller will use my_b_read() macro to read from the cache - if the data is already in cache, it will be simply copied with - memcpy() and internal variables will be accordinging updated with - no functions invoked. However, if the data is not fully in the cache, - my_b_read() will call read_function to fetch the data. read_function - must never be invoked directly. - */ - int (*read_function)(struct st_io_cache *,uchar *,size_t); - /* - Same idea as in the case of read_function, except my_b_write() needs to - be replaced with my_b_append() for a SEQ_READ_APPEND cache - */ - int (*write_function)(struct st_io_cache *,const uchar *,size_t); - /* - Specifies the type of the cache. Depending on the type of the cache - certain operations might not be available and yield unpredicatable - results. Details to be documented later - */ - enum cache_type type; - /* - Callbacks were added and are currently used for binary logging of LOAD - DATA INFILE - when a block is read from the file, we create a block - create/append event, and when IO_CACHE is closed, we create an end event; - also used to write the MyISAM WRITE_CACHE blocks to the MyISAM physical - log. These functions could, of course be used for other things. Note: some - callbacks share the same argument ("arg"). - */ - IO_CACHE_CALLBACK pre_read; /**< called before reading from disk */ - IO_CACHE_CALLBACK post_read; /**< called after reading from disk */ - IO_CACHE_CALLBACK pre_close; /**< called before ending the cache */ - /** Called _after_ writing to disk; not honoured by SEQ_READ_APPEND */ - IO_CACHE_CALLBACK post_write; - /* - Counts the number of times, when we were forced to use disk. We use it to - increase the binlog_cache_disk_use status variable. - */ - ulong disk_writes; - void *arg; /**< used by pre/post_read,post_write */ - char *file_name; /* if used with 'open_cached_file' */ - char *dir,*prefix; - File file; /* file descriptor */ - /* - seek_not_done is set by my_b_seek() to inform the upcoming read/write - operation that a seek needs to be preformed prior to the actual I/O - error is 0 if the cache operation was successful, -1 if there was a - "hard" error, and the actual number of I/O-ed bytes if the read/write was - partial. - */ - int seek_not_done,error; - /** - Cumulative 'error' since last [re]init_io_cache(). Useful if cache's user - polls for errors only once in a while. - */ - int hard_write_error_in_the_past; - /* buffer_length is memory size allocated for buffer or write_buffer */ - size_t buffer_length; - /* read_length is the same as buffer_length except when we use async io */ - size_t read_length; - myf myflags; /* Flags used to my_read/my_write */ - /* - alloced_buffer is 1 if the buffer was allocated by init_io_cache() and - 0 if it was supplied by the user. - Currently READ_NET is the only one that will use a buffer allocated - somewhere else - */ - my_bool alloced_buffer; -#ifdef HAVE_AIOWAIT - /* - As inidicated by ifdef, this is for async I/O, which is not currently - used (because it's not reliable on all systems) - */ - uint inited; - my_off_t aio_read_pos; - my_aio_result aio_result; -#endif -} IO_CACHE; - -typedef int (*qsort2_cmp)(const void *, const void *, const void *); - - /* defines for mf_iocache */ - - /* Test if buffer is inited */ -#define my_b_clear(info) (info)->buffer=0 -#define my_b_inited(info) (info)->buffer -#define my_b_EOF INT_MIN - -#define my_b_read(info,Buffer,Count) \ - ((info)->read_pos + (Count) <= (info)->read_end ?\ - (memcpy(Buffer,(info)->read_pos,(size_t) (Count)), \ - ((info)->read_pos+=(Count)),0) :\ - (*(info)->read_function)((info),Buffer,Count)) - -#define my_b_write(info,Buffer,Count) \ - ((info)->write_pos + (Count) <=(info)->write_end ?\ - (memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\ - ((info)->write_pos+=(Count)),0) : \ - (*(info)->write_function)((info),(Buffer),(Count))) - -#define my_b_get(info) \ - ((info)->read_pos != (info)->read_end ?\ - ((info)->read_pos++, (int) (uchar) (info)->read_pos[-1]) :\ - _my_b_get(info)) - - /* my_b_write_byte dosn't have any err-check */ -#define my_b_write_byte(info,chr) \ - (((info)->write_pos < (info)->write_end) ?\ - ((*(info)->write_pos++)=(chr)) :\ - (_my_b_write(info,0,0) , ((*(info)->write_pos++)=(chr)))) - -#define my_b_fill_cache(info) \ - (((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0)) - -#define my_b_tell(info) ((info)->pos_in_file + \ - (size_t) (*(info)->current_pos - (info)->request_pos)) - -#define my_b_get_buffer_start(info) (info)->request_pos -#define my_b_get_bytes_in_buffer(info) (char*) (info)->read_end - \ - (char*) my_b_get_buffer_start(info) -#define my_b_get_pos_in_file(info) (info)->pos_in_file - -/* tell write offset in the SEQ_APPEND cache */ -int my_b_copy_to_file(IO_CACHE *cache, FILE *file); -my_off_t my_b_append_tell(IO_CACHE* info); -my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */ - -#define my_b_bytes_in_cache(info) (size_t) (*(info)->current_end - \ - *(info)->current_pos) - -typedef uint32 ha_checksum; -extern ha_checksum my_crc_dbug_check; - -/* Define the type of function to be passed to process_default_option_files */ -typedef int (*Process_option_func)(void *ctx, const char *group_name, - const char *option); - -#include - - - /* Prototypes for mysys and my_func functions */ - -extern int my_copy(const char *from,const char *to,myf MyFlags); -extern int my_append(const char *from,const char *to,myf MyFlags); -extern int my_delete(const char *name,myf MyFlags); -extern int my_getwd(char * buf,size_t size,myf MyFlags); -extern int my_setwd(const char *dir,myf MyFlags); -extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags); -extern void *my_once_alloc(size_t Size,myf MyFlags); -extern void my_once_free(void); -extern char *my_once_strdup(const char *src,myf myflags); -extern void *my_once_memdup(const void *src, size_t len, myf myflags); -extern File my_open(const char *FileName,int Flags,myf MyFlags); -extern File my_register_filename(File fd, const char *FileName, - enum file_type type_of_file, - uint error_message_number, myf MyFlags); -extern File my_create(const char *FileName,int CreateFlags, - int AccessFlags, myf MyFlags); -extern int my_close(File Filedes,myf MyFlags); -extern File my_dup(File file, myf MyFlags); -extern int my_mkdir(const char *dir, int Flags, myf MyFlags); -extern int my_readlink(char *to, const char *filename, myf MyFlags); -extern int my_is_symlink(const char *filename); -extern int my_realpath(char *to, const char *filename, myf MyFlags); -extern File my_create_with_symlink(const char *linkname, const char *filename, - int createflags, int access_flags, - myf MyFlags); -extern int my_delete_with_symlink(const char *name, myf MyFlags); -extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags); -extern int my_symlink(const char *content, const char *linkname, myf MyFlags); -extern size_t my_read(File Filedes,uchar *Buffer,size_t Count,myf MyFlags); -extern size_t my_pread(File Filedes,uchar *Buffer,size_t Count,my_off_t offset, - myf MyFlags); -extern int my_rename(const char *from,const char *to,myf MyFlags); -extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags); -extern my_off_t my_tell(File fd,myf MyFlags); -extern size_t my_write(File Filedes,const uchar *Buffer,size_t Count, - myf MyFlags); -extern size_t my_pwrite(File Filedes,const uchar *Buffer,size_t Count, - my_off_t offset,myf MyFlags); -extern size_t my_fread(FILE *stream,uchar *Buffer,size_t Count,myf MyFlags); -extern size_t my_fwrite(FILE *stream,const uchar *Buffer,size_t Count, - myf MyFlags); -extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags); -extern my_off_t my_ftell(FILE *stream,myf MyFlags); -extern void *_mymalloc(size_t uSize,const char *sFile, - uint uLine, myf MyFlag); -extern void *_myrealloc(void *pPtr,size_t uSize,const char *sFile, - uint uLine, myf MyFlag); -extern void * my_multi_malloc _VARARGS((myf MyFlags, ...)); -extern void _myfree(void *pPtr,const char *sFile,uint uLine, myf MyFlag); -extern int _sanity(const char *sFile, uint uLine); -extern void *_my_memdup(const void *from, size_t length, - const char *sFile, uint uLine,myf MyFlag); -extern char * _my_strdup(const char *from, const char *sFile, uint uLine, - myf MyFlag); -extern char *_my_strndup(const char *from, size_t length, - const char *sFile, uint uLine, - myf MyFlag); - -/* implemented in my_memmem.c */ -extern void *my_memmem(const void *haystack, size_t haystacklen, - const void *needle, size_t needlelen); - - -#ifdef _WIN32 -extern int my_access(const char *path, int amode); -#else -#define my_access access -#endif - -extern int check_if_legal_filename(const char *path); -extern int check_if_legal_tablename(const char *path); - -#ifdef _WIN32 -extern int nt_share_delete(const char *name,myf MyFlags); -#define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags)) -#else -#define my_delete_allow_opened(fname,flags) my_delete((fname),(flags)) -#endif - -#ifdef _WIN32 -/* Windows-only functions (CRT equivalents)*/ -extern File my_sopen(const char *path, int oflag, int shflag, int pmode); -extern HANDLE my_get_osfhandle(File fd); -extern void my_osmaperr(unsigned long last_error); -#endif - -#ifndef TERMINATE -extern void TERMINATE(FILE *file, uint flag); -#endif -extern void init_glob_errs(void); -extern void wait_for_free_space(const char *filename, int errors); -extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); -extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags); -extern int my_fclose(FILE *fd,myf MyFlags); -extern File my_fileno(FILE *fd); -extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); -extern int my_chmod(const char *name, mode_t mode, myf my_flags); -extern int my_sync(File fd, myf my_flags); -extern int my_sync_dir(const char *dir_name, myf my_flags); -extern int my_sync_dir_by_file(const char *file_name, myf my_flags); -extern void my_error _VARARGS((int nr,myf MyFlags, ...)); -extern void my_printf_error _VARARGS((uint my_err, const char *format, - myf MyFlags, ...)) - ATTRIBUTE_FORMAT(printf, 2, 4); -extern void my_printv_error(uint error, const char *format, myf MyFlags, - va_list ap); -extern int my_error_register(const char **errmsgs, int first, int last); -extern const char **my_error_unregister(int first, int last); -extern void my_message(uint my_err, const char *str,myf MyFlags); -extern void my_message_no_curses(uint my_err, const char *str,myf MyFlags); -extern my_bool my_init(void); -extern void my_end(int infoflag); -extern int my_redel(const char *from, const char *to, int MyFlags); -extern int my_copystat(const char *from, const char *to, int MyFlags); -extern char * my_filename(File fd); - -#ifndef THREAD -extern void dont_break(void); -extern void allow_break(void); -#else -#define dont_break() -#define allow_break() -#endif - -#ifdef EXTRA_DEBUG -void my_print_open_files(void); -#else -#define my_print_open_files() -#endif - -extern my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist); -extern char *my_tmpdir(MY_TMPDIR *tmpdir); -extern void free_tmpdir(MY_TMPDIR *tmpdir); - -extern void my_remember_signal(int signal_number,sig_handler (*func)(int)); -extern size_t dirname_part(char * to,const char *name, size_t *to_res_length); -extern size_t dirname_length(const char *name); -#define base_name(A) (A+dirname_length(A)) -extern int test_if_hard_path(const char *dir_name); -extern my_bool has_path(const char *name); -extern char *convert_dirname(char *to, const char *from, const char *from_end); -extern void to_unix_path(char * name); -extern char * fn_ext(const char *name); -extern char * fn_same(char * toname,const char *name,int flag); -extern char * fn_format(char * to,const char *name,const char *dir, - const char *form, uint flag); -extern size_t strlength(const char *str); -extern void pack_dirname(char * to,const char *from); -extern size_t normalize_dirname(char * to, const char *from); -extern size_t unpack_dirname(char * to,const char *from); -extern size_t cleanup_dirname(char * to,const char *from); -extern size_t system_filename(char * to,const char *from); -extern size_t unpack_filename(char * to,const char *from); -extern char * intern_filename(char * to,const char *from); -extern char * directory_file_name(char * dst, const char *src); -extern int pack_filename(char * to, const char *name, size_t max_length); -extern char * my_path(char * to,const char *progname, - const char *own_pathname_part); -extern char * my_load_path(char * to, const char *path, - const char *own_path_prefix); -extern int wild_compare(const char *str,const char *wildstr, - pbool str_is_pattern); -extern WF_PACK *wf_comp(char * str); -extern int wf_test(struct wild_file_pack *wf_pack,const char *name); -extern void wf_end(struct wild_file_pack *buffer); -extern size_t strip_sp(char * str); -extern my_bool array_append_string_unique(const char *str, - const char **array, size_t size); -extern void get_date(char * to,int timeflag,time_t use_time); -extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr, - pbool remove_garbage); -extern int init_record_cache(RECORD_CACHE *info,size_t cachesize,File file, - size_t reclength,enum cache_type type, - pbool use_async_io); -extern int read_cache_record(RECORD_CACHE *info,uchar *to); -extern int end_record_cache(RECORD_CACHE *info); -extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos, - const uchar *record,size_t length); -extern int flush_write_cache(RECORD_CACHE *info); -extern long my_clock(void); -extern sig_handler sigtstp_handler(int signal_number); -extern void handle_recived_signals(void); - -extern sig_handler my_set_alarm_variable(int signo); -extern void my_string_ptr_sort(uchar *base,uint items,size_t size); -extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements, - size_t size_of_element,uchar *buffer[]); -extern qsort_t my_qsort(void *base_ptr, size_t total_elems, size_t size, - qsort_cmp cmp); -extern qsort_t my_qsort2(void *base_ptr, size_t total_elems, size_t size, - qsort2_cmp cmp, void *cmp_argument); -extern qsort2_cmp get_ptr_compare(size_t); -void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos); -my_off_t my_get_ptr(uchar *ptr, size_t pack_length); -extern int init_io_cache(IO_CACHE *info,File file,size_t cachesize, - enum cache_type type,my_off_t seek_offset, - pbool use_async_io, myf cache_myflags); -extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type, - my_off_t seek_offset,pbool use_async_io, - pbool clear_cache); -extern void setup_io_cache(IO_CACHE* info); -extern int _my_b_read(IO_CACHE *info,uchar *Buffer,size_t Count); -#ifdef THREAD -extern int _my_b_read_r(IO_CACHE *info,uchar *Buffer,size_t Count); -extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare, - IO_CACHE *write_cache, uint num_threads); -extern void remove_io_thread(IO_CACHE *info); -#endif -extern int _my_b_seq_read(IO_CACHE *info,uchar *Buffer,size_t Count); -extern int _my_b_net_read(IO_CACHE *info,uchar *Buffer,size_t Count); -extern int _my_b_get(IO_CACHE *info); -extern int _my_b_async_read(IO_CACHE *info,uchar *Buffer,size_t Count); -extern int _my_b_write(IO_CACHE *info,const uchar *Buffer,size_t Count); -extern int my_b_append(IO_CACHE *info,const uchar *Buffer,size_t Count); -extern int my_b_safe_write(IO_CACHE *info,const uchar *Buffer,size_t Count); - -extern int my_block_write(IO_CACHE *info, const uchar *Buffer, - size_t Count, my_off_t pos); -extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock); - -#define flush_io_cache(info) my_b_flush_io_cache((info),1) - -extern int end_io_cache(IO_CACHE *info); -extern size_t my_b_fill(IO_CACHE *info); -extern void my_b_seek(IO_CACHE *info,my_off_t pos); -extern size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length); -extern my_off_t my_b_filelength(IO_CACHE *info); -extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...); -extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap); -extern my_bool open_cached_file(IO_CACHE *cache,const char *dir, - const char *prefix, size_t cache_size, - myf cache_myflags); -extern my_bool real_open_cached_file(IO_CACHE *cache); -extern void close_cached_file(IO_CACHE *cache); -File create_temp_file(char *to, const char *dir, const char *pfx, - int mode, myf MyFlags); -#define my_init_dynamic_array(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D CALLER_INFO) -#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D ORIG_CALLER_INFO) -#define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E CALLER_INFO) -#define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E ORIG_CALLER_INFO) -extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array,uint element_size, - void *init_buffer, uint init_alloc, - uint alloc_increment - CALLER_INFO_PROTO); -/* init_dynamic_array() function is deprecated */ -extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size, - uint init_alloc,uint alloc_increment - CALLER_INFO_PROTO); -extern my_bool insert_dynamic(DYNAMIC_ARRAY *array, const uchar * element); -extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array); -extern uchar *pop_dynamic(DYNAMIC_ARRAY*); -extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index); -extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements); -extern void get_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index); -extern void delete_dynamic(DYNAMIC_ARRAY *array); -extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index); -extern void freeze_size(DYNAMIC_ARRAY *array); -extern int get_index_dynamic(DYNAMIC_ARRAY *array, uchar * element); -#define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element) -#define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index)) -#define push_dynamic(A,B) insert_dynamic((A),(B)) -#define reset_dynamic(array) ((array)->elements= 0) -#define sort_dynamic(A,cmp) my_qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp)) - -extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str, - size_t init_alloc,size_t alloc_increment); -extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append); -my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, - size_t length); -extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append, - ...); -extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str); -extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size); -extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n); -extern void dynstr_free(DYNAMIC_STRING *str); -#ifdef HAVE_MLOCK -extern void *my_malloc_lock(size_t length,myf flags); -extern void my_free_lock(void *ptr,myf flags); -#else -#define my_malloc_lock(A,B) my_malloc((A),(B)) -#define my_free_lock(A,B) my_free((A),(B)) -#endif -#define alloc_root_inited(A) ((A)->min_malloc != 0) -#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8) -#define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0) -extern void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, - size_t pre_alloc_size); -extern void *alloc_root(MEM_ROOT *mem_root, size_t Size); -extern void *multi_alloc_root(MEM_ROOT *mem_root, ...); -extern void free_root(MEM_ROOT *root, myf MyFLAGS); -extern void set_prealloc_root(MEM_ROOT *root, char *ptr); -extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, - size_t prealloc_size); -extern char *strdup_root(MEM_ROOT *root,const char *str); -extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len); -extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len); -extern int get_defaults_options(int argc, char **argv, - char **defaults, char **extra_defaults, - char **group_suffix); -extern const char *args_separator; -extern int my_load_defaults(const char *conf_file, const char **groups, - int *argc, char ***argv, const char ***); -extern int load_defaults(const char *conf_file, const char **groups, - int *argc, char ***argv); -extern int modify_defaults_file(const char *file_location, const char *option, - const char *option_value, - const char *section_name, int remove_option); -extern int my_search_option_files(const char *conf_file, int *argc, - char ***argv, uint *args_used, - Process_option_func func, void *func_ctx, - const char **default_directories); -extern void free_defaults(char **argv); -extern void my_print_default_files(const char *conf_file); -extern void print_defaults(const char *conf_file, const char **groups); -extern my_bool my_compress(uchar *, size_t *, size_t *); -extern my_bool my_uncompress(uchar *, size_t , size_t *); -extern uchar *my_compress_alloc(const uchar *packet, size_t *len, - size_t *complen); -extern int packfrm(uchar *, size_t, uchar **, size_t *); -extern int unpackfrm(uchar **, size_t *, const uchar *); - -extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem, - size_t count); -#ifndef DBUG_OFF -extern void my_debug_put_break_here(void); -#else -#define my_debug_put_break_here() do {} while(0) -#endif - -extern void my_sleep(ulong m_seconds); -extern ulong crc32(ulong crc, const uchar *buf, uint len); -extern uint my_set_max_open_files(uint files); -void my_free_open_file_info(void); - -extern time_t my_time(myf flags); -extern ulonglong my_getsystime(void); -extern ulonglong my_micro_time(); -extern ulonglong my_micro_time_and_time(time_t *time_arg); -time_t my_time_possible_from_micro(ulonglong microtime); -extern my_bool my_gethwaddr(uchar *to); -extern int my_getncpus(); - -#ifdef HAVE_SYS_MMAN_H -#include - -#ifndef MAP_NOSYNC -#define MAP_NOSYNC 0 -#endif -#ifndef MAP_NORESERVE -#define MAP_NORESERVE 0 /* For irix and AIX */ -#endif - -#ifdef HAVE_MMAP64 -#define my_mmap(a,b,c,d,e,f) mmap64(a,b,c,d,e,f) -#else -#define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f) -#endif -#define my_munmap(a,b) munmap((a),(b)) - -#else -/* not a complete set of mmap() flags, but only those that nesessary */ -#define PROT_READ 1 -#define PROT_WRITE 2 -#define MAP_NORESERVE 0 -#define MAP_SHARED 0x0001 -#define MAP_PRIVATE 0x0002 -#define MAP_NOSYNC 0x0800 -#define MAP_FAILED ((void *)-1) -#define MS_SYNC 0x0000 - -#ifndef __NETWARE__ -#define HAVE_MMAP -#endif - -void *my_mmap(void *, size_t, int, int, int, my_off_t); -int my_munmap(void *, size_t); -#endif - -/* my_getpagesize */ -#ifdef HAVE_GETPAGESIZE -#define my_getpagesize() getpagesize() -#else -int my_getpagesize(void); -#endif - -int my_msync(int, void *, size_t, int); - -#define MY_UUID_SIZE 16 -#define MY_UUID_STRING_LENGTH (8+1+4+1+4+1+4+1+12) - -void my_uuid_init(ulong seed1, ulong seed2); -void my_uuid(uchar *guid); -void my_uuid2str(const uchar *guid, char *s); -void my_uuid_end(); - -struct my_rnd_struct { - unsigned long seed1,seed2,max_value; - double max_value_dbl; -}; - -void my_rnd_init(struct my_rnd_struct *rand_st, ulong seed1, ulong seed2); -double my_rnd(struct my_rnd_struct *rand_st); - -/* character sets */ -extern uint get_charset_number(const char *cs_name, uint cs_flags); -extern uint get_collation_number(const char *name); -extern const char *get_charset_name(uint cs_number); - -extern CHARSET_INFO *get_charset(uint cs_number, myf flags); -extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); -extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, - uint cs_flags, myf my_flags); - -extern my_bool resolve_charset(const char *cs_name, - CHARSET_INFO *default_cs, - CHARSET_INFO **cs); -extern my_bool resolve_collation(const char *cl_name, - CHARSET_INFO *default_cl, - CHARSET_INFO **cl); - -extern void free_charsets(void); -extern char *get_charsets_dir(char *buf); -extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2); -extern my_bool init_compiled_charsets(myf flags); -extern void add_compiled_collation(CHARSET_INFO *cs); -extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info, - char *to, size_t to_length, - const char *from, size_t length); -#ifdef __WIN__ -#define BACKSLASH_MBTAIL -/* File system character set */ -extern CHARSET_INFO *fs_character_set(void); -#endif -extern size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, - char *to, size_t to_length, - const char *from, size_t length); - -extern void thd_increment_bytes_sent(ulong length); -extern void thd_increment_bytes_received(ulong length); -extern void thd_increment_net_big_packet_count(ulong length); - -#ifdef __WIN__ -extern my_bool have_tcpip; /* Is set if tcpip is used */ - -/* implemented in my_windac.c */ - -int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror, - DWORD owner_rights, DWORD everybody_rights); - -void my_security_attr_free(SECURITY_ATTRIBUTES *sa); - -/* implemented in my_conio.c */ -char* my_cgets(char *string, size_t clen, size_t* plen); - -#endif -#ifdef __NETWARE__ -void netware_reg_user(const char *ip, const char *user, - const char *application); -#endif - -C_MODE_END -#endif /* _my_sys_h */ diff --git a/externals/mysql/my_time.h b/externals/mysql/my_time.h deleted file mode 100644 index 58995f1bf6..0000000000 --- a/externals/mysql/my_time.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (C) 2004-2005 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - This is a private header of sql-common library, containing - declarations for my_time.c -*/ - -#ifndef _my_time_h_ -#define _my_time_h_ -#include "my_global.h" -#include "mysql_time.h" - -C_MODE_START - -extern ulonglong log_10_int[20]; -extern uchar days_in_month[]; - -/* - Portable time_t replacement. - Should be signed and hold seconds for 1902 -- 2038-01-19 range - i.e at least a 32bit variable - - Using the system built in time_t is not an option as - we rely on the above requirements in the time functions - - For example QNX has an unsigned time_t type -*/ -typedef long my_time_t; - -#define MY_TIME_T_MAX LONG_MAX -#define MY_TIME_T_MIN LONG_MIN - -/* Time handling defaults */ -#define TIMESTAMP_MAX_YEAR 2038 -#define TIMESTAMP_MIN_YEAR (1900 + YY_PART_YEAR - 1) -#define TIMESTAMP_MAX_VALUE INT_MAX32 -#define TIMESTAMP_MIN_VALUE 1 - -/* two-digit years < this are 20..; >= this are 19.. */ -#define YY_PART_YEAR 70 - -/* Flags to str_to_datetime */ -#define TIME_FUZZY_DATE 1 -#define TIME_DATETIME_ONLY 2 -/* Must be same as MODE_NO_ZERO_IN_DATE */ -#define TIME_NO_ZERO_IN_DATE (65536L*2*2*2*2*2*2*2) -/* Must be same as MODE_NO_ZERO_DATE */ -#define TIME_NO_ZERO_DATE (TIME_NO_ZERO_IN_DATE*2) -#define TIME_INVALID_DATES (TIME_NO_ZERO_DATE*2) - -#define MYSQL_TIME_WARN_TRUNCATED 1 -#define MYSQL_TIME_WARN_OUT_OF_RANGE 2 - -/* Limits for the TIME data type */ -#define TIME_MAX_HOUR 838 -#define TIME_MAX_MINUTE 59 -#define TIME_MAX_SECOND 59 -#define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \ - TIME_MAX_SECOND) -#define TIME_MAX_VALUE_SECONDS (TIME_MAX_HOUR * 3600L + \ - TIME_MAX_MINUTE * 60L + TIME_MAX_SECOND) - -my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, - ulong flags, int *was_cut); -enum enum_mysql_timestamp_type -str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, - uint flags, int *was_cut); -longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res, - uint flags, int *was_cut); -ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *); -ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *); -ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *); -ulonglong TIME_to_ulonglong(const MYSQL_TIME *); - - -my_bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time, - int *warning); - -int check_time_range(struct st_mysql_time *, int *warning); - -long calc_daynr(uint year,uint month,uint day); -uint calc_days_in_year(uint year); -uint year_2000_handling(uint year); - -void my_init_time(void); - - -/* - Function to check sanity of a TIMESTAMP value - - DESCRIPTION - Check if a given MYSQL_TIME value fits in TIMESTAMP range. - This function doesn't make precise check, but rather a rough - estimate. - - RETURN VALUES - FALSE The value seems sane - TRUE The MYSQL_TIME value is definitely out of range -*/ - -static inline my_bool validate_timestamp_range(const MYSQL_TIME *t) -{ - if ((t->year > TIMESTAMP_MAX_YEAR || t->year < TIMESTAMP_MIN_YEAR) || - (t->year == TIMESTAMP_MAX_YEAR && (t->month > 1 || t->day > 19)) || - (t->year == TIMESTAMP_MIN_YEAR && (t->month < 12 || t->day < 31))) - return FALSE; - - return TRUE; -} - -my_time_t -my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, - my_bool *in_dst_time_gap); - -void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type); - -/* - Required buffer length for my_time_to_str, my_date_to_str, - my_datetime_to_str and TIME_to_string functions. Note, that the - caller is still responsible to check that given TIME structure - has values in valid ranges, otherwise size of the buffer could - be not enough. We also rely on the fact that even wrong values - sent using binary protocol fit in this buffer. -*/ -#define MAX_DATE_STRING_REP_LENGTH 30 - -int my_time_to_str(const MYSQL_TIME *l_time, char *to); -int my_date_to_str(const MYSQL_TIME *l_time, char *to); -int my_datetime_to_str(const MYSQL_TIME *l_time, char *to); -int my_TIME_to_str(const MYSQL_TIME *l_time, char *to); - -/* - Available interval types used in any statement. - - 'interval_type' must be sorted so that simple intervals comes first, - ie year, quarter, month, week, day, hour, etc. The order based on - interval size is also important and the intervals should be kept in a - large to smaller order. (get_interval_value() depends on this) - - Note: If you change the order of elements in this enum you should fix - order of elements in 'interval_type_to_name' and 'interval_names' - arrays - - See also interval_type_to_name, get_interval_value, interval_names -*/ - -enum interval_type -{ - INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_WEEK, INTERVAL_DAY, - INTERVAL_HOUR, INTERVAL_MINUTE, INTERVAL_SECOND, INTERVAL_MICROSECOND, - INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, INTERVAL_DAY_MINUTE, - INTERVAL_DAY_SECOND, INTERVAL_HOUR_MINUTE, INTERVAL_HOUR_SECOND, - INTERVAL_MINUTE_SECOND, INTERVAL_DAY_MICROSECOND, INTERVAL_HOUR_MICROSECOND, - INTERVAL_MINUTE_MICROSECOND, INTERVAL_SECOND_MICROSECOND, INTERVAL_LAST -}; - -C_MODE_END - -#endif /* _my_time_h_ */ diff --git a/externals/mysql/my_tree.h b/externals/mysql/my_tree.h deleted file mode 100644 index e387b25d43..0000000000 --- a/externals/mysql/my_tree.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _tree_h -#define _tree_h -#ifdef __cplusplus -extern "C" { -#endif - -#include "my_base.h" /* get 'enum ha_rkey_function' */ - -/* Worst case tree is half full. This gives use 2^(MAX_TREE_HEIGHT/2) leafs */ -#define MAX_TREE_HEIGHT 64 - -#define ELEMENT_KEY(tree,element)\ -(tree->offset_to_key ? (void*)((uchar*) element+tree->offset_to_key) :\ - *((void**) (element+1))) - -#define tree_set_pointer(element,ptr) *((uchar **) (element+1))=((uchar*) (ptr)) - -#define TREE_NO_DUPS 1 - -typedef enum { left_root_right, right_root_left } TREE_WALK; -typedef uint32 element_count; -typedef int (*tree_walk_action)(void *,element_count,void *); - -typedef enum { free_init, free_free, free_end } TREE_FREE; -typedef void (*tree_element_free)(void*, TREE_FREE, void *); - -typedef struct st_tree_element { - struct st_tree_element *left,*right; - uint32 count:31, - colour:1; /* black is marked as 1 */ -} TREE_ELEMENT; - -#define ELEMENT_CHILD(element, offs) (*(TREE_ELEMENT**)((char*)element + offs)) - -typedef struct st_tree { - TREE_ELEMENT *root,null_element; - TREE_ELEMENT **parents[MAX_TREE_HEIGHT]; - uint offset_to_key,elements_in_tree,size_of_element; - ulong memory_limit, allocated; - qsort_cmp2 compare; - void *custom_arg; - MEM_ROOT mem_root; - my_bool with_delete; - tree_element_free free; - uint flag; -} TREE; - - /* Functions on whole tree */ -void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit, - int size, qsort_cmp2 compare, my_bool with_delete, - tree_element_free free_element, void *custom_arg); -void delete_tree(TREE*); -void reset_tree(TREE*); - - /* similar to delete tree, except we do not my_free() blocks in mem_root */ -#define is_tree_inited(tree) ((tree)->root != 0) - - /* Functions on leafs */ -TREE_ELEMENT *tree_insert(TREE *tree,void *key, uint key_size, - void *custom_arg); -void *tree_search(TREE *tree, void *key, void *custom_arg); -int tree_walk(TREE *tree,tree_walk_action action, - void *argument, TREE_WALK visit); -int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg); -void *tree_search_key(TREE *tree, const void *key, - TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, - enum ha_rkey_function flag, void *custom_arg); -void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents, - TREE_ELEMENT ***last_pos, int child_offs); -void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, - int r_offs); -ha_rows tree_record_pos(TREE *tree, const void *key, - enum ha_rkey_function search_flag, void *custom_arg); -#define reset_free_element(tree) (tree)->free= 0 - -#define TREE_ELEMENT_EXTRA_SIZE (sizeof(TREE_ELEMENT) + sizeof(void*)) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/mysql/my_trie.h b/externals/mysql/my_trie.h deleted file mode 100644 index 72dd485af0..0000000000 --- a/externals/mysql/my_trie.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 2005 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _trie_h -#define _trie_h -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct st_trie_node -{ - uint16 leaf; /* Depth from root node if match, 0 else */ - uchar c; /* Label on this edge */ - struct st_trie_node *next; /* Next label */ - struct st_trie_node *links; /* Array of edges leaving this node */ - struct st_trie_node *fail; /* AC failure function */ -} TRIE_NODE; - -typedef struct st_trie -{ - TRIE_NODE root; - MEM_ROOT mem_root; - CHARSET_INFO *charset; - uint32 nnodes; - uint32 nwords; -} TRIE; - -typedef struct st_ac_trie_state -{ - TRIE *trie; - TRIE_NODE *node; -} AC_TRIE_STATE; - -extern TRIE *trie_init (TRIE *trie, CHARSET_INFO *charset); -extern void trie_free (TRIE *trie); -extern my_bool trie_insert (TRIE *trie, const uchar *key, uint keylen); -extern my_bool ac_trie_prepare (TRIE *trie); -extern void ac_trie_init (TRIE *trie, AC_TRIE_STATE *state); - - -/* `trie_goto' is internal function and shouldn't be used. */ - -static inline TRIE_NODE *trie_goto (TRIE_NODE *root, TRIE_NODE *node, uchar c) -{ - TRIE_NODE *next; - DBUG_ENTER("trie_goto"); - for (next= node->links; next; next= next->next) - if (next->c == c) - DBUG_RETURN(next); - if (root == node) - DBUG_RETURN(root); - DBUG_RETURN(NULL); -} - - -/* - SYNOPSIS - int ac_trie_next (AC_TRIE_STATE *state, uchar *c); - state - valid pointer to `AC_TRIE_STATE' - c - character to lookup - - DESCRIPTION - Implementation of search using Aho-Corasick automaton. - Performs char-by-char search. - - RETURN VALUE - `ac_trie_next' returns length of matched word or 0. -*/ - -static inline int ac_trie_next (AC_TRIE_STATE *state, uchar *c) -{ - TRIE_NODE *root, *node; - DBUG_ENTER("ac_trie_next"); - DBUG_ASSERT(state && c); - root= &state->trie->root; - node= state->node; - while (! (state->node= trie_goto(root, node, *c))) - node= node->fail; - DBUG_RETURN(state->node->leaf); -} - - -/* - SYNOPSIS - my_bool trie_search (TRIE *trie, const uchar *key, uint keylen); - trie - valid pointer to `TRIE' - key - valid pointer to key to insert - keylen - non-0 key length - - DESCRIPTION - Performs key lookup in trie. - - RETURN VALUE - `trie_search' returns `true' if key is in `trie'. Otherwise, - `false' is returned. - - NOTES - Consecutive search here is "best by test". arrays are very short, so - binary search or hashing would add too much complexity that would - overweight speed gain. Especially because compiler can optimize simple - consecutive loop better (tested) -*/ - -static inline my_bool trie_search (TRIE *trie, const uchar *key, uint keylen) -{ - TRIE_NODE *node; - uint k; - DBUG_ENTER("trie_search"); - DBUG_ASSERT(trie && key && keylen); - node= &trie->root; - - for (k= 0; k < keylen; k++) - { - uchar p; - if (! (node= node->links)) - DBUG_RETURN(FALSE); - p= key[k]; - while (p != node->c) - if (! (node= node->next)) - DBUG_RETURN(FALSE); - } - - DBUG_RETURN(node->leaf > 0); -} - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/mysql/my_uctype.h b/externals/mysql/my_uctype.h deleted file mode 100644 index 9aaf478810..0000000000 --- a/externals/mysql/my_uctype.h +++ /dev/null @@ -1,1479 +0,0 @@ -/* Copyright (C) 2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -/* - Unicode ctype data - Generated from UnicodeData-5.0.0d9.txt -*/ -static unsigned char uctype_page00[256]= -{ - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 16, 16, - 16, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 16, 16, 16, 16, 16, - 16, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 16, 16, 16, 16, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 32, 16, 16, - 16, 16, 20, 20, 16, 2, 16, 16, 16, 20, 2, 16, 20, 20, 20, 16, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2 -}; - -static unsigned char uctype_page01[256]= -{ - 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, - 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, - 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, - 1, 2, 1, 2, 1, 2, 1, 2, 2, 1,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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 16, 16, 16, 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 2, 2, 2, 2, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 -}; - -static unsigned char uctype_page03[256]= -{ - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 0, 0, 0, 0, 16, 16, 0, 0, 0, 0, 2, 2, 2, 2, 16, 0, - 0, 0, 0, 0, 16, 16, 1, 16, 1, 1, 1, 0, 1, 0, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2,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, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, - 1, 2, 1, 2, 0, 0, 0, 0, 0, 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, 0, 0, 2, 16, 16, 16, 16, 16, 16, - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 0, 16, 16, 0, 0, 0, 0, 0, - 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 16, 18, - 16, 18, 18, 16, 18, 18, 16, 18, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, - 2, 2, 2, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char uctype_page06[256]= -{ - 32, 32, 32, 32, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16, - 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 0, 16, 0, 0, 16, 16, - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 2, 2, - 18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 16, 2, 18, 18, 18, 18, 18, 18, 18, 32, 18, 18, - 18, 18, 18, 18, 18, 2, 2, 18, 18, 16, 18, 18, 18, 18, 2, 2, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 16, 16, 2 -}; - -static unsigned char uctype_page07[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 32, - 2, 18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 2, 2, 16, 16, 16, 16, 2, 0, 0, 0, 0, 0 -}; - -static unsigned char uctype_page09[256]= -{ - 0, 18, 18, 18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 18, 2, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, - 2, 18, 18, 18, 18, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 18, 18, 16, 16, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, - 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, - 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, - 2, 0, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 18, 2, 18, 18, - 18, 18, 18, 18, 18, 0, 0, 18, 18, 0, 0, 18, 18, 18, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 2, 2, 0, 2, - 2, 2, 18, 18, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 2, 2, 16, 16, 20, 20, 20, 20, 20, 20, 16, 0, 0, 0, 0, 0 -}; - -static unsigned char uctype_page0A[256]= -{ - 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, - 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, - 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 18, 0, 18, 18, - 18, 18, 18, 0, 0, 0, 0, 18, 18, 0, 0, 18, 18, 18, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 18, 18, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, - 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, - 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 18, 2, 18, 18, - 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 0, 18, 18, 18, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 18, 18, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char uctype_page0B[256]= -{ - 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, - 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, - 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 18, 2, 18, 18, - 18, 18, 18, 18, 0, 0, 0, 18, 18, 0, 0, 18, 18, 18, 0, 0, - 0, 0, 0, 0, 0, 0, 18, 18, 0, 0, 0, 0, 2, 2, 0, 2, - 2, 2, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 16, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 18, 2, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, - 2, 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 0, 2, 0, 2, 2, - 0, 0, 0, 2, 2, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 18, 18, - 18, 18, 18, 0, 0, 0, 18, 18, 18, 0, 18, 18, 18, 18, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 20, 20, 20, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0 -}; - -static unsigned char uctype_page0C[256]= -{ - 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, - 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 18, 18, - 18, 18, 18, 18, 18, 0, 18, 18, 18, 0, 18, 18, 18, 18, 0, 0, - 0, 0, 0, 0, 0, 18, 18, 0, 0, 0, 0, 0, 0, 0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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 -}; - -static unsigned char uctype_page0F[256]= -{ - 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 16, 16, 16, 16, 16, 16, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 16, 18, 16, 18, 16, 18, 16, 16, 16, 16, 18, 18, - 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, - 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 16, 18, 18, 2, 2, 2, 2, 0, 0, 0, 0, - 18, 18, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 16, 16, - 16, 16, 16, 16, 16, 16, 18, 16, 16, 16, 16, 16, 16, 0, 0, 16, - 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 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 unsigned char uctype_page10[256]= -{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 0, 2, 2, 2, 2, 2, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 32, 32, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 16, 16, 16, 2, 16, 16, 16, 16, 2, 18, 0, 0, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char uctype_page18[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 8, 0, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 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 unsigned char uctype_page19[256]= -{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, - 16, 0, 0, 0, 16, 16, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, - 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 2, 2, 2, 2, 2, 2, 2, 18, 18, 0, 0, 0, 0, 0, 0, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 -}; - -static unsigned char uctype_page1A[256]= -{ - 2, 2, 2, 2, 2, 2,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 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 8, 8, 32, 32, 32, 32, 32, 8, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 8, - 32, 32, 32, 32, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, - 20, 2, 0, 0, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, 16, 2, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, 16, 0, - 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char uctype_page21[256]= -{ - 16, 16, 1, 16, 16, 16, 16, 1, 16, 16, 2, 1, 1, 1, 2, 2, - 1, 1, 1, 2, 16, 1, 16, 16, 16, 1, 1, 1, 1, 1, 16, 16, - 16, 16, 16, 16, 1, 16, 1, 16, 1, 16, 1, 1, 1, 1, 16, 2, - 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 16, 16, 2, 2, 1, 1, - 16, 16, 16, 16, 16, 1, 2, 2, 2, 2, 16, 16, 16, 16, 2, 0, - 0, 0, 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 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, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 -}; - -static unsigned char uctype_page23[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 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 unsigned char uctype_page24[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 -}; - -static unsigned char uctype_page26[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 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 unsigned char uctype_page27[256]= -{ - 0, 16, 16, 16, 16, 0, 16, 16, 16, 16, 0, 0, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 0, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 16, 0, 16, - 16, 16, 16, 0, 0, 0, 16, 0, 16, 16, 16, 16, 16, 16, 16, 0, - 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 16, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 -}; - -static unsigned char uctype_page2B[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0 -}; - -static unsigned char uctype_page2E[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 16, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char uctype_page2F[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0 -}; - -static unsigned char uctype_page30[256]= -{ - 8, 16, 16, 16, 16, 2, 2, 7, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 7, 7, 7, 7, 7, 7, 7, 7, 7, 18, 18, 18, 18, 18, 18, - 16, 2, 2, 2, 2, 2, 16, 16, 7, 7, 7, 2, 2, 16, 16, 16, - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 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 16, 16, 16, 16, 16, 16, 16, 16, 16, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -}; - -static unsigned char uctype_page32[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0 -}; - -static unsigned char uctype_page4D[256]= -{ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 -}; - -static unsigned char uctype_page9F[256]= -{ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3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16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 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 unsigned char uctype_pageA7[256]= -{ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 2, 2, 2, 2, 0, 0, 0, 0, 0, - 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -}; - -static unsigned char uctype_pageFD[256]= -{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 0, 0 -}; - -static unsigned char uctype_pageFE[256]= -{ - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, - 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 0, 16, 16, 16, 16, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 32 -}; - -static unsigned char uctype_pageFF[256]= -{ - 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 16, 16, - 16, 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, 16, 16, 16, 16, 16, - 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, - 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, - 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, - 16, 16, 16, 16, 16, 16, 16, 0, 16, 16, 16, 16, 16, 16, 16, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 16, 16, 0, 0 -}; - -MY_UNI_CTYPE my_uni_ctype[256]={ - {0,uctype_page00}, - {0,uctype_page01}, - {0,uctype_page02}, - {0,uctype_page03}, - {0,uctype_page04}, - {0,uctype_page05}, - {0,uctype_page06}, - {0,uctype_page07}, - {0,NULL}, - {0,uctype_page09}, - {0,uctype_page0A}, - {0,uctype_page0B}, - {0,uctype_page0C}, - {0,uctype_page0D}, - {0,uctype_page0E}, - {0,uctype_page0F}, - {0,uctype_page10}, - {0,uctype_page11}, - {0,uctype_page12}, - {0,uctype_page13}, - {0,uctype_page14}, - {2,NULL}, - {0,uctype_page16}, - {0,uctype_page17}, - {0,uctype_page18}, - {0,uctype_page19}, - {0,uctype_page1A}, - {0,uctype_page1B}, - {0,NULL}, - {0,uctype_page1D}, - {0,uctype_page1E}, - {0,uctype_page1F}, - {0,uctype_page20}, - {0,uctype_page21}, - {16,NULL}, - {0,uctype_page23}, - {0,uctype_page24}, - {16,NULL}, - {0,uctype_page26}, - {0,uctype_page27}, - {16,NULL}, - {16,NULL}, - {16,NULL}, - {0,uctype_page2B}, - {0,uctype_page2C}, - {0,uctype_page2D}, - {0,uctype_page2E}, - {0,uctype_page2F}, - {0,uctype_page30}, - {0,uctype_page31}, - {0,uctype_page32}, - {16,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {0,uctype_page4D}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {0,uctype_page9F}, - {2,NULL}, - {2,NULL}, - {2,NULL}, - {2,NULL}, - {0,uctype_pageA4}, - {0,NULL}, - {0,NULL}, - {0,uctype_pageA7}, - {0,uctype_pageA8}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {3,NULL}, - {0,uctype_pageD7}, - {0,uctype_pageD8}, - {0,NULL}, - {0,NULL}, - {0,uctype_pageDB}, - {0,uctype_pageDC}, - {0,NULL}, - {0,NULL}, - {0,uctype_pageDF}, - {0,uctype_pageE0}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,NULL}, - {0,uctype_pageF8}, - {2,NULL}, - {0,uctype_pageFA}, - {0,uctype_pageFB}, - {2,NULL}, - {0,uctype_pageFD}, - {0,uctype_pageFE}, - {0,uctype_pageFF} -}; - - diff --git a/externals/mysql/my_vle.h b/externals/mysql/my_vle.h deleted file mode 100644 index c09f82229c..0000000000 --- a/externals/mysql/my_vle.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2005 MySQL AB - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef VLE_H -#define VLE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "my_global.h" - -/* - The size (in bytes) required to store the object ITEM, which can be - either an expression or a type (since sizeof() is used on the item). -*/ -#define my_vle_sizeof(ITEM) (((sizeof(ITEM) * CHAR_BIT) + 6) / 7) - -uchar *my_vle_encode(uchar *vle, size_t max, ulong value); -uchar const *my_vle_decode(ulong *value_ptr, uchar const *vle); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/mysql/my_xml.h b/externals/mysql/my_xml.h deleted file mode 100644 index 6a453ee90b..0000000000 --- a/externals/mysql/my_xml.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#ifndef _my_xml_h -#define _my_xml_h - -#ifdef __cplusplus -extern "C" { -#endif - - -#define MY_XML_OK 0 -#define MY_XML_ERROR 1 - -/* - A flag whether to use absolute tag names in call-back functions, - like "a", "a.b" and "a.b.c" (used in character set file parser), - or relative names like "a", "b" and "c". -*/ -#define MY_XML_FLAG_RELATIVE_NAMES 1 - -/* - A flag whether to skip normilization of text values before calling - call-back functions: i.e. skip leading/trailing spaces, - \r, \n, \t characters. -*/ -#define MY_XML_FLAG_SKIP_TEXT_NORMALIZATION 2 - -enum my_xml_node_type -{ - MY_XML_NODE_TAG, /* can have TAG, ATTR and TEXT children */ - MY_XML_NODE_ATTR, /* can have TEXT children */ - MY_XML_NODE_TEXT /* cannot have children */ -}; - -typedef struct xml_stack_st -{ - int flags; - enum my_xml_node_type current_node_type; - char errstr[128]; - char attr[128]; - char *attrend; - const char *beg; - const char *cur; - const char *end; - void *user_data; - int (*enter)(struct xml_stack_st *st,const char *val, size_t len); - int (*value)(struct xml_stack_st *st,const char *val, size_t len); - int (*leave_xml)(struct xml_stack_st *st,const char *val, size_t len); -} MY_XML_PARSER; - -void my_xml_parser_create(MY_XML_PARSER *st); -void my_xml_parser_free(MY_XML_PARSER *st); -int my_xml_parse(MY_XML_PARSER *st,const char *str, size_t len); - -void my_xml_set_value_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *, - const char *, - size_t len)); -void my_xml_set_enter_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *, - const char *, - size_t len)); -void my_xml_set_leave_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *, - const char *, - size_t len)); -void my_xml_set_user_data(MY_XML_PARSER *st, void *); - -size_t my_xml_error_pos(MY_XML_PARSER *st); -uint my_xml_error_lineno(MY_XML_PARSER *st); - -const char *my_xml_error_string(MY_XML_PARSER *st); - -#ifdef __cplusplus -} -#endif - -#endif /* _my_xml_h */ diff --git a/externals/mysql/myisampack.h b/externals/mysql/myisampack.h deleted file mode 100644 index 34a085e4e5..0000000000 --- a/externals/mysql/myisampack.h +++ /dev/null @@ -1,238 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Storing of values in high byte first order. - - integer keys and file pointers are stored with high byte first to get - better compression -*/ - -/* these two are for uniformity */ -#define mi_sint1korr(A) ((int8)(*A)) -#define mi_uint1korr(A) ((uint8)(*A)) - -#define mi_sint2korr(A) ((int16) (((int16) (((const uchar*) (A))[1])) +\ - ((int16) ((int16) ((const char*) (A))[0]) << 8))) -#define mi_sint3korr(A) ((int32) (((((const uchar*) (A))[0]) & 128) ? \ - (((uint32) 255L << 24) | \ - (((uint32) ((const uchar*) (A))[0]) << 16) |\ - (((uint32) ((const uchar*) (A))[1]) << 8) | \ - ((uint32) ((const uchar*) (A))[2])) : \ - (((uint32) ((const uchar*) (A))[0]) << 16) |\ - (((uint32) ((const uchar*) (A))[1]) << 8) | \ - ((uint32) ((const uchar*) (A))[2]))) -#define mi_sint4korr(A) ((int32) (((int32) (((const uchar*) (A))[3])) +\ - ((int32) (((const uchar*) (A))[2]) << 8) +\ - ((int32) (((const uchar*) (A))[1]) << 16) +\ - ((int32) ((int16) ((const char*) (A))[0]) << 24))) -#define mi_sint8korr(A) ((longlong) mi_uint8korr(A)) -#define mi_uint2korr(A) ((uint16) (((uint16) (((const uchar*) (A))[1])) +\ - ((uint16) (((const uchar*) (A))[0]) << 8))) -#define mi_uint3korr(A) ((uint32) (((uint32) (((const uchar*) (A))[2])) +\ - (((uint32) (((const uchar*) (A))[1])) << 8) +\ - (((uint32) (((const uchar*) (A))[0])) << 16))) -#define mi_uint4korr(A) ((uint32) (((uint32) (((const uchar*) (A))[3])) +\ - (((uint32) (((const uchar*) (A))[2])) << 8) +\ - (((uint32) (((const uchar*) (A))[1])) << 16) +\ - (((uint32) (((const uchar*) (A))[0])) << 24))) -#define mi_uint5korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[4])) +\ - (((uint32) (((const uchar*) (A))[3])) << 8) +\ - (((uint32) (((const uchar*) (A))[2])) << 16) +\ - (((uint32) (((const uchar*) (A))[1])) << 24)) +\ - (((ulonglong) (((const uchar*) (A))[0])) << 32)) -#define mi_uint6korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[5])) +\ - (((uint32) (((const uchar*) (A))[4])) << 8) +\ - (((uint32) (((const uchar*) (A))[3])) << 16) +\ - (((uint32) (((const uchar*) (A))[2])) << 24)) +\ - (((ulonglong) (((uint32) (((const uchar*) (A))[1])) +\ - (((uint32) (((const uchar*) (A))[0]) << 8)))) <<\ - 32)) -#define mi_uint7korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[6])) +\ - (((uint32) (((const uchar*) (A))[5])) << 8) +\ - (((uint32) (((const uchar*) (A))[4])) << 16) +\ - (((uint32) (((const uchar*) (A))[3])) << 24)) +\ - (((ulonglong) (((uint32) (((const uchar*) (A))[2])) +\ - (((uint32) (((const uchar*) (A))[1])) << 8) +\ - (((uint32) (((const uchar*) (A))[0])) << 16))) <<\ - 32)) -#define mi_uint8korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[7])) +\ - (((uint32) (((const uchar*) (A))[6])) << 8) +\ - (((uint32) (((const uchar*) (A))[5])) << 16) +\ - (((uint32) (((const uchar*) (A))[4])) << 24)) +\ - (((ulonglong) (((uint32) (((const uchar*) (A))[3])) +\ - (((uint32) (((const uchar*) (A))[2])) << 8) +\ - (((uint32) (((const uchar*) (A))[1])) << 16) +\ - (((uint32) (((const uchar*) (A))[0])) << 24))) <<\ - 32)) - -/* This one is for uniformity */ -#define mi_int1store(T,A) *((uchar*)(T))= (uchar) (A) - -#define mi_int2store(T,A) { uint def_temp= (uint) (A) ;\ - ((uchar*) (T))[1]= (uchar) (def_temp);\ - ((uchar*) (T))[0]= (uchar) (def_temp >> 8); } -#define mi_int3store(T,A) { /*lint -save -e734 */\ - ulong def_temp= (ulong) (A);\ - ((uchar*) (T))[2]= (uchar) (def_temp);\ - ((uchar*) (T))[1]= (uchar) (def_temp >> 8);\ - ((uchar*) (T))[0]= (uchar) (def_temp >> 16);\ - /*lint -restore */} -#define mi_int4store(T,A) { ulong def_temp= (ulong) (A);\ - ((uchar*) (T))[3]= (uchar) (def_temp);\ - ((uchar*) (T))[2]= (uchar) (def_temp >> 8);\ - ((uchar*) (T))[1]= (uchar) (def_temp >> 16);\ - ((uchar*) (T))[0]= (uchar) (def_temp >> 24); } -#define mi_int5store(T,A) { ulong def_temp= (ulong) (A),\ - def_temp2= (ulong) ((A) >> 32);\ - ((uchar*) (T))[4]= (uchar) (def_temp);\ - ((uchar*) (T))[3]= (uchar) (def_temp >> 8);\ - ((uchar*) (T))[2]= (uchar) (def_temp >> 16);\ - ((uchar*) (T))[1]= (uchar) (def_temp >> 24);\ - ((uchar*) (T))[0]= (uchar) (def_temp2); } -#define mi_int6store(T,A) { ulong def_temp= (ulong) (A),\ - def_temp2= (ulong) ((A) >> 32);\ - ((uchar*) (T))[5]= (uchar) (def_temp);\ - ((uchar*) (T))[4]= (uchar) (def_temp >> 8);\ - ((uchar*) (T))[3]= (uchar) (def_temp >> 16);\ - ((uchar*) (T))[2]= (uchar) (def_temp >> 24);\ - ((uchar*) (T))[1]= (uchar) (def_temp2);\ - ((uchar*) (T))[0]= (uchar) (def_temp2 >> 8); } -#define mi_int7store(T,A) { ulong def_temp= (ulong) (A),\ - def_temp2= (ulong) ((A) >> 32);\ - ((uchar*) (T))[6]= (uchar) (def_temp);\ - ((uchar*) (T))[5]= (uchar) (def_temp >> 8);\ - ((uchar*) (T))[4]= (uchar) (def_temp >> 16);\ - ((uchar*) (T))[3]= (uchar) (def_temp >> 24);\ - ((uchar*) (T))[2]= (uchar) (def_temp2);\ - ((uchar*) (T))[1]= (uchar) (def_temp2 >> 8);\ - ((uchar*) (T))[0]= (uchar) (def_temp2 >> 16); } -#define mi_int8store(T,A) { ulong def_temp3= (ulong) (A),\ - def_temp4= (ulong) ((A) >> 32);\ - mi_int4store((uchar*) (T) + 0, def_temp4);\ - mi_int4store((uchar*) (T) + 4, def_temp3); } - -#ifdef WORDS_BIGENDIAN - -#define mi_float4store(T,A) { ((uchar*) (T))[0]= ((uchar*) &A)[0];\ - ((uchar*) (T))[1]= ((uchar*) &A)[1];\ - ((uchar*) (T))[2]= ((uchar*) &A)[2];\ - ((uchar*) (T))[3]= ((uchar*) &A)[3]; } - -#define mi_float4get(V,M) { float def_temp;\ - ((uchar*) &def_temp)[0]= ((const uchar*) (M))[0];\ - ((uchar*) &def_temp)[1]= ((const uchar*) (M))[1]; \ - ((uchar*) &def_temp)[2]= ((const uchar*) (M))[2];\ - ((uchar*) &def_temp)[3]= ((const uchar*) (M))[3];\ - (V)= def_temp; } - -#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((const uchar*) &V)[0];\ - ((uchar*) (T))[1]= ((const uchar*) &V)[1];\ - ((uchar*) (T))[2]= ((const uchar*) &V)[2];\ - ((uchar*) (T))[3]= ((const uchar*) &V)[3];\ - ((uchar*) (T))[4]= ((const uchar*) &V)[4];\ - ((uchar*) (T))[5]= ((const uchar*) &V)[5];\ - ((uchar*) (T))[6]= ((const uchar*) &V)[6];\ - ((uchar*) (T))[7]= ((const uchar*) &V)[7]; } - -#define mi_float8get(V,M) { double def_temp;\ - ((uchar*) &def_temp)[0]= ((const uchar*) (M))[0];\ - ((uchar*) &def_temp)[1]= ((const uchar*) (M))[1];\ - ((uchar*) &def_temp)[2]= ((const uchar*) (M))[2];\ - ((uchar*) &def_temp)[3]= ((const uchar*) (M))[3];\ - ((uchar*) &def_temp)[4]= ((const uchar*) (M))[4];\ - ((uchar*) &def_temp)[5]= ((const uchar*) (M))[5];\ - ((uchar*) &def_temp)[6]= ((const uchar*) (M))[6];\ - ((uchar*) &def_temp)[7]= ((const uchar*) (M))[7]; \ - (V)= def_temp; } -#else - -#define mi_float4store(T,A) { ((uchar*) (T))[0]= ((const uchar*) &A)[3];\ - ((uchar*) (T))[1]= ((const uchar*) &A)[2];\ - ((uchar*) (T))[2]= ((const uchar*) &A)[1];\ - ((uchar*) (T))[3]= ((const uchar*) &A)[0]; } - -#define mi_float4get(V,M) { float def_temp;\ - ((uchar*) &def_temp)[0]= ((const uchar*) (M))[3];\ - ((uchar*) &def_temp)[1]= ((const uchar*) (M))[2];\ - ((uchar*) &def_temp)[2]= ((const uchar*) (M))[1];\ - ((uchar*) &def_temp)[3]= ((const uchar*) (M))[0];\ - (V)= def_temp; } - -#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN) -#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((const uchar*) &V)[3];\ - ((uchar*) (T))[1]= ((const uchar*) &V)[2];\ - ((uchar*) (T))[2]= ((const uchar*) &V)[1];\ - ((uchar*) (T))[3]= ((const uchar*) &V)[0];\ - ((uchar*) (T))[4]= ((const uchar*) &V)[7];\ - ((uchar*) (T))[5]= ((const uchar*) &V)[6];\ - ((uchar*) (T))[6]= ((const uchar*) &V)[5];\ - ((uchar*) (T))[7]= ((const uchar*) &V)[4];} - -#define mi_float8get(V,M) { double def_temp;\ - ((uchar*) &def_temp)[0]= ((const uchar*) (M))[3];\ - ((uchar*) &def_temp)[1]= ((const uchar*) (M))[2];\ - ((uchar*) &def_temp)[2]= ((const uchar*) (M))[1];\ - ((uchar*) &def_temp)[3]= ((const uchar*) (M))[0];\ - ((uchar*) &def_temp)[4]= ((const uchar*) (M))[7];\ - ((uchar*) &def_temp)[5]= ((const uchar*) (M))[6];\ - ((uchar*) &def_temp)[6]= ((const uchar*) (M))[5];\ - ((uchar*) &def_temp)[7]= ((const uchar*) (M))[4];\ - (V)= def_temp; } - -#else -#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((const uchar*) &V)[7];\ - ((uchar*) (T))[1]= ((const uchar*) &V)[6];\ - ((uchar*) (T))[2]= ((const uchar*) &V)[5];\ - ((uchar*) (T))[3]= ((const uchar*) &V)[4];\ - ((uchar*) (T))[4]= ((const uchar*) &V)[3];\ - ((uchar*) (T))[5]= ((const uchar*) &V)[2];\ - ((uchar*) (T))[6]= ((const uchar*) &V)[1];\ - ((uchar*) (T))[7]= ((const uchar*) &V)[0];} - -#define mi_float8get(V,M) { double def_temp;\ - ((uchar*) &def_temp)[0]= ((const uchar*) (M))[7];\ - ((uchar*) &def_temp)[1]= ((const uchar*) (M))[6];\ - ((uchar*) &def_temp)[2]= ((const uchar*) (M))[5];\ - ((uchar*) &def_temp)[3]= ((const uchar*) (M))[4];\ - ((uchar*) &def_temp)[4]= ((const uchar*) (M))[3];\ - ((uchar*) &def_temp)[5]= ((const uchar*) (M))[2];\ - ((uchar*) &def_temp)[6]= ((const uchar*) (M))[1];\ - ((uchar*) &def_temp)[7]= ((const uchar*) (M))[0];\ - (V)= def_temp; } -#endif /* __FLOAT_WORD_ORDER */ -#endif /* WORDS_BIGENDIAN */ - -/* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */ - -#ifdef BIG_TABLES -#define mi_rowstore(T,A) mi_int8store(T, A) -#define mi_rowkorr(T) mi_uint8korr(T) -#else -#define mi_rowstore(T,A) { mi_int4store(T, 0);\ - mi_int4store(((uchar*) (T) + 4), A); } -#define mi_rowkorr(T) mi_uint4korr((const uchar*) (T) + 4) -#endif - -#if SIZEOF_OFF_T > 4 -#define mi_sizestore(T,A) mi_int8store(T, A) -#define mi_sizekorr(T) mi_uint8korr(T) -#else -#define mi_sizestore(T,A) { if ((A) == HA_OFFSET_ERROR)\ - bfill((char*) (T), 8, 255);\ - else { mi_int4store((T), 0);\ - mi_int4store(((T) + 4), A); }} -#define mi_sizekorr(T) mi_uint4korr((const uchar*) (T) + 4) -#endif diff --git a/externals/mysql/mysql.h b/externals/mysql/mysql.h deleted file mode 100644 index 88333c4a72..0000000000 --- a/externals/mysql/mysql.h +++ /dev/null @@ -1,755 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - This file defines the client API to MySQL and also the ABI of the - dynamically linked libmysqlclient. - - The ABI should never be changed in a released product of MySQL - thus you need to take great care when changing the file. In case - the file is changed so the ABI is broken, you must also - update the SHAREDLIB_MAJOR_VERSION in configure.in . - -*/ - -#ifndef _mysql_h -#define _mysql_h - -#ifdef _AIX /* large-file support will break without this */ -#include -#endif - -#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */ -#undef WIN -#undef _WIN -#undef _WIN32 -#undef _WIN64 -#undef __WIN__ -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _global_h /* If not standard header */ -#include -#ifdef __LCC__ -#include /* For windows */ -#endif -typedef char my_bool; -#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) -#define __WIN__ -#endif -#if !defined(__WIN__) -#define STDCALL -#else -#define STDCALL __stdcall -#endif - -#ifndef my_socket_defined -#ifdef __WIN__ -#define my_socket SOCKET -#else -typedef int my_socket; -#endif /* __WIN__ */ -#endif /* my_socket_defined */ -#endif /* _global_h */ - -#include "mysql_version.h" -#include "mysql_com.h" -#include "mysql_time.h" - -#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ - -extern unsigned int mysql_port; -extern char *mysql_unix_port; - -#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */ -#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */ - -#ifdef __NETWARE__ -#pragma pack(push, 8) /* 8 byte alignment */ -#endif - -#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG) -#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) -#define IS_BLOB(n) ((n) & BLOB_FLAG) -#define IS_NUM(t) ((t) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL) -#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) -#define INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_INT24 && ((f)->type != MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == MYSQL_TYPE_YEAR) -#define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING) - - -typedef struct st_mysql_field { - char *name; /* Name of column */ - char *org_name; /* Original column name, if an alias */ - char *table; /* Table of column if column was a field */ - char *org_table; /* Org table name, if table was an alias */ - char *db; /* Database for table */ - char *catalog; /* Catalog for table */ - char *def; /* Default value (set by mysql_list_fields) */ - unsigned long length; /* Width of column (create length) */ - unsigned long max_length; /* Max width for selected set */ - unsigned int name_length; - unsigned int org_name_length; - unsigned int table_length; - unsigned int org_table_length; - unsigned int db_length; - unsigned int catalog_length; - unsigned int def_length; - unsigned int flags; /* Div flags */ - unsigned int decimals; /* Number of decimals in field */ - unsigned int charsetnr; /* Character set */ - enum enum_field_types type; /* Type of field. See mysql_com.h for types */ - void *extension; -} MYSQL_FIELD; - -typedef char **MYSQL_ROW; /* return data as array of strings */ -typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */ - -#ifndef _global_h -#if defined(NO_CLIENT_LONG_LONG) -typedef unsigned long my_ulonglong; -#elif defined (__WIN__) -typedef unsigned __int64 my_ulonglong; -#else -typedef unsigned long long my_ulonglong; -#endif -#endif - -#include "typelib.h" - -#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0) - -/* backward compatibility define - to be removed eventually */ -#define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED - -typedef struct st_mysql_rows { - struct st_mysql_rows *next; /* list of rows */ - MYSQL_ROW data; - unsigned long length; -} MYSQL_ROWS; - -typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ - -#include "my_alloc.h" - -typedef struct embedded_query_result EMBEDDED_QUERY_RESULT; -typedef struct st_mysql_data { - MYSQL_ROWS *data; - struct embedded_query_result *embedded_info; - MEM_ROOT alloc; - my_ulonglong rows; - unsigned int fields; - /* extra info for embedded library */ - void *extension; -} MYSQL_DATA; - -enum mysql_option -{ - MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, - MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, - MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE, - MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT, - MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT, - MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, - MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH, - MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT, - MYSQL_OPT_SSL_VERIFY_SERVER_CERT -}; - -struct st_mysql_options { - unsigned int connect_timeout, read_timeout, write_timeout; - unsigned int port, protocol; - unsigned long client_flag; - char *host,*user,*password,*unix_socket,*db; - struct st_dynamic_array *init_commands; - char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name; - char *ssl_key; /* PEM key file */ - char *ssl_cert; /* PEM cert file */ - char *ssl_ca; /* PEM CA file */ - char *ssl_capath; /* PEM directory of CA-s? */ - char *ssl_cipher; /* cipher to use */ - char *shared_memory_base_name; - unsigned long max_allowed_packet; - my_bool use_ssl; /* if to use SSL or not */ - my_bool compress,named_pipe; - my_bool unused1; - my_bool unused2; - my_bool unused3; - my_bool unused4; - enum mysql_option methods_to_use; - char *client_ip; - /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */ - my_bool secure_auth; - /* 0 - never report, 1 - always report (default) */ - my_bool report_data_truncation; - - /* function pointers for local infile support */ - int (*local_infile_init)(void **, const char *, void *); - int (*local_infile_read)(void *, char *, unsigned int); - void (*local_infile_end)(void *); - int (*local_infile_error)(void *, char *, unsigned int); - void *local_infile_userdata; - void *extension; -}; - -enum mysql_status -{ - MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT -}; - -enum mysql_protocol_type -{ - MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, - MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY -}; - -typedef struct character_set -{ - unsigned int number; /* character set number */ - unsigned int state; /* character set state */ - const char *csname; /* collation name */ - const char *name; /* character set name */ - const char *comment; /* comment */ - const char *dir; /* character set directory */ - unsigned int mbminlen; /* min. length for multibyte strings */ - unsigned int mbmaxlen; /* max. length for multibyte strings */ -} MY_CHARSET_INFO; - -struct st_mysql_methods; -struct st_mysql_stmt; - -typedef struct st_mysql -{ - NET net; /* Communication parameters */ - unsigned char *connector_fd; /* ConnectorFd for SSL */ - char *host,*user,*passwd,*unix_socket,*server_version,*host_info; - char *info, *db; - struct charset_info_st *charset; - MYSQL_FIELD *fields; - MEM_ROOT field_alloc; - my_ulonglong affected_rows; - my_ulonglong insert_id; /* id if insert on table with NEXTNR */ - my_ulonglong extra_info; /* Not used */ - unsigned long thread_id; /* Id for connection in server */ - unsigned long packet_length; - unsigned int port; - unsigned long client_flag,server_capabilities; - unsigned int protocol_version; - unsigned int field_count; - unsigned int server_status; - unsigned int server_language; - unsigned int warning_count; - struct st_mysql_options options; - enum mysql_status status; - my_bool free_me; /* If free in mysql_close */ - my_bool reconnect; /* set to 1 if automatic reconnect */ - - /* session-wide random string */ - char scramble[SCRAMBLE_LENGTH+1]; - my_bool unused1; - void *unused2, *unused3, *unused4, *unused5; - - LIST *stmts; /* list of all statements */ - const struct st_mysql_methods *methods; - void *thd; - /* - Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag - from mysql_stmt_close if close had to cancel result set of this object. - */ - my_bool *unbuffered_fetch_owner; - /* needed for embedded server - no net buffer to store the 'info' */ - char *info_buffer; - void *extension; -} MYSQL; - - -typedef struct st_mysql_res { - my_ulonglong row_count; - MYSQL_FIELD *fields; - MYSQL_DATA *data; - MYSQL_ROWS *data_cursor; - unsigned long *lengths; /* column lengths of current row */ - MYSQL *handle; /* for unbuffered reads */ - const struct st_mysql_methods *methods; - MYSQL_ROW row; /* If unbuffered read */ - MYSQL_ROW current_row; /* buffer to current row */ - MEM_ROOT field_alloc; - unsigned int field_count, current_field; - my_bool eof; /* Used by mysql_fetch_row */ - /* mysql_stmt_close() had to cancel this result */ - my_bool unbuffered_fetch_cancelled; - void *extension; -} MYSQL_RES; - - -#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) -#define MYSQL_CLIENT -#endif - - -typedef struct st_mysql_parameters -{ - unsigned long *p_max_allowed_packet; - unsigned long *p_net_buffer_length; - void *extension; -} MYSQL_PARAMETERS; - -#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) -#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet) -#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length) -#endif - -/* - Set up and bring down the server; to ensure that applications will - work when linked against either the standard client library or the - embedded server library, these functions should be called. -*/ -int STDCALL mysql_server_init(int argc, char **argv, char **groups); -void STDCALL mysql_server_end(void); - -/* - mysql_server_init/end need to be called when using libmysqld or - libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so - you don't need to call it explicitely; but you need to call - mysql_server_end() to free memory). The names are a bit misleading - (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general - names which suit well whether you're using libmysqld or libmysqlclient. We - intend to promote these aliases over the mysql_server* ones. -*/ -#define mysql_library_init mysql_server_init -#define mysql_library_end mysql_server_end - -MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void); - -/* - Set up and bring down a thread; these function should be called - for each thread in an application which opens at least one MySQL - connection. All uses of the connection(s) should be between these - function calls. -*/ -my_bool STDCALL mysql_thread_init(void); -void STDCALL mysql_thread_end(void); - -/* - Functions to get information from the MYSQL and MYSQL_RES structures - Should definitely be used if one uses shared libraries. -*/ - -my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res); -unsigned int STDCALL mysql_num_fields(MYSQL_RES *res); -my_bool STDCALL mysql_eof(MYSQL_RES *res); -MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res, - unsigned int fieldnr); -MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res); -MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res); -MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res); - -unsigned int STDCALL mysql_field_count(MYSQL *mysql); -my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql); -my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql); -unsigned int STDCALL mysql_errno(MYSQL *mysql); -const char * STDCALL mysql_error(MYSQL *mysql); -const char *STDCALL mysql_sqlstate(MYSQL *mysql); -unsigned int STDCALL mysql_warning_count(MYSQL *mysql); -const char * STDCALL mysql_info(MYSQL *mysql); -unsigned long STDCALL mysql_thread_id(MYSQL *mysql); -const char * STDCALL mysql_character_set_name(MYSQL *mysql); -int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname); - -MYSQL * STDCALL mysql_init(MYSQL *mysql); -my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, - const char *cert, const char *ca, - const char *capath, const char *cipher); -const char * STDCALL mysql_get_ssl_cipher(MYSQL *mysql); -my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, - const char *passwd, const char *db); -MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host, - const char *user, - const char *passwd, - const char *db, - unsigned int port, - const char *unix_socket, - unsigned long clientflag); -int STDCALL mysql_select_db(MYSQL *mysql, const char *db); -int STDCALL mysql_query(MYSQL *mysql, const char *q); -int STDCALL mysql_send_query(MYSQL *mysql, const char *q, - unsigned long length); -int STDCALL mysql_real_query(MYSQL *mysql, const char *q, - unsigned long length); -MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql); -MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql); - -void STDCALL mysql_get_character_set_info(MYSQL *mysql, - MY_CHARSET_INFO *charset); - -/* local infile support */ - -#define LOCAL_INFILE_ERROR_LEN 512 - -void -mysql_set_local_infile_handler(MYSQL *mysql, - int (*local_infile_init)(void **, const char *, - void *), - int (*local_infile_read)(void *, char *, - unsigned int), - void (*local_infile_end)(void *), - int (*local_infile_error)(void *, char*, - unsigned int), - void *); - -void -mysql_set_local_infile_default(MYSQL *mysql); - -int STDCALL mysql_shutdown(MYSQL *mysql, - enum mysql_enum_shutdown_level - shutdown_level); -int STDCALL mysql_dump_debug_info(MYSQL *mysql); -int STDCALL mysql_refresh(MYSQL *mysql, - unsigned int refresh_options); -int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid); -int STDCALL mysql_set_server_option(MYSQL *mysql, - enum enum_mysql_set_option - option); -int STDCALL mysql_ping(MYSQL *mysql); -const char * STDCALL mysql_stat(MYSQL *mysql); -const char * STDCALL mysql_get_server_info(MYSQL *mysql); -const char * STDCALL mysql_get_client_info(void); -unsigned long STDCALL mysql_get_client_version(void); -const char * STDCALL mysql_get_host_info(MYSQL *mysql); -unsigned long STDCALL mysql_get_server_version(MYSQL *mysql); -unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql); -MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild); -MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild); -MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); -int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, - const void *arg); -void STDCALL mysql_free_result(MYSQL_RES *result); -void STDCALL mysql_data_seek(MYSQL_RES *result, - my_ulonglong offset); -MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, - MYSQL_ROW_OFFSET offset); -MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, - MYSQL_FIELD_OFFSET offset); -MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result); -unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result); -MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result); -MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table, - const char *wild); -unsigned long STDCALL mysql_escape_string(char *to,const char *from, - unsigned long from_length); -unsigned long STDCALL mysql_hex_string(char *to,const char *from, - unsigned long from_length); -unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, - char *to,const char *from, - unsigned long length); -void STDCALL mysql_debug(const char *debug); -void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name); -unsigned int STDCALL mysql_thread_safe(void); -my_bool STDCALL mysql_embedded(void); -my_bool STDCALL mysql_read_query_result(MYSQL *mysql); - - -/* - The following definitions are added for the enhanced - client-server protocol -*/ - -/* statement state */ -enum enum_mysql_stmt_state -{ - MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE, - MYSQL_STMT_FETCH_DONE -}; - - -/* - This structure is used to define bind information, and - internally by the client library. - Public members with their descriptions are listed below - (conventionally `On input' refers to the binds given to - mysql_stmt_bind_param, `On output' refers to the binds given - to mysql_stmt_bind_result): - - buffer_type - One of the MYSQL_* types, used to describe - the host language type of buffer. - On output: if column type is different from - buffer_type, column value is automatically converted - to buffer_type before it is stored in the buffer. - buffer - On input: points to the buffer with input data. - On output: points to the buffer capable to store - output data. - The type of memory pointed by buffer must correspond - to buffer_type. See the correspondence table in - the comment to mysql_stmt_bind_param. - - The two above members are mandatory for any kind of bind. - - buffer_length - the length of the buffer. You don't have to set - it for any fixed length buffer: float, double, - int, etc. It must be set however for variable-length - types, such as BLOBs or STRINGs. - - length - On input: in case when lengths of input values - are different for each execute, you can set this to - point at a variable containining value length. This - way the value length can be different in each execute. - If length is not NULL, buffer_length is not used. - Note, length can even point at buffer_length if - you keep bind structures around while fetching: - this way you can change buffer_length before - each execution, everything will work ok. - On output: if length is set, mysql_stmt_fetch will - write column length into it. - - is_null - On input: points to a boolean variable that should - be set to TRUE for NULL values. - This member is useful only if your data may be - NULL in some but not all cases. - If your data is never NULL, is_null should be set to 0. - If your data is always NULL, set buffer_type - to MYSQL_TYPE_NULL, and is_null will not be used. - - is_unsigned - On input: used to signify that values provided for one - of numeric types are unsigned. - On output describes signedness of the output buffer. - If, taking into account is_unsigned flag, column data - is out of range of the output buffer, data for this column - is regarded truncated. Note that this has no correspondence - to the sign of result set column, if you need to find it out - use mysql_stmt_result_metadata. - error - where to write a truncation error if it is present. - possible error value is: - 0 no truncation - 1 value is out of range or buffer is too small - - Please note that MYSQL_BIND also has internals members. -*/ - -typedef struct st_mysql_bind -{ - unsigned long *length; /* output length pointer */ - my_bool *is_null; /* Pointer to null indicator */ - void *buffer; /* buffer to get/put data */ - /* set this if you want to track data truncations happened during fetch */ - my_bool *error; - unsigned char *row_ptr; /* for the current data position */ - void (*store_param_func)(NET *net, struct st_mysql_bind *param); - void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, - unsigned char **row); - void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, - unsigned char **row); - /* output buffer length, must be set when fetching str/binary */ - unsigned long buffer_length; - unsigned long offset; /* offset position for char/binary fetch */ - unsigned long length_value; /* Used if length is 0 */ - unsigned int param_number; /* For null count and error messages */ - unsigned int pack_length; /* Internal length for packed data */ - enum enum_field_types buffer_type; /* buffer type */ - my_bool error_value; /* used if error is 0 */ - my_bool is_unsigned; /* set if integer type is unsigned */ - my_bool long_data_used; /* If used with mysql_send_long_data */ - my_bool is_null_value; /* Used if is_null is 0 */ - void *extension; -} MYSQL_BIND; - - -/* statement handler */ -typedef struct st_mysql_stmt -{ - MEM_ROOT mem_root; /* root allocations */ - LIST list; /* list to keep track of all stmts */ - MYSQL *mysql; /* connection handle */ - MYSQL_BIND *params; /* input parameters */ - MYSQL_BIND *bind; /* output parameters */ - MYSQL_FIELD *fields; /* result set metadata */ - MYSQL_DATA result; /* cached result set */ - MYSQL_ROWS *data_cursor; /* current row in cached result */ - /* - mysql_stmt_fetch() calls this function to fetch one row (it's different - for buffered, unbuffered and cursor fetch). - */ - int (*read_row_func)(struct st_mysql_stmt *stmt, - unsigned char **row); - /* copy of mysql->affected_rows after statement execution */ - my_ulonglong affected_rows; - my_ulonglong insert_id; /* copy of mysql->insert_id */ - unsigned long stmt_id; /* Id for prepared statement */ - unsigned long flags; /* i.e. type of cursor to open */ - unsigned long prefetch_rows; /* number of rows per one COM_FETCH */ - /* - Copied from mysql->server_status after execute/fetch to know - server-side cursor status for this statement. - */ - unsigned int server_status; - unsigned int last_errno; /* error code */ - unsigned int param_count; /* input parameter count */ - unsigned int field_count; /* number of columns in result set */ - enum enum_mysql_stmt_state state; /* statement state */ - char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ - char sqlstate[SQLSTATE_LENGTH+1]; - /* Types of input parameters should be sent to server */ - my_bool send_types_to_server; - my_bool bind_param_done; /* input buffers were supplied */ - unsigned char bind_result_done; /* output buffers were supplied */ - /* mysql_stmt_close() had to cancel this result */ - my_bool unbuffered_fetch_cancelled; - /* - Is set to true if we need to calculate field->max_length for - metadata fields when doing mysql_stmt_store_result. - */ - my_bool update_max_length; - void *extension; -} MYSQL_STMT; - -enum enum_stmt_attr_type -{ - /* - When doing mysql_stmt_store_result calculate max_length attribute - of statement metadata. This is to be consistent with the old API, - where this was done automatically. - In the new API we do that only by request because it slows down - mysql_stmt_store_result sufficiently. - */ - STMT_ATTR_UPDATE_MAX_LENGTH, - /* - unsigned long with combination of cursor flags (read only, for update, - etc) - */ - STMT_ATTR_CURSOR_TYPE, - /* - Amount of rows to retrieve from server per one fetch if using cursors. - Accepts unsigned long attribute in the range 1 - ulong_max - */ - STMT_ATTR_PREFETCH_ROWS -}; - - -typedef struct st_mysql_methods -{ - my_bool (*read_query_result)(MYSQL *mysql); - my_bool (*advanced_command)(MYSQL *mysql, - enum enum_server_command command, - const unsigned char *header, - unsigned long header_length, - const unsigned char *arg, - unsigned long arg_length, - my_bool skip_check, - MYSQL_STMT *stmt); - MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, - unsigned int fields); - MYSQL_RES * (*use_result)(MYSQL *mysql); - void (*fetch_lengths)(unsigned long *to, - MYSQL_ROW column, unsigned int field_count); - void (*flush_use_result)(MYSQL *mysql, my_bool flush_all_results); -#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) - MYSQL_FIELD * (*list_fields)(MYSQL *mysql); - my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt); - int (*stmt_execute)(MYSQL_STMT *stmt); - int (*read_binary_rows)(MYSQL_STMT *stmt); - int (*unbuffered_fetch)(MYSQL *mysql, char **row); - void (*free_embedded_thd)(MYSQL *mysql); - const char *(*read_statistics)(MYSQL *mysql); - my_bool (*next_result)(MYSQL *mysql); - int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd); - int (*read_rows_from_cursor)(MYSQL_STMT *stmt); -#endif -} MYSQL_METHODS; - - -MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql); -int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, - unsigned long length); -int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt); -int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt); -int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, - unsigned int column, - unsigned long offset); -int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt); -unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt); -my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, - enum enum_stmt_attr_type attr_type, - const void *attr); -my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, - enum enum_stmt_attr_type attr_type, - void *attr); -my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd); -my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd); -my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt); -my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt); -my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt); -my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, - unsigned int param_number, - const char *data, - unsigned long length); -MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt); -MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt); -unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt); -const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt); -const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt); -MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, - MYSQL_ROW_OFFSET offset); -MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt); -void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset); -my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt); -my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt); -my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt); -unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt); - -my_bool STDCALL mysql_commit(MYSQL * mysql); -my_bool STDCALL mysql_rollback(MYSQL * mysql); -my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode); -my_bool STDCALL mysql_more_results(MYSQL *mysql); -int STDCALL mysql_next_result(MYSQL *mysql); -int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt); -void STDCALL mysql_close(MYSQL *sock); - - -/* status return codes */ -#define MYSQL_NO_DATA 100 -#define MYSQL_DATA_TRUNCATED 101 - -#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) - -#ifdef USE_OLD_FUNCTIONS -MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host, - const char *user, const char *passwd); -int STDCALL mysql_create_db(MYSQL *mysql, const char *DB); -int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); -#endif -#define HAVE_MYSQL_REAL_CONNECT - -/* - The following functions are mainly exported because of mysqlbinlog; - They are not for general usage -*/ - -#define simple_command(mysql, command, arg, length, skip_check) \ - (*(mysql)->methods->advanced_command)(mysql, command, 0, \ - 0, arg, length, skip_check, NULL) -#define stmt_command(mysql, command, arg, length, stmt) \ - (*(mysql)->methods->advanced_command)(mysql, command, 0, \ - 0, arg, length, 1, stmt) - -#ifdef __NETWARE__ -#pragma pack(pop) /* restore alignment */ -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _mysql_h */ diff --git a/externals/mysql/mysql_com.h b/externals/mysql/mysql_com.h deleted file mode 100644 index 8b16fd2672..0000000000 --- a/externals/mysql/mysql_com.h +++ /dev/null @@ -1,543 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* -** Common definition between mysql server & client -*/ - -#ifndef _mysql_com_h -#define _mysql_com_h - -#define HOSTNAME_LENGTH 60 -#define SYSTEM_CHARSET_MBMAXLEN 4 -#define NAME_CHAR_LEN 64 /* Field/table name length */ -#define USERNAME_CHAR_LENGTH 16 -#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) -#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN) - -#define SERVER_VERSION_LENGTH 60 -#define SQLSTATE_LENGTH 5 - -/* - Maximum length of comments -*/ -#define TABLE_COMMENT_INLINE_MAXLEN 180 /* pre 6.0: 60 (3-byte) characters */ -#define TABLE_COMMENT_MAXLEN 2048 -#define COLUMN_COMMENT_MAXLEN 1024 -#define INDEX_COMMENT_MAXLEN 1024 - - -/* - USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain - username and hostname parts of the user identifier with trailing zero in - MySQL standard format: - user_name_part@host_name_part\0 -*/ -#define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2 - -#define LOCAL_HOST "localhost" -#define LOCAL_HOST_NAMEDPIPE "." - - -#if defined(__WIN__) && !defined( _CUSTOMCONFIG_) -#define MYSQL_NAMEDPIPE "MySQL" -#define MYSQL_SERVICENAME "MySQL" -#endif /* __WIN__ */ - -/* - You should add new commands to the end of this list, otherwise old - servers won't be able to handle them as 'unsupported'. -*/ - -enum enum_server_command -{ - COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, - COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, - COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING, - COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP, - COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE, - COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE, - COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON, - /* don't forget to update const char *command_name[] in sql_parse.cc */ - - /* Must be last */ - COM_END -}; - - -/* - Length of random string sent by server on handshake; this is also length of - obfuscated password, recieved from client -*/ -#define SCRAMBLE_LENGTH 20 -#define SCRAMBLE_LENGTH_323 8 -/* length of password stored in the db: new passwords are preceeded with '*' */ -#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1) -#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2) - - -#define NOT_NULL_FLAG 1 /* Field can't be NULL */ -#define PRI_KEY_FLAG 2 /* Field is part of a primary key */ -#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */ -#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */ -#define BLOB_FLAG 16 /* Field is a blob */ -#define UNSIGNED_FLAG 32 /* Field is unsigned */ -#define ZEROFILL_FLAG 64 /* Field is zerofill */ -#define BINARY_FLAG 128 /* Field is binary */ - -/* The following are only sent to new clients */ -#define ENUM_FLAG 256 /* field is an enum */ -#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */ -#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */ -#define SET_FLAG 2048 /* field is a set */ -#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */ -#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */ -#define NUM_FLAG 32768 /* Field is num (for clients) */ -#define PART_KEY_FLAG 16384 /* Intern; Part of some key */ -#define GROUP_FLAG 32768 /* Intern: Group field */ -#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */ -#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */ -#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */ -#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */ -#define FIELD_IN_ADD_INDEX (1<< 20) /* Intern: Field used in ADD INDEX */ -#define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed */ -#define FIELD_STORAGE_FLAGS 22 /* Storage type: bit 22, 23 and 24 */ -#define COLUMN_FORMAT_FLAGS 25 /* Column format: bit 25, 26 and 27 */ - -#define REFRESH_GRANT 1 /* Refresh grant tables */ -#define REFRESH_LOG 2 /* Start on new log file */ -#define REFRESH_TABLES 4 /* close all tables */ -#define REFRESH_HOSTS 8 /* Flush host cache */ -#define REFRESH_STATUS 16 /* Flush status variables */ -#define REFRESH_THREADS 32 /* Flush thread cache */ -#define REFRESH_SLAVE 64 /* Reset master info and restart slave - thread */ -#define REFRESH_MASTER 128 /* Remove all bin logs in the index - and truncate the index */ - -/* The following can't be set with mysql_refresh() */ -#define REFRESH_READ_LOCK 16384 /* Lock tables for read */ -#define REFRESH_FAST 32768 /* Intern flag */ - -/* RESET (remove all queries) from query cache */ -#define REFRESH_QUERY_CACHE 65536 -#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */ -#define REFRESH_DES_KEY_FILE 0x40000L -#define REFRESH_USER_RESOURCES 0x80000L -#define REFRESH_BACKUP_LOG 0x200000L - -#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */ -#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */ -#define CLIENT_LONG_FLAG 4 /* Get all column flags */ -#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */ -#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */ -#define CLIENT_COMPRESS 32 /* Can use compression protocol */ -#define CLIENT_ODBC 64 /* Odbc client */ -#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */ -#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */ -#define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */ -#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */ -#define CLIENT_SSL 2048 /* Switch to SSL after handshake */ -#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */ -#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */ -#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */ -#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */ -#define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */ -#define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */ -#define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */ - -#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) -#define CLIENT_REMEMBER_OPTIONS (1UL << 31) - -/* Gather all possible capabilites (flags) supported by the server */ -#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \ - CLIENT_FOUND_ROWS | \ - CLIENT_LONG_FLAG | \ - CLIENT_CONNECT_WITH_DB | \ - CLIENT_NO_SCHEMA | \ - CLIENT_COMPRESS | \ - CLIENT_ODBC | \ - CLIENT_LOCAL_FILES | \ - CLIENT_IGNORE_SPACE | \ - CLIENT_PROTOCOL_41 | \ - CLIENT_INTERACTIVE | \ - CLIENT_SSL | \ - CLIENT_IGNORE_SIGPIPE | \ - CLIENT_TRANSACTIONS | \ - CLIENT_RESERVED | \ - CLIENT_SECURE_CONNECTION | \ - CLIENT_MULTI_STATEMENTS | \ - CLIENT_MULTI_RESULTS | \ - CLIENT_PS_MULTI_RESULTS | \ - CLIENT_SSL_VERIFY_SERVER_CERT | \ - CLIENT_REMEMBER_OPTIONS) - -/* - Switch off the flags that are optional and depending on build flags - If any of the optional flags is supported by the build it will be switched - on before sending to the client during the connection handshake. -*/ -#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \ - & ~CLIENT_COMPRESS) \ - & ~CLIENT_SSL_VERIFY_SERVER_CERT) - -#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ -#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ -#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ -#define SERVER_QUERY_NO_GOOD_INDEX_USED 16 -#define SERVER_QUERY_NO_INDEX_USED 32 -/** - The server was able to fulfill the clients request and opened a - read-only non-scrollable cursor for a query. This flag comes - in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. -*/ -#define SERVER_STATUS_CURSOR_EXISTS 64 -/** - This flag is sent when a read-only cursor is exhausted, in reply to - COM_STMT_FETCH command. -*/ -#define SERVER_STATUS_LAST_ROW_SENT 128 -#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ -#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512 -/** - Sent to the client if after a prepared statement reprepare - we discovered that the new statement returns a different - number of result set columns. -*/ -#define SERVER_STATUS_METADATA_CHANGED 1024 -/* - Tell clients that this query was logged to the slow query log. - Not yet set in the server, but interface is defined for applications - to use. See WorkLog 4098. -*/ -#define SERVER_QUERY_WAS_SLOW 2048 - -/** - To mark ResultSet containing output parameter values. -*/ -#define SERVER_PS_OUT_PARAMS 4096 - -/** - Server status flags that must be cleared when starting - execution of a new SQL statement. - Flags from this set are only added to the - current server status by the execution engine, but - never removed -- the execution engine expects them - to disappear automagically by the next command. -*/ -#define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \ - SERVER_QUERY_NO_INDEX_USED|\ - SERVER_MORE_RESULTS_EXISTS|\ - SERVER_STATUS_METADATA_CHANGED) - -#define MYSQL_ERRMSG_SIZE 512 -#define NET_READ_TIMEOUT 30 /* Timeout on read */ -#define NET_WRITE_TIMEOUT 60 /* Timeout on write */ -#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */ - -#define ONLY_KILL_QUERY 1 - - -struct st_vio; /* Only C */ -typedef struct st_vio Vio; - -#define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign */ -#define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign */ -#define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign */ -#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */ -#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */ -#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */ -#define MAX_BLOB_WIDTH 16777216 /* Default width for blob */ - -typedef struct st_net { -#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY) - Vio *vio; - unsigned char *buff,*buff_end,*write_pos,*read_pos; - my_socket fd; /* For Perl DBI/dbd */ - /* - The following variable is set if we are doing several queries in one - command ( as in LOAD TABLE ... FROM MASTER ), - and do not want to confuse the client with OK at the wrong time - */ - unsigned long remain_in_buf,length, buf_length, where_b; - unsigned long max_packet,max_packet_size; - unsigned int pkt_nr,compress_pkt_nr; - unsigned int write_timeout, read_timeout, retry_count; - int fcntl; - unsigned int *return_status; - unsigned char reading_or_writing; - char save_char; - my_bool unused1; /* Please remove with the next incompatible ABI change. */ - my_bool unused2; /* Please remove with the next incompatible ABI change */ - my_bool compress; - my_bool unused3; /* Please remove with the next incompatible ABI change. */ - /* - Pointer to query object in query cache, do not equal NULL (0) for - queries in cache that have not stored its results yet - */ -#endif - /* - Unused, please remove with the next incompatible ABI change. - */ - unsigned char *unused; - unsigned int last_errno; - unsigned char error; - my_bool unused4; /* Please remove with the next incompatible ABI change. */ - my_bool unused5; /* Please remove with the next incompatible ABI change. */ - /** Client library error message buffer. Actually belongs to struct MYSQL. */ - char last_error[MYSQL_ERRMSG_SIZE]; - /** Client library sqlstate buffer. Set along with the error message. */ - char sqlstate[SQLSTATE_LENGTH+1]; - void *extension; -} NET; - - -#define packet_error (~(unsigned long) 0) - -enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, - MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, - MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, - MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP, - MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24, - MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, - MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR, - MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR, - MYSQL_TYPE_BIT, - MYSQL_TYPE_NEWDECIMAL=246, - MYSQL_TYPE_ENUM=247, - MYSQL_TYPE_SET=248, - MYSQL_TYPE_TINY_BLOB=249, - MYSQL_TYPE_MEDIUM_BLOB=250, - MYSQL_TYPE_LONG_BLOB=251, - MYSQL_TYPE_BLOB=252, - MYSQL_TYPE_VAR_STRING=253, - MYSQL_TYPE_STRING=254, - MYSQL_TYPE_GEOMETRY=255, - MAX_NO_FIELD_TYPES /* Should always be last */ -}; - -/* For backward compatibility */ -#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS -#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL -#define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL -#define FIELD_TYPE_TINY MYSQL_TYPE_TINY -#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT -#define FIELD_TYPE_LONG MYSQL_TYPE_LONG -#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT -#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE -#define FIELD_TYPE_NULL MYSQL_TYPE_NULL -#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP -#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG -#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24 -#define FIELD_TYPE_DATE MYSQL_TYPE_DATE -#define FIELD_TYPE_TIME MYSQL_TYPE_TIME -#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME -#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR -#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE -#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM -#define FIELD_TYPE_SET MYSQL_TYPE_SET -#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB -#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB -#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB -#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB -#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING -#define FIELD_TYPE_STRING MYSQL_TYPE_STRING -#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY -#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM -#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY -#define FIELD_TYPE_BIT MYSQL_TYPE_BIT - - -/* Shutdown/kill enums and constants */ - -/* Bits for THD::killable. */ -#define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) -#define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) -#define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) -#define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) - -enum mysql_enum_shutdown_level { - /* - We want levels to be in growing order of hardness (because we use number - comparisons). Note that DEFAULT does not respect the growing property, but - it's ok. - */ - SHUTDOWN_DEFAULT = 0, - /* wait for existing connections to finish */ - SHUTDOWN_WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT, - /* wait for existing trans to finish */ - SHUTDOWN_WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS, - /* wait for existing updates to finish (=> no partial MyISAM update) */ - SHUTDOWN_WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE, - /* flush InnoDB buffers and other storage engines' buffers*/ - SHUTDOWN_WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1), - /* don't flush InnoDB buffers, flush other storage engines' buffers*/ - SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1, - /* Now the 2 levels of the KILL command */ -#if MYSQL_VERSION_ID >= 50000 - KILL_QUERY= 254, -#endif - KILL_CONNECTION= 255 -}; - - -enum enum_cursor_type -{ - CURSOR_TYPE_NO_CURSOR= 0, - CURSOR_TYPE_READ_ONLY= 1, - CURSOR_TYPE_FOR_UPDATE= 2, - CURSOR_TYPE_SCROLLABLE= 4 -}; - - -/* options for mysql_set_option */ -enum enum_mysql_set_option -{ - MYSQL_OPTION_MULTI_STATEMENTS_ON, - MYSQL_OPTION_MULTI_STATEMENTS_OFF -}; - -#define net_new_transaction(net) ((net)->pkt_nr=0) - -#ifdef __cplusplus -extern "C" { -#endif - -my_bool my_net_init(NET *net, Vio* vio); -void my_net_local_init(NET *net); -void net_end(NET *net); - void net_clear(NET *net, my_bool clear_buffer); -my_bool net_realloc(NET *net, size_t length); -my_bool net_flush(NET *net); -my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); -my_bool net_write_command(NET *net,unsigned char command, - const unsigned char *header, size_t head_len, - const unsigned char *packet, size_t len); -int net_real_write(NET *net,const unsigned char *packet, size_t len); -unsigned long my_net_read(NET *net); - -#ifdef _global_h -void my_net_set_write_timeout(NET *net, uint timeout); -void my_net_set_read_timeout(NET *net, uint timeout); -#endif - -struct sockaddr; -int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen, - unsigned int timeout); -struct my_rnd_struct; - -#ifdef __cplusplus -} -#endif - - /* The following is for user defined functions */ - -enum Item_result -{ - STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT, DECIMAL_RESULT -#ifdef MYSQL_SERVER - ,IMPOSSIBLE_RESULT /* Yes, we know this is ugly, don't tell us */ - ,MAX_NO_ITEM_RESULTS = IMPOSSIBLE_RESULT /* Should always be last */ -#endif -}; - -typedef struct st_udf_args -{ - unsigned int arg_count; /* Number of arguments */ - enum Item_result *arg_type; /* Pointer to item_results */ - char **args; /* Pointer to argument */ - unsigned long *lengths; /* Length of string arguments */ - char *maybe_null; /* Set to 1 for all maybe_null args */ - char **attributes; /* Pointer to attribute name */ - unsigned long *attribute_lengths; /* Length of attribute arguments */ - void *extension; -} UDF_ARGS; - - /* This holds information about the result */ - -typedef struct st_udf_init -{ - my_bool maybe_null; /* 1 if function can return NULL */ - unsigned int decimals; /* for real functions */ - unsigned long max_length; /* For string functions */ - char *ptr; /* free pointer for function data */ - my_bool const_item; /* 1 if function always returns the same value */ - void *extension; -} UDF_INIT; -/* - TODO: add a notion for determinism of the UDF. - See Item_udf_func::update_used_tables () -*/ - - /* Constants when using compression */ -#define NET_HEADER_SIZE 4 /* standard header size */ -#define COMP_HEADER_SIZE 3 /* compression header extra size */ - - /* Prototypes to password functions */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - These functions are used for authentication by client and server and - implemented in sql/password.c -*/ - -void create_random_string(char *to, unsigned int length, - struct my_rnd_struct *rand_st); - -void hash_password(unsigned long *to, const char *password, unsigned int password_len); -void make_scrambled_password_323(char *to, const char *password); -void scramble_323(char *to, const char *message, const char *password); -my_bool check_scramble_323(const char *, const char *message, - unsigned long *salt); -void get_salt_from_password_323(unsigned long *res, const char *password); -void make_password_from_salt_323(char *to, const unsigned long *salt); - -void make_scrambled_password(char *to, const char *password); -void scramble(char *to, const char *message, const char *password); -my_bool check_scramble(const char *reply, const char *message, - const unsigned char *hash_stage2); -void get_salt_from_password(unsigned char *res, const char *password); -void make_password_from_salt(char *to, const unsigned char *hash_stage2); -char *octet2hex(char *to, const char *str, unsigned int len); - -/* end of password.c */ - -char *get_tty_password(const char *opt_message); -const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); - -/* Some other useful functions */ - -my_bool my_thread_init(void); -void my_thread_end(void); - -#ifdef _global_h -ulong STDCALL net_field_length(uchar **packet); -my_ulonglong net_field_length_ll(uchar **packet); -uchar *net_store_length(uchar *pkg, ulonglong length); -#endif - -#ifdef __cplusplus -} -#endif - -#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */ -#define MYSQL_STMT_HEADER 4 -#define MYSQL_LONG_DATA_HEADER 6 - -#define NOT_FIXED_DEC 31 -#endif diff --git a/externals/mysql/mysql_config/mysql_config.c b/externals/mysql/mysql_config/mysql_config.c deleted file mode 100644 index d930868d39..0000000000 --- a/externals/mysql/mysql_config/mysql_config.c +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (C) 2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include - -#define INCLUDE "-IC:/Program Files/libmysql/include" -#define LIBS "-LC:/Program Files/libmysql/lib -lmysql" \ - "" -#define CFLAGS INCLUDE -#define VERSION "6.0.2" - -enum options_client -{ - OPT_CFLAGS= 256, - OPT_INCLUDE, - OPT_LIBS, - OPT_LIBS_R, - OPT_VERSION, -}; - -static struct my_option my_long_options[]= -{ - {"cflags", OPT_CFLAGS, "[" CFLAGS "]", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, - NO_ARG, 0, 0, 0, 0, 0, 0}, - {"include", OPT_INCLUDE, "[" INCLUDE "]", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"libs", OPT_LIBS, "[" LIBS "]", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"libs_r", OPT_LIBS_R, "[" LIBS "]", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"version", OPT_VERSION, "[" VERSION "]", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} -}; - - -void usage(void) -{ - puts("Copyright 2009 Sun Microsystems, Inc."); - puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); - puts("Get compiler flags for using the MySQL client library."); - printf("Usage: %s [OPTIONS]\n", my_progname); - my_print_help(my_long_options); -} - - -my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument) -{ - switch (optid) { - case OPT_CFLAGS: - puts(CFLAGS); - break; - case OPT_INCLUDE: - puts(INCLUDE); - break; - case OPT_LIBS: - case OPT_LIBS_R: - puts(LIBS); - break; - case OPT_VERSION: - puts(VERSION); - break; - } - - return 0; -} - - -int main(int ac, char **av) -{ - int error; - my_progname= av[0]; - - if (ac <= 1) - { - usage(); - exit(1); - } - - if ((error= handle_options(&ac, &av, my_long_options, get_one_option))) - exit(error); - - exit(0); -} diff --git a/externals/mysql/mysql_time.h b/externals/mysql/mysql_time.h deleted file mode 100644 index 0a3f17a81f..0000000000 --- a/externals/mysql/mysql_time.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _mysql_time_h_ -#define _mysql_time_h_ - -/* - Time declarations shared between the server and client API: - you should not add anything to this header unless it's used - (and hence should be visible) in mysql.h. - If you're looking for a place to add new time-related declaration, - it's most likely my_time.h. See also "C API Handling of Date - and Time Values" chapter in documentation. -*/ - -enum enum_mysql_timestamp_type -{ - MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1, - MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2 -}; - - -/* - Structure which is used to represent datetime values inside MySQL. - - We assume that values in this structure are normalized, i.e. year <= 9999, - month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions - in server such as my_system_gmt_sec() or make_time() family of functions - rely on this (actually now usage of make_*() family relies on a bit weaker - restriction). Also functions that produce MYSQL_TIME as result ensure this. - There is one exception to this rule though if this structure holds time - value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold - bigger values. -*/ -typedef struct st_mysql_time -{ - unsigned int year, month, day, hour, minute, second; - unsigned long second_part; - my_bool neg; - enum enum_mysql_timestamp_type time_type; -} MYSQL_TIME; - -#endif /* _mysql_time_h_ */ diff --git a/externals/mysql/mysql_version.h b/externals/mysql/mysql_version.h deleted file mode 100644 index 3f052b8dda..0000000000 --- a/externals/mysql/mysql_version.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright Abandoned 1996, 1999, 2001 MySQL AB - This file is public domain and comes with NO WARRANTY of any kind */ - -/* Version numbers for protocol & mysqld */ - -#ifndef _mysql_version_h -#define _mysql_version_h - -#ifdef _CUSTOMCONFIG_ -# include -#else -# define PROTOCOL_VERSION 10 -# define MYSQL_SERVER_VERSION "6.0.0" -# define MYSQL_VERSION_ID 60000 -# define MYSQL_PORT 3306 -# define MYSQL_PORT_DEFAULT 0 -# define MYSQL_UNIX_ADDR "/tmp/mysql.sock" -# define MYSQL_CONFIG_NAME "my" -# define MYSQL_COMPILATION_COMMENT "Source distribution" -#endif /* _CUSTOMCONFIG_ */ - -#ifndef LICENSE -# define LICENSE GPL -#endif /* LICENSE */ - -#endif /* _mysql_version_h */ diff --git a/externals/mysql/mysqld_error.h b/externals/mysql/mysqld_error.h deleted file mode 100644 index 653e583e0f..0000000000 --- a/externals/mysql/mysqld_error.h +++ /dev/null @@ -1,730 +0,0 @@ -/* Autogenerated file, please don't edit */ - -#define ER_ERROR_FIRST 1000 -#define ER_HASHCHK 1000 -#define ER_NISAMCHK 1001 -#define ER_NO 1002 -#define ER_YES 1003 -#define ER_CANT_CREATE_FILE 1004 -#define ER_CANT_CREATE_TABLE 1005 -#define ER_CANT_CREATE_DB 1006 -#define ER_DB_CREATE_EXISTS 1007 -#define ER_DB_DROP_EXISTS 1008 -#define ER_DB_DROP_DELETE 1009 -#define ER_DB_DROP_RMDIR 1010 -#define ER_CANT_DELETE_FILE 1011 -#define ER_CANT_FIND_SYSTEM_REC 1012 -#define ER_CANT_GET_STAT 1013 -#define ER_CANT_GET_WD 1014 -#define ER_CANT_LOCK 1015 -#define ER_CANT_OPEN_FILE 1016 -#define ER_FILE_NOT_FOUND 1017 -#define ER_CANT_READ_DIR 1018 -#define ER_CANT_SET_WD 1019 -#define ER_CHECKREAD 1020 -#define ER_DISK_FULL 1021 -#define ER_DUP_KEY 1022 -#define ER_ERROR_ON_CLOSE 1023 -#define ER_ERROR_ON_READ 1024 -#define ER_ERROR_ON_RENAME 1025 -#define ER_ERROR_ON_WRITE 1026 -#define ER_FILE_USED 1027 -#define ER_FILSORT_ABORT 1028 -#define ER_FORM_NOT_FOUND 1029 -#define ER_GET_ERRNO 1030 -#define ER_ILLEGAL_HA 1031 -#define ER_KEY_NOT_FOUND 1032 -#define ER_NOT_FORM_FILE 1033 -#define ER_NOT_KEYFILE 1034 -#define ER_OLD_KEYFILE 1035 -#define ER_OPEN_AS_READONLY 1036 -#define ER_OUTOFMEMORY 1037 -#define ER_OUT_OF_SORTMEMORY 1038 -#define ER_UNEXPECTED_EOF 1039 -#define ER_CON_COUNT_ERROR 1040 -#define ER_OUT_OF_RESOURCES 1041 -#define ER_BAD_HOST_ERROR 1042 -#define ER_HANDSHAKE_ERROR 1043 -#define ER_DBACCESS_DENIED_ERROR 1044 -#define ER_ACCESS_DENIED_ERROR 1045 -#define ER_NO_DB_ERROR 1046 -#define ER_UNKNOWN_COM_ERROR 1047 -#define ER_BAD_NULL_ERROR 1048 -#define ER_BAD_DB_ERROR 1049 -#define ER_TABLE_EXISTS_ERROR 1050 -#define ER_BAD_TABLE_ERROR 1051 -#define ER_NON_UNIQ_ERROR 1052 -#define ER_SERVER_SHUTDOWN 1053 -#define ER_BAD_FIELD_ERROR 1054 -#define ER_WRONG_FIELD_WITH_GROUP 1055 -#define ER_WRONG_GROUP_FIELD 1056 -#define ER_WRONG_SUM_SELECT 1057 -#define ER_WRONG_VALUE_COUNT 1058 -#define ER_TOO_LONG_IDENT 1059 -#define ER_DUP_FIELDNAME 1060 -#define ER_DUP_KEYNAME 1061 -#define ER_DUP_ENTRY 1062 -#define ER_WRONG_FIELD_SPEC 1063 -#define ER_PARSE_ERROR 1064 -#define ER_EMPTY_QUERY 1065 -#define ER_NONUNIQ_TABLE 1066 -#define ER_INVALID_DEFAULT 1067 -#define ER_MULTIPLE_PRI_KEY 1068 -#define ER_TOO_MANY_KEYS 1069 -#define ER_TOO_MANY_KEY_PARTS 1070 -#define ER_TOO_LONG_KEY 1071 -#define ER_KEY_COLUMN_DOES_NOT_EXITS 1072 -#define ER_BLOB_USED_AS_KEY 1073 -#define ER_TOO_BIG_FIELDLENGTH 1074 -#define ER_WRONG_AUTO_KEY 1075 -#define ER_READY 1076 -#define ER_NORMAL_SHUTDOWN 1077 -#define ER_GOT_SIGNAL 1078 -#define ER_SHUTDOWN_COMPLETE 1079 -#define ER_FORCING_CLOSE 1080 -#define ER_IPSOCK_ERROR 1081 -#define ER_NO_SUCH_INDEX 1082 -#define ER_WRONG_FIELD_TERMINATORS 1083 -#define ER_BLOBS_AND_NO_TERMINATED 1084 -#define ER_TEXTFILE_NOT_READABLE 1085 -#define ER_FILE_EXISTS_ERROR 1086 -#define ER_LOAD_INFO 1087 -#define ER_ALTER_INFO 1088 -#define ER_WRONG_SUB_KEY 1089 -#define ER_CANT_REMOVE_ALL_FIELDS 1090 -#define ER_CANT_DROP_FIELD_OR_KEY 1091 -#define ER_INSERT_INFO 1092 -#define ER_UPDATE_TABLE_USED 1093 -#define ER_NO_SUCH_THREAD 1094 -#define ER_KILL_DENIED_ERROR 1095 -#define ER_NO_TABLES_USED 1096 -#define ER_TOO_BIG_SET 1097 -#define ER_NO_UNIQUE_LOGFILE 1098 -#define ER_TABLE_NOT_LOCKED_FOR_WRITE 1099 -#define ER_TABLE_NOT_LOCKED 1100 -#define ER_BLOB_CANT_HAVE_DEFAULT 1101 -#define ER_WRONG_DB_NAME 1102 -#define ER_WRONG_TABLE_NAME 1103 -#define ER_TOO_BIG_SELECT 1104 -#define ER_UNKNOWN_ERROR 1105 -#define ER_UNKNOWN_PROCEDURE 1106 -#define ER_WRONG_PARAMCOUNT_TO_PROCEDURE 1107 -#define ER_WRONG_PARAMETERS_TO_PROCEDURE 1108 -#define ER_UNKNOWN_TABLE 1109 -#define ER_FIELD_SPECIFIED_TWICE 1110 -#define ER_INVALID_GROUP_FUNC_USE 1111 -#define ER_UNSUPPORTED_EXTENSION 1112 -#define ER_TABLE_MUST_HAVE_COLUMNS 1113 -#define ER_RECORD_FILE_FULL 1114 -#define ER_UNKNOWN_CHARACTER_SET 1115 -#define ER_TOO_MANY_TABLES 1116 -#define ER_TOO_MANY_FIELDS 1117 -#define ER_TOO_BIG_ROWSIZE 1118 -#define ER_STACK_OVERRUN 1119 -#define ER_WRONG_OUTER_JOIN 1120 -#define ER_NULL_COLUMN_IN_INDEX 1121 -#define ER_CANT_FIND_UDF 1122 -#define ER_CANT_INITIALIZE_UDF 1123 -#define ER_UDF_NO_PATHS 1124 -#define ER_UDF_EXISTS 1125 -#define ER_CANT_OPEN_LIBRARY 1126 -#define ER_CANT_FIND_DL_ENTRY 1127 -#define ER_FUNCTION_NOT_DEFINED 1128 -#define ER_HOST_IS_BLOCKED 1129 -#define ER_HOST_NOT_PRIVILEGED 1130 -#define ER_PASSWORD_ANONYMOUS_USER 1131 -#define ER_PASSWORD_NOT_ALLOWED 1132 -#define ER_PASSWORD_NO_MATCH 1133 -#define ER_UPDATE_INFO 1134 -#define ER_CANT_CREATE_THREAD 1135 -#define ER_WRONG_VALUE_COUNT_ON_ROW 1136 -#define ER_CANT_REOPEN_TABLE 1137 -#define ER_INVALID_USE_OF_NULL 1138 -#define ER_REGEXP_ERROR 1139 -#define ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140 -#define ER_NONEXISTING_GRANT 1141 -#define ER_TABLEACCESS_DENIED_ERROR 1142 -#define ER_COLUMNACCESS_DENIED_ERROR 1143 -#define ER_ILLEGAL_GRANT_FOR_TABLE 1144 -#define ER_GRANT_WRONG_HOST_OR_USER 1145 -#define ER_NO_SUCH_TABLE 1146 -#define ER_NONEXISTING_TABLE_GRANT 1147 -#define ER_NOT_ALLOWED_COMMAND 1148 -#define ER_SYNTAX_ERROR 1149 -#define ER_DELAYED_CANT_CHANGE_LOCK 1150 -#define ER_TOO_MANY_DELAYED_THREADS 1151 -#define ER_ABORTING_CONNECTION 1152 -#define ER_NET_PACKET_TOO_LARGE 1153 -#define ER_NET_READ_ERROR_FROM_PIPE 1154 -#define ER_NET_FCNTL_ERROR 1155 -#define ER_NET_PACKETS_OUT_OF_ORDER 1156 -#define ER_NET_UNCOMPRESS_ERROR 1157 -#define ER_NET_READ_ERROR 1158 -#define ER_NET_READ_INTERRUPTED 1159 -#define ER_NET_ERROR_ON_WRITE 1160 -#define ER_NET_WRITE_INTERRUPTED 1161 -#define ER_TOO_LONG_STRING 1162 -#define ER_TABLE_CANT_HANDLE_BLOB 1163 -#define ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164 -#define ER_DELAYED_INSERT_TABLE_LOCKED 1165 -#define ER_WRONG_COLUMN_NAME 1166 -#define ER_WRONG_KEY_COLUMN 1167 -#define ER_WRONG_MRG_TABLE 1168 -#define ER_DUP_UNIQUE 1169 -#define ER_BLOB_KEY_WITHOUT_LENGTH 1170 -#define ER_PRIMARY_CANT_HAVE_NULL 1171 -#define ER_TOO_MANY_ROWS 1172 -#define ER_REQUIRES_PRIMARY_KEY 1173 -#define ER_NO_RAID_COMPILED 1174 -#define ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175 -#define ER_KEY_DOES_NOT_EXITS 1176 -#define ER_CHECK_NO_SUCH_TABLE 1177 -#define ER_CHECK_NOT_IMPLEMENTED 1178 -#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179 -#define ER_ERROR_DURING_COMMIT 1180 -#define ER_ERROR_DURING_ROLLBACK 1181 -#define ER_ERROR_DURING_FLUSH_LOGS 1182 -#define ER_ERROR_DURING_CHECKPOINT 1183 -#define ER_NEW_ABORTING_CONNECTION 1184 -#define ER_DUMP_NOT_IMPLEMENTED 1185 -#define ER_FLUSH_MASTER_BINLOG_CLOSED 1186 -#define ER_INDEX_REBUILD 1187 -#define ER_MASTER 1188 -#define ER_MASTER_NET_READ 1189 -#define ER_MASTER_NET_WRITE 1190 -#define ER_FT_MATCHING_KEY_NOT_FOUND 1191 -#define ER_LOCK_OR_ACTIVE_TRANSACTION 1192 -#define ER_UNKNOWN_SYSTEM_VARIABLE 1193 -#define ER_CRASHED_ON_USAGE 1194 -#define ER_CRASHED_ON_REPAIR 1195 -#define ER_WARNING_NOT_COMPLETE_ROLLBACK 1196 -#define ER_TRANS_CACHE_FULL 1197 -#define ER_SLAVE_MUST_STOP 1198 -#define ER_SLAVE_NOT_RUNNING 1199 -#define ER_BAD_SLAVE 1200 -#define ER_MASTER_INFO 1201 -#define ER_SLAVE_THREAD 1202 -#define ER_TOO_MANY_USER_CONNECTIONS 1203 -#define ER_SET_CONSTANTS_ONLY 1204 -#define ER_LOCK_WAIT_TIMEOUT 1205 -#define ER_LOCK_TABLE_FULL 1206 -#define ER_READ_ONLY_TRANSACTION 1207 -#define ER_DROP_DB_WITH_READ_LOCK 1208 -#define ER_CREATE_DB_WITH_READ_LOCK 1209 -#define ER_WRONG_ARGUMENTS 1210 -#define ER_NO_PERMISSION_TO_CREATE_USER 1211 -#define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212 -#define ER_LOCK_DEADLOCK 1213 -#define ER_TABLE_CANT_HANDLE_FT 1214 -#define ER_CANNOT_ADD_FOREIGN 1215 -#define ER_NO_REFERENCED_ROW 1216 -#define ER_ROW_IS_REFERENCED 1217 -#define ER_CONNECT_TO_MASTER 1218 -#define ER_QUERY_ON_MASTER 1219 -#define ER_ERROR_WHEN_EXECUTING_COMMAND 1220 -#define ER_WRONG_USAGE 1221 -#define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1222 -#define ER_CANT_UPDATE_WITH_READLOCK 1223 -#define ER_MIXING_NOT_ALLOWED 1224 -#define ER_DUP_ARGUMENT 1225 -#define ER_USER_LIMIT_REACHED 1226 -#define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227 -#define ER_LOCAL_VARIABLE 1228 -#define ER_GLOBAL_VARIABLE 1229 -#define ER_NO_DEFAULT 1230 -#define ER_WRONG_VALUE_FOR_VAR 1231 -#define ER_WRONG_TYPE_FOR_VAR 1232 -#define ER_VAR_CANT_BE_READ 1233 -#define ER_CANT_USE_OPTION_HERE 1234 -#define ER_NOT_SUPPORTED_YET 1235 -#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236 -#define ER_SLAVE_IGNORED_TABLE 1237 -#define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238 -#define ER_WRONG_FK_DEF 1239 -#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240 -#define ER_OPERAND_COLUMNS 1241 -#define ER_SUBQUERY_NO_1_ROW 1242 -#define ER_UNKNOWN_STMT_HANDLER 1243 -#define ER_CORRUPT_HELP_DB 1244 -#define ER_CYCLIC_REFERENCE 1245 -#define ER_AUTO_CONVERT 1246 -#define ER_ILLEGAL_REFERENCE 1247 -#define ER_DERIVED_MUST_HAVE_ALIAS 1248 -#define ER_SELECT_REDUCED 1249 -#define ER_TABLENAME_NOT_ALLOWED_HERE 1250 -#define ER_NOT_SUPPORTED_AUTH_MODE 1251 -#define ER_SPATIAL_CANT_HAVE_NULL 1252 -#define ER_COLLATION_CHARSET_MISMATCH 1253 -#define ER_SLAVE_WAS_RUNNING 1254 -#define ER_SLAVE_WAS_NOT_RUNNING 1255 -#define ER_TOO_BIG_FOR_UNCOMPRESS 1256 -#define ER_ZLIB_Z_MEM_ERROR 1257 -#define ER_ZLIB_Z_BUF_ERROR 1258 -#define ER_ZLIB_Z_DATA_ERROR 1259 -#define ER_CUT_VALUE_GROUP_CONCAT 1260 -#define ER_WARN_TOO_FEW_RECORDS 1261 -#define ER_WARN_TOO_MANY_RECORDS 1262 -#define ER_WARN_NULL_TO_NOTNULL 1263 -#define ER_WARN_DATA_OUT_OF_RANGE 1264 -#define WARN_DATA_TRUNCATED 1265 -#define ER_WARN_USING_OTHER_HANDLER 1266 -#define ER_CANT_AGGREGATE_2COLLATIONS 1267 -#define ER_DROP_USER 1268 -#define ER_REVOKE_GRANTS 1269 -#define ER_CANT_AGGREGATE_3COLLATIONS 1270 -#define ER_CANT_AGGREGATE_NCOLLATIONS 1271 -#define ER_VARIABLE_IS_NOT_STRUCT 1272 -#define ER_UNKNOWN_COLLATION 1273 -#define ER_SLAVE_IGNORED_SSL_PARAMS 1274 -#define ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275 -#define ER_WARN_FIELD_RESOLVED 1276 -#define ER_BAD_SLAVE_UNTIL_COND 1277 -#define ER_MISSING_SKIP_SLAVE 1278 -#define ER_UNTIL_COND_IGNORED 1279 -#define ER_WRONG_NAME_FOR_INDEX 1280 -#define ER_WRONG_NAME_FOR_CATALOG 1281 -#define ER_WARN_QC_RESIZE 1282 -#define ER_BAD_FT_COLUMN 1283 -#define ER_UNKNOWN_KEY_CACHE 1284 -#define ER_WARN_HOSTNAME_WONT_WORK 1285 -#define ER_UNKNOWN_STORAGE_ENGINE 1286 -#define ER_WARN_DEPRECATED_SYNTAX 1287 -#define ER_NON_UPDATABLE_TABLE 1288 -#define ER_FEATURE_DISABLED 1289 -#define ER_OPTION_PREVENTS_STATEMENT 1290 -#define ER_DUPLICATED_VALUE_IN_TYPE 1291 -#define ER_TRUNCATED_WRONG_VALUE 1292 -#define ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293 -#define ER_INVALID_ON_UPDATE 1294 -#define ER_UNSUPPORTED_PS 1295 -#define ER_GET_ERRMSG 1296 -#define ER_GET_TEMPORARY_ERRMSG 1297 -#define ER_UNKNOWN_TIME_ZONE 1298 -#define ER_WARN_INVALID_TIMESTAMP 1299 -#define ER_INVALID_CHARACTER_STRING 1300 -#define ER_WARN_ALLOWED_PACKET_OVERFLOWED 1301 -#define ER_CONFLICTING_DECLARATIONS 1302 -#define ER_SP_NO_RECURSIVE_CREATE 1303 -#define ER_SP_ALREADY_EXISTS 1304 -#define ER_SP_DOES_NOT_EXIST 1305 -#define ER_SP_DROP_FAILED 1306 -#define ER_SP_STORE_FAILED 1307 -#define ER_SP_LILABEL_MISMATCH 1308 -#define ER_SP_LABEL_REDEFINE 1309 -#define ER_SP_LABEL_MISMATCH 1310 -#define ER_SP_UNINIT_VAR 1311 -#define ER_SP_BADSELECT 1312 -#define ER_SP_BADRETURN 1313 -#define ER_SP_BADSTATEMENT 1314 -#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1315 -#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1316 -#define ER_QUERY_INTERRUPTED 1317 -#define ER_SP_WRONG_NO_OF_ARGS 1318 -#define ER_SP_COND_MISMATCH 1319 -#define ER_SP_NORETURN 1320 -#define ER_SP_NORETURNEND 1321 -#define ER_SP_BAD_CURSOR_QUERY 1322 -#define ER_SP_BAD_CURSOR_SELECT 1323 -#define ER_SP_CURSOR_MISMATCH 1324 -#define ER_SP_CURSOR_ALREADY_OPEN 1325 -#define ER_SP_CURSOR_NOT_OPEN 1326 -#define ER_SP_UNDECLARED_VAR 1327 -#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1328 -#define ER_SP_FETCH_NO_DATA 1329 -#define ER_SP_DUP_PARAM 1330 -#define ER_SP_DUP_VAR 1331 -#define ER_SP_DUP_COND 1332 -#define ER_SP_DUP_CURS 1333 -#define ER_SP_CANT_ALTER 1334 -#define ER_SP_SUBSELECT_NYI 1335 -#define ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 1336 -#define ER_SP_VARCOND_AFTER_CURSHNDLR 1337 -#define ER_SP_CURSOR_AFTER_HANDLER 1338 -#define ER_SP_CASE_NOT_FOUND 1339 -#define ER_FPARSER_TOO_BIG_FILE 1340 -#define ER_FPARSER_BAD_HEADER 1341 -#define ER_FPARSER_EOF_IN_COMMENT 1342 -#define ER_FPARSER_ERROR_IN_PARAMETER 1343 -#define ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER 1344 -#define ER_VIEW_NO_EXPLAIN 1345 -#define ER_FRM_UNKNOWN_TYPE 1346 -#define ER_WRONG_OBJECT 1347 -#define ER_NONUPDATEABLE_COLUMN 1348 -#define ER_VIEW_SELECT_DERIVED 1349 -#define ER_VIEW_SELECT_CLAUSE 1350 -#define ER_VIEW_SELECT_VARIABLE 1351 -#define ER_VIEW_SELECT_TMPTABLE 1352 -#define ER_VIEW_WRONG_LIST 1353 -#define ER_WARN_VIEW_MERGE 1354 -#define ER_WARN_VIEW_WITHOUT_KEY 1355 -#define ER_VIEW_INVALID 1356 -#define ER_SP_NO_DROP_SP 1357 -#define ER_SP_GOTO_IN_HNDLR 1358 -#define ER_TRG_ALREADY_EXISTS 1359 -#define ER_TRG_DOES_NOT_EXIST 1360 -#define ER_TRG_ON_VIEW_OR_TEMP_TABLE 1361 -#define ER_TRG_CANT_CHANGE_ROW 1362 -#define ER_TRG_NO_SUCH_ROW_IN_TRG 1363 -#define ER_NO_DEFAULT_FOR_FIELD 1364 -#define ER_DIVISION_BY_ZERO 1365 -#define ER_TRUNCATED_WRONG_VALUE_FOR_FIELD 1366 -#define ER_ILLEGAL_VALUE_FOR_TYPE 1367 -#define ER_VIEW_NONUPD_CHECK 1368 -#define ER_VIEW_CHECK_FAILED 1369 -#define ER_PROCACCESS_DENIED_ERROR 1370 -#define ER_RELAY_LOG_FAIL 1371 -#define ER_PASSWD_LENGTH 1372 -#define ER_UNKNOWN_TARGET_BINLOG 1373 -#define ER_IO_ERR_LOG_INDEX_READ 1374 -#define ER_BINLOG_PURGE_PROHIBITED 1375 -#define ER_FSEEK_FAIL 1376 -#define ER_BINLOG_PURGE_FATAL_ERR 1377 -#define ER_LOG_IN_USE 1378 -#define ER_LOG_PURGE_UNKNOWN_ERR 1379 -#define ER_RELAY_LOG_INIT 1380 -#define ER_NO_BINARY_LOGGING 1381 -#define ER_RESERVED_SYNTAX 1382 -#define ER_WSAS_FAILED 1383 -#define ER_DIFF_GROUPS_PROC 1384 -#define ER_NO_GROUP_FOR_PROC 1385 -#define ER_ORDER_WITH_PROC 1386 -#define ER_LOGGING_PROHIBIT_CHANGING_OF 1387 -#define ER_NO_FILE_MAPPING 1388 -#define ER_WRONG_MAGIC 1389 -#define ER_PS_MANY_PARAM 1390 -#define ER_KEY_PART_0 1391 -#define ER_VIEW_CHECKSUM 1392 -#define ER_VIEW_MULTIUPDATE 1393 -#define ER_VIEW_NO_INSERT_FIELD_LIST 1394 -#define ER_VIEW_DELETE_MERGE_VIEW 1395 -#define ER_CANNOT_USER 1396 -#define ER_XAER_NOTA 1397 -#define ER_XAER_INVAL 1398 -#define ER_XAER_RMFAIL 1399 -#define ER_XAER_OUTSIDE 1400 -#define ER_XAER_RMERR 1401 -#define ER_XA_RBROLLBACK 1402 -#define ER_NONEXISTING_PROC_GRANT 1403 -#define ER_PROC_AUTO_GRANT_FAIL 1404 -#define ER_PROC_AUTO_REVOKE_FAIL 1405 -#define ER_DATA_TOO_LONG 1406 -#define ER_SP_BAD_SQLSTATE 1407 -#define ER_STARTUP 1408 -#define ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR 1409 -#define ER_CANT_CREATE_USER_WITH_GRANT 1410 -#define ER_WRONG_VALUE_FOR_TYPE 1411 -#define ER_TABLE_DEF_CHANGED 1412 -#define ER_SP_DUP_HANDLER 1413 -#define ER_SP_NOT_VAR_ARG 1414 -#define ER_SP_NO_RETSET 1415 -#define ER_CANT_CREATE_GEOMETRY_OBJECT 1416 -#define ER_FAILED_ROUTINE_BREAK_BINLOG 1417 -#define ER_BINLOG_UNSAFE_ROUTINE 1418 -#define ER_BINLOG_CREATE_ROUTINE_NEED_SUPER 1419 -#define ER_EXEC_STMT_WITH_OPEN_CURSOR 1420 -#define ER_STMT_HAS_NO_OPEN_CURSOR 1421 -#define ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG 1422 -#define ER_NO_DEFAULT_FOR_VIEW_FIELD 1423 -#define ER_SP_NO_RECURSION 1424 -#define ER_TOO_BIG_SCALE 1425 -#define ER_TOO_BIG_PRECISION 1426 -#define ER_M_BIGGER_THAN_D 1427 -#define ER_WRONG_LOCK_OF_SYSTEM_TABLE 1428 -#define ER_CONNECT_TO_FOREIGN_DATA_SOURCE 1429 -#define ER_QUERY_ON_FOREIGN_DATA_SOURCE 1430 -#define ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST 1431 -#define ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE 1432 -#define ER_FOREIGN_DATA_STRING_INVALID 1433 -#define ER_CANT_CREATE_FEDERATED_TABLE 1434 -#define ER_TRG_IN_WRONG_SCHEMA 1435 -#define ER_STACK_OVERRUN_NEED_MORE 1436 -#define ER_TOO_LONG_BODY 1437 -#define ER_WARN_CANT_DROP_DEFAULT_KEYCACHE 1438 -#define ER_TOO_BIG_DISPLAYWIDTH 1439 -#define ER_XAER_DUPID 1440 -#define ER_DATETIME_FUNCTION_OVERFLOW 1441 -#define ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG 1442 -#define ER_VIEW_PREVENT_UPDATE 1443 -#define ER_PS_NO_RECURSION 1444 -#define ER_SP_CANT_SET_AUTOCOMMIT 1445 -#define ER_MALFORMED_DEFINER 1446 -#define ER_VIEW_FRM_NO_USER 1447 -#define ER_VIEW_OTHER_USER 1448 -#define ER_NO_SUCH_USER 1449 -#define ER_FORBID_SCHEMA_CHANGE 1450 -#define ER_ROW_IS_REFERENCED_2 1451 -#define ER_NO_REFERENCED_ROW_2 1452 -#define ER_SP_BAD_VAR_SHADOW 1453 -#define ER_TRG_NO_DEFINER 1454 -#define ER_OLD_FILE_FORMAT 1455 -#define ER_SP_RECURSION_LIMIT 1456 -#define ER_SP_PROC_TABLE_CORRUPT 1457 -#define ER_SP_WRONG_NAME 1458 -#define ER_TABLE_NEEDS_UPGRADE 1459 -#define ER_SP_NO_AGGREGATE 1460 -#define ER_MAX_PREPARED_STMT_COUNT_REACHED 1461 -#define ER_VIEW_RECURSIVE 1462 -#define ER_NON_GROUPING_FIELD_USED 1463 -#define ER_TABLE_CANT_HANDLE_SPKEYS 1464 -#define ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA 1465 -#define ER_REMOVED_SPACES 1466 -#define ER_AUTOINC_READ_FAILED 1467 -#define ER_USERNAME 1468 -#define ER_HOSTNAME 1469 -#define ER_WRONG_STRING_LENGTH 1470 -#define ER_NON_INSERTABLE_TABLE 1471 -#define ER_ADMIN_WRONG_MRG_TABLE 1472 -#define ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT 1473 -#define ER_NAME_BECOMES_EMPTY 1474 -#define ER_AMBIGUOUS_FIELD_TERM 1475 -#define ER_FOREIGN_SERVER_EXISTS 1476 -#define ER_FOREIGN_SERVER_DOESNT_EXIST 1477 -#define ER_ILLEGAL_HA_CREATE_OPTION 1478 -#define ER_PARTITION_REQUIRES_VALUES_ERROR 1479 -#define ER_PARTITION_WRONG_VALUES_ERROR 1480 -#define ER_PARTITION_MAXVALUE_ERROR 1481 -#define ER_PARTITION_SUBPARTITION_ERROR 1482 -#define ER_PARTITION_SUBPART_MIX_ERROR 1483 -#define ER_PARTITION_WRONG_NO_PART_ERROR 1484 -#define ER_PARTITION_WRONG_NO_SUBPART_ERROR 1485 -#define ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR 1486 -#define ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR 1487 -#define ER_FIELD_NOT_FOUND_PART_ERROR 1488 -#define ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR 1489 -#define ER_INCONSISTENT_PARTITION_INFO_ERROR 1490 -#define ER_PARTITION_FUNC_NOT_ALLOWED_ERROR 1491 -#define ER_PARTITIONS_MUST_BE_DEFINED_ERROR 1492 -#define ER_RANGE_NOT_INCREASING_ERROR 1493 -#define ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR 1494 -#define ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR 1495 -#define ER_PARTITION_ENTRY_ERROR 1496 -#define ER_MIX_HANDLER_ERROR 1497 -#define ER_PARTITION_NOT_DEFINED_ERROR 1498 -#define ER_TOO_MANY_PARTITIONS_ERROR 1499 -#define ER_SUBPARTITION_ERROR 1500 -#define ER_CANT_CREATE_HANDLER_FILE 1501 -#define ER_BLOB_FIELD_IN_PART_FUNC_ERROR 1502 -#define ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF 1503 -#define ER_NO_PARTS_ERROR 1504 -#define ER_PARTITION_MGMT_ON_NONPARTITIONED 1505 -#define ER_FOREIGN_KEY_ON_PARTITIONED 1506 -#define ER_DROP_PARTITION_NON_EXISTENT 1507 -#define ER_DROP_LAST_PARTITION 1508 -#define ER_COALESCE_ONLY_ON_HASH_PARTITION 1509 -#define ER_REORG_HASH_ONLY_ON_SAME_NO 1510 -#define ER_REORG_NO_PARAM_ERROR 1511 -#define ER_ONLY_ON_RANGE_LIST_PARTITION 1512 -#define ER_ADD_PARTITION_SUBPART_ERROR 1513 -#define ER_ADD_PARTITION_NO_NEW_PARTITION 1514 -#define ER_COALESCE_PARTITION_NO_PARTITION 1515 -#define ER_REORG_PARTITION_NOT_EXIST 1516 -#define ER_SAME_NAME_PARTITION 1517 -#define ER_NO_BINLOG_ERROR 1518 -#define ER_CONSECUTIVE_REORG_PARTITIONS 1519 -#define ER_REORG_OUTSIDE_RANGE 1520 -#define ER_PARTITION_FUNCTION_FAILURE 1521 -#define ER_PART_STATE_ERROR 1522 -#define ER_LIMITED_PART_RANGE 1523 -#define ER_PLUGIN_IS_NOT_LOADED 1524 -#define ER_WRONG_VALUE 1525 -#define ER_NO_PARTITION_FOR_GIVEN_VALUE 1526 -#define ER_FILEGROUP_OPTION_ONLY_ONCE 1527 -#define ER_CREATE_FILEGROUP_FAILED 1528 -#define ER_DROP_FILEGROUP_FAILED 1529 -#define ER_TABLESPACE_AUTO_EXTEND_ERROR 1530 -#define ER_WRONG_SIZE_NUMBER 1531 -#define ER_SIZE_OVERFLOW_ERROR 1532 -#define ER_ALTER_FILEGROUP_FAILED 1533 -#define ER_BINLOG_ROW_LOGGING_FAILED 1534 -#define ER_BINLOG_ROW_WRONG_TABLE_DEF 1535 -#define ER_BINLOG_ROW_RBR_TO_SBR 1536 -#define ER_EVENT_ALREADY_EXISTS 1537 -#define ER_EVENT_STORE_FAILED 1538 -#define ER_EVENT_DOES_NOT_EXIST 1539 -#define ER_EVENT_CANT_ALTER 1540 -#define ER_EVENT_DROP_FAILED 1541 -#define ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG 1542 -#define ER_EVENT_ENDS_BEFORE_STARTS 1543 -#define ER_EVENT_EXEC_TIME_IN_THE_PAST 1544 -#define ER_EVENT_OPEN_TABLE_FAILED 1545 -#define ER_EVENT_NEITHER_M_EXPR_NOR_M_AT 1546 -#define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED 1547 -#define ER_CANNOT_LOAD_FROM_TABLE 1548 -#define ER_EVENT_CANNOT_DELETE 1549 -#define ER_EVENT_COMPILE_ERROR 1550 -#define ER_EVENT_SAME_NAME 1551 -#define ER_EVENT_DATA_TOO_LONG 1552 -#define ER_DROP_INDEX_FK 1553 -#define ER_WARN_DEPRECATED_SYNTAX_WITH_VER 1554 -#define ER_CANT_WRITE_LOCK_LOG_TABLE 1555 -#define ER_CANT_LOCK_LOG_TABLE 1556 -#define ER_FOREIGN_DUPLICATE_KEY 1557 -#define ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE 1558 -#define ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR 1559 -#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT 1560 -#define ER_NDB_CANT_SWITCH_BINLOG_FORMAT 1561 -#define ER_PARTITION_NO_TEMPORARY 1562 -#define ER_PARTITION_CONST_DOMAIN_ERROR 1563 -#define ER_PARTITION_FUNCTION_IS_NOT_ALLOWED 1564 -#define ER_DDL_LOG_ERROR 1565 -#define ER_NULL_IN_VALUES_LESS_THAN 1566 -#define ER_WRONG_PARTITION_NAME 1567 -#define ER_CANT_CHANGE_TX_ISOLATION 1568 -#define ER_DUP_ENTRY_AUTOINCREMENT_CASE 1569 -#define ER_EVENT_MODIFY_QUEUE_ERROR 1570 -#define ER_EVENT_SET_VAR_ERROR 1571 -#define ER_PARTITION_MERGE_ERROR 1572 -#define ER_CANT_ACTIVATE_LOG 1573 -#define ER_RBR_NOT_AVAILABLE 1574 -#define ER_BASE64_DECODE_ERROR 1575 -#define ER_EVENT_RECURSION_FORBIDDEN 1576 -#define ER_EVENTS_DB_ERROR 1577 -#define ER_ONLY_INTEGERS_ALLOWED 1578 -#define ER_UNSUPORTED_LOG_ENGINE 1579 -#define ER_BAD_LOG_STATEMENT 1580 -#define ER_CANT_RENAME_LOG_TABLE 1581 -#define ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 1582 -#define ER_WRONG_PARAMETERS_TO_NATIVE_FCT 1583 -#define ER_WRONG_PARAMETERS_TO_STORED_FCT 1584 -#define ER_NATIVE_FCT_NAME_COLLISION 1585 -#define ER_DUP_ENTRY_WITH_KEY_NAME 1586 -#define ER_BINLOG_PURGE_EMFILE 1587 -#define ER_EVENT_CANNOT_CREATE_IN_THE_PAST 1588 -#define ER_EVENT_CANNOT_ALTER_IN_THE_PAST 1589 -#define ER_SLAVE_INCIDENT 1590 -#define ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT 1591 -#define ER_BINLOG_UNSAFE_STATEMENT 1592 -#define ER_SLAVE_FATAL_ERROR 1593 -#define ER_SLAVE_RELAY_LOG_READ_FAILURE 1594 -#define ER_SLAVE_RELAY_LOG_WRITE_FAILURE 1595 -#define ER_SLAVE_CREATE_EVENT_FAILURE 1596 -#define ER_SLAVE_MASTER_COM_FAILURE 1597 -#define ER_BINLOG_LOGGING_IMPOSSIBLE 1598 -#define ER_VIEW_NO_CREATION_CTX 1599 -#define ER_VIEW_INVALID_CREATION_CTX 1600 -#define ER_SR_INVALID_CREATION_CTX 1601 -#define ER_TRG_CORRUPTED_FILE 1602 -#define ER_TRG_NO_CREATION_CTX 1603 -#define ER_TRG_INVALID_CREATION_CTX 1604 -#define ER_EVENT_INVALID_CREATION_CTX 1605 -#define ER_TRG_CANT_OPEN_TABLE 1606 -#define ER_CANT_CREATE_SROUTINE 1607 -#define ER_SLAVE_AMBIGOUS_EXEC_MODE 1608 -#define ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT 1609 -#define ER_SLAVE_CORRUPT_EVENT 1610 -#define ER_LOAD_DATA_INVALID_COLUMN 1611 -#define ER_LOG_PURGE_NO_FILE 1612 -#define ER_NEED_REPREPARE 1613 -#define ER_DELAYED_NOT_SUPPORTED 1614 -#define ER_WARN_AUTO_CONVERT_LOCK 1615 -#define ER_NO_AUTO_CONVERT_LOCK_STRICT 1616 -#define ER_NO_AUTO_CONVERT_LOCK_TRANSACTION 1617 -#define ER_NO_STORAGE_ENGINE 1618 -#define ER_BACKUP_BACKUP_START 1619 -#define ER_BACKUP_BACKUP_DONE 1620 -#define ER_BACKUP_RESTORE_START 1621 -#define ER_BACKUP_RESTORE_DONE 1622 -#define ER_BACKUP_NOTHING_TO_BACKUP 1623 -#define ER_BACKUP_CANNOT_INCLUDE_DB 1624 -#define ER_BACKUP_BACKUP 1625 -#define ER_BACKUP_RESTORE 1626 -#define ER_BACKUP_RUNNING 1627 -#define ER_BACKUP_BACKUP_PREPARE 1628 -#define ER_BACKUP_RESTORE_PREPARE 1629 -#define ER_BACKUP_INVALID_LOC 1630 -#define ER_BACKUP_READ_LOC 1631 -#define ER_BACKUP_WRITE_LOC 1632 -#define ER_BACKUP_LIST_DBS 1633 -#define ER_BACKUP_LIST_TABLES 1634 -#define ER_BACKUP_LIST_DB_TABLES 1635 -#define ER_BACKUP_SKIP_VIEW 1636 -#define ER_BACKUP_NO_ENGINE 1637 -#define ER_BACKUP_TABLE_OPEN 1638 -#define ER_BACKUP_READ_HEADER 1639 -#define ER_BACKUP_WRITE_HEADER 1640 -#define ER_BACKUP_NO_BACKUP_DRIVER 1641 -#define ER_BACKUP_NOT_ACCEPTED 1642 -#define ER_BACKUP_CREATE_BACKUP_DRIVER 1643 -#define ER_BACKUP_CREATE_RESTORE_DRIVER 1644 -#define ER_BACKUP_TOO_MANY_IMAGES 1645 -#define ER_BACKUP_WRITE_META 1646 -#define ER_BACKUP_READ_META 1647 -#define ER_BACKUP_CREATE_META 1648 -#define ER_BACKUP_GET_BUF 1649 -#define ER_BACKUP_WRITE_DATA 1650 -#define ER_BACKUP_READ_DATA 1651 -#define ER_BACKUP_NEXT_CHUNK 1652 -#define ER_BACKUP_INIT_BACKUP_DRIVER 1653 -#define ER_BACKUP_INIT_RESTORE_DRIVER 1654 -#define ER_BACKUP_STOP_BACKUP_DRIVER 1655 -#define ER_BACKUP_STOP_RESTORE_DRIVERS 1656 -#define ER_BACKUP_PREPARE_DRIVER 1657 -#define ER_BACKUP_CREATE_VP 1658 -#define ER_BACKUP_UNLOCK_DRIVER 1659 -#define ER_BACKUP_CANCEL_BACKUP 1660 -#define ER_BACKUP_CANCEL_RESTORE 1661 -#define ER_BACKUP_GET_DATA 1662 -#define ER_BACKUP_SEND_DATA 1663 -#define ER_BACKUP_SEND_DATA_RETRY 1664 -#define ER_BACKUP_OPEN_TABLES 1665 -#define ER_BACKUP_THREAD_INIT 1666 -#define ER_BACKUP_PROGRESS_TABLES 1667 -#define ER_TABLESPACE_EXIST 1668 -#define ER_NO_SUCH_TABLESPACE 1669 -#define ER_SLAVE_HEARTBEAT_FAILURE 1670 -#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE 1671 -#define ER_BACKUP_CANT_FIND_SE 1672 -#define ER_BACKUP_NO_NATIVE_BE 1673 -#define ER_BACKUP_UNKNOWN_BE 1674 -#define ER_BACKUP_WRONG_TABLE_BE 1675 -#define ER_BACKUP_CANT_RESTORE_DB 1676 -#define ER_BACKUP_CANT_RESTORE_TABLE 1677 -#define ER_BACKUP_CANT_RESTORE_VIEW 1678 -#define ER_BACKUP_CANT_RESTORE_SROUT 1679 -#define ER_BACKUP_CANT_RESTORE_EVENT 1680 -#define ER_BACKUP_CANT_RESTORE_TRIGGER 1681 -#define ER_BACKUP_CATALOG_ADD_DB 1682 -#define ER_BACKUP_CATALOG_ADD_TABLE 1683 -#define ER_BACKUP_CATALOG_ADD_VIEW 1684 -#define ER_BACKUP_CATALOG_ADD_SROUT 1685 -#define ER_BACKUP_CATALOG_ADD_EVENT 1686 -#define ER_BACKUP_CATALOG_ADD_TRIGGER 1687 -#define ER_BACKUP_UNKNOWN_OBJECT 1688 -#define ER_BACKUP_UNKNOWN_OBJECT_TYPE 1689 -#define ER_BACKUP_OPEN_WR 1690 -#define ER_BACKUP_OPEN_RD 1691 -#define ER_BACKUP_BAD_MAGIC 1692 -#define ER_BACKUP_CONTEXT_CREATE 1693 -#define ER_BACKUP_CONTEXT_REMOVE 1694 -#define ER_BAD_PATH 1695 -#define ER_DDL_BLOCK 1696 -#define ER_BACKUP_LOGGER_INIT 1697 -#define ER_BACKUP_WRITE_SUMMARY 1698 -#define ER_BACKUP_READ_SUMMARY 1699 -#define ER_BACKUP_GET_META_DB 1700 -#define ER_BACKUP_GET_META_TABLE 1701 -#define ER_BACKUP_GET_META_VIEW 1702 -#define ER_BACKUP_GET_META_SROUT 1703 -#define ER_BACKUP_GET_META_EVENT 1704 -#define ER_BACKUP_GET_META_TRIGGER 1705 -#define ER_BACKUP_CREATE_BE 1706 -#define ER_BACKUP_LIST_PERDB 1707 -#define ER_BACKUP_LIST_DB_VIEWS 1708 -#define ER_BACKUP_LIST_DB_SROUT 1709 -#define ER_BACKUP_LIST_DB_EVENTS 1710 -#define ER_BACKUP_LIST_DB_TRIGGERS 1711 -#define ER_BACKUP_LOG_WRITE_ERROR 1712 -#define ER_TABLESPACE_NOT_EMPTY 1713 -#define ER_BACKUP_CAT_ENUM 1714 -#define ER_BACKUP_CANT_RESTORE_TS 1715 -#define ER_BACKUP_TS_CHANGE 1716 -#define ER_BACKUP_GET_META_TS 1717 -#define ER_TABLESPACE_DATAFILE_EXIST 1718 -#define ER_BACKUP_CATALOG_ADD_TS 1719 -#define ER_DEBUG_SYNC_TIMEOUT 1720 -#define ER_DEBUG_SYNC_HIT_LIMIT 1721 -#define ER_BACKUP_FAILED_TO_INIT_COMPRESSION 1722 -#define ER_BACKUP_OBTAIN_NAME_LOCK_FAILED 1723 -#define ER_BACKUP_RELEASE_NAME_LOCK_FAILED 1724 -#define ER_BACKUP_BACKUPDIR 1725 -#define ER_ERROR_LAST 1725 diff --git a/externals/mysql/mysys/array.c b/externals/mysql/mysys/array.c deleted file mode 100644 index b31260344a..0000000000 --- a/externals/mysql/mysys/array.c +++ /dev/null @@ -1,379 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Handling of arrays that can grow dynamicly. */ - -#include "mysys_priv.h" -#include "m_string.h" - -/* - Initiate dynamic array - - SYNOPSIS - init_dynamic_array2() - array Pointer to an array - element_size Size of element - init_buffer Initial buffer pointer - init_alloc Number of initial elements - alloc_increment Increment for adding new elements - - DESCRIPTION - init_dynamic_array() initiates array and allocate space for - init_alloc eilements. - Array is usable even if space allocation failed. - Static buffers must begin immediately after the array structure. - - RETURN VALUE - TRUE my_malloc_ci() failed - FALSE Ok -*/ - -my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size, - void *init_buffer, uint init_alloc, - uint alloc_increment CALLER_INFO_PROTO) -{ - DBUG_ENTER("init_dynamic_array"); - if (!alloc_increment) - { - alloc_increment=max((8192-MALLOC_OVERHEAD)/element_size,16); - if (init_alloc > 8 && alloc_increment > init_alloc * 2) - alloc_increment=init_alloc*2; - } - array->elements=0; - array->max_element=init_alloc; - array->alloc_increment=alloc_increment; - array->size_of_element=element_size; - if ((array->buffer= init_buffer)) - DBUG_RETURN(FALSE); - if (init_alloc && - !(array->buffer=(uchar*) my_malloc_ci(element_size*init_alloc, - MYF(MY_WME)))) - { - array->max_element=0; - DBUG_RETURN(TRUE); - } - DBUG_RETURN(FALSE); -} - -my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size, - uint init_alloc, - uint alloc_increment CALLER_INFO_PROTO) -{ - /* placeholder to preserve ABI */ - return my_init_dynamic_array_ci(array, element_size, init_alloc, - alloc_increment); -} -/* - Insert element at the end of array. Allocate memory if needed. - - SYNOPSIS - insert_dynamic() - array - element - - RETURN VALUE - TRUE Insert failed - FALSE Ok -*/ - -my_bool insert_dynamic(DYNAMIC_ARRAY *array, const uchar* element) -{ - uchar* buffer; - if (array->elements == array->max_element) - { /* Call only when nessesary */ - if (!(buffer=alloc_dynamic(array))) - return TRUE; - } - else - { - buffer=array->buffer+(array->elements * array->size_of_element); - array->elements++; - } - memcpy(buffer,element,(size_t) array->size_of_element); - return FALSE; -} - - -/* - Alloc space for next element(s) - - SYNOPSIS - alloc_dynamic() - array - - DESCRIPTION - alloc_dynamic() checks if there is empty space for at least - one element if not tries to allocate space for alloc_increment - elements at the end of array. - - RETURN VALUE - pointer Pointer to empty space for element - 0 Error -*/ - -uchar *alloc_dynamic(DYNAMIC_ARRAY *array) -{ - DBUG_ENTER("alloc_dynamic"); - if (array->elements == array->max_element) - { - char *new_ptr; - if (array->buffer == (uchar *)(array + 1)) - { - /* - In this senerio, the buffer is statically preallocated, - so we have to create an all-new malloc since we overflowed - */ - if (!(new_ptr= (char *) my_malloc((array->max_element+ - array->alloc_increment) * - array->size_of_element, - MYF(MY_WME)))) - DBUG_RETURN(0); - memcpy(new_ptr, array->buffer, - array->elements * array->size_of_element); - } - else if (!(new_ptr=(char*) - my_realloc(array->buffer,(array->max_element+ - array->alloc_increment)* - array->size_of_element, - MYF(MY_WME | MY_ALLOW_ZERO_PTR)))) - DBUG_RETURN(0); - array->buffer= (uchar*) new_ptr; - array->max_element+=array->alloc_increment; - } - DBUG_RETURN(array->buffer+(array->elements++ * array->size_of_element)); -} - - -/* - Pop last element from array. - - SYNOPSIS - pop_dynamic() - array - - RETURN VALUE - pointer Ok - 0 Array is empty -*/ - -uchar *pop_dynamic(DYNAMIC_ARRAY *array) -{ - if (array->elements) - return array->buffer+(--array->elements * array->size_of_element); - return 0; -} - -/* - Replace element in array with given element and index - - SYNOPSIS - set_dynamic() - array - element Element to be inserted - idx Index where element is to be inserted - - DESCRIPTION - set_dynamic() replaces element in array. - If idx > max_element insert new element. Allocate memory if needed. - - RETURN VALUE - TRUE Idx was out of range and allocation of new memory failed - FALSE Ok -*/ - -my_bool set_dynamic(DYNAMIC_ARRAY *array, uchar* element, uint idx) -{ - if (idx >= array->elements) - { - if (idx >= array->max_element && allocate_dynamic(array, idx)) - return TRUE; - bzero((uchar*) (array->buffer+array->elements*array->size_of_element), - (idx - array->elements)*array->size_of_element); - array->elements=idx+1; - } - memcpy(array->buffer+(idx * array->size_of_element),element, - (size_t) array->size_of_element); - return FALSE; -} - - -/* - Ensure that dynamic array has enough elements - - SYNOPSIS - allocate_dynamic() - array - max_elements Numbers of elements that is needed - - NOTES - Any new allocated element are NOT initialized - - RETURN VALUE - FALSE Ok - TRUE Allocation of new memory failed -*/ - -my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements) -{ - DBUG_ENTER("allocate_dynamic"); - - if (max_elements >= array->max_element) - { - uint size; - uchar *new_ptr; - size= (max_elements + array->alloc_increment)/array->alloc_increment; - size*= array->alloc_increment; - if (array->buffer == (uchar *)(array + 1)) - { - /* - In this senerio, the buffer is statically preallocated, - so we have to create an all-new malloc since we overflowed - */ - if (!(new_ptr= (uchar *) my_malloc(size * - array->size_of_element, - MYF(MY_WME)))) - DBUG_RETURN(0); - memcpy(new_ptr, array->buffer, - array->elements * array->size_of_element); - } - else if (!(new_ptr= (uchar*) my_realloc(array->buffer,size* - array->size_of_element, - MYF(MY_WME | MY_ALLOW_ZERO_PTR)))) - DBUG_RETURN(TRUE); - array->buffer= new_ptr; - array->max_element= size; - } - DBUG_RETURN(FALSE); -} - - -/* - Get an element from array by given index - - SYNOPSIS - get_dynamic() - array - uchar* Element to be returned. If idx > elements contain zeroes. - idx Index of element wanted. -*/ - -void get_dynamic(DYNAMIC_ARRAY *array, uchar* element, uint idx) -{ - if (idx >= array->elements) - { - DBUG_PRINT("warning",("To big array idx: %d, array size is %d", - idx,array->elements)); - bzero(element,array->size_of_element); - return; - } - memcpy(element,array->buffer+idx*array->size_of_element, - (size_t) array->size_of_element); -} - - -/* - Empty array by freeing all memory - - SYNOPSIS - delete_dynamic() - array Array to be deleted -*/ - -void delete_dynamic(DYNAMIC_ARRAY *array) -{ - /* - Just mark as empty if we are using a static buffer - */ - if (array->buffer == (uchar *)(array + 1)) - array->elements= 0; - else - if (array->buffer) - { - my_free(array->buffer,MYF(MY_WME)); - array->buffer=0; - array->elements=array->max_element=0; - } -} - -/* - Delete element by given index - - SYNOPSIS - delete_dynamic_element() - array - idx Index of element to be deleted -*/ - -void delete_dynamic_element(DYNAMIC_ARRAY *array, uint idx) -{ - char *ptr= (char*) array->buffer+array->size_of_element*idx; - array->elements--; - memmove(ptr,ptr+array->size_of_element, - (array->elements-idx)*array->size_of_element); -} - - -/* - Free unused memory - - SYNOPSIS - freeze_size() - array Array to be freed - -*/ - -void freeze_size(DYNAMIC_ARRAY *array) -{ - uint elements=max(array->elements,1); - - /* - Do nothing if we are using a static buffer - */ - if (array->buffer == (uchar *)(array + 1)) - return; - - if (array->buffer && array->max_element != elements) - { - array->buffer=(uchar*) my_realloc(array->buffer, - elements*array->size_of_element, - MYF(MY_WME)); - array->max_element=elements; - } -} - - -/* - Get the index of a dynamic element - - SYNOPSIS - get_index_dynamic() - array Array - element Whose element index - -*/ - -int get_index_dynamic(DYNAMIC_ARRAY *array, uchar* element) -{ - uint ret; - if (array->buffer > element) - return -1; - - ret= (element - array->buffer) / array->size_of_element; - if (ret > array->elements) - return -1; - - return ret; - -} diff --git a/externals/mysql/mysys/base64.c b/externals/mysql/mysys/base64.c deleted file mode 100644 index 7e69ab5450..0000000000 --- a/externals/mysql/mysys/base64.c +++ /dev/null @@ -1,311 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include /* strchr() */ -#include /* my_isspace() */ -#include - -#ifndef MAIN - -static char base64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"; - - -int -my_base64_needed_encoded_length(int length_of_data) -{ - int nb_base64_chars; - nb_base64_chars= (length_of_data + 2) / 3 * 4; - - return - nb_base64_chars + /* base64 char incl padding */ - (nb_base64_chars - 1)/ 76 + /* newlines */ - 1; /* NUL termination of string */ -} - - -int -my_base64_needed_decoded_length(int length_of_encoded_data) -{ - return (int) ceil(length_of_encoded_data * 3 / 4); -} - - -/* - Encode a data as base64. - - Note: We require that dst is pre-allocated to correct size. - See my_base64_needed_encoded_length(). -*/ - -int -my_base64_encode(const void *src, size_t src_len, char *dst) -{ - const unsigned char *s= (const unsigned char*)src; - size_t i= 0; - size_t len= 0; - - for (; i < src_len; len += 4) - { - unsigned c; - - if (len == 76) - { - len= 0; - *dst++= '\n'; - } - - c= s[i++]; - c <<= 8; - - if (i < src_len) - c += s[i]; - c <<= 8; - i++; - - if (i < src_len) - c += s[i]; - i++; - - *dst++= base64_table[(c >> 18) & 0x3f]; - *dst++= base64_table[(c >> 12) & 0x3f]; - - if (i > (src_len + 1)) - *dst++= '='; - else - *dst++= base64_table[(c >> 6) & 0x3f]; - - if (i > src_len) - *dst++= '='; - else - *dst++= base64_table[(c >> 0) & 0x3f]; - } - *dst= '\0'; - - return 0; -} - - -static inline uint -pos(unsigned char c) -{ - return (uint) (strchr(base64_table, c) - base64_table); -} - - -#define SKIP_SPACE(src, i, size) \ -{ \ - while (i < size && my_isspace(&my_charset_latin1, * src)) \ - { \ - i++; \ - src++; \ - } \ - if (i == size) \ - { \ - break; \ - } \ -} - - -/* - Decode a base64 string - - SYNOPSIS - base64_decode() - src Pointer to base64-encoded string - len Length of string at 'src' - dst Pointer to location where decoded data will be stored - end_ptr Pointer to variable that will refer to the character - after the end of the encoded data that were decoded. Can - be NULL. - - DESCRIPTION - - The base64-encoded data in the range ['src','*end_ptr') will be - decoded and stored starting at 'dst'. The decoding will stop - after 'len' characters have been read from 'src', or when padding - occurs in the base64-encoded data. In either case: if 'end_ptr' is - non-null, '*end_ptr' will be set to point to the character after - the last read character, even in the presence of error. - - NOTE - We require that 'dst' is pre-allocated to correct size. - - SEE ALSO - my_base64_needed_decoded_length(). - - RETURN VALUE - Number of bytes written at 'dst' or -1 in case of failure -*/ -int -my_base64_decode(const char *src_base, size_t len, - void *dst, const char **end_ptr) -{ - char b[3]; - size_t i= 0; - char *dst_base= (char *)dst; - char const *src= src_base; - char *d= dst_base; - size_t j; - - while (i < len) - { - unsigned c= 0; - size_t mark= 0; - - SKIP_SPACE(src, i, len); - - c += pos(*src++); - c <<= 6; - i++; - - SKIP_SPACE(src, i, len); - - c += pos(*src++); - c <<= 6; - i++; - - SKIP_SPACE(src, i, len); - - if (*src != '=') - c += pos(*src++); - else - { - src += 2; /* There should be two bytes padding */ - i= len; - mark= 2; - c <<= 6; - goto end; - } - c <<= 6; - i++; - - SKIP_SPACE(src, i, len); - - if (*src != '=') - c += pos(*src++); - else - { - src += 1; /* There should be one byte padding */ - i= len; - mark= 1; - goto end; - } - i++; - - end: - b[0]= (c >> 16) & 0xff; - b[1]= (c >> 8) & 0xff; - b[2]= (c >> 0) & 0xff; - - for (j=0; j<3-mark; j++) - *d++= b[j]; - } - - if (end_ptr != NULL) - *end_ptr= src; - - /* - The variable 'i' is set to 'len' when padding has been read, so it - does not actually reflect the number of bytes read from 'src'. - */ - return i != len ? -1 : (int) (d - dst_base); -} - - -#else /* MAIN */ - -#define require(b) { \ - if (!(b)) { \ - printf("Require failed at %s:%d\n", __FILE__, __LINE__); \ - abort(); \ - } \ -} - - -int -main(void) -{ - int i; - size_t j; - size_t k, l; - size_t dst_len; - size_t needed_length; - - for (i= 0; i < 500; i++) - { - /* Create source data */ - const size_t src_len= rand() % 1000 + 1; - - char * src= (char *) malloc(src_len); - char * s= src; - char * str; - char * dst; - - require(src); - for (j= 0; jname; cs++) - add_compiled_collation(cs); - - return FALSE; -} diff --git a/externals/mysql/mysys/charset.c b/externals/mysql/mysys/charset.c deleted file mode 100644 index a327b243e5..0000000000 --- a/externals/mysql/mysys/charset.c +++ /dev/null @@ -1,915 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#include -#include -#include - - -/* - The code below implements this functionality: - - - Initializing charset related structures - - Loading dynamic charsets - - Searching for a proper CHARSET_INFO - using charset name, collation name or collation ID - - Setting server default character set -*/ - -my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2) -{ - return ((cs1 == cs2) || !strcmp(cs1->csname,cs2->csname)); -} - - -static uint -get_collation_number_internal(const char *name) -{ - CHARSET_INFO **cs; - for (cs= all_charsets; - cs < all_charsets + array_elements(all_charsets); - cs++) - { - if ( cs[0] && cs[0]->name && - !my_strcasecmp(&my_charset_latin1, cs[0]->name, name)) - return cs[0]->number; - } - return 0; -} - - -static my_bool init_state_maps(CHARSET_INFO *cs) -{ - uint i; - uchar *state_map; - uchar *ident_map; - - if (!(cs->state_map= (uchar*) my_once_alloc(256, MYF(MY_WME)))) - return 1; - - if (!(cs->ident_map= (uchar*) my_once_alloc(256, MYF(MY_WME)))) - return 1; - - state_map= cs->state_map; - ident_map= cs->ident_map; - - /* Fill state_map with states to get a faster parser */ - for (i=0; i < 256 ; i++) - { - if (my_isalpha(cs,i)) - state_map[i]=(uchar) MY_LEX_IDENT; - else if (my_isdigit(cs,i)) - state_map[i]=(uchar) MY_LEX_NUMBER_IDENT; -#if defined(USE_MB) && defined(USE_MB_IDENT) - else if (my_mbcharlen(cs, i)>1) - state_map[i]=(uchar) MY_LEX_IDENT; -#endif - else if (my_isspace(cs,i)) - state_map[i]=(uchar) MY_LEX_SKIP; - else - state_map[i]=(uchar) MY_LEX_CHAR; - } - state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT; - state_map[(uchar)'\'']=(uchar) MY_LEX_STRING; - state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT; - state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP; - state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP; - state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL; - state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT; - state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON; - state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR; - state_map[0]=(uchar) MY_LEX_EOL; - state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE; - state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT; - state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT; - state_map[(uchar)'@']= (uchar) MY_LEX_USER_END; - state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER; - state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER; - - /* - Create a second map to make it faster to find identifiers - */ - for (i=0; i < 256 ; i++) - { - ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT || - state_map[i] == MY_LEX_NUMBER_IDENT); - } - - /* Special handling of hex and binary strings */ - state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX; - state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN; - state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR; - return 0; -} - - -static void simple_cs_init_functions(CHARSET_INFO *cs) -{ - if (cs->state & MY_CS_BINSORT) - cs->coll= &my_collation_8bit_bin_handler; - else - cs->coll= &my_collation_8bit_simple_ci_handler; - - cs->cset= &my_charset_8bit_handler; -} - - - -static int cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from) -{ - to->number= from->number ? from->number : to->number; - - if (from->csname) - if (!(to->csname= my_once_strdup(from->csname,MYF(MY_WME)))) - goto err; - - if (from->name) - if (!(to->name= my_once_strdup(from->name,MYF(MY_WME)))) - goto err; - - if (from->comment) - if (!(to->comment= my_once_strdup(from->comment,MYF(MY_WME)))) - goto err; - - if (from->ctype) - { - if (!(to->ctype= (uchar*) my_once_memdup((char*) from->ctype, - MY_CS_CTYPE_TABLE_SIZE, - MYF(MY_WME)))) - goto err; - if (init_state_maps(to)) - goto err; - } - if (from->to_lower) - if (!(to->to_lower= (uchar*) my_once_memdup((char*) from->to_lower, - MY_CS_TO_LOWER_TABLE_SIZE, - MYF(MY_WME)))) - goto err; - - if (from->to_upper) - if (!(to->to_upper= (uchar*) my_once_memdup((char*) from->to_upper, - MY_CS_TO_UPPER_TABLE_SIZE, - MYF(MY_WME)))) - goto err; - if (from->sort_order) - { - if (!(to->sort_order= (uchar*) my_once_memdup((char*) from->sort_order, - MY_CS_SORT_ORDER_TABLE_SIZE, - MYF(MY_WME)))) - goto err; - - } - if (from->tab_to_uni) - { - uint sz= MY_CS_TO_UNI_TABLE_SIZE*sizeof(uint16); - if (!(to->tab_to_uni= (uint16*) my_once_memdup((char*)from->tab_to_uni, - sz, MYF(MY_WME)))) - goto err; - } - if (from->tailoring) - if (!(to->tailoring= my_once_strdup(from->tailoring,MYF(MY_WME)))) - goto err; - - return 0; - -err: - return 1; -} - - - -static my_bool simple_cs_is_full(CHARSET_INFO *cs) -{ - return ((cs->csname && cs->tab_to_uni && cs->ctype && cs->to_upper && - cs->to_lower) && - (cs->number && cs->name && - (cs->sort_order || (cs->state & MY_CS_BINSORT) ))); -} - - -static void -copy_uca_collation(CHARSET_INFO *to, CHARSET_INFO *from) -{ - to->cset= from->cset; - to->coll= from->coll; - to->strxfrm_multiply= from->strxfrm_multiply; - to->min_sort_char= from->min_sort_char; - to->max_sort_char= from->max_sort_char; - to->mbminlen= from->mbminlen; - to->mbmaxlen= from->mbmaxlen; - to->state|= MY_CS_AVAILABLE | MY_CS_LOADED | - MY_CS_STRNXFRM | MY_CS_UNICODE; -} - - -static int add_collation(CHARSET_INFO *cs) -{ - if (cs->name && (cs->number || - (cs->number=get_collation_number_internal(cs->name)))) - { - if (!all_charsets[cs->number]) - { - if (!(all_charsets[cs->number]= - (CHARSET_INFO*) my_once_alloc(sizeof(CHARSET_INFO),MYF(0)))) - return MY_XML_ERROR; - bzero((void*)all_charsets[cs->number],sizeof(CHARSET_INFO)); - } - - if (cs->primary_number == cs->number) - cs->state |= MY_CS_PRIMARY; - - if (cs->binary_number == cs->number) - cs->state |= MY_CS_BINSORT; - - all_charsets[cs->number]->state|= cs->state; - - if (!(all_charsets[cs->number]->state & MY_CS_COMPILED)) - { - CHARSET_INFO *newcs= all_charsets[cs->number]; - if (cs_copy_data(all_charsets[cs->number],cs)) - return MY_XML_ERROR; - - newcs->levels_for_compare= 1; - newcs->levels_for_order= 1; - - if (!strcmp(cs->csname,"ucs2") ) - { -#if defined(HAVE_CHARSET_ucs2) && defined(HAVE_UCA_COLLATIONS) - copy_uca_collation(newcs, &my_charset_ucs2_unicode_ci); - newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED | MY_CS_NONASCII; -#endif - } - else if (!strcmp(cs->csname, "utf8")) - { -#if defined (HAVE_CHARSET_utf8mb3) && defined(HAVE_UCA_COLLATIONS) - copy_uca_collation(newcs, &my_charset_utf8mb4_unicode_ci); - newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED; -#endif - } - else if (!strcmp(cs->csname, "utf8mb3")) - { -#if defined (HAVE_CHARSET_utf8mb3) && defined(HAVE_UCA_COLLATIONS) - copy_uca_collation(newcs, &my_charset_utf8mb3_unicode_ci); - newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED; -#endif - } - else if (!strcmp(cs->csname, "utf16")) - { -#if defined (HAVE_CHARSET_utf16) && defined(HAVE_UCA_COLLATIONS) - copy_uca_collation(newcs, &my_charset_utf16_unicode_ci); - newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED | MY_CS_NONASCII; -#endif - } - else if (!strcmp(cs->csname, "utf32")) - { -#if defined (HAVE_CHARSET_utf32) && defined(HAVE_UCA_COLLATIONS) - copy_uca_collation(newcs, &my_charset_utf32_unicode_ci); - newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED | MY_CS_NONASCII; -#endif - } - else - { - uchar *sort_order= all_charsets[cs->number]->sort_order; - simple_cs_init_functions(all_charsets[cs->number]); - newcs->mbminlen= 1; - newcs->mbmaxlen= 1; - if (simple_cs_is_full(all_charsets[cs->number])) - { - all_charsets[cs->number]->state |= MY_CS_LOADED; - } - all_charsets[cs->number]->state|= MY_CS_AVAILABLE; - - /* - Check if case sensitive sort order: A < a < B. - We need MY_CS_FLAG for regex library, and for - case sensitivity flag for 5.0 client protocol, - to support isCaseSensitive() method in JDBC driver - */ - if (sort_order && sort_order['A'] < sort_order['a'] && - sort_order['a'] < sort_order['B']) - all_charsets[cs->number]->state|= MY_CS_CSSORT; - - if (my_charset_is_8bit_pure_ascii(all_charsets[cs->number])) - all_charsets[cs->number]->state|= MY_CS_PUREASCII; - if (!my_charset_is_ascii_compatible(cs)) - all_charsets[cs->number]->state|= MY_CS_NONASCII; - } - } - else - { - /* - We need the below to make get_charset_name() - and get_charset_number() working even if a - character set has not been really incompiled. - The above functions are used for example - in error message compiler extra/comp_err.c. - If a character set was compiled, this information - will get lost and overwritten in add_compiled_collation(). - */ - CHARSET_INFO *dst= all_charsets[cs->number]; - dst->number= cs->number; - if (cs->comment) - if (!(dst->comment= my_once_strdup(cs->comment,MYF(MY_WME)))) - return MY_XML_ERROR; - if (cs->csname && !dst->csname) - if (!(dst->csname= my_once_strdup(cs->csname,MYF(MY_WME)))) - return MY_XML_ERROR; - if (cs->name && !dst->name) - if (!(dst->name= my_once_strdup(cs->name,MYF(MY_WME)))) - return MY_XML_ERROR; - } - cs->number= 0; - cs->primary_number= 0; - cs->binary_number= 0; - cs->name= NULL; - cs->state= 0; - cs->sort_order= NULL; - cs->state= 0; - } - return MY_XML_OK; -} - - -#define MY_MAX_ALLOWED_BUF 1024*1024 -#define MY_CHARSET_INDEX "Index.xml" - -const char *charsets_dir= NULL; -static int charset_initialized=0; - - -static my_bool my_read_charset_file(const char *filename, myf myflags) -{ - uchar *buf; - int fd; - uint len, tmp_len; - MY_STAT stat_info; - - if (!my_stat(filename, &stat_info, MYF(myflags)) || - ((len= (uint)stat_info.st_size) > MY_MAX_ALLOWED_BUF) || - !(buf= (uchar*) my_malloc(len,myflags))) - return TRUE; - - if ((fd=my_open(filename,O_RDONLY,myflags)) < 0) - goto error; - tmp_len=my_read(fd, buf, len, myflags); - my_close(fd,myflags); - if (tmp_len != len) - goto error; - - if (my_parse_charset_xml((char*) buf,len,add_collation)) - { -#ifdef NOT_YET - printf("ERROR at line %d pos %d '%s'\n", - my_xml_error_lineno(&p)+1, - my_xml_error_pos(&p), - my_xml_error_string(&p)); -#endif - } - - my_free(buf, myflags); - return FALSE; - -error: - my_free(buf, myflags); - return TRUE; -} - - -char *get_charsets_dir(char *buf) -{ - const char *sharedir= SHAREDIR; - char *res; - DBUG_ENTER("get_charsets_dir"); - - if (charsets_dir != NULL) - strmake(buf, charsets_dir, FN_REFLEN-1); - else - { - if (test_if_hard_path(sharedir) || - is_prefix(sharedir, DEFAULT_CHARSET_HOME)) - strxmov(buf, sharedir, "/", CHARSET_DIR, NullS); - else - strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR, - NullS); - } - res= convert_dirname(buf,buf,NullS); - DBUG_PRINT("info",("charsets dir: '%s'", buf)); - DBUG_RETURN(res); -} - -CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE]; -CHARSET_INFO *default_charset_info = &my_charset_latin1; - -void add_compiled_collation(CHARSET_INFO *cs) -{ - all_charsets[cs->number]= cs; - cs->state|= MY_CS_AVAILABLE; -} - -static void *cs_alloc(size_t size) -{ - return my_once_alloc(size, MYF(MY_WME)); -} - - -#ifdef __NETWARE__ -my_bool STDCALL init_available_charsets(myf myflags) -#else -static my_bool init_available_charsets(myf myflags) -#endif -{ - char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; - my_bool error=FALSE; - /* - We have to use charset_initialized to not lock on THR_LOCK_charset - inside get_internal_charset... - */ - if (!charset_initialized) - { - CHARSET_INFO **cs; - /* - To make things thread safe we are not allowing other threads to interfere - while we may changing the cs_info_table - */ - pthread_mutex_lock(&THR_LOCK_charset); - if (!charset_initialized) - { - bzero(&all_charsets,sizeof(all_charsets)); - init_compiled_charsets(myflags); - - /* Copy compiled charsets */ - for (cs=all_charsets; - cs < all_charsets + array_elements(all_charsets); - cs++) - { - if (*cs) - { - if (cs[0]->ctype) - if (init_state_maps(*cs)) - *cs= NULL; - } - } - - strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); - error= my_read_charset_file(fname,myflags); - charset_initialized=1; - } - pthread_mutex_unlock(&THR_LOCK_charset); - } - return error; -} - - -void free_charsets(void) -{ - charset_initialized=0; -} - - -uint get_collation_number(const char *name) -{ - init_available_charsets(MYF(0)); - return get_collation_number_internal(name); -} - - -uint get_charset_number(const char *charset_name, uint cs_flags) -{ - CHARSET_INFO **cs; - init_available_charsets(MYF(0)); - - for (cs= all_charsets; - cs < all_charsets + array_elements(all_charsets); - cs++) - { - if ( cs[0] && cs[0]->csname && (cs[0]->state & cs_flags) && - !my_strcasecmp(&my_charset_latin1, cs[0]->csname, charset_name)) - return cs[0]->number; - } - return 0; -} - - -const char *get_charset_name(uint charset_number) -{ - CHARSET_INFO *cs; - init_available_charsets(MYF(0)); - - cs=all_charsets[charset_number]; - if (cs && (cs->number == charset_number) && cs->name ) - return (char*) cs->name; - - return (char*) "?"; /* this mimics find_type() */ -} - - -static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags) -{ - char buf[FN_REFLEN]; - CHARSET_INFO *cs; - - if ((cs= all_charsets[cs_number])) - { - if (cs->state & MY_CS_READY) /* if CS is already initialized */ - return cs; - - /* - To make things thread safe we are not allowing other threads to interfere - while we may changing the cs_info_table - */ - pthread_mutex_lock(&THR_LOCK_charset); - - if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ - { - strxmov(get_charsets_dir(buf), cs->csname, ".xml", NullS); - my_read_charset_file(buf,flags); - } - - if (cs->state & MY_CS_AVAILABLE) - { - if (!(cs->state & MY_CS_READY)) - { - if ((cs->cset->init && cs->cset->init(cs, cs_alloc)) || - (cs->coll->init && cs->coll->init(cs, cs_alloc))) - cs= NULL; - else - cs->state|= MY_CS_READY; - } - } - else - cs= NULL; - - pthread_mutex_unlock(&THR_LOCK_charset); - } - return cs; -} - - -CHARSET_INFO *get_charset(uint cs_number, myf flags) -{ - CHARSET_INFO *cs; - if (cs_number == default_charset_info->number) - return default_charset_info; - - (void) init_available_charsets(MYF(0)); /* If it isn't initialized */ - - if (!cs_number || cs_number > array_elements(all_charsets)) - return NULL; - - cs=get_internal_charset(cs_number, flags); - - if (!cs && (flags & MY_WME)) - { - char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; - strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); - cs_string[0]='#'; - int10_to_str(cs_number, cs_string+1, 10); - my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); - } - return cs; -} - -CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags) -{ - uint cs_number; - CHARSET_INFO *cs; - (void) init_available_charsets(MYF(0)); /* If it isn't initialized */ - - cs_number=get_collation_number(cs_name); - cs= cs_number ? get_internal_charset(cs_number,flags) : NULL; - - if (!cs && (flags & MY_WME)) - { - char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; - strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); - my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), cs_name, index_file); - } - - return cs; -} - - -CHARSET_INFO *get_charset_by_csname(const char *cs_name, - uint cs_flags, - myf flags) -{ - uint cs_number; - CHARSET_INFO *cs; - DBUG_ENTER("get_charset_by_csname"); - DBUG_PRINT("enter",("name: '%s'", cs_name)); - - (void) init_available_charsets(MYF(0)); /* If it isn't initialized */ - - cs_number= get_charset_number(cs_name, cs_flags); - cs= cs_number ? get_internal_charset(cs_number, flags) : NULL; - - if (!cs && (flags & MY_WME)) - { - char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; - strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); - my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); - } - - DBUG_RETURN(cs); -} - - -/** - Resolve character set by the character set name (utf8, latin1, ...). - - The function tries to resolve character set by the specified name. If - there is character set with the given name, it is assigned to the "cs" - parameter and FALSE is returned. If there is no such character set, - "default_cs" is assigned to the "cs" and TRUE is returned. - - @param[in] cs_name Character set name. - @param[in] default_cs Default character set. - @param[out] cs Variable to store character set. - - @return FALSE if character set was resolved successfully; TRUE if there - is no character set with given name. -*/ - -my_bool resolve_charset(const char *cs_name, - CHARSET_INFO *default_cs, - CHARSET_INFO **cs) -{ - *cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, MYF(0)); - - if (*cs == NULL) - { - *cs= default_cs; - return TRUE; - } - - return FALSE; -} - - -/** - Resolve collation by the collation name (utf8_general_ci, ...). - - The function tries to resolve collation by the specified name. If there - is collation with the given name, it is assigned to the "cl" parameter - and FALSE is returned. If there is no such collation, "default_cl" is - assigned to the "cl" and TRUE is returned. - - @param[out] cl Variable to store collation. - @param[in] cl_name Collation name. - @param[in] default_cl Default collation. - - @return FALSE if collation was resolved successfully; TRUE if there is no - collation with given name. -*/ - -my_bool resolve_collation(const char *cl_name, - CHARSET_INFO *default_cl, - CHARSET_INFO **cl) -{ - *cl= get_charset_by_name(cl_name, MYF(0)); - - if (*cl == NULL) - { - *cl= default_cl; - return TRUE; - } - - return FALSE; -} - - -/* - Escape string with backslashes (\) - - SYNOPSIS - escape_string_for_mysql() - charset_info Charset of the strings - to Buffer for escaped string - to_length Length of destination buffer, or 0 - from The string to escape - length The length of the string to escape - - DESCRIPTION - This escapes the contents of a string by adding backslashes before special - characters, and turning others into specific escape sequences, such as - turning newlines into \n and null bytes into \0. - - NOTE - To maintain compatibility with the old C API, to_length may be 0 to mean - "big enough" - - RETURN VALUES - (size_t) -1 The escaped string did not fit in the to buffer - # The length of the escaped string -*/ - -size_t escape_string_for_mysql(CHARSET_INFO *charset_info, - char *to, size_t to_length, - const char *from, size_t length) -{ - const char *to_start= to; - const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); - my_bool overflow= FALSE; -#ifdef USE_MB - my_bool use_mb_flag= use_mb(charset_info); -#endif - for (end= from + length; from < end; from++) - { - char escape= 0; -#ifdef USE_MB - int tmp_length; - if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end))) - { - if (to + tmp_length > to_end) - { - overflow= TRUE; - break; - } - while (tmp_length--) - *to++= *from++; - from--; - continue; - } - /* - If the next character appears to begin a multi-byte character, we - escape that first byte of that apparent multi-byte character. (The - character just looks like a multi-byte character -- if it were actually - a multi-byte character, it would have been passed through in the test - above.) - - Without this check, we can create a problem by converting an invalid - multi-byte character into a valid one. For example, 0xbf27 is not - a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \) - */ - if (use_mb_flag && (tmp_length= my_mbcharlen(charset_info, *from)) > 1) - escape= *from; - else -#endif - switch (*from) { - case 0: /* Must be escaped for 'mysql' */ - escape= '0'; - break; - case '\n': /* Must be escaped for logs */ - escape= 'n'; - break; - case '\r': - escape= 'r'; - break; - case '\\': - escape= '\\'; - break; - case '\'': - escape= '\''; - break; - case '"': /* Better safe than sorry */ - escape= '"'; - break; - case '\032': /* This gives problems on Win32 */ - escape= 'Z'; - break; - } - if (escape) - { - if (to + 2 > to_end) - { - overflow= TRUE; - break; - } - *to++= '\\'; - *to++= escape; - } - else - { - if (to + 1 > to_end) - { - overflow= TRUE; - break; - } - *to++= *from; - } - } - *to= 0; - return overflow ? (size_t) -1 : (size_t) (to - to_start); -} - - -#ifdef BACKSLASH_MBTAIL -static CHARSET_INFO *fs_cset_cache= NULL; - -CHARSET_INFO *fs_character_set() -{ - if (!fs_cset_cache) - { - char buf[10]= "cp"; - GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE, - buf+2, sizeof(buf)-3); - /* - We cannot call get_charset_by_name here - because fs_character_set() is executed before - LOCK_THD_charset mutex initialization, which - is used inside get_charset_by_name. - As we're now interested in cp932 only, - let's just detect it using strcmp(). - */ - fs_cset_cache= !strcmp(buf, "cp932") ? - &my_charset_cp932_japanese_ci : &my_charset_bin; - } - return fs_cset_cache; -} -#endif - -/* - Escape apostrophes by doubling them up - - SYNOPSIS - escape_quotes_for_mysql() - charset_info Charset of the strings - to Buffer for escaped string - to_length Length of destination buffer, or 0 - from The string to escape - length The length of the string to escape - - DESCRIPTION - This escapes the contents of a string by doubling up any apostrophes that - it contains. This is used when the NO_BACKSLASH_ESCAPES SQL_MODE is in - effect on the server. - - NOTE - To be consistent with escape_string_for_mysql(), to_length may be 0 to - mean "big enough" - - RETURN VALUES - ~0 The escaped string did not fit in the to buffer - >=0 The length of the escaped string -*/ - -size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, - char *to, size_t to_length, - const char *from, size_t length) -{ - const char *to_start= to; - const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); - my_bool overflow= FALSE; -#ifdef USE_MB - my_bool use_mb_flag= use_mb(charset_info); -#endif - for (end= from + length; from < end; from++) - { -#ifdef USE_MB - int tmp_length; - if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end))) - { - if (to + tmp_length > to_end) - { - overflow= TRUE; - break; - } - while (tmp_length--) - *to++= *from++; - from--; - continue; - } - /* - We don't have the same issue here with a non-multi-byte character being - turned into a multi-byte character by the addition of an escaping - character, because we are only escaping the ' character with itself. - */ -#endif - if (*from == '\'') - { - if (to + 2 > to_end) - { - overflow= TRUE; - break; - } - *to++= '\''; - *to++= '\''; - } - else - { - if (to + 1 > to_end) - { - overflow= TRUE; - break; - } - *to++= *from; - } - } - *to= 0; - return overflow ? (ulong)~0 : (ulong) (to - to_start); -} diff --git a/externals/mysql/mysys/checksum.c b/externals/mysql/mysys/checksum.c deleted file mode 100644 index 1d264b5432..0000000000 --- a/externals/mysql/mysys/checksum.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include -#include -#include - -ha_checksum my_crc_dbug_check= 1; /* Unlikely number */ - -/* - Calculate a long checksum for a memoryblock. - - SYNOPSIS - my_checksum() - crc start value for crc - pos pointer to memory block - length length of the block -*/ - -ha_checksum my_checksum(ha_checksum crc, const uchar *pos, size_t length) -{ - crc= (ha_checksum) crc32((uint)crc, pos, length); - DBUG_PRINT("info", ("crc: %lu", (ulong) crc)); - if (crc == my_crc_dbug_check) - my_debug_put_break_here(); - return crc; -} diff --git a/externals/mysql/mysys/default.c b/externals/mysql/mysys/default.c deleted file mode 100644 index 5e440b43fd..0000000000 --- a/externals/mysql/mysys/default.c +++ /dev/null @@ -1,1172 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/**************************************************************************** - Add all options from files named "group".cnf from the default_directories - before the command line arguments. - On Windows defaults will also search in the Windows directory for a file - called 'group'.ini - As long as the program uses the last argument for conflicting - options one only have to add a call to "load_defaults" to enable - use of default values. - pre- and end 'blank space' are removed from options and values. The - following escape sequences are recognized in values: \b \t \n \r \\ - - The following arguments are handled automaticly; If used, they must be - first argument on the command line! - --no-defaults ; no options are read. - --defaults-file=full-path-to-default-file ; Only this file will be read. - --defaults-extra-file=full-path-to-default-file ; Read this file before ~/ - --defaults-group-suffix ; Also read groups with concat(group, suffix) - --print-defaults ; Print the modified command line and exit -****************************************************************************/ - -#include "mysys_priv.h" -#include "m_string.h" -#include "m_ctype.h" -#include -#ifdef __WIN__ -#include -#endif - -/** - arguments separator - - load_defaults() loads arguments from config file and put them - before the arguments from command line, this separator is used to - separate the arguments loaded from config file and arguments user - provided on command line. - - Options with value loaded from config file are always in the form - '--option=value', while for command line options, the value can be - given as the next argument. Thus we used a separator so that - handle_options() can distinguish them. - - Note: any other places that does not need to distinguish them - should skip the separator. - - The content of arguments separator does not matter, one should only - check the pointer, use "----args-separator----" here to ease debug - if someone misused it. - - See BUG#25192 -*/ -const char *args_separator= "----args-separator----"; -const char *my_defaults_file=0; -const char *my_defaults_group_suffix=0; -char *my_defaults_extra_file=0; - -/* Which directories are searched for options (and in which order) */ - -#define MAX_DEFAULT_DIRS 6 -#define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ -static const char **default_directories = NULL; - -#ifdef __WIN__ -static const char *f_extensions[]= { ".ini", ".cnf", 0 }; -#define NEWLINE "\r\n" -#else -static const char *f_extensions[]= { ".cnf", 0 }; -#define NEWLINE "\n" -#endif - -static int handle_default_option(void *in_ctx, const char *group_name, - const char *option); - -/* - This structure defines the context that we pass to callback - function 'handle_default_option' used in search_default_file - to process each option. This context is used if search_default_file - was called from load_defaults. -*/ - -struct handle_option_ctx -{ - MEM_ROOT *alloc; - DYNAMIC_ARRAY *args; - TYPELIB *group; -}; - -static int search_default_file(Process_option_func func, void *func_ctx, - const char *dir, const char *config_file); -static int search_default_file_with_ext(Process_option_func func, - void *func_ctx, - const char *dir, const char *ext, - const char *config_file, int recursion_level); - - -/** - Create the list of default directories. - - @param alloc MEM_ROOT where the list of directories is stored - - @details - The directories searched, in order, are: - - Windows: GetSystemWindowsDirectory() - - Windows: GetWindowsDirectory() - - Windows: C:/ - - Windows: Directory above where the executable is located - - Netware: sys:/etc/ - - Unix: /etc/ - - Unix: /etc/mysql/ - - Unix: --sysconfdir= (compile-time option) - - ALL: getenv(DEFAULT_HOME_ENV) - - ALL: --defaults-extra-file= (run-time option) - - Unix: ~/ - - On all systems, if a directory is already in the list, it will be moved - to the end of the list. This avoids reading defaults files multiple times, - while ensuring the correct precedence. - - @retval NULL Failure (out of memory, probably) - @retval other Pointer to NULL-terminated array of default directories -*/ - -static const char **init_default_directories(MEM_ROOT *alloc); - - -static char *remove_end_comment(char *ptr); - - -/* - Process config files in default directories. - - SYNOPSIS - my_search_option_files() - conf_file Basename for configuration file to search for. - If this is a path, then only this file is read. - argc Pointer to argc of original program - argv Pointer to argv of original program - args_used Pointer to variable for storing the number of - arguments used. - func Pointer to the function to process options - func_ctx It's context. Usually it is the structure to - store additional options. - DESCRIPTION - Process the default options from argc & argv - Read through each found config file looks and calls 'func' to process - each option. - - NOTES - --defaults-group-suffix is only processed if we are called from - load_defaults(). - - - RETURN - 0 ok - 1 given cinf_file doesn't exist - 2 out of memory - - The global variable 'my_defaults_group_suffix' is updated with value for - --defaults_group_suffix -*/ - -int my_search_option_files(const char *conf_file, int *argc, char ***argv, - uint *args_used, Process_option_func func, - void *func_ctx, const char **default_directories) -{ - const char **dirs, *forced_default_file, *forced_extra_defaults; - int error= 0; - DBUG_ENTER("my_search_option_files"); - - /* Check if we want to force the use a specific default file */ - *args_used+= get_defaults_options(*argc - *args_used, *argv + *args_used, - (char **) &forced_default_file, - (char **) &forced_extra_defaults, - (char **) &my_defaults_group_suffix); - - if (! my_defaults_group_suffix) - my_defaults_group_suffix= getenv(STRINGIFY_ARG(DEFAULT_GROUP_SUFFIX_ENV)); - - if (forced_extra_defaults) - my_defaults_extra_file= (char *) forced_extra_defaults; - - if (forced_default_file) - my_defaults_file= forced_default_file; - - /* - We can only handle 'defaults-group-suffix' if we are called from - load_defaults() as otherwise we can't know the type of 'func_ctx' - */ - - if (my_defaults_group_suffix && func == handle_default_option) - { - /* Handle --defaults-group-suffix= */ - uint i; - const char **extra_groups; - const size_t instance_len= strlen(my_defaults_group_suffix); - struct handle_option_ctx *ctx= (struct handle_option_ctx*) func_ctx; - char *ptr; - TYPELIB *group= ctx->group; - - if (!(extra_groups= - (const char**)alloc_root(ctx->alloc, - (2*group->count+1)*sizeof(char*)))) - DBUG_RETURN(2); - - for (i= 0; i < group->count; i++) - { - size_t len; - extra_groups[i]= group->type_names[i]; /** copy group */ - - len= strlen(extra_groups[i]); - if (!(ptr= alloc_root(ctx->alloc, (uint) (len+instance_len+1)))) - DBUG_RETURN(2); - - extra_groups[i+group->count]= ptr; - - /** Construct new group */ - memcpy(ptr, extra_groups[i], len); - memcpy(ptr+len, my_defaults_group_suffix, instance_len+1); - } - - group->count*= 2; - group->type_names= extra_groups; - group->type_names[group->count]= 0; - } - - if (forced_default_file) - { - if ((error= search_default_file_with_ext(func, func_ctx, "", "", - forced_default_file, 0)) < 0) - goto err; - if (error > 0) - { - fprintf(stderr, "Could not open required defaults file: %s\n", - forced_default_file); - goto err; - } - } - else if (dirname_length(conf_file)) - { - if ((error= search_default_file(func, func_ctx, NullS, conf_file)) < 0) - goto err; - } - else - { - for (dirs= default_directories ; *dirs; dirs++) - { - if (**dirs) - { - if (search_default_file(func, func_ctx, *dirs, conf_file) < 0) - goto err; - } - else if (my_defaults_extra_file) - { - if ((error= search_default_file_with_ext(func, func_ctx, "", "", - my_defaults_extra_file, 0)) < 0) - goto err; /* Fatal error */ - if (error > 0) - { - fprintf(stderr, "Could not open required defaults file: %s\n", - my_defaults_extra_file); - goto err; - } - } - } - } - - DBUG_RETURN(0); - -err: - fprintf(stderr,"Fatal error in defaults handling. Program aborted\n"); - DBUG_RETURN(1); -} - - -/* - The option handler for load_defaults. - - SYNOPSIS - handle_deault_option() - in_ctx Handler context. In this case it is a - handle_option_ctx structure. - group_name The name of the group the option belongs to. - option The very option to be processed. It is already - prepared to be used in argv (has -- prefix). If it - is NULL, we are handling a new group (section). - - DESCRIPTION - This handler checks whether a group is one of the listed and adds an option - to the array if yes. Some other handler can record, for instance, all - groups and their options, not knowing in advance the names and amount of - groups. - - RETURN - 0 - ok - 1 - error occured -*/ - -static int handle_default_option(void *in_ctx, const char *group_name, - const char *option) -{ - char *tmp; - struct handle_option_ctx *ctx= (struct handle_option_ctx *) in_ctx; - - if (!option) - return 0; - - if (find_type((char *)group_name, ctx->group, 3)) - { - if (!(tmp= alloc_root(ctx->alloc, strlen(option) + 1))) - return 1; - if (insert_dynamic(ctx->args, (uchar*) &tmp)) - return 1; - strmov(tmp, option); - } - - return 0; -} - - -/* - Gets options from the command line - - SYNOPSIS - get_defaults_options() - argc Pointer to argc of original program - argv Pointer to argv of original program - defaults --defaults-file option - extra_defaults --defaults-extra-file option - - RETURN - # Number of arguments used from *argv - defaults and extra_defaults will be set to option of the appropriate - items of argv array, or to NULL if there are no such options -*/ - -int get_defaults_options(int argc, char **argv, - char **defaults, - char **extra_defaults, - char **group_suffix) -{ - int org_argc= argc, prev_argc= 0; - *defaults= *extra_defaults= *group_suffix= 0; - - while (argc >= 2 && argc != prev_argc) - { - /* Skip program name or previously handled argument */ - argv++; - prev_argc= argc; /* To check if we found */ - if (!*defaults && is_prefix(*argv,"--defaults-file=")) - { - *defaults= *argv + sizeof("--defaults-file=")-1; - argc--; - continue; - } - if (!*extra_defaults && is_prefix(*argv,"--defaults-extra-file=")) - { - *extra_defaults= *argv + sizeof("--defaults-extra-file=")-1; - argc--; - continue; - } - if (!*group_suffix && is_prefix(*argv, "--defaults-group-suffix=")) - { - *group_suffix= *argv + sizeof("--defaults-group-suffix=")-1; - argc--; - continue; - } - } - return org_argc - argc; -} - -/* - Wrapper around my_load_defaults() for interface compatibility. - - SYNOPSIS - load_defaults() - conf_file Basename for configuration file to search for. - If this is a path, then only this file is read. - groups Which [group] entrys to read. - Points to an null terminated array of pointers - argc Pointer to argc of original program - argv Pointer to argv of original program - - NOTES - - This function is NOT thread-safe as it uses a global pointer internally. - See also notes for my_load_defaults(). - - RETURN - 0 ok - 1 The given conf_file didn't exists -*/ -int load_defaults(const char *conf_file, const char **groups, - int *argc, char ***argv) -{ - return my_load_defaults(conf_file, groups, argc, argv, &default_directories); -} - -/* - Read options from configurations files - - SYNOPSIS - my_load_defaults() - conf_file Basename for configuration file to search for. - If this is a path, then only this file is read. - groups Which [group] entrys to read. - Points to an null terminated array of pointers - argc Pointer to argc of original program - argv Pointer to argv of original program - default_directories Pointer to a location where a pointer to the list - of default directories will be stored - - IMPLEMENTATION - - Read options from configuration files and put them BEFORE the arguments - that are already in argc and argv. This way the calling program can - easily command line options override options in configuration files - - NOTES - In case of fatal error, the function will print a warning and do - exit(1) - - To free used memory one should call free_defaults() with the argument - that was put in *argv - - RETURN - - If successful, 0 is returned. If 'default_directories' is not NULL, - a pointer to the array of default directory paths is stored to a location - it points to. That stored value must be passed to my_search_option_files() - later. - - - 1 is returned if the given conf_file didn't exist. In this case, the - value pointed to by default_directories is undefined. -*/ - - -int my_load_defaults(const char *conf_file, const char **groups, - int *argc, char ***argv, const char ***default_directories) -{ - DYNAMIC_ARRAY args; - TYPELIB group; - my_bool found_print_defaults= 0; - uint args_used= 0; - int error= 0; - MEM_ROOT alloc; - char *ptr,**res; - struct handle_option_ctx ctx; - const char **dirs; - DBUG_ENTER("load_defaults"); - - init_alloc_root(&alloc,512,0); - if ((dirs= init_default_directories(&alloc)) == NULL) - goto err; - /* - Check if the user doesn't want any default option processing - --no-defaults is always the first option - */ - if (*argc >= 2 && !strcmp(argv[0][1],"--no-defaults")) - { - /* remove the --no-defaults argument and return only the other arguments */ - uint i; - if (!(ptr=(char*) alloc_root(&alloc,sizeof(alloc)+ - (*argc + 1)*sizeof(char*)))) - goto err; - res= (char**) (ptr+sizeof(alloc)); - res[0]= **argv; /* Copy program name */ - /* set arguments separator */ - res[1]= (char *)args_separator; - for (i=2 ; i < (uint) *argc ; i++) - res[i]=argv[0][i]; - res[i]=0; /* End pointer */ - *argv=res; - *(MEM_ROOT*) ptr= alloc; /* Save alloc root for free */ - if (default_directories) - *default_directories= dirs; - DBUG_RETURN(0); - } - - group.count=0; - group.name= "defaults"; - group.type_names= groups; - - for (; *groups ; groups++) - group.count++; - - if (my_init_dynamic_array(&args, sizeof(char*),*argc, 32)) - goto err; - - ctx.alloc= &alloc; - ctx.args= &args; - ctx.group= &group; - - error= my_search_option_files(conf_file, argc, argv, &args_used, - handle_default_option, (void *) &ctx, - dirs); - /* - Here error contains <> 0 only if we have a fully specified conf_file - or a forced default file - */ - if (!(ptr=(char*) alloc_root(&alloc,sizeof(alloc)+ - (args.elements + *argc + 1 + 1) *sizeof(char*)))) - goto err; - res= (char**) (ptr+sizeof(alloc)); - - /* copy name + found arguments + command line arguments to new array */ - res[0]= argv[0][0]; /* Name MUST be set, even by embedded library */ - memcpy((uchar*) (res+1), args.buffer, args.elements*sizeof(char*)); - /* Skip --defaults-xxx options */ - (*argc)-= args_used; - (*argv)+= args_used; - - /* - Check if we wan't to see the new argument list - This options must always be the last of the default options - */ - if (*argc >= 2 && !strcmp(argv[0][1],"--print-defaults")) - { - found_print_defaults=1; - --*argc; ++*argv; /* skip argument */ - } - - /* set arguments separator for arguments from config file and - command line */ - res[args.elements+1]= (char *)args_separator; - - if (*argc) - memcpy((uchar*) (res+1+args.elements+1), (char*) ((*argv)+1), - (*argc-1)*sizeof(char*)); - res[args.elements+ *argc+1]=0; /* last null */ - - (*argc)+=args.elements+1; - *argv= (char**) res; - *(MEM_ROOT*) ptr= alloc; /* Save alloc root for free */ - delete_dynamic(&args); - if (found_print_defaults) - { - int i; - printf("%s would have been started with the following arguments:\n", - **argv); - for (i=1 ; i < *argc ; i++) - if ((*argv)[i] != args_separator) /* skip arguments separator */ - printf("%s ", (*argv)[i]); - puts(""); - exit(0); - } - - if (error == 0 && default_directories) - *default_directories= dirs; - - DBUG_RETURN(error); - - err: - fprintf(stderr,"Fatal error in defaults handling. Program aborted\n"); - exit(1); - return 0; /* Keep compiler happy */ -} - - -void free_defaults(char **argv) -{ - MEM_ROOT ptr; - memcpy_fixed((char*) &ptr,(char *) argv - sizeof(ptr), sizeof(ptr)); - free_root(&ptr,MYF(0)); -} - - -static int search_default_file(Process_option_func opt_handler, - void *handler_ctx, - const char *dir, - const char *config_file) -{ - char **ext; - const char *empty_list[]= { "", 0 }; - my_bool have_ext= fn_ext(config_file)[0] != 0; - const char **exts_to_use= have_ext ? empty_list : f_extensions; - - for (ext= (char**) exts_to_use; *ext; ext++) - { - int error; - if ((error= search_default_file_with_ext(opt_handler, handler_ctx, - dir, *ext, - config_file, 0)) < 0) - return error; - } - return 0; -} - - -/* - Skip over keyword and get argument after keyword - - SYNOPSIS - get_argument() - keyword Include directive keyword - kwlen Length of keyword - ptr Pointer to the keword in the line under process - line line number - - RETURN - 0 error - # Returns pointer to the argument after the keyword. -*/ - -static char *get_argument(const char *keyword, size_t kwlen, - char *ptr, char *name, uint line) -{ - char *end; - - /* Skip over "include / includedir keyword" and following whitespace */ - - for (ptr+= kwlen - 1; - my_isspace(&my_charset_latin1, ptr[0]); - ptr++) - {} - - /* - Trim trailing whitespace from directory name - The -1 below is for the newline added by fgets() - Note that my_isspace() is true for \r and \n - */ - for (end= ptr + strlen(ptr) - 1; - my_isspace(&my_charset_latin1, *(end - 1)); - end--) - {} - end[0]= 0; /* Cut off end space */ - - /* Print error msg if there is nothing after !include* directive */ - if (end <= ptr) - { - fprintf(stderr, - "error: Wrong '!%s' directive in config file: %s at line %d\n", - keyword, name, line); - return 0; - } - return ptr; -} - - -/* - Open a configuration file (if exists) and read given options from it - - SYNOPSIS - search_default_file_with_ext() - opt_handler Option handler function. It is used to process - every separate option. - handler_ctx Pointer to the structure to store actual - parameters of the function. - dir directory to read - ext Extension for configuration file - config_file Name of configuration file - group groups to read - recursion_level the level of recursion, got while processing - "!include" or "!includedir" - - RETURN - 0 Success - -1 Fatal error, abort - 1 File not found (Warning) -*/ - -static int search_default_file_with_ext(Process_option_func opt_handler, - void *handler_ctx, - const char *dir, - const char *ext, - const char *config_file, - int recursion_level) -{ - char name[FN_REFLEN + 10], buff[4096], curr_gr[4096], *ptr, *end, **tmp_ext; - char *value, option[4096], tmp[FN_REFLEN]; - static const char includedir_keyword[]= "includedir"; - static const char include_keyword[]= "include"; - const int max_recursion_level= 10; - FILE *fp; - uint line=0; - my_bool found_group=0; - uint i; - MY_DIR *search_dir; - FILEINFO *search_file; - - if ((dir ? strlen(dir) : 0 )+strlen(config_file) >= FN_REFLEN-3) - return 0; /* Ignore wrong paths */ - if (dir) - { - end=convert_dirname(name, dir, NullS); - if (dir[0] == FN_HOMELIB) /* Add . to filenames in home */ - *end++='.'; - strxmov(end,config_file,ext,NullS); - } - else - { - strmov(name,config_file); - } - fn_format(name,name,"","",4); -#if !defined(__WIN__) && !defined(__NETWARE__) - { - MY_STAT stat_info; - if (!my_stat(name,&stat_info,MYF(0))) - return 1; - /* - Ignore world-writable regular files. - This is mainly done to protect us to not read a file created by - the mysqld server, but the check is still valid in most context. - */ - if ((stat_info.st_mode & S_IWOTH) && - (stat_info.st_mode & S_IFMT) == S_IFREG) - { - fprintf(stderr, "Warning: World-writable config file '%s' is ignored\n", - name); - return 0; - } - } -#endif - if (!(fp= my_fopen(name, O_RDONLY, MYF(0)))) - return 1; /* Ignore wrong files */ - - while (fgets(buff, sizeof(buff) - 1, fp)) - { - line++; - /* Ignore comment and empty lines */ - for (ptr= buff; my_isspace(&my_charset_latin1, *ptr); ptr++) - {} - - if (*ptr == '#' || *ptr == ';' || !*ptr) - continue; - - /* Configuration File Directives */ - if ((*ptr == '!')) - { - if (recursion_level >= max_recursion_level) - { - for (end= ptr + strlen(ptr) - 1; - my_isspace(&my_charset_latin1, *(end - 1)); - end--) - {} - end[0]= 0; - fprintf(stderr, - "Warning: skipping '%s' directive as maximum include" - "recursion level was reached in file %s at line %d\n", - ptr, name, line); - continue; - } - - /* skip over `!' and following whitespace */ - for (++ptr; my_isspace(&my_charset_latin1, ptr[0]); ptr++) - {} - - if ((!strncmp(ptr, includedir_keyword, - sizeof(includedir_keyword) - 1)) && - my_isspace(&my_charset_latin1, ptr[sizeof(includedir_keyword) - 1])) - { - if (!(ptr= get_argument(includedir_keyword, - sizeof(includedir_keyword), - ptr, name, line))) - goto err; - - if (!(search_dir= my_dir(ptr, MYF(MY_WME)))) - goto err; - - for (i= 0; i < (uint) search_dir->number_off_files; i++) - { - search_file= search_dir->dir_entry + i; - ext= fn_ext(search_file->name); - - /* check extension */ - for (tmp_ext= (char**) f_extensions; *tmp_ext; tmp_ext++) - { - if (!strcmp(ext, *tmp_ext)) - break; - } - - if (*tmp_ext) - { - fn_format(tmp, search_file->name, ptr, "", - MY_UNPACK_FILENAME | MY_SAFE_PATH); - - search_default_file_with_ext(opt_handler, handler_ctx, "", "", tmp, - recursion_level + 1); - } - } - - my_dirend(search_dir); - } - else if ((!strncmp(ptr, include_keyword, sizeof(include_keyword) - 1)) && - my_isspace(&my_charset_latin1, ptr[sizeof(include_keyword)-1])) - { - if (!(ptr= get_argument(include_keyword, - sizeof(include_keyword), ptr, - name, line))) - goto err; - - search_default_file_with_ext(opt_handler, handler_ctx, "", "", ptr, - recursion_level + 1); - } - - continue; - } - - if (*ptr == '[') /* Group name */ - { - found_group=1; - if (!(end=(char *) strchr(++ptr,']'))) - { - fprintf(stderr, - "error: Wrong group definition in config file: %s at line %d\n", - name,line); - goto err; - } - /* Remove end space */ - for ( ; my_isspace(&my_charset_latin1,end[-1]) ; end--) ; - end[0]=0; - - strmake(curr_gr, ptr, min((size_t) (end-ptr)+1, sizeof(curr_gr)-1)); - - /* signal that a new group is found */ - opt_handler(handler_ctx, curr_gr, NULL); - - continue; - } - if (!found_group) - { - fprintf(stderr, - "error: Found option without preceding group in config file: %s at line: %d\n", - name,line); - goto err; - } - - - end= remove_end_comment(ptr); - if ((value= strchr(ptr, '='))) - end= value; /* Option without argument */ - for ( ; my_isspace(&my_charset_latin1,end[-1]) ; end--) ; - if (!value) - { - strmake(strmov(option,"--"),ptr, (size_t) (end-ptr)); - if (opt_handler(handler_ctx, curr_gr, option)) - goto err; - } - else - { - /* Remove pre- and end space */ - char *value_end; - for (value++ ; my_isspace(&my_charset_latin1,*value); value++) ; - value_end=strend(value); - /* - We don't have to test for value_end >= value as we know there is - an '=' before - */ - for ( ; my_isspace(&my_charset_latin1,value_end[-1]) ; value_end--) ; - if (value_end < value) /* Empty string */ - value_end=value; - - /* remove quotes around argument */ - if ((*value == '\"' || *value == '\'') && /* First char is quote */ - (value + 1 < value_end ) && /* String is longer than 1 */ - *value == value_end[-1] ) /* First char is equal to last char */ - { - value++; - value_end--; - } - ptr=strnmov(strmov(option,"--"),ptr,(size_t) (end-ptr)); - *ptr++= '='; - - for ( ; value != value_end; value++) - { - if (*value == '\\' && value != value_end-1) - { - switch(*++value) { - case 'n': - *ptr++='\n'; - break; - case 't': - *ptr++= '\t'; - break; - case 'r': - *ptr++ = '\r'; - break; - case 'b': - *ptr++ = '\b'; - break; - case 's': - *ptr++= ' '; /* space */ - break; - case '\"': - *ptr++= '\"'; - break; - case '\'': - *ptr++= '\''; - break; - case '\\': - *ptr++= '\\'; - break; - default: /* Unknown; Keep '\' */ - *ptr++= '\\'; - *ptr++= *value; - break; - } - } - else - *ptr++= *value; - } - *ptr=0; - if (opt_handler(handler_ctx, curr_gr, option)) - goto err; - } - } - my_fclose(fp,MYF(0)); - return(0); - - err: - my_fclose(fp,MYF(0)); - return -1; /* Fatal error */ -} - - -static char *remove_end_comment(char *ptr) -{ - char quote= 0; /* we are inside quote marks */ - char escape= 0; /* symbol is protected by escape chagacter */ - - for (; *ptr; ptr++) - { - if ((*ptr == '\'' || *ptr == '\"') && !escape) - { - if (!quote) - quote= *ptr; - else if (quote == *ptr) - quote= 0; - } - /* We are not inside a string */ - if (!quote && *ptr == '#') - { - *ptr= 0; - return ptr; - } - escape= (quote && *ptr == '\\' && !escape); - } - return ptr; -} - -void my_print_default_files(const char *conf_file) -{ - const char *empty_list[]= { "", 0 }; - my_bool have_ext= fn_ext(conf_file)[0] != 0; - const char **exts_to_use= have_ext ? empty_list : f_extensions; - char name[FN_REFLEN], **ext; - - puts("\nDefault options are read from the following files in the given order:"); - - if (dirname_length(conf_file)) - fputs(conf_file,stdout); - else - { - const char **dirs; - MEM_ROOT alloc; - init_alloc_root(&alloc,512,0); - - if ((dirs= init_default_directories(&alloc)) == NULL) - { - fputs("Internal error initializing default directories list", stdout); - } - else - { - for ( ; *dirs; dirs++) - { - for (ext= (char**) exts_to_use; *ext; ext++) - { - const char *pos; - char *end; - if (**dirs) - pos= *dirs; - else if (my_defaults_extra_file) - pos= my_defaults_extra_file; - else - continue; - end= convert_dirname(name, pos, NullS); - if (name[0] == FN_HOMELIB) /* Add . to filenames in home */ - *end++= '.'; - strxmov(end, conf_file, *ext, " ", NullS); - fputs(name, stdout); - } - } - } - - free_root(&alloc, MYF(0)); - } - puts(""); -} - -void print_defaults(const char *conf_file, const char **groups) -{ - const char **groups_save= groups; - my_print_default_files(conf_file); - - fputs("The following groups are read:",stdout); - for ( ; *groups ; groups++) - { - fputc(' ',stdout); - fputs(*groups,stdout); - } - - if (my_defaults_group_suffix) - { - groups= groups_save; - for ( ; *groups ; groups++) - { - fputc(' ',stdout); - fputs(*groups,stdout); - fputs(my_defaults_group_suffix,stdout); - } - } - puts("\nThe following options may be given as the first argument:\n\ ---print-defaults Print the program argument list and exit\n\ ---no-defaults Don't read default options from any options file\n\ ---defaults-file=# Only read default options from the given file #\n\ ---defaults-extra-file=# Read this file after the global files are read"); -} - - -static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs) -{ - char buf[FN_REFLEN]; - size_t len; - char *p; - my_bool err __attribute__((unused)); - - len= normalize_dirname(buf, dir); - if (!(p= strmake_root(alloc, buf, len))) - return 1; /* Failure */ - /* Should never fail if DEFAULT_DIRS_SIZE is correct size */ - err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE); - DBUG_ASSERT(err == FALSE); - - return 0; -} - - -#ifdef __WIN__ -/* - This wrapper for GetSystemWindowsDirectory() will dynamically bind to the - function if it is available, emulate it on NT4 Terminal Server by stripping - the \SYSTEM32 from the end of the results of GetSystemDirectory(), or just - return GetSystemDirectory(). - */ - -typedef UINT (WINAPI *GET_SYSTEM_WINDOWS_DIRECTORY)(LPSTR, UINT); - -static size_t my_get_system_windows_directory(char *buffer, size_t size) -{ - size_t count; - GET_SYSTEM_WINDOWS_DIRECTORY - func_ptr= (GET_SYSTEM_WINDOWS_DIRECTORY) - GetProcAddress(GetModuleHandle("kernel32.dll"), - "GetSystemWindowsDirectoryA"); - - if (func_ptr) - return func_ptr(buffer, (uint) size); - - /* - Windows NT 4.0 Terminal Server Edition: - To retrieve the shared Windows directory, call GetSystemDirectory and - trim the "System32" element from the end of the returned path. - */ - count= GetSystemDirectory(buffer, (uint) size); - if (count > 8 && stricmp(buffer+(count-8), "\\System32") == 0) - { - count-= 8; - buffer[count] = '\0'; - } - return count; -} - - -static const char *my_get_module_parent(char *buf, size_t size) -{ - char *last= NULL; - char *end; - if (!GetModuleFileName(NULL, buf, (DWORD) size)) - return NULL; - end= strend(buf); - - /* - Look for the second-to-last \ in the filename, but hang on - to a pointer after the last \ in case we're in the root of - a drive. - */ - for ( ; end > buf; end--) - { - if (*end == FN_LIBCHAR) - { - if (last) - { - /* Keep the last '\' as this works both with D:\ and a directory */ - end[1]= 0; - break; - } - last= end; - } - } - - return buf; -} -#endif /* __WIN__ */ - - -static const char **init_default_directories(MEM_ROOT *alloc) -{ - const char **dirs; - char *env; - int errors= 0; - - dirs= (const char **)alloc_root(alloc, DEFAULT_DIRS_SIZE * sizeof(char *)); - if (dirs == NULL) - return NULL; - bzero((char *) dirs, DEFAULT_DIRS_SIZE * sizeof(char *)); - -#ifdef __WIN__ - - { - char fname_buffer[FN_REFLEN]; - if (my_get_system_windows_directory(fname_buffer, sizeof(fname_buffer))) - errors += add_directory(alloc, fname_buffer, dirs); - - if (GetWindowsDirectory(fname_buffer, sizeof(fname_buffer))) - errors += add_directory(alloc, fname_buffer, dirs); - - errors += add_directory(alloc, "C:/", dirs); - - if (my_get_module_parent(fname_buffer, sizeof(fname_buffer)) != NULL) - errors += add_directory(alloc, fname_buffer, dirs); - } - -#elif defined(__NETWARE__) - - errors += add_directory(alloc, "sys:/etc/", dirs); - -#else - - errors += add_directory(alloc, "/etc/", dirs); - errors += add_directory(alloc, "/etc/mysql/", dirs); - -#if defined(DEFAULT_SYSCONFDIR) - if (DEFAULT_SYSCONFDIR[0]) - errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); -#endif /* DEFAULT_SYSCONFDIR */ - -#endif - - if ((env= getenv(STRINGIFY_ARG(DEFAULT_HOME_ENV)))) - errors += add_directory(alloc, env, dirs); - - /* Placeholder for --defaults-extra-file= */ - errors += add_directory(alloc, "", dirs); - -#if !defined(__WIN__) && !defined(__NETWARE__) - errors += add_directory(alloc, "~/", dirs); -#endif - - return (errors > 0 ? NULL : dirs); -} diff --git a/externals/mysql/mysys/default_modify.c b/externals/mysql/mysys/default_modify.c deleted file mode 100644 index 35555f5766..0000000000 --- a/externals/mysql/mysys/default_modify.c +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright (C) 2005 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "my_global.h" -#include "mysys_priv.h" -#include "m_string.h" -#include - -#define BUFF_SIZE 1024 -#define RESERVE 1024 /* Extend buffer with this extent */ - -#ifdef _WIN32 -#define NEWLINE "\r\n" -#define NEWLINE_LEN 2 -#else -#define NEWLINE "\n" -#define NEWLINE_LEN 1 -#endif - -static char *add_option(char *dst, const char *option_value, - const char *option, int remove_option); - - -/* - Add/remove option to the option file section. - - SYNOPSYS - modify_defaults_file() - file_location The location of configuration file to edit - option The name of the option to look for (can be NULL) - option value The value of the option we would like to set (can be NULL) - section_name The name of the section (must be NOT NULL) - remove_option This defines what we want to remove: - - MY_REMOVE_NONE -- nothing to remove; - - MY_REMOVE_OPTION -- remove the specified option; - - MY_REMOVE_SECTION -- remove the specified section; - IMPLEMENTATION - We open the option file first, then read the file line-by-line, - looking for the section we need. At the same time we put these lines - into a buffer. Then we look for the option within this section and - change/remove it. In the end we get a buffer with modified version of the - file. Then we write it to the file, truncate it if needed and close it. - Note that there is a small time gap, when the file is incomplete, - and this theoretically might introduce a problem. - - RETURN - 0 - ok - 1 - some error has occured. Probably due to the lack of resourses - 2 - cannot open the file -*/ - -int modify_defaults_file(const char *file_location, const char *option, - const char *option_value, - const char *section_name, int remove_option) -{ - FILE *cnf_file; - MY_STAT file_stat; - char linebuff[BUFF_SIZE], *src_ptr, *dst_ptr, *file_buffer; - size_t opt_len= 0, optval_len= 0, sect_len; - uint nr_newlines= 0, buffer_size; - my_bool in_section= FALSE, opt_applied= 0; - uint reserve_extended; - uint new_opt_len; - int reserve_occupied= 0; - DBUG_ENTER("modify_defaults_file"); - - if (!(cnf_file= my_fopen(file_location, O_RDWR | O_BINARY, MYF(0)))) - DBUG_RETURN(2); - - /* my_fstat doesn't use the flag parameter */ - if (my_fstat(my_fileno(cnf_file), &file_stat, MYF(0))) - goto malloc_err; - - if (option && option_value) - { - opt_len= strlen(option); - optval_len= strlen(option_value); - } - - new_opt_len= opt_len + 1 + optval_len + NEWLINE_LEN; - - /* calculate the size of the buffer we need */ - reserve_extended= (opt_len + - 1 + /* For '=' char */ - optval_len + /* Option value len */ - NEWLINE_LEN + /* Space for newline */ - RESERVE); /* Some additional space */ - - buffer_size= (uint)(file_stat.st_size + - 1); /* The ending zero */ - - /* - Reserve space to read the contents of the file and some more - for the option we want to add. - */ - if (!(file_buffer= (char*) my_malloc(buffer_size + reserve_extended, - MYF(MY_WME)))) - goto malloc_err; - - sect_len= strlen(section_name); - - for (dst_ptr= file_buffer; fgets(linebuff, BUFF_SIZE, cnf_file); ) - { - /* Skip over whitespaces */ - for (src_ptr= linebuff; my_isspace(&my_charset_latin1, *src_ptr); - src_ptr++) - {} - - if (!*src_ptr) /* Empty line */ - { - nr_newlines++; - continue; - } - - /* correct the option (if requested) */ - if (option && in_section && !strncmp(src_ptr, option, opt_len) && - (*(src_ptr + opt_len) == '=' || - my_isspace(&my_charset_latin1, *(src_ptr + opt_len)) || - *(src_ptr + opt_len) == '\0')) - { - char *old_src_ptr= src_ptr; - src_ptr= strend(src_ptr+ opt_len); /* Find the end of the line */ - - /* could be negative */ - reserve_occupied+= (int) new_opt_len - (int) (src_ptr - old_src_ptr); - if (reserve_occupied >= (int) reserve_extended) - { - reserve_extended= (uint) reserve_occupied + RESERVE; - if (!(file_buffer= (char*) my_realloc(file_buffer, buffer_size + - reserve_extended, - MYF(MY_WME|MY_FREE_ON_ERROR)))) - goto malloc_err; - } - opt_applied= 1; - dst_ptr= add_option(dst_ptr, option_value, option, remove_option); - } - else - { - /* - If we are going to the new group and have an option to apply, do - it now. If we are removing a single option or the whole section - this will only trigger opt_applied flag. - */ - - if (in_section && !opt_applied && *src_ptr == '[') - { - dst_ptr= add_option(dst_ptr, option_value, option, remove_option); - opt_applied= 1; /* set the flag to do write() later */ - reserve_occupied= new_opt_len+ opt_len + 1 + NEWLINE_LEN; - } - - for (; nr_newlines; nr_newlines--) - dst_ptr= strmov(dst_ptr, NEWLINE); - - /* Skip the section if MY_REMOVE_SECTION was given */ - if (!in_section || remove_option != MY_REMOVE_SECTION) - dst_ptr= strmov(dst_ptr, linebuff); - } - /* Look for a section */ - if (*src_ptr == '[') - { - /* Copy the line to the buffer */ - if (!strncmp(++src_ptr, section_name, sect_len)) - { - src_ptr+= sect_len; - /* Skip over whitespaces. They are allowed after section name */ - for (; my_isspace(&my_charset_latin1, *src_ptr); src_ptr++) - {} - - if (*src_ptr != ']') - { - in_section= FALSE; - continue; /* Missing closing parenthesis. Assume this was no group */ - } - - if (remove_option == MY_REMOVE_SECTION) - dst_ptr= dst_ptr - strlen(linebuff); - - in_section= TRUE; - } - else - in_section= FALSE; /* mark that this section is of no interest to us */ - } - } - - /* - File ended. Apply an option or set opt_applied flag (in case of - MY_REMOVE_SECTION) so that the changes are saved. Do not do anything - if we are removing non-existent option. - */ - - if (!opt_applied && in_section && (remove_option != MY_REMOVE_OPTION)) - { - /* New option still remains to apply at the end */ - if (!remove_option && *(dst_ptr - 1) != '\n') - dst_ptr= strmov(dst_ptr, NEWLINE); - dst_ptr= add_option(dst_ptr, option_value, option, remove_option); - opt_applied= 1; - } - for (; nr_newlines; nr_newlines--) - dst_ptr= strmov(dst_ptr, NEWLINE); - - if (opt_applied) - { - /* Don't write the file if there are no changes to be made */ - if (my_chsize(my_fileno(cnf_file), (my_off_t) (dst_ptr - file_buffer), 0, - MYF(MY_WME)) || - my_fseek(cnf_file, 0, MY_SEEK_SET, MYF(0)) || - my_fwrite(cnf_file, (uchar*) file_buffer, (size_t) (dst_ptr - file_buffer), - MYF(MY_NABP))) - goto err; - } - if (my_fclose(cnf_file, MYF(MY_WME))) - DBUG_RETURN(1); - - my_free(file_buffer, MYF(0)); - DBUG_RETURN(0); - -err: - my_free(file_buffer, MYF(0)); -malloc_err: - my_fclose(cnf_file, MYF(0)); - DBUG_RETURN(1); /* out of resources */ -} - - -static char *add_option(char *dst, const char *option_value, - const char *option, int remove_option) -{ - if (!remove_option) - { - dst= strmov(dst, option); - if (*option_value) - { - *dst++= '='; - dst= strmov(dst, option_value); - } - /* add a newline */ - dst= strmov(dst, NEWLINE); - } - return dst; -} diff --git a/externals/mysql/mysys/errors.c b/externals/mysql/mysys/errors.c deleted file mode 100644 index 0c1d8c1e0b..0000000000 --- a/externals/mysql/mysys/errors.c +++ /dev/null @@ -1,110 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" - -#ifndef SHARED_LIBRARY - -const char * NEAR globerrs[GLOBERRS]= -{ - "Can't create/write to file '%s' (Errcode: %d)", - "Error reading file '%s' (Errcode: %d)", - "Error writing file '%s' (Errcode: %d)", - "Error on close of '%s' (Errcode: %d)", - "Out of memory (Needed %u bytes)", - "Error on delete of '%s' (Errcode: %d)", - "Error on rename of '%s' to '%s' (Errcode: %d)", - "", - "Unexpected eof found when reading file '%s' (Errcode: %d)", - "Can't lock file (Errcode: %d)", - "Can't unlock file (Errcode: %d)", - "Can't read dir of '%s' (Errcode: %d)", - "Can't get stat of '%s' (Errcode: %d)", - "Can't change size of file (Errcode: %d)", - "Can't open stream from handle (Errcode: %d)", - "Can't get working dirctory (Errcode: %d)", - "Can't change dir to '%s' (Errcode: %d)", - "Warning: '%s' had %d links", - "Warning: %d files and %d streams is left open\n", - "Disk is full writing '%s' (Errcode: %d). Waiting for someone to free space... (Expect up to %d secs delay for server to continue after freeing disk space)", - "Can't create directory '%s' (Errcode: %d)", - "Character set '%s' is not a compiled character set and is not specified in the '%s' file", - "Out of resources when opening file '%s' (Errcode: %d)", - "Can't read value for symlink '%s' (Error %d)", - "Can't create symlink '%s' pointing at '%s' (Error %d)", - "Error on realpath() on '%s' (Error %d)", - "Can't sync file '%s' to disk (Errcode: %d)", - "Collation '%s' is not a compiled collation and is not specified in the '%s' file", - "File '%s' not found (Errcode: %d)", - "File '%s' (fileno: %d) was not closed", - "Can't change mode for file '%s' to 0x%lx (Error: %d)" -}; - -void init_glob_errs(void) -{ - /* This is now done statically. */ -} - -#else - -void init_glob_errs() -{ - EE(EE_CANTCREATEFILE) = "Can't create/write to file '%s' (Errcode: %d)"; - EE(EE_READ) = "Error reading file '%s' (Errcode: %d)"; - EE(EE_WRITE) = "Error writing file '%s' (Errcode: %d)"; - EE(EE_BADCLOSE) = "Error on close of '%'s (Errcode: %d)"; - EE(EE_OUTOFMEMORY) = "Out of memory (Needed %u bytes)"; - EE(EE_DELETE) = "Error on delete of '%s' (Errcode: %d)"; - EE(EE_LINK) = "Error on rename of '%s' to '%s' (Errcode: %d)"; - EE(EE_EOFERR) = "Unexpected eof found when reading file '%s' (Errcode: %d)"; - EE(EE_CANTLOCK) = "Can't lock file (Errcode: %d)"; - EE(EE_CANTUNLOCK) = "Can't unlock file (Errcode: %d)"; - EE(EE_DIR) = "Can't read dir of '%s' (Errcode: %d)"; - EE(EE_STAT) = "Can't get stat of '%s' (Errcode: %d)"; - EE(EE_CANT_CHSIZE) = "Can't change size of file (Errcode: %d)"; - EE(EE_CANT_OPEN_STREAM)= "Can't open stream from handle (Errcode: %d)"; - EE(EE_GETWD) = "Can't get working directory (Errcode: %d)"; - EE(EE_SETWD) = "Can't change dir to '%s' (Errcode: %d)"; - EE(EE_LINK_WARNING) = "Warning: '%s' had %d links"; - EE(EE_OPEN_WARNING) = "Warning: %d files and %d streams is left open\n"; - EE(EE_DISK_FULL) = "Disk is full writing '%s'. Waiting for someone to free space..."; - EE(EE_CANT_MKDIR) ="Can't create directory '%s' (Errcode: %d)"; - EE(EE_UNKNOWN_CHARSET)= "Character set '%s' is not a compiled character set and is not specified in the %s file"; - EE(EE_OUT_OF_FILERESOURCES)="Out of resources when opening file '%s' (Errcode: %d)"; - EE(EE_CANT_READLINK)= "Can't read value for symlink '%s' (Error %d)"; - EE(EE_CANT_SYMLINK)= "Can't create symlink '%s' pointing at '%s' (Error %d)"; - EE(EE_REALPATH)= "Error on realpath() on '%s' (Error %d)"; - EE(EE_SYNC)= "Can't sync file '%s' to disk (Errcode: %d)"; - EE(EE_UNKNOWN_COLLATION)= "Collation '%s' is not a compiled collation and is not specified in the %s file"; - EE(EE_FILENOTFOUND) = "File '%s' not found (Errcode: %d)"; - EE(EE_FILE_NOT_CLOSED) = "File '%s' (fileno: %d) was not closed"; - EE(EE_CANT_CHMOD) = "Can't change mode for file '%s' to 0x%lx (Error: %d)"; -} -#endif - -void wait_for_free_space(const char *filename, int errors) -{ - if (errors == 0) - my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH), - filename,my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC); - if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE)) - my_printf_error(EE_DISK_FULL, - "Retry in %d secs. Message reprinted in %d secs", - MYF(ME_BELL | ME_NOREFRESH), - MY_WAIT_FOR_USER_TO_FIX_PANIC, - MY_WAIT_GIVE_USER_A_MESSAGE * MY_WAIT_FOR_USER_TO_FIX_PANIC ); - (void) sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC); -} diff --git a/externals/mysql/mysys/hash.c b/externals/mysql/mysys/hash.c deleted file mode 100644 index a521cd84e9..0000000000 --- a/externals/mysql/mysys/hash.c +++ /dev/null @@ -1,763 +0,0 @@ -/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* The hash functions used for saveing keys */ -/* One of key_length or key_length_offset must be given */ -/* Key length of 0 isn't allowed */ - -#include "mysys_priv.h" -#include -#include -#include "hash.h" - -#define NO_RECORD ((uint) -1) -#define LOWFIND 1 -#define LOWUSED 2 -#define HIGHFIND 4 -#define HIGHUSED 8 - -typedef struct st_hash_info { - uint next; /* index to next key */ - uchar *data; /* data for current entry */ -} HASH_LINK; - -static uint my_hash_mask(size_t hashnr, size_t buffmax, size_t maxlength); -static void movelink(HASH_LINK *array,uint pos,uint next_link,uint newlink); -static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, - size_t length); - -static uint calc_hash(const HASH *hash, const uchar *key, size_t length) -{ - ulong nr1=1, nr2=4; - hash->charset->coll->hash_sort(hash->charset,(uchar*) key,length,&nr1,&nr2); - return nr1; -} - -my_bool -_my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset, - ulong size, size_t key_offset, size_t key_length, - my_hash_get_key get_key, - void (*free_element)(void*), uint flags CALLER_INFO_PROTO) -{ - DBUG_ENTER("my_hash_init"); - DBUG_PRINT("enter",("hash: %p size: %u", hash, (uint) size)); - - hash->records=0; - if (my_init_dynamic_array_ci(&hash->array, sizeof(HASH_LINK), size, - growth_size)) - { - hash->free=0; /* Allow call to my_hash_free */ - DBUG_RETURN(1); - } - hash->key_offset=key_offset; - hash->key_length=key_length; - hash->blength=1; - hash->get_key=get_key; - hash->free=free_element; - hash->flags=flags; - hash->charset=charset; - DBUG_RETURN(0); -} - - -/* - Call hash->free on all elements in hash. - - SYNOPSIS - my_hash_free_elements() - hash hash table - - NOTES: - Sets records to 0 -*/ - -static inline void my_hash_free_elements(HASH *hash) -{ - if (hash->free) - { - HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); - HASH_LINK *end= data + hash->records; - while (data < end) - (*hash->free)((data++)->data); - } - hash->records=0; -} - - -/* - Free memory used by hash. - - SYNOPSIS - my_hash_free() - hash the hash to delete elements of - - NOTES: Hash can't be reused without calling my_hash_init again. -*/ - -void my_hash_free(HASH *hash) -{ - DBUG_ENTER("my_hash_free"); - DBUG_PRINT("enter",("hash: %p", hash)); - - my_hash_free_elements(hash); - hash->free= 0; - delete_dynamic(&hash->array); - DBUG_VOID_RETURN; -} - - -/* - Delete all elements from the hash (the hash itself is to be reused). - - SYNOPSIS - my_hash_reset() - hash the hash to delete elements of -*/ - -void my_hash_reset(HASH *hash) -{ - DBUG_ENTER("my_hash_reset"); - DBUG_PRINT("enter",("hash: %pd", hash)); - - my_hash_free_elements(hash); - reset_dynamic(&hash->array); - /* Set row pointers so that the hash can be reused at once */ - hash->blength= 1; - DBUG_VOID_RETURN; -} - -/* some helper functions */ - -/* - This function is char* instead of uchar* as HPUX11 compiler can't - handle inline functions that are not defined as native types -*/ - -static inline char* -my_hash_key(const HASH *hash, const uchar *record, size_t *length, - my_bool first) -{ - if (hash->get_key) - return (char*) (*hash->get_key)(record,length,first); - *length=hash->key_length; - return (char*) record+hash->key_offset; -} - - /* Calculate pos according to keys */ - -static uint my_hash_mask(size_t hashnr, size_t buffmax, size_t maxlength) -{ - if ((hashnr & (buffmax-1)) < maxlength) return (hashnr & (buffmax-1)); - return (hashnr & ((buffmax >> 1) -1)); -} - -static uint my_hash_rec_mask(const HASH *hash, HASH_LINK *pos, - size_t buffmax, size_t maxlength) -{ - size_t length; - uchar *key= (uchar*) my_hash_key(hash, pos->data, &length, 0); - return my_hash_mask(calc_hash(hash, key, length), buffmax, maxlength); -} - - - -/* for compilers which can not handle inline */ -static -#if !defined(__USLC__) && !defined(__sgi) -inline -#endif -unsigned int rec_hashnr(HASH *hash,const uchar *record) -{ - size_t length; - uchar *key= (uchar*) my_hash_key(hash, record, &length, 0); - return calc_hash(hash,key,length); -} - - -uchar* my_hash_search(const HASH *hash, const uchar *key, size_t length) -{ - HASH_SEARCH_STATE state; - return my_hash_first(hash, key, length, &state); -} - -/* - Search after a record based on a key - - NOTE - Assigns the number of the found record to HASH_SEARCH_STATE state -*/ - -uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, - HASH_SEARCH_STATE *current_record) -{ - HASH_LINK *pos; - uint flag,idx; - DBUG_ENTER("my_hash_first"); - - flag=1; - if (hash->records) - { - idx= my_hash_mask(calc_hash(hash, key, length ? length : hash->key_length), - hash->blength, hash->records); - do - { - pos= dynamic_element(&hash->array,idx,HASH_LINK*); - if (!hashcmp(hash,pos,key,length)) - { - DBUG_PRINT("exit",("found key at %d",idx)); - *current_record= idx; - DBUG_RETURN (pos->data); - } - if (flag) - { - flag=0; /* Reset flag */ - if (my_hash_rec_mask(hash, pos, hash->blength, hash->records) != idx) - break; /* Wrong link */ - } - } - while ((idx=pos->next) != NO_RECORD); - } - *current_record= NO_RECORD; - DBUG_RETURN(0); -} - - /* Get next record with identical key */ - /* Can only be called if previous calls was my_hash_search */ - -uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length, - HASH_SEARCH_STATE *current_record) -{ - HASH_LINK *pos; - uint idx; - - if (*current_record != NO_RECORD) - { - HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); - for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next) - { - pos=data+idx; - if (!hashcmp(hash,pos,key,length)) - { - *current_record= idx; - return pos->data; - } - } - *current_record= NO_RECORD; - } - return 0; -} - - - /* Change link from pos to new_link */ - -static void movelink(HASH_LINK *array,uint find,uint next_link,uint newlink) -{ - HASH_LINK *old_link; - do - { - old_link=array+next_link; - } - while ((next_link=old_link->next) != find); - old_link->next= newlink; - return; -} - -/* - Compare a key in a record to a whole key. Return 0 if identical - - SYNOPSIS - hashcmp() - hash hash table - pos position of hash record to use in comparison - key key for comparison - length length of key - - NOTES: - If length is 0, comparison is done using the length of the - record being compared against. - - RETURN - = 0 key of record == key - != 0 key of record != key - */ - -static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, - size_t length) -{ - size_t rec_keylength; - uchar *rec_key= (uchar*) my_hash_key(hash, pos->data, &rec_keylength, 1); - return ((length && length != rec_keylength) || - my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength, - (uchar*) key, rec_keylength)); -} - - -/** - Write a hash-key to the hash-index - - @return - @retval 0 ok - @retval 1 Duplicate key or out of memory -*/ - -my_bool my_hash_insert(HASH *info, const uchar *record) -{ - int flag; - size_t idx,halfbuff,hash_nr,first_index; - uchar *ptr_to_rec,*ptr_to_rec2; - HASH_LINK *data,*empty,*gpos,*gpos2,*pos; - - LINT_INIT(gpos); - LINT_INIT(gpos2); - LINT_INIT(ptr_to_rec); - LINT_INIT(ptr_to_rec2); - - if (info->flags & HASH_UNIQUE) - { - uchar *key= (uchar*) my_hash_key(info, record, &idx, 1); - if (my_hash_search(info, key, idx)) - return(TRUE); /* Duplicate entry */ - } - - flag=0; - if (!(empty=(HASH_LINK*) alloc_dynamic(&info->array))) - return(TRUE); /* No more memory */ - - data=dynamic_element(&info->array,0,HASH_LINK*); - halfbuff= info->blength >> 1; - - idx=first_index=info->records-halfbuff; - if (idx != info->records) /* If some records */ - { - do - { - pos=data+idx; - hash_nr=rec_hashnr(info,pos->data); - if (flag == 0) /* First loop; Check if ok */ - if (my_hash_mask(hash_nr, info->blength, info->records) != first_index) - break; - if (!(hash_nr & halfbuff)) - { /* Key will not move */ - if (!(flag & LOWFIND)) - { - if (flag & HIGHFIND) - { - flag=LOWFIND | HIGHFIND; - /* key shall be moved to the current empty position */ - gpos=empty; - ptr_to_rec=pos->data; - empty=pos; /* This place is now free */ - } - else - { - flag=LOWFIND | LOWUSED; /* key isn't changed */ - gpos=pos; - ptr_to_rec=pos->data; - } - } - else - { - if (!(flag & LOWUSED)) - { - /* Change link of previous LOW-key */ - gpos->data=ptr_to_rec; - gpos->next= (uint) (pos-data); - flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED); - } - gpos=pos; - ptr_to_rec=pos->data; - } - } - else - { /* key will be moved */ - if (!(flag & HIGHFIND)) - { - flag= (flag & LOWFIND) | HIGHFIND; - /* key shall be moved to the last (empty) position */ - gpos2 = empty; empty=pos; - ptr_to_rec2=pos->data; - } - else - { - if (!(flag & HIGHUSED)) - { - /* Change link of previous hash-key and save */ - gpos2->data=ptr_to_rec2; - gpos2->next=(uint) (pos-data); - flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED); - } - gpos2=pos; - ptr_to_rec2=pos->data; - } - } - } - while ((idx=pos->next) != NO_RECORD); - - if ((flag & (LOWFIND | LOWUSED)) == LOWFIND) - { - gpos->data=ptr_to_rec; - gpos->next=NO_RECORD; - } - if ((flag & (HIGHFIND | HIGHUSED)) == HIGHFIND) - { - gpos2->data=ptr_to_rec2; - gpos2->next=NO_RECORD; - } - } - /* Check if we are at the empty position */ - - idx= my_hash_mask(rec_hashnr(info, record), info->blength, info->records + 1); - pos=data+idx; - if (pos == empty) - { - pos->data=(uchar*) record; - pos->next=NO_RECORD; - } - else - { - /* Check if more records in same hash-nr family */ - empty[0]=pos[0]; - gpos= data + my_hash_rec_mask(info, pos, info->blength, info->records + 1); - if (pos == gpos) - { - pos->data=(uchar*) record; - pos->next=(uint) (empty - data); - } - else - { - pos->data=(uchar*) record; - pos->next=NO_RECORD; - movelink(data,(uint) (pos-data),(uint) (gpos-data),(uint) (empty-data)); - } - } - if (++info->records == info->blength) - info->blength+= info->blength; - return(0); -} - - -/** - Remove one record from hash-table. - - @fn hash_delete() - @param hash Hash tree - @param record Row to be deleted - - @notes - The record with the same record ptr is removed. - If there is a free-function it's called if record was found. - - @return - @retval 0 ok - @retval 1 Record not found -*/ - -my_bool my_hash_delete(HASH *hash, uchar *record) -{ - uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index; - HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; - DBUG_ENTER("my_hash_delete"); - if (!hash->records) - DBUG_RETURN(1); - - blength=hash->blength; - data=dynamic_element(&hash->array,0,HASH_LINK*); - /* Search after record with key */ - pos= data + my_hash_mask(rec_hashnr(hash, record), blength, hash->records); - gpos = 0; - - while (pos->data != record) - { - gpos=pos; - if (pos->next == NO_RECORD) - DBUG_RETURN(1); /* Key not found */ - pos=data+pos->next; - } - - if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; - lastpos=data+hash->records; - - /* Remove link to record */ - empty=pos; empty_index=(uint) (empty-data); - if (gpos) - gpos->next=pos->next; /* unlink current ptr */ - else if (pos->next != NO_RECORD) - { - empty=data+(empty_index=pos->next); - pos->data=empty->data; - pos->next=empty->next; - } - - if (empty == lastpos) /* last key at wrong pos or no next link */ - goto exit; - - /* Move the last key (lastpos) */ - lastpos_hashnr=rec_hashnr(hash,lastpos->data); - /* pos is where lastpos should be */ - pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records); - if (pos == empty) /* Move to empty position. */ - { - empty[0]=lastpos[0]; - goto exit; - } - pos_hashnr=rec_hashnr(hash,pos->data); - /* pos3 is where the pos should be */ - pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records); - if (pos != pos3) - { /* pos is on wrong posit */ - empty[0]=pos[0]; /* Save it here */ - pos[0]=lastpos[0]; /* This should be here */ - movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); - goto exit; - } - pos2= my_hash_mask(lastpos_hashnr, blength, hash->records + 1); - if (pos2 == my_hash_mask(pos_hashnr, blength, hash->records + 1)) - { /* Identical key-positions */ - if (pos2 != hash->records) - { - empty[0]=lastpos[0]; - movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); - goto exit; - } - idx= (uint) (pos-data); /* Link pos->next after lastpos */ - } - else idx= NO_RECORD; /* Different positions merge */ - - empty[0]=lastpos[0]; - movelink(data,idx,empty_index,pos->next); - pos->next=empty_index; - -exit: - (void) pop_dynamic(&hash->array); - if (hash->free) - (*hash->free)((uchar*) record); - DBUG_RETURN(0); -} - - -/** - Update keys when record has changed. - This is much more efficent than using a delete & insert. -*/ - -my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, - size_t old_key_length) -{ - uint new_index,new_pos_index,blength,records; - size_t idx,empty; - HASH_LINK org_link,*data,*previous,*pos; - DBUG_ENTER("my_hash_update"); - - if (HASH_UNIQUE & hash->flags) - { - HASH_SEARCH_STATE state; - uchar *found, *new_key= (uchar*) my_hash_key(hash, record, &idx, 1); - if ((found= my_hash_first(hash, new_key, idx, &state))) - { - do - { - if (found != record) - DBUG_RETURN(1); /* Duplicate entry */ - } - while ((found= my_hash_next(hash, new_key, idx, &state))); - } - } - - data=dynamic_element(&hash->array,0,HASH_LINK*); - blength=hash->blength; records=hash->records; - - /* Search after record with key */ - - idx= my_hash_mask(calc_hash(hash, old_key, (old_key_length ? - old_key_length : - hash->key_length)), - blength, records); - new_index= my_hash_mask(rec_hashnr(hash, record), blength, records); - if (idx == new_index) - DBUG_RETURN(0); /* Nothing to do (No record check) */ - previous=0; - for (;;) - { - - if ((pos= data+idx)->data == record) - break; - previous=pos; - if ((idx=pos->next) == NO_RECORD) - DBUG_RETURN(1); /* Not found in links */ - } - org_link= *pos; - empty=idx; - - /* Relink record from current chain */ - - if (!previous) - { - if (pos->next != NO_RECORD) - { - empty=pos->next; - *pos= data[pos->next]; - } - } - else - previous->next=pos->next; /* unlink pos */ - - /* Move data to correct position */ - if (new_index == empty) - { - /* - At this point record is unlinked from the old chain, thus it holds - random position. By the chance this position is equal to position - for the first element in the new chain. That means updated record - is the only record in the new chain. - */ - if (empty != idx) - { - /* - Record was moved while unlinking it from the old chain. - Copy data to a new position. - */ - data[empty]= org_link; - } - data[empty].next= NO_RECORD; - DBUG_RETURN(0); - } - pos=data+new_index; - new_pos_index= my_hash_rec_mask(hash, pos, blength, records); - if (new_index != new_pos_index) - { /* Other record in wrong position */ - data[empty] = *pos; - movelink(data,new_index,new_pos_index,empty); - org_link.next=NO_RECORD; - data[new_index]= org_link; - } - else - { /* Link in chain at right position */ - org_link.next=data[new_index].next; - data[empty]=org_link; - data[new_index].next=empty; - } - DBUG_RETURN(0); -} - - -uchar *my_hash_element(HASH *hash, ulong idx) -{ - if (idx < hash->records) - return dynamic_element(&hash->array,idx,HASH_LINK*)->data; - return 0; -} - - -/* - Replace old row with new row. This should only be used when key - isn't changed -*/ - -void my_hash_replace(HASH *hash, HASH_SEARCH_STATE *current_record, - uchar *new_row) -{ - if (*current_record != NO_RECORD) /* Safety */ - dynamic_element(&hash->array, *current_record, HASH_LINK*)->data= new_row; -} - - -/** - Iterate over all elements in hash and call function with the element - - @param hash hash array - @param action function to call for each argument - @param argument second argument for call to action - - @notes - If one of functions calls returns 1 then the iteration aborts - - @retval 0 ok - @retval 1 iteration aborted becasue action returned 1 -*/ - -my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument) -{ - uint records, i; - HASH_LINK *data; - - records= hash->records; - data= dynamic_element(&hash->array,0,HASH_LINK*); - - for (i= 0 ; i < records ; i++) - { - if ((*action)(data[i].data, argument)) - return 1; - } - return 0; -} - - -#ifndef DBUG_OFF - -my_bool my_hash_check(HASH *hash) -{ - int error; - uint i,rec_link,found,max_links,seek,links,idx; - uint records,blength; - HASH_LINK *data,*hash_info; - - records=hash->records; blength=hash->blength; - data=dynamic_element(&hash->array,0,HASH_LINK*); - error=0; - - for (i=found=max_links=seek=0 ; i < records ; i++) - { - if (my_hash_rec_mask(hash, data + i, blength, records) == i) - { - found++; seek++; links=1; - for (idx=data[i].next ; - idx != NO_RECORD && found < records + 1; - idx=hash_info->next) - { - if (idx >= records) - { - DBUG_PRINT("error", - ("Found pointer outside array to %d from link starting at %d", - idx,i)); - error=1; - } - hash_info=data+idx; - seek+= ++links; - if ((rec_link= my_hash_rec_mask(hash, hash_info, - blength, records)) != i) - { - DBUG_PRINT("error", ("Record in wrong link at %d: Start %d " - "Record: 0x%lx Record-link %d", - idx, i, (long) hash_info->data, rec_link)); - error=1; - } - else - found++; - } - if (links > max_links) max_links=links; - } - } - if (found != records) - { - DBUG_PRINT("error",("Found %u of %u records", found, records)); - error=1; - } - if (records) - DBUG_PRINT("info", - ("records: %u seeks: %d max links: %d hitrate: %.2f", - records,seek,max_links,(float) seek / (float) records)); - return error; -} -#endif diff --git a/externals/mysql/mysys/lf_alloc-pin.c b/externals/mysql/mysys/lf_alloc-pin.c deleted file mode 100644 index fda9b97791..0000000000 --- a/externals/mysql/mysys/lf_alloc-pin.c +++ /dev/null @@ -1,534 +0,0 @@ -/* QQ: TODO multi-pinbox */ -/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - wait-free concurrent allocator based on pinning addresses - - It works as follows: every thread (strictly speaking - every CPU, but - it's too difficult to do) has a small array of pointers. They're called - "pins". Before using an object its address must be stored in this array - (pinned). When an object is no longer necessary its address must be - removed from this array (unpinned). When a thread wants to free() an - object it scans all pins of all threads to see if somebody has this - object pinned. If yes - the object is not freed (but stored in a - "purgatory"). To reduce the cost of a single free() pins are not scanned - on every free() but only added to (thread-local) purgatory. On every - LF_PURGATORY_SIZE free() purgatory is scanned and all unpinned objects - are freed. - - Pins are used to solve ABA problem. To use pins one must obey - a pinning protocol: - - 1. Let's assume that PTR is a shared pointer to an object. Shared means - that any thread may modify it anytime to point to a different object - and free the old object. Later the freed object may be potentially - allocated by another thread. If we're unlucky that other thread may - set PTR to point to this object again. This is ABA problem. - 2. Create a local pointer LOCAL_PTR. - 3. Pin the PTR in a loop: - do - { - LOCAL_PTR= PTR; - pin(PTR, PIN_NUMBER); - } while (LOCAL_PTR != PTR) - 4. It is guaranteed that after the loop has ended, LOCAL_PTR - points to an object (or NULL, if PTR may be NULL), that - will never be freed. It is not guaranteed though - that LOCAL_PTR == PTR (as PTR can change any time) - 5. When done working with the object, remove the pin: - unpin(PIN_NUMBER) - 6. When copying pins (as in the list traversing loop: - pin(CUR, 1); - while () - { - do // standard - { // pinning - NEXT=CUR->next; // loop - pin(NEXT, 0); // see #3 - } while (NEXT != CUR->next); // above - ... - ... - CUR=NEXT; - pin(CUR, 1); // copy pin[0] to pin[1] - } - which keeps CUR address constantly pinned), note than pins may be - copied only upwards (!!!), that is pin[N] to pin[M], M > N. - 7. Don't keep the object pinned longer than necessary - the number of - pins you have is limited (and small), keeping an object pinned - prevents its reuse and cause unnecessary mallocs. - - Explanations: - - 3. The loop is important. The following can occur: - thread1> LOCAL_PTR= PTR - thread2> free(PTR); PTR=0; - thread1> pin(PTR, PIN_NUMBER); - now thread1 cannot access LOCAL_PTR, even if it's pinned, - because it points to a freed memory. That is, it *must* - verify that it has indeed pinned PTR, the shared pointer. - - 6. When a thread wants to free some LOCAL_PTR, and it scans - all lists of pins to see whether it's pinned, it does it - upwards, from low pin numbers to high. Thus another thread - must copy an address from one pin to another in the same - direction - upwards, otherwise the scanning thread may - miss it. - - Implementation details: - - Pins are given away from a "pinbox". Pinbox is stack-based allocator. - It used dynarray for storing pins, new elements are allocated by dynarray - as necessary, old are pushed in the stack for reuse. ABA is solved by - versioning a pointer - because we use an array, a pointer to pins is 16 bit, - upper 16 bits are used for a version. - - It is assumed that pins belong to a THD and are not transferable - between THD's (LF_PINS::stack_ends_here being a primary reason - for this limitation). -*/ -#include -#include -#include - -#define LF_PINBOX_MAX_PINS 65536 - -static void _lf_pinbox_real_free(LF_PINS *pins); - -/* - Initialize a pinbox. Normally called from lf_alloc_init. - See the latter for details. -*/ -void lf_pinbox_init(LF_PINBOX *pinbox, uint free_ptr_offset, - lf_pinbox_free_func *free_func, void *free_func_arg) -{ - DBUG_ASSERT(free_ptr_offset % sizeof(void *) == 0); - compile_time_assert(sizeof(LF_PINS) == 64); - lf_dynarray_init(&pinbox->pinarray, sizeof(LF_PINS)); - pinbox->pinstack_top_ver= 0; - pinbox->pins_in_array= 0; - pinbox->free_ptr_offset= free_ptr_offset; - pinbox->free_func= free_func; - pinbox->free_func_arg= free_func_arg; -} - -void lf_pinbox_destroy(LF_PINBOX *pinbox) -{ - lf_dynarray_destroy(&pinbox->pinarray); -} - -/* - Get pins from a pinbox. Usually called via lf_alloc_get_pins() or - lf_hash_get_pins(). - - SYNOPSYS - pinbox - - - DESCRIPTION - get a new LF_PINS structure from a stack of unused pins, - or allocate a new one out of dynarray. - - NOTE - It is assumed that pins belong to a thread and are not transferable - between threads. -*/ -LF_PINS *_lf_pinbox_get_pins(LF_PINBOX *pinbox) -{ - uint32 pins, next, top_ver; - LF_PINS *el; - /* - We have an array of max. 64k elements. - The highest index currently allocated is pinbox->pins_in_array. - Freed elements are in a lifo stack, pinstack_top_ver. - pinstack_top_ver is 32 bits; 16 low bits are the index in the - array, to the first element of the list. 16 high bits are a version - (every time the 16 low bits are updated, the 16 high bits are - incremented). Versioniong prevents the ABA problem. - */ - top_ver= pinbox->pinstack_top_ver; - do - { - if (!(pins= top_ver % LF_PINBOX_MAX_PINS)) - { - /* the stack of free elements is empty */ - pins= my_atomic_add32((int32 volatile*) &pinbox->pins_in_array, 1)+1; - if (unlikely(pins >= LF_PINBOX_MAX_PINS)) - return 0; - /* - note that the first allocated element has index 1 (pins==1). - index 0 is reserved to mean "NULL pointer" - */ - el= (LF_PINS *)_lf_dynarray_lvalue(&pinbox->pinarray, pins); - if (unlikely(!el)) - return 0; - break; - } - el= (LF_PINS *)_lf_dynarray_value(&pinbox->pinarray, pins); - next= el->link; - } while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver, - (int32*) &top_ver, - top_ver-pins+next+LF_PINBOX_MAX_PINS)); - /* - set el->link to the index of el in the dynarray (el->link has two usages: - - if element is allocated, it's its own index - - if element is free, it's its next element in the free stack - */ - el->link= pins; - el->purgatory_count= 0; - el->pinbox= pinbox; - el->stack_ends_here= & my_thread_var->stack_ends_here; - return el; -} - -/* - Put pins back to a pinbox. Usually called via lf_alloc_put_pins() or - lf_hash_put_pins(). - - DESCRIPTION - empty the purgatory (XXX deadlock warning below!), - push LF_PINS structure to a stack -*/ -void _lf_pinbox_put_pins(LF_PINS *pins) -{ - LF_PINBOX *pinbox= pins->pinbox; - uint32 top_ver, nr; - nr= pins->link; -#ifdef MY_LF_EXTRA_DEBUG - { - int i; - for (i= 0; i < LF_PINBOX_PINS; i++) - DBUG_ASSERT(pins->pin[i] == 0); - } -#endif - /* - XXX this will deadlock if other threads will wait for - the caller to do something after _lf_pinbox_put_pins(), - and they would have pinned addresses that the caller wants to free. - Thus: only free pins when all work is done and nobody can wait for you!!! - */ - while (pins->purgatory_count) - { - _lf_pinbox_real_free(pins); - if (pins->purgatory_count) - { - my_atomic_rwlock_wrunlock(&pins->pinbox->pinarray.lock); - pthread_yield(); - my_atomic_rwlock_wrlock(&pins->pinbox->pinarray.lock); - } - } - top_ver= pinbox->pinstack_top_ver; - do - { - pins->link= top_ver % LF_PINBOX_MAX_PINS; - } while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver, - (int32*) &top_ver, - top_ver-pins->link+nr+LF_PINBOX_MAX_PINS)); - return; -} - -static int ptr_cmp(void **a, void **b) -{ - return *a < *b ? -1 : *a == *b ? 0 : 1; -} - -#define add_to_purgatory(PINS, ADDR) \ - do \ - { \ - *(void **)((char *)(ADDR)+(PINS)->pinbox->free_ptr_offset)= \ - (PINS)->purgatory; \ - (PINS)->purgatory= (ADDR); \ - (PINS)->purgatory_count++; \ - } while (0) - -/* - Free an object allocated via pinbox allocator - - DESCRIPTION - add an object to purgatory. if necessary, call _lf_pinbox_real_free() - to actually free something. -*/ -void _lf_pinbox_free(LF_PINS *pins, void *addr) -{ - add_to_purgatory(pins, addr); - if (pins->purgatory_count % LF_PURGATORY_SIZE) - _lf_pinbox_real_free(pins); -} - -struct st_harvester { - void **granary; - int npins; -}; - -/* - callback for _lf_dynarray_iterate: - scan all pins of all threads and accumulate all pins -*/ -static int harvest_pins(LF_PINS *el, struct st_harvester *hv) -{ - int i; - LF_PINS *el_end= el+min(hv->npins, LF_DYNARRAY_LEVEL_LENGTH); - for (; el < el_end; el++) - { - for (i= 0; i < LF_PINBOX_PINS; i++) - { - void *p= el->pin[i]; - if (p) - *hv->granary++= p; - } - } - /* - hv->npins may become negative below, but it means that - we're on the last dynarray page and harvest_pins() won't be - called again. We don't bother to make hv->npins() correct - (that is 0) in this case. - */ - hv->npins-= LF_DYNARRAY_LEVEL_LENGTH; - return 0; -} - -/* - callback for _lf_dynarray_iterate: - scan all pins of all threads and see if addr is present there -*/ -static int match_pins(LF_PINS *el, void *addr) -{ - int i; - LF_PINS *el_end= el+LF_DYNARRAY_LEVEL_LENGTH; - for (; el < el_end; el++) - for (i= 0; i < LF_PINBOX_PINS; i++) - if (el->pin[i] == addr) - return 1; - return 0; -} - -#if STACK_DIRECTION < 0 -#define available_stack_size(CUR,END) (long) ((char*)(CUR) - (char*)(END)) -#else -#define available_stack_size(CUR,END) (long) ((char*)(END) - (char*)(CUR)) -#endif - -#define next_node(P, X) (*((uchar * volatile *)(((uchar *)(X)) + (P)->free_ptr_offset))) -#define anext_node(X) next_node(&allocator->pinbox, (X)) - -/* - Scan the purgatory and free everything that can be freed -*/ -static void _lf_pinbox_real_free(LF_PINS *pins) -{ - int npins, alloca_size; - void *list, **addr; - void *first, *last= NULL; - LF_PINBOX *pinbox= pins->pinbox; - - LINT_INIT(first); - npins= pinbox->pins_in_array+1; - -#ifdef HAVE_ALLOCA - alloca_size= sizeof(void *)*LF_PINBOX_PINS*npins; - /* create a sorted list of pinned addresses, to speed up searches */ - if (available_stack_size(&pinbox, *pins->stack_ends_here) > alloca_size) - { - struct st_harvester hv; - addr= (void **) alloca(alloca_size); - hv.granary= addr; - hv.npins= npins; - /* scan the dynarray and accumulate all pinned addresses */ - _lf_dynarray_iterate(&pinbox->pinarray, - (lf_dynarray_func)harvest_pins, &hv); - - npins= hv.granary-addr; - /* and sort them */ - if (npins) - qsort(addr, npins, sizeof(void *), (qsort_cmp)ptr_cmp); - } - else -#endif - addr= 0; - - list= pins->purgatory; - pins->purgatory= 0; - pins->purgatory_count= 0; - while (list) - { - void *cur= list; - list= *(void **)((char *)cur+pinbox->free_ptr_offset); - if (npins) - { - if (addr) /* use binary search */ - { - void **a, **b, **c; - for (a= addr, b= addr+npins-1, c= a+(b-a)/2; (b-a) > 1; c= a+(b-a)/2) - if (cur == *c) - a= b= c; - else if (cur > *c) - a= c; - else - b= c; - if (cur == *a || cur == *b) - goto found; - } - else /* no alloca - no cookie. linear search here */ - { - if (_lf_dynarray_iterate(&pinbox->pinarray, - (lf_dynarray_func)match_pins, cur)) - goto found; - } - } - /* not pinned - freeing */ - if (last) - last= next_node(pinbox, last)= (uchar *)cur; - else - first= last= (uchar *)cur; - continue; -found: - /* pinned - keeping */ - add_to_purgatory(pins, cur); - } - if (last) - pinbox->free_func(first, last, pinbox->free_func_arg); -} - -/* lock-free memory allocator for fixed-size objects */ - -LF_REQUIRE_PINS(1) - -/* - callback for _lf_pinbox_real_free to free a list of unpinned objects - - add it back to the allocator stack - - DESCRIPTION - 'first' and 'last' are the ends of the linked list of nodes: - first->el->el->....->el->last. Use first==last to free only one element. -*/ -static void alloc_free(uchar *first, - uchar volatile *last, - LF_ALLOCATOR *allocator) -{ - /* - we need a union here to access type-punned pointer reliably. - otherwise gcc -fstrict-aliasing will not see 'tmp' changed in the loop - */ - union { uchar * node; void *ptr; } tmp; - tmp.node= allocator->top; - do - { - anext_node(last)= tmp.node; - } while (!my_atomic_casptr((void **)(char *)&allocator->top, - (void **)&tmp.ptr, first) && LF_BACKOFF); -} - -/* - initialize lock-free allocator - - SYNOPSYS - allocator - - size a size of an object to allocate - free_ptr_offset an offset inside the object to a sizeof(void *) - memory that is guaranteed to be unused after - the object is put in the purgatory. Unused by ANY - thread, not only the purgatory owner. - This memory will be used to link waiting-to-be-freed - objects in a purgatory list. -*/ -void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset) -{ - lf_pinbox_init(&allocator->pinbox, free_ptr_offset, - (lf_pinbox_free_func *)alloc_free, allocator); - allocator->top= 0; - allocator->mallocs= 0; - allocator->element_size= size; - allocator->constructor= 0; - allocator->destructor= 0; - DBUG_ASSERT(size >= sizeof(void*) + free_ptr_offset); -} - -/* - destroy the allocator, free everything that's in it - - NOTE - As every other init/destroy function here and elsewhere it - is not thread safe. No, this function is no different, ensure - that no thread needs the allocator before destroying it. - We are not responsible for any damage that may be caused by - accessing the allocator when it is being or has been destroyed. - Oh yes, and don't put your cat in a microwave. -*/ -void lf_alloc_destroy(LF_ALLOCATOR *allocator) -{ - uchar *node= allocator->top; - while (node) - { - uchar *tmp= anext_node(node); - if (allocator->destructor) - allocator->destructor(node); - my_free((void *)node, MYF(0)); - node= tmp; - } - lf_pinbox_destroy(&allocator->pinbox); - allocator->top= 0; -} - -/* - Allocate and return an new object. - - DESCRIPTION - Pop an unused object from the stack or malloc it is the stack is empty. - pin[0] is used, it's removed on return. -*/ -void *_lf_alloc_new(LF_PINS *pins) -{ - LF_ALLOCATOR *allocator= (LF_ALLOCATOR *)(pins->pinbox->free_func_arg); - uchar *node; - for (;;) - { - do - { - node= allocator->top; - _lf_pin(pins, 0, node); - } while (node != allocator->top && LF_BACKOFF); - if (!node) - { - node= (void *)my_malloc(allocator->element_size, MYF(MY_WME)); - if (allocator->constructor) - allocator->constructor(node); -#ifdef MY_LF_EXTRA_DEBUG - if (likely(node != 0)) - my_atomic_add32(&allocator->mallocs, 1); -#endif - break; - } - if (my_atomic_casptr((void **)(char *)&allocator->top, - (void *)&node, anext_node(node))) - break; - } - _lf_unpin(pins, 0); - return node; -} - -/* - count the number of objects in a pool. - - NOTE - This is NOT thread-safe !!! -*/ -uint lf_alloc_pool_count(LF_ALLOCATOR *allocator) -{ - uint i; - uchar *node; - for (node= allocator->top, i= 0; node; node= anext_node(node), i++) - /* no op */; - return i; -} - diff --git a/externals/mysql/mysys/lf_dynarray.c b/externals/mysql/mysys/lf_dynarray.c deleted file mode 100644 index b1cdce698a..0000000000 --- a/externals/mysql/mysys/lf_dynarray.c +++ /dev/null @@ -1,207 +0,0 @@ -/* Copyright (C) 2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Analog of DYNAMIC_ARRAY that never reallocs - (so no pointer into the array may ever become invalid). - - Memory is allocated in non-contiguous chunks. - This data structure is not space efficient for sparse arrays. - - Every element is aligned to sizeof(element) boundary - (to avoid false sharing if element is big enough). - - LF_DYNARRAY is a recursive structure. On the zero level - LF_DYNARRAY::level[0] it's an array of LF_DYNARRAY_LEVEL_LENGTH elements, - on the first level it's an array of LF_DYNARRAY_LEVEL_LENGTH pointers - to arrays of elements, on the second level it's an array of pointers - to arrays of pointers to arrays of elements. And so on. - - With four levels the number of elements is limited to 4311810304 - (but as in all functions index is uint, the real limit is 2^32-1) - - Actually, it's wait-free, not lock-free ;-) -*/ - -#include -#include -#include -#include - -void lf_dynarray_init(LF_DYNARRAY *array, uint element_size) -{ - bzero(array, sizeof(*array)); - array->size_of_element= element_size; - my_atomic_rwlock_init(&array->lock); -} - -static void recursive_free(void **alloc, int level) -{ - if (!alloc) - return; - - if (level) - { - int i; - for (i= 0; i < LF_DYNARRAY_LEVEL_LENGTH; i++) - recursive_free(alloc[i], level-1); - my_free((void *)alloc, MYF(0)); - } - else - my_free(alloc[-1], MYF(0)); -} - -void lf_dynarray_destroy(LF_DYNARRAY *array) -{ - int i; - for (i= 0; i < LF_DYNARRAY_LEVELS; i++) - recursive_free(array->level[i], i); - my_atomic_rwlock_destroy(&array->lock); -} - -static const ulong dynarray_idxes_in_prev_levels[LF_DYNARRAY_LEVELS]= -{ - 0, /* +1 here to to avoid -1's below */ - LF_DYNARRAY_LEVEL_LENGTH, - LF_DYNARRAY_LEVEL_LENGTH * LF_DYNARRAY_LEVEL_LENGTH + - LF_DYNARRAY_LEVEL_LENGTH, - LF_DYNARRAY_LEVEL_LENGTH * LF_DYNARRAY_LEVEL_LENGTH * - LF_DYNARRAY_LEVEL_LENGTH + LF_DYNARRAY_LEVEL_LENGTH * - LF_DYNARRAY_LEVEL_LENGTH + LF_DYNARRAY_LEVEL_LENGTH -}; - -static const ulong dynarray_idxes_in_prev_level[LF_DYNARRAY_LEVELS]= -{ - 0, /* +1 here to to avoid -1's below */ - LF_DYNARRAY_LEVEL_LENGTH, - LF_DYNARRAY_LEVEL_LENGTH * LF_DYNARRAY_LEVEL_LENGTH, - LF_DYNARRAY_LEVEL_LENGTH * LF_DYNARRAY_LEVEL_LENGTH * - LF_DYNARRAY_LEVEL_LENGTH, -}; - -/* - Returns a valid lvalue pointer to the element number 'idx'. - Allocates memory if necessary. -*/ -void *_lf_dynarray_lvalue(LF_DYNARRAY *array, uint idx) -{ - void * ptr, * volatile * ptr_ptr= 0; - int i; - - for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--) - /* no-op */; - ptr_ptr= &array->level[i]; - idx-= dynarray_idxes_in_prev_levels[i]; - for (; i > 0; i--) - { - if (!(ptr= *ptr_ptr)) - { - void *alloc= my_malloc(LF_DYNARRAY_LEVEL_LENGTH * sizeof(void *), - MYF(MY_WME|MY_ZEROFILL)); - if (unlikely(!alloc)) - return(NULL); - if (my_atomic_casptr(ptr_ptr, &ptr, alloc)) - ptr= alloc; - else - my_free(alloc, MYF(0)); - } - ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i]; - idx%= dynarray_idxes_in_prev_level[i]; - } - if (!(ptr= *ptr_ptr)) - { - uchar *alloc, *data; - alloc= my_malloc(LF_DYNARRAY_LEVEL_LENGTH * array->size_of_element + - max(array->size_of_element, sizeof(void *)), - MYF(MY_WME|MY_ZEROFILL)); - if (unlikely(!alloc)) - return(NULL); - /* reserve the space for free() address */ - data= alloc + sizeof(void *); - { /* alignment */ - intptr mod= ((intptr)data) % array->size_of_element; - if (mod) - data+= array->size_of_element - mod; - } - ((void **)data)[-1]= alloc; /* free() will need the original pointer */ - if (my_atomic_casptr(ptr_ptr, &ptr, data)) - ptr= data; - else - my_free(alloc, MYF(0)); - } - return ((uchar*)ptr) + array->size_of_element * idx; -} - -/* - Returns a pointer to the element number 'idx' - or NULL if an element does not exists -*/ -void *_lf_dynarray_value(LF_DYNARRAY *array, uint idx) -{ - void * ptr, * volatile * ptr_ptr= 0; - int i; - - for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--) - /* no-op */; - ptr_ptr= &array->level[i]; - idx-= dynarray_idxes_in_prev_levels[i]; - for (; i > 0; i--) - { - if (!(ptr= *ptr_ptr)) - return(NULL); - ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i]; - idx %= dynarray_idxes_in_prev_level[i]; - } - if (!(ptr= *ptr_ptr)) - return(NULL); - return ((uchar*)ptr) + array->size_of_element * idx; -} - -static int recursive_iterate(LF_DYNARRAY *array, void *ptr, int level, - lf_dynarray_func func, void *arg) -{ - int res, i; - if (!ptr) - return 0; - if (!level) - return func(ptr, arg); - for (i= 0; i < LF_DYNARRAY_LEVEL_LENGTH; i++) - if ((res= recursive_iterate(array, ((void **)ptr)[i], level-1, func, arg))) - return res; - return 0; -} - -/* - Calls func(array, arg) on every array of LF_DYNARRAY_LEVEL_LENGTH elements - in lf_dynarray. - - DESCRIPTION - lf_dynarray consists of a set of arrays, LF_DYNARRAY_LEVEL_LENGTH elements - each. _lf_dynarray_iterate() calls user-supplied function on every array - from the set. It is the fastest way to scan the array, faster than - for (i=0; i < N; i++) { func(_lf_dynarray_value(dynarray, i)); } - - NOTE - if func() returns non-zero, the scan is aborted -*/ -int _lf_dynarray_iterate(LF_DYNARRAY *array, lf_dynarray_func func, void *arg) -{ - int i, res; - for (i= 0; i < LF_DYNARRAY_LEVELS; i++) - if ((res= recursive_iterate(array, array->level[i], i, func, arg))) - return res; - return 0; -} - diff --git a/externals/mysql/mysys/lf_hash.c b/externals/mysql/mysys/lf_hash.c deleted file mode 100644 index f478196c7c..0000000000 --- a/externals/mysql/mysys/lf_hash.c +++ /dev/null @@ -1,505 +0,0 @@ -/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - extensible hash - - TODO - try to get rid of dummy nodes ? - for non-unique hash, count only _distinct_ values - (but how to do it in lf_hash_delete ?) -*/ -#include -#include -#include -#include -#include - -LF_REQUIRE_PINS(3) - -/* An element of the list */ -typedef struct { - intptr volatile link; /* a pointer to the next element in a listand a flag */ - uint32 hashnr; /* reversed hash number, for sorting */ - const uchar *key; - size_t keylen; - /* - data is stored here, directly after the keylen. - thus the pointer to data is (void*)(slist_element_ptr+1) - */ -} LF_SLIST; - -const int LF_HASH_OVERHEAD= sizeof(LF_SLIST); - -/* - a structure to pass the context (pointers two the three successive elements - in a list) from lfind to linsert/ldelete -*/ -typedef struct { - intptr volatile *prev; - LF_SLIST *curr, *next; -} CURSOR; - -/* - the last bit in LF_SLIST::link is a "deleted" flag. - the helper macros below convert it to a pure pointer or a pure flag -*/ -#define PTR(V) (LF_SLIST *)((V) & (~(intptr)1)) -#define DELETED(V) ((V) & 1) - -/* - DESCRIPTION - Search for hashnr/key/keylen in the list starting from 'head' and - position the cursor. The list is ORDER BY hashnr, key - - RETURN - 0 - not found - 1 - found - - NOTE - cursor is positioned in either case - pins[0..2] are used, they are NOT removed on return -*/ -static int lfind(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr, - const uchar *key, uint keylen, CURSOR *cursor, LF_PINS *pins) -{ - uint32 cur_hashnr; - const uchar *cur_key; - uint cur_keylen; - intptr link; - -retry: - cursor->prev= (intptr *)head; - do { /* PTR() isn't necessary below, head is a dummy node */ - cursor->curr= (LF_SLIST *)(*cursor->prev); - _lf_pin(pins, 1, cursor->curr); - } while (*cursor->prev != (intptr)cursor->curr && LF_BACKOFF); - for (;;) - { - if (unlikely(!cursor->curr)) - return 0; /* end of the list */ - do { - /* QQ: XXX or goto retry ? */ - link= cursor->curr->link; - cursor->next= PTR(link); - _lf_pin(pins, 0, cursor->next); - } while (link != cursor->curr->link && LF_BACKOFF); - cur_hashnr= cursor->curr->hashnr; - cur_key= cursor->curr->key; - cur_keylen= cursor->curr->keylen; - if (*cursor->prev != (intptr)cursor->curr) - { - (void)LF_BACKOFF; - goto retry; - } - if (!DELETED(link)) - { - if (cur_hashnr >= hashnr) - { - int r= 1; - if (cur_hashnr > hashnr || - (r= my_strnncoll(cs, (uchar*) cur_key, cur_keylen, (uchar*) key, - keylen)) >= 0) - return !r; - } - cursor->prev= &(cursor->curr->link); - _lf_pin(pins, 2, cursor->curr); - } - else - { - /* - we found a deleted node - be nice, help the other thread - and remove this deleted node - */ - if (my_atomic_casptr((void **)cursor->prev, - (void **)&cursor->curr, cursor->next)) - _lf_alloc_free(pins, cursor->curr); - else - { - (void)LF_BACKOFF; - goto retry; - } - } - cursor->curr= cursor->next; - _lf_pin(pins, 1, cursor->curr); - } -} - -/* - DESCRIPTION - insert a 'node' in the list that starts from 'head' in the correct - position (as found by lfind) - - RETURN - 0 - inserted - not 0 - a pointer to a duplicate (not pinned and thus unusable) - - NOTE - it uses pins[0..2], on return all pins are removed. - if there're nodes with the same key value, a new node is added before them. -*/ -static LF_SLIST *linsert(LF_SLIST * volatile *head, CHARSET_INFO *cs, - LF_SLIST *node, LF_PINS *pins, uint flags) -{ - CURSOR cursor; - int res; - - for (;;) - { - if (lfind(head, cs, node->hashnr, node->key, node->keylen, - &cursor, pins) && - (flags & LF_HASH_UNIQUE)) - { - res= 0; /* duplicate found */ - break; - } - else - { - node->link= (intptr)cursor.curr; - DBUG_ASSERT(node->link != (intptr)node); /* no circular references */ - DBUG_ASSERT(cursor.prev != &node->link); /* no circular references */ - if (my_atomic_casptr((void **)cursor.prev, (void **)&cursor.curr, node)) - { - res= 1; /* inserted ok */ - break; - } - } - } - _lf_unpin(pins, 0); - _lf_unpin(pins, 1); - _lf_unpin(pins, 2); - /* - Note that cursor.curr is not pinned here and the pointer is unreliable, - the object may dissapear anytime. But if it points to a dummy node, the - pointer is safe, because dummy nodes are never freed - initialize_bucket() - uses this fact. - */ - return res ? 0 : cursor.curr; -} - -/* - DESCRIPTION - deletes a node as identified by hashnr/keey/keylen from the list - that starts from 'head' - - RETURN - 0 - ok - 1 - not found - - NOTE - it uses pins[0..2], on return all pins are removed. -*/ -static int ldelete(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr, - const uchar *key, uint keylen, LF_PINS *pins) -{ - CURSOR cursor; - int res; - - for (;;) - { - if (!lfind(head, cs, hashnr, key, keylen, &cursor, pins)) - { - res= 1; /* not found */ - break; - } - else - { - /* mark the node deleted */ - if (my_atomic_casptr((void **)&(cursor.curr->link), - (void **)&cursor.next, - (void *)(((intptr)cursor.next) | 1))) - { - /* and remove it from the list */ - if (my_atomic_casptr((void **)cursor.prev, - (void **)&cursor.curr, cursor.next)) - _lf_alloc_free(pins, cursor.curr); - else - { - /* - somebody already "helped" us and removed the node ? - Let's check if we need to help that someone too! - (to ensure the number of "set DELETED flag" actions - is equal to the number of "remove from the list" actions) - */ - lfind(head, cs, hashnr, key, keylen, &cursor, pins); - } - res= 0; - break; - } - } - } - _lf_unpin(pins, 0); - _lf_unpin(pins, 1); - _lf_unpin(pins, 2); - return res; -} - -/* - DESCRIPTION - searches for a node as identified by hashnr/keey/keylen in the list - that starts from 'head' - - RETURN - 0 - not found - node - found - - NOTE - it uses pins[0..2], on return the pin[2] keeps the node found - all other pins are removed. -*/ -static LF_SLIST *lsearch(LF_SLIST * volatile *head, CHARSET_INFO *cs, - uint32 hashnr, const uchar *key, uint keylen, - LF_PINS *pins) -{ - CURSOR cursor; - int res= lfind(head, cs, hashnr, key, keylen, &cursor, pins); - if (res) - _lf_pin(pins, 2, cursor.curr); - _lf_unpin(pins, 0); - _lf_unpin(pins, 1); - return res ? cursor.curr : 0; -} - -static inline const uchar* hash_key(const LF_HASH *hash, - const uchar *record, size_t *length) -{ - if (hash->get_key) - return (*hash->get_key)(record, length, 0); - *length= hash->key_length; - return record + hash->key_offset; -} - -/* - Compute the hash key value from the raw key. - - @note, that the hash value is limited to 2^31, because we need one - bit to distinguish between normal and dummy nodes. -*/ -static inline uint calc_hash(LF_HASH *hash, const uchar *key, uint keylen) -{ - ulong nr1= 1, nr2= 4; - hash->charset->coll->hash_sort(hash->charset, (uchar*) key, keylen, - &nr1, &nr2); - return nr1 & INT_MAX32; -} - -#define MAX_LOAD 1.0 /* average number of elements in a bucket */ - -static int initialize_bucket(LF_HASH *, LF_SLIST * volatile*, uint, LF_PINS *); - -/* - Initializes lf_hash, the arguments are compatible with hash_init - - @note element_size sets both the size of allocated memory block for - lf_alloc and a size of memcpy'ed block size in lf_hash_insert. Typically - they are the same, indeed. But LF_HASH::element_size can be decreased - after lf_hash_init, and then lf_alloc will allocate larger block that - lf_hash_insert will copy over. It is desireable if part of the element - is expensive to initialize - for example if there is a mutex or - DYNAMIC_ARRAY. In this case they should be initialize in the - LF_ALLOCATOR::constructor, and lf_hash_insert should not overwrite them. - See wt_init() for example. -*/ -void lf_hash_init(LF_HASH *hash, uint element_size, uint flags, - uint key_offset, uint key_length, my_hash_get_key get_key, - CHARSET_INFO *charset) -{ - lf_alloc_init(&hash->alloc, sizeof(LF_SLIST)+element_size, - offsetof(LF_SLIST, key)); - lf_dynarray_init(&hash->array, sizeof(LF_SLIST *)); - hash->size= 1; - hash->count= 0; - hash->element_size= element_size; - hash->flags= flags; - hash->charset= charset ? charset : &my_charset_bin; - hash->key_offset= key_offset; - hash->key_length= key_length; - hash->get_key= get_key; - DBUG_ASSERT(get_key ? !key_offset && !key_length : key_length); -} - -void lf_hash_destroy(LF_HASH *hash) -{ - LF_SLIST *el, **head= (LF_SLIST **)_lf_dynarray_value(&hash->array, 0); - - if (unlikely(!head)) - return; - el= *head; - - while (el) - { - intptr next= el->link; - if (el->hashnr & 1) - lf_alloc_direct_free(&hash->alloc, el); /* normal node */ - else - my_free((void *)el, MYF(0)); /* dummy node */ - el= (LF_SLIST *)next; - } - lf_alloc_destroy(&hash->alloc); - lf_dynarray_destroy(&hash->array); -} - -/* - DESCRIPTION - inserts a new element to a hash. it will have a _copy_ of - data, not a pointer to it. - - RETURN - 0 - inserted - 1 - didn't (unique key conflict) - -1 - out of memory - - NOTE - see linsert() for pin usage notes -*/ -int lf_hash_insert(LF_HASH *hash, LF_PINS *pins, const void *data) -{ - int csize, bucket, hashnr; - LF_SLIST *node, * volatile *el; - - lf_rwlock_by_pins(pins); - node= (LF_SLIST *)_lf_alloc_new(pins); - if (unlikely(!node)) - return -1; - memcpy(node+1, data, hash->element_size); - node->key= hash_key(hash, (uchar *)(node+1), &node->keylen); - hashnr= calc_hash(hash, node->key, node->keylen); - bucket= hashnr % hash->size; - el= _lf_dynarray_lvalue(&hash->array, bucket); - if (unlikely(!el)) - return -1; - if (*el == NULL && unlikely(initialize_bucket(hash, el, bucket, pins))) - return -1; - node->hashnr= my_reverse_bits(hashnr) | 1; /* normal node */ - if (linsert(el, hash->charset, node, pins, hash->flags)) - { - _lf_alloc_free(pins, node); - lf_rwunlock_by_pins(pins); - return 1; - } - csize= hash->size; - if ((my_atomic_add32(&hash->count, 1)+1.0) / csize > MAX_LOAD) - my_atomic_cas32(&hash->size, &csize, csize*2); - lf_rwunlock_by_pins(pins); - return 0; -} - -/* - DESCRIPTION - deletes an element with the given key from the hash (if a hash is - not unique and there're many elements with this key - the "first" - matching element is deleted) - RETURN - 0 - deleted - 1 - didn't (not found) - -1 - out of memory - NOTE - see ldelete() for pin usage notes -*/ -int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen) -{ - LF_SLIST * volatile *el; - uint bucket, hashnr= calc_hash(hash, (uchar *)key, keylen); - - bucket= hashnr % hash->size; - lf_rwlock_by_pins(pins); - el= _lf_dynarray_lvalue(&hash->array, bucket); - if (unlikely(!el)) - return -1; - /* - note that we still need to initialize_bucket here, - we cannot return "node not found", because an old bucket of that - node may've been split and the node was assigned to a new bucket - that was never accessed before and thus is not initialized. - */ - if (*el == NULL && unlikely(initialize_bucket(hash, el, bucket, pins))) - return -1; - if (ldelete(el, hash->charset, my_reverse_bits(hashnr) | 1, - (uchar *)key, keylen, pins)) - { - lf_rwunlock_by_pins(pins); - return 1; - } - my_atomic_add32(&hash->count, -1); - lf_rwunlock_by_pins(pins); - return 0; -} - -/* - RETURN - a pointer to an element with the given key (if a hash is not unique and - there're many elements with this key - the "first" matching element) - NULL if nothing is found - MY_ERRPTR if OOM - - NOTE - see lsearch() for pin usage notes -*/ -void *lf_hash_search(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen) -{ - LF_SLIST * volatile *el, *found; - uint bucket, hashnr= calc_hash(hash, (uchar *)key, keylen); - - bucket= hashnr % hash->size; - lf_rwlock_by_pins(pins); - el= _lf_dynarray_lvalue(&hash->array, bucket); - if (unlikely(!el)) - return MY_ERRPTR; - if (*el == NULL && unlikely(initialize_bucket(hash, el, bucket, pins))) - return MY_ERRPTR; - found= lsearch(el, hash->charset, my_reverse_bits(hashnr) | 1, - (uchar *)key, keylen, pins); - lf_rwunlock_by_pins(pins); - return found ? found+1 : 0; -} - -static const uchar *dummy_key= (uchar*)""; - -/* - RETURN - 0 - ok - -1 - out of memory -*/ -static int initialize_bucket(LF_HASH *hash, LF_SLIST * volatile *node, - uint bucket, LF_PINS *pins) -{ - uint parent= my_clear_highest_bit(bucket); - LF_SLIST *dummy= (LF_SLIST *)my_malloc(sizeof(LF_SLIST), MYF(MY_WME)); - LF_SLIST **tmp= 0, *cur; - LF_SLIST * volatile *el= _lf_dynarray_lvalue(&hash->array, parent); - if (unlikely(!el || !dummy)) - return -1; - if (*el == NULL && bucket && - unlikely(initialize_bucket(hash, el, parent, pins))) - return -1; - dummy->hashnr= my_reverse_bits(bucket) | 0; /* dummy node */ - dummy->key= dummy_key; - dummy->keylen= 0; - if ((cur= linsert(el, hash->charset, dummy, pins, LF_HASH_UNIQUE))) - { - my_free((void *)dummy, MYF(0)); - dummy= cur; - } - my_atomic_casptr((void **)node, (void **)&tmp, dummy); - /* - note that if the CAS above failed (after linsert() succeeded), - it would mean that some other thread has executed linsert() for - the same dummy node, its linsert() failed, it picked up our - dummy node (in "dummy= cur") and executed the same CAS as above. - Which means that even if CAS above failed we don't need to retry, - and we should not free(dummy) - there's no memory leak here - */ - return 0; -} diff --git a/externals/mysql/mysys/list.c b/externals/mysql/mysys/list.c deleted file mode 100644 index 75678af7a6..0000000000 --- a/externals/mysql/mysys/list.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Code for handling dubble-linked lists in C -*/ - -#include "mysys_priv.h" -#include - - - - /* Add a element to start of list */ - -LIST *list_add(LIST *root, LIST *element) -{ - DBUG_ENTER("list_add"); - DBUG_PRINT("enter",("root: %p element: %p", root, element)); - if (root) - { - if (root->prev) /* If add in mid of list */ - root->prev->next= element; - element->prev=root->prev; - root->prev=element; - } - else - element->prev=0; - element->next=root; - DBUG_RETURN(element); /* New root */ -} - - -LIST *list_delete(LIST *root, LIST *element) -{ - if (element->prev) - element->prev->next=element->next; - else - root=element->next; - if (element->next) - element->next->prev=element->prev; - return root; -} - - -void list_free(LIST *root, uint free_data) -{ - LIST *next; - while (root) - { - next=root->next; - if (free_data) - my_free((uchar*) root->data,MYF(0)); - my_free((uchar*) root,MYF(0)); - root=next; - } -} - - -LIST *list_cons(void *data, LIST *list) -{ - LIST *new_charset=(LIST*) my_malloc(sizeof(LIST),MYF(MY_FAE)); - if (!new_charset) - return 0; - new_charset->data=data; - return list_add(list,new_charset); -} - - -LIST *list_reverse(LIST *root) -{ - LIST *last; - - last=root; - while (root) - { - last=root; - root=root->next; - last->next=last->prev; - last->prev=root; - } - return last; -} - -uint list_length(LIST *list) -{ - uint count; - for (count=0 ; list ; list=list->next, count++) ; - return count; -} - - -int list_walk(LIST *list, list_walk_action action, uchar* argument) -{ - int error=0; - while (list) - { - if ((error = (*action)(list->data,argument))) - return error; - list=list_rest(list); - } - return 0; -} diff --git a/externals/mysql/mysys/make-conf.c b/externals/mysql/mysys/make-conf.c deleted file mode 100644 index 0dacde4dee..0000000000 --- a/externals/mysql/mysys/make-conf.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* make-conf.c - * make a charset .conf file out of a ctype-charset.c file. - */ - -#ifndef CHARSET -#error You must define the charset, e.g.: -DCHARSET=latin1 -#endif - -/* some pre-processor tricks to get us going */ -#define _STRINGIZE_HELPER(x) #x -#define STRINGIZE(x) _STRINGIZE_HELPER(x) - -#define _JOIN_WORDS_HELPER(a, b) a ## b -#define JOIN_WORDS(a, b) _JOIN_WORDS_HELPER(a, b) - -#define CH_SRC ctype- ## CHARSET ## .c -#define CH_INCLUDE STRINGIZE(CH_SRC) - -/* aaaah, that's better */ -#include -#include CH_INCLUDE - -#include -#include - -#define ROW_LEN 16 - -void print_array(const char *name, const uchar *array, uint size); - -int main(void) -{ - printf("# Configuration file for the " - STRINGIZE(CHARSET) - " character set.\n"); - - print_array("ctype", JOIN_WORDS(ctype_, CHARSET), 257); - print_array("to_lower", JOIN_WORDS(to_lower_, CHARSET), 256); - print_array("to_upper", JOIN_WORDS(to_upper_, CHARSET), 256); - print_array("sort_order", JOIN_WORDS(sort_order_, CHARSET), 256); - - exit(EXIT_SUCCESS); -} - -void print_array(const char *name, const uchar *array, uint size) -{ - uint i; - - printf("\n# The %s array must have %d elements.\n", name, size); - - for (i = 0; i < size; ++i) { - printf(" %02X", array[i]); - - if ((i+1) % ROW_LEN == size % ROW_LEN) - printf("\n"); - } -} diff --git a/externals/mysql/mysys/md5.c b/externals/mysql/mysys/md5.c deleted file mode 100644 index 2388cebedc..0000000000 --- a/externals/mysql/mysys/md5.c +++ /dev/null @@ -1,325 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - * This code implements the MD5 message-digest algorithm. - * The algorithm is due to Ron Rivest. This code was - * written by Colin Plumb in 1993, no copyright is claimed. - * This code is in the public domain; do with it what you wish. - * - * Equivalent code is available from RSA Data Security, Inc. - * This code has been tested against that, and is equivalent, - * except that you don't need to include two pages of legalese - * with every copy. - * - * To compute the message digest of a chunk of bytes, declare an - * MD5Context structure, pass it to MD5Init, call MD5Update as - * needed on buffers full of bytes, and then call MD5Final, which - * will fill a supplied 16-byte array with the digest. - */ - -/* This code was modified in 1997 by Jim Kingdon of Cyclic Software to - not require an integer type which is exactly 32 bits. This work - draws on the changes for the same purpose by Tatu Ylonen - as part of SSH, but since I didn't actually use - that code, there is no copyright issue. I hereby disclaim - copyright in any changes I have made; this code remains in the - public domain. */ - -#include -#include -#include "my_md5.h" - -#include /* for memcpy() and memset() */ - - -static void -my_MD5Transform (cvs_uint32 buf[4], const unsigned char in[64]); - -/* Little-endian byte-swapping routines. Note that these do not - depend on the size of datatypes such as uint32, nor do they require - us to detect the endianness of the machine we are running on. It - is possible they should be macros for speed, but I would be - surprised if they were a performance bottleneck for MD5. */ - -static uint32 getu32 (const unsigned char *addr) -{ - return (((((unsigned long)addr[3] << 8) | addr[2]) << 8) - | addr[1]) << 8 | addr[0]; -} - -static void -putu32 (uint32 data, unsigned char *addr) -{ - addr[0] = (unsigned char)data; - addr[1] = (unsigned char)(data >> 8); - addr[2] = (unsigned char)(data >> 16); - addr[3] = (unsigned char)(data >> 24); -} - -/* - Start MD5 accumulation. Set bit count to 0 and buffer to mysterious - initialization constants. -*/ -void -my_MD5Init (my_MD5Context *ctx) -{ - ctx->buf[0] = 0x67452301; - ctx->buf[1] = 0xefcdab89; - ctx->buf[2] = 0x98badcfe; - ctx->buf[3] = 0x10325476; - - ctx->bits[0] = 0; - ctx->bits[1] = 0; -} - -/* - Update context to reflect the concatenation of another buffer full - of bytes. -*/ -void -my_MD5Update (my_MD5Context *ctx, unsigned char const *buf, unsigned len) -{ - uint32 t; - - /* Update bitcount */ - - t = ctx->bits[0]; - if ((ctx->bits[0] = (t + ((uint32)len << 3)) & 0xffffffff) < t) - ctx->bits[1]++; /* Carry from low to high */ - ctx->bits[1] += len >> 29; - - t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ - - /* Handle any leading odd-sized chunks */ - - if ( t ) { - unsigned char *p = ctx->in + t; - - t = 64-t; - if (len < t) { - memcpy(p, buf, len); - return; - } - memcpy(p, buf, t); - my_MD5Transform (ctx->buf, ctx->in); - buf += t; - len -= t; - } - - /* Process data in 64-byte chunks */ - - while (len >= 64) { - memcpy(ctx->in, buf, 64); - my_MD5Transform (ctx->buf, ctx->in); - buf += 64; - len -= 64; - } - - /* Handle any remaining bytes of data. */ - - memcpy(ctx->in, buf, len); -} - -/* - Final wrapup - pad to 64-byte boundary with the bit pattern - 1 0* (64-bit count of bits processed, MSB-first) -*/ -void -my_MD5Final (unsigned char digest[16], my_MD5Context *ctx) -{ - unsigned count; - unsigned char *p; - - /* Compute number of bytes mod 64 */ - count = (ctx->bits[0] >> 3) & 0x3F; - - /* Set the first char of padding to 0x80. This is safe since there is - always at least one byte free */ - p = ctx->in + count; - *p++ = 0x80; - - /* Bytes of padding needed to make 64 bytes */ - count = 64 - 1 - count; - - /* Pad out to 56 mod 64 */ - if (count < 8) { - /* Two lots of padding: Pad the first block to 64 bytes */ - memset(p, 0, count); - my_MD5Transform (ctx->buf, ctx->in); - - /* Now fill the next block with 56 bytes */ - memset(ctx->in, 0, 56); - } else { - /* Pad block to 56 bytes */ - memset(p, 0, count-8); - } - - /* Append length in bits and transform */ - putu32(ctx->bits[0], ctx->in + 56); - putu32(ctx->bits[1], ctx->in + 60); - - my_MD5Transform (ctx->buf, ctx->in); - putu32(ctx->buf[0], digest); - putu32(ctx->buf[1], digest + 4); - putu32(ctx->buf[2], digest + 8); - putu32(ctx->buf[3], digest + 12); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ -} - -#ifndef ASM_MD5 - -/* The four core functions - F1 is optimized somewhat */ - -/* #define F1(x, y, z) (x & y | ~x & z) */ -#define F1(x, y, z) (z ^ (x & (y ^ z))) -#define F2(x, y, z) F1(z, x, y) -#define F3(x, y, z) (x ^ y ^ z) -#define F4(x, y, z) (y ^ (x | ~z)) - -/* This is the central step in the MD5 algorithm. */ -#define MD5STEP(f, w, x, y, z, data, s) \ - ( w += f(x, y, z) + data, w &= 0xffffffff, w = w<>(32-s), w += x ) - -/* - * The core of the MD5 algorithm, this alters an existing MD5 hash to - * reflect the addition of 16 longwords of new data. MD5Update blocks - * the data and converts bytes into longwords for this routine. - */ -static void -my_MD5Transform (uint32 buf[4], const unsigned char inraw[64]) -{ - register uint32 a, b, c, d; - uint32 in[16]; - int i; - - for (i = 0; i < 16; ++i) - in[i] = getu32 (inraw + 4 * i); - - a = buf[0]; - b = buf[1]; - c = buf[2]; - d = buf[3]; - - MD5STEP(F1, a, b, c, d, in[ 0]+0xd76aa478, 7); - MD5STEP(F1, d, a, b, c, in[ 1]+0xe8c7b756, 12); - MD5STEP(F1, c, d, a, b, in[ 2]+0x242070db, 17); - MD5STEP(F1, b, c, d, a, in[ 3]+0xc1bdceee, 22); - MD5STEP(F1, a, b, c, d, in[ 4]+0xf57c0faf, 7); - MD5STEP(F1, d, a, b, c, in[ 5]+0x4787c62a, 12); - MD5STEP(F1, c, d, a, b, in[ 6]+0xa8304613, 17); - MD5STEP(F1, b, c, d, a, in[ 7]+0xfd469501, 22); - MD5STEP(F1, a, b, c, d, in[ 8]+0x698098d8, 7); - MD5STEP(F1, d, a, b, c, in[ 9]+0x8b44f7af, 12); - MD5STEP(F1, c, d, a, b, in[10]+0xffff5bb1, 17); - MD5STEP(F1, b, c, d, a, in[11]+0x895cd7be, 22); - MD5STEP(F1, a, b, c, d, in[12]+0x6b901122, 7); - MD5STEP(F1, d, a, b, c, in[13]+0xfd987193, 12); - MD5STEP(F1, c, d, a, b, in[14]+0xa679438e, 17); - MD5STEP(F1, b, c, d, a, in[15]+0x49b40821, 22); - - MD5STEP(F2, a, b, c, d, in[ 1]+0xf61e2562, 5); - MD5STEP(F2, d, a, b, c, in[ 6]+0xc040b340, 9); - MD5STEP(F2, c, d, a, b, in[11]+0x265e5a51, 14); - MD5STEP(F2, b, c, d, a, in[ 0]+0xe9b6c7aa, 20); - MD5STEP(F2, a, b, c, d, in[ 5]+0xd62f105d, 5); - MD5STEP(F2, d, a, b, c, in[10]+0x02441453, 9); - MD5STEP(F2, c, d, a, b, in[15]+0xd8a1e681, 14); - MD5STEP(F2, b, c, d, a, in[ 4]+0xe7d3fbc8, 20); - MD5STEP(F2, a, b, c, d, in[ 9]+0x21e1cde6, 5); - MD5STEP(F2, d, a, b, c, in[14]+0xc33707d6, 9); - MD5STEP(F2, c, d, a, b, in[ 3]+0xf4d50d87, 14); - MD5STEP(F2, b, c, d, a, in[ 8]+0x455a14ed, 20); - MD5STEP(F2, a, b, c, d, in[13]+0xa9e3e905, 5); - MD5STEP(F2, d, a, b, c, in[ 2]+0xfcefa3f8, 9); - MD5STEP(F2, c, d, a, b, in[ 7]+0x676f02d9, 14); - MD5STEP(F2, b, c, d, a, in[12]+0x8d2a4c8a, 20); - - MD5STEP(F3, a, b, c, d, in[ 5]+0xfffa3942, 4); - MD5STEP(F3, d, a, b, c, in[ 8]+0x8771f681, 11); - MD5STEP(F3, c, d, a, b, in[11]+0x6d9d6122, 16); - MD5STEP(F3, b, c, d, a, in[14]+0xfde5380c, 23); - MD5STEP(F3, a, b, c, d, in[ 1]+0xa4beea44, 4); - MD5STEP(F3, d, a, b, c, in[ 4]+0x4bdecfa9, 11); - MD5STEP(F3, c, d, a, b, in[ 7]+0xf6bb4b60, 16); - MD5STEP(F3, b, c, d, a, in[10]+0xbebfbc70, 23); - MD5STEP(F3, a, b, c, d, in[13]+0x289b7ec6, 4); - MD5STEP(F3, d, a, b, c, in[ 0]+0xeaa127fa, 11); - MD5STEP(F3, c, d, a, b, in[ 3]+0xd4ef3085, 16); - MD5STEP(F3, b, c, d, a, in[ 6]+0x04881d05, 23); - MD5STEP(F3, a, b, c, d, in[ 9]+0xd9d4d039, 4); - MD5STEP(F3, d, a, b, c, in[12]+0xe6db99e5, 11); - MD5STEP(F3, c, d, a, b, in[15]+0x1fa27cf8, 16); - MD5STEP(F3, b, c, d, a, in[ 2]+0xc4ac5665, 23); - - MD5STEP(F4, a, b, c, d, in[ 0]+0xf4292244, 6); - MD5STEP(F4, d, a, b, c, in[ 7]+0x432aff97, 10); - MD5STEP(F4, c, d, a, b, in[14]+0xab9423a7, 15); - MD5STEP(F4, b, c, d, a, in[ 5]+0xfc93a039, 21); - MD5STEP(F4, a, b, c, d, in[12]+0x655b59c3, 6); - MD5STEP(F4, d, a, b, c, in[ 3]+0x8f0ccc92, 10); - MD5STEP(F4, c, d, a, b, in[10]+0xffeff47d, 15); - MD5STEP(F4, b, c, d, a, in[ 1]+0x85845dd1, 21); - MD5STEP(F4, a, b, c, d, in[ 8]+0x6fa87e4f, 6); - MD5STEP(F4, d, a, b, c, in[15]+0xfe2ce6e0, 10); - MD5STEP(F4, c, d, a, b, in[ 6]+0xa3014314, 15); - MD5STEP(F4, b, c, d, a, in[13]+0x4e0811a1, 21); - MD5STEP(F4, a, b, c, d, in[ 4]+0xf7537e82, 6); - MD5STEP(F4, d, a, b, c, in[11]+0xbd3af235, 10); - MD5STEP(F4, c, d, a, b, in[ 2]+0x2ad7d2bb, 15); - MD5STEP(F4, b, c, d, a, in[ 9]+0xeb86d391, 21); - - buf[0] += a; - buf[1] += b; - buf[2] += c; - buf[3] += d; -} -#endif - -#ifdef TEST -/* - Simple test program. Can use it to manually run the tests from - RFC1321 for example. -*/ -#include - -int -main (int argc, char **argv) -{ - my_MD5Context context; - unsigned char checksum[16]; - int i; - int j; - - if (argc < 2) - { - fprintf (stderr, "usage: %s string-to-hash\n", argv[0]); - exit (1); - } - for (j = 1; j < argc; ++j) - { - printf ("MD5 (\"%s\") = ", argv[j]); - my_MD5Init (&context); - my_MD5Update (&context, argv[j], strlen (argv[j])); - my_MD5Final (checksum, &context); - for (i = 0; i < 16; i++) - { - printf ("%02x", (unsigned int) checksum[i]); - } - printf ("\n"); - } - return 0; -} -#endif /* TEST */ diff --git a/externals/mysql/mysys/mf_arr_appstr.c b/externals/mysql/mysys/mf_arr_appstr.c deleted file mode 100644 index 1edbea9df4..0000000000 --- a/externals/mysql/mysys/mf_arr_appstr.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include /* strcmp() */ - - -/** - Append str to array, or move to the end if it already exists - - @param str String to be appended - @param array The array, terminated by a NULL element, all unused elements - pre-initialized to NULL - @param size Size of the array; array must be terminated by a NULL - pointer, so can hold size - 1 elements - - @retval FALSE Success - @retval TRUE Failure, array is full -*/ - -my_bool array_append_string_unique(const char *str, - const char **array, size_t size) -{ - const char **p; - /* end points at the terminating NULL element */ - const char **end= array + size - 1; - DBUG_ASSERT(*end == NULL); - - for (p= array; *p; ++p) - { - if (strcmp(*p, str) == 0) - break; - } - if (p >= end) - return TRUE; /* Array is full */ - - DBUG_ASSERT(*p == NULL || strcmp(*p, str) == 0); - - while (*(p + 1)) - { - *p= *(p + 1); - ++p; - } - - DBUG_ASSERT(p < end); - *p= str; - - return FALSE; /* Success */ -} diff --git a/externals/mysql/mysys/mf_brkhant.c b/externals/mysql/mysys/mf_brkhant.c deleted file mode 100644 index 3573b9973b..0000000000 --- a/externals/mysql/mysys/mf_brkhant.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Dont let the user break when you are doing something important */ -/* Remembers if it got 'SIGINT' and executes it on allow_break */ -/* A static buffer is used; don't call dont_break() twice in a row */ - -#include "mysys_priv.h" -#include "my_static.h" - - /* Set variable that we can't break */ - -#if !defined(THREAD) -void dont_break(void) -{ - my_dont_interrupt=1; - return; -} /* dont_break */ - -void allow_break(void) -{ - { - reg1 int index; - - my_dont_interrupt=0; - if (_my_signals) - { - if (_my_signals > MAX_SIGNALS) - _my_signals=MAX_SIGNALS; - for (index=0 ; index < _my_signals ; index++) - { - if (_my_sig_remember[index].func) /* Safequard */ - { - (*_my_sig_remember[index].func)(_my_sig_remember[index].number); - _my_sig_remember[index].func=0; - } - } - _my_signals=0; - } - } -} /* dont_break */ -#endif - - /* Set old status */ - -#if !defined(THREAD) -void my_remember_signal(int signal_number, sig_handler (*func) (int)) -{ -#ifndef __WIN__ - reg1 int index; - - index=_my_signals++; /* Nobody can break a ++ ? */ - if (index < MAX_SIGNALS) - { - _my_sig_remember[index].number=signal_number; - _my_sig_remember[index].func=func; - } -#endif /* __WIN__ */ -} /* my_remember_signal */ -#endif /* THREAD */ diff --git a/externals/mysql/mysys/mf_cache.c b/externals/mysql/mysys/mf_cache.c deleted file mode 100644 index f0df0f3fa7..0000000000 --- a/externals/mysql/mysys/mf_cache.c +++ /dev/null @@ -1,121 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Open a temporary file and cache it with io_cache. Delete it on close */ - -#include "mysys_priv.h" -#include -#include "my_static.h" -#include "mysys_err.h" - - /* - Remove an open tempfile so that it doesn't survive - if we crash; If the operating system doesn't support - this, just remember the file name for later removal - */ - -static my_bool cache_remove_open_tmp(IO_CACHE *cache __attribute__((unused)), - const char *name) -{ -#if O_TEMPORARY == 0 -#if !defined(CANT_DELETE_OPEN_FILES) - /* The following should always succeed */ - (void) my_delete(name,MYF(MY_WME | ME_NOINPUT)); -#else - int length; - if (!(cache->file_name= - (char*) my_malloc((length=strlen(name)+1),MYF(MY_WME)))) - { - my_close(cache->file,MYF(0)); - cache->file = -1; - errno=my_errno=ENOMEM; - return 1; - } - memcpy(cache->file_name,name,length); -#endif -#endif /* O_TEMPORARY == 0 */ - return 0; -} - - /* - ** Open tempfile cached by IO_CACHE - ** Should be used when no seeks are done (only reinit_io_buff) - ** Return 0 if cache is inited ok - ** The actual file is created when the IO_CACHE buffer gets filled - ** If dir is not given, use TMPDIR. - */ - -my_bool open_cached_file(IO_CACHE *cache, const char* dir, const char *prefix, - size_t cache_size, myf cache_myflags) -{ - DBUG_ENTER("open_cached_file"); - cache->dir= dir ? my_strdup(dir,MYF(cache_myflags & MY_WME)) : (char*) 0; - cache->prefix= (prefix ? my_strdup(prefix,MYF(cache_myflags & MY_WME)) : - (char*) 0); - cache->file_name=0; - cache->buffer=0; /* Mark that not open */ - if (!init_io_cache(cache,-1,cache_size,WRITE_CACHE,0L,0, - MYF(cache_myflags | MY_NABP))) - { - DBUG_RETURN(0); - } - my_free(cache->dir, MYF(MY_ALLOW_ZERO_PTR)); - my_free(cache->prefix,MYF(MY_ALLOW_ZERO_PTR)); - DBUG_RETURN(1); -} - - /* Create the temporary file */ - -my_bool real_open_cached_file(IO_CACHE *cache) -{ - char name_buff[FN_REFLEN]; - int error=1; - DBUG_ENTER("real_open_cached_file"); - if ((cache->file=create_temp_file(name_buff, cache->dir, cache->prefix, - (O_RDWR | O_BINARY | O_TRUNC | - O_TEMPORARY | O_SHORT_LIVED), - MYF(MY_WME))) >= 0) - { - error=0; - cache_remove_open_tmp(cache, name_buff); - } - DBUG_RETURN(error); -} - - -void close_cached_file(IO_CACHE *cache) -{ - DBUG_ENTER("close_cached_file"); - if (my_b_inited(cache)) - { - File file=cache->file; - cache->file= -1; /* Don't flush data */ - (void) end_io_cache(cache); - if (file >= 0) - { - (void) my_close(file,MYF(0)); -#ifdef CANT_DELETE_OPEN_FILES - if (cache->file_name) - { - (void) my_delete(cache->file_name,MYF(MY_WME | ME_NOINPUT)); - my_free(cache->file_name,MYF(0)); - } -#endif - } - my_free(cache->dir,MYF(MY_ALLOW_ZERO_PTR)); - my_free(cache->prefix,MYF(MY_ALLOW_ZERO_PTR)); - } - DBUG_VOID_RETURN; -} diff --git a/externals/mysql/mysys/mf_dirname.c b/externals/mysql/mysys/mf_dirname.c deleted file mode 100644 index 1b428ded75..0000000000 --- a/externals/mysql/mysys/mf_dirname.c +++ /dev/null @@ -1,165 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include - - /* Functions definied in this file */ - -size_t dirname_length(const char *name) -{ - register char *pos, *gpos; -#ifdef BASKSLASH_MBTAIL - CHARSET_INFO *fs= fs_character_set(); -#endif -#ifdef FN_DEVCHAR - if ((pos=(char*)strrchr(name,FN_DEVCHAR)) == 0) -#endif - pos=(char*) name-1; - - gpos= pos++; - for ( ; *pos ; pos++) /* Find last FN_LIBCHAR */ - { -#ifdef BASKSLASH_MBTAIL - uint l; - if (use_mb(fs) && (l= my_ismbchar(fs, pos, pos + 3))) - { - pos+= l - 1; - continue; - } -#endif - if (*pos == FN_LIBCHAR || *pos == '/' -#ifdef FN_C_AFTER_DIR - || *pos == FN_C_AFTER_DIR || *pos == FN_C_AFTER_DIR_2 -#endif - ) - gpos=pos; - } - return (size_t) (gpos+1-(char*) name); -} - - -/* - Gives directory part of filename. Directory ends with '/' - - SYNOPSIS - dirname_part() - to Store directory name here - name Original name - to_length Store length of 'to' here - - RETURN - # Length of directory part in 'name' -*/ - -size_t dirname_part(char *to, const char *name, size_t *to_res_length) -{ - size_t length; - DBUG_ENTER("dirname_part"); - DBUG_PRINT("enter",("'%s'",name)); - - length=dirname_length(name); - *to_res_length= (size_t) (convert_dirname(to, name, name+length) - to); - DBUG_RETURN(length); -} /* dirname */ - - -/* - Convert directory name to use under this system - - SYNPOSIS - convert_dirname() - to Store result here. Must be at least of size - min(FN_REFLEN, strlen(from) + 1) to make room - for adding FN_LIBCHAR at the end. - from Original filename. May be == to - from_end Pointer at end of filename (normally end \0) - - IMPLEMENTATION - If MSDOS converts '/' to '\' - If VMS converts '<' to '[' and '>' to ']' - Adds a FN_LIBCHAR to end if the result string if there isn't one - and the last isn't dev_char. - Copies data from 'from' until ASCII(0) for until from == from_end - If you want to use the whole 'from' string, just send NullS as the - last argument. - - If the result string is larger than FN_REFLEN -1, then it's cut. - - RETURN - Returns pointer to end \0 in to -*/ - -#ifndef FN_DEVCHAR -#define FN_DEVCHAR '\0' /* For easier code */ -#endif - -char *convert_dirname(char *to, const char *from, const char *from_end) -{ - char *to_org=to; -#ifdef BACKSLASH_MBTAIL - CHARSET_INFO *fs= fs_character_set(); -#endif - DBUG_ENTER("convert_dirname"); - - /* We use -2 here, becasue we need place for the last FN_LIBCHAR */ - if (!from_end || (from_end - from) > FN_REFLEN-2) - from_end=from+FN_REFLEN -2; - -#if FN_LIBCHAR != '/' || defined(FN_C_BEFORE_DIR_2) - { - for (; from != from_end && *from ; from++) - { - if (*from == '/') - *to++= FN_LIBCHAR; -#ifdef FN_C_BEFORE_DIR_2 - else if (*from == FN_C_BEFORE_DIR_2) - *to++= FN_C_BEFORE_DIR; - else if (*from == FN_C_AFTER_DIR_2) - *to++= FN_C_AFTER_DIR; -#endif - else - { -#ifdef BACKSLASH_MBTAIL - uint l; - if (use_mb(fs) && (l= my_ismbchar(fs, from, from + 3))) - { - memmove(to, from, l); - to+= l; - from+= l - 1; - to_org= to; /* Don't look inside mbchar */ - } - else -#endif - { - *to++= *from; - } - } - } - *to=0; - } -#else - /* This is ok even if to == from, becasue we need to cut the string */ - to= strmake(to, from, (size_t) (from_end-from)); -#endif - - /* Add FN_LIBCHAR to the end of directory path */ - if (to != to_org && (to[-1] != FN_LIBCHAR && to[-1] != FN_DEVCHAR)) - { - *to++=FN_LIBCHAR; - *to=0; - } - DBUG_RETURN(to); /* Pointer to end of dir */ -} /* convert_dirname */ diff --git a/externals/mysql/mysys/mf_fn_ext.c b/externals/mysql/mysys/mf_fn_ext.c deleted file mode 100644 index da7fac3de7..0000000000 --- a/externals/mysql/mysys/mf_fn_ext.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include "mysys_priv.h" -#include - -/* - Return a pointer to the extension of the filename. - - SYNOPSIS - fn_ext() - name Name of file - - DESCRIPTION - The extension is defined as everything after the first extension character - (normally '.') after the directory name. - - RETURN VALUES - Pointer to to the extension character. If there isn't any extension, - points at the end ASCII(0) of the filename. -*/ - -char *fn_ext(const char *name) -{ - register const char *pos, *gpos; - DBUG_ENTER("fn_ext"); - DBUG_PRINT("mfunkt",("name: '%s'",name)); - -#if defined(FN_DEVCHAR) || defined(FN_C_AFTER_DIR) || defined(BASKSLASH_MBTAIL) - { - char buff[FN_REFLEN]; - size_t res_length; - gpos= name+ dirname_part(buff,(char*) name, &res_length); - } -#else - if (!(gpos= strrchr(name, FN_LIBCHAR))) - gpos= name; -#endif - pos=strchr(gpos,FN_EXTCHAR); - DBUG_RETURN((char*) (pos ? pos : strend(gpos))); -} /* fn_ext */ diff --git a/externals/mysql/mysys/mf_format.c b/externals/mysql/mysys/mf_format.c deleted file mode 100644 index f199132626..0000000000 --- a/externals/mysql/mysys/mf_format.c +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include - -/* - Formats a filename with possible replace of directory of extension - Function can handle the case where 'to' == 'name' - For a description of the flag values, consult my_sys.h - The arguments should be in unix format. -*/ - -char * fn_format(char * to, const char *name, const char *dir, - const char *extension, uint flag) -{ - char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos; - const char *ext; - reg1 size_t length; - size_t dev_length; - DBUG_ENTER("fn_format"); - DBUG_PRINT("enter",("name: %s dir: %s extension: %s flag: %d", - name,dir,extension,flag)); - - /* Copy and skip directory */ - name+=(length=dirname_part(dev, (startpos=(char *) name), &dev_length)); - if (length == 0 || (flag & MY_REPLACE_DIR)) - { - /* Use given directory */ - convert_dirname(dev,dir,NullS); /* Fix to this OS */ - } - else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev)) - { - /* Put 'dir' before the given path */ - strmake(buff,dev,sizeof(buff)-1); - pos=convert_dirname(dev,dir,NullS); - strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev)); - } - - if (flag & MY_PACK_FILENAME) - pack_dirname(dev,dev); /* Put in ./.. and ~/.. */ - if (flag & MY_UNPACK_FILENAME) - (void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */ - - if (!(flag & MY_APPEND_EXT) && - (pos= (char*) strchr(name,FN_EXTCHAR)) != NullS) - { - if ((flag & MY_REPLACE_EXT) == 0) /* If we should keep old ext */ - { - length=strlength(name); /* Use old extension */ - ext = ""; - } - else - { - length= (size_t) (pos-(char*) name); /* Change extension */ - ext= extension; - } - } - else - { - length=strlength(name); /* No ext, use the now one */ - ext=extension; - } - - if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN ) - { - /* To long path, return original or NULL */ - size_t tmp_length; - if (flag & MY_SAFE_PATH) - return NullS; - tmp_length= strlength(startpos); - DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %u",dev,ext, - (uint) length)); - (void) strmake(to,startpos,min(tmp_length,FN_REFLEN-1)); - } - else - { - if (to == startpos) - { - bmove(buff,(uchar*) name,length); /* Save name for last copy */ - name=buff; - } - pos=strmake(strmov(to,dev),name,length); - (void) strmov(pos,ext); /* Don't convert extension */ - } - /* - If MY_RETURN_REAL_PATH and MY_RESOLVE_SYMLINK is given, only do - realpath if the file is a symbolic link - */ - if (flag & MY_RETURN_REAL_PATH) - (void) my_realpath(to, to, MYF(flag & MY_RESOLVE_SYMLINKS ? - MY_RESOLVE_LINK: 0)); - else if (flag & MY_RESOLVE_SYMLINKS) - { - strmov(buff,to); - (void) my_readlink(to, buff, MYF(0)); - } - DBUG_RETURN(to); -} /* fn_format */ - - -/* - strlength(const string str) - Return length of string with end-space:s not counted. -*/ - -size_t strlength(const char *str) -{ - reg1 const char * pos; - reg2 const char * found; - DBUG_ENTER("strlength"); - - pos= found= str; - - while (*pos) - { - if (*pos != ' ') - { - while (*++pos && *pos != ' ') {}; - if (!*pos) - { - found=pos; /* String ends here */ - break; - } - } - found=pos; - while (*++pos == ' ') {}; - } - DBUG_RETURN((size_t) (found - str)); -} /* strlength */ diff --git a/externals/mysql/mysys/mf_getdate.c b/externals/mysql/mysys/mf_getdate.c deleted file mode 100644 index 3a8e1be6a0..0000000000 --- a/externals/mysql/mysys/mf_getdate.c +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Get date in a printable form: yyyy-mm-dd hh:mm:ss */ - -#include "mysys_priv.h" -#include - -/* - get date as string - - SYNOPSIS - get_date() - to - string where date will be written - flag - format of date: - If flag & GETDATE_TIME Return date and time - If flag & GETDATE_SHORT_DATE Return short date format YYMMDD - If flag & GETDATE_HHMMSSTIME Return time in HHMMDD format. - If flag & GETDATE_GMT Date/time in GMT - If flag & GETDATE_FIXEDLENGTH Return fixed length date/time - date - for conversion -*/ - - -void get_date(register char * to, int flag, time_t date) -{ - reg2 struct tm *start_time; - time_t skr; -#if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT) - struct tm tm_tmp; -#endif - - skr=date ? (time_t) date : my_time(0); -#if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT) - if (flag & GETDATE_GMT) - localtime_r(&skr,&tm_tmp); - else - gmtime_r(&skr,&tm_tmp); - start_time= &tm_tmp; -#else - if (flag & GETDATE_GMT) - start_time= localtime(&skr); - else - start_time= gmtime(&skr); -#endif - if (flag & GETDATE_SHORT_DATE) - sprintf(to,"%02d%02d%02d", - start_time->tm_year % 100, - start_time->tm_mon+1, - start_time->tm_mday); - else - sprintf(to, ((flag & GETDATE_FIXEDLENGTH) ? - "%4d-%02d-%02d" : "%d-%02d-%02d"), - start_time->tm_year+1900, - start_time->tm_mon+1, - start_time->tm_mday); - if (flag & GETDATE_DATE_TIME) - sprintf(strend(to), - ((flag & GETDATE_FIXEDLENGTH) ? - " %02d:%02d:%02d" : " %2d:%02d:%02d"), - start_time->tm_hour, - start_time->tm_min, - start_time->tm_sec); - else if (flag & GETDATE_HHMMSSTIME) - sprintf(strend(to),"%02d%02d%02d", - start_time->tm_hour, - start_time->tm_min, - start_time->tm_sec); -} /* get_date */ diff --git a/externals/mysql/mysys/mf_iocache.c b/externals/mysql/mysys/mf_iocache.c deleted file mode 100644 index 120d886ce0..0000000000 --- a/externals/mysql/mysys/mf_iocache.c +++ /dev/null @@ -1,1967 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Cashing of files with only does (sequential) read or writes of fixed- - length records. A read isn't allowed to go over file-length. A read is ok - if it ends at file-length and next read can try to read after file-length - (and get a EOF-error). - Possibly use of asyncronic io. - macros for read and writes for faster io. - Used instead of FILE when reading or writing whole files. - This code makes mf_rec_cache obsolete (currently only used by ISAM) - One can change info->pos_in_file to a higher value to skip bytes in file if - also info->read_pos is set to info->read_end. - If called through open_cached_file(), then the temporary file will - only be created if a write exeeds the file buffer or if one calls - my_b_flush_io_cache(). - - If one uses SEQ_READ_APPEND, then two buffers are allocated, one for - reading and another for writing. Reads are first done from disk and - then done from the write buffer. This is an efficient way to read - from a log file when one is writing to it at the same time. - For this to work, the file has to be opened in append mode! - Note that when one uses SEQ_READ_APPEND, one MUST write using - my_b_append ! This is needed because we need to lock the mutex - every time we access the write buffer. - -TODO: - When one SEQ_READ_APPEND and we are reading and writing at the same time, - each time the write buffer gets full and it's written to disk, we will - always do a disk read to read a part of the buffer from disk to the - read buffer. - This should be fixed so that when we do a my_b_flush_io_cache() and - we have been reading the write buffer, we should transfer the rest of the - write buffer to the read buffer before we start to reuse it. -*/ - -#define MAP_TO_USE_RAID -#include "mysys_priv.h" -#include -#ifdef HAVE_AIOWAIT -#include "mysys_err.h" -static void my_aiowait(my_aio_result *result); -#endif -#include - -#ifdef THREAD -#define lock_append_buffer(info) \ - pthread_mutex_lock(&(info)->append_buffer_lock) -#define unlock_append_buffer(info) \ - pthread_mutex_unlock(&(info)->append_buffer_lock) -#else -#define lock_append_buffer(info) -#define unlock_append_buffer(info) -#endif - -#define IO_ROUND_UP(X) (((X)+IO_SIZE-1) & ~(IO_SIZE-1)) -#define IO_ROUND_DN(X) ( (X) & ~(IO_SIZE-1)) - -/* - Setup internal pointers inside IO_CACHE - - SYNOPSIS - setup_io_cache() - info IO_CACHE handler - - NOTES - This is called on automaticly on init or reinit of IO_CACHE - It must be called externally if one moves or copies an IO_CACHE - object. -*/ - -void setup_io_cache(IO_CACHE* info) -{ - /* Ensure that my_b_tell() and my_b_bytes_in_cache works */ - if (info->type == WRITE_CACHE) - { - info->current_pos= &info->write_pos; - info->current_end= &info->write_end; - } - else - { - info->current_pos= &info->read_pos; - info->current_end= &info->read_end; - } -} - - -static void -init_functions(IO_CACHE* info) -{ - enum cache_type type= info->type; - switch (type) { - case READ_NET: - /* - Must be initialized by the caller. The problem is that - _my_b_net_read has to be defined in sql directory because of - the dependency on THD, and therefore cannot be visible to - programs that link against mysys but know nothing about THD, such - as myisamchk - */ - break; - case SEQ_READ_APPEND: - info->read_function = _my_b_seq_read; - info->write_function = 0; /* Force a core if used */ - break; - default: - info->read_function = -#ifdef THREAD - info->share ? _my_b_read_r : -#endif - _my_b_read; - info->write_function = _my_b_write; - } - - setup_io_cache(info); -} - - -/* FUNCTIONS TO SET UP OR RESET A CACHE */ - - -/* - Initialize an IO_CACHE object - - SYNOPSOS - init_io_cache() - info cache handler to initialize - file File that should be associated to to the handler - If == -1 then real_open_cached_file() - will be called when it's time to open file. - cachesize Size of buffer to allocate for read/write - If == 0 then use my_default_record_cache_size - type Type of cache - seek_offset Where cache should start reading/writing - use_async_io Set to 1 of we should use async_io (if avaiable) - cache_myflags Bitmap of differnt flags - MY_WME | MY_FAE | MY_NABP | MY_FNABP | - MY_DONT_CHECK_FILESIZE - - RETURN - 0 ok - # error -*/ - -int init_io_cache(IO_CACHE *info, File file, size_t cachesize, - enum cache_type type, my_off_t seek_offset, - pbool use_async_io, myf cache_myflags) -{ - size_t min_cache; - my_off_t pos; - my_off_t end_of_file= ~(my_off_t) 0; - DBUG_ENTER("init_io_cache"); - DBUG_PRINT("enter",("cache: %p type: %d pos: %ld", - info, (int) type, (ulong) seek_offset)); - - info->file= file; - info->type= TYPE_NOT_SET; /* Don't set it until mutex are created */ - info->pos_in_file= seek_offset; - info->pre_close= info->pre_read= info->post_read= info->post_write= NULL; - info->arg = 0; - info->alloced_buffer = 0; - info->buffer=0; - info->seek_not_done= 0; - - if (file >= 0) - { - pos= my_tell(file, MYF(0)); - if ((pos == (my_off_t) -1) && (my_errno == ESPIPE)) - { - /* - This kind of object doesn't support seek() or tell(). Don't set a - flag that will make us again try to seek() later and fail. - */ - info->seek_not_done= 0; - /* - Additionally, if we're supposed to start somewhere other than the - the beginning of whatever this file is, then somebody made a bad - assumption. - */ - DBUG_ASSERT(seek_offset == 0); - } - else - info->seek_not_done= test(seek_offset != pos); - } - - info->disk_writes= 0; -#ifdef THREAD - info->share=0; -#endif - - if (!cachesize && !(cachesize= my_default_record_cache_size)) - DBUG_RETURN(1); /* No cache requested */ - min_cache=use_async_io ? IO_SIZE*4 : IO_SIZE*2; - if (type == READ_CACHE || type == SEQ_READ_APPEND) - { /* Assume file isn't growing */ - if (!(cache_myflags & MY_DONT_CHECK_FILESIZE)) - { - /* Calculate end of file to avoid allocating oversized buffers */ - end_of_file=my_seek(file,0L,MY_SEEK_END,MYF(0)); - /* Need to reset seek_not_done now that we just did a seek. */ - info->seek_not_done= end_of_file == seek_offset ? 0 : 1; - if (end_of_file < seek_offset) - end_of_file=seek_offset; - /* Trim cache size if the file is very small */ - if ((my_off_t) cachesize > end_of_file-seek_offset+IO_SIZE*2-1) - { - cachesize= (size_t) (end_of_file-seek_offset)+IO_SIZE*2-1; - use_async_io=0; /* No need to use async */ - } - } - } - cache_myflags &= ~MY_DONT_CHECK_FILESIZE; - if (type != READ_NET && type != WRITE_NET) - { - /* Retry allocating memory in smaller blocks until we get one */ - cachesize= ((cachesize + min_cache-1) & ~(min_cache-1)); - for (;;) - { - size_t buffer_block; - if (cachesize < min_cache) - cachesize = min_cache; - buffer_block= cachesize; - if (type == SEQ_READ_APPEND) - buffer_block *= 2; - if ((info->buffer= - (uchar*) my_malloc(buffer_block, - MYF((cache_myflags & ~ MY_WME) | - (cachesize == min_cache ? MY_WME : 0)))) != 0) - { - info->write_buffer=info->buffer; - if (type == SEQ_READ_APPEND) - info->write_buffer = info->buffer + cachesize; - info->alloced_buffer=1; - break; /* Enough memory found */ - } - if (cachesize == min_cache) - DBUG_RETURN(2); /* Can't alloc cache */ - /* Try with less memory */ - cachesize= (cachesize*3/4 & ~(min_cache-1)); - } - } - - DBUG_PRINT("info",("init_io_cache: cachesize = %lu", (ulong) cachesize)); - info->read_length=info->buffer_length=cachesize; - info->myflags=cache_myflags & ~(MY_NABP | MY_FNABP); - info->request_pos= info->read_pos= info->write_pos = info->buffer; - if (type == SEQ_READ_APPEND) - { - info->append_read_pos = info->write_pos = info->write_buffer; - info->write_end = info->write_buffer + info->buffer_length; -#ifdef THREAD - pthread_mutex_init(&info->append_buffer_lock,MY_MUTEX_INIT_FAST); -#endif - } -#if defined(SAFE_MUTEX) && defined(THREAD) - else - { - /* Clear mutex so that safe_mutex will notice that it's not initialized */ - bzero((char*) &info->append_buffer_lock, sizeof(info)); - } -#endif - - if (type == WRITE_CACHE) - info->write_end= - info->buffer+info->buffer_length- (seek_offset & (IO_SIZE-1)); - else - info->read_end=info->buffer; /* Nothing in cache */ - - /* End_of_file may be changed by user later */ - info->end_of_file= end_of_file; - info->error= info->hard_write_error_in_the_past= 0; - info->type= type; - init_functions(info); -#ifdef HAVE_AIOWAIT - if (use_async_io && ! my_disable_async_io) - { - DBUG_PRINT("info",("Using async io")); - info->read_length/=2; - info->read_function=_my_b_async_read; - } - info->inited=info->aio_result.pending=0; -#endif - DBUG_RETURN(0); -} /* init_io_cache */ - - /* Wait until current request is ready */ - -#ifdef HAVE_AIOWAIT -static void my_aiowait(my_aio_result *result) -{ - if (result->pending) - { - struct aio_result_t *tmp; - for (;;) - { - if ((int) (tmp=aiowait((struct timeval *) 0)) == -1) - { - if (errno == EINTR) - continue; - DBUG_PRINT("error",("No aio request, error: %d",errno)); - result->pending=0; /* Assume everythings is ok */ - break; - } - ((my_aio_result*) tmp)->pending=0; - if ((my_aio_result*) tmp == result) - break; - } - } - return; -} -#endif - - -/* - Use this to reset cache to re-start reading or to change the type - between READ_CACHE <-> WRITE_CACHE - If we are doing a reinit of a cache where we have the start of the file - in the cache, we are reusing this memory without flushing it to disk. -*/ - -my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type, - my_off_t seek_offset, - pbool use_async_io __attribute__((unused)), - pbool clear_cache) -{ - DBUG_ENTER("reinit_io_cache"); - DBUG_PRINT("enter",("cache: %p type: %d seek_offset: %lu clear_cache: %d", - info, type, (ulong) seek_offset, - (int) clear_cache)); - - /* One can't do reinit with the following types */ - DBUG_ASSERT(type != READ_NET && info->type != READ_NET && - type != WRITE_NET && info->type != WRITE_NET && - type != SEQ_READ_APPEND && info->type != SEQ_READ_APPEND); - - /* If the whole file is in memory, avoid flushing to disk */ - if (! clear_cache && - seek_offset >= info->pos_in_file && - seek_offset <= my_b_tell(info)) - { - /* Reuse current buffer without flushing it to disk */ - uchar *pos; - if (info->type == WRITE_CACHE && type == READ_CACHE) - { - info->read_end=info->write_pos; - info->end_of_file=my_b_tell(info); - /* - Trigger a new seek only if we have a valid - file handle. - */ - info->seek_not_done= (info->file != -1); - } - else if (type == WRITE_CACHE) - { - if (info->type == READ_CACHE) - { - info->write_end=info->write_buffer+info->buffer_length; - info->seek_not_done=1; - } - info->end_of_file = ~(my_off_t) 0; - } - pos=info->request_pos+(seek_offset-info->pos_in_file); - if (type == WRITE_CACHE) - info->write_pos=pos; - else - info->read_pos= pos; -#ifdef HAVE_AIOWAIT - my_aiowait(&info->aio_result); /* Wait for outstanding req */ -#endif - } - else - { - /* - If we change from WRITE_CACHE to READ_CACHE, assume that everything - after the current positions should be ignored - */ - if (info->type == WRITE_CACHE && type == READ_CACHE) - info->end_of_file=my_b_tell(info); - /* flush cache if we want to reuse it */ - if (!clear_cache && my_b_flush_io_cache(info,1)) - DBUG_RETURN(1); - info->pos_in_file=seek_offset; - /* Better to do always do a seek */ - info->seek_not_done=1; - info->request_pos=info->read_pos=info->write_pos=info->buffer; - if (type == READ_CACHE) - { - info->read_end=info->buffer; /* Nothing in cache */ - } - else - { - info->write_end=(info->buffer + info->buffer_length - - (seek_offset & (IO_SIZE-1))); - info->end_of_file= ~(my_off_t) 0; - } - } - info->type=type; - info->error= info->hard_write_error_in_the_past= 0; - init_functions(info); - -#ifdef HAVE_AIOWAIT - if (use_async_io && ! my_disable_async_io && - ((ulong) info->buffer_length < - (ulong) (info->end_of_file - seek_offset))) - { - info->read_length=info->buffer_length/2; - info->read_function=_my_b_async_read; - } - info->inited=0; -#endif - DBUG_RETURN(0); -} /* reinit_io_cache */ - - -/* FUNCTIONS TO DO READS FROM THE CACHE */ - - -/* - Read buffered. - - SYNOPSIS - _my_b_read() - info IO_CACHE pointer - Buffer Buffer to retrieve count bytes from file - Count Number of bytes to read into Buffer - - NOTE - This function is only called from the my_b_read() macro when there - isn't enough characters in the buffer to satisfy the request. - - WARNING - - When changing this function, be careful with handling file offsets - (end-of_file, pos_in_file). Do not cast them to possibly smaller - types than my_off_t unless you can be sure that their value fits. - Same applies to differences of file offsets. - - When changing this function, check _my_b_read_r(). It might need the - same change. - - RETURN - 0 we succeeded in reading all data - 1 Error: can't read requested characters -*/ - -int _my_b_read(register IO_CACHE *info, uchar *Buffer, size_t Count) -{ - size_t length,diff_length,left_length, max_length; - my_off_t pos_in_file; - DBUG_ENTER("_my_b_read"); - - if ((left_length= (size_t) (info->read_end-info->read_pos))) - { - DBUG_ASSERT(Count >= left_length); /* User is not using my_b_read() */ - memcpy(Buffer,info->read_pos, left_length); - Buffer+=left_length; - Count-=left_length; - } - - /* pos_in_file always point on where info->buffer was read */ - pos_in_file=info->pos_in_file+ (size_t) (info->read_end - info->buffer); - - /* - Whenever a function which operates on IO_CACHE flushes/writes - some part of the IO_CACHE to disk it will set the property - "seek_not_done" to indicate this to other functions operating - on the IO_CACHE. - */ - if (info->seek_not_done) - { - if ((my_seek(info->file,pos_in_file,MY_SEEK_SET,MYF(0)) - != MY_FILEPOS_ERROR)) - { - /* No error, reset seek_not_done flag. */ - info->seek_not_done= 0; - } - else - { - /* - If the seek failed and the error number is ESPIPE, it is because - info->file is a pipe or socket or FIFO. We never should have tried - to seek on that. See Bugs#25807 and #22828 for more info. - */ - DBUG_ASSERT(my_errno != ESPIPE); - info->error= -1; - DBUG_RETURN(1); - } - } - - diff_length= (size_t) (pos_in_file & (IO_SIZE-1)); - if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length))) - { /* Fill first intern buffer */ - size_t read_length; - if (info->end_of_file <= pos_in_file) - { /* End of file */ - info->error= (int) left_length; - DBUG_RETURN(1); - } - length=(Count & (size_t) ~(IO_SIZE-1))-diff_length; - if ((read_length= my_read(info->file,Buffer, length, info->myflags)) - != length) - { - info->error= (read_length == (size_t) -1 ? -1 : - (int) (read_length+left_length)); - DBUG_RETURN(1); - } - Count-=length; - Buffer+=length; - pos_in_file+=length; - left_length+=length; - diff_length=0; - } - - max_length= info->read_length-diff_length; - if (info->type != READ_FIFO && - max_length > (info->end_of_file - pos_in_file)) - max_length= (size_t) (info->end_of_file - pos_in_file); - if (!max_length) - { - if (Count) - { - info->error= (int) left_length; /* We only got this many char */ - DBUG_RETURN(1); - } - length=0; /* Didn't read any chars */ - } - else if ((length= my_read(info->file,info->buffer, max_length, - info->myflags)) < Count || - length == (size_t) -1) - { - if (length != (size_t) -1) - memcpy(Buffer, info->buffer, length); - info->pos_in_file= pos_in_file; - info->error= length == (size_t) -1 ? -1 : (int) (length+left_length); - info->read_pos=info->read_end=info->buffer; - DBUG_RETURN(1); - } - info->read_pos=info->buffer+Count; - info->read_end=info->buffer+length; - info->pos_in_file=pos_in_file; - memcpy(Buffer, info->buffer, Count); - DBUG_RETURN(0); -} - - -#ifdef THREAD -/* - Prepare IO_CACHE for shared use. - - SYNOPSIS - init_io_cache_share() - read_cache A read cache. This will be copied for - every thread after setup. - cshare The share. - write_cache If non-NULL a write cache that is to be - synchronized with the read caches. - num_threads Number of threads sharing the cache - including the write thread if any. - - DESCRIPTION - - The shared cache is used so: One IO_CACHE is initialized with - init_io_cache(). This includes the allocation of a buffer. Then a - share is allocated and init_io_cache_share() is called with the io - cache and the share. Then the io cache is copied for each thread. So - every thread has its own copy of IO_CACHE. But the allocated buffer - is shared because cache->buffer is the same for all caches. - - One thread reads data from the file into the buffer. All threads - read from the buffer, but every thread maintains its own set of - pointers into the buffer. When all threads have used up the buffer - contents, one of the threads reads the next block of data into the - buffer. To accomplish this, each thread enters the cache lock before - accessing the buffer. They wait in lock_io_cache() until all threads - joined the lock. The last thread entering the lock is in charge of - reading from file to buffer. It wakes all threads when done. - - Synchronizing a write cache to the read caches works so: Whenever - the write buffer needs a flush, the write thread enters the lock and - waits for all other threads to enter the lock too. They do this when - they have used up the read buffer. When all threads are in the lock, - the write thread copies the write buffer to the read buffer and - wakes all threads. - - share->running_threads is the number of threads not being in the - cache lock. When entering lock_io_cache() the number is decreased. - When the thread that fills the buffer enters unlock_io_cache() the - number is reset to the number of threads. The condition - running_threads == 0 means that all threads are in the lock. Bumping - up the number to the full count is non-intuitive. But increasing the - number by one for each thread that leaves the lock could lead to a - solo run of one thread. The last thread to join a lock reads from - file to buffer, wakes the other threads, processes the data in the - cache and enters the lock again. If no other thread left the lock - meanwhile, it would think it's the last one again and read the next - block... - - The share has copies of 'error', 'buffer', 'read_end', and - 'pos_in_file' from the thread that filled the buffer. We may not be - able to access this information directly from its cache because the - thread may be removed from the share before the variables could be - copied by all other threads. Or, if a write buffer is synchronized, - it would change its 'pos_in_file' after waking the other threads, - possibly before they could copy its value. - - However, the 'buffer' variable in the share is for a synchronized - write cache. It needs to know where to put the data. Otherwise it - would need access to the read cache of one of the threads that is - not yet removed from the share. - - RETURN - void -*/ - -void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare, - IO_CACHE *write_cache, uint num_threads) -{ - DBUG_ENTER("init_io_cache_share"); - DBUG_PRINT("io_cache_share", ("read_cache: %p share: %p " - "write_cache: %p threads: %u", - read_cache, cshare, - write_cache, num_threads)); - - DBUG_ASSERT(num_threads > 1); - DBUG_ASSERT(read_cache->type == READ_CACHE); - DBUG_ASSERT(!write_cache || (write_cache->type == WRITE_CACHE)); - - pthread_mutex_init(&cshare->mutex, MY_MUTEX_INIT_FAST); - pthread_cond_init(&cshare->cond, 0); - pthread_cond_init(&cshare->cond_writer, 0); - - cshare->running_threads= num_threads; - cshare->total_threads= num_threads; - cshare->error= 0; /* Initialize. */ - cshare->buffer= read_cache->buffer; - cshare->read_end= NULL; /* See function comment of lock_io_cache(). */ - cshare->pos_in_file= 0; /* See function comment of lock_io_cache(). */ - cshare->source_cache= write_cache; /* Can be NULL. */ - - read_cache->share= cshare; - read_cache->read_function= _my_b_read_r; - read_cache->current_pos= NULL; - read_cache->current_end= NULL; - - if (write_cache) - write_cache->share= cshare; - - DBUG_VOID_RETURN; -} - - -/* - Remove a thread from shared access to IO_CACHE. - - SYNOPSIS - remove_io_thread() - cache The IO_CACHE to be removed from the share. - - NOTE - - Every thread must do that on exit for not to deadlock other threads. - - The last thread destroys the pthread resources. - - A writer flushes its cache first. - - RETURN - void -*/ - -void remove_io_thread(IO_CACHE *cache) -{ - IO_CACHE_SHARE *cshare= cache->share; - uint total; - DBUG_ENTER("remove_io_thread"); - - /* If the writer goes, it needs to flush the write cache. */ - if (cache == cshare->source_cache) - flush_io_cache(cache); - - pthread_mutex_lock(&cshare->mutex); - DBUG_PRINT("io_cache_share", ("%s: %p", - (cache == cshare->source_cache) ? - "writer" : "reader", cache)); - - /* Remove from share. */ - total= --cshare->total_threads; - DBUG_PRINT("io_cache_share", ("remaining threads: %u", total)); - - /* Detach from share. */ - cache->share= NULL; - - /* If the writer goes, let the readers know. */ - if (cache == cshare->source_cache) - { - DBUG_PRINT("io_cache_share", ("writer leaves")); - cshare->source_cache= NULL; - } - - /* If all threads are waiting for me to join the lock, wake them. */ - if (!--cshare->running_threads) - { - DBUG_PRINT("io_cache_share", ("the last running thread leaves, wake all")); - pthread_cond_signal(&cshare->cond_writer); - pthread_cond_broadcast(&cshare->cond); - } - - pthread_mutex_unlock(&cshare->mutex); - - if (!total) - { - DBUG_PRINT("io_cache_share", ("last thread removed, destroy share")); - pthread_cond_destroy (&cshare->cond_writer); - pthread_cond_destroy (&cshare->cond); - pthread_mutex_destroy(&cshare->mutex); - } - - DBUG_VOID_RETURN; -} - - -/* - Lock IO cache and wait for all other threads to join. - - SYNOPSIS - lock_io_cache() - cache The cache of the thread entering the lock. - pos File position of the block to read. - Unused for the write thread. - - DESCRIPTION - - Wait for all threads to finish with the current buffer. We want - all threads to proceed in concert. The last thread to join - lock_io_cache() will read the block from file and all threads start - to use it. Then they will join again for reading the next block. - - The waiting threads detect a fresh buffer by comparing - cshare->pos_in_file with the position they want to process next. - Since the first block may start at position 0, we take - cshare->read_end as an additional condition. This variable is - initialized to NULL and will be set after a block of data is written - to the buffer. - - RETURN - 1 OK, lock in place, go ahead and read. - 0 OK, unlocked, another thread did the read. -*/ - -static int lock_io_cache(IO_CACHE *cache, my_off_t pos) -{ - IO_CACHE_SHARE *cshare= cache->share; - DBUG_ENTER("lock_io_cache"); - - /* Enter the lock. */ - pthread_mutex_lock(&cshare->mutex); - cshare->running_threads--; - DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u", - (cache == cshare->source_cache) ? - "writer" : "reader", cache, (ulong) pos, - cshare->running_threads)); - - if (cshare->source_cache) - { - /* A write cache is synchronized to the read caches. */ - - if (cache == cshare->source_cache) - { - /* The writer waits until all readers are here. */ - while (cshare->running_threads) - { - DBUG_PRINT("io_cache_share", ("writer waits in lock")); - pthread_cond_wait(&cshare->cond_writer, &cshare->mutex); - } - DBUG_PRINT("io_cache_share", ("writer awoke, going to copy")); - - /* Stay locked. Leave the lock later by unlock_io_cache(). */ - DBUG_RETURN(1); - } - - /* The last thread wakes the writer. */ - if (!cshare->running_threads) - { - DBUG_PRINT("io_cache_share", ("waking writer")); - pthread_cond_signal(&cshare->cond_writer); - } - - /* - Readers wait until the data is copied from the writer. Another - reason to stop waiting is the removal of the write thread. If this - happens, we leave the lock with old data in the buffer. - */ - while ((!cshare->read_end || (cshare->pos_in_file < pos)) && - cshare->source_cache) - { - DBUG_PRINT("io_cache_share", ("reader waits in lock")); - pthread_cond_wait(&cshare->cond, &cshare->mutex); - } - - /* - If the writer was removed from the share while this thread was - asleep, we need to simulate an EOF condition. The writer cannot - reset the share variables as they might still be in use by readers - of the last block. When we awake here then because the last - joining thread signalled us. If the writer is not the last, it - will not signal. So it is safe to clear the buffer here. - */ - if (!cshare->read_end || (cshare->pos_in_file < pos)) - { - DBUG_PRINT("io_cache_share", ("reader found writer removed. EOF")); - cshare->read_end= cshare->buffer; /* Empty buffer. */ - cshare->error= 0; /* EOF is not an error. */ - } - } - else - { - /* - There are read caches only. The last thread arriving in - lock_io_cache() continues with a locked cache and reads the block. - */ - if (!cshare->running_threads) - { - DBUG_PRINT("io_cache_share", ("last thread joined, going to read")); - /* Stay locked. Leave the lock later by unlock_io_cache(). */ - DBUG_RETURN(1); - } - - /* - All other threads wait until the requested block is read by the - last thread arriving. Another reason to stop waiting is the - removal of a thread. If this leads to all threads being in the - lock, we have to continue also. The first of the awaken threads - will then do the read. - */ - while ((!cshare->read_end || (cshare->pos_in_file < pos)) && - cshare->running_threads) - { - DBUG_PRINT("io_cache_share", ("reader waits in lock")); - pthread_cond_wait(&cshare->cond, &cshare->mutex); - } - - /* If the block is not yet read, continue with a locked cache and read. */ - if (!cshare->read_end || (cshare->pos_in_file < pos)) - { - DBUG_PRINT("io_cache_share", ("reader awoke, going to read")); - /* Stay locked. Leave the lock later by unlock_io_cache(). */ - DBUG_RETURN(1); - } - - /* Another thread did read the block already. */ - } - DBUG_PRINT("io_cache_share", ("reader awoke, going to process %u bytes", - (uint) (cshare->read_end ? (size_t) - (cshare->read_end - cshare->buffer) : - 0))); - - /* - Leave the lock. Do not call unlock_io_cache() later. The thread that - filled the buffer did this and marked all threads as running. - */ - pthread_mutex_unlock(&cshare->mutex); - DBUG_RETURN(0); -} - - -/* - Unlock IO cache. - - SYNOPSIS - unlock_io_cache() - cache The cache of the thread leaving the lock. - - NOTE - This is called by the thread that filled the buffer. It marks all - threads as running and awakes them. This must not be done by any - other thread. - - Do not signal cond_writer. Either there is no writer or the writer - is the only one who can call this function. - - The reason for resetting running_threads to total_threads before - waking all other threads is that it could be possible that this - thread is so fast with processing the buffer that it enters the lock - before even one other thread has left it. If every awoken thread - would increase running_threads by one, this thread could think that - he is again the last to join and would not wait for the other - threads to process the data. - - RETURN - void -*/ - -static void unlock_io_cache(IO_CACHE *cache) -{ - IO_CACHE_SHARE *cshare= cache->share; - DBUG_ENTER("unlock_io_cache"); - DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u", - (cache == cshare->source_cache) ? - "writer" : "reader", - cache, (ulong) cshare->pos_in_file, - cshare->total_threads)); - - cshare->running_threads= cshare->total_threads; - pthread_cond_broadcast(&cshare->cond); - pthread_mutex_unlock(&cshare->mutex); - DBUG_VOID_RETURN; -} - - -/* - Read from IO_CACHE when it is shared between several threads. - - SYNOPSIS - _my_b_read_r() - cache IO_CACHE pointer - Buffer Buffer to retrieve count bytes from file - Count Number of bytes to read into Buffer - - NOTE - This function is only called from the my_b_read() macro when there - isn't enough characters in the buffer to satisfy the request. - - IMPLEMENTATION - - It works as follows: when a thread tries to read from a file (that - is, after using all the data from the (shared) buffer), it just - hangs on lock_io_cache(), waiting for other threads. When the very - last thread attempts a read, lock_io_cache() returns 1, the thread - does actual IO and unlock_io_cache(), which signals all the waiting - threads that data is in the buffer. - - WARNING - - When changing this function, be careful with handling file offsets - (end-of_file, pos_in_file). Do not cast them to possibly smaller - types than my_off_t unless you can be sure that their value fits. - Same applies to differences of file offsets. (Bug #11527) - - When changing this function, check _my_b_read(). It might need the - same change. - - RETURN - 0 we succeeded in reading all data - 1 Error: can't read requested characters -*/ - -int _my_b_read_r(register IO_CACHE *cache, uchar *Buffer, size_t Count) -{ - my_off_t pos_in_file; - size_t length, diff_length, left_length; - IO_CACHE_SHARE *cshare= cache->share; - DBUG_ENTER("_my_b_read_r"); - - if ((left_length= (size_t) (cache->read_end - cache->read_pos))) - { - DBUG_ASSERT(Count >= left_length); /* User is not using my_b_read() */ - memcpy(Buffer, cache->read_pos, left_length); - Buffer+= left_length; - Count-= left_length; - } - while (Count) - { - size_t cnt, len; - - pos_in_file= cache->pos_in_file + (cache->read_end - cache->buffer); - diff_length= (size_t) (pos_in_file & (IO_SIZE-1)); - length=IO_ROUND_UP(Count+diff_length)-diff_length; - length= ((length <= cache->read_length) ? - length + IO_ROUND_DN(cache->read_length - length) : - length - IO_ROUND_UP(length - cache->read_length)); - if (cache->type != READ_FIFO && - (length > (cache->end_of_file - pos_in_file))) - length= (size_t) (cache->end_of_file - pos_in_file); - if (length == 0) - { - cache->error= (int) left_length; - DBUG_RETURN(1); - } - if (lock_io_cache(cache, pos_in_file)) - { - /* With a synchronized write/read cache we won't come here... */ - DBUG_ASSERT(!cshare->source_cache); - /* - ... unless the writer has gone before this thread entered the - lock. Simulate EOF in this case. It can be distinguished by - cache->file. - */ - if (cache->file < 0) - len= 0; - else - { - /* - Whenever a function which operates on IO_CACHE flushes/writes - some part of the IO_CACHE to disk it will set the property - "seek_not_done" to indicate this to other functions operating - on the IO_CACHE. - */ - if (cache->seek_not_done) - { - if (my_seek(cache->file, pos_in_file, MY_SEEK_SET, MYF(0)) - == MY_FILEPOS_ERROR) - { - cache->error= -1; - unlock_io_cache(cache); - DBUG_RETURN(1); - } - } - len= my_read(cache->file, cache->buffer, length, cache->myflags); - } - DBUG_PRINT("io_cache_share", ("read %lu bytes", (ulong) len)); - - cache->read_end= cache->buffer + (len == (size_t) -1 ? 0 : len); - cache->error= (len == length ? 0 : (int) len); - cache->pos_in_file= pos_in_file; - - /* Copy important values to the share. */ - cshare->error= cache->error; - cshare->read_end= cache->read_end; - cshare->pos_in_file= pos_in_file; - - /* Mark all threads as running and wake them. */ - unlock_io_cache(cache); - } - else - { - /* - With a synchronized write/read cache readers always come here. - Copy important values from the share. - */ - cache->error= cshare->error; - cache->read_end= cshare->read_end; - cache->pos_in_file= cshare->pos_in_file; - - len= ((cache->error == -1) ? (size_t) -1 : - (size_t) (cache->read_end - cache->buffer)); - } - cache->read_pos= cache->buffer; - cache->seek_not_done= 0; - if (len == 0 || len == (size_t) -1) - { - DBUG_PRINT("io_cache_share", ("reader error. len %lu left %lu", - (ulong) len, (ulong) left_length)); - cache->error= (int) left_length; - DBUG_RETURN(1); - } - cnt= (len > Count) ? Count : len; - memcpy(Buffer, cache->read_pos, cnt); - Count -= cnt; - Buffer+= cnt; - left_length+= cnt; - cache->read_pos+= cnt; - } - DBUG_RETURN(0); -} - - -/* - Copy data from write cache to read cache. - - SYNOPSIS - copy_to_read_buffer() - write_cache The write cache. - write_buffer The source of data, mostly the cache buffer. - write_length The number of bytes to copy. - - NOTE - The write thread will wait for all read threads to join the cache - lock. Then it copies the data over and wakes the read threads. - - RETURN - void -*/ - -static void copy_to_read_buffer(IO_CACHE *write_cache, - const uchar *write_buffer, size_t write_length) -{ - IO_CACHE_SHARE *cshare= write_cache->share; - - DBUG_ASSERT(cshare->source_cache == write_cache); - /* - write_length is usually less or equal to buffer_length. - It can be bigger if _my_b_write() is called with a big length. - */ - while (write_length) - { - size_t copy_length= min(write_length, write_cache->buffer_length); - int __attribute__((unused)) rc; - - rc= lock_io_cache(write_cache, write_cache->pos_in_file); - /* The writing thread does always have the lock when it awakes. */ - DBUG_ASSERT(rc); - - memcpy(cshare->buffer, write_buffer, copy_length); - - cshare->error= 0; - cshare->read_end= cshare->buffer + copy_length; - cshare->pos_in_file= write_cache->pos_in_file; - - /* Mark all threads as running and wake them. */ - unlock_io_cache(write_cache); - - write_buffer+= copy_length; - write_length-= copy_length; - } -} -#endif /*THREAD*/ - - -/* - Do sequential read from the SEQ_READ_APPEND cache. - - We do this in three stages: - - first read from info->buffer - - then if there are still data to read, try the file descriptor - - afterwards, if there are still data to read, try append buffer - - RETURNS - 0 Success - 1 Failed to read -*/ - -int _my_b_seq_read(register IO_CACHE *info, uchar *Buffer, size_t Count) -{ - size_t length, diff_length, left_length, save_count, max_length; - my_off_t pos_in_file; - save_count=Count; - - /* first, read the regular buffer */ - if ((left_length=(size_t) (info->read_end-info->read_pos))) - { - DBUG_ASSERT(Count > left_length); /* User is not using my_b_read() */ - memcpy(Buffer,info->read_pos, left_length); - Buffer+=left_length; - Count-=left_length; - } - lock_append_buffer(info); - - /* pos_in_file always point on where info->buffer was read */ - if ((pos_in_file=info->pos_in_file + - (size_t) (info->read_end - info->buffer)) >= info->end_of_file) - goto read_append_buffer; - - /* - With read-append cache we must always do a seek before we read, - because the write could have moved the file pointer astray - */ - if (my_seek(info->file,pos_in_file,MY_SEEK_SET,MYF(0)) == MY_FILEPOS_ERROR) - { - info->error= -1; - unlock_append_buffer(info); - return (1); - } - info->seek_not_done=0; - - diff_length= (size_t) (pos_in_file & (IO_SIZE-1)); - - /* now the second stage begins - read from file descriptor */ - if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length))) - { - /* Fill first intern buffer */ - size_t read_length; - - length=(Count & (size_t) ~(IO_SIZE-1))-diff_length; - if ((read_length= my_read(info->file,Buffer, length, - info->myflags)) == (size_t) -1) - { - info->error= -1; - unlock_append_buffer(info); - return 1; - } - Count-=read_length; - Buffer+=read_length; - pos_in_file+=read_length; - - if (read_length != length) - { - /* - We only got part of data; Read the rest of the data from the - write buffer - */ - goto read_append_buffer; - } - left_length+=length; - diff_length=0; - } - - max_length= info->read_length-diff_length; - if (max_length > (info->end_of_file - pos_in_file)) - max_length= (size_t) (info->end_of_file - pos_in_file); - if (!max_length) - { - if (Count) - goto read_append_buffer; - length=0; /* Didn't read any more chars */ - } - else - { - length= my_read(info->file,info->buffer, max_length, info->myflags); - if (length == (size_t) -1) - { - info->error= -1; - unlock_append_buffer(info); - return 1; - } - if (length < Count) - { - memcpy(Buffer, info->buffer, length); - Count -= length; - Buffer += length; - - /* - added the line below to make - DBUG_ASSERT(pos_in_file==info->end_of_file) pass. - otherwise this does not appear to be needed - */ - pos_in_file += length; - goto read_append_buffer; - } - } - unlock_append_buffer(info); - info->read_pos=info->buffer+Count; - info->read_end=info->buffer+length; - info->pos_in_file=pos_in_file; - memcpy(Buffer,info->buffer,(size_t) Count); - return 0; - -read_append_buffer: - - /* - Read data from the current write buffer. - Count should never be == 0 here (The code will work even if count is 0) - */ - - { - /* First copy the data to Count */ - size_t len_in_buff = (size_t) (info->write_pos - info->append_read_pos); - size_t copy_len; - size_t transfer_len; - - DBUG_ASSERT(info->append_read_pos <= info->write_pos); - /* - TODO: figure out if the assert below is needed or correct. - */ - DBUG_ASSERT(pos_in_file == info->end_of_file); - copy_len=min(Count, len_in_buff); - memcpy(Buffer, info->append_read_pos, copy_len); - info->append_read_pos += copy_len; - Count -= copy_len; - if (Count) - info->error= (int) (save_count - Count); - - /* Fill read buffer with data from write buffer */ - memcpy(info->buffer, info->append_read_pos, - (size_t) (transfer_len=len_in_buff - copy_len)); - info->read_pos= info->buffer; - info->read_end= info->buffer+transfer_len; - info->append_read_pos=info->write_pos; - info->pos_in_file=pos_in_file+copy_len; - info->end_of_file+=len_in_buff; - } - unlock_append_buffer(info); - return Count ? 1 : 0; -} - - -#ifdef HAVE_AIOWAIT - -/* - Read from the IO_CACHE into a buffer and feed asynchronously - from disk when needed. - - SYNOPSIS - _my_b_async_read() - info IO_CACHE pointer - Buffer Buffer to retrieve count bytes from file - Count Number of bytes to read into Buffer - - RETURN VALUE - -1 An error has occurred; my_errno is set. - 0 Success - 1 An error has occurred; IO_CACHE to error state. -*/ - -int _my_b_async_read(register IO_CACHE *info, uchar *Buffer, size_t Count) -{ - size_t length,read_length,diff_length,left_length,use_length,org_Count; - size_t max_length; - my_off_t next_pos_in_file; - uchar *read_buffer; - - memcpy(Buffer,info->read_pos, - (left_length= (size_t) (info->read_end-info->read_pos))); - Buffer+=left_length; - org_Count=Count; - Count-=left_length; - - if (info->inited) - { /* wait for read block */ - info->inited=0; /* No more block to read */ - my_aiowait(&info->aio_result); /* Wait for outstanding req */ - if (info->aio_result.result.aio_errno) - { - if (info->myflags & MY_WME) - my_error(EE_READ, MYF(ME_BELL+ME_WAITTANG), - my_filename(info->file), - info->aio_result.result.aio_errno); - my_errno=info->aio_result.result.aio_errno; - info->error= -1; - return(1); - } - if (! (read_length= (size_t) info->aio_result.result.aio_return) || - read_length == (size_t) -1) - { - my_errno=0; /* For testing */ - info->error= (read_length == (size_t) -1 ? -1 : - (int) (read_length+left_length)); - return(1); - } - info->pos_in_file+= (size_t) (info->read_end - info->request_pos); - - if (info->request_pos != info->buffer) - info->request_pos=info->buffer; - else - info->request_pos=info->buffer+info->read_length; - info->read_pos=info->request_pos; - next_pos_in_file=info->aio_read_pos+read_length; - - /* Check if pos_in_file is changed - (_ni_read_cache may have skipped some bytes) */ - - if (info->aio_read_pos < info->pos_in_file) - { /* Fix if skipped bytes */ - if (info->aio_read_pos + read_length < info->pos_in_file) - { - read_length=0; /* Skip block */ - next_pos_in_file=info->pos_in_file; - } - else - { - my_off_t offset= (info->pos_in_file - info->aio_read_pos); - info->pos_in_file=info->aio_read_pos; /* Whe are here */ - info->read_pos=info->request_pos+offset; - read_length-=offset; /* Bytes left from read_pos */ - } - } -#ifndef DBUG_OFF - if (info->aio_read_pos > info->pos_in_file) - { - my_errno=EINVAL; - return(info->read_length= (size_t) -1); - } -#endif - /* Copy found bytes to buffer */ - length=min(Count,read_length); - memcpy(Buffer,info->read_pos,(size_t) length); - Buffer+=length; - Count-=length; - left_length+=length; - info->read_end=info->rc_pos+read_length; - info->read_pos+=length; - } - else - next_pos_in_file=(info->pos_in_file+ (size_t) - (info->read_end - info->request_pos)); - - /* If reading large blocks, or first read or read with skip */ - if (Count) - { - if (next_pos_in_file == info->end_of_file) - { - info->error=(int) (read_length+left_length); - return 1; - } - - if (my_seek(info->file,next_pos_in_file,MY_SEEK_SET,MYF(0)) - == MY_FILEPOS_ERROR) - { - info->error= -1; - return (1); - } - - read_length=IO_SIZE*2- (size_t) (next_pos_in_file & (IO_SIZE-1)); - if (Count < read_length) - { /* Small block, read to cache */ - if ((read_length=my_read(info->file,info->request_pos, - read_length, info->myflags)) == (size_t) -1) - return info->error= -1; - use_length=min(Count,read_length); - memcpy(Buffer,info->request_pos,(size_t) use_length); - info->read_pos=info->request_pos+Count; - info->read_end=info->request_pos+read_length; - info->pos_in_file=next_pos_in_file; /* Start of block in cache */ - next_pos_in_file+=read_length; - - if (Count != use_length) - { /* Didn't find hole block */ - if (info->myflags & (MY_WME | MY_FAE | MY_FNABP) && Count != org_Count) - my_error(EE_EOFERR, MYF(ME_BELL+ME_WAITTANG), - my_filename(info->file),my_errno); - info->error=(int) (read_length+left_length); - return 1; - } - } - else - { /* Big block, don't cache it */ - if ((read_length= my_read(info->file,Buffer, Count,info->myflags)) - != Count) - { - info->error= read_length == (size_t) -1 ? -1 : read_length+left_length; - return 1; - } - info->read_pos=info->read_end=info->request_pos; - info->pos_in_file=(next_pos_in_file+=Count); - } - } - - /* Read next block with asyncronic io */ - diff_length=(next_pos_in_file & (IO_SIZE-1)); - max_length= info->read_length - diff_length; - if (max_length > info->end_of_file - next_pos_in_file) - max_length= (size_t) (info->end_of_file - next_pos_in_file); - - if (info->request_pos != info->buffer) - read_buffer=info->buffer; - else - read_buffer=info->buffer+info->read_length; - info->aio_read_pos=next_pos_in_file; - if (max_length) - { - info->aio_result.result.aio_errno=AIO_INPROGRESS; /* Marker for test */ - DBUG_PRINT("aioread",("filepos: %ld length: %lu", - (ulong) next_pos_in_file, (ulong) max_length)); - if (aioread(info->file,read_buffer, max_length, - (my_off_t) next_pos_in_file,MY_SEEK_SET, - &info->aio_result.result)) - { /* Skip async io */ - my_errno=errno; - DBUG_PRINT("error",("got error: %d, aio_result: %d from aioread, async skipped", - errno, info->aio_result.result.aio_errno)); - if (info->request_pos != info->buffer) - { - bmove(info->buffer,info->request_pos, - (size_t) (info->read_end - info->read_pos)); - info->request_pos=info->buffer; - info->read_pos-=info->read_length; - info->read_end-=info->read_length; - } - info->read_length=info->buffer_length; /* Use hole buffer */ - info->read_function=_my_b_read; /* Use normal IO_READ next */ - } - else - info->inited=info->aio_result.pending=1; - } - return 0; /* Block read, async in use */ -} /* _my_b_async_read */ -#endif - - -/* Read one byte when buffer is empty */ - -int _my_b_get(IO_CACHE *info) -{ - uchar buff; - IO_CACHE_CALLBACK pre_read,post_read; - if ((pre_read = info->pre_read)) - (*pre_read)(info, NULL, 0, 0); - if ((*(info)->read_function)(info,&buff,1)) - return my_b_EOF; - if ((post_read = info->post_read)) - (*post_read)(info, NULL, 0, 0); - return (int) (uchar) buff; -} - -/* FUNCTIONS TO DO WRITES TO THE CACHE */ - -#define set_hard_write_error(CACHE) \ - ((CACHE)->error= (CACHE)->hard_write_error_in_the_past= -1) - -/* - Write a byte buffer to IO_CACHE and flush to disk - if IO_CACHE is full. - - RETURN VALUE - 1 On error on write - 0 On success - -1 On error; my_errno contains error code. -*/ - -int _my_b_write(register IO_CACHE *info, const uchar *Buffer, size_t Count) -{ - size_t rest_length,length; - - if (info->pos_in_file+info->buffer_length > info->end_of_file) - { - my_errno=errno=EFBIG; - return set_hard_write_error(info); - } - - rest_length= (size_t) (info->write_end - info->write_pos); - memcpy(info->write_pos,Buffer,(size_t) rest_length); - Buffer+=rest_length; - Count-=rest_length; - info->write_pos+=rest_length; - - if (my_b_flush_io_cache(info,1)) - return 1; - if (Count >= IO_SIZE) - { /* Fill first intern buffer */ - length=Count & (size_t) ~(IO_SIZE-1); - if (info->seek_not_done) - { - /* - Whenever a function which operates on IO_CACHE flushes/writes - some part of the IO_CACHE to disk it will set the property - "seek_not_done" to indicate this to other functions operating - on the IO_CACHE. - */ - if (my_seek(info->file,info->pos_in_file,MY_SEEK_SET,MYF(0))) - { - set_hard_write_error(info); - return (1); - } - info->seek_not_done=0; - } - if (my_write(info->file, Buffer, length, info->myflags | MY_NABP)) - return set_hard_write_error(info); - if (info->post_write) - (*(info->post_write))(info, Buffer, length, info->pos_in_file); - -#ifdef THREAD - /* - In case of a shared I/O cache with a writer we normally do direct - write cache to read cache copy. Simulate this here by direct - caller buffer to read cache copy. Do it after the write so that - the cache readers actions on the flushed part can go in parallel - with the write of the extra stuff. copy_to_read_buffer() - synchronizes writer and readers so that after this call the - readers can act on the extra stuff while the writer can go ahead - and prepare the next output. copy_to_read_buffer() relies on - info->pos_in_file. - */ - if (info->share) - copy_to_read_buffer(info, Buffer, length); -#endif - - Count-=length; - Buffer+=length; - info->pos_in_file+=length; - } - memcpy(info->write_pos,Buffer,(size_t) Count); - info->write_pos+=Count; - return 0; -} - - -/* - Append a block to the write buffer. - This is done with the buffer locked to ensure that we don't read from - the write buffer before we are ready with it. -*/ - -int my_b_append(register IO_CACHE *info, const uchar *Buffer, size_t Count) -{ - size_t rest_length,length; - -#ifdef THREAD - /* - Assert that we cannot come here with a shared cache. If we do one - day, we might need to add a call to copy_to_read_buffer(). - */ - DBUG_ASSERT(!info->share); -#endif - DBUG_ASSERT(info->post_write == NULL); /* unsupported */ - lock_append_buffer(info); - rest_length= (size_t) (info->write_end - info->write_pos); - if (Count <= rest_length) - goto end; - memcpy(info->write_pos, Buffer, rest_length); - Buffer+=rest_length; - Count-=rest_length; - info->write_pos+=rest_length; - if (my_b_flush_io_cache(info,0)) - { - unlock_append_buffer(info); - return 1; - } - if (Count >= IO_SIZE) - { /* Fill first intern buffer */ - length=Count & (size_t) ~(IO_SIZE-1); - if (my_write(info->file,Buffer, length, info->myflags | MY_NABP)) - { - unlock_append_buffer(info); - return set_hard_write_error(info); - } - Count-=length; - Buffer+=length; - info->end_of_file+=length; - } - -end: - memcpy(info->write_pos,Buffer,(size_t) Count); - info->write_pos+=Count; - unlock_append_buffer(info); - return 0; -} - - -int my_b_safe_write(IO_CACHE *info, const uchar *Buffer, size_t Count) -{ - /* - Sasha: We are not writing this with the ? operator to avoid hitting - a possible compiler bug. At least gcc 2.95 cannot deal with - several layers of ternary operators that evaluated comma(,) operator - expressions inside - I do have a test case if somebody wants it - */ - if (info->type == SEQ_READ_APPEND) - return my_b_append(info, Buffer, Count); - return my_b_write(info, Buffer, Count); -} - - -/* - Write a block to disk where part of the data may be inside the record - buffer. As all write calls to the data goes through the cache, - we will never get a seek over the end of the buffer -*/ - -int my_block_write(register IO_CACHE *info, const uchar *Buffer, size_t Count, - my_off_t pos) -{ - size_t length; - int error=0; - -#ifdef THREAD - /* - Assert that we cannot come here with a shared cache. If we do one - day, we might need to add a call to copy_to_read_buffer(). - */ - DBUG_ASSERT(!info->share); -#endif - - if (pos < info->pos_in_file) - { - /* Of no overlap, write everything without buffering */ - if (pos + Count <= info->pos_in_file) - { - int ret= my_pwrite(info->file, Buffer, Count, pos, - info->myflags | MY_NABP); - if (unlikely(ret)) - set_hard_write_error(info); - if (info->post_write) - (*(info->post_write))(info, Buffer, Count, pos); - return ret; - } - /* Write the part of the block that is before buffer */ - length= (uint) (info->pos_in_file - pos); - if (my_pwrite(info->file, Buffer, length, pos, info->myflags | MY_NABP)) - error= set_hard_write_error(info); - if (info->post_write) - (*(info->post_write))(info, Buffer, length, pos); - Buffer+=length; - pos+= length; - Count-= length; -#ifndef HAVE_PREAD - info->seek_not_done=1; -#endif - } - - /* Check if we want to write inside the used part of the buffer.*/ - length= (size_t) (info->write_end - info->buffer); - if (pos < info->pos_in_file + length) - { - size_t offset= (size_t) (pos - info->pos_in_file); - length-=offset; - if (length > Count) - length=Count; - memcpy(info->buffer+offset, Buffer, length); - Buffer+=length; - Count-= length; - /* Fix length of buffer if the new data was larger */ - if (info->buffer+length > info->write_pos) - info->write_pos=info->buffer+length; - if (!Count) - return (error); - } - /* Write at the end of the current buffer; This is the normal case */ - if (_my_b_write(info, Buffer, Count)) - error= -1; - return error; -} - - - /* Flush write cache */ - -#ifdef THREAD -#define LOCK_APPEND_BUFFER if (need_append_buffer_lock) \ - lock_append_buffer(info); -#define UNLOCK_APPEND_BUFFER if (need_append_buffer_lock) \ - unlock_append_buffer(info); -#else -#define LOCK_APPEND_BUFFER -#define UNLOCK_APPEND_BUFFER -#endif - - -int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock) -{ - size_t length; - my_bool append_cache; - my_off_t pos_in_file; - DBUG_ENTER("my_b_flush_io_cache"); - DBUG_PRINT("enter", ("cache: 0x%lx", (long) info)); - - if (!(append_cache = (info->type == SEQ_READ_APPEND))) - need_append_buffer_lock=0; - - if (info->type == WRITE_CACHE || append_cache) - { - if (info->file == -1) - { - if (real_open_cached_file(info)) - DBUG_RETURN(set_hard_write_error(info)); - } - LOCK_APPEND_BUFFER; - - if ((length=(size_t) (info->write_pos - info->write_buffer))) - { -#ifdef THREAD - /* - In case of a shared I/O cache with a writer we do direct write - cache to read cache copy. Do it before the write here so that - the readers can work in parallel with the write. - copy_to_read_buffer() relies on info->pos_in_file. - */ - if (info->share) - copy_to_read_buffer(info, info->write_buffer, length); -#endif - - pos_in_file=info->pos_in_file; - /* - If we have append cache, we always open the file with - O_APPEND which moves the pos to EOF automatically on every write - */ - if (!append_cache && info->seek_not_done) - { /* File touched, do seek */ - if (my_seek(info->file,pos_in_file,MY_SEEK_SET,MYF(0)) == - MY_FILEPOS_ERROR) - { - UNLOCK_APPEND_BUFFER; - DBUG_RETURN(set_hard_write_error(info)); - } - if (!append_cache) - info->seek_not_done=0; - } - info->write_end= (info->write_buffer+info->buffer_length- - ((pos_in_file+length) & (IO_SIZE-1))); - - if (my_write(info->file,info->write_buffer,length, - info->myflags | MY_NABP)) - set_hard_write_error(info); - else - info->error= 0; - if (!append_cache) - { - /* - This post_write is really POST-write; callers depend on this! So - always call it after writing to the file, not before. - */ - if (info->post_write) - (*(info->post_write))(info, info->write_buffer, - length, info->pos_in_file); - /* - The addition below will make the info->pos_in_file be the end of - written block; whereas the value we needed in post_write is the - value before the addition. That's why we called post_write before - this. - */ - info->pos_in_file+=length; - set_if_bigger(info->end_of_file,(pos_in_file+length)); - } - else - { - info->end_of_file+=(info->write_pos-info->append_read_pos); - DBUG_ASSERT(info->end_of_file == my_tell(info->file,MYF(0))); - DBUG_ASSERT(info->post_write == NULL); /* unsupported */ - } - - info->append_read_pos=info->write_pos=info->write_buffer; - ++info->disk_writes; - UNLOCK_APPEND_BUFFER; - DBUG_RETURN(info->error); - } - } -#ifdef HAVE_AIOWAIT - else if (info->type != READ_NET) - { - my_aiowait(&info->aio_result); /* Wait for outstanding req */ - info->inited=0; - } -#endif - UNLOCK_APPEND_BUFFER; - DBUG_RETURN(0); -} - -/* - Free an IO_CACHE object - - SYNOPSOS - end_io_cache() - info IO_CACHE Handle to free - - NOTES - It's currently safe to call this if one has called init_io_cache() - on the 'info' object, even if init_io_cache() failed. - This function is also safe to call twice with the same handle. - - RETURN - 0 ok - # Error -*/ - -int end_io_cache(IO_CACHE *info) -{ - int error=0; - IO_CACHE_CALLBACK pre_close; - DBUG_ENTER("end_io_cache"); - DBUG_PRINT("enter",("cache: %p", info)); - -#ifdef THREAD - /* - Every thread must call remove_io_thread(). The last one destroys - the share elements. - */ - DBUG_ASSERT(!info->share || !info->share->total_threads); -#endif - - if ((pre_close=info->pre_close)) - { - (*pre_close)(info, NULL, 0, 0); - info->pre_close= 0; - } - if (info->alloced_buffer) - { - info->alloced_buffer=0; - if (info->file != -1) /* File doesn't exist */ - error= my_b_flush_io_cache(info,1); - my_free((uchar*) info->buffer,MYF(MY_WME)); - info->buffer=info->read_pos=(uchar*) 0; - } - if (info->type == SEQ_READ_APPEND) - { - /* Destroy allocated mutex */ - info->type= TYPE_NOT_SET; -#ifdef THREAD - pthread_mutex_destroy(&info->append_buffer_lock); -#endif - } -#ifdef THREAD - info->share= 0; -#endif - DBUG_RETURN(error); -} /* end_io_cache */ - - -/********************************************************************** - Testing of MF_IOCACHE -**********************************************************************/ - -#ifdef MAIN - -#include - -void die(const char* fmt, ...) -{ - va_list va_args; - va_start(va_args,fmt); - fprintf(stderr,"Error:"); - vfprintf(stderr, fmt,va_args); - fprintf(stderr,", errno=%d\n", errno); - exit(1); -} - -int open_file(const char* fname, IO_CACHE* info, int cache_size) -{ - int fd; - if ((fd=my_open(fname,O_CREAT | O_RDWR,MYF(MY_WME))) < 0) - die("Could not open %s", fname); - if (init_io_cache(info, fd, cache_size, SEQ_READ_APPEND, 0,0,MYF(MY_WME))) - die("failed in init_io_cache()"); - return fd; -} - -void close_file(IO_CACHE* info) -{ - end_io_cache(info); - my_close(info->file, MYF(MY_WME)); -} - -int main(int argc, char** argv) -{ - IO_CACHE sra_cache; /* SEQ_READ_APPEND */ - MY_STAT status; - const char* fname="/tmp/iocache.test"; - int cache_size=16384; - char llstr_buf[22]; - int max_block,total_bytes=0; - int i,num_loops=100,error=0; - char *p; - char* block, *block_end; - MY_INIT(argv[0]); - max_block = cache_size*3; - if (!(block=(char*)my_malloc(max_block,MYF(MY_WME)))) - die("Not enough memory to allocate test block"); - block_end = block + max_block; - for (p = block,i=0; p < block_end;i++) - { - *p++ = (char)i; - } - if (my_stat(fname,&status, MYF(0)) && - my_delete(fname,MYF(MY_WME))) - { - die("Delete of %s failed, aborting", fname); - } - open_file(fname,&sra_cache, cache_size); - for (i = 0; i < num_loops; i++) - { - char buf[4]; - int block_size = abs(rand() % max_block); - int4store(buf, block_size); - if (my_b_append(&sra_cache,buf,4) || - my_b_append(&sra_cache, block, block_size)) - die("write failed"); - total_bytes += 4+block_size; - } - close_file(&sra_cache); - my_free(block,MYF(MY_WME)); - if (!my_stat(fname,&status,MYF(MY_WME))) - die("%s failed to stat, but I had just closed it,\ - wonder how that happened"); - printf("Final size of %s is %s, wrote %d bytes\n",fname, - llstr(status.st_size,llstr_buf), - total_bytes); - my_delete(fname, MYF(MY_WME)); - /* check correctness of tests */ - if (total_bytes != status.st_size) - { - fprintf(stderr,"Not the same number of bytes acutally in file as bytes \ -supposedly written\n"); - error=1; - } - exit(error); - return 0; -} -#endif diff --git a/externals/mysql/mysys/mf_iocache2.c b/externals/mysql/mysys/mf_iocache2.c deleted file mode 100644 index 38415f3909..0000000000 --- a/externals/mysql/mysys/mf_iocache2.c +++ /dev/null @@ -1,466 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - More functions to be used with IO_CACHE files -*/ - -#define MAP_TO_USE_RAID -#include "mysys_priv.h" -#include -#include -#include - -/* - Copy contents of an IO_CACHE to a file. - - SYNOPSIS - my_b_copy_to_file() - cache IO_CACHE to copy from - file File to copy to - - DESCRIPTION - Copy the contents of the cache to the file. The cache will be - re-inited to a read cache and will read from the beginning of the - cache. - - If a failure to write fully occurs, the cache is only copied - partially. - - TODO - Make this function solid by handling partial reads from the cache - in a correct manner: it should be atomic. - - RETURN VALUE - 0 All OK - 1 An error occured -*/ -int -my_b_copy_to_file(IO_CACHE *cache, FILE *file) -{ - size_t bytes_in_cache; - DBUG_ENTER("my_b_copy_to_file"); - - /* Reinit the cache to read from the beginning of the cache */ - if (reinit_io_cache(cache, READ_CACHE, 0L, FALSE, FALSE)) - DBUG_RETURN(1); - bytes_in_cache= my_b_bytes_in_cache(cache); - do - { - if (my_fwrite(file, cache->read_pos, bytes_in_cache, - MYF(MY_WME | MY_NABP)) == (size_t) -1) - DBUG_RETURN(1); - cache->read_pos= cache->read_end; - } while ((bytes_in_cache= my_b_fill(cache))); - DBUG_RETURN(0); -} - - -my_off_t my_b_append_tell(IO_CACHE* info) -{ - /* - Prevent optimizer from putting res in a register when debugging - we need this to be able to see the value of res when the assert fails - */ - dbug_volatile my_off_t res; - - /* - We need to lock the append buffer mutex to keep flush_io_cache() - from messing with the variables that we need in order to provide the - answer to the question. - */ -#ifdef THREAD - pthread_mutex_lock(&info->append_buffer_lock); -#endif -#ifndef DBUG_OFF - /* - Make sure EOF is where we think it is. Note that we cannot just use - my_tell() because we have a reader thread that could have left the - file offset in a non-EOF location - */ - { - volatile my_off_t save_pos; - save_pos = my_tell(info->file,MYF(0)); - my_seek(info->file,(my_off_t)0,MY_SEEK_END,MYF(0)); - /* - Save the value of my_tell in res so we can see it when studying coredump - */ - DBUG_ASSERT(info->end_of_file - (info->append_read_pos-info->write_buffer) - == (res=my_tell(info->file,MYF(0)))); - my_seek(info->file,save_pos,MY_SEEK_SET,MYF(0)); - } -#endif - res = info->end_of_file + (info->write_pos-info->append_read_pos); -#ifdef THREAD - pthread_mutex_unlock(&info->append_buffer_lock); -#endif - return res; -} - -my_off_t my_b_safe_tell(IO_CACHE *info) -{ - if (unlikely(info->type == SEQ_READ_APPEND)) - return my_b_append_tell(info); - return my_b_tell(info); -} - -/* - Make next read happen at the given position - For write cache, make next write happen at the given position -*/ - -void my_b_seek(IO_CACHE *info,my_off_t pos) -{ - my_off_t offset; - DBUG_ENTER("my_b_seek"); - DBUG_PRINT("enter",("pos: %lu", (ulong) pos)); - - /* - TODO: - Verify that it is OK to do seek in the non-append - area in SEQ_READ_APPEND cache - a) see if this always works - b) see if there is a better way to make it work - */ - if (info->type == SEQ_READ_APPEND) - (void) flush_io_cache(info); - - offset=(pos - info->pos_in_file); - - if (info->type == READ_CACHE || info->type == SEQ_READ_APPEND) - { - /* TODO: explain why this works if pos < info->pos_in_file */ - if ((ulonglong) offset < (ulonglong) (info->read_end - info->buffer)) - { - /* The read is in the current buffer; Reuse it */ - info->read_pos = info->buffer + offset; - DBUG_VOID_RETURN; - } - else - { - /* Force a new read on next my_b_read */ - info->read_pos=info->read_end=info->buffer; - } - } - else if (info->type == WRITE_CACHE) - { - /* If write is in current buffer, reuse it */ - if ((ulonglong) offset < - (ulonglong) (info->write_end - info->write_buffer)) - { - info->write_pos = info->write_buffer + offset; - DBUG_VOID_RETURN; - } - (void) flush_io_cache(info); - /* Correct buffer end so that we write in increments of IO_SIZE */ - info->write_end=(info->write_buffer+info->buffer_length- - (pos & (IO_SIZE-1))); - } - info->pos_in_file=pos; - info->seek_not_done=1; - DBUG_VOID_RETURN; -} - - -/* - Fill buffer of the cache. - - NOTES - This assumes that you have already used all characters in the CACHE, - independent of the read_pos value! - - RETURN - 0 On error or EOF (info->error = -1 on error) - # Number of characters -*/ - - -size_t my_b_fill(IO_CACHE *info) -{ - my_off_t pos_in_file=(info->pos_in_file+ - (size_t) (info->read_end - info->buffer)); - size_t diff_length, length, max_length; - - if (info->seek_not_done) - { /* File touched, do seek */ - if (my_seek(info->file,pos_in_file,MY_SEEK_SET,MYF(0)) == - MY_FILEPOS_ERROR) - { - info->error= 0; - return 0; - } - info->seek_not_done=0; - } - diff_length=(size_t) (pos_in_file & (IO_SIZE-1)); - max_length=(info->read_length-diff_length); - if (max_length >= (info->end_of_file - pos_in_file)) - max_length= (size_t) (info->end_of_file - pos_in_file); - - if (!max_length) - { - info->error= 0; - return 0; /* EOF */ - } - if ((length= my_read(info->file,info->buffer,max_length, - info->myflags)) == (size_t) -1) - { - info->error= -1; - return 0; - } - info->read_pos=info->buffer; - info->read_end=info->buffer+length; - info->pos_in_file=pos_in_file; - return length; -} - - -/* - Read a string ended by '\n' into a buffer of 'max_length' size. - Returns number of characters read, 0 on error. - last byte is set to '\0' - If buffer is full then to[max_length-1] will be set to \0. -*/ - -size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length) -{ - char *start = to; - size_t length; - max_length--; /* Save place for end \0 */ - - /* Calculate number of characters in buffer */ - if (!(length= my_b_bytes_in_cache(info)) && - !(length= my_b_fill(info))) - return 0; - - for (;;) - { - uchar *pos, *end; - if (length > max_length) - length=max_length; - for (pos=info->read_pos,end=pos+length ; pos < end ;) - { - if ((*to++ = *pos++) == '\n') - { - info->read_pos=pos; - *to='\0'; - return (size_t) (to-start); - } - } - if (!(max_length-=length)) - { - /* Found enough charcters; Return found string */ - info->read_pos=pos; - *to='\0'; - return (size_t) (to-start); - } - if (!(length=my_b_fill(info))) - return 0; - } -} - - -my_off_t my_b_filelength(IO_CACHE *info) -{ - if (info->type == WRITE_CACHE) - return my_b_tell(info); - - info->seek_not_done= 1; - return my_seek(info->file, 0L, MY_SEEK_END, MYF(0)); -} - - -/* - Simple printf version. Supports '%s', '%d', '%u', "%ld" and "%lu" - Used for logging in MySQL - returns number of written character, or (size_t) -1 on error -*/ - -size_t my_b_printf(IO_CACHE *info, const char* fmt, ...) -{ - size_t result; - va_list args; - va_start(args,fmt); - result=my_b_vprintf(info, fmt, args); - va_end(args); - return result; -} - - -size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) -{ - size_t out_length= 0; - uint minimum_width; /* as yet unimplemented */ - uint minimum_width_sign; - uint precision; /* as yet unimplemented for anything but %b */ - my_bool is_zero_padded; - - /* - Store the location of the beginning of a format directive, for the - case where we learn we shouldn't have been parsing a format string - at all, and we don't want to lose the flag/precision/width/size - information. - */ - const char* backtrack; - - for (; *fmt != '\0'; fmt++) - { - /* Copy everything until '%' or end of string */ - const char *start=fmt; - size_t length; - - for (; (*fmt != '\0') && (*fmt != '%'); fmt++) ; - - length= (size_t) (fmt - start); - out_length+=length; - if (my_b_write(info, (const uchar*) start, length)) - goto err; - - if (*fmt == '\0') /* End of format */ - return out_length; - - /* - By this point, *fmt must be a percent; Keep track of this location and - skip over the percent character. - */ - DBUG_ASSERT(*fmt == '%'); - backtrack= fmt; - fmt++; - - is_zero_padded= FALSE; - minimum_width_sign= 1; - minimum_width= 0; - precision= 0; - /* Skip if max size is used (to be compatible with printf) */ - -process_flags: - switch (*fmt) - { - case '-': - minimum_width_sign= -1; fmt++; goto process_flags; - case '0': - is_zero_padded= TRUE; fmt++; goto process_flags; - case '#': - /** @todo Implement "#" conversion flag. */ fmt++; goto process_flags; - case ' ': - /** @todo Implement " " conversion flag. */ fmt++; goto process_flags; - case '+': - /** @todo Implement "+" conversion flag. */ fmt++; goto process_flags; - } - - if (*fmt == '*') - { - precision= (int) va_arg(args, int); - fmt++; - } - else - { - while (my_isdigit(&my_charset_latin1, *fmt)) { - minimum_width=(minimum_width * 10) + (*fmt - '0'); - fmt++; - } - } - minimum_width*= minimum_width_sign; - - if (*fmt == '.') - { - fmt++; - if (*fmt == '*') { - precision= (int) va_arg(args, int); - fmt++; - } - else - { - while (my_isdigit(&my_charset_latin1, *fmt)) { - precision=(precision * 10) + (*fmt - '0'); - fmt++; - } - } - } - - if (*fmt == 's') /* String parameter */ - { - reg2 char *par = va_arg(args, char *); - size_t length2 = strlen(par); - /* TODO: implement precision */ - out_length+= length2; - if (my_b_write(info, (uchar*) par, length2)) - goto err; - } - else if (*fmt == 'b') /* Sized buffer parameter, only precision makes sense */ - { - char *par = va_arg(args, char *); - out_length+= precision; - if (my_b_write(info, (uchar*) par, precision)) - goto err; - } - else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ - { - register int iarg; - size_t length2; - char buff[17]; - - iarg = va_arg(args, int); - if (*fmt == 'd') - length2= (size_t) (int10_to_str((long) iarg,buff, -10) - buff); - else - length2= (uint) (int10_to_str((long) (uint) iarg,buff,10)- buff); - - /* minimum width padding */ - if (minimum_width > length2) - { - uchar *buffz; - - buffz= (uchar*) my_alloca(minimum_width - length2); - if (is_zero_padded) - memset(buffz, '0', minimum_width - length2); - else - memset(buffz, ' ', minimum_width - length2); - my_b_write(info, buffz, minimum_width - length2); - my_afree(buffz); - } - - out_length+= length2; - if (my_b_write(info, (uchar*) buff, length2)) - goto err; - } - else if ((*fmt == 'l' && fmt[1] == 'd') || fmt[1] == 'u') - /* long parameter */ - { - register long iarg; - size_t length2; - char buff[17]; - - iarg = va_arg(args, long); - if (*++fmt == 'd') - length2= (size_t) (int10_to_str(iarg,buff, -10) - buff); - else - length2= (size_t) (int10_to_str(iarg,buff,10)- buff); - out_length+= length2; - if (my_b_write(info, (uchar*) buff, length2)) - goto err; - } - else - { - /* %% or unknown code */ - if (my_b_write(info, (uchar*) backtrack, (size_t) (fmt-backtrack))) - goto err; - out_length+= fmt-backtrack; - } - } - return out_length; - -err: - return (size_t) -1; -} diff --git a/externals/mysql/mysys/mf_keycache.c b/externals/mysql/mysys/mf_keycache.c deleted file mode 100644 index aca47f564c..0000000000 --- a/externals/mysql/mysys/mf_keycache.c +++ /dev/null @@ -1,4580 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/** - @file - These functions handle keyblock cacheing for ISAM and MyISAM tables. - - One cache can handle many files. - It must contain buffers of the same blocksize. - init_key_cache() should be used to init cache handler. - - The free list (free_block_list) is a stack like structure. - When a block is freed by free_block(), it is pushed onto the stack. - When a new block is required it is first tried to pop one from the stack. - If the stack is empty, it is tried to get a never-used block from the pool. - If this is empty too, then a block is taken from the LRU ring, flushing it - to disk, if neccessary. This is handled in find_key_block(). - With the new free list, the blocks can have three temperatures: - hot, warm and cold (which is free). This is remembered in the block header - by the enum BLOCK_TEMPERATURE temperature variable. Remembering the - temperature is neccessary to correctly count the number of warm blocks, - which is required to decide when blocks are allowed to become hot. Whenever - a block is inserted to another (sub-)chain, we take the old and new - temperature into account to decide if we got one more or less warm block. - blocks_unused is the sum of never used blocks in the pool and of currently - free blocks. blocks_used is the number of blocks fetched from the pool and - as such gives the maximum number of in-use blocks at any time. -*/ - -/* - Key Cache Locking - ================= - - All key cache locking is done with a single mutex per key cache: - keycache->cache_lock. This mutex is locked almost all the time - when executing code in this file (mf_keycache.c). - However it is released for I/O and some copy operations. - - The cache_lock is also released when waiting for some event. Waiting - and signalling is done via condition variables. In most cases the - thread waits on its thread->suspend condition variable. Every thread - has a my_thread_var structure, which contains this variable and a - '*next' and '**prev' pointer. These pointers are used to insert the - thread into a wait queue. - - A thread can wait for one block and thus be in one wait queue at a - time only. - - Before starting to wait on its condition variable with - pthread_cond_wait(), the thread enters itself to a specific wait queue - with link_into_queue() (double linked with '*next' + '**prev') or - wait_on_queue() (single linked with '*next'). - - Another thread, when releasing a resource, looks up the waiting thread - in the related wait queue. It sends a signal with - pthread_cond_signal() to the waiting thread. - - NOTE: Depending on the particular wait situation, either the sending - thread removes the waiting thread from the wait queue with - unlink_from_queue() or release_whole_queue() respectively, or the waiting - thread removes itself. - - There is one exception from this locking scheme when one thread wants - to reuse a block for some other address. This works by first marking - the block reserved (status= BLOCK_IN_SWITCH) and then waiting for all - threads that are reading the block to finish. Each block has a - reference to a condition variable (condvar). It holds a reference to - the thread->suspend condition variable for the waiting thread (if such - a thread exists). When that thread is signaled, the reference is - cleared. The number of readers of a block is registered in - block->hash_link->requests. See wait_for_readers() / remove_reader() - for details. This is similar to the above, but it clearly means that - only one thread can wait for a particular block. There is no queue in - this case. Strangely enough block->convar is used for waiting for the - assigned hash_link only. More precisely it is used to wait for all - requests to be unregistered from the assigned hash_link. - - The resize_queue serves two purposes: - 1. Threads that want to do a resize wait there if in_resize is set. - This is not used in the server. The server refuses a second resize - request if one is already active. keycache->in_init is used for the - synchronization. See set_var.cc. - 2. Threads that want to access blocks during resize wait here during - the re-initialization phase. - When the resize is done, all threads on the queue are signalled. - Hypothetical resizers can compete for resizing, and read/write - requests will restart to request blocks from the freshly resized - cache. If the cache has been resized too small, it is disabled and - 'can_be_used' is false. In this case read/write requests bypass the - cache. Since they increment and decrement 'cnt_for_resize_op', the - next resizer can wait on the queue 'waiting_for_resize_cnt' until all - I/O finished. -*/ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#include "my_static.h" -#include -#include -#include -#include - -/* - Some compilation flags have been added specifically for this module - to control the following: - - not to let a thread to yield the control when reading directly - from key cache, which might improve performance in many cases; - to enable this add: - #define SERIALIZED_READ_FROM_CACHE - - to set an upper bound for number of threads simultaneously - using the key cache; this setting helps to determine an optimal - size for hash table and improve performance when the number of - blocks in the key cache much less than the number of threads - accessing it; - to set this number equal to add - #define MAX_THREADS - - to substitute calls of pthread_cond_wait for calls of - pthread_cond_timedwait (wait with timeout set up); - this setting should be used only when you want to trap a deadlock - situation, which theoretically should not happen; - to set timeout equal to seconds add - #define KEYCACHE_TIMEOUT - - to enable the module traps and to send debug information from - key cache module to a special debug log add: - #define KEYCACHE_DEBUG - the name of this debug log file can be set through: - #define KEYCACHE_DEBUG_LOG - if the name is not defined, it's set by default; - if the KEYCACHE_DEBUG flag is not set up and we are in a debug - mode, i.e. when ! defined(DBUG_OFF), the debug information from the - module is sent to the regular debug log. - - Example of the settings: - #define SERIALIZED_READ_FROM_CACHE - #define MAX_THREADS 100 - #define KEYCACHE_TIMEOUT 1 - #define KEYCACHE_DEBUG - #define KEYCACHE_DEBUG_LOG "my_key_cache_debug.log" -*/ - -#define STRUCT_PTR(TYPE, MEMBER, a) \ - (TYPE *) ((char *) (a) - offsetof(TYPE, MEMBER)) - -/* types of condition variables */ -#define COND_FOR_REQUESTED 0 -#define COND_FOR_SAVED 1 -#define COND_FOR_READERS 2 - -typedef pthread_cond_t KEYCACHE_CONDVAR; - -/* descriptor of the page in the key cache block buffer */ -struct st_keycache_page -{ - int file; /* file to which the page belongs to */ - my_off_t filepos; /* position of the page in the file */ -}; - -/* element in the chain of a hash table bucket */ -struct st_hash_link -{ - struct st_hash_link *next, **prev; /* to connect links in the same bucket */ - struct st_block_link *block; /* reference to the block for the page: */ - File file; /* from such a file */ - my_off_t diskpos; /* with such an offset */ - uint requests; /* number of requests for the page */ -}; - -/* simple states of a block */ -#define BLOCK_ERROR 1 /* an error occured when performing file i/o */ -#define BLOCK_READ 2 /* file block is in the block buffer */ -#define BLOCK_IN_SWITCH 4 /* block is preparing to read new page */ -#define BLOCK_REASSIGNED 8 /* blk does not accept requests for old page */ -#define BLOCK_IN_FLUSH 16 /* block is selected for flush */ -#define BLOCK_CHANGED 32 /* block buffer contains a dirty page */ -#define BLOCK_IN_USE 64 /* block is not free */ -#define BLOCK_IN_EVICTION 128 /* block is selected for eviction */ -#define BLOCK_IN_FLUSHWRITE 256 /* block is in write to file */ -#define BLOCK_FOR_UPDATE 512 /* block is selected for buffer modification */ - -/* page status, returned by find_key_block */ -#define PAGE_READ 0 -#define PAGE_TO_BE_READ 1 -#define PAGE_WAIT_TO_BE_READ 2 - -/* block temperature determines in which (sub-)chain the block currently is */ -enum BLOCK_TEMPERATURE { BLOCK_COLD /*free*/ , BLOCK_WARM , BLOCK_HOT }; - -/* key cache block */ -struct st_block_link -{ - struct st_block_link - *next_used, **prev_used; /* to connect links in the LRU chain (ring) */ - struct st_block_link - *next_changed, **prev_changed; /* for lists of file dirty/clean blocks */ - struct st_hash_link *hash_link; /* backward ptr to referring hash_link */ - KEYCACHE_WQUEUE wqueue[2]; /* queues on waiting requests for new/old pages */ - uint requests; /* number of requests for the block */ - uchar *buffer; /* buffer for the block page */ - uint offset; /* beginning of modified data in the buffer */ - uint length; /* end of data in the buffer */ - uint status; /* state of the block */ - enum BLOCK_TEMPERATURE temperature; /* block temperature: cold, warm, hot */ - uint hits_left; /* number of hits left until promotion */ - ulonglong last_hit_time; /* timestamp of the last hit */ - KEYCACHE_CONDVAR *condvar; /* condition variable for 'no readers' event */ - void *post_write_arg; /**< post_write's argument*/ -}; - -KEY_CACHE dflt_key_cache_var; -KEY_CACHE *dflt_key_cache= &dflt_key_cache_var; - -#define FLUSH_CACHE 2000 /* sort this many blocks at once */ - -static int flush_all_key_blocks(KEY_CACHE *keycache); -#ifdef THREAD -static void wait_on_queue(KEYCACHE_WQUEUE *wqueue, - pthread_mutex_t *mutex); -static void release_whole_queue(KEYCACHE_WQUEUE *wqueue); -#else -#define wait_on_queue(wqueue, mutex) do {} while (0) -#define release_whole_queue(wqueue) do {} while (0) -#endif -static void free_block(KEY_CACHE *keycache, BLOCK_LINK *block); -#if !defined(DBUG_OFF) -static void test_key_cache(KEY_CACHE *keycache, - const char *where, my_bool lock); -#endif - -#define KEYCACHE_HASH(f, pos) \ -(((ulong) ((pos) / keycache->key_cache_block_size) + \ - (ulong) (f)) & (keycache->hash_entries-1)) -#define FILE_HASH(f) ((uint) (f) & (CHANGED_BLOCKS_HASH-1)) - -#define DEFAULT_KEYCACHE_DEBUG_LOG "keycache_debug.log" - -#if defined(KEYCACHE_DEBUG) && ! defined(KEYCACHE_DEBUG_LOG) -#define KEYCACHE_DEBUG_LOG DEFAULT_KEYCACHE_DEBUG_LOG -#endif - -#if defined(KEYCACHE_DEBUG_LOG) -static FILE *keycache_debug_log=NULL; -static void keycache_debug_print _VARARGS((const char *fmt,...)); -#define KEYCACHE_DEBUG_OPEN \ - if (!keycache_debug_log) \ - { \ - keycache_debug_log= fopen(KEYCACHE_DEBUG_LOG, "w"); \ - (void) setvbuf(keycache_debug_log, NULL, _IOLBF, BUFSIZ); \ - } - -#define KEYCACHE_DEBUG_CLOSE \ - if (keycache_debug_log) \ - { \ - fclose(keycache_debug_log); \ - keycache_debug_log= 0; \ - } -#else -#define KEYCACHE_DEBUG_OPEN -#define KEYCACHE_DEBUG_CLOSE -#endif /* defined(KEYCACHE_DEBUG_LOG) */ - -#if defined(KEYCACHE_DEBUG_LOG) && defined(KEYCACHE_DEBUG) -#define KEYCACHE_DBUG_PRINT(l, m) \ - { if (keycache_debug_log) fprintf(keycache_debug_log, "%s: ", l); \ - keycache_debug_print m; } - -#define KEYCACHE_DBUG_ASSERT(a) \ - { if (! (a) && keycache_debug_log) fclose(keycache_debug_log); \ - assert(a); } -#else -#define KEYCACHE_DBUG_PRINT(l, m) DBUG_PRINT(l, m) -#define KEYCACHE_DBUG_ASSERT(a) DBUG_ASSERT(a) -#endif /* defined(KEYCACHE_DEBUG_LOG) && defined(KEYCACHE_DEBUG) */ - -#if defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF) -#ifdef THREAD -static long keycache_thread_id; -#define KEYCACHE_THREAD_TRACE(l) \ - KEYCACHE_DBUG_PRINT(l,("|thread %ld",keycache_thread_id)) - -#define KEYCACHE_THREAD_TRACE_BEGIN(l) \ - { struct st_my_thread_var *thread_var= my_thread_var; \ - keycache_thread_id= thread_var->id; \ - KEYCACHE_DBUG_PRINT(l,("[thread %ld",keycache_thread_id)) } - -#define KEYCACHE_THREAD_TRACE_END(l) \ - KEYCACHE_DBUG_PRINT(l,("]thread %ld",keycache_thread_id)) -#else /* THREAD */ -#define KEYCACHE_THREAD_TRACE(l) KEYCACHE_DBUG_PRINT(l,("")) -#define KEYCACHE_THREAD_TRACE_BEGIN(l) KEYCACHE_DBUG_PRINT(l,("")) -#define KEYCACHE_THREAD_TRACE_END(l) KEYCACHE_DBUG_PRINT(l,("")) -#endif /* THREAD */ -#else -#define KEYCACHE_THREAD_TRACE_BEGIN(l) -#define KEYCACHE_THREAD_TRACE_END(l) -#define KEYCACHE_THREAD_TRACE(l) -#endif /* defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF) */ - -#define BLOCK_NUMBER(b) \ - ((uint) (((char*)(b)-(char *) keycache->block_root)/sizeof(BLOCK_LINK))) -#define HASH_LINK_NUMBER(h) \ - ((uint) (((char*)(h)-(char *) keycache->hash_link_root)/sizeof(HASH_LINK))) - -#if (defined(KEYCACHE_TIMEOUT) && !defined(__WIN__)) || defined(KEYCACHE_DEBUG) -static int keycache_pthread_cond_wait(pthread_cond_t *cond, - pthread_mutex_t *mutex); -#else -#define keycache_pthread_cond_wait pthread_cond_wait -#endif - -#if defined(KEYCACHE_DEBUG) -static int keycache_pthread_mutex_lock(pthread_mutex_t *mutex); -static void keycache_pthread_mutex_unlock(pthread_mutex_t *mutex); -static int keycache_pthread_cond_signal(pthread_cond_t *cond); -#else -#define keycache_pthread_mutex_lock pthread_mutex_lock -#define keycache_pthread_mutex_unlock pthread_mutex_unlock -#define keycache_pthread_cond_signal pthread_cond_signal -#endif /* defined(KEYCACHE_DEBUG) */ - -#if !defined(DBUG_OFF) -#if defined(inline) -#undef inline -#endif -#define inline /* disabled inline for easier debugging */ -static int fail_block(BLOCK_LINK *block); -static int fail_hlink(HASH_LINK *hlink); -static int cache_empty(KEY_CACHE *keycache); -#endif - -static inline uint next_power(uint value) -{ - return (uint) my_round_up_to_next_power((uint32) value) << 1; -} - - -/* - Initialize a key cache - - SYNOPSIS - init_key_cache() - keycache pointer to a key cache data structure - key_cache_block_size size of blocks to keep cached data - use_mem total memory to use for the key cache - division_limit division limit (may be zero) - age_threshold age threshold (may be zero) - - RETURN VALUE - number of blocks in the key cache, if successful, - 0 - otherwise. - - NOTES. - if keycache->key_cache_inited != 0 we assume that the key cache - is already initialized. This is for now used by myisamchk, but shouldn't - be something that a program should rely on! - - It's assumed that no two threads call this function simultaneously - referring to the same key cache handle. - -*/ - -int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, - size_t use_mem, uint division_limit, - uint age_threshold) -{ - ulong blocks, hash_links; - size_t length; - int error; - DBUG_ENTER("init_key_cache"); - DBUG_ASSERT(key_cache_block_size >= 512); - - KEYCACHE_DEBUG_OPEN; - if (keycache->key_cache_inited && keycache->disk_blocks > 0) - { - DBUG_PRINT("warning",("key cache already in use")); - DBUG_RETURN(0); - } - - keycache->global_cache_w_requests= keycache->global_cache_r_requests= 0; - keycache->global_cache_read= keycache->global_cache_write= 0; - keycache->disk_blocks= -1; - if (! keycache->key_cache_inited) - { - keycache->key_cache_inited= 1; - /* - Initialize these variables once only. - Their value must survive re-initialization during resizing. - */ - keycache->in_resize= 0; - keycache->resize_in_flush= 0; - keycache->cnt_for_resize_op= 0; - keycache->waiting_for_resize_cnt.last_thread= NULL; - keycache->in_init= 0; - pthread_mutex_init(&keycache->cache_lock, MY_MUTEX_INIT_FAST); - keycache->resize_queue.last_thread= NULL; - keycache->post_write= NULL; - } - - keycache->key_cache_mem_size= use_mem; - keycache->key_cache_block_size= key_cache_block_size; - DBUG_PRINT("info", ("key_cache_block_size: %u", - key_cache_block_size)); - - blocks= (ulong) (use_mem / (sizeof(BLOCK_LINK) + 2 * sizeof(HASH_LINK) + - sizeof(HASH_LINK*) * 5/4 + key_cache_block_size)); - /* It doesn't make sense to have too few blocks (less than 8) */ - if (blocks >= 8) - { - for ( ; ; ) - { - /* Set my_hash_entries to the next bigger 2 power */ - if ((keycache->hash_entries= next_power(blocks)) < blocks * 5/4) - keycache->hash_entries<<= 1; - hash_links= 2 * blocks; -#if defined(MAX_THREADS) - if (hash_links < MAX_THREADS + blocks - 1) - hash_links= MAX_THREADS + blocks - 1; -#endif - while ((length= (ALIGN_SIZE(blocks * sizeof(BLOCK_LINK)) + - ALIGN_SIZE(hash_links * sizeof(HASH_LINK)) + - ALIGN_SIZE(sizeof(HASH_LINK*) * - keycache->hash_entries))) + - ((size_t) blocks * keycache->key_cache_block_size) > use_mem) - blocks--; - /* Allocate memory for cache page buffers */ - if ((keycache->block_mem= - my_large_malloc((size_t) blocks * keycache->key_cache_block_size, - MYF(0)))) - { - /* - Allocate memory for blocks, hash_links and hash entries; - For each block 2 hash links are allocated - */ - if ((keycache->block_root= (BLOCK_LINK*) my_malloc(length, - MYF(0)))) - break; - my_large_free(keycache->block_mem, MYF(0)); - keycache->block_mem= 0; - } - if (blocks < 8) - { - my_errno= ENOMEM; - my_error(EE_OUTOFMEMORY, MYF(0), blocks * keycache->key_cache_block_size); - goto err; - } - blocks= blocks / 4*3; - } - keycache->blocks_unused= blocks; - keycache->disk_blocks= (int) blocks; - keycache->hash_links= hash_links; - keycache->hash_root= (HASH_LINK**) ((char*) keycache->block_root + - ALIGN_SIZE(blocks*sizeof(BLOCK_LINK))); - keycache->hash_link_root= (HASH_LINK*) ((char*) keycache->hash_root + - ALIGN_SIZE((sizeof(HASH_LINK*) * - keycache->hash_entries))); - bzero((uchar*) keycache->block_root, - keycache->disk_blocks * sizeof(BLOCK_LINK)); - bzero((uchar*) keycache->hash_root, - keycache->hash_entries * sizeof(HASH_LINK*)); - bzero((uchar*) keycache->hash_link_root, - keycache->hash_links * sizeof(HASH_LINK)); - keycache->hash_links_used= 0; - keycache->free_hash_list= NULL; - keycache->blocks_used= keycache->blocks_changed= 0; - - keycache->global_blocks_changed= 0; - keycache->blocks_available=0; /* For debugging */ - - /* The LRU chain is empty after initialization */ - keycache->used_last= NULL; - keycache->used_ins= NULL; - keycache->free_block_list= NULL; - keycache->keycache_time= 0; - keycache->warm_blocks= 0; - keycache->min_warm_blocks= (division_limit ? - blocks * division_limit / 100 + 1 : - blocks); - keycache->age_threshold= (age_threshold ? - blocks * age_threshold / 100 : - blocks); - - keycache->can_be_used= 1; - - keycache->waiting_for_hash_link.last_thread= NULL; - keycache->waiting_for_block.last_thread= NULL; - DBUG_PRINT("exit", - ("disk_blocks: %d block_root: %p hash_entries: %d\ - hash_root: %p hash_links: %d hash_link_root: %p", - keycache->disk_blocks, keycache->block_root, - keycache->hash_entries, keycache->hash_root, - keycache->hash_links, keycache->hash_link_root)); - bzero((uchar*) keycache->changed_blocks, - sizeof(keycache->changed_blocks[0]) * CHANGED_BLOCKS_HASH); - bzero((uchar*) keycache->file_blocks, - sizeof(keycache->file_blocks[0]) * CHANGED_BLOCKS_HASH); - } - else - { - /* key_buffer_size is specified too small. Disable the cache. */ - keycache->can_be_used= 0; - } - - keycache->blocks= keycache->disk_blocks > 0 ? keycache->disk_blocks : 0; - DBUG_RETURN((int) keycache->disk_blocks); - -err: - error= my_errno; - keycache->disk_blocks= 0; - keycache->blocks= 0; - if (keycache->block_mem) - { - my_large_free((uchar*) keycache->block_mem, MYF(0)); - keycache->block_mem= NULL; - } - if (keycache->block_root) - { - my_free((uchar*) keycache->block_root, MYF(0)); - keycache->block_root= NULL; - } - my_errno= error; - keycache->can_be_used= 0; - DBUG_RETURN(0); -} - - -/* - Resize a key cache - - SYNOPSIS - resize_key_cache() - keycache pointer to a key cache data structure - key_cache_block_size size of blocks to keep cached data - use_mem total memory to use for the new key cache - division_limit new division limit (if not zero) - age_threshold new age threshold (if not zero) - - RETURN VALUE - number of blocks in the key cache, if successful, - 0 - otherwise. - - NOTES. - The function first compares the memory size and the block size parameters - with the key cache values. - - If they differ the function free the the memory allocated for the - old key cache blocks by calling the end_key_cache function and - then rebuilds the key cache with new blocks by calling - init_key_cache. - - The function starts the operation only when all other threads - performing operations with the key cache let her to proceed - (when cnt_for_resize=0). -*/ - -int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, - size_t use_mem, uint division_limit, - uint age_threshold) -{ - int blocks; - DBUG_ENTER("resize_key_cache"); - - if (!keycache->key_cache_inited) - DBUG_RETURN(keycache->disk_blocks); - - if(key_cache_block_size == keycache->key_cache_block_size && - use_mem == keycache->key_cache_mem_size) - { - change_key_cache_param(keycache, division_limit, age_threshold); - DBUG_RETURN(keycache->disk_blocks); - } - - keycache_pthread_mutex_lock(&keycache->cache_lock); - -#ifdef THREAD - /* - We may need to wait for another thread which is doing a resize - already. This cannot happen in the MySQL server though. It allows - one resizer only. In set_var.cc keycache->in_init is used to block - multiple attempts. - */ - while (keycache->in_resize) - { - /* purecov: begin inspected */ - wait_on_queue(&keycache->resize_queue, &keycache->cache_lock); - /* purecov: end */ - } -#endif - - /* - Mark the operation in progress. This blocks other threads from doing - a resize in parallel. It prohibits new blocks to enter the cache. - Read/write requests can bypass the cache during the flush phase. - */ - keycache->in_resize= 1; - - /* Need to flush only if keycache is enabled. */ - if (keycache->can_be_used) - { - /* Start the flush phase. */ - keycache->resize_in_flush= 1; - - if (flush_all_key_blocks(keycache)) - { - /* TODO: if this happens, we should write a warning in the log file ! */ - keycache->resize_in_flush= 0; - blocks= 0; - keycache->can_be_used= 0; - goto finish; - } - DBUG_ASSERT(cache_empty(keycache)); - - /* End the flush phase. */ - keycache->resize_in_flush= 0; - } - -#ifdef THREAD - /* - Some direct read/write operations (bypassing the cache) may still be - unfinished. Wait until they are done. If the key cache can be used, - direct I/O is done in increments of key_cache_block_size. That is, - every block is checked if it is in the cache. We need to wait for - pending I/O before re-initializing the cache, because we may change - the block size. Otherwise they could check for blocks at file - positions where the new block division has none. We do also want to - wait for I/O done when (if) the cache was disabled. It must not - run in parallel with normal cache operation. - */ - while (keycache->cnt_for_resize_op) - wait_on_queue(&keycache->waiting_for_resize_cnt, &keycache->cache_lock); -#else - KEYCACHE_DBUG_ASSERT(keycache->cnt_for_resize_op == 0); -#endif - - /* - Free old cache structures, allocate new structures, and initialize - them. Note that the cache_lock mutex and the resize_queue are left - untouched. We do not lose the cache_lock and will release it only at - the end of this function. - */ - end_key_cache(keycache, 0); /* Don't free mutex */ - /* The following will work even if use_mem is 0 */ - blocks= init_key_cache(keycache, key_cache_block_size, use_mem, - division_limit, age_threshold); - -finish: - /* - Mark the resize finished. This allows other threads to start a - resize or to request new cache blocks. - */ - keycache->in_resize= 0; - - /* Signal waiting threads. */ - release_whole_queue(&keycache->resize_queue); - - keycache_pthread_mutex_unlock(&keycache->cache_lock); - DBUG_RETURN(blocks); -} - - -/* - Increment counter blocking resize key cache operation -*/ -static inline void inc_counter_for_resize_op(KEY_CACHE *keycache) -{ - keycache->cnt_for_resize_op++; -} - - -/* - Decrement counter blocking resize key cache operation; - Signal the operation to proceed when counter becomes equal zero -*/ -static inline void dec_counter_for_resize_op(KEY_CACHE *keycache) -{ - if (!--keycache->cnt_for_resize_op) - release_whole_queue(&keycache->waiting_for_resize_cnt); -} - -/* - Change the key cache parameters - - SYNOPSIS - change_key_cache_param() - keycache pointer to a key cache data structure - division_limit new division limit (if not zero) - age_threshold new age threshold (if not zero) - - RETURN VALUE - none - - NOTES. - Presently the function resets the key cache parameters - concerning midpoint insertion strategy - division_limit and - age_threshold. -*/ - -void change_key_cache_param(KEY_CACHE *keycache, uint division_limit, - uint age_threshold) -{ - DBUG_ENTER("change_key_cache_param"); - - keycache_pthread_mutex_lock(&keycache->cache_lock); - if (division_limit) - keycache->min_warm_blocks= (keycache->disk_blocks * - division_limit / 100 + 1); - if (age_threshold) - keycache->age_threshold= (keycache->disk_blocks * - age_threshold / 100); - keycache_pthread_mutex_unlock(&keycache->cache_lock); - DBUG_VOID_RETURN; -} - - -/* - Remove key_cache from memory - - SYNOPSIS - end_key_cache() - keycache key cache handle - cleanup Complete free (Free also mutex for key cache) - - RETURN VALUE - none -*/ - -void end_key_cache(KEY_CACHE *keycache, my_bool cleanup) -{ - DBUG_ENTER("end_key_cache"); - DBUG_PRINT("enter", ("key_cache: %p", keycache)); - - if (!keycache->key_cache_inited) - DBUG_VOID_RETURN; - - if (keycache->disk_blocks > 0) - { - if (keycache->block_mem) - { - my_large_free((uchar*) keycache->block_mem, MYF(0)); - keycache->block_mem= NULL; - my_free((uchar*) keycache->block_root, MYF(0)); - keycache->block_root= NULL; - } - keycache->disk_blocks= -1; - /* Reset blocks_changed to be safe if flush_all_key_blocks is called */ - keycache->blocks_changed= 0; - } - - DBUG_PRINT("status", ("used: %lu changed: %lu w_requests: %lu " - "writes: %lu r_requests: %lu reads: %lu", - keycache->blocks_used, keycache->global_blocks_changed, - (ulong) keycache->global_cache_w_requests, - (ulong) keycache->global_cache_write, - (ulong) keycache->global_cache_r_requests, - (ulong) keycache->global_cache_read)); - - /* - Reset these values to be able to detect a disabled key cache. - See Bug#44068 (RESTORE can disable the MyISAM Key Cache). - */ - keycache->blocks_used= 0; - keycache->blocks_unused= 0; - - if (cleanup) - { - pthread_mutex_destroy(&keycache->cache_lock); - keycache->key_cache_inited= keycache->can_be_used= 0; - keycache->post_write= NULL; - KEYCACHE_DEBUG_CLOSE; - } - DBUG_VOID_RETURN; -} /* end_key_cache */ - - -/** - Does a my_pwrite() to the file and then calls callback. Arguments are those - of my_pwrite() plus the callback and its argument. - - @note The callback is really POST-write; callers depend on this! So always - call it after writing to the file, not before. - - @return Operation status - @retval 0 ok - @retval !=0 write or callback failed -*/ - -static inline int key_cache_pwrite(int Filedes, const uchar *Buffer, - uint Count, my_off_t offset, myf MyFlags, - KEYCACHE_POST_WRITE_CALLBACK callback, - void *callback_arg) -{ - int ret= my_pwrite(Filedes, Buffer, Count, offset, MyFlags); - if (callback) - ret|= (*callback)(callback_arg, Buffer, Count, offset); - return ret; -} - - -#ifdef THREAD - -/* - Link a thread into double-linked queue of waiting threads. - - SYNOPSIS - link_into_queue() - wqueue pointer to the queue structure - thread pointer to the thread to be added to the queue - - RETURN VALUE - none - - NOTES. - Queue is represented by a circular list of the thread structures - The list is double-linked of the type (**prev,*next), accessed by - a pointer to the last element. -*/ - -static void link_into_queue(KEYCACHE_WQUEUE *wqueue, - struct st_my_thread_var *thread) -{ - struct st_my_thread_var *last; - - DBUG_ASSERT(!thread->next && !thread->prev); - if (! (last= wqueue->last_thread)) - { - /* Queue is empty */ - thread->next= thread; - thread->prev= &thread->next; - } - else - { - thread->prev= last->next->prev; - last->next->prev= &thread->next; - thread->next= last->next; - last->next= thread; - } - wqueue->last_thread= thread; -} - -/* - Unlink a thread from double-linked queue of waiting threads - - SYNOPSIS - unlink_from_queue() - wqueue pointer to the queue structure - thread pointer to the thread to be removed from the queue - - RETURN VALUE - none - - NOTES. - See NOTES for link_into_queue -*/ - -static void unlink_from_queue(KEYCACHE_WQUEUE *wqueue, - struct st_my_thread_var *thread) -{ - KEYCACHE_DBUG_PRINT("unlink_from_queue", ("thread %ld", thread->id)); - DBUG_ASSERT(thread->next && thread->prev); - if (thread->next == thread) - /* The queue contains only one member */ - wqueue->last_thread= NULL; - else - { - thread->next->prev= thread->prev; - *thread->prev=thread->next; - if (wqueue->last_thread == thread) - wqueue->last_thread= STRUCT_PTR(struct st_my_thread_var, next, - thread->prev); - } - thread->next= NULL; -#if !defined(DBUG_OFF) - /* - This makes it easier to see it's not in a chain during debugging. - And some DBUG_ASSERT() rely on it. - */ - thread->prev= NULL; -#endif -} - - -/* - Add a thread to single-linked queue of waiting threads - - SYNOPSIS - wait_on_queue() - wqueue Pointer to the queue structure. - mutex Cache_lock to acquire after awake. - - RETURN VALUE - none - - NOTES. - Queue is represented by a circular list of the thread structures - The list is single-linked of the type (*next), accessed by a pointer - to the last element. - - The function protects against stray signals by verifying that the - current thread is unlinked from the queue when awaking. However, - since several threads can wait for the same event, it might be - necessary for the caller of the function to check again if the - condition for awake is indeed matched. -*/ - -static void wait_on_queue(KEYCACHE_WQUEUE *wqueue, - pthread_mutex_t *mutex) -{ - struct st_my_thread_var *last; - struct st_my_thread_var *thread= my_thread_var; - - /* Add to queue. */ - DBUG_ASSERT(!thread->next); - DBUG_ASSERT(!thread->prev); /* Not required, but must be true anyway. */ - if (! (last= wqueue->last_thread)) - thread->next= thread; - else - { - thread->next= last->next; - last->next= thread; - } - wqueue->last_thread= thread; - - /* - Wait until thread is removed from queue by the signalling thread. - The loop protects against stray signals. - */ - do - { - KEYCACHE_DBUG_PRINT("wait", ("suspend thread %ld", thread->id)); - keycache_pthread_cond_wait(&thread->suspend, mutex); - } - while (thread->next); -} - - -/* - Remove all threads from queue signaling them to proceed - - SYNOPSIS - release_whole_queue() - wqueue pointer to the queue structure - - RETURN VALUE - none - - NOTES. - See notes for wait_on_queue(). - When removed from the queue each thread is signaled via condition - variable thread->suspend. -*/ - -static void release_whole_queue(KEYCACHE_WQUEUE *wqueue) -{ - struct st_my_thread_var *last; - struct st_my_thread_var *next; - struct st_my_thread_var *thread; - - /* Queue may be empty. */ - if (!(last= wqueue->last_thread)) - return; - - next= last->next; - do - { - thread=next; - KEYCACHE_DBUG_PRINT("release_whole_queue: signal", - ("thread %ld", thread->id)); - /* Signal the thread. */ - keycache_pthread_cond_signal(&thread->suspend); - /* Take thread from queue. */ - next=thread->next; - thread->next= NULL; - } - while (thread != last); - - /* Now queue is definitely empty. */ - wqueue->last_thread= NULL; -} - -#endif /* THREAD */ - - -/* - Unlink a block from the chain of dirty/clean blocks -*/ - -static inline void unlink_changed(BLOCK_LINK *block) -{ - DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); - if (block->next_changed) - block->next_changed->prev_changed= block->prev_changed; - *block->prev_changed= block->next_changed; - -#if !defined(DBUG_OFF) - /* - This makes it easier to see it's not in a chain during debugging. - And some DBUG_ASSERT() rely on it. - */ - block->next_changed= NULL; - block->prev_changed= NULL; -#endif -} - - -/* - Link a block into the chain of dirty/clean blocks -*/ - -static inline void link_changed(BLOCK_LINK *block, BLOCK_LINK **phead) -{ - DBUG_ASSERT(!block->next_changed); - DBUG_ASSERT(!block->prev_changed); - block->prev_changed= phead; - if ((block->next_changed= *phead)) - (*phead)->prev_changed= &block->next_changed; - *phead= block; -} - - -/* - Link a block in a chain of clean blocks of a file. - - SYNOPSIS - link_to_file_list() - keycache Key cache handle - block Block to relink - file File to be linked to - unlink If to unlink first - - DESCRIPTION - Unlink a block from whichever chain it is linked in, if it's - asked for, and link it to the chain of clean blocks of the - specified file. - - NOTE - Please do never set/clear BLOCK_CHANGED outside of - link_to_file_list() or link_to_changed_list(). - You would risk to damage correct counting of changed blocks - and to find blocks in the wrong hash. - - RETURN - void -*/ - -static void link_to_file_list(KEY_CACHE *keycache, - BLOCK_LINK *block, int file, - my_bool unlink_block) -{ - DBUG_ASSERT(block->status & BLOCK_IN_USE); - DBUG_ASSERT(block->hash_link && block->hash_link->block == block); - DBUG_ASSERT(block->hash_link->file == file); - if (unlink_block) - unlink_changed(block); - link_changed(block, &keycache->file_blocks[FILE_HASH(file)]); - if (block->status & BLOCK_CHANGED) - { - block->status&= ~BLOCK_CHANGED; - keycache->blocks_changed--; - keycache->global_blocks_changed--; - } -} - - -/* - Re-link a block from the clean chain to the dirty chain of a file. - - SYNOPSIS - link_to_changed_list() - keycache key cache handle - block block to relink - - DESCRIPTION - Unlink a block from the chain of clean blocks of a file - and link it to the chain of dirty blocks of the same file. - - NOTE - Please do never set/clear BLOCK_CHANGED outside of - link_to_file_list() or link_to_changed_list(). - You would risk to damage correct counting of changed blocks - and to find blocks in the wrong hash. - - RETURN - void -*/ - -static void link_to_changed_list(KEY_CACHE *keycache, - BLOCK_LINK *block) -{ - DBUG_ASSERT(block->status & BLOCK_IN_USE); - DBUG_ASSERT(!(block->status & BLOCK_CHANGED)); - DBUG_ASSERT(block->hash_link && block->hash_link->block == block); - - unlink_changed(block); - link_changed(block, - &keycache->changed_blocks[FILE_HASH(block->hash_link->file)]); - block->status|=BLOCK_CHANGED; - keycache->blocks_changed++; - keycache->global_blocks_changed++; -} - - -/* - Link a block to the LRU chain at the beginning or at the end of - one of two parts. - - SYNOPSIS - link_block() - keycache pointer to a key cache data structure - block pointer to the block to link to the LRU chain - hot <-> to link the block into the hot subchain - at_end <-> to link the block at the end of the subchain - - RETURN VALUE - none - - NOTES. - The LRU ring is represented by a circular list of block structures. - The list is double-linked of the type (**prev,*next) type. - The LRU ring is divided into two parts - hot and warm. - There are two pointers to access the last blocks of these two - parts. The beginning of the warm part follows right after the - end of the hot part. - Only blocks of the warm part can be used for eviction. - The first block from the beginning of this subchain is always - taken for eviction (keycache->last_used->next) - - LRU chain: +------+ H O T +------+ - +----| end |----...<----| beg |----+ - | +------+last +------+ | - v<-link in latest hot (new end) | - | link in latest warm (new end)->^ - | +------+ W A R M +------+ | - +----| beg |---->...----| end |----+ - +------+ +------+ins - first for eviction - - It is also possible that the block is selected for eviction and thus - not linked in the LRU ring. -*/ - -static void link_block(KEY_CACHE *keycache, BLOCK_LINK *block, my_bool hot, - my_bool at_end) -{ - BLOCK_LINK *ins; - BLOCK_LINK **pins; - - DBUG_ASSERT((block->status & ~BLOCK_CHANGED) == (BLOCK_READ | BLOCK_IN_USE)); - DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ - DBUG_ASSERT(!block->requests); - DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); - DBUG_ASSERT(!block->next_used); - DBUG_ASSERT(!block->prev_used); -#ifdef THREAD - if (!hot && keycache->waiting_for_block.last_thread) - { - /* Signal that in the LRU warm sub-chain an available block has appeared */ - struct st_my_thread_var *last_thread= - keycache->waiting_for_block.last_thread; - struct st_my_thread_var *first_thread= last_thread->next; - struct st_my_thread_var *next_thread= first_thread; - HASH_LINK *hash_link= (HASH_LINK *) first_thread->opt_info; - struct st_my_thread_var *thread; - do - { - thread= next_thread; - next_thread= thread->next; - /* - We notify about the event all threads that ask - for the same page as the first thread in the queue - */ - if ((HASH_LINK *) thread->opt_info == hash_link) - { - KEYCACHE_DBUG_PRINT("link_block: signal", ("thread %ld", thread->id)); - keycache_pthread_cond_signal(&thread->suspend); - unlink_from_queue(&keycache->waiting_for_block, thread); - block->requests++; - } - } - while (thread != last_thread); - hash_link->block= block; - /* - NOTE: We assigned the block to the hash_link and signalled the - requesting thread(s). But it is possible that other threads runs - first. These threads see the hash_link assigned to a block which - is assigned to another hash_link and not marked BLOCK_IN_SWITCH. - This can be a problem for functions that do not select the block - via its hash_link: flush and free. They do only see a block which - is in a "normal" state and don't know that it will be evicted soon. - - We cannot set BLOCK_IN_SWITCH here because only one of the - requesting threads must handle the eviction. All others must wait - for it to complete. If we set the flag here, the threads would not - know who is in charge of the eviction. Without the flag, the first - thread takes the stick and sets the flag. - - But we need to note in the block that is has been selected for - eviction. It must not be freed. The evicting thread will not - expect the block in the free list. Before freeing we could also - check if block->requests > 1. But I think including another flag - in the check of block->status is slightly more efficient and - probably easier to read. - */ - block->status|= BLOCK_IN_EVICTION; - KEYCACHE_THREAD_TRACE("link_block: after signaling"); -#if defined(KEYCACHE_DEBUG) - KEYCACHE_DBUG_PRINT("link_block", - ("linked,unlinked block %u status=%x #requests=%u #available=%u", - BLOCK_NUMBER(block), block->status, - block->requests, keycache->blocks_available)); -#endif - return; - } -#else /* THREAD */ - KEYCACHE_DBUG_ASSERT(! (!hot && keycache->waiting_for_block.last_thread)); - /* Condition not transformed using DeMorgan, to keep the text identical */ -#endif /* THREAD */ - pins= hot ? &keycache->used_ins : &keycache->used_last; - ins= *pins; - if (ins) - { - ins->next_used->prev_used= &block->next_used; - block->next_used= ins->next_used; - block->prev_used= &ins->next_used; - ins->next_used= block; - if (at_end) - *pins= block; - } - else - { - /* The LRU ring is empty. Let the block point to itself. */ - keycache->used_last= keycache->used_ins= block->next_used= block; - block->prev_used= &block->next_used; - } - KEYCACHE_THREAD_TRACE("link_block"); -#if defined(KEYCACHE_DEBUG) - keycache->blocks_available++; - KEYCACHE_DBUG_PRINT("link_block", - ("linked block %u:%1u status=%x #requests=%u #available=%u", - BLOCK_NUMBER(block), at_end, block->status, - block->requests, keycache->blocks_available)); - KEYCACHE_DBUG_ASSERT((ulong) keycache->blocks_available <= - keycache->blocks_used); -#endif -} - - -/* - Unlink a block from the LRU chain - - SYNOPSIS - unlink_block() - keycache pointer to a key cache data structure - block pointer to the block to unlink from the LRU chain - - RETURN VALUE - none - - NOTES. - See NOTES for link_block -*/ - -static void unlink_block(KEY_CACHE *keycache, BLOCK_LINK *block) -{ - DBUG_ASSERT((block->status & ~BLOCK_CHANGED) == (BLOCK_READ | BLOCK_IN_USE)); - DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ - DBUG_ASSERT(!block->requests); - DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); - DBUG_ASSERT(block->next_used && block->prev_used && - (block->next_used->prev_used == &block->next_used) && - (*block->prev_used == block)); - if (block->next_used == block) - /* The list contains only one member */ - keycache->used_last= keycache->used_ins= NULL; - else - { - block->next_used->prev_used= block->prev_used; - *block->prev_used= block->next_used; - if (keycache->used_last == block) - keycache->used_last= STRUCT_PTR(BLOCK_LINK, next_used, block->prev_used); - if (keycache->used_ins == block) - keycache->used_ins=STRUCT_PTR(BLOCK_LINK, next_used, block->prev_used); - } - block->next_used= NULL; -#if !defined(DBUG_OFF) - /* - This makes it easier to see it's not in a chain during debugging. - And some DBUG_ASSERT() rely on it. - */ - block->prev_used= NULL; -#endif - - KEYCACHE_THREAD_TRACE("unlink_block"); -#if defined(KEYCACHE_DEBUG) - KEYCACHE_DBUG_ASSERT(keycache->blocks_available != 0); - keycache->blocks_available--; - KEYCACHE_DBUG_PRINT("unlink_block", - ("unlinked block %u status=%x #requests=%u #available=%u", - BLOCK_NUMBER(block), block->status, - block->requests, keycache->blocks_available)); -#endif -} - - -/* - Register requests for a block. - - SYNOPSIS - reg_requests() - keycache Pointer to a key cache data structure. - block Pointer to the block to register a request on. - count Number of requests. Always 1. - - NOTE - The first request unlinks the block from the LRU ring. This means - that it is protected against eveiction. - - RETURN - void -*/ -static void reg_requests(KEY_CACHE *keycache, BLOCK_LINK *block, int count) -{ - DBUG_ASSERT(block->status & BLOCK_IN_USE); - DBUG_ASSERT(block->hash_link); - - if (!block->requests) - unlink_block(keycache, block); - block->requests+=count; -} - - -/* - Unregister request for a block - linking it to the LRU chain if it's the last request - - SYNOPSIS - unreg_request() - keycache pointer to a key cache data structure - block pointer to the block to link to the LRU chain - at_end <-> to link the block at the end of the LRU chain - - RETURN VALUE - none - - NOTES. - Every linking to the LRU ring decrements by one a special block - counter (if it's positive). If the at_end parameter is TRUE the block is - added either at the end of warm sub-chain or at the end of hot sub-chain. - It is added to the hot subchain if its counter is zero and number of - blocks in warm sub-chain is not less than some low limit (determined by - the division_limit parameter). Otherwise the block is added to the warm - sub-chain. If the at_end parameter is FALSE the block is always added - at beginning of the warm sub-chain. - Thus a warm block can be promoted to the hot sub-chain when its counter - becomes zero for the first time. - At the same time the block at the very beginning of the hot subchain - might be moved to the beginning of the warm subchain if it stays untouched - for a too long time (this time is determined by parameter age_threshold). - - It is also possible that the block is selected for eviction and thus - not linked in the LRU ring. -*/ - -static void unreg_request(KEY_CACHE *keycache, - BLOCK_LINK *block, int at_end) -{ - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ - DBUG_ASSERT(block->requests); - DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); - DBUG_ASSERT(!block->next_used); - DBUG_ASSERT(!block->prev_used); - /* - Unregister the request, but do not link erroneous blocks into the - LRU ring. - */ - if (!--block->requests && !(block->status & BLOCK_ERROR)) - { - my_bool hot; - if (block->hits_left) - block->hits_left--; - hot= !block->hits_left && at_end && - keycache->warm_blocks > keycache->min_warm_blocks; - if (hot) - { - if (block->temperature == BLOCK_WARM) - keycache->warm_blocks--; - block->temperature= BLOCK_HOT; - KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", - keycache->warm_blocks)); - } - link_block(keycache, block, hot, (my_bool)at_end); - block->last_hit_time= keycache->keycache_time; - keycache->keycache_time++; - /* - At this place, the block might be in the LRU ring or not. If an - evicter was waiting for a block, it was selected for eviction and - not linked in the LRU ring. - */ - - /* - Check if we should link a hot block to the warm block sub-chain. - It is possible that we select the same block as above. But it can - also be another block. In any case a block from the LRU ring is - selected. In other words it works even if the above block was - selected for eviction and not linked in the LRU ring. Since this - happens only if the LRU ring is empty, the block selected below - would be NULL and the rest of the function skipped. - */ - block= keycache->used_ins; - if (block && keycache->keycache_time - block->last_hit_time > - keycache->age_threshold) - { - unlink_block(keycache, block); - link_block(keycache, block, 0, 0); - if (block->temperature != BLOCK_WARM) - { - keycache->warm_blocks++; - block->temperature= BLOCK_WARM; - } - KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", - keycache->warm_blocks)); - } - } -} - -/* - Remove a reader of the page in block -*/ - -static void remove_reader(BLOCK_LINK *block) -{ - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - DBUG_ASSERT(block->hash_link && block->hash_link->block == block); - DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); - DBUG_ASSERT(!block->next_used); - DBUG_ASSERT(!block->prev_used); - DBUG_ASSERT(block->hash_link->requests); -#ifdef THREAD - if (! --block->hash_link->requests && block->condvar) - keycache_pthread_cond_signal(block->condvar); -#else - --block->hash_link->requests; -#endif -} - - -/* - Wait until the last reader of the page in block - signals on its termination -*/ - -static void wait_for_readers(KEY_CACHE *keycache, - BLOCK_LINK *block) -{ -#ifdef THREAD - struct st_my_thread_var *thread= my_thread_var; - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - DBUG_ASSERT(!(block->status & (BLOCK_IN_FLUSH | BLOCK_CHANGED))); - DBUG_ASSERT(block->hash_link); - DBUG_ASSERT(block->hash_link->block == block); - /* Linked in file_blocks or changed_blocks hash. */ - DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); - /* Not linked in LRU ring. */ - DBUG_ASSERT(!block->next_used); - DBUG_ASSERT(!block->prev_used); - while (block->hash_link->requests) - { - KEYCACHE_DBUG_PRINT("wait_for_readers: wait", - ("suspend thread %ld block %u", - thread->id, BLOCK_NUMBER(block))); - /* There must be no other waiter. We have no queue here. */ - DBUG_ASSERT(!block->condvar); - block->condvar= &thread->suspend; - keycache_pthread_cond_wait(&thread->suspend, &keycache->cache_lock); - block->condvar= NULL; - } -#else - KEYCACHE_DBUG_ASSERT(block->hash_link->requests == 0); -#endif -} - - -/* - Add a hash link to a bucket in the hash_table -*/ - -static inline void link_hash(HASH_LINK **start, HASH_LINK *hash_link) -{ - if (*start) - (*start)->prev= &hash_link->next; - hash_link->next= *start; - hash_link->prev= start; - *start= hash_link; -} - - -/* - Remove a hash link from the hash table -*/ - -static void unlink_hash(KEY_CACHE *keycache, HASH_LINK *hash_link) -{ - KEYCACHE_DBUG_PRINT("unlink_hash", ("fd: %u pos_ %lu #requests=%u", - (uint) hash_link->file,(ulong) hash_link->diskpos, hash_link->requests)); - KEYCACHE_DBUG_ASSERT(hash_link->requests == 0); - if ((*hash_link->prev= hash_link->next)) - hash_link->next->prev= hash_link->prev; - hash_link->block= NULL; -#ifdef THREAD - if (keycache->waiting_for_hash_link.last_thread) - { - /* Signal that a free hash link has appeared */ - struct st_my_thread_var *last_thread= - keycache->waiting_for_hash_link.last_thread; - struct st_my_thread_var *first_thread= last_thread->next; - struct st_my_thread_var *next_thread= first_thread; - KEYCACHE_PAGE *first_page= (KEYCACHE_PAGE *) (first_thread->opt_info); - struct st_my_thread_var *thread; - - hash_link->file= first_page->file; - hash_link->diskpos= first_page->filepos; - do - { - KEYCACHE_PAGE *page; - thread= next_thread; - page= (KEYCACHE_PAGE *) thread->opt_info; - next_thread= thread->next; - /* - We notify about the event all threads that ask - for the same page as the first thread in the queue - */ - if (page->file == hash_link->file && page->filepos == hash_link->diskpos) - { - KEYCACHE_DBUG_PRINT("unlink_hash: signal", ("thread %ld", thread->id)); - keycache_pthread_cond_signal(&thread->suspend); - unlink_from_queue(&keycache->waiting_for_hash_link, thread); - } - } - while (thread != last_thread); - link_hash(&keycache->hash_root[KEYCACHE_HASH(hash_link->file, - hash_link->diskpos)], - hash_link); - return; - } -#else /* THREAD */ - KEYCACHE_DBUG_ASSERT(! (keycache->waiting_for_hash_link.last_thread)); -#endif /* THREAD */ - hash_link->next= keycache->free_hash_list; - keycache->free_hash_list= hash_link; -} - - -/* - Get the hash link for a page -*/ - -static HASH_LINK *get_hash_link(KEY_CACHE *keycache, - int file, my_off_t filepos) -{ - reg1 HASH_LINK *hash_link, **start; -#if defined(KEYCACHE_DEBUG) - int cnt; -#endif - - KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u pos: %lu", - (uint) file,(ulong) filepos)); - -restart: - /* - Find the bucket in the hash table for the pair (file, filepos); - start contains the head of the bucket list, - hash_link points to the first member of the list - */ - hash_link= *(start= &keycache->hash_root[KEYCACHE_HASH(file, filepos)]); -#if defined(KEYCACHE_DEBUG) - cnt= 0; -#endif - /* Look for an element for the pair (file, filepos) in the bucket chain */ - while (hash_link && - (hash_link->diskpos != filepos || hash_link->file != file)) - { - hash_link= hash_link->next; -#if defined(KEYCACHE_DEBUG) - cnt++; - if (! (cnt <= keycache->hash_links_used)) - { - int i; - for (i=0, hash_link= *start ; - i < cnt ; i++, hash_link= hash_link->next) - { - KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u pos: %lu", - (uint) hash_link->file,(ulong) hash_link->diskpos)); - } - } - KEYCACHE_DBUG_ASSERT(cnt <= keycache->hash_links_used); -#endif - } - if (! hash_link) - { - /* There is no hash link in the hash table for the pair (file, filepos) */ - if (keycache->free_hash_list) - { - hash_link= keycache->free_hash_list; - keycache->free_hash_list= hash_link->next; - } - else if (keycache->hash_links_used < keycache->hash_links) - { - hash_link= &keycache->hash_link_root[keycache->hash_links_used++]; - } - else - { -#ifdef THREAD - /* Wait for a free hash link */ - struct st_my_thread_var *thread= my_thread_var; - KEYCACHE_PAGE page; - KEYCACHE_DBUG_PRINT("get_hash_link", ("waiting")); - page.file= file; - page.filepos= filepos; - thread->opt_info= (void *) &page; - link_into_queue(&keycache->waiting_for_hash_link, thread); - KEYCACHE_DBUG_PRINT("get_hash_link: wait", - ("suspend thread %ld", thread->id)); - keycache_pthread_cond_wait(&thread->suspend, - &keycache->cache_lock); - thread->opt_info= NULL; -#else - KEYCACHE_DBUG_ASSERT(0); -#endif - goto restart; - } - hash_link->file= file; - hash_link->diskpos= filepos; - link_hash(start, hash_link); - } - /* Register the request for the page */ - hash_link->requests++; - - return hash_link; -} - - -/* - Get a block for the file page requested by a keycache read/write operation; - If the page is not in the cache return a free block, if there is none - return the lru block after saving its buffer if the page is dirty. - - SYNOPSIS - - find_key_block() - keycache pointer to a key cache data structure - file handler for the file to read page from - filepos position of the page in the file - init_hits_left how initialize the block counter for the page - wrmode <-> get for writing - page_st out {PAGE_READ,PAGE_TO_BE_READ,PAGE_WAIT_TO_BE_READ} - - RETURN VALUE - Pointer to the found block if successful, 0 - otherwise - - NOTES. - For the page from file positioned at filepos the function checks whether - the page is in the key cache specified by the first parameter. - If this is the case it immediately returns the block. - If not, the function first chooses a block for this page. If there is - no not used blocks in the key cache yet, the function takes the block - at the very beginning of the warm sub-chain. It saves the page in that - block if it's dirty before returning the pointer to it. - The function returns in the page_st parameter the following values: - PAGE_READ - if page already in the block, - PAGE_TO_BE_READ - if it is to be read yet by the current thread - WAIT_TO_BE_READ - if it is to be read by another thread - If an error occurs THE BLOCK_ERROR bit is set in the block status. - It might happen that there are no blocks in LRU chain (in warm part) - - all blocks are unlinked for some read/write operations. Then the function - waits until first of this operations links any block back. -*/ - -static BLOCK_LINK *find_key_block(KEY_CACHE *keycache, - File file, my_off_t filepos, - int init_hits_left, - int wrmode, int *page_st) -{ - HASH_LINK *hash_link; - BLOCK_LINK *block; - int error= 0; - int page_status; - - DBUG_ENTER("find_key_block"); - KEYCACHE_THREAD_TRACE("find_key_block:begin"); - DBUG_PRINT("enter", ("fd: %d pos: %lu wrmode: %d", - file, (ulong) filepos, wrmode)); - KEYCACHE_DBUG_PRINT("find_key_block", ("fd: %d pos: %lu wrmode: %d", - file, (ulong) filepos, - wrmode)); -#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG) - DBUG_EXECUTE("check_keycache2", - test_key_cache(keycache, "start of find_key_block", 0);); -#endif - -restart: - /* - If the flush phase of a resize operation fails, the cache is left - unusable. This will be detected only after "goto restart". - */ - if (!keycache->can_be_used) - DBUG_RETURN(0); - - /* - Find the hash_link for the requested file block (file, filepos). We - do always get a hash_link here. It has registered our request so - that no other thread can use it for another file block until we - release the request (which is done by remove_reader() usually). The - hash_link can have a block assigned to it or not. If there is a - block, it may be assigned to this hash_link or not. In cases where a - block is evicted from the cache, it is taken from the LRU ring and - referenced by the new hash_link. But the block can still be assigned - to its old hash_link for some time if it needs to be flushed first, - or if there are other threads still reading it. - - Summary: - hash_link is always returned. - hash_link->block can be: - - NULL or - - not assigned to this hash_link or - - assigned to this hash_link. If assigned, the block can have - - invalid data (when freshly assigned) or - - valid data. Valid data can be - - changed over the file contents (dirty) or - - not changed (clean). - */ - hash_link= get_hash_link(keycache, file, filepos); - DBUG_ASSERT((hash_link->file == file) && (hash_link->diskpos == filepos)); - - page_status= -1; - if ((block= hash_link->block) && - block->hash_link == hash_link && (block->status & BLOCK_READ)) - { - /* Assigned block with valid (changed or unchanged) contents. */ - page_status= PAGE_READ; - } - /* - else (page_status == -1) - - block == NULL or - - block not assigned to this hash_link or - - block assigned but not yet read from file (invalid data). - */ - - if (keycache->in_resize) - { - /* This is a request during a resize operation */ - - if (!block) - { - struct st_my_thread_var *thread; - - /* - The file block is not in the cache. We don't need it in the - cache: we are going to read or write directly to file. Cancel - the request. We can simply decrement hash_link->requests because - we did not release cache_lock since increasing it. So no other - thread can wait for our request to become released. - */ - if (hash_link->requests == 1) - { - /* - We are the only one to request this hash_link (this file/pos). - Free the hash_link. - */ - hash_link->requests--; - unlink_hash(keycache, hash_link); - DBUG_RETURN(0); - } - - /* - More requests on the hash_link. Someone tries to evict a block - for this hash_link (could have started before resizing started). - This means that the LRU ring is empty. Otherwise a block could - be assigned immediately. Behave like a thread that wants to - evict a block for this file/pos. Add to the queue of threads - waiting for a block. Wait until there is one assigned. - - Refresh the request on the hash-link so that it cannot be reused - for another file/pos. - */ - thread= my_thread_var; - thread->opt_info= (void *) hash_link; - link_into_queue(&keycache->waiting_for_block, thread); - do - { - KEYCACHE_DBUG_PRINT("find_key_block: wait", - ("suspend thread %ld", thread->id)); - keycache_pthread_cond_wait(&thread->suspend, - &keycache->cache_lock); - } while (thread->next); - thread->opt_info= NULL; - /* - A block should now be assigned to the hash_link. But it may - still need to be evicted. Anyway, we should re-check the - situation. page_status must be set correctly. - */ - hash_link->requests--; - goto restart; - } /* end of if (!block) */ - - /* - There is a block for this file/pos in the cache. Register a - request on it. This unlinks it from the LRU ring (if it is there) - and hence protects it against eviction (if not already in - eviction). We need this for returning the block to the caller, for - calling remove_reader() (for debugging purposes), and for calling - free_block(). The only case where we don't need the request is if - the block is in eviction. In that case we have to unregister the - request later. - */ - reg_requests(keycache, block, 1); - - if (page_status != PAGE_READ) - { - /* - - block not assigned to this hash_link or - - block assigned but not yet read from file (invalid data). - - This must be a block in eviction. It will be read soon. We need - to wait here until this happened. Otherwise the caller could - access a wrong block or a block which is in read. While waiting - we cannot lose hash_link nor block. We have registered a request - on the hash_link. Everything can happen to the block but changes - in the hash_link -> block relationship. In other words: - everything can happen to the block but free or another completed - eviction. - - Note that we bahave like a secondary requestor here. We just - cannot return with PAGE_WAIT_TO_BE_READ. This would work for - read requests and writes on dirty blocks that are not in flush - only. Waiting here on COND_FOR_REQUESTED works in all - situations. - */ - DBUG_ASSERT(((block->hash_link != hash_link) && - (block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH))) || - ((block->hash_link == hash_link) && - !(block->status & BLOCK_READ))); - wait_on_queue(&block->wqueue[COND_FOR_REQUESTED], &keycache->cache_lock); - /* - Here we can trust that the block has been assigned to this - hash_link (block->hash_link == hash_link) and read into the - buffer (BLOCK_READ). The worst things possible here are that the - block is in free (BLOCK_REASSIGNED). But the block is still - assigned to the hash_link. The freeing thread waits until we - release our request on the hash_link. The block must not be - again in eviction because we registered an request on it before - starting to wait. - */ - DBUG_ASSERT(block->hash_link == hash_link); - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - DBUG_ASSERT(!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH))); - } - /* - The block is in the cache. Assigned to the hash_link. Valid data. - Note that in case of page_st == PAGE_READ, the block can be marked - for eviction. In any case it can be marked for freeing. - */ - - if (!wrmode) - { - /* A reader can just read the block. */ - *page_st= PAGE_READ; - DBUG_ASSERT((hash_link->file == file) && - (hash_link->diskpos == filepos) && - (block->hash_link == hash_link)); - DBUG_RETURN(block); - } - - /* - This is a writer. No two writers for the same block can exist. - This must be assured by locks outside of the key cache. - */ - DBUG_ASSERT(!(block->status & BLOCK_FOR_UPDATE) || fail_block(block)); - - while (block->status & BLOCK_IN_FLUSH) - { - /* - Wait until the block is flushed to file. Do not release the - request on the hash_link yet to prevent that the block is freed - or reassigned while we wait. While we wait, several things can - happen to the block, including another flush. But the block - cannot be reassigned to another hash_link until we release our - request on it. But it can be marked BLOCK_REASSIGNED from free - or eviction, while they wait for us to release the hash_link. - */ - wait_on_queue(&block->wqueue[COND_FOR_SAVED], &keycache->cache_lock); - /* - If the flush phase failed, the resize could have finished while - we waited here. - */ - if (!keycache->in_resize) - { - remove_reader(block); - unreg_request(keycache, block, 1); - goto restart; - } - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - DBUG_ASSERT(!(block->status & BLOCK_FOR_UPDATE) || fail_block(block)); - DBUG_ASSERT(block->hash_link == hash_link); - } - - if (block->status & BLOCK_CHANGED) - { - /* - We want to write a block with changed contents. If the cache - block size is bigger than the callers block size (e.g. MyISAM), - the caller may replace part of the block only. Changes of the - other part of the block must be preserved. Since the block has - not yet been selected for flush, we can still add our changes. - */ - *page_st= PAGE_READ; - DBUG_ASSERT((hash_link->file == file) && - (hash_link->diskpos == filepos) && - (block->hash_link == hash_link)); - DBUG_RETURN(block); - } - - /* - This is a write request for a clean block. We do not want to have - new dirty blocks in the cache while resizing. We will free the - block and write directly to file. If the block is in eviction or - in free, we just let it go. - - Unregister from the hash_link. This must be done before freeing - the block. And it must be done if not freeing the block. Because - we could have waited above, we need to call remove_reader(). Other - threads could wait for us to release our request on the hash_link. - */ - remove_reader(block); - - /* If the block is not in eviction and not in free, we can free it. */ - if (!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | - BLOCK_REASSIGNED))) - { - /* - Free block as we are going to write directly to file. - Although we have an exlusive lock for the updated key part, - the control can be yielded by the current thread as we might - have unfinished readers of other key parts in the block - buffer. Still we are guaranteed not to have any readers - of the key part we are writing into until the block is - removed from the cache as we set the BLOCK_REASSIGNED - flag (see the code below that handles reading requests). - */ - free_block(keycache, block); - } - else - { - /* - The block will be evicted/freed soon. Don't touch it in any way. - Unregister the request that we registered above. - */ - unreg_request(keycache, block, 1); - - /* - The block is still assigned to the hash_link (the file/pos that - we are going to write to). Wait until the eviction/free is - complete. Otherwise the direct write could complete before all - readers are done with the block. So they could read outdated - data. - - Since we released our request on the hash_link, it can be reused - for another file/pos. Hence we cannot just check for - block->hash_link == hash_link. As long as the resize is - proceeding the block cannot be reassigned to the same file/pos - again. So we can terminate the loop when the block is no longer - assigned to this file/pos. - */ - do - { - wait_on_queue(&block->wqueue[COND_FOR_SAVED], - &keycache->cache_lock); - /* - If the flush phase failed, the resize could have finished - while we waited here. - */ - if (!keycache->in_resize) - goto restart; - } while (block->hash_link && - (block->hash_link->file == file) && - (block->hash_link->diskpos == filepos)); - } - DBUG_RETURN(0); - } - - if (page_status == PAGE_READ && - (block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | - BLOCK_REASSIGNED))) - { - /* - This is a request for a block to be removed from cache. The block - is assigned to this hash_link and contains valid data, but is - marked for eviction or to be freed. Possible reasons why it has - not yet been evicted/freed can be a flush before reassignment - (BLOCK_IN_SWITCH), readers of the block have not finished yet - (BLOCK_REASSIGNED), or the evicting thread did not yet awake after - the block has been selected for it (BLOCK_IN_EVICTION). - */ - - KEYCACHE_DBUG_PRINT("find_key_block", - ("request for old page in block %u " - "wrmode: %d block->status: %d", - BLOCK_NUMBER(block), wrmode, block->status)); - /* - Only reading requests can proceed until the old dirty page is flushed, - all others are to be suspended, then resubmitted - */ - if (!wrmode && !(block->status & BLOCK_REASSIGNED)) - { - /* - This is a read request and the block not yet reassigned. We can - register our request and proceed. This unlinks the block from - the LRU ring and protects it against eviction. - */ - reg_requests(keycache, block, 1); - } - else - { - /* - Either this is a write request for a block that is in eviction - or in free. We must not use it any more. Instead we must evict - another block. But we cannot do this before the eviction/free is - done. Otherwise we would find the same hash_link + block again - and again. - - Or this is a read request for a block in eviction/free that does - not require a flush, but waits for readers to finish with the - block. We do not read this block to let the eviction/free happen - as soon as possible. Again we must wait so that we don't find - the same hash_link + block again and again. - */ - DBUG_ASSERT(hash_link->requests); - hash_link->requests--; - KEYCACHE_DBUG_PRINT("find_key_block", - ("request waiting for old page to be saved")); - wait_on_queue(&block->wqueue[COND_FOR_SAVED], &keycache->cache_lock); - KEYCACHE_DBUG_PRINT("find_key_block", - ("request for old page resubmitted")); - /* - The block is no longer assigned to this hash_link. - Get another one. - */ - goto restart; - } - } - else - { - /* - This is a request for a new block or for a block not to be removed. - Either - - block == NULL or - - block not assigned to this hash_link or - - block assigned but not yet read from file, - or - - block assigned with valid (changed or unchanged) data and - - it will not be reassigned/freed. - */ - if (! block) - { - /* No block is assigned to the hash_link yet. */ - if (keycache->blocks_unused) - { - if (keycache->free_block_list) - { - /* There is a block in the free list. */ - block= keycache->free_block_list; - keycache->free_block_list= block->next_used; - block->next_used= NULL; - } - else - { - size_t block_mem_offset; - /* There are some never used blocks, take first of them */ - DBUG_ASSERT(keycache->blocks_used < - (ulong) keycache->disk_blocks); - block= &keycache->block_root[keycache->blocks_used]; - block_mem_offset= - ((size_t) keycache->blocks_used) * keycache->key_cache_block_size; - block->buffer= ADD_TO_PTR(keycache->block_mem, - block_mem_offset, - uchar*); - keycache->blocks_used++; - DBUG_ASSERT(!block->next_used); - } - DBUG_ASSERT(!block->prev_used); - DBUG_ASSERT(!block->next_changed); - DBUG_ASSERT(!block->prev_changed); - DBUG_ASSERT(!block->hash_link); - DBUG_ASSERT(!block->status); - DBUG_ASSERT(!block->requests); - keycache->blocks_unused--; - block->status= BLOCK_IN_USE; - block->length= 0; - block->offset= keycache->key_cache_block_size; - block->requests= 1; - block->temperature= BLOCK_COLD; - block->hits_left= init_hits_left; - block->last_hit_time= 0; - block->hash_link= hash_link; - hash_link->block= block; - link_to_file_list(keycache, block, file, 0); - page_status= PAGE_TO_BE_READ; - KEYCACHE_DBUG_PRINT("find_key_block", - ("got free or never used block %u", - BLOCK_NUMBER(block))); - } - else - { - /* - There are no free blocks and no never used blocks, use a block - from the LRU ring. - */ - -#ifdef THREAD - if (! keycache->used_last) - { - /* - The LRU ring is empty. Wait until a new block is added to - it. Several threads might wait here for the same hash_link, - all of them must get the same block. While waiting for a - block, after a block is selected for this hash_link, other - threads can run first before this one awakes. During this - time interval other threads find this hash_link pointing to - the block, which is still assigned to another hash_link. In - this case the block is not marked BLOCK_IN_SWITCH yet, but - it is marked BLOCK_IN_EVICTION. - */ - - struct st_my_thread_var *thread= my_thread_var; - thread->opt_info= (void *) hash_link; - link_into_queue(&keycache->waiting_for_block, thread); - do - { - KEYCACHE_DBUG_PRINT("find_key_block: wait", - ("suspend thread %ld", thread->id)); - keycache_pthread_cond_wait(&thread->suspend, - &keycache->cache_lock); - } - while (thread->next); - thread->opt_info= NULL; - /* Assert that block has a request registered. */ - DBUG_ASSERT(hash_link->block->requests); - /* Assert that block is not in LRU ring. */ - DBUG_ASSERT(!hash_link->block->next_used); - DBUG_ASSERT(!hash_link->block->prev_used); - } -#else - KEYCACHE_DBUG_ASSERT(keycache->used_last); -#endif - /* - If we waited above, hash_link->block has been assigned by - link_block(). Otherwise it is still NULL. In the latter case - we need to grab a block from the LRU ring ourselves. - */ - block= hash_link->block; - if (! block) - { - /* Select the last block from the LRU ring. */ - block= keycache->used_last->next_used; - block->hits_left= init_hits_left; - block->last_hit_time= 0; - hash_link->block= block; - /* - Register a request on the block. This unlinks it from the - LRU ring and protects it against eviction. - */ - DBUG_ASSERT(!block->requests); - reg_requests(keycache, block,1); - /* - We do not need to set block->status|= BLOCK_IN_EVICTION here - because we will set block->status|= BLOCK_IN_SWITCH - immediately without releasing the lock in between. This does - also support debugging. When looking at the block, one can - see if the block has been selected by link_block() after the - LRU ring was empty, or if it was grabbed directly from the - LRU ring in this branch. - */ - } - - /* - If we had to wait above, there is a small chance that another - thread grabbed this block for the same file block already. But - in most cases the first condition is true. - */ - if (block->hash_link != hash_link && - ! (block->status & BLOCK_IN_SWITCH) ) - { - /* this is a primary request for a new page */ - block->status|= BLOCK_IN_SWITCH; - - KEYCACHE_DBUG_PRINT("find_key_block", - ("got block %u for new page", BLOCK_NUMBER(block))); - - if (block->status & BLOCK_CHANGED) - { - /* The block contains a dirty page - push it out of the cache */ - - KEYCACHE_DBUG_PRINT("find_key_block", ("block is dirty")); - if (block->status & BLOCK_IN_FLUSH) - { - /* - The block is marked for flush. If we do not wait here, - it could happen that we write the block, reassign it to - another file block, then, before the new owner can read - the new file block, the flusher writes the cache block - (which still has the old contents) to the new file block! - */ - wait_on_queue(&block->wqueue[COND_FOR_SAVED], - &keycache->cache_lock); - /* - The block is marked BLOCK_IN_SWITCH. It should be left - alone except for reading. No free, no write. - */ - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - DBUG_ASSERT(!(block->status & (BLOCK_REASSIGNED | - BLOCK_CHANGED | - BLOCK_FOR_UPDATE))); - } - else - { - block->status|= BLOCK_IN_FLUSH | BLOCK_IN_FLUSHWRITE; - /* - BLOCK_IN_EVICTION may be true or not. Other flags must - have a fixed value. - */ - DBUG_ASSERT((block->status & ~BLOCK_IN_EVICTION) == - (BLOCK_READ | BLOCK_IN_SWITCH | - BLOCK_IN_FLUSH | BLOCK_IN_FLUSHWRITE | - BLOCK_CHANGED | BLOCK_IN_USE)); - DBUG_ASSERT(block->hash_link); - - keycache_pthread_mutex_unlock(&keycache->cache_lock); - /* - The call is thread safe because only the current - thread might change the block->hash_link value - */ - error= key_cache_pwrite(block->hash_link->file, - block->buffer + block->offset, - block->length - block->offset, - block->hash_link->diskpos + - block->offset, - MYF(MY_NABP | MY_WAIT_IF_FULL), - keycache->post_write, - block->post_write_arg); - keycache_pthread_mutex_lock(&keycache->cache_lock); - - /* Block status must not have changed. */ - DBUG_ASSERT((block->status & ~BLOCK_IN_EVICTION) == - (BLOCK_READ | BLOCK_IN_SWITCH | - BLOCK_IN_FLUSH | BLOCK_IN_FLUSHWRITE | - BLOCK_CHANGED | BLOCK_IN_USE) || fail_block(block)); - keycache->global_cache_write++; - } - } - - block->status|= BLOCK_REASSIGNED; - /* - The block comes from the LRU ring. It must have a hash_link - assigned. - */ - DBUG_ASSERT(block->hash_link); - if (block->hash_link) - { - /* - All pending requests for this page must be resubmitted. - This must be done before waiting for readers. They could - wait for the flush to complete. And we must also do it - after the wait. Flushers might try to free the block while - we wait. They would wait until the reassignment is - complete. Also the block status must reflect the correct - situation: The block is not changed nor in flush any more. - Note that we must not change the BLOCK_CHANGED flag - outside of link_to_file_list() so that it is always in the - correct queue and the *blocks_changed counters are - correct. - */ - block->status&= ~(BLOCK_IN_FLUSH | BLOCK_IN_FLUSHWRITE); - link_to_file_list(keycache, block, block->hash_link->file, 1); - release_whole_queue(&block->wqueue[COND_FOR_SAVED]); - /* - The block is still assigned to its old hash_link. - Wait until all pending read requests - for this page are executed - (we could have avoided this waiting, if we had read - a page in the cache in a sweep, without yielding control) - */ - wait_for_readers(keycache, block); - DBUG_ASSERT(block->hash_link && block->hash_link->block == block && - block->prev_changed); - /* The reader must not have been a writer. */ - DBUG_ASSERT(!(block->status & BLOCK_CHANGED)); - - /* Wake flushers that might have found the block in between. */ - release_whole_queue(&block->wqueue[COND_FOR_SAVED]); - - /* Remove the hash link for the old file block from the hash. */ - unlink_hash(keycache, block->hash_link); - - /* - For sanity checks link_to_file_list() asserts that block - and hash_link refer to each other. Hence we need to assign - the hash_link first, but then we would not know if it was - linked before. Hence we would not know if to unlink it. So - unlink it here and call link_to_file_list(..., FALSE). - */ - unlink_changed(block); - } - block->status= error ? BLOCK_ERROR : BLOCK_IN_USE ; - block->length= 0; - block->offset= keycache->key_cache_block_size; - block->hash_link= hash_link; - link_to_file_list(keycache, block, file, 0); - page_status= PAGE_TO_BE_READ; - - KEYCACHE_DBUG_ASSERT(block->hash_link->block == block); - KEYCACHE_DBUG_ASSERT(hash_link->block->hash_link == hash_link); - } - else - { - /* - Either (block->hash_link == hash_link), - or (block->status & BLOCK_IN_SWITCH). - - This is for secondary requests for a new file block only. - Either it is already assigned to the new hash_link meanwhile - (if we had to wait due to empty LRU), or it is already in - eviction by another thread. Since this block has been - grabbed from the LRU ring and attached to this hash_link, - another thread cannot grab the same block from the LRU ring - anymore. If the block is in eviction already, it must become - attached to the same hash_link and as such destined for the - same file block. - */ - KEYCACHE_DBUG_PRINT("find_key_block", - ("block->hash_link: %p hash_link: %p " - "block->status: %u", block->hash_link, - hash_link, block->status )); - page_status= (((block->hash_link == hash_link) && - (block->status & BLOCK_READ)) ? - PAGE_READ : PAGE_WAIT_TO_BE_READ); - } - } - } - else - { - /* - Block is not NULL. This hash_link points to a block. - Either - - block not assigned to this hash_link (yet) or - - block assigned but not yet read from file, - or - - block assigned with valid (changed or unchanged) data and - - it will not be reassigned/freed. - - The first condition means hash_link points to a block in - eviction. This is not necessarily marked by BLOCK_IN_SWITCH yet. - But then it is marked BLOCK_IN_EVICTION. See the NOTE in - link_block(). In both cases it is destined for this hash_link - and its file block address. When this hash_link got its block - address, the block was removed from the LRU ring and cannot be - selected for eviction (for another hash_link) again. - - Register a request on the block. This is another protection - against eviction. - */ - DBUG_ASSERT(((block->hash_link != hash_link) && - (block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH))) || - ((block->hash_link == hash_link) && - !(block->status & BLOCK_READ)) || - ((block->status & BLOCK_READ) && - !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH)))); - reg_requests(keycache, block, 1); - KEYCACHE_DBUG_PRINT("find_key_block", - ("block->hash_link: %p hash_link: %p " - "block->status: %u", block->hash_link, - hash_link, block->status )); - page_status= (((block->hash_link == hash_link) && - (block->status & BLOCK_READ)) ? - PAGE_READ : PAGE_WAIT_TO_BE_READ); - } - } - - KEYCACHE_DBUG_ASSERT(page_status != -1); - /* Same assert basically, but be very sure. */ - KEYCACHE_DBUG_ASSERT(block); - /* Assert that block has a request and is not in LRU ring. */ - DBUG_ASSERT(block->requests); - DBUG_ASSERT(!block->next_used); - DBUG_ASSERT(!block->prev_used); - /* Assert that we return the correct block. */ - DBUG_ASSERT((page_status == PAGE_WAIT_TO_BE_READ) || - ((block->hash_link->file == file) && - (block->hash_link->diskpos == filepos))); - *page_st=page_status; - KEYCACHE_DBUG_PRINT("find_key_block", - ("fd: %d pos: %lu block->status: %u page_status: %d", - file, (ulong) filepos, block->status, - page_status)); - -#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG) - DBUG_EXECUTE("check_keycache2", - test_key_cache(keycache, "end of find_key_block",0);); -#endif - KEYCACHE_THREAD_TRACE("find_key_block:end"); - DBUG_RETURN(block); -} - - -/* - Read into a key cache block buffer from disk. - - SYNOPSIS - - read_block() - keycache pointer to a key cache data structure - block block to which buffer the data is to be read - read_length size of data to be read - min_length at least so much data must be read - primary <-> the current thread will read the data - - RETURN VALUE - None - - NOTES. - The function either reads a page data from file to the block buffer, - or waits until another thread reads it. What page to read is determined - by a block parameter - reference to a hash link for this page. - If an error occurs THE BLOCK_ERROR bit is set in the block status. - We do not report error when the size of successfully read - portion is less than read_length, but not less than min_length. -*/ - -static void read_block(KEY_CACHE *keycache, - BLOCK_LINK *block, uint read_length, - uint min_length, my_bool primary) -{ - uint got_length; - - /* On entry cache_lock is locked */ - - KEYCACHE_THREAD_TRACE("read_block"); - if (primary) - { - /* - This code is executed only by threads that submitted primary - requests. Until block->status contains BLOCK_READ, all other - request for the block become secondary requests. For a primary - request the block must be properly initialized. - */ - DBUG_ASSERT(((block->status & ~BLOCK_FOR_UPDATE) == BLOCK_IN_USE) || - fail_block(block)); - DBUG_ASSERT((block->length == 0) || fail_block(block)); - DBUG_ASSERT((block->offset == keycache->key_cache_block_size) || - fail_block(block)); - DBUG_ASSERT((block->requests > 0) || fail_block(block)); - - KEYCACHE_DBUG_PRINT("read_block", - ("page to be read by primary request")); - - keycache->global_cache_read++; - /* Page is not in buffer yet, is to be read from disk */ - keycache_pthread_mutex_unlock(&keycache->cache_lock); - /* - Here other threads may step in and register as secondary readers. - They will register in block->wqueue[COND_FOR_REQUESTED]. - */ - got_length= my_pread(block->hash_link->file, block->buffer, - read_length, block->hash_link->diskpos, MYF(0)); - keycache_pthread_mutex_lock(&keycache->cache_lock); - /* - The block can now have been marked for free (in case of - FLUSH_RELEASE). Otherwise the state must be unchanged. - */ - DBUG_ASSERT(((block->status & ~(BLOCK_REASSIGNED | - BLOCK_FOR_UPDATE)) == BLOCK_IN_USE) || - fail_block(block)); - DBUG_ASSERT((block->length == 0) || fail_block(block)); - DBUG_ASSERT((block->offset == keycache->key_cache_block_size) || - fail_block(block)); - DBUG_ASSERT((block->requests > 0) || fail_block(block)); - - if (got_length < min_length) - block->status|= BLOCK_ERROR; - else - { - block->status|= BLOCK_READ; - block->length= got_length; - /* - Do not set block->offset here. If this block is marked - BLOCK_CHANGED later, we want to flush only the modified part. So - only a writer may set block->offset down from - keycache->key_cache_block_size. - */ - } - KEYCACHE_DBUG_PRINT("read_block", - ("primary request: new page in cache")); - /* Signal that all pending requests for this page now can be processed */ - release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]); - } - else - { - /* - This code is executed only by threads that submitted secondary - requests. At this point it could happen that the cache block is - not yet assigned to the hash_link for the requested file block. - But at awake from the wait this should be the case. Unfortunately - we cannot assert this here because we do not know the hash_link - for the requested file block nor the file and position. So we have - to assert this in the caller. - */ - KEYCACHE_DBUG_PRINT("read_block", - ("secondary request waiting for new page to be read")); - wait_on_queue(&block->wqueue[COND_FOR_REQUESTED], &keycache->cache_lock); - KEYCACHE_DBUG_PRINT("read_block", - ("secondary request: new page in cache")); - } -} - - -/* - Read a block of data from a cached file into a buffer; - - SYNOPSIS - - key_cache_read() - keycache pointer to a key cache data structure - file handler for the file for the block of data to be read - filepos position of the block of data in the file - level determines the weight of the data - buff buffer to where the data must be placed - length length of the buffer - block_length length of the block in the key cache buffer - return_buffer return pointer to the key cache buffer with the data - - RETURN VALUE - Returns address from where the data is placed if sucessful, 0 - otherwise. - - NOTES. - The function ensures that a block of data of size length from file - positioned at filepos is in the buffers for some key cache blocks. - Then the function either copies the data into the buffer buff, or, - if return_buffer is TRUE, it just returns the pointer to the key cache - buffer with the data. - Filepos must be a multiple of 'block_length', but it doesn't - have to be a multiple of key_cache_block_size; -*/ - -uchar *key_cache_read(KEY_CACHE *keycache, - File file, my_off_t filepos, int level, - uchar *buff, uint length, - uint block_length __attribute__((unused)), - int return_buffer __attribute__((unused))) -{ - my_bool locked_and_incremented= FALSE; - int error=0; - uchar *start= buff; - DBUG_ENTER("key_cache_read"); - DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", - (uint) file, (ulong) filepos, length)); - - if (keycache->key_cache_inited) - { - /* Key cache is used */ - reg1 BLOCK_LINK *block; - uint read_length; - uint offset; - int page_st; - - /* - When the key cache is once initialized, we use the cache_lock to - reliably distinguish the cases of normal operation, resizing, and - disabled cache. We always increment and decrement - 'cnt_for_resize_op' so that a resizer can wait for pending I/O. - */ - keycache_pthread_mutex_lock(&keycache->cache_lock); - /* - Cache resizing has two phases: Flushing and re-initializing. In - the flush phase read requests are allowed to bypass the cache for - blocks not in the cache. find_key_block() returns NULL in this - case. - - After the flush phase new I/O requests must wait until the - re-initialization is done. The re-initialization can be done only - if no I/O request is in progress. The reason is that - key_cache_block_size can change. With enabled cache, I/O is done - in chunks of key_cache_block_size. Every chunk tries to use a - cache block first. If the block size changes in the middle, a - block could be missed and old data could be read. - */ - while (keycache->in_resize && !keycache->resize_in_flush) - wait_on_queue(&keycache->resize_queue, &keycache->cache_lock); - /* Register the I/O for the next resize. */ - inc_counter_for_resize_op(keycache); - locked_and_incremented= TRUE; - /* Requested data may not always be aligned to cache blocks. */ - offset= (uint) (filepos % keycache->key_cache_block_size); - /* Read data in key_cache_block_size increments */ - do - { - /* Cache could be disabled in a later iteration. */ - - if (!keycache->can_be_used) - { - KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache cannot be used")); - goto no_key_cache; - } - /* Start reading at the beginning of the cache block. */ - filepos-= offset; - /* Do not read beyond the end of the cache block. */ - read_length= length; - set_if_smaller(read_length, keycache->key_cache_block_size-offset); - KEYCACHE_DBUG_ASSERT(read_length > 0); - -#ifndef THREAD - if (block_length > keycache->key_cache_block_size || offset) - return_buffer=0; -#endif - - /* Request the cache block that matches file/pos. */ - keycache->global_cache_r_requests++; - block=find_key_block(keycache, file, filepos, level, 0, &page_st); - if (!block) - { - /* - This happens only for requests submitted during key cache - resize. The block is not in the cache and shall not go in. - Read directly from file. - */ - keycache->global_cache_read++; - keycache_pthread_mutex_unlock(&keycache->cache_lock); - error= (my_pread(file, (uchar*) buff, read_length, - filepos + offset, MYF(MY_NABP)) != 0); - keycache_pthread_mutex_lock(&keycache->cache_lock); - goto next_block; - } - if (!(block->status & BLOCK_ERROR)) - { - if (page_st != PAGE_READ) - { - /* The requested page is to be read into the block buffer */ - read_block(keycache, block, - keycache->key_cache_block_size, read_length+offset, - (my_bool)(page_st == PAGE_TO_BE_READ)); - /* - A secondary request must now have the block assigned to the - requested file block. It does not hurt to check it for - primary requests too. - */ - DBUG_ASSERT(keycache->can_be_used); - DBUG_ASSERT(block->hash_link->file == file); - DBUG_ASSERT(block->hash_link->diskpos == filepos); - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - } - else if (block->length < read_length + offset) - { - /* - Impossible if nothing goes wrong: - this could only happen if we are using a file with - small key blocks and are trying to read outside the file - */ - my_errno= -1; - block->status|= BLOCK_ERROR; - } - } - - /* block status may have added BLOCK_ERROR in the above 'if'. */ - if (!(block->status & BLOCK_ERROR)) - { -#ifndef THREAD - if (! return_buffer) -#endif - { - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); -#if !defined(SERIALIZED_READ_FROM_CACHE) - keycache_pthread_mutex_unlock(&keycache->cache_lock); -#endif - - /* Copy data from the cache buffer */ - if (!(read_length & 511)) - bmove512(buff, block->buffer+offset, read_length); - else - memcpy(buff, block->buffer+offset, (size_t) read_length); - -#if !defined(SERIALIZED_READ_FROM_CACHE) - keycache_pthread_mutex_lock(&keycache->cache_lock); - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); -#endif - } - } - - remove_reader(block); - - /* Error injection for coverage testing. */ - DBUG_EXECUTE_IF("key_cache_read_block_error", - block->status|= BLOCK_ERROR;); - - /* Do not link erroneous blocks into the LRU ring, but free them. */ - if (!(block->status & BLOCK_ERROR)) - { - /* - Link the block into the LRU ring if it's the last submitted - request for the block. This enables eviction for the block. - */ - unreg_request(keycache, block, 1); - } - else - { - free_block(keycache, block); - error= 1; - break; - } - -#ifndef THREAD - /* This is only true if we where able to read everything in one block */ - if (return_buffer) - DBUG_RETURN(block->buffer); -#endif - next_block: - buff+= read_length; - filepos+= read_length+offset; - offset= 0; - - } while ((length-= read_length)); - goto end; - } - KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache not initialized")); - -no_key_cache: - /* Key cache is not used */ - - keycache->global_cache_r_requests++; - keycache->global_cache_read++; - - if (locked_and_incremented) - keycache_pthread_mutex_unlock(&keycache->cache_lock); - if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP))) - error= 1; - if (locked_and_incremented) - keycache_pthread_mutex_lock(&keycache->cache_lock); - -end: - if (locked_and_incremented) - { - dec_counter_for_resize_op(keycache); - keycache_pthread_mutex_unlock(&keycache->cache_lock); - } - DBUG_PRINT("exit", ("error: %d", error )); - DBUG_RETURN(error ? (uchar*) 0 : start); -} - - -/* - Insert a block of file data from a buffer into key cache - - SYNOPSIS - key_cache_insert() - keycache pointer to a key cache data structure - file handler for the file to insert data from - filepos position of the block of data in the file to insert - level determines the weight of the data - buff buffer to read data from - length length of the data in the buffer - - NOTES - This is used by MyISAM to move all blocks from a index file to the key - cache - - RETURN VALUE - 0 if a success, 1 - otherwise. -*/ - -int key_cache_insert(KEY_CACHE *keycache, - File file, my_off_t filepos, int level, - uchar *buff, uint length) -{ - int error= 0; - DBUG_ENTER("key_cache_insert"); - DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", - (uint) file,(ulong) filepos, length)); - - if (keycache->key_cache_inited) - { - /* Key cache is used */ - reg1 BLOCK_LINK *block; - uint read_length; - uint offset; - int page_st; - my_bool locked_and_incremented= FALSE; - - /* - When the keycache is once initialized, we use the cache_lock to - reliably distinguish the cases of normal operation, resizing, and - disabled cache. We always increment and decrement - 'cnt_for_resize_op' so that a resizer can wait for pending I/O. - */ - keycache_pthread_mutex_lock(&keycache->cache_lock); - /* - We do not load index data into a disabled cache nor into an - ongoing resize. - */ - if (!keycache->can_be_used || keycache->in_resize) - goto no_key_cache; - /* Register the pseudo I/O for the next resize. */ - inc_counter_for_resize_op(keycache); - locked_and_incremented= TRUE; - /* Loaded data may not always be aligned to cache blocks. */ - offset= (uint) (filepos % keycache->key_cache_block_size); - /* Load data in key_cache_block_size increments. */ - do - { - /* Cache could be disabled or resizing in a later iteration. */ - if (!keycache->can_be_used || keycache->in_resize) - goto no_key_cache; - /* Start loading at the beginning of the cache block. */ - filepos-= offset; - /* Do not load beyond the end of the cache block. */ - read_length= length; - set_if_smaller(read_length, keycache->key_cache_block_size-offset); - KEYCACHE_DBUG_ASSERT(read_length > 0); - - /* The block has been read by the caller already. */ - keycache->global_cache_read++; - /* Request the cache block that matches file/pos. */ - keycache->global_cache_r_requests++; - block= find_key_block(keycache, file, filepos, level, 0, &page_st); - if (!block) - { - /* - This happens only for requests submitted during key cache - resize. The block is not in the cache and shall not go in. - Stop loading index data. - */ - goto no_key_cache; - } - if (!(block->status & BLOCK_ERROR)) - { - if ((page_st == PAGE_WAIT_TO_BE_READ) || - ((page_st == PAGE_TO_BE_READ) && - (offset || (read_length < keycache->key_cache_block_size)))) - { - /* - Either - - this is a secondary request for a block to be read into the - cache. The block is in eviction. It is not yet assigned to - the requested file block (It does not point to the right - hash_link). So we cannot call remove_reader() on the block. - And we cannot access the hash_link directly here. We need to - wait until the assignment is complete. read_block() executes - the correct wait when called with primary == FALSE. - - Or - - this is a primary request for a block to be read into the - cache and the supplied data does not fill the whole block. - - This function is called on behalf of a LOAD INDEX INTO CACHE - statement, which is a read-only task and allows other - readers. It is possible that a parallel running reader tries - to access this block. If it needs more data than has been - supplied here, it would report an error. To be sure that we - have all data in the block that is available in the file, we - read the block ourselves. - - Though reading again what the caller did read already is an - expensive operation, we need to do this for correctness. - */ - read_block(keycache, block, keycache->key_cache_block_size, - read_length + offset, (page_st == PAGE_TO_BE_READ)); - /* - A secondary request must now have the block assigned to the - requested file block. It does not hurt to check it for - primary requests too. - */ - DBUG_ASSERT(keycache->can_be_used); - DBUG_ASSERT(block->hash_link->file == file); - DBUG_ASSERT(block->hash_link->diskpos == filepos); - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - } - else if (page_st == PAGE_TO_BE_READ) - { - /* - This is a new block in the cache. If we come here, we have - data for the whole block. - */ - DBUG_ASSERT(block->hash_link->requests); - DBUG_ASSERT(block->status & BLOCK_IN_USE); - DBUG_ASSERT((page_st == PAGE_TO_BE_READ) || - (block->status & BLOCK_READ)); - -#if !defined(SERIALIZED_READ_FROM_CACHE) - keycache_pthread_mutex_unlock(&keycache->cache_lock); - /* - Here other threads may step in and register as secondary readers. - They will register in block->wqueue[COND_FOR_REQUESTED]. - */ -#endif - - /* Copy data from buff */ - if (!(read_length & 511)) - bmove512(block->buffer+offset, buff, read_length); - else - memcpy(block->buffer+offset, buff, (size_t) read_length); - -#if !defined(SERIALIZED_READ_FROM_CACHE) - keycache_pthread_mutex_lock(&keycache->cache_lock); - DBUG_ASSERT(block->status & BLOCK_IN_USE); - DBUG_ASSERT((page_st == PAGE_TO_BE_READ) || - (block->status & BLOCK_READ)); -#endif - /* - After the data is in the buffer, we can declare the block - valid. Now other threads do not need to register as - secondary readers any more. They can immediately access the - block. - */ - block->status|= BLOCK_READ; - block->length= read_length+offset; - /* - Do not set block->offset here. If this block is marked - BLOCK_CHANGED later, we want to flush only the modified part. So - only a writer may set block->offset down from - keycache->key_cache_block_size. - */ - KEYCACHE_DBUG_PRINT("key_cache_insert", - ("primary request: new page in cache")); - /* Signal all pending requests. */ - release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]); - } - else - { - /* - page_st == PAGE_READ. The block is in the buffer. All data - must already be present. Blocks are always read with all - data available on file. Assert that the block does not have - less contents than the preloader supplies. If the caller has - data beyond block->length, it means that a file write has - been done while this block was in cache and not extended - with the new data. If the condition is met, we can simply - ignore the block. - */ - DBUG_ASSERT((page_st == PAGE_READ) && - (read_length + offset <= block->length)); - } - - /* - A secondary request must now have the block assigned to the - requested file block. It does not hurt to check it for primary - requests too. - */ - DBUG_ASSERT(block->hash_link->file == file); - DBUG_ASSERT(block->hash_link->diskpos == filepos); - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - } /* end of if (!(block->status & BLOCK_ERROR)) */ - - - remove_reader(block); - - /* Error injection for coverage testing. */ - DBUG_EXECUTE_IF("key_cache_insert_block_error", - block->status|= BLOCK_ERROR; errno=EIO;); - - /* Do not link erroneous blocks into the LRU ring, but free them. */ - if (!(block->status & BLOCK_ERROR)) - { - /* - Link the block into the LRU ring if it's the last submitted - request for the block. This enables eviction for the block. - */ - unreg_request(keycache, block, 1); - } - else - { - free_block(keycache, block); - error= 1; - break; - } - - buff+= read_length; - filepos+= read_length+offset; - offset= 0; - - } while ((length-= read_length)); - - no_key_cache: - if (locked_and_incremented) - dec_counter_for_resize_op(keycache); - keycache_pthread_mutex_unlock(&keycache->cache_lock); - } - DBUG_RETURN(error); -} - - -/* - Write a buffer into a cached file. - - SYNOPSIS - - key_cache_write() - keycache pointer to a key cache data structure - file handler for the file to write data to - filepos position in the file to write data to - level determines the weight of the data - buff buffer with the data - length length of the buffer - dont_write if is 0 then all dirty pages involved in writing - should have been flushed from key cache - post_write_arg argument which will be passed to key cache's - post_write callback - - RETURN VALUE - 0 if a success, 1 - otherwise. - - NOTES. - The function copies the data of size length from buff into buffers - for key cache blocks that are assigned to contain the portion of - the file starting with position filepos. - It ensures that this data is flushed to the file if dont_write is FALSE. - Filepos must be a multiple of 'block_length', but it doesn't - have to be a multiple of key_cache_block_size; - - dont_write is always TRUE in the server (info->lock_type is never F_UNLCK). -*/ - -int key_cache_write(KEY_CACHE *keycache, - File file, my_off_t filepos, int level, - uchar *buff, uint length, - uint block_length __attribute__((unused)), - int dont_write, - void *post_write_arg) -{ - my_bool locked_and_incremented= FALSE; - int error=0; - DBUG_ENTER("key_cache_write"); - DBUG_PRINT("enter", - ("fd: %u pos: %lu length: %u block_length: %u" - " key_block_length: %u", - (uint) file, (ulong) filepos, length, block_length, - keycache ? keycache->key_cache_block_size : 0)); - - if (!dont_write) - { - /* purecov: begin inspected */ - /* Not used in the server. */ - /* Force writing from buff into disk. */ - keycache->global_cache_w_requests++; - keycache->global_cache_write++; - if (key_cache_pwrite(file, buff, length, filepos, - MYF(MY_NABP | MY_WAIT_IF_FULL), - keycache->post_write, post_write_arg)) - DBUG_RETURN(1); - /* purecov: end */ - } - -#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG) - DBUG_EXECUTE("check_keycache", - test_key_cache(keycache, "start of key_cache_write", 1);); -#endif - - if (keycache->key_cache_inited) - { - /* Key cache is used */ - reg1 BLOCK_LINK *block; - uint read_length; - uint offset; - int page_st; - - /* - When the key cache is once initialized, we use the cache_lock to - reliably distinguish the cases of normal operation, resizing, and - disabled cache. We always increment and decrement - 'cnt_for_resize_op' so that a resizer can wait for pending I/O. - */ - keycache_pthread_mutex_lock(&keycache->cache_lock); - /* - Cache resizing has two phases: Flushing and re-initializing. In - the flush phase write requests can modify dirty blocks that are - not yet in flush. Otherwise they are allowed to bypass the cache. - find_key_block() returns NULL in both cases (clean blocks and - non-cached blocks). - - After the flush phase new I/O requests must wait until the - re-initialization is done. The re-initialization can be done only - if no I/O request is in progress. The reason is that - key_cache_block_size can change. With enabled cache I/O is done in - chunks of key_cache_block_size. Every chunk tries to use a cache - block first. If the block size changes in the middle, a block - could be missed and data could be written below a cached block. - */ - while (keycache->in_resize && !keycache->resize_in_flush) - wait_on_queue(&keycache->resize_queue, &keycache->cache_lock); - /* Register the I/O for the next resize. */ - inc_counter_for_resize_op(keycache); - locked_and_incremented= TRUE; - /* Requested data may not always be aligned to cache blocks. */ - offset= (uint) (filepos % keycache->key_cache_block_size); - /* Write data in key_cache_block_size increments. */ - do - { - /* Cache could be disabled in a later iteration. */ - if (!keycache->can_be_used) - goto no_key_cache; - /* Start writing at the beginning of the cache block. */ - filepos-= offset; - /* Do not write beyond the end of the cache block. */ - read_length= length; - set_if_smaller(read_length, keycache->key_cache_block_size-offset); - KEYCACHE_DBUG_ASSERT(read_length > 0); - - /* Request the cache block that matches file/pos. */ - keycache->global_cache_w_requests++; - block= find_key_block(keycache, file, filepos, level, 1, &page_st); - if (!block) - { - /* - This happens only for requests submitted during key cache - resize. The block is not in the cache and shall not go in. - Write directly to file. - */ - if (dont_write) - { - /* Used in the server. */ - keycache->global_cache_write++; - keycache_pthread_mutex_unlock(&keycache->cache_lock); - if (key_cache_pwrite(file, (uchar*) buff, read_length, - filepos + offset, - MYF(MY_NABP | MY_WAIT_IF_FULL), - keycache->post_write, post_write_arg)) - error=1; - keycache_pthread_mutex_lock(&keycache->cache_lock); - } - goto next_block; - } - /* - Prevent block from flushing and from being selected for to be - freed. This must be set when we release the cache_lock. - However, we must not set the status of the block before it is - assigned to this file/pos. - */ - if (page_st != PAGE_WAIT_TO_BE_READ) - block->status|= BLOCK_FOR_UPDATE; - /* - We must read the file block first if it is not yet in the cache - and we do not replace all of its contents. - - In cases where the cache block is big enough to contain (parts - of) index blocks of different indexes, our request can be - secondary (PAGE_WAIT_TO_BE_READ). In this case another thread is - reading the file block. If the read completes after us, it - overwrites our new contents with the old contents. So we have to - wait for the other thread to complete the read of this block. - read_block() takes care for the wait. - */ - if (!(block->status & BLOCK_ERROR) && - ((page_st == PAGE_TO_BE_READ && - (offset || read_length < keycache->key_cache_block_size)) || - (page_st == PAGE_WAIT_TO_BE_READ))) - { - read_block(keycache, block, - offset + read_length >= keycache->key_cache_block_size? - offset : keycache->key_cache_block_size, - offset, (page_st == PAGE_TO_BE_READ)); - DBUG_ASSERT(keycache->can_be_used); - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - /* - Prevent block from flushing and from being selected for to be - freed. This must be set when we release the cache_lock. - Here we set it in case we could not set it above. - */ - block->status|= BLOCK_FOR_UPDATE; - } - /* - The block should always be assigned to the requested file block - here. It need not be BLOCK_READ when overwriting the whole block. - */ - DBUG_ASSERT(block->hash_link->file == file); - DBUG_ASSERT(block->hash_link->diskpos == filepos); - DBUG_ASSERT(block->status & BLOCK_IN_USE); - DBUG_ASSERT((page_st == PAGE_TO_BE_READ) || (block->status & BLOCK_READ)); - /* - The block to be written must not be marked BLOCK_REASSIGNED. - Otherwise it could be freed in dirty state or reused without - another flush during eviction. It must also not be in flush. - Otherwise the old contens may have been flushed already and - the flusher could clear BLOCK_CHANGED without flushing the - new changes again. - */ - DBUG_ASSERT(!(block->status & BLOCK_REASSIGNED)); - - while (block->status & BLOCK_IN_FLUSHWRITE) - { - /* - Another thread is flushing the block. It was dirty already. - Wait until the block is flushed to file. Otherwise we could - modify the buffer contents just while it is written to file. - An unpredictable file block contents would be the result. - While we wait, several things can happen to the block, - including another flush. But the block cannot be reassigned to - another hash_link until we release our request on it. - */ - wait_on_queue(&block->wqueue[COND_FOR_SAVED], &keycache->cache_lock); - DBUG_ASSERT(keycache->can_be_used); - DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); - /* Still must not be marked for free. */ - DBUG_ASSERT(!(block->status & BLOCK_REASSIGNED)); - DBUG_ASSERT(block->hash_link && (block->hash_link->block == block)); - } - - /* - We could perhaps release the cache_lock during access of the - data like in the other functions. Locks outside of the key cache - assure that readers and a writer do not access the same range of - data. Parallel accesses should happen only if the cache block - contains multiple index block(fragment)s. So different parts of - the buffer would be read/written. An attempt to flush during - memcpy() is prevented with BLOCK_FOR_UPDATE. - */ - if (!(block->status & BLOCK_ERROR)) - { - block->post_write_arg= post_write_arg; -#if !defined(SERIALIZED_READ_FROM_CACHE) - keycache_pthread_mutex_unlock(&keycache->cache_lock); -#endif - if (!(read_length & 511)) - bmove512(block->buffer+offset, buff, read_length); - else - memcpy(block->buffer+offset, buff, (size_t) read_length); - -#if !defined(SERIALIZED_READ_FROM_CACHE) - keycache_pthread_mutex_lock(&keycache->cache_lock); -#endif - } - - if (!dont_write) - { - /* Not used in the server. buff has been written to disk at start. */ - if ((block->status & BLOCK_CHANGED) && - (!offset && read_length >= keycache->key_cache_block_size)) - link_to_file_list(keycache, block, block->hash_link->file, 1); - } - else if (! (block->status & BLOCK_CHANGED)) - link_to_changed_list(keycache, block); - block->status|=BLOCK_READ; - /* - Allow block to be selected for to be freed. Since it is marked - BLOCK_CHANGED too, it won't be selected for to be freed without - a flush. - */ - block->status&= ~BLOCK_FOR_UPDATE; - set_if_smaller(block->offset, offset); - set_if_bigger(block->length, read_length+offset); - - /* Threads may be waiting for the changes to be complete. */ - release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]); - - /* - If only a part of the cache block is to be replaced, and the - rest has been read from file, then the cache lock has been - released for I/O and it could be possible that another thread - wants to evict or free the block and waits for it to be - released. So we must not just decrement hash_link->requests, but - also wake a waiting thread. - */ - remove_reader(block); - - /* Error injection for coverage testing. */ - DBUG_EXECUTE_IF("key_cache_write_block_error", - block->status|= BLOCK_ERROR;); - - /* Do not link erroneous blocks into the LRU ring, but free them. */ - if (!(block->status & BLOCK_ERROR)) - { - /* - Link the block into the LRU ring if it's the last submitted - request for the block. This enables eviction for the block. - */ - unreg_request(keycache, block, 1); - } - else - { - /* Pretend a "clean" block to avoid complications. */ - block->status&= ~(BLOCK_CHANGED); - free_block(keycache, block); - error= 1; - break; - } - - next_block: - buff+= read_length; - filepos+= read_length+offset; - offset= 0; - - } while ((length-= read_length)); - goto end; - } - -no_key_cache: - /* Key cache is not used */ - if (dont_write) - { - /* Used in the server. */ - keycache->global_cache_w_requests++; - keycache->global_cache_write++; - if (locked_and_incremented) - keycache_pthread_mutex_unlock(&keycache->cache_lock); - if (key_cache_pwrite(file, (uchar*) buff, length, filepos, - MYF(MY_NABP | MY_WAIT_IF_FULL), - keycache->post_write, post_write_arg)) - error=1; - if (locked_and_incremented) - keycache_pthread_mutex_lock(&keycache->cache_lock); - } - -end: - if (locked_and_incremented) - { - dec_counter_for_resize_op(keycache); - keycache_pthread_mutex_unlock(&keycache->cache_lock); - } -#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG) - DBUG_EXECUTE("exec", - test_key_cache(keycache, "end of key_cache_write", 1);); -#endif - DBUG_RETURN(error); -} - - -/* - Free block. - - SYNOPSIS - free_block() - keycache Pointer to a key cache data structure - block Pointer to the block to free - - DESCRIPTION - Remove reference to block from hash table. - Remove block from the chain of clean blocks. - Add block to the free list. - - NOTE - Block must not be free (status == 0). - Block must not be in free_block_list. - Block must not be in the LRU ring. - Block must not be in eviction (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH). - Block must not be in free (BLOCK_REASSIGNED). - Block must not be in flush (BLOCK_IN_FLUSH). - Block must not be dirty (BLOCK_CHANGED). - Block must not be in changed_blocks (dirty) hash. - Block must be in file_blocks (clean) hash. - Block must refer to a hash_link. - Block must have a request registered on it. -*/ - -static void free_block(KEY_CACHE *keycache, BLOCK_LINK *block) -{ - KEYCACHE_THREAD_TRACE("free block"); - KEYCACHE_DBUG_PRINT("free_block", - ("block %u to be freed, hash_link %p status: %u", - BLOCK_NUMBER(block), block->hash_link, - block->status)); - /* - Assert that the block is not free already. And that it is in a clean - state. Note that the block might just be assigned to a hash_link and - not yet read (BLOCK_READ may not be set here). In this case a reader - is registered in the hash_link and free_block() will wait for it - below. - */ - DBUG_ASSERT((block->status & BLOCK_IN_USE) && - !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | - BLOCK_REASSIGNED | BLOCK_IN_FLUSH | - BLOCK_CHANGED | BLOCK_FOR_UPDATE))); - /* Assert that the block is in a file_blocks chain. */ - DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); - /* Assert that the block is not in the LRU ring. */ - DBUG_ASSERT(!block->next_used && !block->prev_used); - /* - IMHO the below condition (if()) makes no sense. I can't see how it - could be possible that free_block() is entered with a NULL hash_link - pointer. The only place where it can become NULL is in free_block() - (or before its first use ever, but for those blocks free_block() is - not called). I don't remove the conditional as it cannot harm, but - place an DBUG_ASSERT to confirm my hypothesis. Eventually the - condition (if()) can be removed. - */ - DBUG_ASSERT(block->hash_link && block->hash_link->block == block); - if (block->hash_link) - { - /* - While waiting for readers to finish, new readers might request the - block. But since we set block->status|= BLOCK_REASSIGNED, they - will wait on block->wqueue[COND_FOR_SAVED]. They must be signalled - later. - */ - block->status|= BLOCK_REASSIGNED; - wait_for_readers(keycache, block); - /* - The block must not have been freed by another thread. Repeat some - checks. An additional requirement is that it must be read now - (BLOCK_READ). - */ - DBUG_ASSERT(block->hash_link && block->hash_link->block == block); - DBUG_ASSERT((block->status & (BLOCK_READ | BLOCK_IN_USE | - BLOCK_REASSIGNED)) && - !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | - BLOCK_IN_FLUSH | BLOCK_CHANGED | - BLOCK_FOR_UPDATE))); - DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); - DBUG_ASSERT(!block->prev_used); - /* - Unset BLOCK_REASSIGNED again. If we hand the block to an evicting - thread (through unreg_request() below), other threads must not see - this flag. They could become confused. - */ - block->status&= ~BLOCK_REASSIGNED; - /* - Do not release the hash_link until the block is off all lists. - At least not if we hand it over for eviction in unreg_request(). - */ - } - - /* - Unregister the block request and link the block into the LRU ring. - This enables eviction for the block. If the LRU ring was empty and - threads are waiting for a block, then the block wil be handed over - for eviction immediately. Otherwise we will unlink it from the LRU - ring again, without releasing the lock in between. So decrementing - the request counter and updating statistics are the only relevant - operation in this case. Assert that there are no other requests - registered. - */ - DBUG_ASSERT(block->requests == 1); - unreg_request(keycache, block, 0); - /* - Note that even without releasing the cache lock it is possible that - the block is immediately selected for eviction by link_block() and - thus not added to the LRU ring. In this case we must not touch the - block any more. - */ - if (block->status & BLOCK_IN_EVICTION) - return; - - /* Error blocks are not put into the LRU ring. */ - if (!(block->status & BLOCK_ERROR)) - { - /* Here the block must be in the LRU ring. Unlink it again. */ - DBUG_ASSERT(block->next_used && block->prev_used && - *block->prev_used == block); - unlink_block(keycache, block); - } - if (block->temperature == BLOCK_WARM) - keycache->warm_blocks--; - block->temperature= BLOCK_COLD; - - /* Remove from file_blocks hash. */ - unlink_changed(block); - - /* Remove reference to block from hash table. */ - unlink_hash(keycache, block->hash_link); - block->hash_link= NULL; - - block->status= 0; - block->length= 0; - block->offset= keycache->key_cache_block_size; - KEYCACHE_THREAD_TRACE("free block"); - KEYCACHE_DBUG_PRINT("free_block", ("block is freed")); - - /* Enforced by unlink_changed(), but just to be sure. */ - DBUG_ASSERT(!block->next_changed && !block->prev_changed); - /* Enforced by unlink_block(): not in LRU ring nor in free_block_list. */ - DBUG_ASSERT(!block->next_used && !block->prev_used); - /* Insert the free block in the free list. */ - block->next_used= keycache->free_block_list; - keycache->free_block_list= block; - /* Keep track of the number of currently unused blocks. */ - keycache->blocks_unused++; - - /* All pending requests for this page must be resubmitted. */ - release_whole_queue(&block->wqueue[COND_FOR_SAVED]); -} - - -static int cmp_sec_link(BLOCK_LINK **a, BLOCK_LINK **b) -{ - return (((*a)->hash_link->diskpos < (*b)->hash_link->diskpos) ? -1 : - ((*a)->hash_link->diskpos > (*b)->hash_link->diskpos) ? 1 : 0); -} - - -/* - Flush a portion of changed blocks to disk, - free used blocks if requested -*/ - -static int flush_cached_blocks(KEY_CACHE *keycache, - File file, BLOCK_LINK **cache, - BLOCK_LINK **end, - enum flush_type type) -{ - int error; - int last_errno= 0; - uint count= (uint) (end-cache); - - /* Don't lock the cache during the flush */ - keycache_pthread_mutex_unlock(&keycache->cache_lock); - /* - As all blocks referred in 'cache' are marked by BLOCK_IN_FLUSH - we are guarunteed no thread will change them - */ - my_qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link); - - keycache_pthread_mutex_lock(&keycache->cache_lock); - /* - Note: Do not break the loop. We have registered a request on every - block in 'cache'. These must be unregistered by free_block() or - unreg_request(). - */ - for ( ; cache != end ; cache++) - { - BLOCK_LINK *block= *cache; - - KEYCACHE_DBUG_PRINT("flush_cached_blocks", - ("block %u to be flushed", BLOCK_NUMBER(block))); - /* - If the block contents is going to be changed, we abandon the flush - for this block. flush_key_blocks_int() will restart its search and - handle the block properly. - */ - if (!(block->status & BLOCK_FOR_UPDATE)) - { - /* Blocks coming here must have a certain status. */ - DBUG_ASSERT(block->hash_link); - DBUG_ASSERT(block->hash_link->block == block); - DBUG_ASSERT(block->hash_link->file == file); - DBUG_ASSERT((block->status & ~BLOCK_IN_EVICTION) == - (BLOCK_READ | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_IN_USE)); - block->status|= BLOCK_IN_FLUSHWRITE; - keycache_pthread_mutex_unlock(&keycache->cache_lock); - error= key_cache_pwrite(file, - block->buffer+block->offset, - block->length - block->offset, - block->hash_link->diskpos+ block->offset, - MYF(MY_NABP | MY_WAIT_IF_FULL), - keycache->post_write, block->post_write_arg); - keycache_pthread_mutex_lock(&keycache->cache_lock); - keycache->global_cache_write++; - if (error) - { - block->status|= BLOCK_ERROR; - if (!last_errno) - last_errno= errno ? errno : -1; - } - block->status&= ~BLOCK_IN_FLUSHWRITE; - /* Block must not have changed status except BLOCK_FOR_UPDATE. */ - DBUG_ASSERT(block->hash_link); - DBUG_ASSERT(block->hash_link->block == block); - DBUG_ASSERT(block->hash_link->file == file); - DBUG_ASSERT((block->status & ~(BLOCK_FOR_UPDATE | BLOCK_IN_EVICTION)) == - (BLOCK_READ | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_IN_USE)); - /* - Set correct status and link in right queue for free or later use. - free_block() must not see BLOCK_CHANGED and it may need to wait - for readers of the block. These should not see the block in the - wrong hash. If not freeing the block, we need to have it in the - right queue anyway. - */ - link_to_file_list(keycache, block, file, 1); - - } - block->status&= ~BLOCK_IN_FLUSH; - /* - Let to proceed for possible waiting requests to write to the block page. - It might happen only during an operation to resize the key cache. - */ - release_whole_queue(&block->wqueue[COND_FOR_SAVED]); - /* type will never be FLUSH_IGNORE_CHANGED here */ - if (!(type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE) && - !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | - BLOCK_FOR_UPDATE))) - { - /* - Note that a request has been registered against the block in - flush_key_blocks_int(). - */ - free_block(keycache, block); - } - else - { - /* - Link the block into the LRU ring if it's the last submitted - request for the block. This enables eviction for the block. - Note that a request has been registered against the block in - flush_key_blocks_int(). - */ - unreg_request(keycache, block, 1); - } - - } /* end of for ( ; cache != end ; cache++) */ - return last_errno; -} - - -/* - flush all key blocks for a file to disk, but don't do any mutex locks. - - SYNOPSIS - flush_key_blocks_int() - keycache pointer to a key cache data structure - file handler for the file to flush to - flush_type type of the flush - - NOTES - This function doesn't do any mutex locks because it needs to be called both - from flush_key_blocks and flush_all_key_blocks (the later one does the - mutex lock in the resize_key_cache() function). - - We do only care about changed blocks that exist when the function is - entered. We do not guarantee that all changed blocks of the file are - flushed if more blocks change while this function is running. - - RETURN - 0 ok - 1 error -*/ - -static int flush_key_blocks_int(KEY_CACHE *keycache, - File file, enum flush_type type) -{ - BLOCK_LINK *cache_buff[FLUSH_CACHE],**cache; - int last_errno= 0; - int last_errcnt= 0; - DBUG_ENTER("flush_key_blocks_int"); - DBUG_PRINT("enter",("file: %d blocks_used: %lu blocks_changed: %lu", - file, keycache->blocks_used, keycache->blocks_changed)); - -#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG) - DBUG_EXECUTE("check_keycache", - test_key_cache(keycache, "start of flush_key_blocks", 0);); -#endif - - DBUG_ASSERT(type != FLUSH_KEEP_LAZY); - cache= cache_buff; - if (keycache->disk_blocks > 0 && - (!my_disable_flush_key_blocks || type != FLUSH_KEEP)) - { - /* Key cache exists and flush is not disabled */ - int error= 0; - uint count= FLUSH_CACHE; - BLOCK_LINK **pos,**end; - BLOCK_LINK *first_in_switch= NULL; - BLOCK_LINK *last_in_flush; - BLOCK_LINK *last_for_update; - BLOCK_LINK *block, *next; -#if defined(KEYCACHE_DEBUG) - uint cnt=0; -#endif - - if (type != FLUSH_IGNORE_CHANGED) - { - /* - Count how many key blocks we have to cache to be able - to flush all dirty pages with minimum seek moves - */ - count= 0; - for (block= keycache->changed_blocks[FILE_HASH(file)] ; - block ; - block= block->next_changed) - { - if ((block->hash_link->file == file) && - !(block->status & BLOCK_IN_FLUSH)) - { - count++; - KEYCACHE_DBUG_ASSERT(count<= keycache->blocks_used); - } - } - /* - Allocate a new buffer only if its bigger than the one we have. - Assure that we always have some entries for the case that new - changed blocks appear while we need to wait for something. - */ - if ((count > FLUSH_CACHE) && - !(cache= (BLOCK_LINK**) my_malloc(sizeof(BLOCK_LINK*)*count, - MYF(0)))) - cache= cache_buff; - /* - After a restart there could be more changed blocks than now. - So we should not let count become smaller than the fixed buffer. - */ - if (cache == cache_buff) - count= FLUSH_CACHE; - } - - /* Retrieve the blocks and write them to a buffer to be flushed */ -restart: - last_in_flush= NULL; - last_for_update= NULL; - end= (pos= cache)+count; - for (block= keycache->changed_blocks[FILE_HASH(file)] ; - block ; - block= next) - { -#if defined(KEYCACHE_DEBUG) - cnt++; - KEYCACHE_DBUG_ASSERT(cnt <= keycache->blocks_used); -#endif - next= block->next_changed; - if (block->hash_link->file == file) - { - if (!(block->status & (BLOCK_IN_FLUSH | BLOCK_FOR_UPDATE))) - { - /* - Note: The special handling of BLOCK_IN_SWITCH is obsolete - since we set BLOCK_IN_FLUSH if the eviction includes a - flush. It can be removed in a later version. - */ - if (!(block->status & BLOCK_IN_SWITCH)) - { - /* - We care only for the blocks for which flushing was not - initiated by another thread and which are not in eviction. - Registering a request on the block unlinks it from the LRU - ring and protects against eviction. - */ - reg_requests(keycache, block, 1); - if (type != FLUSH_IGNORE_CHANGED) - { - /* It's not a temporary file */ - if (pos == end) - { - /* - This should happen relatively seldom. Remove the - request because we won't do anything with the block - but restart and pick it again in the next iteration. - */ - unreg_request(keycache, block, 0); - /* - This happens only if there is not enough - memory for the big block - */ - if ((error= flush_cached_blocks(keycache, file, cache, - end,type))) - { - /* Do not loop infinitely trying to flush in vain. */ - if ((last_errno == error) && (++last_errcnt > 5)) - goto err; - last_errno= error; - } - /* - Restart the scan as some other thread might have changed - the changed blocks chain: the blocks that were in switch - state before the flush started have to be excluded - */ - goto restart; - } - /* - Mark the block with BLOCK_IN_FLUSH in order not to let - other threads to use it for new pages and interfere with - our sequence of flushing dirty file pages. We must not - set this flag before actually putting the block on the - write burst array called 'cache'. - */ - block->status|= BLOCK_IN_FLUSH; - /* Add block to the array for a write burst. */ - *pos++= block; - } - else - { - /* It's a temporary file */ - DBUG_ASSERT(!(block->status & BLOCK_REASSIGNED)); - - /* - free_block() must not be called with BLOCK_CHANGED. Note - that we must not change the BLOCK_CHANGED flag outside of - link_to_file_list() so that it is always in the correct - queue and the *blocks_changed counters are correct. - */ - link_to_file_list(keycache, block, file, 1); - if (!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH))) - { - /* A request has been registered against the block above. */ - free_block(keycache, block); - } - else - { - /* - Link the block into the LRU ring if it's the last - submitted request for the block. This enables eviction - for the block. A request has been registered against - the block above. - */ - unreg_request(keycache, block, 1); - } - } - } - else - { - /* - Link the block into a list of blocks 'in switch'. - - WARNING: Here we introduce a place where a changed block - is not in the changed_blocks hash! This is acceptable for - a BLOCK_IN_SWITCH. Never try this for another situation. - Other parts of the key cache code rely on changed blocks - being in the changed_blocks hash. - */ - unlink_changed(block); - link_changed(block, &first_in_switch); - } - } - else if (type != FLUSH_KEEP) - { - /* - During the normal flush at end of statement (FLUSH_KEEP) we - do not need to ensure that blocks in flush or update by - other threads are flushed. They will be flushed by them - later. In all other cases we must assure that we do not have - any changed block of this file in the cache when this - function returns. - */ - if (block->status & BLOCK_IN_FLUSH) - { - /* Remember the last block found to be in flush. */ - last_in_flush= block; - } - else - { - /* Remember the last block found to be selected for update. */ - last_for_update= block; - } - } - } - } - if (pos != cache) - { - if ((error= flush_cached_blocks(keycache, file, cache, pos, type))) - { - /* Do not loop inifnitely trying to flush in vain. */ - if ((last_errno == error) && (++last_errcnt > 5)) - goto err; - last_errno= error; - } - /* - Do not restart here during the normal flush at end of statement - (FLUSH_KEEP). We have now flushed at least all blocks that were - changed when entering this function. In all other cases we must - assure that we do not have any changed block of this file in the - cache when this function returns. - */ - if (type != FLUSH_KEEP) - goto restart; - } - if (last_in_flush) - { - /* - There are no blocks to be flushed by this thread, but blocks in - flush by other threads. Wait until one of the blocks is flushed. - Re-check the condition for last_in_flush. We may have unlocked - the cache_lock in flush_cached_blocks(). The state of the block - could have changed. - */ - if (last_in_flush->status & BLOCK_IN_FLUSH) - wait_on_queue(&last_in_flush->wqueue[COND_FOR_SAVED], - &keycache->cache_lock); - /* Be sure not to lose a block. They may be flushed in random order. */ - goto restart; - } - if (last_for_update) - { - /* - There are no blocks to be flushed by this thread, but blocks for - update by other threads. Wait until one of the blocks is updated. - Re-check the condition for last_for_update. We may have unlocked - the cache_lock in flush_cached_blocks(). The state of the block - could have changed. - */ - if (last_for_update->status & BLOCK_FOR_UPDATE) - wait_on_queue(&last_for_update->wqueue[COND_FOR_REQUESTED], - &keycache->cache_lock); - /* The block is now changed. Flush it. */ - goto restart; - } - - /* - Wait until the list of blocks in switch is empty. The threads that - are switching these blocks will relink them to clean file chains - while we wait and thus empty the 'first_in_switch' chain. - */ - while (first_in_switch) - { -#if defined(KEYCACHE_DEBUG) - cnt= 0; -#endif - wait_on_queue(&first_in_switch->wqueue[COND_FOR_SAVED], - &keycache->cache_lock); -#if defined(KEYCACHE_DEBUG) - cnt++; - KEYCACHE_DBUG_ASSERT(cnt <= keycache->blocks_used); -#endif - /* - Do not restart here. We have flushed all blocks that were - changed when entering this function and were not marked for - eviction. Other threads have now flushed all remaining blocks in - the course of their eviction. - */ - } - - if (! (type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE)) - { - BLOCK_LINK *last_for_update= NULL; - BLOCK_LINK *last_in_switch= NULL; - uint total_found= 0; - uint found; - - /* - Finally free all clean blocks for this file. - During resize this may be run by two threads in parallel. - */ - do - { - found= 0; - for (block= keycache->file_blocks[FILE_HASH(file)] ; - block ; - block= next) - { - /* Remember the next block. After freeing we cannot get at it. */ - next= block->next_changed; - - /* Changed blocks cannot appear in the file_blocks hash. */ - DBUG_ASSERT(!(block->status & BLOCK_CHANGED)); - if (block->hash_link->file == file) - { - /* We must skip blocks that will be changed. */ - if (block->status & BLOCK_FOR_UPDATE) - { - last_for_update= block; - continue; - } - - /* - We must not free blocks in eviction (BLOCK_IN_EVICTION | - BLOCK_IN_SWITCH) or blocks intended to be freed - (BLOCK_REASSIGNED). - */ - if (!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | - BLOCK_REASSIGNED))) - { - struct st_hash_link *next_hash_link; - my_off_t next_diskpos; - File next_file; - uint next_status; - uint hash_requests; - - total_found++; - found++; - KEYCACHE_DBUG_ASSERT(found <= keycache->blocks_used); - - /* - Register a request. This unlinks the block from the LRU - ring and protects it against eviction. This is required - by free_block(). - */ - reg_requests(keycache, block, 1); - - /* - free_block() may need to wait for readers of the block. - This is the moment where the other thread can move the - 'next' block from the chain. free_block() needs to wait - if there are requests for the block pending. - */ - if (next && (hash_requests= block->hash_link->requests)) - { - /* Copy values from the 'next' block and its hash_link. */ - next_status= next->status; - next_hash_link= next->hash_link; - next_diskpos= next_hash_link->diskpos; - next_file= next_hash_link->file; - DBUG_ASSERT(next == next_hash_link->block); - } - - free_block(keycache, block); - /* - If we had to wait and the state of the 'next' block - changed, break the inner loop. 'next' may no longer be - part of the current chain. - - We do not want to break the loop after every free_block(), - not even only after waits. The chain might be quite long - and contain blocks for many files. Traversing it again and - again to find more blocks for this file could become quite - inefficient. - */ - if (next && hash_requests && - ((next_status != next->status) || - (next_hash_link != next->hash_link) || - (next_file != next_hash_link->file) || - (next_diskpos != next_hash_link->diskpos) || - (next != next_hash_link->block))) - break; - } - else - { - last_in_switch= block; - } - } - } /* end for block in file_blocks */ - } while (found); - - /* - If any clean block has been found, we may have waited for it to - become free. In this case it could be possible that another clean - block became dirty. This is possible if the write request existed - before the flush started (BLOCK_FOR_UPDATE). Re-check the hashes. - */ - if (total_found) - goto restart; - - /* - To avoid an infinite loop, wait until one of the blocks marked - for update is updated. - */ - if (last_for_update) - { - /* We did not wait. Block must not have changed status. */ - DBUG_ASSERT(last_for_update->status & BLOCK_FOR_UPDATE); - wait_on_queue(&last_for_update->wqueue[COND_FOR_REQUESTED], - &keycache->cache_lock); - goto restart; - } - - /* - To avoid an infinite loop wait until one of the blocks marked - for eviction is switched. - */ - if (last_in_switch) - { - /* We did not wait. Block must not have changed status. */ - DBUG_ASSERT(last_in_switch->status & (BLOCK_IN_EVICTION | - BLOCK_IN_SWITCH | - BLOCK_REASSIGNED)); - wait_on_queue(&last_in_switch->wqueue[COND_FOR_SAVED], - &keycache->cache_lock); - goto restart; - } - - } /* if (! (type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE)) */ - - } /* if (keycache->disk_blocks > 0 */ - -#ifndef DBUG_OFF - DBUG_EXECUTE("check_keycache", - test_key_cache(keycache, "end of flush_key_blocks", 0);); -#endif -err: - if (cache != cache_buff) - my_free((uchar*) cache, MYF(0)); - if (last_errno) - errno=last_errno; /* Return first error */ - DBUG_RETURN(last_errno != 0); -} - - -/* - Flush all blocks for a file to disk - - SYNOPSIS - - flush_key_blocks() - keycache pointer to a key cache data structure - file handler for the file to flush to - flush_type type of the flush - - RETURN - 0 ok - 1 error -*/ - -int flush_key_blocks(KEY_CACHE *keycache, - File file, enum flush_type type) -{ - int res= 0; - DBUG_ENTER("flush_key_blocks"); - DBUG_PRINT("enter", ("keycache: %p", keycache)); - - if (!keycache->key_cache_inited) - DBUG_RETURN(0); - - keycache_pthread_mutex_lock(&keycache->cache_lock); - /* While waiting for lock, keycache could have been ended. */ - if (keycache->disk_blocks > 0) - { - inc_counter_for_resize_op(keycache); - res= flush_key_blocks_int(keycache, file, type); - dec_counter_for_resize_op(keycache); - } - keycache_pthread_mutex_unlock(&keycache->cache_lock); - DBUG_RETURN(res); -} - - -/* - Flush all blocks in the key cache to disk. - - SYNOPSIS - flush_all_key_blocks() - keycache pointer to key cache root structure - - DESCRIPTION - - Flushing of the whole key cache is done in two phases. - - 1. Flush all changed blocks, waiting for them if necessary. Loop - until there is no changed block left in the cache. - - 2. Free all clean blocks. Normally this means free all blocks. The - changed blocks were flushed in phase 1 and became clean. However we - may need to wait for blocks that are read by other threads. While we - wait, a clean block could become changed if that operation started - before the resize operation started. To be safe we must restart at - phase 1. - - When we can run through the changed_blocks and file_blocks hashes - without finding a block any more, then we are done. - - Note that we hold keycache->cache_lock all the time unless we need - to wait for something. - - RETURN - 0 OK - != 0 Error -*/ - -static int flush_all_key_blocks(KEY_CACHE *keycache) -{ - BLOCK_LINK *block; - uint total_found; - uint found; - uint idx; - DBUG_ENTER("flush_all_key_blocks"); - - do - { - safe_mutex_assert_owner(&keycache->cache_lock); - total_found= 0; - - /* - Phase1: Flush all changed blocks, waiting for them if necessary. - Loop until there is no changed block left in the cache. - */ - do - { - found= 0; - /* Step over the whole changed_blocks hash array. */ - for (idx= 0; idx < CHANGED_BLOCKS_HASH; idx++) - { - /* - If an array element is non-empty, use the first block from its - chain to find a file for flush. All changed blocks for this - file are flushed. So the same block will not appear at this - place again with the next iteration. New writes for blocks are - not accepted during the flush. If multiple files share the - same hash bucket, one of them will be flushed per iteration - of the outer loop of phase 1. - */ - if ((block= keycache->changed_blocks[idx])) - { - found++; - /* - Flush dirty blocks but do not free them yet. They can be used - for reading until all other blocks are flushed too. - */ - if (flush_key_blocks_int(keycache, block->hash_link->file, - FLUSH_FORCE_WRITE)) - DBUG_RETURN(1); - } - } - - } while (found); - - /* - Phase 2: Free all clean blocks. Normally this means free all - blocks. The changed blocks were flushed in phase 1 and became - clean. However we may need to wait for blocks that are read by - other threads. While we wait, a clean block could become changed - if that operation started before the resize operation started. To - be safe we must restart at phase 1. - */ - do - { - found= 0; - /* Step over the whole file_blocks hash array. */ - for (idx= 0; idx < CHANGED_BLOCKS_HASH; idx++) - { - /* - If an array element is non-empty, use the first block from its - chain to find a file for flush. All blocks for this file are - freed. So the same block will not appear at this place again - with the next iteration. If multiple files share the - same hash bucket, one of them will be flushed per iteration - of the outer loop of phase 2. - */ - if ((block= keycache->file_blocks[idx])) - { - total_found++; - found++; - if (flush_key_blocks_int(keycache, block->hash_link->file, - FLUSH_RELEASE)) - DBUG_RETURN(1); - } - } - - } while (found); - - /* - If any clean block has been found, we may have waited for it to - become free. In this case it could be possible that another clean - block became dirty. This is possible if the write request existed - before the resize started (BLOCK_FOR_UPDATE). Re-check the hashes. - */ - } while (total_found); - -#ifndef DBUG_OFF - /* Now there should not exist any block any more. */ - for (idx= 0; idx < CHANGED_BLOCKS_HASH; idx++) - { - DBUG_ASSERT(!keycache->changed_blocks[idx]); - DBUG_ASSERT(!keycache->file_blocks[idx]); - } -#endif - - DBUG_RETURN(0); -} - - -/* - Reset the counters of a key cache. - - SYNOPSIS - reset_key_cache_counters() - name the name of a key cache - key_cache pointer to the key kache to be reset - - DESCRIPTION - This procedure is used by process_key_caches() to reset the counters of all - currently used key caches, both the default one and the named ones. - - RETURN - 0 on success (always because it can't fail) -*/ - -int reset_key_cache_counters(const char *name __attribute__((unused)), - KEY_CACHE *key_cache) -{ - DBUG_ENTER("reset_key_cache_counters"); - if (!key_cache->key_cache_inited) - { - DBUG_PRINT("info", ("Key cache %s not initialized.", name)); - DBUG_RETURN(0); - } - DBUG_PRINT("info", ("Resetting counters for key cache %s.", name)); - - key_cache->global_blocks_changed= 0; /* Key_blocks_not_flushed */ - key_cache->global_cache_r_requests= 0; /* Key_read_requests */ - key_cache->global_cache_read= 0; /* Key_reads */ - key_cache->global_cache_w_requests= 0; /* Key_write_requests */ - key_cache->global_cache_write= 0; /* Key_writes */ - DBUG_RETURN(0); -} - - -#ifndef DBUG_OFF -/* - Test if disk-cache is ok -*/ -static void test_key_cache(KEY_CACHE *keycache __attribute__((unused)), - const char *where __attribute__((unused)), - my_bool lock __attribute__((unused))) -{ - /* TODO */ -} -#endif - -#if defined(KEYCACHE_TIMEOUT) - -#define KEYCACHE_DUMP_FILE "keycache_dump.txt" -#define MAX_QUEUE_LEN 100 - - -static void keycache_dump(KEY_CACHE *keycache) -{ - FILE *keycache_dump_file=fopen(KEYCACHE_DUMP_FILE, "w"); - struct st_my_thread_var *last; - struct st_my_thread_var *thread; - BLOCK_LINK *block; - HASH_LINK *hash_link; - KEYCACHE_PAGE *page; - uint i; - - fprintf(keycache_dump_file, "thread:%u\n", thread->id); - - i=0; - thread=last=waiting_for_hash_link.last_thread; - fprintf(keycache_dump_file, "queue of threads waiting for hash link\n"); - if (thread) - do - { - thread=thread->next; - page= (KEYCACHE_PAGE *) thread->opt_info; - fprintf(keycache_dump_file, - "thread:%u, (file,filepos)=(%u,%lu)\n", - thread->id,(uint) page->file,(ulong) page->filepos); - if (++i == MAX_QUEUE_LEN) - break; - } - while (thread != last); - - i=0; - thread=last=waiting_for_block.last_thread; - fprintf(keycache_dump_file, "queue of threads waiting for block\n"); - if (thread) - do - { - thread=thread->next; - hash_link= (HASH_LINK *) thread->opt_info; - fprintf(keycache_dump_file, - "thread:%u hash_link:%u (file,filepos)=(%u,%lu)\n", - thread->id, (uint) HASH_LINK_NUMBER(hash_link), - (uint) hash_link->file,(ulong) hash_link->diskpos); - if (++i == MAX_QUEUE_LEN) - break; - } - while (thread != last); - - for (i=0 ; i< keycache->blocks_used ; i++) - { - int j; - block= &keycache->block_root[i]; - hash_link= block->hash_link; - fprintf(keycache_dump_file, - "block:%u hash_link:%d status:%x #requests=%u waiting_for_readers:%d\n", - i, (int) (hash_link ? HASH_LINK_NUMBER(hash_link) : -1), - block->status, block->requests, block->condvar ? 1 : 0); - for (j=0 ; j < 2; j++) - { - KEYCACHE_WQUEUE *wqueue=&block->wqueue[j]; - thread= last= wqueue->last_thread; - fprintf(keycache_dump_file, "queue #%d\n", j); - if (thread) - { - do - { - thread=thread->next; - fprintf(keycache_dump_file, - "thread:%u\n", thread->id); - if (++i == MAX_QUEUE_LEN) - break; - } - while (thread != last); - } - } - } - fprintf(keycache_dump_file, "LRU chain:"); - block= keycache= used_last; - if (block) - { - do - { - block= block->next_used; - fprintf(keycache_dump_file, - "block:%u, ", BLOCK_NUMBER(block)); - } - while (block != keycache->used_last); - } - fprintf(keycache_dump_file, "\n"); - - fclose(keycache_dump_file); -} - -#endif /* defined(KEYCACHE_TIMEOUT) */ - -#if defined(KEYCACHE_TIMEOUT) && !defined(__WIN__) - - -static int keycache_pthread_cond_wait(pthread_cond_t *cond, - pthread_mutex_t *mutex) -{ - int rc; - struct timeval now; /* time when we started waiting */ - struct timespec timeout; /* timeout value for the wait function */ - struct timezone tz; -#if defined(KEYCACHE_DEBUG) - int cnt=0; -#endif - - /* Get current time */ - gettimeofday(&now, &tz); - /* Prepare timeout value */ - timeout.tv_sec= now.tv_sec + KEYCACHE_TIMEOUT; - /* - timeval uses microseconds. - timespec uses nanoseconds. - 1 nanosecond = 1000 micro seconds - */ - timeout.tv_nsec= now.tv_usec * 1000; - KEYCACHE_THREAD_TRACE_END("started waiting"); -#if defined(KEYCACHE_DEBUG) - cnt++; - if (cnt % 100 == 0) - fprintf(keycache_debug_log, "waiting...\n"); - fflush(keycache_debug_log); -#endif - rc= pthread_cond_timedwait(cond, mutex, &timeout); - KEYCACHE_THREAD_TRACE_BEGIN("finished waiting"); - if (rc == ETIMEDOUT || rc == ETIME) - { -#if defined(KEYCACHE_DEBUG) - fprintf(keycache_debug_log,"aborted by keycache timeout\n"); - fclose(keycache_debug_log); - abort(); -#endif - keycache_dump(); - } - -#if defined(KEYCACHE_DEBUG) - KEYCACHE_DBUG_ASSERT(rc != ETIMEDOUT); -#else - assert(rc != ETIMEDOUT); -#endif - return rc; -} -#else -#if defined(KEYCACHE_DEBUG) -static int keycache_pthread_cond_wait(pthread_cond_t *cond, - pthread_mutex_t *mutex) -{ - int rc; - KEYCACHE_THREAD_TRACE_END("started waiting"); - rc= pthread_cond_wait(cond, mutex); - KEYCACHE_THREAD_TRACE_BEGIN("finished waiting"); - return rc; -} -#endif -#endif /* defined(KEYCACHE_TIMEOUT) && !defined(__WIN__) */ - -#if defined(KEYCACHE_DEBUG) - - -static int keycache_pthread_mutex_lock(pthread_mutex_t *mutex) -{ - int rc; - rc= pthread_mutex_lock(mutex); - KEYCACHE_THREAD_TRACE_BEGIN(""); - return rc; -} - - -static void keycache_pthread_mutex_unlock(pthread_mutex_t *mutex) -{ - KEYCACHE_THREAD_TRACE_END(""); - pthread_mutex_unlock(mutex); -} - - -static int keycache_pthread_cond_signal(pthread_cond_t *cond) -{ - int rc; - KEYCACHE_THREAD_TRACE("signal"); - rc= pthread_cond_signal(cond); - return rc; -} - - -#if defined(KEYCACHE_DEBUG_LOG) - - -static void keycache_debug_print(const char * fmt,...) -{ - va_list args; - va_start(args,fmt); - if (keycache_debug_log) - { - (void) vfprintf(keycache_debug_log, fmt, args); - (void) fputc('\n',keycache_debug_log); - } - va_end(args); -} -#endif /* defined(KEYCACHE_DEBUG_LOG) */ - -#if defined(KEYCACHE_DEBUG_LOG) - - -void keycache_debug_log_close(void) -{ - if (keycache_debug_log) - fclose(keycache_debug_log); -} -#endif /* defined(KEYCACHE_DEBUG_LOG) */ - -#endif /* defined(KEYCACHE_DEBUG) */ - -#if !defined(DBUG_OFF) -#define F_B_PRT(_f_, _v_) DBUG_PRINT("assert_fail", (_f_, _v_)) - -static int fail_block(BLOCK_LINK *block) -{ - F_B_PRT("block->next_used: %lx\n", (ulong) block->next_used); - F_B_PRT("block->prev_used: %lx\n", (ulong) block->prev_used); - F_B_PRT("block->next_changed: %lx\n", (ulong) block->next_changed); - F_B_PRT("block->prev_changed: %lx\n", (ulong) block->prev_changed); - F_B_PRT("block->hash_link: %lx\n", (ulong) block->hash_link); - F_B_PRT("block->status: %u\n", block->status); - F_B_PRT("block->length: %u\n", block->length); - F_B_PRT("block->offset: %u\n", block->offset); - F_B_PRT("block->requests: %u\n", block->requests); - F_B_PRT("block->temperature: %u\n", block->temperature); - return 0; /* Let the assert fail. */ -} - -static int fail_hlink(HASH_LINK *hlink) -{ - F_B_PRT("hlink->next: %lx\n", (ulong) hlink->next); - F_B_PRT("hlink->prev: %lx\n", (ulong) hlink->prev); - F_B_PRT("hlink->block: %lx\n", (ulong) hlink->block); - F_B_PRT("hlink->diskpos: %lu\n", (ulong) hlink->diskpos); - F_B_PRT("hlink->file: %d\n", hlink->file); - return 0; /* Let the assert fail. */ -} - -static int cache_empty(KEY_CACHE *keycache) -{ - int errcnt= 0; - int idx; - if (keycache->disk_blocks <= 0) - return 1; - for (idx= 0; idx < keycache->disk_blocks; idx++) - { - BLOCK_LINK *block= keycache->block_root + idx; - if (block->status || block->requests || block->hash_link) - { - fprintf(stderr, "block index: %u\n", idx); - fail_block(block); - errcnt++; - } - } - for (idx= 0; idx < keycache->hash_links; idx++) - { - HASH_LINK *hash_link= keycache->hash_link_root + idx; - if (hash_link->requests || hash_link->block) - { - fprintf(stderr, "hash_link index: %u\n", idx); - fail_hlink(hash_link); - errcnt++; - } - } - if (errcnt) - { - fprintf(stderr, "blocks: %d used: %lu\n", - keycache->disk_blocks, keycache->blocks_used); - fprintf(stderr, "hash_links: %d used: %d\n", - keycache->hash_links, keycache->hash_links_used); - fprintf(stderr, "\n"); - } - return !errcnt; -} -#endif - diff --git a/externals/mysql/mysys/mf_keycaches.c b/externals/mysql/mysys/mf_keycaches.c deleted file mode 100644 index 9ea5678da9..0000000000 --- a/externals/mysql/mysys/mf_keycaches.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Copyright (C) 2003-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Handling of multiple key caches - - The idea is to have a thread safe hash on the table name, - with a default key cache value that is returned if the table name is not in - the cache. -*/ - -#include "mysys_priv.h" -#include -#include -#include -#include "my_safehash.h" - -/***************************************************************************** - Functions to handle the key cache objects -*****************************************************************************/ - -/* Variable to store all key cache objects */ -static SAFE_HASH key_cache_hash; - - -my_bool multi_keycache_init(void) -{ - return safe_hash_init(&key_cache_hash, 16, (uchar*) dflt_key_cache); -} - - -void multi_keycache_free(void) -{ - safe_hash_free(&key_cache_hash); -} - -/* - Get a key cache to be used for a specific table. - - SYNOPSIS - multi_key_cache_search() - key key to find (usually table path) - uint length Length of key. - def Default value if no key cache - - NOTES - This function is coded in such a way that we will return the - default key cache even if one never called multi_keycache_init. - This will ensure that it works with old MyISAM clients. - - RETURN - key cache to use -*/ - -KEY_CACHE *multi_key_cache_search(uchar *key, uint length, - KEY_CACHE *def) -{ - if (!key_cache_hash.hash.records) - return def; - return (KEY_CACHE*) safe_hash_search(&key_cache_hash, key, length, - (void*) def); -} - - -/* - Assosiate a key cache with a key - - - SYONOPSIS - multi_key_cache_set() - key key (path to table etc..) - length Length of key - key_cache cache to assococite with the table - - NOTES - This can be used both to insert a new entry and change an existing - entry -*/ - - -my_bool multi_key_cache_set(const uchar *key, uint length, - KEY_CACHE *key_cache) -{ - return safe_hash_set(&key_cache_hash, key, length, (uchar*) key_cache); -} - - -void multi_key_cache_change(KEY_CACHE *old_data, - KEY_CACHE *new_data) -{ - safe_hash_change(&key_cache_hash, (uchar*) old_data, (uchar*) new_data); -} - - diff --git a/externals/mysql/mysys/mf_loadpath.c b/externals/mysql/mysys/mf_loadpath.c deleted file mode 100644 index fbf6f7f5d5..0000000000 --- a/externals/mysql/mysys/mf_loadpath.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include - - /* Returns full load-path for a file. to may be = path */ - /* if path is a hard-path return path */ - /* if path starts with home-dir return path */ - /* if path starts with current dir or parent-dir unpack path */ - /* if there is no path, prepend with own_path_prefix if given */ - /* else unpack path according to current dir */ - -char * my_load_path(char * to, const char *path, - const char *own_path_prefix) -{ - char buff[FN_REFLEN]; - int is_cur; - DBUG_ENTER("my_load_path"); - DBUG_PRINT("enter",("path: %s prefix: %s",path, - own_path_prefix ? own_path_prefix : "")); - - if ((path[0] == FN_HOMELIB && path[1] == FN_LIBCHAR) || - test_if_hard_path(path)) - (void) strmov(buff,path); - else if ((is_cur=(path[0] == FN_CURLIB && path[1] == FN_LIBCHAR)) || - (is_prefix(path,FN_PARENTDIR)) || - ! own_path_prefix) - { - if (is_cur) - is_cur=2; /* Remove current dir */ - if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0))) - (void) strcat(buff,path+is_cur); - else - (void) strmov(buff,path); /* Return org file name */ - } - else - (void) strxmov(buff,own_path_prefix,path,NullS); - strmov(to,buff); - DBUG_PRINT("exit",("to: %s",to)); - DBUG_RETURN(to); -} /* my_load_path */ diff --git a/externals/mysql/mysys/mf_pack.c b/externals/mysql/mysys/mf_pack.c deleted file mode 100644 index ab4cd35271..0000000000 --- a/externals/mysql/mysys/mf_pack.c +++ /dev/null @@ -1,526 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include -#ifdef HAVE_PWD_H -#include -#endif -#ifdef VMS -#include -#include -#include -#endif /* VMS */ - -static char * NEAR_F expand_tilde(char * *path); - - /* Pack a dirname ; Changes HOME to ~/ and current dev to ./ */ - /* from is a dirname (from dirname() ?) ending with FN_LIBCHAR */ - /* to may be == from */ - -void pack_dirname(char * to, const char *from) -{ - int cwd_err; - size_t d_length,length,buff_length; - char * start; - char buff[FN_REFLEN]; - DBUG_ENTER("pack_dirname"); - - LINT_INIT(buff_length); - (void) intern_filename(to,from); /* Change to intern name */ - -#ifdef FN_DEVCHAR - if ((start=strrchr(to,FN_DEVCHAR)) != 0) /* Skip device part */ - start++; - else -#endif - start=to; - - if (!(cwd_err= my_getwd(buff,FN_REFLEN,MYF(0)))) - { - buff_length= strlen(buff); - d_length= (size_t) (start-to); - if ((start == to || - (buff_length == d_length && !bcmp(buff,start,d_length))) && - *start != FN_LIBCHAR && *start) - { /* Put current dir before */ - bchange((uchar*) to, d_length, (uchar*) buff, buff_length, strlen(to)+1); - } - } - - if ((d_length= cleanup_dirname(to,to)) != 0) - { - length=0; - if (home_dir) - { - length= strlen(home_dir); - if (home_dir[length-1] == FN_LIBCHAR) - length--; /* Don't test last '/' */ - } - if (length > 1 && length < d_length) - { /* test if /xx/yy -> ~/yy */ - if (bcmp(to,home_dir,length) == 0 && to[length] == FN_LIBCHAR) - { - to[0]=FN_HOMELIB; /* Filename begins with ~ */ - (void) strmov_overlapp(to+1,to+length); - } - } - if (! cwd_err) - { /* Test if cwd is ~/... */ - if (length > 1 && length < buff_length) - { - if (bcmp(buff,home_dir,length) == 0 && buff[length] == FN_LIBCHAR) - { - buff[0]=FN_HOMELIB; - (void) strmov_overlapp(buff+1,buff+length); - } - } - if (is_prefix(to,buff)) - { - length= strlen(buff); - if (to[length]) - (void) strmov_overlapp(to,to+length); /* Remove everything before */ - else - { - to[0]= FN_CURLIB; /* Put ./ instead of cwd */ - to[1]= FN_LIBCHAR; - to[2]= '\0'; - } - } - } - } - DBUG_PRINT("exit",("to: '%s'",to)); - DBUG_VOID_RETURN; -} /* pack_dirname */ - - -/* - remove unwanted chars from dirname - - SYNOPSIS - cleanup_dirname() - to Store result here - from Dirname to fix. May be same as to - - IMPLEMENTATION - "/../" removes prev dir - "/~/" removes all before ~ - //" is same as "/", except on Win32 at start of a file - "/./" is removed - Unpacks home_dir if "~/.." used - Unpacks current dir if if "./.." used - - RETURN - # length of new name -*/ - -size_t cleanup_dirname(register char *to, const char *from) -{ - reg5 size_t length; - reg2 char * pos; - reg3 char * from_ptr; - reg4 char * start; - char parent[5], /* for "FN_PARENTDIR" */ - buff[FN_REFLEN+1],*end_parentdir; -#ifdef BACKSLASH_MBTAIL - CHARSET_INFO *fs= fs_character_set(); -#endif - DBUG_ENTER("cleanup_dirname"); - DBUG_PRINT("enter",("from: '%s'",from)); - - start=buff; - from_ptr=(char *) from; -#ifdef FN_DEVCHAR - if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0) - { /* Skip device part */ - length=(size_t) (pos-from_ptr)+1; - start=strnmov(buff,from_ptr,length); from_ptr+=length; - } -#endif - - parent[0]=FN_LIBCHAR; - length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent); - for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++) - { -#ifdef BACKSLASH_MBTAIL - uint l; - if (use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2))) - { - for (l-- ; l ; *++pos= *from_ptr++, l--); - start= pos + 1; /* Don't look inside multi-byte char */ - continue; - } -#endif - if (*pos == '/') - *pos = FN_LIBCHAR; - if (*pos == FN_LIBCHAR) - { - if ((size_t) (pos-start) > length && bcmp(pos-length,parent,length) == 0) - { /* If .../../; skip prev */ - pos-=length; - if (pos != start) - { /* not /../ */ - pos--; - if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR)) - { - if (!home_dir) - { - pos+=length+1; /* Don't unpack ~/.. */ - continue; - } - pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */ - if (*pos == FN_LIBCHAR) - pos--; /* home ended with '/' */ - } - if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR)) - { - if (my_getwd(curr_dir,FN_REFLEN,MYF(0))) - { - pos+=length+1; /* Don't unpack ./.. */ - continue; - } - pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */ - if (*pos == FN_LIBCHAR) - pos--; /* home ended with '/' */ - } - end_parentdir=pos; - while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */ - pos--; - if (pos[1] == FN_HOMELIB || bcmp(pos,parent,length) == 0) - { /* Don't remove ~user/ */ - pos=strmov(end_parentdir+1,parent); - *pos=FN_LIBCHAR; - continue; - } - } - } - else if ((size_t) (pos-start) == length-1 && - !bcmp(start,parent+1,length-1)) - start=pos; /* Starts with "../" */ - else if (pos-start > 0 && pos[-1] == FN_LIBCHAR) - { -#ifdef FN_NETWORK_DRIVES - if (pos-start != 1) -#endif - pos--; /* Remove dupplicate '/' */ - } - else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR) - pos-=2; /* Skip /./ */ - else if (pos > buff+1 && pos[-1] == FN_HOMELIB && pos[-2] == FN_LIBCHAR) - { /* Found ..../~/ */ - buff[0]=FN_HOMELIB; - buff[1]=FN_LIBCHAR; - start=buff; pos=buff+1; - } - } - } - (void) strmov(to,buff); - DBUG_PRINT("exit",("to: '%s'",to)); - DBUG_RETURN((size_t) (pos-buff)); -} /* cleanup_dirname */ - - -/* - On system where you don't have symbolic links, the following - code will allow you to create a file: - directory-name.sym that should contain the real path - to the directory. This will be used if the directory name - doesn't exists -*/ - - -my_bool my_use_symdir=0; /* Set this if you want to use symdirs */ - -#ifdef USE_SYMDIR -void symdirget(char *dir) -{ - char buff[FN_REFLEN]; - char *pos=strend(dir); - if (dir[0] && pos[-1] != FN_DEVCHAR && my_access(dir, F_OK)) - { - File file; - size_t length; - char temp= *(--pos); /* May be "/" or "\" */ - strmov(pos,".sym"); - file= my_open(dir, O_RDONLY, MYF(0)); - *pos++=temp; *pos=0; /* Restore old filename */ - if (file >= 0) - { - if ((length= my_read(file, buff, sizeof(buff), MYF(0))) > 0) - { - for (pos= buff + length ; - pos > buff && (iscntrl(pos[-1]) || isspace(pos[-1])) ; - pos --); - - /* Ensure that the symlink ends with the directory symbol */ - if (pos == buff || pos[-1] != FN_LIBCHAR) - *pos++=FN_LIBCHAR; - - strmake(dir,buff, (size_t) (pos-buff)); - } - my_close(file, MYF(0)); - } - } -} -#endif /* USE_SYMDIR */ - - -/** - Convert a directory name to a format which can be compared as strings - - @param to result buffer, FN_REFLEN chars in length; may be == from - @param from 'packed' directory name, in whatever format - @returns size of the normalized name - - @details - - Ensures that last char is FN_LIBCHAR, unless it is FN_DEVCHAR - - Uses cleanup_dirname - - It does *not* expand ~/ (although, see cleanup_dirname). Nor does it do - any case folding. All case-insensitive normalization should be done by - the caller. -*/ - -size_t normalize_dirname(char *to, const char *from) -{ - size_t length; - char buff[FN_REFLEN]; - DBUG_ENTER("normalize_dirname"); - - /* - Despite the name, this actually converts the name to the system's - format (TODO: rip out the non-working VMS stuff and name this - properly). - */ - (void) intern_filename(buff, from); - length= strlen(buff); /* Fix that '/' is last */ - if (length && -#ifdef FN_DEVCHAR - buff[length - 1] != FN_DEVCHAR && -#endif - buff[length - 1] != FN_LIBCHAR && buff[length - 1] != '/') - { - buff[length]= FN_LIBCHAR; - buff[length + 1]= '\0'; - } - - length=cleanup_dirname(to, buff); - - DBUG_RETURN(length); -} - - -/** - Fixes a directory name so that can be used by open() - - @param to Result buffer, FN_REFLEN characters. May be == from - @param from 'Packed' directory name (may contain ~) - - @details - - Uses normalize_dirname() - - Expands ~/... to home_dir/... - - Resolves MySQL's fake "foo.sym" symbolic directory names (if USE_SYMDIR) - - Changes a UNIX filename to system filename (replaces / with \ on windows) - - @returns - Length of new directory name (= length of to) -*/ - -size_t unpack_dirname(char *to, const char *from) -{ - size_t length, h_length; - char buff[FN_REFLEN+1+4],*suffix,*tilde_expansion; - DBUG_ENTER("unpack_dirname"); - - length= normalize_dirname(buff, from); - - if (buff[0] == FN_HOMELIB) - { - suffix=buff+1; tilde_expansion=expand_tilde(&suffix); - if (tilde_expansion) - { - length-= (size_t) (suffix-buff)-1; - if (length+(h_length= strlen(tilde_expansion)) <= FN_REFLEN) - { - if ((h_length > 0) && (tilde_expansion[h_length-1] == FN_LIBCHAR)) - h_length--; - if (buff+h_length < suffix) - bmove(buff+h_length,suffix,length); - else - bmove_upp((uchar*) buff+h_length+length, (uchar*) suffix+length, length); - bmove(buff,tilde_expansion,h_length); - } - } - } -#ifdef USE_SYMDIR - if (my_use_symdir) - symdirget(buff); -#endif - DBUG_RETURN(system_filename(to,buff)); /* Fix for open */ -} /* unpack_dirname */ - - - /* Expand tilde to home or user-directory */ - /* Path is reset to point at FN_LIBCHAR after ~xxx */ - -static char * NEAR_F expand_tilde(char * *path) -{ - if (path[0][0] == FN_LIBCHAR) - return home_dir; /* ~/ expanded to home */ -#ifdef HAVE_GETPWNAM - { - char *str,save; - struct passwd *user_entry; - - if (!(str=strchr(*path,FN_LIBCHAR))) - str=strend(*path); - save= *str; *str= '\0'; - user_entry=getpwnam(*path); - *str=save; - endpwent(); - if (user_entry) - { - *path=str; - return user_entry->pw_dir; - } - } -#endif - return (char *) 0; -} - - -/* - Fix filename so it can be used by open, create - - SYNOPSIS - unpack_filename() - to Store result here. Must be at least of size FN_REFLEN. - from Filename in unix format (with ~) - - RETURN - # length of to - - NOTES - to may be == from - ~ will only be expanded if total length < FN_REFLEN -*/ - - -size_t unpack_filename(char * to, const char *from) -{ - size_t length, n_length, buff_length; - char buff[FN_REFLEN]; - DBUG_ENTER("unpack_filename"); - - length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */ - n_length=unpack_dirname(buff,buff); - if (n_length+strlen(from+length) < FN_REFLEN) - { - (void) strmov(buff+n_length,from+length); - length= system_filename(to,buff); /* Fix to usably filename */ - } - else - length= system_filename(to,from); /* Fix to usably filename */ - DBUG_RETURN(length); -} /* unpack_filename */ - - - /* Convert filename (unix standard) to system standard */ - /* Used before system command's like open(), create() .. */ - /* Returns used length of to; total length should be FN_REFLEN */ - -size_t system_filename(char * to, const char *from) -{ -#ifndef FN_C_BEFORE_DIR - return (size_t) (strmake(to,from,FN_REFLEN-1)-to); -#else /* VMS */ - - /* change 'dev:lib/xxx' to 'dev:[lib]xxx' */ - /* change 'dev:xxx' to 'dev:xxx' */ - /* change './xxx' to 'xxx' */ - /* change './lib/' or lib/ to '[.lib]' */ - /* change '/x/y/z to '[x.y]x' */ - /* change 'dev:/x' to 'dev:[000000]x' */ - - int libchar_found; - size_t length; - char * to_pos,from_pos,pos; - char buff[FN_REFLEN]; - DBUG_ENTER("system_filename"); - - libchar_found=0; - (void) strmov(buff,from); /* If to == from */ - from_pos= buff; - if ((pos=strrchr(from_pos,FN_DEVCHAR))) /* Skip device part */ - { - pos++; - to_pos=strnmov(to,from_pos,(size_t) (pos-from_pos)); - from_pos=pos; - } - else - to_pos=to; - - if (from_pos[0] == FN_CURLIB && from_pos[1] == FN_LIBCHAR) - from_pos+=2; /* Skip './' */ - if (strchr(from_pos,FN_LIBCHAR)) - { - *(to_pos++) = FN_C_BEFORE_DIR; - if (strinstr(from_pos,FN_ROOTDIR) == 1) - { - from_pos+=strlen(FN_ROOTDIR); /* Actually +1 but... */ - if (! strchr(from_pos,FN_LIBCHAR)) - { /* No dir, use [000000] */ - to_pos=strmov(to_pos,FN_C_ROOT_DIR); - libchar_found++; - } - } - else - *(to_pos++)=FN_C_DIR_SEP; /* '.' gives current dir */ - - while ((pos=strchr(from_pos,FN_LIBCHAR))) - { - if (libchar_found++) - *(to_pos++)=FN_C_DIR_SEP; /* Add '.' between dirs */ - if (strinstr(from_pos,FN_PARENTDIR) == 1 && - from_pos+strlen(FN_PARENTDIR) == pos) - to_pos=strmov(to_pos,FN_C_PARENT_DIR); /* Found '../' */ - else - to_pos=strnmov(to_pos,from_pos,(size_t) (pos-from_pos)); - from_pos=pos+1; - } - *(to_pos++)=FN_C_AFTER_DIR; - } - length= (size_t) (strmov(to_pos,from_pos)-to); - DBUG_PRINT("exit",("name: '%s'",to)); - DBUG_RETURN(length); -#endif -} /* system_filename */ - - - /* Fix a filename to intern (UNIX format) */ - -char *intern_filename(char *to, const char *from) -{ - size_t length, to_length; - char buff[FN_REFLEN]; - if (from == to) - { /* Dirname may destroy from */ - strmov(buff,from); - from=buff; - } - length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */ - (void) strmov(to + to_length,from+length); - return (to); -} /* intern_filename */ diff --git a/externals/mysql/mysys/mf_path.c b/externals/mysql/mysys/mf_path.c deleted file mode 100644 index d51cac732f..0000000000 --- a/externals/mysql/mysys/mf_path.c +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include - -static char *find_file_in_path(char *to,const char *name); - - /* Finds where program can find it's files. - pre_pathname is found by first locking at progname (argv[0]). - if progname contains path the path is returned. - else if progname is found in path, return it - else if progname is given and POSIX environment variable "_" is set - then path is taken from "_". - If filename doesn't contain a path append MY_BASEDIR_VERSION or - MY_BASEDIR if defined, else append "/my/running". - own_path_name_part is concatinated to result. - my_path puts result in to and returns to */ - -char * my_path(char * to, const char *progname, - const char *own_pathname_part) -{ - char *start, *end, *prog; - size_t to_length; - DBUG_ENTER("my_path"); - - start=to; /* Return this */ - if (progname && (dirname_part(to, progname, &to_length) || - find_file_in_path(to,progname) || - ((prog=getenv("_")) != 0 && - dirname_part(to, prog, &to_length)))) - { - (void) intern_filename(to,to); - if (!test_if_hard_path(to)) - { - if (!my_getwd(curr_dir,FN_REFLEN,MYF(0))) - bchange((uchar*) to, 0, (uchar*) curr_dir, strlen(curr_dir), strlen(to)+1); - } - } - else - { - if ((end = getenv("MY_BASEDIR_VERSION")) == 0 && - (end = getenv("MY_BASEDIR")) == 0) - { -#ifdef DEFAULT_BASEDIR - end= (char*) DEFAULT_BASEDIR; -#else - end= (char*) "/my/"; -#endif - } - (void) intern_filename(to,end); - to=strend(to); - if (to != start && to[-1] != FN_LIBCHAR) - *to++ = FN_LIBCHAR; - (void) strmov(to,own_pathname_part); - } - DBUG_PRINT("exit",("to: '%s'",start)); - DBUG_RETURN(start); -} /* my_path */ - - - /* test if file without filename is found in path */ - /* Returns to if found and to has dirpart if found, else NullS */ - -#if defined(__WIN__) -#define F_OK 0 -#define PATH_SEP ';' -#define PROGRAM_EXTENSION ".exe" -#elif defined(__NETWARE__) -#define PATH_SEP ';' -#define PROGRAM_EXTENSION ".nlm" -#else -#define PATH_SEP ':' -#endif - -static char *find_file_in_path(char *to, const char *name) -{ - char *path,*pos,dir[2]; - const char *ext=""; - - if (!(path=getenv("PATH"))) - return NullS; - dir[0]=FN_LIBCHAR; dir[1]=0; -#ifdef PROGRAM_EXTENSION - if (!fn_ext(name)[0]) - ext=PROGRAM_EXTENSION; -#endif - - for (pos=path ; (pos=strchr(pos,PATH_SEP)) ; path= ++pos) - { - if (path != pos) - { - strxmov(strnmov(to,path,(uint) (pos-path)),dir,name,ext,NullS); - if (!access(to,F_OK)) - { - to[(uint) (pos-path)+1]=0; /* Return path only */ - return to; - } - } - } -#ifdef __WIN__ - to[0]=FN_CURLIB; - strxmov(to+1,dir,name,ext,NullS); - if (!access(to,F_OK)) /* Test in current dir */ - { - to[2]=0; /* Leave ".\" */ - return to; - } -#endif - return NullS; /* File not found */ -} diff --git a/externals/mysql/mysys/mf_qsort.c b/externals/mysql/mysys/mf_qsort.c deleted file mode 100644 index 4b3ecb603a..0000000000 --- a/externals/mysql/mysys/mf_qsort.c +++ /dev/null @@ -1,216 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - qsort implementation optimized for comparison of pointers - Inspired by the qsort implementations by Douglas C. Schmidt, - and Bentley & McIlroy's "Engineering a Sort Function". -*/ - - -#include "mysys_priv.h" -#ifndef SCO -#include -#endif - -/* We need to use qsort with 2 different compare functions */ -#ifdef QSORT_EXTRA_CMP_ARGUMENT -#define CMP(A,B) ((*cmp)(cmp_argument,(A),(B))) -#else -#define CMP(A,B) ((*cmp)((A),(B))) -#endif - -#define SWAP(A, B, size,swap_ptrs) \ -do { \ - if (swap_ptrs) \ - { \ - reg1 char **a = (char**) (A), **b = (char**) (B); \ - char *tmp = *a; *a++ = *b; *b++ = tmp; \ - } \ - else \ - { \ - reg1 char *a = (A), *b = (B); \ - reg3 char *end= a+size; \ - do \ - { \ - char tmp = *a; *a++ = *b; *b++ = tmp; \ - } while (a < end); \ - } \ -} while (0) - -/* Put the median in the middle argument */ -#define MEDIAN(low, mid, high) \ -{ \ - if (CMP(high,low) < 0) \ - SWAP(high, low, size, ptr_cmp); \ - if (CMP(mid, low) < 0) \ - SWAP(mid, low, size, ptr_cmp); \ - else if (CMP(high, mid) < 0) \ - SWAP(mid, high, size, ptr_cmp); \ -} - -/* The following node is used to store ranges to avoid recursive calls */ - -typedef struct st_stack -{ - char *low,*high; -} stack_node; - -#define PUSH(LOW,HIGH) {stack_ptr->low = LOW; stack_ptr++->high = HIGH;} -#define POP(LOW,HIGH) {LOW = (--stack_ptr)->low; HIGH = stack_ptr->high;} - -/* The following stack size is enough for ulong ~0 elements */ -#define STACK_SIZE (8 * sizeof(unsigned long int)) -#define THRESHOLD_FOR_INSERT_SORT 10 -#if defined(QSORT_TYPE_IS_VOID) -#define SORT_RETURN return -#else -#define SORT_RETURN return 0 -#endif - -/**************************************************************************** -** 'standard' quicksort with the following extensions: -** -** Can be compiled with the qsort2_cmp compare function -** Store ranges on stack to avoid recursion -** Use insert sort on small ranges -** Optimize for sorting of pointers (used often by MySQL) -** Use median comparison to find partition element -*****************************************************************************/ - -#ifdef QSORT_EXTRA_CMP_ARGUMENT -qsort_t my_qsort2(void *base_ptr, size_t count, size_t size, qsort2_cmp cmp, - void *cmp_argument) -#else -qsort_t my_qsort(void *base_ptr, size_t count, size_t size, qsort_cmp cmp) -#endif -{ - char *low, *high, *pivot; - stack_node stack[STACK_SIZE], *stack_ptr; - my_bool ptr_cmp; - /* Handle the simple case first */ - /* This will also make the rest of the code simpler */ - if (count <= 1) - SORT_RETURN; - - low = (char*) base_ptr; - high = low+ size * (count - 1); - stack_ptr = stack + 1; -#ifdef HAVE_purify - /* The first element in the stack will be accessed for the last POP */ - stack[0].low=stack[0].high=0; -#endif - pivot = (char *) my_alloca((int) size); - ptr_cmp= size == sizeof(char*) && !((low - (char*) 0)& (sizeof(char*)-1)); - - /* The following loop sorts elements between high and low */ - do - { - char *low_ptr, *high_ptr, *mid; - - count=((size_t) (high - low) / size)+1; - /* If count is small, then an insert sort is faster than qsort */ - if (count < THRESHOLD_FOR_INSERT_SORT) - { - for (low_ptr = low + size; low_ptr <= high; low_ptr += size) - { - char *ptr; - for (ptr = low_ptr; ptr > low && CMP(ptr - size, ptr) > 0; - ptr -= size) - SWAP(ptr, ptr - size, size, ptr_cmp); - } - POP(low, high); - continue; - } - - /* Try to find a good middle element */ - mid= low + size * (count >> 1); - if (count > 40) /* Must be bigger than 24 */ - { - size_t step = size* (count / 8); - MEDIAN(low, low + step, low+step*2); - MEDIAN(mid - step, mid, mid+step); - MEDIAN(high - 2 * step, high-step, high); - /* Put best median in 'mid' */ - MEDIAN(low+step, mid, high-step); - low_ptr = low; - high_ptr = high; - } - else - { - MEDIAN(low, mid, high); - /* The low and high argument are already in sorted against 'pivot' */ - low_ptr = low + size; - high_ptr = high - size; - } - memcpy(pivot, mid, size); - - do - { - while (CMP(low_ptr, pivot) < 0) - low_ptr += size; - while (CMP(pivot, high_ptr) < 0) - high_ptr -= size; - - if (low_ptr < high_ptr) - { - SWAP(low_ptr, high_ptr, size, ptr_cmp); - low_ptr += size; - high_ptr -= size; - } - else - { - if (low_ptr == high_ptr) - { - low_ptr += size; - high_ptr -= size; - } - break; - } - } - while (low_ptr <= high_ptr); - - /* - Prepare for next iteration. - Skip partitions of size 1 as these doesn't have to be sorted - Push the larger partition and sort the smaller one first. - This ensures that the stack is keept small. - */ - - if ((int) (high_ptr - low) <= 0) - { - if ((int) (high - low_ptr) <= 0) - { - POP(low, high); /* Nothing more to sort */ - } - else - low = low_ptr; /* Ignore small left part. */ - } - else if ((int) (high - low_ptr) <= 0) - high = high_ptr; /* Ignore small right part. */ - else if ((high_ptr - low) > (high - low_ptr)) - { - PUSH(low, high_ptr); /* Push larger left part */ - low = low_ptr; - } - else - { - PUSH(low_ptr, high); /* Push larger right part */ - high = high_ptr; - } - } while (stack_ptr > stack); - my_afree(pivot); - SORT_RETURN; -} diff --git a/externals/mysql/mysys/mf_qsort2.c b/externals/mysql/mysys/mf_qsort2.c deleted file mode 100644 index ca2bd1a495..0000000000 --- a/externals/mysql/mysys/mf_qsort2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* qsort that sends one extra argument to the compare subrutine */ - -#define QSORT_EXTRA_CMP_ARGUMENT -#include "mf_qsort.c" diff --git a/externals/mysql/mysys/mf_radix.c b/externals/mysql/mysys/mf_radix.c deleted file mode 100644 index 582ca76b8f..0000000000 --- a/externals/mysql/mysys/mf_radix.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Radixsort for pointers to fixed length strings. - A very quick sort for not to long (< 20 char) strings. - Neads a extra buffers of number_of_elements pointers but is - 2-3 times faster than quicksort -*/ - -#include "mysys_priv.h" -#include - - /* Radixsort */ - -void radixsort_for_str_ptr(uchar **base, uint number_of_elements, size_t size_of_element, uchar **buffer) -{ - uchar **end,**ptr,**buffer_ptr; - uint32 *count_ptr,*count_end,count[256]; - int pass; - - end=base+number_of_elements; count_end=count+256; - for (pass=(int) size_of_element-1 ; pass >= 0 ; pass--) - { - bzero((uchar*) count,sizeof(uint32)*256); - for (ptr= base ; ptr < end ; ptr++) - count[ptr[0][pass]]++; - if (count[0] == number_of_elements) - goto next; - for (count_ptr=count+1 ; count_ptr < count_end ; count_ptr++) - { - if (*count_ptr == number_of_elements) - goto next; - (*count_ptr)+= *(count_ptr-1); - } - for (ptr= end ; ptr-- != base ;) - buffer[--count[ptr[0][pass]]]= *ptr; - for (ptr=base, buffer_ptr=buffer ; ptr < end ;) - (*ptr++) = *buffer_ptr++; - next:; - } -} diff --git a/externals/mysql/mysys/mf_same.c b/externals/mysql/mysys/mf_same.c deleted file mode 100644 index 6738dc8051..0000000000 --- a/externals/mysql/mysys/mf_same.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Kopierar biblioteksstrukturen och extensionen fr}n ett filnamn */ - -#include "mysys_priv.h" -#include - - /* - Copy directory and/or extension between filenames. - (For the meaning of 'flag', check mf_format.c) - 'to' may be equal to 'name'. - Returns 'to'. - */ - -char * fn_same(char *to, const char *name, int flag) -{ - char dev[FN_REFLEN]; - const char *ext; - size_t dev_length; - DBUG_ENTER("fn_same"); - DBUG_PRINT("enter",("to: %s name: %s flag: %d",to,name,flag)); - - if ((ext=strrchr(name+dirname_part(dev, name, &dev_length),FN_EXTCHAR)) == 0) - ext=""; - - DBUG_RETURN(fn_format(to,to,dev,ext,flag)); -} /* fn_same */ diff --git a/externals/mysql/mysys/mf_sort.c b/externals/mysql/mysys/mf_sort.c deleted file mode 100644 index 686ebbc1d1..0000000000 --- a/externals/mysql/mysys/mf_sort.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Sort of string pointers in string-order with radix or qsort */ - -#include "mysys_priv.h" -#include - -void my_string_ptr_sort(uchar *base, uint items, size_t size) -{ -#if INT_MAX > 65536L - uchar **ptr=0; - - if (size <= 20 && items >= 1000 && items < 100000 && - (ptr= (uchar**) my_malloc(items*sizeof(char*),MYF(0)))) - { - radixsort_for_str_ptr((uchar**) base,items,size,ptr); - my_free((uchar*) ptr,MYF(0)); - } - else -#endif - { - if (size && items) - { - my_qsort2(base,items, sizeof(uchar*), get_ptr_compare(size), - (void*) &size); - } - } -} diff --git a/externals/mysql/mysys/mf_soundex.c b/externals/mysql/mysys/mf_soundex.c deleted file mode 100644 index fe30d8c81a..0000000000 --- a/externals/mysql/mysys/mf_soundex.c +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/**************************************************************** -* SOUNDEX ALGORITHM in C * -* * -* The basic Algorithm source is taken from EDN Nov. * -* 14, 1985 pg. 36. * -* * -* As a test Those in Illinois will find that the * -* first group of numbers in their drivers license * -* number is the soundex number for their last name. * -* * -* RHW PC-IBBS ID. #1230 * -* * -* As an extension if remove_garbage is set then all non- * -* alpha characters are skipped * -* * -* Note, that this implementation corresponds to the * -* original version of the algorithm, not to the more * -* popular "enhanced" version, described by Knuth. * -****************************************************************/ - -#include "mysys_priv.h" -#include -#include "my_static.h" - -static char get_scode(CHARSET_INFO * cs, char **ptr,pbool remove_garbage); - - /* outputed string is 4 byte long */ - /* out_pntr can be == in_pntr */ - -void soundex(CHARSET_INFO * cs,register char * out_pntr, char * in_pntr, - pbool remove_garbage) -{ - char ch,last_ch; - reg3 char * end; - register uchar *map=cs->to_upper; - - if (remove_garbage) - { - while (*in_pntr && !my_isalpha(cs,*in_pntr)) /* Skip pre-space */ - in_pntr++; - } - *out_pntr++ = map[(uchar)*in_pntr]; /* Copy first letter */ - last_ch = get_scode(cs,&in_pntr,0); /* code of the first letter */ - /* for the first 'double-letter */ - /* check. */ - end=out_pntr+3; /* Loop on input letters until */ - /* end of input (null) or output */ - /* letter code count = 3 */ - - in_pntr++; - while (out_pntr < end && (ch = get_scode(cs,&in_pntr,remove_garbage)) != 0) - { - in_pntr++; - if ((ch != '0') && (ch != last_ch)) /* if not skipped or double */ - { - *out_pntr++ = ch; /* letter, copy to output */ - } /* for next double-letter check */ - last_ch = ch; /* save code of last input letter */ - } - while (out_pntr < end) - *out_pntr++ = '0'; - *out_pntr=0; /* end string */ - return; -} /* soundex */ - - - /* - If alpha, map input letter to soundex code. - If not alpha and remove_garbage is set then skip to next char - else return 0 - */ - -static char get_scode(CHARSET_INFO * cs,char **ptr, pbool remove_garbage) -{ - uchar ch; - - if (remove_garbage) - { - while (**ptr && !my_isalpha(cs,**ptr)) - (*ptr)++; - } - ch=my_toupper(cs,**ptr); - if (ch < 'A' || ch > 'Z') - { - if (my_isalpha(cs,ch)) /* If extended alfa (country spec) */ - return '0'; /* threat as vokal */ - return 0; /* Can't map */ - } - return(soundex_map[ch-'A']); -} /* get_scode */ diff --git a/externals/mysql/mysys/mf_strip.c b/externals/mysql/mysys/mf_strip.c deleted file mode 100644 index b33620b1b2..0000000000 --- a/externals/mysql/mysys/mf_strip.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* T|mmer en str{ng p{ slut_space */ - -#include "mysys_priv.h" - -/* - strip_sp(char * str) - Strips end-space from string and returns new length. -*/ - -size_t strip_sp(register char * str) -{ - reg2 char * found; - reg3 char * start; - - start=found=str; - - while (*str) - { - if (*str != ' ') - { - while (*++str && *str != ' ') {}; - if (!*str) - return (size_t) (str-start); /* Return stringlength */ - } - found=str; - while (*++str == ' ') {}; - } - *found= '\0'; /* Stripp at first space */ - return (size_t) (found-start); -} /* strip_sp */ diff --git a/externals/mysql/mysys/mf_tempdir.c b/externals/mysql/mysys/mf_tempdir.c deleted file mode 100644 index d6492c9096..0000000000 --- a/externals/mysql/mysys/mf_tempdir.c +++ /dev/null @@ -1,95 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include - -#if defined( __WIN__) || defined(__NETWARE__) -#define DELIM ';' -#else -#define DELIM ':' -#endif - -my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist) -{ - char *end, *copy; - char buff[FN_REFLEN]; - DBUG_ENTER("init_tmpdir"); - DBUG_PRINT("enter", ("pathlist: %s", pathlist ? pathlist : "NULL")); - - pthread_mutex_init(&tmpdir->mutex, MY_MUTEX_INIT_FAST); - if (my_init_dynamic_array(&tmpdir->full_list, sizeof(char*), 1, 5)) - goto err; - if (!pathlist || !pathlist[0]) - { - /* Get default temporary directory */ - pathlist=getenv("TMPDIR"); /* Use this if possible */ -#if defined( __WIN__) || defined(__NETWARE__) - if (!pathlist) - pathlist=getenv("TEMP"); - if (!pathlist) - pathlist=getenv("TMP"); -#endif - if (!pathlist || !pathlist[0]) - pathlist=(char*) P_tmpdir; - } - do - { - uint length; - end=strcend(pathlist, DELIM); - strmake(buff, pathlist, (uint) (end-pathlist)); - length= cleanup_dirname(buff, buff); - if (!(copy= my_strndup(buff, length, MYF(MY_WME))) || - insert_dynamic(&tmpdir->full_list, (uchar*) ©)) - DBUG_RETURN(TRUE); - pathlist=end+1; - } - while (*end); - freeze_size(&tmpdir->full_list); - tmpdir->list=(char **)tmpdir->full_list.buffer; - tmpdir->max=tmpdir->full_list.elements-1; - tmpdir->cur=0; - DBUG_RETURN(FALSE); - -err: - delete_dynamic(&tmpdir->full_list); /* Safe to free */ - pthread_mutex_destroy(&tmpdir->mutex); - DBUG_RETURN(TRUE); -} - - -char *my_tmpdir(MY_TMPDIR *tmpdir) -{ - char *dir; - if (!tmpdir->max) - return tmpdir->list[0]; - pthread_mutex_lock(&tmpdir->mutex); - dir=tmpdir->list[tmpdir->cur]; - tmpdir->cur= (tmpdir->cur == tmpdir->max) ? 0 : tmpdir->cur+1; - pthread_mutex_unlock(&tmpdir->mutex); - return dir; -} - -void free_tmpdir(MY_TMPDIR *tmpdir) -{ - uint i; - if (!tmpdir->full_list.elements) - return; - for (i=0; i<=tmpdir->max; i++) - my_free(tmpdir->list[i], MYF(0)); - delete_dynamic(&tmpdir->full_list); - pthread_mutex_destroy(&tmpdir->mutex); -} - diff --git a/externals/mysql/mysys/mf_tempfile.c b/externals/mysql/mysys/mf_tempfile.c deleted file mode 100644 index 40016210de..0000000000 --- a/externals/mysql/mysys/mf_tempfile.c +++ /dev/null @@ -1,189 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include -#include "my_static.h" -#include "mysys_err.h" -#include -#ifdef HAVE_PATHS_H -#include -#endif - - - -/* - @brief - Create a temporary file with unique name in a given directory - - @details - create_temp_file - to pointer to buffer where temporary filename will be stored - dir directory where to create the file - prefix prefix the filename with this - mode Flags to use for my_create/my_open - MyFlags Magic flags - - @return - File descriptor of opened file if success - -1 and sets errno if fails. - - @note - The behaviour of this function differs a lot between - implementation, it's main use is to generate a file with - a name that does not already exist. - - When passing O_TEMPORARY flag in "mode" the file should - be automatically deleted - - The implementation using mkstemp should be considered the - reference implementation when adding a new or modifying an - existing one - -*/ - -File create_temp_file(char *to, const char *dir, const char *prefix, - int mode __attribute__((unused)), - myf MyFlags __attribute__((unused))) -{ - File file= -1; -#ifdef __WIN__ - TCHAR path_buf[MAX_PATH-14]; -#endif - - DBUG_ENTER("create_temp_file"); - DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix)); -#if defined (__WIN__) - - /* - Use GetTempPath to determine path for temporary files. - This is because the documentation for GetTempFileName - has the following to say about this parameter: - "If this parameter is NULL, the function fails." - */ - if (!dir) - { - if(GetTempPath(sizeof(path_buf), path_buf) > 0) - dir = path_buf; - } - /* - Use GetTempFileName to generate a unique filename, create - the file and release it's handle - - uses up to the first three letters from prefix - */ - if (GetTempFileName(dir, prefix, 0, to) == 0) - DBUG_RETURN(-1); - - DBUG_PRINT("info", ("name: %s", to)); - - /* - Open the file without the "open only if file doesn't already exist" - since the file has already been created by GetTempFileName - */ - if ((file= my_open(to, (mode & ~O_EXCL), MyFlags)) < 0) - { - /* Open failed, remove the file created by GetTempFileName */ - int tmp= my_errno; - (void) my_delete(to, MYF(0)); - my_errno= tmp; - } - -#elif defined(_ZTC__) - if (!dir) - dir=getenv("TMPDIR"); - if ((res=tempnam((char*) dir,(char *) prefix))) - { - strmake(to,res,FN_REFLEN-1); - (*free)(res); - file=my_create(to, 0, mode | O_EXCL | O_NOFOLLOW, MyFlags); - } -#elif defined(HAVE_MKSTEMP) && !defined(__NETWARE__) - { - char prefix_buff[30]; - uint pfx_len; - File org_file; - - pfx_len= (uint) (strmov(strnmov(prefix_buff, - prefix ? prefix : "tmp.", - sizeof(prefix_buff)-7),"XXXXXX") - - prefix_buff); - if (!dir && ! (dir =getenv("TMPDIR"))) - dir=P_tmpdir; - if (strlen(dir)+ pfx_len > FN_REFLEN-2) - { - errno=my_errno= ENAMETOOLONG; - DBUG_RETURN(file); - } - strmov(convert_dirname(to,dir,NullS),prefix_buff); - org_file=mkstemp(to); - if (mode & O_TEMPORARY) - (void) my_delete(to, MYF(MY_WME | ME_NOINPUT)); - file=my_register_filename(org_file, to, FILE_BY_MKSTEMP, - EE_CANTCREATEFILE, MyFlags); - /* If we didn't manage to register the name, remove the temp file */ - if (org_file >= 0 && file < 0) - { - int tmp=my_errno; - close(org_file); - (void) my_delete(to, MYF(MY_WME | ME_NOINPUT)); - my_errno=tmp; - } - } -#elif defined(HAVE_TEMPNAM) - { -#if !defined(__NETWARE__) - extern char **environ; -#endif - - char *res,**old_env,*temp_env[1]; - if (dir && !dir[0]) - { /* Change empty string to current dir */ - to[0]= FN_CURLIB; - to[1]= 0; - dir=to; - } -#if !defined(__NETWARE__) - old_env= (char**) environ; - if (dir) - { /* Don't use TMPDIR if dir is given */ - environ=(const char**) temp_env; - temp_env[0]=0; - } -#endif - if ((res=tempnam((char*) dir, (char*) prefix))) - { - strmake(to,res,FN_REFLEN-1); - (*free)(res); - file=my_create(to,0, - (int) (O_RDWR | O_BINARY | O_TRUNC | O_EXCL | O_NOFOLLOW | - O_TEMPORARY | O_SHORT_LIVED), - MYF(MY_WME)); - - } - else - { - DBUG_PRINT("error",("Got error: %d from tempnam",errno)); - } -#if !defined(__NETWARE__) - environ=(const char**) old_env; -#endif - } -#else -#error No implementation found for create_temp_file -#endif - if (file >= 0) - thread_safe_increment(my_tmp_file_created,&THR_LOCK_open); - DBUG_RETURN(file); -} diff --git a/externals/mysql/mysys/mf_unixpath.c b/externals/mysql/mysys/mf_unixpath.c deleted file mode 100644 index 75f8de1487..0000000000 --- a/externals/mysql/mysys/mf_unixpath.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include - - /* convert filename to unix style filename */ - /* If MSDOS converts '\' to '/' */ - -void to_unix_path(char * to __attribute__((unused))) -{ -#if FN_LIBCHAR != '/' - { - to--; - while ((to=strchr(to+1,FN_LIBCHAR)) != 0) - *to='/'; - } -#endif -} diff --git a/externals/mysql/mysys/mf_util.c b/externals/mysql/mysys/mf_util.c deleted file mode 100644 index 248b72b874..0000000000 --- a/externals/mysql/mysys/mf_util.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Utilities with are missing on some systems */ - -#include "mysys_priv.h" -#ifdef __ZTC__ -#include -#endif - -#ifdef __ZTC__ - - /* On ZORTECH C we don't have a getpid() call */ - -int getpid(void) -{ - return (int) _psp; -} - -#ifndef M_IC80386 - - /* Define halloc and hfree in as in MSC */ - -void * __CDECL halloc(long count,size_t length) -{ - return (void*) MK_FP(dos_alloc((uint) ((count*length+15) >> 4)),0); -} - -void __CDECL hfree(void *ptr) -{ - dos_free(FP_SEG(ptr)); -} - -#endif /* M_IC80386 */ -#endif /* __ZTC__ */ diff --git a/externals/mysql/mysys/mf_wcomp.c b/externals/mysql/mysys/mf_wcomp.c deleted file mode 100644 index 4786537d1a..0000000000 --- a/externals/mysql/mysys/mf_wcomp.c +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Funktions for comparing with wild-cards */ - -#include "mysys_priv.h" - - /* Test if a string is "comparable" to a wild-card string */ - /* returns 0 if the strings are "comparable" */ - -char wild_many='*'; -char wild_one='?'; -char wild_prefix=0; /* QQ this can potentially cause a SIGSEGV */ - -int wild_compare(register const char *str, register const char *wildstr, - pbool str_is_pattern) -{ - char cmp; - DBUG_ENTER("wild_compare"); - - while (*wildstr) - { - while (*wildstr && *wildstr != wild_many && *wildstr != wild_one) - { - if (*wildstr == wild_prefix && wildstr[1]) - { - wildstr++; - if (str_is_pattern && *str++ != wild_prefix) - DBUG_RETURN(1); - } - if (*wildstr++ != *str++) - DBUG_RETURN(1); - } - if (! *wildstr ) - DBUG_RETURN(*str != 0); - if (*wildstr++ == wild_one) - { - if (! *str || (str_is_pattern && *str == wild_many)) - DBUG_RETURN(1); /* One char; skip */ - if (*str++ == wild_prefix && str_is_pattern && *str) - str++; - } - else - { /* Found '*' */ - while (str_is_pattern && *str == wild_many) - str++; - for (; *wildstr == wild_many || *wildstr == wild_one; wildstr++) - if (*wildstr == wild_many) - { - while (str_is_pattern && *str == wild_many) - str++; - } - else - { - if (str_is_pattern && *str == wild_prefix && str[1]) - str+=2; - else if (! *str++) - DBUG_RETURN (1); - } - if (!*wildstr) - DBUG_RETURN(0); /* '*' as last char: OK */ - if ((cmp= *wildstr) == wild_prefix && wildstr[1] && !str_is_pattern) - cmp=wildstr[1]; - for (;;str++) - { - while (*str && *str != cmp) - str++; - if (!*str) - DBUG_RETURN (1); - if (wild_compare(str,wildstr,str_is_pattern) == 0) - DBUG_RETURN (0); - } - /* We will never come here */ - } - } - DBUG_RETURN (*str != 0); -} /* wild_compare */ diff --git a/externals/mysql/mysys/mf_wfile.c b/externals/mysql/mysys/mf_wfile.c deleted file mode 100644 index f98d348994..0000000000 --- a/externals/mysql/mysys/mf_wfile.c +++ /dev/null @@ -1,124 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Functions for finding files with wildcards */ - -/* - The following file-name-test is supported: - - "name [[,] name...] ; Matches any of used filenames. - Each name can have "*" and/or "?" - wild-cards. - - [wildspec [,]] !wildspec2 ; File that matches wildspec and not - wildspec2. -*/ - -#include "mysys_priv.h" -#include - - /* Store wildcard-string in a easyer format */ - -WF_PACK *wf_comp(char * str) -{ - uint ant; - int not_pos; - register char * pos; - char * buffer; - WF_PACK *ret; - DBUG_ENTER("wf_comp"); - - not_pos= -1; /* Skip space and '!' in front */ - while (*str == ' ') - str++; - if (*str == '!') - { - not_pos=0; - while (*++str == ' ') {}; - } - if (*str == 0) /* Empty == everything */ - DBUG_RETURN((WF_PACK *) NULL); - - ant=1; /* Count filespecs */ - for (pos=str ; *pos ; pos++) - ant+= test(*pos == ' ' || *pos == ','); - - if ((ret= (WF_PACK*) my_malloc((uint) ant*(sizeof(char **)+2)+ - sizeof(WF_PACK)+ (uint) strlen(str)+1, - MYF(MY_WME))) - == 0) - DBUG_RETURN((WF_PACK *) NULL); - ret->wild= (char **) (ret+1); - buffer= (char *) (ret->wild+ant); - - ant=0; - for (pos=str ; *pos ; str= pos) - { - ret->wild[ant++]=buffer; - while (*pos != ' ' && *pos != ',' && *pos != '!' && *pos) - *buffer++ = *pos++; - - *buffer++ = '\0'; - while (*pos == ' ' || *pos == ',' || *pos == '!' ) - if (*pos++ == '!' && not_pos <0) - not_pos=(int) ant; - } - - ret->wilds=ant; - if (not_pos <0) - ret->not_pos=ant; - else - ret->not_pos=(uint) not_pos; - - DBUG_PRINT("exit",("antal: %d not_pos: %d",ret->wilds,ret->not_pos)); - DBUG_RETURN(ret); -} /* wf_comp */ - - - /* Test if a given filename is matched */ - -int wf_test(register WF_PACK *wf_pack, register const char *name) -{ - reg2 uint i; - reg3 uint not_pos; - DBUG_ENTER("wf_test"); - - if (! wf_pack || wf_pack->wilds == 0) - DBUG_RETURN(0); /* Everything goes */ - - not_pos=wf_pack->not_pos; - for (i=0 ; i < not_pos; i++) - if (wild_compare(name,wf_pack->wild[i],0) == 0) - goto found; - if (i) - DBUG_RETURN(1); /* No-match */ - -found: -/* Test that it isn't in not-list */ - - for (i=not_pos ; i < wf_pack->wilds; i++) - if (wild_compare(name,wf_pack->wild[i],0) == 0) - DBUG_RETURN(1); - DBUG_RETURN(0); -} /* wf_test */ - - - /* We need this because program don't know with malloc we used */ - -void wf_end(WF_PACK *buffer) -{ - DBUG_ENTER("wf_end"); - if (buffer) - my_free((uchar*) buffer,MYF(0)); - DBUG_VOID_RETURN; -} /* wf_end */ diff --git a/externals/mysql/mysys/mulalloc.c b/externals/mysql/mysys/mulalloc.c deleted file mode 100644 index f4ca3d9f9a..0000000000 --- a/externals/mysql/mysys/mulalloc.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include - -/* - Malloc many pointers at the same time - Only ptr1 can be free'd, and doing this will free all - the memory allocated. ptr2, etc all point inside big allocated - memory area. - - SYNOPSIS - my_multi_malloc() - myFlags Flags - ptr1, length1 Multiple arguments terminated by null ptr - ptr2, length2 ... - ... - NULL -*/ - -void* my_multi_malloc(myf myFlags, ...) -{ - va_list args; - char **ptr,*start,*res; - size_t tot_length,length; - DBUG_ENTER("my_multi_malloc"); - - va_start(args,myFlags); - tot_length=0; - while ((ptr=va_arg(args, char **))) - { - length=va_arg(args,uint); - tot_length+=ALIGN_SIZE(length); - } - va_end(args); - - if (!(start=(char *) my_malloc(tot_length,myFlags))) - DBUG_RETURN(0); /* purecov: inspected */ - - va_start(args,myFlags); - res=start; - while ((ptr=va_arg(args, char **))) - { - *ptr=res; - length=va_arg(args,uint); - res+=ALIGN_SIZE(length); - } - va_end(args); - DBUG_RETURN((void*) start); -} diff --git a/externals/mysql/mysys/my_access.c b/externals/mysql/mysys/my_access.c deleted file mode 100644 index 210946d50a..0000000000 --- a/externals/mysql/mysys/my_access.c +++ /dev/null @@ -1,201 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include - -#ifdef __WIN__ - -/* - Check a file or path for accessability. - - SYNOPSIS - file_access() - path Path to file - amode Access method - - DESCRIPTION - This function wraps the normal access method because the access - available in MSVCRT> +reports that filenames such as LPT1 and - COM1 are valid (they are but should not be so for us). - - RETURN VALUES - 0 ok - -1 error (We use -1 as my_access is mapped to access on other platforms) -*/ - -int my_access(const char *path, int amode) -{ - WIN32_FILE_ATTRIBUTE_DATA fileinfo; - BOOL result; - - result= GetFileAttributesEx(path, GetFileExInfoStandard, &fileinfo); - if (! result || - (fileinfo.dwFileAttributes & FILE_ATTRIBUTE_READONLY) && (amode & W_OK)) - { - my_errno= errno= EACCES; - return -1; - } - return 0; -} - -#endif /* __WIN__ */ - - -/* - List of file names that causes problem on windows - - NOTE that one can also not have file names of type CON.TXT - - NOTE: it is important to keep "CLOCK$" on the first place, - we skip it in check_if_legal_tablename. -*/ -static const char *reserved_names[]= -{ - "CLOCK$", - "CON", "PRN", "AUX", "NUL", - "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", - "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", - NullS -}; - -#define MAX_RESERVED_NAME_LENGTH 6 - - -/* - Looks up a null-terminated string in a list, - case insensitively. - - SYNOPSIS - str_list_find() - list list of items - str item to find - - RETURN - 0 ok - 1 reserved file name -*/ -static int str_list_find(const char **list, const char *str) -{ - const char **name; - for (name= list; *name; name++) - { - if (!my_strcasecmp(&my_charset_latin1, *name, str)) - return 1; - } - return 0; -} - - -/* - A map for faster reserved_names lookup, - helps to avoid loops in many cases. - 1 - can be the first letter - 2 - can be the second letter - 4 - can be the third letter -*/ -static char reserved_map[256]= -{ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* !"#$%&'()*+,-./ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0123456789:;<=>? */ - 0,1,0,1,0,0,0,0,0,0,0,0,7,4,5,2, /* @ABCDEFGHIJKLMNO */ - 3,0,2,0,4,2,0,0,4,0,0,0,0,0,0,0, /* PQRSTUVWXYZ[\]^_ */ - 0,1,0,1,0,0,0,0,0,0,0,0,7,4,5,2, /* bcdefghijklmno */ - 3,0,2,0,4,2,0,0,4,0,0,0,0,0,0,0, /* pqrstuvwxyz{|}~. */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* ................ */ -}; - - -/* - Check if a table name may cause problems - - SYNOPSIS - check_if_legal_tablename - name Table name (without any extensions) - - DESCRIPTION - We don't check 'CLOCK$' because dollar sign is encoded as @0024, - making table file name 'CLOCK@0024', which is safe. - This is why we start lookup from the second element - (i.e. &reserver_name[1]) - - RETURN - 0 ok - 1 reserved file name -*/ - -int check_if_legal_tablename(const char *name) -{ - DBUG_ENTER("check_if_legal_tablename"); - DBUG_RETURN((reserved_map[(uchar) name[0]] & 1) && - (reserved_map[(uchar) name[1]] & 2) && - (reserved_map[(uchar) name[2]] & 4) && - str_list_find(&reserved_names[1], name)); -} - - -#if defined(__WIN__) || defined(__EMX__) - - -/* - Check if a path will access a reserverd file name that may cause problems - - SYNOPSIS - check_if_legal_filename - path Path to file - - RETURN - 0 ok - 1 reserved file name -*/ - -int check_if_legal_filename(const char *path) -{ - const char *end; - const char **reserved_name; - DBUG_ENTER("check_if_legal_filename"); - - path+= dirname_length(path); /* To start of filename */ - if (!(end= strchr(path, FN_EXTCHAR))) - end= strend(path); - if (path == end || (uint) (end - path) > MAX_RESERVED_NAME_LENGTH) - DBUG_RETURN(0); /* Simplify inner loop */ - - for (reserved_name= reserved_names; *reserved_name; reserved_name++) - { - const char *reserved= *reserved_name; /* never empty */ - const char *name= path; - - do - { - if (*reserved != my_toupper(&my_charset_latin1, *name)) - break; - if (++name == end && !reserved[1]) - DBUG_RETURN(1); /* Found wrong path */ - } while (*++reserved); - } - DBUG_RETURN(0); -} - -#endif /* defined(__WIN__) || defined(__EMX__) */ diff --git a/externals/mysql/mysys/my_aes.c b/externals/mysql/mysys/my_aes.c deleted file mode 100644 index 575d4702de..0000000000 --- a/externals/mysql/mysys/my_aes.c +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -/* - Implementation of AES Encryption for MySQL - Initial version by Peter Zaitsev June 2002 -*/ - - -#include -#include -#include "my_aes.h" - -enum encrypt_dir { AES_ENCRYPT, AES_DECRYPT }; - -#define AES_BLOCK_SIZE 16 /* Block size in bytes */ - -#define AES_BAD_DATA -1 /* If bad data discovered during decoding */ - - -/* The structure for key information */ -typedef struct { - int nr; /* Number of rounds */ - uint32 rk[4*(AES_MAXNR + 1)]; /* key schedule */ -} KEYINSTANCE; - - -/* - This is internal function just keeps joint code of Key generation - - SYNOPSIS - my_aes_create_key() - aes_key Address of Key Instance to be created - direction Direction (are we encoding or decoding) - key Key to use for real key creation - key_length Length of the key - - DESCRIPTION - - RESULT - 0 ok - -1 Error Note: The current impementation never returns this -*/ - -static int my_aes_create_key(KEYINSTANCE *aes_key, - enum encrypt_dir direction, const char *key, - int key_length) -{ - uint8 rkey[AES_KEY_LENGTH/8]; /* The real key to be used for encryption */ - uint8 *rkey_end=rkey+AES_KEY_LENGTH/8; /* Real key boundary */ - uint8 *ptr; /* Start of the real key*/ - const char *sptr; /* Start of the working key */ - const char *key_end=key+key_length; /* Working key boundary*/ - - bzero((char*) rkey,AES_KEY_LENGTH/8); /* Set initial key */ - - for (ptr= rkey, sptr= key; sptr < key_end; ptr++,sptr++) - { - if (ptr == rkey_end) - ptr= rkey; /* Just loop over tmp_key until we used all key */ - *ptr^= (uint8) *sptr; - } -#ifdef AES_USE_KEY_BITS - /* - This block is intended to allow more weak encryption if application - build with libmysqld needs to correspond to export regulations - It should be never used in normal distribution as does not give - any speed improvement. - To get worse security define AES_USE_KEY_BITS to number of bits - you want key to be. It should be divisible by 8 - - WARNING: Changing this value results in changing of enryption for - all key lengths so altering this value will result in impossibility - to decrypt data encrypted with previous value - */ -#define AES_USE_KEY_BYTES (AES_USE_KEY_BITS/8) - /* - To get weaker key we use first AES_USE_KEY_BYTES bytes of created key - and cyclically copy them until we created all required key length - */ - for (ptr= rkey+AES_USE_KEY_BYTES, sptr=rkey ; ptr < rkey_end; - ptr++,sptr++) - { - if (sptr == rkey+AES_USE_KEY_BYTES) - sptr=rkey; - *ptr=*sptr; - } -#endif - if (direction == AES_DECRYPT) - aes_key->nr = rijndaelKeySetupDec(aes_key->rk, rkey, AES_KEY_LENGTH); - else - aes_key->nr = rijndaelKeySetupEnc(aes_key->rk, rkey, AES_KEY_LENGTH); - return 0; -} - - -/* - Crypt buffer with AES encryption algorithm. - - SYNOPSIS - my_aes_encrypt() - source Pointer to data for encryption - source_length Size of encryption data - dest Buffer to place encrypted data (must be large enough) - key Key to be used for encryption - key_length Length of the key. Will handle keys of any length - - RETURN - >= 0 Size of encrypted data - < 0 Error -*/ - -int my_aes_encrypt(const char* source, int source_length, char* dest, - const char* key, int key_length) -{ - KEYINSTANCE aes_key; - uint8 block[AES_BLOCK_SIZE]; /* 128 bit block used for padding */ - int rc; /* result codes */ - int num_blocks; /* number of complete blocks */ - char pad_len; /* pad size for the last block */ - int i; - - if ((rc= my_aes_create_key(&aes_key,AES_ENCRYPT,key,key_length))) - return rc; - - num_blocks = source_length/AES_BLOCK_SIZE; - - for (i = num_blocks; i > 0; i--) /* Encode complete blocks */ - { - rijndaelEncrypt(aes_key.rk, aes_key.nr, (const uint8*) source, - (uint8*) dest); - source+= AES_BLOCK_SIZE; - dest+= AES_BLOCK_SIZE; - } - - /* Encode the rest. We always have incomplete block */ - pad_len = AES_BLOCK_SIZE - (source_length - AES_BLOCK_SIZE*num_blocks); - memcpy(block, source, 16 - pad_len); - bfill(block + AES_BLOCK_SIZE - pad_len, pad_len, pad_len); - rijndaelEncrypt(aes_key.rk, aes_key.nr, block, (uint8*) dest); - return AES_BLOCK_SIZE*(num_blocks + 1); -} - - -/* - DeCrypt buffer with AES encryption algorithm. - - SYNOPSIS - my_aes_decrypt() - source Pointer to data for decryption - source_length Size of encrypted data - dest Buffer to place decrypted data (must be large enough) - key Key to be used for decryption - key_length Length of the key. Will handle keys of any length - - RETURN - >= 0 Size of encrypted data - < 0 Error -*/ - -int my_aes_decrypt(const char *source, int source_length, char *dest, - const char *key, int key_length) -{ - KEYINSTANCE aes_key; - uint8 block[AES_BLOCK_SIZE]; /* 128 bit block used for padding */ - int rc; /* Result codes */ - int num_blocks; /* Number of complete blocks */ - uint pad_len; /* Pad size for the last block */ - int i; - - if ((rc=my_aes_create_key(&aes_key,AES_DECRYPT,key,key_length))) - return rc; - - num_blocks = source_length/AES_BLOCK_SIZE; - - if ((source_length != num_blocks*AES_BLOCK_SIZE) || num_blocks ==0 ) - return AES_BAD_DATA; /* Input size has to be even and at least one block */ - - for (i = num_blocks-1; i > 0; i--) /* Decode all but last blocks */ - { - rijndaelDecrypt(aes_key.rk, aes_key.nr, (const uint8*) source, - (uint8*) dest); - source+= AES_BLOCK_SIZE; - dest+= AES_BLOCK_SIZE; - } - - rijndaelDecrypt(aes_key.rk, aes_key.nr, (const uint8*) source, block); - /* Use last char in the block as size */ - pad_len = (uint) (uchar) block[AES_BLOCK_SIZE-1]; - - if (pad_len > AES_BLOCK_SIZE) - return AES_BAD_DATA; - /* We could also check whole padding but we do not really need this */ - - memcpy(dest, block, AES_BLOCK_SIZE - pad_len); - return AES_BLOCK_SIZE*num_blocks - pad_len; -} - - -/* - Get size of buffer which will be large enough for encrypted data - - SYNOPSIS - my_aes_get_size() - source_length Length of data to be encrypted - - RETURN - Size of buffer required to store encrypted data -*/ - -int my_aes_get_size(int source_length) -{ - return AES_BLOCK_SIZE*(source_length/AES_BLOCK_SIZE)+AES_BLOCK_SIZE; -} diff --git a/externals/mysql/mysys/my_alarm.c b/externals/mysql/mysys/my_alarm.c deleted file mode 100644 index d6a0da1bd1..0000000000 --- a/externals/mysql/mysys/my_alarm.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Function to set a varible when we got a alarm */ -/* Used by my_lock samt functions in m_alarm.h */ - - -#include "mysys_priv.h" -#include "my_alarm.h" - -#ifdef HAVE_ALARM - - /* ARGSUSED */ -sig_handler my_set_alarm_variable(int signo __attribute__((unused))) -{ - my_have_got_alarm=1; /* Tell program that time expired */ - return; -} - -#endif /* HAVE_ALARM */ diff --git a/externals/mysql/mysys/my_alloc.c b/externals/mysql/mysys/my_alloc.c deleted file mode 100644 index 80add2f493..0000000000 --- a/externals/mysql/mysys/my_alloc.c +++ /dev/null @@ -1,420 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Routines to handle mallocing of results which will be freed the same time */ - -#include -#include -#include -#undef EXTRA_DEBUG -#define EXTRA_DEBUG - - -/* - Initialize memory root - - SYNOPSIS - init_alloc_root() - mem_root - memory root to initialize - block_size - size of chunks (blocks) used for memory allocation - (It is external size of chunk i.e. it should include - memory required for internal structures, thus it - should be no less than ALLOC_ROOT_MIN_BLOCK_SIZE) - pre_alloc_size - if non-0, then size of block that should be - pre-allocated during memory root initialization. - - DESCRIPTION - This function prepares memory root for further use, sets initial size of - chunk for memory allocation and pre-allocates first block if specified. - Altough error can happen during execution of this function if - pre_alloc_size is non-0 it won't be reported. Instead it will be - reported as error in first alloc_root() on this memory root. -*/ - -void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, - size_t pre_alloc_size __attribute__((unused))) -{ - DBUG_ENTER("init_alloc_root"); - DBUG_PRINT("enter",("root: %p", mem_root)); - - mem_root->free= mem_root->used= mem_root->pre_alloc= 0; - mem_root->min_malloc= 32; - mem_root->block_size= block_size - ALLOC_ROOT_MIN_BLOCK_SIZE; - mem_root->error_handler= 0; - mem_root->block_num= 4; /* We shift this with >>2 */ - mem_root->first_block_usage= 0; - -#if !(defined(HAVE_purify) && defined(EXTRA_DEBUG)) - if (pre_alloc_size) - { - if ((mem_root->free= mem_root->pre_alloc= - (USED_MEM*) my_malloc(pre_alloc_size+ ALIGN_SIZE(sizeof(USED_MEM)), - MYF(0)))) - { - mem_root->free->size= pre_alloc_size+ALIGN_SIZE(sizeof(USED_MEM)); - mem_root->free->left= pre_alloc_size; - mem_root->free->next= 0; - } - } -#endif - DBUG_VOID_RETURN; -} - - -/* - SYNOPSIS - reset_root_defaults() - mem_root memory root to change defaults of - block_size new value of block size. Must be greater or equal - than ALLOC_ROOT_MIN_BLOCK_SIZE (this value is about - 68 bytes and depends on platform and compilation flags) - pre_alloc_size new size of preallocated block. If not zero, - must be equal to or greater than block size, - otherwise means 'no prealloc'. - DESCRIPTION - Function aligns and assigns new value to block size; then it tries to - reuse one of existing blocks as prealloc block, or malloc new one of - requested size. If no blocks can be reused, all unused blocks are freed - before allocation. -*/ - -void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, - size_t pre_alloc_size __attribute__((unused))) -{ - DBUG_ASSERT(alloc_root_inited(mem_root)); - - mem_root->block_size= block_size - ALLOC_ROOT_MIN_BLOCK_SIZE; -#if !(defined(HAVE_purify) && defined(EXTRA_DEBUG)) - if (pre_alloc_size) - { - size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); - if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size) - { - USED_MEM *mem, **prev= &mem_root->free; - /* - Free unused blocks, so that consequent calls - to reset_root_defaults won't eat away memory. - */ - while (*prev) - { - mem= *prev; - if (mem->size == size) - { - /* We found a suitable block, no need to do anything else */ - mem_root->pre_alloc= mem; - return; - } - if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size) - { - /* remove block from the list and free it */ - *prev= mem->next; - my_free(mem, MYF(0)); - } - else - prev= &mem->next; - } - /* Allocate new prealloc block and add it to the end of free list */ - if ((mem= (USED_MEM *) my_malloc(size, MYF(0)))) - { - mem->size= size; - mem->left= pre_alloc_size; - mem->next= *prev; - *prev= mem_root->pre_alloc= mem; - } - else - { - mem_root->pre_alloc= 0; - } - } - } - else -#endif - mem_root->pre_alloc= 0; -} - - -void *alloc_root(MEM_ROOT *mem_root, size_t length) -{ -#if defined(HAVE_purify) && defined(EXTRA_DEBUG) - reg1 USED_MEM *next; - DBUG_ENTER("alloc_root"); - DBUG_PRINT("enter",("root: %p", mem_root)); - - DBUG_ASSERT(alloc_root_inited(mem_root)); - - length+=ALIGN_SIZE(sizeof(USED_MEM)); - if (!(next = (USED_MEM*) my_malloc(length,MYF(MY_WME | ME_FATALERROR)))) - { - if (mem_root->error_handler) - (*mem_root->error_handler)(); - DBUG_RETURN((uchar*) 0); /* purecov: inspected */ - } - next->next= mem_root->used; - next->size= length; - mem_root->used= next; - DBUG_PRINT("exit",("ptr: %p", (((char*) next)+ - ALIGN_SIZE(sizeof(USED_MEM))))); - DBUG_RETURN((uchar*) (((char*) next)+ALIGN_SIZE(sizeof(USED_MEM)))); -#else - size_t get_size, block_size; - uchar* point; - reg1 USED_MEM *next= 0; - reg2 USED_MEM **prev; - DBUG_ENTER("alloc_root"); - DBUG_PRINT("enter",("root: %p", mem_root)); - DBUG_ASSERT(alloc_root_inited(mem_root)); - - length= ALIGN_SIZE(length); - if ((*(prev= &mem_root->free)) != NULL) - { - if ((*prev)->left < length && - mem_root->first_block_usage++ >= ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP && - (*prev)->left < ALLOC_MAX_BLOCK_TO_DROP) - { - next= *prev; - *prev= next->next; /* Remove block from list */ - next->next= mem_root->used; - mem_root->used= next; - mem_root->first_block_usage= 0; - } - for (next= *prev ; next && next->left < length ; next= next->next) - prev= &next->next; - } - if (! next) - { /* Time to alloc new block */ - block_size= mem_root->block_size * (mem_root->block_num >> 2); - get_size= length+ALIGN_SIZE(sizeof(USED_MEM)); - get_size= max(get_size, block_size); - - if (!(next = (USED_MEM*) my_malloc(get_size,MYF(MY_WME | ME_FATALERROR)))) - { - if (mem_root->error_handler) - (*mem_root->error_handler)(); - DBUG_RETURN((void*) 0); /* purecov: inspected */ - } - mem_root->block_num++; - next->next= *prev; - next->size= get_size; - next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); - *prev=next; - } - - point= (uchar*) ((char*) next+ (next->size-next->left)); - /*TODO: next part may be unneded due to mem_root->first_block_usage counter*/ - if ((next->left-= length) < mem_root->min_malloc) - { /* Full block */ - *prev= next->next; /* Remove block from list */ - next->next= mem_root->used; - mem_root->used= next; - mem_root->first_block_usage= 0; - } - DBUG_PRINT("exit",("ptr: %p", point)); - DBUG_RETURN((void*) point); -#endif -} - - -/* - Allocate many pointers at the same time. - - DESCRIPTION - ptr1, ptr2, etc all point into big allocated memory area. - - SYNOPSIS - multi_alloc_root() - root Memory root - ptr1, length1 Multiple arguments terminated by a NULL pointer - ptr2, length2 ... - ... - NULL - - RETURN VALUE - A pointer to the beginning of the allocated memory block - in case of success or NULL if out of memory. -*/ - -void *multi_alloc_root(MEM_ROOT *root, ...) -{ - va_list args; - char **ptr, *start, *res; - size_t tot_length, length; - DBUG_ENTER("multi_alloc_root"); - - va_start(args, root); - tot_length= 0; - while ((ptr= va_arg(args, char **))) - { - length= va_arg(args, uint); - tot_length+= ALIGN_SIZE(length); - } - va_end(args); - - if (!(start= (char*) alloc_root(root, tot_length))) - DBUG_RETURN(0); /* purecov: inspected */ - - va_start(args, root); - res= start; - while ((ptr= va_arg(args, char **))) - { - *ptr= res; - length= va_arg(args, uint); - res+= ALIGN_SIZE(length); - } - va_end(args); - DBUG_RETURN((void*) start); -} - -#define TRASH_MEM(X) TRASH(((char*)(X) + ((X)->size-(X)->left)), (X)->left) - -/* Mark all data in blocks free for reusage */ - -static inline void mark_blocks_free(MEM_ROOT* root) -{ - reg1 USED_MEM *next; - reg2 USED_MEM **last; - - /* iterate through (partially) free blocks, mark them free */ - last= &root->free; - for (next= root->free; next; next= *(last= &next->next)) - { - next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM)); - TRASH_MEM(next); - } - - /* Combine the free and the used list */ - *last= next=root->used; - - /* now go through the used blocks and mark them free */ - for (; next; next= next->next) - { - next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM)); - TRASH_MEM(next); - } - - /* Now everything is set; Indicate that nothing is used anymore */ - root->used= 0; - root->first_block_usage= 0; -} - - -/* - Deallocate everything used by alloc_root or just move - used blocks to free list if called with MY_USED_TO_FREE - - SYNOPSIS - free_root() - root Memory root - MyFlags Flags for what should be freed: - - MY_MARK_BLOCKS_FREED Don't free blocks, just mark them free - MY_KEEP_PREALLOC If this is not set, then free also the - preallocated block - - NOTES - One can call this function either with root block initialised with - init_alloc_root() or with a bzero()-ed block. - It's also safe to call this multiple times with the same mem_root. -*/ - -void free_root(MEM_ROOT *root, myf MyFlags) -{ - reg1 USED_MEM *next,*old; - DBUG_ENTER("free_root"); - DBUG_PRINT("enter",("root: %p flags: %u", root, (uint) MyFlags)); - - if (MyFlags & MY_MARK_BLOCKS_FREE) - { - mark_blocks_free(root); - DBUG_VOID_RETURN; - } - if (!(MyFlags & MY_KEEP_PREALLOC)) - root->pre_alloc=0; - - for (next=root->used; next ;) - { - old=next; next= next->next ; - if (old != root->pre_alloc) - my_free(old,MYF(0)); - } - for (next=root->free ; next ;) - { - old=next; next= next->next; - if (old != root->pre_alloc) - my_free(old,MYF(0)); - } - root->used=root->free=0; - if (root->pre_alloc) - { - root->free=root->pre_alloc; - root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM)); - TRASH_MEM(root->pre_alloc); - root->free->next=0; - } - root->block_num= 4; - root->first_block_usage= 0; - DBUG_VOID_RETURN; -} - -/* - Find block that contains an object and set the pre_alloc to it -*/ - -void set_prealloc_root(MEM_ROOT *root, char *ptr) -{ - USED_MEM *next; - for (next=root->used; next ; next=next->next) - { - if ((char*) next <= ptr && (char*) next + next->size > ptr) - { - root->pre_alloc=next; - return; - } - } - for (next=root->free ; next ; next=next->next) - { - if ((char*) next <= ptr && (char*) next + next->size > ptr) - { - root->pre_alloc=next; - return; - } - } -} - - -char *strdup_root(MEM_ROOT *root, const char *str) -{ - return strmake_root(root, str, strlen(str)); -} - - -char *strmake_root(MEM_ROOT *root, const char *str, size_t len) -{ - char *pos; - if ((pos=alloc_root(root,len+1))) - { - memcpy(pos,str,len); - pos[len]=0; - } - return pos; -} - - -void *memdup_root(MEM_ROOT *root, const void *str, size_t len) -{ - char *pos; - if ((pos=alloc_root(root,len))) - memcpy(pos,str,len); - return pos; -} diff --git a/externals/mysql/mysys/my_append.c b/externals/mysql/mysys/my_append.c deleted file mode 100644 index d410df1296..0000000000 --- a/externals/mysql/mysys/my_append.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include -#include -#if defined(HAVE_UTIME_H) -#include -#elif defined(HAVE_SYS_UTIME_H) -#include -#elif !defined(HPUX10) -struct utimbuf { - time_t actime; - time_t modtime; -}; -#endif - -/* - Append a file to another - - NOTES - Don't set MY_FNABP or MY_NABP bits on when calling this function -*/ - -int my_append(const char *from, const char *to, myf MyFlags) -{ - uint Count; - File from_file,to_file; - uchar buff[IO_SIZE]; - DBUG_ENTER("my_append"); - DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags)); - - from_file= to_file= -1; - - if ((from_file=my_open(from,O_RDONLY,MyFlags)) >= 0) - { - if ((to_file=my_open(to,O_APPEND | O_WRONLY,MyFlags)) >= 0) - { - while ((Count=my_read(from_file,buff,IO_SIZE,MyFlags)) != 0) - if (Count == (uint) -1 || - my_write(to_file,buff,Count,MYF(MyFlags | MY_NABP))) - goto err; - if (my_close(from_file,MyFlags) | my_close(to_file,MyFlags)) - DBUG_RETURN(-1); /* Error on close */ - DBUG_RETURN(0); - } - } -err: - if (from_file >= 0) (void) my_close(from_file,MyFlags); - if (to_file >= 0) (void) my_close(to_file,MyFlags); - DBUG_RETURN(-1); -} diff --git a/externals/mysql/mysys/my_atomic.c b/externals/mysql/mysys/my_atomic.c deleted file mode 100644 index df6490b577..0000000000 --- a/externals/mysql/mysys/my_atomic.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include - -#ifndef HAVE_INLINE -/* the following will cause all inline functions to be instantiated */ -#define HAVE_INLINE -#undef STATIC_INLINE -#define STATIC_INLINE extern -#endif - -#include - -/* - checks that the current build of atomic ops - can run on this machine - - RETURN - ATOMIC_xxx values, see my_atomic.h -*/ -int my_atomic_initialize() -{ - compile_time_assert(sizeof(intptr) == sizeof(void *)); - /* currently the only thing worth checking is SMP/UP issue */ -#ifdef MY_ATOMIC_MODE_DUMMY - return my_getncpus() == 1 ? MY_ATOMIC_OK : MY_ATOMIC_NOT_1CPU; -#else - return MY_ATOMIC_OK; -#endif -} - diff --git a/externals/mysql/mysys/my_bit.c b/externals/mysql/mysys/my_bit.c deleted file mode 100644 index 620d1b8ba5..0000000000 --- a/externals/mysql/mysys/my_bit.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include - -#ifndef HAVE_INLINE -/* the following will cause all inline functions to be instantiated */ -#define HAVE_INLINE -#undef STATIC_INLINE -#define STATIC_INLINE extern -#endif - -#include - -const char _my_bits_nbits[256] = { - 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, -}; - -/* - perl -e 'print map{", 0x".unpack H2,pack B8,unpack b8,chr$_}(0..255)' -*/ -const uchar _my_bits_reverse_table[256]={ -0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, -0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, -0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, -0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, 0x0C, 0x8C, 0x4C, 0xCC, -0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, 0x02, -0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 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externals/mysql/mysys/my_bitmap.c b/externals/mysql/mysys/my_bitmap.c deleted file mode 100644 index d6cf5d4c51..0000000000 --- a/externals/mysql/mysys/my_bitmap.c +++ /dev/null @@ -1,1126 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Handling of uchar arrays as large bitmaps. - - API limitations (or, rather asserted safety assumptions, - to encourage correct programming) - - * the internal size is a set of 32 bit words - * the number of bits specified in creation can be any number > 0 - * there are THREAD safe versions of most calls called bitmap_lock_* - many of those are not used and not compiled normally but the code - already exist for them in an #ifdef:ed part. These can only be used - if THREAD was specified in bitmap_init - - TODO: - Make assembler THREAD safe versions of these using test-and-set instructions - - Original version created by Sergei Golubchik 2001 - 2004. - New version written and test program added and some changes to the interface - was made by Mikael Ronström 2005, with assistance of Tomas Ulin and Mats - Kindahl. -*/ - -#include "mysys_priv.h" -#include -#include -#include - -void create_last_word_mask(MY_BITMAP *map) -{ - /* Get the number of used bits (1..8) in the last byte */ - unsigned int const used= 1U + ((map->n_bits-1U) & 0x7U); - - /* - Create a mask with the upper 'unused' bits set and the lower 'used' - bits clear. The bits within each byte is stored in big-endian order. - */ - unsigned char const mask= (~((1 << used) - 1)) & 255; - - /* - The first bytes are to be set to zero since they represent real bits - in the bitvector. The last bytes are set to 0xFF since they represent - bytes not used by the bitvector. Finally the last byte contains bits - as set by the mask above. - */ - unsigned char *ptr= (unsigned char*)&map->last_word_mask; - - map->last_word_ptr= map->bitmap + no_words_in_map(map)-1; - switch (no_bytes_in_map(map) & 3) { - case 1: - map->last_word_mask= ~0U; - ptr[0]= mask; - return; - case 2: - map->last_word_mask= ~0U; - ptr[0]= 0; - ptr[1]= mask; - return; - case 3: - map->last_word_mask= 0U; - ptr[2]= mask; - ptr[3]= 0xFFU; - return; - case 0: - map->last_word_mask= 0U; - ptr[3]= mask; - return; - } -} - - -static inline void bitmap_lock(MY_BITMAP *map __attribute__((unused))) -{ -#ifdef THREAD - if (map->mutex) - pthread_mutex_lock(map->mutex); -#endif -} - -static inline void bitmap_unlock(MY_BITMAP *map __attribute__((unused))) -{ -#ifdef THREAD - if (map->mutex) - pthread_mutex_unlock(map->mutex); -#endif -} - - -my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, - my_bool thread_safe __attribute__((unused))) -{ - DBUG_ENTER("bitmap_init"); - if (!buf) - { - uint size_in_bytes= bitmap_buffer_size(n_bits); - uint extra= 0; -#ifdef THREAD - if (thread_safe) - { - size_in_bytes= ALIGN_SIZE(size_in_bytes); - extra= sizeof(pthread_mutex_t); - } - map->mutex= 0; -#endif - if (!(buf= (my_bitmap_map*) my_malloc(size_in_bytes+extra, MYF(MY_WME)))) - DBUG_RETURN(1); -#ifdef THREAD - if (thread_safe) - { - map->mutex= (pthread_mutex_t *) ((char*) buf + size_in_bytes); - pthread_mutex_init(map->mutex, MY_MUTEX_INIT_FAST); - } -#endif - } -#ifdef THREAD - else - { - DBUG_ASSERT(thread_safe == 0); - } -#endif - - map->bitmap= buf; - map->n_bits= n_bits; - create_last_word_mask(map); - bitmap_clear_all(map); - DBUG_RETURN(0); -} - - -void bitmap_free(MY_BITMAP *map) -{ - DBUG_ENTER("bitmap_free"); - if (map->bitmap) - { -#ifdef THREAD - if (map->mutex) - pthread_mutex_destroy(map->mutex); -#endif - my_free((char*) map->bitmap, MYF(0)); - map->bitmap=0; - } - DBUG_VOID_RETURN; -} - - -/* - test if bit already set and set it if it was not (thread unsafe method) - - SYNOPSIS - bitmap_fast_test_and_set() - MAP bit map struct - BIT bit number - - RETURN - 0 bit was not set - !=0 bit was set -*/ - -my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit) -{ - uchar *value= ((uchar*) map->bitmap) + (bitmap_bit / 8); - uchar bit= 1 << ((bitmap_bit) & 7); - uchar res= (*value) & bit; - *value|= bit; - return res; -} - - -/* - test if bit already set and set it if it was not (thread safe method) - - SYNOPSIS - bitmap_fast_test_and_set() - map bit map struct - bitmap_bit bit number - - RETURN - 0 bit was not set - !=0 bit was set -*/ - -my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit) -{ - my_bool res; - DBUG_ASSERT(map->bitmap && bitmap_bit < map->n_bits); - bitmap_lock(map); - res= bitmap_fast_test_and_set(map, bitmap_bit); - bitmap_unlock(map); - return res; -} - -/* - test if bit already set and clear it if it was set(thread unsafe method) - - SYNOPSIS - bitmap_fast_test_and_set() - MAP bit map struct - BIT bit number - - RETURN - 0 bit was not set - !=0 bit was set -*/ - -my_bool bitmap_fast_test_and_clear(MY_BITMAP *map, uint bitmap_bit) -{ - uchar *byte= (uchar*) map->bitmap + (bitmap_bit / 8); - uchar bit= 1 << ((bitmap_bit) & 7); - uchar res= (*byte) & bit; - *byte&= ~bit; - return res; -} - - -my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit) -{ - my_bool res; - DBUG_ASSERT(map->bitmap && bitmap_bit < map->n_bits); - bitmap_lock(map); - res= bitmap_fast_test_and_clear(map, bitmap_bit); - bitmap_unlock(map); - return res; -} - - -uint bitmap_set_next(MY_BITMAP *map) -{ - uint bit_found; - DBUG_ASSERT(map->bitmap); - if ((bit_found= bitmap_get_first(map)) != MY_BIT_NONE) - bitmap_set_bit(map, bit_found); - return bit_found; -} - - -void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size) -{ - uint prefix_bytes, prefix_bits, d; - uchar *m= (uchar *)map->bitmap; - - DBUG_ASSERT(map->bitmap && - (prefix_size <= map->n_bits || prefix_size == (uint) ~0)); - set_if_smaller(prefix_size, map->n_bits); - if ((prefix_bytes= prefix_size / 8)) - memset(m, 0xff, prefix_bytes); - m+= prefix_bytes; - if ((prefix_bits= prefix_size & 7)) - *m++= (1 << prefix_bits)-1; - if ((d= no_bytes_in_map(map)-prefix_bytes)) - bzero(m, d); -} - - -my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size) -{ - uint prefix_bits= prefix_size & 0x7, res; - uchar *m= (uchar*)map->bitmap; - uchar *end_prefix= m+prefix_size/8; - uchar *end; - DBUG_ASSERT(m && prefix_size <= map->n_bits); - end= m+no_bytes_in_map(map); - - while (m < end_prefix) - if (*m++ != 0xff) - return 0; - - *map->last_word_ptr&= ~map->last_word_mask; /*Clear bits*/ - res= 0; - if (prefix_bits && *m++ != (1 << prefix_bits)-1) - goto ret; - - while (m < end) - if (*m++ != 0) - goto ret; - res= 1; -ret: - return res; -} - - -my_bool bitmap_is_set_all(const MY_BITMAP *map) -{ - my_bitmap_map *data_ptr= map->bitmap; - my_bitmap_map *end= map->last_word_ptr; - *map->last_word_ptr |= map->last_word_mask; - for (; data_ptr <= end; data_ptr++) - if (*data_ptr != 0xFFFFFFFF) - return FALSE; - return TRUE; -} - - -my_bool bitmap_is_clear_all(const MY_BITMAP *map) -{ - my_bitmap_map *data_ptr= map->bitmap; - my_bitmap_map *end; - if (*map->last_word_ptr & ~map->last_word_mask) - return FALSE; - end= map->last_word_ptr; - for (; data_ptr < end; data_ptr++) - if (*data_ptr) - return FALSE; - return TRUE; -} - -/* Return TRUE if map1 is a subset of map2 */ - -my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2) -{ - my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end; - - DBUG_ASSERT(map1->bitmap && map2->bitmap && - map1->n_bits==map2->n_bits); - - end= map1->last_word_ptr; - *map1->last_word_ptr &= ~map1->last_word_mask; - *map2->last_word_ptr &= ~map2->last_word_mask; - while (m1 <= end) - { - if ((*m1++) & ~(*m2++)) - return 0; - } - return 1; -} - -/* True if bitmaps has any common bits */ - -my_bool bitmap_is_overlapping(const MY_BITMAP *map1, const MY_BITMAP *map2) -{ - my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end; - - DBUG_ASSERT(map1->bitmap && map2->bitmap && - map1->n_bits==map2->n_bits); - - end= map1->last_word_ptr; - *map1->last_word_ptr &= ~map1->last_word_mask; - *map2->last_word_ptr &= ~map2->last_word_mask; - while (m1 <= end) - { - if ((*m1++) & (*m2++)) - return 1; - } - return 0; -} - - -void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2) -{ - my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; - uint len= no_words_in_map(map), len2 = no_words_in_map(map2); - - DBUG_ASSERT(map->bitmap && map2->bitmap); - - end= to+min(len,len2); - *map2->last_word_ptr&= ~map2->last_word_mask; /*Clear last bits in map2*/ - while (to < end) - *to++ &= *from++; - - if (len2 < len) - { - end+=len-len2; - while (to < end) - *to++=0; - } -} - - -/* - Set/clear all bits above a bit. - - SYNOPSIS - bitmap_set_above() - map RETURN The bitmap to change. - from_byte The bitmap buffer byte offset to start with. - use_bit The bit value (1/0) to use for all upper bits. - - NOTE - You can only set/clear full bytes. - The function is meant for the situation that you copy a smaller bitmap - to a bigger bitmap. Bitmap lengths are always multiple of eigth (the - size of a byte). Using 'from_byte' saves multiplication and division - by eight during parameter passing. - - RETURN - void -*/ - -void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit) -{ - uchar use_byte= use_bit ? 0xff : 0; - uchar *to= (uchar *)map->bitmap + from_byte; - uchar *end= (uchar *)map->bitmap + (map->n_bits+7)/8; - - while (to < end) - *to++= use_byte; -} - - -void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2) -{ - my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; - DBUG_ASSERT(map->bitmap && map2->bitmap && - map->n_bits==map2->n_bits); - - end= map->last_word_ptr; - - while (to <= end) - *to++ &= ~(*from++); -} - - -void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2) -{ - my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; - - DBUG_ASSERT(map->bitmap && map2->bitmap && - map->n_bits==map2->n_bits); - end= map->last_word_ptr; - - while (to <= end) - *to++ |= *from++; -} - - -void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2) -{ - my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end= map->last_word_ptr; - DBUG_ASSERT(map->bitmap && map2->bitmap && - map->n_bits==map2->n_bits); - while (to <= end) - *to++ ^= *from++; -} - - -void bitmap_invert(MY_BITMAP *map) -{ - my_bitmap_map *to= map->bitmap, *end; - - DBUG_ASSERT(map->bitmap); - end= map->last_word_ptr; - - while (to <= end) - *to++ ^= 0xFFFFFFFF; -} - - -uint bitmap_bits_set(const MY_BITMAP *map) -{ - uchar *m= (uchar*)map->bitmap; - uchar *end= m + no_bytes_in_map(map); - uint res= 0; - - DBUG_ASSERT(map->bitmap); - *map->last_word_ptr&= ~map->last_word_mask; /*Reset last bits to zero*/ - while (m < end) - res+= my_count_bits_ushort(*m++); - return res; -} - - -void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2) -{ - my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; - - DBUG_ASSERT(map->bitmap && map2->bitmap && - map->n_bits==map2->n_bits); - end= map->last_word_ptr; - while (to <= end) - *to++ = *from++; -} - - -uint bitmap_get_first_set(const MY_BITMAP *map) -{ - uchar *byte_ptr; - uint i,j,k; - my_bitmap_map *data_ptr, *end= map->last_word_ptr; - - DBUG_ASSERT(map->bitmap); - data_ptr= map->bitmap; - *map->last_word_ptr &= ~map->last_word_mask; - - for (i=0; data_ptr <= end; data_ptr++, i++) - { - if (*data_ptr) - { - byte_ptr= (uchar*)data_ptr; - for (j=0; ; j++, byte_ptr++) - { - if (*byte_ptr) - { - for (k=0; ; k++) - { - if (*byte_ptr & (1 << k)) - return (i*32) + (j*8) + k; - } - } - } - } - } - return MY_BIT_NONE; -} - - -uint bitmap_get_first(const MY_BITMAP *map) -{ - uchar *byte_ptr; - uint i,j,k; - my_bitmap_map *data_ptr, *end= map->last_word_ptr; - - DBUG_ASSERT(map->bitmap); - data_ptr= map->bitmap; - *map->last_word_ptr|= map->last_word_mask; - - for (i=0; data_ptr <= end; data_ptr++, i++) - { - if (*data_ptr != 0xFFFFFFFF) - { - byte_ptr= (uchar*)data_ptr; - for (j=0; ; j++, byte_ptr++) - { - if (*byte_ptr != 0xFF) - { - for (k=0; ; k++) - { - if (!(*byte_ptr & (1 << k))) - return (i*32) + (j*8) + k; - } - } - } - } - } - return MY_BIT_NONE; -} - - -uint bitmap_lock_set_next(MY_BITMAP *map) -{ - uint bit_found; - bitmap_lock(map); - bit_found= bitmap_set_next(map); - bitmap_unlock(map); - return bit_found; -} - - -void bitmap_lock_clear_bit(MY_BITMAP *map, uint bitmap_bit) -{ - bitmap_lock(map); - DBUG_ASSERT(map->bitmap && bitmap_bit < map->n_bits); - bitmap_clear_bit(map, bitmap_bit); - bitmap_unlock(map); -} - - -#ifdef NOT_USED -my_bool bitmap_lock_is_prefix(const MY_BITMAP *map, uint prefix_size) -{ - my_bool res; - bitmap_lock((MY_BITMAP *)map); - res= bitmap_is_prefix(map, prefix_size); - bitmap_unlock((MY_BITMAP *)map); - return res; -} - - -void bitmap_lock_set_all(MY_BITMAP *map) -{ - bitmap_lock(map); - bitmap_set_all(map); - bitmap_unlock(map); -} - - -void bitmap_lock_clear_all(MY_BITMAP *map) -{ - bitmap_lock(map); - bitmap_clear_all(map); - bitmap_unlock(map); -} - - -void bitmap_lock_set_prefix(MY_BITMAP *map, uint prefix_size) -{ - bitmap_lock(map); - bitmap_set_prefix(map, prefix_size); - bitmap_unlock(map); -} - - -my_bool bitmap_lock_is_clear_all(const MY_BITMAP *map) -{ - uint res; - bitmap_lock((MY_BITMAP *)map); - res= bitmap_is_clear_all(map); - bitmap_unlock((MY_BITMAP *)map); - return res; -} - - -my_bool bitmap_lock_is_set_all(const MY_BITMAP *map) -{ - uint res; - bitmap_lock((MY_BITMAP *)map); - res= bitmap_is_set_all(map); - bitmap_unlock((MY_BITMAP *)map); - return res; -} - - -my_bool bitmap_lock_is_set(const MY_BITMAP *map, uint bitmap_bit) -{ - my_bool res; - DBUG_ASSERT(map->bitmap && bitmap_bit < map->n_bits); - bitmap_lock((MY_BITMAP *)map); - res= bitmap_is_set(map, bitmap_bit); - bitmap_unlock((MY_BITMAP *)map); - return res; -} - - -my_bool bitmap_lock_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2) -{ - uint res; - bitmap_lock((MY_BITMAP *)map1); - bitmap_lock((MY_BITMAP *)map2); - res= bitmap_is_subset(map1, map2); - bitmap_unlock((MY_BITMAP *)map2); - bitmap_unlock((MY_BITMAP *)map1); - return res; -} - - -my_bool bitmap_lock_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2) -{ - uint res; - - DBUG_ASSERT(map1->bitmap && map2->bitmap && - map1->n_bits==map2->n_bits); - bitmap_lock((MY_BITMAP *)map1); - bitmap_lock((MY_BITMAP *)map2); - res= bitmap_cmp(map1, map2); - bitmap_unlock((MY_BITMAP *)map2); - bitmap_unlock((MY_BITMAP *)map1); - return res; -} - - -void bitmap_lock_intersect(MY_BITMAP *map, const MY_BITMAP *map2) -{ - bitmap_lock(map); - bitmap_lock((MY_BITMAP *)map2); - bitmap_intersect(map, map2); - bitmap_unlock((MY_BITMAP *)map2); - bitmap_unlock(map); -} - - -void bitmap_lock_subtract(MY_BITMAP *map, const MY_BITMAP *map2) -{ - bitmap_lock(map); - bitmap_lock((MY_BITMAP *)map2); - bitmap_subtract(map, map2); - bitmap_unlock((MY_BITMAP *)map2); - bitmap_unlock(map); -} - - -void bitmap_lock_union(MY_BITMAP *map, const MY_BITMAP *map2) -{ - bitmap_lock(map); - bitmap_lock((MY_BITMAP *)map2); - bitmap_union(map, map2); - bitmap_unlock((MY_BITMAP *)map2); - bitmap_unlock(map); -} - - -/* - SYNOPSIS - bitmap_bits_set() - map - RETURN - Number of set bits in the bitmap. -*/ -uint bitmap_lock_bits_set(const MY_BITMAP *map) -{ - uint res; - bitmap_lock((MY_BITMAP *)map); - DBUG_ASSERT(map->bitmap); - res= bitmap_bits_set(map); - bitmap_unlock((MY_BITMAP *)map); - return res; -} - - -/* - SYNOPSIS - bitmap_get_first() - map - RETURN - Number of first unset bit in the bitmap or MY_BIT_NONE if all bits are set. -*/ -uint bitmap_lock_get_first(const MY_BITMAP *map) -{ - uint res; - bitmap_lock((MY_BITMAP*)map); - res= bitmap_get_first(map); - bitmap_unlock((MY_BITMAP*)map); - return res; -} - - -uint bitmap_lock_get_first_set(const MY_BITMAP *map) -{ - uint res; - bitmap_lock((MY_BITMAP*)map); - res= bitmap_get_first_set(map); - bitmap_unlock((MY_BITMAP*)map); - return res; -} - - -void bitmap_lock_set_bit(MY_BITMAP *map, uint bitmap_bit) -{ - DBUG_ASSERT(map->bitmap && bitmap_bit < map->n_bits); - bitmap_lock(map); - bitmap_set_bit(map, bitmap_bit); - bitmap_unlock(map); -} - - -void bitmap_lock_flip_bit(MY_BITMAP *map, uint bitmap_bit) -{ - DBUG_ASSERT(map->bitmap && bitmap_bit < map->n_bits); - bitmap_lock(map); - bitmap_flip_bit(map, bitmap_bit); - bitmap_unlock(map); -} -#endif -#ifdef MAIN - -uint get_rand_bit(uint bitsize) -{ - return (rand() % bitsize); -} - -my_bool test_set_get_clear_bit(MY_BITMAP *map, uint bitsize) -{ - uint i, test_bit; - uint no_loops= bitsize > 128 ? 128 : bitsize; - for (i=0; i < no_loops; i++) - { - test_bit= get_rand_bit(bitsize); - bitmap_set_bit(map, test_bit); - if (!bitmap_is_set(map, test_bit)) - goto error1; - bitmap_clear_bit(map, test_bit); - if (bitmap_is_set(map, test_bit)) - goto error2; - } - return FALSE; -error1: - printf("Error in set bit, bit %u, bitsize = %u", test_bit, bitsize); - return TRUE; -error2: - printf("Error in clear bit, bit %u, bitsize = %u", test_bit, bitsize); - return TRUE; -} - -my_bool test_flip_bit(MY_BITMAP *map, uint bitsize) -{ - uint i, test_bit; - uint no_loops= bitsize > 128 ? 128 : bitsize; - for (i=0; i < no_loops; i++) - { - test_bit= get_rand_bit(bitsize); - bitmap_flip_bit(map, test_bit); - if (!bitmap_is_set(map, test_bit)) - goto error1; - bitmap_flip_bit(map, test_bit); - if (bitmap_is_set(map, test_bit)) - goto error2; - } - return FALSE; -error1: - printf("Error in flip bit 1, bit %u, bitsize = %u", test_bit, bitsize); - return TRUE; -error2: - printf("Error in flip bit 2, bit %u, bitsize = %u", test_bit, bitsize); - return TRUE; -} - -my_bool test_operators(MY_BITMAP *map __attribute__((unused)), - uint bitsize __attribute__((unused))) -{ - return FALSE; -} - -my_bool test_get_all_bits(MY_BITMAP *map, uint bitsize) -{ - uint i; - bitmap_set_all(map); - if (!bitmap_is_set_all(map)) - goto error1; - if (!bitmap_is_prefix(map, bitsize)) - goto error5; - bitmap_clear_all(map); - if (!bitmap_is_clear_all(map)) - goto error2; - if (!bitmap_is_prefix(map, 0)) - goto error6; - for (i=0; i 128 ? 128 : bitsize; - MY_BITMAP map2_obj, map3_obj; - MY_BITMAP *map2= &map2_obj, *map3= &map3_obj; - my_bitmap_map map2buf[1024]; - my_bitmap_map map3buf[1024]; - bitmap_init(&map2_obj, map2buf, bitsize, FALSE); - bitmap_init(&map3_obj, map3buf, bitsize, FALSE); - bitmap_clear_all(map2); - bitmap_clear_all(map3); - for (i=0; i < no_loops; i++) - { - test_bit1=get_rand_bit(bitsize); - bitmap_set_prefix(map, test_bit1); - test_bit2=get_rand_bit(bitsize); - bitmap_set_prefix(map2, test_bit2); - bitmap_intersect(map, map2); - test_bit3= test_bit2 < test_bit1 ? test_bit2 : test_bit1; - bitmap_set_prefix(map3, test_bit3); - if (!bitmap_cmp(map, map3)) - goto error1; - bitmap_clear_all(map); - bitmap_clear_all(map2); - bitmap_clear_all(map3); - test_bit1=get_rand_bit(bitsize); - test_bit2=get_rand_bit(bitsize); - test_bit3=get_rand_bit(bitsize); - bitmap_set_prefix(map, test_bit1); - bitmap_set_prefix(map2, test_bit2); - test_bit3= test_bit2 > test_bit1 ? test_bit2 : test_bit1; - bitmap_set_prefix(map3, test_bit3); - bitmap_union(map, map2); - if (!bitmap_cmp(map, map3)) - goto error2; - bitmap_clear_all(map); - bitmap_clear_all(map2); - bitmap_clear_all(map3); - test_bit1=get_rand_bit(bitsize); - test_bit2=get_rand_bit(bitsize); - test_bit3=get_rand_bit(bitsize); - bitmap_set_prefix(map, test_bit1); - bitmap_set_prefix(map2, test_bit2); - bitmap_xor(map, map2); - test_bit3= test_bit2 > test_bit1 ? test_bit2 : test_bit1; - test_bit4= test_bit2 < test_bit1 ? test_bit2 : test_bit1; - bitmap_set_prefix(map3, test_bit3); - for (j=0; j < test_bit4; j++) - bitmap_clear_bit(map3, j); - if (!bitmap_cmp(map, map3)) - goto error3; - bitmap_clear_all(map); - bitmap_clear_all(map2); - bitmap_clear_all(map3); - test_bit1=get_rand_bit(bitsize); - test_bit2=get_rand_bit(bitsize); - test_bit3=get_rand_bit(bitsize); - bitmap_set_prefix(map, test_bit1); - bitmap_set_prefix(map2, test_bit2); - bitmap_subtract(map, map2); - if (test_bit2 < test_bit1) - { - bitmap_set_prefix(map3, test_bit1); - for (j=0; j < test_bit2; j++) - bitmap_clear_bit(map3, j); - } - if (!bitmap_cmp(map, map3)) - goto error4; - bitmap_clear_all(map); - bitmap_clear_all(map2); - bitmap_clear_all(map3); - test_bit1=get_rand_bit(bitsize); - bitmap_set_prefix(map, test_bit1); - bitmap_invert(map); - bitmap_set_all(map3); - for (j=0; j < test_bit1; j++) - bitmap_clear_bit(map3, j); - if (!bitmap_cmp(map, map3)) - goto error5; - bitmap_clear_all(map); - bitmap_clear_all(map3); - } - return FALSE; -error1: - printf("intersect error bitsize=%u,size1=%u,size2=%u", bitsize, - test_bit1,test_bit2); - return TRUE; -error2: - printf("union error bitsize=%u,size1=%u,size2=%u", bitsize, - test_bit1,test_bit2); - return TRUE; -error3: - printf("xor error bitsize=%u,size1=%u,size2=%u", bitsize, - test_bit1,test_bit2); - return TRUE; -error4: - printf("subtract error bitsize=%u,size1=%u,size2=%u", bitsize, - test_bit1,test_bit2); - return TRUE; -error5: - printf("invert error bitsize=%u,size=%u", bitsize, - test_bit1); - return TRUE; -} - -my_bool test_count_bits_set(MY_BITMAP *map, uint bitsize) -{ - uint i, bit_count=0, test_bit; - uint no_loops= bitsize > 128 ? 128 : bitsize; - for (i=0; i < no_loops; i++) - { - test_bit=get_rand_bit(bitsize); - if (!bitmap_is_set(map, test_bit)) - { - bitmap_set_bit(map, test_bit); - bit_count++; - } - } - if (bit_count==0 && bitsize > 0) - goto error1; - if (bitmap_bits_set(map) != bit_count) - goto error2; - return FALSE; -error1: - printf("No bits set bitsize = %u", bitsize); - return TRUE; -error2: - printf("Wrong count of bits set, bitsize = %u", bitsize); - return TRUE; -} - -my_bool test_get_first_bit(MY_BITMAP *map, uint bitsize) -{ - uint i, test_bit; - uint no_loops= bitsize > 128 ? 128 : bitsize; - for (i=0; i < no_loops; i++) - { - test_bit=get_rand_bit(bitsize); - bitmap_set_bit(map, test_bit); - if (bitmap_get_first_set(map) != test_bit) - goto error1; - bitmap_set_all(map); - bitmap_clear_bit(map, test_bit); - if (bitmap_get_first(map) != test_bit) - goto error2; - bitmap_clear_all(map); - } - return FALSE; -error1: - printf("get_first_set error bitsize=%u,prefix_size=%u",bitsize,test_bit); - return TRUE; -error2: - printf("get_first error bitsize= %u, prefix_size= %u",bitsize,test_bit); - return TRUE; -} - -my_bool test_get_next_bit(MY_BITMAP *map, uint bitsize) -{ - uint i, j, test_bit; - uint no_loops= bitsize > 128 ? 128 : bitsize; - for (i=0; i < no_loops; i++) - { - test_bit=get_rand_bit(bitsize); - for (j=0; j < test_bit; j++) - bitmap_set_next(map); - if (!bitmap_is_prefix(map, test_bit)) - goto error1; - bitmap_clear_all(map); - } - return FALSE; -error1: - printf("get_next error bitsize= %u, prefix_size= %u", bitsize,test_bit); - return TRUE; -} - -my_bool test_prefix(MY_BITMAP *map, uint bitsize) -{ - uint i, j, test_bit; - uint no_loops= bitsize > 128 ? 128 : bitsize; - for (i=0; i < no_loops; i++) - { - test_bit=get_rand_bit(bitsize); - bitmap_set_prefix(map, test_bit); - if (!bitmap_is_prefix(map, test_bit)) - goto error1; - bitmap_clear_all(map); - for (j=0; j < test_bit; j++) - bitmap_set_bit(map, j); - if (!bitmap_is_prefix(map, test_bit)) - goto error2; - bitmap_set_all(map); - for (j=bitsize - 1; ~(j-test_bit); j--) - bitmap_clear_bit(map, j); - if (!bitmap_is_prefix(map, test_bit)) - goto error3; - bitmap_clear_all(map); - } - return FALSE; -error1: - printf("prefix1 error bitsize = %u, prefix_size = %u", bitsize,test_bit); - return TRUE; -error2: - printf("prefix2 error bitsize = %u, prefix_size = %u", bitsize,test_bit); - return TRUE; -error3: - printf("prefix3 error bitsize = %u, prefix_size = %u", bitsize,test_bit); - return TRUE; -} - - -my_bool do_test(uint bitsize) -{ - MY_BITMAP map; - my_bitmap_map buf[1024]; - if (bitmap_init(&map, buf, bitsize, FALSE)) - { - printf("init error for bitsize %d", bitsize); - goto error; - } - if (test_set_get_clear_bit(&map,bitsize)) - goto error; - bitmap_clear_all(&map); - if (test_flip_bit(&map,bitsize)) - goto error; - bitmap_clear_all(&map); - if (test_operators(&map,bitsize)) - goto error; - bitmap_clear_all(&map); - if (test_get_all_bits(&map, bitsize)) - goto error; - bitmap_clear_all(&map); - if (test_compare_operators(&map,bitsize)) - goto error; - bitmap_clear_all(&map); - if (test_count_bits_set(&map,bitsize)) - goto error; - bitmap_clear_all(&map); - if (test_get_first_bit(&map,bitsize)) - goto error; - bitmap_clear_all(&map); - if (test_get_next_bit(&map,bitsize)) - goto error; - if (test_prefix(&map,bitsize)) - goto error; - return FALSE; -error: - printf("\n"); - return TRUE; -} - -int main() -{ - int i; - for (i= 1; i < 4096; i++) - { - printf("Start test for bitsize=%u\n",i); - if (do_test(i)) - return -1; - } - printf("OK\n"); - return 0; -} - -/* - In directory mysys: - make test_bitmap - will build the bitmap tests and ./test_bitmap will execute it -*/ - -#endif diff --git a/externals/mysql/mysys/my_chmod.c b/externals/mysql/mysys/my_chmod.c deleted file mode 100644 index afdea75883..0000000000 --- a/externals/mysql/mysys/my_chmod.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" - -/** - @brief Change mode of file. - - @fn my_chmod() - @param name Filename - @param mode_t Mode - @param my_flags Flags - - @notes - The mode of the file given by path or referenced by fildes is changed - - @retval 0 Ok - @retval # Error -*/ - -int my_chmod(const char *name, mode_t mode, myf my_flags) -{ - DBUG_ENTER("my_chmod"); - DBUG_PRINT("my",("name: %s mode: %lu flags: %d", name, (ulong) mode, - my_flags)); - - if (chmod(name, mode)) - { - my_errno= errno; - if (my_flags & MY_WME) - my_error(EE_CANT_CHMOD, MYF(0), name, (ulong) mode, my_errno); - DBUG_RETURN(1); - } - DBUG_RETURN(0); -} diff --git a/externals/mysql/mysys/my_chsize.c b/externals/mysql/mysys/my_chsize.c deleted file mode 100644 index b9013811b3..0000000000 --- a/externals/mysql/mysys/my_chsize.c +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include "m_string.h" - -/* - Change size of file. - - SYNOPSIS - my_chsize() - fd File descriptor - new_length New file size - filler If we don't have truncate, fill up all bytes after - new_length with this character - MyFlags Flags - - DESCRIPTION - my_chsize() truncates file if shorter else fill with the filler character. - The function also changes the file pointer. Usually it points to the end - of the file after execution. - - RETURN VALUE - 0 Ok - 1 Error -*/ -int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags) -{ - my_off_t oldsize; - uchar buff[IO_SIZE]; - DBUG_ENTER("my_chsize"); - DBUG_PRINT("my",("fd: %d length: %lu MyFlags: %d",fd,(ulong) newlength, - MyFlags)); - - if ((oldsize= my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE))) == newlength) - DBUG_RETURN(0); - - DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize)); - - if (oldsize > newlength) - { -#ifdef _WIN32 - if (my_win_chsize(fd, newlength)) - { - my_errno= errno; - goto err; - } - DBUG_RETURN(0); -#elif defined(HAVE_FTRUNCATE) - if (ftruncate(fd, (off_t) newlength)) - { - my_errno= errno; - goto err; - } - DBUG_RETURN(0); -#elif defined(HAVE_CHSIZE) - if (chsize(fd, (off_t) newlength)) - { - my_errno=errno; - goto err; - } - DBUG_RETURN(0); -#else - /* - Fill space between requested length and true length with 'filler' - We should never come here on any modern machine - */ - if (my_seek(fd, newlength, MY_SEEK_SET, MYF(MY_WME+MY_FAE)) - == MY_FILEPOS_ERROR) - { - goto err; - } - swap_variables(my_off_t, newlength, oldsize); -#endif - } - - /* Full file with 'filler' until it's as big as requested */ - bfill(buff, IO_SIZE, filler); - while (newlength-oldsize > IO_SIZE) - { - if (my_write(fd, buff, IO_SIZE, MYF(MY_NABP))) - goto err; - oldsize+= IO_SIZE; - } - if (my_write(fd,buff,(size_t) (newlength-oldsize), MYF(MY_NABP))) - goto err; - DBUG_RETURN(0); - -err: - DBUG_PRINT("error", ("errno: %d", errno)); - if (MyFlags & MY_WME) - my_error(EE_CANT_CHSIZE, MYF(ME_BELL+ME_WAITTANG), my_errno); - DBUG_RETURN(1); -} /* my_chsize */ diff --git a/externals/mysql/mysys/my_clock.c b/externals/mysql/mysys/my_clock.c deleted file mode 100644 index d17f26ed31..0000000000 --- a/externals/mysql/mysys/my_clock.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "my_global.h" - -#if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__NETWARE__) -#include "mysys_priv.h" -#include -#endif - -long my_clock(void) -{ -#if !defined(__WIN__) && !defined(__NETWARE__) - struct tms tmsbuf; - (void) times(&tmsbuf); - return (tmsbuf.tms_utime + tmsbuf.tms_stime); -#else - return clock(); -#endif -} diff --git a/externals/mysql/mysys/my_compress.c b/externals/mysql/mysys/my_compress.c deleted file mode 100644 index 7edd07b18e..0000000000 --- a/externals/mysql/mysys/my_compress.c +++ /dev/null @@ -1,264 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Written by Sinisa Milivojevic */ - -#include -#ifdef HAVE_COMPRESS -#include -#ifndef SCO -#include -#endif -#include - -/* - This replaces the packet with a compressed packet - - SYNOPSIS - my_compress() - packet Data to compress. This is is replaced with the compressed data. - len Length of data to compress at 'packet' - complen out: 0 if packet was not compressed - - RETURN - 1 error. 'len' is not changed' - 0 ok. In this case 'len' contains the size of the compressed packet -*/ - -my_bool my_compress(uchar *packet, size_t *len, size_t *complen) -{ - DBUG_ENTER("my_compress"); - if (*len < MIN_COMPRESS_LENGTH) - { - *complen=0; - DBUG_PRINT("note",("Packet too short: Not compressed")); - } - else - { - uchar *compbuf=my_compress_alloc(packet,len,complen); - if (!compbuf) - DBUG_RETURN(*complen ? 0 : 1); - memcpy(packet,compbuf,*len); - my_free(compbuf,MYF(MY_WME)); - } - DBUG_RETURN(0); -} - - -uchar *my_compress_alloc(const uchar *packet, size_t *len, size_t *complen) -{ - uchar *compbuf; - uLongf tmp_complen; - int res; - *complen= *len * 120 / 100 + 12; - - if (!(compbuf= (uchar *) my_malloc(*complen, MYF(MY_WME)))) - return 0; /* Not enough memory */ - - tmp_complen= (uLongf) *complen; - res= compress((Bytef*) compbuf, &tmp_complen, (Bytef*) packet, (uLong) *len); - *complen= tmp_complen; - - if (res != Z_OK) - { - my_free(compbuf, MYF(MY_WME)); - return 0; - } - - if (*complen >= *len) - { - *complen= 0; - my_free(compbuf, MYF(MY_WME)); - DBUG_PRINT("note",("Packet got longer on compression; Not compressed")); - return 0; - } - /* Store length of compressed packet in *len */ - swap_variables(size_t, *len, *complen); - return compbuf; -} - - -/* - Uncompress packet - - SYNOPSIS - my_uncompress() - packet Compressed data. This is is replaced with the orignal data. - len Length of compressed data - complen Length of the packet buffer (must be enough for the original - data) - - RETURN - 1 error - 0 ok. In this case 'complen' contains the updated size of the - real data. -*/ - -my_bool my_uncompress(uchar *packet, size_t len, size_t *complen) -{ - uLongf tmp_complen; - DBUG_ENTER("my_uncompress"); - - if (*complen) /* If compressed */ - { - uchar *compbuf= (uchar *) my_malloc(*complen,MYF(MY_WME)); - int error; - if (!compbuf) - DBUG_RETURN(1); /* Not enough memory */ - - tmp_complen= (uLongf) *complen; - error= uncompress((Bytef*) compbuf, &tmp_complen, (Bytef*) packet, - (uLong) len); - *complen= tmp_complen; - if (error != Z_OK) - { /* Probably wrong packet */ - DBUG_PRINT("error",("Can't uncompress packet, error: %d",error)); - my_free(compbuf, MYF(MY_WME)); - DBUG_RETURN(1); - } - memcpy(packet, compbuf, *complen); - my_free(compbuf, MYF(MY_WME)); - } - else - *complen= len; - DBUG_RETURN(0); -} - -/* - Internal representation of the frm blob is: - - ver 4 bytes - orglen 4 bytes - complen 4 bytes -*/ - -#define BLOB_HEADER 12 - - -/* - packfrm is a method used to compress the frm file for storage in a - handler. This method was developed for the NDB handler and has been moved - here to serve also other uses. - - SYNOPSIS - packfrm() - data Data reference to frm file data. - len Length of frm file data - out:pack_data Reference to the pointer to the packed frm data - out:pack_len Length of packed frm file data - - NOTES - data is replaced with compressed content - - RETURN VALUES - 0 Success - >0 Failure -*/ - -int packfrm(uchar *data, size_t len, - uchar **pack_data, size_t *pack_len) -{ - int error; - size_t org_len, comp_len, blob_len; - uchar *blob; - DBUG_ENTER("packfrm"); - DBUG_PRINT("enter", ("data: %p len: %lu", data, (ulong) len)); - - error= 1; - org_len= len; - if (my_compress((uchar*)data, &org_len, &comp_len)) - goto err; - - DBUG_PRINT("info", ("org_len: %lu comp_len: %lu", (ulong) org_len, - (ulong) comp_len)); - DBUG_DUMP("compressed", data, org_len); - - error= 2; - blob_len= BLOB_HEADER + org_len; - if (!(blob= (uchar*) my_malloc(blob_len,MYF(MY_WME)))) - goto err; - - /* Store compressed blob in machine independent format */ - int4store(blob, 1); - int4store(blob+4, (uint32) len); - int4store(blob+8, (uint32) org_len); /* compressed length */ - - /* Copy frm data into blob, already in machine independent format */ - memcpy(blob+BLOB_HEADER, data, org_len); - - *pack_data= blob; - *pack_len= blob_len; - error= 0; - - DBUG_PRINT("exit", ("pack_data: %p pack_len: %lu", - *pack_data, (ulong) *pack_len)); -err: - DBUG_RETURN(error); - -} - -/* - unpackfrm is a method used to decompress the frm file received from a - handler. This method was developed for the NDB handler and has been moved - here to serve also other uses for other clustered storage engines. - - SYNOPSIS - unpackfrm() - pack_data Data reference to packed frm file data - out:unpack_data Reference to the pointer to the unpacked frm data - out:unpack_len Length of unpacked frm file data - - RETURN VALUES? - 0 Success - >0 Failure -*/ - -int unpackfrm(uchar **unpack_data, size_t *unpack_len, - const uchar *pack_data) -{ - uchar *data; - size_t complen, orglen; - ulong ver; - DBUG_ENTER("unpackfrm"); - DBUG_PRINT("enter", ("pack_data: %p", pack_data)); - - ver= uint4korr(pack_data); - orglen= uint4korr(pack_data+4); - complen= uint4korr(pack_data+8); - - DBUG_PRINT("blob",("ver: %lu complen: %lu orglen: %lu", - ver, (ulong) complen, (ulong) orglen)); - DBUG_DUMP("blob->data", pack_data + BLOB_HEADER, complen); - - if (ver != 1) - DBUG_RETURN(1); - if (!(data= my_malloc(max(orglen, complen), MYF(MY_WME)))) - DBUG_RETURN(2); - memcpy(data, pack_data + BLOB_HEADER, complen); - - if (my_uncompress(data, complen, &orglen)) - { - my_free(data, MYF(0)); - DBUG_RETURN(3); - } - - *unpack_data= data; - *unpack_len= orglen; - - DBUG_PRINT("exit", ("frmdata: %p len: %lu", *unpack_data, - (ulong) *unpack_len)); - DBUG_RETURN(0); -} -#endif /* HAVE_COMPRESS */ diff --git a/externals/mysql/mysys/my_conio.c b/externals/mysql/mysys/my_conio.c deleted file mode 100644 index b78966446e..0000000000 --- a/externals/mysql/mysys/my_conio.c +++ /dev/null @@ -1,222 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include "mysys_priv.h" - -#ifdef __WIN__ - -static HANDLE my_coninpfh= 0; /* console input */ - -/* - functions my_pthread_auto_mutex_lock & my_pthread_auto_mutex_free - are experimental at this moment, they are intended to bring - ability of protecting code sections without necessity to explicitly - initialize synchronization object in one of threads - - if found useful they are to be exported in mysys -*/ - - -/* - int my_pthread_auto_mutex_lock(HANDLE* ph, const char* name, - int id, int time) - NOTES - creates a mutex with given name and tries to lock it time msec. - mutex name is appended with id to allow system wide or process wide - locks. Handle to created mutex returned in ph argument. - - RETURN - 0 thread owns mutex - <>0 error -*/ - -static -int my_pthread_auto_mutex_lock(HANDLE* ph, const char* name, int id, int time) -{ - int res; - char tname[FN_REFLEN]; - - sprintf(tname, "%s-%08X", name, id); - - *ph= CreateMutex(NULL, FALSE, tname); - if (*ph == NULL) - return GetLastError(); - - res= WaitForSingleObject(*ph, time); - - if (res == WAIT_TIMEOUT) - return ERROR_SEM_TIMEOUT; - - if (res == WAIT_FAILED) - return GetLastError(); - - return 0; -} - -/* - int my_pthread_auto_mutex_free(HANDLE* ph) - - NOTES - releases a mutex. - - RETURN - 0 thread released mutex - <>0 error - -*/ -static -int my_pthread_auto_mutex_free(HANDLE* ph) -{ - if (*ph) - { - ReleaseMutex(*ph); - CloseHandle(*ph); - *ph= NULL; - } - - return 0; -} - - -#define pthread_auto_mutex_decl(name) \ - HANDLE __h##name= NULL; - -#define pthread_auto_mutex_lock(name, proc, time) \ - my_pthread_auto_mutex_lock(&__h##name, #name, (proc), (time)) - -#define pthread_auto_mutex_free(name) \ - my_pthread_auto_mutex_free(&__h##name) - - -/* - char* my_cgets() - - NOTES - Replaces _cgets from libc to support input of more than 255 chars. - Reads from the console via ReadConsole into buffer which - should be at least clen characters. - Actual length of string returned in plen. - - WARNING - my_cgets() does NOT check the pushback character buffer (i.e., _chbuf). - Thus, my_cgets() will not return any character that is pushed back by - the _ungetch() call. - - RETURN - string pointer ok - NULL Error - -*/ - -char* my_cgets(char *buffer, size_t clen, size_t* plen) -{ - ULONG state; - char *result; - DWORD plen_res; - CONSOLE_SCREEN_BUFFER_INFO csbi; - - pthread_auto_mutex_decl(my_conio_cs); - - /* lock the console for the current process*/ - if (pthread_auto_mutex_lock(my_conio_cs, GetCurrentProcessId(), INFINITE)) - { - /* can not lock console */ - pthread_auto_mutex_free(my_conio_cs); - return NULL; - } - - /* init console input */ - if (my_coninpfh == 0) - { - /* same handle will be used until process termination */ - my_coninpfh= CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, 0, NULL); - } - - if (my_coninpfh == INVALID_HANDLE_VALUE) - { - /* unlock the console */ - pthread_auto_mutex_free(my_conio_cs); - return(NULL); - } - - GetConsoleMode((HANDLE)my_coninpfh, &state); - SetConsoleMode((HANDLE)my_coninpfh, ENABLE_LINE_INPUT | - ENABLE_PROCESSED_INPUT | ENABLE_ECHO_INPUT); - - GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); - - /* - there is no known way to determine allowed buffer size for input - though it is known it should not be more than 64K - so we cut 64K and try first size of screen buffer - if it is still to large we cut half of it and try again - later we may want to cycle from min(clen, 65535) to allowed size - with small decrement to determine exact allowed buffer - */ - clen= min(clen, 65535); - do - { - clen= min(clen, (size_t) csbi.dwSize.X*csbi.dwSize.Y); - if (!ReadConsole((HANDLE)my_coninpfh, (LPVOID)buffer, clen - 1, &plen_res, - NULL)) - { - result= NULL; - clen>>= 1; - } - else - { - result= buffer; - break; - } - } - while (GetLastError() == ERROR_NOT_ENOUGH_MEMORY); - *plen= plen_res; - - /* We go here on error reading the string (Ctrl-C for example) */ - if (!*plen) - result= NULL; /* purecov: inspected */ - - if (result != NULL) - { - if (*plen > 1 && buffer[*plen - 2] == '\r') - { - *plen= *plen - 2; - } - else - { - if (*plen > 0 && buffer[*plen - 1] == '\r') - { - char tmp[3]; - int tmplen= sizeof(tmp); - - *plen= *plen - 1; - /* read /n left in the buffer */ - ReadConsole((HANDLE)my_coninpfh, (LPVOID)tmp, tmplen, &tmplen, NULL); - } - } - buffer[*plen]= '\0'; - } - - SetConsoleMode((HANDLE)my_coninpfh, state); - /* unlock the console */ - pthread_auto_mutex_free(my_conio_cs); - - return result; -} - -#endif /* __WIN__ */ diff --git a/externals/mysql/mysys/my_copy.c b/externals/mysql/mysys/my_copy.c deleted file mode 100644 index 60096e9ea8..0000000000 --- a/externals/mysql/mysys/my_copy.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include /* for stat */ -#include -#if defined(HAVE_UTIME_H) -#include -#elif defined(HAVE_SYS_UTIME_H) -#include -#elif !defined(HPUX10) -#include -struct utimbuf { - time_t actime; - time_t modtime; -}; -#endif - - -/* - int my_copy(const char *from, const char *to, myf MyFlags) - - NOTES - Ordinary ownership and accesstimes are copied from 'from-file' - If MyFlags & MY_HOLD_ORIGINAL_MODES is set and to-file exists then - the modes of to-file isn't changed - If MyFlags & MY_DONT_OVERWRITE_FILE is set, we will give an error - if the file existed. - - WARNING - Don't set MY_FNABP or MY_NABP bits on when calling this function ! - - RETURN - 0 ok - # Error - -*/ - -int my_copy(const char *from, const char *to, myf MyFlags) -{ - uint Count; - my_bool new_file_stat= 0; /* 1 if we could stat "to" */ - int create_flag; - File from_file,to_file; - uchar buff[IO_SIZE]; - MY_STAT stat_buff,new_stat_buff; - DBUG_ENTER("my_copy"); - DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags)); - - from_file=to_file= -1; - DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */ - if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */ - new_file_stat= test(my_stat((char*) to, &new_stat_buff, MYF(0))); - - if ((from_file=my_open(from,O_RDONLY | O_SHARE,MyFlags)) >= 0) - { - if (!my_stat(from, &stat_buff, MyFlags)) - { - my_errno=errno; - goto err; - } - if (MyFlags & MY_HOLD_ORIGINAL_MODES && new_file_stat) - stat_buff=new_stat_buff; - create_flag= (MyFlags & MY_DONT_OVERWRITE_FILE) ? O_EXCL : O_TRUNC; - - if ((to_file= my_create(to,(int) stat_buff.st_mode, - O_WRONLY | create_flag | O_BINARY | O_SHARE, - MyFlags)) < 0) - goto err; - - while ((Count=my_read(from_file, buff, sizeof(buff), MyFlags)) != 0) - { - if (Count == (uint) -1 || - my_write(to_file,buff,Count,MYF(MyFlags | MY_NABP))) - goto err; - } - - if (my_close(from_file,MyFlags) | my_close(to_file,MyFlags)) - DBUG_RETURN(-1); /* Error on close */ - - /* Copy modes if possible */ - - if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat) - DBUG_RETURN(0); /* File copyed but not stat */ - (void) chmod(to, stat_buff.st_mode & 07777); /* Copy modes */ -#if !defined(__WIN__) && !defined(__NETWARE__) - (void) chown(to, stat_buff.st_uid,stat_buff.st_gid); /* Copy ownership */ -#endif -#if !defined(VMS) && !defined(__ZTC__) - if (MyFlags & MY_COPYTIME) - { - struct utimbuf timep; - timep.actime = stat_buff.st_atime; - timep.modtime = stat_buff.st_mtime; - (void) utime((char*) to, &timep); /* last accessed and modified times */ - } -#endif - DBUG_RETURN(0); - } - -err: - if (from_file >= 0) (void) my_close(from_file,MyFlags); - if (to_file >= 0) - { - (void) my_close(to_file, MyFlags); - /* attempt to delete the to-file we've partially written */ - (void) my_delete(to, MyFlags); - } - DBUG_RETURN(-1); -} /* my_copy */ diff --git a/externals/mysql/mysys/my_create.c b/externals/mysql/mysys/my_create.c deleted file mode 100644 index d0436276d0..0000000000 --- a/externals/mysql/mysys/my_create.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include -#include "mysys_err.h" -#include -#include -#if defined(_WIN32) -#include -#endif - - /* - ** Create a new file - ** Arguments: - ** Path-name of file - ** Read | write on file (umask value) - ** Read & Write on open file - ** Special flags - */ - - -File my_create(const char *FileName, int CreateFlags, int access_flags, - myf MyFlags) -{ - int fd, rc; - DBUG_ENTER("my_create"); - DBUG_PRINT("my",("Name: '%s' CreateFlags: %d AccessFlags: %d MyFlags: %d", - FileName, CreateFlags, access_flags, MyFlags)); - -#if !defined(NO_OPEN_3) - fd= open((char *) FileName, access_flags | O_CREAT, - CreateFlags ? CreateFlags : my_umask); -#elif defined(_WIN32) - fd= my_win_open(FileName, access_flags | O_CREAT); -#else - fd= open(FileName, access_flags); -#endif - - if ((MyFlags & MY_SYNC_DIR) && (fd >=0) && - my_sync_dir_by_file(FileName, MyFlags)) - { - my_close(fd, MyFlags); - fd= -1; - } - - rc= my_register_filename(fd, FileName, FILE_BY_CREATE, - EE_CANTCREATEFILE, MyFlags); - /* - my_register_filename() may fail on some platforms even if the call to - *open() above succeeds. In this case, don't leave the stale file because - callers assume the file to not exist if my_create() fails, so they don't - do any cleanups. - */ - if (unlikely(fd >= 0 && rc < 0)) - { - int tmp= my_errno; - my_close(fd, MyFlags); - my_delete(FileName, MyFlags); - my_errno= tmp; - } - - DBUG_RETURN(rc); -} /* my_create */ diff --git a/externals/mysql/mysys/my_delete.c b/externals/mysql/mysys/my_delete.c deleted file mode 100644 index edee1c4e87..0000000000 --- a/externals/mysql/mysys/my_delete.c +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include - -int my_delete(const char *name, myf MyFlags) -{ - int err; - DBUG_ENTER("my_delete"); - DBUG_PRINT("my",("name %s MyFlags %d", name, MyFlags)); - - if ((err = unlink(name)) == -1) - { - my_errno=errno; - if (MyFlags & (MY_FAE+MY_WME)) - my_error(EE_DELETE,MYF(ME_BELL+ME_WAITTANG+(MyFlags & ME_NOINPUT)), - name,errno); - } - else if ((MyFlags & MY_SYNC_DIR) && - my_sync_dir_by_file(name, MyFlags)) - err= -1; - DBUG_RETURN(err); -} /* my_delete */ - -#if defined(__WIN__) -/** - Delete file which is possibly not closed. - - This function is intended to be used exclusively as a temporal solution - for Win NT in case when it is needed to delete a not closed file (note - that the file must be opened everywhere with FILE_SHARE_DELETE mode). - Deleting not-closed files can not be supported on Win 98|ME (and because - of that is considered harmful). - - The function deletes the file with its preliminary renaming. This is - because when not-closed share-delete file is deleted it still lives on - a disk until it will not be closed everwhere. This may conflict with an - attempt to create a new file with the same name. The deleted file is - renamed to ..deleted where - the initial name of the - file, - a hexadecimal number chosen to make the temporal name to - be unique. - - @param the name of the being deleted file - @param the flags instructing how to react on an error internally in - the function - - @note The per-thread @c my_errno holds additional info for a caller to - decide how critical the error can be. - - @retval - 0 ok - @retval - 1 error - - -*/ -int nt_share_delete(const char *name, myf MyFlags) -{ - char buf[MAX_PATH + 20]; - ulong cnt; - DBUG_ENTER("nt_share_delete"); - DBUG_PRINT("my",("name %s MyFlags %d", name, MyFlags)); - - for (cnt= GetTickCount(); cnt; cnt--) - { - errno= 0; - sprintf(buf, "%s.%08X.deleted", name, cnt); - if (MoveFile(name, buf)) - break; - - if ((errno= GetLastError()) == ERROR_ALREADY_EXISTS) - continue; - - /* This happened during tests with MERGE tables. */ - if (errno == ERROR_ACCESS_DENIED) - continue; - - DBUG_PRINT("warning", ("Failed to rename %s to %s, errno: %d", - name, buf, errno)); - break; - } - - if (errno == ERROR_FILE_NOT_FOUND) - { - my_errno= ENOENT; // marking, that `name' doesn't exist - } - else if (errno == 0) - { - if (DeleteFile(buf)) - DBUG_RETURN(0); - else if ((my_errno= GetLastError()) == 0) - my_errno= ENOENT; // marking, that `buf' doesn't exist - } else - my_errno= errno; - - if (MyFlags & (MY_FAE+MY_WME)) - my_error(EE_DELETE, MYF(ME_BELL + ME_WAITTANG + (MyFlags & ME_NOINPUT)), - name, my_errno); - DBUG_RETURN(-1); -} -#endif diff --git a/externals/mysql/mysys/my_div.c b/externals/mysql/mysys/my_div.c deleted file mode 100644 index d29d366885..0000000000 --- a/externals/mysql/mysys/my_div.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" - -/* - Get filename of file - - SYNOPSIS - my_filename() - fd File descriptor -*/ - -char * my_filename(File fd) -{ - DBUG_ENTER("my_filename"); - if ((uint) fd >= (uint) my_file_limit) - DBUG_RETURN((char*) "UNKNOWN"); - if (fd >= 0 && my_file_info[fd].type != UNOPEN) - { - DBUG_RETURN(my_file_info[fd].name); - } - else - DBUG_RETURN((char*) "UNOPENED"); /* Debug message */ -} diff --git a/externals/mysql/mysys/my_dup.c b/externals/mysql/mysys/my_dup.c deleted file mode 100644 index 5fdd6e9f36..0000000000 --- a/externals/mysql/mysys/my_dup.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#include -#if defined(__WIN__) -#include -#endif - - /* Open a file */ - -File my_dup(File file, myf MyFlags) -{ - File fd; - const char *filename; - DBUG_ENTER("my_dup"); - DBUG_PRINT("my",("file: %d MyFlags: %d", file, MyFlags)); -#ifdef _WIN32 - fd= my_win_dup(file); -#else - fd= dup(file); -#endif - filename= (((uint) file < my_file_limit) ? - my_file_info[(int) file].name : "Unknown"); - DBUG_RETURN(my_register_filename(fd, filename, FILE_BY_DUP, - EE_FILENOTFOUND, MyFlags)); -} /* my_open */ diff --git a/externals/mysql/mysys/my_error.c b/externals/mysql/mysys/my_error.c deleted file mode 100644 index dea5748011..0000000000 --- a/externals/mysql/mysys/my_error.c +++ /dev/null @@ -1,289 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#include -#include - -/* Max length of a error message. Should be kept in sync with MYSQL_ERRMSG_SIZE. */ -#define ERRMSGSIZE (512) - -/* Define some external variables for error handling */ - -/* - WARNING! - my_error family functions have to be used according following rules: - - if message have not parameters use my_message(ER_CODE, ER(ER_CODE), MYF(N)) - - if message registered use my_error(ER_CODE, MYF(N), ...). - - With some special text of errror message use: - my_printf_error(ER_CODE, format, MYF(N), ...) -*/ - -/* - Message texts are registered into a linked list of 'my_err_head' structs. - Each struct contains (1.) an array of pointers to C character strings with - '\0' termination, (2.) the error number for the first message in the array - (array index 0) and (3.) the error number for the last message in the array - (array index (last - first)). - The array may contain gaps with NULL pointers and pointers to empty strings. - Both kinds of gaps will be translated to "Unknown error %d.", if my_error() - is called with a respective error number. - The list of header structs is sorted in increasing order of error numbers. - Negative error numbers are allowed. Overlap of error numbers is not allowed. - Not registered error numbers will be translated to "Unknown error %d.". -*/ -static struct my_err_head -{ - struct my_err_head *meh_next; /* chain link */ - const char **meh_errmsgs; /* error messages array */ - int meh_first; /* error number matching array slot 0 */ - int meh_last; /* error number matching last slot */ -} my_errmsgs_globerrs = {NULL, globerrs, EE_ERROR_FIRST, EE_ERROR_LAST}; - -static struct my_err_head *my_errmsgs_list= &my_errmsgs_globerrs; - - -/* - Error message to user - - SYNOPSIS - my_error() - nr Errno - MyFlags Flags - ... variable list -*/ - -void my_error(int nr, myf MyFlags, ...) -{ - const char *format; - struct my_err_head *meh_p; - va_list args; - char ebuff[ERRMSGSIZE]; - DBUG_ENTER("my_error"); - DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d", nr, MyFlags, errno)); - - /* Search for the error messages array, which could contain the message. */ - for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next) - if (nr <= meh_p->meh_last) - break; - - /* get the error message string. Default, if NULL or empty string (""). */ - if (! (format= (meh_p && (nr >= meh_p->meh_first)) ? - meh_p->meh_errmsgs[nr - meh_p->meh_first] : NULL) || ! *format) - (void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr); - else - { - va_start(args,MyFlags); - (void) my_vsnprintf(ebuff, sizeof(ebuff), format, args); - va_end(args); - } - (*error_handler_hook)(nr, ebuff, MyFlags); - DBUG_VOID_RETURN; -} - - -/* - Error as printf - - SYNOPSIS - my_printf_error() - error Errno - format Format string - MyFlags Flags - ... variable list -*/ - -void my_printf_error(uint error, const char *format, myf MyFlags, ...) -{ - va_list args; - char ebuff[ERRMSGSIZE]; - DBUG_ENTER("my_printf_error"); - DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d format: %s", - error, MyFlags, errno, format)); - - va_start(args,MyFlags); - (void) my_vsnprintf(ebuff, sizeof(ebuff), format, args); - va_end(args); - (*error_handler_hook)(error, ebuff, MyFlags); - DBUG_VOID_RETURN; -} - - -/* - Error with va_list - - SYNOPSIS - my_printv_error() - error Errno - format Format string - MyFlags Flags - ... variable list -*/ - -void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap) -{ - char ebuff[ERRMSGSIZE]; - DBUG_ENTER("my_printv_error"); - DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d format: %s", - error, MyFlags, errno, format)); - - (void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap); - (*error_handler_hook)(error, ebuff, MyFlags); - DBUG_VOID_RETURN; -} - - -/* - Give message using error_handler_hook - - SYNOPSIS - my_message() - error Errno - str Error message - MyFlags Flags -*/ - -void my_message(uint error, const char *str, register myf MyFlags) -{ - (*error_handler_hook)(error, str, MyFlags); -} - - -/* - Register error messages for use with my_error(). - - SYNOPSIS - my_error_register() - errmsgs array of pointers to error messages - first error number of first message in the array - last error number of last message in the array - - DESCRIPTION - The pointer array is expected to contain addresses to NUL-terminated - C character strings. The array contains (last - first + 1) pointers. - NULL pointers and empty strings ("") are allowed. These will be mapped to - "Unknown error" when my_error() is called with a matching error number. - This function registers the error numbers 'first' to 'last'. - No overlapping with previously registered error numbers is allowed. - - RETURN - 0 OK - != 0 Error -*/ - -int my_error_register(const char **errmsgs, int first, int last) -{ - struct my_err_head *meh_p; - struct my_err_head **search_meh_pp; - - /* Allocate a new header structure. */ - if (! (meh_p= (struct my_err_head*) my_malloc(sizeof(struct my_err_head), - MYF(MY_WME)))) - return 1; - meh_p->meh_errmsgs= errmsgs; - meh_p->meh_first= first; - meh_p->meh_last= last; - - /* Search for the right position in the list. */ - for (search_meh_pp= &my_errmsgs_list; - *search_meh_pp; - search_meh_pp= &(*search_meh_pp)->meh_next) - { - if ((*search_meh_pp)->meh_last > first) - break; - } - - /* Error numbers must be unique. No overlapping is allowed. */ - if (*search_meh_pp && ((*search_meh_pp)->meh_first <= last)) - { - my_free((uchar*)meh_p, MYF(0)); - return 1; - } - - /* Insert header into the chain. */ - meh_p->meh_next= *search_meh_pp; - *search_meh_pp= meh_p; - return 0; -} - - -/* - Unregister formerly registered error messages. - - SYNOPSIS - my_error_unregister() - first error number of first message - last error number of last message - - DESCRIPTION - This function unregisters the error numbers 'first' to 'last'. - These must have been previously registered by my_error_register(). - 'first' and 'last' must exactly match the registration. - If a matching registration is present, the header is removed from the - list and the pointer to the error messages pointers array is returned. - Otherwise, NULL is returned. - - RETURN - non-NULL OK, returns address of error messages pointers array. - NULL Error, no such number range registered. -*/ - -const char **my_error_unregister(int first, int last) -{ - struct my_err_head *meh_p; - struct my_err_head **search_meh_pp; - const char **errmsgs; - - /* Search for the registration in the list. */ - for (search_meh_pp= &my_errmsgs_list; - *search_meh_pp; - search_meh_pp= &(*search_meh_pp)->meh_next) - { - if (((*search_meh_pp)->meh_first == first) && - ((*search_meh_pp)->meh_last == last)) - break; - } - if (! *search_meh_pp) - return NULL; - - /* Remove header from the chain. */ - meh_p= *search_meh_pp; - *search_meh_pp= meh_p->meh_next; - - /* Save the return value and free the header. */ - errmsgs= meh_p->meh_errmsgs; - my_free((uchar*) meh_p, MYF(0)); - - return errmsgs; -} - - -void my_error_unregister_all(void) -{ - struct my_err_head *cursor, *saved_next; - - for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next) - { - /* We need this ptr, but we're about to free its container, so save it. */ - saved_next= cursor->meh_next; - - my_free((uchar*) cursor, MYF(0)); - } - my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */ - - my_errmsgs_list= &my_errmsgs_globerrs; -} diff --git a/externals/mysql/mysys/my_file.c b/externals/mysql/mysys/my_file.c deleted file mode 100644 index ec0c9c425e..0000000000 --- a/externals/mysql/mysys/my_file.c +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "my_static.h" -#include - -/* - set how many open files we want to be able to handle - - SYNOPSIS - set_maximum_open_files() - max_file_limit Files to open - - NOTES - The request may not fulfilled becasue of system limitations - - RETURN - Files available to open. - May be more or less than max_file_limit! -*/ - -#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE) - -#ifndef RLIM_INFINITY -#define RLIM_INFINITY ((uint) 0xffffffff) -#endif - -static uint set_max_open_files(uint max_file_limit) -{ - struct rlimit rlimit; - uint old_cur; - DBUG_ENTER("set_max_open_files"); - DBUG_PRINT("enter",("files: %u", max_file_limit)); - - if (!getrlimit(RLIMIT_NOFILE,&rlimit)) - { - old_cur= (uint) rlimit.rlim_cur; - DBUG_PRINT("info", ("rlim_cur: %u rlim_max: %u", - (uint) rlimit.rlim_cur, - (uint) rlimit.rlim_max)); - if (rlimit.rlim_cur == RLIM_INFINITY) - rlimit.rlim_cur = max_file_limit; - if (rlimit.rlim_cur >= max_file_limit) - DBUG_RETURN(rlimit.rlim_cur); /* purecov: inspected */ - rlimit.rlim_cur= rlimit.rlim_max= max_file_limit; - if (setrlimit(RLIMIT_NOFILE, &rlimit)) - max_file_limit= old_cur; /* Use original value */ - else - { - rlimit.rlim_cur= 0; /* Safety if next call fails */ - (void) getrlimit(RLIMIT_NOFILE,&rlimit); - DBUG_PRINT("info", ("rlim_cur: %u", (uint) rlimit.rlim_cur)); - if (rlimit.rlim_cur) /* If call didn't fail */ - max_file_limit= (uint) rlimit.rlim_cur; - } - } - DBUG_PRINT("exit",("max_file_limit: %u", max_file_limit)); - DBUG_RETURN(max_file_limit); -} - -#else -static int set_max_open_files(uint max_file_limit) -{ - /* We don't know the limit. Return best guess */ - return min(max_file_limit, OS_FILE_LIMIT); -} -#endif - - -/* - Change number of open files - - SYNOPSIS: - my_set_max_open_files() - files Number of requested files - - RETURN - number of files available for open -*/ - -uint my_set_max_open_files(uint files) -{ - struct st_my_file_info *tmp; - DBUG_ENTER("my_set_max_open_files"); - DBUG_PRINT("enter",("files: %u my_file_limit: %u", files, my_file_limit)); - - files+= MY_FILE_MIN; - files= set_max_open_files(min(files, OS_FILE_LIMIT)); - if (files <= MY_NFILE) - DBUG_RETURN(files); - - if (!(tmp= (struct st_my_file_info*) my_malloc(sizeof(*tmp) * files, - MYF(MY_WME)))) - DBUG_RETURN(MY_NFILE); - - /* Copy any initialized files */ - memcpy((char*) tmp, (char*) my_file_info, - sizeof(*tmp) * min(my_file_limit, files)); - bzero((char*) (tmp + my_file_limit), - max((int) (files- my_file_limit), 0)*sizeof(*tmp)); - my_free_open_file_info(); /* Free if already allocated */ - my_file_info= tmp; - my_file_limit= files; - DBUG_PRINT("exit",("files: %u", files)); - DBUG_RETURN(files); -} - - -void my_free_open_file_info() -{ - DBUG_ENTER("my_free_file_info"); - if (my_file_info != my_file_info_default) - { - /* Copy data back for my_print_open_files */ - memcpy((char*) my_file_info_default, my_file_info, - sizeof(*my_file_info_default)* MY_NFILE); - my_free((char*) my_file_info, MYF(0)); - my_file_info= my_file_info_default; - my_file_limit= MY_NFILE; - } - DBUG_VOID_RETURN; -} diff --git a/externals/mysql/mysys/my_fopen.c b/externals/mysql/mysys/my_fopen.c deleted file mode 100644 index ef8a385dcf..0000000000 --- a/externals/mysql/mysys/my_fopen.c +++ /dev/null @@ -1,226 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "my_static.h" -#include -#include "mysys_err.h" - -static void make_ftype(char * to,int flag); - -/* - Open a file as stream - - SYNOPSIS - my_fopen() - FileName Path-name of file - Flags Read | write | append | trunc (like for open()) - MyFlags Flags for handling errors - - RETURN - 0 Error - # File handler -*/ - -FILE *my_fopen(const char *filename, int flags, myf MyFlags) -{ - FILE *fd; - char type[5]; - DBUG_ENTER("my_fopen"); - DBUG_PRINT("my",("Name: '%s' flags: %d MyFlags: %d", - filename, flags, MyFlags)); - - make_ftype(type,flags); - -#ifdef _WIN32 - fd= my_win_fopen(filename, type); -#else - fd= fopen(filename, type); -#endif - if (fd != 0) - { - /* - The test works if MY_NFILE < 128. The problem is that fileno() is char - on some OS (SUNOS). Actually the filename save isn't that important - so we can ignore if this doesn't work. - */ - - int filedesc= my_fileno(fd); - if ((uint)filedesc >= my_file_limit) - { - thread_safe_increment(my_stream_opened,&THR_LOCK_open); - DBUG_RETURN(fd); /* safeguard */ - } - pthread_mutex_lock(&THR_LOCK_open); - if ((my_file_info[filedesc].name= (char*) - my_strdup(filename,MyFlags))) - { - my_stream_opened++; - my_file_total_opened++; - my_file_info[filedesc].type= STREAM_BY_FOPEN; - pthread_mutex_unlock(&THR_LOCK_open); - DBUG_PRINT("exit",("stream: %p", fd)); - DBUG_RETURN(fd); - } - pthread_mutex_unlock(&THR_LOCK_open); - (void) my_fclose(fd,MyFlags); - my_errno=ENOMEM; - } - else - my_errno=errno; - DBUG_PRINT("error",("Got error %d on open",my_errno)); - if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) - my_error((flags & O_RDONLY) || (flags == O_RDONLY ) ? EE_FILENOTFOUND : - EE_CANTCREATEFILE, - MYF(ME_BELL+ME_WAITTANG), filename, my_errno); - DBUG_RETURN((FILE*) 0); -} /* my_fopen */ - - - /* Close a stream */ - -/* Close a stream */ -int my_fclose(FILE *fd, myf MyFlags) -{ - int err,file; - DBUG_ENTER("my_fclose"); - DBUG_PRINT("my",("stream: %p MyFlags: %d", fd, MyFlags)); - - pthread_mutex_lock(&THR_LOCK_open); - file= my_fileno(fd); -#ifndef _WIN32 - err= fclose(fd); -#else - err= my_win_fclose(fd); -#endif - if(err < 0) - { - my_errno=errno; - if (MyFlags & (MY_FAE | MY_WME)) - my_error(EE_BADCLOSE, MYF(ME_BELL+ME_WAITTANG), - my_filename(file),errno); - } - else - my_stream_opened--; - if ((uint) file < my_file_limit && my_file_info[file].type != UNOPEN) - { - my_file_info[file].type = UNOPEN; - my_free(my_file_info[file].name, MYF(MY_ALLOW_ZERO_PTR)); - } - pthread_mutex_unlock(&THR_LOCK_open); - DBUG_RETURN(err); -} /* my_fclose */ - - - /* Make a stream out of a file handle */ - /* Name may be 0 */ - -FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags) -{ - FILE *fd; - char type[5]; - DBUG_ENTER("my_fdopen"); - DBUG_PRINT("my",("fd: %d Flags: %d MyFlags: %d", - Filedes, Flags, MyFlags)); - - make_ftype(type,Flags); -#ifdef _WIN32 - fd= my_win_fdopen(Filedes, type); -#else - fd= fdopen(Filedes, type); -#endif - if (!fd) - { - my_errno=errno; - if (MyFlags & (MY_FAE | MY_WME)) - my_error(EE_CANT_OPEN_STREAM, MYF(ME_BELL+ME_WAITTANG),errno); - } - else - { - pthread_mutex_lock(&THR_LOCK_open); - my_stream_opened++; - if ((uint) Filedes < (uint) my_file_limit) - { - if (my_file_info[Filedes].type != UNOPEN) - { - my_file_opened--; /* File is opened with my_open ! */ - } - else - { - my_file_info[Filedes].name= my_strdup(name,MyFlags); - } - my_file_info[Filedes].type = STREAM_BY_FDOPEN; - } - pthread_mutex_unlock(&THR_LOCK_open); - } - - DBUG_PRINT("exit",("stream: %p", fd)); - DBUG_RETURN(fd); -} /* my_fdopen */ - - -/* - Make a fopen() typestring from a open() type bitmap - - SYNOPSIS - make_ftype() - to String for fopen() is stored here - flag Flag used by open() - - IMPLEMENTATION - This routine attempts to find the best possible match - between a numeric option and a string option that could be - fed to fopen. There is not a 1 to 1 mapping between the two. - - NOTE - On Unix, O_RDONLY is usually 0 - - MAPPING - r == O_RDONLY - w == O_WRONLY|O_TRUNC|O_CREAT - a == O_WRONLY|O_APPEND|O_CREAT - r+ == O_RDWR - w+ == O_RDWR|O_TRUNC|O_CREAT - a+ == O_RDWR|O_APPEND|O_CREAT -*/ - -static void make_ftype(register char * to, register int flag) -{ - /* check some possible invalid combinations */ - DBUG_ASSERT((flag & (O_TRUNC | O_APPEND)) != (O_TRUNC | O_APPEND)); - DBUG_ASSERT((flag & (O_WRONLY | O_RDWR)) != (O_WRONLY | O_RDWR)); - - if ((flag & (O_RDONLY|O_WRONLY)) == O_WRONLY) - *to++= (flag & O_APPEND) ? 'a' : 'w'; - else if (flag & O_RDWR) - { - /* Add '+' after theese */ - if (flag & (O_TRUNC | O_CREAT)) - *to++= 'w'; - else if (flag & O_APPEND) - *to++= 'a'; - else - *to++= 'r'; - *to++= '+'; - } - else - *to++= 'r'; - -#if FILE_BINARY /* If we have binary-files */ - if (flag & FILE_BINARY) - *to++='b'; -#endif - *to='\0'; -} /* make_ftype */ diff --git a/externals/mysql/mysys/my_fstream.c b/externals/mysql/mysys/my_fstream.c deleted file mode 100644 index c7006e0a95..0000000000 --- a/externals/mysql/mysys/my_fstream.c +++ /dev/null @@ -1,195 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* USE_MY_STREAM isn't set because we can't thrust my_fclose! */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#include - -#ifdef HAVE_FSEEKO -#undef ftell -#undef fseek -#define ftell(A) ftello(A) -#define fseek(A,B,C) fseeko((A),(B),(C)) -#endif - -/* - Read a chunk of bytes from a FILE - - SYNOPSIS - my_fread() - stream File descriptor - Buffer Buffer to read to - Count Number of bytes to read - MyFlags Flags on what to do on error - - RETURN - (size_t) -1 Error - # Number of bytes read - */ - -size_t my_fread(FILE *stream, uchar *Buffer, size_t Count, myf MyFlags) -{ - size_t readbytes; - DBUG_ENTER("my_fread"); - DBUG_PRINT("my",("stream: %p Buffer: %p Count: %u MyFlags: %d", - stream, Buffer, (uint) Count, MyFlags)); - - if ((readbytes= fread(Buffer, sizeof(char), Count, stream)) != Count) - { - DBUG_PRINT("error",("Read only %d bytes", (int) readbytes)); - if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) - { - if (ferror(stream)) - my_error(EE_READ, MYF(ME_BELL+ME_WAITTANG), - my_filename(my_fileno(stream)),errno); - else - if (MyFlags & (MY_NABP | MY_FNABP)) - my_error(EE_EOFERR, MYF(ME_BELL+ME_WAITTANG), - my_filename(my_fileno(stream)),errno); - } - my_errno=errno ? errno : -1; - if (ferror(stream) || MyFlags & (MY_NABP | MY_FNABP)) - DBUG_RETURN((size_t) -1); /* Return with error */ - } - if (MyFlags & (MY_NABP | MY_FNABP)) - DBUG_RETURN(0); /* Read ok */ - DBUG_RETURN(readbytes); -} /* my_fread */ - - -/* - Write a chunk of bytes to a stream - - my_fwrite() - stream File descriptor - Buffer Buffer to write from - Count Number of bytes to write - MyFlags Flags on what to do on error - - RETURN - (size_t) -1 Error - # Number of bytes written -*/ - -size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags) -{ - size_t writtenbytes =0; - my_off_t seekptr; -#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM) - uint errors; -#endif - DBUG_ENTER("my_fwrite"); - DBUG_PRINT("my",("stream: %p Buffer: %p Count: %u MyFlags: %d", - stream, Buffer, (uint) Count, MyFlags)); - -#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM) - errors=0; -#endif - seekptr= ftell(stream); - for (;;) - { - size_t written; - if ((written = (size_t) fwrite((char*) Buffer,sizeof(char), - Count, stream)) != Count) - { - DBUG_PRINT("error",("Write only %d bytes", (int) writtenbytes)); - my_errno=errno; - if (written != (size_t) -1) - { - seekptr+=written; - Buffer+=written; - writtenbytes+=written; - Count-=written; - } -#ifdef EINTR - if (errno == EINTR) - { - (void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)); - continue; - } -#endif -#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM) -#ifdef THREAD - if (my_thread_var->abort) - MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */ -#endif - if ((errno == ENOSPC || errno == EDQUOT) && - (MyFlags & MY_WAIT_IF_FULL)) - { - wait_for_free_space("[stream]", errors); - errors++; - (void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)); - continue; - } -#endif - if (ferror(stream) || (MyFlags & (MY_NABP | MY_FNABP))) - { - if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) - { - my_error(EE_WRITE, MYF(ME_BELL+ME_WAITTANG), - my_filename(my_fileno(stream)),errno); - } - writtenbytes= (size_t) -1; /* Return that we got error */ - break; - } - } - if (MyFlags & (MY_NABP | MY_FNABP)) - writtenbytes= 0; /* Everything OK */ - else - writtenbytes+= written; - break; - } - DBUG_RETURN(writtenbytes); -} /* my_fwrite */ - - -/* Seek to position in file */ - -my_off_t my_fseek(FILE *stream, my_off_t pos, int whence, - myf MyFlags __attribute__((unused))) -{ - DBUG_ENTER("my_fseek"); - DBUG_PRINT("my",("stream: %p pos: %lu whence: %d MyFlags: %d", - stream, (long) pos, whence, MyFlags)); - DBUG_RETURN(fseek(stream, (off_t) pos, whence) ? - MY_FILEPOS_ERROR : (my_off_t) ftell(stream)); -} /* my_seek */ - - -/* Tell current position of file */ - -my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused))) -{ - off_t pos; - DBUG_ENTER("my_ftell"); - DBUG_PRINT("my",("stream: %p MyFlags: %d", stream, MyFlags)); - pos=ftell(stream); - DBUG_PRINT("exit",("ftell: %lu",(ulong) pos)); - DBUG_RETURN((my_off_t) pos); -} /* my_ftell */ - - -/* Get a File corresponding to the stream*/ -int my_fileno(FILE *f) -{ -#ifdef _WIN32 - return my_win_fileno(f); -#else - return fileno(f); -#endif -} diff --git a/externals/mysql/mysys/my_gethostbyname.c b/externals/mysql/mysys/my_gethostbyname.c deleted file mode 100644 index 067fdfee9d..0000000000 --- a/externals/mysql/mysys/my_gethostbyname.c +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (C) 2002, 2004 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* Thread safe version of gethostbyname_r() */ - -#include "mysys_priv.h" -#if !defined(__WIN__) -#include -#endif -#include - -/* This file is not needed if my_gethostbyname_r is a macro */ -#if !defined(my_gethostbyname_r) - -/* - Emulate SOLARIS style calls, not because it's better, but just to make the - usage of getbostbyname_r simpler. -*/ - -#if defined(HAVE_GETHOSTBYNAME_R) - -#if defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) - -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop) -{ - struct hostent *hp; - DBUG_ASSERT((size_t) buflen >= sizeof(*result)); - if (gethostbyname_r(name,result, buffer, (size_t) buflen, &hp, h_errnop)) - return 0; - return hp; -} - -#elif defined(HAVE_GETHOSTBYNAME_R_RETURN_INT) - -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop) -{ - if (gethostbyname_r(name,result,(struct hostent_data *) buffer) == -1) - { - *h_errnop= errno; - return 0; - } - return result; -} - -#else - -/* gethostbyname_r with similar interface as gethostbyname() */ - -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop) -{ - struct hostent *hp; - DBUG_ASSERT(buflen >= sizeof(struct hostent_data)); - hp= gethostbyname_r(name,result,(struct hostent_data *) buffer); - *h_errnop= errno; - return hp; -} -#endif /* GLIBC2_STYLE_GETHOSTBYNAME_R */ - -#else /* !HAVE_GETHOSTBYNAME_R */ - -#ifdef THREAD -extern pthread_mutex_t LOCK_gethostbyname_r; -#endif - -/* - No gethostbyname_r() function exists. - In this case we have to keep a mutex over the call to ensure that no - other thread is going to reuse the internal memory. - - The user is responsible to call my_gethostbyname_r_free() when he - is finished with the structure. -*/ - -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop) -{ - struct hostent *hp; - pthread_mutex_lock(&LOCK_gethostbyname_r); - hp= gethostbyname(name); - *h_errnop= h_errno; - return hp; -} - -void my_gethostbyname_r_free() -{ - pthread_mutex_unlock(&LOCK_gethostbyname_r); -} - -#endif /* !HAVE_GETHOSTBYNAME_R */ -#endif /* !my_gethostbyname_r */ diff --git a/externals/mysql/mysys/my_gethwaddr.c b/externals/mysql/mysys/my_gethwaddr.c deleted file mode 100644 index 7fae1a5144..0000000000 --- a/externals/mysql/mysys/my_gethwaddr.c +++ /dev/null @@ -1,222 +0,0 @@ -/* Copyright (C) 2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* get hardware address for an interface */ -/* if there are many available, any non-zero one can be used */ - -#include "mysys_priv.h" -#include - -#ifndef MAIN - -#if defined(__FreeBSD__) || defined(__linux__) -static my_bool memcpy_and_test(uchar *to, uchar *from, uint len) -{ - uint i, res=1; - - for (i=0; i < len; i++) - if ((*to++= *from++)) - res=0; - return res; -} -#endif /* FreeBSD || linux */ - -#ifdef __FreeBSD__ - -#include -#include -#include -#include -#include - -my_bool my_gethwaddr(uchar *to) -{ - size_t len; - uchar *buf, *next, *end, *addr; - struct if_msghdr *ifm; - struct sockaddr_dl *sdl; - int i, res=1, mib[6]={CTL_NET, AF_ROUTE, 0, AF_LINK, NET_RT_IFLIST, 0}; - - if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) - goto err; - if (!(buf = alloca(len))) - goto err; - if (sysctl(mib, 6, buf, &len, NULL, 0) < 0) - goto err; - - end = buf + len; - - for (next = buf ; res && next < end ; next += ifm->ifm_msglen) - { - ifm = (struct if_msghdr *)next; - if (ifm->ifm_type == RTM_IFINFO) - { - sdl = (struct sockaddr_dl *)(ifm + 1); - addr=LLADDR(sdl); - res=memcpy_and_test(to, addr, ETHER_ADDR_LEN); - } - } - -err: - return res; -} - -#elif __linux__ - -#include -#include -#include - -my_bool my_gethwaddr(uchar *to) -{ - int fd, res=1; - struct ifreq ifr; - - fd = socket(AF_INET, SOCK_DGRAM, 0); - if (fd < 0) - goto err; - - bzero(&ifr, sizeof(ifr)); - strnmov(ifr.ifr_name, "eth0", sizeof(ifr.ifr_name) - 1); - - do { - if (ioctl(fd, SIOCGIFHWADDR, &ifr) >= 0) - res=memcpy_and_test(to, (uchar *)&ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN); - } while (res && (errno == 0 || errno == ENODEV) && ifr.ifr_name[3]++ < '6'); - - close(fd); -err: - return res; -} - -#elif defined(__WIN__) -#include - -/* - The following typedef is for dynamically loading - iphlpapi.dll / GetAdaptersAddresses. Dynamic loading is - used because GetAdaptersAddresses is not available on Windows 2000 - which MySQL still supports. Static linking would cause an unresolved export. -*/ -typedef DWORD (WINAPI *pfnGetAdaptersAddresses)(IN ULONG Family, - IN DWORD Flags,IN PVOID Reserved, - OUT PIP_ADAPTER_ADDRESSES pAdapterAddresses, - IN OUT PULONG pOutBufLen); - -/* - my_gethwaddr - Windows version - - @brief Retrieve MAC address from network hardware - - @param[out] to MAC address exactly six bytes - - @return Operation status - @retval 0 OK - @retval <>0 FAILED -*/ -my_bool my_gethwaddr(uchar *to) -{ - PIP_ADAPTER_ADDRESSES pAdapterAddresses; - PIP_ADAPTER_ADDRESSES pCurrAddresses; - IP_ADAPTER_ADDRESSES adapterAddresses; - ULONG address_len; - my_bool return_val= 1; - static pfnGetAdaptersAddresses fnGetAdaptersAddresses= - (pfnGetAdaptersAddresses)-1; - - if(fnGetAdaptersAddresses == (pfnGetAdaptersAddresses)-1) - { - /* Get the function from the DLL */ - fnGetAdaptersAddresses= (pfnGetAdaptersAddresses) - GetProcAddress(LoadLibrary("iphlpapi.dll"), - "GetAdaptersAddresses"); - } - if (!fnGetAdaptersAddresses) - return 1; /* failed to get function */ - address_len= sizeof (IP_ADAPTER_ADDRESSES); - - /* Get the required size for the address data. */ - if (fnGetAdaptersAddresses(AF_UNSPEC, 0, 0, &adapterAddresses, &address_len) - == ERROR_BUFFER_OVERFLOW) - { - pAdapterAddresses= my_malloc(address_len, 0); - if (!pAdapterAddresses) - return 1; /* error, alloc failed */ - } - else - pAdapterAddresses= &adapterAddresses; /* one is enough don't alloc */ - - /* Get the hardware info. */ - if (fnGetAdaptersAddresses(AF_UNSPEC, 0, 0, pAdapterAddresses, &address_len) - == NO_ERROR) - { - pCurrAddresses= pAdapterAddresses; - - while (pCurrAddresses) - { - /* Look for ethernet cards. */ - if (pCurrAddresses->IfType == IF_TYPE_ETHERNET_CSMACD) - { - /* check for a good address */ - if (pCurrAddresses->PhysicalAddressLength < 6) - continue; /* bad address */ - - /* save 6 bytes of the address in the 'to' parameter */ - memcpy(to, pCurrAddresses->PhysicalAddress, 6); - - /* Network card found, we're done. */ - return_val= 0; - break; - } - pCurrAddresses= pCurrAddresses->Next; - } - } - - /* Clean up memory allocation. */ - if (pAdapterAddresses != &adapterAddresses) - my_free(pAdapterAddresses, 0); - - return return_val; -} - -#else /* __FreeBSD__ || __linux__ || __WIN__ */ -/* just fail */ -my_bool my_gethwaddr(uchar *to __attribute__((unused))) -{ - return 1; -} -#endif - -#else /* MAIN */ -int main(int argc __attribute__((unused)),char **argv) -{ - uchar mac[6]; - uint i; - MY_INIT(argv[0]); - if (my_gethwaddr(mac)) - { - printf("my_gethwaddr failed with errno %d\n", errno); - exit(1); - } - for (i=0; i < sizeof(mac); i++) - { - if (i) printf(":"); - printf("%02x", mac[i]); - } - printf("\n"); - return 0; -} -#endif - diff --git a/externals/mysql/mysys/my_getncpus.c b/externals/mysql/mysys/my_getncpus.c deleted file mode 100644 index c09684abe5..0000000000 --- a/externals/mysql/mysys/my_getncpus.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* get the number of (online) CPUs */ - -#include "mysys_priv.h" -#ifdef HAVE_UNISTD_H -#include -#endif - -static int ncpus=0; - -int my_getncpus() -{ - if (!ncpus) - { -#ifdef _SC_NPROCESSORS_ONLN - ncpus= sysconf(_SC_NPROCESSORS_ONLN); -#elif defined(__WIN__) - SYSTEM_INFO sysinfo; - - /* - * We are not calling GetNativeSystemInfo here because (1) we - * don't believe that they return different values for number - * of processors and (2) if WOW64 limits processors for Win32 - * then we don't want to try to override that. - */ - GetSystemInfo(&sysinfo); - - ncpus= sysinfo.dwNumberOfProcessors; -#else -/* unknown so play safe: assume SMP and forbid uniprocessor build */ - ncpus= 2; -#endif - } - return ncpus; -} diff --git a/externals/mysql/mysys/my_getopt.c b/externals/mysql/mysys/my_getopt.c deleted file mode 100644 index a16cc0897a..0000000000 --- a/externals/mysql/mysys/my_getopt.c +++ /dev/null @@ -1,1301 +0,0 @@ -/* Copyright (C) 2002-2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include -#include - -typedef void (*init_func_p)(const struct my_option *option, uchar* *variable, - longlong value); - -static void default_reporter(enum loglevel level, const char *format, ...); -my_error_reporter my_getopt_error_reporter= &default_reporter; - -static int findopt(char *, uint, const struct my_option **, char **); -my_bool getopt_compare_strings(const char *, const char *, uint); -static longlong getopt_ll(char *, const struct my_option *, int *); -static ulonglong getopt_ull(char *, const struct my_option *, int *); -static double getopt_double(char *, const struct my_option *, int *); -static void init_variables(const struct my_option *, init_func_p); -static void init_one_value(const struct my_option *opt, uchar **, longlong); -static void fini_one_value(const struct my_option *, uchar **, longlong); -static int setval(const struct my_option *, uchar **, char *, my_bool); -static char *check_struct_option(char *cur_arg, char *key_name); - -/* - The following three variables belong to same group and the number and - order of their arguments must correspond to each other. -*/ -static const char *special_opt_prefix[]= -{"skip", "disable", "enable", "maximum", "loose", 0}; -static const uint special_opt_prefix_lengths[]= -{ 4, 7, 6, 7, 5, 0}; -enum enum_special_opt -{ OPT_SKIP, OPT_DISABLE, OPT_ENABLE, OPT_MAXIMUM, OPT_LOOSE}; - -char *disabled_my_option= (char*) "0"; - -/* - This is a flag that can be set in client programs. 0 means that - my_getopt will not print error messages, but the client should do - it by itself -*/ - -my_bool my_getopt_print_errors= 1; - -/* - This is a flag that can be set in client programs. 1 means that - my_getopt will skip over options it does not know how to handle. -*/ - -my_bool my_getopt_skip_unknown= 0; - -static void default_reporter(enum loglevel level, - const char *format, ...) -{ - va_list args; - va_start(args, format); - if (level == WARNING_LEVEL) - fprintf(stderr, "%s", "Warning: "); - else if (level == INFORMATION_LEVEL) - fprintf(stderr, "%s", "Info: "); - vfprintf(stderr, format, args); - va_end(args); - fputc('\n', stderr); - fflush(stderr); -} - -/* - function: handle_options - - Sort options; put options first, until special end of options (--), or - until end of argv. Parse options; check that the given option matches with - one of the options in struct 'my_option', return error in case of ambiguous - or unknown option. Check that option was given an argument if it requires - one. Call function 'get_one_option()' once for each option. -*/ - -static uchar** (*getopt_get_addr)(const char *, uint, const struct my_option *, int *); - -void my_getopt_register_get_addr(uchar** (*func_addr)(const char *, uint, - const struct my_option *, int *)) -{ - getopt_get_addr= func_addr; -} - -int handle_options(int *argc, char ***argv, - const struct my_option *longopts, - my_get_one_option get_one_option) -{ - uint opt_found, argvpos= 0, length; - my_bool end_of_options= 0, must_be_var, set_maximum_value, - option_is_loose; - char **pos, **pos_end, *optend, *prev_found, - *opt_str, key_name[FN_REFLEN]; - const struct my_option *optp; - uchar* *value; - int error, i; - my_bool is_cmdline_arg= 1; - - LINT_INIT(opt_found); - /* handle_options() assumes arg0 (program name) always exists */ - DBUG_ASSERT(argc && *argc >= 1); - DBUG_ASSERT(argv && *argv); - (*argc)--; /* Skip the program name */ - (*argv)++; /* --- || ---- */ - init_variables(longopts, init_one_value); - - /* - Search for args_separator, if found, then the first part of the - arguments are loaded from configs - */ - for (pos= *argv, pos_end=pos+ *argc; pos != pos_end ; pos++) - { - if (*pos == args_separator) - { - is_cmdline_arg= 0; - break; - } - } - - for (pos= *argv, pos_end=pos+ *argc; pos != pos_end ; pos++) - { - char **first= pos; - char *cur_arg= *pos; - if (!is_cmdline_arg && (cur_arg == args_separator)) - { - is_cmdline_arg= 1; - - /* save the separator too if skip unkown options */ - if (my_getopt_skip_unknown) - (*argv)[argvpos++]= cur_arg; - else - (*argc)--; - continue; - } - if (cur_arg[0] == '-' && cur_arg[1] && !end_of_options) /* must be opt */ - { - char *argument= 0; - must_be_var= 0; - set_maximum_value= 0; - option_is_loose= 0; - - cur_arg++; /* skip '-' */ - if (*cur_arg == '-' || *cur_arg == 'O') /* check for long option, */ - { /* --set-variable, or -O */ - if (*cur_arg == 'O') - { - must_be_var= 1; - - if (!(*++cur_arg)) /* If not -Ovar=# */ - { - /* the argument must be in next argv */ - if (!*++pos) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: Option '-O' requires an argument", - my_progname); - return EXIT_ARGUMENT_REQUIRED; - } - cur_arg= *pos; - (*argc)--; - } - } - else if (!getopt_compare_strings(cur_arg, "-set-variable", 13)) - { - must_be_var= 1; - if (cur_arg[13] == '=') - { - cur_arg+= 14; - if (!*cur_arg) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: Option '--set-variable' requires an argument", - my_progname); - return EXIT_ARGUMENT_REQUIRED; - } - } - else if (cur_arg[14]) /* garbage, or another option. break out */ - must_be_var= 0; - else - { - /* the argument must be in next argv */ - if (!*++pos) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: Option '--set-variable' requires an argument", - my_progname); - return EXIT_ARGUMENT_REQUIRED; - } - cur_arg= *pos; - (*argc)--; - } - } - else if (!must_be_var) - { - if (!*++cur_arg) /* skip the double dash */ - { - /* '--' means end of options, look no further */ - end_of_options= 1; - (*argc)--; - continue; - } - } - opt_str= check_struct_option(cur_arg, key_name); - optend= strcend(opt_str, '='); - length= (uint) (optend - opt_str); - if (*optend == '=') - optend++; - else - optend= 0; - - /* - Find first the right option. Return error in case of an ambiguous, - or unknown option - */ - LINT_INIT(prev_found); - optp= longopts; - if (!(opt_found= findopt(opt_str, length, &optp, &prev_found))) - { - /* - Didn't find any matching option. Let's see if someone called - option with a special option prefix - */ - if (!must_be_var) - { - if (optend) - must_be_var= 1; /* option is followed by an argument */ - for (i= 0; special_opt_prefix[i]; i++) - { - if (!getopt_compare_strings(special_opt_prefix[i], opt_str, - special_opt_prefix_lengths[i]) && - (opt_str[special_opt_prefix_lengths[i]] == '-' || - opt_str[special_opt_prefix_lengths[i]] == '_')) - { - /* - We were called with a special prefix, we can reuse opt_found - */ - opt_str+= special_opt_prefix_lengths[i] + 1; - length-= special_opt_prefix_lengths[i] + 1; - if (i == OPT_LOOSE) - option_is_loose= 1; - if ((opt_found= findopt(opt_str, length, &optp, &prev_found))) - { - if (opt_found > 1) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: ambiguous option '--%s-%s' (--%s-%s)", - my_progname, special_opt_prefix[i], - cur_arg, special_opt_prefix[i], - prev_found); - return EXIT_AMBIGUOUS_OPTION; - } - switch (i) { - case OPT_SKIP: - case OPT_DISABLE: /* fall through */ - /* - double negation is actually enable again, - for example: --skip-option=0 -> option = TRUE - */ - optend= (optend && *optend == '0' && !(*(optend + 1))) ? - (char*) "1" : disabled_my_option; - break; - case OPT_ENABLE: - optend= (optend && *optend == '0' && !(*(optend + 1))) ? - disabled_my_option : (char*) "1"; - break; - case OPT_MAXIMUM: - set_maximum_value= 1; - must_be_var= 1; - break; - } - break; /* break from the inner loop, main loop continues */ - } - i= -1; /* restart the loop */ - } - } - } - if (!opt_found) - { - if (my_getopt_skip_unknown) - { - /* - preserve all the components of this unknown option, this may - occurr when the user provides options like: "-O foo" or - "--set-variable foo" (note that theres a space in there) - Generally, these kind of options are to be avoided - */ - do { - (*argv)[argvpos++]= *first++; - } while (first <= pos); - continue; - } - if (must_be_var) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(option_is_loose ? - WARNING_LEVEL : ERROR_LEVEL, - "%s: unknown variable '%s'", - my_progname, cur_arg); - if (!option_is_loose) - return EXIT_UNKNOWN_VARIABLE; - } - else - { - if (my_getopt_print_errors) - my_getopt_error_reporter(option_is_loose ? - WARNING_LEVEL : ERROR_LEVEL, - "%s: unknown option '--%s'", - my_progname, cur_arg); - if (!option_is_loose) - return EXIT_UNKNOWN_OPTION; - } - if (option_is_loose) - { - (*argc)--; - continue; - } - } - } - if (opt_found > 1) - { - if (must_be_var) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: variable prefix '%s' is not unique", - my_progname, opt_str); - return EXIT_VAR_PREFIX_NOT_UNIQUE; - } - else - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: ambiguous option '--%s' (%s, %s)", - my_progname, opt_str, prev_found, - optp->name); - return EXIT_AMBIGUOUS_OPTION; - } - } - if ((optp->var_type & GET_TYPE_MASK) == GET_DISABLED) - { - if (my_getopt_print_errors) - fprintf(stderr, - "%s: %s: Option '%s' used, but is disabled\n", my_progname, - option_is_loose ? "WARNING" : "ERROR", opt_str); - if (option_is_loose) - { - (*argc)--; - continue; - } - return EXIT_OPTION_DISABLED; - } - if (must_be_var && (optp->var_type & GET_TYPE_MASK) == GET_NO_ARG) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: option '%s' cannot take an argument", - my_progname, optp->name); - return EXIT_NO_ARGUMENT_ALLOWED; - } - error= 0; - value= optp->var_type & GET_ASK_ADDR ? - (*getopt_get_addr)(key_name, (uint) strlen(key_name), optp, &error) : - optp->value; - if (error) - return error; - - if (optp->arg_type == NO_ARG) - { - if (optend && (optp->var_type & GET_TYPE_MASK) != GET_BOOL) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: option '--%s' cannot take an argument", - my_progname, optp->name); - return EXIT_NO_ARGUMENT_ALLOWED; - } - if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL) - { - /* - Set bool to 1 if no argument or if the user has used - --enable-'option-name'. - *optend was set to '0' if one used --disable-option - */ - (*argc)--; - if (!optend || *optend == '1' || - !my_strcasecmp(&my_charset_latin1, optend, "true")) - *((my_bool*) value)= (my_bool) 1; - else if (*optend == '0' || - !my_strcasecmp(&my_charset_latin1, optend, "false")) - *((my_bool*) value)= (my_bool) 0; - else - { - my_getopt_error_reporter(WARNING_LEVEL, - "%s: ignoring option '--%s' due to \ -invalid value '%s'", - my_progname, optp->name, optend); - continue; - } - if (get_one_option(optp->id, optp, - *((my_bool*) value) ? - (char*) "1" : disabled_my_option)) - return EXIT_ARGUMENT_INVALID; - continue; - } - argument= optend; - } - else if (optp->arg_type == OPT_ARG && - (optp->var_type & GET_TYPE_MASK) == GET_BOOL) - { - if (optend == disabled_my_option) - *((my_bool*) value)= (my_bool) 0; - else - { - if (!optend) /* No argument -> enable option */ - *((my_bool*) value)= (my_bool) 1; - else - argument= optend; - } - } - else if (optp->arg_type == REQUIRED_ARG && !optend) - { - /* Check if there are more arguments after this one, - - Note: options loaded from config file that requires value - should always be in the form '--option=value'. - */ - if (!is_cmdline_arg || !*++pos) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: option '--%s' requires an argument", - my_progname, optp->name); - return EXIT_ARGUMENT_REQUIRED; - } - argument= *pos; - (*argc)--; - } - else - argument= optend; - } - else /* must be short option */ - { - for (optend= cur_arg; *optend; optend++) - { - opt_found= 0; - for (optp= longopts; optp->id; optp++) - { - if (optp->id == (int) (uchar) *optend) - { - /* Option recognized. Find next what to do with it */ - opt_found= 1; - if ((optp->var_type & GET_TYPE_MASK) == GET_DISABLED) - { - if (my_getopt_print_errors) - fprintf(stderr, - "%s: ERROR: Option '-%c' used, but is disabled\n", - my_progname, optp->id); - return EXIT_OPTION_DISABLED; - } - if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL && - optp->arg_type == NO_ARG) - { - *((my_bool*) optp->value)= (my_bool) 1; - if (get_one_option(optp->id, optp, argument)) - return EXIT_UNSPECIFIED_ERROR; - continue; - } - else if (optp->arg_type == REQUIRED_ARG || - optp->arg_type == OPT_ARG) - { - if (*(optend + 1)) - { - /* The rest of the option is option argument */ - argument= optend + 1; - /* This is in effect a jump out of the outer loop */ - optend= (char*) " "; - } - else - { - if (optp->arg_type == OPT_ARG) - { - if (optp->var_type == GET_BOOL) - *((my_bool*) optp->value)= (my_bool) 1; - if (get_one_option(optp->id, optp, argument)) - return EXIT_UNSPECIFIED_ERROR; - continue; - } - /* Check if there are more arguments after this one */ - if (!pos[1]) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: option '-%c' requires an argument", - my_progname, optp->id); - return EXIT_ARGUMENT_REQUIRED; - } - argument= *++pos; - (*argc)--; - /* the other loop will break, because *optend + 1 == 0 */ - } - } - if ((error= setval(optp, optp->value, argument, - set_maximum_value))) - { - my_getopt_error_reporter(ERROR_LEVEL, - "%s: Error while setting value '%s' to '%s'", - my_progname, argument, optp->name); - return error; - } - if (get_one_option(optp->id, optp, argument)) - return EXIT_UNSPECIFIED_ERROR; - break; - } - } - if (!opt_found) - { - if (my_getopt_print_errors) - my_getopt_error_reporter(ERROR_LEVEL, - "%s: unknown option '-%c'", - my_progname, *optend); - return EXIT_UNKNOWN_OPTION; - } - } - (*argc)--; /* option handled (short), decrease argument count */ - continue; - } - if ((error= setval(optp, value, argument, set_maximum_value))) - { - my_getopt_error_reporter(ERROR_LEVEL, - "%s: Error while setting value '%s' to '%s'", - my_progname, argument, optp->name); - return error; - } - if (get_one_option(optp->id, optp, argument)) - return EXIT_UNSPECIFIED_ERROR; - - (*argc)--; /* option handled (short or long), decrease argument count */ - } - else /* non-option found */ - (*argv)[argvpos++]= cur_arg; - } - /* - Destroy the first, already handled option, so that programs that look - for arguments in 'argv', without checking 'argc', know when to stop. - Items in argv, before the destroyed one, are all non-option -arguments - to the program, yet to be (possibly) handled. - */ - (*argv)[argvpos]= 0; - return 0; -} - - -/* - function: check_struct_option - - Arguments: Current argument under processing from argv and a variable - where to store the possible key name. - - Return value: In case option is a struct option, returns a pointer to - the current argument at the position where the struct option (key_name) - ends, the next character after the dot. In case argument is not a struct - option, returns a pointer to the argument. - - key_name will hold the name of the key, or 0 if not found. -*/ - -static char *check_struct_option(char *cur_arg, char *key_name) -{ - char *ptr, *end; - - ptr= strcend(cur_arg + 1, '.'); /* Skip the first character */ - end= strcend(cur_arg, '='); - - /* - If the first dot is after an equal sign, then it is part - of a variable value and the option is not a struct option. - Also, if the last character in the string before the ending - NULL, or the character right before equal sign is the first - dot found, the option is not a struct option. - */ - if (end - ptr > 1) - { - uint len= (uint) (ptr - cur_arg); - set_if_smaller(len, FN_REFLEN-1); - strmake(key_name, cur_arg, len); - return ++ptr; - } - else - { - key_name[0]= 0; - return cur_arg; - } -} - -/* - function: setval - - Arguments: opts, argument - Will set the option value to given value -*/ - -static int setval(const struct my_option *opts, uchar* *value, char *argument, - my_bool set_maximum_value) -{ - int err= 0; - - if (value && argument) - { - uchar* *result_pos= ((set_maximum_value) ? - opts->u_max_value : value); - - if (!result_pos) - return EXIT_NO_PTR_TO_VARIABLE; - - switch ((opts->var_type & GET_TYPE_MASK)) { - case GET_BOOL: /* If argument differs from 0, enable option, else disable */ - *((my_bool*) result_pos)= (my_bool) atoi(argument) != 0; - break; - case GET_INT: - *((int*) result_pos)= (int) getopt_ll(argument, opts, &err); - break; - case GET_UINT: - *((uint*) result_pos)= (uint) getopt_ull(argument, opts, &err); - break; - case GET_LONG: - *((long*) result_pos)= (long) getopt_ll(argument, opts, &err); - break; - case GET_ULONG: - *((long*) result_pos)= (long) getopt_ull(argument, opts, &err); - break; - case GET_LL: - *((longlong*) result_pos)= getopt_ll(argument, opts, &err); - break; - case GET_ULL: - *((ulonglong*) result_pos)= getopt_ull(argument, opts, &err); - break; - case GET_DOUBLE: - *((double*) result_pos)= getopt_double(argument, opts, &err); - break; - case GET_STR: - *((char**) result_pos)= argument; - break; - case GET_STR_ALLOC: - if ((*((char**) result_pos))) - my_free((*(char**) result_pos), MYF(MY_WME | MY_FAE)); - if (!(*((char**) result_pos)= my_strdup(argument, MYF(MY_WME)))) - return EXIT_OUT_OF_MEMORY; - break; - case GET_ENUM: - if (((*(int*)result_pos)= find_type(argument, opts->typelib, 2) - 1) < 0) - return EXIT_ARGUMENT_INVALID; - break; - case GET_SET: - *((ulonglong*)result_pos)= find_typeset(argument, opts->typelib, &err); - if (err) - return EXIT_ARGUMENT_INVALID; - break; - default: /* dummy default to avoid compiler warnings */ - break; - } - if (err) - return EXIT_UNKNOWN_SUFFIX; - } - return 0; -} - - -/* - Find option - - SYNOPSIS - findopt() - optpat Prefix of option to find (with - or _) - length Length of optpat - opt_res Options - ffname Place for pointer to first found name - - IMPLEMENTATION - Go through all options in the my_option struct. Return number - of options found that match the pattern and in the argument - list the option found, if any. In case of ambiguous option, store - the name in ffname argument - - RETURN - 0 No matching options - # Number of matching options - ffname points to first matching option -*/ - -static int findopt(char *optpat, uint length, - const struct my_option **opt_res, - char **ffname) -{ - uint count; - struct my_option *opt= (struct my_option *) *opt_res; - - for (count= 0; opt->name; opt++) - { - if (!getopt_compare_strings(opt->name, optpat, length)) /* match found */ - { - (*opt_res)= opt; - if (!opt->name[length]) /* Exact match */ - return 1; - if (!count) - { - count= 1; - *ffname= (char *) opt->name; /* We only need to know one prev */ - } - else if (strcmp(*ffname, opt->name)) - { - /* - The above test is to not count same option twice - (see mysql.cc, option "help") - */ - count++; - } - } - } - return count; -} - - -/* - function: compare_strings - - Works like strncmp, other than 1.) considers '-' and '_' the same. - 2.) Returns -1 if strings differ, 0 if they are equal -*/ - -my_bool getopt_compare_strings(register const char *s, register const char *t, - uint length) -{ - char const *end= s + length; - for (;s != end ; s++, t++) - { - if ((*s != '-' ? *s : '_') != (*t != '-' ? *t : '_')) - return 1; - } - return 0; -} - -/* - function: eval_num_suffix - - Transforms a number with a suffix to real number. Suffix can - be k|K for kilo, m|M for mega or g|G for giga. -*/ - -static longlong eval_num_suffix(char *argument, int *error, char *option_name) -{ - char *endchar; - longlong num; - - *error= 0; - errno= 0; - num= strtoll(argument, &endchar, 10); - if (errno == ERANGE) - { - my_getopt_error_reporter(ERROR_LEVEL, - "Incorrect integer value: '%s'", argument); - *error= 1; - return 0; - } - if (*endchar == 'k' || *endchar == 'K') - num*= 1024L; - else if (*endchar == 'm' || *endchar == 'M') - num*= 1024L * 1024L; - else if (*endchar == 'g' || *endchar == 'G') - num*= 1024L * 1024L * 1024L; - else if (*endchar) - { - fprintf(stderr, - "Unknown suffix '%c' used for variable '%s' (value '%s')\n", - *endchar, option_name, argument); - *error= 1; - return 0; - } - return num; -} - -/* - function: getopt_ll - - Evaluates and returns the value that user gave as an argument - to a variable. Recognizes (case insensitive) K as KILO, M as MEGA - and G as GIGA bytes. Some values must be in certain blocks, as - defined in the given my_option struct, this function will check - that those values are honored. - In case of an error, set error value in *err. -*/ - -static longlong getopt_ll(char *arg, const struct my_option *optp, int *err) -{ - longlong num=eval_num_suffix(arg, err, (char*) optp->name); - return getopt_ll_limit_value(num, optp, NULL); -} - -/* - function: getopt_ll_limit_value - - Applies min/max/block_size to a numeric value of an option. - Returns "fixed" value. -*/ - -longlong getopt_ll_limit_value(longlong num, const struct my_option *optp, - my_bool *fix) -{ - longlong old= num; - my_bool adjusted= FALSE; - char buf1[255], buf2[255]; - ulonglong block_size= (optp->block_size ? (ulonglong) optp->block_size : 1L); - - if (num > 0 && ((ulonglong) num > (ulonglong) optp->max_value) && - optp->max_value) /* if max value is not set -> no upper limit */ - { - num= (ulonglong) optp->max_value; - adjusted= TRUE; - } - - switch ((optp->var_type & GET_TYPE_MASK)) { - case GET_INT: - if (num > (longlong) INT_MAX) - { - num= ((longlong) INT_MAX); - adjusted= TRUE; - } - break; - case GET_LONG: -#if SIZEOF_LONG < SIZEOF_LONG_LONG - if (num > (longlong) LONG_MAX) - { - num= ((longlong) LONG_MAX); - adjusted= TRUE; - } -#endif - break; - default: - DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_LL); - break; - } - - num= ((num - optp->sub_size) / block_size); - num= (longlong) (num * block_size); - - if (num < optp->min_value) - { - num= optp->min_value; - if (old < optp->min_value) - adjusted= TRUE; - } - - if (fix) - *fix= adjusted; - else if (adjusted) - my_getopt_error_reporter(WARNING_LEVEL, - "option '%s': signed value %s adjusted to %s", - optp->name, llstr(old, buf1), llstr(num, buf2)); - return num; -} - -/* - function: getopt_ull - - This is the same as getopt_ll, but is meant for unsigned long long - values. -*/ - -static ulonglong getopt_ull(char *arg, const struct my_option *optp, int *err) -{ - ulonglong num= eval_num_suffix(arg, err, (char*) optp->name); - return getopt_ull_limit_value(num, optp, NULL); -} - - -ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, - my_bool *fix) -{ - my_bool adjusted= FALSE; - ulonglong old= num; - char buf1[255], buf2[255]; - - if ((ulonglong) num > (ulonglong) optp->max_value && - optp->max_value) /* if max value is not set -> no upper limit */ - { - num= (ulonglong) optp->max_value; - adjusted= TRUE; - } - - switch ((optp->var_type & GET_TYPE_MASK)) { - case GET_UINT: - if (num > (ulonglong) UINT_MAX) - { - num= ((ulonglong) UINT_MAX); - adjusted= TRUE; - } - break; - case GET_ULONG: -#if SIZEOF_LONG < SIZEOF_LONG_LONG - if (num > (ulonglong) ULONG_MAX) - { - num= ((ulonglong) ULONG_MAX); - adjusted= TRUE; - } -#endif - break; - default: - DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL); - break; - } - - if (optp->block_size > 1) - { - num/= (ulonglong) optp->block_size; - num*= (ulonglong) optp->block_size; - } - - if (num < (ulonglong) optp->min_value) - { - num= (ulonglong) optp->min_value; - if (old < (ulonglong) optp->min_value) - adjusted= TRUE; - } - - if (fix) - *fix= adjusted; - else if (adjusted) - my_getopt_error_reporter(WARNING_LEVEL, - "option '%s': unsigned value %s adjusted to %s", - optp->name, ullstr(old, buf1), ullstr(num, buf2)); - return num; -} - - -/* - Get double value withing ranges - - Evaluates and returns the value that user gave as an argument to a variable. - - RETURN - decimal value of arg - - In case of an error, prints an error message and sets *err to - EXIT_ARGUMENT_INVALID. Otherwise err is not touched -*/ - -static double getopt_double(char *arg, const struct my_option *optp, int *err) -{ - double num; - int error; - char *end= arg + 1000; /* Big enough as *arg is \0 terminated */ - num= my_strtod(arg, &end, &error); - if (end[0] != 0 || error) - { - fprintf(stderr, - "%s: ERROR: Invalid decimal value for option '%s'\n", - my_progname, optp->name); - *err= EXIT_ARGUMENT_INVALID; - return 0.0; - } - if (optp->max_value && num > (double) optp->max_value) - num= (double) optp->max_value; - return max(num, (double) optp->min_value); -} - -/* - Init one value to it's default values - - SYNOPSIS - init_one_value() - option Option to initialize - value Pointer to variable -*/ - -static void init_one_value(const struct my_option *option, uchar* *variable, - longlong value) -{ - DBUG_ENTER("init_one_value"); - switch ((option->var_type & GET_TYPE_MASK)) { - case GET_BOOL: - *((my_bool*) variable)= (my_bool) value; - break; - case GET_INT: - *((int*) variable)= (int) getopt_ll_limit_value((int) value, option, NULL); - break; - case GET_ENUM: - *((uint*) variable)= (uint) value; - break; - case GET_UINT: - *((uint*) variable)= (uint) getopt_ull_limit_value((uint) value, option, NULL); - break; - case GET_LONG: - *((long*) variable)= (long) getopt_ll_limit_value((long) value, option, NULL); - break; - case GET_ULONG: - *((ulong*) variable)= (ulong) getopt_ull_limit_value((ulong) value, option, NULL); - break; - case GET_LL: - *((longlong*) variable)= (longlong) getopt_ll_limit_value((longlong) value, option, NULL); - break; - case GET_ULL: /* Fall through */ - case GET_SET: - *((ulonglong*) variable)= (ulonglong) getopt_ull_limit_value((ulonglong) value, option, NULL); - break; - case GET_DOUBLE: - *((double*) variable)= (double) value; - break; - case GET_STR: - /* - Do not clear variable value if it has no default value. - The default value may already be set. - NOTE: To avoid compiler warnings, we first cast longlong to intptr, - so that the value has the same size as a pointer. - */ - if ((char*) (intptr) value) - *((char**) variable)= (char*) (intptr) value; - break; - case GET_STR_ALLOC: - /* - Do not clear variable value if it has no default value. - The default value may already be set. - NOTE: To avoid compiler warnings, we first cast longlong to intptr, - so that the value has the same size as a pointer. - */ - if ((char*) (intptr) value) - { - my_free((*(char**) variable), MYF(MY_ALLOW_ZERO_PTR)); - *((char**) variable)= my_strdup((char*) (intptr) value, MYF(MY_WME)); - } - break; - default: /* dummy default to avoid compiler warnings */ - break; - } - DBUG_VOID_RETURN; -} - - -/* - Init one value to it's default values - - SYNOPSIS - init_one_value() - option Option to initialize - value Pointer to variable -*/ - -static void fini_one_value(const struct my_option *option, uchar* *variable, - longlong value __attribute__ ((unused))) -{ - DBUG_ENTER("fini_one_value"); - switch ((option->var_type & GET_TYPE_MASK)) { - case GET_STR_ALLOC: - my_free((*(char**) variable), MYF(MY_ALLOW_ZERO_PTR)); - *((char**) variable)= NULL; - break; - default: /* dummy default to avoid compiler warnings */ - break; - } - DBUG_VOID_RETURN; -} - - -void my_cleanup_options(const struct my_option *options) -{ - init_variables(options, fini_one_value); -} - - -/* - initialize all variables to their default values - - SYNOPSIS - init_variables() - options Array of options - - NOTES - We will initialize the value that is pointed to by options->value. - If the value is of type GET_ASK_ADDR, we will also ask for the address - for a value and initialize. -*/ - -static void init_variables(const struct my_option *options, - init_func_p init_one_value) -{ - DBUG_ENTER("init_variables"); - for (; options->name; options++) - { - uchar* *variable; - DBUG_PRINT("options", ("name: '%s'", options->name)); - /* - We must set u_max_value first as for some variables - options->u_max_value == options->value and in this case we want to - set the value to default value. - */ - if (options->u_max_value) - init_one_value(options, options->u_max_value, options->max_value); - if (options->value) - init_one_value(options, options->value, options->def_value); - if (options->var_type & GET_ASK_ADDR && - (variable= (*getopt_get_addr)("", 0, options, 0))) - init_one_value(options, variable, options->def_value); - } - DBUG_VOID_RETURN; -} - - -/* - function: my_print_options - - Print help for all options and variables. -*/ - -void my_print_help(const struct my_option *options) -{ - uint col, name_space= 22, comment_space= 57; - const char *line_end; - const struct my_option *optp; - - for (optp= options; optp->id; optp++) - { - if (optp->id < 256) - { - printf(" -%c%s", optp->id, strlen(optp->name) ? ", " : " "); - col= 6; - } - else - { - printf(" "); - col= 2; - } - if (strlen(optp->name)) - { - printf("--%s", optp->name); - col+= 2 + (uint) strlen(optp->name); - if ((optp->var_type & GET_TYPE_MASK) == GET_STR || - (optp->var_type & GET_TYPE_MASK) == GET_STR_ALLOC) - { - printf("%s=name%s ", optp->arg_type == OPT_ARG ? "[" : "", - optp->arg_type == OPT_ARG ? "]" : ""); - col+= (optp->arg_type == OPT_ARG) ? 8 : 6; - } - else if ((optp->var_type & GET_TYPE_MASK) == GET_NO_ARG || - (optp->var_type & GET_TYPE_MASK) == GET_BOOL) - { - putchar(' '); - col++; - } - else - { - printf("%s=#%s ", optp->arg_type == OPT_ARG ? "[" : "", - optp->arg_type == OPT_ARG ? "]" : ""); - col+= (optp->arg_type == OPT_ARG) ? 5 : 3; - } - if (col > name_space && optp->comment && *optp->comment) - { - putchar('\n'); - col= 0; - } - } - for (; col < name_space; col++) - putchar(' '); - if (optp->comment && *optp->comment) - { - const char *comment= optp->comment, *end= strend(comment); - - while ((uint) (end - comment) > comment_space) - { - for (line_end= comment + comment_space; - *line_end != ' ' && line_end > comment; - line_end--); - if (line_end == comment) - { - /* There was no space, try to find one going forward */ - for (line_end= comment + comment_space; - *line_end != ' ' && line_end < end; - line_end++); - } - for (; comment != line_end; comment++) - putchar(*comment); - if (comment < end) - { - comment++; /* skip the space, as a newline will take it's place now */ - putchar('\n'); - for (col= 0; col < name_space; col++) - putchar(' '); - } - } - printf("%s", comment); - } - putchar('\n'); - if ((optp->var_type & GET_TYPE_MASK) == GET_NO_ARG || - (optp->var_type & GET_TYPE_MASK) == GET_BOOL) - { - if (optp->def_value != 0) - { - printf("%*s(Defaults to on; use --skip-%s to disable.)\n", name_space, "", optp->name); - } - } - } -} - - -/* - function: my_print_options - - Print variables. -*/ - -void my_print_variables(const struct my_option *options) -{ - uint name_space= 34, length, nr; - ulonglong bit, llvalue; - char buff[255]; - const struct my_option *optp; - - printf("\nVariables (--variable-name=value)\n"); - printf("and boolean options {FALSE|TRUE} Value (after reading options)\n"); - printf("--------------------------------- -----------------------------\n"); - for (optp= options; optp->id; optp++) - { - uchar* *value= (optp->var_type & GET_ASK_ADDR ? - (*getopt_get_addr)("", 0, optp, 0) : optp->value); - if (value) - { - printf("%s ", optp->name); - length= (uint) strlen(optp->name)+1; - for (; length < name_space; length++) - putchar(' '); - switch ((optp->var_type & GET_TYPE_MASK)) { - case GET_SET: - if (!(llvalue= *(ulonglong*) value)) - printf("%s\n", "(No default value)"); - else - for (nr= 0, bit= 1; llvalue && nr < optp->typelib->count; nr++, bit<<=1) - { - if (!(bit & llvalue)) - continue; - llvalue&= ~bit; - printf( llvalue ? "%s," : "%s\n", get_type(optp->typelib, nr)); - } - break; - case GET_ENUM: - printf("%s\n", get_type(optp->typelib, *(uint*) value)); - break; - case GET_STR: - case GET_STR_ALLOC: /* fall through */ - printf("%s\n", *((char**) value) ? *((char**) value) : - "(No default value)"); - break; - case GET_BOOL: - printf("%s\n", *((my_bool*) value) ? "TRUE" : "FALSE"); - break; - case GET_INT: - printf("%d\n", *((int*) value)); - break; - case GET_UINT: - printf("%d\n", *((uint*) value)); - break; - case GET_LONG: - printf("%ld\n", *((long*) value)); - break; - case GET_ULONG: - printf("%lu\n", *((ulong*) value)); - break; - case GET_LL: - printf("%s\n", llstr(*((longlong*) value), buff)); - break; - case GET_ULL: - longlong2str(*((ulonglong*) value), buff, 10); - printf("%s\n", buff); - break; - case GET_DOUBLE: - printf("%g\n", *(double*) value); - break; - default: - printf("(Disabled)\n"); - break; - } - } - } -} diff --git a/externals/mysql/mysys/my_getpagesize.c b/externals/mysql/mysys/my_getpagesize.c deleted file mode 100644 index b0560cede3..0000000000 --- a/externals/mysql/mysys/my_getpagesize.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" - -#ifndef HAVE_GETPAGESIZE - -#if defined __WIN__ - -int my_getpagesize(void) -{ - SYSTEM_INFO si; - GetSystemInfo(&si); - return si.dwPageSize; -} - -#else - -/* Default implementation */ -int my_getpagesize(void) -{ - return (int)8192; -} - -#endif - -#endif - diff --git a/externals/mysql/mysys/my_getsystime.c b/externals/mysql/mysys/my_getsystime.c deleted file mode 100644 index 46e0c5469e..0000000000 --- a/externals/mysql/mysys/my_getsystime.c +++ /dev/null @@ -1,225 +0,0 @@ -/* Copyright (C) 2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* get time since epoc in 100 nanosec units */ -/* thus to get the current time we should use the system function - with the highest possible resolution */ - -/* - TODO: in functions my_micro_time() and my_micro_time_and_time() there - exists some common code that should be merged into a function. -*/ - -#include "mysys_priv.h" -#include "my_static.h" - -#ifdef __NETWARE__ -#include -#endif - -ulonglong my_getsystime() -{ -#ifdef HAVE_CLOCK_GETTIME - struct timespec tp; - clock_gettime(CLOCK_REALTIME, &tp); - return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; -#elif defined(__WIN__) - LARGE_INTEGER t_cnt; - if (query_performance_frequency) - { - QueryPerformanceCounter(&t_cnt); - return ((t_cnt.QuadPart / query_performance_frequency * 10000000) + - ((t_cnt.QuadPart % query_performance_frequency) * 10000000 / - query_performance_frequency) + query_performance_offset); - } - return 0; -#elif defined(__NETWARE__) - NXTime_t tm; - NXGetTime(NX_SINCE_1970, NX_NSECONDS, &tm); - return (ulonglong)tm/100; -#else - /* TODO: check for other possibilities for hi-res timestamping */ - struct timeval tv; - gettimeofday(&tv,NULL); - return (ulonglong)tv.tv_sec*10000000+(ulonglong)tv.tv_usec*10; -#endif -} - - -/* - Return current time - - SYNOPSIS - my_time() - flags If MY_WME is set, write error if time call fails - -*/ - -time_t my_time(myf flags __attribute__((unused))) -{ - time_t t; -#ifdef HAVE_GETHRTIME - (void) my_micro_time_and_time(&t); - return t; -#else - /* The following loop is here beacuse time() may fail on some systems */ - while ((t= time(0)) == (time_t) -1) - { - if (flags & MY_WME) - fprintf(stderr, "%s: Warning: time() call failed\n", my_progname); - } - return t; -#endif -} - - -/* - Return time in micro seconds - - SYNOPSIS - my_micro_time() - - NOTES - This function is to be used to measure performance in micro seconds. - As it's not defined whats the start time for the clock, this function - us only useful to measure time between two moments. - - For windows platforms we need the frequency value of the CUP. This is - initalized in my_init.c through QueryPerformanceFrequency(). - - If Windows platform doesn't support QueryPerformanceFrequency() we will - obtain the time via GetClockCount, which only supports milliseconds. - - RETURN - Value in microseconds from some undefined point in time -*/ - -ulonglong my_micro_time() -{ -#if defined(__WIN__) - ulonglong newtime; - GetSystemTimeAsFileTime((FILETIME*)&newtime); - return (newtime/10); -#elif defined(HAVE_GETHRTIME) - return gethrtime()/1000; -#else - ulonglong newtime; - struct timeval t; - /* - The following loop is here because gettimeofday may fail on some systems - */ - while (gettimeofday(&t, NULL) != 0) - {} - newtime= (ulonglong)t.tv_sec * 1000000 + t.tv_usec; - return newtime; -#endif /* defined(__WIN__) */ -} - - -/* - Return time in seconds and timer in microseconds (not different start!) - - SYNOPSIS - my_micro_time_and_time() - time_arg Will be set to seconds since epoch (00:00:00 UTC, - January 1, 1970) - - NOTES - This function is to be useful when we need both the time and microtime. - For example in MySQL this is used to get the query time start of a query - and to measure the time of a query (for the slow query log) - - IMPLEMENTATION - Value of time is as in time() call. - Value of microtime is same as my_micro_time(), which may be totally - unrealated to time() - - RETURN - Value in microseconds from some undefined point in time -*/ - -#define DELTA_FOR_SECONDS 500000000LL /* Half a second */ - -ulonglong my_micro_time_and_time(time_t *time_arg) -{ -#if defined(__WIN__) - ulonglong newtime; - GetSystemTimeAsFileTime((FILETIME*)&newtime); - *time_arg= (time_t) ((newtime - OFFSET_TO_EPOCH) / 10000000); - return (newtime/10); -#elif defined(HAVE_GETHRTIME) - /* - Solaris has a very slow time() call. We optimize this by using the very - fast gethrtime() call and only calling time() every 1/2 second - */ - static hrtime_t prev_gethrtime= 0; - static time_t cur_time= 0; - hrtime_t cur_gethrtime; - - pthread_mutex_lock(&THR_LOCK_time); - cur_gethrtime= gethrtime(); - if ((cur_gethrtime - prev_gethrtime) > DELTA_FOR_SECONDS) - { - cur_time= time(0); - prev_gethrtime= cur_gethrtime; - } - *time_arg= cur_time; - pthread_mutex_unlock(&THR_LOCK_time); - return cur_gethrtime/1000; -#else - ulonglong newtime; - struct timeval t; - /* - The following loop is here because gettimeofday may fail on some systems - */ - while (gettimeofday(&t, NULL) != 0) - {} - *time_arg= t.tv_sec; - newtime= (ulonglong)t.tv_sec * 1000000 + t.tv_usec; - return newtime; -#endif /* defined(__WIN__) */ -} - - -/* - Returns current time - - SYNOPSIS - my_time_possible_from_micro() - microtime Value from very recent my_micro_time() - - NOTES - This function returns the current time. The microtime argument is only used - if my_micro_time() uses a function that can safely be converted to the - current time. - - RETURN - current time -*/ - -time_t my_time_possible_from_micro(ulonglong microtime __attribute__((unused))) -{ -#if defined(__WIN__) - time_t t; - while ((t= time(0)) == (time_t) -1) - {} - return t; -#elif defined(HAVE_GETHRTIME) - return my_time(0); /* Cached time */ -#else - return (time_t) (microtime / 1000000); -#endif /* defined(__WIN__) */ -} - diff --git a/externals/mysql/mysys/my_getwd.c b/externals/mysql/mysys/my_getwd.c deleted file mode 100644 index 0b467351f4..0000000000 --- a/externals/mysql/mysys/my_getwd.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* my_setwd() and my_getwd() works with intern_filenames !! */ - -#include "mysys_priv.h" -#include -#include "mysys_err.h" -#ifdef HAVE_GETWD -#include -#endif -#if defined(__WIN__) -#include -#include -#include -#endif - -/* Gets current working directory in buff. - - SYNPOSIS - my_getwd() - buf Buffer to store result. Can be curr_dir[]. - size Size of buffer - MyFlags Flags - - NOTES - Directory is allways ended with FN_LIBCHAR - - RESULT - 0 ok - # error -*/ - -int my_getwd(char * buf, size_t size, myf MyFlags) -{ - char * pos; - DBUG_ENTER("my_getwd"); - DBUG_PRINT("my",("buf: %p size: %u MyFlags %d", - buf, (uint) size, MyFlags)); - - if (curr_dir[0]) /* Current pos is saved here */ - (void) strmake(buf,&curr_dir[0],size-1); - else - { -#if defined(HAVE_GETCWD) - if (!getcwd(buf,size-2) && MyFlags & MY_WME) - { - my_errno=errno; - my_error(EE_GETWD,MYF(ME_BELL+ME_WAITTANG),errno); - return(-1); - } -#elif defined(HAVE_GETWD) - { - char pathname[MAXPATHLEN]; - getwd(pathname); - strmake(buf,pathname,size-1); - } -#elif defined(VMS) - if (!getcwd(buf,size-2,1) && MyFlags & MY_WME) - { - my_errno=errno; - my_error(EE_GETWD,MYF(ME_BELL+ME_WAITTANG),errno); - return(-1); - } - intern_filename(buf,buf); -#else -#error "No way to get current directory" -#endif - if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */ - { - pos[0]= FN_LIBCHAR; - pos[1]=0; - } - (void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1)); - } - DBUG_RETURN(0); -} /* my_getwd */ - - -/* Set new working directory */ - -int my_setwd(const char *dir, myf MyFlags) -{ - int res; - size_t length; - char *start, *pos; -#if defined(VMS) - char buff[FN_REFLEN]; -#endif - DBUG_ENTER("my_setwd"); - DBUG_PRINT("my",("dir: '%s' MyFlags %d", dir, MyFlags)); - - start=(char *) dir; - if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0)) - dir=FN_ROOTDIR; -#ifdef VMS - { - pos=strmov(buff,dir); - if (pos[-1] != FN_LIBCHAR) - { - pos[0]=FN_LIBCHAR; /* Mark as directory */ - pos[1]=0; - } - system_filename(buff,buff); /* Change to VMS format */ - dir=buff; - } -#endif /* VMS */ - if ((res=chdir((char*) dir)) != 0) - { - my_errno=errno; - if (MyFlags & MY_WME) - my_error(EE_SETWD,MYF(ME_BELL+ME_WAITTANG),start,errno); - } - else - { - if (test_if_hard_path(start)) - { /* Hard pathname */ - pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1); - if (pos[-1] != FN_LIBCHAR) - { - length=(uint) (pos-(char*) curr_dir); - curr_dir[length]=FN_LIBCHAR; /* must end with '/' */ - curr_dir[length+1]='\0'; - } - } - else - curr_dir[0]='\0'; /* Don't save name */ - } - DBUG_RETURN(res); -} /* my_setwd */ - - - - /* Test if hard pathname */ - /* Returns 1 if dirname is a hard path */ - -int test_if_hard_path(register const char *dir_name) -{ - if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR) - return (home_dir != NullS && test_if_hard_path(home_dir)); - if (dir_name[0] == FN_LIBCHAR) - return (TRUE); -#ifdef FN_DEVCHAR - return (strchr(dir_name,FN_DEVCHAR) != 0); -#else - return FALSE; -#endif -} /* test_if_hard_path */ - - -/* - Test if a name contains an (absolute or relative) path. - - SYNOPSIS - has_path() - name The name to test. - - RETURN - TRUE name contains a path. - FALSE name does not contain a path. -*/ - -my_bool has_path(const char *name) -{ - return test(strchr(name, FN_LIBCHAR)) -#if FN_LIBCHAR != '/' - || test(strchr(name,'/')) -#endif -#ifdef FN_DEVCHAR - || test(strchr(name, FN_DEVCHAR)) -#endif - ; -} diff --git a/externals/mysql/mysys/my_handler_errors.h b/externals/mysql/mysys/my_handler_errors.h deleted file mode 100644 index 47cce9dcd2..0000000000 --- a/externals/mysql/mysys/my_handler_errors.h +++ /dev/null @@ -1,137 +0,0 @@ - -/* - Errors a handler can give you -*/ - -static const char *handler_error_messages[]= -{ - /* HA_ERR_KEY_NOT_FOUND */ - "Didn't find key on read or update", - /* HA_ERR_FOUND_DUPP_KEY */ - "Duplicate key on write or update", - /* HA_ERR_INTERNAL_ERROR */ - "Internal (unspecified) error in handler", - /* HA_ERR_RECORD_CHANGED */ - "Someone has changed the row since it was read (while the table was locked to prevent it)", - /* HA_ERR_WRONG_INDEX */ - "Wrong index given to function", - /* empty */ - "Undefined handler error 125", - /* HA_ERR_CRASHED */ - "Index file is crashed", - /* HA_ERR_WRONG_IN_RECORD */ - "Record file is crashed", - /* HA_ERR_OUT_OF_MEM */ - "Out of memory in engine", - /* empty */ - "Undefined handler error 129", - /* HA_ERR_NOT_A_TABLE */ - "Incorrect file format", - /* HA_ERR_WRONG_COMMAND */ - "Command not supported by database", - /* HA_ERR_OLD_FILE */ - "Old database file", - /* HA_ERR_NO_ACTIVE_RECORD */ - "No record read before update", - /* HA_ERR_RECORD_DELETED */ - "Record was already deleted (or record file crashed)", - /* HA_ERR_RECORD_FILE_FULL */ - "No more room in record file", - /* HA_ERR_INDEX_FILE_FULL */ - "No more room in index file", - /* HA_ERR_END_OF_FILE */ - "No more records (read after end of file)", - /* HA_ERR_UNSUPPORTED */ - "Unsupported extension used for table", - /* HA_ERR_TO_BIG_ROW */ - "Too big row", - /* HA_WRONG_CREATE_OPTION */ - "Wrong create options", - /* HA_ERR_FOUND_DUPP_UNIQUE */ - "Duplicate unique key or constraint on write or update", - /* HA_ERR_UNKNOWN_CHARSET */ - "Unknown character set used in table", - /* HA_ERR_WRONG_MRG_TABLE_DEF */ - "Conflicting table definitions in sub-tables of MERGE table", - /* HA_ERR_CRASHED_ON_REPAIR */ - "Table is crashed and last repair failed", - /* HA_ERR_CRASHED_ON_USAGE */ - "Table was marked as crashed and should be repaired", - /* HA_ERR_LOCK_WAIT_TIMEOUT */ - "Lock timed out; Retry transaction", - /* HA_ERR_LOCK_TABLE_FULL */ - "Lock table is full; Restart program with a larger lock table", - /* HA_ERR_READ_ONLY_TRANSACTION */ - "Updates are not allowed under a read only transactions", - /* HA_ERR_LOCK_DEADLOCK */ - "Lock deadlock; Retry transaction", - /* HA_ERR_CANNOT_ADD_FOREIGN */ - "Foreign key constraint is incorrectly formed", - /* HA_ERR_NO_REFERENCED_ROW */ - "Cannot add a child row", - /* HA_ERR_ROW_IS_REFERENCED */ - "Cannot delete a parent row", - /* HA_ERR_NO_SAVEPOINT */ - "No savepoint with that name", - /* HA_ERR_NON_UNIQUE_BLOCK_SIZE */ - "Non unique key block size", - /* HA_ERR_NO_SUCH_TABLE */ - "The table does not exist in engine", - /* HA_ERR_TABLE_EXIST */ - "The table already existed in storage engine", - /* HA_ERR_NO_CONNECTION */ - "Could not connect to storage engine", - /* HA_ERR_NULL_IN_SPATIAL */ - "Unexpected null pointer found when using spatial index", - /* HA_ERR_TABLE_DEF_CHANGED */ - "The table changed in storage engine", - /* HA_ERR_NO_PARTITION_FOUND */ - "There's no partition in table for the given value", - /* HA_ERR_RBR_LOGGING_FAILED */ - "Row-based binary logging of row failed", - /* HA_ERR_DROP_INDEX_FK */ - "Index needed in foreign key constraint", - /* HA_ERR_FOREIGN_DUPLICATE_KEY */ - "Upholding foreign key constraints would lead to a duplicate key error in " - "some other table", - /* HA_ERR_TABLE_NEEDS_UPGRADE */ - "Table needs to be upgraded before it can be used", - /* HA_ERR_TABLE_READONLY */ - "Table is read only", - /* HA_ERR_AUTOINC_READ_FAILED */ - "Failed to get next auto increment value", - /* HA_ERR_AUTOINC_ERANGE */ - "Failed to set row auto increment value", - /* HA_ERR_GENERIC */ - "Unknown (generic) error from engine", - /* HA_ERR_RECORD_IS_THE_SAME */ - "Record was not update. Original values was same as new values", - /* HA_ERR_LOGGING_IMPOSSIBLE */ - "It is not possible to log this statement", - /* HA_ERR_TABLESPACE_EXIST */ - "Tablespace exists", - /* HA_ERR_CORRUPT_EVENT */ - "The event was corrupt, leading to illegal data being read", - /* HA_ERR_NEW_FILE */ - "The table is of a new format not supported by this version", - /* HA_ERR_ROWS_EVENT_APPLY */ - "The event could not be processed. No other handler error happened", - /* HA_ERR_INITIALIZATION */ - "Got a fatal error during initialization of handler", - /* HA_ERR_FILE_TOO_SHORT */ - "File too short; Expected more data in file", - - /* HA_ERR_WRONG_CRC */ - "Read page with wrong checksum", - /* HA_ERR_LOCK_OR_ACTIVE_TRANSACTION */ - "Lock or active transaction", /* TODO: get a better message */ - /* HA_ERR_NO_SUCH_TABLESPACE */ - "No such table space", /* TODO: get a better message */ - /* HA_ERR_TABLESPACE_NOT_EMPTY */ - "Tablespace not empty", /* TODO: get a better message */ - /* HA_ERR_TABLESPACE_DATAFILE_EXIST */ - "Tablespace data file already exists", /* TODO: get a better message */ - /* HA_ERR_ROW_NOT_VISIBLE */ - "Row is not visible by the current transaction" -}; - diff --git a/externals/mysql/mysys/my_init.c b/externals/mysql/mysys/my_init.c deleted file mode 100644 index 45545fb75d..0000000000 --- a/externals/mysql/mysys/my_init.c +++ /dev/null @@ -1,558 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "my_static.h" -#include "mysys_err.h" -#include -#include -#include -#ifdef VMS -#include -#include -#endif -#ifdef __WIN__ -#ifdef _MSC_VER -#include -#include -/* WSAStartup needs winsock library*/ -#pragma comment(lib, "ws2_32") -#endif -my_bool have_tcpip=0; -static void my_win_init(void); -static my_bool win32_init_tcp_ip(); -#else -#define my_win_init() -#endif -#ifdef __NETWARE__ -static void netware_init(); -#else -#define netware_init() -#endif - -my_bool my_init_done= 0; -uint mysys_usage_id= 0; /* Incremented for each my_init() */ -ulong my_thread_stack_size= 65536; - -static ulong atoi_octal(const char *str) -{ - long int tmp; - while (*str && my_isspace(&my_charset_latin1, *str)) - str++; - str2int(str, - (*str == '0' ? 8 : 10), /* Octalt or decimalt */ - 0, INT_MAX, &tmp); - return (ulong) tmp; -} - - -/* - Init my_sys functions and my_sys variabels - - SYNOPSIS - my_init() - - RETURN - 0 ok - 1 Couldn't initialize environment -*/ - -my_bool my_init(void) -{ - char * str; - if (my_init_done) - return 0; - my_init_done=1; - mysys_usage_id++; - my_umask= 0660; /* Default umask for new files */ - my_umask_dir= 0700; /* Default umask for new directories */ - init_glob_errs(); - my_progname_short= "unknown"; - if (my_progname) - my_progname_short= my_progname + dirname_length(my_progname); - -#if defined(THREAD) - (void) my_threadattr_global_init(); -# if defined(SAFE_MUTEX) - safe_mutex_global_init(); /* Must be called early */ -# elif defined(MY_PTHREAD_FASTMUTEX) - fastmutex_global_init(); /* Must be called early */ -# endif -#endif - netware_init(); -#ifdef THREAD -#if defined(HAVE_PTHREAD_INIT) - pthread_init(); /* Must be called before DBUG_ENTER */ -#endif - if (my_thread_global_init()) - return 1; -#if !defined( __WIN__) && !defined(__NETWARE__) - sigfillset(&my_signals); /* signals blocked by mf_brkhant */ -#endif -#endif /* THREAD */ - { - DBUG_ENTER("my_init"); - DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); - if (!home_dir) - { /* Don't initialize twice */ - my_win_init(); - if ((home_dir=getenv("HOME")) != 0) - home_dir=intern_filename(home_dir_buff,home_dir); -#ifndef VMS - /* Default creation of new files */ - if ((str=getenv("UMASK")) != 0) - my_umask=(int) (atoi_octal(str) | 0600); - /* Default creation of new dir's */ - if ((str=getenv("UMASK_DIR")) != 0) - my_umask_dir=(int) (atoi_octal(str) | 0700); -#endif -#ifdef VMS - init_ctype(); /* Stupid linker don't link _ctype.c */ -#endif - DBUG_PRINT("exit",("home: '%s'",home_dir)); - } -#ifdef __WIN__ - win32_init_tcp_ip(); -#endif - DBUG_RETURN(0); - } -} /* my_init */ - - - /* End my_sys */ - -void my_end(int infoflag) -{ - /* - this code is suboptimal to workaround a bug in - Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be - optimized until this compiler is not in use anymore - */ - FILE *info_file= DBUG_FILE; - my_bool print_info= (info_file != stderr); - - if (!my_init_done) - return; - - /* - We do not use DBUG_ENTER here, as after cleanup DBUG is no longer - operational, so we cannot use DBUG_RETURN. - */ - DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d", - infoflag, print_info)); - if (!info_file) - { - info_file= stderr; - print_info= 0; - } - - if ((infoflag & MY_CHECK_ERROR) || print_info) - - { /* Test if some file is left open */ - if (my_file_opened | my_stream_opened) - { - char ebuff[MYSYS_ERRMSG_SIZE]; - my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING), - my_file_opened, my_stream_opened); - my_message_no_curses(EE_OPEN_WARNING, ebuff, ME_BELL); - DBUG_PRINT("error", ("%s", ebuff)); - my_print_open_files(); - } - } - free_charsets(); - my_error_unregister_all(); - my_once_free(); -#ifdef THREAD - my_thread_destroy_mutex(); -#endif - - if ((infoflag & MY_GIVE_INFO) || print_info) - { -#ifdef HAVE_GETRUSAGE - struct rusage rus; -#ifdef HAVE_purify - /* Purify assumes that rus is uninitialized after getrusage call */ - bzero((char*) &rus, sizeof(rus)); -#endif - if (!getrusage(RUSAGE_SELF, &rus)) - fprintf(info_file,"\n\ -User time %.2f, System time %.2f\n\ -Maximum resident set size %ld, Integral resident set size %ld\n\ -Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n\ -Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n\ -Voluntary context switches %ld, Involuntary context switches %ld\n", - (rus.ru_utime.tv_sec * SCALE_SEC + - rus.ru_utime.tv_usec / SCALE_USEC) / 100.0, - (rus.ru_stime.tv_sec * SCALE_SEC + - rus.ru_stime.tv_usec / SCALE_USEC) / 100.0, - rus.ru_maxrss, rus.ru_idrss, - rus.ru_minflt, rus.ru_majflt, - rus.ru_nswap, rus.ru_inblock, rus.ru_oublock, - rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals, - rus.ru_nvcsw, rus.ru_nivcsw); -#endif -#if defined(__NETWARE__) && !defined(__WIN__) - fprintf(info_file,"\nRun time: %.1f\n",(double) clock()/CLOCKS_PER_SEC); -#endif -#if defined(SAFEMALLOC) - /* Wait for other threads to free mysys_var */ -#ifdef THREAD - (void) my_wait_for_other_threads_to_die(1); -#endif - TERMINATE(stderr, (infoflag & MY_GIVE_INFO) != 0); -#elif defined(__WIN__) && defined(_MSC_VER) - _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); - _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR ); - _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); - _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR ); - _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); - _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); - _CrtCheckMemory(); - _CrtDumpMemoryLeaks(); -#endif - } - else if (infoflag & MY_CHECK_ERROR) - { - TERMINATE(stderr, 0); /* Print memory leaks on screen */ - } - - if (!(infoflag & MY_DONT_FREE_DBUG)) - { - DBUG_END(); /* Must be done before my_thread_end */ - } -#ifdef THREAD - my_thread_end(); - my_thread_global_end(); -#if defined(SAFE_MUTEX) - /* - Check on destroying of mutexes. A few may be left that will get cleaned - up by C++ destructors - */ - safe_mutex_end((infoflag & (MY_GIVE_INFO | MY_CHECK_ERROR)) ? stderr : - (FILE *) 0); -#endif /* defined(SAFE_MUTEX) */ -#endif /* THREAD */ - -#ifdef __WIN__ - if (have_tcpip) - WSACleanup(); -#endif /* __WIN__ */ - my_init_done=0; -} /* my_end */ - -#ifndef DBUG_OFF -/* Dummy tag function for debugging */ - -void my_debug_put_break_here(void) -{ -} -#endif - -#ifdef __WIN__ - - -/* - my_parameter_handler - - Invalid parameter handler we will use instead of the one "baked" - into the CRT for MSC v8. This one just prints out what invalid - parameter was encountered. By providing this routine, routines like - lseek will return -1 when we expect them to instead of crash. -*/ - -void my_parameter_handler(const wchar_t * expression, const wchar_t * function, - const wchar_t * file, unsigned int line, - uintptr_t pReserved) -{ - DBUG_PRINT("my",("Expression: %s function: %s file: %s, line: %d", - expression, function, file, line)); -} - - -#ifdef __MSVC_RUNTIME_CHECKS -#include - -/* Turn off runtime checks for 'handle_rtc_failure' */ -#pragma runtime_checks("", off) - -/* - handle_rtc_failure - Catch the RTC error and dump it to stderr -*/ - -int handle_rtc_failure(int err_type, const char *file, int line, - const char* module, const char *format, ...) -{ - va_list args; - va_start(args, format); - fprintf(stderr, "Error:"); - vfprintf(stderr, format, args); - fprintf(stderr, " At %s:%d\n", file, line); - va_end(args); - (void) fflush(stderr); - - return 0; /* Error is handled */ -} -#pragma runtime_checks("", restore) -#endif - - -static void my_win_init(void) -{ - DBUG_ENTER("my_win_init"); - -#if defined(_MSC_VER) -#if _MSC_VER < 1300 - /* - Clear the OS system variable TZ and avoid the 100% CPU usage - Only for old versions of Visual C++ - */ - _putenv( "TZ=" ); -#endif -#if _MSC_VER >= 1400 - /* this is required to make crt functions return -1 appropriately */ - _set_invalid_parameter_handler(my_parameter_handler); -#endif -#endif -#ifdef __MSVC_RUNTIME_CHECKS - /* - Install handler to send RTC (Runtime Error Check) warnings - to log file - */ - _RTC_SetErrorFunc(handle_rtc_failure); -#endif - - _tzset(); - - - - - - - - - - - - - - - - - - - - - - - - - - /* The following is used by time functions */ -#define OFFSET_TO_EPOC ((__int64) 134774 * 24 * 60 * 60 * 1000 * 1000 * 10) -#define MS 10000000 - { - FILETIME ft; - LARGE_INTEGER li, t_cnt; - DBUG_ASSERT(sizeof(LARGE_INTEGER) == sizeof(query_performance_frequency)); - if (QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency) == 0) - query_performance_frequency= 0; - else - { - GetSystemTimeAsFileTime(&ft); - li.LowPart= ft.dwLowDateTime; - li.HighPart= ft.dwHighDateTime; - query_performance_offset= li.QuadPart-OFFSET_TO_EPOC; - QueryPerformanceCounter(&t_cnt); - query_performance_offset-= (t_cnt.QuadPart / - query_performance_frequency * MS + - t_cnt.QuadPart % - query_performance_frequency * MS / - query_performance_frequency); - } - } - - { - /* - Open HKEY_LOCAL_MACHINE\SOFTWARE\MySQL and set any strings found - there as environment variables - */ - HKEY key_handle; - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, (LPCTSTR)"SOFTWARE\\MySQL", - 0, KEY_READ, &key_handle) == ERROR_SUCCESS) - { - LONG ret; - DWORD index= 0; - DWORD type; - char key_name[256], key_data[1024]; - DWORD key_name_len= sizeof(key_name) - 1; - DWORD key_data_len= sizeof(key_data) - 1; - - while ((ret= RegEnumValue(key_handle, index++, - key_name, &key_name_len, - NULL, &type, (LPBYTE)&key_data, - &key_data_len)) != ERROR_NO_MORE_ITEMS) - { - char env_string[sizeof(key_name) + sizeof(key_data) + 2]; - - if (ret == ERROR_MORE_DATA) - { - /* Registry value larger than 'key_data', skip it */ - DBUG_PRINT("error", ("Skipped registry value that was too large")); - } - else if (ret == ERROR_SUCCESS) - { - if (type == REG_SZ) - { - strxmov(env_string, key_name, "=", key_data, NullS); - - /* variable for putenv must be allocated ! */ - putenv(strdup(env_string)) ; - } - } - else - { - /* Unhandled error, break out of loop */ - break; - } - - key_name_len= sizeof(key_name) - 1; - key_data_len= sizeof(key_data) - 1; - } - - RegCloseKey(key_handle) ; - } - } - DBUG_VOID_RETURN ; -} - - -/*------------------------------------------------------------------ - Name: CheckForTcpip| Desc: checks if tcpip has been installed on system - According to Microsoft Developers documentation the first registry - entry should be enough to check if TCP/IP is installed, but as expected - this doesn't work on all Win32 machines :( -------------------------------------------------------------------*/ - -#define TCPIPKEY "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters" -#define WINSOCK2KEY "SYSTEM\\CurrentControlSet\\Services\\Winsock2\\Parameters" -#define WINSOCKKEY "SYSTEM\\CurrentControlSet\\Services\\Winsock\\Parameters" - -static my_bool win32_have_tcpip(void) -{ - HKEY hTcpipRegKey; - if (RegOpenKeyEx ( HKEY_LOCAL_MACHINE, TCPIPKEY, 0, KEY_READ, - &hTcpipRegKey) != ERROR_SUCCESS) - { - if (RegOpenKeyEx ( HKEY_LOCAL_MACHINE, WINSOCK2KEY, 0, KEY_READ, - &hTcpipRegKey) != ERROR_SUCCESS) - { - if (RegOpenKeyEx ( HKEY_LOCAL_MACHINE, WINSOCKKEY, 0, KEY_READ, - &hTcpipRegKey) != ERROR_SUCCESS) - if (!getenv("HAVE_TCPIP") || have_tcpip) /* Provide a workaround */ - return (FALSE); - } - } - RegCloseKey ( hTcpipRegKey); - return (TRUE); -} - - -static my_bool win32_init_tcp_ip() -{ - if (win32_have_tcpip()) - { - WORD wVersionRequested = MAKEWORD( 2, 0 ); - WSADATA wsaData; - /* Be a good citizen: maybe another lib has already initialised - sockets, so dont clobber them unless necessary */ - if (WSAStartup( wVersionRequested, &wsaData )) - { - /* Load failed, maybe because of previously loaded - incompatible version; try again */ - WSACleanup( ); - if (!WSAStartup( wVersionRequested, &wsaData )) - have_tcpip=1; - } - else - { - if (wsaData.wVersion != wVersionRequested) - { - /* Version is no good, try again */ - WSACleanup( ); - if (!WSAStartup( wVersionRequested, &wsaData )) - have_tcpip=1; - } - else - have_tcpip=1; - } - } - return(0); -} -#endif /* __WIN__ */ - - -#ifdef __NETWARE__ -/* - Basic initialisation for netware -*/ - -static void netware_init() -{ - char cwd[PATH_MAX], *name; - - DBUG_ENTER("netware_init"); - - /* init only if we are not a client library */ - if (my_progname) - { -#if SUPPORTED_BY_LIBC /* Removed until supported in Libc */ - struct termios tp; - /* Disable control characters */ - tcgetattr(STDIN_FILENO, &tp); - tp.c_cc[VINTR] = _POSIX_VDISABLE; - tp.c_cc[VEOF] = _POSIX_VDISABLE; - tp.c_cc[VSUSP] = _POSIX_VDISABLE; - tcsetattr(STDIN_FILENO, TCSANOW, &tp); -#endif /* SUPPORTED_BY_LIBC */ - - /* With stdout redirection */ - if (!isatty(STDOUT_FILENO)) - { - setscreenmode(SCR_AUTOCLOSE_ON_EXIT); /* auto close the screen */ - } - else - { - setscreenmode(SCR_NO_MODE); /* keep the screen up */ - } - - /* Parse program name and change to base format */ - name= (char*) my_progname; - for (; *name; name++) - { - if (*name == '\\') - { - *name = '/'; - } - else - { - *name = tolower(*name); - } - } - } - - DBUG_VOID_RETURN; -} -#endif /* __NETWARE__ */ diff --git a/externals/mysql/mysys/my_largepage.c b/externals/mysql/mysys/my_largepage.c deleted file mode 100644 index 9fa5b73bf8..0000000000 --- a/externals/mysql/mysys/my_largepage.c +++ /dev/null @@ -1,166 +0,0 @@ -/* Copyright (C) 2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" - -#ifdef HAVE_LARGE_PAGES - -#ifdef HAVE_SYS_IPC_H -#include -#endif - -#ifdef HAVE_SYS_SHM_H -#include -#endif - -static uint my_get_large_page_size_int(void); -static uchar* my_large_malloc_int(size_t size, myf my_flags); -static my_bool my_large_free_int(uchar* ptr, myf my_flags); - -/* Gets the size of large pages from the OS */ - -uint my_get_large_page_size(void) -{ - uint size; - DBUG_ENTER("my_get_large_page_size"); - - if (!(size = my_get_large_page_size_int())) - fprintf(stderr, "Warning: Failed to determine large page size\n"); - - DBUG_RETURN(size); -} - -/* - General large pages allocator. - Tries to allocate memory from large pages pool and falls back to - my_malloc_lock() in case of failure -*/ - -uchar* my_large_malloc(size_t size, myf my_flags) -{ - uchar* ptr; - DBUG_ENTER("my_large_malloc"); - - if (my_use_large_pages && my_large_page_size) - { - if ((ptr = my_large_malloc_int(size, my_flags)) != NULL) - DBUG_RETURN(ptr); - if (my_flags & MY_WME) - fprintf(stderr, "Warning: Using conventional memory pool\n"); - } - - DBUG_RETURN(my_malloc_lock(size, my_flags)); -} - -/* - General large pages deallocator. - Tries to deallocate memory as if it was from large pages pool and falls back - to my_free_lock() in case of failure - */ - -void my_large_free(uchar* ptr, myf my_flags __attribute__((unused))) -{ - DBUG_ENTER("my_large_free"); - - /* - my_large_free_int() can only fail if ptr was not allocated with - my_large_malloc_int(), i.e. my_malloc_lock() was used so we should free it - with my_free_lock() - */ - if (!my_use_large_pages || !my_large_page_size || - !my_large_free_int(ptr, my_flags)) - my_free_lock(ptr, my_flags); - - DBUG_VOID_RETURN; -} - -#ifdef HUGETLB_USE_PROC_MEMINFO -/* Linux-specific function to determine the size of large pages */ - -uint my_get_large_page_size_int(void) -{ - FILE *f; - uint size = 0; - char buf[256]; - DBUG_ENTER("my_get_large_page_size_int"); - - if (!(f = my_fopen("/proc/meminfo", O_RDONLY, MYF(MY_WME)))) - goto finish; - - while (fgets(buf, sizeof(buf), f)) - if (sscanf(buf, "Hugepagesize: %u kB", &size)) - break; - - my_fclose(f, MYF(MY_WME)); - -finish: - DBUG_RETURN(size * 1024); -} -#endif /* HUGETLB_USE_PROC_MEMINFO */ - -#if HAVE_DECL_SHM_HUGETLB -/* Linux-specific large pages allocator */ - -uchar* my_large_malloc_int(size_t size, myf my_flags) -{ - int shmid; - uchar* ptr; - struct shmid_ds buf; - DBUG_ENTER("my_large_malloc_int"); - - /* Align block size to my_large_page_size */ - size = ((size - 1) & ~(my_large_page_size - 1)) + my_large_page_size; - - shmid = shmget(IPC_PRIVATE, size, SHM_HUGETLB | SHM_R | SHM_W); - if (shmid < 0) - { - if (my_flags & MY_WME) - fprintf(stderr, - "Warning: Failed to allocate %lu bytes from HugeTLB memory." - " errno %d\n", (ulong) size, errno); - - DBUG_RETURN(NULL); - } - - ptr = (uchar*) shmat(shmid, NULL, 0); - if (ptr == (uchar *) -1) - { - if (my_flags& MY_WME) - fprintf(stderr, "Warning: Failed to attach shared memory segment," - " errno %d\n", errno); - shmctl(shmid, IPC_RMID, &buf); - - DBUG_RETURN(NULL); - } - - /* - Remove the shared memory segment so that it will be automatically freed - after memory is detached or process exits - */ - shmctl(shmid, IPC_RMID, &buf); - - DBUG_RETURN(ptr); -} - -/* Linux-specific large pages deallocator */ - -my_bool my_large_free_int(uchar *ptr, myf my_flags __attribute__((unused))) -{ - DBUG_ENTER("my_large_free_int"); - DBUG_RETURN(shmdt(ptr) == 0); -} -#endif /* HAVE_DECL_SHM_HUGETLB */ - -#endif /* HAVE_LARGE_PAGES */ diff --git a/externals/mysql/mysys/my_lib.c b/externals/mysql/mysys/my_lib.c deleted file mode 100644 index 30d0f89b14..0000000000 --- a/externals/mysql/mysys/my_lib.c +++ /dev/null @@ -1,559 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* TODO: check for overun of memory for names. */ -/* Convert MSDOS-TIME to standar time_t (still needed?) */ - -#include "mysys_priv.h" -#include -#include /* Structs used by my_dir,includes sys/types */ -#include "mysys_err.h" -#if defined(HAVE_DIRENT_H) -# include -# define NAMLEN(dirent) strlen((dirent)->d_name) -#else -# define dirent direct -# define NAMLEN(dirent) (dirent)->d_namlen -# if defined(HAVE_SYS_NDIR_H) -# include -# endif -# if defined(HAVE_SYS_DIR_H) -# include -# endif -# if defined(HAVE_NDIR_H) -# include -# endif -# if defined(_WIN32) -# ifdef __BORLANDC__ -# include -# endif -# endif -#endif -#ifdef VMS -#include -#include -#include -#endif - -#if defined(THREAD) && defined(HAVE_READDIR_R) -#define READDIR(A,B,C) ((errno=readdir_r(A,B,&C)) != 0 || !C) -#else -#define READDIR(A,B,C) (!(C=readdir(A))) -#endif - -/* - We are assuming that directory we are reading is either has less than - 100 files and so can be read in one initial chunk or has more than 1000 - files and so big increment are suitable. -*/ -#define ENTRIES_START_SIZE (8192/sizeof(FILEINFO)) -#define ENTRIES_INCREMENT (65536/sizeof(FILEINFO)) -#define NAMES_START_SIZE 32768 - - -static int comp_names(struct fileinfo *a,struct fileinfo *b); - - - /* We need this because program don't know with malloc we used */ - -void my_dirend(MY_DIR *buffer) -{ - DBUG_ENTER("my_dirend"); - if (buffer) - { - delete_dynamic((DYNAMIC_ARRAY*)((char*)buffer + - ALIGN_SIZE(sizeof(MY_DIR)))); - free_root((MEM_ROOT*)((char*)buffer + ALIGN_SIZE(sizeof(MY_DIR)) + - ALIGN_SIZE(sizeof(DYNAMIC_ARRAY))), MYF(0)); - my_free((uchar*) buffer,MYF(0)); - } - DBUG_VOID_RETURN; -} /* my_dirend */ - - - /* Compare in sort of filenames */ - -static int comp_names(struct fileinfo *a, struct fileinfo *b) -{ - return (strcmp(a->name,b->name)); -} /* comp_names */ - - -#if !defined(_WIN32) - -MY_DIR *my_dir(const char *path, myf MyFlags) -{ - char *buffer; - MY_DIR *result= 0; - FILEINFO finfo; - DYNAMIC_ARRAY *dir_entries_storage; - MEM_ROOT *names_storage; - DIR *dirp; - struct dirent *dp; - char tmp_path[FN_REFLEN+1],*tmp_file; -#ifdef THREAD - char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1]; -#endif - DBUG_ENTER("my_dir"); - DBUG_PRINT("my",("path: '%s' MyFlags: %d",path,MyFlags)); - -#if defined(THREAD) && !defined(HAVE_READDIR_R) - pthread_mutex_lock(&THR_LOCK_open); -#endif - - dirp = opendir(directory_file_name(tmp_path,(char *) path)); -#if defined(__amiga__) - if ((dirp->dd_fd) < 0) /* Directory doesn't exists */ - goto error; -#endif - if (dirp == NULL || - ! (buffer= my_malloc(ALIGN_SIZE(sizeof(MY_DIR)) + - ALIGN_SIZE(sizeof(DYNAMIC_ARRAY)) + - sizeof(MEM_ROOT), MyFlags))) - goto error; - - dir_entries_storage= (DYNAMIC_ARRAY*)(buffer + ALIGN_SIZE(sizeof(MY_DIR))); - names_storage= (MEM_ROOT*)(buffer + ALIGN_SIZE(sizeof(MY_DIR)) + - ALIGN_SIZE(sizeof(DYNAMIC_ARRAY))); - - if (my_init_dynamic_array(dir_entries_storage, sizeof(FILEINFO), - ENTRIES_START_SIZE, ENTRIES_INCREMENT)) - { - my_free((uchar*) buffer,MYF(0)); - goto error; - } - init_alloc_root(names_storage, NAMES_START_SIZE, NAMES_START_SIZE); - - /* MY_DIR structure is allocated and completly initialized at this point */ - result= (MY_DIR*)buffer; - - tmp_file=strend(tmp_path); - -#ifdef THREAD - dp= (struct dirent*) dirent_tmp; -#else - dp=0; -#endif - - while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp))) - { - if (!(finfo.name= strdup_root(names_storage, dp->d_name))) - goto error; - - if (MyFlags & MY_WANT_STAT) - { - if (!(finfo.mystat= (MY_STAT*)alloc_root(names_storage, - sizeof(MY_STAT)))) - goto error; - - bzero(finfo.mystat, sizeof(MY_STAT)); - (void) strmov(tmp_file,dp->d_name); - (void) my_stat(tmp_path, finfo.mystat, MyFlags); - if (!(finfo.mystat->st_mode & MY_S_IREAD)) - continue; - } - else - finfo.mystat= NULL; - - if (push_dynamic(dir_entries_storage, (uchar*)&finfo)) - goto error; - } - - (void) closedir(dirp); -#if defined(THREAD) && !defined(HAVE_READDIR_R) - pthread_mutex_unlock(&THR_LOCK_open); -#endif - result->dir_entry= (FILEINFO *)dir_entries_storage->buffer; - result->number_off_files= dir_entries_storage->elements; - - if (!(MyFlags & MY_DONT_SORT)) - my_qsort((void *) result->dir_entry, result->number_off_files, - sizeof(FILEINFO), (qsort_cmp) comp_names); - DBUG_RETURN(result); - - error: -#if defined(THREAD) && !defined(HAVE_READDIR_R) - pthread_mutex_unlock(&THR_LOCK_open); -#endif - my_errno=errno; - if (dirp) - (void) closedir(dirp); - my_dirend(result); - if (MyFlags & (MY_FAE | MY_WME)) - my_error(EE_DIR,MYF(ME_BELL+ME_WAITTANG),path,my_errno); - DBUG_RETURN((MY_DIR *) NULL); -} /* my_dir */ - - -/* - * Convert from directory name to filename. - * On VMS: - * xyzzy:[mukesh.emacs] => xyzzy:[mukesh]emacs.dir.1 - * xyzzy:[mukesh] => xyzzy:[000000]mukesh.dir.1 - * On UNIX, it's simple: just make sure there is a terminating / - - * Returns pointer to dst; - */ - -char * directory_file_name (char * dst, const char *src) -{ -#ifndef VMS - - /* Process as Unix format: just remove test the final slash. */ - - char * end; - - if (src[0] == 0) - src= (char*) "."; /* Use empty as current */ - end=strmov(dst, src); - if (end[-1] != FN_LIBCHAR) - { - end[0]=FN_LIBCHAR; /* Add last '/' */ - end[1]='\0'; - } - return dst; - -#else /* VMS */ - - long slen; - long rlen; - char * ptr, rptr; - char bracket; - struct FAB fab = cc$rms_fab; - struct NAM nam = cc$rms_nam; - char esa[NAM$C_MAXRSS]; - - if (! src[0]) - src="[.]"; /* Empty is == current dir */ - - slen = strlen (src) - 1; - if (src[slen] == FN_C_AFTER_DIR || src[slen] == FN_C_AFTER_DIR_2 || - src[slen] == FN_DEVCHAR) - { - /* VMS style - convert [x.y.z] to [x.y]z, [x] to [000000]x */ - fab.fab$l_fna = src; - fab.fab$b_fns = slen + 1; - fab.fab$l_nam = &nam; - fab.fab$l_fop = FAB$M_NAM; - - nam.nam$l_esa = esa; - nam.nam$b_ess = sizeof esa; - nam.nam$b_nop |= NAM$M_SYNCHK; - - /* We call SYS$PARSE to handle such things as [--] for us. */ - if (SYS$PARSE(&fab, 0, 0) == RMS$_NORMAL) - { - slen = nam.nam$b_esl - 1; - if (esa[slen] == ';' && esa[slen - 1] == '.') - slen -= 2; - esa[slen + 1] = '\0'; - src = esa; - } - if (src[slen] != FN_C_AFTER_DIR && src[slen] != FN_C_AFTER_DIR_2) - { - /* what about when we have logical_name:???? */ - if (src[slen] == FN_DEVCHAR) - { /* Xlate logical name and see what we get */ - (void) strmov(dst,src); - dst[slen] = 0; /* remove colon */ - if (!(src = getenv (dst))) - return dst; /* Can't translate */ - - /* should we jump to the beginning of this procedure? - Good points: allows us to use logical names that xlate - to Unix names, - Bad points: can be a problem if we just translated to a device - name... - For now, I'll punt and always expect VMS names, and hope for - the best! */ - - slen = strlen (src) - 1; - if (src[slen] != FN_C_AFTER_DIR && src[slen] != FN_C_AFTER_DIR_2) - { /* no recursion here! */ - (void) strmov(dst, src); - return(dst); - } - } - else - { /* not a directory spec */ - (void) strmov(dst, src); - return(dst); - } - } - - bracket = src[slen]; /* End char */ - if (!(ptr = strchr (src, bracket - 2))) - { /* no opening bracket */ - (void) strmov (dst, src); - return dst; - } - if (!(rptr = strrchr (src, '.'))) - rptr = ptr; - slen = rptr - src; - (void) strmake (dst, src, slen); - - if (*rptr == '.') - { /* Put bracket and add */ - dst[slen++] = bracket; /* (rptr+1) after this */ - } - else - { - /* If we have the top-level of a rooted directory (i.e. xx:[000000]), - then translate the device and recurse. */ - - if (dst[slen - 1] == ':' - && dst[slen - 2] != ':' /* skip decnet nodes */ - && strcmp(src + slen, "[000000]") == 0) - { - dst[slen - 1] = '\0'; - if ((ptr = getenv (dst)) - && (rlen = strlen (ptr) - 1) > 0 - && (ptr[rlen] == FN_C_AFTER_DIR || ptr[rlen] == FN_C_AFTER_DIR_2) - && ptr[rlen - 1] == '.') - { - (void) strmov(esa,ptr); - esa[rlen - 1] = FN_C_AFTER_DIR; - esa[rlen] = '\0'; - return (directory_file_name (dst, esa)); - } - else - dst[slen - 1] = ':'; - } - (void) strmov(dst+slen,"[000000]"); - slen += 8; - } - (void) strmov(strmov(dst+slen,rptr+1)-1,".DIR.1"); - return dst; - } - (void) strmov(dst, src); - if (dst[slen] == '/' && slen > 1) - dst[slen] = 0; - return dst; -#endif /* VMS */ -} /* directory_file_name */ - -#else - -/* -***************************************************************************** -** Read long filename using windows rutines -***************************************************************************** -*/ - -MY_DIR *my_dir(const char *path, myf MyFlags) -{ - char *buffer; - MY_DIR *result= 0; - FILEINFO finfo; - DYNAMIC_ARRAY *dir_entries_storage; - MEM_ROOT *names_storage; -#ifdef __BORLANDC__ - struct ffblk find; -#else - struct _finddata_t find; -#endif - ushort mode; - char tmp_path[FN_REFLEN],*tmp_file,attrib; -#ifdef _WIN64 - __int64 handle; -#else - long handle; -#endif - DBUG_ENTER("my_dir"); - DBUG_PRINT("my",("path: '%s' stat: %d MyFlags: %d",path,MyFlags)); - - /* Put LIB-CHAR as last path-character if not there */ - tmp_file=tmp_path; - if (!*path) - *tmp_file++ ='.'; /* From current dir */ - tmp_file= strnmov(tmp_file, path, FN_REFLEN-5); - if (tmp_file[-1] == FN_DEVCHAR) - *tmp_file++= '.'; /* From current dev-dir */ - if (tmp_file[-1] != FN_LIBCHAR) - *tmp_file++ =FN_LIBCHAR; - tmp_file[0]='*'; /* Windows needs this !??? */ - tmp_file[1]='.'; - tmp_file[2]='*'; - tmp_file[3]='\0'; - - if (!(buffer= my_malloc(ALIGN_SIZE(sizeof(MY_DIR)) + - ALIGN_SIZE(sizeof(DYNAMIC_ARRAY)) + - sizeof(MEM_ROOT), MyFlags))) - goto error; - - dir_entries_storage= (DYNAMIC_ARRAY*)(buffer + ALIGN_SIZE(sizeof(MY_DIR))); - names_storage= (MEM_ROOT*)(buffer + ALIGN_SIZE(sizeof(MY_DIR)) + - ALIGN_SIZE(sizeof(DYNAMIC_ARRAY))); - - if (my_init_dynamic_array(dir_entries_storage, sizeof(FILEINFO), - ENTRIES_START_SIZE, ENTRIES_INCREMENT)) - { - my_free((uchar*) buffer,MYF(0)); - goto error; - } - init_alloc_root(names_storage, NAMES_START_SIZE, NAMES_START_SIZE); - - /* MY_DIR structure is allocated and completly initialized at this point */ - result= (MY_DIR*)buffer; - -#ifdef __BORLANDC__ - if ((handle= findfirst(tmp_path,&find,0)) == -1L) -#else - if ((handle=_findfirst(tmp_path,&find)) == -1L) -#endif - { - DBUG_PRINT("info", ("findfirst returned error, errno: %d", errno)); - if (errno != EINVAL) - goto error; - /* - Could not read the directory, no read access. - Probably because by "chmod -r". - continue and return zero files in dir - */ - } - else - { - - do - { -#ifdef __BORLANDC__ - attrib= find.ff_attrib; -#else - attrib= find.attrib; - /* - Do not show hidden and system files which Windows sometimes create. - Note. Because Borland's findfirst() is called with the third - argument = 0 hidden/system files are excluded from the search. - */ - if (attrib & (_A_HIDDEN | _A_SYSTEM)) - continue; -#endif -#ifdef __BORLANDC__ - if (!(finfo.name= strdup_root(names_storage, find.ff_name))) - goto error; -#else - if (!(finfo.name= strdup_root(names_storage, find.name))) - goto error; -#endif - if (MyFlags & MY_WANT_STAT) - { - if (!(finfo.mystat= (MY_STAT*)alloc_root(names_storage, - sizeof(MY_STAT)))) - goto error; - - bzero(finfo.mystat, sizeof(MY_STAT)); -#ifdef __BORLANDC__ - finfo.mystat->st_size=find.ff_fsize; -#else - finfo.mystat->st_size=find.size; -#endif - mode= MY_S_IREAD; - if (!(attrib & _A_RDONLY)) - mode|= MY_S_IWRITE; - if (attrib & _A_SUBDIR) - mode|= MY_S_IFDIR; - finfo.mystat->st_mode= mode; -#ifdef __BORLANDC__ - finfo.mystat->st_mtime= ((uint32) find.ff_ftime); -#else - finfo.mystat->st_mtime= ((uint32) find.time_write); -#endif - } - else - finfo.mystat= NULL; - - if (push_dynamic(dir_entries_storage, (uchar*)&finfo)) - goto error; - } -#ifdef __BORLANDC__ - while (findnext(&find) == 0); -#else - while (_findnext(handle,&find) == 0); - - _findclose(handle); -#endif - } - - result->dir_entry= (FILEINFO *)dir_entries_storage->buffer; - result->number_off_files= dir_entries_storage->elements; - - if (!(MyFlags & MY_DONT_SORT)) - my_qsort((void *) result->dir_entry, result->number_off_files, - sizeof(FILEINFO), (qsort_cmp) comp_names); - DBUG_PRINT("exit", ("found %d files", result->number_off_files)); - DBUG_RETURN(result); -error: - my_errno=errno; -#ifndef __BORLANDC__ - if (handle != -1) - _findclose(handle); -#endif - my_dirend(result); - if (MyFlags & MY_FAE+MY_WME) - my_error(EE_DIR,MYF(ME_BELL+ME_WAITTANG),path,errno); - DBUG_RETURN((MY_DIR *) NULL); -} /* my_dir */ - -#endif /* _WIN32 */ - -/**************************************************************************** -** File status -** Note that MY_STAT is assumed to be same as struct stat -****************************************************************************/ - - -int my_fstat(File Filedes, MY_STAT *stat_area, - myf MyFlags __attribute__((unused))) -{ - DBUG_ENTER("my_fstat"); - DBUG_PRINT("my",("fd: %d MyFlags: %d", Filedes, MyFlags)); -#ifdef _WIN32 - DBUG_RETURN(my_win_fstat(Filedes, stat_area)); -#else - DBUG_RETURN(fstat(Filedes, (struct stat *) stat_area)); -#endif -} - - -MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) -{ - int m_used; - DBUG_ENTER("my_stat"); - DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %d", path, - stat_area, my_flags)); - - if ((m_used= (stat_area == NULL))) - if (!(stat_area= (MY_STAT *) my_malloc(sizeof(MY_STAT), my_flags))) - goto error; -#ifndef _WIN32 - if (! stat((char *) path, (struct stat *) stat_area) ) - DBUG_RETURN(stat_area); -#else - if (! my_win_stat(path, stat_area) ) - DBUG_RETURN(stat_area); -#endif - DBUG_PRINT("error",("Got errno: %d from stat", errno)); - my_errno= errno; - if (m_used) /* Free if new area */ - my_free((uchar*) stat_area,MYF(0)); - -error: - if (my_flags & (MY_FAE+MY_WME)) - { - my_error(EE_STAT, MYF(ME_BELL+ME_WAITTANG),path,my_errno); - DBUG_RETURN((MY_STAT *) NULL); - } - DBUG_RETURN((MY_STAT *) NULL); -} /* my_stat */ diff --git a/externals/mysql/mysys/my_libwrap.c b/externals/mysql/mysys/my_libwrap.c deleted file mode 100644 index e72334ba80..0000000000 --- a/externals/mysql/mysys/my_libwrap.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - This is needed to be able to compile with original libwrap header - files that don't have the prototypes -*/ - -#include -#include - -#ifdef HAVE_LIBWRAP - -void my_fromhost(struct request_info *req) -{ - fromhost(req); -} - -int my_hosts_access(struct request_info *req) -{ - return hosts_access(req); -} - -char *my_eval_client(struct request_info *req) -{ - return eval_client(req); -} - -#endif /* HAVE_LIBWRAP */ diff --git a/externals/mysql/mysys/my_lock.c b/externals/mysql/mysys/my_lock.c deleted file mode 100644 index 408089df3e..0000000000 --- a/externals/mysql/mysys/my_lock.c +++ /dev/null @@ -1,290 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#undef MY_HOW_OFTEN_TO_ALARM -#define MY_HOW_OFTEN_TO_ALARM ((int) my_time_to_wait_for_lock) -#ifdef NO_ALARM_LOOP -#undef NO_ALARM_LOOP -#endif -#include -#ifdef __NETWARE__ -#include -#endif - -#ifdef _WIN32 -#define WIN_LOCK_INFINITE -1 -#define WIN_LOCK_SLEEP_MILLIS 100 - -static int win_lock(File fd, int locktype, my_off_t start, my_off_t length, - int timeout_sec) -{ - LARGE_INTEGER liOffset,liLength; - DWORD dwFlags; - OVERLAPPED ov= {0}; - HANDLE hFile= (HANDLE)my_get_osfhandle(fd); - DWORD lastError= 0; - int i; - int timeout_millis= timeout_sec * 1000; - - DBUG_ENTER("win_lock"); - - liOffset.QuadPart= start; - liLength.QuadPart= length; - - ov.Offset= liOffset.LowPart; - ov.OffsetHigh= liOffset.HighPart; - - if (locktype == F_UNLCK) - { - if (UnlockFileEx(hFile, 0, liLength.LowPart, liLength.HighPart, &ov)) - DBUG_RETURN(0); - /* - For compatibility with fcntl implementation, ignore error, - if region was not locked - */ - if (GetLastError() == ERROR_NOT_LOCKED) - { - SetLastError(0); - DBUG_RETURN(0); - } - goto error; - } - else if (locktype == F_RDLCK) - /* read lock is mapped to a shared lock. */ - dwFlags= 0; - else - /* write lock is mapped to an exclusive lock. */ - dwFlags= LOCKFILE_EXCLUSIVE_LOCK; - - /* - Drop old lock first to avoid double locking. - During analyze of Bug#38133 (Myisamlog test fails on Windows) - I met the situation that the program myisamlog locked the file - exclusively, then additionally shared, then did one unlock, and - then blocked on an attempt to lock it exclusively again. - Unlocking before every lock fixed the problem. - Note that this introduces a race condition. When the application - wants to convert an exclusive lock into a shared one, it will now - first unlock the file and then lock it shared. A waiting exclusive - lock could step in here. For reasons described in Bug#38133 and - Bug#41124 (Server hangs on Windows with --external-locking after - INSERT...SELECT) and in the review thread at - http://lists.mysql.com/commits/60721 it seems to be the better - option than not to unlock here. - If one day someone notices a way how to do file lock type changes - on Windows without unlocking before taking the new lock, please - change this code accordingly to fix the race condition. - */ - if (!UnlockFileEx(hFile, 0, liLength.LowPart, liLength.HighPart, &ov) && - (GetLastError() != ERROR_NOT_LOCKED)) - goto error; - - if (timeout_sec == WIN_LOCK_INFINITE) - { - if (LockFileEx(hFile, dwFlags, 0, liLength.LowPart, liLength.HighPart, &ov)) - DBUG_RETURN(0); - goto error; - } - - dwFlags|= LOCKFILE_FAIL_IMMEDIATELY; - timeout_millis= timeout_sec * 1000; - /* Try lock in a loop, until the lock is acquired or timeout happens */ - for(i= 0; ;i+= WIN_LOCK_SLEEP_MILLIS) - { - if (LockFileEx(hFile, dwFlags, 0, liLength.LowPart, liLength.HighPart, &ov)) - DBUG_RETURN(0); - - if (GetLastError() != ERROR_LOCK_VIOLATION) - goto error; - - if (i >= timeout_millis) - break; - Sleep(WIN_LOCK_SLEEP_MILLIS); - } - - /* timeout */ - errno= EAGAIN; - DBUG_RETURN(-1); - -error: - my_osmaperr(GetLastError()); - DBUG_RETURN(-1); -} -#endif - - - -/* - Lock a part of a file - - RETURN VALUE - 0 Success - -1 An error has occured and 'my_errno' is set - to indicate the actual error code. -*/ - -int my_lock(File fd, int locktype, my_off_t start, my_off_t length, - myf MyFlags) -{ -#ifdef HAVE_FCNTL - int value; - ALARM_VARIABLES; -#endif -#ifdef __NETWARE__ - int nxErrno; -#endif - - DBUG_ENTER("my_lock"); - DBUG_PRINT("my",("fd: %d Op: %d start: %ld Length: %ld MyFlags: %d", - fd,locktype,(long) start,(long) length,MyFlags)); -#ifdef VMS - DBUG_RETURN(0); -#else - if (my_disable_locking && ! (MyFlags & MY_FORCE_LOCK)) - DBUG_RETURN(0); - -#if defined(__NETWARE__) - { - NXSOffset_t nxLength = length; - unsigned long nxLockFlags = 0; - - if ((MyFlags & MY_SHORT_WAIT)) - { - /* not yet implemented */ - MyFlags|= MY_NO_WAIT; - } - - if (length == F_TO_EOF) - { - /* EOF is interpreted as a very large length. */ - nxLength = 0x7FFFFFFFFFFFFFFF; - } - - if (locktype == F_UNLCK) - { - /* The lock flags are currently ignored by NKS. */ - if (!(nxErrno= NXFileRangeUnlock(fd, 0L, start, nxLength))) - DBUG_RETURN(0); - } - else - { - if (locktype == F_RDLCK) - { - /* A read lock is mapped to a shared lock. */ - nxLockFlags = NX_RANGE_LOCK_SHARED; - } - else - { - /* A write lock is mapped to an exclusive lock. */ - nxLockFlags = NX_RANGE_LOCK_EXCL; - } - - if (MyFlags & MY_NO_WAIT) - { - /* Don't block on the lock. */ - nxLockFlags |= NX_RANGE_LOCK_TRYLOCK; - } - - if (!(nxErrno= NXFileRangeLock(fd, nxLockFlags, start, nxLength))) - DBUG_RETURN(0); - } - } -#elif defined(_WIN32) - { - int timeout_sec; - if (MyFlags & MY_NO_WAIT) - timeout_sec= 0; - else if(MyFlags & MY_SHORT_WAIT) - timeout_sec= my_time_to_wait_for_lock; - else - timeout_sec= WIN_LOCK_INFINITE; - - if(win_lock(fd, locktype, start, length, timeout_sec) == 0) - DBUG_RETURN(0); - } -#else -#if defined(HAVE_FCNTL) - { - struct flock lock; - - lock.l_type= (short) locktype; - lock.l_whence= SEEK_SET; - lock.l_start= (off_t) start; - lock.l_len= (off_t) length; - - if (MyFlags & (MY_NO_WAIT | MY_SHORT_WAIT)) - { - if (fcntl(fd,F_SETLK,&lock) != -1) /* Check if we can lock */ - DBUG_RETURN(0); /* Ok, file locked */ - if (MyFlags & MY_NO_WAIT) - { - my_errno= (errno == EACCES) ? EAGAIN : errno ? errno : -1; - DBUG_RETURN(-1); - } - - DBUG_PRINT("info",("Was locked, trying with alarm")); - ALARM_INIT; - while ((value=fcntl(fd,F_SETLKW,&lock)) && ! ALARM_TEST && - errno == EINTR) - { /* Setup again so we don`t miss it */ - ALARM_REINIT; - } - ALARM_END; - if (value != -1) - DBUG_RETURN(0); - if (errno == EINTR) - errno=EAGAIN; - } - else if (fcntl(fd,F_SETLKW,&lock) != -1) /* Wait until a lock */ - DBUG_RETURN(0); - } -#else - if (MyFlags & MY_SEEK_NOT_DONE) - { - if (my_seek(fd,start,MY_SEEK_SET,MYF(MyFlags & ~MY_SEEK_NOT_DONE)) - == MY_FILEPOS_ERROR) - { - /* - If an error has occured in my_seek then we will already - have an error code in my_errno; Just return error code. - */ - DBUG_RETURN(-1); - } - } - if (lockf(fd,locktype,length) != -1) - DBUG_RETURN(0); -#endif /* HAVE_FCNTL */ -#endif /* HAVE_LOCKING */ - -#ifdef __NETWARE__ - my_errno = nxErrno; -#else - /* We got an error. We don't want EACCES errors */ - my_errno=(errno == EACCES) ? EAGAIN : errno ? errno : -1; -#endif - if (MyFlags & MY_WME) - { - if (locktype == F_UNLCK) - my_error(EE_CANTUNLOCK,MYF(ME_BELL+ME_WAITTANG),my_errno); - else - my_error(EE_CANTLOCK,MYF(ME_BELL+ME_WAITTANG),my_errno); - } - DBUG_PRINT("error",("my_errno: %d (%d)",my_errno,errno)); - DBUG_RETURN(-1); -#endif /* ! VMS */ -} /* my_lock */ diff --git a/externals/mysql/mysys/my_lockmem.c b/externals/mysql/mysys/my_lockmem.c deleted file mode 100644 index 7d226b187d..0000000000 --- a/externals/mysql/mysys/my_lockmem.c +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Alloc a block of locked memory */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include - -#ifdef HAVE_MLOCK -#include - -struct st_mem_list -{ - LIST list; - uchar *page; - uint size; -}; - -LIST *mem_list; - -void *my_malloc_lock(size_t size,myf MyFlags) -{ - int success; - uint pagesize=sysconf(_SC_PAGESIZE); - uchar *ptr; - struct st_mem_list *element; - DBUG_ENTER("my_malloc_lock"); - - size=((size-1) & ~(pagesize-1))+pagesize; -#if HAVE_MEMALIGN - if (!(ptr=memalign(pagesize,size))) -#else - if (!(ptr=valloc(size))) -#endif - { - if (MyFlags & (MY_FAE+MY_WME)) - my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG),size); - DBUG_RETURN(0); - } - success = mlock((uchar*) ptr,size); - if (success != 0 && geteuid() == 0) - { - DBUG_PRINT("warning",("Failed to lock memory. errno %d\n", - errno)); - fprintf(stderr, "Warning: Failed to lock memory. errno %d\n", - errno); - } - else - { - /* Add block in a list for munlock */ - if (!(element=(struct st_mem_list*) my_malloc(sizeof(*element),MyFlags))) - { - (void) munlock((uchar*) ptr,size); - free(ptr); - DBUG_RETURN(0); - } - element->list.data=(uchar*) element; - element->page=ptr; - element->size=size; - pthread_mutex_lock(&THR_LOCK_malloc); - mem_list=list_add(mem_list,&element->list); - pthread_mutex_unlock(&THR_LOCK_malloc); - } - DBUG_RETURN(ptr); -} - - -void my_free_lock(void *ptr,myf Myflags __attribute__((unused))) -{ - LIST *list; - struct st_mem_list *element=0; - - pthread_mutex_lock(&THR_LOCK_malloc); - for (list=mem_list ; list ; list=list->next) - { - element=(struct st_mem_list*) list->data; - if (ptr == element->page) - { /* Found locked mem */ - (void) munlock((uchar*) ptr,element->size); - mem_list=list_delete(mem_list,list); - break; - } - } - pthread_mutex_unlock(&THR_LOCK_malloc); - if (element) - my_free((uchar*) element,MYF(0)); - free(ptr); /* Free even if not locked */ -} - -#endif /* HAVE_MLOCK */ diff --git a/externals/mysql/mysys/my_malloc.c b/externals/mysql/mysys/my_malloc.c deleted file mode 100644 index f1254c0f31..0000000000 --- a/externals/mysql/mysys/my_malloc.c +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifdef SAFEMALLOC /* We don't need SAFEMALLOC here */ -#undef SAFEMALLOC -#endif - -#include "mysys_priv.h" -#include "mysys_err.h" -#include - - /* My memory allocator */ - -void *my_malloc(size_t size, myf my_flags) -{ - void* point; - DBUG_ENTER("my_malloc"); - DBUG_PRINT("my",("size: %lu my_flags: %d", (ulong) size, my_flags)); - - if (!size) - size=1; /* Safety */ - - /* If compiled with DBUG, test for error injection. Described in my_sys.h. */ - /* purecov: begin tested */ - if (!(point= IF_DBUG(my_malloc_error_inject ? NULL :) (char*) malloc(size))) - { - IF_DBUG(if (my_malloc_error_inject) errno= ENOMEM; - my_malloc_error_inject= 0); - my_errno=errno; - if (my_flags & MY_FAE) - error_handler_hook=fatal_error_handler_hook; - if (my_flags & (MY_FAE+MY_WME)) - my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH),size); - if (my_flags & MY_FAE) - exit(1); - } - else if (my_flags & MY_ZEROFILL) - bzero(point,size); - DBUG_PRINT("exit",("ptr: %p", point)); - DBUG_RETURN((void*) point); - /* purecov: end */ -} /* my_malloc */ - - - /* Free memory allocated with my_malloc */ - /*ARGSUSED*/ - -void my_no_flags_free(void* ptr) -{ - DBUG_ENTER("my_free"); - DBUG_PRINT("my",("ptr: %p", ptr)); - if (ptr) - free(ptr); - DBUG_VOID_RETURN; -} /* my_free */ - - - /* malloc and copy */ - -void* my_memdup(const void *from, size_t length, myf my_flags) -{ - void *ptr; - if ((ptr= my_malloc(length,my_flags)) != 0) - memcpy(ptr, from, length); - return(ptr); -} - - -char *my_strdup(const char *from, myf my_flags) -{ - char *ptr; - size_t length= strlen(from)+1; - if ((ptr= (char*) my_malloc(length, my_flags))) - memcpy((uchar*) ptr, (uchar*) from,(size_t) length); - return(ptr); -} - - -char *my_strndup(const char *from, size_t length, myf my_flags) -{ - char *ptr; - if ((ptr= (char*) my_malloc(length+1,my_flags)) != 0) - { - memcpy((uchar*) ptr, (uchar*) from, length); - ptr[length]=0; - } - return((char*) ptr); -} diff --git a/externals/mysql/mysys/my_memmem.c b/externals/mysql/mysys/my_memmem.c deleted file mode 100644 index c000f14bc6..0000000000 --- a/externals/mysql/mysys/my_memmem.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include - -/* - my_memmem, port of a GNU extension. - - Returns a pointer to the beginning of the substring, needle, or NULL if the - substring is not found in haystack. -*/ - -void *my_memmem(const void *haystack, size_t haystacklen, - const void *needle, size_t needlelen) -{ - const unsigned char *cursor; - const unsigned char *last_possible_needle_location = - (unsigned char *)haystack + haystacklen - needlelen; - - /* Easy answers */ - if (needlelen > haystacklen) return(NULL); - if (needle == NULL) return(NULL); - if (haystack == NULL) return(NULL); - if (needlelen == 0) return(NULL); - if (haystacklen == 0) return(NULL); - - for (cursor = haystack; cursor <= last_possible_needle_location; cursor++) { - if (memcmp(needle, cursor, needlelen) == 0) { - return((void *) cursor); - } - } - return(NULL); -} - - - -#ifdef MAIN -#include - -int main(int argc, char *argv[]) { - char haystack[10], needle[3]; - - memmove(haystack, "0123456789", 10); - - memmove(needle, "no", 2); - assert(my_memmem(haystack, 10, needle, 2) == NULL); - - memmove(needle, "345", 3); - assert(my_memmem(haystack, 10, needle, 3) != NULL); - - memmove(needle, "789", 3); - assert(my_memmem(haystack, 10, needle, 3) != NULL); - assert(my_memmem(haystack, 9, needle, 3) == NULL); - - memmove(needle, "012", 3); - assert(my_memmem(haystack, 10, needle, 3) != NULL); - assert(my_memmem(NULL, 10, needle, 3) == NULL); - - assert(my_memmem(NULL, 10, needle, 3) == NULL); - assert(my_memmem(haystack, 0, needle, 3) == NULL); - assert(my_memmem(haystack, 10, NULL, 3) == NULL); - assert(my_memmem(haystack, 10, needle, 0) == NULL); - - assert(my_memmem(haystack, 1, needle, 3) == NULL); - - printf("success\n"); - return(0); -} - -#endif diff --git a/externals/mysql/mysys/my_messnc.c b/externals/mysql/mysys/my_messnc.c deleted file mode 100644 index 6f86bf3478..0000000000 --- a/externals/mysql/mysys/my_messnc.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" - -void my_message_no_curses(uint error __attribute__((unused)), - const char *str, myf MyFlags) -{ - DBUG_ENTER("my_message_no_curses"); - DBUG_PRINT("enter",("message: %s",str)); - (void) fflush(stdout); - if (MyFlags & ME_BELL) -#ifdef __NETWARE__ - ringbell(); /* Bell */ -#else - (void) fputc('\007',stderr); /* Bell */ -#endif /* __NETWARE__ */ - if (my_progname) - { - (void)fputs(my_progname,stderr); (void)fputs(": ",stderr); - } - (void)fputs(str,stderr); - (void)fputc('\n',stderr); - (void)fflush(stderr); - DBUG_VOID_RETURN; -} diff --git a/externals/mysql/mysys/my_mkdir.c b/externals/mysql/mysys/my_mkdir.c deleted file mode 100644 index 676c6c1cd5..0000000000 --- a/externals/mysql/mysys/my_mkdir.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#include -#ifdef __WIN__ -#include -#endif - -int my_mkdir(const char *dir, int Flags, myf MyFlags) -{ - DBUG_ENTER("my_dir"); - DBUG_PRINT("enter",("dir: %s",dir)); - -#if defined(__WIN__) - if (mkdir((char*) dir)) -#else - if (mkdir((char*) dir, Flags & my_umask_dir)) -#endif - { - my_errno=errno; - DBUG_PRINT("error",("error %d when creating direcory %s",my_errno,dir)); - if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) - my_error(EE_CANT_MKDIR, MYF(ME_BELL+ME_WAITTANG), dir, my_errno); - DBUG_RETURN(-1); - } - DBUG_RETURN(0); -} diff --git a/externals/mysql/mysys/my_mmap.c b/externals/mysql/mysys/my_mmap.c deleted file mode 100644 index 303d8efaf3..0000000000 --- a/externals/mysql/mysys/my_mmap.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" - -#ifdef HAVE_SYS_MMAN_H - -/* - system msync() only syncs mmap'ed area to fs cache. - fsync() is required to really sync to disc -*/ -int my_msync(int fd, void *addr, size_t len, int flags) -{ - msync(addr, len, flags); - return my_sync(fd, MYF(0)); -} - -#elif defined(_WIN32) - -static SECURITY_ATTRIBUTES mmap_security_attributes= - {sizeof(SECURITY_ATTRIBUTES), 0, TRUE}; - -void *my_mmap(void *addr, size_t len, int prot, - int flags, File fd, my_off_t offset) -{ - HANDLE hFileMap; - LPVOID ptr; - HANDLE hFile= (HANDLE)my_get_osfhandle(fd); - if (hFile == INVALID_HANDLE_VALUE) - return MAP_FAILED; - - hFileMap=CreateFileMapping(hFile, &mmap_security_attributes, - PAGE_READWRITE, 0, (DWORD) len, NULL); - if (hFileMap == 0) - return MAP_FAILED; - - ptr=MapViewOfFile(hFileMap, - prot & PROT_WRITE ? FILE_MAP_WRITE : FILE_MAP_READ, - (DWORD)(offset >> 32), (DWORD)offset, len); - - /* - MSDN explicitly states that it's possible to close File Mapping Object - even when a view is not unmapped - then the object will be held open - implicitly until unmap, as every view stores internally a handler of - a corresponding File Mapping Object - */ - CloseHandle(hFileMap); - - if (ptr) - return ptr; - - return MAP_FAILED; -} - -int my_munmap(void *addr, size_t len) -{ - return UnmapViewOfFile(addr) ? 0 : -1; -} - -int my_msync(int fd, void *addr, size_t len, int flags) -{ - return FlushViewOfFile(addr, len) ? 0 : -1; -} - -#else -#warning "no mmap!" -#endif - diff --git a/externals/mysql/mysys/my_net.c b/externals/mysql/mysys/my_net.c deleted file mode 100644 index 81d977210f..0000000000 --- a/externals/mysql/mysys/my_net.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* thread safe version of some common functions */ - -#include "mysys_priv.h" -#include - -/* for thread safe my_inet_ntoa */ -#if !defined(__WIN__) -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#endif /* !defined(__WIN__) */ - -void my_inet_ntoa(struct in_addr in, char *buf) -{ - char *ptr; - pthread_mutex_lock(&THR_LOCK_net); - ptr=inet_ntoa(in); - strmov(buf,ptr); - pthread_mutex_unlock(&THR_LOCK_net); -} diff --git a/externals/mysql/mysys/my_netware.c b/externals/mysql/mysys/my_netware.c deleted file mode 100644 index 5b5c39c0ac..0000000000 --- a/externals/mysql/mysys/my_netware.c +++ /dev/null @@ -1,150 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Functions specific to netware -*/ - -#include -#ifdef __NETWARE__ - #include - #include - -/* - PMUserLicenseRequest is an API exported by the polimgr.nlm - (loaded by the NetWare OS when it comes up) for use by other - NLM-based NetWare products/services. - PMUserLicenseRequest provides a couple of functions: - 1) it will optionally request a User license or ensure that - one already exists for the specified User in userInfo - 2) it utilizes the NetWare usage metering service to - record usage information about your product/service. -*/ - -long PMMeteredUsageRequest -( - /* - NDS distinguished name or IP address or ??. asciiz string, e.g. - ".CN=Admin.O=this.T=MYTREE." - */ - char *userInfo, - long infoType, /* see defined values */ - /* - string used to identify the calling service, used to index the - metered info e.g. "iPrint" - */ - char *serviceID, - char tranAddrType, /* type of address that follows */ - char *tranAddr, /* ptr to a 10-byte array */ - long flags, /* see defined values */ - /* NLS error code, if any. NULL input is okay */ - long *licRequestErrCode, - /* meter service error code, if any. NULL input is okay */ - long *storeMeterInfoErrCode, - /* - error code from NLSMeter if - storeMeterInfoErrCode == PM_LICREQ_NLSMETERERROR. - NULL input is okay - */ - long *NLSMeterErrCode -); - -typedef long(*PMUR)(const char*, long, const char*, char, - const char*, long, long*, long*, long*); - -/* infoType */ -/* indicates that the info in the userInfo param is an NDS user */ -#define PM_USERINFO_TYPE_NDS 1 -/* indicates that the info in the userInfo param is NOT an NDS user */ -#define PM_USERINFO_TYPE_ADDRESS 2 - -/* Flags */ - -/* - Tells the service that it should not check to see if the NDS user - contained in the userInfo param has a NetWare User License - just - record metering information; this is ignored if infoType != - PM_USERINFO_TYPE_NDS -*/ - -#define PM_FLAGS_METER_ONLY 0x0000001 - -/* - Indicates that the values in the userInfo and serviceID parameters - are unicode strings, so that the metering service bypasses - converting these to unicode (again) -*/ -#define PM_LICREQ_ALREADY_UNICODE 0x0000002 -/* - Useful only if infoType is PM_USERINFO_TYPE_NDS - indicates a "no - stop" policy of the calling service -*/ -#define PM_LICREQ_ALWAYS_METER 0x0000004 - - -/* - net Address Types - system-defined types of net addresses that can - be used in the tranAddrType field -*/ - -#define NLS_TRAN_TYPE_IPX 0x00000001 /* An IPX address */ -#define NLS_TRAN_TYPE_IP 0x00000008 /* An IP address */ -#define NLS_ADDR_TYPE_MAC 0x000000F1 /* a MAC address */ - -/* - Net Address Sizes - lengths that correspond to the tranAddrType - field (just fyi) -*/ -#define NLS_IPX_ADDR_SIZE 10 /* the size of an IPX address */ -#define NLS_IP_ADDR_SIZE 4 /* the size of an IP address */ -#define NLS_MAC_ADDR_SIZE 6 /* the size of a MAC address */ - - -void netware_reg_user(const char *ip, const char *user, - const char *application) -{ - PMUR usage_request; - long licRequestErrCode = 0; - long storeMeterInfoErrCode = 0; - long nlsMeterErrCode = 0; - - /* import the symbol */ - usage_request= ((PMUR)ImportPublicObject(getnlmhandle(), - "PMMeteredUsageRequest")); - if (usage_request != NULL) - { - unsigned long iaddr; - char addr[NLS_IPX_ADDR_SIZE]; - - /* create address */ - iaddr = htonl(inet_addr(ip)); - bzero(addr, NLS_IPX_ADDR_SIZE); - memcpy(addr, &iaddr, NLS_IP_ADDR_SIZE); - - /* call to NLS */ - usage_request(user, - PM_USERINFO_TYPE_ADDRESS, - application, - NLS_TRAN_TYPE_IP, - addr, - PM_FLAGS_METER_ONLY, - &licRequestErrCode, - &storeMeterInfoErrCode, - &nlsMeterErrCode); - /* release symbol */ - UnImportPublicObject(getnlmhandle(), "PMMeteredUsageRequest"); - } -} -#endif /* __NETWARE__ */ diff --git a/externals/mysql/mysys/my_new.cc b/externals/mysql/mysys/my_new.cc deleted file mode 100644 index 7da54ffac8..0000000000 --- a/externals/mysql/mysys/my_new.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - This is a replacement of new/delete operators to be used when compiling - with gcc 3.0.x to avoid including libstdc++ -*/ - -#include "mysys_priv.h" - -#ifdef USE_MYSYS_NEW - -void *operator new (size_t sz) -{ - return (void *) malloc (sz ? sz : 1); -} - -void *operator new[] (size_t sz) -{ - return (void *) malloc (sz ? sz : 1); -} - -void operator delete (void *ptr) -{ - if (ptr) - free(ptr); -} - -void operator delete[] (void *ptr) throw () -{ - if (ptr) - free(ptr); -} - -C_MODE_START - -int __cxa_pure_virtual() -{ - assert(! "Aborted: pure virtual method called."); - return 0; -} - -C_MODE_END - -#endif /* USE_MYSYS_NEW */ - diff --git a/externals/mysql/mysys/my_once.c b/externals/mysql/mysys/my_once.c deleted file mode 100644 index b6f6656fce..0000000000 --- a/externals/mysql/mysys/my_once.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Not MT-SAFE */ - -#ifdef SAFEMALLOC /* We don't need SAFEMALLOC here */ -#undef SAFEMALLOC -#endif - -#include "mysys_priv.h" -#include "my_static.h" -#include "mysys_err.h" -#include - -/* - Alloc for things we don't nead to free - - SYNOPSIS - my_once_alloc() - Size - MyFlags - - NOTES - No DBUG_ENTER... here to get smaller dbug-startup -*/ - -void* my_once_alloc(size_t Size, myf MyFlags) -{ - size_t get_size, max_left; - uchar* point; - reg1 USED_MEM *next; - reg2 USED_MEM **prev; - - Size= ALIGN_SIZE(Size); - prev= &my_once_root_block; - max_left=0; - for (next=my_once_root_block ; next && next->left < Size ; next= next->next) - { - if (next->left > max_left) - max_left=next->left; - prev= &next->next; - } - if (! next) - { /* Time to alloc new block */ - get_size= Size+ALIGN_SIZE(sizeof(USED_MEM)); - if (max_left*4 < my_once_extra && get_size < my_once_extra) - get_size=my_once_extra; /* Normal alloc */ - - if ((next = (USED_MEM*) malloc(get_size)) == 0) - { - my_errno=errno; - if (MyFlags & (MY_FAE+MY_WME)) - my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG),get_size); - return((uchar*) 0); - } - DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size)); - next->next= 0; - next->size= get_size; - next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); - *prev=next; - } - point= (uchar*) ((char*) next+ (next->size-next->left)); - next->left-= Size; - - if (MyFlags & MY_ZEROFILL) - bzero(point, Size); - return((void*) point); -} /* my_once_alloc */ - - -char *my_once_strdup(const char *src,myf myflags) -{ - size_t len= strlen(src)+1; - uchar *dst= my_once_alloc(len, myflags); - if (dst) - memcpy(dst, src, len); - return (char*) dst; -} - - -void *my_once_memdup(const void *src, size_t len, myf myflags) -{ - uchar *dst= my_once_alloc(len, myflags); - if (dst) - memcpy(dst, src, len); - return dst; -} - - -/* - Deallocate everything used by my_once_alloc - - SYNOPSIS - my_once_free() -*/ - -void my_once_free(void) -{ - reg1 USED_MEM *next,*old; - DBUG_ENTER("my_once_free"); - - for (next=my_once_root_block ; next ; ) - { - old=next; next= next->next ; - free((uchar*) old); - } - my_once_root_block=0; - - DBUG_VOID_RETURN; -} /* my_once_free */ diff --git a/externals/mysql/mysys/my_open.c b/externals/mysql/mysys/my_open.c deleted file mode 100644 index ebdf9e38ab..0000000000 --- a/externals/mysql/mysys/my_open.c +++ /dev/null @@ -1,191 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#include - - -/* - Open a file - - SYNOPSIS - my_open() - FileName Fully qualified file name - Flags Read | write - MyFlags Special flags - - RETURN VALUE - File descriptor -*/ - -File my_open(const char *FileName, int Flags, myf MyFlags) - /* Path-name of file */ - /* Read | write .. */ - /* Special flags */ -{ - File fd; - DBUG_ENTER("my_open"); - DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d", - FileName, Flags, MyFlags)); -#if defined(_WIN32) - fd= my_win_open(FileName, Flags); -#elif !defined(NO_OPEN_3) - fd = open(FileName, Flags, my_umask); /* Normal unix */ -#else - fd = open((char *) FileName, Flags); -#endif - - DBUG_RETURN(my_register_filename(fd, FileName, FILE_BY_OPEN, - EE_FILENOTFOUND, MyFlags)); -} /* my_open */ - - -/* - Close a file - - SYNOPSIS - my_close() - fd File sescriptor - myf Special Flags - -*/ - -int my_close(File fd, myf MyFlags) -{ - int err; - DBUG_ENTER("my_close"); - DBUG_PRINT("my",("fd: %d MyFlags: %d",fd, MyFlags)); - - pthread_mutex_lock(&THR_LOCK_open); -#ifndef _WIN32 - do - { - err= close(fd); - } while (err == -1 && errno == EINTR); -#else - err= my_win_close(fd); -#endif - if (err) - { - DBUG_PRINT("error",("Got error %d on close",err)); - my_errno=errno; - if (MyFlags & (MY_FAE | MY_WME)) - my_error(EE_BADCLOSE, MYF(ME_BELL+ME_WAITTANG),my_filename(fd),errno); - } - if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN) - { - my_free(my_file_info[fd].name, MYF(0)); -#if defined(THREAD) && !defined(HAVE_PREAD) && !defined (_WIN32) - pthread_mutex_destroy(&my_file_info[fd].mutex); -#endif - my_file_info[fd].type = UNOPEN; - } - my_file_opened--; - pthread_mutex_unlock(&THR_LOCK_open); - DBUG_RETURN(err); -} /* my_close */ - - -/* - Register file in my_file_info[] - - SYNOPSIS - my_register_filename() - fd File number opened, -1 if error on open - FileName File name - type_file_type How file was created - error_message_number Error message number if caller got error (fd == -1) - MyFlags Flags for my_close() - - RETURN - -1 error - # Filenumber - -*/ - -File my_register_filename(File fd, const char *FileName, enum file_type - type_of_file, uint error_message_number, myf MyFlags) -{ - DBUG_ENTER("my_register_filename"); - if ((int) fd >= MY_FILE_MIN) - { - if ((uint) fd >= my_file_limit) - { -#if defined(THREAD) && !defined(HAVE_PREAD) - my_errno= EMFILE; -#else - thread_safe_increment(my_file_opened,&THR_LOCK_open); - DBUG_RETURN(fd); /* safeguard */ -#endif - } - else - { - pthread_mutex_lock(&THR_LOCK_open); - if ((my_file_info[fd].name = (char*) my_strdup(FileName,MyFlags))) - { - my_file_opened++; - my_file_total_opened++; - my_file_info[fd].type = type_of_file; -#if defined(THREAD) && !defined(HAVE_PREAD) && !defined(_WIN32) - pthread_mutex_init(&my_file_info[fd].mutex,MY_MUTEX_INIT_FAST); -#endif - pthread_mutex_unlock(&THR_LOCK_open); - DBUG_PRINT("exit",("fd: %d",fd)); - DBUG_RETURN(fd); - } - pthread_mutex_unlock(&THR_LOCK_open); - my_errno= ENOMEM; - } - (void) my_close(fd, MyFlags); - } - else - my_errno= errno; - - DBUG_PRINT("error",("Got error %d on open", my_errno)); - if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) - { - if (my_errno == EMFILE) - error_message_number= EE_OUT_OF_FILERESOURCES; - DBUG_PRINT("error",("print err: %d",error_message_number)); - my_error(error_message_number, MYF(ME_BELL+ME_WAITTANG), - FileName, my_errno); - } - DBUG_RETURN(-1); -} - - - - -#ifdef EXTRA_DEBUG - -void my_print_open_files(void) -{ - if (my_file_opened | my_stream_opened) - { - uint i; - for (i= 0 ; i < my_file_limit ; i++) - { - if (my_file_info[i].type != UNOPEN) - { - fprintf(stderr, EE(EE_FILE_NOT_CLOSED), my_file_info[i].name, i); - fputc('\n', stderr); - } - } - } -} - -#endif diff --git a/externals/mysql/mysys/my_port.c b/externals/mysql/mysys/my_port.c deleted file mode 100644 index 9ad333421c..0000000000 --- a/externals/mysql/mysys/my_port.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* - Small functions to make code portable -*/ - -#include "mysys_priv.h" - -#ifdef _AIX - -/* - On AIX, at least with gcc 3.1, the expression - '(double) (ulonglong) var' doesn't always work for big unsigned - integers like '18446744073709551615'. The end result is that the - high bit is simply dropped. (probably bug in gcc optimizations) - Handling the conversion in a sub function seems to work. -*/ - - - -double my_ulonglong2double(unsigned long long nr) -{ - return (double) nr; -} -#endif /* _AIX */ diff --git a/externals/mysql/mysys/my_pread.c b/externals/mysql/mysys/my_pread.c deleted file mode 100644 index eaabcb1b72..0000000000 --- a/externals/mysql/mysys/my_pread.c +++ /dev/null @@ -1,206 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include "my_base.h" -#include -#include -#if defined (HAVE_PREAD) && !defined(_WIN32) -#include -#endif - - - -/* - Read a chunk of bytes from a file from a given position - - SYNOPSIOS - my_pread() - Filedes File decsriptor - Buffer Buffer to read data into - Count Number of bytes to read - offset Position to read from - MyFlags Flags - - NOTES - This differs from the normal pread() call in that we don't care - to set the position in the file back to the original position - if the system doesn't support pread(). - - RETURN - (size_t) -1 Error - # Number of bytes read -*/ - -size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset, - myf MyFlags) -{ - size_t readbytes; - int error= 0; -#if !defined (HAVE_PREAD) && !defined (_WIN32) - int save_errno; -#endif - DBUG_ENTER("my_pread"); - DBUG_PRINT("my",("fd: %d Seek: %llu Buffer: %p Count: %lu MyFlags: %d", - Filedes, (ulonglong)offset, Buffer, (ulong)Count, MyFlags)); - for (;;) - { - errno= 0; /* Linux, Windows don't reset this on EOF/success */ -#if !defined (HAVE_PREAD) && !defined (_WIN32) - pthread_mutex_lock(&my_file_info[Filedes].mutex); - readbytes= (uint) -1; - error= (lseek(Filedes, offset, MY_SEEK_SET) == (my_off_t) -1 || - (readbytes= read(Filedes, Buffer, Count)) != Count); - save_errno= errno; - pthread_mutex_unlock(&my_file_info[Filedes].mutex); - if (error) - errno= save_errno; -#else -#if defined(_WIN32) - readbytes= my_win_pread(Filedes, Buffer, Count, offset); -#else - readbytes= pread(Filedes, Buffer, Count, offset); -#endif - error= (readbytes != Count); -#endif - if(error) - { - my_errno= errno ? errno : -1; - if (errno == 0 || (readbytes != (size_t) -1 && - (MyFlags & (MY_NABP | MY_FNABP)))) - my_errno= HA_ERR_FILE_TOO_SHORT; - - DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d", - (int) readbytes, (uint) Count,Filedes,my_errno)); -#ifdef THREAD - if ((readbytes == 0 || readbytes == (size_t) -1) && errno == EINTR) - { - DBUG_PRINT("debug", ("my_pread() was interrupted and returned %d", - (int) readbytes)); - continue; /* Interrupted */ - } -#endif - if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) - { - if (readbytes == (size_t) -1) - my_error(EE_READ, MYF(ME_BELL+ME_WAITTANG), - my_filename(Filedes),my_errno); - else if (MyFlags & (MY_NABP | MY_FNABP)) - my_error(EE_EOFERR, MYF(ME_BELL+ME_WAITTANG), - my_filename(Filedes),my_errno); - } - if (readbytes == (size_t) -1 || (MyFlags & (MY_FNABP | MY_NABP))) - DBUG_RETURN(MY_FILE_ERROR); /* Return with error */ - } - if (MyFlags & (MY_NABP | MY_FNABP)) - DBUG_RETURN(0); /* Read went ok; Return 0 */ - DBUG_RETURN(readbytes); /* purecov: inspected */ - } -} /* my_pread */ - - -/* - Write a chunk of bytes to a file at a given position - - SYNOPSIOS - my_pwrite() - Filedes File decsriptor - Buffer Buffer to write data from - Count Number of bytes to write - offset Position to write to - MyFlags Flags - - NOTES - This differs from the normal pwrite() call in that we don't care - to set the position in the file back to the original position - if the system doesn't support pwrite() - - RETURN - (size_t) -1 Error - # Number of bytes read -*/ - -size_t my_pwrite(File Filedes, const uchar *Buffer, size_t Count, - my_off_t offset, myf MyFlags) -{ - size_t writtenbytes, written; - uint errors; - - DBUG_ENTER("my_pwrite"); - DBUG_PRINT("my",("fd: %d Seek: %llu Buffer: %p Count: %lu MyFlags: %d", - Filedes, offset, Buffer, (ulong)Count, MyFlags)); - errors= 0; - written= 0; - - for (;;) - { -#if !defined (HAVE_PREAD) && !defined (_WIN32) - int error; - writtenbytes= (size_t) -1; - pthread_mutex_lock(&my_file_info[Filedes].mutex); - error= (lseek(Filedes, offset, MY_SEEK_SET) != (my_off_t) -1 && - (writtenbytes= write(Filedes, Buffer, Count)) == Count); - pthread_mutex_unlock(&my_file_info[Filedes].mutex); - if (error) - break; -#elif defined (_WIN32) - writtenbytes= my_win_pwrite(Filedes, Buffer, Count, offset); -#else - writtenbytes= pwrite(Filedes, Buffer, Count, offset); -#endif - if(writtenbytes == Count) - break; - my_errno= errno; - if (writtenbytes != (size_t) -1) - { - written+= writtenbytes; - Buffer+= writtenbytes; - Count-= writtenbytes; - offset+= writtenbytes; - } - DBUG_PRINT("error",("Write only %u bytes", (uint) writtenbytes)); -#ifndef NO_BACKGROUND -#ifdef THREAD - if (my_thread_var->abort) - MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */ -#endif - if ((my_errno == ENOSPC || my_errno == EDQUOT) && - (MyFlags & MY_WAIT_IF_FULL)) - { - wait_for_free_space(my_filename(Filedes), errors); - errors++; - continue; - } - if ((writtenbytes && writtenbytes != (size_t) -1) || my_errno == EINTR) - continue; /* Retry */ -#endif - if (MyFlags & (MY_NABP | MY_FNABP)) - { - if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) - { - my_error(EE_WRITE, MYF(ME_BELL | ME_WAITTANG), - my_filename(Filedes),my_errno); - } - DBUG_RETURN(MY_FILE_ERROR); /* Error on read */ - } - else - break; /* Return bytes written */ - } - DBUG_EXECUTE_IF("check", my_seek(Filedes, -1, SEEK_SET, MYF(0));); - if (MyFlags & (MY_NABP | MY_FNABP)) - DBUG_RETURN(0); /* Want only errors */ - DBUG_RETURN(writtenbytes+written); /* purecov: inspected */ -} /* my_pwrite */ diff --git a/externals/mysql/mysys/my_pthread.c b/externals/mysql/mysys/my_pthread.c deleted file mode 100644 index 848397f38a..0000000000 --- a/externals/mysql/mysys/my_pthread.c +++ /dev/null @@ -1,501 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Functions to get threads more portable */ - -#define DONT_REMAP_PTHREAD_FUNCTIONS - -#include "mysys_priv.h" -#ifdef THREAD -#include -#include -#include - -#if (defined(__BSD__) || defined(_BSDI_VERSION)) -#define SCHED_POLICY SCHED_RR -#else -#define SCHED_POLICY SCHED_OTHER -#endif - -uint thd_lib_detected= 0; - -/* To allow use of pthread_getspecific with two arguments */ - -#ifdef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC -#undef pthread_getspecific - -void *my_pthread_getspecific_imp(pthread_key_t key) -{ - void *value; - if (pthread_getspecific(key,(void *) &value)) - return 0; - return value; -} -#endif - -#ifdef __NETWARE__ -/* - Don't kill the LibC Reaper thread or the main thread -*/ -#include -#undef pthread_exit -void my_pthread_exit(void *status) -{ - NXThreadId_t tid; - NXContext_t ctx; - char name[NX_MAX_OBJECT_NAME_LEN+1] = ""; - - tid= NXThreadGetId(); - if (tid == NX_INVALID_THREAD_ID || !tid) - return; - if (NXThreadGetContext(tid, &ctx) || - NXContextGetName(ctx, name, sizeof(name)-1)) - return; - - /* - "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread" - with a debug build of LibC the reaper can have different names - */ - if (!strindex(name, "\'s")) - pthread_exit(status); -} -#endif - -/* - Some functions for RTS threads, AIX, Siemens Unix and UnixWare 7 - (and DEC OSF/1 3.2 too) -*/ - -int my_pthread_create_detached=1; - -#if defined(HAVE_NONPOSIX_SIGWAIT) || defined(HAVE_DEC_3_2_THREADS) - -int my_sigwait(const sigset_t *set,int *sig) -{ - int signal=sigwait((sigset_t*) set); - if (signal < 0) - return errno; - *sig=signal; - return 0; -} -#endif - -/* localtime_r for SCO 3.2V4.2 */ - -#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) - -extern pthread_mutex_t LOCK_localtime_r; - -#endif - -#if !defined(HAVE_LOCALTIME_R) -struct tm *localtime_r(const time_t *clock, struct tm *res) -{ - struct tm *tmp; - pthread_mutex_lock(&LOCK_localtime_r); - tmp=localtime(clock); - *res= *tmp; - pthread_mutex_unlock(&LOCK_localtime_r); - return res; -} -#endif - -#if !defined(HAVE_GMTIME_R) -/* - Reentrant version of standard gmtime() function. - Needed on some systems which don't implement it. -*/ - -struct tm *gmtime_r(const time_t *clock, struct tm *res) -{ - struct tm *tmp; - pthread_mutex_lock(&LOCK_localtime_r); - tmp= gmtime(clock); - *res= *tmp; - pthread_mutex_unlock(&LOCK_localtime_r); - return res; -} -#endif - -/**************************************************************************** -** Replacement of sigwait if the system doesn't have one (like BSDI 3.0) -** -** Note: -** This version of sigwait() is assumed to called in a loop so the signalmask -** is permanently modified to reflect the signal set. This is done to get -** a much faster implementation. -** -** This implementation isn't thread safe: It assumes that only one -** thread is using sigwait. -** -** If one later supplies a different signal mask, all old signals that -** was used before are unblocked and set to SIGDFL. -** -** Author: Gary Wisniewski , much modified by Monty -****************************************************************************/ - -#if !defined(HAVE_SIGWAIT) && !defined(sigwait) && !defined(__WIN__) && !defined(HAVE_rts_threads) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) - -#if !defined(DONT_USE_SIGSUSPEND) - -static sigset_t sigwait_set,rev_sigwait_set,px_recd; - -void px_handle_sig(int sig) -{ - sigaddset(&px_recd, sig); -} - - -void sigwait_setup(sigset_t *set) -{ - int i; - struct sigaction sact,sact1; - sigset_t unblock_mask; - - sact.sa_flags = 0; - sact.sa_handler = px_handle_sig; - memcpy_fixed(&sact.sa_mask,set,sizeof(*set)); /* handler isn't thread_safe */ - sigemptyset(&unblock_mask); - pthread_sigmask(SIG_UNBLOCK,(sigset_t*) 0,&rev_sigwait_set); - - for (i = 1; i <= sizeof(sigwait_set)*8; i++) - { - if (sigismember(set,i)) - { - sigdelset(&rev_sigwait_set,i); - if (!sigismember(&sigwait_set,i)) - sigaction(i, &sact, (struct sigaction*) 0); - } - else - { - sigdelset(&px_recd,i); /* Don't handle this */ - if (sigismember(&sigwait_set,i)) - { /* Remove the old handler */ - sigaddset(&unblock_mask,i); - sigdelset(&rev_sigwait_set,i); - sact1.sa_flags = 0; - sact1.sa_handler = SIG_DFL; - sigemptyset(&sact1.sa_mask); - sigaction(i, &sact1, 0); - } - } - } - memcpy_fixed(&sigwait_set,set,sizeof(*set)); - pthread_sigmask(SIG_BLOCK,(sigset_t*) set,(sigset_t*) 0); - pthread_sigmask(SIG_UNBLOCK,&unblock_mask,(sigset_t*) 0); -} - - -int sigwait(sigset_t *setp, int *sigp) -{ - if (memcmp(setp,&sigwait_set,sizeof(sigwait_set))) - sigwait_setup(setp); /* Init or change of set */ - - for (;;) - { - /* - This is a fast, not 100% portable implementation to find the signal. - Because the handler is blocked there should be at most 1 bit set, but - the specification on this is somewhat shady so we use a set instead a - single variable. - */ - - ulong *ptr= (ulong*) &px_recd; - ulong *end=ptr+sizeof(px_recd)/sizeof(ulong); - - for ( ; ptr != end ; ptr++) - { - if (*ptr) - { - ulong set= *ptr; - int found= (int) ((char*) ptr - (char*) &px_recd)*8+1; - while (!(set & 1)) - { - found++; - set>>=1; - } - *sigp=found; - sigdelset(&px_recd,found); - return 0; - } - } - sigsuspend(&rev_sigwait_set); - } - return 0; -} -#else /* !DONT_USE_SIGSUSPEND */ - -/**************************************************************************** -** Replacement of sigwait if the system doesn't have one (like BSDI 3.0) -** -** Note: -** This version of sigwait() is assumed to called in a loop so the signalmask -** is permanently modified to reflect the signal set. This is done to get -** a much faster implementation. -** -** This implementation uses a extra thread to handle the signals and one -** must always call sigwait() with the same signal mask! -** -** BSDI 3.0 NOTE: -** -** pthread_kill() doesn't work on a thread in a select() or sleep() loop? -** After adding the sleep to sigwait_thread, all signals are checked and -** delivered every second. This isn't that terrible performance vice, but -** someone should report this to BSDI and ask for a fix! -** Another problem is that when the sleep() ends, every select() in other -** threads are interrupted! -****************************************************************************/ - -static sigset_t pending_set; -static my_bool inited=0; -static pthread_cond_t COND_sigwait; -static pthread_mutex_t LOCK_sigwait; - - -void sigwait_handle_sig(int sig) -{ - pthread_mutex_lock(&LOCK_sigwait); - sigaddset(&pending_set, sig); - pthread_cond_signal(&COND_sigwait); /* inform sigwait() about signal */ - pthread_mutex_unlock(&LOCK_sigwait); -} - -void *sigwait_thread(void *set_arg) -{ - sigset_t *set=(sigset_t*) set_arg; - - int i; - struct sigaction sact; - sact.sa_flags = 0; - sact.sa_handler = sigwait_handle_sig; - memcpy_fixed(&sact.sa_mask,set,sizeof(*set)); /* handler isn't thread_safe */ - sigemptyset(&pending_set); - - for (i = 1; i <= sizeof(pending_set)*8; i++) - { - if (sigismember(set,i)) - { - sigaction(i, &sact, (struct sigaction*) 0); - } - } - /* Ensure that init_thr_alarm() is called */ - DBUG_ASSERT(thr_client_alarm); - sigaddset(set, thr_client_alarm); - pthread_sigmask(SIG_UNBLOCK,(sigset_t*) set,(sigset_t*) 0); - alarm_thread=pthread_self(); /* For thr_alarm */ - - for (;;) - { /* Wait for signals */ -#ifdef HAVE_NOT_BROKEN_SELECT - fd_set fd; - FD_ZERO(&fd); - select(0,&fd,0,0,0); -#else - sleep(1); /* Because of broken BSDI */ -#endif - } -} - - -int sigwait(sigset_t *setp, int *sigp) -{ - if (!inited) - { - pthread_attr_t thr_attr; - pthread_t sigwait_thread_id; - inited=1; - sigemptyset(&pending_set); - pthread_mutex_init(&LOCK_sigwait,MY_MUTEX_INIT_FAST); - pthread_cond_init(&COND_sigwait,NULL); - - pthread_attr_init(&thr_attr); - pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_PROCESS); - pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED); - pthread_attr_setstacksize(&thr_attr,8196); - pthread_create(&sigwait_thread_id,&thr_attr,sigwait_thread,setp); - pthread_attr_destroy(&thr_attr); - } - - pthread_mutex_lock(&LOCK_sigwait); - for (;;) - { - ulong *ptr= (ulong*) &pending_set; - ulong *end=ptr+sizeof(pending_set)/sizeof(ulong); - - for ( ; ptr != end ; ptr++) - { - if (*ptr) - { - ulong set= *ptr; - int found= (int) ((char*) ptr - (char*) &pending_set)*8+1; - while (!(set & 1)) - { - found++; - set>>=1; - } - *sigp=found; - sigdelset(&pending_set,found); - pthread_mutex_unlock(&LOCK_sigwait); - return 0; - } - } - pthread_cond_wait(&COND_sigwait,&LOCK_sigwait); - } - return 0; -} - -#endif /* DONT_USE_SIGSUSPEND */ -#endif /* HAVE_SIGWAIT */ - - -/**************************************************************************** - The following functions fixes that all pthread functions should work - according to latest posix standard -****************************************************************************/ - -/* Undefined wrappers set my_pthread.h so that we call os functions */ -#undef pthread_mutex_init -#undef pthread_mutex_lock -#undef pthread_mutex_unlock -#undef pthread_mutex_destroy -#undef pthread_mutex_wait -#undef pthread_mutex_timedwait -#undef pthread_mutex_trylock -#undef pthread_mutex_t -#undef pthread_cond_init -#undef pthread_cond_wait -#undef pthread_cond_timedwait -#undef pthread_cond_t -#undef pthread_attr_getstacksize - -/***************************************************************************** -** Patches for AIX and DEC OSF/1 3.2 -*****************************************************************************/ - -#if defined(HAVE_NONPOSIX_PTHREAD_MUTEX_INIT) - -#include - -int my_pthread_mutex_noposix_init(pthread_mutex_t *mp, - const pthread_mutexattr_t *attr) -{ - int error; - if (!attr) - error=pthread_mutex_init(mp,pthread_mutexattr_default); - else - error=pthread_mutex_init(mp,*attr); - return error; -} - -int my_pthread_cond_noposix_init(pthread_cond_t *mp, - const pthread_condattr_t *attr) -{ - int error; - if (!attr) - error=pthread_cond_init(mp,pthread_condattr_default); - else - error=pthread_cond_init(mp,*attr); - return error; -} - -#endif - - -/***************************************************************************** - Patches for HPUX - We need these because the pthread_mutex.. code returns -1 on error, - instead of the error code. - - Note that currently we only remap pthread_ functions used by MySQL. - If we are depending on the value for some other pthread_xxx functions, - this has to be added here. -****************************************************************************/ - -#if defined(HPUX10) || defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) - -int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - struct timespec *abstime) -{ - int error=pthread_cond_timedwait(cond, mutex, abstime); - if (error == -1) /* Safety if the lib is fixed */ - { - if (!(error=errno)) - error= ETIMEDOUT; /* Can happen on HPUX */ - } - if (error == EAGAIN) /* Correct errno to Posix */ - error= ETIMEDOUT; - return error; -} -#endif - -#if defined(HPUX10) - -void my_pthread_attr_getstacksize(pthread_attr_t *connection_attrib, - size_t *stack_size) -{ - *stack_size= pthread_attr_getstacksize(*connection_attrib); -} -#endif - - -#ifdef HAVE_POSIX1003_4a_MUTEX -/* - In HP-UX-10.20 and other old Posix 1003.4a Draft 4 implementations - pthread_mutex_trylock returns 1 on success, not 0 like - pthread_mutex_lock - - From the HP-UX-10.20 man page: - RETURN VALUES - If the function fails, errno may be set to one of the following - values: - Return | Error | Description - _______|__________|_________________________________________ - 1 | | Successful completion. - 0 | | The mutex is locked; therefore, it was - | | not acquired. - -1 | [EINVAL] | The value specified by mutex is invalid. - -*/ - -/* - Convert pthread_mutex_trylock to return values according to latest POSIX - - RETURN VALUES - 0 If we are able successfully lock the mutex. - EBUSY Mutex was locked by another thread - # Other error number returned by pthread_mutex_trylock() - (Not likely) -*/ - -int my_pthread_mutex_trylock(pthread_mutex_t *mutex) -{ - int error= pthread_mutex_trylock(mutex); - if (error == 1) - return 0; /* Got lock on mutex */ - if (error == 0) /* Someon else is locking mutex */ - return EBUSY; - if (error == -1) /* Safety if the lib is fixed */ - error= errno; /* Probably invalid parameter */ - return error; -} -#endif /* HAVE_POSIX1003_4a_MUTEX */ - -/* Some help functions */ - -int pthread_dummy(int ret) -{ - return ret; -} -#endif /* THREAD */ diff --git a/externals/mysql/mysys/my_quick.c b/externals/mysql/mysys/my_quick.c deleted file mode 100644 index b93e7e1722..0000000000 --- a/externals/mysql/mysys/my_quick.c +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Quicker interface to read & write. Used with my_nosys.h */ - -#include "mysys_priv.h" -#include "my_nosys.h" - - -#ifdef _WIN32 -extern size_t my_win_read(File Filedes,uchar *Buffer,size_t Count); -#endif - -size_t my_quick_read(File Filedes,uchar *Buffer,size_t Count,myf MyFlags) -{ - size_t readbytes; -#ifdef _WIN32 - readbytes= my_win_read(Filedes, Buffer, Count); -#else - readbytes= read(Filedes, Buffer, Count); -#endif - if(readbytes != Count) - { -#ifndef DBUG_OFF - if ((readbytes == 0 || readbytes == (size_t) -1) && errno == EINTR) - { - DBUG_PRINT("error", ("my_quick_read() was interrupted and returned %d" - ". This function does not retry the read!", - (int) readbytes)); - } -#endif - my_errno=errno; - return readbytes; - } - return (MyFlags & (MY_NABP | MY_FNABP)) ? 0 : readbytes; -} - - - -size_t my_quick_write(File Filedes, const uchar *Buffer, size_t Count) -{ -#ifdef _WIN32 - return my_win_write(Filedes, Buffer, Count); -#else - -#ifndef DBUG_OFF - size_t writtenbytes; -#endif - - if (( -#ifndef DBUG_OFF - writtenbytes = -#endif - (size_t) write(Filedes,Buffer,Count)) != Count) - { -#ifndef DBUG_OFF - if ((writtenbytes == 0 || writtenbytes == (size_t) -1) && errno == EINTR) - { - DBUG_PRINT("error", ("my_quick_write() was interrupted and returned %d" - ". This function does not retry the write!", - (int) writtenbytes)); - } -#endif - my_errno=errno; - return (size_t) -1; - } - return 0; -#endif -} diff --git a/externals/mysql/mysys/my_read.c b/externals/mysql/mysys/my_read.c deleted file mode 100644 index 75f9dd64f1..0000000000 --- a/externals/mysql/mysys/my_read.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#include - -/* - Read a chunk of bytes from a file with retry's if needed - - The parameters are: - File descriptor - Buffer to hold at least Count bytes - Bytes to read - Flags on what to do on error - - Return: - -1 on error - 0 if flag has bits MY_NABP or MY_FNABP set - N number of bytes read. -*/ - -size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags) -{ - size_t readbytes, save_count; - DBUG_ENTER("my_read"); - DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %d", - Filedes, Buffer, (ulong) Count, MyFlags)); - save_count= Count; - - for (;;) - { - errno= 0; /* Linux, Windows don't reset this on EOF/success */ -#ifdef _WIN32 - readbytes= my_win_read(Filedes, Buffer, Count); -#else - readbytes= read(Filedes, Buffer, Count); -#endif - - if (readbytes != Count) - { - my_errno= errno; - if (errno == 0 || (readbytes != (size_t) -1 && - (MyFlags & (MY_NABP | MY_FNABP)))) - my_errno= HA_ERR_FILE_TOO_SHORT; - DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d", - (int) readbytes, (ulong) Count, Filedes, - my_errno)); -#ifdef THREAD - if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR) - { - DBUG_PRINT("debug", ("my_read() was interrupted and returned %ld", - (long) readbytes)); - continue; /* Interrupted */ - } -#endif - if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) - { - if (readbytes == (size_t) -1) - my_error(EE_READ, MYF(ME_BELL+ME_WAITTANG), - my_filename(Filedes),my_errno); - else if (MyFlags & (MY_NABP | MY_FNABP)) - my_error(EE_EOFERR, MYF(ME_BELL+ME_WAITTANG), - my_filename(Filedes),my_errno); - } - if (readbytes == (size_t) -1 || - ((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO))) - DBUG_RETURN(MY_FILE_ERROR); /* Return with error */ - if (readbytes != (size_t) -1 && (MyFlags & MY_FULL_IO)) - { - Buffer+= readbytes; - Count-= readbytes; - continue; - } - } - - if (MyFlags & (MY_NABP | MY_FNABP)) - readbytes= 0; /* Ok on read */ - else if (MyFlags & MY_FULL_IO) - readbytes= save_count; - break; - } - DBUG_RETURN(readbytes); -} /* my_read */ diff --git a/externals/mysql/mysys/my_realloc.c b/externals/mysql/mysys/my_realloc.c deleted file mode 100644 index d686f4cfb1..0000000000 --- a/externals/mysql/mysys/my_realloc.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifdef SAFEMALLOC /* We don't need SAFEMALLOC here */ -#undef SAFEMALLOC -#endif - -#include "mysys_priv.h" -#include "mysys_err.h" - - /* My memory re allocator */ - -/** - @brief wrapper around realloc() - - @param oldpoint pointer to currently allocated area - @param size new size requested, must be >0 - @param my_flags flags - - @note if size==0 realloc() may return NULL; my_realloc() treats this as an - error which is not the intention of realloc() -*/ -void* my_realloc(void* oldpoint, size_t size, myf my_flags) -{ - void *point; - DBUG_ENTER("my_realloc"); - DBUG_PRINT("my",("ptr: %p size: %lu my_flags: %d", oldpoint, - (ulong) size, my_flags)); - - DBUG_ASSERT(size > 0); - if (!oldpoint && (my_flags & MY_ALLOW_ZERO_PTR)) - DBUG_RETURN(my_malloc(size,my_flags)); -#ifdef USE_HALLOC - if (!(point = malloc(size))) - { - if (my_flags & MY_FREE_ON_ERROR) - my_free(oldpoint,my_flags); - if (my_flags & MY_HOLD_ON_ERROR) - DBUG_RETURN(oldpoint); - my_errno=errno; - if (my_flags & MY_FAE+MY_WME) - my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG),size); - } - else - { - memcpy(point,oldpoint,size); - free(oldpoint); - } -#else - if ((point= (uchar*) realloc(oldpoint,size)) == NULL) - { - if (my_flags & MY_FREE_ON_ERROR) - my_free(oldpoint, my_flags); - if (my_flags & MY_HOLD_ON_ERROR) - DBUG_RETURN(oldpoint); - my_errno=errno; - if (my_flags & (MY_FAE+MY_WME)) - my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG), size); - } -#endif - DBUG_PRINT("exit",("ptr: %p", point)); - DBUG_RETURN(point); -} /* my_realloc */ diff --git a/externals/mysql/mysys/my_redel.c b/externals/mysql/mysys/my_redel.c deleted file mode 100644 index 4e482a34f8..0000000000 --- a/externals/mysql/mysys/my_redel.c +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include -#include -#include "mysys_err.h" -#if defined(HAVE_UTIME_H) -#include -#elif defined(HAVE_SYS_UTIME_H) -#include -#elif !defined(HPUX10) -struct utimbuf { - time_t actime; - time_t modtime; -}; -#endif - - /* - Rename with copy stat form old file - Copy stats from old file to new file, deletes orginal and - changes new file name to old file name - - if MY_REDEL_MAKE_COPY is given, then the orginal file - is renamed to org_name-'current_time'.BAK - */ - -#define REDEL_EXT ".BAK" - -int my_redel(const char *org_name, const char *tmp_name, myf MyFlags) -{ - int error=1; - DBUG_ENTER("my_redel"); - DBUG_PRINT("my",("org_name: '%s' tmp_name: '%s' MyFlags: %d", - org_name,tmp_name,MyFlags)); - - if (my_copystat(org_name,tmp_name,MyFlags) < 0) - goto end; - if (MyFlags & MY_REDEL_MAKE_BACKUP) - { - char name_buff[FN_REFLEN+20]; - char ext[20]; - ext[0]='-'; - get_date(ext+1,2+4,(time_t) 0); - strmov(strend(ext),REDEL_EXT); - if (my_rename(org_name, fn_format(name_buff, org_name, "", ext, 2), - MyFlags)) - goto end; - } - else if (my_delete_allow_opened(org_name, MyFlags)) - goto end; - if (my_rename(tmp_name,org_name,MyFlags)) - goto end; - - error=0; -end: - DBUG_RETURN(error); -} /* my_redel */ - - - /* Copy stat from one file to another */ - /* Return -1 if can't get stat, 1 if wrong type of file */ - -int my_copystat(const char *from, const char *to, int MyFlags) -{ - struct stat statbuf; - - if (stat((char*) from, &statbuf)) - { - my_errno=errno; - if (MyFlags & (MY_FAE+MY_WME)) - my_error(EE_STAT, MYF(ME_BELL+ME_WAITTANG),from,errno); - return -1; /* Can't get stat on input file */ - } - if ((statbuf.st_mode & S_IFMT) != S_IFREG) - return 1; - (void) chmod(to, statbuf.st_mode & 07777); /* Copy modes */ - -#if !defined(__WIN__) && !defined(__NETWARE__) - if (statbuf.st_nlink > 1 && MyFlags & MY_LINK_WARNING) - { - if (MyFlags & MY_LINK_WARNING) - my_error(EE_LINK_WARNING,MYF(ME_BELL+ME_WAITTANG),from,statbuf.st_nlink); - } - (void) chown(to, statbuf.st_uid, statbuf.st_gid); /* Copy ownership */ -#endif /* !__WIN__ && !__NETWARE__ */ - -#ifndef VMS -#ifndef __ZTC__ - if (MyFlags & MY_COPYTIME) - { - struct utimbuf timep; - timep.actime = statbuf.st_atime; - timep.modtime = statbuf.st_mtime; - (void) utime((char*) to, &timep);/* Update last accessed and modified times */ - } -#else - if (MyFlags & MY_COPYTIME) - { - time_t time[2]; - time[0]= statbuf.st_atime; - time[1]= statbuf.st_mtime; - (void) utime((char*) to, time);/* Update last accessed and modified times */ - } -#endif -#endif - return 0; -} /* my_copystat */ diff --git a/externals/mysql/mysys/my_rename.c b/externals/mysql/mysys/my_rename.c deleted file mode 100644 index 39e6056a9e..0000000000 --- a/externals/mysql/mysys/my_rename.c +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include -#include "mysys_err.h" -#include "m_string.h" -#undef my_rename - - /* On unix rename deletes to file if it exists */ - -int my_rename(const char *from, const char *to, myf MyFlags) -{ - int error = 0; - DBUG_ENTER("my_rename"); - DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags)); - -#if defined(HAVE_FILE_VERSIONS) - { /* Check that there isn't a old file */ - int save_errno; - MY_STAT my_stat_result; - save_errno=my_errno; - if (my_stat(to,&my_stat_result,MYF(0))) - { - my_errno=EEXIST; - error= -1; - if (MyFlags & MY_FAE+MY_WME) - my_error(EE_LINK, MYF(ME_BELL+ME_WAITTANG),from,to,my_errno); - DBUG_RETURN(error); - } - my_errno=save_errno; - } -#endif -#if defined(HAVE_RENAME) -#if defined(__WIN__) || defined(__NETWARE__) - /* - On windows we can't rename over an existing file: - Remove any conflicting files: - */ - (void) my_delete(to, MYF(0)); -#endif - if (rename(from,to)) -#else - if (link(from, to) || unlink(from)) -#endif - { - my_errno=errno; - error = -1; - if (MyFlags & (MY_FAE+MY_WME)) - my_error(EE_LINK, MYF(ME_BELL+ME_WAITTANG),from,to,my_errno); - } - else if (MyFlags & MY_SYNC_DIR) - { -#ifdef NEED_EXPLICIT_SYNC_DIR - /* do only the needed amount of syncs: */ - char dir_from[FN_REFLEN], dir_to[FN_REFLEN]; - size_t dir_from_length, dir_to_length; - dirname_part(dir_from, from, &dir_from_length); - dirname_part(dir_to, to, &dir_to_length); - if (my_sync_dir(dir_from, MyFlags) || - (strcmp(dir_from, dir_to) && - my_sync_dir(dir_to, MyFlags))) - error= -1; -#endif - } - DBUG_RETURN(error); -} /* my_rename */ diff --git a/externals/mysql/mysys/my_rnd.c b/externals/mysql/mysys/my_rnd.c deleted file mode 100644 index b7dca0f2af..0000000000 --- a/externals/mysql/mysys/my_rnd.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 2007 MySQL AB & Michael Widenius - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include - -/* - Initialize random generator - - NOTES - MySQL's password checks depends on this, so don't do any changes - that changes the random numbers that are generated! -*/ - -void my_rnd_init(struct my_rnd_struct *rand_st, ulong seed1, ulong seed2) -{ -#ifdef HAVE_purify - bzero((char*) rand_st,sizeof(*rand_st)); /* Avoid UMC varnings */ -#endif - rand_st->max_value= 0x3FFFFFFFL; - rand_st->max_value_dbl=(double) rand_st->max_value; - rand_st->seed1=seed1%rand_st->max_value ; - rand_st->seed2=seed2%rand_st->max_value; -} - - -/* - Generate random number. - - SYNOPSIS - my_rnd() - rand_st INOUT Structure used for number generation - - RETURN VALUE - generated pseudo random number -*/ - -double my_rnd(struct my_rnd_struct *rand_st) -{ - rand_st->seed1=(rand_st->seed1*3+rand_st->seed2) % rand_st->max_value; - rand_st->seed2=(rand_st->seed1+rand_st->seed2+33) % rand_st->max_value; - return (((double) rand_st->seed1)/rand_st->max_value_dbl); -} diff --git a/externals/mysql/mysys/my_safehash.c b/externals/mysql/mysys/my_safehash.c deleted file mode 100644 index bad7e7c702..0000000000 --- a/externals/mysql/mysys/my_safehash.c +++ /dev/null @@ -1,296 +0,0 @@ -/* Copyright (C) 2003-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Handling of multiple key caches - - The idea is to have a thread safe hash on the table name, - with a default key cache value that is returned if the table name is not in - the cache. -*/ - -#include "mysys_priv.h" -#include -#include "my_safehash.h" - -/***************************************************************************** - General functions to handle SAFE_HASH objects. - - A SAFE_HASH object is used to store the hash, the mutex and default value - needed by the rest of the key cache code. - This is a separate struct to make it easy to later reuse the code for other - purposes - - All entries are linked in a list to allow us to traverse all elements - and delete selected ones. (HASH doesn't allow any easy ways to do this). -*****************************************************************************/ - - -/* - Free a SAFE_HASH_ENTRY - - SYNOPSIS - safe_hash_entry_free() - entry The entry which should be freed - - NOTE - This function is called by the hash object on delete -*/ - -static void safe_hash_entry_free(SAFE_HASH_ENTRY *entry) -{ - DBUG_ENTER("safe_hash_entry_free"); - my_free((uchar*) entry, MYF(0)); - DBUG_VOID_RETURN; -} - - -/* - Get key and length for a SAFE_HASH_ENTRY - - SYNOPSIS - safe_hash_entry_get() - entry The entry for which the key should be returned - length Length of the key - - RETURN - # reference on the key -*/ - -static uchar *safe_hash_entry_get(SAFE_HASH_ENTRY *entry, size_t *length, - my_bool not_used __attribute__((unused))) -{ - *length= entry->length; - return (uchar*) entry->key; -} - - -/* - Init a SAFE_HASH object - - SYNOPSIS - safe_hash_init() - hash safe_hash handler - elements Expected max number of elements - default_value default value - - NOTES - In case of error we set hash->default_value to 0 to allow one to call - safe_hash_free on an object that couldn't be initialized. - - RETURN - 0 OK - 1 error -*/ - -my_bool safe_hash_init(SAFE_HASH *hash, uint elements, - uchar *default_value) -{ - DBUG_ENTER("safe_hash_init"); - if (my_hash_init(&hash->hash, &my_charset_bin, elements, - 0, 0, (my_hash_get_key) safe_hash_entry_get, - (void (*)(void*)) safe_hash_entry_free, 0)) - { - hash->default_value= 0; - DBUG_RETURN(1); - } - my_rwlock_init(&hash->mutex, 0); - hash->default_value= default_value; - hash->root= 0; - DBUG_RETURN(0); -} - - -/* - Free a SAFE_HASH object - - SYNOPSIS - safe_hash_free() - hash Hash handle - - NOTES - This is safe to call on any object that has been sent to safe_hash_init() -*/ - -void safe_hash_free(SAFE_HASH *hash) -{ - /* - Test if safe_hash_init succeeded. This will also guard us against multiple - free calls. - */ - if (hash->default_value) - { - my_hash_free(&hash->hash); - rwlock_destroy(&hash->mutex); - hash->default_value=0; - } -} - - -/* - Return the value stored for a key or default value if no key - - SYNOPSIS - safe_hash_search() - hash Hash handle - key key (path to table etc..) - length Length of key - def Default value of data - - RETURN - # data associated with the key of default value if data was not found -*/ - -uchar *safe_hash_search(SAFE_HASH *hash, const uchar *key, uint length, - uchar *def) -{ - uchar *result; - DBUG_ENTER("safe_hash_search"); - rw_rdlock(&hash->mutex); - result= my_hash_search(&hash->hash, key, length); - rw_unlock(&hash->mutex); - if (!result) - result= def; - else - result= ((SAFE_HASH_ENTRY*) result)->data; - DBUG_PRINT("exit",("data: %p", result)); - DBUG_RETURN(result); -} - - -/* - Associate a key with some data - - SYNOPSIS - safe_hash_set() - hash Hash handle - key key (path to table etc..) - length Length of key - data data to to associate with the data - - NOTES - This can be used both to insert a new entry and change an existing - entry. - If one associates a key with the default key cache, the key is deleted - - RETURN - 0 OK - 1 error (Can only be EOM). In this case my_message() is called. -*/ - -my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length, - uchar *data) -{ - SAFE_HASH_ENTRY *entry; - my_bool error= 0; - DBUG_ENTER("safe_hash_set"); - DBUG_PRINT("enter",("key: %.*s data: 0x%lx", length, key, (long) data)); - - rw_wrlock(&hash->mutex); - entry= (SAFE_HASH_ENTRY*) my_hash_search(&hash->hash, key, length); - - if (data == hash->default_value) - { - /* - The key is to be associated with the default entry. In this case - we can just delete the entry (if it existed) from the hash as a - search will return the default entry - */ - if (!entry) /* nothing to do */ - goto end; - /* unlink entry from list */ - if ((*entry->prev= entry->next)) - entry->next->prev= entry->prev; - my_hash_delete(&hash->hash, (uchar*) entry); - goto end; - } - if (entry) - { - /* Entry existed; Just change the pointer to point at the new data */ - entry->data= data; - } - else - { - if (!(entry= (SAFE_HASH_ENTRY *) my_malloc(sizeof(*entry) + length, - MYF(MY_WME)))) - { - error= 1; - goto end; - } - entry->key= (uchar*) (entry +1); - memcpy((char*) entry->key, (char*) key, length); - entry->length= length; - entry->data= data; - /* Link entry to list */ - if ((entry->next= hash->root)) - entry->next->prev= &entry->next; - entry->prev= &hash->root; - hash->root= entry; - if (my_hash_insert(&hash->hash, (uchar*) entry)) - { - /* This can only happen if hash got out of memory */ - my_free((char*) entry, MYF(0)); - error= 1; - goto end; - } - } - -end: - rw_unlock(&hash->mutex); - DBUG_RETURN(error); -} - - -/* - Change all entries with one data value to another data value - - SYNOPSIS - safe_hash_change() - hash Hash handle - old_data Old data - new_data Change all 'old_data' to this - - NOTES - We use the linked list to traverse all elements in the hash as - this allows us to delete elements in the case where 'new_data' is the - default value. -*/ - -void safe_hash_change(SAFE_HASH *hash, uchar *old_data, uchar *new_data) -{ - SAFE_HASH_ENTRY *entry, *next; - DBUG_ENTER("safe_hash_change"); - - rw_wrlock(&hash->mutex); - - for (entry= hash->root ; entry ; entry= next) - { - next= entry->next; - if (entry->data == old_data) - { - if (new_data == hash->default_value) - { - if ((*entry->prev= entry->next)) - entry->next->prev= entry->prev; - my_hash_delete(&hash->hash, (uchar*) entry); - } - else - entry->data= new_data; - } - } - - rw_unlock(&hash->mutex); - DBUG_VOID_RETURN; -} diff --git a/externals/mysql/mysys/my_safehash.h b/externals/mysql/mysys/my_safehash.h deleted file mode 100644 index 110f4ed325..0000000000 --- a/externals/mysql/mysys/my_safehash.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Handling of multiple key caches - - The idea is to have a thread safe hash on the table name, - with a default key cache value that is returned if the table name is not in - the cache. -*/ - -#include - -/* - Struct to store a key and pointer to object -*/ - -typedef struct st_safe_hash_entry -{ - uchar *key; - uint length; - uchar *data; - struct st_safe_hash_entry *next, **prev; -} SAFE_HASH_ENTRY; - - -typedef struct st_safe_hash_with_default -{ -#ifdef THREAD - rw_lock_t mutex; -#endif - HASH hash; - uchar *default_value; - SAFE_HASH_ENTRY *root; -} SAFE_HASH; - - -my_bool safe_hash_init(SAFE_HASH *hash, uint elements, - uchar *default_value); -void safe_hash_free(SAFE_HASH *hash); -uchar *safe_hash_search(SAFE_HASH *hash, const uchar *key, uint length, - uchar *def); -my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length, - uchar *data); -void safe_hash_change(SAFE_HASH *hash, uchar *old_data, uchar *new_data); diff --git a/externals/mysql/mysys/my_seek.c b/externals/mysql/mysys/my_seek.c deleted file mode 100644 index 8502c25935..0000000000 --- a/externals/mysql/mysys/my_seek.c +++ /dev/null @@ -1,95 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" - -/* - Seek to a position in a file. - - ARGUMENTS - File fd The file descriptor - my_off_t pos The expected position (absolute or relative) - int whence A direction parameter and one of - {SEEK_SET, SEEK_CUR, SEEK_END} - myf MyFlags MY_THREADSAFE must be set in case my_seek may be mixed - with my_pread/my_pwrite calls and fd is shared among - threads. - - DESCRIPTION - The my_seek function is a wrapper around the system call lseek and - repositions the offset of the file descriptor fd to the argument - offset according to the directive whence as follows: - SEEK_SET The offset is set to offset bytes. - SEEK_CUR The offset is set to its current location plus offset bytes - SEEK_END The offset is set to the size of the file plus offset bytes - - RETURN VALUE - my_off_t newpos The new position in the file. - MY_FILEPOS_ERROR An error was encountered while performing - the seek. my_errno is set to indicate the - actual error. -*/ - -my_off_t my_seek(File fd, my_off_t pos, int whence, - myf MyFlags __attribute__((unused))) -{ - os_off_t newpos= -1; - DBUG_ENTER("my_seek"); - DBUG_PRINT("my",("fd: %d Pos: %llu Whence: %d MyFlags: %d", - fd, (ulonglong) pos, whence, MyFlags)); - DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */ - - /* - Make sure we are using a valid file descriptor! - */ - DBUG_ASSERT(fd != -1); -#if defined (_WIN32) - newpos= my_win_lseek(fd, pos, whence); -#else - newpos= lseek(fd, pos, whence); -#endif - if (newpos == (os_off_t) -1) - { - my_errno= errno; - DBUG_PRINT("error",("lseek: %llu errno: %d", (ulonglong) newpos,errno)); - DBUG_RETURN(MY_FILEPOS_ERROR); - } - if ((my_off_t) newpos != pos) - { - DBUG_PRINT("exit",("pos: %llu", (ulonglong) newpos)); - } - DBUG_RETURN((my_off_t) newpos); -} /* my_seek */ - - - /* Tell current position of file */ - /* ARGSUSED */ - -my_off_t my_tell(File fd, myf MyFlags __attribute__((unused))) -{ - os_off_t pos; - DBUG_ENTER("my_tell"); - DBUG_PRINT("my",("fd: %d MyFlags: %d",fd, MyFlags)); - DBUG_ASSERT(fd >= 0); -#if defined (HAVE_TELL) && !defined (_WIN32) - pos= tell(fd); -#else - pos= my_seek(fd, 0L, MY_SEEK_CUR,0); -#endif - if (pos == (os_off_t) -1) - my_errno= errno; - DBUG_PRINT("exit",("pos: %llu", (ulonglong) pos)); - DBUG_RETURN((my_off_t) pos); -} /* my_tell */ diff --git a/externals/mysql/mysys/my_sleep.c b/externals/mysql/mysys/my_sleep.c deleted file mode 100644 index cb21c15a92..0000000000 --- a/externals/mysql/mysys/my_sleep.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Wait a given number of microseconds */ - -#include "mysys_priv.h" -#include - -void my_sleep(ulong m_seconds) -{ -#ifdef __NETWARE__ - delay(m_seconds/1000+1); -#elif defined(__WIN__) - Sleep(m_seconds/1000+1); /* Sleep() has millisecond arg */ -#elif defined(HAVE_SELECT) - struct timeval t; - t.tv_sec= m_seconds / 1000000L; - t.tv_usec= m_seconds % 1000000L; - select(0,0,0,0,&t); /* sleep */ -#else - uint sec= (uint) ((m_seconds + 999999L) / 1000000L); - ulong start= (ulong) time((time_t*) 0); - while ((ulong) time((time_t*) 0) < start+sec); -#endif -} diff --git a/externals/mysql/mysys/my_static.c b/externals/mysql/mysys/my_static.c deleted file mode 100644 index 57158772d9..0000000000 --- a/externals/mysql/mysys/my_static.c +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Static variables for mysys library. All definied here for easy making of - a shared library -*/ - -#include "mysys_priv.h" -#include "my_static.h" -#include "my_alarm.h" - -my_bool timed_mutexes= 0; - - /* from my_init */ -char * home_dir=0; -const char *my_progname= NULL, *my_progname_short= NULL; -char NEAR curr_dir[FN_REFLEN]= {0}, - NEAR home_dir_buff[FN_REFLEN]= {0}; -ulong my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0; -ulong my_file_total_opened= 0; -int NEAR my_umask=0664, NEAR my_umask_dir=0777; -#ifndef THREAD -int NEAR my_errno=0; -#endif -struct st_my_file_info my_file_info_default[MY_NFILE]; -uint my_file_limit= MY_NFILE; -struct st_my_file_info *my_file_info= my_file_info_default; - - /* From mf_brkhant */ -int NEAR my_dont_interrupt=0; -volatile int _my_signals=0; -struct st_remember _my_sig_remember[MAX_SIGNALS]={{0,0}}; -#ifdef THREAD -sigset_t my_signals; /* signals blocked by mf_brkhant */ -#endif - - /* from mf_reccache.c */ -ulong my_default_record_cache_size=RECORD_CACHE_SIZE; - - /* from soundex.c */ - /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */ - /* :::::::::::::::::::::::::: */ -const char *soundex_map= "01230120022455012623010202"; - - /* from my_malloc */ -USED_MEM* my_once_root_block=0; /* pointer to first block */ -uint my_once_extra=ONCE_ALLOC_INIT; /* Memory to alloc / block */ - - /* from my_largepage.c */ -#ifdef HAVE_LARGE_PAGES -my_bool my_use_large_pages= 0; -uint my_large_page_size= 0; -#endif - -/* ERROR INJECTION: Described in my_sys.h. */ -IF_DBUG(int my_malloc_error_inject= 0); - - /* from safe_malloc */ -uint sf_malloc_prehunc=0, /* If you have problem with core- */ - sf_malloc_endhunc=0, /* dump when malloc-message.... */ - /* set theese to 64 or 128 */ - sf_malloc_quick=0; /* set if no calls to sanity */ -size_t sf_malloc_cur_memory= 0L; /* Current memory usage */ -size_t sf_malloc_max_memory= 0L; /* Maximum memory usage */ -uint sf_malloc_count= 0; /* Number of times NEW() was called */ -uchar *sf_min_adress= (uchar*) ~(unsigned long) 0L, - *sf_max_adress= (uchar*) 0L; -/* Root of the linked list of struct st_irem */ -struct st_irem *sf_malloc_root = NULL; - - /* from my_alarm */ -int volatile my_have_got_alarm=0; /* declare variable to reset */ -ulong my_time_to_wait_for_lock=2; /* In seconds */ - - /* from errors.c */ -#ifdef SHARED_LIBRARY -char * NEAR globerrs[GLOBERRS]; /* my_error_messages is here */ -#endif -void (*my_abort_hook)(int) = (void(*)(int)) exit; -void (*error_handler_hook)(uint error,const char *str,myf MyFlags)= - my_message_no_curses; -void (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)= - my_message_no_curses; - -static const char *proc_info_dummy(void *a __attribute__((unused)), - const char *b __attribute__((unused)), - const char *c __attribute__((unused)), - const char *d __attribute__((unused)), - const unsigned int e __attribute__((unused))) -{ - return 0; -} - -/* this is to be able to call set_thd_proc_info from the C code */ -const char *(*proc_info_hook)(void *, const char *, const char *, const char *, - const unsigned int)= proc_info_dummy; - -#if defined(ENABLED_DEBUG_SYNC) -/** - Global pointer to be set if callback function is defined - (e.g. in mysqld). See sql/debug_sync.cc. -*/ -void (*debug_sync_C_callback_ptr)(const char *, size_t); -#endif /* defined(ENABLED_DEBUG_SYNC) */ - -#ifdef __WIN__ -/* from my_getsystime.c */ -ulonglong query_performance_frequency, query_performance_offset; -#endif - - /* How to disable options */ -my_bool NEAR my_disable_locking=0; -my_bool NEAR my_disable_async_io=0; -my_bool NEAR my_disable_flush_key_blocks=0; -my_bool NEAR my_disable_symlinks=0; -my_bool NEAR mysys_uses_curses=0; diff --git a/externals/mysql/mysys/my_static.h b/externals/mysql/mysys/my_static.h deleted file mode 100644 index 90168b099a..0000000000 --- a/externals/mysql/mysys/my_static.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Static variables for mysys library. All definied here for easy making of - a shared library -*/ - -C_MODE_START -#include - -#define MAX_SIGNALS 10 /* Max signals under a dont-allow */ -#define MIN_KEYBLOCK (min(IO_SIZE,1024)) -#define MAX_KEYBLOCK 8192 /* Max keyblocklength == 8*IO_SIZE */ -#define MAX_BLOCK_TYPES MAX_KEYBLOCK/MIN_KEYBLOCK - -struct st_remember { - int number; - sig_handler (*func)(int number); -}; - -/* - Structure that stores information of a allocated memory block - The data is at &struct_adr+sizeof(ALIGN_SIZE(sizeof(struct irem))) - The lspecialvalue is at the previous 4 bytes from this, which may not - necessarily be in the struct if the struct size isn't aligned at a 8 byte - boundary. -*/ - -struct st_irem -{ - struct st_irem *next; /* Linked list of structures */ - struct st_irem *prev; /* Other link */ - char *filename; /* File in which memory was new'ed */ - size_t datasize; /* Size requested */ - uint32 linenum; /* Line number in above file */ - uint32 SpecialValue; /* Underrun marker value */ -}; - - -extern char NEAR curr_dir[FN_REFLEN],NEAR home_dir_buff[FN_REFLEN]; - -extern volatile int _my_signals; -extern struct st_remember _my_sig_remember[MAX_SIGNALS]; - -extern const char *soundex_map; - -extern USED_MEM* my_once_root_block; -extern uint my_once_extra; - -extern uchar *sf_min_adress,*sf_max_adress; -extern uint sf_malloc_count; -extern struct st_irem *sf_malloc_root; - -extern struct st_my_file_info my_file_info_default[MY_NFILE]; - -extern ulonglong query_performance_frequency, query_performance_offset; - -#if defined(THREAD) && !defined(__WIN__) -extern sigset_t my_signals; /* signals blocked by mf_brkhant */ -#endif -C_MODE_END diff --git a/externals/mysql/mysys/my_symlink.c b/externals/mysql/mysys/my_symlink.c deleted file mode 100644 index 258e227bb7..0000000000 --- a/externals/mysql/mysys/my_symlink.c +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include -#include -#ifdef HAVE_REALPATH -#include -#include -#endif - -/* - Reads the content of a symbolic link - If the file is not a symbolic link, return the original file name in to. - - RETURN - 0 If filename was a symlink, (to will be set to value of symlink) - 1 If filename was a normal file (to will be set to filename) - -1 on error. -*/ - -int my_readlink(char *to, const char *filename, myf MyFlags) -{ -#ifndef HAVE_READLINK - strmov(to,filename); - return 1; -#else - int result=0; - int length; - DBUG_ENTER("my_readlink"); - - if ((length=readlink(filename, to, FN_REFLEN-1)) < 0) - { - /* Don't give an error if this wasn't a symlink */ - if ((my_errno=errno) == EINVAL) - { - result= 1; - strmov(to,filename); - } - else - { - if (MyFlags & MY_WME) - my_error(EE_CANT_READLINK, MYF(0), filename, errno); - result= -1; - } - } - else - to[length]=0; - DBUG_PRINT("exit" ,("result: %d", result)); - DBUG_RETURN(result); -#endif /* HAVE_READLINK */ -} - - -/* Create a symbolic link */ - -int my_symlink(const char *content, const char *linkname, myf MyFlags) -{ -#ifndef HAVE_READLINK - return 0; -#else - int result; - DBUG_ENTER("my_symlink"); - DBUG_PRINT("enter",("content: %s linkname: %s", content, linkname)); - - result= 0; - if (symlink(content, linkname)) - { - result= -1; - my_errno=errno; - if (MyFlags & MY_WME) - my_error(EE_CANT_SYMLINK, MYF(0), linkname, content, errno); - } - else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(linkname, MyFlags)) - result= -1; - DBUG_RETURN(result); -#endif /* HAVE_READLINK */ -} - -#if defined(SCO) -#define BUFF_LEN 4097 -#elif defined(MAXPATHLEN) -#define BUFF_LEN MAXPATHLEN -#else -#define BUFF_LEN FN_LEN -#endif - - -int my_is_symlink(const char *filename __attribute__((unused))) -{ -#if defined (HAVE_LSTAT) && defined (S_ISLNK) - struct stat stat_buff; - return !lstat(filename, &stat_buff) && S_ISLNK(stat_buff.st_mode); -#elif defined (_WIN32) - DWORD dwAttr = GetFileAttributes(filename); - return (dwAttr != INVALID_FILE_ATTRIBUTES) && - (dwAttr & FILE_ATTRIBUTE_REPARSE_POINT); -#else /* No symlinks */ - return 0; -#endif -} - - -/* - Resolve all symbolic links in path - 'to' may be equal to 'filename' -*/ - -int my_realpath(char *to, const char *filename, - myf MyFlags __attribute__((unused))) -{ -#if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH) - int result=0; - char buff[BUFF_LEN]; - char *ptr; - DBUG_ENTER("my_realpath"); - - DBUG_PRINT("info",("executing realpath")); - if ((ptr=realpath(filename,buff))) - strmake(to,ptr,FN_REFLEN-1); - else - { - /* - Realpath didn't work; Use my_load_path() which is a poor substitute - original name but will at least be able to resolve paths that starts - with '.'. - */ - DBUG_PRINT("error",("realpath failed with errno: %d", errno)); - my_errno=errno; - if (MyFlags & MY_WME) - my_error(EE_REALPATH, MYF(0), filename, my_errno); - my_load_path(to, filename, NullS); - result= -1; - } - DBUG_RETURN(result); -#else - my_load_path(to, filename, NullS); - return 0; -#endif -} diff --git a/externals/mysql/mysys/my_symlink2.c b/externals/mysql/mysys/my_symlink2.c deleted file mode 100644 index 7c3ddbb911..0000000000 --- a/externals/mysql/mysys/my_symlink2.c +++ /dev/null @@ -1,183 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Advanced symlink handling. - This is used in MyISAM to let users symlinks tables to different disk. - The main idea with these functions is to automaticly create, delete and - rename files and symlinks like they would be one unit. -*/ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include - -File my_create_with_symlink(const char *linkname, const char *filename, - int createflags, int access_flags, myf MyFlags) -{ - File file; - int tmp_errno; - /* Test if we should create a link */ - int create_link; - char abs_linkname[FN_REFLEN]; - DBUG_ENTER("my_create_with_symlink"); - DBUG_PRINT("enter", ("linkname: %s filename: %s", - linkname ? linkname : "(null)", - filename ? filename : "(null)")); - - if (my_disable_symlinks) - { - DBUG_PRINT("info", ("Symlinks disabled")); - /* Create only the file, not the link and file */ - create_link= 0; - if (linkname) - filename= linkname; - } - else - { - if (linkname) - my_realpath(abs_linkname, linkname, MYF(0)); - create_link= (linkname && strcmp(abs_linkname,filename)); - } - - if (!(MyFlags & MY_DELETE_OLD)) - { - if (!access(filename,F_OK)) - { - my_errno= errno= EEXIST; - my_error(EE_CANTCREATEFILE, MYF(0), filename, EEXIST); - DBUG_RETURN(-1); - } - if (create_link && !access(linkname,F_OK)) - { - my_errno= errno= EEXIST; - my_error(EE_CANTCREATEFILE, MYF(0), linkname, EEXIST); - DBUG_RETURN(-1); - } - } - - if ((file=my_create(filename, createflags, access_flags, MyFlags)) >= 0) - { - if (create_link) - { - /* Delete old link/file */ - if (MyFlags & MY_DELETE_OLD) - my_delete(linkname, MYF(0)); - /* Create link */ - if (my_symlink(filename, linkname, MyFlags)) - { - /* Fail, remove everything we have done */ - tmp_errno=my_errno; - my_close(file,MYF(0)); - my_delete(filename, MYF(0)); - file= -1; - my_errno=tmp_errno; - } - } - } - DBUG_RETURN(file); -} - -/* - If the file was a symlink, delete both symlink and the file which the - symlink pointed to. -*/ - -int my_delete_with_symlink(const char *name, myf MyFlags) -{ - char link_name[FN_REFLEN]; - int was_symlink= (!my_disable_symlinks && - !my_readlink(link_name, name, MYF(0))); - int result; - DBUG_ENTER("my_delete_with_symlink"); - - if (!(result=my_delete(name, MyFlags))) - { - if (was_symlink) - result=my_delete(link_name, MyFlags); - } - DBUG_RETURN(result); -} - -/* - If the file is a normal file, just rename it. - If the file is a symlink: - - Create a new file with the name 'to' that points at - symlink_dir/basename(to) - - Rename the symlinked file to symlink_dir/basename(to) - - Delete 'from' - If something goes wrong, restore everything. -*/ - -int my_rename_with_symlink(const char *from, const char *to, myf MyFlags) -{ -#ifndef HAVE_READLINK - return my_rename(from, to, MyFlags); -#else - char link_name[FN_REFLEN], tmp_name[FN_REFLEN]; - int was_symlink= (!my_disable_symlinks && - !my_readlink(link_name, from, MYF(0))); - int result=0; - int name_is_different; - DBUG_ENTER("my_rename_with_symlink"); - - if (!was_symlink) - DBUG_RETURN(my_rename(from, to, MyFlags)); - - /* Change filename that symlink pointed to */ - strmov(tmp_name, to); - fn_same(tmp_name,link_name,1); /* Copy dir */ - name_is_different= strcmp(link_name, tmp_name); - if (name_is_different && !access(tmp_name, F_OK)) - { - my_errno= EEXIST; - if (MyFlags & MY_WME) - my_error(EE_CANTCREATEFILE, MYF(0), tmp_name, EEXIST); - DBUG_RETURN(1); - } - - /* Create new symlink */ - if (my_symlink(tmp_name, to, MyFlags)) - DBUG_RETURN(1); - - /* - Rename symlinked file if the base name didn't change. - This can happen if you use this function where 'from' and 'to' has - the same basename and different directories. - */ - - if (name_is_different && my_rename(link_name, tmp_name, MyFlags)) - { - int save_errno=my_errno; - my_delete(to, MyFlags); /* Remove created symlink */ - my_errno=save_errno; - DBUG_RETURN(1); - } - - /* Remove original symlink */ - if (my_delete(from, MyFlags)) - { - int save_errno=my_errno; - /* Remove created link */ - my_delete(to, MyFlags); - /* Rename file back */ - if (strcmp(link_name, tmp_name)) - (void) my_rename(tmp_name, link_name, MyFlags); - my_errno=save_errno; - result= 1; - } - DBUG_RETURN(result); -#endif /* HAVE_READLINK */ -} diff --git a/externals/mysql/mysys/my_sync.c b/externals/mysql/mysys/my_sync.c deleted file mode 100644 index 4d5b96704a..0000000000 --- a/externals/mysql/mysys/my_sync.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include - -/* - Sync data in file to disk - - SYNOPSIS - my_sync() - fd File descritor to sync - my_flags Flags (now only MY_WME is supported) - - NOTE - If file system supports its, only file data is synced, not inode data. - - MY_IGNORE_BADFD is useful when fd is "volatile" - not protected by a - mutex. In this case by the time of fsync(), fd may be already closed by - another thread, or even reassigned to a different file. With this flag - - MY_IGNORE_BADFD - such a situation will not be considered an error. - (which is correct behaviour, if we know that the other thread synced the - file before closing) - - RETURN - 0 ok - -1 error -*/ - -int my_sync(File fd, myf my_flags) -{ - int res; - DBUG_ENTER("my_sync"); - DBUG_PRINT("my",("fd: %d my_flags: %d", fd, my_flags)); - - do - { -#if defined(F_FULLFSYNC) - /* - In Mac OS X >= 10.3 this call is safer than fsync() (it forces the - disk's cache and guarantees ordered writes). - */ - if (!(res= fcntl(fd, F_FULLFSYNC, 0))) - break; /* ok */ - /* Some file systems don't support F_FULLFSYNC and fail above: */ - DBUG_PRINT("info",("fcntl(F_FULLFSYNC) failed, falling back")); -#endif -#if defined(HAVE_FDATASYNC) - res= fdatasync(fd); -#elif defined(HAVE_FSYNC) - res= fsync(fd); -#elif defined(_WIN32) - res= my_win_fsync(fd); -#else -#error Cannot find a way to sync a file, durability in danger - res= 0; /* No sync (strange OS) */ -#endif - } while (res == -1 && errno == EINTR); - - if (res) - { - int er= errno; - if (!(my_errno= er)) - my_errno= -1; /* Unknown error */ - if ((my_flags & MY_IGNORE_BADFD) && - (er == EBADF || er == EINVAL || er == EROFS)) - { - DBUG_PRINT("info", ("ignoring errno %d", er)); - res= 0; - } - else if (my_flags & MY_WME) - my_error(EE_SYNC, MYF(ME_BELL+ME_WAITTANG), my_filename(fd), my_errno); - } - DBUG_RETURN(res); -} /* my_sync */ - - -static const char cur_dir_name[]= {FN_CURLIB, 0}; -/* - Force directory information to disk. - - SYNOPSIS - my_sync_dir() - dir_name the name of the directory - my_flags flags (MY_WME etc) - - RETURN - 0 if ok, !=0 if error -*/ -int my_sync_dir(const char *dir_name, myf my_flags) -{ -#ifdef NEED_EXPLICIT_SYNC_DIR - DBUG_ENTER("my_sync_dir"); - DBUG_PRINT("my",("Dir: '%s' my_flags: %d", dir_name, my_flags)); - File dir_fd; - int res= 0; - const char *correct_dir_name; - /* Sometimes the path does not contain an explicit directory */ - correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name; - /* - Syncing a dir may give EINVAL on tmpfs on Linux, which is ok. - EIO on the other hand is very important. Hence MY_IGNORE_BADFD. - */ - if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0) - { - if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD))) - res= 2; - if (my_close(dir_fd, MYF(my_flags))) - res= 3; - } - else - res= 1; - DBUG_RETURN(res); -#else - return 0; -#endif -} - - -/* - Force directory information to disk. - - SYNOPSIS - my_sync_dir_by_file() - file_name the name of a file in the directory - my_flags flags (MY_WME etc) - - RETURN - 0 if ok, !=0 if error -*/ -int my_sync_dir_by_file(const char *file_name, myf my_flags) -{ -#ifdef NEED_EXPLICIT_SYNC_DIR - char dir_name[FN_REFLEN]; - size_t dir_name_length; - dirname_part(dir_name, file_name, &dir_name_length); - return my_sync_dir(dir_name, my_flags); -#else - return 0; -#endif -} - diff --git a/externals/mysql/mysys/my_thr_init.c b/externals/mysql/mysys/my_thr_init.c deleted file mode 100644 index ec56e20e79..0000000000 --- a/externals/mysql/mysys/my_thr_init.c +++ /dev/null @@ -1,524 +0,0 @@ -/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/** - @file - Functions for initialization and allocation of all mysys & debug - thread variables. -*/ - -#include "mysys_priv.h" -#include -#include - -#ifdef THREAD -pthread_key(struct st_my_thread_var*, THR_KEY_mysys); -pthread_mutex_t THR_LOCK_malloc,THR_LOCK_open, - THR_LOCK_lock,THR_LOCK_isam,THR_LOCK_heap, THR_LOCK_net, - THR_LOCK_charset, THR_LOCK_threads, THR_LOCK_time; -/** For insert/delete in the list of MyISAM open tables */ -pthread_mutex_t THR_LOCK_myisam; -/** For writing to the MyISAM logs */ -pthread_mutex_t THR_LOCK_myisam_log; -pthread_cond_t THR_COND_threads; -uint THR_thread_count= 0; -uint my_thread_end_wait_time= 5; -#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) -pthread_mutex_t LOCK_localtime_r; -#endif -#ifndef HAVE_GETHOSTBYNAME_R -pthread_mutex_t LOCK_gethostbyname_r; -#endif -#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP -pthread_mutexattr_t my_fast_mutexattr; -#endif -#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP -pthread_mutexattr_t my_errorcheck_mutexattr; -#endif -#ifdef _MSC_VER -static void install_sigabrt_handler(); -#endif -#ifdef TARGET_OS_LINUX - -/* - Dummy thread spawned in my_thread_global_init() below to avoid - race conditions in NPTL pthread_exit code. -*/ - -static pthread_handler_t -nptl_pthread_exit_hack_handler(void *arg __attribute((unused))) -{ - /* Do nothing! */ - pthread_exit(0); - return 0; -} - -#endif /* TARGET_OS_LINUX */ - - - -/** - Initialize thread attributes. -*/ - -void my_threadattr_global_init(void) -{ -#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP - /* - Set mutex type to "fast" a.k.a "adaptive" - - In this case the thread may steal the mutex from some other thread - that is waiting for the same mutex. This will save us some - context switches but may cause a thread to 'starve forever' while - waiting for the mutex (not likely if the code within the mutex is - short). - */ - pthread_mutexattr_init(&my_fast_mutexattr); /* ?= MY_MUTEX_INIT_FAST */ - pthread_mutexattr_settype(&my_fast_mutexattr, - PTHREAD_MUTEX_ADAPTIVE_NP); -#endif -#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP - /* - Set mutex type to "errorcheck" - */ - pthread_mutexattr_init(&my_errorcheck_mutexattr); - pthread_mutexattr_settype(&my_errorcheck_mutexattr, - PTHREAD_MUTEX_ERRORCHECK); -#endif -} - - -static uint get_thread_lib(void); - -/* - initialize thread environment - - SYNOPSIS - my_thread_global_init() - - RETURN - 0 ok - 1 error (Couldn't create THR_KEY_mysys) -*/ - -my_bool my_thread_global_init(void) -{ - int pth_ret; - thd_lib_detected= get_thread_lib(); - - if ((pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0) - { - fprintf(stderr,"Can't initialize threads: error %d\n", pth_ret); - return 1; - } - -#ifdef TARGET_OS_LINUX - /* - BUG#24507: Race conditions inside current NPTL pthread_exit() - implementation. - - To avoid a possible segmentation fault during concurrent - executions of pthread_exit(), a dummy thread is spawned which - initializes internal variables of pthread lib. See bug description - for a full explanation. - - TODO: Remove this code when fixed versions of glibc6 are in common - use. - */ - if (thd_lib_detected == THD_LIB_NPTL) - { - pthread_t dummy_thread; - pthread_attr_t dummy_thread_attr; - - pthread_attr_init(&dummy_thread_attr); - pthread_attr_setdetachstate(&dummy_thread_attr, PTHREAD_CREATE_DETACHED); - - pthread_create(&dummy_thread,&dummy_thread_attr, - nptl_pthread_exit_hack_handler, NULL); - } -#endif /* TARGET_OS_LINUX */ - - /* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */ - my_pthread_mutex_init(&THR_LOCK_threads, MY_MUTEX_INIT_FAST, - "THR_LOCK_threads", MYF_NO_DEADLOCK_DETECTION); - my_pthread_mutex_init(&THR_LOCK_malloc, MY_MUTEX_INIT_FAST, - "THR_LOCK_malloc", MYF_NO_DEADLOCK_DETECTION); - - if (my_thread_init()) - return 1; - - - /* Mutex uses by mysys */ - pthread_mutex_init(&THR_LOCK_open,MY_MUTEX_INIT_FAST); - pthread_mutex_init(&THR_LOCK_lock,MY_MUTEX_INIT_FAST); - pthread_mutex_init(&THR_LOCK_isam,MY_MUTEX_INIT_SLOW); - pthread_mutex_init(&THR_LOCK_myisam,MY_MUTEX_INIT_SLOW); - pthread_mutex_init(&THR_LOCK_myisam_log,MY_MUTEX_INIT_SLOW); - pthread_mutex_init(&THR_LOCK_heap,MY_MUTEX_INIT_FAST); - pthread_mutex_init(&THR_LOCK_net,MY_MUTEX_INIT_FAST); - pthread_mutex_init(&THR_LOCK_charset,MY_MUTEX_INIT_FAST); - pthread_mutex_init(&THR_LOCK_time,MY_MUTEX_INIT_FAST); - pthread_cond_init(&THR_COND_threads, NULL); - -#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) - pthread_mutex_init(&LOCK_localtime_r,MY_MUTEX_INIT_SLOW); -#endif -#ifndef HAVE_GETHOSTBYNAME_R - pthread_mutex_init(&LOCK_gethostbyname_r,MY_MUTEX_INIT_SLOW); -#endif - return 0; -} - - -/** - Wait for all threads in system to die - @fn my_wait_for_other_threads_to_die() - @param number_of_threads Wait until this number of threads - - @retval 0 Less or equal to number_of_threads left - @retval 1 Wait failed -*/ - -my_bool my_wait_for_other_threads_to_die(uint number_of_threads) -{ - struct timespec abstime; - my_bool all_threads_killed= 1; - - set_timespec(abstime, my_thread_end_wait_time); - pthread_mutex_lock(&THR_LOCK_threads); - while (THR_thread_count > number_of_threads) - { - int error= pthread_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads, - &abstime); - if (error == ETIMEDOUT || error == ETIME) - { - all_threads_killed= 0; - break; - } - } - pthread_mutex_unlock(&THR_LOCK_threads); - return all_threads_killed; -} - - -/** - End the mysys thread system. Called when ending the last thread -*/ - - -void my_thread_global_end(void) -{ - my_bool all_threads_killed; - - if (!(all_threads_killed= my_wait_for_other_threads_to_die(0))) - { -#ifdef HAVE_PTHREAD_KILL - /* - We shouldn't give an error here, because if we don't have - pthread_kill(), programs like mysqld can't ensure that all threads - are killed when we enter here. - */ - if (THR_thread_count) - fprintf(stderr, - "Error in my_thread_global_end(): %d threads didn't exit\n", - THR_thread_count); -#endif - } - - pthread_key_delete(THR_KEY_mysys); -#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP - pthread_mutexattr_destroy(&my_fast_mutexattr); -#endif -#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP - pthread_mutexattr_destroy(&my_errorcheck_mutexattr); -#endif - if (all_threads_killed) - { - pthread_mutex_destroy(&THR_LOCK_threads); - pthread_cond_destroy(&THR_COND_threads); - pthread_mutex_destroy(&THR_LOCK_malloc); - } -} - -/* Free all mutex used by mysys */ - -void my_thread_destroy_mutex(void) -{ - struct st_my_thread_var *tmp; - tmp= my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); -#ifdef SAFE_MUTEX - if (tmp) - { - safe_mutex_free_deadlock_data(&tmp->mutex); - } -#endif - - pthread_mutex_destroy(&THR_LOCK_open); - pthread_mutex_destroy(&THR_LOCK_lock); - pthread_mutex_destroy(&THR_LOCK_isam); - pthread_mutex_destroy(&THR_LOCK_myisam); - pthread_mutex_destroy(&THR_LOCK_myisam_log); - pthread_mutex_destroy(&THR_LOCK_heap); - pthread_mutex_destroy(&THR_LOCK_net); - pthread_mutex_destroy(&THR_LOCK_time); - pthread_mutex_destroy(&THR_LOCK_charset); -#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) - pthread_mutex_destroy(&LOCK_localtime_r); -#endif -#ifndef HAVE_GETHOSTBYNAME_R - pthread_mutex_destroy(&LOCK_gethostbyname_r); -#endif -} - -static my_thread_id thread_id= 0; - -/* - Allocate thread specific memory for the thread, used by mysys and dbug - - SYNOPSIS - my_thread_init() - - NOTES - We can't use mutex_locks here if we are using windows as - we may have compiled the program with SAFE_MUTEX, in which - case the checking of mutex_locks will not work until - the pthread_self thread specific variable is initialized. - - This function may called multiple times for a thread, for example - if one uses my_init() followed by mysql_server_init(). - - RETURN - 0 ok - 1 Fatal error; mysys/dbug functions can't be used -*/ - -my_bool my_thread_init(void) -{ - struct st_my_thread_var *tmp; - my_bool error=0; - -#ifdef EXTRA_DEBUG_THREADS - fprintf(stderr,"my_thread_init(): thread_id: 0x%lx\n", - (ulong) pthread_self()); -#endif - - if (my_pthread_getspecific(struct st_my_thread_var *,THR_KEY_mysys)) - { -#ifdef EXTRA_DEBUG_THREADS - fprintf(stderr,"my_thread_init() called more than once in thread 0x%lx\n", - (long) pthread_self()); -#endif - goto end; - } - -#ifdef _MSC_VER - install_sigabrt_handler(); -#endif - - if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp)))) - { - error= 1; - goto end; - } - pthread_setspecific(THR_KEY_mysys,tmp); - tmp->pthread_self= pthread_self(); - my_pthread_mutex_init(&tmp->mutex, MY_MUTEX_INIT_FAST, "mysys_var->mutex", - 0); - pthread_cond_init(&tmp->suspend, NULL); - - tmp->stack_ends_here= (char*)&tmp + - STACK_DIRECTION * (long)my_thread_stack_size; - - pthread_mutex_lock(&THR_LOCK_threads); - tmp->id= ++thread_id; - ++THR_thread_count; - pthread_mutex_unlock(&THR_LOCK_threads); - tmp->init= 1; -#ifndef DBUG_OFF - /* Generate unique name for thread */ - (void) my_thread_name(); -#endif - -end: - return error; -} - - -/* - Deallocate memory used by the thread for book-keeping - - SYNOPSIS - my_thread_end() - - NOTE - This may be called multiple times for a thread. - This happens for example when one calls 'mysql_server_init()' - mysql_server_end() and then ends with a mysql_end(). -*/ - -void my_thread_end(void) -{ - struct st_my_thread_var *tmp; - tmp= my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); - -#ifdef EXTRA_DEBUG_THREADS - fprintf(stderr,"my_thread_end(): tmp: 0x%lx pthread_self: 0x%lx thread_id: %ld\n", - (long) tmp, (long) pthread_self(), tmp ? (long) tmp->id : 0L); -#endif - if (tmp && tmp->init) - { - -#if !defined(__bsdi__) && !defined(__OpenBSD__) - /* bsdi and openbsd 3.5 dumps core here */ - pthread_cond_destroy(&tmp->suspend); -#endif - pthread_mutex_destroy(&tmp->mutex); - -#if !defined(DBUG_OFF) - /* tmp->dbug is allocated inside DBUG library */ - if (tmp->dbug) - { - /* - Frees memory allocated in SET DEBUG=...; does nothing if there were no - SET DEBUG in a thread. - */ - DBUG_POP(); - free(tmp->dbug); - tmp->dbug=0; - } -#endif -#ifndef DBUG_OFF - /* To find bugs when accessing unallocated data */ - bfill(tmp, sizeof(tmp), 0x8F); -#endif - free(tmp); - pthread_setspecific(THR_KEY_mysys,0); - /* - Decrement counter for number of running threads. We are using this - in my_thread_global_end() to wait until all threads have called - my_thread_end and thus freed all memory they have allocated in - my_thread_init() and DBUG_xxxx - */ - pthread_mutex_lock(&THR_LOCK_threads); - DBUG_ASSERT(THR_thread_count != 0); - if (--THR_thread_count == 0) - pthread_cond_signal(&THR_COND_threads); - pthread_mutex_unlock(&THR_LOCK_threads); - } - else - { - pthread_setspecific(THR_KEY_mysys,0); - } -} - -struct st_my_thread_var *_my_thread_var(void) -{ - return my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); -} - -#ifndef DBUG_OFF -/* Return pointer to DBUG for holding current state */ - -extern void **my_thread_var_dbug() -{ - struct st_my_thread_var *tmp= - my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); - return tmp && tmp->init ? &tmp->dbug : 0; -} -#endif - -/* Return pointer to mutex_in_use */ - -safe_mutex_t **my_thread_var_mutex_in_use() -{ - struct st_my_thread_var *tmp= - my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); - return tmp ? &tmp->mutex_in_use : 0; -} - -/**************************************************************************** - Get name of current thread. -****************************************************************************/ - -my_thread_id my_thread_dbug_id() -{ - return my_thread_var->id; -} - -#ifdef DBUG_OFF -const char *my_thread_name(void) -{ - return "no_name"; -} - -#else - -const char *my_thread_name(void) -{ - char name_buff[100]; - struct st_my_thread_var *tmp=my_thread_var; - if (!tmp->name[0]) - { - my_thread_id id= my_thread_dbug_id(); - sprintf(name_buff,"T@%lu", (ulong) id); - strmake(tmp->name,name_buff,THREAD_NAME_SIZE); - } - return tmp->name; -} -#endif /* DBUG_OFF */ - - -static uint get_thread_lib(void) -{ -#ifdef _CS_GNU_LIBPTHREAD_VERSION - char buff[64]; - - confstr(_CS_GNU_LIBPTHREAD_VERSION, buff, sizeof(buff)); - - if (!strncasecmp(buff, "NPTL", 4)) - return THD_LIB_NPTL; - if (!strncasecmp(buff, "linuxthreads", 12)) - return THD_LIB_LT; -#endif - return THD_LIB_OTHER; -} - -#ifdef _WIN32 -/* - In Visual Studio 2005 and later, default SIGABRT handler will overwrite - any unhandled exception filter set by the application and will try to - call JIT debugger. This is not what we want, this we calling __debugbreak - to stop in debugger, if process is being debugged or to generate - EXCEPTION_BREAKPOINT and then handle_segfault will do its magic. -*/ - -#if (_MSC_VER >= 1400) -static void my_sigabrt_handler(int sig) -{ - __debugbreak(); -} -#endif /*_MSC_VER >=1400 */ - -static void install_sigabrt_handler(void) -{ -#if (_MSC_VER >=1400) - /*abort() should not override our exception filter*/ - _set_abort_behavior(0,_CALL_REPORTFAULT); - signal(SIGABRT,my_sigabrt_handler); -#endif /* _MSC_VER >=1400 */ -} -#endif - -#endif /* THREAD */ diff --git a/externals/mysql/mysys/my_uuid.c b/externals/mysql/mysys/my_uuid.c deleted file mode 100644 index 64db822cfb..0000000000 --- a/externals/mysql/mysys/my_uuid.c +++ /dev/null @@ -1,243 +0,0 @@ -/* Copyright (C) 2007 MySQL AB, Sergei Golubchik & Michael Widenius - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - implements Universal Unique Identifiers (UUIDs), as in - DCE 1.1: Remote Procedure Call, - Open Group Technical Standard Document Number C706, October 1997, - (supersedes C309 DCE: Remote Procedure Call 8/1994, - which was basis for ISO/IEC 11578:1996 specification) - - A UUID has the following structure: - - Field NDR Data Type Octet # Note - time_low unsigned long 0-3 The low field of the - timestamp. - time_mid unsigned short 4-5 The middle field of - the timestamp. - time_hi_and_version unsigned short 6-7 The high field of the - timestamp multiplexed - with the version number. - clock_seq_hi_and_reserved unsigned small 8 The high field of the - clock sequence multi- - plexed with the variant. - clock_seq_low unsigned small 9 The low field of the - clock sequence. - node character 10-15 The spatially unique node - identifier. -*/ - -#include "mysys_priv.h" -#include -#include /* mi_int2store, mi_int4store */ - -static my_bool my_uuid_inited= 0; -static struct my_rnd_struct uuid_rand; -static uint nanoseq; -static ulonglong uuid_time= 0; -static uchar uuid_suffix[2+6]; /* clock_seq and node */ - -#ifdef THREAD -static pthread_mutex_t LOCK_uuid_generator; -#endif - -/* - Number of 100-nanosecond intervals between - 1582-10-15 00:00:00.00 and 1970-01-01 00:00:00.00 -*/ - -#define UUID_TIME_OFFSET ((ulonglong) 141427 * 24 * 60 * 60 * \ - 1000 * 1000 * 10) -#define UUID_VERSION 0x1000 -#define UUID_VARIANT 0x8000 - - -/* Helper function */ - -static void set_clock_seq() -{ - uint16 clock_seq= ((uint)(my_rnd(&uuid_rand)*16383)) | UUID_VARIANT; - mi_int2store(uuid_suffix, clock_seq); -} - - -/** - Init structures needed for my_uuid - - @func my_uuid_init() - @param seed1 Seed for random generator - @param seed2 Seed for random generator - - @note - Seed1 & seed2 should NOT depend on clock. This is to be able to - generate a random mac address according to UUID specs. -*/ - -void my_uuid_init(ulong seed1, ulong seed2) -{ - uchar *mac= uuid_suffix+2; - ulonglong now; - - if (my_uuid_inited) - return; - my_uuid_inited= 1; - now= my_getsystime(); - nanoseq= 0; - - if (my_gethwaddr(mac)) - { - uint i; - /* - Generating random "hardware addr" - - Specs explicitly specify that node identifier should NOT - correlate with a clock_seq value, so we use a separate - randominit() here. - */ - /* purecov: begin inspected */ - my_rnd_init(&uuid_rand, (ulong) (seed2+ now/2), (ulong) (now+rand())); - for (i=0; i < sizeof(mac); i++) - mac[i]= (uchar)(my_rnd(&uuid_rand)*255); - /* purecov: end */ - } - my_rnd_init(&uuid_rand, (ulong) (seed1 + now), (ulong) (now/2+ getpid())); - set_clock_seq(); - pthread_mutex_init(&LOCK_uuid_generator, MY_MUTEX_INIT_FAST); -} - - -/** - Create a global unique identifier (uuid) - - @func my_uuid() - @param to Store uuid here. Must be of size MY_uuid_SIZE (16) -*/ - -void my_uuid(uchar *to) -{ - ulonglong tv; - uint32 time_low; - uint16 time_mid, time_hi_and_version; - - DBUG_ASSERT(my_uuid_inited); - - pthread_mutex_lock(&LOCK_uuid_generator); - tv= my_getsystime() + UUID_TIME_OFFSET + nanoseq; - - if (likely(tv > uuid_time)) - { - /* - Current time is ahead of last timestamp, as it should be. - If we "borrowed time", give it back, just as long as we - stay ahead of the previous timestamp. - */ - if (nanoseq) - { - uint delta; - DBUG_ASSERT((tv > uuid_time) && (nanoseq > 0)); - /* - -1 so we won't make tv= uuid_time for nanoseq >= (tv - uuid_time) - */ - delta= min(nanoseq, (uint)(tv - uuid_time -1)); - tv-= delta; - nanoseq-= delta; - } - } - else - { - if (unlikely(tv == uuid_time)) - { - /* - For low-res system clocks. If several requests for UUIDs - end up on the same tick, we add a nano-second to make them - different. - ( current_timestamp + nanoseq * calls_in_this_period ) - may end up > next_timestamp; this is OK. Nonetheless, we'll - try to unwind nanoseq when we get a chance to. - If nanoseq overflows, we'll start over with a new numberspace - (so the if() below is needed so we can avoid the ++tv and thus - match the follow-up if() if nanoseq overflows!). - */ - if (likely(++nanoseq)) - ++tv; - } - - if (unlikely(tv <= uuid_time)) - { - /* - If the admin changes the system clock (or due to Daylight - Saving Time), the system clock may be turned *back* so we - go through a period once more for which we already gave out - UUIDs. To avoid duplicate UUIDs despite potentially identical - times, we make a new random component. - We also come here if the nanoseq "borrowing" overflows. - In either case, we throw away any nanoseq borrowing since it's - irrelevant in the new numberspace. - */ - set_clock_seq(); - tv= my_getsystime() + UUID_TIME_OFFSET; - nanoseq= 0; - DBUG_PRINT("uuid",("making new numberspace")); - } - } - - uuid_time=tv; - pthread_mutex_unlock(&LOCK_uuid_generator); - - time_low= (uint32) (tv & 0xFFFFFFFF); - time_mid= (uint16) ((tv >> 32) & 0xFFFF); - time_hi_and_version= (uint16) ((tv >> 48) | UUID_VERSION); - - /* - Note, that the standard does NOT specify byte ordering in - multi-byte fields. it's implementation defined (but must be - the same for all fields). - We use big-endian, so we can use memcmp() to compare UUIDs - and for straightforward UUID to string conversion. - */ - mi_int4store(to, time_low); - mi_int2store(to+4, time_mid); - mi_int2store(to+6, time_hi_and_version); - bmove(to+8, uuid_suffix, sizeof(uuid_suffix)); -} - - -/** - Convert uuid to string representation - - @func my_uuid2str() - @param guid uuid - @param s Output buffer.Must be at least MY_UUID_STRING_LENGTH+1 large. -*/ -void my_uuid2str(const uchar *guid, char *s) -{ - int i; - for (i=0; i < MY_UUID_SIZE; i++) - { - *s++= _dig_vec_lower[guid[i] >>4]; - *s++= _dig_vec_lower[guid[i] & 15]; - if(i == 3 || i == 5 || i == 7 || i == 9) - *s++= '-'; - } -} - -void my_uuid_end() -{ - if (my_uuid_inited) - { - my_uuid_inited= 0; - pthread_mutex_destroy(&LOCK_uuid_generator); - } -} diff --git a/externals/mysql/mysys/my_vle.c b/externals/mysql/mysys/my_vle.c deleted file mode 100644 index 09f297eb55..0000000000 --- a/externals/mysql/mysys/my_vle.c +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (C) 2005 MySQL AB - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Variable length encoding. - - A method to store an arbitrary-size non-negative integer. We let the - most significant bit of the number indicate that the next byte - should be contatenated to form the real number. -*/ - -#include "my_vle.h" - -/* - Function to encode an unsigned long as VLE. The bytes for the VLE - will be written to the location pointed to by 'out'. The maximum - number of bytes written will be 'max'. - - PARAMETERS - - out Pointer to beginning of where to store VLE bytes. - max Maximum number of bytes to write. - n Number to encode. - - RETURN VALUE - On success, one past the end of the array containing the VLE - bytes. On failure, the 'out' pointer is returned. -*/ - -uchar* -my_vle_encode(uchar* out, size_t max, ulong n) -{ - uchar buf[my_vle_sizeof(n)]; - uchar *ptr= buf; - size_t len; - - do - { - *ptr++= (uchar) (n & 0x7F); - n>>= 7; - } - while (n > 0); - - len= ptr - buf; - - if (len <= max) - { - /* - The bytes are stored in reverse order in 'buf'. Let's write them - in correct order to the output buffer and set the MSB at the - same time. - */ - while (ptr-- > buf) - { - uchar v= *ptr; - if (ptr > buf) - v|= 0x80; - *out++= v; - } - } - - return out; -} - -/* - Function to decode a VLE representation of an integral value. - - - PARAMETERS - - result_ptr Pointer to an unsigned long where the value will be written. - vle Pointer to the VLE bytes. - - RETURN VALUE - - One-past the end of the VLE bytes. The routine will never read - more than sizeof(*result_ptr) + 1 bytes. -*/ - -uchar const* -my_vle_decode(ulong *result_ptr, uchar const *vle) -{ - ulong result= 0; - size_t cnt= 1; - - do - { - result<<= 7; - result|= (*vle & 0x7F); - } - while ((*vle++ & 0x80) && ++cnt <= sizeof(*result_ptr) + 1); - - if (cnt <= sizeof(*result_ptr) + 1) - *result_ptr= result; - - return vle; -} diff --git a/externals/mysql/mysys/my_wincond.c b/externals/mysql/mysys/my_wincond.c deleted file mode 100644 index 862eafce43..0000000000 --- a/externals/mysql/mysys/my_wincond.c +++ /dev/null @@ -1,222 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/***************************************************************************** -** The following is a simple implementation of posix conditions -*****************************************************************************/ -#if defined(_WIN32) - -#undef SAFE_MUTEX /* Avoid safe_mutex redefinitions */ -#include "mysys_priv.h" -#include -#include -#include - -int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) -{ - cond->waiting= 0; - InitializeCriticalSection(&cond->lock_waiting); - - cond->events[SIGNAL]= CreateEvent(NULL, /* no security */ - FALSE, /* auto-reset event */ - FALSE, /* non-signaled initially */ - NULL); /* unnamed */ - - /* Create a manual-reset event. */ - cond->events[BROADCAST]= CreateEvent(NULL, /* no security */ - TRUE, /* manual-reset */ - FALSE, /* non-signaled initially */ - NULL); /* unnamed */ - - - cond->broadcast_block_event= CreateEvent(NULL, /* no security */ - TRUE, /* manual-reset */ - TRUE, /* signaled initially */ - NULL); /* unnamed */ - - if( cond->events[SIGNAL] == NULL || - cond->events[BROADCAST] == NULL || - cond->broadcast_block_event == NULL ) - return ENOMEM; - return 0; -} - -int pthread_cond_destroy(pthread_cond_t *cond) -{ - DeleteCriticalSection(&cond->lock_waiting); - - if (CloseHandle(cond->events[SIGNAL]) == 0 || - CloseHandle(cond->events[BROADCAST]) == 0 || - CloseHandle(cond->broadcast_block_event) == 0) - return EINVAL; - return 0; -} - - -int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) -{ - return pthread_cond_timedwait(cond,mutex,NULL); -} - - -int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - struct timespec *abstime) -{ - int result; - long timeout; - union ft64 now; - - if( abstime != NULL ) - { - GetSystemTimeAsFileTime(&now.ft); - - /* - Calculate time left to abstime - - subtract start time from current time(values are in 100ns units) - - convert to millisec by dividing with 10000 - */ - timeout= (long)((abstime->tv.i64 - now.i64) / 10000); - - /* Don't allow the timeout to be negative */ - if (timeout < 0) - timeout= 0L; - - /* - Make sure the calucated timeout does not exceed original timeout - value which could cause "wait for ever" if system time changes - */ - if (timeout > abstime->max_timeout_msec) - timeout= abstime->max_timeout_msec; - - } - else - { - /* No time specified; don't expire */ - timeout= INFINITE; - } - - /* - Block access if previous broadcast hasn't finished. - This is just for safety and should normally not - affect the total time spent in this function. - */ - WaitForSingleObject(cond->broadcast_block_event, INFINITE); - - EnterCriticalSection(&cond->lock_waiting); - cond->waiting++; - LeaveCriticalSection(&cond->lock_waiting); - - LeaveCriticalSection(mutex); - - result= WaitForMultipleObjects(2, cond->events, FALSE, timeout); - - EnterCriticalSection(&cond->lock_waiting); - cond->waiting--; - - if (cond->waiting == 0) - { - /* - We're the last waiter to be notified or to stop waiting, so - reset the manual event. - */ - /* Close broadcast gate */ - ResetEvent(cond->events[BROADCAST]); - /* Open block gate */ - SetEvent(cond->broadcast_block_event); - } - LeaveCriticalSection(&cond->lock_waiting); - - EnterCriticalSection(mutex); - - return result == WAIT_TIMEOUT ? ETIMEDOUT : 0; -} - -int pthread_cond_signal(pthread_cond_t *cond) -{ - EnterCriticalSection(&cond->lock_waiting); - - if(cond->waiting > 0) - SetEvent(cond->events[SIGNAL]); - - LeaveCriticalSection(&cond->lock_waiting); - - return 0; -} - - -int pthread_cond_broadcast(pthread_cond_t *cond) -{ - EnterCriticalSection(&cond->lock_waiting); - /* - The mutex protect us from broadcasting if - there isn't any thread waiting to open the - block gate after this call has closed it. - */ - if(cond->waiting > 0) - { - /* Close block gate */ - ResetEvent(cond->broadcast_block_event); - /* Open broadcast gate */ - SetEvent(cond->events[BROADCAST]); - } - - LeaveCriticalSection(&cond->lock_waiting); - - return 0; -} - - -int pthread_attr_init(pthread_attr_t *connect_att) -{ - connect_att->dwStackSize = 0; - connect_att->dwCreatingFlag = 0; - return 0; -} - -int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack) -{ - connect_att->dwStackSize=stack; - return 0; -} - -int pthread_attr_destroy(pthread_attr_t *connect_att) -{ - bzero((uchar*) connect_att,sizeof(*connect_att)); - return 0; -} - -/**************************************************************************** -** Fix localtime_r() to be a bit safer -****************************************************************************/ - -struct tm *localtime_r(const time_t *timep,struct tm *tmp) -{ - if (*timep == (time_t) -1) /* This will crash win32 */ - { - bzero(tmp,sizeof(*tmp)); - } - else - { - struct tm *res=localtime(timep); - if (!res) /* Wrong date */ - { - bzero(tmp,sizeof(*tmp)); /* Keep things safe */ - return 0; - } - *tmp= *res; - } - return tmp; -} -#endif /* __WIN__ */ diff --git a/externals/mysql/mysys/my_windac.c b/externals/mysql/mysys/my_windac.c deleted file mode 100644 index f846853f7b..0000000000 --- a/externals/mysql/mysys/my_windac.c +++ /dev/null @@ -1,223 +0,0 @@ -/* Copyright (C) 2000-2005 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "m_string.h" -#ifdef __WIN__ - -/* Windows NT/2000 discretionary access control utility functions. */ - -/* - Check if the operating system is built on NT technology. - - RETURN - 0 Windows 95/98/Me - 1 otherwise -*/ - -static my_bool is_nt() -{ - return GetVersion() < 0x80000000; -} - -/* - Auxilary structure to store pointers to the data which we need to keep - around while SECURITY_ATTRIBUTES is in use. -*/ - -typedef struct st_my_security_attr -{ - PSID everyone_sid; - PACL dacl; -} My_security_attr; - - -/* - Allocate and initialize SECURITY_ATTRIBUTES setting up access - rights for the owner and group `Everybody'. - - SYNOPSIS - my_security_attr_create() - psa [OUT] pointer to store the pointer to SA in - perror [OUT] pointer to store error message if there was an - error - owner_rights [IN] access rights for the owner - everyone_rights [IN] access rights for group Everybody - - DESCRIPTION - Set up the security attributes to provide clients with sufficient - access rights to a kernel object. We need this function - because if we simply grant all access to everybody (by installing - a NULL DACL) a mailicious user can attempt a denial of service - attack by taking ownership over the kernel object. Upon successful - return `psa' contains a pointer to SECUIRITY_ATTRIBUTES that can be used - to create kernel objects with proper access rights. - - RETURN - 0 success, psa is 0 or points to a valid SA structure, - perror is left intact - !0 error, SA is set to 0, error message is stored in perror -*/ - -int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror, - DWORD owner_rights, DWORD everyone_rights) -{ - /* Top-level SID authority */ - SID_IDENTIFIER_AUTHORITY world_auth= SECURITY_WORLD_SID_AUTHORITY; - PSID everyone_sid= 0; - HANDLE htoken= 0; - SECURITY_ATTRIBUTES *sa= 0; - PACL dacl= 0; - DWORD owner_token_length, dacl_length; - SECURITY_DESCRIPTOR *sd; - PTOKEN_USER owner_token; - PSID owner_sid; - My_security_attr *attr; - - if (! is_nt()) - { - *psa= 0; - return 0; - } - - /* - Get SID of Everyone group. Easier to retrieve all SIDs each time - this function is called than worry about thread safety. - */ - if (! AllocateAndInitializeSid(&world_auth, 1, SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0, &everyone_sid)) - { - *perror= "Failed to retrieve the SID of Everyone group"; - goto error; - } - - /* - Get SID of the owner. Using GetSecurityInfo this task can be done - in just one call instead of five, but GetSecurityInfo declared in - aclapi.h, so I hesitate to use it. - SIC: OpenThreadToken works only if there is an active impersonation - token, hence OpenProcessToken is used. - */ - if (! OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &htoken)) - { - *perror= "Failed to retrieve thread access token"; - goto error; - } - GetTokenInformation(htoken, TokenUser, 0, 0, &owner_token_length); - - if (! my_multi_malloc(MYF(MY_WME), - &sa, ALIGN_SIZE(sizeof(SECURITY_ATTRIBUTES)) + - sizeof(My_security_attr), - &sd, sizeof(SECURITY_DESCRIPTOR), - &owner_token, owner_token_length, - 0)) - { - *perror= "Failed to allocate memory for SECURITY_ATTRIBUTES"; - goto error; - } - bzero(owner_token, owner_token_length); - if (! GetTokenInformation(htoken, TokenUser, owner_token, - owner_token_length, &owner_token_length)) - { - *perror= "GetTokenInformation failed"; - goto error; - } - owner_sid= owner_token->User.Sid; - - if (! IsValidSid(owner_sid)) - { - *perror= "IsValidSid failed"; - goto error; - } - - /* Calculate the amount of memory that must be allocated for the DACL */ - dacl_length= sizeof(ACL) + (sizeof(ACCESS_ALLOWED_ACE)-sizeof(DWORD)) * 2 + - GetLengthSid(everyone_sid) + GetLengthSid(owner_sid); - - /* Create an ACL */ - if (! (dacl= (PACL) my_malloc(dacl_length, MYF(MY_ZEROFILL|MY_WME)))) - { - *perror= "Failed to allocate memory for DACL"; - goto error; - } - if (! InitializeAcl(dacl, dacl_length, ACL_REVISION)) - { - *perror= "Failed to initialize DACL"; - goto error; - } - if (! AddAccessAllowedAce(dacl, ACL_REVISION, everyone_rights, everyone_sid)) - { - *perror= "Failed to set up DACL"; - goto error; - } - if (! AddAccessAllowedAce(dacl, ACL_REVISION, owner_rights, owner_sid)) - { - *perror= "Failed to set up DACL"; - goto error; - } - if (! InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION)) - { - *perror= "Could not initialize security descriptor"; - goto error; - } - if (! SetSecurityDescriptorDacl(sd, TRUE, dacl, FALSE)) - { - *perror= "Failed to install DACL"; - goto error; - } - - sa->nLength= sizeof(*sa); - sa->bInheritHandle= TRUE; - sa->lpSecurityDescriptor= sd; - /* Save pointers to everyone_sid and dacl to be able to clean them up */ - attr= (My_security_attr*) (((char*) sa) + ALIGN_SIZE(sizeof(*sa))); - attr->everyone_sid= everyone_sid; - attr->dacl= dacl; - *psa= sa; - - CloseHandle(htoken); - return 0; -error: - if (everyone_sid) - FreeSid(everyone_sid); - if (htoken) - CloseHandle(htoken); - my_free((uchar*) sa, MYF(MY_ALLOW_ZERO_PTR)); - my_free((uchar*) dacl, MYF(MY_ALLOW_ZERO_PTR)); - *psa= 0; - return 1; -} - -/* - Cleanup security attributes freeing used memory. - - SYNOPSIS - my_security_attr_free() - sa security attributes -*/ - -void my_security_attr_free(SECURITY_ATTRIBUTES *sa) -{ - if (sa) - { - My_security_attr *attr= (My_security_attr*) - (((char*)sa) + ALIGN_SIZE(sizeof(*sa))); - FreeSid(attr->everyone_sid); - my_free((uchar*) attr->dacl, MYF(0)); - my_free((uchar*) sa, MYF(0)); - } -} - -#endif /* __WIN__ */ diff --git a/externals/mysql/mysys/my_winerr.c b/externals/mysql/mysys/my_winerr.c deleted file mode 100644 index 179909970a..0000000000 --- a/externals/mysql/mysys/my_winerr.c +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (C) 2008 MySQL AB - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Convert Windows API error (GetLastError() to Posix equivalent (errno) - The exported function my_osmaperr() is modelled after and borrows - heavily from undocumented _dosmaperr()(found of the static Microsoft C runtime). -*/ - -#ifdef _WIN32 - -#include -#include - - -struct errentry -{ - unsigned long oscode; /* OS return value */ - int sysv_errno; /* System V error code */ -}; - -static struct errentry errtable[]= { - { ERROR_INVALID_FUNCTION, EINVAL }, /* 1 */ - { ERROR_FILE_NOT_FOUND, ENOENT }, /* 2 */ - { ERROR_PATH_NOT_FOUND, ENOENT }, /* 3 */ - { ERROR_TOO_MANY_OPEN_FILES, EMFILE }, /* 4 */ - { ERROR_ACCESS_DENIED, EACCES }, /* 5 */ - { ERROR_INVALID_HANDLE, EBADF }, /* 6 */ - { ERROR_ARENA_TRASHED, ENOMEM }, /* 7 */ - { ERROR_NOT_ENOUGH_MEMORY, ENOMEM }, /* 8 */ - { ERROR_INVALID_BLOCK, ENOMEM }, /* 9 */ - { ERROR_BAD_ENVIRONMENT, E2BIG }, /* 10 */ - { ERROR_BAD_FORMAT, ENOEXEC }, /* 11 */ - { ERROR_INVALID_ACCESS, EINVAL }, /* 12 */ - { ERROR_INVALID_DATA, EINVAL }, /* 13 */ - { ERROR_INVALID_DRIVE, ENOENT }, /* 15 */ - { ERROR_CURRENT_DIRECTORY, EACCES }, /* 16 */ - { ERROR_NOT_SAME_DEVICE, EXDEV }, /* 17 */ - { ERROR_NO_MORE_FILES, ENOENT }, /* 18 */ - { ERROR_LOCK_VIOLATION, EACCES }, /* 33 */ - { ERROR_BAD_NETPATH, ENOENT }, /* 53 */ - { ERROR_NETWORK_ACCESS_DENIED, EACCES }, /* 65 */ - { ERROR_BAD_NET_NAME, ENOENT }, /* 67 */ - { ERROR_FILE_EXISTS, EEXIST }, /* 80 */ - { ERROR_CANNOT_MAKE, EACCES }, /* 82 */ - { ERROR_FAIL_I24, EACCES }, /* 83 */ - { ERROR_INVALID_PARAMETER, EINVAL }, /* 87 */ - { ERROR_NO_PROC_SLOTS, EAGAIN }, /* 89 */ - { ERROR_DRIVE_LOCKED, EACCES }, /* 108 */ - { ERROR_BROKEN_PIPE, EPIPE }, /* 109 */ - { ERROR_DISK_FULL, ENOSPC }, /* 112 */ - { ERROR_INVALID_TARGET_HANDLE, EBADF }, /* 114 */ - { ERROR_INVALID_HANDLE, EINVAL }, /* 124 */ - { ERROR_WAIT_NO_CHILDREN, ECHILD }, /* 128 */ - { ERROR_CHILD_NOT_COMPLETE, ECHILD }, /* 129 */ - { ERROR_DIRECT_ACCESS_HANDLE, EBADF }, /* 130 */ - { ERROR_NEGATIVE_SEEK, EINVAL }, /* 131 */ - { ERROR_SEEK_ON_DEVICE, EACCES }, /* 132 */ - { ERROR_DIR_NOT_EMPTY, ENOTEMPTY }, /* 145 */ - { ERROR_NOT_LOCKED, EACCES }, /* 158 */ - { ERROR_BAD_PATHNAME, ENOENT }, /* 161 */ - { ERROR_MAX_THRDS_REACHED, EAGAIN }, /* 164 */ - { ERROR_LOCK_FAILED, EACCES }, /* 167 */ - { ERROR_ALREADY_EXISTS, EEXIST }, /* 183 */ - { ERROR_FILENAME_EXCED_RANGE, ENOENT }, /* 206 */ - { ERROR_NESTING_NOT_ALLOWED, EAGAIN }, /* 215 */ - { ERROR_NOT_ENOUGH_QUOTA, ENOMEM } /* 1816 */ -}; - -/* size of the table */ -#define ERRTABLESIZE (sizeof(errtable)/sizeof(errtable[0])) - -/* The following two constants must be the minimum and maximum -values in the (contiguous) range of Exec Failure errors. */ -#define MIN_EXEC_ERROR ERROR_INVALID_STARTING_CODESEG -#define MAX_EXEC_ERROR ERROR_INFLOOP_IN_RELOC_CHAIN - -/* These are the low and high value in the range of errors that are -access violations */ -#define MIN_EACCES_RANGE ERROR_WRITE_PROTECT -#define MAX_EACCES_RANGE ERROR_SHARING_BUFFER_EXCEEDED - - -static int get_errno_from_oserr(unsigned long oserrno) -{ - int i; - - /* check the table for the OS error code */ - for (i= 0; i < ERRTABLESIZE; ++i) - { - if (oserrno == errtable[i].oscode) - { - return errtable[i].sysv_errno; - } - } - - /* The error code wasn't in the table. We check for a range of */ - /* EACCES errors or exec failure errors (ENOEXEC). Otherwise */ - /* EINVAL is returned. */ - - if (oserrno >= MIN_EACCES_RANGE && oserrno <= MAX_EACCES_RANGE) - return EACCES; - else if (oserrno >= MIN_EXEC_ERROR && oserrno <= MAX_EXEC_ERROR) - return ENOEXEC; - else - return EINVAL; -} - -/* Set errno corresponsing to GetLastError() value */ -void my_osmaperr ( unsigned long oserrno) -{ - errno= get_errno_from_oserr(oserrno); -} - -#endif diff --git a/externals/mysql/mysys/my_winfile.c b/externals/mysql/mysys/my_winfile.c deleted file mode 100644 index d5917d4e5a..0000000000 --- a/externals/mysql/mysys/my_winfile.c +++ /dev/null @@ -1,667 +0,0 @@ -/* Copyright (C) 2008 MySQL AB - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - The purpose of this file is to provide implementation of file IO routines on - Windows that can be thought as drop-in replacement for corresponding C runtime - functionality. - - Compared to Windows CRT, this one - - does not have the same file descriptor - limitation (default is 16384 and can be increased further, whereas CRT poses - a hard limit of 2048 file descriptors) - - the file operations are not serialized - - positional IO pread/pwrite is ported here. - - no text mode for files, all IO is "binary" - - Naming convention: - All routines are prefixed with my_win_, e.g Posix open() is implemented with - my_win_open() - - Implemented are - - POSIX routines(e.g open, read, lseek ...) - - Some ANSI C stream routines (fopen, fdopen, fileno, fclose) - - Windows CRT equvalients (my_get_osfhandle, open_osfhandle) - - Worth to note: - - File descriptors used here are located in a range that is not compatible - with CRT on purpose. Attempt to use a file descriptor from Windows CRT library - range in my_win_* function will be punished with DBUG_ASSERT() - - - File streams (FILE *) are actually from the C runtime. The routines provided - here are useful only in scernarios that use low-level IO with my_win_fileno() -*/ - -#ifdef _WIN32 - -#include "mysys_priv.h" -#include -#include - -/* Associates a file descriptor with an existing operating-system file handle.*/ -File my_open_osfhandle(HANDLE handle, int oflag) -{ - int offset= -1; - uint i; - DBUG_ENTER("my_open_osfhandle"); - - pthread_mutex_lock(&THR_LOCK_open); - for(i= MY_FILE_MIN; i < my_file_limit;i++) - { - if(my_file_info[i].fhandle == 0) - { - struct st_my_file_info *finfo= &(my_file_info[i]); - finfo->type= FILE_BY_OPEN; - finfo->fhandle= handle; - finfo->oflag= oflag; - offset= i; - break; - } - } - pthread_mutex_unlock(&THR_LOCK_open); - if(offset == -1) - errno= EMFILE; /* to many file handles open */ - DBUG_RETURN(offset); -} - - -static void invalidate_fd(File fd) -{ - DBUG_ENTER("invalidate_fd"); - DBUG_ASSERT(fd >= MY_FILE_MIN && fd < (int)my_file_limit); - my_file_info[fd].fhandle= 0; - DBUG_VOID_RETURN; -} - - -/* Get Windows handle for a file descriptor */ -HANDLE my_get_osfhandle(File fd) -{ - DBUG_ENTER("my_get_osfhandle"); - DBUG_ASSERT(fd >= MY_FILE_MIN && fd < (int)my_file_limit); - DBUG_RETURN(my_file_info[fd].fhandle); -} - - -static int my_get_open_flags(File fd) -{ - DBUG_ENTER("my_get_osfhandle"); - DBUG_ASSERT(fd >= MY_FILE_MIN && fd < (int)my_file_limit); - DBUG_RETURN(my_file_info[fd].oflag); -} - - -/* - Open a file with sharing. Similar to _sopen() from libc, but allows managing - share delete on win32 - - SYNOPSIS - my_win_sopen() - path file name - oflag operation flags - shflag share flag - pmode permission flags - - RETURN VALUE - File descriptor of opened file if success - -1 and sets errno if fails. -*/ - -File my_win_sopen(const char *path, int oflag, int shflag, int pmode) -{ - int fh; /* handle of opened file */ - int mask; - HANDLE osfh; /* OS handle of opened file */ - DWORD fileaccess; /* OS file access (requested) */ - DWORD fileshare; /* OS file sharing mode */ - DWORD filecreate; /* OS method of opening/creating */ - DWORD fileattrib; /* OS file attribute flags */ - SECURITY_ATTRIBUTES SecurityAttributes; - - DBUG_ENTER("my_win_sopen"); - - if (check_if_legal_filename(path)) - { - errno= EACCES; - DBUG_RETURN(-1); - } - SecurityAttributes.nLength= sizeof(SecurityAttributes); - SecurityAttributes.lpSecurityDescriptor= NULL; - SecurityAttributes.bInheritHandle= !(oflag & _O_NOINHERIT); - - /* decode the access flags */ - switch (oflag & (_O_RDONLY | _O_WRONLY | _O_RDWR)) { - case _O_RDONLY: /* read access */ - fileaccess= GENERIC_READ; - break; - case _O_WRONLY: /* write access */ - fileaccess= GENERIC_WRITE; - break; - case _O_RDWR: /* read and write access */ - fileaccess= GENERIC_READ | GENERIC_WRITE; - break; - default: /* error, bad oflag */ - errno= EINVAL; - DBUG_RETURN(-1); - } - - /* decode sharing flags */ - switch (shflag) { - case _SH_DENYRW: /* exclusive access except delete */ - fileshare= FILE_SHARE_DELETE; - break; - case _SH_DENYWR: /* share read and delete access */ - fileshare= FILE_SHARE_READ | FILE_SHARE_DELETE; - break; - case _SH_DENYRD: /* share write and delete access */ - fileshare= FILE_SHARE_WRITE | FILE_SHARE_DELETE; - break; - case _SH_DENYNO: /* share read, write and delete access */ - fileshare= FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE; - break; - case _SH_DENYRWD: /* exclusive access */ - fileshare= 0L; - break; - case _SH_DENYWRD: /* share read access */ - fileshare= FILE_SHARE_READ; - break; - case _SH_DENYRDD: /* share write access */ - fileshare= FILE_SHARE_WRITE; - break; - case _SH_DENYDEL: /* share read and write access */ - fileshare= FILE_SHARE_READ | FILE_SHARE_WRITE; - break; - default: /* error, bad shflag */ - errno= EINVAL; - DBUG_RETURN(-1); - } - - /* decode open/create method flags */ - switch (oflag & (_O_CREAT | _O_EXCL | _O_TRUNC)) { - case 0: - case _O_EXCL: /* ignore EXCL w/o CREAT */ - filecreate= OPEN_EXISTING; - break; - - case _O_CREAT: - filecreate= OPEN_ALWAYS; - break; - - case _O_CREAT | _O_EXCL: - case _O_CREAT | _O_TRUNC | _O_EXCL: - filecreate= CREATE_NEW; - break; - - case _O_TRUNC: - case _O_TRUNC | _O_EXCL: /* ignore EXCL w/o CREAT */ - filecreate= TRUNCATE_EXISTING; - break; - - case _O_CREAT | _O_TRUNC: - filecreate= CREATE_ALWAYS; - break; - - default: - /* this can't happen ... all cases are covered */ - errno= EINVAL; - DBUG_RETURN(-1); - } - - /* decode file attribute flags if _O_CREAT was specified */ - fileattrib= FILE_ATTRIBUTE_NORMAL; /* default */ - if (oflag & _O_CREAT) - { - _umask((mask= _umask(0))); - - if (!((pmode & ~mask) & _S_IWRITE)) - fileattrib= FILE_ATTRIBUTE_READONLY; - } - - /* Set temporary file (delete-on-close) attribute if requested. */ - if (oflag & _O_TEMPORARY) - { - fileattrib|= FILE_FLAG_DELETE_ON_CLOSE; - fileaccess|= DELETE; - } - - /* Set temporary file (delay-flush-to-disk) attribute if requested.*/ - if (oflag & _O_SHORT_LIVED) - fileattrib|= FILE_ATTRIBUTE_TEMPORARY; - - /* Set sequential or random access attribute if requested. */ - if (oflag & _O_SEQUENTIAL) - fileattrib|= FILE_FLAG_SEQUENTIAL_SCAN; - else if (oflag & _O_RANDOM) - fileattrib|= FILE_FLAG_RANDOM_ACCESS; - - /* try to open/create the file */ - if ((osfh= CreateFile(path, fileaccess, fileshare, &SecurityAttributes, - filecreate, fileattrib, NULL)) == INVALID_HANDLE_VALUE) - { - /* - OS call to open/create file failed! map the error, release - the lock, and return -1. note that it's not necessary to - call _free_osfhnd (it hasn't been used yet). - */ - my_osmaperr(GetLastError()); /* map error */ - DBUG_RETURN(-1); /* return error to caller */ - } - - if ((fh= my_open_osfhandle(osfh, - oflag & (_O_APPEND | _O_RDONLY | _O_TEXT))) == -1) - { - CloseHandle(osfh); - } - - DBUG_RETURN(fh); /* return handle */ -} - - -File my_win_open(const char *path, int flags) -{ - DBUG_ENTER("my_win_open"); - DBUG_RETURN(my_win_sopen((char *) path, flags | _O_BINARY, _SH_DENYNO, - _S_IREAD | S_IWRITE)); -} - - -int my_win_close(File fd) -{ - DBUG_ENTER("my_win_close"); - if(CloseHandle(my_get_osfhandle(fd))) - { - invalidate_fd(fd); - DBUG_RETURN(0); - } - my_osmaperr(GetLastError()); - DBUG_RETURN(-1); -} - - -size_t my_win_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset) -{ - DWORD nBytesRead; - HANDLE hFile; - OVERLAPPED ov= {0}; - LARGE_INTEGER li; - - DBUG_ENTER("my_win_pread"); - - if(!Count) - DBUG_RETURN(0); -#ifdef _WIN64 - if(Count > UINT_MAX) - Count= UINT_MAX; -#endif - - hFile= (HANDLE)my_get_osfhandle(Filedes); - li.QuadPart= offset; - ov.Offset= li.LowPart; - ov.OffsetHigh= li.HighPart; - - if(!ReadFile(hFile, Buffer, (DWORD)Count, &nBytesRead, &ov)) - { - DWORD lastError= GetLastError(); - if(lastError == ERROR_HANDLE_EOF) - DBUG_RETURN(0); /*return 0 at EOF*/ - my_osmaperr(lastError); - DBUG_RETURN(-1); - } - DBUG_RETURN(nBytesRead); -} - - -size_t my_win_read(File Filedes, uchar *Buffer, size_t Count) -{ - DWORD nBytesRead; - HANDLE hFile; - - DBUG_ENTER("my_win_read"); - if(!Count) - return 0; -#ifdef _WIN64 - if(Count > UINT_MAX) - Count= UINT_MAX; -#endif - - hFile= (HANDLE)my_get_osfhandle(Filedes); - - if(!ReadFile(hFile, Buffer, (DWORD)Count, &nBytesRead, NULL)) - { - DWORD lastError= GetLastError(); - /* - ERROR_BROKEN_PIPE is returned when no more data coming - through e.g. a command pipe in windows : see MSDN on ReadFile. - */ - if(lastError == ERROR_HANDLE_EOF || lastError == ERROR_BROKEN_PIPE) - DBUG_RETURN(0); /*return 0 at EOF*/ - my_osmaperr(lastError); - DBUG_RETURN(-1); - } - DBUG_RETURN(nBytesRead); -} - - -size_t my_win_pwrite(File Filedes, const uchar *Buffer, size_t Count, - my_off_t offset) -{ - DWORD nBytesWritten; - HANDLE hFile; - OVERLAPPED ov= {0}; - LARGE_INTEGER li; - - DBUG_ENTER("my_win_pwrite"); - DBUG_PRINT("my",("Filedes: %d, Buffer: %p, Count: %zd, offset: %llu", - Filedes, Buffer, Count, (ulonglong)offset)); - - if(!Count) - DBUG_RETURN(0); - -#ifdef _WIN64 - if(Count > UINT_MAX) - Count= UINT_MAX; -#endif - - hFile= (HANDLE)my_get_osfhandle(Filedes); - li.QuadPart= offset; - ov.Offset= li.LowPart; - ov.OffsetHigh= li.HighPart; - - if(!WriteFile(hFile, Buffer, (DWORD)Count, &nBytesWritten, &ov)) - { - my_osmaperr(GetLastError()); - DBUG_RETURN(-1); - } - else - DBUG_RETURN(nBytesWritten); -} - - -my_off_t my_win_lseek(File fd, my_off_t pos, int whence) -{ - LARGE_INTEGER offset; - LARGE_INTEGER newpos; - - DBUG_ENTER("my_win_lseek"); - - /* Check compatibility of Windows and Posix seek constants */ - compile_time_assert(FILE_BEGIN == SEEK_SET && FILE_CURRENT == SEEK_CUR - && FILE_END == SEEK_END); - - offset.QuadPart= pos; - if(!SetFilePointerEx(my_get_osfhandle(fd), offset, &newpos, whence)) - { - my_osmaperr(GetLastError()); - newpos.QuadPart= -1; - } - DBUG_RETURN(newpos.QuadPart); -} - - -#ifndef FILE_WRITE_TO_END_OF_FILE -#define FILE_WRITE_TO_END_OF_FILE 0xffffffff -#endif -size_t my_win_write(File fd, const uchar *Buffer, size_t Count) -{ - DWORD nWritten; - OVERLAPPED ov; - OVERLAPPED *pov= NULL; - HANDLE hFile; - - DBUG_ENTER("my_win_write"); - DBUG_PRINT("my",("Filedes: %d, Buffer: %p, Count %zd", fd, Buffer, Count)); - if(my_get_open_flags(fd) & _O_APPEND) - { - /* - Atomic append to the end of file is is done by special initialization of - the OVERLAPPED structure. See MSDN WriteFile documentation for more info. - */ - memset(&ov, 0, sizeof(ov)); - ov.Offset= FILE_WRITE_TO_END_OF_FILE; - ov.OffsetHigh= -1; - pov= &ov; - } - - hFile= my_get_osfhandle(fd); - if(!WriteFile(hFile, Buffer, (DWORD)Count, &nWritten, pov)) - { - nWritten= (size_t)-1; - my_osmaperr(GetLastError()); - } - DBUG_RETURN((size_t)nWritten); -} - - -int my_win_chsize(File fd, my_off_t newlength) -{ - HANDLE hFile; - LARGE_INTEGER length; - DBUG_ENTER("my_win_chsize"); - - hFile= (HANDLE) my_get_osfhandle(fd); - length.QuadPart= newlength; - if (!SetFilePointerEx(hFile, length , NULL , FILE_BEGIN)) - goto err; - if (!SetEndOfFile(hFile)) - goto err; - DBUG_RETURN(0); -err: - my_osmaperr(GetLastError()); - my_errno= errno; - DBUG_RETURN(-1); -} - - -/* Get the file descriptor for stdin,stdout or stderr */ -static File my_get_stdfile_descriptor(FILE *stream) -{ - HANDLE hFile; - DWORD nStdHandle; - DBUG_ENTER("my_get_stdfile_descriptor"); - - if(stream == stdin) - nStdHandle= STD_INPUT_HANDLE; - else if(stream == stdout) - nStdHandle= STD_OUTPUT_HANDLE; - else if(stream == stderr) - nStdHandle= STD_ERROR_HANDLE; - else - DBUG_RETURN(-1); - - hFile= GetStdHandle(nStdHandle); - if(hFile != INVALID_HANDLE_VALUE) - DBUG_RETURN(my_open_osfhandle(hFile, 0)); - DBUG_RETURN(-1); -} - - -File my_win_fileno(FILE *file) -{ - HANDLE hFile= (HANDLE)_get_osfhandle(fileno(file)); - int retval= -1; - uint i; - - DBUG_ENTER("my_win_fileno"); - - for(i= MY_FILE_MIN; i < my_file_limit; i++) - { - if(my_file_info[i].fhandle == hFile) - { - retval= i; - break; - } - } - if(retval == -1) - /* try std stream */ - DBUG_RETURN(my_get_stdfile_descriptor(file)); - DBUG_RETURN(retval); -} - - -FILE *my_win_fopen(const char *filename, const char *type) -{ - FILE *file; - int flags= 0; - DBUG_ENTER("my_win_open"); - - /* - If we are not creating, then we need to use my_access to make sure - the file exists since Windows doesn't handle files like "com1.sym" - very well - */ - if (check_if_legal_filename(filename)) - { - errno= EACCES; - DBUG_RETURN(NULL); - } - - file= fopen(filename, type); - if(!file) - DBUG_RETURN(NULL); - - if(strchr(type,'a') != NULL) - flags= O_APPEND; - - /* - Register file handle in my_table_info. - Necessary for my_fileno() - */ - if(my_open_osfhandle((HANDLE)_get_osfhandle(fileno(file)), flags) < 0) - { - fclose(file); - DBUG_RETURN(NULL); - } - DBUG_RETURN(file); -} - - -FILE * my_win_fdopen(File fd, const char *type) -{ - FILE *file; - int crt_fd; - int flags= 0; - - DBUG_ENTER("my_win_fdopen"); - - if(strchr(type,'a') != NULL) - flags= O_APPEND; - /* Convert OS file handle to CRT file descriptor and then call fdopen*/ - crt_fd= _open_osfhandle((intptr_t)my_get_osfhandle(fd), flags); - if(crt_fd < 0) - file= NULL; - else - file= fdopen(crt_fd, type); - DBUG_RETURN(file); -} - - -int my_win_fclose(FILE *file) -{ - File fd; - - DBUG_ENTER("my_win_close"); - fd= my_fileno(file); - if(fd < 0) - DBUG_RETURN(-1); - if(fclose(file) < 0) - DBUG_RETURN(-1); - invalidate_fd(fd); - DBUG_RETURN(0); -} - - - -/* - Quick and dirty my_fstat() implementation for Windows. - Use CRT fstat on temporarily allocated file descriptor. - Patch file size, because size that fstat returns is not - reliable (may be outdated) -*/ -int my_win_fstat(File fd, struct _stati64 *buf) -{ - int crt_fd; - int retval; - HANDLE hFile, hDup; - - DBUG_ENTER("my_win_fstat"); - - hFile= my_get_osfhandle(fd); - if(!DuplicateHandle( GetCurrentProcess(), hFile, GetCurrentProcess(), - &hDup ,0,FALSE,DUPLICATE_SAME_ACCESS)) - { - my_osmaperr(GetLastError()); - DBUG_RETURN(-1); - } - if ((crt_fd= _open_osfhandle((intptr_t)hDup,0)) < 0) - DBUG_RETURN(-1); - - retval= _fstati64(crt_fd, buf); - if(retval == 0) - { - /* File size returned by stat is not accurate (may be outdated), fix it*/ - GetFileSizeEx(hDup, (PLARGE_INTEGER) (&(buf->st_size))); - } - _close(crt_fd); - DBUG_RETURN(retval); -} - - - -int my_win_stat( const char *path, struct _stati64 *buf) -{ - DBUG_ENTER("my_win_stat"); - if(_stati64( path, buf) == 0) - { - /* File size returned by stat is not accurate (may be outdated), fix it*/ - WIN32_FILE_ATTRIBUTE_DATA data; - if (GetFileAttributesEx(path, GetFileExInfoStandard, &data)) - { - LARGE_INTEGER li; - li.LowPart= data.nFileSizeLow; - li.HighPart= data.nFileSizeHigh; - buf->st_size= li.QuadPart; - } - DBUG_RETURN(0); - } - DBUG_RETURN(-1); -} - - - -int my_win_fsync(File fd) -{ - DBUG_ENTER("my_win_fsync"); - if(FlushFileBuffers(my_get_osfhandle(fd))) - DBUG_RETURN(0); - my_osmaperr(GetLastError()); - DBUG_RETURN(-1); -} - - - -int my_win_dup(File fd) -{ - HANDLE hDup; - DBUG_ENTER("my_win_dup"); - if (DuplicateHandle(GetCurrentProcess(), my_get_osfhandle(fd), - GetCurrentProcess(), &hDup, 0, FALSE, DUPLICATE_SAME_ACCESS)) - { - DBUG_RETURN(my_open_osfhandle(hDup, my_get_open_flags(fd))); - } - my_osmaperr(GetLastError()); - DBUG_RETURN(-1); -} - -#endif /*_WIN32*/ diff --git a/externals/mysql/mysys/my_winthread.c b/externals/mysql/mysys/my_winthread.c deleted file mode 100644 index 9e8458b079..0000000000 --- a/externals/mysql/mysys/my_winthread.c +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/***************************************************************************** -** Simulation of posix threads calls for Windows -*****************************************************************************/ -#if defined (_WIN32) -/* SAFE_MUTEX will not work until the thread structure is up to date */ -#undef SAFE_MUTEX -#include "mysys_priv.h" -#include -#include - -static void install_sigabrt_handler(void); - -struct thread_start_parameter -{ - pthread_handler func; - void *arg; -}; - -/** - Adapter to @c pthread_mutex_trylock() - - @retval 0 Mutex was acquired - @retval EBUSY Mutex was already locked by a thread - */ -int -win_pthread_mutex_trylock(pthread_mutex_t *mutex) -{ - if (TryEnterCriticalSection(mutex)) - { - /* Don't allow recursive lock */ - if (mutex->RecursionCount > 1){ - LeaveCriticalSection(mutex); - return EBUSY; - } - return 0; - } - return EBUSY; -} - -static unsigned int __stdcall pthread_start(void *p) -{ - struct thread_start_parameter *par= (struct thread_start_parameter *)p; - pthread_handler func= par->func; - void *arg= par->arg; - free(p); - (*func)(arg); - return 0; -} - - -int pthread_create(pthread_t *thread_id, pthread_attr_t *attr, - pthread_handler func, void *param) -{ - uintptr_t handle; - struct thread_start_parameter *par; - unsigned int stack_size; - DBUG_ENTER("pthread_create"); - - par= (struct thread_start_parameter *)malloc(sizeof(*par)); - if (!par) - goto error_return; - - par->func= func; - par->arg= param; - stack_size= attr?attr->dwStackSize:0; - - handle= _beginthreadex(NULL, stack_size , pthread_start, par, 0, thread_id); - if (!handle) - goto error_return; - DBUG_PRINT("info", ("thread id=%u",*thread_id)); - - /* Do not need thread handle, close it */ - CloseHandle((HANDLE)handle); - DBUG_RETURN(0); - -error_return: - DBUG_PRINT("error", - ("Can't create thread to handle request (error %d)",errno)); - DBUG_RETURN(-1); -} - - -void pthread_exit(void *a) -{ - _endthreadex(0); -} - -int pthread_join(pthread_t thread, void **value_ptr) -{ - DWORD ret; - HANDLE handle; - - handle= OpenThread(SYNCHRONIZE, FALSE, thread); - if (!handle) - { - errno= EINVAL; - goto error_return; - } - - ret= WaitForSingleObject(handle, INFINITE); - - if(ret != WAIT_OBJECT_0) - { - errno= EINVAL; - goto error_return; - } - - CloseHandle(handle); - return 0; - -error_return: - if(handle) - CloseHandle(handle); - return -1; -} - -#endif diff --git a/externals/mysql/mysys/my_write.c b/externals/mysql/mysys/my_write.c deleted file mode 100644 index 3eac1364f4..0000000000 --- a/externals/mysql/mysys/my_write.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include - - - /* Write a chunk of bytes to a file */ - -size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags) -{ - size_t writtenbytes, written; - uint errors; - DBUG_ENTER("my_write"); - DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %d", - Filedes, Buffer, (ulong) Count, MyFlags)); - errors= 0; written= 0; - - /* The behavior of write(fd, buf, 0) is not portable */ - if (unlikely(!Count)) - DBUG_RETURN(0); - - for (;;) - { -#ifdef _WIN32 - writtenbytes= my_win_write(Filedes, Buffer, Count); -#else - writtenbytes= write(Filedes, Buffer, Count); -#endif - if (writtenbytes == Count) - break; - if (writtenbytes != (size_t) -1) - { /* Safeguard */ - written+= writtenbytes; - Buffer+= writtenbytes; - Count-= writtenbytes; - } - my_errno= errno; - DBUG_PRINT("error",("Write only %ld bytes, error: %d", - (long) writtenbytes, my_errno)); -#ifndef NO_BACKGROUND -#ifdef THREAD - if (my_thread_var->abort) - MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */ -#endif - if ((my_errno == ENOSPC || my_errno == EDQUOT) && - (MyFlags & MY_WAIT_IF_FULL)) - { - wait_for_free_space(my_filename(Filedes), errors); - errors++; - continue; - } - - if ((writtenbytes == 0 || writtenbytes == (size_t) -1)) - { - if (my_errno == EINTR) - { - DBUG_PRINT("debug", ("my_write() was interrupted and returned %ld", - (long) writtenbytes)); - continue; /* Interrupted */ - } - - if (!writtenbytes && !errors++) /* Retry once */ - { - /* We may come here if the file quota is exeeded */ - errno= EFBIG; /* Assume this is the error */ - continue; - } - } - else - continue; /* Retry */ -#endif - if (MyFlags & (MY_NABP | MY_FNABP)) - { - if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) - { - my_error(EE_WRITE, MYF(ME_BELL+ME_WAITTANG), - my_filename(Filedes),my_errno); - } - DBUG_RETURN(MY_FILE_ERROR); /* Error on read */ - } - else - break; /* Return bytes written */ - } - if (MyFlags & (MY_NABP | MY_FNABP)) - DBUG_RETURN(0); /* Want only errors */ - DBUG_RETURN(writtenbytes+written); -} /* my_write */ diff --git a/externals/mysql/mysys/mysys_priv.h b/externals/mysql/mysys/mysys_priv.h deleted file mode 100644 index 73f8f85f1b..0000000000 --- a/externals/mysql/mysys/mysys_priv.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include - -#ifdef USE_SYSTEM_WRAPPERS -#include "system_wrappers.h" -#endif - -#ifdef HAVE_GETRUSAGE -#include -#endif - -#ifdef THREAD -#include -extern pthread_mutex_t THR_LOCK_malloc, THR_LOCK_open, THR_LOCK_keycache; -extern pthread_mutex_t THR_LOCK_lock, THR_LOCK_isam, THR_LOCK_net; -extern pthread_mutex_t THR_LOCK_charset, THR_LOCK_time; -#else -#include -#endif - - -/* - EDQUOT is used only in 3 C files only in mysys/. If it does not exist on - system, we set it to some value which can never happen. -*/ -#ifndef EDQUOT -#define EDQUOT (-1) -#endif - -void my_error_unregister_all(void); - -#ifdef _WIN32 -/* my_winfile.c exports, should not be used outside mysys */ -extern File my_win_open(const char *path, int oflag); -extern int my_win_close(File fd); -extern size_t my_win_read(File fd, uchar *buffer, size_t count); -extern size_t my_win_write(File fd, const uchar *buffer, size_t count); -extern size_t my_win_pread(File fd, uchar *buffer, size_t count, - my_off_t offset); -extern size_t my_win_pwrite(File fd, const uchar *buffer, size_t count, - my_off_t offset); -extern my_off_t my_win_lseek(File fd, my_off_t pos, int whence); -extern int my_win_chsize(File fd, my_off_t newlength); -extern FILE* my_win_fopen(const char *filename, const char *type); -extern File my_win_fclose(FILE *file); -extern File my_win_fileno(FILE *file); -extern FILE* my_win_fdopen(File Filedes, const char *type); -extern int my_win_stat(const char *path, struct _stati64 *buf); -extern int my_win_fstat(File fd, struct _stati64 *buf); -extern int my_win_fsync(File fd); -extern File my_win_dup(File fd); -extern File my_win_sopen(const char *path, int oflag, int shflag, int perm); -extern File my_open_osfhandle(HANDLE handle, int oflag); -#endif - -void my_thread_destroy_mutex(void); -my_bool my_wait_for_other_threads_to_die(uint number_of_threads); diff --git a/externals/mysql/mysys/ptr_cmp.c b/externals/mysql/mysys/ptr_cmp.c deleted file mode 100644 index 24ab6a1ea9..0000000000 --- a/externals/mysql/mysys/ptr_cmp.c +++ /dev/null @@ -1,192 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - get_ptr_compare(len) returns a pointer to a optimal byte-compare function - for a array of stringpointer where all strings have size len. - The bytes are compare as unsigned chars. - */ - -#include "mysys_priv.h" -#include - -static int ptr_compare(size_t *compare_length, uchar **a, uchar **b); -static int ptr_compare_0(size_t *compare_length, uchar **a, uchar **b); -static int ptr_compare_1(size_t *compare_length, uchar **a, uchar **b); -static int ptr_compare_2(size_t *compare_length, uchar **a, uchar **b); -static int ptr_compare_3(size_t *compare_length, uchar **a, uchar **b); - - /* Get a pointer to a optimal byte-compare function for a given size */ - -qsort2_cmp get_ptr_compare (size_t size) -{ - if (size < 4) - return (qsort2_cmp) ptr_compare; - switch (size & 3) { - case 0: return (qsort2_cmp) ptr_compare_0; - case 1: return (qsort2_cmp) ptr_compare_1; - case 2: return (qsort2_cmp) ptr_compare_2; - case 3: return (qsort2_cmp) ptr_compare_3; - } - return 0; /* Impossible */ -} - - - /* - Compare to keys to see witch is smaller. - Loop unrolled to make it quick !! - */ - -#define cmp(N) if (first[N] != last[N]) return (int) first[N] - (int) last[N] - -static int ptr_compare(size_t *compare_length, uchar **a, uchar **b) -{ - reg3 int length= *compare_length; - reg1 uchar *first,*last; - - first= *a; last= *b; - while (--length) - { - if (*first++ != *last++) - return (int) first[-1] - (int) last[-1]; - } - return (int) first[0] - (int) last[0]; -} - - -static int ptr_compare_0(size_t *compare_length,uchar **a, uchar **b) -{ - reg3 int length= *compare_length; - reg1 uchar *first,*last; - - first= *a; last= *b; - loop: - cmp(0); - cmp(1); - cmp(2); - cmp(3); - if ((length-=4)) - { - first+=4; - last+=4; - goto loop; - } - return (0); -} - - -static int ptr_compare_1(size_t *compare_length,uchar **a, uchar **b) -{ - reg3 int length= *compare_length-1; - reg1 uchar *first,*last; - - first= *a+1; last= *b+1; - cmp(-1); - loop: - cmp(0); - cmp(1); - cmp(2); - cmp(3); - if ((length-=4)) - { - first+=4; - last+=4; - goto loop; - } - return (0); -} - -static int ptr_compare_2(size_t *compare_length,uchar **a, uchar **b) -{ - reg3 int length= *compare_length-2; - reg1 uchar *first,*last; - - first= *a +2 ; last= *b +2; - cmp(-2); - cmp(-1); - loop: - cmp(0); - cmp(1); - cmp(2); - cmp(3); - if ((length-=4)) - { - first+=4; - last+=4; - goto loop; - } - return (0); -} - -static int ptr_compare_3(size_t *compare_length,uchar **a, uchar **b) -{ - reg3 int length= *compare_length-3; - reg1 uchar *first,*last; - - first= *a +3 ; last= *b +3; - cmp(-3); - cmp(-2); - cmp(-1); - loop: - cmp(0); - cmp(1); - cmp(2); - cmp(3); - if ((length-=4)) - { - first+=4; - last+=4; - goto loop; - } - return (0); -} - -void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos) -{ - switch (pack_length) { -#if SIZEOF_OFF_T > 4 - case 8: mi_int8store(buff,pos); break; - case 7: mi_int7store(buff,pos); break; - case 6: mi_int6store(buff,pos); break; - case 5: mi_int5store(buff,pos); break; -#endif - case 4: mi_int4store(buff,pos); break; - case 3: mi_int3store(buff,pos); break; - case 2: mi_int2store(buff,pos); break; - case 1: buff[0]= (uchar) pos; break; - default: DBUG_ASSERT(0); - } - return; -} - -my_off_t my_get_ptr(uchar *ptr, size_t pack_length) -{ - my_off_t pos; - switch (pack_length) { -#if SIZEOF_OFF_T > 4 - case 8: pos= (my_off_t) mi_uint8korr(ptr); break; - case 7: pos= (my_off_t) mi_uint7korr(ptr); break; - case 6: pos= (my_off_t) mi_uint6korr(ptr); break; - case 5: pos= (my_off_t) mi_uint5korr(ptr); break; -#endif - case 4: pos= (my_off_t) mi_uint4korr(ptr); break; - case 3: pos= (my_off_t) mi_uint3korr(ptr); break; - case 2: pos= (my_off_t) mi_uint2korr(ptr); break; - case 1: pos= (my_off_t) *(uchar*) ptr; break; - default: DBUG_ASSERT(0); return 0; - } - return pos; -} - diff --git a/externals/mysql/mysys/queues.c b/externals/mysql/mysys/queues.c deleted file mode 100644 index 7ca978f185..0000000000 --- a/externals/mysql/mysys/queues.c +++ /dev/null @@ -1,690 +0,0 @@ -/* Copyright (C) 2000, 2005 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Code for generell handling of priority Queues. - Implemention of queues from "Algoritms in C" by Robert Sedgewick. - An optimisation of _downheap suggested in Exercise 7.51 in "Data - Structures & Algorithms in C++" by Mark Allen Weiss, Second Edition - was implemented by Mikael Ronstrom 2005. Also the O(N) algorithm - of queue_fix was implemented. -*/ - -#include "mysys_priv.h" -#include "mysys_err.h" -#include - - -/* - Init queue - - SYNOPSIS - init_queue() - queue Queue to initialise - max_elements Max elements that will be put in queue - offset_to_key Offset to key in element stored in queue - Used when sending pointers to compare function - max_at_top Set to 1 if you want biggest element on top. - compare Compare function for elements, takes 3 arguments. - first_cmp_arg First argument to compare function - - NOTES - Will allocate max_element pointers for queue array - - RETURN - 0 ok - 1 Could not allocate memory -*/ - -int init_queue(QUEUE *queue, uint max_elements, uint offset_to_key, - pbool max_at_top, int (*compare) (void *, uchar *, uchar *), - void *first_cmp_arg) -{ - DBUG_ENTER("init_queue"); - if ((queue->root= (uchar **) my_malloc((max_elements+1)*sizeof(void*), - MYF(MY_WME))) == 0) - DBUG_RETURN(1); - queue->elements=0; - queue->compare=compare; - queue->first_cmp_arg=first_cmp_arg; - queue->max_elements=max_elements; - queue->offset_to_key=offset_to_key; - queue_set_max_at_top(queue, max_at_top); - DBUG_RETURN(0); -} - - - -/* - Init queue, uses init_queue internally for init work but also accepts - auto_extent as parameter - - SYNOPSIS - init_queue_ex() - queue Queue to initialise - max_elements Max elements that will be put in queue - offset_to_key Offset to key in element stored in queue - Used when sending pointers to compare function - max_at_top Set to 1 if you want biggest element on top. - compare Compare function for elements, takes 3 arguments. - first_cmp_arg First argument to compare function - auto_extent When the queue is full and there is insert operation - extend the queue. - - NOTES - Will allocate max_element pointers for queue array - - RETURN - 0 ok - 1 Could not allocate memory -*/ - -int init_queue_ex(QUEUE *queue, uint max_elements, uint offset_to_key, - pbool max_at_top, int (*compare) (void *, uchar *, uchar *), - void *first_cmp_arg, uint auto_extent) -{ - int ret; - DBUG_ENTER("init_queue_ex"); - - if ((ret= init_queue(queue, max_elements, offset_to_key, max_at_top, compare, - first_cmp_arg))) - DBUG_RETURN(ret); - - queue->auto_extent= auto_extent; - DBUG_RETURN(0); -} - -/* - Reinitialize queue for other usage - - SYNOPSIS - reinit_queue() - queue Queue to initialise - max_elements Max elements that will be put in queue - offset_to_key Offset to key in element stored in queue - Used when sending pointers to compare function - max_at_top Set to 1 if you want biggest element on top. - compare Compare function for elements, takes 3 arguments. - first_cmp_arg First argument to compare function - - NOTES - This will delete all elements from the queue. If you don't want this, - use resize_queue() instead. - - RETURN - 0 ok - EE_OUTOFMEMORY Wrong max_elements -*/ - -int reinit_queue(QUEUE *queue, uint max_elements, uint offset_to_key, - pbool max_at_top, int (*compare) (void *, uchar *, uchar *), - void *first_cmp_arg) -{ - DBUG_ENTER("reinit_queue"); - queue->elements=0; - queue->compare=compare; - queue->first_cmp_arg=first_cmp_arg; - queue->offset_to_key=offset_to_key; - queue_set_max_at_top(queue, max_at_top); - resize_queue(queue, max_elements); - DBUG_RETURN(0); -} - - -/* - Resize queue - - SYNOPSIS - resize_queue() - queue Queue - max_elements New max size for queue - - NOTES - If you resize queue to be less than the elements you have in it, - the extra elements will be deleted - - RETURN - 0 ok - 1 Error. In this case the queue is unchanged -*/ - -int resize_queue(QUEUE *queue, uint max_elements) -{ - uchar **new_root; - DBUG_ENTER("resize_queue"); - if (queue->max_elements == max_elements) - DBUG_RETURN(0); - if ((new_root= (uchar **) my_realloc((void *)queue->root, - (max_elements+1)*sizeof(void*), - MYF(MY_WME))) == 0) - DBUG_RETURN(1); - set_if_smaller(queue->elements, max_elements); - queue->max_elements= max_elements; - queue->root= new_root; - DBUG_RETURN(0); -} - - -/* - Delete queue - - SYNOPSIS - delete_queue() - queue Queue to delete - - IMPLEMENTATION - Just free allocated memory. - - NOTES - Can be called safely multiple times -*/ - -void delete_queue(QUEUE *queue) -{ - DBUG_ENTER("delete_queue"); - if (queue->root) - { - my_free((uchar*) queue->root,MYF(0)); - queue->root=0; - } - DBUG_VOID_RETURN; -} - - - /* Code for insert, search and delete of elements */ - -void queue_insert(register QUEUE *queue, uchar *element) -{ - reg2 uint idx, next; - DBUG_ASSERT(queue->elements < queue->max_elements); - queue->root[0]= element; - idx= ++queue->elements; - /* max_at_top swaps the comparison if we want to order by desc */ - while ((queue->compare(queue->first_cmp_arg, - element + queue->offset_to_key, - queue->root[(next= idx >> 1)] + - queue->offset_to_key) * queue->max_at_top) < 0) - { - queue->root[idx]= queue->root[next]; - idx= next; - } - queue->root[idx]= element; -} - -/* - Does safe insert. If no more space left on the queue resize it. - Return codes: - 0 - OK - 1 - Cannot allocate more memory - 2 - auto_extend is 0, the operation would - -*/ - -int queue_insert_safe(register QUEUE *queue, uchar *element) -{ - - if (queue->elements == queue->max_elements) - { - if (!queue->auto_extent) - return 2; - else if (resize_queue(queue, queue->max_elements + queue->auto_extent)) - return 1; - } - - queue_insert(queue, element); - return 0; -} - - - /* Remove item from queue */ - /* Returns pointer to removed element */ - -uchar *queue_remove(register QUEUE *queue, uint idx) -{ - uchar *element; - DBUG_ASSERT(idx < queue->max_elements); - element= queue->root[++idx]; /* Intern index starts from 1 */ - queue->root[idx]= queue->root[queue->elements--]; - _downheap(queue, idx); - return element; -} - - /* Fix when element on top has been replaced */ - -#ifndef queue_replaced -void queue_replaced(QUEUE *queue) -{ - _downheap(queue,1); -} -#endif - -#ifndef OLD_VERSION - -void _downheap(register QUEUE *queue, uint idx) -{ - uchar *element; - uint elements,half_queue,offset_to_key, next_index; - my_bool first= TRUE; - uint start_idx= idx; - - offset_to_key=queue->offset_to_key; - element=queue->root[idx]; - half_queue=(elements=queue->elements) >> 1; - - while (idx <= half_queue) - { - next_index=idx+idx; - if (next_index < elements && - (queue->compare(queue->first_cmp_arg, - queue->root[next_index]+offset_to_key, - queue->root[next_index+1]+offset_to_key) * - queue->max_at_top) > 0) - next_index++; - if (first && - (((queue->compare(queue->first_cmp_arg, - queue->root[next_index]+offset_to_key, - element+offset_to_key) * queue->max_at_top) >= 0))) - { - queue->root[idx]= element; - return; - } - queue->root[idx]=queue->root[next_index]; - idx=next_index; - first= FALSE; - } - - next_index= idx >> 1; - while (next_index > start_idx) - { - if ((queue->compare(queue->first_cmp_arg, - queue->root[next_index]+offset_to_key, - element+offset_to_key) * - queue->max_at_top) < 0) - break; - queue->root[idx]=queue->root[next_index]; - idx=next_index; - next_index= idx >> 1; - } - queue->root[idx]=element; -} - -#else - /* - The old _downheap version is kept for comparisons with the benchmark - suit or new benchmarks anyone wants to run for comparisons. - */ - /* Fix heap when index have changed */ -void _downheap(register QUEUE *queue, uint idx) -{ - uchar *element; - uint elements,half_queue,next_index,offset_to_key; - - offset_to_key=queue->offset_to_key; - element=queue->root[idx]; - half_queue=(elements=queue->elements) >> 1; - - while (idx <= half_queue) - { - next_index=idx+idx; - if (next_index < elements && - (queue->compare(queue->first_cmp_arg, - queue->root[next_index]+offset_to_key, - queue->root[next_index+1]+offset_to_key) * - queue->max_at_top) > 0) - next_index++; - if ((queue->compare(queue->first_cmp_arg, - queue->root[next_index]+offset_to_key, - element+offset_to_key) * queue->max_at_top) >= 0) - break; - queue->root[idx]=queue->root[next_index]; - idx=next_index; - } - queue->root[idx]=element; -} - - -#endif - -/* - Fix heap when every element was changed. -*/ - -void queue_fix(QUEUE *queue) -{ - uint i; - for (i= queue->elements >> 1; i > 0; i--) - _downheap(queue, i); -} - -#ifdef MAIN - /* - A test program for the priority queue implementation. - It can also be used to benchmark changes of the implementation - Build by doing the following in the directory mysys - make test_priority_queue - ./test_priority_queue - - Written by Mikael Ronström, 2005 - */ - -static uint num_array[1025]; -static uint tot_no_parts= 0; -static uint tot_no_loops= 0; -static uint expected_part= 0; -static uint expected_num= 0; -static my_bool max_ind= 0; -static my_bool fix_used= 0; -static ulonglong start_time= 0; - -static my_bool is_divisible_by(uint num, uint divisor) -{ - uint quotient= num / divisor; - if (quotient * divisor == num) - return TRUE; - return FALSE; -} - -void calculate_next() -{ - uint part= expected_part, num= expected_num; - uint no_parts= tot_no_parts; - if (max_ind) - { - do - { - while (++part <= no_parts) - { - if (is_divisible_by(num, part) && - (num <= ((1 << 21) + part))) - { - expected_part= part; - expected_num= num; - return; - } - } - part= 0; - } while (--num); - } - else - { - do - { - while (--part > 0) - { - if (is_divisible_by(num, part)) - { - expected_part= part; - expected_num= num; - return; - } - } - part= no_parts + 1; - } while (++num); - } -} - -void calculate_end_next(uint part) -{ - uint no_parts= tot_no_parts, num; - num_array[part]= 0; - if (max_ind) - { - expected_num= 0; - for (part= no_parts; part > 0 ; part--) - { - if (num_array[part]) - { - num= num_array[part] & 0x3FFFFF; - if (num >= expected_num) - { - expected_num= num; - expected_part= part; - } - } - } - if (expected_num == 0) - expected_part= 0; - } - else - { - expected_num= 0xFFFFFFFF; - for (part= 1; part <= no_parts; part++) - { - if (num_array[part]) - { - num= num_array[part] & 0x3FFFFF; - if (num <= expected_num) - { - expected_num= num; - expected_part= part; - } - } - } - if (expected_num == 0xFFFFFFFF) - expected_part= 0; - } - return; -} -static int test_compare(void *null_arg, uchar *a, uchar *b) -{ - uint a_num= (*(uint*)a) & 0x3FFFFF; - uint b_num= (*(uint*)b) & 0x3FFFFF; - uint a_part, b_part; - if (a_num > b_num) - return +1; - if (a_num < b_num) - return -1; - a_part= (*(uint*)a) >> 22; - b_part= (*(uint*)b) >> 22; - if (a_part < b_part) - return +1; - if (a_part > b_part) - return -1; - return 0; -} - -my_bool check_num(uint num_part) -{ - uint part= num_part >> 22; - uint num= num_part & 0x3FFFFF; - if (part == expected_part) - if (num == expected_num) - return FALSE; - printf("Expect part %u Expect num 0x%x got part %u num 0x%x max_ind %u fix_used %u \n", - expected_part, expected_num, part, num, max_ind, fix_used); - return TRUE; -} - - -void perform_insert(QUEUE *queue) -{ - uint i= 1, no_parts= tot_no_parts; - uint backward_start= 0; - - expected_part= 1; - expected_num= 1; - - if (max_ind) - backward_start= 1 << 21; - - do - { - uint num= (i + backward_start); - if (max_ind) - { - while (!is_divisible_by(num, i)) - num--; - if (max_ind && (num > expected_num || - (num == expected_num && i < expected_part))) - { - expected_num= num; - expected_part= i; - } - } - num_array[i]= num + (i << 22); - if (fix_used) - queue_element(queue, i-1)= (uchar*)&num_array[i]; - else - queue_insert(queue, (uchar*)&num_array[i]); - } while (++i <= no_parts); - if (fix_used) - { - queue->elements= no_parts; - queue_fix(queue); - } -} - -my_bool perform_ins_del(QUEUE *queue, my_bool max_ind) -{ - uint i= 0, no_loops= tot_no_loops, j= tot_no_parts; - do - { - uint num_part= *(uint*)queue_top(queue); - uint part= num_part >> 22; - if (check_num(num_part)) - return TRUE; - if (j++ >= no_loops) - { - calculate_end_next(part); - queue_remove(queue, (uint) 0); - } - else - { - calculate_next(); - if (max_ind) - num_array[part]-= part; - else - num_array[part]+= part; - queue_top(queue)= (uchar*)&num_array[part]; - queue_replaced(queue); - } - } while (++i < no_loops); - return FALSE; -} - -my_bool do_test(uint no_parts, uint l_max_ind, my_bool l_fix_used) -{ - QUEUE queue; - my_bool result; - max_ind= l_max_ind; - fix_used= l_fix_used; - init_queue(&queue, no_parts, 0, max_ind, test_compare, NULL); - tot_no_parts= no_parts; - tot_no_loops= 1024; - perform_insert(&queue); - if ((result= perform_ins_del(&queue, max_ind))) - delete_queue(&queue); - if (result) - { - printf("Error\n"); - return TRUE; - } - return FALSE; -} - -static void start_measurement() -{ - start_time= my_getsystime(); -} - -static void stop_measurement() -{ - ulonglong stop_time= my_getsystime(); - uint time_in_micros; - stop_time-= start_time; - stop_time/= 10; /* Convert to microseconds */ - time_in_micros= (uint)stop_time; - printf("Time expired is %u microseconds \n", time_in_micros); -} - -static void benchmark_test() -{ - QUEUE queue_real; - QUEUE *queue= &queue_real; - uint i, add; - fix_used= TRUE; - max_ind= FALSE; - tot_no_parts= 1024; - init_queue(queue, tot_no_parts, 0, max_ind, test_compare, NULL); - /* - First benchmark whether queue_fix is faster than using queue_insert - for sizes of 16 partitions. - */ - for (tot_no_parts= 2, add=2; tot_no_parts < 128; - tot_no_parts+= add, add++) - { - printf("Start benchmark queue_fix, tot_no_parts= %u \n", tot_no_parts); - start_measurement(); - for (i= 0; i < 128; i++) - { - perform_insert(queue); - queue_remove_all(queue); - } - stop_measurement(); - - fix_used= FALSE; - printf("Start benchmark queue_insert\n"); - start_measurement(); - for (i= 0; i < 128; i++) - { - perform_insert(queue); - queue_remove_all(queue); - } - stop_measurement(); - } - /* - Now benchmark insertion and deletion of 16400 elements. - Used in consecutive runs this shows whether the optimised _downheap - is faster than the standard implementation. - */ - printf("Start benchmarking _downheap \n"); - start_measurement(); - perform_insert(queue); - for (i= 0; i < 65536; i++) - { - uint num, part; - num= *(uint*)queue_top(queue); - num+= 16; - part= num >> 22; - num_array[part]= num; - queue_top(queue)= (uchar*)&num_array[part]; - queue_replaced(queue); - } - for (i= 0; i < 16; i++) - queue_remove(queue, (uint) 0); - queue_remove_all(queue); - stop_measurement(); -} - -int main() -{ - int i, add= 1; - for (i= 1; i < 1024; i+=add, add++) - { - printf("Start test for priority queue of size %u\n", i); - if (do_test(i, 0, 1)) - return -1; - if (do_test(i, 1, 1)) - return -1; - if (do_test(i, 0, 0)) - return -1; - if (do_test(i, 1, 0)) - return -1; - } - benchmark_test(); - printf("OK\n"); - return 0; -} -#endif diff --git a/externals/mysql/mysys/rijndael.c b/externals/mysql/mysys/rijndael.c deleted file mode 100644 index 539d94d28c..0000000000 --- a/externals/mysql/mysys/rijndael.c +++ /dev/null @@ -1,1395 +0,0 @@ -/* Copyright (C) 2002, 2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -/* - Based on version 3.0 (December 2000) - - Optimised ANSI C code for the Rijndael cipher (now AES) - - author Vincent Rijmen - author Antoon Bosselaers - author Paulo Barreto -*/ - -#include -#include "mysys/rijndael.h" - -/* - Define the following to use fastest and much larger code (~10K extra code) - #define FULL_UNROLL -*/ - - -#ifdef NOT_USED -Te0[x] = S [x].[02, 01, 01, 03]; -Te1[x] = S [x].[03, 02, 01, 01]; -Te2[x] = S [x].[01, 03, 02, 01]; -Te3[x] = S [x].[01, 01, 03, 02]; -Te4[x] = S [x].[01, 01, 01, 01]; - -Td0[x] = Si[x].[0e, 09, 0d, 0b]; -Td1[x] = Si[x].[0b, 0e, 09, 0d]; -Td2[x] = Si[x].[0d, 0b, 0e, 09]; -Td3[x] = Si[x].[09, 0d, 0b, 0e]; -Td4[x] = Si[x].[01, 01, 01, 01]; -#endif - - -static const uint32 Te0[256]= -{ - 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, - 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, - 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, - 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, - 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, - 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, - 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, - 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, - 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, - 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, - 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, - 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, - 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, - 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, - 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, - 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, - 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, - 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, - 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, - 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, - 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, - 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, - 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, - 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, - 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, - 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, - 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, - 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, - 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, - 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, - 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, - 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, - 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, - 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, - 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, - 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, - 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, - 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, - 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, - 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, - 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, - 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, - 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, - 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, - 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, - 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, - 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, - 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, - 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, - 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, - 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, - 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, - 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, - 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, - 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, - 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, - 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, - 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, - 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, - 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, - 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, - 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, - 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, - 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, -}; - -static const uint32 Te1[256]= -{ - 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, - 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, - 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, - 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, - 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, - 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, - 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, - 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, - 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, - 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, - 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, - 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, - 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, - 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, - 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, - 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, - 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, - 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, - 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, - 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, - 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, - 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, - 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, - 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, - 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, - 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, - 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, - 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, - 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, - 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, - 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, - 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, - 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, - 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, - 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, - 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, - 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, - 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, - 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, - 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, - 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, - 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, - 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, - 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, - 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, - 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, - 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, - 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, - 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, - 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, - 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, - 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, - 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, - 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, - 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, - 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, - 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, - 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, - 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, - 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, - 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, - 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, - 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, - 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, -}; - -static const uint32 Te2[256]= -{ - 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, - 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, - 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, - 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, - 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, - 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, - 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, - 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, - 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, - 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, - 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, - 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, - 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, - 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, - 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, - 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, - 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, - 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, - 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, - 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, - 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, - 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, - 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, - 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, - 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, - 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, - 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, - 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, - 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, - 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, - 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, - 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, - 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, - 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, - 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, - 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, - 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, - 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, - 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, - 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, - 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, - 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, - 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, - 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, - 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, - 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, - 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, - 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, - 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, - 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, - 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, - 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, - 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, - 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, - 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, - 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, - 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, - 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, - 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, - 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, - 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, - 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, - 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, - 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, -}; - -static const uint32 Te3[256]= -{ - 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, - 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, - 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, - 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, - 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, - 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, - 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, - 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, - 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, - 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, - 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, - 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, - 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, - 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, - 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, - 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, - 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, - 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, - 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, - 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, - 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, - 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, - 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, - 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, - 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, - 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, - 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, - 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, - 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, - 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, - 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, - 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, - 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, - 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, - 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, - 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, - 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, - 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, - 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, - 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, - 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, - 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, - 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, - 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, - 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, - 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, - 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, - 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, - 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, - 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, - 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, - 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, - 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, - 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, - 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, - 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, - 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, - 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, - 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, - 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, - 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, - 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, - 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, - 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, -}; - -static const uint32 Te4[256]= -{ - 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, - 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, - 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, - 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, - 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, - 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, - 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, - 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, - 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, - 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, - 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, - 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, - 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, - 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, - 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, - 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, - 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, - 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, - 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, - 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, - 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, - 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, - 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, - 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, - 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, - 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, - 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, - 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, - 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, - 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, - 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, - 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, - 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, - 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, - 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, - 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, - 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, - 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, - 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, - 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, - 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, - 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, - 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, - 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, - 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, - 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, - 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, - 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, - 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, - 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, - 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, - 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, - 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, - 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, - 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, - 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, - 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, - 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, - 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, - 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, - 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, - 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, - 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, - 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, -}; - -static const uint32 Td0[256]= -{ - 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, - 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, - 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, - 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, - 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, - 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, - 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, - 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, - 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, - 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, - 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, - 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, - 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, - 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, - 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, - 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, - 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, - 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, - 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, - 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, - 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, - 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, - 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, - 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, - 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, - 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, - 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, - 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, - 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, - 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, - 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, - 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, - 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, - 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, - 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, - 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, - 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, - 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, - 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, - 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, - 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, - 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, - 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, - 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, - 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, - 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, - 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, - 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, - 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, - 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, - 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, - 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, - 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, - 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, - 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, - 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, - 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, - 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, - 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, - 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, - 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, - 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, - 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, - 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, -}; - -static const uint32 Td1[256]= -{ - 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, - 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, - 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, - 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, - 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, - 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, - 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, - 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, - 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, - 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, - 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, - 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, - 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, - 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, - 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, - 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, - 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, - 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, - 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, - 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, - 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, - 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, - 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, - 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, - 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, - 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, - 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, - 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, - 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, - 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, - 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, - 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, - 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, - 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, - 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, - 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, - 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, - 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, - 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, - 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, - 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, - 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, - 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, - 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, - 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, - 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, - 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, - 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, - 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, - 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, - 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, - 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, - 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, - 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, - 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, - 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, - 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, - 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, - 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, - 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, - 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, - 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, - 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, - 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, -}; - -static const uint32 Td2[256]= -{ - 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, - 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, - 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, - 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, - 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, - 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, - 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, - 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, - 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, - 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, - 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, - 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, - 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, - 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, - 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, - 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, - 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, - 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, - 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, - 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, - - 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, - 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, - 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, - 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, - 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, - 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, - 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, - 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, - 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, - 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, - 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, - 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, - 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, - 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, - 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, - 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, - 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, - 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, - 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, - 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, - 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, - 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, - 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, - 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, - 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, - 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, - 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, - 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, - 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, - 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, - 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, - 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, - 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, - 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, - 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, - 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, - 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, - 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, - 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, - 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, - 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, - 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, - 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, - 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, -}; - -static const uint32 Td3[256]= -{ - 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, - 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, - 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, - 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, - 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, - 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, - 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, - 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, - 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, - 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, - 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, - 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, - 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, - 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, - 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, - 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, - 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, - 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, - 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, - 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, - 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, - 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, - 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, - 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, - 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, - 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, - 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, - 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, - 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, - 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, - 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, - 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, - 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, - 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, - 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, - 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, - 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, - 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, - 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, - 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, - 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, - 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, - 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, - 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, - 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, - 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, - 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, - 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, - 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, - 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, - 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, - 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, - 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, - 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, - 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, - 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, - 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, - 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, - 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, - 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, - 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, - 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, - 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, - 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, -}; - -static const uint32 Td4[256]= -{ - 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U, - 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U, - 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU, - 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU, - 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U, - 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U, - 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U, - 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU, - 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U, - 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU, - 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU, - 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU, - 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U, - 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U, - 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U, - 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U, - 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U, - 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U, - 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU, - 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U, - 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U, - 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU, - 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U, - 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U, - 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U, - 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU, - 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U, - 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U, - 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU, - 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U, - 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U, - 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU, - 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U, - 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU, - 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU, - 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U, - 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U, - 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U, - 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U, - 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU, - 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U, - 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U, - 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU, - 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU, - 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU, - 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U, - 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU, - 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U, - 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U, - 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U, - 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U, - 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU, - 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U, - 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU, - 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU, - 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU, - 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU, - 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U, - 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU, - 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U, - 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU, - 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U, - 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, - 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, -}; - - -/* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ -static const uint32 rcon[]= -{ - 0x01000000, 0x02000000, 0x04000000, 0x08000000, - 0x10000000, 0x20000000, 0x40000000, 0x80000000, - 0x1B000000, 0x36000000, -}; - -#if defined(_MSC_VER) && defined(__i386__) - -#define RJ_SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) -#define GETuint32(p) RJ_SWAP(*((uint32 *)(p))) -#define PUTuint32(ct, st) { *((uint32 *)(ct)) = RJ_SWAP((st)); } - -#else - -#define GETuint32(pt) (((uint32)(pt)[0] << 24) ^ ((uint32)(pt)[1] << 16)\ - ^ ((uint32)(pt)[2] << 8) ^ ((uint32)(pt)[3])) -#define PUTuint32(ct, st) { (ct)[0] = (uint8)((st) >> 24); (ct)[1]\ -= (uint8)((st) >> 16); (ct)[2] = (uint8)((st) >> 8); (ct)[3] = (uint8)(st); } - -#endif /* defined(_MSC_VER) && defined(__i386__) */ - - -/* - Expand the cipher key into the encryption key schedule. - - RETURN - The number of rounds for the given cipher key size. -*/ - -int rijndaelKeySetupEnc(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[], - int keyBits) -{ - int i = 0; - uint32 temp; - - rk[0] = GETuint32(cipherKey ); - rk[1] = GETuint32(cipherKey + 4); - rk[2] = GETuint32(cipherKey + 8); - rk[3] = GETuint32(cipherKey + 12); - if (keyBits == 128) - { - for (;;) - { - temp = rk[3]; - rk[4] = (rk[0] ^ - (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ - (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ - (Te4[(temp ) & 0xff] & 0x0000ff00) ^ - (Te4[(temp >> 24) ] & 0x000000ff) ^ - rcon[i]); - rk[5] = rk[1] ^ rk[4]; - rk[6] = rk[2] ^ rk[5]; - rk[7] = rk[3] ^ rk[6]; - if (++i == 10) - return 10; - rk += 4; - } - } - rk[4] = GETuint32(cipherKey + 16); - rk[5] = GETuint32(cipherKey + 20); - if (keyBits == 192) - { - for (;;) - { - temp = rk[ 5]; - rk[ 6] = (rk[ 0] ^ - (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ - (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ - (Te4[(temp ) & 0xff] & 0x0000ff00) ^ - (Te4[(temp >> 24) ] & 0x000000ff) ^ - rcon[i]); - rk[ 7] = rk[ 1] ^ rk[ 6]; - rk[ 8] = rk[ 2] ^ rk[ 7]; - rk[ 9] = rk[ 3] ^ rk[ 8]; - if (++i == 8) - { - return 12; - } - rk[10] = rk[ 4] ^ rk[ 9]; - rk[11] = rk[ 5] ^ rk[10]; - rk += 6; - } - } - rk[6] = GETuint32(cipherKey + 24); - rk[7] = GETuint32(cipherKey + 28); - if (keyBits == 256) - { - for (;;) - { - temp = rk[ 7]; - rk[ 8] = (rk[ 0] ^ - (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ - (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ - (Te4[(temp ) & 0xff] & 0x0000ff00) ^ - (Te4[(temp >> 24) ] & 0x000000ff) ^ - rcon[i]); - rk[ 9] = rk[ 1] ^ rk[ 8]; - rk[10] = rk[ 2] ^ rk[ 9]; - rk[11] = rk[ 3] ^ rk[10]; - if (++i == 7) - { - return 14; - } - temp = rk[11]; - rk[12] = (rk[ 4] ^ - (Te4[(temp >> 24) ] & 0xff000000) ^ - (Te4[(temp >> 16) & 0xff] & 0x00ff0000) ^ - (Te4[(temp >> 8) & 0xff] & 0x0000ff00) ^ - (Te4[(temp ) & 0xff] & 0x000000ff)); - rk[13] = rk[ 5] ^ rk[12]; - rk[14] = rk[ 6] ^ rk[13]; - rk[15] = rk[ 7] ^ rk[14]; - rk += 8; - } - } - return 0; -} - - -/* - Expand the cipher key into the decryption key schedule. - - RETURN - The number of rounds for the given cipher key size. -*/ - -int rijndaelKeySetupDec(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[], - int keyBits) -{ - int nr, i, j; - uint32 temp; - - /* expand the cipher key: */ - nr = rijndaelKeySetupEnc(rk, cipherKey, keyBits); - /* invert the order of the round keys: */ - for (i = 0, j = 4*nr; i < j; i += 4, j -= 4) - { - temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp; - temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; - temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; - temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; - } - /* - Apply the inverse MixColumn transform to all round keys but the first - and the last: - */ - for (i = 1; i < nr; i++) - { - rk += 4; - - rk[0]= ( - Td0[Te4[(rk[0] >> 24) ] & 0xff] ^ - Td1[Te4[(rk[0] >> 16) & 0xff] & 0xff] ^ - Td2[Te4[(rk[0] >> 8) & 0xff] & 0xff] ^ - Td3[Te4[(rk[0] ) & 0xff] & 0xff]); - - rk[1]= (Td0[Te4[(rk[1] >> 24) ] & 0xff] ^ - Td1[Te4[(rk[1] >> 16) & 0xff] & 0xff] ^ - Td2[Te4[(rk[1] >> 8) & 0xff] & 0xff] ^ - Td3[Te4[(rk[1] ) & 0xff] & 0xff]); - - rk[2]= (Td0[Te4[(rk[2] >> 24) ] & 0xff] ^ - Td1[Te4[(rk[2] >> 16) & 0xff] & 0xff] ^ - Td2[Te4[(rk[2] >> 8) & 0xff] & 0xff] ^ - Td3[Te4[(rk[2] ) & 0xff] & 0xff]); - - rk[3]= (Td0[Te4[(rk[3] >> 24) ] & 0xff] ^ - Td1[Te4[(rk[3] >> 16) & 0xff] & 0xff] ^ - Td2[Te4[(rk[3] >> 8) & 0xff] & 0xff] ^ - Td3[Te4[(rk[3] ) & 0xff] & 0xff]); - } - return nr; -} - - -void rijndaelEncrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr, - const uint8 pt[16], uint8 ct[16]) -{ - uint32 s0, s1, s2, s3, t0, t1, t2, t3; -#ifndef FULL_UNROLL - int r; -#endif /* FULL_UNROLL */ - - /* map byte array block to cipher state and add initial round key: */ - s0 = GETuint32(pt ) ^ rk[0]; - s1 = GETuint32(pt + 4) ^ rk[1]; - s2 = GETuint32(pt + 8) ^ rk[2]; - s3 = GETuint32(pt + 12) ^ rk[3]; - -#ifdef FULL_UNROLL - /* round 1: */ - t0= (Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] - ^ Te3[s3 & 0xff] ^ rk[ 4]); - t1= (Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] - ^ Te3[s0 & 0xff] ^ rk[ 5]); - t2= (Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] - ^ Te3[s1 & 0xff] ^ rk[ 6]); - t3= (Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] - ^ Te3[s2 & 0xff] ^ rk[ 7]); - - /* round 2: */ - s0= (Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] - ^ Te3[t3 & 0xff] ^ rk[ 8]); - s1= (Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] - ^ Te3[t0 & 0xff] ^ rk[ 9]); - s2= (Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] - ^ Te3[t1 & 0xff] ^ rk[10]); - s3= (Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] - ^ Te3[t2 & 0xff] ^ rk[11]); - - /* round 3: */ - t0= (Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] - ^ Te3[s3 & 0xff] ^ rk[12]); - t1= (Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] - ^ Te3[s0 & 0xff] ^ rk[13]); - t2= (Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] - ^ Te3[s1 & 0xff] ^ rk[14]); - t3= (Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] - ^ Te3[s2 & 0xff] ^ rk[15]); - - /* round 4: */ - s0= (Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] - ^ Te3[t3 & 0xff] ^ rk[16]); - s1= (Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] - ^ Te3[t0 & 0xff] ^ rk[17]); - s2= (Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] - ^ Te3[t1 & 0xff] ^ rk[18]); - s3= (Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] - ^ Te3[t2 & 0xff] ^ rk[19]); - - /* round 5: */ - t0= (Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] - ^ Te3[s3 & 0xff] ^ rk[20]); - t1= (Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] - ^ Te3[s0 & 0xff] ^ rk[21]); - t2= (Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] - ^ Te3[s1 & 0xff] ^ rk[22]); - t3= (Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] - ^ Te3[s2 & 0xff] ^ rk[23]); - - /* round 6: */ - s0= (Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] - ^ Te3[t3 & 0xff] ^ rk[24]); - s1= (Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] - ^ Te3[t0 & 0xff] ^ rk[25]); - s2= (Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] - ^ Te3[t1 & 0xff] ^ rk[26]); - s3= (Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] - ^ Te3[t2 & 0xff] ^ rk[27]); - - /* round 7: */ - t0= (Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] - ^ Te3[s3 & 0xff] ^ rk[28]); - t1= (Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] - ^ Te3[s0 & 0xff] ^ rk[29]); - t2= (Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] - ^ Te3[s1 & 0xff] ^ rk[30]); - t3= (Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] - ^ Te3[s2 & 0xff] ^ rk[31]); - - /* round 8: */ - s0= (Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] - ^ Te3[t3 & 0xff] ^ rk[32]); - s1= (Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] - ^ Te3[t0 & 0xff] ^ rk[33]); - s2= (Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] - ^ Te3[t1 & 0xff] ^ rk[34]); - s3= (Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] - ^ Te3[t2 & 0xff] ^ rk[35]); - - /* round 9: */ - t0= (Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] - ^ Te3[s3 & 0xff] ^ rk[36]); - t1= (Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] - ^ Te3[s0 & 0xff] ^ rk[37]); - t2= (Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] - ^ Te3[s1 & 0xff] ^ rk[38]); - t3= (Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] - ^ Te3[s2 & 0xff] ^ rk[39]); - - if (Nr > 10) - { - /* round 10: */ - s0= (Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] - ^ Te3[t3 & 0xff] ^ rk[40]); - s1= (Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] - ^ Te3[t0 & 0xff] ^ rk[41]); - s2= (Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] - ^ Te3[t1 & 0xff] ^ rk[42]); - s3= (Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] - ^ Te3[t2 & 0xff] ^ rk[43]); - - /* round 11: */ - t0= (Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] - ^ Te3[s3 & 0xff] ^ rk[44]); - t1= (Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] - ^ Te3[s0 & 0xff] ^ rk[45]); - t2= (Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] - ^ Te3[s1 & 0xff] ^ rk[46]); - t3= (Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] - ^ Te3[s2 & 0xff] ^ rk[47]); - - if (Nr > 12) - { - /* round 12: */ - s0= (Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] - ^ Te3[t3 & 0xff] ^ rk[48]); - s1= (Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] - ^ Te3[t0 & 0xff] ^ rk[49]); - s2= (Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] - ^ Te3[t1 & 0xff] ^ rk[50]); - s3= (Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] - ^ Te3[t2 & 0xff] ^ rk[51]); - - /* round 13: */ - t0= (Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] - ^ Te3[s3 & 0xff] ^ rk[52]); - t1= (Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] - ^ Te3[s0 & 0xff] ^ rk[53]); - t2= (Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] - ^ Te3[s1 & 0xff] ^ rk[54]); - t3= (Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] - ^ Te3[s2 & 0xff] ^ rk[55]); - } - } - rk += Nr << 2; -#else /* !FULL_UNROLL */ - - /* Nr - 1 full rounds: */ - - r = Nr >> 1; - for (;;) - { - t0= (Te0[(s0 >> 24) ] ^ - Te1[(s1 >> 16) & 0xff] ^ - Te2[(s2 >> 8) & 0xff] ^ - Te3[(s3 ) & 0xff] ^ - rk[4]); - - t1= (Te0[(s1 >> 24) ] ^ - Te1[(s2 >> 16) & 0xff] ^ - Te2[(s3 >> 8) & 0xff] ^ - Te3[(s0 ) & 0xff] ^ - rk[5]); - - t2= (Te0[(s2 >> 24) ] ^ - Te1[(s3 >> 16) & 0xff] ^ - Te2[(s0 >> 8) & 0xff] ^ - Te3[(s1 ) & 0xff] ^ - rk[6]); - - t3= (Te0[(s3 >> 24) ] ^ - Te1[(s0 >> 16) & 0xff] ^ - Te2[(s1 >> 8) & 0xff] ^ - Te3[(s2 ) & 0xff] ^ - rk[7]); - - rk+= 8; - if (--r == 0) - break; - - s0= (Te0[(t0 >> 24) ] ^ - Te1[(t1 >> 16) & 0xff] ^ - Te2[(t2 >> 8) & 0xff] ^ - Te3[(t3 ) & 0xff] ^ - rk[0]); - - s1= (Te0[(t1 >> 24) ] ^ - Te1[(t2 >> 16) & 0xff] ^ - Te2[(t3 >> 8) & 0xff] ^ - Te3[(t0 ) & 0xff] ^ - rk[1]); - - s2= (Te0[(t2 >> 24) ] ^ - Te1[(t3 >> 16) & 0xff] ^ - Te2[(t0 >> 8) & 0xff] ^ - Te3[(t1 ) & 0xff] ^ - rk[2]); - - s3= (Te0[(t3 >> 24) ] ^ - Te1[(t0 >> 16) & 0xff] ^ - Te2[(t1 >> 8) & 0xff] ^ - Te3[(t2 ) & 0xff] ^ - rk[3]); - } -#endif /* FULL_UNROLL */ - - /* Apply last round and map cipher state to byte array block: */ - s0= ((Te4[(t0 >> 24) ] & 0xff000000) ^ - (Te4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ - (Te4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ - (Te4[(t3 ) & 0xff] & 0x000000ff) ^ - rk[0]); - PUTuint32(ct , s0); - - s1= ((Te4[(t1 >> 24) ] & 0xff000000) ^ - (Te4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ - (Te4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ - (Te4[(t0 ) & 0xff] & 0x000000ff) ^ - rk[1]); - PUTuint32(ct + 4, s1); - - s2= ((Te4[(t2 >> 24) ] & 0xff000000) ^ - (Te4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ - (Te4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ - (Te4[(t1 ) & 0xff] & 0x000000ff) ^ - rk[2]); - PUTuint32(ct + 8, s2); - - s3= ((Te4[(t3 >> 24) ] & 0xff000000) ^ - (Te4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ - (Te4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ - (Te4[(t2 ) & 0xff] & 0x000000ff) ^ - rk[3]); - PUTuint32(ct + 12, s3); -} - - -void rijndaelDecrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr, - const uint8 ct[16], uint8 pt[16]) -{ - uint32 s0, s1, s2, s3, t0, t1, t2, t3; -#ifndef FULL_UNROLL - int r; -#endif /* FULL_UNROLL */ - - /* Map byte array block to cipher state and add initial round key: */ - - s0 = GETuint32(ct ) ^ rk[0]; - s1 = GETuint32(ct + 4) ^ rk[1]; - s2 = GETuint32(ct + 8) ^ rk[2]; - s3 = GETuint32(ct + 12) ^ rk[3]; - -#ifdef FULL_UNROLL - /* round 1: */ - t0= (Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] - ^ Td3[s1 & 0xff] ^ rk[ 4]); - t1= (Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] - ^ Td3[s2 & 0xff] ^ rk[ 5]); - t2= (Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] - ^ Td3[s3 & 0xff] ^ rk[ 6]); - t3= (Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] - ^ Td3[s0 & 0xff] ^ rk[ 7]); - - /* round 2: */ - s0= (Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] - ^ Td3[t1 & 0xff] ^ rk[ 8]); - s1= (Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] - ^ Td3[t2 & 0xff] ^ rk[ 9]); - s2= (Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] - ^ Td3[t3 & 0xff] ^ rk[10]); - s3= (Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] - ^ Td3[t0 & 0xff] ^ rk[11]); - - /* round 3: */ - t0= (Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] - ^ Td3[s1 & 0xff] ^ rk[12]); - t1= (Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] - ^ Td3[s2 & 0xff] ^ rk[13]); - t2= (Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] - ^ Td3[s3 & 0xff] ^ rk[14]); - t3= (Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] - ^ Td3[s0 & 0xff] ^ rk[15]); - - /* round 4: */ - s0= (Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] - ^ Td3[t1 & 0xff] ^ rk[16]); - s1= (Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] - ^ Td3[t2 & 0xff] ^ rk[17]); - s2= (Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] - ^ Td3[t3 & 0xff] ^ rk[18]); - s3= (Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] - ^ Td3[t0 & 0xff] ^ rk[19]); - - /* round 5: */ - t0= (Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] - ^ Td3[s1 & 0xff] ^ rk[20]); - t1= (Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] - ^ Td3[s2 & 0xff] ^ rk[21]); - t2= (Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] - ^ Td3[s3 & 0xff] ^ rk[22]); - t3= (Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] - ^ Td3[s0 & 0xff] ^ rk[23]); - - /* round 6: */ - s0= (Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] - ^ Td3[t1 & 0xff] ^ rk[24]); - s1= (Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] - ^ Td3[t2 & 0xff] ^ rk[25]); - s2= (Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] - ^ Td3[t3 & 0xff] ^ rk[26]); - s3= (Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] - ^ Td3[t0 & 0xff] ^ rk[27]); - - /* round 7: */ - t0= (Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] - ^ Td3[s1 & 0xff] ^ rk[28]); - t1= (Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] - ^ Td3[s2 & 0xff] ^ rk[29]); - t2= (Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] - ^ Td3[s3 & 0xff] ^ rk[30]); - t3= (Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] - ^ Td3[s0 & 0xff] ^ rk[31]); - - /* round 8: */ - s0= (Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] - ^ Td3[t1 & 0xff] ^ rk[32]); - s1= (Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] - ^ Td3[t2 & 0xff] ^ rk[33]); - s2= (Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] - ^ Td3[t3 & 0xff] ^ rk[34]); - s3= (Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] - ^ Td3[t0 & 0xff] ^ rk[35]); - - /* round 9: */ - t0= (Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] - ^ Td3[s1 & 0xff] ^ rk[36]); - t1= (Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] - ^ Td3[s2 & 0xff] ^ rk[37]); - t2= (Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] - ^ Td3[s3 & 0xff] ^ rk[38]); - t3= (Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] - ^ Td3[s0 & 0xff] ^ rk[39]); - - if (Nr > 10) - { - /* round 10: */ - s0= (Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] - ^ Td3[t1 & 0xff] ^ rk[40]); - s1= (Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] - ^ Td3[t2 & 0xff] ^ rk[41]); - s2= (Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] - ^ Td3[t3 & 0xff] ^ rk[42]); - s3= (Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] - ^ Td3[t0 & 0xff] ^ rk[43]); - - /* round 11: */ - t0= (Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] - ^ Td3[s1 & 0xff] ^ rk[44]); - t1= (Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] - ^ Td3[s2 & 0xff] ^ rk[45]); - t2= (Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] - ^ Td3[s3 & 0xff] ^ rk[46]); - t3= (Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] - ^ Td3[s0 & 0xff] ^ rk[47]); - - if (Nr > 12) - { - /* round 12: */ - s0= (Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] - ^ Td3[t1 & 0xff] ^ rk[48]); - s1= (Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] - ^ Td3[t2 & 0xff] ^ rk[49]); - s2= (Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] - ^ Td3[t3 & 0xff] ^ rk[50]); - s3= (Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] - ^ Td3[t0 & 0xff] ^ rk[51]); - - /* round 13: */ - t0= (Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] - ^ Td3[s1 & 0xff] ^ rk[52]); - t1= (Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] - ^ Td3[s2 & 0xff] ^ rk[53]); - t2= (Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] - ^ Td3[s3 & 0xff] ^ rk[54]); - t3= (Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] - ^ Td3[s0 & 0xff] ^ rk[55]); - } - } - rk += Nr << 2; -#else /* !FULL_UNROLL */ - - /* Nr - 1 full rounds: */ - r= (Nr >> 1); - for (;;) - { - t0= (Td0[(s0 >> 24) ] ^ - Td1[(s3 >> 16) & 0xff] ^ - Td2[(s2 >> 8) & 0xff] ^ - Td3[(s1 ) & 0xff] ^ - rk[4]); - - t1= (Td0[(s1 >> 24) ] ^ - Td1[(s0 >> 16) & 0xff] ^ - Td2[(s3 >> 8) & 0xff] ^ - Td3[(s2 ) & 0xff] ^ - rk[5]); - - t2= (Td0[(s2 >> 24) ] ^ - Td1[(s1 >> 16) & 0xff] ^ - Td2[(s0 >> 8) & 0xff] ^ - Td3[(s3 ) & 0xff] ^ - rk[6]); - - t3= (Td0[(s3 >> 24) ] ^ - Td1[(s2 >> 16) & 0xff] ^ - Td2[(s1 >> 8) & 0xff] ^ - Td3[(s0 ) & 0xff] ^ - rk[7]); - - rk+= 8; - if (--r == 0) - break; - - s0= (Td0[(t0 >> 24) ] ^ - Td1[(t3 >> 16) & 0xff] ^ - Td2[(t2 >> 8) & 0xff] ^ - Td3[(t1 ) & 0xff] ^ - rk[0]); - - s1= (Td0[(t1 >> 24) ] ^ - Td1[(t0 >> 16) & 0xff] ^ - Td2[(t3 >> 8) & 0xff] ^ - Td3[(t2 ) & 0xff] ^ - rk[1]); - - s2= (Td0[(t2 >> 24) ] ^ - Td1[(t1 >> 16) & 0xff] ^ - Td2[(t0 >> 8) & 0xff] ^ - Td3[(t3 ) & 0xff] ^ - rk[2]); - - s3= (Td0[(t3 >> 24) ] ^ - Td1[(t2 >> 16) & 0xff] ^ - Td2[(t1 >> 8) & 0xff] ^ - Td3[(t0 ) & 0xff] ^ - rk[3]); - } - -#endif /* FULL_UNROLL */ - - /* Apply last round and map cipher state to byte array block: */ - - s0= ((Td4[(t0 >> 24) ] & 0xff000000) ^ - (Td4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ - (Td4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ - (Td4[(t1 ) & 0xff] & 0x000000ff) ^ - rk[0]); - PUTuint32(pt , s0); - - s1= ((Td4[(t1 >> 24) ] & 0xff000000) ^ - (Td4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ - (Td4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ - (Td4[(t2 ) & 0xff] & 0x000000ff) ^ - rk[1]); - PUTuint32(pt + 4, s1); - - s2= ((Td4[(t2 >> 24) ] & 0xff000000) ^ - (Td4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ - (Td4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ - (Td4[(t3 ) & 0xff] & 0x000000ff) ^ - rk[2]); - PUTuint32(pt + 8, s2); - - s3= ((Td4[(t3 >> 24) ] & 0xff000000) ^ - (Td4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ - (Td4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ - (Td4[(t0 ) & 0xff] & 0x000000ff) ^ - rk[3]); - PUTuint32(pt + 12, s3); -} diff --git a/externals/mysql/mysys/rijndael.h b/externals/mysql/mysys/rijndael.h deleted file mode 100644 index 89963a85c9..0000000000 --- a/externals/mysql/mysys/rijndael.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -/* - rijndael-alg-fst.h - - @version 3.0 (December 2000) - Optimised ANSI C code for the Rijndael cipher (now AES) - @author Vincent Rijmen - @author Antoon Bosselaers - @author Paulo Barreto - - This code is hereby placed in the public domain. - Modified by Peter Zaitsev to fit MySQL coding style. - */ - -#define AES_MAXKC (256/32) -#define AES_MAXKB (256/8) -#define AES_MAXNR 14 - -int rijndaelKeySetupEnc(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[], - int keyBits); -int rijndaelKeySetupDec(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[], - int keyBits); -void rijndaelEncrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr, - const uint8 pt[16], uint8 ct[16]); -void rijndaelDecrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr, - const uint8 ct[16], uint8 pt[16]); diff --git a/externals/mysql/mysys/safemalloc.c b/externals/mysql/mysys/safemalloc.c deleted file mode 100644 index fc32df728b..0000000000 --- a/externals/mysql/mysys/safemalloc.c +++ /dev/null @@ -1,576 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - * Memory sub-system, written by Bjorn Benson - Fixed to use my_sys scheme by Michael Widenius - - [This posting refers to an article entitled "oops, corrupted memory - again!" in net.lang.c. I am posting it here because it is source.] - - My tool for approaching this problem is to build another level of data - abstraction on top of malloc() and free() that implements some checking. - This does a number of things for you: - - Checks for overruns and underruns on allocated data - - Keeps track of where in the program the memory was malloc'ed - - Reports on pieces of memory that were not free'ed - - Records some statistics such as maximum memory used - - Marks newly malloc'ed and newly free'ed memory with special values - You can use this scheme to: - - Find bugs such as overrun, underrun, etc because you know where - a piece of data was malloc'ed and where it was free'ed - - Find bugs where memory was not free'ed - - Find bugs where newly malloc'ed memory is used without initializing - - Find bugs where newly free'ed memory is still used - - Determine how much memory your program really uses - - and other things - - To implement my scheme you must have a C compiler that has __LINE__ and - __FILE__ macros. If your compiler doesn't have these then (a) buy another: - compilers that do are available on UNIX 4.2bsd based systems and the PC, - and probably on other machines; or (b) change my scheme somehow. I have - recomendations on both these points if you would like them (e-mail please). - - There are 4 functions in my package: - char *NEW( uSize ) Allocate memory of uSize bytes - (equivalent to malloc()) - char *REA( pPtr, uSize) Allocate memory of uSize bytes, move data and - free pPtr. - (equivalent to realloc()) - FREE( pPtr ) Free memory allocated by NEW - (equivalent to free()) - TERMINATE(file,flag) End system, report errors and stats on file - I personally use two more functions, but have not included them here: - char *STRSAVE( sPtr ) Save a copy of the string in dynamic memory - char *RENEW( pPtr, uSize ) - (equivalent to realloc()) - -*/ - -#ifndef SAFEMALLOC -#define SAFEMALLOC /* Get protos from my_sys */ -#endif - -#include "mysys_priv.h" -#include -#include "my_static.h" -#include "mysys_err.h" - -ulonglong sf_malloc_mem_limit= ~(ulonglong)0; - -#ifndef PEDANTIC_SAFEMALLOC -/* - Set to 1 after TERMINATE() if we had to fiddle with sf_malloc_count and - the linked list of blocks so that _sanity() will not fuss when it - is not supposed to -*/ -static int sf_malloc_tampered= 0; -#endif - - - /* Static functions prototypes */ - -static int check_ptr(const char *where, uchar *ptr, const char *sFile, - uint uLine); -static int _checkchunk(struct st_irem *pRec, const char *sFile, uint uLine); - -/* - Note: We only fill up the allocated block. This do not include - malloc() roundoff or the extra space required by the irem - structures. -*/ - -/* - NEW'ed memory is filled with this value so that references to it will - end up being very strange. -*/ -#define ALLOC_VAL (uchar) 0xA5 -/* - FEEE'ed memory is filled with this value so that references to it will - end up being very strange. -*/ -#define FREE_VAL (uchar) 0x8F -#define MAGICKEY 0x14235296 /* A magic value for underrun key */ - -/* - Warning: do not change the MAGICEND? values to something with the - high bit set. Various C compilers (like the 4.2bsd one) do not do - the sign extension right later on in this code and you will get - erroneous errors. -*/ - -#define MAGICEND0 0x68 /* Magic values for overrun keys */ -#define MAGICEND1 0x34 /* " */ -#define MAGICEND2 0x7A /* " */ -#define MAGICEND3 0x15 /* " */ - - -/* Allocate some memory. */ - -void *_mymalloc(size_t size, const char *filename, uint lineno, myf MyFlags) -{ - struct st_irem *irem; - uchar *data; - DBUG_ENTER("_mymalloc"); - DBUG_PRINT("enter",("Size: %lu", (ulong) size)); - - if (!sf_malloc_quick) - (void) _sanity (filename, lineno); - - /* - Test for memory limit overrun. - If compiled with DBUG, test for error injection. Described in my_sys.h. - */ - if ((size + sf_malloc_cur_memory > sf_malloc_mem_limit) - IF_DBUG(|| my_malloc_error_inject)) - { - IF_DBUG(if (my_malloc_error_inject) - errno= ENOMEM; - my_malloc_error_inject= 0); - irem= 0; - } - else - { - /* Allocate the physical memory */ - irem= (struct st_irem *) malloc (ALIGN_SIZE(sizeof(struct st_irem)) + - sf_malloc_prehunc + - size + /* size requested */ - 4 + /* overrun mark */ - sf_malloc_endhunc); - } - /* Check if there isn't anymore memory avaiable */ - if (!irem) - { - if (MyFlags & MY_FAE) - error_handler_hook=fatal_error_handler_hook; - if (MyFlags & (MY_FAE+MY_WME)) - { - char buff[MYSYS_ERRMSG_SIZE]; - my_errno=errno; - my_snprintf(buff, sizeof(buff), "Out of memory at line %d, '%s'", - lineno, filename); - my_message(EE_OUTOFMEMORY, buff, MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH)); - my_snprintf(buff, sizeof(buff), - "needed %lu byte (%luk), memory in use: %lu bytes (%luk)", - (ulong) size, (ulong) (size + 1023L) / 1024L, - (ulong) sf_malloc_max_memory, - (ulong) (sf_malloc_max_memory + 1023L) / 1024L); - my_message(EE_OUTOFMEMORY, buff, MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH)); - } - DBUG_PRINT("error",("Out of memory, in use: %ld at line %d, '%s'", - sf_malloc_max_memory,lineno, filename)); - if (MyFlags & MY_FAE) - exit(1); - DBUG_RETURN ((void*) 0); - } - - /* Fill up the structure */ - data= (((uchar*) irem) + ALIGN_SIZE(sizeof(struct st_irem)) + - sf_malloc_prehunc); - *((uint32*) (data-sizeof(uint32)))= MAGICKEY; - data[size + 0]= MAGICEND0; - data[size + 1]= MAGICEND1; - data[size + 2]= MAGICEND2; - data[size + 3]= MAGICEND3; - irem->filename= (char *) filename; - irem->linenum= lineno; - irem->datasize= size; - irem->prev= NULL; - - /* Add this remember structure to the linked list */ - pthread_mutex_lock(&THR_LOCK_malloc); - if ((irem->next= sf_malloc_root)) - sf_malloc_root->prev= irem; - sf_malloc_root= irem; - - /* Keep the statistics */ - sf_malloc_cur_memory+= size; - if (sf_malloc_cur_memory > sf_malloc_max_memory) - sf_malloc_max_memory= sf_malloc_cur_memory; - sf_malloc_count++; - pthread_mutex_unlock(&THR_LOCK_malloc); - - /* Set the memory to the aribtrary wierd value */ - if ((MyFlags & MY_ZEROFILL) || !sf_malloc_quick) - bfill(data, size, (char) (MyFlags & MY_ZEROFILL ? 0 : ALLOC_VAL)); - /* Return a pointer to the real data */ - DBUG_PRINT("exit",("ptr: %p", data)); - if (sf_min_adress > data) - sf_min_adress= data; - if (sf_max_adress < data) - sf_max_adress= data; - DBUG_RETURN((void*) data); -} - - -/* - Allocate some new memory and move old memoryblock there. - Free then old memoryblock -*/ - -void *_myrealloc(register void *ptr, register size_t size, - const char *filename, uint lineno, myf MyFlags) -{ - struct st_irem *irem; - char *data; - DBUG_ENTER("_myrealloc"); - - if (!ptr && (MyFlags & MY_ALLOW_ZERO_PTR)) - DBUG_RETURN(_mymalloc(size, filename, lineno, MyFlags)); - - if (!sf_malloc_quick) - (void) _sanity (filename, lineno); - - if (check_ptr("Reallocating", (uchar*) ptr, filename, lineno)) - DBUG_RETURN((uchar*) NULL); - - irem= (struct st_irem *) (((char*) ptr) - ALIGN_SIZE(sizeof(struct st_irem))- - sf_malloc_prehunc); - if (*((uint32*) (((char*) ptr)- sizeof(uint32))) != MAGICKEY) - { - fprintf(stderr, "Error: Reallocating unallocated data at line %d, '%s'\n", - lineno, filename); - DBUG_PRINT("safe",("Reallocating unallocated data at line %d, '%s'", - lineno, filename)); - (void) fflush(stderr); - DBUG_RETURN((uchar*) NULL); - } - - if ((data= _mymalloc(size,filename,lineno,MyFlags))) /* Allocate new area */ - { - size=min(size, irem->datasize); /* Move as much as possibly */ - memcpy((uchar*) data, ptr, (size_t) size); /* Copy old data */ - _myfree(ptr, filename, lineno, 0); /* Free not needed area */ - } - else - { - if (MyFlags & MY_HOLD_ON_ERROR) - DBUG_RETURN(ptr); - if (MyFlags & MY_FREE_ON_ERROR) - _myfree(ptr, filename, lineno, 0); - } - DBUG_RETURN(data); -} /* _myrealloc */ - - -/* Deallocate some memory. */ - -void _myfree(void *ptr, const char *filename, uint lineno, myf myflags) -{ - struct st_irem *irem; - DBUG_ENTER("_myfree"); - DBUG_PRINT("enter",("ptr: %p", ptr)); - - if (!sf_malloc_quick) - (void) _sanity (filename, lineno); - - if ((!ptr && (myflags & MY_ALLOW_ZERO_PTR)) || - check_ptr("Freeing",(uchar*) ptr,filename,lineno)) - DBUG_VOID_RETURN; - - /* Calculate the address of the remember structure */ - irem= (struct st_irem *) ((char*) ptr- ALIGN_SIZE(sizeof(struct st_irem))- - sf_malloc_prehunc); - - /* - Check to make sure that we have a real remember structure. - Note: this test could fail for four reasons: - (1) The memory was already free'ed - (2) The memory was never new'ed - (3) There was an underrun - (4) A stray pointer hit this location - */ - - if (*((uint32*) ((char*) ptr- sizeof(uint32))) != MAGICKEY) - { - fprintf(stderr, "Error: Freeing unallocated data at line %d, '%s'\n", - lineno, filename); - DBUG_PRINT("safe",("Unallocated data at line %d, '%s'",lineno,filename)); - (void) fflush(stderr); - DBUG_VOID_RETURN; - } - - /* Remove this structure from the linked list */ - pthread_mutex_lock(&THR_LOCK_malloc); - if (irem->prev) - irem->prev->next= irem->next; - else - sf_malloc_root= irem->next; - - if (irem->next) - irem->next->prev= irem->prev; - /* Handle the statistics */ - sf_malloc_cur_memory-= irem->datasize; - sf_malloc_count--; - pthread_mutex_unlock(&THR_LOCK_malloc); - -#ifndef HAVE_purify - /* Mark this data as free'ed */ - if (!sf_malloc_quick) - bfill(ptr, irem->datasize, (pchar) FREE_VAL); -#endif - *((uint32*) ((char*) ptr- sizeof(uint32)))= ~MAGICKEY; - /* Actually free the memory */ - free((char*) irem); - DBUG_VOID_RETURN; -} - - /* Check if we have a wrong pointer */ - -static int check_ptr(const char *where, uchar *ptr, const char *filename, - uint lineno) -{ - if (!ptr) - { - fprintf(stderr, "Error: %s NULL pointer at line %d, '%s'\n", - where,lineno, filename); - DBUG_PRINT("safe",("Null pointer at line %d '%s'", lineno, filename)); - (void) fflush(stderr); - return 1; - } -#ifndef _MSC_VER - if ((long) ptr & (ALIGN_SIZE(1)-1)) - { - fprintf(stderr, "Error: %s wrong aligned pointer at line %d, '%s'\n", - where,lineno, filename); - DBUG_PRINT("safe",("Wrong aligned pointer at line %d, '%s'", - lineno,filename)); - (void) fflush(stderr); - return 1; - } -#endif - if (ptr < sf_min_adress || ptr > sf_max_adress) - { - fprintf(stderr, "Error: %s pointer out of range at line %d, '%s'\n", - where,lineno, filename); - DBUG_PRINT("safe",("Pointer out of range at line %d '%s'", - lineno,filename)); - (void) fflush(stderr); - return 1; - } - return 0; -} - - -/* - Report on all the memory pieces that have not been free'ed - - SYNOPSIS - TERMINATE() - file Write output to this file - flag If <> 0, also write statistics - */ - -void TERMINATE(FILE *file, uint flag) -{ - struct st_irem *irem; - DBUG_ENTER("TERMINATE"); - pthread_mutex_lock(&THR_LOCK_malloc); - - /* - Report the difference between number of calls to - NEW and the number of calls to FREE. >0 means more - NEWs than FREEs. <0, etc. - */ - - if (sf_malloc_count) - { - if (file) - { - fprintf(file, "Warning: Not freed memory segments: %u\n", sf_malloc_count); - (void) fflush(file); - } - DBUG_PRINT("safe",("sf_malloc_count: %u", sf_malloc_count)); - } - - /* - Report on all the memory that was allocated with NEW - but not free'ed with FREE. - */ - - if ((irem= sf_malloc_root)) - { - if (file) - { - fprintf(file, "Warning: Memory that was not free'ed (%lu bytes):\n", - (ulong) sf_malloc_cur_memory); - (void) fflush(file); - } - DBUG_PRINT("safe",("Memory that was not free'ed (%lu bytes):", - (ulong) sf_malloc_cur_memory)); - while (irem) - { - char *data= (((char*) irem) + ALIGN_SIZE(sizeof(struct st_irem)) + - sf_malloc_prehunc); - if (file) - { - fprintf(file, - "\t%6lu bytes at %p, allocated at line %4u in '%s'", - (ulong) irem->datasize, data, irem->linenum, irem->filename); - fprintf(file, "\n"); - (void) fflush(file); - } - DBUG_PRINT("safe", - ("%6lu bytes at %p, allocated at line %4d in '%s'", - (ulong) irem->datasize, - data, irem->linenum, irem->filename)); - irem= irem->next; - } - } - /* Report the memory usage statistics */ - if (file && flag) - { - fprintf(file, "Maximum memory usage: %lu bytes (%luk)\n", - (ulong) sf_malloc_max_memory, - (ulong) (sf_malloc_max_memory + 1023L) / 1024L); - (void) fflush(file); - } - DBUG_PRINT("safe",("Maximum memory usage: %lu bytes (%luk)", - (ulong) sf_malloc_max_memory, - (ulong) (sf_malloc_max_memory + 1023L) /1024L)); - pthread_mutex_unlock(&THR_LOCK_malloc); - DBUG_VOID_RETURN; -} - - -/* - Report where a piece of memory was allocated - - This is usefull to call from withing a debugger -*/ - - -void sf_malloc_report_allocated(void *memory) -{ - struct st_irem *irem; - for (irem= sf_malloc_root ; irem ; irem=irem->next) - { - char *data= (((char*) irem) + ALIGN_SIZE(sizeof(struct st_irem)) + - sf_malloc_prehunc); - if (data <= (char*) memory && (char*) memory <= data + irem->datasize) - { - printf("%lu bytes at %p, allocated at line %u in '%s'\n", - (ulong) irem->datasize, data, irem->linenum, irem->filename); - break; - } - } -} - - /* Returns 0 if chunk is ok */ - -static int _checkchunk(register struct st_irem *irem, const char *filename, - uint lineno) -{ - int flag=0; - char *magicp, *data; - - data= (((char*) irem) + ALIGN_SIZE(sizeof(struct st_irem)) + - sf_malloc_prehunc); - /* Check for a possible underrun */ - if (*((uint32*) (data- sizeof(uint32))) != MAGICKEY) - { - fprintf(stderr, "Error: Memory allocated at %s:%d was underrun,", - irem->filename, irem->linenum); - fprintf(stderr, " discovered at %s:%d\n", filename, lineno); - (void) fflush(stderr); - DBUG_PRINT("safe",("Underrun at %p, allocated at %s:%d", - data, irem->filename, irem->linenum)); - flag=1; - } - - /* Check for a possible overrun */ - magicp= data + irem->datasize; - if (*magicp++ != MAGICEND0 || - *magicp++ != MAGICEND1 || - *magicp++ != MAGICEND2 || - *magicp++ != MAGICEND3) - { - fprintf(stderr, "Error: Memory allocated at %s:%d was overrun,", - irem->filename, irem->linenum); - fprintf(stderr, " discovered at '%s:%d'\n", filename, lineno); - (void) fflush(stderr); - DBUG_PRINT("safe",("Overrun at %p, allocated at %s:%d", - data, irem->filename, irem->linenum)); - flag=1; - } - return(flag); -} - - - /* Returns how many wrong chunks */ - -int _sanity(const char *filename, uint lineno) -{ - reg1 struct st_irem *irem; - reg2 int flag=0; - uint count=0; - - pthread_mutex_lock(&THR_LOCK_malloc); -#ifndef PEDANTIC_SAFEMALLOC - if (sf_malloc_tampered && (int) sf_malloc_count < 0) - sf_malloc_count=0; -#endif - count=sf_malloc_count; - for (irem= sf_malloc_root; irem != NULL && count-- ; irem= irem->next) - flag+= _checkchunk (irem, filename, lineno); - pthread_mutex_unlock(&THR_LOCK_malloc); - if (count || irem) - { - const char *format="Error: Safemalloc link list destroyed, discovered at '%s:%d'"; - fprintf(stderr, format, filename, lineno); fputc('\n',stderr); - fprintf(stderr, "root=%p,count=%d,irem=%p\n", sf_malloc_root,count,irem); - (void) fflush(stderr); - DBUG_PRINT("safe",(format, filename, lineno)); - flag=1; - } - return flag; -} /* _sanity */ - - - /* malloc and copy */ - -void *_my_memdup(const void *from, size_t length, const char *filename, - uint lineno, myf MyFlags) -{ - void *ptr; - if ((ptr= _mymalloc(length,filename,lineno,MyFlags)) != 0) - memcpy(ptr, from, length); - return(ptr); -} /*_my_memdup */ - - -char *_my_strdup(const char *from, const char *filename, uint lineno, - myf MyFlags) -{ - char *ptr; - size_t length= strlen(from)+1; - if ((ptr= (char*) _mymalloc(length,filename,lineno,MyFlags)) != 0) - memcpy((uchar*) ptr, (uchar*) from, (size_t) length); - return(ptr); -} /* _my_strdup */ - - -char *_my_strndup(const char *from, size_t length, - const char *filename, uint lineno, - myf MyFlags) -{ - char *ptr; - if ((ptr= (char*) _mymalloc(length+1,filename,lineno,MyFlags)) != 0) - { - memcpy((uchar*) ptr, (uchar*) from, (size_t) length); - ptr[length]=0; - } - return(ptr); -} diff --git a/externals/mysql/mysys/sha1.c b/externals/mysql/mysys/sha1.c deleted file mode 100644 index 3469e480c2..0000000000 --- a/externals/mysql/mysys/sha1.c +++ /dev/null @@ -1,391 +0,0 @@ -/* Copyright (C) 2002, 2004, 2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Original Source from: http://www.faqs.org/rfcs/rfc3174.html - - DESCRIPTION - This file implements the Secure Hashing Algorithm 1 as - defined in FIPS PUB 180-1 published April 17, 1995. - - The SHA-1, produces a 160-bit message digest for a given data - stream. It should take about 2**n steps to find a message with the - same digest as a given message and 2**(n/2) to find any two - messages with the same digest, when n is the digest size in bits. - Therefore, this algorithm can serve as a means of providing a - "fingerprint" for a message. - - PORTABILITY ISSUES - SHA-1 is defined in terms of 32-bit "words". This code uses - (included via "sha1.h" to define 32 and 8 bit unsigned - integer types. If your C compiler does not support 32 bit unsigned - integers, this code is not appropriate. - - CAVEATS - SHA-1 is designed to work with messages less than 2^64 bits long. - Although SHA-1 allows a message digest to be generated for messages - of any number of bits less than 2^64, this implementation only - works with messages with a length that is a multiple of the size of - an 8-bit character. - - CHANGES - 2002 by Peter Zaitsev to - - fit to new prototypes according to MySQL standard - - Some optimizations - - All checking is now done in debug only mode - - More comments -*/ - -#include "my_global.h" -#include "m_string.h" -#include "sha1.h" - -/* - Define the SHA1 circular left shift macro -*/ - -#define SHA1CircularShift(bits,word) \ - (((word) << (bits)) | ((word) >> (32-(bits)))) - -/* Local Function Prototyptes */ -static void SHA1PadMessage(SHA1_CONTEXT*); -static void SHA1ProcessMessageBlock(SHA1_CONTEXT*); - - -/* - Initialize SHA1Context - - SYNOPSIS - mysql_sha1_reset() - context [in/out] The context to reset. - - DESCRIPTION - This function will initialize the SHA1Context in preparation - for computing a new SHA1 message digest. - - RETURN - SHA_SUCCESS ok - != SHA_SUCCESS sha Error Code. -*/ - - -const uint32 sha_const_key[5]= -{ - 0x67452301, - 0xEFCDAB89, - 0x98BADCFE, - 0x10325476, - 0xC3D2E1F0 -}; - - -int mysql_sha1_reset(SHA1_CONTEXT *context) -{ -#ifndef DBUG_OFF - if (!context) - return SHA_NULL; -#endif - - context->Length = 0; - context->Message_Block_Index = 0; - - context->Intermediate_Hash[0] = sha_const_key[0]; - context->Intermediate_Hash[1] = sha_const_key[1]; - context->Intermediate_Hash[2] = sha_const_key[2]; - context->Intermediate_Hash[3] = sha_const_key[3]; - context->Intermediate_Hash[4] = sha_const_key[4]; - - context->Computed = 0; - context->Corrupted = 0; - - return SHA_SUCCESS; -} - - -/* - Return the 160-bit message digest into the array provided by the caller - - SYNOPSIS - mysql_sha1_result() - context [in/out] The context to use to calculate the SHA-1 hash. - Message_Digest: [out] Where the digest is returned. - - DESCRIPTION - NOTE: The first octet of hash is stored in the 0th element, - the last octet of hash in the 19th element. - - RETURN - SHA_SUCCESS ok - != SHA_SUCCESS sha Error Code. -*/ - -int mysql_sha1_result(SHA1_CONTEXT *context, - uint8 Message_Digest[SHA1_HASH_SIZE]) -{ - int i; - -#ifndef DBUG_OFF - if (!context || !Message_Digest) - return SHA_NULL; - - if (context->Corrupted) - return context->Corrupted; -#endif - - if (!context->Computed) - { - SHA1PadMessage(context); - /* message may be sensitive, clear it out */ - bzero((char*) context->Message_Block,64); - context->Length = 0; /* and clear length */ - context->Computed = 1; - } - - for (i = 0; i < SHA1_HASH_SIZE; i++) - Message_Digest[i] = (int8)((context->Intermediate_Hash[i>>2] >> 8 - * ( 3 - ( i & 0x03 ) ))); - return SHA_SUCCESS; -} - - -/* - Accepts an array of octets as the next portion of the message. - - SYNOPSIS - mysql_sha1_input() - context [in/out] The SHA context to update - message_array An array of characters representing the next portion - of the message. - length The length of the message in message_array - - RETURN - SHA_SUCCESS ok - != SHA_SUCCESS sha Error Code. -*/ - -int mysql_sha1_input(SHA1_CONTEXT *context, const uint8 *message_array, - unsigned length) -{ - if (!length) - return SHA_SUCCESS; - -#ifndef DBUG_OFF - /* We assume client konows what it is doing in non-debug mode */ - if (!context || !message_array) - return SHA_NULL; - if (context->Computed) - return (context->Corrupted= SHA_STATE_ERROR); - if (context->Corrupted) - return context->Corrupted; -#endif - - while (length--) - { - context->Message_Block[context->Message_Block_Index++]= - (*message_array & 0xFF); - context->Length += 8; /* Length is in bits */ - -#ifndef DBUG_OFF - /* - Then we're not debugging we assume we never will get message longer - 2^64 bits. - */ - if (context->Length == 0) - return (context->Corrupted= 1); /* Message is too long */ -#endif - - if (context->Message_Block_Index == 64) - { - SHA1ProcessMessageBlock(context); - } - message_array++; - } - return SHA_SUCCESS; -} - - -/* - Process the next 512 bits of the message stored in the Message_Block array. - - SYNOPSIS - SHA1ProcessMessageBlock() - - DESCRIPTION - Many of the variable names in this code, especially the single - character names, were used because those were the names used in - the publication. -*/ - -/* Constants defined in SHA-1 */ -static const uint32 K[]= -{ - 0x5A827999, - 0x6ED9EBA1, - 0x8F1BBCDC, - 0xCA62C1D6 -}; - - -static void SHA1ProcessMessageBlock(SHA1_CONTEXT *context) -{ - int t; /* Loop counter */ - uint32 temp; /* Temporary word value */ - uint32 W[80]; /* Word sequence */ - uint32 A, B, C, D, E; /* Word buffers */ - int idx; - - /* - Initialize the first 16 words in the array W - */ - - for (t = 0; t < 16; t++) - { - idx=t*4; - W[t] = context->Message_Block[idx] << 24; - W[t] |= context->Message_Block[idx + 1] << 16; - W[t] |= context->Message_Block[idx + 2] << 8; - W[t] |= context->Message_Block[idx + 3]; - } - - - for (t = 16; t < 80; t++) - { - W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]); - } - - A = context->Intermediate_Hash[0]; - B = context->Intermediate_Hash[1]; - C = context->Intermediate_Hash[2]; - D = context->Intermediate_Hash[3]; - E = context->Intermediate_Hash[4]; - - for (t = 0; t < 20; t++) - { - temp= SHA1CircularShift(5,A) + ((B & C) | ((~B) & D)) + E + W[t] + K[0]; - E = D; - D = C; - C = SHA1CircularShift(30,B); - B = A; - A = temp; - } - - for (t = 20; t < 40; t++) - { - temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1]; - E = D; - D = C; - C = SHA1CircularShift(30,B); - B = A; - A = temp; - } - - for (t = 40; t < 60; t++) - { - temp= (SHA1CircularShift(5,A) + ((B & C) | (B & D) | (C & D)) + E + W[t] + - K[2]); - E = D; - D = C; - C = SHA1CircularShift(30,B); - B = A; - A = temp; - } - - for (t = 60; t < 80; t++) - { - temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3]; - E = D; - D = C; - C = SHA1CircularShift(30,B); - B = A; - A = temp; - } - - context->Intermediate_Hash[0] += A; - context->Intermediate_Hash[1] += B; - context->Intermediate_Hash[2] += C; - context->Intermediate_Hash[3] += D; - context->Intermediate_Hash[4] += E; - - context->Message_Block_Index = 0; -} - - -/* - Pad message - - SYNOPSIS - SHA1PadMessage() - context: [in/out] The context to pad - - DESCRIPTION - According to the standard, the message must be padded to an even - 512 bits. The first padding bit must be a '1'. The last 64 bits - represent the length of the original message. All bits in between - should be 0. This function will pad the message according to - those rules by filling the Message_Block array accordingly. It - will also call the ProcessMessageBlock function provided - appropriately. When it returns, it can be assumed that the message - digest has been computed. - -*/ - -static void SHA1PadMessage(SHA1_CONTEXT *context) -{ - /* - Check to see if the current message block is too small to hold - the initial padding bits and length. If so, we will pad the - block, process it, and then continue padding into a second - block. - */ - - int i=context->Message_Block_Index; - - if (i > 55) - { - context->Message_Block[i++] = 0x80; - bzero((char*) &context->Message_Block[i], - sizeof(context->Message_Block[0])*(64-i)); - context->Message_Block_Index=64; - - /* This function sets context->Message_Block_Index to zero */ - SHA1ProcessMessageBlock(context); - - bzero((char*) &context->Message_Block[0], - sizeof(context->Message_Block[0])*56); - context->Message_Block_Index=56; - } - else - { - context->Message_Block[i++] = 0x80; - bzero((char*) &context->Message_Block[i], - sizeof(context->Message_Block[0])*(56-i)); - context->Message_Block_Index=56; - } - - /* - Store the message length as the last 8 octets - */ - - context->Message_Block[56] = (int8) (context->Length >> 56); - context->Message_Block[57] = (int8) (context->Length >> 48); - context->Message_Block[58] = (int8) (context->Length >> 40); - context->Message_Block[59] = (int8) (context->Length >> 32); - context->Message_Block[60] = (int8) (context->Length >> 24); - context->Message_Block[61] = (int8) (context->Length >> 16); - context->Message_Block[62] = (int8) (context->Length >> 8); - context->Message_Block[63] = (int8) (context->Length); - - SHA1ProcessMessageBlock(context); -} diff --git a/externals/mysql/mysys/stacktrace.c b/externals/mysql/mysys/stacktrace.c deleted file mode 100644 index fc7d6e41d9..0000000000 --- a/externals/mysql/mysys/stacktrace.c +++ /dev/null @@ -1,651 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include - -#ifndef __WIN__ -#include -#include -#include -#ifdef HAVE_STACKTRACE -#include -#include - -#if HAVE_EXECINFO_H -#include -#endif - -#define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end) - -static char *heap_start; - -#ifdef HAVE_BSS_START -extern char *__bss_start; -#endif - -void my_init_stacktrace() -{ -#ifdef HAVE_BSS_START - heap_start = (char*) &__bss_start; -#endif -} - -void my_safe_print_str(const char* name, const char* val, int max_len) -{ - char *heap_end= (char*) sbrk(0); - fprintf(stderr, "%s at %p ", name, val); - - if (!PTR_SANE(val)) - { - fprintf(stderr, "is an invalid pointer\n"); - return; - } - - fprintf(stderr, "= "); - for (; max_len && PTR_SANE(val) && *val; --max_len) - fputc(*val++, stderr); - fputc('\n', stderr); -} - -#if HAVE_BACKTRACE && (HAVE_BACKTRACE_SYMBOLS || HAVE_BACKTRACE_SYMBOLS_FD) - -#if BACKTRACE_DEMANGLE - -char __attribute__ ((weak)) -*my_demangle(const char *mangled_name __attribute__((unused)), - int *status __attribute__((unused))) -{ - return NULL; -} - -static void my_demangle_symbols(char **addrs, int n) -{ - int status, i; - char *begin, *end, *demangled; - - for (i= 0; i < n; i++) - { - demangled= NULL; - begin= strchr(addrs[i], '('); - end= begin ? strchr(begin, '+') : NULL; - - if (begin && end) - { - *begin++= *end++= '\0'; - demangled= my_demangle(begin, &status); - if (!demangled || status) - { - demangled= NULL; - begin[-1]= '('; - end[-1]= '+'; - } - } - - if (demangled) - fprintf(stderr, "%s(%s+%s\n", addrs[i], demangled, end); - else - fprintf(stderr, "%s\n", addrs[i]); - } -} - -#endif /* BACKTRACE_DEMANGLE */ - -void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack) -{ - void *addrs[128]; - char **strings= NULL; - int n = backtrace(addrs, array_elements(addrs)); - fprintf(stderr, "stack_bottom = %p thread_stack 0x%lx\n", - stack_bottom, thread_stack); -#if BACKTRACE_DEMANGLE - if ((strings= backtrace_symbols(addrs, n))) - { - my_demangle_symbols(strings, n); - free(strings); - } -#endif -#if HAVE_BACKTRACE_SYMBOLS_FD - if (!strings) - { - backtrace_symbols_fd(addrs, n, fileno(stderr)); - } -#endif -} - -#elif defined(TARGET_OS_LINUX) - -#ifdef __i386__ -#define SIGRETURN_FRAME_OFFSET 17 -#endif - -#ifdef __x86_64__ -#define SIGRETURN_FRAME_OFFSET 23 -#endif - -#if defined(__alpha__) && defined(__GNUC__) -/* - The only way to backtrace without a symbol table on alpha - is to find stq fp,N(sp), and the first byte - of the instruction opcode will give us the value of N. From this - we can find where the old value of fp is stored -*/ - -#define MAX_INSTR_IN_FUNC 10000 - -inline uchar** find_prev_fp(uint32* pc, uchar** fp) -{ - int i; - for (i = 0; i < MAX_INSTR_IN_FUNC; ++i,--pc) - { - uchar* p = (uchar*)pc; - if (p[2] == 222 && p[3] == 35) - { - return (uchar**)((uchar*)fp - *(short int*)p); - } - } - return 0; -} - -inline uint32* find_prev_pc(uint32* pc, uchar** fp) -{ - int i; - for (i = 0; i < MAX_INSTR_IN_FUNC; ++i,--pc) - { - char* p = (char*)pc; - if (p[1] == 0 && p[2] == 94 && p[3] == -73) - { - uint32* prev_pc = (uint32*)*((fp+p[0]/sizeof(fp))); - return prev_pc; - } - } - return 0; -} -#endif /* defined(__alpha__) && defined(__GNUC__) */ - -void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack) -{ - uchar** fp; - uint frame_count = 0, sigreturn_frame_count; -#if defined(__alpha__) && defined(__GNUC__) - uint32* pc; -#endif - LINT_INIT(fp); - - -#ifdef __i386__ - __asm __volatile__ ("movl %%ebp,%0" - :"=r"(fp) - :"r"(fp)); -#endif -#ifdef __x86_64__ - __asm __volatile__ ("movq %%rbp,%0" - :"=r"(fp) - :"r"(fp)); -#endif -#if defined(__alpha__) && defined(__GNUC__) - __asm __volatile__ ("mov $30,%0" - :"=r"(fp) - :"r"(fp)); -#endif - if (!fp) - { - fprintf(stderr, "frame pointer is NULL, did you compile with\n\ --fomit-frame-pointer? Aborting backtrace!\n"); - return; - } - - if (!stack_bottom || (uchar*) stack_bottom > (uchar*) &fp) - { - ulong tmp= min(0x10000,thread_stack); - /* Assume that the stack starts at the previous even 65K */ - stack_bottom= (uchar*) (((ulong) &fp + tmp) & - ~(ulong) 0xFFFF); - fprintf(stderr, "Cannot determine thread, fp=%p, backtrace may not be correct.\n", fp); - } - if (fp > (uchar**) stack_bottom || - fp < (uchar**) stack_bottom - thread_stack) - { - fprintf(stderr, "Bogus stack limit or frame pointer,\ - fp=%p, stack_bottom=%p, thread_stack=%ld, aborting backtrace.\n", - fp, stack_bottom, thread_stack); - return; - } - - fprintf(stderr, "Stack range sanity check OK, backtrace follows:\n"); -#if defined(__alpha__) && defined(__GNUC__) - fprintf(stderr, "Warning: Alpha stacks are difficult -\ - will be taking some wild guesses, stack trace may be incorrect or \ - terminate abruptly\n"); - /* On Alpha, we need to get pc */ - __asm __volatile__ ("bsr %0, do_next; do_next: " - :"=r"(pc) - :"r"(pc)); -#endif /* __alpha__ */ - - /* We are 1 frame above signal frame with NPTL and 2 frames above with LT */ - sigreturn_frame_count = thd_lib_detected == THD_LIB_LT ? 2 : 1; - - while (fp < (uchar**) stack_bottom) - { -#if defined(__i386__) || defined(__x86_64__) - uchar** new_fp = (uchar**)*fp; - fprintf(stderr, "%p\n", frame_count == sigreturn_frame_count ? - *(fp + SIGRETURN_FRAME_OFFSET) : *(fp + 1)); -#endif /* defined(__386__) || defined(__x86_64__) */ - -#if defined(__alpha__) && defined(__GNUC__) - uchar** new_fp = find_prev_fp(pc, fp); - if (frame_count == sigreturn_frame_count - 1) - { - new_fp += 90; - } - - if (fp && pc) - { - pc = find_prev_pc(pc, fp); - if (pc) - fprintf(stderr, "%p\n", pc); - else - { - fprintf(stderr, "Not smart enough to deal with the rest\ - of this stack\n"); - goto end; - } - } - else - { - fprintf(stderr, "Not smart enough to deal with the rest of this stack\n"); - goto end; - } -#endif /* defined(__alpha__) && defined(__GNUC__) */ - if (new_fp <= fp ) - { - fprintf(stderr, "New value of fp=%p failed sanity check,\ - terminating stack trace!\n", new_fp); - goto end; - } - fp = new_fp; - ++frame_count; - } - - fprintf(stderr, "Stack trace seems successful - bottom reached\n"); - -end: - fprintf(stderr, - "Please read http://dev.mysql.com/doc/refman/5.1/en/resolve-stack-dump.html\n" - "and follow instructions on how to resolve the stack trace.\n" - "Resolved stack trace is much more helpful in diagnosing the\n" - "problem, so please do resolve it\n"); -} -#endif /* TARGET_OS_LINUX */ -#endif /* HAVE_STACKTRACE */ - -/* Produce a core for the thread */ -void my_write_core(int sig) -{ - signal(sig, SIG_DFL); -#ifdef HAVE_gcov - /* - For GCOV build, crashing will prevent the writing of code coverage - information from this process, causing gcov output to be incomplete. - So we force the writing of coverage information here before terminating. - */ - extern void __gcov_flush(void); - __gcov_flush(); -#endif - pthread_kill(pthread_self(), sig); -#if defined(P_MYID) && !defined(SCO) - /* On Solaris, the above kill is not enough */ - sigsend(P_PID,P_MYID,sig); -#endif -} - -#else /* __WIN__*/ - -#include -#include - -/* - Stack tracing on Windows is implemented using Debug Helper library(dbghelp.dll) - We do not redistribute dbghelp and the one comes with older OS (up to Windows 2000) - is missing some important functions like functions StackWalk64 or MinidumpWriteDump. - Hence, we have to load functions at runtime using LoadLibrary/GetProcAddress. -*/ - -typedef DWORD (WINAPI *SymSetOptions_FctType)(DWORD dwOptions); -typedef BOOL (WINAPI *SymGetModuleInfo64_FctType) - (HANDLE,DWORD64,PIMAGEHLP_MODULE64) ; -typedef BOOL (WINAPI *SymGetSymFromAddr64_FctType) - (HANDLE,DWORD64,PDWORD64,PIMAGEHLP_SYMBOL64) ; -typedef BOOL (WINAPI *SymGetLineFromAddr64_FctType) - (HANDLE,DWORD64,PDWORD,PIMAGEHLP_LINE64); -typedef BOOL (WINAPI *SymInitialize_FctType) - (HANDLE,PSTR,BOOL); -typedef BOOL (WINAPI *StackWalk64_FctType) - (DWORD,HANDLE,HANDLE,LPSTACKFRAME64,PVOID,PREAD_PROCESS_MEMORY_ROUTINE64, - PFUNCTION_TABLE_ACCESS_ROUTINE64,PGET_MODULE_BASE_ROUTINE64 , - PTRANSLATE_ADDRESS_ROUTINE64); -typedef BOOL (WINAPI *MiniDumpWriteDump_FctType)( - IN HANDLE hProcess, - IN DWORD ProcessId, - IN HANDLE hFile, - IN MINIDUMP_TYPE DumpType, - IN CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, OPTIONAL - IN CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, OPTIONAL - IN CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam OPTIONAL - ); - -static SymSetOptions_FctType pSymSetOptions; -static SymGetModuleInfo64_FctType pSymGetModuleInfo64; -static SymGetSymFromAddr64_FctType pSymGetSymFromAddr64; -static SymInitialize_FctType pSymInitialize; -static StackWalk64_FctType pStackWalk64; -static SymGetLineFromAddr64_FctType pSymGetLineFromAddr64; -static MiniDumpWriteDump_FctType pMiniDumpWriteDump; - -static EXCEPTION_POINTERS *exception_ptrs; - -#define MODULE64_SIZE_WINXP 576 -#define STACKWALK_MAX_FRAMES 64 - -void my_init_stacktrace() -{ -} - -/* - Dynamically load dbghelp functions -*/ -BOOL init_dbghelp_functions() -{ - static BOOL first_time= TRUE; - static BOOL rc; - HMODULE hDbghlp; - - if(first_time) - { - first_time= FALSE; - hDbghlp= LoadLibrary("dbghelp"); - if(!hDbghlp) - { - rc= FALSE; - return rc; - } - pSymSetOptions= (SymSetOptions_FctType) - GetProcAddress(hDbghlp,"SymSetOptions"); - pSymInitialize= (SymInitialize_FctType) - GetProcAddress(hDbghlp,"SymInitialize"); - pSymGetModuleInfo64= (SymGetModuleInfo64_FctType) - GetProcAddress(hDbghlp,"SymGetModuleInfo64"); - pSymGetLineFromAddr64= (SymGetLineFromAddr64_FctType) - GetProcAddress(hDbghlp,"SymGetLineFromAddr64"); - pSymGetSymFromAddr64=(SymGetSymFromAddr64_FctType) - GetProcAddress(hDbghlp,"SymGetSymFromAddr64"); - pStackWalk64= (StackWalk64_FctType) - GetProcAddress(hDbghlp,"StackWalk64"); - pMiniDumpWriteDump = (MiniDumpWriteDump_FctType) - GetProcAddress(hDbghlp,"MiniDumpWriteDump"); - - rc = (BOOL)(pSymSetOptions && pSymInitialize && pSymGetModuleInfo64 - && pSymGetLineFromAddr64 && pSymGetSymFromAddr64 && pStackWalk64); - } - return rc; -} - -void my_set_exception_pointers(EXCEPTION_POINTERS *ep) -{ - exception_ptrs = ep; -} - - -/* - Get symbol path - semicolon-separated list of directories to search for debug - symbols. We expect PDB in the same directory as corresponding exe or dll, - so the path is build from directories of the loaded modules. If environment - variable _NT_SYMBOL_PATH is set, it's value appended to the symbol search path -*/ -static void get_symbol_path(char *path, size_t size) -{ - HANDLE hSnap; - char *envvar; - - path[0]= '\0'; - /* - Enumerate all modules, and add their directories to the path. - Avoid duplicate entries. - */ - hSnap= CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId()); - if (hSnap != INVALID_HANDLE_VALUE) - { - BOOL ret; - MODULEENTRY32 mod; - mod.dwSize= sizeof(MODULEENTRY32); - for (ret= Module32First(hSnap, &mod); ret; ret= Module32Next(hSnap, &mod)) - { - char *module_dir= mod.szExePath; - char *p= strrchr(module_dir,'\\'); - if (!p) - { - /* - Path separator was not found. Not known to happen, if ever happens, - will indicate current directory. - */ - module_dir[0]= '.'; - p= module_dir + 1; - } - *p++= ';'; - *p= '\0'; - - if (!strstr(path, module_dir)) - { - size_t dir_len = strlen(module_dir); - if (size > dir_len) - { - strncat(path, module_dir, size-1); - size -= dir_len; - } - } - } - CloseHandle(hSnap); - } - - /* Add _NT_SYMBOL_PATH, if present. */ - envvar= getenv("_NT_SYMBOL_PATH"); - if(envvar && size) - { - strncat(path, envvar, size-1); - } -} - -#define MAX_SYMBOL_PATH 32768 - -/* Platform SDK in VS2003 does not have definition for SYMOPT_NO_PROMPTS*/ -#ifndef SYMOPT_NO_PROMPTS -#define SYMOPT_NO_PROMPTS 0 -#endif - -void my_print_stacktrace(uchar* unused1, ulong unused2) -{ - HANDLE hProcess= GetCurrentProcess(); - HANDLE hThread= GetCurrentThread(); - static IMAGEHLP_MODULE64 module= {sizeof(module)}; - static IMAGEHLP_SYMBOL64_PACKAGE package; - DWORD64 addr; - DWORD machine; - int i; - CONTEXT context; - STACKFRAME64 frame={0}; - static char symbol_path[MAX_SYMBOL_PATH]; - - if(!exception_ptrs || !init_dbghelp_functions()) - return; - - /* Copy context, as stackwalking on original will unwind the stack */ - context = *(exception_ptrs->ContextRecord); - /*Initialize symbols.*/ - pSymSetOptions(SYMOPT_LOAD_LINES|SYMOPT_NO_PROMPTS|SYMOPT_DEFERRED_LOADS|SYMOPT_DEBUG); - get_symbol_path(symbol_path, sizeof(symbol_path)); - pSymInitialize(hProcess, symbol_path, TRUE); - - /*Prepare stackframe for the first StackWalk64 call*/ - frame.AddrFrame.Mode= frame.AddrPC.Mode= frame.AddrStack.Mode= AddrModeFlat; -#if (defined _M_IX86) - machine= IMAGE_FILE_MACHINE_I386; - frame.AddrFrame.Offset= context.Ebp; - frame.AddrPC.Offset= context.Eip; - frame.AddrStack.Offset= context.Esp; -#elif (defined _M_X64) - machine = IMAGE_FILE_MACHINE_AMD64; - frame.AddrFrame.Offset= context.Rbp; - frame.AddrPC.Offset= context.Rip; - frame.AddrStack.Offset= context.Rsp; -#else - /*There is currently no need to support IA64*/ -#pragma error ("unsupported architecture") -#endif - - package.sym.SizeOfStruct= sizeof(package.sym); - package.sym.MaxNameLength= sizeof(package.name); - - /*Walk the stack, output useful information*/ - for(i= 0; i< STACKWALK_MAX_FRAMES;i++) - { - DWORD64 function_offset= 0; - DWORD line_offset= 0; - IMAGEHLP_LINE64 line= {sizeof(line)}; - BOOL have_module= FALSE; - BOOL have_symbol= FALSE; - BOOL have_source= FALSE; - - if(!pStackWalk64(machine, hProcess, hThread, &frame, &context, 0, 0, 0 ,0)) - break; - addr= frame.AddrPC.Offset; - - have_module= pSymGetModuleInfo64(hProcess,addr,&module); -#ifdef _M_IX86 - if(!have_module) - { - /* - ModuleInfo structure has been "compatibly" extended in releases after XP, - and its size was increased. To make XP dbghelp.dll function - happy, pretend passing the old structure. - */ - module.SizeOfStruct= MODULE64_SIZE_WINXP; - have_module= pSymGetModuleInfo64(hProcess, addr, &module); - } -#endif - - have_symbol= pSymGetSymFromAddr64(hProcess, addr, &function_offset, - &(package.sym)); - have_source= pSymGetLineFromAddr64(hProcess, addr, &line_offset, &line); - - fprintf(stderr, "%p ", addr); - if(have_module) - { - char *base_image_name= strrchr(module.ImageName, '\\'); - if(base_image_name) - base_image_name++; - else - base_image_name= module.ImageName; - fprintf(stderr, "%s!", base_image_name); - } - if(have_symbol) - fprintf(stderr, "%s()", package.sym.Name); - else if(have_module) - fprintf(stderr, "???"); - - if(have_source) - { - char *base_file_name= strrchr(line.FileName, '\\'); - if(base_file_name) - base_file_name++; - else - base_file_name= line.FileName; - fprintf(stderr,"[%s:%u]", base_file_name, line.LineNumber); - } - fprintf(stderr, "\n"); - } - fflush(stderr); -} - - -/* - Write dump. The dump is created in current directory, - file name is constructed from executable name plus - ".dmp" extension -*/ -void my_write_core(int unused) -{ - char path[MAX_PATH]; - char dump_fname[MAX_PATH]= "core.dmp"; - MINIDUMP_EXCEPTION_INFORMATION info; - HANDLE hFile; - - if(!exception_ptrs || !init_dbghelp_functions() || !pMiniDumpWriteDump) - return; - - info.ExceptionPointers= exception_ptrs; - info.ClientPointers= FALSE; - info.ThreadId= GetCurrentThreadId(); - - if(GetModuleFileName(NULL, path, sizeof(path))) - { - _splitpath(path, NULL, NULL,dump_fname,NULL); - strncat(dump_fname, ".dmp", sizeof(dump_fname)); - } - - hFile= CreateFile(dump_fname, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, 0); - if(hFile) - { - /* Create minidump */ - MINIDUMP_TYPE dump_type = (MINIDUMP_TYPE) - (MiniDumpWithDataSegs|MiniDumpWithPrivateReadWriteMemory); - - if(pMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), - hFile, dump_type, &info, 0, 0)) - { - fprintf(stderr, "Minidump written to %s\n", - _fullpath(path, dump_fname, sizeof(path)) ? path : dump_fname); - } - else - { - fprintf(stderr,"MiniDumpWriteDump() failed, last error %u\n", - GetLastError()); - } - CloseHandle(hFile); - } - else - { - fprintf(stderr, "CreateFile(%s) failed, last error %u\n", dump_fname, - GetLastError()); - } - fflush(stderr); -} - - -void my_safe_print_str(const char *name, const char *val, int len) -{ - fprintf(stderr,"%s at %p", name, val); - __try - { - fprintf(stderr,"=%.*s\n", len, val); - } - __except(EXCEPTION_EXECUTE_HANDLER) - { - fprintf(stderr,"is an invalid string pointer\n"); - } -} -#endif /*__WIN__*/ diff --git a/externals/mysql/mysys/string.c b/externals/mysql/mysys/string.c deleted file mode 100644 index b234a58940..0000000000 --- a/externals/mysql/mysys/string.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Code for handling strings with can grow dynamicly. - Copyright Monty Program KB. - By monty. -*/ - -#include "mysys_priv.h" -#include - -my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str, - size_t init_alloc, size_t alloc_increment) -{ - uint length; - DBUG_ENTER("init_dynamic_string"); - - if (!alloc_increment) - alloc_increment=128; - length=1; - if (init_str && (length= strlen(init_str)+1) < init_alloc) - init_alloc=((length+alloc_increment-1)/alloc_increment)*alloc_increment; - if (!init_alloc) - init_alloc=alloc_increment; - - if (!(str->str=(char*) my_malloc(init_alloc,MYF(MY_WME)))) - DBUG_RETURN(TRUE); - str->length=length-1; - if (init_str) - memcpy(str->str,init_str,length); - str->max_length=init_alloc; - str->alloc_increment=alloc_increment; - DBUG_RETURN(FALSE); -} - - -my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str) -{ - uint length=0; - DBUG_ENTER("dynstr_set"); - - if (init_str && (length= (uint) strlen(init_str)+1) > str->max_length) - { - str->max_length=((length+str->alloc_increment-1)/str->alloc_increment)* - str->alloc_increment; - if (!str->max_length) - str->max_length=str->alloc_increment; - if (!(str->str=(char*) my_realloc(str->str,str->max_length,MYF(MY_WME)))) - DBUG_RETURN(TRUE); - } - if (init_str) - { - str->length=length-1; - memcpy(str->str,init_str,length); - } - else - str->length=0; - DBUG_RETURN(FALSE); -} - - -my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size) -{ - DBUG_ENTER("dynstr_realloc"); - - if (!additional_size) DBUG_RETURN(FALSE); - if (str->length + additional_size > str->max_length) - { - str->max_length=((str->length + additional_size+str->alloc_increment-1)/ - str->alloc_increment)*str->alloc_increment; - if (!(str->str=(char*) my_realloc(str->str,str->max_length,MYF(MY_WME)))) - DBUG_RETURN(TRUE); - } - DBUG_RETURN(FALSE); -} - - -my_bool dynstr_append(DYNAMIC_STRING *str, const char *append) -{ - return dynstr_append_mem(str,append,(uint) strlen(append)); -} - - -my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, - size_t length) -{ - char *new_ptr; - if (str->length+length >= str->max_length) - { - uint new_length=(str->length+length+str->alloc_increment)/ - str->alloc_increment; - new_length*=str->alloc_increment; - if (!(new_ptr=(char*) my_realloc(str->str,new_length,MYF(MY_WME)))) - return TRUE; - str->str=new_ptr; - str->max_length=new_length; - } - memcpy(str->str + str->length,append,length); - str->length+=length; - str->str[str->length]=0; /* Safety for C programs */ - return FALSE; -} - - -my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n) -{ - str->length-=n; - str->str[str->length]= '\0'; - return FALSE; -} - -/* - Concatenates any number of strings, escapes any OS quote in the result then - surround the whole affair in another set of quotes which is finally appended - to specified DYNAMIC_STRING. This function is especially useful when - building strings to be executed with the system() function. - - @param str Dynamic String which will have addtional strings appended. - @param append String to be appended. - @param ... Optional. Additional string(s) to be appended. - - @note The final argument in the list must be NullS even if no additional - options are passed. - - @return True = Success. -*/ - -my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append, ...) -{ -#ifdef __WIN__ - const char *quote_str= "\""; - const uint quote_len= 1; -#else - const char *quote_str= "\'"; - const uint quote_len= 1; -#endif /* __WIN__ */ - my_bool ret= TRUE; - va_list dirty_text; - - ret&= dynstr_append_mem(str, quote_str, quote_len); /* Leading quote */ - va_start(dirty_text, append); - while (append != NullS) - { - const char *cur_pos= append; - const char *next_pos= cur_pos; - - /* Search for quote in each string and replace with escaped quote */ - while(*(next_pos= strcend(cur_pos, quote_str[0])) != '\0') - { - ret&= dynstr_append_mem(str, cur_pos, next_pos - cur_pos); - ret&= dynstr_append_mem(str ,"\\", 1); - ret&= dynstr_append_mem(str, quote_str, quote_len); - cur_pos= next_pos + 1; - } - ret&= dynstr_append_mem(str, cur_pos, next_pos - cur_pos); - append= va_arg(dirty_text, char *); - } - va_end(dirty_text); - ret&= dynstr_append_mem(str, quote_str, quote_len); /* Trailing quote */ - - return ret; -} - - -void dynstr_free(DYNAMIC_STRING *str) -{ - if (str->str) - { - my_free(str->str,MYF(MY_WME)); - str->str=0; - } -} diff --git a/externals/mysql/mysys/test_fn.c b/externals/mysql/mysys/test_fn.c deleted file mode 100644 index 249cc87839..0000000000 --- a/externals/mysql/mysys/test_fn.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "mysys_priv.h" - -const char *test_names[]= -{ - "/usr/my/include/srclib/myfunc/dbug/test", - "test", - "dbug/test", - "/usr/my/srclib/myfunc/dbug/test", - "/usr/monty/oldcopy/jazz/setupp.frm", - "~/monty.tst", - "~/dbug/monty.tst", - "./hejsan", - "./dbug/test", - "../dbug/test", - "../myfunc/test", - "../../monty/rutedit", - "/usr/monty//usr/monty/rutedit", - "/usr/./monty/rutedit", - "/usr/my/../monty/rutedit", - "/usr/my/~/rutedit", - "~/../my", - "~/../my/srclib/myfunc/test", - "~/../my/srclib/myfunc/./dbug/test", - "/../usr/my/srclib/dbug", - "c/../my", - "/c/../my", - NullS, -}; - -int main(int argc __attribute__((unused)), char **argv) -{ - const char **pos; - char buff[FN_REFLEN],buff2[FN_REFLEN]; - DBUG_ENTER ("main"); - DBUG_PROCESS (argv[0]); - MY_INIT(argv[0]); - - if (argv[1] && argv[1][1] == '#') - DBUG_PUSH(argv[1]+2); - - for (pos=test_names; *pos ; pos++) - { - printf("org : '%s'\n",*pos); - printf("pack: '%s'\n",fn_format(buff,*pos,"","",8)); - printf("unpack: '%s'\n",fn_format(buff2,*pos,"","",4)); - unpack_filename(buff,buff); - if (strcmp(buff,buff2) != 0) - { - printf("error on cmp: '%s' != '%s'\n",buff,buff2); - } - puts(""); - } - DBUG_RETURN(0); -} diff --git a/externals/mysql/mysys/test_xml.c b/externals/mysql/mysys/test_xml.c deleted file mode 100644 index 0cb10e1c8d..0000000000 --- a/externals/mysql/mysys/test_xml.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include "my_xml.h" - -static void mstr(char *str,const char *src,uint l1,uint l2) -{ - l1 = l1 - -#if defined(THREAD) && !defined(DONT_USE_THR_ALARM) -#include -#include -#include -#include -#include -#include -#include "thr_alarm.h" - -#ifdef HAVE_SYS_SELECT_H -#include /* AIX needs this for fd_set */ -#endif - -#ifndef ETIME -#define ETIME ETIMEDOUT -#endif - -uint thr_client_alarm; -static int alarm_aborted=1; /* No alarm thread */ -my_bool thr_alarm_inited= 0; -volatile my_bool alarm_thread_running= 0; -time_t next_alarm_expire_time= ~ (time_t) 0; -static sig_handler process_alarm_part2(int sig); - -#if !defined(__WIN__) - -static pthread_mutex_t LOCK_alarm; -static pthread_cond_t COND_alarm; -static sigset_t full_signal_set; -static QUEUE alarm_queue; -static uint max_used_alarms=0; -pthread_t alarm_thread; - -#ifdef USE_ALARM_THREAD -static void *alarm_handler(void *arg); -#define reschedule_alarms() pthread_cond_signal(&COND_alarm) -#else -#define reschedule_alarms() pthread_kill(alarm_thread,THR_SERVER_ALARM) -#endif - -static sig_handler thread_alarm(int sig __attribute__((unused))); - -static int compare_ulong(void *not_used __attribute__((unused)), - uchar *a_ptr,uchar* b_ptr) -{ - ulong a=*((ulong*) a_ptr),b= *((ulong*) b_ptr); - return (a < b) ? -1 : (a == b) ? 0 : 1; -} - -void init_thr_alarm(uint max_alarms) -{ - sigset_t s; - DBUG_ENTER("init_thr_alarm"); - alarm_aborted=0; - next_alarm_expire_time= ~ (time_t) 0; - init_queue(&alarm_queue,max_alarms+1,offsetof(ALARM,expire_time),0, - compare_ulong,NullS); - sigfillset(&full_signal_set); /* Neaded to block signals */ - pthread_mutex_init(&LOCK_alarm,MY_MUTEX_INIT_FAST); - pthread_cond_init(&COND_alarm,NULL); - if (thd_lib_detected == THD_LIB_LT) - thr_client_alarm= SIGALRM; - else - thr_client_alarm= SIGUSR1; -#ifndef USE_ALARM_THREAD - if (thd_lib_detected != THD_LIB_LT) -#endif - { - my_sigset(thr_client_alarm, thread_alarm); - } - sigemptyset(&s); - sigaddset(&s, THR_SERVER_ALARM); - alarm_thread=pthread_self(); -#if defined(USE_ALARM_THREAD) - { - pthread_attr_t thr_attr; - pthread_attr_init(&thr_attr); - pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_PROCESS); - pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED); - pthread_attr_setstacksize(&thr_attr,8196); - pthread_create(&alarm_thread,&thr_attr,alarm_handler,NULL); - pthread_attr_destroy(&thr_attr); - } -#elif defined(USE_ONE_SIGNAL_HAND) - pthread_sigmask(SIG_BLOCK, &s, NULL); /* used with sigwait() */ - if (thd_lib_detected == THD_LIB_LT) - { - my_sigset(thr_client_alarm, process_alarm); /* Linuxthreads */ - pthread_sigmask(SIG_UNBLOCK, &s, NULL); - } -#else - my_sigset(THR_SERVER_ALARM, process_alarm); - pthread_sigmask(SIG_UNBLOCK, &s, NULL); -#endif - DBUG_VOID_RETURN; -} - - -void resize_thr_alarm(uint max_alarms) -{ - pthread_mutex_lock(&LOCK_alarm); - /* - It's ok not to shrink the queue as there may be more pending alarms than - than max_alarms - */ - if (alarm_queue.elements < max_alarms) - resize_queue(&alarm_queue,max_alarms+1); - pthread_mutex_unlock(&LOCK_alarm); -} - - -/* - Request alarm after sec seconds. - - SYNOPSIS - thr_alarm() - alrm Pointer to alarm detection - alarm_data Structure to store in alarm queue - - NOTES - This function can't be called from the alarm-handling thread. - - RETURN VALUES - 0 ok - 1 If no more alarms are allowed (aborted by process) - - Stores in first argument a pointer to a non-zero int which is set to 0 - when the alarm has been given -*/ - -my_bool thr_alarm(thr_alarm_t *alrm, uint sec, ALARM *alarm_data) -{ - time_t now; -#ifndef USE_ONE_SIGNAL_HAND - sigset_t old_mask; -#endif - my_bool reschedule; - struct st_my_thread_var *current_my_thread_var= my_thread_var; - DBUG_ENTER("thr_alarm"); - DBUG_PRINT("enter",("thread: %s sec: %d",my_thread_name(),sec)); - - now= my_time(0); -#ifndef USE_ONE_SIGNAL_HAND - pthread_sigmask(SIG_BLOCK,&full_signal_set,&old_mask); -#endif - pthread_mutex_lock(&LOCK_alarm); /* Lock from threads & alarms */ - if (alarm_aborted > 0) - { /* No signal thread */ - DBUG_PRINT("info", ("alarm aborted")); - *alrm= 0; /* No alarm */ - pthread_mutex_unlock(&LOCK_alarm); -#ifndef USE_ONE_SIGNAL_HAND - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); -#endif - DBUG_RETURN(1); - } - if (alarm_aborted < 0) - sec= 1; /* Abort mode */ - - if (alarm_queue.elements >= max_used_alarms) - { - if (alarm_queue.elements == alarm_queue.max_elements) - { - DBUG_PRINT("info", ("alarm queue full")); - fprintf(stderr,"Warning: thr_alarm queue is full\n"); - *alrm= 0; /* No alarm */ - pthread_mutex_unlock(&LOCK_alarm); -#ifndef USE_ONE_SIGNAL_HAND - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); -#endif - DBUG_RETURN(1); - } - max_used_alarms=alarm_queue.elements+1; - } - reschedule= (ulong) next_alarm_expire_time > (ulong) now + sec; - if (!alarm_data) - { - if (!(alarm_data=(ALARM*) my_malloc(sizeof(ALARM),MYF(MY_WME)))) - { - DBUG_PRINT("info", ("failed my_malloc()")); - *alrm= 0; /* No alarm */ - pthread_mutex_unlock(&LOCK_alarm); -#ifndef USE_ONE_SIGNAL_HAND - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); -#endif - DBUG_RETURN(1); - } - alarm_data->malloced=1; - } - else - alarm_data->malloced=0; - alarm_data->expire_time=now+sec; - alarm_data->alarmed=0; - alarm_data->thread= current_my_thread_var->pthread_self; - alarm_data->thread_id= current_my_thread_var->id; - queue_insert(&alarm_queue,(uchar*) alarm_data); - - /* Reschedule alarm if the current one has more than sec left */ - if (reschedule) - { - DBUG_PRINT("info", ("reschedule")); - if (pthread_equal(pthread_self(),alarm_thread)) - { - alarm(sec); /* purecov: inspected */ - next_alarm_expire_time= now + sec; - } - else - reschedule_alarms(); /* Reschedule alarms */ - } - pthread_mutex_unlock(&LOCK_alarm); -#ifndef USE_ONE_SIGNAL_HAND - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); -#endif - (*alrm)= &alarm_data->alarmed; - DBUG_RETURN(0); -} - - -/* - Remove alarm from list of alarms -*/ - -void thr_end_alarm(thr_alarm_t *alarmed) -{ - ALARM *alarm_data; -#ifndef USE_ONE_SIGNAL_HAND - sigset_t old_mask; -#endif - uint i, found=0; - DBUG_ENTER("thr_end_alarm"); - -#ifndef USE_ONE_SIGNAL_HAND - pthread_sigmask(SIG_BLOCK,&full_signal_set,&old_mask); -#endif - pthread_mutex_lock(&LOCK_alarm); - - alarm_data= (ALARM*) ((uchar*) *alarmed - offsetof(ALARM,alarmed)); - for (i=0 ; i < alarm_queue.elements ; i++) - { - if ((ALARM*) queue_element(&alarm_queue,i) == alarm_data) - { - queue_remove(&alarm_queue,i),MYF(0); - if (alarm_data->malloced) - my_free((uchar*) alarm_data,MYF(0)); - found++; -#ifdef DBUG_OFF - break; -#endif - } - } - DBUG_ASSERT(!*alarmed || found == 1); - if (!found) - { - if (*alarmed) - fprintf(stderr,"Warning: Didn't find alarm 0x%lx in queue of %d alarms\n", - (long) *alarmed, alarm_queue.elements); - DBUG_PRINT("warning",("Didn't find alarm %p in queue\n", - *alarmed)); - } - pthread_mutex_unlock(&LOCK_alarm); -#ifndef USE_ONE_SIGNAL_HAND - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); -#endif - DBUG_VOID_RETURN; -} - -/* - Come here when some alarm in queue is due. - Mark all alarms with are finnished in list. - Shedule alarms to be sent again after 1-10 sec (many alarms at once) - If alarm_aborted is set then all alarms are given and resent - every second. -*/ - -sig_handler process_alarm(int sig __attribute__((unused))) -{ - sigset_t old_mask; -/* - This must be first as we can't call DBUG inside an alarm for a normal thread -*/ - - if (thd_lib_detected == THD_LIB_LT && - !pthread_equal(pthread_self(),alarm_thread)) - { -#if defined(MAIN) && !defined(__bsdi__) - printf("thread_alarm in process_alarm\n"); fflush(stdout); -#endif -#ifdef DONT_REMEMBER_SIGNAL - my_sigset(thr_client_alarm, process_alarm); /* int. thread system calls */ -#endif - return; - } - - /* - We have to do do the handling of the alarm in a sub function, - because otherwise we would get problems with two threads calling - DBUG_... functions at the same time (as two threads may call - process_alarm() at the same time - */ - -#ifndef USE_ALARM_THREAD - pthread_sigmask(SIG_SETMASK,&full_signal_set,&old_mask); - pthread_mutex_lock(&LOCK_alarm); -#endif - process_alarm_part2(sig); -#ifndef USE_ALARM_THREAD -#if defined(DONT_REMEMBER_SIGNAL) && !defined(USE_ONE_SIGNAL_HAND) - my_sigset(THR_SERVER_ALARM,process_alarm); -#endif - pthread_mutex_unlock(&LOCK_alarm); - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); -#endif - return; -} - - -static sig_handler process_alarm_part2(int sig __attribute__((unused))) -{ - ALARM *alarm_data; - DBUG_ENTER("process_alarm"); - DBUG_PRINT("info",("sig: %d active alarms: %d",sig,alarm_queue.elements)); - -#if defined(MAIN) && !defined(__bsdi__) - printf("process_alarm\n"); fflush(stdout); -#endif - if (alarm_queue.elements) - { - if (alarm_aborted) - { - uint i; - for (i=0 ; i < alarm_queue.elements ;) - { - alarm_data=(ALARM*) queue_element(&alarm_queue,i); - alarm_data->alarmed=1; /* Info to thread */ - if (pthread_equal(alarm_data->thread,alarm_thread) || - pthread_kill(alarm_data->thread, thr_client_alarm)) - { -#ifdef MAIN - printf("Warning: pthread_kill couldn't find thread!!!\n"); -#endif - queue_remove(&alarm_queue,i); /* No thread. Remove alarm */ - } - else - i++; /* Signal next thread */ - } -#ifndef USE_ALARM_THREAD - if (alarm_queue.elements) - alarm(1); /* Signal soon again */ -#endif - } - else - { - ulong now=(ulong) my_time(0); - ulong next=now+10-(now%10); - while ((alarm_data=(ALARM*) queue_top(&alarm_queue))->expire_time <= now) - { - alarm_data->alarmed=1; /* Info to thread */ - DBUG_PRINT("info",("sending signal to waiting thread")); - if (pthread_equal(alarm_data->thread,alarm_thread) || - pthread_kill(alarm_data->thread, thr_client_alarm)) - { -#ifdef MAIN - printf("Warning: pthread_kill couldn't find thread!!!\n"); -#endif - queue_remove(&alarm_queue,0); /* No thread. Remove alarm */ - if (!alarm_queue.elements) - break; - } - else - { - alarm_data->expire_time=next; - queue_replaced(&alarm_queue); - } - } -#ifndef USE_ALARM_THREAD - if (alarm_queue.elements) - { -#ifdef __bsdi__ - alarm(0); /* Remove old alarm */ -#endif - alarm((uint) (alarm_data->expire_time-now)); - next_alarm_expire_time= alarm_data->expire_time; - } -#endif - } - } - else - { - /* - Ensure that next time we call thr_alarm(), we will schedule a new alarm - */ - next_alarm_expire_time= ~(time_t) 0; - } - DBUG_VOID_RETURN; -} - - -/* - Schedule all alarms now and optionally free all structures - - SYNPOSIS - end_thr_alarm() - free_structures Set to 1 if we should free memory used for - the alarm queue. - When we call this we should KNOW that there - is no active alarms - IMPLEMENTATION - Set alarm_abort to -1 which will change the behavior of alarms as follows: - - All old alarms will be rescheduled at once - - All new alarms will be rescheduled to one second -*/ - -void end_thr_alarm(my_bool free_structures) -{ - DBUG_ENTER("end_thr_alarm"); - if (alarm_aborted != 1) /* If memory not freed */ - { - pthread_mutex_lock(&LOCK_alarm); - DBUG_PRINT("info",("Resheduling %d waiting alarms",alarm_queue.elements)); - alarm_aborted= -1; /* mark aborted */ - if (alarm_queue.elements || (alarm_thread_running && free_structures)) - { - if (pthread_equal(pthread_self(),alarm_thread)) - alarm(1); /* Shut down everything soon */ - else - reschedule_alarms(); - } - if (free_structures) - { - struct timespec abstime; - - DBUG_ASSERT(!alarm_queue.elements); - - /* Wait until alarm thread dies */ - set_timespec(abstime, 10); /* Wait up to 10 seconds */ - while (alarm_thread_running) - { - int error= pthread_cond_timedwait(&COND_alarm, &LOCK_alarm, &abstime); - if (error == ETIME || error == ETIMEDOUT) - break; /* Don't wait forever */ - } - delete_queue(&alarm_queue); - alarm_aborted= 1; - pthread_mutex_unlock(&LOCK_alarm); - if (!alarm_thread_running) /* Safety */ - { - pthread_mutex_destroy(&LOCK_alarm); - pthread_cond_destroy(&COND_alarm); - } - } - else - pthread_mutex_unlock(&LOCK_alarm); - } - DBUG_VOID_RETURN; -} - - -/* - Remove another thread from the alarm -*/ - -void thr_alarm_kill(my_thread_id thread_id) -{ - uint i; - if (alarm_aborted) - return; - pthread_mutex_lock(&LOCK_alarm); - for (i=0 ; i < alarm_queue.elements ; i++) - { - if (((ALARM*) queue_element(&alarm_queue,i))->thread_id == thread_id) - { - ALARM *tmp=(ALARM*) queue_remove(&alarm_queue,i); - tmp->expire_time=0; - queue_insert(&alarm_queue,(uchar*) tmp); - reschedule_alarms(); - break; - } - } - pthread_mutex_unlock(&LOCK_alarm); -} - - -void thr_alarm_info(ALARM_INFO *info) -{ - pthread_mutex_lock(&LOCK_alarm); - info->next_alarm_time= 0; - info->max_used_alarms= max_used_alarms; - if ((info->active_alarms= alarm_queue.elements)) - { - ulong now=(ulong) my_time(0); - long time_diff; - ALARM *alarm_data= (ALARM*) queue_top(&alarm_queue); - time_diff= (long) (alarm_data->expire_time - now); - info->next_alarm_time= (ulong) (time_diff < 0 ? 0 : time_diff); - } - pthread_mutex_unlock(&LOCK_alarm); -} - -/* - This is here for thread to get interruptet from read/write/fcntl - ARGSUSED -*/ - - -static sig_handler thread_alarm(int sig) -{ -#ifdef MAIN - printf("thread_alarm\n"); fflush(stdout); -#endif -#ifdef DONT_REMEMBER_SIGNAL - my_sigset(sig,thread_alarm); /* int. thread system calls */ -#endif -} - - -#ifdef HAVE_TIMESPEC_TS_SEC -#define tv_sec ts_sec -#define tv_nsec ts_nsec -#endif - -/* set up a alarm thread with uses 'sleep' to sleep between alarms */ - -#ifdef USE_ALARM_THREAD -static void *alarm_handler(void *arg __attribute__((unused))) -{ - int error; - struct timespec abstime; -#ifdef MAIN - puts("Starting alarm thread"); -#endif - my_thread_init(); - alarm_thread_running= 1; - pthread_mutex_lock(&LOCK_alarm); - for (;;) - { - if (alarm_queue.elements) - { - ulong sleep_time,now= my_time(0); - if (alarm_aborted) - sleep_time=now+1; - else - sleep_time= ((ALARM*) queue_top(&alarm_queue))->expire_time; - if (sleep_time > now) - { - abstime.tv_sec=sleep_time; - abstime.tv_nsec=0; - next_alarm_expire_time= sleep_time; - if ((error=pthread_cond_timedwait(&COND_alarm,&LOCK_alarm,&abstime)) && - error != ETIME && error != ETIMEDOUT) - { -#ifdef MAIN - printf("Got error: %d from ptread_cond_timedwait (errno: %d)\n", - error,errno); -#endif - } - } - } - else if (alarm_aborted == -1) - break; - else - { - next_alarm_expire_time= ~ (time_t) 0; - if ((error=pthread_cond_wait(&COND_alarm,&LOCK_alarm))) - { -#ifdef MAIN - printf("Got error: %d from ptread_cond_wait (errno: %d)\n", - error,errno); -#endif - } - } - process_alarm(0); - } - bzero((char*) &alarm_thread,sizeof(alarm_thread)); /* For easy debugging */ - alarm_thread_running= 0; - pthread_cond_signal(&COND_alarm); - pthread_mutex_unlock(&LOCK_alarm); - pthread_exit(0); - return 0; /* Impossible */ -} -#endif /* USE_ALARM_THREAD */ - -/***************************************************************************** - thr_alarm for win95 -*****************************************************************************/ - -#else /* __WIN__ */ - -void thr_alarm_kill(my_thread_id thread_id) -{ - /* Can't do this yet */ -} - -sig_handler process_alarm(int sig __attribute__((unused))) -{ - /* Can't do this yet */ -} - - -my_bool thr_alarm(thr_alarm_t *alrm, uint sec, ALARM *alarm) -{ - (*alrm)= &alarm->alarmed; - if (alarm_aborted) - { - alarm->alarmed.crono=0; - return 1; - } - if (!(alarm->alarmed.crono=SetTimer((HWND) NULL,0, sec*1000, - (TIMERPROC) NULL))) - return 1; - return 0; -} - - -my_bool thr_got_alarm(thr_alarm_t *alrm_ptr) -{ - thr_alarm_t alrm= *alrm_ptr; - MSG msg; - if (alrm->crono) - { - PeekMessage(&msg,NULL,WM_TIMER,WM_TIMER,PM_REMOVE) ; - if (msg.message == WM_TIMER || alarm_aborted) - { - KillTimer(NULL, alrm->crono); - alrm->crono = 0; - } - } - return !alrm->crono || alarm_aborted; -} - - -void thr_end_alarm(thr_alarm_t *alrm_ptr) -{ - thr_alarm_t alrm= *alrm_ptr; - /* alrm may be zero if thr_alarm aborted with an error */ - if (alrm && alrm->crono) - - { - KillTimer(NULL, alrm->crono); - alrm->crono = 0; - } -} - -void end_thr_alarm(my_bool free_structures) -{ - DBUG_ENTER("end_thr_alarm"); - alarm_aborted=1; /* No more alarms */ - DBUG_VOID_RETURN; -} - -void init_thr_alarm(uint max_alarm) -{ - DBUG_ENTER("init_thr_alarm"); - alarm_aborted=0; /* Yes, Gimmie alarms */ - DBUG_VOID_RETURN; -} - -void thr_alarm_info(ALARM_INFO *info) -{ - bzero((char*) info, sizeof(*info)); -} - -void resize_thr_alarm(uint max_alarms) -{ -} - -#endif /* __WIN__ */ - -#endif /* THREAD */ - - -/**************************************************************************** - Handling of test case (when compiled with -DMAIN) -***************************************************************************/ - -#ifdef MAIN -#if defined(THREAD) && !defined(DONT_USE_THR_ALARM) - -static pthread_cond_t COND_thread_count; -static pthread_mutex_t LOCK_thread_count; -static uint thread_count; - -#ifdef HPUX10 -typedef int * fd_set_ptr; -#else -typedef fd_set * fd_set_ptr; -#endif /* HPUX10 */ - -static void *test_thread(void *arg) -{ - int i,param=*((int*) arg),wait_time,retry; - time_t start_time; - thr_alarm_t got_alarm; - fd_set fd; - FD_ZERO(&fd); - my_thread_init(); - printf("Thread %d (%s) started\n",param,my_thread_name()); fflush(stdout); - for (i=1 ; i <= 10 ; i++) - { - wait_time=param ? 11-i : i; - start_time= my_time(0); - if (thr_alarm(&got_alarm,wait_time,0)) - { - printf("Thread: %s Alarms aborted\n",my_thread_name()); - break; - } - if (wait_time == 3) - { - printf("Thread: %s Simulation of no alarm needed\n",my_thread_name()); - fflush(stdout); - } - else - { - for (retry=0 ; !thr_got_alarm(&got_alarm) && retry < 10 ; retry++) - { - printf("Thread: %s Waiting %d sec\n",my_thread_name(),wait_time); - select(0,(fd_set_ptr) &fd,0,0,0); - } - if (!thr_got_alarm(&got_alarm)) - { - printf("Thread: %s didn't get an alarm. Aborting!\n", - my_thread_name()); - break; - } - if (wait_time == 7) - { /* Simulate alarm-miss */ - fd_set readFDs; - uint max_connection=fileno(stdin); - FD_ZERO(&readFDs); - FD_SET(max_connection,&readFDs); - retry=0; - for (;;) - { - printf("Thread: %s Simulating alarm miss\n",my_thread_name()); - fflush(stdout); - if (select(max_connection+1, (fd_set_ptr) &readFDs,0,0,0) < 0) - { - if (errno == EINTR) - break; /* Got new interrupt */ - printf("Got errno: %d from select. Retrying..\n",errno); - if (retry++ >= 3) - { - printf("Warning: Interrupt of select() doesn't set errno!\n"); - break; - } - } - else /* This shouldn't happen */ - { - if (!FD_ISSET(max_connection,&readFDs)) - { - printf("Select interrupted, but errno not set\n"); - fflush(stdout); - if (retry++ >= 3) - break; - continue; - } - (void) getchar(); /* Somebody was playing */ - } - } - } - } - printf("Thread: %s Slept for %d (%d) sec\n",my_thread_name(), - (int) (my_time(0)-start_time), wait_time); fflush(stdout); - thr_end_alarm(&got_alarm); - fflush(stdout); - } - pthread_mutex_lock(&LOCK_thread_count); - thread_count--; - pthread_cond_signal(&COND_thread_count); /* Tell main we are ready */ - pthread_mutex_unlock(&LOCK_thread_count); - free((uchar*) arg); - return 0; -} - -#ifdef USE_ONE_SIGNAL_HAND -static sig_handler print_signal_warning(int sig) -{ - printf("Warning: Got signal %d from thread %s\n",sig,my_thread_name()); - fflush(stdout); -#ifdef DONT_REMEMBER_SIGNAL - my_sigset(sig,print_signal_warning); /* int. thread system calls */ -#endif - if (sig == SIGALRM) - alarm(2); /* reschedule alarm */ -} -#endif /* USE_ONE_SIGNAL_HAND */ - - -static void *signal_hand(void *arg __attribute__((unused))) -{ - sigset_t set; - int sig,error,err_count=0;; - - my_thread_init(); - pthread_detach_this_thread(); - init_thr_alarm(10); /* Setup alarm handler */ - pthread_mutex_lock(&LOCK_thread_count); /* Required by bsdi */ - pthread_cond_signal(&COND_thread_count); /* Tell main we are ready */ - pthread_mutex_unlock(&LOCK_thread_count); - - sigemptyset(&set); /* Catch all signals */ - sigaddset(&set,SIGINT); - sigaddset(&set,SIGQUIT); - sigaddset(&set,SIGTERM); - sigaddset(&set,SIGHUP); -#ifdef SIGTSTP - sigaddset(&set,SIGTSTP); -#endif -#ifdef USE_ONE_SIGNAL_HAND - sigaddset(&set,THR_SERVER_ALARM); /* For alarms */ - puts("Starting signal and alarm handling thread"); -#else - puts("Starting signal handling thread"); -#endif - printf("server alarm: %d thread alarm: %d\n", - THR_SERVER_ALARM, thr_client_alarm); - DBUG_PRINT("info",("Starting signal and alarm handling thread")); - for(;;) - { - while ((error=my_sigwait(&set,&sig)) == EINTR) - printf("sigwait restarted\n"); - if (error) - { - fprintf(stderr,"Got error %d from sigwait\n",error); - if (err_count++ > 5) - exit(1); /* Too many errors in test */ - continue; - } -#ifdef USE_ONE_SIGNAL_HAND - if (sig != THR_SERVER_ALARM) -#endif - printf("Main thread: Got signal %d\n",sig); - switch (sig) { - case SIGINT: - case SIGQUIT: - case SIGTERM: - case SIGHUP: - printf("Aborting nicely\n"); - end_thr_alarm(0); - break; -#ifdef SIGTSTP - case SIGTSTP: - printf("Aborting\n"); - exit(1); - return 0; /* Keep some compilers happy */ -#endif -#ifdef USE_ONE_SIGNAL_HAND - case THR_SERVER_ALARM: - process_alarm(sig); - break; -#endif - } - } -} - - -int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) -{ - pthread_t tid; - pthread_attr_t thr_attr; - int i,*param,error; - sigset_t set; - ALARM_INFO alarm_info; - MY_INIT(argv[0]); - - if (argc > 1 && argv[1][0] == '-' && argv[1][1] == '#') - { - DBUG_PUSH(argv[1]+2); - } - pthread_mutex_init(&LOCK_thread_count,MY_MUTEX_INIT_FAST); - pthread_cond_init(&COND_thread_count,NULL); - - /* Start a alarm handling thread */ - sigemptyset(&set); - sigaddset(&set,SIGINT); - sigaddset(&set,SIGQUIT); - sigaddset(&set,SIGTERM); - sigaddset(&set,SIGHUP); - signal(SIGTERM,SIG_DFL); /* If it's blocked by parent */ -#ifdef SIGTSTP - sigaddset(&set,SIGTSTP); -#endif - sigaddset(&set,THR_SERVER_ALARM); - sigdelset(&set, thr_client_alarm); - (void) pthread_sigmask(SIG_SETMASK,&set,NULL); -#ifdef NOT_USED - sigemptyset(&set); - sigaddset(&set, thr_client_alarm); - pthread_sigmask(SIG_UNBLOCK, &set, (sigset_t*) 0); -#endif - - pthread_attr_init(&thr_attr); - pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_PROCESS); - pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED); - pthread_attr_setstacksize(&thr_attr,65536L); - - /* Start signal thread and wait for it to start */ - pthread_mutex_lock(&LOCK_thread_count); - pthread_create(&tid,&thr_attr,signal_hand,NULL); - pthread_cond_wait(&COND_thread_count,&LOCK_thread_count); - pthread_mutex_unlock(&LOCK_thread_count); - DBUG_PRINT("info",("signal thread created")); - - thr_setconcurrency(3); - pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_PROCESS); - printf("Main thread: %s\n",my_thread_name()); - for (i=0 ; i < 2 ; i++) - { - param=(int*) malloc(sizeof(int)); - *param= i; - pthread_mutex_lock(&LOCK_thread_count); - if ((error=pthread_create(&tid,&thr_attr,test_thread,(void*) param))) - { - printf("Can't create thread %d, error: %d\n",i,error); - exit(1); - } - thread_count++; - pthread_mutex_unlock(&LOCK_thread_count); - } - - pthread_attr_destroy(&thr_attr); - pthread_mutex_lock(&LOCK_thread_count); - thr_alarm_info(&alarm_info); - printf("Main_thread: Alarms: %u max_alarms: %u next_alarm_time: %lu\n", - alarm_info.active_alarms, alarm_info.max_used_alarms, - alarm_info.next_alarm_time); - while (thread_count) - { - pthread_cond_wait(&COND_thread_count,&LOCK_thread_count); - if (thread_count == 1) - { - printf("Calling end_thr_alarm. This should cancel the last thread\n"); - end_thr_alarm(0); - } - } - pthread_mutex_unlock(&LOCK_thread_count); - thr_alarm_info(&alarm_info); - end_thr_alarm(1); - printf("Main_thread: Alarms: %u max_alarms: %u next_alarm_time: %lu\n", - alarm_info.active_alarms, alarm_info.max_used_alarms, - alarm_info.next_alarm_time); - printf("Test succeeded\n"); - return 0; -} - -#else /* THREAD */ - -int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) -{ -#ifndef THREAD - printf("thr_alarm disabled because we are not using threads\n"); -#else - printf("thr_alarm disabled with DONT_USE_THR_ALARM\n"); -#endif - exit(1); -} - -#endif /* THREAD */ -#endif /* MAIN */ diff --git a/externals/mysql/mysys/thr_lock.c b/externals/mysql/mysys/thr_lock.c deleted file mode 100644 index f9f32933fd..0000000000 --- a/externals/mysql/mysys/thr_lock.c +++ /dev/null @@ -1,1687 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* -Read and write locks for Posix threads. All tread must acquire -all locks it needs through thr_multi_lock() to avoid dead-locks. -A lock consists of a master lock (THR_LOCK), and lock instances -(THR_LOCK_DATA). -Any thread can have any number of lock instances (read and write:s) on -any lock. All lock instances must be freed. -Locks are prioritized according to: - -The current lock types are: - -TL_READ # Low priority read -TL_READ_WITH_SHARED_LOCKS -TL_READ_HIGH_PRIORITY # High priority read -TL_READ_NO_INSERT # Read without concurrent inserts -TL_WRITE_ALLOW_WRITE # Write lock that allows other writers -TL_WRITE_ALLOW_READ # Write lock, but allow reading -TL_WRITE_CONCURRENT_INSERT - # Insert that can be mixed when selects -TL_WRITE_DELAYED # Used by delayed insert - # Allows lower locks to take over -TL_WRITE_LOW_PRIORITY # Low priority write -TL_WRITE # High priority write -TL_WRITE_ONLY # High priority write - # Abort all new lock request with an error - -Locks are prioritized according to: - -WRITE_ALLOW_WRITE, WRITE_ALLOW_READ, WRITE_CONCURRENT_INSERT, WRITE_DELAYED, -WRITE_LOW_PRIORITY, READ, WRITE, READ_HIGH_PRIORITY and WRITE_ONLY - -Locks in the same privilege level are scheduled in first-in-first-out order. - -To allow concurrent read/writes locks, with 'WRITE_CONCURRENT_INSERT' one -should put a pointer to the following functions in the lock structure: -(If the pointer is zero (default), the function is not called) - -check_status: - Before giving a lock of type TL_WRITE_CONCURRENT_INSERT, - we check if this function exists and returns 0. - If not, then the lock is upgraded to TL_WRITE_LOCK - In MyISAM this is a simple check if the insert can be done - at the end of the datafile. -update_status: - in thr_reschedule_write_lock(), when an insert delayed thread - downgrades TL_WRITE lock to TL_WRITE_DELAYED, to allow SELECT - threads to proceed. - A storage engine should also call update_status internally - in the ::external_lock(F_UNLCK) method. - In MyISAM and CSV this functions updates the length of the datafile. -get_status: - When one gets a lock this functions is called. - In MyISAM this stores the number of rows and size of the datafile - for concurrent reads. - -The lock algorithm allows one to have one TL_WRITE_ALLOW_READ, -TL_WRITE_CONCURRENT_INSERT or one TL_WRITE_DELAYED lock at the same -time as multiple read locks. - -In addition, if lock->allow_multiple_concurrent_insert is set then there can -be any number of TL_WRITE_CONCURRENT_INSERT locks aktive at the same time. -*/ - -#if !defined(MAIN) && !defined(DBUG_OFF) && !defined(EXTRA_DEBUG) -#define FORCE_DBUG_OFF -#endif - -#include "mysys_priv.h" - -#ifdef THREAD -#include "thr_lock.h" -#include -#include - -my_bool thr_lock_inited=0; -ulong locks_immediate = 0L, locks_waited = 0L; -ulong table_lock_wait_timeout; -enum thr_lock_type thr_upgraded_concurrent_insert_lock = TL_WRITE; - -/* The following constants are only for debug output */ -#define MAX_THREADS 100 -#define MAX_LOCKS 100 - - -LIST *thr_lock_thread_list; /* List of threads in use */ -ulong max_write_lock_count= ~(ulong) 0L; - -static inline pthread_cond_t *get_cond(void) -{ - return &my_thread_var->suspend; -} - -/* -** For the future (now the thread specific cond is alloced by my_pthread.c) -*/ - -my_bool init_thr_lock() -{ - thr_lock_inited=1; - return 0; -} - -static inline my_bool -thr_lock_owner_equal(THR_LOCK_OWNER *rhs, THR_LOCK_OWNER *lhs) -{ - return rhs == lhs; -} - - -#ifdef EXTRA_DEBUG -#define MAX_FOUND_ERRORS 10 /* Report 10 first errors */ -static uint found_errors=0; - -static int check_lock(struct st_lock_list *list, const char* lock_type, - const char *where, my_bool same_owner, my_bool no_cond) -{ - THR_LOCK_DATA *data,**prev; - uint count=0; - THR_LOCK_OWNER *first_owner; - LINT_INIT(first_owner); - - prev= &list->data; - if (list->data) - { - enum thr_lock_type last_lock_type=list->data->type; - - if (same_owner && list->data) - first_owner= list->data->owner; - for (data=list->data; data && count++ < MAX_LOCKS ; data=data->next) - { - if (data->type != last_lock_type) - last_lock_type=TL_IGNORE; - if (data->prev != prev) - { - fprintf(stderr, - "Warning: prev link %d didn't point at previous lock at %s: %s\n", - count, lock_type, where); - return 1; - } - if (same_owner && - !thr_lock_owner_equal(data->owner, first_owner) && - last_lock_type != TL_WRITE_ALLOW_WRITE && - last_lock_type != TL_WRITE_CONCURRENT_INSERT) - { - fprintf(stderr, - "Warning: Found locks from different threads in %s: %s\n", - lock_type,where); - return 1; - } - if (no_cond && data->cond) - { - fprintf(stderr, - "Warning: Found active lock with not reset cond %s: %s\n", - lock_type,where); - return 1; - } - prev= &data->next; - } - if (data) - { - fprintf(stderr,"Warning: found too many locks at %s: %s\n", - lock_type,where); - return 1; - } - } - if (prev != list->last) - { - fprintf(stderr,"Warning: last didn't point at last lock at %s: %s\n", - lock_type, where); - return 1; - } - return 0; -} - - -static void check_locks(THR_LOCK *lock, const char *where, - my_bool allow_no_locks) -{ - uint old_found_errors=found_errors; - DBUG_ENTER("check_locks"); - - if (found_errors < MAX_FOUND_ERRORS) - { - if (check_lock(&lock->write,"write",where,1,1) | - check_lock(&lock->write_wait,"write_wait",where,0,0) | - check_lock(&lock->read,"read",where,0,1) | - check_lock(&lock->read_wait,"read_wait",where,0,0)) - found_errors++; - - if (found_errors < MAX_FOUND_ERRORS) - { - uint count=0; - THR_LOCK_DATA *data; - for (data=lock->read.data ; data ; data=data->next) - { - if (data->type == TL_READ_NO_INSERT) - count++; - /* Protect against infinite loop. */ - DBUG_ASSERT(count <= lock->read_no_write_count); - } - if (count != lock->read_no_write_count) - { - found_errors++; - fprintf(stderr, - "Warning at '%s': Locks read_no_write_count was %u when it should have been %u\n", where, lock->read_no_write_count,count); - } - - if (!lock->write.data) - { - if (!allow_no_locks && !lock->read.data && - (lock->write_wait.data || lock->read_wait.data)) - { - found_errors++; - fprintf(stderr, - "Warning at '%s': No locks in use but locks are in wait queue\n", - where); - } - if (!lock->write_wait.data) - { - if (!allow_no_locks && lock->read_wait.data) - { - found_errors++; - fprintf(stderr, - "Warning at '%s': No write locks and waiting read locks\n", - where); - } - } - else - { - if (!allow_no_locks && - (((lock->write_wait.data->type == TL_WRITE_CONCURRENT_INSERT || - lock->write_wait.data->type == TL_WRITE_ALLOW_WRITE) && - !lock->read_no_write_count) || - lock->write_wait.data->type == TL_WRITE_ALLOW_READ || - (lock->write_wait.data->type == TL_WRITE_DELAYED && - !lock->read.data))) - { - found_errors++; - fprintf(stderr, - "Warning at '%s': Write lock %d waiting while no exclusive read locks\n",where,(int) lock->write_wait.data->type); - } - } - } - else - { - /* We have at least one write lock */ - if (lock->write.data->type == TL_WRITE_CONCURRENT_INSERT) - { - THR_LOCK_DATA *data; - for (data=lock->write.data->next ; data ; data=data->next) - { - if (data->type != TL_WRITE_CONCURRENT_INSERT) - { - fprintf(stderr, - "Warning at '%s': Found TL_WRITE_CONCURRENT_INSERT lock mixed with other write locks\n", - where); - break; - } - } - } - if (lock->write_wait.data) - { - if (!allow_no_locks && - lock->write.data->type == TL_WRITE_ALLOW_WRITE && - lock->write_wait.data->type == TL_WRITE_ALLOW_WRITE) - { - found_errors++; - fprintf(stderr, - "Warning at '%s': Found WRITE_ALLOW_WRITE lock waiting for WRITE_ALLOW_WRITE lock\n", - where); - } - } - if (lock->read.data) - { - if (!thr_lock_owner_equal(lock->write.data->owner, - lock->read.data->owner) && - ((lock->write.data->type > TL_WRITE_DELAYED && - lock->write.data->type != TL_WRITE_ONLY) || - ((lock->write.data->type == TL_WRITE_CONCURRENT_INSERT || - lock->write.data->type == TL_WRITE_ALLOW_WRITE) && - lock->read_no_write_count))) - { - found_errors++; - fprintf(stderr, - "Warning at '%s': Found lock of type %d that is write and read locked\n", - where, lock->write.data->type); - DBUG_PRINT("warning",("At '%s': Found lock of type %d that is write and read locked\n", - where, lock->write.data->type)); - - } - } - if (lock->read_wait.data) - { - if (!allow_no_locks && lock->write.data->type <= TL_WRITE_DELAYED && - lock->read_wait.data->type <= TL_READ_HIGH_PRIORITY) - { - found_errors++; - fprintf(stderr, - "Warning at '%s': Found read lock of type %d waiting for write lock of type %d\n", - where, - (int) lock->read_wait.data->type, - (int) lock->write.data->type); - } - } - } - } - if (found_errors != old_found_errors) - { - fflush(stderr); - DBUG_PRINT("error",("Found wrong lock")); - } - } - DBUG_VOID_RETURN; -} - -#else /* EXTRA_DEBUG */ -#define check_locks(A,B,C) -#endif - - - /* Initialize a lock */ - -void thr_lock_init(THR_LOCK *lock) -{ - DBUG_ENTER("thr_lock_init"); - bzero((char*) lock,sizeof(*lock)); - pthread_mutex_init(&lock->mutex,MY_MUTEX_INIT_FAST); - lock->read.last= &lock->read.data; - lock->read_wait.last= &lock->read_wait.data; - lock->write_wait.last= &lock->write_wait.data; - lock->write.last= &lock->write.data; - - pthread_mutex_lock(&THR_LOCK_lock); /* Add to locks in use */ - lock->list.data=(void*) lock; - thr_lock_thread_list=list_add(thr_lock_thread_list,&lock->list); - pthread_mutex_unlock(&THR_LOCK_lock); - DBUG_VOID_RETURN; -} - - -void thr_lock_delete(THR_LOCK *lock) -{ - DBUG_ENTER("thr_lock_delete"); - pthread_mutex_lock(&THR_LOCK_lock); - thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list); - pthread_mutex_unlock(&THR_LOCK_lock); - pthread_mutex_destroy(&lock->mutex); - DBUG_VOID_RETURN; -} - - -void thr_lock_info_init(THR_LOCK_INFO *info) -{ - struct st_my_thread_var *tmp= my_thread_var; - info->thread= tmp->pthread_self; - info->thread_id= tmp->id; - info->n_cursors= 0; -} - - /* Initialize a lock instance */ - -void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data, void *param) -{ - data->lock=lock; - data->type=TL_UNLOCK; - data->owner= 0; /* no owner yet */ - data->status_param=param; - data->cond=0; -} - - -static inline my_bool -have_old_read_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner) -{ - for ( ; data ; data=data->next) - { - if (thr_lock_owner_equal(data->owner, owner)) - return 1; /* Already locked by thread */ - } - return 0; -} - -static inline my_bool have_specific_lock(THR_LOCK_DATA *data, - enum thr_lock_type type) -{ - for ( ; data ; data=data->next) - { - if (data->type == type) - return 1; - } - return 0; -} - - -static void wake_up_waiters(THR_LOCK *lock); - -static enum enum_thr_lock_result -wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, - my_bool in_wait_list) -{ - struct st_my_thread_var *thread_var= my_thread_var; - pthread_cond_t *cond= &thread_var->suspend; - struct timespec wait_timeout; - enum enum_thr_lock_result result= THR_LOCK_ABORTED; - my_bool can_deadlock= test(data->owner->info->n_cursors); - const char *old_proc_info; - DBUG_ENTER("wait_for_lock"); - - /* - One can use this to signal when a thread is going to wait for a lock. - See debug_sync.cc. - - Beware of waiting for a signal here. The lock has aquired its mutex. - While waiting on a signal here, the locking thread could not aquire - the mutex to release the lock. One could lock up the table - completely. - - In detail it works so: When thr_lock() tries to acquire a table - lock, it locks the lock->mutex, checks if it can have the lock, and - if not, it calls wait_for_lock(). Here it unlocks the table lock - while waiting on a condition. The sync point is located before this - wait for condition. If we have a waiting action here, we hold the - the table locks mutex all the time. Any attempt to look at the table - lock by another thread blocks it immediately on lock->mutex. This - can easily become an unexpected and unobvious blockage. So be - warned: Do not request a WAIT_FOR action for the 'wait_for_lock' - sync point unless you really know what you do. - */ - DEBUG_SYNC_C("wait_for_lock"); - - if (!in_wait_list) - { - (*wait->last)=data; /* Wait for lock */ - data->prev= wait->last; - wait->last= &data->next; - } - - statistic_increment(locks_waited, &THR_LOCK_lock); - - /* Set up control struct to allow others to abort locks */ - thread_var->current_mutex= &data->lock->mutex; - thread_var->current_cond= cond; - data->cond= cond; - - old_proc_info= proc_info_hook(NULL, "Table lock", - __func__, __FILE__, __LINE__); - - if (can_deadlock) - set_timespec(wait_timeout, table_lock_wait_timeout); - while (!thread_var->abort || in_wait_list) - { - int rc= (can_deadlock ? - pthread_cond_timedwait(cond, &data->lock->mutex, - &wait_timeout) : - pthread_cond_wait(cond, &data->lock->mutex)); - /* - We must break the wait if one of the following occurs: - - the connection has been aborted (!thread_var->abort), but - this is not a delayed insert thread (in_wait_list). For a delayed - insert thread the proper action at shutdown is, apparently, to - acquire the lock and complete the insert. - - the lock has been granted (data->cond is set to NULL by the granter), - or the waiting has been aborted (additionally data->type is set to - TL_UNLOCK). - - the wait has timed out (rc == ETIMEDOUT) - Order of checks below is important to not report about timeout - if the predicate is true. - */ - if (data->cond == 0) - { - DBUG_PRINT("thr_lock", ("lock granted/aborted")); - break; - } - if (rc == ETIMEDOUT || rc == ETIME) - { - /* purecov: begin inspected */ - DBUG_PRINT("thr_lock", ("lock timed out")); - result= THR_LOCK_WAIT_TIMEOUT; - break; - /* purecov: end */ - } - } - DBUG_PRINT("thr_lock", ("aborted: %d in_wait_list: %d", - thread_var->abort, in_wait_list)); - - if (data->cond || data->type == TL_UNLOCK) - { - if (data->cond) /* aborted or timed out */ - { - if (((*data->prev)=data->next)) /* remove from wait-list */ - data->next->prev= data->prev; - else - wait->last=data->prev; - data->type= TL_UNLOCK; /* No lock */ - check_locks(data->lock, "killed or timed out wait_for_lock", 1); - wake_up_waiters(data->lock); - } - else - { - DBUG_PRINT("thr_lock", ("lock aborted")); - check_locks(data->lock, "aborted wait_for_lock", 0); - } - } - else - { - result= THR_LOCK_SUCCESS; - if (data->lock->get_status) - (*data->lock->get_status)(data->status_param, - data->type == TL_WRITE_CONCURRENT_INSERT); - check_locks(data->lock,"got wait_for_lock",0); - } - pthread_mutex_unlock(&data->lock->mutex); - - /* The following must be done after unlock of lock->mutex */ - pthread_mutex_lock(&thread_var->mutex); - thread_var->current_mutex= 0; - thread_var->current_cond= 0; - pthread_mutex_unlock(&thread_var->mutex); - - proc_info_hook(NULL, old_proc_info, __func__, __FILE__, __LINE__); - - DBUG_RETURN(result); -} - - -enum enum_thr_lock_result -thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner, - enum thr_lock_type lock_type) -{ - THR_LOCK *lock=data->lock; - enum enum_thr_lock_result result= THR_LOCK_SUCCESS; - struct st_lock_list *wait_queue; - THR_LOCK_DATA *lock_owner; - DBUG_ENTER("thr_lock"); - - data->next=0; - data->cond=0; /* safety */ - data->type=lock_type; - data->owner= owner; /* Must be reset ! */ - pthread_mutex_lock(&lock->mutex); - DBUG_PRINT("lock",("data: %p thread: 0x%lx lock: %p type: %d", - data, data->owner->info->thread_id, - lock, (int) lock_type)); - check_locks(lock,(uint) lock_type <= (uint) TL_READ_NO_INSERT ? - "enter read_lock" : "enter write_lock",0); - if ((int) lock_type <= (int) TL_READ_NO_INSERT) - { - /* Request for READ lock */ - if (lock->write.data) - { - /* - We can allow a read lock even if there is already a write lock - on the table in one the following cases: - - This thread alread have a write lock on the table - - The write lock is TL_WRITE_ALLOW_READ or TL_WRITE_DELAYED - and the read lock is TL_READ_HIGH_PRIORITY or TL_READ - - The write lock is TL_WRITE_CONCURRENT_INSERT or TL_WRITE_ALLOW_WRITE - and the read lock is not TL_READ_NO_INSERT - */ - - DBUG_PRINT("lock",("write locked 1 by thread: 0x%lx", - lock->write.data->owner->info->thread_id)); - if (thr_lock_owner_equal(data->owner, lock->write.data->owner) || - (lock->write.data->type <= TL_WRITE_DELAYED && - (((int) lock_type <= (int) TL_READ_HIGH_PRIORITY) || - (lock->write.data->type != TL_WRITE_CONCURRENT_INSERT && - lock->write.data->type != TL_WRITE_ALLOW_READ)))) - { /* Already got a write lock */ - (*lock->read.last)=data; /* Add to running FIFO */ - data->prev=lock->read.last; - lock->read.last= &data->next; - if (lock_type == TL_READ_NO_INSERT) - lock->read_no_write_count++; - check_locks(lock,"read lock with old write lock",0); - if (lock->get_status) - (*lock->get_status)(data->status_param, 0); - statistic_increment(locks_immediate,&THR_LOCK_lock); - goto end; - } - if (lock->write.data->type == TL_WRITE_ONLY) - { - /* We are not allowed to get a READ lock in this case */ - data->type=TL_UNLOCK; - result= THR_LOCK_ABORTED; /* Can't wait for this one */ - goto end; - } - } - else if (!lock->write_wait.data || - lock->write_wait.data->type <= TL_WRITE_LOW_PRIORITY || - lock_type == TL_READ_HIGH_PRIORITY || - have_old_read_lock(lock->read.data, data->owner)) - { /* No important write-locks */ - (*lock->read.last)=data; /* Add to running FIFO */ - data->prev=lock->read.last; - lock->read.last= &data->next; - if (lock_type == TL_READ_NO_INSERT) - lock->read_no_write_count++; - check_locks(lock,"read lock with no write locks",0); - if (lock->get_status) - (*lock->get_status)(data->status_param, 0); - statistic_increment(locks_immediate,&THR_LOCK_lock); - goto end; - } - /* - We're here if there is an active write lock or no write - lock but a high priority write waiting in the write_wait queue. - In the latter case we should yield the lock to the writer. - */ - wait_queue= &lock->read_wait; - } - else /* Request for WRITE lock */ - { - if (lock_type == TL_WRITE_DELAYED) - { - if (lock->write.data && lock->write.data->type == TL_WRITE_ONLY) - { - data->type=TL_UNLOCK; - result= THR_LOCK_ABORTED; /* Can't wait for this one */ - goto end; - } - /* - if there is a TL_WRITE_ALLOW_READ lock, we have to wait for a lock - (TL_WRITE_ALLOW_READ is used for ALTER TABLE in MySQL) - */ - if ((!lock->write.data || - lock->write.data->type != TL_WRITE_ALLOW_READ) && - !have_specific_lock(lock->write_wait.data,TL_WRITE_ALLOW_READ) && - (lock->write.data || lock->read.data)) - { - /* Add delayed write lock to write_wait queue, and return at once */ - (*lock->write_wait.last)=data; - data->prev=lock->write_wait.last; - lock->write_wait.last= &data->next; - data->cond=get_cond(); - /* - We don't have to do get_status here as we will do it when we change - the delayed lock to a real write lock - */ - statistic_increment(locks_immediate,&THR_LOCK_lock); - goto end; - } - } - else if (lock_type == TL_WRITE_CONCURRENT_INSERT && ! lock->check_status) - data->type=lock_type= thr_upgraded_concurrent_insert_lock; - - if (lock->write.data) /* If there is a write lock */ - { - if (lock->write.data->type == TL_WRITE_ONLY) - { - /* purecov: begin tested */ - /* Allow lock owner to bypass TL_WRITE_ONLY. */ - if (!thr_lock_owner_equal(data->owner, lock->write.data->owner)) - { - /* We are not allowed to get a lock in this case */ - data->type=TL_UNLOCK; - result= THR_LOCK_ABORTED; /* Can't wait for this one */ - goto end; - } - /* purecov: end */ - } - - /* - The following test will not work if the old lock was a - TL_WRITE_ALLOW_WRITE, TL_WRITE_ALLOW_READ or TL_WRITE_DELAYED in - the same thread, but this will never happen within MySQL. - - The idea is to allow us to get a lock at once if we already have - a write lock or if there is no pending write locks and if all - write locks are of the same type and are either - TL_WRITE_ALLOW_WRITE or TL_WRITE_CONCURRENT_INSERT - */ - if (thr_lock_owner_equal(data->owner, lock->write.data->owner) || - (!lock->write_wait.data && lock_type == lock->write.data->type && - (lock_type == TL_WRITE_ALLOW_WRITE || - (lock_type == TL_WRITE_CONCURRENT_INSERT && - lock->allow_multiple_concurrent_insert)))) - { - DBUG_PRINT("info", ("write_wait.data: %p old_type: %d", - lock->write_wait.data, - lock->write.data->type)); - - (*lock->write.last)=data; /* Add to running fifo */ - data->prev=lock->write.last; - lock->write.last= &data->next; - check_locks(lock,"second write lock",0); - if (lock->get_status) - (*lock->get_status)(data->status_param, - lock_type == TL_WRITE_CONCURRENT_INSERT); - statistic_increment(locks_immediate,&THR_LOCK_lock); - goto end; - } - DBUG_PRINT("lock",("write locked 2 by thread: 0x%lx", - lock->write.data->owner->info->thread_id)); - } - else - { - DBUG_PRINT("info", ("write_wait.data: %p", - lock->write_wait.data)); - if (!lock->write_wait.data) - { /* no scheduled write locks */ - my_bool concurrent_insert= 0; - if (lock_type == TL_WRITE_CONCURRENT_INSERT) - { - concurrent_insert= 1; - if ((*lock->check_status)(data->status_param)) - { - concurrent_insert= 0; - data->type=lock_type= thr_upgraded_concurrent_insert_lock; - } - } - - if (!lock->read.data || - (lock_type <= TL_WRITE_DELAYED && - ((lock_type != TL_WRITE_CONCURRENT_INSERT && - lock_type != TL_WRITE_ALLOW_WRITE) || - !lock->read_no_write_count))) - { - (*lock->write.last)=data; /* Add as current write lock */ - data->prev=lock->write.last; - lock->write.last= &data->next; - if (lock->get_status) - (*lock->get_status)(data->status_param, concurrent_insert); - check_locks(lock,"only write lock",0); - statistic_increment(locks_immediate,&THR_LOCK_lock); - goto end; - } - } - DBUG_PRINT("lock",("write locked 3 by thread: 0x%lx type: %d", - lock->read.data->owner->info->thread_id, data->type)); - } - wait_queue= &lock->write_wait; - } - /* - Try to detect a trivial deadlock when using cursors: attempt to - lock a table that is already locked by an open cursor within the - same connection. lock_owner can be zero if we succumbed to a high - priority writer in the write_wait queue. - */ - lock_owner= lock->read.data ? lock->read.data : lock->write.data; - if (lock_owner && lock_owner->owner->info == owner->info) - { - DBUG_PRINT("lock",("deadlock")); - result= THR_LOCK_DEADLOCK; - goto end; - } - /* Can't get lock yet; Wait for it */ - DBUG_RETURN(wait_for_lock(wait_queue, data, 0)); -end: - pthread_mutex_unlock(&lock->mutex); - DBUG_RETURN(result); -} - - -static inline void free_all_read_locks(THR_LOCK *lock, - my_bool using_concurrent_insert) -{ - THR_LOCK_DATA *data=lock->read_wait.data; - - check_locks(lock,"before freeing read locks",1); - - /* move all locks from read_wait list to read list */ - (*lock->read.last)=data; - data->prev=lock->read.last; - lock->read.last=lock->read_wait.last; - - /* Clear read_wait list */ - lock->read_wait.last= &lock->read_wait.data; - - do - { - pthread_cond_t *cond=data->cond; - if ((int) data->type == (int) TL_READ_NO_INSERT) - { - if (using_concurrent_insert) - { - /* - We can't free this lock; - Link lock away from read chain back into read_wait chain - */ - if (((*data->prev)=data->next)) - data->next->prev=data->prev; - else - lock->read.last=data->prev; - *lock->read_wait.last= data; - data->prev= lock->read_wait.last; - lock->read_wait.last= &data->next; - continue; - } - lock->read_no_write_count++; - } - /* purecov: begin inspected */ - DBUG_PRINT("lock",("giving read lock to thread: 0x%lx", - data->owner->info->thread_id)); - /* purecov: end */ - data->cond=0; /* Mark thread free */ - pthread_cond_signal(cond); - } while ((data=data->next)); - *lock->read_wait.last=0; - if (!lock->read_wait.data) - lock->write_lock_count=0; - check_locks(lock,"after giving read locks",0); -} - - /* Unlock lock and free next thread on same lock */ - -void thr_unlock(THR_LOCK_DATA *data) -{ - THR_LOCK *lock=data->lock; - enum thr_lock_type lock_type=data->type; - DBUG_ENTER("thr_unlock"); - DBUG_PRINT("lock",("data: %p thread: 0x%lx lock: %p", - data, data->owner->info->thread_id, lock)); - pthread_mutex_lock(&lock->mutex); - check_locks(lock,"start of release lock",0); - - if (((*data->prev)=data->next)) /* remove from lock-list */ - data->next->prev= data->prev; - else if (lock_type <= TL_READ_NO_INSERT) - lock->read.last=data->prev; - else if (lock_type == TL_WRITE_DELAYED && data->cond) - { - /* - This only happens in extreme circumstances when a - write delayed lock that is waiting for a lock - */ - lock->write_wait.last=data->prev; /* Put it on wait queue */ - } - else - lock->write.last=data->prev; - if (lock_type == TL_READ_NO_INSERT) - lock->read_no_write_count--; - data->type=TL_UNLOCK; /* Mark unlocked */ - check_locks(lock,"after releasing lock",1); - wake_up_waiters(lock); - pthread_mutex_unlock(&lock->mutex); - DBUG_VOID_RETURN; -} - - -/** - @brief Wake up all threads which pending requests for the lock - can be satisfied. - - @param lock Lock for which threads should be woken up - -*/ - -static void wake_up_waiters(THR_LOCK *lock) -{ - THR_LOCK_DATA *data; - enum thr_lock_type lock_type; - DBUG_ENTER("wake_up_waiters"); - - if (!lock->write.data) /* If no active write locks */ - { - data=lock->write_wait.data; - if (!lock->read.data) /* If no more locks in use */ - { - /* Release write-locks with TL_WRITE or TL_WRITE_ONLY priority first */ - if (data && - (data->type != TL_WRITE_LOW_PRIORITY || !lock->read_wait.data || - lock->read_wait.data->type < TL_READ_HIGH_PRIORITY)) - { - if (lock->write_lock_count++ > max_write_lock_count) - { - /* Too many write locks in a row; Release all waiting read locks */ - lock->write_lock_count=0; - if (lock->read_wait.data) - { - DBUG_PRINT("info",("Freeing all read_locks because of max_write_lock_count")); - free_all_read_locks(lock,0); - goto end; - } - } - for (;;) - { - if (((*data->prev)=data->next)) /* remove from wait-list */ - data->next->prev= data->prev; - else - lock->write_wait.last=data->prev; - (*lock->write.last)=data; /* Put in execute list */ - data->prev=lock->write.last; - data->next=0; - lock->write.last= &data->next; - if (data->type == TL_WRITE_CONCURRENT_INSERT && - (*lock->check_status)(data->status_param)) - data->type=TL_WRITE; /* Upgrade lock */ - /* purecov: begin inspected */ - DBUG_PRINT("lock",("giving write lock of type %d to thread: 0x%lx", - data->type, data->owner->info->thread_id)); - /* purecov: end */ - { - pthread_cond_t *cond=data->cond; - data->cond=0; /* Mark thread free */ - pthread_cond_signal(cond); /* Start waiting thread */ - } - if (data->type != TL_WRITE_ALLOW_WRITE || - !lock->write_wait.data || - lock->write_wait.data->type != TL_WRITE_ALLOW_WRITE) - break; - data=lock->write_wait.data; /* Free this too */ - } - if (data->type >= TL_WRITE_LOW_PRIORITY) - goto end; - /* Release possible read locks together with the write lock */ - } - if (lock->read_wait.data) - free_all_read_locks(lock, - data && - (data->type == TL_WRITE_CONCURRENT_INSERT || - data->type == TL_WRITE_ALLOW_WRITE)); - else - { - DBUG_PRINT("lock",("No waiting read locks to free")); - } - } - else if (data && - (lock_type=data->type) <= TL_WRITE_DELAYED && - ((lock_type != TL_WRITE_CONCURRENT_INSERT && - lock_type != TL_WRITE_ALLOW_WRITE) || - !lock->read_no_write_count)) - { - /* - For DELAYED, ALLOW_READ, WRITE_ALLOW_WRITE or CONCURRENT_INSERT locks - start WRITE locks together with the READ locks - */ - if (lock_type == TL_WRITE_CONCURRENT_INSERT && - (*lock->check_status)(data->status_param)) - { - data->type=TL_WRITE; /* Upgrade lock */ - if (lock->read_wait.data) - free_all_read_locks(lock,0); - goto end; - } - do { - pthread_cond_t *cond=data->cond; - if (((*data->prev)=data->next)) /* remove from wait-list */ - data->next->prev= data->prev; - else - lock->write_wait.last=data->prev; - (*lock->write.last)=data; /* Put in execute list */ - data->prev=lock->write.last; - lock->write.last= &data->next; - data->next=0; /* Only one write lock */ - data->cond=0; /* Mark thread free */ - pthread_cond_signal(cond); /* Start waiting thread */ - } while (lock_type == TL_WRITE_ALLOW_WRITE && - (data=lock->write_wait.data) && - data->type == TL_WRITE_ALLOW_WRITE); - if (lock->read_wait.data) - free_all_read_locks(lock, - (lock_type == TL_WRITE_CONCURRENT_INSERT || - lock_type == TL_WRITE_ALLOW_WRITE)); - } - else if (!data && lock->read_wait.data) - free_all_read_locks(lock,0); - } -end: - check_locks(lock, "after waking up waiters", 0); - DBUG_VOID_RETURN; -} - - -/* -** Get all locks in a specific order to avoid dead-locks -** Sort acording to lock position and put write_locks before read_locks if -** lock on same lock. -*/ - - -#define LOCK_CMP(A,B) ((uchar*) (A->lock) - (uint) ((A)->type) < (uchar*) (B->lock)- (uint) ((B)->type)) - -static void sort_locks(THR_LOCK_DATA **data,uint count) -{ - THR_LOCK_DATA **pos,**end,**prev,*tmp; - - /* Sort locks with insertion sort (fast because almost always few locks) */ - - for (pos=data+1,end=data+count; pos < end ; pos++) - { - tmp= *pos; - if (LOCK_CMP(tmp,pos[-1])) - { - prev=pos; - do { - prev[0]=prev[-1]; - } while (--prev != data && LOCK_CMP(tmp,prev[-1])); - prev[0]=tmp; - } - } -} - - -enum enum_thr_lock_result -thr_multi_lock(THR_LOCK_DATA **data, uint count, THR_LOCK_OWNER *owner) -{ - THR_LOCK_DATA **pos,**end; - DBUG_ENTER("thr_multi_lock"); - DBUG_PRINT("lock",("data: %p count: %d", data, count)); - if (count > 1) - sort_locks(data,count); - /* lock everything */ - for (pos=data,end=data+count; pos < end ; pos++) - { - enum enum_thr_lock_result result= thr_lock(*pos, owner, (*pos)->type); - if (result != THR_LOCK_SUCCESS) - { /* Aborted */ - thr_multi_unlock(data,(uint) (pos-data)); - DBUG_RETURN(result); - } -#ifdef MAIN - printf("Thread: %s Got lock: 0x%lx type: %d\n",my_thread_name(), - (long) pos[0]->lock, pos[0]->type); fflush(stdout); -#endif - } - thr_lock_merge_status(data, count); - DBUG_RETURN(THR_LOCK_SUCCESS); -} - - -/** - Ensure that all locks for a given table have the same - status_param. - - This is a MyISAM and possibly Maria specific crutch. MyISAM - engine stores data file length, record count and other table - properties in status_param member of handler. When a table is - locked, connection-local copy is made from a global copy - (myisam_share) by mi_get_status(). When a table is unlocked, - the changed status is transferred back to the global share by - mi_update_status(). - - One thing MyISAM doesn't do is to ensure that when the same - table is opened twice in a connection all instances share the - same status_param. This is necessary, however: for one, to keep - all instances of a connection "on the same page" with regard to - the current state of the table. For other, unless this is done, - myisam_share will always get updated from the last unlocked - instance (in mi_update_status()), and when this instance was not - the one that was used to update data, records may be lost. - - For each table, this function looks up the last lock_data in the - list of acquired locks, and makes sure that all other instances - share status_param with it. -*/ - -void -thr_lock_merge_status(THR_LOCK_DATA **data, uint count) -{ -#if !defined(DONT_USE_RW_LOCKS) - THR_LOCK_DATA **pos= data; - THR_LOCK_DATA **end= data + count; - if (count > 1) - { - THR_LOCK_DATA *last_lock= end[-1]; - pos=end-1; - do - { - pos--; - if (last_lock->lock == (*pos)->lock && - last_lock->lock->copy_status) - { - if (last_lock->type <= TL_READ_NO_INSERT) - { - THR_LOCK_DATA **read_lock; - /* - If we are locking the same table with read locks we must ensure - that all tables share the status of the last write lock or - the same read lock. - */ - for (; - (*pos)->type <= TL_READ_NO_INSERT && - pos != data && - pos[-1]->lock == (*pos)->lock ; - pos--) ; - - read_lock = pos+1; - do - { - (last_lock->lock->copy_status)((*read_lock)->status_param, - (*pos)->status_param); - } while (*(read_lock++) != last_lock); - last_lock= (*pos); /* Point at last write lock */ - } - else - (*last_lock->lock->copy_status)((*pos)->status_param, - last_lock->status_param); - } - else - last_lock=(*pos); - } while (pos != data); - } -#endif -} - - /* free all locks */ - -void thr_multi_unlock(THR_LOCK_DATA **data,uint count) -{ - THR_LOCK_DATA **pos,**end; - DBUG_ENTER("thr_multi_unlock"); - DBUG_PRINT("lock",("data: %p count: %d", data, count)); - - for (pos=data,end=data+count; pos < end ; pos++) - { -#ifdef MAIN - printf("Thread: %s Rel lock: 0x%lx type: %d\n", - my_thread_name(), (long) pos[0]->lock, pos[0]->type); - fflush(stdout); -#endif - if ((*pos)->type != TL_UNLOCK) - thr_unlock(*pos); - else - { - DBUG_PRINT("lock",("Free lock: data: %p thread: 0x%lx lock: %p", - *pos, (*pos)->owner->info->thread_id, - (*pos)->lock)); - } - } - DBUG_VOID_RETURN; -} - -/* - Abort all threads waiting for a lock. The lock will be upgraded to - TL_WRITE_ONLY to abort any new accesses to the lock -*/ - -void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock) -{ - THR_LOCK_DATA *data; - DBUG_ENTER("thr_abort_locks"); - pthread_mutex_lock(&lock->mutex); - - for (data=lock->read_wait.data; data ; data=data->next) - { - data->type=TL_UNLOCK; /* Mark killed */ - /* It's safe to signal the cond first: we're still holding the mutex. */ - pthread_cond_signal(data->cond); - data->cond=0; /* Removed from list */ - } - for (data=lock->write_wait.data; data ; data=data->next) - { - data->type=TL_UNLOCK; - pthread_cond_signal(data->cond); - data->cond=0; - } - lock->read_wait.last= &lock->read_wait.data; - lock->write_wait.last= &lock->write_wait.data; - lock->read_wait.data=lock->write_wait.data=0; - if (upgrade_lock && lock->write.data) - lock->write.data->type=TL_WRITE_ONLY; - pthread_mutex_unlock(&lock->mutex); - DBUG_VOID_RETURN; -} - - -/* - Abort all locks for specific table/thread combination - - This is used to abort all locks for a specific thread -*/ - -my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread_id) -{ - THR_LOCK_DATA *data; - my_bool found= FALSE; - DBUG_ENTER("thr_abort_locks_for_thread"); - - pthread_mutex_lock(&lock->mutex); - for (data= lock->read_wait.data; data ; data= data->next) - { - if (data->owner->info->thread_id == thread_id) /* purecov: tested */ - { - DBUG_PRINT("info",("Aborting read-wait lock")); - data->type= TL_UNLOCK; /* Mark killed */ - /* It's safe to signal the cond first: we're still holding the mutex. */ - found= TRUE; - pthread_cond_signal(data->cond); - data->cond= 0; /* Removed from list */ - - if (((*data->prev)= data->next)) - data->next->prev= data->prev; - else - lock->read_wait.last= data->prev; - } - } - for (data= lock->write_wait.data; data ; data= data->next) - { - if (data->owner->info->thread_id == thread_id) /* purecov: tested */ - { - DBUG_PRINT("info",("Aborting write-wait lock")); - data->type= TL_UNLOCK; - found= TRUE; - pthread_cond_signal(data->cond); - data->cond= 0; - - if (((*data->prev)= data->next)) - data->next->prev= data->prev; - else - lock->write_wait.last= data->prev; - } - } - wake_up_waiters(lock); - pthread_mutex_unlock(&lock->mutex); - DBUG_RETURN(found); -} - - -/* - Downgrade a WRITE_* to a lower WRITE level - SYNOPSIS - thr_downgrade_write_lock() - in_data Lock data of thread downgrading its lock - new_lock_type New write lock type - RETURN VALUE - NONE - DESCRIPTION - This can be used to downgrade a lock already owned. When the downgrade - occurs also other waiters, both readers and writers can be allowed to - start. - The previous lock is often TL_WRITE_ONLY but can also be - TL_WRITE and TL_WRITE_ALLOW_READ. The normal downgrade variants are - TL_WRITE_ONLY => TL_WRITE_ALLOW_READ After a short exclusive lock - TL_WRITE_ALLOW_READ => TL_WRITE_ALLOW_WRITE After discovering that the - operation didn't need such a high lock. - TL_WRITE_ONLY => TL_WRITE after a short exclusive lock while holding a - write table lock - TL_WRITE_ONLY => TL_WRITE_ALLOW_WRITE After a short exclusive lock after - already earlier having dongraded lock to TL_WRITE_ALLOW_WRITE - The implementation is conservative and rather don't start rather than - go on unknown paths to start, the common cases are handled. - - NOTE: - In its current implementation it is only allowed to downgrade from - TL_WRITE_ONLY. In this case there are no waiters. Thus no wake up - logic is required. -*/ - -void thr_downgrade_write_lock(THR_LOCK_DATA *in_data, - enum thr_lock_type new_lock_type) -{ - THR_LOCK *lock=in_data->lock; -#ifndef DBUG_OFF - enum thr_lock_type old_lock_type= in_data->type; -#endif - DBUG_ENTER("thr_downgrade_write_only_lock"); - - pthread_mutex_lock(&lock->mutex); - DBUG_ASSERT(old_lock_type == TL_WRITE_ONLY); - DBUG_ASSERT(old_lock_type > new_lock_type); - in_data->type= new_lock_type; - check_locks(lock,"after downgrading lock",0); - - pthread_mutex_unlock(&lock->mutex); - DBUG_VOID_RETURN; -} - -/* Upgrade a WRITE_DELAY lock to a WRITE_LOCK */ - -my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data, - enum thr_lock_type new_lock_type) -{ - THR_LOCK *lock=data->lock; - DBUG_ENTER("thr_upgrade_write_delay_lock"); - - pthread_mutex_lock(&lock->mutex); - if (data->type == TL_UNLOCK || data->type >= TL_WRITE_LOW_PRIORITY) - { - pthread_mutex_unlock(&lock->mutex); - DBUG_RETURN(data->type == TL_UNLOCK); /* Test if Aborted */ - } - check_locks(lock,"before upgrading lock",0); - /* TODO: Upgrade to TL_WRITE_CONCURRENT_INSERT in some cases */ - data->type= new_lock_type; /* Upgrade lock */ - - /* Check if someone has given us the lock */ - if (!data->cond) - { - if (!lock->read.data) /* No read locks */ - { /* We have the lock */ - if (lock->get_status) - (*lock->get_status)(data->status_param, 0); - pthread_mutex_unlock(&lock->mutex); - DBUG_RETURN(0); - } - - if (((*data->prev)=data->next)) /* remove from lock-list */ - data->next->prev= data->prev; - else - lock->write.last=data->prev; - - if ((data->next=lock->write_wait.data)) /* Put first in lock_list */ - data->next->prev= &data->next; - else - lock->write_wait.last= &data->next; - data->prev= &lock->write_wait.data; - lock->write_wait.data=data; - check_locks(lock,"upgrading lock",0); - } - else - { - check_locks(lock,"waiting for lock",0); - } - DBUG_RETURN(wait_for_lock(&lock->write_wait,data,1)); -} - - -/* downgrade a WRITE lock to a WRITE_DELAY lock if there is pending locks */ - -my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data) -{ - THR_LOCK *lock=data->lock; - enum thr_lock_type write_lock_type; - DBUG_ENTER("thr_reschedule_write_lock"); - - pthread_mutex_lock(&lock->mutex); - if (!lock->read_wait.data) /* No waiting read locks */ - { - pthread_mutex_unlock(&lock->mutex); - DBUG_RETURN(0); - } - - write_lock_type= data->type; - data->type=TL_WRITE_DELAYED; - if (lock->update_status) - (*lock->update_status)(data->status_param); - if (((*data->prev)=data->next)) /* remove from lock-list */ - data->next->prev= data->prev; - else - lock->write.last=data->prev; - - if ((data->next=lock->write_wait.data)) /* Put first in lock_list */ - data->next->prev= &data->next; - else - lock->write_wait.last= &data->next; - data->prev= &lock->write_wait.data; - data->cond=get_cond(); /* This was zero */ - lock->write_wait.data=data; - free_all_read_locks(lock,0); - - pthread_mutex_unlock(&lock->mutex); - DBUG_RETURN(thr_upgrade_write_delay_lock(data, write_lock_type)); -} - - -#include - -static void thr_print_lock(const char* name,struct st_lock_list *list) -{ - THR_LOCK_DATA *data,**prev; - uint count=0; - - if (list->data) - { - printf("%-10s: ",name); - prev= &list->data; - for (data=list->data; data && count++ < MAX_LOCKS ; data=data->next) - { - printf("0x%lx (%lu:%d); ", (ulong) data, data->owner->info->thread_id, - (int) data->type); - if (data->prev != prev) - printf("\nWarning: prev didn't point at previous lock\n"); - prev= &data->next; - } - puts(""); - if (prev != list->last) - printf("Warning: last didn't point at last lock\n"); - } -} - -void thr_print_locks(void) -{ - LIST *list; - uint count=0; - - pthread_mutex_lock(&THR_LOCK_lock); - puts("Current locks:"); - for (list= thr_lock_thread_list; list && count++ < MAX_THREADS; - list= list_rest(list)) - { - THR_LOCK *lock=(THR_LOCK*) list->data; - pthread_mutex_lock(&lock->mutex); - printf("lock: 0x%lx:",(ulong) lock); - if ((lock->write_wait.data || lock->read_wait.data) && - (! lock->read.data && ! lock->write.data)) - printf(" WARNING: "); - if (lock->write.data) - printf(" write"); - if (lock->write_wait.data) - printf(" write_wait"); - if (lock->read.data) - printf(" read"); - if (lock->read_wait.data) - printf(" read_wait"); - puts(""); - thr_print_lock("write",&lock->write); - thr_print_lock("write_wait",&lock->write_wait); - thr_print_lock("read",&lock->read); - thr_print_lock("read_wait",&lock->read_wait); - pthread_mutex_unlock(&lock->mutex); - puts(""); - } - fflush(stdout); - pthread_mutex_unlock(&THR_LOCK_lock); -} - -#endif /* THREAD */ - -/***************************************************************************** -** Test of thread locks -****************************************************************************/ - -#ifdef MAIN - -#ifdef THREAD - -struct st_test { - uint lock_nr; - enum thr_lock_type lock_type; -}; - -THR_LOCK locks[6]; /* Number of locks +1 */ - -struct st_test test_0[] = {{0,TL_READ}}; /* One lock */ -struct st_test test_1[] = {{0,TL_READ},{0,TL_WRITE}}; /* Read and write lock of lock 0 */ -struct st_test test_2[] = {{1,TL_WRITE},{0,TL_READ},{2,TL_READ}}; -struct st_test test_3[] = {{2,TL_WRITE},{1,TL_READ},{0,TL_READ}}; /* Deadlock with test_2 ? */ -struct st_test test_4[] = {{0,TL_WRITE},{0,TL_READ},{0,TL_WRITE},{0,TL_READ}}; -struct st_test test_5[] = {{0,TL_READ},{1,TL_READ},{2,TL_READ},{3,TL_READ}}; /* Many reads */ -struct st_test test_6[] = {{0,TL_WRITE},{1,TL_WRITE},{2,TL_WRITE},{3,TL_WRITE}}; /* Many writes */ -struct st_test test_7[] = {{3,TL_READ}}; -struct st_test test_8[] = {{1,TL_READ_NO_INSERT},{2,TL_READ_NO_INSERT},{3,TL_READ_NO_INSERT}}; /* Should be quick */ -struct st_test test_9[] = {{4,TL_READ_HIGH_PRIORITY}}; -struct st_test test_10[] ={{4,TL_WRITE}}; -struct st_test test_11[] = {{0,TL_WRITE_LOW_PRIORITY},{1,TL_WRITE_LOW_PRIORITY},{2,TL_WRITE_LOW_PRIORITY},{3,TL_WRITE_LOW_PRIORITY}}; /* Many writes */ -struct st_test test_12[] = {{0,TL_WRITE_ALLOW_READ},{1,TL_WRITE_ALLOW_READ},{2,TL_WRITE_ALLOW_READ},{3,TL_WRITE_ALLOW_READ}}; /* Many writes */ -struct st_test test_13[] = {{0,TL_WRITE_CONCURRENT_INSERT},{1,TL_WRITE_CONCURRENT_INSERT},{2,TL_WRITE_CONCURRENT_INSERT},{3,TL_WRITE_CONCURRENT_INSERT}}; -struct st_test test_14[] = {{0,TL_WRITE_CONCURRENT_INSERT},{1,TL_READ}}; -struct st_test test_15[] = {{0,TL_WRITE_ALLOW_WRITE},{1,TL_READ}}; -struct st_test test_16[] = {{0,TL_WRITE_ALLOW_WRITE},{1,TL_WRITE_ALLOW_WRITE}}; - -struct st_test test_17[] = {{5,TL_WRITE_CONCURRENT_INSERT}}; -struct st_test test_18[] = {{5,TL_WRITE_CONCURRENT_INSERT}}; -struct st_test test_19[] = {{5,TL_READ}}; -struct st_test test_20[] = {{5,TL_READ_NO_INSERT}}; -struct st_test test_21[] = {{5,TL_WRITE}}; - - -struct st_test *tests[]= -{ - test_0, test_1, test_2, test_3, test_4, test_5, test_6, test_7, test_8, - test_9, test_10, test_11, test_12, test_13, test_14, test_15, test_16, - test_17, test_18, test_19, test_20, test_21 -}; - -int lock_counts[]= {sizeof(test_0)/sizeof(struct st_test), - sizeof(test_1)/sizeof(struct st_test), - sizeof(test_2)/sizeof(struct st_test), - sizeof(test_3)/sizeof(struct st_test), - sizeof(test_4)/sizeof(struct st_test), - sizeof(test_5)/sizeof(struct st_test), - sizeof(test_6)/sizeof(struct st_test), - sizeof(test_7)/sizeof(struct st_test), - sizeof(test_8)/sizeof(struct st_test), - sizeof(test_9)/sizeof(struct st_test), - sizeof(test_10)/sizeof(struct st_test), - sizeof(test_11)/sizeof(struct st_test), - sizeof(test_12)/sizeof(struct st_test), - sizeof(test_13)/sizeof(struct st_test), - sizeof(test_14)/sizeof(struct st_test), - sizeof(test_15)/sizeof(struct st_test), - sizeof(test_16)/sizeof(struct st_test), - sizeof(test_17)/sizeof(struct st_test), - sizeof(test_18)/sizeof(struct st_test), - sizeof(test_19)/sizeof(struct st_test), - sizeof(test_20)/sizeof(struct st_test), - sizeof(test_21)/sizeof(struct st_test) -}; - - -static pthread_cond_t COND_thread_count; -static pthread_mutex_t LOCK_thread_count; -static uint thread_count; -static ulong sum=0; - -#define MAX_LOCK_COUNT 8 - -/* The following functions is for WRITE_CONCURRENT_INSERT */ - -static void test_get_status(void* param __attribute__((unused)), - int concurrent_insert __attribute__((unused))) -{ -} - -static void test_update_status(void* param __attribute__((unused))) -{ -} - -static void test_copy_status(void* to __attribute__((unused)) , - void *from __attribute__((unused))) -{ -} - -static my_bool test_check_status(void* param __attribute__((unused))) -{ - return 0; -} - - -static void *test_thread(void *arg) -{ - int i,j,param=*((int*) arg); - THR_LOCK_DATA data[MAX_LOCK_COUNT]; - THR_LOCK_OWNER owner; - THR_LOCK_INFO lock_info; - THR_LOCK_DATA *multi_locks[MAX_LOCK_COUNT]; - my_thread_init(); - - printf("Thread %s (%d) started\n",my_thread_name(),param); fflush(stdout); - - thr_lock_info_init(&lock_info); - thr_lock_owner_init(&owner, &lock_info); - for (i=0; i < lock_counts[param] ; i++) - thr_lock_data_init(locks+tests[param][i].lock_nr,data+i,NULL); - for (j=1 ; j < 10 ; j++) /* try locking 10 times */ - { - for (i=0; i < lock_counts[param] ; i++) - { /* Init multi locks */ - multi_locks[i]= &data[i]; - data[i].type= tests[param][i].lock_type; - } - thr_multi_lock(multi_locks, lock_counts[param], &owner); - pthread_mutex_lock(&LOCK_thread_count); - { - int tmp=rand() & 7; /* Do something from 0-2 sec */ - if (tmp == 0) - sleep(1); - else if (tmp == 1) - sleep(2); - else - { - ulong k; - for (k=0 ; k < (ulong) (tmp-2)*100000L ; k++) - sum+=k; - } - } - pthread_mutex_unlock(&LOCK_thread_count); - thr_multi_unlock(multi_locks,lock_counts[param]); - } - - printf("Thread %s (%d) ended\n",my_thread_name(),param); fflush(stdout); - thr_print_locks(); - pthread_mutex_lock(&LOCK_thread_count); - thread_count--; - pthread_cond_signal(&COND_thread_count); /* Tell main we are ready */ - pthread_mutex_unlock(&LOCK_thread_count); - free((uchar*) arg); - return 0; -} - - -int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) -{ - pthread_t tid; - pthread_attr_t thr_attr; - int *param,error; - uint i; - MY_INIT(argv[0]); - if (argc > 1 && argv[1][0] == '-' && argv[1][1] == '#') - DBUG_PUSH(argv[1]+2); - - printf("Main thread: %s\n",my_thread_name()); - - if ((error=pthread_cond_init(&COND_thread_count,NULL))) - { - fprintf(stderr,"Got error: %d from pthread_cond_init (errno: %d)", - error,errno); - exit(1); - } - if ((error=pthread_mutex_init(&LOCK_thread_count,MY_MUTEX_INIT_FAST))) - { - fprintf(stderr,"Got error: %d from pthread_cond_init (errno: %d)", - error,errno); - exit(1); - } - - for (i=0 ; i < array_elements(locks) ; i++) - { - thr_lock_init(locks+i); - locks[i].check_status= test_check_status; - locks[i].update_status=test_update_status; - locks[i].copy_status= test_copy_status; - locks[i].get_status= test_get_status; - locks[i].allow_multiple_concurrent_insert= 1; - } - if ((error=pthread_attr_init(&thr_attr))) - { - fprintf(stderr,"Got error: %d from pthread_attr_init (errno: %d)", - error,errno); - exit(1); - } - if ((error=pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED))) - { - fprintf(stderr, - "Got error: %d from pthread_attr_setdetachstate (errno: %d)", - error,errno); - exit(1); - } -#ifndef pthread_attr_setstacksize /* void return value */ - if ((error=pthread_attr_setstacksize(&thr_attr,65536L))) - { - fprintf(stderr,"Got error: %d from pthread_attr_setstacksize (errno: %d)", - error,errno); - exit(1); - } -#endif -#ifdef HAVE_THR_SETCONCURRENCY - (void) thr_setconcurrency(2); -#endif - for (i=0 ; i < array_elements(lock_counts) ; i++) - { - param=(int*) malloc(sizeof(int)); - *param=i; - - if ((error=pthread_mutex_lock(&LOCK_thread_count))) - { - fprintf(stderr,"Got error: %d from pthread_mutex_lock (errno: %d)", - error,errno); - exit(1); - } - if ((error=pthread_create(&tid,&thr_attr,test_thread,(void*) param))) - { - fprintf(stderr,"Got error: %d from pthread_create (errno: %d)\n", - error,errno); - pthread_mutex_unlock(&LOCK_thread_count); - exit(1); - } - thread_count++; - pthread_mutex_unlock(&LOCK_thread_count); - } - - pthread_attr_destroy(&thr_attr); - if ((error=pthread_mutex_lock(&LOCK_thread_count))) - fprintf(stderr,"Got error: %d from pthread_mutex_lock\n",error); - while (thread_count) - { - if ((error=pthread_cond_wait(&COND_thread_count,&LOCK_thread_count))) - fprintf(stderr,"Got error: %d from pthread_cond_wait\n",error); - } - if ((error=pthread_mutex_unlock(&LOCK_thread_count))) - fprintf(stderr,"Got error: %d from pthread_mutex_unlock\n",error); - for (i=0 ; i < array_elements(locks) ; i++) - thr_lock_delete(locks+i); -#ifdef EXTRA_DEBUG - if (found_errors) - printf("Got %d warnings\n",found_errors); - else -#endif - printf("Test succeeded\n"); - return 0; -} - -#else /* THREAD */ - -int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) -{ - printf("thr_lock disabled because we are not using threads\n"); - exit(1); -} - -#endif /* THREAD */ -#endif /* MAIN */ diff --git a/externals/mysql/mysys/thr_mutex.c b/externals/mysql/mysys/thr_mutex.c deleted file mode 100644 index 9c7eb71432..0000000000 --- a/externals/mysql/mysys/thr_mutex.c +++ /dev/null @@ -1,875 +0,0 @@ -/* Copyright (C) 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This makes a wrapper for mutex handling to make it easier to debug mutex */ - -#include -#if defined(TARGET_OS_LINUX) && !defined (__USE_UNIX98) -#define __USE_UNIX98 /* To get rw locks under Linux */ -#endif -#if defined(THREAD) && defined(SAFE_MUTEX) -#undef SAFE_MUTEX /* Avoid safe_mutex redefinitions */ -#include "mysys_priv.h" -#include "my_static.h" -#include -#include - -#ifndef DO_NOT_REMOVE_THREAD_WRAPPERS -/* Remove wrappers */ -#undef pthread_mutex_t -#undef pthread_mutex_init -#undef pthread_mutex_lock -#undef pthread_mutex_unlock -#undef pthread_mutex_destroy -#undef pthread_cond_wait -#undef pthread_cond_timedwait -#ifdef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT -#define pthread_mutex_init(a,b) my_pthread_noposix_mutex_init((a),(b)) -#endif -#endif /* DO_NOT_REMOVE_THREAD_WRAPPERS */ - -static pthread_mutex_t THR_LOCK_mutex; -static ulong safe_mutex_count= 0; /* Number of mutexes created */ -static ulong safe_mutex_id= 0; -my_bool safe_mutex_deadlock_detector= 1; /* On by default */ - -#ifdef SAFE_MUTEX_DETECT_DESTROY -static struct st_safe_mutex_create_info_t *safe_mutex_create_root= NULL; -#endif - -static my_bool add_used_to_locked_mutex(safe_mutex_t *used_mutex, - safe_mutex_deadlock_t *locked_mutex); -static my_bool add_to_locked_mutex(safe_mutex_deadlock_t *locked_mutex, - safe_mutex_t *current_mutex); -static my_bool remove_from_locked_mutex(safe_mutex_t *mp, - safe_mutex_t *delete_mutex); -static my_bool remove_from_used_mutex(safe_mutex_deadlock_t *locked_mutex, - safe_mutex_t *mutex); -static void print_deadlock_warning(safe_mutex_t *new_mutex, - safe_mutex_t *conflicting_mutex); - -void safe_mutex_global_init(void) -{ - pthread_mutex_init(&THR_LOCK_mutex,MY_MUTEX_INIT_FAST); - safe_mutex_id= safe_mutex_count= 0; - safe_mutex_deadlock_detector= 1; - -#ifdef SAFE_MUTEX_DETECT_DESTROY - safe_mutex_create_root= 0; -#endif -} - -static inline void remove_from_active_list(safe_mutex_t *mp) -{ - if (!(mp->active_flags & (MYF_NO_DEADLOCK_DETECTION | MYF_TRY_LOCK))) - { - /* Remove mutex from active mutex linked list */ - if (mp->next) - mp->next->prev= mp->prev; - if (mp->prev) - mp->prev->next= mp->next; - else - *my_thread_var_mutex_in_use()= mp->next; - } - mp->prev= mp->next= 0; -} - - -int safe_mutex_init(safe_mutex_t *mp, - const pthread_mutexattr_t *attr __attribute__((unused)), - const char *name, - myf my_flags, - const char *file, - uint line) -{ - DBUG_ENTER("safe_mutex_init"); - DBUG_PRINT("enter",("mutex: 0x%lx name: %s", (ulong) mp, name)); - bzero((char*) mp,sizeof(*mp)); - pthread_mutex_init(&mp->global,MY_MUTEX_INIT_ERRCHK); - pthread_mutex_init(&mp->mutex,attr); - /* Mark that mutex is initialized */ - mp->file= file; - mp->line= line; - /* Skip the very common '&' prefix from the autogenerated name */ - mp->name= name[0] == '&' ? name + 1 : name; - - if (safe_mutex_deadlock_detector && !( my_flags & MYF_NO_DEADLOCK_DETECTION)) - { - if (!my_multi_malloc(MY_FAE | MY_WME, - &mp->locked_mutex, sizeof(*mp->locked_mutex), - &mp->used_mutex, sizeof(*mp->used_mutex), NullS)) - { - /* Disable deadlock handling for this mutex */ - my_flags|= MYF_NO_DEADLOCK_DETECTION; - } - else - { - pthread_mutex_lock(&THR_LOCK_mutex); - mp->id= ++safe_mutex_id; - pthread_mutex_unlock(&THR_LOCK_mutex); - my_hash_init(mp->locked_mutex, &my_charset_bin, - 1000, - offsetof(safe_mutex_deadlock_t, id), - sizeof(mp->id), - 0, 0, HASH_UNIQUE); - my_hash_init(mp->used_mutex, &my_charset_bin, - 1000, - offsetof(safe_mutex_t, id), - sizeof(mp->id), - 0, 0, HASH_UNIQUE); - } - } - else - my_flags|= MYF_NO_DEADLOCK_DETECTION; - mp->create_flags= my_flags; - -#ifdef SAFE_MUTEX_DETECT_DESTROY - /* - Monitor the freeing of mutexes. This code depends on single thread init - and destroy - */ - if ((mp->info= (safe_mutex_info_t *) malloc(sizeof(safe_mutex_info_t)))) - { - struct st_safe_mutex_info_t *info= mp->info; - - info->init_file= file; - info->init_line= line; - info->prev= NULL; - info->next= NULL; - - pthread_mutex_lock(&THR_LOCK_mutex); - if ((info->next= safe_mutex_create_root)) - safe_mutex_create_root->prev= info; - safe_mutex_create_root= info; - safe_mutex_count++; - pthread_mutex_unlock(&THR_LOCK_mutex); - } -#else - thread_safe_increment(safe_mutex_count, &THR_LOCK_mutex); -#endif /* SAFE_MUTEX_DETECT_DESTROY */ - DBUG_RETURN(0); -} - - -int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file, - uint line) -{ - int error; - DBUG_PRINT("mutex", ("%s (0x%lx) locking", mp->name ? mp->name : "Null", - (ulong) mp)); - if (!mp->file) - { - fprintf(stderr, - "safe_mutex: Trying to lock unitialized mutex at %s, line %d\n", - file, line); - fflush(stderr); - abort(); - } - - pthread_mutex_lock(&mp->global); - if (mp->count > 0) - { - /* - Check that we are not trying to lock mutex twice. This is an error - even if we are using 'try_lock' as it's not portably what happens - if you lock the mutex many times and this is in any case bad - behaviour that should not be encouraged - */ - if (pthread_equal(pthread_self(),mp->thread)) - { - fprintf(stderr, - "safe_mutex: Trying to lock mutex at %s, line %d, when the" - " mutex was already locked at %s, line %d in thread %s\n", - file,line,mp->file, mp->line, my_thread_name()); - fflush(stderr); - abort(); - } - } - pthread_mutex_unlock(&mp->global); - - /* - If we are imitating trylock(), we need to take special - precautions. - - - We cannot use pthread_mutex_lock() only since another thread can - overtake this thread and take the lock before this thread - causing pthread_mutex_trylock() to hang. In this case, we should - just return EBUSY. Hence, we use pthread_mutex_trylock() to be - able to return immediately. - - - We cannot just use trylock() and continue execution below, since - this would generate an error and abort execution if the thread - was overtaken and trylock() returned EBUSY . In this case, we - instead just return EBUSY, since this is the expected behaviour - of trylock(). - */ - if (my_flags & MYF_TRY_LOCK) - { - error= pthread_mutex_trylock(&mp->mutex); - if (error == EBUSY) - return error; - } - else - error= pthread_mutex_lock(&mp->mutex); - - if (error || (error=pthread_mutex_lock(&mp->global))) - { - fprintf(stderr,"Got error %d when trying to lock mutex %s at %s, line %d\n", - error, mp->name, file, line); - fflush(stderr); - abort(); - } - mp->thread= pthread_self(); - if (mp->count++) - { - fprintf(stderr,"safe_mutex: Error in thread libray: Got mutex %s at %s, " - "line %d more than 1 time\n", mp->name, file,line); - fflush(stderr); - abort(); - } - mp->file= file; - mp->line= line; - mp->active_flags= mp->create_flags | my_flags; - pthread_mutex_unlock(&mp->global); - - /* Deadlock detection */ - - mp->prev= mp->next= 0; - if (!(mp->active_flags & (MYF_TRY_LOCK | MYF_NO_DEADLOCK_DETECTION))) - { - safe_mutex_t **mutex_in_use= my_thread_var_mutex_in_use(); - - if (!mutex_in_use) - { - /* thread has not called my_thread_init() */ - mp->active_flags|= MYF_NO_DEADLOCK_DETECTION; - } - else - { - safe_mutex_t *mutex_root; - if ((mutex_root= *mutex_in_use)) /* If not first locked */ - { - /* - Protect locked_mutex against changes if a mutex is deleted - */ - pthread_mutex_lock(&THR_LOCK_mutex); - - if (! my_hash_search(mutex_root->locked_mutex, (uchar*) &mp->id, 0)) - { - safe_mutex_deadlock_t *deadlock; - safe_mutex_t *mutex; - - /* Create object to store mutex info */ - if (!(deadlock= my_malloc(sizeof(*deadlock), - MYF(MY_ZEROFILL | MY_WME | MY_FAE)))) - goto abort_loop; - deadlock->name= mp->name; - deadlock->id= mp->id; - deadlock->mutex= mp; - /* The following is useful for debugging wrong mutex usage */ - deadlock->file= file; - deadlock->line= line; - - /* Check if potential deadlock */ - mutex= mutex_root; - do - { - if (my_hash_search(mp->locked_mutex, (uchar*) &mutex->id, 0)) - { - print_deadlock_warning(mp, mutex); - /* Mark wrong usage to avoid future warnings for same error */ - deadlock->warning_only= 1; - add_to_locked_mutex(deadlock, mutex_root); - DBUG_ASSERT(deadlock->count > 0); - goto abort_loop; - } - } - while ((mutex= mutex->next)); - - /* - Copy current mutex and all mutex that has been locked - after current mutex (mp->locked_mutex) to all mutex that - was locked before previous mutex (mutex_root->used_mutex) - - For example if A->B would have been done before and we - are now locking (C) in B->C, then we would add C into - B->locked_mutex and A->locked_mutex - */ - my_hash_iterate(mutex_root->used_mutex, - (my_hash_walk_action) add_used_to_locked_mutex, - deadlock); - - /* - Copy all current mutex and all mutex locked after current one - into the prev mutex - */ - add_used_to_locked_mutex(mutex_root, deadlock); - DBUG_ASSERT(deadlock->count > 0); - } - abort_loop: - pthread_mutex_unlock(&THR_LOCK_mutex); - } - /* Link mutex into mutex_in_use list */ - if ((mp->next= *mutex_in_use)) - (*mutex_in_use)->prev= mp; - *mutex_in_use= mp; - } - } - - DBUG_PRINT("mutex", ("%s (0x%lx) locked", mp->name, (ulong) mp)); - return error; -} - - -int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line) -{ - int error; - DBUG_PRINT("mutex", ("%s (0x%lx) unlocking", mp->name, (ulong) mp)); - pthread_mutex_lock(&mp->global); - if (mp->count == 0) - { - fprintf(stderr, - "safe_mutex: Trying to unlock mutex %s that wasn't locked at " - "%s, line %d\n" - "Last used at %s, line: %d\n", - mp->name ? mp->name : "Null", file, line, - mp->file ? mp->file : "Null", mp->line); - fflush(stderr); - abort(); - } - if (!pthread_equal(pthread_self(),mp->thread)) - { - fprintf(stderr, - "safe_mutex: Trying to unlock mutex %s at %s, line %d that was " - "locked by " - "another thread at: %s, line: %d\n", - mp->name, file, line, mp->file, mp->line); - fflush(stderr); - abort(); - } - mp->thread= 0; - mp->count--; - - remove_from_active_list(mp); - -#ifdef __WIN__ - pthread_mutex_unlock(&mp->mutex); - error=0; -#else - error=pthread_mutex_unlock(&mp->mutex); - if (error) - { - fprintf(stderr, - "safe_mutex: Got error: %d (%d) when trying to unlock mutex " - "%s at %s, line %d\n", error, errno, mp->name, file, line); - fflush(stderr); - abort(); - } -#endif /* __WIN__ */ - pthread_mutex_unlock(&mp->global); - return error; -} - - -int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp, const char *file, - uint line) -{ - int error; - safe_mutex_t save_state; - - pthread_mutex_lock(&mp->global); - if (mp->count == 0) - { - fprintf(stderr, - "safe_mutex: Trying to cond_wait on a unlocked mutex %s at %s, " - "line %d\n", - mp->name ? mp->name : "Null", file, line); - fflush(stderr); - abort(); - } - if (!pthread_equal(pthread_self(),mp->thread)) - { - fprintf(stderr, - "safe_mutex: Trying to cond_wait on a mutex %s at %s, line %d " - "that was locked by another thread at: %s, line: %d\n", - mp->name, file, line, mp->file, mp->line); - fflush(stderr); - abort(); - } - - if (mp->count-- != 1) - { - fprintf(stderr, - "safe_mutex: Count was %d on locked mutex %s at %s, line %d\n", - mp->count+1, mp->name, file, line); - fflush(stderr); - abort(); - } - save_state= *mp; - remove_from_active_list(mp); - pthread_mutex_unlock(&mp->global); - error=pthread_cond_wait(cond,&mp->mutex); - pthread_mutex_lock(&mp->global); - - if (error) - { - fprintf(stderr, - "safe_mutex: Got error: %d (%d) when doing a safe_mutex_wait on " - "%s at %s, line %d\n", error, errno, mp->name, file, line); - fflush(stderr); - abort(); - } - /* Restore state as it was before */ - mp->thread= save_state.thread; - mp->active_flags= save_state.active_flags; - mp->next= save_state.next; - mp->prev= save_state.prev; - - if (mp->count++) - { - fprintf(stderr, - "safe_mutex: Count was %d in thread 0x%lx when locking mutex %s " - "at %s, line %d\n", - mp->count-1, my_thread_dbug_id(), mp->name, file, line); - fflush(stderr); - abort(); - } - mp->file= file; - mp->line=line; - pthread_mutex_unlock(&mp->global); - return error; -} - - -int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, - struct timespec *abstime, - const char *file, uint line) -{ - int error; - safe_mutex_t save_state; - - pthread_mutex_lock(&mp->global); - if (mp->count != 1 || !pthread_equal(pthread_self(),mp->thread)) - { - fprintf(stderr, - "safe_mutex: Trying to cond_wait at %s, line %d on a not hold " - "mutex %s\n", - file, line, mp->name ? mp->name : "Null"); - fflush(stderr); - abort(); - } - mp->count--; /* Mutex will be released */ - save_state= *mp; - remove_from_active_list(mp); - pthread_mutex_unlock(&mp->global); - error=pthread_cond_timedwait(cond,&mp->mutex,abstime); -#ifdef EXTRA_DEBUG - if (error && (error != EINTR && error != ETIMEDOUT && error != ETIME)) - { - fprintf(stderr, - "safe_mutex: Got error: %d (%d) when doing a safe_mutex_timedwait " - "on %s at %s, line %d\n", - error, errno, mp->name, file, line); - } -#endif - pthread_mutex_lock(&mp->global); - /* Restore state as it was before */ - mp->thread= save_state.thread; - mp->active_flags= save_state.active_flags; - mp->next= save_state.next; - mp->prev= save_state.prev; - - if (mp->count++) - { - fprintf(stderr, - "safe_mutex: Count was %d in thread 0x%lx when locking mutex " - "%s at %s, line %d (error: %d (%d))\n", - mp->count-1, my_thread_dbug_id(), mp->name, file, line, - error, error); - fflush(stderr); - abort(); - } - mp->file= file; - mp->line=line; - pthread_mutex_unlock(&mp->global); - return error; -} - - -int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line) -{ - int error=0; - DBUG_ENTER("safe_mutex_destroy"); - DBUG_PRINT("enter", ("mutex: 0x%lx name: %s", (ulong) mp, mp->name)); - if (!mp->file) - { - fprintf(stderr, - "safe_mutex: Trying to destroy unitialized mutex at %s, line %d\n", - file, line); - fflush(stderr); - abort(); - } - if (mp->count != 0) - { - fprintf(stderr, - "safe_mutex: Trying to destroy a mutex %s that was locked at %s, " - "line %d at %s, line %d\n", - mp->name, mp->file, mp->line, file, line); - fflush(stderr); - abort(); - } - - /* Free all entries that points to this one */ - safe_mutex_free_deadlock_data(mp); - -#ifdef __WIN__ - pthread_mutex_destroy(&mp->global); - pthread_mutex_destroy(&mp->mutex); -#else - if (pthread_mutex_destroy(&mp->global)) - error=1; - if (pthread_mutex_destroy(&mp->mutex)) - error=1; -#endif - mp->file= 0; /* Mark destroyed */ - -#ifdef SAFE_MUTEX_DETECT_DESTROY - if (mp->info) - { - struct st_safe_mutex_info_t *info= mp->info; - pthread_mutex_lock(&THR_LOCK_mutex); - - if (info->prev) - info->prev->next = info->next; - else - safe_mutex_create_root = info->next; - if (info->next) - info->next->prev = info->prev; - safe_mutex_count--; - - pthread_mutex_unlock(&THR_LOCK_mutex); - free(info); - mp->info= NULL; /* Get crash if double free */ - } -#else - thread_safe_sub(safe_mutex_count, 1, &THR_LOCK_mutex); -#endif /* SAFE_MUTEX_DETECT_DESTROY */ - DBUG_RETURN(error); -} - - -/** - Free all data related to deadlock detection - - This is also useful together with safemalloc when you don't want to - have reports of not freed memory for mysys mutexes. -*/ - -void safe_mutex_free_deadlock_data(safe_mutex_t *mp) -{ - /* Free all entries that points to this one */ - if (!(mp->create_flags & MYF_NO_DEADLOCK_DETECTION)) - { - pthread_mutex_lock(&THR_LOCK_mutex); - my_hash_iterate(mp->used_mutex, - (my_hash_walk_action) remove_from_locked_mutex, - mp); - my_hash_iterate(mp->locked_mutex, - (my_hash_walk_action) remove_from_used_mutex, - mp); - pthread_mutex_unlock(&THR_LOCK_mutex); - - my_hash_free(mp->used_mutex); - my_hash_free(mp->locked_mutex); - my_free(mp->locked_mutex, 0); - mp->create_flags|= MYF_NO_DEADLOCK_DETECTION; - } -} - -/* - Free global resources and check that all mutex has been destroyed - - SYNOPSIS - safe_mutex_end() - file Print errors on this file - - NOTES - We can't use DBUG_PRINT() here as we have in my_end() disabled - DBUG handling before calling this function. - - In MySQL one may get one warning for a mutex created in my_thr_init.c - This is ok, as this thread may not yet have been exited. -*/ - -void safe_mutex_end(FILE *file __attribute__((unused))) -{ - if (!safe_mutex_count) /* safetly */ - pthread_mutex_destroy(&THR_LOCK_mutex); -#ifdef SAFE_MUTEX_DETECT_DESTROY - if (!file) - return; - - if (safe_mutex_count) - { - fprintf(file, "Warning: Not destroyed mutex: %lu\n", safe_mutex_count); - (void) fflush(file); - } - { - struct st_safe_mutex_info_t *ptr; - for (ptr= safe_mutex_create_root ; ptr ; ptr= ptr->next) - { - fprintf(file, "\tMutex %s initiated at line %4u in '%s'\n", - ptr->name, ptr->init_line, ptr->init_file); - (void) fflush(file); - } - } -#endif /* SAFE_MUTEX_DETECT_DESTROY */ -} - - -static my_bool add_used_to_locked_mutex(safe_mutex_t *used_mutex, - safe_mutex_deadlock_t *locked_mutex) -{ - /* Add mutex to all parent of the current mutex */ - if (!locked_mutex->warning_only) - { - (void) my_hash_iterate(locked_mutex->mutex->locked_mutex, - (my_hash_walk_action) add_to_locked_mutex, - used_mutex); - /* mark that locked_mutex is locked after used_mutex */ - (void) add_to_locked_mutex(locked_mutex, used_mutex); - } - return 0; -} - - -/** - register that locked_mutex was locked after current_mutex -*/ - -static my_bool add_to_locked_mutex(safe_mutex_deadlock_t *locked_mutex, - safe_mutex_t *current_mutex) -{ - DBUG_ENTER("add_to_locked_mutex"); - DBUG_PRINT("info", ("inserting 0x%lx into 0x%lx (id: %lu -> %lu)", - (ulong) locked_mutex, (long) current_mutex, - locked_mutex->id, current_mutex->id)); - if (my_hash_insert(current_mutex->locked_mutex, (uchar*) locked_mutex)) - { - /* Got mutex through two paths; ignore */ - DBUG_RETURN(0); - } - locked_mutex->count++; - if (my_hash_insert(locked_mutex->mutex->used_mutex, - (uchar*) current_mutex)) - { - DBUG_ASSERT(0); - } - DBUG_RETURN(0); -} - - -/** - Remove mutex from the locked mutex hash - @fn remove_from_used_mutex() - @param mp Mutex that has delete_mutex in it's locked_mutex hash - @param delete_mutex Mutex should be removed from the hash - - @notes - safe_mutex_deadlock_t entries in the locked hash are shared. - When counter goes to 0, we delete the safe_mutex_deadlock_t entry. -*/ - -static my_bool remove_from_locked_mutex(safe_mutex_t *mp, - safe_mutex_t *delete_mutex) -{ - safe_mutex_deadlock_t *found; - DBUG_ENTER("remove_from_locked_mutex"); - DBUG_PRINT("enter", ("delete_mutex: 0x%lx mutex: 0x%lx (id: %lu <- %lu)", - (ulong) delete_mutex, (ulong) mp, - delete_mutex->id, mp->id)); - - found= (safe_mutex_deadlock_t*) my_hash_search(mp->locked_mutex, - (uchar*) &delete_mutex->id, 0); - DBUG_ASSERT(found); - if (found) - { - if (my_hash_delete(mp->locked_mutex, (uchar*) found)) - { - DBUG_ASSERT(0); - } - if (!--found->count) - my_free(found, MYF(0)); - } - DBUG_RETURN(0); -} - -static my_bool remove_from_used_mutex(safe_mutex_deadlock_t *locked_mutex, - safe_mutex_t *mutex) -{ - DBUG_ENTER("remove_from_used_mutex"); - DBUG_PRINT("enter", ("delete_mutex: 0x%lx mutex: 0x%lx (id: %lu <- %lu)", - (ulong) mutex, (ulong) locked_mutex, - mutex->id, locked_mutex->id)); - if (my_hash_delete(locked_mutex->mutex->used_mutex, (uchar*) mutex)) - { - DBUG_ASSERT(0); - } - if (!--locked_mutex->count) - my_free(locked_mutex, MYF(0)); - DBUG_RETURN(0); -} - - -static void print_deadlock_warning(safe_mutex_t *new_mutex, - safe_mutex_t *parent_mutex) -{ - safe_mutex_t *mutex_root; - DBUG_ENTER("print_deadlock_warning"); - DBUG_PRINT("enter", ("mutex: %s parent: %s", - new_mutex->name, parent_mutex->name)); - - fprintf(stderr, "safe_mutex: Found wrong usage of mutex " - "'%s' and '%s'\n", - parent_mutex->name, new_mutex->name); - DBUG_PRINT("info", ("safe_mutex: Found wrong usage of mutex " - "'%s' and '%s'", - parent_mutex->name, new_mutex->name)); - fprintf(stderr, "Mutex currently locked (in reverse order):\n"); - DBUG_PRINT("info", ("Mutex currently locked (in reverse order):")); - fprintf(stderr, "%-32.32s %s line %u\n", new_mutex->name, new_mutex->file, - new_mutex->line); - DBUG_PRINT("info", ("%-32.32s %s line %u\n", new_mutex->name, - new_mutex->file, new_mutex->line)); - for (mutex_root= *my_thread_var_mutex_in_use() ; - mutex_root; - mutex_root= mutex_root->next) - { - fprintf(stderr, "%-32.32s %s line %u\n", mutex_root->name, - mutex_root->file, mutex_root->line); - DBUG_PRINT("info", ("%-32.32s %s line %u", mutex_root->name, - mutex_root->file, mutex_root->line)); - } - fflush(stderr); - DBUG_VOID_RETURN; -} - - -#endif /* THREAD && SAFE_MUTEX */ - -#if defined(THREAD) && defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) - -#include "mysys_priv.h" -#include "my_static.h" -#include - -#include -#include -#include -#include -#include - -#undef pthread_mutex_t -#undef pthread_mutex_init -#undef pthread_mutex_lock -#undef pthread_mutex_trylock -#undef pthread_mutex_unlock -#undef pthread_mutex_destroy -#undef pthread_cond_wait -#undef pthread_cond_timedwait - -ulong mutex_delay(ulong delayloops) -{ - ulong i; - volatile ulong j; - - j = 0; - - for (i = 0; i < delayloops * 50; i++) - j += i; - - return(j); -} - -#define MY_PTHREAD_FASTMUTEX_SPINS 8 -#define MY_PTHREAD_FASTMUTEX_DELAY 4 - -static int cpu_count= 0; - -int my_pthread_fastmutex_init(my_pthread_fastmutex_t *mp, - const pthread_mutexattr_t *attr) -{ - if ((cpu_count > 1) && (attr == MY_MUTEX_INIT_FAST)) - mp->spins= MY_PTHREAD_FASTMUTEX_SPINS; - else - mp->spins= 0; - mp->rng_state= 1; - return pthread_mutex_init(&mp->mutex, attr); -} - -/** - Park-Miller random number generator. A simple linear congruential - generator that operates in multiplicative group of integers modulo n. - - x_{k+1} = (x_k g) mod n - - Popular pair of parameters: n = 2^32 − 5 = 4294967291 and g = 279470273. - The period of the generator is about 2^31. - Largest value that can be returned: 2147483646 (RAND_MAX) - - Reference: - - S. K. Park and K. W. Miller - "Random number generators: good ones are hard to find" - Commun. ACM, October 1988, Volume 31, No 10, pages 1192-1201. -*/ - -static double park_rng(my_pthread_fastmutex_t *mp) -{ - mp->rng_state= ((my_ulonglong)mp->rng_state * 279470273U) % 4294967291U; - return (mp->rng_state / 2147483647.0); -} - -int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp) -{ - int res; - uint i; - uint maxdelay= MY_PTHREAD_FASTMUTEX_DELAY; - - for (i= 0; i < mp->spins; i++) - { - res= pthread_mutex_trylock(&mp->mutex); - - if (res == 0) - return 0; - - if (res != EBUSY) - return res; - - mutex_delay(maxdelay); - maxdelay += park_rng(mp) * MY_PTHREAD_FASTMUTEX_DELAY + 1; - } - return pthread_mutex_lock(&mp->mutex); -} - - -void fastmutex_global_init(void) -{ -#ifdef _SC_NPROCESSORS_CONF - cpu_count= sysconf(_SC_NPROCESSORS_CONF); -#endif -} - -#endif /* defined(THREAD) && defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) */ diff --git a/externals/mysql/mysys/thr_rwlock.c b/externals/mysql/mysys/thr_rwlock.c deleted file mode 100644 index 280a0ec19e..0000000000 --- a/externals/mysql/mysys/thr_rwlock.c +++ /dev/null @@ -1,171 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Synchronization - readers / writer thread locks */ - -#include "mysys_priv.h" -#if defined(THREAD) && !defined(HAVE_PTHREAD_RWLOCK_RDLOCK) && !defined(HAVE_RWLOCK_INIT) -#include - -/* - Source base from Sun Microsystems SPILT, simplified for MySQL use - -- Joshua Chamas - Some cleanup and additional code by Monty -*/ - -/* -* Multithreaded Demo Source -* -* Copyright (C) 1995 by Sun Microsystems, Inc. -* All rights reserved. -* -* This file is a product of SunSoft, Inc. and is provided for -* unrestricted use provided that this legend is included on all -* media and as a part of the software program in whole or part. -* Users may copy, modify or distribute this file at will. -* -* THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING -* THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. -* -* This file is provided with no support and without any obligation on the -* part of SunSoft, Inc. to assist in its use, correction, modification or -* enhancement. -* -* SUNSOFT AND SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT -* TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS -* FILE OR ANY PART THEREOF. -* -* IN NO EVENT WILL SUNSOFT OR SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY -* LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL -* DAMAGES, EVEN IF THEY HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGES. -* -* SunSoft, Inc. -* 2550 Garcia Avenue -* Mountain View, California 94043 -*/ - -int my_rwlock_init(rw_lock_t *rwp, void *arg __attribute__((unused))) -{ - pthread_condattr_t cond_attr; - - pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST); - pthread_condattr_init( &cond_attr ); - pthread_cond_init( &rwp->readers, &cond_attr ); - pthread_cond_init( &rwp->writers, &cond_attr ); - pthread_condattr_destroy(&cond_attr); - - rwp->state = 0; - rwp->waiters = 0; - - return(0); -} - - -int my_rwlock_destroy(rw_lock_t *rwp) -{ - pthread_mutex_destroy( &rwp->lock ); - pthread_cond_destroy( &rwp->readers ); - pthread_cond_destroy( &rwp->writers ); - return(0); -} - - -int my_rw_rdlock(rw_lock_t *rwp) -{ - pthread_mutex_lock(&rwp->lock); - - /* active or queued writers */ - while ((rwp->state < 0 ) || rwp->waiters) - pthread_cond_wait( &rwp->readers, &rwp->lock); - - rwp->state++; - pthread_mutex_unlock(&rwp->lock); - return(0); -} - -int my_rw_tryrdlock(rw_lock_t *rwp) -{ - int res; - pthread_mutex_lock(&rwp->lock); - if ((rwp->state < 0 ) || rwp->waiters) - res= EBUSY; /* Can't get lock */ - else - { - res=0; - rwp->state++; - } - pthread_mutex_unlock(&rwp->lock); - return(res); -} - - -int my_rw_wrlock(rw_lock_t *rwp) -{ - pthread_mutex_lock(&rwp->lock); - rwp->waiters++; /* another writer queued */ - - while (rwp->state) - pthread_cond_wait(&rwp->writers, &rwp->lock); - rwp->state = -1; - rwp->waiters--; - pthread_mutex_unlock(&rwp->lock); - return(0); -} - - -int my_rw_trywrlock(rw_lock_t *rwp) -{ - int res; - pthread_mutex_lock(&rwp->lock); - if (rwp->state) - res= EBUSY; /* Can't get lock */ - else - { - res=0; - rwp->state = -1; - } - pthread_mutex_unlock(&rwp->lock); - return(res); -} - - -int my_rw_unlock(rw_lock_t *rwp) -{ - DBUG_PRINT("rw_unlock", - ("state: %d waiters: %d", rwp->state, rwp->waiters)); - pthread_mutex_lock(&rwp->lock); - - if (rwp->state == -1) /* writer releasing */ - { - rwp->state= 0; /* mark as available */ - - if ( rwp->waiters ) /* writers queued */ - pthread_cond_signal( &rwp->writers ); - else - pthread_cond_broadcast( &rwp->readers ); - } - else - { - if ( --rwp->state == 0 ) /* no more readers */ - pthread_cond_signal( &rwp->writers ); - } - - pthread_mutex_unlock( &rwp->lock ); - return(0); -} - -#endif diff --git a/externals/mysql/mysys/tree.c b/externals/mysql/mysys/tree.c deleted file mode 100644 index e721cc0cc5..0000000000 --- a/externals/mysql/mysys/tree.c +++ /dev/null @@ -1,757 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Code for handling red-black (balanced) binary trees. - key in tree is allocated accrding to following: - - 1) If size < 0 then tree will not allocate keys and only a pointer to - each key is saved in tree. - compare and search functions uses and returns key-pointer - - 2) If size == 0 then there are two options: - - key_size != 0 to tree_insert: The key will be stored in the tree. - - key_size == 0 to tree_insert: A pointer to the key is stored. - compare and search functions uses and returns key-pointer. - - 3) if key_size is given to init_tree then each node will continue the - key and calls to insert_key may increase length of key. - if key_size > sizeof(pointer) and key_size is a multiple of 8 (double - allign) then key will be put on a 8 alligned adress. Else - the key will be on adress (element+1). This is transparent for user - compare and search functions uses a pointer to given key-argument. - - - If you use a free function for tree-elements and you are freeing - the element itself, you should use key_size = 0 to init_tree and - tree_search - - The actual key in TREE_ELEMENT is saved as a pointer or after the - TREE_ELEMENT struct. - If one uses only pointers in tree one can use tree_set_pointer() to - change address of data. - - Implemented by monty. -*/ - -/* - NOTE: - tree->compare function should be ALWAYS called as - (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element), key) - and not other way around, as - (*tree->compare)(custom_arg, key, ELEMENT_KEY(tree,element)) - - ft_boolean_search.c (at least) relies on that. -*/ - -#include "mysys_priv.h" -#include -#include -#include "my_base.h" - -#define BLACK 1 -#define RED 0 -#define DEFAULT_ALLOC_SIZE 8192 -#define DEFAULT_ALIGN_SIZE 8192 - -static void delete_tree_element(TREE *,TREE_ELEMENT *); -static int tree_walk_left_root_right(TREE *,TREE_ELEMENT *, - tree_walk_action,void *); -static int tree_walk_right_root_left(TREE *,TREE_ELEMENT *, - tree_walk_action,void *); -static void left_rotate(TREE_ELEMENT **parent,TREE_ELEMENT *leaf); -static void right_rotate(TREE_ELEMENT **parent, TREE_ELEMENT *leaf); -static void rb_insert(TREE *tree,TREE_ELEMENT ***parent, - TREE_ELEMENT *leaf); -static void rb_delete_fixup(TREE *tree,TREE_ELEMENT ***parent); - - - /* The actuall code for handling binary trees */ - -#ifndef DBUG_OFF -static int test_rb_tree(TREE_ELEMENT *element); -#endif - -void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit, - int size, qsort_cmp2 compare, my_bool with_delete, - tree_element_free free_element, void *custom_arg) -{ - DBUG_ENTER("init_tree"); - DBUG_PRINT("enter",("tree: %p size: %d", tree, size)); - - if (default_alloc_size < DEFAULT_ALLOC_SIZE) - default_alloc_size= DEFAULT_ALLOC_SIZE; - default_alloc_size= MY_ALIGN(default_alloc_size, DEFAULT_ALIGN_SIZE); - bzero((uchar*) &tree->null_element,sizeof(tree->null_element)); - tree->root= &tree->null_element; - tree->compare=compare; - tree->size_of_element=size > 0 ? (uint) size : 0; - tree->memory_limit=memory_limit; - tree->free=free_element; - tree->allocated=0; - tree->elements_in_tree=0; - tree->custom_arg = custom_arg; - tree->null_element.colour=BLACK; - tree->null_element.left=tree->null_element.right=0; - tree->flag= 0; - if (!free_element && size >= 0 && - ((uint) size <= sizeof(void*) || ((uint) size & (sizeof(void*)-1)))) - { - /* - We know that the data doesn't have to be aligned (like if the key - contains a double), so we can store the data combined with the - TREE_ELEMENT. - */ - tree->offset_to_key=sizeof(TREE_ELEMENT); /* Put key after element */ - /* Fix allocation size so that we don't lose any memory */ - default_alloc_size/=(sizeof(TREE_ELEMENT)+size); - if (!default_alloc_size) - default_alloc_size=1; - default_alloc_size*=(sizeof(TREE_ELEMENT)+size); - } - else - { - tree->offset_to_key=0; /* use key through pointer */ - tree->size_of_element+=sizeof(void*); - } - if (!(tree->with_delete=with_delete)) - { - init_alloc_root(&tree->mem_root, (uint) default_alloc_size, 0); - tree->mem_root.min_malloc=(sizeof(TREE_ELEMENT)+tree->size_of_element); - } - DBUG_VOID_RETURN; -} - -static void free_tree(TREE *tree, myf free_flags) -{ - DBUG_ENTER("free_tree"); - DBUG_PRINT("enter",("tree: %p", tree)); - - if (tree->root) /* If initialized */ - { - if (tree->with_delete) - delete_tree_element(tree,tree->root); - else - { - if (tree->free) - { - if (tree->memory_limit) - (*tree->free)(NULL, free_init, tree->custom_arg); - delete_tree_element(tree,tree->root); - if (tree->memory_limit) - (*tree->free)(NULL, free_end, tree->custom_arg); - } - free_root(&tree->mem_root, free_flags); - } - } - tree->root= &tree->null_element; - tree->elements_in_tree=0; - tree->allocated=0; - - DBUG_VOID_RETURN; -} - -void delete_tree(TREE* tree) -{ - free_tree(tree, MYF(0)); /* my_free() mem_root if applicable */ -} - -void reset_tree(TREE* tree) -{ - /* do not free mem_root, just mark blocks as free */ - free_tree(tree, MYF(MY_MARK_BLOCKS_FREE)); -} - - -static void delete_tree_element(TREE *tree, TREE_ELEMENT *element) -{ - if (element != &tree->null_element) - { - delete_tree_element(tree,element->left); - if (tree->free) - (*tree->free)(ELEMENT_KEY(tree,element), free_free, tree->custom_arg); - delete_tree_element(tree,element->right); - if (tree->with_delete) - my_free((char*) element,MYF(0)); - } -} - - -/* - insert, search and delete of elements - - The following should be true: - parent[0] = & parent[-1][0]->left || - parent[0] = & parent[-1][0]->right -*/ - -TREE_ELEMENT *tree_insert(TREE *tree, void *key, uint key_size, - void* custom_arg) -{ - int cmp; - TREE_ELEMENT *element,***parent; - - parent= tree->parents; - *parent = &tree->root; element= tree->root; - for (;;) - { - if (element == &tree->null_element || - (cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element), - key)) == 0) - break; - if (cmp < 0) - { - *++parent= &element->right; element= element->right; - } - else - { - *++parent = &element->left; element= element->left; - } - } - if (element == &tree->null_element) - { - uint alloc_size=sizeof(TREE_ELEMENT)+key_size+tree->size_of_element; - tree->allocated+=alloc_size; - - if (tree->memory_limit && tree->elements_in_tree - && tree->allocated > tree->memory_limit) - { - reset_tree(tree); - return tree_insert(tree, key, key_size, custom_arg); - } - - key_size+=tree->size_of_element; - if (tree->with_delete) - element=(TREE_ELEMENT *) my_malloc(alloc_size, MYF(MY_WME)); - else - element=(TREE_ELEMENT *) alloc_root(&tree->mem_root,alloc_size); - if (!element) - return(NULL); - **parent=element; - element->left=element->right= &tree->null_element; - if (!tree->offset_to_key) - { - if (key_size == sizeof(void*)) /* no length, save pointer */ - *((void**) (element+1))=key; - else - { - *((void**) (element+1))= (void*) ((void **) (element+1)+1); - memcpy((uchar*) *((void **) (element+1)),key, - (size_t) (key_size-sizeof(void*))); - } - } - else - memcpy((uchar*) element+tree->offset_to_key,key,(size_t) key_size); - element->count=1; /* May give warning in purify */ - tree->elements_in_tree++; - rb_insert(tree,parent,element); /* rebalance tree */ - } - else - { - if (tree->flag & TREE_NO_DUPS) - return(NULL); - element->count++; - /* Avoid a wrap over of the count. */ - if (! element->count) - element->count--; - } - DBUG_EXECUTE("check_tree", test_rb_tree(tree->root);); - return element; -} - -int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg) -{ - int cmp,remove_colour; - TREE_ELEMENT *element,***parent, ***org_parent, *nod; - if (!tree->with_delete) - return 1; /* not allowed */ - - parent= tree->parents; - *parent= &tree->root; element= tree->root; - for (;;) - { - if (element == &tree->null_element) - return 1; /* Was not in tree */ - if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element), - key)) == 0) - break; - if (cmp < 0) - { - *++parent= &element->right; element= element->right; - } - else - { - *++parent = &element->left; element= element->left; - } - } - if (element->left == &tree->null_element) - { - (**parent)=element->right; - remove_colour= element->colour; - } - else if (element->right == &tree->null_element) - { - (**parent)=element->left; - remove_colour= element->colour; - } - else - { - org_parent= parent; - *++parent= &element->right; nod= element->right; - while (nod->left != &tree->null_element) - { - *++parent= &nod->left; nod= nod->left; - } - (**parent)=nod->right; /* unlink nod from tree */ - remove_colour= nod->colour; - org_parent[0][0]=nod; /* put y in place of element */ - org_parent[1]= &nod->right; - nod->left=element->left; - nod->right=element->right; - nod->colour=element->colour; - } - if (remove_colour == BLACK) - rb_delete_fixup(tree,parent); - if (tree->free) - (*tree->free)(ELEMENT_KEY(tree,element), free_free, tree->custom_arg); - tree->allocated-= sizeof(TREE_ELEMENT) + tree->size_of_element + key_size; - my_free((uchar*) element,MYF(0)); - tree->elements_in_tree--; - return 0; -} - - -void *tree_search(TREE *tree, void *key, void *custom_arg) -{ - int cmp; - TREE_ELEMENT *element=tree->root; - - for (;;) - { - if (element == &tree->null_element) - return (void*) 0; - if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element), - key)) == 0) - return ELEMENT_KEY(tree,element); - if (cmp < 0) - element=element->right; - else - element=element->left; - } -} - -void *tree_search_key(TREE *tree, const void *key, - TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, - enum ha_rkey_function flag, void *custom_arg) -{ - int cmp; - TREE_ELEMENT *element= tree->root; - TREE_ELEMENT **last_left_step_parent= NULL, **last_right_step_parent= NULL; - TREE_ELEMENT **last_equal_element= NULL; - -/* - TODO: support for HA_READ_KEY_OR_PREV, HA_READ_PREFIX flags if needed. -*/ - - *parents = &tree->null_element; - while (element != &tree->null_element) - { - *++parents= element; - if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element), - key)) == 0) - { - switch (flag) { - case HA_READ_KEY_EXACT: - case HA_READ_KEY_OR_NEXT: - case HA_READ_BEFORE_KEY: - last_equal_element= parents; - cmp= 1; - break; - case HA_READ_AFTER_KEY: - cmp= -1; - break; - case HA_READ_PREFIX_LAST: - case HA_READ_PREFIX_LAST_OR_PREV: - last_equal_element= parents; - cmp= -1; - break; - default: - return NULL; - } - } - if (cmp < 0) /* element < key */ - { - last_right_step_parent= parents; - element= element->right; - } - else - { - last_left_step_parent= parents; - element= element->left; - } - } - switch (flag) { - case HA_READ_KEY_EXACT: - case HA_READ_PREFIX_LAST: - *last_pos= last_equal_element; - break; - case HA_READ_KEY_OR_NEXT: - *last_pos= last_equal_element ? last_equal_element : last_left_step_parent; - break; - case HA_READ_AFTER_KEY: - *last_pos= last_left_step_parent; - break; - case HA_READ_PREFIX_LAST_OR_PREV: - *last_pos= last_equal_element ? last_equal_element : last_right_step_parent; - break; - case HA_READ_BEFORE_KEY: - *last_pos= last_right_step_parent; - break; - default: - return NULL; - } - return *last_pos ? ELEMENT_KEY(tree, **last_pos) : NULL; -} - -/* - Search first (the most left) or last (the most right) tree element -*/ -void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents, - TREE_ELEMENT ***last_pos, int child_offs) -{ - TREE_ELEMENT *element= tree->root; - - *parents= &tree->null_element; - while (element != &tree->null_element) - { - *++parents= element; - element= ELEMENT_CHILD(element, child_offs); - } - *last_pos= parents; - return **last_pos != &tree->null_element ? - ELEMENT_KEY(tree, **last_pos) : NULL; -} - -void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, - int r_offs) -{ - TREE_ELEMENT *x= **last_pos; - - if (ELEMENT_CHILD(x, r_offs) != &tree->null_element) - { - x= ELEMENT_CHILD(x, r_offs); - *++*last_pos= x; - while (ELEMENT_CHILD(x, l_offs) != &tree->null_element) - { - x= ELEMENT_CHILD(x, l_offs); - *++*last_pos= x; - } - return ELEMENT_KEY(tree, x); - } - else - { - TREE_ELEMENT *y= *--*last_pos; - while (y != &tree->null_element && x == ELEMENT_CHILD(y, r_offs)) - { - x= y; - y= *--*last_pos; - } - return y == &tree->null_element ? NULL : ELEMENT_KEY(tree, y); - } -} - -/* - Expected that tree is fully balanced - (each path from root to leaf has the same length) -*/ -ha_rows tree_record_pos(TREE *tree, const void *key, - enum ha_rkey_function flag, void *custom_arg) -{ - int cmp; - TREE_ELEMENT *element= tree->root; - double left= 1; - double right= tree->elements_in_tree; - - while (element != &tree->null_element) - { - if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element), - key)) == 0) - { - switch (flag) { - case HA_READ_KEY_EXACT: - case HA_READ_BEFORE_KEY: - cmp= 1; - break; - case HA_READ_AFTER_KEY: - cmp= -1; - break; - default: - return HA_POS_ERROR; - } - } - if (cmp < 0) /* element < key */ - { - element= element->right; - left= (left + right) / 2; - } - else - { - element= element->left; - right= (left + right) / 2; - } - } - switch (flag) { - case HA_READ_KEY_EXACT: - case HA_READ_BEFORE_KEY: - return (ha_rows) right; - case HA_READ_AFTER_KEY: - return (ha_rows) left; - default: - return HA_POS_ERROR; - } -} - -int tree_walk(TREE *tree, tree_walk_action action, void *argument, TREE_WALK visit) -{ - switch (visit) { - case left_root_right: - return tree_walk_left_root_right(tree,tree->root,action,argument); - case right_root_left: - return tree_walk_right_root_left(tree,tree->root,action,argument); - } - return 0; /* Keep gcc happy */ -} - -static int tree_walk_left_root_right(TREE *tree, TREE_ELEMENT *element, tree_walk_action action, void *argument) -{ - int error; - if (element->left) /* Not null_element */ - { - if ((error=tree_walk_left_root_right(tree,element->left,action, - argument)) == 0 && - (error=(*action)(ELEMENT_KEY(tree,element), - (element_count) element->count, - argument)) == 0) - error=tree_walk_left_root_right(tree,element->right,action,argument); - return error; - } - return 0; -} - -static int tree_walk_right_root_left(TREE *tree, TREE_ELEMENT *element, tree_walk_action action, void *argument) -{ - int error; - if (element->right) /* Not null_element */ - { - if ((error=tree_walk_right_root_left(tree,element->right,action, - argument)) == 0 && - (error=(*action)(ELEMENT_KEY(tree,element), - (element_count) element->count, - argument)) == 0) - error=tree_walk_right_root_left(tree,element->left,action,argument); - return error; - } - return 0; -} - - - /* Functions to fix up the tree after insert and delete */ - -static void left_rotate(TREE_ELEMENT **parent, TREE_ELEMENT *leaf) -{ - TREE_ELEMENT *y; - - y=leaf->right; - leaf->right=y->left; - parent[0]=y; - y->left=leaf; -} - -static void right_rotate(TREE_ELEMENT **parent, TREE_ELEMENT *leaf) -{ - TREE_ELEMENT *x; - - x=leaf->left; - leaf->left=x->right; - parent[0]=x; - x->right=leaf; -} - -static void rb_insert(TREE *tree, TREE_ELEMENT ***parent, TREE_ELEMENT *leaf) -{ - TREE_ELEMENT *y,*par,*par2; - - leaf->colour=RED; - while (leaf != tree->root && (par=parent[-1][0])->colour == RED) - { - if (par == (par2=parent[-2][0])->left) - { - y= par2->right; - if (y->colour == RED) - { - par->colour=BLACK; - y->colour=BLACK; - leaf=par2; - parent-=2; - leaf->colour=RED; /* And the loop continues */ - } - else - { - if (leaf == par->right) - { - left_rotate(parent[-1],par); - par=leaf; /* leaf is now parent to old leaf */ - } - par->colour=BLACK; - par2->colour=RED; - right_rotate(parent[-2],par2); - break; - } - } - else - { - y= par2->left; - if (y->colour == RED) - { - par->colour=BLACK; - y->colour=BLACK; - leaf=par2; - parent-=2; - leaf->colour=RED; /* And the loop continues */ - } - else - { - if (leaf == par->left) - { - right_rotate(parent[-1],par); - par=leaf; - } - par->colour=BLACK; - par2->colour=RED; - left_rotate(parent[-2],par2); - break; - } - } - } - tree->root->colour=BLACK; -} - -static void rb_delete_fixup(TREE *tree, TREE_ELEMENT ***parent) -{ - TREE_ELEMENT *x,*w,*par; - - x= **parent; - while (x != tree->root && x->colour == BLACK) - { - if (x == (par=parent[-1][0])->left) - { - w=par->right; - if (w->colour == RED) - { - w->colour=BLACK; - par->colour=RED; - left_rotate(parent[-1],par); - parent[0]= &w->left; - *++parent= &par->left; - w=par->right; - } - if (w->left->colour == BLACK && w->right->colour == BLACK) - { - w->colour=RED; - x=par; - parent--; - } - else - { - if (w->right->colour == BLACK) - { - w->left->colour=BLACK; - w->colour=RED; - right_rotate(&par->right,w); - w=par->right; - } - w->colour=par->colour; - par->colour=BLACK; - w->right->colour=BLACK; - left_rotate(parent[-1],par); - x=tree->root; - break; - } - } - else - { - w=par->left; - if (w->colour == RED) - { - w->colour=BLACK; - par->colour=RED; - right_rotate(parent[-1],par); - parent[0]= &w->right; - *++parent= &par->right; - w=par->left; - } - if (w->right->colour == BLACK && w->left->colour == BLACK) - { - w->colour=RED; - x=par; - parent--; - } - else - { - if (w->left->colour == BLACK) - { - w->right->colour=BLACK; - w->colour=RED; - left_rotate(&par->left,w); - w=par->left; - } - w->colour=par->colour; - par->colour=BLACK; - w->left->colour=BLACK; - right_rotate(parent[-1],par); - x=tree->root; - break; - } - } - } - x->colour=BLACK; -} - -#ifndef DBUG_OFF - - /* Test that the proporties for a red-black tree holds */ - -static int test_rb_tree(TREE_ELEMENT *element) -{ - int count_l,count_r; - - if (!element->left) - return 0; /* Found end of tree */ - if (element->colour == RED && - (element->left->colour == RED || element->right->colour == RED)) - { - printf("Wrong tree: Found two red in a row\n"); - return -1; - } - count_l=test_rb_tree(element->left); - count_r=test_rb_tree(element->right); - if (count_l >= 0 && count_r >= 0) - { - if (count_l == count_r) - return count_l+(element->colour == BLACK); - printf("Wrong tree: Incorrect black-count: %d - %d\n",count_l,count_r); - } - return -1; -} -#endif diff --git a/externals/mysql/mysys/trie.c b/externals/mysql/mysys/trie.c deleted file mode 100644 index 5738b9b866..0000000000 --- a/externals/mysql/mysys/trie.c +++ /dev/null @@ -1,236 +0,0 @@ -/* Copyright (C) 2005 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Implementation of trie and Aho-Corasick automaton. - Supports only charsets that can be compared byte-wise. - - TODO: - Add character frequencies. Can increase lookup speed - up to 30%. - Implement character-wise comparision. -*/ - - -#include "mysys_priv.h" -#include -#include -#include - - -/* - SYNOPSIS - TRIE *trie_init (TRIE *trie, CHARSET_INFO *charset); - - DESCRIPTION - Allocates or initializes a `TRIE' object. If `trie' is a `NULL' - pointer, the function allocates, initializes, and returns a new - object. Otherwise, the object is initialized and the address of - the object is returned. If `trie_init()' allocates a new object, - it will be freed when `trie_free()' is called. - - RETURN VALUE - An initialized `TRIE*' object. `NULL' if there was insufficient - memory to allocate a new object. -*/ - -TRIE *trie_init (TRIE *trie, CHARSET_INFO *charset) -{ - MEM_ROOT mem_root; - DBUG_ENTER("trie_init"); - DBUG_ASSERT(charset); - init_alloc_root(&mem_root, - (sizeof(TRIE_NODE) * 128) + ALLOC_ROOT_MIN_BLOCK_SIZE, - sizeof(TRIE_NODE) * 128); - if (! trie) - { - if (! (trie= (TRIE *)alloc_root(&mem_root, sizeof(TRIE)))) - { - free_root(&mem_root, MYF(0)); - DBUG_RETURN(NULL); - } - } - - memcpy(&trie->mem_root, &mem_root, sizeof(MEM_ROOT)); - trie->root.leaf= 0; - trie->root.c= 0; - trie->root.next= NULL; - trie->root.links= NULL; - trie->root.fail= NULL; - trie->charset= charset; - trie->nnodes= 0; - trie->nwords= 0; - DBUG_RETURN(trie); -} - - -/* - SYNOPSIS - void trie_free (TRIE *trie); - trie - valid pointer to `TRIE' - - DESCRIPTION - Frees the memory allocated for a `trie'. - - RETURN VALUE - None. -*/ - -void trie_free (TRIE *trie) -{ - MEM_ROOT mem_root; - DBUG_ENTER("trie_free"); - DBUG_ASSERT(trie); - memcpy(&mem_root, &trie->mem_root, sizeof(MEM_ROOT)); - free_root(&mem_root, MYF(0)); - DBUG_VOID_RETURN; -} - - -/* - SYNOPSIS - my_bool trie_insert (TRIE *trie, const uchar *key, uint keylen); - trie - valid pointer to `TRIE' - key - valid pointer to key to insert - keylen - non-0 key length - - DESCRIPTION - Inserts new key into trie. - - RETURN VALUE - Upon successful completion, `trie_insert' returns `FALSE'. Otherwise - `TRUE' is returned. - - NOTES - If this function fails you must assume `trie' is broken. - However it can be freed with trie_free(). -*/ - -my_bool trie_insert (TRIE *trie, const uchar *key, uint keylen) -{ - TRIE_NODE *node; - TRIE_NODE *next; - uchar p; - uint k; - DBUG_ENTER("trie_insert"); - DBUG_ASSERT(trie && key && keylen); - node= &trie->root; - trie->root.fail= NULL; - for (k= 0; k < keylen; k++) - { - p= key[k]; - for (next= node->links; next; next= next->next) - if (next->c == p) - break; - - if (! next) - { - TRIE_NODE *tmp= (TRIE_NODE *)alloc_root(&trie->mem_root, - sizeof(TRIE_NODE)); - if (! tmp) - DBUG_RETURN(TRUE); - tmp->leaf= 0; - tmp->c= p; - tmp->links= tmp->fail= tmp->next= NULL; - trie->nnodes++; - if (! node->links) - { - node->links= tmp; - } - else - { - for (next= node->links; next->next; next= next->next) /* no-op */; - next->next= tmp; - } - node= tmp; - } - else - { - node= next; - } - } - node->leaf= keylen; - trie->nwords++; - DBUG_RETURN(FALSE); -} - - -/* - SYNOPSIS - my_bool trie_prepare (TRIE *trie); - trie - valid pointer to `TRIE' - - DESCRIPTION - Constructs Aho-Corasick automaton. - - RETURN VALUE - Upon successful completion, `trie_prepare' returns `FALSE'. Otherwise - `TRUE' is returned. -*/ - -my_bool ac_trie_prepare (TRIE *trie) -{ - TRIE_NODE **tmp_nodes; - TRIE_NODE *node; - uint32 fnode= 0; - uint32 lnode= 0; - DBUG_ENTER("trie_prepare"); - DBUG_ASSERT(trie); - - tmp_nodes= (TRIE_NODE **)my_malloc(trie->nnodes * sizeof(TRIE_NODE *), MYF(0)); - if (! tmp_nodes) - DBUG_RETURN(TRUE); - - trie->root.fail= &trie->root; - for (node= trie->root.links; node; node= node->next) - { - node->fail= &trie->root; - tmp_nodes[lnode++]= node; - } - - while (fnode < lnode) - { - TRIE_NODE *current= (TRIE_NODE *)tmp_nodes[fnode++]; - for (node= current->links; node; node= node->next) - { - TRIE_NODE *fail= current->fail; - tmp_nodes[lnode++]= node; - while (! (node->fail= trie_goto(&trie->root, fail, node->c))) - fail= fail->fail; - } - } - my_free((uchar*)tmp_nodes, MYF(0)); - DBUG_RETURN(FALSE); -} - - -/* - SYNOPSIS - void ac_trie_init (TRIE *trie, AC_TRIE_STATE *state); - trie - valid pointer to `TRIE' - state - value pointer to `AC_TRIE_STATE' - - DESCRIPTION - Initializes `AC_TRIE_STATE' object. -*/ - -void ac_trie_init (TRIE *trie, AC_TRIE_STATE *state) -{ - DBUG_ENTER("ac_trie_init"); - DBUG_ASSERT(trie && state); - state->trie= trie; - state->node= &trie->root; - DBUG_VOID_RETURN; -} diff --git a/externals/mysql/mysys/typelib.c b/externals/mysql/mysys/typelib.c deleted file mode 100644 index 5c3e30488d..0000000000 --- a/externals/mysql/mysys/typelib.c +++ /dev/null @@ -1,243 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Functions to handle typelib */ - -#include "mysys_priv.h" -#include -#include - - -static const char field_separator=','; - -int find_type_or_exit(const char *x, TYPELIB *typelib, const char *option) -{ - int res; - const char **ptr; - - if ((res= find_type((char *) x, typelib, 2)) <= 0) - { - ptr= typelib->type_names; - if (!*x) - fprintf(stderr, "No option given to %s\n", option); - else - fprintf(stderr, "Unknown option to %s: %s\n", option, x); - fprintf(stderr, "Alternatives are: '%s'", *ptr); - while (*++ptr) - fprintf(stderr, ",'%s'", *ptr); - fprintf(stderr, "\n"); - exit(1); - } - return res; -} - - -/* - Search after a string in a list of strings. Endspace in x is not compared. - - SYNOPSIS - find_type() - x String to find - lib TYPELIB (struct of pointer to values + count) - full_name bitmap of what to do - If & 1 accept only whole names - If & 2 don't expand if half field - If & 4 allow #number# as type - If & 8 use ',' as string terminator - - NOTES - If part, uniq field is found and full_name == 0 then x is expanded - to full field. - - RETURN - -1 Too many matching values - 0 No matching value - >0 Offset+1 in typelib for matched string -*/ - - -int find_type(char *x, const TYPELIB *typelib, uint full_name) -{ - int find,pos,findpos; - reg1 char * i; - reg2 const char *j; - DBUG_ENTER("find_type"); - DBUG_PRINT("enter",("x: '%s' lib: %p", x, typelib)); - - if (!typelib->count) - { - DBUG_PRINT("exit",("no count")); - DBUG_RETURN(0); - } - LINT_INIT(findpos); - find=0; - for (pos=0 ; (j=typelib->type_names[pos]) ; pos++) - { - for (i=x ; - *i && (!(full_name & 8) || *i != field_separator) && - my_toupper(&my_charset_latin1,*i) == - my_toupper(&my_charset_latin1,*j) ; i++, j++) ; - if (! *j) - { - while (*i == ' ') - i++; /* skip_end_space */ - if (! *i || ((full_name & 8) && *i == field_separator)) - DBUG_RETURN(pos+1); - } - if ((!*i && (!(full_name & 8) || *i != field_separator)) && - (!*j || !(full_name & 1))) - { - find++; - findpos=pos; - } - } - if (find == 0 && (full_name & 4) && x[0] == '#' && strend(x)[-1] == '#' && - (findpos=atoi(x+1)-1) >= 0 && (uint) findpos < typelib->count) - find=1; - else if (find == 0 || ! x[0]) - { - DBUG_PRINT("exit",("Couldn't find type")); - DBUG_RETURN(0); - } - else if (find != 1 || (full_name & 1)) - { - DBUG_PRINT("exit",("Too many possybilities")); - DBUG_RETURN(-1); - } - if (!(full_name & 2)) - (void) strmov(x,typelib->type_names[findpos]); - DBUG_RETURN(findpos+1); -} /* find_type */ - - - /* Get name of type nr 'nr' */ - /* Warning first type is 1, 0 = empty field */ - -void make_type(register char * to, register uint nr, - register TYPELIB *typelib) -{ - DBUG_ENTER("make_type"); - if (!nr) - to[0]=0; - else - (void) strmov(to,get_type(typelib,nr-1)); - DBUG_VOID_RETURN; -} /* make_type */ - - - /* Get type */ - /* Warning first type is 0 */ - -const char *get_type(TYPELIB *typelib, uint nr) -{ - if (nr < (uint) typelib->count && typelib->type_names) - return(typelib->type_names[nr]); - return "?"; -} - - -/* - Create an integer value to represent the supplied comma-seperated - string where each string in the TYPELIB denotes a bit position. - - SYNOPSIS - find_typeset() - x string to decompose - lib TYPELIB (struct of pointer to values + count) - err index (not char position) of string element which was not - found or 0 if there was no error - - RETURN - a integer representation of the supplied string -*/ - -my_ulonglong find_typeset(char *x, TYPELIB *lib, int *err) -{ - my_ulonglong result; - int find; - char *i; - DBUG_ENTER("find_set"); - DBUG_PRINT("enter",("x: '%s' lib: %p", x, lib)); - - if (!lib->count) - { - DBUG_PRINT("exit",("no count")); - DBUG_RETURN(0); - } - result= 0; - *err= 0; - while (*x) - { - (*err)++; - i= x; - while (*x && *x != field_separator) x++; - if ((find= find_type(i, lib, 2 | 8) - 1) < 0) - DBUG_RETURN(0); - result|= (1ULL << find); - } - *err= 0; - DBUG_RETURN(result); -} /* find_set */ - - -/* - Create a copy of a specified TYPELIB structure. - - SYNOPSIS - copy_typelib() - root pointer to a MEM_ROOT object for allocations - from pointer to a source TYPELIB structure - - RETURN - pointer to the new TYPELIB structure on successful copy, or - NULL otherwise -*/ - -TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from) -{ - TYPELIB *to; - uint i; - - if (!from) - return NULL; - - if (!(to= (TYPELIB*) alloc_root(root, sizeof(TYPELIB)))) - return NULL; - - if (!(to->type_names= (const char **) - alloc_root(root, (sizeof(char *) + sizeof(int)) * (from->count + 1)))) - return NULL; - to->type_lengths= (unsigned int *)(to->type_names + from->count + 1); - to->count= from->count; - if (from->name) - { - if (!(to->name= strdup_root(root, from->name))) - return NULL; - } - else - to->name= NULL; - - for (i= 0; i < from->count; i++) - { - if (!(to->type_names[i]= strmake_root(root, from->type_names[i], - from->type_lengths[i]))) - return NULL; - to->type_lengths[i]= from->type_lengths[i]; - } - to->type_names[to->count]= NULL; - to->type_lengths[to->count]= 0; - - return to; -} diff --git a/externals/mysql/mysys/waiting_threads.c b/externals/mysql/mysys/waiting_threads.c deleted file mode 100644 index 46b3c1d491..0000000000 --- a/externals/mysql/mysys/waiting_threads.c +++ /dev/null @@ -1,1153 +0,0 @@ -/* Copyright (C) 2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/** - @file - - "waiting threads" subsystem - a unified interface for threads to wait - on each other, with built-in deadlock detection. - - Main concepts - ^^^^^^^^^^^^^ - a thread - is represented by a WT_THD structure. One physical thread - can have only one WT_THD descriptor at any given moment. - - a resource - a thread does not wait for other threads directly, - instead it waits for a "resource", which is "owned" by other threads. - It waits, exactly, for all "owners" to "release" a resource. - It does not have to correspond to a physical resource. For example, it - may be convenient in certain cases to force resource == thread. - A resource is represented by a WT_RESOURCE structure. - - a resource identifier - a pair of {resource type, value}. A value is - an ulonglong number. Represented by a WT_RESOURCE_ID structure. - - a resource type - a pointer to a statically defined instance of - WT_RESOURCE_TYPE structure. This structure contains a pointer to - a function that knows how to compare values of this resource type. - In the simple case it could be wt_resource_id_memcmp(). - - a wait-for graph - a graph, that represenst "wait-for" relationships. - It has two types of nodes - threads and resources. There are directed - edges from a thread to a resource it is waiting for (WT_THD::waiting_for), - from a thread to resources that it "owns" (WT_THD::my_resources), - and from a resource to threads that "own" it (WT_RESOURCE::owners) - - Graph completeness - ^^^^^^^^^^^^^^^^^^ - - For flawless deadlock detection wait-for graph must be complete. - It means that when a thread starts waiting it needs to know *all* its - blockers, and call wt_thd_will_wait_for() for every one of them. - Otherwise two phenomena should be expected: - - 1. Fuzzy timeouts: - - thread A needs to get a lock, and is blocked by a thread B. - it waits. - Just before the timeout thread B releases the lock. - thread A is ready to grab the lock but discovers that it is also - blocked by a thread C. - It waits and times out. - - As a result thread A has waited two timeout intervals, instead of one. - - 2. Unreliable cycle detection: - - Thread A waits for threads B and C - Thread C waits for D - Thread D wants to start waiting for A - - one can see immediately that thread D creates a cycle, and thus - a deadlock is detected. - - But if thread A would only wait for B, and start waiting for C - when B would unlock, thread D would be allowed to wait, a deadlock - would be only detected when B unlocks or somebody times out. - - These two phenomena don't affect a correctness, and strictly speaking, - the caller is not required to call wt_thd_will_wait_for() for *all* - blockers - it may optimize wt_thd_will_wait_for() calls. But they - may be perceived as bugs by users, it must be understood that such - an optimization comes with its price. - - Usage - ^^^^^ - - First, the wt* subsystem must be initialized by calling - wt_init(). In the server you don't need to do it, it's done - in mysqld.cc. - - Similarly, wt_end() frees wt* structures, should be called - at the end, but in the server mysqld.cc takes care of that. - - Every WT_THD should be initialized with wt_thd_lazy_init(). - After that they can be used in other wt_thd_* calls. - Before discarding, WT_THD should be free'd with - wt_thd_destroy(). In the server both are handled in sql_class.cc, - it's an error to try to do it manually. - - To use the deadlock detection one needs to use this thread's WT_THD, - call wt_thd_will_wait_for() for every thread it needs to wait on, - then call wt_thd_cond_timedwait(). When thread releases a resource - it should call wt_thd_release() (or wt_thd_release_all()) - it will - notify (send a signal) threads waiting in wt_thd_cond_timedwait(), - if appropriate. - - Just like with pthread's cond_wait, there could be spurious - wake-ups from wt_thd_cond_timedwait(). A caller is expected to - handle that (that is, to re-check the blocking criteria). - - wt_thd_will_wait_for() and wt_thd_cond_timedwait() return either - WT_OK or WT_DEADLOCK. Additionally wt_thd_cond_timedwait() can return - WT_TIMEOUT. Out of memory and other fatal errors are reported as - WT_DEADLOCK - and a transaction must be aborted just the same. - - Configuration - ^^^^^^^^^^^^^ - There are four config variables. Two deadlock search depths - short and - long - and two timeouts. Deadlock search is performed with the short - depth on every wt_thd_will_wait_for() call. wt_thd_cond_timedwait() - waits with a short timeout, performs a deadlock search with the long - depth, and waits with a long timeout. As most deadlock cycles are supposed - to be short, most deadlocks will be detected at once, and waits will - rarely be necessary. - - These config variables are thread-local. Different threads may have - different search depth and timeout values. - - Also, deadlock detector supports different killing strategies, the victim - in a deadlock cycle is selected based on the "weight". See "weight" - description in waiting_threads.h for details. It's up to the caller to - set weights accordingly. - - Status - ^^^^^^ - We calculate the number of successfull waits (WT_OK returned from - wt_thd_cond_timedwait()), a number of timeouts, a deadlock cycle - length distribution - number of deadlocks with every length from - 1 to WT_CYCLE_STATS, and a wait time distribution - number - of waits with a time from 1 us to 1 min in WT_WAIT_STATS - intervals on a log e scale. -*/ - -/* - Note that if your lock system satisfy the following condition: - - there exist four lock levels A, B, C, D, such as - A is compatible with B - A is not compatible with C - D is not compatible with B - - (example A=IX, B=IS, C=S, D=X) - - you need to include lock level in the resource identifier - a - thread waiting for lock of the type A on resource R and another - thread waiting for lock of the type B on resource R should wait on - different WT_RESOURCE structures, on different {lock, resource} - pairs. Otherwise the following is possible: - - thread1> take S-lock on R - thread2> take IS-lock on R - thread3> wants X-lock on R, starts waiting for threads 1 and 2 on R. - thread3 is killed (or timeout or whatever) - WT_RESOURCE structure for R is still in the hash, as it has two owners - thread4> wants an IX-lock on R - WT_RESOURCE for R is found in the hash, thread4 starts waiting on it. - !! now thread4 is waiting for both thread1 and thread2 - !! while, in fact, IX-lock and IS-lock are compatible and - !! thread4 should not wait for thread2. -*/ - -#include -#include - -/* status variables */ - -/** - preset table of wait intervals -*/ -ulonglong wt_wait_table[WT_WAIT_STATS]; -/** - wait time distribution (log e scale) -*/ -uint32 wt_wait_stats[WT_WAIT_STATS+1]; -/** - distribution of cycle lengths - first column tells whether this was during short or long detection -*/ -uint32 wt_cycle_stats[2][WT_CYCLE_STATS+1]; -uint32 wt_success_stats; - -static my_atomic_rwlock_t cycle_stats_lock, wait_stats_lock, success_stats_lock; - -#ifdef SAFE_STATISTICS -#define incr(VAR, LOCK) \ - do { \ - my_atomic_rwlock_wrlock(&(LOCK)); \ - my_atomic_add32(&(VAR), 1); \ - my_atomic_rwlock_wrunlock(&(LOCK)); \ - } while(0) -#else -#define incr(VAR,LOCK) do { (VAR)++; } while(0) -#endif - -static void increment_success_stats() -{ - incr(wt_success_stats, success_stats_lock); -} - -static void increment_cycle_stats(uint depth, uint slot) -{ - if (depth >= WT_CYCLE_STATS) - depth= WT_CYCLE_STATS; - incr(wt_cycle_stats[slot][depth], cycle_stats_lock); -} - -static void increment_wait_stats(ulonglong waited,int ret) -{ - uint i; - if ((ret) == ETIMEDOUT) - i= WT_WAIT_STATS; - else - for (i= 0; i < WT_WAIT_STATS && waited/10 > wt_wait_table[i]; i++) ; - incr(wt_wait_stats[i], wait_stats_lock); -} - -/* - 'lock' protects 'owners', 'state', and 'waiter_count' - 'id' is read-only - - a resource is picked up from a hash in a lock-free manner - it's returned pinned, so it cannot be freed at once - but it may be freed right after the pin is removed - to free a resource it should - 1. have no owners - 2. have no waiters - - two ways to access a resource: - 1. find it in a hash - - it's returned pinned. - a) take a lock in exclusive mode - b) check the state, it should be ACTIVE to be usable - c) unpin - 2. by a direct reference - - could only used if a resource cannot be freed - e.g. accessing a resource by thd->waiting_for is safe, - a resource cannot be freed as there's a thread waiting for it -*/ -struct st_wt_resource { - WT_RESOURCE_ID id; - uint waiter_count; - enum { ACTIVE, FREE } state; -#ifndef DBUG_OFF - pthread_mutex_t *cond_mutex; /* a mutex for the 'cond' below */ -#endif - /* - before the 'lock' all elements are mutable, after (and including) - - immutable in the sense that lf_hash_insert() won't memcpy() over them. - See wt_init(). - */ -#ifdef WT_RWLOCKS_USE_MUTEXES - /* - we need a special rwlock-like 'lock' to allow readers bypass - waiting writers, otherwise readers can deadlock. For example: - - A waits on resource x, owned by B, B waits on resource y, owned - by A, we have a cycle (A->x->B->y->A) - Both A and B start deadlock detection: - - A locks x B locks y - A goes deeper B goes deeper - A locks y B locks x - - with mutexes it would deadlock. With rwlocks it won't, as long - as both A and B are taking read locks (and they do). - But other threads may take write locks. Assume there's - C who wants to start waiting on x, and D who wants to start - waiting on y. - - A read-locks x B read-locks y - A goes deeper B goes deeper - => C write-locks x (to add a new edge) D write-locks y - .. C is blocked D is blocked - A read-locks y B read-locks x - - Now, if a read lock can bypass a pending wrote lock request, we're fine. - If it can not, we have a deadlock. - - writer starvation is technically possible, but unlikely, because - the contention is expected to be low. - */ - struct { - pthread_cond_t cond; - pthread_mutex_t mutex; - uint readers: 16; - uint pending_writers: 15; - uint write_locked: 1; - } lock; -#else - rw_lock_t lock; -#endif - pthread_cond_t cond; /* the corresponding mutex is provided by the caller */ - DYNAMIC_ARRAY owners; -}; - -#ifdef WT_RWLOCKS_USE_MUTEXES -static void rc_rwlock_init(WT_RESOURCE *rc) -{ - pthread_cond_init(&rc->lock.cond, 0); - pthread_mutex_init(&rc->lock.mutex, MY_MUTEX_INIT_FAST); -} -static void rc_rwlock_destroy(WT_RESOURCE *rc) -{ - DBUG_ASSERT(rc->lock.write_locked == 0); - DBUG_ASSERT(rc->lock.readers == 0); - pthread_cond_destroy(&rc->lock.cond); - pthread_mutex_destroy(&rc->lock.mutex); -} -static void rc_rdlock(WT_RESOURCE *rc) -{ - DBUG_PRINT("wt", ("TRYLOCK resid=%ld for READ", (ulong)rc->id.value)); - pthread_mutex_lock(&rc->lock.mutex); - while (rc->lock.write_locked) - pthread_cond_wait(&rc->lock.cond, &rc->lock.mutex); - rc->lock.readers++; - pthread_mutex_unlock(&rc->lock.mutex); - DBUG_PRINT("wt", ("LOCK resid=%ld for READ", (ulong)rc->id.value)); -} -static void rc_wrlock(WT_RESOURCE *rc) -{ - DBUG_PRINT("wt", ("TRYLOCK resid=%ld for WRITE", (ulong)rc->id.value)); - pthread_mutex_lock(&rc->lock.mutex); - while (rc->lock.write_locked || rc->lock.readers) - pthread_cond_wait(&rc->lock.cond, &rc->lock.mutex); - rc->lock.write_locked= 1; - pthread_mutex_unlock(&rc->lock.mutex); - DBUG_PRINT("wt", ("LOCK resid=%ld for WRITE", (ulong)rc->id.value)); -} -static void rc_unlock(WT_RESOURCE *rc) -{ - DBUG_PRINT("wt", ("UNLOCK resid=%ld", (ulong)rc->id.value)); - pthread_mutex_lock(&rc->lock.mutex); - if (rc->lock.write_locked) - { - rc->lock.write_locked= 0; - pthread_cond_broadcast(&rc->lock.cond); - } - else if (--rc->lock.readers == 0) - pthread_cond_broadcast(&rc->lock.cond); - pthread_mutex_unlock(&rc->lock.mutex); -} -#else -static void rc_rwlock_init(WT_RESOURCE *rc) -{ - my_rwlock_init(&rc->lock, 0); -} -static void rc_rwlock_destroy(WT_RESOURCE *rc) -{ - rwlock_destroy(&rc->lock); -} -static void rc_rdlock(WT_RESOURCE *rc) -{ - DBUG_PRINT("wt", ("TRYLOCK resid=%ld for READ", (ulong)rc->id.value)); - rw_rdlock(&rc->lock); - DBUG_PRINT("wt", ("LOCK resid=%ld for READ", (ulong)rc->id.value)); -} -static void rc_wrlock(WT_RESOURCE *rc) -{ - DBUG_PRINT("wt", ("TRYLOCK resid=%ld for WRITE", (ulong)rc->id.value)); - rw_wrlock(&rc->lock); - DBUG_PRINT("wt", ("LOCK resid=%ld for WRITE", (ulong)rc->id.value)); -} -static void rc_unlock(WT_RESOURCE *rc) -{ - DBUG_PRINT("wt", ("UNLOCK resid=%ld", (ulong)rc->id.value)); - rw_unlock(&rc->lock); -} -#endif - -/* - All resources are stored in a lock-free hash. Different threads - may add new resources and perform deadlock detection concurrently. -*/ -static LF_HASH reshash; - -/** - WT_RESOURCE constructor - - It's called from lf_hash and takes a pointer to an LF_SLIST instance. - WT_RESOURCE is located at arg+sizeof(LF_SLIST) -*/ -static void wt_resource_init(uchar *arg) -{ - WT_RESOURCE *rc= (WT_RESOURCE*)(arg+LF_HASH_OVERHEAD); - DBUG_ENTER("wt_resource_init"); - - bzero(rc, sizeof(*rc)); - rc_rwlock_init(rc); - pthread_cond_init(&rc->cond, 0); - my_init_dynamic_array(&rc->owners, sizeof(WT_THD *), 0, 5); - DBUG_VOID_RETURN; -} - -/** - WT_RESOURCE destructor - - It's called from lf_hash and takes a pointer to an LF_SLIST instance. - WT_RESOURCE is located at arg+sizeof(LF_SLIST) -*/ -static void wt_resource_destroy(uchar *arg) -{ - WT_RESOURCE *rc= (WT_RESOURCE*)(arg+LF_HASH_OVERHEAD); - DBUG_ENTER("wt_resource_destroy"); - - DBUG_ASSERT(rc->owners.elements == 0); - rc_rwlock_destroy(rc); - pthread_cond_destroy(&rc->cond); - delete_dynamic(&rc->owners); - DBUG_VOID_RETURN; -} - -void wt_init() -{ - DBUG_ENTER("wt_init"); - DBUG_ASSERT(reshash.alloc.constructor != wt_resource_init); - - lf_hash_init(&reshash, sizeof(WT_RESOURCE), LF_HASH_UNIQUE, 0, - sizeof_WT_RESOURCE_ID, 0, 0); - reshash.alloc.constructor= wt_resource_init; - reshash.alloc.destructor= wt_resource_destroy; - /* - Note a trick: we initialize the hash with the real element size, - but fix it later to a shortened element size. This way - the allocator will allocate elements correctly, but - lf_hash_insert() will only overwrite part of the element with memcpy(). - lock, condition, and dynamic array will be intact. - */ - reshash.element_size= offsetof(WT_RESOURCE, lock); - bzero(wt_wait_stats, sizeof(wt_wait_stats)); - bzero(wt_cycle_stats, sizeof(wt_cycle_stats)); - wt_success_stats= 0; - { /* initialize wt_wait_table[]. from 1 us to 1 min, log e scale */ - int i; - double from= log(1); /* 1 us */ - double to= log(60e6); /* 1 min */ - for (i= 0; i < WT_WAIT_STATS; i++) - { - wt_wait_table[i]= (ulonglong)exp((to-from)/(WT_WAIT_STATS-1)*i+from); - DBUG_ASSERT(i == 0 || wt_wait_table[i-1] != wt_wait_table[i]); - } - } - my_atomic_rwlock_init(&cycle_stats_lock); - my_atomic_rwlock_init(&success_stats_lock); - my_atomic_rwlock_init(&wait_stats_lock); - DBUG_VOID_RETURN; -} - -void wt_end() -{ - DBUG_ENTER("wt_end"); - - DBUG_ASSERT(reshash.count == 0); - lf_hash_destroy(&reshash); - my_atomic_rwlock_destroy(&cycle_stats_lock); - my_atomic_rwlock_destroy(&success_stats_lock); - my_atomic_rwlock_destroy(&wait_stats_lock); - DBUG_VOID_RETURN; -} - -/** - Lazy WT_THD initialization - - Cheap initialization of WT_THD. Only initialize fields that don't require - memory allocations - basically, it only does assignments. The rest of the - WT_THD structure will be initialized on demand, on the first use. - This allows one to initialize lazily all WT_THD structures, even if some - (or even most) of them will never be used for deadlock detection. - - @param ds a pointer to deadlock search depth short value - @param ts a pointer to deadlock timeout short value - @param dl a pointer to deadlock search depth long value - @param tl a pointer to deadlock timeout long value - - @note these are pointers to values, and WT_THD stores them as pointers. - It allows one later to change search depths and timeouts for existing - threads. It also means that the pointers must stay valid for the lifetime - of WT_THD. -*/ -void wt_thd_lazy_init(WT_THD *thd, const ulong *ds, const ulong *ts, - const ulong *dl, const ulong *tl) -{ - DBUG_ENTER("wt_thd_lazy_init"); - thd->waiting_for= 0; - thd->weight= 0; - thd->deadlock_search_depth_short= ds; - thd->timeout_short= ts; - thd->deadlock_search_depth_long= dl; - thd->timeout_long= tl; - /* dynamic array is also initialized lazily - without memory allocations */ - my_init_dynamic_array(&thd->my_resources, sizeof(WT_RESOURCE *), 0, 5); -#ifndef DBUG_OFF - thd->name= my_thread_name(); -#endif - DBUG_VOID_RETURN; -} - -/** - Finalize WT_THD initialization - - After lazy WT_THD initialization, parts of the structure are still - uninitialized. This function completes the initialization, allocating - memory, if necessary. It's called automatically on demand, when WT_THD - is about to be used. -*/ -static int fix_thd_pins(WT_THD *thd) -{ - if (unlikely(thd->pins == 0)) - { - thd->pins= lf_hash_get_pins(&reshash); -#ifndef DBUG_OFF - thd->name= my_thread_name(); -#endif - } - return thd->pins == 0; -} - -void wt_thd_destroy(WT_THD *thd) -{ - DBUG_ENTER("wt_thd_destroy"); - - DBUG_ASSERT(thd->my_resources.elements == 0); - DBUG_ASSERT(thd->waiting_for == 0); - - if (thd->pins != 0) - lf_hash_put_pins(thd->pins); - - delete_dynamic(&thd->my_resources); - DBUG_VOID_RETURN; -} -/** - Trivial resource id comparison function - bytewise memcmp. - - It can be used in WT_RESOURCE_TYPE structures where bytewise - comparison of values is sufficient. -*/ -my_bool wt_resource_id_memcmp(const void *a, const void *b) -{ - /* we use the fact that there's no padding in the middle of WT_RESOURCE_ID */ - compile_time_assert(offsetof(WT_RESOURCE_ID, type) == sizeof(ulonglong)); - return memcmp(a, b, sizeof_WT_RESOURCE_ID); -} - -/** - arguments for the recursive deadlock_search function -*/ -struct deadlock_arg { - WT_THD * const thd; /**< starting point of a search */ - uint const max_depth; /**< search depth limit */ - WT_THD *victim; /**< a thread to be killed to resolve a deadlock */ - WT_RESOURCE *last_locked_rc; /**< see comment at the end of deadlock_search() */ -}; - -/** - helper function to change the victim, according to the weight -*/ -static void change_victim(WT_THD* found, struct deadlock_arg *arg) -{ - if (found->weight < arg->victim->weight) - { - if (arg->victim != arg->thd) - { - rc_unlock(arg->victim->waiting_for); /* release the previous victim */ - DBUG_ASSERT(arg->last_locked_rc == found->waiting_for); - } - arg->victim= found; - arg->last_locked_rc= 0; - } -} - -/** - recursive loop detection in a wait-for graph with a limited search depth -*/ -static int deadlock_search(struct deadlock_arg *arg, WT_THD *blocker, - uint depth) -{ - WT_RESOURCE *rc, *volatile *shared_ptr= &blocker->waiting_for; - WT_THD *cursor; - uint i; - int ret= WT_OK; - DBUG_ENTER("deadlock_search"); - DBUG_PRINT("wt", ("enter: thd=%s, blocker=%s, depth=%u", - arg->thd->name, blocker->name, depth)); - - LF_REQUIRE_PINS(1); - - arg->last_locked_rc= 0; - - if (depth > arg->max_depth) - { - DBUG_PRINT("wt", ("exit: WT_DEPTH_EXCEEDED (early)")); - DBUG_RETURN(WT_DEPTH_EXCEEDED); - } - -retry: - /* - safe dereference as explained in lf_alloc-pin.c - (in short: protects against lf_alloc_free() in lf_hash_delete()) - */ - do - { - rc= *shared_ptr; - lf_pin(arg->thd->pins, 0, rc); - } while (rc != *shared_ptr && LF_BACKOFF); - - if (rc == 0) - { - DBUG_PRINT("wt", ("exit: OK (early)")); - DBUG_RETURN(0); - } - - rc_rdlock(rc); - if (rc->state != ACTIVE || *shared_ptr != rc) - { - /* blocker is not waiting on this resource anymore */ - rc_unlock(rc); - lf_unpin(arg->thd->pins, 0); - goto retry; - } - /* as the state is locked, we can unpin now */ - lf_unpin(arg->thd->pins, 0); - - /* - Below is not a pure depth-first search. It's a depth-first with a - slightest hint of breadth-first. Depth-first is: - - check(element, X): - foreach current in element->nodes[] do: - if current == X return error; - check(current, X); - - while we do - - check(element, X): - foreach current in element->nodes[] do: - if current == X return error; - foreach current in element->nodes[] do: - check(current, X); - - preferring shorter deadlocks over longer ones. - */ - for (i= 0; i < rc->owners.elements; i++) - { - cursor= *dynamic_element(&rc->owners, i, WT_THD**); - /* - We're only looking for (and detecting) cycles that include 'arg->thd'. - That is, only deadlocks that *we* have created. For example, - thd->A->B->thd - (thd waits for A, A waits for B, while B is waiting for thd). - While walking the graph we can encounter other cicles, e.g. - thd->A->B->C->A - This will not be detected. Instead we will walk it in circles until - the search depth limit is reached (the latter guarantees that an - infinite loop is impossible). We expect the thread that has created - the cycle (one of A, B, and C) to detect its deadlock. - */ - if (cursor == arg->thd) - { - ret= WT_DEADLOCK; - increment_cycle_stats(depth, arg->max_depth == - *arg->thd->deadlock_search_depth_long); - arg->victim= cursor; - goto end; - } - } - for (i= 0; i < rc->owners.elements; i++) - { - cursor= *dynamic_element(&rc->owners, i, WT_THD**); - switch (deadlock_search(arg, cursor, depth+1)) { - case WT_OK: - break; - case WT_DEPTH_EXCEEDED: - ret= WT_DEPTH_EXCEEDED; - break; - case WT_DEADLOCK: - ret= WT_DEADLOCK; - change_victim(cursor, arg); /* also sets arg->last_locked_rc to 0 */ - i= rc->owners.elements; /* jump out of the loop */ - break; - default: - DBUG_ASSERT(0); - } - if (arg->last_locked_rc) - rc_unlock(arg->last_locked_rc); - } -end: - /* - Note that 'rc' is locked in this function, but it's never unlocked here. - Instead it's saved in arg->last_locked_rc and the *caller* is - expected to unlock it. It's done to support different killing - strategies. This is how it works: - Assuming a graph - - thd->A->B->C->thd - - deadlock_search() function starts from thd, locks it (in fact it locks not - a thd, but a resource it is waiting on, but below, for simplicity, I'll - talk about "locking a thd"). Then it goes down recursively, locks A, and so - on. Goes down recursively, locks B. Goes down recursively, locks C. - Notices that C is waiting on thd. Deadlock detected. Sets arg->victim=thd. - Returns from the last deadlock_search() call. C stays locked! - Now it checks whether C is a more appropriate victim than 'thd'. - If yes - arg->victim=C, otherwise C is unlocked. Returns. B stays locked. - Now it checks whether B is a more appropriate victim than arg->victim. - If yes - old arg->victim is unlocked and arg->victim=B, - otherwise B is unlocked. Return. - And so on. - - In short, a resource is locked in a frame. But it's not unlocked in the - same frame, it's unlocked by the caller, and only after the caller checks - that it doesn't need to use current WT_THD as a victim. If it does - the - lock is kept and the old victim's resource is unlocked. When the recursion - is unrolled and we are back to deadlock() function, there are only two - locks left - on thd and on the victim. - */ - arg->last_locked_rc= rc; - DBUG_PRINT("wt", ("exit: %s", - ret == WT_DEPTH_EXCEEDED ? "WT_DEPTH_EXCEEDED" : - ret ? "WT_DEADLOCK" : "OK")); - DBUG_RETURN(ret); -} - -/** - Deadlock detection in a wait-for graph - - A wrapper for recursive deadlock_search() - prepares deadlock_arg structure, - invokes deadlock_search(), increments statistics, notifies the victim. - - @param thd thread that is going to wait. Deadlock is detected - if, while walking the graph, we reach a thread that - is waiting on thd - @param blocker starting point of a search. In wt_thd_cond_timedwait() - it's thd, in wt_thd_will_wait_for() it's a thread that - thd is going to wait for - @param depth starting search depth. In general it's the number of - edges in the wait-for graph between thd and the - blocker. Practically only two values are used (and - supported) - when thd == blocker it's 0, when thd - waits directly for blocker, it's 1 - @param max_depth search depth limit -*/ -static int deadlock(WT_THD *thd, WT_THD *blocker, uint depth, - uint max_depth) -{ - struct deadlock_arg arg= {thd, max_depth, 0, 0}; - int ret; - DBUG_ENTER("deadlock"); - DBUG_ASSERT(depth < 2); - ret= deadlock_search(&arg, blocker, depth); - if (ret == WT_DEPTH_EXCEEDED) - { - increment_cycle_stats(WT_CYCLE_STATS, max_depth == - *thd->deadlock_search_depth_long); - ret= WT_OK; - } - /* - if we started with depth==1, blocker was never considered for a victim - in deadlock_search(). Do it here. - */ - if (ret == WT_DEADLOCK && depth) - change_victim(blocker, &arg); - if (arg.last_locked_rc) - { - /* - Special return code if there's nobody to wait for. - - depth == 0 means that we start the search from thd (thd == blocker). - ret == WT_OK means that no cycle was found and - arg.last_locked_rc == thd->waiting_for. - and arg.last_locked_rc->owners.elements == 0 means that - (applying the rule above) thd->waiting_for->owners.elements == 0, - and thd doesn't have anybody to wait for. - */ - if (depth == 0 && ret == WT_OK && arg.last_locked_rc->owners.elements == 0) - { - DBUG_ASSERT(thd == blocker); - DBUG_ASSERT(arg.last_locked_rc == thd->waiting_for); - ret= WT_FREE_TO_GO; - } - rc_unlock(arg.last_locked_rc); - } - /* notify the victim, if appropriate */ - if (ret == WT_DEADLOCK && arg.victim != thd) - { - DBUG_PRINT("wt", ("killing %s", arg.victim->name)); - arg.victim->killed= 1; - pthread_cond_broadcast(&arg.victim->waiting_for->cond); - rc_unlock(arg.victim->waiting_for); - ret= WT_OK; - } - DBUG_RETURN(ret); -} - - -/** - Delete an element from reshash if it has no waiters or owners - - rc->lock must be locked by the caller and it's unlocked on return. -*/ -static int unlock_lock_and_free_resource(WT_THD *thd, WT_RESOURCE *rc) -{ - uint keylen; - const void *key; - DBUG_ENTER("unlock_lock_and_free_resource"); - - DBUG_ASSERT(rc->state == ACTIVE); - - if (rc->owners.elements || rc->waiter_count) - { - DBUG_PRINT("wt", ("nothing to do, %u owners, %u waiters", - rc->owners.elements, rc->waiter_count)); - rc_unlock(rc); - DBUG_RETURN(0); - } - - if (fix_thd_pins(thd)) - { - rc_unlock(rc); - DBUG_RETURN(1); - } - - /* XXX if (rc->id.type->make_key) key= rc->id.type->make_key(&rc->id, &keylen); else */ - { - key= &rc->id; - keylen= sizeof_WT_RESOURCE_ID; - } - - /* - To free the element correctly we need to: - 1. take its lock (already done). - 2. set the state to FREE - 3. release the lock - 4. remove from the hash - */ - rc->state= FREE; - rc_unlock(rc); - DBUG_RETURN(lf_hash_delete(&reshash, thd->pins, key, keylen) == -1); -} - - -/** - register the fact that thd is not waiting anymore - - decrease waiter_count, clear waiting_for, free the resource if appropriate. - thd->waiting_for must be locked! -*/ -static int stop_waiting_locked(WT_THD *thd) -{ - int ret; - WT_RESOURCE *rc= thd->waiting_for; - DBUG_ENTER("stop_waiting_locked"); - - DBUG_ASSERT(rc->waiter_count); - DBUG_ASSERT(rc->state == ACTIVE); - rc->waiter_count--; - thd->waiting_for= 0; - ret= unlock_lock_and_free_resource(thd, rc); - DBUG_RETURN((thd->killed || ret) ? WT_DEADLOCK : WT_OK); -} - -/** - register the fact that thd is not waiting anymore - - locks thd->waiting_for and calls stop_waiting_locked(). -*/ -static int stop_waiting(WT_THD *thd) -{ - int ret; - WT_RESOURCE *rc= thd->waiting_for; - DBUG_ENTER("stop_waiting"); - - if (!rc) - DBUG_RETURN(WT_OK); - /* - nobody's trying to free the resource now, - as its waiter_count is guaranteed to be non-zero - */ - rc_wrlock(rc); - ret= stop_waiting_locked(thd); - DBUG_RETURN(ret); -} - -/** - notify the system that a thread needs to wait for another thread - - called by a *waiter* to declare that it (thd) will wait for another - thread (blocker) on a specific resource (resid). - can be called many times, if many blockers own a blocking resource. - but must always be called with the same resource id - a thread cannot - wait for more than one resource at a time. - - @return WT_OK or WT_DEADLOCK - - As a new edge is added to the wait-for graph, a deadlock detection is - performed for this new edge. -*/ -int wt_thd_will_wait_for(WT_THD *thd, WT_THD *blocker, - const WT_RESOURCE_ID *resid) -{ - uint i; - WT_RESOURCE *rc; - DBUG_ENTER("wt_thd_will_wait_for"); - - LF_REQUIRE_PINS(3); - - DBUG_PRINT("wt", ("enter: thd=%s, blocker=%s, resid=%lu", - thd->name, blocker->name, (ulong)resid->value)); - - if (fix_thd_pins(thd)) - DBUG_RETURN(WT_DEADLOCK); - - if (thd->waiting_for == 0) - { - uint keylen; - const void *key; - /* XXX if (restype->make_key) key= restype->make_key(resid, &keylen); else */ - { - key= resid; - keylen= sizeof_WT_RESOURCE_ID; - } - - DBUG_PRINT("wt", ("first blocker")); - -retry: - while ((rc= lf_hash_search(&reshash, thd->pins, key, keylen)) == 0) - { - WT_RESOURCE tmp; - - DBUG_PRINT("wt", ("failed to find rc in hash, inserting")); - bzero(&tmp, sizeof(tmp)); - tmp.id= *resid; - tmp.state= ACTIVE; - - if (lf_hash_insert(&reshash, thd->pins, &tmp) == -1) /* if OOM */ - DBUG_RETURN(WT_DEADLOCK); - /* - Two cases: either lf_hash_insert() failed - because another thread - has just inserted a resource with the same id - and we need to retry. - Or lf_hash_insert() succeeded, and then we need to repeat - lf_hash_search() to find a real address of the newly inserted element. - That is, we don't care what lf_hash_insert() has returned. - And we need to repeat the loop anyway. - */ - } - if (rc == MY_ERRPTR) - DBUG_RETURN(WT_DEADLOCK); - - DBUG_PRINT("wt", ("found in hash rc=%p", rc)); - - rc_wrlock(rc); - if (rc->state != ACTIVE) - { - DBUG_PRINT("wt", ("but it's not active, retrying")); - /* Somebody has freed the element while we weren't looking */ - rc_unlock(rc); - lf_hash_search_unpin(thd->pins); - goto retry; - } - - lf_hash_search_unpin(thd->pins); /* the element cannot go away anymore */ - thd->waiting_for= rc; - rc->waiter_count++; - thd->killed= 0; - } - else - { - DBUG_ASSERT(thd->waiting_for->id.type == resid->type); - DBUG_ASSERT(resid->type->compare(&thd->waiting_for->id, resid) == 0); - DBUG_PRINT("wt", ("adding another blocker")); - - /* - we can safely access the resource here, it's in the hash as it has - non-zero waiter_count - */ - rc= thd->waiting_for; - rc_wrlock(rc); - DBUG_ASSERT(rc->waiter_count); - DBUG_ASSERT(rc->state == ACTIVE); - - if (thd->killed) - { - stop_waiting_locked(thd); - DBUG_RETURN(WT_DEADLOCK); - } - } - /* - Another thread could be waiting on this resource for this very 'blocker'. - In this case we should not add it to the list for the second time. - */ - for (i= 0; i < rc->owners.elements; i++) - if (*dynamic_element(&rc->owners, i, WT_THD**) == blocker) - break; - if (i >= rc->owners.elements) - { - if (push_dynamic(&blocker->my_resources, (void*)&rc)) - { - stop_waiting_locked(thd); - DBUG_RETURN(WT_DEADLOCK); /* deadlock and OOM use the same error code */ - } - if (push_dynamic(&rc->owners, (void*)&blocker)) - { - pop_dynamic(&blocker->my_resources); - stop_waiting_locked(thd); - DBUG_RETURN(WT_DEADLOCK); - } - } - rc_unlock(rc); - - if (deadlock(thd, blocker, 1, *thd->deadlock_search_depth_short) != WT_OK) - { - stop_waiting(thd); - DBUG_RETURN(WT_DEADLOCK); - } - DBUG_RETURN(WT_OK); -} - -/** - called by a *waiter* (thd) to start waiting - - It's supposed to be a drop-in replacement for - pthread_cond_timedwait(), and it takes mutex as an argument. - - @return one of WT_TIMEOUT, WT_DEADLOCK, WT_OK -*/ -int wt_thd_cond_timedwait(WT_THD *thd, pthread_mutex_t *mutex) -{ - int ret= WT_TIMEOUT; - struct timespec timeout; - ulonglong before, after, starttime; - WT_RESOURCE *rc= thd->waiting_for; - DBUG_ENTER("wt_thd_cond_timedwait"); - DBUG_PRINT("wt", ("enter: thd=%s, rc=%p", thd->name, rc)); - -#ifndef DBUG_OFF - if (rc->cond_mutex) - DBUG_ASSERT(rc->cond_mutex == mutex); - else - rc->cond_mutex= mutex; - safe_mutex_assert_owner(mutex); -#endif - - before= starttime= my_getsystime(); - -#ifdef __WIN__ - /* - only for the sake of Windows we distinguish between - 'before' and 'starttime': - - my_getsystime() returns high-resolution value, that cannot be used for - waiting (it doesn't follow system clock changes), but is good for time - intervals. - - GetSystemTimeAsFileTime() follows system clock, but is low-resolution - and will result in lousy intervals. - */ - GetSystemTimeAsFileTime((PFILETIME)&starttime); -#endif - - rc_wrlock(rc); - if (rc->owners.elements == 0) - ret= WT_OK; - rc_unlock(rc); - - set_timespec_time_nsec(timeout, starttime, (*thd->timeout_short)*1000ULL); - if (ret == WT_TIMEOUT && !thd->killed) - ret= pthread_cond_timedwait(&rc->cond, mutex, &timeout); - if (ret == WT_TIMEOUT && !thd->killed) - { - int r= deadlock(thd, thd, 0, *thd->deadlock_search_depth_long); - if (r == WT_FREE_TO_GO) - ret= WT_OK; - else if (r != WT_OK) - ret= WT_DEADLOCK; - else if (*thd->timeout_long > *thd->timeout_short) - { - set_timespec_time_nsec(timeout, starttime, (*thd->timeout_long)*1000ULL); - if (!thd->killed) - ret= pthread_cond_timedwait(&rc->cond, mutex, &timeout); - } - } - after= my_getsystime(); - if (stop_waiting(thd) == WT_DEADLOCK) /* if we're killed */ - ret= WT_DEADLOCK; - increment_wait_stats(after-before, ret); - if (ret == WT_OK) - increment_success_stats(); - DBUG_RETURN(ret); -} - -/** - called by a *blocker* when it releases a resource - - it's conceptually similar to pthread_cond_broadcast, and must be done - under the same mutex as wt_thd_cond_timedwait(). - - @param resid a resource to release. 0 to release all resources -*/ - -void wt_thd_release(WT_THD *thd, const WT_RESOURCE_ID *resid) -{ - uint i; - DBUG_ENTER("wt_thd_release"); - - for (i= 0; i < thd->my_resources.elements; i++) - { - WT_RESOURCE *rc= *dynamic_element(&thd->my_resources, i, WT_RESOURCE**); - if (!resid || (resid->type->compare(&rc->id, resid) == 0)) - { - uint j; - - rc_wrlock(rc); - /* - nobody's trying to free the resource now, - as its owners[] array is not empty (at least thd must be there) - */ - DBUG_ASSERT(rc->state == ACTIVE); - for (j= 0; j < rc->owners.elements; j++) - if (*dynamic_element(&rc->owners, j, WT_THD**) == thd) - break; - DBUG_ASSERT(j < rc->owners.elements); - delete_dynamic_element(&rc->owners, j); - if (rc->owners.elements == 0) - { - pthread_cond_broadcast(&rc->cond); -#ifndef DBUG_OFF - if (rc->cond_mutex) - safe_mutex_assert_owner(rc->cond_mutex); -#endif - } - unlock_lock_and_free_resource(thd, rc); - if (resid) - { - delete_dynamic_element(&thd->my_resources, i); - DBUG_VOID_RETURN; - } - } - } - if (!resid) - reset_dynamic(&thd->my_resources); - DBUG_VOID_RETURN; -} - diff --git a/externals/mysql/mysys/wqueue.c b/externals/mysql/mysys/wqueue.c deleted file mode 100644 index fcc0a39725..0000000000 --- a/externals/mysql/mysys/wqueue.c +++ /dev/null @@ -1,225 +0,0 @@ - -#include - -#define STRUCT_PTR(TYPE, MEMBER, a) \ - (TYPE *) ((char *) (a) - offsetof(TYPE, MEMBER)) -/* - Link a thread into double-linked queue of waiting threads. - - SYNOPSIS - wqueue_link_into_queue() - wqueue pointer to the queue structure - thread pointer to the thread to be added to the queue - - RETURN VALUE - none - - NOTES. - Queue is represented by a circular list of the thread structures - The list is double-linked of the type (**prev,*next), accessed by - a pointer to the last element. -*/ - -void wqueue_link_into_queue(WQUEUE *wqueue, struct st_my_thread_var *thread) -{ - struct st_my_thread_var *last; - if (!(last= wqueue->last_thread)) - { - /* Queue is empty */ - thread->next= thread; - thread->prev= &thread->next; - } - else - { - thread->prev= last->next->prev; - last->next->prev= &thread->next; - thread->next= last->next; - last->next= thread; - } - wqueue->last_thread= thread; -} - - -/* - Add a thread to single-linked queue of waiting threads - - SYNOPSIS - wqueue_add_to_queue() - wqueue pointer to the queue structure - thread pointer to the thread to be added to the queue - - RETURN VALUE - none - - NOTES. - Queue is represented by a circular list of the thread structures - The list is single-linked of the type (*next), accessed by a pointer - to the last element. -*/ - -void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread) -{ - struct st_my_thread_var *last; - if (!(last= wqueue->last_thread)) - thread->next= thread; - else - { - thread->next= last->next; - last->next= thread; - } -#ifndef DBUG_OFF - thread->prev= NULL; /* force segfault if used */ -#endif - wqueue->last_thread= thread; -} - -/* - Unlink a thread from double-linked queue of waiting threads - - SYNOPSIS - wqueue_unlink_from_queue() - wqueue pointer to the queue structure - thread pointer to the thread to be removed from the queue - - RETURN VALUE - none - - NOTES. - See NOTES for link_into_queue -*/ - -void wqueue_unlink_from_queue(WQUEUE *wqueue, struct st_my_thread_var *thread) -{ - if (thread->next == thread) - /* The queue contains only one member */ - wqueue->last_thread= NULL; - else - { - thread->next->prev= thread->prev; - *thread->prev= thread->next; - if (wqueue->last_thread == thread) - wqueue->last_thread= STRUCT_PTR(struct st_my_thread_var, next, - thread->prev); - } - thread->next= NULL; -} - - -/* - Remove all threads from queue signaling them to proceed - - SYNOPSIS - wqueue_realease_queue() - wqueue pointer to the queue structure - thread pointer to the thread to be added to the queue - - RETURN VALUE - none - - NOTES. - See notes for add_to_queue - When removed from the queue each thread is signaled via condition - variable thread->suspend. -*/ - -void wqueue_release_queue(WQUEUE *wqueue) -{ - struct st_my_thread_var *last= wqueue->last_thread; - struct st_my_thread_var *next= last->next; - struct st_my_thread_var *thread; - do - { - thread= next; - pthread_cond_signal(&thread->suspend); - next= thread->next; - thread->next= NULL; - } - while (thread != last); - wqueue->last_thread= NULL; -} - - -/** - @brief Removes all threads waiting for read or first one waiting for write. - - @param wqueue pointer to the queue structure - @param thread pointer to the thread to be added to the queue - - @note This function is applicable only to single linked lists. -*/ - -void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue) -{ - struct st_my_thread_var *last= wqueue->last_thread; - struct st_my_thread_var *next= last->next; - struct st_my_thread_var *thread; - struct st_my_thread_var *new_list= NULL; - uint first_type= next->lock_type; - if (first_type == MY_PTHREAD_LOCK_WRITE) - { - /* release first waiting for write lock */ - pthread_cond_signal(&next->suspend); - if (next == last) - wqueue->last_thread= NULL; - else - last->next= next->next; - next->next= NULL; - return; - } - do - { - thread= next; - next= thread->next; - if (thread->lock_type == MY_PTHREAD_LOCK_WRITE) - { - /* skip waiting for write lock */ - if (new_list) - { - thread->next= new_list->next; - new_list= new_list->next= thread; - } - else - new_list= thread->next= thread; - } - else - { - /* release waiting for read lock */ - pthread_cond_signal(&thread->suspend); - thread->next= NULL; - } - } while (thread != last); - wqueue->last_thread= new_list; -} - - -/* - Add thread and wait - - SYNOPSYS - wqueue_add_and_wait() - wqueue queue to add to - thread thread which is waiting - lock mutex need for the operation -*/ - -void wqueue_add_and_wait(WQUEUE *wqueue, - struct st_my_thread_var *thread, - pthread_mutex_t *lock) -{ - DBUG_ENTER("wqueue_add_and_wait"); - DBUG_PRINT("enter", - ("thread: 0x%lx cond: 0x%lx mutex: 0x%lx", - (ulong) thread, (ulong) &thread->suspend, (ulong) lock)); - wqueue_add_to_queue(wqueue, thread); - do - { - DBUG_PRINT("info", ("wait... cond: 0x%lx mutex: 0x%lx", - (ulong) &thread->suspend, (ulong) lock)); - pthread_cond_wait(&thread->suspend, lock); - DBUG_PRINT("info", ("wait done cond: 0x%lx mutex: 0x%lx next: 0x%lx", - (ulong) &thread->suspend, (ulong) lock, - (ulong) thread->next)); - } - while (thread->next); - DBUG_VOID_RETURN; -} diff --git a/externals/mysql/mysys_err.h b/externals/mysql/mysys_err.h deleted file mode 100644 index 7167395f71..0000000000 --- a/externals/mysql/mysys_err.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _mysys_err_h -#define _mysys_err_h -#ifdef __cplusplus -extern "C" { -#endif - -#define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */ -#define EE(X) (globerrs[(X) - EE_ERROR_FIRST]) - -extern const char * NEAR globerrs[]; /* my_error_messages is here */ - -/* Error message numbers in global map */ -/* - Do not add error numbers before EE_ERROR_FIRST. - If necessary to add lower numbers, change EE_ERROR_FIRST accordingly. - - We start with error 1 to not confuse peoples with 'error 0' -*/ - -#define EE_ERROR_FIRST 1 /*Copy first error nr.*/ -#define EE_CANTCREATEFILE 1 -#define EE_READ 2 -#define EE_WRITE 3 -#define EE_BADCLOSE 4 -#define EE_OUTOFMEMORY 5 -#define EE_DELETE 6 -#define EE_LINK 7 -#define EE_EOFERR 9 -#define EE_CANTLOCK 10 -#define EE_CANTUNLOCK 11 -#define EE_DIR 12 -#define EE_STAT 13 -#define EE_CANT_CHSIZE 14 -#define EE_CANT_OPEN_STREAM 15 -#define EE_GETWD 16 -#define EE_SETWD 17 -#define EE_LINK_WARNING 18 -#define EE_OPEN_WARNING 19 -#define EE_DISK_FULL 20 -#define EE_CANT_MKDIR 21 -#define EE_UNKNOWN_CHARSET 22 -#define EE_OUT_OF_FILERESOURCES 23 -#define EE_CANT_READLINK 24 -#define EE_CANT_SYMLINK 25 -#define EE_REALPATH 26 -#define EE_SYNC 27 -#define EE_UNKNOWN_COLLATION 28 -#define EE_FILENOTFOUND 29 -#define EE_FILE_NOT_CLOSED 30 -#define EE_CANT_CHMOD 31 -#define EE_ERROR_LAST 31 /* Copy last error nr */ -/* Add error numbers before EE_ERROR_LAST and change it accordingly. */ - - /* exit codes for all MySQL programs */ - -#define EXIT_UNSPECIFIED_ERROR 1 -#define EXIT_UNKNOWN_OPTION 2 -#define EXIT_AMBIGUOUS_OPTION 3 -#define EXIT_NO_ARGUMENT_ALLOWED 4 -#define EXIT_ARGUMENT_REQUIRED 5 -#define EXIT_VAR_PREFIX_NOT_UNIQUE 6 -#define EXIT_UNKNOWN_VARIABLE 7 -#define EXIT_OUT_OF_MEMORY 8 -#define EXIT_UNKNOWN_SUFFIX 9 -#define EXIT_NO_PTR_TO_VARIABLE 10 -#define EXIT_CANNOT_CONNECT_TO_SERVICE 11 -#define EXIT_OPTION_DISABLED 12 -#define EXIT_ARGUMENT_INVALID 13 - - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/mysql/queues.h b/externals/mysql/queues.h deleted file mode 100644 index d01b73ba99..0000000000 --- a/externals/mysql/queues.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Code for generell handling of priority Queues. - Implemention of queues from "Algoritms in C" by Robert Sedgewick. - Copyright Monty Program KB. - By monty. -*/ - -#ifndef _queues_h -#define _queues_h -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct st_queue { - uchar **root; - void *first_cmp_arg; - uint elements; - uint max_elements; - uint offset_to_key; /* compare is done on element+offset */ - int max_at_top; /* Normally 1, set to -1 if queue_top gives max */ - int (*compare)(void *, uchar *,uchar *); - uint auto_extent; -} QUEUE; - -#define queue_top(queue) ((queue)->root[1]) -#define queue_element(queue,index) ((queue)->root[index+1]) -#define queue_end(queue) ((queue)->root[(queue)->elements]) -#define queue_replaced(queue) _downheap(queue,1) -#define queue_set_cmp_arg(queue, set_arg) (queue)->first_cmp_arg= set_arg -#define queue_set_max_at_top(queue, set_arg) \ - (queue)->max_at_top= set_arg ? -1 : 1 -typedef int (*queue_compare)(void *,uchar *, uchar *); - -int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key, - pbool max_at_top, queue_compare compare, - void *first_cmp_arg); -int init_queue_ex(QUEUE *queue,uint max_elements,uint offset_to_key, - pbool max_at_top, queue_compare compare, - void *first_cmp_arg, uint auto_extent); -int reinit_queue(QUEUE *queue,uint max_elements,uint offset_to_key, - pbool max_at_top, queue_compare compare, - void *first_cmp_arg); -int resize_queue(QUEUE *queue, uint max_elements); -void delete_queue(QUEUE *queue); -void queue_insert(QUEUE *queue,uchar *element); -int queue_insert_safe(QUEUE *queue, uchar *element); -uchar *queue_remove(QUEUE *queue,uint idx); -#define queue_remove_all(queue) { (queue)->elements= 0; } -#define queue_is_full(queue) (queue->elements == queue->max_elements) -void _downheap(QUEUE *queue,uint idx); -void queue_fix(QUEUE *queue); -#define is_queue_inited(queue) ((queue)->root != 0) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/mysql/service_versions.h b/externals/mysql/service_versions.h deleted file mode 100644 index 114957cdd8..0000000000 --- a/externals/mysql/service_versions.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifdef _WIN32 -#define SERVICE_VERSION __declspec(dllexport) void * -#else -#define SERVICE_VERSION void * -#endif - -#define VERSION_my_snprintf 0x0100 -#define VERSION_thd_alloc 0x0100 - diff --git a/externals/mysql/sha1.h b/externals/mysql/sha1.h deleted file mode 100644 index e476456a9b..0000000000 --- a/externals/mysql/sha1.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2002, 2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - This is the header file for code which implements the Secure - Hashing Algorithm 1 as defined in FIPS PUB 180-1 published - April 17, 1995. - - Many of the variable names in this code, especially the - single character names, were used because those were the names - used in the publication. - - Please read the file sha1.c for more information. - - Modified 2002 by Peter Zaitsev to better follow MySQL standards -*/ - - -enum sha_result_codes -{ - SHA_SUCCESS = 0, - SHA_NULL, /* Null pointer parameter */ - SHA_INPUT_TOO_LONG, /* input data too long */ - SHA_STATE_ERROR /* called Input after Result */ -}; - -#define SHA1_HASH_SIZE 20 /* Hash size in bytes */ - -/* - This structure will hold context information for the SHA-1 - hashing operation -*/ - -typedef struct SHA1_CONTEXT -{ - ulonglong Length; /* Message length in bits */ - uint32 Intermediate_Hash[SHA1_HASH_SIZE/4]; /* Message Digest */ - int Computed; /* Is the digest computed? */ - int Corrupted; /* Is the message digest corrupted? */ - int16 Message_Block_Index; /* Index into message block array */ - uint8 Message_Block[64]; /* 512-bit message blocks */ -} SHA1_CONTEXT; - -/* - Function Prototypes -*/ - -C_MODE_START - -int mysql_sha1_reset(SHA1_CONTEXT*); -int mysql_sha1_input(SHA1_CONTEXT*, const uint8 *, unsigned int); -int mysql_sha1_result(SHA1_CONTEXT* , uint8 Message_Digest[SHA1_HASH_SIZE]); - -C_MODE_END diff --git a/externals/mysql/sha2.h b/externals/mysql/sha2.h deleted file mode 100644 index 49dbac5605..0000000000 --- a/externals/mysql/sha2.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (C) 2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef included_sha2_h -#define included_sha2_h - -#include - -#if defined(HAVE_YASSL) || defined(HAVE_OPENSSL) - -# ifdef HAVE_STDDEF_H -# include -# endif - -# ifndef HAVE_YASSL -# include - -# else - -#include "../extra/yassl/taocrypt/include/sha.hpp" - -# ifdef __cplusplus -extern "C" { -# endif - -#ifndef SHA512_DIGEST_LENGTH -#define SHA512_DIGEST_LENGTH TaoCrypt::SHA512::DIGEST_SIZE -#endif - -#ifndef SHA384_DIGEST_LENGTH -#define SHA384_DIGEST_LENGTH TaoCrypt::SHA384::DIGEST_SIZE -#endif - -#ifndef SHA256_DIGEST_LENGTH -#define SHA256_DIGEST_LENGTH TaoCrypt::SHA256::DIGEST_SIZE -#endif - -#ifndef SHA224_DIGEST_LENGTH -#define SHA224_DIGEST_LENGTH TaoCrypt::SHA224::DIGEST_SIZE -#endif - -#define GEN_YASSL_SHA2_BRIDGE(size) \ -unsigned char* SHA##size(const unsigned char *input_ptr, size_t input_length, \ - char unsigned *output_ptr); - -GEN_YASSL_SHA2_BRIDGE(512); -GEN_YASSL_SHA2_BRIDGE(384); -GEN_YASSL_SHA2_BRIDGE(256); -GEN_YASSL_SHA2_BRIDGE(224); - -#undef GEN_YASSL_SHA2_BRIDGE - -# ifdef __cplusplus -} -# endif - -# endif /* HAVE_YASSL */ - -#endif /* HAVE_OPENSSL || HAVE_YASSL */ -#endif /* included_sha2_h */ diff --git a/externals/mysql/sql_common.h b/externals/mysql/sql_common.h deleted file mode 100644 index 9e43d076ba..0000000000 --- a/externals/mysql/sql_common.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003-2004, 2006 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -extern const char *unknown_sqlstate; -extern const char *cant_connect_sqlstate; -extern const char *not_error_sqlstate; - -#ifdef __cplusplus -extern "C" { -#endif - -extern CHARSET_INFO *default_client_charset_info; -MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, - my_bool default_value, uint server_capabilities); -void free_rows(MYSQL_DATA *cur); -void free_old_query(MYSQL *mysql); -void end_server(MYSQL *mysql); -my_bool mysql_reconnect(MYSQL *mysql); -void mysql_read_default_options(struct st_mysql_options *options, - const char *filename,const char *group); -my_bool -cli_advanced_command(MYSQL *mysql, enum enum_server_command command, - const unsigned char *header, ulong header_length, - const unsigned char *arg, ulong arg_length, - my_bool skip_check, MYSQL_STMT *stmt); -unsigned long cli_safe_read(MYSQL *mysql); -void net_clear_error(NET *net); -void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net); -void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate, - const char *err); -void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate); -#ifdef __cplusplus -} -#endif - -#define protocol_41(A) ((A)->server_capabilities & CLIENT_PROTOCOL_41) - diff --git a/externals/mysql/sslopt-case.h b/externals/mysql/sslopt-case.h deleted file mode 100644 index ee6c83cd2a..0000000000 --- a/externals/mysql/sslopt-case.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - case OPT_SSL_KEY: - case OPT_SSL_CERT: - case OPT_SSL_CA: - case OPT_SSL_CAPATH: - case OPT_SSL_CIPHER: - /* - Enable use of SSL if we are using any ssl option - One can disable SSL later by using --skip-ssl or --ssl=0 - */ - opt_use_ssl= 1; - break; -#endif diff --git a/externals/mysql/sslopt-longopts.h b/externals/mysql/sslopt-longopts.h deleted file mode 100644 index 06422e5917..0000000000 --- a/externals/mysql/sslopt-longopts.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - - {"ssl", OPT_SSL_SSL, - "Enable SSL for connection (automatically enabled with other flags). Disable with --skip-ssl.", - (uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, NO_ARG, 0, 0, 0, - 0, 0, 0}, - {"ssl-ca", OPT_SSL_CA, - "CA file in PEM format (check OpenSSL docs, implies --ssl).", - (uchar **) &opt_ssl_ca, (uchar **) &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, - 0, 0, 0, 0, 0, 0}, - {"ssl-capath", OPT_SSL_CAPATH, - "CA directory (check OpenSSL docs, implies --ssl).", - (uchar **) &opt_ssl_capath, (uchar **) &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG, - 0, 0, 0, 0, 0, 0}, - {"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).", - (uchar **) &opt_ssl_cert, (uchar **) &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG, - 0, 0, 0, 0, 0, 0}, - {"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).", - (uchar **) &opt_ssl_cipher, (uchar **) &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG, - 0, 0, 0, 0, 0, 0}, - {"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).", - (uchar **) &opt_ssl_key, (uchar **) &opt_ssl_key, 0, GET_STR, REQUIRED_ARG, - 0, 0, 0, 0, 0, 0}, -#ifdef MYSQL_CLIENT - {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT, - "Verify server's \"Common Name\" in its cert against hostname used when connecting. This option is disabled by default.", - (uchar **) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_server_cert, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, -#endif -#endif /* HAVE_OPENSSL */ diff --git a/externals/mysql/sslopt-vars.h b/externals/mysql/sslopt-vars.h deleted file mode 100644 index 9d25c3364e..0000000000 --- a/externals/mysql/sslopt-vars.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) -#ifdef SSL_VARS_NOT_STATIC -#define SSL_STATIC -#else -#define SSL_STATIC static -#endif -SSL_STATIC my_bool opt_use_ssl = 0; -SSL_STATIC char *opt_ssl_ca = 0; -SSL_STATIC char *opt_ssl_capath = 0; -SSL_STATIC char *opt_ssl_cert = 0; -SSL_STATIC char *opt_ssl_cipher = 0; -SSL_STATIC char *opt_ssl_key = 0; -#ifdef MYSQL_CLIENT -SSL_STATIC my_bool opt_ssl_verify_server_cert= 0; -#endif -#endif diff --git a/externals/mysql/strings/bchange.c b/externals/mysql/strings/bchange.c deleted file mode 100644 index 0b2c62019b..0000000000 --- a/externals/mysql/strings/bchange.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : bchange.c - Author : Michael widenius - Updated: 1987-03-20 - Defines: bchange() - - bchange(dst, old_length, src, new_length, tot_length) - replaces old_length characters at dst to new_length characters from - src in a buffer with tot_length bytes. -*/ - -#include -#include "m_string.h" - -void bchange(register uchar *dst, size_t old_length, register const uchar *src, - size_t new_length, size_t tot_length) -{ - size_t rest=tot_length-old_length; - if (old_length < new_length) - bmove_upp(dst+rest+new_length,dst+tot_length,rest); - else - bmove(dst+new_length,dst+old_length,rest); - memcpy(dst,src,new_length); -} diff --git a/externals/mysql/strings/bcmp.c b/externals/mysql/strings/bcmp.c deleted file mode 100644 index 1b6ed22fc2..0000000000 --- a/externals/mysql/strings/bcmp.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - bcmp(s1, s2, len) returns 0 if the "len" bytes starting at "s1" are - identical to the "len" bytes starting at "s2", non-zero if they are - different. - Now only used with purify because purify gives wrong warnings when - comparing a shorter string with bcmp. -*/ - -#include -#include "m_string.h" - -#ifdef HAVE_purify -#undef bcmp -#undef HAVE_BCMP -#endif - -#if !defined(bcmp) && !defined(HAVE_BCMP) - -#if defined(MC68000) && defined(DS90) - -int bcmp(s1,s2, len) -const char *s1; -const char *s2; -uint len; /* 0 <= len <= 65535 */ -{ - asm(" movl 12(a7),d0 "); - asm(" subqw #1,d0 "); - asm(" blt .L5 "); - asm(" movl 4(a7),a1 "); - asm(" movl 8(a7),a0 "); - asm(".L4: cmpmb (a0)+,(a1)+ "); - asm(" dbne d0,.L4 "); - asm(".L5: addqw #1,d0 "); -} - -#else - -#ifndef HAVE_purify -size_t bcmp(register const uchar *s1,register const uchar *s2, - register size_t len) -#else -size_t my_bcmp(register const uchar *s1,register const uchar *s2, - register size_t len) -#endif -{ - while (len-- != 0 && *s1++ == *s2++) ; - return len+1; -} - -#endif -#endif /* BSD_FUNCS */ diff --git a/externals/mysql/strings/bfill.c b/externals/mysql/strings/bfill.c deleted file mode 100644 index 2750553f48..0000000000 --- a/externals/mysql/strings/bfill.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* File : bfill.c - Author : Richard A. O'Keefe. - Michael Widenius; ifdef MC68000 - Updated: 23 April 1984 - Defines: bfill() - - bfill(dst, len, fill) moves "len" fill characters to "dst". - Thus to set a buffer to 80 spaces, do bfill(buff, 80, ' '). - - Note: the "b" routines are there to exploit certain VAX order codes, - but the MOVC5 instruction will only move 65535 characters. The asm - code is presented for your interest and amusement. -*/ - -#include -#include "m_string.h" - -#if !defined(bfill) && !defined(HAVE_BFILL) - -#if VaxAsm - -void bfill(dst, len, fill) -char *dst; -uint len; -int fill; /* actually char */ -{ - asm("movc5 $0,*4(ap),12(ap),8(ap),*4(ap)"); -} - -#elif defined(MC68000) && defined(DS90) - -void bfill(dst, len,fill) /* Optimized with long-fill */ -char *dst; -uint len; -pchar fill; -{ -asm(" movl 8.(a7),d1 "); -asm(" jeq .L9 "); -asm(" movl 4.(a7),a0 "); -asm(" moveq #0,d0 "); -asm(" movb 15.(a7),d0 "); -asm(" movl d2,a1 "); -asm(" movw d0,d2 "); -asm(" aslw #8,d0 "); -asm(" orw d2,d0 "); -asm(" movl d0,d2 "); -asm(" swap d0 "); -asm(" orl d2,d0 "); -asm(" movl a0,d2 "); -asm(" btst #0,d2 "); -asm(" jeq .L1 "); -asm(" movb d0,(a0)+ "); -asm(" subql #1,d1 "); -asm(".L1: movl d1,d2 "); -asm(" lsrl #2,d2 "); -asm(" jcc .L2 "); -asm(" movw d0,(a0)+ "); -asm(" jra .L2 "); -asm(".L3: movl d0,(a0)+ "); -asm(".L2: dbra d2,.L3 "); -asm(" addqw #1,d2 "); -asm(" subql #1,d2 "); -asm(" jcc .L3 "); -asm(" andl #1,d1 "); -asm(" jeq .L8 "); -asm(" movb d0,(a0) "); -asm(".L8: movl a1,d2 "); -asm(".L9: rts "); -} -#else - -void bfill(dst, len, fill) -register byte *dst; -register uint len; -register pchar fill; -{ - while (len-- != 0) *dst++ = fill; -} - -#endif -#endif diff --git a/externals/mysql/strings/bmove.c b/externals/mysql/strings/bmove.c deleted file mode 100644 index ae9641a5d5..0000000000 --- a/externals/mysql/strings/bmove.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* File : bmove.c - Author : Richard A. O'Keefe. - Michael Widenius; ifdef MC68000 - Updated: 23 April 1984 - Defines: bmove() - - bmove(dst, src, len) moves exactly "len" bytes from the source "src" - to the destination "dst". It does not check for NUL characters as - strncpy() and strnmov() do. Thus if your C compiler doesn't support - structure assignment, you can simulate it with - bmove(&to, &from, sizeof from); - The standard 4.2bsd routine for this purpose is bcopy. But as bcopy - has its first two arguments the other way around you may find this a - bit easier to get right. - No value is returned. - - Note: the "b" routines are there to exploit certain VAX order codes, - but the MOVC3 instruction will only move 65535 characters. The asm - code is presented for your interest and amusement. -*/ - -#include -#include "m_string.h" - -#if !defined(HAVE_BMOVE) && !defined(bmove) - -#if VaxAsm - -void bmove(dst, src, len) - char *dst, *src; - uint len; - { - asm("movc3 12(ap),*8(ap),*4(ap)"); - } - -#else -#if defined(MC68000) && defined(DS90) - -void bmove(dst, src, len) -char *dst,*src; -uint len; /* 0 <= len <= 65535 */ -{ -asm(" movl 12(a7),d0 "); -asm(" subql #1,d0 "); -asm(" blt .L5 "); -asm(" movl 4(a7),a1 "); -asm(" movl 8(a7),a0 "); -asm(".L4: movb (a0)+,(a1)+ "); -asm(" dbf d0,.L4 "); -asm(".L5: "); -} -#else - -void bmove(dst, src, len) -register char *dst; -register const char *src; -register uint len; -{ - while (len-- != 0) *dst++ = *src++; -} -#endif -#endif -#endif diff --git a/externals/mysql/strings/bmove512.c b/externals/mysql/strings/bmove512.c deleted file mode 100644 index 0ae23d1f42..0000000000 --- a/externals/mysql/strings/bmove512.c +++ /dev/null @@ -1,125 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : bmove512.c - Author : Michael Widenius; - Defines: bmove512() - - bmove512(dst, src, len) moves exactly "len" bytes from the source "src" - to the destination "dst". "src" and "dst" must be alligned on long - boundory and len must be a mutliple of 512 byte. If len is not a - multiple of 512 byte len/512*512+1 bytes is copyed. - bmove512 is moustly used to copy IO_BLOCKS. bmove512 should be the - fastest way to move a mutiple of 512 byte. -*/ - -#include -#include "m_string.h" - -#ifndef bmove512 - -#ifdef HAVE_LONG_LONG -#define LONG ulonglong -#else -#define LONG ulong -#endif - -void bmove512(uchar *to, const uchar *from, register size_t length) -{ - reg1 LONG *f,*t,*end= (LONG*) ((char*) from+length); - - f= (LONG*) from; - t= (LONG*) to; - -#if defined(m88k) || defined(sparc) || defined(HAVE_LONG_LONG) - do { - t[0]=f[0]; t[1]=f[1]; t[2]=f[2]; t[3]=f[3]; - t[4]=f[4]; t[5]=f[5]; t[6]=f[6]; t[7]=f[7]; - t[8]=f[8]; t[9]=f[9]; t[10]=f[10]; t[11]=f[11]; - t[12]=f[12]; t[13]=f[13]; t[14]=f[14]; t[15]=f[15]; - t[16]=f[16]; t[17]=f[17]; t[18]=f[18]; t[19]=f[19]; - t[20]=f[20]; t[21]=f[21]; t[22]=f[22]; t[23]=f[23]; - t[24]=f[24]; t[25]=f[25]; t[26]=f[26]; t[27]=f[27]; - t[28]=f[28]; t[29]=f[29]; t[30]=f[30]; t[31]=f[31]; - t[32]=f[32]; t[33]=f[33]; t[34]=f[34]; t[35]=f[35]; - t[36]=f[36]; t[37]=f[37]; t[38]=f[38]; t[39]=f[39]; - t[40]=f[40]; t[41]=f[41]; t[42]=f[42]; t[43]=f[43]; - t[44]=f[44]; t[45]=f[45]; t[46]=f[46]; t[47]=f[47]; - t[48]=f[48]; t[49]=f[49]; t[50]=f[50]; t[51]=f[51]; - t[52]=f[52]; t[53]=f[53]; t[54]=f[54]; t[55]=f[55]; - t[56]=f[56]; t[57]=f[57]; t[58]=f[58]; t[59]=f[59]; - t[60]=f[60]; t[61]=f[61]; t[62]=f[62]; t[63]=f[63]; -#ifdef HAVE_LONG_LONG - t+=64; f+=64; -#else - t[64]=f[64]; t[65]=f[65]; t[66]=f[66]; t[67]=f[67]; - t[68]=f[68]; t[69]=f[69]; t[70]=f[70]; t[71]=f[71]; - t[72]=f[72]; t[73]=f[73]; t[74]=f[74]; t[75]=f[75]; - t[76]=f[76]; t[77]=f[77]; t[78]=f[78]; t[79]=f[79]; - t[80]=f[80]; t[81]=f[81]; t[82]=f[82]; t[83]=f[83]; - t[84]=f[84]; t[85]=f[85]; t[86]=f[86]; t[87]=f[87]; - t[88]=f[88]; t[89]=f[89]; t[90]=f[90]; t[91]=f[91]; - t[92]=f[92]; t[93]=f[93]; t[94]=f[94]; t[95]=f[95]; - t[96]=f[96]; t[97]=f[97]; t[98]=f[98]; t[99]=f[99]; - t[100]=f[100]; t[101]=f[101]; t[102]=f[102]; t[103]=f[103]; - t[104]=f[104]; t[105]=f[105]; t[106]=f[106]; t[107]=f[107]; - t[108]=f[108]; t[109]=f[109]; t[110]=f[110]; t[111]=f[111]; - t[112]=f[112]; t[113]=f[113]; t[114]=f[114]; t[115]=f[115]; - t[116]=f[116]; t[117]=f[117]; t[118]=f[118]; t[119]=f[119]; - t[120]=f[120]; t[121]=f[121]; t[122]=f[122]; t[123]=f[123]; - t[124]=f[124]; t[125]=f[125]; t[126]=f[126]; t[127]=f[127]; - t+=128; f+=128; -#endif - } while (f < end); -#else - do { - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - *t++ = *f++; *t++ = *f++; *t++ = *f++; *t++ = *f++; - } while (f < end); -#endif - return; -} /* bmove512 */ - -#endif /* bmove512 */ diff --git a/externals/mysql/strings/bmove_upp.c b/externals/mysql/strings/bmove_upp.c deleted file mode 100644 index fb47bda2d1..0000000000 --- a/externals/mysql/strings/bmove_upp.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : bmove.c - Author : Michael widenius - Updated: 1987-03-20 - Defines: bmove_upp() - - bmove_upp(dst, src, len) moves exactly "len" bytes from the source - "src-len" to the destination "dst-len" counting downwards. -*/ - -#include -#include "m_string.h" - -#if defined(MC68000) && defined(DS90) - -/* 0 <= len <= 65535 */ -void bmove_upp(byte *dst, const byte *src,uint len) -{ -asm(" movl 12(a7),d0 "); -asm(" subql #1,d0 "); -asm(" blt .L5 "); -asm(" movl 4(a7),a1 "); -asm(" movl 8(a7),a0 "); -asm(".L4: movb -(a0),-(a1) "); -asm(" dbf d0,.L4 "); -asm(".L5: "); -} -#else - -void bmove_upp(register uchar *dst, register const uchar *src, - register size_t len) -{ - while (len-- != 0) *--dst = *--src; -} - -#endif diff --git a/externals/mysql/strings/conf_to_src.c b/externals/mysql/strings/conf_to_src.c deleted file mode 100644 index fd5d3f432f..0000000000 --- a/externals/mysql/strings/conf_to_src.c +++ /dev/null @@ -1,358 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include - -#define ROW_LEN 16 -#define ROW16_LEN 8 -#define MAX_BUF 64*1024 - -static CHARSET_INFO all_charsets[512]; - - -void -print_array(FILE *f, const char *set, const char *name, uchar *a, int n) -{ - int i; - - fprintf(f,"uchar %s_%s[] = {\n", name, set); - - for (i=0 ;iname && !strcmp(cs->name, charset_name)) - return cs->number; - } - return 0; -} - -char *mdup(const char *src, uint len) -{ - char *dst=(char*)malloc(len); - if (!dst) - exit(1); - memcpy(dst,src,len); - return dst; -} - -static void simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from) -{ - to->number= from->number ? from->number : to->number; - to->state|= from->state; - - if (from->csname) - to->csname= strdup(from->csname); - - if (from->name) - to->name= strdup(from->name); - - if (from->ctype) - to->ctype= (uchar*) mdup((char*) from->ctype, MY_CS_CTYPE_TABLE_SIZE); - if (from->to_lower) - to->to_lower= (uchar*) mdup((char*) from->to_lower, MY_CS_TO_LOWER_TABLE_SIZE); - if (from->to_upper) - to->to_upper= (uchar*) mdup((char*) from->to_upper, MY_CS_TO_UPPER_TABLE_SIZE); - if (from->sort_order) - { - to->sort_order= (uchar*) mdup((char*) from->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE); - /* - set_max_sort_char(to); - */ - } - if (from->tab_to_uni) - { - uint sz= MY_CS_TO_UNI_TABLE_SIZE*sizeof(uint16); - to->tab_to_uni= (uint16*) mdup((char*)from->tab_to_uni, sz); - /* - create_fromuni(to); - */ - } -} - -static my_bool simple_cs_is_full(CHARSET_INFO *cs) -{ - return ((cs->csname && cs->tab_to_uni && cs->ctype && cs->to_upper && - cs->to_lower) && - (cs->number && cs->name && - (cs->sort_order || (cs->state & MY_CS_BINSORT)))); -} - -static int add_collation(CHARSET_INFO *cs) -{ - if (cs->name && (cs->number || (cs->number=get_charset_number(cs->name)))) - { - if (!(all_charsets[cs->number].state & MY_CS_COMPILED)) - { - simple_cs_copy_data(&all_charsets[cs->number],cs); - - } - - cs->number= 0; - cs->name= NULL; - cs->state= 0; - cs->sort_order= NULL; - cs->state= 0; - } - return MY_XML_OK; -} - - -static int my_read_charset_file(const char *filename) -{ - char buf[MAX_BUF]; - int fd; - uint len; - - if ((fd=open(filename,O_RDONLY)) < 0) - { - fprintf(stderr,"Can't open '%s'\n",filename); - return 1; - } - - len=read(fd,buf,MAX_BUF); - DBUG_ASSERT(len < MAX_BUF); - close(fd); - - if (my_parse_charset_xml(buf,len,add_collation)) - { -#if 0 - printf("ERROR at line %d pos %d '%s'\n", - my_xml_error_lineno(&p)+1, - my_xml_error_pos(&p), - my_xml_error_string(&p)); -#endif - } - - return FALSE; -} - -static int -is_case_sensitive(CHARSET_INFO *cs) -{ - return (cs->sort_order && - cs->sort_order['A'] < cs->sort_order['a'] && - cs->sort_order['a'] < cs->sort_order['B']) ? 1 : 0; -} - - -void dispcset(FILE *f,CHARSET_INFO *cs) -{ - fprintf(f,"{\n"); - fprintf(f," %d,%d,%d,\n",cs->number,0,0); - fprintf(f," MY_CS_COMPILED%s%s%s%s%s,\n", - cs->state & MY_CS_BINSORT ? "|MY_CS_BINSORT" : "", - cs->state & MY_CS_PRIMARY ? "|MY_CS_PRIMARY" : "", - is_case_sensitive(cs) ? "|MY_CS_CSSORT" : "", - my_charset_is_8bit_pure_ascii(cs) ? "|MY_CS_PUREASCII" : "", - !my_charset_is_ascii_compatible(cs) ? "|MY_CS_NONASCII": ""); - - if (cs->name) - { - fprintf(f," \"%s\", /* cset name */\n",cs->csname); - fprintf(f," \"%s\", /* coll name */\n",cs->name); - fprintf(f," \"\", /* comment */\n"); - fprintf(f," NULL, /* tailoring */\n"); - fprintf(f," ctype_%s, /* ctype */\n",cs->name); - fprintf(f," to_lower_%s, /* lower */\n",cs->name); - fprintf(f," to_upper_%s, /* upper */\n",cs->name); - if (cs->sort_order) - fprintf(f," sort_order_%s, /* sort_order */\n",cs->name); - else - fprintf(f," NULL, /* sort_order */\n"); - fprintf(f," NULL, /* contractions */\n"); - fprintf(f," NULL, /* sort_order_big*/\n"); - fprintf(f," to_uni_%s, /* to_uni */\n",cs->name); - } - else - { - fprintf(f," NULL, /* cset name */\n"); - fprintf(f," NULL, /* coll name */\n"); - fprintf(f," NULL, /* comment */\n"); - fprintf(f," NULL, /* tailoging */\n"); - fprintf(f," NULL, /* ctype */\n"); - fprintf(f," NULL, /* lower */\n"); - fprintf(f," NULL, /* upper */\n"); - fprintf(f," NULL, /* sort order */\n"); - fprintf(f," NULL, /* contractions */\n"); - fprintf(f," NULL, /* sort_order_big*/\n"); - fprintf(f," NULL, /* to_uni */\n"); - } - - fprintf(f," NULL, /* from_uni */\n"); - fprintf(f," my_unicase_default, /* caseinfo */\n"); - fprintf(f," NULL, /* state map */\n"); - fprintf(f," NULL, /* ident map */\n"); - fprintf(f," 1, /* strxfrm_multiply*/\n"); - fprintf(f," 1, /* caseup_multiply*/\n"); - fprintf(f," 1, /* casedn_multiply*/\n"); - fprintf(f," 1, /* mbminlen */\n"); - fprintf(f," 1, /* mbmaxlen */\n"); - fprintf(f," 0, /* min_sort_char */\n"); - fprintf(f," 255, /* max_sort_char */\n"); - fprintf(f," ' ', /* pad_char */\n"); - fprintf(f," 0, /* escape_with_backslash_is_dangerous */\n"); - fprintf(f," 1, /* levels_for_compare */\n"); - fprintf(f," 1, /* levels_for_order */\n"); - - fprintf(f," &my_charset_8bit_handler,\n"); - if (cs->state & MY_CS_BINSORT) - fprintf(f," &my_collation_8bit_bin_handler,\n"); - else - fprintf(f," &my_collation_8bit_simple_ci_handler,\n"); - fprintf(f,"}\n"); -} - - -static void -fprint_copyright(FILE *file) -{ - fprintf(file, -"/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n" -"\n" -" This program is free software; you can redistribute it and/or modify\n" -" it under the terms of the GNU General Public License as published by\n" -" the Free Software Foundation; version 2 of the License.\n" -"\n" -" This program is distributed in the hope that it will be useful,\n" -" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" -" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" -" GNU General Public License for more details.\n" -"\n" -" You should have received a copy of the GNU General Public License\n" -" along with this program; if not, write to the Free Software\n" -" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */\n" -"\n"); -} - - -int -main(int argc, char **argv __attribute__((unused))) -{ - CHARSET_INFO ncs; - CHARSET_INFO *cs; - char filename[256]; - FILE *f= stdout; - - if (argc < 2) - { - fprintf(stderr, "usage: %s source-dir\n", argv[0]); - exit(EXIT_FAILURE); - } - - bzero((void*)&ncs,sizeof(ncs)); - bzero((void*)&all_charsets,sizeof(all_charsets)); - - sprintf(filename,"%s/%s",argv[1],"Index.xml"); - my_read_charset_file(filename); - - for (cs= all_charsets; - cs < all_charsets + array_elements(all_charsets); - cs++) - { - if (cs->number && !(cs->state & MY_CS_COMPILED)) - { - if ( (!simple_cs_is_full(cs)) && (cs->csname)) - { - sprintf(filename,"%s/%s.xml",argv[1],cs->csname); - my_read_charset_file(filename); - } - } - } - - fprintf(f, "/*\n"); - fprintf(f, " This file was generated by the conf_to_src utility. " - "Do not edit it directly,\n"); - fprintf(f, " edit the XML definitions in sql/share/charsets/ instead.\n\n"); - fprintf(f, " To re-generate, run the following in the strings/ " - "directory:\n"); - fprintf(f, " ./conf_to_src ../sql/share/charsets/ > FILE\n"); - fprintf(f, "*/\n\n"); - fprint_copyright(f); - fprintf(f,"#include \n"); - fprintf(f,"#include \n\n"); - - - for (cs= all_charsets; - cs < all_charsets + array_elements(all_charsets); - cs++) - { - if (simple_cs_is_full(cs)) - { - fprintf(f,"#ifdef HAVE_CHARSET_%s\n",cs->csname); - print_array(f, cs->name, "ctype", cs->ctype, MY_CS_CTYPE_TABLE_SIZE); - print_array(f, cs->name, "to_lower", cs->to_lower, MY_CS_TO_LOWER_TABLE_SIZE); - print_array(f, cs->name, "to_upper", cs->to_upper, MY_CS_TO_UPPER_TABLE_SIZE); - if (cs->sort_order) - print_array(f, cs->name, "sort_order", cs->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE); - print_array16(f, cs->name, "to_uni", cs->tab_to_uni, MY_CS_TO_UNI_TABLE_SIZE); - fprintf(f,"#endif\n"); - fprintf(f,"\n"); - } - } - - fprintf(f,"CHARSET_INFO compiled_charsets[] = {\n"); - for (cs= all_charsets; - cs < all_charsets + array_elements(all_charsets); - cs++) - { - if (simple_cs_is_full(cs)) - { - fprintf(f,"#ifdef HAVE_CHARSET_%s\n",cs->csname); - dispcset(f,cs); - fprintf(f,",\n"); - fprintf(f,"#endif\n"); - } - } - - dispcset(f,&ncs); - fprintf(f,"};\n"); - - return 0; -} diff --git a/externals/mysql/strings/ctype-big5.c b/externals/mysql/strings/ctype-big5.c deleted file mode 100644 index caf4af577b..0000000000 --- a/externals/mysql/strings/ctype-big5.c +++ /dev/null @@ -1,6407 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - * This file is basicly usa7 character sets with some extra functions - * for big5 handling -*/ - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. strxfrm_multiply_big5=1 - * .configure. mbmaxlen_big5=2 - */ - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_big5 - -/* - Support for Chinese(BIG5) characters, by jou@nematic.ieo.nctu.edu.tw - modified by Wei He (hewei@mail.ied.ac.cn) - modified by Alex Barkov -*/ - -#define isbig5head(c) (0xa1<=(uchar)(c) && (uchar)(c)<=0xf9) -#define isbig5tail(c) ((0x40<=(uchar)(c) && (uchar)(c)<=0x7e) || \ - (0xa1<=(uchar)(c) && (uchar)(c)<=0xfe)) - -#define isbig5code(c,d) (isbig5head(c) && isbig5tail(d)) -#define big5code(c,d) (((uchar)(c) <<8) | (uchar)(d)) -#define big5head(e) ((uchar)(e>>8)) -#define big5tail(e) ((uchar)(e&0xff)) - -static uchar NEAR ctype_big5[257] = -{ - 0, /* For standard library */ - 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, - 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16, - 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16, - 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2, - 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0, -}; - -static uchar NEAR to_lower_big5[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '[', '\\', ']', '^', '_', - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR to_upper_big5[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR sort_order_big5[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '\\', ']', '[', '^', '_', - 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', 0x7E, '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uint16 big5strokexfrm(uint16 i) -{ - if ((i == 0xA440) || (i == 0xA441)) return 0xA440; - else if (((i >= 0xA442) && (i <= 0xA453)) || ((i >= 0xC940) && (i <= 0xC944))) return 0xA442; - else if (((i >= 0xA454) && (i <= 0xA47E)) || ((i >= 0xC945) && (i <= 0xC94C))) return 0xA454; - else if (((i >= 0xA4A1) && (i <= 0xA4FD)) || ((i >= 0xC94D) && (i <= 0xC962))) return 0xA4A1; - else if (((i >= 0xA4FE) && (i <= 0xA5DF)) || ((i >= 0xC963) && (i <= 0xC9AA))) return 0xA4FE; - else if (((i >= 0xA5E0) && (i <= 0xA6E9)) || ((i >= 0xC9AB) && (i <= 0xCA59))) return 0xA5E0; - else if (((i >= 0xA6EA) && (i <= 0xA8C2)) || ((i >= 0xCA5A) && (i <= 0xCBB0))) return 0xA6EA; - else if ((i == 0xA260) || ((i >= 0xA8C3) && (i <= 0xAB44)) || ((i >= 0xCBB1) && (i <= 0xCDDC))) return 0xA8C3; - else if ((i == 0xA259) || (i == 0xF9DA) || ((i >= 0xAB45) && (i <= 0xADBB)) || ((i >= 0xCDDD) && (i <= 0xD0C7))) return 0xAB45; - else if ((i == 0xA25A) || ((i >= 0xADBC) && (i <= 0xB0AD)) || ((i >= 0xD0C8) && (i <= 0xD44A))) return 0xADBC; - else if ((i == 0xA25B) || (i == 0xA25C) || ((i >= 0xB0AE) && (i <= 0xB3C2)) || ((i >= 0xD44B) && (i <= 0xD850))) return 0xB0AE; - else if ((i == 0xF9DB) || ((i >= 0xB3C3) && (i <= 0xB6C2)) || ((i >= 0xD851) && (i <= 0xDCB0))) return 0xB3C3; - else if ((i == 0xA25D) || (i == 0xA25F) || (i == 0xC6A1) || (i == 0xF9D6) || (i == 0xF9D8) || ((i >= 0xB6C3) && (i <= 0xB9AB)) || ((i >= 0xDCB1) && (i <= 0xE0EF))) return 0xB6C3; - else if ((i == 0xF9DC) || ((i >= 0xB9AC) && (i <= 0xBBF4)) || ((i >= 0xE0F0) && (i <= 0xE4E5))) return 0xB9AC; - else if ((i == 0xA261) || ((i >= 0xBBF5) && (i <= 0xBEA6)) || ((i >= 0xE4E6) && (i <= 0xE8F3))) return 0xBBF5; - else if ((i == 0xA25E) || (i == 0xF9D7) || (i == 0xF9D9) || ((i >= 0xBEA7) && (i <= 0xC074)) || ((i >= 0xE8F4) && (i <= 0xECB8))) return 0xBEA7; - else if (((i >= 0xC075) && (i <= 0xC24E)) || ((i >= 0xECB9) && (i <= 0xEFB6))) return 0xC075; - else if (((i >= 0xC24F) && (i <= 0xC35E)) || ((i >= 0xEFB7) && (i <= 0xF1EA))) return 0xC24F; - else if (((i >= 0xC35F) && (i <= 0xC454)) || ((i >= 0xF1EB) && (i <= 0xF3FC))) return 0xC35F; - else if (((i >= 0xC455) && (i <= 0xC4D6)) || ((i >= 0xF3FD) && (i <= 0xF5BF))) return 0xC455; - else if (((i >= 0xC4D7) && (i <= 0xC56A)) || ((i >= 0xF5C0) && (i <= 0xF6D5))) return 0xC4D7; - else if (((i >= 0xC56B) && (i <= 0xC5C7)) || ((i >= 0xF6D6) && (i <= 0xF7CF))) return 0xC56B; - else if (((i >= 0xC5C8) && (i <= 0xC5F0)) || ((i >= 0xF7D0) && (i <= 0xF8A4))) return 0xC5C8; - else if (((i >= 0xC5F1) && (i <= 0xC654)) || ((i >= 0xF8A5) && (i <= 0xF8ED))) return 0xC5F1; - else if (((i >= 0xC655) && (i <= 0xC664)) || ((i >= 0xF8EE) && (i <= 0xF96A))) return 0xC655; - else if (((i >= 0xC665) && (i <= 0xC66B)) || ((i >= 0xF96B) && (i <= 0xF9A1))) return 0xC665; - else if (((i >= 0xC66C) && (i <= 0xC675)) || ((i >= 0xF9A2) && (i <= 0xF9B9))) return 0xC66C; - else if (((i >= 0xC676) && (i <= 0xC678)) || ((i >= 0xF9BA) && (i <= 0xF9C5))) return 0xC676; - else if (((i >= 0xC679) && (i <= 0xC67C)) || ((i >= 0xF9C7) && (i <= 0xF9CB))) return 0xC679; - else if ((i == 0xC67D) || ((i >= 0xF9CC) && (i <= 0xF9CF))) return 0xC67D; - else if (i == 0xF9D0) return 0xF9D0; - else if ((i == 0xC67E) || (i == 0xF9D1)) return 0xC67E; - else if ((i == 0xF9C6) || (i == 0xF9D2)) return 0xF9C6; - else if (i == 0xF9D3) return 0xF9D3; - else if (i == 0xF9D4) return 0xF9D4; - else if (i == 0xF9D5) return 0xF9D5; - return 0xA140; -} - - - -static int my_strnncoll_big5_internal(const uchar **a_res, - const uchar **b_res, size_t length) -{ - const uchar *a= *a_res, *b= *b_res; - - while (length--) - { - if ((length > 0) && isbig5code(*a,*(a+1)) && isbig5code(*b, *(b+1))) - { - if (*a != *b || *(a+1) != *(b+1)) - return ((int) big5code(*a,*(a+1)) - - (int) big5code(*b,*(b+1))); - a+= 2; - b+= 2; - length--; - } - else if (sort_order_big5[*a++] != - sort_order_big5[*b++]) - return ((int) sort_order_big5[a[-1]] - - (int) sort_order_big5[b[-1]]); - } - *a_res= a; - *b_res= b; - return 0; -} - - -/* Compare strings */ - -static int my_strnncoll_big5(CHARSET_INFO *cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool b_is_prefix) -{ - size_t length= min(a_length, b_length); - int res= my_strnncoll_big5_internal(&a, &b, length); - return res ? res : (int)((b_is_prefix ? length : a_length) - b_length); -} - - -/* compare strings, ignore end space */ - -static int my_strnncollsp_big5(CHARSET_INFO * cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool diff_if_only_endspace_difference) -{ - size_t length= min(a_length, b_length); - int res= my_strnncoll_big5_internal(&a, &b, length); - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - if (!res && a_length != b_length) - { - const uchar *end; - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - /* - Check the next not space character of the longer key. If it's < ' ', - then it's smaller than the other key. - */ - if (a_length < b_length) - { - /* put longer key in a */ - a_length= b_length; - a= b; - swap= -1; /* swap sign of result */ - res= -res; - } - for (end= a + a_length-length; a < end ; a++) - { - if (*a != ' ') - return (*a < ' ') ? -swap : swap; - } - } - return res; -} - - -static size_t -my_strnxfrm_big5(CHARSET_INFO *cs, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - uchar *d0= dst; - uchar *de= dst + dstlen; - const uchar *se= src + srclen; - const uchar *sort_order= cs->sort_order; - - for (; dst < de && src < se && nweights; nweights--) - { - if (cs->cset->ismbchar(cs, (const char*) src, (const char*) se)) - { - /* - Note, it is safe not to check (src < se) - in the code below, because ismbchar() would - not return TRUE if src was too short - */ - uint16 e= big5strokexfrm((uint16) big5code(*src, *(src + 1))); - *dst++= big5head(e); - if (dst < de) - *dst++= big5tail(e); - src+= 2; - } - else - *dst++= sort_order ? sort_order[*src++] : *src++; - } - return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0); -} - - -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -#define max_sort_char ((char) 255) - -static my_bool my_like_range_big5(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str, char *max_str, - size_t *min_length, size_t *max_length) -{ - const char *end= ptr + ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - size_t charlen= res_length / cs->mbmaxlen; - - for (; ptr != end && min_str != min_end && charlen > 0; ptr++, charlen--) - { - if (ptr+1 != end && isbig5code(ptr[0],ptr[1])) - { - *min_str++= *max_str++ = *ptr++; - *min_str++= *max_str++ = *ptr; - continue; - } - if (*ptr == escape && ptr+1 != end) - { - ptr++; /* Skip escape */ - if (isbig5code(ptr[0], ptr[1])) - *min_str++= *max_str++ = *ptr++; - if (min_str < min_end) - *min_str++= *max_str++= *ptr; - continue; - } - if (*ptr == w_one) /* '_' in SQL */ - { - *min_str++='\0'; /* This should be min char */ - *max_str++=max_sort_char; - continue; - } - if (*ptr == w_many) /* '%' in SQL */ - { - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - do { - *min_str++ = 0; - *max_str++ = max_sort_char; - } while (min_str != min_end); - return 0; - } - *min_str++= *max_str++ = *ptr; - } - - *min_length= *max_length= (size_t) (min_str-min_org); - while (min_str != min_end) - *min_str++= *max_str++= ' '; - return 0; -} - - -static uint ismbchar_big5(CHARSET_INFO *cs __attribute__((unused)), - const char* p, const char *e) -{ - return (isbig5head(*(p)) && (e)-(p)>1 && isbig5tail(*((p)+1))? 2: 0); -} - - -static uint mbcharlen_big5(CHARSET_INFO *cs __attribute__((unused)), uint c) -{ - return (isbig5head(c)? 2 : 1); -} - - -/* page 0 0xA140-0xC7FC */ -static uint16 tab_big5_uni0[]={ -0x3000,0xFF0C,0x3001,0x3002,0xFF0E,0x2022,0xFF1B,0xFF1A, -0xFF1F,0xFF01,0xFE30,0x2026,0x2025,0xFE50,0xFF64,0xFE52, -0x00B7,0xFE54,0xFE55,0xFE56,0xFE57,0xFF5C,0x2013,0xFE31, -0x2014,0xFE33,0xFFFD,0xFE34,0xFE4F,0xFF08,0xFF09,0xFE35, -0xFE36,0xFF5B,0xFF5D,0xFE37,0xFE38,0x3014,0x3015,0xFE39, -0xFE3A,0x3010,0x3011,0xFE3B,0xFE3C,0x300A,0x300B,0xFE3D, -0xFE3E,0x3008,0x3009,0xFE3F,0xFE40,0x300C,0x300D,0xFE41, -0xFE42,0x300E,0x300F,0xFE43,0xFE44,0xFE59,0xFE5A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xFE5B,0xFE5C,0xFE5D,0xFE5E,0x2018,0x2019,0x201C, -0x201D,0x301D,0x301E,0x2035,0x2032,0xFF03,0xFF06,0xFF0A, -0x203B,0x00A7,0x3003,0x25CB,0x25CF,0x25B3,0x25B2,0x25CE, -0x2606,0x2605,0x25C7,0x25C6,0x25A1,0x25A0,0x25BD,0x25BC, -0x32A3,0x2105,0x203E,0xFFFD,0xFF3F,0xFFFD,0xFE49,0xFE4A, -0xFE4D,0xFE4E,0xFE4B,0xFE4C,0xFE5F,0xFE60,0xFE61,0xFF0B, -0xFF0D,0x00D7,0x00F7,0x00B1,0x221A,0xFF1C,0xFF1E,0xFF1D, -0x2266,0x2267,0x2260,0x221E,0x2252,0x2261,0xFE62,0xFE63, -0xFE64,0xFE65,0xFE66,0x223C,0x2229,0x222A,0x22A5,0x2220, -0x221F,0x22BF,0x33D2,0x33D1,0x222B,0x222E,0x2235,0x2234, -0x2640,0x2642,0x2641,0x2609,0x2191,0x2193,0x2190,0x2192, -0x2196,0x2197,0x2199,0x2198,0x2225,0x2223,0xFFFD, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xFFFD,0xFF0F,0xFF3C,0xFF04,0x00A5,0x3012,0x00A2,0x00A3, -0xFF05,0xFF20,0x2103,0x2109,0xFE69,0xFE6A,0xFE6B,0x33D5, -0x339C,0x339D,0x339E,0x33CE,0x33A1,0x338E,0x338F,0x33C4, -0x00B0,0x5159,0x515B,0x515E,0x515D,0x5161,0x5163,0x55E7, -0x74E9,0x7CCE,0x2581,0x2582,0x2583,0x2584,0x2585,0x2586, -0x2587,0x2588,0x258F,0x258E,0x258D,0x258C,0x258B,0x258A, -0x2589,0x253C,0x2534,0x252C,0x2524,0x251C,0x2594,0x2500, -0x2502,0x2595,0x250C,0x2510,0x2514,0x2518,0x256D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x256E,0x2570,0x256F,0x2550,0x255E,0x256A,0x2561, -0x25E2,0x25E3,0x25E5,0x25E4,0x2571,0x2572,0x2573,0xFF10, -0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17,0xFF18, -0xFF19,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, -0x2167,0x2168,0x2169,0x3021,0x3022,0x3023,0x3024,0x3025, -0x3026,0x3027,0x3028,0x3029,0xFFFD,0x5344,0xFFFD,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,0xFF41,0xFF42,0xFF43,0xFF44,0xFF45,0xFF46,0xFF47, -0xFF48,0xFF49,0xFF4A,0xFF4B,0xFF4C,0xFF4D,0xFF4E,0xFF4F, -0xFF50,0xFF51,0xFF52,0xFF53,0xFF54,0xFF55,0xFF56, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xFF57,0xFF58,0xFF59,0xFF5A,0x0391,0x0392,0x0393,0x0394, -0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C, -0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, -0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4, -0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC, -0x03BD,0x03BE,0x03BF,0x03C0,0x03C1,0x03C3,0x03C4,0x03C5, -0x03C6,0x03C7,0x03C8,0x03C9,0x3105,0x3106,0x3107,0x3108, -0x3109,0x310A,0x310B,0x310C,0x310D,0x310E,0x310F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3110,0x3111,0x3112,0x3113,0x3114,0x3115,0x3116, -0x3117,0x3118,0x3119,0x311A,0x311B,0x311C,0x311D,0x311E, -0x311F,0x3120,0x3121,0x3122,0x3123,0x3124,0x3125,0x3126, -0x3127,0x3128,0x3129,0x02D9,0x02C9,0x02CA,0x02C7,0x02CB, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4E00,0x4E59,0x4E01,0x4E03,0x4E43,0x4E5D,0x4E86,0x4E8C, -0x4EBA,0x513F,0x5165,0x516B,0x51E0,0x5200,0x5201,0x529B, -0x5315,0x5341,0x535C,0x53C8,0x4E09,0x4E0B,0x4E08,0x4E0A, -0x4E2B,0x4E38,0x51E1,0x4E45,0x4E48,0x4E5F,0x4E5E,0x4E8E, -0x4EA1,0x5140,0x5203,0x52FA,0x5343,0x53C9,0x53E3,0x571F, -0x58EB,0x5915,0x5927,0x5973,0x5B50,0x5B51,0x5B53,0x5BF8, -0x5C0F,0x5C22,0x5C38,0x5C71,0x5DDD,0x5DE5,0x5DF1,0x5DF2, -0x5DF3,0x5DFE,0x5E72,0x5EFE,0x5F0B,0x5F13,0x624D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4E11,0x4E10,0x4E0D,0x4E2D,0x4E30,0x4E39,0x4E4B, -0x5C39,0x4E88,0x4E91,0x4E95,0x4E92,0x4E94,0x4EA2,0x4EC1, -0x4EC0,0x4EC3,0x4EC6,0x4EC7,0x4ECD,0x4ECA,0x4ECB,0x4EC4, -0x5143,0x5141,0x5167,0x516D,0x516E,0x516C,0x5197,0x51F6, -0x5206,0x5207,0x5208,0x52FB,0x52FE,0x52FF,0x5316,0x5339, -0x5348,0x5347,0x5345,0x535E,0x5384,0x53CB,0x53CA,0x53CD, -0x58EC,0x5929,0x592B,0x592A,0x592D,0x5B54,0x5C11,0x5C24, -0x5C3A,0x5C6F,0x5DF4,0x5E7B,0x5EFF,0x5F14,0x5F15,0x5FC3, -0x6208,0x6236,0x624B,0x624E,0x652F,0x6587,0x6597,0x65A4, -0x65B9,0x65E5,0x66F0,0x6708,0x6728,0x6B20,0x6B62,0x6B79, -0x6BCB,0x6BD4,0x6BDB,0x6C0F,0x6C34,0x706B,0x722A,0x7236, -0x723B,0x7247,0x7259,0x725B,0x72AC,0x738B,0x4E19, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4E16,0x4E15,0x4E14,0x4E18,0x4E3B,0x4E4D,0x4E4F,0x4E4E, -0x4EE5,0x4ED8,0x4ED4,0x4ED5,0x4ED6,0x4ED7,0x4EE3,0x4EE4, -0x4ED9,0x4EDE,0x5145,0x5144,0x5189,0x518A,0x51AC,0x51F9, -0x51FA,0x51F8,0x520A,0x52A0,0x529F,0x5305,0x5306,0x5317, -0x531D,0x4EDF,0x534A,0x5349,0x5361,0x5360,0x536F,0x536E, -0x53BB,0x53EF,0x53E4,0x53F3,0x53EC,0x53EE,0x53E9,0x53E8, -0x53FC,0x53F8,0x53F5,0x53EB,0x53E6,0x53EA,0x53F2,0x53F1, -0x53F0,0x53E5,0x53ED,0x53FB,0x56DB,0x56DA,0x5916, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x592E,0x5931,0x5974,0x5976,0x5B55,0x5B83,0x5C3C, -0x5DE8,0x5DE7,0x5DE6,0x5E02,0x5E03,0x5E73,0x5E7C,0x5F01, -0x5F18,0x5F17,0x5FC5,0x620A,0x6253,0x6254,0x6252,0x6251, -0x65A5,0x65E6,0x672E,0x672C,0x672A,0x672B,0x672D,0x6B63, -0x6BCD,0x6C11,0x6C10,0x6C38,0x6C41,0x6C40,0x6C3E,0x72AF, -0x7384,0x7389,0x74DC,0x74E6,0x7518,0x751F,0x7528,0x7529, -0x7530,0x7531,0x7532,0x7533,0x758B,0x767D,0x76AE,0x76BF, -0x76EE,0x77DB,0x77E2,0x77F3,0x793A,0x79BE,0x7A74,0x7ACB, -0x4E1E,0x4E1F,0x4E52,0x4E53,0x4E69,0x4E99,0x4EA4,0x4EA6, -0x4EA5,0x4EFF,0x4F09,0x4F19,0x4F0A,0x4F15,0x4F0D,0x4F10, -0x4F11,0x4F0F,0x4EF2,0x4EF6,0x4EFB,0x4EF0,0x4EF3,0x4EFD, -0x4F01,0x4F0B,0x5149,0x5147,0x5146,0x5148,0x5168, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5171,0x518D,0x51B0,0x5217,0x5211,0x5212,0x520E,0x5216, -0x52A3,0x5308,0x5321,0x5320,0x5370,0x5371,0x5409,0x540F, -0x540C,0x540A,0x5410,0x5401,0x540B,0x5404,0x5411,0x540D, -0x5408,0x5403,0x540E,0x5406,0x5412,0x56E0,0x56DE,0x56DD, -0x5733,0x5730,0x5728,0x572D,0x572C,0x572F,0x5729,0x5919, -0x591A,0x5937,0x5938,0x5984,0x5978,0x5983,0x597D,0x5979, -0x5982,0x5981,0x5B57,0x5B58,0x5B87,0x5B88,0x5B85,0x5B89, -0x5BFA,0x5C16,0x5C79,0x5DDE,0x5E06,0x5E76,0x5E74, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5F0F,0x5F1B,0x5FD9,0x5FD6,0x620E,0x620C,0x620D, -0x6210,0x6263,0x625B,0x6258,0x6536,0x65E9,0x65E8,0x65EC, -0x65ED,0x66F2,0x66F3,0x6709,0x673D,0x6734,0x6731,0x6735, -0x6B21,0x6B64,0x6B7B,0x6C16,0x6C5D,0x6C57,0x6C59,0x6C5F, -0x6C60,0x6C50,0x6C55,0x6C61,0x6C5B,0x6C4D,0x6C4E,0x7070, -0x725F,0x725D,0x767E,0x7AF9,0x7C73,0x7CF8,0x7F36,0x7F8A, -0x7FBD,0x8001,0x8003,0x800C,0x8012,0x8033,0x807F,0x8089, -0x808B,0x808C,0x81E3,0x81EA,0x81F3,0x81FC,0x820C,0x821B, -0x821F,0x826E,0x8272,0x827E,0x866B,0x8840,0x884C,0x8863, -0x897F,0x9621,0x4E32,0x4EA8,0x4F4D,0x4F4F,0x4F47,0x4F57, -0x4F5E,0x4F34,0x4F5B,0x4F55,0x4F30,0x4F50,0x4F51,0x4F3D, -0x4F3A,0x4F38,0x4F43,0x4F54,0x4F3C,0x4F46,0x4F63, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4F5C,0x4F60,0x4F2F,0x4F4E,0x4F36,0x4F59,0x4F5D,0x4F48, -0x4F5A,0x514C,0x514B,0x514D,0x5175,0x51B6,0x51B7,0x5225, -0x5224,0x5229,0x522A,0x5228,0x52AB,0x52A9,0x52AA,0x52AC, -0x5323,0x5373,0x5375,0x541D,0x542D,0x541E,0x543E,0x5426, -0x544E,0x5427,0x5446,0x5443,0x5433,0x5448,0x5442,0x541B, -0x5429,0x544A,0x5439,0x543B,0x5438,0x542E,0x5435,0x5436, -0x5420,0x543C,0x5440,0x5431,0x542B,0x541F,0x542C,0x56EA, -0x56F0,0x56E4,0x56EB,0x574A,0x5751,0x5740,0x574D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5747,0x574E,0x573E,0x5750,0x574F,0x573B,0x58EF, -0x593E,0x599D,0x5992,0x59A8,0x599E,0x59A3,0x5999,0x5996, -0x598D,0x59A4,0x5993,0x598A,0x59A5,0x5B5D,0x5B5C,0x5B5A, -0x5B5B,0x5B8C,0x5B8B,0x5B8F,0x5C2C,0x5C40,0x5C41,0x5C3F, -0x5C3E,0x5C90,0x5C91,0x5C94,0x5C8C,0x5DEB,0x5E0C,0x5E8F, -0x5E87,0x5E8A,0x5EF7,0x5F04,0x5F1F,0x5F64,0x5F62,0x5F77, -0x5F79,0x5FD8,0x5FCC,0x5FD7,0x5FCD,0x5FF1,0x5FEB,0x5FF8, -0x5FEA,0x6212,0x6211,0x6284,0x6297,0x6296,0x6280,0x6276, -0x6289,0x626D,0x628A,0x627C,0x627E,0x6279,0x6273,0x6292, -0x626F,0x6298,0x626E,0x6295,0x6293,0x6291,0x6286,0x6539, -0x653B,0x6538,0x65F1,0x66F4,0x675F,0x674E,0x674F,0x6750, -0x6751,0x675C,0x6756,0x675E,0x6749,0x6746,0x6760, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6753,0x6757,0x6B65,0x6BCF,0x6C42,0x6C5E,0x6C99,0x6C81, -0x6C88,0x6C89,0x6C85,0x6C9B,0x6C6A,0x6C7A,0x6C90,0x6C70, -0x6C8C,0x6C68,0x6C96,0x6C92,0x6C7D,0x6C83,0x6C72,0x6C7E, -0x6C74,0x6C86,0x6C76,0x6C8D,0x6C94,0x6C98,0x6C82,0x7076, -0x707C,0x707D,0x7078,0x7262,0x7261,0x7260,0x72C4,0x72C2, -0x7396,0x752C,0x752B,0x7537,0x7538,0x7682,0x76EF,0x77E3, -0x79C1,0x79C0,0x79BF,0x7A76,0x7CFB,0x7F55,0x8096,0x8093, -0x809D,0x8098,0x809B,0x809A,0x80B2,0x826F,0x8292, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x828B,0x828D,0x898B,0x89D2,0x8A00,0x8C37,0x8C46, -0x8C55,0x8C9D,0x8D64,0x8D70,0x8DB3,0x8EAB,0x8ECA,0x8F9B, -0x8FB0,0x8FC2,0x8FC6,0x8FC5,0x8FC4,0x5DE1,0x9091,0x90A2, -0x90AA,0x90A6,0x90A3,0x9149,0x91C6,0x91CC,0x9632,0x962E, -0x9631,0x962A,0x962C,0x4E26,0x4E56,0x4E73,0x4E8B,0x4E9B, -0x4E9E,0x4EAB,0x4EAC,0x4F6F,0x4F9D,0x4F8D,0x4F73,0x4F7F, -0x4F6C,0x4F9B,0x4F8B,0x4F86,0x4F83,0x4F70,0x4F75,0x4F88, -0x4F69,0x4F7B,0x4F96,0x4F7E,0x4F8F,0x4F91,0x4F7A,0x5154, -0x5152,0x5155,0x5169,0x5177,0x5176,0x5178,0x51BD,0x51FD, -0x523B,0x5238,0x5237,0x523A,0x5230,0x522E,0x5236,0x5241, -0x52BE,0x52BB,0x5352,0x5354,0x5353,0x5351,0x5366,0x5377, -0x5378,0x5379,0x53D6,0x53D4,0x53D7,0x5473,0x5475, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5496,0x5478,0x5495,0x5480,0x547B,0x5477,0x5484,0x5492, -0x5486,0x547C,0x5490,0x5471,0x5476,0x548C,0x549A,0x5462, -0x5468,0x548B,0x547D,0x548E,0x56FA,0x5783,0x5777,0x576A, -0x5769,0x5761,0x5766,0x5764,0x577C,0x591C,0x5949,0x5947, -0x5948,0x5944,0x5954,0x59BE,0x59BB,0x59D4,0x59B9,0x59AE, -0x59D1,0x59C6,0x59D0,0x59CD,0x59CB,0x59D3,0x59CA,0x59AF, -0x59B3,0x59D2,0x59C5,0x5B5F,0x5B64,0x5B63,0x5B97,0x5B9A, -0x5B98,0x5B9C,0x5B99,0x5B9B,0x5C1A,0x5C48,0x5C45, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5C46,0x5CB7,0x5CA1,0x5CB8,0x5CA9,0x5CAB,0x5CB1, -0x5CB3,0x5E18,0x5E1A,0x5E16,0x5E15,0x5E1B,0x5E11,0x5E78, -0x5E9A,0x5E97,0x5E9C,0x5E95,0x5E96,0x5EF6,0x5F26,0x5F27, -0x5F29,0x5F80,0x5F81,0x5F7F,0x5F7C,0x5FDD,0x5FE0,0x5FFD, -0x5FF5,0x5FFF,0x600F,0x6014,0x602F,0x6035,0x6016,0x602A, -0x6015,0x6021,0x6027,0x6029,0x602B,0x601B,0x6216,0x6215, -0x623F,0x623E,0x6240,0x627F,0x62C9,0x62CC,0x62C4,0x62BF, -0x62C2,0x62B9,0x62D2,0x62DB,0x62AB,0x62D3,0x62D4,0x62CB, -0x62C8,0x62A8,0x62BD,0x62BC,0x62D0,0x62D9,0x62C7,0x62CD, -0x62B5,0x62DA,0x62B1,0x62D8,0x62D6,0x62D7,0x62C6,0x62AC, -0x62CE,0x653E,0x65A7,0x65BC,0x65FA,0x6614,0x6613,0x660C, -0x6606,0x6602,0x660E,0x6600,0x660F,0x6615,0x660A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6607,0x670D,0x670B,0x676D,0x678B,0x6795,0x6771,0x679C, -0x6773,0x6777,0x6787,0x679D,0x6797,0x676F,0x6770,0x677F, -0x6789,0x677E,0x6790,0x6775,0x679A,0x6793,0x677C,0x676A, -0x6772,0x6B23,0x6B66,0x6B67,0x6B7F,0x6C13,0x6C1B,0x6CE3, -0x6CE8,0x6CF3,0x6CB1,0x6CCC,0x6CE5,0x6CB3,0x6CBD,0x6CBE, -0x6CBC,0x6CE2,0x6CAB,0x6CD5,0x6CD3,0x6CB8,0x6CC4,0x6CB9, -0x6CC1,0x6CAE,0x6CD7,0x6CC5,0x6CF1,0x6CBF,0x6CBB,0x6CE1, -0x6CDB,0x6CCA,0x6CAC,0x6CEF,0x6CDC,0x6CD6,0x6CE0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7095,0x708E,0x7092,0x708A,0x7099,0x722C,0x722D, -0x7238,0x7248,0x7267,0x7269,0x72C0,0x72CE,0x72D9,0x72D7, -0x72D0,0x73A9,0x73A8,0x739F,0x73AB,0x73A5,0x753D,0x759D, -0x7599,0x759A,0x7684,0x76C2,0x76F2,0x76F4,0x77E5,0x77FD, -0x793E,0x7940,0x7941,0x79C9,0x79C8,0x7A7A,0x7A79,0x7AFA, -0x7CFE,0x7F54,0x7F8C,0x7F8B,0x8005,0x80BA,0x80A5,0x80A2, -0x80B1,0x80A1,0x80AB,0x80A9,0x80B4,0x80AA,0x80AF,0x81E5, -0x81FE,0x820D,0x82B3,0x829D,0x8299,0x82AD,0x82BD,0x829F, -0x82B9,0x82B1,0x82AC,0x82A5,0x82AF,0x82B8,0x82A3,0x82B0, -0x82BE,0x82B7,0x864E,0x8671,0x521D,0x8868,0x8ECB,0x8FCE, -0x8FD4,0x8FD1,0x90B5,0x90B8,0x90B1,0x90B6,0x91C7,0x91D1, -0x9577,0x9580,0x961C,0x9640,0x963F,0x963B,0x9644, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9642,0x96B9,0x96E8,0x9752,0x975E,0x4E9F,0x4EAD,0x4EAE, -0x4FE1,0x4FB5,0x4FAF,0x4FBF,0x4FE0,0x4FD1,0x4FCF,0x4FDD, -0x4FC3,0x4FB6,0x4FD8,0x4FDF,0x4FCA,0x4FD7,0x4FAE,0x4FD0, -0x4FC4,0x4FC2,0x4FDA,0x4FCE,0x4FDE,0x4FB7,0x5157,0x5192, -0x5191,0x51A0,0x524E,0x5243,0x524A,0x524D,0x524C,0x524B, -0x5247,0x52C7,0x52C9,0x52C3,0x52C1,0x530D,0x5357,0x537B, -0x539A,0x53DB,0x54AC,0x54C0,0x54A8,0x54CE,0x54C9,0x54B8, -0x54A6,0x54B3,0x54C7,0x54C2,0x54BD,0x54AA,0x54C1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x54C4,0x54C8,0x54AF,0x54AB,0x54B1,0x54BB,0x54A9, -0x54A7,0x54BF,0x56FF,0x5782,0x578B,0x57A0,0x57A3,0x57A2, -0x57CE,0x57AE,0x5793,0x5955,0x5951,0x594F,0x594E,0x5950, -0x59DC,0x59D8,0x59FF,0x59E3,0x59E8,0x5A03,0x59E5,0x59EA, -0x59DA,0x59E6,0x5A01,0x59FB,0x5B69,0x5BA3,0x5BA6,0x5BA4, -0x5BA2,0x5BA5,0x5C01,0x5C4E,0x5C4F,0x5C4D,0x5C4B,0x5CD9, -0x5CD2,0x5DF7,0x5E1D,0x5E25,0x5E1F,0x5E7D,0x5EA0,0x5EA6, -0x5EFA,0x5F08,0x5F2D,0x5F65,0x5F88,0x5F85,0x5F8A,0x5F8B, -0x5F87,0x5F8C,0x5F89,0x6012,0x601D,0x6020,0x6025,0x600E, -0x6028,0x604D,0x6070,0x6068,0x6062,0x6046,0x6043,0x606C, -0x606B,0x606A,0x6064,0x6241,0x62DC,0x6316,0x6309,0x62FC, -0x62ED,0x6301,0x62EE,0x62FD,0x6307,0x62F1,0x62F7, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x62EF,0x62EC,0x62FE,0x62F4,0x6311,0x6302,0x653F,0x6545, -0x65AB,0x65BD,0x65E2,0x6625,0x662D,0x6620,0x6627,0x662F, -0x661F,0x6628,0x6631,0x6624,0x66F7,0x67FF,0x67D3,0x67F1, -0x67D4,0x67D0,0x67EC,0x67B6,0x67AF,0x67F5,0x67E9,0x67EF, -0x67C4,0x67D1,0x67B4,0x67DA,0x67E5,0x67B8,0x67CF,0x67DE, -0x67F3,0x67B0,0x67D9,0x67E2,0x67DD,0x67D2,0x6B6A,0x6B83, -0x6B86,0x6BB5,0x6BD2,0x6BD7,0x6C1F,0x6CC9,0x6D0B,0x6D32, -0x6D2A,0x6D41,0x6D25,0x6D0C,0x6D31,0x6D1E,0x6D17, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6D3B,0x6D3D,0x6D3E,0x6D36,0x6D1B,0x6CF5,0x6D39, -0x6D27,0x6D38,0x6D29,0x6D2E,0x6D35,0x6D0E,0x6D2B,0x70AB, -0x70BA,0x70B3,0x70AC,0x70AF,0x70AD,0x70B8,0x70AE,0x70A4, -0x7230,0x7272,0x726F,0x7274,0x72E9,0x72E0,0x72E1,0x73B7, -0x73CA,0x73BB,0x73B2,0x73CD,0x73C0,0x73B3,0x751A,0x752D, -0x754F,0x754C,0x754E,0x754B,0x75AB,0x75A4,0x75A5,0x75A2, -0x75A3,0x7678,0x7686,0x7687,0x7688,0x76C8,0x76C6,0x76C3, -0x76C5,0x7701,0x76F9,0x76F8,0x7709,0x770B,0x76FE,0x76FC, -0x7707,0x77DC,0x7802,0x7814,0x780C,0x780D,0x7946,0x7949, -0x7948,0x7947,0x79B9,0x79BA,0x79D1,0x79D2,0x79CB,0x7A7F, -0x7A81,0x7AFF,0x7AFD,0x7C7D,0x7D02,0x7D05,0x7D00,0x7D09, -0x7D07,0x7D04,0x7D06,0x7F38,0x7F8E,0x7FBF,0x8004, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8010,0x800D,0x8011,0x8036,0x80D6,0x80E5,0x80DA,0x80C3, -0x80C4,0x80CC,0x80E1,0x80DB,0x80CE,0x80DE,0x80E4,0x80DD, -0x81F4,0x8222,0x82E7,0x8303,0x8305,0x82E3,0x82DB,0x82E6, -0x8304,0x82E5,0x8302,0x8309,0x82D2,0x82D7,0x82F1,0x8301, -0x82DC,0x82D4,0x82D1,0x82DE,0x82D3,0x82DF,0x82EF,0x8306, -0x8650,0x8679,0x867B,0x867A,0x884D,0x886B,0x8981,0x89D4, -0x8A08,0x8A02,0x8A03,0x8C9E,0x8CA0,0x8D74,0x8D73,0x8DB4, -0x8ECD,0x8ECC,0x8FF0,0x8FE6,0x8FE2,0x8FEA,0x8FE5, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8FED,0x8FEB,0x8FE4,0x8FE8,0x90CA,0x90CE,0x90C1, -0x90C3,0x914B,0x914A,0x91CD,0x9582,0x9650,0x964B,0x964C, -0x964D,0x9762,0x9769,0x97CB,0x97ED,0x97F3,0x9801,0x98A8, -0x98DB,0x98DF,0x9996,0x9999,0x4E58,0x4EB3,0x500C,0x500D, -0x5023,0x4FEF,0x5026,0x5025,0x4FF8,0x5029,0x5016,0x5006, -0x503C,0x501F,0x501A,0x5012,0x5011,0x4FFA,0x5000,0x5014, -0x5028,0x4FF1,0x5021,0x500B,0x5019,0x5018,0x4FF3,0x4FEE, -0x502D,0x502A,0x4FFE,0x502B,0x5009,0x517C,0x51A4,0x51A5, -0x51A2,0x51CD,0x51CC,0x51C6,0x51CB,0x5256,0x525C,0x5254, -0x525B,0x525D,0x532A,0x537F,0x539F,0x539D,0x53DF,0x54E8, -0x5510,0x5501,0x5537,0x54FC,0x54E5,0x54F2,0x5506,0x54FA, -0x5514,0x54E9,0x54ED,0x54E1,0x5509,0x54EE,0x54EA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x54E6,0x5527,0x5507,0x54FD,0x550F,0x5703,0x5704,0x57C2, -0x57D4,0x57CB,0x57C3,0x5809,0x590F,0x5957,0x5958,0x595A, -0x5A11,0x5A18,0x5A1C,0x5A1F,0x5A1B,0x5A13,0x59EC,0x5A20, -0x5A23,0x5A29,0x5A25,0x5A0C,0x5A09,0x5B6B,0x5C58,0x5BB0, -0x5BB3,0x5BB6,0x5BB4,0x5BAE,0x5BB5,0x5BB9,0x5BB8,0x5C04, -0x5C51,0x5C55,0x5C50,0x5CED,0x5CFD,0x5CFB,0x5CEA,0x5CE8, -0x5CF0,0x5CF6,0x5D01,0x5CF4,0x5DEE,0x5E2D,0x5E2B,0x5EAB, -0x5EAD,0x5EA7,0x5F31,0x5F92,0x5F91,0x5F90,0x6059, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6063,0x6065,0x6050,0x6055,0x606D,0x6069,0x606F, -0x6084,0x609F,0x609A,0x608D,0x6094,0x608C,0x6085,0x6096, -0x6247,0x62F3,0x6308,0x62FF,0x634E,0x633E,0x632F,0x6355, -0x6342,0x6346,0x634F,0x6349,0x633A,0x6350,0x633D,0x632A, -0x632B,0x6328,0x634D,0x634C,0x6548,0x6549,0x6599,0x65C1, -0x65C5,0x6642,0x6649,0x664F,0x6643,0x6652,0x664C,0x6645, -0x6641,0x66F8,0x6714,0x6715,0x6717,0x6821,0x6838,0x6848, -0x6846,0x6853,0x6839,0x6842,0x6854,0x6829,0x68B3,0x6817, -0x684C,0x6851,0x683D,0x67F4,0x6850,0x6840,0x683C,0x6843, -0x682A,0x6845,0x6813,0x6818,0x6841,0x6B8A,0x6B89,0x6BB7, -0x6C23,0x6C27,0x6C28,0x6C26,0x6C24,0x6CF0,0x6D6A,0x6D95, -0x6D88,0x6D87,0x6D66,0x6D78,0x6D77,0x6D59,0x6D93, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6D6C,0x6D89,0x6D6E,0x6D5A,0x6D74,0x6D69,0x6D8C,0x6D8A, -0x6D79,0x6D85,0x6D65,0x6D94,0x70CA,0x70D8,0x70E4,0x70D9, -0x70C8,0x70CF,0x7239,0x7279,0x72FC,0x72F9,0x72FD,0x72F8, -0x72F7,0x7386,0x73ED,0x7409,0x73EE,0x73E0,0x73EA,0x73DE, -0x7554,0x755D,0x755C,0x755A,0x7559,0x75BE,0x75C5,0x75C7, -0x75B2,0x75B3,0x75BD,0x75BC,0x75B9,0x75C2,0x75B8,0x768B, -0x76B0,0x76CA,0x76CD,0x76CE,0x7729,0x771F,0x7720,0x7728, -0x77E9,0x7830,0x7827,0x7838,0x781D,0x7834,0x7837, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7825,0x782D,0x7820,0x781F,0x7832,0x7955,0x7950, -0x7960,0x795F,0x7956,0x795E,0x795D,0x7957,0x795A,0x79E4, -0x79E3,0x79E7,0x79DF,0x79E6,0x79E9,0x79D8,0x7A84,0x7A88, -0x7AD9,0x7B06,0x7B11,0x7C89,0x7D21,0x7D17,0x7D0B,0x7D0A, -0x7D20,0x7D22,0x7D14,0x7D10,0x7D15,0x7D1A,0x7D1C,0x7D0D, -0x7D19,0x7D1B,0x7F3A,0x7F5F,0x7F94,0x7FC5,0x7FC1,0x8006, -0x8018,0x8015,0x8019,0x8017,0x803D,0x803F,0x80F1,0x8102, -0x80F0,0x8105,0x80ED,0x80F4,0x8106,0x80F8,0x80F3,0x8108, -0x80FD,0x810A,0x80FC,0x80EF,0x81ED,0x81EC,0x8200,0x8210, -0x822A,0x822B,0x8228,0x822C,0x82BB,0x832B,0x8352,0x8354, -0x834A,0x8338,0x8350,0x8349,0x8335,0x8334,0x834F,0x8332, -0x8339,0x8336,0x8317,0x8340,0x8331,0x8328,0x8343, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8654,0x868A,0x86AA,0x8693,0x86A4,0x86A9,0x868C,0x86A3, -0x869C,0x8870,0x8877,0x8881,0x8882,0x887D,0x8879,0x8A18, -0x8A10,0x8A0E,0x8A0C,0x8A15,0x8A0A,0x8A17,0x8A13,0x8A16, -0x8A0F,0x8A11,0x8C48,0x8C7A,0x8C79,0x8CA1,0x8CA2,0x8D77, -0x8EAC,0x8ED2,0x8ED4,0x8ECF,0x8FB1,0x9001,0x9006,0x8FF7, -0x9000,0x8FFA,0x8FF4,0x9003,0x8FFD,0x9005,0x8FF8,0x9095, -0x90E1,0x90DD,0x90E2,0x9152,0x914D,0x914C,0x91D8,0x91DD, -0x91D7,0x91DC,0x91D9,0x9583,0x9662,0x9663,0x9661, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x965B,0x965D,0x9664,0x9658,0x965E,0x96BB,0x98E2, -0x99AC,0x9AA8,0x9AD8,0x9B25,0x9B32,0x9B3C,0x4E7E,0x507A, -0x507D,0x505C,0x5047,0x5043,0x504C,0x505A,0x5049,0x5065, -0x5076,0x504E,0x5055,0x5075,0x5074,0x5077,0x504F,0x500F, -0x506F,0x506D,0x515C,0x5195,0x51F0,0x526A,0x526F,0x52D2, -0x52D9,0x52D8,0x52D5,0x5310,0x530F,0x5319,0x533F,0x5340, -0x533E,0x53C3,0x66FC,0x5546,0x556A,0x5566,0x5544,0x555E, -0x5561,0x5543,0x554A,0x5531,0x5556,0x554F,0x5555,0x552F, -0x5564,0x5538,0x552E,0x555C,0x552C,0x5563,0x5533,0x5541, -0x5557,0x5708,0x570B,0x5709,0x57DF,0x5805,0x580A,0x5806, -0x57E0,0x57E4,0x57FA,0x5802,0x5835,0x57F7,0x57F9,0x5920, -0x5962,0x5A36,0x5A41,0x5A49,0x5A66,0x5A6A,0x5A40, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5A3C,0x5A62,0x5A5A,0x5A46,0x5A4A,0x5B70,0x5BC7,0x5BC5, -0x5BC4,0x5BC2,0x5BBF,0x5BC6,0x5C09,0x5C08,0x5C07,0x5C60, -0x5C5C,0x5C5D,0x5D07,0x5D06,0x5D0E,0x5D1B,0x5D16,0x5D22, -0x5D11,0x5D29,0x5D14,0x5D19,0x5D24,0x5D27,0x5D17,0x5DE2, -0x5E38,0x5E36,0x5E33,0x5E37,0x5EB7,0x5EB8,0x5EB6,0x5EB5, -0x5EBE,0x5F35,0x5F37,0x5F57,0x5F6C,0x5F69,0x5F6B,0x5F97, -0x5F99,0x5F9E,0x5F98,0x5FA1,0x5FA0,0x5F9C,0x607F,0x60A3, -0x6089,0x60A0,0x60A8,0x60CB,0x60B4,0x60E6,0x60BD, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x60C5,0x60BB,0x60B5,0x60DC,0x60BC,0x60D8,0x60D5, -0x60C6,0x60DF,0x60B8,0x60DA,0x60C7,0x621A,0x621B,0x6248, -0x63A0,0x63A7,0x6372,0x6396,0x63A2,0x63A5,0x6377,0x6367, -0x6398,0x63AA,0x6371,0x63A9,0x6389,0x6383,0x639B,0x636B, -0x63A8,0x6384,0x6388,0x6399,0x63A1,0x63AC,0x6392,0x638F, -0x6380,0x637B,0x6369,0x6368,0x637A,0x655D,0x6556,0x6551, -0x6559,0x6557,0x555F,0x654F,0x6558,0x6555,0x6554,0x659C, -0x659B,0x65AC,0x65CF,0x65CB,0x65CC,0x65CE,0x665D,0x665A, -0x6664,0x6668,0x6666,0x665E,0x66F9,0x52D7,0x671B,0x6881, -0x68AF,0x68A2,0x6893,0x68B5,0x687F,0x6876,0x68B1,0x68A7, -0x6897,0x68B0,0x6883,0x68C4,0x68AD,0x6886,0x6885,0x6894, -0x689D,0x68A8,0x689F,0x68A1,0x6882,0x6B32,0x6BBA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6BEB,0x6BEC,0x6C2B,0x6D8E,0x6DBC,0x6DF3,0x6DD9,0x6DB2, -0x6DE1,0x6DCC,0x6DE4,0x6DFB,0x6DFA,0x6E05,0x6DC7,0x6DCB, -0x6DAF,0x6DD1,0x6DAE,0x6DDE,0x6DF9,0x6DB8,0x6DF7,0x6DF5, -0x6DC5,0x6DD2,0x6E1A,0x6DB5,0x6DDA,0x6DEB,0x6DD8,0x6DEA, -0x6DF1,0x6DEE,0x6DE8,0x6DC6,0x6DC4,0x6DAA,0x6DEC,0x6DBF, -0x6DE6,0x70F9,0x7109,0x710A,0x70FD,0x70EF,0x723D,0x727D, -0x7281,0x731C,0x731B,0x7316,0x7313,0x7319,0x7387,0x7405, -0x740A,0x7403,0x7406,0x73FE,0x740D,0x74E0,0x74F6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x74F7,0x751C,0x7522,0x7565,0x7566,0x7562,0x7570, -0x758F,0x75D4,0x75D5,0x75B5,0x75CA,0x75CD,0x768E,0x76D4, -0x76D2,0x76DB,0x7737,0x773E,0x773C,0x7736,0x7738,0x773A, -0x786B,0x7843,0x784E,0x7965,0x7968,0x796D,0x79FB,0x7A92, -0x7A95,0x7B20,0x7B28,0x7B1B,0x7B2C,0x7B26,0x7B19,0x7B1E, -0x7B2E,0x7C92,0x7C97,0x7C95,0x7D46,0x7D43,0x7D71,0x7D2E, -0x7D39,0x7D3C,0x7D40,0x7D30,0x7D33,0x7D44,0x7D2F,0x7D42, -0x7D32,0x7D31,0x7F3D,0x7F9E,0x7F9A,0x7FCC,0x7FCE,0x7FD2, -0x801C,0x804A,0x8046,0x812F,0x8116,0x8123,0x812B,0x8129, -0x8130,0x8124,0x8202,0x8235,0x8237,0x8236,0x8239,0x838E, -0x839E,0x8398,0x8378,0x83A2,0x8396,0x83BD,0x83AB,0x8392, -0x838A,0x8393,0x8389,0x83A0,0x8377,0x837B,0x837C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8386,0x83A7,0x8655,0x5F6A,0x86C7,0x86C0,0x86B6,0x86C4, -0x86B5,0x86C6,0x86CB,0x86B1,0x86AF,0x86C9,0x8853,0x889E, -0x8888,0x88AB,0x8892,0x8896,0x888D,0x888B,0x8993,0x898F, -0x8A2A,0x8A1D,0x8A23,0x8A25,0x8A31,0x8A2D,0x8A1F,0x8A1B, -0x8A22,0x8C49,0x8C5A,0x8CA9,0x8CAC,0x8CAB,0x8CA8,0x8CAA, -0x8CA7,0x8D67,0x8D66,0x8DBE,0x8DBA,0x8EDB,0x8EDF,0x9019, -0x900D,0x901A,0x9017,0x9023,0x901F,0x901D,0x9010,0x9015, -0x901E,0x9020,0x900F,0x9022,0x9016,0x901B,0x9014, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x90E8,0x90ED,0x90FD,0x9157,0x91CE,0x91F5,0x91E6, -0x91E3,0x91E7,0x91ED,0x91E9,0x9589,0x966A,0x9675,0x9673, -0x9678,0x9670,0x9674,0x9676,0x9677,0x966C,0x96C0,0x96EA, -0x96E9,0x7AE0,0x7ADF,0x9802,0x9803,0x9B5A,0x9CE5,0x9E75, -0x9E7F,0x9EA5,0x9EBB,0x50A2,0x508D,0x5085,0x5099,0x5091, -0x5080,0x5096,0x5098,0x509A,0x6700,0x51F1,0x5272,0x5274, -0x5275,0x5269,0x52DE,0x52DD,0x52DB,0x535A,0x53A5,0x557B, -0x5580,0x55A7,0x557C,0x558A,0x559D,0x5598,0x5582,0x559C, -0x55AA,0x5594,0x5587,0x558B,0x5583,0x55B3,0x55AE,0x559F, -0x553E,0x55B2,0x559A,0x55BB,0x55AC,0x55B1,0x557E,0x5589, -0x55AB,0x5599,0x570D,0x582F,0x582A,0x5834,0x5824,0x5830, -0x5831,0x5821,0x581D,0x5820,0x58F9,0x58FA,0x5960, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5A77,0x5A9A,0x5A7F,0x5A92,0x5A9B,0x5AA7,0x5B73,0x5B71, -0x5BD2,0x5BCC,0x5BD3,0x5BD0,0x5C0A,0x5C0B,0x5C31,0x5D4C, -0x5D50,0x5D34,0x5D47,0x5DFD,0x5E45,0x5E3D,0x5E40,0x5E43, -0x5E7E,0x5ECA,0x5EC1,0x5EC2,0x5EC4,0x5F3C,0x5F6D,0x5FA9, -0x5FAA,0x5FA8,0x60D1,0x60E1,0x60B2,0x60B6,0x60E0,0x611C, -0x6123,0x60FA,0x6115,0x60F0,0x60FB,0x60F4,0x6168,0x60F1, -0x610E,0x60F6,0x6109,0x6100,0x6112,0x621F,0x6249,0x63A3, -0x638C,0x63CF,0x63C0,0x63E9,0x63C9,0x63C6,0x63CD, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x63D2,0x63E3,0x63D0,0x63E1,0x63D6,0x63ED,0x63EE, -0x6376,0x63F4,0x63EA,0x63DB,0x6452,0x63DA,0x63F9,0x655E, -0x6566,0x6562,0x6563,0x6591,0x6590,0x65AF,0x666E,0x6670, -0x6674,0x6676,0x666F,0x6691,0x667A,0x667E,0x6677,0x66FE, -0x66FF,0x671F,0x671D,0x68FA,0x68D5,0x68E0,0x68D8,0x68D7, -0x6905,0x68DF,0x68F5,0x68EE,0x68E7,0x68F9,0x68D2,0x68F2, -0x68E3,0x68CB,0x68CD,0x690D,0x6912,0x690E,0x68C9,0x68DA, -0x696E,0x68FB,0x6B3E,0x6B3A,0x6B3D,0x6B98,0x6B96,0x6BBC, -0x6BEF,0x6C2E,0x6C2F,0x6C2C,0x6E2F,0x6E38,0x6E54,0x6E21, -0x6E32,0x6E67,0x6E4A,0x6E20,0x6E25,0x6E23,0x6E1B,0x6E5B, -0x6E58,0x6E24,0x6E56,0x6E6E,0x6E2D,0x6E26,0x6E6F,0x6E34, -0x6E4D,0x6E3A,0x6E2C,0x6E43,0x6E1D,0x6E3E,0x6ECB, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6E89,0x6E19,0x6E4E,0x6E63,0x6E44,0x6E72,0x6E69,0x6E5F, -0x7119,0x711A,0x7126,0x7130,0x7121,0x7136,0x716E,0x711C, -0x724C,0x7284,0x7280,0x7336,0x7325,0x7334,0x7329,0x743A, -0x742A,0x7433,0x7422,0x7425,0x7435,0x7436,0x7434,0x742F, -0x741B,0x7426,0x7428,0x7525,0x7526,0x756B,0x756A,0x75E2, -0x75DB,0x75E3,0x75D9,0x75D8,0x75DE,0x75E0,0x767B,0x767C, -0x7696,0x7693,0x76B4,0x76DC,0x774F,0x77ED,0x785D,0x786C, -0x786F,0x7A0D,0x7A08,0x7A0B,0x7A05,0x7A00,0x7A98, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7A97,0x7A96,0x7AE5,0x7AE3,0x7B49,0x7B56,0x7B46, -0x7B50,0x7B52,0x7B54,0x7B4D,0x7B4B,0x7B4F,0x7B51,0x7C9F, -0x7CA5,0x7D5E,0x7D50,0x7D68,0x7D55,0x7D2B,0x7D6E,0x7D72, -0x7D61,0x7D66,0x7D62,0x7D70,0x7D73,0x5584,0x7FD4,0x7FD5, -0x800B,0x8052,0x8085,0x8155,0x8154,0x814B,0x8151,0x814E, -0x8139,0x8146,0x813E,0x814C,0x8153,0x8174,0x8212,0x821C, -0x83E9,0x8403,0x83F8,0x840D,0x83E0,0x83C5,0x840B,0x83C1, -0x83EF,0x83F1,0x83F4,0x8457,0x840A,0x83F0,0x840C,0x83CC, -0x83FD,0x83F2,0x83CA,0x8438,0x840E,0x8404,0x83DC,0x8407, -0x83D4,0x83DF,0x865B,0x86DF,0x86D9,0x86ED,0x86D4,0x86DB, -0x86E4,0x86D0,0x86DE,0x8857,0x88C1,0x88C2,0x88B1,0x8983, -0x8996,0x8A3B,0x8A60,0x8A55,0x8A5E,0x8A3C,0x8A41, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8A54,0x8A5B,0x8A50,0x8A46,0x8A34,0x8A3A,0x8A36,0x8A56, -0x8C61,0x8C82,0x8CAF,0x8CBC,0x8CB3,0x8CBD,0x8CC1,0x8CBB, -0x8CC0,0x8CB4,0x8CB7,0x8CB6,0x8CBF,0x8CB8,0x8D8A,0x8D85, -0x8D81,0x8DCE,0x8DDD,0x8DCB,0x8DDA,0x8DD1,0x8DCC,0x8DDB, -0x8DC6,0x8EFB,0x8EF8,0x8EFC,0x8F9C,0x902E,0x9035,0x9031, -0x9038,0x9032,0x9036,0x9102,0x90F5,0x9109,0x90FE,0x9163, -0x9165,0x91CF,0x9214,0x9215,0x9223,0x9209,0x921E,0x920D, -0x9210,0x9207,0x9211,0x9594,0x958F,0x958B,0x9591, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9593,0x9592,0x958E,0x968A,0x968E,0x968B,0x967D, -0x9685,0x9686,0x968D,0x9672,0x9684,0x96C1,0x96C5,0x96C4, -0x96C6,0x96C7,0x96EF,0x96F2,0x97CC,0x9805,0x9806,0x9808, -0x98E7,0x98EA,0x98EF,0x98E9,0x98F2,0x98ED,0x99AE,0x99AD, -0x9EC3,0x9ECD,0x9ED1,0x4E82,0x50AD,0x50B5,0x50B2,0x50B3, -0x50C5,0x50BE,0x50AC,0x50B7,0x50BB,0x50AF,0x50C7,0x527F, -0x5277,0x527D,0x52DF,0x52E6,0x52E4,0x52E2,0x52E3,0x532F, -0x55DF,0x55E8,0x55D3,0x55E6,0x55CE,0x55DC,0x55C7,0x55D1, -0x55E3,0x55E4,0x55EF,0x55DA,0x55E1,0x55C5,0x55C6,0x55E5, -0x55C9,0x5712,0x5713,0x585E,0x5851,0x5858,0x5857,0x585A, -0x5854,0x586B,0x584C,0x586D,0x584A,0x5862,0x5852,0x584B, -0x5967,0x5AC1,0x5AC9,0x5ACC,0x5ABE,0x5ABD,0x5ABC, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5AB3,0x5AC2,0x5AB2,0x5D69,0x5D6F,0x5E4C,0x5E79,0x5EC9, -0x5EC8,0x5F12,0x5F59,0x5FAC,0x5FAE,0x611A,0x610F,0x6148, -0x611F,0x60F3,0x611B,0x60F9,0x6101,0x6108,0x614E,0x614C, -0x6144,0x614D,0x613E,0x6134,0x6127,0x610D,0x6106,0x6137, -0x6221,0x6222,0x6413,0x643E,0x641E,0x642A,0x642D,0x643D, -0x642C,0x640F,0x641C,0x6414,0x640D,0x6436,0x6416,0x6417, -0x6406,0x656C,0x659F,0x65B0,0x6697,0x6689,0x6687,0x6688, -0x6696,0x6684,0x6698,0x668D,0x6703,0x6994,0x696D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x695A,0x6977,0x6960,0x6954,0x6975,0x6930,0x6982, -0x694A,0x6968,0x696B,0x695E,0x6953,0x6979,0x6986,0x695D, -0x6963,0x695B,0x6B47,0x6B72,0x6BC0,0x6BBF,0x6BD3,0x6BFD, -0x6EA2,0x6EAF,0x6ED3,0x6EB6,0x6EC2,0x6E90,0x6E9D,0x6EC7, -0x6EC5,0x6EA5,0x6E98,0x6EBC,0x6EBA,0x6EAB,0x6ED1,0x6E96, -0x6E9C,0x6EC4,0x6ED4,0x6EAA,0x6EA7,0x6EB4,0x714E,0x7159, -0x7169,0x7164,0x7149,0x7167,0x715C,0x716C,0x7166,0x714C, -0x7165,0x715E,0x7146,0x7168,0x7156,0x723A,0x7252,0x7337, -0x7345,0x733F,0x733E,0x746F,0x745A,0x7455,0x745F,0x745E, -0x7441,0x743F,0x7459,0x745B,0x745C,0x7576,0x7578,0x7600, -0x75F0,0x7601,0x75F2,0x75F1,0x75FA,0x75FF,0x75F4,0x75F3, -0x76DE,0x76DF,0x775B,0x776B,0x7766,0x775E,0x7763, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7779,0x776A,0x776C,0x775C,0x7765,0x7768,0x7762,0x77EE, -0x788E,0x78B0,0x7897,0x7898,0x788C,0x7889,0x787C,0x7891, -0x7893,0x787F,0x797A,0x797F,0x7981,0x842C,0x79BD,0x7A1C, -0x7A1A,0x7A20,0x7A14,0x7A1F,0x7A1E,0x7A9F,0x7AA0,0x7B77, -0x7BC0,0x7B60,0x7B6E,0x7B67,0x7CB1,0x7CB3,0x7CB5,0x7D93, -0x7D79,0x7D91,0x7D81,0x7D8F,0x7D5B,0x7F6E,0x7F69,0x7F6A, -0x7F72,0x7FA9,0x7FA8,0x7FA4,0x8056,0x8058,0x8086,0x8084, -0x8171,0x8170,0x8178,0x8165,0x816E,0x8173,0x816B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8179,0x817A,0x8166,0x8205,0x8247,0x8482,0x8477, -0x843D,0x8431,0x8475,0x8466,0x846B,0x8449,0x846C,0x845B, -0x843C,0x8435,0x8461,0x8463,0x8469,0x846D,0x8446,0x865E, -0x865C,0x865F,0x86F9,0x8713,0x8708,0x8707,0x8700,0x86FE, -0x86FB,0x8702,0x8703,0x8706,0x870A,0x8859,0x88DF,0x88D4, -0x88D9,0x88DC,0x88D8,0x88DD,0x88E1,0x88CA,0x88D5,0x88D2, -0x899C,0x89E3,0x8A6B,0x8A72,0x8A73,0x8A66,0x8A69,0x8A70, -0x8A87,0x8A7C,0x8A63,0x8AA0,0x8A71,0x8A85,0x8A6D,0x8A62, -0x8A6E,0x8A6C,0x8A79,0x8A7B,0x8A3E,0x8A68,0x8C62,0x8C8A, -0x8C89,0x8CCA,0x8CC7,0x8CC8,0x8CC4,0x8CB2,0x8CC3,0x8CC2, -0x8CC5,0x8DE1,0x8DDF,0x8DE8,0x8DEF,0x8DF3,0x8DFA,0x8DEA, -0x8DE4,0x8DE6,0x8EB2,0x8F03,0x8F09,0x8EFE,0x8F0A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8F9F,0x8FB2,0x904B,0x904A,0x9053,0x9042,0x9054,0x903C, -0x9055,0x9050,0x9047,0x904F,0x904E,0x904D,0x9051,0x903E, -0x9041,0x9112,0x9117,0x916C,0x916A,0x9169,0x91C9,0x9237, -0x9257,0x9238,0x923D,0x9240,0x923E,0x925B,0x924B,0x9264, -0x9251,0x9234,0x9249,0x924D,0x9245,0x9239,0x923F,0x925A, -0x9598,0x9698,0x9694,0x9695,0x96CD,0x96CB,0x96C9,0x96CA, -0x96F7,0x96FB,0x96F9,0x96F6,0x9756,0x9774,0x9776,0x9810, -0x9811,0x9813,0x980A,0x9812,0x980C,0x98FC,0x98F4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x98FD,0x98FE,0x99B3,0x99B1,0x99B4,0x9AE1,0x9CE9, -0x9E82,0x9F0E,0x9F13,0x9F20,0x50E7,0x50EE,0x50E5,0x50D6, -0x50ED,0x50DA,0x50D5,0x50CF,0x50D1,0x50F1,0x50CE,0x50E9, -0x5162,0x51F3,0x5283,0x5282,0x5331,0x53AD,0x55FE,0x5600, -0x561B,0x5617,0x55FD,0x5614,0x5606,0x5609,0x560D,0x560E, -0x55F7,0x5616,0x561F,0x5608,0x5610,0x55F6,0x5718,0x5716, -0x5875,0x587E,0x5883,0x5893,0x588A,0x5879,0x5885,0x587D, -0x58FD,0x5925,0x5922,0x5924,0x596A,0x5969,0x5AE1,0x5AE6, -0x5AE9,0x5AD7,0x5AD6,0x5AD8,0x5AE3,0x5B75,0x5BDE,0x5BE7, -0x5BE1,0x5BE5,0x5BE6,0x5BE8,0x5BE2,0x5BE4,0x5BDF,0x5C0D, -0x5C62,0x5D84,0x5D87,0x5E5B,0x5E63,0x5E55,0x5E57,0x5E54, -0x5ED3,0x5ED6,0x5F0A,0x5F46,0x5F70,0x5FB9,0x6147, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x613F,0x614B,0x6177,0x6162,0x6163,0x615F,0x615A,0x6158, -0x6175,0x622A,0x6487,0x6458,0x6454,0x64A4,0x6478,0x645F, -0x647A,0x6451,0x6467,0x6434,0x646D,0x647B,0x6572,0x65A1, -0x65D7,0x65D6,0x66A2,0x66A8,0x669D,0x699C,0x69A8,0x6995, -0x69C1,0x69AE,0x69D3,0x69CB,0x699B,0x69B7,0x69BB,0x69AB, -0x69B4,0x69D0,0x69CD,0x69AD,0x69CC,0x69A6,0x69C3,0x69A3, -0x6B49,0x6B4C,0x6C33,0x6F33,0x6F14,0x6EFE,0x6F13,0x6EF4, -0x6F29,0x6F3E,0x6F20,0x6F2C,0x6F0F,0x6F02,0x6F22, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6EFF,0x6EEF,0x6F06,0x6F31,0x6F38,0x6F32,0x6F23, -0x6F15,0x6F2B,0x6F2F,0x6F88,0x6F2A,0x6EEC,0x6F01,0x6EF2, -0x6ECC,0x6EF7,0x7194,0x7199,0x717D,0x718A,0x7184,0x7192, -0x723E,0x7292,0x7296,0x7344,0x7350,0x7464,0x7463,0x746A, -0x7470,0x746D,0x7504,0x7591,0x7627,0x760D,0x760B,0x7609, -0x7613,0x76E1,0x76E3,0x7784,0x777D,0x777F,0x7761,0x78C1, -0x789F,0x78A7,0x78B3,0x78A9,0x78A3,0x798E,0x798F,0x798D, -0x7A2E,0x7A31,0x7AAA,0x7AA9,0x7AED,0x7AEF,0x7BA1,0x7B95, -0x7B8B,0x7B75,0x7B97,0x7B9D,0x7B94,0x7B8F,0x7BB8,0x7B87, -0x7B84,0x7CB9,0x7CBD,0x7CBE,0x7DBB,0x7DB0,0x7D9C,0x7DBD, -0x7DBE,0x7DA0,0x7DCA,0x7DB4,0x7DB2,0x7DB1,0x7DBA,0x7DA2, -0x7DBF,0x7DB5,0x7DB8,0x7DAD,0x7DD2,0x7DC7,0x7DAC, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7F70,0x7FE0,0x7FE1,0x7FDF,0x805E,0x805A,0x8087,0x8150, -0x8180,0x818F,0x8188,0x818A,0x817F,0x8182,0x81E7,0x81FA, -0x8207,0x8214,0x821E,0x824B,0x84C9,0x84BF,0x84C6,0x84C4, -0x8499,0x849E,0x84B2,0x849C,0x84CB,0x84B8,0x84C0,0x84D3, -0x8490,0x84BC,0x84D1,0x84CA,0x873F,0x871C,0x873B,0x8722, -0x8725,0x8734,0x8718,0x8755,0x8737,0x8729,0x88F3,0x8902, -0x88F4,0x88F9,0x88F8,0x88FD,0x88E8,0x891A,0x88EF,0x8AA6, -0x8A8C,0x8A9E,0x8AA3,0x8A8D,0x8AA1,0x8A93,0x8AA4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8AAA,0x8AA5,0x8AA8,0x8A98,0x8A91,0x8A9A,0x8AA7, -0x8C6A,0x8C8D,0x8C8C,0x8CD3,0x8CD1,0x8CD2,0x8D6B,0x8D99, -0x8D95,0x8DFC,0x8F14,0x8F12,0x8F15,0x8F13,0x8FA3,0x9060, -0x9058,0x905C,0x9063,0x9059,0x905E,0x9062,0x905D,0x905B, -0x9119,0x9118,0x911E,0x9175,0x9178,0x9177,0x9174,0x9278, -0x9280,0x9285,0x9298,0x9296,0x927B,0x9293,0x929C,0x92A8, -0x927C,0x9291,0x95A1,0x95A8,0x95A9,0x95A3,0x95A5,0x95A4, -0x9699,0x969C,0x969B,0x96CC,0x96D2,0x9700,0x977C,0x9785, -0x97F6,0x9817,0x9818,0x98AF,0x98B1,0x9903,0x9905,0x990C, -0x9909,0x99C1,0x9AAF,0x9AB0,0x9AE6,0x9B41,0x9B42,0x9CF4, -0x9CF6,0x9CF3,0x9EBC,0x9F3B,0x9F4A,0x5104,0x5100,0x50FB, -0x50F5,0x50F9,0x5102,0x5108,0x5109,0x5105,0x51DC, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5287,0x5288,0x5289,0x528D,0x528A,0x52F0,0x53B2,0x562E, -0x563B,0x5639,0x5632,0x563F,0x5634,0x5629,0x5653,0x564E, -0x5657,0x5674,0x5636,0x562F,0x5630,0x5880,0x589F,0x589E, -0x58B3,0x589C,0x58AE,0x58A9,0x58A6,0x596D,0x5B09,0x5AFB, -0x5B0B,0x5AF5,0x5B0C,0x5B08,0x5BEE,0x5BEC,0x5BE9,0x5BEB, -0x5C64,0x5C65,0x5D9D,0x5D94,0x5E62,0x5E5F,0x5E61,0x5EE2, -0x5EDA,0x5EDF,0x5EDD,0x5EE3,0x5EE0,0x5F48,0x5F71,0x5FB7, -0x5FB5,0x6176,0x6167,0x616E,0x615D,0x6155,0x6182, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x617C,0x6170,0x616B,0x617E,0x61A7,0x6190,0x61AB, -0x618E,0x61AC,0x619A,0x61A4,0x6194,0x61AE,0x622E,0x6469, -0x646F,0x6479,0x649E,0x64B2,0x6488,0x6490,0x64B0,0x64A5, -0x6493,0x6495,0x64A9,0x6492,0x64AE,0x64AD,0x64AB,0x649A, -0x64AC,0x6499,0x64A2,0x64B3,0x6575,0x6577,0x6578,0x66AE, -0x66AB,0x66B4,0x66B1,0x6A23,0x6A1F,0x69E8,0x6A01,0x6A1E, -0x6A19,0x69FD,0x6A21,0x6A13,0x6A0A,0x69F3,0x6A02,0x6A05, -0x69ED,0x6A11,0x6B50,0x6B4E,0x6BA4,0x6BC5,0x6BC6,0x6F3F, -0x6F7C,0x6F84,0x6F51,0x6F66,0x6F54,0x6F86,0x6F6D,0x6F5B, -0x6F78,0x6F6E,0x6F8E,0x6F7A,0x6F70,0x6F64,0x6F97,0x6F58, -0x6ED5,0x6F6F,0x6F60,0x6F5F,0x719F,0x71AC,0x71B1,0x71A8, -0x7256,0x729B,0x734E,0x7357,0x7469,0x748B,0x7483, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x747E,0x7480,0x757F,0x7620,0x7629,0x761F,0x7624,0x7626, -0x7621,0x7622,0x769A,0x76BA,0x76E4,0x778E,0x7787,0x778C, -0x7791,0x778B,0x78CB,0x78C5,0x78BA,0x78CA,0x78BE,0x78D5, -0x78BC,0x78D0,0x7A3F,0x7A3C,0x7A40,0x7A3D,0x7A37,0x7A3B, -0x7AAF,0x7AAE,0x7BAD,0x7BB1,0x7BC4,0x7BB4,0x7BC6,0x7BC7, -0x7BC1,0x7BA0,0x7BCC,0x7CCA,0x7DE0,0x7DF4,0x7DEF,0x7DFB, -0x7DD8,0x7DEC,0x7DDD,0x7DE8,0x7DE3,0x7DDA,0x7DDE,0x7DE9, -0x7D9E,0x7DD9,0x7DF2,0x7DF9,0x7F75,0x7F77,0x7FAF, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7FE9,0x8026,0x819B,0x819C,0x819D,0x81A0,0x819A, -0x8198,0x8517,0x853D,0x851A,0x84EE,0x852C,0x852D,0x8513, -0x8511,0x8523,0x8521,0x8514,0x84EC,0x8525,0x84FF,0x8506, -0x8782,0x8774,0x8776,0x8760,0x8766,0x8778,0x8768,0x8759, -0x8757,0x874C,0x8753,0x885B,0x885D,0x8910,0x8907,0x8912, -0x8913,0x8915,0x890A,0x8ABC,0x8AD2,0x8AC7,0x8AC4,0x8A95, -0x8ACB,0x8AF8,0x8AB2,0x8AC9,0x8AC2,0x8ABF,0x8AB0,0x8AD6, -0x8ACD,0x8AB6,0x8AB9,0x8ADB,0x8C4C,0x8C4E,0x8C6C,0x8CE0, -0x8CDE,0x8CE6,0x8CE4,0x8CEC,0x8CED,0x8CE2,0x8CE3,0x8CDC, -0x8CEA,0x8CE1,0x8D6D,0x8D9F,0x8DA3,0x8E2B,0x8E10,0x8E1D, -0x8E22,0x8E0F,0x8E29,0x8E1F,0x8E21,0x8E1E,0x8EBA,0x8F1D, -0x8F1B,0x8F1F,0x8F29,0x8F26,0x8F2A,0x8F1C,0x8F1E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8F25,0x9069,0x906E,0x9068,0x906D,0x9077,0x9130,0x912D, -0x9127,0x9131,0x9187,0x9189,0x918B,0x9183,0x92C5,0x92BB, -0x92B7,0x92EA,0x92AC,0x92E4,0x92C1,0x92B3,0x92BC,0x92D2, -0x92C7,0x92F0,0x92B2,0x95AD,0x95B1,0x9704,0x9706,0x9707, -0x9709,0x9760,0x978D,0x978B,0x978F,0x9821,0x982B,0x981C, -0x98B3,0x990A,0x9913,0x9912,0x9918,0x99DD,0x99D0,0x99DF, -0x99DB,0x99D1,0x99D5,0x99D2,0x99D9,0x9AB7,0x9AEE,0x9AEF, -0x9B27,0x9B45,0x9B44,0x9B77,0x9B6F,0x9D06,0x9D09, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9D03,0x9EA9,0x9EBE,0x9ECE,0x58A8,0x9F52,0x5112, -0x5118,0x5114,0x5110,0x5115,0x5180,0x51AA,0x51DD,0x5291, -0x5293,0x52F3,0x5659,0x566B,0x5679,0x5669,0x5664,0x5678, -0x566A,0x5668,0x5665,0x5671,0x566F,0x566C,0x5662,0x5676, -0x58C1,0x58BE,0x58C7,0x58C5,0x596E,0x5B1D,0x5B34,0x5B78, -0x5BF0,0x5C0E,0x5F4A,0x61B2,0x6191,0x61A9,0x618A,0x61CD, -0x61B6,0x61BE,0x61CA,0x61C8,0x6230,0x64C5,0x64C1,0x64CB, -0x64BB,0x64BC,0x64DA,0x64C4,0x64C7,0x64C2,0x64CD,0x64BF, -0x64D2,0x64D4,0x64BE,0x6574,0x66C6,0x66C9,0x66B9,0x66C4, -0x66C7,0x66B8,0x6A3D,0x6A38,0x6A3A,0x6A59,0x6A6B,0x6A58, -0x6A39,0x6A44,0x6A62,0x6A61,0x6A4B,0x6A47,0x6A35,0x6A5F, -0x6A48,0x6B59,0x6B77,0x6C05,0x6FC2,0x6FB1,0x6FA1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6FC3,0x6FA4,0x6FC1,0x6FA7,0x6FB3,0x6FC0,0x6FB9,0x6FB6, -0x6FA6,0x6FA0,0x6FB4,0x71BE,0x71C9,0x71D0,0x71D2,0x71C8, -0x71D5,0x71B9,0x71CE,0x71D9,0x71DC,0x71C3,0x71C4,0x7368, -0x749C,0x74A3,0x7498,0x749F,0x749E,0x74E2,0x750C,0x750D, -0x7634,0x7638,0x763A,0x76E7,0x76E5,0x77A0,0x779E,0x779F, -0x77A5,0x78E8,0x78DA,0x78EC,0x78E7,0x79A6,0x7A4D,0x7A4E, -0x7A46,0x7A4C,0x7A4B,0x7ABA,0x7BD9,0x7C11,0x7BC9,0x7BE4, -0x7BDB,0x7BE1,0x7BE9,0x7BE6,0x7CD5,0x7CD6,0x7E0A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7E11,0x7E08,0x7E1B,0x7E23,0x7E1E,0x7E1D,0x7E09, -0x7E10,0x7F79,0x7FB2,0x7FF0,0x7FF1,0x7FEE,0x8028,0x81B3, -0x81A9,0x81A8,0x81FB,0x8208,0x8258,0x8259,0x854A,0x8559, -0x8548,0x8568,0x8569,0x8543,0x8549,0x856D,0x856A,0x855E, -0x8783,0x879F,0x879E,0x87A2,0x878D,0x8861,0x892A,0x8932, -0x8925,0x892B,0x8921,0x89AA,0x89A6,0x8AE6,0x8AFA,0x8AEB, -0x8AF1,0x8B00,0x8ADC,0x8AE7,0x8AEE,0x8AFE,0x8B01,0x8B02, -0x8AF7,0x8AED,0x8AF3,0x8AF6,0x8AFC,0x8C6B,0x8C6D,0x8C93, -0x8CF4,0x8E44,0x8E31,0x8E34,0x8E42,0x8E39,0x8E35,0x8F3B, -0x8F2F,0x8F38,0x8F33,0x8FA8,0x8FA6,0x9075,0x9074,0x9078, -0x9072,0x907C,0x907A,0x9134,0x9192,0x9320,0x9336,0x92F8, -0x9333,0x932F,0x9322,0x92FC,0x932B,0x9304,0x931A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9310,0x9326,0x9321,0x9315,0x932E,0x9319,0x95BB,0x96A7, -0x96A8,0x96AA,0x96D5,0x970E,0x9711,0x9716,0x970D,0x9713, -0x970F,0x975B,0x975C,0x9766,0x9798,0x9830,0x9838,0x983B, -0x9837,0x982D,0x9839,0x9824,0x9910,0x9928,0x991E,0x991B, -0x9921,0x991A,0x99ED,0x99E2,0x99F1,0x9AB8,0x9ABC,0x9AFB, -0x9AED,0x9B28,0x9B91,0x9D15,0x9D23,0x9D26,0x9D28,0x9D12, -0x9D1B,0x9ED8,0x9ED4,0x9F8D,0x9F9C,0x512A,0x511F,0x5121, -0x5132,0x52F5,0x568E,0x5680,0x5690,0x5685,0x5687, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x568F,0x58D5,0x58D3,0x58D1,0x58CE,0x5B30,0x5B2A, -0x5B24,0x5B7A,0x5C37,0x5C68,0x5DBC,0x5DBA,0x5DBD,0x5DB8, -0x5E6B,0x5F4C,0x5FBD,0x61C9,0x61C2,0x61C7,0x61E6,0x61CB, -0x6232,0x6234,0x64CE,0x64CA,0x64D8,0x64E0,0x64F0,0x64E6, -0x64EC,0x64F1,0x64E2,0x64ED,0x6582,0x6583,0x66D9,0x66D6, -0x6A80,0x6A94,0x6A84,0x6AA2,0x6A9C,0x6ADB,0x6AA3,0x6A7E, -0x6A97,0x6A90,0x6AA0,0x6B5C,0x6BAE,0x6BDA,0x6C08,0x6FD8, -0x6FF1,0x6FDF,0x6FE0,0x6FDB,0x6FE4,0x6FEB,0x6FEF,0x6F80, -0x6FEC,0x6FE1,0x6FE9,0x6FD5,0x6FEE,0x6FF0,0x71E7,0x71DF, -0x71EE,0x71E6,0x71E5,0x71ED,0x71EC,0x71F4,0x71E0,0x7235, -0x7246,0x7370,0x7372,0x74A9,0x74B0,0x74A6,0x74A8,0x7646, -0x7642,0x764C,0x76EA,0x77B3,0x77AA,0x77B0,0x77AC, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x77A7,0x77AD,0x77EF,0x78F7,0x78FA,0x78F4,0x78EF,0x7901, -0x79A7,0x79AA,0x7A57,0x7ABF,0x7C07,0x7C0D,0x7BFE,0x7BF7, -0x7C0C,0x7BE0,0x7CE0,0x7CDC,0x7CDE,0x7CE2,0x7CDF,0x7CD9, -0x7CDD,0x7E2E,0x7E3E,0x7E46,0x7E37,0x7E32,0x7E43,0x7E2B, -0x7E3D,0x7E31,0x7E45,0x7E41,0x7E34,0x7E39,0x7E48,0x7E35, -0x7E3F,0x7E2F,0x7F44,0x7FF3,0x7FFC,0x8071,0x8072,0x8070, -0x806F,0x8073,0x81C6,0x81C3,0x81BA,0x81C2,0x81C0,0x81BF, -0x81BD,0x81C9,0x81BE,0x81E8,0x8209,0x8271,0x85AA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8584,0x857E,0x859C,0x8591,0x8594,0x85AF,0x859B, -0x8587,0x85A8,0x858A,0x8667,0x87C0,0x87D1,0x87B3,0x87D2, -0x87C6,0x87AB,0x87BB,0x87BA,0x87C8,0x87CB,0x893B,0x8936, -0x8944,0x8938,0x893D,0x89AC,0x8B0E,0x8B17,0x8B19,0x8B1B, -0x8B0A,0x8B20,0x8B1D,0x8B04,0x8B10,0x8C41,0x8C3F,0x8C73, -0x8CFA,0x8CFD,0x8CFC,0x8CF8,0x8CFB,0x8DA8,0x8E49,0x8E4B, -0x8E48,0x8E4A,0x8F44,0x8F3E,0x8F42,0x8F45,0x8F3F,0x907F, -0x907D,0x9084,0x9081,0x9082,0x9080,0x9139,0x91A3,0x919E, -0x919C,0x934D,0x9382,0x9328,0x9375,0x934A,0x9365,0x934B, -0x9318,0x937E,0x936C,0x935B,0x9370,0x935A,0x9354,0x95CA, -0x95CB,0x95CC,0x95C8,0x95C6,0x96B1,0x96B8,0x96D6,0x971C, -0x971E,0x97A0,0x97D3,0x9846,0x98B6,0x9935,0x9A01, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x99FF,0x9BAE,0x9BAB,0x9BAA,0x9BAD,0x9D3B,0x9D3F,0x9E8B, -0x9ECF,0x9EDE,0x9EDC,0x9EDD,0x9EDB,0x9F3E,0x9F4B,0x53E2, -0x5695,0x56AE,0x58D9,0x58D8,0x5B38,0x5F5D,0x61E3,0x6233, -0x64F4,0x64F2,0x64FE,0x6506,0x64FA,0x64FB,0x64F7,0x65B7, -0x66DC,0x6726,0x6AB3,0x6AAC,0x6AC3,0x6ABB,0x6AB8,0x6AC2, -0x6AAE,0x6AAF,0x6B5F,0x6B78,0x6BAF,0x7009,0x700B,0x6FFE, -0x7006,0x6FFA,0x7011,0x700F,0x71FB,0x71FC,0x71FE,0x71F8, -0x7377,0x7375,0x74A7,0x74BF,0x7515,0x7656,0x7658, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7652,0x77BD,0x77BF,0x77BB,0x77BC,0x790E,0x79AE, -0x7A61,0x7A62,0x7A60,0x7AC4,0x7AC5,0x7C2B,0x7C27,0x7C2A, -0x7C1E,0x7C23,0x7C21,0x7CE7,0x7E54,0x7E55,0x7E5E,0x7E5A, -0x7E61,0x7E52,0x7E59,0x7F48,0x7FF9,0x7FFB,0x8077,0x8076, -0x81CD,0x81CF,0x820A,0x85CF,0x85A9,0x85CD,0x85D0,0x85C9, -0x85B0,0x85BA,0x85B9,0x85A6,0x87EF,0x87EC,0x87F2,0x87E0, -0x8986,0x89B2,0x89F4,0x8B28,0x8B39,0x8B2C,0x8B2B,0x8C50, -0x8D05,0x8E59,0x8E63,0x8E66,0x8E64,0x8E5F,0x8E55,0x8EC0, -0x8F49,0x8F4D,0x9087,0x9083,0x9088,0x91AB,0x91AC,0x91D0, -0x9394,0x938A,0x9396,0x93A2,0x93B3,0x93AE,0x93AC,0x93B0, -0x9398,0x939A,0x9397,0x95D4,0x95D6,0x95D0,0x95D5,0x96E2, -0x96DC,0x96D9,0x96DB,0x96DE,0x9724,0x97A3,0x97A6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x97AD,0x97F9,0x984D,0x984F,0x984C,0x984E,0x9853,0x98BA, -0x993E,0x993F,0x993D,0x992E,0x99A5,0x9A0E,0x9AC1,0x9B03, -0x9B06,0x9B4F,0x9B4E,0x9B4D,0x9BCA,0x9BC9,0x9BFD,0x9BC8, -0x9BC0,0x9D51,0x9D5D,0x9D60,0x9EE0,0x9F15,0x9F2C,0x5133, -0x56A5,0x58DE,0x58DF,0x58E2,0x5BF5,0x9F90,0x5EEC,0x61F2, -0x61F7,0x61F6,0x61F5,0x6500,0x650F,0x66E0,0x66DD,0x6AE5, -0x6ADD,0x6ADA,0x6AD3,0x701B,0x701F,0x7028,0x701A,0x701D, -0x7015,0x7018,0x7206,0x720D,0x7258,0x72A2,0x7378, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x737A,0x74BD,0x74CA,0x74E3,0x7587,0x7586,0x765F, -0x7661,0x77C7,0x7919,0x79B1,0x7A6B,0x7A69,0x7C3E,0x7C3F, -0x7C38,0x7C3D,0x7C37,0x7C40,0x7E6B,0x7E6D,0x7E79,0x7E69, -0x7E6A,0x7F85,0x7E73,0x7FB6,0x7FB9,0x7FB8,0x81D8,0x85E9, -0x85DD,0x85EA,0x85D5,0x85E4,0x85E5,0x85F7,0x87FB,0x8805, -0x880D,0x87F9,0x87FE,0x8960,0x895F,0x8956,0x895E,0x8B41, -0x8B5C,0x8B58,0x8B49,0x8B5A,0x8B4E,0x8B4F,0x8B46,0x8B59, -0x8D08,0x8D0A,0x8E7C,0x8E72,0x8E87,0x8E76,0x8E6C,0x8E7A, -0x8E74,0x8F54,0x8F4E,0x8FAD,0x908A,0x908B,0x91B1,0x91AE, -0x93E1,0x93D1,0x93DF,0x93C3,0x93C8,0x93DC,0x93DD,0x93D6, -0x93E2,0x93CD,0x93D8,0x93E4,0x93D7,0x93E8,0x95DC,0x96B4, -0x96E3,0x972A,0x9727,0x9761,0x97DC,0x97FB,0x985E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9858,0x985B,0x98BC,0x9945,0x9949,0x9A16,0x9A19,0x9B0D, -0x9BE8,0x9BE7,0x9BD6,0x9BDB,0x9D89,0x9D61,0x9D72,0x9D6A, -0x9D6C,0x9E92,0x9E97,0x9E93,0x9EB4,0x52F8,0x56A8,0x56B7, -0x56B6,0x56B4,0x56BC,0x58E4,0x5B40,0x5B43,0x5B7D,0x5BF6, -0x5DC9,0x61F8,0x61FA,0x6518,0x6514,0x6519,0x66E6,0x6727, -0x6AEC,0x703E,0x7030,0x7032,0x7210,0x737B,0x74CF,0x7662, -0x7665,0x7926,0x792A,0x792C,0x792B,0x7AC7,0x7AF6,0x7C4C, -0x7C43,0x7C4D,0x7CEF,0x7CF0,0x8FAE,0x7E7D,0x7E7C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7E82,0x7F4C,0x8000,0x81DA,0x8266,0x85FB,0x85F9, -0x8611,0x85FA,0x8606,0x860B,0x8607,0x860A,0x8814,0x8815, -0x8964,0x89BA,0x89F8,0x8B70,0x8B6C,0x8B66,0x8B6F,0x8B5F, -0x8B6B,0x8D0F,0x8D0D,0x8E89,0x8E81,0x8E85,0x8E82,0x91B4, -0x91CB,0x9418,0x9403,0x93FD,0x95E1,0x9730,0x98C4,0x9952, -0x9951,0x99A8,0x9A2B,0x9A30,0x9A37,0x9A35,0x9C13,0x9C0D, -0x9E79,0x9EB5,0x9EE8,0x9F2F,0x9F5F,0x9F63,0x9F61,0x5137, -0x5138,0x56C1,0x56C0,0x56C2,0x5914,0x5C6C,0x5DCD,0x61FC, -0x61FE,0x651D,0x651C,0x6595,0x66E9,0x6AFB,0x6B04,0x6AFA, -0x6BB2,0x704C,0x721B,0x72A7,0x74D6,0x74D4,0x7669,0x77D3, -0x7C50,0x7E8F,0x7E8C,0x7FBC,0x8617,0x862D,0x861A,0x8823, -0x8822,0x8821,0x881F,0x896A,0x896C,0x89BD,0x8B74, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8B77,0x8B7D,0x8D13,0x8E8A,0x8E8D,0x8E8B,0x8F5F,0x8FAF, -0x91BA,0x942E,0x9433,0x9435,0x943A,0x9438,0x9432,0x942B, -0x95E2,0x9738,0x9739,0x9732,0x97FF,0x9867,0x9865,0x9957, -0x9A45,0x9A43,0x9A40,0x9A3E,0x9ACF,0x9B54,0x9B51,0x9C2D, -0x9C25,0x9DAF,0x9DB4,0x9DC2,0x9DB8,0x9E9D,0x9EEF,0x9F19, -0x9F5C,0x9F66,0x9F67,0x513C,0x513B,0x56C8,0x56CA,0x56C9, -0x5B7F,0x5DD4,0x5DD2,0x5F4E,0x61FF,0x6524,0x6B0A,0x6B61, -0x7051,0x7058,0x7380,0x74E4,0x758A,0x766E,0x766C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x79B3,0x7C60,0x7C5F,0x807E,0x807D,0x81DF,0x8972, -0x896F,0x89FC,0x8B80,0x8D16,0x8D17,0x8E91,0x8E93,0x8F61, -0x9148,0x9444,0x9451,0x9452,0x973D,0x973E,0x97C3,0x97C1, -0x986B,0x9955,0x9A55,0x9A4D,0x9AD2,0x9B1A,0x9C49,0x9C31, -0x9C3E,0x9C3B,0x9DD3,0x9DD7,0x9F34,0x9F6C,0x9F6A,0x9F94, -0x56CC,0x5DD6,0x6200,0x6523,0x652B,0x652A,0x66EC,0x6B10, -0x74DA,0x7ACA,0x7C64,0x7C63,0x7C65,0x7E93,0x7E96,0x7E94, -0x81E2,0x8638,0x863F,0x8831,0x8B8A,0x9090,0x908F,0x9463, -0x9460,0x9464,0x9768,0x986F,0x995C,0x9A5A,0x9A5B,0x9A57, -0x9AD3,0x9AD4,0x9AD1,0x9C54,0x9C57,0x9C56,0x9DE5,0x9E9F, -0x9EF4,0x56D1,0x58E9,0x652C,0x705E,0x7671,0x7672,0x77D7, -0x7F50,0x7F88,0x8836,0x8839,0x8862,0x8B93,0x8B92, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8B96,0x8277,0x8D1B,0x91C0,0x946A,0x9742,0x9748,0x9744, -0x97C6,0x9870,0x9A5F,0x9B22,0x9B58,0x9C5F,0x9DF9,0x9DFA, -0x9E7C,0x9E7D,0x9F07,0x9F77,0x9F72,0x5EF3,0x6B16,0x7063, -0x7C6C,0x7C6E,0x883B,0x89C0,0x8EA1,0x91C1,0x9472,0x9470, -0x9871,0x995E,0x9AD6,0x9B23,0x9ECC,0x7064,0x77DA,0x8B9A, -0x9477,0x97C9,0x9A62,0x9A65,0x7E9C,0x8B9C,0x8EAA,0x91C5, -0x947D,0x947E,0x947C,0x9C77,0x9C78,0x9EF7,0x8C54,0x947F, -0x9E1A,0x7228,0x9A6A,0x9B31,0x9E1B,0x9E1E,0x7C72, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x30FE,0x309D,0x309E,0x3005,0x3041,0x3042,0x3043, -0x3044,0x3045,0x3046,0x3047,0x3048,0x3049,0x304A,0x304B, -0x304C,0x304D,0x304E,0x304F,0x3050,0x3051,0x3052,0x3053, -0x3054,0x3055,0x3056,0x3057,0x3058,0x3059,0x305A,0x305B, -0x305C,0x305D,0x305E,0x305F,0x3060,0x3061,0x3062,0x3063, -0x3064,0x3065,0x3066,0x3067,0x3068,0x3069,0x306A,0x306B, -0x306C,0x306D,0x306E,0x306F,0x3070,0x3071,0x3072,0x3073, -0x3074,0x3075,0x3076,0x3077,0x3078,0x3079,0x307A,0x307B, -0x307C,0x307D,0x307E,0x307F,0x3080,0x3081,0x3082,0x3083, -0x3084,0x3085,0x3086,0x3087,0x3088,0x3089,0x308A,0x308B, -0x308C,0x308D,0x308E,0x308F,0x3090,0x3091,0x3092,0x3093, -0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x30A8,0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF, -0x30B0,0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7, -0x30B8,0x30B9,0x30BA,0x30BB,0x30BC,0x30BD,0x30BE,0x30BF, -0x30C0,0x30C1,0x30C2,0x30C3,0x30C4,0x30C5,0x30C6,0x30C7, -0x30C8,0x30C9,0x30CA,0x30CB,0x30CC,0x30CD,0x30CE,0x30CF, -0x30D0,0x30D1,0x30D2,0x30D3,0x30D4,0x30D5,0x30D6,0x30D7, -0x30D8,0x30D9,0x30DA,0x30DB,0x30DC,0x30DD,0x30DE,0x30DF, -0x30E0,0x30E1,0x30E2,0x30E3,0x30E4,0x30E5,0x30E6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x30E7,0x30E8,0x30E9,0x30EA,0x30EB,0x30EC,0x30ED, -0x30EE,0x30EF,0x30F0,0x30F1,0x30F2,0x30F3,0x30F4,0x30F5, -0x30F6,0x0414,0x0415,0x0401,0x0416,0x0417,0x0418,0x0419, -0x041A,0x041B,0x041C,0x0423,0x0424,0x0425,0x0426,0x0427, -0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451,0x0436, -0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, -0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446, -0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, -0x044F,0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466, -0x2467,0x2468,0x2469,0x2474,0x2475,0x2476,0x2477,0x2478, -0x2479,0x247A,0x247B,0x247C,0x247D}; - -/* page 1 0xC940-0xF9DC */ -static uint16 tab_big5_uni1[]={ -0x4E42,0x4E5C,0x51F5,0x531A,0x5382,0x4E07,0x4E0C,0x4E47, -0x4E8D,0x56D7,0xFA0C,0x5C6E,0x5F73,0x4E0F,0x5187,0x4E0E, -0x4E2E,0x4E93,0x4EC2,0x4EC9,0x4EC8,0x5198,0x52FC,0x536C, -0x53B9,0x5720,0x5903,0x592C,0x5C10,0x5DFF,0x65E1,0x6BB3, -0x6BCC,0x6C14,0x723F,0x4E31,0x4E3C,0x4EE8,0x4EDC,0x4EE9, -0x4EE1,0x4EDD,0x4EDA,0x520C,0x531C,0x534C,0x5722,0x5723, -0x5917,0x592F,0x5B81,0x5B84,0x5C12,0x5C3B,0x5C74,0x5C73, -0x5E04,0x5E80,0x5E82,0x5FC9,0x6209,0x6250,0x6C15, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6C36,0x6C43,0x6C3F,0x6C3B,0x72AE,0x72B0,0x738A, -0x79B8,0x808A,0x961E,0x4F0E,0x4F18,0x4F2C,0x4EF5,0x4F14, -0x4EF1,0x4F00,0x4EF7,0x4F08,0x4F1D,0x4F02,0x4F05,0x4F22, -0x4F13,0x4F04,0x4EF4,0x4F12,0x51B1,0x5213,0x5209,0x5210, -0x52A6,0x5322,0x531F,0x534D,0x538A,0x5407,0x56E1,0x56DF, -0x572E,0x572A,0x5734,0x593C,0x5980,0x597C,0x5985,0x597B, -0x597E,0x5977,0x597F,0x5B56,0x5C15,0x5C25,0x5C7C,0x5C7A, -0x5C7B,0x5C7E,0x5DDF,0x5E75,0x5E84,0x5F02,0x5F1A,0x5F74, -0x5FD5,0x5FD4,0x5FCF,0x625C,0x625E,0x6264,0x6261,0x6266, -0x6262,0x6259,0x6260,0x625A,0x6265,0x65EF,0x65EE,0x673E, -0x6739,0x6738,0x673B,0x673A,0x673F,0x673C,0x6733,0x6C18, -0x6C46,0x6C52,0x6C5C,0x6C4F,0x6C4A,0x6C54,0x6C4B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6C4C,0x7071,0x725E,0x72B4,0x72B5,0x738E,0x752A,0x767F, -0x7A75,0x7F51,0x8278,0x827C,0x8280,0x827D,0x827F,0x864D, -0x897E,0x9099,0x9097,0x9098,0x909B,0x9094,0x9622,0x9624, -0x9620,0x9623,0x4F56,0x4F3B,0x4F62,0x4F49,0x4F53,0x4F64, -0x4F3E,0x4F67,0x4F52,0x4F5F,0x4F41,0x4F58,0x4F2D,0x4F33, -0x4F3F,0x4F61,0x518F,0x51B9,0x521C,0x521E,0x5221,0x52AD, -0x52AE,0x5309,0x5363,0x5372,0x538E,0x538F,0x5430,0x5437, -0x542A,0x5454,0x5445,0x5419,0x541C,0x5425,0x5418, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x543D,0x544F,0x5441,0x5428,0x5424,0x5447,0x56EE, -0x56E7,0x56E5,0x5741,0x5745,0x574C,0x5749,0x574B,0x5752, -0x5906,0x5940,0x59A6,0x5998,0x59A0,0x5997,0x598E,0x59A2, -0x5990,0x598F,0x59A7,0x59A1,0x5B8E,0x5B92,0x5C28,0x5C2A, -0x5C8D,0x5C8F,0x5C88,0x5C8B,0x5C89,0x5C92,0x5C8A,0x5C86, -0x5C93,0x5C95,0x5DE0,0x5E0A,0x5E0E,0x5E8B,0x5E89,0x5E8C, -0x5E88,0x5E8D,0x5F05,0x5F1D,0x5F78,0x5F76,0x5FD2,0x5FD1, -0x5FD0,0x5FED,0x5FE8,0x5FEE,0x5FF3,0x5FE1,0x5FE4,0x5FE3, -0x5FFA,0x5FEF,0x5FF7,0x5FFB,0x6000,0x5FF4,0x623A,0x6283, -0x628C,0x628E,0x628F,0x6294,0x6287,0x6271,0x627B,0x627A, -0x6270,0x6281,0x6288,0x6277,0x627D,0x6272,0x6274,0x6537, -0x65F0,0x65F4,0x65F3,0x65F2,0x65F5,0x6745,0x6747, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6759,0x6755,0x674C,0x6748,0x675D,0x674D,0x675A,0x674B, -0x6BD0,0x6C19,0x6C1A,0x6C78,0x6C67,0x6C6B,0x6C84,0x6C8B, -0x6C8F,0x6C71,0x6C6F,0x6C69,0x6C9A,0x6C6D,0x6C87,0x6C95, -0x6C9C,0x6C66,0x6C73,0x6C65,0x6C7B,0x6C8E,0x7074,0x707A, -0x7263,0x72BF,0x72BD,0x72C3,0x72C6,0x72C1,0x72BA,0x72C5, -0x7395,0x7397,0x7393,0x7394,0x7392,0x753A,0x7539,0x7594, -0x7595,0x7681,0x793D,0x8034,0x8095,0x8099,0x8090,0x8092, -0x809C,0x8290,0x828F,0x8285,0x828E,0x8291,0x8293, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x828A,0x8283,0x8284,0x8C78,0x8FC9,0x8FBF,0x909F, -0x90A1,0x90A5,0x909E,0x90A7,0x90A0,0x9630,0x9628,0x962F, -0x962D,0x4E33,0x4F98,0x4F7C,0x4F85,0x4F7D,0x4F80,0x4F87, -0x4F76,0x4F74,0x4F89,0x4F84,0x4F77,0x4F4C,0x4F97,0x4F6A, -0x4F9A,0x4F79,0x4F81,0x4F78,0x4F90,0x4F9C,0x4F94,0x4F9E, -0x4F92,0x4F82,0x4F95,0x4F6B,0x4F6E,0x519E,0x51BC,0x51BE, -0x5235,0x5232,0x5233,0x5246,0x5231,0x52BC,0x530A,0x530B, -0x533C,0x5392,0x5394,0x5487,0x547F,0x5481,0x5491,0x5482, -0x5488,0x546B,0x547A,0x547E,0x5465,0x546C,0x5474,0x5466, -0x548D,0x546F,0x5461,0x5460,0x5498,0x5463,0x5467,0x5464, -0x56F7,0x56F9,0x576F,0x5772,0x576D,0x576B,0x5771,0x5770, -0x5776,0x5780,0x5775,0x577B,0x5773,0x5774,0x5762, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5768,0x577D,0x590C,0x5945,0x59B5,0x59BA,0x59CF,0x59CE, -0x59B2,0x59CC,0x59C1,0x59B6,0x59BC,0x59C3,0x59D6,0x59B1, -0x59BD,0x59C0,0x59C8,0x59B4,0x59C7,0x5B62,0x5B65,0x5B93, -0x5B95,0x5C44,0x5C47,0x5CAE,0x5CA4,0x5CA0,0x5CB5,0x5CAF, -0x5CA8,0x5CAC,0x5C9F,0x5CA3,0x5CAD,0x5CA2,0x5CAA,0x5CA7, -0x5C9D,0x5CA5,0x5CB6,0x5CB0,0x5CA6,0x5E17,0x5E14,0x5E19, -0x5F28,0x5F22,0x5F23,0x5F24,0x5F54,0x5F82,0x5F7E,0x5F7D, -0x5FDE,0x5FE5,0x602D,0x6026,0x6019,0x6032,0x600B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6034,0x600A,0x6017,0x6033,0x601A,0x601E,0x602C, -0x6022,0x600D,0x6010,0x602E,0x6013,0x6011,0x600C,0x6009, -0x601C,0x6214,0x623D,0x62AD,0x62B4,0x62D1,0x62BE,0x62AA, -0x62B6,0x62CA,0x62AE,0x62B3,0x62AF,0x62BB,0x62A9,0x62B0, -0x62B8,0x653D,0x65A8,0x65BB,0x6609,0x65FC,0x6604,0x6612, -0x6608,0x65FB,0x6603,0x660B,0x660D,0x6605,0x65FD,0x6611, -0x6610,0x66F6,0x670A,0x6785,0x676C,0x678E,0x6792,0x6776, -0x677B,0x6798,0x6786,0x6784,0x6774,0x678D,0x678C,0x677A, -0x679F,0x6791,0x6799,0x6783,0x677D,0x6781,0x6778,0x6779, -0x6794,0x6B25,0x6B80,0x6B7E,0x6BDE,0x6C1D,0x6C93,0x6CEC, -0x6CEB,0x6CEE,0x6CD9,0x6CB6,0x6CD4,0x6CAD,0x6CE7,0x6CB7, -0x6CD0,0x6CC2,0x6CBA,0x6CC3,0x6CC6,0x6CED,0x6CF2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6CD2,0x6CDD,0x6CB4,0x6C8A,0x6C9D,0x6C80,0x6CDE,0x6CC0, -0x6D30,0x6CCD,0x6CC7,0x6CB0,0x6CF9,0x6CCF,0x6CE9,0x6CD1, -0x7094,0x7098,0x7085,0x7093,0x7086,0x7084,0x7091,0x7096, -0x7082,0x709A,0x7083,0x726A,0x72D6,0x72CB,0x72D8,0x72C9, -0x72DC,0x72D2,0x72D4,0x72DA,0x72CC,0x72D1,0x73A4,0x73A1, -0x73AD,0x73A6,0x73A2,0x73A0,0x73AC,0x739D,0x74DD,0x74E8, -0x753F,0x7540,0x753E,0x758C,0x7598,0x76AF,0x76F3,0x76F1, -0x76F0,0x76F5,0x77F8,0x77FC,0x77F9,0x77FB,0x77FA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x77F7,0x7942,0x793F,0x79C5,0x7A78,0x7A7B,0x7AFB, -0x7C75,0x7CFD,0x8035,0x808F,0x80AE,0x80A3,0x80B8,0x80B5, -0x80AD,0x8220,0x82A0,0x82C0,0x82AB,0x829A,0x8298,0x829B, -0x82B5,0x82A7,0x82AE,0x82BC,0x829E,0x82BA,0x82B4,0x82A8, -0x82A1,0x82A9,0x82C2,0x82A4,0x82C3,0x82B6,0x82A2,0x8670, -0x866F,0x866D,0x866E,0x8C56,0x8FD2,0x8FCB,0x8FD3,0x8FCD, -0x8FD6,0x8FD5,0x8FD7,0x90B2,0x90B4,0x90AF,0x90B3,0x90B0, -0x9639,0x963D,0x963C,0x963A,0x9643,0x4FCD,0x4FC5,0x4FD3, -0x4FB2,0x4FC9,0x4FCB,0x4FC1,0x4FD4,0x4FDC,0x4FD9,0x4FBB, -0x4FB3,0x4FDB,0x4FC7,0x4FD6,0x4FBA,0x4FC0,0x4FB9,0x4FEC, -0x5244,0x5249,0x52C0,0x52C2,0x533D,0x537C,0x5397,0x5396, -0x5399,0x5398,0x54BA,0x54A1,0x54AD,0x54A5,0x54CF, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x54C3,0x830D,0x54B7,0x54AE,0x54D6,0x54B6,0x54C5,0x54C6, -0x54A0,0x5470,0x54BC,0x54A2,0x54BE,0x5472,0x54DE,0x54B0, -0x57B5,0x579E,0x579F,0x57A4,0x578C,0x5797,0x579D,0x579B, -0x5794,0x5798,0x578F,0x5799,0x57A5,0x579A,0x5795,0x58F4, -0x590D,0x5953,0x59E1,0x59DE,0x59EE,0x5A00,0x59F1,0x59DD, -0x59FA,0x59FD,0x59FC,0x59F6,0x59E4,0x59F2,0x59F7,0x59DB, -0x59E9,0x59F3,0x59F5,0x59E0,0x59FE,0x59F4,0x59ED,0x5BA8, -0x5C4C,0x5CD0,0x5CD8,0x5CCC,0x5CD7,0x5CCB,0x5CDB, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5CDE,0x5CDA,0x5CC9,0x5CC7,0x5CCA,0x5CD6,0x5CD3, -0x5CD4,0x5CCF,0x5CC8,0x5CC6,0x5CCE,0x5CDF,0x5CF8,0x5DF9, -0x5E21,0x5E22,0x5E23,0x5E20,0x5E24,0x5EB0,0x5EA4,0x5EA2, -0x5E9B,0x5EA3,0x5EA5,0x5F07,0x5F2E,0x5F56,0x5F86,0x6037, -0x6039,0x6054,0x6072,0x605E,0x6045,0x6053,0x6047,0x6049, -0x605B,0x604C,0x6040,0x6042,0x605F,0x6024,0x6044,0x6058, -0x6066,0x606E,0x6242,0x6243,0x62CF,0x630D,0x630B,0x62F5, -0x630E,0x6303,0x62EB,0x62F9,0x630F,0x630C,0x62F8,0x62F6, -0x6300,0x6313,0x6314,0x62FA,0x6315,0x62FB,0x62F0,0x6541, -0x6543,0x65AA,0x65BF,0x6636,0x6621,0x6632,0x6635,0x661C, -0x6626,0x6622,0x6633,0x662B,0x663A,0x661D,0x6634,0x6639, -0x662E,0x670F,0x6710,0x67C1,0x67F2,0x67C8,0x67BA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x67DC,0x67BB,0x67F8,0x67D8,0x67C0,0x67B7,0x67C5,0x67EB, -0x67E4,0x67DF,0x67B5,0x67CD,0x67B3,0x67F7,0x67F6,0x67EE, -0x67E3,0x67C2,0x67B9,0x67CE,0x67E7,0x67F0,0x67B2,0x67FC, -0x67C6,0x67ED,0x67CC,0x67AE,0x67E6,0x67DB,0x67FA,0x67C9, -0x67CA,0x67C3,0x67EA,0x67CB,0x6B28,0x6B82,0x6B84,0x6BB6, -0x6BD6,0x6BD8,0x6BE0,0x6C20,0x6C21,0x6D28,0x6D34,0x6D2D, -0x6D1F,0x6D3C,0x6D3F,0x6D12,0x6D0A,0x6CDA,0x6D33,0x6D04, -0x6D19,0x6D3A,0x6D1A,0x6D11,0x6D00,0x6D1D,0x6D42, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6D01,0x6D18,0x6D37,0x6D03,0x6D0F,0x6D40,0x6D07, -0x6D20,0x6D2C,0x6D08,0x6D22,0x6D09,0x6D10,0x70B7,0x709F, -0x70BE,0x70B1,0x70B0,0x70A1,0x70B4,0x70B5,0x70A9,0x7241, -0x7249,0x724A,0x726C,0x7270,0x7273,0x726E,0x72CA,0x72E4, -0x72E8,0x72EB,0x72DF,0x72EA,0x72E6,0x72E3,0x7385,0x73CC, -0x73C2,0x73C8,0x73C5,0x73B9,0x73B6,0x73B5,0x73B4,0x73EB, -0x73BF,0x73C7,0x73BE,0x73C3,0x73C6,0x73B8,0x73CB,0x74EC, -0x74EE,0x752E,0x7547,0x7548,0x75A7,0x75AA,0x7679,0x76C4, -0x7708,0x7703,0x7704,0x7705,0x770A,0x76F7,0x76FB,0x76FA, -0x77E7,0x77E8,0x7806,0x7811,0x7812,0x7805,0x7810,0x780F, -0x780E,0x7809,0x7803,0x7813,0x794A,0x794C,0x794B,0x7945, -0x7944,0x79D5,0x79CD,0x79CF,0x79D6,0x79CE,0x7A80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7A7E,0x7AD1,0x7B00,0x7B01,0x7C7A,0x7C78,0x7C79,0x7C7F, -0x7C80,0x7C81,0x7D03,0x7D08,0x7D01,0x7F58,0x7F91,0x7F8D, -0x7FBE,0x8007,0x800E,0x800F,0x8014,0x8037,0x80D8,0x80C7, -0x80E0,0x80D1,0x80C8,0x80C2,0x80D0,0x80C5,0x80E3,0x80D9, -0x80DC,0x80CA,0x80D5,0x80C9,0x80CF,0x80D7,0x80E6,0x80CD, -0x81FF,0x8221,0x8294,0x82D9,0x82FE,0x82F9,0x8307,0x82E8, -0x8300,0x82D5,0x833A,0x82EB,0x82D6,0x82F4,0x82EC,0x82E1, -0x82F2,0x82F5,0x830C,0x82FB,0x82F6,0x82F0,0x82EA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x82E4,0x82E0,0x82FA,0x82F3,0x82ED,0x8677,0x8674, -0x867C,0x8673,0x8841,0x884E,0x8867,0x886A,0x8869,0x89D3, -0x8A04,0x8A07,0x8D72,0x8FE3,0x8FE1,0x8FEE,0x8FE0,0x90F1, -0x90BD,0x90BF,0x90D5,0x90C5,0x90BE,0x90C7,0x90CB,0x90C8, -0x91D4,0x91D3,0x9654,0x964F,0x9651,0x9653,0x964A,0x964E, -0x501E,0x5005,0x5007,0x5013,0x5022,0x5030,0x501B,0x4FF5, -0x4FF4,0x5033,0x5037,0x502C,0x4FF6,0x4FF7,0x5017,0x501C, -0x5020,0x5027,0x5035,0x502F,0x5031,0x500E,0x515A,0x5194, -0x5193,0x51CA,0x51C4,0x51C5,0x51C8,0x51CE,0x5261,0x525A, -0x5252,0x525E,0x525F,0x5255,0x5262,0x52CD,0x530E,0x539E, -0x5526,0x54E2,0x5517,0x5512,0x54E7,0x54F3,0x54E4,0x551A, -0x54FF,0x5504,0x5508,0x54EB,0x5511,0x5505,0x54F1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x550A,0x54FB,0x54F7,0x54F8,0x54E0,0x550E,0x5503,0x550B, -0x5701,0x5702,0x57CC,0x5832,0x57D5,0x57D2,0x57BA,0x57C6, -0x57BD,0x57BC,0x57B8,0x57B6,0x57BF,0x57C7,0x57D0,0x57B9, -0x57C1,0x590E,0x594A,0x5A19,0x5A16,0x5A2D,0x5A2E,0x5A15, -0x5A0F,0x5A17,0x5A0A,0x5A1E,0x5A33,0x5B6C,0x5BA7,0x5BAD, -0x5BAC,0x5C03,0x5C56,0x5C54,0x5CEC,0x5CFF,0x5CEE,0x5CF1, -0x5CF7,0x5D00,0x5CF9,0x5E29,0x5E28,0x5EA8,0x5EAE,0x5EAA, -0x5EAC,0x5F33,0x5F30,0x5F67,0x605D,0x605A,0x6067, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6041,0x60A2,0x6088,0x6080,0x6092,0x6081,0x609D, -0x6083,0x6095,0x609B,0x6097,0x6087,0x609C,0x608E,0x6219, -0x6246,0x62F2,0x6310,0x6356,0x632C,0x6344,0x6345,0x6336, -0x6343,0x63E4,0x6339,0x634B,0x634A,0x633C,0x6329,0x6341, -0x6334,0x6358,0x6354,0x6359,0x632D,0x6347,0x6333,0x635A, -0x6351,0x6338,0x6357,0x6340,0x6348,0x654A,0x6546,0x65C6, -0x65C3,0x65C4,0x65C2,0x664A,0x665F,0x6647,0x6651,0x6712, -0x6713,0x681F,0x681A,0x6849,0x6832,0x6833,0x683B,0x684B, -0x684F,0x6816,0x6831,0x681C,0x6835,0x682B,0x682D,0x682F, -0x684E,0x6844,0x6834,0x681D,0x6812,0x6814,0x6826,0x6828, -0x682E,0x684D,0x683A,0x6825,0x6820,0x6B2C,0x6B2F,0x6B2D, -0x6B31,0x6B34,0x6B6D,0x8082,0x6B88,0x6BE6,0x6BE4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6BE8,0x6BE3,0x6BE2,0x6BE7,0x6C25,0x6D7A,0x6D63,0x6D64, -0x6D76,0x6D0D,0x6D61,0x6D92,0x6D58,0x6D62,0x6D6D,0x6D6F, -0x6D91,0x6D8D,0x6DEF,0x6D7F,0x6D86,0x6D5E,0x6D67,0x6D60, -0x6D97,0x6D70,0x6D7C,0x6D5F,0x6D82,0x6D98,0x6D2F,0x6D68, -0x6D8B,0x6D7E,0x6D80,0x6D84,0x6D16,0x6D83,0x6D7B,0x6D7D, -0x6D75,0x6D90,0x70DC,0x70D3,0x70D1,0x70DD,0x70CB,0x7F39, -0x70E2,0x70D7,0x70D2,0x70DE,0x70E0,0x70D4,0x70CD,0x70C5, -0x70C6,0x70C7,0x70DA,0x70CE,0x70E1,0x7242,0x7278, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7277,0x7276,0x7300,0x72FA,0x72F4,0x72FE,0x72F6, -0x72F3,0x72FB,0x7301,0x73D3,0x73D9,0x73E5,0x73D6,0x73BC, -0x73E7,0x73E3,0x73E9,0x73DC,0x73D2,0x73DB,0x73D4,0x73DD, -0x73DA,0x73D7,0x73D8,0x73E8,0x74DE,0x74DF,0x74F4,0x74F5, -0x7521,0x755B,0x755F,0x75B0,0x75C1,0x75BB,0x75C4,0x75C0, -0x75BF,0x75B6,0x75BA,0x768A,0x76C9,0x771D,0x771B,0x7710, -0x7713,0x7712,0x7723,0x7711,0x7715,0x7719,0x771A,0x7722, -0x7727,0x7823,0x782C,0x7822,0x7835,0x782F,0x7828,0x782E, -0x782B,0x7821,0x7829,0x7833,0x782A,0x7831,0x7954,0x795B, -0x794F,0x795C,0x7953,0x7952,0x7951,0x79EB,0x79EC,0x79E0, -0x79EE,0x79ED,0x79EA,0x79DC,0x79DE,0x79DD,0x7A86,0x7A89, -0x7A85,0x7A8B,0x7A8C,0x7A8A,0x7A87,0x7AD8,0x7B10, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7B04,0x7B13,0x7B05,0x7B0F,0x7B08,0x7B0A,0x7B0E,0x7B09, -0x7B12,0x7C84,0x7C91,0x7C8A,0x7C8C,0x7C88,0x7C8D,0x7C85, -0x7D1E,0x7D1D,0x7D11,0x7D0E,0x7D18,0x7D16,0x7D13,0x7D1F, -0x7D12,0x7D0F,0x7D0C,0x7F5C,0x7F61,0x7F5E,0x7F60,0x7F5D, -0x7F5B,0x7F96,0x7F92,0x7FC3,0x7FC2,0x7FC0,0x8016,0x803E, -0x8039,0x80FA,0x80F2,0x80F9,0x80F5,0x8101,0x80FB,0x8100, -0x8201,0x822F,0x8225,0x8333,0x832D,0x8344,0x8319,0x8351, -0x8325,0x8356,0x833F,0x8341,0x8326,0x831C,0x8322, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8342,0x834E,0x831B,0x832A,0x8308,0x833C,0x834D, -0x8316,0x8324,0x8320,0x8337,0x832F,0x8329,0x8347,0x8345, -0x834C,0x8353,0x831E,0x832C,0x834B,0x8327,0x8348,0x8653, -0x8652,0x86A2,0x86A8,0x8696,0x868D,0x8691,0x869E,0x8687, -0x8697,0x8686,0x868B,0x869A,0x8685,0x86A5,0x8699,0x86A1, -0x86A7,0x8695,0x8698,0x868E,0x869D,0x8690,0x8694,0x8843, -0x8844,0x886D,0x8875,0x8876,0x8872,0x8880,0x8871,0x887F, -0x886F,0x8883,0x887E,0x8874,0x887C,0x8A12,0x8C47,0x8C57, -0x8C7B,0x8CA4,0x8CA3,0x8D76,0x8D78,0x8DB5,0x8DB7,0x8DB6, -0x8ED1,0x8ED3,0x8FFE,0x8FF5,0x9002,0x8FFF,0x8FFB,0x9004, -0x8FFC,0x8FF6,0x90D6,0x90E0,0x90D9,0x90DA,0x90E3,0x90DF, -0x90E5,0x90D8,0x90DB,0x90D7,0x90DC,0x90E4,0x9150, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x914E,0x914F,0x91D5,0x91E2,0x91DA,0x965C,0x965F,0x96BC, -0x98E3,0x9ADF,0x9B2F,0x4E7F,0x5070,0x506A,0x5061,0x505E, -0x5060,0x5053,0x504B,0x505D,0x5072,0x5048,0x504D,0x5041, -0x505B,0x504A,0x5062,0x5015,0x5045,0x505F,0x5069,0x506B, -0x5063,0x5064,0x5046,0x5040,0x506E,0x5073,0x5057,0x5051, -0x51D0,0x526B,0x526D,0x526C,0x526E,0x52D6,0x52D3,0x532D, -0x539C,0x5575,0x5576,0x553C,0x554D,0x5550,0x5534,0x552A, -0x5551,0x5562,0x5536,0x5535,0x5530,0x5552,0x5545, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x550C,0x5532,0x5565,0x554E,0x5539,0x5548,0x552D, -0x553B,0x5540,0x554B,0x570A,0x5707,0x57FB,0x5814,0x57E2, -0x57F6,0x57DC,0x57F4,0x5800,0x57ED,0x57FD,0x5808,0x57F8, -0x580B,0x57F3,0x57CF,0x5807,0x57EE,0x57E3,0x57F2,0x57E5, -0x57EC,0x57E1,0x580E,0x57FC,0x5810,0x57E7,0x5801,0x580C, -0x57F1,0x57E9,0x57F0,0x580D,0x5804,0x595C,0x5A60,0x5A58, -0x5A55,0x5A67,0x5A5E,0x5A38,0x5A35,0x5A6D,0x5A50,0x5A5F, -0x5A65,0x5A6C,0x5A53,0x5A64,0x5A57,0x5A43,0x5A5D,0x5A52, -0x5A44,0x5A5B,0x5A48,0x5A8E,0x5A3E,0x5A4D,0x5A39,0x5A4C, -0x5A70,0x5A69,0x5A47,0x5A51,0x5A56,0x5A42,0x5A5C,0x5B72, -0x5B6E,0x5BC1,0x5BC0,0x5C59,0x5D1E,0x5D0B,0x5D1D,0x5D1A, -0x5D20,0x5D0C,0x5D28,0x5D0D,0x5D26,0x5D25,0x5D0F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5D30,0x5D12,0x5D23,0x5D1F,0x5D2E,0x5E3E,0x5E34,0x5EB1, -0x5EB4,0x5EB9,0x5EB2,0x5EB3,0x5F36,0x5F38,0x5F9B,0x5F96, -0x5F9F,0x608A,0x6090,0x6086,0x60BE,0x60B0,0x60BA,0x60D3, -0x60D4,0x60CF,0x60E4,0x60D9,0x60DD,0x60C8,0x60B1,0x60DB, -0x60B7,0x60CA,0x60BF,0x60C3,0x60CD,0x60C0,0x6332,0x6365, -0x638A,0x6382,0x637D,0x63BD,0x639E,0x63AD,0x639D,0x6397, -0x63AB,0x638E,0x636F,0x6387,0x6390,0x636E,0x63AF,0x6375, -0x639C,0x636D,0x63AE,0x637C,0x63A4,0x633B,0x639F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6378,0x6385,0x6381,0x6391,0x638D,0x6370,0x6553, -0x65CD,0x6665,0x6661,0x665B,0x6659,0x665C,0x6662,0x6718, -0x6879,0x6887,0x6890,0x689C,0x686D,0x686E,0x68AE,0x68AB, -0x6956,0x686F,0x68A3,0x68AC,0x68A9,0x6875,0x6874,0x68B2, -0x688F,0x6877,0x6892,0x687C,0x686B,0x6872,0x68AA,0x6880, -0x6871,0x687E,0x689B,0x6896,0x688B,0x68A0,0x6889,0x68A4, -0x6878,0x687B,0x6891,0x688C,0x688A,0x687D,0x6B36,0x6B33, -0x6B37,0x6B38,0x6B91,0x6B8F,0x6B8D,0x6B8E,0x6B8C,0x6C2A, -0x6DC0,0x6DAB,0x6DB4,0x6DB3,0x6E74,0x6DAC,0x6DE9,0x6DE2, -0x6DB7,0x6DF6,0x6DD4,0x6E00,0x6DC8,0x6DE0,0x6DDF,0x6DD6, -0x6DBE,0x6DE5,0x6DDC,0x6DDD,0x6DDB,0x6DF4,0x6DCA,0x6DBD, -0x6DED,0x6DF0,0x6DBA,0x6DD5,0x6DC2,0x6DCF,0x6DC9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6DD0,0x6DF2,0x6DD3,0x6DFD,0x6DD7,0x6DCD,0x6DE3,0x6DBB, -0x70FA,0x710D,0x70F7,0x7117,0x70F4,0x710C,0x70F0,0x7104, -0x70F3,0x7110,0x70FC,0x70FF,0x7106,0x7113,0x7100,0x70F8, -0x70F6,0x710B,0x7102,0x710E,0x727E,0x727B,0x727C,0x727F, -0x731D,0x7317,0x7307,0x7311,0x7318,0x730A,0x7308,0x72FF, -0x730F,0x731E,0x7388,0x73F6,0x73F8,0x73F5,0x7404,0x7401, -0x73FD,0x7407,0x7400,0x73FA,0x73FC,0x73FF,0x740C,0x740B, -0x73F4,0x7408,0x7564,0x7563,0x75CE,0x75D2,0x75CF, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x75CB,0x75CC,0x75D1,0x75D0,0x768F,0x7689,0x76D3, -0x7739,0x772F,0x772D,0x7731,0x7732,0x7734,0x7733,0x773D, -0x7725,0x773B,0x7735,0x7848,0x7852,0x7849,0x784D,0x784A, -0x784C,0x7826,0x7845,0x7850,0x7964,0x7967,0x7969,0x796A, -0x7963,0x796B,0x7961,0x79BB,0x79FA,0x79F8,0x79F6,0x79F7, -0x7A8F,0x7A94,0x7A90,0x7B35,0x7B47,0x7B34,0x7B25,0x7B30, -0x7B22,0x7B24,0x7B33,0x7B18,0x7B2A,0x7B1D,0x7B31,0x7B2B, -0x7B2D,0x7B2F,0x7B32,0x7B38,0x7B1A,0x7B23,0x7C94,0x7C98, -0x7C96,0x7CA3,0x7D35,0x7D3D,0x7D38,0x7D36,0x7D3A,0x7D45, -0x7D2C,0x7D29,0x7D41,0x7D47,0x7D3E,0x7D3F,0x7D4A,0x7D3B, -0x7D28,0x7F63,0x7F95,0x7F9C,0x7F9D,0x7F9B,0x7FCA,0x7FCB, -0x7FCD,0x7FD0,0x7FD1,0x7FC7,0x7FCF,0x7FC9,0x801F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x801E,0x801B,0x8047,0x8043,0x8048,0x8118,0x8125,0x8119, -0x811B,0x812D,0x811F,0x812C,0x811E,0x8121,0x8115,0x8127, -0x811D,0x8122,0x8211,0x8238,0x8233,0x823A,0x8234,0x8232, -0x8274,0x8390,0x83A3,0x83A8,0x838D,0x837A,0x8373,0x83A4, -0x8374,0x838F,0x8381,0x8395,0x8399,0x8375,0x8394,0x83A9, -0x837D,0x8383,0x838C,0x839D,0x839B,0x83AA,0x838B,0x837E, -0x83A5,0x83AF,0x8388,0x8397,0x83B0,0x837F,0x83A6,0x8387, -0x83AE,0x8376,0x839A,0x8659,0x8656,0x86BF,0x86B7, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x86C2,0x86C1,0x86C5,0x86BA,0x86B0,0x86C8,0x86B9, -0x86B3,0x86B8,0x86CC,0x86B4,0x86BB,0x86BC,0x86C3,0x86BD, -0x86BE,0x8852,0x8889,0x8895,0x88A8,0x88A2,0x88AA,0x889A, -0x8891,0x88A1,0x889F,0x8898,0x88A7,0x8899,0x889B,0x8897, -0x88A4,0x88AC,0x888C,0x8893,0x888E,0x8982,0x89D6,0x89D9, -0x89D5,0x8A30,0x8A27,0x8A2C,0x8A1E,0x8C39,0x8C3B,0x8C5C, -0x8C5D,0x8C7D,0x8CA5,0x8D7D,0x8D7B,0x8D79,0x8DBC,0x8DC2, -0x8DB9,0x8DBF,0x8DC1,0x8ED8,0x8EDE,0x8EDD,0x8EDC,0x8ED7, -0x8EE0,0x8EE1,0x9024,0x900B,0x9011,0x901C,0x900C,0x9021, -0x90EF,0x90EA,0x90F0,0x90F4,0x90F2,0x90F3,0x90D4,0x90EB, -0x90EC,0x90E9,0x9156,0x9158,0x915A,0x9153,0x9155,0x91EC, -0x91F4,0x91F1,0x91F3,0x91F8,0x91E4,0x91F9,0x91EA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x91EB,0x91F7,0x91E8,0x91EE,0x957A,0x9586,0x9588,0x967C, -0x966D,0x966B,0x9671,0x966F,0x96BF,0x976A,0x9804,0x98E5, -0x9997,0x509B,0x5095,0x5094,0x509E,0x508B,0x50A3,0x5083, -0x508C,0x508E,0x509D,0x5068,0x509C,0x5092,0x5082,0x5087, -0x515F,0x51D4,0x5312,0x5311,0x53A4,0x53A7,0x5591,0x55A8, -0x55A5,0x55AD,0x5577,0x5645,0x55A2,0x5593,0x5588,0x558F, -0x55B5,0x5581,0x55A3,0x5592,0x55A4,0x557D,0x558C,0x55A6, -0x557F,0x5595,0x55A1,0x558E,0x570C,0x5829,0x5837, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5819,0x581E,0x5827,0x5823,0x5828,0x57F5,0x5848, -0x5825,0x581C,0x581B,0x5833,0x583F,0x5836,0x582E,0x5839, -0x5838,0x582D,0x582C,0x583B,0x5961,0x5AAF,0x5A94,0x5A9F, -0x5A7A,0x5AA2,0x5A9E,0x5A78,0x5AA6,0x5A7C,0x5AA5,0x5AAC, -0x5A95,0x5AAE,0x5A37,0x5A84,0x5A8A,0x5A97,0x5A83,0x5A8B, -0x5AA9,0x5A7B,0x5A7D,0x5A8C,0x5A9C,0x5A8F,0x5A93,0x5A9D, -0x5BEA,0x5BCD,0x5BCB,0x5BD4,0x5BD1,0x5BCA,0x5BCE,0x5C0C, -0x5C30,0x5D37,0x5D43,0x5D6B,0x5D41,0x5D4B,0x5D3F,0x5D35, -0x5D51,0x5D4E,0x5D55,0x5D33,0x5D3A,0x5D52,0x5D3D,0x5D31, -0x5D59,0x5D42,0x5D39,0x5D49,0x5D38,0x5D3C,0x5D32,0x5D36, -0x5D40,0x5D45,0x5E44,0x5E41,0x5F58,0x5FA6,0x5FA5,0x5FAB, -0x60C9,0x60B9,0x60CC,0x60E2,0x60CE,0x60C4,0x6114, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x60F2,0x610A,0x6116,0x6105,0x60F5,0x6113,0x60F8,0x60FC, -0x60FE,0x60C1,0x6103,0x6118,0x611D,0x6110,0x60FF,0x6104, -0x610B,0x624A,0x6394,0x63B1,0x63B0,0x63CE,0x63E5,0x63E8, -0x63EF,0x63C3,0x649D,0x63F3,0x63CA,0x63E0,0x63F6,0x63D5, -0x63F2,0x63F5,0x6461,0x63DF,0x63BE,0x63DD,0x63DC,0x63C4, -0x63D8,0x63D3,0x63C2,0x63C7,0x63CC,0x63CB,0x63C8,0x63F0, -0x63D7,0x63D9,0x6532,0x6567,0x656A,0x6564,0x655C,0x6568, -0x6565,0x658C,0x659D,0x659E,0x65AE,0x65D0,0x65D2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x667C,0x666C,0x667B,0x6680,0x6671,0x6679,0x666A, -0x6672,0x6701,0x690C,0x68D3,0x6904,0x68DC,0x692A,0x68EC, -0x68EA,0x68F1,0x690F,0x68D6,0x68F7,0x68EB,0x68E4,0x68F6, -0x6913,0x6910,0x68F3,0x68E1,0x6907,0x68CC,0x6908,0x6970, -0x68B4,0x6911,0x68EF,0x68C6,0x6914,0x68F8,0x68D0,0x68FD, -0x68FC,0x68E8,0x690B,0x690A,0x6917,0x68CE,0x68C8,0x68DD, -0x68DE,0x68E6,0x68F4,0x68D1,0x6906,0x68D4,0x68E9,0x6915, -0x6925,0x68C7,0x6B39,0x6B3B,0x6B3F,0x6B3C,0x6B94,0x6B97, -0x6B99,0x6B95,0x6BBD,0x6BF0,0x6BF2,0x6BF3,0x6C30,0x6DFC, -0x6E46,0x6E47,0x6E1F,0x6E49,0x6E88,0x6E3C,0x6E3D,0x6E45, -0x6E62,0x6E2B,0x6E3F,0x6E41,0x6E5D,0x6E73,0x6E1C,0x6E33, -0x6E4B,0x6E40,0x6E51,0x6E3B,0x6E03,0x6E2E,0x6E5E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6E68,0x6E5C,0x6E61,0x6E31,0x6E28,0x6E60,0x6E71,0x6E6B, -0x6E39,0x6E22,0x6E30,0x6E53,0x6E65,0x6E27,0x6E78,0x6E64, -0x6E77,0x6E55,0x6E79,0x6E52,0x6E66,0x6E35,0x6E36,0x6E5A, -0x7120,0x711E,0x712F,0x70FB,0x712E,0x7131,0x7123,0x7125, -0x7122,0x7132,0x711F,0x7128,0x713A,0x711B,0x724B,0x725A, -0x7288,0x7289,0x7286,0x7285,0x728B,0x7312,0x730B,0x7330, -0x7322,0x7331,0x7333,0x7327,0x7332,0x732D,0x7326,0x7323, -0x7335,0x730C,0x742E,0x742C,0x7430,0x742B,0x7416, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x741A,0x7421,0x742D,0x7431,0x7424,0x7423,0x741D, -0x7429,0x7420,0x7432,0x74FB,0x752F,0x756F,0x756C,0x75E7, -0x75DA,0x75E1,0x75E6,0x75DD,0x75DF,0x75E4,0x75D7,0x7695, -0x7692,0x76DA,0x7746,0x7747,0x7744,0x774D,0x7745,0x774A, -0x774E,0x774B,0x774C,0x77DE,0x77EC,0x7860,0x7864,0x7865, -0x785C,0x786D,0x7871,0x786A,0x786E,0x7870,0x7869,0x7868, -0x785E,0x7862,0x7974,0x7973,0x7972,0x7970,0x7A02,0x7A0A, -0x7A03,0x7A0C,0x7A04,0x7A99,0x7AE6,0x7AE4,0x7B4A,0x7B3B, -0x7B44,0x7B48,0x7B4C,0x7B4E,0x7B40,0x7B58,0x7B45,0x7CA2, -0x7C9E,0x7CA8,0x7CA1,0x7D58,0x7D6F,0x7D63,0x7D53,0x7D56, -0x7D67,0x7D6A,0x7D4F,0x7D6D,0x7D5C,0x7D6B,0x7D52,0x7D54, -0x7D69,0x7D51,0x7D5F,0x7D4E,0x7F3E,0x7F3F,0x7F65, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7F66,0x7FA2,0x7FA0,0x7FA1,0x7FD7,0x8051,0x804F,0x8050, -0x80FE,0x80D4,0x8143,0x814A,0x8152,0x814F,0x8147,0x813D, -0x814D,0x813A,0x81E6,0x81EE,0x81F7,0x81F8,0x81F9,0x8204, -0x823C,0x823D,0x823F,0x8275,0x833B,0x83CF,0x83F9,0x8423, -0x83C0,0x83E8,0x8412,0x83E7,0x83E4,0x83FC,0x83F6,0x8410, -0x83C6,0x83C8,0x83EB,0x83E3,0x83BF,0x8401,0x83DD,0x83E5, -0x83D8,0x83FF,0x83E1,0x83CB,0x83CE,0x83D6,0x83F5,0x83C9, -0x8409,0x840F,0x83DE,0x8411,0x8406,0x83C2,0x83F3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x83D5,0x83FA,0x83C7,0x83D1,0x83EA,0x8413,0x83C3, -0x83EC,0x83EE,0x83C4,0x83FB,0x83D7,0x83E2,0x841B,0x83DB, -0x83FE,0x86D8,0x86E2,0x86E6,0x86D3,0x86E3,0x86DA,0x86EA, -0x86DD,0x86EB,0x86DC,0x86EC,0x86E9,0x86D7,0x86E8,0x86D1, -0x8848,0x8856,0x8855,0x88BA,0x88D7,0x88B9,0x88B8,0x88C0, -0x88BE,0x88B6,0x88BC,0x88B7,0x88BD,0x88B2,0x8901,0x88C9, -0x8995,0x8998,0x8997,0x89DD,0x89DA,0x89DB,0x8A4E,0x8A4D, -0x8A39,0x8A59,0x8A40,0x8A57,0x8A58,0x8A44,0x8A45,0x8A52, -0x8A48,0x8A51,0x8A4A,0x8A4C,0x8A4F,0x8C5F,0x8C81,0x8C80, -0x8CBA,0x8CBE,0x8CB0,0x8CB9,0x8CB5,0x8D84,0x8D80,0x8D89, -0x8DD8,0x8DD3,0x8DCD,0x8DC7,0x8DD6,0x8DDC,0x8DCF,0x8DD5, -0x8DD9,0x8DC8,0x8DD7,0x8DC5,0x8EEF,0x8EF7,0x8EFA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8EF9,0x8EE6,0x8EEE,0x8EE5,0x8EF5,0x8EE7,0x8EE8,0x8EF6, -0x8EEB,0x8EF1,0x8EEC,0x8EF4,0x8EE9,0x902D,0x9034,0x902F, -0x9106,0x912C,0x9104,0x90FF,0x90FC,0x9108,0x90F9,0x90FB, -0x9101,0x9100,0x9107,0x9105,0x9103,0x9161,0x9164,0x915F, -0x9162,0x9160,0x9201,0x920A,0x9225,0x9203,0x921A,0x9226, -0x920F,0x920C,0x9200,0x9212,0x91FF,0x91FD,0x9206,0x9204, -0x9227,0x9202,0x921C,0x9224,0x9219,0x9217,0x9205,0x9216, -0x957B,0x958D,0x958C,0x9590,0x9687,0x967E,0x9688, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9689,0x9683,0x9680,0x96C2,0x96C8,0x96C3,0x96F1, -0x96F0,0x976C,0x9770,0x976E,0x9807,0x98A9,0x98EB,0x9CE6, -0x9EF9,0x4E83,0x4E84,0x4EB6,0x50BD,0x50BF,0x50C6,0x50AE, -0x50C4,0x50CA,0x50B4,0x50C8,0x50C2,0x50B0,0x50C1,0x50BA, -0x50B1,0x50CB,0x50C9,0x50B6,0x50B8,0x51D7,0x527A,0x5278, -0x527B,0x527C,0x55C3,0x55DB,0x55CC,0x55D0,0x55CB,0x55CA, -0x55DD,0x55C0,0x55D4,0x55C4,0x55E9,0x55BF,0x55D2,0x558D, -0x55CF,0x55D5,0x55E2,0x55D6,0x55C8,0x55F2,0x55CD,0x55D9, -0x55C2,0x5714,0x5853,0x5868,0x5864,0x584F,0x584D,0x5849, -0x586F,0x5855,0x584E,0x585D,0x5859,0x5865,0x585B,0x583D, -0x5863,0x5871,0x58FC,0x5AC7,0x5AC4,0x5ACB,0x5ABA,0x5AB8, -0x5AB1,0x5AB5,0x5AB0,0x5ABF,0x5AC8,0x5ABB,0x5AC6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5AB7,0x5AC0,0x5ACA,0x5AB4,0x5AB6,0x5ACD,0x5AB9,0x5A90, -0x5BD6,0x5BD8,0x5BD9,0x5C1F,0x5C33,0x5D71,0x5D63,0x5D4A, -0x5D65,0x5D72,0x5D6C,0x5D5E,0x5D68,0x5D67,0x5D62,0x5DF0, -0x5E4F,0x5E4E,0x5E4A,0x5E4D,0x5E4B,0x5EC5,0x5ECC,0x5EC6, -0x5ECB,0x5EC7,0x5F40,0x5FAF,0x5FAD,0x60F7,0x6149,0x614A, -0x612B,0x6145,0x6136,0x6132,0x612E,0x6146,0x612F,0x614F, -0x6129,0x6140,0x6220,0x9168,0x6223,0x6225,0x6224,0x63C5, -0x63F1,0x63EB,0x6410,0x6412,0x6409,0x6420,0x6424, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6433,0x6443,0x641F,0x6415,0x6418,0x6439,0x6437, -0x6422,0x6423,0x640C,0x6426,0x6430,0x6428,0x6441,0x6435, -0x642F,0x640A,0x641A,0x6440,0x6425,0x6427,0x640B,0x63E7, -0x641B,0x642E,0x6421,0x640E,0x656F,0x6592,0x65D3,0x6686, -0x668C,0x6695,0x6690,0x668B,0x668A,0x6699,0x6694,0x6678, -0x6720,0x6966,0x695F,0x6938,0x694E,0x6962,0x6971,0x693F, -0x6945,0x696A,0x6939,0x6942,0x6957,0x6959,0x697A,0x6948, -0x6949,0x6935,0x696C,0x6933,0x693D,0x6965,0x68F0,0x6978, -0x6934,0x6969,0x6940,0x696F,0x6944,0x6976,0x6958,0x6941, -0x6974,0x694C,0x693B,0x694B,0x6937,0x695C,0x694F,0x6951, -0x6932,0x6952,0x692F,0x697B,0x693C,0x6B46,0x6B45,0x6B43, -0x6B42,0x6B48,0x6B41,0x6B9B,0xFA0D,0x6BFB,0x6BFC, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6BF9,0x6BF7,0x6BF8,0x6E9B,0x6ED6,0x6EC8,0x6E8F,0x6EC0, -0x6E9F,0x6E93,0x6E94,0x6EA0,0x6EB1,0x6EB9,0x6EC6,0x6ED2, -0x6EBD,0x6EC1,0x6E9E,0x6EC9,0x6EB7,0x6EB0,0x6ECD,0x6EA6, -0x6ECF,0x6EB2,0x6EBE,0x6EC3,0x6EDC,0x6ED8,0x6E99,0x6E92, -0x6E8E,0x6E8D,0x6EA4,0x6EA1,0x6EBF,0x6EB3,0x6ED0,0x6ECA, -0x6E97,0x6EAE,0x6EA3,0x7147,0x7154,0x7152,0x7163,0x7160, -0x7141,0x715D,0x7162,0x7172,0x7178,0x716A,0x7161,0x7142, -0x7158,0x7143,0x714B,0x7170,0x715F,0x7150,0x7153, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7144,0x714D,0x715A,0x724F,0x728D,0x728C,0x7291, -0x7290,0x728E,0x733C,0x7342,0x733B,0x733A,0x7340,0x734A, -0x7349,0x7444,0x744A,0x744B,0x7452,0x7451,0x7457,0x7440, -0x744F,0x7450,0x744E,0x7442,0x7446,0x744D,0x7454,0x74E1, -0x74FF,0x74FE,0x74FD,0x751D,0x7579,0x7577,0x6983,0x75EF, -0x760F,0x7603,0x75F7,0x75FE,0x75FC,0x75F9,0x75F8,0x7610, -0x75FB,0x75F6,0x75ED,0x75F5,0x75FD,0x7699,0x76B5,0x76DD, -0x7755,0x775F,0x7760,0x7752,0x7756,0x775A,0x7769,0x7767, -0x7754,0x7759,0x776D,0x77E0,0x7887,0x789A,0x7894,0x788F, -0x7884,0x7895,0x7885,0x7886,0x78A1,0x7883,0x7879,0x7899, -0x7880,0x7896,0x787B,0x797C,0x7982,0x797D,0x7979,0x7A11, -0x7A18,0x7A19,0x7A12,0x7A17,0x7A15,0x7A22,0x7A13, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7A1B,0x7A10,0x7AA3,0x7AA2,0x7A9E,0x7AEB,0x7B66,0x7B64, -0x7B6D,0x7B74,0x7B69,0x7B72,0x7B65,0x7B73,0x7B71,0x7B70, -0x7B61,0x7B78,0x7B76,0x7B63,0x7CB2,0x7CB4,0x7CAF,0x7D88, -0x7D86,0x7D80,0x7D8D,0x7D7F,0x7D85,0x7D7A,0x7D8E,0x7D7B, -0x7D83,0x7D7C,0x7D8C,0x7D94,0x7D84,0x7D7D,0x7D92,0x7F6D, -0x7F6B,0x7F67,0x7F68,0x7F6C,0x7FA6,0x7FA5,0x7FA7,0x7FDB, -0x7FDC,0x8021,0x8164,0x8160,0x8177,0x815C,0x8169,0x815B, -0x8162,0x8172,0x6721,0x815E,0x8176,0x8167,0x816F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8144,0x8161,0x821D,0x8249,0x8244,0x8240,0x8242, -0x8245,0x84F1,0x843F,0x8456,0x8476,0x8479,0x848F,0x848D, -0x8465,0x8451,0x8440,0x8486,0x8467,0x8430,0x844D,0x847D, -0x845A,0x8459,0x8474,0x8473,0x845D,0x8507,0x845E,0x8437, -0x843A,0x8434,0x847A,0x8443,0x8478,0x8432,0x8445,0x8429, -0x83D9,0x844B,0x842F,0x8442,0x842D,0x845F,0x8470,0x8439, -0x844E,0x844C,0x8452,0x846F,0x84C5,0x848E,0x843B,0x8447, -0x8436,0x8433,0x8468,0x847E,0x8444,0x842B,0x8460,0x8454, -0x846E,0x8450,0x870B,0x8704,0x86F7,0x870C,0x86FA,0x86D6, -0x86F5,0x874D,0x86F8,0x870E,0x8709,0x8701,0x86F6,0x870D, -0x8705,0x88D6,0x88CB,0x88CD,0x88CE,0x88DE,0x88DB,0x88DA, -0x88CC,0x88D0,0x8985,0x899B,0x89DF,0x89E5,0x89E4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x89E1,0x89E0,0x89E2,0x89DC,0x89E6,0x8A76,0x8A86,0x8A7F, -0x8A61,0x8A3F,0x8A77,0x8A82,0x8A84,0x8A75,0x8A83,0x8A81, -0x8A74,0x8A7A,0x8C3C,0x8C4B,0x8C4A,0x8C65,0x8C64,0x8C66, -0x8C86,0x8C84,0x8C85,0x8CCC,0x8D68,0x8D69,0x8D91,0x8D8C, -0x8D8E,0x8D8F,0x8D8D,0x8D93,0x8D94,0x8D90,0x8D92,0x8DF0, -0x8DE0,0x8DEC,0x8DF1,0x8DEE,0x8DD0,0x8DE9,0x8DE3,0x8DE2, -0x8DE7,0x8DF2,0x8DEB,0x8DF4,0x8F06,0x8EFF,0x8F01,0x8F00, -0x8F05,0x8F07,0x8F08,0x8F02,0x8F0B,0x9052,0x903F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9044,0x9049,0x903D,0x9110,0x910D,0x910F,0x9111, -0x9116,0x9114,0x910B,0x910E,0x916E,0x916F,0x9248,0x9252, -0x9230,0x923A,0x9266,0x9233,0x9265,0x925E,0x9283,0x922E, -0x924A,0x9246,0x926D,0x926C,0x924F,0x9260,0x9267,0x926F, -0x9236,0x9261,0x9270,0x9231,0x9254,0x9263,0x9250,0x9272, -0x924E,0x9253,0x924C,0x9256,0x9232,0x959F,0x959C,0x959E, -0x959B,0x9692,0x9693,0x9691,0x9697,0x96CE,0x96FA,0x96FD, -0x96F8,0x96F5,0x9773,0x9777,0x9778,0x9772,0x980F,0x980D, -0x980E,0x98AC,0x98F6,0x98F9,0x99AF,0x99B2,0x99B0,0x99B5, -0x9AAD,0x9AAB,0x9B5B,0x9CEA,0x9CED,0x9CE7,0x9E80,0x9EFD, -0x50E6,0x50D4,0x50D7,0x50E8,0x50F3,0x50DB,0x50EA,0x50DD, -0x50E4,0x50D3,0x50EC,0x50F0,0x50EF,0x50E3,0x50E0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x51D8,0x5280,0x5281,0x52E9,0x52EB,0x5330,0x53AC,0x5627, -0x5615,0x560C,0x5612,0x55FC,0x560F,0x561C,0x5601,0x5613, -0x5602,0x55FA,0x561D,0x5604,0x55FF,0x55F9,0x5889,0x587C, -0x5890,0x5898,0x5886,0x5881,0x587F,0x5874,0x588B,0x587A, -0x5887,0x5891,0x588E,0x5876,0x5882,0x5888,0x587B,0x5894, -0x588F,0x58FE,0x596B,0x5ADC,0x5AEE,0x5AE5,0x5AD5,0x5AEA, -0x5ADA,0x5AED,0x5AEB,0x5AF3,0x5AE2,0x5AE0,0x5ADB,0x5AEC, -0x5ADE,0x5ADD,0x5AD9,0x5AE8,0x5ADF,0x5B77,0x5BE0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5BE3,0x5C63,0x5D82,0x5D80,0x5D7D,0x5D86,0x5D7A, -0x5D81,0x5D77,0x5D8A,0x5D89,0x5D88,0x5D7E,0x5D7C,0x5D8D, -0x5D79,0x5D7F,0x5E58,0x5E59,0x5E53,0x5ED8,0x5ED1,0x5ED7, -0x5ECE,0x5EDC,0x5ED5,0x5ED9,0x5ED2,0x5ED4,0x5F44,0x5F43, -0x5F6F,0x5FB6,0x612C,0x6128,0x6141,0x615E,0x6171,0x6173, -0x6152,0x6153,0x6172,0x616C,0x6180,0x6174,0x6154,0x617A, -0x615B,0x6165,0x613B,0x616A,0x6161,0x6156,0x6229,0x6227, -0x622B,0x642B,0x644D,0x645B,0x645D,0x6474,0x6476,0x6472, -0x6473,0x647D,0x6475,0x6466,0x64A6,0x644E,0x6482,0x645E, -0x645C,0x644B,0x6453,0x6460,0x6450,0x647F,0x643F,0x646C, -0x646B,0x6459,0x6465,0x6477,0x6573,0x65A0,0x66A1,0x66A0, -0x669F,0x6705,0x6704,0x6722,0x69B1,0x69B6,0x69C9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x69A0,0x69CE,0x6996,0x69B0,0x69AC,0x69BC,0x6991,0x6999, -0x698E,0x69A7,0x698D,0x69A9,0x69BE,0x69AF,0x69BF,0x69C4, -0x69BD,0x69A4,0x69D4,0x69B9,0x69CA,0x699A,0x69CF,0x69B3, -0x6993,0x69AA,0x69A1,0x699E,0x69D9,0x6997,0x6990,0x69C2, -0x69B5,0x69A5,0x69C6,0x6B4A,0x6B4D,0x6B4B,0x6B9E,0x6B9F, -0x6BA0,0x6BC3,0x6BC4,0x6BFE,0x6ECE,0x6EF5,0x6EF1,0x6F03, -0x6F25,0x6EF8,0x6F37,0x6EFB,0x6F2E,0x6F09,0x6F4E,0x6F19, -0x6F1A,0x6F27,0x6F18,0x6F3B,0x6F12,0x6EED,0x6F0A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6F36,0x6F73,0x6EF9,0x6EEE,0x6F2D,0x6F40,0x6F30, -0x6F3C,0x6F35,0x6EEB,0x6F07,0x6F0E,0x6F43,0x6F05,0x6EFD, -0x6EF6,0x6F39,0x6F1C,0x6EFC,0x6F3A,0x6F1F,0x6F0D,0x6F1E, -0x6F08,0x6F21,0x7187,0x7190,0x7189,0x7180,0x7185,0x7182, -0x718F,0x717B,0x7186,0x7181,0x7197,0x7244,0x7253,0x7297, -0x7295,0x7293,0x7343,0x734D,0x7351,0x734C,0x7462,0x7473, -0x7471,0x7475,0x7472,0x7467,0x746E,0x7500,0x7502,0x7503, -0x757D,0x7590,0x7616,0x7608,0x760C,0x7615,0x7611,0x760A, -0x7614,0x76B8,0x7781,0x777C,0x7785,0x7782,0x776E,0x7780, -0x776F,0x777E,0x7783,0x78B2,0x78AA,0x78B4,0x78AD,0x78A8, -0x787E,0x78AB,0x789E,0x78A5,0x78A0,0x78AC,0x78A2,0x78A4, -0x7998,0x798A,0x798B,0x7996,0x7995,0x7994,0x7993, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7997,0x7988,0x7992,0x7990,0x7A2B,0x7A4A,0x7A30,0x7A2F, -0x7A28,0x7A26,0x7AA8,0x7AAB,0x7AAC,0x7AEE,0x7B88,0x7B9C, -0x7B8A,0x7B91,0x7B90,0x7B96,0x7B8D,0x7B8C,0x7B9B,0x7B8E, -0x7B85,0x7B98,0x5284,0x7B99,0x7BA4,0x7B82,0x7CBB,0x7CBF, -0x7CBC,0x7CBA,0x7DA7,0x7DB7,0x7DC2,0x7DA3,0x7DAA,0x7DC1, -0x7DC0,0x7DC5,0x7D9D,0x7DCE,0x7DC4,0x7DC6,0x7DCB,0x7DCC, -0x7DAF,0x7DB9,0x7D96,0x7DBC,0x7D9F,0x7DA6,0x7DAE,0x7DA9, -0x7DA1,0x7DC9,0x7F73,0x7FE2,0x7FE3,0x7FE5,0x7FDE, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8024,0x805D,0x805C,0x8189,0x8186,0x8183,0x8187, -0x818D,0x818C,0x818B,0x8215,0x8497,0x84A4,0x84A1,0x849F, -0x84BA,0x84CE,0x84C2,0x84AC,0x84AE,0x84AB,0x84B9,0x84B4, -0x84C1,0x84CD,0x84AA,0x849A,0x84B1,0x84D0,0x849D,0x84A7, -0x84BB,0x84A2,0x8494,0x84C7,0x84CC,0x849B,0x84A9,0x84AF, -0x84A8,0x84D6,0x8498,0x84B6,0x84CF,0x84A0,0x84D7,0x84D4, -0x84D2,0x84DB,0x84B0,0x8491,0x8661,0x8733,0x8723,0x8728, -0x876B,0x8740,0x872E,0x871E,0x8721,0x8719,0x871B,0x8743, -0x872C,0x8741,0x873E,0x8746,0x8720,0x8732,0x872A,0x872D, -0x873C,0x8712,0x873A,0x8731,0x8735,0x8742,0x8726,0x8727, -0x8738,0x8724,0x871A,0x8730,0x8711,0x88F7,0x88E7,0x88F1, -0x88F2,0x88FA,0x88FE,0x88EE,0x88FC,0x88F6,0x88FB, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x88F0,0x88EC,0x88EB,0x899D,0x89A1,0x899F,0x899E,0x89E9, -0x89EB,0x89E8,0x8AAB,0x8A99,0x8A8B,0x8A92,0x8A8F,0x8A96, -0x8C3D,0x8C68,0x8C69,0x8CD5,0x8CCF,0x8CD7,0x8D96,0x8E09, -0x8E02,0x8DFF,0x8E0D,0x8DFD,0x8E0A,0x8E03,0x8E07,0x8E06, -0x8E05,0x8DFE,0x8E00,0x8E04,0x8F10,0x8F11,0x8F0E,0x8F0D, -0x9123,0x911C,0x9120,0x9122,0x911F,0x911D,0x911A,0x9124, -0x9121,0x911B,0x917A,0x9172,0x9179,0x9173,0x92A5,0x92A4, -0x9276,0x929B,0x927A,0x92A0,0x9294,0x92AA,0x928D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x92A6,0x929A,0x92AB,0x9279,0x9297,0x927F,0x92A3, -0x92EE,0x928E,0x9282,0x9295,0x92A2,0x927D,0x9288,0x92A1, -0x928A,0x9286,0x928C,0x9299,0x92A7,0x927E,0x9287,0x92A9, -0x929D,0x928B,0x922D,0x969E,0x96A1,0x96FF,0x9758,0x977D, -0x977A,0x977E,0x9783,0x9780,0x9782,0x977B,0x9784,0x9781, -0x977F,0x97CE,0x97CD,0x9816,0x98AD,0x98AE,0x9902,0x9900, -0x9907,0x999D,0x999C,0x99C3,0x99B9,0x99BB,0x99BA,0x99C2, -0x99BD,0x99C7,0x9AB1,0x9AE3,0x9AE7,0x9B3E,0x9B3F,0x9B60, -0x9B61,0x9B5F,0x9CF1,0x9CF2,0x9CF5,0x9EA7,0x50FF,0x5103, -0x5130,0x50F8,0x5106,0x5107,0x50F6,0x50FE,0x510B,0x510C, -0x50FD,0x510A,0x528B,0x528C,0x52F1,0x52EF,0x5648,0x5642, -0x564C,0x5635,0x5641,0x564A,0x5649,0x5646,0x5658, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x565A,0x5640,0x5633,0x563D,0x562C,0x563E,0x5638,0x562A, -0x563A,0x571A,0x58AB,0x589D,0x58B1,0x58A0,0x58A3,0x58AF, -0x58AC,0x58A5,0x58A1,0x58FF,0x5AFF,0x5AF4,0x5AFD,0x5AF7, -0x5AF6,0x5B03,0x5AF8,0x5B02,0x5AF9,0x5B01,0x5B07,0x5B05, -0x5B0F,0x5C67,0x5D99,0x5D97,0x5D9F,0x5D92,0x5DA2,0x5D93, -0x5D95,0x5DA0,0x5D9C,0x5DA1,0x5D9A,0x5D9E,0x5E69,0x5E5D, -0x5E60,0x5E5C,0x7DF3,0x5EDB,0x5EDE,0x5EE1,0x5F49,0x5FB2, -0x618B,0x6183,0x6179,0x61B1,0x61B0,0x61A2,0x6189, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x619B,0x6193,0x61AF,0x61AD,0x619F,0x6192,0x61AA, -0x61A1,0x618D,0x6166,0x61B3,0x622D,0x646E,0x6470,0x6496, -0x64A0,0x6485,0x6497,0x649C,0x648F,0x648B,0x648A,0x648C, -0x64A3,0x649F,0x6468,0x64B1,0x6498,0x6576,0x657A,0x6579, -0x657B,0x65B2,0x65B3,0x66B5,0x66B0,0x66A9,0x66B2,0x66B7, -0x66AA,0x66AF,0x6A00,0x6A06,0x6A17,0x69E5,0x69F8,0x6A15, -0x69F1,0x69E4,0x6A20,0x69FF,0x69EC,0x69E2,0x6A1B,0x6A1D, -0x69FE,0x6A27,0x69F2,0x69EE,0x6A14,0x69F7,0x69E7,0x6A40, -0x6A08,0x69E6,0x69FB,0x6A0D,0x69FC,0x69EB,0x6A09,0x6A04, -0x6A18,0x6A25,0x6A0F,0x69F6,0x6A26,0x6A07,0x69F4,0x6A16, -0x6B51,0x6BA5,0x6BA3,0x6BA2,0x6BA6,0x6C01,0x6C00,0x6BFF, -0x6C02,0x6F41,0x6F26,0x6F7E,0x6F87,0x6FC6,0x6F92, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6F8D,0x6F89,0x6F8C,0x6F62,0x6F4F,0x6F85,0x6F5A,0x6F96, -0x6F76,0x6F6C,0x6F82,0x6F55,0x6F72,0x6F52,0x6F50,0x6F57, -0x6F94,0x6F93,0x6F5D,0x6F00,0x6F61,0x6F6B,0x6F7D,0x6F67, -0x6F90,0x6F53,0x6F8B,0x6F69,0x6F7F,0x6F95,0x6F63,0x6F77, -0x6F6A,0x6F7B,0x71B2,0x71AF,0x719B,0x71B0,0x71A0,0x719A, -0x71A9,0x71B5,0x719D,0x71A5,0x719E,0x71A4,0x71A1,0x71AA, -0x719C,0x71A7,0x71B3,0x7298,0x729A,0x7358,0x7352,0x735E, -0x735F,0x7360,0x735D,0x735B,0x7361,0x735A,0x7359, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7362,0x7487,0x7489,0x748A,0x7486,0x7481,0x747D, -0x7485,0x7488,0x747C,0x7479,0x7508,0x7507,0x757E,0x7625, -0x761E,0x7619,0x761D,0x761C,0x7623,0x761A,0x7628,0x761B, -0x769C,0x769D,0x769E,0x769B,0x778D,0x778F,0x7789,0x7788, -0x78CD,0x78BB,0x78CF,0x78CC,0x78D1,0x78CE,0x78D4,0x78C8, -0x78C3,0x78C4,0x78C9,0x799A,0x79A1,0x79A0,0x799C,0x79A2, -0x799B,0x6B76,0x7A39,0x7AB2,0x7AB4,0x7AB3,0x7BB7,0x7BCB, -0x7BBE,0x7BAC,0x7BCE,0x7BAF,0x7BB9,0x7BCA,0x7BB5,0x7CC5, -0x7CC8,0x7CCC,0x7CCB,0x7DF7,0x7DDB,0x7DEA,0x7DE7,0x7DD7, -0x7DE1,0x7E03,0x7DFA,0x7DE6,0x7DF6,0x7DF1,0x7DF0,0x7DEE, -0x7DDF,0x7F76,0x7FAC,0x7FB0,0x7FAD,0x7FED,0x7FEB,0x7FEA, -0x7FEC,0x7FE6,0x7FE8,0x8064,0x8067,0x81A3,0x819F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x819E,0x8195,0x81A2,0x8199,0x8197,0x8216,0x824F,0x8253, -0x8252,0x8250,0x824E,0x8251,0x8524,0x853B,0x850F,0x8500, -0x8529,0x850E,0x8509,0x850D,0x851F,0x850A,0x8527,0x851C, -0x84FB,0x852B,0x84FA,0x8508,0x850C,0x84F4,0x852A,0x84F2, -0x8515,0x84F7,0x84EB,0x84F3,0x84FC,0x8512,0x84EA,0x84E9, -0x8516,0x84FE,0x8528,0x851D,0x852E,0x8502,0x84FD,0x851E, -0x84F6,0x8531,0x8526,0x84E7,0x84E8,0x84F0,0x84EF,0x84F9, -0x8518,0x8520,0x8530,0x850B,0x8519,0x852F,0x8662, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8756,0x8763,0x8764,0x8777,0x87E1,0x8773,0x8758, -0x8754,0x875B,0x8752,0x8761,0x875A,0x8751,0x875E,0x876D, -0x876A,0x8750,0x874E,0x875F,0x875D,0x876F,0x876C,0x877A, -0x876E,0x875C,0x8765,0x874F,0x877B,0x8775,0x8762,0x8767, -0x8769,0x885A,0x8905,0x890C,0x8914,0x890B,0x8917,0x8918, -0x8919,0x8906,0x8916,0x8911,0x890E,0x8909,0x89A2,0x89A4, -0x89A3,0x89ED,0x89F0,0x89EC,0x8ACF,0x8AC6,0x8AB8,0x8AD3, -0x8AD1,0x8AD4,0x8AD5,0x8ABB,0x8AD7,0x8ABE,0x8AC0,0x8AC5, -0x8AD8,0x8AC3,0x8ABA,0x8ABD,0x8AD9,0x8C3E,0x8C4D,0x8C8F, -0x8CE5,0x8CDF,0x8CD9,0x8CE8,0x8CDA,0x8CDD,0x8CE7,0x8DA0, -0x8D9C,0x8DA1,0x8D9B,0x8E20,0x8E23,0x8E25,0x8E24,0x8E2E, -0x8E15,0x8E1B,0x8E16,0x8E11,0x8E19,0x8E26,0x8E27, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8E14,0x8E12,0x8E18,0x8E13,0x8E1C,0x8E17,0x8E1A,0x8F2C, -0x8F24,0x8F18,0x8F1A,0x8F20,0x8F23,0x8F16,0x8F17,0x9073, -0x9070,0x906F,0x9067,0x906B,0x912F,0x912B,0x9129,0x912A, -0x9132,0x9126,0x912E,0x9185,0x9186,0x918A,0x9181,0x9182, -0x9184,0x9180,0x92D0,0x92C3,0x92C4,0x92C0,0x92D9,0x92B6, -0x92CF,0x92F1,0x92DF,0x92D8,0x92E9,0x92D7,0x92DD,0x92CC, -0x92EF,0x92C2,0x92E8,0x92CA,0x92C8,0x92CE,0x92E6,0x92CD, -0x92D5,0x92C9,0x92E0,0x92DE,0x92E7,0x92D1,0x92D3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x92B5,0x92E1,0x92C6,0x92B4,0x957C,0x95AC,0x95AB, -0x95AE,0x95B0,0x96A4,0x96A2,0x96D3,0x9705,0x9708,0x9702, -0x975A,0x978A,0x978E,0x9788,0x97D0,0x97CF,0x981E,0x981D, -0x9826,0x9829,0x9828,0x9820,0x981B,0x9827,0x98B2,0x9908, -0x98FA,0x9911,0x9914,0x9916,0x9917,0x9915,0x99DC,0x99CD, -0x99CF,0x99D3,0x99D4,0x99CE,0x99C9,0x99D6,0x99D8,0x99CB, -0x99D7,0x99CC,0x9AB3,0x9AEC,0x9AEB,0x9AF3,0x9AF2,0x9AF1, -0x9B46,0x9B43,0x9B67,0x9B74,0x9B71,0x9B66,0x9B76,0x9B75, -0x9B70,0x9B68,0x9B64,0x9B6C,0x9CFC,0x9CFA,0x9CFD,0x9CFF, -0x9CF7,0x9D07,0x9D00,0x9CF9,0x9CFB,0x9D08,0x9D05,0x9D04, -0x9E83,0x9ED3,0x9F0F,0x9F10,0x511C,0x5113,0x5117,0x511A, -0x5111,0x51DE,0x5334,0x53E1,0x5670,0x5660,0x566E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5673,0x5666,0x5663,0x566D,0x5672,0x565E,0x5677,0x571C, -0x571B,0x58C8,0x58BD,0x58C9,0x58BF,0x58BA,0x58C2,0x58BC, -0x58C6,0x5B17,0x5B19,0x5B1B,0x5B21,0x5B14,0x5B13,0x5B10, -0x5B16,0x5B28,0x5B1A,0x5B20,0x5B1E,0x5BEF,0x5DAC,0x5DB1, -0x5DA9,0x5DA7,0x5DB5,0x5DB0,0x5DAE,0x5DAA,0x5DA8,0x5DB2, -0x5DAD,0x5DAF,0x5DB4,0x5E67,0x5E68,0x5E66,0x5E6F,0x5EE9, -0x5EE7,0x5EE6,0x5EE8,0x5EE5,0x5F4B,0x5FBC,0x619D,0x61A8, -0x6196,0x61C5,0x61B4,0x61C6,0x61C1,0x61CC,0x61BA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x61BF,0x61B8,0x618C,0x64D7,0x64D6,0x64D0,0x64CF, -0x64C9,0x64BD,0x6489,0x64C3,0x64DB,0x64F3,0x64D9,0x6533, -0x657F,0x657C,0x65A2,0x66C8,0x66BE,0x66C0,0x66CA,0x66CB, -0x66CF,0x66BD,0x66BB,0x66BA,0x66CC,0x6723,0x6A34,0x6A66, -0x6A49,0x6A67,0x6A32,0x6A68,0x6A3E,0x6A5D,0x6A6D,0x6A76, -0x6A5B,0x6A51,0x6A28,0x6A5A,0x6A3B,0x6A3F,0x6A41,0x6A6A, -0x6A64,0x6A50,0x6A4F,0x6A54,0x6A6F,0x6A69,0x6A60,0x6A3C, -0x6A5E,0x6A56,0x6A55,0x6A4D,0x6A4E,0x6A46,0x6B55,0x6B54, -0x6B56,0x6BA7,0x6BAA,0x6BAB,0x6BC8,0x6BC7,0x6C04,0x6C03, -0x6C06,0x6FAD,0x6FCB,0x6FA3,0x6FC7,0x6FBC,0x6FCE,0x6FC8, -0x6F5E,0x6FC4,0x6FBD,0x6F9E,0x6FCA,0x6FA8,0x7004,0x6FA5, -0x6FAE,0x6FBA,0x6FAC,0x6FAA,0x6FCF,0x6FBF,0x6FB8, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6FA2,0x6FC9,0x6FAB,0x6FCD,0x6FAF,0x6FB2,0x6FB0,0x71C5, -0x71C2,0x71BF,0x71B8,0x71D6,0x71C0,0x71C1,0x71CB,0x71D4, -0x71CA,0x71C7,0x71CF,0x71BD,0x71D8,0x71BC,0x71C6,0x71DA, -0x71DB,0x729D,0x729E,0x7369,0x7366,0x7367,0x736C,0x7365, -0x736B,0x736A,0x747F,0x749A,0x74A0,0x7494,0x7492,0x7495, -0x74A1,0x750B,0x7580,0x762F,0x762D,0x7631,0x763D,0x7633, -0x763C,0x7635,0x7632,0x7630,0x76BB,0x76E6,0x779A,0x779D, -0x77A1,0x779C,0x779B,0x77A2,0x77A3,0x7795,0x7799, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7797,0x78DD,0x78E9,0x78E5,0x78EA,0x78DE,0x78E3, -0x78DB,0x78E1,0x78E2,0x78ED,0x78DF,0x78E0,0x79A4,0x7A44, -0x7A48,0x7A47,0x7AB6,0x7AB8,0x7AB5,0x7AB1,0x7AB7,0x7BDE, -0x7BE3,0x7BE7,0x7BDD,0x7BD5,0x7BE5,0x7BDA,0x7BE8,0x7BF9, -0x7BD4,0x7BEA,0x7BE2,0x7BDC,0x7BEB,0x7BD8,0x7BDF,0x7CD2, -0x7CD4,0x7CD7,0x7CD0,0x7CD1,0x7E12,0x7E21,0x7E17,0x7E0C, -0x7E1F,0x7E20,0x7E13,0x7E0E,0x7E1C,0x7E15,0x7E1A,0x7E22, -0x7E0B,0x7E0F,0x7E16,0x7E0D,0x7E14,0x7E25,0x7E24,0x7F43, -0x7F7B,0x7F7C,0x7F7A,0x7FB1,0x7FEF,0x802A,0x8029,0x806C, -0x81B1,0x81A6,0x81AE,0x81B9,0x81B5,0x81AB,0x81B0,0x81AC, -0x81B4,0x81B2,0x81B7,0x81A7,0x81F2,0x8255,0x8256,0x8257, -0x8556,0x8545,0x856B,0x854D,0x8553,0x8561,0x8558, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8540,0x8546,0x8564,0x8541,0x8562,0x8544,0x8551,0x8547, -0x8563,0x853E,0x855B,0x8571,0x854E,0x856E,0x8575,0x8555, -0x8567,0x8560,0x858C,0x8566,0x855D,0x8554,0x8565,0x856C, -0x8663,0x8665,0x8664,0x879B,0x878F,0x8797,0x8793,0x8792, -0x8788,0x8781,0x8796,0x8798,0x8779,0x8787,0x87A3,0x8785, -0x8790,0x8791,0x879D,0x8784,0x8794,0x879C,0x879A,0x8789, -0x891E,0x8926,0x8930,0x892D,0x892E,0x8927,0x8931,0x8922, -0x8929,0x8923,0x892F,0x892C,0x891F,0x89F1,0x8AE0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8AE2,0x8AF2,0x8AF4,0x8AF5,0x8ADD,0x8B14,0x8AE4, -0x8ADF,0x8AF0,0x8AC8,0x8ADE,0x8AE1,0x8AE8,0x8AFF,0x8AEF, -0x8AFB,0x8C91,0x8C92,0x8C90,0x8CF5,0x8CEE,0x8CF1,0x8CF0, -0x8CF3,0x8D6C,0x8D6E,0x8DA5,0x8DA7,0x8E33,0x8E3E,0x8E38, -0x8E40,0x8E45,0x8E36,0x8E3C,0x8E3D,0x8E41,0x8E30,0x8E3F, -0x8EBD,0x8F36,0x8F2E,0x8F35,0x8F32,0x8F39,0x8F37,0x8F34, -0x9076,0x9079,0x907B,0x9086,0x90FA,0x9133,0x9135,0x9136, -0x9193,0x9190,0x9191,0x918D,0x918F,0x9327,0x931E,0x9308, -0x931F,0x9306,0x930F,0x937A,0x9338,0x933C,0x931B,0x9323, -0x9312,0x9301,0x9346,0x932D,0x930E,0x930D,0x92CB,0x931D, -0x92FA,0x9325,0x9313,0x92F9,0x92F7,0x9334,0x9302,0x9324, -0x92FF,0x9329,0x9339,0x9335,0x932A,0x9314,0x930C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x930B,0x92FE,0x9309,0x9300,0x92FB,0x9316,0x95BC,0x95CD, -0x95BE,0x95B9,0x95BA,0x95B6,0x95BF,0x95B5,0x95BD,0x96A9, -0x96D4,0x970B,0x9712,0x9710,0x9799,0x9797,0x9794,0x97F0, -0x97F8,0x9835,0x982F,0x9832,0x9924,0x991F,0x9927,0x9929, -0x999E,0x99EE,0x99EC,0x99E5,0x99E4,0x99F0,0x99E3,0x99EA, -0x99E9,0x99E7,0x9AB9,0x9ABF,0x9AB4,0x9ABB,0x9AF6,0x9AFA, -0x9AF9,0x9AF7,0x9B33,0x9B80,0x9B85,0x9B87,0x9B7C,0x9B7E, -0x9B7B,0x9B82,0x9B93,0x9B92,0x9B90,0x9B7A,0x9B95, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9B7D,0x9B88,0x9D25,0x9D17,0x9D20,0x9D1E,0x9D14, -0x9D29,0x9D1D,0x9D18,0x9D22,0x9D10,0x9D19,0x9D1F,0x9E88, -0x9E86,0x9E87,0x9EAE,0x9EAD,0x9ED5,0x9ED6,0x9EFA,0x9F12, -0x9F3D,0x5126,0x5125,0x5122,0x5124,0x5120,0x5129,0x52F4, -0x5693,0x568C,0x568D,0x5686,0x5684,0x5683,0x567E,0x5682, -0x567F,0x5681,0x58D6,0x58D4,0x58CF,0x58D2,0x5B2D,0x5B25, -0x5B32,0x5B23,0x5B2C,0x5B27,0x5B26,0x5B2F,0x5B2E,0x5B7B, -0x5BF1,0x5BF2,0x5DB7,0x5E6C,0x5E6A,0x5FBE,0x5FBB,0x61C3, -0x61B5,0x61BC,0x61E7,0x61E0,0x61E5,0x61E4,0x61E8,0x61DE, -0x64EF,0x64E9,0x64E3,0x64EB,0x64E4,0x64E8,0x6581,0x6580, -0x65B6,0x65DA,0x66D2,0x6A8D,0x6A96,0x6A81,0x6AA5,0x6A89, -0x6A9F,0x6A9B,0x6AA1,0x6A9E,0x6A87,0x6A93,0x6A8E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6A95,0x6A83,0x6AA8,0x6AA4,0x6A91,0x6A7F,0x6AA6,0x6A9A, -0x6A85,0x6A8C,0x6A92,0x6B5B,0x6BAD,0x6C09,0x6FCC,0x6FA9, -0x6FF4,0x6FD4,0x6FE3,0x6FDC,0x6FED,0x6FE7,0x6FE6,0x6FDE, -0x6FF2,0x6FDD,0x6FE2,0x6FE8,0x71E1,0x71F1,0x71E8,0x71F2, -0x71E4,0x71F0,0x71E2,0x7373,0x736E,0x736F,0x7497,0x74B2, -0x74AB,0x7490,0x74AA,0x74AD,0x74B1,0x74A5,0x74AF,0x7510, -0x7511,0x7512,0x750F,0x7584,0x7643,0x7648,0x7649,0x7647, -0x76A4,0x76E9,0x77B5,0x77AB,0x77B2,0x77B7,0x77B6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x77B4,0x77B1,0x77A8,0x77F0,0x78F3,0x78FD,0x7902, -0x78FB,0x78FC,0x78F2,0x7905,0x78F9,0x78FE,0x7904,0x79AB, -0x79A8,0x7A5C,0x7A5B,0x7A56,0x7A58,0x7A54,0x7A5A,0x7ABE, -0x7AC0,0x7AC1,0x7C05,0x7C0F,0x7BF2,0x7C00,0x7BFF,0x7BFB, -0x7C0E,0x7BF4,0x7C0B,0x7BF3,0x7C02,0x7C09,0x7C03,0x7C01, -0x7BF8,0x7BFD,0x7C06,0x7BF0,0x7BF1,0x7C10,0x7C0A,0x7CE8, -0x7E2D,0x7E3C,0x7E42,0x7E33,0x9848,0x7E38,0x7E2A,0x7E49, -0x7E40,0x7E47,0x7E29,0x7E4C,0x7E30,0x7E3B,0x7E36,0x7E44, -0x7E3A,0x7F45,0x7F7F,0x7F7E,0x7F7D,0x7FF4,0x7FF2,0x802C, -0x81BB,0x81C4,0x81CC,0x81CA,0x81C5,0x81C7,0x81BC,0x81E9, -0x825B,0x825A,0x825C,0x8583,0x8580,0x858F,0x85A7,0x8595, -0x85A0,0x858B,0x85A3,0x857B,0x85A4,0x859A,0x859E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8577,0x857C,0x8589,0x85A1,0x857A,0x8578,0x8557,0x858E, -0x8596,0x8586,0x858D,0x8599,0x859D,0x8581,0x85A2,0x8582, -0x8588,0x8585,0x8579,0x8576,0x8598,0x8590,0x859F,0x8668, -0x87BE,0x87AA,0x87AD,0x87C5,0x87B0,0x87AC,0x87B9,0x87B5, -0x87BC,0x87AE,0x87C9,0x87C3,0x87C2,0x87CC,0x87B7,0x87AF, -0x87C4,0x87CA,0x87B4,0x87B6,0x87BF,0x87B8,0x87BD,0x87DE, -0x87B2,0x8935,0x8933,0x893C,0x893E,0x8941,0x8952,0x8937, -0x8942,0x89AD,0x89AF,0x89AE,0x89F2,0x89F3,0x8B1E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8B18,0x8B16,0x8B11,0x8B05,0x8B0B,0x8B22,0x8B0F, -0x8B12,0x8B15,0x8B07,0x8B0D,0x8B08,0x8B06,0x8B1C,0x8B13, -0x8B1A,0x8C4F,0x8C70,0x8C72,0x8C71,0x8C6F,0x8C95,0x8C94, -0x8CF9,0x8D6F,0x8E4E,0x8E4D,0x8E53,0x8E50,0x8E4C,0x8E47, -0x8F43,0x8F40,0x9085,0x907E,0x9138,0x919A,0x91A2,0x919B, -0x9199,0x919F,0x91A1,0x919D,0x91A0,0x93A1,0x9383,0x93AF, -0x9364,0x9356,0x9347,0x937C,0x9358,0x935C,0x9376,0x9349, -0x9350,0x9351,0x9360,0x936D,0x938F,0x934C,0x936A,0x9379, -0x9357,0x9355,0x9352,0x934F,0x9371,0x9377,0x937B,0x9361, -0x935E,0x9363,0x9367,0x9380,0x934E,0x9359,0x95C7,0x95C0, -0x95C9,0x95C3,0x95C5,0x95B7,0x96AE,0x96B0,0x96AC,0x9720, -0x971F,0x9718,0x971D,0x9719,0x979A,0x97A1,0x979C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x979E,0x979D,0x97D5,0x97D4,0x97F1,0x9841,0x9844,0x984A, -0x9849,0x9845,0x9843,0x9925,0x992B,0x992C,0x992A,0x9933, -0x9932,0x992F,0x992D,0x9931,0x9930,0x9998,0x99A3,0x99A1, -0x9A02,0x99FA,0x99F4,0x99F7,0x99F9,0x99F8,0x99F6,0x99FB, -0x99FD,0x99FE,0x99FC,0x9A03,0x9ABE,0x9AFE,0x9AFD,0x9B01, -0x9AFC,0x9B48,0x9B9A,0x9BA8,0x9B9E,0x9B9B,0x9BA6,0x9BA1, -0x9BA5,0x9BA4,0x9B86,0x9BA2,0x9BA0,0x9BAF,0x9D33,0x9D41, -0x9D67,0x9D36,0x9D2E,0x9D2F,0x9D31,0x9D38,0x9D30, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9D45,0x9D42,0x9D43,0x9D3E,0x9D37,0x9D40,0x9D3D, -0x7FF5,0x9D2D,0x9E8A,0x9E89,0x9E8D,0x9EB0,0x9EC8,0x9EDA, -0x9EFB,0x9EFF,0x9F24,0x9F23,0x9F22,0x9F54,0x9FA0,0x5131, -0x512D,0x512E,0x5698,0x569C,0x5697,0x569A,0x569D,0x5699, -0x5970,0x5B3C,0x5C69,0x5C6A,0x5DC0,0x5E6D,0x5E6E,0x61D8, -0x61DF,0x61ED,0x61EE,0x61F1,0x61EA,0x61F0,0x61EB,0x61D6, -0x61E9,0x64FF,0x6504,0x64FD,0x64F8,0x6501,0x6503,0x64FC, -0x6594,0x65DB,0x66DA,0x66DB,0x66D8,0x6AC5,0x6AB9,0x6ABD, -0x6AE1,0x6AC6,0x6ABA,0x6AB6,0x6AB7,0x6AC7,0x6AB4,0x6AAD, -0x6B5E,0x6BC9,0x6C0B,0x7007,0x700C,0x700D,0x7001,0x7005, -0x7014,0x700E,0x6FFF,0x7000,0x6FFB,0x7026,0x6FFC,0x6FF7, -0x700A,0x7201,0x71FF,0x71F9,0x7203,0x71FD,0x7376, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x74B8,0x74C0,0x74B5,0x74C1,0x74BE,0x74B6,0x74BB,0x74C2, -0x7514,0x7513,0x765C,0x7664,0x7659,0x7650,0x7653,0x7657, -0x765A,0x76A6,0x76BD,0x76EC,0x77C2,0x77BA,0x78FF,0x790C, -0x7913,0x7914,0x7909,0x7910,0x7912,0x7911,0x79AD,0x79AC, -0x7A5F,0x7C1C,0x7C29,0x7C19,0x7C20,0x7C1F,0x7C2D,0x7C1D, -0x7C26,0x7C28,0x7C22,0x7C25,0x7C30,0x7E5C,0x7E50,0x7E56, -0x7E63,0x7E58,0x7E62,0x7E5F,0x7E51,0x7E60,0x7E57,0x7E53, -0x7FB5,0x7FB3,0x7FF7,0x7FF8,0x8075,0x81D1,0x81D2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x81D0,0x825F,0x825E,0x85B4,0x85C6,0x85C0,0x85C3, -0x85C2,0x85B3,0x85B5,0x85BD,0x85C7,0x85C4,0x85BF,0x85CB, -0x85CE,0x85C8,0x85C5,0x85B1,0x85B6,0x85D2,0x8624,0x85B8, -0x85B7,0x85BE,0x8669,0x87E7,0x87E6,0x87E2,0x87DB,0x87EB, -0x87EA,0x87E5,0x87DF,0x87F3,0x87E4,0x87D4,0x87DC,0x87D3, -0x87ED,0x87D8,0x87E3,0x87A4,0x87D7,0x87D9,0x8801,0x87F4, -0x87E8,0x87DD,0x8953,0x894B,0x894F,0x894C,0x8946,0x8950, -0x8951,0x8949,0x8B2A,0x8B27,0x8B23,0x8B33,0x8B30,0x8B35, -0x8B47,0x8B2F,0x8B3C,0x8B3E,0x8B31,0x8B25,0x8B37,0x8B26, -0x8B36,0x8B2E,0x8B24,0x8B3B,0x8B3D,0x8B3A,0x8C42,0x8C75, -0x8C99,0x8C98,0x8C97,0x8CFE,0x8D04,0x8D02,0x8D00,0x8E5C, -0x8E62,0x8E60,0x8E57,0x8E56,0x8E5E,0x8E65,0x8E67, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8E5B,0x8E5A,0x8E61,0x8E5D,0x8E69,0x8E54,0x8F46,0x8F47, -0x8F48,0x8F4B,0x9128,0x913A,0x913B,0x913E,0x91A8,0x91A5, -0x91A7,0x91AF,0x91AA,0x93B5,0x938C,0x9392,0x93B7,0x939B, -0x939D,0x9389,0x93A7,0x938E,0x93AA,0x939E,0x93A6,0x9395, -0x9388,0x9399,0x939F,0x938D,0x93B1,0x9391,0x93B2,0x93A4, -0x93A8,0x93B4,0x93A3,0x93A5,0x95D2,0x95D3,0x95D1,0x96B3, -0x96D7,0x96DA,0x5DC2,0x96DF,0x96D8,0x96DD,0x9723,0x9722, -0x9725,0x97AC,0x97AE,0x97A8,0x97AB,0x97A4,0x97AA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x97A2,0x97A5,0x97D7,0x97D9,0x97D6,0x97D8,0x97FA, -0x9850,0x9851,0x9852,0x98B8,0x9941,0x993C,0x993A,0x9A0F, -0x9A0B,0x9A09,0x9A0D,0x9A04,0x9A11,0x9A0A,0x9A05,0x9A07, -0x9A06,0x9AC0,0x9ADC,0x9B08,0x9B04,0x9B05,0x9B29,0x9B35, -0x9B4A,0x9B4C,0x9B4B,0x9BC7,0x9BC6,0x9BC3,0x9BBF,0x9BC1, -0x9BB5,0x9BB8,0x9BD3,0x9BB6,0x9BC4,0x9BB9,0x9BBD,0x9D5C, -0x9D53,0x9D4F,0x9D4A,0x9D5B,0x9D4B,0x9D59,0x9D56,0x9D4C, -0x9D57,0x9D52,0x9D54,0x9D5F,0x9D58,0x9D5A,0x9E8E,0x9E8C, -0x9EDF,0x9F01,0x9F00,0x9F16,0x9F25,0x9F2B,0x9F2A,0x9F29, -0x9F28,0x9F4C,0x9F55,0x5134,0x5135,0x5296,0x52F7,0x53B4, -0x56AB,0x56AD,0x56A6,0x56A7,0x56AA,0x56AC,0x58DA,0x58DD, -0x58DB,0x5912,0x5B3D,0x5B3E,0x5B3F,0x5DC3,0x5E70, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5FBF,0x61FB,0x6507,0x6510,0x650D,0x6509,0x650C,0x650E, -0x6584,0x65DE,0x65DD,0x66DE,0x6AE7,0x6AE0,0x6ACC,0x6AD1, -0x6AD9,0x6ACB,0x6ADF,0x6ADC,0x6AD0,0x6AEB,0x6ACF,0x6ACD, -0x6ADE,0x6B60,0x6BB0,0x6C0C,0x7019,0x7027,0x7020,0x7016, -0x702B,0x7021,0x7022,0x7023,0x7029,0x7017,0x7024,0x701C, -0x702A,0x720C,0x720A,0x7207,0x7202,0x7205,0x72A5,0x72A6, -0x72A4,0x72A3,0x72A1,0x74CB,0x74C5,0x74B7,0x74C3,0x7516, -0x7660,0x77C9,0x77CA,0x77C4,0x77F1,0x791D,0x791B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7921,0x791C,0x7917,0x791E,0x79B0,0x7A67,0x7A68, -0x7C33,0x7C3C,0x7C39,0x7C2C,0x7C3B,0x7CEC,0x7CEA,0x7E76, -0x7E75,0x7E78,0x7E70,0x7E77,0x7E6F,0x7E7A,0x7E72,0x7E74, -0x7E68,0x7F4B,0x7F4A,0x7F83,0x7F86,0x7FB7,0x7FFD,0x7FFE, -0x8078,0x81D7,0x81D5,0x8264,0x8261,0x8263,0x85EB,0x85F1, -0x85ED,0x85D9,0x85E1,0x85E8,0x85DA,0x85D7,0x85EC,0x85F2, -0x85F8,0x85D8,0x85DF,0x85E3,0x85DC,0x85D1,0x85F0,0x85E6, -0x85EF,0x85DE,0x85E2,0x8800,0x87FA,0x8803,0x87F6,0x87F7, -0x8809,0x880C,0x880B,0x8806,0x87FC,0x8808,0x87FF,0x880A, -0x8802,0x8962,0x895A,0x895B,0x8957,0x8961,0x895C,0x8958, -0x895D,0x8959,0x8988,0x89B7,0x89B6,0x89F6,0x8B50,0x8B48, -0x8B4A,0x8B40,0x8B53,0x8B56,0x8B54,0x8B4B,0x8B55, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8B51,0x8B42,0x8B52,0x8B57,0x8C43,0x8C77,0x8C76,0x8C9A, -0x8D06,0x8D07,0x8D09,0x8DAC,0x8DAA,0x8DAD,0x8DAB,0x8E6D, -0x8E78,0x8E73,0x8E6A,0x8E6F,0x8E7B,0x8EC2,0x8F52,0x8F51, -0x8F4F,0x8F50,0x8F53,0x8FB4,0x9140,0x913F,0x91B0,0x91AD, -0x93DE,0x93C7,0x93CF,0x93C2,0x93DA,0x93D0,0x93F9,0x93EC, -0x93CC,0x93D9,0x93A9,0x93E6,0x93CA,0x93D4,0x93EE,0x93E3, -0x93D5,0x93C4,0x93CE,0x93C0,0x93D2,0x93E7,0x957D,0x95DA, -0x95DB,0x96E1,0x9729,0x972B,0x972C,0x9728,0x9726, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x97B3,0x97B7,0x97B6,0x97DD,0x97DE,0x97DF,0x985C, -0x9859,0x985D,0x9857,0x98BF,0x98BD,0x98BB,0x98BE,0x9948, -0x9947,0x9943,0x99A6,0x99A7,0x9A1A,0x9A15,0x9A25,0x9A1D, -0x9A24,0x9A1B,0x9A22,0x9A20,0x9A27,0x9A23,0x9A1E,0x9A1C, -0x9A14,0x9AC2,0x9B0B,0x9B0A,0x9B0E,0x9B0C,0x9B37,0x9BEA, -0x9BEB,0x9BE0,0x9BDE,0x9BE4,0x9BE6,0x9BE2,0x9BF0,0x9BD4, -0x9BD7,0x9BEC,0x9BDC,0x9BD9,0x9BE5,0x9BD5,0x9BE1,0x9BDA, -0x9D77,0x9D81,0x9D8A,0x9D84,0x9D88,0x9D71,0x9D80,0x9D78, -0x9D86,0x9D8B,0x9D8C,0x9D7D,0x9D6B,0x9D74,0x9D75,0x9D70, -0x9D69,0x9D85,0x9D73,0x9D7B,0x9D82,0x9D6F,0x9D79,0x9D7F, -0x9D87,0x9D68,0x9E94,0x9E91,0x9EC0,0x9EFC,0x9F2D,0x9F40, -0x9F41,0x9F4D,0x9F56,0x9F57,0x9F58,0x5337,0x56B2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x56B5,0x56B3,0x58E3,0x5B45,0x5DC6,0x5DC7,0x5EEE,0x5EEF, -0x5FC0,0x5FC1,0x61F9,0x6517,0x6516,0x6515,0x6513,0x65DF, -0x66E8,0x66E3,0x66E4,0x6AF3,0x6AF0,0x6AEA,0x6AE8,0x6AF9, -0x6AF1,0x6AEE,0x6AEF,0x703C,0x7035,0x702F,0x7037,0x7034, -0x7031,0x7042,0x7038,0x703F,0x703A,0x7039,0x7040,0x703B, -0x7033,0x7041,0x7213,0x7214,0x72A8,0x737D,0x737C,0x74BA, -0x76AB,0x76AA,0x76BE,0x76ED,0x77CC,0x77CE,0x77CF,0x77CD, -0x77F2,0x7925,0x7923,0x7927,0x7928,0x7924,0x7929, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x79B2,0x7A6E,0x7A6C,0x7A6D,0x7AF7,0x7C49,0x7C48, -0x7C4A,0x7C47,0x7C45,0x7CEE,0x7E7B,0x7E7E,0x7E81,0x7E80, -0x7FBA,0x7FFF,0x8079,0x81DB,0x81D9,0x820B,0x8268,0x8269, -0x8622,0x85FF,0x8601,0x85FE,0x861B,0x8600,0x85F6,0x8604, -0x8609,0x8605,0x860C,0x85FD,0x8819,0x8810,0x8811,0x8817, -0x8813,0x8816,0x8963,0x8966,0x89B9,0x89F7,0x8B60,0x8B6A, -0x8B5D,0x8B68,0x8B63,0x8B65,0x8B67,0x8B6D,0x8DAE,0x8E86, -0x8E88,0x8E84,0x8F59,0x8F56,0x8F57,0x8F55,0x8F58,0x8F5A, -0x908D,0x9143,0x9141,0x91B7,0x91B5,0x91B2,0x91B3,0x940B, -0x9413,0x93FB,0x9420,0x940F,0x9414,0x93FE,0x9415,0x9410, -0x9428,0x9419,0x940D,0x93F5,0x9400,0x93F7,0x9407,0x940E, -0x9416,0x9412,0x93FA,0x9409,0x93F8,0x940A,0x93FF, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x93FC,0x940C,0x93F6,0x9411,0x9406,0x95DE,0x95E0,0x95DF, -0x972E,0x972F,0x97B9,0x97BB,0x97FD,0x97FE,0x9860,0x9862, -0x9863,0x985F,0x98C1,0x98C2,0x9950,0x994E,0x9959,0x994C, -0x994B,0x9953,0x9A32,0x9A34,0x9A31,0x9A2C,0x9A2A,0x9A36, -0x9A29,0x9A2E,0x9A38,0x9A2D,0x9AC7,0x9ACA,0x9AC6,0x9B10, -0x9B12,0x9B11,0x9C0B,0x9C08,0x9BF7,0x9C05,0x9C12,0x9BF8, -0x9C40,0x9C07,0x9C0E,0x9C06,0x9C17,0x9C14,0x9C09,0x9D9F, -0x9D99,0x9DA4,0x9D9D,0x9D92,0x9D98,0x9D90,0x9D9B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9DA0,0x9D94,0x9D9C,0x9DAA,0x9D97,0x9DA1,0x9D9A, -0x9DA2,0x9DA8,0x9D9E,0x9DA3,0x9DBF,0x9DA9,0x9D96,0x9DA6, -0x9DA7,0x9E99,0x9E9B,0x9E9A,0x9EE5,0x9EE4,0x9EE7,0x9EE6, -0x9F30,0x9F2E,0x9F5B,0x9F60,0x9F5E,0x9F5D,0x9F59,0x9F91, -0x513A,0x5139,0x5298,0x5297,0x56C3,0x56BD,0x56BE,0x5B48, -0x5B47,0x5DCB,0x5DCF,0x5EF1,0x61FD,0x651B,0x6B02,0x6AFC, -0x6B03,0x6AF8,0x6B00,0x7043,0x7044,0x704A,0x7048,0x7049, -0x7045,0x7046,0x721D,0x721A,0x7219,0x737E,0x7517,0x766A, -0x77D0,0x792D,0x7931,0x792F,0x7C54,0x7C53,0x7CF2,0x7E8A, -0x7E87,0x7E88,0x7E8B,0x7E86,0x7E8D,0x7F4D,0x7FBB,0x8030, -0x81DD,0x8618,0x862A,0x8626,0x861F,0x8623,0x861C,0x8619, -0x8627,0x862E,0x8621,0x8620,0x8629,0x861E,0x8625, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8829,0x881D,0x881B,0x8820,0x8824,0x881C,0x882B,0x884A, -0x896D,0x8969,0x896E,0x896B,0x89FA,0x8B79,0x8B78,0x8B45, -0x8B7A,0x8B7B,0x8D10,0x8D14,0x8DAF,0x8E8E,0x8E8C,0x8F5E, -0x8F5B,0x8F5D,0x9146,0x9144,0x9145,0x91B9,0x943F,0x943B, -0x9436,0x9429,0x943D,0x943C,0x9430,0x9439,0x942A,0x9437, -0x942C,0x9440,0x9431,0x95E5,0x95E4,0x95E3,0x9735,0x973A, -0x97BF,0x97E1,0x9864,0x98C9,0x98C6,0x98C0,0x9958,0x9956, -0x9A39,0x9A3D,0x9A46,0x9A44,0x9A42,0x9A41,0x9A3A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9A3F,0x9ACD,0x9B15,0x9B17,0x9B18,0x9B16,0x9B3A, -0x9B52,0x9C2B,0x9C1D,0x9C1C,0x9C2C,0x9C23,0x9C28,0x9C29, -0x9C24,0x9C21,0x9DB7,0x9DB6,0x9DBC,0x9DC1,0x9DC7,0x9DCA, -0x9DCF,0x9DBE,0x9DC5,0x9DC3,0x9DBB,0x9DB5,0x9DCE,0x9DB9, -0x9DBA,0x9DAC,0x9DC8,0x9DB1,0x9DAD,0x9DCC,0x9DB3,0x9DCD, -0x9DB2,0x9E7A,0x9E9C,0x9EEB,0x9EEE,0x9EED,0x9F1B,0x9F18, -0x9F1A,0x9F31,0x9F4E,0x9F65,0x9F64,0x9F92,0x4EB9,0x56C6, -0x56C5,0x56CB,0x5971,0x5B4B,0x5B4C,0x5DD5,0x5DD1,0x5EF2, -0x6521,0x6520,0x6526,0x6522,0x6B0B,0x6B08,0x6B09,0x6C0D, -0x7055,0x7056,0x7057,0x7052,0x721E,0x721F,0x72A9,0x737F, -0x74D8,0x74D5,0x74D9,0x74D7,0x766D,0x76AD,0x7935,0x79B4, -0x7A70,0x7A71,0x7C57,0x7C5C,0x7C59,0x7C5B,0x7C5A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7CF4,0x7CF1,0x7E91,0x7F4F,0x7F87,0x81DE,0x826B,0x8634, -0x8635,0x8633,0x862C,0x8632,0x8636,0x882C,0x8828,0x8826, -0x882A,0x8825,0x8971,0x89BF,0x89BE,0x89FB,0x8B7E,0x8B84, -0x8B82,0x8B86,0x8B85,0x8B7F,0x8D15,0x8E95,0x8E94,0x8E9A, -0x8E92,0x8E90,0x8E96,0x8E97,0x8F60,0x8F62,0x9147,0x944C, -0x9450,0x944A,0x944B,0x944F,0x9447,0x9445,0x9448,0x9449, -0x9446,0x973F,0x97E3,0x986A,0x9869,0x98CB,0x9954,0x995B, -0x9A4E,0x9A53,0x9A54,0x9A4C,0x9A4F,0x9A48,0x9A4A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9A49,0x9A52,0x9A50,0x9AD0,0x9B19,0x9B2B,0x9B3B, -0x9B56,0x9B55,0x9C46,0x9C48,0x9C3F,0x9C44,0x9C39,0x9C33, -0x9C41,0x9C3C,0x9C37,0x9C34,0x9C32,0x9C3D,0x9C36,0x9DDB, -0x9DD2,0x9DDE,0x9DDA,0x9DCB,0x9DD0,0x9DDC,0x9DD1,0x9DDF, -0x9DE9,0x9DD9,0x9DD8,0x9DD6,0x9DF5,0x9DD5,0x9DDD,0x9EB6, -0x9EF0,0x9F35,0x9F33,0x9F32,0x9F42,0x9F6B,0x9F95,0x9FA2, -0x513D,0x5299,0x58E8,0x58E7,0x5972,0x5B4D,0x5DD8,0x882F, -0x5F4F,0x6201,0x6203,0x6204,0x6529,0x6525,0x6596,0x66EB, -0x6B11,0x6B12,0x6B0F,0x6BCA,0x705B,0x705A,0x7222,0x7382, -0x7381,0x7383,0x7670,0x77D4,0x7C67,0x7C66,0x7E95,0x826C, -0x863A,0x8640,0x8639,0x863C,0x8631,0x863B,0x863E,0x8830, -0x8832,0x882E,0x8833,0x8976,0x8974,0x8973,0x89FE, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8B8C,0x8B8E,0x8B8B,0x8B88,0x8C45,0x8D19,0x8E98,0x8F64, -0x8F63,0x91BC,0x9462,0x9455,0x945D,0x9457,0x945E,0x97C4, -0x97C5,0x9800,0x9A56,0x9A59,0x9B1E,0x9B1F,0x9B20,0x9C52, -0x9C58,0x9C50,0x9C4A,0x9C4D,0x9C4B,0x9C55,0x9C59,0x9C4C, -0x9C4E,0x9DFB,0x9DF7,0x9DEF,0x9DE3,0x9DEB,0x9DF8,0x9DE4, -0x9DF6,0x9DE1,0x9DEE,0x9DE6,0x9DF2,0x9DF0,0x9DE2,0x9DEC, -0x9DF4,0x9DF3,0x9DE8,0x9DED,0x9EC2,0x9ED0,0x9EF2,0x9EF3, -0x9F06,0x9F1C,0x9F38,0x9F37,0x9F36,0x9F43,0x9F4F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9F71,0x9F70,0x9F6E,0x9F6F,0x56D3,0x56CD,0x5B4E, -0x5C6D,0x652D,0x66ED,0x66EE,0x6B13,0x705F,0x7061,0x705D, -0x7060,0x7223,0x74DB,0x74E5,0x77D5,0x7938,0x79B7,0x79B6, -0x7C6A,0x7E97,0x7F89,0x826D,0x8643,0x8838,0x8837,0x8835, -0x884B,0x8B94,0x8B95,0x8E9E,0x8E9F,0x8EA0,0x8E9D,0x91BE, -0x91BD,0x91C2,0x946B,0x9468,0x9469,0x96E5,0x9746,0x9743, -0x9747,0x97C7,0x97E5,0x9A5E,0x9AD5,0x9B59,0x9C63,0x9C67, -0x9C66,0x9C62,0x9C5E,0x9C60,0x9E02,0x9DFE,0x9E07,0x9E03, -0x9E06,0x9E05,0x9E00,0x9E01,0x9E09,0x9DFF,0x9DFD,0x9E04, -0x9EA0,0x9F1E,0x9F46,0x9F74,0x9F75,0x9F76,0x56D4,0x652E, -0x65B8,0x6B18,0x6B19,0x6B17,0x6B1A,0x7062,0x7226,0x72AA, -0x77D8,0x77D9,0x7939,0x7C69,0x7C6B,0x7CF6,0x7E9A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7E98,0x7E9B,0x7E99,0x81E0,0x81E1,0x8646,0x8647,0x8648, -0x8979,0x897A,0x897C,0x897B,0x89FF,0x8B98,0x8B99,0x8EA5, -0x8EA4,0x8EA3,0x946E,0x946D,0x946F,0x9471,0x9473,0x9749, -0x9872,0x995F,0x9C68,0x9C6E,0x9C6D,0x9E0B,0x9E0D,0x9E10, -0x9E0F,0x9E12,0x9E11,0x9EA1,0x9EF5,0x9F09,0x9F47,0x9F78, -0x9F7B,0x9F7A,0x9F79,0x571E,0x7066,0x7C6F,0x883C,0x8DB2, -0x8EA6,0x91C3,0x9474,0x9478,0x9476,0x9475,0x9A60,0x9C74, -0x9C73,0x9C71,0x9C75,0x9E14,0x9E13,0x9EF6,0x9F0A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9FA4,0x7068,0x7065,0x7CF7,0x866A,0x883E,0x883D, -0x883F,0x8B9E,0x8C9C,0x8EA9,0x8EC9,0x974B,0x9873,0x9874, -0x98CC,0x9961,0x99AB,0x9A64,0x9A66,0x9A67,0x9B24,0x9E15, -0x9E17,0x9F48,0x6207,0x6B1E,0x7227,0x864C,0x8EA8,0x9482, -0x9480,0x9481,0x9A69,0x9A68,0x9B2E,0x9E19,0x7229,0x864B, -0x8B9F,0x9483,0x9C79,0x9EB7,0x7675,0x9A6B,0x9C7A,0x9E1D, -0x7069,0x706A,0x9EA4,0x9F7E,0x9F49,0x9F98,0x7881,0x92B9, -0x88CF,0x58BB,0x6052,0x7CA7,0x5AFA}; - -static int func_big5_uni_onechar(int code){ - if ((code>=0xA140)&&(code<=0xC7FC)) - return(tab_big5_uni0[code-0xA140]); - if ((code>=0xC940)&&(code<=0xF9DC)) - return(tab_big5_uni1[code-0xC940]); - return(0); -} - - -/* page 0 0x00A2-0x00F7 */ -static uint16 tab_uni_big50[]={ -0xA246,0xA247, 0,0xA244, 0,0xA1B1, 0, 0, - 0, 0, 0, 0, 0, 0,0xA258,0xA1D3, - 0, 0, 0, 0, 0,0xA150, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xA1D1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xA1D2}; - -/* page 1 0x02C7-0x0451 */ -static uint16 tab_uni_big51[]={ -0xA3BE, 0,0xA3BC,0xA3BD,0xA3BF, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xA3BB, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xA344,0xA345,0xA346,0xA347,0xA348,0xA349, -0xA34A,0xA34B,0xA34C,0xA34D,0xA34E,0xA34F,0xA350,0xA351, -0xA352,0xA353,0xA354, 0,0xA355,0xA356,0xA357,0xA358, -0xA359,0xA35A,0xA35B, 0, 0, 0, 0, 0, - 0, 0,0xA35C,0xA35D,0xA35E,0xA35F,0xA360,0xA361, -0xA362,0xA363,0xA364,0xA365,0xA366,0xA367,0xA368,0xA369, -0xA36A,0xA36B,0xA36C, 0,0xA36D,0xA36E,0xA36F,0xA370, -0xA371,0xA372,0xA373, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xC7B3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xC7B1,0xC7B2,0xC7B4, -0xC7B5,0xC7B6,0xC7B7,0xC7B8,0xC7B9,0xC7BA, 0, 0, - 0, 0, 0, 0,0xC7BB,0xC7BC,0xC7BD,0xC7BE, -0xC7BF,0xC7C0,0xC7C1,0xC7C2,0xC7C3,0xC7C4,0xC7C5,0xC7C6, -0xC7C7,0xC7C8,0xC7C9,0xC7CA,0xC7CB,0xC7CC,0xC7CD,0xC7CF, -0xC7D0,0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C6DD,0xC6DE,0xC6DF,0xC6E0,0xC6E1,0xC6E2,0xC6E3, -0xC6E4,0xC6E5,0xC6E6,0xC6E7,0xC6E8,0xC6E9,0xC6EA,0xC6EB, -0xC6EC,0xC6ED,0xC6EE,0xC6EF,0xC6F0,0xC6F1,0xC6F2,0xC6F3, -0xC6F4,0xC6F5,0xC6F6,0xC6F7, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xC6A2,0xC6A3, 0, - 0,0xC6F8,0xC6F9,0xC6FA,0xC6FB,0xC6FC,0xC6FD,0xC6FE, -0xC740,0xC741,0xC742,0xC743,0xC744,0xC745,0xC746,0xC747, -0xC748,0xC749,0xC74A,0xC74B,0xC74C,0xC74D,0xC74E,0xC74F, -0xC750,0xC751,0xC752,0xC753,0xC754,0xC755,0xC756,0xC757, -0xC758,0xC759,0xC75A,0xC75B,0xC75C,0xC75D,0xC75E,0xC75F, -0xC760,0xC761,0xC762,0xC763,0xC764,0xC765,0xC766,0xC767, -0xC768,0xC769,0xC76A,0xC76B,0xC76C,0xC76D,0xC76E,0xC76F, -0xC770,0xC771,0xC772,0xC773,0xC774,0xC775,0xC776,0xC777, -0xC778,0xC779,0xC77A,0xC77B,0xC77C,0xC77D,0xC77E,0xC7A1, -0xC7A2,0xC7A3,0xC7A4,0xC7A5,0xC7A6,0xC7A7,0xC7A8,0xC7A9, -0xC7AA,0xC7AB,0xC7AC,0xC7AD,0xC7AE,0xC7AF,0xC7B0, 0, - 0, 0, 0, 0, 0, 0,0xC6A1, 0, - 0, 0, 0, 0, 0,0xA374,0xA375,0xA376, -0xA377,0xA378,0xA379,0xA37A,0xA37B,0xA37C,0xA37D,0xA37E, -0xA3A1,0xA3A2,0xA3A3,0xA3A4,0xA3A5,0xA3A6,0xA3A7,0xA3A8, -0xA3A9,0xA3AA,0xA3AB,0xA3AC,0xA3AD,0xA3AE,0xA3AF,0xA3B0, -0xA3B1,0xA3B2,0xA3B3,0xA3B4,0xA3B5,0xA3B6,0xA3B7,0xA3B8, -0xA3B9,0xA3BA}; - -/* page 5 0x32A3-0x32A3 */ -static uint16 tab_uni_big55[]={ -0xA1C0}; - -/* page 6 0x338E-0x33D5 */ -static uint16 tab_uni_big56[]={ -0xA255,0xA256, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xA250,0xA251, -0xA252, 0, 0,0xA254, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xA257, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xA253, 0, 0,0xA1EB,0xA1EA, 0, 0,0xA24F -}; - -/* page 7 0x4E00-0x9483 */ -static uint16 tab_uni_big57[]={ -0xA440,0xA442, 0,0xA443, 0, 0, 0,0xC945, -0xA456,0xA454,0xA457,0xA455,0xC946,0xA4A3,0xC94F,0xC94D, -0xA4A2,0xA4A1, 0, 0,0xA542,0xA541,0xA540, 0, -0xA543,0xA4FE, 0, 0, 0, 0,0xA5E0,0xA5E1, - 0, 0, 0, 0, 0, 0,0xA8C3, 0, - 0, 0, 0,0xA458, 0,0xA4A4,0xC950, 0, -0xA4A5,0xC963,0xA6EA,0xCBB1, 0, 0, 0, 0, -0xA459,0xA4A6, 0,0xA544,0xC964, 0, 0, 0, - 0, 0,0xC940,0xA444, 0,0xA45B, 0,0xC947, -0xA45C, 0, 0,0xA4A7, 0,0xA545,0xA547,0xA546, - 0, 0,0xA5E2,0xA5E3, 0, 0,0xA8C4, 0, -0xADBC,0xA441, 0, 0,0xC941,0xA445,0xA45E,0xA45D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xA5E4, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xA8C5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xB0AE,0xD44B, - 0, 0,0xB6C3,0xDCB1,0xDCB2, 0,0xA446, 0, -0xA4A9, 0, 0,0xA8C6,0xA447,0x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BE,0xADBF,0xD0DD,0xB0BF, - 0,0xADCC,0xADCB,0xD0CB,0xADCF,0xD45B,0xADC6,0xD0D6, -0xADD5,0xADD4,0xADCA,0xD0CE,0xD0D7, 0,0xD0C8,0xADC9, -0xD0D8,0xADD2,0xD0CC,0xADC0, 0,0xADC3,0xADC2,0xD0D9, -0xADD0,0xADC5,0xADD9,0xADDB,0xD0D3,0xADD8, 0,0xD0DB, -0xD0CD,0xD0DC, 0,0xD0D1, 0,0xD0DA, 0,0xD0D2, - 0, 0, 0, 0,0xADC8, 0, 0, 0, -0xD463,0xD457, 0,0xB0B3, 0,0xD45C,0xD462,0xB0B2, -0xD455,0xB0B6,0xD459,0xD452,0xB0B4,0xD456,0xB0B9,0xB0BE, - 0,0xD467, 0,0xD451, 0,0xB0BA, 0,0xD466, - 0, 0,0xB0B5,0xD458,0xB0B1,0xD453,0xD44F,0xD45D, -0xD450,0xD44E,0xD45A,0xD460,0xD461,0xB0B7, 0, 0, -0xD85B,0xD45E,0xD44D,0xD45F, 0,0xB0C1,0xD464,0xB0C0, -0xD44C, 0,0xD454,0xD465,0xB0BC,0xB0BB,0xB0B8,0xB0BD, - 0, 0,0xB0AF, 0, 0,0xB0B0, 0, 0, -0xB3C8, 0,0xD85E,0xD857, 0,0xB3C5, 0,0xD85F, - 0, 0, 0,0xD855,0xD858,0xB3C4,0xD859, 0, - 0,0xB3C7,0xD85D, 0,0xD853,0xD852,0xB3C9, 0, -0xB3CA,0xB3C6,0xB3CB,0xD851,0xD85C,0xD85A,0xD854, 0, - 0, 0,0xB3C3,0xD856, 0, 0, 0, 0, - 0, 0, 0, 0,0xB6CA,0xB6C4,0xDCB7,0xB6CD, -0xDCBD,0xDCC0,0xB6C6,0xB6C7,0xDCBA,0xB6C5,0xDCC3,0xB6CB, -0xDCC4, 0,0xDCBF,0xB6CC, 0,0xDCB4,0xB6C9,0xDCB5, - 0,0xDCBE,0xDCBC, 0,0xDCB8,0xB6C8,0xDCB6,0xB6CE, -0xDCB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A64B,0xA64A,0xC9C1,0xA758, 0, 0, 0, 0, - 0, 0,0xADEA, 0, 0,0xD46F, 0,0xB6D7, -0xE145,0xB9BC, 0, 0,0xE8FA, 0, 0,0xF3FD, - 0,0xA4C7, 0, 0,0xCBD8,0xCDF4,0xB0D0,0xB0CE, -0xB0CF,0xA451, 0,0xA464,0xA2CD,0xA4CA, 0,0xA4C9, -0xA4C8,0xA563,0xA562, 0,0xC96D,0xC9C3, 0, 0, - 0,0xA8F5,0xA8F2,0xA8F4,0xA8F3, 0, 0,0xAB6E, - 0, 0,0xB3D5, 0,0xA452, 0,0xA4CB, 0, -0xA565,0xA564, 0,0xCA72, 0, 0,0xA8F6, 0, - 0, 0, 0, 0,0xC957, 0,0xA567,0xA566, -0xA64C,0xA64D,0xCA73,0xA759, 0,0xA75A, 0,0xA8F7, -0xA8F8,0xA8F9, 0,0xAB6F,0xCDF5, 0, 0,0xADEB, - 0, 0,0xC944, 0,0xA4CC, 0, 0, 0, - 0, 0,0xC9C4, 0, 0, 0,0xCA74,0xCA75, - 0, 0,0xCBD9, 0,0xCBDA, 0,0xCDF7,0xCDF6, -0xCDF9,0xCDF8,0xAB70, 0,0xD470,0xADED,0xD0EF,0xADEC, - 0, 0, 0, 0,0xD864,0xB3D6, 0,0xD865, - 0, 0, 0, 0,0xE146,0xB9BD, 0, 0, - 0, 0,0xBC46, 0,0xF1EF, 0, 0, 0, - 0,0xC958, 0,0xA568, 0, 0, 0, 0, - 0, 0, 0,0xB0D1, 0, 0, 0, 0, -0xA453,0xA465,0xA4CE,0xA4CD, 0,0xA4CF, 0, 0, - 0, 0, 0, 0,0xA8FB, 0,0xA8FA,0xA8FC, - 0, 0, 0,0xAB71, 0, 0, 0,0xADEE, - 0,0xE8FB,0xC24F,0xA466,0xA56A,0xA579,0xA574, 0, -0xA56F,0xA56E,0xA575,0xA573,0xA56C,0xA57A,0xA56D,0xA569, -0xA578,0xA577,0xA576,0xA56B, 0,0xA572, 0, 0, -0xA571, 0, 0,0xA57B,0xA570, 0, 0, 0, - 0,0xA653, 0,0xA659,0xA655, 0,0xA65B,0xC9C5, -0xA658,0xA64E,0xA651,0xA654,0xA650,0xA657,0xA65A,0xA64F, -0xA652,0xA656,0xA65C, 0, 0, 0, 0, 0, -0xCA7E,0xCA7B, 0,0xA767,0xCA7C,0xA75B,0xA75D,0xA775, -0xA770, 0, 0, 0,0xCAA5,0xCA7D,0xA75F,0xA761, -0xCAA4,0xA768,0xCA78,0xA774,0xA776,0xA75C,0xA76D, 0, -0xCA76,0xA773, 0,0xA764, 0,0xA76E,0xA76F,0xCA77, -0xA76C,0xA76A, 0,0xA76B,0xA771,0xCAA1,0xA75E, 0, -0xA772,0xCAA3,0xA766,0xA763, 0,0xCA7A,0xA762,0xCAA6, -0xA765, 0,0xA769, 0, 0, 0,0xA760,0xCAA2, - 0, 0, 0, 0,0xCA79, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCBEB,0xCBEA,0xA94F,0xCBED,0xCBEF,0xCBE4,0xCBE7,0xCBEE, -0xA950, 0, 0,0xCBE1,0xCBE5, 0, 0,0xCBE9, -0xCE49,0xA94B,0xCE4D,0xA8FD,0xCBE6,0xA8FE,0xA94C,0xA945, -0xA941, 0,0xCBE2,0xA944,0xA949,0xA952,0xCBE3,0xCBDC, -0xA943,0xCBDD,0xCBDF, 0,0xA946, 0,0xA948,0xCBDB, -0xCBE0, 0, 0,0xA951,0xA94D,0xCBE8,0xA953, 0, -0xA94A,0xCBDE,0xA947, 0, 0,0xA942,0xA940, 0, -0xCBEC, 0,0xA94E, 0, 0, 0, 0, 0, -0xCE48,0xCDFB,0xCE4B, 0, 0,0xCDFD,0xAB78,0xABA8, -0xAB74,0xABA7,0xAB7D,0xABA4,0xAB72,0xCDFC,0xCE43,0xABA3, -0xCE4F,0xABA5, 0,0xAB79, 0, 0,0xCE45,0xCE42, -0xAB77, 0,0xCDFA,0xABA6,0xCE4A,0xAB7C,0xCE4C,0xABA9, -0xAB73,0xA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,0xE4FD, 0, -0xE4F6,0xE4FC,0xE4FB, 0,0xE4F8, 0,0xBC4F, 0, - 0, 0, 0,0xBC4E, 0, 0, 0,0xBC50, -0xE4FE,0xBEB2,0xE540, 0, 0, 0,0xE945, 0, -0xE8FD, 0,0xBEBE,0xE942,0xBEB6,0xBEBA,0xE941, 0, -0xBEB9,0xBEB5,0xBEB8,0xBEB3,0xBEBD,0xE943,0xE8FE,0xBEBC, -0xE8FC,0xBEBB,0xE944,0xE940,0xBC51, 0,0xBEBF,0xE946, -0xBEB7,0xBEB4, 0, 0, 0, 0,0xECC6,0xECC8, -0xC07B,0xECC9,0xECC7,0xECC5,0xECC4,0xC07D,0xECC3,0xC07E, - 0, 0, 0, 0,0xECC1,0xECC2,0xC07A,0xC0A1, -0xC07C, 0, 0,0xECC0, 0,0xC250, 0,0xEFBC, -0xEFBA,0xEFBF,0xEFBD, 0,0xEFBB,0xEFBE, 0, 0, - 0, 0, 0, 0, 0,0xC360,0xF1F2,0xF1F3, -0xC456, 0,0xF1F4,0xF1F0,0xF1F5,0xF1F1,0xC251, 0, - 0, 0,0xF3FE,0xF441,0xC459,0xF440,0xC458,0xC457, - 0, 0, 0, 0,0xC45A,0xF5C5,0xF5C6, 0, -0xC4DA,0xC4D9,0xC4DB,0xF5C4, 0,0xF6D8,0xF6D7, 0, -0xC56D,0xC56F,0xC56E,0xF6D9,0xC5C8,0xF8A6, 0, 0, - 0,0xC5F1, 0,0xF8A5,0xF8EE, 0, 0,0xC949, - 0, 0,0xA57D,0xA57C, 0,0xA65F,0xA65E,0xC9C7, -0xA65D,0xC9C6, 0, 0,0xA779,0xCAA9, 0,0xCAA8, - 0, 0,0xA777,0xA77A, 0, 0,0xCAA7, 0, -0xA778, 0, 0, 0, 0, 0, 0,0xCBF0, - 0,0xCBF1,0xA954, 0, 0, 0, 0,0xABAA, - 0,0xD148,0xD149,0xAE45,0xAE46, 0, 0,0xD4AC, -0xB0E9,0xB0EB,0xD4AB,0xB0EA,0xD87C,0xB3F2, 0, 0, - 0, 0,0xB6E9,0xB6EA,0xDCE1, 0,0xB9CF, 0, -0xB9CE, 0,0xE549,0xE948,0xE947, 0,0xF96B,0xA467, -0xC959, 0,0xC96E,0xC96F, 0, 0, 0, 0, -0xA662,0xA666,0xC9C9, 0,0xA664,0xA663,0xC9C8,0xA665, -0xA661, 0, 0,0xA660,0xC9CA, 0, 0, 0, - 0, 0, 0,0xA7A6, 0, 0,0xA7A3, 0, -0xA77D,0xCAAA, 0, 0, 0,0xCAAB, 0,0xA7A1, - 0,0xCAAD,0xA77B,0xCAAE,0xCAAC,0xA77E,0xA7A2,0xA7A5, -0xA7A4,0xA77C,0xCAAF, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xA959,0xCBFE, 0,0xA95B, 0,0xA95A, 0, -0xCC40,0xA958,0xA957,0xCBF5, 0,0xCBF4, 0,0xCBF2, -0xCBF7,0xCBF6,0xCBF3,0xCBFC,0xCBFD,0xCBFA,0xCBF8,0xA956, - 0, 0, 0,0xCBFB,0xA95C,0xCC41, 0, 0, -0xCBF9, 0,0xABAB,0xA955, 0, 0, 0, 0, - 0, 0, 0,0xABAC,0xCE54, 0, 0,0xCE5A, - 0, 0, 0,0xABB2,0xCE58,0xCE5E, 0,0xCE55, -0xCE59,0xCE5B,0xCE5D,0xCE57, 0,0xCE56,0xCE51,0xCE52, -0xABAD, 0,0xABAF,0xABAE,0xCE53,0xCE5C, 0, 0, - 0, 0, 0, 0, 0, 0,0xABB1, 0, - 0, 0, 0, 0, 0,0xCE50,0xD153, 0, -0xD152,0xD157,0xD14E, 0,0xD151,0xD150, 0,0xD154, - 0,0xD158,0xAE47,0xAE4A, 0, 0,0xD14F,0xD155, - 0, 0, 0,0xAE49,0xD14A, 0,0xABB0,0xD4BA, -0xD156, 0,0xD14D, 0,0xAE48,0xD14C, 0, 0, - 0, 0, 0, 0,0xD4B1, 0, 0,0xB0EC, -0xB0F0,0xD4C1,0xD4AF,0xD4B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, -0xE159, 0, 0, 0,0xBC59,0xE54B,0xBC57,0xBC56, -0xE54D,0xE552, 0,0xE54E, 0,0xE551,0xBC5C, 0, -0xBEA5,0xBC5B, 0,0xE54A,0xE550, 0,0xBC5A,0xE54F, - 0,0xE54C, 0,0xBC58, 0, 0, 0, 0, - 0, 0,0xE94D,0xF9D9,0xE94F,0xE94A,0xBEC1,0xE94C, - 0,0xBEC0,0xE94E, 0, 0,0xBEC3,0xE950,0xBEC2, -0xE949,0xE94B, 0, 0, 0, 0,0xC0A5,0xECCC, - 0,0xC0A4,0xECCD,0xC0A3,0xECCB,0xC0A2,0xECCA, 0, -0xC253,0xC252,0xF1F6,0xF1F8, 0,0xF1F7,0xC361,0xC362, - 0, 0,0xC363,0xF442,0xC45B, 0, 0,0xF7D3, -0xF7D2,0xC5F2, 0,0xA468,0xA4D0, 0, 0,0xA7A7, - 0, 0, 0, 0,0xCE5F, 0, 0, 0, - 0,0xB3FC,0xB3FD, 0,0xDCF2,0xB9D8,0xE169,0xE553, - 0, 0, 0,0xC95A, 0, 0,0xCAB0, 0, - 0, 0, 0, 0,0xCC42,0xCE60,0xD159,0xAE4C, - 0, 0,0xF1F9, 0,0xC4DC,0xA469,0xA57E,0xC970, - 0,0xA667,0xA668, 0,0xA95D, 0, 0, 0, -0xB0F7, 0,0xB9DA, 0,0xB9DB,0xB9D9, 0,0xA46A, - 0,0xA4D1,0xA4D3,0xA4D2,0xC95B,0xA4D4,0xA5A1,0xC971, - 0,0xA5A2, 0, 0, 0, 0, 0,0xA669, -0xA66A, 0, 0, 0,0xC9CB, 0,0xA7A8, 0, -0xCAB1, 0, 0, 0,0xA961,0xCC43, 0,0xA95F, -0xA960,0xA95E,0xD15A, 0, 0, 0,0xABB6,0xABB5, -0xABB7,0xABB4, 0,0xCE61,0xA962,0xABB3, 0,0xAE4D, -0xAE4E, 0,0xAE4F, 0,0xD4CD, 0, 0, 0, -0xB3FE,0xD8B4,0xB0F8, 0, 0, 0, 0,0xB6F8, - 0,0xB9DD,0xB9DC,0xE16A, 0,0xBC5D,0xBEC4, 0, -0xEFC0,0xF6DA,0xF7D4,0xA46B,0xA5A3, 0,0xA5A4,0xC9D1, -0xA66C,0xA66F, 0,0xC9CF,0xC9CD,0xA66E,0xC9D0,0xC9D2, -0xC9CC,0xA671,0xA670,0xA66D,0xA66B,0xC9CE, 0, 0, - 0, 0,0xA7B3, 0, 0,0xA7B0,0xCAB6,0xCAB9, -0xCAB8, 0,0xA7AA,0xA7B2, 0, 0,0xA7AF,0xCAB5, -0xCAB3,0xA7AE, 0, 0, 0,0xA7A9,0xA7AC, 0, -0xCAB4,0xCABB,0xCAB7,0xA7AD,0xA7B1,0xA7B4,0xCAB2,0xCABA, -0xA7AB, 0, 0, 0, 0, 0,0xA967,0xA96F, - 0,0xCC4F,0xCC48,0xA970,0xCC53,0xCC44,0xCC4B, 0, - 0,0xA966,0xCC45,0xA964,0xCC4C,0xCC50,0xA963, 0, -0xCC51,0xCC4A, 0,0xCC4D, 0,0xA972,0xA969,0xCC54, -0xCC52, 0,0xA96E,0xA96C,0xCC49,0xA96B,0xCC47,0xCC46, -0xA96A,0xA968,0xA971,0xA96D,0xA965, 0,0xCC4E, 0, -0xABB9, 0,0xABC0,0xCE6F,0xABB8,0xCE67,0xCE63, 0, -0xCE73,0xCE62, 0,0xABBB,0xCE6C,0xABBE,0xABC1, 0, -0xABBC,0xCE70,0xABBF, 0,0xAE56,0xCE76,0xCE64, 0, - 0,0xCE66,0xCE6D,0xCE71,0xCE75,0xCE72,0xCE6B,0xCE6E, - 0, 0,0xCE68,0xABC3,0xCE6A,0xCE69,0xCE74,0xABBA, -0xCE65,0xABC2, 0,0xABBD, 0, 0, 0, 0, - 0,0xAE5C,0xD162, 0,0xAE5B, 0, 0,0xD160, - 0,0xAE50, 0,0xAE55, 0,0xD15F,0xD15C,0xD161, -0xAE51,0xD15B, 0,0xAE54,0xAE52, 0,0xD163,0xAE53, -0xAE57, 0, 0,0xAE58, 0,0xAE5A, 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0xE174,0xB9E4, 0,0xE16D,0xB9DF, 0, -0xE17B,0xB9E0,0xE16F,0xE172,0xE177,0xE171,0xE16C, 0, - 0, 0, 0,0xE173,0xE555,0xBC61,0xE558,0xE557, -0xE55A,0xE55C,0xF9DC,0xBC5F, 0,0xE556, 0,0xE554, - 0,0xE55D,0xE55B,0xE559, 0,0xE55F, 0,0xE55E, -0xBC63,0xBC5E, 0,0xBC60,0xBC62, 0, 0,0xE560, -0xE957, 0, 0,0xE956,0xE955, 0,0xE958,0xE951, - 0,0xE952,0xE95A,0xE953, 0,0xBEC5,0xE95C, 0, -0xE95B,0xE954, 0,0xECD1,0xC0A8,0xECCF,0xECD4,0xECD3, -0xE959, 0,0xC0A7, 0,0xECD2,0xECCE,0xECD6,0xECD5, -0xC0A6, 0,0xECD0, 0,0xBEC6, 0, 0, 0, -0xC254, 0, 0, 0,0xEFC1,0xF1FA,0xF1FB,0xF1FC, -0xC45C, 0, 0,0xC45D, 0,0xF443, 0,0xF5C8, -0xF5C7, 0, 0,0xF6DB,0xF6DC,0xF7D5,0xF8A7, 0, -0xA46C,0xA46D, 0,0xA46E,0xA4D5,0xA5A5,0xC9D3,0xA672, -0xA673, 0,0xA7B7,0xA7B8,0xA7B6,0xA7B5, 0,0xA973, - 0, 0,0xCC55,0xA975,0xA974,0xCC56, 0, 0, - 0,0xABC4, 0,0xAE5D,0xD165, 0,0xD4F0, 0, -0xB145,0xB447,0xD4EF,0xB446, 0,0xB9E5, 0,0xE17D, -0xBEC7, 0,0xC0A9,0xECD7, 0,0xC45E, 0,0xC570, - 0,0xC972, 0,0xA5A6,0xC973,0xA676, 0,0xA674, -0xA675,0xA677, 0,0xA7BA,0xA7B9, 0,0xCABC,0xA7BB, - 0, 0,0xCABD,0xCC57, 0,0xCC58, 0,0xA976, -0xA978,0xA97A,0xA977,0xA97B,0xA979, 0, 0, 0, - 0, 0,0xABC8,0xABC5,0xABC7,0xABC9,0xABC6,0xD166, -0xCE77, 0, 0, 0,0xD168,0xD167,0xAE63, 0, -0xAE5F, 0, 0,0xAE60,0xAE62,0xAE64,0xAE61, 0, -0xAE66,0xAE65, 0, 0, 0, 0, 0,0xB14A, -0xD4F2,0xD4F1,0xB149, 0,0xB148,0xB147,0xB14B,0xB146, - 0, 0,0xD8D5,0xD8D2,0xB449,0xD8D1,0xD8D6, 0, -0xB44B,0xD8D4,0xB448,0xB44A,0xD8D3, 0,0xDD48, 0, -0xDD49,0xDD4A, 0, 0, 0, 0,0xB9E6,0xB9EE, -0xE17E,0xB9E8,0xB9EC,0xE1A1,0xB9ED,0xB9E9,0xB9EA,0xB9E7, -0xB9EB,0xBC66,0xD8D0,0xBC67,0xBC65, 0,0xBC64,0xE95D, -0xBEC8,0xECD8,0xECD9, 0, 0,0xC364,0xC45F, 0, -0xA46F, 0,0xA678, 0, 0, 0, 0, 0, - 0,0xABCA, 0,0xD169,0xAE67, 0, 0,0xB14E, -0xB14D,0xB14C,0xB44C,0xB44D,0xD8D7,0xB9EF,0xBEC9,0xA470, -0xC95C,0xA4D6,0xC974, 0, 0,0xC9D4,0xA679, 0, - 0, 0,0xA97C, 0, 0, 0, 0,0xDD4B, - 0, 0,0xA471, 0,0xA4D7,0xC9D5, 0, 0, -0xCABE, 0,0xCABF, 0,0xA7BC, 0, 0, 0, -0xD8D8,0xB44E, 0,0xDD4C, 0, 0, 0,0xC0AA, -0xA472,0xA4A8,0xA4D8,0xC975,0xA5A7, 0,0xA7C0,0xA7BF, -0xA7BD,0xA7BE, 0, 0,0xCC59,0xA97E,0xA9A1,0xCC5A, -0xA97D, 0, 0,0xABCE,0xCE78,0xABCD,0xABCB,0xABCC, -0xAE6A,0xAE68, 0, 0,0xD16B,0xAE69,0xD16A, 0, -0xAE5E,0xD4F3, 0, 0,0xB150,0xB151, 0, 0, -0xB14F, 0,0xB9F0,0xE1A2,0xBC68,0xBC69, 0,0xE561, -0xC0AB,0xEFC2,0xEFC3, 0,0xC4DD,0xF8A8,0xC94B,0xA4D9, - 0,0xA473,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F,0xD8D9, -0xD8EC,0xD8EA,0xD8E4, 0,0xD8ED,0xD8E6, 0,0xD8DE, -0xD8F0,0xD8DC,0xD8E9,0xD8DA, 0,0xD8F1, 0,0xB452, - 0,0xD8EB,0xDD4F,0xD8DD,0xB44F, 0,0xD8E1, 0, -0xB450,0xD8E0,0xD8E5, 0, 0,0xD8E2, 0, 0, - 0,0xD8E8, 0, 0, 0, 0,0xDD53, 0, - 0, 0,0xDD56,0xDD4E, 0,0xDD50, 0,0xDD55, -0xDD54,0xB743, 0,0xD8DB,0xDD52, 0, 0,0xB744, - 0,0xDD4D,0xDD51, 0, 0, 0, 0,0xE1A9, - 0,0xE1B0,0xE1A7, 0,0xE1AE,0xE1A5,0xE1AD,0xE1B1, -0xE1A4,0xE1A8,0xE1A3, 0,0xB9F1, 0,0xE1A6,0xB9F2, -0xE1AC,0xE1AB,0xE1AA, 0, 0,0xE1AF, 0, 0, - 0, 0,0xE565,0xE567,0xBC6B,0xE568, 0,0xE563, - 0,0xE562,0xE56C, 0,0xE56A,0xBC6A,0xE56D,0xE564, -0xE569,0xE56B,0xE566, 0, 0, 0, 0,0xE961, -0xE966,0xE960,0xE965, 0,0xE95E,0xE968,0xE964,0xE969, -0xE963,0xE95F,0xE967, 0,0xE96A,0xE962, 0,0xECDA, -0xC0AF, 0,0xC0AD, 0,0xC0AC,0xC0AE, 0, 0, -0xEFC4, 0,0xF172,0xF1FD, 0, 0,0xF444,0xF445, - 0,0xC460, 0,0xF5C9, 0,0xC4DE, 0,0xF5CA, - 0,0xF6DE,0xC572, 0,0xC571,0xF6DD,0xC5C9, 0, -0xF7D6, 0, 0, 0, 0,0xA474,0xA67B,0xC9DA, -0xCACA,0xA8B5,0xB15F, 0, 0,0xA475,0xA5AA,0xA5A9, -0xA5A8, 0, 0,0xA7C5, 0, 0,0xAE74, 0, -0xDD57,0xA476,0xA477,0xA478,0xA4DA, 0, 0,0xABD1, - 0,0xCEAF, 0, 0, 0,0xB453,0xA479,0xC95D, - 0, 0,0xA5AB,0xA5AC,0xC978, 0,0xA67C, 0, - 0, 0,0xCACB, 0,0xA7C6, 0,0xCACC, 0, - 0,0xA9AE, 0, 0,0xCC6E,0xA9AC,0xA9AB,0xCC6D, -0xA9A9,0xCC6F,0xA9AA,0xA9AD, 0,0xABD2, 0,0xABD4, -0xCEB3,0xCEB0,0xCEB1,0xCEB2,0xCEB4,0xABD3, 0, 0, -0xD174,0xD173, 0,0xAE76, 0,0xAE75, 0, 0, - 0, 0, 0,0xB162,0xD546, 0,0xB161,0xB163, -0xB160, 0, 0, 0, 0,0xB455,0xD545, 0, -0xB456,0xD8F3, 0,0xB457,0xD8F2,0xB454, 0, 0, - 0, 0,0xDD5A,0xDD5C,0xB745,0xDD5B,0xDD59,0xDD58, - 0, 0, 0,0xE1B4,0xB9F7,0xB9F5, 0,0xB9F6, -0xE1B2,0xE1B3, 0,0xB9F3,0xE571,0xE56F, 0,0xBC6D, -0xE570,0xBC6E,0xBC6C,0xB9F4, 0, 0,0xE96D,0xE96B, -0xE96C,0xE56E,0xECDC,0xC0B0,0xECDB,0xEFC5,0xEFC6,0xE96E, -0xF1FE, 0,0xA47A,0xA5AD,0xA67E,0xC9DB,0xA67D, 0, -0xA9AF,0xB746, 0,0xA4DB,0xA5AE,0xABD5,0xB458, 0, -0xC979, 0,0xC97A, 0,0xC9DC, 0, 0,0xA7C8, -0xCAD0,0xCACE,0xA7C9,0xCACD,0xCACF,0xCAD1, 0,0xA7C7, - 0, 0, 0, 0, 0,0xA9B3,0xA9B4,0xA9B1, - 0, 0,0xA9B0,0xCEB8,0xA9B2, 0, 0, 0, -0xABD6, 0,0xCEB7,0xCEB9,0xCEB6,0xCEBA,0xABD7,0xAE79, -0xD175, 0,0xD177,0xAE77,0xD178,0xAE78,0xD176, 0, -0xCEB5,0xD547,0xD54A,0xD54B,0xD548,0xB167,0xB166,0xB164, -0xB165,0xD549, 0, 0, 0, 0,0xB168, 0, - 0,0xB45A,0xB45B, 0,0xB45C,0xDD5D,0xDD5F,0xDD61, -0xB748,0xB747,0xB459,0xDD60,0xDD5E, 0,0xE1B8, 0, - 0,0xE1B6,0xE1BC,0xB9F8,0xE1BD,0xE1BA,0xB9F9,0xE1B7, -0xE1B5,0xE1BB,0xBC70,0xE573,0xE1B9,0xBC72,0xE574,0xBC71, -0xBC74,0xE575,0xBC6F,0xBC73, 0,0xE973,0xE971,0xE970, -0xE972,0xE96F, 0, 0,0xC366, 0,0xF446,0xF447, - 0,0xF5CB,0xF6DF,0xC655, 0, 0,0xA9B5,0xA7CA, - 0, 0,0xABD8, 0, 0, 0,0xA47B,0xA4DC, - 0,0xA5AF,0xC9DD, 0,0xA7CB,0xCAD2, 0,0xCEBB, -0xABD9, 0,0xB9FA,0xA47C, 0, 0, 0,0xA6A1, - 0, 0,0xB749,0xA47D,0xA4DD,0xA4DE, 0,0xA5B1, -0xA5B0, 0,0xC9DE,0xA6A2, 0,0xCAD3, 0,0xA7CC, - 0, 0,0xCC71,0xCC72,0xCC73, 0,0xA9B6,0xA9B7, -0xCC70,0xA9B8, 0, 0, 0,0xABDA,0xCEBC, 0, -0xD17A,0xAE7A, 0,0xD179, 0,0xB169,0xD54C,0xB16A, -0xD54D, 0, 0, 0,0xB45D, 0, 0, 0, -0xDD62, 0, 0,0xE1BF,0xE1BE, 0,0xB9FB, 0, -0xBC75,0xE576,0xBECA,0xE974,0xC0B1, 0,0xC573,0xF7D8, - 0, 0, 0, 0,0xCC74, 0,0xCEBD,0xB16B, -0xD8F4,0xB74A, 0, 0, 0,0xC255, 0, 0, - 0, 0,0xA7CE, 0,0xA7CD,0xABDB, 0,0xD17B, - 0,0xB16D,0xB343,0xB16E,0xB16C,0xB45E, 0,0xE1C0, -0xB9FC,0xBC76, 0,0xC94C,0xC9DF, 0,0xCAD5,0xA7CF, -0xCAD4,0xA7D0, 0, 0,0xA9BC,0xCC77,0xCC76,0xA9BB, -0xA9B9,0xA9BA,0xCC75, 0, 0,0xABDD,0xCEBE,0xABE0, -0xABDC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0xCEC4,0xABED,0xCEC6, - 0,0xCEC7, 0, 0,0xCEC9,0xABE9, 0, 0, -0xAEA3, 0,0xF9DA,0xCEC5,0xCEC1,0xAEA4, 0, 0, -0xCECF,0xAE7E,0xD17D,0xCEC8, 0,0xD17C,0xCEC3,0xCECC, - 0, 0,0xABEC,0xAEA1,0xABF2,0xAEA2,0xCED0,0xD17E, -0xABEB,0xAEA6,0xABF1,0xABF0,0xABEF,0xAEA5,0xCED1,0xAEA7, -0xABEA, 0,0xCEC2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xB176, -0xD1A4,0xD1A6, 0,0xD1A8,0xAEA8,0xAEAE,0xD553,0xD1AC, -0xD1A3,0xB178,0xD551, 0,0xAEAD,0xAEAB,0xD1AE, 0, -0xD552, 0,0xD1A5, 0,0xAEAC,0xD1A9,0xAEAF,0xD1AB, - 0, 0,0xAEAA,0xD1AA,0xD1AD,0xD1A7, 0,0xAEA9, -0xB179, 0,0xD1A2,0xB177, 0, 0, 0, 0, -0xB17A, 0, 0, 0, 0, 0, 0, 0, -0xD555,0xD55E,0xB464, 0,0xB17C,0xB1A3,0xB465,0xD560, -0xB1AA,0xD8F9,0xD556,0xB1A2,0xB1A5,0xB17E,0xD554,0xD562, -0xD565,0xD949, 0,0xD563,0xD8FD,0xB1A1,0xB1A8,0xB1AC, -0xD55D,0xD8F8,0xD561,0xB17B,0xD8FA,0xD564,0xD8FC,0xD559, - 0,0xB462, 0,0xD557,0xD558,0xB1A7, 0, 0, -0xB1A6,0xD55B,0xB1AB,0xD55F,0xB1A4,0xD55C, 0,0xB1A9, -0xB466,0xB463,0xD8FB, 0,0xD55A, 0,0xB17D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB46B,0xB46F,0xD940,0xB751,0xB46D,0xD944,0xB471,0xDD65, -0xD946,0xB753,0xB469,0xB46C,0xD947, 0,0xD948,0xD94E, -0xB473,0xB754, 0,0xD94A,0xD94F,0xD943,0xB75E, 0, -0xB755,0xB472,0xD941,0xD950, 0,0xB75D,0xB470,0xB74E, -0xD94D, 0,0xB474,0xD945,0xD8FE,0xB46A,0xD942, 0, -0xD94B, 0,0xB74D,0xB752,0xB467,0xD94C, 0,0xB750, - 0, 0, 0,0xB468, 0, 0, 0,0xB75C, -0xE1C3,0xDD70, 0,0xDD68,0xE1C2, 0,0xDD6C,0xDD6E, - 0, 0,0xDD6B, 0,0xB75B, 0,0xDD6A,0xB75F, - 0, 0, 0,0xE1D2, 0, 0,0xB75A,0xBA40, -0xDD71,0xE1C4, 0, 0,0xB758,0xDD69,0xDD6D,0xB9FE, -0xB74F,0xDD66,0xDD67,0xBA41,0xB757,0xB759,0xB756,0xDD6F, - 0, 0,0xE1C8,0xE1C9,0xE1CE,0xBC7D,0xE1D5, 0, -0xBA47, 0,0xBA46,0xE1D0, 0,0xBC7C,0xE1C5,0xBA45, - 0,0xE1D4,0xBA43,0xBA44, 0,0xE1D1,0xE5AA,0xBC7A, -0xB46E, 0,0xE1D3,0xBCA3,0xE1CB, 0,0xBC7B, 0, -0xBCA2,0xE1C6,0xE1CA,0xE1C7,0xE1CD,0xBA48,0xBC79,0xBA42, - 0,0xE57A,0xE1CF, 0,0xBCA1, 0,0xBCA4, 0, -0xE1CC, 0,0xBC7E,0xE579, 0, 0, 0, 0, - 0,0xE57E,0xBECE,0xE578,0xE9A3,0xE5A9,0xBCA8, 0, -0xBCA6,0xBECC,0xE5A6,0xE5A2,0xBCAC, 0,0xE978, 0, - 0, 0,0xBCAA,0xE5A1, 0,0xE976, 0,0xE5A5, - 0,0xE5A8,0xE57D, 0,0xBCAB, 0, 0,0xBCA5, -0xE977,0xBECD,0xE5A7,0xBCA7,0xBCA9,0xE5A4,0xBCAD,0xE5A3, -0xE57C,0xE57B,0xBECB,0xE5AB,0xE97A,0xECE0,0xBED0, 0, -0xE9A2, 0,0xE97E, 0,0xECE1, 0,0xBED1,0xE9A1, - 0,0xE97C,0xC0B4,0xECDF, 0,0xE979,0xE97B,0xC0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A,0xAEBC,0xD57D,0xD1BD,0xAEBE,0xAEB5, 0, -0xD1CB,0xD1BF,0xAEB8,0xD1B8,0xD1B5,0xD1B6,0xAEB9,0xD1C5, -0xD1CC,0xAEBB,0xD1BC,0xD1BB,0xAEC3,0xAEC2,0xAEB4,0xAEBA, -0xAEBD,0xD1C8, 0, 0,0xD1C2,0xAEB7,0xD1B3,0xD1CA, -0xD1C1,0xD1C3,0xD1C7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xD567, 0,0xB1B7, -0xB1CB,0xB1CA, 0,0xB1BF, 0,0xD579,0xD575,0xD572, -0xD5A6,0xB1BA,0xB1B2, 0, 0,0xD577,0xB4A8,0xB1B6, -0xD5A1, 0,0xB1CC,0xB1C9,0xD57B,0xD56A, 0, 0, -0xB1C8,0xD5A3,0xD569,0xB1BD,0xB1C1,0xD5A2, 0,0xD573, -0xB1C2,0xB1BC,0xD568, 0,0xB478,0xD5A5,0xD571,0xB1C7, -0xD574,0xD5A4,0xB1C6, 0,0xD952, 0,0xB1B3,0xD56F, -0xB1B8,0xB1C3, 0,0xB1BE,0xD578,0xD56E,0xD56C,0xD57E, -0xB1B0,0xB1C4,0xB1B4,0xB477,0xD57C,0xB1B5, 0,0xB1B1, -0xB1C0,0xB1BB,0xB1B9,0xD570,0xB1C5,0xD56D,0xD57A,0xD576, -0xD954,0xD953, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xD56B,0xD964, 0, -0xB47A, 0,0xD96A,0xD959,0xD967,0xDD77,0xB47D,0xD96B, -0xD96E,0xB47C,0xD95C,0xD96D,0xD96C,0xB47E,0xD955,0xB479, -0xB4A3, 0,0xB4A1,0xD969, 0,0xD95F,0xB4A5,0xD970, -0xD968,0xD971,0xB4AD,0xB4AB,0xD966,0xD965, 0,0xD963, -0xD95D,0xB4A4, 0,0xB4A2,0xD1B9,0xD956, 0,0xDDB7, -0xD957,0xB47B,0xB4AA,0xDD79, 0,0xB4A6,0xB4A7,0xD958, -0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, -0xE9C3,0xE9D5,0xE9CF,0xBEEE, 0,0xE9C6, 0,0xE9D4, - 0, 0, 0, 0, 0, 0,0xE9C7, 0, - 0, 0, 0, 0, 0, 0,0xC0CF,0xED45, -0xC0C8,0xECF5, 0,0xED41,0xC0CA,0xED48, 0,0xECFC, - 0,0xECF7, 0, 0,0xED49,0xECF3,0xECFE, 0, -0xC0D1,0xED44,0xED4A,0xECFD,0xC0C9,0xED40,0xECF4,0xC0D0, - 0, 0,0xED47,0xECF9,0xC0CC, 0,0xECFB,0xECF8, -0xC0D2,0xECFA,0xC0CB,0xC0CE,0xED43,0xECF6,0xED46, 0, -0xED42, 0, 0, 0,0xC263,0xEFE7,0xC268,0xC269, - 0, 0, 0,0xC262,0xEFE6, 0,0xEFE3,0xEFE4, -0xC266,0xEFDE,0xEFE2,0xC265, 0,0xEFDF, 0, 0, - 0, 0,0xC267,0xC264, 0,0xEFDD,0xEFE1,0xEFE5, - 0, 0, 0,0xF251,0xF24E,0xF257, 0,0xF256, -0xF254,0xF24F, 0,0xC372, 0, 0, 0, 0, - 0,0xF250,0xC371,0xC0CD,0xF253,0xC370,0xF258,0xF252, -0xF24D,0xEFE0, 0, 0, 0,0xC36F, 0,0xF24C, -0xF456, 0,0xF455,0xF255,0xC468, 0,0xF459,0xF45A, -0xF454,0xF458, 0,0xF453, 0, 0, 0, 0, -0xF5D1,0xF457,0xC4E7,0xC4E5,0xF5CF, 0, 0, 0, -0xF5D2, 0,0xF5CE,0xF5D0,0xC4E6, 0, 0, 0, -0xF6E5,0xF6E6,0xC576,0xF6E4, 0, 0, 0,0xF7E2, -0xC5CF,0xF7E0,0xF7E1,0xF8AC, 0, 0,0xC656,0xF8F3, -0xF8F1,0xF8F2,0xF8F4, 0, 0, 0,0xF9BB, 0, -0xA4ED,0xA6B8, 0,0xAA59, 0,0xCCE9, 0, 0, -0xCF64, 0, 0, 0,0xD1F5,0xD1F7, 0,0xD1F6, - 0,0xD1F8,0xB1FD,0xD5D7,0xD1F9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0xD24A,0xD24D,0xD246,0xD247,0xAF4A,0xAEFA,0xD256, -0xD25F,0xAF45,0xAEF6, 0,0xAF40,0xD24E,0xAF42,0xD24F, -0xD259, 0, 0, 0,0xAF44,0xD268,0xD248,0xAEFC, -0xAEFB,0xAF48,0xD245,0xD266,0xD25A,0xD267,0xD261,0xD253, -0xD262, 0,0xD25C,0xD265,0xD263,0xAF49,0xD254,0xAEF9, -0xAEF8,0xAF41,0xAF47,0xD260,0xAF46,0xD251,0xB243, 0, -0xD269,0xD250,0xD24B,0xAEFE,0xAF4B,0xAEF7, 0,0xD258, -0xD25D, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xB265,0xD5E1,0xD5E5, 0,0xB252,0xB250, - 0, 0,0xB247,0xD5E3,0xD5E2,0xB25B, 0,0xD5E8, -0xB255, 0,0xD5FA,0xD647,0xB244,0xD5F7,0xD5F0,0xB267, -0xD5E0, 0,0xD5FC, 0,0xB264,0xB258,0xB263,0xB24E, -0xD5EC,0xD5FE,0xD5F6,0xB24F,0xB249,0xD645, 0,0xD5FD, -0xD640,0xB251,0xB259,0xD642,0xD5EA,0xD5FB,0xD5EF,0xD644, -0xB25E,0xB246,0xB25C,0xD5F4,0xD5F2,0xD5F3,0xB253,0xD5EE, -0xD5ED,0xB248,0xD5E7,0xD646,0xB24A,0xD5F1,0xB268, 0, -0xB262,0xD5E6,0xB25F,0xB25D,0xB266,0xD5F8,0xB261,0xD252, -0xD5F9,0xB260,0xD641,0xB245,0xD5F5,0xB257,0xD5E9,0xB256, - 0,0xB254,0xB24C,0xB24B,0xD9E7,0xD643, 0, 0, -0xD5EB, 0, 0,0xD9FC, 0,0xB24D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xB541,0xB25A,0xB4EE,0xD9F6,0xB4FC, 0,0xD9EA, -0xB4EB,0xB4E7,0xDA49,0xB4ED,0xB4F1,0xB4EC,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0xDE44, 0, -0xDE5D, 0, 0, 0,0xDE5C, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE2AA,0xBAAD,0xE27D,0xE2A4,0xBAA2, - 0,0xE26E,0xBAAF, 0,0xBA77,0xE26D,0xE2B0,0xBAB1, -0xE271,0xE2A3, 0,0xE273,0xE2B3,0xE2AF,0xBA75,0xBAA1, -0xE653,0xBAAE,0xBA7D,0xE26F, 0,0xE2AE,0xBAA3,0xE2AB, -0xE2B8,0xE275,0xE27E, 0, 0,0xE2B6,0xE2AC,0xBA7C, - 0, 0,0xE27C,0xBA76,0xBA74,0xBAA8, 0, 0, -0xE27A,0xE277,0xE278, 0,0xE2B2, 0,0xE2B7,0xE2B5, -0xBA7A,0xE2B9,0xBA7E,0xBAA7, 0,0xE270,0xE5FA,0xE279, - 0,0xBA78,0xBAAC,0xBAA9,0xBA7B,0xE2A5,0xE274,0xBAAA, -0xE2A7,0xBAA4,0xBAA6,0xBA73, 0,0xE2A9,0xE2A1,0xE272, -0xBAA5,0xE2B1,0xE2B4,0xE27B,0xE2A8, 0,0xBA79,0xBCDF, -0xE2A6,0xE5F9, 0,0xE2AD, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE276,0xE644, -0xE64E,0xBCE2,0xE64D,0xE659,0xBCE4,0xE64B, 0,0xE64F, -0xBCEF, 0,0xE646,0xBCE7, 0,0xE652,0xE9F0,0xBCF3, -0xBCF2,0xE654,0xE643,0xE65E,0xBCED, 0,0xBCE3,0xE657, - 0,0xE65B,0xE660,0xE655,0xE649,0xBCE6,0xBCE9,0xBCF1, -0xBCEC, 0,0xE64C,0xE2A2, 0, 0,0xE648,0xE65F, -0xBCE8, 0,0xBCEB,0xE661,0xBCE0,0xE656,0xE5FB,0xE65C, -0xC0DF, 0,0xE64A, 0,0xBCE1,0xE645,0xBCE5,0xE5FC, -0xBAAB,0xE641, 0,0xE65A,0xE642,0xE640,0xBCEA, 0, -0xE658, 0,0xE5FE,0xE651,0xE650,0xE65D,0xE647,0xBCEE, - 0, 0, 0, 0, 0, 0,0xE9F3, 0, -0xBF49,0xBEFE,0xEA40,0xE9EB,0xBF41,0xE9F7,0xBF48,0xBF43, -0xE9F5,0xED4F,0xE9FB,0xEA42,0xE9FA,0xE9E9,0xE9F8,0xEA44, -0xEA46,0xBEFD,0xEA45,0xBF44,0xBF4A, 0,0xBF47, 0, -0xE9FE,0xBF46,0xE9F9, 0,0xE9ED,0xE9F2, 0,0xE9FD, -0xBF45,0xBF42,0xBEFC,0xBF40,0xE9F1, 0,0xE5FD,0xE9EC, -0xE9EF,0xEA41,0xE9F4,0xE9EA,0xED4E,0xEA43,0xE9EE,0xE9FC, - 0, 0, 0, 0,0xED51,0xC0E3, 0, 0, -0xC0D7, 0, 0,0xC0DB,0xED53,0xED59,0xED57,0xC0D9, -0xC0DA,0xC0E1,0xED5A,0xED52,0xC0DC, 0,0xED56,0xED55, -0xED5B,0xC0E2, 0,0xC0DD,0xC0E0,0xED54,0xC0E4,0xC0DE, -0xC0E5,0xC0D8,0xED58, 0,0xED50, 0, 0,0xEFF7, - 0, 0,0xC271,0xEFF4,0xEFF6, 0,0xC26F,0xEFF2, -0xEFF3,0xEFEE, 0, 0,0xE9F6,0xEFEF,0xC270,0xEFEB, - 0,0xC26D,0xEFF8,0xC26E,0xEFEC,0xEFED,0xEFF1,0xC273, - 0,0xC272, 0, 0,0xEFF0,0xC378,0xF25F,0xF265, -0xC379,0xF25C,0xC376,0xC373,0xF267,0xC377, 0,0xC374, -0xF25E,0xF261,0xF262,0xF263,0xF266, 0,0xEFF5,0xF25D, -0xC375,0xF264,0xF268,0xF260, 0, 0, 0,0xF45D, -0xC46A,0xF460,0xC46B,0xF468,0xF45F,0xF45C, 0,0xF45E, -0xF462,0xF465,0xF464,0xF467,0xF45B, 0,0xC469,0xF463, -0xF466,0xF469,0xF461,0xF5D3,0xF5D4,0xF5D8,0xF5D9, 0, -0xF5D6,0xF5D7,0xF5D5, 0,0xC4E9, 0, 0, 0, - 0,0xC578,0xF6EB, 0, 0,0xF6E8,0xF6E9,0xF6EA, -0xC579, 0,0xF7E5,0xF7E4, 0,0xF8AF,0xC5F4,0xF8AD, -0xF8B0,0xF8AE,0xF8F5,0xC657,0xC665,0xF9A3,0xF96C, 0, -0xF9A2,0xF9D0,0xF9D1,0xA4F5, 0, 0, 0, 0, -0xA6C7,0xCA41, 0, 0,0xCB5E, 0,0xA85F, 0, -0xA862, 0,0xCB5F, 0,0xA860,0xA861, 0, 0, - 0, 0,0xCD58,0xCD5A,0xCD55,0xCD52,0xCD54, 0, - 0, 0,0xAAA4, 0, 0, 0,0xAAA2, 0, - 0,0xCD56,0xAAA3,0xCD53,0xCD50,0xAAA1,0xCD57, 0, -0xCD51,0xAAA5,0xCD59, 0, 0, 0, 0,0xCFAF, - 0,0xCFB3, 0, 0,0xACB7, 0, 0, 0, - 0,0xCFB6, 0,0xACAF,0xACB2,0xACB4,0xACB6,0xACB3, -0xCFB2,0xCFB1, 0,0xACB1,0xCFB4,0xCFB5, 0,0xCFAE, -0xACB5, 0,0xACB0, 0, 0, 0,0xCFB0, 0, - 0, 0, 0, 0, 0,0xD277,0xD278,0xD279, -0xAF50, 0,0xAF4C,0xD26E, 0,0xD276,0xD27B,0xAF51, - 0,0xD26C,0xD272,0xD26B,0xD275, 0, 0,0xD271, -0xAF4D,0xAF4F,0xD27A, 0,0xD26A,0xD26D,0xD273, 0, -0xD274,0xD27C,0xD270, 0,0xAF4E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xB26D, -0xD64E, 0, 0,0xD650,0xD64C, 0,0xD658,0xD64A, -0xD657,0xB269,0xD648,0xDA5B,0xD652,0xB26C, 0,0xD653, -0xD656, 0,0xD65A, 0,0xD64F, 0,0xD654, 0, - 0,0xB26A,0xB26B,0xD659,0xD64D,0xD649,0xD65B, 0, -0xD651, 0, 0,0xD655, 0, 0, 0,0xD64B, - 0,0xB548,0xB549,0xDA65,0xB54F, 0,0xDA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,0xEA5A, 0, - 0,0xF272,0xC37D,0xF271,0xF270,0xF26E,0xF26F,0xC4EB, -0xF46C,0xF6EE,0xF8F7, 0,0xA4FC, 0,0xC9A5,0xA5C7, -0xC9A6, 0, 0, 0,0xCA43,0xCA44, 0, 0, - 0, 0,0xCB66, 0, 0,0xCB62, 0,0xCB61, -0xAAAC,0xCB65,0xA867,0xCB63,0xA866,0xCB67,0xCB64, 0, - 0,0xCD5F,0xCFBE,0xCD5D,0xCD64, 0,0xAAAD, 0, -0xAAB0,0xCD65,0xCD61, 0,0xCD62, 0,0xCD5C,0xAAAF, -0xCD5E,0xAAAE,0xCD63, 0,0xCD60, 0, 0,0xCFC2, -0xACBD,0xACBE, 0,0xCFC5,0xCFBF, 0,0xCFC4, 0, -0xCFC0,0xACBC,0xCFC3,0xCFC1, 0, 0, 0, 0, - 0, 0, 0,0xD2A8,0xD2A5, 0,0xD2A7,0xAF58, -0xAF57,0xAF55,0xD2A4,0xD2A9,0xAF54,0xAF56,0xD2A6,0xD667, -0xD2A3,0xD2AA, 0, 0, 0, 0, 0,0xD662, -0xD666, 0,0xD665,0xDA6E,0xDA79, 0, 0,0xD668, - 0,0xD663,0xDA6D,0xB274, 0, 0,0xB273,0xD661, -0xD664,0xB275, 0,0xB272,0xB271,0xD660,0xD669, 0, - 0, 0,0xDA70,0xDA77, 0,0xB554,0xDA76,0xDA73, - 0,0xB556, 0, 0, 0,0xDA75, 0, 0, -0xDA6F,0xDA71,0xDA74,0xDA72,0xB555,0xDA78,0xB553,0xB7DF, - 0, 0,0xDEAD,0xDEAC,0xDEAA, 0,0xB7E2,0xB7E1, -0xDEAE, 0,0xDEAB,0xE2CA,0xBABB,0xB7E0, 0, 0, - 0,0xDEB0,0xDEAF, 0,0xE2CD,0xE2CB,0xBCFA, 0, -0xBABC,0xE2CC,0xE676, 0, 0, 0, 0,0xBCFB, -0xE675,0xE67E,0xE67D,0xE67B, 0,0xE67A,0xE677,0xE678, -0xE679,0xE67C,0xE6A1, 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 0, 0,0xC5A3, -0xC5A2, 0, 0,0xC5D3,0xC5D2,0xC5D4,0xF7ED,0xF7EC, - 0,0xF8FB,0xF8B8,0xF8FC,0xC658, 0,0xC659,0xF96D, - 0, 0,0xC67E,0xA6CC, 0,0xCDA8, 0, 0, -0xD045,0xD046,0xD044, 0, 0,0xACF3, 0,0xD047, -0xD048,0xD049, 0, 0,0xD349,0xD34F, 0, 0, -0xD34D,0xAFBB,0xD34B, 0,0xD34C,0xD34E, 0, 0, - 0,0xD34A,0xB2C9, 0,0xD6DE,0xB2CB,0xD6E0,0xB2CA, -0xD6DF, 0, 0, 0, 0, 0,0xDAE8,0xB5AF, - 0,0xDAEA,0xDAE7,0xD6E1, 0,0xB5B0, 0,0xF9DB, -0xDAE9, 0, 0, 0, 0, 0, 0,0xDF56, - 0,0xB864,0xDF54,0xB865,0xDF55,0xB866, 0, 0, - 0,0xBAE9,0xE361,0xE35E,0xE360,0xBAEA,0xBAEB,0xE35F, - 0, 0, 0, 0, 0,0xE6DF, 0, 0, -0xE6E0, 0,0xBD6B,0xE6E2,0xE6E1, 0,0xA261, 0, -0xEACA,0xEACB,0xEAC7, 0,0xEAC8,0xBF7C,0xBF7D,0xEAC9, - 0,0xC157, 0, 0,0xC153,0xC158,0xC154,0xC156, -0xC152, 0,0xC155, 0, 0, 0, 0,0xC2B3, -0xEDCF, 0,0xF2AE, 0,0xF2AD, 0,0xF4AB,0xC47A, -0xC47B,0xF741,0xF5E6, 0,0xF740, 0,0xF8FD,0xF9A4, -0xA6CD, 0, 0,0xA874, 0,0xCDA9,0xAAC8, 0, -0xACF6,0xD04C,0xACF4,0xD04A,0xACF9,0xACF5,0xACFA,0xACF8, -0xD04B,0xACF7,0xAFBF,0xAFBE,0xD35A,0xAFC7,0xD353,0xD359, -0xAFC3,0xD352,0xD358,0xD356,0xAFC2,0xAFC4,0xD355,0xAFBD, -0xD354,0xAFC8,0xAFC5,0xAFC9,0xAFC6,0xD351,0xD350,0xD357, -0xAFC0,0x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,0xD368, 0, 0, 0,0xAFD4,0xD367,0xAFD5, - 0, 0, 0,0xD743, 0, 0,0xB2E2,0xD742, -0xD744, 0,0xB2E1, 0, 0, 0, 0,0xDB46, -0xDB47,0xDB45,0xB5C1, 0, 0, 0,0xB874, 0, -0xB875, 0,0xBB45, 0,0xE3A3,0xE3A2,0xBB44, 0, - 0, 0, 0, 0,0xE6FB, 0, 0,0xE6FC, - 0, 0, 0, 0,0xEAE7, 0, 0,0xC170, -0xC16F,0xC16D,0xC16E,0xC171, 0,0xF07C,0xC2BF,0xC2BE, -0xF2C0,0xF4B2, 0, 0, 0,0xC5A5,0xC5A4,0xA6D6, - 0, 0,0xD1FB, 0,0xB877,0xB5C2,0xB876,0xBB46, - 0,0xA6D7,0xC9A9,0xA6D8,0xA6D9, 0, 0,0xCDAB, -0xCB76, 0,0xCB77,0xA877, 0,0xCB74,0xA876, 0, -0xA879,0xCB75,0xA87B,0xA87A,0xCB78,0xA878, 0, 0, - 0,0xAAD1,0xAACF,0xCDAD, 0,0xAACE, 0, 0, - 0,0xAAD3,0xAAD5,0xAAD2, 0,0xCDB0,0xCDAC,0xAAD6, - 0,0xAAD0,0xA87C, 0,0xAAD4,0xCDAF, 0, 0, -0xCDAE, 0,0xAACD, 0, 0, 0, 0, 0, - 0, 0,0xD05B,0xAD47,0xAD48,0xD05D, 0,0xD057, -0xD05A,0xD063,0xD061, 0,0xAD49,0xD067,0xAD4C,0xD064, -0xD05C,0xD059, 0, 0,0xDB49,0xD062,0xAD44,0xD065, -0xD056,0xD05F,0xAD46,0xAD4B,0xD060,0xAD4F,0xAD4D, 0, -0xD058,0xAD4A, 0,0xD05E,0xAD4E,0xAD45,0xD066, 0, - 0, 0, 0, 0, 0,0xAFDA, 0,0xAFE3, -0xAFD8,0xAFD6,0xD36A,0xAFDE,0xAFDB,0xD36C, 0, 0, -0xAFDD,0xD36B,0xD369,0xD36E,0xAFE2,0xAFE0,0xDB48, 0, -0xD36F,0xD36D,0xAFD7, 0, 0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,0xAFF8,0xD072,0xDB5C,0xD3A6, 0, 0,0xD37A, -0xAFFB,0xD37B,0xD3A1,0xAFFE,0xD375,0xD3AF, 0,0xD3AE, -0xD3B6,0xAFF3,0xAFF0,0xD3B4,0xD3B0,0xD3A7,0xD3A2,0xAFF6, -0xAFF2,0xD377,0xAFEE,0xD3B1,0xAFEF, 0,0xD379, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xD75E,0xD760,0xD765,0xD779,0xB2FC, -0xB2F2, 0,0xD75D,0xB2FD,0xB2FE,0xD768,0xD76F,0xD775, - 0,0xD762, 0,0xD769, 0, 0,0xB340,0xD777, -0xD772,0xB2FA,0xB2F8,0xD76E,0xD76A,0xD75C,0xB2EF,0xD761, -0xD759, 0,0xB2F7,0xB2F9,0xD766,0xD763,0xB2F4,0xD773, -0xB2F1,0xD764,0xD77A,0xD76C, 0,0xD76B,0xB2F0, 0, -0xB2FB, 0,0xB2F3,0xD75A,0xD75F,0xD770,0xD776,0xB341, -0xD75B,0xD767,0xD76D,0xB2F6, 0, 0,0xD778,0xD771, -0xD774, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xB2F5, 0,0xDB6C, -0xDB60,0xB5D7,0xDB7D,0xDBA7,0xDBAA,0xB5D5,0xDB68,0xDBA3, -0xDB69,0xDB77,0xB5E2,0xDB73,0xB5DF, 0,0xDB74,0xDB5D, - 0,0xDBA4, 0, 0,0xB5E8,0xDBA1,0xDB75,0xDBAC, -0xDB70,0xDFC8, 0,0xDBAF,0xB5E6,0xDB6E,0xDB7A,0xB5E9, -0xB5D4,0xDB72,0xDBAD,0xDB6B,0xDB64,0xDB6F, 0,0xDB63, -0xDB61,0xB5D0,0xDBA5,0xDB6A,0xDBA8, 0,0xDBA9,0xB5D8, -0xB5DD,0xB5D9,0xB5E1,0xDB7E,0xB5DA,0xDB76,0xDB66, 0, -0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xE3B5,0xE3B3, 0,0xE3B4,0xE3C7, -0xE3D2,0xE3BC,0xBB5A, 0,0xE3B7, 0,0xE3CB, 0, -0xBB5D,0xE3B6,0xE3B0,0xE3C0,0xBB61, 0, 0,0xBB55, -0xBB5E,0xE3B8,0xE3B2, 0,0xBB57,0xDFD4,0xBB56,0xE3C3, - 0,0xBB54,0xBB63,0xBB5C,0xE3C4,0xE3B9,0xE3B1,0xE3CC, -0xE3BD,0xBB62,0xE3D0,0xBB5F,0xE3CF, 0,0xE3C9,0xE3CE, - 0, 0, 0,0xE3D1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE773, -0xE774,0xE767,0xE766,0xE762,0xBDB4, 0,0xBDAC,0xE776, -0xE775,0xDFA9,0xE75F,0xE763,0xE75D, 0,0xE770,0xE761, - 0,0xE777,0xE75A,0xE758,0xE764,0xE76E,0xE769,0xBDB6, -0xE74F, 0,0xE76D, 0, 0, 0,0xBDB7,0xDFBD, -0xE75B,0xE752,0xE755,0xE77B,0xE75C,0xE753,0xE751,0xE74E, - 0,0xBDB0,0xE765,0xBDAF,0xBDB3,0xE760,0xE768,0xBDA9, -0xE778,0xE77C,0xBDAB, 0,0xE757,0xE76B,0xE76F,0xE754, -0xE779,0xBDB2, 0,0xBDB1,0xE74C,0xBDB5,0xE772,0xE756, -0xE76A,0xE750,0xE75E,0xE759,0xBDAD,0xBDAE,0xE76C,0xE77D, -0xE77A,0xE771, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE74D, 0,0xBDAA,0xEB49, 0, -0xEB40,0xEB43, 0,0xBFBB,0xEB45,0xEAF9,0xEB41,0xEB47, -0xBFB8,0xBFBC,0xBFB6, 0, 0,0xEAFB,0xEB4C, 0, - 0,0xEB46, 0,0xEAFC,0xEB55,0xEB4F,0xEAF8,0xEE46, -0xEAFE,0xBFB7, 0,0xEB4A, 0,0xEB54,0xBFBF, 0, -0xEB51,0xEAFD,0xEB44,0xEB48,0xEB42,0xEB56,0xEB53,0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,0xAD6E,0xD7C5,0xB5F7, 0,0xDFFA,0xC2D0, 0, -0xF2F2, 0, 0,0xA8A3, 0, 0, 0,0xB357, - 0, 0, 0,0xB356, 0,0xDBD0,0xB5F8,0xDBD2, -0xDBD1, 0, 0,0xDFFB,0xB8D0,0xE443,0xE446,0xE445, - 0,0xE444,0xE7CE,0xE7D0,0xE7CF, 0,0xBFCC, 0, - 0, 0,0xBFCB, 0,0xC1BB,0xEE79,0xEE7B,0xEE7A, - 0, 0,0xC2D1, 0, 0, 0,0xF2F4,0xF2F3, - 0,0xF4CC,0xC4B1, 0, 0,0xC4FD,0xF754,0xF753, -0xC65B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xA8A4,0xD0AF,0xAD6F,0xD7C8,0xD7C6, 0, - 0,0xD7C7,0xDBD4,0xDBD5,0xE043,0xDBD3, 0,0xDFFC, -0xE041,0xE040,0xE042,0xB8D1,0xDFFE,0xDFFD,0xE044, 0, -0xE449,0xE447, 0,0xE448,0xE7D3,0xE7D1, 0, 0, -0xE7D2,0xEB7D,0xEE7C,0xEE7D,0xC2D2, 0,0xF2F5,0xF4CD, -0xC4B2, 0,0xF64C,0xF755,0xC5A9, 0,0xF7FE,0xF94C, -0xA8A5, 0,0xAD71,0xAD72,0xD0B0, 0, 0,0xD0B1, -0xAD70, 0,0xB054, 0,0xB052, 0,0xB051,0xB058, -0xB050,0xB059,0xD3DD,0xB056, 0,0xB053,0xB057,0xB055, -0xB04F, 0, 0,0xB35F, 0,0xB359,0xD7CC,0xB35E, - 0, 0,0xB360,0xB35A, 0,0xB35B, 0,0xD7CA, - 0, 0,0xB358, 0,0xD7CB,0xB35D, 0, 0, -0xD7C9,0xB35C, 0, 0,0xB644, 0,0xB646, 0, - 0,0xDBD8,0xB645,0xB5F9,0xB5FD, 0,0xB8E4,0xE049, -0xDBDA,0xB5FE, 0, 0,0xDBDD,0xDBDE,0xB643, 0, -0xDBE0, 0,0xDBE2,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,0xD3E3,0xB05F, -0xD3E4,0xD7D5, 0,0xD7D4, 0,0xD7D3, 0, 0, -0xDBEE,0xB658, 0, 0,0xDBED,0xB657, 0, 0, - 0,0xDBEF,0xB656, 0,0xE05F,0xE062,0xE060,0xE061, -0xE065,0xE05E,0xE066,0xE063,0xE064,0xBBB0,0xE456, 0, - 0,0xBBAF, 0,0xE7F2,0xE7F0, 0, 0,0xBDEB, -0xE7EF,0xE7F1, 0,0xBDEC, 0,0xEBBB, 0,0xEBBC, -0xC1CD, 0,0xF34C,0xF34E,0xF34B,0xF34D,0xF4D6,0xF654, - 0, 0,0xF96F,0xA8AC,0xAD77,0xD3E5,0xD3E7,0xD3E6, - 0,0xD7D8,0xB36C, 0,0xD7D6, 0,0xB36B,0xD7D9, - 0,0xD7DA,0xD7D7, 0, 0,0xDBFB,0xB660,0xDBF3, -0xDBF9, 0, 0,0xB65B,0xB65E,0xDBF2,0xB659,0xDBF6, -0xE06C,0xB65D, 0,0xDBF1, 0,0xDBF7,0xDBF4,0xDBFA, -0xDBF0,0xDBF8,0xB65C,0xB65F,0xDBF5,0xB65A, 0,0xB8F2, -0xE068,0xB8F1,0xE06F,0xE06E,0xB8F8, 0,0xB8F9,0xE070, -0xB8F3,0xE06D,0xB8F7,0xE072,0xE069, 0,0xE06B,0xB8F4, -0xE067,0xE06A,0xE071,0xB8F5,0xE073, 0, 0, 0, - 0, 0,0xB8F6, 0,0xBBB1,0xE45B,0xE461,0xE459, -0xE462, 0,0xE458,0xE45D,0xE463,0xE460,0xE45F,0xE45E, - 0,0xE457,0xE45C, 0, 0,0xE45A, 0,0xBDF1, -0xBDEE,0xE7FB,0xE841,0xE843,0xE840,0xE7F8,0xE7FA,0xE845, -0xE842,0xE7FC,0xE846,0xE7F9,0xE844,0xBDEF,0xBDF5,0xBDF3, -0xE7F3,0xBDF4,0xBDF0,0xE7F4,0xE7F6,0xE7F5,0xE7FD,0xE7FE, - 0,0xBDF2, 0,0xBDED, 0, 0,0xE7F7, 0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A, 0,0xDC42,0xDBFC, - 0,0xDC49, 0, 0,0xDC4B,0xDC44,0xDC47,0xDBFD, -0xB662,0xDC40,0xDBFE,0xB661,0xB663, 0,0xB8FD,0xE075, -0xE077,0xE076,0xE07B,0xB8FB, 0,0xE078,0xE074,0xE079, -0xE07A,0xB8FC,0xB8FE,0xE07C, 0,0xE467,0xE466, 0, -0xE464,0xE465,0xBBB3,0xBBB5,0xBBB2,0xBBB4,0xE84D,0xE84E, -0xE849, 0,0xE84A,0xBDF8,0xBDFD,0xBDF7,0xBDFE,0xBDF9, -0xE84B, 0, 0,0xE84C,0xE848,0xBE40,0xBDFB, 0, - 0,0xBDFA,0xBDFC, 0,0xE847, 0,0xEBCA,0xBFE8, - 0, 0,0xEBCC,0xBFEA,0xEBCF,0xEBCB,0xEBC9,0xEBCE, -0xBFE9,0xEBCD, 0,0xBFE7, 0, 0,0xC1D3,0xC1D6, -0xEEC1, 0,0xC1D4,0xEEC0,0xC1D2,0xC1D5,0xF146,0xF147, -0xF148,0xC2E0, 0,0xF149, 0,0xC2E1,0xC3E2,0xF358, -0xF359,0xF357,0xF356,0xF35A,0xC3E1,0xF4DD,0xF4DB,0xF4DC, -0xF4DE,0xF4DA,0xF4DF,0xF658, 0,0xF659,0xF657,0xC546, -0xF764,0xC5AF,0xF765,0xF848,0xF847, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xA8AF,0xB664, 0, 0,0xB940, - 0, 0, 0,0xBBB6, 0, 0,0xBFEC, 0, -0xBFEB, 0, 0, 0, 0,0xC3E3,0xC47C,0xC547, -0xA8B0,0xB064,0xB941, 0,0xF35B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xCBA6, - 0, 0,0xA8B1, 0,0xA8B4,0xA8B3,0xA8B2, 0, - 0,0xCBA5, 0,0xCDCD, 0,0xCDCF,0xAAEF, 0, - 0,0xAAF1,0xCDCC,0xCDCE,0xAAF0,0xCDD1,0xCDD0,0xCDD2, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD0B6,0xD0B4,0xAD7C,0xD0B3,0xADA3,0xAD7E,0xAD7B, 0, -0xADA4, 0,0xAD7D,0xADA2, 0,0xADA1,0xD0B5, 0, -0xAD7A, 0, 0, 0,0xB06A,0xD3EB,0xD3F1,0xB067, -0xB06E, 0,0xB069,0xD3EE,0xD3F0,0xB06C,0xD3EA,0xD3ED, -0xB068,0xB065,0xD3EC,0xB06B,0xD3EF,0xB06D,0xB066, 0, - 0, 0, 0,0xD7E3,0xD7E6,0xB370, 0,0xB37A, -0xB376,0xD7E4, 0, 0,0xB37E,0xB377,0xB37C,0xB372, - 0,0xB36F,0xB371,0xB37D,0xD7E5,0xB375,0xB378,0xB374, -0xB379,0xD7E7,0xB37B,0xB373,0xD7E2, 0, 0, 0, - 0, 0, 0, 0, 0,0xDC4D,0xB665,0xDC4F, - 0,0xB667,0xB669, 0,0xDC4E,0xB666,0xB66A, 0, -0xB668, 0, 0, 0,0xB947,0xE0A3,0xB94F,0xE07E, - 0,0xB950,0xB945, 0,0xE0A1, 0, 0,0xB94A, - 0,0xE0A2,0xB943,0xB942, 0,0xB94D,0xB94C,0xB94B, -0xB949,0xB94E,0xE07D,0xB944,0xB946,0xB948, 0, 0, -0xBBB8,0xBBBB, 0,0xBBBF,0xBBB9,0xBBBE,0xBBBC, 0, -0xBBB7, 0,0xBBBD,0xBBBA, 0, 0, 0,0xE852, -0xBE43,0xBE41, 0,0xE853, 0,0xBE44,0xBE42,0xE851, -0xE850, 0,0xBFF0,0xE84F,0xBFEE,0xBFED,0xEBD0,0xBE45, -0xBFEF,0xEBD1,0xBFF2,0xEBD2,0xBFF1,0xC1D8,0xEEC3,0xC1D7, -0xC1DC,0xC1DA,0xC1DB,0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BD6,0xEBD7, 0, -0xEEC4,0xC1DD,0xF14B,0xF14C, 0, 0,0xF14D,0xF35D, -0xF35C,0xF4E2, 0,0xF4E1,0xF65B,0xF65C,0xF65A,0xF766, -0xC5B0,0xA8BB,0xADAA,0xADA9,0xB075,0xB074,0xD440,0xD441, -0xD3FE, 0,0xB073,0xD7F5, 0,0xD7F6,0xD7F2,0xB3A4, -0xD7F3, 0,0xD7F4, 0, 0, 0, 0,0xDC5F, -0xDC61,0xDC5D,0xDC60,0xB66F,0xDC5E,0xB670, 0, 0, -0xDD73,0xB955,0xB954, 0,0xB953, 0,0xE0AC,0xE0AD, - 0, 0,0xE473,0xE475,0xBBC6,0xBBC3, 0,0xBBC5, -0xBBC4,0xE474,0xE472, 0, 0, 0, 0, 0, -0xE861,0xE85E,0xE85F,0xBE4D,0xE860,0xE85B,0xE85C,0xBE4A, - 0,0xBE4B,0xE85D,0xBE4C, 0,0xEBDB, 0,0xEBDC, -0xEBD9,0xEBDA,0xBFF4,0xEBD8, 0, 0, 0, 0, - 0,0xEEC8,0xEEC5,0xEEC7,0xC1E0,0xEECB,0xC1DF,0xEEC9, -0xEECC,0xEECA,0xEEC6,0xC1DE, 0,0xF14F, 0,0xF150, -0xF14E, 0,0xF152,0xC2E5,0xC2E6,0xF35F,0xC3E7,0xF151, -0xF35E,0xC3E6,0xF4E5,0xF4E6,0xC4BF,0xF4E4, 0,0xF4E3, - 0,0xF65D,0xC548, 0,0xF849,0xF8C8,0xF8C7, 0, -0xC643,0xC65D,0xF8C9,0xF971, 0,0xC66F,0xA8BC,0xAAF6, - 0,0xB956, 0,0xC4C0,0xA8BD,0xADAB,0xB3A5,0xB671, -0xC2E7,0xAAF7, 0,0xD0C1,0xD0C0,0xD442, 0,0xB078, -0xB076,0xB07A,0xD444, 0,0xB079,0xB077, 0, 0, - 0, 0,0xD443,0xB3A8,0xD7FC, 0,0xB3A7,0xB3A9, -0xD842,0xB3AB,0xD7FE,0xD840,0xD7F7,0xB3AA,0xD843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B7,0xE47D,0xE4A3,0xBE52, 0, 0, 0, - 0, 0,0xBE5A,0xBE55,0xE8A4,0xE8A1,0xE867,0xBE50, - 0,0xF9D7, 0,0xBE4F,0xBE56, 0, 0, 0, -0xE865,0xBE54,0xE871,0xE863,0xE864,0xBE4E,0xE8A3,0xBE58, -0xE874,0xE879,0xE873,0xEBEE,0xE86F,0xE877,0xE875,0xE868, -0xE862,0xE87D,0xBE57,0xE87E, 0,0xE878, 0,0xE86D, -0xE86B,0xE866, 0, 0, 0,0xE86E,0xE87B,0xE86A, -0xE87A,0xE8A2, 0, 0,0xBE53, 0,0xE876,0xE87C, -0xE872,0xE86C,0xBE51, 0, 0, 0,0xE4A8,0xE870, -0xBE59,0xE869, 0, 0, 0, 0, 0,0xEBF4, -0xBFF7,0xEBF3,0xEBF0,0xEC44,0xBFFB, 0,0xEC41,0xEBF8, -0xEC43,0xEBE9,0xEBF6, 0,0xBFFD, 0,0xEBE1, 0, -0xEBDF,0xEC42, 0,0xEC40,0xEBFE,0xEBED,0xEBEC,0xEBE2, -0xC040, 0,0xEBE8,0xEBF2,0xEBFD,0xC043,0xEC45, 0, -0xC1E8,0xC045,0xBFFE,0xEBE6, 0,0xEBEF,0xEBDE,0xEBE0, -0xBFF5,0xC042,0xBFFA,0xEBE7,0xEBF7,0xEBF1,0xC041,0xEBDD, -0xC1E3,0xEBF9,0xEBFC,0xBFFC, 0,0xEBEB,0xC044,0xBFF9, - 0, 0, 0,0xBFF8,0xEBF5,0xEBFB,0xBFF6, 0, -0xEBE4,0xEBFA, 0, 0,0xEBE5, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xEBEA,0xEED2, - 0,0xEED7,0xC1E5,0xC1E7,0xEEDD,0xC1E1,0xEEEC,0xEEE3, -0xEED8,0xEED9,0xEEE2, 0,0xC1EE,0xEEE1,0xEED1,0xEEE0, -0xEED4,0xEEED,0xC1ED,0xC1EB,0xEED5, 0,0xEEE8, 0, -0xEEDA,0xEEE7, 0,0xEEE9,0xEED0,0xC1E6, 0,0xEEEA, - 0, 0,0xEEDE, 0,0xC1EA,0xEEDB, 0, 0, -0xC1EC,0xEEE4, 0, 0, 0,0xC1E4,0xEED6,0xEEE5, - 0,0xEEDF,0xEBE3,0xEEE6,0xEED3, 0,0xC1E9, 0, -0xEEEB, 0,0xC1E2,0xEECE, 0, 0, 0, 0, -0xF160,0xF159,0xC2E9, 0,0xF154,0xF163,0xF15B,0xEEDC, - 0,0xF165,0xF155, 0,0xC2E8,0xF15F,0xC2EA,0xC2F2, -0xC2F0,0xF161,0xC2F1,0xF157, 0,0xF158,0xF15D,0xF162, - 0,0xEECD,0xC2EB,0xF16A,0xF167,0xF16B,0xF15E,0xF15A, -0xF168,0xF36A,0xF15C, 0,0xC2EE, 0,0xC2ED,0xEECF, -0xC2EF,0xF164,0xF166,0xC2EC,0xF169,0xF153, 0,0xF156, - 0, 0, 0, 0, 0, 0, 0, 0, -0xF373, 0,0xF363,0xC3EB,0xF371, 0, 0,0xF361, -0xC3EC, 0,0xF36C, 0,0xF368,0xC3F1,0xF372,0xF362, -0xF365,0xC3E9,0xF374, 0,0xF36D,0xF370,0xC3EF,0xC3F4, -0xC3F2,0xF369,0xF364, 0,0xC3ED,0xC3EE,0xF360,0xC3EA, - 0,0xC3E8,0xC3F0,0xF36F,0xC3F3, 0,0xF36B,0xF375, -0xC3F5, 0, 0, 0,0xF367, 0,0xF36E, 0, - 0, 0, 0, 0, 0,0xF4F3,0xF542,0xF4F5, -0xF4FC,0xF366,0xF4FA,0xF4E9,0xF540,0xC4C3,0xF4ED,0xF4FE, -0xF4F4, 0, 0,0xC4C2, 0, 0,0xF544,0xF4F6, - 0,0xF4FB,0xF4FD,0xF4E7,0xF541,0xF4F2,0xF4F7,0xF4EB, -0xF4EF,0xF543,0xF4F9,0xF4E8,0xF4EC,0xF4EE,0xF4F8, 0, -0xC4C1,0xF4F1, 0, 0, 0, 0, 0, 0, -0xF4EA, 0, 0, 0, 0, 0, 0, 0, -0xF4F0,0xF661,0xF666,0xC54F,0xF668, 0,0xC549, 0, -0xF664,0xF66A,0xC54E,0xC54A, 0,0xC54B,0xF660,0xF667, -0xC54D,0xF665,0xC54C,0xF65F,0xF663,0xF662, 0,0xF65E, -0xF669, 0, 0, 0,0xC5B1,0xF76D,0xF770,0xF76C, -0xF76E,0xF76F,0xF769,0xF76A,0xF767, 0, 0,0xF76B, -0xF768,0xC5B2,0xC5B3, 0, 0,0xF84B, 0,0xF84D, - 0, 0, 0, 0, 0,0xF84C,0xF84E, 0, -0xC5E0, 0,0xF84A,0xC5DF,0xC5E1, 0, 0, 0, -0xF8CB,0xF8CC,0xC644,0xF8CA, 0,0xF953,0xF952,0xF954, -0xC65F,0xF955,0xC65E,0xF956,0xF972,0xF975,0xF974,0xC668, -0xF973, 0, 0, 0,0xC672,0xC670,0xC671,0xC677, -0xF9C0,0xF9C1,0xF9BF,0xF9C9}; - -/* page 8 0x9577-0x9FA4 */ -static uint16 tab_uni_big58[]={ -0xAAF8, 0, 0,0xD844,0xDC78,0xE8A5,0xF376, 0, - 0,0xAAF9, 0,0xADAC,0xB07B, 0, 0,0xD845, - 0,0xD846,0xB3AC, 0,0xB67D,0xDC7A,0xDC79,0xB6A3, -0xB67C,0xDC7B,0xB67E,0xB6A2,0xB6A1,0xB67B, 0, 0, - 0,0xB968, 0, 0,0xE0D0,0xE0CE, 0,0xE0CF, -0xE0CD, 0,0xBBD2, 0,0xBBD5,0xBBD7,0xBBD6, 0, - 0,0xBBD3,0xBBD4, 0,0xE8A7,0xE8A6,0xBE5B,0xE8A8, - 0,0xE8A9,0xBE5C, 0, 0, 0,0xEC4D,0xEC4B, -0xEEF3, 0,0xEC49,0xEC4A,0xC046,0xEC46,0xEC4E,0xEC48, -0xEC4C,0xEEEF, 0, 0,0xEEF1, 0,0xEEF2,0xC1F3, -0xEEEE,0xC1F2,0xEEF0,0xC1EF,0xC1F0,0xC1F1,0xEC47, 0, - 0,0xC2F5,0xF16E,0xF16C,0xF16D,0xC2F3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xC047,0xC048,0xEC4F,0xC049, 0,0xEEF6, 0,0xEEF4, - 0,0xEEF5,0xC1F4, 0,0xF16F,0xC3F7, 0, 0, - 0,0xC1F5,0xAB41, 0,0xB0A6,0xD447, 0, 0, -0xD84C,0xB3B6,0xB6AD,0xDCA4,0xDCA6,0xB6AF,0xB6AE,0xB6B0, -0xB6B1,0xDCA5,0xB96E,0xB96F,0xB96D,0xBBDB,0xB96C,0xE0D5, - 0, 0, 0,0xBBDC,0xE8AC,0xEC50,0xC04A,0xC1F6, -0xF170,0xF174,0xC2F9,0xF171,0xC2FA,0xC2F8,0xF175,0xC2FB, -0xF173, 0,0xF379,0xC2F7,0xC3F8, 0,0xF8CD, 0, - 0,0xAB42,0xB3B8,0xB3B7, 0, 0, 0, 0, -0xB6B2,0xDCA8,0xDCA7,0xB6B3, 0, 0,0xE0D9,0xB973, -0xB970,0xE0D8,0xB972,0xE0D6,0xB971, 0,0xE0D7, 0, -0xE4BD,0xBBDD, 0,0xE8AF, 0,0xBE5D,0xE8AD,0xBE5E, -0xBE5F,0xE8AE,0xBE60, 0,0xEC51, 0,0xC04E,0xC04B, -0xC050,0xEC53,0xC04C,0xEC52,0xC04F, 0, 0,0xC04D, - 0,0xEEF9,0xEEFB, 0, 0,0xC1F7,0xEEFA,0xC1F8, -0xEEF8,0xEEF7, 0,0xF177,0xF176,0xC2FC,0xF178,0xF37E, -0xC3FA,0xF37D,0xF37A,0xC3F9,0xF37B,0xF37C, 0,0xF548, -0xF549,0xC4C5, 0,0xC553, 0, 0,0xF66E, 0, - 0,0xC551,0xC552,0xF66F, 0, 0,0xC5B4,0xC5B5, -0xF771, 0, 0,0xC645,0xF8CF,0xC647, 0,0xF8CE, -0xF8D0,0xC646,0xF957, 0,0xF9AD, 0, 0, 0, - 0, 0, 0,0xAB43, 0, 0, 0,0xB974, - 0,0xE4BE, 0,0xE8B0,0xC051,0xC052, 0,0xAB44, - 0,0xBE61,0xC3FB,0xADB1, 0, 0, 0,0xC053, - 0,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8, -0xE8BD,0xE8BA,0xE8B9, 0,0xBE66, 0,0xC059, 0, -0xEC5A,0xC055, 0,0xEC5B, 0, 0,0xEC59, 0, -0xC058,0xC056,0xC05A, 0,0xC057, 0, 0, 0, - 0, 0,0xEF45, 0,0xEF4A,0xEF46,0xEF49,0xC1FB, - 0,0xEDD4,0xEF48,0xEF47, 0,0xC344,0xC342,0xC345, -0xC343,0xF1A8,0xF1A9,0xF1AA,0xC346, 0, 0, 0, -0xF3AA,0xC440,0xF3A8, 0,0xC441,0xF3A7,0xF3A9,0xC3FE, -0xF551,0xF54E, 0,0xF54F,0xF550,0xF672,0xC556, 0, -0xC555, 0,0xF774,0xF773,0xC5B8, 0, 0, 0, -0xC5E3,0xC649,0xC660,0xF958,0xF9AE,0xF9AF, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xADB7,0xDCAD, 0, 0,0xE0E1,0xE4CC,0xE4CD, -0xBBE3, 0,0xBBE4,0xE8BE,0xBE68, 0, 0,0xC1FC, - 0,0xF1AB, 0,0xC347,0xF3AD,0xC442,0xF3AC,0xF3AE, -0xF3AB,0xF675,0xF552,0xF553, 0,0xC4C6, 0,0xF674, - 0, 0,0xF673, 0,0xF775,0xF9B0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xADB8, 0, 0, 0, -0xADB9, 0, 0,0xB0A7,0xD448, 0,0xD84F, 0, -0xB6B8, 0,0xB6BB,0xB6B9,0xDCAE, 0,0xB6BD, 0, -0xB6BA, 0, 0,0xB6BC, 0,0xB97E, 0,0xE0E2, - 0, 0,0xE0E3,0xE8C0, 0,0xB97D,0xB9A1,0xB9A2, - 0,0xE4CF, 0,0xE4CE,0xBBE5, 0,0xBBE6, 0, -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0xE8D0,0xE8CE,0xBE74, 0,0xBE70,0xE8C6,0xBE6D, 0, -0xBE6F, 0, 0,0xC063,0xEC66,0xEC64,0xEC63, 0, -0xEC69, 0,0xEC68,0xEC67, 0,0xEC62,0xC062,0xEC61, - 0,0xEC65,0xC064, 0, 0,0xEF5A, 0,0xEF5E, -0xEF5B,0xEF5D,0xEF5C,0xEF59,0xEF5F,0xEF62,0xEF60,0xEF61, -0xC240, 0,0xC1FE,0xEF58,0xEF63,0xF1B3,0xF1B6,0xF1B8, -0xF1B7, 0,0xF1B1,0xF1B5,0xF1B0, 0,0xF1B2,0xC34D, -0xF1AF, 0,0xF1B4, 0, 0,0xF3C0,0xF3B5,0xC445, - 0, 0,0xC446,0xF3B4,0xF3B9,0xF3BF,0xF3B7,0xF3BE, - 0,0xF3BB, 0,0xF3BA,0xF3BD,0xF3B8,0xF3B6, 0, -0xF3BC, 0,0xF560,0xF55E,0xC4CA,0xF55D,0xF563,0xF561, - 0,0xC4CB,0xF55C,0xF55A, 0,0xF55B,0xC4CD,0xF55F, -0xC4CC,0xF562,0xF678,0xF67E, 0, 0,0xF679,0xC55B, -0xF6A1,0xC55A,0xF67D,0xF67C,0xC559,0xF67B,0xC558,0xF67A, - 0,0xF77D,0xF7A1,0xF77E, 0,0xF77B,0xC5BB,0xF778, -0xF77C,0xF7A3, 0,0xF7A2,0xF779,0xF77A,0xC5BA,0xF852, -0xC5E7, 0,0xF853,0xC5E5,0xC5E6, 0, 0,0xF8D3, -0xC64A,0xF976, 0,0xC66A, 0,0xF9B3,0xC66B,0xF9B4, -0xF9B5,0xF9C3,0xF9C2,0xC67A,0xF9CD, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,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0xC56A, 0, 0,0xC5C6,0xF7CD,0xC5C5, 0,0xF8A3, -0xF8A4,0xF8A2,0xF8A1,0xC654, 0,0xF8EB,0xF8EC,0xF8ED, -0xC653,0xF967,0xF96A,0xF969,0xF968, 0, 0,0xF9D3, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xC073, 0, - 0,0xC365,0xF5BF,0xF6D5, 0,0xC5C7,0xF7CE, 0, - 0,0xF9D5, 0, 0, 0,0xC074, 0, 0, - 0,0xEFB6, 0,0xF7CF, 0,0xF9A1}; - -/* page 9 0xFA0C-0xFA0D */ -static uint16 tab_uni_big59[]={ -0xC94A,0xDDFC}; - -/* page 10 0xFE30-0xFFFD */ -static uint16 tab_uni_big510[]={ -0xA14A,0xA157, 0,0xA159,0xA15B,0xA15F,0xA160,0xA163, -0xA164,0xA167,0xA168,0xA16B,0xA16C,0xA16F,0xA170,0xA173, -0xA174,0xA177,0xA178,0xA17B,0xA17C, 0, 0, 0, - 0,0xA1C6,0xA1C7,0xA1CA,0xA1CB,0xA1C8,0xA1C9,0xA15C, -0xA14D, 0,0xA14F, 0,0xA151,0xA152,0xA153,0xA154, - 0,0xA17D,0xA17E,0xA1A1,0xA1A2,0xA1A3,0xA1A4,0xA1CC, -0xA1CD,0xA1CE,0xA1DE,0xA1DF,0xA1E0,0xA1E1,0xA1E2, 0, - 0,0xA24C,0xA24D,0xA24E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0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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,0xA2CE}; - -static int func_uni_big5_onechar(int code){ - if ((code>=0x00A2)&&(code<=0x00F7)) - return(tab_uni_big50[code-0x00A2]); - if ((code>=0x02C7)&&(code<=0x0451)) - return(tab_uni_big51[code-0x02C7]); - if ((code>=0x2013)&&(code<=0x22BF)) - return(tab_uni_big52[code-0x2013]); - if ((code>=0x2460)&&(code<=0x2642)) - return(tab_uni_big53[code-0x2460]); - if ((code>=0x3000)&&(code<=0x3129)) - return(tab_uni_big54[code-0x3000]); - if ((code>=0x32A3)&&(code<=0x32A3)) - return(tab_uni_big55[code-0x32A3]); - if ((code>=0x338E)&&(code<=0x33D5)) - return(tab_uni_big56[code-0x338E]); - if ((code>=0x4E00)&&(code<=0x9483)) - return(tab_uni_big57[code-0x4E00]); - if ((code>=0x9577)&&(code<=0x9FA4)) - return(tab_uni_big58[code-0x9577]); - if ((code>=0xFA0C)&&(code<=0xFA0D)) - return(tab_uni_big59[code-0xFA0C]); - if ((code>=0xFE30)&&(code<=0xFFFD)) - return(tab_uni_big510[code-0xFE30]); - return(0); -} - - -static int -my_wc_mb_big5(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, uchar *e) -{ - - int code; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((int) wc < 0x80) - { - s[0]= (uchar) wc; - return 1; - } - - if (!(code=func_uni_big5_onechar(wc))) - return MY_CS_ILUNI; - - if (s+2>e) - return MY_CS_TOOSMALL; - - s[0]=code>>8; - s[1]=code&0xFF; - - return 2; -} - - -static int -my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc,const uchar *s,const uchar *e) -{ - - int hi; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((hi= s[0]) < 0x80) - { - pwc[0]=hi; - return 1; - } - - if (s+2>e) - return MY_CS_TOOSMALL2; - - if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1]))) - return -2; - - return 2; -} - - -/* - Returns a well formed length of a BIG5 string. - CP950 and HKSCS additional characters are also accepted. -*/ -static -size_t my_well_formed_len_big5(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, - size_t pos, int *error) -{ - const char *b0= b; - const char *emb= e - 1; /* Last possible end of an MB character */ - - *error= 0; - while (pos-- && b < e) - { - if ((uchar) b[0] < 128) - { - /* Single byte ascii character */ - b++; - } - else if ((b < emb) && isbig5code((uchar)*b, (uchar)b[1])) - { - /* Double byte character */ - b+= 2; - } - else - { - /* Wrong byte sequence */ - *error= 1; - break; - } - } - return (size_t) (b - b0); -} - - -static MY_COLLATION_HANDLER my_collation_big5_chinese_ci_handler = -{ - NULL, /* init */ - my_strnncoll_big5, - my_strnncollsp_big5, - my_strnxfrm_big5, - my_strnxfrmlen_simple, - my_like_range_big5, - my_wildcmp_mb, - my_strcasecmp_mb, - my_instr_mb, - my_hash_sort_simple, - my_propagate_simple -}; - - -static MY_CHARSET_HANDLER my_charset_big5_handler= -{ - NULL, /* init */ - ismbchar_big5, - mbcharlen_big5, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_big5, - my_lengthsp_8bit, - my_numcells_8bit, - my_mb_wc_big5, /* mb_wc */ - my_wc_mb_big5, /* wc_mb */ - my_mb_ctype_mb, - my_caseup_str_mb, - my_casedn_str_mb, - my_caseup_mb, - my_casedn_mb, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - -CHARSET_INFO my_charset_big5_chinese_ci= -{ - 1,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */ - "big5", /* cs name */ - "big5_chinese_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_big5, - to_lower_big5, - to_upper_big5, - sort_order_big5, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 1, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_big5_handler, - &my_collation_big5_chinese_ci_handler -}; - - -CHARSET_INFO my_charset_big5_bin= -{ - 84,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT, /* state */ - "big5", /* cs name */ - "big5_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_big5, - to_lower_big5, - to_upper_big5, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 1, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_big5_handler, - &my_collation_mb_bin_handler -}; - - -#endif diff --git a/externals/mysql/strings/ctype-bin.c b/externals/mysql/strings/ctype-bin.c deleted file mode 100644 index 4951023115..0000000000 --- a/externals/mysql/strings/ctype-bin.c +++ /dev/null @@ -1,570 +0,0 @@ -/* Copyright (C) 2002 MySQL AB & tommy@valley.ne.jp. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* This file is for binary pseudo charset, created by bar@mysql.com */ - - -#include -#include "m_string.h" -#include "m_ctype.h" - -static uchar ctype_bin[]= -{ - 0, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16, - 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, - 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -}; - - -/* Dummy array for toupper / tolower / sortorder */ - -static uchar bin_char_array[] = -{ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - - -static my_bool -my_coll_init_8bit_bin(CHARSET_INFO *cs, - void *(*alloc)(size_t) __attribute__((unused))) -{ - cs->max_sort_char=255; - return FALSE; -} - -static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)), - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - size_t len=min(slen,tlen); - int cmp= memcmp(s,t,len); - return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen); -} - - -size_t my_lengthsp_binary(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr __attribute__((unused)), - size_t length) -{ - return length; -} - - -/* - Compare two strings. Result is sign(first_argument - second_argument) - - SYNOPSIS - my_strnncollsp_binary() - cs Chararacter set - s String to compare - slen Length of 's' - t String to compare - tlen Length of 't' - - NOTE - This function is used for real binary strings, i.e. for - BLOB, BINARY(N) and VARBINARY(N). - It compares trailing spaces as spaces. - - RETURN - < 0 s < t - 0 s == t - > 0 s > t -*/ - -static int my_strnncollsp_binary(CHARSET_INFO * cs __attribute__((unused)), - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference - __attribute__((unused))) -{ - return my_strnncoll_binary(cs,s,slen,t,tlen,0); -} - - -static int my_strnncoll_8bit_bin(CHARSET_INFO * cs __attribute__((unused)), - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - size_t len=min(slen,tlen); - int cmp= memcmp(s,t,len); - return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen); -} - - -/* - Compare two strings. Result is sign(first_argument - second_argument) - - SYNOPSIS - my_strnncollsp_8bit_bin() - cs Chararacter set - s String to compare - slen Length of 's' - t String to compare - tlen Length of 't' - diff_if_only_endspace_difference - Set to 1 if the strings should be regarded as different - if they only difference in end space - - NOTE - This function is used for character strings with binary collations. - The shorter string is extended with end space to be as long as the longer - one. - - RETURN - < 0 s < t - 0 s == t - > 0 s > t -*/ - -static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool diff_if_only_endspace_difference) -{ - const uchar *end; - size_t length; - int res; - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - end= a + (length= min(a_length, b_length)); - while (a < end) - { - if (*a++ != *b++) - return ((int) a[-1] - (int) b[-1]); - } - res= 0; - if (a_length != b_length) - { - int swap= 1; - /* - Check the next not space character of the longer key. If it's < ' ', - then it's smaller than the other key. - */ - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - if (a_length < b_length) - { - /* put shorter key in s */ - a_length= b_length; - a= b; - swap= -1; /* swap sign of result */ - res= -res; - } - for (end= a + a_length-length; a < end ; a++) - { - if (*a != ' ') - return (*a < ' ') ? -swap : swap; - } - } - return res; -} - - -/* This function is used for all conversion functions */ - -static size_t my_case_str_bin(CHARSET_INFO *cs __attribute__((unused)), - char *str __attribute__((unused))) -{ - return 0; -} - - -static size_t my_case_bin(CHARSET_INFO *cs __attribute__((unused)), - char *src __attribute__((unused)), - size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - return srclen; -} - - -static int my_strcasecmp_bin(CHARSET_INFO * cs __attribute__((unused)), - const char *s, const char *t) -{ - return strcmp(s,t); -} - - -uint my_mbcharlen_8bit(CHARSET_INFO *cs __attribute__((unused)), - uint c __attribute__((unused))) -{ - return 1; -} - - -static int my_mb_wc_bin(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *wc, - const uchar *str, - const uchar *end __attribute__((unused))) -{ - if (str >= end) - return MY_CS_TOOSMALL; - - *wc=str[0]; - return 1; -} - - -static int my_wc_mb_bin(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, - uchar *s, - uchar *e __attribute__((unused))) -{ - if (s >= e) - return MY_CS_TOOSMALL; - - if (wc < 256) - { - s[0]= (char) wc; - return 1; - } - return MY_CS_ILUNI; -} - - -void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)), - const uchar *key, size_t len, - ulong *nr1, ulong *nr2) -{ - const uchar *pos = key; - - /* - Remove trailing spaces. We have to do this to be able to compare - 'A ' and 'A' as identical - */ - key= skip_trailing_space(key, len); - - for (; pos < (uchar*) key ; pos++) - { - nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); - nr2[0]+=3; - } -} - - -void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)), - const uchar *key, size_t len,ulong *nr1, ulong *nr2) -{ - const uchar *pos = key; - - key+= len; - - for (; pos < (uchar*) key ; pos++) - { - nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); - nr2[0]+=3; - } -} - - -/* - The following defines is here to keep the following code identical to - the one in ctype-simple.c -*/ - -#define likeconv(s,A) (A) -#define INC_PTR(cs,A,B) (A)++ - - -int my_wildcmp_bin(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - int result= -1; /* Not found, using wildcards */ - - while (wildstr != wildend) - { - while (*wildstr != w_many && *wildstr != w_one) - { - if (*wildstr == escape && wildstr+1 != wildend) - wildstr++; - if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) - return(1); /* No match */ - if (wildstr == wildend) - return(str != str_end); /* Match if both are at end */ - result=1; /* Found an anchor char */ - } - if (*wildstr == w_one) - { - do - { - if (str == str_end) /* Skip one char if possible */ - return(result); - INC_PTR(cs,str,str_end); - } while (++wildstr < wildend && *wildstr == w_one); - if (wildstr == wildend) - break; - } - if (*wildstr == w_many) - { /* Found w_many */ - uchar cmp; - wildstr++; - /* Remove any '%' and '_' from the wild search string */ - for (; wildstr != wildend ; wildstr++) - { - if (*wildstr == w_many) - continue; - if (*wildstr == w_one) - { - if (str == str_end) - return(-1); - INC_PTR(cs,str,str_end); - continue; - } - break; /* Not a wild character */ - } - if (wildstr == wildend) - return(0); /* match if w_many is last */ - if (str == str_end) - return(-1); - - if ((cmp= *wildstr) == escape && wildstr+1 != wildend) - cmp= *++wildstr; - - INC_PTR(cs,wildstr,wildend); /* This is compared through cmp */ - cmp=likeconv(cs,cmp); - do - { - while (str != str_end && (uchar) likeconv(cs,*str) != cmp) - str++; - if (str++ == str_end) - return(-1); - { - int tmp=my_wildcmp_bin(cs,str,str_end,wildstr,wildend,escape,w_one, - w_many); - if (tmp <= 0) - return(tmp); - } - } while (str != str_end && wildstr[0] != w_many); - return(-1); - } - } - return(str != str_end ? 1 : 0); -} - - -static size_t -my_strnxfrm_8bit_bin(CHARSET_INFO *cs, - uchar * dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - set_if_smaller(srclen, dstlen); - set_if_smaller(srclen, nweights); - if (dst != src) - memcpy(dst, src, srclen); - return my_strxfrm_pad_desc_and_reverse(cs, dst, dst + srclen, dst + dstlen, - nweights - srclen, flags, 0); -} - - -static -uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), - const char *b, size_t b_length, - const char *s, size_t s_length, - my_match_t *match, uint nmatch) -{ - register const uchar *str, *search, *end, *search_end; - - if (s_length <= b_length) - { - if (!s_length) - { - if (nmatch) - { - match->beg= 0; - match->end= 0; - match->mb_len= 0; - } - return 1; /* Empty string is always found */ - } - - str= (const uchar*) b; - search= (const uchar*) s; - end= (const uchar*) b+b_length-s_length+1; - search_end= (const uchar*) s + s_length; - -skip: - while (str != end) - { - if ( (*str++) == (*search)) - { - register const uchar *i,*j; - - i= str; - j= search+1; - - while (j != search_end) - if ((*i++) != (*j++)) - goto skip; - - if (nmatch > 0) - { - match[0].beg= 0; - match[0].end= (size_t) (str- (const uchar*)b-1); - match[0].mb_len= match[0].end; - - if (nmatch > 1) - { - match[1].beg= match[0].end; - match[1].end= match[0].end+s_length; - match[1].mb_len= match[1].end-match[1].beg; - } - } - return 2; - } - } - } - return 0; -} - - -MY_COLLATION_HANDLER my_collation_8bit_bin_handler = -{ - my_coll_init_8bit_bin, - my_strnncoll_8bit_bin, - my_strnncollsp_8bit_bin, - my_strnxfrm_8bit_bin, - my_strnxfrmlen_simple, - my_like_range_simple, - my_wildcmp_bin, - my_strcasecmp_bin, - my_instr_bin, - my_hash_sort_8bit_bin, - my_propagate_simple -}; - - -static MY_COLLATION_HANDLER my_collation_binary_handler = -{ - NULL, /* init */ - my_strnncoll_binary, - my_strnncollsp_binary, - my_strnxfrm_8bit_bin, - my_strnxfrmlen_simple, - my_like_range_simple, - my_wildcmp_bin, - my_strcasecmp_bin, - my_instr_bin, - my_hash_sort_bin, - my_propagate_simple -}; - - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - NULL, /* ismbchar */ - my_mbcharlen_8bit, /* mbcharlen */ - my_numchars_8bit, - my_charpos_8bit, - my_well_formed_len_8bit, - my_lengthsp_binary, - my_numcells_8bit, - my_mb_wc_bin, - my_wc_mb_bin, - my_mb_ctype_8bit, - my_case_str_bin, - my_case_str_bin, - my_case_bin, - my_case_bin, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - -CHARSET_INFO my_charset_bin = -{ - 63,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PRIMARY,/* state */ - "binary", /* cs name */ - "binary", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_bin, /* ctype */ - bin_char_array, /* to_lower */ - bin_char_array, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - 0, /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_binary_handler -}; diff --git a/externals/mysql/strings/ctype-cp932.c b/externals/mysql/strings/ctype-cp932.c deleted file mode 100644 index 14532f54b8..0000000000 --- a/externals/mysql/strings/ctype-cp932.c +++ /dev/null @@ -1,5555 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This file is for cp932 charaset (Windows Japanese), - and created based on ctype-sjis.c file */ - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_cp932 - - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. strxfrm_multiply_cp932=1 - * .configure. mbmaxlen_cp932=2 - */ - -static uchar NEAR ctype_cp932[257] = -{ - 0, /* For standard library */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ - 0040, 0050, 0050, 0050, 0050, 0050, 0040, 0040, /* ^H - ^O */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^P - ^W */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^X - ^Z ^[ ^\ ^] ^^ ^_ */ - 0110, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* SPC ! " # $ % ^ ' */ - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* ( ) * + , - . / */ - 0204, 0204, 0204, 0204, 0204, 0204, 0204, 0204, /* 0 1 2 3 4 5 6 7 */ - 0204, 0204, 0020, 0020, 0020, 0020, 0020, 0020, /* 8 9 : ; < = > ? */ - 0020, 0201, 0201, 0201, 0201, 0201, 0201, 0001, /* @ A B C D E F G */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* H I J K L M N O */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* P Q R S T U V W */ - 0001, 0001, 0001, 0020, 0020, 0020, 0020, 0020, /* X Y Z [ \ ] ^ _ */ - 0020, 0202, 0202, 0202, 0202, 0202, 0202, 0002, /* ` a b c d e f g */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* h i j k l m n o */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* p q r s t u v w */ - 0002, 0002, 0002, 0020, 0020, 0020, 0020, 0040, /* x y z { | } + DEL */ - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0000, 0000, 0000 -}; - -static uchar NEAR to_lower_cp932[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '[', '\\', ']', '^', '_', - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -static uchar NEAR to_upper_cp932[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -static uchar NEAR sort_order_cp932[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -#define iscp932head(c) ((0x81<=(c) && (c)<=0x9f) || \ - ((0xe0<=(c)) && (c)<=0xfc)) -#define iscp932tail(c) ((0x40<=(c) && (c)<=0x7e) || \ - (0x80<=(c) && (c)<=0xfc)) - - -static uint ismbchar_cp932(CHARSET_INFO *cs __attribute__((unused)), - const char* p, const char *e) -{ - return (iscp932head((uchar) *p) && (e-p)>1 && iscp932tail((uchar)p[1]) ? 2: 0); -} - -static uint mbcharlen_cp932(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return (iscp932head((uchar) c) ? 2 : 1); -} - - -#define cp932code(c,d) ((((uint) (uchar)(c)) << 8) | (uint) (uchar) (d)) - - -static int my_strnncoll_cp932_internal(CHARSET_INFO *cs, - const uchar **a_res, size_t a_length, - const uchar **b_res, size_t b_length) -{ - const uchar *a= *a_res, *b= *b_res; - const uchar *a_end= a + a_length; - const uchar *b_end= b + b_length; - while (a < a_end && b < b_end) - { - if (ismbchar_cp932(cs,(char*) a, (char*) a_end) && - ismbchar_cp932(cs,(char*) b, (char*) b_end)) - { - uint a_char= cp932code(*a, *(a+1)); - uint b_char= cp932code(*b, *(b+1)); - if (a_char != b_char) - return a_char - b_char; - a += 2; - b += 2; - } else - { - if (sort_order_cp932[(uchar)*a] != sort_order_cp932[(uchar)*b]) - return sort_order_cp932[(uchar)*a] - sort_order_cp932[(uchar)*b]; - a++; - b++; - } - } - *a_res= a; - *b_res= b; - return 0; -} - - -static int my_strnncoll_cp932(CHARSET_INFO *cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool b_is_prefix) -{ - int res= my_strnncoll_cp932_internal(cs, &a, a_length, &b, b_length); - if (b_is_prefix && a_length > b_length) - a_length= b_length; - return res ? res : (int) (a_length - b_length); -} - - -static int my_strnncollsp_cp932(CHARSET_INFO *cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool diff_if_only_endspace_difference - __attribute__((unused))) -{ - const uchar *a_end= a + a_length; - const uchar *b_end= b + b_length; - int res= my_strnncoll_cp932_internal(cs, &a, a_length, &b, b_length); - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - if (!res && (a != a_end || b != b_end)) - { - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - /* - Check the next not space character of the longer key. If it's < ' ', - then it's smaller than the other key. - */ - if (a == a_end) - { - /* put shorter key in a */ - a_end= b_end; - a= b; - swap= -1; /* swap sign of result */ - res= -res; - } - for (; a < a_end ; a++) - { - if (*a != (uchar) ' ') - return (*a < (uchar) ' ') ? -swap : swap; - } - } - return res; -} - - -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -#define max_sort_char ((char) 255) - -static my_bool my_like_range_cp932(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str,char *max_str, - size_t *min_length, size_t *max_length) -{ - const char *end=ptr+ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - - while (ptr < end && min_str < min_end) { - if (ismbchar_cp932(cs, ptr, end)) { - *min_str++ = *max_str++ = *ptr++; - if (min_str < min_end) - *min_str++ = *max_str++ = *ptr++; - continue; - } - if (*ptr == escape && ptr+1 < end) { - ptr++; /* Skip escape */ - if (ismbchar_cp932(cs, ptr, end)) - *min_str++ = *max_str++ = *ptr++; - if (min_str < min_end) - *min_str++ = *max_str++ = *ptr++; - continue; - } - if (*ptr == w_one) { /* '_' in SQL */ - *min_str++ = '\0'; /* This should be min char */ - *max_str++ = max_sort_char; - ptr++; - continue; - } - if (*ptr == w_many) - { /* '%' in SQL */ - *min_length = (size_t)(min_str - min_org); - *max_length = res_length; - do - { - *min_str++= 0; - *max_str++= max_sort_char; - } while (min_str < min_end); - return 0; - } - *min_str++ = *max_str++ = *ptr++; - } - *min_length = *max_length = (size_t) (min_str - min_org); - while (min_str < min_end) - *min_str++ = *max_str++ = ' '; /* Because if key compression */ - return 0; -} - -/* page 0 0x00A1-0x00DF */ -static uint16 tab_cp932_uni0[]={ -0xFF61,0xFF62,0xFF63,0xFF64,0xFF65,0xFF66,0xFF67,0xFF68, -0xFF69,0xFF6A,0xFF6B,0xFF6C,0xFF6D,0xFF6E,0xFF6F,0xFF70, -0xFF71,0xFF72,0xFF73,0xFF74,0xFF75,0xFF76,0xFF77,0xFF78, -0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80, -0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88, -0xFF89,0xFF8A,0xFF8B,0xFF8C,0xFF8D,0xFF8E,0xFF8F,0xFF90, -0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98, -0xFF99,0xFF9A,0xFF9B,0xFF9C,0xFF9D,0xFF9E,0xFF9F}; - -/* page 1 0x8140-0x84BE */ -static uint16 tab_cp932_uni1[]={ -0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B, -0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E, -0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD, -0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0xFF3C, -0xFF5E,0x2225,0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C, -0x201D,0xFF08,0xFF09,0x3014,0x3015,0xFF3B,0xFF3D,0xFF5B, -0xFF5D,0x3008,0x3009,0x300A,0x300B,0x300C,0x300D,0x300E, -0x300F,0x3010,0x3011,0xFF0B,0xFF0D,0x00B1,0x00D7, 0, -0x00F7,0xFF1D,0x2260,0xFF1C,0xFF1E,0x2266,0x2267,0x221E, -0x2234,0x2642,0x2640,0x00B0,0x2032,0x2033,0x2103,0xFFE5, -0xFF04,0xFFE0,0xFFE1,0xFF05,0xFF03,0xFF06,0xFF0A,0xFF20, -0x00A7,0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7,0x25C6, -0x25A1,0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x203B,0x3012, -0x2192,0x2190,0x2191,0x2193,0x3013, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2208,0x220B,0x2286,0x2287,0x2282,0x2283,0x222A,0x2229, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2227,0x2228,0xFFE2,0x21D2,0x21D4,0x2200,0x2203, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x2220,0x22A5,0x2312,0x2202,0x2207,0x2261, -0x2252,0x226A,0x226B,0x221A,0x223D,0x221D,0x2235,0x222B, -0x222C, 0, 0, 0, 0, 0, 0, 0, -0x212B,0x2030,0x266F,0x266D,0x266A,0x2020,0x2021,0x00B6, - 0, 0, 0, 0,0x25EF, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xFF10, -0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17,0xFF18, -0xFF19, 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,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,0x3041, -0x3042,0x3043,0x3044,0x3045,0x3046,0x3047,0x3048,0x3049, -0x304A,0x304B,0x304C,0x304D,0x304E,0x304F,0x3050,0x3051, -0x3052,0x3053,0x3054,0x3055,0x3056,0x3057,0x3058,0x3059, -0x305A,0x305B,0x305C,0x305D,0x305E,0x305F,0x3060,0x3061, -0x3062,0x3063,0x3064,0x3065,0x3066,0x3067,0x3068,0x3069, -0x306A,0x306B,0x306C,0x306D,0x306E,0x306F,0x3070,0x3071, -0x3072,0x3073,0x3074,0x3075,0x3076,0x3077,0x3078,0x3079, -0x307A,0x307B,0x307C,0x307D,0x307E,0x307F,0x3080,0x3081, -0x3082,0x3083,0x3084,0x3085,0x3086,0x3087,0x3088,0x3089, -0x308A,0x308B,0x308C,0x308D,0x308E,0x308F,0x3090,0x3091, -0x3092,0x3093, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8, -0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0, -0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8, -0x30B9,0x30BA,0x30BB,0x30BC,0x30BD,0x30BE,0x30BF,0x30C0, -0x30C1,0x30C2,0x30C3,0x30C4,0x30C5,0x30C6,0x30C7,0x30C8, -0x30C9,0x30CA,0x30CB,0x30CC,0x30CD,0x30CE,0x30CF,0x30D0, -0x30D1,0x30D2,0x30D3,0x30D4,0x30D5,0x30D6,0x30D7,0x30D8, -0x30D9,0x30DA,0x30DB,0x30DC,0x30DD,0x30DE,0x30DF, 0, -0x30E0,0x30E1,0x30E2,0x30E3,0x30E4,0x30E5,0x30E6,0x30E7, -0x30E8,0x30E9,0x30EA,0x30EB,0x30EC,0x30ED,0x30EE,0x30EF, -0x30F0,0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6, 0, - 0, 0, 0, 0, 0, 0, 0,0x0391, -0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399, -0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1, -0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, 0, - 0, 0, 0, 0, 0, 0, 0,0x03B1, -0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9, -0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0,0x03C1, -0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416, -0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, -0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, -0x042F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451,0x0436, -0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D, 0, -0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445, -0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D, -0x044E,0x044F, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x2500, -0x2502,0x250C,0x2510,0x2518,0x2514,0x251C,0x252C,0x2524, -0x2534,0x253C,0x2501,0x2503,0x250F,0x2513,0x251B,0x2517, -0x2523,0x2533,0x252B,0x253B,0x254B,0x2520,0x252F,0x2528, -0x2537,0x253F,0x251D,0x2530,0x2525,0x2538,0x2542}; - -/* page 2 0x8740-0x879C - NEC Row 13 */ -static uint16 tab_cp932_uni2[]={ -0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467, -0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F, -0x2470,0x2471,0x2472,0x2473,0x2160,0x2161,0x2162,0x2163, -0x2164,0x2165,0x2166,0x2167,0x2168,0x2169, 0,0x3349, -0x3314,0x3322,0x334D,0x3318,0x3327,0x3303,0x3336,0x3351, -0x3357,0x330D,0x3326,0x3323,0x332B,0x334A,0x333B,0x339C, -0x339D,0x339E,0x338E,0x338F,0x33C4,0x33A1, 0, 0, - 0, 0, 0, 0, 0, 0,0x337B, 0, -0x301D,0x301F,0x2116,0x33CD,0x2121,0x32A4,0x32A5,0x32A6, -0x32A7,0x32A8,0x3231,0x3232,0x3239,0x337E,0x337D,0x337C, -0x2252,0x2261,0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220, -0x221F,0x22BF,0x2235,0x2229,0x222A}; - -/* page 3 0x889F-0x9FFC */ -static uint16 tab_cp932_uni3[]={ -0x4E9C,0x5516,0x5A03,0x963F,0x54C0,0x611B,0x6328,0x59F6, -0x9022,0x8475,0x831C,0x7A50,0x60AA,0x63E1,0x6E25,0x65ED, -0x8466,0x82A6,0x9BF5,0x6893,0x5727,0x65A1,0x6271,0x5B9B, -0x59D0,0x867B,0x98F4,0x7D62,0x7DBE,0x9B8E,0x6216,0x7C9F, -0x88B7,0x5B89,0x5EB5,0x6309,0x6697,0x6848,0x95C7,0x978D, -0x674F,0x4EE5,0x4F0A,0x4F4D,0x4F9D,0x5049,0x56F2,0x5937, -0x59D4,0x5A01,0x5C09,0x60DF,0x610F,0x6170,0x6613,0x6905, -0x70BA,0x754F,0x7570,0x79FB,0x7DAD,0x7DEF,0x80C3,0x840E, -0x8863,0x8B02,0x9055,0x907A,0x533B,0x4E95,0x4EA5,0x57DF, -0x80B2,0x90C1,0x78EF,0x4E00,0x58F1,0x6EA2,0x9038,0x7A32, -0x8328,0x828B,0x9C2F,0x5141,0x5370,0x54BD,0x54E1,0x56E0, -0x59FB,0x5F15,0x98F2,0x6DEB,0x80E4,0x852D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9662,0x9670,0x96A0,0x97FB,0x540B,0x53F3,0x5B87, -0x70CF,0x7FBD,0x8FC2,0x96E8,0x536F,0x9D5C,0x7ABA,0x4E11, -0x7893,0x81FC,0x6E26,0x5618,0x5504,0x6B1D,0x851A,0x9C3B, -0x59E5,0x53A9,0x6D66,0x74DC,0x958F,0x5642,0x4E91,0x904B, -0x96F2,0x834F,0x990C,0x53E1,0x55B6,0x5B30,0x5F71,0x6620, -0x66F3,0x6804,0x6C38,0x6CF3,0x6D29,0x745B,0x76C8,0x7A4E, -0x9834,0x82F1,0x885B,0x8A60,0x92ED,0x6DB2,0x75AB,0x76CA, -0x99C5,0x60A6,0x8B01,0x8D8A,0x95B2,0x698E,0x53AD,0x5186, - 0,0x5712,0x5830,0x5944,0x5BB4,0x5EF6,0x6028,0x63A9, -0x63F4,0x6CBF,0x6F14,0x708E,0x7114,0x7159,0x71D5,0x733F, -0x7E01,0x8276,0x82D1,0x8597,0x9060,0x925B,0x9D1B,0x5869, -0x65BC,0x6C5A,0x7525,0x51F9,0x592E,0x5965,0x5F80,0x5FDC, -0x62BC,0x65FA,0x6A2A,0x6B27,0x6BB4,0x738B,0x7FC1,0x8956, -0x9D2C,0x9D0E,0x9EC4,0x5CA1,0x6C96,0x837B,0x5104,0x5C4B, -0x61B6,0x81C6,0x6876,0x7261,0x4E59,0x4FFA,0x5378,0x6069, -0x6E29,0x7A4F,0x97F3,0x4E0B,0x5316,0x4EEE,0x4F55,0x4F3D, -0x4FA1,0x4F73,0x52A0,0x53EF,0x5609,0x590F,0x5AC1,0x5BB6, -0x5BE1,0x79D1,0x6687,0x679C,0x67B6,0x6B4C,0x6CB3,0x706B, -0x73C2,0x798D,0x79BE,0x7A3C,0x7B87,0x82B1,0x82DB,0x8304, -0x8377,0x83EF,0x83D3,0x8766,0x8AB2,0x5629,0x8CA8,0x8FE6, -0x904E,0x971E,0x868A,0x4FC4,0x5CE8,0x6211,0x7259,0x753B, -0x81E5,0x82BD,0x86FE,0x8CC0,0x96C5,0x9913,0x99D5,0x4ECB, -0x4F1A,0x89E3,0x56DE,0x584A,0x58CA,0x5EFB,0x5FEB,0x602A, -0x6094,0x6062,0x61D0,0x6212,0x62D0,0x6539, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9B41,0x6666,0x68B0,0x6D77,0x7070,0x754C,0x7686, -0x7D75,0x82A5,0x87F9,0x958B,0x968E,0x8C9D,0x51F1,0x52BE, -0x5916,0x54B3,0x5BB3,0x5D16,0x6168,0x6982,0x6DAF,0x788D, -0x84CB,0x8857,0x8A72,0x93A7,0x9AB8,0x6D6C,0x99A8,0x86D9, -0x57A3,0x67FF,0x86CE,0x920E,0x5283,0x5687,0x5404,0x5ED3, -0x62E1,0x64B9,0x683C,0x6838,0x6BBB,0x7372,0x78BA,0x7A6B, -0x899A,0x89D2,0x8D6B,0x8F03,0x90ED,0x95A3,0x9694,0x9769, -0x5B66,0x5CB3,0x697D,0x984D,0x984E,0x639B,0x7B20,0x6A2B, - 0,0x6A7F,0x68B6,0x9C0D,0x6F5F,0x5272,0x559D,0x6070, -0x62EC,0x6D3B,0x6E07,0x6ED1,0x845B,0x8910,0x8F44,0x4E14, -0x9C39,0x53F6,0x691B,0x6A3A,0x9784,0x682A,0x515C,0x7AC3, -0x84B2,0x91DC,0x938C,0x565B,0x9D28,0x6822,0x8305,0x8431, -0x7CA5,0x5208,0x82C5,0x74E6,0x4E7E,0x4F83,0x51A0,0x5BD2, -0x520A,0x52D8,0x52E7,0x5DFB,0x559A,0x582A,0x59E6,0x5B8C, -0x5B98,0x5BDB,0x5E72,0x5E79,0x60A3,0x611F,0x6163,0x61BE, -0x63DB,0x6562,0x67D1,0x6853,0x68FA,0x6B3E,0x6B53,0x6C57, -0x6F22,0x6F97,0x6F45,0x74B0,0x7518,0x76E3,0x770B,0x7AFF, -0x7BA1,0x7C21,0x7DE9,0x7F36,0x7FF0,0x809D,0x8266,0x839E, -0x89B3,0x8ACC,0x8CAB,0x9084,0x9451,0x9593,0x9591,0x95A2, -0x9665,0x97D3,0x9928,0x8218,0x4E38,0x542B,0x5CB8,0x5DCC, -0x73A9,0x764C,0x773C,0x5CA9,0x7FEB,0x8D0B,0x96C1,0x9811, -0x9854,0x9858,0x4F01,0x4F0E,0x5371,0x559C,0x5668,0x57FA, -0x5947,0x5B09,0x5BC4,0x5C90,0x5E0C,0x5E7E,0x5FCC,0x63EE, -0x673A,0x65D7,0x65E2,0x671F,0x68CB,0x68C4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6A5F,0x5E30,0x6BC5,0x6C17,0x6C7D,0x757F,0x7948, -0x5B63,0x7A00,0x7D00,0x5FBD,0x898F,0x8A18,0x8CB4,0x8D77, -0x8ECC,0x8F1D,0x98E2,0x9A0E,0x9B3C,0x4E80,0x507D,0x5100, -0x5993,0x5B9C,0x622F,0x6280,0x64EC,0x6B3A,0x72A0,0x7591, -0x7947,0x7FA9,0x87FB,0x8ABC,0x8B70,0x63AC,0x83CA,0x97A0, -0x5409,0x5403,0x55AB,0x6854,0x6A58,0x8A70,0x7827,0x6775, -0x9ECD,0x5374,0x5BA2,0x811A,0x8650,0x9006,0x4E18,0x4E45, -0x4EC7,0x4F11,0x53CA,0x5438,0x5BAE,0x5F13,0x6025,0x6551, - 0,0x673D,0x6C42,0x6C72,0x6CE3,0x7078,0x7403,0x7A76, -0x7AAE,0x7B08,0x7D1A,0x7CFE,0x7D66,0x65E7,0x725B,0x53BB, -0x5C45,0x5DE8,0x62D2,0x62E0,0x6319,0x6E20,0x865A,0x8A31, -0x8DDD,0x92F8,0x6F01,0x79A6,0x9B5A,0x4EA8,0x4EAB,0x4EAC, -0x4F9B,0x4FA0,0x50D1,0x5147,0x7AF6,0x5171,0x51F6,0x5354, -0x5321,0x537F,0x53EB,0x55AC,0x5883,0x5CE1,0x5F37,0x5F4A, -0x602F,0x6050,0x606D,0x631F,0x6559,0x6A4B,0x6CC1,0x72C2, -0x72ED,0x77EF,0x80F8,0x8105,0x8208,0x854E,0x90F7,0x93E1, -0x97FF,0x9957,0x9A5A,0x4EF0,0x51DD,0x5C2D,0x6681,0x696D, -0x5C40,0x66F2,0x6975,0x7389,0x6850,0x7C81,0x50C5,0x52E4, -0x5747,0x5DFE,0x9326,0x65A4,0x6B23,0x6B3D,0x7434,0x7981, -0x79BD,0x7B4B,0x7DCA,0x82B9,0x83CC,0x887F,0x895F,0x8B39, -0x8FD1,0x91D1,0x541F,0x9280,0x4E5D,0x5036,0x53E5,0x533A, -0x72D7,0x7396,0x77E9,0x82E6,0x8EAF,0x99C6,0x99C8,0x99D2, -0x5177,0x611A,0x865E,0x55B0,0x7A7A,0x5076,0x5BD3,0x9047, -0x9685,0x4E32,0x6ADB,0x91E7,0x5C51,0x5C48, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6398,0x7A9F,0x6C93,0x9774,0x8F61,0x7AAA,0x718A, -0x9688,0x7C82,0x6817,0x7E70,0x6851,0x936C,0x52F2,0x541B, -0x85AB,0x8A13,0x7FA4,0x8ECD,0x90E1,0x5366,0x8888,0x7941, -0x4FC2,0x50BE,0x5211,0x5144,0x5553,0x572D,0x73EA,0x578B, -0x5951,0x5F62,0x5F84,0x6075,0x6176,0x6167,0x61A9,0x63B2, -0x643A,0x656C,0x666F,0x6842,0x6E13,0x7566,0x7A3D,0x7CFB, -0x7D4C,0x7D99,0x7E4B,0x7F6B,0x830E,0x834A,0x86CD,0x8A08, -0x8A63,0x8B66,0x8EFD,0x981A,0x9D8F,0x82B8,0x8FCE,0x9BE8, - 0,0x5287,0x621F,0x6483,0x6FC0,0x9699,0x6841,0x5091, -0x6B20,0x6C7A,0x6F54,0x7A74,0x7D50,0x8840,0x8A23,0x6708, -0x4EF6,0x5039,0x5026,0x5065,0x517C,0x5238,0x5263,0x55A7, -0x570F,0x5805,0x5ACC,0x5EFA,0x61B2,0x61F8,0x62F3,0x6372, -0x691C,0x6A29,0x727D,0x72AC,0x732E,0x7814,0x786F,0x7D79, -0x770C,0x80A9,0x898B,0x8B19,0x8CE2,0x8ED2,0x9063,0x9375, -0x967A,0x9855,0x9A13,0x9E78,0x5143,0x539F,0x53B3,0x5E7B, -0x5F26,0x6E1B,0x6E90,0x7384,0x73FE,0x7D43,0x8237,0x8A00, -0x8AFA,0x9650,0x4E4E,0x500B,0x53E4,0x547C,0x56FA,0x59D1, -0x5B64,0x5DF1,0x5EAB,0x5F27,0x6238,0x6545,0x67AF,0x6E56, -0x72D0,0x7CCA,0x88B4,0x80A1,0x80E1,0x83F0,0x864E,0x8A87, -0x8DE8,0x9237,0x96C7,0x9867,0x9F13,0x4E94,0x4E92,0x4F0D, -0x5348,0x5449,0x543E,0x5A2F,0x5F8C,0x5FA1,0x609F,0x68A7, -0x6A8E,0x745A,0x7881,0x8A9E,0x8AA4,0x8B77,0x9190,0x4E5E, -0x9BC9,0x4EA4,0x4F7C,0x4FAF,0x5019,0x5016,0x5149,0x516C, -0x529F,0x52B9,0x52FE,0x539A,0x53E3,0x5411, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x540E,0x5589,0x5751,0x57A2,0x597D,0x5B54,0x5B5D, -0x5B8F,0x5DE5,0x5DE7,0x5DF7,0x5E78,0x5E83,0x5E9A,0x5EB7, -0x5F18,0x6052,0x614C,0x6297,0x62D8,0x63A7,0x653B,0x6602, -0x6643,0x66F4,0x676D,0x6821,0x6897,0x69CB,0x6C5F,0x6D2A, -0x6D69,0x6E2F,0x6E9D,0x7532,0x7687,0x786C,0x7A3F,0x7CE0, -0x7D05,0x7D18,0x7D5E,0x7DB1,0x8015,0x8003,0x80AF,0x80B1, -0x8154,0x818F,0x822A,0x8352,0x884C,0x8861,0x8B1B,0x8CA2, -0x8CFC,0x90CA,0x9175,0x9271,0x783F,0x92FC,0x95A4,0x964D, - 0,0x9805,0x9999,0x9AD8,0x9D3B,0x525B,0x52AB,0x53F7, -0x5408,0x58D5,0x62F7,0x6FE0,0x8C6A,0x8F5F,0x9EB9,0x514B, -0x523B,0x544A,0x56FD,0x7A40,0x9177,0x9D60,0x9ED2,0x7344, -0x6F09,0x8170,0x7511,0x5FFD,0x60DA,0x9AA8,0x72DB,0x8FBC, -0x6B64,0x9803,0x4ECA,0x56F0,0x5764,0x58BE,0x5A5A,0x6068, -0x61C7,0x660F,0x6606,0x6839,0x68B1,0x6DF7,0x75D5,0x7D3A, -0x826E,0x9B42,0x4E9B,0x4F50,0x53C9,0x5506,0x5D6F,0x5DE6, -0x5DEE,0x67FB,0x6C99,0x7473,0x7802,0x8A50,0x9396,0x88DF, -0x5750,0x5EA7,0x632B,0x50B5,0x50AC,0x518D,0x6700,0x54C9, -0x585E,0x59BB,0x5BB0,0x5F69,0x624D,0x63A1,0x683D,0x6B73, -0x6E08,0x707D,0x91C7,0x7280,0x7815,0x7826,0x796D,0x658E, -0x7D30,0x83DC,0x88C1,0x8F09,0x969B,0x5264,0x5728,0x6750, -0x7F6A,0x8CA1,0x51B4,0x5742,0x962A,0x583A,0x698A,0x80B4, -0x54B2,0x5D0E,0x57FC,0x7895,0x9DFA,0x4F5C,0x524A,0x548B, -0x643E,0x6628,0x6714,0x67F5,0x7A84,0x7B56,0x7D22,0x932F, -0x685C,0x9BAD,0x7B39,0x5319,0x518A,0x5237, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5BDF,0x62F6,0x64AE,0x64E6,0x672D,0x6BBA,0x85A9, -0x96D1,0x7690,0x9BD6,0x634C,0x9306,0x9BAB,0x76BF,0x6652, -0x4E09,0x5098,0x53C2,0x5C71,0x60E8,0x6492,0x6563,0x685F, -0x71E6,0x73CA,0x7523,0x7B97,0x7E82,0x8695,0x8B83,0x8CDB, -0x9178,0x9910,0x65AC,0x66AB,0x6B8B,0x4ED5,0x4ED4,0x4F3A, -0x4F7F,0x523A,0x53F8,0x53F2,0x55E3,0x56DB,0x58EB,0x59CB, -0x59C9,0x59FF,0x5B50,0x5C4D,0x5E02,0x5E2B,0x5FD7,0x601D, -0x6307,0x652F,0x5B5C,0x65AF,0x65BD,0x65E8,0x679D,0x6B62, - 0,0x6B7B,0x6C0F,0x7345,0x7949,0x79C1,0x7CF8,0x7D19, -0x7D2B,0x80A2,0x8102,0x81F3,0x8996,0x8A5E,0x8A69,0x8A66, -0x8A8C,0x8AEE,0x8CC7,0x8CDC,0x96CC,0x98FC,0x6B6F,0x4E8B, -0x4F3C,0x4F8D,0x5150,0x5B57,0x5BFA,0x6148,0x6301,0x6642, -0x6B21,0x6ECB,0x6CBB,0x723E,0x74BD,0x75D4,0x78C1,0x793A, -0x800C,0x8033,0x81EA,0x8494,0x8F9E,0x6C50,0x9E7F,0x5F0F, -0x8B58,0x9D2B,0x7AFA,0x8EF8,0x5B8D,0x96EB,0x4E03,0x53F1, -0x57F7,0x5931,0x5AC9,0x5BA4,0x6089,0x6E7F,0x6F06,0x75BE, -0x8CEA,0x5B9F,0x8500,0x7BE0,0x5072,0x67F4,0x829D,0x5C61, -0x854A,0x7E1E,0x820E,0x5199,0x5C04,0x6368,0x8D66,0x659C, -0x716E,0x793E,0x7D17,0x8005,0x8B1D,0x8ECA,0x906E,0x86C7, -0x90AA,0x501F,0x52FA,0x5C3A,0x6753,0x707C,0x7235,0x914C, -0x91C8,0x932B,0x82E5,0x5BC2,0x5F31,0x60F9,0x4E3B,0x53D6, -0x5B88,0x624B,0x6731,0x6B8A,0x72E9,0x73E0,0x7A2E,0x816B, -0x8DA3,0x9152,0x9996,0x5112,0x53D7,0x546A,0x5BFF,0x6388, -0x6A39,0x7DAC,0x9700,0x56DA,0x53CE,0x5468, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5B97,0x5C31,0x5DDE,0x4FEE,0x6101,0x62FE,0x6D32, -0x79C0,0x79CB,0x7D42,0x7E4D,0x7FD2,0x81ED,0x821F,0x8490, -0x8846,0x8972,0x8B90,0x8E74,0x8F2F,0x9031,0x914B,0x916C, -0x96C6,0x919C,0x4EC0,0x4F4F,0x5145,0x5341,0x5F93,0x620E, -0x67D4,0x6C41,0x6E0B,0x7363,0x7E26,0x91CD,0x9283,0x53D4, -0x5919,0x5BBF,0x6DD1,0x795D,0x7E2E,0x7C9B,0x587E,0x719F, -0x51FA,0x8853,0x8FF0,0x4FCA,0x5CFB,0x6625,0x77AC,0x7AE3, -0x821C,0x99FF,0x51C6,0x5FAA,0x65EC,0x696F,0x6B89,0x6DF3, - 0,0x6E96,0x6F64,0x76FE,0x7D14,0x5DE1,0x9075,0x9187, -0x9806,0x51E6,0x521D,0x6240,0x6691,0x66D9,0x6E1A,0x5EB6, -0x7DD2,0x7F72,0x66F8,0x85AF,0x85F7,0x8AF8,0x52A9,0x53D9, -0x5973,0x5E8F,0x5F90,0x6055,0x92E4,0x9664,0x50B7,0x511F, -0x52DD,0x5320,0x5347,0x53EC,0x54E8,0x5546,0x5531,0x5617, -0x5968,0x59BE,0x5A3C,0x5BB5,0x5C06,0x5C0F,0x5C11,0x5C1A, -0x5E84,0x5E8A,0x5EE0,0x5F70,0x627F,0x6284,0x62DB,0x638C, -0x6377,0x6607,0x660C,0x662D,0x6676,0x677E,0x68A2,0x6A1F, -0x6A35,0x6CBC,0x6D88,0x6E09,0x6E58,0x713C,0x7126,0x7167, -0x75C7,0x7701,0x785D,0x7901,0x7965,0x79F0,0x7AE0,0x7B11, -0x7CA7,0x7D39,0x8096,0x83D6,0x848B,0x8549,0x885D,0x88F3, -0x8A1F,0x8A3C,0x8A54,0x8A73,0x8C61,0x8CDE,0x91A4,0x9266, -0x937E,0x9418,0x969C,0x9798,0x4E0A,0x4E08,0x4E1E,0x4E57, -0x5197,0x5270,0x57CE,0x5834,0x58CC,0x5B22,0x5E38,0x60C5, -0x64FE,0x6761,0x6756,0x6D44,0x72B6,0x7573,0x7A63,0x84B8, -0x8B72,0x91B8,0x9320,0x5631,0x57F4,0x98FE, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x62ED,0x690D,0x6B96,0x71ED,0x7E54,0x8077,0x8272, -0x89E6,0x98DF,0x8755,0x8FB1,0x5C3B,0x4F38,0x4FE1,0x4FB5, -0x5507,0x5A20,0x5BDD,0x5BE9,0x5FC3,0x614E,0x632F,0x65B0, -0x664B,0x68EE,0x699B,0x6D78,0x6DF1,0x7533,0x75B9,0x771F, -0x795E,0x79E6,0x7D33,0x81E3,0x82AF,0x85AA,0x89AA,0x8A3A, -0x8EAB,0x8F9B,0x9032,0x91DD,0x9707,0x4EBA,0x4EC1,0x5203, -0x5875,0x58EC,0x5C0B,0x751A,0x5C3D,0x814E,0x8A0A,0x8FC5, -0x9663,0x976D,0x7B25,0x8ACF,0x9808,0x9162,0x56F3,0x53A8, - 0,0x9017,0x5439,0x5782,0x5E25,0x63A8,0x6C34,0x708A, -0x7761,0x7C8B,0x7FE0,0x8870,0x9042,0x9154,0x9310,0x9318, -0x968F,0x745E,0x9AC4,0x5D07,0x5D69,0x6570,0x67A2,0x8DA8, -0x96DB,0x636E,0x6749,0x6919,0x83C5,0x9817,0x96C0,0x88FE, -0x6F84,0x647A,0x5BF8,0x4E16,0x702C,0x755D,0x662F,0x51C4, -0x5236,0x52E2,0x59D3,0x5F81,0x6027,0x6210,0x653F,0x6574, -0x661F,0x6674,0x68F2,0x6816,0x6B63,0x6E05,0x7272,0x751F, -0x76DB,0x7CBE,0x8056,0x58F0,0x88FD,0x897F,0x8AA0,0x8A93, -0x8ACB,0x901D,0x9192,0x9752,0x9759,0x6589,0x7A0E,0x8106, -0x96BB,0x5E2D,0x60DC,0x621A,0x65A5,0x6614,0x6790,0x77F3, -0x7A4D,0x7C4D,0x7E3E,0x810A,0x8CAC,0x8D64,0x8DE1,0x8E5F, -0x78A9,0x5207,0x62D9,0x63A5,0x6442,0x6298,0x8A2D,0x7A83, -0x7BC0,0x8AAC,0x96EA,0x7D76,0x820C,0x8749,0x4ED9,0x5148, -0x5343,0x5360,0x5BA3,0x5C02,0x5C16,0x5DDD,0x6226,0x6247, -0x64B0,0x6813,0x6834,0x6CC9,0x6D45,0x6D17,0x67D3,0x6F5C, -0x714E,0x717D,0x65CB,0x7A7F,0x7BAD,0x7DDA, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7E4A,0x7FA8,0x817A,0x821B,0x8239,0x85A6,0x8A6E, -0x8CCE,0x8DF5,0x9078,0x9077,0x92AD,0x9291,0x9583,0x9BAE, -0x524D,0x5584,0x6F38,0x7136,0x5168,0x7985,0x7E55,0x81B3, -0x7CCE,0x564C,0x5851,0x5CA8,0x63AA,0x66FE,0x66FD,0x695A, -0x72D9,0x758F,0x758E,0x790E,0x7956,0x79DF,0x7C97,0x7D20, -0x7D44,0x8607,0x8A34,0x963B,0x9061,0x9F20,0x50E7,0x5275, -0x53CC,0x53E2,0x5009,0x55AA,0x58EE,0x594F,0x723D,0x5B8B, -0x5C64,0x531D,0x60E3,0x60F3,0x635C,0x6383,0x633F,0x63BB, - 0,0x64CD,0x65E9,0x66F9,0x5DE3,0x69CD,0x69FD,0x6F15, -0x71E5,0x4E89,0x75E9,0x76F8,0x7A93,0x7CDF,0x7DCF,0x7D9C, -0x8061,0x8349,0x8358,0x846C,0x84BC,0x85FB,0x88C5,0x8D70, -0x9001,0x906D,0x9397,0x971C,0x9A12,0x50CF,0x5897,0x618E, -0x81D3,0x8535,0x8D08,0x9020,0x4FC3,0x5074,0x5247,0x5373, -0x606F,0x6349,0x675F,0x6E2C,0x8DB3,0x901F,0x4FD7,0x5C5E, -0x8CCA,0x65CF,0x7D9A,0x5352,0x8896,0x5176,0x63C3,0x5B58, -0x5B6B,0x5C0A,0x640D,0x6751,0x905C,0x4ED6,0x591A,0x592A, -0x6C70,0x8A51,0x553E,0x5815,0x59A5,0x60F0,0x6253,0x67C1, -0x8235,0x6955,0x9640,0x99C4,0x9A28,0x4F53,0x5806,0x5BFE, -0x8010,0x5CB1,0x5E2F,0x5F85,0x6020,0x614B,0x6234,0x66FF, -0x6CF0,0x6EDE,0x80CE,0x817F,0x82D4,0x888B,0x8CB8,0x9000, -0x902E,0x968A,0x9EDB,0x9BDB,0x4EE3,0x53F0,0x5927,0x7B2C, -0x918D,0x984C,0x9DF9,0x6EDD,0x7027,0x5353,0x5544,0x5B85, -0x6258,0x629E,0x62D3,0x6CA2,0x6FEF,0x7422,0x8A17,0x9438, -0x6FC1,0x8AFE,0x8338,0x51E7,0x86F8,0x53EA, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x53E9,0x4F46,0x9054,0x8FB0,0x596A,0x8131,0x5DFD, -0x7AEA,0x8FBF,0x68DA,0x8C37,0x72F8,0x9C48,0x6A3D,0x8AB0, -0x4E39,0x5358,0x5606,0x5766,0x62C5,0x63A2,0x65E6,0x6B4E, -0x6DE1,0x6E5B,0x70AD,0x77ED,0x7AEF,0x7BAA,0x7DBB,0x803D, -0x80C6,0x86CB,0x8A95,0x935B,0x56E3,0x58C7,0x5F3E,0x65AD, -0x6696,0x6A80,0x6BB5,0x7537,0x8AC7,0x5024,0x77E5,0x5730, -0x5F1B,0x6065,0x667A,0x6C60,0x75F4,0x7A1A,0x7F6E,0x81F4, -0x8718,0x9045,0x99B3,0x7BC9,0x755C,0x7AF9,0x7B51,0x84C4, - 0,0x9010,0x79E9,0x7A92,0x8336,0x5AE1,0x7740,0x4E2D, -0x4EF2,0x5B99,0x5FE0,0x62BD,0x663C,0x67F1,0x6CE8,0x866B, -0x8877,0x8A3B,0x914E,0x92F3,0x99D0,0x6A17,0x7026,0x732A, -0x82E7,0x8457,0x8CAF,0x4E01,0x5146,0x51CB,0x558B,0x5BF5, -0x5E16,0x5E33,0x5E81,0x5F14,0x5F35,0x5F6B,0x5FB4,0x61F2, -0x6311,0x66A2,0x671D,0x6F6E,0x7252,0x753A,0x773A,0x8074, -0x8139,0x8178,0x8776,0x8ABF,0x8ADC,0x8D85,0x8DF3,0x929A, -0x9577,0x9802,0x9CE5,0x52C5,0x6357,0x76F4,0x6715,0x6C88, -0x73CD,0x8CC3,0x93AE,0x9673,0x6D25,0x589C,0x690E,0x69CC, -0x8FFD,0x939A,0x75DB,0x901A,0x585A,0x6802,0x63B4,0x69FB, -0x4F43,0x6F2C,0x67D8,0x8FBB,0x8526,0x7DB4,0x9354,0x693F, -0x6F70,0x576A,0x58F7,0x5B2C,0x7D2C,0x722A,0x540A,0x91E3, -0x9DB4,0x4EAD,0x4F4E,0x505C,0x5075,0x5243,0x8C9E,0x5448, -0x5824,0x5B9A,0x5E1D,0x5E95,0x5EAD,0x5EF7,0x5F1F,0x608C, -0x62B5,0x633A,0x63D0,0x68AF,0x6C40,0x7887,0x798E,0x7A0B, -0x7DE0,0x8247,0x8A02,0x8AE6,0x8E44,0x9013, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x90B8,0x912D,0x91D8,0x9F0E,0x6CE5,0x6458,0x64E2, -0x6575,0x6EF4,0x7684,0x7B1B,0x9069,0x93D1,0x6EBA,0x54F2, -0x5FB9,0x64A4,0x8F4D,0x8FED,0x9244,0x5178,0x586B,0x5929, -0x5C55,0x5E97,0x6DFB,0x7E8F,0x751C,0x8CBC,0x8EE2,0x985B, -0x70B9,0x4F1D,0x6BBF,0x6FB1,0x7530,0x96FB,0x514E,0x5410, -0x5835,0x5857,0x59AC,0x5C60,0x5F92,0x6597,0x675C,0x6E21, -0x767B,0x83DF,0x8CED,0x9014,0x90FD,0x934D,0x7825,0x783A, -0x52AA,0x5EA6,0x571F,0x5974,0x6012,0x5012,0x515A,0x51AC, - 0,0x51CD,0x5200,0x5510,0x5854,0x5858,0x5957,0x5B95, -0x5CF6,0x5D8B,0x60BC,0x6295,0x642D,0x6771,0x6843,0x68BC, -0x68DF,0x76D7,0x6DD8,0x6E6F,0x6D9B,0x706F,0x71C8,0x5F53, -0x75D8,0x7977,0x7B49,0x7B54,0x7B52,0x7CD6,0x7D71,0x5230, -0x8463,0x8569,0x85E4,0x8A0E,0x8B04,0x8C46,0x8E0F,0x9003, -0x900F,0x9419,0x9676,0x982D,0x9A30,0x95D8,0x50CD,0x52D5, -0x540C,0x5802,0x5C0E,0x61A7,0x649E,0x6D1E,0x77B3,0x7AE5, -0x80F4,0x8404,0x9053,0x9285,0x5CE0,0x9D07,0x533F,0x5F97, -0x5FB3,0x6D9C,0x7279,0x7763,0x79BF,0x7BE4,0x6BD2,0x72EC, -0x8AAD,0x6803,0x6A61,0x51F8,0x7A81,0x6934,0x5C4A,0x9CF6, -0x82EB,0x5BC5,0x9149,0x701E,0x5678,0x5C6F,0x60C7,0x6566, -0x6C8C,0x8C5A,0x9041,0x9813,0x5451,0x66C7,0x920D,0x5948, -0x90A3,0x5185,0x4E4D,0x51EA,0x8599,0x8B0E,0x7058,0x637A, -0x934B,0x6962,0x99B4,0x7E04,0x7577,0x5357,0x6960,0x8EDF, -0x96E3,0x6C5D,0x4E8C,0x5C3C,0x5F10,0x8FE9,0x5302,0x8CD1, -0x8089,0x8679,0x5EFF,0x65E5,0x4E73,0x5165, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5982,0x5C3F,0x97EE,0x4EFB,0x598A,0x5FCD,0x8A8D, -0x6FE1,0x79B0,0x7962,0x5BE7,0x8471,0x732B,0x71B1,0x5E74, -0x5FF5,0x637B,0x649A,0x71C3,0x7C98,0x4E43,0x5EFC,0x4E4B, -0x57DC,0x56A2,0x60A9,0x6FC3,0x7D0D,0x80FD,0x8133,0x81BF, -0x8FB2,0x8997,0x86A4,0x5DF4,0x628A,0x64AD,0x8987,0x6777, -0x6CE2,0x6D3E,0x7436,0x7834,0x5A46,0x7F75,0x82AD,0x99AC, -0x4FF3,0x5EC3,0x62DD,0x6392,0x6557,0x676F,0x76C3,0x724C, -0x80CC,0x80BA,0x8F29,0x914D,0x500D,0x57F9,0x5A92,0x6885, - 0,0x6973,0x7164,0x72FD,0x8CB7,0x58F2,0x8CE0,0x966A, -0x9019,0x877F,0x79E4,0x77E7,0x8429,0x4F2F,0x5265,0x535A, -0x62CD,0x67CF,0x6CCA,0x767D,0x7B94,0x7C95,0x8236,0x8584, -0x8FEB,0x66DD,0x6F20,0x7206,0x7E1B,0x83AB,0x99C1,0x9EA6, -0x51FD,0x7BB1,0x7872,0x7BB8,0x8087,0x7B48,0x6AE8,0x5E61, -0x808C,0x7551,0x7560,0x516B,0x9262,0x6E8C,0x767A,0x9197, -0x9AEA,0x4F10,0x7F70,0x629C,0x7B4F,0x95A5,0x9CE9,0x567A, -0x5859,0x86E4,0x96BC,0x4F34,0x5224,0x534A,0x53CD,0x53DB, -0x5E06,0x642C,0x6591,0x677F,0x6C3E,0x6C4E,0x7248,0x72AF, -0x73ED,0x7554,0x7E41,0x822C,0x85E9,0x8CA9,0x7BC4,0x91C6, -0x7169,0x9812,0x98EF,0x633D,0x6669,0x756A,0x76E4,0x78D0, -0x8543,0x86EE,0x532A,0x5351,0x5426,0x5983,0x5E87,0x5F7C, -0x60B2,0x6249,0x6279,0x62AB,0x6590,0x6BD4,0x6CCC,0x75B2, -0x76AE,0x7891,0x79D8,0x7DCB,0x7F77,0x80A5,0x88AB,0x8AB9, -0x8CBB,0x907F,0x975E,0x98DB,0x6A0B,0x7C38,0x5099,0x5C3E, -0x5FAE,0x6787,0x6BD8,0x7435,0x7709,0x7F8E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9F3B,0x67CA,0x7A17,0x5339,0x758B,0x9AED,0x5F66, -0x819D,0x83F1,0x8098,0x5F3C,0x5FC5,0x7562,0x7B46,0x903C, -0x6867,0x59EB,0x5A9B,0x7D10,0x767E,0x8B2C,0x4FF5,0x5F6A, -0x6A19,0x6C37,0x6F02,0x74E2,0x7968,0x8868,0x8A55,0x8C79, -0x5EDF,0x63CF,0x75C5,0x79D2,0x82D7,0x9328,0x92F2,0x849C, -0x86ED,0x9C2D,0x54C1,0x5F6C,0x658C,0x6D5C,0x7015,0x8CA7, -0x8CD3,0x983B,0x654F,0x74F6,0x4E0D,0x4ED8,0x57E0,0x592B, -0x5A66,0x5BCC,0x51A8,0x5E03,0x5E9C,0x6016,0x6276,0x6577, - 0,0x65A7,0x666E,0x6D6E,0x7236,0x7B26,0x8150,0x819A, -0x8299,0x8B5C,0x8CA0,0x8CE6,0x8D74,0x961C,0x9644,0x4FAE, -0x64AB,0x6B66,0x821E,0x8461,0x856A,0x90E8,0x5C01,0x6953, -0x98A8,0x847A,0x8557,0x4F0F,0x526F,0x5FA9,0x5E45,0x670D, -0x798F,0x8179,0x8907,0x8986,0x6DF5,0x5F17,0x6255,0x6CB8, -0x4ECF,0x7269,0x9B92,0x5206,0x543B,0x5674,0x58B3,0x61A4, -0x626E,0x711A,0x596E,0x7C89,0x7CDE,0x7D1B,0x96F0,0x6587, -0x805E,0x4E19,0x4F75,0x5175,0x5840,0x5E63,0x5E73,0x5F0A, -0x67C4,0x4E26,0x853D,0x9589,0x965B,0x7C73,0x9801,0x50FB, -0x58C1,0x7656,0x78A7,0x5225,0x77A5,0x8511,0x7B86,0x504F, -0x5909,0x7247,0x7BC7,0x7DE8,0x8FBA,0x8FD4,0x904D,0x4FBF, -0x52C9,0x5A29,0x5F01,0x97AD,0x4FDD,0x8217,0x92EA,0x5703, -0x6355,0x6B69,0x752B,0x88DC,0x8F14,0x7A42,0x52DF,0x5893, -0x6155,0x620A,0x66AE,0x6BCD,0x7C3F,0x83E9,0x5023,0x4FF8, -0x5305,0x5446,0x5831,0x5949,0x5B9D,0x5CF0,0x5CEF,0x5D29, -0x5E96,0x62B1,0x6367,0x653E,0x65B9,0x670B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6CD5,0x6CE1,0x70F9,0x7832,0x7E2B,0x80DE,0x82B3, -0x840C,0x84EC,0x8702,0x8912,0x8A2A,0x8C4A,0x90A6,0x92D2, -0x98FD,0x9CF3,0x9D6C,0x4E4F,0x4EA1,0x508D,0x5256,0x574A, -0x59A8,0x5E3D,0x5FD8,0x5FD9,0x623F,0x66B4,0x671B,0x67D0, -0x68D2,0x5192,0x7D21,0x80AA,0x81A8,0x8B00,0x8C8C,0x8CBF, -0x927E,0x9632,0x5420,0x982C,0x5317,0x50D5,0x535C,0x58A8, -0x64B2,0x6734,0x7267,0x7766,0x7A46,0x91E6,0x52C3,0x6CA1, -0x6B86,0x5800,0x5E4C,0x5954,0x672C,0x7FFB,0x51E1,0x76C6, - 0,0x6469,0x78E8,0x9B54,0x9EBB,0x57CB,0x59B9,0x6627, -0x679A,0x6BCE,0x54E9,0x69D9,0x5E55,0x819C,0x6795,0x9BAA, -0x67FE,0x9C52,0x685D,0x4EA6,0x4FE3,0x53C8,0x62B9,0x672B, -0x6CAB,0x8FC4,0x4FAD,0x7E6D,0x9EBF,0x4E07,0x6162,0x6E80, -0x6F2B,0x8513,0x5473,0x672A,0x9B45,0x5DF3,0x7B95,0x5CAC, -0x5BC6,0x871C,0x6E4A,0x84D1,0x7A14,0x8108,0x5999,0x7C8D, -0x6C11,0x7720,0x52D9,0x5922,0x7121,0x725F,0x77DB,0x9727, -0x9D61,0x690B,0x5A7F,0x5A18,0x51A5,0x540D,0x547D,0x660E, -0x76DF,0x8FF7,0x9298,0x9CF4,0x59EA,0x725D,0x6EC5,0x514D, -0x68C9,0x7DBF,0x7DEC,0x9762,0x9EBA,0x6478,0x6A21,0x8302, -0x5984,0x5B5F,0x6BDB,0x731B,0x76F2,0x7DB2,0x8017,0x8499, -0x5132,0x6728,0x9ED9,0x76EE,0x6762,0x52FF,0x9905,0x5C24, -0x623B,0x7C7E,0x8CB0,0x554F,0x60B6,0x7D0B,0x9580,0x5301, -0x4E5F,0x51B6,0x591C,0x723A,0x8036,0x91CE,0x5F25,0x77E2, -0x5384,0x5F79,0x7D04,0x85AC,0x8A33,0x8E8D,0x9756,0x67F3, -0x85AE,0x9453,0x6109,0x6108,0x6CB9,0x7652, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8AED,0x8F38,0x552F,0x4F51,0x512A,0x52C7,0x53CB, -0x5BA5,0x5E7D,0x60A0,0x6182,0x63D6,0x6709,0x67DA,0x6E67, -0x6D8C,0x7336,0x7337,0x7531,0x7950,0x88D5,0x8A98,0x904A, -0x9091,0x90F5,0x96C4,0x878D,0x5915,0x4E88,0x4F59,0x4E0E, -0x8A89,0x8F3F,0x9810,0x50AD,0x5E7C,0x5996,0x5BB9,0x5EB8, -0x63DA,0x63FA,0x64C1,0x66DC,0x694A,0x69D8,0x6D0B,0x6EB6, -0x7194,0x7528,0x7AAF,0x7F8A,0x8000,0x8449,0x84C9,0x8981, -0x8B21,0x8E0A,0x9065,0x967D,0x990A,0x617E,0x6291,0x6B32, - 0,0x6C83,0x6D74,0x7FCC,0x7FFC,0x6DC0,0x7F85,0x87BA, -0x88F8,0x6765,0x83B1,0x983C,0x96F7,0x6D1B,0x7D61,0x843D, -0x916A,0x4E71,0x5375,0x5D50,0x6B04,0x6FEB,0x85CD,0x862D, -0x89A7,0x5229,0x540F,0x5C65,0x674E,0x68A8,0x7406,0x7483, -0x75E2,0x88CF,0x88E1,0x91CC,0x96E2,0x9678,0x5F8B,0x7387, -0x7ACB,0x844E,0x63A0,0x7565,0x5289,0x6D41,0x6E9C,0x7409, -0x7559,0x786B,0x7C92,0x9686,0x7ADC,0x9F8D,0x4FB6,0x616E, -0x65C5,0x865C,0x4E86,0x4EAE,0x50DA,0x4E21,0x51CC,0x5BEE, -0x6599,0x6881,0x6DBC,0x731F,0x7642,0x77AD,0x7A1C,0x7CE7, -0x826F,0x8AD2,0x907C,0x91CF,0x9675,0x9818,0x529B,0x7DD1, -0x502B,0x5398,0x6797,0x6DCB,0x71D0,0x7433,0x81E8,0x8F2A, -0x96A3,0x9C57,0x9E9F,0x7460,0x5841,0x6D99,0x7D2F,0x985E, -0x4EE4,0x4F36,0x4F8B,0x51B7,0x52B1,0x5DBA,0x601C,0x73B2, -0x793C,0x82D3,0x9234,0x96B7,0x96F6,0x970A,0x9E97,0x9F62, -0x66A6,0x6B74,0x5217,0x52A3,0x70C8,0x88C2,0x5EC9,0x604B, -0x6190,0x6F23,0x7149,0x7C3E,0x7DF4,0x806F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x84EE,0x9023,0x932C,0x5442,0x9B6F,0x6AD3,0x7089, -0x8CC2,0x8DEF,0x9732,0x52B4,0x5A41,0x5ECA,0x5F04,0x6717, -0x697C,0x6994,0x6D6A,0x6F0F,0x7262,0x72FC,0x7BED,0x8001, -0x807E,0x874B,0x90CE,0x516D,0x9E93,0x7984,0x808B,0x9332, -0x8AD6,0x502D,0x548C,0x8A71,0x6B6A,0x8CC4,0x8107,0x60D1, -0x67A0,0x9DF2,0x4E99,0x4E98,0x9C10,0x8A6B,0x85C1,0x8568, -0x6900,0x6E7E,0x7897,0x8155, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5F0C,0x4E10,0x4E15,0x4E2A,0x4E31,0x4E36,0x4E3C,0x4E3F, -0x4E42,0x4E56,0x4E58,0x4E82,0x4E85,0x8C6B,0x4E8A,0x8212, -0x5F0D,0x4E8E,0x4E9E,0x4E9F,0x4EA0,0x4EA2,0x4EB0,0x4EB3, -0x4EB6,0x4ECE,0x4ECD,0x4EC4,0x4EC6,0x4EC2,0x4ED7,0x4EDE, -0x4EED,0x4EDF,0x4EF7,0x4F09,0x4F5A,0x4F30,0x4F5B,0x4F5D, -0x4F57,0x4F47,0x4F76,0x4F88,0x4F8F,0x4F98,0x4F7B,0x4F69, -0x4F70,0x4F91,0x4F6F,0x4F86,0x4F96,0x5118,0x4FD4,0x4FDF, -0x4FCE,0x4FD8,0x4FDB,0x4FD1,0x4FDA,0x4FD0,0x4FE4,0x4FE5, -0x501A,0x5028,0x5014,0x502A,0x5025,0x5005,0x4F1C,0x4FF6, -0x5021,0x5029,0x502C,0x4FFE,0x4FEF,0x5011,0x5006,0x5043, -0x5047,0x6703,0x5055,0x5050,0x5048,0x505A,0x5056,0x506C, -0x5078,0x5080,0x509A,0x5085,0x50B4,0x50B2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x50C9,0x50CA,0x50B3,0x50C2,0x50D6,0x50DE,0x50E5, -0x50ED,0x50E3,0x50EE,0x50F9,0x50F5,0x5109,0x5101,0x5102, -0x5116,0x5115,0x5114,0x511A,0x5121,0x513A,0x5137,0x513C, -0x513B,0x513F,0x5140,0x5152,0x514C,0x5154,0x5162,0x7AF8, -0x5169,0x516A,0x516E,0x5180,0x5182,0x56D8,0x518C,0x5189, -0x518F,0x5191,0x5193,0x5195,0x5196,0x51A4,0x51A6,0x51A2, -0x51A9,0x51AA,0x51AB,0x51B3,0x51B1,0x51B2,0x51B0,0x51B5, -0x51BD,0x51C5,0x51C9,0x51DB,0x51E0,0x8655,0x51E9,0x51ED, - 0,0x51F0,0x51F5,0x51FE,0x5204,0x520B,0x5214,0x520E, -0x5227,0x522A,0x522E,0x5233,0x5239,0x524F,0x5244,0x524B, -0x524C,0x525E,0x5254,0x526A,0x5274,0x5269,0x5273,0x527F, -0x527D,0x528D,0x5294,0x5292,0x5271,0x5288,0x5291,0x8FA8, -0x8FA7,0x52AC,0x52AD,0x52BC,0x52B5,0x52C1,0x52CD,0x52D7, -0x52DE,0x52E3,0x52E6,0x98ED,0x52E0,0x52F3,0x52F5,0x52F8, -0x52F9,0x5306,0x5308,0x7538,0x530D,0x5310,0x530F,0x5315, -0x531A,0x5323,0x532F,0x5331,0x5333,0x5338,0x5340,0x5346, -0x5345,0x4E17,0x5349,0x534D,0x51D6,0x535E,0x5369,0x536E, -0x5918,0x537B,0x5377,0x5382,0x5396,0x53A0,0x53A6,0x53A5, -0x53AE,0x53B0,0x53B6,0x53C3,0x7C12,0x96D9,0x53DF,0x66FC, -0x71EE,0x53EE,0x53E8,0x53ED,0x53FA,0x5401,0x543D,0x5440, -0x542C,0x542D,0x543C,0x542E,0x5436,0x5429,0x541D,0x544E, -0x548F,0x5475,0x548E,0x545F,0x5471,0x5477,0x5470,0x5492, -0x547B,0x5480,0x5476,0x5484,0x5490,0x5486,0x54C7,0x54A2, -0x54B8,0x54A5,0x54AC,0x54C4,0x54C8,0x54A8, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x54AB,0x54C2,0x54A4,0x54BE,0x54BC,0x54D8,0x54E5, -0x54E6,0x550F,0x5514,0x54FD,0x54EE,0x54ED,0x54FA,0x54E2, -0x5539,0x5540,0x5563,0x554C,0x552E,0x555C,0x5545,0x5556, -0x5557,0x5538,0x5533,0x555D,0x5599,0x5580,0x54AF,0x558A, -0x559F,0x557B,0x557E,0x5598,0x559E,0x55AE,0x557C,0x5583, -0x55A9,0x5587,0x55A8,0x55DA,0x55C5,0x55DF,0x55C4,0x55DC, -0x55E4,0x55D4,0x5614,0x55F7,0x5616,0x55FE,0x55FD,0x561B, -0x55F9,0x564E,0x5650,0x71DF,0x5634,0x5636,0x5632,0x5638, - 0,0x566B,0x5664,0x562F,0x566C,0x566A,0x5686,0x5680, -0x568A,0x56A0,0x5694,0x568F,0x56A5,0x56AE,0x56B6,0x56B4, -0x56C2,0x56BC,0x56C1,0x56C3,0x56C0,0x56C8,0x56CE,0x56D1, -0x56D3,0x56D7,0x56EE,0x56F9,0x5700,0x56FF,0x5704,0x5709, -0x5708,0x570B,0x570D,0x5713,0x5718,0x5716,0x55C7,0x571C, -0x5726,0x5737,0x5738,0x574E,0x573B,0x5740,0x574F,0x5769, -0x57C0,0x5788,0x5761,0x577F,0x5789,0x5793,0x57A0,0x57B3, -0x57A4,0x57AA,0x57B0,0x57C3,0x57C6,0x57D4,0x57D2,0x57D3, -0x580A,0x57D6,0x57E3,0x580B,0x5819,0x581D,0x5872,0x5821, -0x5862,0x584B,0x5870,0x6BC0,0x5852,0x583D,0x5879,0x5885, -0x58B9,0x589F,0x58AB,0x58BA,0x58DE,0x58BB,0x58B8,0x58AE, -0x58C5,0x58D3,0x58D1,0x58D7,0x58D9,0x58D8,0x58E5,0x58DC, -0x58E4,0x58DF,0x58EF,0x58FA,0x58F9,0x58FB,0x58FC,0x58FD, -0x5902,0x590A,0x5910,0x591B,0x68A6,0x5925,0x592C,0x592D, -0x5932,0x5938,0x593E,0x7AD2,0x5955,0x5950,0x594E,0x595A, -0x5958,0x5962,0x5960,0x5967,0x596C,0x5969, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5978,0x5981,0x599D,0x4F5E,0x4FAB,0x59A3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,0x5DF5,0x5E0B,0x5E1A,0x5E19,0x5E11,0x5E1B,0x5E36, -0x5E37,0x5E44,0x5E43,0x5E40,0x5E4E,0x5E57,0x5E54,0x5E5F, -0x5E62,0x5E64,0x5E47,0x5E75,0x5E76,0x5E7A,0x9EBC,0x5E7F, -0x5EA0,0x5EC1,0x5EC2,0x5EC8,0x5ED0,0x5ECF, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5ED6,0x5EE3,0x5EDD,0x5EDA,0x5EDB,0x5EE2,0x5EE1, -0x5EE8,0x5EE9,0x5EEC,0x5EF1,0x5EF3,0x5EF0,0x5EF4,0x5EF8, -0x5EFE,0x5F03,0x5F09,0x5F5D,0x5F5C,0x5F0B,0x5F11,0x5F16, -0x5F29,0x5F2D,0x5F38,0x5F41,0x5F48,0x5F4C,0x5F4E,0x5F2F, -0x5F51,0x5F56,0x5F57,0x5F59,0x5F61,0x5F6D,0x5F73,0x5F77, -0x5F83,0x5F82,0x5F7F,0x5F8A,0x5F88,0x5F91,0x5F87,0x5F9E, -0x5F99,0x5F98,0x5FA0,0x5FA8,0x5FAD,0x5FBC,0x5FD6,0x5FFB, -0x5FE4,0x5FF8,0x5FF1,0x5FDD,0x60B3,0x5FFF,0x6021,0x6060, - 0,0x6019,0x6010,0x6029,0x600E,0x6031,0x601B,0x6015, -0x602B,0x6026,0x600F,0x603A,0x605A,0x6041,0x606A,0x6077, -0x605F,0x604A,0x6046,0x604D,0x6063,0x6043,0x6064,0x6042, -0x606C,0x606B,0x6059,0x6081,0x608D,0x60E7,0x6083,0x609A, -0x6084,0x609B,0x6096,0x6097,0x6092,0x60A7,0x608B,0x60E1, -0x60B8,0x60E0,0x60D3,0x60B4,0x5FF0,0x60BD,0x60C6,0x60B5, -0x60D8,0x614D,0x6115,0x6106,0x60F6,0x60F7,0x6100,0x60F4, -0x60FA,0x6103,0x6121,0x60FB,0x60F1,0x610D,0x610E,0x6147, -0x613E,0x6128,0x6127,0x614A,0x613F,0x613C,0x612C,0x6134, -0x613D,0x6142,0x6144,0x6173,0x6177,0x6158,0x6159,0x615A, -0x616B,0x6174,0x616F,0x6165,0x6171,0x615F,0x615D,0x6153, -0x6175,0x6199,0x6196,0x6187,0x61AC,0x6194,0x619A,0x618A, -0x6191,0x61AB,0x61AE,0x61CC,0x61CA,0x61C9,0x61F7,0x61C8, -0x61C3,0x61C6,0x61BA,0x61CB,0x7F79,0x61CD,0x61E6,0x61E3, -0x61F6,0x61FA,0x61F4,0x61FF,0x61FD,0x61FC,0x61FE,0x6200, -0x6208,0x6209,0x620D,0x620C,0x6214,0x621B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x621E,0x6221,0x622A,0x622E,0x6230,0x6232,0x6233, -0x6241,0x624E,0x625E,0x6263,0x625B,0x6260,0x6268,0x627C, -0x6282,0x6289,0x627E,0x6292,0x6293,0x6296,0x62D4,0x6283, -0x6294,0x62D7,0x62D1,0x62BB,0x62CF,0x62FF,0x62C6,0x64D4, -0x62C8,0x62DC,0x62CC,0x62CA,0x62C2,0x62C7,0x629B,0x62C9, -0x630C,0x62EE,0x62F1,0x6327,0x6302,0x6308,0x62EF,0x62F5, -0x6350,0x633E,0x634D,0x641C,0x634F,0x6396,0x638E,0x6380, -0x63AB,0x6376,0x63A3,0x638F,0x6389,0x639F,0x63B5,0x636B, - 0,0x6369,0x63BE,0x63E9,0x63C0,0x63C6,0x63E3,0x63C9, -0x63D2,0x63F6,0x63C4,0x6416,0x6434,0x6406,0x6413,0x6426, -0x6436,0x651D,0x6417,0x6428,0x640F,0x6467,0x646F,0x6476, -0x644E,0x652A,0x6495,0x6493,0x64A5,0x64A9,0x6488,0x64BC, -0x64DA,0x64D2,0x64C5,0x64C7,0x64BB,0x64D8,0x64C2,0x64F1, -0x64E7,0x8209,0x64E0,0x64E1,0x62AC,0x64E3,0x64EF,0x652C, -0x64F6,0x64F4,0x64F2,0x64FA,0x6500,0x64FD,0x6518,0x651C, -0x6505,0x6524,0x6523,0x652B,0x6534,0x6535,0x6537,0x6536, -0x6538,0x754B,0x6548,0x6556,0x6555,0x654D,0x6558,0x655E, -0x655D,0x6572,0x6578,0x6582,0x6583,0x8B8A,0x659B,0x659F, -0x65AB,0x65B7,0x65C3,0x65C6,0x65C1,0x65C4,0x65CC,0x65D2, -0x65DB,0x65D9,0x65E0,0x65E1,0x65F1,0x6772,0x660A,0x6603, -0x65FB,0x6773,0x6635,0x6636,0x6634,0x661C,0x664F,0x6644, -0x6649,0x6641,0x665E,0x665D,0x6664,0x6667,0x6668,0x665F, -0x6662,0x6670,0x6683,0x6688,0x668E,0x6689,0x6684,0x6698, -0x669D,0x66C1,0x66B9,0x66C9,0x66BE,0x66BC, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x66C4,0x66B8,0x66D6,0x66DA,0x66E0,0x663F,0x66E6, -0x66E9,0x66F0,0x66F5,0x66F7,0x670F,0x6716,0x671E,0x6726, -0x6727,0x9738,0x672E,0x673F,0x6736,0x6741,0x6738,0x6737, -0x6746,0x675E,0x6760,0x6759,0x6763,0x6764,0x6789,0x6770, -0x67A9,0x677C,0x676A,0x678C,0x678B,0x67A6,0x67A1,0x6785, -0x67B7,0x67EF,0x67B4,0x67EC,0x67B3,0x67E9,0x67B8,0x67E4, -0x67DE,0x67DD,0x67E2,0x67EE,0x67B9,0x67CE,0x67C6,0x67E7, -0x6A9C,0x681E,0x6846,0x6829,0x6840,0x684D,0x6832,0x684E, - 0,0x68B3,0x682B,0x6859,0x6863,0x6877,0x687F,0x689F, -0x688F,0x68AD,0x6894,0x689D,0x689B,0x6883,0x6AAE,0x68B9, -0x6874,0x68B5,0x68A0,0x68BA,0x690F,0x688D,0x687E,0x6901, -0x68CA,0x6908,0x68D8,0x6922,0x6926,0x68E1,0x690C,0x68CD, -0x68D4,0x68E7,0x68D5,0x6936,0x6912,0x6904,0x68D7,0x68E3, -0x6925,0x68F9,0x68E0,0x68EF,0x6928,0x692A,0x691A,0x6923, -0x6921,0x68C6,0x6979,0x6977,0x695C,0x6978,0x696B,0x6954, -0x697E,0x696E,0x6939,0x6974,0x693D,0x6959,0x6930,0x6961, -0x695E,0x695D,0x6981,0x696A,0x69B2,0x69AE,0x69D0,0x69BF, -0x69C1,0x69D3,0x69BE,0x69CE,0x5BE8,0x69CA,0x69DD,0x69BB, -0x69C3,0x69A7,0x6A2E,0x6991,0x69A0,0x699C,0x6995,0x69B4, -0x69DE,0x69E8,0x6A02,0x6A1B,0x69FF,0x6B0A,0x69F9,0x69F2, -0x69E7,0x6A05,0x69B1,0x6A1E,0x69ED,0x6A14,0x69EB,0x6A0A, -0x6A12,0x6AC1,0x6A23,0x6A13,0x6A44,0x6A0C,0x6A72,0x6A36, -0x6A78,0x6A47,0x6A62,0x6A59,0x6A66,0x6A48,0x6A38,0x6A22, -0x6A90,0x6A8D,0x6AA0,0x6A84,0x6AA2,0x6AA3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,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C6,0x6DEC,0x6DDE,0x6DCC,0x6DE8,0x6DD2,0x6DC5, -0x6DFA,0x6DD9,0x6DE4,0x6DD5,0x6DEA,0x6DEE,0x6E2D,0x6E6E, -0x6E2E,0x6E19,0x6E72,0x6E5F,0x6E3E,0x6E23,0x6E6B,0x6E2B, -0x6E76,0x6E4D,0x6E1F,0x6E43,0x6E3A,0x6E4E,0x6E24,0x6EFF, -0x6E1D,0x6E38,0x6E82,0x6EAA,0x6E98,0x6EC9,0x6EB7,0x6ED3, -0x6EBD,0x6EAF,0x6EC4,0x6EB2,0x6ED4,0x6ED5,0x6E8F,0x6EA5, -0x6EC2,0x6E9F,0x6F41,0x6F11,0x704C,0x6EEC,0x6EF8,0x6EFE, -0x6F3F,0x6EF2,0x6F31,0x6EEF,0x6F32,0x6ECC}; - -/* page 4 0xE040-0xEAA4 */ -static uint16 tab_cp932_uni4[]={ -0x6F3E,0x6F13,0x6EF7,0x6F86,0x6F7A,0x6F78,0x6F81,0x6F80, -0x6F6F,0x6F5B,0x6FF3,0x6F6D,0x6F82,0x6F7C,0x6F58,0x6F8E, -0x6F91,0x6FC2,0x6F66,0x6FB3,0x6FA3,0x6FA1,0x6FA4,0x6FB9, -0x6FC6,0x6FAA,0x6FDF,0x6FD5,0x6FEC,0x6FD4,0x6FD8,0x6FF1, -0x6FEE,0x6FDB,0x7009,0x700B,0x6FFA,0x7011,0x7001,0x700F, -0x6FFE,0x701B,0x701A,0x6F74,0x701D,0x7018,0x701F,0x7030, -0x703E,0x7032,0x7051,0x7063,0x7099,0x7092,0x70AF,0x70F1, -0x70AC,0x70B8,0x70B3,0x70AE,0x70DF,0x70CB,0x70DD, 0, -0x70D9,0x7109,0x70FD,0x711C,0x7119,0x7165,0x7155,0x7188, -0x7166,0x7162,0x714C,0x7156,0x716C,0x718F,0x71FB,0x7184, -0x7195,0x71A8,0x71AC,0x71D7,0x71B9,0x71BE,0x71D2,0x71C9, -0x71D4,0x71CE,0x71E0,0x71EC,0x71E7,0x71F5,0x71FC,0x71F9, -0x71FF,0x720D,0x7210,0x721B,0x7228,0x722D,0x722C,0x7230, -0x7232,0x723B,0x723C,0x723F,0x7240,0x7246,0x724B,0x7258, -0x7274,0x727E,0x7282,0x7281,0x7287,0x7292,0x7296,0x72A2, -0x72A7,0x72B9,0x72B2,0x72C3,0x72C6,0x72C4,0x72CE,0x72D2, -0x72E2,0x72E0,0x72E1,0x72F9,0x72F7,0x500F,0x7317,0x730A, -0x731C,0x7316,0x731D,0x7334,0x732F,0x7329,0x7325,0x733E, -0x734E,0x734F,0x9ED8,0x7357,0x736A,0x7368,0x7370,0x7378, -0x7375,0x737B,0x737A,0x73C8,0x73B3,0x73CE,0x73BB,0x73C0, -0x73E5,0x73EE,0x73DE,0x74A2,0x7405,0x746F,0x7425,0x73F8, -0x7432,0x743A,0x7455,0x743F,0x745F,0x7459,0x7441,0x745C, -0x7469,0x7470,0x7463,0x746A,0x7476,0x747E,0x748B,0x749E, -0x74A7,0x74CA,0x74CF,0x74D4,0x73F1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x74E0,0x74E3,0x74E7,0x74E9,0x74EE,0x74F2,0x74F0,0x74F1, -0x74F8,0x74F7,0x7504,0x7503,0x7505,0x750C,0x750E,0x750D, -0x7515,0x7513,0x751E,0x7526,0x752C,0x753C,0x7544,0x754D, -0x754A,0x7549,0x755B,0x7546,0x755A,0x7569,0x7564,0x7567, -0x756B,0x756D,0x7578,0x7576,0x7586,0x7587,0x7574,0x758A, -0x7589,0x7582,0x7594,0x759A,0x759D,0x75A5,0x75A3,0x75C2, -0x75B3,0x75C3,0x75B5,0x75BD,0x75B8,0x75BC,0x75B1,0x75CD, -0x75CA,0x75D2,0x75D9,0x75E3,0x75DE,0x75FE,0x75FF, 0, -0x75FC,0x7601,0x75F0,0x75FA,0x75F2,0x75F3,0x760B,0x760D, -0x7609,0x761F,0x7627,0x7620,0x7621,0x7622,0x7624,0x7634, -0x7630,0x763B,0x7647,0x7648,0x7646,0x765C,0x7658,0x7661, -0x7662,0x7668,0x7669,0x766A,0x7667,0x766C,0x7670,0x7672, -0x7676,0x7678,0x767C,0x7680,0x7683,0x7688,0x768B,0x768E, -0x7696,0x7693,0x7699,0x769A,0x76B0,0x76B4,0x76B8,0x76B9, -0x76BA,0x76C2,0x76CD,0x76D6,0x76D2,0x76DE,0x76E1,0x76E5, -0x76E7,0x76EA,0x862F,0x76FB,0x7708,0x7707,0x7704,0x7729, -0x7724,0x771E,0x7725,0x7726,0x771B,0x7737,0x7738,0x7747, -0x775A,0x7768,0x776B,0x775B,0x7765,0x777F,0x777E,0x7779, -0x778E,0x778B,0x7791,0x77A0,0x779E,0x77B0,0x77B6,0x77B9, -0x77BF,0x77BC,0x77BD,0x77BB,0x77C7,0x77CD,0x77D7,0x77DA, -0x77DC,0x77E3,0x77EE,0x77FC,0x780C,0x7812,0x7926,0x7820, -0x792A,0x7845,0x788E,0x7874,0x7886,0x787C,0x789A,0x788C, -0x78A3,0x78B5,0x78AA,0x78AF,0x78D1,0x78C6,0x78CB,0x78D4, -0x78BE,0x78BC,0x78C5,0x78CA,0x78EC, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x78E7,0x78DA,0x78FD,0x78F4,0x7907,0x7912,0x7911,0x7919, -0x792C,0x792B,0x7940,0x7960,0x7957,0x795F,0x795A,0x7955, -0x7953,0x797A,0x797F,0x798A,0x799D,0x79A7,0x9F4B,0x79AA, -0x79AE,0x79B3,0x79B9,0x79BA,0x79C9,0x79D5,0x79E7,0x79EC, -0x79E1,0x79E3,0x7A08,0x7A0D,0x7A18,0x7A19,0x7A20,0x7A1F, -0x7980,0x7A31,0x7A3B,0x7A3E,0x7A37,0x7A43,0x7A57,0x7A49, -0x7A61,0x7A62,0x7A69,0x9F9D,0x7A70,0x7A79,0x7A7D,0x7A88, -0x7A97,0x7A95,0x7A98,0x7A96,0x7AA9,0x7AC8,0x7AB0, 0, -0x7AB6,0x7AC5,0x7AC4,0x7ABF,0x9083,0x7AC7,0x7ACA,0x7ACD, -0x7ACF,0x7AD5,0x7AD3,0x7AD9,0x7ADA,0x7ADD,0x7AE1,0x7AE2, -0x7AE6,0x7AED,0x7AF0,0x7B02,0x7B0F,0x7B0A,0x7B06,0x7B33, -0x7B18,0x7B19,0x7B1E,0x7B35,0x7B28,0x7B36,0x7B50,0x7B7A, -0x7B04,0x7B4D,0x7B0B,0x7B4C,0x7B45,0x7B75,0x7B65,0x7B74, -0x7B67,0x7B70,0x7B71,0x7B6C,0x7B6E,0x7B9D,0x7B98,0x7B9F, -0x7B8D,0x7B9C,0x7B9A,0x7B8B,0x7B92,0x7B8F,0x7B5D,0x7B99, -0x7BCB,0x7BC1,0x7BCC,0x7BCF,0x7BB4,0x7BC6,0x7BDD,0x7BE9, -0x7C11,0x7C14,0x7BE6,0x7BE5,0x7C60,0x7C00,0x7C07,0x7C13, -0x7BF3,0x7BF7,0x7C17,0x7C0D,0x7BF6,0x7C23,0x7C27,0x7C2A, -0x7C1F,0x7C37,0x7C2B,0x7C3D,0x7C4C,0x7C43,0x7C54,0x7C4F, -0x7C40,0x7C50,0x7C58,0x7C5F,0x7C64,0x7C56,0x7C65,0x7C6C, -0x7C75,0x7C83,0x7C90,0x7CA4,0x7CAD,0x7CA2,0x7CAB,0x7CA1, -0x7CA8,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7F55,0x7F54,0x7F58, -0x7F5F,0x7F60,0x7F68,0x7F69,0x7F67,0x7F78,0x7F82,0x7F86, -0x7F83,0x7F88,0x7F87,0x7F8C,0x7F94,0x7F9E,0x7F9D,0x7F9A, -0x7FA3,0x7FAF,0x7FB2,0x7FB9,0x7FAE,0x7FB6,0x7FB8,0x8B71, -0x7FC5,0x7FC6,0x7FCA,0x7FD5,0x7FD4,0x7FE1,0x7FE6,0x7FE9, -0x7FF3,0x7FF9,0x98DC,0x8006,0x8004,0x800B,0x8012,0x8018, -0x8019,0x801C,0x8021,0x8028,0x803F,0x803B,0x804A,0x8046, -0x8052,0x8058,0x805A,0x805F,0x8062,0x8068,0x8073,0x8072, -0x8070,0x8076,0x8079,0x807D,0x807F,0x8084,0x8086,0x8085, -0x809B,0x8093,0x809A,0x80AD,0x5190,0x80AC,0x80DB,0x80E5, -0x80D9,0x80DD,0x80C4,0x80DA,0x80D6,0x8109,0x80EF,0x80F1, -0x811B,0x8129,0x8123,0x812F,0x814B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x968B,0x8146,0x813E,0x8153,0x8151,0x80FC,0x8171,0x816E, -0x8165,0x8166,0x8174,0x8183,0x8188,0x818A,0x8180,0x8182, -0x81A0,0x8195,0x81A4,0x81A3,0x815F,0x8193,0x81A9,0x81B0, -0x81B5,0x81BE,0x81B8,0x81BD,0x81C0,0x81C2,0x81BA,0x81C9, -0x81CD,0x81D1,0x81D9,0x81D8,0x81C8,0x81DA,0x81DF,0x81E0, -0x81E7,0x81FA,0x81FB,0x81FE,0x8201,0x8202,0x8205,0x8207, -0x820A,0x820D,0x8210,0x8216,0x8229,0x822B,0x8238,0x8233, -0x8240,0x8259,0x8258,0x825D,0x825A,0x825F,0x8264, 0, -0x8262,0x8268,0x826A,0x826B,0x822E,0x8271,0x8277,0x8278, -0x827E,0x828D,0x8292,0x82AB,0x829F,0x82BB,0x82AC,0x82E1, -0x82E3,0x82DF,0x82D2,0x82F4,0x82F3,0x82FA,0x8393,0x8303, -0x82FB,0x82F9,0x82DE,0x8306,0x82DC,0x8309,0x82D9,0x8335, -0x8334,0x8316,0x8332,0x8331,0x8340,0x8339,0x8350,0x8345, -0x832F,0x832B,0x8317,0x8318,0x8385,0x839A,0x83AA,0x839F, -0x83A2,0x8396,0x8323,0x838E,0x8387,0x838A,0x837C,0x83B5, -0x8373,0x8375,0x83A0,0x8389,0x83A8,0x83F4,0x8413,0x83EB, -0x83CE,0x83FD,0x8403,0x83D8,0x840B,0x83C1,0x83F7,0x8407, -0x83E0,0x83F2,0x840D,0x8422,0x8420,0x83BD,0x8438,0x8506, -0x83FB,0x846D,0x842A,0x843C,0x855A,0x8484,0x8477,0x846B, -0x84AD,0x846E,0x8482,0x8469,0x8446,0x842C,0x846F,0x8479, -0x8435,0x84CA,0x8462,0x84B9,0x84BF,0x849F,0x84D9,0x84CD, -0x84BB,0x84DA,0x84D0,0x84C1,0x84C6,0x84D6,0x84A1,0x8521, -0x84FF,0x84F4,0x8517,0x8518,0x852C,0x851F,0x8515,0x8514, -0x84FC,0x8540,0x8563,0x8558,0x8548, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8541,0x8602,0x854B,0x8555,0x8580,0x85A4,0x8588,0x8591, -0x858A,0x85A8,0x856D,0x8594,0x859B,0x85EA,0x8587,0x859C, -0x8577,0x857E,0x8590,0x85C9,0x85BA,0x85CF,0x85B9,0x85D0, -0x85D5,0x85DD,0x85E5,0x85DC,0x85F9,0x860A,0x8613,0x860B, -0x85FE,0x85FA,0x8606,0x8622,0x861A,0x8630,0x863F,0x864D, -0x4E55,0x8654,0x865F,0x8667,0x8671,0x8693,0x86A3,0x86A9, -0x86AA,0x868B,0x868C,0x86B6,0x86AF,0x86C4,0x86C6,0x86B0, -0x86C9,0x8823,0x86AB,0x86D4,0x86DE,0x86E9,0x86EC, 0, -0x86DF,0x86DB,0x86EF,0x8712,0x8706,0x8708,0x8700,0x8703, -0x86FB,0x8711,0x8709,0x870D,0x86F9,0x870A,0x8734,0x873F, -0x8737,0x873B,0x8725,0x8729,0x871A,0x8760,0x875F,0x8778, -0x874C,0x874E,0x8774,0x8757,0x8768,0x876E,0x8759,0x8753, -0x8763,0x876A,0x8805,0x87A2,0x879F,0x8782,0x87AF,0x87CB, -0x87BD,0x87C0,0x87D0,0x96D6,0x87AB,0x87C4,0x87B3,0x87C7, -0x87C6,0x87BB,0x87EF,0x87F2,0x87E0,0x880F,0x880D,0x87FE, -0x87F6,0x87F7,0x880E,0x87D2,0x8811,0x8816,0x8815,0x8822, -0x8821,0x8831,0x8836,0x8839,0x8827,0x883B,0x8844,0x8842, -0x8852,0x8859,0x885E,0x8862,0x886B,0x8881,0x887E,0x889E, -0x8875,0x887D,0x88B5,0x8872,0x8882,0x8897,0x8892,0x88AE, -0x8899,0x88A2,0x888D,0x88A4,0x88B0,0x88BF,0x88B1,0x88C3, -0x88C4,0x88D4,0x88D8,0x88D9,0x88DD,0x88F9,0x8902,0x88FC, -0x88F4,0x88E8,0x88F2,0x8904,0x890C,0x890A,0x8913,0x8943, -0x891E,0x8925,0x892A,0x892B,0x8941,0x8944,0x893B,0x8936, -0x8938,0x894C,0x891D,0x8960,0x895E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8966,0x8964,0x896D,0x896A,0x896F,0x8974,0x8977,0x897E, -0x8983,0x8988,0x898A,0x8993,0x8998,0x89A1,0x89A9,0x89A6, -0x89AC,0x89AF,0x89B2,0x89BA,0x89BD,0x89BF,0x89C0,0x89DA, -0x89DC,0x89DD,0x89E7,0x89F4,0x89F8,0x8A03,0x8A16,0x8A10, -0x8A0C,0x8A1B,0x8A1D,0x8A25,0x8A36,0x8A41,0x8A5B,0x8A52, -0x8A46,0x8A48,0x8A7C,0x8A6D,0x8A6C,0x8A62,0x8A85,0x8A82, -0x8A84,0x8AA8,0x8AA1,0x8A91,0x8AA5,0x8AA6,0x8A9A,0x8AA3, -0x8AC4,0x8ACD,0x8AC2,0x8ADA,0x8AEB,0x8AF3,0x8AE7, 0, -0x8AE4,0x8AF1,0x8B14,0x8AE0,0x8AE2,0x8AF7,0x8ADE,0x8ADB, -0x8B0C,0x8B07,0x8B1A,0x8AE1,0x8B16,0x8B10,0x8B17,0x8B20, -0x8B33,0x97AB,0x8B26,0x8B2B,0x8B3E,0x8B28,0x8B41,0x8B4C, -0x8B4F,0x8B4E,0x8B49,0x8B56,0x8B5B,0x8B5A,0x8B6B,0x8B5F, -0x8B6C,0x8B6F,0x8B74,0x8B7D,0x8B80,0x8B8C,0x8B8E,0x8B92, -0x8B93,0x8B96,0x8B99,0x8B9A,0x8C3A,0x8C41,0x8C3F,0x8C48, -0x8C4C,0x8C4E,0x8C50,0x8C55,0x8C62,0x8C6C,0x8C78,0x8C7A, -0x8C82,0x8C89,0x8C85,0x8C8A,0x8C8D,0x8C8E,0x8C94,0x8C7C, -0x8C98,0x621D,0x8CAD,0x8CAA,0x8CBD,0x8CB2,0x8CB3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8F9F,0x8FA3,0x8FAD,0x8FAF, -0x8FB7,0x8FDA,0x8FE5,0x8FE2,0x8FEA,0x8FEF,0x9087,0x8FF4, -0x9005,0x8FF9,0x8FFA,0x9011,0x9015,0x9021,0x900D,0x901E, -0x9016,0x900B,0x9027,0x9036,0x9035,0x9039,0x8FF8,0x904F, -0x9050,0x9051,0x9052,0x900E,0x9049,0x903E,0x9056,0x9058, -0x905E,0x9068,0x906F,0x9076,0x96A8,0x9072,0x9082,0x907D, -0x9081,0x9080,0x908A,0x9089,0x908F,0x90A8,0x90AF,0x90B1, -0x90B5,0x90E2,0x90E4,0x6248,0x90DB,0x9102,0x9112,0x9119, -0x9132,0x9130,0x914A,0x9156,0x9158,0x9163,0x9165,0x9169, -0x9173,0x9172,0x918B,0x9189,0x9182,0x91A2,0x91AB,0x91AF, -0x91AA,0x91B5,0x91B4,0x91BA,0x91C0,0x91C1,0x91C9,0x91CB, -0x91D0,0x91D6,0x91DF,0x91E1,0x91DB,0x91FC,0x91F5,0x91F6, -0x921E,0x91FF,0x9214,0x922C,0x9215,0x9211,0x925E,0x9257, -0x9245,0x9249,0x9264,0x9248,0x9295,0x923F,0x924B,0x9250, -0x929C,0x9296,0x9293,0x929B,0x925A,0x92CF,0x92B9,0x92B7, -0x92E9,0x930F,0x92FA,0x9344,0x932E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9319,0x9322,0x931A,0x9323,0x933A,0x9335,0x933B,0x935C, -0x9360,0x937C,0x936E,0x9356,0x93B0,0x93AC,0x93AD,0x9394, -0x93B9,0x93D6,0x93D7,0x93E8,0x93E5,0x93D8,0x93C3,0x93DD, -0x93D0,0x93C8,0x93E4,0x941A,0x9414,0x9413,0x9403,0x9407, -0x9410,0x9436,0x942B,0x9435,0x9421,0x943A,0x9441,0x9452, -0x9444,0x945B,0x9460,0x9462,0x945E,0x946A,0x9229,0x9470, -0x9475,0x9477,0x947D,0x945A,0x947C,0x947E,0x9481,0x947F, -0x9582,0x9587,0x958A,0x9594,0x9596,0x9598,0x9599, 0, -0x95A0,0x95A8,0x95A7,0x95AD,0x95BC,0x95BB,0x95B9,0x95BE, -0x95CA,0x6FF6,0x95C3,0x95CD,0x95CC,0x95D5,0x95D4,0x95D6, -0x95DC,0x95E1,0x95E5,0x95E2,0x9621,0x9628,0x962E,0x962F, -0x9642,0x964C,0x964F,0x964B,0x9677,0x965C,0x965E,0x965D, -0x965F,0x9666,0x9672,0x966C,0x968D,0x9698,0x9695,0x9697, -0x96AA,0x96A7,0x96B1,0x96B2,0x96B0,0x96B4,0x96B6,0x96B8, -0x96B9,0x96CE,0x96CB,0x96C9,0x96CD,0x894D,0x96DC,0x970D, -0x96D5,0x96F9,0x9704,0x9706,0x9708,0x9713,0x970E,0x9711, -0x970F,0x9716,0x9719,0x9724,0x972A,0x9730,0x9739,0x973D, -0x973E,0x9744,0x9746,0x9748,0x9742,0x9749,0x975C,0x9760, -0x9764,0x9766,0x9768,0x52D2,0x976B,0x9771,0x9779,0x9785, -0x977C,0x9781,0x977A,0x9786,0x978B,0x978F,0x9790,0x979C, -0x97A8,0x97A6,0x97A3,0x97B3,0x97B4,0x97C3,0x97C6,0x97C8, -0x97CB,0x97DC,0x97ED,0x9F4F,0x97F2,0x7ADF,0x97F6,0x97F5, -0x980F,0x980C,0x9838,0x9824,0x9821,0x9837,0x983D,0x9846, -0x984F,0x984B,0x986B,0x986F,0x9870, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9871,0x9874,0x9873,0x98AA,0x98AF,0x98B1,0x98B6,0x98C4, -0x98C3,0x98C6,0x98E9,0x98EB,0x9903,0x9909,0x9912,0x9914, -0x9918,0x9921,0x991D,0x991E,0x9924,0x9920,0x992C,0x992E, -0x993D,0x993E,0x9942,0x9949,0x9945,0x9950,0x994B,0x9951, -0x9952,0x994C,0x9955,0x9997,0x9998,0x99A5,0x99AD,0x99AE, -0x99BC,0x99DF,0x99DB,0x99DD,0x99D8,0x99D1,0x99ED,0x99EE, -0x99F1,0x99F2,0x99FB,0x99F8,0x9A01,0x9A0F,0x9A05,0x99E2, -0x9A19,0x9A2B,0x9A37,0x9A45,0x9A42,0x9A40,0x9A43, 0, -0x9A3E,0x9A55,0x9A4D,0x9A5B,0x9A57,0x9A5F,0x9A62,0x9A65, -0x9A64,0x9A69,0x9A6B,0x9A6A,0x9AAD,0x9AB0,0x9ABC,0x9AC0, -0x9ACF,0x9AD1,0x9AD3,0x9AD4,0x9ADE,0x9ADF,0x9AE2,0x9AE3, -0x9AE6,0x9AEF,0x9AEB,0x9AEE,0x9AF4,0x9AF1,0x9AF7,0x9AFB, -0x9B06,0x9B18,0x9B1A,0x9B1F,0x9B22,0x9B23,0x9B25,0x9B27, -0x9B28,0x9B29,0x9B2A,0x9B2E,0x9B2F,0x9B32,0x9B44,0x9B43, -0x9B4F,0x9B4D,0x9B4E,0x9B51,0x9B58,0x9B74,0x9B93,0x9B83, -0x9B91,0x9B96,0x9B97,0x9B9F,0x9BA0,0x9BA8,0x9BB4,0x9BC0, -0x9BCA,0x9BB9,0x9BC6,0x9BCF,0x9BD1,0x9BD2,0x9BE3,0x9BE2, -0x9BE4,0x9BD4,0x9BE1,0x9C3A,0x9BF2,0x9BF1,0x9BF0,0x9C15, -0x9C14,0x9C09,0x9C13,0x9C0C,0x9C06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,0x9F5F,0x9F60,0x9F61,0x9F66,0x9F67,0x9F6C, -0x9F6A,0x9F77,0x9F72,0x9F76,0x9F95,0x9F9C,0x9FA0,0x582F, -0x69C7,0x9059,0x7464,0x51DC,0x7199}; - -/* page 5 0xED40-0xEEFC - -IBM Selected Kanji and Non-Kanji(NEC implementation) */ -static uint16 tab_cp932_uni5[]={ -0x7E8A,0x891C,0x9348,0x9288,0x84DC,0x4FC9,0x70BB,0x6631, -0x68C8,0x92F9,0x66FB,0x5F45,0x4E28,0x4EE1,0x4EFC,0x4F00, -0x4F03,0x4F39,0x4F56,0x4F92,0x4F8A,0x4F9A,0x4F94,0x4FCD, -0x5040,0x5022,0x4FFF,0x501E,0x5046,0x5070,0x5042,0x5094, -0x50F4,0x50D8,0x514A,0x5164,0x519D,0x51BE,0x51EC,0x5215, -0x529C,0x52A6,0x52C0,0x52DB,0x5300,0x5307,0x5324,0x5372, -0x5393,0x53B2,0x53DD,0xFA0E,0x549C,0x548A,0x54A9,0x54FF, -0x5586,0x5759,0x5765,0x57AC,0x57C8,0x57C7,0xFA0F, 0, -0xFA10,0x589E,0x58B2,0x590B,0x5953,0x595B,0x595D,0x5963, -0x59A4,0x59BA,0x5B56,0x5BC0,0x752F,0x5BD8,0x5BEC,0x5C1E, -0x5CA6,0x5CBA,0x5CF5,0x5D27,0x5D53,0xFA11,0x5D42,0x5D6D, -0x5DB8,0x5DB9,0x5DD0,0x5F21,0x5F34,0x5F67,0x5FB7,0x5FDE, -0x605D,0x6085,0x608A,0x60DE,0x60D5,0x6120,0x60F2,0x6111, -0x6137,0x6130,0x6198,0x6213,0x62A6,0x63F5,0x6460,0x649D, -0x64CE,0x654E,0x6600,0x6615,0x663B,0x6609,0x662E,0x661E, -0x6624,0x6665,0x6657,0x6659,0xFA12,0x6673,0x6699,0x66A0, -0x66B2,0x66BF,0x66FA,0x670E,0xF929,0x6766,0x67BB,0x6852, -0x67C0,0x6801,0x6844,0x68CF,0xFA13,0x6968,0xFA14,0x6998, -0x69E2,0x6A30,0x6A6B,0x6A46,0x6A73,0x6A7E,0x6AE2,0x6AE4, -0x6BD6,0x6C3F,0x6C5C,0x6C86,0x6C6F,0x6CDA,0x6D04,0x6D87, -0x6D6F,0x6D96,0x6DAC,0x6DCF,0x6DF8,0x6DF2,0x6DFC,0x6E39, -0x6E5C,0x6E27,0x6E3C,0x6EBF,0x6F88,0x6FB5,0x6FF5,0x7005, -0x7007,0x7028,0x7085,0x70AB,0x710F,0x7104,0x715C,0x7146, -0x7147,0xFA15,0x71C1,0x71FE,0x72B1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x72BE,0x7324,0xFA16,0x7377,0x73BD,0x73C9,0x73D6,0x73E3, -0x73D2,0x7407,0x73F5,0x7426,0x742A,0x7429,0x742E,0x7462, -0x7489,0x749F,0x7501,0x756F,0x7682,0x769C,0x769E,0x769B, -0x76A6,0xFA17,0x7746,0x52AF,0x7821,0x784E,0x7864,0x787A, -0x7930,0xFA18,0xFA19,0xFA1A,0x7994,0xFA1B,0x799B,0x7AD1, -0x7AE7,0xFA1C,0x7AEB,0x7B9E,0xFA1D,0x7D48,0x7D5C,0x7DB7, -0x7DA0,0x7DD6,0x7E52,0x7F47,0x7FA1,0xFA1E,0x8301,0x8362, -0x837F,0x83C7,0x83F6,0x8448,0x84B4,0x8553,0x8559, 0, -0x856B,0xFA1F,0x85B0,0xFA20,0xFA21,0x8807,0x88F5,0x8A12, -0x8A37,0x8A79,0x8AA7,0x8ABE,0x8ADF,0xFA22,0x8AF6,0x8B53, -0x8B7F,0x8CF0,0x8CF4,0x8D12,0x8D76,0xFA23,0x8ECF,0xFA24, -0xFA25,0x9067,0x90DE,0xFA26,0x9115,0x9127,0x91DA,0x91D7, -0x91DE,0x91ED,0x91EE,0x91E4,0x91E5,0x9206,0x9210,0x920A, -0x923A,0x9240,0x923C,0x924E,0x9259,0x9251,0x9239,0x9267, -0x92A7,0x9277,0x9278,0x92E7,0x92D7,0x92D9,0x92D0,0xFA27, -0x92D5,0x92E0,0x92D3,0x9325,0x9321,0x92FB,0xFA28,0x931E, -0x92FF,0x931D,0x9302,0x9370,0x9357,0x93A4,0x93C6,0x93DE, -0x93F8,0x9431,0x9445,0x9448,0x9592,0xF9DC,0xFA29,0x969D, -0x96AF,0x9733,0x973B,0x9743,0x974D,0x974F,0x9751,0x9755, -0x9857,0x9865,0xFA2A,0xFA2B,0x9927,0xFA2C,0x999E,0x9A4E, -0x9AD9,0x9ADC,0x9B75,0x9B72,0x9B8F,0x9BB1,0x9BBB,0x9C00, -0x9D70,0x9D6B,0xFA2D,0x9E19,0x9ED1, 0, 0,0x2170, -0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,0x2178, -0x2179,0xFFE2,0xFFE4,0xFF07,0xFF02}; - -/* page 6 0xF040-0xF9FC - User defined characters */ -static uint16 tab_cp932_uni6[]={ -0xE000,0xE001,0xE002,0xE003,0xE004,0xE005,0xE006,0xE007, -0xE008,0xE009,0xE00A,0xE00B,0xE00C,0xE00D,0xE00E,0xE00F, -0xE010,0xE011,0xE012,0xE013,0xE014,0xE015,0xE016,0xE017, -0xE018,0xE019,0xE01A,0xE01B,0xE01C,0xE01D,0xE01E,0xE01F, -0xE020,0xE021,0xE022,0xE023,0xE024,0xE025,0xE026,0xE027, -0xE028,0xE029,0xE02A,0xE02B,0xE02C,0xE02D,0xE02E,0xE02F, -0xE030,0xE031,0xE032,0xE033,0xE034,0xE035,0xE036,0xE037, -0xE038,0xE039,0xE03A,0xE03B,0xE03C,0xE03D,0xE03E, 0, -0xE03F,0xE040,0xE041,0xE042,0xE043,0xE044,0xE045,0xE046, -0xE047,0xE048,0xE049,0xE04A,0xE04B,0xE04C,0xE04D,0xE04E, -0xE04F,0xE050,0xE051,0xE052,0xE053,0xE054,0xE055,0xE056, -0xE057,0xE058,0xE059,0xE05A,0xE05B,0xE05C,0xE05D,0xE05E, -0xE05F,0xE060,0xE061,0xE062,0xE063,0xE064,0xE065,0xE066, -0xE067,0xE068,0xE069,0xE06A,0xE06B,0xE06C,0xE06D,0xE06E, -0xE06F,0xE070,0xE071,0xE072,0xE073,0xE074,0xE075,0xE076, -0xE077,0xE078,0xE079,0xE07A,0xE07B,0xE07C,0xE07D,0xE07E, -0xE07F,0xE080,0xE081,0xE082,0xE083,0xE084,0xE085,0xE086, -0xE087,0xE088,0xE089,0xE08A,0xE08B,0xE08C,0xE08D,0xE08E, -0xE08F,0xE090,0xE091,0xE092,0xE093,0xE094,0xE095,0xE096, -0xE097,0xE098,0xE099,0xE09A,0xE09B,0xE09C,0xE09D,0xE09E, -0xE09F,0xE0A0,0xE0A1,0xE0A2,0xE0A3,0xE0A4,0xE0A5,0xE0A6, -0xE0A7,0xE0A8,0xE0A9,0xE0AA,0xE0AB,0xE0AC,0xE0AD,0xE0AE, -0xE0AF,0xE0B0,0xE0B1,0xE0B2,0xE0B3,0xE0B4,0xE0B5,0xE0B6, -0xE0B7,0xE0B8,0xE0B9,0xE0BA,0xE0BB, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE0BC,0xE0BD,0xE0BE,0xE0BF,0xE0C0,0xE0C1,0xE0C2,0xE0C3, -0xE0C4,0xE0C5,0xE0C6,0xE0C7,0xE0C8,0xE0C9,0xE0CA,0xE0CB, -0xE0CC,0xE0CD,0xE0CE,0xE0CF,0xE0D0,0xE0D1,0xE0D2,0xE0D3, -0xE0D4,0xE0D5,0xE0D6,0xE0D7,0xE0D8,0xE0D9,0xE0DA,0xE0DB, -0xE0DC,0xE0DD,0xE0DE,0xE0DF,0xE0E0,0xE0E1,0xE0E2,0xE0E3, -0xE0E4,0xE0E5,0xE0E6,0xE0E7,0xE0E8,0xE0E9,0xE0EA,0xE0EB, -0xE0EC,0xE0ED,0xE0EE,0xE0EF,0xE0F0,0xE0F1,0xE0F2,0xE0F3, -0xE0F4,0xE0F5,0xE0F6,0xE0F7,0xE0F8,0xE0F9,0xE0FA, 0, -0xE0FB,0xE0FC,0xE0FD,0xE0FE,0xE0FF,0xE100,0xE101,0xE102, -0xE103,0xE104,0xE105,0xE106,0xE107,0xE108,0xE109,0xE10A, -0xE10B,0xE10C,0xE10D,0xE10E,0xE10F,0xE110,0xE111,0xE112, -0xE113,0xE114,0xE115,0xE116,0xE117,0xE118,0xE119,0xE11A, -0xE11B,0xE11C,0xE11D,0xE11E,0xE11F,0xE120,0xE121,0xE122, -0xE123,0xE124,0xE125,0xE126,0xE127,0xE128,0xE129,0xE12A, -0xE12B,0xE12C,0xE12D,0xE12E,0xE12F,0xE130,0xE131,0xE132, -0xE133,0xE134,0xE135,0xE136,0xE137,0xE138,0xE139,0xE13A, -0xE13B,0xE13C,0xE13D,0xE13E,0xE13F,0xE140,0xE141,0xE142, -0xE143,0xE144,0xE145,0xE146,0xE147,0xE148,0xE149,0xE14A, -0xE14B,0xE14C,0xE14D,0xE14E,0xE14F,0xE150,0xE151,0xE152, -0xE153,0xE154,0xE155,0xE156,0xE157,0xE158,0xE159,0xE15A, -0xE15B,0xE15C,0xE15D,0xE15E,0xE15F,0xE160,0xE161,0xE162, -0xE163,0xE164,0xE165,0xE166,0xE167,0xE168,0xE169,0xE16A, -0xE16B,0xE16C,0xE16D,0xE16E,0xE16F,0xE170,0xE171,0xE172, -0xE173,0xE174,0xE175,0xE176,0xE177, 0, 0, 0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3,0xE1F4,0xE1F5,0xE1F6, -0xE1F7,0xE1F8,0xE1F9,0xE1FA,0xE1FB,0xE1FC,0xE1FD,0xE1FE, -0xE1FF,0xE200,0xE201,0xE202,0xE203,0xE204,0xE205,0xE206, -0xE207,0xE208,0xE209,0xE20A,0xE20B,0xE20C,0xE20D,0xE20E, -0xE20F,0xE210,0xE211,0xE212,0xE213,0xE214,0xE215,0xE216, -0xE217,0xE218,0xE219,0xE21A,0xE21B,0xE21C,0xE21D,0xE21E, -0xE21F,0xE220,0xE221,0xE222,0xE223,0xE224,0xE225,0xE226, -0xE227,0xE228,0xE229,0xE22A,0xE22B,0xE22C,0xE22D,0xE22E, -0xE22F,0xE230,0xE231,0xE232,0xE233, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE234,0xE235,0xE236,0xE237,0xE238,0xE239,0xE23A,0xE23B, -0xE23C,0xE23D,0xE23E,0xE23F,0xE240,0xE241,0xE242,0xE243, -0xE244,0xE245,0xE246,0xE247,0xE248,0xE249,0xE24A,0xE24B, -0xE24C,0xE24D,0xE24E,0xE24F,0xE250,0xE251,0xE252,0xE253, -0xE254,0xE255,0xE256,0xE257,0xE258,0xE259,0xE25A,0xE25B, -0xE25C,0xE25D,0xE25E,0xE25F,0xE260,0xE261,0xE262,0xE263, -0xE264,0xE265,0xE266,0xE267,0xE268,0xE269,0xE26A,0xE26B, -0xE26C,0xE26D,0xE26E,0xE26F,0xE270,0xE271,0xE272, 0, -0xE273,0xE274,0xE275,0xE276,0xE277,0xE278,0xE279,0xE27A, -0xE27B,0xE27C,0xE27D,0xE27E,0xE27F,0xE280,0xE281,0xE282, -0xE283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2FC,0xE2FD,0xE2FE,0xE2FF, -0xE300,0xE301,0xE302,0xE303,0xE304,0xE305,0xE306,0xE307, -0xE308,0xE309,0xE30A,0xE30B,0xE30C,0xE30D,0xE30E,0xE30F, -0xE310,0xE311,0xE312,0xE313,0xE314,0xE315,0xE316,0xE317, -0xE318,0xE319,0xE31A,0xE31B,0xE31C,0xE31D,0xE31E,0xE31F, -0xE320,0xE321,0xE322,0xE323,0xE324,0xE325,0xE326,0xE327, -0xE328,0xE329,0xE32A,0xE32B,0xE32C,0xE32D,0xE32E, 0, -0xE32F,0xE330,0xE331,0xE332,0xE333,0xE334,0xE335,0xE336, -0xE337,0xE338,0xE339,0xE33A,0xE33B,0xE33C,0xE33D,0xE33E, -0xE33F,0xE340,0xE341,0xE342,0xE343,0xE344,0xE345,0xE346, -0xE347,0xE348,0xE349,0xE34A,0xE34B,0xE34C,0xE34D,0xE34E, -0xE34F,0xE350,0xE351,0xE352,0xE353,0xE354,0xE355,0xE356, -0xE357,0xE358,0xE359,0xE35A,0xE35B,0xE35C,0xE35D,0xE35E, -0xE35F,0xE360,0xE361,0xE362,0xE363,0xE364,0xE365,0xE366, -0xE367,0xE368,0xE369,0xE36A,0xE36B,0xE36C,0xE36D,0xE36E, -0xE36F,0xE370,0xE371,0xE372,0xE373,0xE374,0xE375,0xE376, -0xE377,0xE378,0xE379,0xE37A,0xE37B,0xE37C,0xE37D,0xE37E, -0xE37F,0xE380,0xE381,0xE382,0xE383,0xE384,0xE385,0xE386, -0xE387,0xE388,0xE389,0xE38A,0xE38B,0xE38C,0xE38D,0xE38E, -0xE38F,0xE390,0xE391,0xE392,0xE393,0xE394,0xE395,0xE396, -0xE397,0xE398,0xE399,0xE39A,0xE39B,0xE39C,0xE39D,0xE39E, -0xE39F,0xE3A0,0xE3A1,0xE3A2,0xE3A3,0xE3A4,0xE3A5,0xE3A6, -0xE3A7,0xE3A8,0xE3A9,0xE3AA,0xE3AB, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0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42C,0xE42D,0xE42E,0xE42F,0xE430,0xE431,0xE432, -0xE433,0xE434,0xE435,0xE436,0xE437,0xE438,0xE439,0xE43A, -0xE43B,0xE43C,0xE43D,0xE43E,0xE43F,0xE440,0xE441,0xE442, -0xE443,0xE444,0xE445,0xE446,0xE447,0xE448,0xE449,0xE44A, -0xE44B,0xE44C,0xE44D,0xE44E,0xE44F,0xE450,0xE451,0xE452, -0xE453,0xE454,0xE455,0xE456,0xE457,0xE458,0xE459,0xE45A, -0xE45B,0xE45C,0xE45D,0xE45E,0xE45F,0xE460,0xE461,0xE462, -0xE463,0xE464,0xE465,0xE466,0xE467, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE468,0xE469,0xE46A,0xE46B,0xE46C,0xE46D,0xE46E,0xE46F, -0xE470,0xE471,0xE472,0xE473,0xE474,0xE475,0xE476,0xE477, -0xE478,0xE479,0xE47A,0xE47B,0xE47C,0xE47D,0xE47E,0xE47F, -0xE480,0xE481,0xE482,0xE483,0xE484,0xE485,0xE486,0xE487, -0xE488,0xE489,0xE48A,0xE48B,0xE48C,0xE48D,0xE48E,0xE48F, -0xE490,0xE491,0xE492,0xE493,0xE494,0xE495,0xE496,0xE497, -0xE498,0xE499,0xE49A,0xE49B,0xE49C,0xE49D,0xE49E,0xE49F, -0xE4A0,0xE4A1,0xE4A2,0xE4A3,0xE4A4,0xE4A5,0xE4A6, 0, -0xE4A7,0xE4A8,0xE4A9,0xE4AA,0xE4AB,0xE4AC,0xE4AD,0xE4AE, -0xE4AF,0xE4B0,0xE4B1,0xE4B2,0xE4B3,0xE4B4,0xE4B5,0xE4B6, -0xE4B7,0xE4B8,0xE4B9,0xE4BA,0xE4BB,0xE4BC,0xE4BD,0xE4BE, -0xE4BF,0xE4C0,0xE4C1,0xE4C2,0xE4C3,0xE4C4,0xE4C5,0xE4C6, -0xE4C7,0xE4C8,0xE4C9,0xE4CA,0xE4CB,0xE4CC,0xE4CD,0xE4CE, -0xE4CF,0xE4D0,0xE4D1,0xE4D2,0xE4D3,0xE4D4,0xE4D5,0xE4D6, -0xE4D7,0xE4D8,0xE4D9,0xE4DA,0xE4DB,0xE4DC,0xE4DD,0xE4DE, -0xE4DF,0xE4E0,0xE4E1,0xE4E2,0xE4E3,0xE4E4,0xE4E5,0xE4E6, -0xE4E7,0xE4E8,0xE4E9,0xE4EA,0xE4EB,0xE4EC,0xE4ED,0xE4EE, -0xE4EF,0xE4F0,0xE4F1,0xE4F2,0xE4F3,0xE4F4,0xE4F5,0xE4F6, -0xE4F7,0xE4F8,0xE4F9,0xE4FA,0xE4FB,0xE4FC,0xE4FD,0xE4FE, -0xE4FF,0xE500,0xE501,0xE502,0xE503,0xE504,0xE505,0xE506, -0xE507,0xE508,0xE509,0xE50A,0xE50B,0xE50C,0xE50D,0xE50E, -0xE50F,0xE510,0xE511,0xE512,0xE513,0xE514,0xE515,0xE516, -0xE517,0xE518,0xE519,0xE51A,0xE51B,0xE51C,0xE51D,0xE51E, -0xE51F,0xE520,0xE521,0xE522,0xE523, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE524,0xE525,0xE526,0xE527,0xE528,0xE529,0xE52A,0xE52B, -0xE52C,0xE52D,0xE52E,0xE52F,0xE530,0xE531,0xE532,0xE533, -0xE534,0xE535,0xE536,0xE537,0xE538,0xE539,0xE53A,0xE53B, -0xE53C,0xE53D,0xE53E,0xE53F,0xE540,0xE541,0xE542,0xE543, -0xE544,0xE545,0xE546,0xE547,0xE548,0xE549,0xE54A,0xE54B, -0xE54C,0xE54D,0xE54E,0xE54F,0xE550,0xE551,0xE552,0xE553, -0xE554,0xE555,0xE556,0xE557,0xE558,0xE559,0xE55A,0xE55B, -0xE55C,0xE55D,0xE55E,0xE55F,0xE560,0xE561,0xE562, 0, -0xE563,0xE564,0xE565,0xE566,0xE567,0xE568,0xE569,0xE56A, -0xE56B,0xE56C,0xE56D,0xE56E,0xE56F,0xE570,0xE571,0xE572, -0xE573,0xE574,0xE575,0xE576,0xE577,0xE578,0xE579,0xE57A, -0xE57B,0xE57C,0xE57D,0xE57E,0xE57F,0xE580,0xE581,0xE582, -0xE583,0xE584,0xE585,0xE586,0xE587,0xE588,0xE589,0xE58A, -0xE58B,0xE58C,0xE58D,0xE58E,0xE58F,0xE590,0xE591,0xE592, -0xE593,0xE594,0xE595,0xE596,0xE597,0xE598,0xE599,0xE59A, -0xE59B,0xE59C,0xE59D,0xE59E,0xE59F,0xE5A0,0xE5A1,0xE5A2, -0xE5A3,0xE5A4,0xE5A5,0xE5A6,0xE5A7,0xE5A8,0xE5A9,0xE5AA, -0xE5AB,0xE5AC,0xE5AD,0xE5AE,0xE5AF,0xE5B0,0xE5B1,0xE5B2, -0xE5B3,0xE5B4,0xE5B5,0xE5B6,0xE5B7,0xE5B8,0xE5B9,0xE5BA, -0xE5BB,0xE5BC,0xE5BD,0xE5BE,0xE5BF,0xE5C0,0xE5C1,0xE5C2, -0xE5C3,0xE5C4,0xE5C5,0xE5C6,0xE5C7,0xE5C8,0xE5C9,0xE5CA, -0xE5CB,0xE5CC,0xE5CD,0xE5CE,0xE5CF,0xE5D0,0xE5D1,0xE5D2, -0xE5D3,0xE5D4,0xE5D5,0xE5D6,0xE5D7,0xE5D8,0xE5D9,0xE5DA, -0xE5DB,0xE5DC,0xE5DD,0xE5DE,0xE5DF, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE5E0,0xE5E1,0xE5E2,0xE5E3,0xE5E4,0xE5E5,0xE5E6,0xE5E7, -0xE5E8,0xE5E9,0xE5EA,0xE5EB,0xE5EC,0xE5ED,0xE5EE,0xE5EF, -0xE5F0,0xE5F1,0xE5F2,0xE5F3,0xE5F4,0xE5F5,0xE5F6,0xE5F7, -0xE5F8,0xE5F9,0xE5FA,0xE5FB,0xE5FC,0xE5FD,0xE5FE,0xE5FF, -0xE600,0xE601,0xE602,0xE603,0xE604,0xE605,0xE606,0xE607, -0xE608,0xE609,0xE60A,0xE60B,0xE60C,0xE60D,0xE60E,0xE60F, -0xE610,0xE611,0xE612,0xE613,0xE614,0xE615,0xE616,0xE617, -0xE618,0xE619,0xE61A,0xE61B,0xE61C,0xE61D,0xE61E, 0, -0xE61F,0xE620,0xE621,0xE622,0xE623,0xE624,0xE625,0xE626, -0xE627,0xE628,0xE629,0xE62A,0xE62B,0xE62C,0xE62D,0xE62E, -0xE62F,0xE630,0xE631,0xE632,0xE633,0xE634,0xE635,0xE636, -0xE637,0xE638,0xE639,0xE63A,0xE63B,0xE63C,0xE63D,0xE63E, -0xE63F,0xE640,0xE641,0xE642,0xE643,0xE644,0xE645,0xE646, -0xE647,0xE648,0xE649,0xE64A,0xE64B,0xE64C,0xE64D,0xE64E, -0xE64F,0xE650,0xE651,0xE652,0xE653,0xE654,0xE655,0xE656, -0xE657,0xE658,0xE659,0xE65A,0xE65B,0xE65C,0xE65D,0xE65E, -0xE65F,0xE660,0xE661,0xE662,0xE663,0xE664,0xE665,0xE666, -0xE667,0xE668,0xE669,0xE66A,0xE66B,0xE66C,0xE66D,0xE66E, -0xE66F,0xE670,0xE671,0xE672,0xE673,0xE674,0xE675,0xE676, -0xE677,0xE678,0xE679,0xE67A,0xE67B,0xE67C,0xE67D,0xE67E, -0xE67F,0xE680,0xE681,0xE682,0xE683,0xE684,0xE685,0xE686, -0xE687,0xE688,0xE689,0xE68A,0xE68B,0xE68C,0xE68D,0xE68E, -0xE68F,0xE690,0xE691,0xE692,0xE693,0xE694,0xE695,0xE696, -0xE697,0xE698,0xE699,0xE69A,0xE69B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE69C,0xE69D,0xE69E,0xE69F,0xE6A0,0xE6A1,0xE6A2,0xE6A3, -0xE6A4,0xE6A5,0xE6A6,0xE6A7,0xE6A8,0xE6A9,0xE6AA,0xE6AB, -0xE6AC,0xE6AD,0xE6AE,0xE6AF,0xE6B0,0xE6B1,0xE6B2,0xE6B3, -0xE6B4,0xE6B5,0xE6B6,0xE6B7,0xE6B8,0xE6B9,0xE6BA,0xE6BB, -0xE6BC,0xE6BD,0xE6BE,0xE6BF,0xE6C0,0xE6C1,0xE6C2,0xE6C3, -0xE6C4,0xE6C5,0xE6C6,0xE6C7,0xE6C8,0xE6C9,0xE6CA,0xE6CB, -0xE6CC,0xE6CD,0xE6CE,0xE6CF,0xE6D0,0xE6D1,0xE6D2,0xE6D3, -0xE6D4,0xE6D5,0xE6D6,0xE6D7,0xE6D8,0xE6D9,0xE6DA, 0, -0xE6DB,0xE6DC,0xE6DD,0xE6DE,0xE6DF,0xE6E0,0xE6E1,0xE6E2, -0xE6E3,0xE6E4,0xE6E5,0xE6E6,0xE6E7,0xE6E8,0xE6E9,0xE6EA, -0xE6EB,0xE6EC,0xE6ED,0xE6EE,0xE6EF,0xE6F0,0xE6F1,0xE6F2, -0xE6F3,0xE6F4,0xE6F5,0xE6F6,0xE6F7,0xE6F8,0xE6F9,0xE6FA, -0xE6FB,0xE6FC,0xE6FD,0xE6FE,0xE6FF,0xE700,0xE701,0xE702, -0xE703,0xE704,0xE705,0xE706,0xE707,0xE708,0xE709,0xE70A, -0xE70B,0xE70C,0xE70D,0xE70E,0xE70F,0xE710,0xE711,0xE712, -0xE713,0xE714,0xE715,0xE716,0xE717,0xE718,0xE719,0xE71A, -0xE71B,0xE71C,0xE71D,0xE71E,0xE71F,0xE720,0xE721,0xE722, -0xE723,0xE724,0xE725,0xE726,0xE727,0xE728,0xE729,0xE72A, -0xE72B,0xE72C,0xE72D,0xE72E,0xE72F,0xE730,0xE731,0xE732, -0xE733,0xE734,0xE735,0xE736,0xE737,0xE738,0xE739,0xE73A, -0xE73B,0xE73C,0xE73D,0xE73E,0xE73F,0xE740,0xE741,0xE742, -0xE743,0xE744,0xE745,0xE746,0xE747,0xE748,0xE749,0xE74A, -0xE74B,0xE74C,0xE74D,0xE74E,0xE74F,0xE750,0xE751,0xE752, -0xE753,0xE754,0xE755,0xE756,0xE757, 0, 0, 0}; - -/* page 7 0xFA40-0xFC4B - -IBM Selected Kanji and Non-Kanji */ -static uint16 tab_cp932_uni7[]={ -0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177, -0x2178,0x2179,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165, -0x2166,0x2167,0x2168,0x2169,0xFFE2,0xFFE4,0xFF07,0xFF02, -0x3231,0x2116,0x2121,0x2235,0x7E8A,0x891C,0x9348,0x9288, -0x84DC,0x4FC9,0x70BB,0x6631,0x68C8,0x92F9,0x66FB,0x5F45, -0x4E28,0x4EE1,0x4EFC,0x4F00,0x4F03,0x4F39,0x4F56,0x4F92, -0x4F8A,0x4F9A,0x4F94,0x4FCD,0x5040,0x5022,0x4FFF,0x501E, -0x5046,0x5070,0x5042,0x5094,0x50F4,0x50D8,0x514A, 0, -0x5164,0x519D,0x51BE,0x51EC,0x5215,0x529C,0x52A6,0x52C0, -0x52DB,0x5300,0x5307,0x5324,0x5372,0x5393,0x53B2,0x53DD, -0xFA0E,0x549C,0x548A,0x54A9,0x54FF,0x5586,0x5759,0x5765, -0x57AC,0x57C8,0x57C7,0xFA0F,0xFA10,0x589E,0x58B2,0x590B, -0x5953,0x595B,0x595D,0x5963,0x59A4,0x59BA,0x5B56,0x5BC0, -0x752F,0x5BD8,0x5BEC,0x5C1E,0x5CA6,0x5CBA,0x5CF5,0x5D27, -0x5D53,0xFA11,0x5D42,0x5D6D,0x5DB8,0x5DB9,0x5DD0,0x5F21, -0x5F34,0x5F67,0x5FB7,0x5FDE,0x605D,0x6085,0x608A,0x60DE, -0x60D5,0x6120,0x60F2,0x6111,0x6137,0x6130,0x6198,0x6213, -0x62A6,0x63F5,0x6460,0x649D,0x64CE,0x654E,0x6600,0x6615, -0x663B,0x6609,0x662E,0x661E,0x6624,0x6665,0x6657,0x6659, -0xFA12,0x6673,0x6699,0x66A0,0x66B2,0x66BF,0x66FA,0x670E, -0xF929,0x6766,0x67BB,0x6852,0x67C0,0x6801,0x6844,0x68CF, -0xFA13,0x6968,0xFA14,0x6998,0x69E2,0x6A30,0x6A6B,0x6A46, -0x6A73,0x6A7E,0x6AE2,0x6AE4,0x6BD6,0x6C3F,0x6C5C,0x6C86, -0x6C6F,0x6CDA,0x6D04,0x6D87,0x6D6F, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6D96,0x6DAC,0x6DCF,0x6DF8,0x6DF2,0x6DFC,0x6E39,0x6E5C, -0x6E27,0x6E3C,0x6EBF,0x6F88,0x6FB5,0x6FF5,0x7005,0x7007, -0x7028,0x7085,0x70AB,0x710F,0x7104,0x715C,0x7146,0x7147, -0xFA15,0x71C1,0x71FE,0x72B1,0x72BE,0x7324,0xFA16,0x7377, -0x73BD,0x73C9,0x73D6,0x73E3,0x73D2,0x7407,0x73F5,0x7426, -0x742A,0x7429,0x742E,0x7462,0x7489,0x749F,0x7501,0x756F, -0x7682,0x769C,0x769E,0x769B,0x76A6,0xFA17,0x7746,0x52AF, -0x7821,0x784E,0x7864,0x787A,0x7930,0xFA18,0xFA19, 0, -0xFA1A,0x7994,0xFA1B,0x799B,0x7AD1,0x7AE7,0xFA1C,0x7AEB, -0x7B9E,0xFA1D,0x7D48,0x7D5C,0x7DB7,0x7DA0,0x7DD6,0x7E52, -0x7F47,0x7FA1,0xFA1E,0x8301,0x8362,0x837F,0x83C7,0x83F6, -0x8448,0x84B4,0x8553,0x8559,0x856B,0xFA1F,0x85B0,0xFA20, -0xFA21,0x8807,0x88F5,0x8A12,0x8A37,0x8A79,0x8AA7,0x8ABE, -0x8ADF,0xFA22,0x8AF6,0x8B53,0x8B7F,0x8CF0,0x8CF4,0x8D12, -0x8D76,0xFA23,0x8ECF,0xFA24,0xFA25,0x9067,0x90DE,0xFA26, -0x9115,0x9127,0x91DA,0x91D7,0x91DE,0x91ED,0x91EE,0x91E4, -0x91E5,0x9206,0x9210,0x920A,0x923A,0x9240,0x923C,0x924E, -0x9259,0x9251,0x9239,0x9267,0x92A7,0x9277,0x9278,0x92E7, -0x92D7,0x92D9,0x92D0,0xFA27,0x92D5,0x92E0,0x92D3,0x9325, -0x9321,0x92FB,0xFA28,0x931E,0x92FF,0x931D,0x9302,0x9370, -0x9357,0x93A4,0x93C6,0x93DE,0x93F8,0x9431,0x9445,0x9448, -0x9592,0xF9DC,0xFA29,0x969D,0x96AF,0x9733,0x973B,0x9743, -0x974D,0x974F,0x9751,0x9755,0x9857,0x9865,0xFA2A,0xFA2B, -0x9927,0xFA2C,0x999E,0x9A4E,0x9AD9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9ADC,0x9B75,0x9B72,0x9B8F,0x9BB1,0x9BBB,0x9C00,0x9D70, -0x9D6B,0xFA2D,0x9E19,0x9ED1}; - -static int func_cp932_uni_onechar(int code){ - if ((code>=0x00A1)&&(code<=0x00DF)) - return(tab_cp932_uni0[code-0x00A1]); - if ((code>=0x8140)&&(code<=0x84BE)) - return(tab_cp932_uni1[code-0x8140]); - if ((code>=0x8740)&&(code<=0x879C)) - return(tab_cp932_uni2[code-0x8740]); - if ((code>=0x889F)&&(code<=0x9FFC)) - return(tab_cp932_uni3[code-0x889F]); - if ((code>=0xE040)&&(code<=0xEAA4)) - return(tab_cp932_uni4[code-0xE040]); - if ((code>=0xED40)&&(code<=0xEEFC)) - return(tab_cp932_uni5[code-0xED40]); - if ((code>=0xF040)&&(code<=0xF9FC)) - return(tab_cp932_uni6[code-0xF040]); - if ((code>=0xFA40)&&(code<=0xFC4B)) - return(tab_cp932_uni7[code-0xFA40]); - return(0); -} - -/* page 0 0x005C-0x00F7 */ -static uint16 tab_uni_cp9320[]={ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x8198,0x814E, 0, 0, 0, - 0, 0, 0, 0,0x818B,0x817D, 0, 0, -0x814C, 0,0x81F7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x817E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x8180}; - -/* page 1 0x0391-0x0451 */ -static uint16 tab_uni_cp9321[]={ -0x839F,0x83A0,0x83A1,0x83A2,0x83A3,0x83A4,0x83A5,0x83A6, -0x83A7,0x83A8,0x83A9,0x83AA,0x83AB,0x83AC,0x83AD,0x83AE, -0x83AF, 0,0x83B0,0x83B1,0x83B2,0x83B3,0x83B4,0x83B5, -0x83B6, 0, 0, 0, 0, 0, 0, 0, -0x83BF,0x83C0,0x83C1,0x83C2,0x83C3,0x83C4,0x83C5,0x83C6, -0x83C7,0x83C8,0x83C9,0x83CA,0x83CB,0x83CC,0x83CD,0x83CE, -0x83CF, 0,0x83D0,0x83D1,0x83D2,0x83D3,0x83D4,0x83D5, -0x83D6, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8446, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x8440, -0x8441,0x8442,0x8443,0x8444,0x8445,0x8447,0x8448,0x8449, -0x844A,0x844B,0x844C,0x844D,0x844E,0x844F,0x8450,0x8451, -0x8452,0x8453,0x8454,0x8455,0x8456,0x8457,0x8458,0x8459, -0x845A,0x845B,0x845C,0x845D,0x845E,0x845F,0x8460,0x8470, -0x8471,0x8472,0x8473,0x8474,0x8475,0x8477,0x8478,0x8479, -0x847A,0x847B,0x847C,0x847D,0x847E,0x8480,0x8481,0x8482, -0x8483,0x8484,0x8485,0x8486,0x8487,0x8488,0x8489,0x848A, -0x848B,0x848C,0x848D,0x848E,0x848F,0x8490,0x8491, 0, -0x8476}; - -/* page 2 0x2010-0x2473 */ -static uint16 tab_uni_cp9322[]={ -0x815D, 0, 0, 0, 0,0x815C, 0, 0, -0x8165,0x8166, 0, 0,0x8167,0x8168, 0, 0, -0x81F5,0x81F6, 0, 0, 0,0x8164,0x8163, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x81F1, 0,0x818C,0x818D, 0, 0, 0, 0, - 0, 0, 0,0x81A6, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0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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, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8740,0x8741,0x8742,0x8743,0x8744,0x8745,0x8746,0x8747, -0x8748,0x8749,0x874A,0x874B,0x874C,0x874D,0x874E,0x874F, -0x8750,0x8751,0x8752,0x8753}; - -/* page 3 0x2500-0x266F */ -static uint16 tab_uni_cp9323[]={ -0x849F,0x84AA,0x84A0,0x84AB, 0, 0, 0, 0, - 0, 0, 0, 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 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x818A, 0,0x8189, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x81F4, 0, 0,0x81F3, 0,0x81F2 -}; - -/* page 4 0x3000-0x30FE */ -static uint16 tab_uni_cp9324[]={ -0x8140,0x8141,0x8142,0x8156, 0,0x8158,0x8159,0x815A, -0x8171,0x8172,0x8173,0x8174,0x8175,0x8176,0x8177,0x8178, -0x8179,0x817A,0x81A7,0x81AC,0x816B,0x816C, 0, 0, - 0, 0, 0, 0, 0,0x8780, 0,0x8781, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x829F,0x82A0,0x82A1,0x82A2,0x82A3,0x82A4,0x82A5, -0x82A6,0x82A7,0x82A8,0x82A9,0x82AA,0x82AB,0x82AC,0x82AD, -0x82AE,0x82AF,0x82B0,0x82B1,0x82B2,0x82B3,0x82B4,0x82B5, -0x82B6,0x82B7,0x82B8,0x82B9,0x82BA,0x82BB,0x82BC,0x82BD, -0x82BE,0x82BF,0x82C0,0x82C1,0x82C2,0x82C3,0x82C4,0x82C5, -0x82C6,0x82C7,0x82C8,0x82C9,0x82CA,0x82CB,0x82CC,0x82CD, -0x82CE,0x82CF,0x82D0,0x82D1,0x82D2,0x82D3,0x82D4,0x82D5, -0x82D6,0x82D7,0x82D8,0x82D9,0x82DA,0x82DB,0x82DC,0x82DD, -0x82DE,0x82DF,0x82E0,0x82E1,0x82E2,0x82E3,0x82E4,0x82E5, -0x82E6,0x82E7,0x82E8,0x82E9,0x82EA,0x82EB,0x82EC,0x82ED, -0x82EE,0x82EF,0x82F0,0x82F1, 0, 0, 0, 0, - 0, 0, 0,0x814A,0x814B,0x8154,0x8155, 0, - 0,0x8340,0x8341,0x8342,0x8343,0x8344,0x8345,0x8346, -0x8347,0x8348,0x8349,0x834A,0x834B,0x834C,0x834D,0x834E, -0x834F,0x8350,0x8351,0x8352,0x8353,0x8354,0x8355,0x8356, -0x8357,0x8358,0x8359,0x835A,0x835B,0x835C,0x835D,0x835E, -0x835F,0x8360,0x8361,0x8362,0x8363,0x8364,0x8365,0x8366, -0x8367,0x8368,0x8369,0x836A,0x836B,0x836C,0x836D,0x836E, -0x836F,0x8370,0x8371,0x8372,0x8373,0x8374,0x8375,0x8376, -0x8377,0x8378,0x8379,0x837A,0x837B,0x837C,0x837D,0x837E, -0x8380,0x8381,0x8382,0x8383,0x8384,0x8385,0x8386,0x8387, -0x8388,0x8389,0x838A,0x838B,0x838C,0x838D,0x838E,0x838F, -0x8390,0x8391,0x8392,0x8393,0x8394,0x8395,0x8396, 0, - 0, 0, 0,0x8145,0x815B,0x8152,0x8153}; - -/* page 5 0x3230-0x33CD */ -static uint16 tab_uni_cp9325[]={ - 0,0x878A,0x878B, 0, 0, 0, 0, 0, - 0,0x878C, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x8785,0x8786,0x8787,0x8788, -0x8789, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x8765, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x8769, 0, 0, - 0, 0, 0, 0,0x8760, 0, 0, 0, -0x8763, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x8761,0x876B, 0, 0,0x876A,0x8764, - 0, 0, 0,0x876C, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x8766, 0, - 0, 0, 0,0x876E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x875F,0x876D, 0, 0,0x8762, 0, 0, - 0,0x8767, 0, 0, 0, 0, 0,0x8768, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x877E,0x878F,0x878E,0x878D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x8772,0x8773, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x876F,0x8770,0x8771, 0, - 0,0x8775, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x8774, 0, 0, 0, - 0, 0, 0, 0, 0,0x8783}; - -/* page 6 0x4E00-0x9481 */ -static uint16 tab_uni_cp9326[]={ -0x88EA,0x929A, 0,0x8EB5, 0, 0, 0,0x969C, -0x8FE4,0x8E4F,0x8FE3,0x89BA, 0,0x9573,0x975E, 0, -0x98A0,0x894E, 0, 0,0x8A8E,0x98A1,0x90A2,0x99C0, -0x8B75,0x95B8, 0, 0, 0, 0,0x8FE5, 0, - 0,0x97BC, 0, 0, 0, 0,0x95C0, 0, -0xFA68, 0,0x98A2, 0, 0,0x9286, 0, 0, - 0,0x98A3,0x8BF8, 0, 0, 0,0x98A4, 0, -0x8ADB,0x924F, 0,0x8EE5,0x98A5, 0, 0,0x98A6, - 0, 0,0x98A7,0x9454, 0,0x8B76, 0, 0, - 0, 0, 0,0x9456, 0,0x93E1,0x8CC1,0x9652, - 0, 0, 0, 0, 0,0xE568,0x98A8,0x8FE6, -0x98A9,0x89B3, 0, 0, 0,0x8BE3,0x8CEE,0x96E7, - 0, 0,0x9BA4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9790, 0,0x93FB, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x8AA3, 0, -0x8B54, 0,0x98AA, 0, 0,0x98AB,0x97B9, 0, -0x975C,0x9188,0x98AD,0x8E96,0x93F1, 0,0x98B0, 0, - 0,0x895D,0x8CDD, 0,0x8CDC,0x88E4, 0, 0, -0x986A,0x9869, 0,0x8DB1,0x889F, 0,0x98B1,0x98B2, -0x98B3,0x9653,0x98B4, 0,0x8CF0,0x88E5,0x9692, 0, -0x8B9C, 0, 0,0x8B9D,0x8B9E,0x92E0,0x97BA, 0, -0x98B5, 0, 0,0x98B6, 0, 0,0x98B7, 0, - 0, 0,0x906C, 0, 0, 0, 0, 0, -0x8F59,0x906D,0x98BC, 0,0x98BA, 0,0x98BB,0x8B77, - 0, 0,0x8DA1,0x89EE, 0,0x98B9,0x98B8,0x95A7, - 0, 0, 0, 0,0x8E65,0x8E64,0x91BC,0x98BD, -0x9574,0x90E5, 0, 0, 0,0x8157,0x98BE,0x98C0, - 0,0xFA69, 0,0x91E3,0x97DF,0x88C8, 0, 0, - 0, 0, 0, 0, 0,0x98BF,0x89BC, 0, -0x8BC2, 0,0x9287, 0, 0, 0,0x8C8F,0x98C1, - 0, 0, 0,0x9443,0xFA6A, 0, 0, 0, -0xFA6B,0x8AE9, 0,0xFA6C, 0, 0, 0, 0, - 0,0x98C2,0x88C9, 0, 0,0x8CDE,0x8AEA,0x959A, -0x94B0,0x8B78, 0, 0, 0, 0, 0, 0, - 0, 0,0x89EF, 0,0x98E5,0x9360, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x948C, -0x98C4, 0, 0, 0,0x94BA, 0,0x97E0, 0, -0x904C,0xFA6D,0x8E66, 0,0x8E97,0x89BE, 0, 0, - 0, 0, 0,0x92CF, 0, 0,0x9241,0x98C8, - 0, 0, 0, 0, 0,0x88CA,0x92E1,0x8F5A, -0x8DB2,0x9743, 0,0x91CC, 0,0x89BD,0xFA6E,0x98C7, - 0,0x975D,0x98C3,0x98C5,0x8DEC,0x98C6,0x9B43, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x98CE, 0, 0, 0, 0, 0,0x98D1, -0x98CF, 0, 0,0x89C0, 0,0x95B9,0x98C9, 0, - 0, 0, 0,0x98CD,0x8CF1, 0, 0,0x8E67, - 0, 0, 0,0x8AA4, 0, 0,0x98D2, 0, -0x98CA, 0,0xFA70,0x97E1, 0,0x8E98, 0,0x98CB, - 0,0x98D0,0xFA6F, 0,0xFA72, 0,0x98D3, 0, -0x98CC, 0,0xFA71,0x8B9F, 0,0x88CB, 0, 0, -0x8BA0,0x89BF, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x9B44, 0,0x9699,0x958E,0x8CF2, - 0, 0, 0, 0, 0,0x904E,0x97B5, 0, - 0, 0, 0, 0, 0, 0, 0,0x95D6, - 0, 0,0x8C57,0x91A3,0x89E2, 0, 0, 0, - 0,0xFA61,0x8F72, 0, 0,0xFA73,0x98D7, 0, -0x98DC,0x98DA, 0, 0,0x98D5, 0, 0,0x91AD, -0x98D8, 0,0x98DB,0x98D9, 0,0x95DB, 0,0x98D6, - 0,0x904D, 0,0x9693,0x98DD,0x98DE, 0, 0, - 0, 0, 0, 0, 0, 0,0x8F43,0x98EB, - 0, 0, 0,0x946F, 0,0x9555,0x98E6, 0, -0x95EE, 0,0x89B4, 0, 0, 0,0x98EA,0xFA76, - 0, 0, 0, 0, 0,0x98E4,0x98ED, 0, - 0,0x9171, 0,0x8CC2, 0,0x947B, 0,0xE0C5, - 0,0x98EC,0x937C, 0,0x98E1, 0,0x8CF4, 0, - 0,0x8CF3,0x98DF, 0, 0, 0,0xFA77,0x8ED8, - 0,0x98E7,0xFA75,0x95ED,0x926C,0x98E3,0x8C91, 0, -0x98E0,0x98E8,0x98E2,0x97CF,0x98E9,0x9860, 0, 0, - 0, 0, 0, 0, 0, 0,0x8BE4, 0, - 0,0x8C90, 0, 0, 0, 0, 0, 0, -0xFA74, 0,0xFA7A,0x98EE, 0, 0,0xFA78,0x98EF, -0x98F3,0x88CC, 0, 0, 0, 0, 0,0x95CE, -0x98F2, 0, 0, 0, 0,0x98F1,0x98F5, 0, - 0, 0,0x98F4, 0,0x92E2, 0, 0, 0, - 0, 0, 0, 0, 0,0x8C92, 0, 0, - 0, 0, 0, 0,0x98F6, 0, 0, 0, -0xFA79, 0,0x8EC3, 0,0x91A4,0x92E3,0x8BF4, 0, -0x98F7, 0, 0, 0, 0,0x8B55, 0, 0, -0x98F8, 0, 0, 0, 0,0x98FA, 0, 0, - 0, 0, 0, 0, 0,0x9654, 0, 0, - 0,0x8C86, 0, 0,0xFA7B, 0, 0, 0, -0x8E50,0x94F5,0x98F9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x8DC3,0x9762, 0, 0, - 0, 0,0x98FC,0x9942,0x98FB,0x8DC2, 0,0x8F9D, - 0, 0, 0, 0, 0, 0,0x8C58, 0, - 0, 0,0x9943, 0, 0,0x8BCD, 0, 0, - 0,0x9940,0x9941, 0, 0,0x93AD, 0,0x919C, - 0,0x8BA1, 0, 0, 0,0x966C,0x9944, 0, -0xFA7D, 0,0x97BB, 0, 0, 0,0x9945, 0, - 0, 0, 0,0x9948, 0,0x9946, 0,0x916D, - 0, 0, 0, 0, 0,0x9947,0x9949, 0, - 0, 0, 0, 0,0xFA7C,0x994B, 0, 0, - 0,0x994A, 0,0x95C6, 0, 0, 0, 0, -0x8B56,0x994D,0x994E, 0,0x89AD, 0, 0, 0, - 0,0x994C, 0, 0, 0, 0, 0, 0, - 0, 0,0x8EF2, 0,0x9951,0x9950,0x994F, 0, -0x98D4, 0,0x9952, 0, 0, 0, 0,0x8F9E, - 0,0x9953, 0, 0, 0, 0, 0, 0, - 0, 0,0x9744, 0, 0, 0, 0, 0, - 0, 0,0x96D7, 0, 0, 0, 0,0x9955, - 0, 0,0x9954,0x9957,0x9956, 0, 0,0x9958, -0x9959,0x88F2, 0,0x8CB3,0x8C5A,0x8F5B,0x929B,0x8BA2, -0x90E6,0x8CF5,0xFA7E,0x8D8E,0x995B,0x96C6,0x9365, 0, -0x8E99, 0,0x995A, 0,0x995C, 0, 0, 0, - 0, 0,0x937D, 0,0x8A95, 0, 0, 0, - 0, 0,0x995D, 0,0xFA80,0x93FC, 0, 0, -0x9153,0x995F,0x9960,0x94AA,0x8CF6,0x985A,0x9961, 0, - 0,0x8BA4, 0, 0, 0,0x95BA,0x91B4,0x8BEF, -0x9354, 0, 0, 0,0x8C93, 0, 0, 0, -0x9962, 0,0x9963, 0, 0,0x93E0,0x897E, 0, - 0,0x9966,0x8DFB, 0,0x9965,0x8DC4, 0,0x9967, -0xE3EC,0x9968,0x9660,0x9969, 0,0x996A,0x996B,0x8FE7, - 0,0x8ECA, 0, 0, 0,0xFA81, 0, 0, -0x8AA5, 0,0x996E, 0,0x996C,0x96BB,0x996D, 0, -0x9579,0x996F,0x9970,0x9971,0x937E, 0, 0, 0, -0x9975,0x9973,0x9974,0x9972,0x8DE1,0x9976,0x96E8,0x97E2, - 0, 0, 0, 0, 0,0x9977,0xFA82, 0, - 0, 0, 0, 0,0x90A6,0x9978,0x8F79, 0, - 0,0x9979, 0,0x929C,0x97BD,0x9380, 0, 0, - 0, 0, 0, 0, 0, 0,0x99C3, 0, - 0, 0, 0,0x997A,0xEAA3,0x8BC3, 0, 0, -0x997B,0x967D, 0, 0, 0, 0,0x8F88,0x91FA, - 0,0x997D,0x93E2, 0,0xFA83,0x997E, 0, 0, -0x9980,0x8A4D, 0, 0, 0,0x9981,0x8BA5, 0, -0x93CA,0x899A,0x8F6F, 0, 0,0x949F,0x9982, 0, -0x9381, 0, 0,0x906E,0x9983, 0,0x95AA,0x90D8, -0x8AA0, 0,0x8AA7,0x9984, 0, 0,0x9986, 0, - 0,0x8C59, 0, 0,0x9985,0xFA84, 0,0x97F1, - 0, 0, 0, 0, 0,0x8F89, 0, 0, - 0, 0, 0, 0,0x94BB,0x95CA, 0,0x9987, - 0,0x9798,0x9988, 0, 0, 0,0x9989, 0, -0x939E, 0, 0,0x998A, 0, 0,0x90A7,0x8DFC, -0x8C94,0x998B,0x8E68,0x8D8F, 0, 0, 0, 0, - 0, 0, 0,0x92E4,0x998D, 0, 0,0x91A5, - 0, 0,0x8DED,0x998E,0x998F,0x914F, 0,0x998C, - 0, 0, 0, 0,0x9991, 0,0x9655, 0, - 0, 0, 0,0x8D84, 0, 0,0x9990, 0, - 0, 0, 0,0x8C95,0x8DDC,0x948D, 0, 0, - 0,0x9994,0x9992, 0, 0, 0, 0,0x959B, -0x8FE8,0x999B,0x8A84,0x9995,0x9993,0x916E, 0, 0, - 0, 0, 0, 0, 0,0x9997, 0,0x9996, - 0, 0, 0,0x8A63, 0, 0, 0,0x8C80, -0x999C,0x97AB, 0, 0, 0,0x9998, 0, 0, - 0,0x999D,0x999A, 0,0x9999, 0, 0, 0, - 0, 0, 0,0x97CD,0xFA85, 0, 0,0x8CF7, -0x89C1, 0, 0,0x97F2, 0, 0,0xFA86, 0, - 0,0x8F95,0x9377,0x8D85,0x99A0,0x99A1, 0,0xFB77, - 0,0x97E3, 0, 0,0x984A,0x99A3, 0, 0, - 0,0x8CF8, 0, 0,0x99A2, 0,0x8A4E, 0, -0xFA87,0x99A4, 0,0x9675, 0,0x92BA, 0,0x9745, - 0,0x95D7, 0, 0, 0,0x99A5, 0, 0, - 0, 0,0xE8D3, 0, 0,0x93AE, 0,0x99A6, -0x8AA8,0x96B1, 0,0xFA88, 0,0x8F9F,0x99A7,0x95E5, -0x99AB, 0,0x90A8,0x99A8,0x8BCE, 0,0x99A9,0x8AA9, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x8C4D,0x99AC, 0,0x99AD, 0, 0, -0x99AE,0x99AF,0x8ED9, 0, 0, 0,0x8CF9,0x96DC, -0xFA89,0x96E6,0x93F5, 0, 0,0x95EF,0x99B0,0xFA8A, -0x99B1, 0, 0, 0, 0,0x99B3, 0,0x99B5, -0x99B4, 0, 0, 0, 0,0x99B6,0x89BB,0x966B, - 0,0x8DFA,0x99B7, 0, 0,0x9178, 0, 0, -0x8FA0,0x8BA7, 0,0x99B8,0xFA8B, 0, 0, 0, - 0, 0,0x94D9, 0, 0, 0, 0,0x99B9, - 0,0x99BA, 0,0x99BB, 0, 0, 0, 0, -0x99BC,0x9543,0x8BE6,0x88E3, 0, 0, 0,0x93BD, -0x99BD,0x8F5C, 0,0x90E7, 0,0x99BF,0x99BE,0x8FA1, -0x8CDF,0x99C1,0x94BC, 0, 0,0x99C2, 0, 0, - 0,0x94DA,0x91B2,0x91EC,0x8BA6, 0, 0,0x93EC, -0x9250, 0,0x948E, 0,0x966D, 0,0x99C4, 0, -0x90E8, 0, 0, 0, 0, 0,0x8C54, 0, - 0,0x99C5, 0, 0, 0, 0,0x99C6,0x894B, -0x88F3,0x8AEB,0xFA8C,0x91A6,0x8B70,0x9791, 0,0x99C9, -0x89B5, 0, 0,0x99C8, 0, 0, 0,0x8BA8, - 0, 0,0x99CA, 0,0x96EF, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xFA8D, 0, 0,0x99CB, 0, -0x97D0, 0,0x8CFA, 0, 0, 0, 0,0x8CB4, -0x99CC, 0, 0, 0, 0,0x99CE,0x99CD, 0, -0x907E,0x8958, 0, 0, 0,0x897D,0x99CF, 0, -0x99D0, 0,0xFA8E,0x8CB5, 0, 0,0x99D1, 0, - 0, 0, 0,0x8B8E, 0, 0, 0, 0, - 0, 0,0x8E51,0x99D2, 0, 0, 0, 0, -0x9694,0x8DB3,0x8B79,0x9746,0x916F,0x94BD,0x8EFB, 0, - 0, 0, 0, 0,0x8F66, 0,0x8EE6,0x8EF3, - 0,0x8F96, 0,0x94BE, 0,0xFA8F, 0,0x99D5, - 0,0x8962,0x9170,0x8CFB,0x8CC3,0x8BE5, 0, 0, -0x99D9,0x9240,0x91FC,0x8BA9,0x8FA2,0x99DA,0x99D8,0x89C2, -0x91E4,0x8EB6,0x8E6A,0x8945, 0, 0,0x8A90,0x8D86, -0x8E69, 0,0x99DB, 0, 0, 0, 0, 0, - 0,0x99DC, 0,0x8B68,0x8A65, 0, 0, 0, -0x8D87,0x8B67,0x92DD,0x8944,0x93AF,0x96BC,0x8D40,0x9799, -0x9366,0x8CFC, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x8C4E, 0,0x99E5, 0,0x8BE1, -0x9669, 0, 0, 0, 0, 0,0x94DB, 0, - 0,0x99E4, 0,0x8ADC,0x99DF,0x99E0,0x99E2, 0, - 0, 0, 0, 0, 0, 0,0x99E3, 0, -0x8B7A,0x9081, 0,0x95AB,0x99E1,0x99DD,0x8CE1, 0, -0x99DE, 0,0x9843, 0, 0, 0,0x95F0, 0, -0x92E6,0x8CE0,0x8D90, 0, 0, 0,0x99E6, 0, - 0,0x93DB, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x99EA, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8EFC, 0,0x8EF4, 0, 0, 0, 0, 0, -0x99ED,0x99EB, 0,0x96A1, 0,0x99E8,0x99F1,0x99EC, - 0, 0, 0,0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8B47,0x8CC7,0x9B76,0x8A77, 0, - 0,0x9B77, 0,0x91B7, 0, 0, 0, 0, -0x9B78,0x9BA1, 0,0x9B79, 0,0x9B7A, 0, 0, -0x9B7B, 0,0x9B7D, 0, 0, 0, 0, 0, -0x9B7E, 0, 0,0x9B80, 0,0x91EE, 0,0x8946, -0x8EE7,0x88C0, 0,0x9176,0x8AAE,0x8EB3, 0,0x8D47, - 0, 0, 0, 0, 0,0x9386, 0,0x8F40, -0x8AAF,0x9288,0x92E8,0x88B6,0x8B58,0x95F3, 0,0x8EC0, - 0, 0,0x8B71,0x90E9,0x8EBA,0x9747,0x9B81, 0, - 0, 0, 0, 0, 0, 0,0x8B7B, 0, -0x8DC9, 0, 0,0x8A51,0x8983,0x8FAA,0x89C6, 0, -0x9B82,0x9765, 0, 0, 0, 0, 0,0x8F68, -0xFAA7, 0,0x8EE2,0x9B83,0x8AF1,0x93D0,0x96A7,0x9B84, - 0,0x9B85, 0, 0,0x9578, 0, 0, 0, -0x9B87, 0,0x8AA6,0x8BF5,0x9B86, 0, 0, 0, -0xFAA9, 0, 0,0x8AB0, 0,0x9051,0x9B8B,0x8E40, - 0,0x89C7,0x9B8A, 0,0x9B88,0x9B8C,0x9B89,0x944A, -0x9ECB,0x9052, 0,0x9B8D,0xFAAA, 0,0x97BE, 0, -0x9B8E, 0, 0,0x9B90, 0,0x929E,0x9B8F, 0, -0x90A1, 0,0x8E9B, 0, 0, 0,0x91CE,0x8EF5, - 0,0x9595,0x90EA, 0,0x8ECB,0x9B91,0x8FAB,0x9B92, -0x9B93,0x88D1,0x91B8,0x9071, 0,0x9B94,0x93B1,0x8FAC, - 0,0x8FAD, 0,0x9B95, 0, 0,0x90EB, 0, - 0, 0,0x8FAE, 0, 0, 0,0xFAAB, 0, -0x9B96, 0,0x9B97, 0,0x96DE, 0, 0, 0, -0x9B98, 0, 0, 0, 0,0x8BC4, 0, 0, - 0,0x8F41, 0, 0, 0, 0, 0, 0, -0x9B99,0x9B9A,0x8E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, 0, 0, - 0,0x9C51,0x95BE,0x9C54,0x989F,0x98AF, 0,0x8EAE, -0x93F3,0x9C55, 0,0x8B7C,0x92A2,0x88F8,0x9C56,0x95A4, -0x8D4F, 0, 0,0x926F, 0, 0, 0,0x92ED, - 0,0xFAB7, 0, 0, 0,0x96ED,0x8CB7,0x8CCA, - 0,0x9C57, 0, 0, 0,0x9C58, 0,0x9C5E, - 0,0x8EE3, 0, 0,0xFAB8,0x92A3, 0,0x8BAD, -0x9C59, 0, 0, 0,0x954A, 0,0x9265, 0, - 0,0x9C5A, 0, 0, 0,0xFA67, 0, 0, -0x9C5B, 0,0x8BAE, 0,0x9C5C, 0,0x9C5D, 0, - 0,0x9C5F, 0,0x9396, 0, 0,0x9C60,0x9C61, - 0,0x9C62, 0, 0,0x9C53,0x9C52, 0, 0, - 0,0x9C63,0x8C60, 0, 0, 0,0x9546,0xFAB9, - 0,0x8DCA,0x9556,0x92A4,0x956A,0x9C64, 0, 0, -0x8FB2,0x8965, 0,0x9C65, 0, 0, 0,0x9C66, - 0,0x96F0, 0, 0,0x94DE, 0, 0,0x9C69, -0x899D,0x90AA,0x9C68,0x9C67,0x8C61,0x91D2, 0,0x9C6D, -0x9C6B, 0,0x9C6A,0x97A5,0x8CE3, 0, 0, 0, -0x8F99,0x9C6C,0x936B,0x8F5D, 0, 0, 0,0x93BE, -0x9C70,0x9C6F, 0, 0, 0, 0,0x9C6E, 0, -0x9C71,0x8CE4, 0, 0, 0, 0, 0, 0, -0x9C72,0x959C,0x8F7A, 0, 0,0x9C73,0x94F7, 0, - 0, 0, 0,0x93BF,0x92A5, 0, 0,0xFABA, - 0,0x934F, 0, 0,0x9C74,0x8B4A, 0, 0, - 0, 0, 0,0x9053, 0,0x954B, 0, 0, - 0, 0, 0, 0,0x8AF5,0x9445, 0, 0, - 0, 0, 0, 0, 0, 0,0x9C75,0x8E75, -0x9659,0x965A, 0, 0,0x899E,0x9C7A,0xFABB, 0, -0x9289, 0, 0, 0,0x9C77, 0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463, 0, 0, 0, 0, 0, - 0,0x977D,0x9D52,0x9D53,0x9D57,0x938A,0x9D54,0x8D52, -0x90DC, 0, 0,0x9D65,0x94B2, 0,0x91F0, 0, - 0, 0, 0, 0, 0, 0,0xFAC8, 0, - 0, 0, 0,0x94E2,0x9DAB, 0, 0, 0, - 0,0x95F8, 0, 0, 0,0x92EF, 0, 0, - 0,0x9695, 0,0x9D5A,0x899F,0x928A, 0, 0, - 0, 0,0x9D63, 0, 0,0x9253,0x9D5D,0x9D64, -0x9D5F,0x9D66,0x9D62, 0,0x9D61,0x948F, 0,0x9D5B, -0x89FB,0x9D59,0x8B91,0x91F1,0x9D55, 0, 0,0x9D58, -0x8D53,0x90D9, 0,0x8FB5,0x9D60,0x9471, 0, 0, -0x8B92,0x8A67, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x8A87,0x9040,0x9D68,0x9D6D, - 0,0x9D69, 0,0x8C9D, 0,0x9D6E,0x8E41,0x8D89, - 0, 0, 0, 0, 0, 0,0x8F45,0x9D5C, - 0,0x8E9D,0x9D6B, 0, 0, 0, 0,0x8E77, -0x9D6C,0x88C2, 0, 0,0x9D67, 0, 0, 0, - 0,0x92A7, 0, 0, 0, 0, 0, 0, - 0,0x8B93, 0, 0, 0, 0, 0,0x8BB2, - 0, 0, 0, 0, 0, 0, 0,0x9D6A, -0x88A5, 0, 0,0x8DC1, 0, 0, 0,0x9055, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x92F0, 0, 0,0x94D2,0x9D70,0x917D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x91A8, 0, 0,0x8E4A,0x9D71, 0,0x9D73, -0x9D6F, 0, 0, 0, 0,0x95DF, 0,0x92BB, - 0, 0, 0, 0,0x917B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x95F9, -0x8ECC,0x9D80, 0,0x9D7E, 0, 0,0x9098, 0, - 0, 0,0x8C9E, 0, 0, 0,0x9D78,0x8FB7, - 0, 0,0x93E6,0x9450, 0, 0, 0, 0, -0x9D76, 0, 0,0x917C, 0, 0, 0, 0, -0x8EF6,0x9D7B, 0, 0,0x8FB6, 0,0x9D75,0x9D7A, - 0, 0,0x9472, 0, 0, 0,0x9D74, 0, -0x8C40, 0, 0,0x8A7C, 0, 0, 0,0x9D7C, -0x97A9,0x8DCC,0x9254,0x9D79, 0,0x90DA, 0,0x8D54, -0x9084,0x8986,0x915B,0x9D77,0x8B64, 0, 0, 0, - 0, 0,0x8C66, 0,0x92CD,0x9D7D, 0, 0, - 0, 0, 0,0x917E, 0, 0,0x9D81, 0, -0x9D83, 0, 0,0x91B5,0x9D89, 0,0x9D84, 0, - 0,0x9D86, 0, 0, 0, 0, 0,0x9560, -0x92F1, 0,0x9D87, 0, 0, 0,0x974B, 0, - 0, 0,0x9767,0x8AB7, 0, 0, 0, 0, - 0,0x88AC, 0,0x9D85, 0, 0, 0, 0, - 0,0x9D82, 0, 0, 0, 0,0x8AF6, 0, - 0, 0, 0, 0,0x8987,0xFAC9,0x9D88, 0, - 0, 0,0x9768, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x9D8C, 0, - 0, 0, 0, 0, 0,0x91B9, 0,0x9D93, - 0, 0, 0,0x9D8D, 0, 0,0x9D8A,0x9D91, - 0, 0, 0, 0,0x9D72, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x9D8E, 0, -0x9D92, 0, 0, 0,0x94C0,0x938B, 0, 0, - 0, 0, 0, 0,0x9D8B, 0,0x9D8F, 0, - 0, 0,0x8C67, 0, 0, 0,0x8DEF, 0, - 0, 0,0x90DB, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x9D97, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9345, 0, 0, 0, 0, 0, 0, 0, -0xFACA, 0, 0, 0, 0, 0, 0,0x9D94, - 0,0x9680, 0, 0, 0, 0, 0,0x9D95, - 0, 0, 0, 0, 0, 0,0x9D96, 0, -0x96CC, 0,0x90A0, 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8E44,0x9E51, 0, - 0,0x8EE9, 0, 0,0x9670, 0,0x9E53,0x9E56, -0x9E55, 0,0x8AF7, 0, 0,0x8B80, 0,0x9E52, - 0,0x9E54, 0, 0, 0, 0,0x9E57, 0, - 0,0x9099, 0, 0, 0, 0,0x979B,0x88C7, -0x8DDE,0x91BA, 0,0x8EDB, 0, 0,0x8FF1, 0, - 0,0x9E5A, 0, 0,0x936D, 0,0x9E58,0x91A9, -0x9E59,0x8FF0,0x96DB,0x9E5B,0x9E5C,0x9788,0xFAE1, 0, - 0, 0,0x9E61, 0, 0,0x8D59, 0,0x9474, -0x9E5E,0x938C,0x9DDC,0x9DE0, 0,0x8B6E, 0,0x9466, - 0, 0, 0, 0,0x9E60, 0,0x8FBC,0x94C2, - 0, 0, 0, 0, 0,0x9E66, 0,0x94F8, - 0,0x9E5D, 0,0x9E63,0x9E62, 0, 0, 0, -0x90CD, 0, 0, 0, 0,0x968D, 0,0x97D1, - 0, 0,0x9687, 0,0x89CA,0x8E7D, 0, 0, -0x9867,0x9E65,0x9095, 0, 0, 0,0x9E64, 0, - 0,0x9E5F, 0, 0, 0, 0, 0,0x8CCD, - 0, 0, 0,0x9E6B,0x9E69, 0,0x89CB,0x9E67, -0x9E6D,0x9E73, 0,0xFAE2, 0, 0, 0, 0, -0xFAE4,0x91C6, 0, 0,0x95BF, 0,0x9E75, 0, - 0, 0,0x9541, 0, 0, 0,0x9E74,0x9490, -0x965E,0x8AB9, 0,0x90F5,0x8F5F, 0, 0, 0, -0x92D1, 0,0x974D, 0, 0,0x9E70,0x9E6F, 0, - 0, 0,0x9E71, 0,0x9E6E, 0, 0,0x9E76, - 0,0x9E6C, 0, 0,0x9E6A, 0,0x9E72,0x9E68, - 0,0x928C, 0,0x96F6,0x8EC4,0x8DF2, 0, 0, - 0, 0, 0,0x8DB8, 0, 0,0x968F,0x8A60, - 0,0xFAE5,0x92CC,0x93C8,0x8968, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0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050, 0, 0, 0, 0, 0,0x8AC0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE055, 0,0xE054,0xE056, 0, 0, 0, - 0, 0,0xE059, 0, 0, 0, 0, 0, - 0,0x9362, 0,0xE053, 0,0xFB4C, 0, 0, - 0,0xE057, 0, 0, 0, 0, 0, 0, -0x8C83,0x91F7,0xE051,0x945A, 0, 0,0xE058, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE05D,0xE05B, 0, 0, -0xE05E, 0, 0,0xE061, 0, 0, 0,0xE05A, -0x8D8A,0x9447, 0, 0,0x9FB7, 0, 0, 0, - 0, 0, 0,0x9794,0xE05C, 0,0xE060,0x91F3, - 0,0xE05F, 0,0xE04A, 0,0xFB4D,0xE889, 0, - 0, 0,0xE064, 0, 0, 0,0xE068, 0, - 0,0xE066, 0, 0, 0,0xFB4E, 0,0xFB4F, - 0,0xE062, 0,0xE063, 0, 0, 0,0xE067, - 0,0xE065, 0, 0, 0,0x956D, 0, 0, -0xE06D, 0,0xE06A,0xE069, 0,0xE06C,0x93D2,0xE06E, - 0, 0, 0, 0, 0, 0,0x9295,0x91EB, -0xFB50, 0, 0, 0,0x90A3, 0, 0, 0, -0xE06F, 0,0xE071, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE070, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x9FF3, 0, 0, 0, - 0,0xE072, 0, 0, 0, 0, 0, 0, -0x93E5, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE073, 0, 0, 0, 0, - 0, 0, 0,0x89CE, 0, 0, 0,0x9394, -0x8A44, 0, 0, 0, 0, 0, 0, 0, -0x8B84, 0, 0, 0,0x8EDC,0x8DD0, 0, 0, - 0, 0, 0, 0, 0,0xFB51, 0, 0, - 0,0x9846,0x9086, 0, 0, 0,0x898A, 0, - 0, 0,0xE075, 0, 0, 0, 0, 0, - 0,0xE074, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xFB52,0xE078,0x9259,0xE07B,0xE076, - 0, 0, 0,0xE07A, 0, 0, 0, 0, -0xE079,0x935F,0x88D7,0xFA62, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x97F3, 0, 0,0xE07D, 0, 0, 0,0x8947, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE080, 0, 0, 0,0xE07E, 0,0xE07C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE077, 0, 0, 0, 0, 0, 0, - 0,0x9642, 0, 0, 0,0xE082, 0, 0, - 0, 0, 0, 0,0xFB54, 0, 0, 0, - 0,0xE081, 0, 0, 0, 0, 0,0xFB53, - 0, 0, 0, 0,0x898B, 0, 0, 0, - 0,0xE084,0x95B0, 0,0xE083, 0, 0, 0, - 0,0x96B3, 0, 0, 0, 0,0x8FC5, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x9152, 0, - 0, 0, 0, 0,0x8FC4, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xFB56,0xFB57, - 0,0x97F9, 0, 0,0xE08A, 0,0x90F7, 0, - 0, 0, 0, 0, 0,0xE086,0xE08B, 0, - 0,0x898C, 0, 0,0xFB55, 0, 0, 0, - 0, 0,0xE089, 0,0x9481,0xE085,0xE088,0x8FC6, - 0,0x94CF, 0, 0,0xE08C, 0,0x8ECF, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x90F8, 0, 0, - 0, 0, 0, 0,0xE08F, 0, 0, 0, -0xE087, 0,0x8C46, 0, 0, 0, 0,0xE08D, - 0, 0, 0, 0,0x976F,0xE090, 0, 0, - 0,0xEAA4, 0, 0, 0, 0, 0,0x8F6E, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE091, 0, 0, 0,0xE092, 0, 0, 0, - 0,0x944D, 0, 0, 0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, 0,0xE0F8, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8AC2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x8EA3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xE0F9, 0, 0, 0, 0,0xE0FA, - 0, 0, 0, 0,0xE0FB, 0, 0, 0, - 0, 0, 0, 0,0x895A, 0, 0, 0, -0xE140, 0,0x955A,0xE141, 0, 0,0x8AA2,0xE142, - 0,0xE143, 0, 0, 0, 0,0xE144, 0, -0xE146,0xE147,0xE145, 0, 0, 0,0x9572,0xE149, -0xE148, 0, 0, 0, 0, 0, 0, 0, - 0,0xFB6E, 0,0xE14B,0xE14A,0xE14C, 0, 0, - 0, 0, 0, 0,0xE14D,0xE14F,0xE14E, 0, - 0,0x8D99, 0,0xE151, 0,0xE150, 0, 0, -0x8AC3, 0,0x9072, 0,0x935B, 0,0xE152,0x90B6, - 0, 0, 0,0x8E59, 0,0x8999,0xE153, 0, -0x9770, 0, 0,0x95E1,0xE154, 0, 0,0xFAA8, -0x9363,0x9752,0x8D62,0x905C, 0, 0, 0,0x926A, -0x99B2, 0,0x92AC,0x89E6,0xE155, 0, 0, 0, - 0, 0, 0, 0,0xE156, 0,0xE15B, 0, - 0,0xE159,0xE158,0x9DC0,0x8A45,0xE157, 0,0x88D8, - 0,0x94A8, 0, 0,0x94C8, 0, 0, 0, - 0,0x97AF,0xE15C,0xE15A,0x927B,0x90A4, 0, 0, -0x94A9, 0,0x954C, 0,0xE15E,0x97AA,0x8C6C,0xE15F, - 0,0xE15D,0x94D4,0xE160, 0,0xE161, 0,0xFB6F, -0x88D9, 0, 0,0x8FF4,0xE166, 0,0xE163,0x93EB, -0xE162, 0, 0, 0, 0, 0, 0,0x8B45, - 0, 0,0xE169, 0, 0, 0,0xE164,0xE165, - 0,0xE168,0xE167,0x9544, 0, 0,0x9161,0x9160, - 0,0x8B5E, 0, 0,0xE16A, 0, 0, 0, - 0, 0,0xE16B, 0, 0,0xE16C, 0, 0, - 0, 0, 0,0xE16E, 0,0xE16D, 0, 0, - 0, 0, 0,0x8975, 0, 0, 0, 0, - 0,0xE176,0x94E6,0xE170, 0,0xE172, 0, 0, -0xE174,0x905D, 0, 0,0xE175,0xE173,0x8EBE, 0, - 0, 0,0xE16F,0xE171, 0,0x9561, 0,0x8FC7, - 0, 0,0xE178, 0, 0,0xE177, 0, 0, - 0, 0,0xE179, 0,0x8EA4,0x8DAD, 0, 0, -0x9397,0xE17A, 0,0x92C9, 0, 0,0xE17C, 0, - 0, 0,0x979F,0xE17B, 0, 0, 0, 0, - 0,0x9189, 0, 0, 0, 0, 0, 0, -0xE182, 0,0xE184,0xE185,0x9273, 0, 0, 0, - 0, 0,0xE183, 0,0xE180, 0,0xE17D,0xE17E, - 0,0xE181, 0, 0, 0, 0, 0, 0, - 0,0xE188, 0,0xE186, 0,0xE187, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE189, -0xE18B,0xE18C,0xE18D, 0,0xE18E, 0, 0,0xE18A, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE190, 0, 0, 0,0xE18F, 0, 0, 0, - 0, 0, 0,0xE191, 0, 0, 0, 0, - 0, 0,0x97C3, 0, 0, 0,0xE194,0xE192, -0xE193, 0, 0, 0,0x8AE0, 0, 0, 0, - 0, 0,0x96FC, 0, 0, 0,0x95C8, 0, -0xE196, 0, 0, 0,0xE195, 0, 0, 0, - 0,0xE197,0xE198, 0, 0, 0, 0,0xE19C, -0xE199,0xE19A,0xE19B, 0,0xE19D, 0, 0, 0, -0xE19E, 0,0xE19F, 0, 0, 0,0xE1A0, 0, -0xE1A1, 0,0x94AD,0x936F,0xE1A2,0x9492,0x9553, 0, -0xE1A3, 0,0xFB70,0xE1A4,0x9349, 0,0x8A46,0x8D63, -0xE1A5, 0, 0,0xE1A6, 0, 0,0xE1A7, 0, -0x8E48, 0, 0,0xE1A9, 0, 0,0xE1A8, 0, - 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0,0x94E8, 0,0x894F, 0,0x8DEA, 0,0x9871, - 0, 0,0xE1EE, 0, 0, 0, 0, 0, - 0, 0, 0,0xE1F0, 0, 0, 0,0x95C9, - 0,0x90D7,0xE1F2, 0, 0, 0, 0,0xE1F3, - 0, 0, 0, 0, 0,0xE1F1, 0, 0, - 0, 0,0x8A6D, 0,0xE1F9, 0,0xE1F8, 0, - 0,0x8EA5, 0, 0, 0,0xE1FA,0xE1F5, 0, - 0, 0,0xE1FB,0xE1F6, 0, 0, 0, 0, -0x94D6,0xE1F4, 0, 0,0xE1F7, 0, 0, 0, - 0, 0,0xE241, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE240, -0x9681, 0, 0, 0,0xE1FC, 0, 0,0x88E9, - 0, 0, 0, 0,0xE243, 0, 0, 0, - 0, 0, 0, 0, 0,0xE242, 0, 0, - 0,0x8FCA, 0, 0, 0, 0, 0,0xE244, - 0, 0, 0, 0, 0, 0,0x9162, 0, - 0,0xE246,0xE245, 0, 0, 0, 0, 0, - 0,0xE247, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE1E6, 0, - 0, 0,0xE1E8,0xE249,0xE248, 0, 0, 0, -0xFB7C, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x8EA6, 0,0x97E7, 0,0x8ED0, 0, -0xE24A,0x8C56, 0, 0, 0, 0, 0,0x8B5F, -0x8B46,0x8E83, 0, 0, 0, 0, 0, 0, -0x9753, 0, 0,0xE250, 0,0xE24F,0x9163,0xE24C, - 0, 0,0xE24E, 0, 0,0x8F6A,0x905F,0xE24D, -0xE24B, 0,0x9449, 0, 0,0x8FCB, 0, 0, -0x955B, 0, 0, 0, 0,0x8DD5, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x9398, - 0, 0,0xE251, 0, 0, 0, 0,0xE252, -0xE268,0x8BD6, 0, 0,0x985C,0x9154, 0, 0, - 0, 0,0xE253, 0, 0,0x89D0,0x92F5,0x959F, - 0, 0, 0, 0,0xFB81, 0, 0, 0, - 0, 0, 0,0xFB83, 0,0xE254, 0, 0, - 0, 0, 0, 0, 0, 0,0x8B9A,0xE255, - 0, 0,0xE257, 0, 0, 0,0xE258, 0, -0x9448, 0, 0,0xE259, 0, 0, 0, 0, - 0,0xE25A,0xE25B, 0, 0,0x8BD7,0x89D1,0x93C3, -0x8F47,0x8E84, 0, 0, 0, 0, 0, 0, - 0,0xE25C, 0,0x8F48, 0, 0, 0, 0, - 0,0x89C8,0x9562, 0, 0,0xE25D, 0, 0, -0x94E9, 0, 0, 0, 0, 0, 0,0x9164, - 0,0xE260, 0,0xE261,0x9489, 0,0x9060,0xE25E, - 0,0x9281, 0, 0,0xE25F, 0, 0, 0, -0x8FCC, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x88DA, 0, 0, 0, 0, -0x8B48, 0, 0, 0, 0, 0, 0, 0, -0xE262, 0, 0,0x92F6, 0,0xE263,0x90C5, 0, - 0, 0, 0, 0,0x96AB, 0, 0,0x9542, -0xE264,0xE265,0x9274, 0,0x97C5, 0, 0,0xE267, -0xE266, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x8EED, 0, - 0,0xE269,0x88EE, 0, 0, 0, 0,0xE26C, - 0, 0, 0,0xE26A,0x89D2,0x8C6D,0xE26B,0x8D65, -0x8D92, 0,0x95E4,0xE26D, 0, 0,0x9673, 0, - 0,0xE26F, 0, 0, 0,0x90CF,0x896E,0x89B8, -0x88AA, 0, 0, 0, 0, 0, 0,0xE26E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE270,0xE271,0x8FF5, 0, 0, 0, 0, - 0,0xE272, 0,0x8A6E, 0, 0, 0, 0, -0xE274, 0, 0, 0,0x8C8A, 0,0x8B86, 0, - 0,0xE275,0x8BF3, 0, 0,0xE276, 0,0x90FA, - 0,0x93CB, 0,0x90DE,0x8DF3, 0, 0, 0, -0xE277, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x9282,0x918B, 0,0xE279,0xE27B,0xE278, -0xE27A, 0, 0, 0, 0, 0, 0,0x8C41, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE27C,0x8C45, 0, 0, 0,0x8B87,0x9771, -0xE27E, 0, 0, 0, 0, 0,0xE280, 0, - 0, 0,0x894D, 0, 0, 0, 0,0xE283, - 0, 0, 0,0x8A96,0xE282,0xE281, 0,0xE285, -0xE27D, 0,0xE286,0x97A7, 0,0xE287, 0,0xE288, - 0,0xFB84,0x9AF2,0xE28A, 0,0xE289, 0, 0, - 0,0xE28B,0xE28C, 0,0x97B3,0xE28D, 0,0xE8ED, -0x8FCD,0xE28E,0xE28F,0x8F76, 0,0x93B6,0xE290,0xFB85, - 0, 0,0x9247,0xFB87, 0,0xE291, 0,0x925B, -0xE292, 0, 0, 0, 0, 0,0x8BA3, 0, -0x995E,0x927C,0x8EB1, 0, 0, 0, 0,0x8AC6, - 0, 0,0xE293, 0,0xE2A0, 0,0xE296, 0, -0x8B88, 0,0xE295,0xE2A2, 0, 0, 0,0xE294, - 0,0x8FCE, 0, 0, 0, 0, 0, 0, -0xE298,0xE299, 0,0x934A, 0, 0,0xE29A, 0, -0x8A7D, 0, 0, 0, 0,0x9079,0x9584, 0, -0xE29C, 0, 0, 0,0x91E6, 0, 0, 0, - 0, 0, 0,0xE297, 0,0xE29B,0xE29D, 0, - 0,0x8DF9, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xE2A4,0x954D, 0, -0x94A4,0x9399, 0,0x8BD8,0xE2A3,0xE2A1, 0,0x94B3, -0xE29E,0x927D,0x939B, 0,0x939A, 0,0x8DF4, 0, - 0, 0, 0, 0, 0,0xE2B6, 0, 0, - 0, 0, 0, 0, 0,0xE2A6, 0,0xE2A8, - 0, 0, 0, 0,0xE2AB, 0,0xE2AC, 0, -0xE2A9,0xE2AA, 0, 0,0xE2A7,0xE2A5, 0, 0, - 0, 0,0xE29F, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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0xE2E0, 0, 0, - 0, 0, 0, 0, 0, 0,0x96E0, 0, - 0,0x8BCC,0x8C48,0xE2E1, 0, 0, 0, 0, - 0,0x95B2, 0,0x9088, 0,0x96AE, 0, 0, -0xE2E2, 0,0x97B1, 0, 0,0x9494, 0,0x9165, -0x9453, 0, 0,0x8F6C, 0, 0, 0,0x88BE, - 0,0xE2E7,0xE2E5, 0,0xE2E3,0x8A9F, 0,0x8FCF, -0xE2E8, 0, 0,0xE2E6, 0,0xE2E4,0xE2EC, 0, - 0,0xE2EB,0xE2EA,0xE2E9, 0, 0, 0, 0, - 0,0xE2ED, 0, 0, 0,0xE2EE,0x90B8, 0, -0xE2EF, 0,0xE2F1, 0, 0,0xE2F0, 0, 0, - 0, 0,0x8CD0, 0, 0, 0,0x9157, 0, - 0, 0,0xE2F3, 0, 0, 0,0x939C, 0, -0xE2F2, 0, 0, 0,0xE2F4, 0,0x95B3,0x918C, -0x8D66, 0,0xE2F5, 0, 0, 0, 0,0x97C6, - 0, 0, 0, 0, 0, 0, 0,0xE2F7, - 0, 0,0xE2F8, 0,0xE2F9, 0,0xE2FA, 0, -0x8E85, 0,0xE2FB,0x8C6E, 0, 0,0x8B8A, 0, -0x8B49, 0,0xE340, 0,0x96F1,0x8D67,0xE2FC, 0, - 0, 0,0xE343,0x96E4, 0,0x945B, 0, 0, -0x9552, 0, 0, 0,0x8F83,0xE342, 0,0x8ED1, -0x8D68,0x8E86,0x8B89,0x95B4,0xE341, 0, 0, 0, -0x9166,0x9661,0x8DF5, 0, 0, 0, 0, 0, - 0, 0, 0,0x8E87,0x92DB, 0,0xE346,0x97DD, -0x8DD7, 0,0xE347,0x9061, 0,0xE349, 0, 0, - 0,0x8FD0,0x8DAE, 0, 0, 0, 0,0xE348, - 0, 0,0x8F49,0x8CBC,0x9167,0xE344,0xE34A, 0, -0xFB8A, 0, 0,0xE345,0x8C6F, 0,0xE34D,0xE351, -0x8C8B, 0, 0, 0, 0, 0,0xE34C, 0, - 0, 0, 0,0xE355,0xFB8B, 0,0x8D69, 0, - 0,0x978D,0x88BA,0xE352, 0, 0,0x8B8B, 0, -0xE34F, 0, 0, 0, 0, 0,0xE350, 0, - 0,0x939D,0xE34E,0xE34B, 0,0x8A47,0x90E2, 0, - 0,0x8CA6, 0, 0, 0,0xE357, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE354, 0, 0, 0, 0, 0,0xE356, - 0, 0, 0,0xE353, 0, 0, 0, 0, - 0,0x8C70,0x91B1,0xE358,0x918E, 0, 0,0xE365, -0xFB8D, 0,0xE361,0xE35B, 0, 0, 0, 0, - 0, 0, 0,0xE35F,0x8EF8,0x88DB,0xE35A,0xE362, -0xE366,0x8D6A,0x96D4, 0,0x92D4,0xE35C, 0,0xFB8C, -0xE364, 0,0xE359,0x925D, 0,0xE35E,0x88BB,0x96C8, - 0, 0, 0, 0, 0, 0, 0,0xE35D, - 0, 0,0x8BD9,0x94EA, 0, 0, 0,0x918D, - 0,0x97CE,0x8F8F, 0, 0,0xE38E,0xFB8E, 0, -0xE367, 0,0x90FC, 0,0xE363,0xE368,0xE36A, 0, -0x92F7,0xE36D, 0, 0,0xE369, 0, 0, 0, -0x95D2,0x8AC9, 0, 0,0x96C9, 0, 0,0x88DC, - 0, 0,0xE36C, 0,0x97FB, 0, 0, 0, - 0, 0, 0,0xE36B, 0, 0, 0, 0, - 0,0x898F, 0, 0,0x93EA,0xE36E, 0, 0, - 0,0xE375,0xE36F,0xE376, 0, 0, 0, 0, - 0, 0,0xE372, 0, 0, 0, 0, 0, - 0, 0, 0,0x949B, 0, 0,0x8EC8,0xE374, - 0,0xE371,0xE377,0xE370, 0, 0,0x8F63, 0, - 0, 0, 0,0x9644, 0, 0,0x8F6B, 0, - 0,0xE373,0xE380, 0, 0,0xE37B, 0,0xE37E, - 0,0xE37C,0xE381,0xE37A, 0,0xE360,0x90D1, 0, - 0,0x94C9, 0,0xE37D, 0, 0,0xE378, 0, - 0, 0,0x9140,0x8C71, 0,0x8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441, 0, - 0, 0, 0,0xE3FC, 0, 0,0x9074, 0, -0x9585,0xE444, 0,0xE443,0x8D6F,0x9872, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE454, - 0, 0, 0, 0, 0,0xE448,0xE449, 0, - 0, 0, 0,0x8EEE, 0, 0,0xE447, 0, -0x8D98,0xE446, 0, 0,0xE44A, 0, 0, 0, -0x92B0,0x95A0,0x9142, 0, 0, 0, 0,0x91DA, -0xE44E, 0,0xE44F,0xE44B, 0, 0, 0, 0, -0xE44C, 0,0xE44D, 0, 0, 0, 0,0x8D70, - 0, 0, 0,0xE455, 0,0xE451, 0, 0, - 0, 0,0x9586, 0,0x968C,0x9547, 0, 0, -0xE450, 0, 0,0xE453,0xE452, 0, 0, 0, -0x9663,0xE456, 0, 0, 0, 0, 0, 0, -0xE457, 0, 0,0x9156, 0,0xE458, 0, 0, -0xE45A, 0,0xE45E, 0, 0,0xE45B,0xE459,0x945E, -0xE45C, 0,0xE45D, 0, 0, 0,0x89B0, 0, -0xE464,0xE45F, 0, 0, 0,0xE460, 0, 0, - 0,0xE461, 0,0x919F, 0, 0, 0, 0, -0xE463,0xE462,0xE465, 0, 0, 0, 0,0xE466, -0xE467, 0, 0,0x9062, 0,0x89E7, 0,0xE468, -0x97D5, 0,0x8EA9, 0, 0,0x8F4C, 0, 0, - 0, 0, 0,0x8E8A,0x9276, 0, 0, 0, - 0, 0,0xE469,0xE46A,0x8950, 0,0xE46B, 0, - 0,0xE46C,0xE46D, 0, 0,0xE46E, 0,0xE46F, -0x8BBB,0x9DA8,0xE470, 0,0x90E3,0xE471,0x8EC9, 0, -0xE472, 0,0x98AE, 0, 0, 0,0xE473,0x95DC, -0x8ADA, 0, 0,0x9143,0x8F77, 0,0x9591,0x8F4D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE474,0x8D71,0xE475,0x94CA, 0,0xE484, 0, - 0, 0, 0,0xE477, 0,0x91C7,0x9495,0x8CBD, -0xE476,0x9144, 0, 0, 0, 0, 0, 0, -0xE478, 0, 0, 0, 0, 0, 0,0x92F8, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE47A,0xE479,0xE47C, 0, 0,0xE47B, 0,0xE47D, - 0, 0,0xE480, 0,0xE47E, 0,0x8ACD, 0, -0xE481, 0,0xE482,0xE483, 0, 0,0x8DAF,0x97C7, - 0,0xE485,0x9046, 0, 0, 0,0x8990,0xE486, -0xE487, 0, 0, 0, 0, 0,0xE488, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x88F0, 0,0xE489, 0, 0, - 0, 0,0xE48A, 0, 0, 0, 0, 0, - 0,0x9587, 0, 0, 0,0x8EC5, 0,0xE48C, - 0, 0, 0, 0, 0,0x8A48,0x88B0, 0, - 0, 0, 0,0xE48B,0xE48E,0x946D, 0,0x9063, - 0,0x89D4, 0,0x9646, 0, 0, 0, 0, -0x8C7C,0x8BDA, 0,0xE48D, 0,0x89E8, 0, 0, - 0, 0, 0, 0, 0,0x8AA1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8991,0xE492,0x97E8,0x91DB, 0, 0,0x9563, - 0,0xE49E, 0,0x89D5,0xE49C, 0,0xE49A,0xE491, - 0,0xE48F, 0,0xE490, 0,0x8EE1,0x8BEA,0x9297, - 0, 0, 0,0x93CF, 0, 0, 0, 0, - 0,0x8970, 0,0xE494,0xE493, 0, 0, 0, - 0,0xE499,0xE495,0xE498, 0, 0, 0, 0, - 0,0xFB93,0x96CE,0xE497,0x89D6,0x8A9D,0xE49B, 0, - 0,0xE49D, 0, 0, 0, 0,0x8C73, 0, - 0, 0, 0, 0, 0, 0,0xE4A1,0xE4AA, -0xE4AB, 0, 0, 0,0x88A9, 0, 0, 0, - 0, 0, 0,0xE4B2, 0, 0, 0, 0, -0x88EF, 0, 0,0xE4A9, 0, 0, 0,0xE4A8, - 0,0xE4A3,0xE4A2, 0,0xE4A0,0xE49F,0x9283, 0, -0x91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, 0, 0,0xE4F4,0x88FC, 0, 0, - 0, 0, 0, 0, 0,0x91A0, 0, 0, - 0, 0, 0, 0, 0,0x95C1, 0, 0, -0xE4F9,0xE540, 0,0x94D7, 0, 0, 0, 0, -0xE4FC,0x8FD4,0x8EC7,0xE542, 0, 0,0x8BBC, 0, - 0, 0, 0,0xFB9A, 0,0xE543, 0,0x9599, -0xE4FB,0xFB9B,0xE4D4, 0, 0, 0, 0, 0, - 0, 0, 0,0xE4FA, 0, 0, 0, 0, -0x986E,0x93A0,0x9593,0xFB9C, 0,0xE54A, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE550, - 0, 0, 0, 0, 0, 0,0xE551, 0, -0xE544, 0, 0, 0,0x9496, 0, 0,0xE54E, -0xE546, 0,0xE548, 0, 0, 0, 0, 0, -0xE552,0xE547, 0, 0,0xE54B, 0, 0,0x8992, - 0,0x93E3, 0,0xE54C,0xE54F, 0, 0, 0, - 0, 0, 0, 0,0xE545, 0,0x9145, 0, -0xE549,0x8E46,0x9064,0x8C4F,0x96F2, 0,0x96F7,0x8F92, -0xFB9E, 0, 0, 0, 0, 0, 0, 0, - 0,0xE556,0xE554, 0, 0, 0, 0, 0, - 0,0x986D, 0, 0, 0, 0, 0, 0, - 0,0xE553, 0, 0, 0,0x9795, 0,0xE555, -0xE557, 0, 0, 0, 0,0xE558, 0, 0, - 0, 0, 0, 0,0xE55B,0xE559, 0, 0, - 0, 0, 0, 0,0x93A1,0xE55A, 0, 0, - 0,0x94CB,0xE54D, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x8F93, - 0,0xE55C,0xE561,0x9194, 0, 0,0xE560, 0, - 0, 0,0xE541, 0, 0, 0,0xE562,0x9168, - 0, 0,0xE55D,0xE55F, 0, 0, 0, 0, - 0, 0, 0,0xE55E, 0, 0,0x9F50,0x9F41, - 0, 0,0xE564, 0, 0, 0, 0, 0, - 0, 0,0xE563, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x9796, 0,0xE1BA, -0xE565, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE566, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xE567,0x8CD5, 0, -0x8B73, 0, 0, 0,0xE569,0x997C, 0, 0, - 0, 0,0x8B95, 0,0x97B8, 0,0x8BF1,0xE56A, - 0, 0, 0, 0, 0, 0, 0,0xE56B, - 0, 0, 0,0x928E, 0, 0, 0, 0, - 0,0xE56C, 0, 0, 0, 0, 0, 0, - 0,0x93F8, 0,0x88B8, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x89E1,0xE571,0xE572, 0, 0, 0, - 0, 0, 0,0xE56D, 0,0x8E5C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE56E,0x9461, 0, 0, 0, - 0,0xE56F,0xE570,0xE57A, 0, 0, 0,0xE574, -0xE577, 0, 0, 0, 0, 0,0xE573, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE575, 0,0xE576,0x8ED6, - 0,0xE578, 0,0x9260, 0,0x8C75,0x8A61, 0, - 0, 0, 0, 0,0xE57B, 0, 0, 0, - 0,0x8A5E, 0,0xE581, 0, 0,0xE57C,0xE580, - 0, 0, 0, 0,0x94B8, 0, 0, 0, - 0,0xE57D, 0, 0,0xE57E,0x9567,0x94D8,0xE582, - 0, 0, 0, 0, 0, 0, 0, 0, -0x91FB,0xE58C, 0,0xE588, 0, 0,0x89E9, 0, -0xE586, 0,0x9649,0xE587, 0, 0,0xE584, 0, -0xE585,0xE58A,0xE58D, 0, 0,0xE58B, 0, 0, - 0,0xE589,0xE583, 0, 0, 0, 0, 0, -0x9277, 0,0xE594, 0,0x96A8, 0, 0, 0, - 0, 0, 0, 0, 0,0xE592, 0, 0, - 0,0xE593, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE58E, 0, 0,0xE590, - 0, 0, 0,0xE591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5F2,0xE5F3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE5F7, 0, -0xE5F8, 0, 0,0xE5F6, 0, 0, 0, 0, - 0,0xE5F4, 0,0xE5EF,0xE5F5, 0, 0, 0, - 0, 0, 0, 0,0xE5F9,0xE8B5, 0, 0, - 0, 0, 0, 0, 0, 0,0x89A6, 0, - 0, 0, 0, 0, 0, 0,0xE5FC,0x8BDD, -0xE5FB, 0, 0, 0,0xE641, 0,0xE640, 0, - 0, 0,0xE643, 0, 0,0xE642, 0,0xE644, - 0, 0,0x8F50, 0,0xE645, 0, 0,0xE646, - 0, 0, 0, 0, 0, 0,0xE647,0x90BC, - 0,0x9776, 0,0xE648, 0, 0,0x95A2,0x9465, -0xE649, 0,0xE64A,0x8CA9, 0, 0, 0,0x8B4B, - 0, 0, 0,0xE64B, 0, 0,0x8E8B,0x9460, -0xE64C, 0,0x8A6F, 0, 0, 0, 0, 0, - 0,0xE64D, 0, 0, 0, 0,0xE64F,0x9797, - 0,0xE64E,0x9065, 0,0xE650, 0, 0,0xE651, - 0, 0,0xE652,0x8ACF, 0, 0, 0, 0, - 0, 0,0xE653, 0, 0,0xE654, 0,0xE655, -0xE656, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x8A70, 0, 0, 0, 0, 0, - 0, 0,0xE657, 0,0xE658,0xE659, 0, 0, - 0, 0, 0,0x89F0, 0, 0,0x9047,0xE65A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE65B, 0, 0, 0, -0xE65C, 0, 0, 0, 0, 0, 0, 0, -0x8CBE, 0,0x92F9,0xE65D, 0, 0, 0, 0, -0x8C76, 0,0x9075, 0,0xE660, 0,0x93A2, 0, -0xE65F, 0,0xFBA3,0x8C50, 0, 0,0xE65E,0x91F5, -0x8B4C, 0, 0,0xE661, 0,0xE662, 0,0x8FD7, - 0, 0, 0,0x8C8D, 0,0xE663, 0, 0, - 0, 0,0x964B, 0, 0,0x90DD, 0, 0, - 0,0x8B96, 0,0x96F3,0x9169, 0,0xE664,0xFBA4, - 0, 0,0x9066,0x9290,0x8FD8, 0, 0, 0, - 0,0xE665, 0, 0, 0, 0,0xE668, 0, -0xE669, 0, 0, 0, 0, 0, 0, 0, -0x8DBC,0x91C0,0xE667, 0,0x8FD9,0x955D, 0, 0, - 0, 0, 0,0xE666, 0, 0,0x8E8C, 0, -0x8972, 0,0xE66D,0x8C77, 0, 0,0x8E8E, 0, - 0,0x8E8D, 0,0x986C,0xE66C,0xE66B,0x9146, 0, -0x8B6C,0x9862,0x8A59,0x8FDA, 0, 0, 0, 0, - 0,0xFBA5, 0, 0,0xE66A, 0, 0, 0, - 0, 0,0xE66F, 0,0xE670,0xE66E, 0,0x8CD6, - 0,0x975F, 0, 0,0x8E8F,0x9446, 0, 0, - 0,0xE673, 0,0x90BE, 0,0x9261, 0, 0, -0x9755, 0,0xE676, 0, 0, 0,0x8CEA, 0, -0x90BD,0xE672, 0,0xE677,0x8CEB,0xE674,0xE675,0xFBA6, -0xE671, 0, 0, 0,0x90E0,0x93C7, 0, 0, -0x924E, 0,0x89DB, 0, 0, 0, 0, 0, - 0,0x94EE, 0, 0,0x8B62, 0,0xFBA7,0x92B2, - 0, 0,0xE67A, 0,0xE678, 0, 0,0x926B, - 0, 0, 0,0x90BF,0x8AD0,0xE679, 0,0x907A, - 0, 0,0x97C8, 0, 0, 0,0x985F, 0, - 0, 0,0xE67B,0xE687,0x92B3, 0,0xE686,0xFBA8, -0xE683,0xE68B,0xE684, 0,0xE680, 0,0x92FA,0xE67E, - 0, 0, 0,0xE67C, 0,0x9740,0x8E90, 0, - 0,0xE681, 0,0xE67D, 0, 0,0xFBAA,0xE685, -0x8F94, 0,0x8CBF, 0, 0, 0,0x91F8, 0, -0x9664,0x8979,0x88E0, 0,0x93A3, 0, 0,0xE689, - 0, 0, 0, 0,0xE688, 0,0x93E4, 0, -0xE68D, 0, 0, 0,0xE682, 0,0xE68C,0x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F5,0xE6F7, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xE748, 0, 0, 0, 0, 0, -0xE6FA, 0, 0, 0,0xE6FB,0xE6F9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xE6F8, 0,0x92FB, 0, 0,0xE740, -0xE744,0xE741,0xE6FC, 0,0xE742, 0, 0, 0, -0xE743, 0, 0, 0, 0,0xE74A, 0, 0, - 0,0xE745, 0, 0, 0, 0, 0,0x90D6, -0xE747, 0, 0,0xE749,0xE746, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xE74C, 0,0x8F52, 0,0xE74B, 0, - 0, 0, 0, 0,0xE74D, 0, 0, 0, - 0,0xE74E, 0, 0,0xE751,0xE750, 0,0xE74F, - 0, 0,0xE753,0xE752, 0,0x96F4, 0, 0, - 0,0xE755, 0,0xE754,0xE756, 0, 0, 0, - 0,0xE757, 0, 0, 0, 0, 0, 0, - 0,0xE759, 0, 0, 0, 0, 0, 0, - 0, 0,0xE758,0x9067,0xE75A, 0, 0,0x8BEB, -0xE75B,0xE75D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE75E, 0, - 0, 0, 0, 0, 0,0xE75F,0xE75C, 0, -0xE760, 0,0x8ED4,0xE761,0x8B4F,0x8C52, 0,0xFBB2, - 0, 0,0x8CAC, 0, 0, 0, 0, 0, - 0, 0, 0,0xE762, 0, 0, 0,0x93EE, - 0, 0,0x935D,0xE763, 0, 0, 0, 0, - 0, 0, 0,0xE766, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8EB2, 0, 0,0xE765,0xE764,0x8C79,0xE767, 0, - 0, 0, 0,0x8A72, 0,0xE769, 0, 0, - 0,0x8DDA,0xE768, 0,0xE771, 0, 0, 0, - 0, 0,0xE76B,0xE76D,0x95E3,0xE76A, 0, 0, - 0,0xE76C, 0,0xE770,0xE76E,0x8B50, 0,0xE76F, - 0, 0, 0, 0, 0, 0,0xE772, 0, - 0,0x9479,0x97D6, 0, 0, 0, 0,0x8F53, - 0, 0, 0,0xE773, 0, 0, 0, 0, -0x9741,0xE775, 0,0xE774, 0, 0,0xE778,0x9760, - 0, 0,0xE777, 0,0x8A8D,0xE776,0xE77B, 0, - 0,0xE77A, 0, 0,0xE779,0x9351,0xE77C, 0, - 0, 0, 0, 0, 0, 0, 0,0xE77D, - 0, 0, 0, 0,0xE77E, 0, 0,0x8D8C, - 0,0x8C44,0xE780,0xE781,0xE782, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x9068,0xE783, 0,0x8EAB,0xE784, - 0, 0, 0,0xE785, 0, 0, 0,0x999F, -0x999E, 0, 0, 0, 0,0xE786,0xE390,0xE787, -0x9243,0x904A,0x945F, 0, 0, 0, 0,0xE788, - 0, 0,0x95D3,0x92D2,0x8D9E, 0, 0,0x9248, - 0, 0,0x8949, 0,0x9698,0x9076, 0, 0, - 0, 0, 0, 0, 0, 0,0x8C7D, 0, - 0,0x8BDF, 0, 0,0x95D4, 0, 0, 0, - 0, 0,0xE789, 0, 0, 0, 0, 0, - 0, 0,0xE78B, 0, 0,0xE78A,0x89DE, 0, - 0,0x93F4,0xE78C,0x9497, 0,0x9352, 0,0xE78D, -0x8F71, 0, 0, 0,0xE78F, 0, 0,0x96C0, -0xE79E,0xE791,0xE792, 0, 0,0x92C7, 0, 0, -0x91DE,0x9197, 0,0x93A6, 0,0xE790,0x8B74, 0, - 0, 0, 0,0xE799, 0,0xE796,0xE7A3,0x93A7, -0x9280,0xE793, 0,0x92FC,0x9372,0xE794,0xE798,0x9080, - 0,0x9487,0x92CA, 0, 0,0x90C0,0xE797,0x91AC, -0x91A2,0xE795,0x88A7,0x9841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0, 0, 0, - 0, 0, 0,0xE85E, 0, 0, 0,0xE85F, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE860, 0, 0,0xE85D,0xE85C, 0, 0, 0, -0x8FE0,0x93A8,0xE85B, 0, 0, 0, 0, 0, - 0,0xE864, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE862, 0, 0, 0, 0, - 0,0xFBE5, 0, 0, 0,0xE863,0xE861, 0, -0x91F6, 0,0xE865, 0, 0, 0, 0, 0, - 0,0xE866, 0, 0,0xE868,0xFBE6, 0, 0, -0xFBE7, 0, 0, 0, 0, 0, 0, 0, - 0,0x8AD3,0xE867,0x96F8, 0, 0, 0, 0, - 0, 0,0xE873,0xE869, 0, 0,0xE86C, 0, -0xE86A, 0,0xE86B, 0, 0, 0, 0, 0, - 0, 0,0xE86D, 0, 0, 0, 0, 0, -0xE86F, 0, 0, 0, 0,0xE870, 0,0xE871, - 0, 0, 0, 0,0xE874,0xE872,0xE875,0xE877, - 0,0xE876}; - -/* page 7 0x9577-0x9FA0 */ -static uint16 tab_uni_cp9327[]={ -0x92B7, 0, 0, 0, 0, 0, 0, 0, - 0,0x96E5, 0,0xE878,0x914D, 0, 0, 0, -0xE879, 0,0x95C2,0xE87A,0x8A4A, 0, 0, 0, -0x895B, 0,0x8AD5,0xFBE8,0x8AD4,0xE87B, 0,0xE87C, - 0,0xE87D,0xE87E, 0, 0, 0, 0, 0, - 0,0xE880, 0,0x8AD6,0x8A74,0x8D7D,0x94B4, 0, -0xE882,0xE881, 0, 0, 0, 0,0xE883, 0, - 0, 0, 0,0x897B, 0, 0, 0, 0, - 0, 0,0xE886, 0,0xE885,0xE884, 0,0xE887, - 0, 0, 0, 0,0xE88A, 0, 0, 0, -0x88C5, 0, 0,0xE888, 0,0xE88C,0xE88B, 0, - 0, 0, 0, 0, 0,0xE88E,0xE88D,0xE88F, - 0,0x93AC, 0, 0, 0,0xE890, 0, 0, - 0, 0,0xE891,0xE893, 0, 0,0xE892, 0, - 0, 0,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E947, 0,0xE949, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x94F2,0xE3CA, 0, 0, -0x9048, 0, 0,0x8B51, 0, 0, 0, 0, - 0, 0,0xE94A, 0,0xE94B, 0,0x99AA,0x9F5A, -0x94D1, 0, 0,0x88F9, 0,0x88B9, 0, 0, - 0, 0, 0, 0, 0,0x8E94,0x964F,0x8FFC, - 0, 0, 0, 0,0xE94C, 0,0x96DD, 0, - 0, 0,0xE94D,0x977B, 0,0x8961, 0, 0, - 0,0x8E60, 0,0xE94E,0x89EC,0xE94F, 0, 0, - 0,0xE950, 0, 0, 0, 0,0xE952,0xE953, - 0,0xE955,0xE951, 0, 0,0xE954, 0, 0, -0xFBF8,0x8AD9, 0, 0, 0,0xE956, 0,0xE957, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE958,0xE959, - 0, 0, 0,0xE95A, 0, 0,0xE95C, 0, - 0, 0,0xE95B, 0,0xE95E,0xE961, 0, 0, - 0,0xE95D,0xE95F,0xE960, 0, 0,0xE962, 0, -0x8BC0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x8EF1, -0xE963,0xE964,0x8D81, 0, 0, 0, 0,0xFBFA, - 0, 0, 0, 0, 0, 0,0xE965, 0, - 0,0x8A5D, 0, 0, 0,0x946E,0xE966,0xE967, - 0, 0, 0, 0,0x9279,0x93E9, 0, 0, - 0, 0, 0, 0, 0,0xE968, 0, 0, - 0, 0,0x949D, 0, 0,0x91CA,0x8977,0x8BEC, - 0,0x8BED, 0, 0, 0, 0, 0, 0, - 0,0x9293,0xE96D,0x8BEE, 0, 0,0x89ED, 0, - 0,0xE96C, 0, 0,0xE96A, 0,0xE96B, 0, -0xE969, 0, 0,0xE977, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE96E,0xE96F, - 0, 0,0xE970,0xE971, 0, 0, 0, 0, - 0,0xE973, 0, 0,0xE972, 0, 0, 0, -0x8F78, 0,0xE974, 0, 0, 0,0xE976, 0, - 0, 0, 0, 0, 0, 0, 0,0x8B52, -0xE975, 0, 0,0x919B,0x8CB1, 0, 0, 0, - 0, 0,0xE978, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x91CB, 0, 0,0xE979, 0, 0, 0, - 0,0x93AB, 0, 0, 0, 0, 0, 0, -0xE97A, 0, 0, 0, 0, 0, 0,0xE980, - 0,0xE97D, 0,0xE97C,0xE97E, 0,0xE97B, 0, - 0, 0, 0, 0, 0, 0,0xE982,0xFBFB, - 0, 0, 0, 0, 0, 0,0xE981, 0, -0xE984, 0, 0,0x8BC1,0xE983, 0, 0, 0, -0xE985, 0, 0,0xE986, 0,0xE988,0xE987, 0, - 0, 0,0xE989,0xE98B,0xE98A, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8D9C, 0, 0, 0, 0,0xE98C, 0, - 0,0xE98D, 0, 0, 0, 0, 0, 0, - 0,0x8A5B, 0, 0, 0,0xE98E, 0, 0, - 0,0xE98F, 0, 0, 0,0x9091, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE990, 0,0xE991, 0,0xE992,0xE993, 0, 0, - 0,0x8D82,0xFBFC, 0, 0,0xFC40, 0,0xE994, -0xE995, 0, 0,0xE996,0xE997, 0, 0,0xE998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A81, -0xEA82, 0,0xEA83, 0,0xEA84,0xEA85,0xEA86, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xEA87,0xEA88, 0, 0, 0, 0, 0,0x9343, - 0, 0, 0, 0,0x8CDB, 0,0xEA8A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x916C,0xEA8B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xEA8C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x9540, 0, 0,0xEA8D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xEA8E,0xE256, 0, 0,0xE6D8, -0xE8EB, 0, 0,0xEA8F, 0,0xEA90, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xEA92,0xEA93,0xEA94,0x97EE,0xEA91, 0, 0,0xEA95, -0xEA96, 0, 0,0xEA98, 0,0xEA97, 0, 0, - 0, 0, 0,0xEA9A, 0, 0, 0,0xEA9B, -0xEA99, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x97B4, 0, - 0, 0, 0, 0, 0, 0,0xEA9C, 0, - 0, 0, 0, 0, 0,0xEA9D,0xE273, 0, - 0,0xEA9E}; - -/* page 8 0xE000-0xE757 - User defined characters */ -static uint16 tab_uni_cp9328[]={ -0xF040,0xF041,0xF042,0xF043,0xF044,0xF045,0xF046,0xF047, -0xF048,0xF049,0xF04A,0xF04B,0xF04C,0xF04D,0xF04E,0xF04F, -0xF050,0xF051,0xF052,0xF053,0xF054,0xF055,0xF056,0xF057, -0xF058,0xF059,0xF05A,0xF05B,0xF05C,0xF05D,0xF05E,0xF05F, -0xF060,0xF061,0xF062,0xF063,0xF064,0xF065,0xF066,0xF067, -0xF068,0xF069,0xF06A,0xF06B,0xF06C,0xF06D,0xF06E,0xF06F, -0xF070,0xF071,0xF072,0xF073,0xF074,0xF075,0xF076,0xF077, -0xF078,0xF079,0xF07A,0xF07B,0xF07C,0xF07D,0xF07E,0xF080, -0xF081,0xF082,0xF083,0xF084,0xF085,0xF086,0xF087,0xF088, -0xF089,0xF08A,0xF08B,0xF08C,0xF08D,0xF08E,0xF08F,0xF090, -0xF091,0xF092,0xF093,0xF094,0xF095,0xF096,0xF097,0xF098, -0xF099,0xF09A,0xF09B,0xF09C,0xF09D,0xF09E,0xF09F,0xF0A0, -0xF0A1,0xF0A2,0xF0A3,0xF0A4,0xF0A5,0xF0A6,0xF0A7,0xF0A8, -0xF0A9,0xF0AA,0xF0AB,0xF0AC,0xF0AD,0xF0AE,0xF0AF,0xF0B0, -0xF0B1,0xF0B2,0xF0B3,0xF0B4,0xF0B5,0xF0B6,0xF0B7,0xF0B8, -0xF0B9,0xF0BA,0xF0BB,0xF0BC,0xF0BD,0xF0BE,0xF0BF,0xF0C0, -0xF0C1,0xF0C2,0xF0C3,0xF0C4,0xF0C5,0xF0C6,0xF0C7,0xF0C8, -0xF0C9,0xF0CA,0xF0CB,0xF0CC,0xF0CD,0xF0CE,0xF0CF,0xF0D0, -0xF0D1,0xF0D2,0xF0D3,0xF0D4,0xF0D5,0xF0D6,0xF0D7,0xF0D8, -0xF0D9,0xF0DA,0xF0DB,0xF0DC,0xF0DD,0xF0DE,0xF0DF,0xF0E0, -0xF0E1,0xF0E2,0xF0E3,0xF0E4,0xF0E5,0xF0E6,0xF0E7,0xF0E8, -0xF0E9,0xF0EA,0xF0EB,0xF0EC,0xF0ED,0xF0EE,0xF0EF,0xF0F0, -0xF0F1,0xF0F2,0xF0F3,0xF0F4,0xF0F5,0xF0F6,0xF0F7,0xF0F8, -0xF0F9,0xF0FA,0xF0FB,0xF0FC,0xF140,0xF141,0xF142,0xF143, -0xF144,0xF145,0xF146,0xF147,0xF148,0xF149,0xF14A,0xF14B, -0xF14C,0xF14D,0xF14E,0xF14F,0xF150,0xF151,0xF152,0xF153, -0xF154,0xF155,0xF156,0xF157,0xF158,0xF159,0xF15A,0xF15B, -0xF15C,0xF15D,0xF15E,0xF15F,0xF160,0xF161,0xF162,0xF163, -0xF164,0xF165,0xF166,0xF167,0xF168,0xF169,0xF16A,0xF16B, -0xF16C,0xF16D,0xF16E,0xF16F,0xF170,0xF171,0xF172,0xF173, -0xF174,0xF175,0xF176,0xF177,0xF178,0xF179,0xF17A,0xF17B, -0xF17C,0xF17D,0xF17E,0xF180,0xF181,0xF182,0xF183,0xF184, -0xF185,0xF186,0xF187,0xF188,0xF189,0xF18A,0xF18B,0xF18C, -0xF18D,0xF18E,0xF18F,0xF190,0xF191,0xF192,0xF193,0xF194, -0xF195,0xF196,0xF197,0xF198,0xF199,0xF19A,0xF19B,0xF19C, -0xF19D,0xF19E,0xF19F,0xF1A0,0xF1A1,0xF1A2,0xF1A3,0xF1A4, -0xF1A5,0xF1A6,0xF1A7,0xF1A8,0xF1A9,0xF1AA,0xF1AB,0xF1AC, -0xF1AD,0xF1AE,0xF1AF,0xF1B0,0xF1B1,0xF1B2,0xF1B3,0xF1B4, -0xF1B5,0xF1B6,0xF1B7,0xF1B8,0xF1B9,0xF1BA,0xF1BB,0xF1BC, -0xF1BD,0xF1BE,0xF1BF,0xF1C0,0xF1C1,0xF1C2,0xF1C3,0xF1C4, -0xF1C5,0xF1C6,0xF1C7,0xF1C8,0xF1C9,0xF1CA,0xF1CB,0xF1CC, -0xF1CD,0xF1CE,0xF1CF,0xF1D0,0xF1D1,0xF1D2,0xF1D3,0xF1D4, -0xF1D5,0xF1D6,0xF1D7,0xF1D8,0xF1D9,0xF1DA,0xF1DB,0xF1DC, -0xF1DD,0xF1DE,0xF1DF,0xF1E0,0xF1E1,0xF1E2,0xF1E3,0xF1E4, -0xF1E5,0xF1E6,0xF1E7,0xF1E8,0xF1E9,0xF1EA,0xF1EB,0xF1EC, -0xF1ED,0xF1EE,0xF1EF,0xF1F0,0xF1F1,0xF1F2,0xF1F3,0xF1F4, -0xF1F5,0xF1F6,0xF1F7,0xF1F8,0xF1F9,0xF1FA,0xF1FB,0xF1FC, -0xF240,0xF241,0xF242,0xF243,0xF244,0xF245,0xF246,0xF247, -0xF248,0xF249,0xF24A,0xF24B,0xF24C,0xF24D,0xF24E,0xF24F, -0xF250,0xF251,0xF252,0xF253,0xF254,0xF255,0xF256,0xF257, -0xF258,0xF259,0xF25A,0xF25B,0xF25C,0xF25D,0xF25E,0xF25F, -0xF260,0xF261,0xF262,0xF263,0xF264,0xF265,0xF266,0xF267, -0xF268,0xF269,0xF26A,0xF26B,0xF26C,0xF26D,0xF26E,0xF26F, -0xF270,0xF271,0xF272,0xF273,0xF274,0xF275,0xF276,0xF277, -0xF278,0xF279,0xF27A,0xF27B,0xF27C,0xF27D,0xF27E,0xF280, -0xF281,0xF282,0xF283,0xF284,0xF285,0xF286,0xF287,0xF288, -0xF289,0xF28A,0xF28B,0xF28C,0xF28D,0xF28E,0xF28F,0xF290, -0xF291,0xF292,0xF293,0xF294,0xF295,0xF296,0xF297,0xF298, -0xF299,0xF29A,0xF29B,0xF29C,0xF29D,0xF29E,0xF29F,0xF2A0, -0xF2A1,0xF2A2,0xF2A3,0xF2A4,0xF2A5,0xF2A6,0xF2A7,0xF2A8, -0xF2A9,0xF2AA,0xF2AB,0xF2AC,0xF2AD,0xF2AE,0xF2AF,0xF2B0, -0xF2B1,0xF2B2,0xF2B3,0xF2B4,0xF2B5,0xF2B6,0xF2B7,0xF2B8, -0xF2B9,0xF2BA,0xF2BB,0xF2BC,0xF2BD,0xF2BE,0xF2BF,0xF2C0, -0xF2C1,0xF2C2,0xF2C3,0xF2C4,0xF2C5,0xF2C6,0xF2C7,0xF2C8, -0xF2C9,0xF2CA,0xF2CB,0xF2CC,0xF2CD,0xF2CE,0xF2CF,0xF2D0, -0xF2D1,0xF2D2,0xF2D3,0xF2D4,0xF2D5,0xF2D6,0xF2D7,0xF2D8, -0xF2D9,0xF2DA,0xF2DB,0xF2DC,0xF2DD,0xF2DE,0xF2DF,0xF2E0, -0xF2E1,0xF2E2,0xF2E3,0xF2E4,0xF2E5,0xF2E6,0xF2E7,0xF2E8, -0xF2E9,0xF2EA,0xF2EB,0xF2EC,0xF2ED,0xF2EE,0xF2EF,0xF2F0, -0xF2F1,0xF2F2,0xF2F3,0xF2F4,0xF2F5,0xF2F6,0xF2F7,0xF2F8, -0xF2F9,0xF2FA,0xF2FB,0xF2FC,0xF340,0xF341,0xF342,0xF343, -0xF344,0xF345,0xF346,0xF347,0xF348,0xF349,0xF34A,0xF34B, -0xF34C,0xF34D,0xF34E,0xF34F,0xF350,0xF351,0xF352,0xF353, -0xF354,0xF355,0xF356,0xF357,0xF358,0xF359,0xF35A,0xF35B, -0xF35C,0xF35D,0xF35E,0xF35F,0xF360,0xF361,0xF362,0xF363, -0xF364,0xF365,0xF366,0xF367,0xF368,0xF369,0xF36A,0xF36B, -0xF36C,0xF36D,0xF36E,0xF36F,0xF370,0xF371,0xF372,0xF373, -0xF374,0xF375,0xF376,0xF377,0xF378,0xF379,0xF37A,0xF37B, -0xF37C,0xF37D,0xF37E,0xF380,0xF381,0xF382,0xF383,0xF384, -0xF385,0xF386,0xF387,0xF388,0xF389,0xF38A,0xF38B,0xF38C, -0xF38D,0xF38E,0xF38F,0xF390,0xF391,0xF392,0xF393,0xF394, -0xF395,0xF396,0xF397,0xF398,0xF399,0xF39A,0xF39B,0xF39C, -0xF39D,0xF39E,0xF39F,0xF3A0,0xF3A1,0xF3A2,0xF3A3,0xF3A4, -0xF3A5,0xF3A6,0xF3A7,0xF3A8,0xF3A9,0xF3AA,0xF3AB,0xF3AC, -0xF3AD,0xF3AE,0xF3AF,0xF3B0,0xF3B1,0xF3B2,0xF3B3,0xF3B4, -0xF3B5,0xF3B6,0xF3B7,0xF3B8,0xF3B9,0xF3BA,0xF3BB,0xF3BC, -0xF3BD,0xF3BE,0xF3BF,0xF3C0,0xF3C1,0xF3C2,0xF3C3,0xF3C4, -0xF3C5,0xF3C6,0xF3C7,0xF3C8,0xF3C9,0xF3CA,0xF3CB,0xF3CC, -0xF3CD,0xF3CE,0xF3CF,0xF3D0,0xF3D1,0xF3D2,0xF3D3,0xF3D4, -0xF3D5,0xF3D6,0xF3D7,0xF3D8,0xF3D9,0xF3DA,0xF3DB,0xF3DC, -0xF3DD,0xF3DE,0xF3DF,0xF3E0,0xF3E1,0xF3E2,0xF3E3,0xF3E4, -0xF3E5,0xF3E6,0xF3E7,0xF3E8,0xF3E9,0xF3EA,0xF3EB,0xF3EC, -0xF3ED,0xF3EE,0xF3EF,0xF3F0,0xF3F1,0xF3F2,0xF3F3,0xF3F4, -0xF3F5,0xF3F6,0xF3F7,0xF3F8,0xF3F9,0xF3FA,0xF3FB,0xF3FC, -0xF440,0xF441,0xF442,0xF443,0xF444,0xF445,0xF446,0xF447, -0xF448,0xF449,0xF44A,0xF44B,0xF44C,0xF44D,0xF44E,0xF44F, -0xF450,0xF451,0xF452,0xF453,0xF454,0xF455,0xF456,0xF457, -0xF458,0xF459,0xF45A,0xF45B,0xF45C,0xF45D,0xF45E,0xF45F, -0xF460,0xF461,0xF462,0xF463,0xF464,0xF465,0xF466,0xF467, -0xF468,0xF469,0xF46A,0xF46B,0xF46C,0xF46D,0xF46E,0xF46F, -0xF470,0xF471,0xF472,0xF473,0xF474,0xF475,0xF476,0xF477, -0xF478,0xF479,0xF47A,0xF47B,0xF47C,0xF47D,0xF47E,0xF480, -0xF481,0xF482,0xF483,0xF484,0xF485,0xF486,0xF487,0xF488, -0xF489,0xF48A,0xF48B,0xF48C,0xF48D,0xF48E,0xF48F,0xF490, -0xF491,0xF492,0xF493,0xF494,0xF495,0xF496,0xF497,0xF498, -0xF499,0xF49A,0xF49B,0xF49C,0xF49D,0xF49E,0xF49F,0xF4A0, -0xF4A1,0xF4A2,0xF4A3,0xF4A4,0xF4A5,0xF4A6,0xF4A7,0xF4A8, -0xF4A9,0xF4AA,0xF4AB,0xF4AC,0xF4AD,0xF4AE,0xF4AF,0xF4B0, -0xF4B1,0xF4B2,0xF4B3,0xF4B4,0xF4B5,0xF4B6,0xF4B7,0xF4B8, -0xF4B9,0xF4BA,0xF4BB,0xF4BC,0xF4BD,0xF4BE,0xF4BF,0xF4C0, -0xF4C1,0xF4C2,0xF4C3,0xF4C4,0xF4C5,0xF4C6,0xF4C7,0xF4C8, -0xF4C9,0xF4CA,0xF4CB,0xF4CC,0xF4CD,0xF4CE,0xF4CF,0xF4D0, -0xF4D1,0xF4D2,0xF4D3,0xF4D4,0xF4D5,0xF4D6,0xF4D7,0xF4D8, -0xF4D9,0xF4DA,0xF4DB,0xF4DC,0xF4DD,0xF4DE,0xF4DF,0xF4E0, -0xF4E1,0xF4E2,0xF4E3,0xF4E4,0xF4E5,0xF4E6,0xF4E7,0xF4E8, -0xF4E9,0xF4EA,0xF4EB,0xF4EC,0xF4ED,0xF4EE,0xF4EF,0xF4F0, -0xF4F1,0xF4F2,0xF4F3,0xF4F4,0xF4F5,0xF4F6,0xF4F7,0xF4F8, -0xF4F9,0xF4FA,0xF4FB,0xF4FC,0xF540,0xF541,0xF542,0xF543, -0xF544,0xF545,0xF546,0xF547,0xF548,0xF549,0xF54A,0xF54B, -0xF54C,0xF54D,0xF54E,0xF54F,0xF550,0xF551,0xF552,0xF553, -0xF554,0xF555,0xF556,0xF557,0xF558,0xF559,0xF55A,0xF55B, -0xF55C,0xF55D,0xF55E,0xF55F,0xF560,0xF561,0xF562,0xF563, -0xF564,0xF565,0xF566,0xF567,0xF568,0xF569,0xF56A,0xF56B, -0xF56C,0xF56D,0xF56E,0xF56F,0xF570,0xF571,0xF572,0xF573, -0xF574,0xF575,0xF576,0xF577,0xF578,0xF579,0xF57A,0xF57B, -0xF57C,0xF57D,0xF57E,0xF580,0xF581,0xF582,0xF583,0xF584, -0xF585,0xF586,0xF587,0xF588,0xF589,0xF58A,0xF58B,0xF58C, -0xF58D,0xF58E,0xF58F,0xF590,0xF591,0xF592,0xF593,0xF594, -0xF595,0xF596,0xF597,0xF598,0xF599,0xF59A,0xF59B,0xF59C, -0xF59D,0xF59E,0xF59F,0xF5A0,0xF5A1,0xF5A2,0xF5A3,0xF5A4, -0xF5A5,0xF5A6,0xF5A7,0xF5A8,0xF5A9,0xF5AA,0xF5AB,0xF5AC, -0xF5AD,0xF5AE,0xF5AF,0xF5B0,0xF5B1,0xF5B2,0xF5B3,0xF5B4, -0xF5B5,0xF5B6,0xF5B7,0xF5B8,0xF5B9,0xF5BA,0xF5BB,0xF5BC, -0xF5BD,0xF5BE,0xF5BF,0xF5C0,0xF5C1,0xF5C2,0xF5C3,0xF5C4, -0xF5C5,0xF5C6,0xF5C7,0xF5C8,0xF5C9,0xF5CA,0xF5CB,0xF5CC, -0xF5CD,0xF5CE,0xF5CF,0xF5D0,0xF5D1,0xF5D2,0xF5D3,0xF5D4, -0xF5D5,0xF5D6,0xF5D7,0xF5D8,0xF5D9,0xF5DA,0xF5DB,0xF5DC, -0xF5DD,0xF5DE,0xF5DF,0xF5E0,0xF5E1,0xF5E2,0xF5E3,0xF5E4, -0xF5E5,0xF5E6,0xF5E7,0xF5E8,0xF5E9,0xF5EA,0xF5EB,0xF5EC, -0xF5ED,0xF5EE,0xF5EF,0xF5F0,0xF5F1,0xF5F2,0xF5F3,0xF5F4, -0xF5F5,0xF5F6,0xF5F7,0xF5F8,0xF5F9,0xF5FA,0xF5FB,0xF5FC, -0xF640,0xF641,0xF642,0xF643,0xF644,0xF645,0xF646,0xF647, -0xF648,0xF649,0xF64A,0xF64B,0xF64C,0xF64D,0xF64E,0xF64F, -0xF650,0xF651,0xF652,0xF653,0xF654,0xF655,0xF656,0xF657, -0xF658,0xF659,0xF65A,0xF65B,0xF65C,0xF65D,0xF65E,0xF65F, -0xF660,0xF661,0xF662,0xF663,0xF664,0xF665,0xF666,0xF667, -0xF668,0xF669,0xF66A,0xF66B,0xF66C,0xF66D,0xF66E,0xF66F, -0xF670,0xF671,0xF672,0xF673,0xF674,0xF675,0xF676,0xF677, -0xF678,0xF679,0xF67A,0xF67B,0xF67C,0xF67D,0xF67E,0xF680, -0xF681,0xF682,0xF683,0xF684,0xF685,0xF686,0xF687,0xF688, -0xF689,0xF68A,0xF68B,0xF68C,0xF68D,0xF68E,0xF68F,0xF690, -0xF691,0xF692,0xF693,0xF694,0xF695,0xF696,0xF697,0xF698, -0xF699,0xF69A,0xF69B,0xF69C,0xF69D,0xF69E,0xF69F,0xF6A0, -0xF6A1,0xF6A2,0xF6A3,0xF6A4,0xF6A5,0xF6A6,0xF6A7,0xF6A8, -0xF6A9,0xF6AA,0xF6AB,0xF6AC,0xF6AD,0xF6AE,0xF6AF,0xF6B0, -0xF6B1,0xF6B2,0xF6B3,0xF6B4,0xF6B5,0xF6B6,0xF6B7,0xF6B8, -0xF6B9,0xF6BA,0xF6BB,0xF6BC,0xF6BD,0xF6BE,0xF6BF,0xF6C0, -0xF6C1,0xF6C2,0xF6C3,0xF6C4,0xF6C5,0xF6C6,0xF6C7,0xF6C8, -0xF6C9,0xF6CA,0xF6CB,0xF6CC,0xF6CD,0xF6CE,0xF6CF,0xF6D0, -0xF6D1,0xF6D2,0xF6D3,0xF6D4,0xF6D5,0xF6D6,0xF6D7,0xF6D8, -0xF6D9,0xF6DA,0xF6DB,0xF6DC,0xF6DD,0xF6DE,0xF6DF,0xF6E0, -0xF6E1,0xF6E2,0xF6E3,0xF6E4,0xF6E5,0xF6E6,0xF6E7,0xF6E8, -0xF6E9,0xF6EA,0xF6EB,0xF6EC,0xF6ED,0xF6EE,0xF6EF,0xF6F0, -0xF6F1,0xF6F2,0xF6F3,0xF6F4,0xF6F5,0xF6F6,0xF6F7,0xF6F8, -0xF6F9,0xF6FA,0xF6FB,0xF6FC,0xF740,0xF741,0xF742,0xF743, -0xF744,0xF745,0xF746,0xF747,0xF748,0xF749,0xF74A,0xF74B, -0xF74C,0xF74D,0xF74E,0xF74F,0xF750,0xF751,0xF752,0xF753, -0xF754,0xF755,0xF756,0xF757,0xF758,0xF759,0xF75A,0xF75B, -0xF75C,0xF75D,0xF75E,0xF75F,0xF760,0xF761,0xF762,0xF763, -0xF764,0xF765,0xF766,0xF767,0xF768,0xF769,0xF76A,0xF76B, -0xF76C,0xF76D,0xF76E,0xF76F,0xF770,0xF771,0xF772,0xF773, -0xF774,0xF775,0xF776,0xF777,0xF778,0xF779,0xF77A,0xF77B, -0xF77C,0xF77D,0xF77E,0xF780,0xF781,0xF782,0xF783,0xF784, -0xF785,0xF786,0xF787,0xF788,0xF789,0xF78A,0xF78B,0xF78C, -0xF78D,0xF78E,0xF78F,0xF790,0xF791,0xF792,0xF793,0xF794, -0xF795,0xF796,0xF797,0xF798,0xF799,0xF79A,0xF79B,0xF79C, -0xF79D,0xF79E,0xF79F,0xF7A0,0xF7A1,0xF7A2,0xF7A3,0xF7A4, -0xF7A5,0xF7A6,0xF7A7,0xF7A8,0xF7A9,0xF7AA,0xF7AB,0xF7AC, -0xF7AD,0xF7AE,0xF7AF,0xF7B0,0xF7B1,0xF7B2,0xF7B3,0xF7B4, -0xF7B5,0xF7B6,0xF7B7,0xF7B8,0xF7B9,0xF7BA,0xF7BB,0xF7BC, -0xF7BD,0xF7BE,0xF7BF,0xF7C0,0xF7C1,0xF7C2,0xF7C3,0xF7C4, -0xF7C5,0xF7C6,0xF7C7,0xF7C8,0xF7C9,0xF7CA,0xF7CB,0xF7CC, -0xF7CD,0xF7CE,0xF7CF,0xF7D0,0xF7D1,0xF7D2,0xF7D3,0xF7D4, -0xF7D5,0xF7D6,0xF7D7,0xF7D8,0xF7D9,0xF7DA,0xF7DB,0xF7DC, -0xF7DD,0xF7DE,0xF7DF,0xF7E0,0xF7E1,0xF7E2,0xF7E3,0xF7E4, -0xF7E5,0xF7E6,0xF7E7,0xF7E8,0xF7E9,0xF7EA,0xF7EB,0xF7EC, -0xF7ED,0xF7EE,0xF7EF,0xF7F0,0xF7F1,0xF7F2,0xF7F3,0xF7F4, -0xF7F5,0xF7F6,0xF7F7,0xF7F8,0xF7F9,0xF7FA,0xF7FB,0xF7FC, -0xF840,0xF841,0xF842,0xF843,0xF844,0xF845,0xF846,0xF847, -0xF848,0xF849,0xF84A,0xF84B,0xF84C,0xF84D,0xF84E,0xF84F, -0xF850,0xF851,0xF852,0xF853,0xF854,0xF855,0xF856,0xF857, -0xF858,0xF859,0xF85A,0xF85B,0xF85C,0xF85D,0xF85E,0xF85F, -0xF860,0xF861,0xF862,0xF863,0xF864,0xF865,0xF866,0xF867, -0xF868,0xF869,0xF86A,0xF86B,0xF86C,0xF86D,0xF86E,0xF86F, -0xF870,0xF871,0xF872,0xF873,0xF874,0xF875,0xF876,0xF877, -0xF878,0xF879,0xF87A,0xF87B,0xF87C,0xF87D,0xF87E,0xF880, -0xF881,0xF882,0xF883,0xF884,0xF885,0xF886,0xF887,0xF888, -0xF889,0xF88A,0xF88B,0xF88C,0xF88D,0xF88E,0xF88F,0xF890, -0xF891,0xF892,0xF893,0xF894,0xF895,0xF896,0xF897,0xF898, -0xF899,0xF89A,0xF89B,0xF89C,0xF89D,0xF89E,0xF89F,0xF8A0, -0xF8A1,0xF8A2,0xF8A3,0xF8A4,0xF8A5,0xF8A6,0xF8A7,0xF8A8, -0xF8A9,0xF8AA,0xF8AB,0xF8AC,0xF8AD,0xF8AE,0xF8AF,0xF8B0, -0xF8B1,0xF8B2,0xF8B3,0xF8B4,0xF8B5,0xF8B6,0xF8B7,0xF8B8, -0xF8B9,0xF8BA,0xF8BB,0xF8BC,0xF8BD,0xF8BE,0xF8BF,0xF8C0, -0xF8C1,0xF8C2,0xF8C3,0xF8C4,0xF8C5,0xF8C6,0xF8C7,0xF8C8, -0xF8C9,0xF8CA,0xF8CB,0xF8CC,0xF8CD,0xF8CE,0xF8CF,0xF8D0, -0xF8D1,0xF8D2,0xF8D3,0xF8D4,0xF8D5,0xF8D6,0xF8D7,0xF8D8, -0xF8D9,0xF8DA,0xF8DB,0xF8DC,0xF8DD,0xF8DE,0xF8DF,0xF8E0, -0xF8E1,0xF8E2,0xF8E3,0xF8E4,0xF8E5,0xF8E6,0xF8E7,0xF8E8, -0xF8E9,0xF8EA,0xF8EB,0xF8EC,0xF8ED,0xF8EE,0xF8EF,0xF8F0, -0xF8F1,0xF8F2,0xF8F3,0xF8F4,0xF8F5,0xF8F6,0xF8F7,0xF8F8, -0xF8F9,0xF8FA,0xF8FB,0xF8FC,0xF940,0xF941,0xF942,0xF943, -0xF944,0xF945,0xF946,0xF947,0xF948,0xF949,0xF94A,0xF94B, -0xF94C,0xF94D,0xF94E,0xF94F,0xF950,0xF951,0xF952,0xF953, -0xF954,0xF955,0xF956,0xF957,0xF958,0xF959,0xF95A,0xF95B, -0xF95C,0xF95D,0xF95E,0xF95F,0xF960,0xF961,0xF962,0xF963, -0xF964,0xF965,0xF966,0xF967,0xF968,0xF969,0xF96A,0xF96B, -0xF96C,0xF96D,0xF96E,0xF96F,0xF970,0xF971,0xF972,0xF973, -0xF974,0xF975,0xF976,0xF977,0xF978,0xF979,0xF97A,0xF97B, -0xF97C,0xF97D,0xF97E,0xF980,0xF981,0xF982,0xF983,0xF984, -0xF985,0xF986,0xF987,0xF988,0xF989,0xF98A,0xF98B,0xF98C, -0xF98D,0xF98E,0xF98F,0xF990,0xF991,0xF992,0xF993,0xF994, -0xF995,0xF996,0xF997,0xF998,0xF999,0xF99A,0xF99B,0xF99C, -0xF99D,0xF99E,0xF99F,0xF9A0,0xF9A1,0xF9A2,0xF9A3,0xF9A4, -0xF9A5,0xF9A6,0xF9A7,0xF9A8,0xF9A9,0xF9AA,0xF9AB,0xF9AC, -0xF9AD,0xF9AE,0xF9AF,0xF9B0,0xF9B1,0xF9B2,0xF9B3,0xF9B4, -0xF9B5,0xF9B6,0xF9B7,0xF9B8,0xF9B9,0xF9BA,0xF9BB,0xF9BC, -0xF9BD,0xF9BE,0xF9BF,0xF9C0,0xF9C1,0xF9C2,0xF9C3,0xF9C4, -0xF9C5,0xF9C6,0xF9C7,0xF9C8,0xF9C9,0xF9CA,0xF9CB,0xF9CC, -0xF9CD,0xF9CE,0xF9CF,0xF9D0,0xF9D1,0xF9D2,0xF9D3,0xF9D4, -0xF9D5,0xF9D6,0xF9D7,0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, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xFA90,0xFA9B, -0xFA9C,0xFAB1,0xFAD8,0xFAE8,0xFAEA,0xFB58,0xFB5E,0xFB75, -0xFB7D,0xFB7E,0xFB80,0xFB82,0xFB86,0xFB89,0xFB92,0xFB9D, -0xFB9F,0xFBA0,0xFBA9,0xFBB1,0xFBB3,0xFBB4,0xFBB7,0xFBD3, -0xFBDA,0xFBEA,0xFBF6,0xFBF7,0xFBF9,0xFC49}; - -/* page 10 0xFF01-0xFFE5 */ -static uint16 tab_uni_cp93210[]={ -0x8149,0xFA57,0x8194,0x8190,0x8193,0x8195,0xFA56,0x8169, -0x816A,0x8196,0x817B,0x8143,0x817C,0x8144,0x815E,0x824F, -0x8250,0x8251,0x8252,0x8253,0x8254,0x8255,0x8256,0x8257, -0x8258,0x8146,0x8147,0x8183,0x8181,0x8184,0x8148,0x8197, -0x8260,0x8261,0x8262,0x8263,0x8264,0x8265,0x8266,0x8267, -0x8268,0x8269,0x826A,0x826B,0x826C,0x826D,0x826E,0x826F, -0x8270,0x8271,0x8272,0x8273,0x8274,0x8275,0x8276,0x8277, -0x8278,0x8279,0x816D,0x815F,0x816E,0x814F,0x8151,0x814D, -0x8281,0x8282,0x8283,0x8284,0x8285,0x8286,0x8287,0x8288, -0x8289,0x828A,0x828B,0x828C,0x828D,0x828E,0x828F,0x8290, -0x8291,0x8292,0x8293,0x8294,0x8295,0x8296,0x8297,0x8298, -0x8299,0x829A,0x816F,0x8162,0x8170,0x8160, 0, 0, -0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8, -0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0, -0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8, -0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0, -0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8, -0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0, -0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8, -0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x8191, -0x8192,0x81CA,0x8150,0xFA55,0x818F}; - -static int func_uni_cp932_onechar(int code){ - if ((code>=0x005C)&&(code<=0x00F7)) - return(tab_uni_cp9320[code-0x005C]); - if ((code>=0x0391)&&(code<=0x0451)) - return(tab_uni_cp9321[code-0x0391]); - if ((code>=0x2010)&&(code<=0x2473)) - return(tab_uni_cp9322[code-0x2010]); - if ((code>=0x2500)&&(code<=0x266F)) - return(tab_uni_cp9323[code-0x2500]); - if ((code>=0x3000)&&(code<=0x30FE)) - return(tab_uni_cp9324[code-0x3000]); - if ((code>=0x3230)&&(code<=0x33CD)) - return(tab_uni_cp9325[code-0x3230]); - if ((code>=0x4E00)&&(code<=0x9481)) - return(tab_uni_cp9326[code-0x4E00]); - if ((code>=0x9577)&&(code<=0x9FA0)) - return(tab_uni_cp9327[code-0x9577]); - if ((code>=0xE000)&&(code<=0xE757)) - return(tab_uni_cp9328[code-0xE000]); - if ((code>=0xF920)&&(code<=0xFA2D)) - return(tab_uni_cp9329[code-0xF920]); - if ((code>=0xFF01)&&(code<=0xFFE5)) - return(tab_uni_cp93210[code-0xFF01]); - return(0); -} - - -static int -my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, uchar *e) -{ - int code; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((int) wc < 0x80) - { - s[0]= (uchar) wc; - return 1; - } - - if (!(code=func_uni_cp932_onechar(wc))) - return MY_CS_ILUNI; - - if (code>=0xA1 && code <= 0xDF) - { - s[0]= code; - return 1; - } - - s[0]=code>>8; - s[1]=code&0xFF; - return 2; -} - - -static int -my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc, const uchar *s, const uchar *e){ - int hi; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((hi= s[0]) < 0x80) - { - pwc[0]=hi; - return 1; - } - - if (hi >= 0xA1 && hi <= 0xDF) - { - pwc[0]= func_cp932_uni_onechar(hi); - return 1; - } - - if (s+2>e) - return MY_CS_TOOSMALL2; - - if (!(pwc[0]=func_cp932_uni_onechar((hi<<8)+s[1]))) - return -2; - - return 2; -} - -static -size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)), - const char *str, const char *str_end) -{ - size_t clen= 0; - const uchar *b= (const uchar *) str; - const uchar *e= (const uchar *) str_end; - - for (clen= 0; b < e; ) - { - if (*b >= 0xA1 && *b <= 0xDF) - { - clen++; - b++; - } - else if (*b > 0x7F) - { - clen+= 2; - b+= 2; - } - else - { - clen++; - b++; - } - } - return clen; -} - -/* - Returns a well formed length of a cp932 string. - cp932 additional characters are also accepted. -*/ - -static -size_t my_well_formed_len_cp932(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, - size_t pos, int *error) -{ - const char *b0= b; - *error= 0; - while (pos-- && b < e) - { - /* - Cast to int8 for extra safety. - "char" can be unsigned by default - on some platforms. - */ - if (((int8)b[0]) >= 0) - { - /* Single byte ascii character */ - b++; - } - else if (iscp932head((uchar)*b) && (e-b)>1 && iscp932tail((uchar)b[1])) - { - /* Double byte character */ - b+= 2; - } - else if (((uchar)*b) >= 0xA1 && ((uchar)*b) <= 0xDF) - { - /* Half width kana */ - b++; - } - else - { - /* Wrong byte sequence */ - *error= 1; - break; - } - } - return (size_t) (b - b0); -} - - -static MY_COLLATION_HANDLER my_collation_ci_handler = -{ - NULL, /* init */ - my_strnncoll_cp932, - my_strnncollsp_cp932, - my_strnxfrm_mb, - my_strnxfrmlen_simple, - my_like_range_cp932, - my_wildcmp_mb, /* wildcmp */ - my_strcasecmp_8bit, - my_instr_mb, - my_hash_sort_simple, - my_propagate_simple -}; - - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - ismbchar_cp932, - mbcharlen_cp932, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_cp932, - my_lengthsp_8bit, - my_numcells_cp932, - my_mb_wc_cp932, /* mb_wc */ - my_wc_mb_cp932, /* wc_mb */ - my_mb_ctype_mb, - my_caseup_str_8bit, - my_casedn_str_8bit, - my_caseup_8bit, - my_casedn_8bit, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - -CHARSET_INFO my_charset_cp932_japanese_ci= -{ - 95,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */ - "cp932", /* cs name */ - "cp932_japanese_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp932, - to_lower_cp932, - to_upper_cp932, - sort_order_cp932, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 1, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_ci_handler -}; - -CHARSET_INFO my_charset_cp932_bin= -{ - 96,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT, /* state */ - "cp932", /* cs name */ - "cp932_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp932, - to_lower_cp932, - to_upper_cp932, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 1, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_mb_bin_handler -}; - -#endif diff --git a/externals/mysql/strings/ctype-czech.c b/externals/mysql/strings/ctype-czech.c deleted file mode 100644 index 73d03e94ff..0000000000 --- a/externals/mysql/strings/ctype-czech.c +++ /dev/null @@ -1,813 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - File strings/ctype-czech.c for MySQL. - - This file implements the Czech sorting for the MySQL database - server (www.mysql.com). Due to some complicated rules the - Czech language has for sorting strings, a more complex - solution was needed than the one-to-one conversion table. To - note a few, here is an example of a Czech sorting sequence: - - co < hlaska < hláska < hlava < chlapec < krtek - - It because some of the rules are: double char 'ch' is sorted - between 'h' and 'i'. Accented character 'á' (a with acute) is - sorted after 'a' and before 'b', but only if the word is - otherwise the same. However, because 's' is sorted before 'v' - in hlava, the accentness of 'á' is overridden. There are many - more rules. - - This file defines functions my_strxfrm and my_strcoll for - C-like zero terminated strings and my_strnxfrm and my_strnncoll - for strings where the length comes as an parameter. Also - defined here you will find function my_like_range that returns - index range strings for LIKE expression and the - MY_STRXFRM_MULTIPLY set to value 4 -- this is the ratio the - strings grows during my_strxfrm. The algorithm has four - passes, that's why we need four times more space for expanded - string. - - This file also contains the ISO-Latin-2 definitions of - characters. - - Author: (c) 1997--1998 Jan Pazdziora, adelton@fi.muni.cz - Jan Pazdziora has a shared copyright for this code - - The original of this file can also be found at - http://www.fi.muni.cz/~adelton/l10n/ - - Bug reports and suggestions are always welcome. -*/ - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. strxfrm_multiply_czech=4 - */ - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_latin2 - -/* - These are four tables for four passes of the algorithm. Please see - below for what are the "special values" -*/ - -static const uchar *CZ_SORT_TABLE[]= -{ - (const uchar*) - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x42\x43\x44\x45\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x47\x58\x5C\x6A\x77\x6B\x69\x5B\x5E\x5F\x66\x6E\x55\x54\x5A\x67" - "\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x57\x56\x71\x72\x73\x59" - "\x65\x82\x83\xFF\x86\x87\x88\x89\x8A\x8C\x8D\x8E\x8F\x90\x91\x92" - "\x94\x95\x96\x98\x9A\x9B\x9D\x9E\x9F\xA0\xA1\x60\x68\x61\x4B\x52" - "\x49\x82\x83\xFF\x86\x87\x88\x89\x8A\x8C\x8D\x8E\x8F\x90\x91\x92" - "\x94\x95\x96\x98\x9A\x9B\x9D\x9E\x9F\xA0\xA1\x62\x74\x63\x75\x00" - "\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x48\x82\x4C\x8F\x76\x8F\x98\x64\x4E\x99\x98\x9A\xA1\x53\xA2\xA1" - "\x6D\x82\x51\x8F\x4A\x8F\x98\x6C\x50\x99\x98\x9A\xA1\x4F\xA2\xA1" - "\x96\x82\x82\x82\x82\x8F\x84\x84\x85\x87\x87\x87\x87\x8C\x8C\x86" - "\x86\x91\x91\x92\x92\x92\x92\x70\x97\x9B\x9B\x9B\x9B\xA0\x9A\x98" - "\x96\x82\x82\x82\x82\x8F\x84\x84\x85\x87\x87\x87\x87\x8C\x8C\x86" - "\x86\x91\x91\x92\x92\x92\x92\x6F\x97\x9B\x9B\x9B\x9B\xA0\x9A\x4D", - - (const uchar*) - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x20\x20\x20\x20\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" - "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" - "\x20\x20\x20\xFF\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" - "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" - "\x20\x20\x20\xFF\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" - "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x00" - "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x20\x2B\x20\x2C\x20\x25\x22\x20\x20\x25\x2A\x25\x22\x20\x25\x29" - "\x20\x2B\x20\x2C\x20\x25\x22\x20\x20\x25\x2A\x25\x22\x20\x25\x29" - "\x22\x22\x24\x23\x27\x22\x22\x2A\x25\x22\x2B\x47\x25\x22\x24\x25" - "\x2C\x22\x25\x22\x24\x28\x27\x20\x25\x26\x22\x28\x27\x22\x2A\x21" - "\x22\x22\x24\x23\x27\x22\x22\x2A\x25\x22\x2B\x47\x25\x22\x24\x25" - "\x2C\x22\x25\x22\x24\x28\x27\x20\x25\x26\x22\x28\x27\x22\x2A\x20", - - - (const uchar*) - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x03\x03\x03\x03\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" - "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" - "\x03\x05\x05\xFF\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05" - "\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x03\x03\x03\x03\x03" - "\x03\x03\x03\xFF\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" - "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x00" - "\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x1B\x05\x03\x05\x03\x05\x05\x03\x03\x05\x05\x05\x05\x03\x05\x05" - "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" - "\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05" - "\x05\x05\x05\x05\x05\x05\x05\x03\x05\x05\x05\x05\x05\x05\x05\x03" - "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" - "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03", - - (const uchar*) - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F" - "\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F" - "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F" - "\x40\x41\x42\xFF\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F" - "\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F" - "\x60\x61\x62\xFF\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F" - "\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F" - "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F" - "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F" - "\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF" - "\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF" - "\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF" - "\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF" - "\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF" - "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" -}; - -/* - These define the values for the double chars that need to be - sorted as they were single characters -- in Czech these are - 'ch', 'Ch' and 'CH'. -*/ - -struct wordvalue -{ - const uchar *word; - const uchar *outvalue; -}; - -static struct wordvalue doubles[]= -{ - { "ch", (const uchar*) "\x8B\x20\x03\x63" }, - { "Ch", (const uchar*) "\x8B\x20\x04\x43" }, - { "CH", (const uchar*) "\x8B\x20\x05\x43" }, - { "c", (const uchar*) "\x84\x20\x03\x63" }, - { "C", (const uchar*) "\x84\x20\x05\x43" }, -}; - - -/* - Define "auto" space character, - which is used while processing "PAD SPACE" rule, - when one string is shorter than another string. - "Auto" space character is lower than a real space - character on the third level. -*/ -static const uchar *virtual_space= "\x47\x20\x02\x20"; - -/* - Original comments from the contributor: - - Informal description of the algorithm: - - We walk the string left to right. - - The end of the string is either passed as parameter, or is - *p == 0. This is hidden in the IS_END macro. - - In the first two passes, we compare word by word. So we make - first and second pass on the first word, first and second pass - on the second word, etc. If we come to the end of the string - during the first pass, we need to jump to the last word of the - second pass. - - End of pass is marked with value 1 on the output. - - For each character, we read it's value from the table. - - If the value is ignore (0), we go straight to the next character. - - If the value is space/end of word (2) and we are in the first - or second pass, we skip all characters having value 0 -- 2 and - switch the pass. - - If it's the compose character (255), we check if the double - exists behind it, find its value. - - We append 0 to the end. - - Neformální popis algoritmu: - - procházíme øetìzec zleva doprava - konec øetìzce poznáme podle *p == 0 - pokud jsme do¹li na konec øetìzce pøi prùchodu 0, nejdeme na - zaèátek, ale na ulo¾enou pozici, proto¾e první a druhý - prùchod bì¾í souèasnì - konec vstupu (prùchodu) oznaèíme na výstupu hodnotou 1 - - naèteme hodnotu z tøídící tabulky - jde-li o hodnotu ignorovat (0), skoèíme na dal¹í prùchod - jde-li o hodnotu konec slova (2) a je to prùchod 0 nebo 1, - pøeskoèíme v¹echny dal¹í 0 -- 2 a prohodíme - prùchody - jde-li o kompozitní znak (255), otestujeme, zda následuje - správný do dvojice, dohledáme správnou hodnotu - - na konci pøipojíme znak 0 -*/ - -/* - In March 2007 latin2_czech_cs was reworked by Alexander Barkov, - to suite other MySQL collations better, and to be Falcon compatible. - - Changes: - - Discarded word-by-word comparison on the primary and the secondary level. - Comparison is now strictly done level-by-level - (like the Unicode Collation Algorithm (UCA) does). - - - Character weights were derived from Unicode 5.0.0 standard. - This is to make order of punctuation characters and digits - more consistent with all other MySQL collations and UCA. - - The order is now: - - Controls, spaces, punctuations, digits, letters. - - It previously used to be: - - Punctuations, controls, some more punctuations, letters, digits. - - NOTE: - - A minor difference between this implementations and the UCA: - - German "LATIN SMALL LETTER SHARP S" does not expand to "ss". - It is instead considered as secondary greater than "LATIN LETTER S", - and thus sorted between "LATIN LETTER S" and "LATIN LETTER S WITH ACUTE". - This allows to reduce *twice* disk space required for un-indexed - ORDER BY (using the filesort method). - - As neither the original version of latin2_czech_cs - expanded "SHARP S" to "ss", nor "SHARP S" is a part of Czech alphabet, - this behavior should be ok. - - - Collation is now "PAD SPACE" like all other MySQL collations. - It ignores trailing spaces on primary and secondary level. - - - SPACE and TAB characters are not ignorable anymore. - Also, they have different weights on primary level, - like in all other MySQL collations: - - SELECT 'a\t' < 'a ' -- returns true - SELECT 'a\t' < 'a' -- returns true - - - Some other punctuation characters are not ignorable anymore, - for better compatibility with UCA and other MySQL collations. - -*/ - - -#define ADD_TO_RESULT(dest, len, totlen, value) \ -if ((totlen) < (len)) { dest[totlen] = value; } (totlen++); -#define IS_END(p, src, len) (((char *)p - (char *)src) >= (len)) - -/* - src - IN pointer to the beginning of the string - p - IN/OUT pointer to the current character being processed - pass - IN pass number [0..3] - 0 - primary level - 1 - secondary level - 2 - tertiary level - 3 - quarternary level - value - OUT the next weight value. - -1 is returned on end-of-line. - 1 is returned between levels ("level separator"). - Any value greater than 1 is a normal weight. - ml - IN a flag indicating whether to switch automatically - to the secondary level and higher levels, - or stop at the primary level. - ml=0 is used for prefix comparison. -*/ - -#define NEXT_CMP_VALUE(src, p, pass, value, len, ml) \ -while (1) \ -{ \ - if (IS_END(p, src, len)) \ - { \ - /* when we are at the end of string */ \ - /* return either -1 for end of string */ \ - /* or 1 for end of pass */ \ - \ - /* latin2_czech_cs WEIGHT_STRING() returns level */ \ - /* separators even for empty string: 01.01.01.00 */ \ - /* The another Czech collation (cp1250_czech_cs) */ \ - /* returns *empty* WEIGHT_STRING() for empty input.*/\ - /* This is why the below if(){}else{} code block */ \ - /* differs from the similar piece in */ \ - /* ctype-win1250.c */ \ - if (pass != 3 && ml) \ - { \ - p= src; \ - pass++; \ - value= 1; /* Level separator */ \ - } \ - else \ - { \ - value= -1; /* End-of-line marker*/ \ - } \ - break; \ - } \ - /* not at end of string */ \ - value = CZ_SORT_TABLE[pass][*p]; \ - if (value == 0 && pass < 3) \ - { p++; continue; } /* ignore value on levels 0,1,2 */ \ - if (value == 255) \ - { \ - int i; \ - for (i= 0; i < (int) array_elements(doubles); i++) \ - { \ - const char * pattern = doubles[i].word; \ - const char * q = (const char *) p; \ - int j = 0; \ - while (pattern[j]) \ - { \ - if (IS_END(q, src, len) || (*q != pattern[j])) \ - break; \ - j++; q++; \ - } \ - if (!(pattern[j])) \ - { \ - value = (int)(doubles[i].outvalue[pass]); \ - p= (const uchar *) q - 1; \ - break; \ - } \ - } \ - } \ - p++; \ - break; \ -} - -/* - Function strnncoll, actually strcoll, with Czech sorting, which expect - the length of the strings being specified -*/ - -static int my_strnncoll_czech(CHARSET_INFO *cs __attribute__((unused)), - const uchar *s1, size_t len1, - const uchar *s2, size_t len2, - my_bool s2_is_prefix) -{ - int v1, v2; - const uchar * p1, * p2; - int pass1= 0, pass2= 0; - - if (s2_is_prefix && len1 > len2) - len1=len2; - - p1= s1; - p2= s2; - - do - { - int diff; - NEXT_CMP_VALUE(s1, p1, pass1, v1, (int)len1, 1); - NEXT_CMP_VALUE(s2, p2, pass2, v2, (int)len2, 1); - if ((diff = v1 - v2)) - return diff; - } - while (v1 >= 0); - return 0; -} - - - -/* - Compare strings, ignore trailing spaces -*/ - -static int -my_strnncollsp_czech(CHARSET_INFO * cs __attribute__((unused)), - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference - __attribute__((unused))) -{ - int level; - - for (level= 0; level <= 3; level++) - { - const uchar *s1= s; - const uchar *t1= t; - - for (;;) - { - int sval, tval, diff; - NEXT_CMP_VALUE(s, s1, level, sval, (int) slen, 0); - NEXT_CMP_VALUE(t, t1, level, tval, (int) tlen, 0); - if (sval < 0) - { - sval= virtual_space[level]; - for (; tval >= 0 ;) - { - if ((diff= sval - tval)) - return diff; - NEXT_CMP_VALUE(t, t1, level, tval, (int) tlen, 0); - } - break; - } - else if (tval < 0) - { - tval= virtual_space[level]; - for (; sval >= 0 ;) - { - if ((diff= sval - tval)) - return diff; - NEXT_CMP_VALUE(s, s1, level, sval, (int) slen, 0); - } - break; - } - - if ((diff= sval - tval)) - return diff; - } - } - return 0; -} - - -/* - Returns the number of bytes required for strnxfrm(). -*/ -static size_t -my_strnxfrmlen_czech(CHARSET_INFO *cs __attribute__((unused)), size_t len) -{ - return len * 4 + 4; -} - - -/* - Function strnxfrm, actually strxfrm, with Czech sorting, which expect - the length of the strings being specified -*/ -static size_t -my_strnxfrm_czech(CHARSET_INFO * cs __attribute__((unused)), - uchar *dst, size_t dstlen, uint nweights_arg, - const uchar *src, size_t srclen, uint flags) -{ - uint level; - uchar *dst0= dst; - uchar *de= dst + dstlen; - - if (!(flags & 0x0F)) /* All levels by default */ - flags|= 0x0F; - - for (level= 0; level <= 3; level++) - { - if (flags & (1 << level)) - { - uint nweights= nweights_arg; - const uchar *p= src; - int value; - uchar *dstl= dst; - - for (; dst < de && nweights; nweights--) - { - NEXT_CMP_VALUE(src, p, level, value, (int) srclen, 0); - if (value < 0) - break; - *dst++= value; - } - - if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) - { - uint pad_length= de - dst; - set_if_smaller(pad_length, nweights); - /* fill with weight for space character */ - bfill(dst, pad_length, virtual_space[level]); - dst+= pad_length; - } - - my_strxfrm_desc_and_reverse(dstl, dst, flags, level); - - /* Add level delimiter */ - if (dst < de) - *dst++= level < 3 ? 1 : 0; - } - } - if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) - { - uint fill_length= de - dst; - cs->cset->fill(cs, (char*) dst, fill_length, 0); - dst= de; - } - return dst - dst0; -} - - -#undef IS_END - - -/* - */ - - -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -#define min_sort_char 0x00 -#define max_sort_char 0xAE - - -static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, char *min_str, - char *max_str, - size_t *min_length,size_t *max_length) -{ - uchar value; - const char *end=ptr+ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - - for (; ptr != end && min_str != min_end ; ptr++) - { - if (*ptr == w_one) /* '_' in SQL */ - { break; } - if (*ptr == w_many) /* '%' in SQL */ - { break; } - - if (*ptr == escape && ptr+1 != end) - { ptr++; } /* Skip escape */ - - value = CZ_SORT_TABLE[0][(int) (uchar) *ptr]; - - if (value == 0) /* Ignore in the first pass */ - { continue; } - if (value <= 2) /* End of pass or end of string */ - { break; } - if (value == 255) /* Double char too compicated */ - { break; } - - *min_str++= *max_str++ = *ptr; - } - - if (cs->state & MY_CS_BINSORT) - *min_length= (size_t) (min_str - min_org); - else - { - /* 'a\0\0... is the smallest possible string */ - *min_length= res_length; - } - /* a\ff\ff... is the biggest possible string */ - *max_length= res_length; - - while (min_str != min_end) - { - *min_str++ = min_sort_char; /* Because of key compression */ - *max_str++ = max_sort_char; - } - return 0; -} - - -/* - * File generated by cset - * (C) Abandoned 1997 Zarko Mocnik - * - * definition table reworked by Jaromir Dolecek - */ - -static uchar NEAR ctype_czech[257] = { -0, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16, - 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, - 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 72, - 1, 16, 1, 16, 1, 1, 16, 0, 0, 1, 1, 1, 1, 16, 1, 1, - 16, 2, 16, 2, 16, 2, 2, 16, 16, 2, 2, 2, 2, 16, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 16, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 16, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 16, -}; - -static uchar NEAR to_lower_czech[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, -112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95, - 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, -112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, -128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, -144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, -177,161,179,163,181,182,166,167,168,185,186,187,188,173,190,191, -176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, -224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, -208,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223, -224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, -240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255, -}; - -static uchar NEAR to_upper_czech[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127, -128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, -144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, -160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, -176,160,178,162,180,164,165,183,184,169,170,171,172,189,174,175, -192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, -208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, -192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, -240,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255, -}; - -static uchar NEAR sort_order_czech[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 71, 72, 76, 78, 83, 84, 85, 86, 90, 91, 92, 96, 97,100, -105,106,107,110,114,117,122,123,124,125,127,131,132,133,134,135, -136, 65, 71, 72, 76, 78, 83, 84, 85, 86, 90, 91, 92, 96, 97,100, -105,106,107,110,114,117,122,123,124,125,127,137,138,139,140, 0, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,255, - 66,255, 93,255, 94,111,255,255,255,112,113,115,128,255,129,130, -255, 66,255, 93,255, 94,111,255,255,112,113,115,128,255,129,130, -108, 67, 68, 69, 70, 95, 73, 75, 74, 79, 81, 82, 80, 89, 87, 77, -255, 98, 99,101,102,103,104,255,109,119,118,120,121,126,116,255, -108, 67, 68, 69, 70, 95, 73, 75, 74, 79, 81, 82, 80, 89, 88, 77, -255, 98, 99,101,102,103,104,255,109,119,118,120,121,126,116,255, -}; - -static uint16 tab_8859_2_uni[256]={ - 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7, -0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B, -0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7, -0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - - -/* 0000-00FD , 254 chars */ -static uchar tab_uni_8859_2_plane00[]={ -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0xA0,0x00,0x00,0x00,0xA4,0x00,0x00,0xA7,0xA8,0x00,0x00,0x00,0x00,0xAD,0x00,0x00, -0xB0,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0xC1,0xC2,0x00,0xC4,0x00,0x00,0xC7,0x00,0xC9,0x00,0xCB,0x00,0xCD,0xCE,0x00, -0x00,0x00,0x00,0xD3,0xD4,0x00,0xD6,0xD7,0x00,0x00,0xDA,0x00,0xDC,0xDD,0x00,0xDF, -0x00,0xE1,0xE2,0x00,0xE4,0x00,0x00,0xE7,0x00,0xE9,0x00,0xEB,0x00,0xED,0xEE,0x00, -0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD}; - -/* 0102-017E , 125 chars */ -static uchar tab_uni_8859_2_plane01[]={ -0xC3,0xE3,0xA1,0xB1,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0, -0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC5,0xE5,0x00,0x00,0xA5,0xB5,0x00,0x00,0xA3, -0xB3,0xD1,0xF1,0x00,0x00,0xD2,0xF2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD5,0xF5, -0x00,0x00,0xC0,0xE0,0x00,0x00,0xD8,0xF8,0xA6,0xB6,0x00,0x00,0xAA,0xBA,0xA9,0xB9, -0xDE,0xFE,0xAB,0xBB,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD9,0xF9,0xDB,0xFB, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xBC,0xAF,0xBF,0xAE,0xBE}; - -/* 02C7-02DD , 23 chars */ -static uchar tab_uni_8859_2_plane02[]={ -0xB7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD}; - -static MY_UNI_IDX idx_uni_8859_2[]={ - {0x0000,0x00FD,tab_uni_8859_2_plane00}, - {0x0102,0x017E,tab_uni_8859_2_plane01}, - {0x02C7,0x02DD,tab_uni_8859_2_plane02}, - {0,0,NULL} -}; - - -static MY_COLLATION_HANDLER my_collation_latin2_czech_ci_handler = -{ - NULL, /* init */ - my_strnncoll_czech, - my_strnncollsp_czech, - my_strnxfrm_czech, - my_strnxfrmlen_czech, - my_like_range_czech, - my_wildcmp_bin, - my_strcasecmp_8bit, - my_instr_simple, - my_hash_sort_simple, - my_propagate_simple -}; - -CHARSET_INFO my_charset_latin2_czech_ci = -{ - 2,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT, /* state */ - "latin2", /* cs name */ - "latin2_czech_cs", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_czech, - to_lower_czech, - to_upper_czech, - sort_order_czech, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - tab_8859_2_uni, /* tab_to_uni */ - idx_uni_8859_2, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 4, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 0, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 4, /* levels_for_compare */ - 4, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_latin2_czech_ci_handler -}; - -#endif diff --git a/externals/mysql/strings/ctype-euc_kr.c b/externals/mysql/strings/ctype-euc_kr.c deleted file mode 100644 index 39a5649ac7..0000000000 --- a/externals/mysql/strings/ctype-euc_kr.c +++ /dev/null @@ -1,8810 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - * This file is for Korean EUC charset, and created by powerm90@tinc.co.kr. - * and updated by mrpark@tinc.co.kr. - */ - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. mbmaxlen_euc_kr=2 - */ - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_euckr - - -static uchar NEAR ctype_euc_kr[257] = -{ - 0, /* For standard library */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ - 0040, 0050, 0050, 0050, 0050, 0050, 0040, 0040, /* ^H - ^O */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^P - ^W */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^X - ^Z ^[ ^\ ^] ^^ ^_ */ - 0110, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* SPC ! " # $ % ^ ' */ - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* ( ) * + , - . / */ - 0204, 0204, 0204, 0204, 0204, 0204, 0204, 0204, /* 0 1 2 3 4 5 6 7 */ - 0204, 0204, 0020, 0020, 0020, 0020, 0020, 0020, /* 8 9 : ; < = > ? */ - 0020, 0201, 0201, 0201, 0201, 0201, 0201, 0001, /* @ A B C D E F G */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* H I J K L M N O */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* P Q R S T U V W */ - 0001, 0001, 0001, 0020, 0020, 0020, 0020, 0020, /* X Y Z [ \ ] ^ _ */ - 0020, 0202, 0202, 0202, 0202, 0202, 0202, 0002, /* ` a b c d e f g */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* h i j k l m n o */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* p q r s t u v w */ - 0002, 0002, 0002, 0020, 0020, 0020, 0020, 0040, /* x y z { | } + DEL */ - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000, -}; - -static uchar NEAR to_lower_euc_kr[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '[', '\\', ']', '^', '_', - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR to_upper_euc_kr[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR sort_order_euc_kr[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -/* Support for Korean(EUC_KR) characters, by powerm90@tinc.co.kr and mrpark@tinc.co.kr */ - -/* - Unicode mapping is done according to: - ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/KSC/KSC5601.TXT - - Valid multi-byte characters: - - [A1..FE][41..5A,61..7A,81..FE] - - Note, 0x5C is not a valid MB tail, - so escape_with_backslash_is_dangerous is not set. -*/ - -#define iseuc_kr_head(c) ((0xa1<=(uchar)(c) && (uchar)(c)<=0xfe)) - -#define iseuc_kr_tail1(c) ((uchar) (c) >= 0x41 && (uchar) (c) <= 0x5A) -#define iseuc_kr_tail2(c) ((uchar) (c) >= 0x61 && (uchar) (c) <= 0x7A) -#define iseuc_kr_tail3(c) ((uchar) (c) >= 0x81 && (uchar) (c) <= 0xFE) - -#define iseuc_kr_tail(c) (iseuc_kr_tail1(c) || \ - iseuc_kr_tail2(c) || \ - iseuc_kr_tail3(c)) - - -static uint ismbchar_euc_kr(CHARSET_INFO *cs __attribute__((unused)), - const char* p, const char *e) -{ - return ((*(uchar*)(p)<0x80)? 0:\ - iseuc_kr_head(*(p)) && (e)-(p)>1 && iseuc_kr_tail(*((p)+1))? 2:\ - 0); -} - -static uint mbcharlen_euc_kr(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return (iseuc_kr_head(c) ? 2 : 1); -} - - -/* page 0 0x8141-0xC8FE */ -static uint16 tab_ksc5601_uni0[]={ -0xAC02,0xAC03,0xAC05,0xAC06,0xAC0B,0xAC0C,0xAC0D,0xAC0E, -0xAC0F,0xAC18,0xAC1E,0xAC1F,0xAC21,0xAC22,0xAC23,0xAC25, -0xAC26,0xAC27,0xAC28,0xAC29,0xAC2A,0xAC2B,0xAC2E,0xAC32, -0xAC33,0xAC34, 0, 0, 0, 0, 0, 0, -0xAC35,0xAC36,0xAC37,0xAC3A,0xAC3B,0xAC3D,0xAC3E,0xAC3F, -0xAC41,0xAC42,0xAC43,0xAC44,0xAC45,0xAC46,0xAC47,0xAC48, -0xAC49,0xAC4A,0xAC4C,0xAC4E,0xAC4F,0xAC50,0xAC51,0xAC52, -0xAC53,0xAC55, 0, 0, 0, 0, 0, 0, -0xAC56,0xAC57,0xAC59,0xAC5A,0xAC5B,0xAC5D,0xAC5E,0xAC5F, -0xAC60,0xAC61,0xAC62,0xAC63,0xAC64,0xAC65,0xAC66,0xAC67, -0xAC68,0xAC69,0xAC6A,0xAC6B,0xAC6C,0xAC6D,0xAC6E,0xAC6F, -0xAC72,0xAC73,0xAC75,0xAC76,0xAC79,0xAC7B,0xAC7C,0xAC7D, -0xAC7E,0xAC7F,0xAC82,0xAC87,0xAC88,0xAC8D,0xAC8E,0xAC8F, -0xAC91,0xAC92,0xAC93,0xAC95,0xAC96,0xAC97,0xAC98,0xAC99, -0xAC9A,0xAC9B,0xAC9E,0xACA2,0xACA3,0xACA4,0xACA5,0xACA6, -0xACA7,0xACAB,0xACAD,0xACAE,0xACB1,0xACB2,0xACB3,0xACB4, -0xACB5,0xACB6,0xACB7,0xACBA,0xACBE,0xACBF,0xACC0,0xACC2, -0xACC3,0xACC5,0xACC6,0xACC7,0xACC9,0xACCA,0xACCB,0xACCD, -0xACCE,0xACCF,0xACD0,0xACD1,0xACD2,0xACD3,0xACD4,0xACD6, -0xACD8,0xACD9,0xACDA,0xACDB,0xACDC,0xACDD,0xACDE,0xACDF, -0xACE2,0xACE3,0xACE5,0xACE6,0xACE9,0xACEB,0xACED,0xACEE, -0xACF2,0xACF4,0xACF7,0xACF8,0xACF9,0xACFA,0xACFB,0xACFE, -0xACFF,0xAD01,0xAD02,0xAD03,0xAD05,0xAD07,0xAD08,0xAD09, -0xAD0A,0xAD0B,0xAD0E,0xAD10,0xAD12,0xAD13, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xAD14,0xAD15,0xAD16,0xAD17,0xAD19,0xAD1A,0xAD1B,0xAD1D, -0xAD1E,0xAD1F,0xAD21,0xAD22,0xAD23,0xAD24,0xAD25,0xAD26, -0xAD27,0xAD28,0xAD2A,0xAD2B,0xAD2E,0xAD2F,0xAD30,0xAD31, -0xAD32,0xAD33, 0, 0, 0, 0, 0, 0, -0xAD36,0xAD37,0xAD39,0xAD3A,0xAD3B,0xAD3D,0xAD3E,0xAD3F, -0xAD40,0xAD41,0xAD42,0xAD43,0xAD46,0xAD48,0xAD4A,0xAD4B, -0xAD4C,0xAD4D,0xAD4E,0xAD4F,0xAD51,0xAD52,0xAD53,0xAD55, -0xAD56,0xAD57, 0, 0, 0, 0, 0, 0, -0xAD59,0xAD5A,0xAD5B,0xAD5C,0xAD5D,0xAD5E,0xAD5F,0xAD60, -0xAD62,0xAD64,0xAD65,0xAD66,0xAD67,0xAD68,0xAD69,0xAD6A, -0xAD6B,0xAD6E,0xAD6F,0xAD71,0xAD72,0xAD77,0xAD78,0xAD79, -0xAD7A,0xAD7E,0xAD80,0xAD83,0xAD84,0xAD85,0xAD86,0xAD87, -0xAD8A,0xAD8B,0xAD8D,0xAD8E,0xAD8F,0xAD91,0xAD92,0xAD93, -0xAD94,0xAD95,0xAD96,0xAD97,0xAD98,0xAD99,0xAD9A,0xAD9B, -0xAD9E,0xAD9F,0xADA0,0xADA1,0xADA2,0xADA3,0xADA5,0xADA6, -0xADA7,0xADA8,0xADA9,0xADAA,0xADAB,0xADAC,0xADAD,0xADAE, -0xADAF,0xADB0,0xADB1,0xADB2,0xADB3,0xADB4,0xADB5,0xADB6, -0xADB8,0xADB9,0xADBA,0xADBB,0xADBC,0xADBD,0xADBE,0xADBF, -0xADC2,0xADC3,0xADC5,0xADC6,0xADC7,0xADC9,0xADCA,0xADCB, -0xADCC,0xADCD,0xADCE,0xADCF,0xADD2,0xADD4,0xADD5,0xADD6, -0xADD7,0xADD8,0xADD9,0xADDA,0xADDB,0xADDD,0xADDE,0xADDF, -0xADE1,0xADE2,0xADE3,0xADE5,0xADE6,0xADE7,0xADE8,0xADE9, -0xADEA,0xADEB,0xADEC,0xADED,0xADEE,0xADEF,0xADF0,0xADF1, -0xADF2,0xADF3,0xADF4,0xADF5,0xADF6,0xADF7, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xADFA,0xADFB,0xADFD,0xADFE,0xAE02,0xAE03,0xAE04,0xAE05, -0xAE06,0xAE07,0xAE0A,0xAE0C,0xAE0E,0xAE0F,0xAE10,0xAE11, -0xAE12,0xAE13,0xAE15,0xAE16,0xAE17,0xAE18,0xAE19,0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D,0xAFFE,0xAFFF, -0xB002,0xB003, 0, 0, 0, 0, 0, 0, -0xB005,0xB006,0xB007,0xB008,0xB009,0xB00A,0xB00B,0xB00D, -0xB00E,0xB00F,0xB011,0xB012,0xB013,0xB015,0xB016,0xB017, -0xB018,0xB019,0xB01A,0xB01B,0xB01E,0xB01F,0xB020,0xB021, -0xB022,0xB023,0xB024,0xB025,0xB026,0xB027,0xB029,0xB02A, -0xB02B,0xB02C,0xB02D,0xB02E,0xB02F,0xB030,0xB031,0xB032, -0xB033,0xB034,0xB035,0xB036,0xB037,0xB038,0xB039,0xB03A, -0xB03B,0xB03C,0xB03D,0xB03E,0xB03F,0xB040,0xB041,0xB042, -0xB043,0xB046,0xB047,0xB049,0xB04B,0xB04D,0xB04F,0xB050, -0xB051,0xB052,0xB056,0xB058,0xB05A,0xB05B,0xB05C,0xB05E, -0xB05F,0xB060,0xB061,0xB062,0xB063,0xB064,0xB065,0xB066, -0xB067,0xB068,0xB069,0xB06A,0xB06B,0xB06C,0xB06D,0xB06E, -0xB06F,0xB070,0xB071,0xB072,0xB073,0xB074,0xB075,0xB076, -0xB077,0xB078,0xB079,0xB07A,0xB07B,0xB07E,0xB07F,0xB081, -0xB082,0xB083,0xB085,0xB086,0xB087,0xB088,0xB089,0xB08A, -0xB08B,0xB08E,0xB090,0xB092,0xB093,0xB094,0xB095,0xB096, -0xB097,0xB09B,0xB09D,0xB09E,0xB0A3,0xB0A4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB0A5,0xB0A6,0xB0A7,0xB0AA,0xB0B0,0xB0B2,0xB0B6,0xB0B7, -0xB0B9,0xB0BA,0xB0BB,0xB0BD,0xB0BE,0xB0BF,0xB0C0,0xB0C1, -0xB0C2,0xB0C3,0xB0C6,0xB0CA,0xB0CB,0xB0CC,0xB0CD,0xB0CE, -0xB0CF,0xB0D2, 0, 0, 0, 0, 0, 0, -0xB0D3,0xB0D5,0xB0D6,0xB0D7,0xB0D9,0xB0DA,0xB0DB,0xB0DC, -0xB0DD,0xB0DE,0xB0DF,0xB0E1,0xB0E2,0xB0E3,0xB0E4,0xB0E6, -0xB0E7,0xB0E8,0xB0E9,0xB0EA,0xB0EB,0xB0EC,0xB0ED,0xB0EE, -0xB0EF,0xB0F0, 0, 0, 0, 0, 0, 0, -0xB0F1,0xB0F2,0xB0F3,0xB0F4,0xB0F5,0xB0F6,0xB0F7,0xB0F8, -0xB0F9,0xB0FA,0xB0FB,0xB0FC,0xB0FD,0xB0FE,0xB0FF,0xB100, -0xB101,0xB102,0xB103,0xB104,0xB105,0xB106,0xB107,0xB10A, -0xB10D,0xB10E,0xB10F,0xB111,0xB114,0xB115,0xB116,0xB117, -0xB11A,0xB11E,0xB11F,0xB120,0xB121,0xB122,0xB126,0xB127, -0xB129,0xB12A,0xB12B,0xB12D,0xB12E,0xB12F,0xB130,0xB131, -0xB132,0xB133,0xB136,0xB13A,0xB13B,0xB13C,0xB13D,0xB13E, -0xB13F,0xB142,0xB143,0xB145,0xB146,0xB147,0xB149,0xB14A, -0xB14B,0xB14C,0xB14D,0xB14E,0xB14F,0xB152,0xB153,0xB156, -0xB157,0xB159,0xB15A,0xB15B,0xB15D,0xB15E,0xB15F,0xB161, -0xB162,0xB163,0xB164,0xB165,0xB166,0xB167,0xB168,0xB169, -0xB16A,0xB16B,0xB16C,0xB16D,0xB16E,0xB16F,0xB170,0xB171, -0xB172,0xB173,0xB174,0xB175,0xB176,0xB177,0xB17A,0xB17B, -0xB17D,0xB17E,0xB17F,0xB181,0xB183,0xB184,0xB185,0xB186, -0xB187,0xB18A,0xB18C,0xB18E,0xB18F,0xB190,0xB191,0xB195, -0xB196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xB226,0xB227,0xB228,0xB229, -0xB22A,0xB22B,0xB22C,0xB22D,0xB22E,0xB22F,0xB230,0xB231, -0xB232,0xB233,0xB235,0xB236,0xB237,0xB238,0xB239,0xB23A, -0xB23B,0xB23D,0xB23E,0xB23F,0xB240,0xB241,0xB242,0xB243, -0xB244,0xB245,0xB246,0xB247,0xB248,0xB249,0xB24A,0xB24B, -0xB24C,0xB24D,0xB24E,0xB24F,0xB250,0xB251,0xB252,0xB253, -0xB254,0xB255,0xB256,0xB257,0xB259,0xB25A,0xB25B,0xB25D, -0xB25E,0xB25F,0xB261,0xB262,0xB263,0xB264,0xB265,0xB266, -0xB267,0xB26A,0xB26B,0xB26C,0xB26D,0xB26E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB26F,0xB270,0xB271,0xB272,0xB273,0xB276,0xB277,0xB278, -0xB279,0xB27A,0xB27B,0xB27D,0xB27E,0xB27F,0xB280,0xB281, -0xB282,0xB283,0xB286,0xB287,0xB288,0xB28A,0xB28B,0xB28C, -0xB28D,0xB28E, 0, 0, 0, 0, 0, 0, -0xB28F,0xB292,0xB293,0xB295,0xB296,0xB297,0xB29B,0xB29C, -0xB29D,0xB29E,0xB29F,0xB2A2,0xB2A4,0xB2A7,0xB2A8,0xB2A9, -0xB2AB,0xB2AD,0xB2AE,0xB2AF,0xB2B1,0xB2B2,0xB2B3,0xB2B5, -0xB2B6,0xB2B7, 0, 0, 0, 0, 0, 0, -0xB2B8,0xB2B9,0xB2BA,0xB2BB,0xB2BC,0xB2BD,0xB2BE,0xB2BF, -0xB2C0,0xB2C1,0xB2C2,0xB2C3,0xB2C4,0xB2C5,0xB2C6,0xB2C7, -0xB2CA,0xB2CB,0xB2CD,0xB2CE,0xB2CF,0xB2D1,0xB2D3,0xB2D4, -0xB2D5,0xB2D6,0xB2D7,0xB2DA,0xB2DC,0xB2DE,0xB2DF,0xB2E0, -0xB2E1,0xB2E3,0xB2E7,0xB2E9,0xB2EA,0xB2F0,0xB2F1,0xB2F2, -0xB2F6,0xB2FC,0xB2FD,0xB2FE,0xB302,0xB303,0xB305,0xB306, -0xB307,0xB309,0xB30A,0xB30B,0xB30C,0xB30D,0xB30E,0xB30F, -0xB312,0xB316,0xB317,0xB318,0xB319,0xB31A,0xB31B,0xB31D, -0xB31E,0xB31F,0xB320,0xB321,0xB322,0xB323,0xB324,0xB325, -0xB326,0xB327,0xB328,0xB329,0xB32A,0xB32B,0xB32C,0xB32D, -0xB32E,0xB32F,0xB330,0xB331,0xB332,0xB333,0xB334,0xB335, -0xB336,0xB337,0xB338,0xB339,0xB33A,0xB33B,0xB33C,0xB33D, -0xB33E,0xB33F,0xB340,0xB341,0xB342,0xB343,0xB344,0xB345, -0xB346,0xB347,0xB348,0xB349,0xB34A,0xB34B,0xB34C,0xB34D, -0xB34E,0xB34F,0xB350,0xB351,0xB352,0xB353,0xB357,0xB359, -0xB35A,0xB35D,0xB360,0xB361,0xB362,0xB363, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB366,0xB368,0xB36A,0xB36C,0xB36D,0xB36F,0xB372,0xB373, -0xB375,0xB376,0xB377,0xB379,0xB37A,0xB37B,0xB37C,0xB37D, -0xB37E,0xB37F,0xB382,0xB386,0xB387,0xB388,0xB389,0xB38A, -0xB38B,0xB38D, 0, 0, 0, 0, 0, 0, -0xB38E,0xB38F,0xB391,0xB392,0xB393,0xB395,0xB396,0xB397, -0xB398,0xB399,0xB39A,0xB39B,0xB39C,0xB39D,0xB39E,0xB39F, -0xB3A2,0xB3A3,0xB3A4,0xB3A5,0xB3A6,0xB3A7,0xB3A9,0xB3AA, -0xB3AB,0xB3AD, 0, 0, 0, 0, 0, 0, -0xB3AE,0xB3AF,0xB3B0,0xB3B1,0xB3B2,0xB3B3,0xB3B4,0xB3B5, -0xB3B6,0xB3B7,0xB3B8,0xB3B9,0xB3BA,0xB3BB,0xB3BC,0xB3BD, -0xB3BE,0xB3BF,0xB3C0,0xB3C1,0xB3C2,0xB3C3,0xB3C6,0xB3C7, -0xB3C9,0xB3CA,0xB3CD,0xB3CF,0xB3D1,0xB3D2,0xB3D3,0xB3D6, -0xB3D8,0xB3DA,0xB3DC,0xB3DE,0xB3DF,0xB3E1,0xB3E2,0xB3E3, -0xB3E5,0xB3E6,0xB3E7,0xB3E9,0xB3EA,0xB3EB,0xB3EC,0xB3ED, -0xB3EE,0xB3EF,0xB3F0,0xB3F1,0xB3F2,0xB3F3,0xB3F4,0xB3F5, -0xB3F6,0xB3F7,0xB3F8,0xB3F9,0xB3FA,0xB3FB,0xB3FD,0xB3FE, -0xB3FF,0xB400,0xB401,0xB402,0xB403,0xB404,0xB405,0xB406, -0xB407,0xB408,0xB409,0xB40A,0xB40B,0xB40C,0xB40D,0xB40E, -0xB40F,0xB411,0xB412,0xB413,0xB414,0xB415,0xB416,0xB417, -0xB419,0xB41A,0xB41B,0xB41D,0xB41E,0xB41F,0xB421,0xB422, -0xB423,0xB424,0xB425,0xB426,0xB427,0xB42A,0xB42C,0xB42D, -0xB42E,0xB42F,0xB430,0xB431,0xB432,0xB433,0xB435,0xB436, -0xB437,0xB438,0xB439,0xB43A,0xB43B,0xB43C,0xB43D,0xB43E, -0xB43F,0xB440,0xB441,0xB442,0xB443,0xB444, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB445,0xB446,0xB447,0xB448,0xB449,0xB44A,0xB44B,0xB44C, -0xB44D,0xB44E,0xB44F,0xB452,0xB453,0xB455,0xB456,0xB457, -0xB459,0xB45A,0xB45B,0xB45C,0xB45D,0xB45E,0xB45F,0xB462, -0xB464,0xB466, 0, 0, 0, 0, 0, 0, -0xB467,0xB468,0xB469,0xB46A,0xB46B,0xB46D,0xB46E,0xB46F, -0xB470,0xB471,0xB472,0xB473,0xB474,0xB475,0xB476,0xB477, -0xB478,0xB479,0xB47A,0xB47B,0xB47C,0xB47D,0xB47E,0xB47F, -0xB481,0xB482, 0, 0, 0, 0, 0, 0, -0xB483,0xB484,0xB485,0xB486,0xB487,0xB489,0xB48A,0xB48B, -0xB48C,0xB48D,0xB48E,0xB48F,0xB490,0xB491,0xB492,0xB493, -0xB494,0xB495,0xB496,0xB497,0xB498,0xB499,0xB49A,0xB49B, -0xB49C,0xB49E,0xB49F,0xB4A0,0xB4A1,0xB4A2,0xB4A3,0xB4A5, -0xB4A6,0xB4A7,0xB4A9,0xB4AA,0xB4AB,0xB4AD,0xB4AE,0xB4AF, -0xB4B0,0xB4B1,0xB4B2,0xB4B3,0xB4B4,0xB4B6,0xB4B8,0xB4BA, -0xB4BB,0xB4BC,0xB4BD,0xB4BE,0xB4BF,0xB4C1,0xB4C2,0xB4C3, -0xB4C5,0xB4C6,0xB4C7,0xB4C9,0xB4CA,0xB4CB,0xB4CC,0xB4CD, -0xB4CE,0xB4CF,0xB4D1,0xB4D2,0xB4D3,0xB4D4,0xB4D6,0xB4D7, -0xB4D8,0xB4D9,0xB4DA,0xB4DB,0xB4DE,0xB4DF,0xB4E1,0xB4E2, -0xB4E5,0xB4E7,0xB4E8,0xB4E9,0xB4EA,0xB4EB,0xB4EE,0xB4F0, -0xB4F2,0xB4F3,0xB4F4,0xB4F5,0xB4F6,0xB4F7,0xB4F9,0xB4FA, -0xB4FB,0xB4FC,0xB4FD,0xB4FE,0xB4FF,0xB500,0xB501,0xB502, -0xB503,0xB504,0xB505,0xB506,0xB507,0xB508,0xB509,0xB50A, -0xB50B,0xB50C,0xB50D,0xB50E,0xB50F,0xB510,0xB511,0xB512, -0xB513,0xB516,0xB517,0xB519,0xB51A,0xB51D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB51E,0xB51F,0xB520,0xB521,0xB522,0xB523,0xB526,0xB52B, -0xB52C,0xB52D,0xB52E,0xB52F,0xB532,0xB533,0xB535,0xB536, -0xB537,0xB539,0xB53A,0xB53B,0xB53C,0xB53D,0xB53E,0xB53F, -0xB542,0xB546, 0, 0, 0, 0, 0, 0, -0xB547,0xB548,0xB549,0xB54A,0xB54E,0xB54F,0xB551,0xB552, -0xB553,0xB555,0xB556,0xB557,0xB558,0xB559,0xB55A,0xB55B, -0xB55E,0xB562,0xB563,0xB564,0xB565,0xB566,0xB567,0xB568, -0xB569,0xB56A, 0, 0, 0, 0, 0, 0, -0xB56B,0xB56C,0xB56D,0xB56E,0xB56F,0xB570,0xB571,0xB572, -0xB573,0xB574,0xB575,0xB576,0xB577,0xB578,0xB579,0xB57A, -0xB57B,0xB57C,0xB57D,0xB57E,0xB57F,0xB580,0xB581,0xB582, -0xB583,0xB584,0xB585,0xB586,0xB587,0xB588,0xB589,0xB58A, -0xB58B,0xB58C,0xB58D,0xB58E,0xB58F,0xB590,0xB591,0xB592, -0xB593,0xB594,0xB595,0xB596,0xB597,0xB598,0xB599,0xB59A, -0xB59B,0xB59C,0xB59D,0xB59E,0xB59F,0xB5A2,0xB5A3,0xB5A5, -0xB5A6,0xB5A7,0xB5A9,0xB5AC,0xB5AD,0xB5AE,0xB5AF,0xB5B2, -0xB5B6,0xB5B7,0xB5B8,0xB5B9,0xB5BA,0xB5BE,0xB5BF,0xB5C1, -0xB5C2,0xB5C3,0xB5C5,0xB5C6,0xB5C7,0xB5C8,0xB5C9,0xB5CA, -0xB5CB,0xB5CE,0xB5D2,0xB5D3,0xB5D4,0xB5D5,0xB5D6,0xB5D7, -0xB5D9,0xB5DA,0xB5DB,0xB5DC,0xB5DD,0xB5DE,0xB5DF,0xB5E0, -0xB5E1,0xB5E2,0xB5E3,0xB5E4,0xB5E5,0xB5E6,0xB5E7,0xB5E8, -0xB5E9,0xB5EA,0xB5EB,0xB5ED,0xB5EE,0xB5EF,0xB5F0,0xB5F1, -0xB5F2,0xB5F3,0xB5F4,0xB5F5,0xB5F6,0xB5F7,0xB5F8,0xB5F9, -0xB5FA,0xB5FB,0xB5FC,0xB5FD,0xB5FE,0xB5FF, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB600,0xB601,0xB602,0xB603,0xB604,0xB605,0xB606,0xB607, -0xB608,0xB609,0xB60A,0xB60B,0xB60C,0xB60D,0xB60E,0xB60F, -0xB612,0xB613,0xB615,0xB616,0xB617,0xB619,0xB61A,0xB61B, -0xB61C,0xB61D, 0, 0, 0, 0, 0, 0, -0xB61E,0xB61F,0xB620,0xB621,0xB622,0xB623,0xB624,0xB626, -0xB627,0xB628,0xB629,0xB62A,0xB62B,0xB62D,0xB62E,0xB62F, -0xB630,0xB631,0xB632,0xB633,0xB635,0xB636,0xB637,0xB638, -0xB639,0xB63A, 0, 0, 0, 0, 0, 0, -0xB63B,0xB63C,0xB63D,0xB63E,0xB63F,0xB640,0xB641,0xB642, -0xB643,0xB644,0xB645,0xB646,0xB647,0xB649,0xB64A,0xB64B, -0xB64C,0xB64D,0xB64E,0xB64F,0xB650,0xB651,0xB652,0xB653, -0xB654,0xB655,0xB656,0xB657,0xB658,0xB659,0xB65A,0xB65B, -0xB65C,0xB65D,0xB65E,0xB65F,0xB660,0xB661,0xB662,0xB663, -0xB665,0xB666,0xB667,0xB669,0xB66A,0xB66B,0xB66C,0xB66D, -0xB66E,0xB66F,0xB670,0xB671,0xB672,0xB673,0xB674,0xB675, -0xB676,0xB677,0xB678,0xB679,0xB67A,0xB67B,0xB67C,0xB67D, -0xB67E,0xB67F,0xB680,0xB681,0xB682,0xB683,0xB684,0xB685, -0xB686,0xB687,0xB688,0xB689,0xB68A,0xB68B,0xB68C,0xB68D, -0xB68E,0xB68F,0xB690,0xB691,0xB692,0xB693,0xB694,0xB695, -0xB696,0xB697,0xB698,0xB699,0xB69A,0xB69B,0xB69E,0xB69F, -0xB6A1,0xB6A2,0xB6A3,0xB6A5,0xB6A6,0xB6A7,0xB6A8,0xB6A9, -0xB6AA,0xB6AD,0xB6AE,0xB6AF,0xB6B0,0xB6B2,0xB6B3,0xB6B4, -0xB6B5,0xB6B6,0xB6B7,0xB6B8,0xB6B9,0xB6BA,0xB6BB,0xB6BC, -0xB6BD,0xB6BE,0xB6BF,0xB6C0,0xB6C1,0xB6C2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB6C3,0xB6C4,0xB6C5,0xB6C6,0xB6C7,0xB6C8,0xB6C9,0xB6CA, -0xB6CB,0xB6CC,0xB6CD,0xB6CE,0xB6CF,0xB6D0,0xB6D1,0xB6D2, -0xB6D3,0xB6D5,0xB6D6,0xB6D7,0xB6D8,0xB6D9,0xB6DA,0xB6DB, -0xB6DC,0xB6DD, 0, 0, 0, 0, 0, 0, -0xB6DE,0xB6DF,0xB6E0,0xB6E1,0xB6E2,0xB6E3,0xB6E4,0xB6E5, -0xB6E6,0xB6E7,0xB6E8,0xB6E9,0xB6EA,0xB6EB,0xB6EC,0xB6ED, -0xB6EE,0xB6EF,0xB6F1,0xB6F2,0xB6F3,0xB6F5,0xB6F6,0xB6F7, -0xB6F9,0xB6FA, 0, 0, 0, 0, 0, 0, -0xB6FB,0xB6FC,0xB6FD,0xB6FE,0xB6FF,0xB702,0xB703,0xB704, -0xB706,0xB707,0xB708,0xB709,0xB70A,0xB70B,0xB70C,0xB70D, -0xB70E,0xB70F,0xB710,0xB711,0xB712,0xB713,0xB714,0xB715, -0xB716,0xB717,0xB718,0xB719,0xB71A,0xB71B,0xB71C,0xB71D, -0xB71E,0xB71F,0xB720,0xB721,0xB722,0xB723,0xB724,0xB725, -0xB726,0xB727,0xB72A,0xB72B,0xB72D,0xB72E,0xB731,0xB732, -0xB733,0xB734,0xB735,0xB736,0xB737,0xB73A,0xB73C,0xB73D, -0xB73E,0xB73F,0xB740,0xB741,0xB742,0xB743,0xB745,0xB746, -0xB747,0xB749,0xB74A,0xB74B,0xB74D,0xB74E,0xB74F,0xB750, -0xB751,0xB752,0xB753,0xB756,0xB757,0xB758,0xB759,0xB75A, -0xB75B,0xB75C,0xB75D,0xB75E,0xB75F,0xB761,0xB762,0xB763, -0xB765,0xB766,0xB767,0xB769,0xB76A,0xB76B,0xB76C,0xB76D, -0xB76E,0xB76F,0xB772,0xB774,0xB776,0xB777,0xB778,0xB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0xB81A,0xB81C,0xB81E,0xB81F, -0xB820,0xB821,0xB822,0xB823,0xB826,0xB827,0xB829,0xB82A, -0xB82B,0xB82D,0xB82E,0xB82F,0xB830,0xB831,0xB832,0xB833, -0xB836,0xB83A,0xB83B,0xB83C,0xB83D,0xB83E,0xB83F,0xB841, -0xB842,0xB843,0xB845,0xB846,0xB847,0xB848,0xB849,0xB84A, -0xB84B,0xB84C,0xB84D,0xB84E,0xB84F,0xB850,0xB852,0xB854, -0xB855,0xB856,0xB857,0xB858,0xB859,0xB85A,0xB85B,0xB85E, -0xB85F,0xB861,0xB862,0xB863,0xB865,0xB866,0xB867,0xB868, -0xB869,0xB86A,0xB86B,0xB86E,0xB870,0xB872,0xB873,0xB874, -0xB875,0xB876,0xB877,0xB879,0xB87A,0xB87B,0xB87D,0xB87E, -0xB87F,0xB880,0xB881,0xB882,0xB883,0xB884, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB885,0xB886,0xB887,0xB888,0xB889,0xB88A,0xB88B,0xB88C, -0xB88E,0xB88F,0xB890,0xB891,0xB892,0xB893,0xB894,0xB895, -0xB896,0xB897,0xB898,0xB899,0xB89A,0xB89B,0xB89C,0xB89D, -0xB89E,0xB89F, 0, 0, 0, 0, 0, 0, -0xB8A0,0xB8A1,0xB8A2,0xB8A3,0xB8A4,0xB8A5,0xB8A6,0xB8A7, -0xB8A9,0xB8AA,0xB8AB,0xB8AC,0xB8AD,0xB8AE,0xB8AF,0xB8B1, -0xB8B2,0xB8B3,0xB8B5,0xB8B6,0xB8B7,0xB8B9,0xB8BA,0xB8BB, -0xB8BC,0xB8BD, 0, 0, 0, 0, 0, 0, -0xB8BE,0xB8BF,0xB8C2,0xB8C4,0xB8C6,0xB8C7,0xB8C8,0xB8C9, -0xB8CA,0xB8CB,0xB8CD,0xB8CE,0xB8CF,0xB8D1,0xB8D2,0xB8D3, -0xB8D5,0xB8D6,0xB8D7,0xB8D8,0xB8D9,0xB8DA,0xB8DB,0xB8DC, -0xB8DE,0xB8E0,0xB8E2,0xB8E3,0xB8E4,0xB8E5,0xB8E6,0xB8E7, -0xB8EA,0xB8EB,0xB8ED,0xB8EE,0xB8EF,0xB8F1,0xB8F2,0xB8F3, -0xB8F4,0xB8F5,0xB8F6,0xB8F7,0xB8FA,0xB8FC,0xB8FE,0xB8FF, -0xB900,0xB901,0xB902,0xB903,0xB905,0xB906,0xB907,0xB908, -0xB909,0xB90A,0xB90B,0xB90C,0xB90D,0xB90E,0xB90F,0xB910, -0xB911,0xB912,0xB913,0xB914,0xB915,0xB916,0xB917,0xB919, -0xB91A,0xB91B,0xB91C,0xB91D,0xB91E,0xB91F,0xB921,0xB922, -0xB923,0xB924,0xB925,0xB926,0xB927,0xB928,0xB929,0xB92A, -0xB92B,0xB92C,0xB92D,0xB92E,0xB92F,0xB930,0xB931,0xB932, -0xB933,0xB934,0xB935,0xB936,0xB937,0xB938,0xB939,0xB93A, -0xB93B,0xB93E,0xB93F,0xB941,0xB942,0xB943,0xB945,0xB946, -0xB947,0xB948,0xB949,0xB94A,0xB94B,0xB94D,0xB94E,0xB950, -0xB952,0xB953,0xB954,0xB955,0xB956,0xB957, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xB95A,0xB95B,0xB95D,0xB95E,0xB95F,0xB961,0xB962,0xB963, -0xB964,0xB965,0xB966,0xB967,0xB96A,0xB96C,0xB96E,0xB96F, -0xB970,0xB971,0xB972,0xB973,0xB976,0xB977,0xB979,0xB97A, -0xB97B,0xB97D, 0, 0, 0, 0, 0, 0, -0xB97E,0xB97F,0xB980,0xB981,0xB982,0xB983,0xB986,0xB988, -0xB98B,0xB98C,0xB98F,0xB990,0xB991,0xB992,0xB993,0xB994, -0xB995,0xB996,0xB997,0xB998,0xB999,0xB99A,0xB99B,0xB99C, -0xB99D,0xB99E, 0, 0, 0, 0, 0, 0, -0xB99F,0xB9A0,0xB9A1,0xB9A2,0xB9A3,0xB9A4,0xB9A5,0xB9A6, -0xB9A7,0xB9A8,0xB9A9,0xB9AA,0xB9AB,0xB9AE,0xB9AF,0xB9B1, -0xB9B2,0xB9B3,0xB9B5,0xB9B6,0xB9B7,0xB9B8,0xB9B9,0xB9BA, -0xB9BB,0xB9BE,0xB9C0,0xB9C2,0xB9C3,0xB9C4,0xB9C5,0xB9C6, -0xB9C7,0xB9CA,0xB9CB,0xB9CD,0xB9D3,0xB9D4,0xB9D5,0xB9D6, -0xB9D7,0xB9DA,0xB9DC,0xB9DF,0xB9E0,0xB9E2,0xB9E6,0xB9E7, -0xB9E9,0xB9EA,0xB9EB,0xB9ED,0xB9EE,0xB9EF,0xB9F0,0xB9F1, -0xB9F2,0xB9F3,0xB9F6,0xB9FB,0xB9FC,0xB9FD,0xB9FE,0xB9FF, -0xBA02,0xBA03,0xBA04,0xBA05,0xBA06,0xBA07,0xBA09,0xBA0A, -0xBA0B,0xBA0C,0xBA0D,0xBA0E,0xBA0F,0xBA10,0xBA11,0xBA12, -0xBA13,0xBA14,0xBA16,0xBA17,0xBA18,0xBA19,0xBA1A,0xBA1B, -0xBA1C,0xBA1D,0xBA1E,0xBA1F,0xBA20,0xBA21,0xBA22,0xBA23, -0xBA24,0xBA25,0xBA26,0xBA27,0xBA28,0xBA29,0xBA2A,0xBA2B, -0xBA2C,0xBA2D,0xBA2E,0xBA2F,0xB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A7,0xBFA8,0xBFA9,0xBFAA,0xBFAB,0xBFAC,0xBFAD, -0xBFAE,0xBFAF,0xBFB1,0xBFB2,0xBFB3,0xBFB4,0xBFB5,0xBFB6, -0xBFB7,0xBFB8, 0, 0, 0, 0, 0, 0, -0xBFB9,0xBFBA,0xBFBB,0xBFBC,0xBFBD,0xBFBE,0xBFBF,0xBFC0, -0xBFC1,0xBFC2,0xBFC3,0xBFC4,0xBFC6,0xBFC7,0xBFC8,0xBFC9, -0xBFCA,0xBFCB,0xBFCE,0xBFCF,0xBFD1,0xBFD2,0xBFD3,0xBFD5, -0xBFD6,0xBFD7,0xBFD8,0xBFD9,0xBFDA,0xBFDB,0xBFDD,0xBFDE, -0xBFE0,0xBFE2,0xBFE3,0xBFE4,0xBFE5,0xBFE6,0xBFE7,0xBFE8, -0xBFE9,0xBFEA,0xBFEB,0xBFEC,0xBFED,0xBFEE,0xBFEF,0xBFF0, -0xBFF1,0xBFF2,0xBFF3,0xBFF4,0xBFF5,0xBFF6,0xBFF7,0xBFF8, -0xBFF9,0xBFFA,0xBFFB,0xBFFC,0xBFFD,0xBFFE,0xBFFF,0xC000, -0xC001,0xC002,0xC003,0xC004,0xC005,0xC006,0xC007,0xC008, -0xC009,0xC00A,0xC00B,0xC00C,0xC00D,0xC00E,0xC00F,0xC010, -0xC011,0xC012,0xC013,0xC014,0xC015,0xC016,0xC017,0xC018, -0xC019,0xC01A,0xC01B,0xC01C,0xC01D,0xC01E,0xC01F,0xC020, -0xC021,0xC022,0xC023,0xC024,0xC025,0xC026,0xC027,0xC028, -0xC029,0xC02A,0xC02B,0xC02C,0xC02D,0xC02E,0xC02F,0xC030, -0xC031,0xC032,0xC033,0xC034,0xC035,0xC036,0xC037,0xC038, -0xC039,0xC03A,0xC03B,0xC03D,0xC03E,0xC03F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC040,0xC041,0xC042,0xC043,0xC044,0xC045,0xC046,0xC047, -0xC048,0xC049,0xC04A,0xC04B,0xC04C,0xC04D,0xC04E,0xC04F, -0xC050,0xC052,0xC053,0xC054,0xC055,0xC056,0xC057,0xC059, -0xC05A,0xC05B, 0, 0, 0, 0, 0, 0, -0xC05D,0xC05E,0xC05F,0xC061,0xC062,0xC063,0xC064,0xC065, -0xC066,0xC067,0xC06A,0xC06B,0xC06C,0xC06D,0xC06E,0xC06F, -0xC070,0xC071,0xC072,0xC073,0xC074,0xC075,0xC076,0xC077, -0xC078,0xC079, 0, 0, 0, 0, 0, 0, -0xC07A,0xC07B,0xC07C,0xC07D,0xC07E,0xC07F,0xC080,0xC081, -0xC082,0xC083,0xC084,0xC085,0xC086,0xC087,0xC088,0xC089, -0xC08A,0xC08B,0xC08C,0xC08D,0xC08E,0xC08F,0xC092,0xC093, -0xC095,0xC096,0xC097,0xC099,0xC09A,0xC09B,0xC09C,0xC09D, -0xC09E,0xC09F,0xC0A2,0xC0A4,0xC0A6,0xC0A7,0xC0A8,0xC0A9, -0xC0AA,0xC0AB,0xC0AE,0xC0B1,0xC0B2,0xC0B7,0xC0B8,0xC0B9, -0xC0BA,0xC0BB,0xC0BE,0xC0C2,0xC0C3,0xC0C4,0xC0C6,0xC0C7, -0xC0CA,0xC0CB,0xC0CD,0xC0CE,0xC0CF,0xC0D1,0xC0D2,0xC0D3, -0xC0D4,0xC0D5,0xC0D6,0xC0D7,0xC0DA,0xC0DE,0xC0DF,0xC0E0, -0xC0E1,0xC0E2,0xC0E3,0xC0E6,0xC0E7,0xC0E9,0xC0EA,0xC0EB, -0xC0ED,0xC0EE,0xC0EF,0xC0F0,0xC0F1,0xC0F2,0xC0F3,0xC0F6, -0xC0F8,0xC0FA,0xC0FB,0xC0FC,0xC0FD,0xC0FE,0xC0FF,0xC101, -0xC102,0xC103,0xC105,0xC106,0xC107,0xC109,0xC10A,0xC10B, -0xC10C,0xC10D,0xC10E,0xC10F,0xC111,0xC112,0xC113,0xC114, -0xC116,0xC117,0xC118,0xC119,0xC11A,0xC11B,0xC121,0xC122, -0xC125,0xC128,0xC129,0xC12A,0xC12B,0xC12E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC132,0xC133,0xC134,0xC135,0xC137,0xC13A,0xC13B,0xC13D, -0xC13E,0xC13F,0xC141,0xC142,0xC143,0xC144,0xC145,0xC146, -0xC147,0xC14A,0xC14E,0xC14F,0xC150,0xC151,0xC152,0xC153, -0xC156,0xC157, 0, 0, 0, 0, 0, 0, -0xC159,0xC15A,0xC15B,0xC15D,0xC15E,0xC15F,0xC160,0xC161, -0xC162,0xC163,0xC166,0xC16A,0xC16B,0xC16C,0xC16D,0xC16E, -0xC16F,0xC171,0xC172,0xC173,0xC175,0xC176,0xC177,0xC179, -0xC17A,0xC17B, 0, 0, 0, 0, 0, 0, -0xC17C,0xC17D,0xC17E,0xC17F,0xC180,0xC181,0xC182,0xC183, -0xC184,0xC186,0xC187,0xC188,0xC189,0xC18A,0xC18B,0xC18F, -0xC191,0xC192,0xC193,0xC195,0xC197,0xC198,0xC199,0xC19A, -0xC19B,0xC19E,0xC1A0,0xC1A2,0xC1A3,0xC1A4,0xC1A6,0xC1A7, -0xC1AA,0xC1AB,0xC1AD,0xC1AE,0xC1AF,0xC1B1,0xC1B2,0xC1B3, -0xC1B4,0xC1B5,0xC1B6,0xC1B7,0xC1B8,0xC1B9,0xC1BA,0xC1BB, -0xC1BC,0xC1BE,0xC1BF,0xC1C0,0xC1C1,0xC1C2,0xC1C3,0xC1C5, -0xC1C6,0xC1C7,0xC1C9,0xC1CA,0xC1CB,0xC1CD,0xC1CE,0xC1CF, -0xC1D0,0xC1D1,0xC1D2,0xC1D3,0xC1D5,0xC1D6,0xC1D9,0xC1DA, -0xC1DB,0xC1DC,0xC1DD,0xC1DE,0xC1DF,0xC1E1,0xC1E2,0xC1E3, -0xC1E5,0xC1E6,0xC1E7,0xC1E9,0xC1EA,0xC1EB,0xC1EC,0xC1ED, -0xC1EE,0xC1EF,0xC1F2,0xC1F4,0xC1F5,0xC1F6,0xC1F7,0xC1F8, -0xC1F9,0xC1FA,0xC1FB,0xC1FE,0xC1FF,0xC201,0xC202,0xC203, -0xC205,0xC206,0xC207,0xC208,0xC209,0xC20A,0xC20B,0xC20E, -0xC210,0xC212,0xC213,0xC214,0xC215,0xC216,0xC217,0xC21A, -0xC21B,0xC21D,0xC21E,0xC221,0xC222,0xC223, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC224,0xC225,0xC226,0xC227,0xC22A,0xC22C,0xC22E,0xC230, -0xC233,0xC235,0xC236,0xC237,0xC238,0xC239,0xC23A,0xC23B, -0xC23C,0xC23D,0xC23E,0xC23F,0xC240,0xC241,0xC242,0xC243, -0xC244,0xC245, 0, 0, 0, 0, 0, 0, -0xC246,0xC247,0xC249,0xC24A,0xC24B,0xC24C,0xC24D,0xC24E, -0xC24F,0xC252,0xC253,0xC255,0xC256,0xC257,0xC259,0xC25A, -0xC25B,0xC25C,0xC25D,0xC25E,0xC25F,0xC261,0xC262,0xC263, -0xC264,0xC266, 0, 0, 0, 0, 0, 0, -0xC267,0xC268,0xC269,0xC26A,0xC26B,0xC26E,0xC26F,0xC271, -0xC272,0xC273,0xC275,0xC276,0xC277,0xC278,0xC279,0xC27A, -0xC27B,0xC27E,0xC280,0xC282,0xC283,0xC284,0xC285,0xC286, -0xC287,0xC28A,0xC28B,0xC28C,0xC28D,0xC28E,0xC28F,0xC291, -0xC292,0xC293,0xC294,0xC295,0xC296,0xC297,0xC299,0xC29A, -0xC29C,0xC29E,0xC29F,0xC2A0,0xC2A1,0xC2A2,0xC2A3,0xC2A6, -0xC2A7,0xC2A9,0xC2AA,0xC2AB,0xC2AE,0xC2AF,0xC2B0,0xC2B1, -0xC2B2,0xC2B3,0xC2B6,0xC2B8,0xC2BA,0xC2BB,0xC2BC,0xC2BD, -0xC2BE,0xC2BF,0xC2C0,0xC2C1,0xC2C2,0xC2C3,0xC2C4,0xC2C5, -0xC2C6,0xC2C7,0xC2C8,0xC2C9,0xC2CA,0xC2CB,0xC2CC,0xC2CD, -0xC2CE,0xC2CF,0xC2D0,0xC2D1,0xC2D2,0xC2D3,0xC2D4,0xC2D5, -0xC2D6,0xC2D7,0xC2D8,0xC2D9,0xC2DA,0xC2DB,0xC2DE,0xC2DF, -0xC2E1,0xC2E2,0xC2E5,0xC2E6,0xC2E7,0xC2E8,0xC2E9,0xC2EA, -0xC2EE,0xC2F0,0xC2F2,0xC2F3,0xC2F4,0xC2F5,0xC2F7,0xC2FA, -0xC2FD,0xC2FE,0xC2FF,0xC301,0xC302,0xC303,0xC304,0xC305, -0xC306,0xC307,0xC30A,0xC30B,0xC30E,0xC30F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC310,0xC311,0xC312,0xC316,0xC317,0xC319,0xC31A,0xC31B, -0xC31D,0xC31E,0xC31F,0xC320,0xC321,0xC322,0xC323,0xC326, -0xC327,0xC32A,0xC32B,0xC32C,0xC32D,0xC32E,0xC32F,0xC330, -0xC331,0xC332, 0, 0, 0, 0, 0, 0, -0xC333,0xC334,0xC335,0xC336,0xC337,0xC338,0xC339,0xC33A, -0xC33B,0xC33C,0xC33D,0xC33E,0xC33F,0xC340,0xC341,0xC342, -0xC343,0xC344,0xC346,0xC347,0xC348,0xC349,0xC34A,0xC34B, -0xC34C,0xC34D, 0, 0, 0, 0, 0, 0, -0xC34E,0xC34F,0xC350,0xC351,0xC352,0xC353,0xC354,0xC355, -0xC356,0xC357,0xC358,0xC359,0xC35A,0xC35B,0xC35C,0xC35D, -0xC35E,0xC35F,0xC360,0xC361,0xC362,0xC363,0xC364,0xC365, -0xC366,0xC367,0xC36A,0xC36B,0xC36D,0xC36E,0xC36F,0xC371, -0xC373,0xC374,0xC375,0xC376,0xC377,0xC37A,0xC37B,0xC37E, -0xC37F,0xC380,0xC381,0xC382,0xC383,0xC385,0xC386,0xC387, -0xC389,0xC38A,0xC38B,0xC38D,0xC38E,0xC38F,0xC390,0xC391, -0xC392,0xC393,0xC394,0xC395,0xC396,0xC397,0xC398,0xC399, -0xC39A,0xC39B,0xC39C,0xC39D,0xC39E,0xC39F,0xC3A0,0xC3A1, -0xC3A2,0xC3A3,0xC3A4,0xC3A5,0xC3A6,0xC3A7,0xC3A8,0xC3A9, -0xC3AA,0xC3AB,0xC3AC,0xC3AD,0xC3AE,0xC3AF,0xC3B0,0xC3B1, -0xC3B2,0xC3B3,0xC3B4,0xC3B5,0xC3B6,0xC3B7,0xC3B8,0xC3B9, -0xC3BA,0xC3BB,0xC3BC,0xC3BD,0xC3BE,0xC3BF,0xC3C1,0xC3C2, -0xC3C3,0xC3C4,0xC3C5,0xC3C6,0xC3C7,0xC3C8,0xC3C9,0xC3CA, -0xC3CB,0xC3CC,0xC3CD,0xC3CE,0xC3CF,0xC3D0,0xC3D1,0xC3D2, -0xC3D3,0xC3D4,0xC3D5,0xC3D6,0xC3D7,0xC3DA, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC3DB,0xC3DD,0xC3DE,0xC3E1,0xC3E3,0xC3E4,0xC3E5,0xC3E6, -0xC3E7,0xC3EA,0xC3EB,0xC3EC,0xC3EE,0xC3EF,0xC3F0,0xC3F1, -0xC3F2,0xC3F3,0xC3F6,0xC3F7,0xC3F9,0xC3FA,0xC3FB,0xC3FC, -0xC3FD,0xC3FE, 0, 0, 0, 0, 0, 0, -0xC3FF,0xC400,0xC401,0xC402,0xC403,0xC404,0xC405,0xC406, -0xC407,0xC409,0xC40A,0xC40B,0xC40C,0xC40D,0xC40E,0xC40F, -0xC411,0xC412,0xC413,0xC414,0xC415,0xC416,0xC417,0xC418, -0xC419,0xC41A, 0, 0, 0, 0, 0, 0, -0xC41B,0xC41C,0xC41D,0xC41E,0xC41F,0xC420,0xC421,0xC422, -0xC423,0xC425,0xC426,0xC427,0xC428,0xC429,0xC42A,0xC42B, -0xC42D,0xC42E,0xC42F,0xC431,0xC432,0xC433,0xC435,0xC436, -0xC437,0xC438,0xC439,0xC43A,0xC43B,0xC43E,0xC43F,0xC440, -0xC441,0xC442,0xC443,0xC444,0xC445,0xC446,0xC447,0xC449, -0xC44A,0xC44B,0xC44C,0xC44D,0xC44E,0xC44F,0xC450,0xC451, -0xC452,0xC453,0xC454,0xC455,0xC456,0xC457,0xC458,0xC459, -0xC45A,0xC45B,0xC45C,0xC45D,0xC45E,0xC45F,0xC460,0xC461, -0xC462,0xC463,0xC466,0xC467,0xC469,0xC46A,0xC46B,0xC46D, -0xC46E,0xC46F,0xC470,0xC471,0xC472,0xC473,0xC476,0xC477, -0xC478,0xC47A,0xC47B,0xC47C,0xC47D,0xC47E,0xC47F,0xC481, -0xC482,0xC483,0xC484,0xC485,0xC486,0xC487,0xC488,0xC489, -0xC48A,0xC48B,0xC48C,0xC48D,0xC48E,0xC48F,0xC490,0xC491, -0xC492,0xC493,0xC495,0xC496,0xC497,0xC498,0xC499,0xC49A, -0xC49B,0xC49D,0xC49E,0xC49F,0xC4A0,0xC4A1,0xC4A2,0xC4A3, -0xC4A4,0xC4A5,0xC4A6,0xC4A7,0xC4A8,0xC4A9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC4AA,0xC4AB,0xC4AC,0xC4AD,0xC4AE,0xC4AF,0xC4B0,0xC4B1, -0xC4B2,0xC4B3,0xC4B4,0xC4B5,0xC4B6,0xC4B7,0xC4B9,0xC4BA, -0xC4BB,0xC4BD,0xC4BE,0xC4BF,0xC4C0,0xC4C1,0xC4C2,0xC4C3, -0xC4C4,0xC4C5, 0, 0, 0, 0, 0, 0, -0xC4C6,0xC4C7,0xC4C8,0xC4C9,0xC4CA,0xC4CB,0xC4CC,0xC4CD, -0xC4CE,0xC4CF,0xC4D0,0xC4D1,0xC4D2,0xC4D3,0xC4D4,0xC4D5, -0xC4D6,0xC4D7,0xC4D8,0xC4D9,0xC4DA,0xC4DB,0xC4DC,0xC4DD, -0xC4DE,0xC4DF, 0, 0, 0, 0, 0, 0, -0xC4E0,0xC4E1,0xC4E2,0xC4E3,0xC4E4,0xC4E5,0xC4E6,0xC4E7, -0xC4E8,0xC4EA,0xC4EB,0xC4EC,0xC4ED,0xC4EE,0xC4EF,0xC4F2, -0xC4F3,0xC4F5,0xC4F6,0xC4F7,0xC4F9,0xC4FB,0xC4FC,0xC4FD, -0xC4FE,0xC502,0xC503,0xC504,0xC505,0xC506,0xC507,0xC508, -0xC509,0xC50A,0xC50B,0xC50D,0xC50E,0xC50F,0xC511,0xC512, -0xC513,0xC515,0xC516,0xC517,0xC518,0xC519,0xC51A,0xC51B, -0xC51D,0xC51E,0xC51F,0xC520,0xC521,0xC522,0xC523,0xC524, -0xC525,0xC526,0xC527,0xC52A,0xC52B,0xC52D,0xC52E,0xC52F, -0xC531,0xC532,0xC533,0xC534,0xC535,0xC536,0xC537,0xC53A, -0xC53C,0xC53E,0xC53F,0xC540,0xC541,0xC542,0xC543,0xC546, -0xC547,0xC54B,0xC54F,0xC550,0xC551,0xC552,0xC556,0xC55A, -0xC55B,0xC55C,0xC55F,0xC562,0xC563,0xC565,0xC566,0xC567, -0xC569,0xC56A,0xC56B,0xC56C,0xC56D,0xC56E,0xC56F,0xC572, -0xC576,0xC577,0xC578,0xC579,0xC57A,0xC57B,0xC57E,0xC57F, -0xC581,0xC582,0xC583,0xC585,0xC586,0xC588,0xC589,0xC58A, -0xC58B,0xC58E,0xC590,0xC592,0xC593,0xC594, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC596,0xC599,0xC59A,0xC59B,0xC59D,0xC59E,0xC59F,0xC5A1, -0xC5A2,0xC5A3,0xC5A4,0xC5A5,0xC5A6,0xC5A7,0xC5A8,0xC5AA, -0xC5AB,0xC5AC,0xC5AD,0xC5AE,0xC5AF,0xC5B0,0xC5B1,0xC5B2, -0xC5B3,0xC5B6, 0, 0, 0, 0, 0, 0, -0xC5B7,0xC5BA,0xC5BF,0xC5C0,0xC5C1,0xC5C2,0xC5C3,0xC5CB, -0xC5CD,0xC5CF,0xC5D2,0xC5D3,0xC5D5,0xC5D6,0xC5D7,0xC5D9, -0xC5DA,0xC5DB,0xC5DC,0xC5DD,0xC5DE,0xC5DF,0xC5E2,0xC5E4, -0xC5E6,0xC5E7, 0, 0, 0, 0, 0, 0, -0xC5E8,0xC5E9,0xC5EA,0xC5EB,0xC5EF,0xC5F1,0xC5F2,0xC5F3, -0xC5F5,0xC5F8,0xC5F9,0xC5FA,0xC5FB,0xC602,0xC603,0xC604, -0xC609,0xC60A,0xC60B,0xC60D,0xC60E,0xC60F,0xC611,0xC612, -0xC613,0xC614,0xC615,0xC616,0xC617,0xC61A,0xC61D,0xC61E, -0xC61F,0xC620,0xC621,0xC622,0xC623,0xC626,0xC627,0xC629, -0xC62A,0xC62B,0xC62F,0xC631,0xC632,0xC636,0xC638,0xC63A, -0xC63C,0xC63D,0xC63E,0xC63F,0xC642,0xC643,0xC645,0xC646, -0xC647,0xC649,0xC64A,0xC64B,0xC64C,0xC64D,0xC64E,0xC64F, -0xC652,0xC656,0xC657,0xC658,0xC659,0xC65A,0xC65B,0xC65E, -0xC65F,0xC661,0xC662,0xC663,0xC664,0xC665,0xC666,0xC667, -0xC668,0xC669,0xC66A,0xC66B,0xC66D,0xC66E,0xC670,0xC672, -0xC673,0xC674,0xC675,0xC676,0xC677,0xC67A,0xC67B,0xC67D, -0xC67E,0xC67F,0xC681,0xC682,0xC683,0xC684,0xC685,0xC686, -0xC687,0xC68A,0xC68C,0xC68E,0xC68F,0xC690,0xC691,0xC692, -0xC693,0xC696,0xC697,0xC699,0xC69A,0xC69B,0xC69D,0xC69E, -0xC69F,0xC6A0,0xC6A1,0xC6A2,0xC6A3,0xC6A6, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC6A8,0xC6AA,0xC6AB,0xC6AC,0xC6AD,0xC6AE,0xC6AF,0xC6B2, -0xC6B3,0xC6B5,0xC6B6,0xC6B7,0xC6BB,0xC6BC,0xC6BD,0xC6BE, -0xC6BF,0xC6C2,0xC6C4,0xC6C6,0xC6C7,0xC6C8,0xC6C9,0xC6CA, -0xC6CB,0xC6CE, 0, 0, 0, 0, 0, 0, -0xC6CF,0xC6D1,0xC6D2,0xC6D3,0xC6D5,0xC6D6,0xC6D7,0xC6D8, -0xC6D9,0xC6DA,0xC6DB,0xC6DE,0xC6DF,0xC6E2,0xC6E3,0xC6E4, -0xC6E5,0xC6E6,0xC6E7,0xC6EA,0xC6EB,0xC6ED,0xC6EE,0xC6EF, -0xC6F1,0xC6F2, 0, 0, 0, 0, 0, 0, -0xC6F3,0xC6F4,0xC6F5,0xC6F6,0xC6F7,0xC6FA,0xC6FB,0xC6FC, -0xC6FE,0xC6FF,0xC700,0xC701,0xC702,0xC703,0xC706,0xC707, -0xC709,0xC70A,0xC70B,0xC70D,0xC70E,0xC70F,0xC710,0xC711, -0xC712,0xC713,0xC716,0xC718,0xC71A,0xC71B,0xC71C,0xC71D, -0xC71E,0xC71F,0xC722,0xC723,0xC725,0xC726,0xC727,0xC729, -0xC72A,0xC72B,0xC72C,0xC72D,0xC72E,0xC72F,0xC732,0xC734, -0xC736,0xC738,0xC739,0xC73A,0xC73B,0xC73E,0xC73F,0xC741, -0xC742,0xC743,0xC745,0xC746,0xC747,0xC748,0xC749,0xC74B, -0xC74E,0xC750,0xC759,0xC75A,0xC75B,0xC75D,0xC75E,0xC75F, -0xC761,0xC762,0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C812,0xC814,0xC817,0xC818,0xC819,0xC81A,0xC81B,0xC81E, -0xC81F,0xC821,0xC822,0xC823,0xC825,0xC826,0xC827,0xC828, -0xC829,0xC82A,0xC82B,0xC82E,0xC830,0xC832,0xC833,0xC834, -0xC835,0xC836,0xC837,0xC839,0xC83A,0xC83B,0xC83D,0xC83E, -0xC83F,0xC841,0xC842,0xC843,0xC844,0xC845,0xC846,0xC847, -0xC84A,0xC84B,0xC84E,0xC84F,0xC850,0xC851,0xC852,0xC853, -0xC855,0xC856,0xC857,0xC858,0xC859,0xC85A,0xC85B,0xC85C, -0xC85D,0xC85E,0xC85F,0xC860,0xC861,0xC862,0xC863,0xC864, -0xC865,0xC866,0xC867,0xC868,0xC869,0xC86A,0xC86B,0xC86C, -0xC86D,0xC86E,0xC86F,0xC872,0xC873,0xC875,0xC876,0xC877, -0xC879,0xC87B,0xC87C,0xC87D,0xC87E,0xC87F,0xC882,0xC884, -0xC888,0xC889,0xC88A,0xC88E,0xC88F,0xC890,0xC891,0xC892, -0xC893,0xC895,0xC896,0xC897,0xC898,0xC899,0xC89A,0xC89B, -0xC89C,0xC89E,0xC8A0,0xC8A2,0xC8A3,0xC8A4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC8A5,0xC8A6,0xC8A7,0xC8A9,0xC8AA,0xC8AB,0xC8AC,0xC8AD, -0xC8AE,0xC8AF,0xC8B0,0xC8B1,0xC8B2,0xC8B3,0xC8B4,0xC8B5, -0xC8B6,0xC8B7,0xC8B8,0xC8B9,0xC8BA,0xC8BB,0xC8BE,0xC8BF, -0xC8C0,0xC8C1, 0, 0, 0, 0, 0, 0, -0xC8C2,0xC8C3,0xC8C5,0xC8C6,0xC8C7,0xC8C9,0xC8CA,0xC8CB, -0xC8CD,0xC8CE,0xC8CF,0xC8D0,0xC8D1,0xC8D2,0xC8D3,0xC8D6, -0xC8D8,0xC8DA,0xC8DB,0xC8DC,0xC8DD,0xC8DE,0xC8DF,0xC8E2, -0xC8E3,0xC8E5, 0, 0, 0, 0, 0, 0, -0xC8E6,0xC8E7,0xC8E8,0xC8E9,0xC8EA,0xC8EB,0xC8EC,0xC8ED, -0xC8EE,0xC8EF,0xC8F0,0xC8F1,0xC8F2,0xC8F3,0xC8F4,0xC8F6, -0xC8F7,0xC8F8,0xC8F9,0xC8FA,0xC8FB,0xC8FE,0xC8FF,0xC901, -0xC902,0xC903,0xC907,0xC908,0xC909,0xC90A,0xC90B,0xC90E, -0x3000,0x3001,0x3002,0x00B7,0x2025,0x2026,0x00A8,0x3003, -0x00AD,0x2015,0x2225,0xFF3C,0x223C,0x2018,0x2019,0x201C, -0x201D,0x3014,0x3015,0x3008,0x3009,0x300A,0x300B,0x300C, -0x300D,0x300E,0x300F,0x3010,0x3011,0x00B1,0x00D7,0x00F7, -0x2260,0x2264,0x2265,0x221E,0x2234,0x00B0,0x2032,0x2033, -0x2103,0x212B,0xFFE0,0xFFE1,0xFFE5,0x2642,0x2640,0x2220, -0x22A5,0x2312,0x2202,0x2207,0x2261,0x2252,0x00A7,0x203B, -0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7,0x25C6,0x25A1, -0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x2192,0x2190,0x2191, -0x2193,0x2194,0x3013,0x226A,0x226B,0x221A,0x223D,0x221D, -0x2235,0x222B,0x222C,0x2208,0x220B,0x2286,0x2287,0x2282, -0x2283,0x222A,0x2229,0x2227,0x2228,0xFFE2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC910,0xC912,0xC913,0xC914,0xC915,0xC916,0xC917,0xC919, -0xC91A,0xC91B,0xC91C,0xC91D,0xC91E,0xC91F,0xC920,0xC921, -0xC922,0xC923,0xC924,0xC925,0xC926,0xC927,0xC928,0xC929, -0xC92A,0xC92B, 0, 0, 0, 0, 0, 0, -0xC92D,0xC92E,0xC92F,0xC930,0xC931,0xC932,0xC933,0xC935, -0xC936,0xC937,0xC938,0xC939,0xC93A,0xC93B,0xC93C,0xC93D, -0xC93E,0xC93F,0xC940,0xC941,0xC942,0xC943,0xC944,0xC945, -0xC946,0xC947, 0, 0, 0, 0, 0, 0, -0xC948,0xC949,0xC94A,0xC94B,0xC94C,0xC94D,0xC94E,0xC94F, -0xC952,0xC953,0xC955,0xC956,0xC957,0xC959,0xC95A,0xC95B, -0xC95C,0xC95D,0xC95E,0xC95F,0xC962,0xC964,0xC965,0xC966, -0xC967,0xC968,0xC969,0xC96A,0xC96B,0xC96D,0xC96E,0xC96F, -0x21D2,0x21D4,0x2200,0x2203,0x00B4,0xFF5E,0x02C7,0x02D8, -0x02DD,0x02DA,0x02D9,0x00B8,0x02DB,0x00A1,0x00BF,0x02D0, -0x222E,0x2211,0x220F,0x00A4,0x2109,0x2030,0x25C1,0x25C0, -0x25B7,0x25B6,0x2664,0x2660,0x2661,0x2665,0x2667,0x2663, -0x2299,0x25C8,0x25A3,0x25D0,0x25D1,0x2592,0x25A4,0x25A5, -0x25A8,0x25A7,0x25A6,0x25A9,0x2668,0x260F,0x260E,0x261C, -0x261E,0x00B6,0x2020,0x2021,0x2195,0x2197,0x2199,0x2196, -0x2198,0x266D,0x2669,0x266A,0x266C,0x327F,0x321C,0x2116, -0x33C7,0x2122,0x33C2,0x33D8,0x2121, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xC971,0xC972,0xC973,0xC975,0xC976,0xC977,0xC978,0xC979, -0xC97A,0xC97B,0xC97D,0xC97E,0xC97F,0xC980,0xC981,0xC982, -0xC983,0xC984,0xC985,0xC986,0xC987,0xC98A,0xC98B,0xC98D, -0xC98E,0xC98F, 0, 0, 0, 0, 0, 0, -0xC991,0xC992,0xC993,0xC994,0xC995,0xC996,0xC997,0xC99A, -0xC99C,0xC99E,0xC99F,0xC9A0,0xC9A1,0xC9A2,0xC9A3,0xC9A4, -0xC9A5,0xC9A6,0xC9A7,0xC9A8,0xC9A9,0xC9AA,0xC9AB,0xC9AC, -0xC9AD,0xC9AE, 0, 0, 0, 0, 0, 0, -0xC9AF,0xC9B0,0xC9B1,0xC9B2,0xC9B3,0xC9B4,0xC9B5,0xC9B6, -0xC9B7,0xC9B8,0xC9B9,0xC9BA,0xC9BB,0xC9BC,0xC9BD,0xC9BE, -0xC9BF,0xC9C2,0xC9C3,0xC9C5,0xC9C6,0xC9C9,0xC9CB,0xC9CC, -0xC9CD,0xC9CE,0xC9CF,0xC9D2,0xC9D4,0xC9D7,0xC9D8,0xC9DB, -0xFF01,0xFF02,0xFF03,0xFF04,0xFF05,0xFF06,0xFF07,0xFF08, -0xFF09,0xFF0A,0xFF0B,0xFF0C,0xFF0D,0xFF0E,0xFF0F,0xFF10, -0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17,0xFF18, -0xFF19,0xFF1A,0xFF1B,0xFF1C,0xFF1D,0xFF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,0xCA28,0xCA2A,0xCA2B,0xCA2C,0xCA2D,0xCA2E, -0xCA2F,0xCA30,0xCA31,0xCA32,0xCA33,0xCA34,0xCA35,0xCA36, -0xCA37,0xCA38,0xCA39,0xCA3A,0xCA3B,0xCA3C,0xCA3D,0xCA3E, -0xCA3F,0xCA40,0xCA41,0xCA42,0xCA43,0xCA44,0xCA45,0xCA46, -0x3131,0x3132,0x3133,0x3134,0x3135,0x3136,0x3137,0x3138, -0x3139,0x313A,0x313B,0x313C,0x313D,0x313E,0x313F,0x3140, -0x3141,0x3142,0x3143,0x3144,0x3145,0x3146,0x3147,0x3148, -0x3149,0x314A,0x314B,0x314C,0x314D,0x314E,0x314F,0x3150, -0x3151,0x3152,0x3153,0x3154,0x3155,0x3156,0x3157,0x3158, -0x3159,0x315A,0x315B,0x315C,0x315D,0x315E,0x315F,0x3160, -0x3161,0x3162,0x3163,0x3164,0x3165,0x3166,0x3167,0x3168, -0x3169,0x316A,0x316B,0x316C,0x316D,0x316E,0x316F,0x3170, -0x3171,0x3172,0x3173,0x3174,0x3175,0x3176,0x3177,0x3178, -0x3179,0x317A,0x317B,0x317C,0x317D,0x317E,0x317F,0x3180, -0x3181,0x3182,0x3183,0x3184,0x3185,0x3186,0x3187,0x3188, -0x3189,0x318A,0x318B,0x318C,0x318D,0x318E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCA47,0xCA48,0xCA49,0xCA4A,0xCA4B,0xCA4E,0xCA4F,0xCA51, -0xCA52,0xCA53,0xCA55,0xCA56,0xCA57,0xCA58,0xCA59,0xCA5A, -0xCA5B,0xCA5E,0xCA62,0xCA63,0xCA64,0xCA65,0xCA66,0xCA67, -0xCA69,0xCA6A, 0, 0, 0, 0, 0, 0, -0xCA6B,0xCA6C,0xCA6D,0xCA6E,0xCA6F,0xCA70,0xCA71,0xCA72, -0xCA73,0xCA74,0xCA75,0xCA76,0xCA77,0xCA78,0xCA79,0xCA7A, -0xCA7B,0xCA7C,0xCA7E,0xCA7F,0xCA80,0xCA81,0xCA82,0xCA83, -0xCA85,0xCA86, 0, 0, 0, 0, 0, 0, -0xCA87,0xCA88,0xCA89,0xCA8A,0xCA8B,0xCA8C,0xCA8D,0xCA8E, -0xCA8F,0xCA90,0xCA91,0xCA92,0xCA93,0xCA94,0xCA95,0xCA96, -0xCA97,0xCA99,0xCA9A,0xCA9B,0xCA9C,0xCA9D,0xCA9E,0xCA9F, -0xCAA0,0xCAA1,0xCAA2,0xCAA3,0xCAA4,0xCAA5,0xCAA6,0xCAA7, -0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177, -0x2178,0x2179, 0, 0, 0, 0, 0,0x2160, -0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,0x2167,0x2168, -0x2169, 0, 0, 0, 0, 0, 0, 0, -0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398, -0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0, -0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, - 0, 0, 0, 0, 0, 0, 0, 0, -0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8, -0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, -0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCAA8,0xCAA9,0xCAAA,0xCAAB,0xCAAC,0xCAAD,0xCAAE,0xCAAF, -0xCAB0,0xCAB1,0xCAB2,0xCAB3,0xCAB4,0xCAB5,0xCAB6,0xCAB7, -0xCAB8,0xCAB9,0xCABA,0xCABB,0xCABE,0xCABF,0xCAC1,0xCAC2, -0xCAC3,0xCAC5, 0, 0, 0, 0, 0, 0, -0xCAC6,0xCAC7,0xCAC8,0xCAC9,0xCACA,0xCACB,0xCACE,0xCAD0, -0xCAD2,0xCAD4,0xCAD5,0xCAD6,0xCAD7,0xCADA,0xCADB,0xCADC, -0xCADD,0xCADE,0xCADF,0xCAE1,0xCAE2,0xCAE3,0xCAE4,0xCAE5, -0xCAE6,0xCAE7, 0, 0, 0, 0, 0, 0, -0xCAE8,0xCAE9,0xCAEA,0xCAEB,0xCAED,0xCAEE,0xCAEF,0xCAF0, -0xCAF1,0xCAF2,0xCAF3,0xCAF5,0xCAF6,0xCAF7,0xCAF8,0xCAF9, -0xCAFA,0xCAFB,0xCAFC,0xCAFD,0xCAFE,0xCAFF,0xCB00,0xCB01, -0xCB02,0xCB03,0xCB04,0xCB05,0xCB06,0xCB07,0xCB09,0xCB0A, -0x2500,0x2502,0x250C,0x2510,0x2518,0x2514,0x251C,0x252C, -0x2524,0x2534,0x253C,0x2501,0x2503,0x250F,0x2513,0x251B, -0x2517,0x2523,0x2533,0x252B,0x253B,0x254B,0x2520,0x252F, -0x2528,0x2537,0x253F,0x251D,0x2530,0x2525,0x2538,0x2542, -0x2512,0x2511,0x251A,0x2519,0x2516,0x2515,0x250E,0x250D, -0x251E,0x251F,0x2521,0x2522,0x2526,0x2527,0x2529,0x252A, -0x252D,0x252E,0x2531,0x2532,0x2535,0x2536,0x2539,0x253A, -0x253D,0x253E,0x2540,0x2541,0x2543,0x2544,0x2545,0x2546, -0x2547,0x2548,0x2549,0x254A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCB0B,0xCB0C,0xCB0D,0xCB0E,0xCB0F,0xCB11,0xCB12,0xCB13, -0xCB15,0xCB16,0xCB17,0xCB19,0xCB1A,0xCB1B,0xCB1C,0xCB1D, -0xCB1E,0xCB1F,0xCB22,0xCB23,0xCB24,0xCB25,0xCB26,0xCB27, -0xCB28,0xCB29, 0, 0, 0, 0, 0, 0, -0xCB2A,0xCB2B,0xCB2C,0xCB2D,0xCB2E,0xCB2F,0xCB30,0xCB31, -0xCB32,0xCB33,0xCB34,0xCB35,0xCB36,0xCB37,0xCB38,0xCB39, -0xCB3A,0xCB3B,0xCB3C,0xCB3D,0xCB3E,0xCB3F,0xCB40,0xCB42, -0xCB43,0xCB44, 0, 0, 0, 0, 0, 0, -0xCB45,0xCB46,0xCB47,0xCB4A,0xCB4B,0xCB4D,0xCB4E,0xCB4F, -0xCB51,0xCB52,0xCB53,0xCB54,0xCB55,0xCB56,0xCB57,0xCB5A, -0xCB5B,0xCB5C,0xCB5E,0xCB5F,0xCB60,0xCB61,0xCB62,0xCB63, -0xCB65,0xCB66,0xCB67,0xCB68,0xCB69,0xCB6A,0xCB6B,0xCB6C, -0x3395,0x3396,0x3397,0x2113,0x3398,0x33C4,0x33A3,0x33A4, -0x33A5,0x33A6,0x3399,0x339A,0x339B,0x339C,0x339D,0x339E, -0x339F,0x33A0,0x33A1,0x33A2,0x33CA,0x338D,0x338E,0x338F, -0x33CF,0x3388,0x3389,0x33C8,0x33A7,0x33A8,0x33B0,0x33B1, -0x33B2,0x33B3,0x33B4,0x33B5,0x33B6,0x33B7,0x33B8,0x33B9, -0x3380,0x3381,0x3382,0x3383,0x3384,0x33BA,0x33BB,0x33BC, -0x33BD,0x33BE,0x33BF,0x3390,0x3391,0x3392,0x3393,0x3394, -0x2126,0x33C0,0x33C1,0x338A,0x338B,0x338C,0x33D6,0x33C5, -0x33AD,0x33AE,0x33AF,0x33DB,0x33A9,0x33AA,0x33AB,0x33AC, -0x33DD,0x33D0,0x33D3,0x33C3,0x33C9,0x33DC,0x33C6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCB6D,0xCB6E,0xCB6F,0xCB70,0xCB71,0xCB72,0xCB73,0xCB74, -0xCB75,0xCB76,0xCB77,0xCB7A,0xCB7B,0xCB7C,0xCB7D,0xCB7E, -0xCB7F,0xCB80,0xCB81,0xCB82,0xCB83,0xCB84,0xCB85,0xCB86, -0xCB87,0xCB88, 0, 0, 0, 0, 0, 0, -0xCB89,0xCB8A,0xCB8B,0xCB8C,0xCB8D,0xCB8E,0xCB8F,0xCB90, -0xCB91,0xCB92,0xCB93,0xCB94,0xCB95,0xCB96,0xCB97,0xCB98, -0xCB99,0xCB9A,0xCB9B,0xCB9D,0xCB9E,0xCB9F,0xCBA0,0xCBA1, -0xCBA2,0xCBA3, 0, 0, 0, 0, 0, 0, -0xCBA4,0xCBA5,0xCBA6,0xCBA7,0xCBA8,0xCBA9,0xCBAA,0xCBAB, -0xCBAC,0xCBAD,0xCBAE,0xCBAF,0xCBB0,0xCBB1,0xCBB2,0xCBB3, -0xCBB4,0xCBB5,0xCBB6,0xCBB7,0xCBB9,0xCBBA,0xCBBB,0xCBBC, -0xCBBD,0xCBBE,0xCBBF,0xCBC0,0xCBC1,0xCBC2,0xCBC3,0xCBC4, -0x00C6,0x00D0,0x00AA,0x0126, 0,0x0132, 0,0x013F, -0x0141,0x00D8,0x0152,0x00BA,0x00DE,0x0166,0x014A, 0, -0x3260,0x3261,0x3262,0x3263,0x3264,0x3265,0x3266,0x3267, -0x3268,0x3269,0x326A,0x326B,0x326C,0x326D,0x326E,0x326F, -0x3270,0x3271,0x3272,0x3273,0x3274,0x3275,0x3276,0x3277, -0x3278,0x3279,0x327A,0x327B,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,0x2460,0x2461, -0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469, -0x246A,0x246B,0x246C,0x246D,0x246E,0x00BD,0x2153,0x2154, -0x00BC,0x00BE,0x215B,0x215C,0x215D,0x215E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCBC5,0xCBC6,0xCBC7,0xCBC8,0xCBC9,0xCBCA,0xCBCB,0xCBCC, -0xCBCD,0xCBCE,0xCBCF,0xCBD0,0xCBD1,0xCBD2,0xCBD3,0xCBD5, -0xCBD6,0xCBD7,0xCBD8,0xCBD9,0xCBDA,0xCBDB,0xCBDC,0xCBDD, -0xCBDE,0xCBDF, 0, 0, 0, 0, 0, 0, -0xCBE0,0xCBE1,0xCBE2,0xCBE3,0xCBE5,0xCBE6,0xCBE8,0xCBEA, -0xCBEB,0xCBEC,0xCBED,0xCBEE,0xCBEF,0xCBF0,0xCBF1,0xCBF2, -0xCBF3,0xCBF4,0xCBF5,0xCBF6,0xCBF7,0xCBF8,0xCBF9,0xCBFA, -0xCBFB,0xCBFC, 0, 0, 0, 0, 0, 0, -0xCBFD,0xCBFE,0xCBFF,0xCC00,0xCC01,0xCC02,0xCC03,0xCC04, -0xCC05,0xCC06,0xCC07,0xCC08,0xCC09,0xCC0A,0xCC0B,0xCC0E, -0xCC0F,0xCC11,0xCC12,0xCC13,0xCC15,0xCC16,0xCC17,0xCC18, -0xCC19,0xCC1A,0xCC1B,0xCC1E,0xCC1F,0xCC20,0xCC23,0xCC24, -0x00E6,0x0111,0x00F0,0x0127,0x0131,0x0133,0x0138,0x0140, -0x0142,0x00F8,0x0153,0x00DF,0x00FE,0x0167,0x014B,0x0149, -0x3200,0x3201,0x3202,0x3203,0x3204,0x3205,0x3206,0x3207, -0x3208,0x3209,0x320A,0x320B,0x320C,0x320D,0x320E,0x320F, -0x3210,0x3211,0x3212,0x3213,0x3214,0x3215,0x3216,0x3217, -0x3218,0x3219,0x321A,0x321B,0x249C,0x249D,0x249E,0x249F, -0x24A0,0x24A1,0x24A2,0x24A3,0x24A4,0x24A5,0x24A6,0x24A7, -0x24A8,0x24A9,0x24AA,0x24AB,0x24AC,0x24AD,0x24AE,0x24AF, -0x24B0,0x24B1,0x24B2,0x24B3,0x24B4,0x24B5,0x2474,0x2475, -0x2476,0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D, -0x247E,0x247F,0x2480,0x2481,0x2482,0x00B9,0x00B2,0x00B3, -0x2074,0x207F,0x2081,0x2082,0x2083,0x2084, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCC25,0xCC26,0xCC2A,0xCC2B,0xCC2D,0xCC2F,0xCC31,0xCC32, -0xCC33,0xCC34,0xCC35,0xCC36,0xCC37,0xCC3A,0xCC3F,0xCC40, -0xCC41,0xCC42,0xCC43,0xCC46,0xCC47,0xCC49,0xCC4A,0xCC4B, -0xCC4D,0xCC4E, 0, 0, 0, 0, 0, 0, -0xCC4F,0xCC50,0xCC51,0xCC52,0xCC53,0xCC56,0xCC5A,0xCC5B, -0xCC5C,0xCC5D,0xCC5E,0xCC5F,0xCC61,0xCC62,0xCC63,0xCC65, -0xCC67,0xCC69,0xCC6A,0xCC6B,0xCC6C,0xCC6D,0xCC6E,0xCC6F, -0xCC71,0xCC72, 0, 0, 0, 0, 0, 0, -0xCC73,0xCC74,0xCC76,0xCC77,0xCC78,0xCC79,0xCC7A,0xCC7B, -0xCC7C,0xCC7D,0xCC7E,0xCC7F,0xCC80,0xCC81,0xCC82,0xCC83, -0xCC84,0xCC85,0xCC86,0xCC87,0xCC88,0xCC89,0xCC8A,0xCC8B, -0xCC8C,0xCC8D,0xCC8E,0xCC8F,0xCC90,0xCC91,0xCC92,0xCC93, -0x3041,0x3042,0x3043,0x3044,0x3045,0x3046,0x3047,0x3048, -0x3049,0x304A,0x304B,0x304C,0x304D,0x304E,0x304F,0x3050, -0x3051,0x3052,0x3053,0x3054,0x3055,0x3056,0x3057,0x3058, -0x3059,0x305A,0x305B,0x305C,0x305D,0x305E,0x305F,0x3060, -0x3061,0x3062,0x3063,0x3064,0x3065,0x3066,0x3067,0x3068, -0x3069,0x306A,0x306B,0x306C,0x306D,0x306E,0x306F,0x3070, -0x3071,0x3072,0x3073,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CFC,0xCCFD, -0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8, -0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0, -0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8, -0x30B9,0x30BA,0x30BB,0x30BC,0x30BD,0x30BE,0x30BF,0x30C0, -0x30C1,0x30C2,0x30C3,0x30C4,0x30C5,0x30C6,0x30C7,0x30C8, -0x30C9,0x30CA,0x30CB,0x30CC,0x30CD,0x30CE,0x30CF,0x30D0, -0x30D1,0x30D2,0x30D3,0x30D4,0x30D5,0x30D6,0x30D7,0x30D8, -0x30D9,0x30DA,0x30DB,0x30DC,0x30DD,0x30DE,0x30DF,0x30E0, -0x30E1,0x30E2,0x30E3,0x30E4,0x30E5,0x30E6,0x30E7,0x30E8, -0x30E9,0x30EA,0x30EB,0x30EC,0x30ED,0x30EE,0x30EF,0x30F0, -0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCCFE,0xCCFF,0xCD00,0xCD02,0xCD03,0xCD04,0xCD05,0xCD06, -0xCD07,0xCD0A,0xCD0B,0xCD0D,0xCD0E,0xCD0F,0xCD11,0xCD12, -0xCD13,0xCD14,0xCD15,0xCD16,0xCD17,0xCD1A,0xCD1C,0xCD1E, -0xCD1F,0xCD20, 0, 0, 0, 0, 0, 0, -0xCD21,0xCD22,0xCD23,0xCD25,0xCD26,0xCD27,0xCD29,0xCD2A, -0xCD2B,0xCD2D,0xCD2E,0xCD2F,0xCD30,0xCD31,0xCD32,0xCD33, -0xCD34,0xCD35,0xCD36,0xCD37,0xCD38,0xCD3A,0xCD3B,0xCD3C, -0xCD3D,0xCD3E, 0, 0, 0, 0, 0, 0, -0xCD3F,0xCD40,0xCD41,0xCD42,0xCD43,0xCD44,0xCD45,0xCD46, -0xCD47,0xCD48,0xCD49,0xCD4A,0xCD4B,0xCD4C,0xCD4D,0xCD4E, -0xCD4F,0xCD50,0xCD51,0xCD52,0xCD53,0xCD54,0xCD55,0xCD56, -0xCD57,0xCD58,0xCD59,0xCD5A,0xCD5B,0xCD5D,0xCD5E,0xCD5F, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416, -0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, -0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, -0x042F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451,0x0436, -0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, -0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446, -0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, -0x044F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCD61,0xCD62,0xCD63,0xCD65,0xCD66,0xCD67,0xCD68,0xCD69, -0xCD6A,0xCD6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AC70,0xAC71,0xAC74,0xAC77, -0xAC78,0xAC7A,0xAC80,0xAC81,0xAC83,0xAC84,0xAC85,0xAC86, -0xAC89,0xAC8A,0xAC8B,0xAC8C,0xAC90,0xAC94,0xAC9C,0xAC9D, -0xAC9F,0xACA0,0xACA1,0xACA8,0xACA9,0xACAA,0xACAC,0xACAF, -0xACB0,0xACB8,0xACB9,0xACBB,0xACBC,0xACBD,0xACC1,0xACC4, -0xACC8,0xACCC,0xACD5,0xACD7,0xACE0,0xACE1,0xACE4,0xACE7, -0xACE8,0xACEA,0xACEC,0xACEF,0xACF0,0xACF1,0xACF3,0xACF5, -0xACF6,0xACFC,0xACFD,0xAD00,0xAD04,0xAD06, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCF02,0xCF03,0xCF05,0xCF06,0xCF07,0xCF09,0xCF0A,0xCF0B, -0xCF0C,0xCF0D,0xCF0E,0xCF0F,0xCF12,0xCF14,0xCF16,0xCF17, -0xCF18,0xCF19,0xCF1A,0xCF1B,0xCF1D,0xCF1E,0xCF1F,0xCF21, -0xCF22,0xCF23, 0, 0, 0, 0, 0, 0, -0xCF25,0xCF26,0xCF27,0xCF28,0xCF29,0xCF2A,0xCF2B,0xCF2E, -0xCF32,0xCF33,0xCF34,0xCF35,0xCF36,0xCF37,0xCF39,0xCF3A, -0xCF3B,0xCF3C,0xCF3D,0xCF3E,0xCF3F,0xCF40,0xCF41,0xCF42, -0xCF43,0xCF44, 0, 0, 0, 0, 0, 0, -0xCF45,0xCF46,0xCF47,0xCF48,0xCF49,0xCF4A,0xCF4B,0xCF4C, -0xCF4D,0xCF4E,0xCF4F,0xCF50,0xCF51,0xCF52,0xCF53,0xCF56, -0xCF57,0xCF59,0xCF5A,0xCF5B,0xCF5D,0xCF5E,0xCF5F,0xCF60, -0xCF61,0xCF62,0xCF63,0xCF66,0xCF68,0xCF6A,0xCF6B,0xCF6C, -0xAD0C,0xAD0D,0xAD0F,0xAD11,0xAD18,0xAD1C,0xAD20,0xAD29, -0xAD2C,0xAD2D,0xAD34,0xAD35,0xAD38,0xAD3C,0xAD44,0xAD45, -0xAD47,0xAD49,0xAD50,0xAD54,0xAD58,0xAD61,0xAD63,0xAD6C, -0xAD6D,0xAD70,0xAD73,0xAD74,0xAD75,0xAD76,0xAD7B,0xAD7C, -0xAD7D,0xAD7F,0xAD81,0xAD82,0xAD88,0xAD89,0xAD8C,0xAD90, -0xAD9C,0xAD9D,0xADA4,0xADB7,0xADC0,0xADC1,0xADC4,0xADC8, -0xADD0,0xADD1,0xADD3,0xADDC,0xADE0,0xADE4,0xADF8,0xADF9, -0xADFC,0xADFF,0xAE00,0xAE01,0xAE08,0xAE09,0xAE0B,0xAE0D, -0xAE14,0xAE30,0xAE31,0xAE34,0xAE37,0xAE38,0xAE3A,0xAE40, -0xAE41,0xAE43,0xAE45,0xAE46,0xAE4A,0xAE4C,0xAE4D,0xAE4E, -0xAE50,0xAE54,0xAE56,0xAE5C,0xAE5D,0xAE5F,0xAE60,0xAE61, -0xAE65,0xAE68,0xAE69,0xAE6C,0xAE70,0xAE78, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCF6D,0xCF6E,0xCF6F,0xCF72,0xCF73,0xCF75,0xCF76,0xCF77, -0xCF79,0xCF7A,0xCF7B,0xCF7C,0xCF7D,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000,0xB001,0xB004,0xB00C,0xB010,0xB014, -0xB01C,0xB01D,0xB028,0xB044,0xB045,0xB048,0xB04A,0xB04C, -0xB04E,0xB053,0xB054,0xB055,0xB057,0xB059, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xCFCC,0xCFCD,0xCFCE,0xCFCF,0xCFD0,0xCFD1,0xCFD2,0xCFD3, -0xCFD4,0xCFD5,0xCFD6,0xCFD7,0xCFD8,0xCFD9,0xCFDA,0xCFDB, -0xCFDC,0xCFDD,0xCFDE,0xCFDF,0xCFE2,0xCFE3,0xCFE5,0xCFE6, -0xCFE7,0xCFE9, 0, 0, 0, 0, 0, 0, -0xCFEA,0xCFEB,0xCFEC,0xCFED,0xCFEE,0xCFEF,0xCFF2,0xCFF4, -0xCFF6,0xCFF7,0xCFF8,0xCFF9,0xCFFA,0xCFFB,0xCFFD,0xCFFE, -0xCFFF,0xD001,0xD002,0xD003,0xD005,0xD006,0xD007,0xD008, -0xD009,0xD00A, 0, 0, 0, 0, 0, 0, -0xD00B,0xD00C,0xD00D,0xD00E,0xD00F,0xD010,0xD012,0xD013, -0xD014,0xD015,0xD016,0xD017,0xD019,0xD01A,0xD01B,0xD01C, -0xD01D,0xD01E,0xD01F,0xD020,0xD021,0xD022,0xD023,0xD024, -0xD025,0xD026,0xD027,0xD028,0xD029,0xD02A,0xD02B,0xD02C, -0xB05D,0xB07C,0xB07D,0xB080,0xB084,0xB08C,0xB08D,0xB08F, -0xB091,0xB098,0xB099,0xB09A,0xB09C,0xB09F,0xB0A0,0xB0A1, -0xB0A2,0xB0A8,0xB0A9,0xB0AB,0xB0AC,0xB0AD,0xB0AE,0xB0AF, -0xB0B1,0xB0B3,0xB0B4,0xB0B5,0xB0B8,0xB0BC,0xB0C4,0xB0C5, -0xB0C7,0xB0C8,0xB0C9,0xB0D0,0xB0D1,0xB0D4,0xB0D8,0xB0E0, -0xB0E5,0xB108,0xB109,0xB10B,0xB10C,0xB110,0xB112,0xB113, -0xB118,0xB119,0xB11B,0xB11C,0xB11D,0xB123,0xB124,0xB125, -0xB128,0xB12C,0xB134,0xB135,0xB137,0xB138,0xB139,0xB140, -0xB141,0xB144,0xB148,0xB150,0xB151,0xB154,0xB155,0xB158, -0xB15C,0xB160,0xB178,0xB179,0xB17C,0xB180,0xB182,0xB188, -0xB189,0xB18B,0xB18D,0xB192,0xB193,0xB194,0xB198,0xB19C, -0xB1A8,0xB1CC,0xB1D0,0xB1D4,0xB1DC,0xB1DD, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD02E,0xD02F,0xD030,0xD031,0xD032,0xD033,0xD036,0xD037, -0xD039,0xD03A,0xD03B,0xD03D,0xD03E,0xD03F,0xD040,0xD041, -0xD042,0xD043,0xD046,0xD048,0xD04A,0xD04B,0xD04C,0xD04D, -0xD04E,0xD04F, 0, 0, 0, 0, 0, 0, -0xD051,0xD052,0xD053,0xD055,0xD056,0xD057,0xD059,0xD05A, -0xD05B,0xD05C,0xD05D,0xD05E,0xD05F,0xD061,0xD062,0xD063, -0xD064,0xD065,0xD066,0xD067,0xD068,0xD069,0xD06A,0xD06B, -0xD06E,0xD06F, 0, 0, 0, 0, 0, 0, -0xD071,0xD072,0xD073,0xD075,0xD076,0xD077,0xD078,0xD079, -0xD07A,0xD07B,0xD07E,0xD07F,0xD080,0xD082,0xD083,0xD084, -0xD085,0xD086,0xD087,0xD088,0xD089,0xD08A,0xD08B,0xD08C, -0xD08D,0xD08E,0xD08F,0xD090,0xD091,0xD092,0xD093,0xD094, -0xB1DF,0xB1E8,0xB1E9,0xB1EC,0xB1F0,0xB1F9,0xB1FB,0xB1FD, -0xB204,0xB205,0xB208,0xB20B,0xB20C,0xB214,0xB215,0xB217, -0xB219,0xB220,0xB234,0xB23C,0xB258,0xB25C,0xB260,0xB268, -0xB269,0xB274,0xB275,0xB27C,0xB284,0xB285,0xB289,0xB290, -0xB291,0xB294,0xB298,0xB299,0xB29A,0xB2A0,0xB2A1,0xB2A3, -0xB2A5,0xB2A6,0xB2AA,0xB2AC,0xB2B0,0xB2B4,0xB2C8,0xB2C9, -0xB2CC,0xB2D0,0xB2D2,0xB2D8,0xB2D9,0xB2DB,0xB2DD,0xB2E2, -0xB2E4,0xB2E5,0xB2E6,0xB2E8,0xB2EB,0xB2EC,0xB2ED,0xB2EE, -0xB2EF,0xB2F3,0xB2F4,0xB2F5,0xB2F7,0xB2F8,0xB2F9,0xB2FA, -0xB2FB,0xB2FF,0xB300,0xB301,0xB304,0xB308,0xB310,0xB311, -0xB313,0xB314,0xB315,0xB31C,0xB354,0xB355,0xB356,0xB358, -0xB35B,0xB35C,0xB35E,0xB35F,0xB364,0xB365, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD095,0xD096,0xD097,0xD098,0xD099,0xD09A,0xD09B,0xD09C, -0xD09D,0xD09E,0xD09F,0xD0A0,0xD0A1,0xD0A2,0xD0A3,0xD0A6, -0xD0A7,0xD0A9,0xD0AA,0xD0AB,0xD0AD,0xD0AE,0xD0AF,0xD0B0, -0xD0B1,0xD0B2, 0, 0, 0, 0, 0, 0, -0xD0B3,0xD0B6,0xD0B8,0xD0BA,0xD0BB,0xD0BC,0xD0BD,0xD0BE, -0xD0BF,0xD0C2,0xD0C3,0xD0C5,0xD0C6,0xD0C7,0xD0CA,0xD0CB, -0xD0CC,0xD0CD,0xD0CE,0xD0CF,0xD0D2,0xD0D6,0xD0D7,0xD0D8, -0xD0D9,0xD0DA, 0, 0, 0, 0, 0, 0, -0xD0DB,0xD0DE,0xD0DF,0xD0E1,0xD0E2,0xD0E3,0xD0E5,0xD0E6, -0xD0E7,0xD0E8,0xD0E9,0xD0EA,0xD0EB,0xD0EE,0xD0F2,0xD0F3, -0xD0F4,0xD0F5,0xD0F6,0xD0F7,0xD0F9,0xD0FA,0xD0FB,0xD0FC, -0xD0FD,0xD0FE,0xD0FF,0xD100,0xD101,0xD102,0xD103,0xD104, -0xB367,0xB369,0xB36B,0xB36E,0xB370,0xB371,0xB374,0xB378, -0xB380,0xB381,0xB383,0xB384,0xB385,0xB38C,0xB390,0xB394, -0xB3A0,0xB3A1,0xB3A8,0xB3AC,0xB3C4,0xB3C5,0xB3C8,0xB3CB, -0xB3CC,0xB3CE,0xB3D0,0xB3D4,0xB3D5,0xB3D7,0xB3D9,0xB3DB, -0xB3DD,0xB3E0,0xB3E4,0xB3E8,0xB3FC,0xB410,0xB418,0xB41C, -0xB420,0xB428,0xB429,0xB42B,0xB434,0xB450,0xB451,0xB454, -0xB458,0xB460,0xB461,0xB463,0xB465,0xB46C,0xB480,0xB488, -0xB49D,0xB4A4,0xB4A8,0xB4AC,0xB4B5,0xB4B7,0xB4B9,0xB4C0, -0xB4C4,0xB4C8,0xB4D0,0xB4D5,0xB4DC,0xB4DD,0xB4E0,0xB4E3, -0xB4E4,0xB4E6,0xB4EC,0xB4ED,0xB4EF,0xB4F1,0xB4F8,0xB514, -0xB515,0xB518,0xB51B,0xB51C,0xB524,0xB525,0xB527,0xB528, -0xB529,0xB52A,0xB530,0xB531,0xB534,0xB538, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD105,0xD106,0xD107,0xD108,0xD109,0xD10A,0xD10B,0xD10C, -0xD10E,0xD10F,0xD110,0xD111,0xD112,0xD113,0xD114,0xD115, -0xD116,0xD117,0xD118,0xD119,0xD11A,0xD11B,0xD11C,0xD11D, -0xD11E,0xD11F, 0, 0, 0, 0, 0, 0, -0xD120,0xD121,0xD122,0xD123,0xD124,0xD125,0xD126,0xD127, -0xD128,0xD129,0xD12A,0xD12B,0xD12C,0xD12D,0xD12E,0xD12F, -0xD132,0xD133,0xD135,0xD136,0xD137,0xD139,0xD13B,0xD13C, -0xD13D,0xD13E, 0, 0, 0, 0, 0, 0, -0xD13F,0xD142,0xD146,0xD147,0xD148,0xD149,0xD14A,0xD14B, -0xD14E,0xD14F,0xD151,0xD152,0xD153,0xD155,0xD156,0xD157, -0xD158,0xD159,0xD15A,0xD15B,0xD15E,0xD160,0xD162,0xD163, -0xD164,0xD165,0xD166,0xD167,0xD169,0xD16A,0xD16B,0xD16D, -0xB540,0xB541,0xB543,0xB544,0xB545,0xB54B,0xB54C,0xB54D, -0xB550,0xB554,0xB55C,0xB55D,0xB55F,0xB560,0xB561,0xB5A0, -0xB5A1,0xB5A4,0xB5A8,0xB5AA,0xB5AB,0xB5B0,0xB5B1,0xB5B3, -0xB5B4,0xB5B5,0xB5BB,0xB5BC,0xB5BD,0xB5C0,0xB5C4,0xB5CC, -0xB5CD,0xB5CF,0xB5D0,0xB5D1,0xB5D8,0xB5EC,0xB610,0xB611, -0xB614,0xB618,0xB625,0xB62C,0xB634,0xB648,0xB664,0xB668, -0xB69C,0xB69D,0xB6A0,0xB6A4,0xB6AB,0xB6AC,0xB6B1,0xB6D4, -0xB6F0,0xB6F4,0xB6F8,0xB700,0xB701,0xB705,0xB728,0xB729, -0xB72C,0xB72F,0xB730,0xB738,0xB739,0xB73B,0xB744,0xB748, -0xB74C,0xB754,0xB755,0xB760,0xB764,0xB768,0xB770,0xB771, -0xB773,0xB775,0xB77C,0xB77D,0xB780,0xB784,0xB78C,0xB78D, -0xB78F,0xB790,0xB791,0xB792,0xB796,0xB797, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD16E,0xD16F,0xD170,0xD171,0xD172,0xD173,0xD174,0xD175, -0xD176,0xD177,0xD178,0xD179,0xD17A,0xD17B,0xD17D,0xD17E, -0xD17F,0xD180,0xD181,0xD182,0xD183,0xD185,0xD186,0xD187, -0xD189,0xD18A, 0, 0, 0, 0, 0, 0, -0xD18B,0xD18C,0xD18D,0xD18E,0xD18F,0xD190,0xD191,0xD192, -0xD193,0xD194,0xD195,0xD196,0xD197,0xD198,0xD199,0xD19A, -0xD19B,0xD19C,0xD19D,0xD19E,0xD19F,0xD1A2,0xD1A3,0xD1A5, -0xD1A6,0xD1A7, 0, 0, 0, 0, 0, 0, -0xD1A9,0xD1AA,0xD1AB,0xD1AC,0xD1AD,0xD1AE,0xD1AF,0xD1B2, -0xD1B4,0xD1B6,0xD1B7,0xD1B8,0xD1B9,0xD1BB,0xD1BD,0xD1BE, -0xD1BF,0xD1C1,0xD1C2,0xD1C3,0xD1C4,0xD1C5,0xD1C6,0xD1C7, -0xD1C8,0xD1C9,0xD1CA,0xD1CB,0xD1CC,0xD1CD,0xD1CE,0xD1CF, -0xB798,0xB799,0xB79C,0xB7A0,0xB7A8,0xB7A9,0xB7AB,0xB7AC, -0xB7AD,0xB7B4,0xB7B5,0xB7B8,0xB7C7,0xB7C9,0xB7EC,0xB7ED, -0xB7F0,0xB7F4,0xB7FC,0xB7FD,0xB7FF,0xB800,0xB801,0xB807, -0xB808,0xB809,0xB80C,0xB810,0xB818,0xB819,0xB81B,0xB81D, -0xB824,0xB825,0xB828,0xB82C,0xB834,0xB835,0xB837,0xB838, -0xB839,0xB840,0xB844,0xB851,0xB853,0xB85C,0xB85D,0xB860, -0xB864,0xB86C,0xB86D,0xB86F,0xB871,0xB878,0xB87C,0xB88D, -0xB8A8,0xB8B0,0xB8B4,0xB8B8,0xB8C0,0xB8C1,0xB8C3,0xB8C5, -0xB8CC,0xB8D0,0xB8D4,0xB8DD,0xB8DF,0xB8E1,0xB8E8,0xB8E9, -0xB8EC,0xB8F0,0xB8F8,0xB8F9,0xB8FB,0xB8FD,0xB904,0xB918, -0xB920,0xB93C,0xB93D,0xB940,0xB944,0xB94C,0xB94F,0xB951, -0xB958,0xB959,0xB95C,0xB960,0xB968,0xB969, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD1D0,0xD1D1,0xD1D2,0xD1D3,0xD1D4,0xD1D5,0xD1D6,0xD1D7, -0xD1D9,0xD1DA,0xD1DB,0xD1DC,0xD1DD,0xD1DE,0xD1DF,0xD1E0, -0xD1E1,0xD1E2,0xD1E3,0xD1E4,0xD1E5,0xD1E6,0xD1E7,0xD1E8, -0xD1E9,0xD1EA, 0, 0, 0, 0, 0, 0, -0xD1EB,0xD1EC,0xD1ED,0xD1EE,0xD1EF,0xD1F0,0xD1F1,0xD1F2, -0xD1F3,0xD1F5,0xD1F6,0xD1F7,0xD1F9,0xD1FA,0xD1FB,0xD1FC, -0xD1FD,0xD1FE,0xD1FF,0xD200,0xD201,0xD202,0xD203,0xD204, -0xD205,0xD206, 0, 0, 0, 0, 0, 0, -0xD208,0xD20A,0xD20B,0xD20C,0xD20D,0xD20E,0xD20F,0xD211, -0xD212,0xD213,0xD214,0xD215,0xD216,0xD217,0xD218,0xD219, -0xD21A,0xD21B,0xD21C,0xD21D,0xD21E,0xD21F,0xD220,0xD221, -0xD222,0xD223,0xD224,0xD225,0xD226,0xD227,0xD228,0xD229, -0xB96B,0xB96D,0xB974,0xB975,0xB978,0xB97C,0xB984,0xB985, -0xB987,0xB989,0xB98A,0xB98D,0xB98E,0xB9AC,0xB9AD,0xB9B0, -0xB9B4,0xB9BC,0xB9BD,0xB9BF,0xB9C1,0xB9C8,0xB9C9,0xB9CC, -0xB9CE,0xB9CF,0xB9D0,0xB9D1,0xB9D2,0xB9D8,0xB9D9,0xB9DB, -0xB9DD,0xB9DE,0xB9E1,0xB9E3,0xB9E4,0xB9E5,0xB9E8,0xB9EC, -0xB9F4,0xB9F5,0xB9F7,0xB9F8,0xB9F9,0xB9FA,0xBA00,0xBA01, -0xBA08,0xBA15,0xBA38,0xBA39,0xBA3C,0xBA40,0xBA42,0xBA48, -0xBA49,0xBA4B,0xBA4D,0xBA4E,0xBA53,0xBA54,0xBA55,0xBA58, -0xBA5C,0xBA64,0xBA65,0xBA67,0xBA68,0xBA69,0xBA70,0xBA71, -0xBA74,0xBA78,0xBA83,0xBA84,0xBA85,0xBA87,0xBA8C,0xBAA8, -0xBAA9,0xBAAB,0xBAAC,0xBAB0,0xBAB2,0xBAB8,0xBAB9,0xBABB, -0xBABD,0xBAC4,0xBAC8,0xBAD8,0xBAD9,0xBAFC, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD22A,0xD22B,0xD22E,0xD22F,0xD231,0xD232,0xD233,0xD235, -0xD236,0xD237,0xD238,0xD239,0xD23A,0xD23B,0xD23E,0xD240, -0xD242,0xD243,0xD244,0xD245,0xD246,0xD247,0xD249,0xD24A, -0xD24B,0xD24C, 0, 0, 0, 0, 0, 0, -0xD24D,0xD24E,0xD24F,0xD250,0xD251,0xD252,0xD253,0xD254, -0xD255,0xD256,0xD257,0xD258,0xD259,0xD25A,0xD25B,0xD25D, -0xD25E,0xD25F,0xD260,0xD261,0xD262,0xD263,0xD265,0xD266, -0xD267,0xD268, 0, 0, 0, 0, 0, 0, -0xD269,0xD26A,0xD26B,0xD26C,0xD26D,0xD26E,0xD26F,0xD270, -0xD271,0xD272,0xD273,0xD274,0xD275,0xD276,0xD277,0xD278, -0xD279,0xD27A,0xD27B,0xD27C,0xD27D,0xD27E,0xD27F,0xD282, -0xD283,0xD285,0xD286,0xD287,0xD289,0xD28A,0xD28B,0xD28C, -0xBB00,0xBB04,0xBB0D,0xBB0F,0xBB11,0xBB18,0xBB1C,0xBB20, -0xBB29,0xBB2B,0xBB34,0xBB35,0xBB36,0xBB38,0xBB3B,0xBB3C, -0xBB3D,0xBB3E,0xBB44,0xBB45,0xBB47,0xBB49,0xBB4D,0xBB4F, -0xBB50,0xBB54,0xBB58,0xBB61,0xBB63,0xBB6C,0xBB88,0xBB8C, -0xBB90,0xBBA4,0xBBA8,0xBBAC,0xBBB4,0xBBB7,0xBBC0,0xBBC4, -0xBBC8,0xBBD0,0xBBD3,0xBBF8,0xBBF9,0xBBFC,0xBBFF,0xBC00, -0xBC02,0xBC08,0xBC09,0xBC0B,0xBC0C,0xBC0D,0xBC0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xD322,0xD323, 0, 0, 0, 0, 0, 0, -0xD324,0xD326,0xD327,0xD32A,0xD32B,0xD32D,0xD32E,0xD32F, -0xD331,0xD332,0xD333,0xD334,0xD335,0xD336,0xD337,0xD33A, -0xD33E,0xD33F,0xD340,0xD341,0xD342,0xD343,0xD346,0xD347, -0xD348,0xD349, 0, 0, 0, 0, 0, 0, -0xD34A,0xD34B,0xD34C,0xD34D,0xD34E,0xD34F,0xD350,0xD351, -0xD352,0xD353,0xD354,0xD355,0xD356,0xD357,0xD358,0xD359, -0xD35A,0xD35B,0xD35C,0xD35D,0xD35E,0xD35F,0xD360,0xD361, -0xD362,0xD363,0xD364,0xD365,0xD366,0xD367,0xD368,0xD369, -0xBE68,0xBE6A,0xBE70,0xBE71,0xBE73,0xBE74,0xBE75,0xBE7B, -0xBE7C,0xBE7D,0xBE80,0xBE84,0xBE8C,0xBE8D,0xBE8F,0xBE90, -0xBE91,0xBE98,0xBE99,0xBEA8,0xBED0,0xBED1,0xBED4,0xBED7, -0xBED8,0xBEE0,0xBEE3,0xBEE4,0xBEE5,0xBEEC,0xBF01,0xBF08, -0xBF09,0xBF18,0xBF19,0xBF1B,0xBF1C,0xBF1D,0xBF40,0xBF41, -0xBF44,0xBF48,0xBF50,0xBF51,0xBF55,0xBF94,0xBFB0,0xBFC5, -0xBFCC,0xBFCD,0xBFD0,0xBFD4,0xBFDC,0xBFDF,0xBFE1,0xC03C, -0xC051,0xC058,0xC05C,0xC060,0xC068,0xC069,0xC090,0xC091, -0xC094,0xC098,0xC0A0,0xC0A1,0xC0A3,0xC0A5,0xC0AC,0xC0AD, -0xC0AF,0xC0B0,0xC0B3,0xC0B4,0xC0B5,0xC0B6,0xC0BC,0xC0BD, -0xC0BF,0xC0C0,0xC0C1,0xC0C5,0xC0C8,0xC0C9,0xC0CC,0xC0D0, -0xC0D8,0xC0D9,0xC0DB,0xC0DC,0xC0DD,0xC0E4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD36A,0xD36B,0xD36C,0xD36D,0xD36E,0xD36F,0xD370,0xD371, -0xD372,0xD373,0xD374,0xD375,0xD376,0xD377,0xD378,0xD379, -0xD37A,0xD37B,0xD37E,0xD37F,0xD381,0xD382,0xD383,0xD385, -0xD386,0xD387, 0, 0, 0, 0, 0, 0, -0xD388,0xD389,0xD38A,0xD38B,0xD38E,0xD392,0xD393,0xD394, -0xD395,0xD396,0xD397,0xD39A,0xD39B,0xD39D,0xD39E,0xD39F, -0xD3A1,0xD3A2,0xD3A3,0xD3A4,0xD3A5,0xD3A6,0xD3A7,0xD3AA, -0xD3AC,0xD3AE, 0, 0, 0, 0, 0, 0, -0xD3AF,0xD3B0,0xD3B1,0xD3B2,0xD3B3,0xD3B5,0xD3B6,0xD3B7, -0xD3B9,0xD3BA,0xD3BB,0xD3BD,0xD3BE,0xD3BF,0xD3C0,0xD3C1, -0xD3C2,0xD3C3,0xD3C6,0xD3C7,0xD3CA,0xD3CB,0xD3CC,0xD3CD, -0xD3CE,0xD3CF,0xD3D1,0xD3D2,0xD3D3,0xD3D4,0xD3D5,0xD3D6, -0xC0E5,0xC0E8,0xC0EC,0xC0F4,0xC0F5,0xC0F7,0xC0F9,0xC100, -0xC104,0xC108,0xC110,0xC115,0xC11C,0xC11D,0xC11E,0xC11F, -0xC120,0xC123,0xC124,0xC126,0xC127,0xC12C,0xC12D,0xC12F, -0xC130,0xC131,0xC136,0xC138,0xC139,0xC13C,0xC140,0xC148, -0xC149,0xC14B,0xC14C,0xC14D,0xC154,0xC155,0xC158,0xC15C, -0xC164,0xC165,0xC167,0xC168,0xC169,0xC170,0xC174,0xC178, -0xC185,0xC18C,0xC18D,0xC18E,0xC190,0xC194,0xC196,0xC19C, -0xC19D,0xC19F,0xC1A1,0xC1A5,0xC1A8,0xC1A9,0xC1AC,0xC1B0, -0xC1BD,0xC1C4,0xC1C8,0xC1CC,0xC1D4,0xC1D7,0xC1D8,0xC1E0, -0xC1E4,0xC1E8,0xC1F0,0xC1F1,0xC1F3,0xC1FC,0xC1FD,0xC200, -0xC204,0xC20C,0xC20D,0xC20F,0xC211,0xC218,0xC219,0xC21C, -0xC21F,0xC220,0xC228,0xC229,0xC22B,0xC22D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD3D7,0xD3D9,0xD3DA,0xD3DB,0xD3DC,0xD3DD,0xD3DE,0xD3DF, -0xD3E0,0xD3E2,0xD3E4,0xD3E5,0xD3E6,0xD3E7,0xD3E8,0xD3E9, -0xD3EA,0xD3EB,0xD3EE,0xD3EF,0xD3F1,0xD3F2,0xD3F3,0xD3F5, -0xD3F6,0xD3F7, 0, 0, 0, 0, 0, 0, -0xD3F8,0xD3F9,0xD3FA,0xD3FB,0xD3FE,0xD400,0xD402,0xD403, -0xD404,0xD405,0xD406,0xD407,0xD409,0xD40A,0xD40B,0xD40C, -0xD40D,0xD40E,0xD40F,0xD410,0xD411,0xD412,0xD413,0xD414, -0xD415,0xD416, 0, 0, 0, 0, 0, 0, -0xD417,0xD418,0xD419,0xD41A,0xD41B,0xD41C,0xD41E,0xD41F, -0xD420,0xD421,0xD422,0xD423,0xD424,0xD425,0xD426,0xD427, -0xD428,0xD429,0xD42A,0xD42B,0xD42C,0xD42D,0xD42E,0xD42F, -0xD430,0xD431,0xD432,0xD433,0xD434,0xD435,0xD436,0xD437, -0xC22F,0xC231,0xC232,0xC234,0xC248,0xC250,0xC251,0xC254, -0xC258,0xC260,0xC265,0xC26C,0xC26D,0xC270,0xC274,0xC27C, -0xC27D,0xC27F,0xC281,0xC288,0xC289,0xC290,0xC298,0xC29B, -0xC29D,0xC2A4,0xC2A5,0xC2A8,0xC2AC,0xC2AD,0xC2B4,0xC2B5, -0xC2B7,0xC2B9,0xC2DC,0xC2DD,0xC2E0,0xC2E3,0xC2E4,0xC2EB, -0xC2EC,0xC2ED,0xC2EF,0xC2F1,0xC2F6,0xC2F8,0xC2F9,0xC2FB, -0xC2FC,0xC300,0xC308,0xC309,0xC30C,0xC30D,0xC313,0xC314, -0xC315,0xC318,0xC31C,0xC324,0xC325,0xC328,0xC329,0xC345, -0xC368,0xC369,0xC36C,0xC370,0xC372,0xC378,0xC379,0xC37C, -0xC37D,0xC384,0xC388,0xC38C,0xC3C0,0xC3D8,0xC3D9,0xC3DC, -0xC3DF,0xC3E0,0xC3E2,0xC3E8,0xC3E9,0xC3ED,0xC3F4,0xC3F5, -0xC3F8,0xC408,0xC410,0xC424,0xC42C,0xC430, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD438,0xD439,0xD43A,0xD43B,0xD43C,0xD43D,0xD43E,0xD43F, -0xD441,0xD442,0xD443,0xD445,0xD446,0xD447,0xD448,0xD449, -0xD44A,0xD44B,0xD44C,0xD44D,0xD44E,0xD44F,0xD450,0xD451, -0xD452,0xD453, 0, 0, 0, 0, 0, 0, -0xD454,0xD455,0xD456,0xD457,0xD458,0xD459,0xD45A,0xD45B, -0xD45D,0xD45E,0xD45F,0xD461,0xD462,0xD463,0xD465,0xD466, -0xD467,0xD468,0xD469,0xD46A,0xD46B,0xD46C,0xD46E,0xD470, -0xD471,0xD472, 0, 0, 0, 0, 0, 0, -0xD473,0xD474,0xD475,0xD476,0xD477,0xD47A,0xD47B,0xD47D, -0xD47E,0xD481,0xD483,0xD484,0xD485,0xD486,0xD487,0xD48A, -0xD48C,0xD48E,0xD48F,0xD490,0xD491,0xD492,0xD493,0xD495, -0xD496,0xD497,0xD498,0xD499,0xD49A,0xD49B,0xD49C,0xD49D, -0xC434,0xC43C,0xC43D,0xC448,0xC464,0xC465,0xC468,0xC46C, -0xC474,0xC475,0xC479,0xC480,0xC494,0xC49C,0xC4B8,0xC4BC, -0xC4E9,0xC4F0,0xC4F1,0xC4F4,0xC4F8,0xC4FA,0xC4FF,0xC500, -0xC501,0xC50C,0xC510,0xC514,0xC51C,0xC528,0xC529,0xC52C, -0xC530,0xC538,0xC539,0xC53B,0xC53D,0xC544,0xC545,0xC548, -0xC549,0xC54A,0xC54C,0xC54D,0xC54E,0xC553,0xC554,0xC555, -0xC557,0xC558,0xC559,0xC55D,0xC55E,0xC560,0xC561,0xC564, -0xC568,0xC570,0xC571,0xC573,0xC574,0xC575,0xC57C,0xC57D, -0xC580,0xC584,0xC587,0xC58C,0xC58D,0xC58F,0xC591,0xC595, -0xC597,0xC598,0xC59C,0xC5A0,0xC5A9,0xC5B4,0xC5B5,0xC5B8, -0xC5B9,0xC5BB,0xC5BC,0xC5BD,0xC5BE,0xC5C4,0xC5C5,0xC5C6, -0xC5C7,0xC5C8,0xC5C9,0xC5CA,0xC5CC,0xC5CE, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD49E,0xD49F,0xD4A0,0xD4A1,0xD4A2,0xD4A3,0xD4A4,0xD4A5, -0xD4A6,0xD4A7,0xD4A8,0xD4AA,0xD4AB,0xD4AC,0xD4AD,0xD4AE, -0xD4AF,0xD4B0,0xD4B1,0xD4B2,0xD4B3,0xD4B4,0xD4B5,0xD4B6, -0xD4B7,0xD4B8, 0, 0, 0, 0, 0, 0, -0xD4B9,0xD4BA,0xD4BB,0xD4BC,0xD4BD,0xD4BE,0xD4BF,0xD4C0, -0xD4C1,0xD4C2,0xD4C3,0xD4C4,0xD4C5,0xD4C6,0xD4C7,0xD4C8, -0xD4C9,0xD4CA,0xD4CB,0xD4CD,0xD4CE,0xD4CF,0xD4D1,0xD4D2, -0xD4D3,0xD4D5, 0, 0, 0, 0, 0, 0, -0xD4D6,0xD4D7,0xD4D8,0xD4D9,0xD4DA,0xD4DB,0xD4DD,0xD4DE, -0xD4E0,0xD4E1,0xD4E2,0xD4E3,0xD4E4,0xD4E5,0xD4E6,0xD4E7, -0xD4E9,0xD4EA,0xD4EB,0xD4ED,0xD4EE,0xD4EF,0xD4F1,0xD4F2, -0xD4F3,0xD4F4,0xD4F5,0xD4F6,0xD4F7,0xD4F9,0xD4FA,0xD4FC, -0xC5D0,0xC5D1,0xC5D4,0xC5D8,0xC5E0,0xC5E1,0xC5E3,0xC5E5, -0xC5EC,0xC5ED,0xC5EE,0xC5F0,0xC5F4,0xC5F6,0xC5F7,0xC5FC, -0xC5FD,0xC5FE,0xC5FF,0xC600,0xC601,0xC605,0xC606,0xC607, -0xC608,0xC60C,0xC610,0xC618,0xC619,0xC61B,0xC61C,0xC624, -0xC625,0xC628,0xC62C,0xC62D,0xC62E,0xC630,0xC633,0xC634, -0xC635,0xC637,0xC639,0xC63B,0xC640,0xC641,0xC644,0xC648, -0xC650,0xC651,0xC653,0xC654,0xC655,0xC65C,0xC65D,0xC660, -0xC66C,0xC66F,0xC671,0xC678,0xC679,0xC67C,0xC680,0xC688, -0xC689,0xC68B,0xC68D,0xC694,0xC695,0xC698,0xC69C,0xC6A4, -0xC6A5,0xC6A7,0xC6A9,0xC6B0,0xC6B1,0xC6B4,0xC6B8,0xC6B9, -0xC6BA,0xC6C0,0xC6C1,0xC6C3,0xC6C5,0xC6CC,0xC6CD,0xC6D0, -0xC6D4,0xC6DC,0xC6DD,0xC6E0,0xC6E1,0xC6E8, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD4FE,0xD4FF,0xD500,0xD501,0xD502,0xD503,0xD505,0xD506, -0xD507,0xD509,0xD50A,0xD50B,0xD50D,0xD50E,0xD50F,0xD510, -0xD511,0xD512,0xD513,0xD516,0xD518,0xD519,0xD51A,0xD51B, -0xD51C,0xD51D, 0, 0, 0, 0, 0, 0, -0xD51E,0xD51F,0xD520,0xD521,0xD522,0xD523,0xD524,0xD525, -0xD526,0xD527,0xD528,0xD529,0xD52A,0xD52B,0xD52C,0xD52D, -0xD52E,0xD52F,0xD530,0xD531,0xD532,0xD533,0xD534,0xD535, -0xD536,0xD537, 0, 0, 0, 0, 0, 0, -0xD538,0xD539,0xD53A,0xD53B,0xD53E,0xD53F,0xD541,0xD542, -0xD543,0xD545,0xD546,0xD547,0xD548,0xD549,0xD54A,0xD54B, -0xD54E,0xD550,0xD552,0xD553,0xD554,0xD555,0xD556,0xD557, -0xD55A,0xD55B,0xD55D,0xD55E,0xD55F,0xD561,0xD562,0xD563, -0xC6E9,0xC6EC,0xC6F0,0xC6F8,0xC6F9,0xC6FD,0xC704,0xC705, -0xC708,0xC70C,0xC714,0xC715,0xC717,0xC719,0xC720,0xC721, -0xC724,0xC728,0xC730,0xC731,0xC733,0xC735,0xC737,0xC73C, -0xC73D,0xC740,0xC744,0xC74A,0xC74C,0xC74D,0xC74F,0xC751, -0xC752,0xC753,0xC754,0xC755,0xC756,0xC757,0xC758,0xC75C, -0xC760,0xC768,0xC76B,0xC774,0xC775,0xC778,0xC77C,0xC77D, -0xC77E,0xC783,0xC784,0xC785,0xC787,0xC788,0xC789,0xC78A, -0xC78E,0xC790,0xC791,0xC794,0xC796,0xC797,0xC798,0xC79A, -0xC7A0,0xC7A1,0xC7A3,0xC7A4,0xC7A5,0xC7A6,0xC7AC,0xC7AD, -0xC7B0,0xC7B4,0xC7BC,0xC7BD,0xC7BF,0xC7C0,0xC7C1,0xC7C8, -0xC7C9,0xC7CC,0xC7CE,0xC7D0,0xC7D8,0xC7DD,0xC7E4,0xC7E8, -0xC7EC,0xC800,0xC801,0xC804,0xC808,0xC80A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD564,0xD566,0xD567,0xD56A,0xD56C,0xD56E,0xD56F,0xD570, -0xD571,0xD572,0xD573,0xD576,0xD577,0xD579,0xD57A,0xD57B, -0xD57D,0xD57E,0xD57F,0xD580,0xD581,0xD582,0xD583,0xD586, -0xD58A,0xD58B, 0, 0, 0, 0, 0, 0, -0xD58C,0xD58D,0xD58E,0xD58F,0xD591,0xD592,0xD593,0xD594, -0xD595,0xD596,0xD597,0xD598,0xD599,0xD59A,0xD59B,0xD59C, -0xD59D,0xD59E,0xD59F,0xD5A0,0xD5A1,0xD5A2,0xD5A3,0xD5A4, -0xD5A6,0xD5A7, 0, 0, 0, 0, 0, 0, -0xD5A8,0xD5A9,0xD5AA,0xD5AB,0xD5AC,0xD5AD,0xD5AE,0xD5AF, -0xD5B0,0xD5B1,0xD5B2,0xD5B3,0xD5B4,0xD5B5,0xD5B6,0xD5B7, -0xD5B8,0xD5B9,0xD5BA,0xD5BB,0xD5BC,0xD5BD,0xD5BE,0xD5BF, -0xD5C0,0xD5C1,0xD5C2,0xD5C3,0xD5C4,0xD5C5,0xD5C6,0xD5C7, -0xC810,0xC811,0xC813,0xC815,0xC816,0xC81C,0xC81D,0xC820, -0xC824,0xC82C,0xC82D,0xC82F,0xC831,0xC838,0xC83C,0xC840, -0xC848,0xC849,0xC84C,0xC84D,0xC854,0xC870,0xC871,0xC874, -0xC878,0xC87A,0xC880,0xC881,0xC883,0xC885,0xC886,0xC887, -0xC88B,0xC88C,0xC88D,0xC894,0xC89D,0xC89F,0xC8A1,0xC8A8, -0xC8BC,0xC8BD,0xC8C4,0xC8C8,0xC8CC,0xC8D4,0xC8D5,0xC8D7, -0xC8D9,0xC8E0,0xC8E1,0xC8E4,0xC8F5,0xC8FC,0xC8FD,0xC900, -0xC904,0xC905,0xC906,0xC90C,0xC90D,0xC90F,0xC911,0xC918, -0xC92C,0xC934,0xC950,0xC951,0xC954,0xC958,0xC960,0xC961, -0xC963,0xC96C,0xC970,0xC974,0xC97C,0xC988,0xC989,0xC98C, -0xC990,0xC998,0xC999,0xC99B,0xC99D,0xC9C0,0xC9C1,0xC9C4, -0xC9C7,0xC9C8,0xC9CA,0xC9D0,0xC9D1,0xC9D3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD5CA,0xD5CB,0xD5CD,0xD5CE,0xD5CF,0xD5D1,0xD5D3,0xD5D4, -0xD5D5,0xD5D6,0xD5D7,0xD5DA,0xD5DC,0xD5DE,0xD5DF,0xD5E0, -0xD5E1,0xD5E2,0xD5E3,0xD5E6,0xD5E7,0xD5E9,0xD5EA,0xD5EB, -0xD5ED,0xD5EE, 0, 0, 0, 0, 0, 0, -0xD5EF,0xD5F0,0xD5F1,0xD5F2,0xD5F3,0xD5F6,0xD5F8,0xD5FA, -0xD5FB,0xD5FC,0xD5FD,0xD5FE,0xD5FF,0xD602,0xD603,0xD605, -0xD606,0xD607,0xD609,0xD60A,0xD60B,0xD60C,0xD60D,0xD60E, -0xD60F,0xD612, 0, 0, 0, 0, 0, 0, -0xD616,0xD617,0xD618,0xD619,0xD61A,0xD61B,0xD61D,0xD61E, -0xD61F,0xD621,0xD622,0xD623,0xD625,0xD626,0xD627,0xD628, -0xD629,0xD62A,0xD62B,0xD62C,0xD62E,0xD62F,0xD630,0xD631, -0xD632,0xD633,0xD634,0xD635,0xD636,0xD637,0xD63A,0xD63B, -0xC9D5,0xC9D6,0xC9D9,0xC9DA,0xC9DC,0xC9DD,0xC9E0,0xC9E2, -0xC9E4,0xC9E7,0xC9EC,0xC9ED,0xC9EF,0xC9F0,0xC9F1,0xC9F8, -0xC9F9,0xC9FC,0xCA00,0xCA08,0xCA09,0xCA0B,0xCA0C,0xCA0D, -0xCA14,0xCA18,0xCA29,0xCA4C,0xCA4D,0xCA50,0xCA54,0xCA5C, -0xCA5D,0xCA5F,0xCA60,0xCA61,0xCA68,0xCA7D,0xCA84,0xCA98, -0xCABC,0xCABD,0xCAC0,0xCAC4,0xCACC,0xCACD,0xCACF,0xCAD1, -0xCAD3,0xCAD8,0xCAD9,0xCAE0,0xCAEC,0xCAF4,0xCB08,0xCB10, -0xCB14,0xCB18,0xCB20,0xCB21,0xCB41,0xCB48,0xCB49,0xCB4C, -0xCB50,0xCB58,0xCB59,0xCB5D,0xCB64,0xCB78,0xCB79,0xCB9C, -0xCBB8,0xCBD4,0xCBE4,0xCBE7,0xCBE9,0xCC0C,0xCC0D,0xCC10, -0xCC14,0xCC1C,0xCC1D,0xCC21,0xCC22,0xCC27,0xCC28,0xCC29, -0xCC2C,0xCC2E,0xCC30,0xCC38,0xCC39,0xCC3B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD63D,0xD63E,0xD63F,0xD641,0xD642,0xD643,0xD644,0xD646, -0xD647,0xD64A,0xD64C,0xD64E,0xD64F,0xD650,0xD652,0xD653, -0xD656,0xD657,0xD659,0xD65A,0xD65B,0xD65D,0xD65E,0xD65F, -0xD660,0xD661, 0, 0, 0, 0, 0, 0, -0xD662,0xD663,0xD664,0xD665,0xD666,0xD668,0xD66A,0xD66B, -0xD66C,0xD66D,0xD66E,0xD66F,0xD672,0xD673,0xD675,0xD676, -0xD677,0xD678,0xD679,0xD67A,0xD67B,0xD67C,0xD67D,0xD67E, -0xD67F,0xD680, 0, 0, 0, 0, 0, 0, -0xD681,0xD682,0xD684,0xD686,0xD687,0xD688,0xD689,0xD68A, -0xD68B,0xD68E,0xD68F,0xD691,0xD692,0xD693,0xD695,0xD696, -0xD697,0xD698,0xD699,0xD69A,0xD69B,0xD69C,0xD69E,0xD6A0, -0xD6A2,0xD6A3,0xD6A4,0xD6A5,0xD6A6,0xD6A7,0xD6A9,0xD6AA, -0xCC3C,0xCC3D,0xCC3E,0xCC44,0xCC45,0xCC48,0xCC4C,0xCC54, -0xCC55,0xCC57,0xCC58,0xCC59,0xCC60,0xCC64,0xCC66,0xCC68, -0xCC70,0xCC75,0xCC98,0xCC99,0xCC9C,0xCCA0,0xCCA8,0xCCA9, -0xCCAB,0xCCAC,0xCCAD,0xCCB4,0xCCB5,0xCCB8,0xCCBC,0xCCC4,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 0, -0xD6EE,0xD6EF,0xD6F1,0xD6F2,0xD6F3,0xD6F4,0xD6F6,0xD6F7, -0xD6F8,0xD6F9,0xD6FA,0xD6FB,0xD6FE,0xD6FF,0xD701,0xD702, -0xD703,0xD705,0xD706,0xD707,0xD708,0xD709,0xD70A,0xD70B, -0xD70C,0xD70D,0xD70E,0xD70F,0xD710,0xD712,0xD713,0xD714, -0xCE58,0xCE59,0xCE5C,0xCE5F,0xCE60,0xCE61,0xCE68,0xCE69, -0xCE6B,0xCE6D,0xCE74,0xCE75,0xCE78,0xCE7C,0xCE84,0xCE85, -0xCE87,0xCE89,0xCE90,0xCE91,0xCE94,0xCE98,0xCEA0,0xCEA1, -0xCEA3,0xCEA4,0xCEA5,0xCEAC,0xCEAD,0xCEC1,0xCEE4,0xCEE5, -0xCEE8,0xCEEB,0xCEEC,0xCEF4,0xCEF5,0xCEF7,0xCEF8,0xCEF9, -0xCF00,0xCF01,0xCF04,0xCF08,0xCF10,0xCF11,0xCF13,0xCF15, -0xCF1C,0xCF20,0xCF24,0xCF2C,0xCF2D,0xCF2F,0xCF30,0xCF31, -0xCF38,0xCF54,0xCF55,0xCF58,0xCF5C,0xCF64,0xCF65,0xCF67, -0xCF69,0xCF70,0xCF71,0xCF74,0xCF78,0xCF80,0xCF85,0xCF8C, -0xCFA1,0xCFA8,0xCFB0,0xCFC4,0xCFE0,0xCFE1,0xCFE4,0xCFE8, -0xCFF0,0xCFF1,0xCFF3,0xCFF5,0xCFFC,0xD000,0xD004,0xD011, -0xD018,0xD02D,0xD034,0xD035,0xD038,0xD03C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD715,0xD716,0xD717,0xD71A,0xD71B,0xD71D,0xD71E,0xD71F, -0xD721,0xD722,0xD723,0xD724,0xD725,0xD726,0xD727,0xD72A, -0xD72C,0xD72E,0xD72F,0xD730,0xD731,0xD732,0xD733,0xD736, -0xD737,0xD739, 0, 0, 0, 0, 0, 0, -0xD73A,0xD73B,0xD73D,0xD73E,0xD73F,0xD740,0xD741,0xD742, -0xD743,0xD745,0xD746,0xD748,0xD74A,0xD74B,0xD74C,0xD74D, -0xD74E,0xD74F,0xD752,0xD753,0xD755,0xD75A,0xD75B,0xD75C, -0xD75D,0xD75E, 0, 0, 0, 0, 0, 0, -0xD75F,0xD762,0xD764,0xD766,0xD767,0xD768,0xD76A,0xD76B, -0xD76D,0xD76E,0xD76F,0xD771,0xD772,0xD773,0xD775,0xD776, -0xD777,0xD778,0xD779,0xD77A,0xD77B,0xD77E,0xD77F,0xD780, -0xD782,0xD783,0xD784,0xD785,0xD786,0xD787,0xD78A,0xD78B, -0xD044,0xD045,0xD047,0xD049,0xD050,0xD054,0xD058,0xD060, -0xD06C,0xD06D,0xD070,0xD074,0xD07C,0xD07D,0xD081,0xD0A4, -0xD0A5,0xD0A8,0xD0AC,0xD0B4,0xD0B5,0xD0B7,0xD0B9,0xD0C0, -0xD0C1,0xD0C4,0xD0C8,0xD0C9,0xD0D0,0xD0D1,0xD0D3,0xD0D4, -0xD0D5,0xD0DC,0xD0DD,0xD0E0,0xD0E4,0xD0EC,0xD0ED,0xD0EF, -0xD0F0,0xD0F1,0xD0F8,0xD10D,0xD130,0xD131,0xD134,0xD138, -0xD13A,0xD140,0xD141,0xD143,0xD144,0xD145,0xD14C,0xD14D, -0xD150,0xD154,0xD15C,0xD15D,0xD15F,0xD161,0xD168,0xD16C, -0xD17C,0xD184,0xD188,0xD1A0,0xD1A1,0xD1A4,0xD1A8,0xD1B0, -0xD1B1,0xD1B3,0xD1B5,0xD1BA,0xD1BC,0xD1C0,0xD1D8,0xD1F4, -0xD1F8,0xD207,0xD209,0xD210,0xD22C,0xD22D,0xD230,0xD234, -0xD23C,0xD23D,0xD23F,0xD241,0xD248,0xD25C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD78D,0xD78E,0xD78F,0xD791,0xD792,0xD793,0xD794,0xD795, -0xD796,0xD797,0xD79A,0xD79C,0xD79E,0xD79F,0xD7A0,0xD7A1, -0xD7A2,0xD7A3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD264,0xD280,0xD281,0xD284,0xD288,0xD290,0xD291,0xD295, -0xD29C,0xD2A0,0xD2A4,0xD2AC,0xD2B1,0xD2B8,0xD2B9,0xD2BC, -0xD2BF,0xD2C0,0xD2C2,0xD2C8,0xD2C9,0xD2CB,0xD2D4,0xD2D8, -0xD2DC,0xD2E4,0xD2E5,0xD2F0,0xD2F1,0xD2F4,0xD2F8,0xD300, -0xD301,0xD303,0xD305,0xD30C,0xD30D,0xD30E,0xD310,0xD314, -0xD316,0xD31C,0xD31D,0xD31F,0xD320,0xD321,0xD325,0xD328, -0xD329,0xD32C,0xD330,0xD338,0xD339,0xD33B,0xD33C,0xD33D, -0xD344,0xD345,0xD37C,0xD37D,0xD380,0xD384,0xD38C,0xD38D, -0xD38F,0xD390,0xD391,0xD398,0xD399,0xD39C,0xD3A0,0xD3A8, -0xD3A9,0xD3AB,0xD3AD,0xD3B4,0xD3B8,0xD3BC,0xD3C4,0xD3C5, -0xD3C8,0xD3C9,0xD3D0,0xD3D8,0xD3E1,0xD3E3,0xD3EC,0xD3ED, -0xD3F0,0xD3F4,0xD3FC,0xD3FD,0xD3FF,0xD401, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD408,0xD41D,0xD440,0xD444,0xD45C,0xD460,0xD464,0xD46D, -0xD46F,0xD478,0xD479,0xD47C,0xD47F,0xD480,0xD482,0xD488, -0xD489,0xD48B,0xD48D,0xD494,0xD4A9,0xD4CC,0xD4D0,0xD4D4, -0xD4DC,0xD4DF,0xD4E8,0xD4EC,0xD4F0,0xD4F8,0xD4FB,0xD4FD, -0xD504,0xD508,0xD50C,0xD514,0xD515,0xD517,0xD53C,0xD53D, -0xD540,0xD544,0xD54C,0xD54D,0xD54F,0xD551,0xD558,0xD559, -0xD55C,0xD560,0xD565,0xD568,0xD569,0xD56B,0xD56D,0xD574, -0xD575,0xD578,0xD57C,0xD584,0xD585,0xD587,0xD588,0xD589, -0xD590,0xD5A5,0xD5C8,0xD5C9,0xD5CC,0xD5D0,0xD5D2,0xD5D8, -0xD5D9,0xD5DB,0xD5DD,0xD5E4,0xD5E5,0xD5E8,0xD5EC,0xD5F4, -0xD5F5,0xD5F7,0xD5F9,0xD600,0xD601,0xD604,0xD608,0xD610, -0xD611,0xD613,0xD614,0xD615,0xD61C,0xD620, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xD624,0xD62D,0xD638,0xD639,0xD63C,0xD640,0xD645,0xD648, -0xD649,0xD64B,0xD64D,0xD651,0xD654,0xD655,0xD658,0xD65C, -0xD667,0xD669,0xD670,0xD671,0xD674,0xD683,0xD685,0xD68C, -0xD68D,0xD690,0xD694,0xD69D,0xD69F,0xD6A1,0xD6A8,0xD6AC, -0xD6B0,0xD6B9,0xD6BB,0xD6C4,0xD6C5,0xD6C8,0xD6CC,0xD6D1, -0xD6D4,0xD6D7,0xD6D9,0xD6E0,0xD6E4,0xD6E8,0xD6F0,0xD6F5, -0xD6FC,0xD6FD,0xD700,0xD704,0xD711,0xD718,0xD719,0xD71C, -0xD720,0xD728,0xD729,0xD72B,0xD72D,0xD734,0xD735,0xD738, -0xD73C,0xD744,0xD747,0xD749,0xD750,0xD751,0xD754,0xD756, -0xD757,0xD758,0xD759,0xD760,0xD761,0xD763,0xD765,0xD769, -0xD76C,0xD770,0xD774,0xD77C,0xD77D,0xD781,0xD788,0xD789, -0xD78C,0xD790,0xD798,0xD799,0xD79B,0xD79D}; - -/* page 1 0xCAA1-0xFDFE */ -static uint16 tab_ksc5601_uni1[]={ -0x4F3D,0x4F73,0x5047,0x50F9,0x52A0,0x53EF,0x5475,0x54E5, -0x5609,0x5AC1,0x5BB6,0x6687,0x67B6,0x67B7,0x67EF,0x6B4C, -0x73C2,0x75C2,0x7A3C,0x82DB,0x8304,0x8857,0x8888,0x8A36, -0x8CC8,0x8DCF,0x8EFB,0x8FE6,0x99D5,0x523B,0x5374,0x5404, -0x606A,0x6164,0x6BBC,0x73CF,0x811A,0x89BA,0x89D2,0x95A3, -0x4F83,0x520A,0x58BE,0x5978,0x59E6,0x5E72,0x5E79,0x61C7, -0x63C0,0x6746,0x67EC,0x687F,0x6F97,0x764E,0x770B,0x78F5, -0x7A08,0x7AFF,0x7C21,0x809D,0x826E,0x8271,0x8AEB,0x9593, -0x4E6B,0x559D,0x66F7,0x6E34,0x78A3,0x7AED,0x845B,0x8910, -0x874E,0x97A8,0x52D8,0x574E,0x582A,0x5D4C,0x611F,0x61BE, -0x6221,0x6562,0x67D1,0x6A44,0x6E1B,0x7518,0x75B3,0x76E3, -0x77B0,0x7D3A,0x90AF,0x9451,0x9452,0x9F95, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5323,0x5CAC,0x7532,0x80DB,0x9240,0x9598,0x525B,0x5808, -0x59DC,0x5CA1,0x5D17,0x5EB7,0x5F3A,0x5F4A,0x6177,0x6C5F, -0x757A,0x7586,0x7CE0,0x7D73,0x7DB1,0x7F8C,0x8154,0x8221, -0x8591,0x8941,0x8B1B,0x92FC,0x964D,0x9C47,0x4ECB,0x4EF7, -0x500B,0x51F1,0x584F,0x6137,0x613E,0x6168,0x6539,0x69EA, -0x6F11,0x75A5,0x7686,0x76D6,0x7B87,0x82A5,0x84CB,0xF900, -0x93A7,0x958B,0x5580,0x5BA2,0x5751,0xF901,0x7CB3,0x7FB9, -0x91B5,0x5028,0x53BB,0x5C45,0x5DE8,0x62D2,0x636E,0x64DA, -0x64E7,0x6E20,0x70AC,0x795B,0x8DDD,0x8E1E,0xF902,0x907D, -0x9245,0x92F8,0x4E7E,0x4EF6,0x5065,0x5DFE,0x5EFA,0x6106, -0x6957,0x8171,0x8654,0x8E47,0x9375,0x9A2B,0x4E5E,0x5091, -0x6770,0x6840,0x5109,0x528D,0x5292,0x6AA2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x77BC,0x9210,0x9ED4,0x52AB,0x602F,0x8FF2,0x5048,0x61A9, -0x63ED,0x64CA,0x683C,0x6A84,0x6FC0,0x8188,0x89A1,0x9694, -0x5805,0x727D,0x72AC,0x7504,0x7D79,0x7E6D,0x80A9,0x898B, -0x8B74,0x9063,0x9D51,0x6289,0x6C7A,0x6F54,0x7D50,0x7F3A, -0x8A23,0x517C,0x614A,0x7B9D,0x8B19,0x9257,0x938C,0x4EAC, -0x4FD3,0x501E,0x50BE,0x5106,0x52C1,0x52CD,0x537F,0x5770, -0x5883,0x5E9A,0x5F91,0x6176,0x61AC,0x64CE,0x656C,0x666F, -0x66BB,0x66F4,0x6897,0x6D87,0x7085,0x70F1,0x749F,0x74A5, -0x74CA,0x75D9,0x786C,0x78EC,0x7ADF,0x7AF6,0x7D45,0x7D93, -0x8015,0x803F,0x811B,0x8396,0x8B66,0x8F15,0x9015,0x93E1, -0x9803,0x9838,0x9A5A,0x9BE8,0x4FC2,0x5553,0x583A,0x5951, -0x5B63,0x5C46,0x60B8,0x6212,0x6842,0x68B0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x68E8,0x6EAA,0x754C,0x7678,0x78CE,0x7A3D,0x7CFB,0x7E6B, -0x7E7C,0x8A08,0x8AA1,0x8C3F,0x968E,0x9DC4,0x53E4,0x53E9, -0x544A,0x5471,0x56FA,0x59D1,0x5B64,0x5C3B,0x5EAB,0x62F7, -0x6537,0x6545,0x6572,0x66A0,0x67AF,0x69C1,0x6CBD,0x75FC, -0x7690,0x777E,0x7A3F,0x7F94,0x8003,0x80A1,0x818F,0x82E6, -0x82FD,0x83F0,0x85C1,0x8831,0x88B4,0x8AA5,0xF903,0x8F9C, -0x932E,0x96C7,0x9867,0x9AD8,0x9F13,0x54ED,0x659B,0x66F2, -0x688F,0x7A40,0x8C37,0x9D60,0x56F0,0x5764,0x5D11,0x6606, -0x68B1,0x68CD,0x6EFE,0x7428,0x889E,0x9BE4,0x6C68,0xF904, -0x9AA8,0x4F9B,0x516C,0x5171,0x529F,0x5B54,0x5DE5,0x6050, -0x606D,0x62F1,0x63A7,0x653B,0x73D9,0x7A7A,0x86A3,0x8CA2, -0x978F,0x4E32,0x5BE1,0x6208,0x679C,0x74DC, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x79D1,0x83D3,0x8A87,0x8AB2,0x8DE8,0x904E,0x934B,0x9846, -0x5ED3,0x69E8,0x85FF,0x90ED,0xF905,0x51A0,0x5B98,0x5BEC, -0x6163,0x68FA,0x6B3E,0x704C,0x742F,0x74D8,0x7BA1,0x7F50, -0x83C5,0x89C0,0x8CAB,0x95DC,0x9928,0x522E,0x605D,0x62EC, -0x9002,0x4F8A,0x5149,0x5321,0x58D9,0x5EE3,0x66E0,0x6D38, -0x709A,0x72C2,0x73D6,0x7B50,0x80F1,0x945B,0x5366,0x639B, -0x7F6B,0x4E56,0x5080,0x584A,0x58DE,0x602A,0x6127,0x62D0, -0x69D0,0x9B41,0x5B8F,0x7D18,0x80B1,0x8F5F,0x4EA4,0x50D1, -0x54AC,0x55AC,0x5B0C,0x5DA0,0x5DE7,0x652A,0x654E,0x6821, -0x6A4B,0x72E1,0x768E,0x77EF,0x7D5E,0x7FF9,0x81A0,0x854E, -0x86DF,0x8F03,0x8F4E,0x90CA,0x9903,0x9A55,0x9BAB,0x4E18, -0x4E45,0x4E5D,0x4EC7,0x4FF1,0x5177,0x52FE, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5340,0x53E3,0x53E5,0x548E,0x5614,0x5775,0x57A2,0x5BC7, -0x5D87,0x5ED0,0x61FC,0x62D8,0x6551,0x67B8,0x67E9,0x69CB, -0x6B50,0x6BC6,0x6BEC,0x6C42,0x6E9D,0x7078,0x72D7,0x7396, -0x7403,0x77BF,0x77E9,0x7A76,0x7D7F,0x8009,0x81FC,0x8205, -0x820A,0x82DF,0x8862,0x8B33,0x8CFC,0x8EC0,0x9011,0x90B1, -0x9264,0x92B6,0x99D2,0x9A45,0x9CE9,0x9DD7,0x9F9C,0x570B, -0x5C40,0x83CA,0x97A0,0x97AB,0x9EB4,0x541B,0x7A98,0x7FA4, -0x88D9,0x8ECD,0x90E1,0x5800,0x5C48,0x6398,0x7A9F,0x5BAE, -0x5F13,0x7A79,0x7AAE,0x828E,0x8EAC,0x5026,0x5238,0x52F8, -0x5377,0x5708,0x62F3,0x6372,0x6B0A,0x6DC3,0x7737,0x53A5, -0x7357,0x8568,0x8E76,0x95D5,0x673A,0x6AC3,0x6F70,0x8A6D, -0x8ECC,0x994B,0xF906,0x6677,0x6B78,0x8CB4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9B3C,0xF907,0x53EB,0x572D,0x594E,0x63C6,0x69FB,0x73EA, -0x7845,0x7ABA,0x7AC5,0x7CFE,0x8475,0x898F,0x8D73,0x9035, -0x95A8,0x52FB,0x5747,0x7547,0x7B60,0x83CC,0x921E,0xF908, -0x6A58,0x514B,0x524B,0x5287,0x621F,0x68D8,0x6975,0x9699, -0x50C5,0x52A4,0x52E4,0x61C3,0x65A4,0x6839,0x69FF,0x747E, -0x7B4B,0x82B9,0x83EB,0x89B2,0x8B39,0x8FD1,0x9949,0xF909, -0x4ECA,0x5997,0x64D2,0x6611,0x6A8E,0x7434,0x7981,0x79BD, -0x82A9,0x887E,0x887F,0x895F,0xF90A,0x9326,0x4F0B,0x53CA, -0x6025,0x6271,0x6C72,0x7D1A,0x7D66,0x4E98,0x5162,0x77DC, -0x80AF,0x4F01,0x4F0E,0x5176,0x5180,0x55DC,0x5668,0x573B, -0x57FA,0x57FC,0x5914,0x5947,0x5993,0x5BC4,0x5C90,0x5D0E, -0x5DF1,0x5E7E,0x5FCC,0x6280,0x65D7,0x65E3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x671E,0x671F,0x675E,0x68CB,0x68C4,0x6A5F,0x6B3A,0x6C23, -0x6C7D,0x6C82,0x6DC7,0x7398,0x7426,0x742A,0x7482,0x74A3, -0x7578,0x757F,0x7881,0x78EF,0x7941,0x7947,0x7948,0x797A, -0x7B95,0x7D00,0x7DBA,0x7F88,0x8006,0x802D,0x808C,0x8A18, -0x8B4F,0x8C48,0x8D77,0x9321,0x9324,0x98E2,0x9951,0x9A0E, -0x9A0F,0x9A65,0x9E92,0x7DCA,0x4F76,0x5409,0x62EE,0x6854, -0x91D1,0x55AB,0x513A,0xF90B,0xF90C,0x5A1C,0x61E6,0xF90D, -0x62CF,0x62FF,0xF90E,0xF90F,0xF910,0xF911,0xF912,0xF913, -0x90A3,0xF914,0xF915,0xF916,0xF917,0xF918,0x8AFE,0xF919, -0xF91A,0xF91B,0xF91C,0x6696,0xF91D,0x7156,0xF91E,0xF91F, -0x96E3,0xF920,0x634F,0x637A,0x5357,0xF921,0x678F,0x6960, -0x6E73,0xF922,0x7537,0xF923,0xF924,0xF925, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7D0D,0xF926,0xF927,0x8872,0x56CA,0x5A18,0xF928,0xF929, -0xF92A,0xF92B,0xF92C,0x4E43,0xF92D,0x5167,0x5948,0x67F0, -0x8010,0xF92E,0x5973,0x5E74,0x649A,0x79CA,0x5FF5,0x606C, -0x62C8,0x637B,0x5BE7,0x5BD7,0x52AA,0xF92F,0x5974,0x5F29, -0x6012,0xF930,0xF931,0xF932,0x7459,0xF933,0xF934,0xF935, -0xF936,0xF937,0xF938,0x99D1,0xF939,0xF93A,0xF93B,0xF93C, -0xF93D,0xF93E,0xF93F,0xF940,0xF941,0xF942,0xF943,0x6FC3, -0xF944,0xF945,0x81BF,0x8FB2,0x60F1,0xF946,0xF947,0x8166, -0xF948,0xF949,0x5C3F,0xF94A,0xF94B,0xF94C,0xF94D,0xF94E, -0xF94F,0xF950,0xF951,0x5AE9,0x8A25,0x677B,0x7D10,0xF952, -0xF953,0xF954,0xF955,0xF956,0xF957,0x80FD,0xF958,0xF959, -0x5C3C,0x6CE5,0x533F,0x6EBA,0x591A,0x8336, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4E39,0x4EB6,0x4F46,0x55AE,0x5718,0x58C7,0x5F56,0x65B7, -0x65E6,0x6A80,0x6BB5,0x6E4D,0x77ED,0x7AEF,0x7C1E,0x7DDE, -0x86CB,0x8892,0x9132,0x935B,0x64BB,0x6FBE,0x737A,0x75B8, -0x9054,0x5556,0x574D,0x61BA,0x64D4,0x66C7,0x6DE1,0x6E5B, -0x6F6D,0x6FB9,0x75F0,0x8043,0x81BD,0x8541,0x8983,0x8AC7, -0x8B5A,0x931F,0x6C93,0x7553,0x7B54,0x8E0F,0x905D,0x5510, -0x5802,0x5858,0x5E62,0x6207,0x649E,0x68E0,0x7576,0x7CD6, -0x87B3,0x9EE8,0x4EE3,0x5788,0x576E,0x5927,0x5C0D,0x5CB1, -0x5E36,0x5F85,0x6234,0x64E1,0x73B3,0x81FA,0x888B,0x8CB8, -0x968A,0x9EDB,0x5B85,0x5FB7,0x60B3,0x5012,0x5200,0x5230, -0x5716,0x5835,0x5857,0x5C0E,0x5C60,0x5CF6,0x5D8B,0x5EA6, -0x5F92,0x60BC,0x6311,0x6389,0x6417,0x6843, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x68F9,0x6AC2,0x6DD8,0x6E21,0x6ED4,0x6FE4,0x71FE,0x76DC, -0x7779,0x79B1,0x7A3B,0x8404,0x89A9,0x8CED,0x8DF3,0x8E48, -0x9003,0x9014,0x9053,0x90FD,0x934D,0x9676,0x97DC,0x6BD2, -0x7006,0x7258,0x72A2,0x7368,0x7763,0x79BF,0x7BE4,0x7E9B, -0x8B80,0x58A9,0x60C7,0x6566,0x65FD,0x66BE,0x6C8C,0x711E, -0x71C9,0x8C5A,0x9813,0x4E6D,0x7A81,0x4EDD,0x51AC,0x51CD, -0x52D5,0x540C,0x61A7,0x6771,0x6850,0x68DF,0x6D1E,0x6F7C, -0x75BC,0x77B3,0x7AE5,0x80F4,0x8463,0x9285,0x515C,0x6597, -0x675C,0x6793,0x75D8,0x7AC7,0x8373,0xF95A,0x8C46,0x9017, -0x982D,0x5C6F,0x81C0,0x829A,0x9041,0x906F,0x920D,0x5F97, -0x5D9D,0x6A59,0x71C8,0x767B,0x7B49,0x85E4,0x8B04,0x9127, -0x9A30,0x5587,0x61F6,0xF95B,0x7669,0x7F85, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x863F,0x87BA,0x88F8,0x908F,0xF95C,0x6D1B,0x70D9,0x73DE, -0x7D61,0x843D,0xF95D,0x916A,0x99F1,0xF95E,0x4E82,0x5375, -0x6B04,0x6B12,0x703E,0x721B,0x862D,0x9E1E,0x524C,0x8FA3, -0x5D50,0x64E5,0x652C,0x6B16,0x6FEB,0x7C43,0x7E9C,0x85CD, -0x8964,0x89BD,0x62C9,0x81D8,0x881F,0x5ECA,0x6717,0x6D6A, -0x72FC,0x7405,0x746F,0x8782,0x90DE,0x4F86,0x5D0D,0x5FA0, -0x840A,0x51B7,0x63A0,0x7565,0x4EAE,0x5006,0x5169,0x51C9, -0x6881,0x6A11,0x7CAE,0x7CB1,0x7CE7,0x826F,0x8AD2,0x8F1B, -0x91CF,0x4FB6,0x5137,0x52F5,0x5442,0x5EEC,0x616E,0x623E, -0x65C5,0x6ADA,0x6FFE,0x792A,0x85DC,0x8823,0x95AD,0x9A62, -0x9A6A,0x9E97,0x9ECE,0x529B,0x66C6,0x6B77,0x701D,0x792B, -0x8F62,0x9742,0x6190,0x6200,0x6523,0x6F23, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7149,0x7489,0x7DF4,0x806F,0x84EE,0x8F26,0x9023,0x934A, -0x51BD,0x5217,0x52A3,0x6D0C,0x70C8,0x88C2,0x5EC9,0x6582, -0x6BAE,0x6FC2,0x7C3E,0x7375,0x4EE4,0x4F36,0x56F9,0xF95F, -0x5CBA,0x5DBA,0x601C,0x73B2,0x7B2D,0x7F9A,0x7FCE,0x8046, -0x901E,0x9234,0x96F6,0x9748,0x9818,0x9F61,0x4F8B,0x6FA7, -0x79AE,0x91B4,0x96B7,0x52DE,0xF960,0x6488,0x64C4,0x6AD3, -0x6F5E,0x7018,0x7210,0x76E7,0x8001,0x8606,0x865C,0x8DEF, -0x8F05,0x9732,0x9B6F,0x9DFA,0x9E75,0x788C,0x797F,0x7DA0, -0x83C9,0x9304,0x9E7F,0x9E93,0x8AD6,0x58DF,0x5F04,0x6727, -0x7027,0x74CF,0x7C60,0x807E,0x5121,0x7028,0x7262,0x78CA, -0x8CC2,0x8CDA,0x8CF4,0x96F7,0x4E86,0x50DA,0x5BEE,0x5ED6, -0x6599,0x71CE,0x7642,0x77AD,0x804A,0x84FC, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x907C,0x9B27,0x9F8D,0x58D8,0x5A41,0x5C62,0x6A13,0x6DDA, -0x6F0F,0x763B,0x7D2F,0x7E37,0x851E,0x8938,0x93E4,0x964B, -0x5289,0x65D2,0x67F3,0x69B4,0x6D41,0x6E9C,0x700F,0x7409, -0x7460,0x7559,0x7624,0x786B,0x8B2C,0x985E,0x516D,0x622E, -0x9678,0x4F96,0x502B,0x5D19,0x6DEA,0x7DB8,0x8F2A,0x5F8B, -0x6144,0x6817,0xF961,0x9686,0x52D2,0x808B,0x51DC,0x51CC, -0x695E,0x7A1C,0x7DBE,0x83F1,0x9675,0x4FDA,0x5229,0x5398, -0x540F,0x550E,0x5C65,0x60A7,0x674E,0x68A8,0x6D6C,0x7281, -0x72F8,0x7406,0x7483,0xF962,0x75E2,0x7C6C,0x7F79,0x7FB8, -0x8389,0x88CF,0x88E1,0x91CC,0x91D0,0x96E2,0x9BC9,0x541D, -0x6F7E,0x71D0,0x7498,0x85FA,0x8EAA,0x96A3,0x9C57,0x9E9F, -0x6797,0x6DCB,0x7433,0x81E8,0x9716,0x782C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7ACB,0x7B20,0x7C92,0x6469,0x746A,0x75F2,0x78BC,0x78E8, -0x99AC,0x9B54,0x9EBB,0x5BDE,0x5E55,0x6F20,0x819C,0x83AB, -0x9088,0x4E07,0x534D,0x5A29,0x5DD2,0x5F4E,0x6162,0x633D, -0x6669,0x66FC,0x6EFF,0x6F2B,0x7063,0x779E,0x842C,0x8513, -0x883B,0x8F13,0x9945,0x9C3B,0x551C,0x62B9,0x672B,0x6CAB, -0x8309,0x896A,0x977A,0x4EA1,0x5984,0x5FD8,0x5FD9,0x671B, -0x7DB2,0x7F54,0x8292,0x832B,0x83BD,0x8F1E,0x9099,0x57CB, -0x59B9,0x5A92,0x5BD0,0x6627,0x679A,0x6885,0x6BCF,0x7164, -0x7F75,0x8CB7,0x8CE3,0x9081,0x9B45,0x8108,0x8C8A,0x964C, -0x9A40,0x9EA5,0x5B5F,0x6C13,0x731B,0x76F2,0x76DF,0x840C, -0x51AA,0x8993,0x514D,0x5195,0x52C9,0x68C9,0x6C94,0x7704, -0x7720,0x7DBF,0x7DEC,0x9762,0x9EB5,0x6EC5, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8511,0x51A5,0x540D,0x547D,0x660E,0x669D,0x6927,0x6E9F, -0x76BF,0x7791,0x8317,0x84C2,0x879F,0x9169,0x9298,0x9CF4, -0x8882,0x4FAE,0x5192,0x52DF,0x59C6,0x5E3D,0x6155,0x6478, -0x6479,0x66AE,0x67D0,0x6A21,0x6BCD,0x6BDB,0x725F,0x7261, -0x7441,0x7738,0x77DB,0x8017,0x82BC,0x8305,0x8B00,0x8B28, -0x8C8C,0x6728,0x6C90,0x7267,0x76EE,0x7766,0x7A46,0x9DA9, -0x6B7F,0x6C92,0x5922,0x6726,0x8499,0x536F,0x5893,0x5999, -0x5EDF,0x63CF,0x6634,0x6773,0x6E3A,0x732B,0x7AD7,0x82D7, -0x9328,0x52D9,0x5DEB,0x61AE,0x61CB,0x620A,0x62C7,0x64AB, -0x65E0,0x6959,0x6B66,0x6BCB,0x7121,0x73F7,0x755D,0x7E46, -0x821E,0x8302,0x856A,0x8AA3,0x8CBF,0x9727,0x9D61,0x58A8, -0x9ED8,0x5011,0x520E,0x543B,0x554F,0x6587, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6C76,0x7D0A,0x7D0B,0x805E,0x868A,0x9580,0x96EF,0x52FF, -0x6C95,0x7269,0x5473,0x5A9A,0x5C3E,0x5D4B,0x5F4C,0x5FAE, -0x672A,0x68B6,0x6963,0x6E3C,0x6E44,0x7709,0x7C73,0x7F8E, -0x8587,0x8B0E,0x8FF7,0x9761,0x9EF4,0x5CB7,0x60B6,0x610D, -0x61AB,0x654F,0x65FB,0x65FC,0x6C11,0x6CEF,0x739F,0x73C9, -0x7DE1,0x9594,0x5BC6,0x871C,0x8B10,0x525D,0x535A,0x62CD, -0x640F,0x64B2,0x6734,0x6A38,0x6CCA,0x73C0,0x749E,0x7B94, -0x7C95,0x7E1B,0x818A,0x8236,0x8584,0x8FEB,0x96F9,0x99C1, -0x4F34,0x534A,0x53CD,0x53DB,0x62CC,0x642C,0x6500,0x6591, -0x69C3,0x6CEE,0x6F58,0x73ED,0x7554,0x7622,0x76E4,0x76FC, -0x78D0,0x78FB,0x792C,0x7D46,0x822C,0x87E0,0x8FD4,0x9812, -0x98EF,0x52C3,0x62D4,0x64A5,0x6E24,0x6F51, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x767C,0x8DCB,0x91B1,0x9262,0x9AEE,0x9B43,0x5023,0x508D, -0x574A,0x59A8,0x5C28,0x5E47,0x5F77,0x623F,0x653E,0x65B9, -0x65C1,0x6609,0x678B,0x699C,0x6EC2,0x78C5,0x7D21,0x80AA, -0x8180,0x822B,0x82B3,0x84A1,0x868C,0x8A2A,0x8B17,0x90A6, -0x9632,0x9F90,0x500D,0x4FF3,0xF963,0x57F9,0x5F98,0x62DC, -0x6392,0x676F,0x6E43,0x7119,0x76C3,0x80CC,0x80DA,0x88F4, -0x88F5,0x8919,0x8CE0,0x8F29,0x914D,0x966A,0x4F2F,0x4F70, -0x5E1B,0x67CF,0x6822,0x767D,0x767E,0x9B44,0x5E61,0x6A0A, -0x7169,0x71D4,0x756A,0xF964,0x7E41,0x8543,0x85E9,0x98DC, -0x4F10,0x7B4F,0x7F70,0x95A5,0x51E1,0x5E06,0x68B5,0x6C3E, -0x6C4E,0x6CDB,0x72AF,0x7BC4,0x8303,0x6CD5,0x743A,0x50FB, -0x5288,0x58C1,0x64D8,0x6A97,0x74A7,0x7656, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x78A7,0x8617,0x95E2,0x9739,0xF965,0x535E,0x5F01,0x8B8A, -0x8FA8,0x8FAF,0x908A,0x5225,0x77A5,0x9C49,0x9F08,0x4E19, -0x5002,0x5175,0x5C5B,0x5E77,0x661E,0x663A,0x67C4,0x68C5, -0x70B3,0x7501,0x75C5,0x79C9,0x7ADD,0x8F27,0x9920,0x9A08, -0x4FDD,0x5821,0x5831,0x5BF6,0x666E,0x6B65,0x6D11,0x6E7A, -0x6F7D,0x73E4,0x752B,0x83E9,0x88DC,0x8913,0x8B5C,0x8F14, -0x4F0F,0x50D5,0x5310,0x535C,0x5B93,0x5FA9,0x670D,0x798F, -0x8179,0x832F,0x8514,0x8907,0x8986,0x8F39,0x8F3B,0x99A5, -0x9C12,0x672C,0x4E76,0x4FF8,0x5949,0x5C01,0x5CEF,0x5CF0, -0x6367,0x68D2,0x70FD,0x71A2,0x742B,0x7E2B,0x84EC,0x8702, -0x9022,0x92D2,0x9CF3,0x4E0D,0x4ED8,0x4FEF,0x5085,0x5256, -0x526F,0x5426,0x5490,0x57E0,0x592B,0x5A66, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5B5A,0x5B75,0x5BCC,0x5E9C,0xF966,0x6276,0x6577,0x65A7, -0x6D6E,0x6EA5,0x7236,0x7B26,0x7C3F,0x7F36,0x8150,0x8151, -0x819A,0x8240,0x8299,0x83A9,0x8A03,0x8CA0,0x8CE6,0x8CFB, -0x8D74,0x8DBA,0x90E8,0x91DC,0x961C,0x9644,0x99D9,0x9CE7, -0x5317,0x5206,0x5429,0x5674,0x58B3,0x5954,0x596E,0x5FFF, -0x61A4,0x626E,0x6610,0x6C7E,0x711A,0x76C6,0x7C89,0x7CDE, -0x7D1B,0x82AC,0x8CC1,0x96F0,0xF967,0x4F5B,0x5F17,0x5F7F, -0x62C2,0x5D29,0x670B,0x68DA,0x787C,0x7E43,0x9D6C,0x4E15, -0x5099,0x5315,0x532A,0x5351,0x5983,0x5A62,0x5E87,0x60B2, -0x618A,0x6249,0x6279,0x6590,0x6787,0x69A7,0x6BD4,0x6BD6, -0x6BD7,0x6BD8,0x6CB8,0xF968,0x7435,0x75FA,0x7812,0x7891, -0x79D5,0x79D8,0x7C83,0x7DCB,0x7FE1,0x80A5, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x813E,0x81C2,0x83F2,0x871A,0x88E8,0x8AB9,0x8B6C,0x8CBB, -0x9119,0x975E,0x98DB,0x9F3B,0x56AC,0x5B2A,0x5F6C,0x658C, -0x6AB3,0x6BAF,0x6D5C,0x6FF1,0x7015,0x725D,0x73AD,0x8CA7, -0x8CD3,0x983B,0x6191,0x6C37,0x8058,0x9A01,0x4E4D,0x4E8B, -0x4E9B,0x4ED5,0x4F3A,0x4F3C,0x4F7F,0x4FDF,0x50FF,0x53F2, -0x53F8,0x5506,0x55E3,0x56DB,0x58EB,0x5962,0x5A11,0x5BEB, -0x5BFA,0x5C04,0x5DF3,0x5E2B,0x5F99,0x601D,0x6368,0x659C, -0x65AF,0x67F6,0x67FB,0x68AD,0x6B7B,0x6C99,0x6CD7,0x6E23, -0x7009,0x7345,0x7802,0x793E,0x7940,0x7960,0x79C1,0x7BE9, -0x7D17,0x7D72,0x8086,0x820D,0x838E,0x84D1,0x86C7,0x88DF, -0x8A50,0x8A5E,0x8B1D,0x8CDC,0x8D66,0x8FAD,0x90AA,0x98FC, -0x99DF,0x9E9D,0x524A,0xF969,0x6714,0xF96A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5098,0x522A,0x5C71,0x6563,0x6C55,0x73CA,0x7523,0x759D, -0x7B97,0x849C,0x9178,0x9730,0x4E77,0x6492,0x6BBA,0x715E, -0x85A9,0x4E09,0xF96B,0x6749,0x68EE,0x6E17,0x829F,0x8518, -0x886B,0x63F7,0x6F81,0x9212,0x98AF,0x4E0A,0x50B7,0x50CF, -0x511F,0x5546,0x55AA,0x5617,0x5B40,0x5C19,0x5CE0,0x5E38, -0x5E8A,0x5EA0,0x5EC2,0x60F3,0x6851,0x6A61,0x6E58,0x723D, -0x7240,0x72C0,0x76F8,0x7965,0x7BB1,0x7FD4,0x88F3,0x89F4, -0x8A73,0x8C61,0x8CDE,0x971C,0x585E,0x74BD,0x8CFD,0x55C7, -0xF96C,0x7A61,0x7D22,0x8272,0x7272,0x751F,0x7525,0xF96D, -0x7B19,0x5885,0x58FB,0x5DBC,0x5E8F,0x5EB6,0x5F90,0x6055, -0x6292,0x637F,0x654D,0x6691,0x66D9,0x66F8,0x6816,0x68F2, -0x7280,0x745E,0x7B6E,0x7D6E,0x7DD6,0x7F72, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x80E5,0x8212,0x85AF,0x897F,0x8A93,0x901D,0x92E4,0x9ECD, -0x9F20,0x5915,0x596D,0x5E2D,0x60DC,0x6614,0x6673,0x6790, -0x6C50,0x6DC5,0x6F5F,0x77F3,0x78A9,0x84C6,0x91CB,0x932B, -0x4ED9,0x50CA,0x5148,0x5584,0x5B0B,0x5BA3,0x6247,0x657E, -0x65CB,0x6E32,0x717D,0x7401,0x7444,0x7487,0x74BF,0x766C, -0x79AA,0x7DDA,0x7E55,0x7FA8,0x817A,0x81B3,0x8239,0x861A, -0x87EC,0x8A75,0x8DE3,0x9078,0x9291,0x9425,0x994D,0x9BAE, -0x5368,0x5C51,0x6954,0x6CC4,0x6D29,0x6E2B,0x820C,0x859B, -0x893B,0x8A2D,0x8AAA,0x96EA,0x9F67,0x5261,0x66B9,0x6BB2, -0x7E96,0x87FE,0x8D0D,0x9583,0x965D,0x651D,0x6D89,0x71EE, -0xF96E,0x57CE,0x59D3,0x5BAC,0x6027,0x60FA,0x6210,0x661F, -0x665F,0x7329,0x73F9,0x76DB,0x7701,0x7B6C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8056,0x8072,0x8165,0x8AA0,0x9192,0x4E16,0x52E2,0x6B72, -0x6D17,0x7A05,0x7B39,0x7D30,0xF96F,0x8CB0,0x53EC,0x562F, -0x5851,0x5BB5,0x5C0F,0x5C11,0x5DE2,0x6240,0x6383,0x6414, -0x662D,0x68B3,0x6CBC,0x6D88,0x6EAF,0x701F,0x70A4,0x71D2, -0x7526,0x758F,0x758E,0x7619,0x7B11,0x7BE0,0x7C2B,0x7D20, -0x7D39,0x852C,0x856D,0x8607,0x8A34,0x900D,0x9061,0x90B5, -0x92B7,0x97F6,0x9A37,0x4FD7,0x5C6C,0x675F,0x6D91,0x7C9F, -0x7E8C,0x8B16,0x8D16,0x901F,0x5B6B,0x5DFD,0x640D,0x84C0, -0x905C,0x98E1,0x7387,0x5B8B,0x609A,0x677E,0x6DDE,0x8A1F, -0x8AA6,0x9001,0x980C,0x5237,0xF970,0x7051,0x788E,0x9396, -0x8870,0x91D7,0x4FEE,0x53D7,0x55FD,0x56DA,0x5782,0x58FD, -0x5AC2,0x5B88,0x5CAB,0x5CC0,0x5E25,0x6101, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x620D,0x624B,0x6388,0x641C,0x6536,0x6578,0x6A39,0x6B8A, -0x6C34,0x6D19,0x6F31,0x71E7,0x72E9,0x7378,0x7407,0x74B2, -0x7626,0x7761,0x79C0,0x7A57,0x7AEA,0x7CB9,0x7D8F,0x7DAC, -0x7E61,0x7F9E,0x8129,0x8331,0x8490,0x84DA,0x85EA,0x8896, -0x8AB0,0x8B90,0x8F38,0x9042,0x9083,0x916C,0x9296,0x92B9, -0x968B,0x96A7,0x96A8,0x96D6,0x9700,0x9808,0x9996,0x9AD3, -0x9B1A,0x53D4,0x587E,0x5919,0x5B70,0x5BBF,0x6DD1,0x6F5A, -0x719F,0x7421,0x74B9,0x8085,0x83FD,0x5DE1,0x5F87,0x5FAA, -0x6042,0x65EC,0x6812,0x696F,0x6A53,0x6B89,0x6D35,0x6DF3, -0x73E3,0x76FE,0x77AC,0x7B4D,0x7D14,0x8123,0x821C,0x8340, -0x84F4,0x8563,0x8A62,0x8AC4,0x9187,0x931E,0x9806,0x99B4, -0x620C,0x8853,0x8FF0,0x9265,0x5D07,0x5D27, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5D69,0x745F,0x819D,0x8768,0x6FD5,0x62FE,0x7FD2,0x8936, -0x8972,0x4E1E,0x4E58,0x50E7,0x52DD,0x5347,0x627F,0x6607, -0x7E69,0x8805,0x965E,0x4F8D,0x5319,0x5636,0x59CB,0x5AA4, -0x5C38,0x5C4E,0x5C4D,0x5E02,0x5F11,0x6043,0x65BD,0x662F, -0x6642,0x67BE,0x67F4,0x731C,0x77E2,0x793A,0x7FC5,0x8494, -0x84CD,0x8996,0x8A66,0x8A69,0x8AE1,0x8C55,0x8C7A,0x57F4, -0x5BD4,0x5F0F,0x606F,0x62ED,0x690D,0x6B96,0x6E5C,0x7184, -0x7BD2,0x8755,0x8B58,0x8EFE,0x98DF,0x98FE,0x4F38,0x4F81, -0x4FE1,0x547B,0x5A20,0x5BB8,0x613C,0x65B0,0x6668,0x71FC, -0x7533,0x795E,0x7D33,0x814E,0x81E3,0x8398,0x85AA,0x85CE, -0x8703,0x8A0A,0x8EAB,0x8F9B,0xF971,0x8FC5,0x5931,0x5BA4, -0x5BE6,0x6089,0x5BE9,0x5C0B,0x5FC3,0x6C81, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xF972,0x6DF1,0x700B,0x751A,0x82AF,0x8AF6,0x4EC0,0x5341, -0xF973,0x96D9,0x6C0F,0x4E9E,0x4FC4,0x5152,0x555E,0x5A25, -0x5CE8,0x6211,0x7259,0x82BD,0x83AA,0x86FE,0x8859,0x8A1D, -0x963F,0x96C5,0x9913,0x9D09,0x9D5D,0x580A,0x5CB3,0x5DBD, -0x5E44,0x60E1,0x6115,0x63E1,0x6A02,0x6E25,0x9102,0x9354, -0x984E,0x9C10,0x9F77,0x5B89,0x5CB8,0x6309,0x664F,0x6848, -0x773C,0x96C1,0x978D,0x9854,0x9B9F,0x65A1,0x8B01,0x8ECB, -0x95BC,0x5535,0x5CA9,0x5DD6,0x5EB5,0x6697,0x764C,0x83F4, -0x95C7,0x58D3,0x62BC,0x72CE,0x9D28,0x4EF0,0x592E,0x600F, -0x663B,0x6B83,0x79E7,0x9D26,0x5393,0x54C0,0x57C3,0x5D16, -0x611B,0x66D6,0x6DAF,0x788D,0x827E,0x9698,0x9744,0x5384, -0x627C,0x6396,0x6DB2,0x7E0A,0x814B,0x984D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6AFB,0x7F4C,0x9DAF,0x9E1A,0x4E5F,0x503B,0x51B6,0x591C, -0x60F9,0x63F6,0x6930,0x723A,0x8036,0xF974,0x91CE,0x5F31, -0xF975,0xF976,0x7D04,0x82E5,0x846F,0x84BB,0x85E5,0x8E8D, -0xF977,0x4F6F,0xF978,0xF979,0x58E4,0x5B43,0x6059,0x63DA, -0x6518,0x656D,0x6698,0xF97A,0x694A,0x6A23,0x6D0B,0x7001, -0x716C,0x75D2,0x760D,0x79B3,0x7A70,0xF97B,0x7F8A,0xF97C, -0x8944,0xF97D,0x8B93,0x91C0,0x967D,0xF97E,0x990A,0x5704, -0x5FA1,0x65BC,0x6F01,0x7600,0x79A6,0x8A9E,0x99AD,0x9B5A, -0x9F6C,0x5104,0x61B6,0x6291,0x6A8D,0x81C6,0x5043,0x5830, -0x5F66,0x7109,0x8A00,0x8AFA,0x5B7C,0x8616,0x4FFA,0x513C, -0x56B4,0x5944,0x63A9,0x6DF9,0x5DAA,0x696D,0x5186,0x4E88, -0x4F59,0xF97F,0xF980,0xF981,0x5982,0xF982, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xF983,0x6B5F,0x6C5D,0xF984,0x74B5,0x7916,0xF985,0x8207, -0x8245,0x8339,0x8F3F,0x8F5D,0xF986,0x9918,0xF987,0xF988, -0xF989,0x4EA6,0xF98A,0x57DF,0x5F79,0x6613,0xF98B,0xF98C, -0x75AB,0x7E79,0x8B6F,0xF98D,0x9006,0x9A5B,0x56A5,0x5827, -0x59F8,0x5A1F,0x5BB4,0xF98E,0x5EF6,0xF98F,0xF990,0x6350, -0x633B,0xF991,0x693D,0x6C87,0x6CBF,0x6D8E,0x6D93,0x6DF5, -0x6F14,0xF992,0x70DF,0x7136,0x7159,0xF993,0x71C3,0x71D5, -0xF994,0x784F,0x786F,0xF995,0x7B75,0x7DE3,0xF996,0x7E2F, -0xF997,0x884D,0x8EDF,0xF998,0xF999,0xF99A,0x925B,0xF99B, -0x9CF6,0xF99C,0xF99D,0xF99E,0x6085,0x6D85,0xF99F,0x71B1, -0xF9A0,0xF9A1,0x95B1,0x53AD,0xF9A2,0xF9A3,0xF9A4,0x67D3, -0xF9A5,0x708E,0x7130,0x7430,0x8276,0x82D2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xF9A6,0x95BB,0x9AE5,0x9E7D,0x66C4,0xF9A7,0x71C1,0x8449, -0xF9A8,0xF9A9,0x584B,0xF9AA,0xF9AB,0x5DB8,0x5F71,0xF9AC, -0x6620,0x668E,0x6979,0x69AE,0x6C38,0x6CF3,0x6E36,0x6F41, -0x6FDA,0x701B,0x702F,0x7150,0x71DF,0x7370,0xF9AD,0x745B, -0xF9AE,0x74D4,0x76C8,0x7A4E,0x7E93,0xF9AF,0xF9B0,0x82F1, -0x8A60,0x8FCE,0xF9B1,0x9348,0xF9B2,0x9719,0xF9B3,0xF9B4, -0x4E42,0x502A,0xF9B5,0x5208,0x53E1,0x66F3,0x6C6D,0x6FCA, -0x730A,0x777F,0x7A62,0x82AE,0x85DD,0x8602,0xF9B6,0x88D4, -0x8A63,0x8B7D,0x8C6B,0xF9B7,0x92B3,0xF9B8,0x9713,0x9810, -0x4E94,0x4F0D,0x4FC9,0x50B2,0x5348,0x543E,0x5433,0x55DA, -0x5862,0x58BA,0x5967,0x5A1B,0x5BE4,0x609F,0xF9B9,0x61CA, -0x6556,0x65FF,0x6664,0x68A7,0x6C5A,0x6FB3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x70CF,0x71AC,0x7352,0x7B7D,0x8708,0x8AA4,0x9C32,0x9F07, -0x5C4B,0x6C83,0x7344,0x7389,0x923A,0x6EAB,0x7465,0x761F, -0x7A69,0x7E15,0x860A,0x5140,0x58C5,0x64C1,0x74EE,0x7515, -0x7670,0x7FC1,0x9095,0x96CD,0x9954,0x6E26,0x74E6,0x7AA9, -0x7AAA,0x81E5,0x86D9,0x8778,0x8A1B,0x5A49,0x5B8C,0x5B9B, -0x68A1,0x6900,0x6D63,0x73A9,0x7413,0x742C,0x7897,0x7DE9, -0x7FEB,0x8118,0x8155,0x839E,0x8C4C,0x962E,0x9811,0x66F0, -0x5F80,0x65FA,0x6789,0x6C6A,0x738B,0x502D,0x5A03,0x6B6A, -0x77EE,0x5916,0x5D6C,0x5DCD,0x7325,0x754F,0xF9BA,0xF9BB, -0x50E5,0x51F9,0x582F,0x592D,0x5996,0x59DA,0x5BE5,0xF9BC, -0xF9BD,0x5DA2,0x62D7,0x6416,0x6493,0x64FE,0xF9BE,0x66DC, -0xF9BF,0x6A48,0xF9C0,0x71FF,0x7464,0xF9C1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7A88,0x7AAF,0x7E47,0x7E5E,0x8000,0x8170,0xF9C2,0x87EF, -0x8981,0x8B20,0x9059,0xF9C3,0x9080,0x9952,0x617E,0x6B32, -0x6D74,0x7E1F,0x8925,0x8FB1,0x4FD1,0x50AD,0x5197,0x52C7, -0x57C7,0x5889,0x5BB9,0x5EB8,0x6142,0x6995,0x6D8C,0x6E67, -0x6EB6,0x7194,0x7462,0x7528,0x752C,0x8073,0x8338,0x84C9, -0x8E0A,0x9394,0x93DE,0xF9C4,0x4E8E,0x4F51,0x5076,0x512A, -0x53C8,0x53CB,0x53F3,0x5B87,0x5BD3,0x5C24,0x611A,0x6182, -0x65F4,0x725B,0x7397,0x7440,0x76C2,0x7950,0x7991,0x79B9, -0x7D06,0x7FBD,0x828B,0x85D5,0x865E,0x8FC2,0x9047,0x90F5, -0x91EA,0x9685,0x96E8,0x96E9,0x52D6,0x5F67,0x65ED,0x6631, -0x682F,0x715C,0x7A36,0x90C1,0x980A,0x4E91,0xF9C5,0x6A52, -0x6B9E,0x6F90,0x7189,0x8018,0x82B8,0x8553, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x904B,0x9695,0x96F2,0x97FB,0x851A,0x9B31,0x4E90,0x718A, -0x96C4,0x5143,0x539F,0x54E1,0x5713,0x5712,0x57A3,0x5A9B, -0x5AC4,0x5BC3,0x6028,0x613F,0x63F4,0x6C85,0x6D39,0x6E72, -0x6E90,0x7230,0x733F,0x7457,0x82D1,0x8881,0x8F45,0x9060, -0xF9C6,0x9662,0x9858,0x9D1B,0x6708,0x8D8A,0x925E,0x4F4D, -0x5049,0x50DE,0x5371,0x570D,0x59D4,0x5A01,0x5C09,0x6170, -0x6690,0x6E2D,0x7232,0x744B,0x7DEF,0x80C3,0x840E,0x8466, -0x853F,0x875F,0x885B,0x8918,0x8B02,0x9055,0x97CB,0x9B4F, -0x4E73,0x4F91,0x5112,0x516A,0xF9C7,0x552F,0x55A9,0x5B7A, -0x5BA5,0x5E7C,0x5E7D,0x5EBE,0x60A0,0x60DF,0x6108,0x6109, -0x63C4,0x6538,0x6709,0xF9C8,0x67D4,0x67DA,0xF9C9,0x6961, -0x6962,0x6CB9,0x6D27,0xF9CA,0x6E38,0xF9CB, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6FE1,0x7336,0x7337,0xF9CC,0x745C,0x7531,0xF9CD,0x7652, -0xF9CE,0xF9CF,0x7DAD,0x81FE,0x8438,0x88D5,0x8A98,0x8ADB, -0x8AED,0x8E30,0x8E42,0x904A,0x903E,0x907A,0x9149,0x91C9, -0x936E,0xF9D0,0xF9D1,0x5809,0xF9D2,0x6BD3,0x8089,0x80B2, -0xF9D3,0xF9D4,0x5141,0x596B,0x5C39,0xF9D5,0xF9D6,0x6F64, -0x73A7,0x80E4,0x8D07,0xF9D7,0x9217,0x958F,0xF9D8,0xF9D9, -0xF9DA,0xF9DB,0x807F,0x620E,0x701C,0x7D68,0x878D,0xF9DC, -0x57A0,0x6069,0x6147,0x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65AB,0x6628,0x707C,0x70B8, -0x7235,0x7DBD,0x828D,0x914C,0x96C0,0x9D72,0x5B71,0x68E7, -0x6B98,0x6F7A,0x76DE,0x5C91,0x66AB,0x6F5B,0x7BB4,0x7C2A, -0x8836,0x96DC,0x4E08,0x4ED7,0x5320,0x5834,0x58BB,0x58EF, -0x596C,0x5C07,0x5E33,0x5E84,0x5F35,0x638C,0x66B2,0x6756, -0x6A1F,0x6AA3,0x6B0C,0x6F3F,0x7246,0xF9FA,0x7350,0x748B, -0x7AE0,0x7CA7,0x8178,0x81DF,0x81E7,0x838A,0x846C,0x8523, -0x8594,0x85CF,0x88DD,0x8D13,0x91AC,0x9577, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x969C,0x518D,0x54C9,0x5728,0x5BB0,0x624D,0x6750,0x683D, -0x6893,0x6E3D,0x6ED3,0x707D,0x7E21,0x88C1,0x8CA1,0x8F09, -0x9F4B,0x9F4E,0x722D,0x7B8F,0x8ACD,0x931A,0x4F47,0x4F4E, -0x5132,0x5480,0x59D0,0x5E95,0x62B5,0x6775,0x696E,0x6A17, -0x6CAE,0x6E1A,0x72D9,0x732A,0x75BD,0x7BB8,0x7D35,0x82E7, -0x83F9,0x8457,0x85F7,0x8A5B,0x8CAF,0x8E87,0x9019,0x90B8, -0x96CE,0x9F5F,0x52E3,0x540A,0x5AE1,0x5BC2,0x6458,0x6575, -0x6EF4,0x72C4,0xF9FB,0x7684,0x7A4D,0x7B1B,0x7C4D,0x7E3E, -0x7FDF,0x837B,0x8B2B,0x8CCA,0x8D64,0x8DE1,0x8E5F,0x8FEA, -0x8FF9,0x9069,0x93D1,0x4F43,0x4F7A,0x50B3,0x5168,0x5178, -0x524D,0x526A,0x5861,0x587C,0x5960,0x5C08,0x5C55,0x5EDB, -0x609B,0x6230,0x6813,0x6BBF,0x6C08,0x6FB1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x714E,0x7420,0x7530,0x7538,0x7551,0x7672,0x7B4C,0x7B8B, -0x7BAD,0x7BC6,0x7E8F,0x8A6E,0x8F3E,0x8F49,0x923F,0x9293, -0x9322,0x942B,0x96FB,0x985A,0x986B,0x991E,0x5207,0x622A, -0x6298,0x6D59,0x7664,0x7ACA,0x7BC0,0x7D76,0x5360,0x5CBE, -0x5E97,0x6F38,0x70B9,0x7C98,0x9711,0x9B8E,0x9EDE,0x63A5, -0x647A,0x8776,0x4E01,0x4E95,0x4EAD,0x505C,0x5075,0x5448, -0x59C3,0x5B9A,0x5E40,0x5EAD,0x5EF7,0x5F81,0x60C5,0x633A, -0x653F,0x6574,0x65CC,0x6676,0x6678,0x67FE,0x6968,0x6A89, -0x6B63,0x6C40,0x6DC0,0x6DE8,0x6E1F,0x6E5E,0x701E,0x70A1, -0x738E,0x73FD,0x753A,0x775B,0x7887,0x798E,0x7A0B,0x7A7D, -0x7CBE,0x7D8E,0x8247,0x8A02,0x8AEA,0x8C9E,0x912D,0x914A, -0x91D8,0x9266,0x92CC,0x9320,0x9706,0x9756, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x975C,0x9802,0x9F0E,0x5236,0x5291,0x557C,0x5824,0x5E1D, -0x5F1F,0x608C,0x63D0,0x68AF,0x6FDF,0x796D,0x7B2C,0x81CD, -0x85BA,0x88FD,0x8AF8,0x8E44,0x918D,0x9664,0x969B,0x973D, -0x984C,0x9F4A,0x4FCE,0x5146,0x51CB,0x52A9,0x5632,0x5F14, -0x5F6B,0x63AA,0x64CD,0x65E9,0x6641,0x66FA,0x66F9,0x671D, -0x689D,0x68D7,0x69FD,0x6F15,0x6F6E,0x7167,0x71E5,0x722A, -0x74AA,0x773A,0x7956,0x795A,0x79DF,0x7A20,0x7A95,0x7C97, -0x7CDF,0x7D44,0x7E70,0x8087,0x85FB,0x86A4,0x8A54,0x8ABF, -0x8D99,0x8E81,0x9020,0x906D,0x91E3,0x963B,0x96D5,0x9CE5, -0x65CF,0x7C07,0x8DB3,0x93C3,0x5B58,0x5C0A,0x5352,0x62D9, -0x731D,0x5027,0x5B97,0x5F9E,0x60B0,0x616B,0x68D5,0x6DD9, -0x742E,0x7A2E,0x7D42,0x7D9C,0x7E31,0x816B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8E2A,0x8E35,0x937E,0x9418,0x4F50,0x5750,0x5DE6,0x5EA7, -0x632B,0x7F6A,0x4E3B,0x4F4F,0x4F8F,0x505A,0x59DD,0x80C4, -0x546A,0x5468,0x55FE,0x594F,0x5B99,0x5DDE,0x5EDA,0x665D, -0x6731,0x67F1,0x682A,0x6CE8,0x6D32,0x6E4A,0x6F8D,0x70B7, -0x73E0,0x7587,0x7C4C,0x7D02,0x7D2C,0x7DA2,0x821F,0x86DB, -0x8A3B,0x8A85,0x8D70,0x8E8A,0x8F33,0x9031,0x914E,0x9152, -0x9444,0x99D0,0x7AF9,0x7CA5,0x4FCA,0x5101,0x51C6,0x57C8, -0x5BEF,0x5CFB,0x6659,0x6A3D,0x6D5A,0x6E96,0x6FEC,0x710C, -0x756F,0x7AE3,0x8822,0x9021,0x9075,0x96CB,0x99FF,0x8301, -0x4E2D,0x4EF2,0x8846,0x91CD,0x537D,0x6ADB,0x696B,0x6C41, -0x847A,0x589E,0x618E,0x66FE,0x62EF,0x70DD,0x7511,0x75C7, -0x7E52,0x84B8,0x8B49,0x8D08,0x4E4B,0x53EA, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x54AB,0x5730,0x5740,0x5FD7,0x6301,0x6307,0x646F,0x652F, -0x65E8,0x667A,0x679D,0x67B3,0x6B62,0x6C60,0x6C9A,0x6F2C, -0x77E5,0x7825,0x7949,0x7957,0x7D19,0x80A2,0x8102,0x81F3, -0x829D,0x82B7,0x8718,0x8A8C,0xF9FC,0x8D04,0x8DBE,0x9072, -0x76F4,0x7A19,0x7A37,0x7E54,0x8077,0x5507,0x55D4,0x5875, -0x632F,0x6422,0x6649,0x664B,0x686D,0x699B,0x6B84,0x6D25, -0x6EB1,0x73CD,0x7468,0x74A1,0x755B,0x75B9,0x76E1,0x771E, -0x778B,0x79E6,0x7E09,0x7E1D,0x81FB,0x852F,0x8897,0x8A3A, -0x8CD1,0x8EEB,0x8FB0,0x9032,0x93AD,0x9663,0x9673,0x9707, -0x4F84,0x53F1,0x59EA,0x5AC9,0x5E19,0x684E,0x74C6,0x75BE, -0x79E9,0x7A92,0x81A3,0x86ED,0x8CEA,0x8DCC,0x8FED,0x659F, -0x6715,0xF9FD,0x57F7,0x6F57,0x7DDD,0x8F2F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x93F6,0x96C6,0x5FB5,0x61F2,0x6F84,0x4E14,0x4F98,0x501F, -0x53C9,0x55DF,0x5D6F,0x5DEE,0x6B21,0x6B64,0x78CB,0x7B9A, -0xF9FE,0x8E49,0x8ECA,0x906E,0x6349,0x643E,0x7740,0x7A84, -0x932F,0x947F,0x9F6A,0x64B0,0x6FAF,0x71E6,0x74A8,0x74DA, -0x7AC4,0x7C12,0x7E82,0x7CB2,0x7E98,0x8B9A,0x8D0A,0x947D, -0x9910,0x994C,0x5239,0x5BDF,0x64E6,0x672D,0x7D2E,0x50ED, -0x53C3,0x5879,0x6158,0x6159,0x61FA,0x65AC,0x7AD9,0x8B92, -0x8B96,0x5009,0x5021,0x5275,0x5531,0x5A3C,0x5EE0,0x5F70, -0x6134,0x655E,0x660C,0x6636,0x66A2,0x69CD,0x6EC4,0x6F32, -0x7316,0x7621,0x7A93,0x8139,0x8259,0x83D6,0x84BC,0x50B5, -0x57F0,0x5BC0,0x5BE8,0x5F69,0x63A1,0x7826,0x7DB5,0x83DC, -0x8521,0x91C7,0x91F5,0x518A,0x67F5,0x7B56, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8CAC,0x51C4,0x59BB,0x60BD,0x8655,0x501C,0xF9FF,0x5254, -0x5C3A,0x617D,0x621A,0x62D3,0x64F2,0x65A5,0x6ECC,0x7620, -0x810A,0x8E60,0x965F,0x96BB,0x4EDF,0x5343,0x5598,0x5929, -0x5DDD,0x64C5,0x6CC9,0x6DFA,0x7394,0x7A7F,0x821B,0x85A6, -0x8CE4,0x8E10,0x9077,0x91E7,0x95E1,0x9621,0x97C6,0x51F8, -0x54F2,0x5586,0x5FB9,0x64A4,0x6F88,0x7DB4,0x8F1F,0x8F4D, -0x9435,0x50C9,0x5C16,0x6CBE,0x6DFB,0x751B,0x77BB,0x7C3D, -0x7C64,0x8A79,0x8AC2,0x581E,0x59BE,0x5E16,0x6377,0x7252, -0x758A,0x776B,0x8ADC,0x8CBC,0x8F12,0x5EF3,0x6674,0x6DF8, -0x807D,0x83C1,0x8ACB,0x9751,0x9BD6,0xFA00,0x5243,0x66FF, -0x6D95,0x6EEF,0x7DE0,0x8AE6,0x902E,0x905E,0x9AD4,0x521D, -0x527F,0x54E8,0x6194,0x6284,0x62DB,0x68A2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6912,0x695A,0x6A35,0x7092,0x7126,0x785D,0x7901,0x790E, -0x79D2,0x7A0D,0x8096,0x8278,0x82D5,0x8349,0x8549,0x8C82, -0x8D85,0x9162,0x918B,0x91AE,0x4FC3,0x56D1,0x71ED,0x77D7, -0x8700,0x89F8,0x5BF8,0x5FD6,0x6751,0x90A8,0x53E2,0x585A, -0x5BF5,0x60A4,0x6181,0x6460,0x7E3D,0x8070,0x8525,0x9283, -0x64AE,0x50AC,0x5D14,0x6700,0x589C,0x62BD,0x63A8,0x690E, -0x6978,0x6A1E,0x6E6B,0x76BA,0x79CB,0x82BB,0x8429,0x8ACF, -0x8DA8,0x8FFD,0x9112,0x914B,0x919C,0x9310,0x9318,0x939A, -0x96DB,0x9A36,0x9C0D,0x4E11,0x755C,0x795D,0x7AFA,0x7B51, -0x7BC9,0x7E2E,0x84C4,0x8E59,0x8E74,0x8EF8,0x9010,0x6625, -0x693F,0x7443,0x51FA,0x672E,0x9EDC,0x5145,0x5FE0,0x6C96, -0x87F2,0x885D,0x8877,0x60B4,0x81B5,0x8403, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8D05,0x53D6,0x5439,0x5634,0x5A36,0x5C31,0x708A,0x7FE0, -0x805A,0x8106,0x81ED,0x8DA3,0x9189,0x9A5F,0x9DF2,0x5074, -0x4EC4,0x53A0,0x60FB,0x6E2C,0x5C64,0x4F88,0x5024,0x55E4, -0x5CD9,0x5E5F,0x6065,0x6894,0x6CBB,0x6DC4,0x71BE,0x75D4, -0x75F4,0x7661,0x7A1A,0x7A49,0x7DC7,0x7DFB,0x7F6E,0x81F4, -0x86A9,0x8F1C,0x96C9,0x99B3,0x9F52,0x5247,0x52C5,0x98ED, -0x89AA,0x4E03,0x67D2,0x6F06,0x4FB5,0x5BE2,0x6795,0x6C88, -0x6D78,0x741B,0x7827,0x91DD,0x937C,0x87C4,0x79E4,0x7A31, -0x5FEB,0x4ED6,0x54A4,0x553E,0x58AE,0x59A5,0x60F0,0x6253, -0x62D6,0x6736,0x6955,0x8235,0x9640,0x99B1,0x99DD,0x502C, -0x5353,0x5544,0x577C,0xFA01,0x6258,0xFA02,0x64E2,0x666B, -0x67DD,0x6FC1,0x6FEF,0x7422,0x7438,0x8A17, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9438,0x5451,0x5606,0x5766,0x5F48,0x619A,0x6B4E,0x7058, -0x70AD,0x7DBB,0x8A95,0x596A,0x812B,0x63A2,0x7708,0x803D, -0x8CAA,0x5854,0x642D,0x69BB,0x5B95,0x5E11,0x6E6F,0xFA03, -0x8569,0x514C,0x53F0,0x592A,0x6020,0x614B,0x6B86,0x6C70, -0x6CF0,0x7B1E,0x80CE,0x82D4,0x8DC6,0x90B0,0x98B1,0xFA04, -0x64C7,0x6FA4,0x6491,0x6504,0x514E,0x5410,0x571F,0x8A0E, -0x615F,0x6876,0xFA05,0x75DB,0x7B52,0x7D71,0x901A,0x5806, -0x69CC,0x817F,0x892A,0x9000,0x9839,0x5078,0x5957,0x59AC, -0x6295,0x900F,0x9B2A,0x615D,0x7279,0x95D6,0x5761,0x5A46, -0x5DF4,0x628A,0x64AD,0x64FA,0x6777,0x6CE2,0x6D3E,0x722C, -0x7436,0x7834,0x7F77,0x82AD,0x8DDB,0x9817,0x5224,0x5742, -0x677F,0x7248,0x74E3,0x8CA9,0x8FA6,0x9211, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x962A,0x516B,0x53ED,0x634C,0x4F69,0x5504,0x6096,0x6557, -0x6C9B,0x6D7F,0x724C,0x72FD,0x7A17,0x8987,0x8C9D,0x5F6D, -0x6F8E,0x70F9,0x81A8,0x610E,0x4FBF,0x504F,0x6241,0x7247, -0x7BC7,0x7DE8,0x7FE9,0x904D,0x97AD,0x9A19,0x8CB6,0x576A, -0x5E73,0x67B0,0x840D,0x8A55,0x5420,0x5B16,0x5E63,0x5EE2, -0x5F0A,0x6583,0x80BA,0x853D,0x9589,0x965B,0x4F48,0x5305, -0x530D,0x530F,0x5486,0x54FA,0x5703,0x5E03,0x6016,0x629B, -0x62B1,0x6355,0xFA06,0x6CE1,0x6D66,0x75B1,0x7832,0x80DE, -0x812F,0x82DE,0x8461,0x84B2,0x888D,0x8912,0x900B,0x92EA, -0x98FD,0x9B91,0x5E45,0x66B4,0x66DD,0x7011,0x7206,0xFA07, -0x4FF5,0x527D,0x5F6A,0x6153,0x6753,0x6A19,0x6F02,0x74E2, -0x7968,0x8868,0x8C79,0x98C7,0x98C4,0x9A43, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x54C1,0x7A1F,0x6953,0x8AF7,0x8C4A,0x98A8,0x99AE,0x5F7C, -0x62AB,0x75B2,0x76AE,0x88AB,0x907F,0x9642,0x5339,0x5F3C, -0x5FC5,0x6CCC,0x73CC,0x7562,0x758B,0x7B46,0x82FE,0x999D, -0x4E4F,0x903C,0x4E0B,0x4F55,0x53A6,0x590F,0x5EC8,0x6630, -0x6CB3,0x7455,0x8377,0x8766,0x8CC0,0x9050,0x971E,0x9C15, -0x58D1,0x5B78,0x8650,0x8B14,0x9DB4,0x5BD2,0x6068,0x608D, -0x65F1,0x6C57,0x6F22,0x6FA3,0x701A,0x7F55,0x7FF0,0x9591, -0x9592,0x9650,0x97D3,0x5272,0x8F44,0x51FD,0x542B,0x54B8, -0x5563,0x558A,0x6ABB,0x6DB5,0x7DD8,0x8266,0x929C,0x9677, -0x9E79,0x5408,0x54C8,0x76D2,0x86E4,0x95A4,0x95D4,0x965C, -0x4EA2,0x4F09,0x59EE,0x5AE6,0x5DF7,0x6052,0x6297,0x676D, -0x6841,0x6C86,0x6E2F,0x7F38,0x809B,0x822A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xFA08,0xFA09,0x9805,0x4EA5,0x5055,0x54B3,0x5793,0x595A, -0x5B69,0x5BB3,0x61C8,0x6977,0x6D77,0x7023,0x87F9,0x89E3, -0x8A72,0x8AE7,0x9082,0x99ED,0x9AB8,0x52BE,0x6838,0x5016, -0x5E78,0x674F,0x8347,0x884C,0x4EAB,0x5411,0x56AE,0x73E6, -0x9115,0x97FF,0x9909,0x9957,0x9999,0x5653,0x589F,0x865B, -0x8A31,0x61B2,0x6AF6,0x737B,0x8ED2,0x6B47,0x96AA,0x9A57, -0x5955,0x7200,0x8D6B,0x9769,0x4FD4,0x5CF4,0x5F26,0x61F8, -0x665B,0x6CEB,0x70AB,0x7384,0x73B9,0x73FE,0x7729,0x774D, -0x7D43,0x7D62,0x7E23,0x8237,0x8852,0xFA0A,0x8CE2,0x9249, -0x986F,0x5B51,0x7A74,0x8840,0x9801,0x5ACC,0x4FE0,0x5354, -0x593E,0x5CFD,0x633E,0x6D79,0x72F9,0x8105,0x8107,0x83A2, -0x92CF,0x9830,0x4EA8,0x5144,0x5211,0x578B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5F62,0x6CC2,0x6ECE,0x7005,0x7050,0x70AF,0x7192,0x73E9, -0x7469,0x834A,0x87A2,0x8861,0x9008,0x90A2,0x93A3,0x99A8, -0x516E,0x5F57,0x60E0,0x6167,0x66B3,0x8559,0x8E4A,0x91AF, -0x978B,0x4E4E,0x4E92,0x547C,0x58D5,0x58FA,0x597D,0x5CB5, -0x5F27,0x6236,0x6248,0x660A,0x6667,0x6BEB,0x6D69,0x6DCF, -0x6E56,0x6EF8,0x6F94,0x6FE0,0x6FE9,0x705D,0x72D0,0x7425, -0x745A,0x74E0,0x7693,0x795C,0x7CCA,0x7E1E,0x80E1,0x82A6, -0x846B,0x84BF,0x864E,0x865F,0x8774,0x8B77,0x8C6A,0x93AC, -0x9800,0x9865,0x60D1,0x6216,0x9177,0x5A5A,0x660F,0x6DF7, -0x6E3E,0x743F,0x9B42,0x5FFD,0x60DA,0x7B0F,0x54C4,0x5F18, -0x6C5E,0x6CD3,0x6D2A,0x70D8,0x7D05,0x8679,0x8A0C,0x9D3B, -0x5316,0x548C,0x5B05,0x6A3A,0x706B,0x7575, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x798D,0x79BE,0x82B1,0x83EF,0x8A71,0x8B41,0x8CA8,0x9774, -0xFA0B,0x64F4,0x652B,0x78BA,0x78BB,0x7A6B,0x4E38,0x559A, -0x5950,0x5BA6,0x5E7B,0x60A3,0x63DB,0x6B61,0x6665,0x6853, -0x6E19,0x7165,0x74B0,0x7D08,0x9084,0x9A69,0x9C25,0x6D3B, -0x6ED1,0x733E,0x8C41,0x95CA,0x51F0,0x5E4C,0x5FA8,0x604D, -0x60F6,0x6130,0x614C,0x6643,0x6644,0x69A5,0x6CC1,0x6E5F, -0x6EC9,0x6F62,0x714C,0x749C,0x7687,0x7BC1,0x7C27,0x8352, -0x8757,0x9051,0x968D,0x9EC3,0x532F,0x56DE,0x5EFB,0x5F8A, -0x6062,0x6094,0x61F7,0x6666,0x6703,0x6A9C,0x6DEE,0x6FAE, -0x7070,0x736A,0x7E6A,0x81BE,0x8334,0x86D4,0x8AA8,0x8CC4, -0x5283,0x7372,0x5B96,0x6A6B,0x9404,0x54EE,0x5686,0x5B5D, -0x6548,0x6585,0x66C9,0x689F,0x6D8D,0x6DC6, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x723B,0x80B4,0x9175,0x9A4D,0x4FAF,0x5019,0x539A,0x540E, -0x543C,0x5589,0x55C5,0x5E3F,0x5F8C,0x673D,0x7166,0x73DD, -0x9005,0x52DB,0x52F3,0x5864,0x58CE,0x7104,0x718F,0x71FB, -0x85B0,0x8A13,0x6688,0x85A8,0x55A7,0x6684,0x714A,0x8431, -0x5349,0x5599,0x6BC1,0x5F59,0x5FBD,0x63EE,0x6689,0x7147, -0x8AF1,0x8F1D,0x9EBE,0x4F11,0x643A,0x70CB,0x7566,0x8667, -0x6064,0x8B4E,0x9DF8,0x5147,0x51F6,0x5308,0x6D36,0x80F8, -0x9ED1,0x6615,0x6B23,0x7098,0x75D5,0x5403,0x5C79,0x7D07, -0x8A16,0x6B20,0x6B3D,0x6B46,0x5438,0x6070,0x6D3D,0x7FD5, -0x8208,0x50D6,0x51DE,0x559C,0x566B,0x56CD,0x59EC,0x5B09, -0x5E0C,0x6199,0x6198,0x6231,0x665E,0x66E6,0x7199,0x71B9, -0x71BA,0x72A7,0x79A7,0x7A00,0x7FB2,0x8A70}; - -static int func_ksc5601_uni_onechar(int code){ - if ((code>=0x8141)&&(code<=0xC8FE)) - return(tab_ksc5601_uni0[code-0x8141]); - if ((code>=0xCAA1)&&(code<=0xFDFE)) - return(tab_ksc5601_uni1[code-0xCAA1]); - return(0); -} -/* page 0 0x00A1-0x0167 */ -static uint16 tab_uni_ksc56010[]={ -0xA2AE, 0, 0,0xA2B4, 0, 0,0xA1D7,0xA1A7, - 0,0xA8A3, 0, 0,0xA1A9, 0, 0,0xA1C6, -0xA1BE,0xA9F7,0xA9F8,0xA2A5, 0,0xA2D2,0xA1A4,0xA2AC, -0xA9F6,0xA8AC, 0,0xA8F9,0xA8F6,0xA8FA,0xA2AF, 0, - 0, 0, 0, 0, 0,0xA8A1, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xA8A2, - 0, 0, 0, 0, 0, 0,0xA1BF,0xA8AA, - 0, 0, 0, 0, 0,0xA8AD,0xA9AC, 0, - 0, 0, 0, 0, 0,0xA9A1, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xA9A3, - 0, 0, 0, 0, 0, 0,0xA1C0,0xA9AA, - 0, 0, 0, 0, 0,0xA9AD, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xA9A2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xA8A4,0xA9A4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xA9A5,0xA8A6,0xA9A6, 0, 0, 0, 0,0xA9A7, - 0, 0, 0, 0, 0, 0,0xA8A8,0xA9A8, -0xA8A9,0xA9A9, 0, 0, 0, 0, 0, 0, -0xA9B0,0xA8AF,0xA9AF, 0, 0, 0, 0, 0, - 0,0xA8AB,0xA9AB, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xA8AE,0xA9AE}; - -/* page 1 0x02C7-0x0451 */ -static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F5, -0xA5F6,0xA5F7,0xA5F8, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xACA7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xACA1,0xACA2,0xACA3,0xACA4,0xACA5,0xACA6,0xACA8, -0xACA9,0xACAA,0xACAB,0xACAC,0xACAD,0xACAE,0xACAF,0xACB0, -0xACB1,0xACB2,0xACB3,0xACB4,0xACB5,0xACB6,0xACB7,0xACB8, -0xACB9,0xACBA,0xACBB,0xACBC,0xACBD,0xACBE,0xACBF,0xACC0, -0xACC1,0xACD1,0xACD2,0xACD3,0xACD4,0xACD5,0xACD6,0xACD8, -0xACD9,0xACDA,0xACDB,0xACDC,0xACDD,0xACDE,0xACDF,0xACE0, -0xACE1,0xACE2,0xACE3,0xACE4,0xACE5,0xACE6,0xACE7,0xACE8, -0xACE9,0xACEA,0xACEB,0xACEC,0xACED,0xACEE,0xACEF,0xACF0, -0xACF1, 0,0xACD7}; - -/* page 2 0x2015-0x2312 */ -static uint16 tab_uni_ksc56012[]={ -0xA1AA, 0, 0,0xA1AE,0xA1AF, 0, 0,0xA1B0, -0xA1B1, 0, 0,0xA2D3,0xA2D4, 0, 0, 0, -0xA1A5,0xA1A6, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xA2B6, 0,0xA1C7,0xA1C8, 0, - 0, 0, 0, 0, 0, 0,0xA1D8, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 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 0, 0, 0,0xDABD, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE8A8,0xDCAF, 0, 0, 0, 0, 0,0xF0A3, - 0, 0, 0, 0,0xCDD5, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE0A9, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xDEAC, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xF0BA,0xEEB1, 0, 0,0xEEB2, - 0, 0, 0,0xF6CD, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xEED2, 0,0xD6C6, 0, 0, 0, 0, 0, -0xE0E5, 0, 0,0xF3BB, 0,0xE5E1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE4CB, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xD7A3, 0, - 0,0xDBC2, 0, 0, 0, 0,0xCAFE, 0, - 0, 0, 0, 0, 0,0xCFCF}; - -/* page 8 0xAC00-0xD7A3 */ -static uint16 tab_uni_ksc56018[]={ -0xB0A1,0xB0A2,0x8141,0x8142,0xB0A3,0x8143,0x8144,0xB0A4, -0xB0A5,0xB0A6,0xB0A7,0x8145,0x8146,0x8147,0x8148,0x8149, -0xB0A8,0xB0A9,0xB0AA,0xB0AB,0xB0AC,0xB0AD,0xB0AE,0xB0AF, -0x814A,0xB0B0,0xB0B1,0xB0B2,0xB0B3,0xB0B4,0x814B,0x814C, -0xB0B5,0x814D,0x814E,0x814F,0xB0B6,0x8150,0x8151,0x8152, -0x8153,0x8154,0x8155,0x8156,0xB0B7,0xB0B8,0x8157,0xB0B9, -0xB0BA,0xB0BB,0x8158,0x8159,0x815A,0x8161,0x8162,0x8163, -0xB0BC,0xB0BD,0x8164,0x8165,0xB0BE,0x8166,0x8167,0x8168, -0xB0BF,0x8169,0x816A,0x816B,0x816C,0x816D,0x816E,0x816F, -0x8170,0x8171,0x8172,0xB0C0,0x8173,0xB0C1,0x8174,0x8175, -0x8176,0x8177,0x8178,0x8179,0xB0C2,0x817A,0x8181,0x8182, -0xB0C3,0x8183,0x8184,0x8185,0xB0C4,0x8186,0x8187,0x8188, -0x8189,0x818A,0x818B,0x818C,0x818D,0x818E,0x818F,0x8190, -0x8191,0x8192,0x8193,0x8194,0x8195,0x8196,0x8197,0x8198, -0xB0C5,0xB0C6,0x8199,0x819A,0xB0C7,0x819B,0x819C,0xB0C8, -0xB0C9,0x819D,0xB0CA,0x819E,0x819F,0x81A0,0x81A1,0x81A2, -0xB0CB,0xB0CC,0x81A3,0xB0CD,0xB0CE,0xB0CF,0xB0D0,0x81A4, -0x81A5,0xB0D1,0xB0D2,0xB0D3,0xB0D4,0x81A6,0x81A7,0x81A8, -0xB0D5,0x81A9,0x81AA,0x81AB,0xB0D6,0x81AC,0x81AD,0x81AE, -0x81AF,0x81B0,0x81B1,0x81B2,0xB0D7,0xB0D8,0x81B3,0xB0D9, -0xB0DA,0xB0DB,0x81B4,0x81B5,0x81B6,0x81B7,0x81B8,0x81B9, -0xB0DC,0xB0DD,0xB0DE,0x81BA,0xB0DF,0x81BB,0x81BC,0xB0E0, -0xB0E1,0x81BD,0x81BE,0x81BF,0x81C0,0x81C1,0x81C2,0x81C3, -0xB0E2,0xB0E3,0x81C4,0xB0E4,0xB0E5,0xB0E6,0x81C5,0x81C6, -0x81C7,0xB0E7,0x81C8,0x81C9,0xB0E8,0x81CA,0x81CB,0x81CC, -0xB0E9,0x81CD,0x81CE,0x81CF,0xB0EA,0x81D0,0x81D1,0x81D2, -0x81D3,0x81D4,0x81D5,0x81D6,0x81D7,0xB0EB,0x81D8,0xB0EC, -0x81D9,0x81DA,0x81DB,0x81DC,0x81DD,0x81DE,0x81DF,0x81E0, -0xB0ED,0xB0EE,0x81E1,0x81E2,0xB0EF,0x81E3,0x81E4,0xB0F0, -0xB0F1,0x81E5,0xB0F2,0x81E6,0xB0F3,0x81E7,0x81E8,0xB0F4, -0xB0F5,0xB0F6,0x81E9,0xB0F7,0x81EA,0xB0F8,0xB0F9,0x81EB, -0x81EC,0x81ED,0x81EE,0x81EF,0xB0FA,0xB0FB,0x81F0,0x81F1, -0xB0FC,0x81F2,0x81F3,0x81F4,0xB0FD,0x81F5,0xB0FE,0x81F6, -0x81F7,0x81F8,0x81F9,0x81FA,0xB1A1,0xB1A2,0x81FB,0xB1A3, -0x81FC,0xB1A4,0x81FD,0x81FE,0x8241,0x8242,0x8243,0x8244, -0xB1A5,0x8245,0x8246,0x8247,0xB1A6,0x8248,0x8249,0x824A, -0xB1A7,0x824B,0x824C,0x824D,0x824E,0x824F,0x8250,0x8251, -0x8252,0xB1A8,0x8253,0x8254,0xB1A9,0xB1AA,0x8255,0x8256, -0x8257,0x8258,0x8259,0x825A,0xB1AB,0xB1AC,0x8261,0x8262, -0xB1AD,0x8263,0x8264,0x8265,0xB1AE,0x8266,0x8267,0x8268, -0x8269,0x826A,0x826B,0x826C,0xB1AF,0xB1B0,0x826D,0xB1B1, -0x826E,0xB1B2,0x826F,0x8270,0x8271,0x8272,0x8273,0x8274, -0xB1B3,0x8275,0x8276,0x8277,0xB1B4,0x8278,0x8279,0x827A, -0xB1B5,0x8281,0x8282,0x8283,0x8284,0x8285,0x8286,0x8287, -0x8288,0xB1B6,0x8289,0xB1B7,0x828A,0x828B,0x828C,0x828D, -0x828E,0x828F,0x8290,0x8291,0xB1B8,0xB1B9,0x8292,0x8293, -0xB1BA,0x8294,0x8295,0xB1BB,0xB1BC,0xB1BD,0xB1BE,0x8296, -0x8297,0x8298,0x8299,0xB1BF,0xB1C0,0xB1C1,0x829A,0xB1C2, -0x829B,0xB1C3,0xB1C4,0x829C,0x829D,0x829E,0x829F,0x82A0, -0xB1C5,0xB1C6,0x82A1,0x82A2,0xB1C7,0x82A3,0x82A4,0x82A5, -0xB1C8,0x82A6,0x82A7,0x82A8,0x82A9,0x82AA,0x82AB,0x82AC, -0x82AD,0x82AE,0x82AF,0x82B0,0xB1C9,0xB1CA,0x82B1,0x82B2, -0x82B3,0x82B4,0x82B5,0x82B6,0xB1CB,0x82B7,0x82B8,0x82B9, -0x82BA,0x82BB,0x82BC,0x82BD,0x82BE,0x82BF,0x82C0,0x82C1, -0x82C2,0x82C3,0x82C4,0x82C5,0x82C6,0x82C7,0x82C8,0xB1CC, -0x82C9,0x82CA,0x82CB,0x82CC,0x82CD,0x82CE,0x82CF,0x82D0, -0xB1CD,0xB1CE,0x82D1,0x82D2,0xB1CF,0x82D3,0x82D4,0x82D5, -0xB1D0,0x82D6,0x82D7,0x82D8,0x82D9,0x82DA,0x82DB,0x82DC, -0xB1D1,0xB1D2,0x82DD,0xB1D3,0x82DE,0x82DF,0x82E0,0x82E1, -0x82E2,0x82E3,0x82E4,0x82E5,0xB1D4,0x82E6,0x82E7,0x82E8, -0xB1D5,0x82E9,0x82EA,0x82EB,0xB1D6,0x82EC,0x82ED,0x82EE, -0x82EF,0x82F0,0x82F1,0x82F2,0x82F3,0x82F4,0x82F5,0x82F6, -0x82F7,0x82F8,0x82F9,0x82FA,0x82FB,0x82FC,0x82FD,0x82FE, -0xB1D7,0xB1D8,0x8341,0x8342,0xB1D9,0x8343,0x8344,0xB1DA, -0xB1DB,0xB1DC,0x8345,0x8346,0x8347,0x8348,0x8349,0x834A, -0xB1DD,0xB1DE,0x834B,0xB1DF,0x834C,0xB1E0,0x834D,0x834E, -0x834F,0x8350,0x8351,0x8352,0xB1E1,0x8353,0x8354,0x8355, -0x8356,0x8357,0x8358,0x8359,0x835A,0x8361,0x8362,0x8363, -0x8364,0x8365,0x8366,0x8367,0x8368,0x8369,0x836A,0x836B, -0x836C,0x836D,0x836E,0x836F,0x8370,0x8371,0x8372,0x8373, -0xB1E2,0xB1E3,0x8374,0x8375,0xB1E4,0x8376,0x8377,0xB1E5, -0xB1E6,0x8378,0xB1E7,0x8379,0x837A,0x8381,0x8382,0x8383, -0xB1E8,0xB1E9,0x8384,0xB1EA,0x8385,0xB1EB,0xB1EC,0x8386, -0x8387,0x8388,0xB1ED,0x8389,0xB1EE,0xB1EF,0xB1F0,0x838A, -0xB1F1,0x838B,0x838C,0x838D,0xB1F2,0x838E,0xB1F3,0x838F, -0x8390,0x8391,0x8392,0x8393,0xB1F4,0xB1F5,0x8394,0xB1F6, -0xB1F7,0xB1F8,0x8395,0x8396,0x8397,0xB1F9,0x8398,0x8399, -0xB1FA,0xB1FB,0x839A,0x839B,0xB1FC,0x839C,0x839D,0x839E, -0xB1FD,0x839F,0x83A0,0x83A1,0x83A2,0x83A3,0x83A4,0x83A5, -0xB1FE,0xB2A1,0x83A6,0xB2A2,0xB2A3,0xB2A4,0x83A7,0x83A8, -0x83A9,0x83AA,0x83AB,0x83AC,0xB2A5,0xB2A6,0x83AD,0x83AE, -0x83AF,0x83B0,0x83B1,0x83B2,0xB2A7,0x83B3,0x83B4,0x83B5, -0x83B6,0x83B7,0x83B8,0x83B9,0x83BA,0x83BB,0x83BC,0x83BD, -0x83BE,0x83BF,0x83C0,0x83C1,0x83C2,0x83C3,0x83C4,0x83C5, -0x83C6,0x83C7,0x83C8,0x83C9,0x83CA,0x83CB,0x83CC,0x83CD, -0x83CE,0x83CF,0x83D0,0x83D1,0x83D2,0x83D3,0x83D4,0x83D5, -0x83D6,0x83D7,0x83D8,0x83D9,0x83DA,0x83DB,0x83DC,0x83DD, -0x83DE,0x83DF,0x83E0,0x83E1,0xB2A8,0xB2A9,0xB2AA,0x83E2, -0xB2AB,0x83E3,0x83E4,0x83E5,0xB2AC,0x83E6,0x83E7,0x83E8, -0x83E9,0x83EA,0x83EB,0x83EC,0xB2AD,0xB2AE,0x83ED,0xB2AF, -0xB2B0,0xB2B1,0x83EE,0x83EF,0x83F0,0x83F1,0x83F2,0x83F3, -0xB2B2,0xB2B3,0x83F4,0x83F5,0xB2B4,0x83F6,0x83F7,0x83F8, -0x83F9,0x83FA,0x83FB,0x83FC,0x83FD,0x83FE,0x8441,0x8442, -0xB2B5,0x8443,0x8444,0xB2B6,0x8445,0xB2B7,0x8446,0x8447, -0x8448,0x8449,0x844A,0x844B,0xB2B8,0x844C,0x844D,0x844E, -0xB2B9,0x844F,0x8450,0x8451,0xB2BA,0x8452,0x8453,0x8454, -0x8455,0x8456,0x8457,0x8458,0x8459,0x845A,0x8461,0xB2BB, -0xB2BC,0x8462,0x8463,0x8464,0x8465,0xB2BD,0x8466,0x8467, -0xB2BE,0x8468,0x8469,0x846A,0x846B,0x846C,0x846D,0x846E, -0x846F,0x8470,0x8471,0x8472,0x8473,0x8474,0x8475,0x8476, -0x8477,0x8478,0x8479,0x847A,0x8481,0x8482,0x8483,0x8484, -0x8485,0x8486,0x8487,0x8488,0xB2BF,0xB2C0,0x8489,0x848A, -0xB2C1,0x848B,0xB2C2,0x848C,0xB2C3,0x848D,0x848E,0x848F, -0x8490,0x8491,0x8492,0x8493,0xB2C4,0xB2C5,0x8494,0xB2C6, -0x8495,0xB2C7,0xB2C8,0xB2C9,0x8496,0x8497,0x8498,0x8499, -0xB2CA,0xB2CB,0x849A,0x849B,0x849C,0x849D,0x849E,0x849F, -0xB2CC,0x84A0,0x84A1,0x84A2,0x84A3,0x84A4,0x84A5,0x84A6, -0x84A7,0x84A8,0x84A9,0x84AA,0xB2CD,0xB2CE,0x84AB,0x84AC, -0x84AD,0x84AE,0x84AF,0x84B0,0xB2CF,0xB2D0,0x84B1,0x84B2, -0x84B3,0x84B4,0x84B5,0x84B6,0x84B7,0x84B8,0x84B9,0x84BA, -0x84BB,0x84BC,0x84BD,0x84BE,0x84BF,0x84C0,0x84C1,0x84C2, -0x84C3,0xB2D1,0x84C4,0x84C5,0x84C6,0x84C7,0x84C8,0x84C9, -0xB2D2,0x84CA,0x84CB,0x84CC,0xB2D3,0x84CD,0x84CE,0x84CF, -0xB2D4,0x84D0,0x84D1,0x84D2,0x84D3,0x84D4,0x84D5,0x84D6, -0xB2D5,0xB2D6,0x84D7,0x84D8,0x84D9,0xB2D7,0x84DA,0x84DB, -0x84DC,0x84DD,0x84DE,0x84DF,0xB2D8,0x84E0,0x84E1,0x84E2, -0x84E3,0x84E4,0x84E5,0x84E6,0x84E7,0x84E8,0x84E9,0x84EA, -0x84EB,0x84EC,0x84ED,0x84EE,0x84EF,0x84F0,0x84F1,0x84F2, -0x84F3,0x84F4,0x84F5,0x84F6,0x84F7,0x84F8,0x84F9,0x84FA, -0xB2D9,0xB2DA,0x84FB,0x84FC,0xB2DB,0x84FD,0x84FE,0x8541, -0xB2DC,0x8542,0x8543,0x8544,0x8545,0x8546,0x8547,0xB2DD, -0xB2DE,0xB2DF,0x8548,0xB2E0,0x8549,0xB2E1,0xB2E2,0x854A, -0x854B,0x854C,0x854D,0x854E,0xB2E3,0x854F,0x8550,0x8551, -0x8552,0x8553,0x8554,0x8555,0xB2E4,0x8556,0x8557,0x8558, -0x8559,0x855A,0x8561,0x8562,0x8563,0x8564,0x8565,0x8566, -0xB2E5,0xB2E6,0x8567,0x8568,0x8569,0x856A,0x856B,0x856C, -0xB2E7,0xB2E8,0x856D,0x856E,0xB2E9,0x856F,0x8570,0x8571, -0xB2EA,0x8572,0x8573,0x8574,0x8575,0x8576,0x8577,0x8578, -0xB2EB,0xB2EC,0x8579,0x857A,0xB2ED,0x8581,0x8582,0x8583, -0x8584,0x8585,0x8586,0x8587,0xB2EE,0x8588,0x8589,0x858A, -0xB2EF,0x858B,0x858C,0x858D,0xB2F0,0x858E,0x858F,0x8590, -0x8591,0x8592,0x8593,0x8594,0xB2F1,0xB2F2,0x8595,0x8596, -0x8597,0x8598,0x8599,0x859A,0x859B,0x859C,0x859D,0x859E, -0xB2F3,0x859F,0x85A0,0x85A1,0x85A2,0x85A3,0x85A4,0x85A5, -0x85A6,0x85A7,0x85A8,0x85A9,0x85AA,0x85AB,0x85AC,0x85AD, -0x85AE,0x85AF,0x85B0,0x85B1,0x85B2,0x85B3,0x85B4,0x85B5, -0x85B6,0x85B7,0x85B8,0x85B9,0xB2F4,0xB2F5,0x85BA,0x85BB, -0xB2F6,0x85BC,0xB2F7,0x85BD,0xB2F8,0x85BE,0xB2F9,0x85BF, -0x85C0,0x85C1,0x85C2,0xB2FA,0xB2FB,0xB2FC,0x85C3,0xB2FD, -0x85C4,0xB2FE,0x85C5,0x85C6,0x85C7,0xB3A1,0x85C8,0x85C9, -0x85CA,0x85CB,0x85CC,0x85CD,0x85CE,0x85CF,0x85D0,0x85D1, -0x85D2,0x85D3,0x85D4,0x85D5,0x85D6,0x85D7,0x85D8,0x85D9, -0x85DA,0x85DB,0x85DC,0x85DD,0x85DE,0x85DF,0x85E0,0x85E1, -0x85E2,0x85E3,0x85E4,0x85E5,0xB3A2,0xB3A3,0x85E6,0x85E7, -0xB3A4,0x85E8,0x85E9,0x85EA,0xB3A5,0x85EB,0x85EC,0x85ED, -0x85EE,0x85EF,0x85F0,0x85F1,0xB3A6,0xB3A7,0x85F2,0xB3A8, -0x85F3,0xB3A9,0x85F4,0x85F5,0x85F6,0x85F7,0x85F8,0x85F9, -0xB3AA,0xB3AB,0xB3AC,0x85FA,0xB3AD,0x85FB,0x85FC,0xB3AE, -0xB3AF,0xB3B0,0xB3B1,0x85FD,0x85FE,0x8641,0x8642,0x8643, -0xB3B2,0xB3B3,0x8644,0xB3B4,0xB3B5,0xB3B6,0xB3B7,0xB3B8, -0x8645,0xB3B9,0x8646,0xB3BA,0xB3BB,0xB3BC,0x8647,0x8648, -0xB3BD,0x8649,0x864A,0x864B,0xB3BE,0x864C,0x864D,0x864E, -0x864F,0x8650,0x8651,0x8652,0xB3BF,0xB3C0,0x8653,0xB3C1, -0xB3C2,0xB3C3,0x8654,0x8655,0x8656,0x8657,0x8658,0x8659, -0xB3C4,0xB3C5,0x865A,0x8661,0xB3C6,0x8662,0x8663,0x8664, -0xB3C7,0x8665,0x8666,0x8667,0x8668,0x8669,0x866A,0x866B, -0xB3C8,0x866C,0x866D,0x866E,0x866F,0xB3C9,0x8670,0x8671, -0x8672,0x8673,0x8674,0x8675,0x8676,0x8677,0x8678,0x8679, -0x867A,0x8681,0x8682,0x8683,0x8684,0x8685,0x8686,0x8687, -0x8688,0x8689,0x868A,0x868B,0x868C,0x868D,0x868E,0x868F, -0x8690,0x8691,0x8692,0x8693,0x8694,0x8695,0x8696,0x8697, -0xB3CA,0xB3CB,0x8698,0xB3CC,0xB3CD,0x8699,0x869A,0x869B, -0xB3CE,0x869C,0xB3CF,0xB3D0,0x869D,0x869E,0x869F,0x86A0, -0xB3D1,0xB3D2,0x86A1,0xB3D3,0xB3D4,0xB3D5,0x86A2,0x86A3, -0x86A4,0x86A5,0x86A6,0xB3D6,0xB3D7,0xB3D8,0x86A7,0x86A8, -0xB3D9,0x86A9,0x86AA,0x86AB,0xB3DA,0x86AC,0x86AD,0x86AE, -0x86AF,0x86B0,0x86B1,0x86B2,0xB3DB,0xB3DC,0x86B3,0xB3DD, -0xB3DE,0xB3DF,0x86B4,0x86B5,0x86B6,0x86B7,0x86B8,0x86B9, -0xB3E0,0xB3E1,0x86BA,0x86BB,0xB3E2,0x86BC,0x86BD,0x86BE, -0xB3E3,0x86BF,0x86C0,0x86C1,0x86C2,0x86C3,0x86C4,0x86C5, -0xB3E4,0xB3E5,0x86C6,0x86C7,0xB3E6,0xB3E7,0x86C8,0x86C9, -0xB3E8,0x86CA,0x86CB,0x86CC,0xB3E9,0x86CD,0x86CE,0x86CF, -0xB3EA,0x86D0,0x86D1,0x86D2,0x86D3,0x86D4,0x86D5,0x86D6, -0x86D7,0x86D8,0x86D9,0x86DA,0x86DB,0x86DC,0x86DD,0x86DE, -0x86DF,0x86E0,0x86E1,0x86E2,0x86E3,0x86E4,0x86E5,0x86E6, -0xB3EB,0xB3EC,0x86E7,0x86E8,0xB3ED,0x86E9,0x86EA,0x86EB, -0xB3EE,0x86EC,0xB3EF,0x86ED,0x86EE,0x86EF,0x86F0,0x86F1, -0xB3F0,0xB3F1,0x86F2,0xB3F2,0x86F3,0xB3F3,0x86F4,0x86F5, -0x86F6,0x86F7,0xB3F4,0xB3F5,0xB3F6,0x86F8,0x86F9,0x86FA, -0xB3F7,0x86FB,0x86FC,0x86FD,0xB3F8,0x86FE,0x8741,0x8742, -0x8743,0x8744,0x8745,0x8746,0x8747,0x8748,0x8749,0x874A, -0xB3F9,0x874B,0x874C,0x874D,0x874E,0x874F,0x8750,0x8751, -0x8752,0x8753,0x8754,0x8755,0x8756,0x8757,0x8758,0x8759, -0x875A,0x8761,0x8762,0x8763,0x8764,0x8765,0x8766,0x8767, -0x8768,0x8769,0x876A,0x876B,0x876C,0x876D,0x876E,0x876F, -0x8770,0x8771,0x8772,0x8773,0xB3FA,0x8774,0x8775,0x8776, -0xB3FB,0x8777,0x8778,0x8779,0xB3FC,0x877A,0x8781,0x8782, -0x8783,0x8784,0x8785,0x8786,0xB3FD,0xB3FE,0x8787,0xB4A1, -0x8788,0x8789,0x878A,0x878B,0x878C,0x878D,0x878E,0x878F, -0xB4A2,0xB4A3,0x8790,0x8791,0xB4A4,0x8792,0x8793,0x8794, -0xB4A5,0x8795,0x8796,0x8797,0x8798,0x8799,0x879A,0x879B, -0x879C,0xB4A6,0x879D,0xB4A7,0x879E,0xB4A8,0x879F,0x87A0, -0x87A1,0x87A2,0x87A3,0x87A4,0xB4A9,0xB4AA,0x87A5,0x87A6, -0xB4AB,0x87A7,0x87A8,0xB4AC,0xB4AD,0x87A9,0x87AA,0x87AB, -0x87AC,0x87AD,0x87AE,0x87AF,0xB4AE,0xB4AF,0x87B0,0xB4B0, -0x87B1,0xB4B1,0x87B2,0x87B3,0x87B4,0x87B5,0x87B6,0x87B7, -0xB4B2,0x87B8,0x87B9,0x87BA,0x87BB,0x87BC,0x87BD,0x87BE, -0x87BF,0x87C0,0x87C1,0x87C2,0x87C3,0x87C4,0x87C5,0x87C6, -0x87C7,0x87C8,0x87C9,0x87CA,0xB4B3,0x87CB,0x87CC,0x87CD, -0x87CE,0x87CF,0x87D0,0x87D1,0xB4B4,0x87D2,0x87D3,0x87D4, -0x87D5,0x87D6,0x87D7,0x87D8,0x87D9,0x87DA,0x87DB,0x87DC, -0x87DD,0x87DE,0x87DF,0x87E0,0x87E1,0x87E2,0x87E3,0x87E4, -0x87E5,0x87E6,0x87E7,0x87E8,0x87E9,0x87EA,0x87EB,0x87EC, -0xB4B5,0x87ED,0x87EE,0x87EF,0xB4B6,0x87F0,0x87F1,0x87F2, -0xB4B7,0x87F3,0x87F4,0x87F5,0x87F6,0x87F7,0x87F8,0x87F9, -0xB4B8,0xB4B9,0x87FA,0x87FB,0x87FC,0x87FD,0x87FE,0x8841, -0x8842,0x8843,0x8844,0x8845,0xB4BA,0xB4BB,0x8846,0x8847, -0x8848,0x8849,0x884A,0x884B,0xB4BC,0x884C,0x884D,0x884E, -0x884F,0x8850,0x8851,0x8852,0xB4BD,0xB4BE,0x8853,0x8854, -0x8855,0xB4BF,0x8856,0x8857,0x8858,0x8859,0x885A,0x8861, -0xB4C0,0xB4C1,0x8862,0x8863,0xB4C2,0x8864,0x8865,0x8866, -0xB4C3,0xB4C4,0xB4C5,0x8867,0x8868,0x8869,0x886A,0x886B, -0xB4C6,0xB4C7,0x886C,0xB4C8,0x886D,0xB4C9,0xB4CA,0x886E, -0x886F,0x8870,0xB4CB,0x8871,0xB4CC,0x8872,0x8873,0x8874, -0xB4CD,0x8875,0x8876,0x8877,0xB4CE,0x8878,0x8879,0x887A, -0x8881,0x8882,0x8883,0x8884,0x8885,0x8886,0x8887,0x8888, -0x8889,0x888A,0x888B,0x888C,0x888D,0x888E,0x888F,0x8890, -0xB4CF,0xB4D0,0x8891,0x8892,0xB4D1,0x8893,0x8894,0x8895, -0xB4D2,0x8896,0xB4D3,0x8897,0x8898,0x8899,0x889A,0x889B, -0xB4D4,0xB4D5,0x889C,0xB4D6,0x889D,0xB4D7,0x889E,0x889F, -0x88A0,0x88A1,0xB4D8,0x88A2,0xB4D9,0xB4DA,0xB4DB,0x88A3, -0xB4DC,0x88A4,0x88A5,0xB4DD,0xB4DE,0xB4DF,0xB4E0,0xB4E1, -0x88A6,0x88A7,0x88A8,0xB4E2,0xB4E3,0xB4E4,0x88A9,0xB4E5, -0xB4E6,0xB4E7,0xB4E8,0xB4E9,0x88AA,0x88AB,0x88AC,0xB4EA, -0xB4EB,0xB4EC,0x88AD,0x88AE,0xB4ED,0x88AF,0x88B0,0x88B1, -0xB4EE,0x88B2,0x88B3,0x88B4,0x88B5,0x88B6,0x88B7,0x88B8, -0xB4EF,0xB4F0,0x88B9,0xB4F1,0xB4F2,0xB4F3,0x88BA,0x88BB, -0x88BC,0x88BD,0x88BE,0x88BF,0xB4F4,0x88C0,0x88C1,0x88C2, -0x88C3,0x88C4,0x88C5,0x88C6,0x88C7,0x88C8,0x88C9,0x88CA, -0x88CB,0x88CC,0x88CD,0x88CE,0x88CF,0x88D0,0x88D1,0x88D2, -0x88D3,0x88D4,0x88D5,0x88D6,0x88D7,0x88D8,0x88D9,0x88DA, -0x88DB,0x88DC,0x88DD,0x88DE,0x88DF,0x88E0,0x88E1,0x88E2, -0x88E3,0x88E4,0x88E5,0x88E6,0x88E7,0x88E8,0x88E9,0x88EA, -0x88EB,0x88EC,0x88ED,0x88EE,0x88EF,0x88F0,0x88F1,0x88F2, -0x88F3,0x88F4,0x88F5,0x88F6,0xB4F5,0xB4F6,0xB4F7,0x88F7, -0xB4F8,0x88F8,0x88F9,0xB4F9,0xB4FA,0x88FA,0xB4FB,0xB4FC, -0x88FB,0x88FC,0x88FD,0x88FE,0xB4FD,0xB4FE,0x8941,0xB5A1, -0x8942,0xB5A2,0x8943,0xB5A3,0x8944,0x8945,0xB5A4,0x8946, -0xB5A5,0xB5A6,0x8947,0x8948,0xB5A7,0x8949,0x894A,0x894B, -0xB5A8,0x894C,0x894D,0x894E,0x894F,0x8950,0x8951,0x8952, -0xB5A9,0xB5AA,0x8953,0xB5AB,0xB5AC,0xB5AD,0x8954,0x8955, -0x8956,0x8957,0x8958,0x8959,0xB5AE,0x895A,0x8961,0x8962, -0xB5AF,0x8963,0x8964,0x8965,0xB5B0,0x8966,0x8967,0x8968, -0x8969,0x896A,0x896B,0x896C,0x896D,0x896E,0x896F,0x8970, -0xB5B1,0xB5B2,0x8971,0x8972,0x8973,0x8974,0x8975,0x8976, -0xB5B3,0x8977,0x8978,0x8979,0xB5B4,0x897A,0x8981,0x8982, -0x8983,0x8984,0x8985,0x8986,0x8987,0x8988,0x8989,0x898A, -0x898B,0x898C,0x898D,0x898E,0x898F,0x8990,0x8991,0x8992, -0x8993,0x8994,0x8995,0x8996,0xB5B5,0xB5B6,0x8997,0x8998, -0xB5B7,0x8999,0x899A,0xB5B8,0xB5B9,0x899B,0xB5BA,0x899C, -0xB5BB,0x899D,0x899E,0x899F,0xB5BC,0xB5BD,0x89A0,0xB5BE, -0x89A1,0xB5BF,0x89A2,0xB5C0,0x89A3,0xB5C1,0x89A4,0x89A5, -0xB5C2,0x89A6,0x89A7,0x89A8,0xB5C3,0x89A9,0x89AA,0x89AB, -0xB5C4,0x89AC,0x89AD,0x89AE,0x89AF,0x89B0,0x89B1,0x89B2, -0x89B3,0x89B4,0x89B5,0x89B6,0x89B7,0x89B8,0x89B9,0x89BA, -0x89BB,0x89BC,0x89BD,0x89BE,0xB5C5,0x89BF,0x89C0,0x89C1, -0x89C2,0x89C3,0x89C4,0x89C5,0x89C6,0x89C7,0x89C8,0x89C9, -0x89CA,0x89CB,0x89CC,0x89CD,0x89CE,0x89CF,0x89D0,0x89D1, -0xB5C6,0x89D2,0x89D3,0x89D4,0x89D5,0x89D6,0x89D7,0x89D8, -0xB5C7,0x89D9,0x89DA,0x89DB,0xB5C8,0x89DC,0x89DD,0x89DE, -0xB5C9,0x89DF,0x89E0,0x89E1,0x89E2,0x89E3,0x89E4,0x89E5, -0xB5CA,0xB5CB,0x89E6,0xB5CC,0x89E7,0x89E8,0x89E9,0x89EA, -0x89EB,0x89EC,0x89ED,0x89EE,0xB5CD,0x89EF,0x89F0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061,0x9062, -0x9063,0x9064,0x9065,0x9066,0xB8A7,0xB8A8,0x9067,0xB8A9, -0x9068,0xB8AA,0xB8AB,0x9069,0x906A,0xB8AC,0xB8AD,0x906B, -0x906C,0x906D,0x906E,0x906F,0x9070,0x9071,0x9072,0x9073, -0x9074,0x9075,0x9076,0x9077,0x9078,0x9079,0x907A,0x9081, -0x9082,0x9083,0x9084,0x9085,0x9086,0x9087,0x9088,0x9089, -0x908A,0x908B,0x908C,0x908D,0xB8AE,0xB8AF,0x908E,0x908F, -0xB8B0,0x9090,0x9091,0x9092,0xB8B1,0x9093,0x9094,0x9095, -0x9096,0x9097,0x9098,0x9099,0xB8B2,0xB8B3,0x909A,0xB8B4, -0x909B,0xB8B5,0x909C,0x909D,0x909E,0x909F,0x90A0,0x90A1, -0xB8B6,0xB8B7,0x90A2,0x90A3,0xB8B8,0x90A4,0xB8B9,0xB8BA, -0xB8BB,0xB8BC,0xB8BD,0x90A5,0x90A6,0x90A7,0x90A8,0x90A9, -0xB8BE,0xB8BF,0x90AA,0xB8C0,0x90AB,0xB8C1,0xB8C2,0x90AC, -0x90AD,0xB8C3,0x90AE,0xB8C4,0xB8C5,0xB8C6,0x90AF,0x90B0, -0xB8C7,0x90B1,0x90B2,0x90B3,0xB8C8,0x90B4,0x90B5,0x90B6, -0x90B7,0x90B8,0x90B9,0x90BA,0xB8C9,0xB8CA,0x90BB,0xB8CB, -0xB8CC,0xB8CD,0xB8CE,0x90BC,0x90BD,0x90BE,0x90BF,0x90C0, -0xB8CF,0xB8D0,0x90C1,0x90C2,0x90C3,0x90C4,0x90C5,0x90C6, -0xB8D1,0x90C7,0x90C8,0x90C9,0x90CA,0x90CB,0x90CC,0x90CD, -0x90CE,0x90CF,0x90D0,0x90D1,0x90D2,0xB8D2,0x90D3,0x90D4, -0x90D5,0x90D6,0x90D7,0x90D8,0x90D9,0x90DA,0x90DB,0x90DC, -0x90DD,0x90DE,0x90DF,0x90E0,0x90E1,0x90E2,0x90E3,0x90E4, -0x90E5,0x90E6,0x90E7,0x90E8,0x90E9,0x90EA,0x90EB,0x90EC, -0x90ED,0x90EE,0x90EF,0x90F0,0x90F1,0x90F2,0x90F3,0x90F4, -0xB8D3,0xB8D4,0x90F5,0x90F6,0xB8D5,0x90F7,0x90F8,0x90F9, -0xB8D6,0x90FA,0xB8D7,0x90FB,0x90FC,0x90FD,0x90FE,0x9141, -0xB8D8,0xB8D9,0x9142,0xB8DA,0x9143,0xB8DB,0xB8DC,0x9144, -0x9145,0x9146,0x9147,0xB8DD,0xB8DE,0xB8DF,0x9148,0x9149, -0xB8E0,0x914A,0x914B,0x914C,0xB8E1,0x914D,0x914E,0x914F, -0x9150,0x9151,0x9152,0x9153,0xB8E2,0xB8E3,0x9154,0xB8E4, -0xB8E5,0xB8E6,0x9155,0x9156,0x9157,0x9158,0x9159,0x915A, -0xB8E7,0xB8E8,0x9161,0x9162,0xB8E9,0x9163,0x9164,0x9165, -0xB8EA,0x9166,0x9167,0x9168,0x9169,0x916A,0x916B,0x916C, -0x916D,0x916E,0x916F,0xB8EB,0xB8EC,0xB8ED,0x9170,0xB8EE, -0x9171,0x9172,0x9173,0x9174,0xB8EF,0x9175,0x9176,0x9177, -0x9178,0x9179,0x917A,0x9181,0x9182,0x9183,0x9184,0x9185, -0x9186,0x9187,0x9188,0x9189,0x918A,0x918B,0x918C,0x918D, -0x918E,0x918F,0x9190,0x9191,0x9192,0x9193,0x9194,0x9195, -0xB8F0,0xB8F1,0x9196,0xB8F2,0xB8F3,0x9197,0x9198,0x9199, -0xB8F4,0x919A,0xB8F5,0x919B,0x919C,0x919D,0x919E,0x919F, -0xB8F6,0xB8F7,0x91A0,0xB8F8,0x91A1,0xB8F9,0x91A2,0x91A3, -0x91A4,0x91A5,0x91A6,0x91A7,0xB8FA,0x91A8,0x91A9,0x91AA, -0xB8FB,0x91AB,0x91AC,0x91AD,0x91AE,0x91AF,0x91B0,0x91B1, -0x91B2,0x91B3,0x91B4,0x91B5,0x91B6,0x91B7,0x91B8,0x91B9, -0xB8FC,0xB8FD,0x91BA,0x91BB,0x91BC,0x91BD,0x91BE,0x91BF, -0x91C0,0x91C1,0x91C2,0x91C3,0x91C4,0x91C5,0x91C6,0x91C7, -0x91C8,0x91C9,0x91CA,0x91CB,0x91CC,0x91CD,0x91CE,0x91CF, -0x91D0,0x91D1,0x91D2,0x91D3,0x91D4,0x91D5,0x91D6,0x91D7, -0x91D8,0x91D9,0x91DA,0x91DB,0xB8FE,0x91DC,0x91DD,0x91DE, -0xB9A1,0x91DF,0x91E0,0x91E1,0xB9A2,0x91E2,0x91E3,0x91E4, -0x91E5,0x91E6,0x91E7,0x91E8,0x91E9,0xB9A3,0x91EA,0xB9A4, -0x91EB,0xB9A5,0x91EC,0x91ED,0x91EE,0x91EF,0x91F0,0x91F1, -0xB9A6,0x91F2,0x91F3,0x91F4,0xB9A7,0x91F5,0x91F6,0x91F7, -0xB9A8,0x91F8,0x91F9,0x91FA,0x91FB,0x91FC,0x91FD,0x91FE, -0x9241,0xB9A9,0x9242,0xB9AA,0x9243,0x9244,0x9245,0x9246, -0x9247,0x9248,0x9249,0x924A,0xB9AB,0xB9AC,0xB9AD,0x924B, -0xB9AE,0x924C,0x924D,0xB9AF,0xB9B0,0xB9B1,0xB9B2,0x924E, -0x924F,0x9250,0x9251,0x9252,0xB9B3,0xB9B4,0x9253,0xB9B5, -0x9254,0xB9B6,0x9255,0x9256,0x9257,0xB9B7,0x9258,0xB9B8, -0xB9B9,0x9259,0x925A,0x9261,0xB9BA,0x9262,0x9263,0x9264, -0xB9BB,0x9265,0x9266,0x9267,0x9268,0x9269,0x926A,0x926B, -0x926C,0xB9BC,0x926D,0xB9BD,0x926E,0x926F,0x9270,0x9271, -0x9272,0x9273,0x9274,0x9275,0xB9BE,0x9276,0x9277,0x9278, -0x9279,0x927A,0x9281,0x9282,0x9283,0x9284,0x9285,0x9286, -0x9287,0x9288,0x9289,0x928A,0x928B,0x928C,0x928D,0x928E, -0x928F,0x9290,0x9291,0x9292,0x9293,0x9294,0x9295,0x9296, -0xB9BF,0x9297,0x9298,0x9299,0xB9C0,0x929A,0x929B,0x929C, -0xB9C1,0x929D,0x929E,0x929F,0x92A0,0x92A1,0x92A2,0x92A3, -0x92A4,0x92A5,0x92A6,0x92A7,0x92A8,0x92A9,0x92AA,0x92AB, -0x92AC,0x92AD,0x92AE,0x92AF,0xB9C2,0x92B0,0x92B1,0x92B2, -0xB9C3,0x92B3,0x92B4,0x92B5,0xB9C4,0x92B6,0x92B7,0x92B8, -0x92B9,0x92BA,0x92BB,0x92BC,0xB9C5,0x92BD,0x92BE,0xB9C6, -0x92BF,0x92C0,0x92C1,0x92C2,0x92C3,0x92C4,0x92C5,0x92C6, -0xB9C7,0x92C7,0x92C8,0x92C9,0xB9C8,0x92CA,0x92CB,0x92CC, -0xB9C9,0x92CD,0x92CE,0x92CF,0x92D0,0x92D1,0x92D2,0x92D3, -0xB9CA,0x92D4,0x92D5,0xB9CB,0x92D6,0x92D7,0x92D8,0x92D9, -0x92DA,0x92DB,0x92DC,0x92DD,0x92DE,0x92DF,0x92E0,0x92E1, -0x92E2,0x92E3,0x92E4,0x92E5,0x92E6,0x92E7,0x92E8,0x92E9, -0x92EA,0x92EB,0x92EC,0x92ED,0x92EE,0x92EF,0x92F0,0x92F1, -0x92F2,0x92F3,0x92F4,0x92F5,0x92F6,0x92F7,0x92F8,0x92F9, -0xB9CC,0xB9CD,0x92FA,0x92FB,0xB9CE,0x92FC,0x92FD,0xB9CF, -0xB9D0,0x92FE,0xB9D1,0x9341,0x9342,0x9343,0x9344,0x9345, -0xB9D2,0xB9D3,0x9346,0xB9D4,0xB9D5,0xB9D6,0x9347,0xB9D7, -0x9348,0xB9D8,0x9349,0x934A,0xB9D9,0xB9DA,0xB9DB,0xB9DC, -0xB9DD,0x934B,0x934C,0xB9DE,0xB9DF,0xB9E0,0xB9E1,0xB9E2, -0x934D,0x934E,0x934F,0x9350,0xB9E3,0xB9E4,0x9351,0xB9E5, -0x9352,0xB9E6,0x9353,0x9354,0x9355,0xB9E7,0x9356,0x9357, -0xB9E8,0xB9E9,0x9358,0x9359,0xB9EA,0x935A,0x9361,0x9362, -0xB9EB,0x9363,0x9364,0x9365,0x9366,0x9367,0x9368,0x9369, -0xB9EC,0xB9ED,0x936A,0xB9EE,0xB9EF,0xB9F0,0x936B,0x936C, -0x936D,0xB9F1,0x936E,0x936F,0xB9F2,0xB9F3,0x9370,0x9371, -0xB9F4,0x9372,0x9373,0x9374,0x9375,0x9376,0x9377,0x9378, -0x9379,0x937A,0x9381,0x9382,0x9383,0xB9F5,0x9384,0x9385, -0x9386,0x9387,0x9388,0x9389,0x938A,0x938B,0x938C,0x938D, -0x938E,0x938F,0x9390,0x9391,0x9392,0x9393,0x9394,0x9395, -0x9396,0x9397,0x9398,0x9399,0x939A,0x939B,0x939C,0x939D, -0x939E,0x939F,0x93A0,0x93A1,0x93A2,0x93A3,0x93A4,0x93A5, -0x93A6,0x93A7,0x93A8,0x93A9,0xB9F6,0xB9F7,0x93AA,0x93AB, -0xB9F8,0x93AC,0x93AD,0xB9F9,0xB9FA,0x93AE,0xB9FB,0x93AF, -0x93B0,0x93B1,0x93B2,0x93B3,0xB9FC,0xB9FD,0x93B4,0xB9FE, -0x93B5,0xBAA1,0xBAA2,0x93B6,0x93B7,0x93B8,0x93B9,0x93BA, -0xBAA3,0xBAA4,0x93BB,0x93BC,0xBAA5,0x93BD,0x93BE,0xBAA6, -0xBAA7,0x93BF,0x93C0,0x93C1,0x93C2,0x93C3,0x93C4,0x93C5, -0xBAA8,0xBAA9,0x93C6,0xBAAA,0xBAAB,0xBAAC,0x93C7,0x93C8, -0x93C9,0x93CA,0x93CB,0x93CC,0xBAAD,0xBAAE,0x93CD,0x93CE, -0xBAAF,0x93CF,0x93D0,0x93D1,0xBAB0,0x93D2,0x93D3,0x93D4, -0x93D5,0x93D6,0x93D7,0x93D8,0x93D9,0xBAB1,0x93DA,0xBAB2, -0xBAB3,0xBAB4,0x93DB,0x93DC,0x93DD,0xBAB5,0x93DE,0x93DF, -0xBAB6,0x93E0,0x93E1,0x93E2,0xBAB7,0x93E3,0x93E4,0x93E5, -0x93E6,0x93E7,0x93E8,0x93E9,0x93EA,0x93EB,0x93EC,0x93ED, -0x93EE,0x93EF,0x93F0,0x93F1,0x93F2,0x93F3,0x93F4,0x93F5, -0x93F6,0x93F7,0x93F8,0x93F9,0xBAB8,0xBAB9,0xBABA,0x93FA, -0xBABB,0x93FB,0x93FC,0x93FD,0xBABC,0x93FE,0x9441,0x9442, -0x9443,0x9444,0x9445,0x9446,0xBABD,0xBABE,0x9447,0xBABF, -0x9448,0xBAC0,0x9449,0x944A,0x944B,0x944C,0x944D,0x944E, -0xBAC1,0x944F,0x9450,0x9451,0xBAC2,0x9452,0x9453,0x9454, -0x9455,0x9456,0x9457,0x9458,0x9459,0x945A,0x9461,0x9462, -0x9463,0x9464,0x9465,0x9466,0xBAC3,0x9467,0x9468,0x9469, -0x946A,0x946B,0x946C,0x946D,0xBAC4,0x946E,0x946F,0x9470, -0x9471,0x9472,0x9473,0x9474,0x9475,0x9476,0x9477,0x9478, -0x9479,0x947A,0x9481,0x9482,0x9483,0x9484,0x9485,0x9486, -0xBAC5,0x9487,0x9488,0x9489,0x948A,0x948B,0x948C,0x948D, -0xBAC6,0xBAC7,0x948E,0x948F,0xBAC8,0x9490,0x9491,0x9492, -0xBAC9,0x9493,0x9494,0x9495,0x9496,0x9497,0x9498,0x9499, -0xBACA,0xBACB,0x949A,0x949B,0x949C,0x949D,0x949E,0x949F, -0x94A0,0x94A1,0x94A2,0x94A3,0xBACC,0x94A4,0x94A5,0x94A6, -0xBACD,0x94A7,0x94A8,0x94A9,0x94AA,0x94AB,0x94AC,0x94AD, -0x94AE,0x94AF,0x94B0,0x94B1,0x94B2,0x94B3,0x94B4,0x94B5, -0x94B6,0x94B7,0x94B8,0x94B9,0x94BA,0x94BB,0x94BC,0x94BD, -0xBACE,0xBACF,0x94BE,0x94BF,0xBAD0,0x94C0,0x94C1,0xBAD1, -0xBAD2,0xBAD3,0xBAD4,0x94C2,0x94C3,0x94C4,0x94C5,0x94C6, -0xBAD5,0xBAD6,0x94C7,0xBAD7,0x94C8,0xBAD8,0x94C9,0x94CA, -0x94CB,0xBAD9,0xBADA,0x94CC,0xBADB,0x94CD,0x94CE,0x94CF, -0x94D0,0x94D1,0x94D2,0x94D3,0xBADC,0x94D4,0x94D5,0x94D6, -0x94D7,0x94D8,0x94D9,0x94DA,0x94DB,0x94DC,0x94DD,0x94DE, -0xBADD,0x94DF,0x94E0,0x94E1,0x94E2,0x94E3,0x94E4,0x94E5, -0xBADE,0x94E6,0x94E7,0x94E8,0x94E9,0x94EA,0x94EB,0x94EC, -0x94ED,0x94EE,0x94EF,0x94F0,0x94F1,0x94F2,0x94F3,0x94F4, -0x94F5,0x94F6,0x94F7,0x94F8,0x94F9,0x94FA,0x94FB,0x94FC, -0x94FD,0x94FE,0x9541,0x9542,0xBADF,0xBAE0,0x9543,0x9544, -0xBAE1,0x9545,0x9546,0x9547,0xBAE2,0x9548,0x9549,0x954A, -0x954B,0x954C,0x954D,0x954E,0x954F,0x9550,0x9551,0x9552, -0x9553,0xBAE3,0x9554,0x9555,0x9556,0x9557,0x9558,0x9559, -0xBAE4,0x955A,0x9561,0x9562,0xBAE5,0x9563,0x9564,0x9565, -0xBAE6,0x9566,0x9567,0x9568,0x9569,0x956A,0x956B,0x956C, -0xBAE7,0x956D,0x956E,0xBAE8,0x956F,0xBAE9,0x9570,0x9571, -0x9572,0x9573,0x9574,0x9575,0xBAEA,0xBAEB,0x9576,0x9577, -0xBAEC,0x9578,0x9579,0x957A,0xBAED,0x9581,0x9582,0x9583, -0x9584,0x9585,0x9586,0x9587,0xBAEE,0xBAEF,0x9588,0xBAF0, -0x9589,0x958A,0x958B,0x958C,0x958D,0x958E,0x958F,0x9590, -0x9591,0x9592,0x9593,0x9594,0x9595,0x9596,0x9597,0x9598, -0x9599,0x959A,0x959B,0x959C,0x959D,0x959E,0x959F,0x95A0, -0x95A1,0x95A2,0x95A3,0x95A4,0x95A5,0x95A6,0x95A7,0x95A8, -0x95A9,0x95AA,0x95AB,0x95AC,0xBAF1,0xBAF2,0x95AD,0x95AE, -0xBAF3,0x95AF,0x95B0,0x95B1,0xBAF4,0x95B2,0xBAF5,0x95B3, -0x95B4,0x95B5,0x95B6,0x95B7,0xBAF6,0xBAF7,0x95B8,0xBAF8, -0x95B9,0xBAF9,0xBAFA,0xBAFB,0x95BA,0x95BB,0x95BC,0x95BD, -0xBAFC,0xBAFD,0x95BE,0x95BF,0xBAFE,0x95C0,0x95C1,0x95C2, -0xBBA1,0x95C3,0xBBA2,0x95C4,0x95C5,0x95C6,0x95C7,0x95C8, -0xBBA3,0xBBA4,0x95C9,0xBBA5,0xBBA6,0xBBA7,0x95CA,0x95CB, -0x95CC,0x95CD,0x95CE,0xBBA8,0xBBA9,0xBBAA,0x95CF,0x95D0, -0xBBAB,0x95D1,0x95D2,0x95D3,0xBBAC,0x95D4,0x95D5,0x95D6, -0x95D7,0x95D8,0x95D9,0x95DA,0xBBAD,0xBBAE,0x95DB,0xBBAF, -0xBBB0,0xBBB1,0x95DC,0x95DD,0x95DE,0x95DF,0x95E0,0x95E1, -0xBBB2,0xBBB3,0x95E2,0x95E3,0x95E4,0x95E5,0x95E6,0x95E7, -0x95E8,0x95E9,0x95EA,0x95EB,0x95EC,0x95ED,0x95EE,0x95EF, -0xBBB4,0x95F0,0x95F1,0x95F2,0x95F3,0x95F4,0x95F5,0x95F6, -0x95F7,0x95F8,0x95F9,0x95FA,0x95FB,0x95FC,0x95FD,0x95FE, -0x9641,0x9642,0x9643,0x9644,0x9645,0x9646,0x9647,0x9648, -0x9649,0x964A,0x964B,0x964C,0x964D,0x964E,0x964F,0x9650, -0x9651,0x9652,0x9653,0x9654,0x9655,0x9656,0x9657,0x9658, -0xBBB5,0xBBB6,0x9659,0x965A,0xBBB7,0x9661,0x9662,0xBBB8, -0xBBB9,0x9663,0x9664,0x9665,0x9666,0x9667,0x9668,0x9669, -0xBBBA,0x966A,0x966B,0xBBBB,0xBBBC,0xBBBD,0x966C,0x966D, -0x966E,0x966F,0x9670,0x9671,0xBBBE,0x9672,0x9673,0x9674, -0x9675,0x9676,0x9677,0x9678,0x9679,0x967A,0x9681,0x9682, -0x9683,0x9684,0x9685,0x9686,0x9687,0x9688,0x9689,0x968A, -0x968B,0xBBBF,0x968C,0x968D,0x968E,0x968F,0x9690,0x9691, -0xBBC0,0xBBC1,0x9692,0x9693,0x9694,0x9695,0x9696,0x9697, -0x9698,0x9699,0x969A,0x969B,0x969C,0x969D,0x969E,0x969F, -0xBBC2,0xBBC3,0x96A0,0xBBC4,0xBBC5,0xBBC6,0x96A1,0x96A2, -0x96A3,0x96A4,0x96A5,0x96A6,0x96A7,0x96A8,0x96A9,0x96AA, -0x96AB,0x96AC,0x96AD,0x96AE,0x96AF,0x96B0,0x96B1,0x96B2, -0x96B3,0x96B4,0x96B5,0x96B6,0x96B7,0x96B8,0x96B9,0x96BA, -0x96BB,0x96BC,0x96BD,0x96BE,0x96BF,0x96C0,0x96C1,0x96C2, -0xBBC7,0xBBC8,0x96C3,0x96C4,0xBBC9,0x96C5,0x96C6,0x96C7, -0xBBCA,0x96C8,0x96C9,0x96CA,0x96CB,0x96CC,0x96CD,0x96CE, -0xBBCB,0xBBCC,0x96CF,0x96D0,0x96D1,0xBBCD,0x96D2,0x96D3, -0x96D4,0x96D5,0x96D6,0x96D7,0x96D8,0x96D9,0x96DA,0x96DB, -0x96DC,0x96DD,0x96DE,0x96DF,0x96E0,0x96E1,0x96E2,0x96E3, -0x96E4,0x96E5,0x96E6,0x96E7,0x96E8,0x96E9,0x96EA,0x96EB, -0x96EC,0x96ED,0x96EE,0x96EF,0x96F0,0x96F1,0x96F2,0x96F3, -0x96F4,0x96F5,0x96F6,0x96F7,0x96F8,0x96F9,0x96FA,0x96FB, -0x96FC,0x96FD,0x96FE,0x9741,0x9742,0x9743,0x9744,0x9745, -0x9746,0x9747,0x9748,0x9749,0x974A,0x974B,0x974C,0x974D, -0x974E,0x974F,0x9750,0x9751,0xBBCE,0x9752,0x9753,0x9754, -0x9755,0x9756,0x9757,0x9758,0x9759,0x975A,0x9761,0x9762, -0x9763,0x9764,0x9765,0x9766,0x9767,0x9768,0x9769,0x976A, -0x976B,0x976C,0x976D,0x976E,0x976F,0x9770,0x9771,0x9772, -0xBBCF,0x9773,0x9774,0x9775,0x9776,0x9777,0x9778,0x9779, -0x977A,0x9781,0x9782,0x9783,0x9784,0x9785,0x9786,0x9787, -0x9788,0x9789,0x978A,0x978B,0x978C,0xBBD0,0x978D,0x978E, -0x978F,0x9790,0x9791,0x9792,0xBBD1,0xBBD2,0x9793,0x9794, -0xBBD3,0x9795,0x9796,0x9797,0xBBD4,0x9798,0x9799,0x979A, -0x979B,0x979C,0x979D,0x979E,0xBBD5,0x979F,0x97A0,0xBBD6, -0x97A1,0xBBD7,0x97A2,0x97A3,0x97A4,0x97A5,0x97A6,0x97A7, -0x97A8,0x97A9,0x97AA,0x97AB,0x97AC,0x97AD,0x97AE,0x97AF, -0x97B0,0x97B1,0x97B2,0x97B3,0x97B4,0x97B5,0x97B6,0x97B7, -0x97B8,0x97B9,0x97BA,0x97BB,0x97BC,0x97BD,0x97BE,0x97BF, -0x97C0,0x97C1,0x97C2,0x97C3,0x97C4,0x97C5,0x97C6,0x97C7, -0x97C8,0x97C9,0x97CA,0x97CB,0x97CC,0x97CD,0x97CE,0x97CF, -0x97D0,0x97D1,0x97D2,0x97D3,0x97D4,0x97D5,0x97D6,0x97D7, -0x97D8,0x97D9,0x97DA,0x97DB,0x97DC,0x97DD,0x97DE,0x97DF, -0x97E0,0x97E1,0x97E2,0x97E3,0x97E4,0x97E5,0x97E6,0x97E7, -0x97E8,0x97E9,0x97EA,0x97EB,0x97EC,0x97ED,0x97EE,0x97EF, -0x97F0,0x97F1,0x97F2,0x97F3,0x97F4,0x97F5,0x97F6,0x97F7, -0x97F8,0x97F9,0x97FA,0x97FB,0xBBD8,0x97FC,0x97FD,0x97FE, -0x9841,0x9842,0x9843,0x9844,0x9845,0x9846,0x9847,0x9848, -0x9849,0x984A,0x984B,0x984C,0x984D,0x984E,0x984F,0x9850, -0x9851,0xBBD9,0x9852,0x9853,0x9854,0x9855,0x9856,0x9857, -0xBBDA,0x9858,0x9859,0x985A,0xBBDB,0x9861,0x9862,0x9863, -0xBBDC,0x9864,0x9865,0x9866,0x9867,0x9868,0x9869,0x986A, -0xBBDD,0xBBDE,0x986B,0x986C,0x986D,0x986E,0x986F,0x9870, -0x9871,0x9872,0x9873,0x9874,0x9875,0x9876,0x9877,0x9878, -0x9879,0x987A,0x9881,0x9882,0x9883,0x9884,0x9885,0x9886, -0x9887,0x9888,0x9889,0x988A,0x988B,0x988C,0x988D,0x988E, -0x988F,0x9890,0x9891,0x9892,0x9893,0x9894,0x9895,0x9896, -0xBBDF,0xBBE0,0x9897,0x9898,0xBBE1,0x9899,0x989A,0x989B, -0xBBE2,0x989C,0x989D,0x989E,0x989F,0x98A0,0x98A1,0x98A2, -0xBBE3,0xBBE4,0x98A3,0xBBE5,0x98A4,0xBBE6,0x98A5,0x98A6, -0x98A7,0x98A8,0x98A9,0x98AA,0xBBE7,0xBBE8,0x98AB,0xBBE9, -0xBBEA,0x98AC,0x98AD,0xBBEB,0xBBEC,0xBBED,0xBBEE,0x98AE, -0x98AF,0x98B0,0x98B1,0x98B2,0xBBEF,0xBBF0,0x98B3,0xBBF1, -0xBBF2,0xBBF3,0x98B4,0x98B5,0x98B6,0xBBF4,0x98B7,0x98B8, -0xBBF5,0xBBF6,0x98B9,0x98BA,0xBBF7,0x98BB,0x98BC,0x98BD, -0xBBF8,0x98BE,0x98BF,0x98C0,0x98C1,0x98C2,0x98C3,0x98C4, -0xBBF9,0xBBFA,0x98C5,0xBBFB,0xBBFC,0xBBFD,0x98C6,0x98C7, -0x98C8,0x98C9,0x98CA,0x98CB,0xBBFE,0xBCA1,0x98CC,0x98CD, -0xBCA2,0x98CE,0x98CF,0x98D0,0xBCA3,0x98D1,0x98D2,0x98D3, -0x98D4,0x98D5,0x98D6,0x98D7,0xBCA4,0xBCA5,0x98D8,0xBCA6, -0x98D9,0xBCA7,0x98DA,0x98DB,0x98DC,0x98DD,0x98DE,0x98DF, -0xBCA8,0x98E0,0x98E1,0x98E2,0xBCA9,0x98E3,0x98E4,0x98E5, -0xBCAA,0x98E6,0x98E7,0x98E8,0x98E9,0x98EA,0x98EB,0x98EC, -0xBCAB,0x98ED,0x98EE,0x98EF,0x98F0,0xBCAC,0x98F1,0x98F2, -0x98F3,0x98F4,0x98F5,0x98F6,0xBCAD,0xBCAE,0xBCAF,0xBCB0, -0xBCB1,0x98F7,0x98F8,0xBCB2,0xBCB3,0x98F9,0xBCB4,0xBCB5, -0x98FA,0x98FB,0x98FC,0x98FD,0xBCB6,0xBCB7,0x98FE,0xBCB8, -0xBCB9,0xBCBA,0x9941,0x9942,0x9943,0x9944,0xBCBB,0x9945, -0xBCBC,0xBCBD,0x9946,0x9947,0xBCBE,0x9948,0x9949,0x994A, -0xBCBF,0x994B,0x994C,0x994D,0x994E,0x994F,0x9950,0x9951, -0xBCC0,0xBCC1,0x9952,0xBCC2,0xBCC3,0xBCC4,0x9953,0x9954, -0x9955,0x9956,0x9957,0x9958,0xBCC5,0xBCC6,0x9959,0x995A, -0xBCC7,0x9961,0x9962,0x9963,0xBCC8,0x9964,0x9965,0x9966, -0x9967,0x9968,0x9969,0x996A,0xBCC9,0xBCCA,0x996B,0xBCCB, -0xBCCC,0xBCCD,0x996C,0x996D,0x996E,0x996F,0x9970,0x9971, -0xBCCE,0x9972,0x9973,0x9974,0xBCCF,0x9975,0x9976,0x9977, -0xBCD0,0x9978,0x9979,0x997A,0x9981,0x9982,0x9983,0x9984, -0x9985,0x9986,0x9987,0x9988,0x9989,0xBCD1,0x998A,0x998B, -0x998C,0x998D,0x998E,0x998F,0xBCD2,0xBCD3,0xBCD4,0x9990, -0xBCD5,0x9991,0x9992,0x9993,0xBCD6,0x9994,0xBCD7,0x9995, -0x9996,0x9997,0x9998,0x9999,0xBCD8,0xBCD9,0x999A,0xBCDA, -0x999B,0xBCDB,0x999C,0x999D,0x999E,0xBCDC,0x999F,0x99A0, -0xBCDD,0xBCDE,0x99A1,0x99A2,0xBCDF,0x99A3,0x99A4,0x99A5, -0xBCE0,0x99A6,0x99A7,0x99A8,0x99A9,0x99AA,0x99AB,0x99AC, -0x99AD,0x99AE,0x99AF,0x99B0,0x99B1,0xBCE1,0x99B2,0x99B3, -0x99B4,0x99B5,0x99B6,0x99B7,0xBCE2,0x99B8,0x99B9,0x99BA, -0xBCE3,0x99BB,0x99BC,0x99BD,0xBCE4,0x99BE,0x99BF,0x99C0, -0x99C1,0x99C2,0x99C3,0x99C4,0xBCE5,0x99C5,0x99C6,0xBCE6, -0xBCE7,0x99C7,0x99C8,0x99C9,0x99CA,0x99CB,0x99CC,0x99CD, -0xBCE8,0x99CE,0x99CF,0x99D0,0xBCE9,0x99D1,0x99D2,0x99D3, -0xBCEA,0x99D4,0x99D5,0x99D6,0x99D7,0x99D8,0x99D9,0x99DA, -0xBCEB,0xBCEC,0x99DB,0xBCED,0x99DC,0x99DD,0x99DE,0x99DF, -0x99E0,0x99E1,0x99E2,0x99E3,0xBCEE,0xBCEF,0x99E4,0x99E5, -0xBCF0,0x99E6,0x99E7,0x99E8,0xBCF1,0x99E9,0x99EA,0x99EB, -0x99EC,0x99ED,0x99EE,0x99EF,0xBCF2,0xBCF3,0x99F0,0xBCF4, -0x99F1,0xBCF5,0x99F2,0x99F3,0x99F4,0x99F5,0x99F6,0x99F7, -0xBCF6,0xBCF7,0x99F8,0x99F9,0xBCF8,0x99FA,0x99FB,0xBCF9, -0xBCFA,0x99FC,0x99FD,0x99FE,0x9A41,0x9A42,0x9A43,0x9A44, -0xBCFB,0xBCFC,0x9A45,0xBCFD,0x9A46,0xBCFE,0x9A47,0xBDA1, -0x9A48,0xBDA2,0xBDA3,0x9A49,0xBDA4,0x9A4A,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CD,0x9FDA,0x9FDB, -0xC0CE,0x9FDC,0x9FDD,0x9FDE,0xC0CF,0xC0D0,0xC0D1,0x9FDF, -0x9FE0,0x9FE1,0x9FE2,0xC0D2,0xC0D3,0xC0D4,0x9FE3,0xC0D5, -0xC0D6,0xC0D7,0xC0D8,0x9FE4,0x9FE5,0x9FE6,0xC0D9,0x9FE7, -0xC0DA,0xC0DB,0x9FE8,0x9FE9,0xC0DC,0x9FEA,0xC0DD,0xC0DE, -0xC0DF,0x9FEB,0xC0E0,0x9FEC,0x9FED,0x9FEE,0x9FEF,0x9FF0, -0xC0E1,0xC0E2,0x9FF1,0xC0E3,0xC0E4,0xC0E5,0xC0E6,0x9FF2, -0x9FF3,0x9FF4,0x9FF5,0x9FF6,0xC0E7,0xC0E8,0x9FF7,0x9FF8, -0xC0E9,0x9FF9,0x9FFA,0x9FFB,0xC0EA,0x9FFC,0x9FFD,0x9FFE, -0xA041,0xA042,0xA043,0xA044,0xC0EB,0xC0EC,0xA045,0xC0ED, -0xC0EE,0xC0EF,0xA046,0xA047,0xA048,0xA049,0xA04A,0xA04B, -0xC0F0,0xC0F1,0xA04C,0xA04D,0xC0F2,0xA04E,0xC0F3,0xA04F, -0xC0F4,0xA050,0xA051,0xA052,0xA053,0xA054,0xA055,0xA056, -0xC0F5,0xA057,0xA058,0xA059,0xA05A,0xC0F6,0xA061,0xA062, -0xA063,0xA064,0xA065,0xA066,0xC0F7,0xA067,0xA068,0xA069, -0xC0F8,0xA06A,0xA06B,0xA06C,0xC0F9,0xA06D,0xA06E,0xA06F, -0xA070,0xA071,0xA072,0xA073,0xA074,0xA075,0xA076,0xA077, -0xA078,0xA079,0xA07A,0xA081,0xA082,0xA083,0xA084,0xA085, -0xC0FA,0xC0FB,0xA086,0xA087,0xC0FC,0xA088,0xA089,0xA08A, -0xC0FD,0xA08B,0xC0FE,0xA08C,0xA08D,0xA08E,0xA08F,0xA090, -0xC1A1,0xC1A2,0xA091,0xC1A3,0xA092,0xC1A4,0x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,0xA145,0xA146,0xA147,0xA148,0xA149,0xA14A, -0xA14B,0xA14C,0xA14D,0xA14E,0xA14F,0xA150,0xA151,0xA152, -0xA153,0xA154,0xA155,0xA156,0xC1C9,0xC1CA,0xA157,0xA158, -0xA159,0xA15A,0xA161,0xA162,0xC1CB,0xA163,0xA164,0xA165, -0xC1CC,0xA166,0xA167,0xA168,0xC1CD,0xA169,0xA16A,0xA16B, -0xA16C,0xA16D,0xA16E,0xA16F,0xC1CE,0xC1CF,0xA170,0xC1D0, -0xA171,0xC1D1,0xA172,0xA173,0xA174,0xA175,0xA176,0xA177, -0xC1D2,0xC1D3,0xA178,0xA179,0xC1D4,0xA17A,0xA181,0xA182, -0xA183,0xA184,0xA185,0xA186,0xA187,0xA188,0xA189,0xA18A, -0xA18B,0xA18C,0xA18D,0xA18E,0xA18F,0xC1D5,0xA190,0xA191, -0xA192,0xA193,0xA194,0xA195,0xC1D6,0xC1D7,0xA196,0xA197, -0xC1D8,0xA198,0xA199,0xA19A,0xC1D9,0xC1DA,0xC1DB,0xA19B, -0xA19C,0xA19D,0xA19E,0xA19F,0xC1DC,0xC1DD,0xA1A0,0xC1DE, -0xA241,0xC1DF,0xA242,0xA243,0xA244,0xA245,0xA246,0xA247, -0xC1E0,0xA248,0xA249,0xA24A,0xA24B,0xA24C,0xA24D,0xA24E, -0xA24F,0xA250,0xA251,0xA252,0xA253,0xA254,0xA255,0xA256, -0xA257,0xA258,0xA259,0xA25A,0xC1E1,0xA261,0xA262,0xA263, -0xA264,0xA265,0xA266,0xA267,0xC1E2,0xA268,0xA269,0xA26A, -0xA26B,0xA26C,0xA26D,0xA26E,0xA26F,0xA270,0xA271,0xA272, -0xA273,0xA274,0xA275,0xA276,0xA277,0xA278,0xA279,0xA27A, -0xA281,0xA282,0xA283,0xA284,0xA285,0xA286,0xA287,0xA288, -0xC1E3,0xC1E4,0xA289,0xA28A,0xC1E5,0xA28B,0xA28C,0xA28D, -0xC1E6,0xA28E,0xA28F,0xA290,0xA291,0xA292,0xA293,0xA294, -0xC1E7,0xC1E8,0xA295,0xC1E9,0xA296,0xA297,0xA298,0xA299, -0xA29A,0xA29B,0xA29C,0xA29D,0xC1EA,0xA29E,0xA29F,0xA2A0, -0xC1EB,0xA341,0xA342,0xA343,0xC1EC,0xA344,0xA345,0xA346, -0xA347,0xA348,0xA349,0xA34A,0xC1ED,0xA34B,0xA34C,0xA34D, -0xA34E,0xA34F,0xA350,0xA351,0xA352,0xA353,0xA354,0xA355, -0xC1EE,0xC1EF,0xA356,0xA357,0xC1F0,0xA358,0xA359,0xA35A, -0xC1F1,0xA361,0xA362,0xA363,0xA364,0xA365,0xA366,0xA367, -0xC1F2,0xC1F3,0xA368,0xC1F4,0xA369,0xC1F5,0xA36A,0xA36B, -0xA36C,0xA36D,0xA36E,0xA36F,0xA370,0xA371,0xA372,0xA373, -0xA374,0xA375,0xA376,0xA377,0xA378,0xA379,0xA37A,0xA381, -0xA382,0xA383,0xA384,0xA385,0xA386,0xA387,0xA388,0xA389, -0xA38A,0xA38B,0xA38C,0xA38D,0xA38E,0xA38F,0xA390,0xA391, -0xC1F6,0xC1F7,0xA392,0xA393,0xC1F8,0xA394,0xA395,0xC1F9, -0xC1FA,0xA396,0xC1FB,0xA397,0xA398,0xA399,0xA39A,0xA39B, -0xC1FC,0xC1FD,0xA39C,0xC1FE,0xA39D,0xC2A1,0xC2A2,0xA39E, -0xA39F,0xC2A3,0xC2A4,0xA3A0,0xC2A5,0xC2A6,0xA441,0xA442, -0xC2A7,0xA443,0xC2A8,0xA444,0xC2A9,0xA445,0xA446,0xC2AA, -0xA447,0xA448,0xA449,0xA44A,0xC2AB,0xC2AC,0xA44B,0xC2AD, -0xC2AE,0xC2AF,0xA44C,0xA44D,0xA44E,0xA44F,0xA450,0xA451, -0xC2B0,0xC2B1,0xA452,0xA453,0xC2B2,0xA454,0xA455,0xA456, -0xC2B3,0xA457,0xA458,0xA459,0xA45A,0xA461,0xA462,0xA463, -0xC2B4,0xC2B5,0xA464,0xC2B6,0xC2B7,0xC2B8,0xA465,0xA466, -0xA467,0xA468,0xA469,0xA46A,0xC2B9,0xA46B,0xA46C,0xA46D, -0xC2BA,0xA46E,0xA46F,0xA470,0xA471,0xA472,0xA473,0xA474, -0xA475,0xA476,0xA477,0xA478,0xA479,0xA47A,0xA481,0xA482, -0xA483,0xC2BB,0xA484,0xA485,0xA486,0xA487,0xA488,0xA489, -0xA48A,0xA48B,0xA48C,0xA48D,0xA48E,0xA48F,0xA490,0xA491, -0xA492,0xA493,0xA494,0xA495,0xA496,0xA497,0xA498,0xA499, -0xA49A,0xA49B,0xA49C,0xA49D,0xA49E,0xA49F,0xA4A0,0xA541, -0xA542,0xA543,0xA544,0xA545,0xC2BC,0xC2BD,0xA546,0xA547, -0xC2BE,0xA548,0xA549,0xA54A,0xC2BF,0xA54B,0xA54C,0xA54D, -0xA54E,0xA54F,0xA550,0xA551,0xC2C0,0xC2C1,0xA552,0xC2C2, -0xC2C3,0xC2C4,0xA553,0xA554,0xA555,0xA556,0xA557,0xA558, -0xC2C5,0xA559,0xA55A,0xA561,0xA562,0xA563,0xA564,0xA565, -0xA566,0xA567,0xA568,0xA569,0xA56A,0xA56B,0xA56C,0xA56D, -0xA56E,0xA56F,0xA570,0xA571,0xA572,0xC2C6,0xA573,0xA574, -0xA575,0xA576,0xA577,0xA578,0xC2C7,0xA579,0xA57A,0xA581, -0xA582,0xA583,0xA584,0xA585,0xA586,0xA587,0xA588,0xA589, -0xA58A,0xA58B,0xA58C,0xA58D,0xA58E,0xA58F,0xA590,0xA591, -0xC2C8,0xA592,0xA593,0xA594,0xA595,0xA596,0xA597,0xA598, -0xA599,0xA59A,0xA59B,0xA59C,0xA59D,0xA59E,0xA59F,0xA5A0, -0xA641,0xA642,0xA643,0xA644,0xA645,0xA646,0xA647,0xA648, -0xA649,0xA64A,0xA64B,0xA64C,0xA64D,0xA64E,0xA64F,0xA650, -0xA651,0xA652,0xA653,0xA654,0xC2C9,0xC2CA,0xA655,0xA656, -0xC2CB,0xA657,0xA658,0xA659,0xC2CC,0xA65A,0xA661,0xA662, -0xA663,0xA664,0xA665,0xA666,0xC2CD,0xC2CE,0xA667,0xC2CF, -0xA668,0xC2D0,0xA669,0xC2D1,0xA66A,0xA66B,0xA66C,0xA66D, -0xC2D2,0xC2D3,0xA66E,0xA66F,0xA670,0xA671,0xA672,0xA673, -0xC2D4,0xA674,0xA675,0xA676,0xA677,0xA678,0xA679,0xA67A, -0xA681,0xA682,0xA683,0xA684,0xC2D5,0xA685,0xA686,0xA687, -0xA688,0xA689,0xA68A,0xA68B,0xC2D6,0xA68C,0xA68D,0xA68E, -0xA68F,0xA690,0xA691,0xA692,0xA693,0xA694,0xA695,0xA696, -0xA697,0xA698,0xA699,0xA69A,0xA69B,0xA69C,0xA69D,0xA69E, -0xC2D7,0xA69F,0xA6A0,0xA741,0xA742,0xA743,0xA744,0xA745, -0xC2D8,0xA746,0xA747,0xA748,0xC2D9,0xA749,0xA74A,0xA74B, -0xC2DA,0xA74C,0xA74D,0xA74E,0xA74F,0xA750,0xA751,0xA752, -0xC2DB,0xC2DC,0xA753,0xA754,0xA755,0xA756,0xA757,0xA758, -0xA759,0xA75A,0xA761,0xA762,0xA763,0xA764,0xA765,0xA766, -0xA767,0xA768,0xA769,0xA76A,0xA76B,0xA76C,0xA76D,0xA76E, -0xA76F,0xA770,0xA771,0xA772,0xA773,0xA774,0xA775,0xA776, -0xA777,0xC2DD,0xA778,0xA779,0xA77A,0xA781,0xA782,0xA783, -0xC2DE,0xC2DF,0xA784,0xA785,0xC2E0,0xA786,0xA787,0xA788, -0xC2E1,0xA789,0xA78A,0xA78B,0xA78C,0xA78D,0xA78E,0xA78F, -0xC2E2,0xC2E3,0xA790,0xA791,0xA792,0xC2E4,0xA793,0xA794, -0xA795,0xA796,0xA797,0xA798,0xC2E5,0xA799,0xA79A,0xA79B, -0xA79C,0xA79D,0xA79E,0xA79F,0xA7A0,0xA841,0xA842,0xA843, -0xA844,0xA845,0xA846,0xA847,0xA848,0xA849,0xA84A,0xA84B, -0xC2E6,0xC2E7,0xA84C,0xA84D,0xA84E,0xA84F,0xA850,0xA851, -0xA852,0xA853,0xA854,0xA855,0xA856,0xA857,0xA858,0xA859, -0xA85A,0xA861,0xA862,0xA863,0xA864,0xA865,0xA866,0xA867, -0xA868,0xA869,0xA86A,0xA86B,0xA86C,0xA86D,0xA86E,0xA86F, -0xA870,0xA871,0xA872,0xA873,0xC2E8,0xA874,0xA875,0xA876, -0xA877,0xA878,0xA879,0xA87A,0xA881,0xA882,0xA883,0xA884, -0xA885,0xA886,0xA887,0xA888,0xA889,0xA88A,0xA88B,0xA88C, -0xA88D,0xA88E,0xA88F,0xA890,0xA891,0xA892,0xA893,0xA894, -0xC2E9,0xA895,0xA896,0xA897,0xA898,0xA899,0xA89A,0xA89B, -0xA89C,0xA89D,0xA89E,0xA89F,0xA8A0,0xA941,0xA942,0xA943, -0xA944,0xA945,0xA946,0xA947,0xA948,0xA949,0xA94A,0xA94B, -0xA94C,0xA94D,0xA94E,0xA94F,0xC2EA,0xA950,0xA951,0xA952, -0xA953,0xA954,0xA955,0xA956,0xA957,0xA958,0xA959,0xA95A, -0xA961,0xA962,0xA963,0xA964,0xC2EB,0xA965,0xA966,0xC2EC, -0xA967,0xC2ED,0xA968,0xA969,0xA96A,0xA96B,0xA96C,0xA96D, -0xA96E,0xA96F,0xA970,0xA971,0xA972,0xA973,0xA974,0xA975, -0xA976,0xA977,0xA978,0xA979,0xA97A,0xA981,0xA982,0xA983, -0xA984,0xA985,0xA986,0xA987,0xA988,0xA989,0xA98A,0xA98B, -0xA98C,0xA98D,0xA98E,0xA98F,0xC2EE,0xC2EF,0xA990,0xA991, -0xC2F0,0xA992,0xA993,0xA994,0xC2F1,0xA995,0xA996,0xA997, -0xA998,0xA999,0xA99A,0xA99B,0xC2F2,0xC2F3,0xA99C,0xA99D, -0xA99E,0xC2F4,0xC2F5,0xA99F,0xA9A0,0xAA41,0xAA42,0xC2F6, -0xC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,0xC3C0,0xC3C1,0xAB6A,0xC3C2, -0xAB6B,0xC3C3,0xAB6C,0xAB6D,0xAB6E,0xAB6F,0xAB70,0xAB71, -0xC3C4,0xAB72,0xAB73,0xAB74,0xC3C5,0xAB75,0xAB76,0xAB77, -0xAB78,0xAB79,0xAB7A,0xAB81,0xAB82,0xAB83,0xAB84,0xAB85, -0xAB86,0xAB87,0xAB88,0xAB89,0xC3C6,0xAB8A,0xAB8B,0xAB8C, -0xAB8D,0xAB8E,0xAB8F,0xAB90,0xC3C7,0xAB91,0xAB92,0xAB93, -0xC3C8,0xAB94,0xAB95,0xAB96,0xAB97,0xAB98,0xAB99,0xAB9A, -0xAB9B,0xAB9C,0xAB9D,0xAB9E,0xAB9F,0xABA0,0xAC41,0xAC42, -0xAC43,0xC3C9,0xAC44,0xAC45,0xAC46,0xAC47,0xAC48,0xAC49, -0xC3CA,0xC3CB,0xAC4A,0xAC4B,0xC3CC,0xAC4C,0xAC4D,0xAC4E, -0xC3CD,0xAC4F,0xAC50,0xAC51,0xAC52,0xAC53,0xAC54,0xAC55, -0xC3CE,0xC3CF,0xAC56,0xC3D0,0xAC57,0xC3D1,0xAC58,0xAC59, -0xAC5A,0xAC61,0xAC62,0xAC63,0xC3D2,0xAC64,0xAC65,0xAC66, -0xC3D3,0xAC67,0xAC68,0xAC69,0xC3D4,0xAC6A,0xAC6B,0xAC6C, -0xAC6D,0xAC6E,0xAC6F,0xAC70,0xAC71,0xAC72,0xAC73,0xAC74, -0xAC75,0xC3D5,0xAC76,0xAC77,0xAC78,0xAC79,0xAC7A,0xAC81, -0xAC82,0xAC83,0xAC84,0xAC85,0xAC86,0xAC87,0xAC88,0xAC89, -0xAC8A,0xAC8B,0xAC8C,0xAC8D,0xAC8E,0xAC8F,0xAC90,0xAC91, -0xAC92,0xAC93,0xAC94,0xAC95,0xAC96,0xAC97,0xAC98,0xAC99, -0xAC9A,0xAC9B,0xAC9C,0xAC9D,0xC3D6,0xAC9E,0xAC9F,0xACA0, -0xC3D7,0xAD41,0xAD42,0xAD43,0xC3D8,0xAD44,0xAD45,0xAD46, -0xAD47,0xAD48,0xAD49,0xAD4A,0xC3D9,0xC3DA,0xAD4B,0xC3DB, -0xAD4C,0xC3DC,0xAD4D,0xAD4E,0xAD4F,0xAD50,0xAD51,0xAD52, -0xC3DD,0xAD53,0xAD54,0xAD55,0xAD56,0xAD57,0xAD58,0xAD59, -0xAD5A,0xAD61,0xAD62,0xAD63,0xAD64,0xAD65,0xAD66,0xAD67, -0xC3DE,0xAD68,0xAD69,0xAD6A,0xAD6B,0xAD6C,0xAD6D,0xAD6E, -0xAD6F,0xAD70,0xAD71,0xAD72,0xC3DF,0xC3E0,0xAD73,0xAD74, -0xC3E1,0xAD75,0xAD76,0xAD77,0xC3E2,0xAD78,0xAD79,0xAD7A, -0xAD81,0xAD82,0xAD83,0xAD84,0xC3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-0xAF51,0xAF52,0xAF53,0xAF54,0xAF55,0xAF56,0xAF57,0xAF58, -0xAF59,0xAF5A,0xAF61,0xAF62,0xAF63,0xAF64,0xAF65,0xAF66, -0xAF67,0xAF68,0xAF69,0xAF6A,0xAF6B,0xAF6C,0xAF6D,0xAF6E, -0xC4A1,0xC4A2,0xAF6F,0xAF70,0xC4A3,0xAF71,0xAF72,0xC4A4, -0xC4A5,0xC4A6,0xAF73,0xAF74,0xAF75,0xAF76,0xAF77,0xAF78, -0xC4A7,0xC4A8,0xAF79,0xC4A9,0xAF7A,0xC4AA,0xAF81,0xAF82, -0xAF83,0xAF84,0xAF85,0xAF86,0xC4AB,0xC4AC,0xAF87,0xAF88, -0xC4AD,0xAF89,0xAF8A,0xAF8B,0xC4AE,0xAF8C,0xAF8D,0xAF8E, -0xAF8F,0xAF90,0xAF91,0xAF92,0xC4AF,0xC4B0,0xAF93,0xC4B1, -0xAF94,0xC4B2,0xAF95,0xAF96,0xAF97,0xAF98,0xAF99,0xAF9A, -0xC4B3,0xC4B4,0xAF9B,0xAF9C,0xC4B5,0xAF9D,0xAF9E,0xAF9F, -0xC4B6,0xAFA0,0xB041,0xB042,0xB043,0xB044,0xB045,0xB046, -0xC4B7,0xC4B8,0xB047,0xC4B9,0xC4BA,0xC4BB,0xB048,0xB049, -0xB04A,0xB04B,0xB04C,0xB04D,0xC4BC,0xC4BD,0xB04E,0xB04F, -0xB050,0xB051,0xB052,0xB053,0xB054,0xB055,0xB056,0xB057, -0xB058,0xB059,0xB05A,0xB061,0xB062,0xB063,0xB064,0xB065, -0xB066,0xC4BE,0xB067,0xB068,0xB069,0xB06A,0xB06B,0xB06C, -0xB06D,0xB06E,0xB06F,0xB070,0xB071,0xB072,0xB073,0xB074, -0xB075,0xB076,0xB077,0xB078,0xB079,0xB07A,0xB081,0xB082, -0xB083,0xB084,0xB085,0xB086,0xB087,0xB088,0xB089,0xB08A, -0xB08B,0xB08C,0xB08D,0xB08E,0xC4BF,0xC4C0,0xB08F,0xB090, -0xC4C1,0xB091,0xB092,0xC4C2,0xC4C3,0xB093,0xB094,0xB095, -0xB096,0xB097,0xB098,0xB099,0xC4C4,0xC4C5,0xB09A,0xC4C6, -0xC4C7,0xC4C8,0xB09B,0xB09C,0xB09D,0xB09E,0xB09F,0xB0A0, -0xC4C9,0xC4CA,0xB141,0xB142,0xC4CB,0xB143,0xB144,0xB145, -0xC4CC,0xB146,0xB147,0xB148,0xB149,0xB14A,0xB14B,0xB14C, -0xC4CD,0xC4CE,0xB14D,0xC4CF,0xB14E,0xC4D0,0xB14F,0xB150, -0xB151,0xB152,0xB153,0xB154,0xC4D1,0xB155,0xB156,0xB157, -0xC4D2,0xB158,0xB159,0xB15A,0xC4D3,0xB161,0xB162,0xB163, -0xB164,0xB165,0xB166,0xB167,0xC4D4,0xC4D5,0xB168,0xC4D6, -0xC4D7,0xC4D8,0xB169,0xB16A,0xB16B,0xB16C,0xB16D,0xB16E, -0xC4D9,0xB16F,0xB170,0xB171,0xB172,0xB173,0xB174,0xB175, -0xB176,0xB177,0xB178,0xB179,0xB17A,0xB181,0xB182,0xB183, -0xB184,0xB185,0xB186,0xB187,0xB188,0xB189,0xB18A,0xB18B, -0xB18C,0xB18D,0xB18E,0xB18F,0xC4DA,0xC4DB,0xB190,0xB191, -0xC4DC,0xB192,0xB193,0xB194,0xC4DD,0xB195,0xB196,0xB197, -0xB198,0xB199,0xB19A,0xB19B,0xC4DE,0xC4DF,0xB19C,0xC4E0, -0xB19D,0xC4E1,0xB19E,0xB19F,0xB1A0,0xB241,0xB242,0xB243, -0xC4E2,0xC4E3,0xB244,0xB245,0xC4E4,0xB246,0xB247,0xB248, -0xC4E5,0xB249,0xB24A,0xB24B,0xB24C,0xB24D,0xB24E,0xB24F, -0xC4E6,0xB250,0xB251,0xB252,0xB253,0xC4E7,0xB254,0xB255, -0xB256,0xB257,0xB258,0xB259,0xC4E8,0xB25A,0xB261,0xB262, -0xB263,0xB264,0xB265,0xB266,0xB267,0xB268,0xB269,0xB26A, -0xB26B,0xB26C,0xB26D,0xB26E,0xB26F,0xB270,0xB271,0xB272, -0xB273,0xC4E9,0xB274,0xB275,0xB276,0xB277,0xB278,0xB279, -0xC4EA,0xB27A,0xB281,0xB282,0xB283,0xB284,0xB285,0xB286, -0xC4EB,0xB287,0xB288,0xB289,0xB28A,0xB28B,0xB28C,0xB28D, -0xB28E,0xB28F,0xB290,0xB291,0xB292,0xB293,0xB294,0xB295, -0xB296,0xB297,0xB298,0xB299,0xC4EC,0xB29A,0xB29B,0xB29C, -0xB29D,0xB29E,0xB29F,0xB2A0,0xB341,0xB342,0xB343,0xB344, -0xB345,0xB346,0xB347,0xB348,0xB349,0xB34A,0xB34B,0xB34C, -0xB34D,0xB34E,0xB34F,0xB350,0xB351,0xB352,0xB353,0xB354, -0xC4ED,0xC4EE,0xB355,0xB356,0xC4EF,0xB357,0xB358,0xB359, -0xC4F0,0xB35A,0xB361,0xB362,0xB363,0xB364,0xB365,0xB366, -0xC4F1,0xC4F2,0xB367,0xC4F3,0xB368,0xC4F4,0xB369,0xB36A, -0xB36B,0xB36C,0xB36D,0xB36E,0xC4F5,0xB36F,0xB370,0xB371, -0xC4F6,0xB372,0xB373,0xB374,0xC4F7,0xB375,0xB376,0xB377, -0xB378,0xB379,0xB37A,0xB381,0xB382,0xB383,0xB384,0xB385, -0xB386,0xC4F8,0xB387,0xB388,0xB389,0xB38A,0xB38B,0xB38C, -0xC4F9,0xB38D,0xB38E,0xB38F,0xB390,0xB391,0xB392,0xB393, -0xB394,0xB395,0xB396,0xB397,0xB398,0xB399,0xB39A,0xB39B, -0xB39C,0xB39D,0xB39E,0xB39F,0xB3A0,0xC4FA,0xB441,0xB442, -0xB443,0xB444,0xB445,0xB446,0xC4FB,0xC4FC,0xB447,0xB448, -0xC4FD,0xB449,0xB44A,0xB44B,0xC4FE,0xB44C,0xB44D,0xB44E, -0xB44F,0xB450,0xB451,0xB452,0xC5A1,0xC5A2,0xB453,0xC5A3, -0xB454,0xC5A4,0xB455,0xB456,0xB457,0xB458,0xB459,0xB45A, -0xC5A5,0xB461,0xB462,0xB463,0xC5A6,0xB464,0xB465,0xB466, -0xC5A7,0xB467,0xB468,0xB469,0xB46A,0xB46B,0xB46C,0xB46D, -0xC5A8,0xB46E,0xB46F,0xB470,0xB471,0xB472,0xB473,0xB474, -0xB475,0xB476,0xB477,0xB478,0xC5A9,0xC5AA,0xB479,0xB47A, -0xC5AB,0xB481,0xB482,0xB483,0xC5AC,0xB484,0xB485,0xB486, -0xB487,0xB488,0xB489,0xB48A,0xC5AD,0xC5AE,0xB48B,0xB48C, -0xB48D,0xC5AF,0xB48E,0xB48F,0xB490,0xB491,0xB492,0xB493, -0xB494,0xB495,0xB496,0xB497,0xB498,0xB499,0xB49A,0xB49B, -0xB49C,0xB49D,0xB49E,0xB49F,0xB4A0,0xB541,0xB542,0xB543, -0xB544,0xB545,0xB546,0xB547,0xB548,0xB549,0xB54A,0xB54B, -0xB54C,0xB54D,0xB54E,0xB54F,0xC5B0,0xC5B1,0xB550,0xB551, -0xC5B2,0xB552,0xB553,0xB554,0xC5B3,0xB555,0xB556,0xB557, -0xB558,0xB559,0xB55A,0xB561,0xC5B4,0xC5B5,0xB562,0xC5B6, -0xB563,0xC5B7,0xB564,0xB565,0xB566,0xB567,0xB568,0xB569, -0xC5B8,0xC5B9,0xB56A,0xB56B,0xC5BA,0xB56C,0xB56D,0xB56E, -0xC5BB,0xC5BC,0xB56F,0xB570,0xB571,0xB572,0xB573,0xB574, -0xC5BD,0xC5BE,0xB575,0xC5BF,0xC5C0,0xC5C1,0xB576,0xB577, -0xB578,0xB579,0xB57A,0xB581,0xC5C2,0xC5C3,0xB582,0xB583, -0xC5C4,0xB584,0xB585,0xB586,0xC5C5,0xB587,0xB588,0xB589, -0xB58A,0xB58B,0xB58C,0xB58D,0xC5C6,0xC5C7,0xB58E,0xC5C8, -0xC5C9,0xC5CA,0xB58F,0xB590,0xB591,0xB592,0xB593,0xB594, -0xC5CB,0xB595,0xB596,0xB597,0xB598,0xB599,0xB59A,0xB59B, -0xB59C,0xB59D,0xB59E,0xB59F,0xB5A0,0xB641,0xB642,0xB643, -0xB644,0xB645,0xB646,0xB647,0xB648,0xC5CC,0xB649,0xB64A, -0xB64B,0xB64C,0xB64D,0xB64E,0xB64F,0xB650,0xB651,0xB652, -0xB653,0xB654,0xB655,0xB656,0xB657,0xB658,0xB659,0xB65A, -0xB661,0xB662,0xB663,0xB664,0xB665,0xB666,0xB667,0xB668, -0xB669,0xB66A,0xB66B,0xB66C,0xB66D,0xB66E,0xB66F,0xB670, -0xC5CD,0xC5CE,0xB671,0xB672,0xC5CF,0xB673,0xB674,0xB675, -0xC5D0,0xB676,0xC5D1,0xB677,0xB678,0xB679,0xB67A,0xB681, -0xC5D2,0xC5D3,0xB682,0xC5D4,0xC5D5,0xC5D6,0xB683,0xB684, -0xB685,0xB686,0xB687,0xB688,0xC5D7,0xC5D8,0xB689,0xB68A, -0xC5D9,0xB68B,0xB68C,0xB68D,0xC5DA,0xB68E,0xB68F,0xB690, -0xB691,0xB692,0xB693,0xB694,0xC5DB,0xC5DC,0xB695,0xC5DD, -0xB696,0xC5DE,0xB697,0xB698,0xB699,0xB69A,0xB69B,0xB69C, -0xC5DF,0xB69D,0xB69E,0xB69F,0xC5E0,0xB6A0,0xB741,0xB742, -0xB743,0xB744,0xB745,0xB746,0xB747,0xB748,0xB749,0xB74A, -0xB74B,0xB74C,0xB74D,0xB74E,0xC5E1,0xB74F,0xB750,0xB751, -0xB752,0xB753,0xB754,0xB755,0xC5E2,0xB756,0xB757,0xB758, -0xC5E3,0xB759,0xB75A,0xB761,0xB762,0xB763,0xB764,0xB765, -0xB766,0xB767,0xB768,0xB769,0xB76A,0xB76B,0xB76C,0xB76D, -0xB76E,0xB76F,0xB770,0xB771,0xB772,0xB773,0xB774,0xB775, -0xC5E4,0xC5E5,0xB776,0xB777,0xC5E6,0xB778,0xB779,0xB77A, -0xC5E7,0xB781,0xB782,0xB783,0xB784,0xB785,0xB786,0xB787, -0xC5E8,0xC5E9,0xB788,0xC5EA,0xB789,0xC5EB,0xB78A,0xB78B, -0xB78C,0xB78D,0xC5EC,0xB78E,0xC5ED,0xB78F,0xB790,0xB791, -0xC5EE,0xB792,0xB793,0xB794,0xB795,0xB796,0xB797,0xB798, -0xB799,0xB79A,0xB79B,0xB79C,0xB79D,0xB79E,0xB79F,0xB7A0, -0xB841,0xB842,0xB843,0xB844,0xB845,0xB846,0xB847,0xB848, -0xC5EF,0xB849,0xB84A,0xB84B,0xB84C,0xB84D,0xB84E,0xB84F, -0xB850,0xB851,0xB852,0xB853,0xB854,0xB855,0xB856,0xB857, -0xB858,0xB859,0xB85A,0xB861,0xB862,0xB863,0xB864,0xB865, -0xB866,0xB867,0xB868,0xB869,0xC5F0,0xB86A,0xB86B,0xB86C, -0xC5F1,0xB86D,0xB86E,0xB86F,0xB870,0xB871,0xB872,0xB873, -0xB874,0xB875,0xB876,0xB877,0xB878,0xB879,0xB87A,0xC5F2, -0xB881,0xC5F3,0xB882,0xB883,0xB884,0xB885,0xB886,0xB887, -0xC5F4,0xB888,0xB889,0xB88A,0xB88B,0xB88C,0xB88D,0xB88E, -0xB88F,0xB890,0xB891,0xB892,0xB893,0xB894,0xB895,0xB896, -0xB897,0xB898,0xB899,0xB89A,0xB89B,0xB89C,0xB89D,0xB89E, -0xB89F,0xB8A0,0xB941,0xB942,0xC5F5,0xC5F6,0xB943,0xB944, -0xC5F7,0xB945,0xB946,0xB947,0xC5F8,0xB948,0xB949,0xB94A, -0xB94B,0xB94C,0xB94D,0xB94E,0xC5F9,0xC5FA,0xB94F,0xC5FB, -0xB950,0xC5FC,0xB951,0xB952,0xB953,0xB954,0xB955,0xB956, -0xC5FD,0xB957,0xB958,0xB959,0xB95A,0xB961,0xB962,0xB963, -0xB964,0xB965,0xB966,0xB967,0xB968,0xB969,0xB96A,0xB96B, -0xB96C,0xB96D,0xB96E,0xB96F,0xC5FE,0xB970,0xB971,0xB972, -0xB973,0xB974,0xB975,0xB976,0xC6A1,0xB977,0xB978,0xB979, -0xB97A,0xB981,0xB982,0xB983,0xB984,0xB985,0xB986,0xB987, -0xB988,0xB989,0xB98A,0xB98B,0xB98C,0xB98D,0xB98E,0xB98F, -0xB990,0xB991,0xB992,0xB993,0xB994,0xB995,0xB996,0xB997, -0xC6A2,0xC6A3,0xB998,0xB999,0xC6A4,0xB99A,0xB99B,0xB99C, -0xC6A5,0xB99D,0xB99E,0xB99F,0xB9A0,0xBA41,0xBA42,0xBA43, -0xC6A6,0xC6A7,0xBA44,0xBA45,0xBA46,0xC6A8,0xBA47,0xBA48, -0xBA49,0xBA4A,0xBA4B,0xBA4C,0xC6A9,0xBA4D,0xBA4E,0xBA4F, -0xC6AA,0xBA50,0xBA51,0xBA52,0xC6AB,0xBA53,0xBA54,0xBA55, -0xBA56,0xBA57,0xBA58,0xBA59,0xC6AC,0xBA5A,0xBA61,0xBA62, -0xBA63,0xC6AD,0xBA64,0xBA65,0xBA66,0xBA67,0xBA68,0xBA69, -0xC6AE,0xC6AF,0xBA6A,0xBA6B,0xC6B0,0xBA6C,0xBA6D,0xC6B1, -0xC6B2,0xBA6E,0xC6B3,0xBA6F,0xBA70,0xBA71,0xBA72,0xBA73, -0xC6B4,0xC6B5,0xBA74,0xC6B6,0xBA75,0xBA76,0xBA77,0xBA78, -0xBA79,0xBA7A,0xBA81,0xBA82,0xC6B7,0xBA83,0xBA84,0xBA85, -0xC6B8,0xBA86,0xBA87,0xBA88,0xC6B9,0xBA89,0xBA8A,0xBA8B, -0xBA8C,0xBA8D,0xBA8E,0xBA8F,0xC6BA,0xC6BB,0xBA90,0xBA91, -0xBA92,0xBA93,0xBA94,0xBA95,0xBA96,0xBA97,0xBA98,0xBA99, -0xC6BC,0xC6BD,0xBA9A,0xBA9B,0xC6BE,0xBA9C,0xBA9D,0xBA9E, -0xC6BF,0xBA9F,0xBAA0,0xBB41,0xBB42,0xBB43,0xBB44,0xBB45, -0xC6C0,0xC6C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6,0xBC6E,0xBC6F,0xBC70, -0xC6E7,0xBC71,0xBC72,0xBC73,0xBC74,0xBC75,0xBC76,0xBC77, -0xC6E8,0xC6E9,0xBC78,0xC6EA,0xBC79,0xC6EB,0xBC7A,0xBC81, -0xBC82,0xBC83,0xBC84,0xBC85,0xC6EC,0xBC86,0xBC87,0xBC88, -0xC6ED,0xBC89,0xBC8A,0xBC8B,0xC6EE,0xBC8C,0xBC8D,0xBC8E, -0xBC8F,0xBC90,0xBC91,0xBC92,0xC6EF,0xC6F0,0xBC93,0xBC94, -0xC6F1,0xC6F2,0xBC95,0xBC96,0xBC97,0xBC98,0xBC99,0xBC9A, -0xC6F3,0xBC9B,0xBC9C,0xBC9D,0xBC9E,0xBC9F,0xBCA0,0xBD41, -0xC6F4,0xBD42,0xBD43,0xBD44,0xBD45,0xBD46,0xBD47,0xBD48, -0xBD49,0xC6F5,0xBD4A,0xC6F6,0xBD4B,0xBD4C,0xBD4D,0xBD4E, -0xBD4F,0xBD50,0xBD51,0xBD52,0xC6F7,0xC6F8,0xBD53,0xBD54, -0xC6F9,0xBD55,0xBD56,0xBD57,0xC6FA,0xBD58,0xBD59,0xBD5A, -0xBD61,0xBD62,0xBD63,0xBD64,0xC6FB,0xC6FC,0xBD65,0xC6FD, -0xBD66,0xC6FE,0xBD67,0xBD68,0xBD69,0xBD6A,0xBD6B,0xBD6C, -0xC7A1,0xBD6D,0xBD6E,0xBD6F,0xBD70,0xBD71,0xBD72,0xBD73, -0xBD74,0xBD75,0xBD76,0xBD77,0xBD78,0xBD79,0xBD7A,0xBD81, -0xBD82,0xBD83,0xBD84,0xBD85,0xBD86,0xC7A2,0xBD87,0xBD88, -0xBD89,0xBD8A,0xBD8B,0xBD8C,0xBD8D,0xBD8E,0xBD8F,0xBD90, -0xBD91,0xBD92,0xBD93,0xBD94,0xBD95,0xBD96,0xBD97,0xBD98, -0xBD99,0xBD9A,0xBD9B,0xBD9C,0xBD9D,0xBD9E,0xBD9F,0xBDA0, -0xBE41,0xBE42,0xBE43,0xBE44,0xBE45,0xBE46,0xBE47,0xBE48, -0xC7A3,0xBE49,0xBE4A,0xBE4B,0xC7A4,0xBE4C,0xBE4D,0xBE4E, -0xBE4F,0xBE50,0xBE51,0xBE52,0xBE53,0xBE54,0xBE55,0xBE56, -0xBE57,0xBE58,0xBE59,0xBE5A,0xBE61,0xBE62,0xBE63,0xBE64, -0xBE65,0xBE66,0xBE67,0xBE68,0xC7A5,0xBE69,0xBE6A,0xBE6B, -0xC7A6,0xBE6C,0xBE6D,0xBE6E,0xC7A7,0xBE6F,0xBE70,0xBE71, -0xBE72,0xBE73,0xBE74,0xBE75,0xBE76,0xC7A8,0xBE77,0xC7A9, -0xBE78,0xBE79,0xBE7A,0xBE81,0xBE82,0xBE83,0xBE84,0xBE85, -0xC7AA,0xC7AB,0xBE86,0xBE87,0xC7AC,0xBE88,0xBE89,0xC7AD, -0xC7AE,0xBE8A,0xC7AF,0xBE8B,0xBE8C,0xBE8D,0xBE8E,0xBE8F, -0xC7B0,0xC7B1,0xBE90,0xC7B2,0xBE91,0xC7B3,0xBE92,0xBE93, -0xBE94,0xBE95,0xBE96,0xBE97,0xC7B4,0xBE98,0xBE99,0xBE9A, -0xBE9B,0xBE9C,0xBE9D,0xBE9E,0xBE9F,0xBEA0,0xBF41,0xBF42, -0xBF43,0xBF44,0xBF45,0xBF46,0xBF47,0xBF48,0xBF49,0xBF4A, -0xBF4B,0xC7B5,0xBF4C,0xBF4D,0xBF4E,0xBF4F,0xBF50,0xBF51, -0xBF52,0xBF53,0xBF54,0xBF55,0xBF56,0xBF57,0xBF58,0xBF59, -0xBF5A,0xBF61,0xBF62,0xBF63,0xBF64,0xBF65,0xBF66,0xBF67, -0xBF68,0xBF69,0xBF6A,0xBF6B,0xBF6C,0xBF6D,0xBF6E,0xBF6F, -0xBF70,0xBF71,0xBF72,0xBF73,0xC7B6,0xBF74,0xBF75,0xBF76, -0xC7B7,0xBF77,0xBF78,0xBF79,0xC7B8,0xBF7A,0xBF81,0xBF82, -0xBF83,0xBF84,0xBF85,0xBF86,0xC7B9,0xBF87,0xBF88,0xC7BA, -0xBF89,0xBF8A,0xBF8B,0xBF8C,0xBF8D,0xBF8E,0xBF8F,0xBF90, -0xC7BB,0xBF91,0xBF92,0xBF93,0xC7BC,0xBF94,0xBF95,0xBF96, -0xC7BD,0xBF97,0xBF98,0xBF99,0xBF9A,0xBF9B,0xBF9C,0xBF9D, -0xC7BE,0xBF9E,0xBF9F,0xC7BF,0xBFA0,0xC7C0,0xC041,0xC042, -0xC043,0xC044,0xC045,0xC046,0xC7C1,0xC047,0xC048,0xC049, -0xC7C2,0xC04A,0xC04B,0xC04C,0xC7C3,0xC04D,0xC04E,0xC04F, -0xC050,0xC051,0xC052,0xC053,0xC7C4,0xC7C5,0xC054,0xC7C6, -0xC055,0xC056,0xC057,0xC058,0xC059,0xC05A,0xC061,0xC062, -0xC063,0xC064,0xC065,0xC066,0xC067,0xC068,0xC069,0xC06A, -0xC06B,0xC06C,0xC06D,0xC06E,0xC06F,0xC070,0xC071,0xC072, -0xC073,0xC074,0xC075,0xC076,0xC077,0xC078,0xC079,0xC07A, -0xC081,0xC082,0xC083,0xC084,0xC7C7,0xC7C8,0xC085,0xC086, -0xC7C9,0xC087,0xC088,0xC089,0xC7CA,0xC08A,0xC08B,0xC08C, -0xC08D,0xC08E,0xC08F,0xC090,0xC7CB,0xC7CC,0xC091,0xC7CD, -0xC092,0xC7CE,0xC093,0xC094,0xC095,0xC096,0xC097,0xC098, -0xC7CF,0xC7D0,0xC099,0xC09A,0xC7D1,0xC09B,0xC09C,0xC09D, -0xC7D2,0xC09E,0xC09F,0xC0A0,0xC141,0xC7D3,0xC142,0xC143, -0xC7D4,0xC7D5,0xC144,0xC7D6,0xC145,0xC7D7,0xC146,0xC147, -0xC148,0xC149,0xC14A,0xC14B,0xC7D8,0xC7D9,0xC14C,0xC14D, -0xC7DA,0xC14E,0xC14F,0xC150,0xC7DB,0xC151,0xC152,0xC153, -0xC154,0xC155,0xC156,0xC157,0xC7DC,0xC7DD,0xC158,0xC7DE, -0xC7DF,0xC7E0,0xC159,0xC15A,0xC161,0xC162,0xC163,0xC164, -0xC7E1,0xC165,0xC166,0xC167,0xC168,0xC169,0xC16A,0xC16B, -0xC16C,0xC16D,0xC16E,0xC16F,0xC170,0xC171,0xC172,0xC173, -0xC174,0xC175,0xC176,0xC177,0xC178,0xC7E2,0xC179,0xC17A, -0xC181,0xC182,0xC183,0xC184,0xC185,0xC186,0xC187,0xC188, -0xC189,0xC18A,0xC18B,0xC18C,0xC18D,0xC18E,0xC18F,0xC190, -0xC191,0xC192,0xC193,0xC194,0xC195,0xC196,0xC197,0xC198, -0xC199,0xC19A,0xC19B,0xC19C,0xC19D,0xC19E,0xC19F,0xC1A0, -0xC7E3,0xC7E4,0xC241,0xC242,0xC7E5,0xC243,0xC244,0xC245, -0xC7E6,0xC246,0xC7E7,0xC247,0xC248,0xC249,0xC24A,0xC24B, -0xC7E8,0xC7E9,0xC24C,0xC7EA,0xC24D,0xC7EB,0xC24E,0xC24F, -0xC250,0xC251,0xC252,0xC253,0xC7EC,0xC7ED,0xC254,0xC255, -0xC7EE,0xC256,0xC257,0xC258,0xC7EF,0xC259,0xC25A,0xC261, -0xC262,0xC263,0xC264,0xC265,0xC7F0,0xC7F1,0xC266,0xC7F2, -0xC267,0xC7F3,0xC268,0xC269,0xC26A,0xC26B,0xC26C,0xC26D, -0xC7F4,0xC7F5,0xC26E,0xC26F,0xC7F6,0xC270,0xC271,0xC272, -0xC7F7,0xC273,0xC274,0xC275,0xC276,0xC277,0xC278,0xC279, -0xC7F8,0xC7F9,0xC27A,0xC7FA,0xC7FB,0xC7FC,0xC281,0xC282, -0xC283,0xC284,0xC285,0xC286,0xC7FD,0xC287,0xC288,0xC289, -0xC7FE,0xC28A,0xC28B,0xC28C,0xC8A1,0xC28D,0xC28E,0xC28F, -0xC290,0xC291,0xC292,0xC293,0xC294,0xC8A2,0xC295,0xC296, -0xC297,0xC298,0xC299,0xC29A,0xC29B,0xC29C,0xC29D,0xC29E, -0xC8A3,0xC8A4,0xC29F,0xC2A0,0xC8A5,0xC341,0xC342,0xC343, -0xC8A6,0xC344,0xC345,0xC346,0xC347,0xC8A7,0xC348,0xC349, -0xC8A8,0xC8A9,0xC34A,0xC8AA,0xC34B,0xC8AB,0xC34C,0xC34D, -0xC34E,0xC8AC,0xC34F,0xC350,0xC8AD,0xC8AE,0xC351,0xC352, -0xC8AF,0xC353,0xC354,0xC355,0xC8B0,0xC356,0xC357,0xC358, -0xC359,0xC35A,0xC361,0xC362,0xC363,0xC364,0xC365,0xC8B1, -0xC366,0xC8B2,0xC367,0xC368,0xC369,0xC36A,0xC36B,0xC36C, -0xC8B3,0xC8B4,0xC36D,0xC36E,0xC8B5,0xC36F,0xC370,0xC371, -0xC372,0xC373,0xC374,0xC375,0xC376,0xC377,0xC378,0xC379, -0xC37A,0xC381,0xC382,0xC8B6,0xC383,0xC8B7,0xC384,0xC385, -0xC386,0xC387,0xC388,0xC389,0xC8B8,0xC8B9,0xC38A,0xC38B, -0xC8BA,0xC38C,0xC38D,0xC38E,0xC8BB,0xC38F,0xC390,0xC391, -0xC392,0xC393,0xC394,0xC395,0xC396,0xC8BC,0xC397,0xC8BD, -0xC398,0xC8BE,0xC399,0xC39A,0xC39B,0xC39C,0xC39D,0xC39E, -0xC8BF,0xC39F,0xC3A0,0xC441,0xC8C0,0xC442,0xC443,0xC444, -0xC8C1,0xC445,0xC446,0xC447,0xC448,0xC449,0xC44A,0xC44B, -0xC44C,0xC8C2,0xC44D,0xC8C3,0xC44E,0xC44F,0xC450,0xC451, -0xC452,0xC453,0xC454,0xC455,0xC8C4,0xC8C5,0xC456,0xC457, -0xC8C6,0xC458,0xC459,0xC45A,0xC8C7,0xC461,0xC462,0xC463, -0xC464,0xC8C8,0xC465,0xC466,0xC8C9,0xC467,0xC468,0xC8CA, -0xC469,0xC8CB,0xC46A,0xC46B,0xC46C,0xC46D,0xC46E,0xC46F, -0xC8CC,0xC470,0xC471,0xC472,0xC8CD,0xC473,0xC474,0xC475, -0xC8CE,0xC476,0xC477,0xC478,0xC479,0xC47A,0xC481,0xC482, -0xC8CF,0xC483,0xC484,0xC485,0xC486,0xC8D0,0xC487,0xC488, -0xC489,0xC48A,0xC48B,0xC48C,0xC8D1,0xC8D2,0xC48D,0xC48E, -0xC8D3,0xC48F,0xC490,0xC491,0xC8D4,0xC492,0xC493,0xC494, -0xC495,0xC496,0xC497,0xC498,0xC499,0xC49A,0xC49B,0xC49C, -0xC49D,0xC8D5,0xC49E,0xC49F,0xC4A0,0xC541,0xC542,0xC543, -0xC8D6,0xC8D7,0xC544,0xC545,0xC8D8,0xC546,0xC547,0xC548, -0xC8D9,0xC549,0xC54A,0xC54B,0xC54C,0xC54D,0xC54E,0xC54F, -0xC8DA,0xC8DB,0xC550,0xC8DC,0xC551,0xC8DD,0xC552,0xC553, -0xC554,0xC555,0xC556,0xC557,0xC8DE,0xC8DF,0xC558,0xC559, -0xC8E0,0xC55A,0xC561,0xC562,0xC8E1,0xC563,0xC564,0xC565, -0xC566,0xC567,0xC568,0xC569,0xC8E2,0xC56A,0xC56B,0xC8E3, -0xC56C,0xC8E4,0xC56D,0xC56E,0xC56F,0xC570,0xC571,0xC572, -0xC8E5,0xC8E6,0xC573,0xC574,0xC8E7,0xC575,0xC8E8,0xC8E9, -0xC8EA,0xC8EB,0xC576,0xC577,0xC578,0xC579,0xC57A,0xC581, -0xC8EC,0xC8ED,0xC582,0xC8EE,0xC583,0xC8EF,0xC584,0xC585, -0xC586,0xC8F0,0xC587,0xC588,0xC8F1,0xC589,0xC58A,0xC58B, -0xC8F2,0xC58C,0xC58D,0xC58E,0xC8F3,0xC58F,0xC590,0xC591, -0xC592,0xC593,0xC594,0xC595,0xC8F4,0xC8F5,0xC596,0xC597, -0xC598,0xC8F6,0xC599,0xC59A,0xC59B,0xC59C,0xC59D,0xC59E, -0xC8F7,0xC8F8,0xC59F,0xC5A0,0xC8F9,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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,0xA1CB, -0xA1CC,0xA1FE,0xA3FE, 0,0xA1CD,0xA3DC}; - -static int func_uni_ksc5601_onechar(int code){ - if ((code>=0x00A1)&&(code<=0x0167)) - return(tab_uni_ksc56010[code-0x00A1]); - if ((code>=0x02C7)&&(code<=0x0451)) - return(tab_uni_ksc56011[code-0x02C7]); - if ((code>=0x2015)&&(code<=0x2312)) - return(tab_uni_ksc56012[code-0x2015]); - if ((code>=0x2460)&&(code<=0x266D)) - return(tab_uni_ksc56013[code-0x2460]); - if ((code>=0x3000)&&(code<=0x327F)) - return(tab_uni_ksc56014[code-0x3000]); - if ((code>=0x3380)&&(code<=0x33DD)) - return(tab_uni_ksc56015[code-0x3380]); - if ((code>=0x4E00)&&(code<=0x947F)) - return(tab_uni_ksc56016[code-0x4E00]); - if ((code>=0x9577)&&(code<=0x9F9C)) - return(tab_uni_ksc56017[code-0x9577]); - if ((code>=0xAC00)&&(code<=0xD7A3)) - return(tab_uni_ksc56018[code-0xAC00]); - if ((code>=0xF900)&&(code<=0xFA0B)) - return(tab_uni_ksc56019[code-0xF900]); - if ((code>=0xFF01)&&(code<=0xFFE6)) - return(tab_uni_ksc560110[code-0xFF01]); - return(0); -} - - -static int -my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, uchar *e) -{ - int code; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((uint) wc < 0x80) - { - s[0]= (uchar) wc; - return 1; - } - - if (!(code=func_uni_ksc5601_onechar(wc))) - return MY_CS_ILUNI; - - if (s+2>e) - return MY_CS_TOOSMALL2; - - s[0]=code>>8; - s[1]=code&0xFF; - - return 2; -} - - -static int -my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc, const uchar *s, const uchar *e) -{ - - int hi; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((hi= s[0]) < 0x80) - { - pwc[0]=hi; - return 1; - } - - if (s+2>e) - return MY_CS_TOOSMALL2; - - if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1]))) - return -2; - - return 2; -} - - -/* - Returns well formed length of a EUC-KR string. -*/ -static size_t -my_well_formed_len_euckr(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, - size_t pos, int *error) -{ - const char *b0= b; - const char *emb= e - 1; /* Last possible end of an MB character */ - - *error= 0; - while (pos-- && b < e) - { - if ((uchar) b[0] < 128) - { - /* Single byte ascii character */ - b++; - } - else if (b < emb && iseuc_kr_head(*b) && iseuc_kr_tail(b[1])) - { - /* Double byte character */ - b+= 2; - } - else - { - /* Wrong byte sequence */ - *error= 1; - break; - } - } - return (size_t) (b - b0); -} - - -static MY_COLLATION_HANDLER my_collation_ci_handler = -{ - NULL, /* init */ - my_strnncoll_simple, /* strnncoll */ - my_strnncollsp_simple, - my_strnxfrm_mb, /* strnxfrm */ - my_strnxfrmlen_simple, - my_like_range_mb, /* like_range */ - my_wildcmp_mb, /* wildcmp */ - my_strcasecmp_mb, - my_instr_mb, - my_hash_sort_simple, - my_propagate_simple -}; - - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - ismbchar_euc_kr, - mbcharlen_euc_kr, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_euckr, - my_lengthsp_8bit, - my_numcells_8bit, - my_mb_wc_euc_kr, /* mb_wc */ - my_wc_mb_euc_kr, /* wc_mb */ - my_mb_ctype_mb, - my_caseup_str_mb, - my_casedn_str_mb, - my_caseup_mb, - my_casedn_mb, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - -CHARSET_INFO my_charset_euckr_korean_ci= -{ - 19,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY, /* state */ - "euckr", /* cs name */ - "euckr_korean_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_euc_kr, - to_lower_euc_kr, - to_upper_euc_kr, - sort_order_euc_kr, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_ci_handler -}; - - -CHARSET_INFO my_charset_euckr_bin= -{ - 85,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT, /* state */ - "euckr", /* cs name */ - "euckr_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_euc_kr, - to_lower_euc_kr, - to_upper_euc_kr, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_mb_bin_handler -}; - -#endif diff --git a/externals/mysql/strings/ctype-eucjpms.c b/externals/mysql/strings/ctype-eucjpms.c deleted file mode 100644 index dc2329785b..0000000000 --- a/externals/mysql/strings/ctype-eucjpms.c +++ /dev/null @@ -1,8759 +0,0 @@ -/* Copyright (C) 2002 MySQL AB & tommy@valley.ne.jp. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* This file is for Japanese EUC charset, and created based on -ctype-ujis.c file. - */ - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. mbmaxlen_eucjpms=3 - */ - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_eucjpms - - -static uchar NEAR ctype_eucjpms[257] = -{ - 0, /* For standard library */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ - 0040, 0050, 0050, 0050, 0050, 0050, 0040, 0040, /* ^H - ^O */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^P - ^W */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^X - ^Z ^[ ^\ ^] ^^ ^_ */ - 0110, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* SPC ! " # $ % ^ ' */ - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* ( ) * + , - . / */ - 0204, 0204, 0204, 0204, 0204, 0204, 0204, 0204, /* 0 1 2 3 4 5 6 7 */ - 0204, 0204, 0020, 0020, 0020, 0020, 0020, 0020, /* 8 9 : ; < = > ? */ - 0020, 0201, 0201, 0201, 0201, 0201, 0201, 0001, /* @ A B C D E F G */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* H I J K L M N O */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* P Q R S T U V W */ - 0001, 0001, 0001, 0020, 0020, 0020, 0020, 0020, /* X Y Z [ \ ] ^ _ */ - 0020, 0202, 0202, 0202, 0202, 0202, 0202, 0002, /* ` a b c d e f g */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* h i j k l m n o */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* p q r s t u v w */ - 0002, 0002, 0002, 0020, 0020, 0020, 0020, 0040, /* x y z { | } + DEL */ - 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, - 0000, 0000, 0000, 0000, 0000, 0000, 0020, 0020, - 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, - 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, - 0000, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000, -}; - -static uchar NEAR to_lower_eucjpms[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '[', '\\', ']', '^', '_', - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -static uchar NEAR to_upper_eucjpms[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -static uchar NEAR sort_order_eucjpms[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375', (uchar) (uchar) '\376', (uchar) '\377' -}; - - -#define iseucjpms(c) ((0xa1<=((c)&0xff) && ((c)&0xff)<=0xfe)) -#define iskata(c) ((0xa1<=((c)&0xff) && ((c)&0xff)<=0xdf)) -#define iseucjpms_ss2(c) (((c)&0xff) == 0x8e) -#define iseucjpms_ss3(c) (((c)&0xff) == 0x8f) - - -static uint ismbchar_eucjpms(CHARSET_INFO *cs __attribute__((unused)), - const char* p, const char *e) -{ - return ((*(uchar*)(p)<0x80)? 0:\ - iseucjpms(*(p)) && (e)-(p)>1 && iseucjpms(*((p)+1))? 2:\ - iseucjpms_ss2(*(p)) && (e)-(p)>1 && iskata(*((p)+1))? 2:\ - iseucjpms_ss3(*(p)) && (e)-(p)>2 && iseucjpms(*((p)+1)) && iseucjpms(*((p)+2))? 3:\ - 0); -} - -static uint mbcharlen_eucjpms(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return (iseucjpms(c)? 2: iseucjpms_ss2(c)? 2: iseucjpms_ss3(c)? 3: 1); -} - - -static uint16 tab_jisx0201_uni[256]={ - 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xFF61,0xFF62,0xFF63,0xFF64,0xFF65,0xFF66,0xFF67, -0xFF68,0xFF69,0xFF6A,0xFF6B,0xFF6C,0xFF6D,0xFF6E,0xFF6F, -0xFF70,0xFF71,0xFF72,0xFF73,0xFF74,0xFF75,0xFF76,0xFF77, -0xFF78,0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F, -0xFF80,0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87, -0xFF88,0xFF89,0xFF8A,0xFF8B,0xFF8C,0xFF8D,0xFF8E,0xFF8F, -0xFF90,0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97, -0xFF98,0xFF99,0xFF9A,0xFF9B,0xFF9C,0xFF9D,0xFF9E,0xFF9F, - 0, 0, 0, 0, 0, 0, 0, 0, - 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 int -my_mb_wc_jisx0201(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *wc,const uchar *s, - const uchar *e __attribute__((unused))) -{ - wc[0]=tab_jisx0201_uni[*s]; - return (!wc[0] && s[0]) ? -1 : 1; -} - - -static int -my_wc_mb_jisx0201(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, - uchar *e __attribute__((unused))) -{ - - if ((int) wc <= 0x7D) - { - *s = (uchar) wc; - return (wc == 0x5C) ? MY_CS_ILUNI : 1; - } - - if (wc >= 0xFF61 && wc <= 0xFF9F) - { - *s = (uchar) (wc - 0xFEC0); - return 1; - } - - return MY_CS_ILUNI; -} - - -/* page 0 0x2121-0x217E */ -static uint16 tab_jisx0208_uni0[]={ -0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B, -0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E, -0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD, -0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0xFF3C, -0xFF5E,0x2225,0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C, -0x201D,0xFF08,0xFF09,0x3014,0x3015,0xFF3B,0xFF3D,0xFF5B, -0xFF5D,0x3008,0x3009,0x300A,0x300B,0x300C,0x300D,0x300E, -0x300F,0x3010,0x3011,0xFF0B,0xFF0D,0x00B1,0x00D7,0x00F7, -0xFF1D,0x2260,0xFF1C,0xFF1E,0x2266,0x2267,0x221E,0x2234, -0x2642,0x2640,0x00B0,0x2032,0x2033,0x2103,0xFFE5,0xFF04, -0xFFE0,0xFFE1,0xFF05,0xFF03,0xFF06,0xFF0A,0xFF20,0x00A7, -0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7}; - -/* page 1 0x2221-0x227E */ -static uint16 tab_jisx0208_uni1[]={ -0x25C6,0x25A1,0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x203B, -0x3012,0x2192,0x2190,0x2191,0x2193,0x3013, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x2208,0x220B,0x2286,0x2287,0x2282,0x2283,0x222A, -0x2229, 0, 0, 0, 0, 0, 0, 0, - 0,0x2227,0x2228,0xFFE2,0x21D2,0x21D4,0x2200,0x2203, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x2220,0x22A5,0x2312,0x2202,0x2207, -0x2261,0x2252,0x226A,0x226B,0x221A,0x223D,0x221D,0x2235, -0x222B,0x222C, 0, 0, 0, 0, 0, 0, - 0,0x212B,0x2030,0x266F,0x266D,0x266A,0x2020,0x2021, -0x00B6, 0, 0, 0, 0,0x25EF}; - -/* page 2 0x2330-0x237A */ -static uint16 tab_jisx0208_uni2[]={ -0xFF10,0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17, -0xFF18,0xFF19, 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,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}; - -/* page 3 0x2421-0x2473 */ -static uint16 tab_jisx0208_uni3[]={ -0x3041,0x3042,0x3043,0x3044,0x3045,0x3046,0x3047,0x3048, -0x3049,0x304A,0x304B,0x304C,0x304D,0x304E,0x304F,0x3050, -0x3051,0x3052,0x3053,0x3054,0x3055,0x3056,0x3057,0x3058, -0x3059,0x305A,0x305B,0x305C,0x305D,0x305E,0x305F,0x3060, -0x3061,0x3062,0x3063,0x3064,0x3065,0x3066,0x3067,0x3068, -0x3069,0x306A,0x306B,0x306C,0x306D,0x306E,0x306F,0x3070, -0x3071,0x3072,0x3073,0x3074,0x3075,0x3076,0x3077,0x3078, -0x3079,0x307A,0x307B,0x307C,0x307D,0x307E,0x307F,0x3080, -0x3081,0x3082,0x3083,0x3084,0x3085,0x3086,0x3087,0x3088, -0x3089,0x308A,0x308B,0x308C,0x308D,0x308E,0x308F,0x3090, -0x3091,0x3092,0x3093}; - -/* page 4 0x2521-0x2576 */ -static uint16 tab_jisx0208_uni4[]={ -0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8, -0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0, -0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8, -0x30B9,0x30BA,0x30BB,0x30BC,0x30BD,0x30BE,0x30BF,0x30C0, -0x30C1,0x30C2,0x30C3,0x30C4,0x30C5,0x30C6,0x30C7,0x30C8, -0x30C9,0x30CA,0x30CB,0x30CC,0x30CD,0x30CE,0x30CF,0x30D0, -0x30D1,0x30D2,0x30D3,0x30D4,0x30D5,0x30D6,0x30D7,0x30D8, -0x30D9,0x30DA,0x30DB,0x30DC,0x30DD,0x30DE,0x30DF,0x30E0, -0x30E1,0x30E2,0x30E3,0x30E4,0x30E5,0x30E6,0x30E7,0x30E8, -0x30E9,0x30EA,0x30EB,0x30EC,0x30ED,0x30EE,0x30EF,0x30F0, -0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6}; - -/* page 5 0x2621-0x2658 */ -static uint16 tab_jisx0208_uni5[]={ -0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398, -0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0, -0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, - 0, 0, 0, 0, 0, 0, 0, 0, -0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8, -0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, -0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9 -}; - -/* page 6 0x2721-0x2771 */ -static uint16 tab_jisx0208_uni6[]={ -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416, -0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, -0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, -0x042F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451,0x0436, -0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, -0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446, -0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, -0x044F}; - -/* page 7 0x2821-0x2840 */ -static uint16 tab_jisx0208_uni7[]={ -0x2500,0x2502,0x250C,0x2510,0x2518,0x2514,0x251C,0x252C, -0x2524,0x2534,0x253C,0x2501,0x2503,0x250F,0x2513,0x251B, -0x2517,0x2523,0x2533,0x252B,0x253B,0x254B,0x2520,0x252F, -0x2528,0x2537,0x253F,0x251D,0x2530,0x2525,0x2538,0x2542 -}; - -/* page 8 0x3021-0x307E */ -static uint16 tab_jisx0208_uni8[]={ -0x4E9C,0x5516,0x5A03,0x963F,0x54C0,0x611B,0x6328,0x59F6, -0x9022,0x8475,0x831C,0x7A50,0x60AA,0x63E1,0x6E25,0x65ED, -0x8466,0x82A6,0x9BF5,0x6893,0x5727,0x65A1,0x6271,0x5B9B, -0x59D0,0x867B,0x98F4,0x7D62,0x7DBE,0x9B8E,0x6216,0x7C9F, -0x88B7,0x5B89,0x5EB5,0x6309,0x6697,0x6848,0x95C7,0x978D, -0x674F,0x4EE5,0x4F0A,0x4F4D,0x4F9D,0x5049,0x56F2,0x5937, -0x59D4,0x5A01,0x5C09,0x60DF,0x610F,0x6170,0x6613,0x6905, -0x70BA,0x754F,0x7570,0x79FB,0x7DAD,0x7DEF,0x80C3,0x840E, -0x8863,0x8B02,0x9055,0x907A,0x533B,0x4E95,0x4EA5,0x57DF, -0x80B2,0x90C1,0x78EF,0x4E00,0x58F1,0x6EA2,0x9038,0x7A32, -0x8328,0x828B,0x9C2F,0x5141,0x5370,0x54BD,0x54E1,0x56E0, -0x59FB,0x5F15,0x98F2,0x6DEB,0x80E4,0x852D}; - -/* page 9 0x3121-0x317E */ -static uint16 tab_jisx0208_uni9[]={ -0x9662,0x9670,0x96A0,0x97FB,0x540B,0x53F3,0x5B87,0x70CF, -0x7FBD,0x8FC2,0x96E8,0x536F,0x9D5C,0x7ABA,0x4E11,0x7893, -0x81FC,0x6E26,0x5618,0x5504,0x6B1D,0x851A,0x9C3B,0x59E5, -0x53A9,0x6D66,0x74DC,0x958F,0x5642,0x4E91,0x904B,0x96F2, -0x834F,0x990C,0x53E1,0x55B6,0x5B30,0x5F71,0x6620,0x66F3, -0x6804,0x6C38,0x6CF3,0x6D29,0x745B,0x76C8,0x7A4E,0x9834, -0x82F1,0x885B,0x8A60,0x92ED,0x6DB2,0x75AB,0x76CA,0x99C5, -0x60A6,0x8B01,0x8D8A,0x95B2,0x698E,0x53AD,0x5186,0x5712, -0x5830,0x5944,0x5BB4,0x5EF6,0x6028,0x63A9,0x63F4,0x6CBF, -0x6F14,0x708E,0x7114,0x7159,0x71D5,0x733F,0x7E01,0x8276, -0x82D1,0x8597,0x9060,0x925B,0x9D1B,0x5869,0x65BC,0x6C5A, -0x7525,0x51F9,0x592E,0x5965,0x5F80,0x5FDC}; - -/* page 10 0x3221-0x327E */ -static uint16 tab_jisx0208_uni10[]={ -0x62BC,0x65FA,0x6A2A,0x6B27,0x6BB4,0x738B,0x7FC1,0x8956, -0x9D2C,0x9D0E,0x9EC4,0x5CA1,0x6C96,0x837B,0x5104,0x5C4B, -0x61B6,0x81C6,0x6876,0x7261,0x4E59,0x4FFA,0x5378,0x6069, -0x6E29,0x7A4F,0x97F3,0x4E0B,0x5316,0x4EEE,0x4F55,0x4F3D, -0x4FA1,0x4F73,0x52A0,0x53EF,0x5609,0x590F,0x5AC1,0x5BB6, -0x5BE1,0x79D1,0x6687,0x679C,0x67B6,0x6B4C,0x6CB3,0x706B, -0x73C2,0x798D,0x79BE,0x7A3C,0x7B87,0x82B1,0x82DB,0x8304, -0x8377,0x83EF,0x83D3,0x8766,0x8AB2,0x5629,0x8CA8,0x8FE6, -0x904E,0x971E,0x868A,0x4FC4,0x5CE8,0x6211,0x7259,0x753B, -0x81E5,0x82BD,0x86FE,0x8CC0,0x96C5,0x9913,0x99D5,0x4ECB, -0x4F1A,0x89E3,0x56DE,0x584A,0x58CA,0x5EFB,0x5FEB,0x602A, -0x6094,0x6062,0x61D0,0x6212,0x62D0,0x6539}; - -/* page 11 0x3321-0x337E */ -static uint16 tab_jisx0208_uni11[]={ -0x9B41,0x6666,0x68B0,0x6D77,0x7070,0x754C,0x7686,0x7D75, -0x82A5,0x87F9,0x958B,0x968E,0x8C9D,0x51F1,0x52BE,0x5916, -0x54B3,0x5BB3,0x5D16,0x6168,0x6982,0x6DAF,0x788D,0x84CB, -0x8857,0x8A72,0x93A7,0x9AB8,0x6D6C,0x99A8,0x86D9,0x57A3, -0x67FF,0x86CE,0x920E,0x5283,0x5687,0x5404,0x5ED3,0x62E1, -0x64B9,0x683C,0x6838,0x6BBB,0x7372,0x78BA,0x7A6B,0x899A, -0x89D2,0x8D6B,0x8F03,0x90ED,0x95A3,0x9694,0x9769,0x5B66, -0x5CB3,0x697D,0x984D,0x984E,0x639B,0x7B20,0x6A2B,0x6A7F, -0x68B6,0x9C0D,0x6F5F,0x5272,0x559D,0x6070,0x62EC,0x6D3B, -0x6E07,0x6ED1,0x845B,0x8910,0x8F44,0x4E14,0x9C39,0x53F6, -0x691B,0x6A3A,0x9784,0x682A,0x515C,0x7AC3,0x84B2,0x91DC, -0x938C,0x565B,0x9D28,0x6822,0x8305,0x8431}; - -/* page 12 0x3421-0x347E */ -static uint16 tab_jisx0208_uni12[]={ -0x7CA5,0x5208,0x82C5,0x74E6,0x4E7E,0x4F83,0x51A0,0x5BD2, -0x520A,0x52D8,0x52E7,0x5DFB,0x559A,0x582A,0x59E6,0x5B8C, -0x5B98,0x5BDB,0x5E72,0x5E79,0x60A3,0x611F,0x6163,0x61BE, -0x63DB,0x6562,0x67D1,0x6853,0x68FA,0x6B3E,0x6B53,0x6C57, -0x6F22,0x6F97,0x6F45,0x74B0,0x7518,0x76E3,0x770B,0x7AFF, -0x7BA1,0x7C21,0x7DE9,0x7F36,0x7FF0,0x809D,0x8266,0x839E, -0x89B3,0x8ACC,0x8CAB,0x9084,0x9451,0x9593,0x9591,0x95A2, -0x9665,0x97D3,0x9928,0x8218,0x4E38,0x542B,0x5CB8,0x5DCC, -0x73A9,0x764C,0x773C,0x5CA9,0x7FEB,0x8D0B,0x96C1,0x9811, -0x9854,0x9858,0x4F01,0x4F0E,0x5371,0x559C,0x5668,0x57FA, -0x5947,0x5B09,0x5BC4,0x5C90,0x5E0C,0x5E7E,0x5FCC,0x63EE, -0x673A,0x65D7,0x65E2,0x671F,0x68CB,0x68C4}; - -/* page 13 0x3521-0x357E */ -static uint16 tab_jisx0208_uni13[]={ -0x6A5F,0x5E30,0x6BC5,0x6C17,0x6C7D,0x757F,0x7948,0x5B63, -0x7A00,0x7D00,0x5FBD,0x898F,0x8A18,0x8CB4,0x8D77,0x8ECC, -0x8F1D,0x98E2,0x9A0E,0x9B3C,0x4E80,0x507D,0x5100,0x5993, -0x5B9C,0x622F,0x6280,0x64EC,0x6B3A,0x72A0,0x7591,0x7947, -0x7FA9,0x87FB,0x8ABC,0x8B70,0x63AC,0x83CA,0x97A0,0x5409, -0x5403,0x55AB,0x6854,0x6A58,0x8A70,0x7827,0x6775,0x9ECD, -0x5374,0x5BA2,0x811A,0x8650,0x9006,0x4E18,0x4E45,0x4EC7, -0x4F11,0x53CA,0x5438,0x5BAE,0x5F13,0x6025,0x6551,0x673D, -0x6C42,0x6C72,0x6CE3,0x7078,0x7403,0x7A76,0x7AAE,0x7B08, -0x7D1A,0x7CFE,0x7D66,0x65E7,0x725B,0x53BB,0x5C45,0x5DE8, -0x62D2,0x62E0,0x6319,0x6E20,0x865A,0x8A31,0x8DDD,0x92F8, -0x6F01,0x79A6,0x9B5A,0x4EA8,0x4EAB,0x4EAC}; - -/* page 14 0x3621-0x367E */ -static uint16 tab_jisx0208_uni14[]={ -0x4F9B,0x4FA0,0x50D1,0x5147,0x7AF6,0x5171,0x51F6,0x5354, -0x5321,0x537F,0x53EB,0x55AC,0x5883,0x5CE1,0x5F37,0x5F4A, -0x602F,0x6050,0x606D,0x631F,0x6559,0x6A4B,0x6CC1,0x72C2, -0x72ED,0x77EF,0x80F8,0x8105,0x8208,0x854E,0x90F7,0x93E1, -0x97FF,0x9957,0x9A5A,0x4EF0,0x51DD,0x5C2D,0x6681,0x696D, -0x5C40,0x66F2,0x6975,0x7389,0x6850,0x7C81,0x50C5,0x52E4, -0x5747,0x5DFE,0x9326,0x65A4,0x6B23,0x6B3D,0x7434,0x7981, -0x79BD,0x7B4B,0x7DCA,0x82B9,0x83CC,0x887F,0x895F,0x8B39, -0x8FD1,0x91D1,0x541F,0x9280,0x4E5D,0x5036,0x53E5,0x533A, -0x72D7,0x7396,0x77E9,0x82E6,0x8EAF,0x99C6,0x99C8,0x99D2, -0x5177,0x611A,0x865E,0x55B0,0x7A7A,0x5076,0x5BD3,0x9047, -0x9685,0x4E32,0x6ADB,0x91E7,0x5C51,0x5C48}; - -/* page 15 0x3721-0x377E */ -static uint16 tab_jisx0208_uni15[]={ -0x6398,0x7A9F,0x6C93,0x9774,0x8F61,0x7AAA,0x718A,0x9688, -0x7C82,0x6817,0x7E70,0x6851,0x936C,0x52F2,0x541B,0x85AB, -0x8A13,0x7FA4,0x8ECD,0x90E1,0x5366,0x8888,0x7941,0x4FC2, -0x50BE,0x5211,0x5144,0x5553,0x572D,0x73EA,0x578B,0x5951, -0x5F62,0x5F84,0x6075,0x6176,0x6167,0x61A9,0x63B2,0x643A, -0x656C,0x666F,0x6842,0x6E13,0x7566,0x7A3D,0x7CFB,0x7D4C, -0x7D99,0x7E4B,0x7F6B,0x830E,0x834A,0x86CD,0x8A08,0x8A63, -0x8B66,0x8EFD,0x981A,0x9D8F,0x82B8,0x8FCE,0x9BE8,0x5287, -0x621F,0x6483,0x6FC0,0x9699,0x6841,0x5091,0x6B20,0x6C7A, -0x6F54,0x7A74,0x7D50,0x8840,0x8A23,0x6708,0x4EF6,0x5039, -0x5026,0x5065,0x517C,0x5238,0x5263,0x55A7,0x570F,0x5805, -0x5ACC,0x5EFA,0x61B2,0x61F8,0x62F3,0x6372}; - -/* page 16 0x3821-0x387E */ -static uint16 tab_jisx0208_uni16[]={ -0x691C,0x6A29,0x727D,0x72AC,0x732E,0x7814,0x786F,0x7D79, -0x770C,0x80A9,0x898B,0x8B19,0x8CE2,0x8ED2,0x9063,0x9375, -0x967A,0x9855,0x9A13,0x9E78,0x5143,0x539F,0x53B3,0x5E7B, -0x5F26,0x6E1B,0x6E90,0x7384,0x73FE,0x7D43,0x8237,0x8A00, -0x8AFA,0x9650,0x4E4E,0x500B,0x53E4,0x547C,0x56FA,0x59D1, -0x5B64,0x5DF1,0x5EAB,0x5F27,0x6238,0x6545,0x67AF,0x6E56, -0x72D0,0x7CCA,0x88B4,0x80A1,0x80E1,0x83F0,0x864E,0x8A87, -0x8DE8,0x9237,0x96C7,0x9867,0x9F13,0x4E94,0x4E92,0x4F0D, -0x5348,0x5449,0x543E,0x5A2F,0x5F8C,0x5FA1,0x609F,0x68A7, -0x6A8E,0x745A,0x7881,0x8A9E,0x8AA4,0x8B77,0x9190,0x4E5E, -0x9BC9,0x4EA4,0x4F7C,0x4FAF,0x5019,0x5016,0x5149,0x516C, -0x529F,0x52B9,0x52FE,0x539A,0x53E3,0x5411}; - -/* page 17 0x3921-0x397E */ -static uint16 tab_jisx0208_uni17[]={ -0x540E,0x5589,0x5751,0x57A2,0x597D,0x5B54,0x5B5D,0x5B8F, -0x5DE5,0x5DE7,0x5DF7,0x5E78,0x5E83,0x5E9A,0x5EB7,0x5F18, -0x6052,0x614C,0x6297,0x62D8,0x63A7,0x653B,0x6602,0x6643, -0x66F4,0x676D,0x6821,0x6897,0x69CB,0x6C5F,0x6D2A,0x6D69, -0x6E2F,0x6E9D,0x7532,0x7687,0x786C,0x7A3F,0x7CE0,0x7D05, -0x7D18,0x7D5E,0x7DB1,0x8015,0x8003,0x80AF,0x80B1,0x8154, -0x818F,0x822A,0x8352,0x884C,0x8861,0x8B1B,0x8CA2,0x8CFC, -0x90CA,0x9175,0x9271,0x783F,0x92FC,0x95A4,0x964D,0x9805, -0x9999,0x9AD8,0x9D3B,0x525B,0x52AB,0x53F7,0x5408,0x58D5, -0x62F7,0x6FE0,0x8C6A,0x8F5F,0x9EB9,0x514B,0x523B,0x544A, -0x56FD,0x7A40,0x9177,0x9D60,0x9ED2,0x7344,0x6F09,0x8170, -0x7511,0x5FFD,0x60DA,0x9AA8,0x72DB,0x8FBC}; - -/* page 18 0x3A21-0x3A7E */ -static uint16 tab_jisx0208_uni18[]={ -0x6B64,0x9803,0x4ECA,0x56F0,0x5764,0x58BE,0x5A5A,0x6068, -0x61C7,0x660F,0x6606,0x6839,0x68B1,0x6DF7,0x75D5,0x7D3A, -0x826E,0x9B42,0x4E9B,0x4F50,0x53C9,0x5506,0x5D6F,0x5DE6, -0x5DEE,0x67FB,0x6C99,0x7473,0x7802,0x8A50,0x9396,0x88DF, -0x5750,0x5EA7,0x632B,0x50B5,0x50AC,0x518D,0x6700,0x54C9, -0x585E,0x59BB,0x5BB0,0x5F69,0x624D,0x63A1,0x683D,0x6B73, -0x6E08,0x707D,0x91C7,0x7280,0x7815,0x7826,0x796D,0x658E, -0x7D30,0x83DC,0x88C1,0x8F09,0x969B,0x5264,0x5728,0x6750, -0x7F6A,0x8CA1,0x51B4,0x5742,0x962A,0x583A,0x698A,0x80B4, -0x54B2,0x5D0E,0x57FC,0x7895,0x9DFA,0x4F5C,0x524A,0x548B, -0x643E,0x6628,0x6714,0x67F5,0x7A84,0x7B56,0x7D22,0x932F, -0x685C,0x9BAD,0x7B39,0x5319,0x518A,0x5237}; - -/* page 19 0x3B21-0x3B7E */ -static uint16 tab_jisx0208_uni19[]={ -0x5BDF,0x62F6,0x64AE,0x64E6,0x672D,0x6BBA,0x85A9,0x96D1, -0x7690,0x9BD6,0x634C,0x9306,0x9BAB,0x76BF,0x6652,0x4E09, -0x5098,0x53C2,0x5C71,0x60E8,0x6492,0x6563,0x685F,0x71E6, -0x73CA,0x7523,0x7B97,0x7E82,0x8695,0x8B83,0x8CDB,0x9178, -0x9910,0x65AC,0x66AB,0x6B8B,0x4ED5,0x4ED4,0x4F3A,0x4F7F, -0x523A,0x53F8,0x53F2,0x55E3,0x56DB,0x58EB,0x59CB,0x59C9, -0x59FF,0x5B50,0x5C4D,0x5E02,0x5E2B,0x5FD7,0x601D,0x6307, -0x652F,0x5B5C,0x65AF,0x65BD,0x65E8,0x679D,0x6B62,0x6B7B, -0x6C0F,0x7345,0x7949,0x79C1,0x7CF8,0x7D19,0x7D2B,0x80A2, -0x8102,0x81F3,0x8996,0x8A5E,0x8A69,0x8A66,0x8A8C,0x8AEE, -0x8CC7,0x8CDC,0x96CC,0x98FC,0x6B6F,0x4E8B,0x4F3C,0x4F8D, -0x5150,0x5B57,0x5BFA,0x6148,0x6301,0x6642}; - -/* page 20 0x3C21-0x3C7E */ -static uint16 tab_jisx0208_uni20[]={ -0x6B21,0x6ECB,0x6CBB,0x723E,0x74BD,0x75D4,0x78C1,0x793A, -0x800C,0x8033,0x81EA,0x8494,0x8F9E,0x6C50,0x9E7F,0x5F0F, -0x8B58,0x9D2B,0x7AFA,0x8EF8,0x5B8D,0x96EB,0x4E03,0x53F1, -0x57F7,0x5931,0x5AC9,0x5BA4,0x6089,0x6E7F,0x6F06,0x75BE, -0x8CEA,0x5B9F,0x8500,0x7BE0,0x5072,0x67F4,0x829D,0x5C61, -0x854A,0x7E1E,0x820E,0x5199,0x5C04,0x6368,0x8D66,0x659C, -0x716E,0x793E,0x7D17,0x8005,0x8B1D,0x8ECA,0x906E,0x86C7, -0x90AA,0x501F,0x52FA,0x5C3A,0x6753,0x707C,0x7235,0x914C, -0x91C8,0x932B,0x82E5,0x5BC2,0x5F31,0x60F9,0x4E3B,0x53D6, -0x5B88,0x624B,0x6731,0x6B8A,0x72E9,0x73E0,0x7A2E,0x816B, -0x8DA3,0x9152,0x9996,0x5112,0x53D7,0x546A,0x5BFF,0x6388, -0x6A39,0x7DAC,0x9700,0x56DA,0x53CE,0x5468}; - -/* page 21 0x3D21-0x3D7E */ -static uint16 tab_jisx0208_uni21[]={ -0x5B97,0x5C31,0x5DDE,0x4FEE,0x6101,0x62FE,0x6D32,0x79C0, -0x79CB,0x7D42,0x7E4D,0x7FD2,0x81ED,0x821F,0x8490,0x8846, -0x8972,0x8B90,0x8E74,0x8F2F,0x9031,0x914B,0x916C,0x96C6, -0x919C,0x4EC0,0x4F4F,0x5145,0x5341,0x5F93,0x620E,0x67D4, -0x6C41,0x6E0B,0x7363,0x7E26,0x91CD,0x9283,0x53D4,0x5919, -0x5BBF,0x6DD1,0x795D,0x7E2E,0x7C9B,0x587E,0x719F,0x51FA, -0x8853,0x8FF0,0x4FCA,0x5CFB,0x6625,0x77AC,0x7AE3,0x821C, -0x99FF,0x51C6,0x5FAA,0x65EC,0x696F,0x6B89,0x6DF3,0x6E96, -0x6F64,0x76FE,0x7D14,0x5DE1,0x9075,0x9187,0x9806,0x51E6, -0x521D,0x6240,0x6691,0x66D9,0x6E1A,0x5EB6,0x7DD2,0x7F72, -0x66F8,0x85AF,0x85F7,0x8AF8,0x52A9,0x53D9,0x5973,0x5E8F, -0x5F90,0x6055,0x92E4,0x9664,0x50B7,0x511F}; - -/* page 22 0x3E21-0x3E7E */ -static uint16 tab_jisx0208_uni22[]={ -0x52DD,0x5320,0x5347,0x53EC,0x54E8,0x5546,0x5531,0x5617, -0x5968,0x59BE,0x5A3C,0x5BB5,0x5C06,0x5C0F,0x5C11,0x5C1A, -0x5E84,0x5E8A,0x5EE0,0x5F70,0x627F,0x6284,0x62DB,0x638C, -0x6377,0x6607,0x660C,0x662D,0x6676,0x677E,0x68A2,0x6A1F, -0x6A35,0x6CBC,0x6D88,0x6E09,0x6E58,0x713C,0x7126,0x7167, -0x75C7,0x7701,0x785D,0x7901,0x7965,0x79F0,0x7AE0,0x7B11, -0x7CA7,0x7D39,0x8096,0x83D6,0x848B,0x8549,0x885D,0x88F3, -0x8A1F,0x8A3C,0x8A54,0x8A73,0x8C61,0x8CDE,0x91A4,0x9266, -0x937E,0x9418,0x969C,0x9798,0x4E0A,0x4E08,0x4E1E,0x4E57, -0x5197,0x5270,0x57CE,0x5834,0x58CC,0x5B22,0x5E38,0x60C5, -0x64FE,0x6761,0x6756,0x6D44,0x72B6,0x7573,0x7A63,0x84B8, -0x8B72,0x91B8,0x9320,0x5631,0x57F4,0x98FE}; - -/* page 23 0x3F21-0x3F7E */ -static uint16 tab_jisx0208_uni23[]={ -0x62ED,0x690D,0x6B96,0x71ED,0x7E54,0x8077,0x8272,0x89E6, -0x98DF,0x8755,0x8FB1,0x5C3B,0x4F38,0x4FE1,0x4FB5,0x5507, -0x5A20,0x5BDD,0x5BE9,0x5FC3,0x614E,0x632F,0x65B0,0x664B, -0x68EE,0x699B,0x6D78,0x6DF1,0x7533,0x75B9,0x771F,0x795E, -0x79E6,0x7D33,0x81E3,0x82AF,0x85AA,0x89AA,0x8A3A,0x8EAB, -0x8F9B,0x9032,0x91DD,0x9707,0x4EBA,0x4EC1,0x5203,0x5875, -0x58EC,0x5C0B,0x751A,0x5C3D,0x814E,0x8A0A,0x8FC5,0x9663, -0x976D,0x7B25,0x8ACF,0x9808,0x9162,0x56F3,0x53A8,0x9017, -0x5439,0x5782,0x5E25,0x63A8,0x6C34,0x708A,0x7761,0x7C8B, -0x7FE0,0x8870,0x9042,0x9154,0x9310,0x9318,0x968F,0x745E, -0x9AC4,0x5D07,0x5D69,0x6570,0x67A2,0x8DA8,0x96DB,0x636E, -0x6749,0x6919,0x83C5,0x9817,0x96C0,0x88FE}; - -/* page 24 0x4021-0x407E */ -static uint16 tab_jisx0208_uni24[]={ -0x6F84,0x647A,0x5BF8,0x4E16,0x702C,0x755D,0x662F,0x51C4, -0x5236,0x52E2,0x59D3,0x5F81,0x6027,0x6210,0x653F,0x6574, -0x661F,0x6674,0x68F2,0x6816,0x6B63,0x6E05,0x7272,0x751F, -0x76DB,0x7CBE,0x8056,0x58F0,0x88FD,0x897F,0x8AA0,0x8A93, -0x8ACB,0x901D,0x9192,0x9752,0x9759,0x6589,0x7A0E,0x8106, -0x96BB,0x5E2D,0x60DC,0x621A,0x65A5,0x6614,0x6790,0x77F3, -0x7A4D,0x7C4D,0x7E3E,0x810A,0x8CAC,0x8D64,0x8DE1,0x8E5F, -0x78A9,0x5207,0x62D9,0x63A5,0x6442,0x6298,0x8A2D,0x7A83, -0x7BC0,0x8AAC,0x96EA,0x7D76,0x820C,0x8749,0x4ED9,0x5148, -0x5343,0x5360,0x5BA3,0x5C02,0x5C16,0x5DDD,0x6226,0x6247, -0x64B0,0x6813,0x6834,0x6CC9,0x6D45,0x6D17,0x67D3,0x6F5C, -0x714E,0x717D,0x65CB,0x7A7F,0x7BAD,0x7DDA}; - -/* page 25 0x4121-0x417E */ -static uint16 tab_jisx0208_uni25[]={ -0x7E4A,0x7FA8,0x817A,0x821B,0x8239,0x85A6,0x8A6E,0x8CCE, -0x8DF5,0x9078,0x9077,0x92AD,0x9291,0x9583,0x9BAE,0x524D, -0x5584,0x6F38,0x7136,0x5168,0x7985,0x7E55,0x81B3,0x7CCE, -0x564C,0x5851,0x5CA8,0x63AA,0x66FE,0x66FD,0x695A,0x72D9, -0x758F,0x758E,0x790E,0x7956,0x79DF,0x7C97,0x7D20,0x7D44, -0x8607,0x8A34,0x963B,0x9061,0x9F20,0x50E7,0x5275,0x53CC, -0x53E2,0x5009,0x55AA,0x58EE,0x594F,0x723D,0x5B8B,0x5C64, -0x531D,0x60E3,0x60F3,0x635C,0x6383,0x633F,0x63BB,0x64CD, -0x65E9,0x66F9,0x5DE3,0x69CD,0x69FD,0x6F15,0x71E5,0x4E89, -0x75E9,0x76F8,0x7A93,0x7CDF,0x7DCF,0x7D9C,0x8061,0x8349, -0x8358,0x846C,0x84BC,0x85FB,0x88C5,0x8D70,0x9001,0x906D, -0x9397,0x971C,0x9A12,0x50CF,0x5897,0x618E}; - -/* page 26 0x4221-0x427E */ -static uint16 tab_jisx0208_uni26[]={ -0x81D3,0x8535,0x8D08,0x9020,0x4FC3,0x5074,0x5247,0x5373, -0x606F,0x6349,0x675F,0x6E2C,0x8DB3,0x901F,0x4FD7,0x5C5E, -0x8CCA,0x65CF,0x7D9A,0x5352,0x8896,0x5176,0x63C3,0x5B58, -0x5B6B,0x5C0A,0x640D,0x6751,0x905C,0x4ED6,0x591A,0x592A, -0x6C70,0x8A51,0x553E,0x5815,0x59A5,0x60F0,0x6253,0x67C1, -0x8235,0x6955,0x9640,0x99C4,0x9A28,0x4F53,0x5806,0x5BFE, -0x8010,0x5CB1,0x5E2F,0x5F85,0x6020,0x614B,0x6234,0x66FF, -0x6CF0,0x6EDE,0x80CE,0x817F,0x82D4,0x888B,0x8CB8,0x9000, -0x902E,0x968A,0x9EDB,0x9BDB,0x4EE3,0x53F0,0x5927,0x7B2C, -0x918D,0x984C,0x9DF9,0x6EDD,0x7027,0x5353,0x5544,0x5B85, -0x6258,0x629E,0x62D3,0x6CA2,0x6FEF,0x7422,0x8A17,0x9438, -0x6FC1,0x8AFE,0x8338,0x51E7,0x86F8,0x53EA}; - -/* page 27 0x4321-0x437E */ -static uint16 tab_jisx0208_uni27[]={ -0x53E9,0x4F46,0x9054,0x8FB0,0x596A,0x8131,0x5DFD,0x7AEA, -0x8FBF,0x68DA,0x8C37,0x72F8,0x9C48,0x6A3D,0x8AB0,0x4E39, -0x5358,0x5606,0x5766,0x62C5,0x63A2,0x65E6,0x6B4E,0x6DE1, -0x6E5B,0x70AD,0x77ED,0x7AEF,0x7BAA,0x7DBB,0x803D,0x80C6, -0x86CB,0x8A95,0x935B,0x56E3,0x58C7,0x5F3E,0x65AD,0x6696, -0x6A80,0x6BB5,0x7537,0x8AC7,0x5024,0x77E5,0x5730,0x5F1B, -0x6065,0x667A,0x6C60,0x75F4,0x7A1A,0x7F6E,0x81F4,0x8718, -0x9045,0x99B3,0x7BC9,0x755C,0x7AF9,0x7B51,0x84C4,0x9010, -0x79E9,0x7A92,0x8336,0x5AE1,0x7740,0x4E2D,0x4EF2,0x5B99, -0x5FE0,0x62BD,0x663C,0x67F1,0x6CE8,0x866B,0x8877,0x8A3B, -0x914E,0x92F3,0x99D0,0x6A17,0x7026,0x732A,0x82E7,0x8457, -0x8CAF,0x4E01,0x5146,0x51CB,0x558B,0x5BF5}; - -/* page 28 0x4421-0x447E */ -static uint16 tab_jisx0208_uni28[]={ -0x5E16,0x5E33,0x5E81,0x5F14,0x5F35,0x5F6B,0x5FB4,0x61F2, -0x6311,0x66A2,0x671D,0x6F6E,0x7252,0x753A,0x773A,0x8074, -0x8139,0x8178,0x8776,0x8ABF,0x8ADC,0x8D85,0x8DF3,0x929A, -0x9577,0x9802,0x9CE5,0x52C5,0x6357,0x76F4,0x6715,0x6C88, -0x73CD,0x8CC3,0x93AE,0x9673,0x6D25,0x589C,0x690E,0x69CC, -0x8FFD,0x939A,0x75DB,0x901A,0x585A,0x6802,0x63B4,0x69FB, -0x4F43,0x6F2C,0x67D8,0x8FBB,0x8526,0x7DB4,0x9354,0x693F, -0x6F70,0x576A,0x58F7,0x5B2C,0x7D2C,0x722A,0x540A,0x91E3, -0x9DB4,0x4EAD,0x4F4E,0x505C,0x5075,0x5243,0x8C9E,0x5448, -0x5824,0x5B9A,0x5E1D,0x5E95,0x5EAD,0x5EF7,0x5F1F,0x608C, -0x62B5,0x633A,0x63D0,0x68AF,0x6C40,0x7887,0x798E,0x7A0B, -0x7DE0,0x8247,0x8A02,0x8AE6,0x8E44,0x9013}; - -/* page 29 0x4521-0x457E */ -static uint16 tab_jisx0208_uni29[]={ -0x90B8,0x912D,0x91D8,0x9F0E,0x6CE5,0x6458,0x64E2,0x6575, -0x6EF4,0x7684,0x7B1B,0x9069,0x93D1,0x6EBA,0x54F2,0x5FB9, -0x64A4,0x8F4D,0x8FED,0x9244,0x5178,0x586B,0x5929,0x5C55, -0x5E97,0x6DFB,0x7E8F,0x751C,0x8CBC,0x8EE2,0x985B,0x70B9, -0x4F1D,0x6BBF,0x6FB1,0x7530,0x96FB,0x514E,0x5410,0x5835, -0x5857,0x59AC,0x5C60,0x5F92,0x6597,0x675C,0x6E21,0x767B, -0x83DF,0x8CED,0x9014,0x90FD,0x934D,0x7825,0x783A,0x52AA, -0x5EA6,0x571F,0x5974,0x6012,0x5012,0x515A,0x51AC,0x51CD, -0x5200,0x5510,0x5854,0x5858,0x5957,0x5B95,0x5CF6,0x5D8B, -0x60BC,0x6295,0x642D,0x6771,0x6843,0x68BC,0x68DF,0x76D7, -0x6DD8,0x6E6F,0x6D9B,0x706F,0x71C8,0x5F53,0x75D8,0x7977, -0x7B49,0x7B54,0x7B52,0x7CD6,0x7D71,0x5230}; - -/* page 30 0x4621-0x467E */ -static uint16 tab_jisx0208_uni30[]={ -0x8463,0x8569,0x85E4,0x8A0E,0x8B04,0x8C46,0x8E0F,0x9003, -0x900F,0x9419,0x9676,0x982D,0x9A30,0x95D8,0x50CD,0x52D5, -0x540C,0x5802,0x5C0E,0x61A7,0x649E,0x6D1E,0x77B3,0x7AE5, -0x80F4,0x8404,0x9053,0x9285,0x5CE0,0x9D07,0x533F,0x5F97, -0x5FB3,0x6D9C,0x7279,0x7763,0x79BF,0x7BE4,0x6BD2,0x72EC, -0x8AAD,0x6803,0x6A61,0x51F8,0x7A81,0x6934,0x5C4A,0x9CF6, -0x82EB,0x5BC5,0x9149,0x701E,0x5678,0x5C6F,0x60C7,0x6566, -0x6C8C,0x8C5A,0x9041,0x9813,0x5451,0x66C7,0x920D,0x5948, -0x90A3,0x5185,0x4E4D,0x51EA,0x8599,0x8B0E,0x7058,0x637A, -0x934B,0x6962,0x99B4,0x7E04,0x7577,0x5357,0x6960,0x8EDF, -0x96E3,0x6C5D,0x4E8C,0x5C3C,0x5F10,0x8FE9,0x5302,0x8CD1, -0x8089,0x8679,0x5EFF,0x65E5,0x4E73,0x5165}; - -/* page 31 0x4721-0x477E */ -static uint16 tab_jisx0208_uni31[]={ -0x5982,0x5C3F,0x97EE,0x4EFB,0x598A,0x5FCD,0x8A8D,0x6FE1, -0x79B0,0x7962,0x5BE7,0x8471,0x732B,0x71B1,0x5E74,0x5FF5, -0x637B,0x649A,0x71C3,0x7C98,0x4E43,0x5EFC,0x4E4B,0x57DC, -0x56A2,0x60A9,0x6FC3,0x7D0D,0x80FD,0x8133,0x81BF,0x8FB2, -0x8997,0x86A4,0x5DF4,0x628A,0x64AD,0x8987,0x6777,0x6CE2, -0x6D3E,0x7436,0x7834,0x5A46,0x7F75,0x82AD,0x99AC,0x4FF3, -0x5EC3,0x62DD,0x6392,0x6557,0x676F,0x76C3,0x724C,0x80CC, -0x80BA,0x8F29,0x914D,0x500D,0x57F9,0x5A92,0x6885,0x6973, -0x7164,0x72FD,0x8CB7,0x58F2,0x8CE0,0x966A,0x9019,0x877F, -0x79E4,0x77E7,0x8429,0x4F2F,0x5265,0x535A,0x62CD,0x67CF, -0x6CCA,0x767D,0x7B94,0x7C95,0x8236,0x8584,0x8FEB,0x66DD, -0x6F20,0x7206,0x7E1B,0x83AB,0x99C1,0x9EA6}; - -/* page 32 0x4821-0x487E */ -static uint16 tab_jisx0208_uni32[]={ -0x51FD,0x7BB1,0x7872,0x7BB8,0x8087,0x7B48,0x6AE8,0x5E61, -0x808C,0x7551,0x7560,0x516B,0x9262,0x6E8C,0x767A,0x9197, -0x9AEA,0x4F10,0x7F70,0x629C,0x7B4F,0x95A5,0x9CE9,0x567A, -0x5859,0x86E4,0x96BC,0x4F34,0x5224,0x534A,0x53CD,0x53DB, -0x5E06,0x642C,0x6591,0x677F,0x6C3E,0x6C4E,0x7248,0x72AF, -0x73ED,0x7554,0x7E41,0x822C,0x85E9,0x8CA9,0x7BC4,0x91C6, -0x7169,0x9812,0x98EF,0x633D,0x6669,0x756A,0x76E4,0x78D0, -0x8543,0x86EE,0x532A,0x5351,0x5426,0x5983,0x5E87,0x5F7C, -0x60B2,0x6249,0x6279,0x62AB,0x6590,0x6BD4,0x6CCC,0x75B2, -0x76AE,0x7891,0x79D8,0x7DCB,0x7F77,0x80A5,0x88AB,0x8AB9, -0x8CBB,0x907F,0x975E,0x98DB,0x6A0B,0x7C38,0x5099,0x5C3E, -0x5FAE,0x6787,0x6BD8,0x7435,0x7709,0x7F8E}; - -/* page 33 0x4921-0x497E */ -static uint16 tab_jisx0208_uni33[]={ -0x9F3B,0x67CA,0x7A17,0x5339,0x758B,0x9AED,0x5F66,0x819D, -0x83F1,0x8098,0x5F3C,0x5FC5,0x7562,0x7B46,0x903C,0x6867, -0x59EB,0x5A9B,0x7D10,0x767E,0x8B2C,0x4FF5,0x5F6A,0x6A19, -0x6C37,0x6F02,0x74E2,0x7968,0x8868,0x8A55,0x8C79,0x5EDF, -0x63CF,0x75C5,0x79D2,0x82D7,0x9328,0x92F2,0x849C,0x86ED, -0x9C2D,0x54C1,0x5F6C,0x658C,0x6D5C,0x7015,0x8CA7,0x8CD3, -0x983B,0x654F,0x74F6,0x4E0D,0x4ED8,0x57E0,0x592B,0x5A66, -0x5BCC,0x51A8,0x5E03,0x5E9C,0x6016,0x6276,0x6577,0x65A7, -0x666E,0x6D6E,0x7236,0x7B26,0x8150,0x819A,0x8299,0x8B5C, -0x8CA0,0x8CE6,0x8D74,0x961C,0x9644,0x4FAE,0x64AB,0x6B66, -0x821E,0x8461,0x856A,0x90E8,0x5C01,0x6953,0x98A8,0x847A, -0x8557,0x4F0F,0x526F,0x5FA9,0x5E45,0x670D}; - -/* page 34 0x4A21-0x4A7E */ -static uint16 tab_jisx0208_uni34[]={ -0x798F,0x8179,0x8907,0x8986,0x6DF5,0x5F17,0x6255,0x6CB8, -0x4ECF,0x7269,0x9B92,0x5206,0x543B,0x5674,0x58B3,0x61A4, -0x626E,0x711A,0x596E,0x7C89,0x7CDE,0x7D1B,0x96F0,0x6587, -0x805E,0x4E19,0x4F75,0x5175,0x5840,0x5E63,0x5E73,0x5F0A, -0x67C4,0x4E26,0x853D,0x9589,0x965B,0x7C73,0x9801,0x50FB, -0x58C1,0x7656,0x78A7,0x5225,0x77A5,0x8511,0x7B86,0x504F, -0x5909,0x7247,0x7BC7,0x7DE8,0x8FBA,0x8FD4,0x904D,0x4FBF, -0x52C9,0x5A29,0x5F01,0x97AD,0x4FDD,0x8217,0x92EA,0x5703, -0x6355,0x6B69,0x752B,0x88DC,0x8F14,0x7A42,0x52DF,0x5893, -0x6155,0x620A,0x66AE,0x6BCD,0x7C3F,0x83E9,0x5023,0x4FF8, -0x5305,0x5446,0x5831,0x5949,0x5B9D,0x5CF0,0x5CEF,0x5D29, -0x5E96,0x62B1,0x6367,0x653E,0x65B9,0x670B}; - -/* page 35 0x4B21-0x4B7E */ -static uint16 tab_jisx0208_uni35[]={ -0x6CD5,0x6CE1,0x70F9,0x7832,0x7E2B,0x80DE,0x82B3,0x840C, -0x84EC,0x8702,0x8912,0x8A2A,0x8C4A,0x90A6,0x92D2,0x98FD, -0x9CF3,0x9D6C,0x4E4F,0x4EA1,0x508D,0x5256,0x574A,0x59A8, -0x5E3D,0x5FD8,0x5FD9,0x623F,0x66B4,0x671B,0x67D0,0x68D2, -0x5192,0x7D21,0x80AA,0x81A8,0x8B00,0x8C8C,0x8CBF,0x927E, -0x9632,0x5420,0x982C,0x5317,0x50D5,0x535C,0x58A8,0x64B2, -0x6734,0x7267,0x7766,0x7A46,0x91E6,0x52C3,0x6CA1,0x6B86, -0x5800,0x5E4C,0x5954,0x672C,0x7FFB,0x51E1,0x76C6,0x6469, -0x78E8,0x9B54,0x9EBB,0x57CB,0x59B9,0x6627,0x679A,0x6BCE, -0x54E9,0x69D9,0x5E55,0x819C,0x6795,0x9BAA,0x67FE,0x9C52, -0x685D,0x4EA6,0x4FE3,0x53C8,0x62B9,0x672B,0x6CAB,0x8FC4, -0x4FAD,0x7E6D,0x9EBF,0x4E07,0x6162,0x6E80}; - -/* page 36 0x4C21-0x4C7E */ -static uint16 tab_jisx0208_uni36[]={ -0x6F2B,0x8513,0x5473,0x672A,0x9B45,0x5DF3,0x7B95,0x5CAC, -0x5BC6,0x871C,0x6E4A,0x84D1,0x7A14,0x8108,0x5999,0x7C8D, -0x6C11,0x7720,0x52D9,0x5922,0x7121,0x725F,0x77DB,0x9727, -0x9D61,0x690B,0x5A7F,0x5A18,0x51A5,0x540D,0x547D,0x660E, -0x76DF,0x8FF7,0x9298,0x9CF4,0x59EA,0x725D,0x6EC5,0x514D, -0x68C9,0x7DBF,0x7DEC,0x9762,0x9EBA,0x6478,0x6A21,0x8302, -0x5984,0x5B5F,0x6BDB,0x731B,0x76F2,0x7DB2,0x8017,0x8499, -0x5132,0x6728,0x9ED9,0x76EE,0x6762,0x52FF,0x9905,0x5C24, -0x623B,0x7C7E,0x8CB0,0x554F,0x60B6,0x7D0B,0x9580,0x5301, -0x4E5F,0x51B6,0x591C,0x723A,0x8036,0x91CE,0x5F25,0x77E2, -0x5384,0x5F79,0x7D04,0x85AC,0x8A33,0x8E8D,0x9756,0x67F3, -0x85AE,0x9453,0x6109,0x6108,0x6CB9,0x7652}; - -/* page 37 0x4D21-0x4D7E */ -static uint16 tab_jisx0208_uni37[]={ -0x8AED,0x8F38,0x552F,0x4F51,0x512A,0x52C7,0x53CB,0x5BA5, -0x5E7D,0x60A0,0x6182,0x63D6,0x6709,0x67DA,0x6E67,0x6D8C, -0x7336,0x7337,0x7531,0x7950,0x88D5,0x8A98,0x904A,0x9091, -0x90F5,0x96C4,0x878D,0x5915,0x4E88,0x4F59,0x4E0E,0x8A89, -0x8F3F,0x9810,0x50AD,0x5E7C,0x5996,0x5BB9,0x5EB8,0x63DA, -0x63FA,0x64C1,0x66DC,0x694A,0x69D8,0x6D0B,0x6EB6,0x7194, -0x7528,0x7AAF,0x7F8A,0x8000,0x8449,0x84C9,0x8981,0x8B21, -0x8E0A,0x9065,0x967D,0x990A,0x617E,0x6291,0x6B32,0x6C83, -0x6D74,0x7FCC,0x7FFC,0x6DC0,0x7F85,0x87BA,0x88F8,0x6765, -0x83B1,0x983C,0x96F7,0x6D1B,0x7D61,0x843D,0x916A,0x4E71, -0x5375,0x5D50,0x6B04,0x6FEB,0x85CD,0x862D,0x89A7,0x5229, -0x540F,0x5C65,0x674E,0x68A8,0x7406,0x7483}; - -/* page 38 0x4E21-0x4E7E */ -static uint16 tab_jisx0208_uni38[]={ -0x75E2,0x88CF,0x88E1,0x91CC,0x96E2,0x9678,0x5F8B,0x7387, -0x7ACB,0x844E,0x63A0,0x7565,0x5289,0x6D41,0x6E9C,0x7409, -0x7559,0x786B,0x7C92,0x9686,0x7ADC,0x9F8D,0x4FB6,0x616E, -0x65C5,0x865C,0x4E86,0x4EAE,0x50DA,0x4E21,0x51CC,0x5BEE, -0x6599,0x6881,0x6DBC,0x731F,0x7642,0x77AD,0x7A1C,0x7CE7, -0x826F,0x8AD2,0x907C,0x91CF,0x9675,0x9818,0x529B,0x7DD1, -0x502B,0x5398,0x6797,0x6DCB,0x71D0,0x7433,0x81E8,0x8F2A, -0x96A3,0x9C57,0x9E9F,0x7460,0x5841,0x6D99,0x7D2F,0x985E, -0x4EE4,0x4F36,0x4F8B,0x51B7,0x52B1,0x5DBA,0x601C,0x73B2, -0x793C,0x82D3,0x9234,0x96B7,0x96F6,0x970A,0x9E97,0x9F62, -0x66A6,0x6B74,0x5217,0x52A3,0x70C8,0x88C2,0x5EC9,0x604B, -0x6190,0x6F23,0x7149,0x7C3E,0x7DF4,0x806F}; - -/* page 39 0x4F21-0x4F53 */ -static uint16 tab_jisx0208_uni39[]={ -0x84EE,0x9023,0x932C,0x5442,0x9B6F,0x6AD3,0x7089,0x8CC2, -0x8DEF,0x9732,0x52B4,0x5A41,0x5ECA,0x5F04,0x6717,0x697C, -0x6994,0x6D6A,0x6F0F,0x7262,0x72FC,0x7BED,0x8001,0x807E, -0x874B,0x90CE,0x516D,0x9E93,0x7984,0x808B,0x9332,0x8AD6, -0x502D,0x548C,0x8A71,0x6B6A,0x8CC4,0x8107,0x60D1,0x67A0, -0x9DF2,0x4E99,0x4E98,0x9C10,0x8A6B,0x85C1,0x8568,0x6900, -0x6E7E,0x7897,0x8155}; - -/* page 40 0x5021-0x507E */ -static uint16 tab_jisx0208_uni40[]={ -0x5F0C,0x4E10,0x4E15,0x4E2A,0x4E31,0x4E36,0x4E3C,0x4E3F, -0x4E42,0x4E56,0x4E58,0x4E82,0x4E85,0x8C6B,0x4E8A,0x8212, -0x5F0D,0x4E8E,0x4E9E,0x4E9F,0x4EA0,0x4EA2,0x4EB0,0x4EB3, -0x4EB6,0x4ECE,0x4ECD,0x4EC4,0x4EC6,0x4EC2,0x4ED7,0x4EDE, -0x4EED,0x4EDF,0x4EF7,0x4F09,0x4F5A,0x4F30,0x4F5B,0x4F5D, -0x4F57,0x4F47,0x4F76,0x4F88,0x4F8F,0x4F98,0x4F7B,0x4F69, -0x4F70,0x4F91,0x4F6F,0x4F86,0x4F96,0x5118,0x4FD4,0x4FDF, -0x4FCE,0x4FD8,0x4FDB,0x4FD1,0x4FDA,0x4FD0,0x4FE4,0x4FE5, -0x501A,0x5028,0x5014,0x502A,0x5025,0x5005,0x4F1C,0x4FF6, -0x5021,0x5029,0x502C,0x4FFE,0x4FEF,0x5011,0x5006,0x5043, -0x5047,0x6703,0x5055,0x5050,0x5048,0x505A,0x5056,0x506C, -0x5078,0x5080,0x509A,0x5085,0x50B4,0x50B2}; - -/* page 41 0x5121-0x517E */ -static uint16 tab_jisx0208_uni41[]={ -0x50C9,0x50CA,0x50B3,0x50C2,0x50D6,0x50DE,0x50E5,0x50ED, -0x50E3,0x50EE,0x50F9,0x50F5,0x5109,0x5101,0x5102,0x5116, -0x5115,0x5114,0x511A,0x5121,0x513A,0x5137,0x513C,0x513B, -0x513F,0x5140,0x5152,0x514C,0x5154,0x5162,0x7AF8,0x5169, -0x516A,0x516E,0x5180,0x5182,0x56D8,0x518C,0x5189,0x518F, -0x5191,0x5193,0x5195,0x5196,0x51A4,0x51A6,0x51A2,0x51A9, -0x51AA,0x51AB,0x51B3,0x51B1,0x51B2,0x51B0,0x51B5,0x51BD, -0x51C5,0x51C9,0x51DB,0x51E0,0x8655,0x51E9,0x51ED,0x51F0, -0x51F5,0x51FE,0x5204,0x520B,0x5214,0x520E,0x5227,0x522A, -0x522E,0x5233,0x5239,0x524F,0x5244,0x524B,0x524C,0x525E, -0x5254,0x526A,0x5274,0x5269,0x5273,0x527F,0x527D,0x528D, -0x5294,0x5292,0x5271,0x5288,0x5291,0x8FA8}; - -/* page 42 0x5221-0x527E */ -static uint16 tab_jisx0208_uni42[]={ -0x8FA7,0x52AC,0x52AD,0x52BC,0x52B5,0x52C1,0x52CD,0x52D7, -0x52DE,0x52E3,0x52E6,0x98ED,0x52E0,0x52F3,0x52F5,0x52F8, -0x52F9,0x5306,0x5308,0x7538,0x530D,0x5310,0x530F,0x5315, -0x531A,0x5323,0x532F,0x5331,0x5333,0x5338,0x5340,0x5346, -0x5345,0x4E17,0x5349,0x534D,0x51D6,0x535E,0x5369,0x536E, -0x5918,0x537B,0x5377,0x5382,0x5396,0x53A0,0x53A6,0x53A5, -0x53AE,0x53B0,0x53B6,0x53C3,0x7C12,0x96D9,0x53DF,0x66FC, -0x71EE,0x53EE,0x53E8,0x53ED,0x53FA,0x5401,0x543D,0x5440, -0x542C,0x542D,0x543C,0x542E,0x5436,0x5429,0x541D,0x544E, -0x548F,0x5475,0x548E,0x545F,0x5471,0x5477,0x5470,0x5492, -0x547B,0x5480,0x5476,0x5484,0x5490,0x5486,0x54C7,0x54A2, -0x54B8,0x54A5,0x54AC,0x54C4,0x54C8,0x54A8}; - -/* page 43 0x5321-0x537E */ -static uint16 tab_jisx0208_uni43[]={ -0x54AB,0x54C2,0x54A4,0x54BE,0x54BC,0x54D8,0x54E5,0x54E6, -0x550F,0x5514,0x54FD,0x54EE,0x54ED,0x54FA,0x54E2,0x5539, -0x5540,0x5563,0x554C,0x552E,0x555C,0x5545,0x5556,0x5557, -0x5538,0x5533,0x555D,0x5599,0x5580,0x54AF,0x558A,0x559F, -0x557B,0x557E,0x5598,0x559E,0x55AE,0x557C,0x5583,0x55A9, -0x5587,0x55A8,0x55DA,0x55C5,0x55DF,0x55C4,0x55DC,0x55E4, -0x55D4,0x5614,0x55F7,0x5616,0x55FE,0x55FD,0x561B,0x55F9, -0x564E,0x5650,0x71DF,0x5634,0x5636,0x5632,0x5638,0x566B, -0x5664,0x562F,0x566C,0x566A,0x5686,0x5680,0x568A,0x56A0, -0x5694,0x568F,0x56A5,0x56AE,0x56B6,0x56B4,0x56C2,0x56BC, -0x56C1,0x56C3,0x56C0,0x56C8,0x56CE,0x56D1,0x56D3,0x56D7, -0x56EE,0x56F9,0x5700,0x56FF,0x5704,0x5709}; - -/* page 44 0x5421-0x547E */ -static uint16 tab_jisx0208_uni44[]={ -0x5708,0x570B,0x570D,0x5713,0x5718,0x5716,0x55C7,0x571C, -0x5726,0x5737,0x5738,0x574E,0x573B,0x5740,0x574F,0x5769, -0x57C0,0x5788,0x5761,0x577F,0x5789,0x5793,0x57A0,0x57B3, -0x57A4,0x57AA,0x57B0,0x57C3,0x57C6,0x57D4,0x57D2,0x57D3, -0x580A,0x57D6,0x57E3,0x580B,0x5819,0x581D,0x5872,0x5821, -0x5862,0x584B,0x5870,0x6BC0,0x5852,0x583D,0x5879,0x5885, -0x58B9,0x589F,0x58AB,0x58BA,0x58DE,0x58BB,0x58B8,0x58AE, -0x58C5,0x58D3,0x58D1,0x58D7,0x58D9,0x58D8,0x58E5,0x58DC, -0x58E4,0x58DF,0x58EF,0x58FA,0x58F9,0x58FB,0x58FC,0x58FD, -0x5902,0x590A,0x5910,0x591B,0x68A6,0x5925,0x592C,0x592D, -0x5932,0x5938,0x593E,0x7AD2,0x5955,0x5950,0x594E,0x595A, -0x5958,0x5962,0x5960,0x5967,0x596C,0x5969}; - -/* page 45 0x5521-0x557E */ -static uint16 tab_jisx0208_uni45[]={ -0x5978,0x5981,0x599D,0x4F5E,0x4FAB,0x59A3,0x59B2,0x59C6, -0x59E8,0x59DC,0x598D,0x59D9,0x59DA,0x5A25,0x5A1F,0x5A11, -0x5A1C,0x5A09,0x5A1A,0x5A40,0x5A6C,0x5A49,0x5A35,0x5A36, -0x5A62,0x5A6A,0x5A9A,0x5ABC,0x5ABE,0x5ACB,0x5AC2,0x5ABD, -0x5AE3,0x5AD7,0x5AE6,0x5AE9,0x5AD6,0x5AFA,0x5AFB,0x5B0C, -0x5B0B,0x5B16,0x5B32,0x5AD0,0x5B2A,0x5B36,0x5B3E,0x5B43, -0x5B45,0x5B40,0x5B51,0x5B55,0x5B5A,0x5B5B,0x5B65,0x5B69, -0x5B70,0x5B73,0x5B75,0x5B78,0x6588,0x5B7A,0x5B80,0x5B83, -0x5BA6,0x5BB8,0x5BC3,0x5BC7,0x5BC9,0x5BD4,0x5BD0,0x5BE4, -0x5BE6,0x5BE2,0x5BDE,0x5BE5,0x5BEB,0x5BF0,0x5BF6,0x5BF3, -0x5C05,0x5C07,0x5C08,0x5C0D,0x5C13,0x5C20,0x5C22,0x5C28, -0x5C38,0x5C39,0x5C41,0x5C46,0x5C4E,0x5C53}; - -/* page 46 0x5621-0x567E */ -static uint16 tab_jisx0208_uni46[]={ -0x5C50,0x5C4F,0x5B71,0x5C6C,0x5C6E,0x4E62,0x5C76,0x5C79, -0x5C8C,0x5C91,0x5C94,0x599B,0x5CAB,0x5CBB,0x5CB6,0x5CBC, -0x5CB7,0x5CC5,0x5CBE,0x5CC7,0x5CD9,0x5CE9,0x5CFD,0x5CFA, -0x5CED,0x5D8C,0x5CEA,0x5D0B,0x5D15,0x5D17,0x5D5C,0x5D1F, -0x5D1B,0x5D11,0x5D14,0x5D22,0x5D1A,0x5D19,0x5D18,0x5D4C, -0x5D52,0x5D4E,0x5D4B,0x5D6C,0x5D73,0x5D76,0x5D87,0x5D84, -0x5D82,0x5DA2,0x5D9D,0x5DAC,0x5DAE,0x5DBD,0x5D90,0x5DB7, -0x5DBC,0x5DC9,0x5DCD,0x5DD3,0x5DD2,0x5DD6,0x5DDB,0x5DEB, -0x5DF2,0x5DF5,0x5E0B,0x5E1A,0x5E19,0x5E11,0x5E1B,0x5E36, -0x5E37,0x5E44,0x5E43,0x5E40,0x5E4E,0x5E57,0x5E54,0x5E5F, -0x5E62,0x5E64,0x5E47,0x5E75,0x5E76,0x5E7A,0x9EBC,0x5E7F, -0x5EA0,0x5EC1,0x5EC2,0x5EC8,0x5ED0,0x5ECF}; - -/* page 47 0x5721-0x577E */ -static uint16 tab_jisx0208_uni47[]={ -0x5ED6,0x5EE3,0x5EDD,0x5EDA,0x5EDB,0x5EE2,0x5EE1,0x5EE8, -0x5EE9,0x5EEC,0x5EF1,0x5EF3,0x5EF0,0x5EF4,0x5EF8,0x5EFE, -0x5F03,0x5F09,0x5F5D,0x5F5C,0x5F0B,0x5F11,0x5F16,0x5F29, -0x5F2D,0x5F38,0x5F41,0x5F48,0x5F4C,0x5F4E,0x5F2F,0x5F51, -0x5F56,0x5F57,0x5F59,0x5F61,0x5F6D,0x5F73,0x5F77,0x5F83, -0x5F82,0x5F7F,0x5F8A,0x5F88,0x5F91,0x5F87,0x5F9E,0x5F99, -0x5F98,0x5FA0,0x5FA8,0x5FAD,0x5FBC,0x5FD6,0x5FFB,0x5FE4, -0x5FF8,0x5FF1,0x5FDD,0x60B3,0x5FFF,0x6021,0x6060,0x6019, -0x6010,0x6029,0x600E,0x6031,0x601B,0x6015,0x602B,0x6026, -0x600F,0x603A,0x605A,0x6041,0x606A,0x6077,0x605F,0x604A, -0x6046,0x604D,0x6063,0x6043,0x6064,0x6042,0x606C,0x606B, -0x6059,0x6081,0x608D,0x60E7,0x6083,0x609A}; - -/* page 48 0x5821-0x587E */ -static uint16 tab_jisx0208_uni48[]={ -0x6084,0x609B,0x6096,0x6097,0x6092,0x60A7,0x608B,0x60E1, -0x60B8,0x60E0,0x60D3,0x60B4,0x5FF0,0x60BD,0x60C6,0x60B5, -0x60D8,0x614D,0x6115,0x6106,0x60F6,0x60F7,0x6100,0x60F4, -0x60FA,0x6103,0x6121,0x60FB,0x60F1,0x610D,0x610E,0x6147, -0x613E,0x6128,0x6127,0x614A,0x613F,0x613C,0x612C,0x6134, -0x613D,0x6142,0x6144,0x6173,0x6177,0x6158,0x6159,0x615A, -0x616B,0x6174,0x616F,0x6165,0x6171,0x615F,0x615D,0x6153, -0x6175,0x6199,0x6196,0x6187,0x61AC,0x6194,0x619A,0x618A, -0x6191,0x61AB,0x61AE,0x61CC,0x61CA,0x61C9,0x61F7,0x61C8, -0x61C3,0x61C6,0x61BA,0x61CB,0x7F79,0x61CD,0x61E6,0x61E3, -0x61F6,0x61FA,0x61F4,0x61FF,0x61FD,0x61FC,0x61FE,0x6200, -0x6208,0x6209,0x620D,0x620C,0x6214,0x621B}; - -/* page 49 0x5921-0x597E */ -static uint16 tab_jisx0208_uni49[]={ -0x621E,0x6221,0x622A,0x622E,0x6230,0x6232,0x6233,0x6241, -0x624E,0x625E,0x6263,0x625B,0x6260,0x6268,0x627C,0x6282, -0x6289,0x627E,0x6292,0x6293,0x6296,0x62D4,0x6283,0x6294, -0x62D7,0x62D1,0x62BB,0x62CF,0x62FF,0x62C6,0x64D4,0x62C8, -0x62DC,0x62CC,0x62CA,0x62C2,0x62C7,0x629B,0x62C9,0x630C, -0x62EE,0x62F1,0x6327,0x6302,0x6308,0x62EF,0x62F5,0x6350, -0x633E,0x634D,0x641C,0x634F,0x6396,0x638E,0x6380,0x63AB, -0x6376,0x63A3,0x638F,0x6389,0x639F,0x63B5,0x636B,0x6369, -0x63BE,0x63E9,0x63C0,0x63C6,0x63E3,0x63C9,0x63D2,0x63F6, -0x63C4,0x6416,0x6434,0x6406,0x6413,0x6426,0x6436,0x651D, -0x6417,0x6428,0x640F,0x6467,0x646F,0x6476,0x644E,0x652A, -0x6495,0x6493,0x64A5,0x64A9,0x6488,0x64BC}; - -/* page 50 0x5A21-0x5A7E */ -static uint16 tab_jisx0208_uni50[]={ -0x64DA,0x64D2,0x64C5,0x64C7,0x64BB,0x64D8,0x64C2,0x64F1, -0x64E7,0x8209,0x64E0,0x64E1,0x62AC,0x64E3,0x64EF,0x652C, -0x64F6,0x64F4,0x64F2,0x64FA,0x6500,0x64FD,0x6518,0x651C, -0x6505,0x6524,0x6523,0x652B,0x6534,0x6535,0x6537,0x6536, -0x6538,0x754B,0x6548,0x6556,0x6555,0x654D,0x6558,0x655E, -0x655D,0x6572,0x6578,0x6582,0x6583,0x8B8A,0x659B,0x659F, -0x65AB,0x65B7,0x65C3,0x65C6,0x65C1,0x65C4,0x65CC,0x65D2, -0x65DB,0x65D9,0x65E0,0x65E1,0x65F1,0x6772,0x660A,0x6603, -0x65FB,0x6773,0x6635,0x6636,0x6634,0x661C,0x664F,0x6644, -0x6649,0x6641,0x665E,0x665D,0x6664,0x6667,0x6668,0x665F, -0x6662,0x6670,0x6683,0x6688,0x668E,0x6689,0x6684,0x6698, -0x669D,0x66C1,0x66B9,0x66C9,0x66BE,0x66BC}; - -/* page 51 0x5B21-0x5B7E */ -static uint16 tab_jisx0208_uni51[]={ -0x66C4,0x66B8,0x66D6,0x66DA,0x66E0,0x663F,0x66E6,0x66E9, -0x66F0,0x66F5,0x66F7,0x670F,0x6716,0x671E,0x6726,0x6727, -0x9738,0x672E,0x673F,0x6736,0x6741,0x6738,0x6737,0x6746, -0x675E,0x6760,0x6759,0x6763,0x6764,0x6789,0x6770,0x67A9, -0x677C,0x676A,0x678C,0x678B,0x67A6,0x67A1,0x6785,0x67B7, -0x67EF,0x67B4,0x67EC,0x67B3,0x67E9,0x67B8,0x67E4,0x67DE, -0x67DD,0x67E2,0x67EE,0x67B9,0x67CE,0x67C6,0x67E7,0x6A9C, -0x681E,0x6846,0x6829,0x6840,0x684D,0x6832,0x684E,0x68B3, -0x682B,0x6859,0x6863,0x6877,0x687F,0x689F,0x688F,0x68AD, -0x6894,0x689D,0x689B,0x6883,0x6AAE,0x68B9,0x6874,0x68B5, -0x68A0,0x68BA,0x690F,0x688D,0x687E,0x6901,0x68CA,0x6908, -0x68D8,0x6922,0x6926,0x68E1,0x690C,0x68CD}; - -/* page 52 0x5C21-0x5C7E */ -static uint16 tab_jisx0208_uni52[]={ -0x68D4,0x68E7,0x68D5,0x6936,0x6912,0x6904,0x68D7,0x68E3, -0x6925,0x68F9,0x68E0,0x68EF,0x6928,0x692A,0x691A,0x6923, -0x6921,0x68C6,0x6979,0x6977,0x695C,0x6978,0x696B,0x6954, -0x697E,0x696E,0x6939,0x6974,0x693D,0x6959,0x6930,0x6961, -0x695E,0x695D,0x6981,0x696A,0x69B2,0x69AE,0x69D0,0x69BF, -0x69C1,0x69D3,0x69BE,0x69CE,0x5BE8,0x69CA,0x69DD,0x69BB, -0x69C3,0x69A7,0x6A2E,0x6991,0x69A0,0x699C,0x6995,0x69B4, -0x69DE,0x69E8,0x6A02,0x6A1B,0x69FF,0x6B0A,0x69F9,0x69F2, -0x69E7,0x6A05,0x69B1,0x6A1E,0x69ED,0x6A14,0x69EB,0x6A0A, -0x6A12,0x6AC1,0x6A23,0x6A13,0x6A44,0x6A0C,0x6A72,0x6A36, -0x6A78,0x6A47,0x6A62,0x6A59,0x6A66,0x6A48,0x6A38,0x6A22, -0x6A90,0x6A8D,0x6AA0,0x6A84,0x6AA2,0x6AA3}; - -/* page 53 0x5D21-0x5D7E */ -static uint16 tab_jisx0208_uni53[]={ -0x6A97,0x8617,0x6ABB,0x6AC3,0x6AC2,0x6AB8,0x6AB3,0x6AAC, -0x6ADE,0x6AD1,0x6ADF,0x6AAA,0x6ADA,0x6AEA,0x6AFB,0x6B05, -0x8616,0x6AFA,0x6B12,0x6B16,0x9B31,0x6B1F,0x6B38,0x6B37, -0x76DC,0x6B39,0x98EE,0x6B47,0x6B43,0x6B49,0x6B50,0x6B59, -0x6B54,0x6B5B,0x6B5F,0x6B61,0x6B78,0x6B79,0x6B7F,0x6B80, -0x6B84,0x6B83,0x6B8D,0x6B98,0x6B95,0x6B9E,0x6BA4,0x6BAA, -0x6BAB,0x6BAF,0x6BB2,0x6BB1,0x6BB3,0x6BB7,0x6BBC,0x6BC6, -0x6BCB,0x6BD3,0x6BDF,0x6BEC,0x6BEB,0x6BF3,0x6BEF,0x9EBE, -0x6C08,0x6C13,0x6C14,0x6C1B,0x6C24,0x6C23,0x6C5E,0x6C55, -0x6C62,0x6C6A,0x6C82,0x6C8D,0x6C9A,0x6C81,0x6C9B,0x6C7E, -0x6C68,0x6C73,0x6C92,0x6C90,0x6CC4,0x6CF1,0x6CD3,0x6CBD, -0x6CD7,0x6CC5,0x6CDD,0x6CAE,0x6CB1,0x6CBE}; - -/* page 54 0x5E21-0x5E7E */ -static uint16 tab_jisx0208_uni54[]={ -0x6CBA,0x6CDB,0x6CEF,0x6CD9,0x6CEA,0x6D1F,0x884D,0x6D36, -0x6D2B,0x6D3D,0x6D38,0x6D19,0x6D35,0x6D33,0x6D12,0x6D0C, -0x6D63,0x6D93,0x6D64,0x6D5A,0x6D79,0x6D59,0x6D8E,0x6D95, -0x6FE4,0x6D85,0x6DF9,0x6E15,0x6E0A,0x6DB5,0x6DC7,0x6DE6, -0x6DB8,0x6DC6,0x6DEC,0x6DDE,0x6DCC,0x6DE8,0x6DD2,0x6DC5, -0x6DFA,0x6DD9,0x6DE4,0x6DD5,0x6DEA,0x6DEE,0x6E2D,0x6E6E, -0x6E2E,0x6E19,0x6E72,0x6E5F,0x6E3E,0x6E23,0x6E6B,0x6E2B, -0x6E76,0x6E4D,0x6E1F,0x6E43,0x6E3A,0x6E4E,0x6E24,0x6EFF, -0x6E1D,0x6E38,0x6E82,0x6EAA,0x6E98,0x6EC9,0x6EB7,0x6ED3, -0x6EBD,0x6EAF,0x6EC4,0x6EB2,0x6ED4,0x6ED5,0x6E8F,0x6EA5, -0x6EC2,0x6E9F,0x6F41,0x6F11,0x704C,0x6EEC,0x6EF8,0x6EFE, -0x6F3F,0x6EF2,0x6F31,0x6EEF,0x6F32,0x6ECC}; - -/* page 55 0x5F21-0x5F7E */ -static uint16 tab_jisx0208_uni55[]={ -0x6F3E,0x6F13,0x6EF7,0x6F86,0x6F7A,0x6F78,0x6F81,0x6F80, -0x6F6F,0x6F5B,0x6FF3,0x6F6D,0x6F82,0x6F7C,0x6F58,0x6F8E, -0x6F91,0x6FC2,0x6F66,0x6FB3,0x6FA3,0x6FA1,0x6FA4,0x6FB9, -0x6FC6,0x6FAA,0x6FDF,0x6FD5,0x6FEC,0x6FD4,0x6FD8,0x6FF1, -0x6FEE,0x6FDB,0x7009,0x700B,0x6FFA,0x7011,0x7001,0x700F, -0x6FFE,0x701B,0x701A,0x6F74,0x701D,0x7018,0x701F,0x7030, -0x703E,0x7032,0x7051,0x7063,0x7099,0x7092,0x70AF,0x70F1, -0x70AC,0x70B8,0x70B3,0x70AE,0x70DF,0x70CB,0x70DD,0x70D9, -0x7109,0x70FD,0x711C,0x7119,0x7165,0x7155,0x7188,0x7166, -0x7162,0x714C,0x7156,0x716C,0x718F,0x71FB,0x7184,0x7195, -0x71A8,0x71AC,0x71D7,0x71B9,0x71BE,0x71D2,0x71C9,0x71D4, -0x71CE,0x71E0,0x71EC,0x71E7,0x71F5,0x71FC}; - -/* page 56 0x6021-0x607E */ -static uint16 tab_jisx0208_uni56[]={ -0x71F9,0x71FF,0x720D,0x7210,0x721B,0x7228,0x722D,0x722C, -0x7230,0x7232,0x723B,0x723C,0x723F,0x7240,0x7246,0x724B, -0x7258,0x7274,0x727E,0x7282,0x7281,0x7287,0x7292,0x7296, -0x72A2,0x72A7,0x72B9,0x72B2,0x72C3,0x72C6,0x72C4,0x72CE, -0x72D2,0x72E2,0x72E0,0x72E1,0x72F9,0x72F7,0x500F,0x7317, -0x730A,0x731C,0x7316,0x731D,0x7334,0x732F,0x7329,0x7325, -0x733E,0x734E,0x734F,0x9ED8,0x7357,0x736A,0x7368,0x7370, -0x7378,0x7375,0x737B,0x737A,0x73C8,0x73B3,0x73CE,0x73BB, -0x73C0,0x73E5,0x73EE,0x73DE,0x74A2,0x7405,0x746F,0x7425, -0x73F8,0x7432,0x743A,0x7455,0x743F,0x745F,0x7459,0x7441, -0x745C,0x7469,0x7470,0x7463,0x746A,0x7476,0x747E,0x748B, -0x749E,0x74A7,0x74CA,0x74CF,0x74D4,0x73F1}; - -/* page 57 0x6121-0x617E */ -static uint16 tab_jisx0208_uni57[]={ -0x74E0,0x74E3,0x74E7,0x74E9,0x74EE,0x74F2,0x74F0,0x74F1, -0x74F8,0x74F7,0x7504,0x7503,0x7505,0x750C,0x750E,0x750D, -0x7515,0x7513,0x751E,0x7526,0x752C,0x753C,0x7544,0x754D, -0x754A,0x7549,0x755B,0x7546,0x755A,0x7569,0x7564,0x7567, -0x756B,0x756D,0x7578,0x7576,0x7586,0x7587,0x7574,0x758A, -0x7589,0x7582,0x7594,0x759A,0x759D,0x75A5,0x75A3,0x75C2, -0x75B3,0x75C3,0x75B5,0x75BD,0x75B8,0x75BC,0x75B1,0x75CD, -0x75CA,0x75D2,0x75D9,0x75E3,0x75DE,0x75FE,0x75FF,0x75FC, -0x7601,0x75F0,0x75FA,0x75F2,0x75F3,0x760B,0x760D,0x7609, -0x761F,0x7627,0x7620,0x7621,0x7622,0x7624,0x7634,0x7630, -0x763B,0x7647,0x7648,0x7646,0x765C,0x7658,0x7661,0x7662, -0x7668,0x7669,0x766A,0x7667,0x766C,0x7670}; - -/* page 58 0x6221-0x627E */ -static uint16 tab_jisx0208_uni58[]={ -0x7672,0x7676,0x7678,0x767C,0x7680,0x7683,0x7688,0x768B, -0x768E,0x7696,0x7693,0x7699,0x769A,0x76B0,0x76B4,0x76B8, -0x76B9,0x76BA,0x76C2,0x76CD,0x76D6,0x76D2,0x76DE,0x76E1, -0x76E5,0x76E7,0x76EA,0x862F,0x76FB,0x7708,0x7707,0x7704, -0x7729,0x7724,0x771E,0x7725,0x7726,0x771B,0x7737,0x7738, -0x7747,0x775A,0x7768,0x776B,0x775B,0x7765,0x777F,0x777E, -0x7779,0x778E,0x778B,0x7791,0x77A0,0x779E,0x77B0,0x77B6, -0x77B9,0x77BF,0x77BC,0x77BD,0x77BB,0x77C7,0x77CD,0x77D7, -0x77DA,0x77DC,0x77E3,0x77EE,0x77FC,0x780C,0x7812,0x7926, -0x7820,0x792A,0x7845,0x788E,0x7874,0x7886,0x787C,0x789A, -0x788C,0x78A3,0x78B5,0x78AA,0x78AF,0x78D1,0x78C6,0x78CB, -0x78D4,0x78BE,0x78BC,0x78C5,0x78CA,0x78EC}; - -/* page 59 0x6321-0x637E */ -static uint16 tab_jisx0208_uni59[]={ -0x78E7,0x78DA,0x78FD,0x78F4,0x7907,0x7912,0x7911,0x7919, -0x792C,0x792B,0x7940,0x7960,0x7957,0x795F,0x795A,0x7955, -0x7953,0x797A,0x797F,0x798A,0x799D,0x79A7,0x9F4B,0x79AA, -0x79AE,0x79B3,0x79B9,0x79BA,0x79C9,0x79D5,0x79E7,0x79EC, -0x79E1,0x79E3,0x7A08,0x7A0D,0x7A18,0x7A19,0x7A20,0x7A1F, -0x7980,0x7A31,0x7A3B,0x7A3E,0x7A37,0x7A43,0x7A57,0x7A49, -0x7A61,0x7A62,0x7A69,0x9F9D,0x7A70,0x7A79,0x7A7D,0x7A88, -0x7A97,0x7A95,0x7A98,0x7A96,0x7AA9,0x7AC8,0x7AB0,0x7AB6, -0x7AC5,0x7AC4,0x7ABF,0x9083,0x7AC7,0x7ACA,0x7ACD,0x7ACF, -0x7AD5,0x7AD3,0x7AD9,0x7ADA,0x7ADD,0x7AE1,0x7AE2,0x7AE6, -0x7AED,0x7AF0,0x7B02,0x7B0F,0x7B0A,0x7B06,0x7B33,0x7B18, -0x7B19,0x7B1E,0x7B35,0x7B28,0x7B36,0x7B50}; - -/* page 60 0x6421-0x647E */ -static uint16 tab_jisx0208_uni60[]={ -0x7B7A,0x7B04,0x7B4D,0x7B0B,0x7B4C,0x7B45,0x7B75,0x7B65, -0x7B74,0x7B67,0x7B70,0x7B71,0x7B6C,0x7B6E,0x7B9D,0x7B98, -0x7B9F,0x7B8D,0x7B9C,0x7B9A,0x7B8B,0x7B92,0x7B8F,0x7B5D, -0x7B99,0x7BCB,0x7BC1,0x7BCC,0x7BCF,0x7BB4,0x7BC6,0x7BDD, -0x7BE9,0x7C11,0x7C14,0x7BE6,0x7BE5,0x7C60,0x7C00,0x7C07, -0x7C13,0x7BF3,0x7BF7,0x7C17,0x7C0D,0x7BF6,0x7C23,0x7C27, -0x7C2A,0x7C1F,0x7C37,0x7C2B,0x7C3D,0x7C4C,0x7C43,0x7C54, -0x7C4F,0x7C40,0x7C50,0x7C58,0x7C5F,0x7C64,0x7C56,0x7C65, -0x7C6C,0x7C75,0x7C83,0x7C90,0x7CA4,0x7CAD,0x7CA2,0x7CAB, -0x7CA1,0x7CA8,0x7CB3,0x7CB2,0x7CB1,0x7CAE,0x7CB9,0x7CBD, -0x7CC0,0x7CC5,0x7CC2,0x7CD8,0x7CD2,0x7CDC,0x7CE2,0x9B3B, -0x7CEF,0x7CF2,0x7CF4,0x7CF6,0x7CFA,0x7D06}; - -/* page 61 0x6521-0x657E */ -static uint16 tab_jisx0208_uni61[]={ -0x7D02,0x7D1C,0x7D15,0x7D0A,0x7D45,0x7D4B,0x7D2E,0x7D32, -0x7D3F,0x7D35,0x7D46,0x7D73,0x7D56,0x7D4E,0x7D72,0x7D68, -0x7D6E,0x7D4F,0x7D63,0x7D93,0x7D89,0x7D5B,0x7D8F,0x7D7D, -0x7D9B,0x7DBA,0x7DAE,0x7DA3,0x7DB5,0x7DC7,0x7DBD,0x7DAB, -0x7E3D,0x7DA2,0x7DAF,0x7DDC,0x7DB8,0x7D9F,0x7DB0,0x7DD8, -0x7DDD,0x7DE4,0x7DDE,0x7DFB,0x7DF2,0x7DE1,0x7E05,0x7E0A, -0x7E23,0x7E21,0x7E12,0x7E31,0x7E1F,0x7E09,0x7E0B,0x7E22, -0x7E46,0x7E66,0x7E3B,0x7E35,0x7E39,0x7E43,0x7E37,0x7E32, -0x7E3A,0x7E67,0x7E5D,0x7E56,0x7E5E,0x7E59,0x7E5A,0x7E79, -0x7E6A,0x7E69,0x7E7C,0x7E7B,0x7E83,0x7DD5,0x7E7D,0x8FAE, -0x7E7F,0x7E88,0x7E89,0x7E8C,0x7E92,0x7E90,0x7E93,0x7E94, -0x7E96,0x7E8E,0x7E9B,0x7E9C,0x7F38,0x7F3A}; - -/* page 62 0x6621-0x667E */ -static uint16 tab_jisx0208_uni62[]={ -0x7F45,0x7F4C,0x7F4D,0x7F4E,0x7F50,0x7F51,0x7F55,0x7F54, -0x7F58,0x7F5F,0x7F60,0x7F68,0x7F69,0x7F67,0x7F78,0x7F82, -0x7F86,0x7F83,0x7F88,0x7F87,0x7F8C,0x7F94,0x7F9E,0x7F9D, -0x7F9A,0x7FA3,0x7FAF,0x7FB2,0x7FB9,0x7FAE,0x7FB6,0x7FB8, -0x8B71,0x7FC5,0x7FC6,0x7FCA,0x7FD5,0x7FD4,0x7FE1,0x7FE6, -0x7FE9,0x7FF3,0x7FF9,0x98DC,0x8006,0x8004,0x800B,0x8012, -0x8018,0x8019,0x801C,0x8021,0x8028,0x803F,0x803B,0x804A, -0x8046,0x8052,0x8058,0x805A,0x805F,0x8062,0x8068,0x8073, -0x8072,0x8070,0x8076,0x8079,0x807D,0x807F,0x8084,0x8086, -0x8085,0x809B,0x8093,0x809A,0x80AD,0x5190,0x80AC,0x80DB, -0x80E5,0x80D9,0x80DD,0x80C4,0x80DA,0x80D6,0x8109,0x80EF, -0x80F1,0x811B,0x8129,0x8123,0x812F,0x814B}; - -/* page 63 0x6721-0x677E */ -static uint16 tab_jisx0208_uni63[]={ -0x968B,0x8146,0x813E,0x8153,0x8151,0x80FC,0x8171,0x816E, -0x8165,0x8166,0x8174,0x8183,0x8188,0x818A,0x8180,0x8182, -0x81A0,0x8195,0x81A4,0x81A3,0x815F,0x8193,0x81A9,0x81B0, -0x81B5,0x81BE,0x81B8,0x81BD,0x81C0,0x81C2,0x81BA,0x81C9, -0x81CD,0x81D1,0x81D9,0x81D8,0x81C8,0x81DA,0x81DF,0x81E0, -0x81E7,0x81FA,0x81FB,0x81FE,0x8201,0x8202,0x8205,0x8207, -0x820A,0x820D,0x8210,0x8216,0x8229,0x822B,0x8238,0x8233, -0x8240,0x8259,0x8258,0x825D,0x825A,0x825F,0x8264,0x8262, -0x8268,0x826A,0x826B,0x822E,0x8271,0x8277,0x8278,0x827E, -0x828D,0x8292,0x82AB,0x829F,0x82BB,0x82AC,0x82E1,0x82E3, -0x82DF,0x82D2,0x82F4,0x82F3,0x82FA,0x8393,0x8303,0x82FB, -0x82F9,0x82DE,0x8306,0x82DC,0x8309,0x82D9}; - -/* page 64 0x6821-0x687E */ -static uint16 tab_jisx0208_uni64[]={ -0x8335,0x8334,0x8316,0x8332,0x8331,0x8340,0x8339,0x8350, -0x8345,0x832F,0x832B,0x8317,0x8318,0x8385,0x839A,0x83AA, -0x839F,0x83A2,0x8396,0x8323,0x838E,0x8387,0x838A,0x837C, -0x83B5,0x8373,0x8375,0x83A0,0x8389,0x83A8,0x83F4,0x8413, -0x83EB,0x83CE,0x83FD,0x8403,0x83D8,0x840B,0x83C1,0x83F7, -0x8407,0x83E0,0x83F2,0x840D,0x8422,0x8420,0x83BD,0x8438, -0x8506,0x83FB,0x846D,0x842A,0x843C,0x855A,0x8484,0x8477, -0x846B,0x84AD,0x846E,0x8482,0x8469,0x8446,0x842C,0x846F, -0x8479,0x8435,0x84CA,0x8462,0x84B9,0x84BF,0x849F,0x84D9, -0x84CD,0x84BB,0x84DA,0x84D0,0x84C1,0x84C6,0x84D6,0x84A1, -0x8521,0x84FF,0x84F4,0x8517,0x8518,0x852C,0x851F,0x8515, -0x8514,0x84FC,0x8540,0x8563,0x8558,0x8548}; - -/* page 65 0x6921-0x697E */ -static uint16 tab_jisx0208_uni65[]={ -0x8541,0x8602,0x854B,0x8555,0x8580,0x85A4,0x8588,0x8591, -0x858A,0x85A8,0x856D,0x8594,0x859B,0x85EA,0x8587,0x859C, -0x8577,0x857E,0x8590,0x85C9,0x85BA,0x85CF,0x85B9,0x85D0, -0x85D5,0x85DD,0x85E5,0x85DC,0x85F9,0x860A,0x8613,0x860B, -0x85FE,0x85FA,0x8606,0x8622,0x861A,0x8630,0x863F,0x864D, -0x4E55,0x8654,0x865F,0x8667,0x8671,0x8693,0x86A3,0x86A9, -0x86AA,0x868B,0x868C,0x86B6,0x86AF,0x86C4,0x86C6,0x86B0, -0x86C9,0x8823,0x86AB,0x86D4,0x86DE,0x86E9,0x86EC,0x86DF, -0x86DB,0x86EF,0x8712,0x8706,0x8708,0x8700,0x8703,0x86FB, -0x8711,0x8709,0x870D,0x86F9,0x870A,0x8734,0x873F,0x8737, -0x873B,0x8725,0x8729,0x871A,0x8760,0x875F,0x8778,0x874C, -0x874E,0x8774,0x8757,0x8768,0x876E,0x8759}; - -/* page 66 0x6A21-0x6A7E */ -static uint16 tab_jisx0208_uni66[]={ -0x8753,0x8763,0x876A,0x8805,0x87A2,0x879F,0x8782,0x87AF, -0x87CB,0x87BD,0x87C0,0x87D0,0x96D6,0x87AB,0x87C4,0x87B3, -0x87C7,0x87C6,0x87BB,0x87EF,0x87F2,0x87E0,0x880F,0x880D, -0x87FE,0x87F6,0x87F7,0x880E,0x87D2,0x8811,0x8816,0x8815, -0x8822,0x8821,0x8831,0x8836,0x8839,0x8827,0x883B,0x8844, -0x8842,0x8852,0x8859,0x885E,0x8862,0x886B,0x8881,0x887E, -0x889E,0x8875,0x887D,0x88B5,0x8872,0x8882,0x8897,0x8892, -0x88AE,0x8899,0x88A2,0x888D,0x88A4,0x88B0,0x88BF,0x88B1, -0x88C3,0x88C4,0x88D4,0x88D8,0x88D9,0x88DD,0x88F9,0x8902, -0x88FC,0x88F4,0x88E8,0x88F2,0x8904,0x890C,0x890A,0x8913, -0x8943,0x891E,0x8925,0x892A,0x892B,0x8941,0x8944,0x893B, -0x8936,0x8938,0x894C,0x891D,0x8960,0x895E}; - -/* page 67 0x6B21-0x6B7E */ -static uint16 tab_jisx0208_uni67[]={ -0x8966,0x8964,0x896D,0x896A,0x896F,0x8974,0x8977,0x897E, -0x8983,0x8988,0x898A,0x8993,0x8998,0x89A1,0x89A9,0x89A6, -0x89AC,0x89AF,0x89B2,0x89BA,0x89BD,0x89BF,0x89C0,0x89DA, -0x89DC,0x89DD,0x89E7,0x89F4,0x89F8,0x8A03,0x8A16,0x8A10, -0x8A0C,0x8A1B,0x8A1D,0x8A25,0x8A36,0x8A41,0x8A5B,0x8A52, -0x8A46,0x8A48,0x8A7C,0x8A6D,0x8A6C,0x8A62,0x8A85,0x8A82, -0x8A84,0x8AA8,0x8AA1,0x8A91,0x8AA5,0x8AA6,0x8A9A,0x8AA3, -0x8AC4,0x8ACD,0x8AC2,0x8ADA,0x8AEB,0x8AF3,0x8AE7,0x8AE4, -0x8AF1,0x8B14,0x8AE0,0x8AE2,0x8AF7,0x8ADE,0x8ADB,0x8B0C, -0x8B07,0x8B1A,0x8AE1,0x8B16,0x8B10,0x8B17,0x8B20,0x8B33, -0x97AB,0x8B26,0x8B2B,0x8B3E,0x8B28,0x8B41,0x8B4C,0x8B4F, -0x8B4E,0x8B49,0x8B56,0x8B5B,0x8B5A,0x8B6B}; - -/* page 68 0x6C21-0x6C7E */ -static uint16 tab_jisx0208_uni68[]={ -0x8B5F,0x8B6C,0x8B6F,0x8B74,0x8B7D,0x8B80,0x8B8C,0x8B8E, -0x8B92,0x8B93,0x8B96,0x8B99,0x8B9A,0x8C3A,0x8C41,0x8C3F, -0x8C48,0x8C4C,0x8C4E,0x8C50,0x8C55,0x8C62,0x8C6C,0x8C78, -0x8C7A,0x8C82,0x8C89,0x8C85,0x8C8A,0x8C8D,0x8C8E,0x8C94, -0x8C7C,0x8C98,0x621D,0x8CAD,0x8CAA,0x8CBD,0x8CB2,0x8CB3, -0x8CAE,0x8CB6,0x8CC8,0x8CC1,0x8CE4,0x8CE3,0x8CDA,0x8CFD, -0x8CFA,0x8CFB,0x8D04,0x8D05,0x8D0A,0x8D07,0x8D0F,0x8D0D, -0x8D10,0x9F4E,0x8D13,0x8CCD,0x8D14,0x8D16,0x8D67,0x8D6D, -0x8D71,0x8D73,0x8D81,0x8D99,0x8DC2,0x8DBE,0x8DBA,0x8DCF, -0x8DDA,0x8DD6,0x8DCC,0x8DDB,0x8DCB,0x8DEA,0x8DEB,0x8DDF, -0x8DE3,0x8DFC,0x8E08,0x8E09,0x8DFF,0x8E1D,0x8E1E,0x8E10, -0x8E1F,0x8E42,0x8E35,0x8E30,0x8E34,0x8E4A}; - -/* page 69 0x6D21-0x6D7E */ -static uint16 tab_jisx0208_uni69[]={ -0x8E47,0x8E49,0x8E4C,0x8E50,0x8E48,0x8E59,0x8E64,0x8E60, -0x8E2A,0x8E63,0x8E55,0x8E76,0x8E72,0x8E7C,0x8E81,0x8E87, -0x8E85,0x8E84,0x8E8B,0x8E8A,0x8E93,0x8E91,0x8E94,0x8E99, -0x8EAA,0x8EA1,0x8EAC,0x8EB0,0x8EC6,0x8EB1,0x8EBE,0x8EC5, -0x8EC8,0x8ECB,0x8EDB,0x8EE3,0x8EFC,0x8EFB,0x8EEB,0x8EFE, -0x8F0A,0x8F05,0x8F15,0x8F12,0x8F19,0x8F13,0x8F1C,0x8F1F, -0x8F1B,0x8F0C,0x8F26,0x8F33,0x8F3B,0x8F39,0x8F45,0x8F42, -0x8F3E,0x8F4C,0x8F49,0x8F46,0x8F4E,0x8F57,0x8F5C,0x8F62, -0x8F63,0x8F64,0x8F9C,0x8F9F,0x8FA3,0x8FAD,0x8FAF,0x8FB7, -0x8FDA,0x8FE5,0x8FE2,0x8FEA,0x8FEF,0x9087,0x8FF4,0x9005, -0x8FF9,0x8FFA,0x9011,0x9015,0x9021,0x900D,0x901E,0x9016, -0x900B,0x9027,0x9036,0x9035,0x9039,0x8FF8}; - -/* page 70 0x6E21-0x6E7E */ -static uint16 tab_jisx0208_uni70[]={ -0x904F,0x9050,0x9051,0x9052,0x900E,0x9049,0x903E,0x9056, -0x9058,0x905E,0x9068,0x906F,0x9076,0x96A8,0x9072,0x9082, -0x907D,0x9081,0x9080,0x908A,0x9089,0x908F,0x90A8,0x90AF, -0x90B1,0x90B5,0x90E2,0x90E4,0x6248,0x90DB,0x9102,0x9112, -0x9119,0x9132,0x9130,0x914A,0x9156,0x9158,0x9163,0x9165, -0x9169,0x9173,0x9172,0x918B,0x9189,0x9182,0x91A2,0x91AB, -0x91AF,0x91AA,0x91B5,0x91B4,0x91BA,0x91C0,0x91C1,0x91C9, -0x91CB,0x91D0,0x91D6,0x91DF,0x91E1,0x91DB,0x91FC,0x91F5, -0x91F6,0x921E,0x91FF,0x9214,0x922C,0x9215,0x9211,0x925E, -0x9257,0x9245,0x9249,0x9264,0x9248,0x9295,0x923F,0x924B, -0x9250,0x929C,0x9296,0x9293,0x929B,0x925A,0x92CF,0x92B9, -0x92B7,0x92E9,0x930F,0x92FA,0x9344,0x932E}; - -/* page 71 0x6F21-0x6F7E */ -static uint16 tab_jisx0208_uni71[]={ -0x9319,0x9322,0x931A,0x9323,0x933A,0x9335,0x933B,0x935C, -0x9360,0x937C,0x936E,0x9356,0x93B0,0x93AC,0x93AD,0x9394, -0x93B9,0x93D6,0x93D7,0x93E8,0x93E5,0x93D8,0x93C3,0x93DD, -0x93D0,0x93C8,0x93E4,0x941A,0x9414,0x9413,0x9403,0x9407, -0x9410,0x9436,0x942B,0x9435,0x9421,0x943A,0x9441,0x9452, -0x9444,0x945B,0x9460,0x9462,0x945E,0x946A,0x9229,0x9470, -0x9475,0x9477,0x947D,0x945A,0x947C,0x947E,0x9481,0x947F, -0x9582,0x9587,0x958A,0x9594,0x9596,0x9598,0x9599,0x95A0, -0x95A8,0x95A7,0x95AD,0x95BC,0x95BB,0x95B9,0x95BE,0x95CA, -0x6FF6,0x95C3,0x95CD,0x95CC,0x95D5,0x95D4,0x95D6,0x95DC, -0x95E1,0x95E5,0x95E2,0x9621,0x9628,0x962E,0x962F,0x9642, -0x964C,0x964F,0x964B,0x9677,0x965C,0x965E}; - -/* page 72 0x7021-0x707E */ -static uint16 tab_jisx0208_uni72[]={ -0x965D,0x965F,0x9666,0x9672,0x966C,0x968D,0x9698,0x9695, -0x9697,0x96AA,0x96A7,0x96B1,0x96B2,0x96B0,0x96B4,0x96B6, -0x96B8,0x96B9,0x96CE,0x96CB,0x96C9,0x96CD,0x894D,0x96DC, -0x970D,0x96D5,0x96F9,0x9704,0x9706,0x9708,0x9713,0x970E, -0x9711,0x970F,0x9716,0x9719,0x9724,0x972A,0x9730,0x9739, -0x973D,0x973E,0x9744,0x9746,0x9748,0x9742,0x9749,0x975C, -0x9760,0x9764,0x9766,0x9768,0x52D2,0x976B,0x9771,0x9779, -0x9785,0x977C,0x9781,0x977A,0x9786,0x978B,0x978F,0x9790, -0x979C,0x97A8,0x97A6,0x97A3,0x97B3,0x97B4,0x97C3,0x97C6, -0x97C8,0x97CB,0x97DC,0x97ED,0x9F4F,0x97F2,0x7ADF,0x97F6, -0x97F5,0x980F,0x980C,0x9838,0x9824,0x9821,0x9837,0x983D, -0x9846,0x984F,0x984B,0x986B,0x986F,0x9870}; - -/* page 73 0x7121-0x717E */ -static uint16 tab_jisx0208_uni73[]={ -0x9871,0x9874,0x9873,0x98AA,0x98AF,0x98B1,0x98B6,0x98C4, -0x98C3,0x98C6,0x98E9,0x98EB,0x9903,0x9909,0x9912,0x9914, -0x9918,0x9921,0x991D,0x991E,0x9924,0x9920,0x992C,0x992E, -0x993D,0x993E,0x9942,0x9949,0x9945,0x9950,0x994B,0x9951, -0x9952,0x994C,0x9955,0x9997,0x9998,0x99A5,0x99AD,0x99AE, -0x99BC,0x99DF,0x99DB,0x99DD,0x99D8,0x99D1,0x99ED,0x99EE, -0x99F1,0x99F2,0x99FB,0x99F8,0x9A01,0x9A0F,0x9A05,0x99E2, -0x9A19,0x9A2B,0x9A37,0x9A45,0x9A42,0x9A40,0x9A43,0x9A3E, -0x9A55,0x9A4D,0x9A5B,0x9A57,0x9A5F,0x9A62,0x9A65,0x9A64, -0x9A69,0x9A6B,0x9A6A,0x9AAD,0x9AB0,0x9ABC,0x9AC0,0x9ACF, -0x9AD1,0x9AD3,0x9AD4,0x9ADE,0x9ADF,0x9AE2,0x9AE3,0x9AE6, -0x9AEF,0x9AEB,0x9AEE,0x9AF4,0x9AF1,0x9AF7}; - -/* page 74 0x7221-0x727E */ -static uint16 tab_jisx0208_uni74[]={ -0x9AFB,0x9B06,0x9B18,0x9B1A,0x9B1F,0x9B22,0x9B23,0x9B25, -0x9B27,0x9B28,0x9B29,0x9B2A,0x9B2E,0x9B2F,0x9B32,0x9B44, -0x9B43,0x9B4F,0x9B4D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07,0x9F08, -0x76B7,0x9F15,0x9F21,0x9F2C,0x9F3E,0x9F4A,0x9F52,0x9F54, -0x9F63,0x9F5F,0x9F60,0x9F61,0x9F66,0x9F67,0x9F6C,0x9F6A, -0x9F77,0x9F72,0x9F76,0x9F95,0x9F9C,0x9FA0}; - -/* page 76 0x7421-0x7426 */ -static uint16 tab_jisx0208_uni76[]={ -0x582F,0x69C7,0x9059,0x7464,0x51DC,0x7199}; - -/* page 77 0x2D21 - 0x2D7C */ -static uint16 tab_nec13_uni0[]={ -0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467, -0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F, -0x2470,0x2471,0x2472,0x2473,0x2160,0x2161,0x2162,0x2163, -0x2164,0x2165,0x2166,0x2167,0x2168,0x2169, 0,0x3349, -0x3314,0x3322,0x334D,0x3318,0x3327,0x3303,0x3336,0x3351, -0x3357,0x330D,0x3326,0x3323,0x332B,0x334A,0x333B,0x339C, -0x339D,0x339E,0x338E,0x338F,0x33C4,0x33A1, 0, 0, - 0, 0, 0, 0, 0, 0,0x337B,0x301D, -0x301F,0x2116,0x33CD,0x2121,0x32A4,0x32A5,0x32A6,0x32A7, -0x32A8,0x3231,0x3232,0x3239,0x337E,0x337D,0x337C,0x2252, -0x2261,0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220,0x221F, -0x22BF,0x2235,0x2229,0x222A}; - -static int -my_jisx0208_uni_onechar(int code){ - if ((code>=0x2121)&&(code<=0x217E)) - return(tab_jisx0208_uni0[code-0x2121]); - if ((code>=0x2221)&&(code<=0x227E)) - return(tab_jisx0208_uni1[code-0x2221]); - if ((code>=0x2330)&&(code<=0x237A)) - return(tab_jisx0208_uni2[code-0x2330]); - if ((code>=0x2421)&&(code<=0x2473)) - return(tab_jisx0208_uni3[code-0x2421]); - if ((code>=0x2521)&&(code<=0x2576)) - return(tab_jisx0208_uni4[code-0x2521]); - if ((code>=0x2621)&&(code<=0x2658)) - return(tab_jisx0208_uni5[code-0x2621]); - if ((code>=0x2721)&&(code<=0x2771)) - return(tab_jisx0208_uni6[code-0x2721]); - if ((code>=0x2821)&&(code<=0x2840)) - return(tab_jisx0208_uni7[code-0x2821]); - if ((code>=0x3021)&&(code<=0x307E)) - return(tab_jisx0208_uni8[code-0x3021]); - if ((code>=0x3121)&&(code<=0x317E)) - return(tab_jisx0208_uni9[code-0x3121]); - if ((code>=0x3221)&&(code<=0x327E)) - return(tab_jisx0208_uni10[code-0x3221]); - if ((code>=0x3321)&&(code<=0x337E)) - return(tab_jisx0208_uni11[code-0x3321]); - if ((code>=0x3421)&&(code<=0x347E)) - return(tab_jisx0208_uni12[code-0x3421]); - if ((code>=0x3521)&&(code<=0x357E)) - return(tab_jisx0208_uni13[code-0x3521]); - if ((code>=0x3621)&&(code<=0x367E)) - return(tab_jisx0208_uni14[code-0x3621]); - if ((code>=0x3721)&&(code<=0x377E)) - return(tab_jisx0208_uni15[code-0x3721]); - if ((code>=0x3821)&&(code<=0x387E)) - return(tab_jisx0208_uni16[code-0x3821]); - if ((code>=0x3921)&&(code<=0x397E)) - return(tab_jisx0208_uni17[code-0x3921]); - if ((code>=0x3A21)&&(code<=0x3A7E)) - return(tab_jisx0208_uni18[code-0x3A21]); - if ((code>=0x3B21)&&(code<=0x3B7E)) - return(tab_jisx0208_uni19[code-0x3B21]); - if ((code>=0x3C21)&&(code<=0x3C7E)) - return(tab_jisx0208_uni20[code-0x3C21]); - if ((code>=0x3D21)&&(code<=0x3D7E)) - return(tab_jisx0208_uni21[code-0x3D21]); - if ((code>=0x3E21)&&(code<=0x3E7E)) - return(tab_jisx0208_uni22[code-0x3E21]); - if ((code>=0x3F21)&&(code<=0x3F7E)) - return(tab_jisx0208_uni23[code-0x3F21]); - if ((code>=0x4021)&&(code<=0x407E)) - return(tab_jisx0208_uni24[code-0x4021]); - if ((code>=0x4121)&&(code<=0x417E)) - return(tab_jisx0208_uni25[code-0x4121]); - if ((code>=0x4221)&&(code<=0x427E)) - return(tab_jisx0208_uni26[code-0x4221]); - if ((code>=0x4321)&&(code<=0x437E)) - return(tab_jisx0208_uni27[code-0x4321]); - if ((code>=0x4421)&&(code<=0x447E)) - return(tab_jisx0208_uni28[code-0x4421]); - if ((code>=0x4521)&&(code<=0x457E)) - return(tab_jisx0208_uni29[code-0x4521]); - if ((code>=0x4621)&&(code<=0x467E)) - return(tab_jisx0208_uni30[code-0x4621]); - if ((code>=0x4721)&&(code<=0x477E)) - return(tab_jisx0208_uni31[code-0x4721]); - if ((code>=0x4821)&&(code<=0x487E)) - return(tab_jisx0208_uni32[code-0x4821]); - if ((code>=0x4921)&&(code<=0x497E)) - return(tab_jisx0208_uni33[code-0x4921]); - if ((code>=0x4A21)&&(code<=0x4A7E)) - return(tab_jisx0208_uni34[code-0x4A21]); - if ((code>=0x4B21)&&(code<=0x4B7E)) - return(tab_jisx0208_uni35[code-0x4B21]); - if ((code>=0x4C21)&&(code<=0x4C7E)) - return(tab_jisx0208_uni36[code-0x4C21]); - if ((code>=0x4D21)&&(code<=0x4D7E)) - return(tab_jisx0208_uni37[code-0x4D21]); - if ((code>=0x4E21)&&(code<=0x4E7E)) - return(tab_jisx0208_uni38[code-0x4E21]); - if ((code>=0x4F21)&&(code<=0x4F53)) - return(tab_jisx0208_uni39[code-0x4F21]); - if ((code>=0x5021)&&(code<=0x507E)) - return(tab_jisx0208_uni40[code-0x5021]); - if ((code>=0x5121)&&(code<=0x517E)) - return(tab_jisx0208_uni41[code-0x5121]); - if ((code>=0x5221)&&(code<=0x527E)) - return(tab_jisx0208_uni42[code-0x5221]); - if ((code>=0x5321)&&(code<=0x537E)) - return(tab_jisx0208_uni43[code-0x5321]); - if ((code>=0x5421)&&(code<=0x547E)) - return(tab_jisx0208_uni44[code-0x5421]); - if ((code>=0x5521)&&(code<=0x557E)) - return(tab_jisx0208_uni45[code-0x5521]); - if ((code>=0x5621)&&(code<=0x567E)) - return(tab_jisx0208_uni46[code-0x5621]); - if ((code>=0x5721)&&(code<=0x577E)) - return(tab_jisx0208_uni47[code-0x5721]); - if ((code>=0x5821)&&(code<=0x587E)) - return(tab_jisx0208_uni48[code-0x5821]); - if ((code>=0x5921)&&(code<=0x597E)) - return(tab_jisx0208_uni49[code-0x5921]); - if ((code>=0x5A21)&&(code<=0x5A7E)) - return(tab_jisx0208_uni50[code-0x5A21]); - if ((code>=0x5B21)&&(code<=0x5B7E)) - return(tab_jisx0208_uni51[code-0x5B21]); - if ((code>=0x5C21)&&(code<=0x5C7E)) - return(tab_jisx0208_uni52[code-0x5C21]); - if ((code>=0x5D21)&&(code<=0x5D7E)) - return(tab_jisx0208_uni53[code-0x5D21]); - if ((code>=0x5E21)&&(code<=0x5E7E)) - return(tab_jisx0208_uni54[code-0x5E21]); - if ((code>=0x5F21)&&(code<=0x5F7E)) - return(tab_jisx0208_uni55[code-0x5F21]); - if ((code>=0x6021)&&(code<=0x607E)) - return(tab_jisx0208_uni56[code-0x6021]); - if ((code>=0x6121)&&(code<=0x617E)) - return(tab_jisx0208_uni57[code-0x6121]); - if ((code>=0x6221)&&(code<=0x627E)) - return(tab_jisx0208_uni58[code-0x6221]); - if ((code>=0x6321)&&(code<=0x637E)) - return(tab_jisx0208_uni59[code-0x6321]); - if ((code>=0x6421)&&(code<=0x647E)) - return(tab_jisx0208_uni60[code-0x6421]); - if ((code>=0x6521)&&(code<=0x657E)) - return(tab_jisx0208_uni61[code-0x6521]); - if ((code>=0x6621)&&(code<=0x667E)) - return(tab_jisx0208_uni62[code-0x6621]); - if ((code>=0x6721)&&(code<=0x677E)) - return(tab_jisx0208_uni63[code-0x6721]); - if ((code>=0x6821)&&(code<=0x687E)) - return(tab_jisx0208_uni64[code-0x6821]); - if ((code>=0x6921)&&(code<=0x697E)) - return(tab_jisx0208_uni65[code-0x6921]); - if ((code>=0x6A21)&&(code<=0x6A7E)) - return(tab_jisx0208_uni66[code-0x6A21]); - if ((code>=0x6B21)&&(code<=0x6B7E)) - return(tab_jisx0208_uni67[code-0x6B21]); - if ((code>=0x6C21)&&(code<=0x6C7E)) - return(tab_jisx0208_uni68[code-0x6C21]); - if ((code>=0x6D21)&&(code<=0x6D7E)) - return(tab_jisx0208_uni69[code-0x6D21]); - if ((code>=0x6E21)&&(code<=0x6E7E)) - return(tab_jisx0208_uni70[code-0x6E21]); - if ((code>=0x6F21)&&(code<=0x6F7E)) - return(tab_jisx0208_uni71[code-0x6F21]); - if ((code>=0x7021)&&(code<=0x707E)) - return(tab_jisx0208_uni72[code-0x7021]); - if ((code>=0x7121)&&(code<=0x717E)) - return(tab_jisx0208_uni73[code-0x7121]); - if ((code>=0x7221)&&(code<=0x727E)) - return(tab_jisx0208_uni74[code-0x7221]); - if ((code>=0x7321)&&(code<=0x737E)) - return(tab_jisx0208_uni75[code-0x7321]); - if ((code>=0x7421)&&(code<=0x7426)) - return(tab_jisx0208_uni76[code-0x7421]); - if ((code>=0x2D21)&&(code<=0x2D7C)) - return(tab_nec13_uni0[code-0x2D21]); - return(0); -} - -/* page 0 0x005C-0x005C */ -static uint16 tab_uni_jisx02080[]={ -0x5C}; - -/* page 1 0x00A2-0x00B6 */ -static uint16 tab_uni_jisx02081[]={ - 0, 0, 0, 0, 0,0x2178,0x212F, 0, - 0, 0, 0, 0, 0, 0,0x216B,0x215E, - 0, 0,0x212D, 0,0x2279}; - -/* page 2 0x00D7-0x00D7 */ -static uint16 tab_uni_jisx02082[]={ -0x215F}; - -/* page 3 0x00F7-0x00F7 */ -static uint16 tab_uni_jisx02083[]={ -0x2160}; - -/* page 4 0x0391-0x03C9 */ -static uint16 tab_uni_jisx02084[]={ -0x2621,0x2622,0x2623,0x2624,0x2625,0x2626,0x2627,0x2628, -0x2629,0x262A,0x262B,0x262C,0x262D,0x262E,0x262F,0x2630, -0x2631, 0,0x2632,0x2633,0x2634,0x2635,0x2636,0x2637, -0x2638, 0, 0, 0, 0, 0, 0, 0, -0x2641,0x2642,0x2643,0x2644,0x2645,0x2646,0x2647,0x2648, -0x2649,0x264A,0x264B,0x264C,0x264D,0x264E,0x264F,0x2650, -0x2651, 0,0x2652,0x2653,0x2654,0x2655,0x2656,0x2657, -0x2658}; - -/* page 5 0x0401-0x0451 */ -static uint16 tab_uni_jisx02085[]={ -0x2727, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x2721, -0x2722,0x2723,0x2724,0x2725,0x2726,0x2728,0x2729,0x272A, -0x272B,0x272C,0x272D,0x272E,0x272F,0x2730,0x2731,0x2732, -0x2733,0x2734,0x2735,0x2736,0x2737,0x2738,0x2739,0x273A, -0x273B,0x273C,0x273D,0x273E,0x273F,0x2740,0x2741,0x2751, -0x2752,0x2753,0x2754,0x2755,0x2756,0x2758,0x2759,0x275A, -0x275B,0x275C,0x275D,0x275E,0x275F,0x2760,0x2761,0x2762, -0x2763,0x2764,0x2765,0x2766,0x2767,0x2768,0x2769,0x276A, -0x276B,0x276C,0x276D,0x276E,0x276F,0x2770,0x2771, 0, -0x2757}; - -/* page 6 0x2010-0x203B */ -static uint16 tab_uni_jisx02086[]={ -0x213E, 0, 0, 0, 0,0x213D, 0, 0, -0x2146,0x2147, 0, 0,0x2148,0x2149, 0, 0, -0x2277,0x2278, 0, 0, 0,0x2145,0x2144, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2273, 0,0x216C,0x216D, 0, 0, 0, 0, - 0, 0, 0,0x2228}; - -/* page 7 0x2100-0x2116 */ -static uint16 tab_uni_jisx02087[]={ - 0, 0, 0,0x216E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x2D62}; - -/* page 8 0x2120-0x212B */ -static uint16 tab_uni_jisx02088[]={ - 0,0x2D64, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x2272}; - -/* page 9 0x2160-0x2169 */ -static uint16 tab_uni_jisx02089[]={ -0x2D35,0x2D36,0x2D37,0x2D38,0x2D39,0x2D3A,0x2D3B,0x2D3C, -0x2D3D,0x2D3E}; - -/* page 10 0x2190-0x2193 */ -static uint16 tab_uni_jisx020810[]={ -0x222B,0x222C,0x222A,0x222D}; - -/* page 11 0x21D2-0x21D4 */ -static uint16 tab_uni_jisx020811[]={ -0x224D, 0,0x224E}; - -/* page 12 0x2200-0x223D */ -static uint16 tab_uni_jisx020812[]={ -0x224F, 0,0x225F,0x2250, 0, 0, 0,0x2260, -0x223A, 0, 0,0x223B, 0, 0, 0, 0, - 0,0x2D74, 0, 0, 0, 0, 0, 0, - 0, 0,0x2265, 0, 0,0x2267,0x2167,0x2D78, -0x225C, 0, 0, 0, 0,0x2142, 0,0x224A, -0x224B,0x2241,0x2240,0x2269,0x226A, 0,0x2D73, 0, - 0, 0, 0, 0,0x2168,0x2268, 0, 0, - 0, 0, 0, 0, 0,0x2266}; - -/* page 13 0x2252-0x226B */ -static uint16 tab_uni_jisx020813[]={ -0x2262, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x2162,0x2261, - 0, 0, 0, 0,0x2165,0x2166, 0, 0, -0x2263,0x2264}; - -/* page 14 0x2282-0x2287 */ -static uint16 tab_uni_jisx020814[]={ -0x223E,0x223F, 0, 0,0x223C,0x223D}; - -/* page 15 0x22A0-0x22BF */ -static uint16 tab_uni_jisx020815[]={ - 0, 0, 0, 0, 0,0x225D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x2D79}; - -/* page 16 0x2312-0x2312 */ -static uint16 tab_uni_jisx020816[]={ -0x225E}; - -/* page 17 0x2460-0x2473 */ -static uint16 tab_uni_jisx020817[]={ -0x2D21,0x2D22,0x2D23,0x2D24,0x2D25,0x2D26,0x2D27,0x2D28, -0x2D29,0x2D2A,0x2D2B,0x2D2C,0x2D2D,0x2D2E,0x2D2F,0x2D30, -0x2D31,0x2D32,0x2D33,0x2D34}; - -/* page 18 0x2500-0x254B */ -static uint16 tab_uni_jisx020818[]={ -0x2821,0x282C,0x2822,0x282D, 0, 0, 0, 0, - 0, 0, 0, 0,0x2823, 0, 0,0x282E, -0x2824, 0, 0,0x282F,0x2826, 0, 0,0x2831, -0x2825, 0, 0,0x2830,0x2827,0x283C, 0, 0, -0x2837, 0, 0,0x2832,0x2829,0x283E, 0, 0, -0x2839, 0, 0,0x2834,0x2828, 0, 0,0x2838, -0x283D, 0, 0,0x2833,0x282A, 0, 0,0x283A, -0x283F, 0, 0,0x2835,0x282B, 0, 0,0x283B, - 0, 0,0x2840, 0, 0, 0, 0, 0, - 0, 0, 0,0x2836}; - -/* page 19 0x25A0-0x25CF */ -static uint16 tab_uni_jisx020819[]={ -0x2223,0x2222, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x2225,0x2224, 0, 0, 0, 0, - 0, 0, 0, 0,0x2227,0x2226, 0, 0, - 0, 0, 0, 0, 0, 0,0x2221,0x217E, - 0, 0, 0,0x217B, 0, 0,0x217D,0x217C -}; - -/* page 20 0x25EF-0x25EF */ -static uint16 tab_uni_jisx020820[]={ -0x227E}; - -/* page 21 0x2605-0x2606 */ -static uint16 tab_uni_jisx020821[]={ -0x217A,0x2179}; - -/* page 22 0x2640-0x2642 */ -static uint16 tab_uni_jisx020822[]={ -0x216A, 0,0x2169}; - -/* page 23 0x266A-0x266F */ -static uint16 tab_uni_jisx020823[]={ -0x2276, 0, 0,0x2275, 0,0x2274}; - -/* page 24 0x3000-0x301F */ -static uint16 tab_uni_jisx020824[]={ -0x2121,0x2122,0x2123,0x2137, 0,0x2139,0x213A,0x213B, -0x2152,0x2153,0x2154,0x2155,0x2156,0x2157,0x2158,0x2159, -0x215A,0x215B,0x2229,0x222E,0x214C,0x214D, 0, 0, - 0, 0, 0, 0, 0,0x2D60, 0,0x2D61}; - -/* page 25 0x3041-0x30FE */ -static uint16 tab_uni_jisx020825[]={ -0x2421,0x2422,0x2423,0x2424,0x2425,0x2426,0x2427,0x2428, -0x2429,0x242A,0x242B,0x242C,0x242D,0x242E,0x242F,0x2430, -0x2431,0x2432,0x2433,0x2434,0x2435,0x2436,0x2437,0x2438, -0x2439,0x243A,0x243B,0x243C,0x243D,0x243E,0x243F,0x2440, -0x2441,0x2442,0x2443,0x2444,0x2445,0x2446,0x2447,0x2448, -0x2449,0x244A,0x244B,0x244C,0x244D,0x244E,0x244F,0x2450, -0x2451,0x2452,0x2453,0x2454,0x2455,0x2456,0x2457,0x2458, -0x2459,0x245A,0x245B,0x245C,0x245D,0x245E,0x245F,0x2460, -0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468, -0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,0x2470, -0x2471,0x2472,0x2473, 0, 0, 0, 0, 0, - 0, 0,0x212B,0x212C,0x2135,0x2136, 0, 0, -0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528, -0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530, -0x2531,0x2532,0x2533,0x2534,0x2535,0x2536,0x2537,0x2538, -0x2539,0x253A,0x253B,0x253C,0x253D,0x253E,0x253F,0x2540, -0x2541,0x2542,0x2543,0x2544,0x2545,0x2546,0x2547,0x2548, -0x2549,0x254A,0x254B,0x254C,0x254D,0x254E,0x254F,0x2550, -0x2551,0x2552,0x2553,0x2554,0x2555,0x2556,0x2557,0x2558, -0x2559,0x255A,0x255B,0x255C,0x255D,0x255E,0x255F,0x2560, -0x2561,0x2562,0x2563,0x2564,0x2565,0x2566,0x2567,0x2568, -0x2569,0x256A,0x256B,0x256C,0x256D,0x256E,0x256F,0x2570, -0x2571,0x2572,0x2573,0x2574,0x2575,0x2576, 0, 0, - 0, 0,0x2126,0x213C,0x2133,0x2134}; - -/* page 26 0x3230-0x3239 */ -static uint16 tab_uni_jisx020826[]={ - 0,0x2D6A,0x2D6B, 0, 0, 0, 0, 0, - 0,0x2D6C}; - -/* page 27 0x32A0-0x32A8 */ -static uint16 tab_uni_jisx020827[]={ - 0, 0, 0, 0,0x2D65,0x2D66,0x2D67,0x2D68, -0x2D69}; - -/* page 28 0x3300-0x33CD */ -static uint16 tab_uni_jisx020828[]={ - 0, 0, 0,0x2D46, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x2D4A, 0, 0, - 0, 0, 0, 0,0x2D41, 0, 0, 0, -0x2D44, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x2D42,0x2D4C, 0, 0,0x2D4B,0x2D45, - 0, 0, 0,0x2D4D, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x2D47, 0, - 0, 0, 0,0x2D4F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x2D40,0x2D4E, 0, 0,0x2D43, 0, 0, - 0,0x2D48, 0, 0, 0, 0, 0,0x2D49, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x2D5F,0x2D6F,0x2D6E,0x2D6D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x2D53,0x2D54, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x2D50,0x2D51,0x2D52, 0, - 0,0x2D56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x2D55, 0, 0, 0, - 0, 0, 0, 0, 0,0x2D63}; - -/* page 29 0x4E00-0x5516 */ -static uint16 tab_uni_jisx020829[]={ -0x306C,0x437A, 0,0x3C37, 0, 0, 0,0x4B7C, -0x3E66,0x3B30,0x3E65,0x323C, 0,0x4954,0x4D3F, 0, -0x5022,0x312F, 0, 0,0x336E,0x5023,0x4024,0x5242, -0x3556,0x4A3A, 0, 0, 0, 0,0x3E67, 0, - 0,0x4E3E, 0, 0, 0, 0,0x4A42, 0, - 0, 0,0x5024, 0, 0,0x4366, 0, 0, - 0,0x5025,0x367A, 0, 0, 0,0x5026, 0, -0x345D,0x4330, 0,0x3C67,0x5027, 0, 0,0x5028, - 0, 0,0x5029,0x4735, 0,0x3557, 0, 0, - 0, 0, 0,0x4737, 0,0x4663,0x3843,0x4B33, - 0, 0, 0, 0, 0,0x6949,0x502A,0x3E68, -0x502B,0x3235, 0, 0, 0,0x3665,0x3870,0x4C69, - 0, 0,0x5626, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4D70, 0,0x467D, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3425, 0, -0x3535, 0,0x502C, 0, 0,0x502D,0x4E3B, 0, -0x4D3D,0x4168,0x502F,0x3B76,0x4673, 0,0x5032, 0, - 0,0x313E,0x385F, 0,0x385E,0x3066, 0, 0, -0x4F4B,0x4F4A, 0,0x3A33,0x3021, 0,0x5033,0x5034, -0x5035,0x4B34,0x5036, 0,0x3872,0x3067,0x4B72, 0, -0x357C, 0, 0,0x357D,0x357E,0x4462,0x4E3C, 0, -0x5037, 0, 0,0x5038, 0, 0,0x5039, 0, - 0, 0,0x3F4D, 0, 0, 0, 0, 0, -0x3D3A,0x3F4E,0x503E, 0,0x503C, 0,0x503D,0x3558, - 0, 0,0x3A23,0x3270, 0,0x503B,0x503A,0x4A29, - 0, 0, 0, 0,0x3B46,0x3B45,0x423E,0x503F, -0x4955,0x4067, 0, 0, 0,0x2138,0x5040,0x5042, - 0, 0, 0,0x4265,0x4E61,0x304A, 0, 0, - 0, 0, 0, 0, 0,0x5041,0x323E, 0, -0x3644, 0,0x4367, 0, 0, 0,0x376F,0x5043, - 0, 0, 0,0x4724, 0, 0, 0, 0, - 0,0x346B, 0, 0, 0, 0, 0, 0, - 0,0x5044,0x304B, 0, 0,0x3860,0x346C,0x497A, -0x4832,0x3559, 0, 0, 0, 0, 0, 0, - 0, 0,0x3271, 0,0x5067,0x4541, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x476C, -0x5046, 0, 0, 0,0x483C, 0,0x4E62, 0, -0x3F2D, 0,0x3B47, 0,0x3B77,0x3240, 0, 0, - 0, 0, 0,0x4451, 0, 0,0x4322,0x504A, - 0, 0, 0, 0, 0,0x304C,0x4463,0x3D3B, -0x3A34,0x4D24, 0,0x424E, 0,0x323F, 0,0x5049, - 0,0x4D3E,0x5045,0x5047,0x3A6E,0x5048,0x5524, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5050, 0, 0, 0, 0, 0,0x5053, -0x5051, 0, 0,0x3242, 0,0x4A3B,0x504B, 0, - 0, 0, 0,0x504F,0x3873, 0, 0,0x3B48, - 0, 0, 0,0x3426, 0, 0,0x5054, 0, -0x504C, 0, 0,0x4E63, 0,0x3B78, 0,0x504D, - 0,0x5052, 0, 0, 0, 0,0x5055, 0, -0x504E, 0, 0,0x3621, 0,0x304D, 0, 0, -0x3622,0x3241, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5525, 0,0x4B79,0x496E,0x3874, - 0, 0, 0, 0, 0,0x3F2F,0x4E37, 0, - 0, 0, 0, 0, 0, 0, 0,0x4A58, - 0, 0,0x3738,0x4225,0x3264, 0, 0, 0, - 0, 0,0x3D53, 0, 0, 0,0x5059, 0, -0x505E,0x505C, 0, 0,0x5057, 0, 0,0x422F, -0x505A, 0,0x505D,0x505B, 0,0x4A5D, 0,0x5058, - 0,0x3F2E, 0,0x4B73,0x505F,0x5060, 0, 0, - 0, 0, 0, 0, 0, 0,0x3D24,0x506D, - 0, 0, 0,0x4750, 0,0x4936,0x5068, 0, -0x4A70, 0,0x3236, 0, 0, 0,0x506C, 0, - 0, 0, 0, 0, 0,0x5066,0x506F, 0, - 0,0x4152, 0,0x3844, 0,0x475C, 0,0x6047, - 0,0x506E,0x455D, 0,0x5063, 0,0x3876, 0, - 0,0x3875,0x5061, 0, 0, 0, 0,0x3C5A, - 0,0x5069, 0,0x4A6F,0x434D,0x5065,0x3771, 0, -0x5062,0x506A,0x5064,0x4E51,0x506B,0x4F41, 0, 0, - 0, 0, 0, 0, 0, 0,0x3666, 0, - 0,0x3770, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5070, 0, 0, 0,0x5071, -0x5075,0x304E, 0, 0, 0, 0, 0,0x4A50, -0x5074, 0, 0, 0, 0,0x5073,0x5077, 0, - 0, 0,0x5076, 0,0x4464, 0, 0, 0, - 0, 0, 0, 0, 0,0x3772, 0, 0, - 0, 0, 0, 0,0x5078, 0, 0, 0, - 0, 0,0x3C45, 0,0x4226,0x4465,0x3676, 0, -0x5079, 0, 0, 0, 0,0x3536, 0, 0, -0x507A, 0, 0, 0, 0,0x507C, 0, 0, - 0, 0, 0, 0, 0,0x4B35, 0, 0, - 0,0x3766, 0, 0, 0, 0, 0, 0, -0x3B31,0x4877,0x507B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3A45,0x4D43, 0, 0, - 0, 0,0x507E,0x5123,0x507D,0x3A44, 0,0x3D7D, - 0, 0, 0, 0, 0, 0,0x3739, 0, - 0, 0,0x5124, 0, 0,0x364F, 0, 0, - 0,0x5121,0x5122, 0, 0,0x462F, 0,0x417C, - 0,0x3623, 0, 0, 0,0x4B4D,0x5125, 0, - 0, 0,0x4E3D, 0, 0, 0,0x5126, 0, - 0, 0, 0,0x5129, 0,0x5127, 0,0x414E, - 0, 0, 0, 0, 0,0x5128,0x512A, 0, - 0, 0, 0, 0, 0,0x512C, 0, 0, - 0,0x512B, 0,0x4A48, 0, 0, 0, 0, -0x3537,0x512E,0x512F, 0,0x322F, 0, 0, 0, - 0,0x512D, 0, 0, 0, 0, 0, 0, - 0, 0,0x3C74, 0,0x5132,0x5131,0x5130, 0, -0x5056, 0,0x5133, 0, 0, 0, 0,0x3D7E, - 0,0x5134, 0, 0, 0, 0, 0, 0, - 0, 0,0x4D25, 0, 0, 0, 0, 0, - 0, 0,0x4C59, 0, 0, 0, 0,0x5136, - 0, 0,0x5135,0x5138,0x5137, 0, 0,0x5139, -0x513A,0x3074, 0,0x3835,0x373B,0x3D3C,0x437B,0x3624, -0x4068,0x3877, 0,0x396E,0x513C,0x4C48,0x4546, 0, -0x3B79, 0,0x513B, 0,0x513D, 0, 0, 0, - 0, 0,0x455E, 0,0x3375, 0, 0, 0, - 0, 0,0x513E, 0, 0,0x467E, 0, 0, -0x4134,0x5140,0x5141,0x482C,0x3878,0x4F3B,0x5142, 0, - 0,0x3626, 0, 0, 0,0x4A3C,0x4236,0x3671, -0x4535, 0, 0, 0,0x3773, 0, 0, 0, -0x5143, 0,0x5144, 0, 0,0x4662,0x315F, 0, - 0,0x5147,0x3A7D, 0,0x5146,0x3A46, 0,0x5148, -0x666E,0x5149,0x4B41,0x514A, 0,0x514B,0x514C,0x3E69, - 0,0x3C4C, 0, 0, 0, 0, 0, 0, -0x3427, 0,0x514F, 0,0x514D,0x4C3D,0x514E, 0, -0x495A,0x5150,0x5151,0x5152,0x455F, 0, 0, 0, -0x5156,0x5154,0x5155,0x5153,0x3A63,0x5157,0x4C6A,0x4E64, - 0, 0, 0, 0, 0,0x5158, 0, 0, - 0, 0, 0, 0,0x4028,0x5159,0x3D5A, 0, - 0,0x515A, 0,0x437C,0x4E3F,0x4560, 0, 0, - 0, 0, 0, 0, 0, 0,0x5245, 0, - 0, 0, 0,0x515B,0x7425,0x3645, 0, 0, -0x515C,0x4B5E, 0, 0, 0, 0,0x3D68,0x427C, - 0,0x515E,0x4664, 0, 0,0x515F, 0, 0, -0x5160,0x332E, 0, 0, 0,0x5161,0x3627, 0, -0x464C,0x317A,0x3D50, 0, 0,0x4821,0x5162, 0, -0x4561, 0, 0,0x3F4F,0x5163, 0,0x4A2C,0x405A, -0x3422, 0,0x3429,0x5164, 0, 0,0x5166, 0, - 0,0x373A, 0, 0,0x5165, 0, 0,0x4E73, - 0, 0, 0, 0, 0,0x3D69, 0, 0, - 0, 0, 0, 0,0x483D,0x4A4C, 0,0x5167, - 0,0x4D78,0x5168, 0, 0, 0,0x5169, 0, -0x457E, 0, 0,0x516A, 0, 0,0x4029,0x3A7E, -0x3774,0x516B,0x3B49,0x396F, 0, 0, 0, 0, - 0, 0, 0,0x4466,0x516D, 0, 0,0x4227, - 0, 0,0x3A6F,0x516E,0x516F,0x4130, 0,0x516C, - 0, 0, 0, 0,0x5171, 0,0x4B36, 0, - 0, 0, 0,0x3964, 0, 0,0x5170, 0, - 0, 0, 0,0x3775,0x3A5E,0x476D, 0, 0, - 0,0x5174,0x5172, 0, 0, 0, 0,0x497B, -0x3E6A,0x517B,0x3364,0x5175,0x5173,0x414F, 0, 0, - 0, 0, 0, 0, 0,0x5177, 0,0x5176, - 0, 0, 0,0x3344, 0, 0, 0,0x3760, -0x517C,0x4E2D, 0, 0, 0,0x5178, 0, 0, - 0,0x517D,0x517A, 0,0x5179, 0, 0, 0, - 0, 0, 0,0x4E4F, 0, 0, 0,0x3879, -0x3243, 0, 0,0x4E74, 0, 0, 0, 0, - 0,0x3D75,0x4558,0x3965,0x5222,0x5223, 0, 0, - 0,0x4E65, 0, 0,0x4F2B,0x5225, 0, 0, - 0,0x387A, 0, 0,0x5224, 0,0x332F, 0, - 0,0x5226, 0,0x4B56, 0,0x443C, 0,0x4D26, - 0,0x4A59, 0, 0, 0,0x5227, 0, 0, - 0, 0,0x7055, 0, 0,0x4630, 0,0x5228, -0x342A,0x4C33, 0, 0, 0,0x3E21,0x5229,0x4A67, -0x522D, 0,0x402A,0x522A,0x3650, 0,0x522B,0x342B, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x372E,0x522E, 0,0x522F, 0, 0, -0x5230,0x5231,0x3C5B, 0, 0, 0,0x387B,0x4C5E, - 0,0x4C68,0x4677, 0, 0,0x4A71,0x5232, 0, -0x5233, 0, 0, 0, 0,0x5235, 0,0x5237, -0x5236, 0, 0, 0, 0,0x5238,0x323D,0x4B4C, - 0,0x3A7C,0x5239, 0, 0,0x4159, 0, 0, -0x3E22,0x3629, 0,0x523A, 0, 0, 0, 0, - 0, 0,0x485B, 0, 0, 0, 0,0x523B, - 0,0x523C, 0,0x523D, 0, 0, 0, 0, -0x523E,0x4924,0x3668,0x3065, 0, 0, 0,0x463F, -0x523F,0x3D3D, 0,0x4069, 0,0x5241,0x5240,0x3E23, -0x3861,0x5243,0x483E, 0, 0,0x5244, 0, 0, - 0,0x485C,0x4234,0x426E,0x3628, 0, 0,0x466E, -0x4331, 0,0x476E, 0,0x4B4E, 0,0x5246, 0, -0x406A, 0, 0, 0, 0, 0,0x3735, 0, - 0,0x5247, 0, 0, 0, 0,0x5248,0x312C, -0x3075,0x346D, 0,0x4228,0x3551,0x4D71, 0,0x524B, -0x3237, 0, 0,0x524A, 0, 0, 0,0x362A, - 0, 0,0x524C, 0,0x4C71, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x524D, 0, -0x4E52, 0,0x387C, 0, 0, 0, 0,0x3836, -0x524E, 0, 0, 0, 0,0x5250,0x524F, 0, -0x3F5F,0x3139, 0, 0, 0,0x315E,0x5251, 0, -0x5252, 0, 0,0x3837, 0, 0,0x5253, 0, - 0, 0, 0,0x356E, 0, 0, 0, 0, - 0, 0,0x3B32,0x5254, 0, 0, 0, 0, -0x4B74,0x3A35,0x355A,0x4D27,0x4150,0x483F,0x3C7D, 0, - 0, 0, 0, 0,0x3D47, 0,0x3C68,0x3C75, - 0,0x3D76, 0,0x4840, 0, 0, 0,0x5257, - 0,0x3143,0x4151,0x387D,0x3845,0x3667, 0, 0, -0x525B,0x4321,0x427E,0x362B,0x3E24,0x525C,0x525A,0x3244, -0x4266,0x3C38,0x3B4B,0x3126, 0, 0,0x3370,0x3966, -0x3B4A, 0,0x525D, 0, 0, 0, 0, 0, - 0,0x525E, 0,0x3549,0x3346, 0, 0, 0, -0x3967,0x3548,0x445F,0x3125,0x4631,0x4C3E,0x3921,0x4D79, -0x4547,0x387E, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x372F, 0,0x5267, 0,0x3663, -0x4B4A, 0, 0, 0, 0, 0,0x485D, 0, - 0,0x5266, 0,0x345E,0x5261,0x5262,0x5264, 0, - 0, 0, 0, 0, 0, 0,0x5265, 0, -0x355B,0x3F61, 0,0x4A2D,0x5263,0x525F,0x3863, 0, -0x5260, 0,0x4F24, 0, 0, 0,0x4A72, 0, -0x4468,0x3862,0x3970, 0, 0, 0,0x5268, 0, - 0,0x465D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x526C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3C7E, 0,0x3C76, 0, 0, 0, 0, 0, -0x526F,0x526D, 0,0x4C23, 0,0x526A,0x5273,0x526E, - 0, 0, 0,0x5271,0x3846,0x4C3F, 0, 0, -0x5272, 0, 0, 0,0x5274, 0,0x5276, 0, - 0, 0, 0,0x3A70,0x4F42, 0,0x526B,0x5269, -0x5275, 0,0x5270, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5278, 0,0x5323,0x527A, 0, 0, -0x527E, 0, 0,0x5321,0x527B, 0, 0,0x533E, - 0, 0,0x3A69,0x3331, 0, 0, 0, 0, -0x5279, 0, 0, 0,0x5325,0x3076,0x5324, 0, -0x3025,0x494A,0x5322, 0,0x527C, 0, 0,0x5277, -0x527D,0x3A48, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5326, 0, 0, 0, 0, 0, 0, 0, - 0,0x3077,0x532F, 0, 0,0x5327,0x5328, 0, -0x3E25,0x4B69, 0, 0, 0,0x532D,0x532C, 0, - 0, 0,0x452F, 0, 0, 0, 0, 0, - 0, 0,0x532E, 0, 0,0x532B, 0, 0, - 0, 0, 0, 0,0x3134, 0,0x3A36,0x3F30, - 0, 0, 0, 0, 0, 0, 0,0x5329, -0x4562, 0, 0, 0,0x532A, 0,0x3022}; - -/* page 30 0x552E-0x5563 */ -static uint16 tab_uni_jisx020830[]={ -0x5334,0x4D23, 0,0x3E27, 0,0x533A, 0, 0, - 0, 0,0x5339,0x5330, 0, 0, 0, 0, -0x4243, 0,0x5331, 0, 0, 0,0x426F,0x5336, -0x3E26, 0, 0, 0, 0, 0,0x5333, 0, - 0,0x4C64, 0, 0, 0,0x373C, 0, 0, -0x5337,0x5338, 0, 0, 0, 0,0x5335,0x533B, - 0, 0, 0, 0, 0,0x5332}; - -/* page 31 0x557B-0x576A */ -static uint16 tab_uni_jisx020831[]={ -0x5341,0x5346, 0,0x5342, 0,0x533D, 0, 0, -0x5347,0x4131, 0, 0,0x5349, 0,0x3922,0x533F, -0x437D, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5343,0x533C,0x342D, - 0,0x346E,0x3365,0x5344,0x5340, 0, 0, 0, - 0, 0, 0, 0,0x3776,0x534A,0x5348,0x4153, -0x354A,0x362C, 0,0x5345, 0,0x3674, 0, 0, - 0, 0, 0,0x3144, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x534E,0x534C, 0,0x5427, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5351, 0, 0, 0, 0, 0,0x534B, - 0,0x534F, 0, 0,0x534D, 0, 0, 0, -0x3B4C,0x5350, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5353, 0,0x5358, 0, - 0, 0,0x5356,0x5355, 0, 0, 0, 0, - 0, 0, 0,0x4332, 0, 0,0x3245, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5352, 0,0x5354,0x3E28,0x3133, 0, 0, -0x5357, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x325E, 0, - 0, 0, 0, 0,0x5362, 0,0x3E7C,0x535E, - 0,0x535C, 0,0x535D, 0,0x535F, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x313D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4139, 0,0x5359, 0,0x535A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x337A, 0, 0, 0, 0, 0, 0, 0, - 0,0x5361, 0, 0, 0,0x346F, 0,0x5364, -0x5360,0x5363, 0, 0, 0, 0, 0, 0, - 0,0x4A2E, 0, 0, 0,0x4655, 0,0x4838, - 0, 0, 0, 0, 0,0x5366, 0, 0, - 0, 0, 0,0x5365,0x3345, 0, 0,0x5367, - 0, 0, 0, 0,0x536A, 0, 0, 0, - 0,0x5369, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5368, 0,0x4739, - 0, 0,0x536B, 0, 0, 0, 0, 0, - 0, 0, 0,0x536C, 0, 0, 0, 0, - 0,0x536E, 0,0x536D, 0, 0, 0, 0, - 0,0x5370, 0, 0, 0,0x5373,0x5371,0x536F, -0x5372, 0, 0, 0, 0,0x5374, 0, 0, - 0, 0, 0,0x5375, 0, 0,0x5376, 0, -0x5377, 0, 0, 0,0x5378,0x5145, 0,0x3C7C, -0x3B4D, 0, 0,0x3273, 0,0x3078, 0, 0, -0x4344, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5379, 0,0x3A24, 0,0x304F, -0x3F5E, 0, 0, 0, 0, 0,0x537A,0x3847, - 0, 0,0x3971, 0,0x537C,0x537B, 0, 0, -0x4A60,0x537D, 0, 0, 0,0x5421,0x537E, 0, -0x5422, 0,0x5423, 0,0x3777, 0, 0,0x3160, -0x5424, 0, 0,0x5426, 0,0x5425, 0, 0, - 0,0x5428, 0, 0,0x455A, 0, 0, 0, - 0, 0, 0,0x5429,0x3035,0x3A5F, 0, 0, - 0, 0,0x373D, 0, 0,0x434F, 0, 0, - 0, 0, 0, 0,0x542A,0x542B, 0, 0, -0x542D, 0, 0, 0, 0,0x542E, 0,0x3A64, - 0, 0, 0, 0,0x3651, 0, 0,0x4B37, - 0, 0, 0,0x542C,0x542F,0x3A41,0x3923, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5433, 0, - 0,0x3A25, 0,0x4333, 0, 0,0x5430,0x445A -}; - -/* page 32 0x577F-0x5A9B */ -static uint16 tab_uni_jisx020832[]={ -0x5434, 0, 0,0x3F62, 0, 0, 0, 0, - 0,0x5432,0x5435, 0,0x373F, 0, 0, 0, - 0, 0, 0, 0,0x5436, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5437, 0,0x3924,0x3340,0x5439, 0, 0, - 0, 0, 0,0x543A, 0, 0, 0, 0, - 0,0x543B, 0, 0,0x5438, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5431, 0, 0,0x543C, 0, 0,0x543D, - 0, 0, 0, 0,0x4B64, 0, 0,0x3E6B, - 0, 0, 0,0x543F,0x5440,0x543E, 0,0x5442, - 0, 0, 0, 0, 0,0x4738, 0, 0, -0x3068,0x4956, 0, 0,0x5443, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3E7D, 0, 0, -0x3C39, 0,0x475D,0x3470, 0,0x3A6B, 0, 0, - 0,0x4B59, 0,0x4632, 0, 0,0x3778,0x424F, - 0, 0, 0,0x5441,0x5444, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4244, 0, - 0, 0,0x5445, 0, 0, 0,0x5446, 0, - 0, 0,0x5448, 0, 0,0x4469, 0, 0, - 0, 0, 0,0x342E, 0, 0, 0, 0, -0x7421,0x3161,0x4A73, 0, 0,0x3E6C,0x4548, 0, - 0, 0, 0,0x3A66, 0, 0,0x544E, 0, - 0,0x4A3D,0x4E5D, 0, 0, 0, 0, 0, - 0, 0, 0,0x3274,0x544A, 0, 0, 0, - 0, 0,0x413A,0x544D, 0,0x4563, 0, 0, -0x4549,0x4564,0x4839,0x444D, 0, 0, 0,0x3A49, - 0, 0, 0,0x5449, 0, 0, 0, 0, - 0, 0,0x3176, 0,0x4536, 0, 0, 0, - 0,0x544B, 0,0x5447, 0, 0,0x3F50, 0, - 0, 0,0x544F, 0, 0, 0, 0,0x3D4E, - 0, 0, 0, 0,0x362D, 0,0x5450, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4A68, 0, 0, 0, -0x417D, 0, 0, 0, 0,0x4446, 0, 0, -0x5452, 0, 0, 0, 0, 0, 0, 0, - 0,0x4B4F, 0, 0,0x5453, 0, 0,0x5458, - 0, 0, 0, 0,0x4A2F, 0, 0, 0, - 0,0x5457,0x5451,0x5454,0x5456, 0, 0,0x3A26, - 0, 0,0x4A49, 0, 0, 0,0x5459, 0, -0x4345, 0, 0,0x3275, 0,0x3E6D, 0, 0, - 0, 0,0x545B, 0,0x545A, 0,0x3968, 0, -0x545C,0x545E,0x545D, 0, 0,0x5460, 0,0x5455, -0x5462, 0, 0, 0, 0,0x5461,0x545F, 0, - 0, 0, 0, 0,0x3B4E,0x3F51, 0,0x4154, -0x5463,0x403C,0x306D,0x4764, 0, 0, 0, 0, -0x445B, 0,0x5465,0x5464,0x5466,0x5467,0x5468, 0, - 0, 0, 0,0x5469, 0, 0, 0, 0, - 0, 0,0x4A51,0x546A, 0, 0, 0, 0, -0x3246,0x546B, 0, 0, 0, 0,0x4D3C,0x3330, - 0,0x5249,0x3D48,0x423F,0x546C,0x4C6B, 0, 0, - 0, 0, 0,0x4C34, 0, 0,0x546E, 0, -0x4267, 0,0x4537,0x4240,0x4957,0x546F,0x5470,0x317B, - 0, 0,0x3C3A,0x5471, 0, 0, 0, 0, -0x3050,0x5472, 0, 0, 0, 0, 0,0x5473, - 0, 0, 0, 0, 0,0x3162, 0, 0, -0x3471,0x4660,0x4A74, 0, 0, 0, 0,0x5477, -0x4155,0x5476,0x3740, 0, 0,0x4B5B,0x5475, 0, -0x4565,0x5479, 0,0x5478, 0, 0, 0, 0, - 0,0x547B, 0,0x547A, 0, 0,0x317C, 0, -0x547C,0x3E29,0x547E,0x4325, 0,0x547D, 0,0x4A33, - 0, 0, 0, 0,0x3D77,0x455B, 0, 0, - 0,0x5521, 0, 0, 0, 0,0x3925, 0, - 0, 0,0x5522,0x4721,0x485E,0x4C51, 0, 0, - 0, 0, 0,0x4725, 0, 0,0x552B, 0, - 0, 0, 0, 0,0x3538, 0, 0,0x4D45, - 0, 0,0x4C2F, 0,0x562C, 0,0x5523, 0, - 0, 0, 0, 0,0x5526, 0,0x4245, 0, - 0,0x4B38, 0, 0, 0,0x454A, 0, 0, - 0, 0, 0,0x5527, 0, 0, 0, 0, - 0, 0,0x4B65, 0,0x3A4A, 0, 0,0x3E2A, - 0, 0, 0, 0, 0, 0, 0,0x5528, - 0, 0,0x3B50, 0,0x3B4F, 0, 0, 0, - 0,0x3039,0x3848, 0,0x402B,0x3051, 0, 0, - 0, 0,0x552C,0x552D, 0,0x552A, 0, 0, - 0, 0, 0, 0, 0, 0,0x3138,0x342F, - 0,0x5529, 0,0x4C45,0x4931, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3028, - 0, 0, 0, 0,0x3079, 0, 0, 0, -0x3B51, 0,0x3052, 0,0x3023, 0, 0, 0, - 0, 0,0x5532, 0, 0, 0, 0, 0, - 0, 0,0x5530, 0, 0, 0, 0, 0, - 0,0x4C3C, 0,0x5533, 0,0x5531, 0, 0, -0x552F,0x3F31, 0, 0, 0, 0,0x552E, 0, - 0, 0,0x4A5A, 0, 0, 0, 0, 0, -0x3864, 0, 0, 0, 0, 0,0x5537,0x5538, - 0, 0, 0, 0, 0,0x3E2B, 0, 0, - 0,0x5534,0x4F2C, 0, 0, 0, 0,0x474C, - 0, 0,0x5536, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3A27, 0, 0, 0, 0, - 0, 0, 0,0x5539, 0, 0, 0,0x4958, - 0, 0, 0,0x553A, 0,0x5535, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4C3B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x475E, 0, 0, 0, 0, - 0, 0, 0,0x553B,0x4932}; - -/* page 33 0x5ABC-0x5D29 */ -static uint16 tab_uni_jisx020833[]={ -0x553C,0x5540,0x553D, 0, 0,0x3247,0x553F, 0, - 0, 0, 0, 0, 0,0x3C3B, 0,0x553E, -0x3779, 0, 0, 0,0x554C, 0, 0, 0, - 0, 0,0x5545,0x5542, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4364, 0,0x5541, - 0, 0,0x5543, 0, 0,0x5544, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5546,0x5547, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3472, 0,0x5549, -0x5548, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x554A, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3E6E, 0, - 0, 0, 0, 0, 0, 0,0x554D, 0, -0x445C, 0, 0, 0,0x3145, 0,0x554B, 0, - 0, 0,0x554E, 0, 0, 0, 0, 0, - 0, 0,0x554F, 0,0x5552, 0, 0,0x5550, - 0,0x5551, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3B52,0x5553, 0, 0, -0x3926,0x5554, 0,0x3B7A,0x4238, 0,0x5555,0x5556, -0x3B5A,0x3927, 0,0x4C52, 0, 0, 0,0x3528, -0x3849,0x5557,0x3358, 0, 0,0x5558, 0,0x4239, - 0, 0, 0, 0,0x5559,0x5623, 0,0x555A, - 0,0x555B, 0, 0,0x555C, 0,0x555E, 0, - 0, 0, 0, 0,0x555F, 0, 0,0x5560, - 0,0x4270, 0,0x3127,0x3C69,0x3042, 0,0x4157, -0x3430,0x3C35, 0,0x3928, 0, 0, 0, 0, - 0,0x4566, 0,0x3D21,0x3431,0x4368,0x446A,0x3038, -0x3539,0x4A75, 0,0x3C42, 0, 0,0x3552,0x406B, -0x3C3C,0x4D28,0x5561, 0, 0, 0, 0, 0, - 0, 0,0x355C, 0,0x3A4B, 0, 0,0x3332, -0x3163,0x3E2C,0x3248, 0,0x5562,0x4D46, 0, 0, - 0, 0, 0,0x3D49, 0, 0,0x3C64,0x5563, -0x3473,0x4652,0x4C29,0x5564, 0,0x5565, 0, 0, -0x4959, 0, 0, 0,0x5567, 0,0x3428,0x3677, -0x5566, 0, 0, 0, 0, 0, 0,0x3432, - 0,0x3F32,0x556B,0x3B21, 0,0x3249,0x556A, 0, -0x5568,0x556C,0x5569,0x472B,0x5C4D,0x3F33, 0,0x556D, - 0, 0,0x4E40, 0,0x556E, 0, 0,0x5570, - 0,0x437E,0x556F, 0,0x4023, 0,0x3B7B, 0, - 0, 0,0x4250,0x3C77, 0,0x4975,0x406C, 0, -0x3C4D,0x5571,0x3E2D,0x5572,0x5573,0x3053,0x423A,0x3F52, - 0,0x5574,0x4633,0x3E2E, 0,0x3E2F, 0,0x5575, - 0, 0,0x406D, 0, 0, 0,0x3E30, 0, - 0, 0, 0, 0,0x5576, 0,0x5577, 0, -0x4C60, 0, 0, 0,0x5578, 0, 0, 0, - 0,0x3646, 0, 0, 0,0x3D22, 0, 0, - 0, 0, 0, 0,0x5579,0x557A,0x3C5C,0x3F2C, -0x4674,0x3F54,0x4878,0x4722,0x3649,0x557B, 0, 0, - 0,0x356F,0x557C, 0,0x367E, 0,0x464F,0x3230, - 0,0x3B53,0x557D,0x5622,0x5621,0x367D, 0,0x557E, - 0,0x4538, 0, 0, 0, 0, 0, 0, - 0, 0,0x4230, 0,0x454B,0x3C48, 0, 0, -0x4158,0x4D7A, 0, 0, 0, 0, 0, 0, -0x5624, 0,0x5625,0x4656, 0,0x3B33, 0, 0, - 0, 0,0x5627, 0, 0,0x5628, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5629, 0, 0, 0,0x3474,0x562A, 0, 0, -0x562B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x322C, 0, 0, - 0, 0, 0, 0,0x413B,0x3464, 0,0x562D, -0x4C28, 0, 0, 0, 0,0x4252, 0,0x3359, - 0, 0,0x562F,0x5631,0x345F, 0, 0,0x562E, -0x5630, 0,0x5633, 0, 0, 0, 0, 0, - 0,0x5632, 0,0x5634, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5635, 0, 0, - 0, 0, 0, 0,0x463D,0x362E, 0, 0, - 0, 0, 0, 0,0x3265,0x5636,0x563B, 0, - 0,0x5639, 0,0x4A77,0x4A76, 0, 0, 0, - 0, 0,0x4567, 0, 0, 0,0x5638,0x3D54, - 0,0x5637, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3F72, 0, 0, 0,0x563C, - 0, 0,0x3A6A, 0, 0,0x5642, 0, 0, -0x5643,0x563D,0x3333,0x563E,0x5647,0x5646,0x5645,0x5641, - 0, 0, 0,0x5640, 0, 0,0x5644, 0, - 0, 0, 0, 0, 0,0x4A78}; - -/* page 34 0x5D4B-0x6BF3 */ -static uint16 tab_uni_jisx020834[]={ -0x564B,0x5648, 0,0x564A, 0,0x4D72, 0,0x5649, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x563F, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3F73, 0, - 0,0x564C, 0, 0,0x3A37, 0, 0, 0, -0x564D, 0, 0,0x564E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5651, - 0,0x5650, 0, 0,0x564F, 0, 0, 0, -0x4568,0x563A, 0, 0, 0,0x5657, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5653, 0, 0, 0, 0,0x5652, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5654, 0,0x5655, 0, 0, 0, 0, - 0, 0, 0, 0,0x5658, 0, 0,0x4E66, - 0,0x5659,0x5656, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x565A, 0, - 0,0x3460,0x565B, 0, 0, 0, 0,0x565D, -0x565C, 0, 0,0x565E, 0, 0, 0, 0, -0x565F, 0,0x406E,0x3D23, 0, 0,0x3D64, 0, -0x4163, 0,0x3929,0x3A38,0x392A,0x3570, 0, 0, -0x5660, 0, 0,0x3A39, 0, 0,0x384A,0x5661, -0x4C26,0x4743,0x5662, 0,0x392B, 0, 0, 0, -0x342C, 0,0x4327,0x3652, 0, 0, 0,0x3B54, -0x495B, 0, 0,0x4841, 0, 0, 0, 0, -0x5663,0x3475, 0, 0, 0, 0,0x5666, 0, - 0, 0, 0,0x4421, 0, 0,0x5665,0x5664, -0x5667, 0,0x446B, 0, 0, 0, 0, 0, - 0, 0,0x3F63, 0, 0, 0, 0, 0, -0x3B55, 0,0x404A, 0,0x4253,0x3522, 0, 0, -0x4422, 0, 0,0x5668,0x5669,0x3E6F, 0, 0, - 0, 0,0x4B39, 0, 0,0x566C, 0, 0, -0x566B,0x566A,0x497D, 0,0x5673, 0, 0, 0, - 0,0x4B5A, 0,0x566D, 0, 0, 0, 0, - 0,0x566F,0x4B6B, 0,0x566E, 0, 0, 0, - 0, 0, 0, 0,0x5670, 0,0x4828,0x5671, -0x4A3E,0x5672, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3433, -0x4A3F,0x472F,0x5674,0x5675, 0,0x392C,0x3434,0x5676, -0x3838,0x4D44,0x4D29,0x3476,0x5678, 0,0x4423, 0, -0x392D,0x3E31, 0, 0,0x485F, 0, 0,0x3E32, - 0, 0, 0, 0,0x3D78, 0, 0, 0, - 0, 0,0x446C,0x4A79,0x4539, 0, 0,0x392E, - 0,0x495C, 0, 0, 0,0x5679, 0, 0, - 0, 0, 0,0x4559,0x3A42, 0, 0, 0, -0x384B, 0,0x446D, 0, 0, 0, 0, 0, - 0, 0,0x3043,0x3D6E,0x392F,0x4D47, 0, 0, - 0, 0, 0, 0, 0, 0,0x567A,0x567B, -0x4751, 0, 0, 0, 0,0x567C,0x4E77,0x4F2D, - 0, 0, 0, 0,0x567E,0x567D, 0, 0, -0x3347, 0, 0,0x5721, 0, 0, 0,0x5724, -0x5725, 0,0x5723, 0,0x4940,0x3E33,0x5727,0x5726, -0x5722, 0, 0, 0, 0,0x5728,0x5729, 0, - 0,0x572A, 0, 0, 0,0x572D,0x572B, 0, -0x572C,0x572E, 0,0x3164,0x446E,0x572F, 0,0x377A, -0x3276,0x4736, 0,0x5730,0x467B, 0,0x4A5B, 0, -0x5731,0x4F2E, 0, 0, 0, 0,0x5732,0x4A40, -0x5735,0x5021,0x5031, 0,0x3C30,0x4675,0x5736, 0, -0x355D,0x4424,0x307A,0x5737,0x4A26,0x3930, 0, 0, -0x4350, 0, 0, 0,0x446F, 0, 0, 0, - 0, 0,0x4C6F,0x3839,0x384C, 0,0x5738, 0, - 0, 0,0x5739, 0,0x573F, 0,0x3C65, 0, - 0, 0,0x4425, 0,0x362F,0x573A, 0, 0, - 0,0x492B, 0,0x4346, 0, 0,0x573B, 0, - 0, 0, 0, 0, 0,0x573C, 0,0x3630, - 0,0x573D, 0,0x573E, 0, 0,0x5740, 0, -0x4576, 0, 0,0x5741,0x5742, 0,0x5743, 0, - 0,0x5734,0x5733, 0, 0, 0,0x5744,0x3741, - 0, 0, 0,0x4927, 0, 0,0x3A4C,0x4937, -0x4426,0x494B,0x5745, 0, 0,0x3E34,0x3146, 0, -0x5746, 0, 0, 0,0x5747, 0,0x4C72, 0, - 0,0x4860, 0, 0,0x574A,0x317D,0x402C,0x5749, -0x5748,0x3742,0x4254, 0,0x574E,0x574C, 0,0x574B, -0x4E27,0x3865, 0, 0, 0,0x3D79,0x574D,0x454C, -0x3D3E, 0, 0, 0,0x4640,0x5751,0x5750, 0, - 0, 0, 0,0x574F, 0,0x5752,0x3866, 0, - 0, 0, 0, 0, 0,0x5753,0x497C,0x3D5B, - 0, 0,0x5754,0x4879, 0, 0, 0, 0, -0x4641,0x4427, 0, 0, 0, 0,0x4530, 0, - 0,0x5755,0x352B, 0, 0, 0, 0, 0, -0x3F34, 0,0x492C, 0, 0, 0, 0, 0, - 0,0x3477,0x4726, 0, 0, 0, 0, 0, - 0, 0, 0,0x5756,0x3B56,0x4B3A,0x4B3B, 0, - 0,0x317E,0x575B, 0, 0,0x4369, 0, 0, - 0,0x5758, 0, 0, 0, 0, 0, 0, -0x3277, 0, 0, 0, 0,0x582D,0x575A, 0, - 0, 0,0x4730, 0, 0,0x5759, 0, 0, -0x5757, 0,0x397A, 0,0x575D, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5763,0x5769,0x5761, 0,0x455C, - 0, 0,0x5766,0x495D, 0, 0,0x5760, 0, -0x5765,0x4E67,0x3B57, 0, 0,0x4255,0x575E, 0, - 0, 0,0x355E,0x5768,0x402D,0x3165,0x5762,0x3278, -0x5767, 0, 0, 0,0x3631, 0,0x5764, 0, - 0, 0, 0, 0, 0, 0, 0,0x576A, - 0, 0, 0, 0, 0, 0,0x576C,0x5776, -0x5774, 0, 0,0x5771, 0, 0, 0,0x5770, -0x4E78, 0,0x5772, 0, 0,0x3632, 0,0x3931, - 0, 0,0x3D7A, 0, 0, 0,0x5779,0x576B, - 0, 0, 0, 0,0x576F,0x575F, 0,0x327A, -0x5773,0x5775,0x4351, 0, 0,0x3A28,0x3238,0x576D, -0x5778,0x5777,0x3633, 0,0x4229,0x3366, 0, 0, - 0, 0,0x3743, 0,0x576E, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x577A, 0, -0x577D,0x5821, 0, 0, 0, 0,0x3C3D, 0, -0x5827,0x4470,0x577B, 0, 0, 0, 0,0x5825, - 0,0x3279, 0,0x5823,0x5824, 0, 0,0x577E, -0x5822, 0, 0, 0,0x3867,0x4D2A, 0, 0, -0x3435, 0, 0,0x3159,0x5826, 0,0x473A,0x302D, - 0, 0, 0, 0, 0, 0, 0,0x4861, -0x575C,0x582C,0x5830,0x4C65, 0,0x5829, 0, 0, - 0,0x4569,0x582E, 0, 0, 0, 0, 0, - 0, 0,0x3E70,0x582F,0x4657, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4F47, 0, -0x582B, 0, 0, 0, 0,0x5831, 0,0x397B, - 0,0x404B, 0, 0,0x3054,0x582A,0x5828, 0, -0x415A, 0, 0, 0,0x577C,0x3B34, 0, 0, - 0, 0, 0, 0, 0,0x4246,0x583D, 0, -0x415B,0x5838, 0,0x5835,0x5836, 0,0x3C66,0x5839, -0x583C, 0, 0, 0, 0,0x5837,0x3D25, 0, -0x583A, 0, 0,0x5834, 0,0x4C7C,0x4C7B, 0, - 0, 0,0x583E,0x583F,0x3055, 0, 0, 0, - 0, 0,0x5833, 0, 0, 0, 0,0x3672, -0x3026, 0, 0, 0,0x3436, 0,0x583B, 0, - 0, 0, 0, 0,0x5843,0x5842, 0, 0, - 0,0x5847, 0, 0, 0, 0, 0, 0, - 0,0x5848, 0, 0, 0, 0, 0, 0, - 0,0x5846,0x5849,0x5841,0x5845, 0, 0,0x584A, - 0,0x584B, 0, 0,0x5840,0x3B7C, 0,0x5844, -0x4256,0x3932,0x5832,0x3F35, 0, 0, 0, 0, -0x5858, 0,0x4A69, 0, 0,0x584E,0x584F,0x5850, - 0, 0,0x5857, 0,0x5856, 0, 0,0x4B7D, -0x3437, 0,0x5854, 0,0x3745,0x3334, 0, 0, -0x5851, 0, 0,0x4E38,0x5853,0x3056,0x5855, 0, -0x584C,0x5852,0x5859,0x3744,0x584D, 0, 0, 0, - 0, 0, 0,0x4D5D, 0, 0, 0,0x4D2B, - 0, 0, 0, 0,0x585C, 0, 0,0x5860, - 0, 0, 0,0x417E, 0,0x4E79,0x5861, 0, - 0,0x585E, 0,0x585B, 0, 0,0x585A,0x585F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4A30, 0, 0,0x4634, 0,0x3746, 0, -0x5862,0x585D, 0,0x5863, 0, 0, 0,0x377B, - 0, 0, 0,0x3231, 0, 0, 0,0x586B, - 0, 0, 0,0x3438, 0, 0, 0, 0, -0x5869, 0, 0,0x586A,0x3A29,0x5868,0x5866,0x5865, -0x586C,0x5864,0x586E, 0, 0,0x327B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5870, 0, 0,0x586F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4428, - 0,0x5873, 0,0x5871,0x5867,0x377C, 0,0x5872, - 0,0x5876,0x5875,0x5877,0x5874,0x5878, 0, 0, - 0, 0, 0, 0, 0,0x5879,0x587A,0x4A6A, - 0,0x587C,0x587B,0x3D3F, 0,0x402E,0x3266,0x327C, - 0,0x587D, 0,0x303F, 0, 0, 0,0x404C, -0x587E, 0,0x6C43,0x5921,0x3761, 0,0x5922, 0, - 0, 0, 0,0x406F, 0, 0, 0,0x5923, - 0, 0, 0,0x5924,0x353A,0x5925, 0,0x5926, -0x5927,0x4257, 0, 0, 0,0x384D, 0, 0, -0x4C61, 0, 0, 0,0x4B3C,0x3D6A,0x5928, 0, - 0, 0, 0, 0,0x4070,0x6E3D,0x4862, 0, -0x3C6A, 0,0x3A4D,0x5929, 0, 0, 0, 0, -0x4247, 0,0x4A27, 0, 0,0x4271, 0, 0, -0x592C, 0, 0,0x592A, 0,0x592D, 0, 0, -0x592B, 0, 0, 0, 0,0x592E, 0, 0, - 0, 0, 0,0x4A31, 0, 0,0x3037, 0, - 0, 0, 0,0x495E, 0, 0,0x4863, 0, - 0,0x592F, 0,0x5932,0x3E35,0x353B, 0,0x5930, -0x5937,0x3E36, 0, 0, 0, 0,0x5931,0x4744, - 0, 0, 0, 0, 0, 0,0x4D5E,0x5933, -0x5934,0x5938,0x456A,0x5935,0x3933,0x405E, 0, 0, -0x5946,0x4834, 0,0x4272, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4864,0x5A2D, 0, 0, 0, 0,0x4A7A, 0, - 0, 0,0x4471, 0, 0, 0,0x4B75, 0, -0x593B,0x3221,0x436A, 0, 0, 0, 0,0x5944, - 0, 0,0x4334,0x593E,0x5945,0x5940,0x5947,0x5943, - 0,0x5942,0x476F, 0,0x593C,0x327D,0x593A,0x3571, -0x4273,0x5936, 0, 0,0x5939,0x3934,0x405B, 0, -0x3E37,0x5941,0x4752, 0, 0,0x3572,0x3348, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3367,0x3F21,0x5949,0x594E, 0,0x594A, 0, -0x377D, 0,0x594F,0x3B22,0x3969, 0, 0, 0, - 0, 0, 0,0x3D26,0x593D, 0,0x3B7D,0x594C, - 0, 0, 0, 0,0x3B58,0x594D,0x3044, 0, - 0,0x5948, 0, 0, 0, 0,0x4429, 0, - 0, 0, 0, 0, 0, 0,0x3573, 0, - 0, 0, 0, 0,0x3634, 0, 0, 0, - 0, 0, 0, 0,0x594B,0x3027, 0, 0, -0x3A43, 0, 0, 0,0x3F36, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4472, - 0, 0,0x4854,0x5951,0x415E, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x422A, 0, - 0,0x3B2B,0x5952, 0,0x5954,0x5950, 0, 0, - 0, 0,0x4A61, 0,0x443D, 0, 0, 0, - 0,0x415C, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4A7B,0x3C4E,0x5960, 0, -0x595F, 0, 0,0x3F78, 0, 0, 0,0x377E, - 0, 0, 0,0x5959,0x3E39, 0, 0,0x4668, -0x4731, 0, 0, 0, 0,0x5957, 0, 0, -0x415D, 0, 0, 0, 0,0x3C78,0x595C, 0, - 0,0x3E38, 0,0x5956,0x595B, 0, 0,0x4753, - 0, 0, 0,0x5955, 0,0x3721, 0, 0, -0x335D, 0, 0, 0,0x595D,0x4E2B,0x3A4E,0x4335, -0x595A, 0,0x405C, 0,0x3935,0x3F64,0x3166,0x413C, -0x5958,0x3545, 0, 0, 0, 0, 0,0x3747, - 0,0x444F,0x595E, 0, 0, 0, 0, 0, -0x415F, 0, 0,0x5961, 0,0x5963, 0, 0, -0x4237,0x5969, 0,0x5964, 0, 0,0x5966, 0, - 0, 0, 0, 0,0x4941,0x4473, 0,0x5967, - 0, 0, 0,0x4D2C, 0, 0, 0,0x4D48, -0x3439, 0, 0, 0, 0, 0,0x302E, 0, -0x5965, 0, 0, 0, 0, 0,0x5962, 0, - 0, 0, 0,0x3478, 0, 0, 0, 0, - 0,0x3167, 0,0x5968, 0, 0, 0,0x4D49, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x596C, 0, 0, 0, 0, - 0, 0,0x423B, 0,0x5973, 0, 0, 0, -0x596D, 0, 0,0x596A,0x5971, 0, 0, 0, - 0,0x5953, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x596E, 0,0x5972, 0, 0, - 0,0x4842,0x456B, 0, 0, 0, 0, 0, - 0,0x596B, 0,0x596F, 0, 0, 0,0x3748, - 0, 0, 0,0x3A71, 0, 0, 0,0x405D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5977, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4526, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5974, 0,0x4B60, 0, - 0, 0, 0, 0,0x5975, 0, 0, 0, - 0, 0, 0,0x5976, 0,0x4C4E, 0,0x4022, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3762, 0, 0, 0, 0,0x597D, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3B35, -0x597A, 0,0x5979, 0, 0, 0, 0,0x4732, - 0, 0, 0,0x4635, 0, 0, 0, 0, - 0,0x4531,0x597B, 0, 0, 0,0x597C, 0, -0x496F, 0,0x4745,0x3B23, 0,0x4071, 0,0x4B50, - 0, 0, 0, 0, 0, 0,0x3349, 0, -0x5A25,0x597E, 0, 0, 0, 0,0x4D4A,0x5A27, - 0, 0,0x5A23, 0,0x5A24, 0, 0, 0, - 0, 0,0x4160, 0, 0, 0, 0,0x5A22, - 0,0x593F, 0, 0, 0,0x5A26, 0,0x5A21, - 0, 0, 0, 0, 0,0x5A2B,0x5A2C,0x4527, -0x5A2E, 0, 0,0x3B24,0x5A29, 0, 0, 0, - 0,0x353C, 0, 0,0x5A2F, 0,0x5A28,0x5A33, - 0,0x5A32, 0,0x5A31, 0, 0, 0,0x5A34, - 0, 0,0x5A36,0x3E71, 0,0x5A35, 0, 0, - 0, 0,0x5A39, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5A37, 0, 0, - 0,0x5A38,0x5970, 0, 0, 0, 0, 0, -0x5A3B,0x5A3A, 0, 0, 0, 0, 0,0x5978, -0x5A3C,0x5A30, 0, 0,0x3B59, 0, 0, 0, - 0,0x5A3D,0x5A3E,0x5A40,0x5A3F,0x5A41,0x327E, 0, -0x3936, 0, 0,0x4A7C,0x402F, 0, 0, 0, - 0, 0,0x384E, 0, 0,0x5A43, 0, 0, - 0, 0,0x5A46, 0,0x4952, 0,0x355F, 0, - 0, 0,0x5A45,0x5A44,0x4754,0x5A47,0x3635, 0, - 0, 0,0x5A49,0x5A48, 0, 0, 0,0x343A, -0x3B36, 0, 0,0x4658, 0, 0, 0, 0, - 0,0x3749, 0, 0, 0,0x3F74, 0,0x5A4A, - 0,0x4030,0x4528, 0,0x495F,0x5A4B, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5A4C, -0x5A4D, 0, 0, 0,0x4A38,0x555D,0x4046, 0, - 0,0x494C, 0,0x3A58, 0,0x4865,0x4843, 0, - 0, 0, 0, 0,0x454D, 0,0x4E41, 0, -0x5A4F,0x3C50, 0, 0,0x5A50, 0,0x3036, 0, - 0,0x3654,0x404D, 0,0x4960, 0, 0, 0, -0x5A51,0x3B42,0x4347, 0,0x3B5B,0x3F37, 0, 0, - 0, 0, 0, 0,0x5A52, 0,0x4A7D, 0, - 0,0x3177,0x3B5C, 0, 0, 0,0x5A55, 0, -0x5A53,0x5A56,0x4E39,0x5A54, 0, 0, 0, 0, -0x407B,0x5A57, 0, 0,0x4232, 0, 0,0x5A58, - 0, 0, 0, 0,0x347A, 0,0x5A5A, 0, -0x5A59, 0, 0, 0, 0,0x5A5B,0x5A5C,0x347B, - 0, 0,0x467C,0x4336,0x356C,0x3B5D,0x4161, 0, - 0,0x3D5C,0x3030, 0, 0, 0,0x5A5D, 0, - 0, 0, 0, 0, 0, 0, 0,0x3222, -0x5A61, 0, 0, 0, 0, 0, 0,0x3937, -0x5A60, 0, 0,0x3A2B,0x3E3A, 0, 0,0x5A5F, - 0,0x3E3B, 0,0x4C40,0x3A2A, 0, 0, 0, -0x3057,0x404E, 0, 0, 0, 0, 0, 0, - 0,0x5A66, 0, 0,0x4031,0x3147, 0, 0, - 0, 0,0x3D55, 0,0x4B66,0x3A72, 0, 0, - 0, 0,0x3E3C, 0,0x4027, 0, 0, 0, - 0,0x5A65,0x5A63,0x5A64, 0, 0, 0, 0, - 0,0x436B, 0, 0,0x5B26, 0,0x5A6A,0x3B7E, -0x3938,0x5A68, 0, 0, 0, 0,0x5A69, 0, -0x3F38, 0, 0, 0,0x5A67, 0, 0,0x3B2F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5A6C,0x5A6B,0x5A70, 0, 0,0x5A71, - 0,0x5A6D, 0,0x3322,0x5A6E,0x5A6F,0x4855, 0, - 0, 0, 0,0x4961,0x374A,0x5A72, 0, 0, - 0,0x4032, 0,0x3E3D, 0, 0, 0,0x4352, - 0, 0, 0, 0, 0, 0,0x3647, 0, -0x5A73,0x5A77, 0, 0,0x324B,0x5A74,0x5A76, 0, - 0, 0, 0,0x5A75, 0, 0,0x3D6B, 0, - 0, 0, 0,0x4348,0x3045,0x5A78, 0, 0, - 0, 0,0x5A79, 0, 0, 0, 0,0x442A, - 0, 0, 0,0x4E71, 0, 0, 0, 0, -0x3B43, 0, 0,0x4A6B, 0, 0, 0, 0, - 0,0x4B3D, 0, 0, 0,0x5B22,0x5A7B, 0, - 0,0x5A7E, 0,0x5A7D, 0, 0,0x5A7A, 0, - 0,0x5B21, 0, 0,0x465E, 0,0x5A7C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5B23, 0, 0,0x3D6C,0x5B24, - 0,0x4D4B,0x4778, 0, 0,0x5B25, 0, 0, - 0, 0, 0,0x5B27, 0, 0,0x5B28, 0, - 0, 0, 0, 0, 0,0x5B29, 0,0x364A, -0x3148,0x3939,0x5B2A, 0,0x5B2B,0x3D71,0x4162, 0, - 0,0x5258,0x413E,0x413D,0x4258,0x3A47, 0, 0, -0x5072, 0, 0, 0, 0,0x376E,0x4D2D, 0, -0x4A7E, 0,0x497E, 0,0x5B2C, 0, 0, 0, - 0,0x3A73,0x443F,0x5B2D,0x4F2F, 0, 0, 0, -0x4B3E, 0,0x442B,0x5B2E,0x347C, 0, 0, 0, - 0, 0, 0,0x5B2F,0x5B30,0x4C5A, 0,0x4C24, -0x4B76,0x4B5C,0x3B25,0x5B32, 0, 0,0x3C6B, 0, - 0,0x4B51, 0,0x5B34,0x5B37,0x5B36, 0,0x3479, - 0, 0,0x3560, 0,0x5B33, 0,0x5B35, 0, - 0, 0, 0,0x5B38, 0, 0,0x3F79, 0, - 0, 0, 0,0x4D7B,0x3049,0x3A60,0x423C, 0, -0x3C5D, 0, 0,0x3E73, 0, 0,0x5B3B, 0, - 0,0x454E, 0,0x5B39,0x422B,0x5B3A,0x3E72,0x4C5D, -0x5B3C,0x5B3D,0x4D68, 0, 0, 0, 0,0x5B42, - 0, 0,0x393A, 0,0x4755,0x5B3F,0x456C,0x5A5E, -0x5A62, 0,0x354F, 0,0x4747, 0, 0, 0, - 0,0x5B41, 0,0x3E3E,0x4844, 0, 0, 0, - 0, 0,0x5B47, 0,0x487A, 0,0x5B3E, 0, -0x5B44,0x5B43, 0, 0, 0,0x404F, 0, 0, - 0, 0,0x4B6D, 0,0x4E53, 0, 0,0x4B67, - 0,0x324C,0x3B5E, 0, 0,0x4F48,0x5B46,0x3F75, - 0, 0, 0,0x5B45, 0, 0,0x5B40, 0, - 0, 0, 0, 0,0x384F, 0, 0, 0, -0x5B4C,0x5B4A, 0,0x324D,0x5B48,0x5B4E,0x5B54, 0, - 0, 0, 0, 0, 0, 0,0x4248, 0, - 0,0x4A41, 0,0x5B56, 0, 0, 0,0x4922, - 0, 0, 0,0x5B55,0x4770,0x4B3F,0x343B, 0, -0x4077,0x3D40, 0, 0, 0,0x4453, 0,0x4D2E, - 0, 0,0x5B51,0x5B50, 0, 0, 0,0x5B52, - 0,0x5B4F, 0, 0,0x5B57, 0,0x5B4D, 0, - 0,0x5B4B, 0,0x5B53,0x5B49, 0,0x436C, 0, -0x4C78,0x3C46,0x3A74, 0, 0, 0, 0, 0, -0x3A3A, 0, 0,0x4B6F,0x3341, 0, 0,0x444E, -0x464A,0x3149, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4072, 0, 0,0x4034,0x372A, 0, 0, 0, - 0, 0, 0,0x5B59, 0, 0,0x393B,0x337C, - 0, 0, 0, 0, 0, 0,0x5B5B,0x3374, -0x5B61, 0, 0, 0, 0, 0, 0,0x5B5E, - 0,0x4073, 0, 0, 0,0x334B,0x3A2C, 0, - 0,0x334A,0x3A4F, 0, 0,0x5B5C,0x3765,0x374B, -0x456D, 0, 0,0x5B5A, 0,0x3046, 0, 0, - 0, 0,0x5B5D,0x5B5F, 0,0x364D,0x372C, 0, -0x343C,0x354B, 0, 0, 0, 0,0x5B62, 0, - 0,0x3A79,0x4B71, 0,0x3B37, 0, 0, 0, -0x5B63, 0, 0, 0,0x4930, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5B6F, 0,0x3233,0x5B64, 0, 0, 0, - 0, 0, 0,0x5B75,0x5B65, 0,0x4E42, 0, -0x5B6C, 0,0x475F, 0, 0, 0, 0, 0, - 0, 0,0x5B74, 0,0x5B67, 0, 0, 0, -0x3034,0x5B69, 0, 0,0x393C, 0, 0, 0, -0x5B6B, 0,0x5B6A, 0,0x5B66,0x5B71, 0,0x3E3F, - 0, 0, 0,0x546D,0x3868,0x4D7C, 0, 0, - 0, 0,0x5B68, 0,0x4474,0x3323,0x3A2D, 0, -0x5B60, 0,0x5B70,0x3361, 0, 0,0x5B6E,0x5B72, - 0,0x456E, 0, 0, 0, 0, 0, 0, - 0,0x347E, 0,0x5C32, 0, 0,0x4C49,0x5B77, -0x347D, 0,0x5B7E, 0, 0, 0, 0,0x4B40, - 0,0x5C21,0x5C23, 0,0x5C27,0x5B79, 0,0x432A, - 0, 0, 0, 0,0x456F,0x5C2B,0x5B7C, 0, -0x5C28, 0, 0, 0,0x5C22, 0, 0, 0, - 0, 0, 0,0x3F39,0x5C2C, 0, 0,0x4033, - 0, 0, 0, 0, 0, 0,0x5C2A,0x343D, - 0, 0, 0, 0, 0,0x4F50,0x5B76, 0, - 0,0x5C26,0x3058, 0, 0,0x5B78, 0, 0, -0x4C3A,0x5B7D,0x3F22,0x4447,0x5B73, 0, 0,0x5C25, - 0, 0, 0, 0, 0, 0,0x3F7A,0x5C2F, -0x3371,0x3821, 0, 0, 0, 0,0x5C31,0x5B7A, -0x5C30, 0,0x5C29,0x5B7B, 0,0x5C2D, 0,0x5C2E, - 0, 0, 0, 0, 0,0x5C3F, 0, 0, - 0,0x464E, 0,0x5C24, 0, 0,0x5C3B, 0, - 0, 0,0x5C3D, 0,0x4458, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4D4C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4976,0x5C38,0x424A, 0, 0, 0,0x5C3E,0x413F, - 0,0x5C35,0x5C42,0x5C41, 0,0x466F,0x5C40,0x466A, - 0, 0, 0, 0, 0, 0, 0,0x5C44, -0x5C37, 0,0x3648,0x5C3A,0x3D5D, 0, 0, 0, -0x4760,0x5C3C,0x364B, 0,0x5C34,0x5C36,0x5C33, 0, - 0,0x4F30,0x335A,0x5C39, 0, 0,0x5C43,0x3335, - 0, 0, 0, 0, 0, 0, 0,0x3A67, - 0, 0, 0,0x315D, 0, 0,0x5C54, 0, - 0,0x4F31,0x5C57, 0, 0, 0, 0, 0, -0x3F3A,0x5C56, 0, 0, 0,0x5C55, 0, 0, - 0, 0, 0, 0,0x5C52, 0, 0, 0, - 0, 0, 0,0x5C46, 0, 0,0x5C63,0x5C45, - 0,0x5C58, 0, 0, 0, 0, 0, 0, -0x5C50, 0, 0,0x5C4B,0x5C48, 0,0x5C49, 0, -0x5C51, 0, 0, 0,0x7422, 0, 0,0x5C4E, -0x393D,0x4448,0x4164,0x5C4C, 0,0x5C47, 0, 0, -0x5C4A, 0, 0, 0, 0,0x4D4D,0x4B6A, 0, - 0, 0,0x5C4F,0x5C59, 0, 0, 0, 0, - 0, 0, 0, 0,0x5C61,0x5C5A, 0, 0, -0x5C67, 0,0x5C65, 0, 0, 0, 0,0x5C60, - 0, 0, 0, 0, 0, 0,0x5C5F, 0, -0x4450, 0,0x4165, 0,0x5C5D, 0, 0,0x5C5B, - 0, 0,0x5C62, 0, 0, 0, 0,0x5C68, -0x4875,0x5C6E, 0, 0, 0, 0, 0,0x5C69, -0x5C6C,0x5C66, 0, 0,0x4374, 0,0x4938, 0, -0x5C5C, 0, 0,0x5C64,0x3E40, 0,0x4C4F,0x5C78, -0x5C6B, 0, 0, 0, 0, 0,0x3822,0x3223, -0x335F, 0, 0,0x5C53, 0, 0, 0, 0, - 0, 0,0x3E41,0x5C70, 0,0x5C77,0x3C79,0x3372, - 0, 0,0x432E, 0, 0, 0, 0, 0, - 0,0x5C6D, 0, 0,0x5C72,0x5C76, 0, 0, -0x3636, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x354C,0x5C74, 0, - 0, 0, 0, 0,0x3521, 0,0x464B,0x5C73, - 0, 0, 0,0x5C75, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5C6F, - 0, 0, 0, 0, 0,0x5C71, 0, 0, - 0, 0, 0, 0,0x3360,0x4349, 0, 0, - 0,0x5C7C, 0, 0, 0, 0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0, 0,0x3D5E,0x3C6C, -0x3B44, 0,0x5D4B, 0, 0, 0, 0, 0, - 0, 0,0x5D4D,0x3F23, 0,0x5D4C, 0, 0, - 0, 0, 0,0x5D4E, 0, 0, 0, 0, - 0,0x5D4F, 0, 0, 0, 0, 0,0x5D50, -0x5D51, 0, 0, 0,0x5D52, 0,0x5D54,0x5D53, -0x5D55,0x3225,0x434A, 0,0x5D56, 0, 0,0x3B26, -0x334C,0x5D57, 0, 0,0x4542,0x544C, 0, 0, - 0, 0,0x3523,0x5D58, 0, 0, 0, 0, -0x5D59, 0,0x4A6C,0x4B68, 0, 0, 0,0x4647, -0x5D5A,0x4866, 0, 0, 0,0x487B, 0, 0, -0x4C53, 0, 0, 0,0x5D5B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5D5D,0x5D5C, 0, 0,0x5D5F, 0, 0, 0, -0x5D5E}; - -/* page 35 0x6C08-0x6CF3 */ -static uint16 tab_uni_jisx020835[]={ -0x5D61, 0, 0, 0, 0, 0, 0,0x3B61, - 0,0x4C31, 0,0x5D62,0x5D63, 0, 0,0x3524, - 0, 0, 0,0x5D64, 0, 0, 0, 0, - 0, 0, 0,0x5D66,0x5D65, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3F65, 0, 0,0x4939, -0x314A, 0, 0, 0, 0, 0,0x4845, 0, -0x4475,0x3D41,0x3561, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4846, 0, -0x3C2E, 0, 0, 0, 0,0x5D68, 0,0x3440, - 0, 0,0x3178, 0, 0,0x4672,0x5D67,0x393E, -0x4353, 0,0x5D69, 0, 0, 0, 0, 0, -0x5D71, 0,0x5D6A, 0, 0, 0, 0, 0, -0x4241, 0,0x3562,0x5D72, 0, 0, 0, 0, - 0, 0,0x3768, 0, 0,0x3525,0x5D70, 0, - 0,0x5D6E,0x5D6B,0x4D60, 0, 0, 0, 0, -0x4440, 0, 0, 0,0x4659,0x5D6C, 0, 0, -0x5D74, 0,0x5D73,0x3723, 0, 0,0x322D, 0, - 0,0x3A3B,0x5D6D,0x5D6F, 0, 0, 0, 0, - 0,0x4B57,0x4274, 0, 0, 0, 0, 0, - 0, 0, 0,0x4B77, 0, 0,0x5D7C, 0, - 0,0x5D7D, 0,0x324F, 0, 0, 0, 0, -0x4A28,0x4C7D,0x5E21,0x3C23,0x3E42,0x5D78,0x5D7E,0x3168, - 0,0x3637, 0, 0,0x5D75,0x5D7A, 0, 0, - 0,0x4074,0x4771, 0,0x4867, 0, 0, 0, - 0, 0, 0,0x5D77, 0,0x4B21, 0,0x5D79, - 0,0x5E24, 0,0x5E22, 0,0x5D7B, 0, 0, - 0,0x4B22,0x4748,0x3563, 0,0x4525, 0, 0, -0x436D, 0,0x5E25, 0, 0, 0, 0,0x5E23, -0x4259,0x5D76, 0,0x314B}; - -/* page 36 0x6D0B-0x7409 */ -static uint16 tab_uni_jisx020836[]={ -0x4D4E,0x5E30, 0, 0, 0, 0, 0,0x5E2F, - 0, 0, 0, 0,0x4076, 0,0x5E2C, 0, -0x4D6C, 0, 0,0x4636,0x5E26, 0, 0, 0, - 0, 0,0x4445, 0, 0, 0,0x314C,0x393F, -0x5E29, 0, 0, 0, 0, 0, 0,0x3D27, -0x5E2E, 0,0x5E2D,0x5E28, 0,0x5E2B, 0, 0, -0x3368, 0,0x5E2A,0x4749, 0, 0,0x4E2E, 0, - 0,0x3E74,0x4075, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5E36,0x5E34, - 0,0x494D, 0, 0, 0, 0, 0, 0, -0x5E31,0x5E33, 0,0x313A, 0, 0,0x3940,0x4F32, - 0,0x333D, 0,0x4962, 0, 0, 0, 0, - 0,0x4D61, 0, 0,0x3324,0x3F3B,0x5E35, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5E3A, 0, 0,0x3E43, 0, 0, - 0,0x4D30, 0,0x5E37, 0, 0, 0, 0, -0x5E32, 0,0x5E38, 0, 0, 0,0x4E5E, 0, -0x4573,0x4642, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3336, 0, 0,0x3155, - 0, 0,0x5E3E, 0, 0,0x5E41, 0, 0, - 0,0x4E43, 0, 0, 0,0x4D64, 0, 0, - 0, 0,0x5E48,0x5E42,0x5E3F, 0, 0, 0, -0x4E54,0x5E45, 0, 0, 0, 0,0x3D4A,0x5E47, - 0, 0,0x5E4C, 0, 0,0x4571,0x5E4A, 0, - 0, 0, 0,0x5E44, 0, 0,0x4338, 0, - 0,0x5E4B, 0,0x5E40, 0,0x5E46, 0,0x5E4D, -0x307C,0x5E43, 0,0x5E4E, 0, 0,0x3F3C, 0, -0x3D5F, 0,0x4A25, 0,0x3A2E, 0,0x5E3B,0x5E49, -0x453A, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4036, 0,0x3369,0x3A51,0x3E44,0x5E3D, -0x3D42, 0, 0, 0, 0, 0, 0, 0, -0x374C, 0,0x5E3C, 0, 0, 0,0x5E52,0x3D6D, -0x383A, 0,0x5E61, 0,0x5E5B,0x3574,0x454F, 0, -0x5E56,0x5E5F,0x302F,0x3132, 0, 0,0x3239, 0, -0x5E58,0x422C,0x5E4F,0x5E51,0x3941, 0, 0, 0, - 0, 0, 0, 0, 0,0x5E62, 0,0x5E5D, - 0, 0, 0,0x5E55, 0, 0, 0, 0, -0x5E5C, 0, 0, 0, 0, 0, 0,0x4C2B, - 0, 0,0x5E5A,0x5E5E, 0, 0, 0, 0, - 0, 0, 0,0x3850, 0,0x3E45, 0, 0, -0x4339, 0, 0, 0,0x5E54, 0, 0, 0, - 0, 0, 0, 0,0x4D2F, 0, 0, 0, -0x5E57, 0, 0,0x5E50,0x4572, 0, 0,0x5E53, - 0, 0, 0,0x5E59, 0, 0, 0, 0, - 0, 0, 0,0x4F51,0x3C3E,0x4B7E, 0,0x5E63, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x482E, 0, 0,0x5E6F,0x383B, 0, 0, - 0, 0, 0,0x3D60, 0,0x5E65, 0, 0, - 0,0x4E2F,0x3942, 0,0x5E72, 0, 0,0x306E, - 0, 0,0x5E70, 0, 0, 0, 0,0x5E64, - 0, 0, 0, 0,0x5E6A, 0, 0,0x5E6C, - 0, 0, 0,0x4D4F,0x5E67, 0, 0,0x452E, - 0, 0,0x5E69, 0, 0, 0, 0,0x5E71, - 0,0x5E6B,0x4C47, 0, 0, 0,0x5E66, 0, -0x3C22,0x5E7E, 0, 0, 0, 0,0x336A, 0, -0x5E68,0x5E6D,0x5E6E, 0, 0, 0, 0, 0, - 0, 0,0x426C,0x425A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5E76, 0, 0,0x5E7C, 0, 0,0x5E7A, - 0,0x4529, 0, 0,0x5F23,0x5E77, 0, 0, - 0, 0, 0,0x5E78,0x5E60, 0,0x3579,0x493A, - 0, 0, 0,0x3C3F, 0, 0,0x3977, 0, - 0, 0, 0, 0,0x4F33, 0,0x5E74, 0, -0x5F22,0x3169,0x4166, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4779, 0,0x3441, -0x4E7A, 0, 0, 0, 0, 0, 0, 0, -0x4C21,0x4452, 0, 0, 0, 0,0x5E7B,0x5E7D, - 0, 0, 0, 0, 0,0x4132, 0, 0, - 0, 0, 0,0x5F21,0x5E79, 0,0x5E73, 0, - 0, 0,0x3443, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3769, 0, 0, 0,0x5F2F, 0, 0, -0x5F2A,0x4078, 0, 0,0x3363, 0, 0, 0, - 0,0x3D61, 0,0x5F33, 0, 0, 0, 0, - 0, 0,0x5F2C,0x442C,0x5F29,0x4459, 0, 0, - 0,0x5F4C, 0, 0, 0,0x5F26, 0,0x5F25, - 0,0x5F2E, 0, 0, 0,0x5F28,0x5F27,0x5F2D, - 0,0x4021, 0,0x5F24, 0, 0, 0, 0, - 0, 0, 0,0x5F30, 0, 0,0x5F31, 0, - 0, 0, 0, 0,0x3442, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5F36, 0, -0x5F35,0x5F37, 0, 0, 0, 0, 0,0x5F3A, - 0, 0, 0, 0, 0, 0,0x4543, 0, -0x5F34, 0, 0, 0, 0, 0,0x5F38, 0, - 0, 0, 0, 0, 0,0x3763,0x4279,0x5F32, -0x473B, 0, 0,0x5F39, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5F3E,0x5F3C, 0, 0,0x5F3F, 0, 0, -0x5F42, 0, 0, 0,0x5F3B,0x396A,0x4728, 0, - 0,0x5E39, 0, 0, 0, 0, 0, 0, -0x4D74,0x5F3D, 0,0x5F41,0x4275, 0,0x5F40, 0, -0x5F2B, 0, 0,0x6F69, 0, 0, 0,0x5F45, - 0, 0, 0,0x5F49, 0, 0,0x5F47, 0, - 0, 0, 0, 0, 0, 0,0x5F43, 0, -0x5F44, 0, 0, 0,0x5F48, 0,0x5F46, 0, - 0, 0,0x494E, 0, 0,0x5F4E, 0,0x5F4B, -0x5F4A, 0,0x5F4D,0x4654,0x5F4F, 0, 0, 0, - 0, 0, 0,0x4375,0x426D, 0, 0, 0, - 0,0x4025, 0, 0, 0,0x5F50, 0,0x5F52, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5F51, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5E75, 0, 0, 0, 0,0x5F53, 0, - 0, 0, 0, 0, 0,0x4667, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5F54, 0, 0, 0, 0, 0, 0, 0, -0x3250, 0, 0, 0,0x4574,0x3325, 0, 0, - 0, 0, 0, 0, 0,0x3564, 0, 0, - 0,0x3C5E,0x3A52, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4F27,0x3F66, - 0, 0, 0,0x316A, 0, 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 0,0x5F71, 0, 0, - 0,0x5F72, 0, 0, 0, 0,0x472E, 0, - 0, 0, 0, 0, 0, 0,0x5F74, 0, - 0, 0, 0,0x5F75, 0, 0, 0, 0, -0x4733, 0, 0, 0, 0,0x4575,0x5F77, 0, - 0, 0, 0,0x5F79, 0,0x4E55, 0,0x5F76, - 0,0x5F78,0x316D, 0,0x5F73, 0, 0, 0, - 0, 0, 0, 0,0x535B,0x5F7A, 0, 0, - 0, 0,0x4167,0x3B38,0x5F7C, 0, 0, 0, - 0,0x5F7B,0x3F24,0x5259, 0, 0, 0, 0, - 0, 0,0x5F7D, 0, 0, 0,0x6021, 0, -0x5F6E,0x5F7E, 0, 0,0x6022, 0, 0, 0, - 0, 0, 0,0x477A, 0, 0, 0, 0, - 0, 0,0x6023, 0, 0,0x6024, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6025, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6026, 0,0x445E, - 0,0x6028,0x6027, 0, 0,0x6029, 0,0x602A, - 0, 0,0x3C5F,0x4963, 0, 0, 0,0x4C6C, -0x602B,0x602C,0x4156,0x3C24,0x602D,0x602E, 0, 0, - 0, 0, 0,0x602F,0x4A52,0x4847, 0, 0, -0x6030,0x4757, 0, 0, 0, 0, 0,0x442D, - 0, 0, 0, 0, 0,0x6031,0x3267, 0, -0x356D, 0,0x4C46, 0,0x4C36, 0,0x3234,0x4F34, - 0, 0, 0, 0,0x4B52, 0,0x4A2A, 0, - 0, 0, 0, 0, 0, 0, 0,0x4037, - 0,0x6032, 0, 0, 0, 0,0x4643, 0, - 0, 0,0x3823,0x6033, 0,0x3A54,0x6035,0x6034, - 0, 0, 0, 0,0x6036, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6037, - 0, 0, 0,0x6038, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x353E, 0,0x6039, - 0, 0, 0, 0,0x603A, 0, 0, 0, - 0,0x3824, 0, 0,0x4848, 0, 0,0x603C, - 0, 0, 0,0x3E75, 0, 0,0x603B, 0, - 0, 0, 0, 0, 0, 0, 0,0x3638, -0x603D,0x603F, 0,0x603E, 0, 0, 0, 0, - 0, 0, 0,0x6040, 0,0x3851, 0,0x6041, - 0, 0, 0, 0,0x3669, 0,0x4140, 0, -0x397D, 0, 0, 0, 0,0x6043,0x6044,0x6042, - 0, 0, 0, 0, 0, 0,0x3C6D, 0, - 0,0x4648,0x3639, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6046,0x432C,0x6045, 0, - 0,0x4F35,0x4762, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6049, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x604B,0x6048, 0, 0, 0, -0x4C54,0x604A,0x604C, 0,0x4E44, 0, 0, 0, - 0, 0,0x6050, 0, 0, 0,0x604F,0x4376, -0x472D, 0, 0,0x3825,0x604E, 0, 0, 0, - 0,0x604D, 0,0x4D31,0x4D32, 0, 0, 0, - 0, 0, 0,0x6051,0x316E, 0, 0, 0, - 0,0x3976,0x3B62, 0, 0, 0, 0, 0, - 0, 0, 0,0x6052,0x6053, 0, 0, 0, - 0, 0, 0, 0,0x6055, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3D43, 0, 0, 0, 0,0x6057, 0,0x6056, - 0, 0, 0, 0, 0,0x6058, 0,0x334D, - 0, 0,0x605A, 0, 0,0x6059, 0,0x605C, -0x605B, 0, 0, 0, 0, 0, 0, 0, - 0,0x383C, 0, 0,0x4E28, 0,0x364C, 0, -0x3226, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x366A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3461, 0, - 0, 0, 0, 0, 0, 0, 0,0x4E68, -0x605E, 0, 0, 0, 0, 0, 0, 0, -0x6060, 0, 0, 0, 0,0x6061, 0,0x3251, - 0, 0, 0, 0, 0,0x605D, 0,0x3B39, - 0, 0,0x4441,0x605F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6064, 0,0x3C6E, 0, 0, - 0, 0,0x6062, 0, 0, 0, 0,0x373E, - 0, 0,0x4849,0x6063, 0, 0,0x607E, 0, - 0, 0, 0, 0, 0,0x6069, 0, 0, - 0, 0, 0,0x383D, 0, 0, 0, 0, -0x3565, 0,0x6066,0x4D7D, 0, 0,0x4E30}; - -/* page 37 0x7422-0x7845 */ -static uint16 tab_uni_jisx020837[]={ -0x4276, 0, 0,0x6068, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x606A,0x4E56,0x3657,0x487C,0x474A, 0, 0, 0, -0x606B, 0, 0, 0, 0,0x606D, 0,0x6070, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x606C, 0, 0, 0,0x606F, -0x386A,0x314D,0x6071, 0,0x3F70,0x606E,0x4E5C, 0, - 0,0x6074,0x7424, 0, 0, 0, 0,0x6072, -0x6075, 0, 0, 0, 0,0x6067,0x6073, 0, - 0,0x3A3C, 0, 0,0x6076, 0, 0, 0, - 0, 0, 0, 0,0x6077, 0, 0, 0, - 0,0x4D7E, 0, 0, 0, 0, 0, 0, - 0,0x6078, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6079, 0, 0, 0, -0x6065, 0, 0, 0, 0,0x607A, 0, 0, - 0, 0, 0, 0, 0, 0,0x3444, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3C25, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x607B, 0, 0, 0, 0,0x607C, 0, 0, - 0, 0,0x607D, 0, 0, 0, 0, 0, - 0, 0,0x313B, 0, 0, 0,0x6121, 0, -0x493B,0x6122, 0, 0,0x3424,0x6123, 0,0x6124, - 0, 0, 0, 0,0x6125, 0,0x6127,0x6128, -0x6126, 0, 0, 0,0x4953,0x612A,0x6129, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x612C,0x612B,0x612D, 0, 0, 0, 0, - 0, 0,0x612E,0x6130,0x612F, 0, 0,0x3979, - 0,0x6132, 0,0x6131, 0, 0,0x3445, 0, -0x3F53, 0,0x453C, 0,0x6133,0x4038, 0, 0, - 0,0x3B3A, 0,0x3179,0x6134, 0,0x4D51, 0, - 0,0x4A63,0x6135, 0, 0, 0,0x4544,0x4D33, -0x3943,0x3F3D, 0, 0, 0,0x434B,0x5234, 0, -0x442E,0x3268,0x6136, 0, 0, 0, 0, 0, - 0, 0,0x6137, 0,0x613C, 0, 0,0x613A, -0x6139,0x5A42,0x3326,0x6138, 0,0x305A, 0,0x482A, - 0, 0,0x484A, 0, 0, 0, 0,0x4E31, -0x613D,0x613B,0x435C,0x4026, 0, 0,0x482B, 0, -0x492D, 0,0x613F,0x4E2C,0x374D,0x6140, 0,0x613E, -0x4856,0x6141, 0,0x6142, 0, 0,0x305B, 0, - 0,0x3E76,0x6147, 0,0x6144,0x466D,0x6143, 0, - 0, 0, 0, 0, 0,0x3526, 0, 0, -0x614A, 0, 0, 0,0x6145,0x6146, 0,0x6149, -0x6148,0x4925, 0, 0,0x4142,0x4141, 0,0x353F, - 0, 0,0x614B, 0, 0, 0, 0, 0, -0x614C, 0, 0,0x614D, 0, 0, 0, 0, - 0,0x614F, 0,0x614E, 0, 0, 0, 0, - 0,0x3156, 0, 0, 0, 0, 0,0x6157, -0x4868,0x6151, 0,0x6153, 0, 0,0x6155,0x3F3E, - 0, 0,0x6156,0x6154,0x3C40, 0, 0, 0, -0x6150,0x6152, 0,0x4942, 0,0x3E49, 0, 0, -0x6159, 0, 0,0x6158, 0, 0, 0, 0, -0x615A, 0,0x3C26,0x3A2F, 0, 0,0x4577,0x615B, - 0,0x444B, 0, 0,0x615D, 0, 0, 0, -0x4E21,0x615C, 0, 0, 0, 0, 0,0x4169, - 0, 0, 0, 0, 0, 0,0x6162, 0, -0x6164,0x6165,0x4354, 0, 0, 0, 0, 0, -0x6163, 0,0x6160, 0,0x615E,0x615F, 0,0x6161, - 0, 0, 0, 0, 0, 0, 0,0x6168, - 0,0x6166, 0,0x6167, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6169,0x616B,0x616C, -0x616D, 0,0x616E, 0, 0,0x616A, 0, 0, - 0, 0, 0, 0, 0, 0,0x6170, 0, - 0, 0,0x616F, 0, 0, 0, 0, 0, - 0,0x6171, 0, 0, 0, 0, 0, 0, -0x4E45, 0, 0, 0,0x6174,0x6172,0x6173, 0, - 0, 0,0x3462, 0, 0, 0, 0, 0, -0x4C7E, 0, 0, 0,0x4A4A, 0,0x6176, 0, - 0, 0,0x6175, 0, 0, 0, 0,0x6177, -0x6178, 0, 0, 0, 0,0x617C,0x6179,0x617A, -0x617B, 0,0x617D, 0, 0, 0,0x617E, 0, -0x6221, 0, 0, 0,0x6222, 0,0x6223, 0, -0x482F,0x4550,0x6224,0x4772,0x4934, 0,0x6225, 0, - 0,0x6226,0x452A, 0,0x3327,0x3944,0x6227, 0, - 0,0x6228, 0, 0,0x6229, 0,0x3B29, 0, - 0,0x622B, 0, 0,0x622A, 0, 0,0x622C, -0x622D, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4869, 0,0x622E, 0, - 0, 0,0x622F, 0, 0,0x7369,0x6230,0x6231, -0x6232, 0, 0, 0, 0,0x3B2E, 0, 0, -0x6233,0x4756, 0, 0,0x4B5F, 0,0x314E, 0, -0x3157, 0, 0,0x6234, 0, 0, 0, 0, -0x6236, 0, 0, 0,0x6235,0x4570, 0, 0, - 0,0x4039,0x5D39, 0,0x6237,0x4C41, 0,0x6238, - 0,0x3446,0x4857,0x6239, 0,0x623A, 0, 0, -0x623B, 0, 0, 0,0x4C5C, 0, 0, 0, -0x4C55, 0,0x443E, 0, 0, 0,0x416A, 0, - 0,0x623D, 0, 0,0x3D62, 0, 0,0x3E4A, - 0, 0,0x6240, 0, 0,0x623F,0x623E,0x487D, - 0,0x3447,0x3829, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6246, 0, 0,0x6243,0x3F3F,0x4C32, 0, - 0, 0,0x6242,0x6244,0x6245, 0, 0,0x6241, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6247,0x6248, 0, -0x442F, 0,0x3463, 0, 0, 0,0x4365, 0, - 0, 0, 0, 0, 0,0x6249, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x624A,0x624D, 0, 0, 0, 0, 0,0x3F67, - 0,0x4644, 0,0x624E,0x4B53, 0,0x624B, 0, - 0,0x624C, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6251, - 0, 0, 0, 0,0x6250,0x624F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6253, 0, 0,0x6252, 0, 0,0x6254, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6256, 0,0x6255, 0, - 0, 0, 0,0x4A4D, 0, 0, 0, 0, - 0, 0,0x3D56,0x4E46, 0, 0,0x6257, 0, - 0,0x4637, 0, 0,0x6258, 0, 0,0x6259, - 0,0x625D,0x625B,0x625C, 0,0x625A, 0, 0, - 0, 0, 0, 0, 0,0x625E, 0, 0, - 0, 0, 0,0x625F, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6260, 0, 0, -0x6261,0x4C37,0x6262, 0, 0, 0, 0, 0, -0x4C70,0x6263, 0,0x434E, 0,0x476A, 0,0x366B, - 0, 0, 0,0x433B,0x6264,0x363A, 0, 0, - 0,0x4050, 0, 0, 0, 0, 0, 0, - 0, 0,0x6265, 0, 0, 0, 0, 0, -0x3A3D, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6266, 0, 0, 0, 0, 0, -0x6267, 0,0x3826,0x3A55, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6269, 0, - 0, 0, 0,0x4556,0x3A56,0x354E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4B24, 0,0x474B, 0, 0, 0, 0, 0, -0x4557, 0, 0, 0, 0,0x395C, 0, 0, - 0, 0, 0,0x626B}; - -/* page 38 0x785D-0x7E9C */ -static uint16 tab_uni_jisx020838[]={ -0x3E4B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4E32,0x3945, - 0, 0,0x3827, 0, 0,0x4823, 0,0x626D, - 0, 0, 0, 0, 0, 0, 0,0x626F, - 0, 0, 0, 0,0x386B, 0, 0, 0, - 0,0x626E,0x4476, 0, 0, 0, 0,0x6271, -0x3337,0x626C, 0, 0,0x486A, 0,0x3130, 0, -0x3A6C, 0,0x4F52, 0, 0,0x6270, 0, 0, - 0, 0, 0, 0, 0, 0,0x6272, 0, - 0, 0,0x4A4B, 0,0x4059,0x6274, 0, 0, - 0, 0,0x6275, 0, 0, 0, 0, 0, -0x6273, 0, 0, 0, 0,0x334E, 0,0x627B, - 0,0x627A, 0, 0,0x3C27, 0, 0, 0, -0x627C,0x6277, 0, 0, 0,0x627D,0x6278, 0, - 0, 0, 0,0x4858,0x6276, 0, 0,0x6279, - 0, 0, 0, 0, 0,0x6322, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6321,0x4B61, 0, 0, 0,0x627E, - 0, 0,0x306B, 0, 0, 0, 0,0x6324, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6323, 0, 0, 0,0x3E4C, 0, 0, 0, - 0, 0,0x6325, 0, 0, 0, 0, 0, - 0,0x4143, 0, 0,0x6327,0x6326, 0, 0, - 0, 0, 0, 0,0x6328, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6268, 0, 0, 0,0x626A,0x632A,0x6329, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3C28, 0,0x4E69, - 0,0x3C52, 0,0x632B,0x3737, 0, 0, 0, - 0, 0,0x3540,0x3527,0x3B63, 0, 0, 0, - 0, 0, 0,0x4D34, 0, 0,0x6331, 0, -0x6330,0x4144,0x632D, 0, 0,0x632F, 0, 0, -0x3D4B,0x3F40,0x632E,0x632C, 0,0x472A, 0, 0, -0x3E4D, 0, 0,0x493C, 0, 0, 0, 0, -0x3A57, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4578, 0, 0,0x6332, 0, 0, - 0, 0,0x6333,0x6349,0x3658, 0, 0,0x4F3D, -0x4135, 0, 0, 0, 0,0x6334, 0, 0, -0x3252,0x4477,0x4A21, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6335, 0, 0, 0, 0, 0, 0, 0, - 0,0x357A,0x6336, 0, 0,0x6338, 0, 0, - 0,0x6339, 0,0x4729, 0, 0,0x633A, 0, - 0, 0, 0, 0,0x633B,0x633C, 0, 0, -0x3659,0x3253,0x4645,0x3D28,0x3B64, 0, 0, 0, - 0, 0, 0, 0,0x633D, 0,0x3D29, 0, - 0, 0, 0, 0,0x324A,0x4943, 0, 0, -0x633E, 0, 0,0x486B, 0, 0, 0, 0, - 0, 0,0x4145, 0,0x6341, 0,0x6342,0x4769, - 0,0x3F41,0x633F, 0,0x4361, 0, 0,0x6340, - 0, 0, 0,0x3E4E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x305C, 0, - 0, 0, 0,0x3529, 0, 0, 0, 0, - 0, 0, 0,0x6343, 0, 0,0x4478, 0, -0x6344,0x4047, 0, 0, 0, 0, 0,0x4C2D, - 0, 0,0x4923,0x6345,0x6346,0x4355, 0,0x4E47, - 0, 0,0x6348,0x6347, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3C6F, 0, 0,0x634A,0x3070, 0, 0, - 0, 0,0x634D, 0, 0, 0,0x634B,0x3254, -0x374E,0x634C,0x3946,0x3972, 0,0x4A66,0x634E, 0, - 0,0x4B54, 0, 0,0x6350, 0, 0, 0, -0x4051,0x314F,0x323A,0x302C, 0, 0, 0, 0, - 0, 0,0x634F, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6351,0x6352,0x3E77, 0, - 0, 0, 0, 0,0x6353, 0,0x334F, 0, - 0, 0, 0,0x6355, 0, 0, 0,0x376A, - 0,0x3566, 0, 0,0x6356,0x3675, 0, 0, -0x6357, 0,0x407C, 0,0x464D, 0,0x4060,0x3A75, - 0, 0, 0,0x6358, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4362,0x416B, 0, -0x635A,0x635C,0x6359,0x635B, 0, 0, 0, 0, - 0, 0,0x3722, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x635D,0x3726, 0, 0, - 0,0x3567,0x4D52,0x635F, 0, 0, 0, 0, - 0,0x6360, 0, 0, 0,0x312E, 0, 0, - 0, 0,0x6363, 0, 0, 0,0x3376,0x6362, -0x6361, 0,0x6365,0x635E, 0,0x6366,0x4E29, 0, -0x6367, 0,0x6368, 0, 0,0x5474,0x636A, 0, -0x6369, 0, 0, 0,0x636B,0x636C, 0,0x4E35, -0x636D, 0,0x706F,0x3E4F,0x636E,0x636F,0x3D57, 0, -0x4638,0x6370, 0, 0, 0,0x4328, 0, 0, -0x6371, 0,0x433C,0x6372, 0, 0, 0, 0, - 0,0x3625, 0,0x513F,0x435D,0x3C33, 0, 0, - 0, 0,0x3448, 0, 0,0x6373, 0,0x6422, - 0,0x6376, 0,0x3568, 0,0x6375,0x6424, 0, - 0, 0,0x6374, 0,0x3E50, 0, 0, 0, - 0, 0, 0,0x6378,0x6379, 0,0x452B, 0, - 0,0x637A, 0,0x335E, 0, 0, 0, 0, -0x3F5A,0x4964, 0,0x637C, 0, 0, 0,0x4268, - 0, 0, 0, 0, 0, 0,0x6377, 0, -0x637B,0x637D, 0, 0,0x3A7B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6426,0x492E, 0,0x4826,0x4579, 0,0x365A,0x6425, -0x6423, 0,0x4835,0x637E,0x435E,0x457B, 0,0x457A, - 0,0x3A76, 0, 0, 0, 0, 0, 0, -0x6438, 0, 0, 0, 0, 0, 0, 0, -0x6428, 0,0x642A, 0, 0, 0, 0,0x642D, - 0,0x642E, 0,0x642B,0x642C, 0, 0,0x6429, -0x6427, 0, 0, 0, 0,0x6421, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4A4F,0x3255, 0, 0, 0,0x6435, 0, -0x6432, 0,0x6437, 0, 0,0x6436, 0,0x4773, -0x4C27, 0,0x3B3B,0x6430,0x6439,0x6434, 0,0x6433, -0x642F, 0,0x6431, 0,0x3449, 0, 0, 0, - 0, 0, 0, 0, 0,0x433D, 0, 0, -0x407D, 0, 0, 0,0x4822, 0, 0,0x643E, - 0, 0, 0,0x4824, 0, 0, 0, 0, - 0, 0, 0,0x4061,0x643B, 0, 0,0x484F, - 0,0x643F,0x4A53, 0,0x435B, 0,0x643A,0x643C, - 0, 0,0x643D, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6440, 0, 0,0x3C44, 0, 0, 0,0x4646, -0x6445,0x6444, 0, 0,0x6441, 0, 0, 0, -0x4F36, 0, 0, 0, 0, 0,0x644A, 0, - 0,0x644E,0x644B, 0, 0, 0, 0, 0, - 0, 0, 0,0x6447, 0, 0, 0, 0, - 0, 0,0x6448, 0, 0, 0, 0, 0, -0x644D, 0, 0, 0,0x6442,0x5255,0x6449,0x6443, - 0, 0,0x644C, 0, 0, 0, 0, 0, - 0, 0,0x6452, 0,0x344A, 0,0x644F, 0, - 0, 0,0x6450, 0, 0,0x6451,0x6454, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6453,0x4876, 0, 0, 0, 0, -0x6455,0x4E7C,0x4A6D,0x645A, 0, 0,0x6457, 0, - 0, 0, 0, 0, 0, 0, 0,0x6456, -0x4052, 0,0x6459,0x645B, 0, 0, 0,0x6458, - 0,0x645F, 0,0x645C, 0, 0, 0, 0, - 0, 0,0x645D,0x6446, 0, 0, 0,0x645E, -0x6460, 0, 0, 0, 0, 0, 0,0x6461, - 0, 0, 0, 0, 0, 0,0x4A46, 0, -0x6462, 0, 0, 0, 0, 0, 0, 0, - 0,0x4C62, 0, 0,0x364E,0x3729,0x6463, 0, - 0, 0, 0, 0,0x4A34, 0,0x3F68, 0, -0x4C30, 0, 0,0x6464, 0,0x4E33, 0, 0, -0x4774, 0,0x4146,0x4734, 0, 0,0x3D4D, 0, - 0, 0,0x3040, 0,0x6469,0x6467, 0,0x6465, -0x3421, 0,0x3E51,0x646A, 0, 0,0x6468, 0, -0x6466,0x646E, 0, 0,0x646D,0x646C,0x646B, 0, - 0, 0, 0, 0,0x646F, 0, 0, 0, -0x6470,0x403A, 0,0x6471, 0,0x6473, 0, 0, -0x6472, 0, 0, 0, 0,0x3852, 0, 0, - 0,0x4138, 0, 0, 0,0x6475, 0, 0, - 0,0x457C, 0,0x6474, 0, 0, 0,0x6476, - 0,0x4A35,0x416C,0x3947, 0,0x6477, 0, 0, - 0, 0,0x4E48, 0, 0, 0, 0, 0, - 0, 0,0x6479, 0, 0,0x647A, 0,0x647B, - 0,0x647C, 0,0x3B65, 0,0x647D,0x374F, 0, - 0,0x356A, 0,0x352A, 0,0x6521, 0,0x4C73, -0x3948,0x647E, 0, 0, 0,0x6524,0x4C66, 0, -0x473C, 0, 0,0x4933, 0, 0, 0,0x3D63, -0x6523, 0,0x3C53,0x3949,0x3B66,0x3569,0x4A36,0x6522, - 0, 0, 0,0x4147,0x4B42,0x3A77, 0, 0, - 0, 0, 0, 0, 0, 0,0x3B67,0x445D, - 0,0x6527,0x4E5F,0x3A59, 0,0x6528,0x3F42, 0, -0x652A, 0, 0, 0,0x3E52,0x3A30, 0, 0, - 0, 0,0x6529, 0, 0,0x3D2A,0x383E,0x4148, -0x6525,0x652B, 0, 0, 0, 0,0x6526,0x3750, - 0,0x652E,0x6532,0x376B, 0, 0, 0, 0, - 0,0x652D, 0, 0, 0, 0,0x6536, 0, - 0,0x394A, 0, 0,0x4D6D,0x303C,0x6533, 0, - 0,0x356B, 0,0x6530, 0, 0, 0, 0, - 0,0x6531, 0, 0,0x457D,0x652F,0x652C, 0, -0x3328,0x4064, 0, 0,0x3828, 0, 0, 0, -0x6538, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6535, 0, 0, 0, - 0, 0,0x6537, 0, 0, 0,0x6534, 0, - 0, 0, 0, 0,0x3751,0x4233,0x6539,0x416E, - 0, 0,0x6546, 0, 0,0x6542,0x653C, 0, - 0, 0, 0, 0, 0, 0,0x6540,0x3C7A, -0x305D,0x653B,0x6543,0x6547,0x394B,0x4C56, 0,0x4456, -0x653D, 0, 0,0x6545, 0,0x653A,0x433E, 0, -0x653F,0x303D,0x4C4A, 0, 0, 0, 0, 0, - 0, 0,0x653E, 0, 0,0x365B,0x486C, 0, - 0, 0,0x416D, 0,0x4E50,0x3D6F, 0, 0, -0x656E, 0, 0,0x6548, 0,0x407E, 0,0x6544, -0x6549,0x654B, 0,0x4479,0x654E, 0, 0,0x654A, - 0, 0, 0,0x4A54,0x344B, 0, 0,0x4C4B, - 0, 0,0x305E, 0, 0,0x654D, 0,0x4E7D, - 0, 0, 0, 0, 0, 0,0x654C, 0, - 0, 0, 0, 0,0x316F, 0, 0,0x466C, -0x654F, 0, 0, 0,0x6556,0x6550,0x6557, 0, - 0, 0, 0, 0, 0,0x6553, 0, 0, - 0, 0, 0, 0, 0, 0,0x477B, 0, - 0,0x3C4A,0x6555, 0,0x6552,0x6558,0x6551, 0, - 0,0x3D44, 0, 0, 0, 0,0x4B25, 0, - 0,0x3D4C, 0, 0,0x6554,0x6560, 0, 0, -0x655C, 0,0x655F, 0,0x655D,0x6561,0x655B, 0, -0x6541,0x4053, 0, 0,0x484B, 0,0x655E, 0, - 0,0x6559, 0, 0, 0,0x4121,0x3752, 0, -0x3D2B, 0, 0, 0, 0, 0, 0,0x3F25, -0x4136,0x6564, 0, 0,0x6566,0x6567, 0, 0, -0x6563,0x6565, 0, 0, 0, 0, 0, 0, - 0,0x655A,0x6562, 0,0x656A,0x6569, 0, 0, -0x4B7A, 0, 0,0x372B, 0, 0, 0, 0, - 0, 0, 0, 0,0x6568, 0,0x656C,0x656B, -0x656F, 0,0x6571, 0, 0,0x3B3C,0x656D, 0, - 0, 0, 0,0x6572,0x6573, 0, 0,0x6574, - 0,0x657A,0x453B,0x6576, 0,0x6575,0x6577,0x6578, - 0,0x6579, 0, 0, 0, 0,0x657B,0x657C -}; - -/* page 39 0x7F36-0x8358 */ -static uint16 tab_uni_jisx020839[]={ -0x344C, 0,0x657D, 0,0x657E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6621, - 0, 0, 0, 0, 0, 0,0x6622,0x6623, -0x6624, 0,0x6625,0x6626, 0, 0,0x6628,0x6627, - 0, 0,0x6629, 0, 0, 0, 0, 0, - 0,0x662A,0x662B, 0, 0, 0, 0, 0, - 0,0x662E,0x662C,0x662D,0x3A61,0x3753, 0, 0, -0x4356, 0,0x4833, 0,0x3D70, 0, 0,0x474D, - 0,0x486D,0x662F,0x586D, 0, 0, 0, 0, - 0, 0, 0, 0,0x6630,0x6632, 0,0x4D65, -0x6631,0x6634,0x6633, 0,0x4D53, 0,0x6635, 0, -0x487E, 0, 0, 0, 0, 0,0x6636, 0, - 0, 0, 0, 0,0x6639, 0, 0,0x6638, -0x6637, 0, 0, 0, 0,0x663A,0x3732, 0, - 0, 0,0x4122,0x3541, 0, 0, 0, 0, -0x663E,0x663B, 0, 0,0x663C, 0, 0, 0, -0x663F, 0,0x6640,0x663D, 0, 0, 0,0x3129, - 0, 0, 0,0x3227, 0, 0, 0,0x6642, -0x6643, 0, 0, 0,0x6644, 0,0x4D62, 0, - 0, 0, 0, 0,0x3D2C, 0,0x6646,0x6645, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3F69,0x6647, 0, 0, 0, 0, -0x6648, 0, 0,0x6649, 0,0x3465, 0, 0, - 0, 0,0x344D, 0, 0,0x664A, 0, 0, - 0, 0, 0,0x664B, 0,0x4B5D,0x4D63, 0, - 0, 0,0x4D54,0x4F37, 0,0x394D,0x664E,0x3C54, -0x664D, 0, 0, 0, 0,0x664F,0x3C29, 0, - 0, 0,0x4251, 0,0x6650, 0, 0,0x394C, - 0,0x4C57,0x6651,0x6652, 0, 0,0x6653, 0, - 0, 0, 0,0x6654, 0, 0, 0, 0, - 0, 0,0x6655, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3C2A, 0, 0, -0x4C6D, 0, 0, 0, 0,0x6657, 0,0x433F, - 0,0x6656, 0, 0, 0, 0, 0, 0, -0x6659, 0, 0, 0,0x6658, 0, 0, 0, - 0, 0, 0, 0,0x665A, 0, 0, 0, -0x403B, 0,0x665B, 0,0x665C, 0, 0, 0, -0x4A39,0x665D, 0,0x416F,0x665E, 0, 0, 0, - 0, 0,0x665F, 0, 0, 0, 0, 0, - 0,0x4E7E,0x6662, 0,0x6661,0x6660,0x4430, 0, -0x6663,0x3F26, 0,0x6664, 0, 0, 0,0x6665, -0x4F38,0x6666, 0, 0, 0, 0,0x6667,0x6669, -0x6668,0x4825, 0,0x4679, 0,0x4F3E,0x4829, 0, - 0, 0, 0, 0, 0,0x666B, 0, 0, -0x3E53, 0,0x492A, 0,0x666C,0x666A, 0,0x344E, - 0, 0, 0,0x3854,0x3B68, 0, 0,0x486E, - 0, 0, 0,0x382A,0x4B43, 0,0x666F,0x666D, - 0,0x394E, 0,0x394F,0x3069, 0,0x3A68, 0, - 0, 0, 0, 0,0x4759, 0, 0, 0, - 0, 0, 0, 0, 0,0x305F,0x6674, 0, -0x4340, 0, 0, 0, 0, 0,0x4758, 0, -0x425B, 0, 0, 0, 0, 0, 0, 0, -0x6676, 0, 0,0x6672,0x6675,0x6670, 0,0x6673, -0x4B26, 0, 0,0x3855, 0, 0,0x307D,0x6671, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6678, 0,0x6679, 0, 0,0x4639, 0, - 0, 0,0x363B, 0, 0, 0,0x6726,0x473D, - 0, 0, 0, 0,0x3B69, 0, 0,0x363C, -0x4048,0x4F46,0x4C2E,0x6677,0x4054, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3553,0x667A, 0, 0, - 0, 0, 0, 0, 0,0x667C, 0, 0, - 0, 0, 0,0x667B, 0, 0, 0, 0, - 0,0x667D, 0,0x4326, 0,0x473E, 0, 0, - 0, 0, 0,0x4431, 0, 0, 0, 0, -0x6723, 0, 0, 0, 0, 0, 0, 0, -0x6722, 0, 0, 0, 0,0x667E, 0, 0, -0x3F55, 0,0x4965,0x6725, 0,0x6724,0x3950,0x4F53, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6735, 0, 0, 0, 0, 0,0x6729, -0x672A, 0, 0, 0, 0,0x3C70, 0, 0, -0x6728, 0,0x3978,0x6727, 0, 0,0x672B, 0, - 0, 0,0x4432,0x4A22,0x4123, 0, 0, 0, - 0,0x425C,0x672F, 0,0x6730,0x672C, 0, 0, - 0, 0,0x672D, 0,0x672E, 0, 0, 0, - 0,0x3951, 0, 0, 0,0x6736, 0,0x6732, - 0, 0, 0, 0,0x4966, 0,0x4B6C,0x4928, - 0, 0,0x6731, 0, 0,0x6734,0x6733, 0, - 0, 0,0x4B44,0x6737, 0, 0, 0, 0, - 0, 0,0x6738, 0, 0,0x4137, 0,0x6739, - 0, 0,0x673B, 0,0x673F, 0, 0,0x673C, -0x673A,0x473F,0x673D, 0,0x673E, 0, 0, 0, -0x3232, 0,0x6745,0x6740, 0, 0, 0,0x6741, - 0, 0, 0,0x6742, 0,0x4221, 0, 0, - 0, 0,0x6744,0x6743,0x6746, 0, 0, 0, - 0,0x6747,0x6748, 0, 0,0x3F43, 0,0x3269, - 0,0x6749,0x4E57, 0,0x3C2B, 0, 0,0x3D2D, - 0, 0, 0, 0, 0,0x3B6A,0x4357, 0, - 0, 0, 0, 0,0x674A,0x674B,0x3131, 0, -0x674C, 0, 0,0x674D,0x674E, 0, 0,0x674F, - 0,0x6750,0x363D,0x5A2A,0x6751, 0,0x4065,0x6752, -0x3C4B, 0,0x6753, 0,0x5030, 0, 0, 0, -0x6754,0x4A5E,0x345C, 0, 0,0x4124,0x3D58, 0, -0x4971,0x3D2E, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6755,0x3952,0x6756,0x484C, 0, -0x6764, 0, 0, 0, 0,0x6758, 0,0x4249, -0x4775,0x383F,0x6757,0x4125, 0, 0, 0, 0, - 0, 0,0x6759, 0, 0, 0, 0, 0, - 0,0x447A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x675B,0x675A,0x675D, 0, 0,0x675C, - 0,0x675E, 0, 0,0x6760, 0,0x675F, 0, -0x344F, 0,0x6761, 0,0x6762,0x6763, 0, 0, -0x3A31,0x4E49, 0,0x6765,0x3F27, 0, 0, 0, -0x3170,0x6766,0x6767, 0, 0, 0, 0, 0, -0x6768, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3072, 0,0x6769, - 0, 0, 0, 0,0x676A, 0, 0, 0, - 0, 0, 0,0x4967, 0, 0, 0,0x3C47, - 0,0x676C, 0, 0, 0, 0, 0,0x3329, -0x3032, 0, 0, 0, 0,0x676B,0x676E,0x474E, - 0,0x3F44, 0,0x3256, 0,0x4B27, 0, 0, - 0, 0,0x375D,0x365C, 0,0x676D, 0,0x326A, - 0, 0, 0, 0, 0, 0, 0,0x3423, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3171,0x6772,0x4E6A,0x425D, 0, - 0,0x4944, 0,0x677E, 0,0x3257,0x677C, 0, -0x677A,0x6771, 0,0x676F, 0,0x6770, 0,0x3C63, -0x366C,0x4377, 0, 0, 0,0x4651, 0, 0, - 0, 0, 0,0x3151, 0,0x6774,0x6773, 0, - 0, 0, 0,0x6779,0x6775,0x6778, 0, 0, - 0, 0, 0, 0,0x4C50,0x6777,0x3258,0x337D, -0x677B, 0, 0,0x677D, 0, 0, 0, 0, -0x3754, 0, 0, 0, 0, 0, 0, 0, -0x6823,0x682C,0x682D, 0, 0, 0,0x302B, 0, - 0, 0, 0, 0, 0,0x6834, 0, 0, - 0, 0,0x3071, 0, 0,0x682B, 0, 0, - 0,0x682A, 0,0x6825,0x6824, 0,0x6822,0x6821, -0x4363, 0,0x427B,0x6827, 0, 0, 0, 0, - 0, 0,0x6826, 0, 0, 0, 0,0x6829, - 0, 0, 0,0x4170,0x3755, 0, 0, 0, - 0,0x3141,0x6828, 0,0x3953, 0, 0, 0, - 0, 0,0x4171}; - -/* page 40 0x8373-0x8B9A */ -static uint16 tab_uni_jisx020840[]={ -0x683A, 0,0x683B, 0,0x3259, 0, 0, 0, -0x322E,0x6838, 0, 0, 0, 0, 0, 0, - 0, 0,0x682E, 0,0x6836, 0,0x683D,0x6837, - 0, 0, 0,0x6835, 0, 0, 0, 0, -0x6776, 0, 0,0x6833, 0, 0, 0,0x682F, - 0, 0, 0,0x3450,0x6831,0x683C, 0,0x6832, - 0, 0, 0, 0, 0,0x683E, 0,0x6830, -0x477C, 0, 0, 0, 0, 0,0x4D69, 0, - 0, 0,0x6839, 0, 0, 0, 0, 0, - 0, 0,0x684F, 0, 0, 0,0x6847, 0, - 0, 0,0x3F7B, 0, 0, 0, 0,0x3546, - 0,0x365D, 0,0x6842, 0, 0, 0, 0, -0x325B, 0, 0,0x3E54, 0,0x6845, 0, 0, - 0,0x3A5A, 0, 0,0x4551,0x684A, 0, 0, - 0, 0, 0, 0, 0, 0,0x4A6E, 0, -0x6841, 0, 0, 0,0x325A,0x3856,0x4929,0x684B, - 0,0x683F, 0, 0,0x6848, 0, 0, 0, -0x6852, 0,0x6843, 0, 0, 0, 0, 0, -0x6844,0x463A, 0, 0,0x6849, 0, 0, 0, -0x6846,0x4B28,0x684C,0x3060, 0, 0, 0, 0, -0x6840, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x684E, 0,0x684D, - 0, 0, 0, 0, 0, 0,0x476B,0x6854, - 0,0x685F, 0, 0, 0, 0,0x337E, 0, - 0, 0,0x6862, 0, 0,0x6850, 0, 0, - 0,0x6855,0x4D6E, 0, 0, 0, 0, 0, - 0, 0, 0,0x685E, 0, 0,0x4D55, 0, - 0, 0, 0,0x4E2A, 0, 0, 0, 0, - 0, 0, 0, 0,0x4378, 0, 0, 0, -0x336B, 0, 0, 0, 0, 0,0x4972,0x6864, -0x4621, 0, 0,0x3031, 0, 0,0x685D, 0, -0x6859,0x4172,0x6853,0x685B,0x6860, 0,0x472C, 0, - 0, 0,0x302A, 0,0x6858, 0,0x6861,0x4978, - 0, 0, 0, 0, 0, 0, 0,0x685C, - 0,0x6857, 0, 0, 0, 0, 0, 0, -0x3E55, 0, 0, 0, 0,0x3D2F, 0, 0, - 0,0x3C2C, 0, 0, 0, 0,0x4C58, 0, - 0,0x4947, 0, 0,0x6867, 0,0x6870, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x685A, 0, 0, 0, 0,0x3377, - 0, 0, 0, 0, 0,0x3E78,0x6865, 0, -0x686A,0x4173, 0, 0,0x6866, 0,0x686D, 0, - 0,0x435F, 0,0x686E, 0, 0,0x4D56,0x6863, -0x3338, 0,0x6869, 0, 0,0x686C,0x4C2C, 0, - 0, 0, 0,0x686F, 0, 0,0x6868,0x686B, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4B29, 0,0x4F21, 0, 0, 0, 0, - 0,0x6873, 0, 0, 0, 0, 0, 0, - 0,0x687A, 0, 0,0x6872,0x3C43, 0, 0, - 0, 0, 0,0x6851, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4A4E, 0, -0x4C22,0x6879,0x6878, 0,0x6874,0x6875, 0,0x3136, - 0, 0, 0, 0,0x6877, 0,0x6871, 0, - 0, 0, 0,0x4455, 0, 0, 0, 0, - 0,0x6876,0x307E, 0, 0, 0, 0, 0, - 0, 0,0x4222, 0, 0, 0, 0, 0, - 0, 0,0x4A43, 0, 0,0x687B,0x6921, 0, -0x4859, 0, 0, 0, 0,0x687E,0x3E56,0x3C49, -0x6923, 0, 0,0x363E, 0, 0, 0, 0, - 0, 0,0x6924, 0,0x4979,0x687D, 0,0x6856, - 0, 0, 0, 0, 0, 0, 0, 0, -0x687C, 0, 0, 0, 0,0x4F4F,0x4622,0x4973, - 0, 0,0x692B, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6931, 0, 0, 0, - 0, 0, 0,0x6932, 0,0x6925, 0, 0, - 0,0x4776, 0, 0,0x692F,0x6927, 0,0x6929, - 0, 0, 0, 0, 0,0x6933,0x6928, 0, - 0,0x692C, 0, 0,0x3172, 0,0x4665, 0, -0x692D,0x6930, 0, 0, 0, 0, 0, 0, - 0,0x6926, 0,0x4126, 0,0x692A,0x3B27,0x3F45, -0x3730,0x4C74, 0,0x4C79,0x3D72, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6937,0x6935, - 0, 0, 0, 0, 0, 0,0x4F4E, 0, - 0, 0, 0, 0, 0, 0,0x6934, 0, - 0, 0,0x4D75, 0,0x6936,0x6938, 0, 0, - 0, 0,0x6939, 0, 0, 0, 0, 0, - 0,0x693C,0x693A, 0, 0, 0, 0, 0, - 0,0x4623,0x693B, 0, 0, 0,0x484D,0x692E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3D73, 0,0x693D,0x6942, -0x4174, 0, 0,0x6941, 0, 0, 0,0x6922, - 0, 0, 0,0x6943,0x4149, 0, 0,0x693E, -0x6940, 0, 0, 0, 0, 0, 0, 0, -0x693F, 0, 0,0x5D31,0x5D22, 0, 0,0x6945, - 0, 0, 0, 0, 0, 0, 0,0x6944, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4D76, 0,0x623C,0x6946, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6947, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6948,0x3857, 0,0x3554, 0, 0, - 0,0x694A,0x515D, 0, 0, 0, 0,0x3575, - 0,0x4E3A, 0,0x3673,0x694B, 0, 0, 0, - 0, 0, 0, 0,0x694C, 0, 0, 0, -0x436E, 0, 0, 0, 0, 0,0x694D, 0, - 0, 0, 0, 0, 0, 0,0x467A, 0, -0x303A, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3263, -0x6952,0x6953, 0, 0, 0, 0, 0, 0, -0x694E, 0,0x3B3D, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x694F,0x4742, 0, 0, 0, 0,0x6950,0x6951, -0x695B, 0, 0, 0,0x6955,0x6958, 0, 0, - 0, 0, 0,0x6954, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6956, 0,0x6957,0x3C58, 0,0x6959, 0, -0x4341, 0,0x3756,0x3342, 0, 0, 0, 0, - 0,0x695C, 0, 0, 0, 0,0x333F, 0, -0x6961, 0, 0,0x695D,0x6960, 0, 0, 0, - 0,0x483A, 0, 0, 0, 0,0x695E, 0, - 0,0x695F,0x4948,0x485A,0x6962, 0, 0, 0, - 0, 0, 0, 0, 0,0x427D,0x696C, 0, -0x6968, 0, 0,0x326B, 0,0x6966, 0,0x4B2A, -0x6967, 0, 0,0x6964, 0,0x6965,0x696A,0x696D, - 0, 0,0x696B, 0, 0, 0,0x6969,0x6963, - 0, 0, 0, 0, 0,0x4358, 0,0x6974, - 0,0x4C2A, 0, 0, 0, 0, 0, 0, - 0, 0,0x6972, 0, 0, 0,0x6973, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x696E, 0, 0,0x6970, 0, 0, 0, -0x6971, 0, 0, 0,0x696F, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4066, 0, -0x4F39,0x6978, 0,0x6979, 0, 0, 0, 0, -0x6A21, 0,0x3F2A, 0,0x697B, 0,0x697E, 0, - 0, 0, 0, 0,0x6976,0x6975, 0, 0, -0x6A22, 0, 0,0x325C, 0,0x697C, 0,0x6A23, - 0, 0, 0,0x697D, 0, 0, 0, 0, - 0,0x697A, 0,0x4433, 0,0x6977, 0, 0, - 0, 0, 0, 0,0x4768, 0, 0,0x6A27, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4D3B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6A26, 0, 0,0x6A25, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6A2E, 0, 0, 0,0x6A28, 0, 0, 0, -0x6A30, 0, 0, 0, 0, 0, 0,0x4D66, -0x6A33, 0,0x6A2A, 0, 0,0x6A2B, 0, 0, - 0,0x6A2F, 0,0x6A32,0x6A31, 0, 0, 0, -0x6A29, 0, 0, 0, 0,0x6A2C, 0,0x6A3D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6A36, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6A34, 0, 0,0x6A35, - 0, 0, 0,0x6A3A,0x6A3B, 0,0x332A, 0, -0x3542, 0, 0,0x6A39, 0, 0, 0, 0, - 0, 0,0x6A24, 0, 0, 0, 0, 0, - 0, 0,0x6A38,0x6A3C,0x6A37, 0,0x6A3E, 0, - 0, 0,0x6A40,0x6A3F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6A42,0x6A41, -0x695A, 0, 0, 0,0x6A46, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6A43, 0, - 0, 0, 0,0x6A44, 0, 0,0x6A45, 0, -0x6A47, 0, 0, 0, 0,0x376C, 0,0x6A49, - 0,0x6A48, 0,0x3D30, 0, 0, 0, 0, - 0,0x3954,0x5E27, 0, 0, 0, 0,0x6A4A, -0x3D51, 0, 0, 0,0x3339, 0,0x6A4B, 0, -0x3152, 0,0x3E57,0x6A4C, 0, 0,0x3955,0x6A4D, -0x3061, 0, 0, 0, 0,0x493D, 0, 0, -0x6A4E, 0, 0, 0, 0,0x3F6A, 0,0x6A55, - 0, 0,0x6A52, 0,0x436F, 0, 0, 0, - 0, 0,0x6A53,0x6A50,0x365E, 0,0x6A4F,0x6A56, - 0, 0, 0, 0, 0,0x3736, 0, 0, -0x425E, 0,0x6A5C, 0, 0, 0, 0,0x6A58, - 0, 0, 0,0x4235,0x6A57, 0,0x6A5A, 0, - 0, 0, 0,0x6A51, 0, 0, 0,0x6A5B, - 0,0x6A5D, 0, 0, 0, 0, 0, 0, -0x486F, 0, 0,0x6A59, 0,0x6A5E,0x6A60, 0, - 0,0x3853,0x6A54, 0,0x3041, 0, 0, 0, - 0, 0, 0, 0,0x6A5F, 0,0x3A5B,0x4E76, -0x6A61,0x6A62,0x4175, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4E22, 0, 0, 0, - 0,0x6A63,0x4D35, 0, 0,0x6A64,0x6A65, 0, - 0,0x4A64,0x6A66, 0,0x3A40, 0,0x4E23, 0, - 0, 0, 0, 0, 0,0x6A6B, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6A6C, -0x3E58,0x6A6A, 0, 0, 0,0x4D67,0x6A67, 0, - 0,0x6A69,0x403D,0x3F7E, 0, 0, 0,0x6A68, - 0,0x6A6D, 0, 0,0x4A23, 0, 0,0x6A6F, - 0,0x6A6E, 0, 0, 0,0x336C, 0,0x4B2B, -0x6A70, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6A7C,0x6A72, 0, 0, 0, 0, - 0, 0,0x6A73, 0, 0, 0, 0,0x6A74, -0x6A75, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6A79, 0,0x6A7A, 0, 0, -0x6A78, 0, 0, 0, 0, 0,0x6A76, 0, -0x6A71,0x6A77, 0, 0, 0, 0, 0, 0, - 0,0x6A7B,0x7037, 0, 0, 0, 0, 0, - 0, 0, 0,0x3228, 0, 0, 0, 0, - 0, 0, 0,0x6A7E,0x365F,0x6A7D, 0, 0, - 0,0x6B22, 0,0x6B21, 0, 0, 0,0x6B24, - 0, 0,0x6B23, 0,0x6B25, 0, 0,0x3D31, - 0,0x6B26, 0, 0,0x6B27, 0, 0, 0, - 0, 0, 0,0x6B28,0x403E, 0,0x4D57, 0, -0x6B29, 0, 0,0x4A24,0x4746,0x6B2A, 0,0x6B2B, -0x382B, 0, 0, 0,0x352C, 0, 0, 0, -0x6B2C, 0, 0,0x3B6B,0x4741,0x6B2D, 0,0x3350, - 0, 0, 0, 0, 0, 0,0x6B2E, 0, - 0, 0, 0,0x6B30,0x4D77, 0,0x6B2F,0x3F46, - 0,0x6B31, 0, 0,0x6B32, 0, 0,0x6B33, -0x3451, 0, 0, 0, 0, 0, 0,0x6B34, - 0, 0,0x6B35, 0,0x6B36,0x6B37, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3351, - 0, 0, 0, 0, 0, 0, 0,0x6B38, - 0,0x6B39,0x6B3A, 0, 0, 0, 0, 0, -0x3272, 0, 0,0x3F28,0x6B3B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6B3C, 0, 0, 0,0x6B3D, 0, 0, - 0, 0, 0, 0, 0,0x3840, 0,0x447B, -0x6B3E, 0, 0, 0, 0,0x3757, 0,0x3F56, - 0,0x6B41, 0,0x4624, 0,0x6B40, 0, 0, -0x3731, 0, 0,0x6B3F,0x4277,0x352D, 0, 0, -0x6B42, 0,0x6B43, 0,0x3E59, 0, 0, 0, -0x376D, 0,0x6B44, 0, 0, 0, 0,0x4B2C, - 0, 0,0x405F, 0, 0, 0,0x3576, 0, -0x4C75,0x414A, 0,0x6B45, 0, 0, 0,0x3F47, -0x4370,0x3E5A, 0, 0, 0, 0,0x6B46, 0, - 0, 0, 0,0x6B49, 0,0x6B4A, 0, 0, - 0, 0, 0, 0, 0,0x3A3E,0x4242,0x6B48, - 0,0x3E5B,0x493E, 0, 0, 0, 0, 0, -0x6B47, 0, 0,0x3B6C, 0,0x3153, 0,0x6B4E, -0x3758, 0, 0,0x3B6E, 0, 0,0x3B6D, 0, -0x4F4D,0x6B4D,0x6B4C,0x4127, 0,0x354D,0x4F43,0x333A, -0x3E5C, 0, 0, 0, 0, 0, 0, 0, - 0,0x6B4B, 0, 0, 0, 0, 0,0x6B50, - 0,0x6B51,0x6B4F, 0,0x3858, 0,0x4D40, 0, - 0,0x3B6F,0x4727, 0, 0, 0,0x6B54, 0, -0x4040, 0,0x4342, 0, 0,0x4D36, 0,0x6B57, - 0, 0, 0,0x386C, 0,0x403F,0x6B53, 0, -0x6B58,0x386D,0x6B55,0x6B56, 0,0x6B52, 0, 0, - 0,0x4062,0x4649, 0, 0,0x432F, 0,0x325D, - 0, 0, 0, 0, 0, 0,0x4870, 0, - 0,0x3543, 0, 0,0x4434, 0, 0,0x6B5B, - 0,0x6B59, 0, 0,0x434C, 0, 0, 0, -0x4041,0x3452,0x6B5A, 0,0x3F5B, 0, 0,0x4E4A, - 0, 0, 0,0x4F40, 0, 0, 0,0x6B5C, -0x6B67,0x4435, 0,0x6B66, 0,0x6B63,0x6B6B,0x6B64, - 0,0x6B60, 0,0x447C,0x6B5F, 0, 0, 0, -0x6B5D, 0,0x4D21,0x3B70, 0, 0,0x6B61, 0, -0x6B5E, 0, 0, 0,0x6B65,0x3D74, 0,0x3841, - 0, 0, 0,0x427A, 0,0x4B45,0x315A,0x3062, - 0,0x4625, 0, 0,0x6B69, 0, 0, 0, - 0,0x6B68, 0,0x4666, 0,0x6B6D, 0, 0, - 0,0x6B62, 0,0x6B6C,0x6B6E, 0,0x382C,0x6B6A, -0x3956, 0,0x3C55, 0, 0,0x6B6F,0x4D58, 0, - 0, 0, 0,0x6B72, 0,0x6B75, 0, 0, -0x6B73,0x4935, 0, 0, 0, 0, 0, 0, -0x6B70, 0, 0, 0, 0, 0,0x3660, 0, - 0, 0, 0,0x6B74, 0, 0,0x6B76, 0, - 0, 0, 0, 0, 0, 0,0x6B7A, 0, - 0,0x6B77, 0,0x6B79,0x6B78, 0, 0, 0, - 0, 0, 0,0x6B7B, 0,0x3C31, 0,0x6B7D, -0x6B7C,0x4968, 0, 0,0x6C21, 0, 0, 0, - 0, 0, 0,0x3759, 0, 0, 0, 0, -0x6B7E,0x6C22, 0, 0,0x6C23,0x3544,0x6641,0x3E79, - 0,0x6C24, 0, 0,0x386E, 0, 0, 0, - 0, 0,0x6C25, 0, 0,0x6C26, 0, 0, -0x3B3E, 0, 0, 0, 0, 0, 0,0x5A4E, - 0,0x6C27, 0,0x6C28, 0,0x3D32, 0,0x6C29, -0x6C2A, 0, 0,0x6C2B, 0, 0,0x6C2C,0x6C2D -}; - -/* page 41 0x8C37-0x8D16 */ -static uint16 tab_uni_jisx020841[]={ -0x432B, 0, 0,0x6C2E, 0, 0, 0, 0, -0x6C30, 0,0x6C2F, 0, 0, 0, 0,0x4626, - 0,0x6C31, 0,0x4B2D, 0,0x6C32, 0,0x6C33, - 0,0x6C34, 0, 0, 0, 0,0x6C35, 0, - 0, 0, 0,0x465A, 0, 0, 0, 0, - 0, 0,0x3E5D,0x6C36, 0, 0, 0, 0, - 0, 0, 0,0x396B,0x502E,0x6C37, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6C38,0x493F,0x6C39, 0,0x6C41, 0, 0, - 0, 0, 0,0x6C3A, 0, 0,0x6C3C, 0, - 0, 0,0x6C3B,0x6C3D, 0,0x4B46,0x6C3E,0x6C3F, - 0, 0, 0, 0, 0,0x6C40, 0, 0, - 0,0x6C42, 0, 0, 0, 0,0x332D,0x4467, - 0,0x4969,0x3A62,0x3957, 0, 0, 0, 0, -0x494F,0x325F,0x484E,0x6C45,0x3453,0x4055,0x6C44,0x6C49, -0x4379,0x4C63, 0,0x6C47,0x6C48,0x352E, 0,0x6C4A, -0x4763,0x425F, 0, 0,0x4871,0x453D,0x6C46, 0, -0x4B47,0x326C,0x6C4C,0x4F28,0x4442,0x4F45, 0, 0, -0x3B71,0x6C4B, 0,0x4231, 0, 0,0x6C5C,0x4128, - 0, 0,0x4678, 0,0x4950, 0, 0, 0, - 0, 0, 0,0x6C4F,0x3B3F,0x3B72, 0,0x3E5E, - 0,0x4765, 0,0x382D,0x6C4E,0x6C4D, 0,0x496A, - 0, 0, 0,0x3C41, 0, 0,0x4552, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6C51,0x6C52,0x3958,0x6C50, 0, - 0, 0, 0, 0, 0,0x6C53,0x6C54, 0, -0x6C56,0x4223, 0,0x6C55,0x3466, 0,0x6C58, 0, -0x6C57,0x6C59, 0, 0,0x6C5B,0x6C5D, 0,0x6C5E -}; - -/* page 42 0x8D64-0x8F64 */ -static uint16 tab_uni_jisx020842[]={ -0x4056, 0,0x3C4F,0x6C5F, 0, 0, 0,0x3352, - 0,0x6C60, 0, 0,0x4176,0x6C61, 0,0x6C62, -0x496B, 0, 0,0x352F, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6C63, 0, 0, - 0,0x4436, 0, 0, 0, 0,0x315B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6C64, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3C71, - 0, 0, 0, 0,0x3F76, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x422D, - 0, 0, 0, 0, 0, 0,0x6C67, 0, - 0, 0,0x6C66, 0, 0, 0,0x6C65, 0, - 0, 0, 0, 0, 0, 0, 0,0x6C6D, -0x6C6B, 0, 0,0x6C68, 0, 0, 0, 0, - 0, 0,0x6C6A, 0, 0, 0,0x6C69,0x6C6C, - 0,0x3577, 0,0x6C70, 0,0x4057, 0,0x6C71, - 0, 0, 0, 0,0x3859, 0,0x6C6E,0x6C6F, - 0, 0, 0,0x4F29, 0, 0, 0,0x4437, - 0,0x4129, 0, 0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45,0x375A,0x6D48, 0, 0, 0, 0,0x3353, - 0,0x6D4A, 0, 0, 0,0x3A5C,0x6D49, 0, -0x6D52, 0, 0, 0, 0, 0,0x6D4C,0x6D4E, -0x4A65,0x6D4B, 0, 0, 0,0x6D4D, 0,0x6D51, -0x6D4F,0x3531, 0,0x6D50, 0, 0, 0, 0, - 0, 0,0x6D53, 0, 0,0x475A,0x4E58, 0, - 0, 0, 0,0x3D34, 0, 0, 0,0x6D54, - 0, 0, 0, 0,0x4D22,0x6D56, 0,0x6D55, - 0, 0,0x6D59,0x4D41, 0, 0,0x6D58, 0, -0x336D,0x6D57,0x6D5C, 0, 0,0x6D5B, 0, 0, -0x6D5A,0x4532,0x6D5D, 0, 0, 0, 0, 0, - 0, 0, 0,0x6D5E, 0, 0, 0, 0, -0x6D5F, 0, 0,0x396C, 0,0x3725,0x6D60,0x6D61, -0x6D62}; - -/* page 43 0x8F9B-0x9132 */ -static uint16 tab_uni_jisx020843[]={ -0x3F49,0x6D63, 0,0x3C2D,0x6D64, 0, 0, 0, -0x6D65, 0, 0, 0,0x5221,0x517E, 0, 0, - 0, 0,0x6D66,0x6570,0x6D67,0x4324,0x3F2B,0x4740, - 0, 0, 0, 0,0x6D68, 0, 0,0x4A55, -0x4454,0x397E, 0, 0,0x4329, 0, 0,0x312A, - 0,0x4B78,0x3F57, 0, 0, 0, 0, 0, - 0, 0, 0,0x375E, 0, 0,0x3661, 0, - 0,0x4A56, 0, 0, 0, 0, 0,0x6D69, - 0, 0, 0, 0, 0, 0, 0,0x6D6B, - 0, 0,0x6D6A,0x3260, 0, 0,0x4676,0x6D6C, -0x4777, 0,0x4533, 0,0x6D6D,0x3D52, 0, 0, - 0,0x6D6F, 0, 0,0x4C42,0x6D7E,0x6D71,0x6D72, - 0, 0,0x4449, 0, 0,0x4260,0x4177, 0, -0x4628, 0,0x6D70,0x3555, 0, 0, 0, 0, -0x6D79, 0,0x6D76,0x6E25,0x4629,0x4360,0x6D73, 0, -0x447E,0x4553,0x6D74,0x6D78,0x3F60, 0,0x4767,0x444C, - 0, 0,0x4042,0x6D77,0x422E,0x4224,0x6D75,0x3029, -0x4F22, 0, 0, 0,0x6D7A, 0, 0, 0, - 0, 0, 0,0x4261, 0, 0,0x3D35,0x3F4A, - 0, 0,0x6D7C,0x6D7B, 0,0x306F,0x6D7D, 0, - 0,0x492F, 0,0x6E27, 0, 0,0x465B,0x3F6B, - 0, 0,0x4359, 0,0x3678, 0,0x6E26,0x4D37, -0x313F, 0,0x4A57,0x3261,0x6E21,0x6E22,0x6E23,0x6E24, -0x463B,0x4323,0x3063,0x6E28, 0,0x6E29,0x7423, 0, - 0,0x423D, 0,0x6E2A, 0,0x3173,0x414C, 0, -0x382F, 0,0x4D5A, 0, 0,0x6E2B,0x452C, 0, - 0, 0,0x4178,0x3C57,0x6E2C, 0, 0,0x6E2F, - 0, 0,0x3D65,0x6E2D,0x412B,0x412A, 0,0x3064, - 0,0x4E4B,0x6E31, 0,0x4872,0x6E33,0x6E32,0x6E30, -0x6364,0x3454, 0, 0,0x6D6E, 0,0x6E35,0x6E34, - 0, 0, 0, 0,0x6E36, 0,0x4D38, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4661, 0, 0,0x4B2E, 0,0x6E37, 0,0x3C59, - 0, 0, 0, 0,0x6E38, 0,0x6E39, 0, - 0, 0,0x6E3A, 0, 0,0x4521, 0, 0, - 0, 0, 0, 0, 0, 0,0x306A, 0, - 0, 0, 0, 0, 0, 0, 0,0x3959, - 0, 0, 0,0x4F3A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6E3E, 0, 0, 0, 0, 0,0x3734,0x6E3B, - 0,0x6E3C, 0, 0, 0,0x4974, 0, 0, - 0, 0,0x3354, 0, 0, 0, 0, 0, - 0, 0,0x4D39, 0,0x363F, 0, 0, 0, - 0, 0,0x4554, 0, 0, 0, 0,0x6E3F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6E40, - 0, 0, 0, 0, 0, 0,0x6E41, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4522, 0, 0,0x6E43, 0,0x6E42 -}; - -/* page 44 0x9149-0x92B9 */ -static uint16 tab_uni_jisx020844[]={ -0x4653,0x6E44,0x3D36,0x3C60,0x475B,0x4371, 0, 0, - 0,0x3C72, 0,0x3F6C, 0,0x6E45, 0,0x6E46, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3F5D,0x6E47, 0,0x6E48, 0, 0, 0, -0x6E49,0x4D6F, 0,0x3D37, 0, 0, 0, 0, - 0,0x6E4B,0x6E4A, 0,0x395A, 0,0x3973,0x3B40, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6E4E, 0, 0, 0, 0,0x3D66, 0, -0x6E4D, 0,0x6E4C, 0,0x4269, 0, 0,0x386F, - 0,0x4043, 0, 0, 0, 0,0x4830, 0, - 0, 0, 0,0x3D39, 0, 0, 0, 0, - 0,0x6E4F, 0,0x3E5F, 0, 0, 0, 0, - 0,0x6E52,0x6E50, 0, 0, 0,0x6E51, 0, - 0, 0, 0,0x6E54,0x6E53, 0, 0,0x3E7A, - 0,0x6E55, 0, 0, 0, 0, 0,0x6E56, -0x6E57, 0, 0, 0, 0,0x4850,0x3A53,0x3C61, -0x6E58, 0,0x6E59,0x4E24,0x3D45,0x4C6E,0x4E4C,0x6E5A, -0x3662, 0, 0, 0, 0,0x6E5B, 0,0x4523, - 0, 0,0x6E5E,0x3378,0x3F4B, 0,0x6E5C, 0, -0x6E5D, 0,0x4460, 0, 0,0x4B55,0x367C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6E60,0x6E61, 0, 0, - 0, 0, 0,0x6E5F, 0, 0,0x6E63, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x465F,0x3343, 0, 0, -0x6E67, 0, 0,0x6E64,0x6E66, 0, 0, 0, - 0, 0, 0, 0, 0,0x6E62, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6F4F, 0, 0,0x6E65, 0, 0, 0, 0, - 0, 0, 0,0x4E6B, 0, 0,0x385A, 0, - 0, 0, 0, 0, 0, 0,0x6E6F, 0, - 0, 0, 0,0x4534,0x6E6A, 0, 0,0x6E6D, -0x6E6B, 0,0x6E70, 0, 0, 0, 0,0x6E71, - 0, 0, 0, 0, 0, 0,0x6E69, 0, - 0,0x6E76,0x3174, 0, 0,0x6E68, 0, 0, - 0,0x482D, 0,0x6E6C, 0,0x3E60, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x395B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4B48, 0,0x3664, - 0, 0,0x3D46, 0,0x463C, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x412D, 0,0x6E74, 0,0x6E6E,0x6E73, 0,0x4C43, - 0,0x4438,0x6E75,0x6E72, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x412C, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6E79, 0, -0x6E78}; - -/* page 45 0x92CF-0x93E8 */ -static uint16 tab_uni_jisx020845[]={ -0x6E77, 0, 0,0x4B2F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3D7B, 0, 0, - 0, 0,0x6E7A,0x4A5F, 0, 0,0x3154, 0, - 0, 0, 0,0x4946,0x4372, 0, 0, 0, - 0,0x3578, 0,0x6E7C, 0,0x395D, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3B2C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6E7B,0x3F6D, 0, 0, 0, 0, 0, 0, - 0,0x3F6E,0x6F21,0x6F23, 0, 0, 0, 0, - 0,0x3E7B, 0,0x6F22,0x6F24, 0, 0,0x3653, - 0,0x4945, 0, 0,0x3C62,0x4F23, 0,0x6E7E, -0x3A78, 0, 0,0x4F3F, 0, 0,0x6F26, 0, - 0, 0, 0,0x6F25,0x6F27, 0, 0, 0, - 0, 0, 0, 0, 0,0x6E7D, 0, 0, - 0, 0, 0, 0,0x4669, 0,0x4555, 0, - 0, 0, 0, 0, 0,0x4457, 0,0x6F2C, - 0, 0, 0, 0,0x4343,0x6F28, 0, 0, - 0,0x6F29, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x372D, 0,0x6F2B, - 0, 0, 0, 0, 0, 0,0x3830, 0, - 0, 0, 0, 0, 0,0x6F2A, 0,0x3E61, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3379, 0, 0, - 0, 0, 0, 0, 0,0x6F30, 0,0x3A3F, -0x4179, 0, 0,0x444A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x333B, 0, 0, 0, 0,0x6F2E,0x6F2F,0x4443, - 0,0x6F2D, 0, 0, 0, 0, 0, 0, - 0, 0,0x6F31, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6F37, 0, 0, 0, - 0,0x6F3A, 0, 0, 0, 0, 0, 0, - 0,0x6F39,0x452D, 0, 0, 0, 0,0x6F32, -0x6F33,0x6F36, 0, 0, 0, 0,0x6F38, 0, - 0, 0,0x3640, 0, 0,0x6F3B,0x6F35, 0, - 0,0x6F34}; - -/* page 46 0x9403-0x9481 */ -static uint16 tab_uni_jisx020846[]={ -0x6F3F, 0, 0, 0,0x6F40, 0, 0, 0, - 0, 0, 0, 0, 0,0x6F41, 0, 0, -0x6F3E,0x6F3D, 0, 0, 0,0x3E62,0x462A,0x6F3C, - 0, 0, 0, 0, 0, 0,0x6F45, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6F43, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6F44,0x6F42, 0,0x4278, 0,0x6F46, - 0, 0, 0, 0, 0, 0,0x6F47, 0, - 0,0x6F49, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3455,0x6F48, -0x4C7A, 0, 0, 0, 0, 0, 0,0x6F54, -0x6F4A, 0, 0,0x6F4D, 0,0x6F4B, 0,0x6F4C, - 0, 0, 0, 0, 0, 0, 0,0x6F4E, - 0, 0, 0, 0, 0,0x6F50, 0, 0, - 0, 0,0x6F51, 0,0x6F52, 0, 0, 0, - 0,0x6F55,0x6F53,0x6F56,0x6F58, 0,0x6F57}; - -/* page 47 0x9577-0x95E5 */ -static uint16 tab_uni_jisx020847[]={ -0x4439, 0, 0, 0, 0, 0, 0, 0, - 0,0x4C67, 0,0x6F59,0x412E, 0, 0, 0, -0x6F5A, 0,0x4A44,0x6F5B,0x332B, 0, 0, 0, -0x313C, 0,0x3457, 0,0x3456,0x6F5C, 0,0x6F5D, - 0,0x6F5E,0x6F5F, 0, 0, 0, 0, 0, - 0,0x6F60, 0,0x3458,0x3355,0x395E,0x4836, 0, -0x6F62,0x6F61, 0, 0, 0, 0,0x6F63, 0, - 0, 0, 0,0x315C, 0, 0, 0, 0, - 0, 0,0x6F66, 0,0x6F65,0x6F64, 0,0x6F67, - 0, 0, 0, 0,0x6F6A, 0, 0, 0, -0x3047, 0, 0,0x6F68, 0,0x6F6C,0x6F6B, 0, - 0, 0, 0, 0, 0,0x6F6E,0x6F6D,0x6F6F, - 0,0x462E, 0, 0, 0,0x6F70, 0, 0, - 0, 0,0x6F71,0x6F73, 0, 0,0x6F72}; - -/* page 48 0x961C-0x9874 */ -static uint16 tab_uni_jisx020848[]={ -0x496C, 0, 0, 0, 0,0x6F74, 0, 0, - 0, 0, 0, 0,0x6F75, 0,0x3A65, 0, - 0, 0,0x6F76,0x6F77, 0, 0,0x4B49, 0, - 0, 0, 0, 0, 0, 0, 0,0x414B, - 0, 0, 0,0x3024,0x424B, 0,0x6F78, 0, -0x496D, 0, 0, 0, 0, 0, 0,0x6F7B, -0x6F79,0x395F, 0,0x6F7A,0x3842, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4A45, -0x6F7D,0x7021,0x6F7E,0x7022, 0, 0,0x3121,0x3F58, -0x3D7C,0x3459,0x7023, 0, 0, 0,0x4766, 0, -0x7025, 0, 0, 0,0x3122, 0,0x7024,0x4444, - 0,0x4E4D,0x462B,0x6F7C,0x4E26, 0,0x3831, 0, - 0,0x4D5B, 0, 0, 0, 0, 0, 0, - 0,0x3679,0x4E34, 0,0x3728, 0,0x4262,0x6721, - 0,0x7026,0x332C,0x3F6F, 0, 0, 0, 0, -0x3356,0x7028, 0,0x7029,0x7027,0x3764, 0,0x3A5D, -0x3E63, 0, 0, 0,0x3123, 0, 0,0x4E59, - 0, 0, 0,0x702B,0x6E2E, 0,0x702A, 0, - 0, 0, 0, 0,0x702E,0x702C,0x702D, 0, -0x702F, 0,0x7030,0x4E6C,0x7031,0x7032, 0,0x4049, -0x483B, 0, 0, 0,0x3F7D,0x3467, 0, 0, -0x4D3A,0x326D,0x3D38,0x385B, 0,0x7035, 0,0x7034, -0x3B73,0x7036,0x7033, 0, 0,0x3B28, 0, 0, - 0,0x703A,0x6A2D, 0, 0,0x5256, 0,0x3F77, -0x7038, 0, 0, 0, 0, 0,0x4E25,0x4671, - 0, 0, 0, 0,0x312B, 0,0x4063,0x3C36, - 0, 0, 0, 0,0x4A37, 0,0x3140, 0, - 0, 0,0x4E6D,0x4D6B, 0,0x703B, 0,0x4545, - 0, 0, 0, 0,0x3C7B, 0, 0, 0, -0x703C, 0,0x703D,0x3F4C,0x703E, 0,0x4E6E, 0, - 0,0x7039,0x7040,0x7042, 0,0x7041, 0,0x703F, - 0, 0,0x7043, 0, 0,0x7044, 0, 0, -0x417A, 0,0x3262, 0, 0, 0, 0, 0, -0x7045, 0, 0,0x4C38, 0, 0,0x7046, 0, - 0, 0, 0, 0,0x7047, 0,0x4F2A, 0, - 0, 0, 0, 0,0x5B31,0x7048, 0, 0, - 0,0x7049,0x704A, 0, 0, 0,0x704E, 0, -0x704B, 0,0x704C, 0,0x704D,0x704F, 0, 0, - 0, 0, 0, 0, 0, 0,0x4044, 0, - 0, 0,0x4C77, 0, 0,0x4045, 0, 0, -0x7050, 0,0x4873, 0,0x7051,0x7353,0x4C4C, 0, -0x7052, 0,0x7053, 0,0x7054,0x3357, 0,0x7056, - 0,0x3F59, 0, 0, 0,0x7057, 0, 0, -0x3724, 0, 0, 0, 0,0x7058,0x705C, 0, -0x705A, 0, 0, 0, 0,0x705B, 0, 0, -0x3373,0x7059,0x705D, 0, 0, 0, 0,0x705E, - 0,0x3048, 0,0x705F,0x7060, 0, 0, 0, - 0, 0, 0, 0,0x3E64, 0, 0, 0, -0x7061, 0, 0, 0,0x3547, 0, 0,0x7064, - 0, 0,0x7063, 0,0x7062, 0, 0,0x6B71, - 0,0x4A5C, 0, 0, 0, 0, 0,0x7065, -0x7066, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x7067, - 0, 0,0x7068, 0,0x7069, 0, 0,0x706A, - 0, 0, 0, 0, 0, 0, 0,0x345A, - 0, 0, 0, 0, 0, 0, 0, 0, -0x706B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x706C,0x4723, 0, 0, 0,0x706E,0x323B, - 0,0x7071,0x7070, 0, 0, 0, 0,0x3124, - 0, 0, 0,0x3641, 0,0x4A47,0x443A,0x3A22, - 0,0x3960,0x3D67, 0,0x3F5C, 0, 0, 0, -0x7073, 0, 0,0x7072,0x4D42,0x3468,0x4852,0x465C, - 0, 0, 0,0x3F7C,0x4E4E, 0,0x375B, 0, - 0, 0, 0, 0, 0,0x7076, 0, 0, -0x7075, 0, 0, 0, 0, 0, 0, 0, -0x4B4B,0x462C, 0, 0, 0, 0, 0, 0, -0x3150, 0, 0,0x7077,0x7074, 0, 0,0x4951, -0x4D6A,0x7078, 0, 0, 0, 0, 0, 0, - 0, 0,0x7079, 0, 0, 0, 0,0x707B, -0x426A,0x335B,0x335C,0x707A, 0, 0, 0, 0, -0x3469,0x3832, 0, 0,0x346A, 0, 0,0x453F, - 0, 0,0x4E60, 0, 0, 0, 0, 0, - 0, 0, 0,0x385C, 0, 0, 0,0x707C, - 0, 0, 0,0x707D,0x707E,0x7121, 0,0x7123, -0x7122}; - -/* page 49 0x98A8-0x98C6 */ -static uint16 tab_uni_jisx020849[]={ -0x4977, 0,0x7124, 0, 0, 0, 0,0x7125, - 0,0x7126, 0, 0, 0, 0,0x7127, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x7129,0x7128, 0,0x712A}; - -/* page 50 0x98DB-0x9957 */ -static uint16 tab_uni_jisx020850[]={ -0x4874,0x664C, 0, 0,0x3F29, 0, 0,0x3532, - 0, 0, 0, 0, 0, 0,0x712B, 0, -0x712C, 0,0x522C,0x5D3B,0x4853, 0, 0,0x307B, - 0,0x303B, 0, 0, 0, 0, 0, 0, - 0,0x3B74,0x4B30,0x3E7E, 0, 0, 0, 0, -0x712D, 0,0x4C5F, 0, 0, 0,0x712E,0x4D5C, - 0,0x3142, 0, 0, 0,0x3B41, 0,0x712F, -0x326E,0x7130, 0, 0, 0,0x7131, 0, 0, - 0, 0,0x7133,0x7134, 0,0x7136,0x7132, 0, - 0,0x7135, 0, 0, 0,0x345B, 0, 0, - 0,0x7137, 0,0x7138, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x7139,0x713A, 0, 0, 0,0x713B, - 0, 0,0x713D, 0, 0, 0,0x713C, 0, -0x713F,0x7142, 0, 0, 0,0x713E,0x7140,0x7141, - 0, 0,0x7143, 0,0x3642}; - -/* page 51 0x9996-0x9A6B */ -static uint16 tab_uni_jisx020851[]={ -0x3C73,0x7144,0x7145,0x3961, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x7146, - 0, 0,0x333E, 0, 0, 0,0x474F,0x7147, -0x7148, 0, 0, 0, 0,0x435A,0x466B, 0, - 0, 0, 0, 0, 0, 0,0x7149, 0, - 0, 0, 0,0x477D, 0, 0,0x424C,0x3158, -0x366E, 0,0x366F, 0, 0, 0, 0, 0, - 0, 0,0x4373,0x714E,0x3670, 0, 0,0x326F, - 0, 0,0x714D, 0, 0,0x714B, 0,0x714C, - 0,0x714A, 0, 0,0x7158, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x714F, -0x7150, 0, 0,0x7151,0x7152, 0, 0, 0, - 0, 0,0x7154, 0, 0,0x7153, 0, 0, - 0,0x3D59, 0,0x7155, 0, 0, 0,0x7157, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3533,0x7156, 0, 0,0x417B,0x3833, 0, 0, - 0, 0, 0,0x7159, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x424D, 0, 0,0x715A, 0, 0, - 0, 0,0x462D, 0, 0, 0, 0, 0, - 0,0x715B, 0, 0, 0, 0, 0, 0, -0x7160, 0,0x715E, 0,0x715D,0x715F, 0,0x715C, - 0, 0, 0, 0, 0, 0, 0,0x7162, - 0, 0, 0, 0, 0, 0, 0,0x7161, - 0,0x7164, 0, 0,0x3643,0x7163, 0, 0, - 0,0x7165, 0, 0,0x7166, 0,0x7168,0x7167, - 0, 0, 0,0x7169,0x716B,0x716A}; - -/* page 52 0x9AA8-0x9B5A */ -static uint16 tab_uni_jisx020852[]={ -0x397C, 0, 0, 0, 0,0x716C, 0, 0, -0x716D, 0, 0, 0, 0, 0, 0, 0, -0x333C, 0, 0, 0,0x716E, 0, 0, 0, -0x716F, 0, 0, 0,0x3F71, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x7170, - 0,0x7171, 0,0x7172,0x7173, 0, 0, 0, -0x3962, 0, 0, 0, 0, 0,0x7174,0x7175, - 0, 0,0x7176,0x7177, 0, 0,0x7178, 0, - 0, 0,0x4831,0x717A, 0,0x4926,0x717B,0x7179, - 0,0x717D, 0, 0,0x717C, 0, 0,0x717E, - 0, 0, 0,0x7221, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x7222, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7223, 0,0x7224, 0, 0, 0, 0,0x7225, - 0, 0,0x7226,0x7227, 0,0x7228, 0,0x7229, -0x722A,0x722B,0x722C, 0, 0, 0,0x722D,0x722E, - 0,0x5D35,0x722F, 0, 0, 0, 0, 0, - 0, 0, 0,0x6478,0x3534, 0, 0, 0, - 0,0x3321,0x3A32,0x7231,0x7230,0x4C25, 0, 0, - 0, 0, 0, 0, 0,0x7233,0x7234,0x7232, - 0,0x7235, 0, 0,0x4B62, 0, 0, 0, -0x7236, 0,0x357B}; - -/* page 53 0x9B6F-0x9C78 */ -static uint16 tab_uni_jisx020853[]={ -0x4F25, 0, 0, 0, 0,0x7237, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x7239, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x303E, - 0, 0,0x723A,0x4A2B,0x7238, 0, 0,0x723B, -0x723C, 0, 0, 0, 0, 0, 0, 0, -0x723D,0x723E, 0, 0, 0, 0, 0, 0, - 0,0x723F, 0,0x4B6E,0x3B2D, 0,0x3A7A,0x412F, - 0, 0, 0, 0, 0,0x7240, 0, 0, - 0, 0,0x7243, 0, 0, 0, 0, 0, - 0,0x7241, 0, 0, 0, 0, 0,0x7244, - 0, 0,0x3871,0x7242, 0, 0, 0, 0, -0x7245, 0,0x7246,0x7247, 0,0x724B, 0,0x3B2A, - 0, 0, 0, 0,0x4264, 0, 0, 0, - 0, 0,0x724C,0x7249,0x7248,0x724A, 0, 0, - 0,0x375F, 0, 0, 0, 0, 0, 0, - 0,0x7250,0x724F,0x724E, 0, 0,0x3033, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x725A, 0,0x7256, - 0,0x7257,0x7253,0x7259, 0,0x7255,0x3362, 0, - 0,0x4F4C, 0,0x7258,0x7254,0x7252,0x7251, 0, - 0, 0, 0, 0,0x725C, 0, 0, 0, - 0, 0,0x725F, 0, 0,0x725E,0x725D, 0, - 0, 0, 0, 0, 0, 0,0x4949,0x725B, -0x3073,0x7260, 0,0x7262, 0, 0, 0, 0, - 0, 0,0x336F,0x724D,0x3137, 0, 0,0x7264, - 0, 0, 0, 0, 0, 0, 0,0x7263, -0x7261,0x432D, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4B70, 0, 0, 0, 0, -0x4E5A, 0, 0,0x7265, 0, 0, 0, 0, - 0,0x7266, 0, 0, 0, 0, 0, 0, -0x7267, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x7268, - 0,0x7269}; - -/* page 54 0x9CE5-0x9DFD */ -static uint16 tab_uni_jisx020854[]={ -0x443B, 0,0x726A, 0,0x4837, 0,0x726F,0x726B, - 0, 0, 0,0x726C, 0, 0,0x4B31,0x4C44, - 0,0x4650, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x7270, 0, - 0,0x7271,0x463E,0x726E,0x726D, 0, 0, 0, - 0,0x322A, 0, 0, 0,0x7279, 0, 0, -0x7278, 0, 0, 0, 0, 0,0x3175, 0, - 0, 0,0x7276, 0, 0, 0,0x7275, 0, - 0,0x7273, 0,0x337B, 0,0x7272,0x3C32,0x3229, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3963, 0, - 0,0x727C,0x727B, 0,0x727A, 0, 0,0x7277, - 0,0x727D, 0,0x727E, 0, 0, 0, 0, - 0, 0, 0,0x7325,0x7324, 0, 0, 0, - 0, 0, 0, 0,0x7326, 0, 0,0x312D, -0x7321,0x7322, 0,0x3974,0x4C39, 0, 0,0x7323, - 0, 0, 0, 0, 0, 0, 0,0x4B32, - 0, 0,0x732B, 0, 0,0x7327, 0, 0, - 0, 0, 0, 0, 0,0x732C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x7329, 0,0x7328, 0, 0, 0, - 0, 0,0x375C, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x732D, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x732E, - 0, 0, 0, 0,0x732F, 0,0x732A, 0, - 0, 0,0x7274, 0, 0,0x7330, 0,0x4461, - 0, 0, 0,0x7334, 0,0x7335,0x7333, 0, - 0, 0, 0, 0,0x7332,0x7338, 0,0x7331, - 0,0x7336, 0, 0, 0, 0, 0, 0, - 0, 0,0x7337, 0, 0, 0,0x733A, 0, - 0, 0, 0, 0,0x7339, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x733C, 0, 0, 0, 0, 0, 0, -0x733D, 0,0x733E, 0, 0,0x4F49, 0, 0, - 0, 0, 0,0x733B,0x426B,0x3A6D, 0, 0, -0x733F}; - -/* page 55 0x9E1A-0x9E1E */ -static uint16 tab_uni_jisx020855[]={ -0x7340,0x7341, 0, 0,0x7342}; - -/* page 56 0x9E75-0x9F77 */ -static uint16 tab_uni_jisx020856[]={ -0x7343, 0, 0,0x3834,0x7344, 0, 0, 0, -0x7345, 0,0x3C2F, 0,0x7346, 0, 0, 0, - 0, 0, 0,0x7347, 0, 0,0x7348,0x7349, - 0, 0, 0, 0,0x734C,0x734A,0x4F3C, 0, -0x734B, 0,0x4E6F, 0, 0, 0, 0, 0, -0x734D, 0,0x4E5B, 0, 0, 0, 0, 0, -0x734E,0x477E, 0, 0,0x734F,0x7351, 0, 0, -0x7352, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x7350,0x396D,0x4C4D,0x4B63,0x5677, - 0,0x5D60,0x4B7B, 0, 0, 0, 0,0x322B, - 0, 0, 0, 0, 0, 0, 0,0x7354, -0x3550,0x7355,0x7356,0x7357, 0,0x3975, 0,0x7358, - 0, 0, 0,0x6054,0x4C5B, 0,0x4263,0x7359, -0x735B,0x735A, 0,0x735C, 0, 0, 0, 0, -0x735D, 0, 0,0x735E, 0, 0, 0, 0, - 0, 0,0x735F, 0, 0, 0, 0,0x7360, - 0,0x7361,0x7362, 0,0x7363, 0,0x7364,0x7365, -0x7366, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x7367,0x7368, 0, 0, 0, 0, - 0,0x4524, 0, 0, 0, 0,0x385D, 0, -0x736A, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x414D,0x736B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x736C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4921, 0, - 0,0x736D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x736E,0x6337, 0, - 0,0x6C5A,0x706D, 0, 0,0x736F, 0,0x7370, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x7372,0x7373,0x7374,0x4E70,0x7371, 0, - 0,0x7375,0x7376, 0, 0,0x7378, 0,0x7377, - 0, 0, 0, 0, 0,0x737A, 0, 0, - 0,0x737B,0x7379}; - -/* page 57 0x9F8D-0x9FA0 */ -static uint16 tab_uni_jisx020857[]={ -0x4E36, 0, 0, 0, 0, 0, 0, 0, -0x737C, 0, 0, 0, 0, 0, 0,0x737D, -0x6354, 0, 0,0x737E}; - -/* page 58 0xFF01-0xFF5E */ -static uint16 tab_uni_jisx020858[]={ -0x212A, 0,0x2174,0x2170,0x2173,0x2175, 0,0x214A, -0x214B,0x2176,0x215C,0x2124,0x215D,0x2125,0x213F,0x2330, -0x2331,0x2332,0x2333,0x2334,0x2335,0x2336,0x2337,0x2338, -0x2339,0x2127,0x2128,0x2163,0x2161,0x2164,0x2129,0x2177, -0x2341,0x2342,0x2343,0x2344,0x2345,0x2346,0x2347,0x2348, -0x2349,0x234A,0x234B,0x234C,0x234D,0x234E,0x234F,0x2350, -0x2351,0x2352,0x2353,0x2354,0x2355,0x2356,0x2357,0x2358, -0x2359,0x235A,0x214E,0x2140,0x214F,0x2130,0x2132,0x212E, -0x2361,0x2362,0x2363,0x2364,0x2365,0x2366,0x2367,0x2368, -0x2369,0x236A,0x236B,0x236C,0x236D,0x236E,0x236F,0x2370, -0x2371,0x2372,0x2373,0x2374,0x2375,0x2376,0x2377,0x2378, -0x2379,0x237A,0x2150,0x2143,0x2151,0x2141}; - -/* page 59 0xFFE0-0xFFE5 */ -static uint16 tab_uni_jisx020859[]={ -0x2171,0x2172,0x224C,0x2131, 0,0x216F}; - -static int -my_uni_jisx0208_onechar(int code){ - if ((code>=0x005C)&&(code<=0x005C)) - return(tab_uni_jisx02080[code-0x005C]); - if ((code>=0x00A2)&&(code<=0x00B6)) - return(tab_uni_jisx02081[code-0x00A2]); - if ((code>=0x00D7)&&(code<=0x00D7)) - return(tab_uni_jisx02082[code-0x00D7]); - if ((code>=0x00F7)&&(code<=0x00F7)) - return(tab_uni_jisx02083[code-0x00F7]); - if ((code>=0x0391)&&(code<=0x03C9)) - return(tab_uni_jisx02084[code-0x0391]); - if ((code>=0x0401)&&(code<=0x0451)) - return(tab_uni_jisx02085[code-0x0401]); - if ((code>=0x2010)&&(code<=0x203B)) - return(tab_uni_jisx02086[code-0x2010]); - if ((code>=0x2100)&&(code<=0x2116)) - return(tab_uni_jisx02087[code-0x2100]); - if ((code>=0x2120)&&(code<=0x212B)) - return(tab_uni_jisx02088[code-0x2120]); - if ((code>=0x2160)&&(code<=0x2169)) - return(tab_uni_jisx02089[code-0x2160]); - if ((code>=0x2190)&&(code<=0x2193)) - return(tab_uni_jisx020810[code-0x2190]); - if ((code>=0x21D2)&&(code<=0x21D4)) - return(tab_uni_jisx020811[code-0x21D2]); - if ((code>=0x2200)&&(code<=0x223D)) - return(tab_uni_jisx020812[code-0x2200]); - if ((code>=0x2252)&&(code<=0x226B)) - return(tab_uni_jisx020813[code-0x2252]); - if ((code>=0x2282)&&(code<=0x2287)) - return(tab_uni_jisx020814[code-0x2282]); - if ((code>=0x22A0)&&(code<=0x22BF)) - return(tab_uni_jisx020815[code-0x22A0]); - if ((code>=0x2312)&&(code<=0x2312)) - return(tab_uni_jisx020816[code-0x2312]); - if ((code>=0x2460)&&(code<=0x2473)) - return(tab_uni_jisx020817[code-0x2460]); - if ((code>=0x2500)&&(code<=0x254B)) - return(tab_uni_jisx020818[code-0x2500]); - if ((code>=0x25A0)&&(code<=0x25CF)) - return(tab_uni_jisx020819[code-0x25A0]); - if ((code>=0x25EF)&&(code<=0x25EF)) - return(tab_uni_jisx020820[code-0x25EF]); - if ((code>=0x2605)&&(code<=0x2606)) - return(tab_uni_jisx020821[code-0x2605]); - if ((code>=0x2640)&&(code<=0x2642)) - return(tab_uni_jisx020822[code-0x2640]); - if ((code>=0x266A)&&(code<=0x266F)) - return(tab_uni_jisx020823[code-0x266A]); - if ((code>=0x3000)&&(code<=0x301F)) - return(tab_uni_jisx020824[code-0x3000]); - if ((code>=0x3041)&&(code<=0x30FE)) - return(tab_uni_jisx020825[code-0x3041]); - if ((code>=0x3230)&&(code<=0x3239)) - return(tab_uni_jisx020826[code-0x3230]); - if ((code>=0x32A0)&&(code<=0x32A8)) - return(tab_uni_jisx020827[code-0x32A0]); - if ((code>=0x3300)&&(code<=0x33CD)) - return(tab_uni_jisx020828[code-0x3300]); - if ((code>=0x4E00)&&(code<=0x5516)) - return(tab_uni_jisx020829[code-0x4E00]); - if ((code>=0x552E)&&(code<=0x5563)) - return(tab_uni_jisx020830[code-0x552E]); - if ((code>=0x557B)&&(code<=0x576A)) - return(tab_uni_jisx020831[code-0x557B]); - if ((code>=0x577F)&&(code<=0x5A9B)) - return(tab_uni_jisx020832[code-0x577F]); - if ((code>=0x5ABC)&&(code<=0x5D29)) - return(tab_uni_jisx020833[code-0x5ABC]); - if ((code>=0x5D4B)&&(code<=0x6BF3)) - return(tab_uni_jisx020834[code-0x5D4B]); - if ((code>=0x6C08)&&(code<=0x6CF3)) - return(tab_uni_jisx020835[code-0x6C08]); - if ((code>=0x6D0B)&&(code<=0x7409)) - return(tab_uni_jisx020836[code-0x6D0B]); - if ((code>=0x7422)&&(code<=0x7845)) - return(tab_uni_jisx020837[code-0x7422]); - if ((code>=0x785D)&&(code<=0x7E9C)) - return(tab_uni_jisx020838[code-0x785D]); - if ((code>=0x7F36)&&(code<=0x8358)) - return(tab_uni_jisx020839[code-0x7F36]); - if ((code>=0x8373)&&(code<=0x8B9A)) - return(tab_uni_jisx020840[code-0x8373]); - if ((code>=0x8C37)&&(code<=0x8D16)) - return(tab_uni_jisx020841[code-0x8C37]); - if ((code>=0x8D64)&&(code<=0x8F64)) - return(tab_uni_jisx020842[code-0x8D64]); - if ((code>=0x8F9B)&&(code<=0x9132)) - return(tab_uni_jisx020843[code-0x8F9B]); - if ((code>=0x9149)&&(code<=0x92B9)) - return(tab_uni_jisx020844[code-0x9149]); - if ((code>=0x92CF)&&(code<=0x93E8)) - return(tab_uni_jisx020845[code-0x92CF]); - if ((code>=0x9403)&&(code<=0x9481)) - return(tab_uni_jisx020846[code-0x9403]); - if ((code>=0x9577)&&(code<=0x95E5)) - return(tab_uni_jisx020847[code-0x9577]); - if ((code>=0x961C)&&(code<=0x9874)) - return(tab_uni_jisx020848[code-0x961C]); - if ((code>=0x98A8)&&(code<=0x98C6)) - return(tab_uni_jisx020849[code-0x98A8]); - if ((code>=0x98DB)&&(code<=0x9957)) - return(tab_uni_jisx020850[code-0x98DB]); - if ((code>=0x9996)&&(code<=0x9A6B)) - return(tab_uni_jisx020851[code-0x9996]); - if ((code>=0x9AA8)&&(code<=0x9B5A)) - return(tab_uni_jisx020852[code-0x9AA8]); - if ((code>=0x9B6F)&&(code<=0x9C78)) - return(tab_uni_jisx020853[code-0x9B6F]); - if ((code>=0x9CE5)&&(code<=0x9DFD)) - return(tab_uni_jisx020854[code-0x9CE5]); - if ((code>=0x9E1A)&&(code<=0x9E1E)) - return(tab_uni_jisx020855[code-0x9E1A]); - if ((code>=0x9E75)&&(code<=0x9F77)) - return(tab_uni_jisx020856[code-0x9E75]); - if ((code>=0x9F8D)&&(code<=0x9FA0)) - return(tab_uni_jisx020857[code-0x9F8D]); - if ((code>=0xFF01)&&(code<=0xFF5E)) - return(tab_uni_jisx020858[code-0xFF01]); - if ((code>=0xFFE0)&&(code<=0xFFE5)) - return(tab_uni_jisx020859[code-0xFFE0]); - return(0); -} - - -/* page 0 0x007E-0x007E */ -static uint16 tab_uni_jisx02120[]={ - 0}; - -/* page 1 0x00A1-0x017E */ -static uint16 tab_uni_jisx02121[]={ -0x2242, 0, 0,0x2270, 0, 0, 0, 0, -0x226D,0x226C, 0, 0, 0,0x226E,0x2234, 0, - 0, 0, 0, 0, 0, 0, 0,0x2231, - 0,0x226B, 0, 0, 0, 0,0x2244,0x2A22, -0x2A21,0x2A24,0x2A2A,0x2A23,0x2A29,0x2921,0x2A2E,0x2A32, -0x2A31,0x2A34,0x2A33,0x2A40,0x2A3F,0x2A42,0x2A41, 0, -0x2A50,0x2A52,0x2A51,0x2A54,0x2A58,0x2A53, 0,0x292C, -0x2A63,0x2A62,0x2A65,0x2A64,0x2A72,0x2930,0x294E,0x2B22, -0x2B21,0x2B24,0x2B2A,0x2B23,0x2B29,0x2941,0x2B2E,0x2B32, -0x2B31,0x2B34,0x2B33,0x2B40,0x2B3F,0x2B42,0x2B41,0x2943, -0x2B50,0x2B52,0x2B51,0x2B54,0x2B58,0x2B53, 0,0x294C, -0x2B63,0x2B62,0x2B65,0x2B64,0x2B72,0x2950,0x2B73,0x2A27, -0x2B27,0x2A25,0x2B25,0x2A28,0x2B28,0x2A2B,0x2B2B,0x2A2C, -0x2B2C,0x2A2F,0x2B2F,0x2A2D,0x2B2D,0x2A30,0x2B30,0x2922, -0x2942,0x2A37,0x2B37, 0, 0,0x2A36,0x2B36,0x2A38, -0x2B38,0x2A35,0x2B35,0x2A3A,0x2B3A,0x2A3B,0x2B3B,0x2A3D, -0x2B3D,0x2A3C, 0,0x2A3E,0x2B3E,0x2924,0x2944,0x2A47, -0x2B47,0x2A45,0x2B45, 0, 0,0x2A46,0x2B46,0x2A44, -0x2945,0x2926,0x2946,0x2A48,0x2B48,0x2A49,0x2B49,0x2947, -0x2A4A,0x2B4A,0x2A4C,0x2B4C,0x2A4B,0x2B4B,0x2929,0x2949, -0x2928,0x2948,0x2A4D,0x2B4D,0x2A4F,0x2B4F,0x2A4E,0x2B4E, -0x294A,0x292B,0x294B,0x2A57,0x2B57, 0, 0,0x2A56, -0x2B56,0x292D,0x294D,0x2A59,0x2B59,0x2A5B,0x2B5B,0x2A5A, -0x2B5A,0x2A5C,0x2B5C,0x2A5D,0x2B5D,0x2A5F,0x2B5F,0x2A5E, -0x2B5E,0x2A61,0x2B61,0x2A60,0x2B60,0x292F,0x294F,0x2A6C, -0x2B6C,0x2A69,0x2B69,0x2A66,0x2B66,0x2A6B,0x2B6B,0x2A68, -0x2B68,0x2A6A,0x2B6A,0x2A71,0x2B71,0x2A74,0x2B74,0x2A73, -0x2A75,0x2B75,0x2A77,0x2B77,0x2A76,0x2B76}; - -/* page 2 0x01CD-0x01DC */ -static uint16 tab_uni_jisx02122[]={ -0x2A26,0x2B26,0x2A43,0x2B43,0x2A55,0x2B55,0x2A67,0x2B67, -0x2A70,0x2B70,0x2A6D,0x2B6D,0x2A6F,0x2B6F,0x2A6E,0x2B6E -}; - -/* page 3 0x01F5-0x01F5 */ -static uint16 tab_uni_jisx02123[]={ -0x2B39}; - -/* page 4 0x02C7-0x02DD */ -static uint16 tab_uni_jisx02124[]={ -0x2230, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x222F,0x2232,0x2236,0x2235, 0,0x2233}; - -/* page 5 0x0384-0x0390 */ -static uint16 tab_uni_jisx02125[]={ -0x2238,0x2239,0x2661, 0,0x2662,0x2663,0x2664, 0, -0x2667, 0,0x2669,0x266C,0x2676}; - -/* page 6 0x03AA-0x03CE */ -static uint16 tab_uni_jisx02126[]={ -0x2665,0x266A,0x2671,0x2672,0x2673,0x2674,0x267B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2678, 0, 0, 0, 0, 0, 0, 0, -0x2675,0x267A,0x2677,0x2679,0x267C}; - -/* page 7 0x0402-0x040F */ -static uint16 tab_uni_jisx02127[]={ -0x2742,0x2743,0x2744,0x2745,0x2746,0x2747,0x2748,0x2749, -0x274A,0x274B,0x274C, 0,0x274D,0x274E}; - -/* page 8 0x0452-0x045F */ -static uint16 tab_uni_jisx02128[]={ -0x2772,0x2773,0x2774,0x2775,0x2776,0x2777,0x2778,0x2779, -0x277A,0x277B,0x277C, 0,0x277D,0x277E}; - -/* page 9 0x2122-0x2122 */ -static uint16 tab_uni_jisx02129[]={ -0x226F}; - -/* page 10 0x2170-0x2179 */ -static uint16 tab_uni_jisx021210[]={ -0x7373,0x7374,0x7375,0x7376,0x7377,0x7378,0x7379,0x737A, -0x737B,0x737C}; - -/* page 11 0x4E02-0x4F19 */ -static uint16 tab_uni_jisx021211[]={ -0x3021, 0,0x3022,0x3023, 0, 0, 0, 0, - 0, 0,0x3024, 0, 0, 0, 0, 0, -0x3025, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3026, 0, 0, - 0,0x3027,0x3028, 0, 0, 0,0x3029, 0, - 0,0x302A, 0, 0,0x302B,0x302C,0x302D, 0, - 0, 0, 0,0x302E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x302F,0x3030, - 0, 0,0x3031, 0, 0,0x3032, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3033, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3034, 0,0x3035, 0, 0, 0, 0, 0, - 0,0x3036, 0, 0, 0, 0,0x3037,0x3038, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3039,0x303A, 0, 0, 0,0x303B, - 0, 0, 0, 0, 0,0x303C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x303D, 0, 0, 0, 0, - 0, 0, 0, 0,0x303E,0x303F, 0, 0, - 0, 0, 0,0x3040, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3041, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3042, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3043, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3044, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3045,0x3046, 0, 0, 0, 0,0x3047,0x3048, -0x3049, 0, 0, 0, 0, 0,0x304A, 0, - 0, 0, 0, 0, 0,0x304B, 0,0x304C, - 0,0x304D, 0,0x304E, 0, 0, 0, 0, - 0, 0,0x742F,0x304F,0x3050,0x3051,0x3052, 0, -0x3053,0x3054, 0, 0, 0, 0,0x3055, 0, - 0,0x3056,0x3057, 0, 0, 0, 0, 0, -0x3058, 0, 0,0x3059,0x305A,0x305B, 0,0x305C -}; - -/* page 12 0x4F2E-0x5166 */ -static uint16 tab_uni_jisx021212[]={ -0x305D, 0, 0,0x305E, 0,0x3060, 0,0x3061, - 0,0x3062, 0,0x3063, 0,0x3064, 0, 0, -0x3065, 0,0x3066, 0,0x3067, 0, 0, 0, - 0, 0,0x3068,0x3069, 0,0x306A,0x306B, 0, - 0, 0, 0, 0,0x306C, 0,0x306D, 0, -0x306E, 0,0x306F, 0, 0, 0, 0, 0, - 0,0x3070,0x305F, 0, 0,0x3071, 0, 0, - 0, 0, 0, 0,0x3072, 0,0x3073, 0, -0x3074, 0, 0,0x3075, 0, 0, 0, 0, - 0,0x3076,0x3077,0x3078,0x3079, 0, 0,0x307A, -0x307B, 0, 0,0x307C,0x307D, 0,0x307E,0x3121, - 0, 0, 0,0x3122,0x3123, 0,0x3124, 0, -0x3125, 0,0x3126, 0,0x3127,0x3128,0x3129, 0, - 0,0x312A, 0,0x312B,0x312C, 0, 0, 0, -0x312D,0x312E, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x312F, 0, 0, 0, - 0,0x3130, 0,0x3131, 0,0x3132,0x3133,0x3134, -0x3135, 0,0x3136,0x3137, 0, 0, 0,0x3138, -0x3139, 0,0x313A,0x313B, 0,0x313C,0x313D,0x313E, - 0,0x313F, 0, 0,0x3140, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3141, 0, - 0, 0,0x3142, 0,0x3143, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3144, 0,0x3145, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3146,0x3147, - 0,0x3148,0x3149,0x314A, 0, 0,0x314B, 0, - 0,0x314C, 0, 0,0x314D, 0,0x314E, 0, -0x314F, 0,0x3150, 0, 0,0x3151, 0, 0, - 0,0x3152,0x3153, 0, 0,0x3154,0x3155,0x3156, -0x3157, 0, 0, 0,0x3158, 0, 0, 0, - 0,0x3159, 0, 0, 0, 0, 0, 0, -0x315A, 0,0x315B, 0,0x315C,0x315D, 0,0x315E, - 0, 0, 0, 0, 0,0x3176, 0, 0, - 0, 0,0x315F,0x3160,0x3161, 0, 0,0x3162, -0x3163, 0, 0, 0,0x3164, 0,0x3165, 0, -0x3166, 0, 0,0x3167,0x3168,0x3169, 0, 0, - 0,0x316A, 0,0x316B, 0, 0, 0, 0, - 0,0x316C,0x316D, 0,0x316E,0x316F, 0, 0, -0x3170,0x3171, 0, 0,0x3172, 0, 0,0x3173, - 0, 0,0x3174,0x3175, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3177, 0,0x3178,0x3179, 0, -0x317A, 0, 0, 0,0x317B, 0, 0, 0, -0x317C,0x317D,0x317E, 0,0x3221,0x3222,0x3223, 0, -0x3224, 0, 0, 0, 0,0x3225,0x3226, 0, -0x3227,0x3228,0x3229,0x322A,0x322B, 0, 0, 0, - 0, 0, 0, 0,0x322C, 0, 0, 0, - 0,0x322D,0x322E, 0, 0, 0, 0, 0, - 0, 0, 0,0x322F,0x3230, 0, 0,0x3231, - 0, 0,0x3232, 0, 0,0x3233,0x3234, 0, - 0,0x3235, 0, 0, 0, 0,0x3236, 0, -0x3237, 0,0x3238, 0, 0,0x3239,0x323A, 0, - 0, 0,0x323B, 0, 0, 0,0x323C,0x323D, - 0,0x323E, 0, 0,0x323F, 0,0x3240, 0, -0x3241, 0,0x3242,0x3243, 0, 0, 0, 0, - 0,0x3244, 0,0x3245,0x3251, 0,0x7430, 0, -0x3246, 0, 0, 0,0x3247, 0, 0, 0, -0x3248, 0, 0, 0, 0,0x3249, 0, 0, -0x324A,0x324B,0x324C, 0, 0,0x324D,0x324E,0x324F, -0x3250, 0,0x3252, 0, 0, 0, 0, 0, - 0,0x3253, 0,0x3254, 0,0x3255,0x3256,0x3257, -0x3258, 0, 0, 0, 0,0x3259, 0, 0, - 0,0x325A,0x325B, 0, 0, 0,0x325C,0x325D, - 0,0x325E, 0,0x325F, 0,0x3260,0x3261,0x3262, - 0, 0,0x3263,0x3264, 0, 0, 0, 0, - 0, 0, 0, 0,0x3265, 0, 0, 0, - 0, 0, 0, 0,0x3266, 0, 0, 0, - 0,0x3267, 0, 0, 0,0x3268, 0,0x3269, - 0,0x326A,0x326B, 0, 0, 0, 0, 0, - 0,0x326C, 0, 0, 0, 0,0x326D, 0, -0x326E}; - -/* page 13 0x517E-0x5515 */ -static uint16 tab_uni_jisx021213[]={ -0x326F, 0, 0, 0, 0,0x3270,0x3271, 0, - 0, 0, 0, 0, 0,0x3272, 0, 0, -0x3273, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3274, 0, 0, 0, 0,0x3275, - 0, 0, 0,0x3276, 0,0x3277, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3278, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3279, 0,0x327A, 0,0x327B, 0, -0x327C,0x327D, 0, 0,0x327E, 0, 0, 0, - 0, 0,0x3321, 0, 0, 0, 0, 0, - 0,0x3322, 0,0x3323,0x3324,0x3325, 0,0x3326, - 0, 0,0x3327, 0, 0, 0, 0, 0, -0x3328, 0, 0, 0,0x3329, 0, 0,0x332A, - 0, 0, 0, 0, 0, 0,0x7431, 0, -0x332B, 0, 0, 0,0x332C,0x332D,0x332E, 0, - 0,0x332F, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3330,0x3331, 0, 0,0x3332, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3333,0x3334, 0,0x3335, -0x3336, 0,0x3337, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3338, 0, 0, 0, - 0, 0,0x3339, 0, 0, 0, 0, 0, - 0, 0, 0,0x333A,0x333B, 0, 0,0x333C, - 0, 0, 0, 0, 0, 0,0x333D, 0, - 0, 0, 0, 0, 0, 0, 0,0x333E, - 0, 0, 0,0x333F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3340, - 0,0x3341,0x3342, 0,0x3343, 0,0x3344, 0, - 0,0x3345,0x3346,0x3347, 0, 0, 0, 0, -0x3348, 0, 0, 0, 0, 0, 0, 0, -0x3349, 0, 0, 0, 0, 0, 0, 0, - 0,0x334A,0x334B,0x334C, 0, 0, 0, 0, - 0, 0,0x334D, 0,0x334E, 0, 0,0x334F, - 0, 0, 0, 0,0x3350, 0,0x3351, 0, - 0, 0, 0, 0, 0,0x3352, 0,0x3353, -0x3354,0x3355,0x3356, 0,0x3357, 0,0x3358, 0, - 0, 0, 0, 0, 0, 0,0x3359,0x335A, -0x335B,0x335C, 0, 0, 0, 0, 0, 0, - 0,0x335D,0x335E, 0, 0, 0, 0, 0, -0x335F,0x3360,0x3361, 0,0x3362,0x3363, 0,0x3364, - 0, 0,0x3365, 0, 0, 0,0x3366, 0, -0x3367, 0,0x3368, 0, 0, 0,0x3369, 0, - 0,0x336A, 0,0x336B, 0, 0,0x336C, 0, -0x336D, 0, 0, 0, 0,0x336E,0x336F, 0, - 0, 0, 0,0x3370, 0, 0, 0,0x3371, - 0, 0,0x3372,0x3373,0x3374, 0,0x3375, 0, - 0, 0,0x3376,0x3377, 0, 0,0x3378, 0, -0x3379,0x337A, 0, 0, 0, 0, 0, 0, - 0, 0,0x337B, 0, 0,0x337C, 0, 0, - 0,0x7432, 0, 0,0x337D,0x337E,0x3421, 0, - 0, 0, 0,0x3422, 0,0x3423, 0, 0, - 0, 0,0x3424, 0, 0,0x3425,0x3426, 0, -0x3427,0x3428, 0, 0, 0, 0,0x7433,0x3429, - 0,0x342A,0x342B,0x342C, 0,0x342D,0x342E,0x342F, - 0, 0,0x3430, 0,0x3431, 0, 0,0x3432, - 0, 0, 0, 0, 0, 0,0x3433,0x3434, -0x3435, 0, 0, 0,0x3436, 0, 0, 0, - 0, 0, 0, 0, 0,0x3438,0x3437, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3439, 0,0x343A, 0, 0, - 0, 0, 0,0x343B, 0,0x343C, 0,0x343D, - 0, 0, 0, 0, 0, 0,0x343E,0x343F, - 0, 0, 0, 0,0x3440, 0, 0, 0, - 0, 0, 0,0x3441, 0, 0, 0, 0, -0x3442, 0, 0, 0, 0,0x3443, 0, 0, - 0,0x3444,0x3445, 0, 0, 0, 0, 0, -0x3446, 0, 0, 0, 0,0x3447,0x3448, 0, - 0, 0, 0,0x3449, 0, 0, 0,0x344A, - 0, 0, 0,0x344B, 0, 0,0x344C, 0, - 0, 0, 0, 0,0x344D,0x344E, 0, 0, - 0,0x344F, 0, 0,0x3450, 0,0x3451,0x3452, - 0,0x3453,0x3454, 0,0x3455, 0, 0,0x3456, - 0, 0,0x3457, 0, 0, 0, 0,0x3458, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3459, 0, 0,0x345A,0x345B, 0,0x345C, - 0, 0, 0, 0,0x345D, 0, 0,0x345E, -0x345F, 0,0x3460, 0, 0, 0, 0, 0, -0x3461,0x3462, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3463, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3464, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3465, 0, 0, - 0, 0, 0, 0,0x3466, 0, 0, 0, - 0, 0, 0,0x3467, 0, 0, 0, 0, - 0,0x3468,0x3469, 0,0x346A, 0, 0, 0, - 0,0x346B, 0,0x346C, 0, 0,0x346D,0x346E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x346F,0x3470, 0, - 0,0x3471, 0, 0, 0, 0, 0,0x3472, - 0,0x3473, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3474, 0, 0, 0,0x3475, 0,0x3476, 0, -0x3477,0x3478, 0,0x3479, 0,0x347A, 0,0x347B, -0x347C, 0, 0, 0, 0, 0,0x347D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x347E, 0,0x3521, 0,0x3522, 0,0x3523, - 0, 0,0x3524,0x3525,0x7435, 0, 0,0x3526, - 0, 0, 0,0x3527, 0, 0, 0,0x3528, -0x3529, 0, 0, 0, 0, 0,0x352A, 0, - 0,0x352B, 0,0x352C, 0, 0, 0, 0, -0x352D,0x352E, 0,0x352F,0x3530, 0, 0,0x3531, -0x3532, 0, 0,0x3533, 0, 0, 0, 0, - 0,0x3534, 0,0x3535,0x3536,0x3537, 0, 0, - 0,0x3538, 0, 0, 0, 0, 0, 0, -0x3539, 0, 0, 0,0x353A, 0, 0,0x353B, -0x353C, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x353D, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x353E, 0,0x353F, 0, - 0,0x3540, 0, 0, 0, 0, 0, 0, -0x3541, 0, 0, 0, 0, 0,0x3542, 0, -0x3543,0x3544,0x3545,0x3546, 0, 0, 0,0x3547, - 0, 0,0x3548,0x3549, 0, 0,0x354A,0x354B, -0x354C, 0, 0, 0, 0, 0, 0,0x354D -}; - -/* page 14 0x552A-0x5566 */ -static uint16 tab_uni_jisx021214[]={ -0x354E,0x354F, 0, 0, 0, 0, 0, 0, -0x3550, 0, 0,0x3551,0x3552, 0, 0, 0, - 0,0x3553,0x3554,0x3555, 0, 0, 0,0x3556, - 0, 0, 0, 0, 0,0x3557, 0,0x3558, -0x3559, 0, 0,0x355A, 0, 0,0x355B,0x355C, - 0, 0, 0, 0, 0, 0,0x355D, 0, -0x355E,0x355F, 0, 0,0x3560, 0,0x3561,0x3562, - 0, 0,0x3563, 0,0x3564}; - -/* page 15 0x557F-0x5C36 */ -static uint16 tab_uni_jisx021215[]={ -0x3565, 0,0x3566,0x3567, 0, 0, 0,0x3568, - 0,0x3569, 0, 0, 0, 0, 0,0x356A, -0x356B, 0,0x356C,0x356D,0x356E,0x356F, 0, 0, -0x3570, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3571,0x3572, 0, 0, - 0, 0, 0, 0, 0, 0,0x3573, 0, - 0, 0, 0,0x3574, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3575, 0,0x3576, 0,0x3577, 0, 0,0x3578, - 0, 0,0x3579, 0,0x357A,0x357B, 0,0x357C, - 0, 0,0x357D,0x357E,0x3621, 0, 0, 0, -0x3622,0x3623, 0, 0,0x3624, 0, 0,0x3625, - 0, 0, 0,0x3626, 0, 0, 0, 0, - 0, 0,0x3627, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3628, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3629, 0, 0, 0, 0, 0,0x362A, 0, - 0,0x362B, 0,0x362C, 0, 0,0x362D,0x362E, -0x362F,0x3630,0x3631,0x3632, 0, 0, 0, 0, - 0, 0,0x3633, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3634, 0, 0, - 0,0x3635, 0, 0,0x3636, 0,0x3637, 0, -0x3638, 0,0x3639, 0,0x363A,0x363B,0x363C, 0, -0x363D,0x363E,0x363F, 0,0x3640,0x3641, 0,0x3642, - 0, 0,0x3643, 0,0x3644, 0,0x3645, 0, -0x3646, 0, 0, 0, 0,0x3647, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3648, - 0,0x3649,0x364A,0x364B,0x364C, 0, 0,0x364D, - 0, 0,0x364E, 0, 0, 0,0x364F, 0, -0x3650, 0,0x3651,0x3652, 0, 0,0x3653, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3654,0x3655, 0, - 0,0x3656, 0, 0,0x3657,0x3658, 0, 0, - 0, 0, 0, 0, 0, 0,0x3659, 0, - 0, 0,0x365A,0x365B, 0, 0,0x365C,0x365D, -0x365E, 0, 0, 0, 0, 0, 0,0x365F, -0x3660,0x3661,0x3662, 0,0x3663,0x3664,0x3665, 0, - 0, 0,0x3666, 0,0x3667, 0, 0, 0, -0x3668, 0, 0, 0, 0, 0, 0,0x3669, - 0, 0, 0, 0, 0, 0,0x366A, 0, - 0, 0,0x366B,0x366C,0x366D,0x3670,0x3671, 0, -0x366E,0x366F, 0, 0, 0, 0, 0, 0, - 0, 0,0x3672, 0, 0,0x3673,0x3674, 0, -0x3675, 0,0x3676, 0, 0,0x3677,0x3678,0x3679, -0x367A,0x367B, 0, 0,0x367D, 0,0x367E, 0, - 0, 0,0x367C, 0, 0, 0, 0,0x3721, -0x3722, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3723,0x3724, 0, 0, 0, 0, -0x3725, 0, 0,0x3726, 0,0x3727, 0, 0, - 0, 0,0x3728, 0, 0, 0,0x3729, 0, - 0, 0, 0,0x372A,0x372B, 0,0x372C, 0, - 0,0x372D, 0,0x372E,0x372F,0x3730,0x3731, 0, - 0, 0,0x3732,0x3733, 0,0x3734, 0,0x3735, -0x3736, 0, 0, 0,0x3737,0x3738, 0, 0, - 0, 0, 0, 0, 0, 0,0x3739,0x373A, -0x373B, 0, 0, 0, 0, 0,0x373C,0x373D, - 0, 0, 0, 0, 0,0x373E,0x373F, 0, - 0, 0, 0,0x3740, 0, 0, 0, 0, - 0, 0,0x7436, 0, 0, 0, 0, 0, - 0, 0, 0,0x3741, 0, 0,0x3742, 0, -0x3743,0x3744, 0, 0,0x3745, 0,0x3746,0x3747, -0x3748,0x3749,0x374A, 0,0x374B,0x374C,0x374D, 0, -0x374E, 0,0x374F,0x3750,0x3751,0x3752, 0,0x3753, - 0, 0,0x3754, 0,0x3755, 0, 0, 0, - 0, 0, 0, 0, 0,0x3756, 0, 0, - 0, 0, 0, 0, 0,0x3757,0x3760, 0, -0x3758, 0,0x3759,0x375A, 0,0x375B,0x375C,0x375D, -0x375E, 0,0x375F, 0, 0, 0, 0, 0, -0x3761,0x3762,0x3763, 0, 0,0x3764, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3765, 0, 0, 0, 0,0x3766, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3767,0x3768, 0, 0, 0,0x3769, 0, 0, -0x376A, 0, 0, 0, 0, 0,0x376B, 0, - 0, 0, 0, 0, 0, 0,0x376C,0x376D, - 0, 0,0x377E, 0, 0,0x376E, 0,0x376F, -0x3770, 0,0x3771, 0, 0, 0,0x3772, 0, - 0,0x3773, 0, 0, 0, 0,0x3774,0x3775, - 0,0x3776, 0, 0, 0, 0,0x3777,0x3778, -0x3779, 0, 0, 0,0x377A,0x377B, 0, 0, - 0,0x377C,0x377D, 0, 0,0x3821,0x3822, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3823, 0, 0,0x3824, -0x3825,0x3826, 0, 0, 0, 0, 0,0x3827, -0x3828, 0, 0, 0, 0, 0,0x3829, 0, - 0, 0, 0,0x382A, 0, 0, 0, 0, - 0, 0,0x382B, 0, 0, 0, 0, 0, -0x382C, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x382D, 0, 0,0x382E,0x382F, 0, -0x3830,0x3831, 0, 0, 0, 0,0x3832, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3833, 0,0x3834, 0, 0,0x3835, 0, 0, -0x3836,0x3837, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3838, 0, 0, 0,0x3839, 0, 0, -0x383A,0x383B,0x383C, 0, 0, 0, 0, 0, -0x383D,0x383E,0x383F,0x3840, 0,0x3841,0x3842, 0, -0x3843,0x3844, 0, 0, 0,0x3845, 0,0x3846, - 0, 0, 0, 0, 0, 0,0x3847,0x7439, - 0,0x3848,0x3849,0x384A, 0, 0, 0,0x384B, - 0, 0,0x384C, 0, 0, 0, 0, 0, - 0, 0,0x384D,0x384E, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3850, 0, 0, - 0, 0, 0,0x3851, 0,0x384F, 0, 0, - 0,0x3852, 0, 0, 0, 0,0x3853,0x3854, - 0,0x3855, 0,0x3856, 0,0x3857, 0,0x3858, - 0, 0, 0,0x3859, 0, 0,0x385A, 0, - 0, 0,0x385B,0x385C, 0, 0, 0, 0, - 0, 0,0x385D, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x385E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x385F,0x3860, - 0, 0, 0, 0,0x3861,0x3862, 0, 0, - 0, 0, 0,0x3863,0x3864,0x3865, 0, 0, - 0, 0, 0, 0, 0, 0,0x3867, 0, - 0, 0,0x3868, 0,0x3869,0x386A, 0, 0, - 0,0x386B, 0, 0, 0, 0, 0, 0, -0x386C,0x386D, 0, 0,0x386E, 0,0x386F,0x3870, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3871, 0, 0, 0,0x3872, 0, 0,0x3873, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3874,0x3875, 0, 0, 0, - 0, 0,0x3876, 0,0x3877, 0,0x3878,0x3879, -0x387A, 0,0x387B, 0,0x387C, 0, 0, 0, - 0, 0, 0, 0,0x387D, 0,0x387E, 0, -0x3921, 0, 0,0x3922, 0, 0,0x3923,0x3924, - 0, 0,0x3925, 0,0x3926,0x3927, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3928,0x3929, 0,0x392A, - 0, 0, 0,0x392B, 0, 0,0x392C, 0, -0x392D, 0, 0, 0, 0, 0, 0, 0, -0x392E, 0, 0, 0, 0,0x392F, 0, 0, -0x3930, 0, 0, 0, 0, 0,0x3931,0x3932, -0x3933,0x3934, 0, 0,0x3935, 0, 0, 0, -0x3936, 0, 0,0x3937, 0,0x3938, 0, 0, - 0, 0,0x3939, 0,0x393A,0x393B, 0, 0, - 0,0x393C, 0,0x393D, 0, 0,0x393E, 0, - 0, 0, 0,0x393F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3940,0x3941, -0x3942, 0, 0, 0,0x3943,0x3944, 0, 0, -0x3945, 0, 0, 0, 0, 0, 0,0x3946, -0x3947, 0,0x3948,0x3949, 0,0x394A, 0, 0, -0x394B, 0, 0, 0, 0, 0, 0, 0, - 0,0x394C, 0, 0, 0,0x394D, 0, 0, - 0, 0, 0, 0, 0,0x394E,0x394F,0x3950, - 0, 0, 0,0x3951,0x3952, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3953, - 0, 0, 0, 0,0x3954,0x3955, 0, 0, -0x3956,0x3957, 0,0x3958, 0, 0,0x3959, 0, - 0,0x395A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x395B,0x395C, 0, -0x395D,0x395E, 0, 0, 0,0x395F, 0, 0, - 0,0x3960, 0, 0, 0, 0,0x3961, 0, - 0, 0, 0, 0, 0, 0, 0,0x3962, - 0, 0, 0, 0,0x3963, 0,0x3964, 0, -0x3965, 0, 0, 0, 0, 0,0x3966, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3967, 0, 0,0x3968,0x3969, 0, 0,0x396A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x396B, 0, 0, 0, - 0,0x396C, 0, 0,0x396D, 0, 0,0x396E, - 0, 0,0x396F, 0, 0,0x3970, 0,0x3971, -0x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52, 0, 0,0x3A53,0x3A54, 0, -0x3A55, 0,0x3A56,0x3A57, 0, 0, 0, 0, -0x3A58, 0, 0,0x3A59, 0,0x3A5A, 0, 0, - 0,0x3A5B,0x3A5C, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3A5D, 0, -0x3A5E, 0, 0, 0, 0, 0, 0,0x3A5F, -0x3A60,0x3A61,0x3A62,0x3A63, 0, 0, 0, 0, - 0,0x3A64, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x743A, 0, 0, -0x3A65, 0,0x3A66, 0, 0,0x3A67, 0, 0, - 0, 0, 0, 0, 0, 0,0x3A68, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3A69, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3A6A, 0, 0, 0, 0, 0, 0,0x3A6B, -0x3A6C, 0, 0, 0,0x3A6D, 0, 0,0x3A6E, - 0, 0,0x3A6F, 0,0x3A70,0x3A71, 0,0x3A72, - 0,0x3A73, 0,0x3A74, 0, 0,0x3A75,0x3A76 -}; - -/* page 16 0x5C59-0x5EEB */ -static uint16 tab_uni_jisx021216[]={ -0x3A77,0x3A78, 0,0x3A79, 0, 0, 0, 0, - 0,0x3A7A,0x3A7B, 0, 0, 0,0x3A7C,0x3A7D, -0x3A7E, 0, 0, 0,0x3B21, 0, 0,0x3B22, - 0, 0, 0,0x3B23,0x3B24, 0, 0, 0, - 0,0x3B25,0x3B26,0x3B27,0x3B28, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3B29,0x3B2A, - 0,0x3B2B, 0, 0, 0, 0,0x3B2C, 0, - 0,0x3B2D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3B2E, 0,0x3B2F,0x3B30, - 0,0x3B31,0x3B32, 0, 0,0x3B33, 0, 0, - 0,0x3B34, 0, 0, 0, 0, 0, 0, - 0,0x3B35, 0,0x3B36,0x3B37, 0, 0, 0, - 0,0x3B38,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0, - 0, 0,0x3C52,0x3C51, 0,0x3C53, 0, 0, -0x3C54,0x3C55, 0,0x3C56,0x3C57, 0, 0, 0, - 0, 0, 0,0x3C58, 0,0x3C59, 0, 0, - 0, 0, 0, 0,0x3C5A, 0, 0, 0, - 0, 0,0x3C5B}; - -/* page 17 0x5F02-0x6149 */ -static uint16 tab_uni_jisx021217[]={ -0x3C5C, 0, 0, 0,0x3C5D,0x3C5E,0x3C5F, 0, - 0, 0, 0, 0,0x3C60, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3C61, - 0, 0,0x3C62,0x3C63, 0, 0, 0,0x3C64, -0x3C65,0x3C66,0x3C67, 0, 0, 0,0x3C68, 0, - 0,0x3C69,0x3C6A, 0,0x3C6B, 0,0x3C6C, 0, - 0, 0,0x3C6D, 0,0x3C6E, 0, 0, 0, - 0,0x3C6F, 0,0x3C70, 0,0x3C71,0x3C72, 0, - 0, 0,0x3C73,0x3C74, 0,0x3C75, 0, 0, - 0, 0, 0,0x3C76, 0, 0,0x3C77, 0, - 0, 0,0x3C78, 0, 0, 0,0x3C79, 0, - 0,0x3C7A, 0, 0, 0, 0,0x3C7B, 0, - 0,0x3C7C,0x3C7D, 0, 0,0x3C7E, 0, 0, - 0, 0, 0, 0, 0,0x3D21, 0, 0, -0x3D22, 0,0x3D23,0x3D24, 0, 0,0x3D25, 0, -0x3D26, 0, 0,0x3D27,0x3D28, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3D29, - 0, 0, 0,0x3D2A, 0,0x3D2B, 0, 0, - 0, 0, 0, 0,0x3D2C, 0, 0, 0, - 0, 0,0x3D2D,0x3D2E, 0, 0, 0, 0, -0x3D2F, 0,0x3D32, 0, 0,0x3D30, 0, 0, - 0,0x3D31,0x3D33, 0, 0,0x3D34,0x3D35,0x3D36, - 0, 0, 0, 0, 0,0x743E,0x3D37, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3D38, 0, 0,0x3D39,0x3D3A,0x3D3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x3E24, 0, 0, 0,0x3E25,0x3E26, -0x3E27,0x3E28, 0, 0,0x3E29,0x3E2A, 0, 0, - 0, 0,0x3E2B,0x3E2C, 0, 0, 0,0x3E2D, - 0,0x3E2E, 0,0x3E2F,0x3E30, 0, 0, 0, -0x3E31, 0, 0,0x3E32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3E33, 0, 0,0x3E34, 0, 0,0x3E35, 0, - 0, 0,0x3E36,0x3E37, 0, 0, 0, 0, -0x3E38, 0, 0, 0, 0,0x3E39, 0, 0, -0x3E3A, 0,0x3E3B, 0, 0, 0,0x3E3C,0x3E3D, -0x3E3E,0x3E3F,0x3E40, 0,0x3E41,0x3E42, 0,0x3E43, - 0, 0,0x3E44, 0,0x3E45, 0,0x7440, 0, -0x3E46, 0, 0, 0, 0, 0, 0, 0, -0x3E47,0x3E48, 0, 0, 0, 0,0x3E49,0x3E4A, - 0, 0, 0,0x3E4B,0x3E4C,0x3E4D, 0,0x3E4E, - 0, 0, 0, 0, 0, 0, 0,0x3E4F, - 0, 0, 0,0x3E50,0x3E51, 0, 0,0x3E52 -}; - -/* page 18 0x615E-0x6290 */ -static uint16 tab_uni_jisx021218[]={ -0x3E53, 0,0x3E54, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3E55, 0, - 0, 0, 0, 0,0x3E56, 0, 0, 0, - 0, 0,0x3E57, 0, 0,0x3E58,0x3E59, 0, - 0,0x3E5A,0x3E5B,0x3E5C, 0,0x3E5D,0x3E5E, 0, - 0, 0, 0, 0, 0,0x3E5F, 0,0x3E60, - 0, 0, 0, 0,0x3E61,0x3E62, 0, 0, - 0,0x3E63,0x3E64, 0, 0, 0,0x3E65,0x3E66, - 0,0x3E67,0x3E68, 0, 0, 0, 0,0x3E69, - 0, 0,0x3E6A, 0,0x3E6B, 0, 0,0x3E6C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3E6D,0x3E6E, 0, 0,0x3E6F, 0, - 0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 0, 0, 0, 0, 0, -0x3F52, 0, 0, 0, 0, 0, 0,0x3F53, -0x3F54, 0, 0, 0,0x3F55, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3F56, 0, 0, 0, - 0, 0, 0, 0,0x3F57, 0,0x3F58, 0, - 0, 0, 0, 0, 0, 0,0x3F59,0x3F5A, - 0, 0, 0, 0, 0,0x3F5B,0x3F5C, 0, - 0, 0, 0, 0,0x3F5D,0x3F5E, 0,0x3F5F, - 0, 0,0x3F60, 0, 0,0x3F61, 0, 0, -0x3F62, 0,0x3F63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3F64,0x3F65, 0, 0,0x3F66, - 0, 0, 0, 0, 0, 0, 0,0x3F67, -0x3F68, 0, 0,0x3F69, 0, 0,0x3F6A, 0, - 0, 0, 0,0x3F6B,0x3F6C,0x3F6D,0x3F6E, 0, -0x3F6F, 0, 0, 0,0x3F70,0x3F71, 0, 0, -0x3F72, 0, 0, 0,0x3F73,0x3F74,0x3F75, 0, - 0, 0,0x3F76, 0, 0,0x3F77, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3F78, -0x3F79, 0, 0, 0, 0, 0,0x3F7A,0x3F7B, - 0, 0, 0,0x3F7C, 0, 0,0x3F7D,0x3F7E, - 0, 0,0x4021, 0, 0, 0,0x4022,0x4023, - 0,0x4024, 0, 0,0x4025, 0,0x4026, 0, - 0,0x4027, 0, 0,0x4028, 0, 0, 0, - 0, 0,0x4029, 0, 0, 0,0x402A,0x402B, - 0, 0, 0,0x402C,0x402D, 0, 0, 0, -0x402E, 0, 0, 0, 0, 0,0x402F, 0, -0x4030, 0, 0, 0, 0, 0, 0,0x4031, -0x4032,0x4033, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4034, - 0, 0, 0,0x4035, 0, 0, 0,0x4036, - 0, 0,0x4037, 0, 0, 0, 0, 0, -0x4038, 0, 0,0x4039, 0,0x403A,0x403B,0x403C, - 0, 0, 0, 0, 0, 0,0x403D, 0, - 0, 0,0x403E, 0, 0, 0, 0,0x403F, - 0, 0, 0, 0,0x4040, 0,0x4041, 0, - 0, 0, 0, 0,0x4042,0x4043, 0,0x4044, - 0, 0,0x4045,0x4046, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4047,0x4048, 0, 0, 0, - 0, 0,0x4049, 0,0x404A, 0,0x404B, 0, - 0, 0,0x404C, 0, 0, 0, 0, 0, -0x404D, 0,0x404E, 0,0x404F, 0,0x4050,0x4051, - 0, 0, 0,0x4052,0x4053, 0, 0, 0, - 0,0x4054,0x4055, 0, 0, 0, 0,0x4056, - 0, 0, 0, 0, 0, 0, 0,0x4057, - 0,0x4058, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4059, 0, 0, - 0,0x405A, 0,0x405B,0x405C,0x405D,0x405E, 0, - 0, 0, 0, 0,0x405F,0x4060,0x4061,0x4062, - 0,0x4063,0x4064,0x4065, 0,0x4066, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4067, - 0, 0, 0, 0, 0,0x4068,0x4069, 0, - 0, 0, 0, 0, 0,0x406A, 0,0x406B, - 0, 0, 0, 0, 0, 0, 0,0x406C, - 0,0x406D, 0, 0, 0, 0, 0, 0, - 0,0x406E,0x406F,0x4070, 0, 0, 0, 0, - 0, 0,0x4071,0x4072, 0,0x4073, 0,0x4074, - 0,0x4075, 0,0x4076, 0,0x4077, 0, 0, -0x4078, 0,0x4079, 0, 0, 0,0x407A, 0, - 0, 0, 0, 0, 0,0x407B, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x407C, -0x407D,0x407E, 0, 0, 0, 0,0x4121, 0, - 0, 0, 0,0x4122,0x4123,0x4124,0x4125, 0, -0x4126, 0,0x4127,0x4128, 0, 0, 0,0x4129, - 0,0x412A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x412B,0x412C, - 0, 0, 0,0x412D,0x412E, 0, 0,0x412F, - 0, 0,0x4130, 0, 0, 0, 0,0x4131, - 0,0x4132, 0, 0, 0,0x4133, 0, 0, - 0,0x4134, 0,0x4135, 0, 0,0x4136, 0, - 0, 0,0x4137,0x4138,0x4139, 0, 0, 0, - 0,0x413A, 0, 0, 0,0x413B,0x413C, 0, -0x413D, 0, 0,0x413E, 0,0x413F, 0, 0, -0x4140,0x4141, 0, 0,0x4142, 0, 0, 0, -0x4143, 0, 0,0x4144, 0, 0, 0, 0, -0x4145, 0, 0,0x4146, 0, 0, 0, 0, - 0, 0, 0, 0,0x4147, 0,0x4148,0x4149, - 0, 0, 0, 0, 0,0x414A, 0, 0, - 0,0x414B, 0,0x414C, 0, 0, 0, 0, -0x7441, 0,0x414D, 0,0x414E, 0,0x414F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4150,0x4151, 0, 0, 0, 0, 0, - 0,0x4152, 0, 0, 0,0x4153, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4154, 0, 0,0x4155, - 0, 0, 0,0x4156, 0, 0, 0,0x4157, - 0, 0, 0, 0,0x4158, 0, 0, 0, - 0, 0, 0, 0,0x4159, 0, 0,0x415A, - 0, 0,0x415B, 0, 0, 0, 0,0x415C, - 0, 0,0x415D, 0, 0,0x415E, 0, 0, -0x415F, 0, 0, 0, 0, 0, 0, 0, -0x4160, 0, 0, 0,0x4161,0x4162,0x4163, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4164, 0, 0,0x4165, 0, 0, 0, - 0, 0,0x4166,0x4167, 0, 0, 0, 0, -0x4168, 0,0x4169, 0, 0, 0,0x416A, 0, -0x416B, 0,0x416C, 0, 0, 0, 0, 0, - 0,0x416D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x416E, 0,0x416F, 0,0x4170,0x4171, - 0, 0, 0,0x4172, 0, 0, 0, 0, -0x4173,0x4174,0x4175, 0, 0, 0,0x4176, 0, - 0, 0,0x4177,0x4178, 0, 0, 0,0x4179, - 0, 0, 0,0x417A,0x417B, 0, 0,0x417C, -0x417D, 0, 0, 0, 0, 0, 0,0x417E, -0x4221, 0, 0,0x4222,0x4223,0x4224,0x4225, 0, -0x4226, 0, 0,0x4227,0x4228,0x4229,0x422A, 0, -0x422B, 0,0x422C,0x422D, 0,0x422E, 0, 0, - 0,0x4230, 0,0x422F, 0,0x7442, 0, 0, - 0, 0,0x4231, 0, 0, 0, 0,0x4232, -0x4233, 0, 0, 0,0x4234, 0,0x4235, 0, -0x4237, 0, 0,0x4236, 0, 0, 0, 0, - 0,0x4238,0x4239,0x423A, 0,0x423B,0x423C, 0, - 0, 0,0x423D,0x423E, 0, 0, 0,0x7443, - 0, 0, 0, 0,0x4240,0x4241,0x4242, 0, - 0, 0, 0, 0, 0,0x4244, 0,0x4245, - 0,0x4247,0x4248,0x4249, 0,0x424A,0x424C, 0, -0x4243,0x4246,0x424B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x424D,0x424E,0x424F, - 0, 0,0x4250, 0,0x4251, 0, 0, 0, - 0, 0, 0,0x4252,0x4253,0x4254,0x4255, 0, - 0,0x4256,0x4257, 0, 0, 0,0x4258, 0, - 0, 0, 0, 0, 0, 0, 0,0x4259, - 0, 0, 0,0x425A,0x425B, 0, 0,0x425C, - 0, 0, 0, 0, 0,0x425D, 0, 0, - 0,0x425E,0x425F, 0,0x4260,0x4261, 0, 0, - 0, 0,0x4262, 0, 0, 0,0x4263, 0, -0x4264,0x4265, 0, 0, 0, 0,0x4266, 0, - 0, 0, 0, 0, 0,0x4267, 0, 0, - 0,0x4268, 0, 0, 0, 0, 0, 0, - 0, 0,0x4269, 0, 0,0x426A,0x426B, 0, -0x426C, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x426D,0x423F, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x426E, - 0,0x426F, 0, 0, 0, 0, 0, 0, -0x4270, 0, 0, 0, 0,0x4271, 0, 0, - 0, 0, 0,0x4272, 0, 0,0x4273, 0, - 0, 0,0x4274, 0,0x4275, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4276, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4277, 0, 0, 0, 0, 0, 0,0x4278, - 0,0x4279,0x427A, 0, 0, 0,0x427B, 0, - 0, 0, 0, 0, 0, 0,0x427C,0x427D, - 0, 0, 0, 0, 0, 0, 0,0x427E, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4321, 0, 0, 0, 0, 0,0x4322, 0, -0x4323, 0, 0, 0, 0, 0,0x4324, 0, -0x4325, 0, 0, 0, 0,0x4326, 0, 0, - 0, 0, 0,0x4327, 0, 0,0x4328, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4329,0x432A, 0,0x432B, 0,0x432C, 0, 0, -0x432D, 0,0x432E,0x432F, 0,0x4330}; - -/* page 20 0x67B0-0x6801 */ -static uint16 tab_uni_jisx021220[]={ -0x4331,0x4332,0x4333, 0, 0,0x4334, 0, 0, - 0, 0, 0,0x4335,0x4336,0x4337, 0, 0, -0x4339, 0,0x433A,0x433B, 0,0x433C, 0, 0, -0x433D,0x433E, 0, 0, 0, 0, 0, 0, - 0, 0,0x433F, 0, 0, 0, 0,0x4340, - 0,0x4341, 0, 0,0x4342, 0, 0, 0, - 0,0x4343, 0, 0, 0, 0,0x4344, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4345, 0,0x4346, 0, 0, 0,0x4347,0x4348, - 0,0x4338, 0, 0, 0, 0, 0, 0, - 0,0x7446}; - -/* page 21 0x6814-0x6917 */ -static uint16 tab_uni_jisx021221[]={ -0x434A, 0, 0, 0, 0,0x434B, 0, 0, - 0,0x434C, 0,0x434D, 0, 0, 0, 0, - 0, 0, 0,0x434F,0x434E, 0, 0, 0, -0x4350,0x4351, 0,0x4352,0x4353,0x4354, 0,0x4355, - 0, 0, 0, 0, 0, 0, 0,0x4356, - 0, 0, 0,0x4357, 0, 0, 0, 0, -0x4358,0x4359, 0, 0, 0, 0,0x435A, 0, -0x435B, 0, 0, 0, 0, 0,0x4349, 0, - 0,0x435C, 0,0x435D,0x435E, 0, 0,0x435F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4360, - 0, 0,0x4361,0x4362,0x4363,0x4364,0x4365, 0, - 0,0x4366, 0, 0, 0,0x4367,0x4368,0x4369, -0x436A, 0, 0, 0, 0, 0,0x436B, 0, -0x436C, 0,0x436D, 0,0x436E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x436F, 0,0x4370, 0,0x4371, 0, -0x4372, 0, 0, 0, 0,0x4373, 0,0x4374, - 0,0x4375, 0, 0, 0,0x4376,0x4377, 0, - 0, 0,0x4378, 0, 0, 0,0x4379, 0, - 0, 0, 0, 0, 0, 0, 0,0x437A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x437B, 0, 0,0x437C, 0, 0, 0, -0x437D, 0, 0,0x437E,0x4421,0x4422, 0,0x4423, - 0, 0,0x4424, 0, 0,0x4425, 0, 0, -0x4426,0x4427, 0, 0, 0, 0, 0, 0, - 0,0x4428, 0, 0,0x4429, 0,0x442A,0x442B, -0x442C,0x442D, 0, 0,0x442E,0x442F, 0, 0, - 0,0x4430,0x4431, 0, 0, 0, 0,0x4432, -0x4433,0x4434, 0, 0, 0, 0, 0, 0, - 0, 0,0x4435, 0, 0,0x4436,0x4437, 0, - 0, 0, 0, 0,0x4438,0x4439, 0,0x443A, - 0, 0,0x443B,0x443C}; - -/* page 22 0x6931-0x6D3F */ -static uint16 tab_uni_jisx021222[]={ -0x443D, 0,0x443E, 0,0x443F, 0, 0,0x4440, - 0, 0,0x4441, 0, 0, 0, 0, 0, - 0,0x4442, 0, 0,0x4443, 0, 0, 0, -0x4444, 0, 0, 0, 0,0x4445, 0, 0, - 0, 0, 0, 0, 0, 0,0x4446, 0, - 0, 0,0x4447, 0, 0, 0, 0, 0, - 0, 0,0x4448,0x4449,0x444A,0x444B, 0,0x444C, -0x444D, 0, 0,0x444E, 0, 0, 0,0x444F, -0x4450,0x4451, 0, 0, 0, 0, 0, 0, - 0,0x4452,0x4453, 0, 0, 0,0x4454,0x4455, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4456, 0, 0, 0, - 0,0x4457, 0, 0, 0,0x4458, 0,0x4459, - 0, 0, 0, 0, 0, 0, 0, 0, -0x445A, 0, 0, 0,0x445B,0x445C, 0,0x445D, - 0, 0,0x445E, 0,0x445F, 0,0x4460, 0, - 0, 0, 0, 0, 0, 0,0x4461,0x4462, - 0,0x4463, 0,0x4464, 0, 0, 0, 0, - 0, 0, 0, 0,0x4465, 0, 0,0x4466, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4467, 0, 0, 0, 0,0x4468,0x4469, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x446A, 0, 0,0x446B, 0, 0, 0, - 0, 0, 0, 0, 0,0x446C,0x446D, 0, -0x446E, 0,0x446F, 0,0x4470, 0, 0, 0, - 0, 0, 0, 0, 0,0x4471, 0,0x4472, -0x4473, 0,0x4474, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4475, 0, -0x4476, 0, 0, 0,0x4477, 0, 0, 0, - 0,0x4478, 0, 0,0x4479, 0, 0,0x447A, - 0, 0, 0,0x447B, 0, 0, 0,0x447C, - 0, 0, 0, 0, 0, 0, 0,0x447D, - 0,0x447E, 0,0x4521, 0, 0,0x4522, 0, - 0, 0,0x4523, 0, 0,0x4524,0x4525, 0, - 0, 0, 0, 0,0x4526,0x4527, 0, 0, -0x4528,0x4529, 0, 0, 0,0x452A, 0,0x452B, -0x452C,0x452D, 0, 0,0x452E,0x452F, 0, 0, - 0, 0,0x4530, 0, 0, 0, 0, 0, - 0, 0, 0,0x4531, 0, 0,0x4532, 0, - 0,0x4533,0x7449, 0, 0, 0, 0, 0, -0x4534, 0,0x4535, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4536, 0, 0, -0x4537, 0,0x4538, 0, 0,0x4539,0x453A, 0, -0x453B, 0,0x453C, 0, 0, 0, 0, 0, -0x453D, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x453E, 0,0x453F,0x4540,0x4541, 0, - 0, 0, 0, 0,0x4542, 0, 0, 0, - 0, 0,0x4543, 0, 0, 0,0x4544,0x4545, -0x4546, 0, 0,0x4547, 0, 0, 0, 0, - 0, 0, 0, 0,0x4548,0x4549,0x454A, 0, - 0, 0, 0, 0, 0,0x454B, 0,0x454D, -0x454C, 0, 0,0x454E, 0, 0, 0,0x454F, - 0, 0, 0,0x4550,0x4551,0x4552, 0, 0, - 0, 0, 0,0x4553,0x4554, 0, 0, 0, - 0,0x744A, 0,0x4555, 0, 0,0x4556, 0, - 0, 0, 0,0x4557, 0, 0, 0,0x4558, -0x4559,0x455A, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x455B,0x455C, 0, 0, 0, - 0,0x455D,0x455E, 0, 0,0x455F,0x4560, 0, -0x4561, 0, 0, 0, 0, 0,0x4562,0x4563, -0x4564, 0, 0, 0, 0, 0,0x4565, 0, - 0, 0,0x4566, 0, 0,0x4567, 0, 0, - 0, 0, 0,0x4568, 0, 0, 0,0x4569, - 0, 0,0x456A,0x456B, 0, 0,0x456C, 0, - 0, 0, 0, 0,0x456D,0x456E, 0, 0, - 0, 0,0x456F, 0, 0, 0,0x4570, 0, - 0, 0, 0, 0, 0,0x4571, 0, 0, - 0,0x4572, 0, 0,0x4573, 0, 0, 0, - 0,0x4574, 0, 0, 0,0x4575, 0,0x4576, - 0, 0, 0, 0,0x4577, 0, 0,0x4578, - 0, 0, 0, 0, 0, 0,0x4579, 0, - 0, 0,0x457A, 0, 0,0x457B, 0,0x457C, - 0, 0, 0, 0,0x457D, 0, 0, 0, - 0, 0, 0, 0,0x457E,0x4621, 0, 0, - 0,0x4622, 0, 0,0x4623, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4624, 0, - 0, 0,0x4625, 0, 0, 0,0x4626,0x4627, - 0,0x4628,0x4629, 0, 0, 0, 0,0x462A, -0x462B, 0, 0,0x462C,0x462D,0x462E, 0,0x462F, - 0, 0, 0, 0, 0, 0, 0,0x4630, -0x4631, 0, 0, 0,0x4632,0x4633, 0, 0, - 0, 0,0x4634,0x4635, 0, 0, 0, 0, -0x4636, 0, 0,0x4637, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4638, 0, 0, - 0,0x4639, 0, 0, 0, 0, 0, 0, -0x463A, 0,0x463B, 0, 0,0x463C,0x463D, 0, - 0, 0, 0, 0, 0,0x463E, 0, 0, -0x463F, 0, 0, 0, 0, 0,0x4640, 0, -0x4641, 0, 0, 0, 0, 0,0x4642, 0, - 0,0x4643, 0,0x4644,0x4645, 0, 0, 0, -0x4646, 0, 0, 0,0x4647,0x4648, 0,0x4649, - 0,0x464A, 0, 0, 0, 0, 0, 0, -0x464B, 0, 0, 0, 0, 0,0x464C, 0, - 0, 0, 0, 0, 0,0x464D,0x464E,0x464F, - 0, 0, 0,0x4650, 0,0x4651, 0, 0, - 0, 0,0x4652, 0,0x4653,0x4654, 0, 0, - 0,0x4655,0x4656, 0, 0, 0,0x4657, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4658,0x4659, 0,0x465A, 0,0x465B, 0, - 0,0x465C, 0,0x465D, 0, 0, 0, 0, -0x465E, 0,0x465F,0x4660, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4736, 0, - 0, 0,0x4661, 0,0x4662, 0,0x4663, 0, - 0, 0, 0,0x4664, 0,0x4665, 0,0x4666, -0x4667, 0,0x4668, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4669,0x466A,0x466B, 0, -0x466C, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x466D,0x466E, 0,0x466F,0x4670, - 0, 0, 0,0x4671, 0, 0,0x4672, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4673, - 0,0x4674, 0,0x4675, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4676, 0, 0, 0,0x4677, 0, 0, - 0, 0, 0, 0,0x4678, 0,0x4679,0x467A, -0x467B,0x467C, 0,0x467D, 0,0x467E, 0, 0, - 0,0x4721, 0,0x4722, 0, 0, 0,0x4723, - 0, 0, 0, 0, 0, 0,0x4724, 0, -0x4725, 0,0x4726,0x4727, 0,0x4728, 0, 0, - 0,0x4729, 0,0x472A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x472B, 0, 0,0x472C, 0, - 0,0x472D, 0, 0, 0,0x472E,0x472F, 0, -0x4730, 0,0x4731, 0, 0, 0, 0, 0, - 0,0x4732, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4733,0x4734,0x4735, - 0, 0, 0, 0, 0,0x4737,0x4738, 0, -0x4739, 0, 0, 0, 0, 0, 0, 0, -0x473A, 0, 0,0x473B, 0, 0,0x473C}; - -/* page 23 0x6D57-0x6E04 */ -static uint16 tab_uni_jisx021223[]={ -0x473D, 0, 0, 0, 0, 0, 0,0x473E, -0x473F, 0,0x4740, 0, 0, 0,0x4741, 0, -0x4742, 0, 0, 0, 0, 0, 0, 0, -0x4743,0x4744, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4745, 0, 0, - 0, 0, 0,0x4746, 0, 0, 0, 0, -0x4747, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4748,0x4749, 0,0x474A, 0,0x474B, -0x474C,0x474D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x474E, 0,0x474F, 0, 0, - 0, 0, 0, 0, 0,0x4750, 0, 0, -0x4751, 0,0x4752, 0, 0, 0,0x4753, 0, -0x4754, 0, 0, 0, 0,0x4755, 0, 0, - 0,0x4756, 0,0x4757, 0, 0, 0,0x4758, -0x4759, 0, 0, 0, 0, 0, 0,0x475A, - 0, 0, 0, 0,0x475B, 0,0x475C, 0, -0x475D,0x475E, 0,0x475F, 0, 0,0x4760, 0, - 0, 0,0x4761, 0, 0, 0, 0, 0, -0x4762,0x4763, 0,0x744C, 0,0x4764, 0,0x4765, - 0,0x744B, 0, 0, 0,0x4766, 0, 0, - 0,0x4767, 0, 0, 0,0x4768}; - -/* page 24 0x6E1E-0x6ECF */ -static uint16 tab_uni_jisx021224[]={ -0x4769, 0, 0, 0,0x476A, 0, 0, 0, - 0,0x476B, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x476C, 0, 0, 0, -0x476D, 0, 0,0x476E, 0,0x476F,0x4770, 0, - 0, 0, 0, 0, 0, 0,0x4771,0x4772, - 0, 0,0x4773,0x4774, 0,0x4775, 0, 0, - 0,0x4776, 0,0x4777,0x4778,0x4779,0x477A, 0, - 0,0x477B, 0, 0, 0, 0,0x477C,0x477D, -0x477E, 0, 0, 0,0x4821,0x4822, 0, 0, - 0, 0,0x4823, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4824, 0, 0, - 0, 0, 0, 0, 0,0x4825, 0,0x4826, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4827, - 0, 0, 0, 0, 0,0x4828, 0, 0, - 0, 0, 0,0x4829, 0, 0, 0, 0, - 0, 0,0x482A, 0, 0, 0, 0, 0, - 0,0x482B, 0, 0, 0, 0, 0,0x482C, -0x482D, 0, 0,0x482E, 0,0x482F, 0, 0, - 0, 0, 0, 0, 0,0x4830, 0, 0, - 0,0x4831,0x4832,0x4833, 0,0x4834, 0, 0, - 0,0x4835,0x4836, 0,0x4837, 0, 0,0x4838, -0x4839,0x483A}; - -/* page 25 0x6EEB-0x70E4 */ -static uint16 tab_uni_jisx021225[]={ -0x483B, 0,0x483C,0x483D, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x483E, 0, -0x483F, 0,0x4840, 0, 0, 0, 0, 0, - 0,0x4841, 0, 0, 0,0x4842, 0,0x4843, - 0,0x4844,0x4845, 0, 0, 0, 0, 0, - 0, 0, 0,0x4846, 0,0x4847, 0,0x4848, -0x4849, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x484A, 0, 0,0x484B,0x484C, - 0, 0,0x4853, 0,0x484D,0x484E, 0, 0, -0x484F, 0, 0,0x4850, 0, 0, 0, 0, -0x4851,0x4852, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4854, 0,0x4855,0x4856, -0x4857, 0, 0, 0,0x4858, 0,0x4859,0x485A, - 0, 0,0x485B,0x485C, 0, 0,0x485D,0x485E, - 0, 0, 0, 0, 0,0x485F, 0, 0, - 0,0x4860, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4861,0x4862, 0, 0, 0, 0, -0x4863, 0, 0, 0,0x4864,0x4865, 0, 0, -0x4866,0x4867,0x4868, 0, 0,0x4869, 0,0x486A, -0x486B,0x486C, 0,0x486D, 0, 0, 0,0x486E, - 0, 0, 0, 0,0x486F,0x4870, 0, 0, - 0, 0,0x4871,0x4872,0x4873,0x4874, 0, 0, - 0, 0, 0,0x4875,0x4876,0x4877, 0, 0, - 0, 0,0x4878,0x4879, 0, 0, 0, 0, - 0,0x487A, 0, 0, 0, 0, 0, 0, - 0, 0,0x487B, 0,0x487C,0x487D, 0,0x487E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4921, - 0, 0, 0,0x4922, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4923,0x4924, 0, - 0, 0, 0, 0, 0,0x4925, 0, 0, - 0, 0,0x4926, 0, 0, 0,0x4927, 0, - 0,0x4928,0x4929, 0, 0,0x492A, 0, 0, - 0, 0,0x492B,0x492C,0x492D, 0, 0, 0, - 0, 0,0x492E, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x492F, 0, 0, 0, - 0, 0, 0, 0, 0,0x4930, 0, 0, -0x4931, 0, 0, 0, 0,0x744D, 0, 0, - 0, 0, 0, 0,0x4932, 0, 0, 0, - 0,0x4933, 0, 0,0x4934, 0,0x4935, 0, - 0,0x4936, 0, 0, 0, 0, 0, 0, -0x4937,0x4938, 0, 0, 0,0x4939,0x493A,0x493B, -0x493C, 0, 0,0x4941, 0, 0, 0, 0, - 0,0x493D,0x493E, 0, 0, 0, 0, 0, - 0, 0,0x493F,0x4940, 0, 0, 0, 0, - 0,0x4942,0x4943, 0, 0, 0, 0, 0, - 0,0x4944, 0,0x4945, 0, 0, 0, 0, - 0, 0,0x4946,0x4947, 0, 0, 0, 0, - 0, 0, 0,0x4948, 0, 0,0x4949, 0, - 0, 0,0x494A,0x494B, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x494C,0x494D,0x494E,0x494F,0x4950, 0, 0, -0x4951, 0, 0, 0, 0, 0, 0, 0, - 0,0x4952, 0, 0, 0, 0, 0, 0, -0x4953, 0, 0, 0, 0,0x4954,0x4955, 0, - 0,0x4956, 0, 0,0x4957, 0, 0, 0, -0x742E, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4958, - 0, 0, 0, 0, 0, 0,0x4959, 0, -0x495A,0x495B,0x495C,0x495D, 0,0x495E, 0, 0, - 0,0x495F, 0, 0, 0, 0, 0, 0, - 0,0x4960}; - -/* page 26 0x70FA-0x71DC */ -static uint16 tab_uni_jisx021226[]={ -0x4961, 0, 0, 0, 0, 0, 0, 0, - 0,0x4962,0x4963,0x4964,0x4965,0x4966, 0, 0, - 0,0x4967,0x4968, 0, 0,0x4969, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x496A, 0,0x496B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x496C, 0,0x496D, 0,0x496E,0x496F,0x4970, - 0, 0, 0, 0, 0, 0,0x4971, 0, - 0, 0, 0, 0, 0, 0, 0,0x4972, - 0, 0, 0,0x4973,0x4974,0x4975, 0, 0, -0x4976,0x4977, 0, 0, 0, 0,0x4978, 0, -0x4979, 0, 0, 0, 0,0x497A, 0, 0, -0x497B, 0,0x497C, 0,0x497D, 0,0x497E, 0, - 0, 0, 0, 0, 0, 0,0x4A21, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4A22, - 0, 0, 0, 0, 0, 0,0x4A23, 0, - 0, 0, 0,0x4A24, 0,0x4A25, 0, 0, - 0, 0,0x4A26, 0, 0, 0, 0, 0, -0x4A27, 0, 0, 0, 0, 0, 0, 0, -0x4A28,0x4A29, 0, 0, 0, 0,0x4A2A, 0, -0x4A2B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4A2C,0x4A2D, 0, -0x4A2E,0x4A2F, 0, 0, 0, 0, 0, 0, -0x4A30, 0, 0, 0, 0,0x4A31,0x4A32,0x4A33, - 0, 0,0x4A34, 0, 0, 0, 0, 0, - 0,0x4A35,0x4A36, 0, 0, 0, 0, 0, - 0,0x4A37, 0, 0,0x4A38, 0, 0,0x4A39, -0x4A3A, 0,0x4A3B}; - -/* page 27 0x71F8-0x7E9E */ -static uint16 tab_uni_jisx021227[]={ -0x4A3C, 0, 0, 0, 0, 0,0x4A3D, 0, -0x4A3E, 0, 0, 0, 0, 0, 0,0x4A3F, -0x4A40,0x4A41, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4A42, 0, 0, 0,0x4A43, - 0, 0,0x4A44, 0, 0,0x4A45, 0,0x4A46, - 0, 0, 0, 0,0x4A47, 0, 0, 0, - 0, 0, 0,0x4A48, 0, 0, 0,0x4A49, - 0, 0, 0, 0,0x4A4A, 0, 0, 0, -0x4A4B,0x4A4C, 0, 0, 0, 0,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x5035, 0, 0,0x5037,0x5038, - 0, 0,0x5039,0x503A, 0, 0, 0,0x503B, -0x5036, 0, 0, 0, 0, 0,0x503C, 0, - 0, 0, 0, 0,0x503D, 0, 0, 0, -0x503E, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x503F, 0,0x5040, 0,0x5041,0x5042, -0x5043, 0, 0, 0, 0,0x5044, 0,0x5045, - 0,0x5046, 0, 0, 0,0x5047, 0, 0, -0x7454,0x5048, 0, 0,0x5049,0x504A, 0, 0, - 0, 0, 0,0x504B, 0,0x504C, 0,0x504D, - 0, 0, 0, 0,0x504E,0x504F,0x5050, 0, - 0, 0,0x5051,0x5052, 0, 0, 0,0x5053, - 0,0x5054, 0, 0,0x5055, 0, 0, 0, -0x5056, 0, 0,0x5057,0x5058, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5059, - 0,0x505A, 0,0x505B, 0, 0, 0, 0, - 0, 0,0x505C, 0, 0, 0, 0, 0, - 0,0x505D, 0,0x505E,0x505F, 0,0x5060, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5061,0x5062, 0, 0, 0, - 0,0x5063, 0,0x5064,0x5065,0x5066,0x5067, 0, -0x5068, 0, 0,0x5069,0x506A, 0, 0, 0, - 0,0x506B, 0, 0, 0, 0, 0, 0, -0x506C,0x506D, 0,0x506E, 0, 0, 0,0x506F, - 0,0x5070, 0, 0,0x5071, 0, 0, 0, -0x5072, 0, 0,0x5073, 0, 0, 0, 0, - 0, 0,0x5074, 0,0x5075, 0, 0,0x5076, -0x5077, 0,0x5078, 0, 0, 0, 0,0x5079, - 0, 0, 0, 0,0x507A, 0,0x507B, 0, - 0, 0,0x507C, 0, 0,0x507D,0x507E, 0, -0x5121, 0,0x5122, 0, 0,0x5123, 0, 0, - 0, 0,0x5124,0x5125, 0,0x5126, 0, 0, - 0,0x5127, 0, 0, 0, 0, 0, 0, -0x5128, 0, 0, 0,0x5129, 0, 0, 0, - 0, 0,0x512A,0x512B, 0, 0, 0,0x512C, - 0,0x512D,0x512E, 0,0x512F, 0, 0, 0, - 0,0x5130, 0, 0, 0,0x5131, 0, 0, - 0, 0, 0,0x5132, 0, 0,0x5133, 0, - 0,0x5134, 0, 0, 0, 0, 0,0x5135, - 0, 0, 0,0x5136, 0,0x5137, 0,0x5138, -0x5139, 0, 0, 0,0x513A,0x513B, 0, 0, -0x513C,0x513D,0x513E, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x513F,0x5140, 0,0x5141, -0x5142, 0, 0, 0,0x5143, 0, 0, 0, - 0, 0, 0, 0, 0,0x5144,0x5145, 0, - 0,0x5146, 0, 0,0x5147,0x5148, 0,0x5149, -0x514A, 0, 0, 0, 0,0x514B, 0,0x514C, - 0, 0,0x514D, 0, 0,0x514E, 0, 0, - 0, 0, 0, 0, 0,0x514F, 0, 0, -0x5150, 0, 0, 0, 0, 0,0x5151, 0, -0x5152, 0,0x5153, 0, 0,0x5154,0x5155, 0, - 0, 0,0x5156,0x5157, 0, 0, 0, 0, -0x5158,0x5159, 0, 0,0x515A, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x515B, 0, -0x515C, 0, 0,0x515D, 0, 0, 0, 0, - 0, 0, 0, 0,0x515E, 0, 0, 0, - 0, 0, 0,0x515F, 0,0x5160, 0, 0, - 0,0x5161, 0,0x5162,0x5163, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5164, 0, - 0,0x5165, 0, 0,0x5166, 0,0x5167, 0, - 0,0x5168, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5169, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x7459, -0x516A,0x516B, 0,0x516C,0x516D, 0, 0, 0, - 0,0x516E, 0, 0,0x516F, 0, 0, 0, - 0, 0, 0,0x5170, 0,0x5171,0x5172, 0, - 0, 0, 0, 0, 0, 0, 0,0x5173, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5174, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5175, - 0, 0, 0,0x5176, 0, 0, 0,0x5177, - 0,0x5178,0x5179,0x517A, 0,0x517B,0x517C,0x517D, -0x517E,0x5221, 0, 0,0x5222, 0, 0, 0, - 0, 0, 0, 0, 0,0x5223, 0,0x5224, -0x5225,0x5226, 0, 0, 0, 0, 0,0x5227, - 0, 0, 0, 0, 0, 0,0x5228, 0, - 0, 0, 0, 0, 0,0x5229, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x522A, 0, 0, 0,0x522B, 0,0x522C, 0, - 0,0x522D,0x522E, 0, 0,0x522F, 0,0x5230, - 0, 0,0x5231,0x5232, 0, 0, 0,0x5233, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5234, 0, 0, 0, - 0,0x5235, 0, 0, 0, 0,0x5236, 0, -0x5237,0x5238, 0, 0, 0, 0,0x5239, 0, - 0, 0, 0,0x523A, 0, 0,0x523B, 0, -0x523C, 0, 0, 0, 0,0x523D, 0, 0, - 0, 0, 0, 0,0x523E, 0, 0,0x523F, -0x5240, 0,0x5241, 0, 0,0x5242,0x5243, 0, - 0, 0,0x5244,0x5245,0x5246,0x5247, 0, 0, - 0, 0,0x5248, 0, 0,0x5249, 0, 0, -0x524A, 0,0x524B, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x524C, 0,0x524D,0x524E, - 0,0x524F,0x5250,0x5251, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5252, 0,0x5253, 0, 0, 0, 0, 0, - 0, 0,0x5254, 0,0x5255,0x5256, 0, 0, -0x5257,0x5258,0x5259, 0,0x525A, 0,0x525B, 0, - 0,0x525C,0x525D,0x525E,0x525F, 0,0x5260, 0, - 0,0x5261, 0,0x5262,0x5263, 0,0x5264,0x5265, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5266, 0,0x5267, 0, 0, 0, 0, -0x5268, 0, 0, 0, 0,0x5269,0x526A, 0, -0x526B, 0, 0, 0,0x526C, 0, 0, 0, - 0,0x526D, 0,0x526E,0x526F, 0,0x5270, 0, - 0,0x5271,0x5272, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5273, 0, - 0, 0,0x5274, 0, 0, 0, 0, 0, - 0,0x5276,0x5277,0x5278, 0,0x5275, 0, 0, - 0,0x5279,0x527A,0x527B,0x527C,0x527D,0x527E, 0, - 0,0x5321, 0,0x5322, 0, 0, 0,0x5323, - 0,0x5324, 0, 0, 0,0x5325,0x5326, 0, -0x5327, 0,0x5328, 0, 0, 0, 0, 0, - 0,0x5329, 0, 0,0x532A,0x532B, 0, 0, - 0, 0, 0, 0, 0, 0,0x532C,0x532D, - 0, 0, 0, 0, 0, 0, 0,0x532E, - 0, 0, 0, 0,0x532F, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5330, 0, -0x5331, 0, 0, 0, 0, 0,0x5332, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5333, 0, 0, 0, 0, 0,0x5334,0x5335, - 0, 0,0x5336,0x5337,0x5338, 0, 0,0x5339, - 0, 0, 0, 0,0x533A, 0, 0,0x533B, -0x533C,0x533D, 0, 0, 0,0x533E, 0,0x533F, - 0, 0, 0,0x5340,0x5341,0x5342, 0,0x5343, - 0,0x5344,0x5345, 0, 0,0x5346, 0, 0, - 0, 0, 0, 0, 0, 0,0x5347, 0, - 0,0x5348, 0,0x5349, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x534A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x534B, 0, 0, 0,0x534C, -0x534D,0x534E, 0, 0, 0, 0, 0,0x534F, - 0,0x5350,0x5351,0x5352, 0, 0,0x5353, 0, - 0, 0, 0, 0, 0,0x5354,0x5355, 0, - 0, 0, 0,0x5356, 0, 0,0x5357, 0, - 0, 0,0x5358, 0, 0,0x5359, 0, 0, - 0,0x535A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x535B,0x535C,0x535D, 0, -0x535E,0x535F, 0, 0, 0, 0, 0,0x5360, -0x5361, 0, 0, 0, 0,0x5362, 0, 0, - 0,0x5363, 0,0x5364, 0, 0, 0,0x5365, - 0,0x5366,0x5367, 0,0x5368,0x5369, 0, 0, - 0, 0, 0, 0, 0,0x536A, 0,0x536B, - 0, 0,0x536C, 0, 0, 0, 0, 0, -0x536D, 0, 0, 0, 0, 0, 0, 0, -0x536E, 0,0x536F,0x5370, 0, 0, 0,0x5371, - 0,0x5372,0x5373,0x5374, 0,0x5375,0x5376, 0, -0x5377, 0, 0,0x5378,0x5379,0x537A, 0, 0, - 0,0x537B, 0, 0, 0, 0,0x537C,0x537D, - 0, 0, 0, 0, 0,0x537E,0x5421, 0, -0x745C, 0, 0, 0, 0, 0,0x5422,0x5423, - 0, 0,0x5424, 0, 0, 0, 0, 0, - 0, 0, 0,0x5425, 0, 0,0x5426,0x5427, - 0,0x5428, 0, 0, 0, 0, 0, 0, - 0, 0,0x5429,0x542A,0x542B,0x542C,0x542D, 0, - 0, 0, 0, 0,0x542E,0x542F,0x5430, 0, - 0, 0, 0, 0, 0, 0,0x745D,0x5431, - 0,0x5432, 0, 0, 0, 0, 0, 0, - 0, 0,0x5434, 0, 0,0x5435,0x5436, 0, - 0, 0,0x5437,0x5438, 0,0x5439, 0, 0, - 0,0x543A, 0, 0, 0,0x543B,0x543C, 0, - 0,0x543D,0x543E, 0, 0, 0, 0, 0, -0x5433, 0, 0, 0, 0, 0, 0, 0, -0x543F, 0, 0, 0, 0, 0, 0, 0, -0x5440,0x5441, 0, 0, 0,0x5442, 0,0x5443, - 0, 0, 0, 0,0x5444,0x5445, 0, 0, -0x5446, 0, 0, 0, 0, 0, 0,0x5447, -0x5448, 0, 0, 0,0x5449,0x544A, 0,0x544B, - 0, 0, 0,0x544C, 0, 0,0x544D, 0, - 0, 0, 0, 0, 0, 0, 0,0x544E, - 0, 0, 0, 0,0x544F,0x5450, 0,0x5451, - 0, 0, 0, 0, 0, 0,0x5452, 0, -0x5453, 0,0x5454, 0, 0, 0, 0, 0, -0x5455, 0, 0, 0, 0, 0, 0,0x5456, - 0,0x5457,0x5458, 0, 0,0x5459, 0, 0, - 0, 0, 0,0x545A, 0, 0,0x545B,0x545C, - 0, 0, 0,0x545D, 0, 0, 0, 0, -0x545E, 0, 0, 0, 0, 0,0x545F, 0, - 0,0x5460, 0, 0, 0, 0,0x5461,0x5462, - 0, 0,0x5463, 0, 0,0x5464, 0, 0, - 0,0x5465, 0, 0, 0,0x5466, 0, 0, -0x5467, 0,0x5468, 0, 0,0x5469,0x546A}; - -/* page 28 0x7F3B-0x8044 */ -static uint16 tab_uni_jisx021228[]={ -0x546C,0x546B,0x546D,0x546E,0x546F, 0, 0, 0, -0x5470,0x5471, 0, 0,0x5472, 0, 0, 0, - 0, 0, 0, 0,0x5473, 0, 0,0x5474, -0x5475, 0, 0, 0, 0, 0, 0, 0, -0x5476,0x5477,0x5478, 0, 0, 0,0x5479, 0, -0x547A,0x547B,0x547C,0x547D, 0, 0, 0, 0, - 0, 0,0x547E, 0, 0, 0,0x5521, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5522,0x5523,0x5524,0x5525, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5526, 0,0x5527, 0,0x5528,0x5529,0x552A, 0, - 0, 0, 0,0x552B,0x552C, 0, 0, 0, - 0,0x552D, 0, 0, 0, 0,0x552E,0x552F, - 0, 0, 0,0x5530, 0, 0, 0,0x5531, - 0, 0,0x5532, 0, 0, 0, 0, 0, - 0,0x5533, 0, 0, 0, 0, 0, 0, - 0,0x5534, 0, 0,0x5535,0x5536, 0, 0, -0x5537, 0, 0, 0, 0,0x5538, 0, 0, - 0, 0, 0,0x5539,0x553A, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x553B, 0, 0, 0,0x553C, 0, 0, 0, -0x553D, 0,0x553E, 0, 0,0x553F, 0, 0, - 0,0x5540, 0,0x5541,0x5542, 0, 0,0x5543, - 0, 0, 0, 0, 0, 0, 0,0x5544, - 0, 0,0x5545,0x5546,0x5547, 0, 0, 0, - 0, 0, 0, 0,0x5548,0x5549, 0,0x554A, - 0, 0,0x554B,0x554C,0x554D, 0,0x554E, 0, -0x554F,0x5550, 0,0x5551, 0, 0, 0, 0, - 0, 0,0x5552,0x5553,0x5554,0x5555, 0, 0, - 0,0x5556, 0,0x5557, 0, 0, 0, 0, - 0,0x5558, 0,0x5559, 0,0x555A, 0, 0, - 0,0x555B,0x555C, 0,0x555D, 0,0x555E,0x555F, - 0,0x5560, 0,0x5561, 0,0x5562, 0, 0, - 0,0x5563}; - -/* page 29 0x8060-0x8362 */ -static uint16 tab_uni_jisx021229[]={ -0x5564, 0, 0, 0,0x5565, 0,0x5566, 0, - 0, 0, 0, 0, 0,0x5567, 0, 0, - 0,0x5568, 0, 0, 0,0x5569, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x556A, 0, 0, 0, 0, 0, 0, -0x556B, 0, 0, 0, 0, 0,0x556C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x556D, 0,0x556E, 0, - 0, 0, 0, 0, 0, 0,0x556F,0x5570, - 0, 0, 0,0x5571, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5572,0x5573, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5574, 0, 0, 0, 0,0x5575, 0,0x5576, - 0, 0,0x5577, 0,0x5578,0x5579, 0,0x557A, -0x557B, 0, 0, 0, 0, 0, 0, 0, -0x557C, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x557D,0x557E, 0, -0x5621, 0,0x5622,0x5623, 0, 0,0x5624, 0, - 0,0x5625,0x5626, 0, 0, 0,0x5627, 0, - 0, 0, 0,0x5628, 0, 0, 0, 0, - 0, 0, 0,0x5629, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x562A,0x562B, -0x562C, 0, 0, 0,0x562D, 0,0x562E, 0, -0x562F, 0, 0, 0,0x5630, 0, 0,0x5631, - 0, 0, 0, 0,0x5632, 0, 0, 0, -0x5633, 0, 0, 0, 0,0x5634, 0, 0, - 0, 0,0x5635, 0,0x5636, 0, 0, 0, - 0, 0, 0, 0, 0,0x5637, 0,0x5638, - 0, 0,0x5639, 0,0x563A, 0, 0, 0, - 0, 0,0x563B, 0, 0, 0, 0,0x563C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x563D,0x563E, 0, 0, 0, 0, 0,0x563F, -0x5640,0x5641, 0, 0, 0,0x5642, 0,0x5643, - 0, 0, 0, 0, 0, 0, 0,0x5644, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5645, 0, 0,0x5647,0x5648,0x5649, 0, - 0, 0, 0,0x564A, 0, 0,0x564B, 0, -0x5646, 0, 0, 0, 0, 0,0x564C, 0, -0x564D, 0, 0,0x564E, 0, 0,0x564F, 0, - 0, 0,0x5650, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5651, 0, - 0, 0,0x5652, 0,0x5653, 0, 0, 0, - 0, 0, 0,0x5654, 0, 0, 0, 0, - 0, 0, 0,0x5656, 0,0x5657, 0, 0, - 0, 0,0x5658,0x5655, 0, 0,0x5659,0x565A, - 0, 0, 0, 0, 0,0x565B, 0,0x565C, - 0, 0, 0,0x565D, 0,0x565E,0x565F, 0, - 0,0x5660, 0, 0,0x5661, 0, 0, 0, - 0, 0, 0,0x5662,0x5663, 0, 0, 0, -0x5664,0x5665,0x5666, 0, 0,0x5667,0x5668, 0, -0x5669,0x566A, 0, 0, 0,0x566B, 0,0x566C, -0x566D, 0, 0,0x566E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x566F, - 0, 0, 0,0x5670,0x5671, 0, 0, 0, - 0,0x5672,0x5673, 0, 0,0x5674, 0, 0, - 0,0x5675,0x5676, 0, 0, 0, 0, 0, -0x5677, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5678, 0,0x5679, 0, 0, 0, - 0, 0,0x567A, 0, 0, 0, 0, 0, - 0, 0, 0,0x567B,0x567C,0x567D,0x567E, 0, - 0, 0, 0,0x5721, 0, 0,0x5722,0x5723, - 0,0x5724, 0, 0, 0, 0,0x5725, 0, - 0, 0, 0, 0,0x5726, 0, 0, 0, -0x5727, 0, 0,0x5728, 0, 0, 0,0x5729, - 0, 0, 0, 0, 0,0x572A, 0, 0, - 0, 0, 0, 0,0x572B, 0, 0, 0, - 0, 0, 0,0x572C, 0,0x572D, 0,0x572E, -0x572F,0x5730, 0,0x5731,0x5732, 0, 0,0x5733, - 0,0x5734,0x5735, 0, 0, 0,0x5736, 0, - 0,0x5737, 0, 0,0x5738, 0,0x5739, 0, -0x573A, 0,0x573B,0x573C, 0, 0, 0, 0, -0x573D,0x573E, 0,0x573F,0x5740, 0, 0,0x5741, -0x5742,0x5743,0x5744, 0, 0, 0,0x5745, 0, -0x5746, 0,0x5747, 0,0x5748, 0, 0,0x5749, - 0, 0,0x574A, 0,0x574B, 0,0x574C,0x574D, - 0, 0, 0, 0, 0, 0,0x574E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x574F, 0, 0, 0, 0,0x5750, 0, 0, - 0, 0,0x5751, 0, 0, 0, 0, 0, -0x5752, 0,0x5753, 0,0x5754, 0, 0, 0, -0x5755, 0,0x5756, 0, 0,0x5757, 0,0x5758, - 0, 0, 0, 0, 0, 0,0x5759,0x575A, - 0, 0, 0, 0, 0,0x575B,0x575C, 0, -0x575D,0x575E, 0, 0, 0, 0, 0,0x575F, -0x5760, 0,0x5761,0x5762, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5764, 0,0x5765,0x5766,0x5767, - 0,0x5768,0x5769, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x576A,0x576B,0x576C, 0, -0x576D, 0, 0,0x576E, 0, 0, 0,0x576F, - 0, 0,0x5770, 0,0x5771,0x5772, 0, 0, - 0, 0,0x5773,0x5774,0x5775, 0, 0,0x5776, - 0, 0, 0, 0, 0,0x5777,0x5778, 0, - 0,0x5779, 0,0x583E,0x5763,0x577A,0x577B,0x577C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x745F}; - -/* page 30 0x8370-0x8419 */ -static uint16 tab_uni_jisx021230[]={ -0x577D, 0, 0, 0, 0, 0, 0, 0, -0x577E, 0, 0, 0, 0,0x5821, 0,0x5822, -0x5823, 0,0x5824, 0,0x5825, 0,0x5826, 0, - 0, 0, 0, 0, 0,0x5827, 0, 0, - 0, 0,0x5828, 0,0x5829,0x582A, 0, 0, -0x582B,0x582C, 0,0x582D,0x582E,0x582F, 0, 0, - 0, 0, 0, 0, 0, 0,0x5830,0x5831, - 0,0x5832, 0, 0,0x5833,0x584C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5834,0x5835, -0x5836, 0, 0, 0, 0, 0, 0,0x5837, - 0,0x5838, 0, 0, 0, 0, 0,0x5839, -0x583A,0x583B, 0, 0,0x583C, 0, 0, 0, - 0, 0, 0, 0, 0,0x583D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x583F, 0,0x5840, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5841, 0, -0x5842,0x5843, 0, 0,0x5844, 0, 0, 0, - 0,0x5845, 0, 0, 0, 0,0x5846, 0, - 0, 0,0x5847, 0, 0, 0, 0,0x5848, - 0,0x5849, 0, 0, 0,0x584A, 0, 0, - 0,0x584B}; - -/* page 31 0x842F-0x8880 */ -static uint16 tab_uni_jisx021231[]={ -0x584D, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x584E, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x584F, 0, -0x5850,0x5851, 0,0x5852, 0, 0,0x5853, 0, -0x5854, 0,0x5855,0x5856, 0, 0, 0,0x5857, - 0,0x5858,0x5859,0x585A, 0,0x585B, 0, 0, - 0,0x585C, 0, 0, 0,0x585D,0x585E, 0, -0x585F, 0, 0,0x5860, 0, 0, 0, 0, - 0,0x5861, 0, 0,0x5862,0x5863, 0,0x5864, - 0,0x5865, 0, 0, 0,0x5866,0x5867, 0, - 0, 0,0x5868, 0, 0, 0,0x5869, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x586A,0x586B, 0,0x586C, 0, - 0, 0, 0, 0, 0, 0, 0,0x586D, - 0, 0, 0, 0, 0, 0, 0,0x586E, - 0,0x586F,0x5870,0x5871, 0, 0, 0, 0, -0x5872, 0,0x5873, 0, 0,0x5874, 0, 0, - 0, 0, 0,0x5875, 0, 0,0x5876,0x5877, - 0,0x5878, 0,0x5879, 0, 0, 0, 0, -0x587A,0x587B, 0, 0, 0,0x587C, 0, 0, -0x587D, 0, 0, 0,0x587E, 0, 0, 0, - 0, 0, 0, 0, 0,0x5921, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5922, 0, 0,0x5923, 0, 0, 0, 0, -0x5924,0x5925,0x5926,0x5927, 0, 0, 0, 0, -0x5928, 0, 0,0x592A,0x592B, 0,0x592C, 0, - 0, 0, 0,0x592D,0x592E, 0, 0, 0, -0x592F, 0, 0, 0, 0,0x5930, 0,0x5931, - 0,0x5932, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5933, 0,0x5934, - 0, 0, 0,0x5935,0x5936,0x5937,0x5938, 0, -0x5939, 0, 0,0x593A,0x593B, 0, 0, 0, -0x593C, 0, 0,0x5929,0x593D,0x593E, 0,0x593F, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5940, 0, 0, 0, 0, 0, 0,0x5941, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5942,0x5943,0x5944,0x5945,0x5946, 0, 0,0x5947, - 0, 0,0x5948, 0, 0,0x5949,0x594A,0x594B, -0x594C,0x594D,0x594E,0x594F, 0,0x5950, 0, 0, - 0, 0, 0, 0,0x5951, 0, 0, 0, -0x5952, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5953,0x5954,0x5955, 0,0x5956, 0, -0x5957, 0,0x5958, 0, 0, 0,0x5959,0x595A, - 0, 0,0x595B, 0,0x595C,0x595D, 0, 0, -0x595E, 0, 0, 0,0x595F, 0, 0, 0, - 0,0x5960, 0, 0, 0, 0,0x5961, 0, -0x5962,0x5963, 0,0x5964, 0, 0,0x5965, 0, -0x5966, 0, 0, 0, 0, 0,0x5974, 0, - 0,0x7461, 0, 0, 0,0x5967, 0,0x5968, -0x5969,0x596A, 0, 0, 0,0x596B,0x596C,0x596D, -0x596E, 0, 0,0x596F, 0, 0, 0, 0, -0x5970, 0, 0,0x5971,0x5972, 0, 0,0x5973, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5975, 0,0x5976, 0, 0, 0, 0, -0x5977,0x5978, 0, 0, 0, 0, 0,0x5979, - 0,0x597A, 0, 0, 0, 0,0x597B, 0, - 0, 0, 0, 0,0x597C, 0, 0,0x597D, - 0, 0, 0, 0, 0,0x597E, 0, 0, -0x5A21,0x5A22, 0, 0, 0,0x5A23,0x5A24, 0, - 0, 0, 0, 0, 0, 0,0x5A25,0x5A26, - 0,0x5A27,0x5A28,0x5A29, 0, 0, 0, 0, - 0,0x5A2A,0x5A2B, 0,0x5A2C, 0, 0,0x5A2D, - 0, 0,0x5A2E, 0, 0, 0, 0, 0, -0x5A2F, 0,0x5A30, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5A31, - 0,0x5A32, 0,0x5A33, 0,0x5A34,0x5A35, 0, - 0,0x5A36,0x3866,0x5A37, 0, 0, 0,0x5A38, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5A39,0x5A3A, 0, 0,0x5A3B, -0x5A3C,0x5A3D,0x5A3E, 0, 0, 0,0x5A3F, 0, - 0,0x5A40,0x5A41,0x5A42,0x5A43,0x5A44, 0, 0, - 0, 0,0x5A45, 0, 0,0x5A46, 0, 0, -0x5A47, 0, 0, 0, 0, 0,0x5A48,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D, - 0,0x5C2E, 0,0x5C2F, 0,0x5C30, 0, 0, -0x5C31,0x5C32, 0, 0, 0,0x5C33, 0, 0, - 0, 0,0x5C34, 0, 0, 0, 0, 0, - 0, 0,0x5C35, 0, 0, 0, 0, 0, - 0, 0,0x5C36, 0,0x5C37, 0, 0, 0, - 0,0x5C38}; - -/* page 32 0x8898-0x89BC */ -static uint16 tab_uni_jisx021232[]={ -0x5C39, 0,0x5C3A,0x5C3B,0x5C3C, 0, 0,0x5C3D, -0x5C3E, 0, 0, 0, 0, 0, 0, 0, -0x5C3F, 0,0x5C40, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5C41, 0, 0,0x5C42,0x5C43, 0, -0x5C44, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5C45,0x5C46,0x5C47,0x5C48,0x5C49, 0, - 0,0x5C4A,0x5C4B,0x5C4C, 0, 0, 0, 0, - 0, 0, 0,0x5C4D, 0, 0,0x5C4E, 0, - 0, 0, 0, 0, 0, 0, 0,0x5C4F, - 0, 0, 0, 0, 0, 0, 0,0x5C50, -0x5C51,0x5C52, 0, 0, 0,0x5C53, 0,0x5C54, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5C55, 0, 0, 0, 0,0x5C56, 0, - 0, 0, 0, 0, 0,0x5C57,0x5C58,0x5C59, - 0, 0, 0, 0, 0,0x5C5A,0x5C5B, 0, -0x5C5C,0x5C5D,0x5C5E, 0,0x5C5F, 0, 0, 0, -0x5C60, 0, 0, 0, 0, 0,0x5C61,0x5C62, -0x5C63, 0, 0, 0, 0, 0, 0, 0, -0x5C64,0x5C65,0x5C66, 0, 0,0x5C67, 0, 0, - 0,0x5C68,0x5C69, 0, 0, 0,0x5C6A, 0, -0x5C6B, 0,0x5C6C, 0, 0,0x5C6D,0x5C6E, 0, - 0,0x5C6F, 0, 0, 0, 0, 0,0x5C70, - 0, 0,0x5C71, 0, 0, 0, 0,0x5C72, - 0, 0,0x5C73,0x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B, -0x5E4C, 0, 0, 0, 0,0x5E4D, 0, 0, - 0, 0,0x5E4F, 0, 0, 0, 0,0x5E50, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5E51, 0, 0, 0, 0, 0, 0, - 0, 0,0x5E52, 0,0x5E53,0x5E54, 0, 0, -0x5E55, 0,0x5E56,0x7466, 0,0x5E57, 0, 0, -0x5E58,0x5E59, 0, 0, 0, 0, 0,0x5E5A, - 0,0x5E5B, 0,0x5E5C, 0, 0, 0, 0, -0x5E5D,0x5E5E, 0, 0, 0, 0, 0, 0, -0x5E5F, 0,0x5E60,0x5E61}; - -/* page 34 0x8C38-0x8CA4 */ -static uint16 tab_uni_jisx021234[]={ -0x5E62,0x5E63, 0, 0, 0,0x5E64,0x5E65, 0, - 0, 0, 0, 0, 0,0x5E66, 0,0x5E67, - 0,0x5E68, 0,0x5E69, 0, 0, 0,0x5E6A, - 0,0x5E6B, 0,0x5E6C,0x5E6D, 0, 0,0x5E6E, -0x5E6F,0x5E72, 0,0x5E70, 0,0x5E71, 0, 0, - 0, 0, 0,0x5E73,0x5E74, 0,0x5E75, 0, -0x5E76,0x5E77, 0, 0, 0,0x5E78, 0, 0, - 0, 0, 0,0x5E79, 0,0x5E7A,0x5E7B, 0, - 0, 0, 0,0x5E7C, 0, 0,0x5E7D, 0, - 0, 0, 0, 0, 0, 0,0x5E7E,0x5F21, - 0, 0, 0,0x5F22, 0, 0, 0, 0, -0x5F23, 0,0x5F24,0x5F25, 0, 0, 0, 0, - 0,0x5F26, 0,0x5F27,0x5F28, 0, 0, 0, - 0, 0, 0, 0,0x5F29}; - -/* page 35 0x8CB9-0x8D1B */ -static uint16 tab_uni_jisx021235[]={ -0x5F2A,0x5F2B, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5F2C,0x5F2D, 0, 0, -0x5F2E, 0,0x5F2F, 0, 0, 0,0x5F30, 0, - 0, 0, 0, 0,0x5F32,0x5F31, 0, 0, -0x5F33, 0, 0, 0,0x5F34, 0, 0, 0, -0x5F35, 0, 0, 0, 0, 0, 0,0x5F36, - 0, 0, 0,0x5F37, 0, 0,0x5F38,0x5F39, - 0,0x5F3A, 0,0x7467,0x5F3B, 0,0x5F3C,0x5F3D, - 0, 0, 0, 0, 0,0x5F3E,0x5F3F, 0, -0x5F40, 0,0x5F41, 0, 0, 0, 0, 0, -0x5F42, 0, 0, 0, 0, 0, 0, 0, - 0,0x5F43, 0, 0, 0, 0,0x5F44, 0, - 0, 0,0x5F45}; - -/* page 36 0x8D65-0x8F65 */ -static uint16 tab_uni_jisx021236[]={ -0x5F46, 0, 0, 0,0x5F47, 0, 0,0x5F48, - 0,0x5F49, 0, 0, 0, 0, 0, 0, - 0,0x7468, 0, 0, 0, 0, 0, 0, - 0, 0,0x5F4A, 0, 0,0x5F4B, 0,0x5F4C, - 0, 0, 0,0x5F4D, 0, 0, 0, 0, -0x5F4E, 0, 0,0x5F4F,0x5F50, 0, 0, 0, -0x5F51, 0, 0, 0, 0, 0, 0, 0, - 0,0x5F52,0x5F53,0x5F54, 0, 0, 0, 0, - 0,0x5F55, 0, 0, 0, 0,0x5F56,0x5F57, - 0, 0,0x5F58, 0, 0,0x5F59, 0, 0, -0x5F5A, 0,0x5F5B, 0,0x5F5C, 0,0x5F5D,0x5F6F, - 0, 0, 0,0x5F5E, 0, 0, 0, 0, -0x5F5F,0x5F60,0x5F61,0x5F62, 0,0x5F63, 0, 0, - 0,0x5F64, 0, 0,0x5F65, 0, 0,0x5F66, -0x5F67, 0,0x5F68, 0,0x5F69, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5F6A, -0x5F6B, 0,0x5F6C, 0, 0, 0, 0,0x5F6D, - 0, 0, 0,0x5F6E,0x5F70,0x5F71, 0,0x5F72, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5F73, 0, 0, 0,0x5F74, 0, 0,0x5F75, -0x5F76,0x5F77, 0, 0, 0, 0,0x5F78, 0, - 0, 0, 0, 0,0x5F79, 0, 0,0x5F7A, - 0,0x5F7B, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5F7C,0x5F7D,0x5F7E,0x6021, 0, - 0,0x6022,0x6023, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6024, 0,0x6025, 0, - 0,0x6026,0x6027,0x6028,0x6029, 0, 0, 0, -0x602A, 0, 0,0x602B,0x602C, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x602D, 0, -0x602E,0x602F,0x6030, 0, 0, 0, 0,0x6031, - 0, 0, 0, 0, 0, 0,0x6032,0x6033, -0x6034,0x6035, 0, 0,0x6036,0x6037, 0, 0, - 0, 0, 0, 0,0x6038, 0, 0,0x6039, -0x603A, 0,0x603B,0x603C,0x603D, 0, 0, 0, - 0, 0, 0, 0,0x603E,0x603F,0x6040, 0, - 0, 0, 0, 0, 0,0x6041,0x6042, 0, - 0, 0, 0, 0,0x6043, 0, 0, 0, - 0, 0, 0,0x6044, 0,0x6045, 0, 0, -0x6046, 0, 0, 0, 0,0x6047,0x6048, 0, -0x6049,0x604A, 0, 0, 0,0x604B, 0, 0, - 0, 0,0x604C, 0,0x604D, 0, 0, 0, -0x604E,0x604F, 0, 0, 0, 0,0x6050, 0, -0x6051, 0, 0, 0, 0,0x6052,0x6053, 0, - 0, 0, 0,0x6054,0x6055, 0,0x6056,0x6057, - 0, 0,0x6058, 0, 0, 0, 0, 0, - 0, 0,0x6059, 0,0x605A, 0, 0,0x605B, - 0, 0, 0, 0, 0, 0, 0,0x605C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x605D, 0, 0, 0, 0, -0x6064,0x605E, 0,0x605F,0x6060, 0, 0, 0, - 0, 0,0x6061, 0,0x6062,0x6063, 0, 0, - 0, 0, 0,0x6065, 0,0x6066, 0, 0, - 0, 0,0x6067,0x6068, 0, 0, 0, 0, - 0, 0,0x6069,0x606A, 0, 0, 0, 0, - 0,0x606B,0x606C,0x606D, 0, 0, 0, 0, - 0,0x606E, 0,0x606F,0x6070, 0,0x6071, 0, -0x6072, 0,0x6073,0x6074, 0, 0, 0,0x6075, -0x6076,0x6077, 0, 0, 0, 0, 0,0x6078, -0x6079,0x607A,0x607B, 0, 0,0x607C, 0, 0, - 0, 0, 0,0x607D,0x607E, 0,0x6121, 0, - 0, 0,0x6122, 0, 0, 0, 0, 0, - 0, 0,0x6123, 0,0x6124,0x6125,0x6126,0x6127, -0x6128, 0, 0,0x6129, 0, 0, 0, 0, -0x612A,0x612B, 0, 0, 0, 0, 0, 0, -0x612C}; - -/* page 37 0x8F9D-0x9484 */ -static uint16 tab_uni_jisx021237[]={ -0x612D, 0, 0,0x612E,0x612F, 0, 0,0x6130, -0x6131,0x6132, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6133,0x6134, 0,0x6135, 0, 0, 0, 0, - 0,0x6136, 0,0x6137,0x6138, 0, 0, 0, - 0,0x6139, 0, 0, 0,0x613A,0x613B, 0, -0x613C, 0, 0,0x613D, 0,0x613E,0x613F, 0, -0x6140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6141, 0, 0,0x6142,0x6143, - 0, 0, 0,0x6144, 0, 0, 0, 0, - 0,0x6145, 0, 0,0x6146, 0, 0, 0, -0x6147,0x6148, 0, 0, 0, 0,0x6149, 0, - 0,0x614A, 0, 0, 0,0x614B, 0,0x614C, - 0, 0, 0,0x614D, 0, 0, 0,0x614E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x614F, 0, 0,0x6150, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6151,0x6152,0x6154, 0,0x6155, -0x6156, 0,0x6153, 0, 0, 0,0x6157,0x6158, - 0, 0,0x6159, 0, 0, 0, 0, 0, - 0, 0,0x615A, 0, 0, 0,0x615B,0x615C, - 0, 0, 0, 0, 0, 0, 0,0x615D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x615E, 0, -0x615F, 0, 0, 0, 0,0x6160, 0, 0, - 0,0x6161,0x6162, 0, 0, 0, 0,0x6163, - 0, 0, 0,0x6164, 0, 0, 0,0x6165, - 0, 0, 0, 0,0x6166, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6167, 0, 0,0x6168, 0, 0,0x6169,0x616A, - 0,0x616B, 0,0x616C, 0, 0, 0, 0, -0x616D, 0,0x616E,0x616F,0x6170, 0,0x6171, 0, - 0, 0, 0,0x6172,0x6173,0x6174, 0, 0, -0x6175, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6176, 0,0x6177,0x6178,0x6179, - 0,0x617A, 0, 0, 0, 0, 0, 0, -0x617B,0x617D, 0, 0, 0, 0,0x617E,0x6221, -0x6222, 0,0x6223,0x6224, 0, 0, 0,0x617C, - 0, 0, 0, 0, 0,0x622D, 0, 0, -0x6225, 0,0x6226,0x6227,0x6228, 0, 0,0x6229, -0x622A,0x746C,0x622B, 0, 0, 0, 0, 0, -0x622C, 0, 0, 0, 0, 0,0x622F, 0, - 0, 0,0x6230,0x6231, 0, 0, 0,0x6232, - 0,0x622E, 0, 0, 0, 0, 0, 0, - 0,0x6233,0x6234,0x6235, 0, 0, 0,0x6236, -0x6237,0x6238, 0,0x6239, 0, 0, 0, 0, -0x623A, 0, 0,0x623B, 0, 0, 0,0x623C, -0x746E,0x623D,0x623E,0x623F, 0,0x6240, 0,0x6241, - 0,0x6242, 0,0x6243, 0,0x6245,0x6246, 0, -0x6244, 0,0x6247, 0,0x6248, 0, 0, 0, - 0,0x6249,0x624A, 0,0x624B, 0, 0,0x624C, - 0,0x624D,0x624E, 0,0x624F,0x6250, 0,0x6251, -0x6252, 0, 0, 0, 0, 0,0x6253, 0, - 0, 0,0x6254,0x6255, 0, 0, 0, 0, - 0, 0,0x6256, 0, 0, 0,0x6257, 0, - 0, 0,0x6258, 0,0x6259,0x625A,0x625B, 0, - 0, 0, 0, 0,0x625C, 0, 0,0x625D, - 0, 0,0x625E, 0, 0, 0, 0, 0, -0x625F, 0, 0, 0, 0, 0, 0,0x6260, - 0, 0, 0, 0,0x6261,0x6262,0x6263, 0, - 0, 0, 0, 0,0x6264, 0,0x6265, 0, -0x6266,0x6267, 0, 0, 0,0x6268, 0, 0, - 0,0x6269, 0, 0,0x626A, 0,0x626B,0x626C, -0x626D, 0, 0,0x626E, 0, 0, 0, 0, - 0,0x626F, 0, 0,0x6270, 0, 0, 0, - 0,0x6271, 0,0x6272, 0, 0, 0,0x6273, -0x6274,0x6275, 0,0x6276,0x6277,0x6278,0x6279, 0, - 0,0x627A, 0, 0, 0, 0,0x627B,0x627C, -0x627D, 0,0x627E, 0, 0,0x6321,0x6322, 0, -0x6323, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6324,0x6325, - 0, 0,0x6326, 0,0x6327,0x6328, 0, 0, - 0,0x6329, 0, 0, 0, 0, 0,0x632A, -0x632B, 0, 0, 0,0x632C,0x632D, 0,0x632E, -0x632F,0x6330,0x6331,0x6332,0x6333, 0, 0, 0, - 0, 0,0x6334, 0,0x6335, 0,0x6336, 0, -0x6337, 0, 0,0x6338,0x6339, 0, 0,0x633A, -0x633B,0x633C,0x633D, 0,0x633E,0x633F, 0,0x6340, - 0, 0, 0,0x6341, 0,0x6342,0x6343, 0, - 0,0x6344, 0,0x6345, 0, 0, 0,0x6346, -0x6347, 0, 0, 0, 0, 0,0x6348,0x6349, -0x634A,0x634B, 0,0x634C, 0, 0, 0, 0, - 0,0x634D,0x634E,0x634F, 0, 0,0x6350, 0, -0x6351,0x6352, 0,0x6353,0x6354,0x6355, 0,0x6356, - 0,0x6357, 0,0x6358, 0,0x6359,0x635A, 0, - 0,0x635B,0x635C, 0, 0,0x635D, 0, 0, -0x635E,0x635F,0x6360, 0,0x6361, 0, 0, 0, - 0, 0, 0,0x6362,0x6363, 0, 0,0x6364, -0x6365, 0, 0,0x6366,0x6367, 0, 0, 0, -0x6368, 0,0x6369,0x636A,0x636B, 0, 0, 0, - 0,0x636C,0x636D,0x636E, 0, 0, 0, 0, -0x636F,0x6370,0x6371,0x6372,0x6373, 0,0x6374,0x6375, -0x6376, 0,0x6377, 0, 0, 0, 0, 0, - 0, 0, 0,0x6378,0x6379,0x637A, 0, 0, -0x637B,0x637C, 0, 0, 0,0x637D, 0, 0, - 0, 0,0x637E, 0,0x6421, 0, 0, 0, - 0, 0,0x6422,0x6423, 0, 0, 0,0x6424, -0x6425, 0,0x6426,0x6427, 0, 0,0x6428, 0, - 0, 0,0x6429, 0, 0,0x642A, 0, 0, - 0,0x642B, 0,0x642C, 0,0x642D,0x642E,0x642F, -0x6430, 0,0x6431,0x6432,0x6433,0x6434,0x6435, 0, -0x6436,0x6437,0x6438,0x6439, 0, 0,0x643A,0x643B, -0x643C,0x643D, 0,0x643E, 0, 0,0x643F, 0, -0x6440, 0,0x6441,0x6442,0x6443, 0, 0,0x6444, -0x6445, 0,0x6446,0x6447,0x6448, 0,0x6449, 0, -0x644A, 0,0x644B,0x644C, 0, 0, 0,0x644D, - 0,0x644E, 0,0x644F, 0, 0, 0, 0, - 0, 0, 0, 0,0x6450, 0,0x6451, 0, - 0, 0,0x6452,0x6453, 0,0x6454, 0, 0, - 0, 0, 0,0x6455, 0, 0, 0, 0, -0x6456, 0, 0, 0,0x6457, 0, 0,0x6458, -0x6459, 0, 0, 0, 0, 0, 0,0x645A, -0x645B,0x645C,0x645D, 0,0x645E, 0, 0,0x645F, -0x6460, 0,0x6461, 0,0x6462,0x6463, 0, 0, - 0, 0, 0, 0, 0, 0,0x6464,0x6465, - 0,0x6466,0x6467, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6468,0x6469,0x646A, 0, 0, 0, - 0, 0, 0,0x646B,0x646C,0x646D, 0, 0, -0x646E, 0,0x646F,0x6470, 0,0x6471, 0, 0, - 0,0x6472, 0, 0, 0, 0, 0,0x6473, -0x6474, 0,0x6475, 0,0x6476,0x6477, 0, 0, -0x6478, 0,0x6479,0x647A,0x647B, 0,0x647C,0x647D, - 0,0x647E, 0, 0, 0,0x6521, 0, 0, -0x6522, 0,0x6523,0x6524,0x6525,0x6526, 0, 0, - 0, 0, 0,0x6527, 0,0x6528,0x6529, 0, -0x652A, 0,0x652B, 0, 0,0x652C, 0, 0, -0x652D, 0, 0,0x652E, 0, 0,0x652F, 0, - 0,0x6530, 0, 0,0x6531, 0,0x6532,0x6533, - 0,0x6534, 0,0x6535,0x653B, 0,0x6536, 0, - 0, 0, 0, 0, 0, 0, 0,0x6537, -0x6538,0x6539, 0, 0, 0,0x653A, 0, 0, - 0, 0, 0, 0,0x653C, 0, 0,0x653D, -0x653E,0x653F,0x6540, 0,0x6541,0x6542,0x6543,0x6544, -0x6545, 0, 0, 0, 0, 0,0x6546, 0, - 0, 0, 0, 0,0x6547, 0, 0,0x6548, - 0,0x6549,0x654A, 0, 0,0x654B, 0, 0, - 0,0x654C,0x654D, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x654F,0x6550,0x654E,0x6551,0x6552, 0, -0x6553, 0, 0, 0,0x6554,0x6555, 0,0x6556, - 0, 0, 0,0x6557,0x6558, 0, 0, 0, -0x6559,0x655A,0x655B, 0, 0, 0, 0, 0, -0x655C,0x655D,0x655E, 0, 0, 0, 0, 0, - 0, 0,0x655F, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6560,0x6561, 0,0x6562,0x6563,0x6564,0x6565, - 0, 0, 0, 0, 0, 0,0x6566, 0, -0x6568, 0,0x6567, 0, 0, 0,0x6569, 0, -0x656A, 0, 0,0x656B, 0,0x656C, 0,0x656D, - 0, 0, 0, 0, 0, 0, 0, 0, -0x656E, 0, 0, 0,0x656F, 0, 0,0x6570, - 0, 0,0x6571, 0,0x6572, 0,0x6573, 0, - 0, 0, 0,0x6574, 0, 0,0x6575, 0, -0x6576,0x6577,0x6578, 0,0x6579,0x657A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x657C,0x657B -}; - -/* page 38 0x9578-0x95E6 */ -static uint16 tab_uni_jisx021238[]={ -0x657D,0x657E, 0, 0, 0, 0,0x6621, 0, - 0, 0, 0, 0,0x6622, 0, 0, 0, -0x6623, 0, 0, 0,0x6624,0x6625,0x6626, 0, - 0, 0,0x7471, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6627,0x6628,0x6629, - 0,0x662A, 0, 0, 0, 0,0x662B, 0, - 0,0x662C, 0,0x662D,0x662E, 0, 0, 0, - 0, 0, 0, 0,0x662F, 0,0x6630, 0, - 0, 0,0x6631, 0, 0,0x6632, 0,0x6633, - 0, 0, 0, 0, 0, 0,0x6634, 0, -0x6635,0x6636, 0,0x6637, 0, 0, 0, 0, -0x6638,0x6639,0x663A,0x663B, 0, 0, 0, 0, - 0,0x663C,0x663D, 0, 0,0x663E,0x663F,0x6640, -0x6641, 0, 0, 0,0x6642, 0,0x6643}; - -/* page 39 0x961D-0x986C */ -static uint16 tab_uni_jisx021239[]={ -0x6644,0x6645, 0, 0, 0,0x6646, 0,0x6647, -0x6648,0x6649, 0, 0, 0, 0, 0,0x664A, - 0, 0, 0, 0,0x664B, 0,0x664C, 0, - 0, 0,0x664D,0x664E,0x664F,0x6650, 0,0x6651, -0x6652, 0, 0, 0,0x6653, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6654, 0,0x6655, - 0,0x6656,0x6657,0x6658, 0, 0, 0, 0, - 0, 0, 0, 0,0x6659, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x665A, 0, 0, 0, 0, 0,0x665B, - 0, 0, 0, 0, 0, 0,0x665C,0x665D, - 0,0x665E,0x665F, 0,0x6660,0x6661,0x6662,0x6663, - 0, 0, 0, 0,0x6664, 0, 0, 0, - 0, 0, 0, 0,0x6665, 0, 0, 0, - 0,0x6666, 0, 0, 0,0x6667, 0, 0, -0x6668, 0,0x6669, 0, 0, 0, 0,0x666A, -0x666B,0x666C, 0, 0,0x666D, 0, 0, 0, - 0,0x666E,0x666F, 0, 0, 0,0x6670, 0, - 0, 0, 0, 0, 0,0x6671, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6672, 0, 0, - 0, 0, 0, 0, 0,0x6673, 0, 0, - 0, 0, 0,0x6675, 0,0x6676, 0, 0, -0x6677,0x6678,0x6679, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x667A, 0, 0, 0, - 0, 0,0x667B, 0,0x667C, 0, 0, 0, - 0, 0, 0, 0, 0,0x667D, 0, 0, - 0, 0, 0, 0, 0,0x667E,0x6721, 0, -0x6722, 0, 0, 0,0x6723, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6724,0x6725, 0, -0x6726, 0, 0, 0,0x6727,0x6728,0x6729, 0, - 0, 0, 0,0x672A, 0, 0, 0, 0, - 0, 0, 0, 0,0x672B, 0,0x672C, 0, - 0, 0, 0, 0, 0, 0,0x7474, 0, - 0, 0, 0, 0,0x672D, 0,0x672E, 0, - 0, 0, 0, 0, 0,0x672F, 0, 0, -0x7475,0x6730,0x6731, 0,0x7476, 0, 0, 0, -0x6732, 0,0x6733,0x6734, 0,0x6735,0x6736, 0, - 0, 0, 0, 0, 0, 0,0x6737, 0, - 0, 0,0x6738, 0, 0,0x6739, 0, 0, - 0,0x673A, 0, 0, 0, 0,0x673B, 0, - 0,0x673C,0x673D,0x673E, 0, 0,0x673F, 0, -0x6740, 0,0x6741,0x6742, 0, 0, 0, 0, - 0, 0, 0, 0,0x6743, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6744,0x6745,0x6746, 0,0x6747,0x6748, 0, 0, - 0,0x6749,0x674A, 0, 0,0x674B, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x674C, - 0,0x674D, 0, 0,0x674E,0x674F, 0, 0, -0x6750,0x6751, 0,0x6752,0x6753,0x6754, 0,0x6755, - 0,0x6756,0x6757, 0,0x6758, 0, 0,0x6759, -0x675A, 0,0x675B, 0,0x675C,0x675D, 0,0x675E, -0x675F,0x6760, 0,0x6761,0x6762, 0, 0,0x6763, - 0, 0,0x6764,0x6765,0x6766, 0,0x676A, 0, -0x6767,0x6768, 0,0x6769,0x676B, 0, 0,0x676C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x676D, 0,0x676E, 0, 0,0x676F, - 0, 0,0x6770,0x6771, 0,0x6772, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6773, 0, 0,0x6774, 0, 0, -0x6776,0x6777, 0, 0, 0, 0, 0,0x6778, - 0,0x6779, 0, 0,0x6775, 0, 0,0x677A, - 0,0x677B, 0,0x677C, 0, 0,0x677D, 0, -0x6828,0x677E, 0, 0, 0, 0,0x6821, 0, - 0,0x6822,0x6823,0x6824, 0,0x6825,0x6826, 0, -0x6827, 0, 0, 0, 0, 0, 0, 0, - 0,0x6829, 0, 0, 0, 0, 0,0x682A, - 0, 0,0x682B, 0, 0,0x682C, 0, 0, - 0, 0, 0, 0,0x682D,0x682E,0x682F, 0, - 0,0x6830,0x6831, 0,0x6832,0x6833, 0, 0, - 0, 0, 0, 0, 0,0x6834,0x6835, 0, -0x6836,0x6837, 0, 0, 0,0x6838, 0,0x6839 -}; - -/* page 40 0x98AB-0x98CC */ -static uint16 tab_uni_jisx021240[]={ -0x683A, 0,0x683B,0x683C, 0,0x683D, 0, 0, - 0,0x683E, 0, 0,0x683F,0x6840, 0,0x6841, -0x6842, 0, 0, 0,0x6843, 0, 0,0x6844, - 0, 0,0x6845, 0, 0,0x6846, 0, 0, - 0,0x6847}; - -/* page 41 0x98E1-0x9960 */ -static uint16 tab_uni_jisx021241[]={ -0x6848, 0,0x6849, 0,0x684A,0x684B,0x684C, 0, - 0,0x684D, 0, 0, 0, 0, 0, 0, - 0, 0,0x684E, 0, 0,0x684F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6850, 0, 0, 0, 0,0x6851,0x6852, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6853, 0, 0, 0,0x6854,0x6855,0x6856, 0, - 0,0x6857,0x6858,0x6859, 0, 0,0x685A, 0, - 0,0x685B, 0, 0, 0,0x685C,0x685D, 0, - 0, 0,0x685E, 0, 0, 0, 0, 0, -0x685F,0x6860,0x6861,0x6862,0x6863, 0, 0, 0, -0x6864,0x6865,0x6866,0x6867, 0, 0, 0,0x6868, -0x6869, 0, 0, 0, 0,0x686A,0x686B,0x686C, - 0, 0, 0, 0,0x686D,0x686E, 0, 0, - 0, 0, 0,0x686F, 0, 0, 0,0x6870, -0x6871, 0,0x6872,0x6873, 0,0x6874,0x6875,0x6876 -}; - -/* page 42 0x999B-0x9A5D */ -static uint16 tab_uni_jisx021242[]={ -0x6877, 0,0x6878,0x747A,0x6879, 0, 0, 0, - 0, 0, 0,0x687A, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x687B,0x687C,0x687D, - 0, 0,0x687E, 0, 0, 0,0x6921,0x6922, - 0, 0,0x6923, 0,0x6924, 0, 0, 0, -0x6925, 0, 0, 0, 0, 0,0x6926, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6927,0x6928, 0, 0, 0, 0,0x6929,0x692A, - 0,0x692B, 0,0x692C, 0, 0, 0, 0, - 0, 0, 0, 0,0x692D, 0, 0,0x692E, -0x692F,0x6930, 0, 0, 0,0x6931, 0, 0, - 0,0x6932,0x6933, 0, 0, 0,0x6934, 0, - 0, 0,0x6935,0x6936, 0, 0, 0,0x6937, -0x6938,0x6939, 0, 0, 0, 0, 0, 0, -0x693A,0x693B, 0, 0, 0,0x693C,0x693D, 0, - 0, 0, 0,0x693E, 0, 0, 0, 0, - 0, 0, 0,0x693F, 0,0x6940, 0,0x6941, -0x6942,0x6943, 0, 0,0x6944, 0, 0, 0, - 0, 0,0x6945,0x6946, 0, 0, 0, 0, -0x6947, 0,0x6948,0x6949, 0,0x694A, 0, 0, - 0, 0, 0, 0, 0, 0,0x694C, 0, - 0,0x694D, 0, 0,0x694B, 0, 0,0x694E, -0x694F,0x6950, 0,0x6951, 0, 0,0x6952, 0, - 0,0x6953, 0,0x6954, 0, 0, 0, 0, - 0, 0,0x6955}; - -/* page 43 0x9AAA-0x9C7B */ -static uint16 tab_uni_jisx021243[]={ -0x6956, 0,0x6957, 0,0x6958,0x6959, 0, 0, -0x695A, 0,0x695B,0x695C,0x695D, 0, 0,0x695E, - 0,0x695F, 0, 0,0x6960,0x6961, 0,0x6962, - 0,0x6963, 0, 0,0x6964, 0,0x6965, 0, - 0, 0, 0, 0,0x6966, 0,0x6967, 0, -0x6968, 0, 0,0x6969,0x696A,0x696B, 0,0x747B, - 0,0x696C,0x696D, 0, 0, 0,0x696E, 0, - 0, 0,0x696F,0x6970, 0,0x6971, 0,0x6972, - 0, 0,0x6973, 0, 0, 0, 0, 0, -0x6974,0x6975, 0,0x6976, 0, 0, 0,0x6977, -0x6978, 0, 0,0x6979, 0,0x697A,0x697B,0x697C, -0x697D,0x697E,0x6A21,0x6A22, 0, 0,0x6A23,0x6A24, - 0,0x6A25,0x6A26,0x6A27,0x6A28, 0,0x6A29, 0, -0x6A2A, 0, 0, 0,0x6A2B, 0, 0,0x6A2C, - 0,0x6A2D,0x6A2E, 0, 0, 0,0x6A2F, 0, - 0, 0, 0, 0,0x6A30, 0, 0, 0, - 0,0x6A31, 0,0x6A32, 0, 0, 0, 0, - 0,0x6A33,0x6A34,0x6A35, 0,0x6A36, 0,0x6A37, -0x6A38, 0, 0,0x6A39, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6A3A, 0, - 0,0x6A3B,0x6A3C, 0, 0, 0, 0, 0, - 0, 0, 0,0x6A3D,0x6A3E,0x6A3F, 0, 0, - 0,0x6A40, 0, 0,0x6A41, 0, 0,0x6A42, - 0,0x6A43, 0,0x6A44,0x6A45, 0,0x6A46, 0, -0x6A47,0x6A48,0x6A49,0x6A4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, 0,0x6C30, 0,0x6C31, 0, -0x6C32, 0, 0,0x6C33, 0, 0, 0,0x6C34, - 0, 0, 0,0x6C35, 0, 0,0x6C36, 0, - 0,0x6C37, 0, 0, 0,0x6C38, 0, 0, - 0,0x6C39, 0,0x6C3A,0x6C3B, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6C3C,0x6C3D, -0x6C3E,0x6C3F, 0, 0,0x6C40, 0, 0, 0, -0x6C41,0x6C42,0x6C43, 0, 0, 0, 0,0x6C44, - 0,0x6C45, 0,0x6C46, 0,0x6C47, 0, 0, -0x6C48, 0,0x6C49, 0, 0,0x6C4A,0x6C4B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6C4C, 0, 0, 0,0x6C4E, 0, 0, 0, - 0,0x6C4F, 0, 0,0x6C4D, 0, 0, 0, -0x6C50, 0,0x6C51,0x6C52,0x6C53, 0, 0,0x6C54, -0x6C55, 0, 0,0x6C56, 0, 0,0x6C57,0x6C58 -}; - -/* page 45 0x9E7A-0x9FA5 */ -static uint16 tab_uni_jisx021245[]={ -0x6C59,0x6C5A,0x6C5B, 0, 0, 0,0x6C5C, 0, -0x6C5D,0x6C5E,0x6C5F,0x6C60, 0,0x6C61, 0, 0, - 0, 0, 0, 0,0x6C62,0x6C63, 0, 0, - 0, 0, 0, 0,0x6C64, 0,0x6C65, 0, - 0,0x6C66, 0, 0,0x6C67, 0, 0, 0, - 0, 0,0x6C68, 0, 0, 0,0x6C69, 0, - 0, 0,0x6C6A, 0,0x6C6B,0x6C6C,0x6C6D, 0, - 0,0x6C6E,0x6C6F,0x6C70, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6C71, 0,0x6C72, 0, - 0,0x6C73, 0, 0, 0, 0, 0,0x747E, - 0, 0, 0,0x6C74, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6C75, 0, 0, - 0, 0,0x6C76, 0, 0,0x6C77, 0, 0, - 0, 0,0x6C78,0x6C79,0x6C7A, 0,0x6C7B,0x6C7C, -0x6C7D, 0, 0,0x6C7E, 0, 0,0x6D21, 0, - 0, 0, 0, 0, 0,0x6D22, 0, 0, -0x6D23,0x6D24, 0, 0, 0, 0, 0,0x6D25, - 0, 0, 0, 0, 0,0x6D26,0x6D27,0x6D28, -0x6D29, 0,0x6D2A, 0,0x6D2B,0x6D2C, 0,0x6D2D, -0x6D2E,0x6D2F, 0, 0, 0,0x6D30, 0, 0, -0x6D31, 0, 0, 0,0x6D32, 0, 0, 0, -0x6D33,0x6D34, 0, 0, 0,0x6D35, 0,0x6D36, -0x6D37, 0,0x6D38, 0, 0,0x6D39, 0,0x6D3A, -0x6D3B, 0,0x6D3C,0x6D3D, 0,0x6D3E, 0,0x6D3F, - 0,0x6D40,0x6D41,0x6D42,0x6D43,0x6D44, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6D45, 0,0x6D46,0x6D47,0x6D48,0x6D49, 0, -0x6D4A, 0, 0,0x6D4B,0x6D4C, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6D4D,0x6D4E, - 0, 0, 0,0x6D4F,0x6D50,0x6D51,0x6D52,0x6D53, - 0,0x6D54, 0,0x6D55, 0, 0, 0, 0, -0x6D56, 0, 0,0x6D57, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6D58,0x6D59,0x6D5A, -0x6D5B, 0,0x6D5C, 0,0x6D5D,0x6D5E, 0, 0, - 0, 0, 0, 0,0x6D5F, 0, 0,0x6D60, -0x6D61,0x6D62, 0,0x6D63}; - -/* page 46 0xF929-0xF929 */ -static uint16 tab_uni_jisx021246[]={ -0x7445}; - -/* page 47 0xF9DC-0xF9DC */ -static uint16 tab_uni_jisx021247[]={ -0x7472}; - -/* page 48 0xFA00-0xFA2D */ -static uint16 tab_uni_jisx021248[]={ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x7434,0x7437, -0x7438,0x743D,0x7444,0x7447,0x7448,0x744E,0x744F,0x7453, -0x7455,0x7456,0x7457,0x7458,0x745A,0x745B,0x745E,0x7460, -0x7462,0x7463,0x7465,0x7469,0x746A,0x746B,0x746D,0x746F, -0x7470,0x7473,0x7477,0x7478,0x7479,0x747D}; - -/* page 49 0xFF00-0XFF07 */ -static uint16 tab_uni_jisx021249[]={ - 0, 0,0x742A, 0, 0, 0, 0,0x7429}; - -/* page 50 0xFFE4-0xFFE4 */ -static uint16 tab_uni_jisx021250[]={ -0x2243}; - -static int -my_uni_jisx0212_onechar(int code){ - if ((code>=0x007E)&&(code<=0x007E)) - return(tab_uni_jisx02120[code-0x007E]); - if ((code>=0x00A1)&&(code<=0x017E)) - return(tab_uni_jisx02121[code-0x00A1]); - if ((code>=0x01CD)&&(code<=0x01DC)) - return(tab_uni_jisx02122[code-0x01CD]); - if ((code>=0x01F5)&&(code<=0x01F5)) - return(tab_uni_jisx02123[code-0x01F5]); - if ((code>=0x02C7)&&(code<=0x02DD)) - return(tab_uni_jisx02124[code-0x02C7]); - if ((code>=0x0384)&&(code<=0x0390)) - return(tab_uni_jisx02125[code-0x0384]); - if ((code>=0x03AA)&&(code<=0x03CE)) - return(tab_uni_jisx02126[code-0x03AA]); - if ((code>=0x0402)&&(code<=0x040F)) - return(tab_uni_jisx02127[code-0x0402]); - if ((code>=0x0452)&&(code<=0x045F)) - return(tab_uni_jisx02128[code-0x0452]); - if ((code>=0x2122)&&(code<=0x2122)) - return(tab_uni_jisx02129[code-0x2122]); - if ((code>=0x2170)&&(code<=0x2179)) - return(tab_uni_jisx021210[code-0x2170]); - if ((code>=0x4E02)&&(code<=0x4F19)) - return(tab_uni_jisx021211[code-0x4E02]); - if ((code>=0x4F2E)&&(code<=0x5166)) - return(tab_uni_jisx021212[code-0x4F2E]); - if ((code>=0x517E)&&(code<=0x5515)) - return(tab_uni_jisx021213[code-0x517E]); - if ((code>=0x552A)&&(code<=0x5566)) - return(tab_uni_jisx021214[code-0x552A]); - if ((code>=0x557F)&&(code<=0x5C36)) - return(tab_uni_jisx021215[code-0x557F]); - if ((code>=0x5C59)&&(code<=0x5EEB)) - return(tab_uni_jisx021216[code-0x5C59]); - if ((code>=0x5F02)&&(code<=0x6149)) - return(tab_uni_jisx021217[code-0x5F02]); - if ((code>=0x615E)&&(code<=0x6290)) - return(tab_uni_jisx021218[code-0x615E]); - if ((code>=0x62A6)&&(code<=0x679B)) - return(tab_uni_jisx021219[code-0x62A6]); - if ((code>=0x67B0)&&(code<=0x6801)) - return(tab_uni_jisx021220[code-0x67B0]); - if ((code>=0x6814)&&(code<=0x6917)) - return(tab_uni_jisx021221[code-0x6814]); - if ((code>=0x6931)&&(code<=0x6D3F)) - return(tab_uni_jisx021222[code-0x6931]); - if ((code>=0x6D57)&&(code<=0x6E04)) - return(tab_uni_jisx021223[code-0x6D57]); - if ((code>=0x6E1E)&&(code<=0x6ECF)) - return(tab_uni_jisx021224[code-0x6E1E]); - if ((code>=0x6EEB)&&(code<=0x70E4)) - return(tab_uni_jisx021225[code-0x6EEB]); - if ((code>=0x70FA)&&(code<=0x71DC)) - return(tab_uni_jisx021226[code-0x70FA]); - if ((code>=0x71F8)&&(code<=0x7E9E)) - return(tab_uni_jisx021227[code-0x71F8]); - if ((code>=0x7F3B)&&(code<=0x8044)) - return(tab_uni_jisx021228[code-0x7F3B]); - if ((code>=0x8060)&&(code<=0x8362)) - return(tab_uni_jisx021229[code-0x8060]); - if ((code>=0x8370)&&(code<=0x8419)) - return(tab_uni_jisx021230[code-0x8370]); - if ((code>=0x842F)&&(code<=0x8880)) - return(tab_uni_jisx021231[code-0x842F]); - if ((code>=0x8898)&&(code<=0x89BC)) - return(tab_uni_jisx021232[code-0x8898]); - if ((code>=0x89D4)&&(code<=0x8B9F)) - return(tab_uni_jisx021233[code-0x89D4]); - if ((code>=0x8C38)&&(code<=0x8CA4)) - return(tab_uni_jisx021234[code-0x8C38]); - if ((code>=0x8CB9)&&(code<=0x8D1B)) - return(tab_uni_jisx021235[code-0x8CB9]); - if ((code>=0x8D65)&&(code<=0x8F65)) - return(tab_uni_jisx021236[code-0x8D65]); - if ((code>=0x8F9D)&&(code<=0x9484)) - return(tab_uni_jisx021237[code-0x8F9D]); - if ((code>=0x9578)&&(code<=0x95E6)) - return(tab_uni_jisx021238[code-0x9578]); - if ((code>=0x961D)&&(code<=0x986C)) - return(tab_uni_jisx021239[code-0x961D]); - if ((code>=0x98AB)&&(code<=0x98CC)) - return(tab_uni_jisx021240[code-0x98AB]); - if ((code>=0x98E1)&&(code<=0x9960)) - return(tab_uni_jisx021241[code-0x98E1]); - if ((code>=0x999B)&&(code<=0x9A5D)) - return(tab_uni_jisx021242[code-0x999B]); - if ((code>=0x9AAA)&&(code<=0x9C7B)) - return(tab_uni_jisx021243[code-0x9AAA]); - if ((code>=0x9CE6)&&(code<=0x9E1D)) - return(tab_uni_jisx021244[code-0x9CE6]); - if ((code>=0x9E7A)&&(code<=0x9FA5)) - return(tab_uni_jisx021245[code-0x9E7A]); - if ((code>=0xF929)&&(code<=0xF929)) - return(tab_uni_jisx021246[code-0xF929]); - if ((code>=0xF9DC)&&(code<=0xF9DC)) - return(tab_uni_jisx021247[code-0xF9DC]); - if ((code>=0xFA00)&&(code<=0xFA2D)) - return(tab_uni_jisx021248[code-0xFA00]); - if ((code>=0xFF00)&&(code<=0xFF07)) - return(tab_uni_jisx021249[code-0xFF00]); - if ((code>=0xFFE4)&&(code<=0xFFE4)) - return(tab_uni_jisx021250[code-0xFFE4]); - return(0); -} - -/* page 0 0x222F-0x2244 */ -static uint16 tab_jisx0212_uni0[]={ -0x02D8,0x02C7,0x00B8,0x02D9,0x02DD,0x00AF,0x02DB,0x02DA, -0xFF5E,0x0384,0x0385, 0, 0, 0, 0, 0, - 0, 0, 0,0x00A1,0xFFE4,0x00BF}; - -/* page 1 0x226B-0x2271 */ -static uint16 tab_jisx0212_uni1[]={ -0x00BA,0x00AA,0x00A9,0x00AE,0x2122,0x00A4,0x2116}; - -/* page 2 0x2661-0x267C */ -static uint16 tab_jisx0212_uni2[]={ -0x0386,0x0388,0x0389,0x038A,0x03AA, 0,0x038C, 0, -0x038E,0x03AB, 0,0x038F, 0, 0, 0, 0, -0x03AC,0x03AD,0x03AE,0x03AF,0x03CA,0x0390,0x03CC,0x03C2, -0x03CD,0x03CB,0x03B0,0x03CE}; - -/* page 3 0x2742-0x274E */ -static uint16 tab_jisx0212_uni3[]={ -0x0402,0x0403,0x0404,0x0405,0x0406,0x0407,0x0408,0x0409, -0x040A,0x040B,0x040C,0x040E,0x040F}; - -/* page 4 0x2772-0x277E */ -static uint16 tab_jisx0212_uni4[]={ -0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459, -0x045A,0x045B,0x045C,0x045E,0x045F}; - -/* page 5 0x2921-0x2950 */ -static uint16 tab_jisx0212_uni5[]={ -0x00C6,0x0110, 0,0x0126, 0,0x0132, 0,0x0141, -0x013F, 0,0x014A,0x00D8,0x0152, 0,0x0166,0x00DE, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x00E6,0x0111,0x00F0,0x0127,0x0131,0x0133,0x0138,0x0142, -0x0140,0x0149,0x014B,0x00F8,0x0153,0x00DF,0x0167,0x00FE -}; - -/* page 6 0x2A21-0x2A77 */ -static uint16 tab_jisx0212_uni6[]={ -0x00C1,0x00C0,0x00C4,0x00C2,0x0102,0x01CD,0x0100,0x0104, -0x00C5,0x00C3,0x0106,0x0108,0x010C,0x00C7,0x010A,0x010E, -0x00C9,0x00C8,0x00CB,0x00CA,0x011A,0x0116,0x0112,0x0118, - 0,0x011C,0x011E,0x0122,0x0120,0x0124,0x00CD,0x00CC, -0x00CF,0x00CE,0x01CF,0x0130,0x012A,0x012E,0x0128,0x0134, -0x0136,0x0139,0x013D,0x013B,0x0143,0x0147,0x0145,0x00D1, -0x00D3,0x00D2,0x00D6,0x00D4,0x01D1,0x0150,0x014C,0x00D5, -0x0154,0x0158,0x0156,0x015A,0x015C,0x0160,0x015E,0x0164, -0x0162,0x00DA,0x00D9,0x00DC,0x00DB,0x016C,0x01D3,0x0170, -0x016A,0x0172,0x016E,0x0168,0x01D7,0x01DB,0x01D9,0x01D5, -0x0174,0x00DD,0x0178,0x0176,0x0179,0x017D,0x017B}; - -/* page 7 0x2B21-0x2B77 */ -static uint16 tab_jisx0212_uni7[]={ -0x00E1,0x00E0,0x00E4,0x00E2,0x0103,0x01CE,0x0101,0x0105, -0x00E5,0x00E3,0x0107,0x0109,0x010D,0x00E7,0x010B,0x010F, -0x00E9,0x00E8,0x00EB,0x00EA,0x011B,0x0117,0x0113,0x0119, -0x01F5,0x011D,0x011F, 0,0x0121,0x0125,0x00ED,0x00EC, -0x00EF,0x00EE,0x01D0, 0,0x012B,0x012F,0x0129,0x0135, -0x0137,0x013A,0x013E,0x013C,0x0144,0x0148,0x0146,0x00F1, -0x00F3,0x00F2,0x00F6,0x00F4,0x01D2,0x0151,0x014D,0x00F5, -0x0155,0x0159,0x0157,0x015B,0x015D,0x0161,0x015F,0x0165, -0x0163,0x00FA,0x00F9,0x00FC,0x00FB,0x016D,0x01D4,0x0171, -0x016B,0x0173,0x016F,0x0169,0x01D8,0x01DC,0x01DA,0x01D6, -0x0175,0x00FD,0x00FF,0x0177,0x017A,0x017E,0x017C}; - -/* page 8 0x3021-0x307E */ -static uint16 tab_jisx0212_uni8[]={ -0x4E02,0x4E04,0x4E05,0x4E0C,0x4E12,0x4E1F,0x4E23,0x4E24, -0x4E28,0x4E2B,0x4E2E,0x4E2F,0x4E30,0x4E35,0x4E40,0x4E41, -0x4E44,0x4E47,0x4E51,0x4E5A,0x4E5C,0x4E63,0x4E68,0x4E69, -0x4E74,0x4E75,0x4E79,0x4E7F,0x4E8D,0x4E96,0x4E97,0x4E9D, -0x4EAF,0x4EB9,0x4EC3,0x4ED0,0x4EDA,0x4EDB,0x4EE0,0x4EE1, -0x4EE2,0x4EE8,0x4EEF,0x4EF1,0x4EF3,0x4EF5,0x4EFD,0x4EFE, -0x4EFF,0x4F00,0x4F02,0x4F03,0x4F08,0x4F0B,0x4F0C,0x4F12, -0x4F15,0x4F16,0x4F17,0x4F19,0x4F2E,0x4F31,0x4F60,0x4F33, -0x4F35,0x4F37,0x4F39,0x4F3B,0x4F3E,0x4F40,0x4F42,0x4F48, -0x4F49,0x4F4B,0x4F4C,0x4F52,0x4F54,0x4F56,0x4F58,0x4F5F, -0x4F63,0x4F6A,0x4F6C,0x4F6E,0x4F71,0x4F77,0x4F78,0x4F79, -0x4F7A,0x4F7D,0x4F7E,0x4F81,0x4F82,0x4F84}; - -/* page 9 0x3121-0x317E */ -static uint16 tab_jisx0212_uni9[]={ -0x4F85,0x4F89,0x4F8A,0x4F8C,0x4F8E,0x4F90,0x4F92,0x4F93, -0x4F94,0x4F97,0x4F99,0x4F9A,0x4F9E,0x4F9F,0x4FB2,0x4FB7, -0x4FB9,0x4FBB,0x4FBC,0x4FBD,0x4FBE,0x4FC0,0x4FC1,0x4FC5, -0x4FC6,0x4FC8,0x4FC9,0x4FCB,0x4FCC,0x4FCD,0x4FCF,0x4FD2, -0x4FDC,0x4FE0,0x4FE2,0x4FF0,0x4FF2,0x4FFC,0x4FFD,0x4FFF, -0x5000,0x5001,0x5004,0x5007,0x500A,0x500C,0x500E,0x5010, -0x5013,0x5017,0x5018,0x501B,0x501C,0x501D,0x501E,0x5022, -0x5027,0x502E,0x5030,0x5032,0x5033,0x5035,0x5040,0x5041, -0x5042,0x5045,0x5046,0x504A,0x504C,0x504E,0x5051,0x5052, -0x5053,0x5057,0x5059,0x505F,0x5060,0x5062,0x5063,0x5066, -0x5067,0x506A,0x506D,0x5070,0x5071,0x503B,0x5081,0x5083, -0x5084,0x5086,0x508A,0x508E,0x508F,0x5090}; - -/* page 10 0x3221-0x327E */ -static uint16 tab_jisx0212_uni10[]={ -0x5092,0x5093,0x5094,0x5096,0x509B,0x509C,0x509E,0x509F, -0x50A0,0x50A1,0x50A2,0x50AA,0x50AF,0x50B0,0x50B9,0x50BA, -0x50BD,0x50C0,0x50C3,0x50C4,0x50C7,0x50CC,0x50CE,0x50D0, -0x50D3,0x50D4,0x50D8,0x50DC,0x50DD,0x50DF,0x50E2,0x50E4, -0x50E6,0x50E8,0x50E9,0x50EF,0x50F1,0x50F6,0x50FA,0x50FE, -0x5103,0x5106,0x5107,0x5108,0x510B,0x510C,0x510D,0x510E, -0x50F2,0x5110,0x5117,0x5119,0x511B,0x511C,0x511D,0x511E, -0x5123,0x5127,0x5128,0x512C,0x512D,0x512F,0x5131,0x5133, -0x5134,0x5135,0x5138,0x5139,0x5142,0x514A,0x514F,0x5153, -0x5155,0x5157,0x5158,0x515F,0x5164,0x5166,0x517E,0x5183, -0x5184,0x518B,0x518E,0x5198,0x519D,0x51A1,0x51A3,0x51AD, -0x51B8,0x51BA,0x51BC,0x51BE,0x51BF,0x51C2}; - -/* page 11 0x3321-0x337E */ -static uint16 tab_jisx0212_uni11[]={ -0x51C8,0x51CF,0x51D1,0x51D2,0x51D3,0x51D5,0x51D8,0x51DE, -0x51E2,0x51E5,0x51EE,0x51F2,0x51F3,0x51F4,0x51F7,0x5201, -0x5202,0x5205,0x5212,0x5213,0x5215,0x5216,0x5218,0x5222, -0x5228,0x5231,0x5232,0x5235,0x523C,0x5245,0x5249,0x5255, -0x5257,0x5258,0x525A,0x525C,0x525F,0x5260,0x5261,0x5266, -0x526E,0x5277,0x5278,0x5279,0x5280,0x5282,0x5285,0x528A, -0x528C,0x5293,0x5295,0x5296,0x5297,0x5298,0x529A,0x529C, -0x52A4,0x52A5,0x52A6,0x52A7,0x52AF,0x52B0,0x52B6,0x52B7, -0x52B8,0x52BA,0x52BB,0x52BD,0x52C0,0x52C4,0x52C6,0x52C8, -0x52CC,0x52CF,0x52D1,0x52D4,0x52D6,0x52DB,0x52DC,0x52E1, -0x52E5,0x52E8,0x52E9,0x52EA,0x52EC,0x52F0,0x52F1,0x52F4, -0x52F6,0x52F7,0x5300,0x5303,0x530A,0x530B}; - -/* page 12 0x3421-0x347E */ -static uint16 tab_jisx0212_uni12[]={ -0x530C,0x5311,0x5313,0x5318,0x531B,0x531C,0x531E,0x531F, -0x5325,0x5327,0x5328,0x5329,0x532B,0x532C,0x532D,0x5330, -0x5332,0x5335,0x533C,0x533D,0x533E,0x5342,0x534C,0x534B, -0x5359,0x535B,0x5361,0x5363,0x5365,0x536C,0x536D,0x5372, -0x5379,0x537E,0x5383,0x5387,0x5388,0x538E,0x5393,0x5394, -0x5399,0x539D,0x53A1,0x53A4,0x53AA,0x53AB,0x53AF,0x53B2, -0x53B4,0x53B5,0x53B7,0x53B8,0x53BA,0x53BD,0x53C0,0x53C5, -0x53CF,0x53D2,0x53D3,0x53D5,0x53DA,0x53DD,0x53DE,0x53E0, -0x53E6,0x53E7,0x53F5,0x5402,0x5413,0x541A,0x5421,0x5427, -0x5428,0x542A,0x542F,0x5431,0x5434,0x5435,0x5443,0x5444, -0x5447,0x544D,0x544F,0x545E,0x5462,0x5464,0x5466,0x5467, -0x5469,0x546B,0x546D,0x546E,0x5474,0x547F}; - -/* page 13 0x3521-0x357E */ -static uint16 tab_jisx0212_uni13[]={ -0x5481,0x5483,0x5485,0x5488,0x5489,0x548D,0x5491,0x5495, -0x5496,0x549C,0x549F,0x54A1,0x54A6,0x54A7,0x54A9,0x54AA, -0x54AD,0x54AE,0x54B1,0x54B7,0x54B9,0x54BA,0x54BB,0x54BF, -0x54C6,0x54CA,0x54CD,0x54CE,0x54E0,0x54EA,0x54EC,0x54EF, -0x54F6,0x54FC,0x54FE,0x54FF,0x5500,0x5501,0x5505,0x5508, -0x5509,0x550C,0x550D,0x550E,0x5515,0x552A,0x552B,0x5532, -0x5535,0x5536,0x553B,0x553C,0x553D,0x5541,0x5547,0x5549, -0x554A,0x554D,0x5550,0x5551,0x5558,0x555A,0x555B,0x555E, -0x5560,0x5561,0x5564,0x5566,0x557F,0x5581,0x5582,0x5586, -0x5588,0x558E,0x558F,0x5591,0x5592,0x5593,0x5594,0x5597, -0x55A3,0x55A4,0x55AD,0x55B2,0x55BF,0x55C1,0x55C3,0x55C6, -0x55C9,0x55CB,0x55CC,0x55CE,0x55D1,0x55D2}; - -/* page 14 0x3621-0x367E */ -static uint16 tab_jisx0212_uni14[]={ -0x55D3,0x55D7,0x55D8,0x55DB,0x55DE,0x55E2,0x55E9,0x55F6, -0x55FF,0x5605,0x5608,0x560A,0x560D,0x560E,0x560F,0x5610, -0x5611,0x5612,0x5619,0x562C,0x5630,0x5633,0x5635,0x5637, -0x5639,0x563B,0x563C,0x563D,0x563F,0x5640,0x5641,0x5643, -0x5644,0x5646,0x5649,0x564B,0x564D,0x564F,0x5654,0x565E, -0x5660,0x5661,0x5662,0x5663,0x5666,0x5669,0x566D,0x566F, -0x5671,0x5672,0x5675,0x5684,0x5685,0x5688,0x568B,0x568C, -0x5695,0x5699,0x569A,0x569D,0x569E,0x569F,0x56A6,0x56A7, -0x56A8,0x56A9,0x56AB,0x56AC,0x56AD,0x56B1,0x56B3,0x56B7, -0x56BE,0x56C5,0x56C9,0x56CA,0x56CB,0x56CF,0x56D0,0x56CC, -0x56CD,0x56D9,0x56DC,0x56DD,0x56DF,0x56E1,0x56E4,0x56E5, -0x56E6,0x56E7,0x56E8,0x56F1,0x56EB,0x56ED}; - -/* page 15 0x3721-0x377E */ -static uint16 tab_jisx0212_uni15[]={ -0x56F6,0x56F7,0x5701,0x5702,0x5707,0x570A,0x570C,0x5711, -0x5715,0x571A,0x571B,0x571D,0x5720,0x5722,0x5723,0x5724, -0x5725,0x5729,0x572A,0x572C,0x572E,0x572F,0x5733,0x5734, -0x573D,0x573E,0x573F,0x5745,0x5746,0x574C,0x574D,0x5752, -0x5762,0x5765,0x5767,0x5768,0x576B,0x576D,0x576E,0x576F, -0x5770,0x5771,0x5773,0x5774,0x5775,0x5777,0x5779,0x577A, -0x577B,0x577C,0x577E,0x5781,0x5783,0x578C,0x5794,0x5797, -0x5799,0x579A,0x579C,0x579D,0x579E,0x579F,0x57A1,0x5795, -0x57A7,0x57A8,0x57A9,0x57AC,0x57B8,0x57BD,0x57C7,0x57C8, -0x57CC,0x57CF,0x57D5,0x57DD,0x57DE,0x57E4,0x57E6,0x57E7, -0x57E9,0x57ED,0x57F0,0x57F5,0x57F6,0x57F8,0x57FD,0x57FE, -0x57FF,0x5803,0x5804,0x5808,0x5809,0x57E1}; - -/* page 16 0x3821-0x387E */ -static uint16 tab_jisx0212_uni16[]={ -0x580C,0x580D,0x581B,0x581E,0x581F,0x5820,0x5826,0x5827, -0x582D,0x5832,0x5839,0x583F,0x5849,0x584C,0x584D,0x584F, -0x5850,0x5855,0x585F,0x5861,0x5864,0x5867,0x5868,0x5878, -0x587C,0x587F,0x5880,0x5881,0x5887,0x5888,0x5889,0x588A, -0x588C,0x588D,0x588F,0x5890,0x5894,0x5896,0x589D,0x58A0, -0x58A1,0x58A2,0x58A6,0x58A9,0x58B1,0x58B2,0x58C4,0x58BC, -0x58C2,0x58C8,0x58CD,0x58CE,0x58D0,0x58D2,0x58D4,0x58D6, -0x58DA,0x58DD,0x58E1,0x58E2,0x58E9,0x58F3,0x5905,0x5906, -0x590B,0x590C,0x5912,0x5913,0x5914,0x8641,0x591D,0x5921, -0x5923,0x5924,0x5928,0x592F,0x5930,0x5933,0x5935,0x5936, -0x593F,0x5943,0x5946,0x5952,0x5953,0x5959,0x595B,0x595D, -0x595E,0x595F,0x5961,0x5963,0x596B,0x596D}; - -/* page 17 0x3921-0x397E */ -static uint16 tab_jisx0212_uni17[]={ -0x596F,0x5972,0x5975,0x5976,0x5979,0x597B,0x597C,0x598B, -0x598C,0x598E,0x5992,0x5995,0x5997,0x599F,0x59A4,0x59A7, -0x59AD,0x59AE,0x59AF,0x59B0,0x59B3,0x59B7,0x59BA,0x59BC, -0x59C1,0x59C3,0x59C4,0x59C8,0x59CA,0x59CD,0x59D2,0x59DD, -0x59DE,0x59DF,0x59E3,0x59E4,0x59E7,0x59EE,0x59EF,0x59F1, -0x59F2,0x59F4,0x59F7,0x5A00,0x5A04,0x5A0C,0x5A0D,0x5A0E, -0x5A12,0x5A13,0x5A1E,0x5A23,0x5A24,0x5A27,0x5A28,0x5A2A, -0x5A2D,0x5A30,0x5A44,0x5A45,0x5A47,0x5A48,0x5A4C,0x5A50, -0x5A55,0x5A5E,0x5A63,0x5A65,0x5A67,0x5A6D,0x5A77,0x5A7A, -0x5A7B,0x5A7E,0x5A8B,0x5A90,0x5A93,0x5A96,0x5A99,0x5A9C, -0x5A9E,0x5A9F,0x5AA0,0x5AA2,0x5AA7,0x5AAC,0x5AB1,0x5AB2, -0x5AB3,0x5AB5,0x5AB8,0x5ABA,0x5ABB,0x5ABF}; - -/* page 18 0x3A21-0x3A7E */ -static uint16 tab_jisx0212_uni18[]={ -0x5AC4,0x5AC6,0x5AC8,0x5ACF,0x5ADA,0x5ADC,0x5AE0,0x5AE5, -0x5AEA,0x5AEE,0x5AF5,0x5AF6,0x5AFD,0x5B00,0x5B01,0x5B08, -0x5B17,0x5B34,0x5B19,0x5B1B,0x5B1D,0x5B21,0x5B25,0x5B2D, -0x5B38,0x5B41,0x5B4B,0x5B4C,0x5B52,0x5B56,0x5B5E,0x5B68, -0x5B6E,0x5B6F,0x5B7C,0x5B7D,0x5B7E,0x5B7F,0x5B81,0x5B84, -0x5B86,0x5B8A,0x5B8E,0x5B90,0x5B91,0x5B93,0x5B94,0x5B96, -0x5BA8,0x5BA9,0x5BAC,0x5BAD,0x5BAF,0x5BB1,0x5BB2,0x5BB7, -0x5BBA,0x5BBC,0x5BC0,0x5BC1,0x5BCD,0x5BCF,0x5BD6,0x5BD7, -0x5BD8,0x5BD9,0x5BDA,0x5BE0,0x5BEF,0x5BF1,0x5BF4,0x5BFD, -0x5C0C,0x5C17,0x5C1E,0x5C1F,0x5C23,0x5C26,0x5C29,0x5C2B, -0x5C2C,0x5C2E,0x5C30,0x5C32,0x5C35,0x5C36,0x5C59,0x5C5A, -0x5C5C,0x5C62,0x5C63,0x5C67,0x5C68,0x5C69}; - -/* page 19 0x3B21-0x3B7E */ -static uint16 tab_jisx0212_uni19[]={ -0x5C6D,0x5C70,0x5C74,0x5C75,0x5C7A,0x5C7B,0x5C7C,0x5C7D, -0x5C87,0x5C88,0x5C8A,0x5C8F,0x5C92,0x5C9D,0x5C9F,0x5CA0, -0x5CA2,0x5CA3,0x5CA6,0x5CAA,0x5CB2,0x5CB4,0x5CB5,0x5CBA, -0x5CC9,0x5CCB,0x5CD2,0x5CDD,0x5CD7,0x5CEE,0x5CF1,0x5CF2, -0x5CF4,0x5D01,0x5D06,0x5D0D,0x5D12,0x5D2B,0x5D23,0x5D24, -0x5D26,0x5D27,0x5D31,0x5D34,0x5D39,0x5D3D,0x5D3F,0x5D42, -0x5D43,0x5D46,0x5D48,0x5D55,0x5D51,0x5D59,0x5D4A,0x5D5F, -0x5D60,0x5D61,0x5D62,0x5D64,0x5D6A,0x5D6D,0x5D70,0x5D79, -0x5D7A,0x5D7E,0x5D7F,0x5D81,0x5D83,0x5D88,0x5D8A,0x5D92, -0x5D93,0x5D94,0x5D95,0x5D99,0x5D9B,0x5D9F,0x5DA0,0x5DA7, -0x5DAB,0x5DB0,0x5DB4,0x5DB8,0x5DB9,0x5DC3,0x5DC7,0x5DCB, -0x5DD0,0x5DCE,0x5DD8,0x5DD9,0x5DE0,0x5DE4}; - -/* page 20 0x3C21-0x3C7E */ -static uint16 tab_jisx0212_uni20[]={ -0x5DE9,0x5DF8,0x5DF9,0x5E00,0x5E07,0x5E0D,0x5E12,0x5E14, -0x5E15,0x5E18,0x5E1F,0x5E20,0x5E2E,0x5E28,0x5E32,0x5E35, -0x5E3E,0x5E4B,0x5E50,0x5E49,0x5E51,0x5E56,0x5E58,0x5E5B, -0x5E5C,0x5E5E,0x5E68,0x5E6A,0x5E6B,0x5E6C,0x5E6D,0x5E6E, -0x5E70,0x5E80,0x5E8B,0x5E8E,0x5EA2,0x5EA4,0x5EA5,0x5EA8, -0x5EAA,0x5EAC,0x5EB1,0x5EB3,0x5EBD,0x5EBE,0x5EBF,0x5EC6, -0x5ECC,0x5ECB,0x5ECE,0x5ED1,0x5ED2,0x5ED4,0x5ED5,0x5EDC, -0x5EDE,0x5EE5,0x5EEB,0x5F02,0x5F06,0x5F07,0x5F08,0x5F0E, -0x5F19,0x5F1C,0x5F1D,0x5F21,0x5F22,0x5F23,0x5F24,0x5F28, -0x5F2B,0x5F2C,0x5F2E,0x5F30,0x5F34,0x5F36,0x5F3B,0x5F3D, -0x5F3F,0x5F40,0x5F44,0x5F45,0x5F47,0x5F4D,0x5F50,0x5F54, -0x5F58,0x5F5B,0x5F60,0x5F63,0x5F64,0x5F67}; - -/* page 21 0x3D21-0x3D7E */ -static uint16 tab_jisx0212_uni21[]={ -0x5F6F,0x5F72,0x5F74,0x5F75,0x5F78,0x5F7A,0x5F7D,0x5F7E, -0x5F89,0x5F8D,0x5F8F,0x5F96,0x5F9C,0x5F9D,0x5FA2,0x5FA7, -0x5FAB,0x5FA4,0x5FAC,0x5FAF,0x5FB0,0x5FB1,0x5FB8,0x5FC4, -0x5FC7,0x5FC8,0x5FC9,0x5FCB,0x5FD0,0x5FD1,0x5FD2,0x5FD3, -0x5FD4,0x5FDE,0x5FE1,0x5FE2,0x5FE8,0x5FE9,0x5FEA,0x5FEC, -0x5FED,0x5FEE,0x5FEF,0x5FF2,0x5FF3,0x5FF6,0x5FFA,0x5FFC, -0x6007,0x600A,0x600D,0x6013,0x6014,0x6017,0x6018,0x601A, -0x601F,0x6024,0x602D,0x6033,0x6035,0x6040,0x6047,0x6048, -0x6049,0x604C,0x6051,0x6054,0x6056,0x6057,0x605D,0x6061, -0x6067,0x6071,0x607E,0x607F,0x6082,0x6086,0x6088,0x608A, -0x608E,0x6091,0x6093,0x6095,0x6098,0x609D,0x609E,0x60A2, -0x60A4,0x60A5,0x60A8,0x60B0,0x60B1,0x60B7}; - -/* page 22 0x3E21-0x3E7E */ -static uint16 tab_jisx0212_uni22[]={ -0x60BB,0x60BE,0x60C2,0x60C4,0x60C8,0x60C9,0x60CA,0x60CB, -0x60CE,0x60CF,0x60D4,0x60D5,0x60D9,0x60DB,0x60DD,0x60DE, -0x60E2,0x60E5,0x60F2,0x60F5,0x60F8,0x60FC,0x60FD,0x6102, -0x6107,0x610A,0x610C,0x6110,0x6111,0x6112,0x6113,0x6114, -0x6116,0x6117,0x6119,0x611C,0x611E,0x6122,0x612A,0x612B, -0x6130,0x6131,0x6135,0x6136,0x6137,0x6139,0x6141,0x6145, -0x6146,0x6149,0x615E,0x6160,0x616C,0x6172,0x6178,0x617B, -0x617C,0x617F,0x6180,0x6181,0x6183,0x6184,0x618B,0x618D, -0x6192,0x6193,0x6197,0x6198,0x619C,0x619D,0x619F,0x61A0, -0x61A5,0x61A8,0x61AA,0x61AD,0x61B8,0x61B9,0x61BC,0x61C0, -0x61C1,0x61C2,0x61CE,0x61CF,0x61D5,0x61DC,0x61DD,0x61DE, -0x61DF,0x61E1,0x61E2,0x61E7,0x61E9,0x61E5}; - -/* page 23 0x3F21-0x3F7E */ -static uint16 tab_jisx0212_uni23[]={ -0x61EC,0x61ED,0x61EF,0x6201,0x6203,0x6204,0x6207,0x6213, -0x6215,0x621C,0x6220,0x6222,0x6223,0x6227,0x6229,0x622B, -0x6239,0x623D,0x6242,0x6243,0x6244,0x6246,0x624C,0x6250, -0x6251,0x6252,0x6254,0x6256,0x625A,0x625C,0x6264,0x626D, -0x626F,0x6273,0x627A,0x627D,0x628D,0x628E,0x628F,0x6290, -0x62A6,0x62A8,0x62B3,0x62B6,0x62B7,0x62BA,0x62BE,0x62BF, -0x62C4,0x62CE,0x62D5,0x62D6,0x62DA,0x62EA,0x62F2,0x62F4, -0x62FC,0x62FD,0x6303,0x6304,0x630A,0x630B,0x630D,0x6310, -0x6313,0x6316,0x6318,0x6329,0x632A,0x632D,0x6335,0x6336, -0x6339,0x633C,0x6341,0x6342,0x6343,0x6344,0x6346,0x634A, -0x634B,0x634E,0x6352,0x6353,0x6354,0x6358,0x635B,0x6365, -0x6366,0x636C,0x636D,0x6371,0x6374,0x6375}; - -/* page 24 0x4021-0x407E */ -static uint16 tab_jisx0212_uni24[]={ -0x6378,0x637C,0x637D,0x637F,0x6382,0x6384,0x6387,0x638A, -0x6390,0x6394,0x6395,0x6399,0x639A,0x639E,0x63A4,0x63A6, -0x63AD,0x63AE,0x63AF,0x63BD,0x63C1,0x63C5,0x63C8,0x63CE, -0x63D1,0x63D3,0x63D4,0x63D5,0x63DC,0x63E0,0x63E5,0x63EA, -0x63EC,0x63F2,0x63F3,0x63F5,0x63F8,0x63F9,0x6409,0x640A, -0x6410,0x6412,0x6414,0x6418,0x641E,0x6420,0x6422,0x6424, -0x6425,0x6429,0x642A,0x642F,0x6430,0x6435,0x643D,0x643F, -0x644B,0x644F,0x6451,0x6452,0x6453,0x6454,0x645A,0x645B, -0x645C,0x645D,0x645F,0x6460,0x6461,0x6463,0x646D,0x6473, -0x6474,0x647B,0x647D,0x6485,0x6487,0x648F,0x6490,0x6491, -0x6498,0x6499,0x649B,0x649D,0x649F,0x64A1,0x64A3,0x64A6, -0x64A8,0x64AC,0x64B3,0x64BD,0x64BE,0x64BF}; - -/* page 25 0x4121-0x417E */ -static uint16 tab_jisx0212_uni25[]={ -0x64C4,0x64C9,0x64CA,0x64CB,0x64CC,0x64CE,0x64D0,0x64D1, -0x64D5,0x64D7,0x64E4,0x64E5,0x64E9,0x64EA,0x64ED,0x64F0, -0x64F5,0x64F7,0x64FB,0x64FF,0x6501,0x6504,0x6508,0x6509, -0x650A,0x650F,0x6513,0x6514,0x6516,0x6519,0x651B,0x651E, -0x651F,0x6522,0x6526,0x6529,0x652E,0x6531,0x653A,0x653C, -0x653D,0x6543,0x6547,0x6549,0x6550,0x6552,0x6554,0x655F, -0x6560,0x6567,0x656B,0x657A,0x657D,0x6581,0x6585,0x658A, -0x6592,0x6595,0x6598,0x659D,0x65A0,0x65A3,0x65A6,0x65AE, -0x65B2,0x65B3,0x65B4,0x65BF,0x65C2,0x65C8,0x65C9,0x65CE, -0x65D0,0x65D4,0x65D6,0x65D8,0x65DF,0x65F0,0x65F2,0x65F4, -0x65F5,0x65F9,0x65FE,0x65FF,0x6600,0x6604,0x6608,0x6609, -0x660D,0x6611,0x6612,0x6615,0x6616,0x661D}; - -/* page 26 0x4221-0x427E */ -static uint16 tab_jisx0212_uni26[]={ -0x661E,0x6621,0x6622,0x6623,0x6624,0x6626,0x6629,0x662A, -0x662B,0x662C,0x662E,0x6630,0x6631,0x6633,0x6639,0x6637, -0x6640,0x6645,0x6646,0x664A,0x664C,0x6651,0x664E,0x6657, -0x6658,0x6659,0x665B,0x665C,0x6660,0x6661,0x66FB,0x666A, -0x666B,0x666C,0x667E,0x6673,0x6675,0x667F,0x6677,0x6678, -0x6679,0x667B,0x6680,0x667C,0x668B,0x668C,0x668D,0x6690, -0x6692,0x6699,0x669A,0x669B,0x669C,0x669F,0x66A0,0x66A4, -0x66AD,0x66B1,0x66B2,0x66B5,0x66BB,0x66BF,0x66C0,0x66C2, -0x66C3,0x66C8,0x66CC,0x66CE,0x66CF,0x66D4,0x66DB,0x66DF, -0x66E8,0x66EB,0x66EC,0x66EE,0x66FA,0x6705,0x6707,0x670E, -0x6713,0x6719,0x671C,0x6720,0x6722,0x6733,0x673E,0x6745, -0x6747,0x6748,0x674C,0x6754,0x6755,0x675D}; - -/* page 27 0x4321-0x437E */ -static uint16 tab_jisx0212_uni27[]={ -0x6766,0x676C,0x676E,0x6774,0x6776,0x677B,0x6781,0x6784, -0x678E,0x678F,0x6791,0x6793,0x6796,0x6798,0x6799,0x679B, -0x67B0,0x67B1,0x67B2,0x67B5,0x67BB,0x67BC,0x67BD,0x67F9, -0x67C0,0x67C2,0x67C3,0x67C5,0x67C8,0x67C9,0x67D2,0x67D7, -0x67D9,0x67DC,0x67E1,0x67E6,0x67F0,0x67F2,0x67F6,0x67F7, -0x6852,0x6814,0x6819,0x681D,0x681F,0x6828,0x6827,0x682C, -0x682D,0x682F,0x6830,0x6831,0x6833,0x683B,0x683F,0x6844, -0x6845,0x684A,0x684C,0x6855,0x6857,0x6858,0x685B,0x686B, -0x686E,0x686F,0x6870,0x6871,0x6872,0x6875,0x6879,0x687A, -0x687B,0x687C,0x6882,0x6884,0x6886,0x6888,0x6896,0x6898, -0x689A,0x689C,0x68A1,0x68A3,0x68A5,0x68A9,0x68AA,0x68AE, -0x68B2,0x68BB,0x68C5,0x68C8,0x68CC,0x68CF}; - -/* page 28 0x4421-0x447E */ -static uint16 tab_jisx0212_uni28[]={ -0x68D0,0x68D1,0x68D3,0x68D6,0x68D9,0x68DC,0x68DD,0x68E5, -0x68E8,0x68EA,0x68EB,0x68EC,0x68ED,0x68F0,0x68F1,0x68F5, -0x68F6,0x68FB,0x68FC,0x68FD,0x6906,0x6909,0x690A,0x6910, -0x6911,0x6913,0x6916,0x6917,0x6931,0x6933,0x6935,0x6938, -0x693B,0x6942,0x6945,0x6949,0x694E,0x6957,0x695B,0x6963, -0x6964,0x6965,0x6966,0x6968,0x6969,0x696C,0x6970,0x6971, -0x6972,0x697A,0x697B,0x697F,0x6980,0x698D,0x6992,0x6996, -0x6998,0x69A1,0x69A5,0x69A6,0x69A8,0x69AB,0x69AD,0x69AF, -0x69B7,0x69B8,0x69BA,0x69BC,0x69C5,0x69C8,0x69D1,0x69D6, -0x69D7,0x69E2,0x69E5,0x69EE,0x69EF,0x69F1,0x69F3,0x69F5, -0x69FE,0x6A00,0x6A01,0x6A03,0x6A0F,0x6A11,0x6A15,0x6A1A, -0x6A1D,0x6A20,0x6A24,0x6A28,0x6A30,0x6A32}; - -/* page 29 0x4521-0x457E */ -static uint16 tab_jisx0212_uni29[]={ -0x6A34,0x6A37,0x6A3B,0x6A3E,0x6A3F,0x6A45,0x6A46,0x6A49, -0x6A4A,0x6A4E,0x6A50,0x6A51,0x6A52,0x6A55,0x6A56,0x6A5B, -0x6A64,0x6A67,0x6A6A,0x6A71,0x6A73,0x6A7E,0x6A81,0x6A83, -0x6A86,0x6A87,0x6A89,0x6A8B,0x6A91,0x6A9B,0x6A9D,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,0x6CB0,0x6CB2,0x6CB4,0x6CC2,0x6CC6,0x6CCD, -0x6CCF,0x6CD0,0x6CD1,0x6CD2,0x6CD4,0x6CD6}; - -/* page 31 0x4721-0x477E */ -static uint16 tab_jisx0212_uni31[]={ -0x6CDA,0x6CDC,0x6CE0,0x6CE7,0x6CE9,0x6CEB,0x6CEC,0x6CEE, -0x6CF2,0x6CF4,0x6D04,0x6D07,0x6D0A,0x6D0E,0x6D0F,0x6D11, -0x6D13,0x6D1A,0x6D26,0x6D27,0x6D28,0x6C67,0x6D2E,0x6D2F, -0x6D31,0x6D39,0x6D3C,0x6D3F,0x6D57,0x6D5E,0x6D5F,0x6D61, -0x6D65,0x6D67,0x6D6F,0x6D70,0x6D7C,0x6D82,0x6D87,0x6D91, -0x6D92,0x6D94,0x6D96,0x6D97,0x6D98,0x6DAA,0x6DAC,0x6DB4, -0x6DB7,0x6DB9,0x6DBD,0x6DBF,0x6DC4,0x6DC8,0x6DCA,0x6DCE, -0x6DCF,0x6DD6,0x6DDB,0x6DDD,0x6DDF,0x6DE0,0x6DE2,0x6DE5, -0x6DE9,0x6DEF,0x6DF0,0x6DF4,0x6DF6,0x6DFC,0x6E00,0x6E04, -0x6E1E,0x6E22,0x6E27,0x6E32,0x6E36,0x6E39,0x6E3B,0x6E3C, -0x6E44,0x6E45,0x6E48,0x6E49,0x6E4B,0x6E4F,0x6E51,0x6E52, -0x6E53,0x6E54,0x6E57,0x6E5C,0x6E5D,0x6E5E}; - -/* page 32 0x4821-0x487E */ -static uint16 tab_jisx0212_uni32[]={ -0x6E62,0x6E63,0x6E68,0x6E73,0x6E7B,0x6E7D,0x6E8D,0x6E93, -0x6E99,0x6EA0,0x6EA7,0x6EAD,0x6EAE,0x6EB1,0x6EB3,0x6EBB, -0x6EBF,0x6EC0,0x6EC1,0x6EC3,0x6EC7,0x6EC8,0x6ECA,0x6ECD, -0x6ECE,0x6ECF,0x6EEB,0x6EED,0x6EEE,0x6EF9,0x6EFB,0x6EFD, -0x6F04,0x6F08,0x6F0A,0x6F0C,0x6F0D,0x6F16,0x6F18,0x6F1A, -0x6F1B,0x6F26,0x6F29,0x6F2A,0x6F2F,0x6F30,0x6F33,0x6F36, -0x6F3B,0x6F3C,0x6F2D,0x6F4F,0x6F51,0x6F52,0x6F53,0x6F57, -0x6F59,0x6F5A,0x6F5D,0x6F5E,0x6F61,0x6F62,0x6F68,0x6F6C, -0x6F7D,0x6F7E,0x6F83,0x6F87,0x6F88,0x6F8B,0x6F8C,0x6F8D, -0x6F90,0x6F92,0x6F93,0x6F94,0x6F96,0x6F9A,0x6F9F,0x6FA0, -0x6FA5,0x6FA6,0x6FA7,0x6FA8,0x6FAE,0x6FAF,0x6FB0,0x6FB5, -0x6FB6,0x6FBC,0x6FC5,0x6FC7,0x6FC8,0x6FCA}; - -/* page 33 0x4921-0x497E */ -static uint16 tab_jisx0212_uni33[]={ -0x6FDA,0x6FDE,0x6FE8,0x6FE9,0x6FF0,0x6FF5,0x6FF9,0x6FFC, -0x6FFD,0x7000,0x7005,0x7006,0x7007,0x700D,0x7017,0x7020, -0x7023,0x702F,0x7034,0x7037,0x7039,0x703C,0x7043,0x7044, -0x7048,0x7049,0x704A,0x704B,0x7054,0x7055,0x705D,0x705E, -0x704E,0x7064,0x7065,0x706C,0x706E,0x7075,0x7076,0x707E, -0x7081,0x7085,0x7086,0x7094,0x7095,0x7096,0x7097,0x7098, -0x709B,0x70A4,0x70AB,0x70B0,0x70B1,0x70B4,0x70B7,0x70CA, -0x70D1,0x70D3,0x70D4,0x70D5,0x70D6,0x70D8,0x70DC,0x70E4, -0x70FA,0x7103,0x7104,0x7105,0x7106,0x7107,0x710B,0x710C, -0x710F,0x711E,0x7120,0x712B,0x712D,0x712F,0x7130,0x7131, -0x7138,0x7141,0x7145,0x7146,0x7147,0x714A,0x714B,0x7150, -0x7152,0x7157,0x715A,0x715C,0x715E,0x7160}; - -/* page 34 0x4A21-0x4A7E */ -static uint16 tab_jisx0212_uni34[]={ -0x7168,0x7179,0x7180,0x7185,0x7187,0x718C,0x7192,0x719A, -0x719B,0x71A0,0x71A2,0x71AF,0x71B0,0x71B2,0x71B3,0x71BA, -0x71BF,0x71C0,0x71C1,0x71C4,0x71CB,0x71CC,0x71D3,0x71D6, -0x71D9,0x71DA,0x71DC,0x71F8,0x71FE,0x7200,0x7207,0x7208, -0x7209,0x7213,0x7217,0x721A,0x721D,0x721F,0x7224,0x722B, -0x722F,0x7234,0x7238,0x7239,0x7241,0x7242,0x7243,0x7245, -0x724E,0x724F,0x7250,0x7253,0x7255,0x7256,0x725A,0x725C, -0x725E,0x7260,0x7263,0x7268,0x726B,0x726E,0x726F,0x7271, -0x7277,0x7278,0x727B,0x727C,0x727F,0x7284,0x7289,0x728D, -0x728E,0x7293,0x729B,0x72A8,0x72AD,0x72AE,0x72B1,0x72B4, -0x72BE,0x72C1,0x72C7,0x72C9,0x72CC,0x72D5,0x72D6,0x72D8, -0x72DF,0x72E5,0x72F3,0x72F4,0x72FA,0x72FB}; - -/* page 35 0x4B21-0x4B7E */ -static uint16 tab_jisx0212_uni35[]={ -0x72FE,0x7302,0x7304,0x7305,0x7307,0x730B,0x730D,0x7312, -0x7313,0x7318,0x7319,0x731E,0x7322,0x7324,0x7327,0x7328, -0x732C,0x7331,0x7332,0x7335,0x733A,0x733B,0x733D,0x7343, -0x734D,0x7350,0x7352,0x7356,0x7358,0x735D,0x735E,0x735F, -0x7360,0x7366,0x7367,0x7369,0x736B,0x736C,0x736E,0x736F, -0x7371,0x7377,0x7379,0x737C,0x7380,0x7381,0x7383,0x7385, -0x7386,0x738E,0x7390,0x7393,0x7395,0x7397,0x7398,0x739C, -0x739E,0x739F,0x73A0,0x73A2,0x73A5,0x73A6,0x73AA,0x73AB, -0x73AD,0x73B5,0x73B7,0x73B9,0x73BC,0x73BD,0x73BF,0x73C5, -0x73C6,0x73C9,0x73CB,0x73CC,0x73CF,0x73D2,0x73D3,0x73D6, -0x73D9,0x73DD,0x73E1,0x73E3,0x73E6,0x73E7,0x73E9,0x73F4, -0x73F5,0x73F7,0x73F9,0x73FA,0x73FB,0x73FD}; - -/* page 36 0x4C21-0x4C7E */ -static uint16 tab_jisx0212_uni36[]={ -0x73FF,0x7400,0x7401,0x7404,0x7407,0x740A,0x7411,0x741A, -0x741B,0x7424,0x7426,0x7428,0x7429,0x742A,0x742B,0x742C, -0x742D,0x742E,0x742F,0x7430,0x7431,0x7439,0x7440,0x7443, -0x7444,0x7446,0x7447,0x744B,0x744D,0x7451,0x7452,0x7457, -0x745D,0x7462,0x7466,0x7467,0x7468,0x746B,0x746D,0x746E, -0x7471,0x7472,0x7480,0x7481,0x7485,0x7486,0x7487,0x7489, -0x748F,0x7490,0x7491,0x7492,0x7498,0x7499,0x749A,0x749C, -0x749F,0x74A0,0x74A1,0x74A3,0x74A6,0x74A8,0x74A9,0x74AA, -0x74AB,0x74AE,0x74AF,0x74B1,0x74B2,0x74B5,0x74B9,0x74BB, -0x74BF,0x74C8,0x74C9,0x74CC,0x74D0,0x74D3,0x74D8,0x74DA, -0x74DB,0x74DE,0x74DF,0x74E4,0x74E8,0x74EA,0x74EB,0x74EF, -0x74F4,0x74FA,0x74FB,0x74FC,0x74FF,0x7506}; - -/* page 37 0x4D21-0x4D7E */ -static uint16 tab_jisx0212_uni37[]={ -0x7512,0x7516,0x7517,0x7520,0x7521,0x7524,0x7527,0x7529, -0x752A,0x752F,0x7536,0x7539,0x753D,0x753E,0x753F,0x7540, -0x7543,0x7547,0x7548,0x754E,0x7550,0x7552,0x7557,0x755E, -0x755F,0x7561,0x756F,0x7571,0x7579,0x757A,0x757B,0x757C, -0x757D,0x757E,0x7581,0x7585,0x7590,0x7592,0x7593,0x7595, -0x7599,0x759C,0x75A2,0x75A4,0x75B4,0x75BA,0x75BF,0x75C0, -0x75C1,0x75C4,0x75C6,0x75CC,0x75CE,0x75CF,0x75D7,0x75DC, -0x75DF,0x75E0,0x75E1,0x75E4,0x75E7,0x75EC,0x75EE,0x75EF, -0x75F1,0x75F9,0x7600,0x7602,0x7603,0x7604,0x7607,0x7608, -0x760A,0x760C,0x760F,0x7612,0x7613,0x7615,0x7616,0x7619, -0x761B,0x761C,0x761D,0x761E,0x7623,0x7625,0x7626,0x7629, -0x762D,0x7632,0x7633,0x7635,0x7638,0x7639}; - -/* page 38 0x4E21-0x4E7E */ -static uint16 tab_jisx0212_uni38[]={ -0x763A,0x763C,0x764A,0x7640,0x7641,0x7643,0x7644,0x7645, -0x7649,0x764B,0x7655,0x7659,0x765F,0x7664,0x7665,0x766D, -0x766E,0x766F,0x7671,0x7674,0x7681,0x7685,0x768C,0x768D, -0x7695,0x769B,0x769C,0x769D,0x769F,0x76A0,0x76A2,0x76A3, -0x76A4,0x76A5,0x76A6,0x76A7,0x76A8,0x76AA,0x76AD,0x76BD, -0x76C1,0x76C5,0x76C9,0x76CB,0x76CC,0x76CE,0x76D4,0x76D9, -0x76E0,0x76E6,0x76E8,0x76EC,0x76F0,0x76F1,0x76F6,0x76F9, -0x76FC,0x7700,0x7706,0x770A,0x770E,0x7712,0x7714,0x7715, -0x7717,0x7719,0x771A,0x771C,0x7722,0x7728,0x772D,0x772E, -0x772F,0x7734,0x7735,0x7736,0x7739,0x773D,0x773E,0x7742, -0x7745,0x7746,0x774A,0x774D,0x774E,0x774F,0x7752,0x7756, -0x7757,0x775C,0x775E,0x775F,0x7760,0x7762}; - -/* page 39 0x4F21-0x4F7E */ -static uint16 tab_jisx0212_uni39[]={ -0x7764,0x7767,0x776A,0x776C,0x7770,0x7772,0x7773,0x7774, -0x777A,0x777D,0x7780,0x7784,0x778C,0x778D,0x7794,0x7795, -0x7796,0x779A,0x779F,0x77A2,0x77A7,0x77AA,0x77AE,0x77AF, -0x77B1,0x77B5,0x77BE,0x77C3,0x77C9,0x77D1,0x77D2,0x77D5, -0x77D9,0x77DE,0x77DF,0x77E0,0x77E4,0x77E6,0x77EA,0x77EC, -0x77F0,0x77F1,0x77F4,0x77F8,0x77FB,0x7805,0x7806,0x7809, -0x780D,0x780E,0x7811,0x781D,0x7821,0x7822,0x7823,0x782D, -0x782E,0x7830,0x7835,0x7837,0x7843,0x7844,0x7847,0x7848, -0x784C,0x784E,0x7852,0x785C,0x785E,0x7860,0x7861,0x7863, -0x7864,0x7868,0x786A,0x786E,0x787A,0x787E,0x788A,0x788F, -0x7894,0x7898,0x78A1,0x789D,0x789E,0x789F,0x78A4,0x78A8, -0x78AC,0x78AD,0x78B0,0x78B1,0x78B2,0x78B3}; - -/* page 40 0x5021-0x507E */ -static uint16 tab_jisx0212_uni40[]={ -0x78BB,0x78BD,0x78BF,0x78C7,0x78C8,0x78C9,0x78CC,0x78CE, -0x78D2,0x78D3,0x78D5,0x78D6,0x78E4,0x78DB,0x78DF,0x78E0, -0x78E1,0x78E6,0x78EA,0x78F2,0x78F3,0x7900,0x78F6,0x78F7, -0x78FA,0x78FB,0x78FF,0x7906,0x790C,0x7910,0x791A,0x791C, -0x791E,0x791F,0x7920,0x7925,0x7927,0x7929,0x792D,0x7931, -0x7934,0x7935,0x793B,0x793D,0x793F,0x7944,0x7945,0x7946, -0x794A,0x794B,0x794F,0x7951,0x7954,0x7958,0x795B,0x795C, -0x7967,0x7969,0x796B,0x7972,0x7979,0x797B,0x797C,0x797E, -0x798B,0x798C,0x7991,0x7993,0x7994,0x7995,0x7996,0x7998, -0x799B,0x799C,0x79A1,0x79A8,0x79A9,0x79AB,0x79AF,0x79B1, -0x79B4,0x79B8,0x79BB,0x79C2,0x79C4,0x79C7,0x79C8,0x79CA, -0x79CF,0x79D4,0x79D6,0x79DA,0x79DD,0x79DE}; - -/* page 41 0x5121-0x517E */ -static uint16 tab_jisx0212_uni41[]={ -0x79E0,0x79E2,0x79E5,0x79EA,0x79EB,0x79ED,0x79F1,0x79F8, -0x79FC,0x7A02,0x7A03,0x7A07,0x7A09,0x7A0A,0x7A0C,0x7A11, -0x7A15,0x7A1B,0x7A1E,0x7A21,0x7A27,0x7A2B,0x7A2D,0x7A2F, -0x7A30,0x7A34,0x7A35,0x7A38,0x7A39,0x7A3A,0x7A44,0x7A45, -0x7A47,0x7A48,0x7A4C,0x7A55,0x7A56,0x7A59,0x7A5C,0x7A5D, -0x7A5F,0x7A60,0x7A65,0x7A67,0x7A6A,0x7A6D,0x7A75,0x7A78, -0x7A7E,0x7A80,0x7A82,0x7A85,0x7A86,0x7A8A,0x7A8B,0x7A90, -0x7A91,0x7A94,0x7A9E,0x7AA0,0x7AA3,0x7AAC,0x7AB3,0x7AB5, -0x7AB9,0x7ABB,0x7ABC,0x7AC6,0x7AC9,0x7ACC,0x7ACE,0x7AD1, -0x7ADB,0x7AE8,0x7AE9,0x7AEB,0x7AEC,0x7AF1,0x7AF4,0x7AFB, -0x7AFD,0x7AFE,0x7B07,0x7B14,0x7B1F,0x7B23,0x7B27,0x7B29, -0x7B2A,0x7B2B,0x7B2D,0x7B2E,0x7B2F,0x7B30}; - -/* page 42 0x5221-0x527E */ -static uint16 tab_jisx0212_uni42[]={ -0x7B31,0x7B34,0x7B3D,0x7B3F,0x7B40,0x7B41,0x7B47,0x7B4E, -0x7B55,0x7B60,0x7B64,0x7B66,0x7B69,0x7B6A,0x7B6D,0x7B6F, -0x7B72,0x7B73,0x7B77,0x7B84,0x7B89,0x7B8E,0x7B90,0x7B91, -0x7B96,0x7B9B,0x7B9E,0x7BA0,0x7BA5,0x7BAC,0x7BAF,0x7BB0, -0x7BB2,0x7BB5,0x7BB6,0x7BBA,0x7BBB,0x7BBC,0x7BBD,0x7BC2, -0x7BC5,0x7BC8,0x7BCA,0x7BD4,0x7BD6,0x7BD7,0x7BD9,0x7BDA, -0x7BDB,0x7BE8,0x7BEA,0x7BF2,0x7BF4,0x7BF5,0x7BF8,0x7BF9, -0x7BFA,0x7BFC,0x7BFE,0x7C01,0x7C02,0x7C03,0x7C04,0x7C06, -0x7C09,0x7C0B,0x7C0C,0x7C0E,0x7C0F,0x7C19,0x7C1B,0x7C20, -0x7C25,0x7C26,0x7C28,0x7C2C,0x7C31,0x7C33,0x7C34,0x7C36, -0x7C39,0x7C3A,0x7C46,0x7C4A,0x7C55,0x7C51,0x7C52,0x7C53, -0x7C59,0x7C5A,0x7C5B,0x7C5C,0x7C5D,0x7C5E}; - -/* page 43 0x5321-0x537E */ -static uint16 tab_jisx0212_uni43[]={ -0x7C61,0x7C63,0x7C67,0x7C69,0x7C6D,0x7C6E,0x7C70,0x7C72, -0x7C79,0x7C7C,0x7C7D,0x7C86,0x7C87,0x7C8F,0x7C94,0x7C9E, -0x7CA0,0x7CA6,0x7CB0,0x7CB6,0x7CB7,0x7CBA,0x7CBB,0x7CBC, -0x7CBF,0x7CC4,0x7CC7,0x7CC8,0x7CC9,0x7CCD,0x7CCF,0x7CD3, -0x7CD4,0x7CD5,0x7CD7,0x7CD9,0x7CDA,0x7CDD,0x7CE6,0x7CE9, -0x7CEB,0x7CF5,0x7D03,0x7D07,0x7D08,0x7D09,0x7D0F,0x7D11, -0x7D12,0x7D13,0x7D16,0x7D1D,0x7D1E,0x7D23,0x7D26,0x7D2A, -0x7D2D,0x7D31,0x7D3C,0x7D3D,0x7D3E,0x7D40,0x7D41,0x7D47, -0x7D48,0x7D4D,0x7D51,0x7D53,0x7D57,0x7D59,0x7D5A,0x7D5C, -0x7D5D,0x7D65,0x7D67,0x7D6A,0x7D70,0x7D78,0x7D7A,0x7D7B, -0x7D7F,0x7D81,0x7D82,0x7D83,0x7D85,0x7D86,0x7D88,0x7D8B, -0x7D8C,0x7D8D,0x7D91,0x7D96,0x7D97,0x7D9D}; - -/* page 44 0x5421-0x547E */ -static uint16 tab_jisx0212_uni44[]={ -0x7D9E,0x7DA6,0x7DA7,0x7DAA,0x7DB3,0x7DB6,0x7DB7,0x7DB9, -0x7DC2,0x7DC3,0x7DC4,0x7DC5,0x7DC6,0x7DCC,0x7DCD,0x7DCE, -0x7DD7,0x7DD9,0x7E00,0x7DE2,0x7DE5,0x7DE6,0x7DEA,0x7DEB, -0x7DED,0x7DF1,0x7DF5,0x7DF6,0x7DF9,0x7DFA,0x7E08,0x7E10, -0x7E11,0x7E15,0x7E17,0x7E1C,0x7E1D,0x7E20,0x7E27,0x7E28, -0x7E2C,0x7E2D,0x7E2F,0x7E33,0x7E36,0x7E3F,0x7E44,0x7E45, -0x7E47,0x7E4E,0x7E50,0x7E52,0x7E58,0x7E5F,0x7E61,0x7E62, -0x7E65,0x7E6B,0x7E6E,0x7E6F,0x7E73,0x7E78,0x7E7E,0x7E81, -0x7E86,0x7E87,0x7E8A,0x7E8D,0x7E91,0x7E95,0x7E98,0x7E9A, -0x7E9D,0x7E9E,0x7F3C,0x7F3B,0x7F3D,0x7F3E,0x7F3F,0x7F43, -0x7F44,0x7F47,0x7F4F,0x7F52,0x7F53,0x7F5B,0x7F5C,0x7F5D, -0x7F61,0x7F63,0x7F64,0x7F65,0x7F66,0x7F6D}; - -/* page 45 0x5521-0x557E */ -static uint16 tab_jisx0212_uni45[]={ -0x7F71,0x7F7D,0x7F7E,0x7F7F,0x7F80,0x7F8B,0x7F8D,0x7F8F, -0x7F90,0x7F91,0x7F96,0x7F97,0x7F9C,0x7FA1,0x7FA2,0x7FA6, -0x7FAA,0x7FAD,0x7FB4,0x7FBC,0x7FBF,0x7FC0,0x7FC3,0x7FC8, -0x7FCE,0x7FCF,0x7FDB,0x7FDF,0x7FE3,0x7FE5,0x7FE8,0x7FEC, -0x7FEE,0x7FEF,0x7FF2,0x7FFA,0x7FFD,0x7FFE,0x7FFF,0x8007, -0x8008,0x800A,0x800D,0x800E,0x800F,0x8011,0x8013,0x8014, -0x8016,0x801D,0x801E,0x801F,0x8020,0x8024,0x8026,0x802C, -0x802E,0x8030,0x8034,0x8035,0x8037,0x8039,0x803A,0x803C, -0x803E,0x8040,0x8044,0x8060,0x8064,0x8066,0x806D,0x8071, -0x8075,0x8081,0x8088,0x808E,0x809C,0x809E,0x80A6,0x80A7, -0x80AB,0x80B8,0x80B9,0x80C8,0x80CD,0x80CF,0x80D2,0x80D4, -0x80D5,0x80D7,0x80D8,0x80E0,0x80ED,0x80EE}; - -/* page 46 0x5621-0x567E */ -static uint16 tab_jisx0212_uni46[]={ -0x80F0,0x80F2,0x80F3,0x80F6,0x80F9,0x80FA,0x80FE,0x8103, -0x810B,0x8116,0x8117,0x8118,0x811C,0x811E,0x8120,0x8124, -0x8127,0x812C,0x8130,0x8135,0x813A,0x813C,0x8145,0x8147, -0x814A,0x814C,0x8152,0x8157,0x8160,0x8161,0x8167,0x8168, -0x8169,0x816D,0x816F,0x8177,0x8181,0x8190,0x8184,0x8185, -0x8186,0x818B,0x818E,0x8196,0x8198,0x819B,0x819E,0x81A2, -0x81AE,0x81B2,0x81B4,0x81BB,0x81CB,0x81C3,0x81C5,0x81CA, -0x81CE,0x81CF,0x81D5,0x81D7,0x81DB,0x81DD,0x81DE,0x81E1, -0x81E4,0x81EB,0x81EC,0x81F0,0x81F1,0x81F2,0x81F5,0x81F6, -0x81F8,0x81F9,0x81FD,0x81FF,0x8200,0x8203,0x820F,0x8213, -0x8214,0x8219,0x821A,0x821D,0x8221,0x8222,0x8228,0x8232, -0x8234,0x823A,0x8243,0x8244,0x8245,0x8246}; - -/* page 47 0x5721-0x577E */ -static uint16 tab_jisx0212_uni47[]={ -0x824B,0x824E,0x824F,0x8251,0x8256,0x825C,0x8260,0x8263, -0x8267,0x826D,0x8274,0x827B,0x827D,0x827F,0x8280,0x8281, -0x8283,0x8284,0x8287,0x8289,0x828A,0x828E,0x8291,0x8294, -0x8296,0x8298,0x829A,0x829B,0x82A0,0x82A1,0x82A3,0x82A4, -0x82A7,0x82A8,0x82A9,0x82AA,0x82AE,0x82B0,0x82B2,0x82B4, -0x82B7,0x82BA,0x82BC,0x82BE,0x82BF,0x82C6,0x82D0,0x82D5, -0x82DA,0x82E0,0x82E2,0x82E4,0x82E8,0x82EA,0x82ED,0x82EF, -0x82F6,0x82F7,0x82FD,0x82FE,0x8300,0x8301,0x8307,0x8308, -0x830A,0x830B,0x8354,0x831B,0x831D,0x831E,0x831F,0x8321, -0x8322,0x832C,0x832D,0x832E,0x8330,0x8333,0x8337,0x833A, -0x833C,0x833D,0x8342,0x8343,0x8344,0x8347,0x834D,0x834E, -0x8351,0x8355,0x8356,0x8357,0x8370,0x8378}; - -/* page 48 0x5821-0x587E */ -static uint16 tab_jisx0212_uni48[]={ -0x837D,0x837F,0x8380,0x8382,0x8384,0x8386,0x838D,0x8392, -0x8394,0x8395,0x8398,0x8399,0x839B,0x839C,0x839D,0x83A6, -0x83A7,0x83A9,0x83AC,0x83BE,0x83BF,0x83C0,0x83C7,0x83C9, -0x83CF,0x83D0,0x83D1,0x83D4,0x83DD,0x8353,0x83E8,0x83EA, -0x83F6,0x83F8,0x83F9,0x83FC,0x8401,0x8406,0x840A,0x840F, -0x8411,0x8415,0x8419,0x83AD,0x842F,0x8439,0x8445,0x8447, -0x8448,0x844A,0x844D,0x844F,0x8451,0x8452,0x8456,0x8458, -0x8459,0x845A,0x845C,0x8460,0x8464,0x8465,0x8467,0x846A, -0x8470,0x8473,0x8474,0x8476,0x8478,0x847C,0x847D,0x8481, -0x8485,0x8492,0x8493,0x8495,0x849E,0x84A6,0x84A8,0x84A9, -0x84AA,0x84AF,0x84B1,0x84B4,0x84BA,0x84BD,0x84BE,0x84C0, -0x84C2,0x84C7,0x84C8,0x84CC,0x84CF,0x84D3}; - -/* page 49 0x5921-0x597E */ -static uint16 tab_jisx0212_uni49[]={ -0x84DC,0x84E7,0x84EA,0x84EF,0x84F0,0x84F1,0x84F2,0x84F7, -0x8532,0x84FA,0x84FB,0x84FD,0x8502,0x8503,0x8507,0x850C, -0x850E,0x8510,0x851C,0x851E,0x8522,0x8523,0x8524,0x8525, -0x8527,0x852A,0x852B,0x852F,0x8533,0x8534,0x8536,0x853F, -0x8546,0x854F,0x8550,0x8551,0x8552,0x8553,0x8556,0x8559, -0x855C,0x855D,0x855E,0x855F,0x8560,0x8561,0x8562,0x8564, -0x856B,0x856F,0x8579,0x857A,0x857B,0x857D,0x857F,0x8581, -0x8585,0x8586,0x8589,0x858B,0x858C,0x858F,0x8593,0x8598, -0x859D,0x859F,0x85A0,0x85A2,0x85A5,0x85A7,0x85B4,0x85B6, -0x85B7,0x85B8,0x85BC,0x85BD,0x85BE,0x85BF,0x85C2,0x85C7, -0x85CA,0x85CB,0x85CE,0x85AD,0x85D8,0x85DA,0x85DF,0x85E0, -0x85E6,0x85E8,0x85ED,0x85F3,0x85F6,0x85FC}; - -/* page 50 0x5A21-0x5A7E */ -static uint16 tab_jisx0212_uni50[]={ -0x85FF,0x8600,0x8604,0x8605,0x860D,0x860E,0x8610,0x8611, -0x8612,0x8618,0x8619,0x861B,0x861E,0x8621,0x8627,0x8629, -0x8636,0x8638,0x863A,0x863C,0x863D,0x8640,0x8642,0x8646, -0x8652,0x8653,0x8656,0x8657,0x8658,0x8659,0x865D,0x8660, -0x8661,0x8662,0x8663,0x8664,0x8669,0x866C,0x866F,0x8675, -0x8676,0x8677,0x867A,0x868D,0x8691,0x8696,0x8698,0x869A, -0x869C,0x86A1,0x86A6,0x86A7,0x86A8,0x86AD,0x86B1,0x86B3, -0x86B4,0x86B5,0x86B7,0x86B8,0x86B9,0x86BF,0x86C0,0x86C1, -0x86C3,0x86C5,0x86D1,0x86D2,0x86D5,0x86D7,0x86DA,0x86DC, -0x86E0,0x86E3,0x86E5,0x86E7,0x8688,0x86FA,0x86FC,0x86FD, -0x8704,0x8705,0x8707,0x870B,0x870E,0x870F,0x8710,0x8713, -0x8714,0x8719,0x871E,0x871F,0x8721,0x8723}; - -/* page 51 0x5B21-0x5B7E */ -static uint16 tab_jisx0212_uni51[]={ -0x8728,0x872E,0x872F,0x8731,0x8732,0x8739,0x873A,0x873C, -0x873D,0x873E,0x8740,0x8743,0x8745,0x874D,0x8758,0x875D, -0x8761,0x8764,0x8765,0x876F,0x8771,0x8772,0x877B,0x8783, -0x8784,0x8785,0x8786,0x8787,0x8788,0x8789,0x878B,0x878C, -0x8790,0x8793,0x8795,0x8797,0x8798,0x8799,0x879E,0x87A0, -0x87A3,0x87A7,0x87AC,0x87AD,0x87AE,0x87B1,0x87B5,0x87BE, -0x87BF,0x87C1,0x87C8,0x87C9,0x87CA,0x87CE,0x87D5,0x87D6, -0x87D9,0x87DA,0x87DC,0x87DF,0x87E2,0x87E3,0x87E4,0x87EA, -0x87EB,0x87ED,0x87F1,0x87F3,0x87F8,0x87FA,0x87FF,0x8801, -0x8803,0x8806,0x8809,0x880A,0x880B,0x8810,0x8819,0x8812, -0x8813,0x8814,0x8818,0x881A,0x881B,0x881C,0x881E,0x881F, -0x8828,0x882D,0x882E,0x8830,0x8832,0x8835}; - -/* page 52 0x5C21-0x5C7E */ -static uint16 tab_jisx0212_uni52[]={ -0x883A,0x883C,0x8841,0x8843,0x8845,0x8848,0x8849,0x884A, -0x884B,0x884E,0x8851,0x8855,0x8856,0x8858,0x885A,0x885C, -0x885F,0x8860,0x8864,0x8869,0x8871,0x8879,0x887B,0x8880, -0x8898,0x889A,0x889B,0x889C,0x889F,0x88A0,0x88A8,0x88AA, -0x88BA,0x88BD,0x88BE,0x88C0,0x88CA,0x88CB,0x88CC,0x88CD, -0x88CE,0x88D1,0x88D2,0x88D3,0x88DB,0x88DE,0x88E7,0x88EF, -0x88F0,0x88F1,0x88F5,0x88F7,0x8901,0x8906,0x890D,0x890E, -0x890F,0x8915,0x8916,0x8918,0x8919,0x891A,0x891C,0x8920, -0x8926,0x8927,0x8928,0x8930,0x8931,0x8932,0x8935,0x8939, -0x893A,0x893E,0x8940,0x8942,0x8945,0x8946,0x8949,0x894F, -0x8952,0x8957,0x895A,0x895B,0x895C,0x8961,0x8962,0x8963, -0x896B,0x896E,0x8970,0x8973,0x8975,0x897A}; - -/* page 53 0x5D21-0x5D7E */ -static uint16 tab_jisx0212_uni53[]={ -0x897B,0x897C,0x897D,0x8989,0x898D,0x8990,0x8994,0x8995, -0x899B,0x899C,0x899F,0x89A0,0x89A5,0x89B0,0x89B4,0x89B5, -0x89B6,0x89B7,0x89BC,0x89D4,0x89D5,0x89D6,0x89D7,0x89D8, -0x89E5,0x89E9,0x89EB,0x89ED,0x89F1,0x89F3,0x89F6,0x89F9, -0x89FD,0x89FF,0x8A04,0x8A05,0x8A07,0x8A0F,0x8A11,0x8A12, -0x8A14,0x8A15,0x8A1E,0x8A20,0x8A22,0x8A24,0x8A26,0x8A2B, -0x8A2C,0x8A2F,0x8A35,0x8A37,0x8A3D,0x8A3E,0x8A40,0x8A43, -0x8A45,0x8A47,0x8A49,0x8A4D,0x8A4E,0x8A53,0x8A56,0x8A57, -0x8A58,0x8A5C,0x8A5D,0x8A61,0x8A65,0x8A67,0x8A75,0x8A76, -0x8A77,0x8A79,0x8A7A,0x8A7B,0x8A7E,0x8A7F,0x8A80,0x8A83, -0x8A86,0x8A8B,0x8A8F,0x8A90,0x8A92,0x8A96,0x8A97,0x8A99, -0x8A9F,0x8AA7,0x8AA9,0x8AAE,0x8AAF,0x8AB3}; - -/* page 54 0x5E21-0x5E7E */ -static uint16 tab_jisx0212_uni54[]={ -0x8AB6,0x8AB7,0x8ABB,0x8ABE,0x8AC3,0x8AC6,0x8AC8,0x8AC9, -0x8ACA,0x8AD1,0x8AD3,0x8AD4,0x8AD5,0x8AD7,0x8ADD,0x8ADF, -0x8AEC,0x8AF0,0x8AF4,0x8AF5,0x8AF6,0x8AFC,0x8AFF,0x8B05, -0x8B06,0x8B0B,0x8B11,0x8B1C,0x8B1E,0x8B1F,0x8B0A,0x8B2D, -0x8B30,0x8B37,0x8B3C,0x8B42,0x8B43,0x8B44,0x8B45,0x8B46, -0x8B48,0x8B52,0x8B53,0x8B54,0x8B59,0x8B4D,0x8B5E,0x8B63, -0x8B6D,0x8B76,0x8B78,0x8B79,0x8B7C,0x8B7E,0x8B81,0x8B84, -0x8B85,0x8B8B,0x8B8D,0x8B8F,0x8B94,0x8B95,0x8B9C,0x8B9E, -0x8B9F,0x8C38,0x8C39,0x8C3D,0x8C3E,0x8C45,0x8C47,0x8C49, -0x8C4B,0x8C4F,0x8C51,0x8C53,0x8C54,0x8C57,0x8C58,0x8C5B, -0x8C5D,0x8C59,0x8C63,0x8C64,0x8C66,0x8C68,0x8C69,0x8C6D, -0x8C73,0x8C75,0x8C76,0x8C7B,0x8C7E,0x8C86}; - -/* page 55 0x5F21-0x5F7E */ -static uint16 tab_jisx0212_uni55[]={ -0x8C87,0x8C8B,0x8C90,0x8C92,0x8C93,0x8C99,0x8C9B,0x8C9C, -0x8CA4,0x8CB9,0x8CBA,0x8CC5,0x8CC6,0x8CC9,0x8CCB,0x8CCF, -0x8CD6,0x8CD5,0x8CD9,0x8CDD,0x8CE1,0x8CE8,0x8CEC,0x8CEF, -0x8CF0,0x8CF2,0x8CF5,0x8CF7,0x8CF8,0x8CFE,0x8CFF,0x8D01, -0x8D03,0x8D09,0x8D12,0x8D17,0x8D1B,0x8D65,0x8D69,0x8D6C, -0x8D6E,0x8D7F,0x8D82,0x8D84,0x8D88,0x8D8D,0x8D90,0x8D91, -0x8D95,0x8D9E,0x8D9F,0x8DA0,0x8DA6,0x8DAB,0x8DAC,0x8DAF, -0x8DB2,0x8DB5,0x8DB7,0x8DB9,0x8DBB,0x8DC0,0x8DC5,0x8DC6, -0x8DC7,0x8DC8,0x8DCA,0x8DCE,0x8DD1,0x8DD4,0x8DD5,0x8DD7, -0x8DD9,0x8DE4,0x8DE5,0x8DE7,0x8DEC,0x8DF0,0x8DBC,0x8DF1, -0x8DF2,0x8DF4,0x8DFD,0x8E01,0x8E04,0x8E05,0x8E06,0x8E0B, -0x8E11,0x8E14,0x8E16,0x8E20,0x8E21,0x8E22}; - -/* page 56 0x6021-0x607E */ -static uint16 tab_jisx0212_uni56[]={ -0x8E23,0x8E26,0x8E27,0x8E31,0x8E33,0x8E36,0x8E37,0x8E38, -0x8E39,0x8E3D,0x8E40,0x8E41,0x8E4B,0x8E4D,0x8E4E,0x8E4F, -0x8E54,0x8E5B,0x8E5C,0x8E5D,0x8E5E,0x8E61,0x8E62,0x8E69, -0x8E6C,0x8E6D,0x8E6F,0x8E70,0x8E71,0x8E79,0x8E7A,0x8E7B, -0x8E82,0x8E83,0x8E89,0x8E90,0x8E92,0x8E95,0x8E9A,0x8E9B, -0x8E9D,0x8E9E,0x8EA2,0x8EA7,0x8EA9,0x8EAD,0x8EAE,0x8EB3, -0x8EB5,0x8EBA,0x8EBB,0x8EC0,0x8EC1,0x8EC3,0x8EC4,0x8EC7, -0x8ECF,0x8ED1,0x8ED4,0x8EDC,0x8EE8,0x8EEE,0x8EF0,0x8EF1, -0x8EF7,0x8EF9,0x8EFA,0x8EED,0x8F00,0x8F02,0x8F07,0x8F08, -0x8F0F,0x8F10,0x8F16,0x8F17,0x8F18,0x8F1E,0x8F20,0x8F21, -0x8F23,0x8F25,0x8F27,0x8F28,0x8F2C,0x8F2D,0x8F2E,0x8F34, -0x8F35,0x8F36,0x8F37,0x8F3A,0x8F40,0x8F41}; - -/* page 57 0x6121-0x617E */ -static uint16 tab_jisx0212_uni57[]={ -0x8F43,0x8F47,0x8F4F,0x8F51,0x8F52,0x8F53,0x8F54,0x8F55, -0x8F58,0x8F5D,0x8F5E,0x8F65,0x8F9D,0x8FA0,0x8FA1,0x8FA4, -0x8FA5,0x8FA6,0x8FB5,0x8FB6,0x8FB8,0x8FBE,0x8FC0,0x8FC1, -0x8FC6,0x8FCA,0x8FCB,0x8FCD,0x8FD0,0x8FD2,0x8FD3,0x8FD5, -0x8FE0,0x8FE3,0x8FE4,0x8FE8,0x8FEE,0x8FF1,0x8FF5,0x8FF6, -0x8FFB,0x8FFE,0x9002,0x9004,0x9008,0x900C,0x9018,0x901B, -0x9028,0x9029,0x902F,0x902A,0x902C,0x902D,0x9033,0x9034, -0x9037,0x903F,0x9043,0x9044,0x904C,0x905B,0x905D,0x9062, -0x9066,0x9067,0x906C,0x9070,0x9074,0x9079,0x9085,0x9088, -0x908B,0x908C,0x908E,0x9090,0x9095,0x9097,0x9098,0x9099, -0x909B,0x90A0,0x90A1,0x90A2,0x90A5,0x90B0,0x90B2,0x90B3, -0x90B4,0x90B6,0x90BD,0x90CC,0x90BE,0x90C3}; - -/* page 58 0x6221-0x627E */ -static uint16 tab_jisx0212_uni58[]={ -0x90C4,0x90C5,0x90C7,0x90C8,0x90D5,0x90D7,0x90D8,0x90D9, -0x90DC,0x90DD,0x90DF,0x90E5,0x90D2,0x90F6,0x90EB,0x90EF, -0x90F0,0x90F4,0x90FE,0x90FF,0x9100,0x9104,0x9105,0x9106, -0x9108,0x910D,0x9110,0x9114,0x9116,0x9117,0x9118,0x911A, -0x911C,0x911E,0x9120,0x9125,0x9122,0x9123,0x9127,0x9129, -0x912E,0x912F,0x9131,0x9134,0x9136,0x9137,0x9139,0x913A, -0x913C,0x913D,0x9143,0x9147,0x9148,0x914F,0x9153,0x9157, -0x9159,0x915A,0x915B,0x9161,0x9164,0x9167,0x916D,0x9174, -0x9179,0x917A,0x917B,0x9181,0x9183,0x9185,0x9186,0x918A, -0x918E,0x9191,0x9193,0x9194,0x9195,0x9198,0x919E,0x91A1, -0x91A6,0x91A8,0x91AC,0x91AD,0x91AE,0x91B0,0x91B1,0x91B2, -0x91B3,0x91B6,0x91BB,0x91BC,0x91BD,0x91BF}; - -/* page 59 0x6321-0x637E */ -static uint16 tab_jisx0212_uni59[]={ -0x91C2,0x91C3,0x91C5,0x91D3,0x91D4,0x91D7,0x91D9,0x91DA, -0x91DE,0x91E4,0x91E5,0x91E9,0x91EA,0x91EC,0x91ED,0x91EE, -0x91EF,0x91F0,0x91F1,0x91F7,0x91F9,0x91FB,0x91FD,0x9200, -0x9201,0x9204,0x9205,0x9206,0x9207,0x9209,0x920A,0x920C, -0x9210,0x9212,0x9213,0x9216,0x9218,0x921C,0x921D,0x9223, -0x9224,0x9225,0x9226,0x9228,0x922E,0x922F,0x9230,0x9233, -0x9235,0x9236,0x9238,0x9239,0x923A,0x923C,0x923E,0x9240, -0x9242,0x9243,0x9246,0x9247,0x924A,0x924D,0x924E,0x924F, -0x9251,0x9258,0x9259,0x925C,0x925D,0x9260,0x9261,0x9265, -0x9267,0x9268,0x9269,0x926E,0x926F,0x9270,0x9275,0x9276, -0x9277,0x9278,0x9279,0x927B,0x927C,0x927D,0x927F,0x9288, -0x9289,0x928A,0x928D,0x928E,0x9292,0x9297}; - -/* page 60 0x6421-0x647E */ -static uint16 tab_jisx0212_uni60[]={ -0x9299,0x929F,0x92A0,0x92A4,0x92A5,0x92A7,0x92A8,0x92AB, -0x92AF,0x92B2,0x92B6,0x92B8,0x92BA,0x92BB,0x92BC,0x92BD, -0x92BF,0x92C0,0x92C1,0x92C2,0x92C3,0x92C5,0x92C6,0x92C7, -0x92C8,0x92CB,0x92CC,0x92CD,0x92CE,0x92D0,0x92D3,0x92D5, -0x92D7,0x92D8,0x92D9,0x92DC,0x92DD,0x92DF,0x92E0,0x92E1, -0x92E3,0x92E5,0x92E7,0x92E8,0x92EC,0x92EE,0x92F0,0x92F9, -0x92FB,0x92FF,0x9300,0x9302,0x9308,0x930D,0x9311,0x9314, -0x9315,0x931C,0x931D,0x931E,0x931F,0x9321,0x9324,0x9325, -0x9327,0x9329,0x932A,0x9333,0x9334,0x9336,0x9337,0x9347, -0x9348,0x9349,0x9350,0x9351,0x9352,0x9355,0x9357,0x9358, -0x935A,0x935E,0x9364,0x9365,0x9367,0x9369,0x936A,0x936D, -0x936F,0x9370,0x9371,0x9373,0x9374,0x9376}; - -/* page 61 0x6521-0x657E */ -static uint16 tab_jisx0212_uni61[]={ -0x937A,0x937D,0x937F,0x9380,0x9381,0x9382,0x9388,0x938A, -0x938B,0x938D,0x938F,0x9392,0x9395,0x9398,0x939B,0x939E, -0x93A1,0x93A3,0x93A4,0x93A6,0x93A8,0x93AB,0x93B4,0x93B5, -0x93B6,0x93BA,0x93A9,0x93C1,0x93C4,0x93C5,0x93C6,0x93C7, -0x93C9,0x93CA,0x93CB,0x93CC,0x93CD,0x93D3,0x93D9,0x93DC, -0x93DE,0x93DF,0x93E2,0x93E6,0x93E7,0x93F9,0x93F7,0x93F8, -0x93FA,0x93FB,0x93FD,0x9401,0x9402,0x9404,0x9408,0x9409, -0x940D,0x940E,0x940F,0x9415,0x9416,0x9417,0x941F,0x942E, -0x942F,0x9431,0x9432,0x9433,0x9434,0x943B,0x943F,0x943D, -0x9443,0x9445,0x9448,0x944A,0x944C,0x9455,0x9459,0x945C, -0x945F,0x9461,0x9463,0x9468,0x946B,0x946D,0x946E,0x946F, -0x9471,0x9472,0x9484,0x9483,0x9578,0x9579}; - -/* page 62 0x6621-0x667E */ -static uint16 tab_jisx0212_uni62[]={ -0x957E,0x9584,0x9588,0x958C,0x958D,0x958E,0x959D,0x959E, -0x959F,0x95A1,0x95A6,0x95A9,0x95AB,0x95AC,0x95B4,0x95B6, -0x95BA,0x95BD,0x95BF,0x95C6,0x95C8,0x95C9,0x95CB,0x95D0, -0x95D1,0x95D2,0x95D3,0x95D9,0x95DA,0x95DD,0x95DE,0x95DF, -0x95E0,0x95E4,0x95E6,0x961D,0x961E,0x9622,0x9624,0x9625, -0x9626,0x962C,0x9631,0x9633,0x9637,0x9638,0x9639,0x963A, -0x963C,0x963D,0x9641,0x9652,0x9654,0x9656,0x9657,0x9658, -0x9661,0x966E,0x9674,0x967B,0x967C,0x967E,0x967F,0x9681, -0x9682,0x9683,0x9684,0x9689,0x9691,0x9696,0x969A,0x969D, -0x969F,0x96A4,0x96A5,0x96A6,0x96A9,0x96AE,0x96AF,0x96B3, -0x96BA,0x96CA,0x96D2,0x5DB2,0x96D8,0x96DA,0x96DD,0x96DE, -0x96DF,0x96E9,0x96EF,0x96F1,0x96FA,0x9702}; - -/* page 63 0x6721-0x677E */ -static uint16 tab_jisx0212_uni63[]={ -0x9703,0x9705,0x9709,0x971A,0x971B,0x971D,0x9721,0x9722, -0x9723,0x9728,0x9731,0x9733,0x9741,0x9743,0x974A,0x974E, -0x974F,0x9755,0x9757,0x9758,0x975A,0x975B,0x9763,0x9767, -0x976A,0x976E,0x9773,0x9776,0x9777,0x9778,0x977B,0x977D, -0x977F,0x9780,0x9789,0x9795,0x9796,0x9797,0x9799,0x979A, -0x979E,0x979F,0x97A2,0x97AC,0x97AE,0x97B1,0x97B2,0x97B5, -0x97B6,0x97B8,0x97B9,0x97BA,0x97BC,0x97BE,0x97BF,0x97C1, -0x97C4,0x97C5,0x97C7,0x97C9,0x97CA,0x97CC,0x97CD,0x97CE, -0x97D0,0x97D1,0x97D4,0x97D7,0x97D8,0x97D9,0x97DD,0x97DE, -0x97E0,0x97DB,0x97E1,0x97E4,0x97EF,0x97F1,0x97F4,0x97F7, -0x97F8,0x97FA,0x9807,0x980A,0x9819,0x980D,0x980E,0x9814, -0x9816,0x981C,0x981E,0x9820,0x9823,0x9826}; - -/* page 64 0x6821-0x687E */ -static uint16 tab_jisx0212_uni64[]={ -0x982B,0x982E,0x982F,0x9830,0x9832,0x9833,0x9835,0x9825, -0x983E,0x9844,0x9847,0x984A,0x9851,0x9852,0x9853,0x9856, -0x9857,0x9859,0x985A,0x9862,0x9863,0x9865,0x9866,0x986A, -0x986C,0x98AB,0x98AD,0x98AE,0x98B0,0x98B4,0x98B7,0x98B8, -0x98BA,0x98BB,0x98BF,0x98C2,0x98C5,0x98C8,0x98CC,0x98E1, -0x98E3,0x98E5,0x98E6,0x98E7,0x98EA,0x98F3,0x98F6,0x9902, -0x9907,0x9908,0x9911,0x9915,0x9916,0x9917,0x991A,0x991B, -0x991C,0x991F,0x9922,0x9926,0x9927,0x992B,0x9931,0x9932, -0x9933,0x9934,0x9935,0x9939,0x993A,0x993B,0x993C,0x9940, -0x9941,0x9946,0x9947,0x9948,0x994D,0x994E,0x9954,0x9958, -0x9959,0x995B,0x995C,0x995E,0x995F,0x9960,0x999B,0x999D, -0x999F,0x99A6,0x99B0,0x99B1,0x99B2,0x99B5}; - -/* page 65 0x6921-0x697E */ -static uint16 tab_jisx0212_uni65[]={ -0x99B9,0x99BA,0x99BD,0x99BF,0x99C3,0x99C9,0x99D3,0x99D4, -0x99D9,0x99DA,0x99DC,0x99DE,0x99E7,0x99EA,0x99EB,0x99EC, -0x99F0,0x99F4,0x99F5,0x99F9,0x99FD,0x99FE,0x9A02,0x9A03, -0x9A04,0x9A0B,0x9A0C,0x9A10,0x9A11,0x9A16,0x9A1E,0x9A20, -0x9A22,0x9A23,0x9A24,0x9A27,0x9A2D,0x9A2E,0x9A33,0x9A35, -0x9A36,0x9A38,0x9A47,0x9A41,0x9A44,0x9A4A,0x9A4B,0x9A4C, -0x9A4E,0x9A51,0x9A54,0x9A56,0x9A5D,0x9AAA,0x9AAC,0x9AAE, -0x9AAF,0x9AB2,0x9AB4,0x9AB5,0x9AB6,0x9AB9,0x9ABB,0x9ABE, -0x9ABF,0x9AC1,0x9AC3,0x9AC6,0x9AC8,0x9ACE,0x9AD0,0x9AD2, -0x9AD5,0x9AD6,0x9AD7,0x9ADB,0x9ADC,0x9AE0,0x9AE4,0x9AE5, -0x9AE7,0x9AE9,0x9AEC,0x9AF2,0x9AF3,0x9AF5,0x9AF9,0x9AFA, -0x9AFD,0x9AFF,0x9B00,0x9B01,0x9B02,0x9B03}; - -/* page 66 0x6A21-0x6A7E */ -static uint16 tab_jisx0212_uni66[]={ -0x9B04,0x9B05,0x9B08,0x9B09,0x9B0B,0x9B0C,0x9B0D,0x9B0E, -0x9B10,0x9B12,0x9B16,0x9B19,0x9B1B,0x9B1C,0x9B20,0x9B26, -0x9B2B,0x9B2D,0x9B33,0x9B34,0x9B35,0x9B37,0x9B39,0x9B3A, -0x9B3D,0x9B48,0x9B4B,0x9B4C,0x9B55,0x9B56,0x9B57,0x9B5B, -0x9B5E,0x9B61,0x9B63,0x9B65,0x9B66,0x9B68,0x9B6A,0x9B6B, -0x9B6C,0x9B6D,0x9B6E,0x9B73,0x9B75,0x9B77,0x9B78,0x9B79, -0x9B7F,0x9B80,0x9B84,0x9B85,0x9B86,0x9B87,0x9B89,0x9B8A, -0x9B8B,0x9B8D,0x9B8F,0x9B90,0x9B94,0x9B9A,0x9B9D,0x9B9E, -0x9BA6,0x9BA7,0x9BA9,0x9BAC,0x9BB0,0x9BB1,0x9BB2,0x9BB7, -0x9BB8,0x9BBB,0x9BBC,0x9BBE,0x9BBF,0x9BC1,0x9BC7,0x9BC8, -0x9BCE,0x9BD0,0x9BD7,0x9BD8,0x9BDD,0x9BDF,0x9BE5,0x9BE7, -0x9BEA,0x9BEB,0x9BEF,0x9BF3,0x9BF7,0x9BF8}; - -/* page 67 0x6B21-0x6B7E */ -static uint16 tab_jisx0212_uni67[]={ -0x9BF9,0x9BFA,0x9BFD,0x9BFF,0x9C00,0x9C02,0x9C0B,0x9C0F, -0x9C11,0x9C16,0x9C18,0x9C19,0x9C1A,0x9C1C,0x9C1E,0x9C22, -0x9C23,0x9C26,0x9C27,0x9C28,0x9C29,0x9C2A,0x9C31,0x9C35, -0x9C36,0x9C37,0x9C3D,0x9C41,0x9C43,0x9C44,0x9C45,0x9C49, -0x9C4A,0x9C4E,0x9C4F,0x9C50,0x9C53,0x9C54,0x9C56,0x9C58, -0x9C5B,0x9C5D,0x9C5E,0x9C5F,0x9C63,0x9C69,0x9C6A,0x9C5C, -0x9C6B,0x9C68,0x9C6E,0x9C70,0x9C72,0x9C75,0x9C77,0x9C7B, -0x9CE6,0x9CF2,0x9CF7,0x9CF9,0x9D0B,0x9D02,0x9D11,0x9D17, -0x9D18,0x9D1C,0x9D1D,0x9D1E,0x9D2F,0x9D30,0x9D32,0x9D33, -0x9D34,0x9D3A,0x9D3C,0x9D45,0x9D3D,0x9D42,0x9D43,0x9D47, -0x9D4A,0x9D53,0x9D54,0x9D5F,0x9D63,0x9D62,0x9D65,0x9D69, -0x9D6A,0x9D6B,0x9D70,0x9D76,0x9D77,0x9D7B}; - -/* page 68 0x6C21-0x6C7E */ -static uint16 tab_jisx0212_uni68[]={ -0x9D7C,0x9D7E,0x9D83,0x9D84,0x9D86,0x9D8A,0x9D8D,0x9D8E, -0x9D92,0x9D93,0x9D95,0x9D96,0x9D97,0x9D98,0x9DA1,0x9DAA, -0x9DAC,0x9DAE,0x9DB1,0x9DB5,0x9DB9,0x9DBC,0x9DBF,0x9DC3, -0x9DC7,0x9DC9,0x9DCA,0x9DD4,0x9DD5,0x9DD6,0x9DD7,0x9DDA, -0x9DDE,0x9DDF,0x9DE0,0x9DE5,0x9DE7,0x9DE9,0x9DEB,0x9DEE, -0x9DF0,0x9DF3,0x9DF4,0x9DFE,0x9E0A,0x9E02,0x9E07,0x9E0E, -0x9E10,0x9E11,0x9E12,0x9E15,0x9E16,0x9E19,0x9E1C,0x9E1D, -0x9E7A,0x9E7B,0x9E7C,0x9E80,0x9E82,0x9E83,0x9E84,0x9E85, -0x9E87,0x9E8E,0x9E8F,0x9E96,0x9E98,0x9E9B,0x9E9E,0x9EA4, -0x9EA8,0x9EAC,0x9EAE,0x9EAF,0x9EB0,0x9EB3,0x9EB4,0x9EB5, -0x9EC6,0x9EC8,0x9ECB,0x9ED5,0x9EDF,0x9EE4,0x9EE7,0x9EEC, -0x9EED,0x9EEE,0x9EF0,0x9EF1,0x9EF2,0x9EF5}; - -/* page 69 0x6D21-0x6D63 */ -static uint16 tab_jisx0212_uni69[]={ -0x9EF8,0x9EFF,0x9F02,0x9F03,0x9F09,0x9F0F,0x9F10,0x9F11, -0x9F12,0x9F14,0x9F16,0x9F17,0x9F19,0x9F1A,0x9F1B,0x9F1F, -0x9F22,0x9F26,0x9F2A,0x9F2B,0x9F2F,0x9F31,0x9F32,0x9F34, -0x9F37,0x9F39,0x9F3A,0x9F3C,0x9F3D,0x9F3F,0x9F41,0x9F43, -0x9F44,0x9F45,0x9F46,0x9F47,0x9F53,0x9F55,0x9F56,0x9F57, -0x9F58,0x9F5A,0x9F5D,0x9F5E,0x9F68,0x9F69,0x9F6D,0x9F6E, -0x9F6F,0x9F70,0x9F71,0x9F73,0x9F75,0x9F7A,0x9F7D,0x9F8F, -0x9F90,0x9F91,0x9F92,0x9F94,0x9F96,0x9F97,0x9F9E,0x9FA1, -0x9FA2,0x9FA3,0x9FA5}; - -/* page 70 0x7371-0x737E IBM Kanji and Nonkanji */ -static uint16 tab_jisx0212_uni70[]={ - 0, 0,0x2170,0x2171,0x2172,0x2173,0x2174,0x2175, -0x2176,0x2177,0x2178,0x2179,0x2160,0x2161}; - -/* page 71 0x7421-0x747E IBM Kanji and Nonkanji*/ -static uint16 tab_jisx0212_uni71[]={ -0x2162,0x2163,0x2164,0x2165,0x2166,0x2167,0x2168,0x2169, -0xFF07,0xFF02,0x3231,0x2116,0x2121,0x70BB,0x4EFC,0x50F4, -0x51EC,0x5307,0x5324,0xFA0E,0x548A,0x5759,0xFA0F,0xFA10, -0x589E,0x5BEC,0x5CF5,0x5D53,0xFA11,0x5FB7,0x6085,0x6120, -0x654E,0x663B,0x6665,0xFA12,0xF929,0x6801,0xFA13,0xFA14, -0x6A6B,0x6AE2,0x6DF8,0x6DF2,0x7028,0xFA15,0xFA16,0x7501, -0x7682,0x769E,0xFA17,0x7930,0xFA18,0xFA19,0xFA1A,0xFA1B, -0x7AE7,0xFA1C,0xFA1D,0x7DA0,0x7DD6,0xFA1E,0x8362,0xFA1F, -0x85B0,0xFA20,0xFA21,0x8807,0xFA22,0x8B7F,0x8CF4,0x8D76, -0xFA23,0xFA24,0xFA25,0x90DE,0xFA26,0x9115,0xFA27,0xFA28, -0x9592,0xF9DC,0xFA29,0x973B,0x974D,0x9751,0xFA2A,0xFA2B, -0xFA2C,0x999E,0x9AD9,0x9B72,0xFA2D,0x9ED1}; - -static int -my_jisx0212_uni_onechar(int code){ - if ((code>=0x222F)&&(code<=0x2244)) - return(tab_jisx0212_uni0[code-0x222F]); - if ((code>=0x226B)&&(code<=0x2271)) - return(tab_jisx0212_uni1[code-0x226B]); - if ((code>=0x2661)&&(code<=0x267C)) - return(tab_jisx0212_uni2[code-0x2661]); - if ((code>=0x2742)&&(code<=0x274E)) - return(tab_jisx0212_uni3[code-0x2742]); - if ((code>=0x2772)&&(code<=0x277E)) - return(tab_jisx0212_uni4[code-0x2772]); - if ((code>=0x2921)&&(code<=0x2950)) - return(tab_jisx0212_uni5[code-0x2921]); - if ((code>=0x2A21)&&(code<=0x2A77)) - return(tab_jisx0212_uni6[code-0x2A21]); - if ((code>=0x2B21)&&(code<=0x2B77)) - return(tab_jisx0212_uni7[code-0x2B21]); - if ((code>=0x3021)&&(code<=0x307E)) - return(tab_jisx0212_uni8[code-0x3021]); - if ((code>=0x3121)&&(code<=0x317E)) - return(tab_jisx0212_uni9[code-0x3121]); - if ((code>=0x3221)&&(code<=0x327E)) - return(tab_jisx0212_uni10[code-0x3221]); - if ((code>=0x3321)&&(code<=0x337E)) - return(tab_jisx0212_uni11[code-0x3321]); - if ((code>=0x3421)&&(code<=0x347E)) - return(tab_jisx0212_uni12[code-0x3421]); - if ((code>=0x3521)&&(code<=0x357E)) - return(tab_jisx0212_uni13[code-0x3521]); - if ((code>=0x3621)&&(code<=0x367E)) - return(tab_jisx0212_uni14[code-0x3621]); - if ((code>=0x3721)&&(code<=0x377E)) - return(tab_jisx0212_uni15[code-0x3721]); - if ((code>=0x3821)&&(code<=0x387E)) - return(tab_jisx0212_uni16[code-0x3821]); - if ((code>=0x3921)&&(code<=0x397E)) - return(tab_jisx0212_uni17[code-0x3921]); - if ((code>=0x3A21)&&(code<=0x3A7E)) - return(tab_jisx0212_uni18[code-0x3A21]); - if ((code>=0x3B21)&&(code<=0x3B7E)) - return(tab_jisx0212_uni19[code-0x3B21]); - if ((code>=0x3C21)&&(code<=0x3C7E)) - return(tab_jisx0212_uni20[code-0x3C21]); - if ((code>=0x3D21)&&(code<=0x3D7E)) - return(tab_jisx0212_uni21[code-0x3D21]); - if ((code>=0x3E21)&&(code<=0x3E7E)) - return(tab_jisx0212_uni22[code-0x3E21]); - if ((code>=0x3F21)&&(code<=0x3F7E)) - return(tab_jisx0212_uni23[code-0x3F21]); - if ((code>=0x4021)&&(code<=0x407E)) - return(tab_jisx0212_uni24[code-0x4021]); - if ((code>=0x4121)&&(code<=0x417E)) - return(tab_jisx0212_uni25[code-0x4121]); - if ((code>=0x4221)&&(code<=0x427E)) - return(tab_jisx0212_uni26[code-0x4221]); - if ((code>=0x4321)&&(code<=0x437E)) - return(tab_jisx0212_uni27[code-0x4321]); - if ((code>=0x4421)&&(code<=0x447E)) - return(tab_jisx0212_uni28[code-0x4421]); - if ((code>=0x4521)&&(code<=0x457E)) - return(tab_jisx0212_uni29[code-0x4521]); - if ((code>=0x4621)&&(code<=0x467E)) - return(tab_jisx0212_uni30[code-0x4621]); - if ((code>=0x4721)&&(code<=0x477E)) - return(tab_jisx0212_uni31[code-0x4721]); - if ((code>=0x4821)&&(code<=0x487E)) - return(tab_jisx0212_uni32[code-0x4821]); - if ((code>=0x4921)&&(code<=0x497E)) - return(tab_jisx0212_uni33[code-0x4921]); - if ((code>=0x4A21)&&(code<=0x4A7E)) - return(tab_jisx0212_uni34[code-0x4A21]); - if ((code>=0x4B21)&&(code<=0x4B7E)) - return(tab_jisx0212_uni35[code-0x4B21]); - if ((code>=0x4C21)&&(code<=0x4C7E)) - return(tab_jisx0212_uni36[code-0x4C21]); - if ((code>=0x4D21)&&(code<=0x4D7E)) - return(tab_jisx0212_uni37[code-0x4D21]); - if ((code>=0x4E21)&&(code<=0x4E7E)) - return(tab_jisx0212_uni38[code-0x4E21]); - if ((code>=0x4F21)&&(code<=0x4F7E)) - return(tab_jisx0212_uni39[code-0x4F21]); - if ((code>=0x5021)&&(code<=0x507E)) - return(tab_jisx0212_uni40[code-0x5021]); - if ((code>=0x5121)&&(code<=0x517E)) - return(tab_jisx0212_uni41[code-0x5121]); - if ((code>=0x5221)&&(code<=0x527E)) - return(tab_jisx0212_uni42[code-0x5221]); - if ((code>=0x5321)&&(code<=0x537E)) - return(tab_jisx0212_uni43[code-0x5321]); - if ((code>=0x5421)&&(code<=0x547E)) - return(tab_jisx0212_uni44[code-0x5421]); - if ((code>=0x5521)&&(code<=0x557E)) - return(tab_jisx0212_uni45[code-0x5521]); - if ((code>=0x5621)&&(code<=0x567E)) - return(tab_jisx0212_uni46[code-0x5621]); - if ((code>=0x5721)&&(code<=0x577E)) - return(tab_jisx0212_uni47[code-0x5721]); - if ((code>=0x5821)&&(code<=0x587E)) - return(tab_jisx0212_uni48[code-0x5821]); - if ((code>=0x5921)&&(code<=0x597E)) - return(tab_jisx0212_uni49[code-0x5921]); - if ((code>=0x5A21)&&(code<=0x5A7E)) - return(tab_jisx0212_uni50[code-0x5A21]); - if ((code>=0x5B21)&&(code<=0x5B7E)) - return(tab_jisx0212_uni51[code-0x5B21]); - if ((code>=0x5C21)&&(code<=0x5C7E)) - return(tab_jisx0212_uni52[code-0x5C21]); - if ((code>=0x5D21)&&(code<=0x5D7E)) - return(tab_jisx0212_uni53[code-0x5D21]); - if ((code>=0x5E21)&&(code<=0x5E7E)) - return(tab_jisx0212_uni54[code-0x5E21]); - if ((code>=0x5F21)&&(code<=0x5F7E)) - return(tab_jisx0212_uni55[code-0x5F21]); - if ((code>=0x6021)&&(code<=0x607E)) - return(tab_jisx0212_uni56[code-0x6021]); - if ((code>=0x6121)&&(code<=0x617E)) - return(tab_jisx0212_uni57[code-0x6121]); - if ((code>=0x6221)&&(code<=0x627E)) - return(tab_jisx0212_uni58[code-0x6221]); - if ((code>=0x6321)&&(code<=0x637E)) - return(tab_jisx0212_uni59[code-0x6321]); - if ((code>=0x6421)&&(code<=0x647E)) - return(tab_jisx0212_uni60[code-0x6421]); - if ((code>=0x6521)&&(code<=0x657E)) - return(tab_jisx0212_uni61[code-0x6521]); - if ((code>=0x6621)&&(code<=0x667E)) - return(tab_jisx0212_uni62[code-0x6621]); - if ((code>=0x6721)&&(code<=0x677E)) - return(tab_jisx0212_uni63[code-0x6721]); - if ((code>=0x6821)&&(code<=0x687E)) - return(tab_jisx0212_uni64[code-0x6821]); - if ((code>=0x6921)&&(code<=0x697E)) - return(tab_jisx0212_uni65[code-0x6921]); - if ((code>=0x6A21)&&(code<=0x6A7E)) - return(tab_jisx0212_uni66[code-0x6A21]); - if ((code>=0x6B21)&&(code<=0x6B7E)) - return(tab_jisx0212_uni67[code-0x6B21]); - if ((code>=0x6C21)&&(code<=0x6C7E)) - return(tab_jisx0212_uni68[code-0x6C21]); - if ((code>=0x6D21)&&(code<=0x6D63)) - return(tab_jisx0212_uni69[code-0x6D21]); - if ((code>=0x7371)&&(code<=0x737E)) - return(tab_jisx0212_uni70[code-0x7371]); - if ((code>=0x7421)&&(code<=0x747E)) - return(tab_jisx0212_uni71[code-0x7421]); - return(0); -} - -/* - EUC-JP encoding subcomponents: - [x00-x7F] # ASCII/JIS-Roman (one-byte/character) - [x8E][xA0-xDF] # half-width katakana (two bytes/char) - [x8F][xA1-xFE][xA1-xFE] # JIS X 0212-1990 (three bytes/char) - [xA1-xFE][xA1-xFE] # JIS X 0208:1997 (two bytes/char) -*/ - -static -size_t my_well_formed_len_eucjpms(CHARSET_INFO *cs __attribute__((unused)), - const char *beg, const char *end, size_t pos, - int *error) -{ - const uchar *b= (uchar *) beg; - *error=0; - - for ( ; pos && b < (uchar*) end; pos--, b++) - { - char *chbeg; - uint ch= *b; - - if (ch <= 0x7F) /* one byte */ - continue; - - chbeg= (char *) b++; - if (b >= (uchar *) end) /* need more bytes */ - return (uint) (chbeg - beg); /* unexpected EOL */ - - if (ch == 0x8E) /* [x8E][xA0-xDF] */ - { - if (*b >= 0xA0 && *b <= 0xDF) - continue; - *error=1; - return (uint) (chbeg - beg); /* invalid sequence */ - } - - if (ch == 0x8F) /* [x8F][xA1-xFE][xA1-xFE] */ - { - ch= *b++; - if (b >= (uchar*) end) - { - *error= 1; - return (uint)(chbeg - beg); /* unexpected EOL */ - } - } - - if (ch >= 0xA1 && ch <= 0xFE && - *b >= 0xA1 && *b <= 0xFE) /* [xA1-xFE][xA1-xFE] */ - continue; - *error=1; - return (size_t) (chbeg - beg); /* invalid sequence */ - } - return (size_t) (b - (uchar *) beg); -} - - -static -size_t my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)), - const char *str, const char *str_end) -{ - size_t clen; - const uchar *b= (const uchar *) str; - const uchar *e= (const uchar *) str_end; - - for (clen= 0; b < e; ) - { - if (*b == 0x8E) - { - clen++; - b+= 2; - } - else if (*b == 0x8F) - { - clen+= 2; - b+= 3; - } - else if (*b & 0x80) - { - clen+= 2; - b+= 2; - } - else - { - clen++; - b++; - } - } - return clen; -} - -static int -my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e) -{ - int c1,c2,c3; - - if (s >= e) - return MY_CS_TOOSMALL; - - c1=s[0]; - - /* Ascii code set */ - if (c1<=0x7F) - { - *pwc=c1; - return 1; - } - - if (s+2>e) - return MY_CS_TOOSMALL2; - - c2=s[1]; - - - /* JIS X 0208 code set */ - if (c1>=0xA1 && c1<=0xFE) - { - if (c2 < 0xA1 || c2 >0xFE) - return MY_CS_ILSEQ; - - if (c1 < 0xF5) - { - pwc[0]=my_jisx0208_uni_onechar( ((c1-0x80) << 8) + (c2-0x80)); - if (!pwc[0]) - return -2; - } - else - { - /* User defined range */ - pwc[0]=0xE000 + 94*(c1-0xF5) +(c2-0xA1); - } - return 2; - } - - /* JIS X 0201 code set (Half Width Tatakana) */ - if (c1==0x8E) - { - int ret; - - if (c2<0xA1 || c2>0xDF) - return MY_CS_ILSEQ; - - ret = my_mb_wc_jisx0201(cs,pwc,s+1,e); - if (ret!=1) - return -2; - return 2; - } - - /* JIS X 0212 code set */ - if (c1==0x8F) - { - if (c2<0xA1 || c2>=0xFF) - return MY_CS_ILSEQ; - - if (s+3>e) - return MY_CS_TOOSMALL3; - - c3=s[2]; - if (c3 < 0xA1 || c3>=0xFF) - return MY_CS_ILSEQ; - - if (c2<0xF5) - { - pwc[0]=my_jisx0212_uni_onechar((c2-0x80)*256 + (c3-0x80)); - if (!pwc[0]) - return -3; - } - else - { - /* User defined range */ - pwc[0]= 0xE3AC + 94*(c2-0xF5) + (c3-0xA1); - } - return 3; - } - - return MY_CS_ILSEQ; -} - -static int -my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, uchar *s, uchar *e) -{ - uchar c1; - int jp; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((int) wc < 0x80) - { - *s= (uchar) wc; - return 1; - } - - if ((jp=my_uni_jisx0208_onechar(wc))) - { - if (s+2>e) - return MY_CS_TOOSMALL2; - - jp+=0x8080; - s[0]=jp>>8; - s[1]=jp&0xFF; - return 2; - } - - /* Half width Katakana */ - if (my_wc_mb_jisx0201(c,wc,s,e) == 1) - { - if (s+2>e) - return MY_CS_TOOSMALL2; - s[1]= s[0]; - s[0]= 0x8E; - return 2; - } - - - if ((jp=my_uni_jisx0212_onechar(wc))) - { - if (s+3>e) - return MY_CS_TOOSMALL3; - - jp+=0x8080; - s[0]=0x8F; - s[1]=jp>>8; - s[2]=jp&0xFF; - return 3; - } - - - /* User defined range */ - if (wc>=0xE000 && wc<0xE3AC) - { - if (s+2>e) - return MY_CS_TOOSMALL2; - - c1=((unsigned)(wc-0xE000)/94)+0xF5; - s[0]=c1; - c1=((unsigned)(wc-0xE000)%94)+0xa1; - s[1]=c1; - return 2; - } - - - /* User defined range */ - if (wc>=0xE3AC && wc<0xE758) - { - if (s+3>e) - return MY_CS_TOOSMALL3; - - s[0]=0x8F; - c1=((unsigned)(wc-0xE3AC)/94)+0xF5; - s[1]=c1; - c1=((unsigned)(wc-0xE3AC)%94)+0xa1; - s[2]=c1; - return 3; - } - - return MY_CS_ILUNI; -} - - -static MY_COLLATION_HANDLER my_collation_ci_handler = -{ - NULL, /* init */ - my_strnncoll_simple,/* strnncoll */ - my_strnncollsp_simple, - my_strnxfrm_mb, /* strnxfrm */ - my_strnxfrmlen_simple, - my_like_range_mb, /* like_range */ - my_wildcmp_mb, /* wildcmp */ - my_strcasecmp_mb, - my_instr_mb, - my_hash_sort_simple, - my_propagate_simple -}; - - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - ismbchar_eucjpms, - mbcharlen_eucjpms, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_eucjpms, - my_lengthsp_8bit, - my_numcells_eucjp, - my_mb_wc_euc_jp, /* mb_wc */ - my_wc_mb_euc_jp, /* wc_mb */ - my_mb_ctype_mb, - my_caseup_str_mb, - my_casedn_str_mb, - my_caseup_mb, - my_casedn_mb, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - - -CHARSET_INFO my_charset_eucjpms_japanese_ci= -{ - 97,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY, /* state */ - "eucjpms", /* cs name */ - "eucjpms_japanese_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_eucjpms, - to_lower_eucjpms, - to_upper_eucjpms, - sort_order_eucjpms, - NULL, /* sort_order_big*/ - NULL, /* contractions */ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_ci_handler -}; - - -CHARSET_INFO my_charset_eucjpms_bin= -{ - 98,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT, /* state */ - "eucjpms", /* cs name */ - "eucjpms_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_eucjpms, - to_lower_eucjpms, - to_upper_eucjpms, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_mb_bin_handler -}; - - -#endif diff --git a/externals/mysql/strings/ctype-extra.c b/externals/mysql/strings/ctype-extra.c deleted file mode 100644 index ae7af0d50b..0000000000 --- a/externals/mysql/strings/ctype-extra.c +++ /dev/null @@ -1,8773 +0,0 @@ -/* - This file was generated by the conf_to_src utility. Do not edit it directly, - edit the XML definitions in sql/share/charsets/ instead. - - To re-generate, run the following in the strings/ directory: - ./conf_to_src ../sql/share/charsets/ > FILE -*/ - -/* Copyright (C) 2000-2007 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -#include -#include - -#ifdef HAVE_CHARSET_dec8 -uchar ctype_dec8_swedish_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_dec8_swedish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_dec8_swedish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x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,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_dec8_swedish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0x41,0x41,0x41,0x41,0x5C,0x5B,0x5C,0x43,0x45,0x45,0x45,0x45,0x49,0x49,0x49,0x49, -0x44,0x4E,0x4F,0x4F,0x4F,0x4F,0x5D,0xD7,0xD8,0x55,0x55,0x55,0x59,0x59,0xDE,0xDF, -0x41,0x41,0x41,0x41,0x5C,0x5B,0x5C,0x43,0x45,0x45,0x45,0x45,0x49,0x49,0x49,0x49, -0x44,0x4E,0x4F,0x4F,0x4F,0x4F,0x5D,0xF7,0xD8,0x55,0x55,0x55,0x59,0x59,0xDE,0xFF -}; - -uint16 to_uni_dec8_swedish_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x00A1,0x00A2,0x00A3,0x0000,0x00A5,0x0000,0x00A7, -0x00A4,0x00A9,0x00AA,0x00AB,0x0000,0x0000,0x0000,0x0000, -0x00B0,0x00B1,0x00B2,0x00B3,0x0000,0x00B5,0x00B6,0x00B7, -0x0000,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x0000,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x0000,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x0152, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0178,0x0000,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x0000,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x0153, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FF,0x0000,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_cp850 -uchar ctype_cp850_general_ci[] = { -0x00, -0x20,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x30,0x30, -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x30,0x30,0x30,0x30,0x30, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x30, -0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01, -0x01,0x02,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x02,0x10,0x01,0x10,0x10, -0x02,0x02,0x02,0x02,0x02,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x02,0x01,0x01,0x01,0x01,0x02,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x10, -0x01,0x02,0x01,0x01,0x02,0x01,0x10,0x02,0x01,0x01,0x01,0x01,0x02,0x01,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20 -}; - -uchar to_lower_cp850_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x87,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x84,0x86, -0x82,0x91,0x91,0x93,0x94,0x95,0x96,0x97,0x98,0x94,0x81,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA4,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp850_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A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F5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_cp850_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x51,0x53,0x55,0x59,0x63,0x65,0x67,0x69,0x74,0x76,0x78,0x7A,0x7C,0x80, -0x8E,0x90,0x92,0x94,0x97,0x99,0xA3,0xA5,0xA7,0xA9,0xAE,0xB1,0xB2,0xB3,0xB4,0xB5, -0xB6,0x41,0x51,0x53,0x55,0x59,0x63,0x65,0x67,0x69,0x74,0x76,0x78,0x7A,0x7C,0x80, -0x8E,0x90,0x92,0x94,0x97,0x99,0xA3,0xA5,0xA7,0xA9,0xAE,0xB7,0xB8,0xB9,0xBA,0xBB, -0x54,0xA1,0x5D,0x47,0x4B,0x43,0x4D,0x54,0x5F,0x61,0x5B,0x71,0x6F,0x6B,0x4B,0x4D, -0x5D,0x4F,0x4F,0x86,0x8A,0x82,0x9F,0x9B,0xAD,0x8A,0xA1,0x8C,0xE3,0x8C,0xBD,0xBE, -0x45,0x6D,0x84,0x9D,0x7E,0x7E,0xEA,0xFA,0xFF,0xEE,0xEC,0xFD,0xFC,0xCE,0xEB,0xFB, -0xDC,0xDD,0xDE,0xC3,0xC9,0x45,0x47,0x43,0xE9,0xD5,0xCF,0xD1,0xD3,0xE2,0xE5,0xC5, -0xC6,0xCB,0xCA,0xC8,0xC2,0xCC,0x49,0x49,0xD2,0xD0,0xD7,0xD6,0xD4,0xCD,0xD8,0xE4, -0x57,0x57,0x5F,0x61,0x5B,0x73,0x6D,0x6F,0x71,0xC7,0xC4,0xDB,0xDA,0xE6,0x6B,0xD9, -0x84,0x96,0x86,0x82,0x88,0x88,0xF5,0xB0,0xB0,0x9D,0x9F,0x9B,0xAB,0xAB,0xEF,0xF4, -0xED,0xF1,0xC1,0xFE,0xF6,0xE7,0xBF,0xBC,0xF0,0xE8,0xF7,0xF9,0xF3,0xF2,0xDF,0xE0 -}; - -uint16 to_uni_cp850_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7, -0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5, -0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9, -0x00FF,0x00D6,0x00DC,0x00F8,0x00A3,0x00D8,0x00D7,0x0192, -0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA, -0x00BF,0x00AE,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB, -0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x00C0, -0x00A9,0x2563,0x2551,0x2557,0x255D,0x00A2,0x00A5,0x2510, -0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x00E3,0x00C3, -0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, -0x00F0,0x00D0,0x00CA,0x00CB,0x00C8,0x0131,0x00CD,0x00CE, -0x00CF,0x2518,0x250C,0x2588,0x2584,0x00A6,0x00CC,0x2580, -0x00D3,0x00DF,0x00D4,0x00D2,0x00F5,0x00D5,0x00B5,0x00FE, -0x00DE,0x00DA,0x00DB,0x00D9,0x00FD,0x00DD,0x00AF,0x00B4, -0x00AD,0x00B1,0x2017,0x00BE,0x00B6,0x00A7,0x00F7,0x00B8, -0x00B0,0x00A8,0x00B7,0x00B9,0x00B3,0x00B2,0x25A0,0x00A0 -}; - -#endif - -#ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_german1_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x10,0x00,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x01,0x00,0x01,0x00, -0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x02,0x00,0x02,0x01, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_latin1_german1_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin1_german1_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10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,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_latin1_german1_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x43,0x45,0x45,0x45,0x45,0x49,0x49,0x49,0x49, -0xD0,0x4E,0x4F,0x4F,0x4F,0x4F,0x4F,0xD7,0x4F,0x55,0x55,0x55,0x55,0x59,0xDE,0x53, -0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x43,0x45,0x45,0x45,0x45,0x49,0x49,0x49,0x49, -0xD0,0x4E,0x4F,0x4F,0x4F,0x4F,0x4F,0xF7,0x4F,0x55,0x55,0x55,0x55,0x59,0xDE,0xFF -}; - -uint16 to_uni_latin1_german1_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0081,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, -0x02C6,0x2030,0x0160,0x2039,0x0152,0x008D,0x017D,0x008F, -0x0090,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x02DC,0x2122,0x0161,0x203A,0x0153,0x009D,0x017E,0x0178, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF -}; - -#endif - -#ifdef HAVE_CHARSET_hp8 -uchar ctype_hp8_english_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x02,0x02, -0x01,0x10,0x10,0x01,0x02,0x10,0x10,0x02,0x01,0x10,0x01,0x01,0x01,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x20,0x20,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20 -}; - -uchar to_lower_hp8_english_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0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F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB1,0xB3,0xB4,0xB4,0xB6,0xB6,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xA2,0xA4,0xDF,0xAE,0xE0,0xDC,0xE7,0xED,0xA1,0xA3,0xE8,0xAD,0xD8,0xA5,0xDA,0xDB, -0xD0,0xA6,0xD2,0xD3,0xD0,0xE5,0xD2,0xD3,0xD8,0xE6,0xDA,0xDB,0xDC,0xA7,0xDE,0xDF, -0xE0,0xE1,0xE1,0xE3,0xE3,0xE5,0xE6,0xE7,0xE8,0xE9,0xE9,0xEB,0xEB,0xED,0xEE,0xEE, -0xF0,0xF0,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_hp8_english_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5C,0x5D,0x5B,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_hp8_english_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x00C0,0x00C2,0x00C8,0x00CA,0x00CB,0x00CE,0x00CF, -0x00B4,0x02CB,0x02C6,0x00A8,0x02DC,0x00D9,0x00DB,0x20A4, -0x00AF,0x00DD,0x00FD,0x00B0,0x00C7,0x00E7,0x00D1,0x00F1, -0x00A1,0x00BF,0x00A4,0x00A3,0x00A5,0x00A7,0x0192,0x00A2, -0x00E2,0x00EA,0x00F4,0x00FB,0x00E1,0x00E9,0x00F3,0x00FA, -0x00E0,0x00E8,0x00F2,0x00F9,0x00E4,0x00EB,0x00F6,0x00FC, -0x00C5,0x00EE,0x00D8,0x00C6,0x00E5,0x00ED,0x00F8,0x00E6, -0x00C4,0x00EC,0x00D6,0x00DC,0x00C9,0x00EF,0x00DF,0x00D4, -0x00C1,0x00C3,0x00E3,0x00D0,0x00F0,0x00CD,0x00CC,0x00D3, -0x00D2,0x00D5,0x00F5,0x0160,0x0161,0x00DA,0x0178,0x00FF, -0x00DE,0x00FE,0x00B7,0x00B5,0x00B6,0x00BE,0x2014,0x00BC, -0x00BD,0x00AA,0x00BA,0x00AB,0x25A0,0x00BB,0x00B1,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_koi8r -uchar ctype_koi8r_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 -}; - -uchar to_lower_koi8r_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF -}; - -uchar to_upper_koi8r_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xB3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_koi8r_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xE5,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE, -0xAF,0xB0,0xB1,0xE5,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD, -0xFE,0xDF,0xE0,0xF6,0xE3,0xE4,0xF4,0xE2,0xF5,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE, -0xEF,0xFF,0xF0,0xF1,0xF2,0xF3,0xE6,0xE1,0xFC,0xFB,0xE7,0xF8,0xFD,0xF9,0xF7,0xFA, -0xFE,0xDF,0xE0,0xF6,0xE3,0xE4,0xF4,0xE2,0xF5,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE, -0xEF,0xFF,0xF0,0xF1,0xF2,0xF3,0xE6,0xE1,0xFC,0xFB,0xE7,0xF8,0xFD,0xF9,0xF7,0xFA -}; - -uint16 to_uni_koi8r_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524, -0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590, -0x2591,0x2592,0x2593,0x2320,0x25A0,0x2219,0x221A,0x2248, -0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7, -0x2550,0x2551,0x2552,0x0451,0x2553,0x2554,0x2555,0x2556, -0x2557,0x2558,0x2559,0x255A,0x255B,0x255C,0x255D,0x255E, -0x255F,0x2560,0x2561,0x0401,0x2562,0x2563,0x2564,0x2565, -0x2566,0x2567,0x2568,0x2569,0x256A,0x256B,0x256C,0x00A9, -0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433, -0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, -0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432, -0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A, -0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413, -0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412, -0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A -}; - -#endif - -#ifdef HAVE_CHARSET_latin2 -uchar ctype_latin2_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x01,0x10,0x01,0x10,0x01,0x01,0x10,0x10,0x01,0x01,0x01,0x01,0x10,0x01,0x01, -0x10,0x02,0x10,0x02,0x10,0x02,0x02,0x10,0x10,0x02,0x02,0x02,0x02,0x10,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_latin2_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xB1,0xA2,0xB3,0xA4,0xB5,0xB6,0xA7,0xA8,0xB9,0xBA,0xBB,0xBC,0xAD,0xBE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin2_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11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D,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_latin2_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x44,0x45,0x48,0x49,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x53,0x54,0x56, -0x58,0x59,0x5A,0x5B,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x68,0x69,0x6A,0x6B,0x6C, -0x6D,0x41,0x44,0x45,0x48,0x49,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x53,0x54,0x56, -0x58,0x59,0x5A,0x5B,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x6E,0x6F,0x70,0x71,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0xFF,0x42,0xFF,0x52,0xFF,0x51,0x5C,0xFF,0xFF,0x5D,0x5B,0x5E,0x65,0xFF,0x67,0x66, -0xFF,0x42,0xFF,0x52,0xFF,0x51,0x5C,0xFF,0xFF,0x5D,0x5B,0x5E,0x65,0xFF,0x67,0x66, -0x5A,0x43,0x43,0x43,0x43,0x51,0x46,0x45,0x47,0x49,0x4A,0x49,0x49,0x4E,0x4E,0x48, -0xFF,0x55,0x54,0x57,0x56,0x56,0x56,0xFF,0x5A,0x5F,0x5F,0x5F,0x5F,0x63,0x5E,0xFF, -0x5A,0x43,0x43,0x43,0x43,0x51,0x46,0x45,0x47,0x49,0x4A,0x49,0x49,0x4E,0x4E,0x48, -0xFF,0x55,0x54,0x57,0x56,0x56,0x56,0xFF,0x5A,0x5F,0x5F,0x5F,0x5F,0x63,0x5E,0xFF -}; - -uint16 to_uni_latin2_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7, -0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B, -0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7, -0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_swe7 -uchar ctype_swe7_swedish_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10, -0x01,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -uchar to_lower_swe7_swedish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_swe7_swedish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x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,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_swe7_swedish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x45,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,0x5C,0x5D,0x5B,0x59,0x5F, -0x45,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,0x5C,0x5D,0x5B,0x59,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_swe7_swedish_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x00C9,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x00C4,0x00D6,0x00C5,0x00DC,0x005F, -0x00E9,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x00E4,0x00F6,0x00E5,0x00FC,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_ascii -uchar ctype_ascii_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -uchar to_lower_ascii_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_ascii_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x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FC,0xFD,0xFE,0xFF -}; - -uchar sort_order_ascii_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_ascii_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_bulgarian_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01, -0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02, -0x00,0x01,0x02,0x01,0x00,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01, -0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x01,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_cp1251_bulgarian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x90,0x83,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA2,0xA2,0xBC,0xA4,0xB4,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB3,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1251_bulgarian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B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arian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x7C,0x7D,0x7E,0x7F,0x80, -0x81,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,0x82,0x83,0x84,0x85,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x61,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x61,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0x5B,0x5C,0x5D,0x5E,0x5F,0x60,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,0x7B, -0x5B,0x5C,0x5D,0x5E,0x5F,0x60,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,0x7B -}; - -uint16 to_uni_cp1251_bulgarian_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, -0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, -0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, -0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407, -0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7, -0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, -0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, -0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, -0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, -0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, -0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, -0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F -}; - -#endif - -#ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_danish_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x10,0x00,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x01,0x00,0x01,0x00, -0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x02,0x00,0x02,0x01, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_latin1_danish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin1_danish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_latin1_danish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0x41,0x41,0x41,0x41,0x5B,0x5D,0x5B,0x43,0x45,0x45,0x45,0x45,0x49,0x49,0x49,0x49, -0x44,0x4E,0x4F,0x4F,0x4F,0x4F,0x5C,0xD7,0x5C,0x55,0x55,0x55,0x59,0x59,0xDE,0xDF, -0x41,0x41,0x41,0x41,0x5B,0x5D,0x5B,0x43,0x45,0x45,0x45,0x45,0x49,0x49,0x49,0x49, -0x44,0x4E,0x4F,0x4F,0x4F,0x4F,0x5C,0xF7,0x5C,0x55,0x55,0x55,0x59,0x59,0xDE,0xFF -}; - -uint16 to_uni_latin1_danish_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0081,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, -0x02C6,0x2030,0x0160,0x2039,0x0152,0x008D,0x017D,0x008F, -0x0090,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x02DC,0x2122,0x0161,0x203A,0x0153,0x009D,0x017E,0x0178, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF -}; - -#endif - -#ifdef HAVE_CHARSET_hebrew -uchar ctype_hebrew_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00 -}; - -uchar to_lower_hebrew_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_hebrew_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_hebrew_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_hebrew_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x0000,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00D7,0x00AB,0x00AC,0x00AD,0x00AE,0x203E, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00F7,0x00BB,0x00BC,0x00BD,0x00BE,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2017, -0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7, -0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF, -0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7, -0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x200E,0x200F,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_latin7 -uchar ctype_latin7_estonian_cs[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x01,0x20,0x10,0x20,0x10,0x10,0x00,0x00,0x20,0x10,0x20,0x10,0x20,0x10,0x10,0x10, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x00,0x20,0x10,0x20,0x10,0x10,0x20, -0x48,0x20,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_latin7_estonian_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin7_estonian_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xBC,0xBD,0xBE,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_latin7_estonian_cs[] = { -0x00,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x2E,0x2F,0x30,0x31,0x32,0x0A,0x0B, -0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B, -0x2C,0x33,0x34,0x35,0x36,0x37,0x38,0x27,0x39,0x3A,0x3B,0x5D,0x3C,0x28,0x3D,0x3E, -0x76,0x7A,0x7C,0x7E,0x80,0x81,0x82,0x83,0x84,0x85,0x3F,0x40,0x5E,0x5F,0x60,0x41, -0x42,0x86,0x90,0x92,0x98,0x9A,0xA4,0xA6,0xAA,0xAC,0xB2,0xB4,0xB8,0xBE,0xC0,0xC6, -0xCE,0xD0,0xD2,0xD6,0xE5,0xE8,0xEE,0xF0,0xFA,0xFC,0xDD,0x43,0x44,0x45,0x46,0x47, -0x48,0x87,0x91,0x93,0x99,0x9B,0xA5,0xA7,0xAB,0xAD,0xB3,0xB5,0xB9,0xBF,0xC1,0xC7, -0xCF,0xD1,0xD3,0xD7,0xE6,0xE9,0xEF,0xF1,0xFB,0xFD,0xDE,0x49,0x4A,0x4B,0x4C,0x1C, -0x01,0x1D,0x57,0x1E,0x5A,0x74,0x71,0x72,0x1F,0x75,0x20,0x5B,0x21,0x4E,0x52,0x51, -0x22,0x55,0x56,0x58,0x59,0x73,0x2A,0x2B,0x23,0xE7,0x24,0x5C,0x25,0x4F,0x54,0x26, -0x2D,0xFE,0x66,0x67,0x68,0xFF,0x4D,0x69,0xCC,0x6A,0xD4,0x62,0x6B,0x29,0x6C,0x8E, -0x6D,0x61,0x7D,0x7F,0x50,0x6E,0x6F,0x70,0xCD,0x7B,0xD5,0x63,0x77,0x78,0x79,0x8F, -0x8C,0xB0,0x88,0x94,0xF4,0x8A,0xA2,0xA0,0x96,0x9C,0xDF,0x9E,0xA8,0xB6,0xAE,0xBA, -0xDB,0xC2,0xC4,0xC8,0xCA,0xF2,0xF6,0x64,0xEC,0xBC,0xD8,0xEA,0xF8,0xE1,0xE3,0xDA, -0x8D,0xB1,0x89,0x95,0xF5,0x8B,0xA3,0xA1,0x97,0x9D,0xE0,0x9F,0xA9,0xB7,0xAF,0xBB, -0xDC,0xC3,0xC5,0xC9,0xCB,0xF3,0xF7,0x65,0xED,0xBD,0xD9,0xEB,0xF9,0xE2,0xE4,0x53 -}; - -uint16 to_uni_latin7_estonian_cs[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x201D,0x00A2,0x00A3,0x00A4,0x201E,0x00A6,0x00A7, -0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6, -0x00B0,0x00B1,0x00B2,0x00B3,0x201C,0x00B5,0x00B6,0x00B7, -0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6, -0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112, -0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B, -0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7, -0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF, -0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113, -0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C, -0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7, -0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x2019 -}; - -#endif - -#ifdef HAVE_CHARSET_latin2 -uchar ctype_latin2_hungarian_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x01,0x10,0x01,0x10,0x01,0x01,0x10,0x10,0x01,0x01,0x01,0x01,0x10,0x01,0x01, -0x10,0x02,0x10,0x02,0x10,0x02,0x02,0x10,0x10,0x02,0x02,0x02,0x02,0x10,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_latin2_hungarian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xB1,0xA2,0xB3,0xA4,0xB5,0xB6,0xA7,0xA8,0xB9,0xBA,0xBB,0xBC,0xAD,0xBE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin2_hungarian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xA1,0xB2,0xA3,0xB4,0xA5,0xA6,0xB7,0xB8,0xA9,0xAA,0xAB,0xAC,0xBD,0xAE,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_latin2_hungarian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x47,0x48,0x4C,0x4E,0x53,0x54,0x55,0x56,0x5A,0x5B,0x5C,0x60,0x61,0x64, -0x69,0x6A,0x6B,0x6E,0x72,0x75,0x7A,0x7B,0x7C,0x7D,0x7F,0x83,0x84,0x85,0x86,0x87, -0x88,0x41,0x47,0x48,0x4C,0x4E,0x53,0x54,0x55,0x56,0x5A,0x5B,0x5C,0x60,0x61,0x64, -0x69,0x6A,0x6B,0x6E,0x72,0x75,0x7A,0x7B,0x7C,0x7D,0x7F,0x89,0x8A,0x8B,0x8C,0x00, -0x01,0x78,0x4E,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x67,0x67,0x56,0x56,0x0F,0x41, -0x4E,0x12,0x13,0x67,0x67,0x64,0x78,0x75,0x78,0x67,0x78,0x1C,0x1D,0x1E,0x1F,0xFF, -0x41,0x56,0x64,0x75,0x5E,0x6F,0xFF,0x67,0xFF,0x70,0x71,0x73,0x80,0xFF,0x81,0x82, -0xFF,0x42,0xFF,0x5D,0xFF,0x41,0x6F,0xFF,0xFF,0x70,0x71,0x73,0x80,0xFF,0x81,0x82, -0x6C,0x41,0x44,0x45,0x46,0x5F,0x49,0x4B,0x4A,0x4E,0x51,0x52,0x50,0x56,0x57,0x4D, -0xFF,0x62,0x63,0x64,0x66,0x67,0x67,0xFF,0x6D,0x77,0x75,0x78,0x78,0x7E,0x74,0xFF, -0x64,0x41,0x44,0x45,0x46,0x5F,0x49,0x4B,0x4A,0x4E,0x51,0x78,0x50,0x56,0x58,0x4D, -0xFF,0x62,0x63,0x64,0x66,0x67,0x67,0xFF,0x6D,0x77,0x75,0x78,0x78,0x7E,0x74,0xFF -}; - -uint16 to_uni_latin2_hungarian_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7, -0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B, -0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7, -0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_koi8u -uchar ctype_koi8u_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x02,0x02,0x10,0x02,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10, -0x10,0x10,0x10,0x01,0x01,0x10,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x10, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 -}; - -uchar to_lower_koi8u_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x20,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0xA3,0xA4,0x20,0xA6,0xA7,0x20,0x20,0x20,0x20,0x20,0xAD,0x20,0x20, -0x20,0x20,0x20,0xA3,0xA4,0x20,0xA6,0xA7,0x20,0x20,0x20,0x20,0x20,0xAD,0x20,0x20, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF -}; - -uchar to_upper_koi8u_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x20,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0xB3,0xB4,0x20,0xB6,0xB7,0x20,0x20,0x20,0x20,0x20,0xBD,0x20,0x20, -0x20,0x20,0x20,0xB3,0xB4,0x20,0xB6,0xB7,0x20,0x20,0x20,0x20,0x20,0xBD,0x20,0x20, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_koi8u_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x20,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4, -0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4, -0xC5,0xC6,0xC7,0x88,0x87,0xC8,0x8C,0x8D,0xC9,0xCA,0xCB,0xCC,0xCD,0x84,0xCE,0xCF, -0xD0,0xD1,0xD2,0x88,0x87,0xD3,0x8C,0x8D,0xD4,0xD5,0xD6,0xD7,0xD8,0x84,0xD9,0xDA, -0xA3,0x80,0x81,0x9B,0x85,0x86,0x99,0x83,0x9A,0x8B,0x8E,0x8F,0x90,0x91,0x92,0x93, -0x94,0xA4,0x95,0x96,0x97,0x98,0x89,0x82,0xA1,0xA0,0x8A,0x9D,0xA2,0x9E,0x9C,0x9F, -0xA3,0x80,0x81,0x9B,0x85,0x86,0x99,0x83,0x9A,0x8B,0x8E,0x8F,0x90,0x91,0x92,0x93, -0x94,0xA4,0x95,0x96,0x97,0x98,0x89,0x82,0xA1,0xA0,0x8A,0x9D,0xA2,0x9E,0x9C,0x9F -}; - -uint16 to_uni_koi8u_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524, -0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590, -0x2591,0x2592,0x2593,0x2320,0x25A0,0x2022,0x221A,0x2248, -0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7, -0x2550,0x2551,0x2552,0x0451,0x0454,0x2554,0x0456,0x0457, -0x2557,0x2558,0x2559,0x255A,0x255B,0x0491,0x255D,0x255E, -0x255F,0x2560,0x2561,0x0401,0x0404,0x2563,0x0406,0x0407, -0x2566,0x2567,0x2568,0x2569,0x256A,0x0490,0x256C,0x00A9, -0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433, -0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, -0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432, -0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A, -0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413, -0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412, -0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A -}; - -#endif - -#ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_ukrainian_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01, -0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02, -0x00,0x01,0x02,0x01,0x00,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01, -0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x01,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_cp1251_ukrainian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x90,0x83,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA2,0xA2,0xBC,0xA4,0xB4,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB3,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1251_ukrainian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x81,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x8E,0x8F, -0xA0,0xA1,0xA1,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB2,0xA5,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xA3,0xBD,0xBD,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF -}; - -uchar sort_order_cp1251_ukrainian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x20,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4, -0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4, -0xC5,0xC6,0xC7,0xC8,0xC9,0x84,0xCA,0xCB,0x88,0xCC,0x87,0xCD,0xCE,0xCF,0xD0,0x8D, -0xD1,0xD2,0x8C,0x8C,0x84,0xD3,0xD4,0xD5,0x88,0xD6,0x87,0xD7,0xD8,0xD9,0xDA,0x8D, -0x80,0x81,0x82,0x83,0x85,0x86,0x89,0x8A,0x8B,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, -0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4, -0x80,0x81,0x82,0x83,0x85,0x86,0x89,0x8A,0x8B,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, -0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4 -}; - -uint16 to_uni_cp1251_ukrainian_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, -0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, -0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, -0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407, -0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7, -0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, -0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, -0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, -0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, -0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, -0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, -0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F -}; - -#endif - -#ifdef HAVE_CHARSET_greek -uchar ctype_greek_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x00,0x00,0x10,0x10,0x10,0x10,0x00,0x10,0x10,0x10,0x00,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x01,0x01,0x01,0x10,0x01,0x10,0x01,0x01, -0x02,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 -}; - -uchar to_lower_greek_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xDC,0xB7,0xDD,0xDE,0xDF,0xBB,0xFC,0xBD,0xFD,0xFE, -0xC0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xD2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_greek_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xDA,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xC1,0xC5,0xC7,0xC9, -0xDB,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xCF,0xD5,0xD9,0xFF -}; - -uchar sort_order_greek_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xC1,0xB7,0xC5,0xC7,0xC9,0xBB,0xCF,0xBD,0xD5,0xD9, -0xC9,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xC9,0xD5,0xC1,0xC5,0xC7,0xC9, -0xD5,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xC9,0xD5,0xCF,0xD5,0xD9,0xFF -}; - -uint16 to_uni_greek_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x02BD,0x02BC,0x00A3,0x0000,0x0000,0x00A6,0x00A7, -0x00A8,0x00A9,0x0000,0x00AB,0x00AC,0x00AD,0x0000,0x2015, -0x00B0,0x00B1,0x00B2,0x00B3,0x0384,0x0385,0x0386,0x00B7, -0x0388,0x0389,0x038A,0x00BB,0x038C,0x00BD,0x038E,0x038F, -0x0390,0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397, -0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F, -0x03A0,0x03A1,0x0000,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7, -0x03A8,0x03A9,0x03AA,0x03AB,0x03AC,0x03AD,0x03AE,0x03AF, -0x03B0,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7, -0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF, -0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7, -0x03C8,0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_cp1250 -uchar ctype_cp1250_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x20,0x20,0x10,0x20,0x10,0x10,0x10,0x10,0x20,0x10,0x01,0x10,0x01,0x01,0x01,0x01, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x10,0x02,0x10,0x02,0x02,0x02,0x02, -0x48,0x10,0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01, -0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x02,0x10,0x01,0x10,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_cp1250_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xB3,0xA4,0xB9,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBE,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1250_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_cp1250_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x42,0x43,0x46,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x52,0x53,0x55, -0x56,0x57,0x58,0x59,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x63,0x64,0x65,0x66,0x67, -0x68,0x41,0x42,0x43,0x46,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x52,0x53,0x55, -0x56,0x57,0x58,0x59,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x5A,0x8B,0x5A,0x5B,0x62,0x62, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x5A,0x9B,0x5A,0x5B,0x62,0x62, -0x20,0xA1,0xA2,0x50,0xA4,0x41,0xA6,0x59,0xA8,0xA9,0x59,0xAB,0xAC,0xAD,0xAE,0x62, -0xB0,0xB1,0xB2,0x50,0xB4,0xB5,0xB6,0xB7,0xB8,0x41,0x59,0xBB,0x50,0xBD,0x50,0x62, -0x58,0x41,0x41,0x41,0x41,0x50,0x45,0x43,0x44,0x49,0x49,0x49,0x49,0x4D,0x4D,0x46, -0x47,0x53,0x53,0x55,0x55,0x55,0x55,0xD7,0x58,0x5C,0x5C,0x5C,0x5C,0x60,0x5B,0x59, -0x58,0x41,0x41,0x41,0x41,0x50,0x45,0x43,0x44,0x49,0x49,0x49,0x49,0x4D,0x4D,0x46, -0x47,0x53,0x53,0x55,0x55,0x55,0x55,0xF7,0x58,0x5C,0x5C,0x5C,0x5C,0x60,0x5B,0xFF -}; - -uint16 to_uni_cp1250_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179, -0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A, -0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7, -0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B, -0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_latin2 -uchar ctype_latin2_croatian_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x01,0x10,0x01,0x10,0x01,0x01,0x10,0x10,0x01,0x01,0x01,0x01,0x10,0x01,0x01, -0x10,0x02,0x10,0x02,0x10,0x02,0x02,0x10,0x10,0x02,0x02,0x02,0x02,0x10,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_latin2_croatian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xB1,0xA2,0xB3,0xA4,0xB5,0xB6,0xA7,0xA8,0xB9,0xBA,0xBB,0xBC,0xAD,0xBE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin2_croatian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xA1,0xB2,0xA3,0xB4,0xA5,0xA6,0xB7,0xB8,0xA9,0xAA,0xAB,0xAC,0xBD,0xAE,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_latin2_croatian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x43,0x44,0x48,0x4B,0x4D,0x4E,0x4F,0x50,0x52,0x53,0x54,0x56,0x57,0x59, -0x5B,0x5C,0x5D,0x5F,0x62,0x64,0x66,0x67,0x68,0x69,0x6B,0xC6,0xC7,0xC8,0xC9,0xCA, -0xCB,0x41,0x43,0x44,0x48,0x4B,0x4D,0x4E,0x4F,0x50,0x52,0x53,0x54,0x56,0x57,0x59, -0x5B,0x5C,0x5D,0x5F,0x62,0x64,0x66,0x67,0x68,0x69,0x6B,0xCC,0xCD,0xCE,0xCF,0xD0, -0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0, -0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0, -0xF1,0x41,0xF2,0x54,0xF3,0x54,0x5F,0xF4,0xF5,0x61,0x5F,0x62,0x6B,0xF6,0x8E,0x6B, -0xF7,0x41,0xF8,0x54,0xF9,0x54,0x5F,0xFA,0xFB,0x61,0x5F,0x62,0x6B,0xFC,0x8E,0x6B, -0x5D,0x41,0x41,0x41,0x41,0x54,0x47,0x44,0x46,0x4B,0x4B,0x4B,0x4B,0x50,0x50,0x48, -0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xFD,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0x5F, -0x5D,0x41,0x41,0x41,0x41,0x54,0x47,0x44,0x46,0x4B,0x4B,0x4B,0x4B,0x50,0x50,0x48, -0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xFE,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF -}; - -uint16 to_uni_latin2_croatian_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7, -0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B, -0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7, -0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_cp1257 -uchar ctype_cp1257_lithuanian_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 -}; - -uchar to_lower_cp1257_lithuanian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1257_lithuanian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_cp1257_lithuanian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x43,0x44,0x46,0x47,0x4A,0x4B,0x4C,0x4D,0x50,0x51,0x52,0x53,0x54,0x55, -0x56,0x57,0x58,0x59,0x5B,0x5C,0x5F,0x60,0x61,0x4E,0xFF,0x62,0x63,0x64,0x65,0x66, -0x67,0x41,0x43,0x44,0x46,0x47,0x4A,0x4B,0x4C,0x4D,0x50,0x51,0x52,0x53,0x54,0x55, -0x56,0x57,0x58,0x59,0x5B,0x5C,0x5F,0x60,0x61,0x4E,0xFF,0x68,0x69,0x6A,0x6B,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, -0x42,0x4F,0xFF,0xFF,0xFF,0xFF,0x48,0xFF,0x45,0xFF,0xFF,0x49,0xFF,0xFF,0xFF,0xFF, -0x5A,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x5E,0xFF,0xFF,0x5D,0xFF,0xFF,0xFF,0xFF, -0xFF,0x4F,0xFF,0xFF,0xFF,0xFF,0x48,0xFF,0x45,0xFF,0xFF,0x49,0xFF,0xFF,0xFF,0xFF, -0x5A,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x5E,0xFF,0xFF,0x5D,0xFF,0xFF,0xFF,0xFF -}; - -uint16 to_uni_cp1257_lithuanian_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0000,0x2039,0x0000,0x00A8,0x02C7,0x00B8, -0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0000,0x203A,0x0000,0x00AF,0x02DB,0x0000, -0x00A0,0x0000,0x00A2,0x00A3,0x00A4,0x0000,0x00A6,0x00A7, -0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6, -0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112, -0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B, -0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7, -0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF, -0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113, -0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C, -0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7, -0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_latin5 -uchar ctype_latin5_turkish_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_latin5_turkish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0xFD,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0x69,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin5_turkish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0xDD,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0x49,0xDE,0xFF -}; - -uchar sort_order_latin5_turkish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x42,0x43,0x45,0x46,0x47,0x48,0x4A,0x4B,0x4D,0x4E,0x4F,0x50,0x51,0x52, -0x54,0x55,0x56,0x57,0x59,0x5A,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65, -0x66,0x41,0x42,0x43,0x45,0x46,0x47,0x48,0x4A,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52, -0x54,0x55,0x56,0x57,0x59,0x5A,0x5C,0x5D,0x5E,0x5F,0x60,0x87,0x88,0x89,0x8A,0x8B, -0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, -0x9C,0x9D,0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB, -0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB, -0xBC,0xBD,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB, -0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x44,0x46,0x46,0x46,0x46,0x4C,0x4C,0x4C,0x4C, -0x49,0x51,0x52,0x52,0x52,0x52,0x53,0xE0,0x52,0x5A,0x5A,0x5A,0x5B,0x4C,0x58,0x57, -0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x44,0x46,0x46,0x46,0x46,0x4C,0x4C,0x4C,0x4C, -0x49,0x51,0x52,0x52,0x52,0x52,0x53,0xFA,0x52,0x5A,0x5A,0x5A,0x5B,0x4B,0x58,0x5F -}; - -uint16 to_uni_latin5_turkish_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x011E,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0130,0x015E,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x011F,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x0131,0x015F,0x00FF -}; - -#endif - -#ifdef HAVE_CHARSET_armscii8 -uchar ctype_armscii8_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x10,0x10 -}; - -uchar to_lower_armscii8_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB3,0xB3,0xB5,0xB5,0xB7,0xB7,0xB9,0xB9,0xBB,0xBB,0xBD,0xBD,0xBF,0xBF, -0xC1,0xC1,0xC3,0xC3,0xC5,0xC5,0xC7,0xC7,0xC9,0xC9,0xCB,0xCB,0xCD,0xCD,0xCF,0xCF, -0xD1,0xD1,0xD3,0xD3,0xD5,0xD5,0xD7,0xD7,0xD9,0xD9,0xDB,0xDB,0xDD,0xDD,0xDF,0xDF, -0xE1,0xE1,0xE3,0xE3,0xE5,0xE5,0xE7,0xE7,0xE9,0xE9,0xEB,0xEB,0xED,0xED,0xEF,0xEF, -0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFB,0xFB,0xFD,0xFD,0xFE,0xFF -}; - -uchar to_upper_armscii8_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB2,0xB4,0xB4,0xB6,0xB6,0xB8,0xB8,0xBA,0xBA,0xBC,0xBC,0xBE,0xBE, -0xC0,0xC0,0xC2,0xC2,0xC4,0xC4,0xC6,0xC6,0xC8,0xC8,0xCA,0xCA,0xCC,0xCC,0xCE,0xCE, -0xD0,0xD0,0xD2,0xD2,0xD4,0xD4,0xD6,0xD6,0xD8,0xD8,0xDA,0xDA,0xDC,0xDC,0xDE,0xDE, -0xE0,0xE0,0xE2,0xE2,0xE4,0xE4,0xE6,0xE6,0xE8,0xE8,0xEA,0xEA,0xEC,0xEC,0xEE,0xEE, -0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFE,0xFF -}; - -uchar sort_order_armscii8_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_armscii8_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x2741,0x00A7,0x0589,0x0029,0x0028,0x00BB,0x00AB, -0x2014,0x002E,0x055D,0x002C,0x002D,0x055F,0x2026,0x055C, -0x055B,0x055E,0x0531,0x0561,0x0532,0x0562,0x0533,0x0563, -0x0534,0x0564,0x0535,0x0565,0x0536,0x0566,0x0537,0x0567, -0x0538,0x0568,0x0539,0x0569,0x053A,0x056A,0x053B,0x056B, -0x053C,0x056C,0x053D,0x056D,0x053E,0x056E,0x053F,0x056F, -0x0540,0x0570,0x0541,0x0571,0x0542,0x0572,0x0543,0x0573, -0x0544,0x0574,0x0545,0x0575,0x0546,0x0576,0x0547,0x0577, -0x0548,0x0578,0x0549,0x0579,0x054A,0x057A,0x054B,0x057B, -0x054C,0x057C,0x054D,0x057D,0x054E,0x057E,0x054F,0x057F, -0x0550,0x0580,0x0551,0x0581,0x0552,0x0582,0x0553,0x0583, -0x0554,0x0584,0x0555,0x0585,0x0556,0x0586,0x2019,0x0027 -}; - -#endif - -#ifdef HAVE_CHARSET_cp866 -uchar ctype_cp866_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48 -}; - -uchar to_lower_cp866_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0x86,0x87,0x88,0x89,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0x86,0x87,0x88,0x89,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp866_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_cp866_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x43,0x45,0x47,0x49,0x4B,0x4D,0x4F,0x51,0x53,0x55,0x57,0x59,0x5B,0x5D, -0x5F,0x61,0x63,0x65,0x67,0x69,0x6B,0x6D,0x6F,0x71,0x73,0xBD,0xBE,0xBF,0xC0,0xC1, -0xC2,0x41,0x43,0x45,0x47,0x49,0x4B,0x4D,0x4F,0x51,0x53,0x55,0x57,0x59,0x5B,0x5D, -0x5F,0x61,0x63,0x65,0x67,0x69,0x6B,0x6D,0x6F,0x71,0x73,0xC3,0xC4,0xC5,0xC6,0xC7, -0x75,0x77,0x79,0x7B,0x7D,0x7F,0x85,0x87,0x89,0x8D,0x8F,0x91,0x93,0x95,0x97,0x99, -0x9B,0x9D,0x9F,0xA1,0xA5,0xA7,0xA9,0xAB,0xAD,0xAF,0xB1,0xB3,0xB5,0xB7,0xB9,0xBB, -0x75,0x77,0x79,0x7B,0x7D,0x7F,0x85,0x87,0x89,0x8D,0x8F,0x91,0x93,0x95,0x97,0x99, -0xC8,0xC9,0xCA,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0x9B,0x9D,0x9F,0xA1,0xA5,0xA7,0xA9,0xAB,0xAD,0xAF,0xB1,0xB3,0xB5,0xB7,0xB9,0xBB, -0x81,0x81,0x83,0x83,0x8B,0x8B,0xA3,0xA3,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2 -}; - -uint16 to_uni_cp866_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, -0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, -0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, -0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, -0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, -0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, -0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, -0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, -0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, -0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, -0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, -0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, -0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F, -0x0401,0x0451,0x0404,0x0454,0x0407,0x0457,0x040E,0x045E, -0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 -}; - -#endif - -#ifdef HAVE_CHARSET_keybcs2 -uchar ctype_keybcs2_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x02,0x82,0x02,0x02,0x01,0x01,0x02,0x82,0x81,0x01,0x01,0x02,0x02,0x01,0x01, -0x81,0x02,0x01,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x02,0x02,0x01,0x02,0x01,0x02,0x00,0x02,0x01,0x01,0x01,0x02,0x00,0x02,0x02,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48 -}; - -uchar to_lower_keybcs2_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x87,0x81,0x82,0x83,0x84,0x83,0x86,0x87,0x88,0x88,0x8D,0xA1,0x8C,0x8D,0x84,0xA0, -0x82,0x91,0x91,0x93,0x94,0xA2,0x96,0xA3,0x98,0x94,0x81,0x9B,0x8C,0x98,0xA9,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA4,0x96,0x93,0x9B,0xA9,0xAA,0xAA,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xED,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_keybcs2_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x68,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x87,0x9A,0x90,0x85,0x8E,0x85,0x86,0x80,0x89,0x89,0x8A,0x8B,0x9C,0x8A,0x8E,0x8F, -0x90,0x92,0x92,0xA7,0x99,0x95,0xA6,0x97,0x9D,0x99,0x9A,0xA8,0x9C,0x9D,0x9E,0x9F, -0x8F,0x8B,0x95,0x97,0xA5,0xA5,0xA6,0xA7,0xA8,0x9E,0xAB,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xE8,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_keybcs2_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x44,0x45,0x47,0x49,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x5A, -0x5E,0x5F,0x60,0x63,0x66,0x68,0x6C,0x6D,0x6E,0x6F,0x72,0x90,0x91,0x92,0x93,0x94, -0x95,0x41,0x44,0x45,0x47,0x49,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x5A, -0x5E,0x5F,0x60,0x63,0x66,0x68,0x6C,0x6D,0x6E,0x6F,0x72,0x96,0x97,0x98,0x99,0x9A, -0x45,0x68,0x49,0x47,0x41,0x47,0x66,0x45,0x49,0x49,0x56,0x53,0x56,0x56,0x41,0x41, -0x49,0x72,0x72,0x5A,0x5A,0x5A,0x68,0x68,0x6F,0x5A,0x68,0x63,0x56,0x6F,0x60,0x66, -0x41,0x53,0x5A,0x68,0x58,0x58,0x68,0x5A,0x63,0x60,0x60,0x60,0xA0,0xA1,0xA2,0xA3, -0xA4,0xA5,0xA6,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC, -0xBD,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC, -0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC, -0x80,0x65,0x83,0x87,0x88,0x89,0xDD,0x8A,0x85,0x8B,0x84,0x81,0xDE,0x85,0x82,0xDF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_keybcs2_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x010C,0x00FC,0x00E9,0x010F,0x00E4,0x010E,0x0164,0x010D, -0x011B,0x011A,0x0139,0x00CD,0x013E,0x013A,0x00C4,0x00C1, -0x00C9,0x017E,0x017D,0x00F4,0x00F6,0x00D3,0x016F,0x00DA, -0x00FD,0x00D6,0x00DC,0x0160,0x013D,0x00DD,0x0158,0x0165, -0x00E1,0x00ED,0x00F3,0x00FA,0x0148,0x0147,0x016E,0x00D4, -0x0161,0x0159,0x0155,0x0154,0x00BC,0x00A1,0x00AB,0x00BB, -0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, -0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, -0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, -0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, -0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, -0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, -0x03B1,0x00DF,0x0393,0x03C0,0x03A3,0x03C3,0x00B5,0x03C4, -0x03A6,0x0398,0x03A9,0x03B4,0x221E,0x03C6,0x03B5,0x2229, -0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, -0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 -}; - -#endif - -#ifdef HAVE_CHARSET_macce -uchar ctype_macce_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x01,0x02,0x01,0x01,0x01,0x01,0x02,0x02,0x01,0x02,0x02,0x01,0x02,0x02,0x01, -0x02,0x01,0x02,0x02,0x01,0x02,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x02,0x02, -0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x02,0x01, -0x02,0x01,0x00,0x00,0x02,0x01,0x00,0x00,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01, -0x02,0x01,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x01,0x02,0x01, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x01,0x00,0x00,0x02,0x01, -0x02,0x01,0x00,0x00,0x02,0x01,0x02,0x01,0x01,0x02,0x01,0x01,0x02,0x01,0x01,0x01, -0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x01,0x01,0x02,0x01,0x00 -}; - -uchar to_lower_macce_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x8A,0x82,0x82,0x8E,0x88,0x9A,0x9F,0x87,0x88,0x8B,0x8A,0x8B,0x8D,0x8D,0x8E,0x90, -0x90,0x93,0x92,0x93,0x95,0x95,0x98,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9E,0x9E,0x9F, -0xA0,0xA1,0xAB,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xB0, -0xB0,0xB4,0xB2,0xB3,0xB4,0xFA,0xB6,0xB7,0xB8,0xBA,0xBA,0xBC,0xBC,0xBE,0xBE,0xC0, -0xC0,0xC4,0xC2,0xC3,0xC4,0xCB,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCE,0x9B,0xCE,0xD8, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xDA,0xDA,0xDE,0xDC,0xDD,0xDE,0xE0, -0xE0,0xE4,0xE2,0xE3,0xE4,0xE6,0xE6,0x87,0xE9,0xE9,0x92,0xEC,0xEC,0xF0,0x97,0x99, -0xF0,0xF3,0x9C,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFA,0xFD,0xB8,0xFD,0xAE,0xFF -}; - -uchar to_upper_macce_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x81,0x83,0x84,0x85,0x86,0xE7,0x84,0x89,0x80,0x89,0x8C,0x8C,0x83,0x8F, -0x8F,0x91,0xEA,0x91,0x94,0x94,0x96,0xEE,0x96,0xEF,0x85,0xCD,0xF2,0x9D,0x9D,0x86, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xA2,0xAC,0xAD,0xFE,0xAF, -0xAF,0xB1,0xB2,0xB3,0xB1,0xB5,0xB6,0xB7,0xFC,0xB9,0xB9,0xBB,0xBB,0xBD,0xBD,0xBF, -0xBF,0xC1,0xC2,0xC3,0xC1,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xC5,0xCC,0xCD,0xCC,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xCF,0xD9,0xD9,0xDB,0xDC,0xDD,0xDB,0xDF, -0xDF,0xE1,0xE2,0xE3,0xE1,0xE5,0xE5,0xE7,0xE8,0xE8,0xEA,0xEB,0xEB,0xED,0xEE,0xEF, -0xED,0xF1,0xF2,0xF1,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xB5,0xFB,0xFC,0xFB,0xFE,0xFF -}; - -uchar sort_order_macce_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x46,0x47,0x4A,0x4C,0x52,0x53,0x55,0x56,0x5A,0x5B,0x5D,0x62,0x62,0x67, -0x6F,0x70,0x71,0x75,0x79,0x81,0x88,0x89,0x8A,0x8B,0x8D,0x90,0x91,0x92,0x93,0x94, -0x95,0x41,0x46,0x47,0x4A,0x4C,0x52,0x53,0x55,0x56,0x5A,0x5B,0x5D,0x62,0x62,0x67, -0x6F,0x70,0x71,0x75,0x79,0x81,0x88,0x89,0x8A,0x8B,0x8D,0x96,0x97,0x98,0x99,0x9A, -0x41,0x41,0x41,0x4C,0x41,0x67,0x81,0x41,0x41,0x47,0x41,0x47,0x47,0x47,0x4C,0x8D, -0x8D,0x4A,0x56,0x4A,0x4C,0x4C,0x4C,0x67,0x4C,0x67,0x67,0x67,0x81,0x4C,0x4C,0x81, -0xA0,0xA1,0x4C,0xA3,0xA4,0xA5,0xA6,0x75,0xA8,0xA9,0xAA,0x4C,0xAC,0xAD,0x53,0x56, -0x56,0x56,0xB2,0xB3,0x56,0x5B,0xB6,0xB7,0x5D,0x5D,0x5D,0x5D,0x5D,0x5D,0x5D,0x62, -0x62,0x62,0xC2,0xC3,0x62,0x62,0xC6,0xC7,0xC8,0xC9,0xCA,0x62,0x67,0x67,0x67,0x67, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0x67,0x71,0x71,0x71,0xDC,0xDD,0x71,0x71, -0x71,0x75,0xE2,0xE3,0x75,0x75,0x75,0x41,0x79,0x79,0x56,0x8D,0x8D,0x81,0x67,0x67, -0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x8B,0x8B,0x5B,0x8D,0x5D,0x8D,0x53,0xFF -}; - -uint16 to_uni_macce_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x00C4,0x0100,0x0101,0x00C9,0x0104,0x00D6,0x00DC,0x00E1, -0x0105,0x010C,0x00E4,0x010D,0x0106,0x0107,0x00E9,0x0179, -0x017A,0x010E,0x00ED,0x010F,0x0112,0x0113,0x0116,0x00F3, -0x0117,0x00F4,0x00F6,0x00F5,0x00FA,0x011A,0x011B,0x00FC, -0x2020,0x00B0,0x0118,0x00A3,0x00A7,0x2022,0x00B6,0x00DF, -0x00AE,0x00A9,0x2122,0x0119,0x00A8,0x2260,0x0123,0x012E, -0x012F,0x012A,0x2264,0x2265,0x012B,0x0136,0x2202,0x2211, -0x0142,0x013B,0x013C,0x013D,0x013E,0x0139,0x013A,0x0145, -0x0146,0x0143,0x00AC,0x221A,0x0144,0x0147,0x2206,0x00AB, -0x00BB,0x2026,0x00A0,0x0148,0x0150,0x00D5,0x0151,0x014C, -0x2013,0x2014,0x201C,0x201D,0x2018,0x2019,0x00F7,0x25CA, -0x014D,0x0154,0x0155,0x0158,0x2039,0x203A,0x0159,0x0156, -0x0157,0x0160,0x201A,0x201E,0x0161,0x015A,0x015B,0x00C1, -0x0164,0x0165,0x00CD,0x017D,0x017E,0x016A,0x00D3,0x00D4, -0x016B,0x016E,0x00DA,0x016F,0x0170,0x0171,0x0172,0x0173, -0x00DD,0x00FD,0x0137,0x017B,0x0141,0x017C,0x0122,0x02C7 -}; - -#endif - -#ifdef HAVE_CHARSET_macroman -uchar ctype_macroman_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x10, -0x20,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02, -0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x01,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x00,0x01,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -uchar to_lower_macroman_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x8A,0x8C,0x8D,0x8E,0x96,0x9A,0x9F,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xBE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0x88,0x8B,0x9B,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD8,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0x89,0x90,0x87,0x91,0x8F,0x92,0x94,0x95,0x93,0x97,0x99, -0xF0,0x98,0x9C,0x9E,0x9D,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_macroman_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0xE7,0xCB,0xE5,0x80,0xCC,0x81,0x82,0x83,0xE9, -0xE6,0xE8,0xEA,0xED,0xEB,0xEC,0x84,0xEE,0xF1,0xEF,0x85,0xCD,0xF2,0xF4,0xF3,0x86, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xAE,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD9,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_macroman_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x49,0x50,0x52,0x53,0x57,0x59,0x60,0x61,0x67,0x68,0x69,0x70,0x71,0x72, -0x79,0x80,0x81,0x82,0x84,0x85,0x90,0x91,0x92,0x93,0x95,0xA0,0xA1,0xA2,0xA3,0xA4, -0xA5,0x41,0x49,0x50,0x52,0x53,0x57,0x59,0x60,0x61,0x67,0x68,0x69,0x70,0x71,0x72, -0x79,0x80,0x81,0x82,0x84,0x85,0x90,0x91,0x92,0x93,0x95,0xA6,0xA7,0xA8,0xA9,0xAA, -0x41,0x41,0x50,0x53,0x71,0x72,0x85,0x41,0x41,0x41,0x41,0x41,0x41,0x50,0x53,0x53, -0x53,0x53,0x61,0x61,0x61,0x61,0x71,0x72,0x72,0x72,0x72,0x72,0x85,0x85,0x85,0x85, -0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0x82,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0x48,0x72, -0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0x48,0x72, -0xC6,0xC7,0xC8,0xC9,0x57,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0x41,0x41,0x72,0xD0,0xD1, -0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0x93,0x93,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0x41,0x53,0x41,0x53,0x53,0x61,0x61,0x61,0x61,0x72,0x72, -0xF0,0x72,0x85,0x85,0x85,0x61,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_macroman_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x00C4,0x00C5,0x00C7,0x00C9,0x00D1,0x00D6,0x00DC,0x00E1, -0x00E0,0x00E2,0x00E4,0x00E3,0x00E5,0x00E7,0x00E9,0x00E8, -0x00EA,0x00EB,0x00ED,0x00EC,0x00EE,0x00EF,0x00F1,0x00F3, -0x00F2,0x00F4,0x00F6,0x00F5,0x00FA,0x00F9,0x00FB,0x00FC, -0x2020,0x00B0,0x00A2,0x00A3,0x00A7,0x2022,0x00B6,0x00DF, -0x00AE,0x00A9,0x2122,0x00B4,0x00A8,0x2260,0x00C6,0x00D8, -0x221E,0x00B1,0x2264,0x2265,0x00A5,0x00B5,0x2202,0x2211, -0x220F,0x03C0,0x222B,0x00AA,0x00BA,0x03A9,0x00E6,0x00F8, -0x00BF,0x00A1,0x00AC,0x221A,0x0192,0x2248,0x2206,0x00AB, -0x00BB,0x2026,0x00A0,0x00C0,0x00C3,0x00D5,0x0152,0x0153, -0x2013,0x2014,0x201C,0x201D,0x2018,0x2019,0x00F7,0x25CA, -0x00FF,0x0178,0x2044,0x20AC,0x2039,0x203A,0xFB01,0xFB02, -0x2021,0x00B7,0x201A,0x201E,0x2030,0x00C2,0x00CA,0x00C1, -0x00CB,0x00C8,0x00CD,0x00CE,0x00CF,0x00CC,0x00D3,0x00D4, -0xF8FF,0x00D2,0x00DA,0x00DB,0x00D9,0x0131,0x02C6,0x02DC, -0x00AF,0x02D8,0x02D9,0x02DA,0x00B8,0x02DD,0x02DB,0x02C7 -}; - -#endif - -#ifdef HAVE_CHARSET_cp852 -uchar ctype_cp852_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x02,0x02,0x01,0x01,0x01, -0x01,0x01,0x02,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x01,0x01,0x02,0x01,0x00,0x02, -0x02,0x02,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x02,0x01,0x01,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x02,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x02,0x01,0x01,0x01,0x02,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x01,0x00, -0x01,0x02,0x01,0x01,0x02,0x02,0x01,0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x00,0x48 -}; - -uchar to_lower_cp852_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x87,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8B,0x8B,0x8C,0xAB,0x84,0x86, -0x82,0x92,0x92,0x93,0x94,0x96,0x96,0x98,0x98,0x94,0x81,0x9C,0x9C,0x88,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA5,0xA5,0xA7,0xA7,0xA9,0xA9,0xAA,0xAB,0x9F,0xB8,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xA0,0x83,0xD8,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD0,0xD4,0x89,0xD4,0xE5,0xA1,0x8C,0xD8,0xD9,0xDA,0xDB,0xDC,0xEE,0x85,0xDF, -0xA2,0xE1,0x93,0xE4,0xE4,0xE5,0xE7,0xE7,0xEA,0xA3,0xE8,0xFB,0xEC,0xEC,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp852_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x9A,0x90,0xB6,0x8E,0xDE,0x8F,0x80,0x9D,0xD3,0x8A,0x8A,0xD7,0x8D,0x8E,0x8F, -0x90,0x91,0x91,0xE2,0x99,0x95,0x95,0x97,0x97,0x99,0x9A,0x9B,0x9B,0x9D,0x9E,0xAC, -0xB5,0xD6,0xE0,0xE9,0xA4,0xA4,0xA6,0xA6,0xA8,0xA8,0xAA,0x8D,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xAD,0xB9,0xBA,0xBB,0xBC,0xBE,0xBD,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC6,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD1,0xD1,0xD2,0xD3,0xD2,0xD5,0xD6,0xD7,0xB7,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE3,0xD5,0xE6,0xE6,0xE8,0xE9,0xE8,0xEB,0xED,0xED,0xDD,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF -}; - -uchar sort_order_cp852_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x47,0x48,0x4C,0x4F,0x54,0x55,0x56,0x57,0x5A,0x5B,0x5C,0x5E,0x5F,0x62, -0x67,0x68,0x69,0x6C,0x71,0x74,0x75,0x76,0x77,0x78,0x7B,0x90,0x91,0x92,0x93,0x94, -0x95,0x41,0x47,0x48,0x4C,0x4F,0x54,0x55,0x56,0x57,0x5A,0x5B,0x5C,0x5E,0x5F,0x62, -0x67,0x68,0x69,0x6C,0x71,0x74,0x75,0x76,0x77,0x78,0x7B,0x96,0x97,0x98,0x99,0x9A, -0x48,0x74,0x4F,0x41,0x41,0x74,0x48,0x48,0x5C,0x4F,0x62,0x62,0x57,0x7B,0x41,0x48, -0x4F,0x5C,0x5C,0x62,0x62,0x5C,0x5C,0x6C,0x6C,0x62,0x74,0x71,0x71,0x5C,0x9E,0x48, -0x41,0x57,0x62,0x74,0x41,0x41,0x7B,0x7B,0x4F,0x4F,0xAA,0x7B,0x48,0x6C,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0x41,0x41,0x4F,0x6C,0xB5,0xBA,0xBB,0xBC,0x7B,0x7B,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0x41,0x41,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0x4C,0x4C,0x4C,0x4F,0x4C,0x60,0x57,0x57,0x4F,0xD9,0xDA,0xDB,0xDC,0x71,0x74,0xDF, -0x62,0x70,0x62,0x60,0x60,0x60,0x6C,0x6C,0x69,0x74,0x69,0x74,0x78,0x78,0x71,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0x74,0x69,0x69,0xFE,0xFF -}; - -uint16 to_uni_cp852_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x016F,0x0107,0x00E7, -0x0142,0x00EB,0x0150,0x0151,0x00EE,0x0179,0x00C4,0x0106, -0x00C9,0x0139,0x013A,0x00F4,0x00F6,0x013D,0x013E,0x015A, -0x015B,0x00D6,0x00DC,0x0164,0x0165,0x0141,0x00D7,0x010D, -0x00E1,0x00ED,0x00F3,0x00FA,0x0104,0x0105,0x017D,0x017E, -0x0118,0x0119,0x00AC,0x017A,0x010C,0x015F,0x00AB,0x00BB, -0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x011A, -0x015E,0x2563,0x2551,0x2557,0x255D,0x017B,0x017C,0x2510, -0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x0102,0x0103, -0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, -0x0111,0x0110,0x010E,0x00CB,0x010F,0x0147,0x00CD,0x00CE, -0x011B,0x2518,0x250C,0x2588,0x2584,0x0162,0x016E,0x2580, -0x00D3,0x00DF,0x00D4,0x0143,0x0144,0x0148,0x0160,0x0161, -0x0154,0x00DA,0x0155,0x0170,0x00FD,0x00DD,0x0163,0x00B4, -0x00AD,0x02DD,0x02DB,0x02C7,0x02D8,0x00A7,0x00F7,0x00B8, -0x00B0,0x00A8,0x02D9,0x0171,0x0158,0x0159,0x25A0,0x00A0 -}; - -#endif - -#ifdef HAVE_CHARSET_latin7 -uchar ctype_latin7_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x01,0x20,0x10,0x20,0x10,0x10,0x00,0x00,0x20,0x10,0x20,0x10,0x20,0x10,0x10,0x10, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x00,0x20,0x10,0x20,0x10,0x10,0x20, -0x48,0x20,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_latin7_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin7_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0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C,0xE2,0xE6,0xEE,0xF0,0xF2,0xF4,0xF6,0x48,0x49,0x4A,0x4B,0x20, -0x75,0x21,0x56,0x22,0x59,0x73,0x70,0x71,0x23,0x74,0x24,0x5A,0x25,0x4D,0x51,0x50, -0x26,0x54,0x55,0x57,0x58,0x72,0x2E,0x2F,0x27,0xE5,0x28,0x5B,0x29,0x4E,0x53,0x2A, -0x31,0xFE,0x65,0x66,0x67,0xFF,0x4C,0x68,0x2D,0x69,0xDA,0x61,0x6A,0x2D,0x6B,0x90, -0x6C,0x60,0x7D,0x7F,0x4F,0x6D,0x6E,0x6F,0xD3,0x7B,0xDB,0x62,0x77,0x78,0x79,0x90, -0x8E,0xB2,0x8A,0x96,0x88,0x8C,0xA4,0xA2,0x98,0x9E,0xF8,0xA0,0xAA,0xB8,0xB0,0xBE, -0xE1,0xC4,0xC6,0xCA,0xCE,0xD0,0xCC,0x63,0xEC,0xBC,0xDE,0xEA,0xE8,0xFA,0xFC,0xE0, -0x8E,0xB2,0x8A,0x96,0x88,0x8C,0xA4,0xA2,0x98,0x9E,0xF8,0xA0,0xAA,0xB8,0xB0,0xBE, -0xE1,0xC4,0xC6,0xCA,0xCE,0xD0,0xCC,0x64,0xEC,0xBC,0xDE,0xEA,0xE8,0xFA,0xFC,0x52 -}; - -uint16 to_uni_latin7_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x201D,0x00A2,0x00A3,0x00A4,0x201E,0x00A6,0x00A7, -0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6, -0x00B0,0x00B1,0x00B2,0x00B3,0x201C,0x00B5,0x00B6,0x00B7, -0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6, -0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112, -0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B, -0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7, -0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF, -0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113, -0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C, -0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7, -0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x2019 -}; - -#endif - -#ifdef HAVE_CHARSET_latin7 -uchar ctype_latin7_general_cs[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x01,0x20,0x10,0x20,0x10,0x10,0x00,0x00,0x20,0x10,0x20,0x10,0x20,0x10,0x10,0x10, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x00,0x20,0x10,0x20,0x10,0x10,0x20, -0x48,0x20,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_latin7_general_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin7_general_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5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xE7,0xEF,0xF1,0xF3,0xF5,0xF7,0x48,0x49,0x4A,0x4B,0x20, -0x75,0x21,0x56,0x22,0x59,0x73,0x70,0x71,0x23,0x74,0x24,0x5A,0x25,0x4D,0x51,0x50, -0x26,0x54,0x55,0x57,0x58,0x72,0x2E,0x2F,0x27,0xE5,0x28,0x5B,0x29,0x4E,0x53,0x2A, -0x31,0xFE,0x65,0x66,0x67,0xFF,0x4C,0x68,0xD3,0x69,0xDA,0x61,0x6A,0x2D,0x6B,0x90, -0x6C,0x60,0x7D,0x7F,0x4F,0x6D,0x6E,0x6F,0xD2,0x7B,0xDB,0x62,0x77,0x78,0x79,0x91, -0x8E,0xB2,0x8A,0x96,0x88,0x8C,0xA4,0xA2,0x98,0x9E,0xF8,0xA0,0xAA,0xB8,0xB0,0xBE, -0xE1,0xC4,0xC6,0xCA,0xCE,0xD0,0xCC,0x63,0xEC,0xBC,0xDE,0xEA,0xE8,0xFA,0xFC,0xE0, -0x8F,0xB3,0x8B,0x97,0x89,0x8D,0xA5,0xA3,0x99,0x9F,0xF9,0xA1,0xAB,0xB9,0xB1,0xBF, -0xE2,0xC5,0xC7,0xCB,0xCF,0xD1,0xCD,0x64,0xED,0xBD,0xDF,0xEB,0xE9,0xFB,0xFD,0x52 -}; - -uint16 to_uni_latin7_general_cs[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x201D,0x00A2,0x00A3,0x00A4,0x201E,0x00A6,0x00A7, -0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6, -0x00B0,0x00B1,0x00B2,0x00B3,0x201C,0x00B5,0x00B6,0x00B7, -0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6, -0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112, -0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B, -0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7, -0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF, -0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113, -0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C, -0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7, -0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x2019 -}; - -#endif - -#ifdef HAVE_CHARSET_macce -uchar ctype_macce_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x01,0x02,0x01,0x01,0x01,0x01,0x02,0x02,0x01,0x02,0x02,0x01,0x02,0x02,0x01, -0x02,0x01,0x02,0x02,0x01,0x02,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x02,0x02, -0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x02,0x01, -0x02,0x01,0x00,0x00,0x02,0x01,0x00,0x00,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01, -0x02,0x01,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x01,0x02,0x01, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x01,0x00,0x00,0x02,0x01, -0x02,0x01,0x00,0x00,0x02,0x01,0x02,0x01,0x01,0x02,0x01,0x01,0x02,0x01,0x01,0x01, -0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x01,0x01,0x02,0x01,0x00 -}; - -uchar to_lower_macce_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x8A,0x82,0x82,0x8E,0x88,0x9A,0x9F,0x87,0x88,0x8B,0x8A,0x8B,0x8D,0x8D,0x8E,0x90, -0x90,0x93,0x92,0x93,0x95,0x95,0x98,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9E,0x9E,0x9F, -0xA0,0xA1,0xAB,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xB0, -0xB0,0xB4,0xB2,0xB3,0xB4,0xFA,0xB6,0xB7,0xB8,0xBA,0xBA,0xBC,0xBC,0xBE,0xBE,0xC0, -0xC0,0xC4,0xC2,0xC3,0xC4,0xCB,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCE,0x9B,0xCE,0xD8, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xDA,0xDA,0xDE,0xDC,0xDD,0xDE,0xE0, -0xE0,0xE4,0xE2,0xE3,0xE4,0xE6,0xE6,0x87,0xE9,0xE9,0x92,0xEC,0xEC,0xF0,0x97,0x99, -0xF0,0xF3,0x9C,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFA,0xFD,0xB8,0xFD,0xAE,0xFF -}; - -uchar to_upper_macce_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x81,0x83,0x84,0x85,0x86,0xE7,0x84,0x89,0x80,0x89,0x8C,0x8C,0x83,0x8F, -0x8F,0x91,0xEA,0x91,0x94,0x94,0x96,0xEE,0x96,0xEF,0x85,0xCD,0xF2,0x9D,0x9D,0x86, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xA2,0xAC,0xAD,0xFE,0xAF, -0xAF,0xB1,0xB2,0xB3,0xB1,0xB5,0xB6,0xB7,0xFC,0xB9,0xB9,0xBB,0xBB,0xBD,0xBD,0xBF, -0xBF,0xC1,0xC2,0xC3,0xC1,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xC5,0xCC,0xCD,0xCC,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xCF,0xD9,0xD9,0xDB,0xDC,0xDD,0xDB,0xDF, -0xDF,0xE1,0xE2,0xE3,0xE1,0xE5,0xE5,0xE7,0xE8,0xE8,0xEA,0xEB,0xEB,0xED,0xEE,0xEF, -0xED,0xF1,0xF2,0xF1,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xB5,0xFB,0xFC,0xFB,0xFE,0xFF -}; - -uint16 to_uni_macce_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x00C4,0x0100,0x0101,0x00C9,0x0104,0x00D6,0x00DC,0x00E1, -0x0105,0x010C,0x00E4,0x010D,0x0106,0x0107,0x00E9,0x0179, -0x017A,0x010E,0x00ED,0x010F,0x0112,0x0113,0x0116,0x00F3, -0x0117,0x00F4,0x00F6,0x00F5,0x00FA,0x011A,0x011B,0x00FC, -0x2020,0x00B0,0x0118,0x00A3,0x00A7,0x2022,0x00B6,0x00DF, -0x00AE,0x00A9,0x2122,0x0119,0x00A8,0x2260,0x0123,0x012E, -0x012F,0x012A,0x2264,0x2265,0x012B,0x0136,0x2202,0x2211, -0x0142,0x013B,0x013C,0x013D,0x013E,0x0139,0x013A,0x0145, -0x0146,0x0143,0x00AC,0x221A,0x0144,0x0147,0x2206,0x00AB, -0x00BB,0x2026,0x00A0,0x0148,0x0150,0x00D5,0x0151,0x014C, -0x2013,0x2014,0x201C,0x201D,0x2018,0x2019,0x00F7,0x25CA, -0x014D,0x0154,0x0155,0x0158,0x2039,0x203A,0x0159,0x0156, -0x0157,0x0160,0x201A,0x201E,0x0161,0x015A,0x015B,0x00C1, -0x0164,0x0165,0x00CD,0x017D,0x017E,0x016A,0x00D3,0x00D4, -0x016B,0x016E,0x00DA,0x016F,0x0170,0x0171,0x0172,0x0173, -0x00DD,0x00FD,0x0137,0x017B,0x0141,0x017C,0x0122,0x02C7 -}; - -#endif - -#ifdef HAVE_CHARSET_cp1250 -uchar ctype_cp1250_croatian_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x20,0x20,0x10,0x20,0x10,0x10,0x10,0x10,0x20,0x10,0x01,0x10,0x01,0x01,0x01,0x01, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x10,0x02,0x10,0x02,0x02,0x02,0x02, -0x48,0x10,0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01, -0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x02,0x10,0x01,0x10,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_cp1250_croatian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0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9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1250_croatian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_cp1250_croatian_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x43,0x44,0x48,0x4B,0x4D,0x4E,0x4F,0x50,0x52,0x53,0x54,0x56,0x57,0x59, -0x5B,0x5C,0x5D,0x5F,0x62,0x64,0x66,0x67,0x68,0x69,0x6B,0x90,0x91,0x92,0x93,0x94, -0x95,0x41,0x43,0x44,0x48,0x4B,0x4D,0x4E,0x4F,0x50,0x52,0x53,0x54,0x56,0x57,0x59, -0x5B,0x5C,0x5D,0x5F,0x62,0x64,0x66,0x67,0x68,0x69,0x6B,0x96,0x97,0x98,0x99,0x9A, -0x9B,0x9C,0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0x60,0xA6,0x5F,0x62,0x6C,0x6B, -0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0x60,0xB1,0x5F,0x62,0x6C,0x6B, -0xB2,0xB3,0xB4,0x54,0xB5,0x41,0xB6,0xB7,0xB8,0xB9,0x5F,0xBA,0xBB,0xBC,0xBD,0x6B, -0xBE,0xBF,0xC0,0x54,0xC1,0xC2,0xC3,0xC4,0xC5,0x41,0x5F,0xC6,0x54,0xC7,0x54,0x6B, -0x5D,0x41,0x41,0x41,0x41,0x54,0x47,0x44,0x46,0x4B,0x4B,0x4B,0x4B,0x50,0x50,0x48, -0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xC8,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0x5F, -0x5D,0x41,0x41,0x41,0x41,0x54,0x47,0x44,0x46,0x4B,0x4B,0x4B,0x4B,0x50,0x50,0x48, -0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xC9,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF -}; - -uint16 to_uni_cp1250_croatian_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179, -0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A, -0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7, -0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B, -0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x10,0x00,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x01,0x00,0x01,0x00, -0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x02,0x00,0x02,0x01, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_latin1_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0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F -}; - -uchar to_upper_latin1_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_latin1_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x51,0x53,0x57,0x5B,0x65,0x67,0x69,0x6B,0x75,0x77,0x79,0x7B,0x7D,0x81, -0x8F,0x91,0x93,0x95,0x98,0x9A,0xA4,0xA6,0xA8,0xAA,0xAF,0xB3,0xB4,0xB5,0xB6,0xB7, -0xB8,0x41,0x51,0x53,0x57,0x5B,0x65,0x67,0x69,0x6B,0x75,0x77,0x79,0x7B,0x7D,0x81, -0x8F,0x91,0x93,0x95,0x98,0x9A,0xA4,0xA6,0xA8,0xAA,0xAF,0xB9,0xBA,0xBB,0xBC,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0x43,0x45,0x47,0x49,0x4B,0x4D,0x4F,0x55,0x5D,0x5F,0x61,0x63,0x6D,0x6F,0x71,0x73, -0x59,0x7F,0x83,0x85,0x87,0x89,0x8B,0xBD,0x8D,0x9C,0x9E,0xA0,0xA2,0xAC,0xB1,0x97, -0x43,0x45,0x47,0x49,0x4B,0x4D,0x4F,0x55,0x5D,0x5F,0x61,0x63,0x6D,0x6F,0x71,0x73, -0x59,0x7F,0x83,0x85,0x87,0x89,0x8B,0xBE,0x8D,0x9C,0x9E,0xA0,0xA2,0xAC,0xB1,0xAE -}; - -uint16 to_uni_latin1_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0081,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, -0x02C6,0x2030,0x0160,0x2039,0x0152,0x008D,0x017D,0x008F, -0x0090,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x02DC,0x2122,0x0161,0x203A,0x0153,0x009D,0x017E,0x0178, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF -}; - -#endif - -#ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_general_cs[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x10,0x00,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x01,0x00,0x01,0x00, -0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x02,0x00,0x02,0x01, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_latin1_general_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x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,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin1_general_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_latin1_general_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x51,0x53,0x57,0x5B,0x65,0x67,0x69,0x6B,0x75,0x77,0x79,0x7B,0x7D,0x81, -0x8F,0x91,0x93,0x95,0x98,0x9A,0xA4,0xA6,0xA8,0xAA,0xAF,0xB3,0xB4,0xB5,0xB6,0xB7, -0xB8,0x42,0x52,0x54,0x58,0x5C,0x66,0x68,0x6A,0x6C,0x76,0x78,0x7A,0x7C,0x7E,0x82, -0x90,0x92,0x94,0x96,0x99,0x9B,0xA5,0xA7,0xA9,0xAB,0xB0,0xB9,0xBA,0xBB,0xBC,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0x43,0x45,0x47,0x49,0x4B,0x4D,0x4F,0x55,0x5D,0x5F,0x61,0x63,0x6D,0x6F,0x71,0x73, -0x59,0x7F,0x83,0x85,0x87,0x89,0x8B,0xBD,0x8D,0x9C,0x9E,0xA0,0xA2,0xAC,0xB1,0x97, -0x44,0x46,0x48,0x4A,0x4C,0x4E,0x50,0x56,0x5E,0x60,0x62,0x64,0x6E,0x70,0x72,0x74, -0x5A,0x80,0x84,0x86,0x88,0x8A,0x8C,0xBE,0x8E,0x9D,0x9F,0xA1,0xA3,0xAD,0xB2,0xAE -}; - -uint16 to_uni_latin1_general_cs[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0081,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, -0x02C6,0x2030,0x0160,0x2039,0x0152,0x008D,0x017D,0x008F, -0x0090,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x02DC,0x2122,0x0161,0x203A,0x0153,0x009D,0x017E,0x0178, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF -}; - -#endif - -#ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01, -0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02, -0x00,0x01,0x02,0x01,0x00,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01, -0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x01,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_cp1251_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x90,0x83,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA2,0xA2,0xBC,0xA4,0xB4,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB3,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1251_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x81,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x8E,0x8F, -0xA0,0xA1,0xA1,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB2,0xA5,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xA3,0xBD,0xBD,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF -}; - -uint16 to_uni_cp1251_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, -0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, -0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, -0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407, -0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7, -0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, -0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, -0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, -0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, -0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, -0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, -0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F -}; - -#endif - -#ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01, -0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02, -0x00,0x01,0x02,0x01,0x00,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01, -0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x01,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_cp1251_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x90,0x83,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA2,0xA2,0xBC,0xA4,0xB4,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB3,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1251_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1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5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF -}; - -uchar sort_order_cp1251_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x43,0x45,0x47,0x49,0x4B,0x4D,0x4F,0x51,0x53,0x55,0x57,0x59,0x5B,0x5D, -0x5F,0x61,0x63,0x65,0x67,0x69,0x6B,0x6D,0x6F,0x71,0x73,0xD3,0xD4,0xD5,0xD6,0xD7, -0xD8,0x41,0x43,0x45,0x47,0x49,0x4B,0x4D,0x4F,0x51,0x53,0x55,0x57,0x59,0x5B,0x5D, -0x5F,0x61,0x63,0x65,0x67,0x69,0x6B,0x6D,0x6F,0x71,0x73,0xD9,0xDA,0xDB,0xDC,0xDD, -0x81,0x83,0xDE,0x83,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xA1,0xE5,0xA7,0x9D,0xB3,0xC1, -0x81,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xA1,0xEF,0xA7,0x9D,0xB3,0xC1, -0xF0,0xB7,0xB7,0x99,0xF1,0x7D,0xF2,0xF3,0x87,0xF4,0x89,0xF5,0xF6,0xF7,0xF8,0x95, -0xF9,0xFA,0x93,0x93,0x7D,0xFB,0xFC,0xFD,0x87,0xFE,0x89,0xFF,0x99,0x8F,0x8F,0x95, -0x75,0x77,0x79,0x7B,0x7F,0x85,0x8B,0x8D,0x91,0x97,0x9B,0x9F,0xA3,0xA5,0xA9,0xAB, -0xAD,0xAF,0xB1,0xB5,0xB9,0xBB,0xBD,0xBF,0xC3,0xC5,0xC7,0xC9,0xCB,0xCD,0xCF,0xD1, -0x75,0x77,0x79,0x7B,0x7F,0x85,0x8B,0x8D,0x91,0x97,0x9B,0x9F,0xA3,0xA5,0xA9,0xAB, -0xAD,0xAF,0xB1,0xB5,0xB9,0xBB,0xBD,0xBF,0xC3,0xC5,0xC7,0xC9,0xCB,0xCD,0xCF,0xD1 -}; - -uint16 to_uni_cp1251_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, -0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, -0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, -0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407, -0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7, -0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, -0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, -0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, -0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, -0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, -0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, -0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F -}; - -#endif - -#ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_general_cs[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01, -0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02, -0x00,0x01,0x02,0x01,0x00,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01, -0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x01,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_cp1251_general_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x90,0x83,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA2,0xA2,0xBC,0xA4,0xB4,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB3,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1251_general_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22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DC,0xDD,0xDE,0xDF -}; - -uchar sort_order_cp1251_general_cs[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x43,0x45,0x47,0x49,0x4B,0x4D,0x4F,0x51,0x53,0x55,0x57,0x59,0x5B,0x5D, -0x5F,0x61,0x63,0x65,0x67,0x69,0x6B,0x6D,0x6F,0x71,0x73,0xD3,0xD4,0xD5,0xD6,0xD7, -0xD8,0x42,0x44,0x46,0x48,0x4A,0x4C,0x4E,0x50,0x52,0x54,0x56,0x58,0x5A,0x5C,0x5E, -0x60,0x62,0x64,0x66,0x68,0x6A,0x6C,0x6E,0x70,0x72,0x74,0xD9,0xDA,0xDB,0xDC,0xDD, -0x81,0x83,0xDE,0x84,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xA1,0xE5,0xA7,0x9D,0xB3,0xC1, -0x82,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xA2,0xEF,0xA8,0x9E,0xB4,0xC2, -0xF0,0xB7,0xB8,0x99,0xF1,0x7D,0xF2,0xF3,0x87,0xF4,0x89,0xF5,0xF6,0xF7,0xF8,0x95, -0xF9,0xFA,0x93,0x94,0x7E,0xFB,0xFC,0xFD,0x88,0xFE,0x8A,0xFF,0x9A,0x8F,0x90,0x96, -0x75,0x77,0x79,0x7B,0x7F,0x85,0x8B,0x8D,0x91,0x97,0x9B,0x9F,0xA3,0xA5,0xA9,0xAB, -0xAD,0xAF,0xB1,0xB5,0xB9,0xBB,0xBD,0xBF,0xC3,0xC5,0xC7,0xC9,0xCB,0xCD,0xCF,0xD1, -0x76,0x78,0x7A,0x7C,0x80,0x86,0x8C,0x8E,0x92,0x98,0x9C,0xA0,0xA4,0xA6,0xAA,0xAC, -0xAE,0xB0,0xB2,0xB6,0xBA,0xBC,0xBE,0xC0,0xC4,0xC6,0xC8,0xCA,0xCC,0xCE,0xD0,0xD2 -}; - -uint16 to_uni_cp1251_general_cs[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, -0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, -0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, -0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407, -0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7, -0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, -0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, -0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, -0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, -0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, -0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, -0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F -}; - -#endif - -#ifdef HAVE_CHARSET_macroman -uchar ctype_macroman_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x10, -0x20,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02, -0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x01,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x00,0x01,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -uchar to_lower_macroman_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x8A,0x8C,0x8D,0x8E,0x96,0x9A,0x9F,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xBE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0x88,0x8B,0x9B,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD8,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0x89,0x90,0x87,0x91,0x8F,0x92,0x94,0x95,0x93,0x97,0x99, -0xF0,0x98,0x9C,0x9E,0x9D,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_macroman_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D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0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x00C4,0x00C5,0x00C7,0x00C9,0x00D1,0x00D6,0x00DC,0x00E1, -0x00E0,0x00E2,0x00E4,0x00E3,0x00E5,0x00E7,0x00E9,0x00E8, -0x00EA,0x00EB,0x00ED,0x00EC,0x00EE,0x00EF,0x00F1,0x00F3, -0x00F2,0x00F4,0x00F6,0x00F5,0x00FA,0x00F9,0x00FB,0x00FC, -0x2020,0x00B0,0x00A2,0x00A3,0x00A7,0x2022,0x00B6,0x00DF, -0x00AE,0x00A9,0x2122,0x00B4,0x00A8,0x2260,0x00C6,0x00D8, -0x221E,0x00B1,0x2264,0x2265,0x00A5,0x00B5,0x2202,0x2211, -0x220F,0x03C0,0x222B,0x00AA,0x00BA,0x03A9,0x00E6,0x00F8, -0x00BF,0x00A1,0x00AC,0x221A,0x0192,0x2248,0x2206,0x00AB, -0x00BB,0x2026,0x00A0,0x00C0,0x00C3,0x00D5,0x0152,0x0153, -0x2013,0x2014,0x201C,0x201D,0x2018,0x2019,0x00F7,0x25CA, -0x00FF,0x0178,0x2044,0x20AC,0x2039,0x203A,0xFB01,0xFB02, -0x2021,0x00B7,0x201A,0x201E,0x2030,0x00C2,0x00CA,0x00C1, -0x00CB,0x00C8,0x00CD,0x00CE,0x00CF,0x00CC,0x00D3,0x00D4, -0xF8FF,0x00D2,0x00DA,0x00DB,0x00D9,0x0131,0x02C6,0x02DC, -0x00AF,0x02D8,0x02D9,0x02DA,0x00B8,0x02DD,0x02DB,0x02C7 -}; - -#endif - -#ifdef HAVE_CHARSET_cp1256 -uchar ctype_cp1256_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x00,0x00, -0x00,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x03,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x00, -0x03,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, -0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x00, -0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x00,0x00,0x00,0x10, -0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, -0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, -0x02,0x03,0x02,0x03,0x03,0x03,0x03,0x02,0x02,0x02,0x02,0x02,0x03,0x03,0x02,0x02, -0x03,0x03,0x03,0x03,0x02,0x03,0x03,0x00,0x03,0x02,0x03,0x02,0x02,0x00,0x00,0x00 -}; - -uchar to_lower_cp1256_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x9C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1256_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5F,0x5E,0x5F, -0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7F,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x8C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_cp1256_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0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0x7A,0xFD,0xFE,0xFF -}; - -uint16 to_uni_cp1256_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x067E,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, -0x02C6,0x2030,0x0000,0x2039,0x0152,0x0686,0x0698,0x0000, -0x06AF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0000,0x203A,0x0153,0x200C,0x200D,0x0000, -0x00A0,0x060C,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x0000,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x061B,0x00BB,0x00BC,0x00BD,0x00BE,0x061F, -0x0000,0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627, -0x0628,0x0629,0x062A,0x062B,0x062C,0x062D,0x062E,0x062F, -0x0630,0x0631,0x0632,0x0633,0x0634,0x0635,0x0636,0x00D7, -0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, -0x00E0,0x0644,0x00E2,0x0645,0x0646,0x0647,0x0648,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x0649,0x064A,0x00EE,0x00EF, -0x064B,0x064C,0x064D,0x064E,0x00F4,0x064F,0x0650,0x00F7, -0x0651,0x00F9,0x0652,0x00FB,0x00FC,0x200E,0x200F,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_cp1257 -uchar ctype_cp1257_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 -}; - -uchar to_lower_cp1257_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0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0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uint16 to_uni_cp1257_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0000,0x2039,0x0000,0x00A8,0x02C7,0x00B8, -0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0000,0x203A,0x0000,0x00AF,0x02DB,0x0000, -0x00A0,0x0000,0x00A2,0x00A3,0x00A4,0x0000,0x00A6,0x00A7, -0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6, -0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112, -0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B, -0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7, -0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF, -0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113, -0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C, -0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7, -0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_cp1257 -uchar ctype_cp1257_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 -}; - -uchar to_lower_cp1257_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1257_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_cp1257_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x4D,0x4F,0x55,0x57,0x61,0x63,0x67,0x69,0x6F,0x71,0x75,0x7B,0x7D,0x83, -0x8F,0x91,0x93,0x97,0x9E,0xA0,0xA8,0xAA,0xAC,0xAE,0xB0,0xB8,0xB9,0xBA,0xBB,0xBC, -0xBD,0x41,0x4D,0x4F,0x55,0x57,0x61,0x63,0x67,0x69,0x6F,0x71,0x75,0x7B,0x7D,0x83, -0x8F,0x91,0x93,0x97,0x9E,0xA0,0xA8,0xAA,0xAC,0xAE,0xB0,0xBE,0xBF,0xC0,0xC1,0xC4, -0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4, -0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4, -0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0x83,0xED,0x93,0xEE,0xEF,0xF0,0xF1,0x41, -0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0x83,0xFA,0x93,0xFB,0xFC,0xFD,0xFE,0x41, -0x41,0x69,0x41,0x4F,0x41,0x41,0x57,0x57,0x4F,0x57,0xB0,0x57,0x63,0x71,0x69,0x75, -0x97,0x7D,0x7D,0x83,0x83,0x83,0x83,0xC2,0xA0,0x75,0x97,0xA0,0xA0,0xB0,0xB0,0x97, -0x41,0x69,0x41,0x4F,0x41,0x41,0x57,0x57,0x4F,0x57,0xB0,0x57,0x63,0x71,0x69,0x75, -0x97,0x7D,0x7D,0x83,0x83,0x83,0x83,0xC3,0xA0,0x75,0x97,0xA0,0xA0,0xB0,0xB0,0xFF -}; - -uint16 to_uni_cp1257_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0000,0x2039,0x0000,0x00A8,0x02C7,0x00B8, -0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0000,0x203A,0x0000,0x00AF,0x02DB,0x0000, -0x00A0,0x0000,0x00A2,0x00A3,0x00A4,0x0000,0x00A6,0x00A7, -0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6, -0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112, -0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B, -0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7, -0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF, -0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113, -0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C, -0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7, -0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_armscii8 -uchar ctype_armscii8_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x10,0x10 -}; - -uchar to_lower_armscii8_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB3,0xB3,0xB5,0xB5,0xB7,0xB7,0xB9,0xB9,0xBB,0xBB,0xBD,0xBD,0xBF,0xBF, -0xC1,0xC1,0xC3,0xC3,0xC5,0xC5,0xC7,0xC7,0xC9,0xC9,0xCB,0xCB,0xCD,0xCD,0xCF,0xCF, -0xD1,0xD1,0xD3,0xD3,0xD5,0xD5,0xD7,0xD7,0xD9,0xD9,0xDB,0xDB,0xDD,0xDD,0xDF,0xDF, -0xE1,0xE1,0xE3,0xE3,0xE5,0xE5,0xE7,0xE7,0xE9,0xE9,0xEB,0xEB,0xED,0xED,0xEF,0xEF, -0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFB,0xFB,0xFD,0xFD,0xFE,0xFF -}; - -uchar to_upper_armscii8_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB2,0xB4,0xB4,0xB6,0xB6,0xB8,0xB8,0xBA,0xBA,0xBC,0xBC,0xBE,0xBE, -0xC0,0xC0,0xC2,0xC2,0xC4,0xC4,0xC6,0xC6,0xC8,0xC8,0xCA,0xCA,0xCC,0xCC,0xCE,0xCE, -0xD0,0xD0,0xD2,0xD2,0xD4,0xD4,0xD6,0xD6,0xD8,0xD8,0xDA,0xDA,0xDC,0xDC,0xDE,0xDE, -0xE0,0xE0,0xE2,0xE2,0xE4,0xE4,0xE6,0xE6,0xE8,0xE8,0xEA,0xEA,0xEC,0xEC,0xEE,0xEE, -0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFE,0xFF -}; - -uint16 to_uni_armscii8_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x2741,0x00A7,0x0589,0x0029,0x0028,0x00BB,0x00AB, -0x2014,0x002E,0x055D,0x002C,0x002D,0x055F,0x2026,0x055C, -0x055B,0x055E,0x0531,0x0561,0x0532,0x0562,0x0533,0x0563, -0x0534,0x0564,0x0535,0x0565,0x0536,0x0566,0x0537,0x0567, -0x0538,0x0568,0x0539,0x0569,0x053A,0x056A,0x053B,0x056B, -0x053C,0x056C,0x053D,0x056D,0x053E,0x056E,0x053F,0x056F, -0x0540,0x0570,0x0541,0x0571,0x0542,0x0572,0x0543,0x0573, -0x0544,0x0574,0x0545,0x0575,0x0546,0x0576,0x0547,0x0577, -0x0548,0x0578,0x0549,0x0579,0x054A,0x057A,0x054B,0x057B, -0x054C,0x057C,0x054D,0x057D,0x054E,0x057E,0x054F,0x057F, -0x0550,0x0580,0x0551,0x0581,0x0552,0x0582,0x0553,0x0583, -0x0554,0x0584,0x0555,0x0585,0x0556,0x0586,0x2019,0x0027 -}; - -#endif - -#ifdef HAVE_CHARSET_ascii -uchar ctype_ascii_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -uchar to_lower_ascii_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_ascii_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_ascii_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_cp1250 -uchar ctype_cp1250_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x20,0x20,0x10,0x20,0x10,0x10,0x10,0x10,0x20,0x10,0x01,0x10,0x01,0x01,0x01,0x01, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x10,0x02,0x10,0x02,0x02,0x02,0x02, -0x48,0x10,0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01, -0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x02,0x10,0x01,0x10,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_cp1250_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xB3,0xA4,0xB9,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBE,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1250_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uint16 to_uni_cp1250_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179, -0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A, -0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7, -0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B, -0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_cp1256 -uchar ctype_cp1256_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x00,0x00, -0x00,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x03,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x00, -0x03,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, -0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x00, -0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x00,0x00,0x00,0x10, -0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, -0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, -0x02,0x03,0x02,0x03,0x03,0x03,0x03,0x02,0x02,0x02,0x02,0x02,0x03,0x03,0x02,0x02, -0x03,0x03,0x03,0x03,0x02,0x03,0x03,0x00,0x03,0x02,0x03,0x02,0x02,0x00,0x00,0x00 -}; - -uchar to_lower_cp1256_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x9C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1256_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5F,0x5E,0x5F, -0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7F,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x8C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_cp1256_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x067E,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, -0x02C6,0x2030,0x0000,0x2039,0x0152,0x0686,0x0698,0x0000, -0x06AF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0000,0x203A,0x0153,0x200C,0x200D,0x0000, -0x00A0,0x060C,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x0000,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x061B,0x00BB,0x00BC,0x00BD,0x00BE,0x061F, -0x0000,0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627, -0x0628,0x0629,0x062A,0x062B,0x062C,0x062D,0x062E,0x062F, -0x0630,0x0631,0x0632,0x0633,0x0634,0x0635,0x0636,0x00D7, -0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, -0x00E0,0x0644,0x00E2,0x0645,0x0646,0x0647,0x0648,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x0649,0x064A,0x00EE,0x00EF, -0x064B,0x064C,0x064D,0x064E,0x00F4,0x064F,0x0650,0x00F7, -0x0651,0x00F9,0x0652,0x00FB,0x00FC,0x200E,0x200F,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_cp866 -uchar ctype_cp866_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48 -}; - -uchar to_lower_cp866_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0x86,0x87,0x88,0x89,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0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0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_cp866_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, -0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, -0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, -0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, -0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, -0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, -0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, -0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, -0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, -0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, -0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, -0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, -0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F, -0x0401,0x0451,0x0404,0x0454,0x0407,0x0457,0x040E,0x045E, -0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 -}; - -#endif - -#ifdef HAVE_CHARSET_dec8 -uchar ctype_dec8_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_dec8_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_dec8_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uint16 to_uni_dec8_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x00A1,0x00A2,0x00A3,0x0000,0x00A5,0x0000,0x00A7, -0x00A4,0x00A9,0x00AA,0x00AB,0x0000,0x0000,0x0000,0x0000, -0x00B0,0x00B1,0x00B2,0x00B3,0x0000,0x00B5,0x00B6,0x00B7, -0x0000,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x0000,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x0000,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x0152, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0178,0x0000,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x0000,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x0153, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FF,0x0000,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_greek -uchar ctype_greek_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x00,0x00,0x10,0x10,0x10,0x10,0x00,0x10,0x10,0x10,0x00,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x01,0x01,0x01,0x10,0x01,0x10,0x01,0x01, -0x02,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 -}; - -uchar to_lower_greek_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xDC,0xB7,0xDD,0xDE,0xDF,0xBB,0xFC,0xBD,0xFD,0xFE, -0xC0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xD2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_greek_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xDA,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xC1,0xC5,0xC7,0xC9, -0xDB,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xCF,0xD5,0xD9,0xFF -}; - -uint16 to_uni_greek_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x02BD,0x02BC,0x00A3,0x0000,0x0000,0x00A6,0x00A7, -0x00A8,0x00A9,0x0000,0x00AB,0x00AC,0x00AD,0x0000,0x2015, -0x00B0,0x00B1,0x00B2,0x00B3,0x0384,0x0385,0x0386,0x00B7, -0x0388,0x0389,0x038A,0x00BB,0x038C,0x00BD,0x038E,0x038F, -0x0390,0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397, -0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F, -0x03A0,0x03A1,0x0000,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7, -0x03A8,0x03A9,0x03AA,0x03AB,0x03AC,0x03AD,0x03AE,0x03AF, -0x03B0,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7, -0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF, -0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7, -0x03C8,0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_hebrew -uchar ctype_hebrew_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00 -}; - -uchar to_lower_hebrew_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A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E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_hebrew_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x0000,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00D7,0x00AB,0x00AC,0x00AD,0x00AE,0x203E, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00F7,0x00BB,0x00BC,0x00BD,0x00BE,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2017, -0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7, -0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF, -0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7, -0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x200E,0x200F,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_hp8 -uchar ctype_hp8_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x02,0x02, -0x01,0x10,0x10,0x01,0x02,0x10,0x10,0x02,0x01,0x10,0x01,0x01,0x01,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x20,0x20,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20 -}; - -uchar to_lower_hp8_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x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,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB1,0xB3,0xB4,0xB4,0xB6,0xB6,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xA2,0xA4,0xDF,0xAE,0xE0,0xDC,0xE7,0xED,0xA1,0xA3,0xE8,0xAD,0xD8,0xA5,0xDA,0xDB, -0xD0,0xA6,0xD2,0xD3,0xD0,0xE5,0xD2,0xD3,0xD8,0xE6,0xDA,0xDB,0xDC,0xA7,0xDE,0xDF, -0xE0,0xE1,0xE1,0xE3,0xE3,0xE5,0xE6,0xE7,0xE8,0xE9,0xE9,0xEB,0xEB,0xED,0xEE,0xEE, -0xF0,0xF0,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_hp8_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x00C0,0x00C2,0x00C8,0x00CA,0x00CB,0x00CE,0x00CF, -0x00B4,0x02CB,0x02C6,0x00A8,0x02DC,0x00D9,0x00DB,0x20A4, -0x00AF,0x00DD,0x00FD,0x00B0,0x00C7,0x00E7,0x00D1,0x00F1, -0x00A1,0x00BF,0x00A4,0x00A3,0x00A5,0x00A7,0x0192,0x00A2, -0x00E2,0x00EA,0x00F4,0x00FB,0x00E1,0x00E9,0x00F3,0x00FA, -0x00E0,0x00E8,0x00F2,0x00F9,0x00E4,0x00EB,0x00F6,0x00FC, -0x00C5,0x00EE,0x00D8,0x00C6,0x00E5,0x00ED,0x00F8,0x00E6, -0x00C4,0x00EC,0x00D6,0x00DC,0x00C9,0x00EF,0x00DF,0x00D4, -0x00C1,0x00C3,0x00E3,0x00D0,0x00F0,0x00CD,0x00CC,0x00D3, -0x00D2,0x00D5,0x00F5,0x0160,0x0161,0x00DA,0x0178,0x00FF, -0x00DE,0x00FE,0x00B7,0x00B5,0x00B6,0x00BE,0x2014,0x00BC, -0x00BD,0x00AA,0x00BA,0x00AB,0x25A0,0x00BB,0x00B1,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_keybcs2 -uchar ctype_keybcs2_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x02,0x82,0x02,0x02,0x01,0x01,0x02,0x82,0x81,0x01,0x01,0x02,0x02,0x01,0x01, -0x81,0x02,0x01,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x02,0x02,0x01,0x02,0x01,0x02,0x00,0x02,0x01,0x01,0x01,0x02,0x00,0x02,0x02,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48 -}; - -uchar to_lower_keybcs2_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x87,0x81,0x82,0x83,0x84,0x83,0x86,0x87,0x88,0x88,0x8D,0xA1,0x8C,0x8D,0x84,0xA0, -0x82,0x91,0x91,0x93,0x94,0xA2,0x96,0xA3,0x98,0x94,0x81,0x9B,0x8C,0x98,0xA9,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA4,0x96,0x93,0x9B,0xA9,0xAA,0xAA,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xED,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_keybcs2_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x68,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x87,0x9A,0x90,0x85,0x8E,0x85,0x86,0x80,0x89,0x89,0x8A,0x8B,0x9C,0x8A,0x8E,0x8F, -0x90,0x92,0x92,0xA7,0x99,0x95,0xA6,0x97,0x9D,0x99,0x9A,0xA8,0x9C,0x9D,0x9E,0x9F, -0x8F,0x8B,0x95,0x97,0xA5,0xA5,0xA6,0xA7,0xA8,0x9E,0xAB,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xE8,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_keybcs2_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x010C,0x00FC,0x00E9,0x010F,0x00E4,0x010E,0x0164,0x010D, -0x011B,0x011A,0x0139,0x00CD,0x013E,0x013A,0x00C4,0x00C1, -0x00C9,0x017E,0x017D,0x00F4,0x00F6,0x00D3,0x016F,0x00DA, -0x00FD,0x00D6,0x00DC,0x0160,0x013D,0x00DD,0x0158,0x0165, -0x00E1,0x00ED,0x00F3,0x00FA,0x0148,0x0147,0x016E,0x00D4, -0x0161,0x0159,0x0155,0x0154,0x00BC,0x00A1,0x00AB,0x00BB, -0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, -0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, -0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, -0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, -0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, -0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, -0x03B1,0x00DF,0x0393,0x03C0,0x03A3,0x03C3,0x00B5,0x03C4, -0x03A6,0x0398,0x03A9,0x03B4,0x221E,0x03C6,0x03B5,0x2229, -0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, -0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 -}; - -#endif - -#ifdef HAVE_CHARSET_koi8r -uchar ctype_koi8r_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 -}; - -uchar to_lower_koi8r_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF -}; - -uchar to_upper_koi8r_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xB3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_koi8r_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524, -0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590, -0x2591,0x2592,0x2593,0x2320,0x25A0,0x2219,0x221A,0x2248, -0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7, -0x2550,0x2551,0x2552,0x0451,0x2553,0x2554,0x2555,0x2556, -0x2557,0x2558,0x2559,0x255A,0x255B,0x255C,0x255D,0x255E, -0x255F,0x2560,0x2561,0x0401,0x2562,0x2563,0x2564,0x2565, -0x2566,0x2567,0x2568,0x2569,0x256A,0x256B,0x256C,0x00A9, -0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433, -0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, -0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432, -0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A, -0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413, -0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412, -0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A -}; - -#endif - -#ifdef HAVE_CHARSET_koi8u -uchar ctype_koi8u_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x02,0x02,0x10,0x02,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10, -0x10,0x10,0x10,0x01,0x01,0x10,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x10, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 -}; - -uchar to_lower_koi8u_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x20,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0xA3,0xA4,0x20,0xA6,0xA7,0x20,0x20,0x20,0x20,0x20,0xAD,0x20,0x20, -0x20,0x20,0x20,0xA3,0xA4,0x20,0xA6,0xA7,0x20,0x20,0x20,0x20,0x20,0xAD,0x20,0x20, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF -}; - -uchar to_upper_koi8u_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x20,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0xB3,0xB4,0x20,0xB6,0xB7,0x20,0x20,0x20,0x20,0x20,0xBD,0x20,0x20, -0x20,0x20,0x20,0xB3,0xB4,0x20,0xB6,0xB7,0x20,0x20,0x20,0x20,0x20,0xBD,0x20,0x20, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_koi8u_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524, -0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590, -0x2591,0x2592,0x2593,0x2320,0x25A0,0x2022,0x221A,0x2248, -0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7, -0x2550,0x2551,0x2552,0x0451,0x0454,0x2554,0x0456,0x0457, -0x2557,0x2558,0x2559,0x255A,0x255B,0x0491,0x255D,0x255E, -0x255F,0x2560,0x2561,0x0401,0x0404,0x2563,0x0406,0x0407, -0x2566,0x2567,0x2568,0x2569,0x256A,0x0490,0x256C,0x00A9, -0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433, -0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, -0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432, -0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A, -0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413, -0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412, -0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A -}; - -#endif - -#ifdef HAVE_CHARSET_latin2 -uchar ctype_latin2_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x01,0x10,0x01,0x10,0x01,0x01,0x10,0x10,0x01,0x01,0x01,0x01,0x10,0x01,0x01, -0x10,0x02,0x10,0x02,0x10,0x02,0x02,0x10,0x10,0x02,0x02,0x02,0x02,0x10,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_latin2_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xB1,0xA2,0xB3,0xA4,0xB5,0xB6,0xA7,0xA8,0xB9,0xBA,0xBB,0xBC,0xAD,0xBE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin2_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27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- -uint16 to_uni_latin2_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7, -0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B, -0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7, -0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - -#endif - -#ifdef HAVE_CHARSET_latin5 -uchar ctype_latin5_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_latin5_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0xFD,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0x69,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin5_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0xDD,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0x49,0xDE,0xFF -}; - -uint16 to_uni_latin5_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x011E,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0130,0x015E,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x011F,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x0131,0x015F,0x00FF -}; - -#endif - -#ifdef HAVE_CHARSET_latin7 -uchar ctype_latin7_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x01,0x20,0x10,0x20,0x10,0x10,0x00,0x00,0x20,0x10,0x20,0x10,0x20,0x10,0x10,0x10, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x00,0x20,0x10,0x20,0x10,0x10,0x20, -0x48,0x20,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_latin7_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin7_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xBC,0xBD,0xBE,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uint16 to_uni_latin7_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x00A0,0x201D,0x00A2,0x00A3,0x00A4,0x201E,0x00A6,0x00A7, -0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6, -0x00B0,0x00B1,0x00B2,0x00B3,0x201C,0x00B5,0x00B6,0x00B7, -0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6, -0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112, -0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B, -0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7, -0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF, -0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113, -0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C, -0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7, -0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x2019 -}; - -#endif - -#ifdef HAVE_CHARSET_cp850 -uchar ctype_cp850_bin[] = { -0x00, -0x20,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x30,0x30, -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x30,0x30,0x30,0x30,0x30, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x30, -0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01, -0x01,0x02,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x02,0x10,0x01,0x10,0x10, -0x02,0x02,0x02,0x02,0x02,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x02,0x01,0x01,0x01,0x01,0x02,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x10, -0x01,0x02,0x01,0x01,0x02,0x01,0x10,0x02,0x01,0x01,0x01,0x01,0x02,0x01,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20 -}; - -uchar to_lower_cp850_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x87,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x84,0x86, -0x82,0x91,0x91,0x93,0x94,0x95,0x96,0x97,0x98,0x94,0x81,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA4,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp850_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F, -0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_cp850_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7, -0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5, -0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9, -0x00FF,0x00D6,0x00DC,0x00F8,0x00A3,0x00D8,0x00D7,0x0192, -0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA, -0x00BF,0x00AE,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB, -0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x00C0, -0x00A9,0x2563,0x2551,0x2557,0x255D,0x00A2,0x00A5,0x2510, -0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x00E3,0x00C3, -0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, -0x00F0,0x00D0,0x00CA,0x00CB,0x00C8,0x0131,0x00CD,0x00CE, -0x00CF,0x2518,0x250C,0x2588,0x2584,0x00A6,0x00CC,0x2580, -0x00D3,0x00DF,0x00D4,0x00D2,0x00F5,0x00D5,0x00B5,0x00FE, -0x00DE,0x00DA,0x00DB,0x00D9,0x00FD,0x00DD,0x00AF,0x00B4, -0x00AD,0x00B1,0x2017,0x00BE,0x00B6,0x00A7,0x00F7,0x00B8, -0x00B0,0x00A8,0x00B7,0x00B9,0x00B3,0x00B2,0x25A0,0x00A0 -}; - -#endif - -#ifdef HAVE_CHARSET_cp852 -uchar ctype_cp852_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00, -0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x02,0x02,0x01,0x01,0x01, -0x01,0x01,0x02,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x01,0x01,0x02,0x01,0x00,0x02, -0x02,0x02,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x02,0x01,0x01,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x02,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x02,0x01,0x01,0x01,0x02,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x01,0x00, -0x01,0x02,0x01,0x01,0x02,0x02,0x01,0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x00,0x48 -}; - -uchar to_lower_cp852_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x87,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8B,0x8B,0x8C,0xAB,0x84,0x86, -0x82,0x92,0x92,0x93,0x94,0x96,0x96,0x98,0x98,0x94,0x81,0x9C,0x9C,0x88,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA5,0xA5,0xA7,0xA7,0xA9,0xA9,0xAA,0xAB,0x9F,0xB8,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xA0,0x83,0xD8,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD0,0xD4,0x89,0xD4,0xE5,0xA1,0x8C,0xD8,0xD9,0xDA,0xDB,0xDC,0xEE,0x85,0xDF, -0xA2,0xE1,0x93,0xE4,0xE4,0xE5,0xE7,0xE7,0xEA,0xA3,0xE8,0xFB,0xEC,0xEC,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp852_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x9A,0x90,0xB6,0x8E,0xDE,0x8F,0x80,0x9D,0xD3,0x8A,0x8A,0xD7,0x8D,0x8E,0x8F, -0x90,0x91,0x91,0xE2,0x99,0x95,0x95,0x97,0x97,0x99,0x9A,0x9B,0x9B,0x9D,0x9E,0xAC, -0xB5,0xD6,0xE0,0xE9,0xA4,0xA4,0xA6,0xA6,0xA8,0xA8,0xAA,0x8D,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xAD,0xB9,0xBA,0xBB,0xBC,0xBE,0xBD,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC6,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD1,0xD1,0xD2,0xD3,0xD2,0xD5,0xD6,0xD7,0xB7,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE3,0xD5,0xE6,0xE6,0xE8,0xE9,0xE8,0xEB,0xED,0xED,0xDD,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF -}; - -uint16 to_uni_cp852_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x016F,0x0107,0x00E7, -0x0142,0x00EB,0x0150,0x0151,0x00EE,0x0179,0x00C4,0x0106, -0x00C9,0x0139,0x013A,0x00F4,0x00F6,0x013D,0x013E,0x015A, -0x015B,0x00D6,0x00DC,0x0164,0x0165,0x0141,0x00D7,0x010D, -0x00E1,0x00ED,0x00F3,0x00FA,0x0104,0x0105,0x017D,0x017E, -0x0118,0x0119,0x00AC,0x017A,0x010C,0x015F,0x00AB,0x00BB, -0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x011A, -0x015E,0x2563,0x2551,0x2557,0x255D,0x017B,0x017C,0x2510, -0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x0102,0x0103, -0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, -0x0111,0x0110,0x010E,0x00CB,0x010F,0x0147,0x00CD,0x00CE, -0x011B,0x2518,0x250C,0x2588,0x2584,0x0162,0x016E,0x2580, -0x00D3,0x00DF,0x00D4,0x0143,0x0144,0x0148,0x0160,0x0161, -0x0154,0x00DA,0x0155,0x0170,0x00FD,0x00DD,0x0163,0x00B4, -0x00AD,0x02DD,0x02DB,0x02C7,0x02D8,0x00A7,0x00F7,0x00B8, -0x00B0,0x00A8,0x02D9,0x0171,0x0158,0x0159,0x25A0,0x00A0 -}; - -#endif - -#ifdef HAVE_CHARSET_swe7 -uchar ctype_swe7_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10, -0x01,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x20, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -uchar to_lower_swe7_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x60,0x61,0x62,0x63,0x64,0x65,0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xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_swe7_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x00C9,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x00C4,0x00D6,0x00C5,0x00DC,0x005F, -0x00E9,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x00E4,0x00F6,0x00E5,0x00FC,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_geostd8 -uchar ctype_geostd8_general_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x10,0x00,0x10,0x10,0x10,0x10,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00, -0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00, -0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, -0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, -0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -uchar to_lower_geostd8_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_geostd8_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar sort_order_geostd8_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23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FD,0xFE,0xFF -}; - -uint16 to_uni_geostd8_general_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0000,0x2039,0x0000,0x0000,0x0000,0x0000, -0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x0000,0x0000,0x203A,0x0000,0x0000,0x0000,0x0000, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x10D0,0x10D1,0x10D2,0x10D3,0x10D4,0x10D5,0x10D6,0x10F1, -0x10D7,0x10D8,0x10D9,0x10DA,0x10DB,0x10DC,0x10F2,0x10DD, -0x10DE,0x10DF,0x10E0,0x10E1,0x10E2,0x10F3,0x10E3,0x10E4, -0x10E5,0x10E6,0x10E7,0x10E8,0x10E9,0x10EA,0x10EB,0x10EC, -0x10ED,0x10EE,0x10F4,0x10EF,0x10F0,0x10F5,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x2116,0x0000,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_geostd8 -uchar ctype_geostd8_bin[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x00,0x00,0x10,0x00,0x10,0x10,0x10,0x10,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00, -0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00, -0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, -0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, -0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -uchar to_lower_geostd8_bin[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, -0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0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4C,0x4D,0x4E,0x4F, -0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uint16 to_uni_geostd8_bin[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0000,0x2039,0x0000,0x0000,0x0000,0x0000, -0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x0000,0x0000,0x203A,0x0000,0x0000,0x0000,0x0000, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x10D0,0x10D1,0x10D2,0x10D3,0x10D4,0x10D5,0x10D6,0x10F1, -0x10D7,0x10D8,0x10D9,0x10DA,0x10DB,0x10DC,0x10F2,0x10DD, -0x10DE,0x10DF,0x10E0,0x10E1,0x10E2,0x10F3,0x10E3,0x10E4, -0x10E5,0x10E6,0x10E7,0x10E8,0x10E9,0x10EA,0x10EB,0x10EC, -0x10ED,0x10EE,0x10F4,0x10EF,0x10F0,0x10F5,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x2116,0x0000,0x0000 -}; - -#endif - -#ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_spanish_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x10,0x00,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x01,0x00,0x01,0x00, -0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x02,0x00,0x02,0x01, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 -}; - -uchar to_lower_latin1_spanish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_latin1_spanish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_latin1_spanish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x51,0x53,0x57,0x5B,0x65,0x67,0x69,0x6B,0x75,0x77,0x79,0x7B,0x7D,0x81, -0x8F,0x91,0x93,0x95,0x98,0x9A,0xA4,0xA6,0xA8,0xAA,0xAF,0xB3,0xB4,0xB5,0xB6,0xB7, -0xB8,0x41,0x51,0x53,0x57,0x5B,0x65,0x67,0x69,0x6B,0x75,0x77,0x79,0x7B,0x7D,0x81, -0x8F,0x91,0x93,0x95,0x98,0x9A,0xA4,0xA6,0xA8,0xAA,0xAF,0xB9,0xBA,0xBB,0xBC,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, -0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x5B,0x5B,0x5B,0x5B,0x6B,0x6B,0x6B,0x6B, -0x57,0x7F,0x81,0x81,0x81,0x81,0x81,0xBD,0x81,0x9A,0x9A,0x9A,0x9A,0xAA,0xB1,0x97, -0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x5B,0x5B,0x5B,0x5B,0x6B,0x6B,0x6B,0x6B, -0x57,0x7F,0x81,0x81,0x81,0x81,0x81,0xBE,0x81,0x9A,0x9A,0x9A,0x9A,0xAA,0xB1,0xAA -}; - -uint16 to_uni_latin1_spanish_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0081,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, -0x02C6,0x2030,0x0160,0x2039,0x0152,0x008D,0x017D,0x008F, -0x0090,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x02DC,0x2122,0x0161,0x203A,0x0153,0x009D,0x017E,0x0178, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF -}; - -#endif - -#ifdef HAVE_CHARSET_cp1250 -uchar ctype_cp1250_polish_ci[] = { -0x00, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10, -0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20, -0x20,0x20,0x10,0x20,0x10,0x10,0x10,0x10,0x20,0x10,0x01,0x10,0x01,0x01,0x01,0x01, -0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x10,0x02,0x10,0x02,0x02,0x02,0x02, -0x48,0x10,0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01, -0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x02,0x10,0x01,0x10,0x02,0x02, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 -}; - -uchar to_lower_cp1250_polish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, -0xA0,0xA1,0xA2,0xB3,0xA4,0xB9,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBE,0xBD,0xBE,0xBF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; - -uchar to_upper_cp1250_polish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, -0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF -}; - -uchar sort_order_cp1250_polish_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,0x41,0x43,0x44,0x48,0x4B,0x4D,0x4E,0x4F,0x50,0x52,0x53,0x54,0x56,0x57,0x59, -0x5B,0x5C,0x5D,0x5F,0x62,0x64,0x66,0x67,0x68,0x69,0x6B,0x90,0x91,0x92,0x93,0x94, -0x95,0x41,0x43,0x44,0x48,0x4B,0x4D,0x4E,0x4F,0x50,0x52,0x53,0x54,0x56,0x57,0x59, -0x5B,0x5C,0x5D,0x5F,0x62,0x64,0x66,0x67,0x68,0x69,0x6B,0x96,0x97,0x98,0x99,0x9A, -0x9B,0x9C,0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0x5F,0xA6,0x60,0x62,0x6B,0x6C, -0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0x5F,0xB1,0x60,0x62,0x6B,0x6C, -0xB2,0xB3,0xB4,0x55,0xB5,0x42,0xB6,0xB7,0xB8,0xB9,0x5F,0xBA,0xBB,0xBC,0xBD,0x6D, -0xBE,0xBF,0xC0,0x55,0xC1,0xC2,0xC3,0xC4,0xC5,0x42,0x5F,0xC6,0x54,0xC7,0x54,0x6D, -0x5D,0x41,0x41,0x41,0x41,0x54,0x47,0x44,0x44,0x4B,0x4C,0x4B,0x4B,0x50,0x50,0x48, -0x48,0x58,0x57,0x5A,0x59,0x59,0x59,0xC8,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0x5F, -0x5D,0x41,0x41,0x41,0x41,0x54,0x47,0x44,0x44,0x4B,0x4C,0x4B,0x4B,0x50,0x50,0x48, -0x48,0x58,0x57,0x5A,0x59,0x59,0x59,0xC9,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF -}; - -uint16 to_uni_cp1250_polish_ci[] = { -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179, -0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x0000,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A, -0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7, -0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B, -0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - -#endif - -CHARSET_INFO compiled_charsets[] = { -#ifdef HAVE_CHARSET_dec8 -{ - 3,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "dec8", /* cset name */ - "dec8_swedish_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_dec8_swedish_ci, /* ctype */ - to_lower_dec8_swedish_ci, /* lower */ - to_upper_dec8_swedish_ci, /* upper */ - sort_order_dec8_swedish_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_dec8_swedish_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp850 -{ - 4,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "cp850", /* cset name */ - "cp850_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp850_general_ci, /* ctype */ - to_lower_cp850_general_ci, /* lower */ - to_upper_cp850_general_ci, /* upper */ - sort_order_cp850_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp850_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin1 -{ - 5,0,0, - MY_CS_COMPILED, - "latin1", /* cset name */ - "latin1_german1_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin1_german1_ci, /* ctype */ - to_lower_latin1_german1_ci, /* lower */ - to_upper_latin1_german1_ci, /* upper */ - sort_order_latin1_german1_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin1_german1_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_hp8 -{ - 6,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "hp8", /* cset name */ - "hp8_english_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_hp8_english_ci, /* ctype */ - to_lower_hp8_english_ci, /* lower */ - to_upper_hp8_english_ci, /* upper */ - sort_order_hp8_english_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_hp8_english_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_koi8r -{ - 7,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "koi8r", /* cset name */ - "koi8r_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_koi8r_general_ci, /* ctype */ - to_lower_koi8r_general_ci, /* lower */ - to_upper_koi8r_general_ci, /* upper */ - sort_order_koi8r_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_koi8r_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin2 -{ - 9,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "latin2", /* cset name */ - "latin2_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin2_general_ci, /* ctype */ - to_lower_latin2_general_ci, /* lower */ - to_upper_latin2_general_ci, /* upper */ - sort_order_latin2_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin2_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_swe7 -{ - 10,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_NONASCII, - "swe7", /* cset name */ - "swe7_swedish_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_swe7_swedish_ci, /* ctype */ - to_lower_swe7_swedish_ci, /* lower */ - to_upper_swe7_swedish_ci, /* upper */ - sort_order_swe7_swedish_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_swe7_swedish_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_ascii -{ - 11,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_PUREASCII, - "ascii", /* cset name */ - "ascii_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_ascii_general_ci, /* ctype */ - to_lower_ascii_general_ci, /* lower */ - to_upper_ascii_general_ci, /* upper */ - sort_order_ascii_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_ascii_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1251 -{ - 14,0,0, - MY_CS_COMPILED, - "cp1251", /* cset name */ - "cp1251_bulgarian_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1251_bulgarian_ci, /* ctype */ - to_lower_cp1251_bulgarian_ci, /* lower */ - to_upper_cp1251_bulgarian_ci, /* upper */ - sort_order_cp1251_bulgarian_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1251_bulgarian_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin1 -{ - 15,0,0, - MY_CS_COMPILED, - "latin1", /* cset name */ - "latin1_danish_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin1_danish_ci, /* ctype */ - to_lower_latin1_danish_ci, /* lower */ - to_upper_latin1_danish_ci, /* upper */ - sort_order_latin1_danish_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin1_danish_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_hebrew -{ - 16,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "hebrew", /* cset name */ - "hebrew_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_hebrew_general_ci, /* ctype */ - to_lower_hebrew_general_ci, /* lower */ - to_upper_hebrew_general_ci, /* upper */ - sort_order_hebrew_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_hebrew_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin7 -{ - 20,0,0, - MY_CS_COMPILED|MY_CS_CSSORT, - "latin7", /* cset name */ - "latin7_estonian_cs", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin7_estonian_cs, /* ctype */ - to_lower_latin7_estonian_cs, /* lower */ - to_upper_latin7_estonian_cs, /* upper */ - sort_order_latin7_estonian_cs, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin7_estonian_cs, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin2 -{ - 21,0,0, - MY_CS_COMPILED, - "latin2", /* cset name */ - "latin2_hungarian_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin2_hungarian_ci, /* ctype */ - to_lower_latin2_hungarian_ci, /* lower */ - to_upper_latin2_hungarian_ci, /* upper */ - sort_order_latin2_hungarian_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin2_hungarian_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_koi8u -{ - 22,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "koi8u", /* cset name */ - "koi8u_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_koi8u_general_ci, /* ctype */ - to_lower_koi8u_general_ci, /* lower */ - to_upper_koi8u_general_ci, /* upper */ - sort_order_koi8u_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_koi8u_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1251 -{ - 23,0,0, - MY_CS_COMPILED, - "cp1251", /* cset name */ - "cp1251_ukrainian_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1251_ukrainian_ci, /* ctype */ - to_lower_cp1251_ukrainian_ci, /* lower */ - to_upper_cp1251_ukrainian_ci, /* upper */ - sort_order_cp1251_ukrainian_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1251_ukrainian_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_greek -{ - 25,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "greek", /* cset name */ - "greek_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_greek_general_ci, /* ctype */ - to_lower_greek_general_ci, /* lower */ - to_upper_greek_general_ci, /* upper */ - sort_order_greek_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_greek_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1250 -{ - 26,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "cp1250", /* cset name */ - "cp1250_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1250_general_ci, /* ctype */ - to_lower_cp1250_general_ci, /* lower */ - to_upper_cp1250_general_ci, /* upper */ - sort_order_cp1250_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1250_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin2 -{ - 27,0,0, - MY_CS_COMPILED, - "latin2", /* cset name */ - "latin2_croatian_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin2_croatian_ci, /* ctype */ - to_lower_latin2_croatian_ci, /* lower */ - to_upper_latin2_croatian_ci, /* upper */ - sort_order_latin2_croatian_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin2_croatian_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1257 -{ - 29,0,0, - MY_CS_COMPILED, - "cp1257", /* cset name */ - "cp1257_lithuanian_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1257_lithuanian_ci, /* ctype */ - to_lower_cp1257_lithuanian_ci, /* lower */ - to_upper_cp1257_lithuanian_ci, /* upper */ - sort_order_cp1257_lithuanian_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1257_lithuanian_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin5 -{ - 30,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "latin5", /* cset name */ - "latin5_turkish_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin5_turkish_ci, /* ctype */ - to_lower_latin5_turkish_ci, /* lower */ - to_upper_latin5_turkish_ci, /* upper */ - sort_order_latin5_turkish_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin5_turkish_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_armscii8 -{ - 32,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "armscii8", /* cset name */ - "armscii8_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_armscii8_general_ci, /* ctype */ - to_lower_armscii8_general_ci, /* lower */ - to_upper_armscii8_general_ci, /* upper */ - sort_order_armscii8_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_armscii8_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp866 -{ - 36,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "cp866", /* cset name */ - "cp866_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp866_general_ci, /* ctype */ - to_lower_cp866_general_ci, /* lower */ - to_upper_cp866_general_ci, /* upper */ - sort_order_cp866_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp866_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_keybcs2 -{ - 37,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "keybcs2", /* cset name */ - "keybcs2_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_keybcs2_general_ci, /* ctype */ - to_lower_keybcs2_general_ci, /* lower */ - to_upper_keybcs2_general_ci, /* upper */ - sort_order_keybcs2_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_keybcs2_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_macce -{ - 38,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "macce", /* cset name */ - "macce_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_macce_general_ci, /* ctype */ - to_lower_macce_general_ci, /* lower */ - to_upper_macce_general_ci, /* upper */ - sort_order_macce_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_macce_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_macroman -{ - 39,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "macroman", /* cset name */ - "macroman_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_macroman_general_ci, /* ctype */ - to_lower_macroman_general_ci, /* lower */ - to_upper_macroman_general_ci, /* upper */ - sort_order_macroman_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_macroman_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp852 -{ - 40,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "cp852", /* cset name */ - "cp852_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp852_general_ci, /* ctype */ - to_lower_cp852_general_ci, /* lower */ - to_upper_cp852_general_ci, /* upper */ - sort_order_cp852_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp852_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin7 -{ - 41,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "latin7", /* cset name */ - "latin7_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin7_general_ci, /* ctype */ - to_lower_latin7_general_ci, /* lower */ - to_upper_latin7_general_ci, /* upper */ - sort_order_latin7_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin7_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin7 -{ - 42,0,0, - MY_CS_COMPILED|MY_CS_CSSORT, - "latin7", /* cset name */ - "latin7_general_cs", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin7_general_cs, /* ctype */ - to_lower_latin7_general_cs, /* lower */ - to_upper_latin7_general_cs, /* upper */ - sort_order_latin7_general_cs, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin7_general_cs, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_macce -{ - 43,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "macce", /* cset name */ - "macce_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_macce_bin, /* ctype */ - to_lower_macce_bin, /* lower */ - to_upper_macce_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_macce_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1250 -{ - 44,0,0, - MY_CS_COMPILED, - "cp1250", /* cset name */ - "cp1250_croatian_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1250_croatian_ci, /* ctype */ - to_lower_cp1250_croatian_ci, /* lower */ - to_upper_cp1250_croatian_ci, /* upper */ - sort_order_cp1250_croatian_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1250_croatian_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin1 -{ - 48,0,0, - MY_CS_COMPILED, - "latin1", /* cset name */ - "latin1_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin1_general_ci, /* ctype */ - to_lower_latin1_general_ci, /* lower */ - to_upper_latin1_general_ci, /* upper */ - sort_order_latin1_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin1_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin1 -{ - 49,0,0, - MY_CS_COMPILED|MY_CS_CSSORT, - "latin1", /* cset name */ - "latin1_general_cs", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin1_general_cs, /* ctype */ - to_lower_latin1_general_cs, /* lower */ - to_upper_latin1_general_cs, /* upper */ - sort_order_latin1_general_cs, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin1_general_cs, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1251 -{ - 50,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "cp1251", /* cset name */ - "cp1251_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1251_bin, /* ctype */ - to_lower_cp1251_bin, /* lower */ - to_upper_cp1251_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1251_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1251 -{ - 51,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "cp1251", /* cset name */ - "cp1251_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1251_general_ci, /* ctype */ - to_lower_cp1251_general_ci, /* lower */ - to_upper_cp1251_general_ci, /* upper */ - sort_order_cp1251_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1251_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1251 -{ - 52,0,0, - MY_CS_COMPILED|MY_CS_CSSORT, - "cp1251", /* cset name */ - "cp1251_general_cs", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1251_general_cs, /* ctype */ - to_lower_cp1251_general_cs, /* lower */ - to_upper_cp1251_general_cs, /* upper */ - sort_order_cp1251_general_cs, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1251_general_cs, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_macroman -{ - 53,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "macroman", /* cset name */ - "macroman_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_macroman_bin, /* ctype */ - to_lower_macroman_bin, /* lower */ - to_upper_macroman_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_macroman_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1256 -{ - 57,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "cp1256", /* cset name */ - "cp1256_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1256_general_ci, /* ctype */ - to_lower_cp1256_general_ci, /* lower */ - to_upper_cp1256_general_ci, /* upper */ - sort_order_cp1256_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1256_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1257 -{ - 58,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "cp1257", /* cset name */ - "cp1257_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1257_bin, /* ctype */ - to_lower_cp1257_bin, /* lower */ - to_upper_cp1257_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1257_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1257 -{ - 59,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "cp1257", /* cset name */ - "cp1257_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1257_general_ci, /* ctype */ - to_lower_cp1257_general_ci, /* lower */ - to_upper_cp1257_general_ci, /* upper */ - sort_order_cp1257_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1257_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_armscii8 -{ - 64,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "armscii8", /* cset name */ - "armscii8_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_armscii8_bin, /* ctype */ - to_lower_armscii8_bin, /* lower */ - to_upper_armscii8_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_armscii8_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_ascii -{ - 65,0,0, - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PUREASCII, - "ascii", /* cset name */ - "ascii_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_ascii_bin, /* ctype */ - to_lower_ascii_bin, /* lower */ - to_upper_ascii_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_ascii_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1250 -{ - 66,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "cp1250", /* cset name */ - "cp1250_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1250_bin, /* ctype */ - to_lower_cp1250_bin, /* lower */ - to_upper_cp1250_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1250_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1256 -{ - 67,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "cp1256", /* cset name */ - "cp1256_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1256_bin, /* ctype */ - to_lower_cp1256_bin, /* lower */ - to_upper_cp1256_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1256_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp866 -{ - 68,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "cp866", /* cset name */ - "cp866_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp866_bin, /* ctype */ - to_lower_cp866_bin, /* lower */ - to_upper_cp866_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp866_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_dec8 -{ - 69,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "dec8", /* cset name */ - "dec8_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_dec8_bin, /* ctype */ - to_lower_dec8_bin, /* lower */ - to_upper_dec8_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_dec8_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_greek -{ - 70,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "greek", /* cset name */ - "greek_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_greek_bin, /* ctype */ - to_lower_greek_bin, /* lower */ - to_upper_greek_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_greek_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_hebrew -{ - 71,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "hebrew", /* cset name */ - "hebrew_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_hebrew_bin, /* ctype */ - to_lower_hebrew_bin, /* lower */ - to_upper_hebrew_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_hebrew_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_hp8 -{ - 72,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "hp8", /* cset name */ - "hp8_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_hp8_bin, /* ctype */ - to_lower_hp8_bin, /* lower */ - to_upper_hp8_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_hp8_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_keybcs2 -{ - 73,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "keybcs2", /* cset name */ - "keybcs2_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_keybcs2_bin, /* ctype */ - to_lower_keybcs2_bin, /* lower */ - to_upper_keybcs2_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_keybcs2_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_koi8r -{ - 74,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "koi8r", /* cset name */ - "koi8r_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_koi8r_bin, /* ctype */ - to_lower_koi8r_bin, /* lower */ - to_upper_koi8r_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_koi8r_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_koi8u -{ - 75,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "koi8u", /* cset name */ - "koi8u_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_koi8u_bin, /* ctype */ - to_lower_koi8u_bin, /* lower */ - to_upper_koi8u_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_koi8u_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin2 -{ - 77,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "latin2", /* cset name */ - "latin2_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin2_bin, /* ctype */ - to_lower_latin2_bin, /* lower */ - to_upper_latin2_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin2_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin5 -{ - 78,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "latin5", /* cset name */ - "latin5_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin5_bin, /* ctype */ - to_lower_latin5_bin, /* lower */ - to_upper_latin5_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin5_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin7 -{ - 79,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "latin7", /* cset name */ - "latin7_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin7_bin, /* ctype */ - to_lower_latin7_bin, /* lower */ - to_upper_latin7_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin7_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp850 -{ - 80,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "cp850", /* cset name */ - "cp850_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp850_bin, /* ctype */ - to_lower_cp850_bin, /* lower */ - to_upper_cp850_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp850_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp852 -{ - 81,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "cp852", /* cset name */ - "cp852_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp852_bin, /* ctype */ - to_lower_cp852_bin, /* lower */ - to_upper_cp852_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp852_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_swe7 -{ - 82,0,0, - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NONASCII, - "swe7", /* cset name */ - "swe7_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_swe7_bin, /* ctype */ - to_lower_swe7_bin, /* lower */ - to_upper_swe7_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_swe7_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_geostd8 -{ - 92,0,0, - MY_CS_COMPILED|MY_CS_PRIMARY, - "geostd8", /* cset name */ - "geostd8_general_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_geostd8_general_ci, /* ctype */ - to_lower_geostd8_general_ci, /* lower */ - to_upper_geostd8_general_ci, /* upper */ - sort_order_geostd8_general_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_geostd8_general_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_geostd8 -{ - 93,0,0, - MY_CS_COMPILED|MY_CS_BINSORT, - "geostd8", /* cset name */ - "geostd8_bin", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_geostd8_bin, /* ctype */ - to_lower_geostd8_bin, /* lower */ - to_upper_geostd8_bin, /* upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_geostd8_bin, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_bin_handler, -} -, -#endif -#ifdef HAVE_CHARSET_latin1 -{ - 94,0,0, - MY_CS_COMPILED, - "latin1", /* cset name */ - "latin1_spanish_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin1_spanish_ci, /* ctype */ - to_lower_latin1_spanish_ci, /* lower */ - to_upper_latin1_spanish_ci, /* upper */ - sort_order_latin1_spanish_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_latin1_spanish_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -#ifdef HAVE_CHARSET_cp1250 -{ - 99,0,0, - MY_CS_COMPILED, - "cp1250", /* cset name */ - "cp1250_polish_ci", /* coll name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_cp1250_polish_ci, /* ctype */ - to_lower_cp1250_polish_ci, /* lower */ - to_upper_cp1250_polish_ci, /* upper */ - sort_order_cp1250_polish_ci, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - to_uni_cp1250_polish_ci, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -, -#endif -{ - 0,0,0, - MY_CS_COMPILED, - NULL, /* cset name */ - NULL, /* coll name */ - NULL, /* comment */ - NULL, /* tailoging */ - NULL, /* ctype */ - NULL, /* lower */ - NULL, /* upper */ - NULL, /* sort order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* to_uni */ - NULL, /* from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state map */ - NULL, /* ident map */ - 1, /* strxfrm_multiply*/ - 1, /* caseup_multiply*/ - 1, /* casedn_multiply*/ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad_char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_8bit_simple_ci_handler, -} -}; diff --git a/externals/mysql/strings/ctype-gb2312.c b/externals/mysql/strings/ctype-gb2312.c deleted file mode 100644 index 1d2c96243a..0000000000 --- a/externals/mysql/strings/ctype-gb2312.c +++ /dev/null @@ -1,5837 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This file is for Chinese EUC character sets (GB2312), and created by Miles Tsai (net-bull@126.com). - */ - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. mbmaxlen_gb2312=2 - */ - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_gb2312 - -static uchar NEAR ctype_gb2312[257] = -{ - 0, /* For standard library */ - 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, - 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16, - 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16, - 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2, - 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0, -}; - -static uchar NEAR to_lower_gb2312[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '[', '\\', ']', '^', '_', - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR to_upper_gb2312[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR sort_order_gb2312[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '\\', ']', '[', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', 0x7E, '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -/* Support for Chinese(GB2312) characters, by Miles Tsai (net-bull@126.com) - modified by Wei He (hewei@mail.ied.ac.cn) */ - -#define isgb2312head(c) (0xa1<=(uchar)(c) && (uchar)(c)<=0xf7) -#define isgb2312tail(c) (0xa1<=(uchar)(c) && (uchar)(c)<=0xfe) - - -static uint ismbchar_gb2312(CHARSET_INFO *cs __attribute__((unused)), - const char* p, const char *e) -{ - return (isgb2312head(*(p)) && (e)-(p)>1 && isgb2312tail(*((p)+1))? 2: 0); -} - -static uint mbcharlen_gb2312(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return (isgb2312head(c)? 2 : 1); -} - - -/* page 0 0x2121-0x2658 */ -static uint16 tab_gb2312_uni0[]={ -0x3000,0x3001,0x3002,0x30FB,0x02C9,0x02C7,0x00A8,0x3003, -0x3005,0x2015,0xFF5E,0x2016,0x2026,0x2018,0x2019,0x201C, -0x201D,0x3014,0x3015,0x3008,0x3009,0x300A,0x300B,0x300C, -0x300D,0x300E,0x300F,0x3016,0x3017,0x3010,0x3011,0x00B1, -0x00D7,0x00F7,0x2236,0x2227,0x2228,0x2211,0x220F,0x222A, -0x2229,0x2208,0x2237,0x221A,0x22A5,0x2225,0x2220,0x2312, -0x2299,0x222B,0x222E,0x2261,0x224C,0x2248,0x223D,0x221D, -0x2260,0x226E,0x226F,0x2264,0x2265,0x221E,0x2235,0x2234, -0x2642,0x2640,0x00B0,0x2032,0x2033,0x2103,0xFF04,0x00A4, -0xFFE0,0xFFE1,0x2030,0x00A7,0x2116,0x2606,0x2605,0x25CB, -0x25CF,0x25CE,0x25C7,0x25C6,0x25A1,0x25A0,0x25B3,0x25B2, -0x203B,0x2192,0x2190,0x2191,0x2193,0x3013, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2488,0x2489,0x248A,0x248B,0x248C,0x248D,0x248E,0x248F, -0x2490,0x2491,0x2492,0x2493,0x2494,0x2495,0x2496,0x2497, -0x2498,0x2499,0x249A,0x249B,0x2474,0x2475,0x2476,0x2477, -0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E,0x247F, -0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486,0x2487, -0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467, -0x2468,0x2469, 0, 0,0x3220,0x3221,0x3222,0x3223, -0x3224,0x3225,0x3226,0x3227,0x3228,0x3229, 0, 0, -0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,0x2167, -0x2168,0x2169,0x216A,0x216B, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0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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, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3041,0x3042,0x3043,0x3044,0x3045,0x3046,0x3047,0x3048, -0x3049,0x304A,0x304B,0x304C,0x304D,0x304E,0x304F,0x3050, -0x3051,0x3052,0x3053,0x3054,0x3055,0x3056,0x3057,0x3058, -0x3059,0x305A,0x305B,0x305C,0x305D,0x305E,0x305F,0x3060, -0x3061,0x3062,0x3063,0x3064,0x3065,0x3066,0x3067,0x3068, -0x3069,0x306A,0x306B,0x306C,0x306D,0x306E,0x306F,0x3070, -0x3071,0x3072,0x3073,0x3074,0x3075,0x3076,0x3077,0x3078, -0x3079,0x307A,0x307B,0x307C,0x307D,0x307E,0x307F,0x3080, -0x3081,0x3082,0x3083,0x3084,0x3085,0x3086,0x3087,0x3088, -0x3089,0x308A,0x308B,0x308C,0x308D,0x308E,0x308F,0x3090, -0x3091,0x3092,0x3093, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8, -0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0, -0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8, -0x30B9,0x30BA,0x30BB,0x30BC,0x30BD,0x30BE,0x30BF,0x30C0, -0x30C1,0x30C2,0x30C3,0x30C4,0x30C5,0x30C6,0x30C7,0x30C8, -0x30C9,0x30CA,0x30CB,0x30CC,0x30CD,0x30CE,0x30CF,0x30D0, -0x30D1,0x30D2,0x30D3,0x30D4,0x30D5,0x30D6,0x30D7,0x30D8, -0x30D9,0x30DA,0x30DB,0x30DC,0x30DD,0x30DE,0x30DF,0x30E0, -0x30E1,0x30E2,0x30E3,0x30E4,0x30E5,0x30E6,0x30E7,0x30E8, -0x30E9,0x30EA,0x30EB,0x30EC,0x30ED,0x30EE,0x30EF,0x30F0, -0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398, -0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0, -0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, - 0, 0, 0, 0, 0, 0, 0, 0, -0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8, -0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, -0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9 -}; - -/* page 1 0x2721-0x296F */ -static uint16 tab_gb2312_uni1[]={ -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416, -0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, -0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, -0x042F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451,0x0436, -0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, -0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446, -0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, -0x044F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0101,0x00E1,0x01CE,0x00E0,0x0113,0x00E9,0x011B,0x00E8, -0x012B,0x00ED,0x01D0,0x00EC,0x014D,0x00F3,0x01D2,0x00F2, -0x016B,0x00FA,0x01D4,0x00F9,0x01D6,0x01D8,0x01DA,0x01DC, -0x00FC,0x00EA, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3105,0x3106,0x3107,0x3108, -0x3109,0x310A,0x310B,0x310C,0x310D,0x310E,0x310F,0x3110, -0x3111,0x3112,0x3113,0x3114,0x3115,0x3116,0x3117,0x3118, -0x3119,0x311A,0x311B,0x311C,0x311D,0x311E,0x311F,0x3120, -0x3121,0x3122,0x3123,0x3124,0x3125,0x3126,0x3127,0x3128, -0x3129, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x2500,0x2501,0x2502,0x2503,0x2504, -0x2505,0x2506,0x2507,0x2508,0x2509,0x250A,0x250B,0x250C, -0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513,0x2514, -0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B,0x251C, -0x251D,0x251E,0x251F,0x2520,0x2521,0x2522,0x2523,0x2524, -0x2525,0x2526,0x2527,0x2528,0x2529,0x252A,0x252B,0x252C, -0x252D,0x252E,0x252F,0x2530,0x2531,0x2532,0x2533,0x2534, -0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B,0x253C, -0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543,0x2544, -0x2545,0x2546,0x2547,0x2548,0x2549,0x254A,0x254B}; - -/* page 2 0x3021-0x777E */ -static uint16 tab_gb2312_uni2[]={ -0x554A,0x963F,0x57C3,0x6328,0x54CE,0x5509,0x54C0,0x7691, -0x764C,0x853C,0x77EE,0x827E,0x788D,0x7231,0x9698,0x978D, -0x6C28,0x5B89,0x4FFA,0x6309,0x6697,0x5CB8,0x80FA,0x6848, -0x80AE,0x6602,0x76CE,0x51F9,0x6556,0x71AC,0x7FF1,0x8884, -0x50B2,0x5965,0x61CA,0x6FB3,0x82AD,0x634C,0x6252,0x53ED, -0x5427,0x7B06,0x516B,0x75A4,0x5DF4,0x62D4,0x8DCB,0x9776, -0x628A,0x8019,0x575D,0x9738,0x7F62,0x7238,0x767D,0x67CF, -0x767E,0x6446,0x4F70,0x8D25,0x62DC,0x7A17,0x6591,0x73ED, -0x642C,0x6273,0x822C,0x9881,0x677F,0x7248,0x626E,0x62CC, -0x4F34,0x74E3,0x534A,0x529E,0x7ECA,0x90A6,0x5E2E,0x6886, -0x699C,0x8180,0x7ED1,0x68D2,0x78C5,0x868C,0x9551,0x508D, -0x8C24,0x82DE,0x80DE,0x5305,0x8912,0x5265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8584,0x96F9,0x4FDD,0x5821,0x9971,0x5B9D,0x62B1,0x62A5, -0x66B4,0x8C79,0x9C8D,0x7206,0x676F,0x7891,0x60B2,0x5351, -0x5317,0x8F88,0x80CC,0x8D1D,0x94A1,0x500D,0x72C8,0x5907, -0x60EB,0x7119,0x88AB,0x5954,0x82EF,0x672C,0x7B28,0x5D29, -0x7EF7,0x752D,0x6CF5,0x8E66,0x8FF8,0x903C,0x9F3B,0x6BD4, -0x9119,0x7B14,0x5F7C,0x78A7,0x84D6,0x853D,0x6BD5,0x6BD9, -0x6BD6,0x5E01,0x5E87,0x75F9,0x95ED,0x655D,0x5F0A,0x5FC5, -0x8F9F,0x58C1,0x81C2,0x907F,0x965B,0x97AD,0x8FB9,0x7F16, -0x8D2C,0x6241,0x4FBF,0x53D8,0x535E,0x8FA8,0x8FA9,0x8FAB, -0x904D,0x6807,0x5F6A,0x8198,0x8868,0x9CD6,0x618B,0x522B, -0x762A,0x5F6C,0x658C,0x6FD2,0x6EE8,0x5BBE,0x6448,0x5175, -0x51B0,0x67C4,0x4E19,0x79C9,0x997C,0x70B3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x75C5,0x5E76,0x73BB,0x83E0,0x64AD,0x62E8,0x94B5,0x6CE2, -0x535A,0x52C3,0x640F,0x94C2,0x7B94,0x4F2F,0x5E1B,0x8236, -0x8116,0x818A,0x6E24,0x6CCA,0x9A73,0x6355,0x535C,0x54FA, -0x8865,0x57E0,0x4E0D,0x5E03,0x6B65,0x7C3F,0x90E8,0x6016, -0x64E6,0x731C,0x88C1,0x6750,0x624D,0x8D22,0x776C,0x8E29, -0x91C7,0x5F69,0x83DC,0x8521,0x9910,0x53C2,0x8695,0x6B8B, -0x60ED,0x60E8,0x707F,0x82CD,0x8231,0x4ED3,0x6CA7,0x85CF, -0x64CD,0x7CD9,0x69FD,0x66F9,0x8349,0x5395,0x7B56,0x4FA7, -0x518C,0x6D4B,0x5C42,0x8E6D,0x63D2,0x53C9,0x832C,0x8336, -0x67E5,0x78B4,0x643D,0x5BDF,0x5C94,0x5DEE,0x8BE7,0x62C6, -0x67F4,0x8C7A,0x6400,0x63BA,0x8749,0x998B,0x8C17,0x7F20, -0x94F2,0x4EA7,0x9610,0x98A4,0x660C,0x7316, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x573A,0x5C1D,0x5E38,0x957F,0x507F,0x80A0,0x5382,0x655E, -0x7545,0x5531,0x5021,0x8D85,0x6284,0x949E,0x671D,0x5632, -0x6F6E,0x5DE2,0x5435,0x7092,0x8F66,0x626F,0x64A4,0x63A3, -0x5F7B,0x6F88,0x90F4,0x81E3,0x8FB0,0x5C18,0x6668,0x5FF1, -0x6C89,0x9648,0x8D81,0x886C,0x6491,0x79F0,0x57CE,0x6A59, -0x6210,0x5448,0x4E58,0x7A0B,0x60E9,0x6F84,0x8BDA,0x627F, -0x901E,0x9A8B,0x79E4,0x5403,0x75F4,0x6301,0x5319,0x6C60, -0x8FDF,0x5F1B,0x9A70,0x803B,0x9F7F,0x4F88,0x5C3A,0x8D64, -0x7FC5,0x65A5,0x70BD,0x5145,0x51B2,0x866B,0x5D07,0x5BA0, -0x62BD,0x916C,0x7574,0x8E0C,0x7A20,0x6101,0x7B79,0x4EC7, -0x7EF8,0x7785,0x4E11,0x81ED,0x521D,0x51FA,0x6A71,0x53A8, -0x8E87,0x9504,0x96CF,0x6EC1,0x9664,0x695A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7840,0x50A8,0x77D7,0x6410,0x89E6,0x5904,0x63E3,0x5DDD, -0x7A7F,0x693D,0x4F20,0x8239,0x5598,0x4E32,0x75AE,0x7A97, -0x5E62,0x5E8A,0x95EF,0x521B,0x5439,0x708A,0x6376,0x9524, -0x5782,0x6625,0x693F,0x9187,0x5507,0x6DF3,0x7EAF,0x8822, -0x6233,0x7EF0,0x75B5,0x8328,0x78C1,0x96CC,0x8F9E,0x6148, -0x74F7,0x8BCD,0x6B64,0x523A,0x8D50,0x6B21,0x806A,0x8471, -0x56F1,0x5306,0x4ECE,0x4E1B,0x51D1,0x7C97,0x918B,0x7C07, -0x4FC3,0x8E7F,0x7BE1,0x7A9C,0x6467,0x5D14,0x50AC,0x8106, -0x7601,0x7CB9,0x6DEC,0x7FE0,0x6751,0x5B58,0x5BF8,0x78CB, -0x64AE,0x6413,0x63AA,0x632B,0x9519,0x642D,0x8FBE,0x7B54, -0x7629,0x6253,0x5927,0x5446,0x6B79,0x50A3,0x6234,0x5E26, -0x6B86,0x4EE3,0x8D37,0x888B,0x5F85,0x902E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6020,0x803D,0x62C5,0x4E39,0x5355,0x90F8,0x63B8,0x80C6, -0x65E6,0x6C2E,0x4F46,0x60EE,0x6DE1,0x8BDE,0x5F39,0x86CB, -0x5F53,0x6321,0x515A,0x8361,0x6863,0x5200,0x6363,0x8E48, -0x5012,0x5C9B,0x7977,0x5BFC,0x5230,0x7A3B,0x60BC,0x9053, -0x76D7,0x5FB7,0x5F97,0x7684,0x8E6C,0x706F,0x767B,0x7B49, -0x77AA,0x51F3,0x9093,0x5824,0x4F4E,0x6EF4,0x8FEA,0x654C, -0x7B1B,0x72C4,0x6DA4,0x7FDF,0x5AE1,0x62B5,0x5E95,0x5730, -0x8482,0x7B2C,0x5E1D,0x5F1F,0x9012,0x7F14,0x98A0,0x6382, -0x6EC7,0x7898,0x70B9,0x5178,0x975B,0x57AB,0x7535,0x4F43, -0x7538,0x5E97,0x60E6,0x5960,0x6DC0,0x6BBF,0x7889,0x53FC, -0x96D5,0x51CB,0x5201,0x6389,0x540A,0x9493,0x8C03,0x8DCC, -0x7239,0x789F,0x8776,0x8FED,0x8C0D,0x53E0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4E01,0x76EF,0x53EE,0x9489,0x9876,0x9F0E,0x952D,0x5B9A, -0x8BA2,0x4E22,0x4E1C,0x51AC,0x8463,0x61C2,0x52A8,0x680B, -0x4F97,0x606B,0x51BB,0x6D1E,0x515C,0x6296,0x6597,0x9661, -0x8C46,0x9017,0x75D8,0x90FD,0x7763,0x6BD2,0x728A,0x72EC, -0x8BFB,0x5835,0x7779,0x8D4C,0x675C,0x9540,0x809A,0x5EA6, -0x6E21,0x5992,0x7AEF,0x77ED,0x953B,0x6BB5,0x65AD,0x7F0E, -0x5806,0x5151,0x961F,0x5BF9,0x58A9,0x5428,0x8E72,0x6566, -0x987F,0x56E4,0x949D,0x76FE,0x9041,0x6387,0x54C6,0x591A, -0x593A,0x579B,0x8EB2,0x6735,0x8DFA,0x8235,0x5241,0x60F0, -0x5815,0x86FE,0x5CE8,0x9E45,0x4FC4,0x989D,0x8BB9,0x5A25, -0x6076,0x5384,0x627C,0x904F,0x9102,0x997F,0x6069,0x800C, -0x513F,0x8033,0x5C14,0x9975,0x6D31,0x4E8C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8D30,0x53D1,0x7F5A,0x7B4F,0x4F10,0x4E4F,0x9600,0x6CD5, -0x73D0,0x85E9,0x5E06,0x756A,0x7FFB,0x6A0A,0x77FE,0x9492, -0x7E41,0x51E1,0x70E6,0x53CD,0x8FD4,0x8303,0x8D29,0x72AF, -0x996D,0x6CDB,0x574A,0x82B3,0x65B9,0x80AA,0x623F,0x9632, -0x59A8,0x4EFF,0x8BBF,0x7EBA,0x653E,0x83F2,0x975E,0x5561, -0x98DE,0x80A5,0x532A,0x8BFD,0x5420,0x80BA,0x5E9F,0x6CB8, -0x8D39,0x82AC,0x915A,0x5429,0x6C1B,0x5206,0x7EB7,0x575F, -0x711A,0x6C7E,0x7C89,0x594B,0x4EFD,0x5FFF,0x6124,0x7CAA, -0x4E30,0x5C01,0x67AB,0x8702,0x5CF0,0x950B,0x98CE,0x75AF, -0x70FD,0x9022,0x51AF,0x7F1D,0x8BBD,0x5949,0x51E4,0x4F5B, -0x5426,0x592B,0x6577,0x80A4,0x5B75,0x6276,0x62C2,0x8F90, -0x5E45,0x6C1F,0x7B26,0x4F0F,0x4FD8,0x670D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6D6E,0x6DAA,0x798F,0x88B1,0x5F17,0x752B,0x629A,0x8F85, -0x4FEF,0x91DC,0x65A7,0x812F,0x8151,0x5E9C,0x8150,0x8D74, -0x526F,0x8986,0x8D4B,0x590D,0x5085,0x4ED8,0x961C,0x7236, -0x8179,0x8D1F,0x5BCC,0x8BA3,0x9644,0x5987,0x7F1A,0x5490, -0x5676,0x560E,0x8BE5,0x6539,0x6982,0x9499,0x76D6,0x6E89, -0x5E72,0x7518,0x6746,0x67D1,0x7AFF,0x809D,0x8D76,0x611F, -0x79C6,0x6562,0x8D63,0x5188,0x521A,0x94A2,0x7F38,0x809B, -0x7EB2,0x5C97,0x6E2F,0x6760,0x7BD9,0x768B,0x9AD8,0x818F, -0x7F94,0x7CD5,0x641E,0x9550,0x7A3F,0x544A,0x54E5,0x6B4C, -0x6401,0x6208,0x9E3D,0x80F3,0x7599,0x5272,0x9769,0x845B, -0x683C,0x86E4,0x9601,0x9694,0x94EC,0x4E2A,0x5404,0x7ED9, -0x6839,0x8DDF,0x8015,0x66F4,0x5E9A,0x7FB9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x57C2,0x803F,0x6897,0x5DE5,0x653B,0x529F,0x606D,0x9F9A, -0x4F9B,0x8EAC,0x516C,0x5BAB,0x5F13,0x5DE9,0x6C5E,0x62F1, -0x8D21,0x5171,0x94A9,0x52FE,0x6C9F,0x82DF,0x72D7,0x57A2, -0x6784,0x8D2D,0x591F,0x8F9C,0x83C7,0x5495,0x7B8D,0x4F30, -0x6CBD,0x5B64,0x59D1,0x9F13,0x53E4,0x86CA,0x9AA8,0x8C37, -0x80A1,0x6545,0x987E,0x56FA,0x96C7,0x522E,0x74DC,0x5250, -0x5BE1,0x6302,0x8902,0x4E56,0x62D0,0x602A,0x68FA,0x5173, -0x5B98,0x51A0,0x89C2,0x7BA1,0x9986,0x7F50,0x60EF,0x704C, -0x8D2F,0x5149,0x5E7F,0x901B,0x7470,0x89C4,0x572D,0x7845, -0x5F52,0x9F9F,0x95FA,0x8F68,0x9B3C,0x8BE1,0x7678,0x6842, -0x67DC,0x8DEA,0x8D35,0x523D,0x8F8A,0x6EDA,0x68CD,0x9505, -0x90ED,0x56FD,0x679C,0x88F9,0x8FC7,0x54C8, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9AB8,0x5B69,0x6D77,0x6C26,0x4EA5,0x5BB3,0x9A87,0x9163, -0x61A8,0x90AF,0x97E9,0x542B,0x6DB5,0x5BD2,0x51FD,0x558A, -0x7F55,0x7FF0,0x64BC,0x634D,0x65F1,0x61BE,0x608D,0x710A, -0x6C57,0x6C49,0x592F,0x676D,0x822A,0x58D5,0x568E,0x8C6A, -0x6BEB,0x90DD,0x597D,0x8017,0x53F7,0x6D69,0x5475,0x559D, -0x8377,0x83CF,0x6838,0x79BE,0x548C,0x4F55,0x5408,0x76D2, -0x8C89,0x9602,0x6CB3,0x6DB8,0x8D6B,0x8910,0x9E64,0x8D3A, -0x563F,0x9ED1,0x75D5,0x5F88,0x72E0,0x6068,0x54FC,0x4EA8, -0x6A2A,0x8861,0x6052,0x8F70,0x54C4,0x70D8,0x8679,0x9E3F, -0x6D2A,0x5B8F,0x5F18,0x7EA2,0x5589,0x4FAF,0x7334,0x543C, -0x539A,0x5019,0x540E,0x547C,0x4E4E,0x5FFD,0x745A,0x58F6, -0x846B,0x80E1,0x8774,0x72D0,0x7CCA,0x6E56, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5F27,0x864E,0x552C,0x62A4,0x4E92,0x6CAA,0x6237,0x82B1, -0x54D7,0x534E,0x733E,0x6ED1,0x753B,0x5212,0x5316,0x8BDD, -0x69D0,0x5F8A,0x6000,0x6DEE,0x574F,0x6B22,0x73AF,0x6853, -0x8FD8,0x7F13,0x6362,0x60A3,0x5524,0x75EA,0x8C62,0x7115, -0x6DA3,0x5BA6,0x5E7B,0x8352,0x614C,0x9EC4,0x78FA,0x8757, -0x7C27,0x7687,0x51F0,0x60F6,0x714C,0x6643,0x5E4C,0x604D, -0x8C0E,0x7070,0x6325,0x8F89,0x5FBD,0x6062,0x86D4,0x56DE, -0x6BC1,0x6094,0x6167,0x5349,0x60E0,0x6666,0x8D3F,0x79FD, -0x4F1A,0x70E9,0x6C47,0x8BB3,0x8BF2,0x7ED8,0x8364,0x660F, -0x5A5A,0x9B42,0x6D51,0x6DF7,0x8C41,0x6D3B,0x4F19,0x706B, -0x83B7,0x6216,0x60D1,0x970D,0x8D27,0x7978,0x51FB,0x573E, -0x57FA,0x673A,0x7578,0x7A3D,0x79EF,0x7B95, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x808C,0x9965,0x8FF9,0x6FC0,0x8BA5,0x9E21,0x59EC,0x7EE9, -0x7F09,0x5409,0x6781,0x68D8,0x8F91,0x7C4D,0x96C6,0x53CA, -0x6025,0x75BE,0x6C72,0x5373,0x5AC9,0x7EA7,0x6324,0x51E0, -0x810A,0x5DF1,0x84DF,0x6280,0x5180,0x5B63,0x4F0E,0x796D, -0x5242,0x60B8,0x6D4E,0x5BC4,0x5BC2,0x8BA1,0x8BB0,0x65E2, -0x5FCC,0x9645,0x5993,0x7EE7,0x7EAA,0x5609,0x67B7,0x5939, -0x4F73,0x5BB6,0x52A0,0x835A,0x988A,0x8D3E,0x7532,0x94BE, -0x5047,0x7A3C,0x4EF7,0x67B6,0x9A7E,0x5AC1,0x6B7C,0x76D1, -0x575A,0x5C16,0x7B3A,0x95F4,0x714E,0x517C,0x80A9,0x8270, -0x5978,0x7F04,0x8327,0x68C0,0x67EC,0x78B1,0x7877,0x62E3, -0x6361,0x7B80,0x4FED,0x526A,0x51CF,0x8350,0x69DB,0x9274, -0x8DF5,0x8D31,0x89C1,0x952E,0x7BAD,0x4EF6, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5065,0x8230,0x5251,0x996F,0x6E10,0x6E85,0x6DA7,0x5EFA, -0x50F5,0x59DC,0x5C06,0x6D46,0x6C5F,0x7586,0x848B,0x6868, -0x5956,0x8BB2,0x5320,0x9171,0x964D,0x8549,0x6912,0x7901, -0x7126,0x80F6,0x4EA4,0x90CA,0x6D47,0x9A84,0x5A07,0x56BC, -0x6405,0x94F0,0x77EB,0x4FA5,0x811A,0x72E1,0x89D2,0x997A, -0x7F34,0x7EDE,0x527F,0x6559,0x9175,0x8F7F,0x8F83,0x53EB, -0x7A96,0x63ED,0x63A5,0x7686,0x79F8,0x8857,0x9636,0x622A, -0x52AB,0x8282,0x6854,0x6770,0x6377,0x776B,0x7AED,0x6D01, -0x7ED3,0x89E3,0x59D0,0x6212,0x85C9,0x82A5,0x754C,0x501F, -0x4ECB,0x75A5,0x8BEB,0x5C4A,0x5DFE,0x7B4B,0x65A4,0x91D1, -0x4ECA,0x6D25,0x895F,0x7D27,0x9526,0x4EC5,0x8C28,0x8FDB, -0x9773,0x664B,0x7981,0x8FD1,0x70EC,0x6D78, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5C3D,0x52B2,0x8346,0x5162,0x830E,0x775B,0x6676,0x9CB8, -0x4EAC,0x60CA,0x7CBE,0x7CB3,0x7ECF,0x4E95,0x8B66,0x666F, -0x9888,0x9759,0x5883,0x656C,0x955C,0x5F84,0x75C9,0x9756, -0x7ADF,0x7ADE,0x51C0,0x70AF,0x7A98,0x63EA,0x7A76,0x7EA0, -0x7396,0x97ED,0x4E45,0x7078,0x4E5D,0x9152,0x53A9,0x6551, -0x65E7,0x81FC,0x8205,0x548E,0x5C31,0x759A,0x97A0,0x62D8, -0x72D9,0x75BD,0x5C45,0x9A79,0x83CA,0x5C40,0x5480,0x77E9, -0x4E3E,0x6CAE,0x805A,0x62D2,0x636E,0x5DE8,0x5177,0x8DDD, -0x8E1E,0x952F,0x4FF1,0x53E5,0x60E7,0x70AC,0x5267,0x6350, -0x9E43,0x5A1F,0x5026,0x7737,0x5377,0x7EE2,0x6485,0x652B, -0x6289,0x6398,0x5014,0x7235,0x89C9,0x51B3,0x8BC0,0x7EDD, -0x5747,0x83CC,0x94A7,0x519B,0x541B,0x5CFB, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4FCA,0x7AE3,0x6D5A,0x90E1,0x9A8F,0x5580,0x5496,0x5361, -0x54AF,0x5F00,0x63E9,0x6977,0x51EF,0x6168,0x520A,0x582A, -0x52D8,0x574E,0x780D,0x770B,0x5EB7,0x6177,0x7CE0,0x625B, -0x6297,0x4EA2,0x7095,0x8003,0x62F7,0x70E4,0x9760,0x5777, -0x82DB,0x67EF,0x68F5,0x78D5,0x9897,0x79D1,0x58F3,0x54B3, -0x53EF,0x6E34,0x514B,0x523B,0x5BA2,0x8BFE,0x80AF,0x5543, -0x57A6,0x6073,0x5751,0x542D,0x7A7A,0x6050,0x5B54,0x63A7, -0x62A0,0x53E3,0x6263,0x5BC7,0x67AF,0x54ED,0x7A9F,0x82E6, -0x9177,0x5E93,0x88E4,0x5938,0x57AE,0x630E,0x8DE8,0x80EF, -0x5757,0x7B77,0x4FA9,0x5FEB,0x5BBD,0x6B3E,0x5321,0x7B50, -0x72C2,0x6846,0x77FF,0x7736,0x65F7,0x51B5,0x4E8F,0x76D4, -0x5CBF,0x7AA5,0x8475,0x594E,0x9B41,0x5080, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9988,0x6127,0x6E83,0x5764,0x6606,0x6346,0x56F0,0x62EC, -0x6269,0x5ED3,0x9614,0x5783,0x62C9,0x5587,0x8721,0x814A, -0x8FA3,0x5566,0x83B1,0x6765,0x8D56,0x84DD,0x5A6A,0x680F, -0x62E6,0x7BEE,0x9611,0x5170,0x6F9C,0x8C30,0x63FD,0x89C8, -0x61D2,0x7F06,0x70C2,0x6EE5,0x7405,0x6994,0x72FC,0x5ECA, -0x90CE,0x6717,0x6D6A,0x635E,0x52B3,0x7262,0x8001,0x4F6C, -0x59E5,0x916A,0x70D9,0x6D9D,0x52D2,0x4E50,0x96F7,0x956D, -0x857E,0x78CA,0x7D2F,0x5121,0x5792,0x64C2,0x808B,0x7C7B, -0x6CEA,0x68F1,0x695E,0x51B7,0x5398,0x68A8,0x7281,0x9ECE, -0x7BF1,0x72F8,0x79BB,0x6F13,0x7406,0x674E,0x91CC,0x9CA4, -0x793C,0x8389,0x8354,0x540F,0x6817,0x4E3D,0x5389,0x52B1, -0x783E,0x5386,0x5229,0x5088,0x4F8B,0x4FD0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x75E2,0x7ACB,0x7C92,0x6CA5,0x96B6,0x529B,0x7483,0x54E9, -0x4FE9,0x8054,0x83B2,0x8FDE,0x9570,0x5EC9,0x601C,0x6D9F, -0x5E18,0x655B,0x8138,0x94FE,0x604B,0x70BC,0x7EC3,0x7CAE, -0x51C9,0x6881,0x7CB1,0x826F,0x4E24,0x8F86,0x91CF,0x667E, -0x4EAE,0x8C05,0x64A9,0x804A,0x50DA,0x7597,0x71CE,0x5BE5, -0x8FBD,0x6F66,0x4E86,0x6482,0x9563,0x5ED6,0x6599,0x5217, -0x88C2,0x70C8,0x52A3,0x730E,0x7433,0x6797,0x78F7,0x9716, -0x4E34,0x90BB,0x9CDE,0x6DCB,0x51DB,0x8D41,0x541D,0x62CE, -0x73B2,0x83F1,0x96F6,0x9F84,0x94C3,0x4F36,0x7F9A,0x51CC, -0x7075,0x9675,0x5CAD,0x9886,0x53E6,0x4EE4,0x6E9C,0x7409, -0x69B4,0x786B,0x998F,0x7559,0x5218,0x7624,0x6D41,0x67F3, -0x516D,0x9F99,0x804B,0x5499,0x7B3C,0x7ABF, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9686,0x5784,0x62E2,0x9647,0x697C,0x5A04,0x6402,0x7BD3, -0x6F0F,0x964B,0x82A6,0x5362,0x9885,0x5E90,0x7089,0x63B3, -0x5364,0x864F,0x9C81,0x9E93,0x788C,0x9732,0x8DEF,0x8D42, -0x9E7F,0x6F5E,0x7984,0x5F55,0x9646,0x622E,0x9A74,0x5415, -0x94DD,0x4FA3,0x65C5,0x5C65,0x5C61,0x7F15,0x8651,0x6C2F, -0x5F8B,0x7387,0x6EE4,0x7EFF,0x5CE6,0x631B,0x5B6A,0x6EE6, -0x5375,0x4E71,0x63A0,0x7565,0x62A1,0x8F6E,0x4F26,0x4ED1, -0x6CA6,0x7EB6,0x8BBA,0x841D,0x87BA,0x7F57,0x903B,0x9523, -0x7BA9,0x9AA1,0x88F8,0x843D,0x6D1B,0x9A86,0x7EDC,0x5988, -0x9EBB,0x739B,0x7801,0x8682,0x9A6C,0x9A82,0x561B,0x5417, -0x57CB,0x4E70,0x9EA6,0x5356,0x8FC8,0x8109,0x7792,0x9992, -0x86EE,0x6EE1,0x8513,0x66FC,0x6162,0x6F2B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8C29,0x8292,0x832B,0x76F2,0x6C13,0x5FD9,0x83BD,0x732B, -0x8305,0x951A,0x6BDB,0x77DB,0x94C6,0x536F,0x8302,0x5192, -0x5E3D,0x8C8C,0x8D38,0x4E48,0x73AB,0x679A,0x6885,0x9176, -0x9709,0x7164,0x6CA1,0x7709,0x5A92,0x9541,0x6BCF,0x7F8E, -0x6627,0x5BD0,0x59B9,0x5A9A,0x95E8,0x95F7,0x4EEC,0x840C, -0x8499,0x6AAC,0x76DF,0x9530,0x731B,0x68A6,0x5B5F,0x772F, -0x919A,0x9761,0x7CDC,0x8FF7,0x8C1C,0x5F25,0x7C73,0x79D8, -0x89C5,0x6CCC,0x871C,0x5BC6,0x5E42,0x68C9,0x7720,0x7EF5, -0x5195,0x514D,0x52C9,0x5A29,0x7F05,0x9762,0x82D7,0x63CF, -0x7784,0x85D0,0x79D2,0x6E3A,0x5E99,0x5999,0x8511,0x706D, -0x6C11,0x62BF,0x76BF,0x654F,0x60AF,0x95FD,0x660E,0x879F, -0x9E23,0x94ED,0x540D,0x547D,0x8C2C,0x6478, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6479,0x8611,0x6A21,0x819C,0x78E8,0x6469,0x9B54,0x62B9, -0x672B,0x83AB,0x58A8,0x9ED8,0x6CAB,0x6F20,0x5BDE,0x964C, -0x8C0B,0x725F,0x67D0,0x62C7,0x7261,0x4EA9,0x59C6,0x6BCD, -0x5893,0x66AE,0x5E55,0x52DF,0x6155,0x6728,0x76EE,0x7766, -0x7267,0x7A46,0x62FF,0x54EA,0x5450,0x94A0,0x90A3,0x5A1C, -0x7EB3,0x6C16,0x4E43,0x5976,0x8010,0x5948,0x5357,0x7537, -0x96BE,0x56CA,0x6320,0x8111,0x607C,0x95F9,0x6DD6,0x5462, -0x9981,0x5185,0x5AE9,0x80FD,0x59AE,0x9713,0x502A,0x6CE5, -0x5C3C,0x62DF,0x4F60,0x533F,0x817B,0x9006,0x6EBA,0x852B, -0x62C8,0x5E74,0x78BE,0x64B5,0x637B,0x5FF5,0x5A18,0x917F, -0x9E1F,0x5C3F,0x634F,0x8042,0x5B7D,0x556E,0x954A,0x954D, -0x6D85,0x60A8,0x67E0,0x72DE,0x51DD,0x5B81, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x62E7,0x6CDE,0x725B,0x626D,0x94AE,0x7EBD,0x8113,0x6D53, -0x519C,0x5F04,0x5974,0x52AA,0x6012,0x5973,0x6696,0x8650, -0x759F,0x632A,0x61E6,0x7CEF,0x8BFA,0x54E6,0x6B27,0x9E25, -0x6BB4,0x85D5,0x5455,0x5076,0x6CA4,0x556A,0x8DB4,0x722C, -0x5E15,0x6015,0x7436,0x62CD,0x6392,0x724C,0x5F98,0x6E43, -0x6D3E,0x6500,0x6F58,0x76D8,0x78D0,0x76FC,0x7554,0x5224, -0x53DB,0x4E53,0x5E9E,0x65C1,0x802A,0x80D6,0x629B,0x5486, -0x5228,0x70AE,0x888D,0x8DD1,0x6CE1,0x5478,0x80DA,0x57F9, -0x88F4,0x8D54,0x966A,0x914D,0x4F69,0x6C9B,0x55B7,0x76C6, -0x7830,0x62A8,0x70F9,0x6F8E,0x5F6D,0x84EC,0x68DA,0x787C, -0x7BF7,0x81A8,0x670B,0x9E4F,0x6367,0x78B0,0x576F,0x7812, -0x9739,0x6279,0x62AB,0x5288,0x7435,0x6BD7, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5564,0x813E,0x75B2,0x76AE,0x5339,0x75DE,0x50FB,0x5C41, -0x8B6C,0x7BC7,0x504F,0x7247,0x9A97,0x98D8,0x6F02,0x74E2, -0x7968,0x6487,0x77A5,0x62FC,0x9891,0x8D2B,0x54C1,0x8058, -0x4E52,0x576A,0x82F9,0x840D,0x5E73,0x51ED,0x74F6,0x8BC4, -0x5C4F,0x5761,0x6CFC,0x9887,0x5A46,0x7834,0x9B44,0x8FEB, -0x7C95,0x5256,0x6251,0x94FA,0x4EC6,0x8386,0x8461,0x83E9, -0x84B2,0x57D4,0x6734,0x5703,0x666E,0x6D66,0x8C31,0x66DD, -0x7011,0x671F,0x6B3A,0x6816,0x621A,0x59BB,0x4E03,0x51C4, -0x6F06,0x67D2,0x6C8F,0x5176,0x68CB,0x5947,0x6B67,0x7566, -0x5D0E,0x8110,0x9F50,0x65D7,0x7948,0x7941,0x9A91,0x8D77, -0x5C82,0x4E5E,0x4F01,0x542F,0x5951,0x780C,0x5668,0x6C14, -0x8FC4,0x5F03,0x6C7D,0x6CE3,0x8BAB,0x6390, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6070,0x6D3D,0x7275,0x6266,0x948E,0x94C5,0x5343,0x8FC1, -0x7B7E,0x4EDF,0x8C26,0x4E7E,0x9ED4,0x94B1,0x94B3,0x524D, -0x6F5C,0x9063,0x6D45,0x8C34,0x5811,0x5D4C,0x6B20,0x6B49, -0x67AA,0x545B,0x8154,0x7F8C,0x5899,0x8537,0x5F3A,0x62A2, -0x6A47,0x9539,0x6572,0x6084,0x6865,0x77A7,0x4E54,0x4FA8, -0x5DE7,0x9798,0x64AC,0x7FD8,0x5CED,0x4FCF,0x7A8D,0x5207, -0x8304,0x4E14,0x602F,0x7A83,0x94A6,0x4FB5,0x4EB2,0x79E6, -0x7434,0x52E4,0x82B9,0x64D2,0x79BD,0x5BDD,0x6C81,0x9752, -0x8F7B,0x6C22,0x503E,0x537F,0x6E05,0x64CE,0x6674,0x6C30, -0x60C5,0x9877,0x8BF7,0x5E86,0x743C,0x7A77,0x79CB,0x4E18, -0x90B1,0x7403,0x6C42,0x56DA,0x914B,0x6CC5,0x8D8B,0x533A, -0x86C6,0x66F2,0x8EAF,0x5C48,0x9A71,0x6E20, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x53D6,0x5A36,0x9F8B,0x8DA3,0x53BB,0x5708,0x98A7,0x6743, -0x919B,0x6CC9,0x5168,0x75CA,0x62F3,0x72AC,0x5238,0x529D, -0x7F3A,0x7094,0x7638,0x5374,0x9E4A,0x69B7,0x786E,0x96C0, -0x88D9,0x7FA4,0x7136,0x71C3,0x5189,0x67D3,0x74E4,0x58E4, -0x6518,0x56B7,0x8BA9,0x9976,0x6270,0x7ED5,0x60F9,0x70ED, -0x58EC,0x4EC1,0x4EBA,0x5FCD,0x97E7,0x4EFB,0x8BA4,0x5203, -0x598A,0x7EAB,0x6254,0x4ECD,0x65E5,0x620E,0x8338,0x84C9, -0x8363,0x878D,0x7194,0x6EB6,0x5BB9,0x7ED2,0x5197,0x63C9, -0x67D4,0x8089,0x8339,0x8815,0x5112,0x5B7A,0x5982,0x8FB1, -0x4E73,0x6C5D,0x5165,0x8925,0x8F6F,0x962E,0x854A,0x745E, -0x9510,0x95F0,0x6DA6,0x82E5,0x5F31,0x6492,0x6D12,0x8428, -0x816E,0x9CC3,0x585E,0x8D5B,0x4E09,0x53C1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4F1E,0x6563,0x6851,0x55D3,0x4E27,0x6414,0x9A9A,0x626B, -0x5AC2,0x745F,0x8272,0x6DA9,0x68EE,0x50E7,0x838E,0x7802, -0x6740,0x5239,0x6C99,0x7EB1,0x50BB,0x5565,0x715E,0x7B5B, -0x6652,0x73CA,0x82EB,0x6749,0x5C71,0x5220,0x717D,0x886B, -0x95EA,0x9655,0x64C5,0x8D61,0x81B3,0x5584,0x6C55,0x6247, -0x7F2E,0x5892,0x4F24,0x5546,0x8D4F,0x664C,0x4E0A,0x5C1A, -0x88F3,0x68A2,0x634E,0x7A0D,0x70E7,0x828D,0x52FA,0x97F6, -0x5C11,0x54E8,0x90B5,0x7ECD,0x5962,0x8D4A,0x86C7,0x820C, -0x820D,0x8D66,0x6444,0x5C04,0x6151,0x6D89,0x793E,0x8BBE, -0x7837,0x7533,0x547B,0x4F38,0x8EAB,0x6DF1,0x5A20,0x7EC5, -0x795E,0x6C88,0x5BA1,0x5A76,0x751A,0x80BE,0x614E,0x6E17, -0x58F0,0x751F,0x7525,0x7272,0x5347,0x7EF3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7701,0x76DB,0x5269,0x80DC,0x5723,0x5E08,0x5931,0x72EE, -0x65BD,0x6E7F,0x8BD7,0x5C38,0x8671,0x5341,0x77F3,0x62FE, -0x65F6,0x4EC0,0x98DF,0x8680,0x5B9E,0x8BC6,0x53F2,0x77E2, -0x4F7F,0x5C4E,0x9A76,0x59CB,0x5F0F,0x793A,0x58EB,0x4E16, -0x67FF,0x4E8B,0x62ED,0x8A93,0x901D,0x52BF,0x662F,0x55DC, -0x566C,0x9002,0x4ED5,0x4F8D,0x91CA,0x9970,0x6C0F,0x5E02, -0x6043,0x5BA4,0x89C6,0x8BD5,0x6536,0x624B,0x9996,0x5B88, -0x5BFF,0x6388,0x552E,0x53D7,0x7626,0x517D,0x852C,0x67A2, -0x68B3,0x6B8A,0x6292,0x8F93,0x53D4,0x8212,0x6DD1,0x758F, -0x4E66,0x8D4E,0x5B70,0x719F,0x85AF,0x6691,0x66D9,0x7F72, -0x8700,0x9ECD,0x9F20,0x5C5E,0x672F,0x8FF0,0x6811,0x675F, -0x620D,0x7AD6,0x5885,0x5EB6,0x6570,0x6F31, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6055,0x5237,0x800D,0x6454,0x8870,0x7529,0x5E05,0x6813, -0x62F4,0x971C,0x53CC,0x723D,0x8C01,0x6C34,0x7761,0x7A0E, -0x542E,0x77AC,0x987A,0x821C,0x8BF4,0x7855,0x6714,0x70C1, -0x65AF,0x6495,0x5636,0x601D,0x79C1,0x53F8,0x4E1D,0x6B7B, -0x8086,0x5BFA,0x55E3,0x56DB,0x4F3A,0x4F3C,0x9972,0x5DF3, -0x677E,0x8038,0x6002,0x9882,0x9001,0x5B8B,0x8BBC,0x8BF5, -0x641C,0x8258,0x64DE,0x55FD,0x82CF,0x9165,0x4FD7,0x7D20, -0x901F,0x7C9F,0x50F3,0x5851,0x6EAF,0x5BBF,0x8BC9,0x8083, -0x9178,0x849C,0x7B97,0x867D,0x968B,0x968F,0x7EE5,0x9AD3, -0x788E,0x5C81,0x7A57,0x9042,0x96A7,0x795F,0x5B59,0x635F, -0x7B0B,0x84D1,0x68AD,0x5506,0x7F29,0x7410,0x7D22,0x9501, -0x6240,0x584C,0x4ED6,0x5B83,0x5979,0x5854, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x736D,0x631E,0x8E4B,0x8E0F,0x80CE,0x82D4,0x62AC,0x53F0, -0x6CF0,0x915E,0x592A,0x6001,0x6C70,0x574D,0x644A,0x8D2A, -0x762B,0x6EE9,0x575B,0x6A80,0x75F0,0x6F6D,0x8C2D,0x8C08, -0x5766,0x6BEF,0x8892,0x78B3,0x63A2,0x53F9,0x70AD,0x6C64, -0x5858,0x642A,0x5802,0x68E0,0x819B,0x5510,0x7CD6,0x5018, -0x8EBA,0x6DCC,0x8D9F,0x70EB,0x638F,0x6D9B,0x6ED4,0x7EE6, -0x8404,0x6843,0x9003,0x6DD8,0x9676,0x8BA8,0x5957,0x7279, -0x85E4,0x817E,0x75BC,0x8A8A,0x68AF,0x5254,0x8E22,0x9511, -0x63D0,0x9898,0x8E44,0x557C,0x4F53,0x66FF,0x568F,0x60D5, -0x6D95,0x5243,0x5C49,0x5929,0x6DFB,0x586B,0x7530,0x751C, -0x606C,0x8214,0x8146,0x6311,0x6761,0x8FE2,0x773A,0x8DF3, -0x8D34,0x94C1,0x5E16,0x5385,0x542C,0x70C3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6C40,0x5EF7,0x505C,0x4EAD,0x5EAD,0x633A,0x8247,0x901A, -0x6850,0x916E,0x77B3,0x540C,0x94DC,0x5F64,0x7AE5,0x6876, -0x6345,0x7B52,0x7EDF,0x75DB,0x5077,0x6295,0x5934,0x900F, -0x51F8,0x79C3,0x7A81,0x56FE,0x5F92,0x9014,0x6D82,0x5C60, -0x571F,0x5410,0x5154,0x6E4D,0x56E2,0x63A8,0x9893,0x817F, -0x8715,0x892A,0x9000,0x541E,0x5C6F,0x81C0,0x62D6,0x6258, -0x8131,0x9E35,0x9640,0x9A6E,0x9A7C,0x692D,0x59A5,0x62D3, -0x553E,0x6316,0x54C7,0x86D9,0x6D3C,0x5A03,0x74E6,0x889C, -0x6B6A,0x5916,0x8C4C,0x5F2F,0x6E7E,0x73A9,0x987D,0x4E38, -0x70F7,0x5B8C,0x7897,0x633D,0x665A,0x7696,0x60CB,0x5B9B, -0x5A49,0x4E07,0x8155,0x6C6A,0x738B,0x4EA1,0x6789,0x7F51, -0x5F80,0x65FA,0x671B,0x5FD8,0x5984,0x5A01, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5DCD,0x5FAE,0x5371,0x97E6,0x8FDD,0x6845,0x56F4,0x552F, -0x60DF,0x4E3A,0x6F4D,0x7EF4,0x82C7,0x840E,0x59D4,0x4F1F, -0x4F2A,0x5C3E,0x7EAC,0x672A,0x851A,0x5473,0x754F,0x80C3, -0x5582,0x9B4F,0x4F4D,0x6E2D,0x8C13,0x5C09,0x6170,0x536B, -0x761F,0x6E29,0x868A,0x6587,0x95FB,0x7EB9,0x543B,0x7A33, -0x7D0A,0x95EE,0x55E1,0x7FC1,0x74EE,0x631D,0x8717,0x6DA1, -0x7A9D,0x6211,0x65A1,0x5367,0x63E1,0x6C83,0x5DEB,0x545C, -0x94A8,0x4E4C,0x6C61,0x8BEC,0x5C4B,0x65E0,0x829C,0x68A7, -0x543E,0x5434,0x6BCB,0x6B66,0x4E94,0x6342,0x5348,0x821E, -0x4F0D,0x4FAE,0x575E,0x620A,0x96FE,0x6664,0x7269,0x52FF, -0x52A1,0x609F,0x8BEF,0x6614,0x7199,0x6790,0x897F,0x7852, -0x77FD,0x6670,0x563B,0x5438,0x9521,0x727A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7A00,0x606F,0x5E0C,0x6089,0x819D,0x5915,0x60DC,0x7184, -0x70EF,0x6EAA,0x6C50,0x7280,0x6A84,0x88AD,0x5E2D,0x4E60, -0x5AB3,0x559C,0x94E3,0x6D17,0x7CFB,0x9699,0x620F,0x7EC6, -0x778E,0x867E,0x5323,0x971E,0x8F96,0x6687,0x5CE1,0x4FA0, -0x72ED,0x4E0B,0x53A6,0x590F,0x5413,0x6380,0x9528,0x5148, -0x4ED9,0x9C9C,0x7EA4,0x54B8,0x8D24,0x8854,0x8237,0x95F2, -0x6D8E,0x5F26,0x5ACC,0x663E,0x9669,0x73B0,0x732E,0x53BF, -0x817A,0x9985,0x7FA1,0x5BAA,0x9677,0x9650,0x7EBF,0x76F8, -0x53A2,0x9576,0x9999,0x7BB1,0x8944,0x6E58,0x4E61,0x7FD4, -0x7965,0x8BE6,0x60F3,0x54CD,0x4EAB,0x9879,0x5DF7,0x6A61, -0x50CF,0x5411,0x8C61,0x8427,0x785D,0x9704,0x524A,0x54EE, -0x56A3,0x9500,0x6D88,0x5BB5,0x6DC6,0x6653, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5C0F,0x5B5D,0x6821,0x8096,0x5578,0x7B11,0x6548,0x6954, -0x4E9B,0x6B47,0x874E,0x978B,0x534F,0x631F,0x643A,0x90AA, -0x659C,0x80C1,0x8C10,0x5199,0x68B0,0x5378,0x87F9,0x61C8, -0x6CC4,0x6CFB,0x8C22,0x5C51,0x85AA,0x82AF,0x950C,0x6B23, -0x8F9B,0x65B0,0x5FFB,0x5FC3,0x4FE1,0x8845,0x661F,0x8165, -0x7329,0x60FA,0x5174,0x5211,0x578B,0x5F62,0x90A2,0x884C, -0x9192,0x5E78,0x674F,0x6027,0x59D3,0x5144,0x51F6,0x80F8, -0x5308,0x6C79,0x96C4,0x718A,0x4F11,0x4FEE,0x7F9E,0x673D, -0x55C5,0x9508,0x79C0,0x8896,0x7EE3,0x589F,0x620C,0x9700, -0x865A,0x5618,0x987B,0x5F90,0x8BB8,0x84C4,0x9157,0x53D9, -0x65ED,0x5E8F,0x755C,0x6064,0x7D6E,0x5A7F,0x7EEA,0x7EED, -0x8F69,0x55A7,0x5BA3,0x60AC,0x65CB,0x7384, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9009,0x7663,0x7729,0x7EDA,0x9774,0x859B,0x5B66,0x7A74, -0x96EA,0x8840,0x52CB,0x718F,0x5FAA,0x65EC,0x8BE2,0x5BFB, -0x9A6F,0x5DE1,0x6B89,0x6C5B,0x8BAD,0x8BAF,0x900A,0x8FC5, -0x538B,0x62BC,0x9E26,0x9E2D,0x5440,0x4E2B,0x82BD,0x7259, -0x869C,0x5D16,0x8859,0x6DAF,0x96C5,0x54D1,0x4E9A,0x8BB6, -0x7109,0x54BD,0x9609,0x70DF,0x6DF9,0x76D0,0x4E25,0x7814, -0x8712,0x5CA9,0x5EF6,0x8A00,0x989C,0x960E,0x708E,0x6CBF, -0x5944,0x63A9,0x773C,0x884D,0x6F14,0x8273,0x5830,0x71D5, -0x538C,0x781A,0x96C1,0x5501,0x5F66,0x7130,0x5BB4,0x8C1A, -0x9A8C,0x6B83,0x592E,0x9E2F,0x79E7,0x6768,0x626C,0x4F6F, -0x75A1,0x7F8A,0x6D0B,0x9633,0x6C27,0x4EF0,0x75D2,0x517B, -0x6837,0x6F3E,0x9080,0x8170,0x5996,0x7476, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6447,0x5C27,0x9065,0x7A91,0x8C23,0x59DA,0x54AC,0x8200, -0x836F,0x8981,0x8000,0x6930,0x564E,0x8036,0x7237,0x91CE, -0x51B6,0x4E5F,0x9875,0x6396,0x4E1A,0x53F6,0x66F3,0x814B, -0x591C,0x6DB2,0x4E00,0x58F9,0x533B,0x63D6,0x94F1,0x4F9D, -0x4F0A,0x8863,0x9890,0x5937,0x9057,0x79FB,0x4EEA,0x80F0, -0x7591,0x6C82,0x5B9C,0x59E8,0x5F5D,0x6905,0x8681,0x501A, -0x5DF2,0x4E59,0x77E3,0x4EE5,0x827A,0x6291,0x6613,0x9091, -0x5C79,0x4EBF,0x5F79,0x81C6,0x9038,0x8084,0x75AB,0x4EA6, -0x88D4,0x610F,0x6BC5,0x5FC6,0x4E49,0x76CA,0x6EA2,0x8BE3, -0x8BAE,0x8C0A,0x8BD1,0x5F02,0x7FFC,0x7FCC,0x7ECE,0x8335, -0x836B,0x56E0,0x6BB7,0x97F3,0x9634,0x59FB,0x541F,0x94F6, -0x6DEB,0x5BC5,0x996E,0x5C39,0x5F15,0x9690, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5370,0x82F1,0x6A31,0x5A74,0x9E70,0x5E94,0x7F28,0x83B9, -0x8424,0x8425,0x8367,0x8747,0x8FCE,0x8D62,0x76C8,0x5F71, -0x9896,0x786C,0x6620,0x54DF,0x62E5,0x4F63,0x81C3,0x75C8, -0x5EB8,0x96CD,0x8E0A,0x86F9,0x548F,0x6CF3,0x6D8C,0x6C38, -0x607F,0x52C7,0x7528,0x5E7D,0x4F18,0x60A0,0x5FE7,0x5C24, -0x7531,0x90AE,0x94C0,0x72B9,0x6CB9,0x6E38,0x9149,0x6709, -0x53CB,0x53F3,0x4F51,0x91C9,0x8BF1,0x53C8,0x5E7C,0x8FC2, -0x6DE4,0x4E8E,0x76C2,0x6986,0x865E,0x611A,0x8206,0x4F59, -0x4FDE,0x903E,0x9C7C,0x6109,0x6E1D,0x6E14,0x9685,0x4E88, -0x5A31,0x96E8,0x4E0E,0x5C7F,0x79B9,0x5B87,0x8BED,0x7FBD, -0x7389,0x57DF,0x828B,0x90C1,0x5401,0x9047,0x55BB,0x5CEA, -0x5FA1,0x6108,0x6B32,0x72F1,0x80B2,0x8A89, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6D74,0x5BD3,0x88D5,0x9884,0x8C6B,0x9A6D,0x9E33,0x6E0A, -0x51A4,0x5143,0x57A3,0x8881,0x539F,0x63F4,0x8F95,0x56ED, -0x5458,0x5706,0x733F,0x6E90,0x7F18,0x8FDC,0x82D1,0x613F, -0x6028,0x9662,0x66F0,0x7EA6,0x8D8A,0x8DC3,0x94A5,0x5CB3, -0x7CA4,0x6708,0x60A6,0x9605,0x8018,0x4E91,0x90E7,0x5300, -0x9668,0x5141,0x8FD0,0x8574,0x915D,0x6655,0x97F5,0x5B55, -0x531D,0x7838,0x6742,0x683D,0x54C9,0x707E,0x5BB0,0x8F7D, -0x518D,0x5728,0x54B1,0x6512,0x6682,0x8D5E,0x8D43,0x810F, -0x846C,0x906D,0x7CDF,0x51FF,0x85FB,0x67A3,0x65E9,0x6FA1, -0x86A4,0x8E81,0x566A,0x9020,0x7682,0x7076,0x71E5,0x8D23, -0x62E9,0x5219,0x6CFD,0x8D3C,0x600E,0x589E,0x618E,0x66FE, -0x8D60,0x624E,0x55B3,0x6E23,0x672D,0x8F67, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x94E1,0x95F8,0x7728,0x6805,0x69A8,0x548B,0x4E4D,0x70B8, -0x8BC8,0x6458,0x658B,0x5B85,0x7A84,0x503A,0x5BE8,0x77BB, -0x6BE1,0x8A79,0x7C98,0x6CBE,0x76CF,0x65A9,0x8F97,0x5D2D, -0x5C55,0x8638,0x6808,0x5360,0x6218,0x7AD9,0x6E5B,0x7EFD, -0x6A1F,0x7AE0,0x5F70,0x6F33,0x5F20,0x638C,0x6DA8,0x6756, -0x4E08,0x5E10,0x8D26,0x4ED7,0x80C0,0x7634,0x969C,0x62DB, -0x662D,0x627E,0x6CBC,0x8D75,0x7167,0x7F69,0x5146,0x8087, -0x53EC,0x906E,0x6298,0x54F2,0x86F0,0x8F99,0x8005,0x9517, -0x8517,0x8FD9,0x6D59,0x73CD,0x659F,0x771F,0x7504,0x7827, -0x81FB,0x8D1E,0x9488,0x4FA6,0x6795,0x75B9,0x8BCA,0x9707, -0x632F,0x9547,0x9635,0x84B8,0x6323,0x7741,0x5F81,0x72F0, -0x4E89,0x6014,0x6574,0x62EF,0x6B63,0x653F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5E27,0x75C7,0x90D1,0x8BC1,0x829D,0x679D,0x652F,0x5431, -0x8718,0x77E5,0x80A2,0x8102,0x6C41,0x4E4B,0x7EC7,0x804C, -0x76F4,0x690D,0x6B96,0x6267,0x503C,0x4F84,0x5740,0x6307, -0x6B62,0x8DBE,0x53EA,0x65E8,0x7EB8,0x5FD7,0x631A,0x63B7, -0x81F3,0x81F4,0x7F6E,0x5E1C,0x5CD9,0x5236,0x667A,0x79E9, -0x7A1A,0x8D28,0x7099,0x75D4,0x6EDE,0x6CBB,0x7A92,0x4E2D, -0x76C5,0x5FE0,0x949F,0x8877,0x7EC8,0x79CD,0x80BF,0x91CD, -0x4EF2,0x4F17,0x821F,0x5468,0x5DDE,0x6D32,0x8BCC,0x7CA5, -0x8F74,0x8098,0x5E1A,0x5492,0x76B1,0x5B99,0x663C,0x9AA4, -0x73E0,0x682A,0x86DB,0x6731,0x732A,0x8BF8,0x8BDB,0x9010, -0x7AF9,0x70DB,0x716E,0x62C4,0x77A9,0x5631,0x4E3B,0x8457, -0x67F1,0x52A9,0x86C0,0x8D2E,0x94F8,0x7B51, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4F4F,0x6CE8,0x795D,0x9A7B,0x6293,0x722A,0x62FD,0x4E13, -0x7816,0x8F6C,0x64B0,0x8D5A,0x7BC6,0x6869,0x5E84,0x88C5, -0x5986,0x649E,0x58EE,0x72B6,0x690E,0x9525,0x8FFD,0x8D58, -0x5760,0x7F00,0x8C06,0x51C6,0x6349,0x62D9,0x5353,0x684C, -0x7422,0x8301,0x914C,0x5544,0x7740,0x707C,0x6D4A,0x5179, -0x54A8,0x8D44,0x59FF,0x6ECB,0x6DC4,0x5B5C,0x7D2B,0x4ED4, -0x7C7D,0x6ED3,0x5B50,0x81EA,0x6E0D,0x5B57,0x9B03,0x68D5, -0x8E2A,0x5B97,0x7EFC,0x603B,0x7EB5,0x90B9,0x8D70,0x594F, -0x63CD,0x79DF,0x8DB3,0x5352,0x65CF,0x7956,0x8BC5,0x963B, -0x7EC4,0x94BB,0x7E82,0x5634,0x9189,0x6700,0x7F6A,0x5C0A, -0x9075,0x6628,0x5DE6,0x4F50,0x67DE,0x505A,0x4F5C,0x5750, -0x5EA7, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4E8D,0x4E0C,0x5140,0x4E10,0x5EFF,0x5345,0x4E15,0x4E98, -0x4E1E,0x9B32,0x5B6C,0x5669,0x4E28,0x79BA,0x4E3F,0x5315, -0x4E47,0x592D,0x723B,0x536E,0x6C10,0x56DF,0x80E4,0x9997, -0x6BD3,0x777E,0x9F17,0x4E36,0x4E9F,0x9F10,0x4E5C,0x4E69, -0x4E93,0x8288,0x5B5B,0x556C,0x560F,0x4EC4,0x538D,0x539D, -0x53A3,0x53A5,0x53AE,0x9765,0x8D5D,0x531A,0x53F5,0x5326, -0x532E,0x533E,0x8D5C,0x5366,0x5363,0x5202,0x5208,0x520E, -0x522D,0x5233,0x523F,0x5240,0x524C,0x525E,0x5261,0x525C, -0x84AF,0x527D,0x5282,0x5281,0x5290,0x5293,0x5182,0x7F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16,0x8C19,0x8C1B, -0x8C18,0x8C1D,0x8C1F,0x8C20,0x8C21,0x8C25,0x8C27,0x8C2A, -0x8C2B,0x8C2E,0x8C2F,0x8C32,0x8C33,0x8C35,0x8C36,0x5369, -0x537A,0x961D,0x9622,0x9621,0x9631,0x962A,0x963D,0x963C, -0x9642,0x9649,0x9654,0x965F,0x9667,0x966C,0x9672,0x9674, -0x9688,0x968D,0x9697,0x96B0,0x9097,0x909B,0x909D,0x9099, -0x90AC,0x90A1,0x90B4,0x90B3,0x90B6,0x90BA, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x90B8,0x90B0,0x90CF,0x90C5,0x90BE,0x90D0,0x90C4,0x90C7, -0x90D3,0x90E6,0x90E2,0x90DC,0x90D7,0x90DB,0x90EB,0x90EF, -0x90FE,0x9104,0x9122,0x911E,0x9123,0x9131,0x912F,0x9139, -0x9143,0x9146,0x520D,0x5942,0x52A2,0x52AC,0x52AD,0x52BE, -0x54FF,0x52D0,0x52D6,0x52F0,0x53DF,0x71EE,0x77CD,0x5EF4, -0x51F5,0x51FC,0x9B2F,0x53B6,0x5F01,0x755A,0x5DEF,0x574C, -0x57A9,0x57A1,0x587E,0x58BC,0x58C5,0x58D1,0x5729,0x572C, -0x572A,0x5733,0x5739,0x572E,0x572F,0x575C,0x573B,0x5742, -0x5769,0x5785,0x576B,0x5786,0x577C,0x577B,0x5768,0x576D, -0x5776,0x5773,0x57AD,0x57A4,0x578C,0x57B2,0x57CF,0x57A7, -0x57B4,0x5793,0x57A0,0x57D5,0x57D8,0x57DA,0x57D9,0x57D2, -0x57B8,0x57F4,0x57EF,0x57F8,0x57E4,0x57DD, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x580B,0x580D,0x57FD,0x57ED,0x5800,0x581E,0x5819,0x5844, -0x5820,0x5865,0x586C,0x5881,0x5889,0x589A,0x5880,0x99A8, -0x9F19,0x61FF,0x8279,0x827D,0x827F,0x828F,0x828A,0x82A8, -0x8284,0x828E,0x8291,0x8297,0x8299,0x82AB,0x82B8,0x82BE, -0x82B0,0x82C8,0x82CA,0x82E3,0x8298,0x82B7,0x82AE,0x82CB, -0x82CC,0x82C1,0x82A9,0x82B4,0x82A1,0x82AA,0x829F,0x82C4, -0x82CE,0x82A4,0x82E1,0x8309,0x82F7,0x82E4,0x830F,0x8307, -0x82DC,0x82F4,0x82D2,0x82D8,0x830C,0x82FB,0x82D3,0x8311, -0x831A,0x8306,0x8314,0x8315,0x82E0,0x82D5,0x831C,0x8351, -0x835B,0x835C,0x8308,0x8392,0x833C,0x8334,0x8331,0x839B, -0x835E,0x832F,0x834F,0x8347,0x8343,0x835F,0x8340,0x8317, -0x8360,0x832D,0x833A,0x8333,0x8366,0x8365, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8368,0x831B,0x8369,0x836C,0x836A,0x836D,0x836E,0x83B0, -0x8378,0x83B3,0x83B4,0x83A0,0x83AA,0x8393,0x839C,0x8385, -0x837C,0x83B6,0x83A9,0x837D,0x83B8,0x837B,0x8398,0x839E, -0x83A8,0x83BA,0x83BC,0x83C1,0x8401,0x83E5,0x83D8,0x5807, -0x8418,0x840B,0x83DD,0x83FD,0x83D6,0x841C,0x8438,0x8411, -0x8406,0x83D4,0x83DF,0x840F,0x8403,0x83F8,0x83F9,0x83EA, -0x83C5,0x83C0,0x8426,0x83F0,0x83E1,0x845C,0x8451,0x845A, -0x8459,0x8473,0x8487,0x8488,0x847A,0x8489,0x8478,0x843C, -0x8446,0x8469,0x8476,0x848C,0x848E,0x8431,0x846D,0x84C1, -0x84CD,0x84D0,0x84E6,0x84BD,0x84D3,0x84CA,0x84BF,0x84BA, -0x84E0,0x84A1,0x84B9,0x84B4,0x8497,0x84E5,0x84E3,0x850C, -0x750D,0x8538,0x84F0,0x8539,0x851F,0x853A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8556,0x853B,0x84FF,0x84FC,0x8559,0x8548,0x8568,0x8564, -0x855E,0x857A,0x77A2,0x8543,0x8572,0x857B,0x85A4,0x85A8, -0x8587,0x858F,0x8579,0x85AE,0x859C,0x8585,0x85B9,0x85B7, -0x85B0,0x85D3,0x85C1,0x85DC,0x85FF,0x8627,0x8605,0x8629, -0x8616,0x863C,0x5EFE,0x5F08,0x593C,0x5941,0x8037,0x5955, -0x595A,0x5958,0x530F,0x5C22,0x5C25,0x5C2C,0x5C34,0x624C, -0x626A,0x629F,0x62BB,0x62CA,0x62DA,0x62D7,0x62EE,0x6322, -0x62F6,0x6339,0x634B,0x6343,0x63AD,0x63F6,0x6371,0x637A, -0x638E,0x63B4,0x636D,0x63AC,0x638A,0x6369,0x63AE,0x63BC, -0x63F2,0x63F8,0x63E0,0x63FF,0x63C4,0x63DE,0x63CE,0x6452, -0x63C6,0x63BE,0x6445,0x6441,0x640B,0x641B,0x6420,0x640C, -0x6426,0x6421,0x645E,0x6484,0x646D,0x6496, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x647A,0x64B7,0x64B8,0x6499,0x64BA,0x64C0,0x64D0,0x64D7, -0x64E4,0x64E2,0x6509,0x6525,0x652E,0x5F0B,0x5FD2,0x7519, -0x5F11,0x535F,0x53F1,0x53FD,0x53E9,0x53E8,0x53FB,0x5412, -0x5416,0x5406,0x544B,0x5452,0x5453,0x5454,0x5456,0x5443, -0x5421,0x5457,0x5459,0x5423,0x5432,0x5482,0x5494,0x5477, -0x5471,0x5464,0x549A,0x549B,0x5484,0x5476,0x5466,0x549D, -0x54D0,0x54AD,0x54C2,0x54B4,0x54D2,0x54A7,0x54A6,0x54D3, -0x54D4,0x5472,0x54A3,0x54D5,0x54BB,0x54BF,0x54CC,0x54D9, -0x54DA,0x54DC,0x54A9,0x54AA,0x54A4,0x54DD,0x54CF,0x54DE, -0x551B,0x54E7,0x5520,0x54FD,0x5514,0x54F3,0x5522,0x5523, -0x550F,0x5511,0x5527,0x552A,0x5567,0x558F,0x55B5,0x5549, -0x556D,0x5541,0x5555,0x553F,0x5550,0x553C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5537,0x5556,0x5575,0x5576,0x5577,0x5533,0x5530,0x555C, -0x558B,0x55D2,0x5583,0x55B1,0x55B9,0x5588,0x5581,0x559F, -0x557E,0x55D6,0x5591,0x557B,0x55DF,0x55BD,0x55BE,0x5594, -0x5599,0x55EA,0x55F7,0x55C9,0x561F,0x55D1,0x55EB,0x55EC, -0x55D4,0x55E6,0x55DD,0x55C4,0x55EF,0x55E5,0x55F2,0x55F3, -0x55CC,0x55CD,0x55E8,0x55F5,0x55E4,0x8F94,0x561E,0x5608, -0x560C,0x5601,0x5624,0x5623,0x55FE,0x5600,0x5627,0x562D, -0x5658,0x5639,0x5657,0x562C,0x564D,0x5662,0x5659,0x565C, -0x564C,0x5654,0x5686,0x5664,0x5671,0x566B,0x567B,0x567C, -0x5685,0x5693,0x56AF,0x56D4,0x56D7,0x56DD,0x56E1,0x56F5, -0x56EB,0x56F9,0x56FF,0x5704,0x570A,0x5709,0x571C,0x5E0F, -0x5E19,0x5E14,0x5E11,0x5E31,0x5E3B,0x5E3C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5E37,0x5E44,0x5E54,0x5E5B,0x5E5E,0x5E61,0x5C8C,0x5C7A, -0x5C8D,0x5C90,0x5C96,0x5C88,0x5C98,0x5C99,0x5C91,0x5C9A, -0x5C9C,0x5CB5,0x5CA2,0x5CBD,0x5CAC,0x5CAB,0x5CB1,0x5CA3, -0x5CC1,0x5CB7,0x5CC4,0x5CD2,0x5CE4,0x5CCB,0x5CE5,0x5D02, -0x5D03,0x5D27,0x5D26,0x5D2E,0x5D24,0x5D1E,0x5D06,0x5D1B, -0x5D58,0x5D3E,0x5D34,0x5D3D,0x5D6C,0x5D5B,0x5D6F,0x5D5D, -0x5D6B,0x5D4B,0x5D4A,0x5D69,0x5D74,0x5D82,0x5D99,0x5D9D, -0x8C73,0x5DB7,0x5DC5,0x5F73,0x5F77,0x5F82,0x5F87,0x5F89, -0x5F8C,0x5F95,0x5F99,0x5F9C,0x5FA8,0x5FAD,0x5FB5,0x5FBC, -0x8862,0x5F61,0x72AD,0x72B0,0x72B4,0x72B7,0x72B8,0x72C3, -0x72C1,0x72CE,0x72CD,0x72D2,0x72E8,0x72EF,0x72E9,0x72F2, -0x72F4,0x72F7,0x7301,0x72F3,0x7303,0x72FA, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x72FB,0x7317,0x7313,0x7321,0x730A,0x731E,0x731D,0x7315, -0x7322,0x7339,0x7325,0x732C,0x7338,0x7331,0x7350,0x734D, -0x7357,0x7360,0x736C,0x736F,0x737E,0x821B,0x5925,0x98E7, -0x5924,0x5902,0x9963,0x9967,0x9968,0x9969,0x996A,0x996B, -0x996C,0x9974,0x9977,0x997D,0x9980,0x9984,0x9987,0x998A, -0x998D,0x9990,0x9991,0x9993,0x9994,0x9995,0x5E80,0x5E91, -0x5E8B,0x5E96,0x5EA5,0x5EA0,0x5EB9,0x5EB5,0x5EBE,0x5EB3, -0x8D53,0x5ED2,0x5ED1,0x5EDB,0x5EE8,0x5EEA,0x81BA,0x5FC4, -0x5FC9,0x5FD6,0x5FCF,0x6003,0x5FEE,0x6004,0x5FE1,0x5FE4, -0x5FFE,0x6005,0x6006,0x5FEA,0x5FED,0x5FF8,0x6019,0x6035, -0x6026,0x601B,0x600F,0x600D,0x6029,0x602B,0x600A,0x603F, -0x6021,0x6078,0x6079,0x607B,0x607A,0x6042, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x606A,0x607D,0x6096,0x609A,0x60AD,0x609D,0x6083,0x6092, -0x608C,0x609B,0x60EC,0x60BB,0x60B1,0x60DD,0x60D8,0x60C6, -0x60DA,0x60B4,0x6120,0x6126,0x6115,0x6123,0x60F4,0x6100, -0x610E,0x612B,0x614A,0x6175,0x61AC,0x6194,0x61A7,0x61B7, -0x61D4,0x61F5,0x5FDD,0x96B3,0x95E9,0x95EB,0x95F1,0x95F3, -0x95F5,0x95F6,0x95FC,0x95FE,0x9603,0x9604,0x9606,0x9608, -0x960A,0x960B,0x960C,0x960D,0x960F,0x9612,0x9615,0x9616, -0x9617,0x9619,0x961A,0x4E2C,0x723F,0x6215,0x6C35,0x6C54, -0x6C5C,0x6C4A,0x6CA3,0x6C85,0x6C90,0x6C94,0x6C8C,0x6C68, -0x6C69,0x6C74,0x6C76,0x6C86,0x6CA9,0x6CD0,0x6CD4,0x6CAD, -0x6CF7,0x6CF8,0x6CF1,0x6CD7,0x6CB2,0x6CE0,0x6CD6,0x6CFA, -0x6CEB,0x6CEE,0x6CB1,0x6CD3,0x6CEF,0x6CFE, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6D39,0x6D27,0x6D0C,0x6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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, -0x6FC9,0x6FA7,0x6FB9,0x6FB6,0x6FC2,0x6FE1,0x6FEE,0x6FDE, -0x6FE0,0x6FEF,0x701A,0x7023,0x701B,0x7039,0x7035,0x704F, -0x705E,0x5B80,0x5B84,0x5B95,0x5B93,0x5BA5,0x5BB8,0x752F, -0x9A9E,0x6434,0x5BE4,0x5BEE,0x8930,0x5BF0,0x8E47,0x8B07, -0x8FB6,0x8FD3,0x8FD5,0x8FE5,0x8FEE,0x8FE4,0x8FE9,0x8FE6, -0x8FF3,0x8FE8,0x9005,0x9004,0x900B,0x9026,0x9011,0x900D, -0x9016,0x9021,0x9035,0x9036,0x902D,0x902F,0x9044,0x9051, -0x9052,0x9050,0x9068,0x9058,0x9062,0x905B,0x66B9,0x9074, -0x907D,0x9082,0x9088,0x9083,0x908B,0x5F50,0x5F57,0x5F56, -0x5F58,0x5C3B,0x54AB,0x5C50,0x5C59,0x5B71,0x5C63,0x5C66, -0x7FBC,0x5F2A,0x5F29,0x5F2D,0x8274,0x5F3C,0x9B3B,0x5C6E, -0x5981,0x5983,0x598D,0x59A9,0x59AA,0x59A3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,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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, -0x741B,0x741A,0x7441,0x745C,0x7457,0x7455,0x7459,0x7477, -0x746D,0x747E,0x749C,0x748E,0x7480,0x7481,0x7487,0x748B, -0x749E,0x74A8,0x74A9,0x7490,0x74A7,0x74D2,0x74BA,0x97EA, -0x97EB,0x97EC,0x674C,0x6753,0x675E,0x6748,0x6769,0x67A5, -0x6787,0x676A,0x6773,0x6798,0x67A7,0x6775,0x67A8,0x679E, -0x67AD,0x678B,0x6777,0x677C,0x67F0,0x6809,0x67D8,0x680A, -0x67E9,0x67B0,0x680C,0x67D9,0x67B5,0x67DA,0x67B3,0x67DD, -0x6800,0x67C3,0x67B8,0x67E2,0x680E,0x67C1,0x67FD,0x6832, -0x6833,0x6860,0x6861,0x684E,0x6862,0x6844,0x6864,0x6883, -0x681D,0x6855,0x6866,0x6841,0x6867,0x6840,0x683E,0x684A, -0x6849,0x6829,0x68B5,0x688F,0x6874,0x6877,0x6893,0x686B, -0x68C2,0x696E,0x68FC,0x691F,0x6920,0x68F9, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6924,0x68F0,0x690B,0x6901,0x6957,0x68E3,0x6910,0x6971, -0x6939,0x6960,0x6942,0x695D,0x6984,0x696B,0x6980,0x6998, -0x6978,0x6934,0x69CC,0x6987,0x6988,0x69CE,0x6989,0x6966, -0x6963,0x6979,0x699B,0x69A7,0x69BB,0x69AB,0x69AD,0x69D4, -0x69B1,0x69C1,0x69CA,0x69DF,0x6995,0x69E0,0x698D,0x69FF, -0x6A2F,0x69ED,0x6A17,0x6A18,0x6A65,0x69F2,0x6A44,0x6A3E, -0x6AA0,0x6A50,0x6A5B,0x6A35,0x6A8E,0x6A79,0x6A3D,0x6A28, -0x6A58,0x6A7C,0x6A91,0x6A90,0x6AA9,0x6A97,0x6AAB,0x7337, -0x7352,0x6B81,0x6B82,0x6B87,0x6B84,0x6B92,0x6B93,0x6B8D, -0x6B9A,0x6B9B,0x6BA1,0x6BAA,0x8F6B,0x8F6D,0x8F71,0x8F72, -0x8F73,0x8F75,0x8F76,0x8F78,0x8F77,0x8F79,0x8F7A,0x8F7C, -0x8F7E,0x8F81,0x8F82,0x8F84,0x8F87,0x8F8B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8F8D,0x8F8E,0x8F8F,0x8F98,0x8F9A,0x8ECE,0x620B,0x6217, -0x621B,0x621F,0x6222,0x6221,0x6225,0x6224,0x622C,0x81E7, -0x74EF,0x74F4,0x74FF,0x750F,0x7511,0x7513,0x6534,0x65EE, -0x65EF,0x65F0,0x660A,0x6619,0x6772,0x6603,0x6615,0x6600, -0x7085,0x66F7,0x661D,0x6634,0x6631,0x6636,0x6635,0x8006, -0x665F,0x6654,0x6641,0x664F,0x6656,0x6661,0x6657,0x6677, -0x6684,0x668C,0x66A7,0x669D,0x66BE,0x66DB,0x66DC,0x66E6, -0x66E9,0x8D32,0x8D33,0x8D36,0x8D3B,0x8D3D,0x8D40,0x8D45, -0x8D46,0x8D48,0x8D49,0x8D47,0x8D4D,0x8D55,0x8D59,0x89C7, -0x89CA,0x89CB,0x89CC,0x89CE,0x89CF,0x89D0,0x89D1,0x726E, -0x729F,0x725D,0x7266,0x726F,0x727E,0x727F,0x7284,0x728B, -0x728D,0x728F,0x7292,0x6308,0x6332,0x63B0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x643F,0x64D8,0x8004,0x6BEA,0x6BF3,0x6BFD,0x6BF5,0x6BF9, -0x6C05,0x6C07,0x6C06,0x6C0D,0x6C15,0x6C18,0x6C19,0x6C1A, -0x6C21,0x6C29,0x6C24,0x6C2A,0x6C32,0x6535,0x6555,0x656B, -0x724D,0x7252,0x7256,0x7230,0x8662,0x5216,0x809F,0x809C, -0x8093,0x80BC,0x670A,0x80BD,0x80B1,0x80AB,0x80AD,0x80B4, -0x80B7,0x80E7,0x80E8,0x80E9,0x80EA,0x80DB,0x80C2,0x80C4, -0x80D9,0x80CD,0x80D7,0x6710,0x80DD,0x80EB,0x80F1,0x80F4, -0x80ED,0x810D,0x810E,0x80F2,0x80FC,0x6715,0x8112,0x8C5A, -0x8136,0x811E,0x812C,0x8118,0x8132,0x8148,0x814C,0x8153, -0x8174,0x8159,0x815A,0x8171,0x8160,0x8169,0x817C,0x817D, -0x816D,0x8167,0x584D,0x5AB5,0x8188,0x8182,0x8191,0x6ED5, -0x81A3,0x81AA,0x81CC,0x6726,0x81CA,0x81BB, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x81C1,0x81A6,0x6B24,0x6B37,0x6B39,0x6B43,0x6B46,0x6B59, -0x98D1,0x98D2,0x98D3,0x98D5,0x98D9,0x98DA,0x6BB3,0x5F40, -0x6BC2,0x89F3,0x6590,0x9F51,0x6593,0x65BC,0x65C6,0x65C4, -0x65C3,0x65CC,0x65CE,0x65D2,0x65D6,0x7080,0x709C,0x7096, -0x709D,0x70BB,0x70C0,0x70B7,0x70AB,0x70B1,0x70E8,0x70CA, -0x7110,0x7113,0x7116,0x712F,0x7131,0x7173,0x715C,0x7168, -0x7145,0x7172,0x714A,0x7178,0x717A,0x7198,0x71B3,0x71B5, -0x71A8,0x71A0,0x71E0,0x71D4,0x71E7,0x71F9,0x721D,0x7228, -0x706C,0x7118,0x7166,0x71B9,0x623E,0x623D,0x6243,0x6248, -0x6249,0x793B,0x7940,0x7946,0x7949,0x795B,0x795C,0x7953, -0x795A,0x7962,0x7957,0x7960,0x796F,0x7967,0x797A,0x7985, -0x798A,0x799A,0x79A7,0x79B3,0x5FD1,0x5FD0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x603C,0x605D,0x605A,0x6067,0x6041,0x6059,0x6063,0x60AB, -0x6106,0x610D,0x615D,0x61A9,0x619D,0x61CB,0x61D1,0x6206, -0x8080,0x807F,0x6C93,0x6CF6,0x6DFC,0x77F6,0x77F8,0x7800, -0x7809,0x7817,0x7818,0x7811,0x65AB,0x782D,0x781C,0x781D, -0x7839,0x783A,0x783B,0x781F,0x783C,0x7825,0x782C,0x7823, -0x7829,0x784E,0x786D,0x7856,0x7857,0x7826,0x7850,0x7847, -0x784C,0x786A,0x789B,0x7893,0x789A,0x7887,0x789C,0x78A1, -0x78A3,0x78B2,0x78B9,0x78A5,0x78D4,0x78D9,0x78C9,0x78EC, -0x78F2,0x7905,0x78F4,0x7913,0x7924,0x791E,0x7934,0x9F9B, -0x9EF9,0x9EFB,0x9EFC,0x76F1,0x7704,0x770D,0x76F9,0x7707, -0x7708,0x771A,0x7722,0x7719,0x772D,0x7726,0x7735,0x7738, -0x7750,0x7751,0x7747,0x7743,0x775A,0x7768, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7762,0x7765,0x777F,0x778D,0x777D,0x7780,0x778C,0x7791, -0x779F,0x77A0,0x77B0,0x77B5,0x77BD,0x753A,0x7540,0x754E, -0x754B,0x7548,0x755B,0x7572,0x7579,0x7583,0x7F58,0x7F61, -0x7F5F,0x8A48,0x7F68,0x7F74,0x7F71,0x7F79,0x7F81,0x7F7E, -0x76CD,0x76E5,0x8832,0x9485,0x9486,0x9487,0x948B,0x948A, -0x948C,0x948D,0x948F,0x9490,0x9494,0x9497,0x9495,0x949A, -0x949B,0x949C,0x94A3,0x94A4,0x94AB,0x94AA,0x94AD,0x94AC, -0x94AF,0x94B0,0x94B2,0x94B4,0x94B6,0x94B7,0x94B8,0x94B9, -0x94BA,0x94BC,0x94BD,0x94BF,0x94C4,0x94C8,0x94C9,0x94CA, -0x94CB,0x94CC,0x94CD,0x94CE,0x94D0,0x94D1,0x94D2,0x94D5, -0x94D6,0x94D7,0x94D9,0x94D8,0x94DB,0x94DE,0x94DF,0x94E0, -0x94E2,0x94E4,0x94E5,0x94E7,0x94E8,0x94EA, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x94E9,0x94EB,0x94EE,0x94EF,0x94F3,0x94F4,0x94F5,0x94F7, -0x94F9,0x94FC,0x94FD,0x94FF,0x9503,0x9502,0x9506,0x9507, -0x9509,0x950A,0x950D,0x950E,0x950F,0x9512,0x9513,0x9514, -0x9515,0x9516,0x9518,0x951B,0x951D,0x951E,0x951F,0x9522, -0x952A,0x952B,0x9529,0x952C,0x9531,0x9532,0x9534,0x9536, -0x9537,0x9538,0x953C,0x953E,0x953F,0x9542,0x9535,0x9544, -0x9545,0x9546,0x9549,0x954C,0x954E,0x954F,0x9552,0x9553, -0x9554,0x9556,0x9557,0x9558,0x9559,0x955B,0x955E,0x955F, -0x955D,0x9561,0x9562,0x9564,0x9565,0x9566,0x9567,0x9568, -0x9569,0x956A,0x956B,0x956C,0x956F,0x9571,0x9572,0x9573, -0x953A,0x77E7,0x77EC,0x96C9,0x79D5,0x79ED,0x79E3,0x79EB, -0x7A06,0x5D47,0x7A03,0x7A02,0x7A1E,0x7A14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7A39,0x7A37,0x7A51,0x9ECF,0x99A5,0x7A70,0x7688,0x768E, -0x7693,0x7699,0x76A4,0x74DE,0x74E0,0x752C,0x9E20,0x9E22, -0x9E28,0x9E29,0x9E2A,0x9E2B,0x9E2C,0x9E32,0x9E31,0x9E36, -0x9E38,0x9E37,0x9E39,0x9E3A,0x9E3E,0x9E41,0x9E42,0x9E44, -0x9E46,0x9E47,0x9E48,0x9E49,0x9E4B,0x9E4C,0x9E4E,0x9E51, -0x9E55,0x9E57,0x9E5A,0x9E5B,0x9E5C,0x9E5E,0x9E63,0x9E66, -0x9E67,0x9E68,0x9E69,0x9E6A,0x9E6B,0x9E6C,0x9E71,0x9E6D, -0x9E73,0x7592,0x7594,0x7596,0x75A0,0x759D,0x75AC,0x75A3, -0x75B3,0x75B4,0x75B8,0x75C4,0x75B1,0x75B0,0x75C3,0x75C2, -0x75D6,0x75CD,0x75E3,0x75E8,0x75E6,0x75E4,0x75EB,0x75E7, -0x7603,0x75F1,0x75FC,0x75FF,0x7610,0x7600,0x7605,0x760C, -0x7617,0x760A,0x7625,0x7618,0x7615,0x7619, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x761B,0x763C,0x7622,0x7620,0x7640,0x762D,0x7630,0x763F, -0x7635,0x7643,0x763E,0x7633,0x764D,0x765E,0x7654,0x765C, -0x7656,0x766B,0x766F,0x7FCA,0x7AE6,0x7A78,0x7A79,0x7A80, -0x7A86,0x7A88,0x7A95,0x7AA6,0x7AA0,0x7AAC,0x7AA8,0x7AAD, -0x7AB3,0x8864,0x8869,0x8872,0x887D,0x887F,0x8882,0x88A2, -0x88C6,0x88B7,0x88BC,0x88C9,0x88E2,0x88CE,0x88E3,0x88E5, -0x88F1,0x891A,0x88FC,0x88E8,0x88FE,0x88F0,0x8921,0x8919, -0x8913,0x891B,0x890A,0x8934,0x892B,0x8936,0x8941,0x8966, -0x897B,0x758B,0x80E5,0x76B2,0x76B4,0x77DC,0x8012,0x8014, -0x8016,0x801C,0x8020,0x8022,0x8025,0x8026,0x8027,0x8029, -0x8028,0x8031,0x800B,0x8035,0x8043,0x8046,0x804D,0x8052, -0x8069,0x8071,0x8983,0x9878,0x9880,0x9883, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9889,0x988C,0x988D,0x988F,0x9894,0x989A,0x989B,0x989E, -0x989F,0x98A1,0x98A2,0x98A5,0x98A6,0x864D,0x8654,0x866C, -0x866E,0x867F,0x867A,0x867C,0x867B,0x86A8,0x868D,0x868B, -0x86AC,0x869D,0x86A7,0x86A3,0x86AA,0x8693,0x86A9,0x86B6, -0x86C4,0x86B5,0x86CE,0x86B0,0x86BA,0x86B1,0x86AF,0x86C9, -0x86CF,0x86B4,0x86E9,0x86F1,0x86F2,0x86ED,0x86F3,0x86D0, -0x8713,0x86DE,0x86F4,0x86DF,0x86D8,0x86D1,0x8703,0x8707, -0x86F8,0x8708,0x870A,0x870D,0x8709,0x8723,0x873B,0x871E, -0x8725,0x872E,0x871A,0x873E,0x8748,0x8734,0x8731,0x8729, -0x8737,0x873F,0x8782,0x8722,0x877D,0x877E,0x877B,0x8760, -0x8770,0x874C,0x876E,0x878B,0x8753,0x8763,0x877C,0x8764, -0x8759,0x8765,0x8793,0x87AF,0x87A8,0x87D2, 0, 0, - 0, 0, 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x8E3A,0x8E40,0x8E39,0x8E35, -0x8E3D,0x8E31,0x8E49,0x8E41,0x8E42,0x8E51,0x8E52,0x8E4A, -0x8E70,0x8E76,0x8E7C,0x8E6F,0x8E74,0x8E85,0x8E8F,0x8E94, -0x8E90,0x8E9C,0x8E9E,0x8C78,0x8C82,0x8C8A,0x8C85,0x8C98, -0x8C94,0x659B,0x89D6,0x89DE,0x89DA,0x89DC, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x89E5,0x89EB,0x89EF,0x8A3E,0x8B26,0x9753,0x96E9,0x96F3, -0x96EF,0x9706,0x9701,0x9708,0x970F,0x970E,0x972A,0x972D, -0x9730,0x973E,0x9F80,0x9F83,0x9F85,0x9F86,0x9F87,0x9F88, -0x9F89,0x9F8A,0x9F8C,0x9EFE,0x9F0B,0x9F0D,0x96B9,0x96BC, -0x96BD,0x96CE,0x96D2,0x77BF,0x96E0,0x928E,0x92AE,0x92C8, -0x933E,0x936A,0x93CA,0x938F,0x943E,0x946B,0x9C7F,0x9C82, -0x9C85,0x9C86,0x9C87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1,0x9AC0,0x9AC5,0x9AC2,0x9ACB,0x9ACC,0x9AD1,0x9B45, -0x9B43,0x9B47,0x9B49,0x9B48,0x9B4D,0x9B51,0x98E8,0x990D, -0x992E,0x9955,0x9954,0x9ADF,0x9AE1,0x9AE6,0x9AEF,0x9AEB, -0x9AFB,0x9AED,0x9AF9,0x9B08,0x9B0F,0x9B13,0x9B1F,0x9B23, -0x9EBD,0x9EBE,0x7E3B,0x9E82,0x9E87,0x9E88,0x9E8B,0x9E92, -0x93D6,0x9E9D,0x9E9F,0x9EDB,0x9EDC,0x9EDD,0x9EE0,0x9EDF, -0x9EE2,0x9EE9,0x9EE7,0x9EE5,0x9EEA,0x9EEF,0x9F22,0x9F2C, -0x9F2F,0x9F39,0x9F37,0x9F3D,0x9F3E,0x9F44}; - -static int func_gb2312_uni_onechar(int code){ - if ((code>=0x2121)&&(code<=0x2658)) - return(tab_gb2312_uni0[code-0x2121]); - if ((code>=0x2721)&&(code<=0x296F)) - return(tab_gb2312_uni1[code-0x2721]); - if ((code>=0x3021)&&(code<=0x777E)) - return(tab_gb2312_uni2[code-0x3021]); - return(0); -} - - -/* page 0 0x00A4-0x01DC */ -static uint16 tab_uni_gb23120[]={ -0x2168, 0, 0,0x216C,0x2127, 0, 0, 0, - 0, 0, 0, 0,0x2163,0x2140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x2141, 0, 0, 0, 0, - 0, 0, 0, 0,0x2824,0x2822, 0, 0, - 0, 0, 0, 0,0x2828,0x2826,0x283A, 0, -0x282C,0x282A, 0, 0, 0, 0,0x2830,0x282E, - 0, 0, 0,0x2142, 0,0x2834,0x2832, 0, -0x2839, 0, 0, 0, 0,0x2821, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x2825, - 0, 0, 0, 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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,0x2621,0x2622,0x2623,0x2624,0x2625,0x2626, -0x2627,0x2628,0x2629,0x262A,0x262B,0x262C,0x262D,0x262E, -0x262F,0x2630,0x2631, 0,0x2632,0x2633,0x2634,0x2635, -0x2636,0x2637,0x2638, 0, 0, 0, 0, 0, - 0, 0,0x2641,0x2642,0x2643,0x2644,0x2645,0x2646, -0x2647,0x2648,0x2649,0x264A,0x264B,0x264C,0x264D,0x264E, -0x264F,0x2650,0x2651, 0,0x2652,0x2653,0x2654,0x2655, -0x2656,0x2657,0x2658, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x2727, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x2721,0x2722,0x2723,0x2724,0x2725,0x2726,0x2728, -0x2729,0x272A,0x272B,0x272C,0x272D,0x272E,0x272F,0x2730, -0x2731,0x2732,0x2733,0x2734,0x2735,0x2736,0x2737,0x2738, -0x2739,0x273A,0x273B,0x273C,0x273D,0x273E,0x273F,0x2740, -0x2741,0x2751,0x2752,0x2753,0x2754,0x2755,0x2756,0x2758, -0x2759,0x275A,0x275B,0x275C,0x275D,0x275E,0x275F,0x2760, -0x2761,0x2762,0x2763,0x2764,0x2765,0x2766,0x2767,0x2768, -0x2769,0x276A,0x276B,0x276C,0x276D,0x276E,0x276F,0x2770, -0x2771, 0,0x2757}; - -/* page 2 0x2015-0x2312 */ -static uint16 tab_uni_gb23122[]={ -0x212A,0x212C, 0,0x212E,0x212F, 0, 0,0x2130, -0x2131, 0, 0, 0, 0, 0, 0, 0, - 0,0x212D, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x216B, 0,0x2164,0x2165, 0, - 0, 0, 0, 0, 0, 0,0x2179, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x2166, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x216D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x2271,0x2272,0x2273,0x2274,0x2275, -0x2276,0x2277,0x2278,0x2279,0x227A,0x227B,0x227C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x217B,0x217C,0x217A,0x217D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x214A, 0, 0, 0, 0, - 0, 0,0x2147, 0,0x2146, 0, 0, 0, - 0, 0, 0, 0, 0,0x214C, 0, 0, -0x2158,0x215E, 0,0x214F, 0, 0, 0, 0, -0x214E, 0,0x2144,0x2145,0x2149,0x2148,0x2152, 0, - 0,0x2153, 0, 0, 0, 0, 0,0x2160, -0x215F,0x2143,0x214B, 0, 0, 0, 0, 0, -0x2157, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x2156, 0, 0, 0,0x2155, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x2159,0x2154, 0, 0,0x215C, -0x215D, 0, 0, 0, 0, 0, 0, 0, - 0,0x215A,0x215B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x2151, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x214D, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x2150}; - -/* page 3 0x2460-0x2642 */ -static uint16 tab_uni_gb23123[]={ -0x2259,0x225A,0x225B,0x225C,0x225D,0x225E,0x225F,0x2260, -0x2261,0x2262, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x2245,0x2246,0x2247,0x2248, -0x2249,0x224A,0x224B,0x224C,0x224D,0x224E,0x224F,0x2250, -0x2251,0x2252,0x2253,0x2254,0x2255,0x2256,0x2257,0x2258, -0x2231,0x2232,0x2233,0x2234,0x2235,0x2236,0x2237,0x2238, -0x2239,0x223A,0x223B,0x223C,0x223D,0x223E,0x223F,0x2240, -0x2241,0x2242,0x2243,0x2244, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2924,0x2925,0x2926,0x2927,0x2928,0x2929,0x292A,0x292B, -0x292C,0x292D,0x292E,0x292F,0x2930,0x2931,0x2932,0x2933, -0x2934,0x2935,0x2936,0x2937,0x2938,0x2939,0x293A,0x293B, -0x293C,0x293D,0x293E,0x293F,0x2940,0x2941,0x2942,0x2943, -0x2944,0x2945,0x2946,0x2947,0x2948,0x2949,0x294A,0x294B, -0x294C,0x294D,0x294E,0x294F,0x2950,0x2951,0x2952,0x2953, -0x2954,0x2955,0x2956,0x2957,0x2958,0x2959,0x295A,0x295B, -0x295C,0x295D,0x295E,0x295F,0x2960,0x2961,0x2962,0x2963, -0x2964,0x2965,0x2966,0x2967,0x2968,0x2969,0x296A,0x296B, -0x296C,0x296D,0x296E,0x296F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2176,0x2175, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x2178,0x2177, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x2174,0x2173, - 0, 0, 0,0x2170, 0, 0,0x2172,0x2171, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x216F,0x216E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2162, 0,0x2161}; - -/* page 4 0x3000-0x3129 */ -static uint16 tab_uni_gb23124[]={ -0x2121,0x2122,0x2123,0x2128, 0,0x2129, 0, 0, -0x2134,0x2135,0x2136,0x2137,0x2138,0x2139,0x213A,0x213B, -0x213E,0x213F, 0,0x217E,0x2132,0x2133,0x213C,0x213D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x2421,0x2422,0x2423,0x2424,0x2425,0x2426,0x2427, -0x2428,0x2429,0x242A,0x242B,0x242C,0x242D,0x242E,0x242F, -0x2430,0x2431,0x2432,0x2433,0x2434,0x2435,0x2436,0x2437, -0x2438,0x2439,0x243A,0x243B,0x243C,0x243D,0x243E,0x243F, -0x2440,0x2441,0x2442,0x2443,0x2444,0x2445,0x2446,0x2447, -0x2448,0x2449,0x244A,0x244B,0x244C,0x244D,0x244E,0x244F, -0x2450,0x2451,0x2452,0x2453,0x2454,0x2455,0x2456,0x2457, -0x2458,0x2459,0x245A,0x245B,0x245C,0x245D,0x245E,0x245F, -0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467, -0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F, -0x2470,0x2471,0x2472,0x2473, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527, -0x2528,0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F, -0x2530,0x2531,0x2532,0x2533,0x2534,0x2535,0x2536,0x2537, -0x2538,0x2539,0x253A,0x253B,0x253C,0x253D,0x253E,0x253F, -0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546,0x2547, -0x2548,0x2549,0x254A,0x254B,0x254C,0x254D,0x254E,0x254F, -0x2550,0x2551,0x2552,0x2553,0x2554,0x2555,0x2556,0x2557, -0x2558,0x2559,0x255A,0x255B,0x255C,0x255D,0x255E,0x255F, -0x2560,0x2561,0x2562,0x2563,0x2564,0x2565,0x2566,0x2567, -0x2568,0x2569,0x256A,0x256B,0x256C,0x256D,0x256E,0x256F, -0x2570,0x2571,0x2572,0x2573,0x2574,0x2575,0x2576, 0, - 0, 0, 0,0x2124, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x2845,0x2846,0x2847, -0x2848,0x2849,0x284A,0x284B,0x284C,0x284D,0x284E,0x284F, -0x2850,0x2851,0x2852,0x2853,0x2854,0x2855,0x2856,0x2857, -0x2858,0x2859,0x285A,0x285B,0x285C,0x285D,0x285E,0x285F, -0x2860,0x2861,0x2862,0x2863,0x2864,0x2865,0x2866,0x2867, -0x2868,0x2869}; - -/* page 5 0x3220-0x3229 */ -static uint16 tab_uni_gb23125[]={ -0x2265,0x2266,0x2267,0x2268,0x2269,0x226A,0x226B,0x226C, -0x226D,0x226E}; - -/* page 6 0x4E00-0x9B54 */ -static uint16 tab_uni_gb23126[]={ -0x523B,0x3621, 0,0x465F, 0, 0, 0,0x4D72, -0x5549,0x487D,0x494F,0x4F42,0x5822,0x323B,0x536B, 0, -0x5824,0x3373, 0,0x5728,0x4752,0x5827,0x4A40, 0, -0x4770,0x317B,0x5235,0x3454,0x362B,0x4B3F,0x5829, 0, - 0, 0,0x362A, 0,0x413D,0x514F, 0,0x4925, -0x582D, 0,0x3876,0x513E,0x635C,0x5650, 0, 0, -0x3761, 0,0x342E, 0,0x4159, 0,0x583C, 0, -0x4D68,0x3524,0x4E2A,0x5677, 0,0x4076,0x3E59,0x582F, - 0, 0, 0,0x444B, 0,0x3E43, 0,0x5831, -0x4334,0x5265, 0,0x562E,0x4E5A,0x5527,0x3A75,0x3726, -0x4056, 0,0x4639,0x4552,0x4747, 0,0x3954, 0, -0x334B,0x5252, 0, 0,0x583F,0x3E45,0x4672,0x5232, -0x4F30,0x4F67, 0, 0, 0, 0,0x4A69, 0, - 0,0x5840, 0, 0, 0, 0, 0, 0, -0x4272,0x4252, 0,0x4869, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x472C, 0, - 0, 0, 0, 0, 0, 0,0x414B, 0, -0x5368,0x5579, 0,0x4A42,0x367E,0x5821,0x535A,0x3F77, - 0,0x5446,0x3B25,0x5841,0x4E65,0x3E2E, 0, 0, -0x5828, 0,0x5147,0x5029, 0, 0, 0,0x583D, -0x596F,0x4D76,0x3F3A, 0,0x3D3B,0x3A25,0x5260,0x327A, -0x3A60,0x4436, 0,0x4F6D,0x3E29,0x4D24,0x4141, 0, - 0, 0,0x4757,0x5971, 0,0x5974, 0, 0, - 0, 0,0x484B,0x5869, 0, 0, 0,0x525A, -0x4A32,0x484A,0x586C,0x586A,0x5846,0x3D76,0x464D,0x3370, - 0,0x586B,0x3D71,0x3D69, 0,0x4854,0x3453, 0, - 0,0x4258, 0,0x3256,0x5750,0x4A4B,0x4B7B,0x554C, -0x3836,0x4F49, 0, 0, 0,0x595A,0x5870,0x472A, - 0,0x586E, 0,0x347A,0x416E,0x5254, 0, 0, -0x586D, 0,0x5247,0x586F,0x4347, 0, 0, 0, -0x5176, 0,0x5659,0x5872, 0,0x5875,0x3C7E,0x3C5B, - 0, 0, 0,0x484E, 0,0x375D, 0,0x3742, - 0,0x4673, 0, 0, 0, 0, 0, 0, - 0,0x5878,0x5241, 0, 0,0x4E69,0x3C3F,0x377C, -0x3725,0x505D, 0, 0, 0, 0, 0,0x565A, -0x5345,0x3B6F,0x3B61,0x5871, 0, 0,0x4921,0x4E30, -0x342B, 0,0x5873, 0,0x494B,0x5876,0x4257,0x5877, - 0, 0,0x4E31,0x5879, 0, 0, 0,0x322E, -0x3940, 0,0x5923, 0,0x3069, 0,0x4166, 0, -0x496C, 0,0x4B45, 0,0x4B46,0x5924, 0, 0, - 0, 0, 0,0x3568, 0, 0,0x352B, 0, - 0, 0, 0, 0, 0,0x4E3B,0x354D,0x5721, -0x5774,0x5353, 0,0x4C65, 0,0x3A4E, 0,0x5922, -0x595C,0x5360,0x587D,0x3770,0x5777,0x587E,0x587A,0x5921, -0x4463, 0, 0,0x5336,0x5874,0x595D, 0,0x587B, - 0,0x4565, 0, 0,0x4050, 0, 0,0x5170, -0x305B, 0, 0,0x3C51,0x5926, 0,0x5925, 0, - 0, 0, 0,0x592C,0x592E, 0,0x592B,0x4A39, - 0, 0, 0,0x5929,0x5636, 0, 0, 0, -0x335E,0x5928, 0,0x407D, 0,0x4A4C, 0,0x592A, - 0,0x5927, 0, 0,0x5930, 0, 0,0x3631, - 0, 0, 0,0x3929, 0,0x5240, 0, 0, -0x4F40, 0, 0,0x4242, 0,0x3D44,0x556C,0x3260, -0x4748,0x3F6B,0x592D, 0,0x592F, 0,0x4E6A,0x3A6E, - 0, 0, 0, 0, 0,0x4756, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3163, - 0, 0, 0,0x3459,0x366D,0x5934, 0, 0, - 0, 0,0x3F21, 0, 0, 0,0x595E,0x474E, -0x407E,0x5938, 0, 0, 0, 0, 0,0x4B57, -0x377D, 0,0x5935, 0,0x5937,0x3123,0x5361,0x5939, - 0,0x5045, 0,0x5936, 0, 0,0x5931, 0, -0x5932,0x4129,0x5933, 0, 0,0x3C73,0x505E,0x3829, - 0,0x3E63, 0,0x593D, 0, 0, 0, 0, -0x593A, 0,0x3033, 0, 0, 0,0x5942, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5944,0x3136, 0,0x593F, - 0, 0,0x3539, 0,0x3E73, 0, 0, 0, -0x4C48,0x3A72,0x5250, 0,0x5943, 0, 0,0x3D68, - 0,0x332B, 0, 0, 0,0x5945,0x3E6B, 0, -0x5946,0x593B,0x445F, 0,0x593E,0x5941,0x5940, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x552E, 0,0x5635, 0,0x4763, 0, - 0, 0, 0,0x5948, 0, 0, 0,0x3C59, -0x594A, 0, 0, 0,0x593C, 0,0x594B,0x462B, - 0, 0, 0, 0, 0,0x5949, 0, 0, - 0, 0,0x5776, 0,0x4D23, 0, 0, 0, - 0, 0, 0, 0, 0,0x3D21, 0, 0, - 0, 0, 0, 0,0x594C, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x453C,0x4D35, - 0, 0, 0,0x594D, 0, 0,0x5947,0x3325, -0x3F7E, 0, 0, 0, 0,0x3835, 0, 0, -0x407C, 0, 0, 0, 0,0x3078, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3476, 0,0x594E, 0,0x594F, -0x3422,0x5950, 0, 0,0x345F, 0, 0, 0, - 0, 0,0x3041, 0, 0, 0, 0, 0, - 0, 0,0x5951,0x4935, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4F71, - 0, 0, 0, 0, 0, 0,0x5952, 0, - 0, 0,0x4145, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5956,0x492E, - 0, 0, 0, 0,0x5955,0x5954,0x5957, 0, - 0, 0, 0,0x4B5B, 0,0x3D29, 0, 0, - 0, 0, 0,0x4627, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5953,0x5958, - 0, 0, 0,0x5959, 0, 0, 0, 0, - 0, 0,0x4865, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x405C, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3679, -0x5823,0x544A, 0,0x542A,0x5056,0x3364,0x5557, 0, -0x4F48,0x3962, 0,0x3F4B, 0,0x4362, 0, 0, - 0,0x3652, 0, 0,0x4D43,0x596E,0x5970, 0, - 0, 0,0x3533, 0,0x3635, 0, 0, 0, - 0, 0,0x3E24, 0, 0,0x486B, 0, 0, -0x482B, 0, 0,0x304B,0x392B,0x4179,0x5962, 0, -0x403C,0x3932, 0,0x3958,0x504B,0x3178,0x4664,0x3E5F, -0x3564,0x5748, 0,0x5178,0x3C66,0x4A5E, 0, 0, -0x3C3D,0x5966,0x5867, 0, 0,0x445A, 0, 0, -0x3854,0x483D, 0, 0,0x3261,0x5459, 0, 0, - 0, 0,0x4330, 0, 0,0x4361,0x5A22,0x485F, - 0,0x5034, 0,0x3E7C,0x4529, 0, 0, 0, -0x395A, 0,0x5A23, 0,0x5429,0x5A24, 0, 0, - 0, 0, 0,0x597B,0x362C, 0, 0,0x376B, -0x3179,0x597C,0x3365,0x3E76, 0,0x3F76,0x5231,0x4064, - 0, 0, 0,0x3633,0x597E,0x597D, 0, 0, -0x3E3B, 0, 0, 0,0x4660, 0,0x573C,0x5A21, - 0,0x4139, 0,0x3572,0x4168, 0, 0,0x3C75, - 0,0x3455, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x415D, 0,0x447D, 0, 0, -0x3C38,0x3732, 0, 0,0x376F, 0, 0, 0, - 0, 0, 0,0x596C, 0,0x463E, 0,0x3F2D, -0x3B4B, 0, 0,0x354A, 0,0x5B49,0x5057, 0, -0x4D39,0x303C,0x3376,0x3B77,0x5B4A,0x3A2F, 0,0x5464, -0x3536,0x3573,0x5856,0x4850, 0, 0,0x3756,0x4750, -0x5857, 0,0x3F2F, 0, 0,0x5B3B,0x5858, 0, - 0,0x504C,0x3B2E, 0, 0, 0,0x6B3E,0x4150, -0x4175,0x5472,0x3855,0x3434, 0,0x3375, 0, 0, -0x493E, 0, 0, 0,0x4550, 0, 0, 0, -0x4559,0x407B, 0,0x3170, 0,0x5859,0x394E, 0, -0x353D, 0, 0,0x585A, 0, 0,0x5646,0x4B22, -0x482F,0x4932,0x344C,0x3F4C, 0,0x3974, 0,0x585B, -0x585C,0x3667,0x3C41,0x4C6A, 0, 0, 0, 0, - 0, 0,0x4F77, 0,0x585D,0x4730, 0, 0, -0x3950,0x3D23, 0, 0,0x4C5E, 0,0x464A, 0, - 0, 0, 0, 0,0x5860, 0,0x585E, 0, - 0,0x585F, 0, 0, 0,0x307E, 0,0x3E67, - 0,0x4A23,0x3C74, 0, 0, 0, 0,0x3831, - 0, 0,0x386E, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5862, 0,0x3D4B, - 0,0x5864,0x5863, 0, 0, 0, 0, 0, -0x457C, 0, 0, 0, 0, 0, 0, 0, -0x5865, 0, 0,0x5866, 0, 0, 0, 0, - 0, 0, 0,0x4126, 0,0x4830,0x306C,0x3926, -0x3C53,0x4E71,0x5B3D,0x4153, 0, 0, 0, 0, -0x362F,0x567A,0x452C,0x3D59,0x5B3E,0x5B3F, 0, 0, - 0,0x4078,0x3E22,0x404D, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5B40,0x4A46, - 0, 0, 0,0x322A, 0, 0, 0,0x5342, - 0,0x4363, 0,0x512B, 0, 0, 0, 0, -0x5B42, 0,0x4055, 0, 0, 0,0x5B43, 0, -0x3F31, 0, 0, 0, 0, 0, 0,0x443C, - 0, 0, 0, 0,0x475A, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5B44, 0, 0, 0, 0, 0, 0, 0, - 0,0x5968,0x4957, 0, 0, 0,0x3934,0x4E70, -0x5448, 0, 0, 0, 0,0x307C,0x3452, 0, -0x5059, 0, 0, 0, 0,0x5969, 0,0x5E4B, -0x596B, 0, 0, 0, 0,0x5830,0x3B2F,0x3131, - 0,0x3357,0x584E, 0, 0,0x5451, 0, 0, -0x3D33,0x3F6F, 0,0x4F3B, 0, 0,0x5850, 0, - 0, 0,0x374B, 0, 0, 0,0x5851, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4625,0x4778,0x523D, 0, 0,0x5852,0x4464, - 0,0x4A2E, 0,0x4727, 0,0x5826, 0,0x497D, -0x4E67,0x3B5C,0x306B, 0, 0, 0,0x3B2A,0x502D, - 0,0x3130,0x5764,0x573F, 0,0x3525,0x4274,0x444F, - 0, 0,0x3229, 0,0x3237, 0,0x3165,0x5F32, -0x553C,0x3F28,0x422C,0x5855,0x4231, 0,0x5854,0x4E54, - 0,0x5A60, 0,0x4E40, 0, 0,0x5834,0x432E, -0x5321,0x4E23, 0,0x3C34,0x4834,0x4251, 0,0x3E6D, -0x5036, 0,0x5A61, 0, 0, 0, 0,0x4764, - 0, 0,0x3327, 0,0x3672,0x4C7C,0x407A, 0, - 0,0x4077, 0,0x5139,0x5161,0x5847, 0, 0, - 0, 0, 0, 0, 0,0x325E, 0, 0, -0x4065, 0,0x3A71, 0, 0,0x5848, 0,0x542D, - 0, 0,0x4F61,0x5849, 0,0x584A,0x4F43, 0, -0x3378,0x3E47, 0, 0, 0, 0,0x584B, 0, - 0, 0, 0, 0, 0, 0,0x5B4C, 0, - 0, 0, 0,0x4825, 0, 0, 0,0x4F58, - 0,0x487E,0x324E, 0, 0, 0, 0, 0, -0x5356,0x3266,0x3C30,0x5351,0x4B2B,0x3734, 0, 0, - 0,0x3722, 0, 0,0x4A65, 0,0x4821,0x4A5C, -0x3164,0x5070, 0,0x4551, 0, 0, 0,0x5B45, -0x357E, 0, 0,0x3F5A,0x3945,0x3E64,0x416D, 0, -0x5F36,0x5F35,0x563B,0x3D50,0x5559,0x3048,0x3623,0x3F49, -0x4C28,0x5F33,0x4A37,0x5352, 0,0x584F,0x5236,0x3A45, -0x4B3E,0x4C3E, 0,0x5F37,0x3570,0x5F34, 0, 0, - 0,0x5375, 0,0x3354,0x3877, 0,0x5F3A, 0, -0x3A4F,0x3C2A,0x3575, 0,0x4D2C,0x437B,0x3A73,0x4074, -0x4D42,0x4F72,0x5F38,0x4F45, 0,0x4240,0x5F39,0x4270, - 0, 0, 0,0x3E7D, 0,0x415F,0x4D4C,0x5277, -0x374D,0x5F41, 0,0x5F44, 0, 0,0x3771,0x3049, -0x3656,0x3754, 0,0x3A2C,0x4C7D,0x3F54,0x4B31,0x4674, - 0,0x5628,0x5F45, 0,0x4E62,0x3333, 0, 0, -0x4E7C,0x3435, 0,0x4E47,0x3A70, 0,0x4E61, 0, -0x513D, 0, 0,0x5F40, 0, 0,0x3474, 0, -0x334A, 0,0x3866,0x5F3B, 0, 0, 0, 0, -0x4445, 0,0x5F3C,0x5F3D,0x5F3E,0x453B,0x5F3F,0x5F42, -0x5431,0x5F43, 0,0x473A,0x4E58, 0, 0, 0, - 0, 0,0x4458, 0,0x5F4A, 0,0x5F4F, 0, -0x565C, 0, 0, 0, 0, 0, 0, 0, - 0,0x5F49,0x5F5A,0x4E36, 0,0x3A47,0x5F4E,0x5F48, -0x455E, 0, 0,0x496B,0x3A74,0x437C, 0, 0, -0x3E57, 0,0x5F46, 0,0x5F4D, 0,0x4558, 0, - 0, 0, 0,0x5526,0x3A4D, 0,0x3E4C,0x533D, -0x3840, 0,0x5664, 0,0x5F47,0x393E,0x3F27, 0, - 0,0x417C,0x5F4B,0x5F4C, 0,0x5F50, 0, 0, - 0, 0, 0,0x5F5B,0x5F65, 0,0x5F57,0x5F56, -0x5749,0x5F63,0x5F64,0x656B,0x5227,0x5F52, 0,0x3F29, - 0,0x545B, 0,0x3F48,0x5F54, 0, 0, 0, -0x4F4C, 0, 0,0x5F5D, 0,0x514A, 0,0x5F5E, -0x3027,0x4637,0x5F53, 0,0x3A65, 0,0x365F,0x4D5B, -0x397E,0x5455, 0, 0,0x5F5F,0x4F6C,0x3025,0x5F67, -0x5F51,0x5146,0x5F55,0x5F58,0x5F59,0x5F5C, 0,0x3B29, - 0,0x5F60,0x5F61, 0,0x5F62,0x5F66,0x5F68,0x5334, - 0, 0, 0, 0, 0,0x3867,0x4536,0x5F6A, -0x495A,0x4128,0x4444, 0, 0,0x3F5E,0x4F78, 0, - 0, 0,0x555C,0x5F6E, 0, 0, 0, 0, - 0, 0,0x3238, 0,0x3A5F,0x5F6C, 0,0x5B41, - 0,0x5164, 0, 0, 0, 0,0x4B74,0x343D, - 0,0x3026, 0, 0, 0, 0, 0,0x5F71, -0x4C46,0x5F72, 0, 0,0x5F6D, 0, 0, 0, - 0, 0, 0,0x5F69, 0, 0, 0, 0, -0x5F6B, 0,0x5F6F,0x5F70,0x3B3D, 0, 0,0x5F73, - 0, 0,0x5F74, 0,0x3B23, 0,0x4A5B,0x4E28, -0x6027,0x332A, 0,0x6026, 0, 0, 0,0x6021, - 0, 0, 0, 0,0x5F7E, 0,0x4D59,0x5F7C, - 0,0x5F7A, 0,0x3F50,0x5744, 0,0x494C, 0, - 0,0x5F78,0x3021, 0, 0, 0, 0, 0, -0x5F7D, 0, 0, 0, 0,0x5F7B,0x6022, 0, - 0, 0, 0, 0,0x6028, 0, 0, 0, - 0,0x3748, 0, 0,0x4621,0x4936,0x4032,0x5F75, - 0, 0,0x453E, 0,0x5844,0x5F79,0x4476, 0, - 0, 0, 0, 0, 0,0x6023,0x6024,0x6025, -0x5025, 0, 0,0x6034,0x4C64, 0,0x6031, 0, -0x3F26,0x602F,0x4E39,0x602B,0x4946, 0, 0,0x402E, -0x602E,0x3A6D,0x3A30,0x6029, 0, 0, 0,0x5F76, - 0,0x6033, 0, 0,0x6038, 0, 0, 0, -0x342D,0x6039, 0, 0,0x4F32,0x3A48, 0,0x6030, - 0, 0, 0, 0, 0, 0, 0,0x507A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x602C, 0,0x547B, 0,0x5F77, 0,0x4567, - 0,0x602D, 0,0x5377, 0,0x6036,0x6037, 0, - 0, 0, 0, 0,0x6044,0x5061, 0, 0, - 0,0x603C, 0, 0,0x6049,0x604A, 0, 0, - 0,0x603E,0x602A,0x4924,0x6041, 0,0x6032, 0, - 0, 0, 0, 0,0x4A48,0x6043, 0,0x6035, - 0,0x4E4B, 0,0x4B43,0x604D,0x6046,0x6042, 0, -0x604B, 0,0x603A,0x603F,0x6040, 0, 0,0x6045, - 0, 0,0x6047,0x6048, 0,0x604C, 0,0x603B, - 0, 0, 0, 0, 0,0x4B54,0x6055, 0, -0x6056,0x6052, 0, 0, 0, 0, 0, 0, -0x6050,0x3C4E, 0, 0,0x6051, 0,0x3842,0x5845, - 0, 0, 0, 0, 0, 0, 0, 0, -0x506A, 0, 0,0x426F, 0, 0,0x604F,0x603D, - 0, 0, 0,0x6054,0x6053, 0, 0,0x6057, - 0, 0, 0, 0,0x605C,0x6058, 0, 0, - 0,0x5676,0x3330, 0,0x576C, 0,0x4B3B, 0, - 0,0x605A, 0,0x4E7B, 0, 0, 0,0x3A59, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6061,0x605D,0x522D, 0, - 0, 0, 0, 0,0x6062, 0, 0,0x605B, -0x6059,0x605F, 0, 0,0x6060, 0, 0, 0, - 0, 0,0x605E, 0,0x6064, 0, 0, 0, -0x4677,0x582C,0x546B,0x6066,0x4A49, 0, 0, 0, - 0,0x6065, 0, 0, 0, 0,0x3841, 0, - 0, 0, 0,0x6067,0x6068, 0, 0, 0, - 0, 0, 0, 0, 0,0x6069,0x6063, 0, - 0, 0, 0, 0, 0, 0,0x3A3F,0x4C67, - 0, 0, 0,0x606A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4F79, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x606B, - 0, 0, 0, 0, 0, 0, 0,0x4842, - 0, 0, 0, 0,0x3D40, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4452, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x606C, 0, 0,0x606D, - 0, 0,0x4774,0x4B44, 0,0x606E,0x3B58,0x5836, -0x5272,0x606F,0x4D45, 0,0x365A, 0, 0, 0, - 0, 0, 0,0x6071, 0,0x5430, 0, 0, -0x4027,0x3451, 0, 0,0x4E27,0x6070, 0, 0, - 0,0x6072,0x394C, 0, 0,0x397A,0x4D3C,0x6073, - 0, 0, 0,0x4654,0x6074, 0,0x5432, 0, -0x4826,0x6076,0x6075, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6077, 0, 0,0x4D41, - 0, 0, 0,0x4A25, 0, 0, 0, 0, -0x545A,0x5B57,0x5B59, 0,0x5B58,0x3967,0x5B5C,0x5B5D, -0x3558, 0, 0,0x5B5A, 0, 0, 0, 0, - 0,0x5B5B,0x3321,0x5B5F, 0, 0,0x3B78, 0, -0x5637, 0,0x5B60, 0, 0, 0, 0,0x3E79, - 0, 0,0x373B, 0,0x5B50,0x4C2E,0x3F32,0x3B35, -0x5778,0x3F53, 0, 0, 0, 0, 0,0x3F69, - 0, 0,0x3C61,0x4C33,0x5B5E,0x3053,0x4E6B,0x3758, -0x5739,0x4642, 0, 0,0x4024, 0,0x4C39, 0, -0x5B67,0x5B61,0x463A,0x5B63, 0,0x5B68, 0,0x4577, - 0, 0, 0,0x5B6A, 0, 0,0x5B69,0x3F40, - 0, 0, 0,0x5B66,0x5B65, 0, 0, 0, - 0, 0,0x3439,0x402C,0x4222,0x5B62,0x5B64, 0, - 0, 0, 0,0x504D,0x5B6D, 0, 0, 0, - 0, 0,0x405D,0x5B72, 0, 0, 0, 0, - 0, 0, 0,0x3662, 0, 0, 0, 0, -0x5B73,0x5B52,0x3938,0x542B,0x5B6C, 0,0x3F51,0x5B70, - 0,0x5B51, 0,0x3566, 0,0x5B6B,0x3F65, 0, - 0, 0,0x5B6E, 0,0x5B71, 0, 0, 0, -0x5B79, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3921,0x3023, 0, 0, 0, 0, - 0, 0, 0,0x4271, 0, 0,0x3347,0x5B6F, - 0, 0,0x5B78, 0,0x4652,0x5B74, 0, 0, -0x5B75,0x5B77,0x5B76, 0, 0,0x5B7E, 0,0x5372, -0x323A, 0, 0, 0,0x5B7D, 0, 0, 0, - 0, 0, 0, 0, 0,0x5C24, 0,0x5B7B, - 0, 0, 0, 0,0x5B7A, 0, 0, 0, -0x5B7C,0x4560,0x3B79, 0, 0,0x5C23, 0, 0, -0x5C25, 0,0x4C43, 0, 0, 0,0x3651,0x5D40, - 0, 0, 0,0x5C21, 0,0x5C22, 0, 0, - 0,0x4735, 0, 0, 0,0x3669, 0, 0, - 0,0x5C27, 0, 0, 0, 0,0x5C26, 0, -0x5C29,0x3124, 0, 0,0x354C, 0, 0, 0, - 0, 0,0x3F30, 0, 0, 0, 0, 0, -0x515F, 0, 0, 0, 0,0x3642, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5C28, 0, 0, 0, - 0, 0, 0, 0,0x4B7A,0x6B73, 0, 0, - 0,0x4B5C, 0, 0,0x4B7E, 0, 0, 0, -0x4C41, 0, 0, 0, 0, 0,0x487B, 0, - 0, 0, 0, 0, 0,0x5C2A, 0, 0, - 0, 0, 0,0x4C6E,0x5C2B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5B53, 0, -0x5C2F,0x5C2C, 0,0x3E33, 0,0x4A7B, 0, 0, - 0,0x5C2D, 0, 0, 0, 0, 0, 0, - 0, 0,0x494A,0x4439, 0, 0, 0, 0, - 0,0x473D,0x5C2E, 0, 0, 0,0x5476,0x5066, - 0, 0, 0, 0, 0, 0, 0, 0, -0x442B,0x3655, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5B54, 0, 0, 0, - 0,0x315A, 0, 0, 0,0x5B55, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5B56, 0, 0, 0,0x3A3E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4840, 0, 0, 0, - 0, 0, 0,0x4A3F,0x4849, 0,0x5733, 0, -0x4979, 0, 0,0x3F47, 0, 0,0x3A78, 0, - 0,0x523C, 0, 0, 0, 0, 0, 0, - 0, 0,0x623A, 0,0x3426, 0, 0,0x3138, - 0, 0, 0, 0, 0,0x3834, 0,0x4F44, - 0, 0, 0, 0,0x5967,0x4F26,0x4D62, 0, - 0,0x596D,0x3660, 0,0x5239, 0, 0,0x393B, - 0, 0, 0, 0,0x6239,0x6237, 0,0x3473, - 0,0x4C6C,0x4C2B,0x3772, 0,0x5832,0x516B,0x3A3B, - 0,0x4A27, 0, 0,0x4D37, 0, 0,0x5244, -0x3F64,0x3C50,0x3661, 0,0x5E45, 0, 0, 0, - 0,0x5E46,0x5B3C, 0,0x5159, 0, 0,0x4666, -0x444E,0x376E, 0,0x375C, 0, 0,0x3F7C,0x5760, - 0,0x4675, 0, 0,0x313C,0x5E48,0x3D31,0x4C57, -0x5E4A, 0,0x5E49, 0, 0, 0, 0, 0, -0x356C, 0,0x495D, 0, 0,0x3042, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x452E,0x452B, 0,0x444C, 0, -0x3C69,0x4B7D, 0, 0, 0,0x3A43, 0, 0, - 0,0x6579,0x4867,0x657A,0x4D7D, 0,0x5731,0x383E, -0x4268, 0,0x4851, 0, 0,0x657B, 0, 0, - 0, 0,0x364A,0x3C4B, 0, 0,0x517D,0x6621, - 0,0x436E, 0, 0, 0, 0,0x6624, 0, - 0, 0, 0,0x657E,0x6625,0x4D57, 0, 0, -0x3741,0x657C,0x657D,0x6623, 0, 0,0x445D,0x6628, - 0, 0,0x6627, 0, 0, 0, 0, 0, - 0,0x4343, 0,0x465E, 0, 0,0x662A, 0, - 0, 0, 0, 0, 0, 0,0x4437, 0, - 0, 0,0x6622,0x4A3C, 0, 0, 0, 0, -0x3D63,0x3943,0x6626,0x5055,0x4E2F, 0, 0,0x6629, -0x6630, 0,0x5226, 0,0x3D2A,0x662D, 0, 0, - 0, 0, 0,0x662F, 0,0x4051, 0, 0, -0x524C, 0, 0, 0,0x3C27, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6631, 0,0x5276, 0, 0, 0,0x574B, - 0,0x4D7E, 0,0x4D5E,0x4226,0x662B,0x662C,0x3D3F, -0x662E,0x6633, 0, 0,0x6632, 0, 0, 0, - 0,0x6636, 0,0x6638, 0, 0, 0, 0, -0x446F, 0, 0, 0,0x4448, 0, 0,0x3E6A, -0x496F, 0, 0,0x6637, 0,0x3670, 0, 0, - 0,0x4364, 0, 0, 0, 0, 0, 0, - 0,0x5369,0x6634, 0,0x6635, 0,0x4822, 0, - 0, 0, 0, 0,0x663D, 0, 0, 0, -0x6639, 0, 0, 0, 0, 0,0x4645, 0, - 0,0x4D71,0x663B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x663C, 0, 0, - 0, 0,0x3B69, 0, 0, 0, 0, 0, - 0, 0,0x663E, 0, 0, 0, 0,0x663A, - 0, 0,0x4037, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5324,0x663F,0x4974,0x6643, - 0, 0,0x6644, 0, 0, 0, 0,0x5076, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x433D, 0, 0, 0, 0, 0, - 0, 0,0x4344,0x6642, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6641, 0, 0, 0, 0, 0, - 0, 0,0x6647,0x4F31, 0,0x6B74, 0, 0, -0x664A, 0, 0, 0, 0, 0,0x6645, 0, - 0,0x3C5E,0x4929, 0, 0, 0, 0, 0, - 0,0x3C35, 0, 0,0x4F53, 0, 0, 0, - 0, 0,0x6648, 0,0x6649, 0,0x664E, 0, -0x6650, 0, 0, 0,0x6651, 0, 0, 0, -0x664B,0x3555, 0,0x664C, 0, 0,0x664F, 0, - 0,0x445B, 0,0x6646, 0, 0, 0, 0, - 0,0x664D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6652, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6654,0x6653, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6655, 0,0x5978, 0, 0,0x6656, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6657, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5753,0x665D, 0,0x665E,0x3F57,0x5450, 0,0x5756, -0x3466,0x4B6F,0x665A,0x5843,0x574E,0x5022, 0,0x434F, - 0, 0,0x665F,0x3C3E,0x3942,0x665B,0x5127, 0, - 0,0x3A22,0x424F, 0,0x582B, 0, 0, 0, -0x4A6B,0x656E, 0,0x665C, 0,0x3775, 0, 0, - 0, 0,0x4866, 0, 0,0x4475, 0, 0, -0x6532,0x447E, 0,0x4B7C,0x6533,0x552C, 0,0x536E, -0x4A58,0x3032, 0,0x4B4E,0x4D6A, 0, 0,0x3A6A, - 0, 0, 0,0x6535, 0,0x6534, 0,0x575A, -0x3959,0x5666,0x3628,0x4D70,0x524B,0x3126,0x4A35, 0, -0x3368,0x4973,0x3F4D,0x507B,0x4A52,0x6536,0x3B42, 0, - 0, 0,0x4F5C,0x392C, 0, 0, 0, 0, -0x5457, 0, 0,0x3A26,0x5167,0x4F7C,0x3C52, 0, -0x6537,0x485D, 0, 0, 0,0x3F6D,0x3176,0x4B5E, - 0, 0,0x3C45, 0,0x3C44,0x527A,0x435C,0x3F5C, - 0, 0, 0, 0,0x383B, 0, 0, 0, -0x4342, 0,0x3A2E,0x5422, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x475E,0x442F,0x326C, - 0,0x3951, 0, 0,0x653B,0x4148, 0, 0, -0x552F, 0, 0, 0, 0, 0,0x653C, 0, -0x653E, 0, 0, 0, 0, 0, 0, 0, -0x3467,0x3654,0x4B42,0x5130,0x353C, 0, 0,0x4A59, - 0,0x3762, 0, 0,0x4964, 0,0x3D2B, 0, - 0,0x4E3E,0x5770, 0, 0, 0, 0,0x5021, - 0,0x4959, 0, 0,0x367B,0x6658,0x3C62, 0, -0x333E, 0,0x4950, 0,0x6659,0x3322, 0, 0, - 0, 0,0x5E4C, 0,0x5348,0x5E4D, 0,0x5222, - 0, 0, 0, 0,0x5E4E, 0, 0, 0, - 0,0x3E4D, 0, 0,0x5E4F, 0, 0, 0, -0x4A2C,0x527C,0x335F,0x656A,0x4461,0x3E21,0x4E32,0x4472, -0x3E56,0x4628,0x3263, 0, 0,0x3E53, 0, 0, -0x477C,0x4C6B,0x3D6C,0x4E5D, 0, 0,0x4A3A,0x4641, -0x656C,0x503C, 0, 0, 0,0x5539, 0, 0, - 0,0x656D, 0, 0, 0, 0,0x4A74, 0, -0x4D40,0x4245, 0,0x656F, 0,0x4244,0x6570, 0, - 0, 0, 0, 0, 0, 0,0x6578,0x4D4D, - 0,0x493D, 0, 0, 0, 0, 0, 0, - 0,0x5259,0x6128, 0, 0, 0, 0,0x536C, - 0,0x4B6A,0x4671, 0, 0, 0, 0, 0, -0x612C, 0, 0, 0,0x6127,0x6129, 0, 0, -0x612A,0x612F, 0, 0,0x326D, 0,0x612B,0x385A, -0x612D,0x612E,0x6130,0x353A,0x6131, 0, 0, 0, - 0, 0,0x6133,0x6138, 0, 0, 0, 0, - 0,0x5152, 0,0x6136,0x6135,0x416B, 0, 0, - 0,0x6137, 0,0x5440, 0,0x6132, 0,0x613A, -0x3036, 0, 0, 0, 0,0x6134, 0,0x3F79, - 0,0x6139, 0, 0,0x613B, 0, 0, 0, - 0, 0, 0,0x613E, 0, 0, 0, 0, - 0, 0,0x613C, 0, 0, 0, 0, 0, - 0,0x5645, 0, 0, 0, 0, 0, 0, - 0,0x4F3F, 0, 0,0x613D,0x613F,0x424D, 0, -0x366B, 0,0x5378, 0, 0,0x474D, 0, 0, -0x3765, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3E7E, 0, 0, 0, 0, - 0, 0,0x6140,0x6141, 0, 0,0x6147,0x3367, - 0, 0, 0, 0, 0, 0,0x4669, 0, - 0, 0, 0, 0,0x345E, 0,0x5142, 0, - 0, 0, 0,0x6148, 0, 0,0x6146, 0, - 0, 0, 0, 0,0x6145, 0,0x6143,0x6142, - 0,0x3140, 0, 0, 0,0x5538,0x6144, 0, - 0, 0, 0, 0,0x614B, 0, 0, 0, - 0, 0, 0, 0, 0,0x614C,0x614A, 0, - 0, 0, 0, 0, 0, 0, 0,0x6F7A, - 0, 0,0x6153,0x6152,0x4736, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6149, 0, 0,0x614E, 0,0x6150, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6154, 0,0x6151,0x614D, 0, 0,0x614F, - 0, 0, 0, 0,0x6155, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6156, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6157, 0, 0, 0,0x6158, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x615A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x615B, 0, 0, - 0, 0, 0, 0, 0,0x4E21, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x675D, 0,0x3428,0x565D, 0, - 0,0x5132,0x3332, 0, 0,0x3924,0x5773,0x4749, -0x3E5E,0x392E, 0,0x4E57, 0, 0,0x326E,0x5B4F, - 0,0x3C3A,0x5251,0x4B48,0x304D, 0, 0,0x4F6F, - 0, 0, 0, 0, 0,0x5963,0x3D6D, 0, - 0,0x3152,0x4A50,0x323C, 0,0x4B27,0x372B, 0, -0x4A26, 0, 0, 0,0x4F23, 0, 0,0x6078, -0x554A,0x607B, 0, 0,0x607A,0x4541,0x4C7B, 0, -0x4131,0x6079,0x5663,0x322F,0x5644,0x355B, 0, 0, - 0, 0, 0, 0, 0, 0,0x3478,0x5621, - 0, 0, 0, 0, 0,0x4F2F,0x306F, 0, - 0,0x607C, 0, 0, 0, 0, 0,0x6121, -0x3323, 0, 0,0x607D,0x607E,0x4331, 0, 0, - 0, 0,0x435D, 0,0x6122,0x3779, 0, 0, - 0, 0, 0, 0,0x3B4F, 0, 0, 0, - 0, 0, 0, 0,0x6123,0x443B, 0, 0, - 0, 0, 0,0x6124, 0, 0,0x6125, 0, - 0,0x6126,0x3431, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3849,0x463D,0x446A, 0,0x3222, 0, -0x5052, 0,0x675B,0x3B43,0x5357,0x5344, 0,0x3963, -0x624F, 0, 0, 0,0x572F, 0,0x476C,0x3153, - 0, 0,0x3432,0x6251, 0, 0, 0,0x5072, -0x422E,0x6250, 0,0x3F62,0x5326,0x3557,0x6252,0x356A, - 0,0x436D,0x387D, 0,0x382E, 0,0x4553,0x374F, -0x6254, 0, 0, 0, 0,0x6253,0x3648,0x5779, - 0, 0, 0, 0, 0,0x4D25, 0, 0, - 0, 0, 0,0x6258, 0,0x6256,0x4A7C,0x3F35, -0x5339,0x6255, 0, 0, 0, 0,0x6257, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x412E,0x4048, 0, 0, 0, 0, 0, - 0,0x625B,0x625A,0x402A, 0, 0,0x414E, 0, - 0, 0, 0,0x625C, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x625D, 0,0x625E, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5B48, 0,0x5153,0x4D22, - 0, 0,0x3D28, 0, 0, 0,0x5E43,0x5825, -0x3F2A,0x5B4D,0x526C,0x467A,0x452A, 0, 0, 0, -0x5E44, 0,0x3157,0x5F2E, 0, 0, 0,0x4A3D, - 0,0x5F31, 0,0x392D, 0,0x527D, 0,0x3825, -0x3A6B, 0, 0,0x335A, 0, 0, 0,0x355C, -0x5545, 0, 0, 0, 0,0x4356,0x4F52,0x3B21, - 0,0x6573,0x6572, 0, 0,0x6574, 0,0x4D64, - 0,0x4875, 0, 0, 0, 0, 0, 0, - 0,0x352F,0x473F, 0,0x6576, 0, 0, 0, -0x6C30, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6566, 0,0x3969,0x3531, 0,0x423C,0x6568,0x6567, -0x6569, 0, 0, 0, 0,0x524D, 0, 0, - 0,0x616A,0x504E, 0,0x4D2E, 0,0x5165, 0, - 0,0x324A,0x316B, 0,0x3172,0x456D, 0, 0, -0x5543,0x5330, 0,0x615C, 0, 0, 0,0x615D, - 0,0x525B, 0,0x3339,0x314B, 0, 0, 0, -0x4D79,0x5577,0x615E, 0,0x3E36,0x347D, 0,0x615F, -0x3A5C,0x6160,0x3B32,0x4249,0x6161, 0, 0, 0, -0x506C, 0,0x4D3D, 0, 0,0x6162, 0,0x3543, -0x4547,0x6163, 0, 0,0x6164, 0, 0, 0, - 0,0x5379, 0, 0, 0, 0, 0, 0, -0x6165, 0,0x512D, 0, 0,0x6166,0x4E22, 0, - 0, 0, 0, 0, 0,0x6167, 0,0x3542, - 0, 0, 0, 0,0x6168,0x3B55, 0, 0, - 0, 0, 0,0x5044,0x6260,0x3158,0x5264, 0, - 0,0x6261, 0, 0,0x3C49,0x484C, 0,0x6263, -0x6C7E,0x6C7D,0x5F2F, 0, 0, 0,0x6262,0x563E, -0x4D7C,0x4326, 0, 0, 0,0x6343, 0, 0, -0x5652,0x6267, 0, 0,0x6268, 0, 0,0x5347, - 0, 0,0x626C,0x3F6C, 0,0x626D,0x6265, 0, - 0,0x3340, 0, 0, 0,0x446E, 0, 0, -0x626E, 0, 0,0x5043, 0,0x3A76,0x6269,0x375E, -0x3B33,0x4C2C,0x4B4B,0x6264,0x6266,0x626A,0x626B, 0, - 0, 0,0x6277, 0, 0,0x6274,0x5475,0x6273, - 0, 0,0x452D, 0,0x557A,0x4542,0x3240, 0, - 0,0x626F, 0,0x6272,0x412F,0x4B3C, 0, 0, -0x3521,0x6279, 0, 0, 0,0x3C31,0x6271,0x5054, -0x5439,0x6275,0x3956,0x6276, 0, 0, 0,0x4753, - 0, 0, 0, 0, 0,0x6270, 0, 0, - 0, 0, 0,0x575C,0x6D21, 0, 0,0x6278, - 0,0x6D25,0x627E,0x4A51, 0, 0, 0, 0, - 0, 0, 0,0x4135, 0,0x3B50, 0, 0, -0x3F56, 0,0x3A63, 0, 0,0x4B21, 0, 0, - 0,0x6D26,0x6D23, 0, 0,0x6D22, 0, 0, - 0, 0,0x3B56,0x6D27,0x5074, 0, 0,0x6D24, -0x3A5E,0x3677,0x6321,0x3632,0x4C71,0x3927, 0,0x4F22, -0x4721, 0, 0,0x3F52, 0, 0,0x3671, 0, -0x627A,0x627B,0x627D,0x627C,0x4455,0x6322, 0,0x5341, - 0, 0, 0,0x6327,0x4744, 0, 0, 0, - 0,0x4F24, 0, 0,0x6329,0x3A37, 0, 0, - 0, 0,0x6328, 0,0x3B5A, 0,0x6323, 0, - 0, 0,0x6324,0x632A, 0,0x6326, 0,0x4E72, -0x5346, 0, 0,0x3B3C, 0, 0,0x5443, 0, -0x447A, 0, 0,0x6D28,0x507C,0x6325, 0,0x4375, - 0,0x632D,0x312F, 0,0x6332, 0, 0, 0, -0x3C42, 0, 0,0x632C,0x353F, 0, 0, 0, - 0, 0, 0, 0, 0,0x4769,0x6330, 0, - 0, 0,0x3E2A,0x4D6F, 0, 0, 0, 0, - 0,0x3B73, 0, 0, 0,0x4C68, 0, 0, -0x632F, 0,0x6331, 0,0x4F27,0x632E, 0,0x4E29, -0x3B5D, 0, 0, 0, 0, 0,0x356B,0x3E65, -0x3252,0x334D, 0,0x3139,0x632B,0x3251,0x352C,0x395F, -0x3668, 0, 0,0x4F6B,0x6337, 0,0x3B4C, 0, - 0,0x4847,0x504A, 0, 0, 0, 0, 0, -0x6338,0x336E, 0, 0, 0, 0,0x6D29, 0, -0x537A,0x5364, 0, 0, 0,0x6D2A,0x6339,0x5262, - 0, 0, 0, 0, 0,0x6335, 0, 0, - 0, 0,0x535E, 0, 0, 0, 0,0x3850, -0x6333, 0, 0,0x6336,0x375F, 0,0x6334,0x4022, - 0, 0, 0,0x633A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5438, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3448, 0,0x633B, 0,0x3B45, 0,0x4977, 0, - 0,0x4965, 0, 0, 0,0x443D, 0, 0, - 0, 0, 0, 0, 0,0x6D2B, 0, 0, - 0, 0,0x427D, 0, 0, 0, 0,0x3B5B, -0x3F2E, 0, 0, 0, 0, 0, 0, 0, -0x4E3F, 0, 0, 0, 0,0x633C, 0,0x3F36, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x316F, 0, 0,0x5477, 0, - 0, 0, 0, 0,0x633E, 0, 0, 0, - 0, 0, 0, 0, 0,0x6D2D, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x633F, -0x3A29,0x6D2C, 0, 0,0x633D, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6340, - 0, 0, 0, 0, 0, 0,0x3A36, 0, - 0, 0,0x362E, 0, 0, 0, 0, 0, -0x5038, 0,0x3043,0x6D2E, 0, 0, 0, 0, - 0,0x6D2F,0x4041, 0,0x6341, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4533, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6342, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5C32, - 0, 0, 0, 0, 0, 0,0x6D30, 0, -0x386A, 0,0x4E6C,0x6A27,0x5067,0x4A79,0x4856,0x4F37, -0x3349,0x4E52,0x3D64, 0, 0,0x635E,0x3B72,0x6A28, -0x553D, 0,0x465D,0x6A29, 0, 0, 0,0x6A2A, - 0,0x6A2C,0x6A2B, 0,0x6A2E,0x6A2D, 0, 0, - 0, 0,0x3D58, 0,0x6A2F, 0,0x423E, 0, - 0, 0, 0,0x3441,0x3477, 0, 0,0x3B27, - 0, 0, 0, 0, 0,0x6C66,0x6C65,0x373F, -0x4B79,0x3162, 0,0x6C67, 0, 0, 0,0x4948, -0x6C68,0x6C69, 0,0x4A56,0x5E50,0x3245,0x547A, 0, - 0,0x464B,0x3047,0x3472,0x4853, 0, 0, 0, -0x4D50, 0, 0,0x3F38, 0, 0, 0, 0, - 0, 0, 0,0x3F5B, 0, 0,0x4724,0x5634, - 0,0x4029,0x5E51,0x4928,0x516F,0x4524,0x3067,0x3336, -0x4845, 0, 0,0x3062, 0, 0,0x3776, 0, - 0,0x457A, 0, 0,0x3673, 0,0x5552,0x3350, -0x3C3C, 0, 0, 0,0x332D, 0, 0, 0, - 0,0x3E71,0x3051, 0, 0, 0, 0, 0, - 0,0x5256,0x4A63,0x5725, 0,0x4D36,0x3636,0x3F39, -0x555B, 0,0x3827,0x4557, 0, 0, 0,0x5E52, -0x3F59,0x4255,0x4740, 0,0x3B24,0x3128, 0, 0, -0x456A, 0, 0,0x457B,0x4C27, 0, 0, 0, - 0,0x3127, 0, 0, 0,0x3556, 0, 0, - 0,0x4428, 0,0x5E53,0x513A,0x3369, 0,0x4372, - 0, 0,0x3777, 0,0x5674,0x3523,0x3270,0x4434, -0x4469,0x402D,0x5E54, 0,0x3068,0x4544,0x4160, 0, -0x3955, 0,0x3E5C,0x4D58,0x304E, 0,0x4D4F,0x5E56, -0x3E50,0x573E,0x5E55,0x5550,0x305D, 0, 0,0x4462, - 0, 0,0x4223,0x3C70, 0,0x5335,0x4039,0x4521, -0x3226,0x5471, 0, 0,0x4028,0x4A43,0x5E57,0x557C, - 0,0x3930, 0,0x482D,0x4B29, 0,0x5E59,0x3F3D, - 0, 0, 0, 0,0x4634,0x5727,0x4A30,0x4443, - 0,0x3356,0x3952, 0, 0, 0, 0,0x5638, -0x6A7C,0x3034, 0, 0, 0, 0,0x3F66, 0, - 0,0x4C74, 0, 0, 0, 0,0x4D5A, 0, - 0, 0,0x563F,0x424E, 0,0x4E4E,0x4C22,0x502E, -0x4453,0x3532,0x5E58,0x5575,0x3C37,0x3B53, 0, 0, -0x3024, 0,0x4532,0x346C, 0, 0, 0,0x5571, - 0, 0,0x6A7D, 0, 0, 0, 0, 0, - 0,0x5E5A,0x4D26, 0, 0,0x4D6C, 0, 0, - 0, 0,0x4E66,0x5E5C, 0,0x4D31,0x4026, 0, - 0,0x573D, 0,0x5E5B,0x3046,0x3A34,0x4953,0x4473, -0x3E68, 0, 0, 0, 0,0x3236, 0, 0, - 0, 0, 0, 0, 0, 0,0x404C,0x4B70, - 0,0x3C71,0x3B3B,0x3537, 0, 0, 0,0x4575, - 0,0x5E66, 0, 0, 0,0x5E63,0x3E5D, 0, - 0,0x5E5F, 0, 0, 0, 0,0x3437,0x3D5D, - 0, 0,0x5E60,0x446D, 0, 0, 0, 0, -0x4F46, 0,0x3560, 0, 0, 0, 0,0x365E, -0x4A5A,0x3574,0x5E65, 0,0x5546, 0,0x5E61,0x4C4D, -0x467E, 0,0x4545, 0, 0, 0,0x5234, 0, -0x3E72, 0, 0, 0, 0, 0, 0, 0, -0x4253, 0,0x4C3D,0x3338, 0,0x3D53, 0,0x3F58, -0x4D46,0x515A,0x346B, 0,0x5E64,0x5E5D,0x5E67, 0, -0x6A7E, 0, 0,0x4230,0x5E62, 0, 0,0x5640, -0x3527, 0,0x3274, 0,0x5E68, 0,0x5E72, 0, - 0, 0, 0, 0,0x5E6D, 0,0x5E71, 0, - 0,0x4860, 0, 0, 0,0x5761,0x5E6F,0x4368, -0x4C61, 0,0x3265, 0, 0, 0,0x523E, 0, - 0, 0, 0, 0, 0, 0,0x5E6E, 0, -0x5E6B,0x4E55, 0,0x3427, 0, 0, 0, 0, - 0,0x3F2B,0x3E3E, 0, 0,0x3D52, 0, 0, - 0, 0,0x5E69, 0,0x542E, 0,0x5E5E, 0, -0x5E6A, 0, 0, 0, 0,0x403F, 0,0x5E6C, -0x3273,0x3869,0x4227, 0, 0,0x3D41, 0, 0, - 0, 0, 0,0x5E75,0x5E78, 0, 0,0x322B, -0x3424, 0, 0,0x346A,0x4926, 0, 0, 0, - 0, 0, 0,0x5E76,0x4B51, 0,0x3863, 0, -0x5E77,0x5E7A, 0, 0, 0, 0,0x5E79, 0, - 0, 0,0x4C42, 0,0x3061,0x346E, 0, 0, - 0, 0, 0, 0,0x653A, 0, 0, 0, - 0, 0,0x502F, 0, 0,0x326B, 0,0x6B21, - 0,0x5E74, 0, 0,0x4963,0x5E73,0x305A,0x5221, -0x3177, 0,0x4C2F, 0, 0, 0, 0, 0, - 0, 0,0x5E70, 0,0x4B24, 0, 0, 0, -0x552A, 0, 0, 0, 0, 0,0x5E7B, 0, - 0, 0, 0, 0, 0, 0, 0,0x345D, - 0,0x4426, 0, 0, 0,0x5E7D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x437E,0x4421,0x5F21, 0, 0, 0, 0, 0, - 0, 0,0x414C, 0,0x5E7C,0x3E6F, 0,0x4632, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3345,0x4876, 0, 0,0x4B3A,0x5E7E, 0, - 0,0x5F24, 0, 0, 0, 0,0x5732, 0, - 0, 0, 0, 0,0x3337, 0, 0, 0, - 0,0x4143, 0, 0,0x474B,0x3225,0x3469, 0, -0x572B, 0, 0, 0, 0,0x446C, 0,0x5F22, -0x5F23, 0,0x5F25, 0,0x3A33, 0, 0, 0, -0x5F26, 0,0x405E, 0, 0,0x4943, 0, 0, - 0, 0, 0, 0, 0,0x3259,0x4766, 0, -0x5F27, 0,0x475C, 0, 0, 0, 0,0x5F28, -0x6B22, 0, 0, 0, 0, 0,0x4B53, 0, - 0, 0,0x5F2A, 0,0x5F29, 0,0x3241, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x454A, 0, 0, 0, 0, 0, 0, 0, - 0,0x5F2B, 0, 0, 0, 0, 0, 0, - 0, 0,0x545C, 0, 0, 0, 0, 0, -0x4841, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5F2C, 0, 0, - 0, 0, 0,0x3E70, 0, 0,0x5F2D,0x5627, - 0, 0, 0, 0,0x6A37,0x6B36,0x4A55, 0, -0x587C,0x3844, 0,0x3925, 0, 0,0x3745,0x557E, - 0, 0, 0, 0, 0,0x394A, 0, 0, -0x5027,0x744D, 0, 0,0x3550, 0, 0,0x4374, - 0,0x3E48, 0, 0, 0,0x6B37,0x303D, 0, - 0,0x3D4C, 0,0x4132, 0,0x3156,0x3328, 0, - 0, 0,0x3852,0x4922, 0, 0,0x3658, 0, - 0, 0, 0,0x6B38,0x3E34, 0, 0, 0, -0x4A7D, 0,0x4743, 0,0x557B, 0, 0,0x3773, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4E44, - 0, 0, 0,0x552B,0x3173, 0, 0, 0, -0x6C33,0x305F, 0,0x6C35, 0, 0, 0,0x3637, - 0,0x414F, 0,0x757A,0x5031, 0, 0,0x5565, - 0,0x4E53, 0, 0,0x3D6F,0x3362, 0,0x382B, - 0,0x5536, 0,0x6D3D, 0,0x364F, 0,0x4B39, -0x5042, 0, 0, 0, 0, 0, 0, 0, - 0,0x373D, 0, 0,0x6C36,0x4A29, 0, 0, - 0,0x4554, 0,0x6C39,0x6C38,0x4243,0x6C37, 0, - 0, 0, 0,0x507D,0x6C3A, 0,0x6C3B,0x5765, - 0, 0,0x6C3C, 0, 0, 0,0x6C3D,0x466C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4E5E, 0,0x3C48, 0, 0,0x4855,0x3529,0x3E49, -0x563C,0x5467, 0, 0,0x512E,0x5071,0x6A38,0x6A39, -0x6A3A,0x3A35, 0, 0, 0, 0,0x4A31,0x3F75, - 0, 0,0x4D7A, 0, 0, 0, 0, 0, -0x6A40, 0,0x303A,0x6A3E, 0, 0,0x4025, 0, - 0, 0,0x6A3B, 0,0x327D, 0,0x4377,0x3B68, - 0, 0, 0,0x5257,0x4E74,0x6A3F, 0, 0, - 0,0x6A3C, 0, 0, 0,0x6A43, 0,0x5047, -0x5333, 0, 0, 0, 0,0x343A, 0,0x4341, -0x5772, 0, 0, 0, 0,0x5551, 0,0x4A47, - 0,0x6A45, 0, 0,0x6A44,0x6A47,0x6A46, 0, - 0, 0, 0, 0,0x5667, 0,0x4F54, 0, - 0,0x6A4B, 0,0x3B4E, 0, 0, 0, 0, - 0, 0, 0,0x3D7A,0x494E, 0, 0,0x6A4C, - 0, 0,0x4939,0x4F7E,0x6A4A,0x544E,0x6A4D,0x6A4F, - 0, 0,0x4D6D, 0, 0, 0, 0,0x6A49, - 0,0x6A4E, 0, 0,0x4E6E, 0,0x3B5E, 0, -0x333F, 0, 0, 0, 0, 0,0x4655,0x3E30, -0x4E7A, 0, 0, 0,0x4767, 0,0x3E27,0x6A50, - 0, 0,0x5647, 0, 0, 0,0x4140, 0, - 0, 0,0x545D, 0,0x6A51, 0, 0,0x4F3E, - 0, 0, 0, 0,0x6A52, 0, 0, 0, - 0,0x4A6E, 0, 0, 0, 0,0x452F,0x3035, - 0, 0, 0, 0, 0,0x6A54, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6A53, -0x745F, 0, 0, 0, 0, 0,0x443A, 0, - 0, 0, 0, 0,0x3129, 0, 0, 0, - 0,0x655F, 0, 0, 0, 0,0x6A55, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4A6F, 0,0x6A56,0x6A57,0x4658, 0, 0, - 0, 0, 0, 0, 0, 0,0x6A58, 0, - 0,0x6A59, 0, 0, 0, 0, 0, 0, -0x543B, 0,0x477A,0x5237,0x387C, 0, 0,0x6A42, - 0,0x325C, 0, 0,0x427C, 0,0x5478,0x4C66, -0x576E, 0, 0, 0, 0, 0, 0, 0, -0x5442,0x5350,0x6B43,0x4573, 0,0x377E, 0, 0, -0x6B54, 0, 0, 0,0x4B37,0x6B5E, 0,0x404A, - 0, 0, 0,0x4D7B, 0,0x332F, 0,0x465A, - 0, 0, 0, 0, 0, 0,0x6B7C, 0, -0x443E, 0,0x4E34,0x4429,0x313E,0x547D, 0,0x4A75, - 0,0x566C, 0, 0,0x4653,0x3664, 0, 0, - 0, 0,0x3B7A, 0, 0,0x5060, 0, 0, -0x4931, 0,0x5453,0x4828, 0, 0,0x384B, 0, -0x683E,0x493C, 0, 0,0x683B, 0,0x406E,0x5053, -0x3244,0x3465, 0,0x683C, 0, 0,0x5548, 0, - 0, 0, 0, 0,0x3645, 0,0x683D,0x4A78, -0x385C,0x4C75, 0, 0, 0,0x4034, 0, 0, -0x516E,0x683F,0x6842, 0, 0,0x3A3C, 0,0x312D, -0x3D5C, 0,0x6A3D,0x6843, 0,0x6846, 0,0x684B, - 0, 0, 0, 0,0x684C, 0,0x4B49,0x3065, - 0,0x3C2B, 0, 0,0x3939, 0, 0,0x6841, - 0,0x4D77, 0,0x684A, 0, 0, 0, 0, -0x4E76, 0, 0, 0, 0,0x556D, 0,0x4156, -0x6844, 0,0x4336, 0,0x397B,0x5626,0x6848, 0, - 0, 0,0x4A60,0x5466, 0,0x6840, 0,0x6845, -0x6847, 0,0x4739,0x3763, 0,0x6849, 0,0x3F5D, -0x6852, 0, 0,0x6857, 0,0x6855,0x3C5C,0x3C4F, -0x685B, 0, 0, 0, 0, 0, 0, 0, - 0,0x685E, 0,0x685A,0x317A, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3058, -0x4433,0x384C,0x4662,0x483E,0x4861, 0, 0, 0, -0x684F,0x6854,0x6856, 0,0x3971,0x6858,0x5775, 0, -0x447B, 0,0x685C, 0, 0,0x3269, 0, 0, - 0,0x6851, 0, 0,0x3C6D, 0, 0,0x3F42, -0x684D,0x5679, 0,0x4178,0x3271, 0, 0, 0, - 0, 0, 0, 0, 0,0x685F, 0,0x4A41, -0x6859, 0, 0, 0, 0,0x5524, 0,0x316A, -0x553B,0x684E,0x6850,0x3630,0x6853, 0,0x685D,0x4038, - 0,0x4A77, 0,0x4B28, 0, 0,0x465C,0x4075, - 0, 0, 0, 0, 0,0x6869, 0, 0, - 0,0x5023, 0, 0, 0, 0, 0, 0, - 0,0x6872,0x566A, 0, 0, 0, 0, 0, - 0, 0,0x6860,0x6861, 0, 0, 0,0x5179, -0x3A4B,0x3879, 0, 0,0x3871,0x5454,0x686F, 0, -0x686E,0x686C,0x3970,0x4C52,0x6866,0x4E26,0x3F72, 0, -0x3038,0x6871,0x6870, 0,0x5740, 0,0x6864, 0, -0x4D29,0x4923, 0,0x3B38,0x3D5B,0x686A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6862,0x6863,0x6865,0x3535,0x6867,0x4745,0x686B,0x686D, -0x3D30,0x572E, 0,0x6878, 0, 0, 0, 0, - 0, 0, 0, 0,0x6875, 0,0x4D30,0x6876, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x413A, 0,0x6868, 0,0x4337,0x3070, 0, - 0, 0, 0, 0, 0, 0, 0,0x6874, - 0, 0, 0,0x6877, 0, 0, 0,0x3923, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4952, 0, 0, 0,0x434E,0x4E60, -0x4066, 0, 0, 0, 0,0x4B73, 0,0x4C5D, -0x5035, 0, 0,0x4A61, 0,0x6873, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3C6C, 0,0x6879, 0, 0, 0, 0, 0, - 0,0x435E, 0,0x4665, 0,0x3977, 0, 0, - 0, 0,0x3074, 0, 0,0x5758, 0, 0, -0x3C2C, 0,0x456F, 0, 0, 0, 0, 0, -0x4C44, 0, 0,0x6926, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x492D, 0, -0x6922,0x4062, 0, 0, 0,0x3F43, 0, 0, - 0,0x687E,0x3957, 0,0x687B, 0, 0, 0, - 0,0x6924, 0, 0, 0,0x524E, 0, 0, - 0, 0, 0,0x6923, 0,0x5632,0x5735, 0, -0x6927, 0,0x3D37, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x687C, -0x687D, 0, 0, 0,0x6921, 0, 0, 0, - 0, 0, 0, 0, 0,0x4D56, 0, 0, -0x522C, 0, 0, 0,0x6932, 0, 0, 0, - 0,0x6929, 0, 0, 0,0x342A, 0,0x343B, - 0, 0,0x692B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5028, 0, 0,0x6925, - 0, 0,0x337E, 0, 0,0x692C,0x4063, 0, -0x692A, 0, 0,0x6939, 0, 0,0x6938, 0, - 0, 0, 0,0x692E, 0, 0,0x687A, 0, - 0,0x6928, 0, 0, 0, 0, 0,0x3F2C, -0x6931,0x693A, 0, 0,0x4225, 0, 0, 0, -0x692F, 0,0x3845, 0,0x692D, 0,0x535C,0x6934, -0x6935,0x6937, 0, 0, 0,0x6947, 0, 0, - 0, 0, 0, 0,0x4046,0x6945, 0, 0, -0x6930, 0, 0,0x693B,0x3071, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x693C, -0x5525, 0, 0,0x693E, 0,0x693F, 0, 0, - 0,0x6941, 0, 0,0x4171, 0, 0,0x4836, - 0, 0, 0,0x693D, 0, 0, 0, 0, - 0,0x6942, 0, 0, 0, 0, 0, 0, - 0, 0,0x6943, 0,0x6933, 0,0x6936, 0, -0x3B31, 0, 0, 0,0x6940, 0, 0, 0, - 0, 0, 0,0x3C77, 0, 0, 0,0x6944, -0x6946, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x694A, 0, 0, - 0, 0,0x694E, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x325B, 0,0x6948, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x372E, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x694B, -0x694C, 0, 0, 0, 0, 0, 0,0x5541, - 0,0x4423, 0, 0, 0, 0, 0, 0, -0x6958, 0,0x3A61, 0, 0, 0, 0,0x6949, - 0,0x5323, 0, 0, 0,0x6954, 0, 0, - 0, 0, 0, 0, 0,0x6957,0x6950, 0, - 0, 0, 0, 0,0x694F, 0, 0,0x4741, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6952, 0, 0, 0, 0, 0, 0, 0, -0x6959,0x3348, 0,0x6953, 0, 0, 0, 0, - 0,0x4F70, 0, 0, 0,0x694D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3377, 0, 0, 0, 0, 0, 0, - 0,0x6956, 0, 0,0x695A, 0, 0, 0, -0x4C34, 0, 0, 0,0x4F2D, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6955, 0, -0x695C,0x695B, 0, 0, 0, 0, 0,0x695E, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6951, 0, 0, 0, 0, 0, 0, 0, - 0,0x695D, 0,0x695F,0x434A, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4737,0x344E,0x3B36,0x5040,0x6C23, 0, 0,0x4537, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x537B, 0, 0, 0, 0,0x6C24, - 0,0x6C25,0x465B, 0, 0, 0,0x3F6E, 0, - 0, 0, 0,0x6C26, 0, 0,0x6C27,0x502A, - 0,0x4738, 0, 0,0x3868, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6C28, 0, 0, 0, 0, 0, 0, - 0, 0,0x5639,0x557D,0x344B,0x323D,0x4E64,0x4667, - 0, 0,0x4D61, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3475, 0,0x4B40,0x3C5F, 0, 0, 0, - 0,0x6962,0x6963,0x516A,0x6965, 0,0x3479,0x6964, - 0,0x5133,0x4A62,0x3250, 0,0x6968, 0, 0, - 0, 0,0x6966,0x6967, 0, 0,0x5633, 0, - 0, 0,0x6969,0x696A, 0, 0, 0, 0, - 0,0x696B, 0, 0, 0, 0, 0, 0, - 0, 0,0x696C, 0, 0, 0, 0, 0, - 0, 0, 0,0x6C2F,0x4539,0x364E, 0,0x5273, - 0, 0, 0, 0, 0, 0, 0,0x356E, - 0,0x3B59,0x6C31, 0, 0,0x5263, 0, 0, - 0, 0, 0,0x4E63, 0,0x4438, 0,0x433F, - 0, 0,0x363E,0x5839,0x3148,0x314F,0x3151,0x457E, - 0,0x3150, 0,0x432B, 0, 0, 0, 0, - 0,0x5531, 0, 0, 0, 0, 0, 0, - 0, 0,0x6B24,0x3A41, 0, 0, 0,0x4C3A, - 0, 0, 0,0x6B25, 0,0x6B27, 0, 0, - 0,0x6B28, 0, 0, 0,0x6B26, 0, 0, - 0, 0, 0, 0, 0,0x6B29,0x6B2B,0x6B2A, - 0, 0, 0, 0, 0,0x6B2C, 0,0x4A4F, -0x5835,0x4371, 0,0x4325,0x4678,0x6B2D,0x444A, 0, -0x6B2E,0x6B2F,0x6B30,0x3755, 0, 0, 0,0x377A, - 0,0x6B31,0x4762, 0,0x6B33, 0,0x3A24,0x5175, -0x3031,0x6B32,0x6B34, 0, 0, 0,0x352A,0x4248, -0x4768, 0,0x6B35, 0,0x4B2E,0x635F, 0, 0, -0x5340, 0, 0, 0, 0,0x595B, 0, 0, -0x4D21,0x562D,0x4773, 0, 0, 0,0x5960,0x3B63, - 0,0x3A3A,0x6362, 0, 0, 0, 0, 0, -0x4F2B, 0, 0, 0,0x6360,0x4947, 0,0x3A39, - 0, 0, 0,0x5134,0x6361,0x486A,0x392F,0x3D2D, -0x3358,0x4E5B, 0, 0,0x4C40, 0, 0, 0, -0x6368,0x6369,0x4D74, 0, 0, 0, 0, 0, -0x4C2D, 0,0x3C33, 0,0x636A, 0,0x636B, 0, - 0,0x505A, 0, 0, 0,0x467B,0x375A, 0, - 0,0x475F,0x524A,0x4E56, 0,0x6364,0x636C, 0, -0x4972,0x3341, 0, 0,0x6367, 0, 0,0x4663, -0x6365, 0, 0,0x6D33,0x6366, 0, 0, 0, - 0,0x4933, 0,0x4566, 0, 0, 0,0x3935, - 0,0x433B, 0,0x6363,0x453D,0x4124,0x4259,0x3257, - 0,0x636D,0x3B26,0x442D, 0,0x6370,0x3E5A, 0, - 0,0x637B,0x6375,0x3A53, 0, 0, 0, 0, -0x3750,0x534D, 0,0x564E,0x5553,0x3941,0x5534,0x5158, - 0, 0, 0, 0,0x5039,0x4776, 0, 0, - 0,0x482A,0x3234, 0,0x435A, 0, 0, 0, -0x636E, 0, 0,0x637C,0x636F,0x3728,0x6377,0x6374, - 0, 0, 0,0x373A, 0, 0,0x4522, 0, -0x6376,0x455D,0x3228,0x467C, 0,0x4460, 0, 0, -0x5722, 0,0x4061,0x6379, 0, 0,0x637A,0x637D, -0x4C29,0x6373, 0,0x533E, 0,0x3143,0x6D34,0x6371, -0x6372, 0,0x6378,0x503A,0x4643,0x5473,0x637E, 0, - 0,0x3D60, 0, 0,0x6427, 0, 0,0x6426, - 0, 0, 0,0x5173,0x6423, 0,0x6429, 0, - 0, 0,0x4877, 0, 0, 0, 0,0x4F34, - 0,0x6428,0x642E,0x4265, 0, 0,0x3634, 0, - 0, 0, 0, 0, 0,0x3D72, 0,0x6422, - 0, 0,0x3A69,0x642A, 0, 0,0x642C, 0, - 0,0x367D,0x565E,0x6432, 0,0x642D, 0, 0, - 0,0x6421, 0,0x3B6E,0x4D5D,0x4722,0x4549, 0, - 0,0x4177, 0,0x6424, 0,0x4733,0x3D2C,0x3D3D, -0x6425, 0,0x5747,0x3262, 0,0x642B,0x3C43,0x642F, - 0,0x3B6B,0x6430,0x4528,0x6431, 0, 0, 0, - 0,0x5563,0x3F23, 0,0x643A, 0,0x6437, 0, -0x643B, 0, 0,0x643D, 0, 0,0x4656, 0, - 0,0x3A46,0x404B, 0, 0, 0,0x3821,0x6434, - 0, 0, 0, 0,0x5421, 0, 0,0x3A23, -0x3D7E, 0, 0, 0,0x643C, 0, 0, 0, - 0, 0,0x4D3F, 0, 0,0x4479, 0, 0, -0x4F7B,0x4966, 0, 0,0x533F, 0,0x4F51, 0, - 0,0x6433, 0,0x6438,0x6439,0x4C69, 0, 0, - 0, 0, 0,0x4C4E, 0,0x4054,0x6435,0x4130, -0x6436,0x4E50, 0,0x3B41,0x3553, 0,0x4873,0x3D27, -0x5547,0x492C,0x3822,0x644A, 0, 0,0x644C,0x5144, - 0, 0,0x523A, 0, 0,0x3A2D, 0, 0, -0x3A54, 0, 0, 0, 0, 0, 0,0x6443, -0x356D, 0, 0, 0,0x574D,0x6440,0x4F7D,0x643F, - 0, 0, 0,0x415C,0x4C4A, 0, 0, 0, - 0,0x4A67, 0, 0, 0, 0,0x4457, 0, -0x4C54,0x6448, 0, 0, 0,0x6447,0x6441, 0, -0x6444,0x352D, 0, 0,0x5359, 0,0x6446, 0, - 0, 0, 0,0x5279,0x3463, 0,0x3B34, 0, - 0,0x496E, 0,0x343E, 0, 0, 0,0x3B6C, - 0,0x514D, 0,0x4C6D,0x6D35, 0, 0, 0, - 0, 0, 0, 0, 0,0x4765, 0, 0, - 0, 0,0x5428, 0,0x644B,0x5755,0x6442, 0, -0x3D25,0x6445, 0, 0,0x5366, 0,0x6449,0x4978, - 0, 0,0x643E, 0, 0,0x5365, 0, 0, -0x477E,0x3649, 0,0x547C,0x3233,0x6457, 0, 0, - 0,0x4E42, 0,0x644D, 0,0x4E3C, 0,0x385B, - 0, 0,0x6456, 0,0x3F4A, 0, 0, 0, -0x534E, 0,0x436C, 0, 0, 0, 0, 0, - 0, 0, 0,0x4548,0x6458, 0, 0, 0, - 0, 0, 0, 0, 0,0x4D44,0x644F, 0, - 0, 0, 0,0x6454,0x6455, 0,0x3A7E, 0, -0x4F66, 0, 0,0x553F, 0, 0, 0,0x6452, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6450, 0, 0,0x644E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4D65,0x4A2A, - 0, 0, 0,0x4023, 0,0x3D26,0x6453, 0, - 0,0x3848, 0, 0, 0, 0, 0,0x6467, -0x5434, 0, 0, 0, 0, 0, 0, 0, -0x645B, 0, 0, 0,0x416F, 0, 0,0x6469, - 0, 0,0x5267, 0, 0,0x645F, 0,0x6460, - 0, 0,0x4F2A, 0, 0, 0, 0,0x4B5D, - 0,0x645A,0x6451, 0,0x6465, 0,0x485C,0x6463, - 0, 0,0x4467,0x6462, 0,0x6461, 0, 0, - 0,0x337C,0x6468, 0, 0, 0, 0,0x3561, - 0, 0, 0,0x574C, 0, 0, 0,0x6466, - 0,0x3B2C, 0,0x5752,0x4C4F,0x6B78, 0,0x6464, - 0, 0,0x3976, 0, 0, 0,0x564D,0x6459, -0x645C,0x427A,0x645E, 0,0x424B,0x4044,0x4250, 0, -0x3175,0x4C32, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x354E, 0, 0, 0, - 0,0x646F, 0, 0, 0, 0, 0, 0, - 0, 0,0x462F, 0, 0, 0,0x4661, 0, - 0,0x6475, 0, 0, 0, 0, 0,0x4229, - 0, 0, 0,0x406C,0x515D,0x646E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x442E, 0, 0, 0,0x646D, 0, 0, 0, - 0,0x6476,0x6474,0x427E, 0,0x645D, 0,0x6470, - 0,0x4A7E, 0,0x5544, 0, 0,0x6471, 0, - 0, 0, 0, 0, 0, 0,0x517A, 0, - 0, 0, 0, 0, 0, 0,0x646B,0x646C, - 0, 0, 0,0x6472, 0,0x4E2B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x454B, 0, 0, 0,0x4731, 0,0x423A, 0, - 0, 0,0x646A, 0, 0, 0,0x414A, 0, - 0, 0, 0, 0, 0,0x4C36,0x3331, 0, - 0, 0,0x647B, 0,0x6473, 0, 0, 0, -0x647A, 0,0x647D, 0,0x647C, 0, 0, 0, - 0, 0, 0, 0,0x334E, 0, 0, 0, -0x333A,0x6477, 0, 0,0x6479,0x6478,0x456C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x403D, 0, 0, 0, - 0,0x5468, 0, 0, 0, 0, 0,0x6522, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3044, 0, 0,0x6524, 0, - 0,0x6523, 0, 0, 0, 0, 0, 0, -0x3C24, 0,0x6525, 0, 0, 0, 0, 0, - 0,0x6521, 0, 0, 0, 0, 0, 0, - 0,0x647E,0x3174, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6528, 0, -0x6529,0x6526, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6527,0x652A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4659, 0, 0, 0, 0, 0, 0, - 0, 0,0x652B,0x652D, 0, 0, 0, 0, - 0, 0, 0,0x652C, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x652F, 0, 0, - 0,0x652E, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3960, 0, 0,0x6530, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6531, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3B70,0x6C61,0x4370, 0,0x3546, -0x3B52, 0, 0, 0, 0,0x4169,0x546E, 0, -0x3E44, 0, 0, 0,0x5746, 0,0x5456,0x3253, -0x6C3E, 0, 0, 0, 0,0x6A41, 0, 0, - 0,0x422F,0x3436, 0, 0, 0,0x5157, 0, - 0, 0,0x3334, 0,0x4832,0x3F3B,0x6C40, 0, - 0,0x564B, 0, 0,0x6C3F,0x6C41, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6C45,0x3E66,0x4C3F,0x455A,0x3E3C, - 0,0x6C46, 0,0x317E, 0, 0, 0,0x6C44, -0x5528,0x3563, 0,0x6C42,0x4136,0x3363, 0, 0, -0x6C43,0x4B38,0x4043,0x4C7E, 0, 0, 0, 0, -0x4152, 0,0x6C48, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3A66,0x4053, 0,0x5672, 0, 0, 0,0x514C, - 0, 0, 0, 0,0x3F3E, 0,0x3733,0x4955, -0x6C47,0x3B62, 0,0x4C4C,0x3D7D,0x4848, 0,0x4F29, - 0, 0, 0, 0, 0, 0, 0,0x4D69, - 0,0x456B, 0, 0, 0,0x3769, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5149,0x3A38, 0, 0, 0, 0, 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0, 0, -0x6C60, 0,0x5726, 0,0x4540, 0, 0, 0, -0x6B3C,0x302E, 0, 0, 0,0x3E74,0x3838,0x522F, -0x3056,0x3579, 0,0x5833, 0,0x4B2C, 0,0x635D, - 0, 0, 0, 0, 0, 0, 0,0x462C, -0x3066, 0, 0, 0,0x4546,0x6B39, 0, 0, - 0, 0,0x6B3A, 0, 0, 0,0x6B3B, 0, - 0,0x5140, 0,0x4523, 0,0x6A72, 0,0x4432, - 0,0x4435,0x404E, 0, 0, 0,0x6A73,0x4441, - 0,0x4E6F, 0, 0, 0, 0,0x6A70,0x6A74, - 0, 0,0x497C, 0, 0,0x4723, 0, 0, - 0,0x4C58,0x4E7E, 0, 0, 0,0x6A75,0x6A76, -0x4F2C,0x4067, 0, 0,0x6A77, 0, 0, 0, - 0, 0,0x363F,0x6A78, 0,0x6A79, 0,0x6A7A, - 0, 0,0x6A7B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6A71, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x482E,0x616B, 0,0x3738, -0x616C, 0, 0, 0,0x616D, 0,0x5734,0x616E, -0x616F,0x534C, 0, 0, 0, 0, 0, 0, - 0,0x6171,0x3F71,0x6170,0x3552, 0, 0, 0, -0x3137, 0, 0, 0, 0,0x6173,0x6172, 0, -0x3A7C, 0,0x6174, 0, 0, 0, 0,0x3937, - 0,0x3E51, 0, 0, 0, 0,0x447C, 0, -0x3A5D,0x3D46, 0, 0, 0, 0, 0, 0, -0x6175,0x6177, 0, 0,0x3640,0x4F41,0x4A28,0x6176, -0x5578,0x537C,0x6178,0x617C,0x6179, 0, 0,0x617A, -0x406A, 0,0x617E,0x6221,0x4047, 0, 0, 0, - 0,0x617B, 0,0x617D, 0, 0, 0, 0, - 0, 0,0x6225, 0, 0, 0,0x4154, 0, - 0, 0, 0,0x6223, 0,0x6228,0x327E,0x6222, - 0, 0, 0,0x434D,0x3242,0x6227,0x6226, 0, - 0,0x6224,0x6229, 0, 0,0x622B, 0, 0, - 0,0x5049,0x566D,0x4328,0x622C, 0,0x4F57, 0, - 0,0x622E, 0, 0,0x3A6F, 0, 0,0x6960, -0x622D,0x622A, 0, 0, 0, 0,0x3B2B,0x5433, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6230, 0, 0, -0x622F, 0,0x6961, 0, 0, 0, 0,0x6231, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6232, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6233,0x4C21, 0,0x6234, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6235, 0, - 0, 0, 0, 0,0x507E, 0, 0,0x424A, - 0,0x5371, 0,0x4D75, 0, 0,0x6760, 0, - 0,0x6761, 0, 0, 0, 0,0x3E41, 0, - 0, 0, 0,0x426A, 0, 0, 0,0x6764, - 0, 0,0x6763, 0, 0, 0, 0, 0, - 0,0x4D66, 0,0x4335, 0, 0,0x6762,0x3B37, -0x4F56, 0,0x4161,0x6769, 0, 0, 0,0x6768, - 0, 0,0x6774,0x3223, 0, 0, 0, 0, -0x676A, 0,0x6766, 0, 0, 0, 0, 0, -0x676C,0x676B,0x493A, 0, 0,0x5564, 0,0x6765, -0x3729,0x6767, 0, 0, 0, 0, 0, 0, - 0,0x676E, 0, 0, 0, 0,0x6773, 0, -0x5669, 0, 0, 0, 0,0x676D, 0,0x6772, - 0,0x6771, 0, 0, 0,0x3060, 0, 0, - 0, 0,0x6775, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4772, 0,0x4045,0x406D, 0, - 0,0x4170,0x6770, 0, 0, 0, 0,0x6776, -0x4B76, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6822,0x6821, 0, 0, 0, 0, - 0, 0,0x5741, 0, 0,0x677A,0x6779, 0, -0x677B, 0,0x6777, 0,0x677E, 0,0x677D, 0, -0x677C, 0, 0,0x4155,0x4759,0x457D,0x4543, 0, - 0, 0, 0, 0,0x476D, 0, 0, 0, - 0,0x6823, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6826, 0,0x6825, - 0,0x6827,0x3A77,0x6778,0x6824, 0,0x4870,0x492A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6829, 0, 0, -0x3965, 0, 0, 0, 0, 0,0x517E,0x6828, - 0, 0, 0, 0, 0, 0,0x682A, 0, -0x682D,0x682E, 0,0x4127, 0, 0, 0,0x682F, - 0, 0, 0,0x6830, 0, 0,0x682C, 0, -0x6834, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x682B, 0,0x6831, 0, - 0, 0, 0, 0, 0, 0, 0,0x6835, -0x6832,0x6833, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6837, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6836, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x394F, 0,0x702C, 0, -0x702D, 0,0x4630,0x306A,0x483F, 0,0x4D5F, 0, - 0, 0, 0, 0, 0, 0,0x4E4D,0x6A31, - 0, 0, 0, 0,0x6A32, 0,0x463F,0x3449, - 0, 0, 0, 0, 0, 0, 0,0x6A33, - 0, 0, 0, 0,0x5567, 0, 0, 0, - 0, 0, 0, 0, 0,0x5D79, 0,0x6A34, - 0,0x6A35, 0,0x6A36, 0, 0, 0, 0, -0x384A,0x5F30,0x4975, 0,0x4C70, 0, 0,0x497A, - 0, 0, 0, 0, 0,0x497B, 0, 0, -0x5343,0x4B26, 0,0x3826,0x702E,0x3142, 0,0x6538, -0x4C6F,0x5349,0x3C57,0x496A, 0,0x3567, 0,0x4450, -0x3569, 0,0x6E2E,0x3B2D, 0, 0,0x675E, 0, -0x6E2F, 0, 0, 0, 0,0x3329, 0, 0, -0x6E32, 0, 0,0x6E31,0x3D67, 0,0x6E30,0x4E37, - 0, 0, 0, 0,0x454F, 0, 0, 0, - 0,0x4174,0x5B4E,0x6E33,0x5073, 0, 0, 0, - 0, 0, 0, 0, 0,0x4254,0x4668, 0, - 0, 0,0x372C, 0, 0, 0, 0, 0, - 0, 0,0x6E34, 0,0x336B, 0, 0, 0, -0x3B7B,0x6E35, 0, 0, 0, 0, 0,0x675C, - 0, 0, 0,0x6E36, 0, 0,0x3D2E, 0, - 0, 0, 0,0x7162, 0, 0, 0,0x4A68, - 0,0x5249,0x705A, 0,0x705B, 0,0x705C,0x4146, - 0,0x386D,0x3E4E, 0, 0,0x705E, 0,0x4531, -0x705D,0x5171, 0,0x7060,0x304C,0x3D6A, 0, 0, - 0, 0, 0,0x525F,0x705F, 0,0x342F,0x3768, -0x7066,0x7065,0x4623,0x7061,0x7062,0x3443, 0, 0, -0x7063,0x556E, 0, 0,0x4C5B,0x3E52,0x3C32, 0, - 0, 0,0x7068,0x7067,0x7064,0x3221, 0,0x5622, -0x5338,0x3E37,0x482C, 0, 0,0x706A, 0, 0, - 0, 0,0x5177, 0,0x564C,0x3A5B,0x7069, 0, -0x363B, 0, 0,0x4D34, 0, 0,0x4626, 0, - 0, 0,0x4121,0x706B,0x706E, 0,0x706D,0x7070, -0x706C, 0,0x3B3E,0x706F, 0, 0, 0, 0, -0x4C35,0x7072, 0, 0,0x3355, 0, 0, 0, - 0,0x3154, 0, 0,0x7073, 0, 0,0x7074, -0x7076,0x3461, 0,0x7071, 0,0x7077, 0, 0, - 0, 0,0x707A, 0,0x7078, 0, 0, 0, -0x7075, 0, 0, 0, 0,0x707D, 0,0x7079, -0x707C,0x707E, 0,0x7121, 0, 0, 0,0x4E41, -0x7124, 0,0x7123, 0,0x4176,0x707B,0x4A5D, 0, - 0,0x3471,0x3171,0x4C31, 0,0x7126, 0, 0, -0x7127, 0, 0,0x712C,0x554E,0x7129, 0, 0, -0x4833, 0, 0, 0,0x7122, 0,0x712B,0x7128, -0x7125, 0, 0,0x712A, 0, 0, 0, 0, - 0, 0, 0, 0,0x3029,0x712D, 0, 0, - 0, 0, 0, 0,0x712F, 0,0x7131, 0, - 0, 0, 0, 0,0x7130, 0,0x712E, 0, - 0, 0, 0,0x5122, 0, 0, 0, 0, - 0, 0, 0,0x7132, 0, 0, 0,0x7133, - 0, 0, 0, 0, 0, 0, 0, 0, -0x396F, 0, 0,0x3547, 0,0x3057,0x3059, 0, - 0, 0,0x546D, 0,0x3544, 0,0x3D54,0x3B4A, -0x7027, 0, 0,0x385E, 0, 0,0x7028, 0, - 0,0x3028, 0,0x7029, 0, 0,0x4D6E, 0, - 0,0x702A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x702B, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4624, 0, - 0,0x5665,0x7164, 0,0x7165, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4373, - 0, 0,0x535B, 0, 0,0x5651,0x4568, 0, -0x532F, 0,0x5266, 0, 0,0x6E41,0x303B,0x5535, -0x514E,0x3C60,0x3A50, 0,0x3F78, 0,0x3847,0x3541, -0x454C, 0, 0,0x4A22, 0, 0, 0,0x434B, - 0, 0, 0, 0, 0,0x6E42, 0, 0, - 0, 0, 0, 0, 0, 0,0x443F,0x3622, - 0,0x6D6C,0x4324, 0,0x5631, 0, 0, 0, -0x4F60,0x6D6F, 0, 0,0x454E, 0,0x365C, 0, - 0,0x4A21, 0, 0,0x6D6D, 0, 0,0x6D70, -0x6D71,0x433C, 0,0x3F34, 0,0x6D6E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6D74,0x6D72, 0, 0, 0, 0,0x5566, -0x435F, 0,0x6D73, 0, 0, 0,0x6D76, 0, -0x5523,0x5123, 0, 0, 0,0x6D75, 0,0x4350, - 0, 0, 0, 0, 0,0x6D77,0x3F74,0x3E6C, -0x6D78, 0,0x4C77, 0,0x515B, 0, 0, 0, -0x5745,0x5576, 0,0x6D7C, 0, 0, 0,0x6D7B, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6D79,0x6D7A, 0, 0, 0, 0, 0, 0, - 0, 0,0x6D7D,0x3E26, 0, 0, 0, 0, - 0,0x4B2F,0x6E21,0x363D, 0,0x6E22,0x4440, 0, -0x6D7E, 0, 0,0x3D5E,0x3247, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3643, 0, 0, 0,0x6E25,0x583A,0x6E23, -0x6E26, 0, 0, 0,0x4369,0x3372, 0, 0, - 0, 0, 0, 0,0x6E27,0x6E24,0x4F39, 0, - 0,0x6E28,0x4277, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6E29, -0x6E2A, 0,0x5E2B, 0, 0,0x4633, 0,0x4746, - 0,0x5675,0x3549, 0,0x4B32, 0, 0, 0, -0x6E2B, 0, 0,0x4D2B, 0,0x6E2C, 0, 0, - 0, 0, 0,0x5530, 0,0x6E2D, 0,0x7644, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5B47, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3423, - 0, 0, 0,0x432C,0x7166, 0, 0, 0, - 0, 0,0x4A38,0x5253, 0,0x562A, 0,0x6F72, - 0,0x3E58, 0,0x3D43,0x6F73,0x364C,0x302B, 0, - 0, 0, 0,0x4A2F, 0, 0,0x6D36, 0, -0x6D37, 0, 0, 0, 0,0x4E79,0x372F,0x3F73, -0x6D38,0x426B,0x4930, 0, 0, 0, 0, 0, - 0,0x6D39, 0, 0,0x4676,0x3F33, 0, 0, - 0,0x6D3C,0x4578, 0,0x5150, 0,0x5729,0x6D3A, -0x6D3B, 0,0x5162, 0,0x6D3F,0x6D40, 0,0x6D44, - 0, 0, 0,0x6D48, 0,0x6D46,0x6D4E,0x5568, - 0,0x6D49, 0, 0,0x6D47,0x6D3E, 0, 0, -0x4569, 0, 0, 0,0x4646, 0, 0,0x4969, -0x5452,0x6D41,0x6D42,0x6D43,0x6D45, 0,0x4079, 0, -0x3421, 0, 0, 0, 0,0x3968, 0,0x6D50, - 0, 0, 0, 0,0x6D51, 0,0x6D4A, 0, -0x6D4F, 0,0x4E78, 0, 0,0x4B36,0x6D4C,0x6D4D, - 0, 0, 0, 0, 0,0x4F75, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6D52,0x4172,0x5332,0x6D4B,0x4837, 0, - 0, 0, 0, 0, 0, 0, 0,0x3C6F, - 0, 0, 0, 0,0x4570, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6D56, - 0,0x356F, 0, 0,0x4235,0x302D,0x4B69, 0, - 0,0x312E, 0,0x6D54, 0, 0, 0,0x4D6B, -0x3562, 0,0x6D55,0x6D53,0x6D57, 0, 0,0x357A, - 0,0x6D58, 0,0x6D59, 0,0x6D5C, 0,0x314C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4576,0x3C6E,0x6D5A,0x4C3C,0x326A, 0, 0, 0, - 0,0x6D5B, 0, 0, 0, 0,0x446B, 0, - 0,0x3445, 0, 0, 0,0x3075, 0, 0, - 0,0x6D5F,0x405A,0x3468, 0, 0, 0, 0, -0x454D, 0, 0, 0,0x6D5D,0x3F44, 0, 0, - 0,0x6D5E, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4425, 0, 0, 0,0x6D60, 0, 0, 0, - 0, 0,0x6D61, 0,0x6D63, 0, 0,0x4157, - 0, 0,0x3B47, 0, 0, 0, 0, 0, - 0,0x3D38, 0, 0, 0,0x6D62, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6D64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6D66, 0, - 0, 0, 0, 0,0x6D65, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6D67, 0, 0, 0, - 0, 0,0x4A3E,0x6C6A,0x4071, 0,0x4967, 0, -0x6C6B,0x466E, 0, 0, 0, 0,0x6C6C, 0, -0x466D,0x6C6D, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6C70, 0, 0,0x5766,0x6C73, - 0, 0,0x6C71,0x6C6E,0x6C6F,0x5723,0x4971,0x4B6E, -0x6C74, 0,0x6C72, 0, 0,0x4F69, 0,0x6C76, -0x4631, 0, 0, 0, 0,0x3C40, 0,0x6C75, - 0, 0, 0, 0, 0, 0, 0,0x353B, -0x3B76, 0,0x6C77, 0, 0, 0, 0, 0, -0x5977,0x3D7B, 0, 0,0x423B,0x6C78, 0, 0, - 0, 0,0x6C79, 0, 0, 0, 0,0x3823, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6C7A, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6C7B, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6C7C, 0, 0, 0, 0, - 0,0x536D,0x582E,0x406B, 0,0x475D,0x3A4C, 0, -0x5063,0x4B3D, 0,0x4D3A, 0, 0,0x3851, 0, - 0,0x317C, 0,0x476F, 0,0x5656, 0, 0, - 0,0x3F46,0x436B, 0, 0,0x6F75, 0, 0, -0x4358, 0, 0, 0, 0, 0, 0,0x5762, - 0, 0, 0,0x6F77,0x3353, 0,0x4758,0x516D, - 0,0x5648, 0,0x6F78, 0,0x6F76, 0,0x3B7D, -0x3346, 0, 0, 0, 0, 0, 0, 0, -0x3D55, 0, 0,0x5246, 0,0x3B60, 0, 0, -0x4F21, 0,0x6F7C,0x6F7B, 0, 0,0x6F79, 0, - 0, 0, 0,0x334C, 0,0x4954,0x4B30, 0, - 0, 0, 0, 0,0x6F7E, 0, 0,0x305E, - 0, 0,0x5649, 0, 0, 0,0x6F7D, 0, -0x336D, 0, 0,0x7655, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4E48, 0, 0, 0,0x7022, - 0,0x7021, 0,0x353E,0x3C5A,0x3B7C, 0,0x3865, - 0, 0, 0, 0, 0, 0,0x4442, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7023, 0, 0, 0, 0, 0,0x4B6B, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7026, 0, 0, 0,0x5128, 0,0x3E3F,0x476E, -0x7136,0x7137,0x3F55, 0, 0, 0, 0,0x3429, -0x7138,0x4D3B, 0,0x4754,0x552D, 0,0x7139, 0, -0x713A, 0, 0, 0, 0,0x474F, 0, 0, - 0,0x5224,0x564F, 0, 0,0x713B,0x3D51,0x3430, -0x3E3D, 0, 0, 0,0x345C,0x4E51, 0,0x3F5F, -0x713D, 0, 0, 0, 0,0x3F7A,0x713C, 0, -0x713F, 0, 0, 0,0x713E,0x7140, 0, 0, - 0, 0, 0,0x7141, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x417E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4122, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4A7A, 0, - 0,0x553E, 0, 0, 0, 0,0x3E3A,0x3E39, -0x5542, 0, 0,0x3F22, 0,0x4D2F,0x7135, 0, - 0, 0, 0, 0, 0,0x3D5F, 0,0x364B, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5671,0x7343, 0, 0,0x7344, 0,0x384D, - 0, 0, 0,0x7346,0x7347, 0,0x304A, 0, -0x7345, 0,0x7349,0x4B71, 0, 0, 0,0x734B, - 0,0x5026, 0, 0,0x314A,0x7348, 0, 0, - 0,0x734F, 0,0x3551, 0, 0,0x7357, 0, -0x7352, 0, 0, 0,0x7354,0x7353,0x377B, 0, -0x313F, 0,0x734E,0x734A,0x355A, 0,0x7350, 0, - 0,0x7351, 0,0x7355, 0, 0, 0, 0, -0x734D, 0,0x3C63, 0,0x417D, 0,0x7356, 0, - 0, 0, 0, 0, 0,0x735A, 0,0x734C, - 0,0x3548, 0,0x3D6E,0x735C, 0, 0,0x3724, -0x3F70,0x567E,0x4D32, 0,0x3470, 0,0x325F, 0, -0x7358, 0,0x7359,0x4938, 0,0x735D, 0, 0, -0x735E, 0,0x7361, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x735F, 0, - 0,0x7363,0x7362, 0, 0,0x735B, 0,0x3F6A, - 0,0x336F, 0,0x7360, 0, 0,0x4729, 0, -0x3C72, 0, 0, 0, 0,0x736B, 0, 0, - 0, 0, 0, 0, 0,0x393F, 0, 0, -0x7364, 0, 0, 0,0x322D,0x3B7E, 0,0x4B63, - 0, 0, 0, 0,0x736D,0x7369, 0, 0, - 0,0x395C,0x736E, 0, 0, 0,0x7365,0x7366, -0x736A,0x4261,0x736C,0x736F,0x7368,0x3C7D, 0, 0, - 0,0x4F64, 0, 0,0x7370, 0, 0, 0, -0x7367, 0, 0, 0, 0, 0, 0, 0, - 0,0x7372, 0, 0, 0, 0,0x572D,0x462A, - 0, 0, 0, 0,0x7373, 0, 0, 0, - 0,0x7371, 0,0x4228, 0, 0, 0, 0, - 0,0x385D,0x7375, 0, 0,0x7374, 0, 0, - 0,0x345B, 0, 0, 0,0x7376,0x7377, 0, - 0, 0,0x7378, 0, 0, 0,0x403A, 0, - 0,0x4069, 0, 0, 0, 0, 0,0x4571, - 0, 0, 0, 0,0x737B, 0,0x737A, 0, - 0, 0, 0, 0, 0, 0, 0,0x3458, - 0, 0, 0,0x737E,0x7379, 0, 0,0x737C, - 0, 0, 0, 0, 0, 0,0x737D, 0, - 0, 0, 0, 0, 0, 0, 0,0x7421, - 0, 0, 0, 0, 0, 0,0x7423,0x3B49, - 0, 0,0x7422, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7424, 0, 0, 0, 0, 0, 0,0x323E, -0x7426,0x7425, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3C2E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4357,0x5961, 0, 0, 0, - 0, 0, 0,0x4060,0x744C,0x5751, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x375B, 0, 0, 0, 0, 0, 0, - 0,0x744E,0x4123, 0, 0,0x4649, 0,0x3456, -0x5533, 0, 0, 0,0x7450,0x744F,0x7451,0x4B5A, - 0, 0,0x7452, 0,0x5441,0x5660, 0, 0, - 0, 0,0x3760, 0, 0, 0,0x4138, 0, - 0,0x413B,0x7453,0x3E2C, 0, 0, 0, 0, - 0,0x3462, 0, 0,0x7454,0x7455,0x3E2B, 0, - 0,0x7456, 0, 0, 0,0x745B, 0,0x7457, -0x745A, 0,0x3A7D, 0,0x7458,0x7459, 0, 0, - 0, 0, 0, 0, 0,0x3862,0x4C47,0x745C, - 0,0x325A, 0, 0,0x4353, 0, 0,0x5463, -0x3F37, 0, 0, 0, 0, 0, 0, 0, -0x745D, 0, 0, 0, 0, 0, 0,0x4534, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7469, 0, 0,0x4F35, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4E49, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4B58, 0,0x4B77, 0, 0, 0, 0,0x3D74, - 0, 0, 0,0x574F, 0, 0, 0,0x405B, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5075, 0, - 0, 0, 0, 0, 0, 0, 0,0x746A, - 0, 0, 0, 0, 0, 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0x3859,0x4449, 0,0x575D,0x425A,0x3757, -0x563D,0x4E46,0x3744, 0, 0,0x4526,0x6723,0x4F5F, -0x6724,0x6725,0x6726,0x4137,0x5769,0x4970,0x4F38,0x562F, -0x5655,0x6727,0x306D,0x6728,0x6729,0x495C,0x526F,0x3E2D, -0x672A,0x3073,0x485E,0x3D61,0x672B,0x4846, 0,0x672C, -0x3B66,0x3878,0x5124,0x672D,0x4267,0x3E78,0x3D4A,0x4D33, -0x672E,0x672F,0x3E6E,0x5065, 0,0x4B67,0x4C50,0x3C4C, -0x6730,0x3C28,0x5077,0x6731, 0,0x5078,0x6732,0x6733, -0x3442,0x6734,0x6735,0x497E,0x4E2C,0x4360,0x6737,0x3141, -0x3371, 0,0x6738,0x6739,0x575B,0x5540,0x673A,0x424C, -0x573A,0x673B,0x673C,0x673D,0x3C6A,0x4365,0x4042,0x673E, -0x673F,0x3C29, 0,0x6740,0x6741,0x6736,0x3650,0x6742, - 0,0x6743,0x6744,0x3B3A,0x355E,0x4246,0x3160,0x6745, -0x5435,0x6746,0x383F,0x6748,0x6747,0x376C, 0,0x6749, -0x3278,0x674A,0x674B,0x674C,0x674D,0x674E,0x674F,0x6750, -0x5327,0x4B75,0x6751,0x6752,0x6753,0x6754,0x4949,0x6755, -0x6756,0x6757,0x6758,0x6759,0x3D49,0x675A,0x733E, 0, -0x3857, 0,0x4831, 0, 0, 0, 0, 0, - 0, 0,0x733F, 0,0x7340,0x7341, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x395E,0x4D78, 0, 0,0x5868,0x3A31, 0,0x425E, -0x6E37, 0,0x3723, 0, 0, 0, 0,0x6E39, - 0,0x6E38,0x3055, 0, 0, 0, 0, 0, -0x6E3B,0x5556,0x576F, 0, 0, 0,0x5643, 0, - 0,0x6E3D,0x4A70, 0,0x6E3C, 0, 0, 0, - 0,0x6E3E, 0, 0, 0, 0,0x6E40, 0, - 0,0x6E3F, 0, 0, 0, 0, 0, 0, - 0, 0,0x5172, 0,0x473C, 0,0x4340, 0, - 0, 0, 0, 0,0x3861, 0, 0, 0, - 0, 0,0x4167, 0, 0,0x7446,0x505F,0x7447, - 0,0x4F5B, 0, 0,0x483A, 0, 0,0x7448, - 0, 0, 0, 0, 0, 0, 0,0x7449, -0x744A, 0,0x744B, 0, 0, 0, 0, 0, -0x597A,0x387E, 0, 0,0x6571,0x5370, 0,0x7460, - 0,0x4E4C, 0, 0, 0,0x3361, 0, 0, - 0, 0,0x7134, 0,0x526E, 0,0x7461, 0, - 0, 0, 0, 0,0x4F68,0x7462, 0, 0, -0x474C, 0, 0, 0, 0, 0, 0,0x3554, -0x3464,0x7464, 0, 0, 0,0x7463,0x7465, 0, - 0,0x7466, 0, 0, 0, 0,0x7467, 0, -0x3A32,0x303F, 0,0x7468, 0, 0, 0, 0, - 0, 0, 0,0x372D,0x526D, 0, 0, 0, -0x522B,0x404F, 0,0x3F3C,0x6B23,0x555F,0x6A48, 0, - 0, 0, 0,0x7173,0x3678,0x4B23, 0, 0, -0x444D, 0,0x7167, 0,0x7168,0x387B,0x7169,0x3A44, -0x5445,0x3052, 0, 0,0x716A, 0, 0, 0, -0x716B, 0,0x716C, 0, 0,0x716D,0x716E,0x716F, -0x7171,0x7170,0x4555, 0, 0, 0, 0, 0, - 0,0x7172, 0,0x367A, 0,0x7174,0x522E,0x5E47, -0x4B4A, 0, 0,0x335C, 0,0x3522, 0,0x3922, - 0, 0,0x4474,0x7175, 0, 0,0x7176, 0, - 0, 0,0x4144,0x417B,0x5630,0x7177, 0, 0, - 0, 0,0x7178, 0,0x412A, 0, 0, 0, -0x4638, 0,0x3E5B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7179,0x344F, 0, 0, 0, 0, 0, - 0,0x717A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6D32, -0x6D31, 0, 0,0x4B60,0x525E, 0,0x4B41,0x5558, - 0,0x4862, 0,0x405F,0x3C21, 0, 0, 0, - 0, 0, 0,0x6B41, 0, 0,0x5024, 0, -0x5662, 0,0x3647,0x3858,0x6B40,0x384E, 0,0x6B3F, -0x3326,0x3949,0x562B, 0,0x3774,0x374A, 0, 0, - 0,0x3C67,0x373E,0x6B46, 0,0x6B47,0x3039,0x3F4F, - 0,0x6B45,0x537D, 0,0x6B48, 0, 0,0x6B49, - 0, 0,0x374E, 0,0x6B42,0x6B44,0x4976,0x5657, -0x554D,0x5032,0x6B4F,0x4E38,0x6B50, 0,0x3528, 0, - 0, 0, 0, 0,0x3133,0x6B52,0x4C25, 0, - 0, 0, 0, 0, 0, 0,0x4556,0x6B53, - 0,0x6B51,0x455F,0x6B4E,0x4A24,0x6B55,0x307B, 0, - 0,0x3A7A, 0, 0,0x5837,0x7163, 0,0x6B4A, -0x6B4B,0x6B4C,0x6B4D,0x6B56,0x6640,0x6B59, 0,0x3F68, -0x5248,0x6B57,0x6B5C,0x386C,0x6B58, 0,0x3D3A, 0, -0x5058, 0,0x3037, 0,0x6B5D,0x445C, 0, 0, - 0, 0,0x562C, 0, 0, 0,0x3460, 0, - 0,0x4276,0x3C39, 0, 0,0x6B5A,0x6B5B,0x5460, -0x466A,0x4454,0x6B5F,0x4527,0x5975, 0,0x3231, 0, -0x6B64, 0,0x3D45, 0, 0, 0,0x6B62, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6B63, 0, 0,0x382C, - 0,0x4D51,0x6B65, 0, 0, 0,0x6B61, 0, -0x4133, 0, 0, 0, 0, 0,0x4622, 0, - 0, 0, 0, 0, 0, 0,0x4C73, 0, -0x6B66, 0,0x4030,0x5238,0x6B67, 0, 0, 0, -0x382F,0x382D, 0,0x6B68,0x473B,0x4D73, 0, 0, - 0,0x6B6A,0x6B6B, 0, 0, 0, 0, 0, -0x6B6D, 0, 0, 0, 0,0x5048, 0,0x6B72, - 0,0x6B6E, 0, 0, 0,0x6B71,0x4879, 0, -0x517C,0x6B6C, 0, 0,0x6B69, 0, 0, 0, - 0,0x3839,0x4F59,0x4465,0x6B6F,0x6B70,0x4C5A,0x4D48, -0x3072, 0,0x6B76, 0, 0, 0, 0, 0, -0x6B75, 0,0x3232, 0, 0, 0, 0,0x3860, - 0,0x6B77, 0, 0, 0, 0, 0, 0, -0x316C, 0, 0,0x4C45,0x4424,0x4F25, 0, 0, - 0, 0, 0,0x6B79, 0, 0,0x6C22, 0, -0x4572, 0,0x6B7A, 0, 0, 0, 0, 0, - 0, 0, 0,0x4945, 0, 0, 0, 0, - 0, 0,0x625F,0x6B7E, 0, 0, 0, 0, -0x4D4E,0x6C21,0x315B,0x5337, 0, 0,0x525C, 0, - 0, 0,0x6B7D, 0,0x6B7B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x333C, 0, 0, 0,0x6A30, - 0, 0,0x5754, 0,0x742B,0x3374, 0, 0, - 0, 0, 0,0x5641,0x5642, 0, 0, 0, - 0, 0, 0,0x5569,0x3E4A, 0,0x7427, 0, -0x5228,0x7428,0x7429, 0,0x742A,0x3E4B,0x535F, 0, - 0, 0, 0, 0,0x4960,0x4961, 0, 0, -0x7342, 0,0x4A66, 0,0x4C72, 0, 0, 0, - 0, 0, 0,0x6236,0x4B34, 0,0x4E68,0x565B, - 0,0x742D,0x742E,0x742F, 0, 0, 0, 0, -0x7432, 0,0x3A3D,0x7433,0x3063,0x7430, 0,0x7431, -0x3D22,0x3255, 0,0x7436,0x7437,0x3666,0x3230,0x4F4F, -0x7434,0x342C, 0,0x7435, 0, 0,0x7438, 0, - 0, 0, 0, 0,0x7439, 0, 0,0x4D27, - 0,0x743A, 0,0x743B, 0, 0, 0,0x743C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4B52, 0,0x743D, 0, 0, 0, 0,0x743E, - 0, 0, 0, 0, 0, 0, 0, 0, -0x743F, 0, 0, 0, 0, 0,0x745E,0x413C, -0x3C68, 0,0x492B,0x515E,0x6575, 0, 0, 0, - 0,0x5C33,0x5255, 0, 0,0x5C34,0x302C,0x5C35, - 0, 0,0x3D5A, 0,0x5C39, 0, 0, 0, -0x5842, 0,0x5C37,0x5373, 0,0x4956,0x5C3A,0x5C36, - 0,0x5C3B,0x4322, 0, 0, 0, 0,0x5C3C, -0x5C45,0x5C3D, 0, 0,0x4E5F,0x5625, 0,0x5C4F, - 0,0x5C4D, 0, 0,0x5C52,0x3D66,0x422B, 0, -0x5C38,0x5C4B,0x5C4E,0x5C3E,0x3752,0x3045,0x5C47,0x503E, -0x5C41,0x3B28, 0,0x373C,0x5C4C, 0, 0,0x5C46, -0x5C3F,0x475B, 0, 0, 0,0x513F,0x5C40, 0, - 0,0x5C4A, 0, 0,0x5C50, 0, 0,0x4E2D, -0x5C42, 0,0x5C43,0x5C48,0x5C49,0x3254,0x5C51,0x4B55, - 0,0x5437,0x5C5B,0x5C5F,0x4C26,0x5C66, 0,0x4367, -0x5C5C, 0, 0,0x3F41,0x5C59, 0,0x307A,0x3936, -0x5C65,0x5C53, 0,0x5C44,0x5C56,0x4874,0x3F60, 0, - 0, 0, 0,0x493B, 0, 0, 0,0x313D, - 0,0x5322, 0, 0,0x5C5A, 0, 0,0x5C55, - 0,0x463B, 0,0x5C5E, 0, 0, 0, 0, - 0,0x5742,0x432F,0x3736,0x4751,0x4329,0x5C62,0x5C58, -0x5C6B,0x5C54, 0, 0,0x5C5D, 0,0x3E25,0x5C57, - 0,0x5C60, 0, 0,0x5C63,0x5C64, 0,0x5C78, - 0, 0,0x5C61,0x5D22,0x5C67, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3C6B, -0x3444, 0, 0,0x4323,0x3267,0x5C7A, 0,0x5C72, - 0,0x5C6F, 0,0x5C7C,0x5C6E,0x5270,0x3268, 0, -0x4857,0x4863,0x5C7B, 0,0x5C6D, 0, 0, 0, -0x5C77, 0, 0,0x5C75, 0, 0,0x3E23,0x5C74, - 0,0x325D, 0, 0, 0, 0, 0,0x5C73, -0x3C76,0x5C68,0x3B44, 0,0x4073, 0, 0, 0, - 0, 0,0x3C54,0x5C69,0x5C6A, 0,0x5C71,0x5C76, -0x5C79,0x3534, 0,0x4859,0x3B67,0x5C7E,0x5C7D,0x532B, -0x5D21,0x5D23,0x5D25,0x5271,0x5D24,0x5D26,0x5D27,0x5229, - 0, 0, 0, 0, 0, 0, 0,0x3A49, -0x5D29, 0, 0,0x5D36,0x5D31,0x5D34, 0, 0, - 0, 0, 0, 0, 0,0x5D30,0x464E, 0, - 0,0x4072, 0, 0, 0, 0,0x492F, 0, - 0, 0,0x5C6C,0x5D2E, 0, 0, 0, 0, -0x5D37, 0, 0,0x5C70,0x5D2F, 0,0x5D38, 0, -0x5D2C, 0, 0, 0, 0, 0, 0, 0, -0x5D39,0x5D33,0x5D2D,0x442A, 0, 0, 0, 0, -0x5D28,0x4033,0x412B,0x5D2A,0x5D2B, 0,0x5D32,0x3B71, -0x5D35,0x5328,0x5D3A, 0,0x5D3B,0x4327, 0, 0, -0x5D52,0x5D3C, 0, 0, 0,0x5D51, 0,0x393D, - 0, 0,0x3E55, 0,0x3E7A, 0, 0,0x3A4A, - 0, 0, 0, 0,0x5D4A, 0,0x5D45, 0, -0x5D3F, 0, 0, 0,0x324B,0x5D43, 0,0x5D4B, -0x3224,0x5D55, 0, 0, 0,0x5D3E, 0, 0, - 0,0x4650,0x5D50, 0, 0, 0, 0, 0, -0x5D54,0x4162,0x3746, 0, 0, 0, 0, 0, -0x5D4E,0x5D4F, 0, 0, 0,0x5D44, 0, 0, - 0,0x5D3D, 0,0x5D4D,0x4C51, 0,0x5D49, 0, - 0, 0, 0,0x5D42,0x4348,0x463C,0x4E2E,0x5D4C, - 0,0x5D48, 0, 0, 0, 0, 0, 0, -0x5D41, 0, 0, 0,0x5D46,0x425C, 0, 0, - 0, 0, 0, 0,0x5329,0x532A,0x5D53,0x4F74, -0x4878, 0, 0, 0, 0, 0, 0, 0, - 0,0x5D66, 0, 0, 0, 0, 0, 0, -0x5D47, 0, 0, 0,0x5D60,0x4264, 0, 0, - 0, 0, 0, 0, 0, 0,0x5D61, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5D57, 0, 0, 0, 0, 0,0x5678, - 0,0x5D59,0x5D58,0x3870,0x5D56, 0, 0, 0, - 0,0x464F, 0,0x362D, 0, 0, 0, 0, - 0,0x5D62, 0,0x3A79,0x5461,0x5D67, 0, 0, - 0,0x3450, 0,0x5D5A, 0,0x3F7B,0x5D63, 0, -0x5D5F, 0,0x5D5D, 0, 0, 0, 0, 0, - 0, 0,0x3559, 0, 0, 0, 0,0x5D5B, -0x5D5C,0x5D5E, 0,0x3D2F,0x5D64, 0,0x5D65, 0, - 0, 0, 0, 0, 0, 0, 0,0x5D75, - 0,0x4349, 0, 0,0x4B62, 0, 0, 0, - 0,0x5D72, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5861, - 0, 0,0x4651, 0,0x5D74, 0, 0, 0, -0x5574,0x5D73,0x5D70, 0, 0,0x5D6C, 0,0x5D6F, - 0,0x5D68, 0, 0,0x506E, 0, 0, 0, - 0,0x4858,0x5D6E, 0, 0,0x5D69, 0, 0, -0x5D6A,0x4B72, 0,0x5D6D, 0, 0,0x314D, 0, - 0, 0, 0, 0, 0,0x4036, 0,0x3C3B, -0x5D71, 0, 0,0x5D77, 0,0x5D76,0x5D6B, 0, - 0, 0, 0, 0,0x456E, 0, 0, 0, -0x5D7B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5E24, 0, 0,0x5E23, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5D78, 0, 0, 0, - 0,0x436F, 0,0x427B, 0, 0, 0,0x5561, - 0, 0,0x4E35, 0, 0, 0, 0,0x5D7D, - 0,0x324C, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4468,0x4A5F, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x473E, -0x5D7A,0x5D7C,0x5D7E,0x5E22,0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0, 0,0x722F, 0, 0, 0, - 0, 0,0x5069, 0, 0, 0,0x535D, 0, - 0, 0,0x6B3D, 0, 0, 0, 0, 0, - 0, 0, 0,0x3366,0x7230, 0,0x7231, 0, - 0,0x4A2D, 0, 0, 0, 0, 0, 0, - 0,0x3A67,0x7233,0x7235,0x7234,0x4B64,0x4F3A,0x7232, -0x4A34,0x524F,0x426C, 0, 0, 0, 0, 0, - 0, 0,0x4E43,0x7238,0x3076,0x7237, 0, 0, - 0, 0, 0,0x723E, 0,0x324F, 0, 0, - 0, 0, 0, 0,0x5141,0x723A, 0, 0, - 0, 0, 0,0x723C,0x5469, 0, 0,0x723B, -0x7236,0x723F,0x723D, 0,0x7239, 0, 0,0x7247, -0x7244,0x7246, 0, 0,0x724A,0x7242,0x7240, 0, - 0, 0,0x7245, 0, 0, 0, 0, 0, -0x567B, 0, 0, 0,0x7241, 0,0x4779,0x495F, - 0,0x7248,0x3946,0x3530, 0, 0,0x7243,0x7249, -0x7250,0x7256, 0, 0,0x3B57, 0, 0, 0, -0x7255,0x4D5C, 0,0x566B, 0, 0,0x7252,0x7254, - 0, 0, 0, 0,0x3872, 0, 0, 0, - 0,0x724B, 0, 0, 0,0x724E,0x4279, 0, -0x555D,0x724C,0x724D,0x724F,0x7253, 0, 0, 0, -0x7259,0x533C, 0, 0, 0, 0,0x366A, 0, -0x4A71, 0,0x3764,0x7257, 0, 0, 0,0x7258, -0x725A,0x725D,0x725B, 0, 0,0x725C, 0, 0, - 0, 0,0x5151,0x7251, 0,0x4D49, 0,0x4E4F, -0x5629, 0,0x7263, 0,0x435B, 0,0x7260, 0, - 0,0x402F,0x726C,0x725E, 0,0x7261, 0, 0, - 0,0x7268, 0, 0, 0, 0,0x7262, 0, - 0,0x7267, 0, 0,0x7266, 0, 0,0x7269, - 0, 0, 0,0x725F, 0, 0,0x7264,0x726A, - 0, 0, 0, 0, 0, 0, 0,0x532C, -0x7265,0x3275, 0, 0,0x7272, 0,0x502B, 0, - 0, 0, 0,0x7275, 0, 0, 0,0x3B48, - 0,0x7279, 0, 0, 0, 0, 0, 0, -0x7270, 0, 0,0x7276,0x7278,0x727A, 0, 0, - 0, 0, 0, 0, 0, 0,0x7273, 0, -0x7271, 0, 0, 0,0x3A7B, 0,0x357B, 0, - 0, 0, 0,0x726F,0x7277,0x726D,0x726E, 0, - 0, 0,0x726B,0x7326, 0,0x7323, 0, 0, -0x7322, 0, 0,0x7274, 0,0x485A, 0, 0, - 0, 0, 0,0x727B, 0, 0, 0,0x7325, - 0, 0, 0, 0, 0, 0, 0,0x4378, - 0, 0, 0, 0, 0, 0, 0, 0, -0x727D, 0, 0,0x7327,0x7329,0x7324, 0,0x727C, - 0, 0, 0,0x732B, 0,0x732A, 0, 0, - 0, 0,0x425D, 0, 0,0x732E, 0, 0, -0x7330, 0, 0, 0, 0, 0,0x7321, 0, - 0, 0,0x7331,0x732C, 0, 0, 0, 0, - 0,0x732F,0x727E,0x732D, 0, 0, 0, 0, - 0, 0, 0,0x7332, 0, 0, 0, 0, -0x7334, 0, 0, 0, 0,0x7328, 0, 0, - 0, 0,0x7333, 0, 0, 0,0x7335, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5037, 0, 0, 0, 0,0x7338, 0, - 0, 0, 0,0x5979, 0, 0, 0, 0, - 0, 0,0x7339, 0, 0, 0, 0, 0, - 0, 0, 0,0x7337, 0,0x4864,0x7336, 0, - 0, 0, 0,0x733A, 0, 0, 0, 0, - 0,0x733B,0x3440, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6E43, 0, 0, 0, 0, 0, - 0,0x733C, 0, 0,0x733D, 0, 0, 0, -0x512A, 0, 0, 0,0x742C,0x5046, 0, 0, - 0, 0, 0, 0,0x5050,0x515C, 0, 0, - 0, 0, 0, 0,0x4F4E, 0, 0,0x3D56, - 0,0x5143, 0, 0, 0, 0, 0, 0, - 0,0x3A62,0x6169,0x5242,0x7142,0x3239, 0, 0, -0x316D,0x7143, 0,0x4940,0x3344, 0,0x5972, 0, -0x4B25, 0,0x7144, 0, 0, 0, 0,0x5654, - 0, 0, 0, 0, 0,0x7145,0x7440,0x7146, - 0,0x542C,0x7147, 0,0x3040,0x7441, 0, 0, -0x7442, 0, 0,0x347C, 0,0x455B, 0, 0, - 0, 0,0x4C3B, 0, 0, 0,0x5064, 0, - 0, 0, 0, 0,0x4D60, 0, 0, 0, - 0, 0,0x7148, 0,0x5973, 0, 0, 0, - 0, 0, 0,0x313B, 0,0x4F2E, 0, 0, - 0,0x3824, 0, 0, 0, 0, 0,0x714A, - 0, 0, 0, 0,0x714B, 0, 0, 0, - 0,0x3243,0x4151, 0, 0,0x5730,0x7149, 0, - 0,0x714C, 0, 0, 0, 0,0x714E, 0, - 0, 0,0x5976, 0,0x5261,0x5423, 0, 0, -0x7443,0x4839, 0, 0, 0, 0, 0,0x7444, - 0, 0,0x714D,0x714F,0x3F63,0x7150, 0, 0, -0x7154, 0, 0, 0, 0, 0, 0, 0, -0x7156,0x7151, 0,0x4951,0x4561, 0, 0, 0, -0x4263,0x397C, 0, 0,0x7153, 0,0x7155, 0, - 0, 0,0x3953, 0, 0, 0, 0, 0, - 0, 0,0x715B, 0, 0, 0, 0, 0, -0x3A56, 0,0x307D,0x7159, 0, 0, 0, 0, - 0,0x7158,0x7152,0x715A, 0, 0, 0, 0, - 0,0x7157, 0, 0, 0,0x486C, 0, 0, - 0, 0,0x4D4A,0x715D, 0, 0, 0, 0, -0x653D, 0, 0, 0,0x715C, 0,0x715E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x715F, 0, 0,0x4F65, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x7445,0x3D73, - 0, 0, 0, 0, 0, 0,0x7160, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x7161, 0, 0, 0,0x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x556F,0x5A2E,0x565F,0x344A,0x5A30,0x5A2F, - 0,0x526B,0x5A31,0x5A32,0x5A33,0x4A54,0x5A34,0x4A2B, -0x5A35,0x5A36,0x334F,0x566F,0x5A37,0x3B30,0x352E,0x5A38, -0x5A39,0x396E,0x512F,0x5268,0x5A3A,0x3843,0x4F6A,0x326F, -0x5A3B,0x5A3C, 0,0x3D6B,0x4E5C,0x536F,0x5A3D,0x4E73, -0x5A3E,0x5355,0x3B65,0x5A3F,0x4B35,0x4B50,0x5A40,0x476B, -0x566E,0x5A41,0x4535,0x3641,0x5A42,0x374C,0x3F4E,0x5A43, -0x5A44,0x4B2D,0x5A45,0x3577,0x5A46,0x4142,0x573B,0x5A47, -0x4C38, 0,0x526A,0x4431,0x5A48,0x357D,0x3B51,0x5A49, -0x5033,0x5A4A,0x5A4B,0x4E3D,0x5A4C,0x5A4D,0x5A4E,0x3277, -0x5A51,0x5A4F,0x5168,0x5A50,0x4355,0x5A52, 0,0x5A53, -0x5A54,0x5A55,0x503B,0x5225,0x3079,0x5A56,0x472B,0x5A57, -0x3D77,0x4321,0x5A58,0x5A59,0x437D,0x4C37,0x5A5A,0x5A5B, -0x403E,0x4657,0x5A5C,0x5A5D,0x4734,0x5A5E,0x5A5F,0x3948, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3B6D, 0, 0, 0, 0,0x3639,0x7478, - 0,0x7479, 0, 0,0x4D63, 0, 0, 0, - 0, 0, 0, 0, 0,0x7539, 0, 0, - 0, 0,0x6B60, 0, 0, 0, 0, 0, - 0,0x4F73,0x3B3F, 0, 0, 0, 0, 0, - 0, 0,0x3A40,0x5425, 0, 0, 0, 0, - 0, 0, 0,0x6159, 0, 0, 0, 0, -0x7574,0x312A,0x3272, 0, 0, 0, 0, 0, - 0, 0,0x7575, 0, 0,0x7577, 0, 0, - 0,0x3A51,0x7576, 0,0x4332, 0, 0, 0, - 0, 0, 0, 0,0x7579, 0, 0, 0, -0x7578, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3134,0x556A,0x383A, - 0,0x3931,0x3246,0x5470,0x4F4D,0x305C,0x554B,0x3B75, -0x564A,0x3737,0x4C30,0x4636,0x3161,0x393A,0x567C,0x3961, -0x3721,0x3C7A,0x6A5A,0x6A5B,0x4C79,0x3973,0x6A5C,0x347B, -0x4333,0x3751,0x3A58,0x6A5D,0x5474,0x6A5E,0x3C56,0x3B5F, -0x6A5F,0x415E,0x4238,0x545F,0x574A,0x6A60,0x6A61,0x6A64, -0x6A62,0x6A63,0x495E,0x3833,0x3644,0x6A65,0x4A6A,0x494D, -0x344D, 0, 0,0x6259,0x4562,0x6A66,0x4035, 0, -0x5738,0x6A67,0x572C,0x487C,0x5853,0x584D,0x545E, 0, -0x5479,0x4944,0x532E,0x3853,0x3360, 0,0x4962,0x7476, - 0, 0, 0,0x3A55, 0,0x7477, 0, 0, -0x575F, 0, 0,0x7471,0x3830,0x5554,0x384F,0x4670, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3343, 0, 0,0x7472,0x332C, 0, 0, - 0, 0,0x543D,0x4777, 0, 0, 0, 0, - 0,0x7474, 0, 0,0x7473, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4C4B, - 0, 0, 0,0x4824, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7475, 0,0x5763,0x453F,0x7540, 0, 0, -0x753B, 0,0x7543, 0,0x7542, 0,0x563A,0x7541, - 0, 0, 0,0x543E,0x7544, 0,0x754C, 0, - 0, 0, 0,0x304F,0x3578, 0,0x7549,0x754A, - 0,0x455C, 0, 0, 0, 0,0x7545,0x7546, - 0, 0,0x7547,0x754B, 0,0x3E60,0x7548,0x387A, - 0, 0, 0,0x7550,0x7553, 0, 0, 0, -0x3F67, 0,0x3972,0x753C,0x754D, 0, 0,0x4237, - 0, 0, 0,0x4C78, 0,0x3C79, 0,0x754E, -0x754F,0x7551,0x3665,0x7552, 0,0x7555, 0, 0, - 0, 0, 0, 0, 0,0x753D, 0, 0, - 0,0x7554,0x533B, 0,0x336C, 0, 0,0x4C24, - 0, 0, 0, 0,0x7556, 0, 0, 0, - 0, 0, 0, 0, 0,0x7557,0x3E61,0x7558, - 0, 0,0x4C5F,0x755B, 0, 0, 0, 0, - 0,0x3248,0x5759, 0,0x7559, 0,0x755A,0x755C, - 0,0x7562, 0, 0, 0,0x7560, 0, 0, - 0,0x755F,0x755D, 0, 0,0x7561, 0, 0, -0x755E,0x7564,0x7565, 0,0x4C63, 0, 0,0x653F, -0x3538,0x7563,0x7568,0x4C23, 0, 0, 0, 0, - 0,0x7566,0x7567, 0, 0, 0, 0, 0, - 0,0x753E, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3144, 0, - 0,0x753F, 0, 0,0x3545,0x3264, 0,0x756C, -0x7569, 0,0x3657, 0,0x756D, 0,0x756A, 0, - 0, 0, 0, 0,0x756B, 0, 0,0x345A, - 0,0x546A, 0, 0, 0,0x756E, 0,0x3379, - 0, 0, 0, 0, 0, 0, 0,0x756F, -0x7571, 0, 0, 0,0x7570, 0, 0, 0, - 0, 0, 0, 0,0x7572, 0,0x7573, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x496D,0x392A, 0, 0,0x477B, - 0, 0,0x3663, 0, 0, 0, 0, 0, - 0, 0,0x4C49, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6A26, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3335,0x547E, -0x396C,0x5079, 0,0x696D,0x572A,0x696E,0x4256,0x486D, -0x3A64,0x696F,0x6970,0x6971,0x5661,0x6972,0x6973,0x6975, -0x6974,0x6976,0x6977,0x4761,0x6978,0x5458,0x6979,0x3D4E, - 0,0x697A,0x697B,0x3D4F,0x697C,0x3828,0x413E,0x697D, -0x3132,0x3B54,0x3975,0x697E, 0,0x6A21,0x6A22,0x6A23, -0x3778,0x3C2D, 0,0x4A64,0x604E,0x542F,0x4F3D,0x5537, -0x6A24,0x555E,0x6A25,0x5041,0x393C, 0,0x3447,0x3159, - 0, 0, 0,0x4031, 0, 0, 0, 0, -0x3166,0x3167, 0,0x3168, 0, 0, 0, 0, -0x333D,0x4868, 0, 0, 0, 0,0x6541, 0, - 0,0x315F, 0, 0, 0,0x4149,0x346F, 0, - 0,0x4728,0x5358, 0,0x4679,0x5138, 0,0x397D, -0x4275, 0, 0, 0, 0, 0,0x532D, 0, -0x544B,0x3D7C, 0,0x6542,0x3735,0x6543, 0, 0, -0x3B39,0x5562, 0,0x3D78,0x5436,0x4E25,0x412C,0x3359, - 0, 0,0x4C76, 0,0x6546,0x6544,0x6548, 0, -0x654A,0x6547,0x354F,0x4648, 0,0x357C,0x6545, 0, -0x4A76, 0, 0,0x6549, 0, 0, 0,0x4354, -0x3145,0x3C23, 0, 0, 0,0x5737, 0, 0, -0x4D4B,0x4B4D,0x4A4A,0x4C53,0x654C,0x654B,0x4466, 0, - 0,0x5121,0x5137,0x654D, 0,0x6550, 0,0x4D38, -0x5670,0x654F,0x355D, 0,0x4D3E, 0,0x6551,0x363A, - 0, 0,0x4D28,0x3964, 0,0x4A45,0x3351,0x4B59, -0x546C,0x6552,0x376A, 0, 0, 0,0x654E, 0, - 0, 0, 0, 0, 0,0x6555,0x347E,0x6556, - 0, 0, 0, 0, 0,0x6553,0x6554, 0, -0x525D, 0, 0,0x425F,0x3146, 0,0x5362, 0, - 0,0x365D,0x4B6C, 0,0x6557, 0, 0,0x5376, - 0, 0, 0, 0, 0,0x3169, 0,0x3674, -0x655A,0x6558,0x6559,0x3540, 0, 0, 0,0x5245, -0x655C, 0, 0,0x655E, 0, 0, 0, 0, - 0, 0,0x655D,0x4732, 0,0x5223, 0, 0, -0x655B, 0, 0, 0, 0,0x5462,0x555A, 0, - 0, 0, 0, 0,0x6560,0x5771, 0, 0, - 0, 0, 0, 0, 0,0x6561, 0,0x315C, -0x517B, 0,0x6562,0x6564, 0, 0, 0, 0, -0x6563, 0, 0,0x6565, 0, 0, 0, 0, - 0,0x5258, 0,0x354B, 0,0x675F, 0,0x5A75, - 0,0x5A78, 0,0x5A76, 0,0x5A77, 0, 0, - 0,0x5A7A,0x504F,0x4447, 0, 0,0x306E, 0, - 0, 0,0x5030, 0,0x5A79, 0,0x534A,0x3A2A, -0x5B22,0x4771, 0,0x5A7C,0x5A7B,0x495B,0x5A7D, 0, -0x5B21,0x575E,0x5A7E,0x415A, 0, 0,0x5B25, 0, - 0,0x5374, 0, 0,0x5B27,0x5B24, 0,0x5B28, - 0, 0,0x3D3C, 0, 0, 0,0x4049,0x5B23, -0x5B26,0x5623, 0,0x5B29, 0, 0, 0,0x5B2D, - 0, 0, 0,0x5B2E,0x5B2C,0x3A42, 0, 0, - 0,0x3F24,0x5B2B, 0, 0, 0,0x5B2A,0x5447, -0x323F, 0, 0,0x5B2F, 0,0x3979, 0,0x5B30, - 0, 0, 0, 0,0x333B, 0, 0, 0, -0x3526, 0, 0, 0, 0,0x363C,0x5B31, 0, - 0, 0,0x3675, 0,0x5B32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3149, 0, 0, 0, 0,0x5B34, 0, - 0, 0,0x5B33,0x5B35, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5B37, - 0,0x5B36, 0, 0, 0, 0, 0, 0, - 0,0x5B38, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5B39, 0, 0,0x5B3A, 0, - 0,0x534F,0x747A,0x4775,0x5743,0x4564,0x747C,0x747D, -0x747B, 0,0x3E46, 0, 0, 0, 0,0x506F, - 0, 0,0x3753, 0, 0,0x544D,0x4C2A, 0, - 0,0x7522,0x7521,0x3A28,0x747E,0x4B56, 0, 0, - 0,0x7524,0x4052, 0,0x336A, 0,0x4D2A,0x7525, -0x7523,0x3D34,0x7528, 0,0x7529,0x3D4D,0x4338,0x3F61, -0x4B61,0x752A, 0, 0, 0,0x7526,0x7527,0x4470, - 0, 0, 0, 0, 0,0x752C, 0,0x343C, - 0,0x576D, 0,0x3457,0x752B,0x752E, 0, 0, -0x752D,0x752F,0x5051, 0, 0, 0, 0, 0, - 0, 0,0x4351,0x4829, 0, 0, 0, 0, - 0, 0,0x7530,0x7531, 0, 0, 0, 0, - 0, 0,0x7532, 0, 0,0x7533,0x7534,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 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x764D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x764E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6E44,0x6E45,0x6E46, -0x556B,0x3624,0x6E48,0x6E47,0x6E49,0x6E4A,0x4725,0x6E4B, -0x6E4C, 0,0x3730,0x3576,0x6E4D,0x6E4F, 0,0x6E4E, - 0,0x3846,0x6E50,0x6E51,0x6E52,0x365B,0x332E,0x5653, -0x4446,0x3135,0x3856,0x6E53,0x6E54,0x543F,0x4755,0x3E7B, -0x4E59,0x3933,0x6E56,0x6E55,0x6E58,0x6E57,0x4525,0x6E59, -0x6E5A,0x472E,0x6E5B,0x472F,0x6E5C,0x3227,0x6E5D,0x6E5E, -0x6E5F,0x6E60,0x6E61,0x576A,0x6E62,0x6E63,0x3C58,0x6E64, -0x534B,0x4C7A,0x322C,0x4165,0x6E65,0x4726,0x432D, 0, -0x6E66,0x6E67,0x6E68,0x6E69,0x6E6A,0x6E6B,0x6E6C, 0, -0x6E6D,0x6E6E,0x6E6F, 0, 0,0x6E70,0x6E71,0x6E72, -0x6E74,0x6E73, 0,0x6E75,0x4D2D,0x4241,0x6E76,0x6E77, -0x6E78,0x5521,0x6E79,0x4F33,0x6E7A,0x6E7B, 0,0x6E7C, -0x6E7D,0x6F21,0x6E7E,0x6F22,0x3875,0x437A,0x6F23,0x6F24, -0x3D42,0x523F,0x3279,0x6F25,0x6F26,0x6F27,0x5278,0x6F28, -0x567D,0x6F29,0x464C, 0,0x6F2A,0x6F2B,0x4134,0x6F2C, -0x4F7A,0x4B78,0x6F2E,0x6F2D,0x337A,0x3978,0x6F2F,0x6F30, -0x5062,0x6F31,0x6F32,0x3766,0x503F,0x6F33,0x6F34,0x6F35, -0x4871,0x4C60,0x6F36,0x6F37,0x6F38,0x6F39,0x6F3A,0x5560, -0x6F3B,0x346D,0x432A,0x6F3C, 0,0x6F3D,0x6F3E,0x6F3F, - 0,0x4E7D,0x6F40,0x4260,0x3438,0x5736,0x3D75, 0, -0x4F47,0x6F43,0x6F41,0x6F42,0x6F44,0x3627,0x3C7C,0x3E62, -0x434C,0x6F45,0x6F46, 0,0x6F47,0x6F4F,0x6F48,0x6F49, -0x6F4A,0x4742,0x6F71,0x364D,0x6F4B, 0,0x6F4C,0x6F4D, -0x3646,0x433E,0x6F4E, 0,0x6F50,0x6F51,0x6F52,0x5572, - 0,0x6F53,0x4477, 0,0x6F54,0x4478,0x6F55,0x6F56, -0x3864,0x3077,0x6F57,0x6F58,0x6F59, 0,0x6F5A,0x6F5B, -0x6F5C,0x6F5D, 0,0x6F5E,0x3E35,0x6F61,0x6F5F,0x6F60, - 0,0x6F62,0x6F63,0x414D,0x6F64,0x6F65,0x6F66,0x6F67, -0x6F68,0x6F69,0x6F6A,0x6F6B,0x6F6C,0x4058, 0,0x6F6D, -0x412D,0x6F6E,0x6F6F,0x6F70, 0, 0,0x4F62, 0, - 0, 0, 0, 0, 0, 0, 0,0x3324, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4345,0x6345,0x4941,0x6346, 0,0x3155,0x4E4A,0x3433, -0x4872,0x6347,0x4F50,0x6348,0x3C64,0x6349,0x634A,0x4346, -0x5522,0x4456,0x396B,0x4E45,0x634B,0x4376,0x634C, 0, -0x3727,0x3873,0x3A52,0x634D,0x634E,0x5444,0x634F, 0, -0x6350,0x514B,0x6351,0x6352,0x6353,0x6354,0x5156,0x6355, -0x327B,0x403B,0x6356, 0,0x402B,0x6357,0x6358,0x6359, - 0,0x635A,0x635B, 0,0x3837,0x5A62, 0,0x3653, - 0,0x5A64,0x5A63, 0, 0, 0, 0, 0, - 0, 0,0x5A66, 0, 0, 0,0x486E, 0, - 0,0x5A65,0x3740,0x5174,0x5275,0x5573,0x3D57, 0, - 0, 0, 0,0x5768,0x5A68,0x5A67, 0,0x3022, -0x4D53, 0,0x5A69, 0,0x383D,0x3C4A,0x423D,0x4224, -0x3342,0x5A6A, 0,0x422A,0x4430,0x3D35, 0, 0, -0x4F5E, 0, 0, 0,0x5A6B,0x4942, 0, 0, - 0, 0, 0,0x315D, 0, 0, 0,0x5A6C, - 0,0x3638,0x543A, 0,0x337D, 0, 0,0x5A6D, -0x5449,0x4F55,0x4563, 0,0x5A6E, 0, 0, 0, - 0, 0,0x5A6F, 0,0x5A70,0x416A,0x4C55,0x4F5D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5367,0x4221, 0, -0x5A71, 0, 0,0x4B65, 0,0x5A72, 0,0x4B66, -0x527E, 0, 0, 0,0x3874, 0, 0,0x5A73, -0x302F,0x4F36, 0, 0,0x554F, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4B6D, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5A74, 0, 0,0x6344, 0, 0,0x4125, 0, - 0,0x763F, 0, 0,0x7640,0x7641,0x4451, 0, -0x4838,0x5163, 0, 0,0x505B,0x5145,0x3C2F,0x394D, - 0,0x6F74, 0, 0,0x3446,0x533A,0x7642,0x337B, - 0, 0,0x7643, 0, 0,0x3571, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7645, 0, 0, 0, 0, 0, 0, 0, -0x536A,0x7627,0x5129, 0, 0, 0, 0,0x7629, - 0, 0, 0,0x7628, 0, 0,0x4163,0x4057, - 0,0x3122, 0, 0, 0, 0,0x4E6D, 0, -0x5068,0x762B, 0, 0,0x4F76, 0,0x762A,0x5570, -0x762C,0x4339, 0, 0, 0,0x3B74,0x762E,0x762D, - 0, 0, 0,0x445E, 0, 0,0x4158, 0, - 0, 0, 0, 0,0x4B2A, 0,0x4F3C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x762F, 0, 0,0x7630, 0, 0, -0x7631, 0,0x4236, 0, 0, 0, 0, 0, -0x3054,0x4579, 0, 0, 0, 0,0x7632, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4760,0x7626, 0, 0,0x3E38, 0, - 0,0x3E32, 0,0x3565, 0, 0,0x3747, 0, -0x3F3F,0x4352,0x4366, 0, 0,0x584C, 0, 0, - 0,0x386F, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3D79,0x5125, 0,0x3050, 0, - 0, 0, 0, 0,0x7730, 0, 0, 0, - 0, 0, 0, 0, 0,0x7731, 0, 0, - 0, 0, 0,0x502C, 0,0x3030, 0, 0, - 0,0x7732,0x7733, 0,0x7734, 0, 0, 0, -0x474A, 0, 0, 0, 0, 0, 0, 0, -0x3E4F, 0, 0,0x7737, 0, 0, 0, 0, - 0, 0, 0,0x7736, 0,0x315E, 0,0x7735, - 0, 0,0x7738, 0,0x7739, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4E24,0x484D, - 0,0x3A2B,0x6838,0x6839,0x683A,0x3E42, 0, 0, - 0, 0, 0,0x5274, 0,0x544F,0x4958, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5233,0x3625,0x476A, -0x717C,0x4F6E,0x4B33,0x506B,0x676F,0x4D67,0x394B,0x3659, -0x717D,0x3064,0x4B4C,0x717E,0x5424,0x422D,0x416C,0x4644, -0x3E31,0x7221,0x3C55, 0,0x7222,0x7223, 0,0x7224, -0x5243,0x4635, 0,0x4D47,0x7225, 0,0x5331,0x3F45, -0x4C62, 0,0x7226,0x7227,0x5155,0x366E,0x7228,0x7229, -0x355F,0x722A,0x722B, 0,0x327C,0x722C,0x722D,0x4827, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3767, 0, - 0,0x6C29,0x6C2A,0x6C2B, 0,0x6C2C, 0, 0, -0x462E,0x6C2D,0x6C2E, 0, 0, 0,0x3749,0x4A33, - 0, 0, 0, 0, 0, 0, 0,0x6238, -0x774F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x7750, 0, 0, -0x324D, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x7751, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x7753,0x7752, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x623B, 0,0x3C22, 0,0x623C, -0x623D,0x623E,0x623F,0x6240,0x6241,0x3739,0x527B,0x3D24, -0x4A4E,0x3125,0x4B47, 0,0x6242,0x367C,0x4844,0x6243, - 0, 0,0x3D48, 0,0x317D,0x6244, 0,0x3676, -0x6245,0x4459, 0, 0,0x6246,0x4F5A,0x395D,0x6247, -0x4021, 0,0x6248,0x3276, 0,0x6249, 0,0x4173, -0x624A,0x624B,0x4278,0x624C,0x624D,0x624E,0x4A57,0x5838, -0x5965,0x4F63, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x7025, 0, 0, -0x5C30, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x426D,0x5426,0x4D54,0x5131, -0x335B,0x477D, 0,0x3235,0x423F,0x6660,0x4A3B,0x6661, -0x6662,0x3E54,0x6663,0x5724,0x4D55,0x6665,0x3C5D,0x6664, -0x6666,0x6667,0x426E, 0,0x3D3E,0x6668,0x4266,0x3A27, -0x6669, 0,0x666A,0x3352,0x5169, 0, 0,0x3F25, -0x666B,0x466F,0x666C,0x666D, 0, 0,0x666E,0x462D, -0x666F, 0,0x4927,0x6670,0x6671,0x6672,0x6539,0x6673, -0x6674,0x4262,0x6675,0x6676,0x5668,0x6677, 0,0x6678, -0x3947, 0, 0, 0, 0, 0, 0, 0, -0x773B,0x773A, 0, 0, 0, 0,0x773E,0x773C, -0x3A21, 0,0x773F, 0,0x7740, 0, 0, 0, -0x7742,0x7741,0x7744, 0, 0,0x7743, 0, 0, - 0, 0, 0,0x7745,0x7746, 0, 0, 0, - 0,0x7747, 0,0x4B68, 0, 0, 0, 0, -0x385F, 0, 0, 0, 0, 0, 0,0x7754, - 0,0x7755, 0, 0, 0, 0,0x7756, 0, - 0, 0, 0,0x7758, 0,0x775A, 0,0x7757, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x775B, 0,0x7759, 0, 0, 0, 0, - 0, 0, 0,0x5757, 0, 0, 0, 0, -0x775C, 0, 0, 0, 0, 0, 0,0x775D, - 0, 0, 0,0x775E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x775F, - 0, 0, 0,0x7760, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5B4B, - 0, 0,0x582A, 0, 0, 0, 0, 0, - 0, 0, 0,0x6577,0x396D, 0, 0, 0, - 0,0x3F7D,0x3B6A,0x7749,0x4647,0x7748, 0,0x774A, -0x774C,0x774B, 0, 0, 0,0x774D, 0,0x4E3A, - 0,0x774E, 0, 0,0x4427}; - -/* page 7 0x9C7C-0x9CE2 */ -static uint16 tab_uni_gb23127[]={ -0x5363, 0, 0,0x764F, 0,0x4233,0x7650, 0, - 0,0x7651,0x7652,0x7653,0x7654, 0, 0,0x7656, - 0,0x312B,0x7657, 0,0x7658,0x7659,0x765A, 0, -0x765B,0x765C, 0, 0, 0, 0,0x765D,0x765E, -0x4F4A, 0,0x765F,0x7660,0x7661,0x7662,0x7663,0x7664, -0x4070,0x7665,0x7666,0x7667,0x7668,0x7669, 0,0x766A, - 0,0x766B,0x766C, 0,0x766D,0x766E,0x766F,0x7670, -0x7671,0x7672,0x7673,0x7674,0x3E28, 0,0x7675,0x7676, -0x7677,0x7678, 0, 0, 0, 0, 0,0x487A, -0x7679,0x767A,0x767B,0x767C, 0, 0,0x767D,0x767E, -0x7721,0x7722,0x7723,0x7724,0x7725, 0, 0,0x7726, -0x7727,0x7728,0x316E,0x7729,0x772A,0x772B, 0, 0, -0x772C,0x772D,0x415B,0x772E, 0, 0,0x772F}; - -/* page 8 0x9E1F-0x9FA0 */ -static uint16 tab_uni_gb23128[]={ -0x4471,0x702F,0x3C26,0x7030,0x4379, 0,0x4538,0x513B, - 0,0x7031,0x7032,0x7033,0x7034,0x7035,0x513C, 0, -0x516C, 0,0x7037,0x7036,0x5427, 0,0x4D52,0x7038, -0x703A,0x7039,0x703B,0x703C, 0, 0,0x386B,0x703D, -0x3A68, 0,0x703E,0x703F,0x3E69,0x7040,0x366C,0x7041, -0x7042,0x7043,0x7044,0x4835,0x7045,0x7046, 0,0x7047, -0x4574, 0,0x7048, 0, 0, 0,0x7049, 0, -0x704A,0x773D, 0,0x704B,0x704C,0x704D, 0,0x704E, - 0, 0, 0, 0,0x704F,0x3A57, 0,0x7050, -0x7051,0x7052,0x7053,0x7054,0x7055,0x7056,0x7058, 0, - 0,0x5325,0x7057, 0,0x7059, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x753A, -0x4239, 0, 0,0x7764, 0, 0, 0, 0, -0x7765,0x7766, 0, 0,0x7767, 0, 0, 0, - 0, 0, 0,0x7768,0x4234, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x776A, 0, -0x776B, 0, 0, 0, 0, 0, 0,0x4273, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x7470, 0, 0, - 0,0x746F, 0, 0,0x4269, 0,0x7761,0x7762, - 0, 0, 0, 0, 0,0x3B46, 0, 0, - 0, 0,0x5964, 0, 0, 0,0x4A72,0x4068, -0x7024, 0,0x3A5A, 0, 0,0x472D, 0, 0, - 0,0x442C, 0, 0,0x776C,0x776D,0x776E, 0, -0x7770,0x776F, 0,0x7771, 0, 0,0x7774, 0, -0x7773, 0,0x7772,0x7775, 0, 0, 0, 0, -0x7776, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6D69, 0,0x6D6A,0x6D6B, 0,0x763C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x763D, 0,0x763E,0x3626, - 0,0x583E, 0, 0,0x3944, 0, 0, 0, -0x583B, 0,0x5C31, 0, 0, 0, 0, 0, - 0,0x4A73, 0,0x7777, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x7778, 0, 0, -0x7779, 0, 0, 0, 0, 0, 0, 0, -0x777B, 0,0x777A, 0,0x3147, 0,0x777C,0x777D, - 0, 0, 0, 0, 0,0x777E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x466B,0x6C34, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x335D,0x7633, 0, 0,0x7634,0x4164,0x7635,0x7636, -0x7637,0x7638,0x7639,0x763A,0x4823,0x763B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x417A,0x3928,0x6D68, 0, 0, 0, -0x396A,0x595F}; - -/* page 9 0xFF01-0xFFE5 */ -static uint16 tab_uni_gb23129[]={ -0x2321,0x2322,0x2323,0x2167,0x2325,0x2326,0x2327,0x2328, -0x2329,0x232A,0x232B,0x232C,0x232D,0x232E,0x232F,0x2330, -0x2331,0x2332,0x2333,0x2334,0x2335,0x2336,0x2337,0x2338, -0x2339,0x233A,0x233B,0x233C,0x233D,0x233E,0x233F,0x2340, -0x2341,0x2342,0x2343,0x2344,0x2345,0x2346,0x2347,0x2348, -0x2349,0x234A,0x234B,0x234C,0x234D,0x234E,0x234F,0x2350, -0x2351,0x2352,0x2353,0x2354,0x2355,0x2356,0x2357,0x2358, -0x2359,0x235A,0x235B,0x235C,0x235D,0x235E,0x235F,0x2360, -0x2361,0x2362,0x2363,0x2364,0x2365,0x2366,0x2367,0x2368, -0x2369,0x236A,0x236B,0x236C,0x236D,0x236E,0x236F,0x2370, -0x2371,0x2372,0x2373,0x2374,0x2375,0x2376,0x2377,0x2378, -0x2379,0x237A,0x237B,0x237C,0x237D,0x212B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x2169, -0x216A, 0,0x237E, 0,0x2324}; - -static int func_uni_gb2312_onechar(int code){ - if ((code>=0x00A4)&&(code<=0x01DC)) - return(tab_uni_gb23120[code-0x00A4]); - if ((code>=0x02C7)&&(code<=0x0451)) - return(tab_uni_gb23121[code-0x02C7]); - if ((code>=0x2015)&&(code<=0x2312)) - return(tab_uni_gb23122[code-0x2015]); - if ((code>=0x2460)&&(code<=0x2642)) - return(tab_uni_gb23123[code-0x2460]); - if ((code>=0x3000)&&(code<=0x3129)) - return(tab_uni_gb23124[code-0x3000]); - if ((code>=0x3220)&&(code<=0x3229)) - return(tab_uni_gb23125[code-0x3220]); - if ((code>=0x4E00)&&(code<=0x9B54)) - return(tab_uni_gb23126[code-0x4E00]); - if ((code>=0x9C7C)&&(code<=0x9CE2)) - return(tab_uni_gb23127[code-0x9C7C]); - if ((code>=0x9E1F)&&(code<=0x9FA0)) - return(tab_uni_gb23128[code-0x9E1F]); - if ((code>=0xFF01)&&(code<=0xFFE5)) - return(tab_uni_gb23129[code-0xFF01]); - return(0); -} - - -static int -my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, uchar *e) -{ - int code; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((uint) wc < 0x80) - { - s[0]= (uchar) wc; - return 1; - } - - if (!(code=func_uni_gb2312_onechar(wc))) - return MY_CS_ILUNI; - - if (s+2>e) - return MY_CS_TOOSMALL2; - - code|=0x8080; - s[0]=code>>8; - s[1]=code&0xFF; - return 2; -} - - -static int -my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc, const uchar *s, const uchar *e){ - int hi; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((hi= s[0]) < 0x80) - { - pwc[0]=hi; - return 1; - } - - if (s+2>e) - return MY_CS_TOOSMALL2; - - if (!(pwc[0]=func_gb2312_uni_onechar(((hi<<8)+s[1])&0x7F7F))) - return -2; - - return 2; -} - - -/* - Returns well formed length of a EUC-KR string. -*/ -static size_t -my_well_formed_len_gb2312(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, - size_t pos, int *error) -{ - const char *b0= b; - const char *emb= e - 1; /* Last possible end of an MB character */ - - *error= 0; - while (pos-- && b < e) - { - if ((uchar) b[0] < 128) - { - /* Single byte ascii character */ - b++; - } - else if (b < emb && isgb2312head(*b) && isgb2312tail(b[1])) - { - /* Double byte character */ - b+= 2; - } - else - { - /* Wrong byte sequence */ - *error= 1; - break; - } - } - return (size_t) (b - b0); -} - - -static MY_COLLATION_HANDLER my_collation_ci_handler = -{ - NULL, /* init */ - my_strnncoll_simple, /* strnncoll */ - my_strnncollsp_simple, - my_strnxfrm_mb, /* strnxfrm */ - my_strnxfrmlen_simple, - my_like_range_mb, /* like_range */ - my_wildcmp_mb, /* wildcmp */ - my_strcasecmp_mb, /* instr */ - my_instr_mb, - my_hash_sort_simple, - my_propagate_simple -}; - - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - ismbchar_gb2312, - mbcharlen_gb2312, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_gb2312, - my_lengthsp_8bit, - my_numcells_8bit, - my_mb_wc_gb2312, /* mb_wc */ - my_wc_mb_gb2312, /* wc_mb */ - my_mb_ctype_mb, - my_caseup_str_mb, - my_casedn_str_mb, - my_caseup_mb, - my_casedn_mb, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - -CHARSET_INFO my_charset_gb2312_chinese_ci= -{ - 24,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY, /* state */ - "gb2312", /* cs name */ - "gb2312_chinese_ci",/* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_gb2312, - to_lower_gb2312, - to_upper_gb2312, - sort_order_gb2312, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_ci_handler -}; - -CHARSET_INFO my_charset_gb2312_bin= -{ - 86,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT, /* state */ - "gb2312", /* cs name */ - "gb2312_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_gb2312, - to_lower_gb2312, - to_upper_gb2312, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_mb_bin_handler -}; - -#endif diff --git a/externals/mysql/strings/ctype-gbk.c b/externals/mysql/strings/ctype-gbk.c deleted file mode 100644 index 6fa8ca8be6..0000000000 --- a/externals/mysql/strings/ctype-gbk.c +++ /dev/null @@ -1,10100 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This file is for Chinese character sets GBK, created by Wei He - (hewei@mail.ied.ac.cn) -*/ - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. strxfrm_multiply_gbk=1 - * .configure. mbmaxlen_gbk=2 - */ - - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_gbk - - -/* Support for Chinese(GBK) characters, by hewei@mail.ied.ac.cn */ - -#define isgbkhead(c) (0x81<=(uchar)(c) && (uchar)(c)<=0xfe) -#define isgbktail(c) ((0x40<=(uchar)(c) && (uchar)(c)<=0x7e) || \ - (0x80<=(uchar)(c) && (uchar)(c)<=0xfe)) - -#define isgbkcode(c,d) (isgbkhead(c) && isgbktail(d)) -#define gbkcode(c,d) ((((uint) (uchar) (c)) <<8) | (uchar)(d)) -#define gbkhead(e) ((uchar)(e>>8)) -#define gbktail(e) ((uchar)(e&0xff)) - -static uchar NEAR ctype_gbk[257] = -{ - 0, /* For standard library */ - 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, - 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16, - 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16, - 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2, - 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0, -}; - -static uchar NEAR to_lower_gbk[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '[', '\\', ']', '^', '_', - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR to_upper_gbk[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR sort_order_gbk[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '\\', ']', '[', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', 0x7E, '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uint16 NEAR gbk_order[]= -{ -8653,14277,17116,11482,11160,2751,14613,3913,13337,9827, -19496,1759,8105,7103,7836,5638,2223,21433,5878,8006, -4851,18766,18879,16728,8129,6200,19133,6389,2500,19084, -16228,5074,8130,5900,6201,3985,14597,11566,8588,8769, -15885,11411,11965,1961,18012,18303,12242,14118,11490,12911, -15015,4367,3184,2093,20937,5710,5108,10560,9993,18982, -8393,10697,14620,19558,14970,15193,5359,18189,12666,18192, -3310,18659,17358,7973,18673,19537,3404,9723,4221,16486, -7023,13648,16310,1049,1726,4799,15534,4366,17133,4192, -6219,5118,1804,2360,2279,14279,13740,4511,2361,12906, -16650,18590,4723,2001,16313,3594,21026,12146,19561,3800, -4161,16774,18892,17657,7025,892,7917,12245,3394,4813, -11902,3189,20002,2365,12964,18115,17660,20227,17182,11907, -11671,17562,17864,21131,13423,1361,12246,18897,14978,18848, -20727,5902,10726,21241,1906,13424,1408,20519,3038,18495, -20446,1431,17138,13464,14558,1221,6720,6137,17348,5268, -4448,11313,1760,6172,6870,5744,13541,3044,17701,14368, -16114,5051,9142,18776,5669,19089,11088,17867,925,10395, -4372,10578,2138,2554,18118,21087,13862,7461,14983,3322, -15305,11844,7924,8087,2542,20701,21772,2754,10490,8218, -14800,15869,14436,16119,1814,11543,17398,16069,19659,17020, -17844,5694,8833,16744,18925,4957,9812,6852,8036,12966, -14038,12145,16833,11165,17076,17756,3673,2367,20916,9143, -14927,6885,17486,7469,1661,2827,4627,18198,1307,19711, -17637,2595,2262,20807,1764,8150,18547,3192,9711,16262, -9144,2006,21629,5311,15743,14733,10991,15402,2916,17724, -12195,12622,5141,8039,15169,7780,4568,20835,21575,10580, -15022,9470,6853,3926,21563,1342,16745,8181,11526,1947, -7402,18641,14145,13149,19222,2468,12920,13916,21077,2968, -16438,19667,1768,15632,18374,4738,15517,16655,4309,2374, -14492,8602,3679,2103,1312,18681,6613,18604,20451,2755, -18218,19473,17854,20316,3003,4998,1391,20938,11169,7049, -18861,17577,18091,1937,4085,2059,20633,15948,1313,20138, -7785,16439,15081,20955,15117,17065,19924,13831,11913,20062, -7568,10703,3717,15480,6047,7790,16867,14223,12971,8429, -2008,2833,14026,1317,17493,19411,18551,15452,15257,18504, -4441,1769,7249,20128,5509,1970,9420,19365,20190,21617, -12202,15041,2871,19676,20388,21674,14258,2901,8058,5970, -20472,13257,18226,3694,17591,10279,1318,12409,7901,9794, -10416,10769,12876,17154,15455,19298,3970,21327,14228,13095, -8096,16072,21748,12581,9326,2311,5683,12641,3583,2184, -16464,6969,1795,6778,2880,15819,3433,7674,4713,17297, -8231,4333,9995,1841,5558,17155,17298,11283,18694,7946, -7311,13129,4753,21149,905,14010,18821,8532,11873,2190, -19006,3456,8874,7433,2841,7680,14143,20130,1993,1699, -976,15361,2736,2154,9202,11685,7951,12982,11008,16763, -11829,13327,11686,2299,9940,10507,8917,1277,19790,1636, -20143,21002,15011,19443,6026,13299,2455,9667,15612,16477, -10261,2811,2202,13674,14760,6818,9691,10624,20145,11940, -15524,18349,9437,11578,20132,17736,4121,4122,16023,2280, -4371,4373,7873,18307,14602,14695,13054,5410,6065,14389, -3979,1137,5411,6672,16311,11632,9829,19575,5901,15708, -12553,7165,18983,10860,13664,18242,10848,2049,8075,5579, -8083,10863,21136,5445,17851,19132,8597,18771,11054,14631, -10997,8292,8803,11246,4999,17559,11134,15369,5155,6407, -12054,4857,11265,12834,7322,15057,10937,15984,5544,8040, -13291,3961,5142,19101,869,9631,2009,11315,21404,3172, -14941,4204,7947,9997,16906,4035,4476,4477,8171,2818, -20725,4724,11453,20868,4725,4729,8565,5109,12490,8862, -5920,13737,2888,6930,12963,3223,6934,3395,16243,8397, -9475,4858,13515,3777,11266,10029,21028,1671,7765,7766, -14169,2221,5328,2907,8951,4225,4416,7770,3046,8014, -3975,10636,20236,19825,3248,8717,2140,2908,3249,9477, -4628,2225,12676,2909,21564,5167,1225,4186,13266,4017, -7471,7146,18214,6890,4195,16037,16688,5583,14497,7476, -3286,8566,2910,2862,2232,16038,10417,9492,12234,14190, -8793,5573,6486,20322,21455,9734,8317,10143,5781,7681, -5782,7500,7501,15466,7188,7511,7512,21003,2203,21693, -11350,9540,21212,18183,7918,8754,17511,20869,18899,21160, -11356,9315,8364,8798,18460,16189,17483,11415,8897,7771, -9917,8718,7926,5228,11270,2644,9269,19404,8719,8367, -13267,10400,1914,2157,8584,11171,3964,17881,16785,18951, -18052,16616,14500,9323,10418,12410,14661,6963,7570,7668, -13601,17386,18995,8437,4460,8346,15920,8318,3387,10734, -18057,18058,10525,9654,2390,13675,13603,20000,8106,1260, -10824,1426,5075,5076,18887,12175,8174,15558,5269,4304, -5380,3287,8156,5386,11605,8142,18768,7580,8641,6319, -13425,4478,13147,2019,8900,6331,19668,5756,6769,3381, -9009,9730,9735,15160,4036,8167,13489,17009,8667,18308, -13439,18112,11735,21667,14617,17010,16290,16291,17515,3368, -7050,14841,5636,16826,17573,7760,18493,13306,14312,2619, -17868,13609,8991,7038,4310,16881,14020,16422,20565,5941, -18174,3642,20346,12080,856,13144,18158,20908,10800,15630, -14340,15837,21707,4629,2060,19870,9632,3718,7902,994, -5762,18391,9647,2312,9199,9648,18281,18342,19911,5367, -9950,13834,13513,8771,9414,4057,21302,1963,1964,1967, -902,3349,14697,5602,1071,13959,14621,21428,7288,15079, -7039,16495,13949,3111,5580,13365,2615,4109,6202,11213, -10792,17918,21538,3226,18658,11985,6862,18734,2752,13232, -7838,1907,4252,6223,16703,11495,18037,3974,6301,5226, -8514,10487,5267,10892,12763,16706,7702,20003,2616,14457, -16083,16587,4296,14513,8355,12171,16590,10670,13651,3646, -14626,21132,15826,17015,18911,12792,12461,21545,17848,18912, -17396,3277,13516,5918,16115,12548,1673,4864,18438,6078, -5880,3263,16211,21784,1909,15296,17183,6884,12796,4417, -4299,17021,21137,14801,17484,8852,6512,15560,4300,17921, -5819,9342,15900,17742,19525,3869,11715,17703,12554,6040, -19865,10267,12549,10804,21670,6091,17277,9319,12531,9840, -1060,11215,10514,15170,4892,5904,14898,19534,5469,5470, -1128,5922,18937,7270,15971,17189,16263,9474,13382,2369, -20210,18177,3976,12767,3618,13236,10885,5397,15621,8770, -9830,9310,14121,21573,16634,19148,12803,4381,13051,956, -20237,3755,19551,15744,9169,16852,866,11893,21439,3680, -6197,17412,17324,16086,16747,16602,3834,5510,12770,12771, -3420,16198,21552,1421,3198,6097,18178,12772,20576,9831, -17200,19226,5584,20226,5822,10609,11641,3599,13550,15387, -5361,15481,952,3426,19731,20581,21103,2153,16223,19719, -20139,18533,11172,6356,20044,6584,6585,6954,21058,16397, -14150,17888,6618,4199,11775,9843,19732,14051,2564,13093, -18379,3377,12174,1968,19359,16350,19294,12243,1294,5362, -20214,6898,15645,18557,6146,13005,14084,19366,6272,17534, -10713,2104,5894,13900,16200,6964,12093,16692,12975,21496, -9358,16216,7314,15280,3056,14008,5363,11510,13001,1474, -997,9724,21709,20612,11383,15441,7715,2684,7622,8585, -15456,14192,872,17497,10281,17428,6338,6779,5831,11989, -17156,20245,2293,12512,3560,10705,6367,5040,15465,18663, -14003,7716,17498,6462,10721,13660,9327,17501,6973,9010, -17433,6024,10669,13098,2842,15393,3436,18133,4283,21749, -4461,2571,6707,1986,2900,3138,3434,19771,9090,16900, -12816,6022,9736,17830,6708,19167,18099,11781,14950,18337, -19249,3270,20404,21152,11875,6791,17596,7723,19933,884, -19376,8877,19687,12164,3544,17647,4150,3457,17648,12338, -19127,21715,11831,3635,9259,15329,6901,17127,18710,4191, -12352,21112,7195,7956,2300,18061,10887,15701,10319,6808, -1859,19445,11794,19170,6436,10969,6216,20594,9522,10157, -5898,11567,11326,18410,9674,10340,10229,11345,3447,2456, -12439,12340,17368,10889,17057,4224,8845,18285,2207,19263, -3872,9117,15331,17456,2995,6523,6919,21337,11803,17457, -1936,9533,2248,2161,9697,19072,10607,20163,15100,6199, -20287,7392,20107,21238,9225,11809,13650,10203,6717,19085, -11816,16035,8643,19823,8084,12359,20004,3059,6719,4253, -5838,15886,15982,5839,13638,13780,5840,15341,5842,19140, -6854,5923,10582,5843,2868,16398,19872,13534,8824,12598, -19879,19880,18208,16051,16004,16005,16039,10567,6783,19020, -10539,10550,18184,16018,15868,12573,10392,8863,8172,19697, -12845,12846,21424,3476,12833,17119,14167,11764,11357,7264, -20873,18048,18901,13220,4667,8756,16106,4705,1432,8009, -3665,7966,7128,2587,7967,12053,15477,13430,20832,5587, -15350,8076,18496,4801,10396,13339,5438,18013,1074,10032, -21247,4985,6322,20909,989,3323,12104,11235,7138,6138, -10512,3008,2621,19090,6306,4110,20541,4877,5674,18543, -4231,5748,2116,18465,17517,14702,1762,6233,3281,8548, -3479,6000,954,17677,17278,1186,4803,1097,18938,19207, -5954,17874,2917,13191,1374,4557,13610,19406,8518,7240, -3675,9306,8357,7882,20573,9913,6446,1915,8078,18661, -3600,18200,13551,15199,13252,16268,8298,10602,20739,8775, -2704,3928,15450,1948,2829,1375,8603,4214,18952,20841, -21403,12685,8299,11653,8726,9031,11701,7331,5169,19721, -4311,5546,9471,4548,18163,9032,972,14386,11607,15974, -2517,6540,1462,9789,5823,21324,1244,19595,10838,7744, -13909,18685,5360,21578,19596,6619,4318,18552,1268,3013, -10906,2309,16148,12551,4773,21079,7858,7887,6198,5174, -2935,8605,12479,9418,17729,6610,4093,16233,17928,17030, -7062,8871,19299,19417,8569,15122,14579,11123,16618,2526, -15997,13618,21060,9639,12203,1209,20185,4112,15728,16751, -20767,18053,20711,898,5381,18272,8607,16540,17592,10190, -5887,9300,2294,12204,1384,2426,10427,10374,11972,12978, -10920,11384,16040,14865,10301,1622,2072,20975,20512,8617, -3765,2439,20849,7172,5829,13045,7943,3700,3174,18392, -15307,20290,12928,16506,21383,13068,14230,14231,1088,12583, -8875,3942,4462,13626,4146,3217,3701,14505,4242,4245, -15413,3587,11432,4684,6631,15414,3271,18690,21282,7502, -1039,13032,13072,8748,19021,12316,3766,7551,18665,1852, -15419,9243,8322,6513,3492,13684,12987,18062,9260,16999, -906,18151,3529,13911,7957,9427,8940,10341,18286,15427, -16481,6514,10263,10264,13950,9675,9985,2208,18070,18291, -9406,1106,16240,14024,21355,18735,10727,21254,21358,6353, -9064,6357,17889,9070,14715,10820,4147,14718,18755,5496, -7582,4769,20373,1592,15166,13637,10033,3251,17753,17613, -11596,17130,19916,10850,4182,13264,11964,5447,12805,11003, -11047,2440,20269,5601,5209,15535,15370,18300,1406,6926, -20037,7229,1056,4359,3596,12118,8363,17518,3735,18497, -6573,8553,20360,1351,6662,4610,3780,18127,1363,1032, -16617,12536,16800,1037,7571,9731,4203,19993,7572,14677, -4715,6902,1527,10540,2376,3886,12847,8131,11926,2135, -17136,4517,7104,6221,3365,4816,8031,5875,16599,21029, -11997,5995,21069,20005,4807,2552,8400,21341,18361,11496, -17629,4669,4726,16292,4072,1075,21429,20521,11523,19918, -15958,17185,18913,4247,11358,1436,14370,4248,6080,17849, -4434,20728,11236,1173,4817,10034,21539,13666,14173,18439, -10741,21482,8275,13754,3952,7040,5056,17377,6456,8339, -5443,7327,7328,11738,20834,20673,17273,6182,5675,8491, -8847,18364,11314,9918,12150,4302,19527,18255,14375,14566, -5749,13543,15020,6234,17279,14316,2502,17574,10805,4827, -11443,8723,2979,2980,15870,17708,11546,19581,12503,11626, -20926,5924,21344,12472,16076,17280,16710,18256,16748,16841, -18260,19582,14989,9609,8190,21375,12628,17194,21440,3929, -10404,879,4249,10275,11146,3095,12550,8191,1949,10054, -17413,14766,12773,6692,5001,16647,16648,15405,4581,4582, -15709,11654,13552,8046,7979,12868,3756,17726,6421,16231, -9150,19109,21097,11614,5002,10583,973,9033,19149,18201, -8192,9622,3737,17195,6447,6480,3483,18605,11564,13964, -7294,15949,19734,16351,3689,13838,10941,3378,13918,13178, -6693,16657,12924,2936,11189,5005,7831,4086,18806,21080, -6620,11148,932,19228,17929,7745,16352,20747,13345,15635, -17584,16171,9790,10871,13670,14932,12361,16502,16199,3132, -6358,7791,1245,17817,15950,5715,21662,18558,19882,13796, -13901,10132,10944,12039,1026,10672,9002,13206,20689,19883, -7746,13800,11302,19235,15124,11752,15542,12085,9276,11609, -1235,12346,18996,19759,17966,10773,18749,8627,19370,11703, -5719,7905,21307,20246,5908,9361,20563,6426,6427,1034, -13922,10677,12423,5487,16758,13099,16174,20438,11193,17210, -17211,11392,9864,9712,6490,5723,3572,20852,17832,18753, -6482,16901,9011,13705,18396,2181,7625,10946,4534,4463, -17161,19022,6168,7724,4536,14680,15209,13033,9774,17945, -17649,11755,3943,19023,1971,907,11742,11832,10673,15800, -2738,7958,3028,19632,12437,13822,13876,11528,18236,15363, -19255,12988,19972,11154,1403,14431,17732,11711,4037,10186, -19849,9247,18411,10100,7696,11743,9249,17172,19264,14855, -6822,13579,11104,9538,10541,18292,21213,9251,8394,21477, -17662,14984,15342,19522,21318,15232,11216,3096,12869,18145, -11682,21506,9501,18022,1877,11517,11798,19265,10542,13830, -13303,7230,13858,18591,18772,8010,21395,21223,6229,14563, -18794,15793,14603,2503,13642,5375,17403,20364,3516,14419, -6659,11115,8804,1950,20141,19831,13343,6142,20637,7482, -11825,1770,6541,13226,14576,11826,7938,11847,20963,19677, -1247,8885,11827,8312,13229,6339,14584,11828,14425,16469, -17560,8886,6784,8533,19039,18830,1257,13187,2705,1258, -4762,10511,4124,12519,21303,4828,8724,7588,21305,18092, -14812,4131,3527,7762,4393,4394,14764,14280,11327,9907, -17242,17243,9046,16304,9904,10796,16305,16306,16307,18541, -4232,8998,21059,5110,5515,16061,5115,5116,17012,1390, -7844,15716,3798,14519,20669,17576,11649,16842,16843,10758, -10309,12474,15684,4631,17585,10500,2084,17597,8329,8391, -9883,8392,21237,17624,11692,16188,17134,9579,4288,3503, -6742,10206,13743,16775,5949,14364,2765,18725,19947,1157, -18592,981,16777,7768,4290,4670,16248,12907,12663,7839, -21769,21770,18498,8276,5161,18015,12501,9591,15773,13432, -4865,16137,12288,1030,8924,13433,12525,15774,10036,2589, -12463,2091,1185,15898,18016,1588,6083,8721,10649,4303, -4990,3826,10399,4363,4375,5057,13530,18786,11438,14567, -926,16386,6533,11113,9552,7139,3954,16387,19529,5502, -9919,18545,7610,4258,17519,1884,13639,4736,11585,9555, -19464,17281,13793,3517,14382,2504,15985,5349,5231,17082, -19141,19665,9307,8616,17234,13611,2695,15316,9955,6478, -8193,9151,11248,9034,9035,21671,5547,18164,5179,10584, -10585,10055,4187,20740,19151,3965,5926,20741,16440,12301, -7787,21672,8823,3930,19152,21490,20275,6621,19597,18474, -4742,13395,18475,15636,18862,20956,14654,4319,21271,8594, -10518,18318,10942,5932,6955,6586,15855,16795,19598,21579, -9193,8712,18267,18268,16447,21580,2121,15200,8679,13179, -12699,15998,4113,16882,16619,2010,15485,13801,7795,870, -10133,16801,13060,1368,3719,12950,19418,11778,3238,14580, -13968,15043,21588,7596,9858,8628,2233,3853,2076,3890, -15978,10302,20433,20434,998,2031,13447,13009,3175,21713, -3524,3525,16958,19760,12160,10221,17387,2085,1796,13182, -7626,18232,9328,20458,9866,9867,7890,4243,21738,7721, -8441,18574,7627,18575,8442,20405,19024,18023,11593,18705, -18706,18824,11788,17251,7074,17601,8707,5724,3710,1040, -21730,16369,13823,3530,10114,7818,19688,19975,19196,13859, -7823,9660,5732,10230,10231,19319,16937,8244,2209,19345, -8961,18287,11599,13580,2359,3159,10543,3729,3730,11805, -18293,18294,18354,8989,18295,8861,6605,7968,2341,9938, -8768,12561,12562,13406,20792,20522,18795,7897,15252,13598, -12240,4852,20087,3876,11763,4648,12010,20874,6409,3412, -3325,11359,4866,11367,18927,18928,12467,12835,8356,13863, -14839,14878,13123,20625,14523,13643,3336,5707,12475,20508, -7408,16232,3339,14148,12687,4061,6287,20780,17818,16400, -18969,1192,12480,3839,5382,12040,15543,11124,7309,15602, -6704,21044,14193,1623,5847,20247,11469,1193,8019,2236, -20985,6342,1492,1504,20496,11136,13073,2171,4685,11015, -1195,2739,11224,2793,7816,17258,9214,7318,1761,5147, -7112,15831,20270,5689,10886,13188,4163,18175,1124,7840, -21342,18140,3047,15899,18853,20918,15766,20919,17405,15986, -5754,8835,10998,19501,1885,1763,2547,9152,7051,15026, -14808,13284,19736,11210,15061,2064,17327,4633,8155,4327, -16448,10191,17124,15062,20964,1923,13258,8159,8160,10282, -19210,3348,10428,18997,2788,16006,14951,17645,11211,2313, -16759,4637,5691,8789,8878,1513,13034,9999,9884,10342, -7208,19346,17173,15845,19387,9539,15847,18074,3612,12524, -6721,11524,6722,4706,8251,18309,20183,18728,4413,14016, -4414,14663,3799,6402,16674,3664,7583,1095,14412,20469, -15536,4954,3649,2329,20674,18787,8365,14285,19827,8041, -3781,20470,7589,13024,12198,1463,14347,15407,7422,5256, -4428,1475,8794,7429,1682,17439,3437,5832,7552,6264, -11065,5836,16239,8476,7122,10397,6770,6771,18825,18826, -18836,19941,19942,16558,18365,19706,2556,3782,19419,12386, -2582,21425,16167,7028,21030,16314,3597,10037,4867,16320, -16834,16192,2543,20927,8042,3094,20798,3097,16984,7154, -20939,3065,21098,9153,17578,7857,7477,14656,7295,1595, -5007,16449,1210,16883,20750,12413,15649,3561,20754,1676, -2686,2387,18576,6792,10927,10271,17338,1280,13490,9371, -13717,3895,5069,13719,5093,18895,14619,16819,4457,19220, -11238,16588,16780,7029,17016,7841,16249,3061,19702,12664, -3190,15371,16092,12908,6842,17740,16318,17139,8623,8277, -18915,1238,11239,12128,8801,1174,11583,15810,5542,8283, -19457,3670,15969,19460,4821,17017,1437,19436,17979,3064, -1738,6656,18038,12251,14802,16835,15386,19400,11360,8772, -14633,17022,9344,6183,8902,11416,20884,17520,15767,3827, -6041,5750,12620,17485,14929,6328,13340,6723,2645,18788, -17743,5604,10010,2624,14282,13531,19953,12179,3554,6754, -17406,10801,19407,19828,12258,19955,19722,15988,7855,20577, -10011,6042,13150,15685,1916,12969,16845,10742,18954,6179, -2544,16786,9484,9295,3066,18955,9610,11603,4312,16788, -3098,3557,2322,10985,9623,5646,5641,12629,8777,15745, -10586,16868,8604,5796,11702,4142,5857,20398,19836,7885, -7161,9956,19723,6106,13553,15406,15689,11772,2981,6832, -17639,4282,15278,21613,7332,19412,3558,11608,20063,3840, -2970,13315,2065,1573,6835,21581,15637,1324,17930,16353, -5277,16450,1465,17931,6587,11173,19413,12806,14256,19110, -2421,10875,12840,8731,900,13156,18319,13919,21614,13998, -19229,13624,5383,20021,15132,12707,18560,15042,6665,7064, -5516,8313,2911,11704,17535,8570,20769,19420,2042,18131, -14446,1834,8586,17035,6859,19422,18507,9640,14053,15544, -19118,17896,15382,20067,11316,5407,3101,12414,11470,5848, -2665,1985,1980,1978,3176,11284,20476,15945,1035,14866, -5648,13627,20215,8161,9726,11995,15044,7944,19212,10523, -14260,16041,10744,12882,14352,13297,3707,20853,10283,8383, -12648,12643,19772,12491,9860,3115,19442,2687,20986,15946, -2474,12817,13449,12214,1335,13328,7628,2661,9737,12494, -9012,6786,2533,19214,19215,16992,16993,3438,15415,4244, -4177,15139,8454,2074,17434,4465,4714,9329,9362,17212, -11285,9868,16760,1987,8443,3139,17304,15442,14485,12280, -19025,17162,11876,3439,15443,8022,15032,6985,16515,6520, -13218,13213,8323,2043,8750,19256,19026,10001,14089,8534, -6504,908,18238,9098,17128,2669,19633,19217,3316,11048, -910,11016,4136,12731,11353,9205,10989,2740,21004,11955, -2792,18512,1860,21010,8942,8918,19446,4850,10158,11225, -2540,6809,2254,9248,6506,17972,13691,2256,7209,8336, -6524,14358,9808,11563,11076,15525,8477,21363,5186,19944, -5244,7323,3962,3835,1943,7276,20814,8973,20456,13010, -5259,7430,19761,18334,17044,20461,17050,17052,13492,6403, -6405,4289,14622,15676,10851,3752,14272,18796,18858,18320, -13367,9372,4512,13896,20126,20502,3797,19543,8815,5950, -14365,2095,16110,5497,16776,3566,13744,2096,12909,7265, -19564,1029,16825,20875,20905,3567,18301,8908,1583,8173, -16589,6347,19948,13234,14413,20763,20038,16250,11622,12542, -12543,1073,1020,20229,20006,1739,20880,11540,12559,18593, -20671,20312,18440,6068,11675,18672,2642,12253,7231,10952, -13434,2822,7233,20423,12100,11484,12910,16116,1125,3651, -8284,9079,12829,12861,6169,11818,5398,3221,2622,17521, -2054,6683,1109,20920,9081,4212,4213,11887,20702,5270, -7704,3956,11486,9920,20313,10367,3828,8407,9912,8256, -18196,17190,19661,16120,1820,5350,15671,2509,14122,8758, -10939,11888,8182,12193,7403,14178,13957,17523,2101,4770, -7655,8183,6886,15989,12544,20274,15038,18649,8414,16254, -1917,21752,18677,20375,10368,15058,16121,1188,16434,16294, -13198,14335,11249,10977,4962,3511,16649,8358,19962,21612, -15746,15973,1355,13958,21757,16656,12631,2512,14067,10572, -13292,5170,3655,6855,12688,14737,12872,10056,18202,20742, -9832,5590,11679,6891,18375,20766,1952,1731,15687,21643, -8751,12006,7737,11319,5333,10992,14052,12235,11944,7413, -20748,8118,7414,18273,11558,6209,12344,16354,13999,11761, -14657,21615,20712,18094,6624,1596,18476,6588,18321,21705, -17819,8705,7046,15690,9113,9121,2422,8120,15995,6694, -5325,2707,17426,17586,12922,2106,1289,18553,16355,3565, -16605,21616,5326,5451,13240,13802,13619,2711,15246,15234, -13803,12205,8685,18561,3522,20817,11914,9109,13419,17244, -7939,11219,4328,2922,14191,15318,20350,12042,9641,15545, -6359,20965,16202,17095,16606,13043,15730,20641,4329,11939, -13563,20368,16752,14349,8638,13804,13990,2234,15265,8122, -2685,2894,5849,4775,3702,12812,15070,9770,2475,2568, -5649,10429,10303,21619,5080,6428,20369,13046,15531,6487, -11516,7546,5720,19339,1004,20987,11782,10745,2253,8795, -2767,14353,16042,7675,2169,12884,1662,7594,18566,5458, -12885,6974,12417,9313,4151,17301,13910,5783,20142,19007, -17213,2477,11592,6276,5697,3272,11727,9998,20770,6709, -7682,7117,2025,15459,3406,1797,2375,8390,17435,1358, -4973,21451,16175,12569,13241,4148,6463,7683,15325,13131, -16643,7435,19378,11574,10380,21452,20254,12571,2992,6993, -3467,14090,13276,7756,8860,3388,17543,18699,1043,8324, -18700,4343,10993,11066,7118,15364,3531,9246,8267,18656, -13908,18715,18711,11688,6903,7819,1717,11833,5263,21005, -7817,9093,11343,7524,17550,9943,15396,1121,15086,10320, -10570,13706,21006,18513,9453,1932,14761,3157,11732,17259, -8542,9676,9130,6569,19320,10343,10265,12893,12894,12899, -9215,17174,19266,10930,2173,19321,3154,17554,14359,10645, -10933,11077,2580,20146,10544,15397,9698,3731,16207,3470, -7698,9252,9704,5767,5771,6957,18101,8654,18849,5096, -1140,12527,3715,8802,11271,16783,6092,2057,2828,5274, -17882,7710,2416,20634,4197,19671,1129,17883,4198,11776, -3738,4188,18970,8713,18381,6958,15960,17494,4200,18478, -17067,11280,873,874,3633,20715,14821,9870,13450,17754, -18870,7685,14235,7686,21462,19040,9775,1521,9528,17504, -17505,18011,12669,12677,8419,20377,20378,1147,19690,9221, -16487,14459,7291,7296,19678,7717,15962,4011,19137,12994, -13466,20429,21443,21447,21453,13211,9972,21463,2846,4106, -21215,7846,5998,12151,19461,11481,12678,12263,10127,4830, -4569,7982,20546,18863,14293,7483,4368,20996,4466,12391, -4467,20414,8881,15223,19646,7123,7156,6895,17513,15764, -15348,3667,17805,2222,18456,14564,11240,11241,16084,2931, -16740,1302,1158,7769,14460,6416,4564,5768,17920,4651, -13221,6324,18251,20273,4565,14437,8285,18467,1742,17981, -12528,20675,10041,6038,11368,1593,17872,6829,21627,14637, -4625,3870,16539,3924,878,1743,983,10210,8927,15794, -14574,6661,17923,8964,8848,7656,7929,20929,15903,6271, -5059,17362,5957,8521,17282,9030,21142,16846,14496,20578, -20579,5961,6045,16271,15748,21444,21722,21126,14210,11681, -16870,12775,20768,18971,961,16277,9958,2268,16325,17473, -4602,17975,18813,20068,6698,17857,11253,18643,19350,14773, -16456,13275,10876,11552,7423,18479,2937,18567,15281,12600, -7676,8573,5236,16622,2324,12813,6052,18393,9649,7183, -10986,20150,17598,6053,11393,3076,11708,20482,6787,5977, -17968,2874,9874,15444,8023,12418,9973,16994,19027,7189, -6675,3350,18695,18696,9655,15420,15927,17477,4639,14429, -20556,6027,19041,17388,17691,14198,7688,1278,8067,18405, -911,18712,13881,11019,9668,2434,8943,3863,3864,18635, -6920,10483,13827,10236,10646,10545,14163,15526,18355,21216, -19936,18904,6325,14734,2028,14470,20288,1984,17891,6772, -19191,13158,4664,12324,1141,10042,4606,13468,11921,15795, -9298,21708,11298,6609,16087,12635,19232,21586,16342,15928, -9305,9330,10237,12445,14794,15622,13718,1053,4209,3505, -9582,13370,8108,1407,2494,3042,13898,12854,19565,16680, -18079,4479,21541,13747,16113,3668,10797,2553,18905,5077, -5370,18773,7584,14171,16293,8133,10798,16977,19860,4621, -3922,17141,2932,14727,6475,17634,11859,2753,15018,19951, -7925,6942,10831,1438,984,4672,18918,4818,11541,6417, -18159,3988,17654,18530,4279,20540,20056,21718,14461,3671, -10325,15019,11542,17145,14990,16978,5598,4878,11369,18930, -18674,18679,14638,11766,1414,18789,11678,9105,6085,12036, -4480,21036,3332,3009,18518,4822,14731,14306,15021,14376, -11545,19408,20921,20314,3416,5467,12563,990,4879,1816, -4233,1400,20361,14991,21256,12130,14627,5599,2118,18599, -8149,10174,10898,9600,13786,20199,13996,19405,18087,12800, -20626,18797,17351,20707,9612,14076,8590,1730,13728,1115, -13729,1765,21485,2719,18941,3049,7472,21719,4379,4400, -19713,4440,5399,20394,9613,19097,18942,14643,4893,13865, -18798,8821,13311,14040,18042,4234,2918,11418,20093,11959, -19223,7782,10175,20449,18088,13977,20635,1287,15839,9083, -8048,1826,1356,13929,16855,9278,10177,4739,12632,16593, -8497,5125,15113,13389,19504,10268,12182,21359,3681,17925, -15994,20213,19535,1457,3622,5928,20813,13761,1314,7409, -6581,16272,11937,7244,15777,7157,17414,10492,8890,2079, -4675,15024,14993,4001,13223,19335,8195,9065,21441,2164, -16441,8049,9485,1732,17122,4802,15566,20941,9154,9720, -21415,9489,12807,1750,10589,3067,12973,12700,1958,2177, -20582,4613,12019,1206,6836,2519,20201,9633,19738,19739, -5551,5813,3967,5172,16326,3257,4489,2466,20454,12776, -19839,18322,19740,13535,18972,13732,12637,21417,4914,9159, -21645,21646,4658,2395,13272,11658,16278,10412,6019,7748, -2723,8257,8226,2520,21758,13002,18147,12304,21445,21499, -1690,12201,3903,2804,2269,10970,6448,7415,5716,17031, -3539,5774,3739,20815,13600,11483,4965,5335,12236,14225, -18807,14390,4216,5014,16457,16361,7297,21587,7347,18814, -16955,18388,18328,7348,19679,6110,16663,12369,1476,18535, -5825,17823,13967,18480,9122,18274,1353,6699,8975,7859, -8976,14937,4748,16173,7052,11471,10877,8831,6364,15860, -19611,19481,3070,17992,18505,20643,12370,18691,7796,18692, -14887,19602,16362,10915,15692,7058,7797,13854,6628,9380, -13564,17332,14606,15409,16542,14408,2779,12309,7300,18998, -20435,4929,11948,11127,5527,7497,15300,18609,14133,19889, -21557,11307,15133,7310,18568,7806,6674,5148,12929,10706, -19890,13809,14585,20820,16547,15861,13805,15490,20380,14943, -14506,8690,16890,5522,12644,5215,15238,12043,15547,5289, -2939,20652,11894,7070,5455,13011,12953,10921,17901,5184, -21420,16154,13096,18523,3721,7301,20976,3526,10222,14042, -16962,6975,9771,6788,19373,12983,5864,5087,5088,16043, -6488,14108,3179,12211,19513,7574,6431,6596,5784,11783, -19008,5199,8631,5725,5726,10747,20588,21351,9382,9302, -2427,3077,9502,17769,13277,14867,15892,5652,20250,15140, -9392,10377,9824,11135,10286,2347,15141,8693,1628,10435, -8123,20614,20325,14755,10748,11476,18525,15782,12212,21285, -14134,13572,7358,3078,6976,18233,18030,4423,18102,20856, -21710,3109,12603,14824,6489,9018,20659,14236,16908,2943, -3767,4430,11338,16764,13698,10016,10150,13104,17305,13956, -4494,20440,9353,20031,14892,4152,2480,15500,11009,15148, -8456,15421,6793,6986,11941,16176,11841,13935,15929,20295, -4689,13329,13672,6191,12935,5489,10184,9364,5200,16995, -14508,21558,14031,7083,3981,7995,7513,2845,3312,14758, -7555,10004,11581,19193,6801,14199,21731,17970,2484,5149, -8239,21734,19042,12606,4757,6738,3493,7196,15214,12496, -2537,2812,21294,6802,7084,7835,7303,14686,7436,13036, -3547,18872,1660,15033,14328,9661,19171,15580,15366,11155, -12734,16046,1734,6907,7202,12892,11690,11836,18759,5223, -7525,19218,11897,13288,18340,12735,11140,20559,5788,2945, -7000,8981,12517,3592,2794,5299,11156,19448,21012,6670, -12895,9430,9397,13995,10385,9669,3158,10527,11228,6814, -11979,10481,21007,5204,4039,19906,9677,4643,21465,15088, -9750,7602,2798,13302,21190,10348,18289,9683,21191,2458, -7824,4352,15099,6508,11800,19802,10238,9134,7646,17260, -5738,8268,17458,10103,19270,7384,19200,19492,19326,17341, -11884,1869,2211,9222,8270,14857,14362,21736,3113,13582, -13493,2022,8170,19809,10630,9701,3160,10546,3472,8481, -18296,9253,9228,21217,9411,9575,1108,11572,19816,10106, -5687,6517,12857,17808,2331,2825,12804,8582,18943,8415, -17025,17875,6069,9000,9273,8891,14905,862,17820,2629, -13239,8606,8893,8608,2873,5568,19113,19613,17429,18697, -16694,15460,7948,11973,6343,15695,6518,17833,12166,16996, -17502,17837,16910,9776,2847,19043,4350,19637,2994,6526, -1911,1912,8286,12915,2596,14082,2630,14086,21061,15203, -15204,9650,20251,19624,9656,5733,4287,20567,11361,11362, -18595,14464,17876,8421,12838,13390,15114,13269,18973,15961, -18686,1977,6837,3849,20653,20047,16543,2763,15696,7949, -14264,19168,3788,8162,9019,3165,3389,4080,7556,9803, -1719,4040,7378,7385,21257,13293,18956,14123,8704,13125, -18554,18129,6773,13628,6970,11974,6737,4103,18760,17463, -5637,10935,877,7830,12293,2197,10829,10830,12290,9911, -7237,13997,11460,16169,18089,4401,13794,17235,8221,13391, -4002,11963,12138,8227,4189,1392,14019,10878,14001,14749, -16184,6111,15323,14021,10479,11433,9507,15930,13816,20410, -14071,20411,11022,10386,3868,8398,12785,18461,11633,1712, -14377,12801,16847,13253,18205,3934,18508,20026,20762,1727, -3474,14876,9373,11693,4515,5741,1683,20271,11161,3776, -19946,2881,16244,4518,3320,16111,10794,13371,12447,12849, -16675,16676,16020,8132,20793,20876,12855,8011,8012,13939, -8490,6225,13589,1584,5137,21027,12072,8402,6390,11853, -17866,17869,20007,18302,3413,19454,6411,6881,11856,10893, -11109,2678,12073,1411,20877,12056,21372,20089,10122,20230, -4728,10953,20092,16118,9594,11089,18779,4425,15717,14926, -8925,8085,8177,18919,7234,21033,6746,1340,20232,21196, -19437,5466,6326,12178,3039,2590,15105,2462,14981,8217, -18039,14462,8404,4871,7106,5640,3414,19139,21089,18675, -6685,20127,2505,16388,6308,7465,14994,4376,17705,4881, -14075,20887,19205,16712,8657,10654,967,15679,11417,9442, -18739,11091,13545,12529,17465,17570,15107,8903,13152,8279, -12469,17744,20923,5676,11294,16683,13435,18931,8037,14521, -12239,2224,7927,9925,13383,16435,5925,10806,19465,1821, -3996,6240,18944,19334,9236,5943,9556,5331,9787,2951, -4771,18945,15905,9322,7242,2680,8090,15171,2467,12153, -17283,14440,9076,12453,5958,7977,11723,15972,17490,15872, -4259,16085,9614,14879,14995,9444,14880,4024,20015,6180, -17728,14711,2982,20493,8778,16273,16125,3931,16635,8196, -14343,9816,6833,15317,13154,3556,8372,5511,5858,5962, -21099,12232,6046,2264,12633,4546,2598,10405,8222,9445, -20611,12476,15747,19725,11655,10406,11118,8050,10058,10587, -13473,19726,11725,1619,6334,19837,9155,13254,12949,20890, -19184,1827,1343,19832,16603,13965,4583,19833,8711,7158, -14344,14079,12690,12343,16858,19835,13840,6589,7416,11927, -13397,15856,4743,16636,15639,16356,13868,2066,6099,18323, -6248,11097,10835,19230,18324,6210,14493,10943,20116,6845, -11533,5758,2653,4321,9791,12808,12809,10910,15727,3118, -16401,1969,6764,1831,17856,7060,7411,4788,18974,19208, -14577,7749,20638,15453,19603,1467,11277,14526,15975,14474, -19414,8228,3968,16054,7670,13398,15464,10220,6896,19874, -11559,1178,19508,13557,21347,9845,2178,17201,2956,6144, -21500,10759,19295,9119,4744,10277,16402,17092,19296,12506, -7940,5777,15282,19885,9727,18607,11004,21405,2527,15381, -3290,16203,5419,14055,20320,14581,10603,10688,16363,20117, -16802,16544,13006,20243,14529,871,20023,19114,15127,15290, -14530,863,12065,2837,16620,2011,11220,5286,6049,6673, -17036,3626,20966,19240,7798,5258,15176,7713,6775,19158, -5194,14849,2958,17495,19750,17782,6429,1478,1624,20977, -7595,8809,14451,14261,11128,1000,10375,6397,19441,2235, -4533,19372,5803,10762,13286,19619,7174,18171,2345,16989, -7175,10304,10223,7907,5850,3102,20854,5089,13030,7718, -3071,2961,16044,11996,15605,18664,16959,11129,15491,14262, -5975,9728,16204,2609,5113,12206,21572,8630,12187,20495, -2697,17902,6879,7499,18230,2902,9861,3185,15650,7549, -3103,19341,6258,17658,14820,5650,3104,9047,17903,20978, -12349,8444,7722,12508,3487,6789,7811,16761,12009,7075, -16410,15146,12956,17045,17046,15253,4178,11286,13955,15142, -20657,3105,18999,20988,16237,15394,18100,9013,18645,16007, -13982,6167,1505,2192,14780,12602,9969,16411,14095,14088, -2534,8099,6491,7629,9363,3218,6277,5938,20028,10192, -6278,4935,6054,6122,17214,7503,14197,17047,1038,10378, -11848,19634,10003,14486,3458,6599,20255,17604,19780,14681, -18024,10085,10782,21520,19379,6794,1994,9801,3768,18707, -6550,20660,10783,3407,19029,15210,12351,8325,15326,13215, -21459,11877,5833,7953,12165,14091,7085,16516,2810,15332, -15034,15884,14092,21234,9744,11102,14544,14825,11137,11849, -19312,19313,11017,7959,12732,7197,21716,16667,15553,19197, -19128,4133,3029,6904,13300,9261,8537,885,16413,1701, -5533,12941,19314,1702,9094,4642,2014,10888,7526,16478, -10666,20155,10454,9662,19447,18514,10384,15013,20997,19355, -4038,16334,6715,17614,12048,14432,1638,2200,11226,10159, -7375,14097,2539,5536,1706,6914,17311,10344,13242,13826, -9678,8070,17452,19323,15190,16484,6507,18047,21188,10232, -9181,4137,4537,6383,9182,14762,10097,19324,11103,7217, -9806,7528,19267,9986,19065,7382,2210,3359,13676,7450, -9216,4504,14870,19851,21470,4763,14360,9433,9217,3112, -13491,19388,12943,4452,8473,18429,19327,13983,20164,10547, -18419,9534,11105,14250,15398,3471,7699,2249,19329,6064, -21214,9266,9226,11577,16241,10551,18111,17265,18432,5152, -18436,19820,5668,17394,17395,6679,6203,21322,20357,17563, -2639,20109,12794,21034,4673,11860,16561,12560,18920,12254, -8580,12058,8581,12097,11457,9905,5670,17663,5671,5672, -1567,3282,17079,20734,21198,8710,20525,4882,1078,17571, -17572,10118,21411,12108,15354,18500,15887,14207,16389,6658, -21091,7657,17877,6186,13592,6579,17760,17761,17236,19142, -16686,21093,18548,14644,16345,15906,18043,20114,8583,17083, -17974,20736,12532,6727,5679,2381,6689,2412,6757,9927, -4902,8091,2382,12596,15840,21435,15874,5886,9299,14182, -17884,2650,13795,6355,16860,14740,6143,18051,8837,8422, -17415,16861,21360,8525,3682,17580,7053,16793,10493,18376, -8223,10013,9039,6857,16088,16871,3203,16719,6211,8304, -4966,16661,3068,4789,12481,13316,13966,16872,13317,17669, -18975,7618,19741,5182,12305,5517,16327,14475,5569,14290, -14291,11634,5336,16357,2424,6147,8993,21062,17068,6700, -4790,9796,17681,7671,1479,19233,21230,16458,16032,14211, -16885,11929,11930,2182,18227,8092,8097,10963,16505,20340, -7936,13322,13855,6591,4490,13402,15205,18481,9934,7752, -20216,5570,19990,11554,14664,9847,5456,15492,2357,4362, -1842,6667,17539,17041,16805,19992,6118,6149,16892,20027, -11515,14213,13323,18623,11130,9732,19304,16753,5408,18394, -13052,1494,1629,3079,10436,7359,10287,12213,15178,19011, -15893,8445,21592,6432,18822,20989,16509,10181,5978,11975, -13712,8098,9051,3163,20296,7366,16912,16913,19012,17503, -2668,6635,2240,18698,18103,18400,18104,13075,8536,3573, -4179,14399,7632,4690,14958,19781,9974,8100,14299,4691, -18105,9258,10947,15533,19030,8101,10987,8024,8025,19309, -19044,18025,9206,15383,1996,16919,13631,21622,9751,6739, -21208,10093,16371,19045,17549,20557,6803,3299,11934,1757, -13882,6156,18066,7961,2742,3549,18631,6157,9262,1641, -13824,9670,11406,13972,10528,9131,992,18071,8944,14917, -9891,9684,10349,8463,9900,18415,16939,17617,10239,18716, -1999,13688,19981,9263,3114,2702,5658,8338,2392,11075, -15527,9264,21218,9254,10107,19822,20533,20731,12109,2465, -16403,5936,8446,18652,21685,4404,2899,8671,20171,3850, -13012,19374,13037,12060,2338,7339,2893,19614,20341,1553, -1200,1843,2895,19515,4041,2471,11852,8109,15294,13748, -10790,4544,5162,18363,5246,1303,14992,19530,5248,11439, -3653,13599,13548,21566,10808,8760,12870,9490,12552,5173, -15593,1345,13558,2957,7254,4749,8686,8229,2786,17042, -1329,10661,7863,10679,14022,16510,9508,4153,15931,13105, -16920,9671,4042,9945,12024,12395,1866,16940,2714,16419, -13701,2715,1072,7105,2148,21426,5242,8645,1807,6302, -18190,19135,4458,21357,8910,21070,11455,12255,8219,18780, -17675,16139,10039,12256,11676,18596,19523,18040,3396,1811, -23007,23008,23009,23010,23011,23012,23013,23014,23015,23016, -23017,23018,23019,23020,23021,23022,23023,23024,23025,23026, -23027,23028,23029,23030,23031,23032,23033,23034,23035,23036, -23037,23038,23039,23040,23041,23042,23043,23044,23045,23046, -23047,23048,23049,23050,23051,23052,23053,23054,23055,23056, -23057,23058,23059,23060,23061,23062,23063,23064,23065,23066, -23067,23068,23069,23070,23071,23072,23073,23074,23075,23076, -23077,23078,23079,23080,23081,23082,23083,23084,23085,23086, -23087,23088,23089,23090,23091,23092,23093,23094,23095,23096, -23097,23098,23099,23100,23101,23102,11,34,37,328, -70,72,68,118,23934,6,66,74,330,75, -76,77,78,109,112,88,90,92,94,96, -98,100,102,114,115,104,106,131,132,133, -151,143,144,136,135,146,145,134,152,137, -165,142,140,167,124,147,148,158,155,154, -153,138,157,163,164,159,160,431,150,149, -339,338,327,79,80,443,18,323,321,322, -331,325,491,335,336,176,178,177,175,174, -169,168,171,170,332,185,189,183,187,334, -23103,23104,23105,23106,23107,23108,23109,23110,23111,23112, -23113,23114,23115,23116,23117,23118,23119,23120,23121,23122, -23123,23124,23125,23126,23127,23128,23129,23130,23131,23132, -23133,23134,23135,23136,23137,23138,23139,23140,23141,23142, -23143,23144,23145,23146,23147,23148,23149,23150,23151,23152, -23153,23154,23155,23156,23157,23158,23159,23160,23161,23162, -23163,23164,23165,23166,23167,23168,23169,23170,23171,23172, -23173,23174,23175,23176,23177,23178,23179,23180,23181,23182, -23183,23184,23185,23186,23187,23188,23189,23190,23191,23192, -23193,23194,23195,23196,23197,23198,345,352,359,366, -373,380,387,394,401,407,23679,23680,23681,23682, -23683,23684,344,351,358,365,372,379,386,393, -400,406,410,413,416,418,420,422,424,426, -428,430,343,350,357,364,371,378,385,392, -399,405,409,412,415,417,419,421,423,425, -427,429,342,349,356,363,370,377,384,391, -398,404,23685,23686,18727,4412,14015,14972,16730,10188, -12616,1048,8127,14553,23687,23688,346,353,360,367, -374,381,388,395,402,408,411,414,23689,23690, -23199,23200,23201,23202,23203,23204,23205,23206,23207,23208, -23209,23210,23211,23212,23213,23214,23215,23216,23217,23218, -23219,23220,23221,23222,23223,23224,23225,23226,23227,23228, -23229,23230,23231,23232,23233,23234,23235,23236,23237,23238, -23239,23240,23241,23242,23243,23244,23245,23246,23247,23248, -23249,23250,23251,23252,23253,23254,23255,23256,23257,23258, -23259,23260,23261,23262,23263,23264,23265,23266,23267,23268, -23269,23270,23271,23272,23273,23274,23275,23276,23277,23278, -23279,23280,23281,23282,23283,23284,23285,23286,23287,23288, -23289,23290,23291,23292,23293,23294,13,14,16,324, -20,22,1,24,27,30,121,32,3,36, -38,340,341,348,355,362,369,376,383,390, -397,40,43,126,128,130,45,47,432,439, -441,447,449,456,459,462,464,470,472,477, -481,487,492,498,500,502,504,506,509,520, -522,524,526,528,48,50,51,52,53,57, -433,440,442,448,450,457,460,463,465,471, -473,478,482,488,493,499,501,503,505,507, -510,521,523,525,527,529,60,62,64,69, -23295,23296,23297,23298,23299,23300,23301,23302,23303,23304, -23305,23306,23307,23308,23309,23310,23311,23312,23313,23314, -23315,23316,23317,23318,23319,23320,23321,23322,23323,23324, -23325,23326,23327,23328,23329,23330,23331,23332,23333,23334, -23335,23336,23337,23338,23339,23340,23341,23342,23343,23344, -23345,23346,23347,23348,23349,23350,23351,23352,23353,23354, -23355,23356,23357,23358,23359,23360,23361,23362,23363,23364, -23365,23366,23367,23368,23369,23370,23371,23372,23373,23374, -23375,23376,23377,23378,23379,23380,23381,23382,23383,23384, -23385,23386,23387,23388,23389,23390,645,647,649,651, -653,655,658,660,662,664,667,669,671,673, -675,677,680,682,684,686,688,690,692,694, -696,698,700,702,704,706,708,710,712,714, -716,718,720,722,724,726,728,730,732,734, -736,738,740,742,744,746,748,750,752,754, -756,758,760,762,764,766,768,770,772,774, -776,778,780,782,784,786,788,790,792,794, -796,798,800,802,804,806,808,810,812,23691, -23692,23693,23694,23695,23696,23697,23698,23699,23700,23701, -23391,23392,23393,23394,23395,23396,23397,23398,23399,23400, -23401,23402,23403,23404,23405,23406,23407,23408,23409,23410, -23411,23412,23413,23414,23415,23416,23417,23418,23419,23420, -23421,23422,23423,23424,23425,23426,23427,23428,23429,23430, -23431,23432,23433,23434,23435,23436,23437,23438,23439,23440, -23441,23442,23443,23444,23445,23446,23447,23448,23449,23450, -23451,23452,23453,23454,23455,23456,23457,23458,23459,23460, -23461,23462,23463,23464,23465,23466,23467,23468,23469,23470, -23471,23472,23473,23474,23475,23476,23477,23478,23479,23480, -23481,23482,23483,23484,23485,23486,644,646,648,650, -652,654,657,659,661,663,666,668,670,672, -674,676,679,681,683,685,687,689,691,693, -695,697,699,701,703,705,707,709,711,713, -715,717,719,721,723,725,727,729,731,733, -735,737,739,741,743,745,747,749,751,753, -755,757,759,761,763,765,767,769,771,773, -775,777,779,781,783,785,787,789,791,793, -795,797,799,801,803,805,807,809,811,656, -665,678,23702,23703,23704,23705,23706,23707,23708,23709, -23487,23488,23489,23490,23491,23492,23493,23494,23495,23496, -23497,23498,23499,23500,23501,23502,23503,23504,23505,23506, -23507,23508,23509,23510,23511,23512,23513,23514,23515,23516, -23517,23518,23519,23520,23521,23522,23523,23524,23525,23526, -23527,23528,23529,23530,23531,23532,23533,23534,23535,23536, -23537,23538,23539,23540,23541,23542,23543,23544,23545,23546, -23547,23548,23549,23550,23551,23552,23553,23554,23555,23556, -23557,23558,23559,23560,23561,23562,23563,23564,23565,23566, -23567,23568,23569,23570,23571,23572,23573,23574,23575,23576, -23577,23578,23579,23580,23581,23582,530,532,534,536, -538,540,542,544,546,548,550,552,554,556, -558,560,562,564,566,568,570,572,574,576, -23710,23711,23712,23713,23714,23715,23716,23717,531,533, -535,537,539,541,543,545,547,549,551,553, -555,557,559,561,563,565,567,569,571,573, -575,577,23718,23719,23720,23721,23722,23723,23724,25, -28,110,113,89,91,93,95,97,99,101, -103,23725,23726,105,107,61,65,8,23727,82, -87,23728,23729,23730,23731,23732,23733,23734,23735,23736, -23583,23584,23585,23586,23587,23588,23589,23590,23591,23592, -23593,23594,23595,23596,23597,23598,23599,23600,23601,23602, -23603,23604,23605,23606,23607,23608,23609,23610,23611,23612, -23613,23614,23615,23616,23617,23618,23619,23620,23621,23622, -23623,23624,23625,23626,23627,23628,23629,23630,23631,23632, -23633,23634,23635,23636,23637,23638,23639,23640,23641,23642, -23643,23644,23645,23646,23647,23648,23649,23650,23651,23652, -23653,23654,23655,23656,23657,23658,23659,23660,23661,23662, -23663,23664,23665,23666,23667,23668,23669,23670,23671,23672, -23673,23674,23675,23676,23677,23678,578,580,582,584, -586,588,590,592,594,596,598,600,602,604, -606,608,610,612,614,616,618,620,622,624, -626,628,630,632,634,636,638,640,642,23737, -23738,23739,23740,23741,23742,23743,23744,23745,23746,23747, -23748,23749,23750,23751,579,581,583,585,587,589, -591,593,595,597,599,601,603,605,607,609, -611,613,615,617,619,621,623,625,627,629, -631,633,635,637,639,641,643,23752,23753,23754, -23755,23756,23757,23758,23759,23760,23761,23762,23763,23764, -71,58,73,5,7,329,81,446,458,190, -184,186,188,123,139,141,156,161,162,166, -197,204,209,210,211,217,218,219,225,226, -227,233,234,235,245,246,247,256,257,258, -267,268,269,278,279,280,297,298,299,212, -220,236,228,300,301,302,303,307,309,311, -313,315,317,319,318,316,314,312,310,308, -304,320,305,306,172,173,179,180,181,182, -337,122,333,116,117,23765,23766,23767,23768,23769, -23770,23771,23772,23773,23774,23775,437,434,436,435, -455,451,454,452,469,466,468,467,497,494, -496,495,515,511,514,512,519,516,518,517, -513,453,438,23776,489,490,23777,461,23778,23779, -23780,23781,813,814,815,816,817,818,819,820, -821,822,823,824,825,826,827,828,829,830, -831,832,833,834,835,836,837,838,839,840, -841,842,843,844,845,846,847,848,849,23782, -23783,23784,23785,23786,23787,23788,23789,23790,23791,23792, -23793,23794,23795,23796,23797,23798,23799,23800,23801,23802, -347,354,361,368,375,382,389,396,403,20773, -484,474,486,445,475,483,444,476,479,480, -485,41,326,67,23803,508,21167,23804,4,23805, -23806,23807,23935,9,10,23936,23937,119,23938,23939, -83,84,85,86,54,55,56,31,33,35, -42,39,44,12,23,26,59,63,108,111, -15,21,29,120,2,125,129,127,49,17, -19,46,23808,23809,23810,23811,23812,23813,23814,23815, -23816,23817,23818,23819,23820,0,23821,23822,23823,23824, -23825,23826,23827,23828,23829,23830,23831,23832,23833,191, -192,198,199,193,194,200,201,195,196,202, -203,205,206,207,208,213,214,215,216,221, -222,223,224,229,230,231,232,237,238,239, -240,241,242,243,244,248,249,250,251,252, -253,254,255,259,260,261,262,263,264,265, -266,270,271,272,273,274,275,276,277,281, -282,283,284,285,286,287,288,289,290,291, -292,293,294,295,296,23834,23835,23836,23837,23838, -23839,23840,23841,23842,23843,23844,23845,23846,23847,23848, -8829,17231,6535,6086,20542,7042,18120,14179,15314,15901, -9317,10807,16850,17084,1310,20931,18257,14124,5959,7983, -12018,4587,17416,1130,12691,1620,19209,9156,7333,12998, -9036,18384,21630,20942,20743,18167,9930,2092,21583,5037, -4745,16637,19875,2869,16031,18206,17531,7250,1549,19478, -18563,15235,1836,11304,15065,10689,19887,3315,19763,14531, -6021,13003,18986,20644,2012,6025,10777,7575,11431,2185, -1002,5217,3180,1359,1506,1495,6633,1901,9970,17909, -15926,18626,14914,17436,14719,4149,7725,5316,8386,4033, -6795,8879,17252,17253,11834,1558,21785,21786,21787,21788, -21789,21790,21791,21792,21793,21794,21795,21796,21797,21798, -21799,21800,21801,21802,21803,21804,21805,21806,21807,21808, -21809,21810,21811,21812,21813,21814,21815,21816,21817,21818, -21819,21820,21821,21822,21823,21824,21825,21826,21827,21828, -21829,21830,21831,21832,21833,21834,21835,21836,21837,21838, -21839,21840,21841,21842,21843,21844,21845,21846,21847,21848, -21849,21850,21851,21852,21853,21854,21855,21856,21857,21858, -21859,21860,21861,21862,21863,21864,21865,21866,21867,21868, -21869,21870,21871,21872,21873,21874,21875,21876,21877,21878, -6905,11896,11018,9944,11594,5692,14720,10345,15311,17313, -11073,13677,11600,10627,17262,12754,8479,11208,21486,10333, -15102,13369,5048,9375,1054,6226,3669,2883,5098,19567, -12765,19568,2317,6231,16742,4819,7847,18193,10973,1202, -19952,8405,20040,8406,7324,3397,12430,12996,18932,951, -12470,4883,17960,3000,5431,7289,14307,3007,13669,14466, -14378,15344,21686,10176,1444,20623,7883,7706,7474,9616, -5680,17147,21094,18216,17786,18471,17853,15109,13192,19144, -18090,1242,17380,17085,5708,2681,17878,12154,9347,3452, -19224,16567,4261,2513,15633,16750,21879,21880,21881,21882, -21883,21884,21885,21886,21887,21888,21889,21890,21891,21892, -21893,21894,21895,21896,21897,21898,21899,21900,21901,21902, -21903,21904,21905,21906,21907,21908,21909,21910,21911,21912, -21913,21914,21915,21916,21917,21918,21919,21920,21921,21922, -21923,21924,21925,21926,21927,21928,21929,21930,21931,21932, -21933,21934,21935,21936,21937,21938,21939,21940,21941,21942, -21943,21944,21945,21946,21947,21948,21949,21950,21951,21952, -21953,21954,21955,21956,21957,21958,21959,21960,21961,21962, -21963,21964,21965,21966,21967,21968,21969,21970,21971,21972, -16716,2510,8526,10903,1315,15875,17286,2830,5964,17964, -18262,17987,17789,4903,16862,10059,9624,7886,15277,4741, -16257,3760,12433,20430,14083,11250,19742,9160,11251,14501, -16404,15749,2834,1377,2472,4330,2270,1378,10413,5626, -3784,1321,12999,21418,13200,4454,7888,4062,7860,6701, -19680,10917,2940,17937,15646,17682,3347,13842,11254,7350, -16459,13920,6592,17537,2863,7424,21326,2323,9797,13565, -4098,18168,6630,10141,14536,13811,15283,18569,16545,16756, -20654,7945,19306,10691,15548,10144,9651,9282,15761,13013, -3229,8438,20536,1694,14752,2296,21973,21974,21975,21976, -21977,21978,21979,21980,21981,21982,21983,21984,21985,21986, -21987,21988,21989,21990,21991,21992,21993,21994,21995,21996, -21997,21998,21999,22000,22001,22002,22003,22004,22005,22006, -22007,22008,22009,22010,22011,22012,22013,22014,22015,22016, -22017,22018,22019,22020,22021,22022,22023,22024,22025,22026, -22027,22028,22029,22030,22031,22032,22033,22034,22035,22036, -22037,22038,22039,22040,22041,22042,22043,22044,22045,22046, -22047,22048,22049,22050,22051,22052,22053,22054,22055,22056, -22057,22058,22059,22060,22061,22062,22063,22064,22065,22066, -9052,21308,3080,18756,12724,8021,20202,13409,1006,9772, -10979,19169,6464,16517,16723,3574,17793,20297,18106,13480, -3494,9975,9876,13330,15149,5727,8026,4496,7891,10151, -6988,6796,8027,912,20204,3459,7689,5816,15446,6804, -6553,14096,15216,15737,2813,19638,7962,10346,1705,14771, -21717,9211,17004,7203,17971,13927,16668,5090,9398,4043, -9679,21013,13850,9709,20158,13332,15702,5736,15188,9135, -10240,10350,9685,9265,19271,11078,17342,13335,5659,3552, -20166,6564,1812,1822,20848,9705,14696,17347,13055,1161, -12167,4566,3398,4797,11233,16212,22067,22068,22069,22070, -22071,22072,22073,22074,22075,22076,22077,22078,22079,22080, -22081,22082,22083,22084,22085,22086,22087,22088,22089,22090, -22091,22092,22093,22094,22095,22096,22097,22098,22099,22100, -22101,22102,22103,22104,22105,22106,22107,22108,22109,22110, -22111,22112,22113,22114,22115,22116,22117,22118,22119,22120, -22121,22122,22123,22124,22125,22126,22127,22128,22129,22130, -22131,22132,22133,22134,22135,22136,22137,22138,22139,22140, -22141,22142,22143,22144,22145,22146,22147,22148,22149,22150, -22151,22152,22153,22154,22155,22156,22157,22158,22159,22160, -6350,18790,1138,8373,2289,2560,10201,3484,11035,21378, -12482,1554,21148,10202,3018,19241,12814,17208,10305,3708, -11976,21309,10017,16765,3445,16627,19259,18343,15724,5934, -2291,13265,14383,2227,2228,13930,15091,14397,10393,4786, -20334,4856,12451,3878,13590,10995,1440,8146,15241,10123, -11440,20011,4884,5330,7849,4885,15720,11441,15587,7543, -16196,4895,11547,11444,11445,2058,15723,5061,1451,3266, -20943,10563,12032,18741,6481,19604,19605,11447,8527,18957, -10129,3842,6483,3455,21380,7592,2530,2325,16105,9393, -2111,10152,3859,10020,7559,2744,22161,22162,22163,22164, -22165,22166,22167,22168,22169,22170,22171,22172,22173,22174, -22175,22176,22177,22178,22179,22180,22181,22182,22183,22184, -22185,22186,22187,22188,22189,22190,22191,22192,22193,22194, -22195,22196,22197,22198,22199,22200,22201,22202,22203,22204, -22205,22206,22207,22208,22209,22210,22211,22212,22213,22214, -22215,22216,22217,22218,22219,22220,22221,22222,22223,22224, -22225,22226,22227,22228,22229,22230,22231,22232,22233,22234, -22235,22236,22237,22238,22239,22240,22241,22242,22243,22244, -22245,22246,22247,22248,22249,22250,22251,22252,22253,22254, -12354,3866,3867,7773,3417,14744,20979,11522,1412,5163, -21124,17120,17806,2446,18041,12674,17062,3191,1445,21628, -18004,20808,4436,20891,4630,8185,14183,11699,15601,15889, -7738,16442,6730,15388,2651,10960,8055,17418,15976,10812, -17419,15158,12565,4201,14713,18987,1369,20510,5627,10676, -9961,7166,15752,935,2656,1481,11255,4114,8681,18181, -3134,14449,21064,20980,19764,4751,18483,2428,15999,5830, -16571,6595,8842,19119,8448,16903,5616,19013,2896,6780, -11925,3722,20516,14453,3142,19031,21634,15089,14093,3815, -10313,10314,13216,4943,9879,13106,22255,22256,22257,22258, -22259,22260,22261,22262,22263,22264,22265,22266,22267,22268, -22269,22270,22271,22272,22273,22274,22275,22276,22277,22278, -22279,22280,22281,22282,22283,22284,22285,22286,22287,22288, -22289,22290,22291,22292,22293,22294,22295,22296,22297,22298, -22299,22300,22301,22302,22303,22304,22305,22306,22307,22308, -22309,22310,22311,22312,22313,22314,22315,22316,22317,22318, -22319,22320,22321,22322,22323,22324,22325,22326,22327,22328, -22329,22330,22331,22332,22333,22334,22335,22336,22337,22338, -22339,22340,22341,22342,22343,22344,22345,22346,22347,22348, -10154,9331,17220,4640,3390,19213,6155,17221,5617,16373, -11889,19795,16417,19383,9428,9663,14784,3446,10006,10007, -1681,7210,2577,18515,7757,20761,10891,9692,6922,9185, -7009,17978,19348,19201,19392,15399,3732,10647,10554,10555, -1775,1778,1079,4426,4427,13140,1389,20208,10861,11998, -3040,10047,11370,7043,12233,5191,4263,5968,1468,2727, -12976,875,17476,6055,6676,6056,20256,3188,6057,17480, -18701,6059,7691,916,17694,6671,9686,12406,6134,7731, -5119,12121,13399,13620,20323,5528,8503,8504,21150,20327, -20328,20443,4044,12766,19283,1286,852,851,860,861, -857,859,858,868,876,882,881,891,901,893, -896,941,928,924,955,966,974,965,970,969, -979,982,985,987,993,1005,1009,1023,1031,1033, -1042,1041,1058,1061,1052,1051,1055,1062,1047,1059, -1050,1076,1084,1093,1090,12005,1094,1105,1098,1096, -1111,1114,1112,1120,1113,1126,1127,1131,1145,1142, -1146,1139,1143,1144,1159,1160,1172,1175,1171,1183, -1170,1169,1176,1184,1187,1189,1199,1201,1197,1205, -1214,1203,1215,1204,1208,1223,1224,1220,1230,1780, -20526,6087,6094,1781,16266,19553,4527,4967,13400,3540, -10420,20432,9504,7908,17904,7356,12044,942,10339,17862, -21113,3495,947,5537,9687,5138,16340,12795,19913,15721, -17636,17023,4733,11245,11295,14640,20012,12031,4567,10866, -17275,14645,18444,20737,18600,14384,6887,3311,20680,8930, -8186,14441,10957,11371,21261,20628,14646,3832,11700,21568, -2356,1747,11093,10214,15909,3871,3683,11623,11299,17988, -20709,18472,11377,21078,11372,10912,13094,5969,6565,2548, -3240,8376,4264,10760,17289,16874,9077,14212,15753,5814, -16235,9473,14665,13324,9935,20751,1853,1236,1240,1243, -1239,1237,1262,1261,1273,1263,1270,1279,1285,1290, -1288,1284,1295,1323,1305,1297,1306,1308,1298,1301, -1319,1320,1311,1339,1350,1349,1357,1364,1365,1373, -1380,1387,1381,1393,1402,1405,1423,1417,1413,1496, -1483,1501,1429,1449,1443,1427,1433,1480,1430,1456, -1493,1428,1488,1511,1523,1519,1448,1563,1546,1550, -1568,1569,1590,1591,1580,1605,1606,1608,1598,1615, -1614,1630,1654,1666,1665,1672,1680,1687,1689,1700, -1691,1686,1713,1729,1728,1744,1735,1740,1746,1745, -9494,9172,15206,8380,12347,6839,10421,5195,21127,19620, -6840,10704,17125,17716,6705,5815,20118,2971,7351,10964, -6291,17939,15762,17905,4443,16666,5780,11053,16623,8812, -3489,2399,13325,11395,4702,20257,20518,19032,3789,8796, -11396,14893,3085,10290,2572,10750,5728,6600,14894,16921, -12586,14430,9909,2391,7518,18702,17913,11423,5785,7519, -18713,917,6810,7442,20560,10929,2758,14072,11842,18068, -18634,6910,11023,11157,12440,11158,9431,8945,17951,11159, -6923,10352,11028,10241,5660,10767,17006,15528,8622,21239, -13193,19743,14907,20244,8482,14416,1766,1758,1779,1791, -1798,1776,1785,1777,1829,1815,1835,1825,1844,1805, -1809,1828,1790,1845,1830,1810,1808,1898,1894,1897, -1896,1920,1904,1905,1908,1929,1919,1910,1931,1938, -1944,1940,1939,1941,1953,1956,1946,1951,1957,1959, -1972,1962,1975,1974,1976,1983,1991,2004,2007,2000, -2003,2021,2026,2027,2034,2029,2041,2052,2067,2051, -2050,2055,2083,2088,2105,2094,2119,2120,2117,2128, -2122,2127,2137,2142,2139,2145,2150,2152,2166,2165, -2186,2180,2175,2183,2229,2220,2230,2255,2261,2265, -6285,19332,21100,7690,20298,19940,1104,3897,12790,21542, -16782,20568,8817,5164,3370,8409,9603,4823,16562,4280, -8624,20888,7851,1685,4297,20569,15195,16213,7878,11373, -8187,19715,10638,16144,4306,11446,21225,11910,12454,10048, -12122,9378,1782,12534,19430,8931,8759,13555,21171,5682, -4313,12839,10408,16443,895,17287,18263,12184,9348,6244, -13270,16498,13091,2089,8761,13614,2252,9283,6212,19606, -17421,17093,1207,10269,19415,2371,2385,18385,14130,9067, -5518,2090,6449,10371,2437,11932,15030,21448,8763,18329, -21381,8779,2528,12708,21631,13294,2306,2285,2287,2278, -2286,2281,2305,2310,2318,2321,2319,2335,2328,2332, -2342,2346,2348,2340,2354,2355,2364,2373,2388,2384, -2378,2389,2394,2404,2407,2403,2417,2405,2406,2408, -2449,2445,2478,2447,2501,2536,2493,2495,2507,2521, -2518,2535,2498,2496,2545,2546,2550,2551,2569,2592, -2597,2585,2588,2584,2586,2625,2620,2618,2614,2640, -2648,2638,2646,2675,2676,2693,2694,2703,2709,2733, -2724,2735,2728,2726,2729,2716,2721,2756,2750,2760, -2766,2764,2791,2774,2796,2778,2785,2775,2772,2808, -9962,8501,1793,11256,7352,6148,13621,9465,19159,16754, -12709,10591,11591,13923,18276,3907,16152,19236,8734,16465, -14913,20655,4100,17099,3488,15648,11612,15732,12815,4175, -4752,13629,13069,10692,5387,15143,4269,10146,14954,15497, -6465,12273,8996,15734,17102,12649,9738,16511,20050,4115, -9114,12030,18577,21312,2195,12820,1008,12190,10193,10382, -8620,2903,2441,19121,9424,12390,12821,12822,3181,21599, -2993,10596,6994,14238,9332,20299,7520,17053,3911,3770, -1800,20104,13077,3608,9664,7521,16922,20497,13108,7443, -19791,21391,6128,8738,20260,9454,2803,2805,2851,2836, -2838,2819,2854,2859,2861,2872,2864,2867,2879,2882, -2890,2892,21361,2898,2444,2905,2912,2913,2920,2926, -2915,2933,2938,2963,2950,2954,2948,2974,2976,2983, -3001,3012,3021,3022,3019,3017,3014,3006,3037,3045, -3053,3043,3084,3069,2889,3058,3057,3093,3117,3123, -3141,3143,3130,3153,3164,3162,3177,3170,3171,3196, -3204,3205,3200,3207,3215,3220,3225,3231,3232,3228, -3255,3252,3260,3267,3274,3291,3295,3308,3309,3313, -3317,3318,3354,3329,3333,3319,3335,3342,3330,3344, -7820,2814,18717,13633,3496,18873,12281,12282,19642,12426, -12824,919,8701,7379,19796,13928,12125,3032,1861,18516, -10710,17224,8946,9400,9432,21017,9680,9688,4505,13636, -12126,19272,9693,10242,10243,11408,14858,5661,9223,1934, -18297,13775,19949,15295,10699,17566,18531,12671,1362,4125, -21071,21072,18737,14570,19531,20924,15776,4991,11114,15161, -10955,2151,10494,19666,16717,21262,5755,17086,20809,5232, -5233,14881,7934,14443,5062,9066,3684,15570,5552,5647, -21724,10070,10414,3520,20845,1469,2807,6702,19510,19115, -21507,6897,20646,19928,16720,17245,3331,3372,3367,3364, -3366,3373,3403,3399,3410,3427,3411,3422,3423,3415, -3421,3425,3451,3464,3465,3480,3481,3500,3518,3532, -3515,3513,3519,3512,3534,3545,3535,3541,3537,3562, -3555,3564,3579,3568,3569,3580,3589,3584,3582,3603, -3595,3606,3617,3619,3623,3613,3620,20383,3628,3650, -3648,3663,3693,3685,3674,3666,3677,3692,3723,3716, -3720,3740,3736,3734,3769,3751,3745,3746,3747,3750, -3757,3759,3758,3761,3786,3775,3790,3779,3774,3806, -3801,3802,3805,3821,3820,3854,3858,3824,3836,3848, -18482,20818,18748,10918,14938,3695,1326,20656,19424,7176, -5237,15494,14944,10707,15324,5018,17941,12725,19792,6989, -15008,2196,3441,5786,15217,9568,11879,11071,3533,9672, -19982,20829,20167,9459,13835,17581,15967,13720,21543,2115, -18921,17143,11714,13342,4709,6039,20013,20801,7974,20802, -19709,8836,1177,12259,11650,9619,19466,12260,1823,10049, -11716,21755,20810,8288,6872,15910,20945,6873,6101,19102, -21492,20946,13731,4075,21265,11871,5008,5212,20276,14882, -9068,5127,7987,15640,15996,18209,10599,10423,5555,21760, -21408,1211,6966,20967,9071,9466,3873,3880,3875,3881, -3887,3889,3906,3898,3894,3914,3918,3919,3941,3944, -3948,3957,3950,3955,3949,3958,3978,3987,3984,3990, -3994,3998,4005,3977,4020,4023,4029,4058,4025,4060, -4064,4063,4070,4078,4071,4073,4076,4069,4087,4090, -4101,4091,4092,4094,4111,4123,4119,4120,4145,4141, -4155,4143,4170,4162,4169,4166,4171,4196,4184,4181, -4193,4211,4219,4208,4240,4236,4226,4237,4235,4268, -4257,4267,4255,4273,4251,4256,4305,4286,4293,4326, -4316,4308,4360,4370,4369,4396,4395,4399,4398,4411, -12208,9994,21675,19752,10565,10566,18751,17043,1575,7177, -4930,1497,11949,7753,21065,21589,17827,2452,3542,9799, -21513,19773,17910,20990,5218,5529,13812,15211,13833,7190, -8632,1988,10980,21008,7178,10445,15095,6990,19343,16596, -13353,9102,19033,6642,13165,7119,17444,12587,7635,21421, -15934,21735,10508,15219,11881,14098,6811,13673,11957,19797, -12427,7211,16066,16597,2486,6911,8947,10510,1645,14100, -21422,9542,3161,18186,19547,14379,8015,18615,9318,18601, -1234,1748,16197,21202,7707,3803,16689,5712,2891,18619, -17422,2514,8807,3431,21449,17824,4418,4424,4437,4442, -4433,4432,4439,4449,4453,4469,4456,4459,4468,4492, -4481,4483,4499,4475,4485,4510,4514,4521,4522,4516, -4520,4519,4541,4542,4539,4556,4555,4553,4554,4560, -4561,4563,4575,4585,4578,4580,4576,4600,4608,4609, -4619,4624,4620,4622,4626,4650,4661,4647,4652,4646, -4649,4668,4680,4671,4701,4707,4704,4708,4711,4712, -4721,4731,4730,4750,4737,4747,4722,4732,4740,4772, -4768,4777,4780,4785,4784,4800,4806,4812,4843,4820, -4841,4860,4869,4924,4913,4880,4904,4854,4876,4870, -15094,5614,21419,16641,16205,18210,13326,18578,18579,15799, -2349,15735,3816,8326,9877,16914,16809,8957,2897,20531, -8894,8895,2485,3210,9880,20221,3168,13134,13333,4013, -20225,10266,13170,2820,14560,4986,12858,2826,6236,12675, -6016,14467,4654,11209,13505,21263,10050,10216,1767,1117, -15001,6249,8056,3810,18988,14815,8052,13509,12456,9505, -21320,2086,3575,3219,16224,8072,8612,8073,9377,12194, -2593,10802,21199,16252,7658,15162,13222,18161,21374,19867, -6002,2081,12295,18859,3932,14186,17088,21204,11505,5473, -13155,11275,1226,2061,12156,10060,4894,4901,4919,4912, -4853,4952,4951,4964,4959,4960,4956,4963,4968,4953, -4971,4994,5000,5034,5013,4989,5004,4980,4987,4978, -5016,4982,5006,4979,4983,4981,5015,4984,5045,5044, -5052,5070,5085,5078,5079,5081,5091,5092,5097,5103, -5104,5099,5123,5128,5120,5124,5150,5153,5156,5166, -5165,5160,5159,5158,5180,5181,5201,5187,5190,5198, -5188,5202,5213,5220,5219,5227,5250,5257,5255,5240, -5253,5251,5247,5254,5273,5279,5275,5281,5272,5283, -5313,5308,5309,5317,5319,5320,5332,5327,5329,5344, -11905,4905,4487,5126,4528,14605,10857,14651,13312,11276, -10656,5775,13442,2602,19111,18620,1422,9084,7665,15245, -13869,6960,6007,21081,9161,3454,2069,4838,16000,9495, -9286,8258,5628,7425,5935,15941,17098,20969,2522,15163, -21278,21761,15857,2070,5235,5112,8905,20024,11962,17475, -12547,9163,21648,12021,1499,5314,15358,5600,19556,7357, -20552,6398,20755,14154,21128,10431,9963,8529,4931,20324, -5486,12886,8530,2927,2073,21676,1875,17942,1555,15248, -17248,12492,17686,6371,14539,19939,2941,10524,16696,3945, -14915,7077,7800,17687,10967,4535,5348,5352,5354,5364, -5369,5368,5376,5379,5371,5378,5366,5374,5365,5394, -5395,5396,5404,5403,5415,5412,5414,5429,5428,5442, -5439,5441,5446,5481,5474,5462,5485,5461,5465,5464, -5463,5524,5495,5513,5504,5500,5501,5543,5545,5541, -5553,5564,5563,5582,5585,5589,5594,5596,5597,5603, -5612,5605,5607,5608,5606,5629,5625,5663,5642,5657, -5639,5667,5688,5695,5717,5702,5699,5711,5698,5701, -5706,5742,5753,5746,5751,5773,5769,5779,5772,5765, -5799,5800,5812,5828,5821,5841,5856,5868,5872,5879, -2875,4754,21288,6262,13163,13350,11202,12984,5488,14588, -20032,6124,15501,19974,2713,13971,20758,11789,12986,17478, -5388,12086,4067,21460,2789,14159,21289,13016,10227,7367, -1927,6805,1515,3634,3086,18237,14110,3166,12318,12404, -19798,16045,20258,14160,5787,18832,6434,2241,8813,12497, -20219,6995,10307,2075,11731,15268,3167,3793,15269,9383, -9810,17445,1862,11141,14161,3497,9885,3392,4975,7444, -11287,9022,3357,7639,15249,9333,17453,10460,14689,20135, -12781,12023,12736,12321,5133,8333,10461,10455,18288,3461, -14012,21296,5424,12896,9758,14690,5883,5882,5884,5893, -5890,5892,5891,5906,5910,5916,5933,5915,5929,5931, -5917,5944,5942,5983,5982,5956,5953,5981,5955,5963, -5951,5948,5993,5999,6003,6029,6028,6023,6018,6035, -6034,6044,6036,6043,6067,6070,6096,6102,6093,6074, -6079,6076,6075,6100,6114,6089,6081,6098,6151,6150, -6152,6139,6166,6165,6170,6173,6174,6176,6178,6177, -6190,6192,6184,6204,6205,6207,6239,6247,6235,6224, -6220,6222,6286,6284,6288,6300,6305,6310,6303,6321, -6318,6323,6366,6352,6363,6351,6373,6349,6372,6360, -9218,9024,19647,19977,6031,20667,15367,15704,11801,2745, -18839,12746,15615,21338,21157,4472,14789,21156,12944,21473, -15617,10469,10353,7389,16187,19328,19812,9187,10246,13171, -9764,9227,12904,19984,21054,13495,9765,1566,4108,21702, -9543,14550,10632,19331,19986,21475,19821,4482,14371,20570, -14380,11917,6088,11647,3227,20507,12863,20374,1418,1163, -16789,14125,8625,13837,1419,15197,19145,20574,11094,15377, -6420,5107,8294,11378,21145,2563,15115,6250,15913,2062, -9960,21348,1118,9312,4384,13443,6107,17294,4920,9561, -19968,10432,8232,12716,1132,20479,6348,6391,6393,6410, -6401,6412,6404,6444,6455,6454,6461,6460,6476,6474, -6473,6477,6501,6499,6498,6500,6511,6516,6531,6537, -6530,6566,6576,6580,6575,6590,6593,6582,6578,6574, -6570,6607,6611,6617,6641,6639,6644,6612,6614,6623, -6629,6660,6664,6657,6663,6678,6684,6696,6713,6682, -6731,6718,6774,6735,6785,6741,6763,6760,6758,6761, -6744,6756,6743,6745,6752,6749,6830,6828,6831,6846, -6843,6856,6867,6871,6875,6874,6888,6882,6894,6906, -6883,6892,6929,6935,6952,6936,6965,6978,6949,6971, -5865,6450,14029,15498,1577,11182,21633,7505,9509,17606, -4847,11952,1336,5531,17783,7259,21352,15505,14032,4717, -7598,11340,14033,14034,11956,2670,9826,8882,1880,6558, -14787,7212,17314,16048,11806,9689,21783,3638,11807,15809, -9267,14923,8111,5372,20764,8113,19524,7143,2143,21139, -18085,19938,6237,19549,5249,16253,13755,16564,13384,11502, -21487,15959,11862,4804,7147,14736,2952,12261,20708,14126, -6241,20892,7045,4656,20016,13758,3402,7884,4570,3193, -8138,20094,1064,4831,20948,12639,2710,6245,20095,17027, -4906,17582,14388,1788,21266,13507,6938,6932,6944,6987, -6928,6941,6947,6953,6961,7026,7033,7057,7069,7092, -7061,7024,7041,7047,7030,7032,7063,7031,7108,7101, -7109,7102,7168,7131,7187,7136,7126,7159,7135,7155, -7142,7153,7152,7124,7125,7140,7130,7134,7129,7148, -7127,7257,7236,7228,7232,7241,7227,7268,7278,7292, -7287,7293,7307,7312,7304,7306,7305,7308,7320,7330, -7319,7317,7334,7321,7349,7329,7325,7326,7316,7341, -7401,7410,7400,7432,7418,7397,7404,7426,7399,7407, -7406,7467,7498,7494,7491,7468,7458,7495,7504,7459, -10061,21267,14318,5144,18503,4907,16147,20682,3340,2831, -14524,21042,17196,21688,8079,1179,13475,11379,14809,21720, -8933,7984,13763,6008,17588,7792,21174,2725,5592,1119, -8431,8934,6362,3051,6542,5337,15540,17532,8840,7666, -13560,5071,10657,17991,1366,17290,4915,5318,15914,13798, -15804,19112,9419,17589,8377,5063,3843,15940,14934,7591, -17353,6765,8432,7427,8381,2570,16607,20713,10498,2523, -13403,14750,1198,15942,17427,6544,13180,5355,17781,15647, -17792,17538,6255,17038,4921,15841,15186,4130,9072,4839, -7991,6424,20819,18270,8095,4776,7470,7475,7464,7463, -7478,7486,7473,7462,7548,7539,7540,7542,7538,7561, -7569,7567,7566,7565,7581,7593,7585,7631,7616,7634, -7617,7615,7606,7607,7611,7614,7609,8468,7663,7662, -7660,7650,7661,7652,7648,7654,7687,7653,7667,7711, -7719,7708,7709,7701,7712,7747,7736,7735,7739,7751, -7733,7805,7767,7763,8220,7772,7788,7799,7808,7777, -7778,7832,7829,7842,7867,7843,7848,7854,7837,7850, -7853,7845,7869,7889,7871,7874,7870,7876,7894,7898, -7904,7895,7903,7923,7942,7930,7941,7922,7932,7931, -7167,17898,13734,21590,2398,4220,9652,10521,9822,2734, -13594,14319,12717,21406,12719,16283,12980,17299,14717,16407, -15572,16284,5175,16330,1371,21384,1955,5866,3206,10592, -10180,12779,20457,1500,2988,10080,11150,12647,13160,15733, -21591,5804,21649,16894,21514,17730,9835,7909,4590,13931, -11258,19765,21620,4491,10522,17906,19242,14284,12720,17911, -17335,7360,8735,17302,13924,11151,6979,4102,2699,3709, -11259,10841,19892,17599,1253,14955,13351,1556,6568,5340, -3082,11178,16512,5021,16470,15956,5421,11203,17544,9800, -21593,1601,5807,19122,15651,5574,7919,7920,7975,7992, -7972,7989,7986,7996,7969,7980,7993,7990,7971,8005, -8030,8017,8016,8064,8060,8054,8068,8034,8043,8059, -8051,8044,8032,8088,8093,8119,8110,8107,8135,8137, -8128,8134,8126,8139,8152,8153,8143,8144,8157,8145, -8154,8147,8213,8176,8178,8184,8175,8180,8224,8216, -8250,8254,8253,8252,8315,8278,8301,8273,8282,8303, -8320,8311,8290,8272,8300,8287,8293,8341,8345,8340, -8366,8374,8354,8370,8389,8478,8401,8418,8413,8458, -8412,8396,8399,8410,8489,8499,8494,8487,8488,8519, -20998,20073,2479,2194,3351,17103,19893,21621,17834,14484, -16366,5341,14114,19310,7954,19034,21386,11709,1194,5530, -12046,21153,7368,3004,13574,14868,20076,17105,3182,7191, -13817,15551,5027,20033,20693,5221,13907,6376,20131,15608, -17306,15147,20694,21635,15552,6668,1960,1516,4779,3144, -9516,15270,18339,17000,21637,9395,21332,12989,10785,20858, -10509,11400,12392,9745,18000,21623,6996,14200,15220,10526, -1372,18758,14058,11323,13047,6848,17166,7198,14144,17799, -13663,18001,15224,13080,20301,21765,20826,14241,14035,9981, -19799,4501,9886,2337,21741,7527,8515,8528,8522,8516, -8524,8545,8544,8546,10204,8552,8554,8571,8559,8567, -8589,8593,8591,8598,8600,8614,8626,8629,8633,8637, -8644,8639,8647,8655,8656,8659,8664,8668,8669,8670, -8680,8695,8692,8673,8702,8703,8708,8714,8715,8716, -8720,8725,8741,8745,8743,8744,8757,8755,8773,8786, -8785,8787,8790,8797,8800,8805,8819,8820,8826,8830, -8843,8832,8841,8846,8853,8855,8857,8856,8864,8872, -8866,8865,8884,8892,8896,8904,8909,8929,8926,8932, -8923,8922,8950,8954,8952,8955,8971,8963,8977,8992, -13709,2243,13936,17800,6812,6495,21698,16928,13049,20034, -3300,14487,6815,7213,14099,7445,7562,6559,13081,3089, -7868,7694,1531,2204,19057,11885,15225,19058,14141,13884, -7218,1708,12959,9219,12590,18072,12747,12225,18637,11409, -9457,17555,21701,8948,19449,17915,9401,17176,2212,7697, -10354,2213,19276,1945,13689,17180,21712,21703,10667,17007, -9255,9412,9809,6227,13749,21244,20700,3829,17026,19231, -15568,20065,17291,3173,17568,4808,4809,12626,1789,12483, -17382,20548,5176,19250,5654,21742,15425,2017,12825,16628, -19268,9402,15432,10355,14973,5154,9008,9004,9005,9028, -9029,9062,9075,9080,9078,9089,9088,9103,9104,9115, -9124,9120,9127,9106,9148,9141,9173,9196,9192,9191, -9190,9204,9195,9188,9200,9198,9237,9235,9244,9238, -9256,9257,9279,9281,9274,9277,9270,9296,9308,9311, -9314,9316,9340,9341,9343,9360,9357,9356,9379,9369, -9388,9396,9425,9422,9446,9426,9417,9451,9440,9443, -9441,9463,9464,9469,9476,9478,9486,9514,9515,9479, -9480,9493,9558,9549,9550,9566,9547,9482,9605,9581, -9611,9583,9578,9585,9618,9577,9584,9630,9590,9598, -13649,14373,5471,21226,8188,10999,11247,5591,15642,8378, -4916,14394,5593,21450,19753,962,4444,14945,10708,10182, -1101,4446,2350,16518,1507,7199,2690,10185,8387,11142, -20561,10621,12322,7014,7020,10548,11086,3283,18469,19502, -19500,4676,1065,18521,5506,12997,20172,5189,18958,21268, -18808,13799,13645,13044,6545,17295,18990,18509,13014,12933, -19625,5342,19899,4502,14203,4694,14204,9780,11891,13053, -5405,2682,4657,6242,2647,3194,4908,17089,12172,9107, -12264,10189,20949,13476,16951,17533,16878,8706,6767,6695, -17423,14153,6256,7547,3543,14155,9634,9580,9626,9588, -9597,9576,9503,9553,9710,9721,9718,9714,9757,9725, -9716,9717,9715,9766,9768,9793,9786,9785,9783,9819, -9813,9815,9820,9811,9828,9842,9846,9844,9839,9841, -9869,9855,9856,9854,9875,9857,9853,9352,9902,9908, -9881,9859,9906,9914,9933,9926,9915,9929,9959,9952, -9979,9977,9953,9951,9988,9957,9996,10012,10009,10027, -10044,10067,10078,10079,10051,10028,10063,10046,10030,10052, -10035,10112,10116,10115,10119,10128,10140,10130,10138,10126, -10121,10145,10125,10173,10187,10205,10218,10207,10217,10226, -2662,17943,2667,21594,16297,6710,6295,6153,12393,9746, -13485,1012,9982,12173,13135,1014,6816,17952,3550,9339, -5432,5435,5433,3833,13915,4377,4084,15836,12265,2599, -13519,7246,8295,2780,10600,7071,20259,10291,7001,9365, -6915,19450,6509,18906,13195,20018,3371,6243,20837,20838, -20683,2383,20745,19505,16215,15770,4385,18207,15813,14106, -6050,14504,9936,7994,1424,3660,5851,16572,17907,12484, -3072,3908,3909,15864,8264,3083,8956,9739,9740,16624, -9016,9747,9752,3087,14478,15045,15843,9023,11795,20859, -3393,11837,13142,7531,15844,15846,10219,10258,10260,10257, -10280,10273,10300,10306,10310,10308,10323,10321,10335,10322, -10327,10369,10365,10366,10372,10466,10422,10316,10425,10401, -10411,10444,10415,10398,10394,10434,10474,10486,10496,10488, -10491,10505,10497,10499,10515,10519,10513,10516,10419,10517, -10531,10532,10530,10536,10557,10558,10561,10562,10571,10579, -10574,10573,10576,10577,10601,10612,10620,10608,10613,10616, -10617,10618,10640,10658,10650,10653,10651,10671,10675,10684, -10685,10686,10682,10701,10714,10712,10715,10718,10728,10729, -10725,10730,10749,10746,10743,10761,10780,10768,10775,10776, -10247,20545,14996,15128,20554,18888,13372,8740,2045,5245, -3614,6572,2617,13750,13891,19917,2099,5919,4674,12129, -12074,19459,13652,16591,12673,12291,16831,16832,8742,3830, -1446,1080,1817,13469,15722,21544,4607,20803,11696,12180, -21570,4824,17192,11442,13437,8674,2623,18443,12075,2557, -17745,4380,6188,21571,5709,2511,15796,3195,10900,17524, -17525,10731,17526,11815,16604,16594,17764,8053,19506,6181, -9931,14184,15876,10904,2955,14444,7274,15592,8343,7054, -17763,17666,16126,2515,16070,4003,11606,12332,5512,9461, -20509,15201,7750,9833,14872,1621,10770,10795,10803,10799, -10994,10793,10817,10825,10833,10840,10827,10828,10856,10849, -10864,10865,10872,10881,10867,10890,10896,10895,10902,10922, -10926,10916,10894,10899,10907,10945,10936,10938,10954,10959, -10951,10958,10971,10983,10990,11001,11036,11021,11005,11037, -11034,11046,11045,11096,11064,11072,11067,11057,11060,11055, -11085,11116,11112,11111,11132,11117,11121,11149,11145,11147, -11170,11162,11166,11168,11175,11181,11188,11190,11191,11204, -11198,11200,11207,11206,11221,11217,11234,11268,11264,11274, -11273,11272,11292,11311,11293,11300,11291,11318,11321,11325, -10590,12368,5874,13561,2924,3428,11628,11514,13764,14445, -2985,8199,3969,12308,5846,16664,10919,13921,4173,2657, -10615,11988,3696,936,11611,14847,20069,21063,13843,16001, -16461,7672,7255,4099,1482,2292,12954,16218,14714,15495, -15134,21382,19001,9862,7072,12312,17540,10502,11977,2297, -10437,5853,12078,2853,7577,4844,21310,10438,7630,19353, -10480,18031,2077,15932,11710,9878,3209,5729,17440,15598, -4497,20857,7633,6344,3208,18724,17336,15189,4716,21295, -3409,8880,11880,8459,2848,8361,9129,9777,16103,12737, -3213,1720,18067,11618,16669,20188,11331,11346,11332,11333, -11339,11336,11349,11352,11355,11376,11391,11401,11364,11386, -11385,11366,11420,11413,11428,11437,11435,11434,11436,11429, -11467,11475,11468,11464,11474,11450,11452,11472,11458,11479, -11485,11491,11621,11501,11494,11499,11497,11521,11518,11519, -11531,11529,11544,11539,11549,11568,11584,11604,11602,11613, -11615,11625,11627,11493,11635,11636,11642,11665,11648,11646, -11643,11674,11673,11698,11707,11697,11705,18231,11712,11713, -11729,11728,11724,11737,11741,11744,11747,11758,11760,11769, -11799,11771,11786,11787,11768,11817,11823,11822,11830,11819, -17312,1642,17733,9056,9132,18239,10351,6921,20098,10644, -13496,20189,10549,11670,20099,12859,16654,5696,9980,5693, -7647,7162,5193,2761,11152,11790,5278,7488,3845,20816, -17766,15359,17271,2100,13616,19682,17688,8265,8163,17671, -14339,8136,15389,14673,15458,12611,12612,5631,6496,15763, -17100,3507,4484,12000,15378,4486,2866,10331,10066,17090, -13319,12084,8849,4922,20217,4778,9497,19616,9287,15880, -1846,11740,8205,6638,21595,1602,11477,3857,3983,1216, -2110,19035,2015,10292,3355,18032,18632,3577,3462,13039, -10387,18874,7091,7532,6916,12748,11821,11845,11851,11855, -11861,11858,11870,11869,11866,11886,11901,11908,11912,11915, -11928,11924,11923,11936,11954,11958,11942,11961,11968,11971, -11969,11992,11986,11987,11994,12001,11999,12004,12011,12012, -12007,12014,12017,12020,12016,12027,12026,12034,12033,12037, -12045,12061,12062,12055,12059,12071,12081,12083,12094,12098, -12099,12103,12102,12107,12110,12117,12119,12127,12131,12137, -12141,12139,12135,12155,12148,12147,12163,12168,12181,12177, -12183,12215,12199,12209,12200,12207,12217,12218,12192,12210, -12231,12237,12250,12257,12284,12247,12252,12272,12306,12292, -10389,10356,2216,14861,7370,12455,18412,18428,2040,9374, -15833,15771,7605,12191,18896,2097,11144,5094,19700,6408, -21561,6750,15167,20902,16093,16427,12791,16560,13721,4862, -21245,6445,8403,7133,1021,2773,10862,13776,5996,19136, -19498,18907,13139,12331,3672,3616,9596,19429,1304,18852, -21250,11677,1813,1741,17779,18597,17144,6232,20347,3923, -3823,11765,6327,10897,14463,5565,1441,16492,4875,21479, -20882,7144,3063,11749,18017,5271,9604,13789,2155,2410, -19710,6011,21562,9922,16714,4185,5705,3048,5444,5677, -7613,19579,21484,4438,10819,21073,12299,12307,12294,12285, -12327,12333,12350,12341,12355,12363,12360,12358,12381,12389, -12387,12399,12408,12416,12419,12425,12435,12431,12443,12449, -12450,12462,12464,12477,12458,12460,12473,12459,12466,12500, -12502,12505,12511,12533,12539,12526,12535,12540,12558,12566, -12555,12575,12578,12576,12580,12594,12592,12593,12597,12595, -12601,12614,12613,12636,12638,12624,12630,12619,12615,12623, -12646,12621,12618,12667,12701,12668,12670,12692,12686,12680, -12660,12715,12672,12659,12698,12769,12760,12756,12758,12762, -12797,12798,12818,12783,12787,12788,12789,12793,12784,12827, -12856,21200,6536,4825,5058,3284,2878,7976,4378,968, -13088,2594,12471,7879,9345,14805,21343,3285,2056,19580, -4074,16436,9481,3997,4829,13730,19146,1918,20042,15173, -2506,2413,16715,1674,16851,5353,21264,11375,21346,21756, -16122,13385,15256,2414,12196,11000,17725,7978,2370,8495, -18259,3253,5960,3254,7272,16315,19468,11863,14289,17284, -16601,7783,11548,11461,16026,11637,10818,3050,3686,13470, -3933,21644,9108,10409,16499,11773,9037,12577,20115,5211, -5860,10588,2722,2921,20453,10978,9487,1266,13237,8359, -13196,3656,7740,7900,13092,15355,12836,12837,12862,12848, -12860,12867,12842,12851,12878,12843,12873,12919,12937,12917, -12918,12912,12932,12952,12947,12957,12970,12972,12962,12979, -12995,12990,13004,12991,13026,13028,13025,13041,13074,13067, -13065,13056,13090,13107,13086,13087,13115,13132,13130,13126, -13122,13119,13124,13138,13141,13143,13146,13148,13174,13173, -13172,13194,13199,13204,13190,13210,13201,13228,13235,13245, -13247,13246,13248,13249,13255,13278,13271,13273,13268,13282, -13283,13290,13318,13308,13341,13336,13338,13392,13373,13366, -13381,13375,13446,13421,13440,13422,13441,13431,13429,13474, -5334,6458,13177,930,16324,1376,21125,7336,9992,15438, -15726,3538,6394,6103,2934,2290,6538,4632,9157,14149, -18315,18805,14308,7160,5611,2063,20684,16182,8116,1459, -18961,11002,1282,12123,3902,13346,8682,17383,16296,19673, -19674,5009,9792,17934,11560,2068,16638,2969,17424,1551, -11465,933,19297,9085,9086,7545,11176,21759,21780,21665, -13841,16985,18688,934,13477,7342,4917,10520,7343,12170, -6251,6252,6289,18386,15977,21503,13274,11098,6626,14391, -5082,21146,7489,16452,1832,16358,7163,4095,18621,15175, -13562,20639,6838,14528,9194,21585,13504,13506,13511,13522, -13514,13533,13585,13540,13575,13544,13539,13554,13547,13588, -13597,13596,13605,13604,13607,13608,13623,13625,13615,13613, -13644,13646,13658,13662,13665,13668,13680,13686,13687,13685, -13690,13695,13702,13707,13710,13711,13716,13715,13713,13726, -13752,13742,13738,13736,13746,13745,13772,13773,13778,13784, -13790,13807,13791,13818,13810,13806,13792,13788,13829,13839, -13836,13857,13864,13885,13873,13877,13861,13893,13892,13890, -13895,13906,13914,13912,13933,13944,13943,13951,13952,13960, -13962,13978,13979,13988,14002,14005,14000,14009,14014,14017, -18534,19838,10913,19989,14810,21325,5613,13671,18005,9007, -16453,19509,15066,19116,14532,2959,14582,19991,20647,13870, -9643,13606,19888,9644,8261,16887,2776,17846,16002,10135, -6899,3741,12977,21666,12537,3242,19840,2781,19754,12041, -12579,11511,16956,4681,20025,13969,2013,11061,15236,11305, -15067,10136,16957,5477,9280,5086,3259,15488,10639,17938, -18608,5778,21618,5801,21781,15779,2071,12157,9197,14395, -9301,10074,3811,15780,10858,15891,21207,938,9729,3073, -12485,13348,7910,2962,7809,16408,16057,2033,19774,19002, -8233,1484,10376,1924,20480,9391,14025,14027,14041,14043, -14050,14054,14056,14066,14068,14085,14074,14077,14107,14111, -14127,14120,14115,14119,14116,14117,14142,14147,14152,14158, -14162,14180,14218,14170,14164,14168,14194,14175,14205,14206, -14234,14240,14237,14224,14216,14220,14232,14259,14253,14255, -14274,14273,14278,14281,14270,14287,14286,14292,14288,14304, -14303,14309,14310,14315,14313,14314,14321,14323,14332,14329, -14334,14346,14350,14341,14348,14342,14338,14337,14385,14363, -14369,14366,14367,14387,14381,14372,14407,14414,14415,14422, -14438,14435,14447,14442,14458,14455,14476,14465,14454,14483, -13031,10779,18277,10081,7164,1625,5805,5945,3629,10433, -14354,14263,3630,18056,1883,3704,3243,14398,17996,6368, -1007,11100,10284,21045,12513,7573,11131,3074,11754,6781, -8384,19162,14195,19117,5852,2425,6430,14131,8810,12981, -10678,2020,20249,9510,16471,7078,12934,14507,11011,11991, -2237,3742,13934,9423,19626,13101,2787,6466,7361,10722, -20029,1229,19487,10446,13697,4337,15652,4616,8449,4638, -13872,4686,9017,14891,18182,17835,5022,3490,16722,3946, -14956,17441,17048,10224,20074,14298,7362,15239,10086,19783, -17104,15010,11878,17946,20077,19775,14490,14498,14499,14468, -14494,14512,14511,14522,14520,14527,14516,14510,14514,14552, -14556,14568,14559,14555,14572,14571,14562,14561,14595,14596, -14599,14604,14601,14600,14618,14616,14609,14612,14639,14623, -14635,14675,14649,14625,14636,14662,14679,14642,14614,14624, -14660,14630,14610,14615,14634,14632,14628,14629,14698,14699, -14703,14701,14705,14710,14709,14706,14716,14708,14756,14728, -14738,14735,14724,14751,14726,14746,14739,14745,14722,14768, -14767,14770,14782,14774,14783,14776,14779,14775,14777,21229, -14795,14799,14803,14797,14796,14804,14818,14807,14814,14819, -16964,6058,909,6797,6798,7192,3030,17333,16299,11222, -9468,7554,1995,14400,13035,9748,8691,19900,3297,15698, -15469,20407,15240,17163,4498,3892,17607,5532,14781,7514, -6015,13994,18059,18628,1134,4134,12438,16476,11835,2741, -10716,12400,12823,20205,2432,20662,4408,11689,19315,3110, -17446,12733,4447,7437,17912,8982,1579,3818,11138,9207, -7960,13331,13166,17249,17222,15151,10482,19052,17914,17561, -19053,9116,9429,7726,3636,20898,1292,18633,11403,6601, -1639,15087,15426,16058,13334,13109,16528,10160,6806,11980, -5224,20082,1256,9681,14785,21189,14806,14831,14833,14836, -14835,14837,14838,14845,14843,14851,14848,14864,14871,14875, -14885,14883,14886,14895,14888,14889,14897,14906,14903,14902, -14933,14952,14949,14928,14924,14922,14921,14968,15004,14974, -15003,14971,14976,14977,14986,14969,15017,15039,15036,15051, -15050,15048,15047,15049,15063,15072,15084,14911,15090,15092, -15101,15110,15111,15118,15131,15123,15126,15112,15104,15106, -15159,15164,15165,15168,15183,15184,15182,15192,15207,15194, -15218,15202,15208,15196,15229,15242,15243,15264,15260,15254, -15266,15276,15275,15279,15273,15299,15292,15293,7828,15306, -887,10021,17953,13243,9184,16186,16814,13937,13938,12741, -10347,15097,16067,10816,20085,12498,19692,18069,7214,8082, -17954,13359,15098,8104,4796,1882,13678,19066,17261,19804, -8245,9781,9782,19199,13040,19269,10233,15964,6453,19979, -10101,18587,10931,5991,8962,9220,7219,3498,10789,9458, -9403,6497,4764,20827,16533,8987,6510,9535,7221,9435, -6515,10628,7015,8988,10471,7393,14013,15618,9409,13595, -17464,19080,10552,10982,1669,14930,17409,2832,6335,17814, -3236,4911,17821,10373,6396,6051,7623,8309,1275,18279, -20462,20463,8958,1703,17054,14830,15308,15313,15333,15328, -15345,15352,15351,15347,15376,15379,15368,15373,15372,15384, -15391,15385,15395,15392,15400,15423,15410,15416,15412,15403, -15435,15439,15436,15457,15451,15448,15449,15462,15484,15486, -15479,15482,15499,15478,15502,15516,15521,15518,15532,15530, -15539,15537,15546,15538,15569,15563,15562,15567,15564,15584, -15585,15590,15613,15603,15600,15604,15624,15623,15626,15625, -15638,15654,15656,15634,15670,15691,15699,15686,15682,15678, -15677,15707,15710,15729,15715,15725,15718,15754,15750,15768, -15772,15775,15801,15807,15811,15816,15827,15830,15834,15838, -3778,13376,2463,14515,8411,20571,14331,19550,5921,21548, -17360,4547,4307,1066,2626,12865,16565,19957,19958,8496, -12681,15908,12682,19868,8416,6728,13197,12683,21076,11462, -16316,4677,4678,6004,4995,13655,12112,11657,3341,12478, -2600,8296,9628,5003,20338,5436,12302,1873,17198,3783, -1675,1749,20396,15817,5514,19293,5280,3052,6732,10813, -5010,9932,18747,17203,9635,18976,12486,7793,14333,18809, -16328,11381,13157,5759,13321,9350,17684,7861,13404,7279, -16078,2372,1328,5971,17965,20714,4970,17246,9288,1485, -19841,19511,7801,3429,3762,6733,15832,15849,15853,15850, -15851,15871,15878,15888,15904,15917,15933,15895,15911,15897, -15912,15938,15937,15939,15936,15944,15947,15954,15953,15965, -15966,15968,15970,15983,15987,15992,15990,15993,16017,16019, -16025,16030,16034,16056,16059,16071,16079,16080,16075,16082, -16091,16102,16117,16109,16127,16146,16134,16132,16141,16172, -16168,16179,16181,16193,16190,16201,16194,16191,16208,16214, -16222,16226,16238,16229,16234,16251,16255,16242,16256,16247, -16282,16264,16265,16280,16270,16261,16269,16289,16295,16308, -16312,16309,16321,16317,16319,16339,16341,16337,16336,16344, -15031,8206,12721,19766,8531,14946,10593,9653,3855,15573, -9048,5937,5976,1213,4604,16466,4144,19845,15291,12955, -13945,11661,16467,9836,3935,4334,1166,3705,16331,1979, -11099,2187,9125,7067,15865,10883,17836,11153,7755,14586, -17944,18335,13845,16367,5023,19894,10968,16513,13925,17546, -17071,19245,14540,2700,15468,21180,21596,15653,19895,11012, -9128,4032,13352,16963,16644,19994,13510,19307,7550,1150, -14959,3054,16917,16613,9749,1151,13819,7086,16697,17798, -5984,18827,1395,6467,18871,4079,11536,6126,6377,6736, -10693,19037,16577,19311,15609,21047,16374,16360,16343,16379, -16384,16391,16381,16393,16395,16378,16406,16396,16428,16444, -16429,16423,16424,16425,16426,16489,16507,16491,16493,16494, -16501,16527,16490,16503,16500,16497,16508,16488,16548,16541, -16566,16557,16563,16559,16586,16595,16592,16598,16611,16610, -16625,16630,16642,16632,16640,16646,16665,16653,16659,16651, -16681,16679,16685,16672,16677,16684,16682,16701,16707,16711, -16705,16704,16702,16741,16729,16746,16731,16757,16733,16743, -16734,16772,16803,16791,16781,16770,16771,16787,16784,16827, -16893,16828,16821,16863,16829,16869,16899,16823,16888,16849, -2016,15014,12728,15788,14266,3713,10452,16524,21009,2430, -13482,12319,19639,7522,10293,13231,19198,7557,16580,17447, -10786,20593,20616,10681,5837,10155,3088,9519,10765,17448, -2301,11404,21711,14961,13356,15597,20860,12222,7692,13486, -1678,9887,5764,17002,7120,21314,4605,9334,8461,8462, -19172,2201,7640,11595,17454,11427,2701,18108,14962,2795, -2487,3463,9570,14243,18875,8029,3301,12826,3033,17369, -14355,13219,19325,2160,9673,20280,17955,21209,20264,17510, -10823,17619,12749,13828,7451,6032,21471,7826,1709,6073, -4508,9434,7825,9138,11289,9690,16875,16844,16824,16853, -16904,16817,16854,16891,16859,16884,16820,16873,16966,16952, -16950,16948,16954,16983,16982,16979,17013,17034,17011,17018, -17070,17063,17073,17110,17101,17096,17077,17074,17080,17117, -17123,17121,17118,17149,17153,17135,17132,17158,17137,17188, -17187,17199,17197,17184,17191,17186,17206,17232,17233,17269, -17293,17266,17296,17288,17292,17274,17285,17272,17270,17320, -17323,17343,17321,17334,17337,17328,17318,17354,17352,17349, -17364,17359,17357,17379,17378,17389,17385,17376,17381,17417, -17420,17438,17399,17487,17451,17425,17407,17404,17468,17472, -13417,11808,10357,4082,17461,21194,10248,9537,10249,12092, -18646,12326,11569,5540,19277,14790,16944,1981,13498,13584, -1982,10757,7827,21219,21423,6608,11919,12132,21082,10733, -4420,8555,11230,17060,8615,19923,13471,10069,17989,14811, -15915,10270,17207,6374,16514,3546,2689,16519,3548,21401, -5121,19572,18781,4826,4655,7774,21038,3400,18935,21074, -7852,20805,17527,13653,20806,8492,2158,6687,13654,16145, -10111,1267,18618,21778,1452,14317,8297,6140,18019,20681, -18801,12013,1783,3598,4996,5798,20934,20950,13656,18947, -16123,11503,5416,17985,20575,13438,17471,17481,17489,17482, -17492,17491,17488,17507,17506,17508,17509,17547,17512,17522, -17536,17514,17529,17516,17530,17558,17579,17569,17618,17603, -17564,17565,17590,17575,17650,17631,17642,17635,17632,17643, -17630,17627,17664,17667,17676,17683,17680,17679,17674,17696, -17704,17699,17698,17697,17717,17721,17719,17722,17720,17735, -17734,17746,17737,17741,17749,17750,17755,17757,17762,17780, -17895,17790,17784,17788,17787,17831,17804,17828,17815,17826, -17811,17845,17847,17899,17887,17870,17863,17865,17879,17871, -17893,17890,17885,17886,17919,17927,17922,17962,17963,17959, -19727,11058,1784,1792,2631,2627,8838,13762,7590,7479, -11380,7789,4382,13866,21172,5713,19103,8550,17710,14105, -9038,11753,14813,7252,9069,9562,8344,14392,5282,20685, -10131,7169,18993,1899,21350,14884,13647,9559,17794,2168, -9042,15571,19930,10075,2632,2271,2730,9834,12142,4589, -5802,18331,4030,20981,12777,12710,5863,8753,12640,15694, -14674,4932,2698,17595,3856,9049,4088,17795,17796,19931, -5019,19623,16055,18333,6706,12115,3383,20048,15303,5422, -6502,13814,19932,11535,8102,2129,1152,14046,11756,19251, -7865,6505,8844,9741,9511,14542,17973,17977,17984,17983, -18006,18007,18014,18010,18029,18036,18049,18054,18093,18077, -18080,18075,18078,18076,18123,18116,18113,18114,18122,18117, -18138,18141,18142,18144,18139,18137,18157,18154,18162,18165, -18170,18166,18180,18176,18185,18188,18221,18212,18223,18215, -18220,18261,18245,18258,18271,18250,18243,18248,18278,18266, -18253,18252,18305,18313,18314,18310,18332,18371,18380,18401, -18360,18367,18387,18368,18366,18382,18369,18377,18373,18442, -18437,18446,18445,18457,18452,18459,18462,18453,18468,18455, -18501,18494,18502,18499,18520,18524,18538,18536,18529,18570, -10506,19038,3822,17611,17167,16525,1658,2035,7193,14109, -1232,1508,4944,7438,21333,7439,3211,7088,3391,20105, -4500,1857,17390,18107,1677,13699,10764,9208,1027,20261, -5789,2047,15221,11882,2172,9779,3460,14786,15447,1533, -9212,4947,20899,15340,14788,16219,14691,1122,17552,1870, -2459,9186,10244,16974,17178,9224,20600,3361,8271,20168, -14549,7456,19077,9231,18187,16822,4781,5011,4798,1103, -6132,7017,7022,7460,5609,1594,18372,5714,8423,12377, -10870,11119,11120,11218,14652,15002,2167,20686,8433,11125, -15805,9733,18624,20982,8505,16960,18562,18540,18565,18550, -18555,18544,18598,18603,18616,18617,18636,18642,18644,18648, -18647,18662,18660,18657,18669,18682,18666,18667,18668,18687, -18671,18683,18726,18744,18733,18745,18743,18736,18731,18732, -18818,18770,18812,18804,18767,18800,18820,18774,18777,18785, -18835,18864,18855,18857,18844,18843,18850,18845,18885,18903, -18917,18909,18893,18881,18902,19048,18966,18991,18933,18891, -18992,18984,19009,18884,18880,18946,18985,18923,18889,18948, -18908,18894,19047,18960,18922,19093,19094,19086,19098,19095, -19088,19091,19134,19155,19153,19150,19181,19178,19179,19183, -14214,16368,17049,15756,19635,9245,4344,4065,13183,12095, -7200,11312,19316,5459,13526,20464,7963,5618,3578,7529, -10622,13527,7380,16418,8470,13529,10625,9250,14433,3639, -5623,18362,15751,13378,7881,3124,20951,2363,7048,3430, -3657,6484,13566,5287,14667,5760,7833,6860,13407,17685, -11662,6980,10439,20326,1518,17692,14267,5390,21014,18026, -2850,16932,18840,10470,8475,16942,18422,16946,18249,3899, -4992,13379,13380,7705,7145,4524,18124,3804,6274,2102, -15586,17812,7784,3418,13759,18125,19147,14221,12802,16124, -7150,18126,19163,4262,4659,18203,19203,19221,19247,19227, -19261,19219,19243,19289,19290,19291,19288,19305,19284,19318, -19286,19340,19338,19351,19349,19357,19361,19360,19382,19362, -19364,19368,19423,19421,19399,19401,19409,19397,19410,19403, -19428,19438,19432,19439,19433,19452,19453,19456,19472,19455, -19458,19477,19499,19495,19494,19518,19520,19539,19532,19517, -19519,19545,19552,19557,19570,19612,19617,19610,19622,19562, -19574,19608,19573,19600,19554,19588,19592,19559,19583,19658, -19653,19656,19662,19655,19663,19657,19694,19720,19699,19705, -19696,19745,19733,19712,19737,19749,19724,19708,19704,19756, -18532,15052,14424,19154,17640,8425,17469,11624,2418,19475, -20893,17747,4572,17668,2333,14345,18264,13980,21407,17855, -18962,18963,15119,2565,6071,14393,6108,17894,20687,21273, -20781,5448,21556,20399,5519,5012,7420,3846,10071,3658, -18522,11590,12064,21147,5145,18977,8302,18622,20367,16149, -18810,13508,20549,12487,1471,17752,13445,1083,3292,21689, -15541,21232,3015,20584,19416,17858,18095,18994,6666,6112, -14668,2126,17496,14534,6175,2144,5452,5761,13567,6776, -7802,6485,5065,17355,16365,14396,2731,3971,11062,11320, -4332,6703,18275,17748,5595,4422,19714,19735,19744,19717, -19776,19695,19830,19834,19826,19854,19861,19869,19864,19873, -19891,19858,19857,19866,19886,19884,19876,19912,19919,19929, -19920,19921,19935,19937,19966,19964,19954,19950,19965,19943, -19956,19961,20017,19999,20014,20001,20041,20035,20055,20075, -20061,20059,20071,20054,20088,20101,20100,20113,20112,20110, -20120,20121,20124,20125,20137,20144,20149,20152,20173,20184, -20186,20191,20192,20195,20206,20198,20197,20203,20200,20224, -20218,20212,20209,20207,20220,20234,20231,20228,20233,20277, -20283,20292,20293,20289,20307,20332,20317,20319,20333,20335, -1772,15798,18815,9421,21176,8906,8850,16693,7179,20983, -13770,3136,9303,4270,8914,16896,15881,3432,1331,2188, -19541,8764,13127,13181,14834,939,19683,17499,2529,7864, -17300,16695,16806,5238,15054,1890,6782,8062,14899,20716, -14900,4031,6451,2326,14873,7813,8736,13451,3106,17470, -15212,16332,17215,4617,2573,15327,19014,11487,19164,3814, -12335,21456,2238,2400,21400,7185,12650,15417,21387,16472, -8207,13287,3947,20783,20252,21650,12887,21457,9849,7506, -2843,17126,10604,14426,1657,6492,12372,19628,3860,17838, -12380,14682,17947,14683,6861,6493,20339,20337,20348,20362, -20370,20311,20356,20363,20358,20379,20376,20382,20384,20386, -20389,20412,20392,20401,20395,20391,20427,20424,20436,20428, -20426,20466,20448,20445,20447,20450,20455,20452,20483,20471, -20475,20477,20468,20494,20492,20504,20500,20503,20506,20501, -20505,20517,20511,20523,20524,20534,20535,20543,20550,20551, -20538,20553,20537,20564,20566,20572,20583,20592,20602,20603, -20613,20607,20609,20622,20642,20629,20645,20630,20661,20618, -20619,20620,20672,20679,20670,20720,20705,20719,20699,20752, -20733,20744,20729,20735,20726,20730,20771,20765,20772,20778, -4345,21083,3711,17548,4939,12605,15866,7515,12780,19784, -21521,21313,16998,6799,19124,943,17217,11555,2431,4783, -21183,18484,18402,6643,17948,5296,11950,12652,11422,18708, -16520,17689,15611,21114,14239,12516,9020,6669,6908,5264, -19317,11063,17479,11139,17001,13038,2402,18046,15658,15152, -1217,2613,12890,14688,7578,19902,17612,17449,15554,18582, -18583,20824,19643,1640,3116,9520,11341,11342,14268,20595, -11324,7446,20262,21692,9755,10294,1998,11981,5817,16967, -21466,1013,1044,7915,20596,18837,6345,7603,10787,2353, -5988,6469,2245,17839,20302,14103,20777,20779,20776,20774, -20790,20794,20787,20791,20821,20795,20797,20811,20789,20786, -20796,20842,20833,20843,20844,20830,20836,20831,20872,20885, -20866,20894,20867,20870,20878,20903,20928,20940,20901,20933, -20970,20911,20917,20907,20958,20932,20968,20914,20913,20944, -20959,20912,20947,21025,21037,21032,21039,21041,21035,21056, -21055,21075,21067,21068,21085,21088,21084,21090,21086,21104, -21119,21122,21123,21133,21143,21134,21138,21154,21168,21166, -21175,21159,21170,21169,21162,21203,21195,21201,21231,21224, -21236,21233,21222,21269,21255,21243,21270,21251,21277,21272, -16933,20329,4138,20785,11597,9213,4278,19356,8464,7003, -21751,7695,1881,6817,21335,11347,20285,20345,14592,13110, -15428,20286,12608,14488,17956,20222,15431,3468,15227,17175, -7006,7730,9760,11892,18763,888,20415,6740,6819,19067, -19068,14244,13692,11900,12960,4140,15338,6438,21117,6033, -920,19273,7386,19805,7455,6826,4047,20599,17958,20165, -9436,14434,16535,2250,9702,18841,1611,20601,18423,4355, -2748,16537,2749,18639,2217,13693,19202,9229,2460,17556, -11810,6528,20169,19082,3473,20422,18433,4056,16108,13741, -17739,17751,1434,21092,14421,17816,21242,21249,21259,21253, -21293,21298,21299,21301,21304,21317,21329,21328,21330,21345, -21340,21349,21339,21362,21354,21356,21367,21368,21365,21385, -21373,21376,21399,21402,21413,21410,21409,21414,21446,21430, -21437,21438,21442,21427,21432,21480,21481,21489,21483,21501, -21491,21478,21553,21476,21536,21554,21537,21560,21567,21559, -21603,21582,21598,21574,21576,21610,21626,21638,21658,21660, -21661,21663,21668,21669,21673,21687,21681,21682,21683,21704, -21700,21714,21729,21723,21725,21737,21739,21754,21763,21764, -21773,21779,21766,21767,21777,23849,23850,23851,23852,23853, -12866,6246,17064,7055,6257,5909,6213,16924,16925,9888, -5946,4048,10251,12768,9563,3570,1394,14823,17309,4758, -21018,21024,18434,18435,2824,6691,16095,18964,18965,7337, -1068,6313,4323,2777,7355,8746,5066,8310,4842,16897, -1695,21184,7260,4692,16926,1858,16549,6554,3637,21600, -4696,19059,971,12303,11506,12266,5437,11508,19538,11382, -15005,6546,8747,6113,975,9506,11663,1425,19689,7261, -16033,10826,16927,19049,8332,2769,15429,6527,8484,1299, -20624,19863,4993,1942,5406,15591,18949,6006,16258,12432, -6893,4529,15390,5645,20242,20952,2817,6927,16768,5073, -11736,13984,12244,5322,2492,5276,11580,4342,5794,19576, -12420,1404,16107,18527,18539,20788,3641,17661,19206,8968, -19762,5197,15583,21221,7034,11534,11212,6933,12658,11087, -1806,14078,5526,20268,14336,3250,18312,8430,14942,18704, -18403,4538,12518,5745,8999,1571,20253,5586,19497,3501, -18883,16585,8008,8816,5766,8560,9118,6945,14219,16230, -8859,12385,8436,13064,6865,19019,8074,16322,13714,3874, -20491,9367,13976,18886,11451,13739,19654,12329,18155,16209, -16732,2260,2002,8640,21240,11843,8547,19434,18898,5413, -4419,21274,14659,1472,21509,4421,5776,12379,1572,10720, -3345,14502,8935,4634,15814,18811,2603,10873,6145,1346, -10424,10014,6777,5067,12371,21510,7298,17900,20278,7673, -5068,20174,7493,19246,18132,20717,14326,1696,1697,13408, -14327,2886,20176,21108,9174,20151,3055,2401,14275,15757, -12143,5343,17216,10735,7507,15213,5025,15461,3107,3108, -20993,6981,20515,4066,7955,11260,2972,20078,1255,20119, -9176,4795,2024,6998,14509,913,21334,5030,5460,14011, -20263,9889,19054,1135,2443,16301,21011,21392,1643,19998, -20308,3448,20159,18413,12589,14245,15896,16133,11672,5039, -7035,4415,19521,8851,8599,21161,18910,15765,2149,7649, -11867,11414,2717,18306,9599,13377,9551,19660,12452,19402, -14988,4787,12968,13961,12015,21412,14732,10637,16631,1416, -15680,5610,8774,8291,4710,18311,17528,7151,16346,21611, -10274,15519,1688,11938,2655,16889,8018,7496,7621,8158, -15919,17940,3386,15894,16104,14330,12852,21684,19976,3150, -3615,16818,18128,6267,5855,2242,8986,1219,12574,6206, -4899,4855,15103,14979,15952,18304,1819,5795,10869,17583, -10535,12546,1751,19308,10643,9399,1725,6406,9916,17230, -16303,19330,7964,5409,17225,20177,1540,4049,14772,18420, -18421,18003,10272,5151,20179,19855,1473,21105,4791,19995, -16865,15916,17039,2473,2482,17106,15507,21657,9606,14222, -13314,13224,17240,21495,8426,13225,2601,3002,2450,3847, -3604,17033,20400,8434,7068,2605,2783,5572,18045,15806, -4217,5130,15267,3137,16961,20555,15137,19192,8235,7508, -13630,2989,3187,10440,3491,13354,21522,15655,13456,2671, -6649,13111,13082,7727,20223,15706,4410,20148,16687,8677, -8427,2436,4549,19963,1099,12694,16183,18978,7490,10072, -10961,8825,3041,12830,21275,8201,15023,11106,21057,11297, -18241,7764,6273,14215,11967,8274,11620,5499,6066,3643, -20539,13427,18775,8898,9416,5588,7775,6680,14374,5440, -13542,20775,6851,17850,13120,5229,8911,16836,21640,21436, -16437,19585,14420,2226,15198,2419,7480,18044,18684,4314, -19728,17926,931,3687,21494,12378,11328,3466,15120,14658, -11122,20585,7428,20284,13097,8439,18397,20403,2457,7759, -7896,4977,16773,12844,8007,1155,3748,21768,1283,17700, -5054,20925,11767,21642,2919,12298,16349,6615,16445,16965, -5914,13307,8919,10791,16678,4540,1736,12249,1300,18670, -15815,12038,8306,11659,18816,7170,4238,4239,21177,13568, -21300,17356,2658,1383,20971,7280,1954,3294,8234,14753, -16008,2839,8063,11780,17432,1925,3222,11449,14754,7677, -13066,11051,7509,12727,16645,16473,7814,7080,11784,8208, -11785,10594,10441,9467,16286,13573,21677,13164,12651,3140, -21597,12238,20757,19636,4180,2973,19426,3712,20353,2442, -16156,15504,4940,21678,11951,2132,16073,13018,20441,3724, -15659,7089,10195,20156,1524,2692,10456,9890,15471,3358, -15153,17003,8997,7204,20861,13020,20862,12050,21601,9754, -20193,11733,16068,8242,17171,21052,3644,15349,7267,20915, -21163,8867,17019,6532,20057,9608,19333,5230,16837,4889, -12297,15404,18316,8375,18228,19160,20473,12514,14229,21651, -10098,4761,2771,6571,10724,13465,14311,6077,5306,11033, -17880,17541,15080,17610,8469,19177,12946,3475,2320,14919, -1581,1352,13396,1354,4301,4435,14769,6984,19377,6154, -16380,16673,5241,20698,8920,12330,18769,9587,12661,1156, -5100,10259,3749,10324,2379,3647,16136,11644,11456,988, -18194,3825,3951,8561,14177,14271,11601,5055,19138,2508, -14573,5820,18050,9924,19922,20840,957,18953,12300,11739, -1801,3148,8466,10022,15304,13083,13084,9852,4156,5634, -3303,1537,1538,8334,13137,4160,2746,7010,16767,19983, -11734,20864,9699,21021,2801,4107,16536,10252,10024,17179, -16538,9230,13682,17623,11811,15339,13500,7098,3155,21696, -17008,8990,8485,10025,3375,4660,15672,4218,5385,9291, -13735,10641,883,6982,8236,8781,8782,18338,10948,8634, -13458,10295,9366,4222,20863,18414,15674,3551,19279,19817, -2366,20336,5752,8493,19959,17665,3337,17924,4525,13760, -14185,8912,14742,16097,2420,3343,4315,11507,12695,10836, -13917,8913,12923,21319,6208,6336,12197,16027,14069,3338, -8822,3838,19108,9462,6312,5285,19881,10772,19369,9821, -2608,17651,12325,19076,2039,7604,11520,4068,12850,6939, -16246,17738,12761,17319,4861,18247,20009,4863,7132,9589, -4294,8280,12287,20879,13940,17268,2282,3060,13189,16779, -12965,12665,14172,1586,21246,8791,18851,11365,5102,12421, -10209,1077,11459,8179,13667,13281,2591,4874,10040,11748, -19204,10854,19285,13310,11243,14305,12967,18791,13694,1447, -3011,8255,15902,6725,21165,15852,13089,4888,13727,17723, -13546,6751,18086,11296,12799,7612,2679,7541,10652,19287, -13478,8936,3659,10073,3346,991,20688,4530,8907,18506, -12185,1322,5479,5480,12113,21276,13832,4324,1085,21120, -20895,18556,8683,18979,13256,14669,12488,4386,5401,8230, -7714,5684,10426,8572,13569,21106,20123,20972,14325,9848, -19768,14297,19485,6567,13641,20587,16285,4972,13260,21109, -11664,10082,20590,20459,9850,21518,6711,16333,2990,5869, -8609,18869,12216,12985,5808,11730,12493,5630,1333,10595, -12022,9825,13926,13847,7087,18485,17218,2876,3122,2944, -5297,19490,6215,14757,5028,21523,4941,16550,1360,20442, -19640,16551,8610,5492,20664,17108,12913,5324,7928,10719, -15231,6238,21141,8601,1401,14575,16633,19503,4260,10901, -19467,9620,15991,17148,4897,15172,19469,3621,17638,16267, -9275,19225,2953,7985,12693,16864,15028,7899,11532,12634, -1082,14741,2266,15812,19589,6539,1458,4910,16028,3424, -3201,18222,21664,3482,7335,16276,19292,5475,5965,12828, -4746,13765,17330,16359,2231,8568,12810,9006,16986,4322, -1246,12002,15858,10278,12028,17933,7251,20648,14533,13904, -11387,4361,1327,16621,6012,7066,9498,1212,7354,14910, -9309,19302,19755,15135,11007,3980,16990,9773,3135,10015, -19903,10457,7641,2351,21321,16529,6849,18033,20598,7728, -20465,1892,9355,4697,4470,9984,5302,14101,8613,6560, -18877,7093,21393,4392,19806,7533,6218,9405,12162,9700, -9703,10358,10026,3321,21095,9818,16546,3016,21726,1600, -9126,3025,18008,1182,1604,1607,1154,3034,1609,1610, -11872,11874,20695,2978,18729,13774,4513,14557,13897,2162, -5095,19546,18846,12617,20310,16338,16024,21396,3275,5997, -3276,4254,21031,2380,11694,2643,2409,21252,15559,16140, -13517,6726,3960,19533,11525,18793,7779,9923,18121,4168, -8089,19470,13386,3678,8045,18860,13479,8811,17917,9899, -6790,18134,8450,13932,21728,7079,11010,4493,12726,6265, -17608,6214,16370,19036,16626,15085,1517,6014,15365,13879, -18064,17254,5222,9523,6917,13488,6195,4506,11802,11079, -5393,18929,8916,9713,3265,18926,16840,20182,12111,19451, -9903,5049,5111,14700,10972,16036,2393,4955,1589,1022, -7776,7651,20091,18940,10605,8520,15760,18650,867,11504, -7110,5845,1116,8194,12545,9928,12921,5643,3841,20318, -18204,13238,19601,960,17932,1771,8970,19926,14747,4364, -2852,7346,14909,20431,11946,14044,10659,19239,20850,5974, -20610,16790,9719,15289,6729,5507,9158,1344,3256,8428, -1382,19476,21101,7935,19729,2984,15688,3289,19914,11945, -3485,15185,18326,2604,15643,14578,20640,19479,20066,4325, -5873,3293,16405,11551,18564,2762,18130,15319,3697,2606, -19915,15129,10690,5651,20481,14676,1935,2663,15138,4176, -3706,10285,2611,3230,13708,12888,17976,19777,18823,4338, -9873,14684,10736,6552,20408,15607,4409,1559,1562,9524, -19907,19493,10629,9573,15848,12757,14166,19560,13860,16260, -4814,8642,1684,17628,14411,19856,3214,6876,1191,8281, -1435,16210,8899,5703,14517,8818,20586,17542,10318,21750, -3151,5132,6598,12337,17718,21461,6868,21706,11576,18882, -15589,3326,14655,1895,2637,6931,8799,3502,9370,20309, -850,18528,4815,4950,18900,3314,9586,4292,1409,1123, -5818,13233,19180,20090,8543,17061,5581,10117,3920,11820, -4183,11582,19435,14925,8901,6943,14417,6681,3264,9910, -18784,17400,1442,2999,5673,6747,17758,18738,12025,8868, -4210,7137,11214,11052,20359,11868,5321,11412,10702,2555, -9320,5347,16709,20315,15274,20211,16839,21776,6946,4782, -20238,11943,11187,9954,21323,20528,15565,6332,3197,14146, -5053,6082,7036,6304,17702,16949,5718,11935,9289,18254, -2499,3995,10489,4958,16708,9272,7269,5346,1818,17024, -13518,17466,12627,13250,21096,21641,12465,9149,11651,19471, -1926,17322,8225,19380,13058,18742,10905,13963,1316,14743, -19672,20060,6311,8966,17325,17326,15059,15483,11301,16880, -13894,2835,21505,21647,18689,16691,17331,20019,13059,19367, -10874,2343,4840,9898,21306,6425,13062,10771,13063,17859, -3585,1529,18097,1502,20291,16409,20782,10882,9965,3384, -11013,18703,2046,8876,4755,11014,8939,9778,20154,2198, -19444,6999,18407,2206,20157,6522,19358,3419,1787,3901, -9268,9621,14832,2855,3837,3268,11550,9488,8969,7742, -19393,9001,8117,15060,19107,2652,7743,10276,8839,16639, -6762,13205,996,15121,4019,8730,11777,6072,2397,15262, -5284,855,11638,6020,3714,880,897,14908,5881,15890, -2566,12158,9460,2030,12411,12642,19238,1370,15082,3605, -11126,12188,8388,9863,12568,2856,7720,11960,13209,10317, -2082,3571,6013,7952,8453,18754,14004,12276,13875,1930, -6913,11565,16377,7396,11538,10575,6346,10031,19526,19664, -13251,19669,19897,16382,20910,12149,15515,2718,20239,5844, -16941,20162,9694,19586,18317,21721,10837,3376,4004,20636, -19871,4833,15711,12831,12507,2732,20129,2987,19540,19211, -12582,21727,5888,16412,10443,9242,18234,15575,20439,15418, -21388,17219,4021,15445,13412,2964,20079,4431,8698,15074, -2757,3234,20080,19431,986,20372,7599,12405,2244,19800, -9521,20194,18761,7601,15430,12509,11883,19069,18416,19070, -11745,13887,2747,18424,10104,11081,11082,11746,17673,7732, -14551,11084,18430,1587,14653,14692,9525,7875,5043,18856, -9897,3508,20527,3884,12504,13388,1081,20632,20839,1067, -10559,4961,11527,3807,14187,13116,16394,16658,10774,20514, -4934,4464,7027,12759,12853,12662,13426,18156,17267,1028, -2078,9189,1057,6413,8709,3921,7266,17785,3324,5427, -10852,11237,18914,3953,7703,18081,20732,9321,9145,15025, -18219,5548,17467,5824,8776,8417,13797,18606,16225,20122, -16399,19599,3237,10299,21498,10908,14503,15029,7114,20513, -9968,3588,1704,18831,3725,2636,4562,3128,18119,18466, -6307,9146,16981,2288,6622,18559,20756,7684,13499,14165, -13587,13368,964,5690,10683,11857,20039,17075,12106,4623, -13787,8869,14707,15230,1450,8369,9615,19584,17237,19143, -8806,2885,21551,4488,19590,16690,5966,5171,12696,10810, -13781,3688,15000,17028,18967,2147,14525,16022,16866,11918, -12871,13394,7481,12267,18653,19185,1092,4550,2423,17712, -3993,19967,12874,4837,1922,11509,17641,4265,8435,4172, -5418,19186,12925,1165,13989,13722,2336,11864,4662,20045, -18865,13202,12268,5827,6253,19156,8500,3809,18980,21043, -16987,5083,13782,6878,15380,8649,19877,10336,11639,16569, -4202,21515,11660,16003,14670,11257,5484,8689,10076,1752, -3020,5523,1837,12269,19757,15006,21762,1889,19483,3763, -7299,20649,14607,14671,15818,8307,15157,18740,5859,10610, -11656,14322,3131,11059,6361,2123,16451,16504,10911,11588, -20478,8061,8447,9871,17605,18063,6525,2877,6880,15233, -19161,20865,14554,15476,16094,17014,13753,19703,2641,18783, -17361,1786,19587,6844,2107,15068,11330,17768,7911,14030, -21331,11571,12328,16736,5743,12105,17759,17350,16170,929, -19670,1455,5338,999,7906,2191,17602,10000,19257,17626, -3504,3224,2251,16738,20904,11993,2677,16737,8579,2316, -2906,15016,1582,11854,6414,2821,12176,3279,18517,21771, -11645,4868,2330,18916,18778,15943,18213,2053,8562,18082, -12926,14535,15302,17994,20529,1269,6115,1489,14477,2784, -14583,1838,21279,2659,20096,12522,15918,12927,4925,20385, -10859,12879,4926,9645,19969,12270,18447,1180,1794,7803, -5420,14817,20753,11448,11683,11779,3698,7256,11473,15440, -14409,18866,14939,8937,8551,1296,15921,17713,6259,7678, -2633,4405,5315,1753,14587,11421,5877,19165,8506,21107, -2708,17365,15922,11389,9448,6972,19769,17908,13724,21753, -20984,14226,2664,16991,17714,13571,12271,15820,21181,6292, -11308,8854,18571,17157,17209,17770,8507,2108,9351,7073, -12334,13871,11101,18752,19120,5685,8722,20058,1309,15037, -12864,8953,9061,18939,15681,13532,13153,17727,4611,2308, -16323,2720,6333,3199,20064,9003,4320,9472,21377,13117, -1466,15125,12951,19371,8020,13100,2688,2844,10002,11041, -15741,6714,14842,18244,16385,6228,11267,8646,15315,10475, -9063,8115,9297,19730,2267,17029,16568,6834,4317,13520, -13617,6116,15731,13622,8618,21353,12035,12992,14874,12786, -14975,2136,4727,19859,11454,11163,4164,11108,5498,1585, -16600,6010,16383,9376,5101,14798,10208,10326,18441,14985, -4227,10038,10853,10648,17980,12057,16138,6230,11269,7970, -963,3917,19512,14087,8662,12931,14947,11640,3812,5979, -13947,14678,8765,13411,17437,20591,17797,20187,15627,3261, -5575,6279,19375,4009,10504,10925,9292,16298,17646,20030, -1334,15144,19778,2189,15882,1850,5980,7282,6263,8347, -4756,2170,16287,20995,14957,8348,6468,19685,15784,8938, -21458,10568,17715,13230,14452,5939,10569,18654,2790,20305, -8209,17303,4271,10814,12570,9512,12067,13948,2532,5239, -9565,15596,1733,21286,20718,15979,10183,21732,8328,2315, -19847,7369,5177,3817,15577,2298,10597,8737,10087,12277, -10447,9518,13017,12144,8362,11261,6534,16432,9921,7238, -20621,19092,6724,21164,7141,17873,6748,15561,18083,7586, -10124,6392,18084,13899,15108,16713,9147,16392,21434,8342, -2080,1190,16848,10940,6577,21228,12689,16857,15027,4026, -21416,12342,14482,5143,4601,3099,14423,5644,10407,14846, -17587,18224,11174,7664,15064,6625,17892,12169,7338,17990, -16660,10909,18389,13207,8732,14351,10821,19301,12599,9642, -13902,15301,6858,1477,17791,4969,15487,12077,11303,6632, -19303,17430,9240,2032,6340,10660,6594,9798,21179,18750, -10430,17967,5129,14822,14953,14196,14320,15925,2193,9175, -21733,12219,977,12278,17307,18149,21369,9452,854,8783, -15330,9054,4034,16521,2928,21524,20759,1348,11791,21636, -2965,15422,3910,12729,12936,21389,6991,19785,7914,5632, -10845,2273,15758,16918,9802,15578,5559,3262,14826,20663, -10448,11040,10449,6452,1659,5046,9164,8749,4551,16762, -11537,16300,6399,3563,17164,17165,6866,9851,4451,10981, -8575,18450,3609,9804,5835,17255,4081,16011,16414,16288, -5031,13848,7090,4348,8510,20665,15660,20344,6435,18486, -4105,17109,19641,8766,14479,6646,16479,5032,20532,2112, -13167,14545,6217,8983,11953,13078,15179,9567,3440,20406, -9743,13878,12585,1522,6030,21464,5990,17616,19322,19978, -4719,6061,1107,11143,5740,3477,11110,19528,2411,11846, -12880,12883,16804,9865,12889,6549,7441,7440,2977,18191, -16739,8086,20235,18782,4397,7235,8035,3328,6309,12082, -1886,9557,13387,17410,15683,13640,8965,16347,6583,10410, -2870,6627,13401,17094,1003,5453,15320,10137,17159,9971, -8327,17609,11205,15222,9110,7121,6759,16053,20957,8651, -20883,6948,4250,2176,16988,8319,2257,8033,11909,11090, -4909,1464,19811,2377,14901,4577,18246,16735,19701,1410, -13079,6297,15951,21624,6555,18714,11263,7523,4089,7516, -14960,8984,6381,17949,20606,7821,20666,1560,21050,21527, -17773,18655,10949,12029,865,5072,12938,10928,2113,3302, -1218,17111,9756,15284,8587,18584,18718,11898,16614,13825, -15510,15285,13021,5300,14916,2929,1863,12051,3273,1397, -14048,5178,21528,16699,19260,6677,15790,10162,8576,15250, -14138,15075,16302,5225,20722,20723,9293,19055,19905,15523, -11796,16968,7262,5266,10694,8350,15056,21691,15286,15287, -4759,16553,11489,10388,15288,11982,21680,16047,17777,5656, -18002,9805,14721,10766,11405,10623,7921,21540,5700,11850, -19563,14980,3278,21118,14174,13145,18195,13703,14730,9784, -7608,12424,2141,9554,12448,16195,17193,15255,3676,16433, -4281,8047,1655,7786,2263,1454,2174,11911,1024,19925, -15854,16794,5449,11329,12345,899,12434,2567,9500,18229, -13027,12412,2295,9389,20474,16902,14233,1512,11757,10674, -14853,5047,5042,4859,11903,21497,7761,8395,1222,20180, -14987,4988,21639,18924,11904,15343,17402,6457,12366,9483, -12697,8728,21366,1966,20962,16799,1036,10139,14227,1627, -3075,20460,7215,17339,14920,19544,21130,5243,16245,8921, -1534,16530,10165,3611,14036,21625,18838,10462,8767,13022, -3183,12656,2303,15472,10788,19385,2246,4760,8071,1644, -14827,10315,17801,3090,10234,20160,7530,2038,9529,17131, -16935,8635,14869,1388,20487,12897,2488,10467,6470,7094, -12591,6820,13023,12510,9987,14102,17802,17315,2489,9025, -14965,10167,11598,6651,12422,15226,4507,13112,13538,18489, -15473,17392,8471,7642,21744,9892,13169,9336,4139,17656, -20136,7007,7452,21053,3593,18153,19347,4118,8472,11899, -15705,12610,15822,15823,20499,3893,14246,8558,7453,4644, -15228,10390,8352,6823,19807,9762,20008,12248,14725,5140, -17567,4872,21135,4873,2823,3327,8834,6001,7587,5351, -17408,15631,10062,12774,4584,14283,5797,4215,14712,10178, -13593,16274,21493,8729,17329,15641,11201,6766,14935,1597, -5417,21379,11252,7937,20690,13903,5214,9496,18989,7353, -1692,12388,10778,9390,11322,14057,17545,9872,20294,7553, -12958,13076,6551,21699,18526,6977,2858,20111,19363,3877, -6937,16431,4653,11242,8408,8672,10212,3753,3334,12530, -11244,7239,4402,5400,17813,18160,6187,18549,10655,16980, -6690,9767,12703,19234,12702,6395,9040,18325,3100,16279, -21468,13085,12901,21472,9404,1541,15824,6562,17553,4207, -5871,2491,8337,4698,3304,19073,921,21609,18136,3819, -21292,6196,21394,7016,11691,6135,6924,13263,1710,19275, -9027,11838,17842,7534,7535,12961,2134,21023,11231,9541, -9407,7018,21695,8949,14276,12230,9139,4052,14918,2997, -10529,1652,1281,10391,17226,8888,10253,4356,10359,7536, -9232,1872,7394,18640,2218,17345,7537,16947,5664,2023, -11812,9438,3156,13502,12070,10633,21697,10553,20196,11814, -8486,15529,21220,9233,13985,18463,17706,1265,17711,10811, -18146,20953,17150,19675,12711,2272,2396,8198,10879,19615, -19927,17097,11610,904,15493,7913,6636,19248,3186,3081, -17969,20484,12584,1997,13484,10450,1528,20161,16609,16463, -20070,15549,16778,1613,12764,2098,10698,9593,12289,11196, -18594,13941,7398,2802,2497,3062,17397,4543,12003,21248, -11530,20922,20608,10211,8148,12468,10328,17078,17401,19462, -20886,16180,20799,10043,5430,3652,9601,16142,2464,8658, -9346,18143,13696,20930,20627,5678,12625,15873,9082,8151, -6479,6185,6755,7781,10533,8368,927,17852,4526,5549, -4900,8420,21550,15259,10057,2806,4679,4027,12974,20547, -20973,19237,6634,21516,1851,15522,13815,1386,10153,6556, -9136,2215,2283,2284,8140,1025,3852,8457,9901,11080, -10975,10700,14844,14209,6889,10976,18265,1460,5967,1461, -14188,8557,8650,1367,6254,13953,14039,17204,7492,7344, -11278,17066,14877,4006,20342,11616,20402,12186,17115,10077, -1599,1490,13954,6119,5615,5291,5260,4445,2840,6275, -5721,11282,14113,9073,9304,10477,15862,14156,8237,19970, -19971,2239,13523,10019,2274,14137,9074,18235,16578,18280, -4346,6841,19786,16579,6280,1231,6281,13525,18611,16581, -1168,944,16415,19129,9095,13632,10614,2923,9817,5862, -7484,3690,8197,3119,14448,11553,20321,9795,9239,7065, -12444,8260,13347,4096,2925,2451,10476,2125,8259,17993, -10914,19300,20651,4614,15322,15247,17594,5196,3178,5216, -14912,1693,13808,21178,17593,7912,13029,12645,2768,15496, -21182,6370,5131,19973,13279,16159,8455,13103,13214,10381, -21740,16907,8238,19898,9394,18282,10005,1879,2130,19482, -1001,11363,3129,14254,15742,20043,9788,12402,3379,7059, -1714,19028,13751,4298,5468,8675,10330,20889,18936,20677, -6330,9607,18546,14648,20936,13549,10402,20580,11726,16329, -9210,4022,13576,12241,15738,11797,15335,8577,6129,13634, -2904,5619,4012,12782,8959,15512,5621,12401,8621,17058, -6821,2247,12283,3499,6561,15337,16583,16584,5952,8563, -4018,6768,15321,6548,9368,17659,18890,20900,19087,18454, -3986,4291,14456,12134,5157,20036,20871,12286,2461,4295, -13428,3645,10110,16135,1737,4228,14729,4229,4374,5747, -19548,8517,13121,17707,2949,4997,17081,14208,14469,12564, -20703,17276,3514,12136,18950,4127,10581,19100,8189,2415, -10403,14471,17239,19105,21227,18473,13777,17091,2696,18378, -19106,19591,3602,16348,11774,4128,2986,21504,3121,10442, -9976,16496,7315,12993,7273,7113,7056,8595,3581,5084, -7431,20175,11970,10045,1921,1385,20306,12353,12556,5038, -9111,5136,6037,15401,5210,20272,17633,20010,5770,6084, -20140,10855,19707,2307,11695,12679,14495,18678,2339,18370, -6688,1888,5927,5757,17935,8974,903,11306,16089,18065, -18630,16938,11575,1341,14641,8928,18792,20935,21488,5060, -7933,20710,9170,13393,6962,15454,5020,2163,7149,16953, -3624,19618,5457,7950,13521,7466,7597,12446,10832,5503, -16749,5550,6959,8305,7340,12362,8661,13151,15258,1110, -959,7741,5064,18327,6697,20046,16797,15489,7171,3523, -995,17040,19188,13991,13704,9966,16060,3586,12314,15187, -19770,17250,4683,11687,4388,6992,3528,19195,20999,10262, -16936,9658,9665,6141,20812,18968,13203,12875,6543,5454, -8379,6341,20103,19629,2737,15181,5989,6909,14852,5655, -2797,20106,19384,7002,16929,10197,9526,11556,18027,20108, -7099,7100,11492,4810,14081,11466,4663,12076,20020,2660, -18448,953,11006,3764,3486,6337,3813,11478,2429,20343, -10083,12653,21110,6266,20409,19125,21290,16101,10088,3973, -19252,16810,10094,10095,6268,19130,5288,1878,10868,11430, -3202,7485,14018,14748,2314,10473,12604,13494,12415,3506, -17140,2860,3925,18199,19099,8727,20022,12557,2649,7669, -4028,3851,19514,19862,5854,19945,16652,13785,6606,8013, -13913,15374,5373,21397,11498,18542,12948,10213,3959,8549, -10329,7290,14439,21140,21775,5566,20676,13467,20804,8038, -5681,3963,18217,8870,13987,5885,12367,20706,11095,16096, -10611,3247,12101,16275,11759,7988,18225,4603,19607,21584, -3904,7487,3120,11561,11177,16217,4331,14816,2525,19352, -5290,10501,1715,15606,20991,20371,5534,11020,14059,14201, -10737,10738,20051,10196,11049,1707,16812,16531,9099,16969, -19060,3449,15620,19808,10235,3360,7095,12079,18491,16420, -16421,17059,7222,11050,11029,9408,9706,6925,890,4645, -3363,10254,10105,923,4765,9708,1259,6160,6161,6163, -1774,13244,15712,20650,2476,13296,8066,8069,15714,4588, -11180,1271,15759,6824,18721,3885,2124,7345,13766,3625, -4077,16798,13767,13208,11865,19189,13981,11512,11390,21690, -1181,19004,18625,15574,1133,7754,6260,12114,1754,19123, -5293,15576,7081,940,6171,5402,12832,15842,19354,15180, -15785,17998,8788,1379,15334,20498,9753,10018,19566,16856, -18746,14151,17644,16909,1616,13986,8308,15069,1634,1635, -14723,5450,5483,6380,4612,6983,9203,19569,12152,10834, -20393,7981,11680,10134,18868,18458,16430,4165,13050,14569, -6329,21258,17982,15353,18680,18470,16792,5930,10984,2334, -18383,6365,19751,16364,4097,1227,17936,1552,16077,10120, -10781,14265,20072,19010,19782,4495,15215,17256,8474,3169, -1612,3536,17897,16911,9592,6415,8077,6422,4586,14611, -14982,17142,20881,13436,6418,4886,21774,11056,20800,3010, -20631,15769,12704,2179,17037,21454,16997,13679,15588,15434, -1525,9096,9140,17615,1196,4365,13357,13358,6130,13136, -11480,7371,3610,11966,15555,15336,17551,12052,5303,1535, -9100,15474,10297,5791,13113,18009,7011,7390,7563,2258, -3305,6440,17263,12905,4053,16220,7395,9234,16390,13768, -4933,10965,13602,5294,16474,13133,5940,2327,9097,13856, -20083,14356,16482,5301,1136,15556,5426,20084,5205,1536, -16485,6825,4050,16221,4054,4890,8141,17160,17600,17168, -7004,20102,9381,12220,6650,19258,20086,12226,949,19131, -17372,6441,18676,3888,13285,8967,17384,14890,5907,17822, -18817,17825,5557,15053,8995,12712,4126,7271,6753,11920, -13757,18519,21565,13612,12877,11279,15595,12819,4132,10884, -10988,5185,11762,19698,3280,18018,11199,6940,5139,3478, -17809,2368,4167,18197,21431,1547,4734,4450,894,9617, -10215,20349,15907,3654,9112,16143,4896,17709,10809,17087, -13057,20387,3966,11586,5312,16662,12811,4129,1325,3905, -2438,21121,7807,3703,17995,1574,20589,5806,14045,13298, -13481,4154,3590,7560,1933,11024,1871,8592,20896,4946, -4976,17807,11167,8792,4158,11197,3369,14491,19829,18799, -15174,21569,2561,11419,9171,7417,3691,15261,18169,11706, -6009,19758,16259,1148,4174,3631,3385,12066,12538,10113, -2386,8065,9449,6123,13070,4339,4272,16475,7815,9091, -14427,18828,18829,8697,4116,1603,12457,9450,15808,7283, -15957,6800,8980,7284,10606,15883,2483,19344,19996,6379, -5985,8028,16062,16063,12436,9177,16064,21529,21530,2930, -3912,9178,15424,5986,12891,8699,3212,8103,13184,18833, -14006,15663,4275,4351,18283,16608,8611,19395,21315,18284, -17257,17672,18876,19934,14049,3726,3727,7579,8960,9456, -9337,12407,16227,10740,3149,18588,6062,13114,5562,18135, -18352,6827,2259,13888,11031,1711,15177,12348,13946,15083, -8978,10880,8694,11310,12403,2481,8619,9978,5538,15835, -1439,13591,15719,4523,20678,14324,16281,16052,4887,5168, -5505,9636,18330,12311,9241,9517,6997,20300,6095,5653, -8353,7872,5041,18847,12499,20520,9896,16021,2884,14176, -10974,2146,11916,1913,15375,8289,1162,12914,4545,8648, -3989,6877,1091,19716,20738,5508,8678,12520,1887,1824, -19960,11463,15437,3754,14904,14650,17986,15298,1453,11652, -12262,4194,8660,9349,4403,19507,2516,7275,11587,18651, -2470,3808,19104,8564,21173,15877,3915,6459,13556,5876, -17264,12442,10360,10008,11813,13586,15879,8094,12541,19337, -19394,9455,4735,3916,5571,4927,17069,20437,1626,13993, -1086,15360,9939,5576,17999,14300,8330,1637,14963,16483, -18488,18586,15077,8578,14061,4471,10166,16971,10198,12396, -12397,10169,1647,1648,1649,9894,1650,14104,4766,17778, -18464,20425,14940,18572,10142,4579,4473,4599,14565,1965, -6951,3900,14997,16128,20397,16098,13769,19746,8382,2654, -19190,4531,4532,15237,19187,21280,18819,21782,1491,7834, -15550,1248,3026,15828,15007,1249,14672,4241,5895,13771, -15755,7679,7281,1755,18573,15923,14128,15803,20746,14080, -2706,15463,958,13867,9325,9162,15594,8762,20304,9560, -5234,4266,3258,10564,10179,8556,7421,9285,13227,8202, -853,13008,11947,1347,3559,8733,9043,5556,6864,12140, -8360,15411,21512,13161,8574,14948,4335,2109,15071,6547, -864,10312,13015,4636,10923,11397,5292,8349,11488,10147, -19015,7258,1698,1633,15470,10784,10619,19381,21679,17997, -3607,2199,8460,12588,10383,4135,9209,12607,3152,13019, -3591,6912,21467,19056,2133,1646,21046,14418,3241,20974, -1415,21546,11374,14765,10495,6956,4835,9284,8687,13733, -3027,17366,18510,8385,4406,9387,16898,1799,11629,4341, -1891,8535,4010,15145,19630,16905,18580,6847,5870,14685, -7517,21390,1756,17308,1928,18709,3442,4594,20485,16522, -5633,4347,11931,20081,6382,6647,6807,7372,6298,914, -15509,4665,16526,5535,2114,15055,15511,1864,5203,17055, -9021,10163,15076,15581,18719,16554,11344,15513,10752,1530, -19803,17776,7916,14037,9026,21336,14247,2672,3450,19071, -7008,13700,2490,16534,17373,20416,4666,5899,11030,18425, -11351,2219,17374,10634,20170,11573,3896,16112,4230,6090, -9386,16838,3999,8523,5861,5520,20691,7184,14094,11721, -5035,13681,5704,7659,6048,16886,12515,3831,6423,19398, -8112,19824,1241,20704,5472,3927,10332,13472,2559,14931, -4383,20954,5567,17765,10534,1833,9491,5521,19748,17205, -15644,16755,11192,937,1291,2960,6369,4336,3023,10924, -16807,18627,7365,19254,20615,10194,9882,7638,8164,19794, -6437,10459,5662,11619,3879,7734,9595,14217,9602,19463, -5105,8676,3401,20365,12120,21260,17961,7243,18179,18803, -20960,9324,16796,3239,17202,14129,21206,4635,5554,16460, -19681,19555,3380,9123,19000,6290,2159,10311,7302,14070, -18693,1839,4682,1847,11684,1503,1854,16010,5911,4595, -7373,945,918,17170,19997,4699,12428,17653,10687,19747, -4774,5973,3699,16153,16129,2607,18096,21281,20822,12159, -17670,13783,13992,20049,16573,20851,3405,10478,19486,1848, -1251,8440,16155,19005,13448,12567,13452,8080,12523,20530, -19846,12189,21151,8316,21287,11906,8210,12274,20181,7313, -10084,20692,15346,5026,18511,14608,1509,16157,16158,15009, -10148,10709,12375,15579,21000,13820,15610,3972,18060,13536, -14401,8081,4407,5896,1855,21185,19126,10663,21111,3443, -5897,10156,8240,15046,13185,10815,2666,11394,1149,7076, -6640,1632,10642,19342,20390,10225,19194,2712,1153,9179, -19051,3771,12339,3728,13497,18959,15040,16830,13309,21398, -1570,18602,15797,4007,8688,19621,18055,8314,19684,18730, -2131,11500,13756,7880,10956,12063,3453,7248,5252,8752, -9722,2524,9769,7419,1656,2809,15693,1486,8203,4190, -3269,1330,1250,10503,1576,9201,2634,20605,13048,13883, -12069,18173,17810,8498,3216,7877,9415,21547,2362,14999, -6863,9359,15520,11990,10288,7576,11895,11410,3844,3882, -3374,10065,11824,5826,9015,1010,15408,5903,12684,6005, -9294,5987,16012,17950,16081,8538,4284,2549,17693,15012, -10458,21370,21116,14357,12376,9057,15582,9165,21602,8739, -12738,12739,18408,4596,14062,18409,5304,18612,16815,12383, -3091,12384,12942,4597,6652,12940,6869,19648,15666,13537, -17113,21604,8985,13851,14964,5578,16163,5735,15078,12900, -2541,21015,10168,12228,15614,16972,2044,4045,18417,19908, -21655,14063,14248,12751,21019,14856,10468,16973,10626,20488, -11407,1046,1973,1651,3092,13461,1542,21020,19810,17841, -6471,1802,15154,17462,9989,20467,4157,10172,16165,2087, -3773,7643,15825,18426,10635,20418,7794,6109,19336,8684, -5972,4340,21311,11792,10739,14047,6060,13886,12441,6320, -12916,13374,7107,2156,6686,5310,10996,4898,12296,13942, -17238,6017,7856,5377,3991,19182,2558,5905,5476,6104, -9629,19474,13657,20366,13344,10068,2469,19536,13320,7277, -11589,20961,14936,13444,15859,9087,12705,7619,18477,10839, -14450,20562,14296,16721,9499,2782,4923,13007,13259,12722, -16895,19767,4591,5867,5834,19003,12313,15783,13570,16236, -9290,11039,2942,13813,11562,4936,8979,8696,5024,15073, -19627,19488,10289,13410,1557,10843,13217,1011,10763,10822, -8003,19078,18722,16131,12429,21158,18431,10255,10485,15619, -17346,7226,14862,8249,16976,6529,9544,1653,13779,19096, -1617,17678,13176,21577,15116,8972,14854,16446,16454,16455, -19609,5146,18981,980,1272,1332,3005,15673,13071,8858, -16074,5357,12373,19644,15191,1867,17455,12096,1868,3235, -11348,9893,10298,17459,20178,15675,1723,8889,10361,5192, -13128,8652,13118,9338,14073,9041,3627,4573,17771,13659, -3435,9050,1716,4429,12275,4455,15697,1274,1510,10844, -4937,4389,13821,13454,5389,9092,12221,21297,14301,15271, -15700,9666,1718,15703,12224,15035,10680,19901,16916,2574, -15503,12087,14687,6645,2037,12394,15506,16923,17391,21049, -20486,14840,10846,12223,6813,12049,14242,6918,11042,2205, -9759,11229,9536,4083,13501,4805,19244,13301,17129,14647, -21197,19577,7044,4059,6950,7405,20544,21549,6419,13313, -12521,3288,14472,20240,5434,9625,14998,15778,7245,1548, -2562,8808,1470,17241,18269,13559,20749,8502,14666,5183, -12008,14294,17474,13295,20248,13159,21283,13970,12930,16185, -1498,3382,8780,19843,17431,20658,9014,6637,6293,5423, -4618,9657,1514,2612,15150,11227,3982,10451,4104,5763, -20760,21605,14896,7447,4223,6384,9133,12750,9761,20696, -12229,10711,14023,10754,10755,14112,17843,9947,12902,12903, -11570,9101,11839,1724,13683,4000,4008,11617,6282,17056, -4014,5947,4015,4016,8125,19818,19819,18404,4974,17655, -5734,21606,10199,5737,14269,10962,12713,12714,5050,17829, -19793,16065,12655,9838,5117,12398,1539,12752,17840,2759, -18356,20419,19594,3510,13723,7804,1070,6261,16130,3632, -7116,19631,4274,13162,14135,5994,16100,11398,7866,14428, -1167,19896,12315,10379,16574,6375,10338,20097,4559,4687, -11513,19489,12382,11337,6127,17107,3772,20134,3576,1876, -9183,21155,19571,19578,2683,17032,11770,11922,2865,14181, -18854,1420,21040,1164,4571,5307,10334,21205,20241,16879, -14295,16462,11038,14704,2036,2691,11026,13175,11750,7247, -13405,14132,1532,3601,13042,15263,7812,15467,16915,17146, -11092,1063,9627,15802,16876,21502,1992,9964,21632,14028, -6294,20133,3024,17860,13844,13420,7600,5323,7173,18934, -10064,16877,21284,4615,7434,12364,6125,19046,11107,20846, -12718,12778,18581,3553,4834,13459,8114,8200,9937,21511, -20147,11557,20604,7544,2628,3883,5106,21144,18802,5482, -13455,5912,12279,10089,16160,1102,13413,12495,4942,1520, -7201,16523,8211,3791,1856,19491,5810,12317,11718,17690, -15362,1276,5029,20354,8321,5490,14590,3936,3352,15309, -7822,14759,6316,17370,4390,946,16416,20558,21186,19216, -9941,10664,15935,18834,19050,1773,16480,7636,8828,5730, -17169,5298,6734,9354,4945,8665,17774,4206,8511,15664, -11179,14302,20355,15272,13186,19645,11630,20597,5811,5358, -15096,16725,13415,14202,12572,6602,15789,9569,14139,14140, -8666,11025,2538,9527,21659,16930,19427,14403,21531,12742, -13262,17371,11631,2966,7216,3795,3133,16151,17152,11317, -20897,18395,14537,2531,16009,9447,9053,12133,6378,15657, -17861,5889,15508,9335,1893,7729,16934,8335,9571,18073, -14598,3244,4159,13304,18021,3145,1679,1264,15297,7412, -4832,13000,20847,4836,14189,9637,16150,7253,1874,15356, -8994,13061,1487,17247,17151,6967,7620,9823,7180,2975, -6503,2610,20994,3743,1849,20855,7510,3861,2857,21066, -8266,4205,3233,12374,13846,11793,12047,12654,2799,8465, -12609,4503,3147,21210,10023,2214,9946,21694,17625,20906, -3785,11388,17767,11402,12320,6354,8424,14257,5478,21508, -13168,5561,21129,3938,9166,4598,11667,19061,9058,10463, -8165,2276,7998,10598,10099,21653,9530,11043,21607,21016, -11722,6400,19649,3662,14546,14405,6603,15667,6299,17695, -21193,9137,21608,7205,1564,1565,6604,13581,20281,16375, -16376,19650,2946,13852,3865,6653,9807,18344,13360,13361, -7448,1399,4353,18490,5036,14007,7383,17072,16178,6385, -14693,13973,17957,16555,7387,6063,16700,12091,14064,10170, -10696,14594,14547,5622,21534,15616,15312,18589,5305,19396, -12945,12753,16556,13974,14410,9763,1017,9385,6716,11290, -7223,15792,13462,7391,14406,10756,5384,15136,20992,21555, -13289,8057,19593,9638,16570,15863,7181,12161,4592,14157, -19173,889,17316,10717,2448,8262,1228,15781,21517,19166, -19686,2991,16670,11164,19878,16164,21364,15244,8371,8204, -10662,8331,2743,13305,10537,16808,20153,11424,1045,10161, -1338,17652,19480,4558,1100,12489,11717,10337,15093,5017, -6314,15357,5722,7810,16468,4387,7182,7624,17367,18098, -5356,9513,9742,7363,14589,15787,5809,14136,6597,7186, -13261,10090,21652,4593,9055,2275,5560,11666,11719,3792, -14543,21526,4718,3862,4349,13355,5033,6648,1561,14060, -16975,13418,1664,7224,7220,21211,7564,13363,21316,19390, -20489,8636,18035,1667,19813,13463,17393,1803,7700,18109, -15155,6654,21746,14251,14252,4474,5792,9991,18110,11195, -17005,20303,17344,4720,5624,6317,8883,20282,14065,20420, -5135,5793,14489,9574,2304,9410,14791,922,13889,7225, -17916,6442,14793,9707,9949,10668,11232,20668,17375,4358, -10362,5666,9545,17181,3509,7111,16099,1069,6117,19484, -20351,1840,12310,8663,15924,20279,6315,8873,20352,8508, -19425,12730,14402,1396,2302,15661,16552,16372,13577,7558, -12088,7377,16532,16970,6439,5134,1015,12740,15310,5620, -18585,9384,1663,18034,10753,11288,19386,5790,14249,21745, -9572,3296,18449,3298,13102,10751,7376,8214,13849,5425, -1337,7862,15955,8827,5493,3661,6296,5295,8700,1526, -10296,12841,8887,1721,4051,10966,1087,18336,9837,17442, -16335,2578,17363,18398,15829,15557,19389,1618,9044,10842, -13661,15786,7194,21525,17772,13578,8124,1722,6563,9948, -11335,6712,11068,7115,8509,21235,11070,12745,1016,14361, -9990,3356,2849,19516,17112,18762,13460,4046,9532,13280, -1989,978,4693,19542,16726,18357,16943,13414,5913,20330, -20417,5635,11751,18867,4928,9646,8121,1900,18390,4891, -3787,6968,4792,13905,5114,14538,4793,11309,1252,19844, -20823,6433,13212,4845,4688,16575,7364,14541,19779,4811, -18537,8451,8452,12336,6519,20721,1254,18399,18148,20784, -4552,4794,16576,11978,3353,5261,13874,10091,11223,4938, -16161,11262,9659,1578,21001,5262,19848,3031,13483,17443, -2575,3444,8212,18610,5491,21048,19787,18451,19788,18150, -15821,19789,15736,19253,4117,16698,4391,5577,915,20825, -18406,6193,17450,7285,9942,21187,18487,15662,6269,10453, -13880,11425,5265,13725,7637,17775,22349,22350,22351,22352, -22353,22354,22355,22356,22357,22358,22359,22360,22361,22362, -22363,22364,22365,22366,22367,22368,22369,22370,22371,22372, -22373,22374,22375,22376,22377,22378,22379,22380,22381,22382, -22383,22384,22385,22386,22387,22388,22389,22390,22391,22392, -22393,22394,22395,22396,22397,22398,22399,22400,22401,22402, -22403,22404,22405,22406,22407,22408,22409,22410,22411,22412, -22413,22414,22415,22416,22417,22418,22419,22420,22421,22422, -22423,22424,22425,22426,22427,22428,22429,22430,22431,22432, -22433,22434,22435,22436,22437,22438,22439,22440,22441,22442, -21115,2576,10665,6194,11720,4285,10538,7286,7206,16013, -6521,16177,1902,16724,8351,19801,1865,8539,8540,1398, -16931,8541,8241,15980,7997,15665,4276,4277,8915,5539, -16766,14404,9180,7693,12068,10464,12323,14763,4948,948, -21469,12227,13416,12898,1293,3796,10465,13635,7381,8243, -16029,18152,19850,12743,9531,18720,21371,8784,4246,9059, -14481,12744,7999,19062,19063,8000,21532,9167,3939,12657, -2967,5345,8215,8467,19064,21743,7005,14828,14829,2673, -11194,13853,950,13362,15668,6386,15669,4354,7758,10847, -4949,2947,16014,18345,6133,19909,22443,22444,22445,22446, -22447,22448,22449,22450,22451,22452,22453,22454,22455,22456, -22457,22458,22459,22460,22461,22462,22463,22464,22465,22466, -22467,22468,22469,22470,22471,22472,22473,22474,22475,22476, -22477,22478,22479,22480,22481,22482,22483,22484,22485,22486, -22487,22488,22489,22490,22491,22492,22493,22494,22495,22496, -22497,22498,22499,22500,22501,22502,22503,22504,22505,22506, -22507,22508,22509,22510,22511,22512,22513,22514,22515,22516, -22517,22518,22519,22520,22521,22522,22523,22524,22525,22526, -22527,22528,22529,22530,22531,22532,22533,22534,22535,22536, -12365,9060,10932,6387,19262,2887,16816,8246,3940,2018, -4574,6388,19274,19910,17177,16615,14548,6158,2800,15514, -17114,13975,10171,7096,5494,7388,15251,5992,3035,3036, -19074,18638,18418,7012,9695,15739,8814,15628,15629,19075, -16015,10695,17460,5206,15740,2435,7097,16049,20617,1018, -18614,18764,11983,2674,21022,10200,19391,10484,1543,14859, -21474,19651,16727,8480,19176,15433,14966,7644,19079,6472, -1544,19278,15156,6655,4509,7645,9895,18427,5208,8169, -17227,17228,16016,10723,21747,19814,19280,10472,16050,17229, -18028,19081,12356,14792,10631,16945,22537,22538,22539,22540, -22541,22542,22543,22544,22545,22546,22547,22548,22549,22550, -22551,22552,22553,22554,22555,22556,22557,22558,22559,22560, -22561,22562,22563,22564,22565,22566,22567,22568,22569,22570, -22571,22572,22573,22574,22575,22576,22577,22578,22579,22580, -22581,22582,22583,22584,22585,22586,22587,22588,22589,22590, -22591,22592,22593,22594,22595,22596,22597,22598,22599,22600, -22601,22602,22603,22604,22605,22606,22607,22608,22609,22610, -22611,22612,22613,22614,22615,22616,22617,22618,22619,22620, -22621,22622,22623,22624,22625,22626,22627,22628,22629,22630, -18842,7021,20267,19652,20421,18723,18492,12357,11840,6443, -11083,19281,11032,3640,19985,19815,9439,1903,10363,6162, -10256,14863,19988,19282,5665,13503,9546,10556,14518,2005, -17411,10053,18020,6189,21102,16718,9045,12881,5339,19842, -15130,6120,13349,19016,16612,10149,7082,19017,18757,6557, -20413,11027,14860,10370,7892,10092,7449,17223,3245,7454, -7457,18298,19440,3125,1631,3126,12116,21291,7374,11069, -19691,10164,2433,8512,9983,11668,8166,8513,8001,9682, -17340,18290,7263,11074,9696,20490,8004,12755,10108,18299, -3127,10732,6121,2358,4846,11183,22631,22632,22633,22634, -22635,22636,22637,22638,22639,22640,22641,22642,22643,22644, -22645,22646,22647,22648,22649,22650,22651,22652,22653,22654, -22655,22656,22657,22658,22659,22660,22661,22662,22663,22664, -22665,22666,22667,22668,22669,22670,22671,22672,22673,22674, -22675,22676,22677,22678,22679,22680,22681,22682,22683,22684, -22685,22686,22687,22688,22689,22690,22691,22692,22693,22694, -22695,22696,22697,22698,22699,22700,22701,22702,22703,22704, -22705,22706,22707,22708,22709,22710,22711,22712,22713,22714, -22715,22716,22717,22718,22719,22720,22721,22722,22723,22724, -11184,4848,12124,13524,13457,11426,4849,17310,9168,11186, -2581,4767,13453,11185,11334,11354,21654,11933,4700,6616, -7893,5686,15713,15963,6494,8941,6270,2583,6164,19018, -3408,17051,16090,11399,12939,3744,18341,10950,18346,19980, -3469,18240,18350,18351,20724,20697,3362,1990,18765,10934, -20444,18359,4055,10364,4703,11281,19904,3146,13528,2352, -16206,21192,20828,11044,1019,1668,16166,1545,2344,11133, -3891,21519,5525,3937,4695,19852,2277,5207,2048,19853, -15475,15599,14778,4641,16582,1089,3794,16162,21051,13487, -14480,14591,14593,15867,8247,8002,22725,22726,22727,22728, -22729,22730,22731,22732,22733,22734,22735,22736,22737,22738, -22739,22740,22741,22742,22743,22744,22745,22746,22747,22748, -22749,22750,22751,22752,22753,22754,22755,22756,22757,22758, -22759,22760,22761,22762,22763,22764,22765,22766,22767,22768, -22769,22770,22771,22772,22773,22774,22775,22776,22777,22778, -22779,22780,22781,22782,22783,22784,22785,22786,22787,22788, -22789,22790,22791,22792,22793,22794,22795,22796,22797,22798, -22799,22800,22801,22802,22803,22804,22805,22806,22807,22808, -22809,22810,22811,22812,22813,22814,22815,22816,22817,22818, -6850,8248,18353,15981,14967,17317,9413,18629,16811,16813, -6283,17622,6159,17803,16629,20331,11890,11579,12723,20381, -7207,21533,7013,7019,2635,2453,2454,6131,18172,19174, -17620,1233,20265,14694,21535,2579,18347,8269,15791,10102, -10096,2770,13583,17621,19175,11804,8168,18613,2996,20052, -19693,2815,18878,11669,20266,2998,13512,20053,18358,11984, -4357,16671,19083,3246,21656,3733,2816,7965,18211,6105, -19157,10228,12089,5391,12090,18348,10245,10250,5392,8596, -3306,10109,3307,5731,13364,1670,2914,6136,8483,17557, -19987,9271,9814,5122,9564,9967,22819,22820,22821,22822, -22823,22824,22825,22826,22827,22828,22829,22830,22831,22832, -22833,22834,22835,22836,22837,22838,22839,22840,22841,22842, -22843,22844,22845,22846,22847,22848,22849,22850,22851,22852, -22853,22854,22855,22856,22857,22858,22859,22860,22861,22862, -22863,22864,22865,22866,22867,22868,22869,22870,22871,22872, -22873,22874,22875,22876,22877,22878,22879,22880,22881,22882, -22883,22884,22885,22886,22887,22888,22889,22890,22891,22892, -22893,22894,22895,22896,22897,22898,22899,22900,22901,22902, -22903,22904,22905,22906,22907,22908,22909,22910,22911,22912, -16769,6900,14850,19718,12706,4918,8263,9548,886,5739, -14473,3992,7037,17500,17731,3521,23854,23855,23856,23857, -23858,23859,23860,23861,23862,23863,23864,23865,23866,23867, -23868,23869,23870,23871,23872,23873,23874,23875,23876,23877, -23878,23879,23880,23881,23882,23883,23884,23885,23886,23887, -23888,23889,23890,23891,23892,23893,23894,23895,23896,23897, -23898,23899,23900,23901,23902,23903,23904,23905,23906,23907, -23908,23909,23910,23911,23912,23913,23914,23915,23916,23917, -23918,23919,23920,23921,23922,23923,23924,23925,23926,23927, -23928,23929,23930,23931,23932,23933,22913,22914,22915,22916, -22917,22918,22919,22920,22921,22922,22923,22924,22925,22926, -22927,22928,22929,22930,22931,22932,22933,22934,22935,22936, -22937,22938,22939,22940,22941,22942,22943,22944,22945,22946, -22947,22948,22949,22950,22951,22952,22953,22954,22955,22956, -22957,22958,22959,22960,22961,22962,22963,22964,22965,22966, -22967,22968,22969,22970,22971,22972,22973,22974,22975,22976, -22977,22978,22979,22980,22981,22982,22983,22984,22985,22986, -22987,22988,22989,22990,22991,22992,22993,22994,22995,22996, -22997,22998,22999,23000,23001,23002,23003,23004,23005,23006 -}; - -static uint16 gbksortorder(uint16 i) -{ - uint idx=gbktail(i); - if (idx>0x7f) idx-=0x41; - else idx-=0x40; - idx+=(gbkhead(i)-0x81)*0xbe; - return 0x8100+gbk_order[idx]; -} - - -int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res, - size_t length) -{ - const uchar *a= *a_res, *b= *b_res; - uint a_char,b_char; - - while (length--) - { - if ((length > 0) && isgbkcode(*a,*(a+1)) && isgbkcode(*b, *(b+1))) - { - a_char= gbkcode(*a,*(a+1)); - b_char= gbkcode(*b,*(b+1)); - if (a_char != b_char) - return ((int) gbksortorder((uint16) a_char) - - (int) gbksortorder((uint16) b_char)); - a+= 2; - b+= 2; - length--; - } - else if (sort_order_gbk[*a++] != sort_order_gbk[*b++]) - return ((int) sort_order_gbk[a[-1]] - - (int) sort_order_gbk[b[-1]]); - } - *a_res= a; - *b_res= b; - return 0; -} - - - -int my_strnncoll_gbk(CHARSET_INFO *cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool b_is_prefix) -{ - size_t length= min(a_length, b_length); - int res= my_strnncoll_gbk_internal(&a, &b, length); - return res ? res : (int) ((b_is_prefix ? length : a_length) - b_length); -} - - -static int my_strnncollsp_gbk(CHARSET_INFO * cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool diff_if_only_endspace_difference) -{ - size_t length= min(a_length, b_length); - int res= my_strnncoll_gbk_internal(&a, &b, length); - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - if (!res && a_length != b_length) - { - const uchar *end; - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - /* - Check the next not space character of the longer key. If it's < ' ', - then it's smaller than the other key. - */ - if (a_length < b_length) - { - /* put shorter key in a */ - a_length= b_length; - a= b; - swap= -1; /* swap sign of result */ - res= -res; - } - for (end= a + a_length-length; a < end ; a++) - { - if (*a != ' ') - return (*a < ' ') ? -swap : swap; - } - } - return res; -} - - -static size_t -my_strnxfrm_gbk(CHARSET_INFO *cs, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - uchar *d0= dst; - uchar *de= dst + dstlen; - const uchar *se= src + srclen; - const uchar *sort_order= cs->sort_order; - - for (; dst < de && src < se && nweights; nweights--) - { - if (cs->cset->ismbchar(cs, (const char*) src, (const char*) se)) - { - /* - Note, it is safe not to check (src < se) - in the code below, because ismbchar() would - not return TRUE if src was too short - */ - uint16 e= gbksortorder((uint16) gbkcode(*src, *(src + 1))); - *dst++= gbkhead(e); - if (dst < de) - *dst++= gbktail(e); - src+= 2; - } - else - *dst++= sort_order ? sort_order[*src++] : *src++; - } - return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0); -} - - -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -#define max_sort_char ((uchar) 255) - -static my_bool my_like_range_gbk(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str,char *max_str, - size_t *min_length,size_t *max_length) -{ - const char *end= ptr + ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - size_t charlen= res_length / cs->mbmaxlen; - - for (; ptr != end && min_str != min_end && charlen > 0; ptr++, charlen--) - { - if (ptr+1 != end && isgbkcode(ptr[0],ptr[1])) - { - *min_str++= *max_str++ = *ptr++; - *min_str++= *max_str++ = *ptr; - continue; - } - if (*ptr == escape && ptr+1 != end) - { - ptr++; /* Skip escape */ - if (isgbkcode(ptr[0], ptr[1])) - *min_str++= *max_str++ = *ptr; - if (min_str < min_end) - *min_str++= *max_str++= *ptr; - continue; - } - if (*ptr == w_one) /* '_' in SQL */ - { - *min_str++='\0'; /* This should be min char */ - *max_str++=max_sort_char; - continue; - } - if (*ptr == w_many) /* '%' in SQL */ - { - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - do { - *min_str++= 0; - *max_str++= max_sort_char; - } while (min_str != min_end); - return 0; - } - *min_str++= *max_str++ = *ptr; - } - - *min_length= *max_length = (size_t) (min_str - min_org); - while (min_str != min_end) - *min_str++= *max_str++= ' '; /* Because if key compression */ - return 0; -} - - -static uint ismbchar_gbk(CHARSET_INFO *cs __attribute__((unused)), - const char* p, const char *e) -{ - return (isgbkhead(*(p)) && (e)-(p)>1 && isgbktail(*((p)+1))? 2: 0); -} - -static uint mbcharlen_gbk(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return (isgbkhead(c)? 2 : 1); -} - -/* page 0 0x8140-0xFE4F */ -static uint16 tab_gbk_uni0[]={ -0x4E02,0x4E04,0x4E05,0x4E06,0x4E0F,0x4E12,0x4E17,0x4E1F, -0x4E20,0x4E21,0x4E23,0x4E26,0x4E29,0x4E2E,0x4E2F,0x4E31, -0x4E33,0x4E35,0x4E37,0x4E3C,0x4E40,0x4E41,0x4E42,0x4E44, -0x4E46,0x4E4A,0x4E51,0x4E55,0x4E57,0x4E5A,0x4E5B,0x4E62, -0x4E63,0x4E64,0x4E65,0x4E67,0x4E68,0x4E6A,0x4E6B,0x4E6C, -0x4E6D,0x4E6E,0x4E6F,0x4E72,0x4E74,0x4E75,0x4E76,0x4E77, -0x4E78,0x4E79,0x4E7A,0x4E7B,0x4E7C,0x4E7D,0x4E7F,0x4E80, -0x4E81,0x4E82,0x4E83,0x4E84,0x4E85,0x4E87,0x4E8A, 0, -0x4E90,0x4E96,0x4E97,0x4E99,0x4E9C,0x4E9D,0x4E9E,0x4EA3, -0x4EAA,0x4EAF,0x4EB0,0x4EB1,0x4EB4,0x4EB6,0x4EB7,0x4EB8, -0x4EB9,0x4EBC,0x4EBD,0x4EBE,0x4EC8,0x4ECC,0x4ECF,0x4ED0, -0x4ED2,0x4EDA,0x4EDB,0x4EDC,0x4EE0,0x4EE2,0x4EE6,0x4EE7, -0x4EE9,0x4EED,0x4EEE,0x4EEF,0x4EF1,0x4EF4,0x4EF8,0x4EF9, -0x4EFA,0x4EFC,0x4EFE,0x4F00,0x4F02,0x4F03,0x4F04,0x4F05, -0x4F06,0x4F07,0x4F08,0x4F0B,0x4F0C,0x4F12,0x4F13,0x4F14, -0x4F15,0x4F16,0x4F1C,0x4F1D,0x4F21,0x4F23,0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005,0x5006,0x5007,0x5008,0x5009,0x500A, 0, -0x500B,0x500E,0x5010,0x5011,0x5013,0x5015,0x5016,0x5017, -0x501B,0x501D,0x501E,0x5020,0x5022,0x5023,0x5024,0x5027, -0x502B,0x502F,0x5030,0x5031,0x5032,0x5033,0x5034,0x5035, -0x5036,0x5037,0x5038,0x5039,0x503B,0x503D,0x503F,0x5040, -0x5041,0x5042,0x5044,0x5045,0x5046,0x5049,0x504A,0x504B, -0x504D,0x5050,0x5051,0x5052,0x5053,0x5054,0x5056,0x5057, -0x5058,0x5059,0x505B,0x505D,0x505E,0x505F,0x5060,0x5061, -0x5062,0x5063,0x5064,0x5066,0x5067,0x5068,0x5069,0x506A, -0x506B,0x506D,0x506E,0x506F,0x5070,0x5071,0x5072,0x5073, -0x5074,0x5075,0x5078,0x5079,0x507A,0x507C,0x507D,0x5081, -0x5082,0x5083,0x5084,0x5086,0x5087,0x5089,0x508A,0x508B, -0x508C,0x508E,0x508F,0x5090,0x5091,0x5092,0x5093,0x5094, -0x5095,0x5096,0x5097,0x5098,0x5099,0x509A,0x509B,0x509C, -0x509D,0x509E,0x509F,0x50A0,0x50A1,0x50A2,0x50A4,0x50A6, -0x50AA,0x50AB,0x50AD,0x50AE,0x50AF,0x50B0,0x50B1,0x50B3, -0x50B4,0x50B5,0x50B6,0x50B7,0x50B8,0x50B9,0x50BC, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x50BD,0x50BE,0x50BF,0x50C0,0x50C1,0x50C2,0x50C3,0x50C4, -0x50C5,0x50C6,0x50C7,0x50C8,0x50C9,0x50CA,0x50CB,0x50CC, -0x50CD,0x50CE,0x50D0,0x50D1,0x50D2,0x50D3,0x50D4,0x50D5, -0x50D7,0x50D8,0x50D9,0x50DB,0x50DC,0x50DD,0x50DE,0x50DF, -0x50E0,0x50E1,0x50E2,0x50E3,0x50E4,0x50E5,0x50E8,0x50E9, -0x50EA,0x50EB,0x50EF,0x50F0,0x50F1,0x50F2,0x50F4,0x50F6, -0x50F7,0x50F8,0x50F9,0x50FA,0x50FC,0x50FD,0x50FE,0x50FF, -0x5100,0x5101,0x5102,0x5103,0x5104,0x5105,0x5108, 0, -0x5109,0x510A,0x510C,0x510D,0x510E,0x510F,0x5110,0x5111, -0x5113,0x5114,0x5115,0x5116,0x5117,0x5118,0x5119,0x511A, -0x511B,0x511C,0x511D,0x511E,0x511F,0x5120,0x5122,0x5123, -0x5124,0x5125,0x5126,0x5127,0x5128,0x5129,0x512A,0x512B, -0x512C,0x512D,0x512E,0x512F,0x5130,0x5131,0x5132,0x5133, -0x5134,0x5135,0x5136,0x5137,0x5138,0x5139,0x513A,0x513B, -0x513C,0x513D,0x513E,0x5142,0x5147,0x514A,0x514C,0x514E, -0x514F,0x5150,0x5152,0x5153,0x5157,0x5158,0x5159,0x515B, -0x515D,0x515E,0x515F,0x5160,0x5161,0x5163,0x5164,0x5166, -0x5167,0x5169,0x516A,0x516F,0x5172,0x517A,0x517E,0x517F, -0x5183,0x5184,0x5186,0x5187,0x518A,0x518B,0x518E,0x518F, -0x5190,0x5191,0x5193,0x5194,0x5198,0x519A,0x519D,0x519E, -0x519F,0x51A1,0x51A3,0x51A6,0x51A7,0x51A8,0x51A9,0x51AA, -0x51AD,0x51AE,0x51B4,0x51B8,0x51B9,0x51BA,0x51BE,0x51BF, -0x51C1,0x51C2,0x51C3,0x51C5,0x51C8,0x51CA,0x51CD,0x51CE, -0x51D0,0x51D2,0x51D3,0x51D4,0x51D5,0x51D6,0x51D7, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x51D8,0x51D9,0x51DA,0x51DC,0x51DE,0x51DF,0x51E2,0x51E3, -0x51E5,0x51E6,0x51E7,0x51E8,0x51E9,0x51EA,0x51EC,0x51EE, -0x51F1,0x51F2,0x51F4,0x51F7,0x51FE,0x5204,0x5205,0x5209, -0x520B,0x520C,0x520F,0x5210,0x5213,0x5214,0x5215,0x521C, -0x521E,0x521F,0x5221,0x5222,0x5223,0x5225,0x5226,0x5227, -0x522A,0x522C,0x522F,0x5231,0x5232,0x5234,0x5235,0x523C, -0x523E,0x5244,0x5245,0x5246,0x5247,0x5248,0x5249,0x524B, -0x524E,0x524F,0x5252,0x5253,0x5255,0x5257,0x5258, 0, -0x5259,0x525A,0x525B,0x525D,0x525F,0x5260,0x5262,0x5263, -0x5264,0x5266,0x5268,0x526B,0x526C,0x526D,0x526E,0x5270, -0x5271,0x5273,0x5274,0x5275,0x5276,0x5277,0x5278,0x5279, -0x527A,0x527B,0x527C,0x527E,0x5280,0x5283,0x5284,0x5285, -0x5286,0x5287,0x5289,0x528A,0x528B,0x528C,0x528D,0x528E, -0x528F,0x5291,0x5292,0x5294,0x5295,0x5296,0x5297,0x5298, -0x5299,0x529A,0x529C,0x52A4,0x52A5,0x52A6,0x52A7,0x52AE, -0x52AF,0x52B0,0x52B4,0x52B5,0x52B6,0x52B7,0x52B8,0x52B9, -0x52BA,0x52BB,0x52BC,0x52BD,0x52C0,0x52C1,0x52C2,0x52C4, -0x52C5,0x52C6,0x52C8,0x52CA,0x52CC,0x52CD,0x52CE,0x52CF, -0x52D1,0x52D3,0x52D4,0x52D5,0x52D7,0x52D9,0x52DA,0x52DB, -0x52DC,0x52DD,0x52DE,0x52E0,0x52E1,0x52E2,0x52E3,0x52E5, -0x52E6,0x52E7,0x52E8,0x52E9,0x52EA,0x52EB,0x52EC,0x52ED, -0x52EE,0x52EF,0x52F1,0x52F2,0x52F3,0x52F4,0x52F5,0x52F6, -0x52F7,0x52F8,0x52FB,0x52FC,0x52FD,0x5301,0x5302,0x5303, -0x5304,0x5307,0x5309,0x530A,0x530B,0x530C,0x530E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5311,0x5312,0x5313,0x5314,0x5318,0x531B,0x531C,0x531E, -0x531F,0x5322,0x5324,0x5325,0x5327,0x5328,0x5329,0x532B, -0x532C,0x532D,0x532F,0x5330,0x5331,0x5332,0x5333,0x5334, -0x5335,0x5336,0x5337,0x5338,0x533C,0x533D,0x5340,0x5342, -0x5344,0x5346,0x534B,0x534C,0x534D,0x5350,0x5354,0x5358, -0x5359,0x535B,0x535D,0x5365,0x5368,0x536A,0x536C,0x536D, -0x5372,0x5376,0x5379,0x537B,0x537C,0x537D,0x537E,0x5380, -0x5381,0x5383,0x5387,0x5388,0x538A,0x538E,0x538F, 0, -0x5390,0x5391,0x5392,0x5393,0x5394,0x5396,0x5397,0x5399, -0x539B,0x539C,0x539E,0x53A0,0x53A1,0x53A4,0x53A7,0x53AA, -0x53AB,0x53AC,0x53AD,0x53AF,0x53B0,0x53B1,0x53B2,0x53B3, -0x53B4,0x53B5,0x53B7,0x53B8,0x53B9,0x53BA,0x53BC,0x53BD, -0x53BE,0x53C0,0x53C3,0x53C4,0x53C5,0x53C6,0x53C7,0x53CE, -0x53CF,0x53D0,0x53D2,0x53D3,0x53D5,0x53DA,0x53DC,0x53DD, -0x53DE,0x53E1,0x53E2,0x53E7,0x53F4,0x53FA,0x53FE,0x53FF, -0x5400,0x5402,0x5405,0x5407,0x540B,0x5414,0x5418,0x5419, -0x541A,0x541C,0x5422,0x5424,0x5425,0x542A,0x5430,0x5433, -0x5436,0x5437,0x543A,0x543D,0x543F,0x5441,0x5442,0x5444, -0x5445,0x5447,0x5449,0x544C,0x544D,0x544E,0x544F,0x5451, -0x545A,0x545D,0x545E,0x545F,0x5460,0x5461,0x5463,0x5465, -0x5467,0x5469,0x546A,0x546B,0x546C,0x546D,0x546E,0x546F, -0x5470,0x5474,0x5479,0x547A,0x547E,0x547F,0x5481,0x5483, -0x5485,0x5487,0x5488,0x5489,0x548A,0x548D,0x5491,0x5493, -0x5497,0x5498,0x549C,0x549E,0x549F,0x54A0,0x54A1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x54A2,0x54A5,0x54AE,0x54B0,0x54B2,0x54B5,0x54B6,0x54B7, -0x54B9,0x54BA,0x54BC,0x54BE,0x54C3,0x54C5,0x54CA,0x54CB, -0x54D6,0x54D8,0x54DB,0x54E0,0x54E1,0x54E2,0x54E3,0x54E4, -0x54EB,0x54EC,0x54EF,0x54F0,0x54F1,0x54F4,0x54F5,0x54F6, -0x54F7,0x54F8,0x54F9,0x54FB,0x54FE,0x5500,0x5502,0x5503, -0x5504,0x5505,0x5508,0x550A,0x550B,0x550C,0x550D,0x550E, -0x5512,0x5513,0x5515,0x5516,0x5517,0x5518,0x5519,0x551A, -0x551C,0x551D,0x551E,0x551F,0x5521,0x5525,0x5526, 0, -0x5528,0x5529,0x552B,0x552D,0x5532,0x5534,0x5535,0x5536, -0x5538,0x5539,0x553A,0x553B,0x553D,0x5540,0x5542,0x5545, -0x5547,0x5548,0x554B,0x554C,0x554D,0x554E,0x554F,0x5551, -0x5552,0x5553,0x5554,0x5557,0x5558,0x5559,0x555A,0x555B, -0x555D,0x555E,0x555F,0x5560,0x5562,0x5563,0x5568,0x5569, -0x556B,0x556F,0x5570,0x5571,0x5572,0x5573,0x5574,0x5579, -0x557A,0x557D,0x557F,0x5585,0x5586,0x558C,0x558D,0x558E, -0x5590,0x5592,0x5593,0x5595,0x5596,0x5597,0x559A,0x559B, -0x559E,0x55A0,0x55A1,0x55A2,0x55A3,0x55A4,0x55A5,0x55A6, -0x55A8,0x55A9,0x55AA,0x55AB,0x55AC,0x55AD,0x55AE,0x55AF, -0x55B0,0x55B2,0x55B4,0x55B6,0x55B8,0x55BA,0x55BC,0x55BF, -0x55C0,0x55C1,0x55C2,0x55C3,0x55C6,0x55C7,0x55C8,0x55CA, -0x55CB,0x55CE,0x55CF,0x55D0,0x55D5,0x55D7,0x55D8,0x55D9, -0x55DA,0x55DB,0x55DE,0x55E0,0x55E2,0x55E7,0x55E9,0x55ED, -0x55EE,0x55F0,0x55F1,0x55F4,0x55F6,0x55F8,0x55F9,0x55FA, -0x55FB,0x55FC,0x55FF,0x5602,0x5603,0x5604,0x5605, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5606,0x5607,0x560A,0x560B,0x560D,0x5610,0x5611,0x5612, -0x5613,0x5614,0x5615,0x5616,0x5617,0x5619,0x561A,0x561C, -0x561D,0x5620,0x5621,0x5622,0x5625,0x5626,0x5628,0x5629, -0x562A,0x562B,0x562E,0x562F,0x5630,0x5633,0x5635,0x5637, -0x5638,0x563A,0x563C,0x563D,0x563E,0x5640,0x5641,0x5642, -0x5643,0x5644,0x5645,0x5646,0x5647,0x5648,0x5649,0x564A, -0x564B,0x564F,0x5650,0x5651,0x5652,0x5653,0x5655,0x5656, -0x565A,0x565B,0x565D,0x565E,0x565F,0x5660,0x5661, 0, -0x5663,0x5665,0x5666,0x5667,0x566D,0x566E,0x566F,0x5670, -0x5672,0x5673,0x5674,0x5675,0x5677,0x5678,0x5679,0x567A, -0x567D,0x567E,0x567F,0x5680,0x5681,0x5682,0x5683,0x5684, -0x5687,0x5688,0x5689,0x568A,0x568B,0x568C,0x568D,0x5690, -0x5691,0x5692,0x5694,0x5695,0x5696,0x5697,0x5698,0x5699, -0x569A,0x569B,0x569C,0x569D,0x569E,0x569F,0x56A0,0x56A1, -0x56A2,0x56A4,0x56A5,0x56A6,0x56A7,0x56A8,0x56A9,0x56AA, -0x56AB,0x56AC,0x56AD,0x56AE,0x56B0,0x56B1,0x56B2,0x56B3, -0x56B4,0x56B5,0x56B6,0x56B8,0x56B9,0x56BA,0x56BB,0x56BD, -0x56BE,0x56BF,0x56C0,0x56C1,0x56C2,0x56C3,0x56C4,0x56C5, -0x56C6,0x56C7,0x56C8,0x56C9,0x56CB,0x56CC,0x56CD,0x56CE, -0x56CF,0x56D0,0x56D1,0x56D2,0x56D3,0x56D5,0x56D6,0x56D8, -0x56D9,0x56DC,0x56E3,0x56E5,0x56E6,0x56E7,0x56E8,0x56E9, -0x56EA,0x56EC,0x56EE,0x56EF,0x56F2,0x56F3,0x56F6,0x56F7, -0x56F8,0x56FB,0x56FC,0x5700,0x5701,0x5702,0x5705,0x5707, -0x570B,0x570C,0x570D,0x570E,0x570F,0x5710,0x5711, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5712,0x5713,0x5714,0x5715,0x5716,0x5717,0x5718,0x5719, -0x571A,0x571B,0x571D,0x571E,0x5720,0x5721,0x5722,0x5724, -0x5725,0x5726,0x5727,0x572B,0x5731,0x5732,0x5734,0x5735, -0x5736,0x5737,0x5738,0x573C,0x573D,0x573F,0x5741,0x5743, -0x5744,0x5745,0x5746,0x5748,0x5749,0x574B,0x5752,0x5753, -0x5754,0x5755,0x5756,0x5758,0x5759,0x5762,0x5763,0x5765, -0x5767,0x576C,0x576E,0x5770,0x5771,0x5772,0x5774,0x5775, -0x5778,0x5779,0x577A,0x577D,0x577E,0x577F,0x5780, 0, -0x5781,0x5787,0x5788,0x5789,0x578A,0x578D,0x578E,0x578F, -0x5790,0x5791,0x5794,0x5795,0x5796,0x5797,0x5798,0x5799, -0x579A,0x579C,0x579D,0x579E,0x579F,0x57A5,0x57A8,0x57AA, -0x57AC,0x57AF,0x57B0,0x57B1,0x57B3,0x57B5,0x57B6,0x57B7, -0x57B9,0x57BA,0x57BB,0x57BC,0x57BD,0x57BE,0x57BF,0x57C0, -0x57C1,0x57C4,0x57C5,0x57C6,0x57C7,0x57C8,0x57C9,0x57CA, -0x57CC,0x57CD,0x57D0,0x57D1,0x57D3,0x57D6,0x57D7,0x57DB, -0x57DC,0x57DE,0x57E1,0x57E2,0x57E3,0x57E5,0x57E6,0x57E7, -0x57E8,0x57E9,0x57EA,0x57EB,0x57EC,0x57EE,0x57F0,0x57F1, -0x57F2,0x57F3,0x57F5,0x57F6,0x57F7,0x57FB,0x57FC,0x57FE, -0x57FF,0x5801,0x5803,0x5804,0x5805,0x5808,0x5809,0x580A, -0x580C,0x580E,0x580F,0x5810,0x5812,0x5813,0x5814,0x5816, -0x5817,0x5818,0x581A,0x581B,0x581C,0x581D,0x581F,0x5822, -0x5823,0x5825,0x5826,0x5827,0x5828,0x5829,0x582B,0x582C, -0x582D,0x582E,0x582F,0x5831,0x5832,0x5833,0x5834,0x5836, -0x5837,0x5838,0x5839,0x583A,0x583B,0x583C,0x583D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x583E,0x583F,0x5840,0x5841,0x5842,0x5843,0x5845,0x5846, -0x5847,0x5848,0x5849,0x584A,0x584B,0x584E,0x584F,0x5850, -0x5852,0x5853,0x5855,0x5856,0x5857,0x5859,0x585A,0x585B, -0x585C,0x585D,0x585F,0x5860,0x5861,0x5862,0x5863,0x5864, -0x5866,0x5867,0x5868,0x5869,0x586A,0x586D,0x586E,0x586F, -0x5870,0x5871,0x5872,0x5873,0x5874,0x5875,0x5876,0x5877, -0x5878,0x5879,0x587A,0x587B,0x587C,0x587D,0x587F,0x5882, -0x5884,0x5886,0x5887,0x5888,0x588A,0x588B,0x588C, 0, -0x588D,0x588E,0x588F,0x5890,0x5891,0x5894,0x5895,0x5896, -0x5897,0x5898,0x589B,0x589C,0x589D,0x58A0,0x58A1,0x58A2, -0x58A3,0x58A4,0x58A5,0x58A6,0x58A7,0x58AA,0x58AB,0x58AC, -0x58AD,0x58AE,0x58AF,0x58B0,0x58B1,0x58B2,0x58B3,0x58B4, -0x58B5,0x58B6,0x58B7,0x58B8,0x58B9,0x58BA,0x58BB,0x58BD, -0x58BE,0x58BF,0x58C0,0x58C2,0x58C3,0x58C4,0x58C6,0x58C7, -0x58C8,0x58C9,0x58CA,0x58CB,0x58CC,0x58CD,0x58CE,0x58CF, -0x58D0,0x58D2,0x58D3,0x58D4,0x58D6,0x58D7,0x58D8,0x58D9, -0x58DA,0x58DB,0x58DC,0x58DD,0x58DE,0x58DF,0x58E0,0x58E1, -0x58E2,0x58E3,0x58E5,0x58E6,0x58E7,0x58E8,0x58E9,0x58EA, -0x58ED,0x58EF,0x58F1,0x58F2,0x58F4,0x58F5,0x58F7,0x58F8, -0x58FA,0x58FB,0x58FC,0x58FD,0x58FE,0x58FF,0x5900,0x5901, -0x5903,0x5905,0x5906,0x5908,0x5909,0x590A,0x590B,0x590C, -0x590E,0x5910,0x5911,0x5912,0x5913,0x5917,0x5918,0x591B, -0x591D,0x591E,0x5920,0x5921,0x5922,0x5923,0x5926,0x5928, -0x592C,0x5930,0x5932,0x5933,0x5935,0x5936,0x593B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x593D,0x593E,0x593F,0x5940,0x5943,0x5945,0x5946,0x594A, -0x594C,0x594D,0x5950,0x5952,0x5953,0x5959,0x595B,0x595C, -0x595D,0x595E,0x595F,0x5961,0x5963,0x5964,0x5966,0x5967, -0x5968,0x5969,0x596A,0x596B,0x596C,0x596D,0x596E,0x596F, -0x5970,0x5971,0x5972,0x5975,0x5977,0x597A,0x597B,0x597C, -0x597E,0x597F,0x5980,0x5985,0x5989,0x598B,0x598C,0x598E, -0x598F,0x5990,0x5991,0x5994,0x5995,0x5998,0x599A,0x599B, -0x599C,0x599D,0x599F,0x59A0,0x59A1,0x59A2,0x59A6, 0, -0x59A7,0x59AC,0x59AD,0x59B0,0x59B1,0x59B3,0x59B4,0x59B5, -0x59B6,0x59B7,0x59B8,0x59BA,0x59BC,0x59BD,0x59BF,0x59C0, -0x59C1,0x59C2,0x59C3,0x59C4,0x59C5,0x59C7,0x59C8,0x59C9, -0x59CC,0x59CD,0x59CE,0x59CF,0x59D5,0x59D6,0x59D9,0x59DB, -0x59DE,0x59DF,0x59E0,0x59E1,0x59E2,0x59E4,0x59E6,0x59E7, -0x59E9,0x59EA,0x59EB,0x59ED,0x59EE,0x59EF,0x59F0,0x59F1, -0x59F2,0x59F3,0x59F4,0x59F5,0x59F6,0x59F7,0x59F8,0x59FA, -0x59FC,0x59FD,0x59FE,0x5A00,0x5A02,0x5A0A,0x5A0B,0x5A0D, -0x5A0E,0x5A0F,0x5A10,0x5A12,0x5A14,0x5A15,0x5A16,0x5A17, -0x5A19,0x5A1A,0x5A1B,0x5A1D,0x5A1E,0x5A21,0x5A22,0x5A24, -0x5A26,0x5A27,0x5A28,0x5A2A,0x5A2B,0x5A2C,0x5A2D,0x5A2E, -0x5A2F,0x5A30,0x5A33,0x5A35,0x5A37,0x5A38,0x5A39,0x5A3A, -0x5A3B,0x5A3D,0x5A3E,0x5A3F,0x5A41,0x5A42,0x5A43,0x5A44, -0x5A45,0x5A47,0x5A48,0x5A4B,0x5A4C,0x5A4D,0x5A4E,0x5A4F, -0x5A50,0x5A51,0x5A52,0x5A53,0x5A54,0x5A56,0x5A57,0x5A58, -0x5A59,0x5A5B,0x5A5C,0x5A5D,0x5A5E,0x5A5F,0x5A60, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5A61,0x5A63,0x5A64,0x5A65,0x5A66,0x5A68,0x5A69,0x5A6B, -0x5A6C,0x5A6D,0x5A6E,0x5A6F,0x5A70,0x5A71,0x5A72,0x5A73, -0x5A78,0x5A79,0x5A7B,0x5A7C,0x5A7D,0x5A7E,0x5A80,0x5A81, -0x5A82,0x5A83,0x5A84,0x5A85,0x5A86,0x5A87,0x5A88,0x5A89, -0x5A8A,0x5A8B,0x5A8C,0x5A8D,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CEF, -0x5CF1,0x5CF2,0x5CF3,0x5CF4,0x5CF5,0x5CF6,0x5CF7,0x5CF8, -0x5CF9,0x5CFA,0x5CFC,0x5CFD,0x5CFE,0x5CFF,0x5D00, 0, -0x5D01,0x5D04,0x5D05,0x5D08,0x5D09,0x5D0A,0x5D0B,0x5D0C, -0x5D0D,0x5D0F,0x5D10,0x5D11,0x5D12,0x5D13,0x5D15,0x5D17, -0x5D18,0x5D19,0x5D1A,0x5D1C,0x5D1D,0x5D1F,0x5D20,0x5D21, -0x5D22,0x5D23,0x5D25,0x5D28,0x5D2A,0x5D2B,0x5D2C,0x5D2F, -0x5D30,0x5D31,0x5D32,0x5D33,0x5D35,0x5D36,0x5D37,0x5D38, -0x5D39,0x5D3A,0x5D3B,0x5D3C,0x5D3F,0x5D40,0x5D41,0x5D42, -0x5D43,0x5D44,0x5D45,0x5D46,0x5D48,0x5D49,0x5D4D,0x5D4E, -0x5D4F,0x5D50,0x5D51,0x5D52,0x5D53,0x5D54,0x5D55,0x5D56, -0x5D57,0x5D59,0x5D5A,0x5D5C,0x5D5E,0x5D5F,0x5D60,0x5D61, -0x5D62,0x5D63,0x5D64,0x5D65,0x5D66,0x5D67,0x5D68,0x5D6A, -0x5D6D,0x5D6E,0x5D70,0x5D71,0x5D72,0x5D73,0x5D75,0x5D76, -0x5D77,0x5D78,0x5D79,0x5D7A,0x5D7B,0x5D7C,0x5D7D,0x5D7E, -0x5D7F,0x5D80,0x5D81,0x5D83,0x5D84,0x5D85,0x5D86,0x5D87, -0x5D88,0x5D89,0x5D8A,0x5D8B,0x5D8C,0x5D8D,0x5D8E,0x5D8F, -0x5D90,0x5D91,0x5D92,0x5D93,0x5D94,0x5D95,0x5D96,0x5D97, -0x5D98,0x5D9A,0x5D9B,0x5D9C,0x5D9E,0x5D9F,0x5DA0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,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, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6008,0x6009,0x600B,0x600C,0x6010,0x6011,0x6013,0x6017, -0x6018,0x601A,0x601E,0x601F,0x6022,0x6023,0x6024,0x602C, -0x602D,0x602E,0x6030,0x6031,0x6032,0x6033,0x6034,0x6036, -0x6037,0x6038,0x6039,0x603A,0x603D,0x603E,0x6040,0x6044, -0x6045,0x6046,0x6047,0x6048,0x6049,0x604A,0x604C,0x604E, -0x604F,0x6051,0x6053,0x6054,0x6056,0x6057,0x6058,0x605B, -0x605C,0x605E,0x605F,0x6060,0x6061,0x6065,0x6066,0x606E, -0x6071,0x6072,0x6074,0x6075,0x6077,0x607E,0x6080, 0, -0x6081,0x6082,0x6085,0x6086,0x6087,0x6088,0x608A,0x608B, -0x608E,0x608F,0x6090,0x6091,0x6093,0x6095,0x6097,0x6098, -0x6099,0x609C,0x609E,0x60A1,0x60A2,0x60A4,0x60A5,0x60A7, -0x60A9,0x60AA,0x60AE,0x60B0,0x60B3,0x60B5,0x60B6,0x60B7, -0x60B9,0x60BA,0x60BD,0x60BE,0x60BF,0x60C0,0x60C1,0x60C2, -0x60C3,0x60C4,0x60C7,0x60C8,0x60C9,0x60CC,0x60CD,0x60CE, -0x60CF,0x60D0,0x60D2,0x60D3,0x60D4,0x60D6,0x60D7,0x60D9, -0x60DB,0x60DE,0x60E1,0x60E2,0x60E3,0x60E4,0x60E5,0x60EA, -0x60F1,0x60F2,0x60F5,0x60F7,0x60F8,0x60FB,0x60FC,0x60FD, -0x60FE,0x60FF,0x6102,0x6103,0x6104,0x6105,0x6107,0x610A, -0x610B,0x610C,0x6110,0x6111,0x6112,0x6113,0x6114,0x6116, -0x6117,0x6118,0x6119,0x611B,0x611C,0x611D,0x611E,0x6121, -0x6122,0x6125,0x6128,0x6129,0x612A,0x612C,0x612D,0x612E, -0x612F,0x6130,0x6131,0x6132,0x6133,0x6134,0x6135,0x6136, -0x6137,0x6138,0x6139,0x613A,0x613B,0x613C,0x613D,0x613E, -0x6140,0x6141,0x6142,0x6143,0x6144,0x6145,0x6146, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6147,0x6149,0x614B,0x614D,0x614F,0x6150,0x6152,0x6153, -0x6154,0x6156,0x6157,0x6158,0x6159,0x615A,0x615B,0x615C, -0x615E,0x615F,0x6160,0x6161,0x6163,0x6164,0x6165,0x6166, -0x6169,0x616A,0x616B,0x616C,0x616D,0x616E,0x616F,0x6171, -0x6172,0x6173,0x6174,0x6176,0x6178,0x6179,0x617A,0x617B, -0x617C,0x617D,0x617E,0x617F,0x6180,0x6181,0x6182,0x6183, -0x6184,0x6185,0x6186,0x6187,0x6188,0x6189,0x618A,0x618C, -0x618D,0x618F,0x6190,0x6191,0x6192,0x6193,0x6195, 0, -0x6196,0x6197,0x6198,0x6199,0x619A,0x619B,0x619C,0x619E, -0x619F,0x61A0,0x61A1,0x61A2,0x61A3,0x61A4,0x61A5,0x61A6, -0x61AA,0x61AB,0x61AD,0x61AE,0x61AF,0x61B0,0x61B1,0x61B2, -0x61B3,0x61B4,0x61B5,0x61B6,0x61B8,0x61B9,0x61BA,0x61BB, -0x61BC,0x61BD,0x61BF,0x61C0,0x61C1,0x61C3,0x61C4,0x61C5, -0x61C6,0x61C7,0x61C9,0x61CC,0x61CD,0x61CE,0x61CF,0x61D0, -0x61D3,0x61D5,0x61D6,0x61D7,0x61D8,0x61D9,0x61DA,0x61DB, -0x61DC,0x61DD,0x61DE,0x61DF,0x61E0,0x61E1,0x61E2,0x61E3, -0x61E4,0x61E5,0x61E7,0x61E8,0x61E9,0x61EA,0x61EB,0x61EC, -0x61ED,0x61EE,0x61EF,0x61F0,0x61F1,0x61F2,0x61F3,0x61F4, -0x61F6,0x61F7,0x61F8,0x61F9,0x61FA,0x61FB,0x61FC,0x61FD, -0x61FE,0x6200,0x6201,0x6202,0x6203,0x6204,0x6205,0x6207, -0x6209,0x6213,0x6214,0x6219,0x621C,0x621D,0x621E,0x6220, -0x6223,0x6226,0x6227,0x6228,0x6229,0x622B,0x622D,0x622F, -0x6230,0x6231,0x6232,0x6235,0x6236,0x6238,0x6239,0x623A, -0x623B,0x623C,0x6242,0x6244,0x6245,0x6246,0x624A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x624F,0x6250,0x6255,0x6256,0x6257,0x6259,0x625A,0x625C, -0x625D,0x625E,0x625F,0x6260,0x6261,0x6262,0x6264,0x6265, -0x6268,0x6271,0x6272,0x6274,0x6275,0x6277,0x6278,0x627A, -0x627B,0x627D,0x6281,0x6282,0x6283,0x6285,0x6286,0x6287, -0x6288,0x628B,0x628C,0x628D,0x628E,0x628F,0x6290,0x6294, -0x6299,0x629C,0x629D,0x629E,0x62A3,0x62A6,0x62A7,0x62A9, -0x62AA,0x62AD,0x62AE,0x62AF,0x62B0,0x62B2,0x62B3,0x62B4, -0x62B6,0x62B7,0x62B8,0x62BA,0x62BE,0x62C0,0x62C1, 0, -0x62C3,0x62CB,0x62CF,0x62D1,0x62D5,0x62DD,0x62DE,0x62E0, -0x62E1,0x62E4,0x62EA,0x62EB,0x62F0,0x62F2,0x62F5,0x62F8, -0x62F9,0x62FA,0x62FB,0x6300,0x6303,0x6304,0x6305,0x6306, -0x630A,0x630B,0x630C,0x630D,0x630F,0x6310,0x6312,0x6313, -0x6314,0x6315,0x6317,0x6318,0x6319,0x631C,0x6326,0x6327, -0x6329,0x632C,0x632D,0x632E,0x6330,0x6331,0x6333,0x6334, -0x6335,0x6336,0x6337,0x6338,0x633B,0x633C,0x633E,0x633F, -0x6340,0x6341,0x6344,0x6347,0x6348,0x634A,0x6351,0x6352, -0x6353,0x6354,0x6356,0x6357,0x6358,0x6359,0x635A,0x635B, -0x635C,0x635D,0x6360,0x6364,0x6365,0x6366,0x6368,0x636A, -0x636B,0x636C,0x636F,0x6370,0x6372,0x6373,0x6374,0x6375, -0x6378,0x6379,0x637C,0x637D,0x637E,0x637F,0x6381,0x6383, -0x6384,0x6385,0x6386,0x638B,0x638D,0x6391,0x6393,0x6394, -0x6395,0x6397,0x6399,0x639A,0x639B,0x639C,0x639D,0x639E, -0x639F,0x63A1,0x63A4,0x63A6,0x63AB,0x63AF,0x63B1,0x63B2, -0x63B5,0x63B6,0x63B9,0x63BB,0x63BD,0x63BF,0x63C0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x63C1,0x63C2,0x63C3,0x63C5,0x63C7,0x63C8,0x63CA,0x63CB, -0x63CC,0x63D1,0x63D3,0x63D4,0x63D5,0x63D7,0x63D8,0x63D9, -0x63DA,0x63DB,0x63DC,0x63DD,0x63DF,0x63E2,0x63E4,0x63E5, -0x63E6,0x63E7,0x63E8,0x63EB,0x63EC,0x63EE,0x63EF,0x63F0, -0x63F1,0x63F3,0x63F5,0x63F7,0x63F9,0x63FA,0x63FB,0x63FC, -0x63FE,0x6403,0x6404,0x6406,0x6407,0x6408,0x6409,0x640A, -0x640D,0x640E,0x6411,0x6412,0x6415,0x6416,0x6417,0x6418, -0x6419,0x641A,0x641D,0x641F,0x6422,0x6423,0x6424, 0, -0x6425,0x6427,0x6428,0x6429,0x642B,0x642E,0x642F,0x6430, -0x6431,0x6432,0x6433,0x6435,0x6436,0x6437,0x6438,0x6439, -0x643B,0x643C,0x643E,0x6440,0x6442,0x6443,0x6449,0x644B, -0x644C,0x644D,0x644E,0x644F,0x6450,0x6451,0x6453,0x6455, -0x6456,0x6457,0x6459,0x645A,0x645B,0x645C,0x645D,0x645F, -0x6460,0x6461,0x6462,0x6463,0x6464,0x6465,0x6466,0x6468, -0x646A,0x646B,0x646C,0x646E,0x646F,0x6470,0x6471,0x6472, -0x6473,0x6474,0x6475,0x6476,0x6477,0x647B,0x647C,0x647D, -0x647E,0x647F,0x6480,0x6481,0x6483,0x6486,0x6488,0x6489, -0x648A,0x648B,0x648C,0x648D,0x648E,0x648F,0x6490,0x6493, -0x6494,0x6497,0x6498,0x649A,0x649B,0x649C,0x649D,0x649F, -0x64A0,0x64A1,0x64A2,0x64A3,0x64A5,0x64A6,0x64A7,0x64A8, -0x64AA,0x64AB,0x64AF,0x64B1,0x64B2,0x64B3,0x64B4,0x64B6, -0x64B9,0x64BB,0x64BD,0x64BE,0x64BF,0x64C1,0x64C3,0x64C4, -0x64C6,0x64C7,0x64C8,0x64C9,0x64CA,0x64CB,0x64CC,0x64CF, -0x64D1,0x64D3,0x64D4,0x64D5,0x64D6,0x64D9,0x64DA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x64DB,0x64DC,0x64DD,0x64DF,0x64E0,0x64E1,0x64E3,0x64E5, -0x64E7,0x64E8,0x64E9,0x64EA,0x64EB,0x64EC,0x64ED,0x64EE, -0x64EF,0x64F0,0x64F1,0x64F2,0x64F3,0x64F4,0x64F5,0x64F6, -0x64F7,0x64F8,0x64F9,0x64FA,0x64FB,0x64FC,0x64FD,0x64FE, -0x64FF,0x6501,0x6502,0x6503,0x6504,0x6505,0x6506,0x6507, -0x6508,0x650A,0x650B,0x650C,0x650D,0x650E,0x650F,0x6510, -0x6511,0x6513,0x6514,0x6515,0x6516,0x6517,0x6519,0x651A, -0x651B,0x651C,0x651D,0x651E,0x651F,0x6520,0x6521, 0, -0x6522,0x6523,0x6524,0x6526,0x6527,0x6528,0x6529,0x652A, -0x652C,0x652D,0x6530,0x6531,0x6532,0x6533,0x6537,0x653A, -0x653C,0x653D,0x6540,0x6541,0x6542,0x6543,0x6544,0x6546, -0x6547,0x654A,0x654B,0x654D,0x654E,0x6550,0x6552,0x6553, -0x6554,0x6557,0x6558,0x655A,0x655C,0x655F,0x6560,0x6561, -0x6564,0x6565,0x6567,0x6568,0x6569,0x656A,0x656D,0x656E, -0x656F,0x6571,0x6573,0x6575,0x6576,0x6578,0x6579,0x657A, -0x657B,0x657C,0x657D,0x657E,0x657F,0x6580,0x6581,0x6582, -0x6583,0x6584,0x6585,0x6586,0x6588,0x6589,0x658A,0x658D, -0x658E,0x658F,0x6592,0x6594,0x6595,0x6596,0x6598,0x659A, -0x659D,0x659E,0x65A0,0x65A2,0x65A3,0x65A6,0x65A8,0x65AA, -0x65AC,0x65AE,0x65B1,0x65B2,0x65B3,0x65B4,0x65B5,0x65B6, -0x65B7,0x65B8,0x65BA,0x65BB,0x65BE,0x65BF,0x65C0,0x65C2, -0x65C7,0x65C8,0x65C9,0x65CA,0x65CD,0x65D0,0x65D1,0x65D3, -0x65D4,0x65D5,0x65D8,0x65D9,0x65DA,0x65DB,0x65DC,0x65DD, -0x65DE,0x65DF,0x65E1,0x65E3,0x65E4,0x65EA,0x65EB, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x65F2,0x65F3,0x65F4,0x65F5,0x65F8,0x65F9,0x65FB,0x65FC, -0x65FD,0x65FE,0x65FF,0x6601,0x6604,0x6605,0x6607,0x6608, -0x6609,0x660B,0x660D,0x6610,0x6611,0x6612,0x6616,0x6617, -0x6618,0x661A,0x661B,0x661C,0x661E,0x6621,0x6622,0x6623, -0x6624,0x6626,0x6629,0x662A,0x662B,0x662C,0x662E,0x6630, -0x6632,0x6633,0x6637,0x6638,0x6639,0x663A,0x663B,0x663D, -0x663F,0x6640,0x6642,0x6644,0x6645,0x6646,0x6647,0x6648, -0x6649,0x664A,0x664D,0x664E,0x6650,0x6651,0x6658, 0, -0x6659,0x665B,0x665C,0x665D,0x665E,0x6660,0x6662,0x6663, -0x6665,0x6667,0x6669,0x666A,0x666B,0x666C,0x666D,0x6671, -0x6672,0x6673,0x6675,0x6678,0x6679,0x667B,0x667C,0x667D, -0x667F,0x6680,0x6681,0x6683,0x6685,0x6686,0x6688,0x6689, -0x668A,0x668B,0x668D,0x668E,0x668F,0x6690,0x6692,0x6693, -0x6694,0x6695,0x6698,0x6699,0x669A,0x669B,0x669C,0x669E, -0x669F,0x66A0,0x66A1,0x66A2,0x66A3,0x66A4,0x66A5,0x66A6, -0x66A9,0x66AA,0x66AB,0x66AC,0x66AD,0x66AF,0x66B0,0x66B1, -0x66B2,0x66B3,0x66B5,0x66B6,0x66B7,0x66B8,0x66BA,0x66BB, -0x66BC,0x66BD,0x66BF,0x66C0,0x66C1,0x66C2,0x66C3,0x66C4, -0x66C5,0x66C6,0x66C7,0x66C8,0x66C9,0x66CA,0x66CB,0x66CC, -0x66CD,0x66CE,0x66CF,0x66D0,0x66D1,0x66D2,0x66D3,0x66D4, -0x66D5,0x66D6,0x66D7,0x66D8,0x66DA,0x66DE,0x66DF,0x66E0, -0x66E1,0x66E2,0x66E3,0x66E4,0x66E5,0x66E7,0x66E8,0x66EA, -0x66EB,0x66EC,0x66ED,0x66EE,0x66EF,0x66F1,0x66F5,0x66F6, -0x66F8,0x66FA,0x66FB,0x66FD,0x6701,0x6702,0x6703, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6704,0x6705,0x6706,0x6707,0x670C,0x670E,0x670F,0x6711, -0x6712,0x6713,0x6716,0x6718,0x6719,0x671A,0x671C,0x671E, -0x6720,0x6721,0x6722,0x6723,0x6724,0x6725,0x6727,0x6729, -0x672E,0x6730,0x6732,0x6733,0x6736,0x6737,0x6738,0x6739, -0x673B,0x673C,0x673E,0x673F,0x6741,0x6744,0x6745,0x6747, -0x674A,0x674B,0x674D,0x6752,0x6754,0x6755,0x6757,0x6758, -0x6759,0x675A,0x675B,0x675D,0x6762,0x6763,0x6764,0x6766, -0x6767,0x676B,0x676C,0x676E,0x6771,0x6774,0x6776, 0, -0x6778,0x6779,0x677A,0x677B,0x677D,0x6780,0x6782,0x6783, -0x6785,0x6786,0x6788,0x678A,0x678C,0x678D,0x678E,0x678F, -0x6791,0x6792,0x6793,0x6794,0x6796,0x6799,0x679B,0x679F, -0x67A0,0x67A1,0x67A4,0x67A6,0x67A9,0x67AC,0x67AE,0x67B1, -0x67B2,0x67B4,0x67B9,0x67BA,0x67BB,0x67BC,0x67BD,0x67BE, -0x67BF,0x67C0,0x67C2,0x67C5,0x67C6,0x67C7,0x67C8,0x67C9, -0x67CA,0x67CB,0x67CC,0x67CD,0x67CE,0x67D5,0x67D6,0x67D7, -0x67DB,0x67DF,0x67E1,0x67E3,0x67E4,0x67E6,0x67E7,0x67E8, -0x67EA,0x67EB,0x67ED,0x67EE,0x67F2,0x67F5,0x67F6,0x67F7, -0x67F8,0x67F9,0x67FA,0x67FB,0x67FC,0x67FE,0x6801,0x6802, -0x6803,0x6804,0x6806,0x680D,0x6810,0x6812,0x6814,0x6815, -0x6818,0x6819,0x681A,0x681B,0x681C,0x681E,0x681F,0x6820, -0x6822,0x6823,0x6824,0x6825,0x6826,0x6827,0x6828,0x682B, -0x682C,0x682D,0x682E,0x682F,0x6830,0x6831,0x6834,0x6835, -0x6836,0x683A,0x683B,0x683F,0x6847,0x684B,0x684D,0x684F, -0x6852,0x6856,0x6857,0x6858,0x6859,0x685A,0x685B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x685C,0x685D,0x685E,0x685F,0x686A,0x686C,0x686D,0x686E, -0x686F,0x6870,0x6871,0x6872,0x6873,0x6875,0x6878,0x6879, -0x687A,0x687B,0x687C,0x687D,0x687E,0x687F,0x6880,0x6882, -0x6884,0x6887,0x6888,0x6889,0x688A,0x688B,0x688C,0x688D, -0x688E,0x6890,0x6891,0x6892,0x6894,0x6895,0x6896,0x6898, -0x6899,0x689A,0x689B,0x689C,0x689D,0x689E,0x689F,0x68A0, -0x68A1,0x68A3,0x68A4,0x68A5,0x68A9,0x68AA,0x68AB,0x68AC, -0x68AE,0x68B1,0x68B2,0x68B4,0x68B6,0x68B7,0x68B8, 0, -0x68B9,0x68BA,0x68BB,0x68BC,0x68BD,0x68BE,0x68BF,0x68C1, -0x68C3,0x68C4,0x68C5,0x68C6,0x68C7,0x68C8,0x68CA,0x68CC, -0x68CE,0x68CF,0x68D0,0x68D1,0x68D3,0x68D4,0x68D6,0x68D7, -0x68D9,0x68DB,0x68DC,0x68DD,0x68DE,0x68DF,0x68E1,0x68E2, -0x68E4,0x68E5,0x68E6,0x68E7,0x68E8,0x68E9,0x68EA,0x68EB, -0x68EC,0x68ED,0x68EF,0x68F2,0x68F3,0x68F4,0x68F6,0x68F7, -0x68F8,0x68FB,0x68FD,0x68FE,0x68FF,0x6900,0x6902,0x6903, -0x6904,0x6906,0x6907,0x6908,0x6909,0x690A,0x690C,0x690F, -0x6911,0x6913,0x6914,0x6915,0x6916,0x6917,0x6918,0x6919, -0x691A,0x691B,0x691C,0x691D,0x691E,0x6921,0x6922,0x6923, -0x6925,0x6926,0x6927,0x6928,0x6929,0x692A,0x692B,0x692C, -0x692E,0x692F,0x6931,0x6932,0x6933,0x6935,0x6936,0x6937, -0x6938,0x693A,0x693B,0x693C,0x693E,0x6940,0x6941,0x6943, -0x6944,0x6945,0x6946,0x6947,0x6948,0x6949,0x694A,0x694B, -0x694C,0x694D,0x694E,0x694F,0x6950,0x6951,0x6952,0x6953, -0x6955,0x6956,0x6958,0x6959,0x695B,0x695C,0x695F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6961,0x6962,0x6964,0x6965,0x6967,0x6968,0x6969,0x696A, -0x696C,0x696D,0x696F,0x6970,0x6972,0x6973,0x6974,0x6975, -0x6976,0x697A,0x697B,0x697D,0x697E,0x697F,0x6981,0x6983, -0x6985,0x698A,0x698B,0x698C,0x698E,0x698F,0x6990,0x6991, -0x6992,0x6993,0x6996,0x6997,0x6999,0x699A,0x699D,0x699E, -0x699F,0x69A0,0x69A1,0x69A2,0x69A3,0x69A4,0x69A5,0x69A6, -0x69A9,0x69AA,0x69AC,0x69AE,0x69AF,0x69B0,0x69B2,0x69B3, -0x69B5,0x69B6,0x69B8,0x69B9,0x69BA,0x69BC,0x69BD, 0, -0x69BE,0x69BF,0x69C0,0x69C2,0x69C3,0x69C4,0x69C5,0x69C6, -0x69C7,0x69C8,0x69C9,0x69CB,0x69CD,0x69CF,0x69D1,0x69D2, -0x69D3,0x69D5,0x69D6,0x69D7,0x69D8,0x69D9,0x69DA,0x69DC, -0x69DD,0x69DE,0x69E1,0x69E2,0x69E3,0x69E4,0x69E5,0x69E6, -0x69E7,0x69E8,0x69E9,0x69EA,0x69EB,0x69EC,0x69EE,0x69EF, -0x69F0,0x69F1,0x69F3,0x69F4,0x69F5,0x69F6,0x69F7,0x69F8, -0x69F9,0x69FA,0x69FB,0x69FC,0x69FE,0x6A00,0x6A01,0x6A02, -0x6A03,0x6A04,0x6A05,0x6A06,0x6A07,0x6A08,0x6A09,0x6A0B, -0x6A0C,0x6A0D,0x6A0E,0x6A0F,0x6A10,0x6A11,0x6A12,0x6A13, -0x6A14,0x6A15,0x6A16,0x6A19,0x6A1A,0x6A1B,0x6A1C,0x6A1D, -0x6A1E,0x6A20,0x6A22,0x6A23,0x6A24,0x6A25,0x6A26,0x6A27, -0x6A29,0x6A2B,0x6A2C,0x6A2D,0x6A2E,0x6A30,0x6A32,0x6A33, -0x6A34,0x6A36,0x6A37,0x6A38,0x6A39,0x6A3A,0x6A3B,0x6A3C, -0x6A3F,0x6A40,0x6A41,0x6A42,0x6A43,0x6A45,0x6A46,0x6A48, -0x6A49,0x6A4A,0x6A4B,0x6A4C,0x6A4D,0x6A4E,0x6A4F,0x6A51, -0x6A52,0x6A53,0x6A54,0x6A55,0x6A56,0x6A57,0x6A5A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0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C3,0x6FC4,0x6FC5,0x6FC6,0x6FC7,0x6FC8, -0x6FCA,0x6FCB,0x6FCC,0x6FCD,0x6FCE,0x6FCF,0x6FD0,0x6FD3, -0x6FD4,0x6FD5,0x6FD6,0x6FD7,0x6FD8,0x6FD9,0x6FDA,0x6FDB, -0x6FDC,0x6FDD,0x6FDF,0x6FE2,0x6FE3,0x6FE4,0x6FE5, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6FE6,0x6FE7,0x6FE8,0x6FE9,0x6FEA,0x6FEB,0x6FEC,0x6FED, -0x6FF0,0x6FF1,0x6FF2,0x6FF3,0x6FF4,0x6FF5,0x6FF6,0x6FF7, -0x6FF8,0x6FF9,0x6FFA,0x6FFB,0x6FFC,0x6FFD,0x6FFE,0x6FFF, -0x7000,0x7001,0x7002,0x7003,0x7004,0x7005,0x7006,0x7007, -0x7008,0x7009,0x700A,0x700B,0x700C,0x700D,0x700E,0x700F, -0x7010,0x7012,0x7013,0x7014,0x7015,0x7016,0x7017,0x7018, -0x7019,0x701C,0x701D,0x701E,0x701F,0x7020,0x7021,0x7022, -0x7024,0x7025,0x7026,0x7027,0x7028,0x7029,0x702A, 0, -0x702B,0x702C,0x702D,0x702E,0x702F,0x7030,0x7031,0x7032, -0x7033,0x7034,0x7036,0x7037,0x7038,0x703A,0x703B,0x703C, -0x703D,0x703E,0x703F,0x7040,0x7041,0x7042,0x7043,0x7044, -0x7045,0x7046,0x7047,0x7048,0x7049,0x704A,0x704B,0x704D, -0x704E,0x7050,0x7051,0x7052,0x7053,0x7054,0x7055,0x7056, -0x7057,0x7058,0x7059,0x705A,0x705B,0x705C,0x705D,0x705F, -0x7060,0x7061,0x7062,0x7063,0x7064,0x7065,0x7066,0x7067, -0x7068,0x7069,0x706A,0x706E,0x7071,0x7072,0x7073,0x7074, -0x7077,0x7079,0x707A,0x707B,0x707D,0x7081,0x7082,0x7083, -0x7084,0x7086,0x7087,0x7088,0x708B,0x708C,0x708D,0x708F, -0x7090,0x7091,0x7093,0x7097,0x7098,0x709A,0x709B,0x709E, -0x709F,0x70A0,0x70A1,0x70A2,0x70A3,0x70A4,0x70A5,0x70A6, -0x70A7,0x70A8,0x70A9,0x70AA,0x70B0,0x70B2,0x70B4,0x70B5, -0x70B6,0x70BA,0x70BE,0x70BF,0x70C4,0x70C5,0x70C6,0x70C7, -0x70C9,0x70CB,0x70CC,0x70CD,0x70CE,0x70CF,0x70D0,0x70D1, -0x70D2,0x70D3,0x70D4,0x70D5,0x70D6,0x70D7,0x70DA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x70DC,0x70DD,0x70DE,0x70E0,0x70E1,0x70E2,0x70E3,0x70E5, -0x70EA,0x70EE,0x70F0,0x70F1,0x70F2,0x70F3,0x70F4,0x70F5, -0x70F6,0x70F8,0x70FA,0x70FB,0x70FC,0x70FE,0x70FF,0x7100, -0x7101,0x7102,0x7103,0x7104,0x7105,0x7106,0x7107,0x7108, -0x710B,0x710C,0x710D,0x710E,0x710F,0x7111,0x7112,0x7114, -0x7117,0x711B,0x711C,0x711D,0x711E,0x711F,0x7120,0x7121, -0x7122,0x7123,0x7124,0x7125,0x7127,0x7128,0x7129,0x712A, -0x712B,0x712C,0x712D,0x712E,0x7132,0x7133,0x7134, 0, -0x7135,0x7137,0x7138,0x7139,0x713A,0x713B,0x713C,0x713D, -0x713E,0x713F,0x7140,0x7141,0x7142,0x7143,0x7144,0x7146, -0x7147,0x7148,0x7149,0x714B,0x714D,0x714F,0x7150,0x7151, -0x7152,0x7153,0x7154,0x7155,0x7156,0x7157,0x7158,0x7159, -0x715A,0x715B,0x715D,0x715F,0x7160,0x7161,0x7162,0x7163, -0x7165,0x7169,0x716A,0x716B,0x716C,0x716D,0x716F,0x7170, -0x7171,0x7174,0x7175,0x7176,0x7177,0x7179,0x717B,0x717C, -0x717E,0x717F,0x7180,0x7181,0x7182,0x7183,0x7185,0x7186, -0x7187,0x7188,0x7189,0x718B,0x718C,0x718D,0x718E,0x7190, -0x7191,0x7192,0x7193,0x7195,0x7196,0x7197,0x719A,0x719B, -0x719C,0x719D,0x719E,0x71A1,0x71A2,0x71A3,0x71A4,0x71A5, -0x71A6,0x71A7,0x71A9,0x71AA,0x71AB,0x71AD,0x71AE,0x71AF, -0x71B0,0x71B1,0x71B2,0x71B4,0x71B6,0x71B7,0x71B8,0x71BA, -0x71BB,0x71BC,0x71BD,0x71BE,0x71BF,0x71C0,0x71C1,0x71C2, -0x71C4,0x71C5,0x71C6,0x71C7,0x71C8,0x71C9,0x71CA,0x71CB, -0x71CC,0x71CD,0x71CF,0x71D0,0x71D1,0x71D2,0x71D3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x71D6,0x71D7,0x71D8,0x71D9,0x71DA,0x71DB,0x71DC,0x71DD, -0x71DE,0x71DF,0x71E1,0x71E2,0x71E3,0x71E4,0x71E6,0x71E8, -0x71E9,0x71EA,0x71EB,0x71EC,0x71ED,0x71EF,0x71F0,0x71F1, -0x71F2,0x71F3,0x71F4,0x71F5,0x71F6,0x71F7,0x71F8,0x71FA, -0x71FB,0x71FC,0x71FD,0x71FE,0x71FF,0x7200,0x7201,0x7202, -0x7203,0x7204,0x7205,0x7207,0x7208,0x7209,0x720A,0x720B, -0x720C,0x720D,0x720E,0x720F,0x7210,0x7211,0x7212,0x7213, -0x7214,0x7215,0x7216,0x7217,0x7218,0x7219,0x721A, 0, -0x721B,0x721C,0x721E,0x721F,0x7220,0x7221,0x7222,0x7223, -0x7224,0x7225,0x7226,0x7227,0x7229,0x722B,0x722D,0x722E, -0x722F,0x7232,0x7233,0x7234,0x723A,0x723C,0x723E,0x7240, -0x7241,0x7242,0x7243,0x7244,0x7245,0x7246,0x7249,0x724A, -0x724B,0x724E,0x724F,0x7250,0x7251,0x7253,0x7254,0x7255, -0x7257,0x7258,0x725A,0x725C,0x725E,0x7260,0x7263,0x7264, -0x7265,0x7268,0x726A,0x726B,0x726C,0x726D,0x7270,0x7271, -0x7273,0x7274,0x7276,0x7277,0x7278,0x727B,0x727C,0x727D, -0x7282,0x7283,0x7285,0x7286,0x7287,0x7288,0x7289,0x728C, -0x728E,0x7290,0x7291,0x7293,0x7294,0x7295,0x7296,0x7297, -0x7298,0x7299,0x729A,0x729B,0x729C,0x729D,0x729E,0x72A0, -0x72A1,0x72A2,0x72A3,0x72A4,0x72A5,0x72A6,0x72A7,0x72A8, -0x72A9,0x72AA,0x72AB,0x72AE,0x72B1,0x72B2,0x72B3,0x72B5, -0x72BA,0x72BB,0x72BC,0x72BD,0x72BE,0x72BF,0x72C0,0x72C5, -0x72C6,0x72C7,0x72C9,0x72CA,0x72CB,0x72CC,0x72CF,0x72D1, -0x72D3,0x72D4,0x72D5,0x72D6,0x72D8,0x72DA,0x72DB, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3000,0x3001,0x3002,0x00B7,0x02C9,0x02C7,0x00A8, -0x3003,0x3005,0x2014,0xFF5E,0x2016,0x2026,0x2018,0x2019, -0x201C,0x201D,0x3014,0x3015,0x3008,0x3009,0x300A,0x300B, -0x300C,0x300D,0x300E,0x300F,0x3016,0x3017,0x3010,0x3011, -0x00B1,0x00D7,0x00F7,0x2236,0x2227,0x2228,0x2211,0x220F, -0x222A,0x2229,0x2208,0x2237,0x221A,0x22A5,0x2225,0x2220, -0x2312,0x2299,0x222B,0x222E,0x2261,0x224C,0x2248,0x223D, -0x221D,0x2260,0x226E,0x226F,0x2264,0x2265,0x221E,0x2235, -0x2234,0x2642,0x2640,0x00B0,0x2032,0x2033,0x2103,0xFF04, -0x00A4,0xFFE0,0xFFE1,0x2030,0x00A7,0x2116,0x2606,0x2605, -0x25CB,0x25CF,0x25CE,0x25C7,0x25C6,0x25A1,0x25A0,0x25B3, -0x25B2,0x203B,0x2192,0x2190,0x2191,0x2193,0x3013, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 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, 0, 0, 0, 0, 0, - 0,0x2488,0x2489,0x248A,0x248B,0x248C,0x248D,0x248E, -0x248F,0x2490,0x2491,0x2492,0x2493,0x2494,0x2495,0x2496, -0x2497,0x2498,0x2499,0x249A,0x249B,0x2474,0x2475,0x2476, -0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E, -0x247F,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486, -0x2487,0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466, -0x2467,0x2468,0x2469, 0, 0,0x3220,0x3221,0x3222, -0x3223,0x3224,0x3225,0x3226,0x3227,0x3228,0x3229, 0, - 0,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, -0x2167,0x2168,0x2169,0x216A,0x216B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,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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, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3041,0x3042,0x3043,0x3044,0x3045,0x3046,0x3047, -0x3048,0x3049,0x304A,0x304B,0x304C,0x304D,0x304E,0x304F, -0x3050,0x3051,0x3052,0x3053,0x3054,0x3055,0x3056,0x3057, -0x3058,0x3059,0x305A,0x305B,0x305C,0x305D,0x305E,0x305F, -0x3060,0x3061,0x3062,0x3063,0x3064,0x3065,0x3066,0x3067, -0x3068,0x3069,0x306A,0x306B,0x306C,0x306D,0x306E,0x306F, -0x3070,0x3071,0x3072,0x3073,0x3074,0x3075,0x3076,0x3077, -0x3078,0x3079,0x307A,0x307B,0x307C,0x307D,0x307E,0x307F, -0x3080,0x3081,0x3082,0x3083,0x3084,0x3085,0x3086,0x3087, -0x3088,0x3089,0x308A,0x308B,0x308C,0x308D,0x308E,0x308F, -0x3090,0x3091,0x3092,0x3093, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7, -0x30A8,0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF, -0x30B0,0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7, -0x30B8,0x30B9,0x30BA,0x30BB,0x30BC,0x30BD,0x30BE,0x30BF, -0x30C0,0x30C1,0x30C2,0x30C3,0x30C4,0x30C5,0x30C6,0x30C7, -0x30C8,0x30C9,0x30CA,0x30CB,0x30CC,0x30CD,0x30CE,0x30CF, -0x30D0,0x30D1,0x30D2,0x30D3,0x30D4,0x30D5,0x30D6,0x30D7, -0x30D8,0x30D9,0x30DA,0x30DB,0x30DC,0x30DD,0x30DE,0x30DF, -0x30E0,0x30E1,0x30E2,0x30E3,0x30E4,0x30E5,0x30E6,0x30E7, -0x30E8,0x30E9,0x30EA,0x30EB,0x30EC,0x30ED,0x30EE,0x30EF, -0x30F0,0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397, -0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F, -0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8, -0x03A9, 0, 0, 0, 0, 0, 0, 0, - 0,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7, -0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF, -0x03C0,0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8, -0x03C9, 0, 0, 0, 0, 0, 0, 0, -0xFE35,0xFE36,0xFE39,0xFE3A,0xFE3F,0xFE40,0xFE3D,0xFE3E, -0xFE41,0xFE42,0xFE43,0xFE44, 0, 0,0xFE3B,0xFE3C, -0xFE37,0xFE38,0xFE31, 0,0xFE33,0xFE34, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401, -0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D, -0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425, -0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D, -0x042E,0x042F, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451, -0x0436,0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D, -0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445, -0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D, -0x044E,0x044F, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x02CA,0x02CB,0x02D9,0x2013,0x2015,0x2025,0x2035,0x2105, -0x2109,0x2196,0x2197,0x2198,0x2199,0x2215,0x221F,0x2223, -0x2252,0x2266,0x2267,0x22BF,0x2550,0x2551,0x2552,0x2553, -0x2554,0x2555,0x2556,0x2557,0x2558,0x2559,0x255A,0x255B, -0x255C,0x255D,0x255E,0x255F,0x2560,0x2561,0x2562,0x2563, -0x2564,0x2565,0x2566,0x2567,0x2568,0x2569,0x256A,0x256B, -0x256C,0x256D,0x256E,0x256F,0x2570,0x2571,0x2572,0x2573, -0x2581,0x2582,0x2583,0x2584,0x2585,0x2586,0x2587, 0, -0x2588,0x2589,0x258A,0x258B,0x258C,0x258D,0x258E,0x258F, -0x2593,0x2594,0x2595,0x25BC,0x25BD,0x25E2,0x25E3,0x25E4, -0x25E5,0x2609,0x2295,0x3012,0x301D,0x301E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x0101,0x00E1,0x01CE,0x00E0,0x0113,0x00E9,0x011B, -0x00E8,0x012B,0x00ED,0x01D0,0x00EC,0x014D,0x00F3,0x01D2, -0x00F2,0x016B,0x00FA,0x01D4,0x00F9,0x01D6,0x01D8,0x01DA, -0x01DC,0x00FC,0x00EA,0x0251, 0,0x0144,0x0148, 0, -0x0261, 0, 0, 0, 0,0x3105,0x3106,0x3107, -0x3108,0x3109,0x310A,0x310B,0x310C,0x310D,0x310E,0x310F, -0x3110,0x3111,0x3112,0x3113,0x3114,0x3115,0x3116,0x3117, -0x3118,0x3119,0x311A,0x311B,0x311C,0x311D,0x311E,0x311F, -0x3120,0x3121,0x3122,0x3123,0x3124,0x3125,0x3126,0x3127, -0x3128,0x3129, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3021,0x3022,0x3023,0x3024,0x3025,0x3026,0x3027,0x3028, -0x3029,0x32A3,0x338E,0x338F,0x339C,0x339D,0x339E,0x33A1, -0x33C4,0x33CE,0x33D1,0x33D2,0x33D5,0xFE30,0xFFE2,0xFFE4, - 0,0x2121,0x3231, 0,0x2010, 0, 0, 0, -0x30FC,0x309B,0x309C,0x30FD,0x30FE,0x3006,0x309D,0x309E, -0xFE49,0xFE4A,0xFE4B,0xFE4C,0xFE4D,0xFE4E,0xFE4F,0xFE50, -0xFE51,0xFE52,0xFE54,0xFE55,0xFE56,0xFE57,0xFE59,0xFE5A, -0xFE5B,0xFE5C,0xFE5D,0xFE5E,0xFE5F,0xFE60,0xFE61, 0, -0xFE62,0xFE63,0xFE64,0xFE65,0xFE66,0xFE68,0xFE69,0xFE6A, -0xFE6B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3007, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x2500,0x2501,0x2502,0x2503, -0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250A,0x250B, -0x250C,0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513, -0x2514,0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B, -0x251C,0x251D,0x251E,0x251F,0x2520,0x2521,0x2522,0x2523, -0x2524,0x2525,0x2526,0x2527,0x2528,0x2529,0x252A,0x252B, -0x252C,0x252D,0x252E,0x252F,0x2530,0x2531,0x2532,0x2533, -0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B, -0x253C,0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543, -0x2544,0x2545,0x2546,0x2547,0x2548,0x2549,0x254A,0x254B, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x72DC,0x72DD,0x72DF,0x72E2,0x72E3,0x72E4,0x72E5,0x72E6, -0x72E7,0x72EA,0x72EB,0x72F5,0x72F6,0x72F9,0x72FD,0x72FE, -0x72FF,0x7300,0x7302,0x7304,0x7305,0x7306,0x7307,0x7308, -0x7309,0x730B,0x730C,0x730D,0x730F,0x7310,0x7311,0x7312, -0x7314,0x7318,0x7319,0x731A,0x731F,0x7320,0x7323,0x7324, -0x7326,0x7327,0x7328,0x732D,0x732F,0x7330,0x7332,0x7333, -0x7335,0x7336,0x733A,0x733B,0x733C,0x733D,0x7340,0x7341, -0x7342,0x7343,0x7344,0x7345,0x7346,0x7347,0x7348, 0, -0x7349,0x734A,0x734B,0x734C,0x734E,0x734F,0x7351,0x7353, -0x7354,0x7355,0x7356,0x7358,0x7359,0x735A,0x735B,0x735C, -0x735D,0x735E,0x735F,0x7361,0x7362,0x7363,0x7364,0x7365, -0x7366,0x7367,0x7368,0x7369,0x736A,0x736B,0x736E,0x7370, -0x7371, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7372,0x7373,0x7374,0x7375,0x7376,0x7377,0x7378,0x7379, -0x737A,0x737B,0x737C,0x737D,0x737F,0x7380,0x7381,0x7382, -0x7383,0x7385,0x7386,0x7388,0x738A,0x738C,0x738D,0x738F, -0x7390,0x7392,0x7393,0x7394,0x7395,0x7397,0x7398,0x7399, -0x739A,0x739C,0x739D,0x739E,0x73A0,0x73A1,0x73A3,0x73A4, -0x73A5,0x73A6,0x73A7,0x73A8,0x73AA,0x73AC,0x73AD,0x73B1, -0x73B4,0x73B5,0x73B6,0x73B8,0x73B9,0x73BC,0x73BD,0x73BE, -0x73BF,0x73C1,0x73C3,0x73C4,0x73C5,0x73C6,0x73C7, 0, -0x73CB,0x73CC,0x73CE,0x73D2,0x73D3,0x73D4,0x73D5,0x73D6, -0x73D7,0x73D8,0x73DA,0x73DB,0x73DC,0x73DD,0x73DF,0x73E1, -0x73E2,0x73E3,0x73E4,0x73E6,0x73E8,0x73EA,0x73EB,0x73EC, -0x73EE,0x73EF,0x73F0,0x73F1,0x73F3,0x73F4,0x73F5,0x73F6, -0x73F7, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x73F8,0x73F9,0x73FA,0x73FB,0x73FC,0x73FD,0x73FE,0x73FF, -0x7400,0x7401,0x7402,0x7404,0x7407,0x7408,0x740B,0x740C, -0x740D,0x740E,0x7411,0x7412,0x7413,0x7414,0x7415,0x7416, -0x7417,0x7418,0x7419,0x741C,0x741D,0x741E,0x741F,0x7420, -0x7421,0x7423,0x7424,0x7427,0x7429,0x742B,0x742D,0x742F, -0x7431,0x7432,0x7437,0x7438,0x7439,0x743A,0x743B,0x743D, -0x743E,0x743F,0x7440,0x7442,0x7443,0x7444,0x7445,0x7446, -0x7447,0x7448,0x7449,0x744A,0x744B,0x744C,0x744D, 0, -0x744E,0x744F,0x7450,0x7451,0x7452,0x7453,0x7454,0x7456, -0x7458,0x745D,0x7460,0x7461,0x7462,0x7463,0x7464,0x7465, -0x7466,0x7467,0x7468,0x7469,0x746A,0x746B,0x746C,0x746E, -0x746F,0x7471,0x7472,0x7473,0x7474,0x7475,0x7478,0x7479, -0x747A, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x747B,0x747C,0x747D,0x747F,0x7482,0x7484,0x7485,0x7486, -0x7488,0x7489,0x748A,0x748C,0x748D,0x748F,0x7491,0x7492, -0x7493,0x7494,0x7495,0x7496,0x7497,0x7498,0x7499,0x749A, -0x749B,0x749D,0x749F,0x74A0,0x74A1,0x74A2,0x74A3,0x74A4, -0x74A5,0x74A6,0x74AA,0x74AB,0x74AC,0x74AD,0x74AE,0x74AF, -0x74B0,0x74B1,0x74B2,0x74B3,0x74B4,0x74B5,0x74B6,0x74B7, -0x74B8,0x74B9,0x74BB,0x74BC,0x74BD,0x74BE,0x74BF,0x74C0, -0x74C1,0x74C2,0x74C3,0x74C4,0x74C5,0x74C6,0x74C7, 0, -0x74C8,0x74C9,0x74CA,0x74CB,0x74CC,0x74CD,0x74CE,0x74CF, -0x74D0,0x74D1,0x74D3,0x74D4,0x74D5,0x74D6,0x74D7,0x74D8, -0x74D9,0x74DA,0x74DB,0x74DD,0x74DF,0x74E1,0x74E5,0x74E7, -0x74E8,0x74E9,0x74EA,0x74EB,0x74EC,0x74ED,0x74F0,0x74F1, -0x74F2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x74F3,0x74F5,0x74F8,0x74F9,0x74FA,0x74FB,0x74FC,0x74FD, -0x74FE,0x7500,0x7501,0x7502,0x7503,0x7505,0x7506,0x7507, -0x7508,0x7509,0x750A,0x750B,0x750C,0x750E,0x7510,0x7512, -0x7514,0x7515,0x7516,0x7517,0x751B,0x751D,0x751E,0x7520, -0x7521,0x7522,0x7523,0x7524,0x7526,0x7527,0x752A,0x752E, -0x7534,0x7536,0x7539,0x753C,0x753D,0x753F,0x7541,0x7542, -0x7543,0x7544,0x7546,0x7547,0x7549,0x754A,0x754D,0x7550, -0x7551,0x7552,0x7553,0x7555,0x7556,0x7557,0x7558, 0, -0x755D,0x755E,0x755F,0x7560,0x7561,0x7562,0x7563,0x7564, -0x7567,0x7568,0x7569,0x756B,0x756C,0x756D,0x756E,0x756F, -0x7570,0x7571,0x7573,0x7575,0x7576,0x7577,0x757A,0x757B, -0x757C,0x757D,0x757E,0x7580,0x7581,0x7582,0x7584,0x7585, -0x7587, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7588,0x7589,0x758A,0x758C,0x758D,0x758E,0x7590,0x7593, -0x7595,0x7598,0x759B,0x759C,0x759E,0x75A2,0x75A6,0x75A7, -0x75A8,0x75A9,0x75AA,0x75AD,0x75B6,0x75B7,0x75BA,0x75BB, -0x75BF,0x75C0,0x75C1,0x75C6,0x75CB,0x75CC,0x75CE,0x75CF, -0x75D0,0x75D1,0x75D3,0x75D7,0x75D9,0x75DA,0x75DC,0x75DD, -0x75DF,0x75E0,0x75E1,0x75E5,0x75E9,0x75EC,0x75ED,0x75EE, -0x75EF,0x75F2,0x75F3,0x75F5,0x75F6,0x75F7,0x75F8,0x75FA, -0x75FB,0x75FD,0x75FE,0x7602,0x7604,0x7606,0x7607, 0, -0x7608,0x7609,0x760B,0x760D,0x760E,0x760F,0x7611,0x7612, -0x7613,0x7614,0x7616,0x761A,0x761C,0x761D,0x761E,0x7621, -0x7623,0x7627,0x7628,0x762C,0x762E,0x762F,0x7631,0x7632, -0x7636,0x7637,0x7639,0x763A,0x763B,0x763D,0x7641,0x7642, -0x7644, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7645,0x7646,0x7647,0x7648,0x7649,0x764A,0x764B,0x764E, -0x764F,0x7650,0x7651,0x7652,0x7653,0x7655,0x7657,0x7658, -0x7659,0x765A,0x765B,0x765D,0x765F,0x7660,0x7661,0x7662, -0x7664,0x7665,0x7666,0x7667,0x7668,0x7669,0x766A,0x766C, -0x766D,0x766E,0x7670,0x7671,0x7672,0x7673,0x7674,0x7675, -0x7676,0x7677,0x7679,0x767A,0x767C,0x767F,0x7680,0x7681, -0x7683,0x7685,0x7689,0x768A,0x768C,0x768D,0x768F,0x7690, -0x7692,0x7694,0x7695,0x7697,0x7698,0x769A,0x769B, 0, -0x769C,0x769D,0x769E,0x769F,0x76A0,0x76A1,0x76A2,0x76A3, -0x76A5,0x76A6,0x76A7,0x76A8,0x76A9,0x76AA,0x76AB,0x76AC, -0x76AD,0x76AF,0x76B0,0x76B3,0x76B5,0x76B6,0x76B7,0x76B8, -0x76B9,0x76BA,0x76BB,0x76BC,0x76BD,0x76BE,0x76C0,0x76C1, -0x76C3,0x554A,0x963F,0x57C3,0x6328,0x54CE,0x5509,0x54C0, -0x7691,0x764C,0x853C,0x77EE,0x827E,0x788D,0x7231,0x9698, -0x978D,0x6C28,0x5B89,0x4FFA,0x6309,0x6697,0x5CB8,0x80FA, -0x6848,0x80AE,0x6602,0x76CE,0x51F9,0x6556,0x71AC,0x7FF1, -0x8884,0x50B2,0x5965,0x61CA,0x6FB3,0x82AD,0x634C,0x6252, -0x53ED,0x5427,0x7B06,0x516B,0x75A4,0x5DF4,0x62D4,0x8DCB, -0x9776,0x628A,0x8019,0x575D,0x9738,0x7F62,0x7238,0x767D, -0x67CF,0x767E,0x6446,0x4F70,0x8D25,0x62DC,0x7A17,0x6591, -0x73ED,0x642C,0x6273,0x822C,0x9881,0x677F,0x7248,0x626E, -0x62CC,0x4F34,0x74E3,0x534A,0x529E,0x7ECA,0x90A6,0x5E2E, -0x6886,0x699C,0x8180,0x7ED1,0x68D2,0x78C5,0x868C,0x9551, -0x508D,0x8C24,0x82DE,0x80DE,0x5305,0x8912,0x5265, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x76C4,0x76C7,0x76C9,0x76CB,0x76CC,0x76D3,0x76D5,0x76D9, -0x76DA,0x76DC,0x76DD,0x76DE,0x76E0,0x76E1,0x76E2,0x76E3, -0x76E4,0x76E6,0x76E7,0x76E8,0x76E9,0x76EA,0x76EB,0x76EC, -0x76ED,0x76F0,0x76F3,0x76F5,0x76F6,0x76F7,0x76FA,0x76FB, -0x76FD,0x76FF,0x7700,0x7702,0x7703,0x7705,0x7706,0x770A, -0x770C,0x770E,0x770F,0x7710,0x7711,0x7712,0x7713,0x7714, -0x7715,0x7716,0x7717,0x7718,0x771B,0x771C,0x771D,0x771E, -0x7721,0x7723,0x7724,0x7725,0x7727,0x772A,0x772B, 0, -0x772C,0x772E,0x7730,0x7731,0x7732,0x7733,0x7734,0x7739, -0x773B,0x773D,0x773E,0x773F,0x7742,0x7744,0x7745,0x7746, -0x7748,0x7749,0x774A,0x774B,0x774C,0x774D,0x774E,0x774F, -0x7752,0x7753,0x7754,0x7755,0x7756,0x7757,0x7758,0x7759, -0x775C,0x8584,0x96F9,0x4FDD,0x5821,0x9971,0x5B9D,0x62B1, -0x62A5,0x66B4,0x8C79,0x9C8D,0x7206,0x676F,0x7891,0x60B2, -0x5351,0x5317,0x8F88,0x80CC,0x8D1D,0x94A1,0x500D,0x72C8, -0x5907,0x60EB,0x7119,0x88AB,0x5954,0x82EF,0x672C,0x7B28, -0x5D29,0x7EF7,0x752D,0x6CF5,0x8E66,0x8FF8,0x903C,0x9F3B, -0x6BD4,0x9119,0x7B14,0x5F7C,0x78A7,0x84D6,0x853D,0x6BD5, -0x6BD9,0x6BD6,0x5E01,0x5E87,0x75F9,0x95ED,0x655D,0x5F0A, -0x5FC5,0x8F9F,0x58C1,0x81C2,0x907F,0x965B,0x97AD,0x8FB9, -0x7F16,0x8D2C,0x6241,0x4FBF,0x53D8,0x535E,0x8FA8,0x8FA9, -0x8FAB,0x904D,0x6807,0x5F6A,0x8198,0x8868,0x9CD6,0x618B, -0x522B,0x762A,0x5F6C,0x658C,0x6FD2,0x6EE8,0x5BBE,0x6448, -0x5175,0x51B0,0x67C4,0x4E19,0x79C9,0x997C,0x70B3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x775D,0x775E,0x775F,0x7760,0x7764,0x7767,0x7769,0x776A, -0x776D,0x776E,0x776F,0x7770,0x7771,0x7772,0x7773,0x7774, -0x7775,0x7776,0x7777,0x7778,0x777A,0x777B,0x777C,0x7781, -0x7782,0x7783,0x7786,0x7787,0x7788,0x7789,0x778A,0x778B, -0x778F,0x7790,0x7793,0x7794,0x7795,0x7796,0x7797,0x7798, -0x7799,0x779A,0x779B,0x779C,0x779D,0x779E,0x77A1,0x77A3, -0x77A4,0x77A6,0x77A8,0x77AB,0x77AD,0x77AE,0x77AF,0x77B1, -0x77B2,0x77B4,0x77B6,0x77B7,0x77B8,0x77B9,0x77BA, 0, -0x77BC,0x77BE,0x77C0,0x77C1,0x77C2,0x77C3,0x77C4,0x77C5, -0x77C6,0x77C7,0x77C8,0x77C9,0x77CA,0x77CB,0x77CC,0x77CE, -0x77CF,0x77D0,0x77D1,0x77D2,0x77D3,0x77D4,0x77D5,0x77D6, -0x77D8,0x77D9,0x77DA,0x77DD,0x77DE,0x77DF,0x77E0,0x77E1, -0x77E4,0x75C5,0x5E76,0x73BB,0x83E0,0x64AD,0x62E8,0x94B5, -0x6CE2,0x535A,0x52C3,0x640F,0x94C2,0x7B94,0x4F2F,0x5E1B, -0x8236,0x8116,0x818A,0x6E24,0x6CCA,0x9A73,0x6355,0x535C, -0x54FA,0x8865,0x57E0,0x4E0D,0x5E03,0x6B65,0x7C3F,0x90E8, -0x6016,0x64E6,0x731C,0x88C1,0x6750,0x624D,0x8D22,0x776C, -0x8E29,0x91C7,0x5F69,0x83DC,0x8521,0x9910,0x53C2,0x8695, -0x6B8B,0x60ED,0x60E8,0x707F,0x82CD,0x8231,0x4ED3,0x6CA7, -0x85CF,0x64CD,0x7CD9,0x69FD,0x66F9,0x8349,0x5395,0x7B56, -0x4FA7,0x518C,0x6D4B,0x5C42,0x8E6D,0x63D2,0x53C9,0x832C, -0x8336,0x67E5,0x78B4,0x643D,0x5BDF,0x5C94,0x5DEE,0x8BE7, -0x62C6,0x67F4,0x8C7A,0x6400,0x63BA,0x8749,0x998B,0x8C17, -0x7F20,0x94F2,0x4EA7,0x9610,0x98A4,0x660C,0x7316, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x77E6,0x77E8,0x77EA,0x77EF,0x77F0,0x77F1,0x77F2,0x77F4, -0x77F5,0x77F7,0x77F9,0x77FA,0x77FB,0x77FC,0x7803,0x7804, -0x7805,0x7806,0x7807,0x7808,0x780A,0x780B,0x780E,0x780F, -0x7810,0x7813,0x7815,0x7819,0x781B,0x781E,0x7820,0x7821, -0x7822,0x7824,0x7828,0x782A,0x782B,0x782E,0x782F,0x7831, -0x7832,0x7833,0x7835,0x7836,0x783D,0x783F,0x7841,0x7842, -0x7843,0x7844,0x7846,0x7848,0x7849,0x784A,0x784B,0x784D, -0x784F,0x7851,0x7853,0x7854,0x7858,0x7859,0x785A, 0, -0x785B,0x785C,0x785E,0x785F,0x7860,0x7861,0x7862,0x7863, -0x7864,0x7865,0x7866,0x7867,0x7868,0x7869,0x786F,0x7870, -0x7871,0x7872,0x7873,0x7874,0x7875,0x7876,0x7878,0x7879, -0x787A,0x787B,0x787D,0x787E,0x787F,0x7880,0x7881,0x7882, -0x7883,0x573A,0x5C1D,0x5E38,0x957F,0x507F,0x80A0,0x5382, -0x655E,0x7545,0x5531,0x5021,0x8D85,0x6284,0x949E,0x671D, -0x5632,0x6F6E,0x5DE2,0x5435,0x7092,0x8F66,0x626F,0x64A4, -0x63A3,0x5F7B,0x6F88,0x90F4,0x81E3,0x8FB0,0x5C18,0x6668, -0x5FF1,0x6C89,0x9648,0x8D81,0x886C,0x6491,0x79F0,0x57CE, -0x6A59,0x6210,0x5448,0x4E58,0x7A0B,0x60E9,0x6F84,0x8BDA, -0x627F,0x901E,0x9A8B,0x79E4,0x5403,0x75F4,0x6301,0x5319, -0x6C60,0x8FDF,0x5F1B,0x9A70,0x803B,0x9F7F,0x4F88,0x5C3A, -0x8D64,0x7FC5,0x65A5,0x70BD,0x5145,0x51B2,0x866B,0x5D07, -0x5BA0,0x62BD,0x916C,0x7574,0x8E0C,0x7A20,0x6101,0x7B79, -0x4EC7,0x7EF8,0x7785,0x4E11,0x81ED,0x521D,0x51FA,0x6A71, -0x53A8,0x8E87,0x9504,0x96CF,0x6EC1,0x9664,0x695A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7884,0x7885,0x7886,0x7888,0x788A,0x788B,0x788F,0x7890, -0x7892,0x7894,0x7895,0x7896,0x7899,0x789D,0x789E,0x78A0, -0x78A2,0x78A4,0x78A6,0x78A8,0x78A9,0x78AA,0x78AB,0x78AC, -0x78AD,0x78AE,0x78AF,0x78B5,0x78B6,0x78B7,0x78B8,0x78BA, -0x78BB,0x78BC,0x78BD,0x78BF,0x78C0,0x78C2,0x78C3,0x78C4, -0x78C6,0x78C7,0x78C8,0x78CC,0x78CD,0x78CE,0x78CF,0x78D1, -0x78D2,0x78D3,0x78D6,0x78D7,0x78D8,0x78DA,0x78DB,0x78DC, -0x78DD,0x78DE,0x78DF,0x78E0,0x78E1,0x78E2,0x78E3, 0, -0x78E4,0x78E5,0x78E6,0x78E7,0x78E9,0x78EA,0x78EB,0x78ED, -0x78EE,0x78EF,0x78F0,0x78F1,0x78F3,0x78F5,0x78F6,0x78F8, -0x78F9,0x78FB,0x78FC,0x78FD,0x78FE,0x78FF,0x7900,0x7902, -0x7903,0x7904,0x7906,0x7907,0x7908,0x7909,0x790A,0x790B, -0x790C,0x7840,0x50A8,0x77D7,0x6410,0x89E6,0x5904,0x63E3, -0x5DDD,0x7A7F,0x693D,0x4F20,0x8239,0x5598,0x4E32,0x75AE, -0x7A97,0x5E62,0x5E8A,0x95EF,0x521B,0x5439,0x708A,0x6376, -0x9524,0x5782,0x6625,0x693F,0x9187,0x5507,0x6DF3,0x7EAF, -0x8822,0x6233,0x7EF0,0x75B5,0x8328,0x78C1,0x96CC,0x8F9E, -0x6148,0x74F7,0x8BCD,0x6B64,0x523A,0x8D50,0x6B21,0x806A, -0x8471,0x56F1,0x5306,0x4ECE,0x4E1B,0x51D1,0x7C97,0x918B, -0x7C07,0x4FC3,0x8E7F,0x7BE1,0x7A9C,0x6467,0x5D14,0x50AC, -0x8106,0x7601,0x7CB9,0x6DEC,0x7FE0,0x6751,0x5B58,0x5BF8, -0x78CB,0x64AE,0x6413,0x63AA,0x632B,0x9519,0x642D,0x8FBE, -0x7B54,0x7629,0x6253,0x5927,0x5446,0x6B79,0x50A3,0x6234, -0x5E26,0x6B86,0x4EE3,0x8D37,0x888B,0x5F85,0x902E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x790D,0x790E,0x790F,0x7910,0x7911,0x7912,0x7914,0x7915, -0x7916,0x7917,0x7918,0x7919,0x791A,0x791B,0x791C,0x791D, -0x791F,0x7920,0x7921,0x7922,0x7923,0x7925,0x7926,0x7927, -0x7928,0x7929,0x792A,0x792B,0x792C,0x792D,0x792E,0x792F, -0x7930,0x7931,0x7932,0x7933,0x7935,0x7936,0x7937,0x7938, -0x7939,0x793D,0x793F,0x7942,0x7943,0x7944,0x7945,0x7947, -0x794A,0x794B,0x794C,0x794D,0x794E,0x794F,0x7950,0x7951, -0x7952,0x7954,0x7955,0x7958,0x7959,0x7961,0x7963, 0, -0x7964,0x7966,0x7969,0x796A,0x796B,0x796C,0x796E,0x7970, -0x7971,0x7972,0x7973,0x7974,0x7975,0x7976,0x7979,0x797B, -0x797C,0x797D,0x797E,0x797F,0x7982,0x7983,0x7986,0x7987, -0x7988,0x7989,0x798B,0x798C,0x798D,0x798E,0x7990,0x7991, -0x7992,0x6020,0x803D,0x62C5,0x4E39,0x5355,0x90F8,0x63B8, -0x80C6,0x65E6,0x6C2E,0x4F46,0x60EE,0x6DE1,0x8BDE,0x5F39, -0x86CB,0x5F53,0x6321,0x515A,0x8361,0x6863,0x5200,0x6363, -0x8E48,0x5012,0x5C9B,0x7977,0x5BFC,0x5230,0x7A3B,0x60BC, -0x9053,0x76D7,0x5FB7,0x5F97,0x7684,0x8E6C,0x706F,0x767B, -0x7B49,0x77AA,0x51F3,0x9093,0x5824,0x4F4E,0x6EF4,0x8FEA, -0x654C,0x7B1B,0x72C4,0x6DA4,0x7FDF,0x5AE1,0x62B5,0x5E95, -0x5730,0x8482,0x7B2C,0x5E1D,0x5F1F,0x9012,0x7F14,0x98A0, -0x6382,0x6EC7,0x7898,0x70B9,0x5178,0x975B,0x57AB,0x7535, -0x4F43,0x7538,0x5E97,0x60E6,0x5960,0x6DC0,0x6BBF,0x7889, -0x53FC,0x96D5,0x51CB,0x5201,0x6389,0x540A,0x9493,0x8C03, -0x8DCC,0x7239,0x789F,0x8776,0x8FED,0x8C0D,0x53E0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7993,0x7994,0x7995,0x7996,0x7997,0x7998,0x7999,0x799B, -0x799C,0x799D,0x799E,0x799F,0x79A0,0x79A1,0x79A2,0x79A3, -0x79A4,0x79A5,0x79A6,0x79A8,0x79A9,0x79AA,0x79AB,0x79AC, -0x79AD,0x79AE,0x79AF,0x79B0,0x79B1,0x79B2,0x79B4,0x79B5, -0x79B6,0x79B7,0x79B8,0x79BC,0x79BF,0x79C2,0x79C4,0x79C5, -0x79C7,0x79C8,0x79CA,0x79CC,0x79CE,0x79CF,0x79D0,0x79D3, -0x79D4,0x79D6,0x79D7,0x79D9,0x79DA,0x79DB,0x79DC,0x79DD, -0x79DE,0x79E0,0x79E1,0x79E2,0x79E5,0x79E8,0x79EA, 0, -0x79EC,0x79EE,0x79F1,0x79F2,0x79F3,0x79F4,0x79F5,0x79F6, -0x79F7,0x79F9,0x79FA,0x79FC,0x79FE,0x79FF,0x7A01,0x7A04, -0x7A05,0x7A07,0x7A08,0x7A09,0x7A0A,0x7A0C,0x7A0F,0x7A10, -0x7A11,0x7A12,0x7A13,0x7A15,0x7A16,0x7A18,0x7A19,0x7A1B, -0x7A1C,0x4E01,0x76EF,0x53EE,0x9489,0x9876,0x9F0E,0x952D, -0x5B9A,0x8BA2,0x4E22,0x4E1C,0x51AC,0x8463,0x61C2,0x52A8, -0x680B,0x4F97,0x606B,0x51BB,0x6D1E,0x515C,0x6296,0x6597, -0x9661,0x8C46,0x9017,0x75D8,0x90FD,0x7763,0x6BD2,0x728A, -0x72EC,0x8BFB,0x5835,0x7779,0x8D4C,0x675C,0x9540,0x809A, -0x5EA6,0x6E21,0x5992,0x7AEF,0x77ED,0x953B,0x6BB5,0x65AD, -0x7F0E,0x5806,0x5151,0x961F,0x5BF9,0x58A9,0x5428,0x8E72, -0x6566,0x987F,0x56E4,0x949D,0x76FE,0x9041,0x6387,0x54C6, -0x591A,0x593A,0x579B,0x8EB2,0x6735,0x8DFA,0x8235,0x5241, -0x60F0,0x5815,0x86FE,0x5CE8,0x9E45,0x4FC4,0x989D,0x8BB9, -0x5A25,0x6076,0x5384,0x627C,0x904F,0x9102,0x997F,0x6069, -0x800C,0x513F,0x8033,0x5C14,0x9975,0x6D31,0x4E8C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7A1D,0x7A1F,0x7A21,0x7A22,0x7A24,0x7A25,0x7A26,0x7A27, -0x7A28,0x7A29,0x7A2A,0x7A2B,0x7A2C,0x7A2D,0x7A2E,0x7A2F, -0x7A30,0x7A31,0x7A32,0x7A34,0x7A35,0x7A36,0x7A38,0x7A3A, -0x7A3E,0x7A40,0x7A41,0x7A42,0x7A43,0x7A44,0x7A45,0x7A47, -0x7A48,0x7A49,0x7A4A,0x7A4B,0x7A4C,0x7A4D,0x7A4E,0x7A4F, -0x7A50,0x7A52,0x7A53,0x7A54,0x7A55,0x7A56,0x7A58,0x7A59, -0x7A5A,0x7A5B,0x7A5C,0x7A5D,0x7A5E,0x7A5F,0x7A60,0x7A61, -0x7A62,0x7A63,0x7A64,0x7A65,0x7A66,0x7A67,0x7A68, 0, -0x7A69,0x7A6A,0x7A6B,0x7A6C,0x7A6D,0x7A6E,0x7A6F,0x7A71, -0x7A72,0x7A73,0x7A75,0x7A7B,0x7A7C,0x7A7D,0x7A7E,0x7A82, -0x7A85,0x7A87,0x7A89,0x7A8A,0x7A8B,0x7A8C,0x7A8E,0x7A8F, -0x7A90,0x7A93,0x7A94,0x7A99,0x7A9A,0x7A9B,0x7A9E,0x7AA1, -0x7AA2,0x8D30,0x53D1,0x7F5A,0x7B4F,0x4F10,0x4E4F,0x9600, -0x6CD5,0x73D0,0x85E9,0x5E06,0x756A,0x7FFB,0x6A0A,0x77FE, -0x9492,0x7E41,0x51E1,0x70E6,0x53CD,0x8FD4,0x8303,0x8D29, -0x72AF,0x996D,0x6CDB,0x574A,0x82B3,0x65B9,0x80AA,0x623F, -0x9632,0x59A8,0x4EFF,0x8BBF,0x7EBA,0x653E,0x83F2,0x975E, -0x5561,0x98DE,0x80A5,0x532A,0x8BFD,0x5420,0x80BA,0x5E9F, -0x6CB8,0x8D39,0x82AC,0x915A,0x5429,0x6C1B,0x5206,0x7EB7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B13,0x7B16,0x7B17,0x7B18,0x7B1A, -0x7B1C,0x7B1D,0x7B1F,0x7B21,0x7B22,0x7B23,0x7B27,0x7B29, -0x7B2D,0x6D6E,0x6DAA,0x798F,0x88B1,0x5F17,0x752B,0x629A, -0x8F85,0x4FEF,0x91DC,0x65A7,0x812F,0x8151,0x5E9C,0x8150, -0x8D74,0x526F,0x8986,0x8D4B,0x590D,0x5085,0x4ED8,0x961C, -0x7236,0x8179,0x8D1F,0x5BCC,0x8BA3,0x9644,0x5987,0x7F1A, -0x5490,0x5676,0x560E,0x8BE5,0x6539,0x6982,0x9499,0x76D6, -0x6E89,0x5E72,0x7518,0x6746,0x67D1,0x7AFF,0x809D,0x8D76, -0x611F,0x79C6,0x6562,0x8D63,0x5188,0x521A,0x94A2,0x7F38, -0x809B,0x7EB2,0x5C97,0x6E2F,0x6760,0x7BD9,0x768B,0x9AD8, -0x818F,0x7F94,0x7CD5,0x641E,0x9550,0x7A3F,0x544A,0x54E5, -0x6B4C,0x6401,0x6208,0x9E3D,0x80F3,0x7599,0x5272,0x9769, -0x845B,0x683C,0x86E4,0x9601,0x9694,0x94EC,0x4E2A,0x5404, -0x7ED9,0x6839,0x8DDF,0x8015,0x66F4,0x5E9A,0x7FB9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7B2F,0x7B30,0x7B32,0x7B34,0x7B35,0x7B36,0x7B37,0x7B39, -0x7B3B,0x7B3D,0x7B3F,0x7B40,0x7B41,0x7B42,0x7B43,0x7B44, -0x7B46,0x7B48,0x7B4A,0x7B4D,0x7B4E,0x7B53,0x7B55,0x7B57, -0x7B59,0x7B5C,0x7B5E,0x7B5F,0x7B61,0x7B63,0x7B64,0x7B65, -0x7B66,0x7B67,0x7B68,0x7B69,0x7B6A,0x7B6B,0x7B6C,0x7B6D, -0x7B6F,0x7B70,0x7B73,0x7B74,0x7B76,0x7B78,0x7B7A,0x7B7C, -0x7B7D,0x7B7F,0x7B81,0x7B82,0x7B83,0x7B84,0x7B86,0x7B87, -0x7B88,0x7B89,0x7B8A,0x7B8B,0x7B8C,0x7B8E,0x7B8F, 0, -0x7B91,0x7B92,0x7B93,0x7B96,0x7B98,0x7B99,0x7B9A,0x7B9B, -0x7B9E,0x7B9F,0x7BA0,0x7BA3,0x7BA4,0x7BA5,0x7BAE,0x7BAF, -0x7BB0,0x7BB2,0x7BB3,0x7BB5,0x7BB6,0x7BB7,0x7BB9,0x7BBA, -0x7BBB,0x7BBC,0x7BBD,0x7BBE,0x7BBF,0x7BC0,0x7BC2,0x7BC3, -0x7BC4,0x57C2,0x803F,0x6897,0x5DE5,0x653B,0x529F,0x606D, -0x9F9A,0x4F9B,0x8EAC,0x516C,0x5BAB,0x5F13,0x5DE9,0x6C5E, -0x62F1,0x8D21,0x5171,0x94A9,0x52FE,0x6C9F,0x82DF,0x72D7, -0x57A2,0x6784,0x8D2D,0x591F,0x8F9C,0x83C7,0x5495,0x7B8D, -0x4F30,0x6CBD,0x5B64,0x59D1,0x9F13,0x53E4,0x86CA,0x9AA8, -0x8C37,0x80A1,0x6545,0x987E,0x56FA,0x96C7,0x522E,0x74DC, -0x5250,0x5BE1,0x6302,0x8902,0x4E56,0x62D0,0x602A,0x68FA, -0x5173,0x5B98,0x51A0,0x89C2,0x7BA1,0x9986,0x7F50,0x60EF, -0x704C,0x8D2F,0x5149,0x5E7F,0x901B,0x7470,0x89C4,0x572D, -0x7845,0x5F52,0x9F9F,0x95FA,0x8F68,0x9B3C,0x8BE1,0x7678, -0x6842,0x67DC,0x8DEA,0x8D35,0x523D,0x8F8A,0x6EDA,0x68CD, -0x9505,0x90ED,0x56FD,0x679C,0x88F9,0x8FC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F,0x676D,0x822A,0x58D5,0x568E, -0x8C6A,0x6BEB,0x90DD,0x597D,0x8017,0x53F7,0x6D69,0x5475, -0x559D,0x8377,0x83CF,0x6838,0x79BE,0x548C,0x4F55,0x5408, -0x76D2,0x8C89,0x9602,0x6CB3,0x6DB8,0x8D6B,0x8910,0x9E64, -0x8D3A,0x563F,0x9ED1,0x75D5,0x5F88,0x72E0,0x6068,0x54FC, -0x4EA8,0x6A2A,0x8861,0x6052,0x8F70,0x54C4,0x70D8,0x8679, -0x9E3F,0x6D2A,0x5B8F,0x5F18,0x7EA2,0x5589,0x4FAF,0x7334, -0x543C,0x539A,0x5019,0x540E,0x547C,0x4E4E,0x5FFD,0x745A, -0x58F6,0x846B,0x80E1,0x8774,0x72D0,0x7CCA,0x6E56, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7C43,0x7C44,0x7C45,0x7C46,0x7C47,0x7C48,0x7C49,0x7C4A, -0x7C4B,0x7C4C,0x7C4E,0x7C4F,0x7C50,0x7C51,0x7C52,0x7C53, -0x7C54,0x7C55,0x7C56,0x7C57,0x7C58,0x7C59,0x7C5A,0x7C5B, -0x7C5C,0x7C5D,0x7C5E,0x7C5F,0x7C60,0x7C61,0x7C62,0x7C63, -0x7C64,0x7C65,0x7C66,0x7C67,0x7C68,0x7C69,0x7C6A,0x7C6B, -0x7C6C,0x7C6D,0x7C6E,0x7C6F,0x7C70,0x7C71,0x7C72,0x7C75, -0x7C76,0x7C77,0x7C78,0x7C79,0x7C7A,0x7C7E,0x7C7F,0x7C80, -0x7C81,0x7C82,0x7C83,0x7C84,0x7C85,0x7C86,0x7C87, 0, -0x7C88,0x7C8A,0x7C8B,0x7C8C,0x7C8D,0x7C8E,0x7C8F,0x7C90, -0x7C93,0x7C94,0x7C96,0x7C99,0x7C9A,0x7C9B,0x7CA0,0x7CA1, -0x7CA3,0x7CA6,0x7CA7,0x7CA8,0x7CA9,0x7CAB,0x7CAC,0x7CAD, -0x7CAF,0x7CB0,0x7CB4,0x7CB5,0x7CB6,0x7CB7,0x7CB8,0x7CBA, -0x7CBB,0x5F27,0x864E,0x552C,0x62A4,0x4E92,0x6CAA,0x6237, -0x82B1,0x54D7,0x534E,0x733E,0x6ED1,0x753B,0x5212,0x5316, -0x8BDD,0x69D0,0x5F8A,0x6000,0x6DEE,0x574F,0x6B22,0x73AF, -0x6853,0x8FD8,0x7F13,0x6362,0x60A3,0x5524,0x75EA,0x8C62, -0x7115,0x6DA3,0x5BA6,0x5E7B,0x8352,0x614C,0x9EC4,0x78FA, -0x8757,0x7C27,0x7687,0x51F0,0x60F6,0x714C,0x6643,0x5E4C, -0x604D,0x8C0E,0x7070,0x6325,0x8F89,0x5FBD,0x6062,0x86D4, -0x56DE,0x6BC1,0x6094,0x6167,0x5349,0x60E0,0x6666,0x8D3F, -0x79FD,0x4F1A,0x70E9,0x6C47,0x8BB3,0x8BF2,0x7ED8,0x8364, -0x660F,0x5A5A,0x9B42,0x6D51,0x6DF7,0x8C41,0x6D3B,0x4F19, -0x706B,0x83B7,0x6216,0x60D1,0x970D,0x8D27,0x7978,0x51FB, -0x573E,0x57FA,0x673A,0x7578,0x7A3D,0x79EF,0x7B95, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7CBF,0x7CC0,0x7CC2,0x7CC3,0x7CC4,0x7CC6,0x7CC9,0x7CCB, -0x7CCE,0x7CCF,0x7CD0,0x7CD1,0x7CD2,0x7CD3,0x7CD4,0x7CD8, -0x7CDA,0x7CDB,0x7CDD,0x7CDE,0x7CE1,0x7CE2,0x7CE3,0x7CE4, -0x7CE5,0x7CE6,0x7CE7,0x7CE9,0x7CEA,0x7CEB,0x7CEC,0x7CED, -0x7CEE,0x7CF0,0x7CF1,0x7CF2,0x7CF3,0x7CF4,0x7CF5,0x7CF6, -0x7CF7,0x7CF9,0x7CFA,0x7CFC,0x7CFD,0x7CFE,0x7CFF,0x7D00, -0x7D01,0x7D02,0x7D03,0x7D04,0x7D05,0x7D06,0x7D07,0x7D08, -0x7D09,0x7D0B,0x7D0C,0x7D0D,0x7D0E,0x7D0F,0x7D10, 0, -0x7D11,0x7D12,0x7D13,0x7D14,0x7D15,0x7D16,0x7D17,0x7D18, -0x7D19,0x7D1A,0x7D1B,0x7D1C,0x7D1D,0x7D1E,0x7D1F,0x7D21, -0x7D23,0x7D24,0x7D25,0x7D26,0x7D28,0x7D29,0x7D2A,0x7D2C, -0x7D2D,0x7D2E,0x7D30,0x7D31,0x7D32,0x7D33,0x7D34,0x7D35, -0x7D36,0x808C,0x9965,0x8FF9,0x6FC0,0x8BA5,0x9E21,0x59EC, -0x7EE9,0x7F09,0x5409,0x6781,0x68D8,0x8F91,0x7C4D,0x96C6, -0x53CA,0x6025,0x75BE,0x6C72,0x5373,0x5AC9,0x7EA7,0x6324, -0x51E0,0x810A,0x5DF1,0x84DF,0x6280,0x5180,0x5B63,0x4F0E, -0x796D,0x5242,0x60B8,0x6D4E,0x5BC4,0x5BC2,0x8BA1,0x8BB0, -0x65E2,0x5FCC,0x9645,0x5993,0x7EE7,0x7EAA,0x5609,0x67B7, -0x5939,0x4F73,0x5BB6,0x52A0,0x835A,0x988A,0x8D3E,0x7532, -0x94BE,0x5047,0x7A3C,0x4EF7,0x67B6,0x9A7E,0x5AC1,0x6B7C, -0x76D1,0x575A,0x5C16,0x7B3A,0x95F4,0x714E,0x517C,0x80A9, -0x8270,0x5978,0x7F04,0x8327,0x68C0,0x67EC,0x78B1,0x7877, -0x62E3,0x6361,0x7B80,0x4FED,0x526A,0x51CF,0x8350,0x69DB, -0x9274,0x8DF5,0x8D31,0x89C1,0x952E,0x7BAD,0x4EF6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7D37,0x7D38,0x7D39,0x7D3A,0x7D3B,0x7D3C,0x7D3D,0x7D3E, -0x7D3F,0x7D40,0x7D41,0x7D42,0x7D43,0x7D44,0x7D45,0x7D46, -0x7D47,0x7D48,0x7D49,0x7D4A,0x7D4B,0x7D4C,0x7D4D,0x7D4E, -0x7D4F,0x7D50,0x7D51,0x7D52,0x7D53,0x7D54,0x7D55,0x7D56, -0x7D57,0x7D58,0x7D59,0x7D5A,0x7D5B,0x7D5C,0x7D5D,0x7D5E, -0x7D5F,0x7D60,0x7D61,0x7D62,0x7D63,0x7D64,0x7D65,0x7D66, -0x7D67,0x7D68,0x7D69,0x7D6A,0x7D6B,0x7D6C,0x7D6D,0x7D6F, -0x7D70,0x7D71,0x7D72,0x7D73,0x7D74,0x7D75,0x7D76, 0, -0x7D78,0x7D79,0x7D7A,0x7D7B,0x7D7C,0x7D7D,0x7D7E,0x7D7F, -0x7D80,0x7D81,0x7D82,0x7D83,0x7D84,0x7D85,0x7D86,0x7D87, -0x7D88,0x7D89,0x7D8A,0x7D8B,0x7D8C,0x7D8D,0x7D8E,0x7D8F, -0x7D90,0x7D91,0x7D92,0x7D93,0x7D94,0x7D95,0x7D96,0x7D97, -0x7D98,0x5065,0x8230,0x5251,0x996F,0x6E10,0x6E85,0x6DA7, -0x5EFA,0x50F5,0x59DC,0x5C06,0x6D46,0x6C5F,0x7586,0x848B, -0x6868,0x5956,0x8BB2,0x5320,0x9171,0x964D,0x8549,0x6912, -0x7901,0x7126,0x80F6,0x4EA4,0x90CA,0x6D47,0x9A84,0x5A07, -0x56BC,0x6405,0x94F0,0x77EB,0x4FA5,0x811A,0x72E1,0x89D2, -0x997A,0x7F34,0x7EDE,0x527F,0x6559,0x9175,0x8F7F,0x8F83, -0x53EB,0x7A96,0x63ED,0x63A5,0x7686,0x79F8,0x8857,0x9636, -0x622A,0x52AB,0x8282,0x6854,0x6770,0x6377,0x776B,0x7AED, -0x6D01,0x7ED3,0x89E3,0x59D0,0x6212,0x85C9,0x82A5,0x754C, -0x501F,0x4ECB,0x75A5,0x8BEB,0x5C4A,0x5DFE,0x7B4B,0x65A4, -0x91D1,0x4ECA,0x6D25,0x895F,0x7D27,0x9526,0x4EC5,0x8C28, -0x8FDB,0x9773,0x664B,0x7981,0x8FD1,0x70EC,0x6D78, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7D99,0x7D9A,0x7D9B,0x7D9C,0x7D9D,0x7D9E,0x7D9F,0x7DA0, -0x7DA1,0x7DA2,0x7DA3,0x7DA4,0x7DA5,0x7DA7,0x7DA8,0x7DA9, -0x7DAA,0x7DAB,0x7DAC,0x7DAD,0x7DAF,0x7DB0,0x7DB1,0x7DB2, -0x7DB3,0x7DB4,0x7DB5,0x7DB6,0x7DB7,0x7DB8,0x7DB9,0x7DBA, -0x7DBB,0x7DBC,0x7DBD,0x7DBE,0x7DBF,0x7DC0,0x7DC1,0x7DC2, -0x7DC3,0x7DC4,0x7DC5,0x7DC6,0x7DC7,0x7DC8,0x7DC9,0x7DCA, -0x7DCB,0x7DCC,0x7DCD,0x7DCE,0x7DCF,0x7DD0,0x7DD1,0x7DD2, -0x7DD3,0x7DD4,0x7DD5,0x7DD6,0x7DD7,0x7DD8,0x7DD9, 0, -0x7DDA,0x7DDB,0x7DDC,0x7DDD,0x7DDE,0x7DDF,0x7DE0,0x7DE1, -0x7DE2,0x7DE3,0x7DE4,0x7DE5,0x7DE6,0x7DE7,0x7DE8,0x7DE9, -0x7DEA,0x7DEB,0x7DEC,0x7DED,0x7DEE,0x7DEF,0x7DF0,0x7DF1, -0x7DF2,0x7DF3,0x7DF4,0x7DF5,0x7DF6,0x7DF7,0x7DF8,0x7DF9, -0x7DFA,0x5C3D,0x52B2,0x8346,0x5162,0x830E,0x775B,0x6676, -0x9CB8,0x4EAC,0x60CA,0x7CBE,0x7CB3,0x7ECF,0x4E95,0x8B66, -0x666F,0x9888,0x9759,0x5883,0x656C,0x955C,0x5F84,0x75C9, -0x9756,0x7ADF,0x7ADE,0x51C0,0x70AF,0x7A98,0x63EA,0x7A76, -0x7EA0,0x7396,0x97ED,0x4E45,0x7078,0x4E5D,0x9152,0x53A9, -0x6551,0x65E7,0x81FC,0x8205,0x548E,0x5C31,0x759A,0x97A0, -0x62D8,0x72D9,0x75BD,0x5C45,0x9A79,0x83CA,0x5C40,0x5480, -0x77E9,0x4E3E,0x6CAE,0x805A,0x62D2,0x636E,0x5DE8,0x5177, -0x8DDD,0x8E1E,0x952F,0x4FF1,0x53E5,0x60E7,0x70AC,0x5267, -0x6350,0x9E43,0x5A1F,0x5026,0x7737,0x5377,0x7EE2,0x6485, -0x652B,0x6289,0x6398,0x5014,0x7235,0x89C9,0x51B3,0x8BC0, -0x7EDD,0x5747,0x83CC,0x94A7,0x519B,0x541B,0x5CFB, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7DFB,0x7DFC,0x7DFD,0x7DFE,0x7DFF,0x7E00,0x7E01,0x7E02, -0x7E03,0x7E04,0x7E05,0x7E06,0x7E07,0x7E08,0x7E09,0x7E0A, -0x7E0B,0x7E0C,0x7E0D,0x7E0E,0x7E0F,0x7E10,0x7E11,0x7E12, -0x7E13,0x7E14,0x7E15,0x7E16,0x7E17,0x7E18,0x7E19,0x7E1A, -0x7E1B,0x7E1C,0x7E1D,0x7E1E,0x7E1F,0x7E20,0x7E21,0x7E22, -0x7E23,0x7E24,0x7E25,0x7E26,0x7E27,0x7E28,0x7E29,0x7E2A, -0x7E2B,0x7E2C,0x7E2D,0x7E2E,0x7E2F,0x7E30,0x7E31,0x7E32, -0x7E33,0x7E34,0x7E35,0x7E36,0x7E37,0x7E38,0x7E39, 0, -0x7E3A,0x7E3C,0x7E3D,0x7E3E,0x7E3F,0x7E40,0x7E42,0x7E43, -0x7E44,0x7E45,0x7E46,0x7E48,0x7E49,0x7E4A,0x7E4B,0x7E4C, -0x7E4D,0x7E4E,0x7E4F,0x7E50,0x7E51,0x7E52,0x7E53,0x7E54, -0x7E55,0x7E56,0x7E57,0x7E58,0x7E59,0x7E5A,0x7E5B,0x7E5C, -0x7E5D,0x4FCA,0x7AE3,0x6D5A,0x90E1,0x9A8F,0x5580,0x5496, -0x5361,0x54AF,0x5F00,0x63E9,0x6977,0x51EF,0x6168,0x520A, -0x582A,0x52D8,0x574E,0x780D,0x770B,0x5EB7,0x6177,0x7CE0, -0x625B,0x6297,0x4EA2,0x7095,0x8003,0x62F7,0x70E4,0x9760, -0x5777,0x82DB,0x67EF,0x68F5,0x78D5,0x9897,0x79D1,0x58F3, -0x54B3,0x53EF,0x6E34,0x514B,0x523B,0x5BA2,0x8BFE,0x80AF, -0x5543,0x57A6,0x6073,0x5751,0x542D,0x7A7A,0x6050,0x5B54, -0x63A7,0x62A0,0x53E3,0x6263,0x5BC7,0x67AF,0x54ED,0x7A9F, -0x82E6,0x9177,0x5E93,0x88E4,0x5938,0x57AE,0x630E,0x8DE8, -0x80EF,0x5757,0x7B77,0x4FA9,0x5FEB,0x5BBD,0x6B3E,0x5321, -0x7B50,0x72C2,0x6846,0x77FF,0x7736,0x65F7,0x51B5,0x4E8F, -0x76D4,0x5CBF,0x7AA5,0x8475,0x594E,0x9B41,0x5080, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7E5E,0x7E5F,0x7E60,0x7E61,0x7E62,0x7E63,0x7E64,0x7E65, -0x7E66,0x7E67,0x7E68,0x7E69,0x7E6A,0x7E6B,0x7E6C,0x7E6D, -0x7E6E,0x7E6F,0x7E70,0x7E71,0x7E72,0x7E73,0x7E74,0x7E75, -0x7E76,0x7E77,0x7E78,0x7E79,0x7E7A,0x7E7B,0x7E7C,0x7E7D, -0x7E7E,0x7E7F,0x7E80,0x7E81,0x7E83,0x7E84,0x7E85,0x7E86, -0x7E87,0x7E88,0x7E89,0x7E8A,0x7E8B,0x7E8C,0x7E8D,0x7E8E, -0x7E8F,0x7E90,0x7E91,0x7E92,0x7E93,0x7E94,0x7E95,0x7E96, -0x7E97,0x7E98,0x7E99,0x7E9A,0x7E9C,0x7E9D,0x7E9E, 0, -0x7EAE,0x7EB4,0x7EBB,0x7EBC,0x7ED6,0x7EE4,0x7EEC,0x7EF9, -0x7F0A,0x7F10,0x7F1E,0x7F37,0x7F39,0x7F3B,0x7F3C,0x7F3D, -0x7F3E,0x7F3F,0x7F40,0x7F41,0x7F43,0x7F46,0x7F47,0x7F48, -0x7F49,0x7F4A,0x7F4B,0x7F4C,0x7F4D,0x7F4E,0x7F4F,0x7F52, -0x7F53,0x9988,0x6127,0x6E83,0x5764,0x6606,0x6346,0x56F0, -0x62EC,0x6269,0x5ED3,0x9614,0x5783,0x62C9,0x5587,0x8721, -0x814A,0x8FA3,0x5566,0x83B1,0x6765,0x8D56,0x84DD,0x5A6A, -0x680F,0x62E6,0x7BEE,0x9611,0x5170,0x6F9C,0x8C30,0x63FD, -0x89C8,0x61D2,0x7F06,0x70C2,0x6EE5,0x7405,0x6994,0x72FC, -0x5ECA,0x90CE,0x6717,0x6D6A,0x635E,0x52B3,0x7262,0x8001, -0x4F6C,0x59E5,0x916A,0x70D9,0x6D9D,0x52D2,0x4E50,0x96F7, -0x956D,0x857E,0x78CA,0x7D2F,0x5121,0x5792,0x64C2,0x808B, -0x7C7B,0x6CEA,0x68F1,0x695E,0x51B7,0x5398,0x68A8,0x7281, -0x9ECE,0x7BF1,0x72F8,0x79BB,0x6F13,0x7406,0x674E,0x91CC, -0x9CA4,0x793C,0x8389,0x8354,0x540F,0x6817,0x4E3D,0x5389, -0x52B1,0x783E,0x5386,0x5229,0x5088,0x4F8B,0x4FD0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7F56,0x7F59,0x7F5B,0x7F5C,0x7F5D,0x7F5E,0x7F60,0x7F63, -0x7F64,0x7F65,0x7F66,0x7F67,0x7F6B,0x7F6C,0x7F6D,0x7F6F, -0x7F70,0x7F73,0x7F75,0x7F76,0x7F77,0x7F78,0x7F7A,0x7F7B, -0x7F7C,0x7F7D,0x7F7F,0x7F80,0x7F82,0x7F83,0x7F84,0x7F85, -0x7F86,0x7F87,0x7F88,0x7F89,0x7F8B,0x7F8D,0x7F8F,0x7F90, -0x7F91,0x7F92,0x7F93,0x7F95,0x7F96,0x7F97,0x7F98,0x7F99, -0x7F9B,0x7F9C,0x7FA0,0x7FA2,0x7FA3,0x7FA5,0x7FA6,0x7FA8, -0x7FA9,0x7FAA,0x7FAB,0x7FAC,0x7FAD,0x7FAE,0x7FB1, 0, -0x7FB3,0x7FB4,0x7FB5,0x7FB6,0x7FB7,0x7FBA,0x7FBB,0x7FBE, -0x7FC0,0x7FC2,0x7FC3,0x7FC4,0x7FC6,0x7FC7,0x7FC8,0x7FC9, -0x7FCB,0x7FCD,0x7FCF,0x7FD0,0x7FD1,0x7FD2,0x7FD3,0x7FD6, -0x7FD7,0x7FD9,0x7FDA,0x7FDB,0x7FDC,0x7FDD,0x7FDE,0x7FE2, -0x7FE3,0x75E2,0x7ACB,0x7C92,0x6CA5,0x96B6,0x529B,0x7483, -0x54E9,0x4FE9,0x8054,0x83B2,0x8FDE,0x9570,0x5EC9,0x601C, -0x6D9F,0x5E18,0x655B,0x8138,0x94FE,0x604B,0x70BC,0x7EC3, -0x7CAE,0x51C9,0x6881,0x7CB1,0x826F,0x4E24,0x8F86,0x91CF, -0x667E,0x4EAE,0x8C05,0x64A9,0x804A,0x50DA,0x7597,0x71CE, -0x5BE5,0x8FBD,0x6F66,0x4E86,0x6482,0x9563,0x5ED6,0x6599, -0x5217,0x88C2,0x70C8,0x52A3,0x730E,0x7433,0x6797,0x78F7, -0x9716,0x4E34,0x90BB,0x9CDE,0x6DCB,0x51DB,0x8D41,0x541D, -0x62CE,0x73B2,0x83F1,0x96F6,0x9F84,0x94C3,0x4F36,0x7F9A, -0x51CC,0x7075,0x9675,0x5CAD,0x9886,0x53E6,0x4EE4,0x6E9C, -0x7409,0x69B4,0x786B,0x998F,0x7559,0x5218,0x7624,0x6D41, -0x67F3,0x516D,0x9F99,0x804B,0x5499,0x7B3C,0x7ABF, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7FE4,0x7FE7,0x7FE8,0x7FEA,0x7FEB,0x7FEC,0x7FED,0x7FEF, -0x7FF2,0x7FF4,0x7FF5,0x7FF6,0x7FF7,0x7FF8,0x7FF9,0x7FFA, -0x7FFD,0x7FFE,0x7FFF,0x8002,0x8007,0x8008,0x8009,0x800A, -0x800E,0x800F,0x8011,0x8013,0x801A,0x801B,0x801D,0x801E, -0x801F,0x8021,0x8023,0x8024,0x802B,0x802C,0x802D,0x802E, -0x802F,0x8030,0x8032,0x8034,0x8039,0x803A,0x803C,0x803E, -0x8040,0x8041,0x8044,0x8045,0x8047,0x8048,0x8049,0x804E, -0x804F,0x8050,0x8051,0x8053,0x8055,0x8056,0x8057, 0, -0x8059,0x805B,0x805C,0x805D,0x805E,0x805F,0x8060,0x8061, -0x8062,0x8063,0x8064,0x8065,0x8066,0x8067,0x8068,0x806B, -0x806C,0x806D,0x806E,0x806F,0x8070,0x8072,0x8073,0x8074, -0x8075,0x8076,0x8077,0x8078,0x8079,0x807A,0x807B,0x807C, -0x807D,0x9686,0x5784,0x62E2,0x9647,0x697C,0x5A04,0x6402, -0x7BD3,0x6F0F,0x964B,0x82A6,0x5362,0x9885,0x5E90,0x7089, -0x63B3,0x5364,0x864F,0x9C81,0x9E93,0x788C,0x9732,0x8DEF, -0x8D42,0x9E7F,0x6F5E,0x7984,0x5F55,0x9646,0x622E,0x9A74, -0x5415,0x94DD,0x4FA3,0x65C5,0x5C65,0x5C61,0x7F15,0x8651, -0x6C2F,0x5F8B,0x7387,0x6EE4,0x7EFF,0x5CE6,0x631B,0x5B6A, -0x6EE6,0x5375,0x4E71,0x63A0,0x7565,0x62A1,0x8F6E,0x4F26, -0x4ED1,0x6CA6,0x7EB6,0x8BBA,0x841D,0x87BA,0x7F57,0x903B, -0x9523,0x7BA9,0x9AA1,0x88F8,0x843D,0x6D1B,0x9A86,0x7EDC, -0x5988,0x9EBB,0x739B,0x7801,0x8682,0x9A6C,0x9A82,0x561B, -0x5417,0x57CB,0x4E70,0x9EA6,0x5356,0x8FC8,0x8109,0x7792, -0x9992,0x86EE,0x6EE1,0x8513,0x66FC,0x6162,0x6F2B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x807E,0x8081,0x8082,0x8085,0x8088,0x808A,0x808D,0x808E, -0x808F,0x8090,0x8091,0x8092,0x8094,0x8095,0x8097,0x8099, -0x809E,0x80A3,0x80A6,0x80A7,0x80A8,0x80AC,0x80B0,0x80B3, -0x80B5,0x80B6,0x80B8,0x80B9,0x80BB,0x80C5,0x80C7,0x80C8, -0x80C9,0x80CA,0x80CB,0x80CF,0x80D0,0x80D1,0x80D2,0x80D3, -0x80D4,0x80D5,0x80D8,0x80DF,0x80E0,0x80E2,0x80E3,0x80E6, -0x80EE,0x80F5,0x80F7,0x80F9,0x80FB,0x80FE,0x80FF,0x8100, -0x8101,0x8103,0x8104,0x8105,0x8107,0x8108,0x810B, 0, -0x810C,0x8115,0x8117,0x8119,0x811B,0x811C,0x811D,0x811F, -0x8120,0x8121,0x8122,0x8123,0x8124,0x8125,0x8126,0x8127, -0x8128,0x8129,0x812A,0x812B,0x812D,0x812E,0x8130,0x8133, -0x8134,0x8135,0x8137,0x8139,0x813A,0x813B,0x813C,0x813D, -0x813F,0x8C29,0x8292,0x832B,0x76F2,0x6C13,0x5FD9,0x83BD, -0x732B,0x8305,0x951A,0x6BDB,0x77DB,0x94C6,0x536F,0x8302, -0x5192,0x5E3D,0x8C8C,0x8D38,0x4E48,0x73AB,0x679A,0x6885, -0x9176,0x9709,0x7164,0x6CA1,0x7709,0x5A92,0x9541,0x6BCF, -0x7F8E,0x6627,0x5BD0,0x59B9,0x5A9A,0x95E8,0x95F7,0x4EEC, -0x840C,0x8499,0x6AAC,0x76DF,0x9530,0x731B,0x68A6,0x5B5F, -0x772F,0x919A,0x9761,0x7CDC,0x8FF7,0x8C1C,0x5F25,0x7C73, -0x79D8,0x89C5,0x6CCC,0x871C,0x5BC6,0x5E42,0x68C9,0x7720, -0x7EF5,0x5195,0x514D,0x52C9,0x5A29,0x7F05,0x9762,0x82D7, -0x63CF,0x7784,0x85D0,0x79D2,0x6E3A,0x5E99,0x5999,0x8511, -0x706D,0x6C11,0x62BF,0x76BF,0x654F,0x60AF,0x95FD,0x660E, -0x879F,0x9E23,0x94ED,0x540D,0x547D,0x8C2C,0x6478, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8140,0x8141,0x8142,0x8143,0x8144,0x8145,0x8147,0x8149, -0x814D,0x814E,0x814F,0x8152,0x8156,0x8157,0x8158,0x815B, -0x815C,0x815D,0x815E,0x815F,0x8161,0x8162,0x8163,0x8164, -0x8166,0x8168,0x816A,0x816B,0x816C,0x816F,0x8172,0x8173, -0x8175,0x8176,0x8177,0x8178,0x8181,0x8183,0x8184,0x8185, -0x8186,0x8187,0x8189,0x818B,0x818C,0x818D,0x818E,0x8190, -0x8192,0x8193,0x8194,0x8195,0x8196,0x8197,0x8199,0x819A, -0x819E,0x819F,0x81A0,0x81A1,0x81A2,0x81A4,0x81A5, 0, -0x81A7,0x81A9,0x81AB,0x81AC,0x81AD,0x81AE,0x81AF,0x81B0, -0x81B1,0x81B2,0x81B4,0x81B5,0x81B6,0x81B7,0x81B8,0x81B9, -0x81BC,0x81BD,0x81BE,0x81BF,0x81C4,0x81C5,0x81C7,0x81C8, -0x81C9,0x81CB,0x81CD,0x81CE,0x81CF,0x81D0,0x81D1,0x81D2, -0x81D3,0x6479,0x8611,0x6A21,0x819C,0x78E8,0x6469,0x9B54, -0x62B9,0x672B,0x83AB,0x58A8,0x9ED8,0x6CAB,0x6F20,0x5BDE, -0x964C,0x8C0B,0x725F,0x67D0,0x62C7,0x7261,0x4EA9,0x59C6, -0x6BCD,0x5893,0x66AE,0x5E55,0x52DF,0x6155,0x6728,0x76EE, -0x7766,0x7267,0x7A46,0x62FF,0x54EA,0x5450,0x94A0,0x90A3, -0x5A1C,0x7EB3,0x6C16,0x4E43,0x5976,0x8010,0x5948,0x5357, -0x7537,0x96BE,0x56CA,0x6320,0x8111,0x607C,0x95F9,0x6DD6, -0x5462,0x9981,0x5185,0x5AE9,0x80FD,0x59AE,0x9713,0x502A, -0x6CE5,0x5C3C,0x62DF,0x4F60,0x533F,0x817B,0x9006,0x6EBA, -0x852B,0x62C8,0x5E74,0x78BE,0x64B5,0x637B,0x5FF5,0x5A18, -0x917F,0x9E1F,0x5C3F,0x634F,0x8042,0x5B7D,0x556E,0x954A, -0x954D,0x6D85,0x60A8,0x67E0,0x72DE,0x51DD,0x5B81, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x81D4,0x81D5,0x81D6,0x81D7,0x81D8,0x81D9,0x81DA,0x81DB, -0x81DC,0x81DD,0x81DE,0x81DF,0x81E0,0x81E1,0x81E2,0x81E4, -0x81E5,0x81E6,0x81E8,0x81E9,0x81EB,0x81EE,0x81EF,0x81F0, -0x81F1,0x81F2,0x81F5,0x81F6,0x81F7,0x81F8,0x81F9,0x81FA, -0x81FD,0x81FF,0x8203,0x8207,0x8208,0x8209,0x820A,0x820B, -0x820E,0x820F,0x8211,0x8213,0x8215,0x8216,0x8217,0x8218, -0x8219,0x821A,0x821D,0x8220,0x8224,0x8225,0x8226,0x8227, -0x8229,0x822E,0x8232,0x823A,0x823C,0x823D,0x823F, 0, -0x8240,0x8241,0x8242,0x8243,0x8245,0x8246,0x8248,0x824A, -0x824C,0x824D,0x824E,0x8250,0x8251,0x8252,0x8253,0x8254, -0x8255,0x8256,0x8257,0x8259,0x825B,0x825C,0x825D,0x825E, -0x8260,0x8261,0x8262,0x8263,0x8264,0x8265,0x8266,0x8267, -0x8269,0x62E7,0x6CDE,0x725B,0x626D,0x94AE,0x7EBD,0x8113, -0x6D53,0x519C,0x5F04,0x5974,0x52AA,0x6012,0x5973,0x6696, -0x8650,0x759F,0x632A,0x61E6,0x7CEF,0x8BFA,0x54E6,0x6B27, -0x9E25,0x6BB4,0x85D5,0x5455,0x5076,0x6CA4,0x556A,0x8DB4, -0x722C,0x5E15,0x6015,0x7436,0x62CD,0x6392,0x724C,0x5F98, -0x6E43,0x6D3E,0x6500,0x6F58,0x76D8,0x78D0,0x76FC,0x7554, -0x5224,0x53DB,0x4E53,0x5E9E,0x65C1,0x802A,0x80D6,0x629B, -0x5486,0x5228,0x70AE,0x888D,0x8DD1,0x6CE1,0x5478,0x80DA, -0x57F9,0x88F4,0x8D54,0x966A,0x914D,0x4F69,0x6C9B,0x55B7, -0x76C6,0x7830,0x62A8,0x70F9,0x6F8E,0x5F6D,0x84EC,0x68DA, -0x787C,0x7BF7,0x81A8,0x670B,0x9E4F,0x6367,0x78B0,0x576F, -0x7812,0x9739,0x6279,0x62AB,0x5288,0x7435,0x6BD7, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x826A,0x826B,0x826C,0x826D,0x8271,0x8275,0x8276,0x8277, -0x8278,0x827B,0x827C,0x8280,0x8281,0x8283,0x8285,0x8286, -0x8287,0x8289,0x828C,0x8290,0x8293,0x8294,0x8295,0x8296, -0x829A,0x829B,0x829E,0x82A0,0x82A2,0x82A3,0x82A7,0x82B2, -0x82B5,0x82B6,0x82BA,0x82BB,0x82BC,0x82BF,0x82C0,0x82C2, -0x82C3,0x82C5,0x82C6,0x82C9,0x82D0,0x82D6,0x82D9,0x82DA, -0x82DD,0x82E2,0x82E7,0x82E8,0x82E9,0x82EA,0x82EC,0x82ED, -0x82EE,0x82F0,0x82F2,0x82F3,0x82F5,0x82F6,0x82F8, 0, -0x82FA,0x82FC,0x82FD,0x82FE,0x82FF,0x8300,0x830A,0x830B, -0x830D,0x8310,0x8312,0x8313,0x8316,0x8318,0x8319,0x831D, -0x831E,0x831F,0x8320,0x8321,0x8322,0x8323,0x8324,0x8325, -0x8326,0x8329,0x832A,0x832E,0x8330,0x8332,0x8337,0x833B, -0x833D,0x5564,0x813E,0x75B2,0x76AE,0x5339,0x75DE,0x50FB, -0x5C41,0x8B6C,0x7BC7,0x504F,0x7247,0x9A97,0x98D8,0x6F02, -0x74E2,0x7968,0x6487,0x77A5,0x62FC,0x9891,0x8D2B,0x54C1, -0x8058,0x4E52,0x576A,0x82F9,0x840D,0x5E73,0x51ED,0x74F6, -0x8BC4,0x5C4F,0x5761,0x6CFC,0x9887,0x5A46,0x7834,0x9B44, -0x8FEB,0x7C95,0x5256,0x6251,0x94FA,0x4EC6,0x8386,0x8461, -0x83E9,0x84B2,0x57D4,0x6734,0x5703,0x666E,0x6D66,0x8C31, -0x66DD,0x7011,0x671F,0x6B3A,0x6816,0x621A,0x59BB,0x4E03, -0x51C4,0x6F06,0x67D2,0x6C8F,0x5176,0x68CB,0x5947,0x6B67, -0x7566,0x5D0E,0x8110,0x9F50,0x65D7,0x7948,0x7941,0x9A91, -0x8D77,0x5C82,0x4E5E,0x4F01,0x542F,0x5951,0x780C,0x5668, -0x6C14,0x8FC4,0x5F03,0x6C7D,0x6CE3,0x8BAB,0x6390, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x833E,0x833F,0x8341,0x8342,0x8344,0x8345,0x8348,0x834A, -0x834B,0x834C,0x834D,0x834E,0x8353,0x8355,0x8356,0x8357, -0x8358,0x8359,0x835D,0x8362,0x8370,0x8371,0x8372,0x8373, -0x8374,0x8375,0x8376,0x8379,0x837A,0x837E,0x837F,0x8380, -0x8381,0x8382,0x8383,0x8384,0x8387,0x8388,0x838A,0x838B, -0x838C,0x838D,0x838F,0x8390,0x8391,0x8394,0x8395,0x8396, -0x8397,0x8399,0x839A,0x839D,0x839F,0x83A1,0x83A2,0x83A3, -0x83A4,0x83A5,0x83A6,0x83A7,0x83AC,0x83AD,0x83AE, 0, -0x83AF,0x83B5,0x83BB,0x83BE,0x83BF,0x83C2,0x83C3,0x83C4, -0x83C6,0x83C8,0x83C9,0x83CB,0x83CD,0x83CE,0x83D0,0x83D1, -0x83D2,0x83D3,0x83D5,0x83D7,0x83D9,0x83DA,0x83DB,0x83DE, -0x83E2,0x83E3,0x83E4,0x83E6,0x83E7,0x83E8,0x83EB,0x83EC, -0x83ED,0x6070,0x6D3D,0x7275,0x6266,0x948E,0x94C5,0x5343, -0x8FC1,0x7B7E,0x4EDF,0x8C26,0x4E7E,0x9ED4,0x94B1,0x94B3, -0x524D,0x6F5C,0x9063,0x6D45,0x8C34,0x5811,0x5D4C,0x6B20, -0x6B49,0x67AA,0x545B,0x8154,0x7F8C,0x5899,0x8537,0x5F3A, -0x62A2,0x6A47,0x9539,0x6572,0x6084,0x6865,0x77A7,0x4E54, -0x4FA8,0x5DE7,0x9798,0x64AC,0x7FD8,0x5CED,0x4FCF,0x7A8D, -0x5207,0x8304,0x4E14,0x602F,0x7A83,0x94A6,0x4FB5,0x4EB2, -0x79E6,0x7434,0x52E4,0x82B9,0x64D2,0x79BD,0x5BDD,0x6C81, -0x9752,0x8F7B,0x6C22,0x503E,0x537F,0x6E05,0x64CE,0x6674, -0x6C30,0x60C5,0x9877,0x8BF7,0x5E86,0x743C,0x7A77,0x79CB, -0x4E18,0x90B1,0x7403,0x6C42,0x56DA,0x914B,0x6CC5,0x8D8B, -0x533A,0x86C6,0x66F2,0x8EAF,0x5C48,0x9A71,0x6E20, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x83EE,0x83EF,0x83F3,0x83F4,0x83F5,0x83F6,0x83F7,0x83FA, -0x83FB,0x83FC,0x83FE,0x83FF,0x8400,0x8402,0x8405,0x8407, -0x8408,0x8409,0x840A,0x8410,0x8412,0x8413,0x8414,0x8415, -0x8416,0x8417,0x8419,0x841A,0x841B,0x841E,0x841F,0x8420, -0x8421,0x8422,0x8423,0x8429,0x842A,0x842B,0x842C,0x842D, -0x842E,0x842F,0x8430,0x8432,0x8433,0x8434,0x8435,0x8436, -0x8437,0x8439,0x843A,0x843B,0x843E,0x843F,0x8440,0x8441, -0x8442,0x8443,0x8444,0x8445,0x8447,0x8448,0x8449, 0, -0x844A,0x844B,0x844C,0x844D,0x844E,0x844F,0x8450,0x8452, -0x8453,0x8454,0x8455,0x8456,0x8458,0x845D,0x845E,0x845F, -0x8460,0x8462,0x8464,0x8465,0x8466,0x8467,0x8468,0x846A, -0x846E,0x846F,0x8470,0x8472,0x8474,0x8477,0x8479,0x847B, -0x847C,0x53D6,0x5A36,0x9F8B,0x8DA3,0x53BB,0x5708,0x98A7, -0x6743,0x919B,0x6CC9,0x5168,0x75CA,0x62F3,0x72AC,0x5238, -0x529D,0x7F3A,0x7094,0x7638,0x5374,0x9E4A,0x69B7,0x786E, -0x96C0,0x88D9,0x7FA4,0x7136,0x71C3,0x5189,0x67D3,0x74E4, -0x58E4,0x6518,0x56B7,0x8BA9,0x9976,0x6270,0x7ED5,0x60F9, -0x70ED,0x58EC,0x4EC1,0x4EBA,0x5FCD,0x97E7,0x4EFB,0x8BA4, -0x5203,0x598A,0x7EAB,0x6254,0x4ECD,0x65E5,0x620E,0x8338, -0x84C9,0x8363,0x878D,0x7194,0x6EB6,0x5BB9,0x7ED2,0x5197, -0x63C9,0x67D4,0x8089,0x8339,0x8815,0x5112,0x5B7A,0x5982, -0x8FB1,0x4E73,0x6C5D,0x5165,0x8925,0x8F6F,0x962E,0x854A, -0x745E,0x9510,0x95F0,0x6DA6,0x82E5,0x5F31,0x6492,0x6D12, -0x8428,0x816E,0x9CC3,0x585E,0x8D5B,0x4E09,0x53C1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x847D,0x847E,0x847F,0x8480,0x8481,0x8483,0x8484,0x8485, -0x8486,0x848A,0x848D,0x848F,0x8490,0x8491,0x8492,0x8493, -0x8494,0x8495,0x8496,0x8498,0x849A,0x849B,0x849D,0x849E, -0x849F,0x84A0,0x84A2,0x84A3,0x84A4,0x84A5,0x84A6,0x84A7, -0x84A8,0x84A9,0x84AA,0x84AB,0x84AC,0x84AD,0x84AE,0x84B0, -0x84B1,0x84B3,0x84B5,0x84B6,0x84B7,0x84BB,0x84BC,0x84BE, -0x84C0,0x84C2,0x84C3,0x84C5,0x84C6,0x84C7,0x84C8,0x84CB, -0x84CC,0x84CE,0x84CF,0x84D2,0x84D4,0x84D5,0x84D7, 0, -0x84D8,0x84D9,0x84DA,0x84DB,0x84DC,0x84DE,0x84E1,0x84E2, -0x84E4,0x84E7,0x84E8,0x84E9,0x84EA,0x84EB,0x84ED,0x84EE, -0x84EF,0x84F1,0x84F2,0x84F3,0x84F4,0x84F5,0x84F6,0x84F7, -0x84F8,0x84F9,0x84FA,0x84FB,0x84FD,0x84FE,0x8500,0x8501, -0x8502,0x4F1E,0x6563,0x6851,0x55D3,0x4E27,0x6414,0x9A9A, -0x626B,0x5AC2,0x745F,0x8272,0x6DA9,0x68EE,0x50E7,0x838E, -0x7802,0x6740,0x5239,0x6C99,0x7EB1,0x50BB,0x5565,0x715E, -0x7B5B,0x6652,0x73CA,0x82EB,0x6749,0x5C71,0x5220,0x717D, -0x886B,0x95EA,0x9655,0x64C5,0x8D61,0x81B3,0x5584,0x6C55, -0x6247,0x7F2E,0x5892,0x4F24,0x5546,0x8D4F,0x664C,0x4E0A, -0x5C1A,0x88F3,0x68A2,0x634E,0x7A0D,0x70E7,0x828D,0x52FA, -0x97F6,0x5C11,0x54E8,0x90B5,0x7ECD,0x5962,0x8D4A,0x86C7, -0x820C,0x820D,0x8D66,0x6444,0x5C04,0x6151,0x6D89,0x793E, -0x8BBE,0x7837,0x7533,0x547B,0x4F38,0x8EAB,0x6DF1,0x5A20, -0x7EC5,0x795E,0x6C88,0x5BA1,0x5A76,0x751A,0x80BE,0x614E, -0x6E17,0x58F0,0x751F,0x7525,0x7272,0x5347,0x7EF3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8503,0x8504,0x8505,0x8506,0x8507,0x8508,0x8509,0x850A, -0x850B,0x850D,0x850E,0x850F,0x8510,0x8512,0x8514,0x8515, -0x8516,0x8518,0x8519,0x851B,0x851C,0x851D,0x851E,0x8520, -0x8522,0x8523,0x8524,0x8525,0x8526,0x8527,0x8528,0x8529, -0x852A,0x852D,0x852E,0x852F,0x8530,0x8531,0x8532,0x8533, -0x8534,0x8535,0x8536,0x853E,0x853F,0x8540,0x8541,0x8542, -0x8544,0x8545,0x8546,0x8547,0x854B,0x854C,0x854D,0x854E, -0x854F,0x8550,0x8551,0x8552,0x8553,0x8554,0x8555, 0, -0x8557,0x8558,0x855A,0x855B,0x855C,0x855D,0x855F,0x8560, -0x8561,0x8562,0x8563,0x8565,0x8566,0x8567,0x8569,0x856A, -0x856B,0x856C,0x856D,0x856E,0x856F,0x8570,0x8571,0x8573, -0x8575,0x8576,0x8577,0x8578,0x857C,0x857D,0x857F,0x8580, -0x8581,0x7701,0x76DB,0x5269,0x80DC,0x5723,0x5E08,0x5931, -0x72EE,0x65BD,0x6E7F,0x8BD7,0x5C38,0x8671,0x5341,0x77F3, -0x62FE,0x65F6,0x4EC0,0x98DF,0x8680,0x5B9E,0x8BC6,0x53F2, -0x77E2,0x4F7F,0x5C4E,0x9A76,0x59CB,0x5F0F,0x793A,0x58EB, -0x4E16,0x67FF,0x4E8B,0x62ED,0x8A93,0x901D,0x52BF,0x662F, -0x55DC,0x566C,0x9002,0x4ED5,0x4F8D,0x91CA,0x9970,0x6C0F, -0x5E02,0x6043,0x5BA4,0x89C6,0x8BD5,0x6536,0x624B,0x9996, -0x5B88,0x5BFF,0x6388,0x552E,0x53D7,0x7626,0x517D,0x852C, -0x67A2,0x68B3,0x6B8A,0x6292,0x8F93,0x53D4,0x8212,0x6DD1, -0x758F,0x4E66,0x8D4E,0x5B70,0x719F,0x85AF,0x6691,0x66D9, -0x7F72,0x8700,0x9ECD,0x9F20,0x5C5E,0x672F,0x8FF0,0x6811, -0x675F,0x620D,0x7AD6,0x5885,0x5EB6,0x6570,0x6F31, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8582,0x8583,0x8586,0x8588,0x8589,0x858A,0x858B,0x858C, -0x858D,0x858E,0x8590,0x8591,0x8592,0x8593,0x8594,0x8595, -0x8596,0x8597,0x8598,0x8599,0x859A,0x859D,0x859E,0x859F, -0x85A0,0x85A1,0x85A2,0x85A3,0x85A5,0x85A6,0x85A7,0x85A9, -0x85AB,0x85AC,0x85AD,0x85B1,0x85B2,0x85B3,0x85B4,0x85B5, -0x85B6,0x85B8,0x85BA,0x85BB,0x85BC,0x85BD,0x85BE,0x85BF, -0x85C0,0x85C2,0x85C3,0x85C4,0x85C5,0x85C6,0x85C7,0x85C8, -0x85CA,0x85CB,0x85CC,0x85CD,0x85CE,0x85D1,0x85D2, 0, -0x85D4,0x85D6,0x85D7,0x85D8,0x85D9,0x85DA,0x85DB,0x85DD, -0x85DE,0x85DF,0x85E0,0x85E1,0x85E2,0x85E3,0x85E5,0x85E6, -0x85E7,0x85E8,0x85EA,0x85EB,0x85EC,0x85ED,0x85EE,0x85EF, -0x85F0,0x85F1,0x85F2,0x85F3,0x85F4,0x85F5,0x85F6,0x85F7, -0x85F8,0x6055,0x5237,0x800D,0x6454,0x8870,0x7529,0x5E05, -0x6813,0x62F4,0x971C,0x53CC,0x723D,0x8C01,0x6C34,0x7761, -0x7A0E,0x542E,0x77AC,0x987A,0x821C,0x8BF4,0x7855,0x6714, -0x70C1,0x65AF,0x6495,0x5636,0x601D,0x79C1,0x53F8,0x4E1D, -0x6B7B,0x8086,0x5BFA,0x55E3,0x56DB,0x4F3A,0x4F3C,0x9972, -0x5DF3,0x677E,0x8038,0x6002,0x9882,0x9001,0x5B8B,0x8BBC, -0x8BF5,0x641C,0x8258,0x64DE,0x55FD,0x82CF,0x9165,0x4FD7, -0x7D20,0x901F,0x7C9F,0x50F3,0x5851,0x6EAF,0x5BBF,0x8BC9, -0x8083,0x9178,0x849C,0x7B97,0x867D,0x968B,0x968F,0x7EE5, -0x9AD3,0x788E,0x5C81,0x7A57,0x9042,0x96A7,0x795F,0x5B59, -0x635F,0x7B0B,0x84D1,0x68AD,0x5506,0x7F29,0x7410,0x7D22, -0x9501,0x6240,0x584C,0x4ED6,0x5B83,0x5979,0x5854, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x85F9,0x85FA,0x85FC,0x85FD,0x85FE,0x8600,0x8601,0x8602, -0x8603,0x8604,0x8606,0x8607,0x8608,0x8609,0x860A,0x860B, -0x860C,0x860D,0x860E,0x860F,0x8610,0x8612,0x8613,0x8614, -0x8615,0x8617,0x8618,0x8619,0x861A,0x861B,0x861C,0x861D, -0x861E,0x861F,0x8620,0x8621,0x8622,0x8623,0x8624,0x8625, -0x8626,0x8628,0x862A,0x862B,0x862C,0x862D,0x862E,0x862F, -0x8630,0x8631,0x8632,0x8633,0x8634,0x8635,0x8636,0x8637, -0x8639,0x863A,0x863B,0x863D,0x863E,0x863F,0x8640, 0, -0x8641,0x8642,0x8643,0x8644,0x8645,0x8646,0x8647,0x8648, -0x8649,0x864A,0x864B,0x864C,0x8652,0x8653,0x8655,0x8656, -0x8657,0x8658,0x8659,0x865B,0x865C,0x865D,0x865F,0x8660, -0x8661,0x8663,0x8664,0x8665,0x8666,0x8667,0x8668,0x8669, -0x866A,0x736D,0x631E,0x8E4B,0x8E0F,0x80CE,0x82D4,0x62AC, -0x53F0,0x6CF0,0x915E,0x592A,0x6001,0x6C70,0x574D,0x644A, -0x8D2A,0x762B,0x6EE9,0x575B,0x6A80,0x75F0,0x6F6D,0x8C2D, -0x8C08,0x5766,0x6BEF,0x8892,0x78B3,0x63A2,0x53F9,0x70AD, -0x6C64,0x5858,0x642A,0x5802,0x68E0,0x819B,0x5510,0x7CD6, -0x5018,0x8EBA,0x6DCC,0x8D9F,0x70EB,0x638F,0x6D9B,0x6ED4, -0x7EE6,0x8404,0x6843,0x9003,0x6DD8,0x9676,0x8BA8,0x5957, -0x7279,0x85E4,0x817E,0x75BC,0x8A8A,0x68AF,0x5254,0x8E22, -0x9511,0x63D0,0x9898,0x8E44,0x557C,0x4F53,0x66FF,0x568F, -0x60D5,0x6D95,0x5243,0x5C49,0x5929,0x6DFB,0x586B,0x7530, -0x751C,0x606C,0x8214,0x8146,0x6311,0x6761,0x8FE2,0x773A, -0x8DF3,0x8D34,0x94C1,0x5E16,0x5385,0x542C,0x70C3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x866D,0x866F,0x8670,0x8672,0x8673,0x8674,0x8675,0x8676, -0x8677,0x8678,0x8683,0x8684,0x8685,0x8686,0x8687,0x8688, -0x8689,0x868E,0x868F,0x8690,0x8691,0x8692,0x8694,0x8696, -0x8697,0x8698,0x8699,0x869A,0x869B,0x869E,0x869F,0x86A0, -0x86A1,0x86A2,0x86A5,0x86A6,0x86AB,0x86AD,0x86AE,0x86B2, -0x86B3,0x86B7,0x86B8,0x86B9,0x86BB,0x86BC,0x86BD,0x86BE, -0x86BF,0x86C1,0x86C2,0x86C3,0x86C5,0x86C8,0x86CC,0x86CD, -0x86D2,0x86D3,0x86D5,0x86D6,0x86D7,0x86DA,0x86DC, 0, -0x86DD,0x86E0,0x86E1,0x86E2,0x86E3,0x86E5,0x86E6,0x86E7, -0x86E8,0x86EA,0x86EB,0x86EC,0x86EF,0x86F5,0x86F6,0x86F7, -0x86FA,0x86FB,0x86FC,0x86FD,0x86FF,0x8701,0x8704,0x8705, -0x8706,0x870B,0x870C,0x870E,0x870F,0x8710,0x8711,0x8714, -0x8716,0x6C40,0x5EF7,0x505C,0x4EAD,0x5EAD,0x633A,0x8247, -0x901A,0x6850,0x916E,0x77B3,0x540C,0x94DC,0x5F64,0x7AE5, -0x6876,0x6345,0x7B52,0x7EDF,0x75DB,0x5077,0x6295,0x5934, -0x900F,0x51F8,0x79C3,0x7A81,0x56FE,0x5F92,0x9014,0x6D82, -0x5C60,0x571F,0x5410,0x5154,0x6E4D,0x56E2,0x63A8,0x9893, -0x817F,0x8715,0x892A,0x9000,0x541E,0x5C6F,0x81C0,0x62D6, -0x6258,0x8131,0x9E35,0x9640,0x9A6E,0x9A7C,0x692D,0x59A5, -0x62D3,0x553E,0x6316,0x54C7,0x86D9,0x6D3C,0x5A03,0x74E6, -0x889C,0x6B6A,0x5916,0x8C4C,0x5F2F,0x6E7E,0x73A9,0x987D, -0x4E38,0x70F7,0x5B8C,0x7897,0x633D,0x665A,0x7696,0x60CB, -0x5B9B,0x5A49,0x4E07,0x8155,0x6C6A,0x738B,0x4EA1,0x6789, -0x7F51,0x5F80,0x65FA,0x671B,0x5FD8,0x5984,0x5A01, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8719,0x871B,0x871D,0x871F,0x8720,0x8724,0x8726,0x8727, -0x8728,0x872A,0x872B,0x872C,0x872D,0x872F,0x8730,0x8732, -0x8733,0x8735,0x8736,0x8738,0x8739,0x873A,0x873C,0x873D, -0x8740,0x8741,0x8742,0x8743,0x8744,0x8745,0x8746,0x874A, -0x874B,0x874D,0x874F,0x8750,0x8751,0x8752,0x8754,0x8755, -0x8756,0x8758,0x875A,0x875B,0x875C,0x875D,0x875E,0x875F, -0x8761,0x8762,0x8766,0x8767,0x8768,0x8769,0x876A,0x876B, -0x876C,0x876D,0x876F,0x8771,0x8772,0x8773,0x8775, 0, -0x8777,0x8778,0x8779,0x877A,0x877F,0x8780,0x8781,0x8784, -0x8786,0x8787,0x8789,0x878A,0x878C,0x878E,0x878F,0x8790, -0x8791,0x8792,0x8794,0x8795,0x8796,0x8798,0x8799,0x879A, -0x879B,0x879C,0x879D,0x879E,0x87A0,0x87A1,0x87A2,0x87A3, -0x87A4,0x5DCD,0x5FAE,0x5371,0x97E6,0x8FDD,0x6845,0x56F4, -0x552F,0x60DF,0x4E3A,0x6F4D,0x7EF4,0x82C7,0x840E,0x59D4, -0x4F1F,0x4F2A,0x5C3E,0x7EAC,0x672A,0x851A,0x5473,0x754F, -0x80C3,0x5582,0x9B4F,0x4F4D,0x6E2D,0x8C13,0x5C09,0x6170, -0x536B,0x761F,0x6E29,0x868A,0x6587,0x95FB,0x7EB9,0x543B, -0x7A33,0x7D0A,0x95EE,0x55E1,0x7FC1,0x74EE,0x631D,0x8717, -0x6DA1,0x7A9D,0x6211,0x65A1,0x5367,0x63E1,0x6C83,0x5DEB, -0x545C,0x94A8,0x4E4C,0x6C61,0x8BEC,0x5C4B,0x65E0,0x829C, -0x68A7,0x543E,0x5434,0x6BCB,0x6B66,0x4E94,0x6342,0x5348, -0x821E,0x4F0D,0x4FAE,0x575E,0x620A,0x96FE,0x6664,0x7269, -0x52FF,0x52A1,0x609F,0x8BEF,0x6614,0x7199,0x6790,0x897F, -0x7852,0x77FD,0x6670,0x563B,0x5438,0x9521,0x727A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x87A5,0x87A6,0x87A7,0x87A9,0x87AA,0x87AE,0x87B0,0x87B1, -0x87B2,0x87B4,0x87B6,0x87B7,0x87B8,0x87B9,0x87BB,0x87BC, -0x87BE,0x87BF,0x87C1,0x87C2,0x87C3,0x87C4,0x87C5,0x87C7, -0x87C8,0x87C9,0x87CC,0x87CD,0x87CE,0x87CF,0x87D0,0x87D4, -0x87D5,0x87D6,0x87D7,0x87D8,0x87D9,0x87DA,0x87DC,0x87DD, -0x87DE,0x87DF,0x87E1,0x87E2,0x87E3,0x87E4,0x87E6,0x87E7, -0x87E8,0x87E9,0x87EB,0x87EC,0x87ED,0x87EF,0x87F0,0x87F1, -0x87F2,0x87F3,0x87F4,0x87F5,0x87F6,0x87F7,0x87F8, 0, -0x87FA,0x87FB,0x87FC,0x87FD,0x87FF,0x8800,0x8801,0x8802, -0x8804,0x8805,0x8806,0x8807,0x8808,0x8809,0x880B,0x880C, -0x880D,0x880E,0x880F,0x8810,0x8811,0x8812,0x8814,0x8817, -0x8818,0x8819,0x881A,0x881C,0x881D,0x881E,0x881F,0x8820, -0x8823,0x7A00,0x606F,0x5E0C,0x6089,0x819D,0x5915,0x60DC, -0x7184,0x70EF,0x6EAA,0x6C50,0x7280,0x6A84,0x88AD,0x5E2D, -0x4E60,0x5AB3,0x559C,0x94E3,0x6D17,0x7CFB,0x9699,0x620F, -0x7EC6,0x778E,0x867E,0x5323,0x971E,0x8F96,0x6687,0x5CE1, -0x4FA0,0x72ED,0x4E0B,0x53A6,0x590F,0x5413,0x6380,0x9528, -0x5148,0x4ED9,0x9C9C,0x7EA4,0x54B8,0x8D24,0x8854,0x8237, -0x95F2,0x6D8E,0x5F26,0x5ACC,0x663E,0x9669,0x73B0,0x732E, -0x53BF,0x817A,0x9985,0x7FA1,0x5BAA,0x9677,0x9650,0x7EBF, -0x76F8,0x53A2,0x9576,0x9999,0x7BB1,0x8944,0x6E58,0x4E61, -0x7FD4,0x7965,0x8BE6,0x60F3,0x54CD,0x4EAB,0x9879,0x5DF7, -0x6A61,0x50CF,0x5411,0x8C61,0x8427,0x785D,0x9704,0x524A, -0x54EE,0x56A3,0x9500,0x6D88,0x5BB5,0x6DC6,0x6653, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8824,0x8825,0x8826,0x8827,0x8828,0x8829,0x882A,0x882B, -0x882C,0x882D,0x882E,0x882F,0x8830,0x8831,0x8833,0x8834, -0x8835,0x8836,0x8837,0x8838,0x883A,0x883B,0x883D,0x883E, -0x883F,0x8841,0x8842,0x8843,0x8846,0x8847,0x8848,0x8849, -0x884A,0x884B,0x884E,0x884F,0x8850,0x8851,0x8852,0x8853, -0x8855,0x8856,0x8858,0x885A,0x885B,0x885C,0x885D,0x885E, -0x885F,0x8860,0x8866,0x8867,0x886A,0x886D,0x886F,0x8871, -0x8873,0x8874,0x8875,0x8876,0x8878,0x8879,0x887A, 0, -0x887B,0x887C,0x8880,0x8883,0x8886,0x8887,0x8889,0x888A, -0x888C,0x888E,0x888F,0x8890,0x8891,0x8893,0x8894,0x8895, -0x8897,0x8898,0x8899,0x889A,0x889B,0x889D,0x889E,0x889F, -0x88A0,0x88A1,0x88A3,0x88A5,0x88A6,0x88A7,0x88A8,0x88A9, -0x88AA,0x5C0F,0x5B5D,0x6821,0x8096,0x5578,0x7B11,0x6548, -0x6954,0x4E9B,0x6B47,0x874E,0x978B,0x534F,0x631F,0x643A, -0x90AA,0x659C,0x80C1,0x8C10,0x5199,0x68B0,0x5378,0x87F9, -0x61C8,0x6CC4,0x6CFB,0x8C22,0x5C51,0x85AA,0x82AF,0x950C, -0x6B23,0x8F9B,0x65B0,0x5FFB,0x5FC3,0x4FE1,0x8845,0x661F, -0x8165,0x7329,0x60FA,0x5174,0x5211,0x578B,0x5F62,0x90A2, -0x884C,0x9192,0x5E78,0x674F,0x6027,0x59D3,0x5144,0x51F6, -0x80F8,0x5308,0x6C79,0x96C4,0x718A,0x4F11,0x4FEE,0x7F9E, -0x673D,0x55C5,0x9508,0x79C0,0x8896,0x7EE3,0x589F,0x620C, -0x9700,0x865A,0x5618,0x987B,0x5F90,0x8BB8,0x84C4,0x9157, -0x53D9,0x65ED,0x5E8F,0x755C,0x6064,0x7D6E,0x5A7F,0x7EEA, -0x7EED,0x8F69,0x55A7,0x5BA3,0x60AC,0x65CB,0x7384, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x88AC,0x88AE,0x88AF,0x88B0,0x88B2,0x88B3,0x88B4,0x88B5, -0x88B6,0x88B8,0x88B9,0x88BA,0x88BB,0x88BD,0x88BE,0x88BF, -0x88C0,0x88C3,0x88C4,0x88C7,0x88C8,0x88CA,0x88CB,0x88CC, -0x88CD,0x88CF,0x88D0,0x88D1,0x88D3,0x88D6,0x88D7,0x88DA, -0x88DB,0x88DC,0x88DD,0x88DE,0x88E0,0x88E1,0x88E6,0x88E7, -0x88E9,0x88EA,0x88EB,0x88EC,0x88ED,0x88EE,0x88EF,0x88F2, -0x88F5,0x88F6,0x88F7,0x88FA,0x88FB,0x88FD,0x88FF,0x8900, -0x8901,0x8903,0x8904,0x8905,0x8906,0x8907,0x8908, 0, -0x8909,0x890B,0x890C,0x890D,0x890E,0x890F,0x8911,0x8914, -0x8915,0x8916,0x8917,0x8918,0x891C,0x891D,0x891E,0x891F, -0x8920,0x8922,0x8923,0x8924,0x8926,0x8927,0x8928,0x8929, -0x892C,0x892D,0x892E,0x892F,0x8931,0x8932,0x8933,0x8935, -0x8937,0x9009,0x7663,0x7729,0x7EDA,0x9774,0x859B,0x5B66, -0x7A74,0x96EA,0x8840,0x52CB,0x718F,0x5FAA,0x65EC,0x8BE2, -0x5BFB,0x9A6F,0x5DE1,0x6B89,0x6C5B,0x8BAD,0x8BAF,0x900A, -0x8FC5,0x538B,0x62BC,0x9E26,0x9E2D,0x5440,0x4E2B,0x82BD, -0x7259,0x869C,0x5D16,0x8859,0x6DAF,0x96C5,0x54D1,0x4E9A, -0x8BB6,0x7109,0x54BD,0x9609,0x70DF,0x6DF9,0x76D0,0x4E25, -0x7814,0x8712,0x5CA9,0x5EF6,0x8A00,0x989C,0x960E,0x708E, -0x6CBF,0x5944,0x63A9,0x773C,0x884D,0x6F14,0x8273,0x5830, -0x71D5,0x538C,0x781A,0x96C1,0x5501,0x5F66,0x7130,0x5BB4, -0x8C1A,0x9A8C,0x6B83,0x592E,0x9E2F,0x79E7,0x6768,0x626C, -0x4F6F,0x75A1,0x7F8A,0x6D0B,0x9633,0x6C27,0x4EF0,0x75D2, -0x517B,0x6837,0x6F3E,0x9080,0x8170,0x5996,0x7476, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8938,0x8939,0x893A,0x893B,0x893C,0x893D,0x893E,0x893F, -0x8940,0x8942,0x8943,0x8945,0x8946,0x8947,0x8948,0x8949, -0x894A,0x894B,0x894C,0x894D,0x894E,0x894F,0x8950,0x8951, -0x8952,0x8953,0x8954,0x8955,0x8956,0x8957,0x8958,0x8959, -0x895A,0x895B,0x895C,0x895D,0x8960,0x8961,0x8962,0x8963, -0x8964,0x8965,0x8967,0x8968,0x8969,0x896A,0x896B,0x896C, -0x896D,0x896E,0x896F,0x8970,0x8971,0x8972,0x8973,0x8974, -0x8975,0x8976,0x8977,0x8978,0x8979,0x897A,0x897C, 0, -0x897D,0x897E,0x8980,0x8982,0x8984,0x8985,0x8987,0x8988, -0x8989,0x898A,0x898B,0x898C,0x898D,0x898E,0x898F,0x8990, -0x8991,0x8992,0x8993,0x8994,0x8995,0x8996,0x8997,0x8998, -0x8999,0x899A,0x899B,0x899C,0x899D,0x899E,0x899F,0x89A0, -0x89A1,0x6447,0x5C27,0x9065,0x7A91,0x8C23,0x59DA,0x54AC, -0x8200,0x836F,0x8981,0x8000,0x6930,0x564E,0x8036,0x7237, -0x91CE,0x51B6,0x4E5F,0x9875,0x6396,0x4E1A,0x53F6,0x66F3, -0x814B,0x591C,0x6DB2,0x4E00,0x58F9,0x533B,0x63D6,0x94F1, -0x4F9D,0x4F0A,0x8863,0x9890,0x5937,0x9057,0x79FB,0x4EEA, -0x80F0,0x7591,0x6C82,0x5B9C,0x59E8,0x5F5D,0x6905,0x8681, -0x501A,0x5DF2,0x4E59,0x77E3,0x4EE5,0x827A,0x6291,0x6613, -0x9091,0x5C79,0x4EBF,0x5F79,0x81C6,0x9038,0x8084,0x75AB, -0x4EA6,0x88D4,0x610F,0x6BC5,0x5FC6,0x4E49,0x76CA,0x6EA2, -0x8BE3,0x8BAE,0x8C0A,0x8BD1,0x5F02,0x7FFC,0x7FCC,0x7ECE, -0x8335,0x836B,0x56E0,0x6BB7,0x97F3,0x9634,0x59FB,0x541F, -0x94F6,0x6DEB,0x5BC5,0x996E,0x5C39,0x5F15,0x9690, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x89A2,0x89A3,0x89A4,0x89A5,0x89A6,0x89A7,0x89A8,0x89A9, -0x89AA,0x89AB,0x89AC,0x89AD,0x89AE,0x89AF,0x89B0,0x89B1, -0x89B2,0x89B3,0x89B4,0x89B5,0x89B6,0x89B7,0x89B8,0x89B9, -0x89BA,0x89BB,0x89BC,0x89BD,0x89BE,0x89BF,0x89C0,0x89C3, -0x89CD,0x89D3,0x89D4,0x89D5,0x89D7,0x89D8,0x89D9,0x89DB, -0x89DD,0x89DF,0x89E0,0x89E1,0x89E2,0x89E4,0x89E7,0x89E8, -0x89E9,0x89EA,0x89EC,0x89ED,0x89EE,0x89F0,0x89F1,0x89F2, -0x89F4,0x89F5,0x89F6,0x89F7,0x89F8,0x89F9,0x89FA, 0, -0x89FB,0x89FC,0x89FD,0x89FE,0x89FF,0x8A01,0x8A02,0x8A03, -0x8A04,0x8A05,0x8A06,0x8A08,0x8A09,0x8A0A,0x8A0B,0x8A0C, -0x8A0D,0x8A0E,0x8A0F,0x8A10,0x8A11,0x8A12,0x8A13,0x8A14, -0x8A15,0x8A16,0x8A17,0x8A18,0x8A19,0x8A1A,0x8A1B,0x8A1C, -0x8A1D,0x5370,0x82F1,0x6A31,0x5A74,0x9E70,0x5E94,0x7F28, -0x83B9,0x8424,0x8425,0x8367,0x8747,0x8FCE,0x8D62,0x76C8, -0x5F71,0x9896,0x786C,0x6620,0x54DF,0x62E5,0x4F63,0x81C3, -0x75C8,0x5EB8,0x96CD,0x8E0A,0x86F9,0x548F,0x6CF3,0x6D8C, -0x6C38,0x607F,0x52C7,0x7528,0x5E7D,0x4F18,0x60A0,0x5FE7, -0x5C24,0x7531,0x90AE,0x94C0,0x72B9,0x6CB9,0x6E38,0x9149, -0x6709,0x53CB,0x53F3,0x4F51,0x91C9,0x8BF1,0x53C8,0x5E7C, -0x8FC2,0x6DE4,0x4E8E,0x76C2,0x6986,0x865E,0x611A,0x8206, -0x4F59,0x4FDE,0x903E,0x9C7C,0x6109,0x6E1D,0x6E14,0x9685, -0x4E88,0x5A31,0x96E8,0x4E0E,0x5C7F,0x79B9,0x5B87,0x8BED, -0x7FBD,0x7389,0x57DF,0x828B,0x90C1,0x5401,0x9047,0x55BB, -0x5CEA,0x5FA1,0x6108,0x6B32,0x72F1,0x80B2,0x8A89, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8A1E,0x8A1F,0x8A20,0x8A21,0x8A22,0x8A23,0x8A24,0x8A25, -0x8A26,0x8A27,0x8A28,0x8A29,0x8A2A,0x8A2B,0x8A2C,0x8A2D, -0x8A2E,0x8A2F,0x8A30,0x8A31,0x8A32,0x8A33,0x8A34,0x8A35, -0x8A36,0x8A37,0x8A38,0x8A39,0x8A3A,0x8A3B,0x8A3C,0x8A3D, -0x8A3F,0x8A40,0x8A41,0x8A42,0x8A43,0x8A44,0x8A45,0x8A46, -0x8A47,0x8A49,0x8A4A,0x8A4B,0x8A4C,0x8A4D,0x8A4E,0x8A4F, -0x8A50,0x8A51,0x8A52,0x8A53,0x8A54,0x8A55,0x8A56,0x8A57, -0x8A58,0x8A59,0x8A5A,0x8A5B,0x8A5C,0x8A5D,0x8A5E, 0, -0x8A5F,0x8A60,0x8A61,0x8A62,0x8A63,0x8A64,0x8A65,0x8A66, -0x8A67,0x8A68,0x8A69,0x8A6A,0x8A6B,0x8A6C,0x8A6D,0x8A6E, -0x8A6F,0x8A70,0x8A71,0x8A72,0x8A73,0x8A74,0x8A75,0x8A76, -0x8A77,0x8A78,0x8A7A,0x8A7B,0x8A7C,0x8A7D,0x8A7E,0x8A7F, -0x8A80,0x6D74,0x5BD3,0x88D5,0x9884,0x8C6B,0x9A6D,0x9E33, -0x6E0A,0x51A4,0x5143,0x57A3,0x8881,0x539F,0x63F4,0x8F95, -0x56ED,0x5458,0x5706,0x733F,0x6E90,0x7F18,0x8FDC,0x82D1, -0x613F,0x6028,0x9662,0x66F0,0x7EA6,0x8D8A,0x8DC3,0x94A5, -0x5CB3,0x7CA4,0x6708,0x60A6,0x9605,0x8018,0x4E91,0x90E7, -0x5300,0x9668,0x5141,0x8FD0,0x8574,0x915D,0x6655,0x97F5, -0x5B55,0x531D,0x7838,0x6742,0x683D,0x54C9,0x707E,0x5BB0, -0x8F7D,0x518D,0x5728,0x54B1,0x6512,0x6682,0x8D5E,0x8D43, -0x810F,0x846C,0x906D,0x7CDF,0x51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8AE3,0x94E1,0x95F8,0x7728,0x6805,0x69A8,0x548B,0x4E4D, -0x70B8,0x8BC8,0x6458,0x658B,0x5B85,0x7A84,0x503A,0x5BE8, -0x77BB,0x6BE1,0x8A79,0x7C98,0x6CBE,0x76CF,0x65A9,0x8F97, -0x5D2D,0x5C55,0x8638,0x6808,0x5360,0x6218,0x7AD9,0x6E5B, -0x7EFD,0x6A1F,0x7AE0,0x5F70,0x6F33,0x5F20,0x638C,0x6DA8, -0x6756,0x4E08,0x5E10,0x8D26,0x4ED7,0x80C0,0x7634,0x969C, -0x62DB,0x662D,0x627E,0x6CBC,0x8D75,0x7167,0x7F69,0x5146, -0x8087,0x53EC,0x906E,0x6298,0x54F2,0x86F0,0x8F99,0x8005, -0x9517,0x8517,0x8FD9,0x6D59,0x73CD,0x659F,0x771F,0x7504, -0x7827,0x81FB,0x8D1E,0x9488,0x4FA6,0x6795,0x75B9,0x8BCA, -0x9707,0x632F,0x9547,0x9635,0x84B8,0x6323,0x7741,0x5F81, -0x72F0,0x4E89,0x6014,0x6574,0x62EF,0x6B63,0x653F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8AE4,0x8AE5,0x8AE6,0x8AE7,0x8AE8,0x8AE9,0x8AEA,0x8AEB, -0x8AEC,0x8AED,0x8AEE,0x8AEF,0x8AF0,0x8AF1,0x8AF2,0x8AF3, -0x8AF4,0x8AF5,0x8AF6,0x8AF7,0x8AF8,0x8AF9,0x8AFA,0x8AFB, -0x8AFC,0x8AFD,0x8AFE,0x8AFF,0x8B00,0x8B01,0x8B02,0x8B03, -0x8B04,0x8B05,0x8B06,0x8B08,0x8B09,0x8B0A,0x8B0B,0x8B0C, -0x8B0D,0x8B0E,0x8B0F,0x8B10,0x8B11,0x8B12,0x8B13,0x8B14, -0x8B15,0x8B16,0x8B17,0x8B18,0x8B19,0x8B1A,0x8B1B,0x8B1C, -0x8B1D,0x8B1E,0x8B1F,0x8B20,0x8B21,0x8B22,0x8B23, 0, -0x8B24,0x8B25,0x8B27,0x8B28,0x8B29,0x8B2A,0x8B2B,0x8B2C, -0x8B2D,0x8B2E,0x8B2F,0x8B30,0x8B31,0x8B32,0x8B33,0x8B34, -0x8B35,0x8B36,0x8B37,0x8B38,0x8B39,0x8B3A,0x8B3B,0x8B3C, -0x8B3D,0x8B3E,0x8B3F,0x8B40,0x8B41,0x8B42,0x8B43,0x8B44, -0x8B45,0x5E27,0x75C7,0x90D1,0x8BC1,0x829D,0x679D,0x652F, -0x5431,0x8718,0x77E5,0x80A2,0x8102,0x6C41,0x4E4B,0x7EC7, -0x804C,0x76F4,0x690D,0x6B96,0x6267,0x503C,0x4F84,0x5740, -0x6307,0x6B62,0x8DBE,0x53EA,0x65E8,0x7EB8,0x5FD7,0x631A, -0x63B7,0x81F3,0x81F4,0x7F6E,0x5E1C,0x5CD9,0x5236,0x667A, -0x79E9,0x7A1A,0x8D28,0x7099,0x75D4,0x6EDE,0x6CBB,0x7A92, -0x4E2D,0x76C5,0x5FE0,0x949F,0x8877,0x7EC8,0x79CD,0x80BF, -0x91CD,0x4EF2,0x4F17,0x821F,0x5468,0x5DDE,0x6D32,0x8BCC, -0x7CA5,0x8F74,0x8098,0x5E1A,0x5492,0x76B1,0x5B99,0x663C, -0x9AA4,0x73E0,0x682A,0x86DB,0x6731,0x732A,0x8BF8,0x8BDB, -0x9010,0x7AF9,0x70DB,0x716E,0x62C4,0x77A9,0x5631,0x4E3B, -0x8457,0x67F1,0x52A9,0x86C0,0x8D2E,0x94F8,0x7B51, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8B46,0x8B47,0x8B48,0x8B49,0x8B4A,0x8B4B,0x8B4C,0x8B4D, -0x8B4E,0x8B4F,0x8B50,0x8B51,0x8B52,0x8B53,0x8B54,0x8B55, -0x8B56,0x8B57,0x8B58,0x8B59,0x8B5A,0x8B5B,0x8B5C,0x8B5D, -0x8B5E,0x8B5F,0x8B60,0x8B61,0x8B62,0x8B63,0x8B64,0x8B65, -0x8B67,0x8B68,0x8B69,0x8B6A,0x8B6B,0x8B6D,0x8B6E,0x8B6F, -0x8B70,0x8B71,0x8B72,0x8B73,0x8B74,0x8B75,0x8B76,0x8B77, -0x8B78,0x8B79,0x8B7A,0x8B7B,0x8B7C,0x8B7D,0x8B7E,0x8B7F, -0x8B80,0x8B81,0x8B82,0x8B83,0x8B84,0x8B85,0x8B86, 0, -0x8B87,0x8B88,0x8B89,0x8B8A,0x8B8B,0x8B8C,0x8B8D,0x8B8E, -0x8B8F,0x8B90,0x8B91,0x8B92,0x8B93,0x8B94,0x8B95,0x8B96, -0x8B97,0x8B98,0x8B99,0x8B9A,0x8B9B,0x8B9C,0x8B9D,0x8B9E, -0x8B9F,0x8BAC,0x8BB1,0x8BBB,0x8BC7,0x8BD0,0x8BEA,0x8C09, -0x8C1E,0x4F4F,0x6CE8,0x795D,0x9A7B,0x6293,0x722A,0x62FD, -0x4E13,0x7816,0x8F6C,0x64B0,0x8D5A,0x7BC6,0x6869,0x5E84, -0x88C5,0x5986,0x649E,0x58EE,0x72B6,0x690E,0x9525,0x8FFD, -0x8D58,0x5760,0x7F00,0x8C06,0x51C6,0x6349,0x62D9,0x5353, -0x684C,0x7422,0x8301,0x914C,0x5544,0x7740,0x707C,0x6D4A, -0x5179,0x54A8,0x8D44,0x59FF,0x6ECB,0x6DC4,0x5B5C,0x7D2B, -0x4ED4,0x7C7D,0x6ED3,0x5B50,0x81EA,0x6E0D,0x5B57,0x9B03, -0x68D5,0x8E2A,0x5B97,0x7EFC,0x603B,0x7EB5,0x90B9,0x8D70, -0x594F,0x63CD,0x79DF,0x8DB3,0x5352,0x65CF,0x7956,0x8BC5, -0x963B,0x7EC4,0x94BB,0x7E82,0x5634,0x9189,0x6700,0x7F6A, -0x5C0A,0x9075,0x6628,0x5DE6,0x4F50,0x67DE,0x505A,0x4F5C, -0x5750,0x5EA7, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8C38,0x8C39,0x8C3A,0x8C3B,0x8C3C,0x8C3D,0x8C3E,0x8C3F, -0x8C40,0x8C42,0x8C43,0x8C44,0x8C45,0x8C48,0x8C4A,0x8C4B, -0x8C4D,0x8C4E,0x8C4F,0x8C50,0x8C51,0x8C52,0x8C53,0x8C54, -0x8C56,0x8C57,0x8C58,0x8C59,0x8C5B,0x8C5C,0x8C5D,0x8C5E, -0x8C5F,0x8C60,0x8C63,0x8C64,0x8C65,0x8C66,0x8C67,0x8C68, -0x8C69,0x8C6C,0x8C6D,0x8C6E,0x8C6F,0x8C70,0x8C71,0x8C72, -0x8C74,0x8C75,0x8C76,0x8C77,0x8C7B,0x8C7C,0x8C7D,0x8C7E, -0x8C7F,0x8C80,0x8C81,0x8C83,0x8C84,0x8C86,0x8C87, 0, -0x8C88,0x8C8B,0x8C8D,0x8C8E,0x8C8F,0x8C90,0x8C91,0x8C92, -0x8C93,0x8C95,0x8C96,0x8C97,0x8C99,0x8C9A,0x8C9B,0x8C9C, -0x8C9D,0x8C9E,0x8C9F,0x8CA0,0x8CA1,0x8CA2,0x8CA3,0x8CA4, -0x8CA5,0x8CA6,0x8CA7,0x8CA8,0x8CA9,0x8CAA,0x8CAB,0x8CAC, -0x8CAD,0x4E8D,0x4E0C,0x5140,0x4E10,0x5EFF,0x5345,0x4E15, -0x4E98,0x4E1E,0x9B32,0x5B6C,0x5669,0x4E28,0x79BA,0x4E3F, -0x5315,0x4E47,0x592D,0x723B,0x536E,0x6C10,0x56DF,0x80E4, -0x9997,0x6BD3,0x777E,0x9F17,0x4E36,0x4E9F,0x9F10,0x4E5C, -0x4E69,0x4E93,0x8288,0x5B5B,0x556C,0x560F,0x4EC4,0x538D, -0x539D,0x53A3,0x53A5,0x53AE,0x9765,0x8D5D,0x531A,0x53F5, -0x5326,0x532E,0x533E,0x8D5C,0x5366,0x5363,0x5202,0x5208, -0x520E,0x522D,0x5233,0x523F,0x5240,0x524C,0x525E,0x5261, -0x525C,0x84AF,0x527D,0x5282,0x5281,0x5290,0x5293,0x5182, -0x7F54,0x4EBB,0x4EC3,0x4EC9,0x4EC2,0x4EE8,0x4EE1,0x4EEB, -0x4EDE,0x4F1B,0x4EF3,0x4F22,0x4F64,0x4EF5,0x4F25,0x4F27, -0x4F09,0x4F2B,0x4F5E,0x4F67,0x6538,0x4F5A,0x4F5D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8CAE,0x8CAF,0x8CB0,0x8CB1,0x8CB2,0x8CB3,0x8CB4,0x8CB5, -0x8CB6,0x8CB7,0x8CB8,0x8CB9,0x8CBA,0x8CBB,0x8CBC,0x8CBD, -0x8CBE,0x8CBF,0x8CC0,0x8CC1,0x8CC2,0x8CC3,0x8CC4,0x8CC5, -0x8CC6,0x8CC7,0x8CC8,0x8CC9,0x8CCA,0x8CCB,0x8CCC,0x8CCD, -0x8CCE,0x8CCF,0x8CD0,0x8CD1,0x8CD2,0x8CD3,0x8CD4,0x8CD5, -0x8CD6,0x8CD7,0x8CD8,0x8CD9,0x8CDA,0x8CDB,0x8CDC,0x8CDD, -0x8CDE,0x8CDF,0x8CE0,0x8CE1,0x8CE2,0x8CE3,0x8CE4,0x8CE5, -0x8CE6,0x8CE7,0x8CE8,0x8CE9,0x8CEA,0x8CEB,0x8CEC, 0, -0x8CED,0x8CEE,0x8CEF,0x8CF0,0x8CF1,0x8CF2,0x8CF3,0x8CF4, -0x8CF5,0x8CF6,0x8CF7,0x8CF8,0x8CF9,0x8CFA,0x8CFB,0x8CFC, -0x8CFD,0x8CFE,0x8CFF,0x8D00,0x8D01,0x8D02,0x8D03,0x8D04, -0x8D05,0x8D06,0x8D07,0x8D08,0x8D09,0x8D0A,0x8D0B,0x8D0C, -0x8D0D,0x4F5F,0x4F57,0x4F32,0x4F3D,0x4F76,0x4F74,0x4F91, -0x4F89,0x4F83,0x4F8F,0x4F7E,0x4F7B,0x4FAA,0x4F7C,0x4FAC, -0x4F94,0x4FE6,0x4FE8,0x4FEA,0x4FC5,0x4FDA,0x4FE3,0x4FDC, -0x4FD1,0x4FDF,0x4FF8,0x5029,0x504C,0x4FF3,0x502C,0x500F, -0x502E,0x502D,0x4FFE,0x501C,0x500C,0x5025,0x5028,0x507E, -0x5043,0x5055,0x5048,0x504E,0x506C,0x507B,0x50A5,0x50A7, -0x50A9,0x50BA,0x50D6,0x5106,0x50ED,0x50EC,0x50E6,0x50EE, -0x5107,0x510B,0x4EDD,0x6C3D,0x4F58,0x4F65,0x4FCE,0x9FA0, -0x6C46,0x7C74,0x516E,0x5DFD,0x9EC9,0x9998,0x5181,0x5914, -0x52F9,0x530D,0x8A07,0x5310,0x51EB,0x5919,0x5155,0x4EA0, -0x5156,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3,0x8BCB,0x8BCF, -0x8BCE,0x8BD2,0x8BD3,0x8BD4,0x8BD6,0x8BD8,0x8BD9,0x8BDC, -0x8BDF,0x8BE0,0x8BE4,0x8BE8,0x8BE9,0x8BEE,0x8BF0,0x8BF3, -0x8BF6,0x8BF9,0x8BFC,0x8BFF,0x8C00,0x8C02,0x8C04,0x8C07, -0x8C0C,0x8C0F,0x8C11,0x8C12,0x8C14,0x8C15,0x8C16,0x8C19, -0x8C1B,0x8C18,0x8C1D,0x8C1F,0x8C20,0x8C21,0x8C25,0x8C27, -0x8C2A,0x8C2B,0x8C2E,0x8C2F,0x8C32,0x8C33,0x8C35,0x8C36, -0x5369,0x537A,0x961D,0x9622,0x9621,0x9631,0x962A,0x963D, -0x963C,0x9642,0x9649,0x9654,0x965F,0x9667,0x966C,0x9672, -0x9674,0x9688,0x968D,0x9697,0x96B0,0x9097,0x909B,0x909D, -0x9099,0x90AC,0x90A1,0x90B4,0x90B3,0x90B6,0x90BA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8DD5,0x8DD8,0x8DD9,0x8DDC,0x8DE0,0x8DE1,0x8DE2,0x8DE5, -0x8DE6,0x8DE7,0x8DE9,0x8DED,0x8DEE,0x8DF0,0x8DF1,0x8DF2, -0x8DF4,0x8DF6,0x8DFC,0x8DFE,0x8DFF,0x8E00,0x8E01,0x8E02, -0x8E03,0x8E04,0x8E06,0x8E07,0x8E08,0x8E0B,0x8E0D,0x8E0E, -0x8E10,0x8E11,0x8E12,0x8E13,0x8E15,0x8E16,0x8E17,0x8E18, -0x8E19,0x8E1A,0x8E1B,0x8E1C,0x8E20,0x8E21,0x8E24,0x8E25, -0x8E26,0x8E27,0x8E28,0x8E2B,0x8E2D,0x8E30,0x8E32,0x8E33, -0x8E34,0x8E36,0x8E37,0x8E38,0x8E3B,0x8E3C,0x8E3E, 0, -0x8E3F,0x8E43,0x8E45,0x8E46,0x8E4C,0x8E4D,0x8E4E,0x8E4F, -0x8E50,0x8E53,0x8E54,0x8E55,0x8E56,0x8E57,0x8E58,0x8E5A, -0x8E5B,0x8E5C,0x8E5D,0x8E5E,0x8E5F,0x8E60,0x8E61,0x8E62, -0x8E63,0x8E64,0x8E65,0x8E67,0x8E68,0x8E6A,0x8E6B,0x8E6E, -0x8E71,0x90B8,0x90B0,0x90CF,0x90C5,0x90BE,0x90D0,0x90C4, -0x90C7,0x90D3,0x90E6,0x90E2,0x90DC,0x90D7,0x90DB,0x90EB, -0x90EF,0x90FE,0x9104,0x9122,0x911E,0x9123,0x9131,0x912F, -0x9139,0x9143,0x9146,0x520D,0x5942,0x52A2,0x52AC,0x52AD, -0x52BE,0x54FF,0x52D0,0x52D6,0x52F0,0x53DF,0x71EE,0x77CD, -0x5EF4,0x51F5,0x51FC,0x9B2F,0x53B6,0x5F01,0x755A,0x5DEF, -0x574C,0x57A9,0x57A1,0x587E,0x58BC,0x58C5,0x58D1,0x5729, -0x572C,0x572A,0x5733,0x5739,0x572E,0x572F,0x575C,0x573B, -0x5742,0x5769,0x5785,0x576B,0x5786,0x577C,0x577B,0x5768, -0x576D,0x5776,0x5773,0x57AD,0x57A4,0x578C,0x57B2,0x57CF, -0x57A7,0x57B4,0x5793,0x57A0,0x57D5,0x57D8,0x57DA,0x57D9, -0x57D2,0x57B8,0x57F4,0x57EF,0x57F8,0x57E4,0x57DD, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8E73,0x8E75,0x8E77,0x8E78,0x8E79,0x8E7A,0x8E7B,0x8E7D, -0x8E7E,0x8E80,0x8E82,0x8E83,0x8E84,0x8E86,0x8E88,0x8E89, -0x8E8A,0x8E8B,0x8E8C,0x8E8D,0x8E8E,0x8E91,0x8E92,0x8E93, -0x8E95,0x8E96,0x8E97,0x8E98,0x8E99,0x8E9A,0x8E9B,0x8E9D, -0x8E9F,0x8EA0,0x8EA1,0x8EA2,0x8EA3,0x8EA4,0x8EA5,0x8EA6, -0x8EA7,0x8EA8,0x8EA9,0x8EAA,0x8EAD,0x8EAE,0x8EB0,0x8EB1, -0x8EB3,0x8EB4,0x8EB5,0x8EB6,0x8EB7,0x8EB8,0x8EB9,0x8EBB, -0x8EBC,0x8EBD,0x8EBE,0x8EBF,0x8EC0,0x8EC1,0x8EC2, 0, -0x8EC3,0x8EC4,0x8EC5,0x8EC6,0x8EC7,0x8EC8,0x8EC9,0x8ECA, -0x8ECB,0x8ECC,0x8ECD,0x8ECF,0x8ED0,0x8ED1,0x8ED2,0x8ED3, -0x8ED4,0x8ED5,0x8ED6,0x8ED7,0x8ED8,0x8ED9,0x8EDA,0x8EDB, -0x8EDC,0x8EDD,0x8EDE,0x8EDF,0x8EE0,0x8EE1,0x8EE2,0x8EE3, -0x8EE4,0x580B,0x580D,0x57FD,0x57ED,0x5800,0x581E,0x5819, -0x5844,0x5820,0x5865,0x586C,0x5881,0x5889,0x589A,0x5880, -0x99A8,0x9F19,0x61FF,0x8279,0x827D,0x827F,0x828F,0x828A, -0x82A8,0x8284,0x828E,0x8291,0x8297,0x8299,0x82AB,0x82B8, -0x82BE,0x82B0,0x82C8,0x82CA,0x82E3,0x8298,0x82B7,0x82AE, -0x82CB,0x82CC,0x82C1,0x82A9,0x82B4,0x82A1,0x82AA,0x829F, -0x82C4,0x82CE,0x82A4,0x82E1,0x8309,0x82F7,0x82E4,0x830F, -0x8307,0x82DC,0x82F4,0x82D2,0x82D8,0x830C,0x82FB,0x82D3, -0x8311,0x831A,0x8306,0x8314,0x8315,0x82E0,0x82D5,0x831C, -0x8351,0x835B,0x835C,0x8308,0x8392,0x833C,0x8334,0x8331, -0x839B,0x835E,0x832F,0x834F,0x8347,0x8343,0x835F,0x8340, -0x8317,0x8360,0x832D,0x833A,0x8333,0x8366,0x8365, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8EE5,0x8EE6,0x8EE7,0x8EE8,0x8EE9,0x8EEA,0x8EEB,0x8EEC, -0x8EED,0x8EEE,0x8EEF,0x8EF0,0x8EF1,0x8EF2,0x8EF3,0x8EF4, -0x8EF5,0x8EF6,0x8EF7,0x8EF8,0x8EF9,0x8EFA,0x8EFB,0x8EFC, -0x8EFD,0x8EFE,0x8EFF,0x8F00,0x8F01,0x8F02,0x8F03,0x8F04, -0x8F05,0x8F06,0x8F07,0x8F08,0x8F09,0x8F0A,0x8F0B,0x8F0C, -0x8F0D,0x8F0E,0x8F0F,0x8F10,0x8F11,0x8F12,0x8F13,0x8F14, -0x8F15,0x8F16,0x8F17,0x8F18,0x8F19,0x8F1A,0x8F1B,0x8F1C, -0x8F1D,0x8F1E,0x8F1F,0x8F20,0x8F21,0x8F22,0x8F23, 0, -0x8F24,0x8F25,0x8F26,0x8F27,0x8F28,0x8F29,0x8F2A,0x8F2B, -0x8F2C,0x8F2D,0x8F2E,0x8F2F,0x8F30,0x8F31,0x8F32,0x8F33, -0x8F34,0x8F35,0x8F36,0x8F37,0x8F38,0x8F39,0x8F3A,0x8F3B, -0x8F3C,0x8F3D,0x8F3E,0x8F3F,0x8F40,0x8F41,0x8F42,0x8F43, -0x8F44,0x8368,0x831B,0x8369,0x836C,0x836A,0x836D,0x836E, -0x83B0,0x8378,0x83B3,0x83B4,0x83A0,0x83AA,0x8393,0x839C, -0x8385,0x837C,0x83B6,0x83A9,0x837D,0x83B8,0x837B,0x8398, -0x839E,0x83A8,0x83BA,0x83BC,0x83C1,0x8401,0x83E5,0x83D8, -0x5807,0x8418,0x840B,0x83DD,0x83FD,0x83D6,0x841C,0x8438, -0x8411,0x8406,0x83D4,0x83DF,0x840F,0x8403,0x83F8,0x83F9, -0x83EA,0x83C5,0x83C0,0x8426,0x83F0,0x83E1,0x845C,0x8451, -0x845A,0x8459,0x8473,0x8487,0x8488,0x847A,0x8489,0x8478, -0x843C,0x8446,0x8469,0x8476,0x848C,0x848E,0x8431,0x846D, -0x84C1,0x84CD,0x84D0,0x84E6,0x84BD,0x84D3,0x84CA,0x84BF, -0x84BA,0x84E0,0x84A1,0x84B9,0x84B4,0x8497,0x84E5,0x84E3, -0x850C,0x750D,0x8538,0x84F0,0x8539,0x851F,0x853A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8F45,0x8F46,0x8F47,0x8F48,0x8F49,0x8F4A,0x8F4B,0x8F4C, -0x8F4D,0x8F4E,0x8F4F,0x8F50,0x8F51,0x8F52,0x8F53,0x8F54, -0x8F55,0x8F56,0x8F57,0x8F58,0x8F59,0x8F5A,0x8F5B,0x8F5C, -0x8F5D,0x8F5E,0x8F5F,0x8F60,0x8F61,0x8F62,0x8F63,0x8F64, -0x8F65,0x8F6A,0x8F80,0x8F8C,0x8F92,0x8F9D,0x8FA0,0x8FA1, -0x8FA2,0x8FA4,0x8FA5,0x8FA6,0x8FA7,0x8FAA,0x8FAC,0x8FAD, -0x8FAE,0x8FAF,0x8FB2,0x8FB3,0x8FB4,0x8FB5,0x8FB7,0x8FB8, -0x8FBA,0x8FBB,0x8FBC,0x8FBF,0x8FC0,0x8FC3,0x8FC6, 0, -0x8FC9,0x8FCA,0x8FCB,0x8FCC,0x8FCD,0x8FCF,0x8FD2,0x8FD6, -0x8FD7,0x8FDA,0x8FE0,0x8FE1,0x8FE3,0x8FE7,0x8FEC,0x8FEF, -0x8FF1,0x8FF2,0x8FF4,0x8FF5,0x8FF6,0x8FFA,0x8FFB,0x8FFC, -0x8FFE,0x8FFF,0x9007,0x9008,0x900C,0x900E,0x9013,0x9015, -0x9018,0x8556,0x853B,0x84FF,0x84FC,0x8559,0x8548,0x8568, -0x8564,0x855E,0x857A,0x77A2,0x8543,0x8572,0x857B,0x85A4, -0x85A8,0x8587,0x858F,0x8579,0x85AE,0x859C,0x8585,0x85B9, -0x85B7,0x85B0,0x85D3,0x85C1,0x85DC,0x85FF,0x8627,0x8605, -0x8629,0x8616,0x863C,0x5EFE,0x5F08,0x593C,0x5941,0x8037, -0x5955,0x595A,0x5958,0x530F,0x5C22,0x5C25,0x5C2C,0x5C34, -0x624C,0x626A,0x629F,0x62BB,0x62CA,0x62DA,0x62D7,0x62EE, -0x6322,0x62F6,0x6339,0x634B,0x6343,0x63AD,0x63F6,0x6371, -0x637A,0x638E,0x63B4,0x636D,0x63AC,0x638A,0x6369,0x63AE, -0x63BC,0x63F2,0x63F8,0x63E0,0x63FF,0x63C4,0x63DE,0x63CE, -0x6452,0x63C6,0x63BE,0x6445,0x6441,0x640B,0x641B,0x6420, -0x640C,0x6426,0x6421,0x645E,0x6484,0x646D,0x6496, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9019,0x901C,0x9023,0x9024,0x9025,0x9027,0x9028,0x9029, -0x902A,0x902B,0x902C,0x9030,0x9031,0x9032,0x9033,0x9034, -0x9037,0x9039,0x903A,0x903D,0x903F,0x9040,0x9043,0x9045, -0x9046,0x9048,0x9049,0x904A,0x904B,0x904C,0x904E,0x9054, -0x9055,0x9056,0x9059,0x905A,0x905C,0x905D,0x905E,0x905F, -0x9060,0x9061,0x9064,0x9066,0x9067,0x9069,0x906A,0x906B, -0x906C,0x906F,0x9070,0x9071,0x9072,0x9073,0x9076,0x9077, -0x9078,0x9079,0x907A,0x907B,0x907C,0x907E,0x9081, 0, -0x9084,0x9085,0x9086,0x9087,0x9089,0x908A,0x908C,0x908D, -0x908E,0x908F,0x9090,0x9092,0x9094,0x9096,0x9098,0x909A, -0x909C,0x909E,0x909F,0x90A0,0x90A4,0x90A5,0x90A7,0x90A8, -0x90A9,0x90AB,0x90AD,0x90B2,0x90B7,0x90BC,0x90BD,0x90BF, -0x90C0,0x647A,0x64B7,0x64B8,0x6499,0x64BA,0x64C0,0x64D0, -0x64D7,0x64E4,0x64E2,0x6509,0x6525,0x652E,0x5F0B,0x5FD2, -0x7519,0x5F11,0x535F,0x53F1,0x53FD,0x53E9,0x53E8,0x53FB, -0x5412,0x5416,0x5406,0x544B,0x5452,0x5453,0x5454,0x5456, -0x5443,0x5421,0x5457,0x5459,0x5423,0x5432,0x5482,0x5494, -0x5477,0x5471,0x5464,0x549A,0x549B,0x5484,0x5476,0x5466, -0x549D,0x54D0,0x54AD,0x54C2,0x54B4,0x54D2,0x54A7,0x54A6, -0x54D3,0x54D4,0x5472,0x54A3,0x54D5,0x54BB,0x54BF,0x54CC, -0x54D9,0x54DA,0x54DC,0x54A9,0x54AA,0x54A4,0x54DD,0x54CF, -0x54DE,0x551B,0x54E7,0x5520,0x54FD,0x5514,0x54F3,0x5522, -0x5523,0x550F,0x5511,0x5527,0x552A,0x5567,0x558F,0x55B5, -0x5549,0x556D,0x5541,0x5555,0x553F,0x5550,0x553C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x90C2,0x90C3,0x90C6,0x90C8,0x90C9,0x90CB,0x90CC,0x90CD, -0x90D2,0x90D4,0x90D5,0x90D6,0x90D8,0x90D9,0x90DA,0x90DE, -0x90DF,0x90E0,0x90E3,0x90E4,0x90E5,0x90E9,0x90EA,0x90EC, -0x90EE,0x90F0,0x90F1,0x90F2,0x90F3,0x90F5,0x90F6,0x90F7, -0x90F9,0x90FA,0x90FB,0x90FC,0x90FF,0x9100,0x9101,0x9103, -0x9105,0x9106,0x9107,0x9108,0x9109,0x910A,0x910B,0x910C, -0x910D,0x910E,0x910F,0x9110,0x9111,0x9112,0x9113,0x9114, -0x9115,0x9116,0x9117,0x9118,0x911A,0x911B,0x911C, 0, -0x911D,0x911F,0x9120,0x9121,0x9124,0x9125,0x9126,0x9127, -0x9128,0x9129,0x912A,0x912B,0x912C,0x912D,0x912E,0x9130, -0x9132,0x9133,0x9134,0x9135,0x9136,0x9137,0x9138,0x913A, -0x913B,0x913C,0x913D,0x913E,0x913F,0x9140,0x9141,0x9142, -0x9144,0x5537,0x5556,0x5575,0x5576,0x5577,0x5533,0x5530, -0x555C,0x558B,0x55D2,0x5583,0x55B1,0x55B9,0x5588,0x5581, -0x559F,0x557E,0x55D6,0x5591,0x557B,0x55DF,0x55BD,0x55BE, -0x5594,0x5599,0x55EA,0x55F7,0x55C9,0x561F,0x55D1,0x55EB, -0x55EC,0x55D4,0x55E6,0x55DD,0x55C4,0x55EF,0x55E5,0x55F2, -0x55F3,0x55CC,0x55CD,0x55E8,0x55F5,0x55E4,0x8F94,0x561E, -0x5608,0x560C,0x5601,0x5624,0x5623,0x55FE,0x5600,0x5627, -0x562D,0x5658,0x5639,0x5657,0x562C,0x564D,0x5662,0x5659, -0x565C,0x564C,0x5654,0x5686,0x5664,0x5671,0x566B,0x567B, -0x567C,0x5685,0x5693,0x56AF,0x56D4,0x56D7,0x56DD,0x56E1, -0x56F5,0x56EB,0x56F9,0x56FF,0x5704,0x570A,0x5709,0x571C, -0x5E0F,0x5E19,0x5E14,0x5E11,0x5E31,0x5E3B,0x5E3C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9145,0x9147,0x9148,0x9151,0x9153,0x9154,0x9155,0x9156, -0x9158,0x9159,0x915B,0x915C,0x915F,0x9160,0x9166,0x9167, -0x9168,0x916B,0x916D,0x9173,0x917A,0x917B,0x917C,0x9180, -0x9181,0x9182,0x9183,0x9184,0x9186,0x9188,0x918A,0x918E, -0x918F,0x9193,0x9194,0x9195,0x9196,0x9197,0x9198,0x9199, -0x919C,0x919D,0x919E,0x919F,0x91A0,0x91A1,0x91A4,0x91A5, -0x91A6,0x91A7,0x91A8,0x91A9,0x91AB,0x91AC,0x91B0,0x91B1, -0x91B2,0x91B3,0x91B6,0x91B7,0x91B8,0x91B9,0x91BB, 0, -0x91BC,0x91BD,0x91BE,0x91BF,0x91C0,0x91C1,0x91C2,0x91C3, -0x91C4,0x91C5,0x91C6,0x91C8,0x91CB,0x91D0,0x91D2,0x91D3, -0x91D4,0x91D5,0x91D6,0x91D7,0x91D8,0x91D9,0x91DA,0x91DB, -0x91DD,0x91DE,0x91DF,0x91E0,0x91E1,0x91E2,0x91E3,0x91E4, -0x91E5,0x5E37,0x5E44,0x5E54,0x5E5B,0x5E5E,0x5E61,0x5C8C, -0x5C7A,0x5C8D,0x5C90,0x5C96,0x5C88,0x5C98,0x5C99,0x5C91, -0x5C9A,0x5C9C,0x5CB5,0x5CA2,0x5CBD,0x5CAC,0x5CAB,0x5CB1, -0x5CA3,0x5CC1,0x5CB7,0x5CC4,0x5CD2,0x5CE4,0x5CCB,0x5CE5, -0x5D02,0x5D03,0x5D27,0x5D26,0x5D2E,0x5D24,0x5D1E,0x5D06, -0x5D1B,0x5D58,0x5D3E,0x5D34,0x5D3D,0x5D6C,0x5D5B,0x5D6F, -0x5D5D,0x5D6B,0x5D4B,0x5D4A,0x5D69,0x5D74,0x5D82,0x5D99, -0x5D9D,0x8C73,0x5DB7,0x5DC5,0x5F73,0x5F77,0x5F82,0x5F87, -0x5F89,0x5F8C,0x5F95,0x5F99,0x5F9C,0x5FA8,0x5FAD,0x5FB5, -0x5FBC,0x8862,0x5F61,0x72AD,0x72B0,0x72B4,0x72B7,0x72B8, -0x72C3,0x72C1,0x72CE,0x72CD,0x72D2,0x72E8,0x72EF,0x72E9, -0x72F2,0x72F4,0x72F7,0x7301,0x72F3,0x7303,0x72FA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x91E6,0x91E7,0x91E8,0x91E9,0x91EA,0x91EB,0x91EC,0x91ED, -0x91EE,0x91EF,0x91F0,0x91F1,0x91F2,0x91F3,0x91F4,0x91F5, -0x91F6,0x91F7,0x91F8,0x91F9,0x91FA,0x91FB,0x91FC,0x91FD, -0x91FE,0x91FF,0x9200,0x9201,0x9202,0x9203,0x9204,0x9205, -0x9206,0x9207,0x9208,0x9209,0x920A,0x920B,0x920C,0x920D, -0x920E,0x920F,0x9210,0x9211,0x9212,0x9213,0x9214,0x9215, -0x9216,0x9217,0x9218,0x9219,0x921A,0x921B,0x921C,0x921D, -0x921E,0x921F,0x9220,0x9221,0x9222,0x9223,0x9224, 0, -0x9225,0x9226,0x9227,0x9228,0x9229,0x922A,0x922B,0x922C, -0x922D,0x922E,0x922F,0x9230,0x9231,0x9232,0x9233,0x9234, -0x9235,0x9236,0x9237,0x9238,0x9239,0x923A,0x923B,0x923C, -0x923D,0x923E,0x923F,0x9240,0x9241,0x9242,0x9243,0x9244, -0x9245,0x72FB,0x7317,0x7313,0x7321,0x730A,0x731E,0x731D, -0x7315,0x7322,0x7339,0x7325,0x732C,0x7338,0x7331,0x7350, -0x734D,0x7357,0x7360,0x736C,0x736F,0x737E,0x821B,0x5925, -0x98E7,0x5924,0x5902,0x9963,0x9967,0x9968,0x9969,0x996A, -0x996B,0x996C,0x9974,0x9977,0x997D,0x9980,0x9984,0x9987, -0x998A,0x998D,0x9990,0x9991,0x9993,0x9994,0x9995,0x5E80, -0x5E91,0x5E8B,0x5E96,0x5EA5,0x5EA0,0x5EB9,0x5EB5,0x5EBE, -0x5EB3,0x8D53,0x5ED2,0x5ED1,0x5EDB,0x5EE8,0x5EEA,0x81BA, -0x5FC4,0x5FC9,0x5FD6,0x5FCF,0x6003,0x5FEE,0x6004,0x5FE1, -0x5FE4,0x5FFE,0x6005,0x6006,0x5FEA,0x5FED,0x5FF8,0x6019, -0x6035,0x6026,0x601B,0x600F,0x600D,0x6029,0x602B,0x600A, -0x603F,0x6021,0x6078,0x6079,0x607B,0x607A,0x6042, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9246,0x9247,0x9248,0x9249,0x924A,0x924B,0x924C,0x924D, -0x924E,0x924F,0x9250,0x9251,0x9252,0x9253,0x9254,0x9255, -0x9256,0x9257,0x9258,0x9259,0x925A,0x925B,0x925C,0x925D, -0x925E,0x925F,0x9260,0x9261,0x9262,0x9263,0x9264,0x9265, -0x9266,0x9267,0x9268,0x9269,0x926A,0x926B,0x926C,0x926D, -0x926E,0x926F,0x9270,0x9271,0x9272,0x9273,0x9275,0x9276, -0x9277,0x9278,0x9279,0x927A,0x927B,0x927C,0x927D,0x927E, -0x927F,0x9280,0x9281,0x9282,0x9283,0x9284,0x9285, 0, -0x9286,0x9287,0x9288,0x9289,0x928A,0x928B,0x928C,0x928D, -0x928F,0x9290,0x9291,0x9292,0x9293,0x9294,0x9295,0x9296, -0x9297,0x9298,0x9299,0x929A,0x929B,0x929C,0x929D,0x929E, -0x929F,0x92A0,0x92A1,0x92A2,0x92A3,0x92A4,0x92A5,0x92A6, -0x92A7,0x606A,0x607D,0x6096,0x609A,0x60AD,0x609D,0x6083, -0x6092,0x608C,0x609B,0x60EC,0x60BB,0x60B1,0x60DD,0x60D8, -0x60C6,0x60DA,0x60B4,0x6120,0x6126,0x6115,0x6123,0x60F4, -0x6100,0x610E,0x612B,0x614A,0x6175,0x61AC,0x6194,0x61A7, -0x61B7,0x61D4,0x61F5,0x5FDD,0x96B3,0x95E9,0x95EB,0x95F1, -0x95F3,0x95F5,0x95F6,0x95FC,0x95FE,0x9603,0x9604,0x9606, -0x9608,0x960A,0x960B,0x960C,0x960D,0x960F,0x9612,0x9615, -0x9616,0x9617,0x9619,0x961A,0x4E2C,0x723F,0x6215,0x6C35, -0x6C54,0x6C5C,0x6C4A,0x6CA3,0x6C85,0x6C90,0x6C94,0x6C8C, -0x6C68,0x6C69,0x6C74,0x6C76,0x6C86,0x6CA9,0x6CD0,0x6CD4, -0x6CAD,0x6CF7,0x6CF8,0x6CF1,0x6CD7,0x6CB2,0x6CE0,0x6CD6, -0x6CFA,0x6CEB,0x6CEE,0x6CB1,0x6CD3,0x6CEF,0x6CFE, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x92A8,0x92A9,0x92AA,0x92AB,0x92AC,0x92AD,0x92AF,0x92B0, -0x92B1,0x92B2,0x92B3,0x92B4,0x92B5,0x92B6,0x92B7,0x92B8, -0x92B9,0x92BA,0x92BB,0x92BC,0x92BD,0x92BE,0x92BF,0x92C0, -0x92C1,0x92C2,0x92C3,0x92C4,0x92C5,0x92C6,0x92C7,0x92C9, -0x92CA,0x92CB,0x92CC,0x92CD,0x92CE,0x92CF,0x92D0,0x92D1, -0x92D2,0x92D3,0x92D4,0x92D5,0x92D6,0x92D7,0x92D8,0x92D9, -0x92DA,0x92DB,0x92DC,0x92DD,0x92DE,0x92DF,0x92E0,0x92E1, -0x92E2,0x92E3,0x92E4,0x92E5,0x92E6,0x92E7,0x92E8, 0, -0x92E9,0x92EA,0x92EB,0x92EC,0x92ED,0x92EE,0x92EF,0x92F0, -0x92F1,0x92F2,0x92F3,0x92F4,0x92F5,0x92F6,0x92F7,0x92F8, -0x92F9,0x92FA,0x92FB,0x92FC,0x92FD,0x92FE,0x92FF,0x9300, -0x9301,0x9302,0x9303,0x9304,0x9305,0x9306,0x9307,0x9308, -0x9309,0x6D39,0x6D27,0x6D0C,0x6D43,0x6D48,0x6D07,0x6D04, -0x6D19,0x6D0E,0x6D2B,0x6D4D,0x6D2E,0x6D35,0x6D1A,0x6D4F, -0x6D52,0x6D54,0x6D33,0x6D91,0x6D6F,0x6D9E,0x6DA0,0x6D5E, -0x6D93,0x6D94,0x6D5C,0x6D60,0x6D7C,0x6D63,0x6E1A,0x6DC7, -0x6DC5,0x6DDE,0x6E0E,0x6DBF,0x6DE0,0x6E11,0x6DE6,0x6DDD, -0x6DD9,0x6E16,0x6DAB,0x6E0C,0x6DAE,0x6E2B,0x6E6E,0x6E4E, -0x6E6B,0x6EB2,0x6E5F,0x6E86,0x6E53,0x6E54,0x6E32,0x6E25, -0x6E44,0x6EDF,0x6EB1,0x6E98,0x6EE0,0x6F2D,0x6EE2,0x6EA5, -0x6EA7,0x6EBD,0x6EBB,0x6EB7,0x6ED7,0x6EB4,0x6ECF,0x6E8F, -0x6EC2,0x6E9F,0x6F62,0x6F46,0x6F47,0x6F24,0x6F15,0x6EF9, -0x6F2F,0x6F36,0x6F4B,0x6F74,0x6F2A,0x6F09,0x6F29,0x6F89, -0x6F8D,0x6F8C,0x6F78,0x6F72,0x6F7C,0x6F7A,0x6FD1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x930A,0x930B,0x930C,0x930D,0x930E,0x930F,0x9310,0x9311, -0x9312,0x9313,0x9314,0x9315,0x9316,0x9317,0x9318,0x9319, -0x931A,0x931B,0x931C,0x931D,0x931E,0x931F,0x9320,0x9321, -0x9322,0x9323,0x9324,0x9325,0x9326,0x9327,0x9328,0x9329, -0x932A,0x932B,0x932C,0x932D,0x932E,0x932F,0x9330,0x9331, -0x9332,0x9333,0x9334,0x9335,0x9336,0x9337,0x9338,0x9339, -0x933A,0x933B,0x933C,0x933D,0x933F,0x9340,0x9341,0x9342, -0x9343,0x9344,0x9345,0x9346,0x9347,0x9348,0x9349, 0, -0x934A,0x934B,0x934C,0x934D,0x934E,0x934F,0x9350,0x9351, -0x9352,0x9353,0x9354,0x9355,0x9356,0x9357,0x9358,0x9359, -0x935A,0x935B,0x935C,0x935D,0x935E,0x935F,0x9360,0x9361, -0x9362,0x9363,0x9364,0x9365,0x9366,0x9367,0x9368,0x9369, -0x936B,0x6FC9,0x6FA7,0x6FB9,0x6FB6,0x6FC2,0x6FE1,0x6FEE, -0x6FDE,0x6FE0,0x6FEF,0x701A,0x7023,0x701B,0x7039,0x7035, -0x704F,0x705E,0x5B80,0x5B84,0x5B95,0x5B93,0x5BA5,0x5BB8, -0x752F,0x9A9E,0x6434,0x5BE4,0x5BEE,0x8930,0x5BF0,0x8E47, -0x8B07,0x8FB6,0x8FD3,0x8FD5,0x8FE5,0x8FEE,0x8FE4,0x8FE9, -0x8FE6,0x8FF3,0x8FE8,0x9005,0x9004,0x900B,0x9026,0x9011, -0x900D,0x9016,0x9021,0x9035,0x9036,0x902D,0x902F,0x9044, -0x9051,0x9052,0x9050,0x9068,0x9058,0x9062,0x905B,0x66B9, -0x9074,0x907D,0x9082,0x9088,0x9083,0x908B,0x5F50,0x5F57, -0x5F56,0x5F58,0x5C3B,0x54AB,0x5C50,0x5C59,0x5B71,0x5C63, -0x5C66,0x7FBC,0x5F2A,0x5F29,0x5F2D,0x8274,0x5F3C,0x9B3B, -0x5C6E,0x5981,0x5983,0x598D,0x59A9,0x59AA,0x59A3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x936C,0x936D,0x936E,0x936F,0x9370,0x9371,0x9372,0x9373, -0x9374,0x9375,0x9376,0x9377,0x9378,0x9379,0x937A,0x937B, -0x937C,0x937D,0x937E,0x937F,0x9380,0x9381,0x9382,0x9383, -0x9384,0x9385,0x9386,0x9387,0x9388,0x9389,0x938A,0x938B, -0x938C,0x938D,0x938E,0x9390,0x9391,0x9392,0x9393,0x9394, -0x9395,0x9396,0x9397,0x9398,0x9399,0x939A,0x939B,0x939C, -0x939D,0x939E,0x939F,0x93A0,0x93A1,0x93A2,0x93A3,0x93A4, -0x93A5,0x93A6,0x93A7,0x93A8,0x93A9,0x93AA,0x93AB, 0, -0x93AC,0x93AD,0x93AE,0x93AF,0x93B0,0x93B1,0x93B2,0x93B3, -0x93B4,0x93B5,0x93B6,0x93B7,0x93B8,0x93B9,0x93BA,0x93BB, -0x93BC,0x93BD,0x93BE,0x93BF,0x93C0,0x93C1,0x93C2,0x93C3, -0x93C4,0x93C5,0x93C6,0x93C7,0x93C8,0x93C9,0x93CB,0x93CC, -0x93CD,0x5997,0x59CA,0x59AB,0x599E,0x59A4,0x59D2,0x59B2, -0x59AF,0x59D7,0x59BE,0x5A05,0x5A06,0x59DD,0x5A08,0x59E3, -0x59D8,0x59F9,0x5A0C,0x5A09,0x5A32,0x5A34,0x5A11,0x5A23, -0x5A13,0x5A40,0x5A67,0x5A4A,0x5A55,0x5A3C,0x5A62,0x5A75, -0x80EC,0x5AAA,0x5A9B,0x5A77,0x5A7A,0x5ABE,0x5AEB,0x5AB2, -0x5AD2,0x5AD4,0x5AB8,0x5AE0,0x5AE3,0x5AF1,0x5AD6,0x5AE6, -0x5AD8,0x5ADC,0x5B09,0x5B17,0x5B16,0x5B32,0x5B37,0x5B40, -0x5C15,0x5C1C,0x5B5A,0x5B65,0x5B73,0x5B51,0x5B53,0x5B62, -0x9A75,0x9A77,0x9A78,0x9A7A,0x9A7F,0x9A7D,0x9A80,0x9A81, -0x9A85,0x9A88,0x9A8A,0x9A90,0x9A92,0x9A93,0x9A96,0x9A98, -0x9A9B,0x9A9C,0x9A9D,0x9A9F,0x9AA0,0x9AA2,0x9AA3,0x9AA5, -0x9AA7,0x7E9F,0x7EA1,0x7EA3,0x7EA5,0x7EA8,0x7EA9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x93CE,0x93CF,0x93D0,0x93D1,0x93D2,0x93D3,0x93D4,0x93D5, -0x93D7,0x93D8,0x93D9,0x93DA,0x93DB,0x93DC,0x93DD,0x93DE, -0x93DF,0x93E0,0x93E1,0x93E2,0x93E3,0x93E4,0x93E5,0x93E6, -0x93E7,0x93E8,0x93E9,0x93EA,0x93EB,0x93EC,0x93ED,0x93EE, -0x93EF,0x93F0,0x93F1,0x93F2,0x93F3,0x93F4,0x93F5,0x93F6, -0x93F7,0x93F8,0x93F9,0x93FA,0x93FB,0x93FC,0x93FD,0x93FE, -0x93FF,0x9400,0x9401,0x9402,0x9403,0x9404,0x9405,0x9406, -0x9407,0x9408,0x9409,0x940A,0x940B,0x940C,0x940D, 0, -0x940E,0x940F,0x9410,0x9411,0x9412,0x9413,0x9414,0x9415, -0x9416,0x9417,0x9418,0x9419,0x941A,0x941B,0x941C,0x941D, -0x941E,0x941F,0x9420,0x9421,0x9422,0x9423,0x9424,0x9425, -0x9426,0x9427,0x9428,0x9429,0x942A,0x942B,0x942C,0x942D, -0x942E,0x7EAD,0x7EB0,0x7EBE,0x7EC0,0x7EC1,0x7EC2,0x7EC9, -0x7ECB,0x7ECC,0x7ED0,0x7ED4,0x7ED7,0x7EDB,0x7EE0,0x7EE1, -0x7EE8,0x7EEB,0x7EEE,0x7EEF,0x7EF1,0x7EF2,0x7F0D,0x7EF6, -0x7EFA,0x7EFB,0x7EFE,0x7F01,0x7F02,0x7F03,0x7F07,0x7F08, -0x7F0B,0x7F0C,0x7F0F,0x7F11,0x7F12,0x7F17,0x7F19,0x7F1C, -0x7F1B,0x7F1F,0x7F21,0x7F22,0x7F23,0x7F24,0x7F25,0x7F26, -0x7F27,0x7F2A,0x7F2B,0x7F2C,0x7F2D,0x7F2F,0x7F30,0x7F31, -0x7F32,0x7F33,0x7F35,0x5E7A,0x757F,0x5DDB,0x753E,0x9095, -0x738E,0x7391,0x73AE,0x73A2,0x739F,0x73CF,0x73C2,0x73D1, -0x73B7,0x73B3,0x73C0,0x73C9,0x73C8,0x73E5,0x73D9,0x987C, -0x740A,0x73E9,0x73E7,0x73DE,0x73BA,0x73F2,0x740F,0x742A, -0x745B,0x7426,0x7425,0x7428,0x7430,0x742E,0x742C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x942F,0x9430,0x9431,0x9432,0x9433,0x9434,0x9435,0x9436, -0x9437,0x9438,0x9439,0x943A,0x943B,0x943C,0x943D,0x943F, -0x9440,0x9441,0x9442,0x9443,0x9444,0x9445,0x9446,0x9447, -0x9448,0x9449,0x944A,0x944B,0x944C,0x944D,0x944E,0x944F, -0x9450,0x9451,0x9452,0x9453,0x9454,0x9455,0x9456,0x9457, -0x9458,0x9459,0x945A,0x945B,0x945C,0x945D,0x945E,0x945F, -0x9460,0x9461,0x9462,0x9463,0x9464,0x9465,0x9466,0x9467, -0x9468,0x9469,0x946A,0x946C,0x946D,0x946E,0x946F, 0, -0x9470,0x9471,0x9472,0x9473,0x9474,0x9475,0x9476,0x9477, -0x9478,0x9479,0x947A,0x947B,0x947C,0x947D,0x947E,0x947F, -0x9480,0x9481,0x9482,0x9483,0x9484,0x9491,0x9496,0x9498, -0x94C7,0x94CF,0x94D3,0x94D4,0x94DA,0x94E6,0x94FB,0x951C, -0x9520,0x741B,0x741A,0x7441,0x745C,0x7457,0x7455,0x7459, -0x7477,0x746D,0x747E,0x749C,0x748E,0x7480,0x7481,0x7487, -0x748B,0x749E,0x74A8,0x74A9,0x7490,0x74A7,0x74D2,0x74BA, -0x97EA,0x97EB,0x97EC,0x674C,0x6753,0x675E,0x6748,0x6769, -0x67A5,0x6787,0x676A,0x6773,0x6798,0x67A7,0x6775,0x67A8, -0x679E,0x67AD,0x678B,0x6777,0x677C,0x67F0,0x6809,0x67D8, -0x680A,0x67E9,0x67B0,0x680C,0x67D9,0x67B5,0x67DA,0x67B3, -0x67DD,0x6800,0x67C3,0x67B8,0x67E2,0x680E,0x67C1,0x67FD, -0x6832,0x6833,0x6860,0x6861,0x684E,0x6862,0x6844,0x6864, -0x6883,0x681D,0x6855,0x6866,0x6841,0x6867,0x6840,0x683E, -0x684A,0x6849,0x6829,0x68B5,0x688F,0x6874,0x6877,0x6893, -0x686B,0x68C2,0x696E,0x68FC,0x691F,0x6920,0x68F9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9527,0x9533,0x953D,0x9543,0x9548,0x954B,0x9555,0x955A, -0x9560,0x956E,0x9574,0x9575,0x9577,0x9578,0x9579,0x957A, -0x957B,0x957C,0x957D,0x957E,0x9580,0x9581,0x9582,0x9583, -0x9584,0x9585,0x9586,0x9587,0x9588,0x9589,0x958A,0x958B, -0x958C,0x958D,0x958E,0x958F,0x9590,0x9591,0x9592,0x9593, -0x9594,0x9595,0x9596,0x9597,0x9598,0x9599,0x959A,0x959B, -0x959C,0x959D,0x959E,0x959F,0x95A0,0x95A1,0x95A2,0x95A3, -0x95A4,0x95A5,0x95A6,0x95A7,0x95A8,0x95A9,0x95AA, 0, -0x95AB,0x95AC,0x95AD,0x95AE,0x95AF,0x95B0,0x95B1,0x95B2, -0x95B3,0x95B4,0x95B5,0x95B6,0x95B7,0x95B8,0x95B9,0x95BA, -0x95BB,0x95BC,0x95BD,0x95BE,0x95BF,0x95C0,0x95C1,0x95C2, -0x95C3,0x95C4,0x95C5,0x95C6,0x95C7,0x95C8,0x95C9,0x95CA, -0x95CB,0x6924,0x68F0,0x690B,0x6901,0x6957,0x68E3,0x6910, -0x6971,0x6939,0x6960,0x6942,0x695D,0x6984,0x696B,0x6980, -0x6998,0x6978,0x6934,0x69CC,0x6987,0x6988,0x69CE,0x6989, -0x6966,0x6963,0x6979,0x699B,0x69A7,0x69BB,0x69AB,0x69AD, -0x69D4,0x69B1,0x69C1,0x69CA,0x69DF,0x6995,0x69E0,0x698D, -0x69FF,0x6A2F,0x69ED,0x6A17,0x6A18,0x6A65,0x69F2,0x6A44, -0x6A3E,0x6AA0,0x6A50,0x6A5B,0x6A35,0x6A8E,0x6A79,0x6A3D, -0x6A28,0x6A58,0x6A7C,0x6A91,0x6A90,0x6AA9,0x6A97,0x6AAB, -0x7337,0x7352,0x6B81,0x6B82,0x6B87,0x6B84,0x6B92,0x6B93, -0x6B8D,0x6B9A,0x6B9B,0x6BA1,0x6BAA,0x8F6B,0x8F6D,0x8F71, -0x8F72,0x8F73,0x8F75,0x8F76,0x8F78,0x8F77,0x8F79,0x8F7A, -0x8F7C,0x8F7E,0x8F81,0x8F82,0x8F84,0x8F87,0x8F8B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x95CC,0x95CD,0x95CE,0x95CF,0x95D0,0x95D1,0x95D2,0x95D3, -0x95D4,0x95D5,0x95D6,0x95D7,0x95D8,0x95D9,0x95DA,0x95DB, -0x95DC,0x95DD,0x95DE,0x95DF,0x95E0,0x95E1,0x95E2,0x95E3, -0x95E4,0x95E5,0x95E6,0x95E7,0x95EC,0x95FF,0x9607,0x9613, -0x9618,0x961B,0x961E,0x9620,0x9623,0x9624,0x9625,0x9626, -0x9627,0x9628,0x9629,0x962B,0x962C,0x962D,0x962F,0x9630, -0x9637,0x9638,0x9639,0x963A,0x963E,0x9641,0x9643,0x964A, -0x964E,0x964F,0x9651,0x9652,0x9653,0x9656,0x9657, 0, -0x9658,0x9659,0x965A,0x965C,0x965D,0x965E,0x9660,0x9663, -0x9665,0x9666,0x966B,0x966D,0x966E,0x966F,0x9670,0x9671, -0x9673,0x9678,0x9679,0x967A,0x967B,0x967C,0x967D,0x967E, -0x967F,0x9680,0x9681,0x9682,0x9683,0x9684,0x9687,0x9689, -0x968A,0x8F8D,0x8F8E,0x8F8F,0x8F98,0x8F9A,0x8ECE,0x620B, -0x6217,0x621B,0x621F,0x6222,0x6221,0x6225,0x6224,0x622C, -0x81E7,0x74EF,0x74F4,0x74FF,0x750F,0x7511,0x7513,0x6534, -0x65EE,0x65EF,0x65F0,0x660A,0x6619,0x6772,0x6603,0x6615, -0x6600,0x7085,0x66F7,0x661D,0x6634,0x6631,0x6636,0x6635, -0x8006,0x665F,0x6654,0x6641,0x664F,0x6656,0x6661,0x6657, -0x6677,0x6684,0x668C,0x66A7,0x669D,0x66BE,0x66DB,0x66DC, -0x66E6,0x66E9,0x8D32,0x8D33,0x8D36,0x8D3B,0x8D3D,0x8D40, -0x8D45,0x8D46,0x8D48,0x8D49,0x8D47,0x8D4D,0x8D55,0x8D59, -0x89C7,0x89CA,0x89CB,0x89CC,0x89CE,0x89CF,0x89D0,0x89D1, -0x726E,0x729F,0x725D,0x7266,0x726F,0x727E,0x727F,0x7284, -0x728B,0x728D,0x728F,0x7292,0x6308,0x6332,0x63B0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x968C,0x968E,0x9691,0x9692,0x9693,0x9695,0x9696,0x969A, -0x969B,0x969D,0x969E,0x969F,0x96A0,0x96A1,0x96A2,0x96A3, -0x96A4,0x96A5,0x96A6,0x96A8,0x96A9,0x96AA,0x96AB,0x96AC, -0x96AD,0x96AE,0x96AF,0x96B1,0x96B2,0x96B4,0x96B5,0x96B7, -0x96B8,0x96BA,0x96BB,0x96BF,0x96C2,0x96C3,0x96C8,0x96CA, -0x96CB,0x96D0,0x96D1,0x96D3,0x96D4,0x96D6,0x96D7,0x96D8, -0x96D9,0x96DA,0x96DB,0x96DC,0x96DD,0x96DE,0x96DF,0x96E1, -0x96E2,0x96E3,0x96E4,0x96E5,0x96E6,0x96E7,0x96EB, 0, -0x96EC,0x96ED,0x96EE,0x96F0,0x96F1,0x96F2,0x96F4,0x96F5, -0x96F8,0x96FA,0x96FB,0x96FC,0x96FD,0x96FF,0x9702,0x9703, -0x9705,0x970A,0x970B,0x970C,0x9710,0x9711,0x9712,0x9714, -0x9715,0x9717,0x9718,0x9719,0x971A,0x971B,0x971D,0x971F, -0x9720,0x643F,0x64D8,0x8004,0x6BEA,0x6BF3,0x6BFD,0x6BF5, -0x6BF9,0x6C05,0x6C07,0x6C06,0x6C0D,0x6C15,0x6C18,0x6C19, -0x6C1A,0x6C21,0x6C29,0x6C24,0x6C2A,0x6C32,0x6535,0x6555, -0x656B,0x724D,0x7252,0x7256,0x7230,0x8662,0x5216,0x809F, -0x809C,0x8093,0x80BC,0x670A,0x80BD,0x80B1,0x80AB,0x80AD, -0x80B4,0x80B7,0x80E7,0x80E8,0x80E9,0x80EA,0x80DB,0x80C2, -0x80C4,0x80D9,0x80CD,0x80D7,0x6710,0x80DD,0x80EB,0x80F1, -0x80F4,0x80ED,0x810D,0x810E,0x80F2,0x80FC,0x6715,0x8112, -0x8C5A,0x8136,0x811E,0x812C,0x8118,0x8132,0x8148,0x814C, -0x8153,0x8174,0x8159,0x815A,0x8171,0x8160,0x8169,0x817C, -0x817D,0x816D,0x8167,0x584D,0x5AB5,0x8188,0x8182,0x8191, -0x6ED5,0x81A3,0x81AA,0x81CC,0x6726,0x81CA,0x81BB, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9721,0x9722,0x9723,0x9724,0x9725,0x9726,0x9727,0x9728, -0x9729,0x972B,0x972C,0x972E,0x972F,0x9731,0x9733,0x9734, -0x9735,0x9736,0x9737,0x973A,0x973B,0x973C,0x973D,0x973F, -0x9740,0x9741,0x9742,0x9743,0x9744,0x9745,0x9746,0x9747, -0x9748,0x9749,0x974A,0x974B,0x974C,0x974D,0x974E,0x974F, -0x9750,0x9751,0x9754,0x9755,0x9757,0x9758,0x975A,0x975C, -0x975D,0x975F,0x9763,0x9764,0x9766,0x9767,0x9768,0x976A, -0x976B,0x976C,0x976D,0x976E,0x976F,0x9770,0x9771, 0, -0x9772,0x9775,0x9777,0x9778,0x9779,0x977A,0x977B,0x977D, -0x977E,0x977F,0x9780,0x9781,0x9782,0x9783,0x9784,0x9786, -0x9787,0x9788,0x9789,0x978A,0x978C,0x978E,0x978F,0x9790, -0x9793,0x9795,0x9796,0x9797,0x9799,0x979A,0x979B,0x979C, -0x979D,0x81C1,0x81A6,0x6B24,0x6B37,0x6B39,0x6B43,0x6B46, -0x6B59,0x98D1,0x98D2,0x98D3,0x98D5,0x98D9,0x98DA,0x6BB3, -0x5F40,0x6BC2,0x89F3,0x6590,0x9F51,0x6593,0x65BC,0x65C6, -0x65C4,0x65C3,0x65CC,0x65CE,0x65D2,0x65D6,0x7080,0x709C, -0x7096,0x709D,0x70BB,0x70C0,0x70B7,0x70AB,0x70B1,0x70E8, -0x70CA,0x7110,0x7113,0x7116,0x712F,0x7131,0x7173,0x715C, -0x7168,0x7145,0x7172,0x714A,0x7178,0x717A,0x7198,0x71B3, -0x71B5,0x71A8,0x71A0,0x71E0,0x71D4,0x71E7,0x71F9,0x721D, -0x7228,0x706C,0x7118,0x7166,0x71B9,0x623E,0x623D,0x6243, -0x6248,0x6249,0x793B,0x7940,0x7946,0x7949,0x795B,0x795C, -0x7953,0x795A,0x7962,0x7957,0x7960,0x796F,0x7967,0x797A, -0x7985,0x798A,0x799A,0x79A7,0x79B3,0x5FD1,0x5FD0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x979E,0x979F,0x97A1,0x97A2,0x97A4,0x97A5,0x97A6,0x97A7, -0x97A8,0x97A9,0x97AA,0x97AC,0x97AE,0x97B0,0x97B1,0x97B3, -0x97B5,0x97B6,0x97B7,0x97B8,0x97B9,0x97BA,0x97BB,0x97BC, -0x97BD,0x97BE,0x97BF,0x97C0,0x97C1,0x97C2,0x97C3,0x97C4, -0x97C5,0x97C6,0x97C7,0x97C8,0x97C9,0x97CA,0x97CB,0x97CC, -0x97CD,0x97CE,0x97CF,0x97D0,0x97D1,0x97D2,0x97D3,0x97D4, -0x97D5,0x97D6,0x97D7,0x97D8,0x97D9,0x97DA,0x97DB,0x97DC, -0x97DD,0x97DE,0x97DF,0x97E0,0x97E1,0x97E2,0x97E3, 0, -0x97E4,0x97E5,0x97E8,0x97EE,0x97EF,0x97F0,0x97F1,0x97F2, -0x97F4,0x97F7,0x97F8,0x97F9,0x97FA,0x97FB,0x97FC,0x97FD, -0x97FE,0x97FF,0x9800,0x9801,0x9802,0x9803,0x9804,0x9805, -0x9806,0x9807,0x9808,0x9809,0x980A,0x980B,0x980C,0x980D, -0x980E,0x603C,0x605D,0x605A,0x6067,0x6041,0x6059,0x6063, -0x60AB,0x6106,0x610D,0x615D,0x61A9,0x619D,0x61CB,0x61D1, -0x6206,0x8080,0x807F,0x6C93,0x6CF6,0x6DFC,0x77F6,0x77F8, -0x7800,0x7809,0x7817,0x7818,0x7811,0x65AB,0x782D,0x781C, -0x781D,0x7839,0x783A,0x783B,0x781F,0x783C,0x7825,0x782C, -0x7823,0x7829,0x784E,0x786D,0x7856,0x7857,0x7826,0x7850, -0x7847,0x784C,0x786A,0x789B,0x7893,0x789A,0x7887,0x789C, -0x78A1,0x78A3,0x78B2,0x78B9,0x78A5,0x78D4,0x78D9,0x78C9, -0x78EC,0x78F2,0x7905,0x78F4,0x7913,0x7924,0x791E,0x7934, -0x9F9B,0x9EF9,0x9EFB,0x9EFC,0x76F1,0x7704,0x770D,0x76F9, -0x7707,0x7708,0x771A,0x7722,0x7719,0x772D,0x7726,0x7735, -0x7738,0x7750,0x7751,0x7747,0x7743,0x775A,0x7768, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x980F,0x9810,0x9811,0x9812,0x9813,0x9814,0x9815,0x9816, -0x9817,0x9818,0x9819,0x981A,0x981B,0x981C,0x981D,0x981E, -0x981F,0x9820,0x9821,0x9822,0x9823,0x9824,0x9825,0x9826, -0x9827,0x9828,0x9829,0x982A,0x982B,0x982C,0x982D,0x982E, -0x982F,0x9830,0x9831,0x9832,0x9833,0x9834,0x9835,0x9836, -0x9837,0x9838,0x9839,0x983A,0x983B,0x983C,0x983D,0x983E, -0x983F,0x9840,0x9841,0x9842,0x9843,0x9844,0x9845,0x9846, -0x9847,0x9848,0x9849,0x984A,0x984B,0x984C,0x984D, 0, -0x984E,0x984F,0x9850,0x9851,0x9852,0x9853,0x9854,0x9855, -0x9856,0x9857,0x9858,0x9859,0x985A,0x985B,0x985C,0x985D, -0x985E,0x985F,0x9860,0x9861,0x9862,0x9863,0x9864,0x9865, -0x9866,0x9867,0x9868,0x9869,0x986A,0x986B,0x986C,0x986D, -0x986E,0x7762,0x7765,0x777F,0x778D,0x777D,0x7780,0x778C, -0x7791,0x779F,0x77A0,0x77B0,0x77B5,0x77BD,0x753A,0x7540, -0x754E,0x754B,0x7548,0x755B,0x7572,0x7579,0x7583,0x7F58, -0x7F61,0x7F5F,0x8A48,0x7F68,0x7F74,0x7F71,0x7F79,0x7F81, -0x7F7E,0x76CD,0x76E5,0x8832,0x9485,0x9486,0x9487,0x948B, -0x948A,0x948C,0x948D,0x948F,0x9490,0x9494,0x9497,0x9495, -0x949A,0x949B,0x949C,0x94A3,0x94A4,0x94AB,0x94AA,0x94AD, -0x94AC,0x94AF,0x94B0,0x94B2,0x94B4,0x94B6,0x94B7,0x94B8, -0x94B9,0x94BA,0x94BC,0x94BD,0x94BF,0x94C4,0x94C8,0x94C9, -0x94CA,0x94CB,0x94CC,0x94CD,0x94CE,0x94D0,0x94D1,0x94D2, -0x94D5,0x94D6,0x94D7,0x94D9,0x94D8,0x94DB,0x94DE,0x94DF, -0x94E0,0x94E2,0x94E4,0x94E5,0x94E7,0x94E8,0x94EA, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x986F,0x9870,0x9871,0x9872,0x9873,0x9874,0x988B,0x988E, -0x9892,0x9895,0x9899,0x98A3,0x98A8,0x98A9,0x98AA,0x98AB, -0x98AC,0x98AD,0x98AE,0x98AF,0x98B0,0x98B1,0x98B2,0x98B3, -0x98B4,0x98B5,0x98B6,0x98B7,0x98B8,0x98B9,0x98BA,0x98BB, -0x98BC,0x98BD,0x98BE,0x98BF,0x98C0,0x98C1,0x98C2,0x98C3, -0x98C4,0x98C5,0x98C6,0x98C7,0x98C8,0x98C9,0x98CA,0x98CB, -0x98CC,0x98CD,0x98CF,0x98D0,0x98D4,0x98D6,0x98D7,0x98DB, -0x98DC,0x98DD,0x98E0,0x98E1,0x98E2,0x98E3,0x98E4, 0, -0x98E5,0x98E6,0x98E9,0x98EA,0x98EB,0x98EC,0x98ED,0x98EE, -0x98EF,0x98F0,0x98F1,0x98F2,0x98F3,0x98F4,0x98F5,0x98F6, -0x98F7,0x98F8,0x98F9,0x98FA,0x98FB,0x98FC,0x98FD,0x98FE, -0x98FF,0x9900,0x9901,0x9902,0x9903,0x9904,0x9905,0x9906, -0x9907,0x94E9,0x94EB,0x94EE,0x94EF,0x94F3,0x94F4,0x94F5, -0x94F7,0x94F9,0x94FC,0x94FD,0x94FF,0x9503,0x9502,0x9506, -0x9507,0x9509,0x950A,0x950D,0x950E,0x950F,0x9512,0x9513, -0x9514,0x9515,0x9516,0x9518,0x951B,0x951D,0x951E,0x951F, -0x9522,0x952A,0x952B,0x9529,0x952C,0x9531,0x9532,0x9534, -0x9536,0x9537,0x9538,0x953C,0x953E,0x953F,0x9542,0x9535, -0x9544,0x9545,0x9546,0x9549,0x954C,0x954E,0x954F,0x9552, -0x9553,0x9554,0x9556,0x9557,0x9558,0x9559,0x955B,0x955E, -0x955F,0x955D,0x9561,0x9562,0x9564,0x9565,0x9566,0x9567, -0x9568,0x9569,0x956A,0x956B,0x956C,0x956F,0x9571,0x9572, -0x9573,0x953A,0x77E7,0x77EC,0x96C9,0x79D5,0x79ED,0x79E3, -0x79EB,0x7A06,0x5D47,0x7A03,0x7A02,0x7A1E,0x7A14, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9908,0x9909,0x990A,0x990B,0x990C,0x990E,0x990F,0x9911, -0x9912,0x9913,0x9914,0x9915,0x9916,0x9917,0x9918,0x9919, -0x991A,0x991B,0x991C,0x991D,0x991E,0x991F,0x9920,0x9921, -0x9922,0x9923,0x9924,0x9925,0x9926,0x9927,0x9928,0x9929, -0x992A,0x992B,0x992C,0x992D,0x992F,0x9930,0x9931,0x9932, -0x9933,0x9934,0x9935,0x9936,0x9937,0x9938,0x9939,0x993A, -0x993B,0x993C,0x993D,0x993E,0x993F,0x9940,0x9941,0x9942, -0x9943,0x9944,0x9945,0x9946,0x9947,0x9948,0x9949, 0, -0x994A,0x994B,0x994C,0x994D,0x994E,0x994F,0x9950,0x9951, -0x9952,0x9953,0x9956,0x9957,0x9958,0x9959,0x995A,0x995B, -0x995C,0x995D,0x995E,0x995F,0x9960,0x9961,0x9962,0x9964, -0x9966,0x9973,0x9978,0x9979,0x997B,0x997E,0x9982,0x9983, -0x9989,0x7A39,0x7A37,0x7A51,0x9ECF,0x99A5,0x7A70,0x7688, -0x768E,0x7693,0x7699,0x76A4,0x74DE,0x74E0,0x752C,0x9E20, -0x9E22,0x9E28,0x9E29,0x9E2A,0x9E2B,0x9E2C,0x9E32,0x9E31, -0x9E36,0x9E38,0x9E37,0x9E39,0x9E3A,0x9E3E,0x9E41,0x9E42, -0x9E44,0x9E46,0x9E47,0x9E48,0x9E49,0x9E4B,0x9E4C,0x9E4E, -0x9E51,0x9E55,0x9E57,0x9E5A,0x9E5B,0x9E5C,0x9E5E,0x9E63, -0x9E66,0x9E67,0x9E68,0x9E69,0x9E6A,0x9E6B,0x9E6C,0x9E71, -0x9E6D,0x9E73,0x7592,0x7594,0x7596,0x75A0,0x759D,0x75AC, -0x75A3,0x75B3,0x75B4,0x75B8,0x75C4,0x75B1,0x75B0,0x75C3, -0x75C2,0x75D6,0x75CD,0x75E3,0x75E8,0x75E6,0x75E4,0x75EB, -0x75E7,0x7603,0x75F1,0x75FC,0x75FF,0x7610,0x7600,0x7605, -0x760C,0x7617,0x760A,0x7625,0x7618,0x7615,0x7619, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x998C,0x998E,0x999A,0x999B,0x999C,0x999D,0x999E,0x999F, -0x99A0,0x99A1,0x99A2,0x99A3,0x99A4,0x99A6,0x99A7,0x99A9, -0x99AA,0x99AB,0x99AC,0x99AD,0x99AE,0x99AF,0x99B0,0x99B1, -0x99B2,0x99B3,0x99B4,0x99B5,0x99B6,0x99B7,0x99B8,0x99B9, -0x99BA,0x99BB,0x99BC,0x99BD,0x99BE,0x99BF,0x99C0,0x99C1, -0x99C2,0x99C3,0x99C4,0x99C5,0x99C6,0x99C7,0x99C8,0x99C9, -0x99CA,0x99CB,0x99CC,0x99CD,0x99CE,0x99CF,0x99D0,0x99D1, -0x99D2,0x99D3,0x99D4,0x99D5,0x99D6,0x99D7,0x99D8, 0, -0x99D9,0x99DA,0x99DB,0x99DC,0x99DD,0x99DE,0x99DF,0x99E0, -0x99E1,0x99E2,0x99E3,0x99E4,0x99E5,0x99E6,0x99E7,0x99E8, -0x99E9,0x99EA,0x99EB,0x99EC,0x99ED,0x99EE,0x99EF,0x99F0, -0x99F1,0x99F2,0x99F3,0x99F4,0x99F5,0x99F6,0x99F7,0x99F8, -0x99F9,0x761B,0x763C,0x7622,0x7620,0x7640,0x762D,0x7630, -0x763F,0x7635,0x7643,0x763E,0x7633,0x764D,0x765E,0x7654, -0x765C,0x7656,0x766B,0x766F,0x7FCA,0x7AE6,0x7A78,0x7A79, -0x7A80,0x7A86,0x7A88,0x7A95,0x7AA6,0x7AA0,0x7AAC,0x7AA8, -0x7AAD,0x7AB3,0x8864,0x8869,0x8872,0x887D,0x887F,0x8882, -0x88A2,0x88C6,0x88B7,0x88BC,0x88C9,0x88E2,0x88CE,0x88E3, -0x88E5,0x88F1,0x891A,0x88FC,0x88E8,0x88FE,0x88F0,0x8921, -0x8919,0x8913,0x891B,0x890A,0x8934,0x892B,0x8936,0x8941, -0x8966,0x897B,0x758B,0x80E5,0x76B2,0x76B4,0x77DC,0x8012, -0x8014,0x8016,0x801C,0x8020,0x8022,0x8025,0x8026,0x8027, -0x8029,0x8028,0x8031,0x800B,0x8035,0x8043,0x8046,0x804D, -0x8052,0x8069,0x8071,0x8983,0x9878,0x9880,0x9883, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x99FA,0x99FB,0x99FC,0x99FD,0x99FE,0x99FF,0x9A00,0x9A01, -0x9A02,0x9A03,0x9A04,0x9A05,0x9A06,0x9A07,0x9A08,0x9A09, -0x9A0A,0x9A0B,0x9A0C,0x9A0D,0x9A0E,0x9A0F,0x9A10,0x9A11, -0x9A12,0x9A13,0x9A14,0x9A15,0x9A16,0x9A17,0x9A18,0x9A19, -0x9A1A,0x9A1B,0x9A1C,0x9A1D,0x9A1E,0x9A1F,0x9A20,0x9A21, -0x9A22,0x9A23,0x9A24,0x9A25,0x9A26,0x9A27,0x9A28,0x9A29, -0x9A2A,0x9A2B,0x9A2C,0x9A2D,0x9A2E,0x9A2F,0x9A30,0x9A31, -0x9A32,0x9A33,0x9A34,0x9A35,0x9A36,0x9A37,0x9A38, 0, -0x9A39,0x9A3A,0x9A3B,0x9A3C,0x9A3D,0x9A3E,0x9A3F,0x9A40, -0x9A41,0x9A42,0x9A43,0x9A44,0x9A45,0x9A46,0x9A47,0x9A48, -0x9A49,0x9A4A,0x9A4B,0x9A4C,0x9A4D,0x9A4E,0x9A4F,0x9A50, -0x9A51,0x9A52,0x9A53,0x9A54,0x9A55,0x9A56,0x9A57,0x9A58, -0x9A59,0x9889,0x988C,0x988D,0x988F,0x9894,0x989A,0x989B, -0x989E,0x989F,0x98A1,0x98A2,0x98A5,0x98A6,0x864D,0x8654, -0x866C,0x866E,0x867F,0x867A,0x867C,0x867B,0x86A8,0x868D, -0x868B,0x86AC,0x869D,0x86A7,0x86A3,0x86AA,0x8693,0x86A9, -0x86B6,0x86C4,0x86B5,0x86CE,0x86B0,0x86BA,0x86B1,0x86AF, -0x86C9,0x86CF,0x86B4,0x86E9,0x86F1,0x86F2,0x86ED,0x86F3, -0x86D0,0x8713,0x86DE,0x86F4,0x86DF,0x86D8,0x86D1,0x8703, -0x8707,0x86F8,0x8708,0x870A,0x870D,0x8709,0x8723,0x873B, -0x871E,0x8725,0x872E,0x871A,0x873E,0x8748,0x8734,0x8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0x87AB, -0x87E5,0x87AC,0x87B5,0x87B3,0x87CB,0x87D3,0x87BD,0x87D1, -0x87C0,0x87CA,0x87DB,0x87EA,0x87E0,0x87EE,0x8816,0x8813, -0x87FE,0x880A,0x881B,0x8821,0x8839,0x883C,0x7F36,0x7F42, -0x7F44,0x7F45,0x8210,0x7AFA,0x7AFD,0x7B08,0x7B03,0x7B04, -0x7B15,0x7B0A,0x7B2B,0x7B0F,0x7B47,0x7B38,0x7B2A,0x7B19, -0x7B2E,0x7B31,0x7B20,0x7B25,0x7B24,0x7B33,0x7B3E,0x7B1E, -0x7B58,0x7B5A,0x7B45,0x7B75,0x7B4C,0x7B5D,0x7B60,0x7B6E, -0x7B7B,0x7B62,0x7B72,0x7B71,0x7B90,0x7BA6,0x7BA7,0x7BB8, -0x7BAC,0x7B9D,0x7BA8,0x7B85,0x7BAA,0x7B9C,0x7BA2,0x7BAB, -0x7BB4,0x7BD1,0x7BC1,0x7BCC,0x7BDD,0x7BDA,0x7BE5,0x7BE6, -0x7BEA,0x7C0C,0x7BFE,0x7BFC,0x7C0F,0x7C16,0x7C0B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9B07,0x9B09,0x9B0A,0x9B0B,0x9B0C,0x9B0D,0x9B0E,0x9B10, -0x9B11,0x9B12,0x9B14,0x9B15,0x9B16,0x9B17,0x9B18,0x9B19, -0x9B1A,0x9B1B,0x9B1C,0x9B1D,0x9B1E,0x9B20,0x9B21,0x9B22, -0x9B24,0x9B25,0x9B26,0x9B27,0x9B28,0x9B29,0x9B2A,0x9B2B, -0x9B2C,0x9B2D,0x9B2E,0x9B30,0x9B31,0x9B33,0x9B34,0x9B35, -0x9B36,0x9B37,0x9B38,0x9B39,0x9B3A,0x9B3D,0x9B3E,0x9B3F, -0x9B40,0x9B46,0x9B4A,0x9B4B,0x9B4C,0x9B4E,0x9B50,0x9B52, -0x9B53,0x9B55,0x9B56,0x9B57,0x9B58,0x9B59,0x9B5A, 0, -0x9B5B,0x9B5C,0x9B5D,0x9B5E,0x9B5F,0x9B60,0x9B61,0x9B62, -0x9B63,0x9B64,0x9B65,0x9B66,0x9B67,0x9B68,0x9B69,0x9B6A, -0x9B6B,0x9B6C,0x9B6D,0x9B6E,0x9B6F,0x9B70,0x9B71,0x9B72, -0x9B73,0x9B74,0x9B75,0x9B76,0x9B77,0x9B78,0x9B79,0x9B7A, -0x9B7B,0x7C1F,0x7C2A,0x7C26,0x7C38,0x7C41,0x7C40,0x81FE, -0x8201,0x8202,0x8204,0x81EC,0x8844,0x8221,0x8222,0x8223, -0x822D,0x822F,0x8228,0x822B,0x8238,0x823B,0x8233,0x8234, -0x823E,0x8244,0x8249,0x824B,0x824F,0x825A,0x825F,0x8268, -0x887E,0x8885,0x8888,0x88D8,0x88DF,0x895E,0x7F9D,0x7F9F, -0x7FA7,0x7FAF,0x7FB0,0x7FB2,0x7C7C,0x6549,0x7C91,0x7C9D, -0x7C9C,0x7C9E,0x7CA2,0x7CB2,0x7CBC,0x7CBD,0x7CC1,0x7CC7, -0x7CCC,0x7CCD,0x7CC8,0x7CC5,0x7CD7,0x7CE8,0x826E,0x66A8, -0x7FBF,0x7FCE,0x7FD5,0x7FE5,0x7FE1,0x7FE6,0x7FE9,0x7FEE, -0x7FF3,0x7CF8,0x7D77,0x7DA6,0x7DAE,0x7E47,0x7E9B,0x9EB8, -0x9EB4,0x8D73,0x8D84,0x8D94,0x8D91,0x8DB1,0x8D67,0x8D6D, -0x8C47,0x8C49,0x914A,0x9150,0x914E,0x914F,0x9164, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0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C1C,0x9C1D,0x9C1E,0x9C1F,0x9C20,0x9C21,0x9C22, -0x9C23,0x9C24,0x9C25,0x9C26,0x9C27,0x9C28,0x9C29,0x9C2A, -0x9C2B,0x9C2C,0x9C2D,0x9C2E,0x9C2F,0x9C30,0x9C31,0x9C32, -0x9C33,0x9C34,0x9C35,0x9C36,0x9C37,0x9C38,0x9C39,0x9C3A, -0x9C3B,0x89E5,0x89EB,0x89EF,0x8A3E,0x8B26,0x9753,0x96E9, -0x96F3,0x96EF,0x9706,0x9701,0x9708,0x970F,0x970E,0x972A, -0x972D,0x9730,0x973E,0x9F80,0x9F83,0x9F85,0x9F86,0x9F87, -0x9F88,0x9F89,0x9F8A,0x9F8C,0x9EFE,0x9F0B,0x9F0D,0x96B9, -0x96BC,0x96BD,0x96CE,0x96D2,0x77BF,0x96E0,0x928E,0x92AE, -0x92C8,0x933E,0x936A,0x93CA,0x938F,0x943E,0x946B,0x9C7F, -0x9C82,0x9C85,0x9C86,0x9C87,0x9C88,0x7A23,0x9C8B,0x9C8E, -0x9C90,0x9C91,0x9C92,0x9C94,0x9C95,0x9C9A,0x9C9B,0x9C9E, -0x9C9F,0x9CA0,0x9CA1,0x9CA2,0x9CA3,0x9CA5,0x9CA6,0x9CA7, -0x9CA8,0x9CA9,0x9CAB,0x9CAD,0x9CAE,0x9CB0,0x9CB1,0x9CB2, -0x9CB3,0x9CB4,0x9CB5,0x9CB6,0x9CB7,0x9CBA,0x9CBB,0x9CBC, -0x9CBD,0x9CC4,0x9CC5,0x9CC6,0x9CC7,0x9CCA,0x9CCB, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9C3C,0x9C3D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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, -0xFA0C,0xFA0D,0xFA0E,0xFA0F,0xFA11,0xFA13,0xFA14,0xFA18, -0xFA1F,0xFA20,0xFA21,0xFA23,0xFA24,0xFA27,0xFA28,0xFA29 -}; - -static int func_gbk_uni_onechar(int code){ - if ((code>=0x8140)&&(code<=0xFE4F)) - return(tab_gbk_uni0[code-0x8140]); - return(0); -} - - - -/* page 0 0x00A4-0x0451 */ -static uint16 tab_uni_gbk0[]={ -0xA1E8, 0, 0,0xA1EC,0xA1A7, 0, 0, 0, - 0, 0, 0, 0,0xA1E3,0xA1C0, 0, 0, - 0, 0, 0,0xA1A4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xA1C1, 0, 0, 0, 0, - 0, 0, 0, 0,0xA8A4,0xA8A2, 0, 0, - 0, 0, 0, 0,0xA8A8,0xA8A6,0xA8BA, 0, -0xA8AC,0xA8AA, 0, 0, 0, 0,0xA8B0,0xA8AE, - 0, 0, 0,0xA1C2, 0,0xA8B4,0xA8B2, 0, -0xA8B9, 0, 0, 0, 0,0xA8A1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xA8A5, - 0, 0, 0, 0, 0, 0, 0,0xA8A7, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xA8A9, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xA8BD, 0, 0, 0,0xA8BE, 0, 0, 0, - 0,0xA8AD, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, - 0,0xA878,0xA879,0xA87A,0xA87B,0xA87C,0xA87D,0xA87E, -0xA880,0xA881,0xA882,0xA883,0xA884,0xA885,0xA886,0xA887, - 0, 0, 0,0xA888,0xA889,0xA88A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xA1F6,0xA1F5, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xA1F8,0xA1F7, 0, 0, 0, 0, - 0, 0, 0, 0,0xA88B,0xA88C, 0, 0, - 0, 0, 0, 0, 0, 0,0xA1F4,0xA1F3, - 0, 0, 0,0xA1F0, 0, 0,0xA1F2,0xA1F1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0xA88D,0xA88E,0xA88F,0xA890, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xA1EF,0xA1EE, 0, - 0,0xA891, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xA1E2, 0,0xA1E1}; - -/* page 3 0x3000-0x3129 */ -static uint16 tab_uni_gbk3[]={ -0xA1A1,0xA1A2,0xA1A3,0xA1A8, 0,0xA1A9,0xA965,0xA996, -0xA1B4,0xA1B5,0xA1B6,0xA1B7,0xA1B8,0xA1B9,0xA1BA,0xA1BB, -0xA1BE,0xA1BF,0xA893,0xA1FE,0xA1B2,0xA1B3,0xA1BC,0xA1BD, - 0, 0, 0, 0, 0,0xA894,0xA895, 0, - 0,0xA940,0xA941,0xA942,0xA943,0xA944,0xA945,0xA946, -0xA947,0xA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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,0xA949}; - -/* page 5 0x338E-0x33D5 */ -static uint16 tab_uni_gbk5[]={ -0xA94A,0xA94B, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xA94C,0xA94D, -0xA94E, 0, 0,0xA94F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xA950, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xA951, 0, 0,0xA952,0xA953, 0, 0,0xA954 -}; - -/* page 6 0x4E00-0x9FA5 */ -static uint16 tab_uni_gbk6[]={ -0xD2BB,0xB6A1,0x8140,0xC6DF,0x8141,0x8142,0x8143,0xCDF2, -0xD5C9,0xC8FD,0xC9CF,0xCFC2,0xD8A2,0xB2BB,0xD3EB,0x8144, -0xD8A4,0xB3F3,0x8145,0xD7A8,0xC7D2,0xD8A7,0xCAC0,0x8146, -0xC7F0,0xB1FB,0xD2B5,0xB4D4,0xB6AB,0xCBBF,0xD8A9,0x8147, -0x8148,0x8149,0xB6AA,0x814A,0xC1BD,0xD1CF,0x814B,0xC9A5, -0xD8AD,0x814C,0xB8F6,0xD1BE,0xE3DC,0xD6D0,0x814D,0x814E, -0xB7E1,0x814F,0xB4AE,0x8150,0xC1D9,0x8151,0xD8BC,0x8152, -0xCDE8,0xB5A4,0xCEAA,0xD6F7,0x8153,0xC0F6,0xBED9,0xD8AF, -0x8154,0x8155,0x8156,0xC4CB,0x8157,0xBEC3,0x8158,0xD8B1, -0xC3B4,0xD2E5,0x8159,0xD6AE,0xCEDA,0xD5A7,0xBAF5,0xB7A6, -0xC0D6,0x815A,0xC6B9,0xC5D2,0xC7C7,0x815B,0xB9D4,0x815C, -0xB3CB,0xD2D2,0x815D,0x815E,0xD8BF,0xBEC5,0xC6F2,0xD2B2, -0xCFB0,0xCFE7,0x815F,0x8160,0x8161,0x8162,0xCAE9,0x8163, -0x8164,0xD8C0,0x8165,0x8166,0x8167,0x8168,0x8169,0x816A, -0xC2F2,0xC2D2,0x816B,0xC8E9,0x816C,0x816D,0x816E,0x816F, -0x8170,0x8171,0x8172,0x8173,0x8174,0x8175,0xC7AC,0x8176, -0x8177,0x8178,0x8179,0x817A,0x817B,0x817C,0xC1CB,0x817D, -0xD3E8,0xD5F9,0x817E,0xCAC2,0xB6FE,0xD8A1,0xD3DA,0xBFF7, -0x8180,0xD4C6,0xBBA5,0xD8C1,0xCEE5,0xBEAE,0x8181,0x8182, -0xD8A8,0x8183,0xD1C7,0xD0A9,0x8184,0x8185,0x8186,0xD8BD, -0xD9EF,0xCDF6,0xBFBA,0x8187,0xBDBB,0xBAA5,0xD2E0,0xB2FA, -0xBAE0,0xC4B6,0x8188,0xCFED,0xBEA9,0xCDA4,0xC1C1,0x8189, -0x818A,0x818B,0xC7D7,0xD9F1,0x818C,0xD9F4,0x818D,0x818E, -0x818F,0x8190,0xC8CB,0xD8E9,0x8191,0x8192,0x8193,0xD2DA, -0xCAB2,0xC8CA,0xD8EC,0xD8EA,0xD8C6,0xBDF6,0xC6CD,0xB3F0, -0x8194,0xD8EB,0xBDF1,0xBDE9,0x8195,0xC8D4,0xB4D3,0x8196, -0x8197,0xC2D8,0x8198,0xB2D6,0xD7D0,0xCACB,0xCBFB,0xD5CC, -0xB8B6,0xCFC9,0x8199,0x819A,0x819B,0xD9DA,0xD8F0,0xC7AA, -0x819C,0xD8EE,0x819D,0xB4FA,0xC1EE,0xD2D4,0x819E,0x819F, -0xD8ED,0x81A0,0xD2C7,0xD8EF,0xC3C7,0x81A1,0x81A2,0x81A3, -0xD1F6,0x81A4,0xD6D9,0xD8F2,0x81A5,0xD8F5,0xBCFE,0xBCDB, -0x81A6,0x81A7,0x81A8,0xC8CE,0x81A9,0xB7DD,0x81AA,0x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x81F9,0xB9A9,0x81FA,0xD2C0,0x81FB,0x81FC, -0xCFC0,0x81FD,0x81FE,0xC2C2,0x8240,0xBDC4,0xD5EC,0xB2E0, -0xC7C8,0xBFEB,0xD9AD,0x8241,0xD9AF,0x8242,0xCEEA,0xBAEE, -0x8243,0x8244,0x8245,0x8246,0x8247,0xC7D6,0x8248,0x8249, -0x824A,0x824B,0x824C,0x824D,0x824E,0x824F,0x8250,0xB1E3, -0x8251,0x8252,0x8253,0xB4D9,0xB6ED,0xD9B4,0x8254,0x8255, -0x8256,0x8257,0xBFA1,0x8258,0x8259,0x825A,0xD9DE,0xC7CE, -0xC0FE,0xD9B8,0x825B,0x825C,0x825D,0x825E,0x825F,0xCBD7, -0xB7FD,0x8260,0xD9B5,0x8261,0xD9B7,0xB1A3,0xD3E1,0xD9B9, -0x8262,0xD0C5,0x8263,0xD9B6,0x8264,0x8265,0xD9B1,0x8266, -0xD9B2,0xC1A9,0xD9B3,0x8267,0x8268,0xBCF3,0xD0DE,0xB8A9, -0x8269,0xBEE3,0x826A,0xD9BD,0x826B,0x826C,0x826D,0x826E, -0xD9BA,0x826F,0xB0B3,0x8270,0x8271,0x8272,0xD9C2,0x8273, -0x8274,0x8275,0x8276,0x8277,0x8278,0x8279,0x827A,0x827B, -0x827C,0x827D,0x827E,0x8280,0xD9C4,0xB1B6,0x8281,0xD9BF, -0x8282,0x8283,0xB5B9,0x8284,0xBEF3,0x8285,0x8286,0x8287, -0xCCC8,0xBAF2,0xD2D0,0x8288,0xD9C3,0x8289,0x828A,0xBDE8, -0x828B,0xB3AB,0x828C,0x828D,0x828E,0xD9C5,0xBEEB,0x828F, -0xD9C6,0xD9BB,0xC4DF,0x8290,0xD9BE,0xD9C1,0xD9C0,0x8291, -0x8292,0x8293,0x8294,0x8295,0x8296,0x8297,0x8298,0x8299, -0x829A,0x829B,0xD5AE,0x829C,0xD6B5,0x829D,0xC7E3,0x829E, -0x829F,0x82A0,0x82A1,0xD9C8,0x82A2,0x82A3,0x82A4,0xBCD9, -0xD9CA,0x82A5,0x82A6,0x82A7,0xD9BC,0x82A8,0xD9CB,0xC6AB, -0x82A9,0x82AA,0x82AB,0x82AC,0x82AD,0xD9C9,0x82AE,0x82AF, -0x82B0,0x82B1,0xD7F6,0x82B2,0xCDA3,0x82B3,0x82B4,0x82B5, -0x82B6,0x82B7,0x82B8,0x82B9,0x82BA,0xBDA1,0x82BB,0x82BC, -0x82BD,0x82BE,0x82BF,0x82C0,0xD9CC,0x82C1,0x82C2,0x82C3, -0x82C4,0x82C5,0x82C6,0x82C7,0x82C8,0x82C9,0xC5BC,0xCDB5, -0x82CA,0x82CB,0x82CC,0xD9CD,0x82CD,0x82CE,0xD9C7,0xB3A5, -0xBFFE,0x82CF,0x82D0,0x82D1,0x82D2,0xB8B5,0x82D3,0x82D4, -0xC0FC,0x82D5,0x82D6,0x82D7,0x82D8,0xB0F8,0x82D9,0x82DA, -0x82DB,0x82DC,0x82DD,0x82DE,0x82DF,0x82E0,0x82E1,0x82E2, -0x82E3,0x82E4,0x82E5,0x82E6,0x82E7,0x82E8,0x82E9,0x82EA, -0x82EB,0x82EC,0x82ED,0xB4F6,0x82EE,0xD9CE,0x82EF,0xD9CF, -0xB4A2,0xD9D0,0x82F0,0x82F1,0xB4DF,0x82F2,0x82F3,0x82F4, -0x82F5,0x82F6,0xB0C1,0x82F7,0x82F8,0x82F9,0x82FA,0x82FB, -0x82FC,0x82FD,0xD9D1,0xC9B5,0x82FE,0x8340,0x8341,0x8342, -0x8343,0x8344,0x8345,0x8346,0x8347,0x8348,0x8349,0x834A, -0x834B,0x834C,0x834D,0x834E,0x834F,0x8350,0x8351,0xCFF1, -0x8352,0x8353,0x8354,0x8355,0x8356,0x8357,0xD9D2,0x8358, -0x8359,0x835A,0xC1C5,0x835B,0x835C,0x835D,0x835E,0x835F, -0x8360,0x8361,0x8362,0x8363,0x8364,0x8365,0xD9D6,0xC9AE, -0x8366,0x8367,0x8368,0x8369,0xD9D5,0xD9D4,0xD9D7,0x836A, -0x836B,0x836C,0x836D,0xCBDB,0x836E,0xBDA9,0x836F,0x8370, -0x8371,0x8372,0x8373,0xC6A7,0x8374,0x8375,0x8376,0x8377, -0x8378,0x8379,0x837A,0x837B,0x837C,0x837D,0xD9D3,0xD9D8, -0x837E,0x8380,0x8381,0xD9D9,0x8382,0x8383,0x8384,0x8385, -0x8386,0x8387,0xC8E5,0x8388,0x8389,0x838A,0x838B,0x838C, -0x838D,0x838E,0x838F,0x8390,0x8391,0x8392,0x8393,0x8394, -0x8395,0xC0DC,0x8396,0x8397,0x8398,0x8399,0x839A,0x839B, -0x839C,0x839D,0x839E,0x839F,0x83A0,0x83A1,0x83A2,0x83A3, -0x83A4,0x83A5,0x83A6,0x83A7,0x83A8,0x83A9,0x83AA,0x83AB, -0x83AC,0x83AD,0x83AE,0x83AF,0x83B0,0x83B1,0x83B2,0xB6F9, -0xD8A3,0xD4CA,0x83B3,0xD4AA,0xD0D6,0xB3E4,0xD5D7,0x83B4, -0xCFC8,0xB9E2,0x83B5,0xBFCB,0x83B6,0xC3E2,0x83B7,0x83B8, -0x83B9,0xB6D2,0x83BA,0x83BB,0xCDC3,0xD9EE,0xD9F0,0x83BC, -0x83BD,0x83BE,0xB5B3,0x83BF,0xB6B5,0x83C0,0x83C1,0x83C2, -0x83C3,0x83C4,0xBEA4,0x83C5,0x83C6,0xC8EB,0x83C7,0x83C8, -0xC8AB,0x83C9,0x83CA,0xB0CB,0xB9AB,0xC1F9,0xD9E2,0x83CB, -0xC0BC,0xB9B2,0x83CC,0xB9D8,0xD0CB,0xB1F8,0xC6E4,0xBEDF, -0xB5E4,0xD7C8,0x83CD,0xD1F8,0xBCE6,0xCADE,0x83CE,0x83CF, -0xBCBD,0xD9E6,0xD8E7,0x83D0,0x83D1,0xC4DA,0x83D2,0x83D3, -0xB8D4,0xC8BD,0x83D4,0x83D5,0xB2E1,0xD4D9,0x83D6,0x83D7, -0x83D8,0x83D9,0xC3B0,0x83DA,0x83DB,0xC3E1,0xDAA2,0xC8DF, -0x83DC,0xD0B4,0x83DD,0xBEFC,0xC5A9,0x83DE,0x83DF,0x83E0, -0xB9DA,0x83E1,0xDAA3,0x83E2,0xD4A9,0xDAA4,0x83E3,0x83E4, -0x83E5,0x83E6,0x83E7,0xD9FB,0xB6AC,0x83E8,0x83E9,0xB7EB, -0xB1F9,0xD9FC,0xB3E5,0xBEF6,0x83EA,0xBFF6,0xD2B1,0xC0E4, -0x83EB,0x83EC,0x83ED,0xB6B3,0xD9FE,0xD9FD,0x83EE,0x83EF, -0xBEBB,0x83F0,0x83F1,0x83F2,0xC6E0,0x83F3,0xD7BC,0xDAA1, -0x83F4,0xC1B9,0x83F5,0xB5F2,0xC1E8,0x83F6,0x83F7,0xBCF5, -0x83F8,0xB4D5,0x83F9,0x83FA,0x83FB,0x83FC,0x83FD,0x83FE, -0x8440,0x8441,0x8442,0xC1DD,0x8443,0xC4FD,0x8444,0x8445, -0xBCB8,0xB7B2,0x8446,0x8447,0xB7EF,0x8448,0x8449,0x844A, -0x844B,0x844C,0x844D,0xD9EC,0x844E,0xC6BE,0x844F,0xBFAD, -0xBBCB,0x8450,0x8451,0xB5CA,0x8452,0xDBC9,0xD0D7,0x8453, -0xCDB9,0xB0BC,0xB3F6,0xBBF7,0xDBCA,0xBAAF,0x8454,0xD4E4, -0xB5B6,0xB5F3,0xD8D6,0xC8D0,0x8455,0x8456,0xB7D6,0xC7D0, -0xD8D7,0x8457,0xBFAF,0x8458,0x8459,0xDBBB,0xD8D8,0x845A, -0x845B,0xD0CC,0xBBAE,0x845C,0x845D,0x845E,0xEBBE,0xC1D0, -0xC1F5,0xD4F2,0xB8D5,0xB4B4,0x845F,0xB3F5,0x8460,0x8461, -0xC9BE,0x8462,0x8463,0x8464,0xC5D0,0x8465,0x8466,0x8467, -0xC5D9,0xC0FB,0x8468,0xB1F0,0x8469,0xD8D9,0xB9CE,0x846A, -0xB5BD,0x846B,0x846C,0xD8DA,0x846D,0x846E,0xD6C6,0xCBA2, -0xC8AF,0xC9B2,0xB4CC,0xBFCC,0x846F,0xB9F4,0x8470,0xD8DB, -0xD8DC,0xB6E7,0xBCC1,0xCCEA,0x8471,0x8472,0x8473,0x8474, -0x8475,0x8476,0xCFF7,0x8477,0xD8DD,0xC7B0,0x8478,0x8479, -0xB9D0,0xBDA3,0x847A,0x847B,0xCCDE,0x847C,0xC6CA,0x847D, -0x847E,0x8480,0x8481,0x8482,0xD8E0,0x8483,0xD8DE,0x8484, -0x8485,0xD8DF,0x8486,0x8487,0x8488,0xB0FE,0x8489,0xBEE7, -0x848A,0xCAA3,0xBCF4,0x848B,0x848C,0x848D,0x848E,0xB8B1, -0x848F,0x8490,0xB8EE,0x8491,0x8492,0x8493,0x8494,0x8495, -0x8496,0x8497,0x8498,0x8499,0x849A,0xD8E2,0x849B,0xBDCB, -0x849C,0xD8E4,0xD8E3,0x849D,0x849E,0x849F,0x84A0,0x84A1, -0xC5FC,0x84A2,0x84A3,0x84A4,0x84A5,0x84A6,0x84A7,0x84A8, -0xD8E5,0x84A9,0x84AA,0xD8E6,0x84AB,0x84AC,0x84AD,0x84AE, -0x84AF,0x84B0,0x84B1,0xC1A6,0x84B2,0xC8B0,0xB0EC,0xB9A6, -0xBCD3,0xCEF1,0xDBBD,0xC1D3,0x84B3,0x84B4,0x84B5,0x84B6, -0xB6AF,0xD6FA,0xC5AC,0xBDD9,0xDBBE,0xDBBF,0x84B7,0x84B8, -0x84B9,0xC0F8,0xBEA2,0xC0CD,0x84BA,0x84BB,0x84BC,0x84BD, -0x84BE,0x84BF,0x84C0,0x84C1,0x84C2,0x84C3,0xDBC0,0xCAC6, -0x84C4,0x84C5,0x84C6,0xB2AA,0x84C7,0x84C8,0x84C9,0xD3C2, -0x84CA,0xC3E3,0x84CB,0xD1AB,0x84CC,0x84CD,0x84CE,0x84CF, -0xDBC2,0x84D0,0xC0D5,0x84D1,0x84D2,0x84D3,0xDBC3,0x84D4, -0xBFB1,0x84D5,0x84D6,0x84D7,0x84D8,0x84D9,0x84DA,0xC4BC, -0x84DB,0x84DC,0x84DD,0x84DE,0xC7DA,0x84DF,0x84E0,0x84E1, -0x84E2,0x84E3,0x84E4,0x84E5,0x84E6,0x84E7,0x84E8,0x84E9, -0xDBC4,0x84EA,0x84EB,0x84EC,0x84ED,0x84EE,0x84EF,0x84F0, -0x84F1,0xD9E8,0xC9D7,0x84F2,0x84F3,0x84F4,0xB9B4,0xCEF0, -0xD4C8,0x84F5,0x84F6,0x84F7,0x84F8,0xB0FC,0xB4D2,0x84F9, -0xD0D9,0x84FA,0x84FB,0x84FC,0x84FD,0xD9E9,0x84FE,0xDECB, -0xD9EB,0x8540,0x8541,0x8542,0x8543,0xD8B0,0xBBAF,0xB1B1, -0x8544,0xB3D7,0xD8CE,0x8545,0x8546,0xD4D1,0x8547,0x8548, -0xBDB3,0xBFEF,0x8549,0xCFBB,0x854A,0x854B,0xD8D0,0x854C, -0x854D,0x854E,0xB7CB,0x854F,0x8550,0x8551,0xD8D1,0x8552, -0x8553,0x8554,0x8555,0x8556,0x8557,0x8558,0x8559,0x855A, -0x855B,0xC6A5,0xC7F8,0xD2BD,0x855C,0x855D,0xD8D2,0xC4E4, -0x855E,0xCAAE,0x855F,0xC7A7,0x8560,0xD8A6,0x8561,0xC9FD, -0xCEE7,0xBBDC,0xB0EB,0x8562,0x8563,0x8564,0xBBAA,0xD0AD, -0x8565,0xB1B0,0xD7E4,0xD7BF,0x8566,0xB5A5,0xC2F4,0xC4CF, -0x8567,0x8568,0xB2A9,0x8569,0xB2B7,0x856A,0xB1E5,0xDFB2, -0xD5BC,0xBFA8,0xC2AC,0xD8D5,0xC2B1,0x856B,0xD8D4,0xCED4, -0x856C,0xDAE0,0x856D,0xCEC0,0x856E,0x856F,0xD8B4,0xC3AE, -0xD3A1,0xCEA3,0x8570,0xBCB4,0xC8B4,0xC2D1,0x8571,0xBEED, -0xD0B6,0x8572,0xDAE1,0x8573,0x8574,0x8575,0x8576,0xC7E4, -0x8577,0x8578,0xB3A7,0x8579,0xB6F2,0xCCFC,0xC0FA,0x857A, -0x857B,0xC0F7,0x857C,0xD1B9,0xD1E1,0xD8C7,0x857D,0x857E, -0x8580,0x8581,0x8582,0x8583,0x8584,0xB2DE,0x8585,0x8586, -0xC0E5,0x8587,0xBAF1,0x8588,0x8589,0xD8C8,0x858A,0xD4AD, -0x858B,0x858C,0xCFE1,0xD8C9,0x858D,0xD8CA,0xCFC3,0x858E, -0xB3F8,0xBEC7,0x858F,0x8590,0x8591,0x8592,0xD8CB,0x8593, -0x8594,0x8595,0x8596,0x8597,0x8598,0x8599,0xDBCC,0x859A, -0x859B,0x859C,0x859D,0xC8A5,0x859E,0x859F,0x85A0,0xCFD8, -0x85A1,0xC8FE,0xB2CE,0x85A2,0x85A3,0x85A4,0x85A5,0x85A6, -0xD3D6,0xB2E6,0xBCB0,0xD3D1,0xCBAB,0xB7B4,0x85A7,0x85A8, -0x85A9,0xB7A2,0x85AA,0x85AB,0xCAE5,0x85AC,0xC8A1,0xCADC, -0xB1E4,0xD0F0,0x85AD,0xC5D1,0x85AE,0x85AF,0x85B0,0xDBC5, -0xB5FE,0x85B1,0x85B2,0xBFDA,0xB9C5,0xBEE4,0xC1ED,0x85B3, -0xDFB6,0xDFB5,0xD6BB,0xBDD0,0xD5D9,0xB0C8,0xB6A3,0xBFC9, -0xCCA8,0xDFB3,0xCAB7,0xD3D2,0x85B4,0xD8CF,0xD2B6,0xBAC5, -0xCBBE,0xCCBE,0x85B5,0xDFB7,0xB5F0,0xDFB4,0x85B6,0x85B7, -0x85B8,0xD3F5,0x85B9,0xB3D4,0xB8F7,0x85BA,0xDFBA,0x85BB, -0xBACF,0xBCAA,0xB5F5,0x85BC,0xCDAC,0xC3FB,0xBAF3,0xC0F4, -0xCDC2,0xCFF2,0xDFB8,0xCFC5,0x85BD,0xC2C0,0xDFB9,0xC2F0, -0x85BE,0x85BF,0x85C0,0xBEFD,0x85C1,0xC1DF,0xCDCC,0xD2F7, -0xB7CD,0xDFC1,0x85C2,0xDFC4,0x85C3,0x85C4,0xB7F1,0xB0C9, -0xB6D6,0xB7D4,0x85C5,0xBAAC,0xCCFD,0xBFD4,0xCBB1,0xC6F4, -0x85C6,0xD6A8,0xDFC5,0x85C7,0xCEE2,0xB3B3,0x85C8,0x85C9, -0xCEFC,0xB4B5,0x85CA,0xCEC7,0xBAF0,0x85CB,0xCEE1,0x85CC, -0xD1BD,0x85CD,0x85CE,0xDFC0,0x85CF,0x85D0,0xB4F4,0x85D1, -0xB3CA,0x85D2,0xB8E6,0xDFBB,0x85D3,0x85D4,0x85D5,0x85D6, -0xC4C5,0x85D7,0xDFBC,0xDFBD,0xDFBE,0xC5BB,0xDFBF,0xDFC2, -0xD4B1,0xDFC3,0x85D8,0xC7BA,0xCED8,0x85D9,0x85DA,0x85DB, -0x85DC,0x85DD,0xC4D8,0x85DE,0xDFCA,0x85DF,0xDFCF,0x85E0, -0xD6DC,0x85E1,0x85E2,0x85E3,0x85E4,0x85E5,0x85E6,0x85E7, -0x85E8,0xDFC9,0xDFDA,0xCEB6,0x85E9,0xBAC7,0xDFCE,0xDFC8, -0xC5DE,0x85EA,0x85EB,0xC9EB,0xBAF4,0xC3FC,0x85EC,0x85ED, -0xBED7,0x85EE,0xDFC6,0x85EF,0xDFCD,0x85F0,0xC5D8,0x85F1, -0x85F2,0x85F3,0x85F4,0xD5A6,0xBACD,0x85F5,0xBECC,0xD3BD, -0xB8C0,0x85F6,0xD6E4,0x85F7,0xDFC7,0xB9BE,0xBFA7,0x85F8, -0x85F9,0xC1FC,0xDFCB,0xDFCC,0x85FA,0xDFD0,0x85FB,0x85FC, -0x85FD,0x85FE,0x8640,0xDFDB,0xDFE5,0x8641,0xDFD7,0xDFD6, -0xD7C9,0xDFE3,0xDFE4,0xE5EB,0xD2A7,0xDFD2,0x8642,0xBFA9, -0x8643,0xD4DB,0x8644,0xBFC8,0xDFD4,0x8645,0x8646,0x8647, -0xCFCC,0x8648,0x8649,0xDFDD,0x864A,0xD1CA,0x864B,0xDFDE, -0xB0A7,0xC6B7,0xDFD3,0x864C,0xBAE5,0x864D,0xB6DF,0xCDDB, -0xB9FE,0xD4D5,0x864E,0x864F,0xDFDF,0xCFEC,0xB0A5,0xDFE7, -0xDFD1,0xD1C6,0xDFD5,0xDFD8,0xDFD9,0xDFDC,0x8650,0xBBA9, -0x8651,0xDFE0,0xDFE1,0x8652,0xDFE2,0xDFE6,0xDFE8,0xD3B4, -0x8653,0x8654,0x8655,0x8656,0x8657,0xB8E7,0xC5B6,0xDFEA, -0xC9DA,0xC1A8,0xC4C4,0x8658,0x8659,0xBFDE,0xCFF8,0x865A, -0x865B,0x865C,0xD5DC,0xDFEE,0x865D,0x865E,0x865F,0x8660, -0x8661,0x8662,0xB2B8,0x8663,0xBADF,0xDFEC,0x8664,0xDBC1, -0x8665,0xD1E4,0x8666,0x8667,0x8668,0x8669,0xCBF4,0xB4BD, -0x866A,0xB0A6,0x866B,0x866C,0x866D,0x866E,0x866F,0xDFF1, -0xCCC6,0xDFF2,0x8670,0x8671,0xDFED,0x8672,0x8673,0x8674, -0x8675,0x8676,0x8677,0xDFE9,0x8678,0x8679,0x867A,0x867B, -0xDFEB,0x867C,0xDFEF,0xDFF0,0xBBBD,0x867D,0x867E,0xDFF3, -0x8680,0x8681,0xDFF4,0x8682,0xBBA3,0x8683,0xCADB,0xCEA8, -0xE0A7,0xB3AA,0x8684,0xE0A6,0x8685,0x8686,0x8687,0xE0A1, -0x8688,0x8689,0x868A,0x868B,0xDFFE,0x868C,0xCDD9,0xDFFC, -0x868D,0xDFFA,0x868E,0xBFD0,0xD7C4,0x868F,0xC9CC,0x8690, -0x8691,0xDFF8,0xB0A1,0x8692,0x8693,0x8694,0x8695,0x8696, -0xDFFD,0x8697,0x8698,0x8699,0x869A,0xDFFB,0xE0A2,0x869B, -0x869C,0x869D,0x869E,0x869F,0xE0A8,0x86A0,0x86A1,0x86A2, -0x86A3,0xB7C8,0x86A4,0x86A5,0xC6A1,0xC9B6,0xC0B2,0xDFF5, -0x86A6,0x86A7,0xC5BE,0x86A8,0xD8C4,0xDFF9,0xC4F6,0x86A9, -0x86AA,0x86AB,0x86AC,0x86AD,0x86AE,0xE0A3,0xE0A4,0xE0A5, -0xD0A5,0x86AF,0x86B0,0xE0B4,0xCCE4,0x86B1,0xE0B1,0x86B2, -0xBFA6,0xE0AF,0xCEB9,0xE0AB,0xC9C6,0x86B3,0x86B4,0xC0AE, -0xE0AE,0xBAED,0xBAB0,0xE0A9,0x86B5,0x86B6,0x86B7,0xDFF6, -0x86B8,0xE0B3,0x86B9,0x86BA,0xE0B8,0x86BB,0x86BC,0x86BD, -0xB4AD,0xE0B9,0x86BE,0x86BF,0xCFB2,0xBAC8,0x86C0,0xE0B0, -0x86C1,0x86C2,0x86C3,0x86C4,0x86C5,0x86C6,0x86C7,0xD0FA, -0x86C8,0x86C9,0x86CA,0x86CB,0x86CC,0x86CD,0x86CE,0x86CF, -0x86D0,0xE0AC,0x86D1,0xD4FB,0x86D2,0xDFF7,0x86D3,0xC5E7, -0x86D4,0xE0AD,0x86D5,0xD3F7,0x86D6,0xE0B6,0xE0B7,0x86D7, -0x86D8,0x86D9,0x86DA,0x86DB,0xE0C4,0xD0E1,0x86DC,0x86DD, -0x86DE,0xE0BC,0x86DF,0x86E0,0xE0C9,0xE0CA,0x86E1,0x86E2, -0x86E3,0xE0BE,0xE0AA,0xC9A4,0xE0C1,0x86E4,0xE0B2,0x86E5, -0x86E6,0x86E7,0x86E8,0x86E9,0xCAC8,0xE0C3,0x86EA,0xE0B5, -0x86EB,0xCECB,0x86EC,0xCBC3,0xE0CD,0xE0C6,0xE0C2,0x86ED, -0xE0CB,0x86EE,0xE0BA,0xE0BF,0xE0C0,0x86EF,0x86F0,0xE0C5, -0x86F1,0x86F2,0xE0C7,0xE0C8,0x86F3,0xE0CC,0x86F4,0xE0BB, -0x86F5,0x86F6,0x86F7,0x86F8,0x86F9,0xCBD4,0xE0D5,0x86FA, -0xE0D6,0xE0D2,0x86FB,0x86FC,0x86FD,0x86FE,0x8740,0x8741, -0xE0D0,0xBCCE,0x8742,0x8743,0xE0D1,0x8744,0xB8C2,0xD8C5, -0x8745,0x8746,0x8747,0x8748,0x8749,0x874A,0x874B,0x874C, -0xD0EA,0x874D,0x874E,0xC2EF,0x874F,0x8750,0xE0CF,0xE0BD, -0x8751,0x8752,0x8753,0xE0D4,0xE0D3,0x8754,0x8755,0xE0D7, -0x8756,0x8757,0x8758,0x8759,0xE0DC,0xE0D8,0x875A,0x875B, -0x875C,0xD6F6,0xB3B0,0x875D,0xD7EC,0x875E,0xCBBB,0x875F, -0x8760,0xE0DA,0x8761,0xCEFB,0x8762,0x8763,0x8764,0xBAD9, -0x8765,0x8766,0x8767,0x8768,0x8769,0x876A,0x876B,0x876C, -0x876D,0x876E,0x876F,0x8770,0xE0E1,0xE0DD,0xD2AD,0x8771, -0x8772,0x8773,0x8774,0x8775,0xE0E2,0x8776,0x8777,0xE0DB, -0xE0D9,0xE0DF,0x8778,0x8779,0xE0E0,0x877A,0x877B,0x877C, -0x877D,0x877E,0xE0DE,0x8780,0xE0E4,0x8781,0x8782,0x8783, -0xC6F7,0xD8AC,0xD4EB,0xE0E6,0xCAC9,0x8784,0x8785,0x8786, -0x8787,0xE0E5,0x8788,0x8789,0x878A,0x878B,0xB8C1,0x878C, -0x878D,0x878E,0x878F,0xE0E7,0xE0E8,0x8790,0x8791,0x8792, -0x8793,0x8794,0x8795,0x8796,0x8797,0xE0E9,0xE0E3,0x8798, -0x8799,0x879A,0x879B,0x879C,0x879D,0x879E,0xBABF,0xCCE7, -0x879F,0x87A0,0x87A1,0xE0EA,0x87A2,0x87A3,0x87A4,0x87A5, -0x87A6,0x87A7,0x87A8,0x87A9,0x87AA,0x87AB,0x87AC,0x87AD, -0x87AE,0x87AF,0x87B0,0xCFF9,0x87B1,0x87B2,0x87B3,0x87B4, -0x87B5,0x87B6,0x87B7,0x87B8,0x87B9,0x87BA,0x87BB,0xE0EB, -0x87BC,0x87BD,0x87BE,0x87BF,0x87C0,0x87C1,0x87C2,0xC8C2, -0x87C3,0x87C4,0x87C5,0x87C6,0xBDC0,0x87C7,0x87C8,0x87C9, -0x87CA,0x87CB,0x87CC,0x87CD,0x87CE,0x87CF,0x87D0,0x87D1, -0x87D2,0x87D3,0xC4D2,0x87D4,0x87D5,0x87D6,0x87D7,0x87D8, -0x87D9,0x87DA,0x87DB,0x87DC,0xE0EC,0x87DD,0x87DE,0xE0ED, -0x87DF,0x87E0,0xC7F4,0xCBC4,0x87E1,0xE0EE,0xBBD8,0xD8B6, -0xD2F2,0xE0EF,0xCDC5,0x87E2,0xB6DA,0x87E3,0x87E4,0x87E5, -0x87E6,0x87E7,0x87E8,0xE0F1,0x87E9,0xD4B0,0x87EA,0x87EB, -0xC0A7,0xB4D1,0x87EC,0x87ED,0xCEA7,0xE0F0,0x87EE,0x87EF, -0x87F0,0xE0F2,0xB9CC,0x87F1,0x87F2,0xB9FA,0xCDBC,0xE0F3, -0x87F3,0x87F4,0x87F5,0xC6D4,0xE0F4,0x87F6,0xD4B2,0x87F7, -0xC8A6,0xE0F6,0xE0F5,0x87F8,0x87F9,0x87FA,0x87FB,0x87FC, -0x87FD,0x87FE,0x8840,0x8841,0x8842,0x8843,0x8844,0x8845, -0x8846,0x8847,0x8848,0x8849,0xE0F7,0x884A,0x884B,0xCDC1, -0x884C,0x884D,0x884E,0xCAA5,0x884F,0x8850,0x8851,0x8852, -0xD4DA,0xDBD7,0xDBD9,0x8853,0xDBD8,0xB9E7,0xDBDC,0xDBDD, -0xB5D8,0x8854,0x8855,0xDBDA,0x8856,0x8857,0x8858,0x8859, -0x885A,0xDBDB,0xB3A1,0xDBDF,0x885B,0x885C,0xBBF8,0x885D, -0xD6B7,0x885E,0xDBE0,0x885F,0x8860,0x8861,0x8862,0xBEF9, -0x8863,0x8864,0xB7BB,0x8865,0xDBD0,0xCCAE,0xBFB2,0xBBB5, -0xD7F8,0xBFD3,0x8866,0x8867,0x8868,0x8869,0x886A,0xBFE9, -0x886B,0x886C,0xBCE1,0xCCB3,0xDBDE,0xB0D3,0xCEEB,0xB7D8, -0xD7B9,0xC6C2,0x886D,0x886E,0xC0A4,0x886F,0xCCB9,0x8870, -0xDBE7,0xDBE1,0xC6BA,0xDBE3,0x8871,0xDBE8,0x8872,0xC5F7, -0x8873,0x8874,0x8875,0xDBEA,0x8876,0x8877,0xDBE9,0xBFC0, -0x8878,0x8879,0x887A,0xDBE6,0xDBE5,0x887B,0x887C,0x887D, -0x887E,0x8880,0xB4B9,0xC0AC,0xC2A2,0xDBE2,0xDBE4,0x8881, -0x8882,0x8883,0x8884,0xD0CD,0xDBED,0x8885,0x8886,0x8887, -0x8888,0x8889,0xC0DD,0xDBF2,0x888A,0x888B,0x888C,0x888D, -0x888E,0x888F,0x8890,0xB6E2,0x8891,0x8892,0x8893,0x8894, -0xDBF3,0xDBD2,0xB9B8,0xD4AB,0xDBEC,0x8895,0xBFD1,0xDBF0, -0x8896,0xDBD1,0x8897,0xB5E6,0x8898,0xDBEB,0xBFE5,0x8899, -0x889A,0x889B,0xDBEE,0x889C,0xDBF1,0x889D,0x889E,0x889F, -0xDBF9,0x88A0,0x88A1,0x88A2,0x88A3,0x88A4,0x88A5,0x88A6, -0x88A7,0x88A8,0xB9A1,0xB0A3,0x88A9,0x88AA,0x88AB,0x88AC, -0x88AD,0x88AE,0x88AF,0xC2F1,0x88B0,0x88B1,0xB3C7,0xDBEF, -0x88B2,0x88B3,0xDBF8,0x88B4,0xC6D2,0xDBF4,0x88B5,0x88B6, -0xDBF5,0xDBF7,0xDBF6,0x88B7,0x88B8,0xDBFE,0x88B9,0xD3F2, -0xB2BA,0x88BA,0x88BB,0x88BC,0xDBFD,0x88BD,0x88BE,0x88BF, -0x88C0,0x88C1,0x88C2,0x88C3,0x88C4,0xDCA4,0x88C5,0xDBFB, -0x88C6,0x88C7,0x88C8,0x88C9,0xDBFA,0x88CA,0x88CB,0x88CC, -0xDBFC,0xC5E0,0xBBF9,0x88CD,0x88CE,0xDCA3,0x88CF,0x88D0, -0xDCA5,0x88D1,0xCCC3,0x88D2,0x88D3,0x88D4,0xB6D1,0xDDC0, -0x88D5,0x88D6,0x88D7,0xDCA1,0x88D8,0xDCA2,0x88D9,0x88DA, -0x88DB,0xC7B5,0x88DC,0x88DD,0x88DE,0xB6E9,0x88DF,0x88E0, -0x88E1,0xDCA7,0x88E2,0x88E3,0x88E4,0x88E5,0xDCA6,0x88E6, -0xDCA9,0xB1A4,0x88E7,0x88E8,0xB5CC,0x88E9,0x88EA,0x88EB, -0x88EC,0x88ED,0xBFB0,0x88EE,0x88EF,0x88F0,0x88F1,0x88F2, -0xD1DF,0x88F3,0x88F4,0x88F5,0x88F6,0xB6C2,0x88F7,0x88F8, -0x88F9,0x88FA,0x88FB,0x88FC,0x88FD,0x88FE,0x8940,0x8941, -0x8942,0x8943,0x8944,0x8945,0xDCA8,0x8946,0x8947,0x8948, -0x8949,0x894A,0x894B,0x894C,0xCBFA,0xEBF3,0x894D,0x894E, -0x894F,0xCBDC,0x8950,0x8951,0xCBFE,0x8952,0x8953,0x8954, -0xCCC1,0x8955,0x8956,0x8957,0x8958,0x8959,0xC8FB,0x895A, -0x895B,0x895C,0x895D,0x895E,0x895F,0xDCAA,0x8960,0x8961, -0x8962,0x8963,0x8964,0xCCEE,0xDCAB,0x8965,0x8966,0x8967, -0x8968,0x8969,0x896A,0x896B,0x896C,0x896D,0x896E,0x896F, -0x8970,0x8971,0x8972,0x8973,0x8974,0x8975,0xDBD3,0x8976, -0xDCAF,0xDCAC,0x8977,0xBEB3,0x8978,0xCAFB,0x8979,0x897A, -0x897B,0xDCAD,0x897C,0x897D,0x897E,0x8980,0x8981,0x8982, -0x8983,0x8984,0xC9CA,0xC4B9,0x8985,0x8986,0x8987,0x8988, -0x8989,0xC7BD,0xDCAE,0x898A,0x898B,0x898C,0xD4F6,0xD0E6, -0x898D,0x898E,0x898F,0x8990,0x8991,0x8992,0x8993,0x8994, -0xC4AB,0xB6D5,0x8995,0x8996,0x8997,0x8998,0x8999,0x899A, -0x899B,0x899C,0x899D,0x899E,0x899F,0x89A0,0x89A1,0x89A2, -0x89A3,0x89A4,0x89A5,0x89A6,0xDBD4,0x89A7,0x89A8,0x89A9, -0x89AA,0xB1DA,0x89AB,0x89AC,0x89AD,0xDBD5,0x89AE,0x89AF, -0x89B0,0x89B1,0x89B2,0x89B3,0x89B4,0x89B5,0x89B6,0x89B7, -0x89B8,0xDBD6,0x89B9,0x89BA,0x89BB,0xBABE,0x89BC,0x89BD, -0x89BE,0x89BF,0x89C0,0x89C1,0x89C2,0x89C3,0x89C4,0x89C5, -0x89C6,0x89C7,0x89C8,0x89C9,0xC8C0,0x89CA,0x89CB,0x89CC, -0x89CD,0x89CE,0x89CF,0xCABF,0xC8C9,0x89D0,0xD7B3,0x89D1, -0xC9F9,0x89D2,0x89D3,0xBFC7,0x89D4,0x89D5,0xBAF8,0x89D6, -0x89D7,0xD2BC,0x89D8,0x89D9,0x89DA,0x89DB,0x89DC,0x89DD, -0x89DE,0x89DF,0xE2BA,0x89E0,0xB4A6,0x89E1,0x89E2,0xB1B8, -0x89E3,0x89E4,0x89E5,0x89E6,0x89E7,0xB8B4,0x89E8,0xCFC4, -0x89E9,0x89EA,0x89EB,0x89EC,0xD9E7,0xCFA6,0xCDE2,0x89ED, -0x89EE,0xD9ED,0xB6E0,0x89EF,0xD2B9,0x89F0,0x89F1,0xB9BB, -0x89F2,0x89F3,0x89F4,0x89F5,0xE2B9,0xE2B7,0x89F6,0xB4F3, -0x89F7,0xCCEC,0xCCAB,0xB7F2,0x89F8,0xD8B2,0xD1EB,0xBABB, -0x89F9,0xCAA7,0x89FA,0x89FB,0xCDB7,0x89FC,0x89FD,0xD2C4, -0xBFE4,0xBCD0,0xB6E1,0x89FE,0xDEC5,0x8A40,0x8A41,0x8A42, -0x8A43,0xDEC6,0xDBBC,0x8A44,0xD1D9,0x8A45,0x8A46,0xC6E6, -0xC4CE,0xB7EE,0x8A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x9060,0x9061,0x9062, -0x9063,0x9064,0x9065,0xC1B5,0x9066,0xBBD0,0x9067,0x9068, -0xBFD6,0x9069,0xBAE3,0x906A,0x906B,0xCBA1,0x906C,0x906D, -0x906E,0xEDA6,0xEDA3,0x906F,0x9070,0xEDA2,0x9071,0x9072, -0x9073,0x9074,0xBBD6,0xEDA7,0xD0F4,0x9075,0x9076,0xEDA4, -0xBADE,0xB6F7,0xE3A1,0xB6B2,0xCCF1,0xB9A7,0x9077,0xCFA2, -0xC7A1,0x9078,0x9079,0xBFD2,0x907A,0x907B,0xB6F1,0x907C, -0xE2FA,0xE2FB,0xE2FD,0xE2FC,0xC4D5,0xE3A2,0x907D,0xD3C1, -0x907E,0x9080,0x9081,0xE3A7,0xC7C4,0x9082,0x9083,0x9084, -0x9085,0xCFA4,0x9086,0x9087,0xE3A9,0xBAB7,0x9088,0x9089, -0x908A,0x908B,0xE3A8,0x908C,0xBBDA,0x908D,0xE3A3,0x908E, -0x908F,0x9090,0xE3A4,0xE3AA,0x9091,0xE3A6,0x9092,0xCEF2, -0xD3C6,0x9093,0x9094,0xBBBC,0x9095,0x9096,0xD4C3,0x9097, -0xC4FA,0x9098,0x9099,0xEDA8,0xD0FC,0xE3A5,0x909A,0xC3F5, -0x909B,0xE3AD,0xB1AF,0x909C,0xE3B2,0x909D,0x909E,0x909F, -0xBCC2,0x90A0,0x90A1,0xE3AC,0xB5BF,0x90A2,0x90A3,0x90A4, -0x90A5,0x90A6,0x90A7,0x90A8,0x90A9,0xC7E9,0xE3B0,0x90AA, -0x90AB,0x90AC,0xBEAA,0xCDEF,0x90AD,0x90AE,0x90AF,0x90B0, -0x90B1,0xBBF3,0x90B2,0x90B3,0x90B4,0xCCE8,0x90B5,0x90B6, -0xE3AF,0x90B7,0xE3B1,0x90B8,0xCFA7,0xE3AE,0x90B9,0xCEA9, -0xBBDD,0x90BA,0x90BB,0x90BC,0x90BD,0x90BE,0xB5EB,0xBEE5, -0xB2D2,0xB3CD,0x90BF,0xB1B9,0xE3AB,0xB2D1,0xB5AC,0xB9DF, -0xB6E8,0x90C0,0x90C1,0xCFEB,0xE3B7,0x90C2,0xBBCC,0x90C3, -0x90C4,0xC8C7,0xD0CA,0x90C5,0x90C6,0x90C7,0x90C8,0x90C9, -0xE3B8,0xB3EE,0x90CA,0x90CB,0x90CC,0x90CD,0xEDA9,0x90CE, -0xD3FA,0xD3E4,0x90CF,0x90D0,0x90D1,0xEDAA,0xE3B9,0xD2E2, -0x90D2,0x90D3,0x90D4,0x90D5,0x90D6,0xE3B5,0x90D7,0x90D8, -0x90D9,0x90DA,0xD3DE,0x90DB,0x90DC,0x90DD,0x90DE,0xB8D0, -0xE3B3,0x90DF,0x90E0,0xE3B6,0xB7DF,0x90E1,0xE3B4,0xC0A2, -0x90E2,0x90E3,0x90E4,0xE3BA,0x90E5,0x90E6,0x90E7,0x90E8, -0x90E9,0x90EA,0x90EB,0x90EC,0x90ED,0x90EE,0x90EF,0x90F0, -0x90F1,0x90F2,0x90F3,0x90F4,0x90F5,0x90F6,0x90F7,0xD4B8, -0x90F8,0x90F9,0x90FA,0x90FB,0x90FC,0x90FD,0x90FE,0x9140, -0xB4C8,0x9141,0xE3BB,0x9142,0xBBC5,0x9143,0xC9F7,0x9144, -0x9145,0xC9E5,0x9146,0x9147,0x9148,0xC4BD,0x9149,0x914A, -0x914B,0x914C,0x914D,0x914E,0x914F,0xEDAB,0x9150,0x9151, -0x9152,0x9153,0xC2FD,0x9154,0x9155,0x9156,0x9157,0xBBDB, -0xBFAE,0x9158,0x9159,0x915A,0x915B,0x915C,0x915D,0x915E, -0xCEBF,0x915F,0x9160,0x9161,0x9162,0xE3BC,0x9163,0xBFB6, -0x9164,0x9165,0x9166,0x9167,0x9168,0x9169,0x916A,0x916B, -0x916C,0x916D,0x916E,0x916F,0x9170,0x9171,0x9172,0x9173, -0x9174,0x9175,0x9176,0xB1EF,0x9177,0x9178,0xD4F7,0x9179, -0x917A,0x917B,0x917C,0x917D,0xE3BE,0x917E,0x9180,0x9181, -0x9182,0x9183,0x9184,0x9185,0x9186,0xEDAD,0x9187,0x9188, -0x9189,0x918A,0x918B,0x918C,0x918D,0x918E,0x918F,0xE3BF, -0xBAA9,0xEDAC,0x9190,0x9191,0xE3BD,0x9192,0x9193,0x9194, -0x9195,0x9196,0x9197,0x9198,0x9199,0x919A,0x919B,0xE3C0, -0x919C,0x919D,0x919E,0x919F,0x91A0,0x91A1,0xBAB6,0x91A2, -0x91A3,0x91A4,0xB6AE,0x91A5,0x91A6,0x91A7,0x91A8,0x91A9, -0xD0B8,0x91AA,0xB0C3,0xEDAE,0x91AB,0x91AC,0x91AD,0x91AE, -0x91AF,0xEDAF,0xC0C1,0x91B0,0xE3C1,0x91B1,0x91B2,0x91B3, -0x91B4,0x91B5,0x91B6,0x91B7,0x91B8,0x91B9,0x91BA,0x91BB, -0x91BC,0x91BD,0x91BE,0x91BF,0x91C0,0x91C1,0xC5B3,0x91C2, -0x91C3,0x91C4,0x91C5,0x91C6,0x91C7,0x91C8,0x91C9,0x91CA, -0x91CB,0x91CC,0x91CD,0x91CE,0x91CF,0xE3C2,0x91D0,0x91D1, -0x91D2,0x91D3,0x91D4,0x91D5,0x91D6,0x91D7,0x91D8,0xDCB2, -0x91D9,0x91DA,0x91DB,0x91DC,0x91DD,0x91DE,0xEDB0,0x91DF, -0xB8EA,0x91E0,0xCEEC,0xEAA7,0xD0E7,0xCAF9,0xC8D6,0xCFB7, -0xB3C9,0xCED2,0xBDE4,0x91E1,0x91E2,0xE3DE,0xBBF2,0xEAA8, -0xD5BD,0x91E3,0xC6DD,0xEAA9,0x91E4,0x91E5,0x91E6,0xEAAA, -0x91E7,0xEAAC,0xEAAB,0x91E8,0xEAAE,0xEAAD,0x91E9,0x91EA, -0x91EB,0x91EC,0xBDD8,0x91ED,0xEAAF,0x91EE,0xC2BE,0x91EF, -0x91F0,0x91F1,0x91F2,0xB4C1,0xB4F7,0x91F3,0x91F4,0xBBA7, -0x91F5,0x91F6,0x91F7,0x91F8,0x91F9,0xECE6,0xECE5,0xB7BF, -0xCBF9,0xB1E2,0x91FA,0xECE7,0x91FB,0x91FC,0x91FD,0xC9C8, -0xECE8,0xECE9,0x91FE,0xCAD6,0xDED0,0xB2C5,0xD4FA,0x9240, -0x9241,0xC6CB,0xB0C7,0xB4F2,0xC8D3,0x9242,0x9243,0x9244, -0xCDD0,0x9245,0x9246,0xBFB8,0x9247,0x9248,0x9249,0x924A, -0x924B,0x924C,0x924D,0xBFDB,0x924E,0x924F,0xC7A4,0xD6B4, -0x9250,0xC0A9,0xDED1,0xC9A8,0xD1EF,0xC5A4,0xB0E7,0xB3B6, -0xC8C5,0x9251,0x9252,0xB0E2,0x9253,0x9254,0xB7F6,0x9255, -0x9256,0xC5FA,0x9257,0x9258,0xB6F3,0x9259,0xD5D2,0xB3D0, -0xBCBC,0x925A,0x925B,0x925C,0xB3AD,0x925D,0x925E,0x925F, -0x9260,0xBEF1,0xB0D1,0x9261,0x9262,0x9263,0x9264,0x9265, -0x9266,0xD2D6,0xCAE3,0xD7A5,0x9267,0xCDB6,0xB6B6,0xBFB9, -0xD5DB,0x9268,0xB8A7,0xC5D7,0x9269,0x926A,0x926B,0xDED2, -0xBFD9,0xC2D5,0xC7C0,0x926C,0xBBA4,0xB1A8,0x926D,0x926E, -0xC5EA,0x926F,0x9270,0xC5FB,0xCCA7,0x9271,0x9272,0x9273, -0x9274,0xB1A7,0x9275,0x9276,0x9277,0xB5D6,0x9278,0x9279, -0x927A,0xC4A8,0x927B,0xDED3,0xD1BA,0xB3E9,0x927C,0xC3F2, -0x927D,0x927E,0xB7F7,0x9280,0xD6F4,0xB5A3,0xB2F0,0xC4B4, -0xC4E9,0xC0AD,0xDED4,0x9281,0xB0E8,0xC5C4,0xC1E0,0x9282, -0xB9D5,0x9283,0xBEDC,0xCDD8,0xB0CE,0x9284,0xCDCF,0xDED6, -0xBED0,0xD7BE,0xDED5,0xD5D0,0xB0DD,0x9285,0x9286,0xC4E2, -0x9287,0x9288,0xC2A3,0xBCF0,0x9289,0xD3B5,0xC0B9,0xC5A1, -0xB2A6,0xD4F1,0x928A,0x928B,0xC0A8,0xCAC3,0xDED7,0xD5FC, -0x928C,0xB9B0,0x928D,0xC8AD,0xCBA9,0x928E,0xDED9,0xBFBD, -0x928F,0x9290,0x9291,0x9292,0xC6B4,0xD7A7,0xCAB0,0xC4C3, -0x9293,0xB3D6,0xB9D2,0x9294,0x9295,0x9296,0x9297,0xD6B8, -0xEAFC,0xB0B4,0x9298,0x9299,0x929A,0x929B,0xBFE6,0x929C, -0x929D,0xCCF4,0x929E,0x929F,0x92A0,0x92A1,0xCDDA,0x92A2, -0x92A3,0x92A4,0xD6BF,0xC2CE,0x92A5,0xCECE,0xCCA2,0xD0AE, -0xC4D3,0xB5B2,0xDED8,0xD5F5,0xBCB7,0xBBD3,0x92A6,0x92A7, -0xB0A4,0x92A8,0xC5B2,0xB4EC,0x92A9,0x92AA,0x92AB,0xD5F1, -0x92AC,0x92AD,0xEAFD,0x92AE,0x92AF,0x92B0,0x92B1,0x92B2, -0x92B3,0xDEDA,0xCDA6,0x92B4,0x92B5,0xCDEC,0x92B6,0x92B7, -0x92B8,0x92B9,0xCEE6,0xDEDC,0x92BA,0xCDB1,0xC0A6,0x92BB, -0x92BC,0xD7BD,0x92BD,0xDEDB,0xB0C6,0xBAB4,0xC9D3,0xC4F3, -0xBEE8,0x92BE,0x92BF,0x92C0,0x92C1,0xB2B6,0x92C2,0x92C3, -0x92C4,0x92C5,0x92C6,0x92C7,0x92C8,0x92C9,0xC0CC,0xCBF0, -0x92CA,0xBCF1,0xBBBB,0xB5B7,0x92CB,0x92CC,0x92CD,0xC5F5, -0x92CE,0xDEE6,0x92CF,0x92D0,0x92D1,0xDEE3,0xBEDD,0x92D2, -0x92D3,0xDEDF,0x92D4,0x92D5,0x92D6,0x92D7,0xB4B7,0xBDDD, -0x92D8,0x92D9,0xDEE0,0xC4ED,0x92DA,0x92DB,0x92DC,0x92DD, -0xCFC6,0x92DE,0xB5E0,0x92DF,0x92E0,0x92E1,0x92E2,0xB6DE, -0xCADA,0xB5F4,0xDEE5,0x92E3,0xD5C6,0x92E4,0xDEE1,0xCCCD, -0xC6FE,0x92E5,0xC5C5,0x92E6,0x92E7,0x92E8,0xD2B4,0x92E9, -0xBEF2,0x92EA,0x92EB,0x92EC,0x92ED,0x92EE,0x92EF,0x92F0, -0xC2D3,0x92F1,0xCCBD,0xB3B8,0x92F2,0xBDD3,0x92F3,0xBFD8, -0xCDC6,0xD1DA,0xB4EB,0x92F4,0xDEE4,0xDEDD,0xDEE7,0x92F5, -0xEAFE,0x92F6,0x92F7,0xC2B0,0xDEE2,0x92F8,0x92F9,0xD6C0, -0xB5A7,0x92FA,0xB2F4,0x92FB,0xDEE8,0x92FC,0xDEF2,0x92FD, -0x92FE,0x9340,0x9341,0x9342,0xDEED,0x9343,0xDEF1,0x9344, -0x9345,0xC8E0,0x9346,0x9347,0x9348,0xD7E1,0xDEEF,0xC3E8, -0xCCE1,0x9349,0xB2E5,0x934A,0x934B,0x934C,0xD2BE,0x934D, -0x934E,0x934F,0x9350,0x9351,0x9352,0x9353,0xDEEE,0x9354, -0xDEEB,0xCED5,0x9355,0xB4A7,0x9356,0x9357,0x9358,0x9359, -0x935A,0xBFAB,0xBEBE,0x935B,0x935C,0xBDD2,0x935D,0x935E, -0x935F,0x9360,0xDEE9,0x9361,0xD4AE,0x9362,0xDEDE,0x9363, -0xDEEA,0x9364,0x9365,0x9366,0x9367,0xC0BF,0x9368,0xDEEC, -0xB2F3,0xB8E9,0xC2A7,0x9369,0x936A,0xBDC1,0x936B,0x936C, -0x936D,0x936E,0x936F,0xDEF5,0xDEF8,0x9370,0x9371,0xB2AB, -0xB4A4,0x9372,0x9373,0xB4EA,0xC9A6,0x9374,0x9375,0x9376, -0x9377,0x9378,0x9379,0xDEF6,0xCBD1,0x937A,0xB8E3,0x937B, -0xDEF7,0xDEFA,0x937C,0x937D,0x937E,0x9380,0xDEF9,0x9381, -0x9382,0x9383,0xCCC2,0x9384,0xB0E1,0xB4EE,0x9385,0x9386, -0x9387,0x9388,0x9389,0x938A,0xE5BA,0x938B,0x938C,0x938D, -0x938E,0x938F,0xD0AF,0x9390,0x9391,0xB2EB,0x9392,0xEBA1, -0x9393,0xDEF4,0x9394,0x9395,0xC9E3,0xDEF3,0xB0DA,0xD2A1, -0xB1F7,0x9396,0xCCAF,0x9397,0x9398,0x9399,0x939A,0x939B, -0x939C,0x939D,0xDEF0,0x939E,0xCBA4,0x939F,0x93A0,0x93A1, -0xD5AA,0x93A2,0x93A3,0x93A4,0x93A5,0x93A6,0xDEFB,0x93A7, -0x93A8,0x93A9,0x93AA,0x93AB,0x93AC,0x93AD,0x93AE,0xB4DD, -0x93AF,0xC4A6,0x93B0,0x93B1,0x93B2,0xDEFD,0x93B3,0x93B4, -0x93B5,0x93B6,0x93B7,0x93B8,0x93B9,0x93BA,0x93BB,0x93BC, -0xC3FE,0xC4A1,0xDFA1,0x93BD,0x93BE,0x93BF,0x93C0,0x93C1, -0x93C2,0x93C3,0xC1CC,0x93C4,0xDEFC,0xBEEF,0x93C5,0xC6B2, -0x93C6,0x93C7,0x93C8,0x93C9,0x93CA,0x93CB,0x93CC,0x93CD, -0x93CE,0xB3C5,0xC8F6,0x93CF,0x93D0,0xCBBA,0xDEFE,0x93D1, -0x93D2,0xDFA4,0x93D3,0x93D4,0x93D5,0x93D6,0xD7B2,0x93D7, -0x93D8,0x93D9,0x93DA,0x93DB,0xB3B7,0x93DC,0x93DD,0x93DE, -0x93DF,0xC1C3,0x93E0,0x93E1,0xC7CB,0xB2A5,0xB4E9,0x93E2, -0xD7AB,0x93E3,0x93E4,0x93E5,0x93E6,0xC4EC,0x93E7,0xDFA2, -0xDFA3,0x93E8,0xDFA5,0x93E9,0xBAB3,0x93EA,0x93EB,0x93EC, -0xDFA6,0x93ED,0xC0DE,0x93EE,0x93EF,0xC9C3,0x93F0,0x93F1, -0x93F2,0x93F3,0x93F4,0x93F5,0x93F6,0xB2D9,0xC7E6,0x93F7, -0xDFA7,0x93F8,0xC7DC,0x93F9,0x93FA,0x93FB,0x93FC,0xDFA8, -0xEBA2,0x93FD,0x93FE,0x9440,0x9441,0x9442,0xCBD3,0x9443, -0x9444,0x9445,0xDFAA,0x9446,0xDFA9,0x9447,0xB2C1,0x9448, -0x9449,0x944A,0x944B,0x944C,0x944D,0x944E,0x944F,0x9450, -0x9451,0x9452,0x9453,0x9454,0x9455,0x9456,0x9457,0x9458, -0x9459,0x945A,0x945B,0x945C,0x945D,0x945E,0x945F,0x9460, -0xC5CA,0x9461,0x9462,0x9463,0x9464,0x9465,0x9466,0x9467, -0x9468,0xDFAB,0x9469,0x946A,0x946B,0x946C,0x946D,0x946E, -0x946F,0x9470,0xD4DC,0x9471,0x9472,0x9473,0x9474,0x9475, -0xC8C1,0x9476,0x9477,0x9478,0x9479,0x947A,0x947B,0x947C, -0x947D,0x947E,0x9480,0x9481,0x9482,0xDFAC,0x9483,0x9484, -0x9485,0x9486,0x9487,0xBEF0,0x9488,0x9489,0xDFAD,0xD6A7, -0x948A,0x948B,0x948C,0x948D,0xEAB7,0xEBB6,0xCAD5,0x948E, -0xD8FC,0xB8C4,0x948F,0xB9A5,0x9490,0x9491,0xB7C5,0xD5FE, -0x9492,0x9493,0x9494,0x9495,0x9496,0xB9CA,0x9497,0x9498, -0xD0A7,0xF4CD,0x9499,0x949A,0xB5D0,0x949B,0x949C,0xC3F4, -0x949D,0xBEC8,0x949E,0x949F,0x94A0,0xEBB7,0xB0BD,0x94A1, -0x94A2,0xBDCC,0x94A3,0xC1B2,0x94A4,0xB1D6,0xB3A8,0x94A5, -0x94A6,0x94A7,0xB8D2,0xC9A2,0x94A8,0x94A9,0xB6D8,0x94AA, -0x94AB,0x94AC,0x94AD,0xEBB8,0xBEB4,0x94AE,0x94AF,0x94B0, -0xCAFD,0x94B1,0xC7C3,0x94B2,0xD5FB,0x94B3,0x94B4,0xB7F3, -0x94B5,0x94B6,0x94B7,0x94B8,0x94B9,0x94BA,0x94BB,0x94BC, -0x94BD,0x94BE,0x94BF,0x94C0,0x94C1,0x94C2,0x94C3,0xCEC4, -0x94C4,0x94C5,0x94C6,0xD5AB,0xB1F3,0x94C7,0x94C8,0x94C9, -0xECB3,0xB0DF,0x94CA,0xECB5,0x94CB,0x94CC,0x94CD,0xB6B7, -0x94CE,0xC1CF,0x94CF,0xF5FA,0xD0B1,0x94D0,0x94D1,0xD5E5, -0x94D2,0xCED3,0x94D3,0x94D4,0xBDEF,0xB3E2,0x94D5,0xB8AB, -0x94D6,0xD5B6,0x94D7,0xEDBD,0x94D8,0xB6CF,0x94D9,0xCBB9, -0xD0C2,0x94DA,0x94DB,0x94DC,0x94DD,0x94DE,0x94DF,0x94E0, -0x94E1,0xB7BD,0x94E2,0x94E3,0xECB6,0xCAA9,0x94E4,0x94E5, -0x94E6,0xC5D4,0x94E7,0xECB9,0xECB8,0xC2C3,0xECB7,0x94E8, -0x94E9,0x94EA,0x94EB,0xD0FD,0xECBA,0x94EC,0xECBB,0xD7E5, -0x94ED,0x94EE,0xECBC,0x94EF,0x94F0,0x94F1,0xECBD,0xC6EC, -0x94F2,0x94F3,0x94F4,0x94F5,0x94F6,0x94F7,0x94F8,0x94F9, -0xCEDE,0x94FA,0xBCC8,0x94FB,0x94FC,0xC8D5,0xB5A9,0xBEC9, -0xD6BC,0xD4E7,0x94FD,0x94FE,0xD1AE,0xD0F1,0xEAB8,0xEAB9, -0xEABA,0xBAB5,0x9540,0x9541,0x9542,0x9543,0xCAB1,0xBFF5, -0x9544,0x9545,0xCDFA,0x9546,0x9547,0x9548,0x9549,0x954A, -0xEAC0,0x954B,0xB0BA,0xEABE,0x954C,0x954D,0xC0A5,0x954E, -0x954F,0x9550,0xEABB,0x9551,0xB2FD,0x9552,0xC3F7,0xBBE8, -0x9553,0x9554,0x9555,0xD2D7,0xCEF4,0xEABF,0x9556,0x9557, -0x9558,0xEABC,0x9559,0x955A,0x955B,0xEAC3,0x955C,0xD0C7, -0xD3B3,0x955D,0x955E,0x955F,0x9560,0xB4BA,0x9561,0xC3C1, -0xD7F2,0x9562,0x9563,0x9564,0x9565,0xD5D1,0x9566,0xCAC7, -0x9567,0xEAC5,0x9568,0x9569,0xEAC4,0xEAC7,0xEAC6,0x956A, -0x956B,0x956C,0x956D,0x956E,0xD6E7,0x956F,0xCFD4,0x9570, -0x9571,0xEACB,0x9572,0xBBCE,0x9573,0x9574,0x9575,0x9576, -0x9577,0x9578,0x9579,0xBDFA,0xC9CE,0x957A,0x957B,0xEACC, -0x957C,0x957D,0xC9B9,0xCFFE,0xEACA,0xD4CE,0xEACD,0xEACF, -0x957E,0x9580,0xCDED,0x9581,0x9582,0x9583,0x9584,0xEAC9, -0x9585,0xEACE,0x9586,0x9587,0xCEEE,0x9588,0xBBDE,0x9589, -0xB3BF,0x958A,0x958B,0x958C,0x958D,0x958E,0xC6D5,0xBEB0, -0xCEFA,0x958F,0x9590,0x9591,0xC7E7,0x9592,0xBEA7,0xEAD0, -0x9593,0x9594,0xD6C7,0x9595,0x9596,0x9597,0xC1C0,0x9598, -0x9599,0x959A,0xD4DD,0x959B,0xEAD1,0x959C,0x959D,0xCFBE, -0x959E,0x959F,0x95A0,0x95A1,0xEAD2,0x95A2,0x95A3,0x95A4, -0x95A5,0xCAEE,0x95A6,0x95A7,0x95A8,0x95A9,0xC5AF,0xB0B5, -0x95AA,0x95AB,0x95AC,0x95AD,0x95AE,0xEAD4,0x95AF,0x95B0, -0x95B1,0x95B2,0x95B3,0x95B4,0x95B5,0x95B6,0x95B7,0xEAD3, -0xF4DF,0x95B8,0x95B9,0x95BA,0x95BB,0x95BC,0xC4BA,0x95BD, -0x95BE,0x95BF,0x95C0,0x95C1,0xB1A9,0x95C2,0x95C3,0x95C4, -0x95C5,0xE5DF,0x95C6,0x95C7,0x95C8,0x95C9,0xEAD5,0x95CA, -0x95CB,0x95CC,0x95CD,0x95CE,0x95CF,0x95D0,0x95D1,0x95D2, -0x95D3,0x95D4,0x95D5,0x95D6,0x95D7,0x95D8,0x95D9,0x95DA, -0x95DB,0x95DC,0x95DD,0x95DE,0x95DF,0x95E0,0x95E1,0x95E2, -0x95E3,0xCAEF,0x95E4,0xEAD6,0xEAD7,0xC6D8,0x95E5,0x95E6, -0x95E7,0x95E8,0x95E9,0x95EA,0x95EB,0x95EC,0xEAD8,0x95ED, -0x95EE,0xEAD9,0x95EF,0x95F0,0x95F1,0x95F2,0x95F3,0x95F4, -0xD4BB,0x95F5,0xC7FA,0xD2B7,0xB8FC,0x95F6,0x95F7,0xEAC2, -0x95F8,0xB2DC,0x95F9,0x95FA,0xC2FC,0x95FB,0xD4F8,0xCCE6, -0xD7EE,0x95FC,0x95FD,0x95FE,0x9640,0x9641,0x9642,0x9643, -0xD4C2,0xD3D0,0xEBC3,0xC5F3,0x9644,0xB7FE,0x9645,0x9646, -0xEBD4,0x9647,0x9648,0x9649,0xCBB7,0xEBDE,0x964A,0xC0CA, -0x964B,0x964C,0x964D,0xCDFB,0x964E,0xB3AF,0x964F,0xC6DA, -0x9650,0x9651,0x9652,0x9653,0x9654,0x9655,0xEBFC,0x9656, -0xC4BE,0x9657,0xCEB4,0xC4A9,0xB1BE,0xD4FD,0x9658,0xCAF5, -0x9659,0xD6EC,0x965A,0x965B,0xC6D3,0xB6E4,0x965C,0x965D, -0x965E,0x965F,0xBBFA,0x9660,0x9661,0xD0E0,0x9662,0x9663, -0xC9B1,0x9664,0xD4D3,0xC8A8,0x9665,0x9666,0xB8CB,0x9667, -0xE8BE,0xC9BC,0x9668,0x9669,0xE8BB,0x966A,0xC0EE,0xD0D3, -0xB2C4,0xB4E5,0x966B,0xE8BC,0x966C,0x966D,0xD5C8,0x966E, -0x966F,0x9670,0x9671,0x9672,0xB6C5,0x9673,0xE8BD,0xCAF8, -0xB8DC,0xCCF5,0x9674,0x9675,0x9676,0xC0B4,0x9677,0x9678, -0xD1EE,0xE8BF,0xE8C2,0x9679,0x967A,0xBABC,0x967B,0xB1AD, -0xBDDC,0x967C,0xEABD,0xE8C3,0x967D,0xE8C6,0x967E,0xE8CB, -0x9680,0x9681,0x9682,0x9683,0xE8CC,0x9684,0xCBC9,0xB0E5, -0x9685,0xBCAB,0x9686,0x9687,0xB9B9,0x9688,0x9689,0xE8C1, -0x968A,0xCDF7,0x968B,0xE8CA,0x968C,0x968D,0x968E,0x968F, -0xCEF6,0x9690,0x9691,0x9692,0x9693,0xD5ED,0x9694,0xC1D6, -0xE8C4,0x9695,0xC3B6,0x9696,0xB9FB,0xD6A6,0xE8C8,0x9697, -0x9698,0x9699,0xCAE0,0xD4E6,0x969A,0xE8C0,0x969B,0xE8C5, -0xE8C7,0x969C,0xC7B9,0xB7E3,0x969D,0xE8C9,0x969E,0xBFDD, -0xE8D2,0x969F,0x96A0,0xE8D7,0x96A1,0xE8D5,0xBCDC,0xBCCF, -0xE8DB,0x96A2,0x96A3,0x96A4,0x96A5,0x96A6,0x96A7,0x96A8, -0x96A9,0xE8DE,0x96AA,0xE8DA,0xB1FA,0x96AB,0x96AC,0x96AD, -0x96AE,0x96AF,0x96B0,0x96B1,0x96B2,0x96B3,0x96B4,0xB0D8, -0xC4B3,0xB8CC,0xC6E2,0xC8BE,0xC8E1,0x96B5,0x96B6,0x96B7, -0xE8CF,0xE8D4,0xE8D6,0x96B8,0xB9F1,0xE8D8,0xD7F5,0x96B9, -0xC4FB,0x96BA,0xE8DC,0x96BB,0x96BC,0xB2E9,0x96BD,0x96BE, -0x96BF,0xE8D1,0x96C0,0x96C1,0xBCED,0x96C2,0x96C3,0xBFC2, -0xE8CD,0xD6F9,0x96C4,0xC1F8,0xB2F1,0x96C5,0x96C6,0x96C7, -0x96C8,0x96C9,0x96CA,0x96CB,0x96CC,0xE8DF,0x96CD,0xCAC1, -0xE8D9,0x96CE,0x96CF,0x96D0,0x96D1,0xD5A4,0x96D2,0xB1EA, -0xD5BB,0xE8CE,0xE8D0,0xB6B0,0xE8D3,0x96D3,0xE8DD,0xC0B8, -0x96D4,0xCAF7,0x96D5,0xCBA8,0x96D6,0x96D7,0xC6DC,0xC0F5, -0x96D8,0x96D9,0x96DA,0x96DB,0x96DC,0xE8E9,0x96DD,0x96DE, -0x96DF,0xD0A3,0x96E0,0x96E1,0x96E2,0x96E3,0x96E4,0x96E5, -0x96E6,0xE8F2,0xD6EA,0x96E7,0x96E8,0x96E9,0x96EA,0x96EB, -0x96EC,0x96ED,0xE8E0,0xE8E1,0x96EE,0x96EF,0x96F0,0xD1F9, -0xBACB,0xB8F9,0x96F1,0x96F2,0xB8F1,0xD4D4,0xE8EF,0x96F3, -0xE8EE,0xE8EC,0xB9F0,0xCCD2,0xE8E6,0xCEA6,0xBFF2,0x96F4, -0xB0B8,0xE8F1,0xE8F0,0x96F5,0xD7C0,0x96F6,0xE8E4,0x96F7, -0xCDA9,0xC9A3,0x96F8,0xBBB8,0xBDDB,0xE8EA,0x96F9,0x96FA, -0x96FB,0x96FC,0x96FD,0x96FE,0x9740,0x9741,0x9742,0x9743, -0xE8E2,0xE8E3,0xE8E5,0xB5B5,0xE8E7,0xC7C5,0xE8EB,0xE8ED, -0xBDB0,0xD7AE,0x9744,0xE8F8,0x9745,0x9746,0x9747,0x9748, -0x9749,0x974A,0x974B,0x974C,0xE8F5,0x974D,0xCDB0,0xE8F6, -0x974E,0x974F,0x9750,0x9751,0x9752,0x9753,0x9754,0x9755, -0x9756,0xC1BA,0x9757,0xE8E8,0x9758,0xC3B7,0xB0F0,0x9759, -0x975A,0x975B,0x975C,0x975D,0x975E,0x975F,0x9760,0xE8F4, -0x9761,0x9762,0x9763,0xE8F7,0x9764,0x9765,0x9766,0xB9A3, -0x9767,0x9768,0x9769,0x976A,0x976B,0x976C,0x976D,0x976E, -0x976F,0x9770,0xC9D2,0x9771,0x9772,0x9773,0xC3CE,0xCEE0, -0xC0E6,0x9774,0x9775,0x9776,0x9777,0xCBF3,0x9778,0xCCDD, -0xD0B5,0x9779,0x977A,0xCAE1,0x977B,0xE8F3,0x977C,0x977D, -0x977E,0x9780,0x9781,0x9782,0x9783,0x9784,0x9785,0x9786, -0xBCEC,0x9787,0xE8F9,0x9788,0x9789,0x978A,0x978B,0x978C, -0x978D,0xC3DE,0x978E,0xC6E5,0x978F,0xB9F7,0x9790,0x9791, -0x9792,0x9793,0xB0F4,0x9794,0x9795,0xD7D8,0x9796,0x9797, -0xBCAC,0x9798,0xC5EF,0x9799,0x979A,0x979B,0x979C,0x979D, -0xCCC4,0x979E,0x979F,0xE9A6,0x97A0,0x97A1,0x97A2,0x97A3, -0x97A4,0x97A5,0x97A6,0x97A7,0x97A8,0x97A9,0xC9AD,0x97AA, -0xE9A2,0xC0E2,0x97AB,0x97AC,0x97AD,0xBFC3,0x97AE,0x97AF, -0x97B0,0xE8FE,0xB9D7,0x97B1,0xE8FB,0x97B2,0x97B3,0x97B4, -0x97B5,0xE9A4,0x97B6,0x97B7,0x97B8,0xD2CE,0x97B9,0x97BA, -0x97BB,0x97BC,0x97BD,0xE9A3,0x97BE,0xD6B2,0xD7B5,0x97BF, -0xE9A7,0x97C0,0xBDB7,0x97C1,0x97C2,0x97C3,0x97C4,0x97C5, -0x97C6,0x97C7,0x97C8,0x97C9,0x97CA,0x97CB,0x97CC,0xE8FC, -0xE8FD,0x97CD,0x97CE,0x97CF,0xE9A1,0x97D0,0x97D1,0x97D2, -0x97D3,0x97D4,0x97D5,0x97D6,0x97D7,0xCDD6,0x97D8,0x97D9, -0xD2AC,0x97DA,0x97DB,0x97DC,0xE9B2,0x97DD,0x97DE,0x97DF, -0x97E0,0xE9A9,0x97E1,0x97E2,0x97E3,0xB4AA,0x97E4,0xB4BB, -0x97E5,0x97E6,0xE9AB,0x97E7,0x97E8,0x97E9,0x97EA,0x97EB, -0x97EC,0x97ED,0x97EE,0x97EF,0x97F0,0x97F1,0x97F2,0x97F3, -0x97F4,0x97F5,0x97F6,0x97F7,0xD0A8,0x97F8,0x97F9,0xE9A5, -0x97FA,0x97FB,0xB3FE,0x97FC,0x97FD,0xE9AC,0xC0E3,0x97FE, -0xE9AA,0x9840,0x9841,0xE9B9,0x9842,0x9843,0xE9B8,0x9844, -0x9845,0x9846,0x9847,0xE9AE,0x9848,0x9849,0xE8FA,0x984A, -0x984B,0xE9A8,0x984C,0x984D,0x984E,0x984F,0x9850,0xBFAC, -0xE9B1,0xE9BA,0x9851,0x9852,0xC2A5,0x9853,0x9854,0x9855, -0xE9AF,0x9856,0xB8C5,0x9857,0xE9AD,0x9858,0xD3DC,0xE9B4, -0xE9B5,0xE9B7,0x9859,0x985A,0x985B,0xE9C7,0x985C,0x985D, -0x985E,0x985F,0x9860,0x9861,0xC0C6,0xE9C5,0x9862,0x9863, -0xE9B0,0x9864,0x9865,0xE9BB,0xB0F1,0x9866,0x9867,0x9868, -0x9869,0x986A,0x986B,0x986C,0x986D,0x986E,0x986F,0xE9BC, -0xD5A5,0x9870,0x9871,0xE9BE,0x9872,0xE9BF,0x9873,0x9874, -0x9875,0xE9C1,0x9876,0x9877,0xC1F1,0x9878,0x9879,0xC8B6, -0x987A,0x987B,0x987C,0xE9BD,0x987D,0x987E,0x9880,0x9881, -0x9882,0xE9C2,0x9883,0x9884,0x9885,0x9886,0x9887,0x9888, -0x9889,0x988A,0xE9C3,0x988B,0xE9B3,0x988C,0xE9B6,0x988D, -0xBBB1,0x988E,0x988F,0x9890,0xE9C0,0x9891,0x9892,0x9893, -0x9894,0x9895,0x9896,0xBCF7,0x9897,0x9898,0x9899,0xE9C4, -0xE9C6,0x989A,0x989B,0x989C,0x989D,0x989E,0x989F,0x98A0, -0x98A1,0x98A2,0x98A3,0x98A4,0x98A5,0xE9CA,0x98A6,0x98A7, -0x98A8,0x98A9,0xE9CE,0x98AA,0x98AB,0x98AC,0x98AD,0x98AE, -0x98AF,0x98B0,0x98B1,0x98B2,0x98B3,0xB2DB,0x98B4,0xE9C8, -0x98B5,0x98B6,0x98B7,0x98B8,0x98B9,0x98BA,0x98BB,0x98BC, -0x98BD,0x98BE,0xB7AE,0x98BF,0x98C0,0x98C1,0x98C2,0x98C3, -0x98C4,0x98C5,0x98C6,0x98C7,0x98C8,0x98C9,0x98CA,0xE9CB, -0xE9CC,0x98CB,0x98CC,0x98CD,0x98CE,0x98CF,0x98D0,0xD5C1, -0x98D1,0xC4A3,0x98D2,0x98D3,0x98D4,0x98D5,0x98D6,0x98D7, -0xE9D8,0x98D8,0xBAE1,0x98D9,0x98DA,0x98DB,0x98DC,0xE9C9, -0x98DD,0xD3A3,0x98DE,0x98DF,0x98E0,0xE9D4,0x98E1,0x98E2, -0x98E3,0x98E4,0x98E5,0x98E6,0x98E7,0xE9D7,0xE9D0,0x98E8, -0x98E9,0x98EA,0x98EB,0x98EC,0xE9CF,0x98ED,0x98EE,0xC7C1, -0x98EF,0x98F0,0x98F1,0x98F2,0x98F3,0x98F4,0x98F5,0x98F6, -0xE9D2,0x98F7,0x98F8,0x98F9,0x98FA,0x98FB,0x98FC,0x98FD, -0xE9D9,0xB3C8,0x98FE,0xE9D3,0x9940,0x9941,0x9942,0x9943, -0x9944,0xCFF0,0x9945,0x9946,0x9947,0xE9CD,0x9948,0x9949, -0x994A,0x994B,0x994C,0x994D,0x994E,0x994F,0x9950,0x9951, -0x9952,0xB3F7,0x9953,0x9954,0x9955,0x9956,0x9957,0x9958, -0x9959,0xE9D6,0x995A,0x995B,0xE9DA,0x995C,0x995D,0x995E, -0xCCB4,0x995F,0x9960,0x9961,0xCFAD,0x9962,0x9963,0x9964, -0x9965,0x9966,0x9967,0x9968,0x9969,0x996A,0xE9D5,0x996B, -0xE9DC,0xE9DB,0x996C,0x996D,0x996E,0x996F,0x9970,0xE9DE, -0x9971,0x9972,0x9973,0x9974,0x9975,0x9976,0x9977,0x9978, -0xE9D1,0x9979,0x997A,0x997B,0x997C,0x997D,0x997E,0x9980, -0x9981,0xE9DD,0x9982,0xE9DF,0xC3CA,0x9983,0x9984,0x9985, -0x9986,0x9987,0x9988,0x9989,0x998A,0x998B,0x998C,0x998D, -0x998E,0x998F,0x9990,0x9991,0x9992,0x9993,0x9994,0x9995, -0x9996,0x9997,0x9998,0x9999,0x999A,0x999B,0x999C,0x999D, -0x999E,0x999F,0x99A0,0x99A1,0x99A2,0x99A3,0x99A4,0x99A5, -0x99A6,0x99A7,0x99A8,0x99A9,0x99AA,0x99AB,0x99AC,0x99AD, -0x99AE,0x99AF,0x99B0,0x99B1,0x99B2,0x99B3,0x99B4,0x99B5, -0x99B6,0x99B7,0x99B8,0x99B9,0x99BA,0x99BB,0x99BC,0x99BD, -0x99BE,0x99BF,0x99C0,0x99C1,0x99C2,0x99C3,0x99C4,0x99C5, -0x99C6,0x99C7,0x99C8,0x99C9,0x99CA,0x99CB,0x99CC,0x99CD, -0x99CE,0x99CF,0x99D0,0x99D1,0x99D2,0x99D3,0x99D4,0x99D5, -0x99D6,0x99D7,0x99D8,0x99D9,0x99DA,0x99DB,0x99DC,0x99DD, -0x99DE,0x99DF,0x99E0,0x99E1,0x99E2,0x99E3,0x99E4,0x99E5, -0x99E6,0x99E7,0x99E8,0x99E9,0x99EA,0x99EB,0x99EC,0x99ED, -0x99EE,0x99EF,0x99F0,0x99F1,0x99F2,0x99F3,0x99F4,0x99F5, -0xC7B7,0xB4CE,0xBBB6,0xD0C0,0xECA3,0x99F6,0x99F7,0xC5B7, -0x99F8,0x99F9,0x99FA,0x99FB,0x99FC,0x99FD,0x99FE,0x9A40, -0x9A41,0x9A42,0xD3FB,0x9A43,0x9A44,0x9A45,0x9A46,0xECA4, -0x9A47,0xECA5,0xC6DB,0x9A48,0x9A49,0x9A4A,0xBFEE,0x9A4B, -0x9A4C,0x9A4D,0x9A4E,0xECA6,0x9A4F,0x9A50,0xECA7,0xD0AA, -0x9A51,0xC7B8,0x9A52,0x9A53,0xB8E8,0x9A54,0x9A55,0x9A56, -0x9A57,0x9A58,0x9A59,0x9A5A,0x9A5B,0x9A5C,0x9A5D,0x9A5E, -0x9A5F,0xECA8,0x9A60,0x9A61,0x9A62,0x9A63,0x9A64,0x9A65, -0x9A66,0x9A67,0xD6B9,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0x9FF1,0x9FF2,0x9FF3, -0x9FF4,0x9FF5,0x9FF6,0x9FF7,0x9FF8,0x9FF9,0xC1C7,0x9FFA, -0x9FFB,0x9FFC,0x9FFD,0x9FFE,0xECDC,0xD1E0,0xA040,0xA041, -0xA042,0xA043,0xA044,0xA045,0xA046,0xA047,0xA048,0xA049, -0xECDB,0xA04A,0xA04B,0xA04C,0xA04D,0xD4EF,0xA04E,0xECDD, -0xA04F,0xA050,0xA051,0xA052,0xA053,0xA054,0xDBC6,0xA055, -0xA056,0xA057,0xA058,0xA059,0xA05A,0xA05B,0xA05C,0xA05D, -0xA05E,0xECDE,0xA05F,0xA060,0xA061,0xA062,0xA063,0xA064, -0xA065,0xA066,0xA067,0xA068,0xA069,0xA06A,0xB1AC,0xA06B, -0xA06C,0xA06D,0xA06E,0xA06F,0xA070,0xA071,0xA072,0xA073, -0xA074,0xA075,0xA076,0xA077,0xA078,0xA079,0xA07A,0xA07B, -0xA07C,0xA07D,0xA07E,0xA080,0xA081,0xECDF,0xA082,0xA083, -0xA084,0xA085,0xA086,0xA087,0xA088,0xA089,0xA08A,0xA08B, -0xECE0,0xA08C,0xD7A6,0xA08D,0xC5C0,0xA08E,0xA08F,0xA090, -0xEBBC,0xB0AE,0xA091,0xA092,0xA093,0xBEF4,0xB8B8,0xD2AF, -0xB0D6,0xB5F9,0xA094,0xD8B3,0xA095,0xCBAC,0xA096,0xE3DD, -0xA097,0xA098,0xA099,0xA09A,0xA09B,0xA09C,0xA09D,0xC6AC, -0xB0E6,0xA09E,0xA09F,0xA0A0,0xC5C6,0xEBB9,0xA0A1,0xA0A2, -0xA0A3,0xA0A4,0xEBBA,0xA0A5,0xA0A6,0xA0A7,0xEBBB,0xA0A8, -0xA0A9,0xD1C0,0xA0AA,0xC5A3,0xA0AB,0xEAF2,0xA0AC,0xC4B2, -0xA0AD,0xC4B5,0xC0CE,0xA0AE,0xA0AF,0xA0B0,0xEAF3,0xC4C1, -0xA0B1,0xCEEF,0xA0B2,0x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xAF77,0xAF78,0xF0F3,0xAF79,0xAF7A,0xF0F4, -0xF0F6,0xB4E1,0xAF7B,0xF0F1,0xAF7C,0xF0F7,0xAF7D,0xAF7E, -0xAF80,0xAF81,0xF0FA,0xAF82,0xF0F8,0xAF83,0xAF84,0xAF85, -0xF0F5,0xAF86,0xAF87,0xAF88,0xAF89,0xF0FD,0xAF8A,0xF0F9, -0xF0FC,0xF0FE,0xAF8B,0xF1A1,0xAF8C,0xAF8D,0xAF8E,0xCEC1, -0xF1A4,0xAF8F,0xF1A3,0xAF90,0xC1F6,0xF0FB,0xCADD,0xAF91, -0xAF92,0xB4F1,0xB1F1,0xCCB1,0xAF93,0xF1A6,0xAF94,0xAF95, -0xF1A7,0xAF96,0xAF97,0xF1AC,0xD5CE,0xF1A9,0xAF98,0xAF99, -0xC8B3,0xAF9A,0xAF9B,0xAF9C,0xF1A2,0xAF9D,0xF1AB,0xF1A8, -0xF1A5,0xAF9E,0xAF9F,0xF1AA,0xAFA0,0xB040,0xB041,0xB042, -0xB043,0xB044,0xB045,0xB046,0xB0A9,0xF1AD,0xB047,0xB048, -0xB049,0xB04A,0xB04B,0xB04C,0xF1AF,0xB04D,0xF1B1,0xB04E, -0xB04F,0xB050,0xB051,0xB052,0xF1B0,0xB053,0xF1AE,0xB054, -0xB055,0xB056,0xB057,0xD1A2,0xB058,0xB059,0xB05A,0xB05B, -0xB05C,0xB05D,0xB05E,0xF1B2,0xB05F,0xB060,0xB061,0xF1B3, -0xB062,0xB063,0xB064,0xB065,0xB066,0xB067,0xB068,0xB069, -0xB9EF,0xB06A,0xB06B,0xB5C7,0xB06C,0xB0D7,0xB0D9,0xB06D, -0xB06E,0xB06F,0xD4ED,0xB070,0xB5C4,0xB071,0xBDD4,0xBBCA, -0xF0A7,0xB072,0xB073,0xB8DE,0xB074,0xB075,0xF0A8,0xB076, -0xB077,0xB0A8,0xB078,0xF0A9,0xB079,0xB07A,0xCDEE,0xB07B, -0xB07C,0xF0AA,0xB07D,0xB07E,0xB080,0xB081,0xB082,0xB083, -0xB084,0xB085,0xB086,0xB087,0xF0AB,0xB088,0xB089,0xB08A, -0xB08B,0xB08C,0xB08D,0xB08E,0xB08F,0xB090,0xC6A4,0xB091, -0xB092,0xD6E5,0xF1E4,0xB093,0xF1E5,0xB094,0xB095,0xB096, -0xB097,0xB098,0xB099,0xB09A,0xB09B,0xB09C,0xB09D,0xC3F3, -0xB09E,0xB09F,0xD3DB,0xB0A0,0xB140,0xD6D1,0xC5E8,0xB141, -0xD3AF,0xB142,0xD2E6,0xB143,0xB144,0xEEC1,0xB0BB,0xD5B5, -0xD1CE,0xBCE0,0xBAD0,0xB145,0xBFF8,0xB146,0xB8C7,0xB5C1, -0xC5CC,0xB147,0xB148,0xCAA2,0xB149,0xB14A,0xB14B,0xC3CB, -0xB14C,0xB14D,0xB14E,0xB14F,0xB150,0xEEC2,0xB151,0xB152, -0xB153,0xB154,0xB155,0xB156,0xB157,0xB158,0xC4BF,0xB6A2, -0xB159,0xEDEC,0xC3A4,0xB15A,0xD6B1,0xB15B,0xB15C,0xB15D, -0xCFE0,0xEDEF,0xB15E,0xB15F,0xC5CE,0xB160,0xB6DC,0xB161, -0xB162,0xCAA1,0xB163,0xB164,0xEDED,0xB165,0xB166,0xEDF0, -0xEDF1,0xC3BC,0xB167,0xBFB4,0xB168,0xEDEE,0xB169,0xB16A, -0xB16B,0xB16C,0xB16D,0xB16E,0xB16F,0xB170,0xB171,0xB172, -0xB173,0xEDF4,0xEDF2,0xB174,0xB175,0xB176,0xB177,0xD5E6, -0xC3DF,0xB178,0xEDF3,0xB179,0xB17A,0xB17B,0xEDF6,0xB17C, -0xD5A3,0xD1A3,0xB17D,0xB17E,0xB180,0xEDF5,0xB181,0xC3D0, -0xB182,0xB183,0xB184,0xB185,0xB186,0xEDF7,0xBFF4,0xBEEC, -0xEDF8,0xB187,0xCCF7,0xB188,0xD1DB,0xB189,0xB18A,0xB18B, -0xD7C5,0xD5F6,0xB18C,0xEDFC,0xB18D,0xB18E,0xB18F,0xEDFB, -0xB190,0xB191,0xB192,0xB193,0xB194,0xB195,0xB196,0xB197, -0xEDF9,0xEDFA,0xB198,0xB199,0xB19A,0xB19B,0xB19C,0xB19D, -0xB19E,0xB19F,0xEDFD,0xBEA6,0xB1A0,0xB240,0xB241,0xB242, -0xB243,0xCBAF,0xEEA1,0xB6BD,0xB244,0xEEA2,0xC4C0,0xB245, -0xEDFE,0xB246,0xB247,0xBDDE,0xB2C7,0xB248,0xB249,0xB24A, -0xB24B,0xB24C,0xB24D,0xB24E,0xB24F,0xB250,0xB251,0xB252, -0xB253,0xB6C3,0xB254,0xB255,0xB256,0xEEA5,0xD8BA,0xEEA3, -0xEEA6,0xB257,0xB258,0xB259,0xC3E9,0xB3F2,0xB25A,0xB25B, -0xB25C,0xB25D,0xB25E,0xB25F,0xEEA7,0xEEA4,0xCFB9,0xB260, -0xB261,0xEEA8,0xC2F7,0xB262,0xB263,0xB264,0xB265,0xB266, -0xB267,0xB268,0xB269,0xB26A,0xB26B,0xB26C,0xB26D,0xEEA9, -0xEEAA,0xB26E,0xDEAB,0xB26F,0xB270,0xC6B3,0xB271,0xC7C6, -0xB272,0xD6F5,0xB5C9,0xB273,0xCBB2,0xB274,0xB275,0xB276, -0xEEAB,0xB277,0xB278,0xCDAB,0xB279,0xEEAC,0xB27A,0xB27B, -0xB27C,0xB27D,0xB27E,0xD5B0,0xB280,0xEEAD,0xB281,0xF6C4, -0xB282,0xB283,0xB284,0xB285,0xB286,0xB287,0xB288,0xB289, -0xB28A,0xB28B,0xB28C,0xB28D,0xB28E,0xDBC7,0xB28F,0xB290, -0xB291,0xB292,0xB293,0xB294,0xB295,0xB296,0xB297,0xB4A3, -0xB298,0xB299,0xB29A,0xC3AC,0xF1E6,0xB29B,0xB29C,0xB29D, -0xB29E,0xB29F,0xCAB8,0xD2D3,0xB2A0,0xD6AA,0xB340,0xEFF2, -0xB341,0xBED8,0xB342,0xBDC3,0xEFF3,0xB6CC,0xB0AB,0xB343, -0xB344,0xB345,0xB346,0xCAAF,0xB347,0xB348,0xEDB6,0xB349, -0xEDB7,0xB34A,0xB34B,0xB34C,0xB34D,0xCEF9,0xB7AF,0xBFF3, -0xEDB8,0xC2EB,0xC9B0,0xB34E,0xB34F,0xB350,0xB351,0xB352, -0xB353,0xEDB9,0xB354,0xB355,0xC6F6,0xBFB3,0xB356,0xB357, -0xB358,0xEDBC,0xC5F8,0xB359,0xD1D0,0xB35A,0xD7A9,0xEDBA, -0xEDBB,0xB35B,0xD1E2,0xB35C,0xEDBF,0xEDC0,0xB35D,0xEDC4, -0xB35E,0xB35F,0xB360,0xEDC8,0xB361,0xEDC6,0xEDCE,0xD5E8, -0xB362,0xEDC9,0xB363,0xB364,0xEDC7,0xEDBE,0xB365,0xB366, -0xC5E9,0xB367,0xB368,0xB369,0xC6C6,0xB36A,0xB36B,0xC9E9, -0xD4D2,0xEDC1,0xEDC2,0xEDC3,0xEDC5,0xB36C,0xC0F9,0xB36D, -0xB4A1,0xB36E,0xB36F,0xB370,0xB371,0xB9E8,0xB372,0xEDD0, -0xB373,0xB374,0xB375,0xB376,0xEDD1,0xB377,0xEDCA,0xB378, -0xEDCF,0xB379,0xCEF8,0xB37A,0xB37B,0xCBB6,0xEDCC,0xEDCD, -0xB37C,0xB37D,0xB37E,0xB380,0xB381,0xCFF5,0xB382,0xB383, -0xB384,0xB385,0xB386,0xB387,0xB388,0xB389,0xB38A,0xB38B, -0xB38C,0xB38D,0xEDD2,0xC1F2,0xD3B2,0xEDCB,0xC8B7,0xB38E, -0xB38F,0xB390,0xB391,0xB392,0xB393,0xB394,0xB395,0xBCEF, -0xB396,0xB397,0xB398,0xB399,0xC5F0,0xB39A,0xB39B,0xB39C, -0xB39D,0xB39E,0xB39F,0xB3A0,0xB440,0xB441,0xB442,0xEDD6, -0xB443,0xB5EF,0xB444,0xB445,0xC2B5,0xB0AD,0xCBE9,0xB446, -0xB447,0xB1AE,0xB448,0xEDD4,0xB449,0xB44A,0xB44B,0xCDEB, -0xB5E2,0xB44C,0xEDD5,0xEDD3,0xEDD7,0xB44D,0xB44E,0xB5FA, -0xB44F,0xEDD8,0xB450,0xEDD9,0xB451,0xEDDC,0xB452,0xB1CC, -0xB453,0xB454,0xB455,0xB456,0xB457,0xB458,0xB459,0xB45A, -0xC5F6,0xBCEE,0xEDDA,0xCCBC,0xB2EA,0xB45B,0xB45C,0xB45D, -0xB45E,0xEDDB,0xB45F,0xB460,0xB461,0xB462,0xC4EB,0xB463, -0xB464,0xB4C5,0xB465,0xB466,0xB467,0xB0F5,0xB468,0xB469, -0xB46A,0xEDDF,0xC0DA,0xB4E8,0xB46B,0xB46C,0xB46D,0xB46E, -0xC5CD,0xB46F,0xB470,0xB471,0xEDDD,0xBFC4,0xB472,0xB473, -0xB474,0xEDDE,0xB475,0xB476,0xB477,0xB478,0xB479,0xB47A, -0xB47B,0xB47C,0xB47D,0xB47E,0xB480,0xB481,0xB482,0xB483, -0xC4A5,0xB484,0xB485,0xB486,0xEDE0,0xB487,0xB488,0xB489, -0xB48A,0xB48B,0xEDE1,0xB48C,0xEDE3,0xB48D,0xB48E,0xC1D7, -0xB48F,0xB490,0xBBC7,0xB491,0xB492,0xB493,0xB494,0xB495, -0xB496,0xBDB8,0xB497,0xB498,0xB499,0xEDE2,0xB49A,0xB49B, -0xB49C,0xB49D,0xB49E,0xB49F,0xB4A0,0xB540,0xB541,0xB542, -0xB543,0xB544,0xB545,0xEDE4,0xB546,0xB547,0xB548,0xB549, -0xB54A,0xB54B,0xB54C,0xB54D,0xB54E,0xB54F,0xEDE6,0xB550, -0xB551,0xB552,0xB553,0xB554,0xEDE5,0xB555,0xB556,0xB557, -0xB558,0xB559,0xB55A,0xB55B,0xB55C,0xB55D,0xB55E,0xB55F, -0xB560,0xB561,0xB562,0xB563,0xEDE7,0xB564,0xB565,0xB566, -0xB567,0xB568,0xCABE,0xECEA,0xC0F1,0xB569,0xC9E7,0xB56A, -0xECEB,0xC6EE,0xB56B,0xB56C,0xB56D,0xB56E,0xECEC,0xB56F, -0xC6ED,0xECED,0xB570,0xB571,0xB572,0xB573,0xB574,0xB575, -0xB576,0xB577,0xB578,0xECF0,0xB579,0xB57A,0xD7E6,0xECF3, -0xB57B,0xB57C,0xECF1,0xECEE,0xECEF,0xD7A3,0xC9F1,0xCBEE, -0xECF4,0xB57D,0xECF2,0xB57E,0xB580,0xCFE9,0xB581,0xECF6, -0xC6B1,0xB582,0xB583,0xB584,0xB585,0xBCC0,0xB586,0xECF5, -0xB587,0xB588,0xB589,0xB58A,0xB58B,0xB58C,0xB58D,0xB5BB, -0xBBF6,0xB58E,0xECF7,0xB58F,0xB590,0xB591,0xB592,0xB593, -0xD9F7,0xBDFB,0xB594,0xB595,0xC2BB,0xECF8,0xB596,0xB597, -0xB598,0xB599,0xECF9,0xB59A,0xB59B,0xB59C,0xB59D,0xB8A3, -0xB59E,0xB59F,0xB5A0,0xB640,0xB641,0xB642,0xB643,0xB644, -0xB645,0xB646,0xECFA,0xB647,0xB648,0xB649,0xB64A,0xB64B, -0xB64C,0xB64D,0xB64E,0xB64F,0xB650,0xB651,0xB652,0xECFB, -0xB653,0xB654,0xB655,0xB656,0xB657,0xB658,0xB659,0xB65A, -0xB65B,0xB65C,0xB65D,0xECFC,0xB65E,0xB65F,0xB660,0xB661, -0xB662,0xD3ED,0xD8AE,0xC0EB,0xB663,0xC7DD,0xBACC,0xB664, -0xD0E3,0xCBBD,0xB665,0xCDBA,0xB666,0xB667,0xB8D1,0xB668, -0xB669,0xB1FC,0xB66A,0xC7EF,0xB66B,0xD6D6,0xB66C,0xB66D, -0xB66E,0xBFC6,0xC3EB,0xB66F,0xB670,0xEFF5,0xB671,0xB672, -0xC3D8,0xB673,0xB674,0xB675,0xB676,0xB677,0xB678,0xD7E2, -0xB679,0xB67A,0xB67B,0xEFF7,0xB3D3,0xB67C,0xC7D8,0xD1ED, -0xB67D,0xD6C8,0xB67E,0xEFF8,0xB680,0xEFF6,0xB681,0xBBFD, -0xB3C6,0xB682,0xB683,0xB684,0xB685,0xB686,0xB687,0xB688, -0xBDD5,0xB689,0xB68A,0xD2C6,0xB68B,0xBBE0,0xB68C,0xB68D, -0xCFA1,0xB68E,0xEFFC,0xEFFB,0xB68F,0xB690,0xEFF9,0xB691, -0xB692,0xB693,0xB694,0xB3CC,0xB695,0xC9D4,0xCBB0,0xB696, -0xB697,0xB698,0xB699,0xB69A,0xEFFE,0xB69B,0xB69C,0xB0DE, -0xB69D,0xB69E,0xD6C9,0xB69F,0xB6A0,0xB740,0xEFFD,0xB741, -0xB3ED,0xB742,0xB743,0xF6D5,0xB744,0xB745,0xB746,0xB747, -0xB748,0xB749,0xB74A,0xB74B,0xB74C,0xB74D,0xB74E,0xB74F, -0xB750,0xB751,0xB752,0xCEC8,0xB753,0xB754,0xB755,0xF0A2, -0xB756,0xF0A1,0xB757,0xB5BE,0xBCDA,0xBBFC,0xB758,0xB8E5, -0xB759,0xB75A,0xB75B,0xB75C,0xB75D,0xB75E,0xC4C2,0xB75F, -0xB760,0xB761,0xB762,0xB763,0xB764,0xB765,0xB766,0xB767, -0xB768,0xF0A3,0xB769,0xB76A,0xB76B,0xB76C,0xB76D,0xCBEB, -0xB76E,0xB76F,0xB770,0xB771,0xB772,0xB773,0xB774,0xB775, -0xB776,0xB777,0xB778,0xB779,0xB77A,0xB77B,0xB77C,0xB77D, -0xB77E,0xB780,0xB781,0xB782,0xB783,0xB784,0xB785,0xB786, -0xF0A6,0xB787,0xB788,0xB789,0xD1A8,0xB78A,0xBEBF,0xC7EE, -0xF1B6,0xF1B7,0xBFD5,0xB78B,0xB78C,0xB78D,0xB78E,0xB4A9, -0xF1B8,0xCDBB,0xB78F,0xC7D4,0xD5AD,0xB790,0xF1B9,0xB791, -0xF1BA,0xB792,0xB793,0xB794,0xB795,0xC7CF,0xB796,0xB797, -0xB798,0xD2A4,0xD6CF,0xB799,0xB79A,0xF1BB,0xBDD1,0xB4B0, -0xBEBD,0xB79B,0xB79C,0xB79D,0xB4DC,0xCED1,0xB79E,0xBFDF, -0xF1BD,0xB79F,0xB7A0,0xB840,0xB841,0xBFFA,0xF1BC,0xB842, -0xF1BF,0xB843,0xB844,0xB845,0xF1BE,0xF1C0,0xB846,0xB847, -0xB848,0xB849,0xB84A,0xF1C1,0xB84B,0xB84C,0xB84D,0xB84E, -0xB84F,0xB850,0xB851,0xB852,0xB853,0xB854,0xB855,0xC1FE, -0xB856,0xB857,0xB858,0xB859,0xB85A,0xB85B,0xB85C,0xB85D, -0xB85E,0xB85F,0xB860,0xC1A2,0xB861,0xB862,0xB863,0xB864, -0xB865,0xB866,0xB867,0xB868,0xB869,0xB86A,0xCAFA,0xB86B, -0xB86C,0xD5BE,0xB86D,0xB86E,0xB86F,0xB870,0xBEBA,0xBEB9, -0xD5C2,0xB871,0xB872,0xBFA2,0xB873,0xCDAF,0xF1B5,0xB874, -0xB875,0xB876,0xB877,0xB878,0xB879,0xBDDF,0xB87A,0xB6CB, -0xB87B,0xB87C,0xB87D,0xB87E,0xB880,0xB881,0xB882,0xB883, -0xB884,0xD6F1,0xF3C3,0xB885,0xB886,0xF3C4,0xB887,0xB8CD, -0xB888,0xB889,0xB88A,0xF3C6,0xF3C7,0xB88B,0xB0CA,0xB88C, -0xF3C5,0xB88D,0xF3C9,0xCBF1,0xB88E,0xB88F,0xB890,0xF3CB, -0xB891,0xD0A6,0xB892,0xB893,0xB1CA,0xF3C8,0xB894,0xB895, -0xB896,0xF3CF,0xB897,0xB5D1,0xB898,0xB899,0xF3D7,0xB89A, -0xF3D2,0xB89B,0xB89C,0xB89D,0xF3D4,0xF3D3,0xB7FB,0xB89E, -0xB1BF,0xB89F,0xF3CE,0xF3CA,0xB5DA,0xB8A0,0xF3D0,0xB940, -0xB941,0xF3D1,0xB942,0xF3D5,0xB943,0xB944,0xB945,0xB946, -0xF3CD,0xB947,0xBCE3,0xB948,0xC1FD,0xB949,0xF3D6,0xB94A, -0xB94B,0xB94C,0xB94D,0xB94E,0xB94F,0xF3DA,0xB950,0xF3CC, -0xB951,0xB5C8,0xB952,0xBDEE,0xF3DC,0xB953,0xB954,0xB7A4, -0xBFF0,0xD6FE,0xCDB2,0xB955,0xB4F0,0xB956,0xB2DF,0xB957, -0xF3D8,0xB958,0xF3D9,0xC9B8,0xB959,0xF3DD,0xB95A,0xB95B, -0xF3DE,0xB95C,0xF3E1,0xB95D,0xB95E,0xB95F,0xB960,0xB961, -0xB962,0xB963,0xB964,0xB965,0xB966,0xB967,0xF3DF,0xB968, -0xB969,0xF3E3,0xF3E2,0xB96A,0xB96B,0xF3DB,0xB96C,0xBFEA, -0xB96D,0xB3EF,0xB96E,0xF3E0,0xB96F,0xB970,0xC7A9,0xB971, -0xBCF2,0xB972,0xB973,0xB974,0xB975,0xF3EB,0xB976,0xB977, -0xB978,0xB979,0xB97A,0xB97B,0xB97C,0xB9BF,0xB97D,0xB97E, -0xF3E4,0xB980,0xB981,0xB982,0xB2AD,0xBBFE,0xB983,0xCBE3, -0xB984,0xB985,0xB986,0xB987,0xF3ED,0xF3E9,0xB988,0xB989, -0xB98A,0xB9DC,0xF3EE,0xB98B,0xB98C,0xB98D,0xF3E5,0xF3E6, -0xF3EA,0xC2E1,0xF3EC,0xF3EF,0xF3E8,0xBCFD,0xB98E,0xB98F, -0xB990,0xCFE4,0xB991,0xB992,0xF3F0,0xB993,0xB994,0xB995, -0xF3E7,0xB996,0xB997,0xB998,0xB999,0xB99A,0xB99B,0xB99C, -0xB99D,0xF3F2,0xB99E,0xB99F,0xB9A0,0xBA40,0xD7AD,0xC6AA, -0xBA41,0xBA42,0xBA43,0xBA44,0xF3F3,0xBA45,0xBA46,0xBA47, -0xBA48,0xF3F1,0xBA49,0xC2A8,0xBA4A,0xBA4B,0xBA4C,0xBA4D, -0xBA4E,0xB8DD,0xF3F5,0xBA4F,0xBA50,0xF3F4,0xBA51,0xBA52, -0xBA53,0xB4DB,0xBA54,0xBA55,0xBA56,0xF3F6,0xF3F7,0xBA57, -0xBA58,0xBA59,0xF3F8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C8E, -0xCBD8,0xBC8F,0xCBF7,0xBC90,0xBC91,0xBC92,0xBC93,0xBDF4, -0xBC94,0xBC95,0xBC96,0xD7CF,0xBC97,0xBC98,0xBC99,0xC0DB, -0xBC9A,0xBC9B,0xBC9C,0xBC9D,0xBC9E,0xBC9F,0xBCA0,0xBD40, -0xBD41,0xBD42,0xBD43,0xBD44,0xBD45,0xBD46,0xBD47,0xBD48, -0xBD49,0xBD4A,0xBD4B,0xBD4C,0xBD4D,0xBD4E,0xBD4F,0xBD50, -0xBD51,0xBD52,0xBD53,0xBD54,0xBD55,0xBD56,0xBD57,0xBD58, -0xBD59,0xBD5A,0xBD5B,0xBD5C,0xBD5D,0xBD5E,0xBD5F,0xBD60, -0xBD61,0xBD62,0xBD63,0xBD64,0xBD65,0xBD66,0xBD67,0xBD68, -0xBD69,0xBD6A,0xBD6B,0xBD6C,0xBD6D,0xBD6E,0xBD6F,0xBD70, -0xBD71,0xBD72,0xBD73,0xBD74,0xBD75,0xBD76,0xD0F5,0xBD77, -0xBD78,0xBD79,0xBD7A,0xBD7B,0xBD7C,0xBD7D,0xBD7E,0xF4EA, -0xBD80,0xBD81,0xBD82,0xBD83,0xBD84,0xBD85,0xBD86,0xBD87, -0xBD88,0xBD89,0xBD8A,0xBD8B,0xBD8C,0xBD8D,0xBD8E,0xBD8F, -0xBD90,0xBD91,0xBD92,0xBD93,0xBD94,0xBD95,0xBD96,0xBD97, -0xBD98,0xBD99,0xBD9A,0xBD9B,0xBD9C,0xBD9D,0xBD9E,0xBD9F, -0xBDA0,0xBE40,0xBE41,0xBE42,0xBE43,0xBE44,0xBE45,0xBE46, -0xBE47,0xBE48,0xBE49,0xBE4A,0xBE4B,0xBE4C,0xF4EB,0xBE4D, -0xBE4E,0xBE4F,0xBE50,0xBE51,0xBE52,0xBE53,0xF4EC,0xBE54, -0xBE55,0xBE56,0xBE57,0xBE58,0xBE59,0xBE5A,0xBE5B,0xBE5C, -0xBE5D,0xBE5E,0xBE5F,0xBE60,0xBE61,0xBE62,0xBE63,0xBE64, -0xBE65,0xBE66,0xBE67,0xBE68,0xBE69,0xBE6A,0xBE6B,0xBE6C, -0xBE6D,0xBE6E,0xBE6F,0xBE70,0xBE71,0xBE72,0xBE73,0xBE74, -0xBE75,0xBE76,0xBE77,0xBE78,0xBE79,0xBE7A,0xBE7B,0xBE7C, -0xBE7D,0xBE7E,0xBE80,0xBE81,0xBE82,0xBE83,0xBE84,0xBE85, -0xBE86,0xBE87,0xBE88,0xBE89,0xBE8A,0xBE8B,0xBE8C,0xBE8D, -0xBE8E,0xBE8F,0xBE90,0xBE91,0xBE92,0xBE93,0xBE94,0xBE95, -0xBE96,0xBE97,0xBE98,0xBE99,0xBE9A,0xBE9B,0xBE9C,0xBE9D, -0xBE9E,0xBE9F,0xBEA0,0xBF40,0xBF41,0xBF42,0xBF43,0xBF44, -0xBF45,0xBF46,0xBF47,0xBF48,0xBF49,0xBF4A,0xBF4B,0xBF4C, -0xBF4D,0xBF4E,0xBF4F,0xBF50,0xBF51,0xBF52,0xBF53,0xBF54, -0xBF55,0xBF56,0xBF57,0xBF58,0xBF59,0xBF5A,0xBF5B,0xBF5C, -0xBF5D,0xBF5E,0xBF5F,0xBF60,0xBF61,0xBF62,0xBF63,0xBF64, -0xBF65,0xBF66,0xBF67,0xBF68,0xBF69,0xBF6A,0xBF6B,0xBF6C, -0xBF6D,0xBF6E,0xBF6F,0xBF70,0xBF71,0xBF72,0xBF73,0xBF74, -0xBF75,0xBF76,0xBF77,0xBF78,0xBF79,0xBF7A,0xBF7B,0xBF7C, -0xBF7D,0xBF7E,0xBF80,0xF7E3,0xBF81,0xBF82,0xBF83,0xBF84, -0xBF85,0xB7B1,0xBF86,0xBF87,0xBF88,0xBF89,0xBF8A,0xF4ED, -0xBF8B,0xBF8C,0xBF8D,0xBF8E,0xBF8F,0xBF90,0xBF91,0xBF92, -0xBF93,0xBF94,0xBF95,0xBF96,0xBF97,0xBF98,0xBF99,0xBF9A, -0xBF9B,0xBF9C,0xBF9D,0xBF9E,0xBF9F,0xBFA0,0xC040,0xC041, -0xC042,0xC043,0xC044,0xC045,0xC046,0xC047,0xC048,0xC049, -0xC04A,0xC04B,0xC04C,0xC04D,0xC04E,0xC04F,0xC050,0xC051, -0xC052,0xC053,0xC054,0xC055,0xC056,0xC057,0xC058,0xC059, -0xC05A,0xC05B,0xC05C,0xC05D,0xC05E,0xC05F,0xC060,0xC061, -0xC062,0xC063,0xD7EB,0xC064,0xC065,0xC066,0xC067,0xC068, -0xC069,0xC06A,0xC06B,0xC06C,0xC06D,0xC06E,0xC06F,0xC070, -0xC071,0xC072,0xC073,0xC074,0xC075,0xC076,0xC077,0xC078, -0xC079,0xC07A,0xC07B,0xF4EE,0xC07C,0xC07D,0xC07E,0xE6F9, -0xBEC0,0xE6FA,0xBAEC,0xE6FB,0xCFCB,0xE6FC,0xD4BC,0xBCB6, -0xE6FD,0xE6FE,0xBCCD,0xC8D2,0xCEB3,0xE7A1,0xC080,0xB4BF, -0xE7A2,0xC9B4,0xB8D9,0xC4C9,0xC081,0xD7DD,0xC2DA,0xB7D7, -0xD6BD,0xCEC6,0xB7C4,0xC082,0xC083,0xC5A6,0xE7A3,0xCFDF, -0xE7A4,0xE7A5,0xE7A6,0xC1B7,0xD7E9,0xC9F0,0xCFB8,0xD6AF, -0xD6D5,0xE7A7,0xB0ED,0xE7A8,0xE7A9,0xC9DC,0xD2EF,0xBEAD, -0xE7AA,0xB0F3,0xC8DE,0xBDE1,0xE7AB,0xC8C6,0xC084,0xE7AC, -0xBBE6,0xB8F8,0xD1A4,0xE7AD,0xC2E7,0xBEF8,0xBDCA,0xCDB3, -0xE7AE,0xE7AF,0xBEEE,0xD0E5,0xC085,0xCBE7,0xCCD0,0xBCCC, -0xE7B0,0xBCA8,0xD0F7,0xE7B1,0xC086,0xD0F8,0xE7B2,0xE7B3, -0xB4C2,0xE7B4,0xE7B5,0xC9FE,0xCEAC,0xC3E0,0xE7B7,0xB1C1, -0xB3F1,0xC087,0xE7B8,0xE7B9,0xD7DB,0xD5C0,0xE7BA,0xC2CC, -0xD7BA,0xE7BB,0xE7BC,0xE7BD,0xBCEA,0xC3E5,0xC0C2,0xE7BE, -0xE7BF,0xBCA9,0xC088,0xE7C0,0xE7C1,0xE7B6,0xB6D0,0xE7C2, -0xC089,0xE7C3,0xE7C4,0xBBBA,0xB5DE,0xC2C6,0xB1E0,0xE7C5, -0xD4B5,0xE7C6,0xB8BF,0xE7C8,0xE7C7,0xB7EC,0xC08A,0xE7C9, -0xB2F8,0xE7CA,0xE7CB,0xE7CC,0xE7CD,0xE7CE,0xE7CF,0xE7D0, -0xD3A7,0xCBF5,0xE7D1,0xE7D2,0xE7D3,0xE7D4,0xC9C9,0xE7D5, -0xE7D6,0xE7D7,0xE7D8,0xE7D9,0xBDC9,0xE7DA,0xF3BE,0xC08B, -0xB8D7,0xC08C,0xC8B1,0xC08D,0xC08E,0xC08F,0xC090,0xC091, -0xC092,0xC093,0xF3BF,0xC094,0xF3C0,0xF3C1,0xC095,0xC096, -0xC097,0xC098,0xC099,0xC09A,0xC09B,0xC09C,0xC09D,0xC09E, -0xB9DE,0xCDF8,0xC09F,0xC0A0,0xD8E8,0xBAB1,0xC140,0xC2DE, -0xEEB7,0xC141,0xB7A3,0xC142,0xC143,0xC144,0xC145,0xEEB9, -0xC146,0xEEB8,0xB0D5,0xC147,0xC148,0xC149,0xC14A,0xC14B, -0xEEBB,0xD5D6,0xD7EF,0xC14C,0xC14D,0xC14E,0xD6C3,0xC14F, -0xC150,0xEEBD,0xCAF0,0xC151,0xEEBC,0xC152,0xC153,0xC154, -0xC155,0xEEBE,0xC156,0xC157,0xC158,0xC159,0xEEC0,0xC15A, -0xC15B,0xEEBF,0xC15C,0xC15D,0xC15E,0xC15F,0xC160,0xC161, -0xC162,0xC163,0xD1F2,0xC164,0xC7BC,0xC165,0xC3C0,0xC166, -0xC167,0xC168,0xC169,0xC16A,0xB8E1,0xC16B,0xC16C,0xC16D, -0xC16E,0xC16F,0xC1E7,0xC170,0xC171,0xF4C6,0xD0DF,0xF4C7, -0xC172,0xCFDB,0xC173,0xC174,0xC8BA,0xC175,0xC176,0xF4C8, -0xC177,0xC178,0xC179,0xC17A,0xC17B,0xC17C,0xC17D,0xF4C9, -0xF4CA,0xC17E,0xF4CB,0xC180,0xC181,0xC182,0xC183,0xC184, -0xD9FA,0xB8FE,0xC185,0xC186,0xE5F1,0xD3F0,0xC187,0xF4E0, -0xC188,0xCECC,0xC189,0xC18A,0xC18B,0xB3E1,0xC18C,0xC18D, -0xC18E,0xC18F,0xF1B4,0xC190,0xD2EE,0xC191,0xF4E1,0xC192, -0xC193,0xC194,0xC195,0xC196,0xCFE8,0xF4E2,0xC197,0xC198, -0xC7CC,0xC199,0xC19A,0xC19B,0xC19C,0xC19D,0xC19E,0xB5D4, -0xB4E4,0xF4E4,0xC19F,0xC1A0,0xC240,0xF4E3,0xF4E5,0xC241, -0xC242,0xF4E6,0xC243,0xC244,0xC245,0xC246,0xF4E7,0xC247, -0xBAB2,0xB0BF,0xC248,0xF4E8,0xC249,0xC24A,0xC24B,0xC24C, -0xC24D,0xC24E,0xC24F,0xB7AD,0xD2ED,0xC250,0xC251,0xC252, -0xD2AB,0xC0CF,0xC253,0xBFBC,0xEBA3,0xD5DF,0xEAC8,0xC254, -0xC255,0xC256,0xC257,0xF1F3,0xB6F8,0xCBA3,0xC258,0xC259, -0xC4CD,0xC25A,0xF1E7,0xC25B,0xF1E8,0xB8FB,0xF1E9,0xBAC4, -0xD4C5,0xB0D2,0xC25C,0xC25D,0xF1EA,0xC25E,0xC25F,0xC260, -0xF1EB,0xC261,0xF1EC,0xC262,0xC263,0xF1ED,0xF1EE,0xF1EF, -0xF1F1,0xF1F0,0xC5D5,0xC264,0xC265,0xC266,0xC267,0xC268, -0xC269,0xF1F2,0xC26A,0xB6FA,0xC26B,0xF1F4,0xD2AE,0xDEC7, -0xCBCA,0xC26C,0xC26D,0xB3DC,0xC26E,0xB5A2,0xC26F,0xB9A2, -0xC270,0xC271,0xC4F4,0xF1F5,0xC272,0xC273,0xF1F6,0xC274, -0xC275,0xC276,0xC1C4,0xC1FB,0xD6B0,0xF1F7,0xC277,0xC278, -0xC279,0xC27A,0xF1F8,0xC27B,0xC1AA,0xC27C,0xC27D,0xC27E, -0xC6B8,0xC280,0xBEDB,0xC281,0xC282,0xC283,0xC284,0xC285, -0xC286,0xC287,0xC288,0xC289,0xC28A,0xC28B,0xC28C,0xC28D, -0xC28E,0xF1F9,0xB4CF,0xC28F,0xC290,0xC291,0xC292,0xC293, -0xC294,0xF1FA,0xC295,0xC296,0xC297,0xC298,0xC299,0xC29A, -0xC29B,0xC29C,0xC29D,0xC29E,0xC29F,0xC2A0,0xC340,0xEDB2, -0xEDB1,0xC341,0xC342,0xCBE0,0xD2DE,0xC343,0xCBC1,0xD5D8, -0xC344,0xC8E2,0xC345,0xC0DF,0xBCA1,0xC346,0xC347,0xC348, -0xC349,0xC34A,0xC34B,0xEBC1,0xC34C,0xC34D,0xD0A4,0xC34E, -0xD6E2,0xC34F,0xB6C7,0xB8D8,0xEBC0,0xB8CE,0xC350,0xEBBF, -0xB3A6,0xB9C9,0xD6AB,0xC351,0xB7F4,0xB7CA,0xC352,0xC353, -0xC354,0xBCE7,0xB7BE,0xEBC6,0xC355,0xEBC7,0xB0B9,0xBFCF, -0xC356,0xEBC5,0xD3FD,0xC357,0xEBC8,0xC358,0xC359,0xEBC9, -0xC35A,0xC35B,0xB7CE,0xC35C,0xEBC2,0xEBC4,0xC9F6,0xD6D7, -0xD5CD,0xD0B2,0xEBCF,0xCEB8,0xEBD0,0xC35D,0xB5A8,0xC35E, -0xC35F,0xC360,0xC361,0xC362,0xB1B3,0xEBD2,0xCCA5,0xC363, -0xC364,0xC365,0xC366,0xC367,0xC368,0xC369,0xC5D6,0xEBD3, -0xC36A,0xEBD1,0xC5DF,0xEBCE,0xCAA4,0xEBD5,0xB0FB,0xC36B, -0xC36C,0xBAFA,0xC36D,0xC36E,0xD8B7,0xF1E3,0xC36F,0xEBCA, -0xEBCB,0xEBCC,0xEBCD,0xEBD6,0xE6C0,0xEBD9,0xC370,0xBFE8, -0xD2C8,0xEBD7,0xEBDC,0xB8EC,0xEBD8,0xC371,0xBDBA,0xC372, -0xD0D8,0xC373,0xB0B7,0xC374,0xEBDD,0xC4DC,0xC375,0xC376, -0xC377,0xC378,0xD6AC,0xC379,0xC37A,0xC37B,0xB4E0,0xC37C, -0xC37D,0xC2F6,0xBCB9,0xC37E,0xC380,0xEBDA,0xEBDB,0xD4E0, -0xC6EA,0xC4D4,0xEBDF,0xC5A7,0xD9F5,0xC381,0xB2B1,0xC382, -0xEBE4,0xC383,0xBDC5,0xC384,0xC385,0xC386,0xEBE2,0xC387, -0xC388,0xC389,0xC38A,0xC38B,0xC38C,0xC38D,0xC38E,0xC38F, -0xC390,0xC391,0xC392,0xC393,0xEBE3,0xC394,0xC395,0xB8AC, -0xC396,0xCDD1,0xEBE5,0xC397,0xC398,0xC399,0xEBE1,0xC39A, -0xC1B3,0xC39B,0xC39C,0xC39D,0xC39E,0xC39F,0xC6A2,0xC3A0, -0xC440,0xC441,0xC442,0xC443,0xC444,0xC445,0xCCF3,0xC446, -0xEBE6,0xC447,0xC0B0,0xD2B8,0xEBE7,0xC448,0xC449,0xC44A, -0xB8AF,0xB8AD,0xC44B,0xEBE8,0xC7BB,0xCDF3,0xC44C,0xC44D, -0xC44E,0xEBEA,0xEBEB,0xC44F,0xC450,0xC451,0xC452,0xC453, -0xEBED,0xC454,0xC455,0xC456,0xC457,0xD0C8,0xC458,0xEBF2, -0xC459,0xEBEE,0xC45A,0xC45B,0xC45C,0xEBF1,0xC8F9,0xC45D, -0xD1FC,0xEBEC,0xC45E,0xC45F,0xEBE9,0xC460,0xC461,0xC462, -0xC463,0xB8B9,0xCFD9,0xC4E5,0xEBEF,0xEBF0,0xCCDA,0xCDC8, -0xB0F2,0xC464,0xEBF6,0xC465,0xC466,0xC467,0xC468,0xC469, -0xEBF5,0xC46A,0xB2B2,0xC46B,0xC46C,0xC46D,0xC46E,0xB8E0, -0xC46F,0xEBF7,0xC470,0xC471,0xC472,0xC473,0xC474,0xC475, -0xB1EC,0xC476,0xC477,0xCCC5,0xC4A4,0xCFA5,0xC478,0xC479, -0xC47A,0xC47B,0xC47C,0xEBF9,0xC47D,0xC47E,0xECA2,0xC480, -0xC5F2,0xC481,0xEBFA,0xC482,0xC483,0xC484,0xC485,0xC486, -0xC487,0xC488,0xC489,0xC9C5,0xC48A,0xC48B,0xC48C,0xC48D, -0xC48E,0xC48F,0xE2DF,0xEBFE,0xC490,0xC491,0xC492,0xC493, -0xCDCE,0xECA1,0xB1DB,0xD3B7,0xC494,0xC495,0xD2DC,0xC496, -0xC497,0xC498,0xEBFD,0xC499,0xEBFB,0xC49A,0xC49B,0xC49C, -0xC49D,0xC49E,0xC49F,0xC4A0,0xC540,0xC541,0xC542,0xC543, -0xC544,0xC545,0xC546,0xC547,0xC548,0xC549,0xC54A,0xC54B, -0xC54C,0xC54D,0xC54E,0xB3BC,0xC54F,0xC550,0xC551,0xEAB0, -0xC552,0xC553,0xD7D4,0xC554,0xF4AB,0xB3F4,0xC555,0xC556, -0xC557,0xC558,0xC559,0xD6C1,0xD6C2,0xC55A,0xC55B,0xC55C, -0xC55D,0xC55E,0xC55F,0xD5E9,0xBECA,0xC560,0xF4A7,0xC561, -0xD2A8,0xF4A8,0xF4A9,0xC562,0xF4AA,0xBECB,0xD3DF,0xC563, -0xC564,0xC565,0xC566,0xC567,0xC9E0,0xC9E1,0xC568,0xC569, -0xF3C2,0xC56A,0xCAE6,0xC56B,0xCCF2,0xC56C,0xC56D,0xC56E, -0xC56F,0xC570,0xC571,0xE2B6,0xCBB4,0xC572,0xCEE8,0xD6DB, -0xC573,0xF4AD,0xF4AE,0xF4AF,0xC574,0xC575,0xC576,0xC577, -0xF4B2,0xC578,0xBABD,0xF4B3,0xB0E3,0xF4B0,0xC579,0xF4B1, -0xBDA2,0xB2D5,0xC57A,0xF4B6,0xF4B7,0xB6E6,0xB2B0,0xCFCF, -0xF4B4,0xB4AC,0xC57B,0xF4B5,0xC57C,0xC57D,0xF4B8,0xC57E, -0xC580,0xC581,0xC582,0xC583,0xF4B9,0xC584,0xC585,0xCDA7, -0xC586,0xF4BA,0xC587,0xF4BB,0xC588,0xC589,0xC58A,0xF4BC, -0xC58B,0xC58C,0xC58D,0xC58E,0xC58F,0xC590,0xC591,0xC592, -0xCBD2,0xC593,0xF4BD,0xC594,0xC595,0xC596,0xC597,0xF4BE, -0xC598,0xC599,0xC59A,0xC59B,0xC59C,0xC59D,0xC59E,0xC59F, -0xF4BF,0xC5A0,0xC640,0xC641,0xC642,0xC643,0xF4DE,0xC1BC, -0xBCE8,0xC644,0xC9AB,0xD1DE,0xE5F5,0xC645,0xC646,0xC647, -0xC648,0xDCB3,0xD2D5,0xC649,0xC64A,0xDCB4,0xB0AC,0xDCB5, -0xC64B,0xC64C,0xBDDA,0xC64D,0xDCB9,0xC64E,0xC64F,0xC650, -0xD8C2,0xC651,0xDCB7,0xD3F3,0xC652,0xC9D6,0xDCBA,0xDCB6, -0xC653,0xDCBB,0xC3A2,0xC654,0xC655,0xC656,0xC657,0xDCBC, -0xDCC5,0xDCBD,0xC658,0xC659,0xCEDF,0xD6A5,0xC65A,0xDCCF, -0xC65B,0xDCCD,0xC65C,0xC65D,0xDCD2,0xBDE6,0xC2AB,0xC65E, -0xDCB8,0xDCCB,0xDCCE,0xDCBE,0xB7D2,0xB0C5,0xDCC7,0xD0BE, -0xDCC1,0xBBA8,0xC65F,0xB7BC,0xDCCC,0xC660,0xC661,0xDCC6, -0xDCBF,0xC7DB,0xC662,0xC663,0xC664,0xD1BF,0xDCC0,0xC665, -0xC666,0xDCCA,0xC667,0xC668,0xDCD0,0xC669,0xC66A,0xCEAD, -0xDCC2,0xC66B,0xDCC3,0xDCC8,0xDCC9,0xB2D4,0xDCD1,0xCBD5, -0xC66C,0xD4B7,0xDCDB,0xDCDF,0xCCA6,0xDCE6,0xC66D,0xC3E7, -0xDCDC,0xC66E,0xC66F,0xBFC1,0xDCD9,0xC670,0xB0FA,0xB9B6, -0xDCE5,0xDCD3,0xC671,0xDCC4,0xDCD6,0xC8F4,0xBFE0,0xC672, -0xC673,0xC674,0xC675,0xC9BB,0xC676,0xC677,0xC678,0xB1BD, -0xC679,0xD3A2,0xC67A,0xC67B,0xDCDA,0xC67C,0xC67D,0xDCD5, -0xC67E,0xC6BB,0xC680,0xDCDE,0xC681,0xC682,0xC683,0xC684, -0xC685,0xD7C2,0xC3AF,0xB7B6,0xC7D1,0xC3A9,0xDCE2,0xDCD8, -0xDCEB,0xDCD4,0xC686,0xC687,0xDCDD,0xC688,0xBEA5,0xDCD7, -0xC689,0xDCE0,0xC68A,0xC68B,0xDCE3,0xDCE4,0xC68C,0xDCF8, -0xC68D,0xC68E,0xDCE1,0xDDA2,0xDCE7,0xC68F,0xC690,0xC691, -0xC692,0xC693,0xC694,0xC695,0xC696,0xC697,0xC698,0xBCEB, -0xB4C4,0xC699,0xC69A,0xC3A3,0xB2E7,0xDCFA,0xC69B,0xDCF2, -0xC69C,0xDCEF,0xC69D,0xDCFC,0xDCEE,0xD2F0,0xB2E8,0xC69E, -0xC8D7,0xC8E3,0xDCFB,0xC69F,0xDCED,0xC6A0,0xC740,0xC741, -0xDCF7,0xC742,0xC743,0xDCF5,0xC744,0xC745,0xBEA3,0xDCF4, -0xC746,0xB2DD,0xC747,0xC748,0xC749,0xC74A,0xC74B,0xDCF3, -0xBCF6,0xDCE8,0xBBC4,0xC74C,0xC0F3,0xC74D,0xC74E,0xC74F, -0xC750,0xC751,0xBCD4,0xDCE9,0xDCEA,0xC752,0xDCF1,0xDCF6, -0xDCF9,0xB5B4,0xC753,0xC8D9,0xBBE7,0xDCFE,0xDCFD,0xD3AB, -0xDDA1,0xDDA3,0xDDA5,0xD2F1,0xDDA4,0xDDA6,0xDDA7,0xD2A9, -0xC754,0xC755,0xC756,0xC757,0xC758,0xC759,0xC75A,0xBAC9, -0xDDA9,0xC75B,0xC75C,0xDDB6,0xDDB1,0xDDB4,0xC75D,0xC75E, -0xC75F,0xC760,0xC761,0xC762,0xC763,0xDDB0,0xC6CE,0xC764, -0xC765,0xC0F2,0xC766,0xC767,0xC768,0xC769,0xC9AF,0xC76A, -0xC76B,0xC76C,0xDCEC,0xDDAE,0xC76D,0xC76E,0xC76F,0xC770, -0xDDB7,0xC771,0xC772,0xDCF0,0xDDAF,0xC773,0xDDB8,0xC774, -0xDDAC,0xC775,0xC776,0xC777,0xC778,0xC779,0xC77A,0xC77B, -0xDDB9,0xDDB3,0xDDAD,0xC4AA,0xC77C,0xC77D,0xC77E,0xC780, -0xDDA8,0xC0B3,0xC1AB,0xDDAA,0xDDAB,0xC781,0xDDB2,0xBBF1, -0xDDB5,0xD3A8,0xDDBA,0xC782,0xDDBB,0xC3A7,0xC783,0xC784, -0xDDD2,0xDDBC,0xC785,0xC786,0xC787,0xDDD1,0xC788,0xB9BD, -0xC789,0xC78A,0xBED5,0xC78B,0xBEFA,0xC78C,0xC78D,0xBACA, -0xC78E,0xC78F,0xC790,0xC791,0xDDCA,0xC792,0xDDC5,0xC793, -0xDDBF,0xC794,0xC795,0xC796,0xB2CB,0xDDC3,0xC797,0xDDCB, -0xB2A4,0xDDD5,0xC798,0xC799,0xC79A,0xDDBE,0xC79B,0xC79C, -0xC79D,0xC6D0,0xDDD0,0xC79E,0xC79F,0xC7A0,0xC840,0xC841, -0xDDD4,0xC1E2,0xB7C6,0xC842,0xC843,0xC844,0xC845,0xC846, -0xDDCE,0xDDCF,0xC847,0xC848,0xC849,0xDDC4,0xC84A,0xC84B, -0xC84C,0xDDBD,0xC84D,0xDDCD,0xCCD1,0xC84E,0xDDC9,0xC84F, -0xC850,0xC851,0xC852,0xDDC2,0xC3C8,0xC6BC,0xCEAE,0xDDCC, -0xC853,0xDDC8,0xC854,0xC855,0xC856,0xC857,0xC858,0xC859, -0xDDC1,0xC85A,0xC85B,0xC85C,0xDDC6,0xC2DC,0xC85D,0xC85E, -0xC85F,0xC860,0xC861,0xC862,0xD3A9,0xD3AA,0xDDD3,0xCFF4, -0xC8F8,0xC863,0xC864,0xC865,0xC866,0xC867,0xC868,0xC869, -0xC86A,0xDDE6,0xC86B,0xC86C,0xC86D,0xC86E,0xC86F,0xC870, -0xDDC7,0xC871,0xC872,0xC873,0xDDE0,0xC2E4,0xC874,0xC875, -0xC876,0xC877,0xC878,0xC879,0xC87A,0xC87B,0xDDE1,0xC87C, -0xC87D,0xC87E,0xC880,0xC881,0xC882,0xC883,0xC884,0xC885, -0xC886,0xDDD7,0xC887,0xC888,0xC889,0xC88A,0xC88B,0xD6F8, -0xC88C,0xDDD9,0xDDD8,0xB8F0,0xDDD6,0xC88D,0xC88E,0xC88F, -0xC890,0xC6CF,0xC891,0xB6AD,0xC892,0xC893,0xC894,0xC895, -0xC896,0xDDE2,0xC897,0xBAF9,0xD4E1,0xDDE7,0xC898,0xC899, -0xC89A,0xB4D0,0xC89B,0xDDDA,0xC89C,0xBFFB,0xDDE3,0xC89D, -0xDDDF,0xC89E,0xDDDD,0xC89F,0xC8A0,0xC940,0xC941,0xC942, -0xC943,0xC944,0xB5D9,0xC945,0xC946,0xC947,0xC948,0xDDDB, -0xDDDC,0xDDDE,0xC949,0xBDAF,0xDDE4,0xC94A,0xDDE5,0xC94B, -0xC94C,0xC94D,0xC94E,0xC94F,0xC950,0xC951,0xC952,0xDDF5, -0xC953,0xC3C9,0xC954,0xC955,0xCBE2,0xC956,0xC957,0xC958, -0xC959,0xDDF2,0xC95A,0xC95B,0xC95C,0xC95D,0xC95E,0xC95F, -0xC960,0xC961,0xC962,0xC963,0xC964,0xC965,0xC966,0xD8E1, -0xC967,0xC968,0xC6D1,0xC969,0xDDF4,0xC96A,0xC96B,0xC96C, -0xD5F4,0xDDF3,0xDDF0,0xC96D,0xC96E,0xDDEC,0xC96F,0xDDEF, -0xC970,0xDDE8,0xC971,0xC972,0xD0EE,0xC973,0xC974,0xC975, -0xC976,0xC8D8,0xDDEE,0xC977,0xC978,0xDDE9,0xC979,0xC97A, -0xDDEA,0xCBF2,0xC97B,0xDDED,0xC97C,0xC97D,0xB1CD,0xC97E, -0xC980,0xC981,0xC982,0xC983,0xC984,0xC0B6,0xC985,0xBCBB, -0xDDF1,0xC986,0xC987,0xDDF7,0xC988,0xDDF6,0xDDEB,0xC989, -0xC98A,0xC98B,0xC98C,0xC98D,0xC5EE,0xC98E,0xC98F,0xC990, -0xDDFB,0xC991,0xC992,0xC993,0xC994,0xC995,0xC996,0xC997, -0xC998,0xC999,0xC99A,0xC99B,0xDEA4,0xC99C,0xC99D,0xDEA3, -0xC99E,0xC99F,0xC9A0,0xCA40,0xCA41,0xCA42,0xCA43,0xCA44, -0xCA45,0xCA46,0xCA47,0xCA48,0xDDF8,0xCA49,0xCA4A,0xCA4B, -0xCA4C,0xC3EF,0xCA4D,0xC2FB,0xCA4E,0xCA4F,0xCA50,0xD5E1, -0xCA51,0xCA52,0xCEB5,0xCA53,0xCA54,0xCA55,0xCA56,0xDDFD, -0xCA57,0xB2CC,0xCA58,0xCA59,0xCA5A,0xCA5B,0xCA5C,0xCA5D, -0xCA5E,0xCA5F,0xCA60,0xC4E8,0xCADF,0xCA61,0xCA62,0xCA63, -0xCA64,0xCA65,0xCA66,0xCA67,0xCA68,0xCA69,0xCA6A,0xC7BE, -0xDDFA,0xDDFC,0xDDFE,0xDEA2,0xB0AA,0xB1CE,0xCA6B,0xCA6C, -0xCA6D,0xCA6E,0xCA6F,0xDEAC,0xCA70,0xCA71,0xCA72,0xCA73, -0xDEA6,0xBDB6,0xC8EF,0xCA74,0xCA75,0xCA76,0xCA77,0xCA78, -0xCA79,0xCA7A,0xCA7B,0xCA7C,0xCA7D,0xCA7E,0xDEA1,0xCA80, -0xCA81,0xDEA5,0xCA82,0xCA83,0xCA84,0xCA85,0xDEA9,0xCA86, -0xCA87,0xCA88,0xCA89,0xCA8A,0xDEA8,0xCA8B,0xCA8C,0xCA8D, -0xDE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B,0xCF5C,0xCF5D, -0xCF5E,0xF3AF,0xF2FE,0xF3AD,0xCF5F,0xCF60,0xCF61,0xCF62, -0xCF63,0xCF64,0xCF65,0xF3B2,0xCF66,0xCF67,0xCF68,0xCF69, -0xF3B4,0xCF6A,0xCF6B,0xCF6C,0xCF6D,0xF3A8,0xCF6E,0xCF6F, -0xCF70,0xCF71,0xF3B3,0xCF72,0xCF73,0xCF74,0xF3B5,0xCF75, -0xCF76,0xCF77,0xCF78,0xCF79,0xCF7A,0xCF7B,0xCF7C,0xCF7D, -0xCF7E,0xD0B7,0xCF80,0xCF81,0xCF82,0xCF83,0xF3B8,0xCF84, -0xCF85,0xCF86,0xCF87,0xD9F9,0xCF88,0xCF89,0xCF8A,0xCF8B, -0xCF8C,0xCF8D,0xF3B9,0xCF8E,0xCF8F,0xCF90,0xCF91,0xCF92, -0xCF93,0xCF94,0xCF95,0xF3B7,0xCF96,0xC8E4,0xF3B6,0xCF97, -0xCF98,0xCF99,0xCF9A,0xF3BA,0xCF9B,0xCF9C,0xCF9D,0xCF9E, -0xCF9F,0xF3BB,0xB4C0,0xCFA0,0xD040,0xD041,0xD042,0xD043, -0xD044,0xD045,0xD046,0xD047,0xD048,0xD049,0xD04A,0xD04B, -0xD04C,0xD04D,0xEEC3,0xD04E,0xD04F,0xD050,0xD051,0xD052, -0xD053,0xF3BC,0xD054,0xD055,0xF3BD,0xD056,0xD057,0xD058, -0xD1AA,0xD059,0xD05A,0xD05B,0xF4AC,0xD0C6,0xD05C,0xD05D, -0xD05E,0xD05F,0xD060,0xD061,0xD0D0,0xD1DC,0xD062,0xD063, -0xD064,0xD065,0xD066,0xD067,0xCFCE,0xD068,0xD069,0xBDD6, -0xD06A,0xD1C3,0xD06B,0xD06C,0xD06D,0xD06E,0xD06F,0xD070, -0xD071,0xBAE2,0xE1E9,0xD2C2,0xF1C2,0xB2B9,0xD072,0xD073, -0xB1ED,0xF1C3,0xD074,0xC9C0,0xB3C4,0xD075,0xD9F2,0xD076, -0xCBA5,0xD077,0xF1C4,0xD078,0xD079,0xD07A,0xD07B,0xD6D4, -0xD07C,0xD07D,0xD07E,0xD080,0xD081,0xF1C5,0xF4C0,0xF1C6, -0xD082,0xD4AC,0xF1C7,0xD083,0xB0C0,0xF4C1,0xD084,0xD085, -0xF4C2,0xD086,0xD087,0xB4FC,0xD088,0xC5DB,0xD089,0xD08A, -0xD08B,0xD08C,0xCCBB,0xD08D,0xD08E,0xD08F,0xD0E4,0xD090, -0xD091,0xD092,0xD093,0xD094,0xCDE0,0xD095,0xD096,0xD097, -0xD098,0xD099,0xF1C8,0xD09A,0xD9F3,0xD09B,0xD09C,0xD09D, -0xD09E,0xD09F,0xD0A0,0xB1BB,0xD140,0xCFAE,0xD141,0xD142, -0xD143,0xB8A4,0xD144,0xD145,0xD146,0xD147,0xD148,0xF1CA, -0xD149,0xD14A,0xD14B,0xD14C,0xF1CB,0xD14D,0xD14E,0xD14F, -0xD150,0xB2C3,0xC1D1,0xD151,0xD152,0xD7B0,0xF1C9,0xD153, -0xD154,0xF1CC,0xD155,0xD156,0xD157,0xD158,0xF1CE,0xD159, -0xD15A,0xD15B,0xD9F6,0xD15C,0xD2E1,0xD4A3,0xD15D,0xD15E, -0xF4C3,0xC8B9,0xD15F,0xD160,0xD161,0xD162,0xD163,0xF4C4, -0xD164,0xD165,0xF1CD,0xF1CF,0xBFE3,0xF1D0,0xD166,0xD167, -0xF1D4,0xD168,0xD169,0xD16A,0xD16B,0xD16C,0xD16D,0xD16E, -0xF1D6,0xF1D1,0xD16F,0xC9D1,0xC5E1,0xD170,0xD171,0xD172, -0xC2E3,0xB9FC,0xD173,0xD174,0xF1D3,0xD175,0xF1D5,0xD176, -0xD177,0xD178,0xB9D3,0xD179,0xD17A,0xD17B,0xD17C,0xD17D, -0xD17E,0xD180,0xF1DB,0xD181,0xD182,0xD183,0xD184,0xD185, -0xBAD6,0xD186,0xB0FD,0xF1D9,0xD187,0xD188,0xD189,0xD18A, -0xD18B,0xF1D8,0xF1D2,0xF1DA,0xD18C,0xD18D,0xD18E,0xD18F, -0xD190,0xF1D7,0xD191,0xD192,0xD193,0xC8EC,0xD194,0xD195, -0xD196,0xD197,0xCDCA,0xF1DD,0xD198,0xD199,0xD19A,0xD19B, -0xE5BD,0xD19C,0xD19D,0xD19E,0xF1DC,0xD19F,0xF1DE,0xD1A0, -0xD240,0xD241,0xD242,0xD243,0xD244,0xD245,0xD246,0xD247, -0xD248,0xF1DF,0xD249,0xD24A,0xCFE5,0xD24B,0xD24C,0xD24D, -0xD24E,0xD24F,0xD250,0xD251,0xD252,0xD253,0xD254,0xD255, -0xD256,0xD257,0xD258,0xD259,0xD25A,0xD25B,0xD25C,0xD25D, -0xD25E,0xD25F,0xD260,0xD261,0xD262,0xD263,0xF4C5,0xBDF3, -0xD264,0xD265,0xD266,0xD267,0xD268,0xD269,0xF1E0,0xD26A, -0xD26B,0xD26C,0xD26D,0xD26E,0xD26F,0xD270,0xD271,0xD272, -0xD273,0xD274,0xD275,0xD276,0xD277,0xD278,0xD279,0xD27A, -0xD27B,0xD27C,0xD27D,0xF1E1,0xD27E,0xD280,0xD281,0xCEF7, -0xD282,0xD2AA,0xD283,0xF1FB,0xD284,0xD285,0xB8B2,0xD286, -0xD287,0xD288,0xD289,0xD28A,0xD28B,0xD28C,0xD28D,0xD28E, -0xD28F,0xD290,0xD291,0xD292,0xD293,0xD294,0xD295,0xD296, -0xD297,0xD298,0xD299,0xD29A,0xD29B,0xD29C,0xD29D,0xD29E, -0xD29F,0xD2A0,0xD340,0xD341,0xD342,0xD343,0xD344,0xD345, -0xD346,0xD347,0xD348,0xD349,0xD34A,0xD34B,0xD34C,0xD34D, -0xD34E,0xD34F,0xD350,0xD351,0xD352,0xD353,0xD354,0xD355, -0xD356,0xD357,0xD358,0xD359,0xD35A,0xD35B,0xD35C,0xD35D, -0xD35E,0xBCFB,0xB9DB,0xD35F,0xB9E6,0xC3D9,0xCAD3,0xEAE8, -0xC0C0,0xBEF5,0xEAE9,0xEAEA,0xEAEB,0xD360,0xEAEC,0xEAED, -0xEAEE,0xEAEF,0xBDC7,0xD361,0xD362,0xD363,0xF5FB,0xD364, -0xD365,0xD366,0xF5FD,0xD367,0xF5FE,0xD368,0xF5FC,0xD369, -0xD36A,0xD36B,0xD36C,0xBDE2,0xD36D,0xF6A1,0xB4A5,0xD36E, -0xD36F,0xD370,0xD371,0xF6A2,0xD372,0xD373,0xD374,0xF6A3, -0xD375,0xD376,0xD377,0xECB2,0xD378,0xD379,0xD37A,0xD37B, -0xD37C,0xD37D,0xD37E,0xD380,0xD381,0xD382,0xD383,0xD384, -0xD1D4,0xD385,0xD386,0xD387,0xD388,0xD389,0xD38A,0xD9EA, -0xD38B,0xD38C,0xD38D,0xD38E,0xD38F,0xD390,0xD391,0xD392, -0xD393,0xD394,0xD395,0xD396,0xD397,0xD398,0xD399,0xD39A, -0xD39B,0xD39C,0xD39D,0xD39E,0xD39F,0xD3A0,0xD440,0xD441, -0xD442,0xD443,0xD444,0xD445,0xD446,0xD447,0xD448,0xD449, -0xD44A,0xD44B,0xD44C,0xD44D,0xD44E,0xD44F,0xD450,0xD451, -0xD452,0xD453,0xD454,0xD455,0xD456,0xD457,0xD458,0xD459, -0xD45A,0xD45B,0xD45C,0xD45D,0xD45E,0xD45F,0xF6A4,0xD460, -0xD461,0xD462,0xD463,0xD464,0xD465,0xD466,0xD467,0xD468, -0xEEBA,0xD469,0xD46A,0xD46B,0xD46C,0xD46D,0xD46E,0xD46F, -0xD470,0xD471,0xD472,0xD473,0xD474,0xD475,0xD476,0xD477, -0xD478,0xD479,0xD47A,0xD47B,0xD47C,0xD47D,0xD47E,0xD480, -0xD481,0xD482,0xD483,0xD484,0xD485,0xD486,0xD487,0xD488, -0xD489,0xD48A,0xD48B,0xD48C,0xD48D,0xD48E,0xD48F,0xD490, -0xD491,0xD492,0xD493,0xD494,0xD495,0xD496,0xD497,0xD498, -0xD499,0xD5B2,0xD49A,0xD49B,0xD49C,0xD49D,0xD49E,0xD49F, -0xD4A0,0xD540,0xD541,0xD542,0xD543,0xD544,0xD545,0xD546, -0xD547,0xD3FE,0xCCDC,0xD548,0xD549,0xD54A,0xD54B,0xD54C, -0xD54D,0xD54E,0xD54F,0xCAC4,0xD550,0xD551,0xD552,0xD553, -0xD554,0xD555,0xD556,0xD557,0xD558,0xD559,0xD55A,0xD55B, -0xD55C,0xD55D,0xD55E,0xD55F,0xD560,0xD561,0xD562,0xD563, -0xD564,0xD565,0xD566,0xD567,0xD568,0xD569,0xD56A,0xD56B, -0xD56C,0xD56D,0xD56E,0xD56F,0xD570,0xD571,0xD572,0xD573, -0xD574,0xD575,0xD576,0xD577,0xD578,0xD579,0xD57A,0xD57B, -0xD57C,0xD57D,0xD57E,0xD580,0xD581,0xD582,0xD583,0xD584, -0xD585,0xD586,0xD587,0xD588,0xD589,0xD58A,0xD58B,0xD58C, -0xD58D,0xD58E,0xD58F,0xD590,0xD591,0xD592,0xD593,0xD594, -0xD595,0xD596,0xD597,0xD598,0xD599,0xD59A,0xD59B,0xD59C, -0xD59D,0xD59E,0xD59F,0xD5A0,0xD640,0xD641,0xD642,0xD643, -0xD644,0xD645,0xD646,0xD647,0xD648,0xD649,0xD64A,0xD64B, -0xD64C,0xD64D,0xD64E,0xD64F,0xD650,0xD651,0xD652,0xD653, -0xD654,0xD655,0xD656,0xD657,0xD658,0xD659,0xD65A,0xD65B, -0xD65C,0xD65D,0xD65E,0xD65F,0xD660,0xD661,0xD662,0xE5C0, -0xD663,0xD664,0xD665,0xD666,0xD667,0xD668,0xD669,0xD66A, -0xD66B,0xD66C,0xD66D,0xD66E,0xD66F,0xD670,0xD671,0xD672, -0xD673,0xD674,0xD675,0xD676,0xD677,0xD678,0xD679,0xD67A, -0xD67B,0xD67C,0xD67D,0xD67E,0xD680,0xD681,0xF6A5,0xD682, -0xD683,0xD684,0xD685,0xD686,0xD687,0xD688,0xD689,0xD68A, -0xD68B,0xD68C,0xD68D,0xD68E,0xD68F,0xD690,0xD691,0xD692, -0xD693,0xD694,0xD695,0xD696,0xD697,0xD698,0xD699,0xD69A, -0xD69B,0xD69C,0xD69D,0xD69E,0xD69F,0xD6A0,0xD740,0xD741, -0xD742,0xD743,0xD744,0xD745,0xD746,0xD747,0xD748,0xD749, -0xD74A,0xD74B,0xD74C,0xD74D,0xD74E,0xD74F,0xD750,0xD751, -0xD752,0xD753,0xD754,0xD755,0xD756,0xD757,0xD758,0xD759, -0xD75A,0xD75B,0xD75C,0xD75D,0xD75E,0xD75F,0xBEAF,0xD760, -0xD761,0xD762,0xD763,0xD764,0xC6A9,0xD765,0xD766,0xD767, -0xD768,0xD769,0xD76A,0xD76B,0xD76C,0xD76D,0xD76E,0xD76F, -0xD770,0xD771,0xD772,0xD773,0xD774,0xD775,0xD776,0xD777, -0xD778,0xD779,0xD77A,0xD77B,0xD77C,0xD77D,0xD77E,0xD780, -0xD781,0xD782,0xD783,0xD784,0xD785,0xD786,0xD787,0xD788, -0xD789,0xD78A,0xD78B,0xD78C,0xD78D,0xD78E,0xD78F,0xD790, -0xD791,0xD792,0xD793,0xD794,0xD795,0xD796,0xD797,0xD798, -0xDAA5,0xBCC6,0xB6A9,0xB8BC,0xC8CF,0xBCA5,0xDAA6,0xDAA7, -0xCCD6,0xC8C3,0xDAA8,0xC6FD,0xD799,0xD1B5,0xD2E9,0xD1B6, -0xBCC7,0xD79A,0xBDB2,0xBBE4,0xDAA9,0xDAAA,0xD1C8,0xDAAB, -0xD0ED,0xB6EF,0xC2DB,0xD79B,0xCBCF,0xB7ED,0xC9E8,0xB7C3, -0xBEF7,0xD6A4,0xDAAC,0xDAAD,0xC6C0,0xD7E7,0xCAB6,0xD79C, -0xD5A9,0xCBDF,0xD5EF,0xDAAE,0xD6DF,0xB4CA,0xDAB0,0xDAAF, -0xD79D,0xD2EB,0xDAB1,0xDAB2,0xDAB3,0xCAD4,0xDAB4,0xCAAB, -0xDAB5,0xDAB6,0xB3CF,0xD6EF,0xDAB7,0xBBB0,0xB5AE,0xDAB8, -0xDAB9,0xB9EE,0xD1AF,0xD2E8,0xDABA,0xB8C3,0xCFEA,0xB2EF, -0xDABB,0xDABC,0xD79E,0xBDEB,0xCEDC,0xD3EF,0xDABD,0xCEF3, -0xDABE,0xD3D5,0xBBE5,0xDABF,0xCBB5,0xCBD0,0xDAC0,0xC7EB, -0xD6EE,0xDAC1,0xC5B5,0xB6C1,0xDAC2,0xB7CC,0xBFCE,0xDAC3, -0xDAC4,0xCBAD,0xDAC5,0xB5F7,0xDAC6,0xC1C2,0xD7BB,0xDAC7, -0xCCB8,0xD79F,0xD2EA,0xC4B1,0xDAC8,0xB5FD,0xBBD1,0xDAC9, -0xD0B3,0xDACA,0xDACB,0xCEBD,0xDACC,0xDACD,0xDACE,0xB2F7, -0xDAD1,0xDACF,0xD1E8,0xDAD0,0xC3D5,0xDAD2,0xD7A0,0xDAD3, -0xDAD4,0xDAD5,0xD0BB,0xD2A5,0xB0F9,0xDAD6,0xC7AB,0xDAD7, -0xBDF7,0xC3A1,0xDAD8,0xDAD9,0xC3FD,0xCCB7,0xDADA,0xDADB, -0xC0BE,0xC6D7,0xDADC,0xDADD,0xC7B4,0xDADE,0xDADF,0xB9C8, -0xD840,0xD841,0xD842,0xD843,0xD844,0xD845,0xD846,0xD847, -0xD848,0xBBED,0xD849,0xD84A,0xD84B,0xD84C,0xB6B9,0xF4F8, -0xD84D,0xF4F9,0xD84E,0xD84F,0xCDE3,0xD850,0xD851,0xD852, -0xD853,0xD854,0xD855,0xD856,0xD857,0xF5B9,0xD858,0xD859, -0xD85A,0xD85B,0xEBE0,0xD85C,0xD85D,0xD85E,0xD85F,0xD860, -0xD861,0xCFF3,0xBBBF,0xD862,0xD863,0xD864,0xD865,0xD866, -0xD867,0xD868,0xBAC0,0xD4A5,0xD869,0xD86A,0xD86B,0xD86C, -0xD86D,0xD86E,0xD86F,0xE1D9,0xD870,0xD871,0xD872,0xD873, -0xF5F4,0xB1AA,0xB2F2,0xD874,0xD875,0xD876,0xD877,0xD878, -0xD879,0xD87A,0xF5F5,0xD87B,0xD87C,0xF5F7,0xD87D,0xD87E, -0xD880,0xBAD1,0xF5F6,0xD881,0xC3B2,0xD882,0xD883,0xD884, -0xD885,0xD886,0xD887,0xD888,0xF5F9,0xD889,0xD88A,0xD88B, -0xF5F8,0xD88C,0xD88D,0xD88E,0xD88F,0xD890,0xD891,0xD892, -0xD893,0xD894,0xD895,0xD896,0xD897,0xD898,0xD899,0xD89A, -0xD89B,0xD89C,0xD89D,0xD89E,0xD89F,0xD8A0,0xD940,0xD941, -0xD942,0xD943,0xD944,0xD945,0xD946,0xD947,0xD948,0xD949, -0xD94A,0xD94B,0xD94C,0xD94D,0xD94E,0xD94F,0xD950,0xD951, -0xD952,0xD953,0xD954,0xD955,0xD956,0xD957,0xD958,0xD959, -0xD95A,0xD95B,0xD95C,0xD95D,0xD95E,0xD95F,0xD960,0xD961, -0xD962,0xD963,0xD964,0xD965,0xD966,0xD967,0xD968,0xD969, -0xD96A,0xD96B,0xD96C,0xD96D,0xD96E,0xD96F,0xD970,0xD971, -0xD972,0xD973,0xD974,0xD975,0xD976,0xD977,0xD978,0xD979, -0xD97A,0xD97B,0xD97C,0xD97D,0xD97E,0xD980,0xD981,0xD982, -0xD983,0xD984,0xD985,0xD986,0xD987,0xD988,0xD989,0xD98A, -0xD98B,0xD98C,0xD98D,0xD98E,0xD98F,0xD990,0xD991,0xD992, -0xD993,0xD994,0xD995,0xD996,0xD997,0xD998,0xD999,0xD99A, -0xD99B,0xD99C,0xD99D,0xD99E,0xD99F,0xD9A0,0xDA40,0xDA41, -0xDA42,0xDA43,0xDA44,0xDA45,0xDA46,0xDA47,0xDA48,0xDA49, -0xDA4A,0xDA4B,0xDA4C,0xDA4D,0xDA4E,0xB1B4,0xD5EA,0xB8BA, -0xDA4F,0xB9B1,0xB2C6,0xD4F0,0xCFCD,0xB0DC,0xD5CB,0xBBF5, -0xD6CA,0xB7B7,0xCCB0,0xC6B6,0xB1E1,0xB9BA,0xD6FC,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F9F, -0xDFA0,0xD3F4,0xE040,0xE041,0xDBA7,0xDBA4,0xE042,0xDBA8, -0xE043,0xE044,0xBDBC,0xE045,0xE046,0xE047,0xC0C9,0xDBA3, -0xDBA6,0xD6A3,0xE048,0xDBA9,0xE049,0xE04A,0xE04B,0xDBAD, -0xE04C,0xE04D,0xE04E,0xDBAE,0xDBAC,0xBAC2,0xE04F,0xE050, -0xE051,0xBFA4,0xDBAB,0xE052,0xE053,0xE054,0xDBAA,0xD4C7, -0xB2BF,0xE055,0xE056,0xDBAF,0xE057,0xB9F9,0xE058,0xDBB0, -0xE059,0xE05A,0xE05B,0xE05C,0xB3BB,0xE05D,0xE05E,0xE05F, -0xB5A6,0xE060,0xE061,0xE062,0xE063,0xB6BC,0xDBB1,0xE064, -0xE065,0xE066,0xB6F5,0xE067,0xDBB2,0xE068,0xE069,0xE06A, -0xE06B,0xE06C,0xE06D,0xE06E,0xE06F,0xE070,0xE071,0xE072, -0xE073,0xE074,0xE075,0xE076,0xE077,0xE078,0xE079,0xE07A, -0xE07B,0xB1C9,0xE07C,0xE07D,0xE07E,0xE080,0xDBB4,0xE081, -0xE082,0xE083,0xDBB3,0xDBB5,0xE084,0xE085,0xE086,0xE087, -0xE088,0xE089,0xE08A,0xE08B,0xE08C,0xE08D,0xE08E,0xDBB7, -0xE08F,0xDBB6,0xE090,0xE091,0xE092,0xE093,0xE094,0xE095, -0xE096,0xDBB8,0xE097,0xE098,0xE099,0xE09A,0xE09B,0xE09C, -0xE09D,0xE09E,0xE09F,0xDBB9,0xE0A0,0xE140,0xDBBA,0xE141, -0xE142,0xD3CF,0xF4FA,0xC7F5,0xD7C3,0xC5E4,0xF4FC,0xF4FD, -0xF4FB,0xE143,0xBEC6,0xE144,0xE145,0xE146,0xE147,0xD0EF, -0xE148,0xE149,0xB7D3,0xE14A,0xE14B,0xD4CD,0xCCAA,0xE14C, -0xE14D,0xF5A2,0xF5A1,0xBAA8,0xF4FE,0xCBD6,0xE14E,0xE14F, -0xE150,0xF5A4,0xC0D2,0xE151,0xB3EA,0xE152,0xCDAA,0xF5A5, -0xF5A3,0xBDB4,0xF5A8,0xE153,0xF5A9,0xBDCD,0xC3B8,0xBFE1, -0xCBE1,0xF5AA,0xE154,0xE155,0xE156,0xF5A6,0xF5A7,0xC4F0, -0xE157,0xE158,0xE159,0xE15A,0xE15B,0xF5AC,0xE15C,0xB4BC, -0xE15D,0xD7ED,0xE15E,0xB4D7,0xF5AB,0xF5AE,0xE15F,0xE160, -0xF5AD,0xF5AF,0xD0D1,0xE161,0xE162,0xE163,0xE164,0xE165, -0xE166,0xE167,0xC3D1,0xC8A9,0xE168,0xE169,0xE16A,0xE16B, -0xE16C,0xE16D,0xF5B0,0xF5B1,0xE16E,0xE16F,0xE170,0xE171, -0xE172,0xE173,0xF5B2,0xE174,0xE175,0xF5B3,0xF5B4,0xF5B5, -0xE176,0xE177,0xE178,0xE179,0xF5B7,0xF5B6,0xE17A,0xE17B, -0xE17C,0xE17D,0xF5B8,0xE17E,0xE180,0xE181,0xE182,0xE183, -0xE184,0xE185,0xE186,0xE187,0xE188,0xE189,0xE18A,0xB2C9, -0xE18B,0xD3D4,0xCACD,0xE18C,0xC0EF,0xD6D8,0xD2B0,0xC1BF, -0xE18D,0xBDF0,0xE18E,0xE18F,0xE190,0xE191,0xE192,0xE193, -0xE194,0xE195,0xE196,0xE197,0xB8AA,0xE198,0xE199,0xE19A, -0xE19B,0xE19C,0xE19D,0xE19E,0xE19F,0xE1A0,0xE240,0xE241, -0xE242,0xE243,0xE244,0xE245,0xE246,0xE247,0xE248,0xE249, -0xE24A,0xE24B,0xE24C,0xE24D,0xE24E,0xE24F,0xE250,0xE251, -0xE252,0xE253,0xE254,0xE255,0xE256,0xE257,0xE258,0xE259, -0xE25A,0xE25B,0xE25C,0xE25D,0xE25E,0xE25F,0xE260,0xE261, -0xE262,0xE263,0xE264,0xE265,0xE266,0xE267,0xE268,0xE269, -0xE26A,0xE26B,0xE26C,0xE26D,0xE26E,0xE26F,0xE270,0xE271, -0xE272,0xE273,0xE274,0xE275,0xE276,0xE277,0xE278,0xE279, -0xE27A,0xE27B,0xE27C,0xE27D,0xE27E,0xE280,0xE281,0xE282, -0xE283,0xE284,0xE285,0xE286,0xE287,0xE288,0xE289,0xE28A, -0xE28B,0xE28C,0xE28D,0xE28E,0xE28F,0xE290,0xE291,0xE292, -0xE293,0xE294,0xE295,0xE296,0xE297,0xE298,0xE299,0xE29A, -0xE29B,0xE29C,0xE29D,0xE29E,0xE29F,0xE2A0,0xE340,0xE341, -0xE342,0xE343,0xE344,0xE345,0xE346,0xE347,0xE348,0xE349, -0xE34A,0xE34B,0xE34C,0xE34D,0xE34E,0xE34F,0xE350,0xE351, -0xE352,0xE353,0xE354,0xE355,0xE356,0xE357,0xE358,0xE359, -0xE35A,0xE35B,0xE35C,0xE35D,0xE35E,0xE35F,0xE360,0xE361, -0xE362,0xE363,0xE364,0xE365,0xE366,0xE367,0xE368,0xE369, -0xE36A,0xE36B,0xE36C,0xE36D,0xBCF8,0xE36E,0xE36F,0xE370, -0xE371,0xE372,0xE373,0xE374,0xE375,0xE376,0xE377,0xE378, -0xE379,0xE37A,0xE37B,0xE37C,0xE37D,0xE37E,0xE380,0xE381, -0xE382,0xE383,0xE384,0xE385,0xE386,0xE387,0xF6C6,0xE388, -0xE389,0xE38A,0xE38B,0xE38C,0xE38D,0xE38E,0xE38F,0xE390, -0xE391,0xE392,0xE393,0xE394,0xE395,0xE396,0xE397,0xE398, -0xE399,0xE39A,0xE39B,0xE39C,0xE39D,0xE39E,0xE39F,0xE3A0, -0xE440,0xE441,0xE442,0xE443,0xE444,0xE445,0xF6C7,0xE446, -0xE447,0xE448,0xE449,0xE44A,0xE44B,0xE44C,0xE44D,0xE44E, -0xE44F,0xE450,0xE451,0xE452,0xE453,0xE454,0xE455,0xE456, -0xE457,0xE458,0xE459,0xE45A,0xE45B,0xE45C,0xE45D,0xE45E, -0xF6C8,0xE45F,0xE460,0xE461,0xE462,0xE463,0xE464,0xE465, -0xE466,0xE467,0xE468,0xE469,0xE46A,0xE46B,0xE46C,0xE46D, -0xE46E,0xE46F,0xE470,0xE471,0xE472,0xE473,0xE474,0xE475, -0xE476,0xE477,0xE478,0xE479,0xE47A,0xE47B,0xE47C,0xE47D, -0xE47E,0xE480,0xE481,0xE482,0xE483,0xE484,0xE485,0xE486, -0xE487,0xE488,0xE489,0xE48A,0xE48B,0xE48C,0xE48D,0xE48E, -0xE48F,0xE490,0xE491,0xE492,0xE493,0xE494,0xE495,0xE496, -0xE497,0xE498,0xE499,0xE49A,0xE49B,0xE49C,0xE49D,0xE49E, -0xE49F,0xE4A0,0xE540,0xE541,0xE542,0xE543,0xE544,0xE545, -0xE546,0xE547,0xE548,0xE549,0xE54A,0xE54B,0xE54C,0xE54D, -0xE54E,0xE54F,0xE550,0xE551,0xE552,0xE553,0xE554,0xE555, -0xE556,0xE557,0xE558,0xE559,0xE55A,0xE55B,0xE55C,0xE55D, -0xE55E,0xE55F,0xE560,0xE561,0xE562,0xE563,0xE564,0xE565, -0xE566,0xE567,0xE568,0xE569,0xE56A,0xE56B,0xE56C,0xE56D, -0xE56E,0xE56F,0xE570,0xE571,0xE572,0xE573,0xF6C9,0xE574, -0xE575,0xE576,0xE577,0xE578,0xE579,0xE57A,0xE57B,0xE57C, -0xE57D,0xE57E,0xE580,0xE581,0xE582,0xE583,0xE584,0xE585, -0xE586,0xE587,0xE588,0xE589,0xE58A,0xE58B,0xE58C,0xE58D, -0xE58E,0xE58F,0xE590,0xE591,0xE592,0xE593,0xE594,0xE595, -0xE596,0xE597,0xE598,0xE599,0xE59A,0xE59B,0xE59C,0xE59D, -0xE59E,0xE59F,0xF6CA,0xE5A0,0xE640,0xE641,0xE642,0xE643, -0xE644,0xE645,0xE646,0xE647,0xE648,0xE649,0xE64A,0xE64B, -0xE64C,0xE64D,0xE64E,0xE64F,0xE650,0xE651,0xE652,0xE653, -0xE654,0xE655,0xE656,0xE657,0xE658,0xE659,0xE65A,0xE65B, -0xE65C,0xE65D,0xE65E,0xE65F,0xE660,0xE661,0xE662,0xF6CC, -0xE663,0xE664,0xE665,0xE666,0xE667,0xE668,0xE669,0xE66A, -0xE66B,0xE66C,0xE66D,0xE66E,0xE66F,0xE670,0xE671,0xE672, -0xE673,0xE674,0xE675,0xE676,0xE677,0xE678,0xE679,0xE67A, -0xE67B,0xE67C,0xE67D,0xE67E,0xE680,0xE681,0xE682,0xE683, -0xE684,0xE685,0xE686,0xE687,0xE688,0xE689,0xE68A,0xE68B, -0xE68C,0xE68D,0xE68E,0xE68F,0xE690,0xE691,0xE692,0xE693, -0xE694,0xE695,0xE696,0xE697,0xE698,0xE699,0xE69A,0xE69B, -0xE69C,0xE69D,0xF6CB,0xE69E,0xE69F,0xE6A0,0xE740,0xE741, -0xE742,0xE743,0xE744,0xE745,0xE746,0xE747,0xF7E9,0xE748, -0xE749,0xE74A,0xE74B,0xE74C,0xE74D,0xE74E,0xE74F,0xE750, -0xE751,0xE752,0xE753,0xE754,0xE755,0xE756,0xE757,0xE758, -0xE759,0xE75A,0xE75B,0xE75C,0xE75D,0xE75E,0xE75F,0xE760, -0xE761,0xE762,0xE763,0xE764,0xE765,0xE766,0xE767,0xE768, -0xE769,0xE76A,0xE76B,0xE76C,0xE76D,0xE76E,0xE76F,0xE770, -0xE771,0xE772,0xE773,0xE774,0xE775,0xE776,0xE777,0xE778, -0xE779,0xE77A,0xE77B,0xE77C,0xE77D,0xE77E,0xE780,0xE781, -0xE782,0xE783,0xE784,0xE785,0xE786,0xE787,0xE788,0xE789, -0xE78A,0xE78B,0xE78C,0xE78D,0xE78E,0xE78F,0xE790,0xE791, -0xE792,0xE793,0xE794,0xE795,0xE796,0xE797,0xE798,0xE799, -0xE79A,0xE79B,0xE79C,0xE79D,0xE79E,0xE79F,0xE7A0,0xE840, -0xE841,0xE842,0xE843,0xE844,0xE845,0xE846,0xE847,0xE848, -0xE849,0xE84A,0xE84B,0xE84C,0xE84D,0xE84E,0xF6CD,0xE84F, -0xE850,0xE851,0xE852,0xE853,0xE854,0xE855,0xE856,0xE857, -0xE858,0xE859,0xE85A,0xE85B,0xE85C,0xE85D,0xE85E,0xE85F, -0xE860,0xE861,0xE862,0xE863,0xE864,0xE865,0xE866,0xE867, -0xE868,0xE869,0xE86A,0xE86B,0xE86C,0xE86D,0xE86E,0xE86F, -0xE870,0xE871,0xE872,0xE873,0xE874,0xE875,0xE876,0xE877, -0xE878,0xE879,0xE87A,0xF6CE,0xE87B,0xE87C,0xE87D,0xE87E, -0xE880,0xE881,0xE882,0xE883,0xE884,0xE885,0xE886,0xE887, -0xE888,0xE889,0xE88A,0xE88B,0xE88C,0xE88D,0xE88E,0xE88F, -0xE890,0xE891,0xE892,0xE893,0xE894,0xEEC4,0xEEC5,0xEEC6, -0xD5EB,0xB6A4,0xEEC8,0xEEC7,0xEEC9,0xEECA,0xC7A5,0xEECB, -0xEECC,0xE895,0xB7B0,0xB5F6,0xEECD,0xEECF,0xE896,0xEECE, -0xE897,0xB8C6,0xEED0,0xEED1,0xEED2,0xB6DB,0xB3AE,0xD6D3, -0xC4C6,0xB1B5,0xB8D6,0xEED3,0xEED4,0xD4BF,0xC7D5,0xBEFB, -0xCED9,0xB9B3,0xEED6,0xEED5,0xEED8,0xEED7,0xC5A5,0xEED9, -0xEEDA,0xC7AE,0xEEDB,0xC7AF,0xEEDC,0xB2A7,0xEEDD,0xEEDE, -0xEEDF,0xEEE0,0xEEE1,0xD7EA,0xEEE2,0xEEE3,0xBCD8,0xEEE4, -0xD3CB,0xCCFA,0xB2AC,0xC1E5,0xEEE5,0xC7A6,0xC3AD,0xE898, -0xEEE6,0xEEE7,0xEEE8,0xEEE9,0xEEEA,0xEEEB,0xEEEC,0xE899, -0xEEED,0xEEEE,0xEEEF,0xE89A,0xE89B,0xEEF0,0xEEF1,0xEEF2, -0xEEF4,0xEEF3,0xE89C,0xEEF5,0xCDAD,0xC2C1,0xEEF6,0xEEF7, -0xEEF8,0xD5A1,0xEEF9,0xCFB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xE94C, -0xE94D,0xE94E,0xE94F,0xE950,0xE951,0xE952,0xE953,0xB3A4, -0xE954,0xE955,0xE956,0xE957,0xE958,0xE959,0xE95A,0xE95B, -0xE95C,0xE95D,0xE95E,0xE95F,0xE960,0xE961,0xE962,0xE963, -0xE964,0xE965,0xE966,0xE967,0xE968,0xE969,0xE96A,0xE96B, -0xE96C,0xE96D,0xE96E,0xE96F,0xE970,0xE971,0xE972,0xE973, -0xE974,0xE975,0xE976,0xE977,0xE978,0xE979,0xE97A,0xE97B, -0xE97C,0xE97D,0xE97E,0xE980,0xE981,0xE982,0xE983,0xE984, -0xE985,0xE986,0xE987,0xE988,0xE989,0xE98A,0xE98B,0xE98C, -0xE98D,0xE98E,0xE98F,0xE990,0xE991,0xE992,0xE993,0xE994, -0xE995,0xE996,0xE997,0xE998,0xE999,0xE99A,0xE99B,0xE99C, -0xE99D,0xE99E,0xE99F,0xE9A0,0xEA40,0xEA41,0xEA42,0xEA43, -0xEA44,0xEA45,0xEA46,0xEA47,0xEA48,0xEA49,0xEA4A,0xEA4B, -0xEA4C,0xEA4D,0xEA4E,0xEA4F,0xEA50,0xEA51,0xEA52,0xEA53, -0xEA54,0xEA55,0xEA56,0xEA57,0xEA58,0xEA59,0xEA5A,0xEA5B, -0xC3C5,0xE3C5,0xC9C1,0xE3C6,0xEA5C,0xB1D5,0xCECA,0xB4B3, -0xC8F2,0xE3C7,0xCFD0,0xE3C8,0xBCE4,0xE3C9,0xE3CA,0xC3C6, -0xD5A2,0xC4D6,0xB9EB,0xCEC5,0xE3CB,0xC3F6,0xE3CC,0xEA5D, -0xB7A7,0xB8F3,0xBAD2,0xE3CD,0xE3CE,0xD4C4,0xE3CF,0xEA5E, -0xE3D0,0xD1CB,0xE3D1,0xE3D2,0xE3D3,0xE3D4,0xD1D6,0xE3D5, -0xB2FB,0xC0BB,0xE3D6,0xEA5F,0xC0AB,0xE3D7,0xE3D8,0xE3D9, -0xEA60,0xE3DA,0xE3DB,0xEA61,0xB8B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0xEC66,0xEC67, -0xEC68,0xEC69,0xC7E0,0xF6A6,0xEC6A,0xEC6B,0xBEB8,0xEC6C, -0xEC6D,0xBEB2,0xEC6E,0xB5E5,0xEC6F,0xEC70,0xB7C7,0xEC71, -0xBFBF,0xC3D2,0xC3E6,0xEC72,0xEC73,0xD8CC,0xEC74,0xEC75, -0xEC76,0xB8EF,0xEC77,0xEC78,0xEC79,0xEC7A,0xEC7B,0xEC7C, -0xEC7D,0xEC7E,0xEC80,0xBDF9,0xD1A5,0xEC81,0xB0D0,0xEC82, -0xEC83,0xEC84,0xEC85,0xEC86,0xF7B0,0xEC87,0xEC88,0xEC89, -0xEC8A,0xEC8B,0xEC8C,0xEC8D,0xEC8E,0xF7B1,0xEC8F,0xEC90, -0xEC91,0xEC92,0xEC93,0xD0AC,0xEC94,0xB0B0,0xEC95,0xEC96, -0xEC97,0xF7B2,0xF7B3,0xEC98,0xF7B4,0xEC99,0xEC9A,0xEC9B, -0xC7CA,0xEC9C,0xEC9D,0xEC9E,0xEC9F,0xECA0,0xED40,0xED41, -0xBECF,0xED42,0xED43,0xF7B7,0xED44,0xED45,0xED46,0xED47, -0xED48,0xED49,0xED4A,0xF7B6,0xED4B,0xB1DE,0xED4C,0xF7B5, -0xED4D,0xED4E,0xF7B8,0xED4F,0xF7B9,0xED50,0xED51,0xED52, -0xED53,0xED54,0xED55,0xED56,0xED57,0xED58,0xED59,0xED5A, -0xED5B,0xED5C,0xED5D,0xED5E,0xED5F,0xED60,0xED61,0xED62, -0xED63,0xED64,0xED65,0xED66,0xED67,0xED68,0xED69,0xED6A, -0xED6B,0xED6C,0xED6D,0xED6E,0xED6F,0xED70,0xED71,0xED72, -0xED73,0xED74,0xED75,0xED76,0xED77,0xED78,0xED79,0xED7A, -0xED7B,0xED7C,0xED7D,0xED7E,0xED80,0xED81,0xCEA4,0xC8CD, -0xED82,0xBAAB,0xE8B8,0xE8B9,0xE8BA,0xBEC2,0xED83,0xED84, -0xED85,0xED86,0xED87,0xD2F4,0xED88,0xD4CF,0xC9D8,0xED89, -0xED8A,0xED8B,0xED8C,0xED8D,0xED8E,0xED8F,0xED90,0xED91, -0xED92,0xED93,0xED94,0xED95,0xED96,0xED97,0xED98,0xED99, -0xED9A,0xED9B,0xED9C,0xED9D,0xED9E,0xED9F,0xEDA0,0xEE40, -0xEE41,0xEE42,0xEE43,0xEE44,0xEE45,0xEE46,0xEE47,0xEE48, -0xEE49,0xEE4A,0xEE4B,0xEE4C,0xEE4D,0xEE4E,0xEE4F,0xEE50, -0xEE51,0xEE52,0xEE53,0xEE54,0xEE55,0xEE56,0xEE57,0xEE58, -0xEE59,0xEE5A,0xEE5B,0xEE5C,0xEE5D,0xEE5E,0xEE5F,0xEE60, -0xEE61,0xEE62,0xEE63,0xEE64,0xEE65,0xEE66,0xEE67,0xEE68, -0xEE69,0xEE6A,0xEE6B,0xEE6C,0xEE6D,0xEE6E,0xEE6F,0xEE70, -0xEE71,0xEE72,0xEE73,0xEE74,0xEE75,0xEE76,0xEE77,0xEE78, -0xEE79,0xEE7A,0xEE7B,0xEE7C,0xEE7D,0xEE7E,0xEE80,0xEE81, -0xEE82,0xEE83,0xEE84,0xEE85,0xEE86,0xEE87,0xEE88,0xEE89, -0xEE8A,0xEE8B,0xEE8C,0xEE8D,0xEE8E,0xEE8F,0xEE90,0xEE91, -0xEE92,0xEE93,0xEE94,0xEE95,0xEE96,0xEE97,0xEE98,0xEE99, -0xEE9A,0xEE9B,0xEE9C,0xEE9D,0xEE9E,0xEE9F,0xEEA0,0xEF40, -0xEF41,0xEF42,0xEF43,0xEF44,0xEF45,0xD2B3,0xB6A5,0xC7EA, -0xF1FC,0xCFEE,0xCBB3,0xD0EB,0xE7EF,0xCDE7,0xB9CB,0xB6D9, -0xF1FD,0xB0E4,0xCBCC,0xF1FE,0xD4A4,0xC2AD,0xC1EC,0xC6C4, -0xBEB1,0xF2A1,0xBCD5,0xEF46,0xF2A2,0xF2A3,0xEF47,0xF2A4, -0xD2C3,0xC6B5,0xEF48,0xCDC7,0xF2A5,0xEF49,0xD3B1,0xBFC5, -0xCCE2,0xEF4A,0xF2A6,0xF2A7,0xD1D5,0xB6EE,0xF2A8,0xF2A9, -0xB5DF,0xF2AA,0xF2AB,0xEF4B,0xB2FC,0xF2AC,0xF2AD,0xC8A7, -0xEF4C,0xEF4D,0xEF4E,0xEF4F,0xEF50,0xEF51,0xEF52,0xEF53, -0xEF54,0xEF55,0xEF56,0xEF57,0xEF58,0xEF59,0xEF5A,0xEF5B, -0xEF5C,0xEF5D,0xEF5E,0xEF5F,0xEF60,0xEF61,0xEF62,0xEF63, -0xEF64,0xEF65,0xEF66,0xEF67,0xEF68,0xEF69,0xEF6A,0xEF6B, -0xEF6C,0xEF6D,0xEF6E,0xEF6F,0xEF70,0xEF71,0xB7E7,0xEF72, -0xEF73,0xECA9,0xECAA,0xECAB,0xEF74,0xECAC,0xEF75,0xEF76, -0xC6AE,0xECAD,0xECAE,0xEF77,0xEF78,0xEF79,0xB7C9,0xCAB3, -0xEF7A,0xEF7B,0xEF7C,0xEF7D,0xEF7E,0xEF80,0xEF81,0xE2B8, -0xF7CF,0xEF82,0xEF83,0xEF84,0xEF85,0xEF86,0xEF87,0xEF88, -0xEF89,0xEF8A,0xEF8B,0xEF8C,0xEF8D,0xEF8E,0xEF8F,0xEF90, -0xEF91,0xEF92,0xEF93,0xEF94,0xEF95,0xEF96,0xEF97,0xEF98, -0xEF99,0xEF9A,0xEF9B,0xEF9C,0xEF9D,0xEF9E,0xEF9F,0xEFA0, -0xF040,0xF041,0xF042,0xF043,0xF044,0xF7D0,0xF045,0xF046, -0xB2CD,0xF047,0xF048,0xF049,0xF04A,0xF04B,0xF04C,0xF04D, -0xF04E,0xF04F,0xF050,0xF051,0xF052,0xF053,0xF054,0xF055, -0xF056,0xF057,0xF058,0xF059,0xF05A,0xF05B,0xF05C,0xF05D, -0xF05E,0xF05F,0xF060,0xF061,0xF062,0xF063,0xF7D1,0xF064, -0xF065,0xF066,0xF067,0xF068,0xF069,0xF06A,0xF06B,0xF06C, -0xF06D,0xF06E,0xF06F,0xF070,0xF071,0xF072,0xF073,0xF074, -0xF075,0xF076,0xF077,0xF078,0xF079,0xF07A,0xF07B,0xF07C, -0xF07D,0xF07E,0xF080,0xF081,0xF082,0xF083,0xF084,0xF085, -0xF086,0xF087,0xF088,0xF089,0xF7D3,0xF7D2,0xF08A,0xF08B, -0xF08C,0xF08D,0xF08E,0xF08F,0xF090,0xF091,0xF092,0xF093, -0xF094,0xF095,0xF096,0xE2BB,0xF097,0xBCA2,0xF098,0xE2BC, -0xE2BD,0xE2BE,0xE2BF,0xE2C0,0xE2C1,0xB7B9,0xD2FB,0xBDA4, -0xCACE,0xB1A5,0xCBC7,0xF099,0xE2C2,0xB6FC,0xC8C4,0xE2C3, -0xF09A,0xF09B,0xBDC8,0xF09C,0xB1FD,0xE2C4,0xF09D,0xB6F6, -0xE2C5,0xC4D9,0xF09E,0xF09F,0xE2C6,0xCFDA,0xB9DD,0xE2C7, -0xC0A1,0xF0A0,0xE2C8,0xB2F6,0xF140,0xE2C9,0xF141,0xC1F3, -0xE2CA,0xE2CB,0xC2F8,0xE2CC,0xE2CD,0xE2CE,0xCAD7,0xD8B8, -0xD9E5,0xCFE3,0xF142,0xF143,0xF144,0xF145,0xF146,0xF147, -0xF148,0xF149,0xF14A,0xF14B,0xF14C,0xF0A5,0xF14D,0xF14E, -0xDCB0,0xF14F,0xF150,0xF151,0xF152,0xF153,0xF154,0xF155, -0xF156,0xF157,0xF158,0xF159,0xF15A,0xF15B,0xF15C,0xF15D, -0xF15E,0xF15F,0xF160,0xF161,0xF162,0xF163,0xF164,0xF165, -0xF166,0xF167,0xF168,0xF169,0xF16A,0xF16B,0xF16C,0xF16D, -0xF16E,0xF16F,0xF170,0xF171,0xF172,0xF173,0xF174,0xF175, -0xF176,0xF177,0xF178,0xF179,0xF17A,0xF17B,0xF17C,0xF17D, -0xF17E,0xF180,0xF181,0xF182,0xF183,0xF184,0xF185,0xF186, -0xF187,0xF188,0xF189,0xF18A,0xF18B,0xF18C,0xF18D,0xF18E, -0xF18F,0xF190,0xF191,0xF192,0xF193,0xF194,0xF195,0xF196, -0xF197,0xF198,0xF199,0xF19A,0xF19B,0xF19C,0xF19D,0xF19E, -0xF19F,0xF1A0,0xF240,0xF241,0xF242,0xF243,0xF244,0xF245, -0xF246,0xF247,0xF248,0xF249,0xF24A,0xF24B,0xF24C,0xF24D, -0xF24E,0xF24F,0xF250,0xF251,0xF252,0xF253,0xF254,0xF255, -0xF256,0xF257,0xF258,0xF259,0xF25A,0xF25B,0xF25C,0xF25D, -0xF25E,0xF25F,0xF260,0xF261,0xF262,0xF263,0xF264,0xF265, -0xF266,0xF267,0xF268,0xF269,0xF26A,0xF26B,0xF26C,0xF26D, -0xF26E,0xF26F,0xF270,0xF271,0xF272,0xF273,0xF274,0xF275, -0xF276,0xF277,0xF278,0xF279,0xF27A,0xF27B,0xF27C,0xF27D, -0xF27E,0xF280,0xF281,0xF282,0xF283,0xF284,0xF285,0xF286, -0xF287,0xF288,0xF289,0xF28A,0xF28B,0xF28C,0xF28D,0xF28E, -0xF28F,0xF290,0xF291,0xF292,0xF293,0xF294,0xF295,0xF296, -0xF297,0xF298,0xF299,0xF29A,0xF29B,0xF29C,0xF29D,0xF29E, -0xF29F,0xF2A0,0xF340,0xF341,0xF342,0xF343,0xF344,0xF345, -0xF346,0xF347,0xF348,0xF349,0xF34A,0xF34B,0xF34C,0xF34D, -0xF34E,0xF34F,0xF350,0xF351,0xC2ED,0xD4A6,0xCDD4,0xD1B1, -0xB3DB,0xC7FD,0xF352,0xB2B5,0xC2BF,0xE6E0,0xCABB,0xE6E1, -0xE6E2,0xBED4,0xE6E3,0xD7A4,0xCDD5,0xE6E5,0xBCDD,0xE6E4, -0xE6E6,0xE6E7,0xC2EE,0xF353,0xBDBE,0xE6E8,0xC2E6,0xBAA7, -0xE6E9,0xF354,0xE6EA,0xB3D2,0xD1E9,0xF355,0xF356,0xBFA5, -0xE6EB,0xC6EF,0xE6EC,0xE6ED,0xF357,0xF358,0xE6EE,0xC6AD, -0xE6EF,0xF359,0xC9A7,0xE6F0,0xE6F1,0xE6F2,0xE5B9,0xE6F3, -0xE6F4,0xC2E2,0xE6F5,0xE6F6,0xD6E8,0xE6F7,0xF35A,0xE6F8, -0xB9C7,0xF35B,0xF35C,0xF35D,0xF35E,0xF35F,0xF360,0xF361, -0xF7BB,0xF7BA,0xF362,0xF363,0xF364,0xF365,0xF7BE,0xF7BC, -0xBAA1,0xF366,0xF7BF,0xF367,0xF7C0,0xF368,0xF369,0xF36A, -0xF7C2,0xF7C1,0xF7C4,0xF36B,0xF36C,0xF7C3,0xF36D,0xF36E, -0xF36F,0xF370,0xF371,0xF7C5,0xF7C6,0xF372,0xF373,0xF374, -0xF375,0xF7C7,0xF376,0xCBE8,0xF377,0xF378,0xF379,0xF37A, -0xB8DF,0xF37B,0xF37C,0xF37D,0xF37E,0xF380,0xF381,0xF7D4, -0xF382,0xF7D5,0xF383,0xF384,0xF385,0xF386,0xF7D6,0xF387, -0xF388,0xF389,0xF38A,0xF7D8,0xF38B,0xF7DA,0xF38C,0xF7D7, -0xF38D,0xF38E,0xF38F,0xF390,0xF391,0xF392,0xF393,0xF394, -0xF395,0xF7DB,0xF396,0xF7D9,0xF397,0xF398,0xF399,0xF39A, -0xF39B,0xF39C,0xF39D,0xD7D7,0xF39E,0xF39F,0xF3A0,0xF440, -0xF7DC,0xF441,0xF442,0xF443,0xF444,0xF445,0xF446,0xF7DD, -0xF447,0xF448,0xF449,0xF7DE,0xF44A,0xF44B,0xF44C,0xF44D, -0xF44E,0xF44F,0xF450,0xF451,0xF452,0xF453,0xF454,0xF7DF, -0xF455,0xF456,0xF457,0xF7E0,0xF458,0xF459,0xF45A,0xF45B, -0xF45C,0xF45D,0xF45E,0xF45F,0xF460,0xF461,0xF462,0xDBCB, -0xF463,0xF464,0xD8AA,0xF465,0xF466,0xF467,0xF468,0xF469, -0xF46A,0xF46B,0xF46C,0xE5F7,0xB9ED,0xF46D,0xF46E,0xF46F, -0xF470,0xBFFD,0xBBEA,0xF7C9,0xC6C7,0xF7C8,0xF471,0xF7CA, -0xF7CC,0xF7CB,0xF472,0xF473,0xF474,0xF7CD,0xF475,0xCEBA, -0xF476,0xF7CE,0xF477,0xF478,0xC4A7,0xF479,0xF47A,0xF47B, -0xF47C,0xF47D,0xF47E,0xF480,0xF481,0xF482,0xF483,0xF484, -0xF485,0xF486,0xF487,0xF488,0xF489,0xF48A,0xF48B,0xF48C, -0xF48D,0xF48E,0xF48F,0xF490,0xF491,0xF492,0xF493,0xF494, -0xF495,0xF496,0xF497,0xF498,0xF499,0xF49A,0xF49B,0xF49C, -0xF49D,0xF49E,0xF49F,0xF4A0,0xF540,0xF541,0xF542,0xF543, -0xF544,0xF545,0xF546,0xF547,0xF548,0xF549,0xF54A,0xF54B, -0xF54C,0xF54D,0xF54E,0xF54F,0xF550,0xF551,0xF552,0xF553, -0xF554,0xF555,0xF556,0xF557,0xF558,0xF559,0xF55A,0xF55B, -0xF55C,0xF55D,0xF55E,0xF55F,0xF560,0xF561,0xF562,0xF563, -0xF564,0xF565,0xF566,0xF567,0xF568,0xF569,0xF56A,0xF56B, -0xF56C,0xF56D,0xF56E,0xF56F,0xF570,0xF571,0xF572,0xF573, -0xF574,0xF575,0xF576,0xF577,0xF578,0xF579,0xF57A,0xF57B, -0xF57C,0xF57D,0xF57E,0xF580,0xF581,0xF582,0xF583,0xF584, -0xF585,0xF586,0xF587,0xF588,0xF589,0xF58A,0xF58B,0xF58C, -0xF58D,0xF58E,0xF58F,0xF590,0xF591,0xF592,0xF593,0xF594, -0xF595,0xF596,0xF597,0xF598,0xF599,0xF59A,0xF59B,0xF59C, -0xF59D,0xF59E,0xF59F,0xF5A0,0xF640,0xF641,0xF642,0xF643, -0xF644,0xF645,0xF646,0xF647,0xF648,0xF649,0xF64A,0xF64B, -0xF64C,0xF64D,0xF64E,0xF64F,0xF650,0xF651,0xF652,0xF653, -0xF654,0xF655,0xF656,0xF657,0xF658,0xF659,0xF65A,0xF65B, -0xF65C,0xF65D,0xF65E,0xF65F,0xF660,0xF661,0xF662,0xF663, -0xF664,0xF665,0xF666,0xF667,0xF668,0xF669,0xF66A,0xF66B, -0xF66C,0xF66D,0xF66E,0xF66F,0xF670,0xF671,0xF672,0xF673, -0xF674,0xF675,0xF676,0xF677,0xF678,0xF679,0xF67A,0xF67B, -0xF67C,0xF67D,0xF67E,0xF680,0xF681,0xF682,0xF683,0xF684, -0xF685,0xF686,0xF687,0xF688,0xF689,0xF68A,0xF68B,0xF68C, -0xF68D,0xF68E,0xF68F,0xF690,0xF691,0xF692,0xF693,0xF694, -0xF695,0xF696,0xF697,0xF698,0xF699,0xF69A,0xF69B,0xF69C, -0xF69D,0xF69E,0xF69F,0xF6A0,0xF740,0xF741,0xF742,0xF743, -0xF744,0xF745,0xF746,0xF747,0xF748,0xF749,0xF74A,0xF74B, -0xF74C,0xF74D,0xF74E,0xF74F,0xF750,0xF751,0xF752,0xF753, -0xF754,0xF755,0xF756,0xF757,0xF758,0xF759,0xF75A,0xF75B, -0xF75C,0xF75D,0xF75E,0xF75F,0xF760,0xF761,0xF762,0xF763, -0xF764,0xF765,0xF766,0xF767,0xF768,0xF769,0xF76A,0xF76B, -0xF76C,0xF76D,0xF76E,0xF76F,0xF770,0xF771,0xF772,0xF773, -0xF774,0xF775,0xF776,0xF777,0xF778,0xF779,0xF77A,0xF77B, -0xF77C,0xF77D,0xF77E,0xF780,0xD3E3,0xF781,0xF782,0xF6CF, -0xF783,0xC2B3,0xF6D0,0xF784,0xF785,0xF6D1,0xF6D2,0xF6D3, -0xF6D4,0xF786,0xF787,0xF6D6,0xF788,0xB1AB,0xF6D7,0xF789, -0xF6D8,0xF6D9,0xF6DA,0xF78A,0xF6DB,0xF6DC,0xF78B,0xF78C, -0xF78D,0xF78E,0xF6DD,0xF6DE,0xCFCA,0xF78F,0xF6DF,0xF6E0, -0xF6E1,0xF6E2,0xF6E3,0xF6E4,0xC0F0,0xF6E5,0xF6E6,0xF6E7, -0xF6E8,0xF6E9,0xF790,0xF6EA,0xF791,0xF6EB,0xF6EC,0xF792, -0xF6ED,0xF6EE,0xF6EF,0xF6F0,0xF6F1,0xF6F2,0xF6F3,0xF6F4, -0xBEA8,0xF793,0xF6F5,0xF6F6,0xF6F7,0xF6F8,0xF794,0xF795, -0xF796,0xF797,0xF798,0xC8FA,0xF6F9,0xF6FA,0xF6FB,0xF6FC, -0xF799,0xF79A,0xF6FD,0xF6FE,0xF7A1,0xF7A2,0xF7A3,0xF7A4, -0xF7A5,0xF79B,0xF79C,0xF7A6,0xF7A7,0xF7A8,0xB1EE,0xF7A9, -0xF7AA,0xF7AB,0xF79D,0xF79E,0xF7AC,0xF7AD,0xC1DB,0xF7AE, -0xF79F,0xF7A0,0xF7AF,0xF840,0xF841,0xF842,0xF843,0xF844, -0xF845,0xF846,0xF847,0xF848,0xF849,0xF84A,0xF84B,0xF84C, -0xF84D,0xF84E,0xF84F,0xF850,0xF851,0xF852,0xF853,0xF854, -0xF855,0xF856,0xF857,0xF858,0xF859,0xF85A,0xF85B,0xF85C, -0xF85D,0xF85E,0xF85F,0xF860,0xF861,0xF862,0xF863,0xF864, -0xF865,0xF866,0xF867,0xF868,0xF869,0xF86A,0xF86B,0xF86C, -0xF86D,0xF86E,0xF86F,0xF870,0xF871,0xF872,0xF873,0xF874, -0xF875,0xF876,0xF877,0xF878,0xF879,0xF87A,0xF87B,0xF87C, -0xF87D,0xF87E,0xF880,0xF881,0xF882,0xF883,0xF884,0xF885, -0xF886,0xF887,0xF888,0xF889,0xF88A,0xF88B,0xF88C,0xF88D, -0xF88E,0xF88F,0xF890,0xF891,0xF892,0xF893,0xF894,0xF895, -0xF896,0xF897,0xF898,0xF899,0xF89A,0xF89B,0xF89C,0xF89D, -0xF89E,0xF89F,0xF8A0,0xF940,0xF941,0xF942,0xF943,0xF944, -0xF945,0xF946,0xF947,0xF948,0xF949,0xF94A,0xF94B,0xF94C, -0xF94D,0xF94E,0xF94F,0xF950,0xF951,0xF952,0xF953,0xF954, -0xF955,0xF956,0xF957,0xF958,0xF959,0xF95A,0xF95B,0xF95C, -0xF95D,0xF95E,0xF95F,0xF960,0xF961,0xF962,0xF963,0xF964, -0xF965,0xF966,0xF967,0xF968,0xF969,0xF96A,0xF96B,0xF96C, -0xF96D,0xF96E,0xF96F,0xF970,0xF971,0xF972,0xF973,0xF974, -0xF975,0xF976,0xF977,0xF978,0xF979,0xF97A,0xF97B,0xF97C, -0xF97D,0xF97E,0xF980,0xF981,0xF982,0xF983,0xF984,0xF985, -0xF986,0xF987,0xF988,0xF989,0xF98A,0xF98B,0xF98C,0xF98D, -0xF98E,0xF98F,0xF990,0xF991,0xF992,0xF993,0xF994,0xF995, -0xF996,0xF997,0xF998,0xF999,0xF99A,0xF99B,0xF99C,0xF99D, -0xF99E,0xF99F,0xF9A0,0xFA40,0xFA41,0xFA42,0xFA43,0xFA44, -0xFA45,0xFA46,0xFA47,0xFA48,0xFA49,0xFA4A,0xFA4B,0xFA4C, -0xFA4D,0xFA4E,0xFA4F,0xFA50,0xFA51,0xFA52,0xFA53,0xFA54, -0xFA55,0xFA56,0xFA57,0xFA58,0xFA59,0xFA5A,0xFA5B,0xFA5C, -0xFA5D,0xFA5E,0xFA5F,0xFA60,0xFA61,0xFA62,0xFA63,0xFA64, -0xFA65,0xFA66,0xFA67,0xFA68,0xFA69,0xFA6A,0xFA6B,0xFA6C, -0xFA6D,0xFA6E,0xFA6F,0xFA70,0xFA71,0xFA72,0xFA73,0xFA74, -0xFA75,0xFA76,0xFA77,0xFA78,0xFA79,0xFA7A,0xFA7B,0xFA7C, -0xFA7D,0xFA7E,0xFA80,0xFA81,0xFA82,0xFA83,0xFA84,0xFA85, -0xFA86,0xFA87,0xFA88,0xFA89,0xFA8A,0xFA8B,0xFA8C,0xFA8D, -0xFA8E,0xFA8F,0xFA90,0xFA91,0xFA92,0xFA93,0xFA94,0xFA95, -0xFA96,0xFA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C9B,0xFC9C,0xF7F8,0xFC9D,0xFC9E,0xF7F9, -0xFC9F,0xFCA0,0xFD40,0xFD41,0xFD42,0xFD43,0xFD44,0xF7FB, -0xFD45,0xF7FA,0xFD46,0xB1C7,0xFD47,0xF7FC,0xF7FD,0xFD48, -0xFD49,0xFD4A,0xFD4B,0xFD4C,0xF7FE,0xFD4D,0xFD4E,0xFD4F, -0xFD50,0xFD51,0xFD52,0xFD53,0xFD54,0xFD55,0xFD56,0xFD57, -0xC6EB,0xECB4,0xFD58,0xFD59,0xFD5A,0xFD5B,0xFD5C,0xFD5D, -0xFD5E,0xFD5F,0xFD60,0xFD61,0xFD62,0xFD63,0xFD64,0xFD65, -0xFD66,0xFD67,0xFD68,0xFD69,0xFD6A,0xFD6B,0xFD6C,0xFD6D, -0xFD6E,0xFD6F,0xFD70,0xFD71,0xFD72,0xFD73,0xFD74,0xFD75, -0xFD76,0xFD77,0xFD78,0xFD79,0xFD7A,0xFD7B,0xFD7C,0xFD7D, -0xFD7E,0xFD80,0xFD81,0xFD82,0xFD83,0xFD84,0xFD85,0xB3DD, -0xF6B3,0xFD86,0xFD87,0xF6B4,0xC1E4,0xF6B5,0xF6B6,0xF6B7, -0xF6B8,0xF6B9,0xF6BA,0xC8A3,0xF6BB,0xFD88,0xFD89,0xFD8A, -0xFD8B,0xFD8C,0xFD8D,0xFD8E,0xFD8F,0xFD90,0xFD91,0xFD92, -0xFD93,0xC1FA,0xB9A8,0xEDE8,0xFD94,0xFD95,0xFD96,0xB9EA, -0xD9DF,0xFD97,0xFD98,0xFD99,0xFD9A,0xFD9B}; - -/* page 7 0xF92C-0xFA29 */ -static uint16 tab_uni_gbk7[]={ -0xFD9C, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 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0xA3E6,0xA3E7, -0xA3E8,0xA3E9,0xA3EA,0xA3EB,0xA3EC,0xA3ED,0xA3EE,0xA3EF, -0xA3F0,0xA3F1,0xA3F2,0xA3F3,0xA3F4,0xA3F5,0xA3F6,0xA3F7, -0xA3F8,0xA3F9,0xA3FA,0xA3FB,0xA3FC,0xA3FD,0xA1AB, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xA1E9,0xA1EA,0xA956,0xA3FE,0xA957,0xA3A4}; - -static int func_uni_gbk_onechar(int code){ - if ((code>=0x00A4)&&(code<=0x0451)) - return(tab_uni_gbk0[code-0x00A4]); - if ((code>=0x2010)&&(code<=0x2312)) - return(tab_uni_gbk1[code-0x2010]); - if ((code>=0x2460)&&(code<=0x2642)) - return(tab_uni_gbk2[code-0x2460]); - if ((code>=0x3000)&&(code<=0x3129)) - return(tab_uni_gbk3[code-0x3000]); - if ((code>=0x3220)&&(code<=0x32A3)) - return(tab_uni_gbk4[code-0x3220]); - if ((code>=0x338E)&&(code<=0x33D5)) - return(tab_uni_gbk5[code-0x338E]); - if ((code>=0x4E00)&&(code<=0x9FA5)) - return(tab_uni_gbk6[code-0x4E00]); - if ((code>=0xF92C)&&(code<=0xFA29)) - return(tab_uni_gbk7[code-0xF92C]); - if ((code>=0xFE30)&&(code<=0xFFE5)) - return(tab_uni_gbk8[code-0xFE30]); - return(0); -} - -static int -my_wc_mb_gbk(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, uchar *e) -{ - int code; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((uint) wc < 0x80) - { - s[0]= (uchar) wc; - return 1; - } - - if (!(code=func_uni_gbk_onechar(wc))) - return MY_CS_ILUNI; - - if (s+2>e) - return MY_CS_TOOSMALL2; - - s[0]=code>>8; - s[1]=code&0xFF; - return 2; -} - -static int -my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc, const uchar *s, const uchar *e) -{ - int hi; - - if (s >= e) - return MY_CS_TOOSMALL; - - hi=s[0]; - - if (hi<0x80) - { - pwc[0]=hi; - return 1; - } - - if (s+2>e) - return MY_CS_TOOSMALL2; - - if (!(pwc[0]=func_gbk_uni_onechar( (hi<<8) + s[1]))) - return -2; - - return 2; - -} - - -/* - Returns well formed length of a GBK string. -*/ -static -size_t my_well_formed_len_gbk(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, - size_t pos, int *error) -{ - const char *b0= b; - const char *emb= e - 1; /* Last possible end of an MB character */ - - *error= 0; - while (pos-- && b < e) - { - if ((uchar) b[0] < 128) - { - /* Single byte ascii character */ - b++; - } - else if ((b < emb) && isgbkcode((uchar)*b, (uchar)b[1])) - { - /* Double byte character */ - b+= 2; - } - else - { - /* Wrong byte sequence */ - *error= 1; - break; - } - } - return (size_t) (b - b0); -} - - - - -static MY_COLLATION_HANDLER my_collation_ci_handler = -{ - NULL, /* init */ - my_strnncoll_gbk, - my_strnncollsp_gbk, - my_strnxfrm_gbk, - my_strnxfrmlen_simple, - my_like_range_gbk, - my_wildcmp_mb, - my_strcasecmp_mb, - my_instr_mb, - my_hash_sort_simple, - my_propagate_simple -}; - - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - ismbchar_gbk, - mbcharlen_gbk, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_gbk, - my_lengthsp_8bit, - my_numcells_8bit, - my_mb_wc_gbk, - my_wc_mb_gbk, - my_mb_ctype_mb, - my_caseup_str_mb, - my_casedn_str_mb, - my_caseup_mb, - my_casedn_mb, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - -CHARSET_INFO my_charset_gbk_chinese_ci= -{ - 28,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */ - "gbk", /* cs name */ - "gbk_chinese_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_gbk, - to_lower_gbk, - to_upper_gbk, - sort_order_gbk, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 1, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_ci_handler -}; - -CHARSET_INFO my_charset_gbk_bin= -{ - 87,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT, /* state */ - "gbk", /* cs name */ - "gbk_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_gbk, - to_lower_gbk, - to_upper_gbk, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 1, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_mb_bin_handler -}; - - -#endif diff --git a/externals/mysql/strings/ctype-latin1.c b/externals/mysql/strings/ctype-latin1.c deleted file mode 100644 index e2a52b51d3..0000000000 --- a/externals/mysql/strings/ctype-latin1.c +++ /dev/null @@ -1,791 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "m_string.h" -#include "m_ctype.h" - -static uchar ctype_latin1[] = { - 0, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16, - 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, - 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, - 16, 0, 16, 2, 16, 16, 16, 16, 16, 16, 1, 16, 1, 0, 1, 0, - 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 2, 0, 2, 1, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2 -}; - -static uchar to_lower_latin1[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95, - 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - -static uchar to_upper_latin1[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255 -}; - -static uchar sort_order_latin1[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73, - 68, 78, 79, 79, 79, 79, 93,215,216, 85, 85, 85, 89, 89,222,223, - 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73, - 68, 78, 79, 79, 79, 79, 93,247,216, 85, 85, 85, 89, 89,222,255 -}; - -/* - WL#1494 notes: - - We'll use cp1252 instead of iso-8859-1. - cp1252 contains printable characters in the range 0x80-0x9F. - In ISO 8859-1, these code points have no associated printable - characters. Therefore, by converting from CP1252 to ISO 8859-1, - one would lose the euro (for instance). Since most people are - unaware of the difference, and since we don't really want a - "Windows ANSI" to differ from a "Unix ANSI", we will: - - - continue to pretend the latin1 character set is ISO 8859-1 - - actually allow the storage of euro etc. so it's actually cp1252 - - Also we'll map these five undefined cp1252 character: - 0x81, 0x8D, 0x8F, 0x90, 0x9D - into corresponding control characters: - U+0081, U+008D, U+008F, U+0090, U+009D. - like ISO-8859-1 does. Otherwise, loading "mysqldump" - output doesn't reproduce these undefined characters. -*/ - -unsigned short cs_to_uni[256]={ -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC,0x0081,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, -0x02C6,0x2030,0x0160,0x2039,0x0152,0x008D,0x017D,0x008F, -0x0090,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, -0x02DC,0x2122,0x0161,0x203A,0x0153,0x009D,0x017E,0x0178, -0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, -0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, -0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF -}; -uchar pl00[256]={ -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, -0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17, -0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27, -0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37, -0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x8D,0x00,0x8F, -0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x9D,0x00,0x00, -0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7, -0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, -0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7, -0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, -0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7, -0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, -0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7, -0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, -0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7, -0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, -0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7, -0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF -}; -uchar pl01[256]={ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x8C,0x9C,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x8A,0x9A,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x9F,0x00,0x00,0x00,0x00,0x8E,0x9E,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x83,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; -uchar pl02[256]={ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x98,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; -uchar pl20[256]={ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x96,0x97,0x00,0x00,0x00, -0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00, -0x86,0x87,0x95,0x00,0x00,0x00,0x85,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x89,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x8B,0x9B,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; -uchar pl21[256]={ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x99,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; -uchar *uni_to_cs[256]={ -pl00,pl01,pl02,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -pl20,pl21,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL -}; - -static -int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *wc, - const uchar *str, - const uchar *end __attribute__((unused))) -{ - if (str >= end) - return MY_CS_TOOSMALL; - - *wc=cs_to_uni[*str]; - return (!wc[0] && str[0]) ? -1 : 1; -} - -static -int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, - uchar *str, - uchar *end __attribute__((unused))) -{ - uchar *pl; - - if (str >= end) - return MY_CS_TOOSMALL; - - pl= uni_to_cs[(wc>>8) & 0xFF]; - str[0]= pl ? pl[wc & 0xFF] : '\0'; - return (!str[0] && wc) ? MY_CS_ILUNI : 1; -} - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - NULL, - my_mbcharlen_8bit, - my_numchars_8bit, - my_charpos_8bit, - my_well_formed_len_8bit, - my_lengthsp_8bit, - my_numcells_8bit, - my_mb_wc_latin1, - my_wc_mb_latin1, - my_mb_ctype_8bit, - my_caseup_str_8bit, - my_casedn_str_8bit, - my_caseup_8bit, - my_casedn_8bit, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - -CHARSET_INFO my_charset_latin1= -{ - 8,0,0, /* number */ - MY_CS_COMPILED | MY_CS_PRIMARY, /* state */ - "latin1", /* cs name */ - "latin1_swedish_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin1, - to_lower_latin1, - to_upper_latin1, - sort_order_latin1, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - cs_to_uni, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_8bit_simple_ci_handler -}; - - - - -/* - * This file is the latin1 character set with German sorting - * - * The modern sort order is used, where: - * - * 'ä' -> "ae" - * 'ö' -> "oe" - * 'ü' -> "ue" - * 'ß' -> "ss" - */ - - -/* - * This is a simple latin1 mapping table, which maps all accented - * characters to their non-accented equivalents. Note: in this - * table, 'ä' is mapped to 'A', 'ÿ' is mapped to 'Y', etc. - all - * accented characters except the following are treated the same way. - * Ü, ü, Ö, ö, Ä, ä - */ - -static uchar sort_order_latin1_de[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 65, 65, 65, 65,196, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73, - 68, 78, 79, 79, 79, 79,214,215,216, 85, 85, 85,220, 89,222,223, - 65, 65, 65, 65,196, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73, - 68, 78, 79, 79, 79, 79,214,247,216, 85, 85, 85,220, 89,222, 89 -}; - - -/* - same as sort_order_latin_de, but maps ALL accented chars to unaccented ones -*/ - -uchar combo1map[]={ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 65, 65, 65, 65, 65, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73, - 68, 78, 79, 79, 79, 79, 79,215,216, 85, 85, 85, 85, 89,222, 83, - 65, 65, 65, 65, 65, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73, - 68, 78, 79, 79, 79, 79, 79,247,216, 85, 85, 85, 85, 89,222, 89 -}; - -uchar combo2map[]={ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,69, 0, 0, 0, 0, 0,69, 0, 0,83, 0, 0, 0, 0,69, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,69, 0, 0, 0, 0, 0,69, 0, 0, 0, 0 -}; - - -/* - Some notes about the following comparison rules: - By definition, my_strnncoll_latin_de must works exactly as if had called - my_strnxfrm_latin_de() on both strings and compared the result strings. - - This means that: - Ä must also matches ÁE and Aè, because my_strxn_frm_latin_de() will convert - both to AE. - - The other option would be to not do any accent removal in - sort_order_latin_de[] at all -*/ - - -static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool b_is_prefix) -{ - const uchar *a_end= a + a_length; - const uchar *b_end= b + b_length; - uchar a_char, a_extend= 0, b_char, b_extend= 0; - - while ((a < a_end || a_extend) && (b < b_end || b_extend)) - { - if (a_extend) - { - a_char=a_extend; a_extend=0; - } - else - { - a_extend=combo2map[*a]; - a_char=combo1map[*a++]; - } - if (b_extend) - { - b_char=b_extend; b_extend=0; - } - else - { - b_extend=combo2map[*b]; - b_char=combo1map[*b++]; - } - if (a_char != b_char) - return (int) a_char - (int) b_char; - } - /* - A simple test of string lengths won't work -- we test to see - which string ran out first - */ - return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) : - (b < b_end || b_extend) ? -1 : 0); -} - - -static int my_strnncollsp_latin1_de(CHARSET_INFO *cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool diff_if_only_endspace_difference) -{ - const uchar *a_end= a + a_length, *b_end= b + b_length; - uchar a_char, a_extend= 0, b_char, b_extend= 0; - int res; - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - while ((a < a_end || a_extend) && (b < b_end || b_extend)) - { - if (a_extend) - { - a_char=a_extend; - a_extend= 0; - } - else - { - a_extend= combo2map[*a]; - a_char= combo1map[*a++]; - } - if (b_extend) - { - b_char= b_extend; - b_extend= 0; - } - else - { - b_extend= combo2map[*b]; - b_char= combo1map[*b++]; - } - if (a_char != b_char) - return (int) a_char - (int) b_char; - } - /* Check if double character last */ - if (a_extend) - return 1; - if (b_extend) - return -1; - - res= 0; - if (a != a_end || b != b_end) - { - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - /* - Check the next not space character of the longer key. If it's < ' ', - then it's smaller than the other key. - */ - if (a == a_end) - { - /* put shorter key in a */ - a_end= b_end; - a= b; - swap= -1; /* swap sign of result */ - res= -res; - } - for ( ; a < a_end ; a++) - { - if (*a != ' ') - return (*a < ' ') ? -swap : swap; - } - } - return res; -} - - -static size_t -my_strnxfrm_latin1_de(CHARSET_INFO *cs, - uchar *dst, size_t dstlen, uint nweights, - const uchar* src, size_t srclen, uint flags) -{ - uchar *de= dst + dstlen; - const uchar *se= src + srclen; - uchar *d0= dst; - for (; src < se && dst < de && nweights; src++, nweights--) - { - uchar chr= combo1map[*src]; - *dst++= chr; - if ((chr= combo2map[*src]) && dst < de && nweights > 1) - { - *dst++= chr; - nweights--; - } - } - return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0); -} - - -void my_hash_sort_latin1_de(CHARSET_INFO *cs __attribute__((unused)), - const uchar *key, size_t len, - ulong *nr1, ulong *nr2) -{ - const uchar *end; - /* - Remove end space. We have to do this to be able to compare - 'AE' and 'Ä' as identical - */ - end= skip_trailing_space(key, len); - - for (; key < end ; key++) - { - uint X= (uint) combo1map[(uint) *key]; - nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * X) + (nr1[0] << 8); - nr2[0]+=3; - if ((X= combo2map[*key])) - { - nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * X) + (nr1[0] << 8); - nr2[0]+=3; - } - } -} - - -static MY_COLLATION_HANDLER my_collation_german2_ci_handler= -{ - NULL, /* init */ - my_strnncoll_latin1_de, - my_strnncollsp_latin1_de, - my_strnxfrm_latin1_de, - my_strnxfrmlen_simple, - my_like_range_simple, - my_wildcmp_8bit, - my_strcasecmp_8bit, - my_instr_simple, - my_hash_sort_latin1_de, - my_propagate_complex -}; - - -CHARSET_INFO my_charset_latin1_german2_ci= -{ - 31,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM, /* state */ - "latin1", /* cs name */ - "latin1_german2_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin1, - to_lower_latin1, - to_upper_latin1, - sort_order_latin1_de, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - cs_to_uni, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 2, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 247, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_german2_ci_handler -}; - - -CHARSET_INFO my_charset_latin1_bin= -{ - 47,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT, /* state */ - "latin1", /* cs name */ - "latin1_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_latin1, - to_lower_latin1, - to_upper_latin1, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - cs_to_uni, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_8bit_bin_handler -}; - diff --git a/externals/mysql/strings/ctype-mb.c b/externals/mysql/strings/ctype-mb.c deleted file mode 100644 index d041542730..0000000000 --- a/externals/mysql/strings/ctype-mb.c +++ /dev/null @@ -1,1150 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "m_ctype.h" -#include "m_string.h" - -#ifdef USE_MB - - -size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str) -{ - register uint32 l; - register uchar *map= cs->to_upper; - char *str_orig= str; - - while (*str) - { - /* Pointing after the '\0' is safe here. */ - if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen))) - str+= l; - else - { - *str= (char) map[(uchar)*str]; - str++; - } - } - return (size_t) (str - str_orig); -} - - -size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str) -{ - register uint32 l; - register uchar *map= cs->to_lower; - char *str_orig= str; - - while (*str) - { - /* Pointing after the '\0' is safe here. */ - if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen))) - str+= l; - else - { - *str= (char) map[(uchar)*str]; - str++; - } - } - return (size_t) (str - str_orig); -} - - -size_t my_caseup_mb(CHARSET_INFO * cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - register uint32 l; - register char *srcend= src + srclen; - register uchar *map= cs->to_upper; - - DBUG_ASSERT(src == dst && srclen == dstlen); - while (src < srcend) - { - if ((l=my_ismbchar(cs, src, srcend))) - src+= l; - else - { - *src=(char) map[(uchar) *src]; - src++; - } - } - return srclen; -} - - -size_t my_casedn_mb(CHARSET_INFO * cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - register uint32 l; - register char *srcend= src + srclen; - register uchar *map=cs->to_lower; - - DBUG_ASSERT(src == dst && srclen == dstlen); - while (src < srcend) - { - if ((l= my_ismbchar(cs, src, srcend))) - src+= l; - else - { - *src= (char) map[(uchar)*src]; - src++; - } - } - return srclen; -} - - -/* - my_strcasecmp_mb() returns 0 if strings are equal, non-zero otherwise. - */ - -int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t) -{ - register uint32 l; - register uchar *map=cs->to_upper; - - while (*s && *t) - { - /* Pointing after the '\0' is safe here. */ - if ((l=my_ismbchar(cs, s, s + cs->mbmaxlen))) - { - while (l--) - if (*s++ != *t++) - return 1; - } - else if (my_mbcharlen(cs, *t) > 1) - return 1; - else if (map[(uchar) *s++] != map[(uchar) *t++]) - return 1; - } - /* At least one of '*s' and '*t' is zero here. */ - return (*t != *s); -} - - -/* -** Compare string against string with wildcard -** 0 if matched -** -1 if not matched with wildcard -** 1 if matched with wildcard -*/ - -#define INC_PTR(cs,A,B) A+=(my_ismbchar(cs,A,B) ? my_ismbchar(cs,A,B) : 1) - -#define likeconv(s,A) (uchar) (s)->sort_order[(uchar) (A)] - -int my_wildcmp_mb(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - int result= -1; /* Not found, using wildcards */ - - while (wildstr != wildend) - { - while (*wildstr != w_many && *wildstr != w_one) - { - int l; - if (*wildstr == escape && wildstr+1 != wildend) - wildstr++; - if ((l = my_ismbchar(cs, wildstr, wildend))) - { - if (str+l > str_end || memcmp(str, wildstr, l) != 0) - return 1; - str += l; - wildstr += l; - } - else - if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) - return(1); /* No match */ - if (wildstr == wildend) - return (str != str_end); /* Match if both are at end */ - result=1; /* Found an anchor char */ - } - if (*wildstr == w_one) - { - do - { - if (str == str_end) /* Skip one char if possible */ - return (result); - INC_PTR(cs,str,str_end); - } while (++wildstr < wildend && *wildstr == w_one); - if (wildstr == wildend) - break; - } - if (*wildstr == w_many) - { /* Found w_many */ - uchar cmp; - const char* mb = wildstr; - int mb_len=0; - - wildstr++; - /* Remove any '%' and '_' from the wild search string */ - for (; wildstr != wildend ; wildstr++) - { - if (*wildstr == w_many) - continue; - if (*wildstr == w_one) - { - if (str == str_end) - return (-1); - INC_PTR(cs,str,str_end); - continue; - } - break; /* Not a wild character */ - } - if (wildstr == wildend) - return(0); /* Ok if w_many is last */ - if (str == str_end) - return -1; - - if ((cmp= *wildstr) == escape && wildstr+1 != wildend) - cmp= *++wildstr; - - mb=wildstr; - mb_len= my_ismbchar(cs, wildstr, wildend); - INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */ - cmp=likeconv(cs,cmp); - do - { - for (;;) - { - if (str >= str_end) - return -1; - if (mb_len) - { - if (str+mb_len <= str_end && memcmp(str, mb, mb_len) == 0) - { - str += mb_len; - break; - } - } - else if (!my_ismbchar(cs, str, str_end) && - likeconv(cs,*str) == cmp) - { - str++; - break; - } - INC_PTR(cs,str, str_end); - } - { - int tmp=my_wildcmp_mb(cs,str,str_end,wildstr,wildend,escape,w_one, - w_many); - if (tmp <= 0) - return (tmp); - } - } while (str != str_end && wildstr[0] != w_many); - return(-1); - } - } - return (str != str_end ? 1 : 0); -} - - -size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)), - const char *pos, const char *end) -{ - register size_t count= 0; - while (pos < end) - { - uint mb_len; - pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1; - count++; - } - return count; -} - - -size_t my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)), - const char *pos, const char *end, size_t length) -{ - const char *start= pos; - while (length && pos < end) - { - uint mb_len; - pos+= (mb_len= my_ismbchar(cs, pos, end)) ? mb_len : 1; - length--; - } - return (size_t) (length ? end+2-start : pos-start); -} - - -size_t my_well_formed_len_mb(CHARSET_INFO *cs, const char *b, const char *e, - size_t pos, int *error) -{ - const char *b_start= b; - *error= 0; - while (pos) - { - my_wc_t wc; - int mb_len; - - if ((mb_len= cs->cset->mb_wc(cs, &wc, (uchar*) b, (uchar*) e)) <= 0) - { - *error= b < e ? 1 : 0; - break; - } - b+= mb_len; - pos--; - } - return (size_t) (b - b_start); -} - - -uint my_instr_mb(CHARSET_INFO *cs, - const char *b, size_t b_length, - const char *s, size_t s_length, - my_match_t *match, uint nmatch) -{ - register const char *end, *b0; - int res= 0; - - if (s_length <= b_length) - { - if (!s_length) - { - if (nmatch) - { - match->beg= 0; - match->end= 0; - match->mb_len= 0; - } - return 1; /* Empty string is always found */ - } - - b0= b; - end= b+b_length-s_length+1; - - while (b < end) - { - int mb_len; - - if (!cs->coll->strnncoll(cs, (uchar*) b, s_length, - (uchar*) s, s_length, 0)) - { - if (nmatch) - { - match[0].beg= 0; - match[0].end= (size_t) (b-b0); - match[0].mb_len= res; - if (nmatch > 1) - { - match[1].beg= match[0].end; - match[1].end= match[0].end+s_length; - match[1].mb_len= 0; /* Not computed */ - } - } - return 2; - } - mb_len= (mb_len= my_ismbchar(cs, b, end)) ? mb_len : 1; - b+= mb_len; - b_length-= mb_len; - res++; - } - } - return 0; -} - - -/* BINARY collations handlers for MB charsets */ - -int my_strnncoll_mb_bin(CHARSET_INFO * cs __attribute__((unused)), - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - size_t len=min(slen,tlen); - int cmp= memcmp(s,t,len); - return cmp ? cmp : (int) ((t_is_prefix ? len : slen) - tlen); -} - - -/* - Compare two strings. - - SYNOPSIS - my_strnncollsp_mb_bin() - cs Chararacter set - s String to compare - slen Length of 's' - t String to compare - tlen Length of 't' - diff_if_only_endspace_difference - Set to 1 if the strings should be regarded as different - if they only difference in end space - - NOTE - This function is used for character strings with binary collations. - The shorter string is extended with end space to be as long as the longer - one. - - RETURN - A negative number if s < t - A positive number if s > t - 0 if strings are equal -*/ - -int my_strnncollsp_mb_bin(CHARSET_INFO * cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool diff_if_only_endspace_difference) -{ - const uchar *end; - size_t length; - int res; - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - end= a + (length= min(a_length, b_length)); - while (a < end) - { - if (*a++ != *b++) - return ((int) a[-1] - (int) b[-1]); - } - res= 0; - if (a_length != b_length) - { - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - /* - Check the next not space character of the longer key. If it's < ' ', - then it's smaller than the other key. - */ - if (a_length < b_length) - { - /* put shorter key in s */ - a_length= b_length; - a= b; - swap= -1; /* swap sign of result */ - res= -res; - } - for (end= a + a_length-length; a < end ; a++) - { - if (*a != ' ') - return (*a < ' ') ? -swap : swap; - } - } - return res; -} - - -/* - Copy one non-ascii character. - "dst" must have enough room for the character. - Note, we don't use sort_order[] in this macros. - This is correct even for case insensitive collations: - - basic Latin letters are processed outside this macros; - - for other characters sort_order[x] is equal to x. -*/ -#define my_strnxfrm_mb_non_ascii_char(cs, dst, src, se) \ -{ \ - switch (cs->cset->ismbchar(cs, (const char*) src, (const char*) se)) { \ - case 4: \ - *dst++= *src++; \ - /* fall through */ \ - case 3: \ - *dst++= *src++; \ - /* fall through */ \ - case 2: \ - *dst++= *src++; \ - /* fall through */ \ - case 0: \ - *dst++= *src++; /* byte in range 0x80..0xFF which is not MB head */ \ - } \ -} - - -/* - For character sets with two or three byte multi-byte - characters having multibyte weights *equal* to their codes: - cp932, euckr, gb2312, sjis, eucjpms, ujis. -*/ -size_t -my_strnxfrm_mb(CHARSET_INFO *cs, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - uchar *d0= dst; - uchar *de= dst + dstlen; - const uchar *se= src + srclen; - const uchar *sort_order= cs->sort_order; - - DBUG_ASSERT(cs->mbmaxlen <= 4); - - /* - If "srclen" is smaller than both "dstlen" and "nweights" - then we can run a simplified loop - - without checking "nweights" and "de". - */ - if (dstlen >= srclen && nweights >= srclen) - { - if (sort_order) - { - /* Optimized version for a case insensitive collation */ - for (; src < se; nweights--) - { - if (*src < 128) /* quickly catch ASCII characters */ - *dst++= sort_order[*src++]; - else - my_strnxfrm_mb_non_ascii_char(cs, dst, src, se); - } - } - else - { - /* Optimized version for a case sensitive collation (no sort_order) */ - for (; src < se; nweights--) - { - if (*src < 128) /* quickly catch ASCII characters */ - *dst++= *src++; - else - my_strnxfrm_mb_non_ascii_char(cs, dst, src, se); - } - } - goto pad; - } - - /* - A thourough loop, checking all possible limits: - "se", "nweights" and "de". - */ - for (; src < se && nweights && dst < de; nweights--) - { - int chlen; - if (*src < 128 || - !(chlen= cs->cset->ismbchar(cs, (const char*) src, (const char*) se))) - { - /* Single byte character */ - *dst++= sort_order ? sort_order[*src++] : *src++; - } - else - { - /* Multi-byte character */ - int len= (dst + chlen <= de) ? chlen : de - dst; - memcpy(dst, src, len); - dst+= len; - src+= len; - } - } - -pad: - return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0); -} - - -int my_strcasecmp_mb_bin(CHARSET_INFO * cs __attribute__((unused)), - const char *s, const char *t) -{ - return strcmp(s,t); -} - - -void my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)), - const uchar *key, size_t len,ulong *nr1, ulong *nr2) -{ - const uchar *pos = key; - - /* - Remove trailing spaces. We have to do this to be able to compare - 'A ' and 'A' as identical - */ - key= skip_trailing_space(key, len); - - for (; pos < (uchar*) key ; pos++) - { - nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); - nr2[0]+=3; - } -} - - -/* - Fill the given buffer with 'maximum character' for given charset - SYNOPSIS - pad_max_char() - cs Character set - str Start of buffer to fill - end End of buffer to fill - - DESCRIPTION - Write max key: - - for non-Unicode character sets: - just set to 255. - - for Unicode character set (utf-8): - create a buffer with multibyte representation of the max_sort_char - character, and copy it into max_str in a loop. -*/ -static void pad_max_char(CHARSET_INFO *cs, char *str, char *end) -{ - char buf[10]; - char buflen; - - if (!(cs->state & MY_CS_UNICODE)) - { - bfill(str, end - str, 255); - return; - } - - buflen= cs->cset->wc_mb(cs, cs->max_sort_char, (uchar*) buf, - (uchar*) buf + sizeof(buf)); - - DBUG_ASSERT(buflen > 0); - do - { - if ((str + buflen) < end) - { - /* Enough space for the characer */ - memcpy(str, buf, buflen); - str+= buflen; - } - else - { - /* - There is no space for whole multibyte - character, then add trailing spaces. - */ - *str++= ' '; - } - } while (str < end); -} - -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -my_bool my_like_range_mb(CHARSET_INFO *cs, - const char *ptr,size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str,char *max_str, - size_t *min_length,size_t *max_length) -{ - uint mb_len; - const char *end= ptr + ptr_length; - char *min_org= min_str; - char *min_end= min_str + res_length; - char *max_end= max_str + res_length; - size_t maxcharlen= res_length / cs->mbmaxlen; - const char *contraction_flags= cs->contractions ? - ((const char*) cs->contractions) + 0x40*0x40 : NULL; - - for (; ptr != end && min_str != min_end && maxcharlen ; maxcharlen--) - { - /* We assume here that escape, w_any, w_namy are one-byte characters */ - if (*ptr == escape && ptr+1 != end) - ptr++; /* Skip escape */ - else if (*ptr == w_one || *ptr == w_many) /* '_' and '%' in SQL */ - { -fill_max_and_min: - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - /* Create min key */ - do - { - *min_str++= (char) cs->min_sort_char; - } while (min_str != min_end); - - /* - Write max key: create a buffer with multibyte - representation of the max_sort_char character, - and copy it into max_str in a loop. - */ - *max_length= res_length; - pad_max_char(cs, max_str, max_end); - return 0; - } - if ((mb_len= my_ismbchar(cs, ptr, end)) > 1) - { - if (ptr+mb_len > end || min_str+mb_len > min_end) - break; - while (mb_len--) - *min_str++= *max_str++= *ptr++; - } - else - { - /* - Special case for collations with contractions. - For example, in Chezh, 'ch' is a separate letter - which is sorted between 'h' and 'i'. - If the pattern 'abc%', 'c' at the end can mean: - - letter 'c' itself, - - beginning of the contraction 'ch'. - - If we simply return this LIKE range: - - 'abc\min\min\min' and 'abc\max\max\max' - - then this query: SELECT * FROM t1 WHERE a LIKE 'abc%' - will only find values starting from 'abc[^h]', - but won't find values starting from 'abch'. - - We must ignore contraction heads followed by w_one or w_many. - ('Contraction head' means any letter which can be the first - letter in a contraction) - - For example, for Czech 'abc%', we will return LIKE range, - which is equal to LIKE range for 'ab%': - - 'ab\min\min\min\min' and 'ab\max\max\max\max'. - - */ - if (contraction_flags && ptr + 1 < end && - contraction_flags[(uchar) *ptr]) - { - /* Ptr[0] is a contraction head. */ - - if (ptr[1] == w_one || ptr[1] == w_many) - { - /* Contraction head followed by a wildcard, quit. */ - goto fill_max_and_min; - } - - /* - Some letters can be both contraction heads and contraction tails. - For example, in Danish 'aa' is a separate single letter which - is sorted after 'z'. So 'a' can be both head and tail. - - If ptr[0]+ptr[1] is a contraction, - then put both letters together. - - If ptr[1] can be a contraction part, but ptr[0]+ptr[1] - is not a contraction, then we put only ptr[0], - and continue with ptr[1] on the next loop. - */ - if (contraction_flags[(uchar) ptr[1]] && - cs->contractions[(*ptr-0x40)*0x40 + ptr[1] - 0x40]) - { - /* Contraction found */ - if (maxcharlen == 1 || min_str + 1 >= min_end) - { - /* Both contraction parts don't fit, quit */ - goto fill_max_and_min; - } - - /* Put contraction head */ - *min_str++= *max_str++= *ptr++; - maxcharlen--; - } - } - /* Put contraction tail, or a single character */ - *min_str++= *max_str++= *ptr++; - } - } - - *min_length= *max_length = (size_t) (min_str - min_org); - while (min_str != min_end) - *min_str++= *max_str++= ' '; /* Because if key compression */ - return 0; -} - - -int my_wildcmp_mb_bin(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - int result= -1; /* Not found, using wildcards */ - - while (wildstr != wildend) - { - while (*wildstr != w_many && *wildstr != w_one) - { - int l; - if (*wildstr == escape && wildstr+1 != wildend) - wildstr++; - if ((l = my_ismbchar(cs, wildstr, wildend))) - { - if (str+l > str_end || memcmp(str, wildstr, l) != 0) - return 1; - str += l; - wildstr += l; - } - else - if (str == str_end || *wildstr++ != *str++) - return(1); /* No match */ - if (wildstr == wildend) - return (str != str_end); /* Match if both are at end */ - result=1; /* Found an anchor char */ - } - if (*wildstr == w_one) - { - do - { - if (str == str_end) /* Skip one char if possible */ - return (result); - INC_PTR(cs,str,str_end); - } while (++wildstr < wildend && *wildstr == w_one); - if (wildstr == wildend) - break; - } - if (*wildstr == w_many) - { /* Found w_many */ - uchar cmp; - const char* mb = wildstr; - int mb_len=0; - - wildstr++; - /* Remove any '%' and '_' from the wild search string */ - for (; wildstr != wildend ; wildstr++) - { - if (*wildstr == w_many) - continue; - if (*wildstr == w_one) - { - if (str == str_end) - return (-1); - INC_PTR(cs,str,str_end); - continue; - } - break; /* Not a wild character */ - } - if (wildstr == wildend) - return(0); /* Ok if w_many is last */ - if (str == str_end) - return -1; - - if ((cmp= *wildstr) == escape && wildstr+1 != wildend) - cmp= *++wildstr; - - mb=wildstr; - mb_len= my_ismbchar(cs, wildstr, wildend); - INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */ - do - { - for (;;) - { - if (str >= str_end) - return -1; - if (mb_len) - { - if (str+mb_len <= str_end && memcmp(str, mb, mb_len) == 0) - { - str += mb_len; - break; - } - } - else if (!my_ismbchar(cs, str, str_end) && *str == cmp) - { - str++; - break; - } - INC_PTR(cs,str, str_end); - } - { - int tmp=my_wildcmp_mb_bin(cs,str,str_end,wildstr,wildend,escape,w_one,w_many); - if (tmp <= 0) - return (tmp); - } - } while (str != str_end && wildstr[0] != w_many); - return(-1); - } - } - return (str != str_end ? 1 : 0); -} - - -/* - Data was produced from EastAsianWidth.txt - using utt11-dump utility. -*/ -static char pg11[256]= -{ -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,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, -0,0,0,0,0,0,0,0,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 char pg23[256]= -{ -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,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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 -}; - -static char pgFF[256]= -{ -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, -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 -}; - -static struct {int page; char *p;} utr11_data[256]= -{ -{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{0,pg11},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{0,NULL},{0,NULL},{0,pg23},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,pg2E},{0,pg2F}, -{0,pg30},{0,pg31},{0,pg32},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{0,pg4D},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{0,pg9F}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{0,pgA4},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{0,NULL},{0,NULL},{0,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL}, -{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{1,NULL},{0,pgD7}, -{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, -{0,NULL},{1,NULL},{0,pgFA},{0,NULL},{0,NULL},{0,NULL},{0,pgFE},{0,pgFF} -}; - - -size_t my_numcells_mb(CHARSET_INFO *cs, const char *b, const char *e) -{ - my_wc_t wc; - size_t clen= 0; - - while (b < e) - { - int mb_len; - uint pg; - if ((mb_len= cs->cset->mb_wc(cs, &wc, (uchar*) b, (uchar*) e)) <= 0 || - wc > 0xFFFF) - { - /* - Let's think a wrong sequence takes 1 dysplay cell. - Also, consider supplementary characters as taking one cell. - */ - mb_len= 1; - b++; - continue; - } - b+= mb_len; - pg= (wc >> 8) & 0xFF; - clen+= utr11_data[pg].p ? utr11_data[pg].p[wc & 0xFF] : utr11_data[pg].page; - clen++; - } - return clen; -} - - -int my_mb_ctype_mb(CHARSET_INFO *cs, int *ctype, - const uchar *s, const uchar *e) -{ - my_wc_t wc; - int res= cs->cset->mb_wc(cs, &wc, s, e); - if (res <= 0 || wc > 0xFFFF) - *ctype= 0; - else - *ctype= my_uni_ctype[wc>>8].ctype ? - my_uni_ctype[wc>>8].ctype[wc&0xFF] : - my_uni_ctype[wc>>8].pctype; - return res; -} - - -MY_COLLATION_HANDLER my_collation_mb_bin_handler = -{ - NULL, /* init */ - my_strnncoll_mb_bin, - my_strnncollsp_mb_bin, - my_strnxfrm_mb, - my_strnxfrmlen_simple, - my_like_range_mb, - my_wildcmp_mb_bin, - my_strcasecmp_mb_bin, - my_instr_mb, - my_hash_sort_mb_bin, - my_propagate_simple -}; - -#endif diff --git a/externals/mysql/strings/ctype-simple.c b/externals/mysql/strings/ctype-simple.c deleted file mode 100644 index e041a2789d..0000000000 --- a/externals/mysql/strings/ctype-simple.c +++ /dev/null @@ -1,1969 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "m_string.h" -#include "m_ctype.h" -#include "my_sys.h" /* Needed for MY_ERRNO_ERANGE */ -#include - -#include "stdarg.h" - -/* - Returns the number of bytes required for strnxfrm(). -*/ - -size_t my_strnxfrmlen_simple(CHARSET_INFO *cs, size_t len) -{ - return len * (cs->strxfrm_multiply ? cs->strxfrm_multiply : 1); -} - - -/* - Converts a string into its sort key. - - SYNOPSIS - my_strnxfrm_xxx() - - IMPLEMENTATION - - The my_strxfrm_xxx() function transforms a string pointed to by - 'src' with length 'srclen' according to the charset+collation - pair 'cs' and copies the result key into 'dest'. - - Comparing two strings using memcmp() after my_strnxfrm_xxx() - is equal to comparing two original strings with my_strnncollsp_xxx(). - - Not more than 'dstlen' bytes are written into 'dst'. - To garantee that the whole string is transformed, 'dstlen' must be - at least srclen*cs->strnxfrm_multiply bytes long. Otherwise, - consequent memcmp() may return a non-accurate result. - - If the source string is too short to fill whole 'dstlen' bytes, - then the 'dest' string is padded up to 'dstlen', ensuring that: - - "a" == "a " - "a\0" < "a" - "a\0" < "a " - - my_strnxfrm_simple() is implemented for 8bit charsets and - simple collations with one-to-one string->key transformation. - - See also implementations for various charsets/collations in - other ctype-xxx.c files. - - RETURN - - Target len 'dstlen'. - -*/ - - -size_t my_strnxfrm_simple(CHARSET_INFO * cs, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - uchar *map= cs->sort_order; - uchar *d0= dst; - uint frmlen; - if ((frmlen= min(dstlen, nweights)) > srclen) - frmlen= srclen; - if (dst != src) - { - const uchar *end; - for (end= src + frmlen; src < end;) - *dst++= map[*src++]; - } - else - { - const uchar *end; - for (end= dst + frmlen; dst < end; dst++) - *dst= map[(uchar) *dst]; - } - return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, d0 + dstlen, - nweights - frmlen, flags, 0); -} - - -int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - size_t len = ( slen > tlen ) ? tlen : slen; - uchar *map= cs->sort_order; - if (t_is_prefix && slen > tlen) - slen=tlen; - while (len--) - { - if (map[*s++] != map[*t++]) - return ((int) map[s[-1]] - (int) map[t[-1]]); - } - /* - We can't use (slen - tlen) here as the result may be outside of the - precision of a signed int - */ - return slen > tlen ? 1 : slen < tlen ? -1 : 0 ; -} - - -/* - Compare strings, discarding end space - - SYNOPSIS - my_strnncollsp_simple() - cs character set handler - a First string to compare - a_length Length of 'a' - b Second string to compare - b_length Length of 'b' - diff_if_only_endspace_difference - Set to 1 if the strings should be regarded as different - if they only difference in end space - - IMPLEMENTATION - If one string is shorter as the other, then we space extend the other - so that the strings have equal length. - - This will ensure that the following things hold: - - "a" == "a " - "a\0" < "a" - "a\0" < "a " - - RETURN - < 0 a < b - = 0 a == b - > 0 a > b -*/ - -int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool diff_if_only_endspace_difference) -{ - const uchar *map= cs->sort_order, *end; - size_t length; - int res; - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - end= a + (length= min(a_length, b_length)); - while (a < end) - { - if (map[*a++] != map[*b++]) - return ((int) map[a[-1]] - (int) map[b[-1]]); - } - res= 0; - if (a_length != b_length) - { - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - /* - Check the next not space character of the longer key. If it's < ' ', - then it's smaller than the other key. - */ - if (a_length < b_length) - { - /* put shorter key in s */ - a_length= b_length; - a= b; - swap= -1; /* swap sign of result */ - res= -res; - } - for (end= a + a_length-length; a < end ; a++) - { - if (map[*a] != ' ') - return (map[*a] < ' ') ? -swap : swap; - } - } - return res; -} - - -size_t my_caseup_str_8bit(CHARSET_INFO * cs,char *str) -{ - register uchar *map= cs->to_upper; - char *str_orig= str; - while ((*str= (char) map[(uchar) *str]) != 0) - str++; - return (size_t) (str - str_orig); -} - - -size_t my_casedn_str_8bit(CHARSET_INFO * cs,char *str) -{ - register uchar *map= cs->to_lower; - char *str_orig= str; - while ((*str= (char) map[(uchar) *str]) != 0) - str++; - return (size_t) (str - str_orig); -} - - -size_t my_caseup_8bit(CHARSET_INFO * cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - char *end= src + srclen; - register uchar *map= cs->to_upper; - DBUG_ASSERT(src == dst && srclen == dstlen); - for ( ; src != end ; src++) - *src= (char) map[(uchar) *src]; - return srclen; -} - - -size_t my_casedn_8bit(CHARSET_INFO * cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - char *end= src + srclen; - register uchar *map=cs->to_lower; - DBUG_ASSERT(src == dst && srclen == dstlen); - for ( ; src != end ; src++) - *src= (char) map[(uchar) *src]; - return srclen; -} - -int my_strcasecmp_8bit(CHARSET_INFO * cs,const char *s, const char *t) -{ - register uchar *map=cs->to_upper; - while (map[(uchar) *s] == map[(uchar) *t++]) - if (!*s++) return 0; - return ((int) map[(uchar) s[0]] - (int) map[(uchar) t[-1]]); -} - - -int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, - const uchar *str, - const uchar *end __attribute__((unused))) -{ - if (str >= end) - return MY_CS_TOOSMALL; - - *wc=cs->tab_to_uni[*str]; - return (!wc[0] && str[0]) ? -1 : 1; -} - -int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, - uchar *str, - uchar *end) -{ - MY_UNI_IDX *idx; - - if (str >= end) - return MY_CS_TOOSMALL; - - for (idx=cs->tab_from_uni; idx->tab ; idx++) - { - if (idx->from <= wc && idx->to >= wc) - { - str[0]= idx->tab[wc - idx->from]; - return (!str[0] && wc) ? MY_CS_ILUNI : 1; - } - } - return MY_CS_ILUNI; -} - - -/* - We can't use vsprintf here as it's not guaranteed to return - the length on all operating systems. - This function is also not called in a safe environment, so the - end buffer must be checked. -*/ - -size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), - char* to, size_t n __attribute__((unused)), - const char* fmt, ...) -{ - va_list args; - int result; - va_start(args,fmt); - result= my_vsnprintf(to, n, fmt, args); - va_end(args); - return result; -} - - -void my_hash_sort_simple(CHARSET_INFO *cs, - const uchar *key, size_t len, - ulong *nr1, ulong *nr2) -{ - register uchar *sort_order=cs->sort_order; - const uchar *end; - - /* - Remove end space. We have to do this to be able to compare - 'A ' and 'A' as identical - */ - end= skip_trailing_space(key, len); - - for (; key < (uchar*) end ; key++) - { - nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint) sort_order[(uint) *key])) + (nr1[0] << 8); - nr2[0]+=3; - } -} - - -long my_strntol_8bit(CHARSET_INFO *cs, - const char *nptr, size_t l, int base, - char **endptr, int *err) -{ - int negative; - register uint32 cutoff; - register uint cutlim; - register uint32 i; - register const char *s; - register uchar c; - const char *save, *e; - int overflow; - - *err= 0; /* Initialize error indicator */ -#ifdef NOT_USED - if (base < 0 || base == 1 || base > 36) - base = 10; -#endif - - s = nptr; - e = nptr+l; - - for ( ; s='0' && c<='9') - c -= '0'; - else if (c>='A' && c<='Z') - c = c - 'A' + 10; - else if (c>='a' && c<='z') - c = c - 'a' + 10; - else - break; - if (c >= base) - break; - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (uint32) base; - i += c; - } - } - - if (s == save) - goto noconv; - - if (endptr != NULL) - *endptr = (char *) s; - - if (negative) - { - if (i > (uint32) INT_MIN32) - overflow = 1; - } - else if (i > INT_MAX32) - overflow = 1; - - if (overflow) - { - err[0]= ERANGE; - return negative ? INT_MIN32 : INT_MAX32; - } - - return (negative ? -((long) i) : (long) i); - -noconv: - err[0]= EDOM; - if (endptr != NULL) - *endptr = (char *) nptr; - return 0L; -} - - -ulong my_strntoul_8bit(CHARSET_INFO *cs, - const char *nptr, size_t l, int base, - char **endptr, int *err) -{ - int negative; - register uint32 cutoff; - register uint cutlim; - register uint32 i; - register const char *s; - register uchar c; - const char *save, *e; - int overflow; - - *err= 0; /* Initialize error indicator */ -#ifdef NOT_USED - if (base < 0 || base == 1 || base > 36) - base = 10; -#endif - - s = nptr; - e = nptr+l; - - for( ; s='0' && c<='9') - c -= '0'; - else if (c>='A' && c<='Z') - c = c - 'A' + 10; - else if (c>='a' && c<='z') - c = c - 'a' + 10; - else - break; - if (c >= base) - break; - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (uint32) base; - i += c; - } - } - - if (s == save) - goto noconv; - - if (endptr != NULL) - *endptr = (char *) s; - - if (overflow) - { - err[0]= ERANGE; - return (~(uint32) 0); - } - - return (negative ? -((long) i) : (long) i); - -noconv: - err[0]= EDOM; - if (endptr != NULL) - *endptr = (char *) nptr; - return 0L; -} - - -longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)), - const char *nptr, size_t l, int base, - char **endptr,int *err) -{ - int negative; - register ulonglong cutoff; - register uint cutlim; - register ulonglong i; - register const char *s, *e; - const char *save; - int overflow; - - *err= 0; /* Initialize error indicator */ -#ifdef NOT_USED - if (base < 0 || base == 1 || base > 36) - base = 10; -#endif - - s = nptr; - e = nptr+l; - - for(; s='0' && c<='9') - c -= '0'; - else if (c>='A' && c<='Z') - c = c - 'A' + 10; - else if (c>='a' && c<='z') - c = c - 'a' + 10; - else - break; - if (c >= base) - break; - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (ulonglong) base; - i += c; - } - } - - if (s == save) - goto noconv; - - if (endptr != NULL) - *endptr = (char *) s; - - if (negative) - { - if (i > (ulonglong) LONGLONG_MIN) - overflow = 1; - } - else if (i > (ulonglong) LONGLONG_MAX) - overflow = 1; - - if (overflow) - { - err[0]= ERANGE; - return negative ? LONGLONG_MIN : LONGLONG_MAX; - } - - return (negative ? -((longlong) i) : (longlong) i); - -noconv: - err[0]= EDOM; - if (endptr != NULL) - *endptr = (char *) nptr; - return 0L; -} - - -ulonglong my_strntoull_8bit(CHARSET_INFO *cs, - const char *nptr, size_t l, int base, - char **endptr, int *err) -{ - int negative; - register ulonglong cutoff; - register uint cutlim; - register ulonglong i; - register const char *s, *e; - const char *save; - int overflow; - - *err= 0; /* Initialize error indicator */ -#ifdef NOT_USED - if (base < 0 || base == 1 || base > 36) - base = 10; -#endif - - s = nptr; - e = nptr+l; - - for(; s='0' && c<='9') - c -= '0'; - else if (c>='A' && c<='Z') - c = c - 'A' + 10; - else if (c>='a' && c<='z') - c = c - 'a' + 10; - else - break; - if (c >= base) - break; - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (ulonglong) base; - i += c; - } - } - - if (s == save) - goto noconv; - - if (endptr != NULL) - *endptr = (char *) s; - - if (overflow) - { - err[0]= ERANGE; - return (~(ulonglong) 0); - } - - return (negative ? -((longlong) i) : (longlong) i); - -noconv: - err[0]= EDOM; - if (endptr != NULL) - *endptr = (char *) nptr; - return 0L; -} - - -/* - Read double from string - - SYNOPSIS: - my_strntod_8bit() - cs Character set information - str String to convert to double - length Optional length for string. - end result pointer to end of converted string - err Error number if failed conversion - - NOTES: - If length is not INT_MAX32 or str[length] != 0 then the given str must - be writeable - If length == INT_MAX32 the str must be \0 terminated. - - It's implemented this way to save a buffer allocation and a memory copy. - - RETURN - Value of number in string -*/ - - -double my_strntod_8bit(CHARSET_INFO *cs __attribute__((unused)), - char *str, size_t length, - char **end, int *err) -{ - if (length == INT_MAX32) - length= 65535; /* Should be big enough */ - *end= str + length; - return my_strtod(str, end, err); -} - - -/* - This is a fast version optimized for the case of radix 10 / -10 - - Assume len >= 1 -*/ - -size_t my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), - char *dst, size_t len, int radix, long int val) -{ - char buffer[66]; - register char *p, *e; - long int new_val; - uint sign=0; - unsigned long int uval = (unsigned long int) val; - - e = p = &buffer[sizeof(buffer)-1]; - *p= 0; - - if (radix < 0) - { - if (val < 0) - { - /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ - uval= (unsigned long int)0 - uval; - *dst++= '-'; - len--; - sign= 1; - } - } - - new_val = (long) (uval / 10); - *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); - val = new_val; - - while (val != 0) - { - new_val=val/10; - *--p = '0' + (char) (val-new_val*10); - val= new_val; - } - - len= min(len, (size_t) (e-p)); - memcpy(dst, p, len); - return len+sign; -} - - -size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), - char *dst, size_t len, int radix, - longlong val) -{ - char buffer[65]; - register char *p, *e; - long long_val; - uint sign= 0; - ulonglong uval = (ulonglong)val; - - if (radix < 0) - { - if (val < 0) - { - /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ - uval = (ulonglong)0 - uval; - *dst++= '-'; - len--; - sign= 1; - } - } - - e = p = &buffer[sizeof(buffer)-1]; - *p= 0; - - if (uval == 0) - { - *--p= '0'; - len= 1; - goto cnv; - } - - while (uval > (ulonglong) LONG_MAX) - { - ulonglong quo= uval/(uint) 10; - uint rem= (uint) (uval- quo* (uint) 10); - *--p = '0' + rem; - uval= quo; - } - - long_val= (long) uval; - while (long_val != 0) - { - long quo= long_val/10; - *--p = (char) ('0' + (long_val - quo*10)); - long_val= quo; - } - - len= min(len, (size_t) (e-p)); -cnv: - memcpy(dst, p, len); - return len+sign; -} - - -/* -** Compare string against string with wildcard -** 0 if matched -** -1 if not matched with wildcard -** 1 if matched with wildcard -*/ - -#ifdef LIKE_CMP_TOUPPER -#define likeconv(s,A) (uchar) my_toupper(s,A) -#else -#define likeconv(s,A) (uchar) (s)->sort_order[(uchar) (A)] -#endif - -#define INC_PTR(cs,A,B) (A)++ - - -int my_wildcmp_8bit(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - int result= -1; /* Not found, using wildcards */ - - while (wildstr != wildend) - { - while (*wildstr != w_many && *wildstr != w_one) - { - if (*wildstr == escape && wildstr+1 != wildend) - wildstr++; - - if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) - return(1); /* No match */ - if (wildstr == wildend) - return(str != str_end); /* Match if both are at end */ - result=1; /* Found an anchor char */ - } - if (*wildstr == w_one) - { - do - { - if (str == str_end) /* Skip one char if possible */ - return(result); - INC_PTR(cs,str,str_end); - } while (++wildstr < wildend && *wildstr == w_one); - if (wildstr == wildend) - break; - } - if (*wildstr == w_many) - { /* Found w_many */ - uchar cmp; - - wildstr++; - /* Remove any '%' and '_' from the wild search string */ - for (; wildstr != wildend ; wildstr++) - { - if (*wildstr == w_many) - continue; - if (*wildstr == w_one) - { - if (str == str_end) - return(-1); - INC_PTR(cs,str,str_end); - continue; - } - break; /* Not a wild character */ - } - if (wildstr == wildend) - return(0); /* Ok if w_many is last */ - if (str == str_end) - return(-1); - - if ((cmp= *wildstr) == escape && wildstr+1 != wildend) - cmp= *++wildstr; - - INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */ - cmp=likeconv(cs,cmp); - do - { - while (str != str_end && (uchar) likeconv(cs,*str) != cmp) - str++; - if (str++ == str_end) return(-1); - { - int tmp=my_wildcmp_8bit(cs,str,str_end,wildstr,wildend,escape,w_one, - w_many); - if (tmp <= 0) - return(tmp); - } - } while (str != str_end && wildstr[0] != w_many); - return(-1); - } - } - return(str != str_end ? 1 : 0); -} - - -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -my_bool my_like_range_simple(CHARSET_INFO *cs, - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str,char *max_str, - size_t *min_length, size_t *max_length) -{ - const char *end= ptr + ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - size_t charlen= res_length / cs->mbmaxlen; - - for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--) - { - if (*ptr == escape && ptr+1 != end) - { - ptr++; /* Skip escape */ - *min_str++= *max_str++ = *ptr; - continue; - } - if (*ptr == w_one) /* '_' in SQL */ - { - *min_str++='\0'; /* This should be min char */ - *max_str++= (char) cs->max_sort_char; - continue; - } - if (*ptr == w_many) /* '%' in SQL */ - { - /* Calculate length of keys */ - *min_length= ((cs->state & MY_CS_BINSORT) ? - (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - do - { - *min_str++= 0; - *max_str++= (char) cs->max_sort_char; - } while (min_str != min_end); - return 0; - } - *min_str++= *max_str++ = *ptr; - } - - *min_length= *max_length = (size_t) (min_str - min_org); - while (min_str != min_end) - *min_str++= *max_str++ = ' '; /* Because if key compression */ - return 0; -} - - -size_t my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq) -{ - const char *str0= str; - switch (sq) - { - case MY_SEQ_INTTAIL: - if (*str == '.') - { - for(str++ ; str != end && *str == '0' ; str++); - return (size_t) (str - str0); - } - return 0; - - case MY_SEQ_SPACES: - for ( ; str < end ; str++) - { - if (!my_isspace(cs,*str)) - break; - } - return (size_t) (str - str0); - default: - return 0; - } -} - - -void my_fill_8bit(CHARSET_INFO *cs __attribute__((unused)), - char *s, size_t l, int fill) -{ - bfill((uchar*) s,l,fill); -} - - -size_t my_numchars_8bit(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e) -{ - return (size_t) (e - b); -} - - -size_t my_numcells_8bit(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e) -{ - return (size_t) (e - b); -} - - -size_t my_charpos_8bit(CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused)), - size_t pos) -{ - return pos; -} - - -size_t my_well_formed_len_8bit(CHARSET_INFO *cs __attribute__((unused)), - const char *start, const char *end, - size_t nchars, int *error) -{ - size_t nbytes= (size_t) (end-start); - *error= 0; - return min(nbytes, nchars); -} - - -size_t my_lengthsp_8bit(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr, size_t length) -{ - const char *end; - end= (const char *) skip_trailing_space((const uchar *)ptr, length); - return (size_t) (end-ptr); -} - - -uint my_instr_simple(CHARSET_INFO *cs, - const char *b, size_t b_length, - const char *s, size_t s_length, - my_match_t *match, uint nmatch) -{ - register const uchar *str, *search, *end, *search_end; - - if (s_length <= b_length) - { - if (!s_length) - { - if (nmatch) - { - match->beg= 0; - match->end= 0; - match->mb_len= 0; - } - return 1; /* Empty string is always found */ - } - - str= (const uchar*) b; - search= (const uchar*) s; - end= (const uchar*) b+b_length-s_length+1; - search_end= (const uchar*) s + s_length; - -skip: - while (str != end) - { - if (cs->sort_order[*str++] == cs->sort_order[*search]) - { - register const uchar *i,*j; - - i= str; - j= search+1; - - while (j != search_end) - if (cs->sort_order[*i++] != cs->sort_order[*j++]) - goto skip; - - if (nmatch > 0) - { - match[0].beg= 0; - match[0].end= (size_t) (str- (const uchar*)b-1); - match[0].mb_len= match[0].end; - - if (nmatch > 1) - { - match[1].beg= match[0].end; - match[1].end= match[0].end+s_length; - match[1].mb_len= match[1].end-match[1].beg; - } - } - return 2; - } - } - } - return 0; -} - - -typedef struct -{ - int nchars; - MY_UNI_IDX uidx; -} uni_idx; - -#define PLANE_SIZE 0x100 -#define PLANE_NUM 0x100 -#define PLANE_NUMBER(x) (((x)>>8) % PLANE_NUM) - -static int pcmp(const void * f, const void * s) -{ - const uni_idx *F= (const uni_idx*) f; - const uni_idx *S= (const uni_idx*) s; - int res; - - if (!(res=((S->nchars)-(F->nchars)))) - res=((F->uidx.from)-(S->uidx.to)); - return res; -} - -static my_bool create_fromuni(CHARSET_INFO *cs, void *(*alloc)(size_t)) -{ - uni_idx idx[PLANE_NUM]; - int i,n; - - /* - Check that Unicode map is loaded. - It can be not loaded when the collation is - listed in Index.xml but not specified - in the character set specific XML file. - */ - if (!cs->tab_to_uni) - return TRUE; - - /* Clear plane statistics */ - bzero(idx,sizeof(idx)); - - /* Count number of characters in each plane */ - for (i=0; i< 0x100; i++) - { - uint16 wc=cs->tab_to_uni[i]; - int pl= PLANE_NUMBER(wc); - - if (wc || !i) - { - if (!idx[pl].nchars) - { - idx[pl].uidx.from=wc; - idx[pl].uidx.to=wc; - }else - { - idx[pl].uidx.from=wcidx[pl].uidx.to?wc:idx[pl].uidx.to; - } - idx[pl].nchars++; - } - } - - /* Sort planes in descending order */ - qsort(&idx,PLANE_NUM,sizeof(uni_idx),&pcmp); - - for (i=0; i < PLANE_NUM; i++) - { - int ch,numchars; - - /* Skip empty plane */ - if (!idx[i].nchars) - break; - - numchars=idx[i].uidx.to-idx[i].uidx.from+1; - if (!(idx[i].uidx.tab=(uchar*) alloc(numchars * sizeof(*idx[i].uidx.tab)))) - return TRUE; - - bzero(idx[i].uidx.tab,numchars*sizeof(*idx[i].uidx.tab)); - - for (ch=1; ch < PLANE_SIZE; ch++) - { - uint16 wc=cs->tab_to_uni[ch]; - if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc) - { - int ofs= wc - idx[i].uidx.from; - idx[i].uidx.tab[ofs]= ch; - } - } - } - - /* Allocate and fill reverse table for each plane */ - n=i; - if (!(cs->tab_from_uni= (MY_UNI_IDX*) alloc(sizeof(MY_UNI_IDX)*(n+1)))) - return TRUE; - - for (i=0; i< n; i++) - cs->tab_from_uni[i]= idx[i].uidx; - - /* Set end-of-list marker */ - bzero(&cs->tab_from_uni[i],sizeof(MY_UNI_IDX)); - return FALSE; -} - -static my_bool my_cset_init_8bit(CHARSET_INFO *cs, void *(*alloc)(size_t)) -{ - cs->caseup_multiply= 1; - cs->casedn_multiply= 1; - cs->pad_char= ' '; - return create_fromuni(cs, alloc); -} - -static void set_max_sort_char(CHARSET_INFO *cs) -{ - uchar max_char; - uint i; - - if (!cs->sort_order) - return; - - max_char=cs->sort_order[(uchar) cs->max_sort_char]; - for (i= 0; i < 256; i++) - { - if ((uchar) cs->sort_order[i] > max_char) - { - max_char=(uchar) cs->sort_order[i]; - cs->max_sort_char= i; - } - } -} - -static my_bool my_coll_init_simple(CHARSET_INFO *cs, - void *(*alloc)(size_t) __attribute__((unused))) -{ - set_max_sort_char(cs); - return FALSE; -} - - -longlong my_strtoll10_8bit(CHARSET_INFO *cs __attribute__((unused)), - const char *nptr, char **endptr, int *error) -{ - return my_strtoll10(nptr, endptr, error); -} - - -int my_mb_ctype_8bit(CHARSET_INFO *cs, int *ctype, - const uchar *s, const uchar *e) -{ - if (s >= e) - { - *ctype= 0; - return MY_CS_TOOSMALL; - } - *ctype= cs->ctype[*s + 1]; - return 1; -} - - -#undef ULONGLONG_MAX -/* - Needed under MetroWerks Compiler, since MetroWerks compiler does not - properly handle a constant expression containing a mod operator -*/ -#if defined(__NETWARE__) && defined(__MWERKS__) -static ulonglong ulonglong_max= ~(ulonglong) 0; -#define ULONGLONG_MAX ulonglong_max -#else -#define ULONGLONG_MAX (~(ulonglong) 0) -#endif /* __NETWARE__ && __MWERKS__ */ - - -#define CUTOFF (ULONGLONG_MAX / 10) -#define CUTLIM (ULONGLONG_MAX % 10) -#define DIGITS_IN_ULONGLONG 20 - -static ulonglong d10[DIGITS_IN_ULONGLONG]= -{ - 1, - 10, - 100, - 1000, - 10000, - 100000, - 1000000, - 10000000, - 100000000, - 1000000000, - 10000000000ULL, - 100000000000ULL, - 1000000000000ULL, - 10000000000000ULL, - 100000000000000ULL, - 1000000000000000ULL, - 10000000000000000ULL, - 100000000000000000ULL, - 1000000000000000000ULL, - 10000000000000000000ULL -}; - - -/* - - Convert a string to unsigned long long integer value - with rounding. - - SYNOPSYS - my_strntoull10_8bit() - cs in pointer to character set - str in pointer to the string to be converted - length in string length - unsigned_flag in whether the number is unsigned - endptr out pointer to the stop character - error out returned error code - - DESCRIPTION - This function takes the decimal representation of integer number - from string str and converts it to an signed or unsigned - long long integer value. - Space characters and tab are ignored. - A sign character might precede the digit characters. - The number may have any number of pre-zero digits. - The number may have decimal point and exponent. - Rounding is always done in "away from zero" style: - 0.5 -> 1 - -0.5 -> -1 - - The function stops reading the string str after "length" bytes - or at the first character that is not a part of correct number syntax: - - ::= - [ ] [ E [ ] ] - - ::= - [ [ ] ] - | - ::= ... - - RETURN VALUES - Value of string as a signed/unsigned longlong integer - - endptr cannot be NULL. The function will store the end pointer - to the stop character here. - - The error parameter contains information how things went: - 0 ok - ERANGE If the the value of the converted number is out of range - In this case the return value is: - - ULONGLONG_MAX if unsigned_flag and the number was too big - - 0 if unsigned_flag and the number was negative - - LONGLONG_MAX if no unsigned_flag and the number is too big - - LONGLONG_MIN if no unsigned_flag and the number it too big negative - - EDOM If the string didn't contain any digits. - In this case the return value is 0. -*/ - -ulonglong -my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)), - const char *str, size_t length, int unsigned_flag, - char **endptr, int *error) -{ - const char *dot, *end9, *beg, *end= str + length; - ulonglong ull; - ulong ul; - uchar ch; - int shift= 0, digits= 0, negative, addon; - - /* Skip leading spaces and tabs */ - for ( ; str < end && (*str == ' ' || *str == '\t') ; str++); - - if (str >= end) - goto ret_edom; - - if ((negative= (*str == '-')) || *str=='+') /* optional sign */ - { - if (++str == end) - goto ret_edom; - } - - beg= str; - end9= (str + 9) > end ? end : (str + 9); - /* Accumulate small number into ulong, for performance purposes */ - for (ul= 0 ; str < end9 && (ch= (uchar) (*str - '0')) < 10; str++) - { - ul= ul * 10 + ch; - } - - if (str >= end) /* Small number without dots and expanents */ - { - *endptr= (char*) str; - if (negative) - { - if (unsigned_flag) - { - *error= ul ? MY_ERRNO_ERANGE : 0; - return 0; - } - else - { - *error= 0; - return (ulonglong) (longlong) -(long) ul; - } - } - else - { - *error=0; - return (ulonglong) ul; - } - } - - digits= str - beg; - - /* Continue to accumulate into ulonglong */ - for (dot= NULL, ull= ul; str < end; str++) - { - if ((ch= (uchar) (*str - '0')) < 10) - { - if (ull < CUTOFF || (ull == CUTOFF && ch <= CUTLIM)) - { - ull= ull * 10 + ch; - digits++; - continue; - } - /* - Adding the next digit would overflow. - Remember the next digit in "addon", for rounding. - Scan all digits with an optional single dot. - */ - if (ull == CUTOFF) - { - ull= ULONGLONG_MAX; - addon= 1; - str++; - } - else - addon= (*str >= '5'); - if (!dot) - { - for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; shift++, str++); - if (str < end && *str == '.') - { - str++; - for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++); - } - } - else - { - shift= dot - str; - for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++); - } - goto exp; - } - - if (*str == '.') - { - if (dot) - { - /* The second dot character */ - addon= 0; - goto exp; - } - else - { - dot= str + 1; - } - continue; - } - - /* Unknown character, exit the loop */ - break; - } - shift= dot ? dot - str : 0; /* Right shift */ - addon= 0; - -exp: /* [ E [ ] ] */ - - if (!digits) - { - str= beg; - goto ret_edom; - } - - if (str < end && (*str == 'e' || *str == 'E')) - { - str++; - if (str < end) - { - int negative_exp, exponent; - if ((negative_exp= (*str == '-')) || *str=='+') - { - if (++str == end) - goto ret_sign; - } - for (exponent= 0 ; - str < end && (ch= (uchar) (*str - '0')) < 10; - str++) - { - exponent= exponent * 10 + ch; - } - shift+= negative_exp ? -exponent : exponent; - } - } - - if (shift == 0) /* No shift, check addon digit */ - { - if (addon) - { - if (ull == ULONGLONG_MAX) - goto ret_too_big; - ull++; - } - goto ret_sign; - } - - if (shift < 0) /* Right shift */ - { - ulonglong d, r; - - if (-shift >= DIGITS_IN_ULONGLONG) - goto ret_zero; /* Exponent is a big negative number, return 0 */ - - d= d10[-shift]; - r= (ull % d) * 2; - ull /= d; - if (r >= d) - ull++; - goto ret_sign; - } - - if (shift > DIGITS_IN_ULONGLONG) /* Huge left shift */ - { - if (!ull) - goto ret_sign; - goto ret_too_big; - } - - for ( ; shift > 0; shift--, ull*= 10) /* Left shift */ - { - if (ull > CUTOFF) - goto ret_too_big; /* Overflow, number too big */ - } - -ret_sign: - *endptr= (char*) str; - - if (!unsigned_flag) - { - if (negative) - { - if (ull > (ulonglong) LONGLONG_MIN) - { - *error= MY_ERRNO_ERANGE; - return (ulonglong) LONGLONG_MIN; - } - *error= 0; - return (ulonglong) -(longlong) ull; - } - else - { - if (ull > (ulonglong) LONGLONG_MAX) - { - *error= MY_ERRNO_ERANGE; - return (ulonglong) LONGLONG_MAX; - } - *error= 0; - return ull; - } - } - - /* Unsigned number */ - if (negative && ull) - { - *error= MY_ERRNO_ERANGE; - return 0; - } - *error= 0; - return ull; - -ret_zero: - *endptr= (char*) str; - *error= 0; - return 0; - -ret_edom: - *endptr= (char*) str; - *error= MY_ERRNO_EDOM; - return 0; - -ret_too_big: - *endptr= (char*) str; - *error= MY_ERRNO_ERANGE; - return unsigned_flag ? - ULONGLONG_MAX : - negative ? (ulonglong) LONGLONG_MIN : (ulonglong) LONGLONG_MAX; -} - - -/* - Check if a constant can be propagated - - SYNOPSIS: - my_propagate_simple() - cs Character set information - str String to convert to double - length Optional length for string. - - NOTES: - Takes the string in the given charset and check - if it can be safely propagated in the optimizer. - - create table t1 ( - s char(5) character set latin1 collate latin1_german2_ci); - insert into t1 values (0xf6); -- o-umlaut - select * from t1 where length(s)=1 and s='oe'; - - The above query should return one row. - We cannot convert this query into: - select * from t1 where length('oe')=1 and s='oe'; - - Currently we don't check the constant itself, - and decide not to propagate a constant - just if the collation itself allows tricky things - like expansions and contractions. In the future - we can write a more sophisticated functions to - check the constants. For example, 'oa' can always - be safety propagated in German2 because unlike - 'oe' it does not have any special meaning. - - RETURN - 1 if constant can be safely propagated - 0 if it is not safe to propagate the constant -*/ - - - -my_bool my_propagate_simple(CHARSET_INFO *cs __attribute__((unused)), - const uchar *str __attribute__((unused)), - size_t length __attribute__((unused))) -{ - return 1; -} - - -my_bool my_propagate_complex(CHARSET_INFO *cs __attribute__((unused)), - const uchar *str __attribute__((unused)), - size_t length __attribute__((unused))) -{ - return 0; -} - - - -/* - Normalize strxfrm flags - - SYNOPSIS: - my_strxfrm_flag_normalize() - flags - non-normalized flags - nlevels - number of levels - - NOTES: - If levels are omitted, then 1-maximum is assumed. - If any level number is greater than the maximum, - it is treated as the maximum. - - RETURN - normalized flags -*/ - -uint my_strxfrm_flag_normalize(uint flags, uint maximum) -{ - DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS); - - /* If levels are omitted, then 1-maximum is assumed*/ - if (!(flags & MY_STRXFRM_LEVEL_ALL)) - { - static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F }; - uint flag_pad= flags & - (MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN); - flags= def_level_flags[maximum] | flag_pad; - } - else - { - uint i; - uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL; - uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL; - uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL; - uint flag_pad= flags & - (MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN); - - /* - If any level number is greater than the maximum, - it is treated as the maximum. - */ - for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++) - { - uint src_bit= 1 << i; - if (flag_lev & src_bit) - { - uint dst_bit= 1 << min(i, maximum); - flags|= dst_bit; - flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT; - flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT; - } - else - { - /* Check that there are no DESC or REVERSE flag for skipped level */ - DBUG_ASSERT(!(flag_dsc & src_bit) && !(flag_rev & src_bit)); - } - } - flags|= flag_pad; - } - - return flags; -} - -/* - Apply DESC and REVERSE collation rules. - - SYNOPSIS: - my_strxfrm_desc_and_reverse() - str - pointer to string - strend - end of string - flags - flags - level - which level, starting from 0. - - NOTES: - Apply DESC or REVERSE or both flags. - - If DESC flag is given, then the weights - come out NOTed or negated for that level. - - If REVERSE flags is given, then the weights come out in - reverse order for that level, that is, starting with - the last character and ending with the first character. - - If nether DESC nor REVERSE flags are give, - the string is not changed. - -*/ -void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, - uint flags, uint level) -{ - if (flags & (MY_STRXFRM_DESC_LEVEL1 << level)) - { - if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) - { - for (strend--; str <= strend;) - { - uchar tmp= *str; - *str++= ~*strend; - *strend--= ~tmp; - } - } - else - { - for (; str < strend; str++) - *str= ~*str; - } - } - else if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) - { - for (strend--; str < strend;) - { - uchar tmp= *str; - *str++= *strend; - *strend--= tmp; - } - } -} - - -size_t -my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs, - uchar *str, uchar *frmend, uchar *strend, - uint nweights, uint flags, uint level) -{ - if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) - { - uint fill_length= min((uint) (strend - frmend), nweights * cs->mbminlen); - cs->cset->fill(cs, (char*) frmend, fill_length, cs->pad_char); - frmend+= fill_length; - } - my_strxfrm_desc_and_reverse(str, frmend, flags, level); - if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend) - { - uint fill_length= strend - frmend; - cs->cset->fill(cs, (char*) frmend, fill_length, cs->pad_char); - frmend= strend; - } - return frmend - str; -} - - -MY_CHARSET_HANDLER my_charset_8bit_handler= -{ - my_cset_init_8bit, - NULL, /* ismbchar */ - my_mbcharlen_8bit, /* mbcharlen */ - my_numchars_8bit, - my_charpos_8bit, - my_well_formed_len_8bit, - my_lengthsp_8bit, - my_numcells_8bit, - my_mb_wc_8bit, - my_wc_mb_8bit, - my_mb_ctype_8bit, - my_caseup_str_8bit, - my_casedn_str_8bit, - my_caseup_8bit, - my_casedn_8bit, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - -MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler = -{ - my_coll_init_simple, /* init */ - my_strnncoll_simple, - my_strnncollsp_simple, - my_strnxfrm_simple, - my_strnxfrmlen_simple, - my_like_range_simple, - my_wildcmp_8bit, - my_strcasecmp_8bit, - my_instr_simple, - my_hash_sort_simple, - my_propagate_simple -}; diff --git a/externals/mysql/strings/ctype-sjis.c b/externals/mysql/strings/ctype-sjis.c deleted file mode 100644 index 762379c6ff..0000000000 --- a/externals/mysql/strings/ctype-sjis.c +++ /dev/null @@ -1,4716 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This file is for Shift JIS charset, and created by tommy@valley.ne.jp. - */ - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_sjis - - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. strxfrm_multiply_sjis=1 - * .configure. mbmaxlen_sjis=2 - */ - -static uchar NEAR ctype_sjis[257] = -{ - 0, /* For standard library */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ - 0040, 0050, 0050, 0050, 0050, 0050, 0040, 0040, /* ^H - ^O */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^P - ^W */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^X - ^Z ^[ ^\ ^] ^^ ^_ */ - 0110, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* SPC ! " # $ % ^ ' */ - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* ( ) * + , - . / */ - 0204, 0204, 0204, 0204, 0204, 0204, 0204, 0204, /* 0 1 2 3 4 5 6 7 */ - 0204, 0204, 0020, 0020, 0020, 0020, 0020, 0020, /* 8 9 : ; < = > ? */ - 0020, 0201, 0201, 0201, 0201, 0201, 0201, 0001, /* @ A B C D E F G */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* H I J K L M N O */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* P Q R S T U V W */ - 0001, 0001, 0001, 0020, 0020, 0020, 0020, 0020, /* X Y Z [ \ ] ^ _ */ - 0020, 0202, 0202, 0202, 0202, 0202, 0202, 0002, /* ` a b c d e f g */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* h i j k l m n o */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* p q r s t u v w */ - 0002, 0002, 0002, 0020, 0020, 0020, 0020, 0040, /* x y z { | } + DEL */ - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0000, 0000, 0000 -}; - -static uchar NEAR to_lower_sjis[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '[', '\\', ']', '^', '_', - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -static uchar NEAR to_upper_sjis[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -static uchar NEAR sort_order_sjis[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -#define issjishead(c) ((0x81<=(c) && (c)<=0x9f) || \ - ((0xe0<=(c)) && (c)<=0xfc)) -#define issjistail(c) ((0x40<=(c) && (c)<=0x7e) || \ - (0x80<=(c) && (c)<=0xfc)) - - -static uint ismbchar_sjis(CHARSET_INFO *cs __attribute__((unused)), - const char* p, const char *e) -{ - return (issjishead((uchar) *p) && (e-p)>1 && issjistail((uchar)p[1]) ? 2: 0); -} - -static uint mbcharlen_sjis(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return (issjishead((uchar) c) ? 2 : 1); -} - - -#define sjiscode(c,d) ((((uint) (uchar)(c)) << 8) | (uint) (uchar) (d)) - - -static int my_strnncoll_sjis_internal(CHARSET_INFO *cs, - const uchar **a_res, size_t a_length, - const uchar **b_res, size_t b_length) -{ - const uchar *a= *a_res, *b= *b_res; - const uchar *a_end= a + a_length; - const uchar *b_end= b + b_length; - while (a < a_end && b < b_end) - { - if (ismbchar_sjis(cs,(char*) a, (char*) a_end) && - ismbchar_sjis(cs,(char*) b, (char*) b_end)) - { - uint a_char= sjiscode(*a, *(a+1)); - uint b_char= sjiscode(*b, *(b+1)); - if (a_char != b_char) - return (int) a_char - (int) b_char; - a += 2; - b += 2; - } else - { - if (sort_order_sjis[(uchar)*a] != sort_order_sjis[(uchar)*b]) - return sort_order_sjis[(uchar)*a] - sort_order_sjis[(uchar)*b]; - a++; - b++; - } - } - *a_res= a; - *b_res= b; - return 0; -} - - -static int my_strnncoll_sjis(CHARSET_INFO *cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool b_is_prefix) -{ - int res= my_strnncoll_sjis_internal(cs, &a, a_length, &b, b_length); - if (b_is_prefix && a_length > b_length) - a_length= b_length; - return res ? res : (int) (a_length - b_length); -} - - -static int my_strnncollsp_sjis(CHARSET_INFO *cs __attribute__((unused)), - const uchar *a, size_t a_length, - const uchar *b, size_t b_length, - my_bool diff_if_only_endspace_difference) -{ - const uchar *a_end= a + a_length, *b_end= b + b_length; - int res= my_strnncoll_sjis_internal(cs, &a, a_length, &b, b_length); - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - if (!res && (a != a_end || b != b_end)) - { - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - /* - Check the next not space character of the longer key. If it's < ' ', - then it's smaller than the other key. - */ - if (a == a_end) - { - /* put shorter key in a */ - a_end= b_end; - a= b; - swap= -1; /* swap sign of result */ - res= -res; - } - for (; a < a_end ; a++) - { - if (*a != ' ') - return (*a < ' ') ? -swap : swap; - } - } - return res; -} - - -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -#define max_sort_char ((char) 255) - -static my_bool my_like_range_sjis(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str,char *max_str, - size_t *min_length,size_t *max_length) -{ - const char *end= ptr + ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - size_t charlen= res_length / cs->mbmaxlen; - - for ( ; ptr < end && min_str < min_end && charlen > 0 ; charlen--) - { - if (ismbchar_sjis(cs, ptr, end)) { - *min_str++ = *max_str++ = *ptr++; - if (min_str < min_end) - *min_str++ = *max_str++ = *ptr++; - continue; - } - if (*ptr == escape && ptr+1 < end) { - ptr++; /* Skip escape */ - if (ismbchar_sjis(cs, ptr, end)) - *min_str++ = *max_str++ = *ptr++; - if (min_str < min_end) - *min_str++ = *max_str++ = *ptr++; - continue; - } - if (*ptr == w_one) { /* '_' in SQL */ - *min_str++ = '\0'; /* This should be min char */ - *max_str++ = max_sort_char; - ptr++; - continue; - } - if (*ptr == w_many) - { /* '%' in SQL */ - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - do - { - *min_str++= 0; - *max_str++= max_sort_char; - } while (min_str < min_end); - return 0; - } - *min_str++ = *max_str++ = *ptr++; - } - - *min_length= *max_length= (size_t) (min_str - min_org); - while (min_str != min_end) - *min_str++= *max_str++= ' '; /* Because if key compression */ - return 0; -} - -/* page 0 0x00A1-0x00DF */ -static uint16 tab_sjis_uni0[]={ -0xFF61,0xFF62,0xFF63,0xFF64,0xFF65,0xFF66,0xFF67,0xFF68, -0xFF69,0xFF6A,0xFF6B,0xFF6C,0xFF6D,0xFF6E,0xFF6F,0xFF70, -0xFF71,0xFF72,0xFF73,0xFF74,0xFF75,0xFF76,0xFF77,0xFF78, -0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80, -0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88, -0xFF89,0xFF8A,0xFF8B,0xFF8C,0xFF8D,0xFF8E,0xFF8F,0xFF90, -0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98, -0xFF99,0xFF9A,0xFF9B,0xFF9C,0xFF9D,0xFF9E,0xFF9F}; - -/* page 1 0x8140-0x84BE */ -static uint16 tab_sjis_uni1[]={ -0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B, -0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E, -0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD, -0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C, -0x301C,0x2016,0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C, -0x201D,0xFF08,0xFF09,0x3014,0x3015,0xFF3B,0xFF3D,0xFF5B, -0xFF5D,0x3008,0x3009,0x300A,0x300B,0x300C,0x300D,0x300E, -0x300F,0x3010,0x3011,0xFF0B,0x2212,0x00B1,0x00D7, 0, -0x00F7,0xFF1D,0x2260,0xFF1C,0xFF1E,0x2266,0x2267,0x221E, -0x2234,0x2642,0x2640,0x00B0,0x2032,0x2033,0x2103,0xFFE5, -0xFF04,0x00A2,0x00A3,0xFF05,0xFF03,0xFF06,0xFF0A,0xFF20, -0x00A7,0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7,0x25C6, -0x25A1,0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x203B,0x3012, -0x2192,0x2190,0x2191,0x2193,0x3013, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2208,0x220B,0x2286,0x2287,0x2282,0x2283,0x222A,0x2229, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2227,0x2228,0x00AC,0x21D2,0x21D4,0x2200,0x2203, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x2220,0x22A5,0x2312,0x2202,0x2207,0x2261, -0x2252,0x226A,0x226B,0x221A,0x223D,0x221D,0x2235,0x222B, -0x222C, 0, 0, 0, 0, 0, 0, 0, -0x212B,0x2030,0x266F,0x266D,0x266A,0x2020,0x2021,0x00B6, - 0, 0, 0, 0,0x25EF, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xFF10, -0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17,0xFF18, -0xFF19, 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,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,0x3041, -0x3042,0x3043,0x3044,0x3045,0x3046,0x3047,0x3048,0x3049, -0x304A,0x304B,0x304C,0x304D,0x304E,0x304F,0x3050,0x3051, -0x3052,0x3053,0x3054,0x3055,0x3056,0x3057,0x3058,0x3059, -0x305A,0x305B,0x305C,0x305D,0x305E,0x305F,0x3060,0x3061, -0x3062,0x3063,0x3064,0x3065,0x3066,0x3067,0x3068,0x3069, -0x306A,0x306B,0x306C,0x306D,0x306E,0x306F,0x3070,0x3071, -0x3072,0x3073,0x3074,0x3075,0x3076,0x3077,0x3078,0x3079, -0x307A,0x307B,0x307C,0x307D,0x307E,0x307F,0x3080,0x3081, -0x3082,0x3083,0x3084,0x3085,0x3086,0x3087,0x3088,0x3089, -0x308A,0x308B,0x308C,0x308D,0x308E,0x308F,0x3090,0x3091, -0x3092,0x3093, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8, -0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0, -0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8, -0x30B9,0x30BA,0x30BB,0x30BC,0x30BD,0x30BE,0x30BF,0x30C0, -0x30C1,0x30C2,0x30C3,0x30C4,0x30C5,0x30C6,0x30C7,0x30C8, -0x30C9,0x30CA,0x30CB,0x30CC,0x30CD,0x30CE,0x30CF,0x30D0, -0x30D1,0x30D2,0x30D3,0x30D4,0x30D5,0x30D6,0x30D7,0x30D8, -0x30D9,0x30DA,0x30DB,0x30DC,0x30DD,0x30DE,0x30DF, 0, -0x30E0,0x30E1,0x30E2,0x30E3,0x30E4,0x30E5,0x30E6,0x30E7, -0x30E8,0x30E9,0x30EA,0x30EB,0x30EC,0x30ED,0x30EE,0x30EF, -0x30F0,0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6, 0, - 0, 0, 0, 0, 0, 0, 0,0x0391, -0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399, -0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1, -0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, 0, - 0, 0, 0, 0, 0, 0, 0,0x03B1, -0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9, -0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0,0x03C1, -0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416, -0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, -0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, -0x042F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451,0x0436, -0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D, 0, -0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445, -0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D, -0x044E,0x044F, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x2500, -0x2502,0x250C,0x2510,0x2518,0x2514,0x251C,0x252C,0x2524, -0x2534,0x253C,0x2501,0x2503,0x250F,0x2513,0x251B,0x2517, -0x2523,0x2533,0x252B,0x253B,0x254B,0x2520,0x252F,0x2528, -0x2537,0x253F,0x251D,0x2530,0x2525,0x2538,0x2542}; - -/* page 2 0x889F-0x9FFC */ -static uint16 tab_sjis_uni2[]={ -0x4E9C,0x5516,0x5A03,0x963F,0x54C0,0x611B,0x6328,0x59F6, -0x9022,0x8475,0x831C,0x7A50,0x60AA,0x63E1,0x6E25,0x65ED, -0x8466,0x82A6,0x9BF5,0x6893,0x5727,0x65A1,0x6271,0x5B9B, -0x59D0,0x867B,0x98F4,0x7D62,0x7DBE,0x9B8E,0x6216,0x7C9F, -0x88B7,0x5B89,0x5EB5,0x6309,0x6697,0x6848,0x95C7,0x978D, -0x674F,0x4EE5,0x4F0A,0x4F4D,0x4F9D,0x5049,0x56F2,0x5937, -0x59D4,0x5A01,0x5C09,0x60DF,0x610F,0x6170,0x6613,0x6905, -0x70BA,0x754F,0x7570,0x79FB,0x7DAD,0x7DEF,0x80C3,0x840E, -0x8863,0x8B02,0x9055,0x907A,0x533B,0x4E95,0x4EA5,0x57DF, -0x80B2,0x90C1,0x78EF,0x4E00,0x58F1,0x6EA2,0x9038,0x7A32, -0x8328,0x828B,0x9C2F,0x5141,0x5370,0x54BD,0x54E1,0x56E0, -0x59FB,0x5F15,0x98F2,0x6DEB,0x80E4,0x852D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9662,0x9670,0x96A0,0x97FB,0x540B,0x53F3,0x5B87, -0x70CF,0x7FBD,0x8FC2,0x96E8,0x536F,0x9D5C,0x7ABA,0x4E11, -0x7893,0x81FC,0x6E26,0x5618,0x5504,0x6B1D,0x851A,0x9C3B, -0x59E5,0x53A9,0x6D66,0x74DC,0x958F,0x5642,0x4E91,0x904B, -0x96F2,0x834F,0x990C,0x53E1,0x55B6,0x5B30,0x5F71,0x6620, -0x66F3,0x6804,0x6C38,0x6CF3,0x6D29,0x745B,0x76C8,0x7A4E, -0x9834,0x82F1,0x885B,0x8A60,0x92ED,0x6DB2,0x75AB,0x76CA, -0x99C5,0x60A6,0x8B01,0x8D8A,0x95B2,0x698E,0x53AD,0x5186, - 0,0x5712,0x5830,0x5944,0x5BB4,0x5EF6,0x6028,0x63A9, -0x63F4,0x6CBF,0x6F14,0x708E,0x7114,0x7159,0x71D5,0x733F, -0x7E01,0x8276,0x82D1,0x8597,0x9060,0x925B,0x9D1B,0x5869, -0x65BC,0x6C5A,0x7525,0x51F9,0x592E,0x5965,0x5F80,0x5FDC, -0x62BC,0x65FA,0x6A2A,0x6B27,0x6BB4,0x738B,0x7FC1,0x8956, -0x9D2C,0x9D0E,0x9EC4,0x5CA1,0x6C96,0x837B,0x5104,0x5C4B, -0x61B6,0x81C6,0x6876,0x7261,0x4E59,0x4FFA,0x5378,0x6069, -0x6E29,0x7A4F,0x97F3,0x4E0B,0x5316,0x4EEE,0x4F55,0x4F3D, -0x4FA1,0x4F73,0x52A0,0x53EF,0x5609,0x590F,0x5AC1,0x5BB6, -0x5BE1,0x79D1,0x6687,0x679C,0x67B6,0x6B4C,0x6CB3,0x706B, -0x73C2,0x798D,0x79BE,0x7A3C,0x7B87,0x82B1,0x82DB,0x8304, -0x8377,0x83EF,0x83D3,0x8766,0x8AB2,0x5629,0x8CA8,0x8FE6, -0x904E,0x971E,0x868A,0x4FC4,0x5CE8,0x6211,0x7259,0x753B, -0x81E5,0x82BD,0x86FE,0x8CC0,0x96C5,0x9913,0x99D5,0x4ECB, -0x4F1A,0x89E3,0x56DE,0x584A,0x58CA,0x5EFB,0x5FEB,0x602A, -0x6094,0x6062,0x61D0,0x6212,0x62D0,0x6539, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9B41,0x6666,0x68B0,0x6D77,0x7070,0x754C,0x7686, -0x7D75,0x82A5,0x87F9,0x958B,0x968E,0x8C9D,0x51F1,0x52BE, -0x5916,0x54B3,0x5BB3,0x5D16,0x6168,0x6982,0x6DAF,0x788D, -0x84CB,0x8857,0x8A72,0x93A7,0x9AB8,0x6D6C,0x99A8,0x86D9, -0x57A3,0x67FF,0x86CE,0x920E,0x5283,0x5687,0x5404,0x5ED3, -0x62E1,0x64B9,0x683C,0x6838,0x6BBB,0x7372,0x78BA,0x7A6B, -0x899A,0x89D2,0x8D6B,0x8F03,0x90ED,0x95A3,0x9694,0x9769, -0x5B66,0x5CB3,0x697D,0x984D,0x984E,0x639B,0x7B20,0x6A2B, - 0,0x6A7F,0x68B6,0x9C0D,0x6F5F,0x5272,0x559D,0x6070, -0x62EC,0x6D3B,0x6E07,0x6ED1,0x845B,0x8910,0x8F44,0x4E14, -0x9C39,0x53F6,0x691B,0x6A3A,0x9784,0x682A,0x515C,0x7AC3, -0x84B2,0x91DC,0x938C,0x565B,0x9D28,0x6822,0x8305,0x8431, -0x7CA5,0x5208,0x82C5,0x74E6,0x4E7E,0x4F83,0x51A0,0x5BD2, -0x520A,0x52D8,0x52E7,0x5DFB,0x559A,0x582A,0x59E6,0x5B8C, -0x5B98,0x5BDB,0x5E72,0x5E79,0x60A3,0x611F,0x6163,0x61BE, -0x63DB,0x6562,0x67D1,0x6853,0x68FA,0x6B3E,0x6B53,0x6C57, -0x6F22,0x6F97,0x6F45,0x74B0,0x7518,0x76E3,0x770B,0x7AFF, -0x7BA1,0x7C21,0x7DE9,0x7F36,0x7FF0,0x809D,0x8266,0x839E, -0x89B3,0x8ACC,0x8CAB,0x9084,0x9451,0x9593,0x9591,0x95A2, -0x9665,0x97D3,0x9928,0x8218,0x4E38,0x542B,0x5CB8,0x5DCC, -0x73A9,0x764C,0x773C,0x5CA9,0x7FEB,0x8D0B,0x96C1,0x9811, -0x9854,0x9858,0x4F01,0x4F0E,0x5371,0x559C,0x5668,0x57FA, -0x5947,0x5B09,0x5BC4,0x5C90,0x5E0C,0x5E7E,0x5FCC,0x63EE, -0x673A,0x65D7,0x65E2,0x671F,0x68CB,0x68C4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6A5F,0x5E30,0x6BC5,0x6C17,0x6C7D,0x757F,0x7948, -0x5B63,0x7A00,0x7D00,0x5FBD,0x898F,0x8A18,0x8CB4,0x8D77, -0x8ECC,0x8F1D,0x98E2,0x9A0E,0x9B3C,0x4E80,0x507D,0x5100, -0x5993,0x5B9C,0x622F,0x6280,0x64EC,0x6B3A,0x72A0,0x7591, -0x7947,0x7FA9,0x87FB,0x8ABC,0x8B70,0x63AC,0x83CA,0x97A0, -0x5409,0x5403,0x55AB,0x6854,0x6A58,0x8A70,0x7827,0x6775, -0x9ECD,0x5374,0x5BA2,0x811A,0x8650,0x9006,0x4E18,0x4E45, -0x4EC7,0x4F11,0x53CA,0x5438,0x5BAE,0x5F13,0x6025,0x6551, - 0,0x673D,0x6C42,0x6C72,0x6CE3,0x7078,0x7403,0x7A76, -0x7AAE,0x7B08,0x7D1A,0x7CFE,0x7D66,0x65E7,0x725B,0x53BB, -0x5C45,0x5DE8,0x62D2,0x62E0,0x6319,0x6E20,0x865A,0x8A31, -0x8DDD,0x92F8,0x6F01,0x79A6,0x9B5A,0x4EA8,0x4EAB,0x4EAC, -0x4F9B,0x4FA0,0x50D1,0x5147,0x7AF6,0x5171,0x51F6,0x5354, -0x5321,0x537F,0x53EB,0x55AC,0x5883,0x5CE1,0x5F37,0x5F4A, -0x602F,0x6050,0x606D,0x631F,0x6559,0x6A4B,0x6CC1,0x72C2, -0x72ED,0x77EF,0x80F8,0x8105,0x8208,0x854E,0x90F7,0x93E1, -0x97FF,0x9957,0x9A5A,0x4EF0,0x51DD,0x5C2D,0x6681,0x696D, -0x5C40,0x66F2,0x6975,0x7389,0x6850,0x7C81,0x50C5,0x52E4, -0x5747,0x5DFE,0x9326,0x65A4,0x6B23,0x6B3D,0x7434,0x7981, -0x79BD,0x7B4B,0x7DCA,0x82B9,0x83CC,0x887F,0x895F,0x8B39, -0x8FD1,0x91D1,0x541F,0x9280,0x4E5D,0x5036,0x53E5,0x533A, -0x72D7,0x7396,0x77E9,0x82E6,0x8EAF,0x99C6,0x99C8,0x99D2, -0x5177,0x611A,0x865E,0x55B0,0x7A7A,0x5076,0x5BD3,0x9047, -0x9685,0x4E32,0x6ADB,0x91E7,0x5C51,0x5C48, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6398,0x7A9F,0x6C93,0x9774,0x8F61,0x7AAA,0x718A, -0x9688,0x7C82,0x6817,0x7E70,0x6851,0x936C,0x52F2,0x541B, -0x85AB,0x8A13,0x7FA4,0x8ECD,0x90E1,0x5366,0x8888,0x7941, -0x4FC2,0x50BE,0x5211,0x5144,0x5553,0x572D,0x73EA,0x578B, -0x5951,0x5F62,0x5F84,0x6075,0x6176,0x6167,0x61A9,0x63B2, -0x643A,0x656C,0x666F,0x6842,0x6E13,0x7566,0x7A3D,0x7CFB, -0x7D4C,0x7D99,0x7E4B,0x7F6B,0x830E,0x834A,0x86CD,0x8A08, -0x8A63,0x8B66,0x8EFD,0x981A,0x9D8F,0x82B8,0x8FCE,0x9BE8, - 0,0x5287,0x621F,0x6483,0x6FC0,0x9699,0x6841,0x5091, -0x6B20,0x6C7A,0x6F54,0x7A74,0x7D50,0x8840,0x8A23,0x6708, -0x4EF6,0x5039,0x5026,0x5065,0x517C,0x5238,0x5263,0x55A7, -0x570F,0x5805,0x5ACC,0x5EFA,0x61B2,0x61F8,0x62F3,0x6372, -0x691C,0x6A29,0x727D,0x72AC,0x732E,0x7814,0x786F,0x7D79, -0x770C,0x80A9,0x898B,0x8B19,0x8CE2,0x8ED2,0x9063,0x9375, -0x967A,0x9855,0x9A13,0x9E78,0x5143,0x539F,0x53B3,0x5E7B, -0x5F26,0x6E1B,0x6E90,0x7384,0x73FE,0x7D43,0x8237,0x8A00, -0x8AFA,0x9650,0x4E4E,0x500B,0x53E4,0x547C,0x56FA,0x59D1, -0x5B64,0x5DF1,0x5EAB,0x5F27,0x6238,0x6545,0x67AF,0x6E56, -0x72D0,0x7CCA,0x88B4,0x80A1,0x80E1,0x83F0,0x864E,0x8A87, -0x8DE8,0x9237,0x96C7,0x9867,0x9F13,0x4E94,0x4E92,0x4F0D, -0x5348,0x5449,0x543E,0x5A2F,0x5F8C,0x5FA1,0x609F,0x68A7, -0x6A8E,0x745A,0x7881,0x8A9E,0x8AA4,0x8B77,0x9190,0x4E5E, -0x9BC9,0x4EA4,0x4F7C,0x4FAF,0x5019,0x5016,0x5149,0x516C, -0x529F,0x52B9,0x52FE,0x539A,0x53E3,0x5411, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x540E,0x5589,0x5751,0x57A2,0x597D,0x5B54,0x5B5D, -0x5B8F,0x5DE5,0x5DE7,0x5DF7,0x5E78,0x5E83,0x5E9A,0x5EB7, -0x5F18,0x6052,0x614C,0x6297,0x62D8,0x63A7,0x653B,0x6602, -0x6643,0x66F4,0x676D,0x6821,0x6897,0x69CB,0x6C5F,0x6D2A, -0x6D69,0x6E2F,0x6E9D,0x7532,0x7687,0x786C,0x7A3F,0x7CE0, -0x7D05,0x7D18,0x7D5E,0x7DB1,0x8015,0x8003,0x80AF,0x80B1, -0x8154,0x818F,0x822A,0x8352,0x884C,0x8861,0x8B1B,0x8CA2, -0x8CFC,0x90CA,0x9175,0x9271,0x783F,0x92FC,0x95A4,0x964D, - 0,0x9805,0x9999,0x9AD8,0x9D3B,0x525B,0x52AB,0x53F7, -0x5408,0x58D5,0x62F7,0x6FE0,0x8C6A,0x8F5F,0x9EB9,0x514B, -0x523B,0x544A,0x56FD,0x7A40,0x9177,0x9D60,0x9ED2,0x7344, -0x6F09,0x8170,0x7511,0x5FFD,0x60DA,0x9AA8,0x72DB,0x8FBC, -0x6B64,0x9803,0x4ECA,0x56F0,0x5764,0x58BE,0x5A5A,0x6068, -0x61C7,0x660F,0x6606,0x6839,0x68B1,0x6DF7,0x75D5,0x7D3A, -0x826E,0x9B42,0x4E9B,0x4F50,0x53C9,0x5506,0x5D6F,0x5DE6, -0x5DEE,0x67FB,0x6C99,0x7473,0x7802,0x8A50,0x9396,0x88DF, -0x5750,0x5EA7,0x632B,0x50B5,0x50AC,0x518D,0x6700,0x54C9, -0x585E,0x59BB,0x5BB0,0x5F69,0x624D,0x63A1,0x683D,0x6B73, -0x6E08,0x707D,0x91C7,0x7280,0x7815,0x7826,0x796D,0x658E, -0x7D30,0x83DC,0x88C1,0x8F09,0x969B,0x5264,0x5728,0x6750, -0x7F6A,0x8CA1,0x51B4,0x5742,0x962A,0x583A,0x698A,0x80B4, -0x54B2,0x5D0E,0x57FC,0x7895,0x9DFA,0x4F5C,0x524A,0x548B, -0x643E,0x6628,0x6714,0x67F5,0x7A84,0x7B56,0x7D22,0x932F, -0x685C,0x9BAD,0x7B39,0x5319,0x518A,0x5237, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5BDF,0x62F6,0x64AE,0x64E6,0x672D,0x6BBA,0x85A9, -0x96D1,0x7690,0x9BD6,0x634C,0x9306,0x9BAB,0x76BF,0x6652, -0x4E09,0x5098,0x53C2,0x5C71,0x60E8,0x6492,0x6563,0x685F, -0x71E6,0x73CA,0x7523,0x7B97,0x7E82,0x8695,0x8B83,0x8CDB, -0x9178,0x9910,0x65AC,0x66AB,0x6B8B,0x4ED5,0x4ED4,0x4F3A, -0x4F7F,0x523A,0x53F8,0x53F2,0x55E3,0x56DB,0x58EB,0x59CB, -0x59C9,0x59FF,0x5B50,0x5C4D,0x5E02,0x5E2B,0x5FD7,0x601D, -0x6307,0x652F,0x5B5C,0x65AF,0x65BD,0x65E8,0x679D,0x6B62, - 0,0x6B7B,0x6C0F,0x7345,0x7949,0x79C1,0x7CF8,0x7D19, -0x7D2B,0x80A2,0x8102,0x81F3,0x8996,0x8A5E,0x8A69,0x8A66, -0x8A8C,0x8AEE,0x8CC7,0x8CDC,0x96CC,0x98FC,0x6B6F,0x4E8B, -0x4F3C,0x4F8D,0x5150,0x5B57,0x5BFA,0x6148,0x6301,0x6642, -0x6B21,0x6ECB,0x6CBB,0x723E,0x74BD,0x75D4,0x78C1,0x793A, -0x800C,0x8033,0x81EA,0x8494,0x8F9E,0x6C50,0x9E7F,0x5F0F, -0x8B58,0x9D2B,0x7AFA,0x8EF8,0x5B8D,0x96EB,0x4E03,0x53F1, -0x57F7,0x5931,0x5AC9,0x5BA4,0x6089,0x6E7F,0x6F06,0x75BE, -0x8CEA,0x5B9F,0x8500,0x7BE0,0x5072,0x67F4,0x829D,0x5C61, -0x854A,0x7E1E,0x820E,0x5199,0x5C04,0x6368,0x8D66,0x659C, -0x716E,0x793E,0x7D17,0x8005,0x8B1D,0x8ECA,0x906E,0x86C7, -0x90AA,0x501F,0x52FA,0x5C3A,0x6753,0x707C,0x7235,0x914C, -0x91C8,0x932B,0x82E5,0x5BC2,0x5F31,0x60F9,0x4E3B,0x53D6, -0x5B88,0x624B,0x6731,0x6B8A,0x72E9,0x73E0,0x7A2E,0x816B, -0x8DA3,0x9152,0x9996,0x5112,0x53D7,0x546A,0x5BFF,0x6388, -0x6A39,0x7DAC,0x9700,0x56DA,0x53CE,0x5468, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5B97,0x5C31,0x5DDE,0x4FEE,0x6101,0x62FE,0x6D32, -0x79C0,0x79CB,0x7D42,0x7E4D,0x7FD2,0x81ED,0x821F,0x8490, -0x8846,0x8972,0x8B90,0x8E74,0x8F2F,0x9031,0x914B,0x916C, -0x96C6,0x919C,0x4EC0,0x4F4F,0x5145,0x5341,0x5F93,0x620E, -0x67D4,0x6C41,0x6E0B,0x7363,0x7E26,0x91CD,0x9283,0x53D4, -0x5919,0x5BBF,0x6DD1,0x795D,0x7E2E,0x7C9B,0x587E,0x719F, -0x51FA,0x8853,0x8FF0,0x4FCA,0x5CFB,0x6625,0x77AC,0x7AE3, -0x821C,0x99FF,0x51C6,0x5FAA,0x65EC,0x696F,0x6B89,0x6DF3, - 0,0x6E96,0x6F64,0x76FE,0x7D14,0x5DE1,0x9075,0x9187, -0x9806,0x51E6,0x521D,0x6240,0x6691,0x66D9,0x6E1A,0x5EB6, -0x7DD2,0x7F72,0x66F8,0x85AF,0x85F7,0x8AF8,0x52A9,0x53D9, -0x5973,0x5E8F,0x5F90,0x6055,0x92E4,0x9664,0x50B7,0x511F, -0x52DD,0x5320,0x5347,0x53EC,0x54E8,0x5546,0x5531,0x5617, -0x5968,0x59BE,0x5A3C,0x5BB5,0x5C06,0x5C0F,0x5C11,0x5C1A, -0x5E84,0x5E8A,0x5EE0,0x5F70,0x627F,0x6284,0x62DB,0x638C, -0x6377,0x6607,0x660C,0x662D,0x6676,0x677E,0x68A2,0x6A1F, -0x6A35,0x6CBC,0x6D88,0x6E09,0x6E58,0x713C,0x7126,0x7167, -0x75C7,0x7701,0x785D,0x7901,0x7965,0x79F0,0x7AE0,0x7B11, -0x7CA7,0x7D39,0x8096,0x83D6,0x848B,0x8549,0x885D,0x88F3, -0x8A1F,0x8A3C,0x8A54,0x8A73,0x8C61,0x8CDE,0x91A4,0x9266, -0x937E,0x9418,0x969C,0x9798,0x4E0A,0x4E08,0x4E1E,0x4E57, -0x5197,0x5270,0x57CE,0x5834,0x58CC,0x5B22,0x5E38,0x60C5, -0x64FE,0x6761,0x6756,0x6D44,0x72B6,0x7573,0x7A63,0x84B8, -0x8B72,0x91B8,0x9320,0x5631,0x57F4,0x98FE, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x62ED,0x690D,0x6B96,0x71ED,0x7E54,0x8077,0x8272, -0x89E6,0x98DF,0x8755,0x8FB1,0x5C3B,0x4F38,0x4FE1,0x4FB5, -0x5507,0x5A20,0x5BDD,0x5BE9,0x5FC3,0x614E,0x632F,0x65B0, -0x664B,0x68EE,0x699B,0x6D78,0x6DF1,0x7533,0x75B9,0x771F, -0x795E,0x79E6,0x7D33,0x81E3,0x82AF,0x85AA,0x89AA,0x8A3A, -0x8EAB,0x8F9B,0x9032,0x91DD,0x9707,0x4EBA,0x4EC1,0x5203, -0x5875,0x58EC,0x5C0B,0x751A,0x5C3D,0x814E,0x8A0A,0x8FC5, -0x9663,0x976D,0x7B25,0x8ACF,0x9808,0x9162,0x56F3,0x53A8, - 0,0x9017,0x5439,0x5782,0x5E25,0x63A8,0x6C34,0x708A, -0x7761,0x7C8B,0x7FE0,0x8870,0x9042,0x9154,0x9310,0x9318, -0x968F,0x745E,0x9AC4,0x5D07,0x5D69,0x6570,0x67A2,0x8DA8, -0x96DB,0x636E,0x6749,0x6919,0x83C5,0x9817,0x96C0,0x88FE, -0x6F84,0x647A,0x5BF8,0x4E16,0x702C,0x755D,0x662F,0x51C4, -0x5236,0x52E2,0x59D3,0x5F81,0x6027,0x6210,0x653F,0x6574, -0x661F,0x6674,0x68F2,0x6816,0x6B63,0x6E05,0x7272,0x751F, -0x76DB,0x7CBE,0x8056,0x58F0,0x88FD,0x897F,0x8AA0,0x8A93, -0x8ACB,0x901D,0x9192,0x9752,0x9759,0x6589,0x7A0E,0x8106, -0x96BB,0x5E2D,0x60DC,0x621A,0x65A5,0x6614,0x6790,0x77F3, -0x7A4D,0x7C4D,0x7E3E,0x810A,0x8CAC,0x8D64,0x8DE1,0x8E5F, -0x78A9,0x5207,0x62D9,0x63A5,0x6442,0x6298,0x8A2D,0x7A83, -0x7BC0,0x8AAC,0x96EA,0x7D76,0x820C,0x8749,0x4ED9,0x5148, -0x5343,0x5360,0x5BA3,0x5C02,0x5C16,0x5DDD,0x6226,0x6247, -0x64B0,0x6813,0x6834,0x6CC9,0x6D45,0x6D17,0x67D3,0x6F5C, -0x714E,0x717D,0x65CB,0x7A7F,0x7BAD,0x7DDA, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x7E4A,0x7FA8,0x817A,0x821B,0x8239,0x85A6,0x8A6E, -0x8CCE,0x8DF5,0x9078,0x9077,0x92AD,0x9291,0x9583,0x9BAE, -0x524D,0x5584,0x6F38,0x7136,0x5168,0x7985,0x7E55,0x81B3, -0x7CCE,0x564C,0x5851,0x5CA8,0x63AA,0x66FE,0x66FD,0x695A, -0x72D9,0x758F,0x758E,0x790E,0x7956,0x79DF,0x7C97,0x7D20, -0x7D44,0x8607,0x8A34,0x963B,0x9061,0x9F20,0x50E7,0x5275, -0x53CC,0x53E2,0x5009,0x55AA,0x58EE,0x594F,0x723D,0x5B8B, -0x5C64,0x531D,0x60E3,0x60F3,0x635C,0x6383,0x633F,0x63BB, - 0,0x64CD,0x65E9,0x66F9,0x5DE3,0x69CD,0x69FD,0x6F15, -0x71E5,0x4E89,0x75E9,0x76F8,0x7A93,0x7CDF,0x7DCF,0x7D9C, -0x8061,0x8349,0x8358,0x846C,0x84BC,0x85FB,0x88C5,0x8D70, -0x9001,0x906D,0x9397,0x971C,0x9A12,0x50CF,0x5897,0x618E, -0x81D3,0x8535,0x8D08,0x9020,0x4FC3,0x5074,0x5247,0x5373, -0x606F,0x6349,0x675F,0x6E2C,0x8DB3,0x901F,0x4FD7,0x5C5E, -0x8CCA,0x65CF,0x7D9A,0x5352,0x8896,0x5176,0x63C3,0x5B58, -0x5B6B,0x5C0A,0x640D,0x6751,0x905C,0x4ED6,0x591A,0x592A, -0x6C70,0x8A51,0x553E,0x5815,0x59A5,0x60F0,0x6253,0x67C1, -0x8235,0x6955,0x9640,0x99C4,0x9A28,0x4F53,0x5806,0x5BFE, -0x8010,0x5CB1,0x5E2F,0x5F85,0x6020,0x614B,0x6234,0x66FF, -0x6CF0,0x6EDE,0x80CE,0x817F,0x82D4,0x888B,0x8CB8,0x9000, -0x902E,0x968A,0x9EDB,0x9BDB,0x4EE3,0x53F0,0x5927,0x7B2C, -0x918D,0x984C,0x9DF9,0x6EDD,0x7027,0x5353,0x5544,0x5B85, -0x6258,0x629E,0x62D3,0x6CA2,0x6FEF,0x7422,0x8A17,0x9438, -0x6FC1,0x8AFE,0x8338,0x51E7,0x86F8,0x53EA, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x53E9,0x4F46,0x9054,0x8FB0,0x596A,0x8131,0x5DFD, -0x7AEA,0x8FBF,0x68DA,0x8C37,0x72F8,0x9C48,0x6A3D,0x8AB0, -0x4E39,0x5358,0x5606,0x5766,0x62C5,0x63A2,0x65E6,0x6B4E, -0x6DE1,0x6E5B,0x70AD,0x77ED,0x7AEF,0x7BAA,0x7DBB,0x803D, -0x80C6,0x86CB,0x8A95,0x935B,0x56E3,0x58C7,0x5F3E,0x65AD, -0x6696,0x6A80,0x6BB5,0x7537,0x8AC7,0x5024,0x77E5,0x5730, -0x5F1B,0x6065,0x667A,0x6C60,0x75F4,0x7A1A,0x7F6E,0x81F4, -0x8718,0x9045,0x99B3,0x7BC9,0x755C,0x7AF9,0x7B51,0x84C4, - 0,0x9010,0x79E9,0x7A92,0x8336,0x5AE1,0x7740,0x4E2D, -0x4EF2,0x5B99,0x5FE0,0x62BD,0x663C,0x67F1,0x6CE8,0x866B, -0x8877,0x8A3B,0x914E,0x92F3,0x99D0,0x6A17,0x7026,0x732A, -0x82E7,0x8457,0x8CAF,0x4E01,0x5146,0x51CB,0x558B,0x5BF5, -0x5E16,0x5E33,0x5E81,0x5F14,0x5F35,0x5F6B,0x5FB4,0x61F2, -0x6311,0x66A2,0x671D,0x6F6E,0x7252,0x753A,0x773A,0x8074, -0x8139,0x8178,0x8776,0x8ABF,0x8ADC,0x8D85,0x8DF3,0x929A, -0x9577,0x9802,0x9CE5,0x52C5,0x6357,0x76F4,0x6715,0x6C88, -0x73CD,0x8CC3,0x93AE,0x9673,0x6D25,0x589C,0x690E,0x69CC, -0x8FFD,0x939A,0x75DB,0x901A,0x585A,0x6802,0x63B4,0x69FB, -0x4F43,0x6F2C,0x67D8,0x8FBB,0x8526,0x7DB4,0x9354,0x693F, -0x6F70,0x576A,0x58F7,0x5B2C,0x7D2C,0x722A,0x540A,0x91E3, -0x9DB4,0x4EAD,0x4F4E,0x505C,0x5075,0x5243,0x8C9E,0x5448, -0x5824,0x5B9A,0x5E1D,0x5E95,0x5EAD,0x5EF7,0x5F1F,0x608C, -0x62B5,0x633A,0x63D0,0x68AF,0x6C40,0x7887,0x798E,0x7A0B, -0x7DE0,0x8247,0x8A02,0x8AE6,0x8E44,0x9013, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x90B8,0x912D,0x91D8,0x9F0E,0x6CE5,0x6458,0x64E2, -0x6575,0x6EF4,0x7684,0x7B1B,0x9069,0x93D1,0x6EBA,0x54F2, -0x5FB9,0x64A4,0x8F4D,0x8FED,0x9244,0x5178,0x586B,0x5929, -0x5C55,0x5E97,0x6DFB,0x7E8F,0x751C,0x8CBC,0x8EE2,0x985B, -0x70B9,0x4F1D,0x6BBF,0x6FB1,0x7530,0x96FB,0x514E,0x5410, -0x5835,0x5857,0x59AC,0x5C60,0x5F92,0x6597,0x675C,0x6E21, -0x767B,0x83DF,0x8CED,0x9014,0x90FD,0x934D,0x7825,0x783A, -0x52AA,0x5EA6,0x571F,0x5974,0x6012,0x5012,0x515A,0x51AC, - 0,0x51CD,0x5200,0x5510,0x5854,0x5858,0x5957,0x5B95, -0x5CF6,0x5D8B,0x60BC,0x6295,0x642D,0x6771,0x6843,0x68BC, -0x68DF,0x76D7,0x6DD8,0x6E6F,0x6D9B,0x706F,0x71C8,0x5F53, -0x75D8,0x7977,0x7B49,0x7B54,0x7B52,0x7CD6,0x7D71,0x5230, -0x8463,0x8569,0x85E4,0x8A0E,0x8B04,0x8C46,0x8E0F,0x9003, -0x900F,0x9419,0x9676,0x982D,0x9A30,0x95D8,0x50CD,0x52D5, -0x540C,0x5802,0x5C0E,0x61A7,0x649E,0x6D1E,0x77B3,0x7AE5, -0x80F4,0x8404,0x9053,0x9285,0x5CE0,0x9D07,0x533F,0x5F97, -0x5FB3,0x6D9C,0x7279,0x7763,0x79BF,0x7BE4,0x6BD2,0x72EC, -0x8AAD,0x6803,0x6A61,0x51F8,0x7A81,0x6934,0x5C4A,0x9CF6, -0x82EB,0x5BC5,0x9149,0x701E,0x5678,0x5C6F,0x60C7,0x6566, -0x6C8C,0x8C5A,0x9041,0x9813,0x5451,0x66C7,0x920D,0x5948, -0x90A3,0x5185,0x4E4D,0x51EA,0x8599,0x8B0E,0x7058,0x637A, -0x934B,0x6962,0x99B4,0x7E04,0x7577,0x5357,0x6960,0x8EDF, -0x96E3,0x6C5D,0x4E8C,0x5C3C,0x5F10,0x8FE9,0x5302,0x8CD1, -0x8089,0x8679,0x5EFF,0x65E5,0x4E73,0x5165, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5982,0x5C3F,0x97EE,0x4EFB,0x598A,0x5FCD,0x8A8D, -0x6FE1,0x79B0,0x7962,0x5BE7,0x8471,0x732B,0x71B1,0x5E74, -0x5FF5,0x637B,0x649A,0x71C3,0x7C98,0x4E43,0x5EFC,0x4E4B, -0x57DC,0x56A2,0x60A9,0x6FC3,0x7D0D,0x80FD,0x8133,0x81BF, -0x8FB2,0x8997,0x86A4,0x5DF4,0x628A,0x64AD,0x8987,0x6777, -0x6CE2,0x6D3E,0x7436,0x7834,0x5A46,0x7F75,0x82AD,0x99AC, -0x4FF3,0x5EC3,0x62DD,0x6392,0x6557,0x676F,0x76C3,0x724C, -0x80CC,0x80BA,0x8F29,0x914D,0x500D,0x57F9,0x5A92,0x6885, - 0,0x6973,0x7164,0x72FD,0x8CB7,0x58F2,0x8CE0,0x966A, -0x9019,0x877F,0x79E4,0x77E7,0x8429,0x4F2F,0x5265,0x535A, -0x62CD,0x67CF,0x6CCA,0x767D,0x7B94,0x7C95,0x8236,0x8584, -0x8FEB,0x66DD,0x6F20,0x7206,0x7E1B,0x83AB,0x99C1,0x9EA6, -0x51FD,0x7BB1,0x7872,0x7BB8,0x8087,0x7B48,0x6AE8,0x5E61, -0x808C,0x7551,0x7560,0x516B,0x9262,0x6E8C,0x767A,0x9197, -0x9AEA,0x4F10,0x7F70,0x629C,0x7B4F,0x95A5,0x9CE9,0x567A, -0x5859,0x86E4,0x96BC,0x4F34,0x5224,0x534A,0x53CD,0x53DB, -0x5E06,0x642C,0x6591,0x677F,0x6C3E,0x6C4E,0x7248,0x72AF, -0x73ED,0x7554,0x7E41,0x822C,0x85E9,0x8CA9,0x7BC4,0x91C6, -0x7169,0x9812,0x98EF,0x633D,0x6669,0x756A,0x76E4,0x78D0, -0x8543,0x86EE,0x532A,0x5351,0x5426,0x5983,0x5E87,0x5F7C, -0x60B2,0x6249,0x6279,0x62AB,0x6590,0x6BD4,0x6CCC,0x75B2, -0x76AE,0x7891,0x79D8,0x7DCB,0x7F77,0x80A5,0x88AB,0x8AB9, -0x8CBB,0x907F,0x975E,0x98DB,0x6A0B,0x7C38,0x5099,0x5C3E, -0x5FAE,0x6787,0x6BD8,0x7435,0x7709,0x7F8E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9F3B,0x67CA,0x7A17,0x5339,0x758B,0x9AED,0x5F66, -0x819D,0x83F1,0x8098,0x5F3C,0x5FC5,0x7562,0x7B46,0x903C, -0x6867,0x59EB,0x5A9B,0x7D10,0x767E,0x8B2C,0x4FF5,0x5F6A, -0x6A19,0x6C37,0x6F02,0x74E2,0x7968,0x8868,0x8A55,0x8C79, -0x5EDF,0x63CF,0x75C5,0x79D2,0x82D7,0x9328,0x92F2,0x849C, -0x86ED,0x9C2D,0x54C1,0x5F6C,0x658C,0x6D5C,0x7015,0x8CA7, -0x8CD3,0x983B,0x654F,0x74F6,0x4E0D,0x4ED8,0x57E0,0x592B, -0x5A66,0x5BCC,0x51A8,0x5E03,0x5E9C,0x6016,0x6276,0x6577, - 0,0x65A7,0x666E,0x6D6E,0x7236,0x7B26,0x8150,0x819A, -0x8299,0x8B5C,0x8CA0,0x8CE6,0x8D74,0x961C,0x9644,0x4FAE, -0x64AB,0x6B66,0x821E,0x8461,0x856A,0x90E8,0x5C01,0x6953, -0x98A8,0x847A,0x8557,0x4F0F,0x526F,0x5FA9,0x5E45,0x670D, -0x798F,0x8179,0x8907,0x8986,0x6DF5,0x5F17,0x6255,0x6CB8, -0x4ECF,0x7269,0x9B92,0x5206,0x543B,0x5674,0x58B3,0x61A4, -0x626E,0x711A,0x596E,0x7C89,0x7CDE,0x7D1B,0x96F0,0x6587, -0x805E,0x4E19,0x4F75,0x5175,0x5840,0x5E63,0x5E73,0x5F0A, -0x67C4,0x4E26,0x853D,0x9589,0x965B,0x7C73,0x9801,0x50FB, -0x58C1,0x7656,0x78A7,0x5225,0x77A5,0x8511,0x7B86,0x504F, -0x5909,0x7247,0x7BC7,0x7DE8,0x8FBA,0x8FD4,0x904D,0x4FBF, -0x52C9,0x5A29,0x5F01,0x97AD,0x4FDD,0x8217,0x92EA,0x5703, -0x6355,0x6B69,0x752B,0x88DC,0x8F14,0x7A42,0x52DF,0x5893, -0x6155,0x620A,0x66AE,0x6BCD,0x7C3F,0x83E9,0x5023,0x4FF8, -0x5305,0x5446,0x5831,0x5949,0x5B9D,0x5CF0,0x5CEF,0x5D29, -0x5E96,0x62B1,0x6367,0x653E,0x65B9,0x670B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6CD5,0x6CE1,0x70F9,0x7832,0x7E2B,0x80DE,0x82B3, -0x840C,0x84EC,0x8702,0x8912,0x8A2A,0x8C4A,0x90A6,0x92D2, -0x98FD,0x9CF3,0x9D6C,0x4E4F,0x4EA1,0x508D,0x5256,0x574A, -0x59A8,0x5E3D,0x5FD8,0x5FD9,0x623F,0x66B4,0x671B,0x67D0, -0x68D2,0x5192,0x7D21,0x80AA,0x81A8,0x8B00,0x8C8C,0x8CBF, -0x927E,0x9632,0x5420,0x982C,0x5317,0x50D5,0x535C,0x58A8, -0x64B2,0x6734,0x7267,0x7766,0x7A46,0x91E6,0x52C3,0x6CA1, -0x6B86,0x5800,0x5E4C,0x5954,0x672C,0x7FFB,0x51E1,0x76C6, - 0,0x6469,0x78E8,0x9B54,0x9EBB,0x57CB,0x59B9,0x6627, -0x679A,0x6BCE,0x54E9,0x69D9,0x5E55,0x819C,0x6795,0x9BAA, -0x67FE,0x9C52,0x685D,0x4EA6,0x4FE3,0x53C8,0x62B9,0x672B, -0x6CAB,0x8FC4,0x4FAD,0x7E6D,0x9EBF,0x4E07,0x6162,0x6E80, -0x6F2B,0x8513,0x5473,0x672A,0x9B45,0x5DF3,0x7B95,0x5CAC, -0x5BC6,0x871C,0x6E4A,0x84D1,0x7A14,0x8108,0x5999,0x7C8D, -0x6C11,0x7720,0x52D9,0x5922,0x7121,0x725F,0x77DB,0x9727, -0x9D61,0x690B,0x5A7F,0x5A18,0x51A5,0x540D,0x547D,0x660E, -0x76DF,0x8FF7,0x9298,0x9CF4,0x59EA,0x725D,0x6EC5,0x514D, -0x68C9,0x7DBF,0x7DEC,0x9762,0x9EBA,0x6478,0x6A21,0x8302, -0x5984,0x5B5F,0x6BDB,0x731B,0x76F2,0x7DB2,0x8017,0x8499, -0x5132,0x6728,0x9ED9,0x76EE,0x6762,0x52FF,0x9905,0x5C24, -0x623B,0x7C7E,0x8CB0,0x554F,0x60B6,0x7D0B,0x9580,0x5301, -0x4E5F,0x51B6,0x591C,0x723A,0x8036,0x91CE,0x5F25,0x77E2, -0x5384,0x5F79,0x7D04,0x85AC,0x8A33,0x8E8D,0x9756,0x67F3, -0x85AE,0x9453,0x6109,0x6108,0x6CB9,0x7652, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8AED,0x8F38,0x552F,0x4F51,0x512A,0x52C7,0x53CB, -0x5BA5,0x5E7D,0x60A0,0x6182,0x63D6,0x6709,0x67DA,0x6E67, -0x6D8C,0x7336,0x7337,0x7531,0x7950,0x88D5,0x8A98,0x904A, -0x9091,0x90F5,0x96C4,0x878D,0x5915,0x4E88,0x4F59,0x4E0E, -0x8A89,0x8F3F,0x9810,0x50AD,0x5E7C,0x5996,0x5BB9,0x5EB8, -0x63DA,0x63FA,0x64C1,0x66DC,0x694A,0x69D8,0x6D0B,0x6EB6, -0x7194,0x7528,0x7AAF,0x7F8A,0x8000,0x8449,0x84C9,0x8981, -0x8B21,0x8E0A,0x9065,0x967D,0x990A,0x617E,0x6291,0x6B32, - 0,0x6C83,0x6D74,0x7FCC,0x7FFC,0x6DC0,0x7F85,0x87BA, -0x88F8,0x6765,0x83B1,0x983C,0x96F7,0x6D1B,0x7D61,0x843D, -0x916A,0x4E71,0x5375,0x5D50,0x6B04,0x6FEB,0x85CD,0x862D, -0x89A7,0x5229,0x540F,0x5C65,0x674E,0x68A8,0x7406,0x7483, -0x75E2,0x88CF,0x88E1,0x91CC,0x96E2,0x9678,0x5F8B,0x7387, -0x7ACB,0x844E,0x63A0,0x7565,0x5289,0x6D41,0x6E9C,0x7409, -0x7559,0x786B,0x7C92,0x9686,0x7ADC,0x9F8D,0x4FB6,0x616E, -0x65C5,0x865C,0x4E86,0x4EAE,0x50DA,0x4E21,0x51CC,0x5BEE, -0x6599,0x6881,0x6DBC,0x731F,0x7642,0x77AD,0x7A1C,0x7CE7, -0x826F,0x8AD2,0x907C,0x91CF,0x9675,0x9818,0x529B,0x7DD1, -0x502B,0x5398,0x6797,0x6DCB,0x71D0,0x7433,0x81E8,0x8F2A, -0x96A3,0x9C57,0x9E9F,0x7460,0x5841,0x6D99,0x7D2F,0x985E, -0x4EE4,0x4F36,0x4F8B,0x51B7,0x52B1,0x5DBA,0x601C,0x73B2, -0x793C,0x82D3,0x9234,0x96B7,0x96F6,0x970A,0x9E97,0x9F62, -0x66A6,0x6B74,0x5217,0x52A3,0x70C8,0x88C2,0x5EC9,0x604B, -0x6190,0x6F23,0x7149,0x7C3E,0x7DF4,0x806F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x84EE,0x9023,0x932C,0x5442,0x9B6F,0x6AD3,0x7089, -0x8CC2,0x8DEF,0x9732,0x52B4,0x5A41,0x5ECA,0x5F04,0x6717, -0x697C,0x6994,0x6D6A,0x6F0F,0x7262,0x72FC,0x7BED,0x8001, -0x807E,0x874B,0x90CE,0x516D,0x9E93,0x7984,0x808B,0x9332, -0x8AD6,0x502D,0x548C,0x8A71,0x6B6A,0x8CC4,0x8107,0x60D1, -0x67A0,0x9DF2,0x4E99,0x4E98,0x9C10,0x8A6B,0x85C1,0x8568, -0x6900,0x6E7E,0x7897,0x8155, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5F0C,0x4E10,0x4E15,0x4E2A,0x4E31,0x4E36,0x4E3C,0x4E3F, -0x4E42,0x4E56,0x4E58,0x4E82,0x4E85,0x8C6B,0x4E8A,0x8212, -0x5F0D,0x4E8E,0x4E9E,0x4E9F,0x4EA0,0x4EA2,0x4EB0,0x4EB3, -0x4EB6,0x4ECE,0x4ECD,0x4EC4,0x4EC6,0x4EC2,0x4ED7,0x4EDE, -0x4EED,0x4EDF,0x4EF7,0x4F09,0x4F5A,0x4F30,0x4F5B,0x4F5D, -0x4F57,0x4F47,0x4F76,0x4F88,0x4F8F,0x4F98,0x4F7B,0x4F69, -0x4F70,0x4F91,0x4F6F,0x4F86,0x4F96,0x5118,0x4FD4,0x4FDF, -0x4FCE,0x4FD8,0x4FDB,0x4FD1,0x4FDA,0x4FD0,0x4FE4,0x4FE5, -0x501A,0x5028,0x5014,0x502A,0x5025,0x5005,0x4F1C,0x4FF6, -0x5021,0x5029,0x502C,0x4FFE,0x4FEF,0x5011,0x5006,0x5043, -0x5047,0x6703,0x5055,0x5050,0x5048,0x505A,0x5056,0x506C, -0x5078,0x5080,0x509A,0x5085,0x50B4,0x50B2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x50C9,0x50CA,0x50B3,0x50C2,0x50D6,0x50DE,0x50E5, -0x50ED,0x50E3,0x50EE,0x50F9,0x50F5,0x5109,0x5101,0x5102, -0x5116,0x5115,0x5114,0x511A,0x5121,0x513A,0x5137,0x513C, -0x513B,0x513F,0x5140,0x5152,0x514C,0x5154,0x5162,0x7AF8, -0x5169,0x516A,0x516E,0x5180,0x5182,0x56D8,0x518C,0x5189, -0x518F,0x5191,0x5193,0x5195,0x5196,0x51A4,0x51A6,0x51A2, -0x51A9,0x51AA,0x51AB,0x51B3,0x51B1,0x51B2,0x51B0,0x51B5, -0x51BD,0x51C5,0x51C9,0x51DB,0x51E0,0x8655,0x51E9,0x51ED, - 0,0x51F0,0x51F5,0x51FE,0x5204,0x520B,0x5214,0x520E, -0x5227,0x522A,0x522E,0x5233,0x5239,0x524F,0x5244,0x524B, -0x524C,0x525E,0x5254,0x526A,0x5274,0x5269,0x5273,0x527F, -0x527D,0x528D,0x5294,0x5292,0x5271,0x5288,0x5291,0x8FA8, -0x8FA7,0x52AC,0x52AD,0x52BC,0x52B5,0x52C1,0x52CD,0x52D7, -0x52DE,0x52E3,0x52E6,0x98ED,0x52E0,0x52F3,0x52F5,0x52F8, -0x52F9,0x5306,0x5308,0x7538,0x530D,0x5310,0x530F,0x5315, -0x531A,0x5323,0x532F,0x5331,0x5333,0x5338,0x5340,0x5346, -0x5345,0x4E17,0x5349,0x534D,0x51D6,0x535E,0x5369,0x536E, -0x5918,0x537B,0x5377,0x5382,0x5396,0x53A0,0x53A6,0x53A5, -0x53AE,0x53B0,0x53B6,0x53C3,0x7C12,0x96D9,0x53DF,0x66FC, -0x71EE,0x53EE,0x53E8,0x53ED,0x53FA,0x5401,0x543D,0x5440, -0x542C,0x542D,0x543C,0x542E,0x5436,0x5429,0x541D,0x544E, -0x548F,0x5475,0x548E,0x545F,0x5471,0x5477,0x5470,0x5492, -0x547B,0x5480,0x5476,0x5484,0x5490,0x5486,0x54C7,0x54A2, -0x54B8,0x54A5,0x54AC,0x54C4,0x54C8,0x54A8, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x54AB,0x54C2,0x54A4,0x54BE,0x54BC,0x54D8,0x54E5, -0x54E6,0x550F,0x5514,0x54FD,0x54EE,0x54ED,0x54FA,0x54E2, -0x5539,0x5540,0x5563,0x554C,0x552E,0x555C,0x5545,0x5556, -0x5557,0x5538,0x5533,0x555D,0x5599,0x5580,0x54AF,0x558A, -0x559F,0x557B,0x557E,0x5598,0x559E,0x55AE,0x557C,0x5583, -0x55A9,0x5587,0x55A8,0x55DA,0x55C5,0x55DF,0x55C4,0x55DC, -0x55E4,0x55D4,0x5614,0x55F7,0x5616,0x55FE,0x55FD,0x561B, -0x55F9,0x564E,0x5650,0x71DF,0x5634,0x5636,0x5632,0x5638, - 0,0x566B,0x5664,0x562F,0x566C,0x566A,0x5686,0x5680, -0x568A,0x56A0,0x5694,0x568F,0x56A5,0x56AE,0x56B6,0x56B4, -0x56C2,0x56BC,0x56C1,0x56C3,0x56C0,0x56C8,0x56CE,0x56D1, -0x56D3,0x56D7,0x56EE,0x56F9,0x5700,0x56FF,0x5704,0x5709, -0x5708,0x570B,0x570D,0x5713,0x5718,0x5716,0x55C7,0x571C, -0x5726,0x5737,0x5738,0x574E,0x573B,0x5740,0x574F,0x5769, -0x57C0,0x5788,0x5761,0x577F,0x5789,0x5793,0x57A0,0x57B3, -0x57A4,0x57AA,0x57B0,0x57C3,0x57C6,0x57D4,0x57D2,0x57D3, -0x580A,0x57D6,0x57E3,0x580B,0x5819,0x581D,0x5872,0x5821, -0x5862,0x584B,0x5870,0x6BC0,0x5852,0x583D,0x5879,0x5885, -0x58B9,0x589F,0x58AB,0x58BA,0x58DE,0x58BB,0x58B8,0x58AE, -0x58C5,0x58D3,0x58D1,0x58D7,0x58D9,0x58D8,0x58E5,0x58DC, -0x58E4,0x58DF,0x58EF,0x58FA,0x58F9,0x58FB,0x58FC,0x58FD, -0x5902,0x590A,0x5910,0x591B,0x68A6,0x5925,0x592C,0x592D, -0x5932,0x5938,0x593E,0x7AD2,0x5955,0x5950,0x594E,0x595A, -0x5958,0x5962,0x5960,0x5967,0x596C,0x5969, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5978,0x5981,0x599D,0x4F5E,0x4FAB,0x59A3,0x59B2, -0x59C6,0x59E8,0x59DC,0x598D,0x59D9,0x59DA,0x5A25,0x5A1F, -0x5A11,0x5A1C,0x5A09,0x5A1A,0x5A40,0x5A6C,0x5A49,0x5A35, -0x5A36,0x5A62,0x5A6A,0x5A9A,0x5ABC,0x5ABE,0x5ACB,0x5AC2, -0x5ABD,0x5AE3,0x5AD7,0x5AE6,0x5AE9,0x5AD6,0x5AFA,0x5AFB, -0x5B0C,0x5B0B,0x5B16,0x5B32,0x5AD0,0x5B2A,0x5B36,0x5B3E, -0x5B43,0x5B45,0x5B40,0x5B51,0x5B55,0x5B5A,0x5B5B,0x5B65, -0x5B69,0x5B70,0x5B73,0x5B75,0x5B78,0x6588,0x5B7A,0x5B80, - 0,0x5B83,0x5BA6,0x5BB8,0x5BC3,0x5BC7,0x5BC9,0x5BD4, -0x5BD0,0x5BE4,0x5BE6,0x5BE2,0x5BDE,0x5BE5,0x5BEB,0x5BF0, -0x5BF6,0x5BF3,0x5C05,0x5C07,0x5C08,0x5C0D,0x5C13,0x5C20, -0x5C22,0x5C28,0x5C38,0x5C39,0x5C41,0x5C46,0x5C4E,0x5C53, -0x5C50,0x5C4F,0x5B71,0x5C6C,0x5C6E,0x4E62,0x5C76,0x5C79, -0x5C8C,0x5C91,0x5C94,0x599B,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F77, -0x5F83,0x5F82,0x5F7F,0x5F8A,0x5F88,0x5F91,0x5F87,0x5F9E, -0x5F99,0x5F98,0x5FA0,0x5FA8,0x5FAD,0x5FBC,0x5FD6,0x5FFB, -0x5FE4,0x5FF8,0x5FF1,0x5FDD,0x60B3,0x5FFF,0x6021,0x6060, - 0,0x6019,0x6010,0x6029,0x600E,0x6031,0x601B,0x6015, -0x602B,0x6026,0x600F,0x603A,0x605A,0x6041,0x606A,0x6077, -0x605F,0x604A,0x6046,0x604D,0x6063,0x6043,0x6064,0x6042, -0x606C,0x606B,0x6059,0x6081,0x608D,0x60E7,0x6083,0x609A, -0x6084,0x609B,0x6096,0x6097,0x6092,0x60A7,0x608B,0x60E1, -0x60B8,0x60E0,0x60D3,0x60B4,0x5FF0,0x60BD,0x60C6,0x60B5, -0x60D8,0x614D,0x6115,0x6106,0x60F6,0x60F7,0x6100,0x60F4, -0x60FA,0x6103,0x6121,0x60FB,0x60F1,0x610D,0x610E,0x6147, -0x613E,0x6128,0x6127,0x614A,0x613F,0x613C,0x612C,0x6134, -0x613D,0x6142,0x6144,0x6173,0x6177,0x6158,0x6159,0x615A, -0x616B,0x6174,0x616F,0x6165,0x6171,0x615F,0x615D,0x6153, -0x6175,0x6199,0x6196,0x6187,0x61AC,0x6194,0x619A,0x618A, -0x6191,0x61AB,0x61AE,0x61CC,0x61CA,0x61C9,0x61F7,0x61C8, -0x61C3,0x61C6,0x61BA,0x61CB,0x7F79,0x61CD,0x61E6,0x61E3, -0x61F6,0x61FA,0x61F4,0x61FF,0x61FD,0x61FC,0x61FE,0x6200, -0x6208,0x6209,0x620D,0x620C,0x6214,0x621B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x621E,0x6221,0x622A,0x622E,0x6230,0x6232,0x6233, -0x6241,0x624E,0x625E,0x6263,0x625B,0x6260,0x6268,0x627C, -0x6282,0x6289,0x627E,0x6292,0x6293,0x6296,0x62D4,0x6283, -0x6294,0x62D7,0x62D1,0x62BB,0x62CF,0x62FF,0x62C6,0x64D4, -0x62C8,0x62DC,0x62CC,0x62CA,0x62C2,0x62C7,0x629B,0x62C9, -0x630C,0x62EE,0x62F1,0x6327,0x6302,0x6308,0x62EF,0x62F5, -0x6350,0x633E,0x634D,0x641C,0x634F,0x6396,0x638E,0x6380, -0x63AB,0x6376,0x63A3,0x638F,0x6389,0x639F,0x63B5,0x636B, - 0,0x6369,0x63BE,0x63E9,0x63C0,0x63C6,0x63E3,0x63C9, -0x63D2,0x63F6,0x63C4,0x6416,0x6434,0x6406,0x6413,0x6426, -0x6436,0x651D,0x6417,0x6428,0x640F,0x6467,0x646F,0x6476, -0x644E,0x652A,0x6495,0x6493,0x64A5,0x64A9,0x6488,0x64BC, -0x64DA,0x64D2,0x64C5,0x64C7,0x64BB,0x64D8,0x64C2,0x64F1, -0x64E7,0x8209,0x64E0,0x64E1,0x62AC,0x64E3,0x64EF,0x652C, -0x64F6,0x64F4,0x64F2,0x64FA,0x6500,0x64FD,0x6518,0x651C, -0x6505,0x6524,0x6523,0x652B,0x6534,0x6535,0x6537,0x6536, -0x6538,0x754B,0x6548,0x6556,0x6555,0x654D,0x6558,0x655E, -0x655D,0x6572,0x6578,0x6582,0x6583,0x8B8A,0x659B,0x659F, -0x65AB,0x65B7,0x65C3,0x65C6,0x65C1,0x65C4,0x65CC,0x65D2, -0x65DB,0x65D9,0x65E0,0x65E1,0x65F1,0x6772,0x660A,0x6603, -0x65FB,0x6773,0x6635,0x6636,0x6634,0x661C,0x664F,0x6644, -0x6649,0x6641,0x665E,0x665D,0x6664,0x6667,0x6668,0x665F, -0x6662,0x6670,0x6683,0x6688,0x668E,0x6689,0x6684,0x6698, -0x669D,0x66C1,0x66B9,0x66C9,0x66BE,0x66BC, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x66C4,0x66B8,0x66D6,0x66DA,0x66E0,0x663F,0x66E6, -0x66E9,0x66F0,0x66F5,0x66F7,0x670F,0x6716,0x671E,0x6726, -0x6727,0x9738,0x672E,0x673F,0x6736,0x6741,0x6738,0x6737, -0x6746,0x675E,0x6760,0x6759,0x6763,0x6764,0x6789,0x6770, -0x67A9,0x677C,0x676A,0x678C,0x678B,0x67A6,0x67A1,0x6785, -0x67B7,0x67EF,0x67B4,0x67EC,0x67B3,0x67E9,0x67B8,0x67E4, -0x67DE,0x67DD,0x67E2,0x67EE,0x67B9,0x67CE,0x67C6,0x67E7, -0x6A9C,0x681E,0x6846,0x6829,0x6840,0x684D,0x6832,0x684E, - 0,0x68B3,0x682B,0x6859,0x6863,0x6877,0x687F,0x689F, -0x688F,0x68AD,0x6894,0x689D,0x689B,0x6883,0x6AAE,0x68B9, -0x6874,0x68B5,0x68A0,0x68BA,0x690F,0x688D,0x687E,0x6901, -0x68CA,0x6908,0x68D8,0x6922,0x6926,0x68E1,0x690C,0x68CD, -0x68D4,0x68E7,0x68D5,0x6936,0x6912,0x6904,0x68D7,0x68E3, -0x6925,0x68F9,0x68E0,0x68EF,0x6928,0x692A,0x691A,0x6923, -0x6921,0x68C6,0x6979,0x6977,0x695C,0x6978,0x696B,0x6954, -0x697E,0x696E,0x6939,0x6974,0x693D,0x6959,0x6930,0x6961, -0x695E,0x695D,0x6981,0x696A,0x69B2,0x69AE,0x69D0,0x69BF, -0x69C1,0x69D3,0x69BE,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,0x6FD8,0x6FF1, -0x6FEE,0x6FDB,0x7009,0x700B,0x6FFA,0x7011,0x7001,0x700F, -0x6FFE,0x701B,0x701A,0x6F74,0x701D,0x7018,0x701F,0x7030, -0x703E,0x7032,0x7051,0x7063,0x7099,0x7092,0x70AF,0x70F1, -0x70AC,0x70B8,0x70B3,0x70AE,0x70DF,0x70CB,0x70DD, 0, -0x70D9,0x7109,0x70FD,0x711C,0x7119,0x7165,0x7155,0x7188, -0x7166,0x7162,0x714C,0x7156,0x716C,0x718F,0x71FB,0x7184, -0x7195,0x71A8,0x71AC,0x71D7,0x71B9,0x71BE,0x71D2,0x71C9, -0x71D4,0x71CE,0x71E0,0x71EC,0x71E7,0x71F5,0x71FC,0x71F9, -0x71FF,0x720D,0x7210,0x721B,0x7228,0x722D,0x722C,0x7230, -0x7232,0x723B,0x723C,0x723F,0x7240,0x7246,0x724B,0x7258, -0x7274,0x727E,0x7282,0x7281,0x7287,0x7292,0x7296,0x72A2, -0x72A7,0x72B9,0x72B2,0x72C3,0x72C6,0x72C4,0x72CE,0x72D2, -0x72E2,0x72E0,0x72E1,0x72F9,0x72F7,0x500F,0x7317,0x730A, -0x731C,0x7316,0x731D,0x7334,0x732F,0x7329,0x7325,0x733E, -0x734E,0x734F,0x9ED8,0x7357,0x736A,0x7368,0x7370,0x7378, -0x7375,0x737B,0x737A,0x73C8,0x73B3,0x73CE,0x73BB,0x73C0, -0x73E5,0x73EE,0x73DE,0x74A2,0x7405,0x746F,0x7425,0x73F8, -0x7432,0x743A,0x7455,0x743F,0x745F,0x7459,0x7441,0x745C, -0x7469,0x7470,0x7463,0x746A,0x7476,0x747E,0x748B,0x749E, -0x74A7,0x74CA,0x74CF,0x74D4,0x73F1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x74E0,0x74E3,0x74E7,0x74E9,0x74EE,0x74F2,0x74F0,0x74F1, -0x74F8,0x74F7,0x7504,0x7503,0x7505,0x750C,0x750E,0x750D, -0x7515,0x7513,0x751E,0x7526,0x752C,0x753C,0x7544,0x754D, -0x754A,0x7549,0x755B,0x7546,0x755A,0x7569,0x7564,0x7567, -0x756B,0x756D,0x7578,0x7576,0x7586,0x7587,0x7574,0x758A, -0x7589,0x7582,0x7594,0x759A,0x759D,0x75A5,0x75A3,0x75C2, -0x75B3,0x75C3,0x75B5,0x75BD,0x75B8,0x75BC,0x75B1,0x75CD, -0x75CA,0x75D2,0x75D9,0x75E3,0x75DE,0x75FE,0x75FF, 0, -0x75FC,0x7601,0x75F0,0x75FA,0x75F2,0x75F3,0x760B,0x760D, -0x7609,0x761F,0x7627,0x7620,0x7621,0x7622,0x7624,0x7634, -0x7630,0x763B,0x7647,0x7648,0x7646,0x765C,0x7658,0x7661, -0x7662,0x7668,0x7669,0x766A,0x7667,0x766C,0x7670,0x7672, -0x7676,0x7678,0x767C,0x7680,0x7683,0x7688,0x768B,0x768E, -0x7696,0x7693,0x7699,0x769A,0x76B0,0x76B4,0x76B8,0x76B9, -0x76BA,0x76C2,0x76CD,0x76D6,0x76D2,0x76DE,0x76E1,0x76E5, -0x76E7,0x76EA,0x862F,0x76FB,0x7708,0x7707,0x7704,0x7729, -0x7724,0x771E,0x7725,0x7726,0x771B,0x7737,0x7738,0x7747, -0x775A,0x7768,0x776B,0x775B,0x7765,0x777F,0x777E,0x7779, -0x778E,0x778B,0x7791,0x77A0,0x779E,0x77B0,0x77B6,0x77B9, -0x77BF,0x77BC,0x77BD,0x77BB,0x77C7,0x77CD,0x77D7,0x77DA, -0x77DC,0x77E3,0x77EE,0x77FC,0x780C,0x7812,0x7926,0x7820, -0x792A,0x7845,0x788E,0x7874,0x7886,0x787C,0x789A,0x788C, -0x78A3,0x78B5,0x78AA,0x78AF,0x78D1,0x78C6,0x78CB,0x78D4, -0x78BE,0x78BC,0x78C5,0x78CA,0x78EC, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x78E7,0x78DA,0x78FD,0x78F4,0x7907,0x7912,0x7911,0x7919, -0x792C,0x792B,0x7940,0x7960,0x7957,0x795F,0x795A,0x7955, -0x7953,0x797A,0x797F,0x798A,0x799D,0x79A7,0x9F4B,0x79AA, -0x79AE,0x79B3,0x79B9,0x79BA,0x79C9,0x79D5,0x79E7,0x79EC, -0x79E1,0x79E3,0x7A08,0x7A0D,0x7A18,0x7A19,0x7A20,0x7A1F, -0x7980,0x7A31,0x7A3B,0x7A3E,0x7A37,0x7A43,0x7A57,0x7A49, -0x7A61,0x7A62,0x7A69,0x9F9D,0x7A70,0x7A79,0x7A7D,0x7A88, -0x7A97,0x7A95,0x7A98,0x7A96,0x7AA9,0x7AC8,0x7AB0, 0, -0x7AB6,0x7AC5,0x7AC4,0x7ABF,0x9083,0x7AC7,0x7ACA,0x7ACD, -0x7ACF,0x7AD5,0x7AD3,0x7AD9,0x7ADA,0x7ADD,0x7AE1,0x7AE2, -0x7AE6,0x7AED,0x7AF0,0x7B02,0x7B0F,0x7B0A,0x7B06,0x7B33, -0x7B18,0x7B19,0x7B1E,0x7B35,0x7B28,0x7B36,0x7B50,0x7B7A, -0x7B04,0x7B4D,0x7B0B,0x7B4C,0x7B45,0x7B75,0x7B65,0x7B74, -0x7B67,0x7B70,0x7B71,0x7B6C,0x7B6E,0x7B9D,0x7B98,0x7B9F, -0x7B8D,0x7B9C,0x7B9A,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E1,0x7E05,0x7E0A, -0x7E23,0x7E21,0x7E12,0x7E31,0x7E1F,0x7E09,0x7E0B,0x7E22, -0x7E46,0x7E66,0x7E3B,0x7E35,0x7E39,0x7E43,0x7E37, 0, -0x7E32,0x7E3A,0x7E67,0x7E5D,0x7E56,0x7E5E,0x7E59,0x7E5A, -0x7E79,0x7E6A,0x7E69,0x7E7C,0x7E7B,0x7E83,0x7DD5,0x7E7D, -0x8FAE,0x7E7F,0x7E88,0x7E89,0x7E8C,0x7E92,0x7E90,0x7E93, -0x7E94,0x7E96,0x7E8E,0x7E9B,0x7E9C,0x7F38,0x7F3A,0x7F45, -0x7F4C,0x7F4D,0x7F4E,0x7F50,0x7F51,0x7F55,0x7F54,0x7F58, -0x7F5F,0x7F60,0x7F68,0x7F69,0x7F67,0x7F78,0x7F82,0x7F86, -0x7F83,0x7F88,0x7F87,0x7F8C,0x7F94,0x7F9E,0x7F9D,0x7F9A, -0x7FA3,0x7FAF,0x7FB2,0x7FB9,0x7FAE,0x7FB6,0x7FB8,0x8B71, -0x7FC5,0x7FC6,0x7FCA,0x7FD5,0x7FD4,0x7FE1,0x7FE6,0x7FE9, -0x7FF3,0x7FF9,0x98DC,0x8006,0x8004,0x800B,0x8012,0x8018, -0x8019,0x801C,0x8021,0x8028,0x803F,0x803B,0x804A,0x8046, -0x8052,0x8058,0x805A,0x805F,0x8062,0x8068,0x8073,0x8072, -0x8070,0x8076,0x8079,0x807D,0x807F,0x8084,0x8086,0x8085, -0x809B,0x8093,0x809A,0x80AD,0x5190,0x80AC,0x80DB,0x80E5, -0x80D9,0x80DD,0x80C4,0x80DA,0x80D6,0x8109,0x80EF,0x80F1, -0x811B,0x8129,0x8123,0x812F,0x814B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x968B,0x8146,0x813E,0x8153,0x8151,0x80FC,0x8171,0x816E, -0x8165,0x8166,0x8174,0x8183,0x8188,0x818A,0x8180,0x8182, -0x81A0,0x8195,0x81A4,0x81A3,0x815F,0x8193,0x81A9,0x81B0, -0x81B5,0x81BE,0x81B8,0x81BD,0x81C0,0x81C2,0x81BA,0x81C9, -0x81CD,0x81D1,0x81D9,0x81D8,0x81C8,0x81DA,0x81DF,0x81E0, -0x81E7,0x81FA,0x81FB,0x81FE,0x8201,0x8202,0x8205,0x8207, -0x820A,0x820D,0x8210,0x8216,0x8229,0x822B,0x8238,0x8233, -0x8240,0x8259,0x8258,0x825D,0x825A,0x825F,0x8264, 0, -0x8262,0x8268,0x826A,0x826B,0x822E,0x8271,0x8277,0x8278, -0x827E,0x828D,0x8292,0x82AB,0x829F,0x82BB,0x82AC,0x82E1, -0x82E3,0x82DF,0x82D2,0x82F4,0x82F3,0x82FA,0x8393,0x8303, -0x82FB,0x82F9,0x82DE,0x8306,0x82DC,0x8309,0x82D9,0x8335, -0x8334,0x8316,0x8332,0x8331,0x8340,0x8339,0x8350,0x8345, -0x832F,0x832B,0x8317,0x8318,0x8385,0x839A,0x83AA,0x839F, -0x83A2,0x8396,0x8323,0x838E,0x8387,0x838A,0x837C,0x83B5, -0x8373,0x8375,0x83A0,0x8389,0x83A8,0x83F4,0x8413,0x83EB, -0x83CE,0x83FD,0x8403,0x83D8,0x840B,0x83C1,0x83F7,0x8407, -0x83E0,0x83F2,0x840D,0x8422,0x8420,0x83BD,0x8438,0x8506, -0x83FB,0x846D,0x842A,0x843C,0x855A,0x8484,0x8477,0x846B, -0x84AD,0x846E,0x8482,0x8469,0x8446,0x842C,0x846F,0x8479, -0x8435,0x84CA,0x8462,0x84B9,0x84BF,0x849F,0x84D9,0x84CD, -0x84BB,0x84DA,0x84D0,0x84C1,0x84C6,0x84D6,0x84A1,0x8521, -0x84FF,0x84F4,0x8517,0x8518,0x852C,0x851F,0x8515,0x8514, -0x84FC,0x8540,0x8563,0x8558,0x8548, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8541,0x8602,0x854B,0x8555,0x8580,0x85A4,0x8588,0x8591, -0x858A,0x85A8,0x856D,0x8594,0x859B,0x85EA,0x8587,0x859C, -0x8577,0x857E,0x8590,0x85C9,0x85BA,0x85CF,0x85B9,0x85D0, -0x85D5,0x85DD,0x85E5,0x85DC,0x85F9,0x860A,0x8613,0x860B, -0x85FE,0x85FA,0x8606,0x8622,0x861A,0x8630,0x863F,0x864D, -0x4E55,0x8654,0x865F,0x8667,0x8671,0x8693,0x86A3,0x86A9, -0x86AA,0x868B,0x868C,0x86B6,0x86AF,0x86C4,0x86C6,0x86B0, -0x86C9,0x8823,0x86AB,0x86D4,0x86DE,0x86E9,0x86EC, 0, -0x86DF,0x86DB,0x86EF,0x8712,0x8706,0x8708,0x8700,0x8703, -0x86FB,0x8711,0x8709,0x870D,0x86F9,0x870A,0x8734,0x873F, -0x8737,0x873B,0x8725,0x8729,0x871A,0x8760,0x875F,0x8778, -0x874C,0x874E,0x8774,0x8757,0x8768,0x876E,0x8759,0x8753, -0x8763,0x876A,0x8805,0x87A2,0x879F,0x8782,0x87AF,0x87CB, -0x87BD,0x87C0,0x87D0,0x96D6,0x87AB,0x87C4,0x87B3,0x87C7, -0x87C6,0x87BB,0x87EF,0x87F2,0x87E0,0x880F,0x880D,0x87FE, -0x87F6,0x87F7,0x880E,0x87D2,0x8811,0x8816,0x8815,0x8822, -0x8821,0x8831,0x8836,0x8839,0x8827,0x883B,0x8844,0x8842, -0x8852,0x8859,0x885E,0x8862,0x886B,0x8881,0x887E,0x889E, -0x8875,0x887D,0x88B5,0x8872,0x8882,0x8897,0x8892,0x88AE, -0x8899,0x88A2,0x888D,0x88A4,0x88B0,0x88BF,0x88B1,0x88C3, -0x88C4,0x88D4,0x88D8,0x88D9,0x88DD,0x88F9,0x8902,0x88FC, -0x88F4,0x88E8,0x88F2,0x8904,0x890C,0x890A,0x8913,0x8943, -0x891E,0x8925,0x892A,0x892B,0x8941,0x8944,0x893B,0x8936, -0x8938,0x894C,0x891D,0x8960,0x895E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8966,0x8964,0x896D,0x896A,0x896F,0x8974,0x8977,0x897E, -0x8983,0x8988,0x898A,0x8993,0x8998,0x89A1,0x89A9,0x89A6, -0x89AC,0x89AF,0x89B2,0x89BA,0x89BD,0x89BF,0x89C0,0x89DA, -0x89DC,0x89DD,0x89E7,0x89F4,0x89F8,0x8A03,0x8A16,0x8A10, -0x8A0C,0x8A1B,0x8A1D,0x8A25,0x8A36,0x8A41,0x8A5B,0x8A52, -0x8A46,0x8A48,0x8A7C,0x8A6D,0x8A6C,0x8A62,0x8A85,0x8A82, -0x8A84,0x8AA8,0x8AA1,0x8A91,0x8AA5,0x8AA6,0x8A9A,0x8AA3, -0x8AC4,0x8ACD,0x8AC2,0x8ADA,0x8AEB,0x8AF3,0x8AE7, 0, -0x8AE4,0x8AF1,0x8B14,0x8AE0,0x8AE2,0x8AF7,0x8ADE,0x8ADB, -0x8B0C,0x8B07,0x8B1A,0x8AE1,0x8B16,0x8B10,0x8B17,0x8B20, -0x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7C,0x8E81,0x8E87, -0x8E85,0x8E84,0x8E8B,0x8E8A,0x8E93,0x8E91,0x8E94,0x8E99, -0x8EAA,0x8EA1,0x8EAC,0x8EB0,0x8EC6,0x8EB1,0x8EBE,0x8EC5, -0x8EC8,0x8ECB,0x8EDB,0x8EE3,0x8EFC,0x8EFB,0x8EEB,0x8EFE, -0x8F0A,0x8F05,0x8F15,0x8F12,0x8F19,0x8F13,0x8F1C,0x8F1F, -0x8F1B,0x8F0C,0x8F26,0x8F33,0x8F3B,0x8F39,0x8F45,0x8F42, -0x8F3E,0x8F4C,0x8F49,0x8F46,0x8F4E,0x8F57,0x8F5C, 0, -0x8F62,0x8F63,0x8F64,0x8F9C,0x8F9F,0x8FA3,0x8FAD,0x8FAF, -0x8FB7,0x8FDA,0x8FE5,0x8FE2,0x8FEA,0x8FEF,0x9087,0x8FF4, -0x9005,0x8FF9,0x8FFA,0x9011,0x9015,0x9021,0x900D,0x901E, -0x9016,0x900B,0x9027,0x9036,0x9035,0x9039,0x8FF8,0x904F, -0x9050,0x9051,0x9052,0x900E,0x9049,0x903E,0x9056,0x9058, -0x905E,0x9068,0x906F,0x9076,0x96A8,0x9072,0x9082,0x907D, -0x9081,0x9080,0x908A,0x9089,0x908F,0x90A8,0x90AF,0x90B1, -0x90B5,0x90E2,0x90E4,0x6248,0x90DB,0x9102,0x9112,0x9119, -0x9132,0x9130,0x914A,0x9156,0x9158,0x9163,0x9165,0x9169, -0x9173,0x9172,0x918B,0x9189,0x9182,0x91A2,0x91AB,0x91AF, -0x91AA,0x91B5,0x91B4,0x91BA,0x91C0,0x91C1,0x91C9,0x91CB, -0x91D0,0x91D6,0x91DF,0x91E1,0x91DB,0x91FC,0x91F5,0x91F6, -0x921E,0x91FF,0x9214,0x922C,0x9215,0x9211,0x925E,0x9257, -0x9245,0x9249,0x9264,0x9248,0x9295,0x923F,0x924B,0x9250, -0x929C,0x9296,0x9293,0x929B,0x925A,0x92CF,0x92B9,0x92B7, -0x92E9,0x930F,0x92FA,0x9344,0x932E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9319,0x9322,0x931A,0x9323,0x933A,0x9335,0x933B,0x935C, -0x9360,0x937C,0x936E,0x9356,0x93B0,0x93AC,0x93AD,0x9394, -0x93B9,0x93D6,0x93D7,0x93E8,0x93E5,0x93D8,0x93C3,0x93DD, -0x93D0,0x93C8,0x93E4,0x941A,0x9414,0x9413,0x9403,0x9407, -0x9410,0x9436,0x942B,0x9435,0x9421,0x943A,0x9441,0x9452, -0x9444,0x945B,0x9460,0x9462,0x945E,0x946A,0x9229,0x9470, -0x9475,0x9477,0x947D,0x945A,0x947C,0x947E,0x9481,0x947F, -0x9582,0x9587,0x958A,0x9594,0x9596,0x9598,0x9599, 0, -0x95A0,0x95A8,0x95A7,0x95AD,0x95BC,0x95BB,0x95B9,0x95BE, -0x95CA,0x6FF6,0x95C3,0x95CD,0x95CC,0x95D5,0x95D4,0x95D6, -0x95DC,0x95E1,0x95E5,0x95E2,0x9621,0x9628,0x962E,0x962F, -0x9642,0x964C,0x964F,0x964B,0x9677,0x965C,0x965E,0x965D, -0x965F,0x9666,0x9672,0x966C,0x968D,0x9698,0x9695,0x9697, -0x96AA,0x96A7,0x96B1,0x96B2,0x96B0,0x96B4,0x96B6,0x96B8, -0x96B9,0x96CE,0x96CB,0x96C9,0x96CD,0x894D,0x96DC,0x970D, -0x96D5,0x96F9,0x9704,0x9706,0x9708,0x9713,0x970E,0x9711, -0x970F,0x9716,0x9719,0x9724,0x972A,0x9730,0x9739,0x973D, -0x973E,0x9744,0x9746,0x9748,0x9742,0x9749,0x975C,0x9760, -0x9764,0x9766,0x9768,0x52D2,0x976B,0x9771,0x9779,0x9785, -0x977C,0x9781,0x977A,0x9786,0x978B,0x978F,0x9790,0x979C, -0x97A8,0x97A6,0x97A3,0x97B3,0x97B4,0x97C3,0x97C6,0x97C8, -0x97CB,0x97DC,0x97ED,0x9F4F,0x97F2,0x7ADF,0x97F6,0x97F5, -0x980F,0x980C,0x9838,0x9824,0x9821,0x9837,0x983D,0x9846, -0x984F,0x984B,0x986B,0x986F,0x9870, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9871,0x9874,0x9873,0x98AA,0x98AF,0x98B1,0x98B6,0x98C4, -0x98C3,0x98C6,0x98E9,0x98EB,0x9903,0x9909,0x9912,0x9914, -0x9918,0x9921,0x991D,0x991E,0x9924,0x9920,0x992C,0x992E, -0x993D,0x993E,0x9942,0x9949,0x9945,0x9950,0x994B,0x9951, -0x9952,0x994C,0x9955,0x9997,0x9998,0x99A5,0x99AD,0x99AE, -0x99BC,0x99DF,0x99DB,0x99DD,0x99D8,0x99D1,0x99ED,0x99EE, -0x99F1,0x99F2,0x99FB,0x99F8,0x9A01,0x9A0F,0x9A05,0x99E2, -0x9A19,0x9A2B,0x9A37,0x9A45,0x9A42,0x9A40,0x9A43, 0, -0x9A3E,0x9A55,0x9A4D,0x9A5B,0x9A57,0x9A5F,0x9A62,0x9A65, -0x9A64,0x9A69,0x9A6B,0x9A6A,0x9AAD,0x9AB0,0x9ABC,0x9AC0, -0x9ACF,0x9AD1,0x9AD3,0x9AD4,0x9ADE,0x9ADF,0x9AE2,0x9AE3, -0x9AE6,0x9AEF,0x9AEB,0x9AEE,0x9AF4,0x9AF1,0x9AF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0x9DED,0x9DEF,0x9DFD,0x9E1A, -0x9E1B,0x9E1E,0x9E75,0x9E79,0x9E7D,0x9E81,0x9E88,0x9E8B, -0x9E8C,0x9E92,0x9E95,0x9E91,0x9E9D,0x9EA5,0x9EA9,0x9EB8, -0x9EAA,0x9EAD,0x9761,0x9ECC,0x9ECE,0x9ECF,0x9ED0,0x9ED4, -0x9EDC,0x9EDE,0x9EDD,0x9EE0,0x9EE5,0x9EE8,0x9EEF, 0, -0x9EF4,0x9EF6,0x9EF7,0x9EF9,0x9EFB,0x9EFC,0x9EFD,0x9F07, -0x9F08,0x76B7,0x9F15,0x9F21,0x9F2C,0x9F3E,0x9F4A,0x9F52, -0x9F54,0x9F63,0x9F5F,0x9F60,0x9F61,0x9F66,0x9F67,0x9F6C, -0x9F6A,0x9F77,0x9F72,0x9F76,0x9F95,0x9F9C,0x9FA0,0x582F, -0x69C7,0x9059,0x7464,0x51DC,0x7199}; - -static int func_sjis_uni_onechar(int code){ - if ((code>=0x00A1)&&(code<=0x00DF)) - return(tab_sjis_uni0[code-0x00A1]); - if ((code>=0x8140)&&(code<=0x84BE)) - return(tab_sjis_uni1[code-0x8140]); - if ((code>=0x889F)&&(code<=0x9FFC)) - return(tab_sjis_uni2[code-0x889F]); - if ((code>=0xE040)&&(code<=0xEAA4)) - return(tab_sjis_uni3[code-0xE040]); - return(0); -} -/* page 0 0x005C-0x00F7 */ -static uint16 tab_uni_sjis0[]={ -0x815F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x8191,0x8192, - 0, 0, 0,0x8198,0x814E, 0, 0, 0, -0x81CA, 0, 0, 0,0x818B,0x817D, 0, 0, -0x814C, 0,0x81F7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x817E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x8180}; - -/* page 1 0x0391-0x0451 */ -static uint16 tab_uni_sjis1[]={ -0x839F,0x83A0,0x83A1,0x83A2,0x83A3,0x83A4,0x83A5,0x83A6, -0x83A7,0x83A8,0x83A9,0x83AA,0x83AB,0x83AC,0x83AD,0x83AE, -0x83AF, 0,0x83B0,0x83B1,0x83B2,0x83B3,0x83B4,0x83B5, -0x83B6, 0, 0, 0, 0, 0, 0, 0, -0x83BF,0x83C0,0x83C1,0x83C2,0x83C3,0x83C4,0x83C5,0x83C6, -0x83C7,0x83C8,0x83C9,0x83CA,0x83CB,0x83CC,0x83CD,0x83CE, -0x83CF, 0,0x83D0,0x83D1,0x83D2,0x83D3,0x83D4,0x83D5, -0x83D6, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8446, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x8440, -0x8441,0x8442,0x8443,0x8444,0x8445,0x8447,0x8448,0x8449, -0x844A,0x844B,0x844C,0x844D,0x844E,0x844F,0x8450,0x8451, -0x8452,0x8453,0x8454,0x8455,0x8456,0x8457,0x8458,0x8459, -0x845A,0x845B,0x845C,0x845D,0x845E,0x845F,0x8460,0x8470, -0x8471,0x8472,0x8473,0x8474,0x8475,0x8477,0x8478,0x8479, -0x847A,0x847B,0x847C,0x847D,0x847E,0x8480,0x8481,0x8482, -0x8483,0x8484,0x8485,0x8486,0x8487,0x8488,0x8489,0x848A, -0x848B,0x848C,0x848D,0x848E,0x848F,0x8490,0x8491, 0, -0x8476}; - -/* page 2 0x2010-0x2312 */ -static uint16 tab_uni_sjis2[]={ -0x815D, 0, 0, 0, 0,0x815C,0x8161, 0, -0x8165,0x8166, 0, 0,0x8167,0x8168, 0, 0, -0x81F5,0x81F6, 0, 0, 0,0x8164,0x8163, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x81F1, 0,0x818C,0x818D, 0, 0, 0, 0, - 0, 0, 0,0x81A6, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x818E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 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 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x81E0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8182,0x81DF, 0, 0, 0, 0,0x8185,0x8186, - 0, 0,0x81E1,0x81E2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x81BC,0x81BD, 0, 0,0x81BA,0x81BB, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x81DB, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x81DC}; - -/* page 3 0x2500-0x266F */ -static uint16 tab_uni_sjis3[]={ -0x849F,0x84AA,0x84A0,0x84AB, 0, 0, 0, 0, - 0, 0, 0, 0,0x84A1, 0, 0,0x84AC, -0x84A2, 0, 0,0x84AD,0x84A4, 0, 0,0x84AF, -0x84A3, 0, 0,0x84AE,0x84A5,0x84BA, 0, 0, -0x84B5, 0, 0,0x84B0,0x84A7,0x84BC, 0, 0, -0x84B7, 0, 0,0x84B2,0x84A6, 0, 0,0x84B6, -0x84BB, 0, 0,0x84B1,0x84A8, 0, 0,0x84B8, -0x84BD, 0, 0,0x84B3,0x84A9, 0, 0,0x84B9, - 0, 0,0x84BE, 0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sjis4[]={ -0x8140,0x8141,0x8142,0x8156, 0,0x8158,0x8159,0x815A, -0x8171,0x8172,0x8173,0x8174,0x8175,0x8176,0x8177,0x8178, -0x8179,0x817A,0x81A7,0x81AC,0x816B,0x816C, 0, 0, - 0, 0, 0, 0,0x8160, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x829F,0x82A0,0x82A1,0x82A2,0x82A3,0x82A4,0x82A5, -0x82A6,0x82A7,0x82A8,0x82A9,0x82AA,0x82AB,0x82AC,0x82AD, -0x82AE,0x82AF,0x82B0,0x82B1,0x82B2,0x82B3,0x82B4,0x82B5, -0x82B6,0x82B7,0x82B8,0x82B9,0x82BA,0x82BB,0x82BC,0x82BD, -0x82BE,0x82BF,0x82C0,0x82C1,0x82C2,0x82C3,0x82C4,0x82C5, -0x82C6,0x82C7,0x82C8,0x82C9,0x82CA,0x82CB,0x82CC,0x82CD, -0x82CE,0x82CF,0x82D0,0x82D1,0x82D2,0x82D3,0x82D4,0x82D5, -0x82D6,0x82D7,0x82D8,0x82D9,0x82DA,0x82DB,0x82DC,0x82DD, -0x82DE,0x82DF,0x82E0,0x82E1,0x82E2,0x82E3,0x82E4,0x82E5, -0x82E6,0x82E7,0x82E8,0x82E9,0x82EA,0x82EB,0x82EC,0x82ED, -0x82EE,0x82EF,0x82F0,0x82F1, 0, 0, 0, 0, - 0, 0, 0,0x814A,0x814B,0x8154,0x8155, 0, - 0,0x8340,0x8341,0x8342,0x8343,0x8344,0x8345,0x8346, -0x8347,0x8348,0x8349,0x834A,0x834B,0x834C,0x834D,0x834E, -0x834F,0x8350,0x8351,0x8352,0x8353,0x8354,0x8355,0x8356, -0x8357,0x8358,0x8359,0x835A,0x835B,0x835C,0x835D,0x835E, -0x835F,0x8360,0x8361,0x8362,0x8363,0x8364,0x8365,0x8366, -0x8367,0x8368,0x8369,0x836A,0x836B,0x836C,0x836D,0x836E, -0x836F,0x8370,0x8371,0x8372,0x8373,0x8374,0x8375,0x8376, -0x8377,0x8378,0x8379,0x837A,0x837B,0x837C,0x837D,0x837E, -0x8380,0x8381,0x8382,0x8383,0x8384,0x8385,0x8386,0x8387, -0x8388,0x8389,0x838A,0x838B,0x838C,0x838D,0x838E,0x838F, -0x8390,0x8391,0x8392,0x8393,0x8394,0x8395,0x8396, 0, - 0, 0, 0,0x8145,0x815B,0x8152,0x8153}; - -/* page 5 0x4E00-0x9481 */ -static uint16 tab_uni_sjis5[]={ -0x88EA,0x929A, 0,0x8EB5, 0, 0, 0,0x969C, -0x8FE4,0x8E4F,0x8FE3,0x89BA, 0,0x9573,0x975E, 0, -0x98A0,0x894E, 0, 0,0x8A8E,0x98A1,0x90A2,0x99C0, -0x8B75,0x95B8, 0, 0, 0, 0,0x8FE5, 0, - 0,0x97BC, 0, 0, 0, 0,0x95C0, 0, - 0, 0,0x98A2, 0, 0,0x9286, 0, 0, - 0,0x98A3,0x8BF8, 0, 0, 0,0x98A4, 0, -0x8ADB,0x924F, 0,0x8EE5,0x98A5, 0, 0,0x98A6, - 0, 0,0x98A7,0x9454, 0,0x8B76, 0, 0, - 0, 0, 0,0x9456, 0,0x93E1,0x8CC1,0x9652, - 0, 0, 0, 0, 0,0xE568,0x98A8,0x8FE6, -0x98A9,0x89B3, 0, 0, 0,0x8BE3,0x8CEE,0x96E7, - 0, 0,0x9BA4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9790, 0,0x93FB, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x8AA3, 0, -0x8B54, 0,0x98AA, 0, 0,0x98AB,0x97B9, 0, -0x975C,0x9188,0x98AD,0x8E96,0x93F1, 0,0x98B0, 0, - 0,0x895D,0x8CDD, 0,0x8CDC,0x88E4, 0, 0, -0x986A,0x9869, 0,0x8DB1,0x889F, 0,0x98B1,0x98B2, -0x98B3,0x9653,0x98B4, 0,0x8CF0,0x88E5,0x9692, 0, -0x8B9C, 0, 0,0x8B9D,0x8B9E,0x92E0,0x97BA, 0, -0x98B5, 0, 0,0x98B6, 0, 0,0x98B7, 0, - 0, 0,0x906C, 0, 0, 0, 0, 0, -0x8F59,0x906D,0x98BC, 0,0x98BA, 0,0x98BB,0x8B77, - 0, 0,0x8DA1,0x89EE, 0,0x98B9,0x98B8,0x95A7, - 0, 0, 0, 0,0x8E65,0x8E64,0x91BC,0x98BD, -0x9574,0x90E5, 0, 0, 0,0x8157,0x98BE,0x98C0, - 0, 0, 0,0x91E3,0x97DF,0x88C8, 0, 0, - 0, 0, 0, 0, 0,0x98BF,0x89BC, 0, -0x8BC2, 0,0x9287, 0, 0, 0,0x8C8F,0x98C1, - 0, 0, 0,0x9443, 0, 0, 0, 0, - 0,0x8AE9, 0, 0, 0, 0, 0, 0, - 0,0x98C2,0x88C9, 0, 0,0x8CDE,0x8AEA,0x959A, -0x94B0,0x8B78, 0, 0, 0, 0, 0, 0, - 0, 0,0x89EF, 0,0x98E5,0x9360, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x948C, -0x98C4, 0, 0, 0,0x94BA, 0,0x97E0, 0, -0x904C, 0,0x8E66, 0,0x8E97,0x89BE, 0, 0, - 0, 0, 0,0x92CF, 0, 0,0x9241,0x98C8, - 0, 0, 0, 0, 0,0x88CA,0x92E1,0x8F5A, -0x8DB2,0x9743, 0,0x91CC, 0,0x89BD, 0,0x98C7, - 0,0x975D,0x98C3,0x98C5,0x8DEC,0x98C6,0x9B43, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x98CE, 0, 0, 0, 0, 0,0x98D1, -0x98CF, 0, 0,0x89C0, 0,0x95B9,0x98C9, 0, - 0, 0, 0,0x98CD,0x8CF1, 0, 0,0x8E67, - 0, 0, 0,0x8AA4, 0, 0,0x98D2, 0, -0x98CA, 0, 0,0x97E1, 0,0x8E98, 0,0x98CB, - 0,0x98D0, 0, 0, 0, 0,0x98D3, 0, -0x98CC, 0, 0,0x8B9F, 0,0x88CB, 0, 0, -0x8BA0,0x89BF, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x9B44, 0,0x9699,0x958E,0x8CF2, - 0, 0, 0, 0, 0,0x904E,0x97B5, 0, - 0, 0, 0, 0, 0, 0, 0,0x95D6, - 0, 0,0x8C57,0x91A3,0x89E2, 0, 0, 0, - 0, 0,0x8F72, 0, 0, 0,0x98D7, 0, -0x98DC,0x98DA, 0, 0,0x98D5, 0, 0,0x91AD, -0x98D8, 0,0x98DB,0x98D9, 0,0x95DB, 0,0x98D6, - 0,0x904D, 0,0x9693,0x98DD,0x98DE, 0, 0, - 0, 0, 0, 0, 0, 0,0x8F43,0x98EB, - 0, 0, 0,0x946F, 0,0x9555,0x98E6, 0, -0x95EE, 0,0x89B4, 0, 0, 0,0x98EA, 0, - 0, 0, 0, 0, 0,0x98E4,0x98ED, 0, - 0,0x9171, 0,0x8CC2, 0,0x947B, 0,0xE0C5, - 0,0x98EC,0x937C, 0,0x98E1, 0,0x8CF4, 0, - 0,0x8CF3,0x98DF, 0, 0, 0, 0,0x8ED8, - 0,0x98E7, 0,0x95ED,0x926C,0x98E3,0x8C91, 0, -0x98E0,0x98E8,0x98E2,0x97CF,0x98E9,0x9860, 0, 0, - 0, 0, 0, 0, 0, 0,0x8BE4, 0, - 0,0x8C90, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x98EE, 0, 0, 0,0x98EF, -0x98F3,0x88CC, 0, 0, 0, 0, 0,0x95CE, -0x98F2, 0, 0, 0, 0,0x98F1,0x98F5, 0, - 0, 0,0x98F4, 0,0x92E2, 0, 0, 0, - 0, 0, 0, 0, 0,0x8C92, 0, 0, - 0, 0, 0, 0,0x98F6, 0, 0, 0, - 0, 0,0x8EC3, 0,0x91A4,0x92E3,0x8BF4, 0, -0x98F7, 0, 0, 0, 0,0x8B55, 0, 0, -0x98F8, 0, 0, 0, 0,0x98FA, 0, 0, - 0, 0, 0, 0, 0,0x9654, 0, 0, - 0,0x8C86, 0, 0, 0, 0, 0, 0, -0x8E50,0x94F5,0x98F9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x8DC3,0x9762, 0, 0, - 0, 0,0x98FC,0x9942,0x98FB,0x8DC2, 0,0x8F9D, - 0, 0, 0, 0, 0, 0,0x8C58, 0, - 0, 0,0x9943, 0, 0,0x8BCD, 0, 0, - 0,0x9940,0x9941, 0, 0,0x93AD, 0,0x919C, - 0,0x8BA1, 0, 0, 0,0x966C,0x9944, 0, - 0, 0,0x97BB, 0, 0, 0,0x9945, 0, - 0, 0, 0,0x9948, 0,0x9946, 0,0x916D, - 0, 0, 0, 0, 0,0x9947,0x9949, 0, - 0, 0, 0, 0, 0,0x994B, 0, 0, - 0,0x994A, 0,0x95C6, 0, 0, 0, 0, -0x8B56,0x994D,0x994E, 0,0x89AD, 0, 0, 0, - 0,0x994C, 0, 0, 0, 0, 0, 0, - 0, 0,0x8EF2, 0,0x9951,0x9950,0x994F, 0, -0x98D4, 0,0x9952, 0, 0, 0, 0,0x8F9E, - 0,0x9953, 0, 0, 0, 0, 0, 0, - 0, 0,0x9744, 0, 0, 0, 0, 0, - 0, 0,0x96D7, 0, 0, 0, 0,0x9955, - 0, 0,0x9954,0x9957,0x9956, 0, 0,0x9958, -0x9959,0x88F2, 0,0x8CB3,0x8C5A,0x8F5B,0x929B,0x8BA2, -0x90E6,0x8CF5, 0,0x8D8E,0x995B,0x96C6,0x9365, 0, -0x8E99, 0,0x995A, 0,0x995C, 0, 0, 0, - 0, 0,0x937D, 0,0x8A95, 0, 0, 0, - 0, 0,0x995D, 0, 0,0x93FC, 0, 0, -0x9153,0x995F,0x9960,0x94AA,0x8CF6,0x985A,0x9961, 0, - 0,0x8BA4, 0, 0, 0,0x95BA,0x91B4,0x8BEF, -0x9354, 0, 0, 0,0x8C93, 0, 0, 0, -0x9962, 0,0x9963, 0, 0,0x93E0,0x897E, 0, - 0,0x9966,0x8DFB, 0,0x9965,0x8DC4, 0,0x9967, -0xE3EC,0x9968,0x9660,0x9969, 0,0x996A,0x996B,0x8FE7, - 0,0x8ECA, 0, 0, 0, 0, 0, 0, -0x8AA5, 0,0x996E, 0,0x996C,0x96BB,0x996D, 0, -0x9579,0x996F,0x9970,0x9971,0x937E, 0, 0, 0, -0x9975,0x9973,0x9974,0x9972,0x8DE1,0x9976,0x96E8,0x97E2, - 0, 0, 0, 0, 0,0x9977, 0, 0, - 0, 0, 0, 0,0x90A6,0x9978,0x8F79, 0, - 0,0x9979, 0,0x929C,0x97BD,0x9380, 0, 0, - 0, 0, 0, 0, 0, 0,0x99C3, 0, - 0, 0, 0,0x997A,0xEAA3,0x8BC3, 0, 0, -0x997B,0x967D, 0, 0, 0, 0,0x8F88,0x91FA, - 0,0x997D,0x93E2, 0, 0,0x997E, 0, 0, -0x9980,0x8A4D, 0, 0, 0,0x9981,0x8BA5, 0, -0x93CA,0x899A,0x8F6F, 0, 0,0x949F,0x9982, 0, -0x9381, 0, 0,0x906E,0x9983, 0,0x95AA,0x90D8, -0x8AA0, 0,0x8AA7,0x9984, 0, 0,0x9986, 0, - 0,0x8C59, 0, 0,0x9985, 0, 0,0x97F1, - 0, 0, 0, 0, 0,0x8F89, 0, 0, - 0, 0, 0, 0,0x94BB,0x95CA, 0,0x9987, - 0,0x9798,0x9988, 0, 0, 0,0x9989, 0, -0x939E, 0, 0,0x998A, 0, 0,0x90A7,0x8DFC, -0x8C94,0x998B,0x8E68,0x8D8F, 0, 0, 0, 0, - 0, 0, 0,0x92E4,0x998D, 0, 0,0x91A5, - 0, 0,0x8DED,0x998E,0x998F,0x914F, 0,0x998C, - 0, 0, 0, 0,0x9991, 0,0x9655, 0, - 0, 0, 0,0x8D84, 0, 0,0x9990, 0, - 0, 0, 0,0x8C95,0x8DDC,0x948D, 0, 0, - 0,0x9994,0x9992, 0, 0, 0, 0,0x959B, -0x8FE8,0x999B,0x8A84,0x9995,0x9993,0x916E, 0, 0, - 0, 0, 0, 0, 0,0x9997, 0,0x9996, - 0, 0, 0,0x8A63, 0, 0, 0,0x8C80, -0x999C,0x97AB, 0, 0, 0,0x9998, 0, 0, - 0,0x999D,0x999A, 0,0x9999, 0, 0, 0, - 0, 0, 0,0x97CD, 0, 0, 0,0x8CF7, -0x89C1, 0, 0,0x97F2, 0, 0, 0, 0, - 0,0x8F95,0x9377,0x8D85,0x99A0,0x99A1, 0, 0, - 0,0x97E3, 0, 0,0x984A,0x99A3, 0, 0, - 0,0x8CF8, 0, 0,0x99A2, 0,0x8A4E, 0, - 0,0x99A4, 0,0x9675, 0,0x92BA, 0,0x9745, - 0,0x95D7, 0, 0, 0,0x99A5, 0, 0, - 0, 0,0xE8D3, 0, 0,0x93AE, 0,0x99A6, -0x8AA8,0x96B1, 0, 0, 0,0x8F9F,0x99A7,0x95E5, -0x99AB, 0,0x90A8,0x99A8,0x8BCE, 0,0x99A9,0x8AA9, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x8C4D,0x99AC, 0,0x99AD, 0, 0, -0x99AE,0x99AF,0x8ED9, 0, 0, 0,0x8CF9,0x96DC, - 0,0x96E6,0x93F5, 0, 0,0x95EF,0x99B0, 0, -0x99B1, 0, 0, 0, 0,0x99B3, 0,0x99B5, -0x99B4, 0, 0, 0, 0,0x99B6,0x89BB,0x966B, - 0,0x8DFA,0x99B7, 0, 0,0x9178, 0, 0, -0x8FA0,0x8BA7, 0,0x99B8, 0, 0, 0, 0, - 0, 0,0x94D9, 0, 0, 0, 0,0x99B9, - 0,0x99BA, 0,0x99BB, 0, 0, 0, 0, -0x99BC,0x9543,0x8BE6,0x88E3, 0, 0, 0,0x93BD, -0x99BD,0x8F5C, 0,0x90E7, 0,0x99BF,0x99BE,0x8FA1, -0x8CDF,0x99C1,0x94BC, 0, 0,0x99C2, 0, 0, - 0,0x94DA,0x91B2,0x91EC,0x8BA6, 0, 0,0x93EC, -0x9250, 0,0x948E, 0,0x966D, 0,0x99C4, 0, -0x90E8, 0, 0, 0, 0, 0,0x8C54, 0, - 0,0x99C5, 0, 0, 0, 0,0x99C6,0x894B, -0x88F3,0x8AEB, 0,0x91A6,0x8B70,0x9791, 0,0x99C9, -0x89B5, 0, 0,0x99C8, 0, 0, 0,0x8BA8, - 0, 0,0x99CA, 0,0x96EF, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x99CB, 0, -0x97D0, 0,0x8CFA, 0, 0, 0, 0,0x8CB4, -0x99CC, 0, 0, 0, 0,0x99CE,0x99CD, 0, -0x907E,0x8958, 0, 0, 0,0x897D,0x99CF, 0, -0x99D0, 0, 0,0x8CB5, 0, 0,0x99D1, 0, - 0, 0, 0,0x8B8E, 0, 0, 0, 0, - 0, 0,0x8E51,0x99D2, 0, 0, 0, 0, -0x9694,0x8DB3,0x8B79,0x9746,0x916F,0x94BD,0x8EFB, 0, - 0, 0, 0, 0,0x8F66, 0,0x8EE6,0x8EF3, - 0,0x8F96, 0,0x94BE, 0, 0, 0,0x99D5, - 0,0x8962,0x9170,0x8CFB,0x8CC3,0x8BE5, 0, 0, -0x99D9,0x9240,0x91FC,0x8BA9,0x8FA2,0x99DA,0x99D8,0x89C2, -0x91E4,0x8EB6,0x8E6A,0x8945, 0, 0,0x8A90,0x8D86, -0x8E69, 0,0x99DB, 0, 0, 0, 0, 0, - 0,0x99DC, 0,0x8B68,0x8A65, 0, 0, 0, -0x8D87,0x8B67,0x92DD,0x8944,0x93AF,0x96BC,0x8D40,0x9799, -0x9366,0x8CFC, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x8C4E, 0,0x99E5, 0,0x8BE1, -0x9669, 0, 0, 0, 0, 0,0x94DB, 0, - 0,0x99E4, 0,0x8ADC,0x99DF,0x99E0,0x99E2, 0, - 0, 0, 0, 0, 0, 0,0x99E3, 0, -0x8B7A,0x9081, 0,0x95AB,0x99E1,0x99DD,0x8CE1,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0, 0,0x9B6E, 0, -0x9B71, 0, 0,0x9B6F, 0,0x9B70, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8E71,0x9B72, 0, 0,0x8D45,0x9B73, 0,0x8E9A, -0x91B6, 0,0x9B74,0x9B75,0x8E79,0x8D46, 0,0x96D0, - 0, 0, 0,0x8B47,0x8CC7,0x9B76,0x8A77, 0, - 0,0x9B77, 0,0x91B7, 0, 0, 0, 0, -0x9B78,0x9BA1, 0,0x9B79, 0,0x9B7A, 0, 0, -0x9B7B, 0,0x9B7D, 0, 0, 0, 0, 0, -0x9B7E, 0, 0,0x9B80, 0,0x91EE, 0,0x8946, -0x8EE7,0x88C0, 0,0x9176,0x8AAE,0x8EB3, 0,0x8D47, - 0, 0, 0, 0, 0,0x9386, 0,0x8F40, -0x8AAF,0x9288,0x92E8,0x88B6,0x8B58,0x95F3, 0,0x8EC0, - 0, 0,0x8B71,0x90E9,0x8EBA,0x9747,0x9B81, 0, - 0, 0, 0, 0, 0, 0,0x8B7B, 0, -0x8DC9, 0, 0,0x8A51,0x8983,0x8FAA,0x89C6, 0, -0x9B82,0x9765, 0, 0, 0, 0, 0,0x8F68, - 0, 0,0x8EE2,0x9B83,0x8AF1,0x93D0,0x96A7,0x9B84, - 0,0x9B85, 0, 0,0x9578, 0, 0, 0, -0x9B87, 0,0x8AA6,0x8BF5,0x9B86, 0, 0, 0, - 0, 0, 0,0x8AB0, 0,0x9051,0x9B8B,0x8E40, - 0,0x89C7,0x9B8A, 0,0x9B88,0x9B8C,0x9B89,0x944A, -0x9ECB,0x9052, 0,0x9B8D, 0, 0,0x97BE, 0, -0x9B8E, 0, 0,0x9B90, 0,0x929E,0x9B8F, 0, -0x90A1, 0,0x8E9B, 0, 0, 0,0x91CE,0x8EF5, - 0,0x9595,0x90EA, 0,0x8ECB,0x9B91,0x8FAB,0x9B92, -0x9B93,0x88D1,0x91B8,0x9071, 0,0x9B94,0x93B1,0x8FAC, - 0,0x8FAD, 0,0x9B95, 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x9C4C,0x9C4A, 0,0x9C4B,0x9C4D, 0,0x8984,0x92EC, -0x9C4E, 0,0x8C9A,0x89F4,0x9455, 0,0x9C4F,0x93F9, - 0,0x95D9, 0,0x9C50,0x984D, 0, 0, 0, - 0,0x9C51,0x95BE,0x9C54,0x989F,0x98AF, 0,0x8EAE, -0x93F3,0x9C55, 0,0x8B7C,0x92A2,0x88F8,0x9C56,0x95A4, -0x8D4F, 0, 0,0x926F, 0, 0, 0,0x92ED, - 0, 0, 0, 0, 0,0x96ED,0x8CB7,0x8CCA, - 0,0x9C57, 0, 0, 0,0x9C58, 0,0x9C5E, - 0,0x8EE3, 0, 0, 0,0x92A3, 0,0x8BAD, -0x9C59, 0, 0, 0,0x954A, 0,0x9265, 0, - 0,0x9C5A, 0, 0, 0, 0, 0, 0, -0x9C5B, 0,0x8BAE, 0,0x9C5C, 0,0x9C5D, 0, - 0,0x9C5F, 0,0x9396, 0, 0,0x9C60,0x9C61, - 0,0x9C62, 0, 0,0x9C53,0x9C52, 0, 0, - 0,0x9C63,0x8C60, 0, 0, 0,0x9546, 0, - 0,0x8DCA,0x9556,0x92A4,0x956A,0x9C64, 0, 0, -0x8FB2,0x8965, 0,0x9C65, 0, 0, 0,0x9C66, - 0,0x96F0, 0, 0,0x94DE, 0, 0,0x9C69, -0x899D,0x90AA,0x9C68,0x9C67,0x8C61,0x91D2, 0,0x9C6D, -0x9C6B, 0,0x9C6A,0x97A5,0x8CE3, 0, 0, 0, -0x8F99,0x9C6C,0x936B,0x8F5D, 0, 0, 0,0x93BE, -0x9C70,0x9C6F, 0, 0, 0, 0,0x9C6E, 0, -0x9C71,0x8CE4, 0, 0, 0, 0, 0, 0, -0x9C72,0x959C,0x8F7A, 0, 0,0x9C73,0x94F7, 0, - 0, 0, 0,0x93BF,0x92A5, 0, 0, 0, - 0,0x934F, 0, 0,0x9C74,0x8B4A, 0, 0, - 0, 0, 0,0x9053, 0,0x954B, 0, 0, - 0, 0, 0, 0,0x8AF5,0x9445, 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8B5A, 0,0x9D4F,0x9D56,0x8FB4, 0, 0, 0, - 0,0x9D50,0x9463, 0, 0, 0, 0, 0, - 0,0x977D,0x9D52,0x9D53,0x9D57,0x938A,0x9D54,0x8D52, -0x90DC, 0, 0,0x9D65,0x94B2, 0,0x91F0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x94E2,0x9DAB, 0, 0, 0, - 0,0x95F8, 0, 0, 0,0x92EF, 0, 0, - 0,0x9695, 0,0x9D5A,0x899F,0x928A, 0, 0, - 0, 0,0x9D63, 0, 0,0x9253,0x9D5D,0x9D64, -0x9D5F,0x9D66,0x9D62, 0,0x9D61,0x948F, 0,0x9D5B, -0x89FB,0x9D59,0x8B91,0x91F1,0x9D55, 0, 0,0x9D58, -0x8D53,0x90D9, 0,0x8FB5,0x9D60,0x9471, 0, 0, -0x8B92,0x8A67, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x8A87,0x9040,0x9D68,0x9D6D, - 0,0x9D69, 0,0x8C9D, 0,0x9D6E,0x8E41,0x8D89, - 0, 0, 0, 0, 0, 0,0x8F45,0x9D5C, - 0,0x8E9D,0x9D6B, 0, 0, 0, 0,0x8E77, -0x9D6C,0x88C2, 0, 0,0x9D67, 0, 0, 0, - 0,0x92A7, 0, 0, 0, 0, 0, 0, - 0,0x8B93, 0, 0, 0, 0, 0,0x8BB2, - 0, 0, 0, 0, 0, 0, 0,0x9D6A, -0x88A5, 0, 0,0x8DC1, 0, 0, 0,0x9055, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x92F0, 0, 0,0x94D2,0x9D70,0x917D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x91A8, 0, 0,0x8E4A,0x9D71, 0,0x9D73, -0x9D6F, 0, 0, 0, 0,0x95DF, 0,0x92BB, - 0, 0, 0, 0,0x917B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x95F9, -0x8ECC,0x9D80, 0,0x9D7E, 0, 0,0x9098, 0, -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9E53,0x9E56, -0x9E55, 0,0x8AF7, 0, 0,0x8B80, 0,0x9E52, - 0,0x9E54, 0, 0, 0, 0,0x9E57, 0, - 0,0x9099, 0, 0, 0, 0,0x979B,0x88C7, -0x8DDE,0x91BA, 0,0x8EDB, 0, 0,0x8FF1, 0, - 0,0x9E5A, 0, 0,0x936D, 0,0x9E58,0x91A9, -0x9E59,0x8FF0,0x96DB,0x9E5B,0x9E5C,0x9788, 0, 0, - 0, 0,0x9E61, 0, 0,0x8D59, 0,0x9474, -0x9E5E,0x938C,0x9DDC,0x9DE0, 0,0x8B6E, 0,0x9466, - 0, 0, 0, 0,0x9E60, 0,0x8FBC,0x94C2, - 0, 0, 0, 0, 0,0x9E66, 0,0x94F8, - 0,0x9E5D, 0,0x9E63,0x9E62, 0, 0, 0, -0x90CD, 0, 0, 0, 0,0x968D, 0,0x97D1, - 0, 0,0x9687, 0,0x89CA,0x8E7D, 0, 0, -0x9867,0x9E65,0x9095, 0, 0, 0,0x9E64, 0, - 0,0x9E5F, 0, 0, 0, 0, 0,0x8CCD, - 0, 0, 0,0x9E6B,0x9E69, 0,0x89CB,0x9E67, -0x9E6D,0x9E73, 0, 0, 0, 0, 0, 0, - 0,0x91C6, 0, 0,0x95BF, 0,0x9E75, 0, - 0, 0,0x9541, 0, 0, 0,0x9E74,0x9490, -0x965E,0x8AB9, 0,0x90F5,0x8F5F, 0, 0, 0, -0x92D1, 0,0x974D, 0, 0,0x9E70,0x9E6F, 0, - 0, 0,0x9E71, 0,0x9E6E, 0, 0,0x9E76, - 0,0x9E6C, 0, 0,0x9E6A, 0,0x9E72,0x9E68, - 0,0x928C, 0,0x96F6,0x8EC4,0x8DF2, 0, 0, - 0, 0, 0,0x8DB8, 0, 0,0x968F,0x8A60, - 0, 0,0x92CC,0x93C8,0x8968, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x90F0, 0, 0,0x90B2,0x8C49, - 0, 0, 0, 0, 0, 0,0x9E78, 0,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,0x9FEF, 0,0x9FE9,0x96C5, 0, 0, - 0,0x9FE4, 0,0x8EA0,0x9FFC, 0, 0, 0, - 0,0x8A8A, 0,0x9FE6,0x9FEB,0x9FEC, 0, 0, - 0, 0, 0, 0, 0,0x91EA,0x91D8, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x9FF4, 0, 0,0x9FFA, - 0, 0,0x9FF8, 0,0x9348, 0, 0,0xE042, -0x9FF5, 0, 0, 0, 0, 0,0x9FF6,0x9FDE, - 0,0x8B99,0x9559, 0, 0, 0,0x8EBD, 0, - 0,0x8D97, 0, 0, 0, 0, 0,0x9852, - 0,0x9FF2, 0,0xE041,0x8989,0x9186, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x9499, 0,0x8ABF,0x97F8, 0, 0, 0, 0, - 0, 0, 0,0x969F,0x92D0, 0, 0, 0, - 0,0x9FF9,0x9FFB, 0, 0, 0, 0, 0, -0x9151, 0, 0, 0, 0, 0,0xE040,0x9FF7, - 0,0x9FF1, 0, 0, 0,0x8AC1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x8C89, 0, 0, 0, -0xE04E, 0, 0,0xE049,0x90F6, 0, 0,0x8A83, - 0, 0, 0, 0,0x8F81, 0,0xE052, 0, - 0, 0, 0, 0, 0,0xE04B,0x92AA,0xE048, -0x92D7, 0, 0, 0,0xE06B, 0, 0, 0, -0xE045, 0,0xE044, 0,0xE04D, 0, 0, 0, -0xE047,0xE046,0xE04C, 0,0x909F, 0,0xE043, 0, - 0, 0, 0, 0, 0, 0,0xE04F, 0, - 0,0xE050, 0, 0, 0, 0, 0,0x8AC0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE055, 0,0xE054,0xE056, 0, 0, 0, - 0, 0,0xE059, 0, 0, 0, 0, 0, - 0,0x9362, 0,0xE053, 0, 0, 0, 0, - 0,0xE057, 0, 0, 0, 0, 0, 0, -0x8C83,0x91F7,0xE051,0x945A, 0, 0,0xE058, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE05D,0xE05B, 0, 0, -0xE05E, 0, 0,0xE061, 0, 0, 0,0xE05A, -0x8D8A,0x9447, 0, 0,0x9FB7, 0, 0, 0, - 0, 0, 0,0x9794,0xE05C, 0,0xE060,0x91F3, - 0,0xE05F, 0,0xE04A, 0, 0,0xE889, 0, - 0, 0,0xE064, 0, 0, 0,0xE068, 0, - 0,0xE066, 0, 0, 0, 0, 0, 0, - 0,0xE062, 0,0xE063, 0, 0, 0,0xE067, - 0,0xE065, 0, 0, 0,0x956D, 0, 0, -0xE06D, 0,0xE06A,0xE069, 0,0xE06C,0x93D2,0xE06E, - 0, 0, 0, 0, 0, 0,0x9295,0x91EB, - 0, 0, 0, 0,0x90A3, 0, 0, 0, -0xE06F, 0,0xE071, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE070, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x9FF3, 0, 0, 0, - 0,0xE072, 0, 0, 0, 0, 0, 0, -0x93E5, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE073, 0, 0, 0, 0, - 0, 0, 0,0x89CE, 0, 0, 0,0x9394, -0x8A44, 0, 0, 0, 0, 0, 0, 0, -0x8B84, 0, 0, 0,0x8EDC,0x8DD0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9846,0x9086, 0, 0, 0,0x898A, 0, - 0, 0,0xE075, 0, 0, 0, 0, 0, - 0,0xE074, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE078,0x9259,0xE07B,0xE076, - 0, 0, 0,0xE07A, 0, 0, 0, 0, -0xE079,0x935F,0x88D7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x97F3, 0, 0,0xE07D, 0, 0, 0,0x8947, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE080, 0, 0, 0,0xE07E, 0,0xE07C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE077, 0, 0, 0, 0, 0, 0, - 0,0x9642, 0, 0, 0,0xE082, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE081, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x898B, 0, 0, 0, - 0,0xE084,0x95B0, 0,0xE083, 0, 0, 0, - 0,0x96B3, 0, 0, 0, 0,0x8FC5, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x9152, 0, - 0, 0, 0, 0,0x8FC4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x97F9, 0, 0,0xE08A, 0,0x90F7, 0, - 0, 0, 0, 0, 0,0xE086,0xE08B, 0, - 0,0x898C, 0, 0, 0, 0, 0, 0, - 0, 0,0xE089, 0,0x9481,0xE085,0xE088,0x8FC6, - 0,0x94CF, 0, 0,0xE08C, 0,0x8ECF, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x90F8, 0, 0, - 0, 0, 0, 0,0xE08F, 0, 0, 0, -0xE087, 0,0x8C46, 0, 0, 0, 0,0xE08D, - 0, 0, 0, 0,0x976F,0xE090, 0, 0, - 0,0xEAA4, 0, 0, 0, 0, 0,0x8F6E, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE091, 0, 0, 0,0xE092, 0, 0, 0, - 0,0x944D, 0, 0, 0, 0, 0, 0, - 0,0xE094, 0, 0, 0, 0,0xE095, 0, - 0, 0, 0,0x9452, 0, 0, 0, 0, -0x9395,0xE097, 0, 0, 0, 0,0xE099, 0, -0x97D3, 0,0xE096, 0,0xE098,0x898D, 0,0xE093, - 0, 0, 0, 0, 0, 0, 0,0x9A7A, -0xE09A, 0, 0, 0, 0,0x9187,0x8E57,0xE09C, - 0, 0, 0, 0,0xE09B,0x9043,0x99D7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 0,0x9572,0xE149, -0xE148, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE14B,0xE14A,0xE14C, 0, 0, - 0, 0, 0, 0,0xE14D,0xE14F,0xE14E, 0, - 0,0x8D99, 0,0xE151, 0,0xE150, 0, 0, -0x8AC3, 0,0x9072, 0,0x935B, 0,0xE152,0x90B6, - 0, 0, 0,0x8E59, 0,0x8999,0xE153, 0, -0x9770, 0, 0,0x95E1,0xE154, 0, 0, 0, -0x9363,0x9752,0x8D62,0x905C, 0, 0, 0,0x926A, -0x99B2, 0,0x92AC,0x89E6,0xE155, 0, 0, 0, - 0, 0, 0, 0,0xE156, 0,0xE15B, 0, - 0,0xE159,0xE158,0x9DC0,0x8A45,0xE157, 0,0x88D8, - 0,0x94A8, 0, 0,0x94C8, 0, 0, 0, - 0,0x97AF,0xE15C,0xE15A,0x927B,0x90A4, 0, 0, -0x94A9, 0,0x954C, 0,0xE15E,0x97AA,0x8C6C,0xE15F, - 0,0xE15D,0x94D4,0xE160, 0,0xE161, 0, 0, -0x88D9, 0, 0,0x8FF4,0xE166, 0,0xE163,0x93EB, -0xE162, 0, 0, 0, 0, 0, 0,0x8B45, - 0, 0,0xE169, 0, 0, 0,0xE164,0xE165, - 0,0xE168,0xE167,0x9544, 0, 0,0x9161,0x9160, - 0,0x8B5E, 0, 0,0xE16A, 0, 0, 0, - 0, 0,0xE16B, 0, 0,0xE16C, 0, 0, - 0, 0, 0,0xE16E, 0,0xE16D, 0, 0, - 0, 0, 0,0x8975, 0, 0, 0, 0, - 0,0xE176,0x94E6,0xE170, 0,0xE172, 0, 0, -0xE174,0x905D, 0, 0,0xE175,0xE173,0x8EBE, 0, - 0, 0,0xE16F,0xE171, 0,0x9561, 0,0x8FC7, - 0, 0,0xE178, 0, 0,0xE177, 0, 0, - 0, 0,0xE179, 0,0x8EA4,0x8DAD, 0, 0, -0x9397,0xE17A, 0,0x92C9, 0, 0,0xE17C, 0, - 0, 0,0x979F,0xE17B, 0, 0, 0, 0, - 0,0x9189, 0, 0, 0, 0, 0, 0, -0xE182, 0,0xE184,0xE185,0x9273, 0, 0, 0, - 0, 0,0xE183, 0,0xE180, 0,0xE17D,0xE17E, - 0,0xE181, 0, 0, 0, 0, 0, 0, - 0,0xE188, 0,0xE186, 0,0xE187, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE189, -0xE18B,0xE18C,0xE18D, 0,0xE18E, 0, 0,0xE18A, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE190, 0, 0, 0,0xE18F, 0, 0, 0, - 0, 0, 0,0xE191, 0, 0, 0, 0, - 0, 0,0x97C3, 0, 0, 0,0xE194,0xE192, -0xE193, 0, 0, 0,0x8AE0, 0, 0, 0, - 0, 0,0x96FC, 0, 0, 0,0x95C8, 0, -0xE196, 0, 0, 0,0xE195, 0, 0, 0, - 0,0xE197,0xE198, 0, 0, 0, 0,0xE19C, -0xE199,0xE19A,0xE19B, 0,0xE19D, 0, 0, 0, -0xE19E, 0,0xE19F, 0, 0, 0,0xE1A0, 0, -0xE1A1, 0,0x94AD,0x936F,0xE1A2,0x9492,0x9553, 0, -0xE1A3, 0, 0,0xE1A4,0x9349, 0,0x8A46,0x8D63, -0xE1A5, 0, 0,0xE1A6, 0, 0,0xE1A7, 0, -0x8E48, 0, 0,0xE1A9, 0, 0,0xE1A8, 0, - 0,0xE1AA,0xE1AB, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x94E7, 0, -0xE1AC, 0, 0, 0,0xE1AD, 0, 0,0xEA89, -0xE1AE,0xE1AF,0xE1B0, 0, 0, 0, 0,0x8E4D, - 0, 0,0xE1B1,0x9475, 0, 0,0x967E, 0, -0x896D, 0,0x8976, 0, 0,0xE1B2, 0, 0, - 0, 0,0xE1B4, 0, 0, 0,0xE1B3,0x9390, - 0, 0, 0,0x90B7,0x9F58, 0,0xE1B5,0x96BF, - 0,0xE1B6,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 0, 0, 0, 0,0xE240, -0x9681, 0, 0, 0,0xE1FC, 0, 0,0x88E9, - 0, 0, 0, 0,0xE243, 0, 0, 0, - 0, 0, 0, 0, 0,0xE242, 0, 0, - 0,0x8FCA, 0, 0, 0, 0, 0,0xE244, - 0, 0, 0, 0, 0, 0,0x9162, 0, - 0,0xE246,0xE245, 0, 0, 0, 0, 0, - 0,0xE247, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE1E6, 0, - 0, 0,0xE1E8,0xE249,0xE248, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x8EA6, 0,0x97E7, 0,0x8ED0, 0, -0xE24A,0x8C56, 0, 0, 0, 0, 0,0x8B5F, -0x8B46,0x8E83, 0, 0, 0, 0, 0, 0, -0x9753, 0, 0,0xE250, 0,0xE24F,0x9163,0xE24C, - 0, 0,0xE24E, 0, 0,0x8F6A,0x905F,0xE24D, -0xE24B, 0,0x9449, 0, 0,0x8FCB, 0, 0, -0x955B, 0, 0, 0, 0,0x8DD5, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x9398, - 0, 0,0xE251, 0, 0, 0, 0,0xE252, -0xE268,0x8BD6, 0, 0,0x985C,0x9154, 0, 0, - 0, 0,0xE253, 0, 0,0x89D0,0x92F5,0x959F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xE254, 0, 0, - 0, 0, 0, 0, 0, 0,0x8B9A,0xE255, - 0, 0,0xE257, 0, 0, 0,0xE258, 0, -0x9448, 0, 0,0xE259, 0, 0, 0, 0, - 0,0xE25A,0xE25B, 0, 0,0x8BD7,0x89D1,0x93C3, -0x8F47,0x8E84, 0, 0, 0, 0, 0, 0, - 0,0xE25C, 0,0x8F48, 0, 0, 0, 0, - 0,0x89C8,0x9562, 0, 0,0xE25D, 0, 0, -0x94E9, 0, 0, 0, 0, 0, 0,0x9164, - 0,0xE260, 0,0xE261,0x9489, 0,0x9060,0xE25E, - 0,0x9281, 0, 0,0xE25F, 0, 0, 0, -0x8FCC, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x88DA, 0, 0, 0, 0, -0x8B48, 0, 0, 0, 0, 0, 0, 0, -0xE262, 0, 0,0x92F6, 0,0xE263,0x90C5, 0, - 0, 0, 0, 0,0x96AB, 0, 0,0x9542, -0xE264,0xE265,0x9274, 0,0x97C5, 0, 0,0xE267, -0xE266, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x8EED, 0, - 0,0xE269,0x88EE, 0, 0, 0, 0,0xE26C, - 0, 0, 0,0xE26A,0x89D2,0x8C6D,0xE26B,0x8D65, -0x8D92, 0,0x95E4,0xE26D, 0, 0,0x9673, 0, - 0,0xE26F, 0, 0, 0,0x90CF,0x896E,0x89B8, -0x88AA, 0, 0, 0, 0, 0, 0,0xE26E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE270,0xE271,0x8FF5, 0, 0, 0, 0, - 0,0xE272, 0,0x8A6E, 0, 0, 0, 0, -0xE274, 0, 0, 0,0x8C8A, 0,0x8B86, 0, - 0,0xE275,0x8BF3, 0, 0,0xE276, 0,0x90FA, - 0,0x93CB, 0,0x90DE,0x8DF3, 0, 0, 0, -0xE277, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x9282,0x918B, 0,0xE279,0xE27B,0xE278, -0xE27A, 0, 0, 0, 0, 0, 0,0x8C41, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE27C,0x8C45, 0, 0, 0,0x8B87,0x9771, -0xE27E, 0, 0, 0, 0, 0,0xE280, 0, - 0, 0,0x894D, 0, 0, 0, 0,0xE283, - 0, 0, 0,0x8A96,0xE282,0xE281, 0,0xE285, -0xE27D, 0,0xE286,0x97A7, 0,0xE287, 0,0xE288, - 0, 0,0x9AF2,0xE28A, 0,0xE289, 0, 0, - 0,0xE28B,0xE28C, 0,0x97B3,0xE28D, 0,0xE8ED, -0x8FCD,0xE28E,0xE28F,0x8F76, 0,0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,0xE2F0, 0, 0, - 0, 0,0x8CD0, 0, 0, 0,0x9157, 0, - 0, 0,0xE2F3, 0, 0, 0,0x939C, 0, -0xE2F2, 0, 0, 0,0xE2F4, 0,0x95B3,0x918C, -0x8D66, 0,0xE2F5, 0, 0, 0, 0,0x97C6, - 0, 0, 0, 0, 0, 0, 0,0xE2F7, - 0, 0,0xE2F8, 0,0xE2F9, 0,0xE2FA, 0, -0x8E85, 0,0xE2FB,0x8C6E, 0, 0,0x8B8A, 0, -0x8B49, 0,0xE340, 0,0x96F1,0x8D67,0xE2FC, 0, - 0, 0,0xE343,0x96E4, 0,0x945B, 0, 0, -0x9552, 0, 0, 0,0x8F83,0xE342, 0,0x8ED1, -0x8D68,0x8E86,0x8B89,0x95B4,0xE341, 0, 0, 0, -0x9166,0x9661,0x8DF5, 0, 0, 0, 0, 0, - 0, 0, 0,0x8E87,0x92DB, 0,0xE346,0x97DD, -0x8DD7, 0,0xE347,0x9061, 0,0xE349, 0, 0, - 0,0x8FD0,0x8DAE, 0, 0, 0, 0,0xE348, - 0, 0,0x8F49,0x8CBC,0x9167,0xE344,0xE34A, 0, - 0, 0, 0,0xE345,0x8C6F, 0,0xE34D,0xE351, -0x8C8B, 0, 0, 0, 0, 0,0xE34C, 0, - 0, 0, 0,0xE355, 0, 0,0x8D69, 0, - 0,0x978D,0x88BA,0xE352, 0, 0,0x8B8B, 0, -0xE34F, 0, 0, 0, 0, 0,0xE350, 0, - 0,0x939D,0xE34E,0xE34B, 0,0x8A47,0x90E2, 0, - 0,0x8CA6, 0, 0, 0,0xE357, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE354, 0, 0, 0, 0, 0,0xE356, - 0, 0, 0,0xE353, 0, 0, 0, 0, - 0,0x8C70,0x91B1,0xE358,0x918E, 0, 0,0xE365, - 0, 0,0xE361,0xE35B, 0, 0, 0, 0, - 0, 0, 0,0xE35F,0x8EF8,0x88DB,0xE35A,0xE362, -0xE366,0x8D6A,0x96D4, 0,0x92D4,0xE35C, 0, 0, -0xE364, 0,0xE359,0x925D, 0,0xE35E,0x88BB,0x96C8, - 0, 0, 0, 0, 0, 0, 0,0xE35D, - 0, 0,0x8BD9,0x94EA, 0, 0, 0,0x918D, - 0,0x97CE,0x8F8F, 0, 0,0xE38E, 0, 0, -0xE367, 0,0x90FC, 0,0xE363,0xE368,0xE36A, 0, -0x92F7,0xE36D, 0, 0,0xE369, 0, 0, 0, -0x95D2,0x8AC9, 0, 0,0x96C9, 0, 0,0x88DC, - 0, 0,0xE36C, 0,0x97FB, 0, 0, 0, - 0, 0, 0,0xE36B, 0, 0, 0, 0, - 0,0x898F, 0, 0,0x93EA,0xE36E, 0, 0, - 0,0xE375,0xE36F,0xE376, 0, 0, 0, 0, - 0, 0,0xE372, 0, 0, 0, 0, 0, - 0, 0, 0,0x949B, 0, 0,0x8EC8,0xE374, - 0,0xE371,0xE377,0xE370, 0, 0,0x8F63, 0, - 0, 0, 0,0x9644, 0, 0,0x8F6B, 0, - 0,0xE373,0xE380, 0, 0,0xE37B, 0,0xE37E, - 0,0xE37C,0xE381,0xE37A, 0,0xE360,0x90D1, 0, - 0,0x94C9, 0,0xE37D, 0, 0,0xE378, 0, - 0, 0,0x9140,0x8C71, 0,0x8F4A, 0, 0, - 0, 0, 0, 0,0x9044,0x9155,0xE384, 0, - 0,0xE386,0xE387, 0, 0,0xE383,0xE385, 0, - 0, 0, 0, 0, 0, 0,0xE379,0xE382, - 0,0xE38A,0xE389, 0, 0,0x969A, 0, 0, -0x8C4A, 0, 0, 0, 0, 0, 0, 0, - 0,0xE388, 0,0xE38C,0xE38B,0xE38F, 0,0xE391, - 0, 0,0x8E5B,0xE38D, 0, 0, 0, 0, -0xE392,0xE393, 0, 0,0xE394, 0,0xE39A,0x935A, -0xE396, 0,0xE395,0xE397,0xE398, 0,0xE399, 0, - 0, 0, 0,0xE39B,0xE39C, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0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 0,0xE3ED,0xE3EB, 0,0x8D6D, - 0,0x8D6E,0x88E7, 0,0x8DE6, 0, 0, 0, - 0, 0,0x9478, 0, 0, 0, 0, 0, - 0, 0, 0,0x88DD,0xE3F2, 0,0x925F, 0, - 0, 0, 0, 0,0x9477, 0,0x91D9, 0, - 0, 0, 0, 0, 0, 0,0xE3F4, 0, - 0,0xE3F0,0xE3F3,0xE3EE, 0,0xE3F1,0x9645, 0, - 0,0x8CD3, 0, 0,0x88FB,0xE3EF, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE3F6, - 0,0xE3F7, 0, 0,0x93B7, 0, 0, 0, -0x8BB9, 0, 0, 0,0xE445,0x945C, 0, 0, - 0, 0,0x8E89, 0, 0,0x8BBA,0x90C6,0x9865, -0x96AC,0xE3F5,0x90D2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x8B72,0xE3F8, 0, 0, 0, 0, - 0, 0, 0,0xE3FA, 0, 0, 0, 0, - 0,0xE3F9, 0, 0, 0, 0, 0,0xE3FB, - 0,0x9245, 0,0x945D, 0, 0, 0, 0, - 0,0x92AF, 0, 0, 0, 0,0xE442, 0, - 0, 0, 0, 0, 0, 0,0xE441, 0, - 0, 0, 0,0xE3FC, 0, 0,0x9074, 0, -0x9585,0xE444, 0,0xE443,0x8D6F,0x9872, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE454, - 0, 0, 0, 0, 0,0xE448,0xE449, 0, - 0, 0, 0,0x8EEE, 0, 0,0xE447, 0, -0x8D98,0xE446, 0, 0,0xE44A, 0, 0, 0, -0x92B0,0x95A0,0x9142, 0, 0, 0, 0,0x91DA, -0xE44E, 0,0xE44F,0xE44B, 0, 0, 0, 0, -0xE44C, 0,0xE44D, 0, 0, 0, 0,0x8D70, - 0, 0, 0,0xE455, 0,0xE451, 0, 0, - 0, 0,0x9586, 0,0x968C,0x9547, 0, 0, -0xE450, 0, 0,0xE453,0xE452, 0, 0, 0, -0x9663,0xE456, 0, 0, 0, 0, 0, 0, -0xE457, 0, 0,0x9156, 0,0xE458, 0, 0, -0xE45A, 0,0xE45E, 0, 0,0xE45B,0xE459,0x945E, -0xE45C, 0,0xE45D, 0, 0, 0,0x89B0, 0, -0xE464,0xE45F, 0, 0, 0,0xE460, 0, 0, - 0,0xE461, 0,0x919F, 0, 0, 0, 0, -0xE463,0xE462,0xE465, 0, 0, 0, 0,0xE466, -0xE467, 0, 0,0x9062, 0,0x89E7, 0,0xE468, -0x97D5, 0,0x8EA9, 0, 0,0x8F4C, 0, 0, - 0, 0, 0,0x8E8A,0x9276, 0, 0, 0, - 0, 0,0xE469,0xE46A,0x8950, 0,0xE46B, 0, - 0,0xE46C,0xE46D, 0, 0,0xE46E, 0,0xE46F, -0x8BBB,0x9DA8,0xE470, 0,0x90E3,0xE471,0x8EC9, 0, -0xE472, 0,0x98AE, 0, 0, 0,0xE473,0x95DC, -0x8ADA, 0, 0,0x9143,0x8F77, 0,0x9591,0x8F4D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE474,0x8D71,0xE475,0x94CA, 0,0xE484, 0, - 0, 0, 0,0xE477, 0,0x91C7,0x9495,0x8CBD, -0xE476,0x9144, 0, 0, 0, 0, 0, 0, -0xE478, 0, 0, 0, 0, 0, 0,0x92F8, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE47A,0xE479,0xE47C, 0, 0,0xE47B, 0,0xE47D, - 0, 0,0xE480, 0,0xE47E, 0,0x8ACD, 0, -0xE481, 0,0xE482,0xE483, 0, 0,0x8DAF,0x97C7, - 0,0xE485,0x9046, 0, 0, 0,0x8990,0xE486, -0xE487, 0, 0, 0, 0, 0,0xE488, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x88F0, 0,0xE489, 0, 0, - 0, 0,0xE48A, 0, 0, 0, 0, 0, - 0,0x9587, 0, 0, 0,0x8EC5, 0,0xE48C, - 0, 0, 0, 0, 0,0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54B, 0, 0,0x8992, - 0,0x93E3, 0,0xE54C,0xE54F, 0, 0, 0, - 0, 0, 0, 0,0xE545, 0,0x9145, 0, -0xE549,0x8E46,0x9064,0x8C4F,0x96F2, 0,0x96F7,0x8F92, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xE556,0xE554, 0, 0, 0, 0, 0, - 0,0x986D, 0, 0, 0, 0, 0, 0, - 0,0xE553, 0, 0, 0,0x9795, 0,0xE555, -0xE557, 0, 0, 0, 0,0xE558, 0, 0, - 0, 0, 0, 0,0xE55B,0xE559, 0, 0, - 0, 0, 0, 0,0x93A1,0xE55A, 0, 0, - 0,0x94CB,0xE54D, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x8F93, - 0,0xE55C,0xE561,0x9194, 0, 0,0xE560, 0, - 0, 0,0xE541, 0, 0, 0,0xE562,0x9168, - 0, 0,0xE55D,0xE55F, 0, 0, 0, 0, - 0, 0, 0,0xE55E, 0, 0,0x9F50,0x9F41, - 0, 0,0xE564, 0, 0, 0, 0, 0, - 0, 0,0xE563, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x9796, 0,0xE1BA, -0xE565, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE566, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xE567,0x8CD5, 0, -0x8B73, 0, 0, 0,0xE569,0x997C, 0, 0, - 0, 0,0x8B95, 0,0x97B8, 0,0x8BF1,0xE56A, - 0, 0, 0, 0, 0, 0, 0,0xE56B, - 0, 0, 0,0x928E, 0, 0, 0, 0, - 0,0xE56C, 0, 0, 0, 0, 0, 0, - 0,0x93F8, 0,0x88B8, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x89E1,0xE571,0xE572, 0, 0, 0, - 0, 0, 0,0xE56D, 0,0x8E5C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE56E,0x9461, 0, 0, 0, - 0,0xE56F,0xE570,0xE57A, 0, 0, 0,0xE574, -0xE577, 0, 0, 0, 0, 0,0xE573, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE575, 0,0xE576,0x8ED6, - 0,0xE578, 0,0x9260, 0,0x8C75,0x8A61, 0, - 0, 0, 0, 0,0xE57B, 0, 0, 0, - 0,0x8A5E, 0,0xE581, 0, 0,0xE57C,0xE580, - 0, 0, 0, 0,0x94B8, 0, 0, 0, - 0,0xE57D, 0, 0,0xE57E,0x9567,0x94D8,0xE582, - 0, 0, 0, 0, 0, 0, 0, 0, -0x91FB,0xE58C, 0,0xE588, 0, 0,0x89E9, 0, -0xE586, 0,0x9649,0xE587, 0, 0,0xE584, 0, -0xE585,0xE58A,0xE58D, 0, 0,0xE58B, 0, 0, - 0,0xE589,0xE583, 0, 0, 0, 0, 0, -0x9277, 0,0xE594, 0,0x96A8, 0, 0, 0, - 0, 0, 0, 0, 0,0xE592, 0, 0, - 0,0xE593, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE58E, 0, 0,0xE590, - 0, 0, 0,0xE591, 0, 0, 0,0xE58F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x90E4, 0,0x9858,0xE598, 0,0xE599, 0, - 0, 0, 0,0xE59F, 0,0x9049, 0,0xE59B, - 0,0xE59E, 0, 0, 0, 0, 0,0xE596, -0xE595, 0, 0,0xE5A0, 0, 0,0x89DA, 0, -0xE59C, 0,0xE5A1, 0, 0, 0,0xE59D, 0, - 0, 0, 0, 0,0xE59A, 0,0x92B1, 0, -0xE597, 0, 0, 0, 0, 0, 0,0x9488, - 0, 0,0xE5A5, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x975A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0xE5A4, - 0, 0,0xE5A3, 0, 0, 0, 0, 0, - 0, 0, 0,0xE5AC, 0, 0, 0,0xE5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-0xE64C, 0,0x8A6F, 0, 0, 0, 0, 0, - 0,0xE64D, 0, 0, 0, 0,0xE64F,0x9797, - 0,0xE64E,0x9065, 0,0xE650, 0, 0,0xE651, - 0, 0,0xE652,0x8ACF, 0, 0, 0, 0, - 0, 0,0xE653, 0, 0,0xE654, 0,0xE655, -0xE656, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x8A70, 0, 0, 0, 0, 0, - 0, 0,0xE657, 0,0xE658,0xE659, 0, 0, - 0, 0, 0,0x89F0, 0, 0,0x9047,0xE65A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE65B, 0, 0, 0, -0xE65C, 0, 0, 0, 0, 0, 0, 0, -0x8CBE, 0,0x92F9,0xE65D, 0, 0, 0, 0, -0x8C76, 0,0x9075, 0,0xE660, 0,0x93A2, 0, -0xE65F, 0, 0,0x8C50, 0, 0,0xE65E,0x91F5, -0x8B4C, 0, 0,0xE661, 0,0xE662, 0,0x8FD7, - 0, 0, 0,0x8C8D, 0,0xE663, 0, 0, - 0, 0,0x964B, 0, 0,0x90DD, 0, 0, - 0,0x8B96, 0,0x96F3,0x9169, 0,0xE664, 0, - 0, 0,0x9066,0x9290,0x8FD8, 0, 0, 0, - 0,0xE665, 0, 0, 0, 0,0xE668, 0, -0xE669, 0, 0, 0, 0, 0, 0, 0, -0x8DBC,0x91C0,0xE667, 0,0x8FD9,0x955D, 0, 0, - 0, 0, 0,0xE666, 0, 0,0x8E8C, 0, -0x8972, 0,0xE66D,0x8C77, 0, 0,0x8E8E, 0, - 0,0x8E8D, 0,0x986C,0xE66C,0xE66B,0x9146, 0, -0x8B6C,0x9862,0x8A59,0x8FDA, 0, 0, 0, 0, - 0, 0, 0, 0,0xE66A, 0, 0, 0, - 0, 0,0xE66F, 0,0xE670,0xE66E, 0,0x8CD6, - 0,0x975F, 0, 0,0x8E8F,0x9446, 0, 0, - 0,0xE673, 0,0x90BE, 0,0x9261, 0, 0, -0x9755, 0,0xE676, 0, 0, 0,0x8CEA, 0, -0x90BD,0xE672, 0,0xE677,0x8CEB,0xE674,0xE675, 0, -0xE671, 0, 0, 0,0x90E0,0x93C7, 0, 0, -0x924E, 0,0x89DB, 0, 0, 0, 0, 0, - 0,0x94EE, 0, 0,0x8B62, 0, 0,0x92B2, - 0, 0,0xE67A, 0,0xE678, 0, 0,0x926B, - 0, 0, 0,0x90BF,0x8AD0,0xE679, 0,0x907A, - 0, 0,0x97C8, 0, 0, 0,0x985F, 0, - 0, 0,0xE67B,0xE687,0x92B3, 0,0xE686, 0, -0xE683,0xE68B,0xE684, 0,0xE680, 0,0x92FA,0xE67E, - 0, 0, 0,0xE67C, 0,0x9740,0x8E90, 0, - 0,0xE681, 0,0xE67D, 0, 0, 0,0xE685, -0x8F94, 0,0x8CBF, 0, 0, 0,0x91F8, 0, -0x9664,0x8979,0x88E0, 0,0x93A3, 0, 0,0xE689, - 0, 0, 0, 0,0xE688, 0,0x93E4, 0, -0xE68D, 0, 0, 0,0xE682, 0,0xE68C,0xE68E, - 0,0x8CAA,0xE68A,0x8D75, 0,0x8ED3, 0, 0, -0xE68F,0x9777, 0, 0, 0, 0,0xE692, 0, -0xE695, 0, 0,0xE693,0x9554, 0, 0, 0, - 0, 0, 0,0xE690, 0, 0, 0, 0, - 0,0x8BDE, 0, 0, 0, 0,0xE694, 0, - 0,0xE696, 0, 0, 0, 0, 0, 0, - 0,0xE69A, 0, 0,0xE697, 0,0xE699,0xE698, - 0, 0, 0, 0, 0, 0,0xE69B, 0, -0x8EAF, 0,0xE69D,0xE69C,0x9588, 0, 0,0xE69F, - 0, 0, 0, 0, 0, 0,0x8C78, 0, - 0, 0, 0,0xE69E,0xE6A0, 0, 0,0xE6A1, -0x8B63,0xE3BF,0x8FF7, 0,0xE6A2, 0, 0,0x8CEC, - 0, 0, 0, 0, 0,0xE6A3, 0, 0, -0xE6A4, 0, 0,0x8E5D, 0, 0, 0, 0, - 0, 0,0x9DCC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0xE759, 0, 0, 0, 0, 0, 0, - 0, 0,0xE758,0x9067,0xE75A, 0, 0,0x8BEB, -0xE75B,0xE75D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE75E, 0, - 0, 0, 0, 0, 0,0xE75F,0xE75C, 0, -0xE760, 0,0x8ED4,0xE761,0x8B4F,0x8C52, 0, 0, - 0, 0,0x8CAC, 0, 0, 0, 0, 0, - 0, 0, 0,0xE762, 0, 0, 0,0x93EE, - 0, 0,0x935D,0xE763, 0, 0, 0, 0, - 0, 0, 0,0xE766, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x8EB2, 0, 0,0xE765,0xE764,0x8C79,0xE767, 0, - 0, 0, 0,0x8A72, 0,0xE769, 0, 0, - 0,0x8DDA,0xE768, 0,0xE771, 0, 0, 0, - 0, 0,0xE76B,0xE76D,0x95E3,0xE76A, 0, 0, - 0,0xE76C, 0,0xE770,0xE76E,0x8B50, 0,0xE76F, - 0, 0, 0, 0, 0, 0,0xE772, 0, - 0,0x9479,0x97D6, 0, 0, 0, 0,0x8F53, - 0, 0, 0,0xE773, 0, 0, 0, 0, -0x9741,0xE775, 0,0xE774, 0, 0,0xE778,0x9760, - 0, 0,0xE777, 0,0x8A8D,0xE776,0xE77B, 0, - 0,0xE77A, 0, 0,0xE779,0x9351,0xE77C, 0, - 0, 0, 0, 0, 0, 0, 0,0xE77D, - 0, 0, 0, 0,0xE77E, 0, 0,0x8D8C, - 0,0x8C44,0xE780,0xE781,0xE782, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x9068,0xE783, 0,0x8EAB,0xE784, - 0, 0, 0,0xE785, 0, 0, 0,0x999F, -0x999E, 0, 0, 0, 0,0xE786,0xE390,0xE787, -0x9243,0x904A,0x945F, 0, 0, 0, 0,0xE788, - 0, 0,0x95D3,0x92D2,0x8D9E, 0, 0,0x9248, - 0, 0,0x8949, 0,0x9698,0x9076, 0, 0, - 0, 0, 0, 0, 0, 0,0x8C7D, 0, - 0,0x8BDF, 0, 0,0x95D4, 0, 0, 0, - 0, 0,0xE789, 0, 0, 0, 0, 0, - 0, 0,0xE78B, 0, 0,0xE78A,0x89DE, 0, - 0,0x93F4,0xE78C,0x9497, 0,0x9352, 0,0xE78D, -0x8F71, 0, 0, 0,0xE78F, 0, 0,0x96C0, -0xE79E,0xE791,0xE792, 0, 0,0x92C7, 0, 0, -0x91DE,0x9197, 0,0x93A6, 0,0xE790,0x8B74, 0, - 0, 0, 0,0xE799, 0,0xE796,0xE7A3,0x93A7, -0x9280,0xE793, 0,0x92FC,0x9372,0xE794,0xE798,0x9080, - 0,0x9487,0x92CA, 0, 0,0x90C0,0xE797,0x91AC, -0x91A2,0xE795,0x88A7,0x9841, 0, 0, 0,0xE79A, - 0, 0, 0, 0, 0, 0,0x91DF, 0, - 0,0x8F54,0x9069, 0, 0,0xE79C,0xE79B, 0, -0x88ED,0xE79D, 0, 0,0x954E, 0,0xE7A5, 0, - 0,0x93D9,0x908B, 0, 0,0x9278, 0,0x8BF6, - 0,0xE7A4,0x9756,0x895E, 0,0x95D5,0x89DF,0xE79F, -0xE7A0,0xE7A1,0xE7A2,0x93B9,0x9242,0x88E1,0xE7A6, 0, -0xE7A7,0xEAA1, 0, 0,0x91BB, 0,0xE7A8, 0, -0x8993,0x916B, 0,0x8CAD, 0,0x9779, 0, 0, -0xE7A9,0x934B, 0, 0, 0,0x9198,0x8ED5,0xE7AA, - 0, 0,0xE7AD, 0, 0,0x8F85,0xE7AB,0x914A, -0x9149, 0,0x88E2, 0,0x97C9,0xE7AF, 0,0x94F0, -0xE7B1,0xE7B0,0xE7AE,0xE284,0x8AD2, 0, 0,0xE78E, - 0,0xE7B3,0xE7B2, 0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0, 0, 0, 0, 0,0x8A5A, - 0, 0, 0, 0,0xE84D,0xE84E,0x92C1, 0, -0xE84C, 0, 0, 0, 0, 0, 0, 0, - 0,0xE850, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE856, 0, 0, 0, 0, -0xE859, 0, 0, 0, 0, 0, 0, 0, -0xE858,0x934C, 0, 0, 0, 0,0xE851,0xE852, -0xE855, 0, 0, 0, 0,0xE857, 0, 0, - 0,0x8BBE, 0, 0,0xE85A,0xE854, 0, 0, -0xE853, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE85E, 0, 0, 0,0xE85F, - 0, 0, 0, 0, 0, 0, 0, 0, -0xE860, 0, 0,0xE85D,0xE85C, 0, 0, 0, -0x8FE0,0x93A8,0xE85B, 0, 0, 0, 0, 0, - 0,0xE864, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xE862, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xE863,0xE861, 0, -0x91F6, 0,0xE865, 0, 0, 0, 0, 0, - 0,0xE866, 0, 0,0xE868, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x8AD3,0xE867,0x96F8, 0, 0, 0, 0, - 0, 0,0xE873,0xE869, 0, 0,0xE86C, 0, -0xE86A, 0,0xE86B, 0, 0, 0, 0, 0, - 0, 0,0xE86D, 0, 0, 0, 0, 0, -0xE86F, 0, 0, 0, 0,0xE870, 0,0xE871, - 0, 0, 0, 0,0xE874,0xE872,0xE875,0xE877, - 0,0xE876}; - -/* page 6 0x9577-0x9FA0 */ -static uint16 tab_uni_sjis6[]={ -0x92B7, 0, 0, 0, 0, 0, 0, 0, - 0,0x96E5, 0,0xE878,0x914D, 0, 0, 0, -0xE879, 0,0x95C2,0xE87A,0x8A4A, 0, 0, 0, -0x895B, 0,0x8AD5, 0,0x8AD4,0xE87B, 0,0xE87C, - 0,0xE87D,0xE87E, 0, 0, 0, 0, 0, - 0,0xE880, 0,0x8AD6,0x8A74,0x8D7D,0x94B4, 0, -0xE882,0xE881, 0, 0, 0, 0,0xE883, 0, - 0, 0, 0,0x897B, 0, 0, 0, 0, - 0, 0,0xE886, 0,0xE885,0xE884, 0,0xE887, - 0, 0, 0, 0,0xE88A, 0, 0, 0, -0x88C5, 0, 0,0xE888, 0,0xE88C,0xE88B, 0, - 0, 0, 0, 0, 0,0xE88E,0xE88D,0xE88F, - 0,0x93AC, 0, 0, 0,0xE890, 0, 0, - 0, 0,0xE891,0xE893, 0, 0,0xE892, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x958C, 0, 0, - 0, 0,0xE894, 0, 0, 0, 0, 0, - 0,0xE895, 0,0x8DE3, 0, 0, 0,0xE896, -0xE897, 0, 0,0x9668, 0, 0, 0, 0, - 0, 0, 0, 0,0x916A, 0, 0, 0, -0x88A2,0x91C9, 0,0xE898, 0,0x958D, 0, 0, - 0, 0, 0, 0,0xE89B,0xE899,0x8D7E, 0, -0xE89A,0x8CC0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x95C3,0xE89D,0xE89F,0xE89E, -0xE8A0, 0, 0,0x8940,0x9077,0x8F9C,0x8AD7,0xE8A1, - 0, 0, 0,0x9486, 0,0xE8A3, 0, 0, - 0,0x8941, 0,0xE8A2,0x92C2, 0,0x97CB,0x93A9, -0xE89C,0x97A4, 0,0x8CAF, 0, 0,0x977A, 0, - 0, 0, 0, 0, 0, 0,0x8BF7,0x97B2, - 0,0x8C47, 0,0x91E0,0xE440, 0,0xE8A4,0x8A4B, -0x908F, 0, 0, 0, 0,0x8A75,0xE8A6, 0, -0xE8A7,0xE8A5,0x8C84, 0,0x8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xE942,0xE941, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x9597, 0,0xE943, 0, 0, 0, 0, -0xE944, 0,0xE945, 0, 0, 0, 0,0xE946, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0xE948,0xE947, 0,0xE949, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x94F2,0xE3CA, 0, 0, -0x9048, 0, 0,0x8B51, 0, 0, 0, 0, - 0, 0,0xE94A, 0,0xE94B, 0,0x99AA,0x9F5A, -0x94D1, 0, 0,0x88F9, 0,0x88B9, 0, 0, - 0, 0, 0, 0, 0,0x8E94,0x964F,0x8FFC, - 0, 0, 0, 0,0xE94C, 0,0x96DD, 0, - 0, 0,0xE94D,0x977B, 0,0x8961, 0, 0, - 0,0x8E60, 0,0xE94E,0x89EC,0xE94F, 0, 0, - 0,0xE950, 0, 0, 0, 0,0xE952,0xE953, - 0,0xE955,0xE951, 0, 0,0xE954, 0, 0, - 0,0x8AD9, 0, 0, 0,0xE956, 0,0xE957, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE958,0xE959, - 0, 0, 0,0xE95A, 0, 0,0xE95C, 0, - 0, 0,0xE95B, 0,0xE95E,0xE961, 0, 0, - 0,0xE95D,0xE95F,0xE960, 0, 0,0xE962, 0, -0x8BC0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x8EF1, -0xE963,0xE964,0x8D81, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE965, 0, - 0,0x8A5D, 0, 0, 0,0x946E,0xE966,0xE967, - 0, 0, 0, 0,0x9279,0x93E9, 0, 0, - 0, 0, 0, 0, 0,0xE968, 0, 0, - 0, 0,0x949D, 0, 0,0x91CA,0x8977,0x8BEC, - 0,0x8BED, 0, 0, 0, 0, 0, 0, - 0,0x9293,0xE96D,0x8BEE, 0, 0,0x89ED, 0, - 0,0xE96C, 0, 0,0xE96A, 0,0xE96B, 0, -0xE969, 0, 0,0xE977, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0xE96E,0xE96F, - 0, 0,0xE970,0xE971, 0, 0, 0, 0, - 0,0xE973, 0, 0,0xE972, 0, 0, 0, -0x8F78, 0,0xE974, 0, 0, 0,0xE976, 0, - 0, 0, 0, 0, 0, 0, 0,0x8B52, -0xE975, 0, 0,0x919B,0x8CB1, 0, 0, 0, - 0, 0,0xE978, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x91CB, 0, 0,0xE979, 0, 0, 0, - 0,0x93AB, 0, 0, 0, 0, 0, 0, -0xE97A, 0, 0, 0, 0, 0, 0,0xE980, - 0,0xE97D, 0,0xE97C,0xE97E, 0,0xE97B, 0, - 0, 0, 0, 0, 0, 0,0xE982, 0, - 0, 0, 0, 0, 0, 0,0xE981, 0, -0xE984, 0, 0,0x8BC1,0xE983, 0, 0, 0, -0xE985, 0, 0,0xE986, 0,0xE988,0xE987, 0, - 0, 0,0xE989,0xE98B,0xE98A, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,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9, 0, 0, - 0, 0, 0, 0, 0,0xEA73,0x8B6F,0xEA74, -0xEA75,0xEA76, 0,0x8D95, 0,0xEA77, 0, 0, - 0,0xE0D2,0x96D9, 0,0x91E1,0xEA78,0xEA7A,0xEA79, - 0,0xEA7B, 0, 0, 0, 0,0xEA7C, 0, - 0,0xEA7D, 0, 0, 0, 0, 0, 0, -0xEA7E, 0, 0, 0, 0,0xEA80, 0,0xEA81, -0xEA82, 0,0xEA83, 0,0xEA84,0xEA85,0xEA86, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xEA87,0xEA88, 0, 0, 0, 0, 0,0x9343, - 0, 0, 0, 0,0x8CDB, 0,0xEA8A, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x916C,0xEA8B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0xEA8C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x9540, 0, 0,0xEA8D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0xEA8E,0xE256, 0, 0,0xE6D8, -0xE8EB, 0, 0,0xEA8F, 0,0xEA90, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0xEA92,0xEA93,0xEA94,0x97EE,0xEA91, 0, 0,0xEA95, -0xEA96, 0, 0,0xEA98, 0,0xEA97, 0, 0, - 0, 0, 0,0xEA9A, 0, 0, 0,0xEA9B, -0xEA99, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x97B4, 0, - 0, 0, 0, 0, 0, 0,0xEA9C, 0, - 0, 0, 0, 0, 0,0xEA9D,0xE273, 0, - 0,0xEA9E}; - -/* page 7 0xFF01-0xFFE5 */ -static uint16 tab_uni_sjis7[]={ -0x8149, 0,0x8194,0x8190,0x8193,0x8195, 0,0x8169, -0x816A,0x8196,0x817B,0x8143, 0,0x8144,0x815E,0x824F, -0x8250,0x8251,0x8252,0x8253,0x8254,0x8255,0x8256,0x8257, -0x8258,0x8146,0x8147,0x8183,0x8181,0x8184,0x8148,0x8197, -0x8260,0x8261,0x8262,0x8263,0x8264,0x8265,0x8266,0x8267, -0x8268,0x8269,0x826A,0x826B,0x826C,0x826D,0x826E,0x826F, -0x8270,0x8271,0x8272,0x8273,0x8274,0x8275,0x8276,0x8277, -0x8278,0x8279,0x816D, 0,0x816E,0x814F,0x8151,0x814D, -0x8281,0x8282,0x8283,0x8284,0x8285,0x8286,0x8287,0x8288, -0x8289,0x828A,0x828B,0x828C,0x828D,0x828E,0x828F,0x8290, -0x8291,0x8292,0x8293,0x8294,0x8295,0x8296,0x8297,0x8298, -0x8299,0x829A,0x816F,0x8162,0x8170, 0, 0, 0, -0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8, -0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0, -0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8, -0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0, -0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8, -0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0, -0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8, -0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x8150, 0,0x818F}; - -static int func_uni_sjis_onechar(int code){ - if ((code>=0x005C)&&(code<=0x00F7)) - return(tab_uni_sjis0[code-0x005C]); - if ((code>=0x0391)&&(code<=0x0451)) - return(tab_uni_sjis1[code-0x0391]); - if ((code>=0x2010)&&(code<=0x2312)) - return(tab_uni_sjis2[code-0x2010]); - if ((code>=0x2500)&&(code<=0x266F)) - return(tab_uni_sjis3[code-0x2500]); - if ((code>=0x3000)&&(code<=0x30FE)) - return(tab_uni_sjis4[code-0x3000]); - if ((code>=0x4E00)&&(code<=0x9481)) - return(tab_uni_sjis5[code-0x4E00]); - if ((code>=0x9577)&&(code<=0x9FA0)) - return(tab_uni_sjis6[code-0x9577]); - if ((code>=0xFF01)&&(code<=0xFFE5)) - return(tab_uni_sjis7[code-0xFF01]); - return(0); -} - - -static int -my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, uchar *e) -{ - int code; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((int) wc < 0x80) - { - if (wc == 0x5c) - { - code= 0x815f; - goto mb; - } - s[0]= (uchar) wc; - return 1; - } - - if (!(code=func_uni_sjis_onechar(wc))) - return MY_CS_ILUNI; - - if (code>=0xA1 && code <= 0xDF) - { - s[0]= code; - return 1; - } - -mb: - if (s+2>e) - return MY_CS_TOOSMALL2; - - s[0]=code>>8; - s[1]=code&0xFF; - return 2; -} - - -static int -my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc, const uchar *s, const uchar *e){ - int hi; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((hi= s[0]) < 0x80) - { - pwc[0]=hi; - return 1; - } - - if (hi >= 0xA1 && hi <= 0xDF) - { - pwc[0]= func_sjis_uni_onechar(hi); - return 1; - } - - if (s+2>e) - return MY_CS_TOOSMALL2; - - if (!(pwc[0]=func_sjis_uni_onechar((hi<<8)+s[1]))) - return -2; - - return 2; -} - -static -size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), - const char *str, const char *str_end) -{ - size_t clen; - const uchar *b= (const uchar *) str; - const uchar *e= (const uchar *) str_end; - - for (clen= 0; b < e; ) - { - if (*b >= 0xA1 && *b <= 0xDF) - { - clen++; - b++; - } - else if (*b > 0x7F) - { - clen+= 2; - b+= 2; - } - else - { - clen++; - b++; - } - } - return clen; -} - -/* - Returns a well formed length of a SJIS string. - CP932 additional characters are also accepted. -*/ -static -size_t my_well_formed_len_sjis(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, - size_t pos, int *error) -{ - const char *b0= b; - *error= 0; - while (pos-- && b < e) - { - if ((uchar) b[0] < 128) - { - /* Single byte ascii character */ - b++; - } - else if (issjishead((uchar)*b) && (e-b)>1 && issjistail((uchar)b[1])) - { - /* Double byte character */ - b+= 2; - } - else if (((uchar)*b) >= 0xA1 && ((uchar)*b) <= 0xDF) - { - /* Half width kana */ - b++; - } - else - { - /* Wrong byte sequence */ - *error= 1; - break; - } - } - return (size_t) (b - b0); -} - - -static MY_COLLATION_HANDLER my_collation_ci_handler = -{ - NULL, /* init */ - my_strnncoll_sjis, - my_strnncollsp_sjis, - my_strnxfrm_mb, - my_strnxfrmlen_simple, - my_like_range_sjis, - my_wildcmp_mb, /* wildcmp */ - my_strcasecmp_8bit, - my_instr_mb, - my_hash_sort_simple, - my_propagate_simple -}; - - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - ismbchar_sjis, - mbcharlen_sjis, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_sjis, - my_lengthsp_8bit, - my_numcells_sjis, - my_mb_wc_sjis, /* mb_wc */ - my_wc_mb_sjis, /* wc_mb */ - my_mb_ctype_mb, - my_caseup_str_8bit, - my_casedn_str_8bit, - my_caseup_8bit, - my_casedn_8bit, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - -CHARSET_INFO my_charset_sjis_japanese_ci= -{ - 13,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_NONASCII, /* state */ - "sjis", /* cs name */ - "sjis_japanese_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_sjis, - to_lower_sjis, - to_upper_sjis, - sort_order_sjis, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 1, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_ci_handler -}; - -CHARSET_INFO my_charset_sjis_bin= -{ - 88,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NONASCII, /* state */ - "sjis", /* cs name */ - "sjis_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_sjis, - to_lower_sjis, - to_upper_sjis, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 1, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_mb_bin_handler -}; - -#endif diff --git a/externals/mysql/strings/ctype-tis620.c b/externals/mysql/strings/ctype-tis620.c deleted file mode 100644 index a151053dda..0000000000 --- a/externals/mysql/strings/ctype-tis620.c +++ /dev/null @@ -1,977 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Copyright (C) 2003 by Sathit Jittanupat - - * solving bug crash with long text field string - * sorting with different number of space or sign char. within string - - Copyright (C) 2001 by Korakot Chaovavanich and - Apisilp Trunganont - Copyright (C) 1998, 1999 by Pruet Boonma - Copyright (C) 1998 by Theppitak Karoonboonyanan - Copyright (C) 1989, 1991 by Samphan Raruenrom - - Permission to use, copy, modify, distribute and sell this software - and its documentation for any purpose is hereby granted without fee, - provided that the above copyright notice appear in all copies. - Samphan Raruenrom , Theppitak Karoonboonyanan , Pruet Boonma , - Korakot Chaovavanich and Apisilp Trunganont makes no representations - about the suitability of this software for any purpose. It is provided - "as is" without express or implied warranty. -*/ - - -/* - This file is basicly tis620 character sets with some extra functions - for tis-620 handling -*/ - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. strxfrm_multiply_tis620=4 - */ - -#include -#include -#include "m_string.h" -#include "m_ctype.h" -#include "t_ctype.h" - -#ifdef HAVE_CHARSET_tis620 - -#define BUFFER_MULTIPLY 4 -#define M L_MIDDLE -#define U L_UPPER -#define L L_LOWER -#define UU L_UPRUPR -#define X L_MIDDLE - - -static int t_ctype[][TOT_LEVELS] = { - /*0x00*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x01*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x02*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x03*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x04*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x05*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x06*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x07*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x08*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x09*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x0A*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x0B*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x0C*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x0D*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x0E*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x0F*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x10*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x11*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x12*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x13*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x14*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x15*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x16*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x17*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x18*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x19*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x1A*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x1B*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x1C*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x1D*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x1E*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x1F*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x20*/ { IGNORE, IGNORE, L3_SPACE, IGNORE, M}, - /*0x21*/ { IGNORE, IGNORE, L3_EXCLAMATION, IGNORE, M }, - /*0x22*/ { IGNORE, IGNORE, L3_QUOTATION, IGNORE, M }, - /*0x23*/ { IGNORE, IGNORE, L3_NUMBER, IGNORE, M }, - /*0x24*/ { IGNORE, IGNORE, L3_DOLLAR, IGNORE, M }, - /*0x25*/ { IGNORE, IGNORE, L3_PERCENT, IGNORE, M }, - /*0x26*/ { IGNORE, IGNORE, L3_AMPERSAND, IGNORE, M }, - /*0x27*/ { IGNORE, IGNORE, L3_APOSTROPHE, IGNORE, M }, - /*0x28*/ { IGNORE, IGNORE, L3_L_PARANTHESIS, IGNORE, M }, - /*0x29*/ { IGNORE, IGNORE, L3_R_PARENTHESIS, IGNORE, M }, - /*0x2A*/ { IGNORE, IGNORE, L3_ASTERISK, IGNORE, M }, - /*0x2B*/ { IGNORE, IGNORE, L3_PLUS, IGNORE, M }, - /*0x2C*/ { IGNORE, IGNORE, L3_COMMA, IGNORE, M }, - /*0x2D*/ { IGNORE, IGNORE, L3_HYPHEN, IGNORE, M }, - /*0x2E*/ { IGNORE, IGNORE, L3_FULL_STOP, IGNORE, M }, - /*0x2F*/ { IGNORE, IGNORE, L3_SOLIDUS, IGNORE, M }, - /*0x30*/ { L1_08, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x31*/ { L1_18, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x32*/ { L1_28, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x33*/ { L1_38, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x34*/ { L1_48, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x35*/ { L1_58, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x36*/ { L1_68, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x37*/ { L1_78, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x38*/ { L1_88, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x39*/ { L1_98, L2_BLANK, L3_BLANK, L4_BLANK, M }, - /*0x3A*/ { IGNORE, IGNORE, L3_COLON, IGNORE, M }, - /*0x3B*/ { IGNORE, IGNORE, L3_SEMICOLON, IGNORE, M }, - /*0x3C*/ { IGNORE, IGNORE, L3_LESS_THAN, IGNORE, M }, - /*0x3D*/ { IGNORE, IGNORE, L3_EQUAL, IGNORE, M }, - /*0x3E*/ { IGNORE, IGNORE, L3_GREATER_THAN, IGNORE, M }, - /*0x3F*/ { IGNORE, IGNORE, L3_QUESTION, IGNORE, M }, - /*0x40*/ { IGNORE, IGNORE, L3_AT, IGNORE, M }, - /*0x41*/ { L1_A8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x42*/ { L1_B8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x43*/ { L1_C8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x44*/ { L1_D8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x45*/ { L1_E8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x46*/ { L1_F8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x47*/ { L1_G8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x48*/ { L1_H8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x49*/ { L1_I8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x4A*/ { L1_J8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x4B*/ { L1_K8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x4C*/ { L1_L8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x4D*/ { L1_M8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x4E*/ { L1_N8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x4F*/ { L1_O8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x50*/ { L1_P8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x51*/ { L1_Q8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x52*/ { L1_R8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x53*/ { L1_S8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x54*/ { L1_T8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x55*/ { L1_U8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x56*/ { L1_V8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x57*/ { L1_W8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x58*/ { L1_X8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x59*/ { L1_Y8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x5A*/ { L1_Z8, L2_BLANK, L3_BLANK, L4_CAP, M }, - /*0x5B*/ { IGNORE, IGNORE, L3_L_BRACKET, IGNORE, M }, - /*0x5C*/ { IGNORE, IGNORE, L3_BK_SOLIDUS, IGNORE, M }, - /*0x5D*/ { IGNORE, IGNORE, L3_R_BRACKET, IGNORE, M }, - /*0x5E*/ { IGNORE, IGNORE, L3_CIRCUMFLEX, IGNORE, M }, - /*0x5F*/ { IGNORE, IGNORE, L3_LOW_LINE, IGNORE, M }, - /*0x60*/ { IGNORE, IGNORE, L3_GRAVE, IGNORE, M }, - /*0x61*/ { L1_A8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x62*/ { L1_B8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x63*/ { L1_C8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x64*/ { L1_D8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x65*/ { L1_E8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x66*/ { L1_F8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x67*/ { L1_G8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x68*/ { L1_H8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x69*/ { L1_I8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x6A*/ { L1_J8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x6B*/ { L1_K8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x6C*/ { L1_L8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x6D*/ { L1_M8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x6E*/ { L1_N8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x6F*/ { L1_O8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x70*/ { L1_P8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x71*/ { L1_Q8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x72*/ { L1_R8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x73*/ { L1_S8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x74*/ { L1_T8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x75*/ { L1_U8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x76*/ { L1_V8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x77*/ { L1_W8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x78*/ { L1_X8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x79*/ { L1_Y8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x7A*/ { L1_Z8, L2_BLANK, L3_BLANK, L4_MIN, M }, - /*0x7B*/ { IGNORE, IGNORE, L3_L_BRACE, IGNORE, M }, - /*0x7C*/ { IGNORE, IGNORE, L3_V_LINE, IGNORE, M }, - /*0x7D*/ { IGNORE, IGNORE, L3_R_BRACE, IGNORE, M }, - /*0x7E*/ { IGNORE, IGNORE, L3_TILDE, IGNORE, M }, - /*0x7F*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x80*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x81*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x82*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x83*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x84*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x85*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x86*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x87*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x88*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x89*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x8A*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x8B*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x8C*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x8D*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x8E*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x8F*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x90*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x91*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x92*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x93*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x94*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x95*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x96*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x97*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x98*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x99*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x9A*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x9B*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x9C*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x9D*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x9E*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0x9F*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0xA0*/ { IGNORE, IGNORE, L3_NB_SACE, IGNORE, X }, - /*0xA1*/ { L1_KO_KAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xA2*/ { L1_KHO_KHAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xA3*/ { L1_KHO_KHUAT, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xA4*/ { L1_KHO_KHWAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xA5*/ { L1_KHO_KHON, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xA6*/ { L1_KHO_RAKHANG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xA7*/ { L1_NGO_NGU, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xA8*/ { L1_CHO_CHAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xA9*/ { L1_CHO_CHING, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xAA*/ { L1_CHO_CHANG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xAB*/ { L1_SO_SO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xAC*/ { L1_CHO_CHOE, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xAD*/ { L1_YO_YING, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xAE*/ { L1_DO_CHADA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xAF*/ { L1_TO_PATAK, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB0*/ { L1_THO_THAN, L2_BLANK,L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB1*/ { L1_THO_NANGMONTHO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB2*/ { L1_THO_PHUTHAO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB3*/ { L1_NO_NEN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB4*/ { L1_DO_DEK, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB5*/ { L1_TO_TAO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB6*/ { L1_THO_THUNG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB7*/ { L1_THO_THAHAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB8*/ { L1_THO_THONG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xB9*/ { L1_NO_NU, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xBA*/ { L1_BO_BAIMAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xBB*/ { L1_PO_PLA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xBC*/ { L1_PHO_PHUNG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xBD*/ { L1_FO_FA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xBE*/ { L1_PHO_PHAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xBF*/ { L1_FO_FAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC0*/ { L1_PHO_SAMPHAO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC1*/ { L1_MO_MA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC2*/ { L1_YO_YAK, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC3*/ { L1_RO_RUA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC4*/ { L1_RU, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC5*/ { L1_LO_LING, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC6*/ { L1_LU, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC7*/ { L1_WO_WAEN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC8*/ { L1_SO_SALA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xC9*/ { L1_SO_RUSI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xCA*/ { L1_SO_SUA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xCB*/ { L1_HO_HIP, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xCC*/ { L1_LO_CHULA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xCD*/ { L1_O_ANG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xCE*/ { L1_HO_NOKHUK, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt}, - /*0xCF*/ { IGNORE, IGNORE, L3_PAIYAN_NOI, IGNORE, M}, - /*0xD0*/ { L1_SARA_A, L2_BLANK, L3_BLANK, L4_BLANK, M | _fllwvowel}, - /*0xD1*/ { L1_MAI_HAN_AKAT, L2_BLANK, L3_BLANK, L4_BLANK, U | _uprvowel}, - /*0xD2*/ { L1_SARA_AA, L2_BLANK, L3_BLANK, L4_BLANK, M | _fllwvowel}, - /*0xD3*/ { L1_SARA_AM, L2_BLANK, L3_BLANK, L4_BLANK, M | _fllwvowel}, - /*0xD4*/ { L1_SARA_I, L2_BLANK, L3_BLANK, L4_BLANK, U | _uprvowel}, - /*0xD5*/ { L1_SARA_II, L2_BLANK, L3_BLANK, L4_BLANK, U | _uprvowel}, - /*0xD6*/ { L1_SARA_UE, L2_BLANK, L3_BLANK, L4_BLANK, U | _uprvowel}, - /*0xD7*/ { L1_SARA_UEE, L2_BLANK, L3_BLANK, L4_BLANK, U | _uprvowel}, - /*0xD8*/ { L1_SARA_U, L2_BLANK, L3_BLANK, L4_BLANK, L | _lwrvowel}, - /*0xD9*/ { L1_SARA_UU, L2_BLANK, L3_BLANK, L4_BLANK, L | _lwrvowel}, - /*0xDA*/ { IGNORE, L2_PINTHU, L3_BLANK, L4_BLANK, L }, - /*0xDB*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0xDC*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0xDD*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0xDE*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0xDF*/ { IGNORE, IGNORE, L3_BAHT, IGNORE, M}, - /*0xE0*/ { L1_SARA_E, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel }, - /*0xE1*/ { L1_SARA_AE, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel }, - /*0xE2*/ { L1_SARA_O, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel }, - /*0xE3*/ { L1_SARA_AI_MAIMUAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel }, - /*0xE4*/ { L1_SARA_AI_MAIMALAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel }, - /*0xE5*/ { L1_SARA_AA, L2_BLANK, L3_BLANK, L4_EXT, M | _fllwvowel }, - /*0xE6*/ { IGNORE, IGNORE, L3_MAI_YAMOK, IGNORE, M | _stone }, - /*0xE7*/ { IGNORE, L2_TYKHU, L3_BLANK, L4_BLANK, U | _diacrt1 | _stone }, - /*0xE8*/ { IGNORE, L2_TONE1, L3_BLANK, L4_BLANK, UU | _tone | _combine | _stone }, - /*0xE9*/ { IGNORE, L2_TONE2, L3_BLANK, L4_BLANK, UU | _tone | _combine | _stone }, - /*0xEA*/ { IGNORE, L2_TONE3, L3_BLANK, L4_BLANK, UU | _tone | _combine | _stone }, - /*0xEB*/ { IGNORE, L2_TONE4, L3_BLANK, L4_BLANK, UU | _tone | _combine | _stone }, - /*0xEC*/ { IGNORE, L2_GARAN, L3_BLANK, L4_BLANK, UU | _diacrt2 | _combine | _stone }, - /*0xED*/ { L1_NKHIT, L2_BLANK, L3_BLANK, L4_BLANK, U | _diacrt1 }, - /*0xEE*/ { IGNORE, L2_YAMAK, L3_BLANK, L4_BLANK, U | _diacrt1 }, - /*0xEF*/ { IGNORE, IGNORE, L3_FONGMAN, IGNORE, M }, - /*0xF0*/ { L1_08, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xF1*/ { L1_18, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xF2*/ { L1_28, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xF3*/ { L1_38, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xF4*/ { L1_48, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xF5*/ { L1_58, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xF6*/ { L1_68, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xF7*/ { L1_78, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xF8*/ { L1_88, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xF9*/ { L1_98, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig }, - /*0xFA*/ { IGNORE, IGNORE, L3_ANGKHANKHU, IGNORE, X }, - /*0xFB*/ { IGNORE, IGNORE, L3_KHOMUT, IGNORE, X }, - /*0xFC*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0xFD*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /*0xFE*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, - /* Utilize 0xFF for max_sort_chr in my_like_range_tis620 */ - /*0xFF*/ { 255 /*IGNORE*/, IGNORE, IGNORE, IGNORE, X }, -}; - -static uchar NEAR ctype_tis620[257] = -{ - 0, /* For standard library */ - 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, - 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16, - 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16, - 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2, - 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,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 uchar NEAR to_lower_tis620[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '[', '\\', ']', '^', '_', - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR to_upper_tis620[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - -static uchar NEAR sort_order_tis620[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '\\', ']', '[', '^', '_', - 'E', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', 'Y', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', -}; - - -/* - Convert thai string to "Standard C String Function" sortable string - - SYNOPSIS - thai2sortable() - tstr String to convert. Does not have to end with \0 - len Length of tstr -*/ - -static size_t thai2sortable(uchar *tstr, size_t len) -{ - uchar *p; - int tlen; - uchar l2bias; - - tlen= len; - l2bias= 256 - 8; - for (p= tstr; tlen > 0; p++, tlen--) - { - uchar c= *p; - - if (isthai(c)) - { - int *t_ctype0= t_ctype[c]; - - if (isconsnt(c)) - l2bias -= 8; - if (isldvowel(c) && tlen != 1 && isconsnt(p[1])) - { - /* simply swap between leading-vowel and consonant */ - *p= p[1]; - p[1]= c; - tlen--; - p++; - continue; - } - - /* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */ - if (t_ctype0[1] >= L2_GARAN) - { - /* - l2bias use to control position weight of l2char - example (*=l2char) XX*X must come before X*XX - */ - memmove((char*) p, (char*) (p+1), tlen-1); - tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1; - p--; - continue; - } - } - else - { - l2bias-= 8; - *p= to_lower_tis620[c]; - } - } - return len; -} - - -/* - strncoll() replacement, compare 2 string, both are converted to sortable - string - - NOTE: - We can't cut strings at end \0 as this would break comparision with - LIKE characters, where the min range is stored as end \0 - - Arg: 2 Strings and it compare length - Ret: strcmp result -*/ - -static -int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)), - const uchar *s1, size_t len1, - const uchar *s2, size_t len2, - my_bool s2_is_prefix) -{ - uchar buf[80] ; - uchar *tc1, *tc2; - int i; - - if (s2_is_prefix && len1 > len2) - len1= len2; - - tc1= buf; - if ((len1 + len2 +2) > (int) sizeof(buf)) - tc1= (uchar*) my_str_malloc(len1+len2+2); - tc2= tc1 + len1+1; - memcpy((char*) tc1, (char*) s1, len1); - tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */ - memcpy((char *)tc2, (char *)s2, len2); - tc2[len2]= 0; /* put end of string */ - thai2sortable(tc1, len1); - thai2sortable(tc2, len2); - i= strcmp((char*)tc1, (char*)tc2); - if (tc1 != buf) - my_str_free(tc1); - return i; -} - - -static -int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), - const uchar *a0, size_t a_length, - const uchar *b0, size_t b_length, - my_bool diff_if_only_endspace_difference) -{ - uchar buf[80], *end, *a, *b, *alloced= NULL; - size_t length; - int res= 0; - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - a= buf; - if ((a_length + b_length +2) > (int) sizeof(buf)) - alloced= a= (uchar*) my_str_malloc(a_length+b_length+2); - - b= a + a_length+1; - memcpy((char*) a, (char*) a0, a_length); - a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */ - memcpy((char *)b, (char *)b0, b_length); - b[b_length]= 0; /* put end of string */ - a_length= thai2sortable(a, a_length); - b_length= thai2sortable(b, b_length); - - end= a + (length= min(a_length, b_length)); - while (a < end) - { - if (*a++ != *b++) - { - res= ((int) a[-1] - (int) b[-1]); - goto ret; - } - } - if (a_length != b_length) - { - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - /* - Check the next not space character of the longer key. If it's < ' ', - then it's smaller than the other key. - */ - if (a_length < b_length) - { - /* put shorter key in s */ - a_length= b_length; - a= b; - swap= -1; /* swap sign of result */ - res= -res; - } - for (end= a + a_length-length; a < end ; a++) - { - if (*a != ' ') - { - res= (*a < ' ') ? -swap : swap; - goto ret; - } - } - } - -ret: - - if (alloced) - my_str_free(alloced); - return res; -} - - -/* - strnxfrm replacment, convert Thai string to sortable string - - Arg: Destination buffer, source string, dest length and source length - Ret: Conveted string size -*/ - -static -size_t my_strnxfrm_tis620(CHARSET_INFO *cs, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - size_t len, dstlen0= dstlen; - len= (uint) (strmake((char*) dst, (char*) src, min(dstlen, srclen)) - - (char*) dst); - len= thai2sortable(dst, len); - set_if_smaller(dstlen, nweights); - set_if_smaller(len, dstlen); - len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen, - dstlen - len, flags, 0); - if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) - { - uint fill_length= dstlen0 - len; - cs->cset->fill(cs, (char*) dst + len, fill_length, cs->pad_char); - len= dstlen0; - } - return len; -} - - -static unsigned short cs_to_uni[256]={ -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0xFFFD,0x0E01,0x0E02,0x0E03,0x0E04,0x0E05,0x0E06,0x0E07, -0x0E08,0x0E09,0x0E0A,0x0E0B,0x0E0C,0x0E0D,0x0E0E,0x0E0F, -0x0E10,0x0E11,0x0E12,0x0E13,0x0E14,0x0E15,0x0E16,0x0E17, -0x0E18,0x0E19,0x0E1A,0x0E1B,0x0E1C,0x0E1D,0x0E1E,0x0E1F, -0x0E20,0x0E21,0x0E22,0x0E23,0x0E24,0x0E25,0x0E26,0x0E27, -0x0E28,0x0E29,0x0E2A,0x0E2B,0x0E2C,0x0E2D,0x0E2E,0x0E2F, -0x0E30,0x0E31,0x0E32,0x0E33,0x0E34,0x0E35,0x0E36,0x0E37, -0x0E38,0x0E39,0x0E3A,0xFFFD,0xFFFD,0xFFFD,0xFFFD,0x0E3F, -0x0E40,0x0E41,0x0E42,0x0E43,0x0E44,0x0E45,0x0E46,0x0E47, -0x0E48,0x0E49,0x0E4A,0x0E4B,0x0E4C,0x0E4D,0x0E4E,0x0E4F, -0x0E50,0x0E51,0x0E52,0x0E53,0x0E54,0x0E55,0x0E56,0x0E57, -0x0E58,0x0E59,0x0E5A,0x0E5B,0xFFFD,0xFFFD,0xFFFD,0xFFFD -}; -static uchar pl00[256]={ -0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, -0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, -0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, -0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; -static uchar pl0E[256]={ -0x0000,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, -0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, -0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, -0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, -0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, -0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, -0x00D8,0x00D9,0x00DA,0x0000,0x0000,0x0000,0x0000,0x00DF, -0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, -0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, -0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, -0x00F8,0x00F9,0x00FA,0x00FB,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; -static uchar plFF[256]={ -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x00FF,0x0000,0x0000 -}; -static uchar *uni_to_cs[256]={ -pl00,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,pl0E,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, -NULL,NULL,NULL,NULL,NULL,NULL,NULL,plFF -}; - - -static -int my_mb_wc_tis620(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *wc, - const uchar *str, - const uchar *end __attribute__((unused))) -{ - if (str >= end) - return MY_CS_TOOSMALL; - - *wc=cs_to_uni[*str]; - return (!wc[0] && str[0]) ? -1 : 1; -} - -static -int my_wc_mb_tis620(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, - uchar *str, - uchar *end __attribute__((unused))) -{ - uchar *pl; - - if (str >= end) - return MY_CS_TOOSMALL; - - pl= uni_to_cs[(wc>>8) & 0xFF]; - str[0]= pl ? pl[wc & 0xFF] : '\0'; - return (!str[0] && wc) ? MY_CS_ILUNI : 1; -} - - -static MY_COLLATION_HANDLER my_collation_ci_handler = -{ - NULL, /* init */ - my_strnncoll_tis620, - my_strnncollsp_tis620, - my_strnxfrm_tis620, - my_strnxfrmlen_simple, - my_like_range_simple, - my_wildcmp_8bit, /* wildcmp */ - my_strcasecmp_8bit, - my_instr_simple, /* QQ: To be fixed */ - my_hash_sort_simple, - my_propagate_simple -}; - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - NULL, /* ismbchar */ - my_mbcharlen_8bit, /* mbcharlen */ - my_numchars_8bit, - my_charpos_8bit, - my_well_formed_len_8bit, - my_lengthsp_8bit, - my_numcells_8bit, - my_mb_wc_tis620, /* mb_wc */ - my_wc_mb_tis620, /* wc_mb */ - my_mb_ctype_8bit, - my_caseup_str_8bit, - my_casedn_str_8bit, - my_caseup_8bit, - my_casedn_8bit, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - - -CHARSET_INFO my_charset_tis620_thai_ci= -{ - 18,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */ - "tis620", /* cs name */ - "tis620_thai_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_tis620, - to_lower_tis620, - to_upper_tis620, - sort_order_tis620, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 4, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_ci_handler -}; - -CHARSET_INFO my_charset_tis620_bin= -{ - 89,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT, /* state */ - "tis620", /* cs name */ - "tis620_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_tis620, - to_lower_tis620, - to_upper_tis620, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_8bit_bin_handler -}; - - -#endif diff --git a/externals/mysql/strings/ctype-uca.c b/externals/mysql/strings/ctype-uca.c deleted file mode 100644 index 48a43fa1ee..0000000000 --- a/externals/mysql/strings/ctype-uca.c +++ /dev/null @@ -1,11672 +0,0 @@ -/* Copyright (C) 2004 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* - UCA (Unicode Collation Algorithm) support. - Written by Alexander Barkov - - Currently supports only subset of the full UCA: - - Only Primary level key comparison - - Basic Latin letters contraction is implemented - - Variable weighting is done for Non-ignorable option - - Features that are not implemented yet: - - No Normalization From D is done - + No decomposition is done - + No Thai/Lao orderding is done - - No combining marks processing is done -*/ - - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_UCA_COLLATIONS - -#define MY_UCA_NPAGES 256 -#define MY_UCA_NCHARS 256 -#define MY_UCA_CMASK 255 -#define MY_UCA_PSHIFT 8 - -uint16 page000data[]= { /* 0000 (4 weights per char) */ -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0201,0x0000,0x0000,0x0000, -0x0202,0x0000,0x0000,0x0000, 0x0203,0x0000,0x0000,0x0000, -0x0204,0x0000,0x0000,0x0000, 0x0205,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000, 0x0251,0x0000,0x0000,0x0000, -0x027E,0x0000,0x0000,0x0000, 0x02D2,0x0000,0x0000,0x0000, -0x0E0F,0x0000,0x0000,0x0000, 0x02D3,0x0000,0x0000,0x0000, -0x02CF,0x0000,0x0000,0x0000, 0x0277,0x0000,0x0000,0x0000, -0x0288,0x0000,0x0000,0x0000, 0x0289,0x0000,0x0000,0x0000, -0x02C8,0x0000,0x0000,0x0000, 0x0428,0x0000,0x0000,0x0000, -0x022F,0x0000,0x0000,0x0000, 0x0221,0x0000,0x0000,0x0000, -0x025D,0x0000,0x0000,0x0000, 0x02CC,0x0000,0x0000,0x0000, -0x0E29,0x0000,0x0000,0x0000, 0x0E2A,0x0000,0x0000,0x0000, -0x0E2B,0x0000,0x0000,0x0000, 0x0E2C,0x0000,0x0000,0x0000, -0x0E2D,0x0000,0x0000,0x0000, 0x0E2E,0x0000,0x0000,0x0000, -0x0E2F,0x0000,0x0000,0x0000, 0x0E30,0x0000,0x0000,0x0000, -0x0E31,0x0000,0x0000,0x0000, 0x0E32,0x0000,0x0000,0x0000, -0x023D,0x0000,0x0000,0x0000, 0x023A,0x0000,0x0000,0x0000, -0x042C,0x0000,0x0000,0x0000, 0x042D,0x0000,0x0000,0x0000, -0x042E,0x0000,0x0000,0x0000, 0x0255,0x0000,0x0000,0x0000, -0x02C7,0x0000,0x0000,0x0000, 0x0E33,0x0000,0x0000,0x0000, -0x0E4A,0x0000,0x0000,0x0000, 0x0E60,0x0000,0x0000,0x0000, -0x0E6D,0x0000,0x0000,0x0000, 0x0E8B,0x0000,0x0000,0x0000, -0x0EB9,0x0000,0x0000,0x0000, 0x0EC1,0x0000,0x0000,0x0000, -0x0EE1,0x0000,0x0000,0x0000, 0x0EFB,0x0000,0x0000,0x0000, -0x0F10,0x0000,0x0000,0x0000, 0x0F21,0x0000,0x0000,0x0000, -0x0F2E,0x0000,0x0000,0x0000, 0x0F5B,0x0000,0x0000,0x0000, -0x0F64,0x0000,0x0000,0x0000, 0x0F82,0x0000,0x0000,0x0000, -0x0FA7,0x0000,0x0000,0x0000, 0x0FB4,0x0000,0x0000,0x0000, -0x0FC0,0x0000,0x0000,0x0000, 0x0FEA,0x0000,0x0000,0x0000, -0x1002,0x0000,0x0000,0x0000, 0x101F,0x0000,0x0000,0x0000, -0x1044,0x0000,0x0000,0x0000, 0x1051,0x0000,0x0000,0x0000, -0x105A,0x0000,0x0000,0x0000, 0x105E,0x0000,0x0000,0x0000, -0x106A,0x0000,0x0000,0x0000, 0x028A,0x0000,0x0000,0x0000, -0x02CE,0x0000,0x0000,0x0000, 0x028B,0x0000,0x0000,0x0000, -0x020F,0x0000,0x0000,0x0000, 0x021B,0x0000,0x0000,0x0000, -0x020C,0x0000,0x0000,0x0000, 0x0E33,0x0000,0x0000,0x0000, -0x0E4A,0x0000,0x0000,0x0000, 0x0E60,0x0000,0x0000,0x0000, -0x0E6D,0x0000,0x0000,0x0000, 0x0E8B,0x0000,0x0000,0x0000, -0x0EB9,0x0000,0x0000,0x0000, 0x0EC1,0x0000,0x0000,0x0000, -0x0EE1,0x0000,0x0000,0x0000, 0x0EFB,0x0000,0x0000,0x0000, -0x0F10,0x0000,0x0000,0x0000, 0x0F21,0x0000,0x0000,0x0000, -0x0F2E,0x0000,0x0000,0x0000, 0x0F5B,0x0000,0x0000,0x0000, -0x0F64,0x0000,0x0000,0x0000, 0x0F82,0x0000,0x0000,0x0000, -0x0FA7,0x0000,0x0000,0x0000, 0x0FB4,0x0000,0x0000,0x0000, -0x0FC0,0x0000,0x0000,0x0000, 0x0FEA,0x0000,0x0000,0x0000, -0x1002,0x0000,0x0000,0x0000, 0x101F,0x0000,0x0000,0x0000, -0x1044,0x0000,0x0000,0x0000, 0x1051,0x0000,0x0000,0x0000, -0x105A,0x0000,0x0000,0x0000, 0x105E,0x0000,0x0000,0x0000, -0x106A,0x0000,0x0000,0x0000, 0x028C,0x0000,0x0000,0x0000, -0x0430,0x0000,0x0000,0x0000, 0x028D,0x0000,0x0000,0x0000, -0x0433,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0206,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000, 0x0252,0x0000,0x0000,0x0000, -0x0E0E,0x0000,0x0000,0x0000, 0x0E10,0x0000,0x0000,0x0000, -0x0E0D,0x0000,0x0000,0x0000, 0x0E11,0x0000,0x0000,0x0000, -0x0431,0x0000,0x0000,0x0000, 0x02C2,0x0000,0x0000,0x0000, -0x0214,0x0000,0x0000,0x0000, 0x02C5,0x0000,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000, 0x0286,0x0000,0x0000,0x0000, -0x042F,0x0000,0x0000,0x0000, 0x0220,0x0000,0x0000,0x0000, -0x02C6,0x0000,0x0000,0x0000, 0x0210,0x0000,0x0000,0x0000, -0x034A,0x0000,0x0000,0x0000, 0x0429,0x0000,0x0000,0x0000, -0x0E2B,0x0000,0x0000,0x0000, 0x0E2C,0x0000,0x0000,0x0000, -0x020D,0x0000,0x0000,0x0000, 0x10F8,0x0000,0x0000,0x0000, -0x02C3,0x0000,0x0000,0x0000, 0x0267,0x0000,0x0000,0x0000, -0x0219,0x0000,0x0000,0x0000, 0x0E2A,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000, 0x0287,0x0000,0x0000,0x0000, -0x0E2A,0x02CD,0x0E2D,0x0000, 0x0E2A,0x02CD,0x0E2B,0x0000, -0x0E2C,0x02CD,0x0E2D,0x0000, 0x0256,0x0000,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000, 0x0E33,0x0000,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000, 0x0E33,0x0000,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000, 0x0E33,0x0000,0x0000,0x0000, -0x0E38,0x0000,0x0000,0x0000, 0x0E60,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000, 0x0E8B,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000, 0x0E8B,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000, 0x0EFB,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000, 0x0EFB,0x0000,0x0000,0x0000, -0x0E86,0x0000,0x0000,0x0000, 0x0F64,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000, 0x0F82,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000, 0x0F82,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000, 0x042B,0x0000,0x0000,0x0000, -0x0F8D,0x0000,0x0000,0x0000, 0x101F,0x0000,0x0000,0x0000, -0x101F,0x0000,0x0000,0x0000, 0x101F,0x0000,0x0000,0x0000, -0x101F,0x0000,0x0000,0x0000, 0x105E,0x0000,0x0000,0x0000, -0x1094,0x0000,0x0000,0x0000, 0x0FEA,0x0FEA,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000, 0x0E33,0x0000,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000, 0x0E33,0x0000,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000, 0x0E33,0x0000,0x0000,0x0000, -0x0E38,0x0000,0x0000,0x0000, 0x0E60,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000, 0x0E8B,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000, 0x0E8B,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000, 0x0EFB,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000, 0x0EFB,0x0000,0x0000,0x0000, -0x0E86,0x0000,0x0000,0x0000, 0x0F64,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000, 0x0F82,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000, 0x0F82,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000, 0x042A,0x0000,0x0000,0x0000, -0x0F8D,0x0000,0x0000,0x0000, 0x101F,0x0000,0x0000,0x0000, -0x101F,0x0000,0x0000,0x0000, 0x101F,0x0000,0x0000,0x0000, -0x101F,0x0000,0x0000,0x0000, 0x105E,0x0000,0x0000,0x0000, -0x1094,0x0000,0x0000,0x0000, 0x105E,0x0000,0x0000,0x0000 -}; - -uint16 page001data[]= { /* 0100 (3 weights per char) */ -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E60,0x0000,0x0000, 0x0E60,0x0000,0x0000, 0x0E60,0x0000,0x0000, -0x0E60,0x0000,0x0000, 0x0E60,0x0000,0x0000, 0x0E60,0x0000,0x0000, -0x0E60,0x0000,0x0000, 0x0E60,0x0000,0x0000, 0x0E6D,0x0000,0x0000, -0x0E6D,0x0000,0x0000, 0x0E72,0x0000,0x0000, 0x0E72,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0EC1,0x0000,0x0000, 0x0EC1,0x0000,0x0000, -0x0EC1,0x0000,0x0000, 0x0EC1,0x0000,0x0000, 0x0EC1,0x0000,0x0000, -0x0EC1,0x0000,0x0000, 0x0EC1,0x0000,0x0000, 0x0EC1,0x0000,0x0000, -0x0EE1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, 0x0EED,0x0000,0x0000, -0x0EED,0x0000,0x0000, 0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0EFB,0x0000,0x0000, 0x0EFF,0x0000,0x0000, 0x0EFB,0x0F10,0x0000, -0x0EFB,0x0F10,0x0000, 0x0F10,0x0000,0x0000, 0x0F10,0x0000,0x0000, -0x0F21,0x0000,0x0000, 0x0F21,0x0000,0x0000, 0x0FBC,0x0000,0x0000, -0x0F2E,0x0000,0x0000, 0x0F2E,0x0000,0x0000, 0x0F2E,0x0000,0x0000, -0x0F2E,0x0000,0x0000, 0x0F2E,0x0000,0x0000, 0x0F2E,0x0000,0x0000, -0x0F2E,0x0267,0x0000, 0x0F2E,0x0267,0x0000, 0x0F36,0x0000,0x0000, -0x0F36,0x0000,0x0000, 0x0F64,0x0000,0x0000, 0x0F64,0x0000,0x0000, -0x0F64,0x0000,0x0000, 0x0F64,0x0000,0x0000, 0x0F64,0x0000,0x0000, -0x0F64,0x0000,0x0000, 0x10B1,0x0F64,0x0000, 0x0F7E,0x0000,0x0000, -0x0F7E,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0E8B,0x0000, 0x0F82,0x0E8B,0x0000, -0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, -0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, -0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, -0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, -0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, 0x1002,0x0000,0x0000, -0x1002,0x0000,0x0000, 0x1002,0x0000,0x0000, 0x1002,0x0000,0x0000, -0x1007,0x0000,0x0000, 0x1007,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x1051,0x0000,0x0000, -0x1051,0x0000,0x0000, 0x105E,0x0000,0x0000, 0x105E,0x0000,0x0000, -0x105E,0x0000,0x0000, 0x106A,0x0000,0x0000, 0x106A,0x0000,0x0000, -0x106A,0x0000,0x0000, 0x106A,0x0000,0x0000, 0x106A,0x0000,0x0000, -0x106A,0x0000,0x0000, 0x0FEA,0x0000,0x0000, 0x0E52,0x0000,0x0000, -0x0E58,0x0000,0x0000, 0x0E5C,0x0000,0x0000, 0x0E5C,0x0000,0x0000, -0x10A8,0x0000,0x0000, 0x10A8,0x0000,0x0000, 0x0F92,0x0000,0x0000, -0x0E65,0x0000,0x0000, 0x0E65,0x0000,0x0000, 0x0E76,0x0000,0x0000, -0x0E7A,0x0000,0x0000, 0x0E7E,0x0000,0x0000, 0x0E7E,0x0000,0x0000, -0x106A,0x1051,0x0000, 0x0E90,0x0000,0x0000, 0x0E94,0x0000,0x0000, -0x0E98,0x0000,0x0000, 0x0EBD,0x0000,0x0000, 0x0EBD,0x0000,0x0000, -0x0ED1,0x0000,0x0000, 0x0ED9,0x0000,0x0000, 0x0EE9,0x0000,0x0000, -0x0F0C,0x0000,0x0000, 0x0F08,0x0000,0x0000, 0x0F26,0x0000,0x0000, -0x0F26,0x0000,0x0000, 0x0F3B,0x0000,0x0000, 0x0F53,0x0000,0x0000, -0x1037,0x0000,0x0000, 0x0F6E,0x0000,0x0000, 0x0F72,0x0000,0x0000, -0x0F9A,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0EDD,0x0000,0x0000, 0x0EDD,0x0000,0x0000, 0x0FAC,0x0000,0x0000, -0x0FAC,0x0000,0x0000, 0x0FC4,0x0000,0x0000, 0x10A0,0x0000,0x0000, -0x10A0,0x0000,0x0000, 0x0FF2,0x0000,0x0000, 0x0FF6,0x0000,0x0000, -0x100B,0x0000,0x0000, 0x100F,0x0000,0x0000, 0x100F,0x0000,0x0000, -0x1013,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x1040,0x0000,0x0000, 0x1049,0x0000,0x0000, 0x1066,0x0000,0x0000, -0x1066,0x0000,0x0000, 0x106F,0x0000,0x0000, 0x106F,0x0000,0x0000, -0x107F,0x0000,0x0000, 0x1084,0x0000,0x0000, 0x1084,0x0000,0x0000, -0x1088,0x0000,0x0000, 0x109C,0x0000,0x0000, 0x10A4,0x0000,0x0000, -0x10A4,0x0000,0x0000, 0x1002,0x0FEA,0x0000, 0x1098,0x0000,0x0000, -0x10C8,0x0000,0x0000, 0x10CC,0x0000,0x0000, 0x10D0,0x0000,0x0000, -0x10D4,0x0000,0x0000, 0x0E6D,0x106A,0x0000, 0x0E6D,0x106A,0x0000, -0x0E6D,0x106A,0x0000, 0x0F2E,0x0F10,0x0000, 0x0F2E,0x0F10,0x0000, -0x0F2E,0x0F10,0x0000, 0x0F64,0x0F10,0x0000, 0x0F64,0x0F10,0x0000, -0x0F64,0x0F10,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x0E90,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E38,0x0000,0x0000, 0x0E38,0x0000,0x0000, -0x0ECD,0x0000,0x0000, 0x0ECD,0x0000,0x0000, 0x0EC1,0x0000,0x0000, -0x0EC1,0x0000,0x0000, 0x0F21,0x0000,0x0000, 0x0F21,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x107F,0x0000,0x0000, 0x107F,0x0000,0x0000, -0x0F10,0x0000,0x0000, 0x0E6D,0x106A,0x0000, 0x0E6D,0x106A,0x0000, -0x0E6D,0x106A,0x0000, 0x0EC1,0x0000,0x0000, 0x0EC1,0x0000,0x0000, -0x0EE9,0x0000,0x0000, 0x1098,0x0000,0x0000, 0x0F64,0x0000,0x0000, -0x0F64,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E38,0x0000,0x0000, 0x0E38,0x0000,0x0000, 0x0F8D,0x0000,0x0000, -0x0F8D,0x0000,0x0000 }; - -uint16 page002data[]= { /* 0200 (3 weights per char) */ -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, -0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, 0x1002,0x0000,0x0000, -0x1002,0x0000,0x0000, 0x1090,0x0000,0x0000, 0x1090,0x0000,0x0000, -0x0EE1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, 0x0F72,0x0000,0x0000, -0x0E82,0x0000,0x0000, 0x0FA2,0x0000,0x0000, 0x0FA2,0x0000,0x0000, -0x1073,0x0000,0x0000, 0x1073,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x105E,0x0000,0x0000, -0x105E,0x0000,0x0000, 0x0F4B,0x0000,0x0000, 0x0F7A,0x0000,0x0000, -0x1017,0x0000,0x0000, 0xFBC0,0x8237,0x0000, 0xFBC0,0x8238,0x0000, -0xFBC0,0x8239,0x0000, 0xFBC0,0x823A,0x0000, 0xFBC0,0x823B,0x0000, -0xFBC0,0x823C,0x0000, 0xFBC0,0x823D,0x0000, 0xFBC0,0x823E,0x0000, -0xFBC0,0x823F,0x0000, 0xFBC0,0x8240,0x0000, 0xFBC0,0x8241,0x0000, -0xFBC0,0x8242,0x0000, 0xFBC0,0x8243,0x0000, 0xFBC0,0x8244,0x0000, -0xFBC0,0x8245,0x0000, 0xFBC0,0x8246,0x0000, 0xFBC0,0x8247,0x0000, -0xFBC0,0x8248,0x0000, 0xFBC0,0x8249,0x0000, 0xFBC0,0x824A,0x0000, -0xFBC0,0x824B,0x0000, 0xFBC0,0x824C,0x0000, 0xFBC0,0x824D,0x0000, -0xFBC0,0x824E,0x0000, 0xFBC0,0x824F,0x0000, 0x0E3E,0x0000,0x0000, -0x0E42,0x0000,0x0000, 0x0E46,0x0000,0x0000, 0x0E58,0x0000,0x0000, -0x0F92,0x0000,0x0000, 0x0E69,0x0000,0x0000, 0x0E76,0x0000,0x0000, -0x0E7A,0x0000,0x0000, 0x0E9C,0x0000,0x0000, 0x0E94,0x0000,0x0000, -0x0EA0,0x0000,0x0000, 0x0E98,0x0000,0x0000, 0x0EA4,0x0000,0x0000, -0x0EA9,0x0000,0x0000, 0x0EAD,0x0000,0x0000, 0x0F19,0x0000,0x0000, -0x0ED1,0x0000,0x0000, 0x0EC5,0x0000,0x0000, 0x0EC9,0x0000,0x0000, -0x0ED9,0x0000,0x0000, 0x0EB5,0x0000,0x0000, 0x102B,0x0000,0x0000, -0x0EF1,0x0000,0x0000, 0x0EF5,0x0000,0x0000, 0x0F08,0x0000,0x0000, -0x0F0C,0x0000,0x0000, 0x0F03,0x0000,0x0000, 0x0F3F,0x0000,0x0000, -0x0F43,0x0000,0x0000, 0x0F47,0x0000,0x0000, 0x0F4F,0x0000,0x0000, -0x1037,0x0000,0x0000, 0x103C,0x0000,0x0000, 0x0F60,0x0000,0x0000, -0x0F6E,0x0000,0x0000, 0x0F76,0x0000,0x0000, 0x0F68,0x0000,0x0000, -0x0F9A,0x0000,0x0000, 0x0F88,0x0000,0x0000, 0x0F9E,0x0000,0x0000, -0x0FB0,0x0000,0x0000, 0x0FC9,0x0000,0x0000, 0x0FCE,0x0000,0x0000, -0x0FD2,0x0000,0x0000, 0x0FD6,0x0000,0x0000, 0x0FDA,0x0000,0x0000, -0x0FDE,0x0000,0x0000, 0x0FE2,0x0000,0x0000, 0x0FC4,0x0000,0x0000, -0x0FE6,0x0000,0x0000, 0x0FEE,0x0000,0x0000, 0x0FF2,0x0000,0x0000, -0x0F1D,0x0000,0x0000, 0x0FFA,0x0000,0x0000, 0x0FFE,0x0000,0x0000, -0x101B,0x0000,0x0000, 0x1013,0x0000,0x0000, 0x1027,0x0000,0x0000, -0x1040,0x0000,0x0000, 0x1049,0x0000,0x0000, 0x104D,0x0000,0x0000, -0x1056,0x0000,0x0000, 0x0F57,0x0000,0x0000, 0x1062,0x0000,0x0000, -0x1077,0x0000,0x0000, 0x107B,0x0000,0x0000, 0x107F,0x0000,0x0000, -0x108C,0x0000,0x0000, 0x10AC,0x0000,0x0000, 0x10B4,0x0000,0x0000, -0x10C4,0x0000,0x0000, 0x10D8,0x0000,0x0000, 0x10DC,0x0000,0x0000, -0x0E4E,0x0000,0x0000, 0x0EB1,0x0000,0x0000, 0x0ED5,0x0000,0x0000, -0x0EE5,0x0000,0x0000, 0x0F15,0x0000,0x0000, 0x0F2A,0x0000,0x0000, -0x0F32,0x0000,0x0000, 0x0FB8,0x0000,0x0000, 0x10BC,0x0000,0x0000, -0x10C0,0x0000,0x0000, 0x0E6D,0x106A,0x0000, 0x0E6D,0x107F,0x0000, -0x0E6D,0x107B,0x0000, 0x1002,0x0FEA,0x0000, 0x1002,0x0FF2,0x0000, -0x1002,0x0E69,0x0000, 0x0EB9,0x0F7E,0x0000, 0x0F2E,0x0FEA,0x0000, -0x0F2E,0x106A,0x0000, 0x10E0,0x0000,0x0000, 0x10E4,0x0000,0x0000, -0x102F,0x0000,0x0000, 0x1033,0x0000,0x0000, 0x0EE1,0x0000,0x0000, -0x0EF1,0x0000,0x0000, 0x0F10,0x0000,0x0000, 0x0FC0,0x0000,0x0000, -0x0FC9,0x0000,0x0000, 0x0FD2,0x0000,0x0000, 0x0FE6,0x0000,0x0000, -0x1051,0x0000,0x0000, 0x105E,0x0000,0x0000, 0x0317,0x0000,0x0000, -0x0319,0x0000,0x0000, 0x0EF9,0x0000,0x0000, 0x10B1,0x0000,0x0000, -0x0EFA,0x0000,0x0000, 0x10B3,0x0000,0x0000, 0x10B8,0x0000,0x0000, -0x10B0,0x0000,0x0000, 0x10B9,0x0000,0x0000, 0x031A,0x0000,0x0000, -0x031B,0x0000,0x0000, 0x031C,0x0000,0x0000, 0x031D,0x0000,0x0000, -0x031E,0x0000,0x0000, 0x031F,0x0000,0x0000, 0x0320,0x0000,0x0000, -0x0321,0x0000,0x0000, 0x0322,0x0000,0x0000, 0x0323,0x0000,0x0000, -0x0324,0x0000,0x0000, 0x0325,0x0000,0x0000, 0x0326,0x0000,0x0000, -0x0327,0x0000,0x0000, 0x0E01,0x0000,0x0000, 0x0E02,0x0000,0x0000, -0x0328,0x0000,0x0000, 0x0329,0x0000,0x0000, 0x032A,0x0000,0x0000, -0x032B,0x0000,0x0000, 0x032C,0x0000,0x0000, 0x032D,0x0000,0x0000, -0x0212,0x0000,0x0000, 0x0213,0x0000,0x0000, 0x0215,0x0000,0x0000, -0x021A,0x0000,0x0000, 0x020E,0x0000,0x0000, 0x0216,0x0000,0x0000, -0x032E,0x0000,0x0000, 0x032F,0x0000,0x0000, 0x0ED9,0x0000,0x0000, -0x0F2E,0x0000,0x0000, 0x0FEA,0x0000,0x0000, 0x105A,0x0000,0x0000, -0x10B4,0x0000,0x0000, 0x0330,0x0000,0x0000, 0x0331,0x0000,0x0000, -0x0332,0x0000,0x0000, 0x0333,0x0000,0x0000, 0x0334,0x0000,0x0000, -0x0335,0x0000,0x0000, 0x0336,0x0000,0x0000, 0x0337,0x0000,0x0000, -0x0338,0x0000,0x0000, 0x10B2,0x0000,0x0000, 0x0339,0x0000,0x0000, -0x033A,0x0000,0x0000, 0x033B,0x0000,0x0000, 0x033C,0x0000,0x0000, -0x033D,0x0000,0x0000, 0x033E,0x0000,0x0000, 0x033F,0x0000,0x0000, -0x0340,0x0000,0x0000, 0x0341,0x0000,0x0000, 0x0342,0x0000,0x0000, -0x0343,0x0000,0x0000, 0x0344,0x0000,0x0000, 0x0345,0x0000,0x0000, -0x0346,0x0000,0x0000, 0x0347,0x0000,0x0000, 0x0348,0x0000,0x0000, -0x0349,0x0000,0x0000 }; - -uint16 page003data[]= { /* 0300 (4 weights per char) */ -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0xFBC0,0x8358,0x0000,0x0000, 0xFBC0,0x8359,0x0000,0x0000, -0xFBC0,0x835A,0x0000,0x0000, 0xFBC0,0x835B,0x0000,0x0000, -0xFBC0,0x835C,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x0E33,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000, 0x0EFB,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000, 0x101F,0x0000,0x0000,0x0000, -0x0E60,0x0000,0x0000,0x0000, 0x0E6D,0x0000,0x0000,0x0000, -0x0EE1,0x0000,0x0000,0x0000, 0x0F5B,0x0000,0x0000,0x0000, -0x0FC0,0x0000,0x0000,0x0000, 0x1002,0x0000,0x0000,0x0000, -0x1044,0x0000,0x0000,0x0000, 0x105A,0x0000,0x0000,0x0000, -0xFBC0,0x8370,0x0000,0x0000, 0xFBC0,0x8371,0x0000,0x0000, -0xFBC0,0x8372,0x0000,0x0000, 0xFBC0,0x8373,0x0000,0x0000, -0x0317,0x0000,0x0000,0x0000, 0x0318,0x0000,0x0000,0x0000, -0xFBC0,0x8376,0x0000,0x0000, 0xFBC0,0x8377,0x0000,0x0000, -0xFBC0,0x8378,0x0000,0x0000, 0xFBC0,0x8379,0x0000,0x0000, -0x10F3,0x0000,0x0000,0x0000, 0xFBC0,0x837B,0x0000,0x0000, -0xFBC0,0x837C,0x0000,0x0000, 0xFBC0,0x837D,0x0000,0x0000, -0x023A,0x0000,0x0000,0x0000, 0xFBC0,0x837F,0x0000,0x0000, -0xFBC0,0x8380,0x0000,0x0000, 0xFBC0,0x8381,0x0000,0x0000, -0xFBC0,0x8382,0x0000,0x0000, 0xFBC0,0x8383,0x0000,0x0000, -0x020D,0x0000,0x0000,0x0000, 0x0214,0x0000,0x0000,0x0000, -0x10E8,0x0000,0x0000,0x0000, 0x0267,0x0000,0x0000,0x0000, -0x10ED,0x0000,0x0000,0x0000, 0x10F1,0x0000,0x0000,0x0000, -0x10F3,0x0000,0x0000,0x0000, 0xFBC0,0x838B,0x0000,0x0000, -0x10FB,0x0000,0x0000,0x0000, 0xFBC0,0x838D,0x0000,0x0000, -0x1104,0x0000,0x0000,0x0000, 0x1109,0x0000,0x0000,0x0000, -0x10F3,0x0000,0x0000,0x0000, 0x10E8,0x0000,0x0000,0x0000, -0x10E9,0x0000,0x0000,0x0000, 0x10EA,0x0000,0x0000,0x0000, -0x10EC,0x0000,0x0000,0x0000, 0x10ED,0x0000,0x0000,0x0000, -0x10F0,0x0000,0x0000,0x0000, 0x10F1,0x0000,0x0000,0x0000, -0x10F2,0x0000,0x0000,0x0000, 0x10F3,0x0000,0x0000,0x0000, -0x10F5,0x0000,0x0000,0x0000, 0x10F6,0x0000,0x0000,0x0000, -0x10F8,0x0000,0x0000,0x0000, 0x10F9,0x0000,0x0000,0x0000, -0x10FA,0x0000,0x0000,0x0000, 0x10FB,0x0000,0x0000,0x0000, -0x10FC,0x0000,0x0000,0x0000, 0x1100,0x0000,0x0000,0x0000, -0xFBC0,0x83A2,0x0000,0x0000, 0x1102,0x0000,0x0000,0x0000, -0x1103,0x0000,0x0000,0x0000, 0x1104,0x0000,0x0000,0x0000, -0x1105,0x0000,0x0000,0x0000, 0x1106,0x0000,0x0000,0x0000, -0x1107,0x0000,0x0000,0x0000, 0x1109,0x0000,0x0000,0x0000, -0x10F3,0x0000,0x0000,0x0000, 0x1104,0x0000,0x0000,0x0000, -0x10E8,0x0000,0x0000,0x0000, 0x10ED,0x0000,0x0000,0x0000, -0x10F1,0x0000,0x0000,0x0000, 0x10F3,0x0000,0x0000,0x0000, -0x1104,0x0000,0x0000,0x0000, 0x10E8,0x0000,0x0000,0x0000, -0x10E9,0x0000,0x0000,0x0000, 0x10EA,0x0000,0x0000,0x0000, -0x10EC,0x0000,0x0000,0x0000, 0x10ED,0x0000,0x0000,0x0000, -0x10F0,0x0000,0x0000,0x0000, 0x10F1,0x0000,0x0000,0x0000, -0x10F2,0x0000,0x0000,0x0000, 0x10F3,0x0000,0x0000,0x0000, -0x10F5,0x0000,0x0000,0x0000, 0x10F6,0x0000,0x0000,0x0000, -0x10F8,0x0000,0x0000,0x0000, 0x10F9,0x0000,0x0000,0x0000, -0x10FA,0x0000,0x0000,0x0000, 0x10FB,0x0000,0x0000,0x0000, -0x10FC,0x0000,0x0000,0x0000, 0x1100,0x0000,0x0000,0x0000, -0x1102,0x0000,0x0000,0x0000, 0x1102,0x0000,0x0000,0x0000, -0x1103,0x0000,0x0000,0x0000, 0x1104,0x0000,0x0000,0x0000, -0x1105,0x0000,0x0000,0x0000, 0x1106,0x0000,0x0000,0x0000, -0x1107,0x0000,0x0000,0x0000, 0x1109,0x0000,0x0000,0x0000, -0x10F3,0x0000,0x0000,0x0000, 0x1104,0x0000,0x0000,0x0000, -0x10FB,0x0000,0x0000,0x0000, 0x1104,0x0000,0x0000,0x0000, -0x1109,0x0000,0x0000,0x0000, 0xFBC0,0x83CF,0x0000,0x0000, -0x10E9,0x0000,0x0000,0x0000, 0x10F2,0x0000,0x0000,0x0000, -0x1104,0x0000,0x0000,0x0000, 0x1104,0x0000,0x0000,0x0000, -0x1104,0x0000,0x0000,0x0000, 0x1105,0x0000,0x0000,0x0000, -0x10FC,0x0000,0x0000,0x0000, 0x10F5,0x10E8,0x10F3,0x0000, -0x10FF,0x0000,0x0000,0x0000, 0x10FF,0x0000,0x0000,0x0000, -0x10EF,0x0000,0x0000,0x0000, 0x10EF,0x0000,0x0000,0x0000, -0x10EE,0x0000,0x0000,0x0000, 0x10EE,0x0000,0x0000,0x0000, -0x10FE,0x0000,0x0000,0x0000, 0x10FE,0x0000,0x0000,0x0000, -0x110A,0x0000,0x0000,0x0000, 0x110A,0x0000,0x0000,0x0000, -0x110D,0x0000,0x0000,0x0000, 0x110D,0x0000,0x0000,0x0000, -0x110E,0x0000,0x0000,0x0000, 0x110E,0x0000,0x0000,0x0000, -0x110F,0x0000,0x0000,0x0000, 0x110F,0x0000,0x0000,0x0000, -0x1110,0x0000,0x0000,0x0000, 0x1110,0x0000,0x0000,0x0000, -0x1111,0x0000,0x0000,0x0000, 0x1111,0x0000,0x0000,0x0000, -0x1112,0x0000,0x0000,0x0000, 0x1112,0x0000,0x0000,0x0000, -0x1113,0x0000,0x0000,0x0000, 0x1113,0x0000,0x0000,0x0000, -0x10F5,0x0000,0x0000,0x0000, 0x1100,0x0000,0x0000,0x0000, -0x1102,0x0000,0x0000,0x0000, 0x10F4,0x0000,0x0000,0x0000, -0x10F2,0x0000,0x0000,0x0000, 0x10ED,0x0000,0x0000,0x0000, -0x0423,0x0000,0x0000,0x0000, 0x110B,0x0000,0x0000,0x0000, -0x110B,0x0000,0x0000,0x0000, 0x1102,0x0000,0x0000,0x0000, -0x110C,0x0000,0x0000,0x0000, 0x110C,0x0000,0x0000,0x0000, -0xFBC0,0x83FC,0x0000,0x0000, 0xFBC0,0x83FD,0x0000,0x0000, -0xFBC0,0x83FE,0x0000,0x0000, 0xFBC0,0x83FF,0x0000,0x0000 -}; - -uint16 page004data[]= { /* 0400 (3 weights per char) */ -0x1152,0x0000,0x0000, 0x1152,0x0000,0x0000, 0x1145,0x0000,0x0000, -0x114A,0x0000,0x0000, 0x115A,0x0000,0x0000, 0x1173,0x0000,0x0000, -0x1188,0x0000,0x0000, 0x118C,0x0000,0x0000, 0x1194,0x0000,0x0000, -0x11B9,0x0000,0x0000, 0x11DA,0x0000,0x0000, 0x1215,0x0000,0x0000, -0x1219,0x0000,0x0000, 0x117C,0x0000,0x0000, 0x1221,0x0000,0x0000, -0x127D,0x0000,0x0000, 0x1114,0x0000,0x0000, 0x112C,0x0000,0x0000, -0x1130,0x0000,0x0000, 0x1134,0x0000,0x0000, 0x1140,0x0000,0x0000, -0x1152,0x0000,0x0000, 0x115E,0x0000,0x0000, 0x116A,0x0000,0x0000, -0x117C,0x0000,0x0000, 0x1190,0x0000,0x0000, 0x1198,0x0000,0x0000, -0x11B0,0x0000,0x0000, 0x11BE,0x0000,0x0000, 0x11C6,0x0000,0x0000, -0x11DF,0x0000,0x0000, 0x11EF,0x0000,0x0000, 0x11FB,0x0000,0x0000, -0x1203,0x0000,0x0000, 0x120C,0x0000,0x0000, 0x121D,0x0000,0x0000, -0x1239,0x0000,0x0000, 0x123D,0x0000,0x0000, 0x1259,0x0000,0x0000, -0x1261,0x0000,0x0000, 0x1281,0x0000,0x0000, 0x1285,0x0000,0x0000, -0x1289,0x0000,0x0000, 0x128D,0x0000,0x0000, 0x1295,0x0000,0x0000, -0x12A1,0x0000,0x0000, 0x12A9,0x0000,0x0000, 0x12AD,0x0000,0x0000, -0x1114,0x0000,0x0000, 0x112C,0x0000,0x0000, 0x1130,0x0000,0x0000, -0x1134,0x0000,0x0000, 0x1140,0x0000,0x0000, 0x1152,0x0000,0x0000, -0x115E,0x0000,0x0000, 0x116A,0x0000,0x0000, 0x117C,0x0000,0x0000, -0x1190,0x0000,0x0000, 0x1198,0x0000,0x0000, 0x11B0,0x0000,0x0000, -0x11BE,0x0000,0x0000, 0x11C6,0x0000,0x0000, 0x11DF,0x0000,0x0000, -0x11EF,0x0000,0x0000, 0x11FB,0x0000,0x0000, 0x1203,0x0000,0x0000, -0x120C,0x0000,0x0000, 0x121D,0x0000,0x0000, 0x1239,0x0000,0x0000, -0x123D,0x0000,0x0000, 0x1259,0x0000,0x0000, 0x1261,0x0000,0x0000, -0x1281,0x0000,0x0000, 0x1285,0x0000,0x0000, 0x1289,0x0000,0x0000, -0x128D,0x0000,0x0000, 0x1295,0x0000,0x0000, 0x12A1,0x0000,0x0000, -0x12A9,0x0000,0x0000, 0x12AD,0x0000,0x0000, 0x1152,0x0000,0x0000, -0x1152,0x0000,0x0000, 0x1145,0x0000,0x0000, 0x114A,0x0000,0x0000, -0x115A,0x0000,0x0000, 0x1173,0x0000,0x0000, 0x1188,0x0000,0x0000, -0x118C,0x0000,0x0000, 0x1194,0x0000,0x0000, 0x11B9,0x0000,0x0000, -0x11DA,0x0000,0x0000, 0x1215,0x0000,0x0000, 0x1219,0x0000,0x0000, -0x117C,0x0000,0x0000, 0x1221,0x0000,0x0000, 0x127D,0x0000,0x0000, -0x1249,0x0000,0x0000, 0x1249,0x0000,0x0000, 0x129D,0x0000,0x0000, -0x129D,0x0000,0x0000, 0x12B1,0x0000,0x0000, 0x12B1,0x0000,0x0000, -0x12B5,0x0000,0x0000, 0x12B5,0x0000,0x0000, 0x12BD,0x0000,0x0000, -0x12BD,0x0000,0x0000, 0x12B9,0x0000,0x0000, 0x12B9,0x0000,0x0000, -0x12C1,0x0000,0x0000, 0x12C1,0x0000,0x0000, 0x12C5,0x0000,0x0000, -0x12C5,0x0000,0x0000, 0x12C9,0x0000,0x0000, 0x12C9,0x0000,0x0000, -0x12CD,0x0000,0x0000, 0x12CD,0x0000,0x0000, 0x12D1,0x0000,0x0000, -0x12D1,0x0000,0x0000, 0x12D5,0x0000,0x0000, 0x12D5,0x0000,0x0000, -0x1235,0x0000,0x0000, 0x1235,0x0000,0x0000, 0x1255,0x0000,0x0000, -0x1255,0x0000,0x0000, 0x1251,0x0000,0x0000, 0x1251,0x0000,0x0000, -0x124D,0x0000,0x0000, 0x124D,0x0000,0x0000, 0x11F7,0x0000,0x0000, -0x11F7,0x0000,0x0000, 0x034B,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x8487,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x1180,0x0000,0x0000, 0x1180,0x0000,0x0000, 0x1299,0x0000,0x0000, -0x1299,0x0000,0x0000, 0x11FF,0x0000,0x0000, 0x11FF,0x0000,0x0000, -0x1134,0x0000,0x0000, 0x1134,0x0000,0x0000, 0x1138,0x0000,0x0000, -0x1138,0x0000,0x0000, 0x113C,0x0000,0x0000, 0x113C,0x0000,0x0000, -0x1166,0x0000,0x0000, 0x1166,0x0000,0x0000, 0x114E,0x0000,0x0000, -0x114E,0x0000,0x0000, 0x119C,0x0000,0x0000, 0x119C,0x0000,0x0000, -0x11AC,0x0000,0x0000, 0x11AC,0x0000,0x0000, 0x11A8,0x0000,0x0000, -0x11A8,0x0000,0x0000, 0x11A4,0x0000,0x0000, 0x11A4,0x0000,0x0000, -0x11CE,0x0000,0x0000, 0x11CE,0x0000,0x0000, 0x11D6,0x0000,0x0000, -0x11D6,0x0000,0x0000, 0x11F3,0x0000,0x0000, 0x11F3,0x0000,0x0000, -0x12D9,0x0000,0x0000, 0x12D9,0x0000,0x0000, 0x1208,0x0000,0x0000, -0x1208,0x0000,0x0000, 0x1211,0x0000,0x0000, 0x1211,0x0000,0x0000, -0x122D,0x0000,0x0000, 0x122D,0x0000,0x0000, 0x1231,0x0000,0x0000, -0x1231,0x0000,0x0000, 0x1241,0x0000,0x0000, 0x1241,0x0000,0x0000, -0x125D,0x0000,0x0000, 0x125D,0x0000,0x0000, 0x1269,0x0000,0x0000, -0x1269,0x0000,0x0000, 0x1271,0x0000,0x0000, 0x1271,0x0000,0x0000, -0x1245,0x0000,0x0000, 0x1245,0x0000,0x0000, 0x1275,0x0000,0x0000, -0x1275,0x0000,0x0000, 0x1279,0x0000,0x0000, 0x1279,0x0000,0x0000, -0x12DD,0x0000,0x0000, 0x115E,0x0000,0x0000, 0x115E,0x0000,0x0000, -0x11A0,0x0000,0x0000, 0x11A0,0x0000,0x0000, 0x11B5,0x0000,0x0000, -0x11B5,0x0000,0x0000, 0x11D2,0x0000,0x0000, 0x11D2,0x0000,0x0000, -0x11CA,0x0000,0x0000, 0x11CA,0x0000,0x0000, 0x126D,0x0000,0x0000, -0x126D,0x0000,0x0000, 0x11C2,0x0000,0x0000, 0x11C2,0x0000,0x0000, -0xFBC0,0x84CF,0x0000, 0x1118,0x0000,0x0000, 0x1118,0x0000,0x0000, -0x111C,0x0000,0x0000, 0x111C,0x0000,0x0000, 0x1128,0x0000,0x0000, -0x1128,0x0000,0x0000, 0x1156,0x0000,0x0000, 0x1156,0x0000,0x0000, -0x1120,0x0000,0x0000, 0x1120,0x0000,0x0000, 0x1124,0x0000,0x0000, -0x1124,0x0000,0x0000, 0x1162,0x0000,0x0000, 0x1162,0x0000,0x0000, -0x116F,0x0000,0x0000, 0x116F,0x0000,0x0000, 0x1177,0x0000,0x0000, -0x1177,0x0000,0x0000, 0x117C,0x0000,0x0000, 0x117C,0x0000,0x0000, -0x1184,0x0000,0x0000, 0x1184,0x0000,0x0000, 0x11E3,0x0000,0x0000, -0x11E3,0x0000,0x0000, 0x11E7,0x0000,0x0000, 0x11E7,0x0000,0x0000, -0x11EB,0x0000,0x0000, 0x11EB,0x0000,0x0000, 0x12A5,0x0000,0x0000, -0x12A5,0x0000,0x0000, 0x121D,0x0000,0x0000, 0x121D,0x0000,0x0000, -0x1225,0x0000,0x0000, 0x1225,0x0000,0x0000, 0x1229,0x0000,0x0000, -0x1229,0x0000,0x0000, 0x1265,0x0000,0x0000, 0x1265,0x0000,0x0000, -0xFBC0,0x84F6,0x0000, 0xFBC0,0x84F7,0x0000, 0x1291,0x0000,0x0000, -0x1291,0x0000,0x0000, 0xFBC0,0x84FA,0x0000, 0xFBC0,0x84FB,0x0000, -0xFBC0,0x84FC,0x0000, 0xFBC0,0x84FD,0x0000, 0xFBC0,0x84FE,0x0000, -0xFBC0,0x84FF,0x0000 }; - -uint16 page005data[]= { /* 0500 (3 weights per char) */ -0x1144,0x0000,0x0000, 0x1144,0x0000,0x0000, 0x1149,0x0000,0x0000, -0x1149,0x0000,0x0000, 0x116E,0x0000,0x0000, 0x116E,0x0000,0x0000, -0x117B,0x0000,0x0000, 0x117B,0x0000,0x0000, 0x11BD,0x0000,0x0000, -0x11BD,0x0000,0x0000, 0x11DE,0x0000,0x0000, 0x11DE,0x0000,0x0000, -0x1207,0x0000,0x0000, 0x1207,0x0000,0x0000, 0x1210,0x0000,0x0000, -0x1210,0x0000,0x0000, 0xFBC0,0x8510,0x0000, 0xFBC0,0x8511,0x0000, -0xFBC0,0x8512,0x0000, 0xFBC0,0x8513,0x0000, 0xFBC0,0x8514,0x0000, -0xFBC0,0x8515,0x0000, 0xFBC0,0x8516,0x0000, 0xFBC0,0x8517,0x0000, -0xFBC0,0x8518,0x0000, 0xFBC0,0x8519,0x0000, 0xFBC0,0x851A,0x0000, -0xFBC0,0x851B,0x0000, 0xFBC0,0x851C,0x0000, 0xFBC0,0x851D,0x0000, -0xFBC0,0x851E,0x0000, 0xFBC0,0x851F,0x0000, 0xFBC0,0x8520,0x0000, -0xFBC0,0x8521,0x0000, 0xFBC0,0x8522,0x0000, 0xFBC0,0x8523,0x0000, -0xFBC0,0x8524,0x0000, 0xFBC0,0x8525,0x0000, 0xFBC0,0x8526,0x0000, -0xFBC0,0x8527,0x0000, 0xFBC0,0x8528,0x0000, 0xFBC0,0x8529,0x0000, -0xFBC0,0x852A,0x0000, 0xFBC0,0x852B,0x0000, 0xFBC0,0x852C,0x0000, -0xFBC0,0x852D,0x0000, 0xFBC0,0x852E,0x0000, 0xFBC0,0x852F,0x0000, -0xFBC0,0x8530,0x0000, 0x130A,0x0000,0x0000, 0x130B,0x0000,0x0000, -0x130C,0x0000,0x0000, 0x130D,0x0000,0x0000, 0x130E,0x0000,0x0000, -0x130F,0x0000,0x0000, 0x1310,0x0000,0x0000, 0x1311,0x0000,0x0000, -0x1312,0x0000,0x0000, 0x1313,0x0000,0x0000, 0x1314,0x0000,0x0000, -0x1315,0x0000,0x0000, 0x1316,0x0000,0x0000, 0x1317,0x0000,0x0000, -0x1318,0x0000,0x0000, 0x1319,0x0000,0x0000, 0x131A,0x0000,0x0000, -0x131B,0x0000,0x0000, 0x131C,0x0000,0x0000, 0x131D,0x0000,0x0000, -0x131E,0x0000,0x0000, 0x131F,0x0000,0x0000, 0x1320,0x0000,0x0000, -0x1321,0x0000,0x0000, 0x1322,0x0000,0x0000, 0x1323,0x0000,0x0000, -0x1324,0x0000,0x0000, 0x1325,0x0000,0x0000, 0x1326,0x0000,0x0000, -0x1327,0x0000,0x0000, 0x1328,0x0000,0x0000, 0x1329,0x0000,0x0000, -0x132A,0x0000,0x0000, 0x132B,0x0000,0x0000, 0x132C,0x0000,0x0000, -0x132D,0x0000,0x0000, 0x132E,0x0000,0x0000, 0x132F,0x0000,0x0000, -0xFBC0,0x8557,0x0000, 0xFBC0,0x8558,0x0000, 0x1330,0x0000,0x0000, -0x02EC,0x0000,0x0000, 0x02ED,0x0000,0x0000, 0x0253,0x0000,0x0000, -0x0230,0x0000,0x0000, 0x0257,0x0000,0x0000, 0x02EE,0x0000,0x0000, -0xFBC0,0x8560,0x0000, 0x130A,0x0000,0x0000, 0x130B,0x0000,0x0000, -0x130C,0x0000,0x0000, 0x130D,0x0000,0x0000, 0x130E,0x0000,0x0000, -0x130F,0x0000,0x0000, 0x1310,0x0000,0x0000, 0x1311,0x0000,0x0000, -0x1312,0x0000,0x0000, 0x1313,0x0000,0x0000, 0x1314,0x0000,0x0000, -0x1315,0x0000,0x0000, 0x1316,0x0000,0x0000, 0x1317,0x0000,0x0000, -0x1318,0x0000,0x0000, 0x1319,0x0000,0x0000, 0x131A,0x0000,0x0000, -0x131B,0x0000,0x0000, 0x131C,0x0000,0x0000, 0x131D,0x0000,0x0000, -0x131E,0x0000,0x0000, 0x131F,0x0000,0x0000, 0x1320,0x0000,0x0000, -0x1321,0x0000,0x0000, 0x1322,0x0000,0x0000, 0x1323,0x0000,0x0000, -0x1324,0x0000,0x0000, 0x1325,0x0000,0x0000, 0x1326,0x0000,0x0000, -0x1327,0x0000,0x0000, 0x1328,0x0000,0x0000, 0x1329,0x0000,0x0000, -0x132A,0x0000,0x0000, 0x132B,0x0000,0x0000, 0x132C,0x0000,0x0000, -0x132D,0x0000,0x0000, 0x132E,0x0000,0x0000, 0x132F,0x0000,0x0000, -0x130E,0x132B,0x0000, 0xFBC0,0x8588,0x0000, 0x023E,0x0000,0x0000, -0x0222,0x0000,0x0000, 0xFBC0,0x858B,0x0000, 0xFBC0,0x858C,0x0000, -0xFBC0,0x858D,0x0000, 0xFBC0,0x858E,0x0000, 0xFBC0,0x858F,0x0000, -0xFBC0,0x8590,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x85A2,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x85BA,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x02EF,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x02F0,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x02F1,0x0000,0x0000, 0x0000,0x0000,0x0000, 0xFBC0,0x85C5,0x0000, -0xFBC0,0x85C6,0x0000, 0xFBC0,0x85C7,0x0000, 0xFBC0,0x85C8,0x0000, -0xFBC0,0x85C9,0x0000, 0xFBC0,0x85CA,0x0000, 0xFBC0,0x85CB,0x0000, -0xFBC0,0x85CC,0x0000, 0xFBC0,0x85CD,0x0000, 0xFBC0,0x85CE,0x0000, -0xFBC0,0x85CF,0x0000, 0x1331,0x0000,0x0000, 0x1332,0x0000,0x0000, -0x1333,0x0000,0x0000, 0x1334,0x0000,0x0000, 0x1335,0x0000,0x0000, -0x1336,0x0000,0x0000, 0x1337,0x0000,0x0000, 0x1338,0x0000,0x0000, -0x1339,0x0000,0x0000, 0x133A,0x0000,0x0000, 0x133B,0x0000,0x0000, -0x133B,0x0000,0x0000, 0x133C,0x0000,0x0000, 0x133D,0x0000,0x0000, -0x133D,0x0000,0x0000, 0x133E,0x0000,0x0000, 0x133E,0x0000,0x0000, -0x133F,0x0000,0x0000, 0x1340,0x0000,0x0000, 0x1341,0x0000,0x0000, -0x1341,0x0000,0x0000, 0x1342,0x0000,0x0000, 0x1342,0x0000,0x0000, -0x1343,0x0000,0x0000, 0x1344,0x0000,0x0000, 0x1345,0x0000,0x0000, -0x1346,0x0000,0x0000, 0xFBC0,0x85EB,0x0000, 0xFBC0,0x85EC,0x0000, -0xFBC0,0x85ED,0x0000, 0xFBC0,0x85EE,0x0000, 0xFBC0,0x85EF,0x0000, -0x1336,0x1336,0x0000, 0x1336,0x133A,0x0000, 0x133A,0x133A,0x0000, -0x02F2,0x0000,0x0000, 0x02F3,0x0000,0x0000, 0xFBC0,0x85F5,0x0000, -0xFBC0,0x85F6,0x0000, 0xFBC0,0x85F7,0x0000, 0xFBC0,0x85F8,0x0000, -0xFBC0,0x85F9,0x0000, 0xFBC0,0x85FA,0x0000, 0xFBC0,0x85FB,0x0000, -0xFBC0,0x85FC,0x0000, 0xFBC0,0x85FD,0x0000, 0xFBC0,0x85FE,0x0000, -0xFBC0,0x85FF,0x0000 }; - -uint16 page006data[]= { /* 0600 (3 weights per char) */ -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0xFBC0,0x8604,0x0000, 0xFBC0,0x8605,0x0000, -0xFBC0,0x8606,0x0000, 0xFBC0,0x8607,0x0000, 0xFBC0,0x8608,0x0000, -0xFBC0,0x8609,0x0000, 0xFBC0,0x860A,0x0000, 0xFBC0,0x860B,0x0000, -0x0231,0x0000,0x0000, 0x0232,0x0000,0x0000, 0x034C,0x0000,0x0000, -0x034D,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0xFBC0,0x8616,0x0000, 0xFBC0,0x8617,0x0000, -0xFBC0,0x8618,0x0000, 0xFBC0,0x8619,0x0000, 0xFBC0,0x861A,0x0000, -0x023B,0x0000,0x0000, 0xFBC0,0x861C,0x0000, 0xFBC0,0x861D,0x0000, -0xFBC0,0x861E,0x0000, 0x0258,0x0000,0x0000, 0xFBC0,0x8620,0x0000, -0x1347,0x0000,0x0000, 0x1348,0x0000,0x0000, 0x1349,0x0000,0x0000, -0x134C,0x0000,0x0000, 0x134D,0x0000,0x0000, 0x134F,0x0000,0x0000, -0x1350,0x0000,0x0000, 0x1352,0x0000,0x0000, 0x1356,0x0000,0x0000, -0x1357,0x0000,0x0000, 0x1358,0x0000,0x0000, 0x135E,0x0000,0x0000, -0x1364,0x0000,0x0000, 0x1365,0x0000,0x0000, 0x1369,0x0000,0x0000, -0x136A,0x0000,0x0000, 0x1375,0x0000,0x0000, 0x1376,0x0000,0x0000, -0x1381,0x0000,0x0000, 0x1382,0x0000,0x0000, 0x1387,0x0000,0x0000, -0x1388,0x0000,0x0000, 0x138C,0x0000,0x0000, 0x138D,0x0000,0x0000, -0x138F,0x0000,0x0000, 0x1390,0x0000,0x0000, 0xFBC0,0x863B,0x0000, -0xFBC0,0x863C,0x0000, 0xFBC0,0x863D,0x0000, 0xFBC0,0x863E,0x0000, -0xFBC0,0x863F,0x0000, 0x020B,0x0000,0x0000, 0x1393,0x0000,0x0000, -0x139B,0x0000,0x0000, 0x139E,0x0000,0x0000, 0x13AB,0x0000,0x0000, -0x13B0,0x0000,0x0000, 0x13B1,0x0000,0x0000, 0x13B7,0x0000,0x0000, -0x13BD,0x0000,0x0000, 0x13C7,0x0000,0x0000, 0x13C8,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0xFBC0,0x8659,0x0000, -0xFBC0,0x865A,0x0000, 0xFBC0,0x865B,0x0000, 0xFBC0,0x865C,0x0000, -0xFBC0,0x865D,0x0000, 0xFBC0,0x865E,0x0000, 0xFBC0,0x865F,0x0000, -0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, -0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, -0x0E32,0x0000,0x0000, 0x02D4,0x0000,0x0000, 0x0233,0x0000,0x0000, -0x0234,0x0000,0x0000, 0x02CB,0x0000,0x0000, 0x1351,0x0000,0x0000, -0x139A,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x134B,0x0000,0x0000, -0x134A,0x0000,0x0000, 0x134E,0x0000,0x0000, 0x1347,0x0000,0x0000, -0x1350,0x1347,0x0000, 0x13BD,0x1347,0x0000, 0x13C1,0x1347,0x0000, -0x13C8,0x1347,0x0000, 0x1359,0x0000,0x0000, 0x135A,0x0000,0x0000, -0x1353,0x0000,0x0000, 0x135B,0x0000,0x0000, 0x135C,0x0000,0x0000, -0x1354,0x0000,0x0000, 0x135D,0x0000,0x0000, 0x1355,0x0000,0x0000, -0x1366,0x0000,0x0000, 0x1367,0x0000,0x0000, 0x135F,0x0000,0x0000, -0x1360,0x0000,0x0000, 0x1368,0x0000,0x0000, 0x1361,0x0000,0x0000, -0x1363,0x0000,0x0000, 0x136B,0x0000,0x0000, 0x136C,0x0000,0x0000, -0x136D,0x0000,0x0000, 0x136E,0x0000,0x0000, 0x136F,0x0000,0x0000, -0x1370,0x0000,0x0000, 0x1371,0x0000,0x0000, 0x1372,0x0000,0x0000, -0x1373,0x0000,0x0000, 0x1377,0x0000,0x0000, 0x1378,0x0000,0x0000, -0x1379,0x0000,0x0000, 0x137A,0x0000,0x0000, 0x137B,0x0000,0x0000, -0x137C,0x0000,0x0000, 0x137D,0x0000,0x0000, 0x137E,0x0000,0x0000, -0x137F,0x0000,0x0000, 0x1383,0x0000,0x0000, 0x1384,0x0000,0x0000, -0x1385,0x0000,0x0000, 0x1389,0x0000,0x0000, 0x138A,0x0000,0x0000, -0x138E,0x0000,0x0000, 0x1391,0x0000,0x0000, 0x1394,0x0000,0x0000, -0x1395,0x0000,0x0000, 0x1396,0x0000,0x0000, 0x1397,0x0000,0x0000, -0x1398,0x0000,0x0000, 0x1399,0x0000,0x0000, 0x139C,0x0000,0x0000, -0x139D,0x0000,0x0000, 0x139F,0x0000,0x0000, 0x13A0,0x0000,0x0000, -0x13A1,0x0000,0x0000, 0x13A2,0x0000,0x0000, 0x13A3,0x0000,0x0000, -0x13A4,0x0000,0x0000, 0x13A5,0x0000,0x0000, 0x13A6,0x0000,0x0000, -0x13A7,0x0000,0x0000, 0x13A8,0x0000,0x0000, 0x13A9,0x0000,0x0000, -0x13AA,0x0000,0x0000, 0x13AC,0x0000,0x0000, 0x13AD,0x0000,0x0000, -0x13AE,0x0000,0x0000, 0x13AF,0x0000,0x0000, 0x13B6,0x0000,0x0000, -0x13B2,0x0000,0x0000, 0x13B3,0x0000,0x0000, 0x13B4,0x0000,0x0000, -0x13B5,0x0000,0x0000, 0x13B8,0x0000,0x0000, 0x1362,0x0000,0x0000, -0x13BC,0x0000,0x0000, 0x13B9,0x0000,0x0000, 0x13B9,0x0000,0x0000, -0x13BA,0x0000,0x0000, 0x13BE,0x0000,0x0000, 0x13BF,0x0000,0x0000, -0x13C0,0x0000,0x0000, 0x13C1,0x0000,0x0000, 0x13C2,0x0000,0x0000, -0x13C3,0x0000,0x0000, 0x13C4,0x0000,0x0000, 0x13C5,0x0000,0x0000, -0x13C9,0x0000,0x0000, 0x13CA,0x0000,0x0000, 0x13CB,0x0000,0x0000, -0x13C6,0x0000,0x0000, 0x13CC,0x0000,0x0000, 0x13CD,0x0000,0x0000, -0x13CE,0x0000,0x0000, 0x13CE,0x0000,0x0000, 0x025F,0x0000,0x0000, -0x13BC,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x13BD,0x0000,0x0000, 0x13C8,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x034E,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x1374,0x0000,0x0000, 0x1380,0x0000,0x0000, -0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, -0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, -0x0E32,0x0000,0x0000, 0x1386,0x0000,0x0000, 0x138B,0x0000,0x0000, -0x1392,0x0000,0x0000, 0x1347,0x0000,0x0000, 0x13B0,0x0000,0x0000, -0x13BB,0x0000,0x0000 }; - -uint16 page007data[]= { /* 0700 (3 weights per char) */ -0x0270,0x0000,0x0000, 0x0260,0x0000,0x0000, 0x0261,0x0000,0x0000, -0x023F,0x0000,0x0000, 0x0240,0x0000,0x0000, 0x0241,0x0000,0x0000, -0x0242,0x0000,0x0000, 0x0243,0x0000,0x0000, 0x0244,0x0000,0x0000, -0x0259,0x0000,0x0000, 0x02F4,0x0000,0x0000, 0x02F5,0x0000,0x0000, -0x02F6,0x0000,0x0000, 0x02F7,0x0000,0x0000, 0xFBC0,0x870E,0x0000, -0x0000,0x0000,0x0000, 0x13CF,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x13D0,0x0000,0x0000, 0x13D1,0x0000,0x0000, 0x13D1,0x0000,0x0000, -0x13D3,0x0000,0x0000, 0x13D2,0x0000,0x0000, 0x13D4,0x0000,0x0000, -0x13D5,0x0000,0x0000, 0x13D6,0x0000,0x0000, 0x13D8,0x0000,0x0000, -0x13D9,0x0000,0x0000, 0x13D9,0x0000,0x0000, 0x13DA,0x0000,0x0000, -0x13DB,0x0000,0x0000, 0x13DC,0x0000,0x0000, 0x13DE,0x0000,0x0000, -0x13DF,0x0000,0x0000, 0x13E0,0x0000,0x0000, 0x13E1,0x0000,0x0000, -0x13E1,0x0000,0x0000, 0x13E2,0x0000,0x0000, 0x13E3,0x0000,0x0000, -0x13E3,0x0000,0x0000, 0x13E5,0x0000,0x0000, 0x13E6,0x0000,0x0000, -0x13E7,0x0000,0x0000, 0x13E8,0x0000,0x0000, 0x13E9,0x0000,0x0000, -0x13D0,0x0000,0x0000, 0x13D1,0x0000,0x0000, 0x13D3,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x874B,0x0000, 0xFBC0,0x874C,0x0000, 0x13D7,0x0000,0x0000, -0x13DD,0x0000,0x0000, 0x13E4,0x0000,0x0000, 0xFBC0,0x8750,0x0000, -0xFBC0,0x8751,0x0000, 0xFBC0,0x8752,0x0000, 0xFBC0,0x8753,0x0000, -0xFBC0,0x8754,0x0000, 0xFBC0,0x8755,0x0000, 0xFBC0,0x8756,0x0000, -0xFBC0,0x8757,0x0000, 0xFBC0,0x8758,0x0000, 0xFBC0,0x8759,0x0000, -0xFBC0,0x875A,0x0000, 0xFBC0,0x875B,0x0000, 0xFBC0,0x875C,0x0000, -0xFBC0,0x875D,0x0000, 0xFBC0,0x875E,0x0000, 0xFBC0,0x875F,0x0000, -0xFBC0,0x8760,0x0000, 0xFBC0,0x8761,0x0000, 0xFBC0,0x8762,0x0000, -0xFBC0,0x8763,0x0000, 0xFBC0,0x8764,0x0000, 0xFBC0,0x8765,0x0000, -0xFBC0,0x8766,0x0000, 0xFBC0,0x8767,0x0000, 0xFBC0,0x8768,0x0000, -0xFBC0,0x8769,0x0000, 0xFBC0,0x876A,0x0000, 0xFBC0,0x876B,0x0000, -0xFBC0,0x876C,0x0000, 0xFBC0,0x876D,0x0000, 0xFBC0,0x876E,0x0000, -0xFBC0,0x876F,0x0000, 0xFBC0,0x8770,0x0000, 0xFBC0,0x8771,0x0000, -0xFBC0,0x8772,0x0000, 0xFBC0,0x8773,0x0000, 0xFBC0,0x8774,0x0000, -0xFBC0,0x8775,0x0000, 0xFBC0,0x8776,0x0000, 0xFBC0,0x8777,0x0000, -0xFBC0,0x8778,0x0000, 0xFBC0,0x8779,0x0000, 0xFBC0,0x877A,0x0000, -0xFBC0,0x877B,0x0000, 0xFBC0,0x877C,0x0000, 0xFBC0,0x877D,0x0000, -0xFBC0,0x877E,0x0000, 0xFBC0,0x877F,0x0000, 0x13EA,0x0000,0x0000, -0x13ED,0x0000,0x0000, 0x13EE,0x0000,0x0000, 0x13EF,0x0000,0x0000, -0x13F1,0x0000,0x0000, 0x13F2,0x0000,0x0000, 0x13F3,0x0000,0x0000, -0x13F4,0x0000,0x0000, 0x13F7,0x0000,0x0000, 0x13F9,0x0000,0x0000, -0x13FA,0x0000,0x0000, 0x13FB,0x0000,0x0000, 0x13FD,0x0000,0x0000, -0x1401,0x0000,0x0000, 0x1402,0x0000,0x0000, 0x1404,0x0000,0x0000, -0x1405,0x0000,0x0000, 0x1409,0x0000,0x0000, 0x140A,0x0000,0x0000, -0x140B,0x0000,0x0000, 0x140C,0x0000,0x0000, 0x140D,0x0000,0x0000, -0x140E,0x0000,0x0000, 0x140F,0x0000,0x0000, 0x13FE,0x0000,0x0000, -0x13EB,0x0000,0x0000, 0x13EC,0x0000,0x0000, 0x13FC,0x0000,0x0000, -0x13F0,0x0000,0x0000, 0x1406,0x0000,0x0000, 0x1407,0x0000,0x0000, -0x1408,0x0000,0x0000, 0x13FF,0x0000,0x0000, 0x1400,0x0000,0x0000, -0x13F5,0x0000,0x0000, 0x13F6,0x0000,0x0000, 0x1403,0x0000,0x0000, -0x13F8,0x0000,0x0000, 0x1411,0x0000,0x0000, 0x1412,0x0000,0x0000, -0x1413,0x0000,0x0000, 0x1414,0x0000,0x0000, 0x1415,0x0000,0x0000, -0x1416,0x0000,0x0000, 0x1417,0x0000,0x0000, 0x1418,0x0000,0x0000, -0x1419,0x0000,0x0000, 0x141A,0x0000,0x0000, 0x141B,0x0000,0x0000, -0x1410,0x0000,0x0000, 0xFBC0,0x87B2,0x0000, 0xFBC0,0x87B3,0x0000, -0xFBC0,0x87B4,0x0000, 0xFBC0,0x87B5,0x0000, 0xFBC0,0x87B6,0x0000, -0xFBC0,0x87B7,0x0000, 0xFBC0,0x87B8,0x0000, 0xFBC0,0x87B9,0x0000, -0xFBC0,0x87BA,0x0000, 0xFBC0,0x87BB,0x0000, 0xFBC0,0x87BC,0x0000, -0xFBC0,0x87BD,0x0000, 0xFBC0,0x87BE,0x0000, 0xFBC0,0x87BF,0x0000, -0xFBC0,0x87C0,0x0000, 0xFBC0,0x87C1,0x0000, 0xFBC0,0x87C2,0x0000, -0xFBC0,0x87C3,0x0000, 0xFBC0,0x87C4,0x0000, 0xFBC0,0x87C5,0x0000, -0xFBC0,0x87C6,0x0000, 0xFBC0,0x87C7,0x0000, 0xFBC0,0x87C8,0x0000, -0xFBC0,0x87C9,0x0000, 0xFBC0,0x87CA,0x0000, 0xFBC0,0x87CB,0x0000, -0xFBC0,0x87CC,0x0000, 0xFBC0,0x87CD,0x0000, 0xFBC0,0x87CE,0x0000, -0xFBC0,0x87CF,0x0000, 0xFBC0,0x87D0,0x0000, 0xFBC0,0x87D1,0x0000, -0xFBC0,0x87D2,0x0000, 0xFBC0,0x87D3,0x0000, 0xFBC0,0x87D4,0x0000, -0xFBC0,0x87D5,0x0000, 0xFBC0,0x87D6,0x0000, 0xFBC0,0x87D7,0x0000, -0xFBC0,0x87D8,0x0000, 0xFBC0,0x87D9,0x0000, 0xFBC0,0x87DA,0x0000, -0xFBC0,0x87DB,0x0000, 0xFBC0,0x87DC,0x0000, 0xFBC0,0x87DD,0x0000, -0xFBC0,0x87DE,0x0000, 0xFBC0,0x87DF,0x0000, 0xFBC0,0x87E0,0x0000, -0xFBC0,0x87E1,0x0000, 0xFBC0,0x87E2,0x0000, 0xFBC0,0x87E3,0x0000, -0xFBC0,0x87E4,0x0000, 0xFBC0,0x87E5,0x0000, 0xFBC0,0x87E6,0x0000, -0xFBC0,0x87E7,0x0000, 0xFBC0,0x87E8,0x0000, 0xFBC0,0x87E9,0x0000, -0xFBC0,0x87EA,0x0000, 0xFBC0,0x87EB,0x0000, 0xFBC0,0x87EC,0x0000, -0xFBC0,0x87ED,0x0000, 0xFBC0,0x87EE,0x0000, 0xFBC0,0x87EF,0x0000, -0xFBC0,0x87F0,0x0000, 0xFBC0,0x87F1,0x0000, 0xFBC0,0x87F2,0x0000, -0xFBC0,0x87F3,0x0000, 0xFBC0,0x87F4,0x0000, 0xFBC0,0x87F5,0x0000, -0xFBC0,0x87F6,0x0000, 0xFBC0,0x87F7,0x0000, 0xFBC0,0x87F8,0x0000, -0xFBC0,0x87F9,0x0000, 0xFBC0,0x87FA,0x0000, 0xFBC0,0x87FB,0x0000, -0xFBC0,0x87FC,0x0000, 0xFBC0,0x87FD,0x0000, 0xFBC0,0x87FE,0x0000, -0xFBC0,0x87FF,0x0000 }; - -uint16 page009data[]= { /* 0900 (3 weights per char) */ -0xFBC0,0x8900,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x155A,0x0000,0x0000, 0x155B,0x0000,0x0000, -0x155C,0x0000,0x0000, 0x155D,0x0000,0x0000, 0x155E,0x0000,0x0000, -0x155F,0x0000,0x0000, 0x1560,0x0000,0x0000, 0x1561,0x0000,0x0000, -0x1563,0x0000,0x0000, 0x1565,0x0000,0x0000, 0x1566,0x0000,0x0000, -0x1567,0x0000,0x0000, 0x1568,0x0000,0x0000, 0x1569,0x0000,0x0000, -0x156A,0x0000,0x0000, 0x156B,0x0000,0x0000, 0x156C,0x0000,0x0000, -0x156D,0x0000,0x0000, 0x156E,0x0000,0x0000, 0x156F,0x0000,0x0000, -0x1570,0x0000,0x0000, 0x1571,0x0000,0x0000, 0x1572,0x0000,0x0000, -0x1573,0x0000,0x0000, 0x1574,0x0000,0x0000, 0x1575,0x0000,0x0000, -0x1576,0x0000,0x0000, 0x1577,0x0000,0x0000, 0x1578,0x0000,0x0000, -0x1579,0x0000,0x0000, 0x157A,0x0000,0x0000, 0x157B,0x0000,0x0000, -0x157C,0x0000,0x0000, 0x157D,0x0000,0x0000, 0x157E,0x0000,0x0000, -0x157F,0x0000,0x0000, 0x1580,0x0000,0x0000, 0x1580,0x0000,0x0000, -0x1581,0x0000,0x0000, 0x1582,0x0000,0x0000, 0x1583,0x0000,0x0000, -0x1584,0x0000,0x0000, 0x1585,0x0000,0x0000, 0x1586,0x0000,0x0000, -0x1587,0x0000,0x0000, 0x1587,0x0000,0x0000, 0x1588,0x0000,0x0000, -0x1589,0x0000,0x0000, 0x1589,0x0000,0x0000, 0x158A,0x0000,0x0000, -0x158B,0x0000,0x0000, 0x158C,0x0000,0x0000, 0x158D,0x0000,0x0000, -0x158E,0x0000,0x0000, 0xFBC0,0x893A,0x0000, 0xFBC0,0x893B,0x0000, -0x0000,0x0000,0x0000, 0x158F,0x0000,0x0000, 0x1590,0x0000,0x0000, -0x1591,0x0000,0x0000, 0x1592,0x0000,0x0000, 0x1593,0x0000,0x0000, -0x1594,0x0000,0x0000, 0x1595,0x0000,0x0000, 0x1596,0x0000,0x0000, -0x1599,0x0000,0x0000, 0x159A,0x0000,0x0000, 0x159B,0x0000,0x0000, -0x159C,0x0000,0x0000, 0x159D,0x0000,0x0000, 0x159E,0x0000,0x0000, -0x159F,0x0000,0x0000, 0x15A0,0x0000,0x0000, 0x15A1,0x0000,0x0000, -0xFBC0,0x894E,0x0000, 0xFBC0,0x894F,0x0000, 0x1559,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0xFBC0,0x8955,0x0000, 0xFBC0,0x8956,0x0000, -0xFBC0,0x8957,0x0000, 0x156D,0x0000,0x0000, 0x156E,0x0000,0x0000, -0x156F,0x0000,0x0000, 0x1574,0x0000,0x0000, 0x1579,0x0000,0x0000, -0x157A,0x0000,0x0000, 0x1582,0x0000,0x0000, 0x1586,0x0000,0x0000, -0x1562,0x0000,0x0000, 0x1564,0x0000,0x0000, 0x1597,0x0000,0x0000, -0x1598,0x0000,0x0000, 0x0268,0x0000,0x0000, 0x0269,0x0000,0x0000, -0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, -0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, -0x0E32,0x0000,0x0000, 0x02FA,0x0000,0x0000, 0xFBC0,0x8971,0x0000, -0xFBC0,0x8972,0x0000, 0xFBC0,0x8973,0x0000, 0xFBC0,0x8974,0x0000, -0xFBC0,0x8975,0x0000, 0xFBC0,0x8976,0x0000, 0xFBC0,0x8977,0x0000, -0xFBC0,0x8978,0x0000, 0xFBC0,0x8979,0x0000, 0xFBC0,0x897A,0x0000, -0xFBC0,0x897B,0x0000, 0xFBC0,0x897C,0x0000, 0xFBC0,0x897D,0x0000, -0xFBC0,0x897E,0x0000, 0xFBC0,0x897F,0x0000, 0xFBC0,0x8980,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x8984,0x0000, 0x15A2,0x0000,0x0000, 0x15A3,0x0000,0x0000, -0x15A4,0x0000,0x0000, 0x15A5,0x0000,0x0000, 0x15A6,0x0000,0x0000, -0x15A7,0x0000,0x0000, 0x15A8,0x0000,0x0000, 0x15AA,0x0000,0x0000, -0xFBC0,0x898D,0x0000, 0xFBC0,0x898E,0x0000, 0x15AC,0x0000,0x0000, -0x15AD,0x0000,0x0000, 0xFBC0,0x8991,0x0000, 0xFBC0,0x8992,0x0000, -0x15AE,0x0000,0x0000, 0x15AF,0x0000,0x0000, 0x15B0,0x0000,0x0000, -0x15B1,0x0000,0x0000, 0x15B2,0x0000,0x0000, 0x15B3,0x0000,0x0000, -0x15B4,0x0000,0x0000, 0x15B5,0x0000,0x0000, 0x15B6,0x0000,0x0000, -0x15B7,0x0000,0x0000, 0x15B8,0x0000,0x0000, 0x15B9,0x0000,0x0000, -0x15BA,0x0000,0x0000, 0x15BB,0x0000,0x0000, 0x15BC,0x0000,0x0000, -0x15BD,0x0000,0x0000, 0x15BE,0x0000,0x0000, 0x15BF,0x0000,0x0000, -0x15C0,0x0000,0x0000, 0x15C1,0x0000,0x0000, 0x15C2,0x0000,0x0000, -0x15C3,0x0000,0x0000, 0xFBC0,0x89A9,0x0000, 0x15C4,0x0000,0x0000, -0x15C5,0x0000,0x0000, 0x15C6,0x0000,0x0000, 0x15C7,0x0000,0x0000, -0x15C8,0x0000,0x0000, 0x15C9,0x0000,0x0000, 0x15CA,0x0000,0x0000, -0xFBC0,0x89B1,0x0000, 0x15CC,0x0000,0x0000, 0xFBC0,0x89B3,0x0000, -0xFBC0,0x89B4,0x0000, 0xFBC0,0x89B5,0x0000, 0x15CE,0x0000,0x0000, -0x15CF,0x0000,0x0000, 0x15D0,0x0000,0x0000, 0x15D1,0x0000,0x0000, -0xFBC0,0x89BA,0x0000, 0xFBC0,0x89BB,0x0000, 0x0000,0x0000,0x0000, -0x15D2,0x0000,0x0000, 0x15D3,0x0000,0x0000, 0x15D4,0x0000,0x0000, -0x15D5,0x0000,0x0000, 0x15D6,0x0000,0x0000, 0x15D7,0x0000,0x0000, -0x15D8,0x0000,0x0000, 0x15D9,0x0000,0x0000, 0xFBC0,0x89C5,0x0000, -0xFBC0,0x89C6,0x0000, 0x15DC,0x0000,0x0000, 0x15DD,0x0000,0x0000, -0xFBC0,0x89C9,0x0000, 0xFBC0,0x89CA,0x0000, 0x15DE,0x0000,0x0000, -0x15DF,0x0000,0x0000, 0x15E0,0x0000,0x0000, 0xFBC0,0x89CE,0x0000, -0xFBC0,0x89CF,0x0000, 0xFBC0,0x89D0,0x0000, 0xFBC0,0x89D1,0x0000, -0xFBC0,0x89D2,0x0000, 0xFBC0,0x89D3,0x0000, 0xFBC0,0x89D4,0x0000, -0xFBC0,0x89D5,0x0000, 0xFBC0,0x89D6,0x0000, 0x15E1,0x0000,0x0000, -0xFBC0,0x89D8,0x0000, 0xFBC0,0x89D9,0x0000, 0xFBC0,0x89DA,0x0000, -0xFBC0,0x89DB,0x0000, 0x15BC,0x0000,0x0000, 0x15BD,0x0000,0x0000, -0xFBC0,0x89DE,0x0000, 0x15C9,0x0000,0x0000, 0x15A9,0x0000,0x0000, -0x15AB,0x0000,0x0000, 0x15DA,0x0000,0x0000, 0x15DB,0x0000,0x0000, -0xFBC0,0x89E4,0x0000, 0xFBC0,0x89E5,0x0000, 0x0E29,0x0000,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0x15CB,0x0000,0x0000, 0x15CD,0x0000,0x0000, 0x0E12,0x0000,0x0000, -0x0E13,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0DC7,0x0000,0x0000, -0x0DC8,0x0000,0x0000, 0x0350,0x0000,0x0000, 0xFBC0,0x89FB,0x0000, -0xFBC0,0x89FC,0x0000, 0xFBC0,0x89FD,0x0000, 0xFBC0,0x89FE,0x0000, -0xFBC0,0x89FF,0x0000 }; - -uint16 page00Adata[]= { /* 0A00 (3 weights per char) */ -0xFBC0,0x8A00,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0xFBC0,0x8A04,0x0000, 0x15E7,0x0000,0x0000, -0x15E8,0x0000,0x0000, 0x15EC,0x0000,0x0000, 0x15ED,0x0000,0x0000, -0x15E4,0x0000,0x0000, 0x15E5,0x0000,0x0000, 0xFBC0,0x8A0B,0x0000, -0xFBC0,0x8A0C,0x0000, 0xFBC0,0x8A0D,0x0000, 0xFBC0,0x8A0E,0x0000, -0x15EE,0x0000,0x0000, 0x15E9,0x0000,0x0000, 0xFBC0,0x8A11,0x0000, -0xFBC0,0x8A12,0x0000, 0x15E6,0x0000,0x0000, 0x15EA,0x0000,0x0000, -0x15F1,0x0000,0x0000, 0x15F2,0x0000,0x0000, 0x15F3,0x0000,0x0000, -0x15F4,0x0000,0x0000, 0x15F5,0x0000,0x0000, 0x15F6,0x0000,0x0000, -0x15F7,0x0000,0x0000, 0x15F8,0x0000,0x0000, 0x15F9,0x0000,0x0000, -0x15FA,0x0000,0x0000, 0x15FB,0x0000,0x0000, 0x15FC,0x0000,0x0000, -0x15FD,0x0000,0x0000, 0x15FE,0x0000,0x0000, 0x15FF,0x0000,0x0000, -0x1600,0x0000,0x0000, 0x1601,0x0000,0x0000, 0x1602,0x0000,0x0000, -0x1603,0x0000,0x0000, 0x1604,0x0000,0x0000, 0xFBC0,0x8A29,0x0000, -0x1605,0x0000,0x0000, 0x1606,0x0000,0x0000, 0x1607,0x0000,0x0000, -0x1608,0x0000,0x0000, 0x1609,0x0000,0x0000, 0x160A,0x0000,0x0000, -0x160B,0x0000,0x0000, 0xFBC0,0x8A31,0x0000, 0x160C,0x0000,0x0000, -0x160C,0x0000,0x0000, 0xFBC0,0x8A34,0x0000, 0x160D,0x0000,0x0000, -0x15EF,0x0000,0x0000, 0xFBC0,0x8A37,0x0000, 0x15EF,0x0000,0x0000, -0x15F0,0x0000,0x0000, 0xFBC0,0x8A3A,0x0000, 0xFBC0,0x8A3B,0x0000, -0x0000,0x0000,0x0000, 0xFBC0,0x8A3D,0x0000, 0x160F,0x0000,0x0000, -0x1610,0x0000,0x0000, 0x1611,0x0000,0x0000, 0x1612,0x0000,0x0000, -0x1613,0x0000,0x0000, 0xFBC0,0x8A43,0x0000, 0xFBC0,0x8A44,0x0000, -0xFBC0,0x8A45,0x0000, 0xFBC0,0x8A46,0x0000, 0x1614,0x0000,0x0000, -0x1615,0x0000,0x0000, 0xFBC0,0x8A49,0x0000, 0xFBC0,0x8A4A,0x0000, -0x1616,0x0000,0x0000, 0x1617,0x0000,0x0000, 0x1618,0x0000,0x0000, -0xFBC0,0x8A4E,0x0000, 0xFBC0,0x8A4F,0x0000, 0xFBC0,0x8A50,0x0000, -0xFBC0,0x8A51,0x0000, 0xFBC0,0x8A52,0x0000, 0xFBC0,0x8A53,0x0000, -0xFBC0,0x8A54,0x0000, 0xFBC0,0x8A55,0x0000, 0xFBC0,0x8A56,0x0000, -0xFBC0,0x8A57,0x0000, 0xFBC0,0x8A58,0x0000, 0x15F2,0x0000,0x0000, -0x15F3,0x0000,0x0000, 0x15F8,0x0000,0x0000, 0x160E,0x0000,0x0000, -0xFBC0,0x8A5D,0x0000, 0x1606,0x0000,0x0000, 0xFBC0,0x8A5F,0x0000, -0xFBC0,0x8A60,0x0000, 0xFBC0,0x8A61,0x0000, 0xFBC0,0x8A62,0x0000, -0xFBC0,0x8A63,0x0000, 0xFBC0,0x8A64,0x0000, 0xFBC0,0x8A65,0x0000, -0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, -0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, -0x0E32,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x15EB,0x0000,0x0000, 0x15E3,0x0000,0x0000, 0x15E2,0x0000,0x0000, -0xFBC0,0x8A75,0x0000, 0xFBC0,0x8A76,0x0000, 0xFBC0,0x8A77,0x0000, -0xFBC0,0x8A78,0x0000, 0xFBC0,0x8A79,0x0000, 0xFBC0,0x8A7A,0x0000, -0xFBC0,0x8A7B,0x0000, 0xFBC0,0x8A7C,0x0000, 0xFBC0,0x8A7D,0x0000, -0xFBC0,0x8A7E,0x0000, 0xFBC0,0x8A7F,0x0000, 0xFBC0,0x8A80,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x8A84,0x0000, 0x161A,0x0000,0x0000, 0x161B,0x0000,0x0000, -0x161C,0x0000,0x0000, 0x161D,0x0000,0x0000, 0x161E,0x0000,0x0000, -0x161F,0x0000,0x0000, 0x1620,0x0000,0x0000, 0x1622,0x0000,0x0000, -0x1624,0x0000,0x0000, 0xFBC0,0x8A8E,0x0000, 0x1625,0x0000,0x0000, -0x1626,0x0000,0x0000, 0x1627,0x0000,0x0000, 0xFBC0,0x8A92,0x0000, -0x1628,0x0000,0x0000, 0x1629,0x0000,0x0000, 0x162A,0x0000,0x0000, -0x162B,0x0000,0x0000, 0x162C,0x0000,0x0000, 0x162D,0x0000,0x0000, -0x162E,0x0000,0x0000, 0x162F,0x0000,0x0000, 0x1630,0x0000,0x0000, -0x1631,0x0000,0x0000, 0x1632,0x0000,0x0000, 0x1633,0x0000,0x0000, -0x1634,0x0000,0x0000, 0x1635,0x0000,0x0000, 0x1636,0x0000,0x0000, -0x1637,0x0000,0x0000, 0x1638,0x0000,0x0000, 0x1639,0x0000,0x0000, -0x163A,0x0000,0x0000, 0x163B,0x0000,0x0000, 0x163C,0x0000,0x0000, -0x163D,0x0000,0x0000, 0xFBC0,0x8AA9,0x0000, 0x163E,0x0000,0x0000, -0x163F,0x0000,0x0000, 0x1640,0x0000,0x0000, 0x1641,0x0000,0x0000, -0x1642,0x0000,0x0000, 0x1643,0x0000,0x0000, 0x1644,0x0000,0x0000, -0xFBC0,0x8AB1,0x0000, 0x1645,0x0000,0x0000, 0x1646,0x0000,0x0000, -0xFBC0,0x8AB4,0x0000, 0x1647,0x0000,0x0000, 0x1648,0x0000,0x0000, -0x1649,0x0000,0x0000, 0x164A,0x0000,0x0000, 0x164B,0x0000,0x0000, -0xFBC0,0x8ABA,0x0000, 0xFBC0,0x8ABB,0x0000, 0x0000,0x0000,0x0000, -0x164C,0x0000,0x0000, 0x164D,0x0000,0x0000, 0x164E,0x0000,0x0000, -0x164F,0x0000,0x0000, 0x1650,0x0000,0x0000, 0x1651,0x0000,0x0000, -0x1652,0x0000,0x0000, 0x1653,0x0000,0x0000, 0x1656,0x0000,0x0000, -0xFBC0,0x8AC6,0x0000, 0x1657,0x0000,0x0000, 0x1658,0x0000,0x0000, -0x1659,0x0000,0x0000, 0xFBC0,0x8ACA,0x0000, 0x165A,0x0000,0x0000, -0x165B,0x0000,0x0000, 0x165C,0x0000,0x0000, 0xFBC0,0x8ACE,0x0000, -0xFBC0,0x8ACF,0x0000, 0x1619,0x0000,0x0000, 0xFBC0,0x8AD1,0x0000, -0xFBC0,0x8AD2,0x0000, 0xFBC0,0x8AD3,0x0000, 0xFBC0,0x8AD4,0x0000, -0xFBC0,0x8AD5,0x0000, 0xFBC0,0x8AD6,0x0000, 0xFBC0,0x8AD7,0x0000, -0xFBC0,0x8AD8,0x0000, 0xFBC0,0x8AD9,0x0000, 0xFBC0,0x8ADA,0x0000, -0xFBC0,0x8ADB,0x0000, 0xFBC0,0x8ADC,0x0000, 0xFBC0,0x8ADD,0x0000, -0xFBC0,0x8ADE,0x0000, 0xFBC0,0x8ADF,0x0000, 0x1621,0x0000,0x0000, -0x1623,0x0000,0x0000, 0x1654,0x0000,0x0000, 0x1655,0x0000,0x0000, -0xFBC0,0x8AE4,0x0000, 0xFBC0,0x8AE5,0x0000, 0x0E29,0x0000,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0xFBC0,0x8AF0,0x0000, 0x0E14,0x0000,0x0000, 0xFBC0,0x8AF2,0x0000, -0xFBC0,0x8AF3,0x0000, 0xFBC0,0x8AF4,0x0000, 0xFBC0,0x8AF5,0x0000, -0xFBC0,0x8AF6,0x0000, 0xFBC0,0x8AF7,0x0000, 0xFBC0,0x8AF8,0x0000, -0xFBC0,0x8AF9,0x0000, 0xFBC0,0x8AFA,0x0000, 0xFBC0,0x8AFB,0x0000, -0xFBC0,0x8AFC,0x0000, 0xFBC0,0x8AFD,0x0000, 0xFBC0,0x8AFE,0x0000, -0xFBC0,0x8AFF,0x0000 }; - -uint16 page00Bdata[]= { /* 0B00 (3 weights per char) */ -0xFBC0,0x8B00,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0xFBC0,0x8B04,0x0000, 0x165D,0x0000,0x0000, -0x165E,0x0000,0x0000, 0x165F,0x0000,0x0000, 0x1660,0x0000,0x0000, -0x1661,0x0000,0x0000, 0x1662,0x0000,0x0000, 0x1663,0x0000,0x0000, -0x1665,0x0000,0x0000, 0xFBC0,0x8B0D,0x0000, 0xFBC0,0x8B0E,0x0000, -0x1667,0x0000,0x0000, 0x1668,0x0000,0x0000, 0xFBC0,0x8B11,0x0000, -0xFBC0,0x8B12,0x0000, 0x1669,0x0000,0x0000, 0x166A,0x0000,0x0000, -0x166B,0x0000,0x0000, 0x166C,0x0000,0x0000, 0x166D,0x0000,0x0000, -0x166E,0x0000,0x0000, 0x166F,0x0000,0x0000, 0x1670,0x0000,0x0000, -0x1671,0x0000,0x0000, 0x1672,0x0000,0x0000, 0x1673,0x0000,0x0000, -0x1674,0x0000,0x0000, 0x1675,0x0000,0x0000, 0x1676,0x0000,0x0000, -0x1677,0x0000,0x0000, 0x1678,0x0000,0x0000, 0x1679,0x0000,0x0000, -0x167A,0x0000,0x0000, 0x167B,0x0000,0x0000, 0x167C,0x0000,0x0000, -0x167D,0x0000,0x0000, 0x167E,0x0000,0x0000, 0xFBC0,0x8B29,0x0000, -0x167F,0x0000,0x0000, 0x1680,0x0000,0x0000, 0x1681,0x0000,0x0000, -0x1682,0x0000,0x0000, 0x1683,0x0000,0x0000, 0x1684,0x0000,0x0000, -0x1686,0x0000,0x0000, 0xFBC0,0x8B31,0x0000, 0x1687,0x0000,0x0000, -0x1688,0x0000,0x0000, 0xFBC0,0x8B34,0x0000, 0x1689,0x0000,0x0000, -0x168B,0x0000,0x0000, 0x168C,0x0000,0x0000, 0x168D,0x0000,0x0000, -0x168E,0x0000,0x0000, 0xFBC0,0x8B3A,0x0000, 0xFBC0,0x8B3B,0x0000, -0x0000,0x0000,0x0000, 0x168F,0x0000,0x0000, 0x1690,0x0000,0x0000, -0x1691,0x0000,0x0000, 0x1692,0x0000,0x0000, 0x1693,0x0000,0x0000, -0x1694,0x0000,0x0000, 0x1695,0x0000,0x0000, 0xFBC0,0x8B44,0x0000, -0xFBC0,0x8B45,0x0000, 0xFBC0,0x8B46,0x0000, 0x1696,0x0000,0x0000, -0x1697,0x0000,0x0000, 0xFBC0,0x8B49,0x0000, 0xFBC0,0x8B4A,0x0000, -0x1698,0x0000,0x0000, 0x1699,0x0000,0x0000, 0x169A,0x0000,0x0000, -0xFBC0,0x8B4E,0x0000, 0xFBC0,0x8B4F,0x0000, 0xFBC0,0x8B50,0x0000, -0xFBC0,0x8B51,0x0000, 0xFBC0,0x8B52,0x0000, 0xFBC0,0x8B53,0x0000, -0xFBC0,0x8B54,0x0000, 0xFBC0,0x8B55,0x0000, 0x169B,0x0000,0x0000, -0x169C,0x0000,0x0000, 0xFBC0,0x8B58,0x0000, 0xFBC0,0x8B59,0x0000, -0xFBC0,0x8B5A,0x0000, 0xFBC0,0x8B5B,0x0000, 0x1677,0x0000,0x0000, -0x1678,0x0000,0x0000, 0xFBC0,0x8B5E,0x0000, 0x1685,0x0000,0x0000, -0x1664,0x0000,0x0000, 0x1666,0x0000,0x0000, 0xFBC0,0x8B62,0x0000, -0xFBC0,0x8B63,0x0000, 0xFBC0,0x8B64,0x0000, 0xFBC0,0x8B65,0x0000, -0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, -0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, -0x0E32,0x0000,0x0000, 0x0351,0x0000,0x0000, 0x168A,0x0000,0x0000, -0xFBC0,0x8B72,0x0000, 0xFBC0,0x8B73,0x0000, 0xFBC0,0x8B74,0x0000, -0xFBC0,0x8B75,0x0000, 0xFBC0,0x8B76,0x0000, 0xFBC0,0x8B77,0x0000, -0xFBC0,0x8B78,0x0000, 0xFBC0,0x8B79,0x0000, 0xFBC0,0x8B7A,0x0000, -0xFBC0,0x8B7B,0x0000, 0xFBC0,0x8B7C,0x0000, 0xFBC0,0x8B7D,0x0000, -0xFBC0,0x8B7E,0x0000, 0xFBC0,0x8B7F,0x0000, 0xFBC0,0x8B80,0x0000, -0xFBC0,0x8B81,0x0000, 0x0000,0x0000,0x0000, 0x169D,0x0000,0x0000, -0xFBC0,0x8B84,0x0000, 0x169E,0x0000,0x0000, 0x169F,0x0000,0x0000, -0x16A0,0x0000,0x0000, 0x16A1,0x0000,0x0000, 0x16A2,0x0000,0x0000, -0x16A3,0x0000,0x0000, 0xFBC0,0x8B8B,0x0000, 0xFBC0,0x8B8C,0x0000, -0xFBC0,0x8B8D,0x0000, 0x16A4,0x0000,0x0000, 0x16A5,0x0000,0x0000, -0x16A6,0x0000,0x0000, 0xFBC0,0x8B91,0x0000, 0x16A7,0x0000,0x0000, -0x16A8,0x0000,0x0000, 0x16A9,0x0000,0x0000, 0x16AA,0x0000,0x0000, -0xFBC0,0x8B96,0x0000, 0xFBC0,0x8B97,0x0000, 0xFBC0,0x8B98,0x0000, -0x16AB,0x0000,0x0000, 0x16AC,0x0000,0x0000, 0xFBC0,0x8B9B,0x0000, -0x16AD,0x0000,0x0000, 0xFBC0,0x8B9D,0x0000, 0x16AE,0x0000,0x0000, -0x16AF,0x0000,0x0000, 0xFBC0,0x8BA0,0x0000, 0xFBC0,0x8BA1,0x0000, -0xFBC0,0x8BA2,0x0000, 0x16B0,0x0000,0x0000, 0x16B1,0x0000,0x0000, -0xFBC0,0x8BA5,0x0000, 0xFBC0,0x8BA6,0x0000, 0xFBC0,0x8BA7,0x0000, -0x16B2,0x0000,0x0000, 0x16B3,0x0000,0x0000, 0x16B4,0x0000,0x0000, -0xFBC0,0x8BAB,0x0000, 0xFBC0,0x8BAC,0x0000, 0xFBC0,0x8BAD,0x0000, -0x16B5,0x0000,0x0000, 0x16B6,0x0000,0x0000, 0x16B7,0x0000,0x0000, -0x16B8,0x0000,0x0000, 0x16B9,0x0000,0x0000, 0x16BA,0x0000,0x0000, -0x16BB,0x0000,0x0000, 0x16BC,0x0000,0x0000, 0xFBC0,0x8BB6,0x0000, -0x16BD,0x0000,0x0000, 0x16BE,0x0000,0x0000, 0x16BF,0x0000,0x0000, -0xFBC0,0x8BBA,0x0000, 0xFBC0,0x8BBB,0x0000, 0xFBC0,0x8BBC,0x0000, -0xFBC0,0x8BBD,0x0000, 0x16C0,0x0000,0x0000, 0x16C1,0x0000,0x0000, -0x16C2,0x0000,0x0000, 0x16C3,0x0000,0x0000, 0x16C4,0x0000,0x0000, -0xFBC0,0x8BC3,0x0000, 0xFBC0,0x8BC4,0x0000, 0xFBC0,0x8BC5,0x0000, -0x16C5,0x0000,0x0000, 0x16C6,0x0000,0x0000, 0x16C7,0x0000,0x0000, -0xFBC0,0x8BC9,0x0000, 0x16C8,0x0000,0x0000, 0x16C9,0x0000,0x0000, -0x16CA,0x0000,0x0000, 0x16CB,0x0000,0x0000, 0xFBC0,0x8BCE,0x0000, -0xFBC0,0x8BCF,0x0000, 0xFBC0,0x8BD0,0x0000, 0xFBC0,0x8BD1,0x0000, -0xFBC0,0x8BD2,0x0000, 0xFBC0,0x8BD3,0x0000, 0xFBC0,0x8BD4,0x0000, -0xFBC0,0x8BD5,0x0000, 0xFBC0,0x8BD6,0x0000, 0x16CC,0x0000,0x0000, -0xFBC0,0x8BD8,0x0000, 0xFBC0,0x8BD9,0x0000, 0xFBC0,0x8BDA,0x0000, -0xFBC0,0x8BDB,0x0000, 0xFBC0,0x8BDC,0x0000, 0xFBC0,0x8BDD,0x0000, -0xFBC0,0x8BDE,0x0000, 0xFBC0,0x8BDF,0x0000, 0xFBC0,0x8BE0,0x0000, -0xFBC0,0x8BE1,0x0000, 0xFBC0,0x8BE2,0x0000, 0xFBC0,0x8BE3,0x0000, -0xFBC0,0x8BE4,0x0000, 0xFBC0,0x8BE5,0x0000, 0xFBC0,0x8BE6,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0x0DC9,0x0000,0x0000, 0x0DCA,0x0000,0x0000, 0x0DCB,0x0000,0x0000, -0x0352,0x0000,0x0000, 0x0353,0x0000,0x0000, 0x0354,0x0000,0x0000, -0x0355,0x0000,0x0000, 0x0356,0x0000,0x0000, 0x0357,0x0000,0x0000, -0x0E15,0x0000,0x0000, 0x0358,0x0000,0x0000, 0xFBC0,0x8BFB,0x0000, -0xFBC0,0x8BFC,0x0000, 0xFBC0,0x8BFD,0x0000, 0xFBC0,0x8BFE,0x0000, -0xFBC0,0x8BFF,0x0000 }; - -uint16 page00Cdata[]= { /* 0C00 (3 weights per char) */ -0xFBC0,0x8C00,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0xFBC0,0x8C04,0x0000, 0x16CD,0x0000,0x0000, -0x16CE,0x0000,0x0000, 0x16CF,0x0000,0x0000, 0x16D0,0x0000,0x0000, -0x16D1,0x0000,0x0000, 0x16D2,0x0000,0x0000, 0x16D3,0x0000,0x0000, -0x16D5,0x0000,0x0000, 0xFBC0,0x8C0D,0x0000, 0x16D7,0x0000,0x0000, -0x16D8,0x0000,0x0000, 0x16D9,0x0000,0x0000, 0xFBC0,0x8C11,0x0000, -0x16DA,0x0000,0x0000, 0x16DB,0x0000,0x0000, 0x16DC,0x0000,0x0000, -0x16DD,0x0000,0x0000, 0x16DE,0x0000,0x0000, 0x16DF,0x0000,0x0000, -0x16E0,0x0000,0x0000, 0x16E1,0x0000,0x0000, 0x16E2,0x0000,0x0000, -0x16E3,0x0000,0x0000, 0x16E4,0x0000,0x0000, 0x16E5,0x0000,0x0000, -0x16E6,0x0000,0x0000, 0x16E7,0x0000,0x0000, 0x16E8,0x0000,0x0000, -0x16E9,0x0000,0x0000, 0x16EA,0x0000,0x0000, 0x16EB,0x0000,0x0000, -0x16EC,0x0000,0x0000, 0x16ED,0x0000,0x0000, 0x16EE,0x0000,0x0000, -0x16EF,0x0000,0x0000, 0x16F0,0x0000,0x0000, 0xFBC0,0x8C29,0x0000, -0x16F1,0x0000,0x0000, 0x16F2,0x0000,0x0000, 0x16F3,0x0000,0x0000, -0x16F4,0x0000,0x0000, 0x16F5,0x0000,0x0000, 0x16F6,0x0000,0x0000, -0x16F7,0x0000,0x0000, 0x16F8,0x0000,0x0000, 0x16F9,0x0000,0x0000, -0x16FA,0x0000,0x0000, 0xFBC0,0x8C34,0x0000, 0x16FB,0x0000,0x0000, -0x16FC,0x0000,0x0000, 0x16FD,0x0000,0x0000, 0x16FE,0x0000,0x0000, -0x16FF,0x0000,0x0000, 0xFBC0,0x8C3A,0x0000, 0xFBC0,0x8C3B,0x0000, -0xFBC0,0x8C3C,0x0000, 0xFBC0,0x8C3D,0x0000, 0x1700,0x0000,0x0000, -0x1701,0x0000,0x0000, 0x1702,0x0000,0x0000, 0x1703,0x0000,0x0000, -0x1704,0x0000,0x0000, 0x1705,0x0000,0x0000, 0x1706,0x0000,0x0000, -0xFBC0,0x8C45,0x0000, 0x1707,0x0000,0x0000, 0x1708,0x0000,0x0000, -0x1709,0x0000,0x0000, 0xFBC0,0x8C49,0x0000, 0x170A,0x0000,0x0000, -0x170B,0x0000,0x0000, 0x170C,0x0000,0x0000, 0x170D,0x0000,0x0000, -0xFBC0,0x8C4E,0x0000, 0xFBC0,0x8C4F,0x0000, 0xFBC0,0x8C50,0x0000, -0xFBC0,0x8C51,0x0000, 0xFBC0,0x8C52,0x0000, 0xFBC0,0x8C53,0x0000, -0xFBC0,0x8C54,0x0000, 0x170E,0x0000,0x0000, 0x170F,0x0000,0x0000, -0xFBC0,0x8C57,0x0000, 0xFBC0,0x8C58,0x0000, 0xFBC0,0x8C59,0x0000, -0xFBC0,0x8C5A,0x0000, 0xFBC0,0x8C5B,0x0000, 0xFBC0,0x8C5C,0x0000, -0xFBC0,0x8C5D,0x0000, 0xFBC0,0x8C5E,0x0000, 0xFBC0,0x8C5F,0x0000, -0x16D4,0x0000,0x0000, 0x16D6,0x0000,0x0000, 0xFBC0,0x8C62,0x0000, -0xFBC0,0x8C63,0x0000, 0xFBC0,0x8C64,0x0000, 0xFBC0,0x8C65,0x0000, -0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, -0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, -0x0E32,0x0000,0x0000, 0xFBC0,0x8C70,0x0000, 0xFBC0,0x8C71,0x0000, -0xFBC0,0x8C72,0x0000, 0xFBC0,0x8C73,0x0000, 0xFBC0,0x8C74,0x0000, -0xFBC0,0x8C75,0x0000, 0xFBC0,0x8C76,0x0000, 0xFBC0,0x8C77,0x0000, -0xFBC0,0x8C78,0x0000, 0xFBC0,0x8C79,0x0000, 0xFBC0,0x8C7A,0x0000, -0xFBC0,0x8C7B,0x0000, 0xFBC0,0x8C7C,0x0000, 0xFBC0,0x8C7D,0x0000, -0xFBC0,0x8C7E,0x0000, 0xFBC0,0x8C7F,0x0000, 0xFBC0,0x8C80,0x0000, -0xFBC0,0x8C81,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x8C84,0x0000, 0x1710,0x0000,0x0000, 0x1711,0x0000,0x0000, -0x1712,0x0000,0x0000, 0x1713,0x0000,0x0000, 0x1714,0x0000,0x0000, -0x1715,0x0000,0x0000, 0x1716,0x0000,0x0000, 0x1718,0x0000,0x0000, -0xFBC0,0x8C8D,0x0000, 0x171A,0x0000,0x0000, 0x171B,0x0000,0x0000, -0x171C,0x0000,0x0000, 0xFBC0,0x8C91,0x0000, 0x171D,0x0000,0x0000, -0x171E,0x0000,0x0000, 0x171F,0x0000,0x0000, 0x1720,0x0000,0x0000, -0x1721,0x0000,0x0000, 0x1722,0x0000,0x0000, 0x1723,0x0000,0x0000, -0x1724,0x0000,0x0000, 0x1725,0x0000,0x0000, 0x1726,0x0000,0x0000, -0x1727,0x0000,0x0000, 0x1728,0x0000,0x0000, 0x1729,0x0000,0x0000, -0x172A,0x0000,0x0000, 0x172B,0x0000,0x0000, 0x172C,0x0000,0x0000, -0x172D,0x0000,0x0000, 0x172E,0x0000,0x0000, 0x172F,0x0000,0x0000, -0x1730,0x0000,0x0000, 0x1731,0x0000,0x0000, 0x1732,0x0000,0x0000, -0x1733,0x0000,0x0000, 0xFBC0,0x8CA9,0x0000, 0x1734,0x0000,0x0000, -0x1735,0x0000,0x0000, 0x1736,0x0000,0x0000, 0x1737,0x0000,0x0000, -0x1738,0x0000,0x0000, 0x1739,0x0000,0x0000, 0x173A,0x0000,0x0000, -0x173B,0x0000,0x0000, 0x173C,0x0000,0x0000, 0x1743,0x0000,0x0000, -0xFBC0,0x8CB4,0x0000, 0x173D,0x0000,0x0000, 0x173E,0x0000,0x0000, -0x173F,0x0000,0x0000, 0x1740,0x0000,0x0000, 0x1741,0x0000,0x0000, -0xFBC0,0x8CBA,0x0000, 0xFBC0,0x8CBB,0x0000, 0x0000,0x0000,0x0000, -0x1742,0x0000,0x0000, 0x1745,0x0000,0x0000, 0x1746,0x0000,0x0000, -0x1747,0x0000,0x0000, 0x1748,0x0000,0x0000, 0x1749,0x0000,0x0000, -0x174A,0x0000,0x0000, 0x174B,0x0000,0x0000, 0xFBC0,0x8CC5,0x0000, -0x174C,0x0000,0x0000, 0x174D,0x0000,0x0000, 0x174E,0x0000,0x0000, -0xFBC0,0x8CC9,0x0000, 0x174F,0x0000,0x0000, 0x1750,0x0000,0x0000, -0x1751,0x0000,0x0000, 0x1752,0x0000,0x0000, 0xFBC0,0x8CCE,0x0000, -0xFBC0,0x8CCF,0x0000, 0xFBC0,0x8CD0,0x0000, 0xFBC0,0x8CD1,0x0000, -0xFBC0,0x8CD2,0x0000, 0xFBC0,0x8CD3,0x0000, 0xFBC0,0x8CD4,0x0000, -0x1753,0x0000,0x0000, 0x1754,0x0000,0x0000, 0xFBC0,0x8CD7,0x0000, -0xFBC0,0x8CD8,0x0000, 0xFBC0,0x8CD9,0x0000, 0xFBC0,0x8CDA,0x0000, -0xFBC0,0x8CDB,0x0000, 0xFBC0,0x8CDC,0x0000, 0xFBC0,0x8CDD,0x0000, -0x1744,0x0000,0x0000, 0xFBC0,0x8CDF,0x0000, 0x1717,0x0000,0x0000, -0x1719,0x0000,0x0000, 0xFBC0,0x8CE2,0x0000, 0xFBC0,0x8CE3,0x0000, -0xFBC0,0x8CE4,0x0000, 0xFBC0,0x8CE5,0x0000, 0x0E29,0x0000,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0xFBC0,0x8CF0,0x0000, 0xFBC0,0x8CF1,0x0000, 0xFBC0,0x8CF2,0x0000, -0xFBC0,0x8CF3,0x0000, 0xFBC0,0x8CF4,0x0000, 0xFBC0,0x8CF5,0x0000, -0xFBC0,0x8CF6,0x0000, 0xFBC0,0x8CF7,0x0000, 0xFBC0,0x8CF8,0x0000, -0xFBC0,0x8CF9,0x0000, 0xFBC0,0x8CFA,0x0000, 0xFBC0,0x8CFB,0x0000, -0xFBC0,0x8CFC,0x0000, 0xFBC0,0x8CFD,0x0000, 0xFBC0,0x8CFE,0x0000, -0xFBC0,0x8CFF,0x0000 }; - -uint16 page00Ddata[]= { /* 0D00 (3 weights per char) */ -0xFBC0,0x8D00,0x0000, 0xFBC0,0x8D01,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0xFBC0,0x8D04,0x0000, 0x1755,0x0000,0x0000, -0x1756,0x0000,0x0000, 0x1757,0x0000,0x0000, 0x1758,0x0000,0x0000, -0x1759,0x0000,0x0000, 0x175A,0x0000,0x0000, 0x175B,0x0000,0x0000, -0x175D,0x0000,0x0000, 0xFBC0,0x8D0D,0x0000, 0x175F,0x0000,0x0000, -0x1760,0x0000,0x0000, 0x1761,0x0000,0x0000, 0xFBC0,0x8D11,0x0000, -0x1762,0x0000,0x0000, 0x1763,0x0000,0x0000, 0x1764,0x0000,0x0000, -0x1765,0x0000,0x0000, 0x1766,0x0000,0x0000, 0x1767,0x0000,0x0000, -0x1768,0x0000,0x0000, 0x1769,0x0000,0x0000, 0x176A,0x0000,0x0000, -0x176B,0x0000,0x0000, 0x176C,0x0000,0x0000, 0x176D,0x0000,0x0000, -0x176E,0x0000,0x0000, 0x176F,0x0000,0x0000, 0x1770,0x0000,0x0000, -0x1771,0x0000,0x0000, 0x1772,0x0000,0x0000, 0x1773,0x0000,0x0000, -0x1774,0x0000,0x0000, 0x1775,0x0000,0x0000, 0x1776,0x0000,0x0000, -0x1777,0x0000,0x0000, 0x1778,0x0000,0x0000, 0xFBC0,0x8D29,0x0000, -0x1779,0x0000,0x0000, 0x177A,0x0000,0x0000, 0x177B,0x0000,0x0000, -0x177C,0x0000,0x0000, 0x177D,0x0000,0x0000, 0x177E,0x0000,0x0000, -0x177F,0x0000,0x0000, 0x1780,0x0000,0x0000, 0x1781,0x0000,0x0000, -0x1782,0x0000,0x0000, 0x1783,0x0000,0x0000, 0x1784,0x0000,0x0000, -0x1785,0x0000,0x0000, 0x1786,0x0000,0x0000, 0x1787,0x0000,0x0000, -0x1788,0x0000,0x0000, 0xFBC0,0x8D3A,0x0000, 0xFBC0,0x8D3B,0x0000, -0xFBC0,0x8D3C,0x0000, 0xFBC0,0x8D3D,0x0000, 0x1789,0x0000,0x0000, -0x178A,0x0000,0x0000, 0x178B,0x0000,0x0000, 0x178C,0x0000,0x0000, -0x178D,0x0000,0x0000, 0x178E,0x0000,0x0000, 0xFBC0,0x8D44,0x0000, -0xFBC0,0x8D45,0x0000, 0x178F,0x0000,0x0000, 0x1790,0x0000,0x0000, -0x1791,0x0000,0x0000, 0xFBC0,0x8D49,0x0000, 0x1792,0x0000,0x0000, -0x1793,0x0000,0x0000, 0x1794,0x0000,0x0000, 0x1795,0x0000,0x0000, -0xFBC0,0x8D4E,0x0000, 0xFBC0,0x8D4F,0x0000, 0xFBC0,0x8D50,0x0000, -0xFBC0,0x8D51,0x0000, 0xFBC0,0x8D52,0x0000, 0xFBC0,0x8D53,0x0000, -0xFBC0,0x8D54,0x0000, 0xFBC0,0x8D55,0x0000, 0xFBC0,0x8D56,0x0000, -0x1796,0x0000,0x0000, 0xFBC0,0x8D58,0x0000, 0xFBC0,0x8D59,0x0000, -0xFBC0,0x8D5A,0x0000, 0xFBC0,0x8D5B,0x0000, 0xFBC0,0x8D5C,0x0000, -0xFBC0,0x8D5D,0x0000, 0xFBC0,0x8D5E,0x0000, 0xFBC0,0x8D5F,0x0000, -0x175C,0x0000,0x0000, 0x175E,0x0000,0x0000, 0xFBC0,0x8D62,0x0000, -0xFBC0,0x8D63,0x0000, 0xFBC0,0x8D64,0x0000, 0xFBC0,0x8D65,0x0000, -0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, -0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, -0x0E32,0x0000,0x0000, 0xFBC0,0x8D70,0x0000, 0xFBC0,0x8D71,0x0000, -0xFBC0,0x8D72,0x0000, 0xFBC0,0x8D73,0x0000, 0xFBC0,0x8D74,0x0000, -0xFBC0,0x8D75,0x0000, 0xFBC0,0x8D76,0x0000, 0xFBC0,0x8D77,0x0000, -0xFBC0,0x8D78,0x0000, 0xFBC0,0x8D79,0x0000, 0xFBC0,0x8D7A,0x0000, -0xFBC0,0x8D7B,0x0000, 0xFBC0,0x8D7C,0x0000, 0xFBC0,0x8D7D,0x0000, -0xFBC0,0x8D7E,0x0000, 0xFBC0,0x8D7F,0x0000, 0xFBC0,0x8D80,0x0000, -0xFBC0,0x8D81,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x8D84,0x0000, 0x1797,0x0000,0x0000, 0x1798,0x0000,0x0000, -0x1799,0x0000,0x0000, 0x179A,0x0000,0x0000, 0x179B,0x0000,0x0000, -0x179C,0x0000,0x0000, 0x179D,0x0000,0x0000, 0x179E,0x0000,0x0000, -0x179F,0x0000,0x0000, 0x17A0,0x0000,0x0000, 0x17A1,0x0000,0x0000, -0x17A2,0x0000,0x0000, 0x17A3,0x0000,0x0000, 0x17A4,0x0000,0x0000, -0x17A5,0x0000,0x0000, 0x17A6,0x0000,0x0000, 0x17A7,0x0000,0x0000, -0x17A8,0x0000,0x0000, 0xFBC0,0x8D97,0x0000, 0xFBC0,0x8D98,0x0000, -0xFBC0,0x8D99,0x0000, 0x17A9,0x0000,0x0000, 0x17AA,0x0000,0x0000, -0x17AB,0x0000,0x0000, 0x17AC,0x0000,0x0000, 0x17AD,0x0000,0x0000, -0x17AE,0x0000,0x0000, 0x17AF,0x0000,0x0000, 0x17B0,0x0000,0x0000, -0x17B1,0x0000,0x0000, 0x17B2,0x0000,0x0000, 0x17B3,0x0000,0x0000, -0x17B4,0x0000,0x0000, 0x17B5,0x0000,0x0000, 0x17B6,0x0000,0x0000, -0x17B7,0x0000,0x0000, 0x17B8,0x0000,0x0000, 0x17B9,0x0000,0x0000, -0x17BA,0x0000,0x0000, 0x17BB,0x0000,0x0000, 0x17BC,0x0000,0x0000, -0x17BD,0x0000,0x0000, 0x17BE,0x0000,0x0000, 0x17BF,0x0000,0x0000, -0x17C0,0x0000,0x0000, 0xFBC0,0x8DB2,0x0000, 0x17C1,0x0000,0x0000, -0x17C2,0x0000,0x0000, 0x17C3,0x0000,0x0000, 0x17C4,0x0000,0x0000, -0x17C5,0x0000,0x0000, 0x17C6,0x0000,0x0000, 0x17C7,0x0000,0x0000, -0x17C8,0x0000,0x0000, 0x17C9,0x0000,0x0000, 0xFBC0,0x8DBC,0x0000, -0x17CA,0x0000,0x0000, 0xFBC0,0x8DBE,0x0000, 0xFBC0,0x8DBF,0x0000, -0x17CB,0x0000,0x0000, 0x17CC,0x0000,0x0000, 0x17CD,0x0000,0x0000, -0x17CE,0x0000,0x0000, 0x17CF,0x0000,0x0000, 0x17D0,0x0000,0x0000, -0x17D1,0x0000,0x0000, 0xFBC0,0x8DC7,0x0000, 0xFBC0,0x8DC8,0x0000, -0xFBC0,0x8DC9,0x0000, 0x17D2,0x0000,0x0000, 0xFBC0,0x8DCB,0x0000, -0xFBC0,0x8DCC,0x0000, 0xFBC0,0x8DCD,0x0000, 0xFBC0,0x8DCE,0x0000, -0x17D3,0x0000,0x0000, 0x17D4,0x0000,0x0000, 0x17D5,0x0000,0x0000, -0x17D6,0x0000,0x0000, 0x17D7,0x0000,0x0000, 0x17D8,0x0000,0x0000, -0xFBC0,0x8DD5,0x0000, 0x17D9,0x0000,0x0000, 0xFBC0,0x8DD7,0x0000, -0x17DA,0x0000,0x0000, 0x17DB,0x0000,0x0000, 0x17DC,0x0000,0x0000, -0x17DD,0x0000,0x0000, 0x17DE,0x0000,0x0000, 0x17DF,0x0000,0x0000, -0x17E0,0x0000,0x0000, 0x17E1,0x0000,0x0000, 0xFBC0,0x8DE0,0x0000, -0xFBC0,0x8DE1,0x0000, 0xFBC0,0x8DE2,0x0000, 0xFBC0,0x8DE3,0x0000, -0xFBC0,0x8DE4,0x0000, 0xFBC0,0x8DE5,0x0000, 0xFBC0,0x8DE6,0x0000, -0xFBC0,0x8DE7,0x0000, 0xFBC0,0x8DE8,0x0000, 0xFBC0,0x8DE9,0x0000, -0xFBC0,0x8DEA,0x0000, 0xFBC0,0x8DEB,0x0000, 0xFBC0,0x8DEC,0x0000, -0xFBC0,0x8DED,0x0000, 0xFBC0,0x8DEE,0x0000, 0xFBC0,0x8DEF,0x0000, -0xFBC0,0x8DF0,0x0000, 0xFBC0,0x8DF1,0x0000, 0x17E2,0x0000,0x0000, -0x17E3,0x0000,0x0000, 0x02FB,0x0000,0x0000, 0xFBC0,0x8DF5,0x0000, -0xFBC0,0x8DF6,0x0000, 0xFBC0,0x8DF7,0x0000, 0xFBC0,0x8DF8,0x0000, -0xFBC0,0x8DF9,0x0000, 0xFBC0,0x8DFA,0x0000, 0xFBC0,0x8DFB,0x0000, -0xFBC0,0x8DFC,0x0000, 0xFBC0,0x8DFD,0x0000, 0xFBC0,0x8DFE,0x0000, -0xFBC0,0x8DFF,0x0000 }; - -uint16 page00Edata[]= { /* 0E00 (3 weights per char) */ -0xFBC0,0x8E00,0x0000, 0x17E4,0x0000,0x0000, 0x17E5,0x0000,0x0000, -0x17E6,0x0000,0x0000, 0x17E7,0x0000,0x0000, 0x17E8,0x0000,0x0000, -0x17E9,0x0000,0x0000, 0x17EA,0x0000,0x0000, 0x17EB,0x0000,0x0000, -0x17EC,0x0000,0x0000, 0x17ED,0x0000,0x0000, 0x17EE,0x0000,0x0000, -0x17EF,0x0000,0x0000, 0x17F0,0x0000,0x0000, 0x17F1,0x0000,0x0000, -0x17F2,0x0000,0x0000, 0x17F3,0x0000,0x0000, 0x17F4,0x0000,0x0000, -0x17F5,0x0000,0x0000, 0x17F6,0x0000,0x0000, 0x17F7,0x0000,0x0000, -0x17F8,0x0000,0x0000, 0x17F9,0x0000,0x0000, 0x17FA,0x0000,0x0000, -0x17FB,0x0000,0x0000, 0x17FC,0x0000,0x0000, 0x17FD,0x0000,0x0000, -0x17FE,0x0000,0x0000, 0x17FF,0x0000,0x0000, 0x1800,0x0000,0x0000, -0x1801,0x0000,0x0000, 0x1802,0x0000,0x0000, 0x1803,0x0000,0x0000, -0x1804,0x0000,0x0000, 0x1805,0x0000,0x0000, 0x1806,0x0000,0x0000, -0x1807,0x0000,0x0000, 0x1808,0x0000,0x0000, 0x1809,0x0000,0x0000, -0x180A,0x0000,0x0000, 0x180B,0x0000,0x0000, 0x180C,0x0000,0x0000, -0x180D,0x0000,0x0000, 0x180E,0x0000,0x0000, 0x180F,0x0000,0x0000, -0x1810,0x0000,0x0000, 0x1811,0x0000,0x0000, 0x1812,0x0000,0x0000, -0x1813,0x0000,0x0000, 0x1814,0x0000,0x0000, 0x1815,0x0000,0x0000, -0x1816,0x0000,0x0000, 0x1817,0x0000,0x0000, 0x1818,0x0000,0x0000, -0x1819,0x0000,0x0000, 0x181A,0x0000,0x0000, 0x181B,0x0000,0x0000, -0x181C,0x0000,0x0000, 0x181D,0x0000,0x0000, 0xFBC0,0x8E3B,0x0000, -0xFBC0,0x8E3C,0x0000, 0xFBC0,0x8E3D,0x0000, 0xFBC0,0x8E3E,0x0000, -0x0E16,0x0000,0x0000, 0x181E,0x0000,0x0000, 0x181F,0x0000,0x0000, -0x1820,0x0000,0x0000, 0x1821,0x0000,0x0000, 0x1822,0x0000,0x0000, -0x1823,0x0000,0x0000, 0x0E03,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x1824,0x0000,0x0000, 0x1825,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0359,0x0000,0x0000, 0x0E29,0x0000,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0x02FC,0x0000,0x0000, 0x02FD,0x0000,0x0000, 0xFBC0,0x8E5C,0x0000, -0xFBC0,0x8E5D,0x0000, 0xFBC0,0x8E5E,0x0000, 0xFBC0,0x8E5F,0x0000, -0xFBC0,0x8E60,0x0000, 0xFBC0,0x8E61,0x0000, 0xFBC0,0x8E62,0x0000, -0xFBC0,0x8E63,0x0000, 0xFBC0,0x8E64,0x0000, 0xFBC0,0x8E65,0x0000, -0xFBC0,0x8E66,0x0000, 0xFBC0,0x8E67,0x0000, 0xFBC0,0x8E68,0x0000, -0xFBC0,0x8E69,0x0000, 0xFBC0,0x8E6A,0x0000, 0xFBC0,0x8E6B,0x0000, -0xFBC0,0x8E6C,0x0000, 0xFBC0,0x8E6D,0x0000, 0xFBC0,0x8E6E,0x0000, -0xFBC0,0x8E6F,0x0000, 0xFBC0,0x8E70,0x0000, 0xFBC0,0x8E71,0x0000, -0xFBC0,0x8E72,0x0000, 0xFBC0,0x8E73,0x0000, 0xFBC0,0x8E74,0x0000, -0xFBC0,0x8E75,0x0000, 0xFBC0,0x8E76,0x0000, 0xFBC0,0x8E77,0x0000, -0xFBC0,0x8E78,0x0000, 0xFBC0,0x8E79,0x0000, 0xFBC0,0x8E7A,0x0000, -0xFBC0,0x8E7B,0x0000, 0xFBC0,0x8E7C,0x0000, 0xFBC0,0x8E7D,0x0000, -0xFBC0,0x8E7E,0x0000, 0xFBC0,0x8E7F,0x0000, 0xFBC0,0x8E80,0x0000, -0x1826,0x0000,0x0000, 0x1827,0x0000,0x0000, 0xFBC0,0x8E83,0x0000, -0x1828,0x0000,0x0000, 0xFBC0,0x8E85,0x0000, 0xFBC0,0x8E86,0x0000, -0x1829,0x0000,0x0000, 0x182A,0x0000,0x0000, 0xFBC0,0x8E89,0x0000, -0x182B,0x0000,0x0000, 0xFBC0,0x8E8B,0x0000, 0xFBC0,0x8E8C,0x0000, -0x182C,0x0000,0x0000, 0xFBC0,0x8E8E,0x0000, 0xFBC0,0x8E8F,0x0000, -0xFBC0,0x8E90,0x0000, 0xFBC0,0x8E91,0x0000, 0xFBC0,0x8E92,0x0000, -0xFBC0,0x8E93,0x0000, 0x182D,0x0000,0x0000, 0x182E,0x0000,0x0000, -0x182F,0x0000,0x0000, 0x1830,0x0000,0x0000, 0xFBC0,0x8E98,0x0000, -0x1831,0x0000,0x0000, 0x1832,0x0000,0x0000, 0x1833,0x0000,0x0000, -0x1834,0x0000,0x0000, 0x1835,0x0000,0x0000, 0x1836,0x0000,0x0000, -0x1837,0x0000,0x0000, 0xFBC0,0x8EA0,0x0000, 0x1838,0x0000,0x0000, -0x1839,0x0000,0x0000, 0x183A,0x0000,0x0000, 0xFBC0,0x8EA4,0x0000, -0x183B,0x0000,0x0000, 0xFBC0,0x8EA6,0x0000, 0x183C,0x0000,0x0000, -0xFBC0,0x8EA8,0x0000, 0xFBC0,0x8EA9,0x0000, 0x183D,0x0000,0x0000, -0x183E,0x0000,0x0000, 0xFBC0,0x8EAC,0x0000, 0x183F,0x0000,0x0000, -0x1840,0x0000,0x0000, 0x1841,0x0000,0x0000, 0x1842,0x0000,0x0000, -0x1843,0x0000,0x0000, 0x1844,0x0000,0x0000, 0x1845,0x0000,0x0000, -0x1846,0x0000,0x0000, 0x1847,0x0000,0x0000, 0x1848,0x0000,0x0000, -0x1849,0x0000,0x0000, 0x184A,0x0000,0x0000, 0x184B,0x0000,0x0000, -0xFBC0,0x8EBA,0x0000, 0x184C,0x0000,0x0000, 0x184D,0x0000,0x0000, -0x184E,0x0000,0x0000, 0xFBC0,0x8EBE,0x0000, 0xFBC0,0x8EBF,0x0000, -0x184F,0x0000,0x0000, 0x1850,0x0000,0x0000, 0x1851,0x0000,0x0000, -0x1852,0x0000,0x0000, 0x1853,0x0000,0x0000, 0xFBC0,0x8EC5,0x0000, -0x0E04,0x0000,0x0000, 0xFBC0,0x8EC7,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x1854,0x0000,0x0000, 0x1855,0x0000,0x0000, 0xFBC0,0x8ECE,0x0000, -0xFBC0,0x8ECF,0x0000, 0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, -0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, -0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, -0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, 0xFBC0,0x8EDA,0x0000, -0xFBC0,0x8EDB,0x0000, 0x183E,0x1831,0x0000, 0x183E,0x1838,0x0000, -0xFBC0,0x8EDE,0x0000, 0xFBC0,0x8EDF,0x0000, 0xFBC0,0x8EE0,0x0000, -0xFBC0,0x8EE1,0x0000, 0xFBC0,0x8EE2,0x0000, 0xFBC0,0x8EE3,0x0000, -0xFBC0,0x8EE4,0x0000, 0xFBC0,0x8EE5,0x0000, 0xFBC0,0x8EE6,0x0000, -0xFBC0,0x8EE7,0x0000, 0xFBC0,0x8EE8,0x0000, 0xFBC0,0x8EE9,0x0000, -0xFBC0,0x8EEA,0x0000, 0xFBC0,0x8EEB,0x0000, 0xFBC0,0x8EEC,0x0000, -0xFBC0,0x8EED,0x0000, 0xFBC0,0x8EEE,0x0000, 0xFBC0,0x8EEF,0x0000, -0xFBC0,0x8EF0,0x0000, 0xFBC0,0x8EF1,0x0000, 0xFBC0,0x8EF2,0x0000, -0xFBC0,0x8EF3,0x0000, 0xFBC0,0x8EF4,0x0000, 0xFBC0,0x8EF5,0x0000, -0xFBC0,0x8EF6,0x0000, 0xFBC0,0x8EF7,0x0000, 0xFBC0,0x8EF8,0x0000, -0xFBC0,0x8EF9,0x0000, 0xFBC0,0x8EFA,0x0000, 0xFBC0,0x8EFB,0x0000, -0xFBC0,0x8EFC,0x0000, 0xFBC0,0x8EFD,0x0000, 0xFBC0,0x8EFE,0x0000, -0xFBC0,0x8EFF,0x0000 }; - -uint16 page00Fdata[]= { /* 0F00 (3 weights per char) */ -0x189A,0x18AD,0x0000, 0x035A,0x0000,0x0000, 0x035B,0x0000,0x0000, -0x035C,0x0000,0x0000, 0x02FE,0x0000,0x0000, 0x02FF,0x0000,0x0000, -0x0300,0x0000,0x0000, 0x0301,0x0000,0x0000, 0x0302,0x0000,0x0000, -0x0303,0x0000,0x0000, 0x0304,0x0000,0x0000, 0x0305,0x0000,0x0000, -0x0305,0x0000,0x0000, 0x0306,0x0000,0x0000, 0x0307,0x0000,0x0000, -0x0308,0x0000,0x0000, 0x0309,0x0000,0x0000, 0x030A,0x0000,0x0000, -0x030B,0x0000,0x0000, 0x035D,0x0000,0x0000, 0x024C,0x0000,0x0000, -0x035E,0x0000,0x0000, 0x035F,0x0000,0x0000, 0x0360,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0361,0x0000,0x0000, -0x0362,0x0000,0x0000, 0x0363,0x0000,0x0000, 0x0364,0x0000,0x0000, -0x0365,0x0000,0x0000, 0x0366,0x0000,0x0000, 0x0E29,0x0000,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0x0E29,0x0000,0x0000, 0x0367,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0368,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0369,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x028E,0x0000,0x0000, 0x028F,0x0000,0x0000, -0x0290,0x0000,0x0000, 0x0291,0x0000,0x0000, 0x036A,0x0000,0x0000, -0x036B,0x0000,0x0000, 0x1856,0x0000,0x0000, 0x1858,0x0000,0x0000, -0x185A,0x0000,0x0000, 0x185A,0x1899,0x0000, 0x185C,0x0000,0x0000, -0x185E,0x0000,0x0000, 0x1860,0x0000,0x0000, 0x1862,0x0000,0x0000, -0xFBC0,0x8F48,0x0000, 0x1864,0x0000,0x0000, 0x1866,0x0000,0x0000, -0x1868,0x0000,0x0000, 0x186A,0x0000,0x0000, 0x186A,0x1899,0x0000, -0x186C,0x0000,0x0000, 0x186E,0x0000,0x0000, 0x1870,0x0000,0x0000, -0x1872,0x0000,0x0000, 0x1872,0x1899,0x0000, 0x1874,0x0000,0x0000, -0x1876,0x0000,0x0000, 0x1878,0x0000,0x0000, 0x187A,0x0000,0x0000, -0x187A,0x1899,0x0000, 0x187C,0x0000,0x0000, 0x187E,0x0000,0x0000, -0x1880,0x0000,0x0000, 0x1882,0x0000,0x0000, 0x1882,0x1899,0x0000, -0x1884,0x0000,0x0000, 0x1886,0x0000,0x0000, 0x1888,0x0000,0x0000, -0x188A,0x0000,0x0000, 0x188C,0x0000,0x0000, 0x188E,0x0000,0x0000, -0x1890,0x0000,0x0000, 0x1892,0x0000,0x0000, 0x1894,0x0000,0x0000, -0x1896,0x0000,0x0000, 0x1898,0x0000,0x0000, 0x189A,0x0000,0x0000, -0x1856,0x1895,0x0000, 0x188E,0x0000,0x0000, 0xFBC0,0x8F6B,0x0000, -0xFBC0,0x8F6C,0x0000, 0xFBC0,0x8F6D,0x0000, 0xFBC0,0x8F6E,0x0000, -0xFBC0,0x8F6F,0x0000, 0xFBC0,0x8F70,0x0000, 0x18A0,0x0000,0x0000, -0x18A1,0x0000,0x0000, 0x18A2,0x0000,0x0000, 0x18A5,0x0000,0x0000, -0x18A6,0x0000,0x0000, 0x18A7,0x0000,0x0000, 0x18A8,0x0000,0x0000, -0x18A9,0x0000,0x0000, 0x18AA,0x0000,0x0000, 0x18AB,0x0000,0x0000, -0x18AC,0x0000,0x0000, 0x18AD,0x0000,0x0000, 0x18AE,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x18A3,0x0000,0x0000, -0x18A4,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x18AF,0x0000,0x0000, 0x030C,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x189C,0x0000,0x0000, 0x189D,0x0000,0x0000, -0x189E,0x0000,0x0000, 0x189F,0x0000,0x0000, 0xFBC0,0x8F8C,0x0000, -0xFBC0,0x8F8D,0x0000, 0xFBC0,0x8F8E,0x0000, 0xFBC0,0x8F8F,0x0000, -0x1857,0x0000,0x0000, 0x1859,0x0000,0x0000, 0x185B,0x0000,0x0000, -0x185B,0x1899,0x0000, 0x185D,0x0000,0x0000, 0x185F,0x0000,0x0000, -0x1861,0x0000,0x0000, 0x1863,0x0000,0x0000, 0xFBC0,0x8F98,0x0000, -0x1865,0x0000,0x0000, 0x1867,0x0000,0x0000, 0x1869,0x0000,0x0000, -0x186B,0x0000,0x0000, 0x186B,0x1899,0x0000, 0x186D,0x0000,0x0000, -0x186F,0x0000,0x0000, 0x1871,0x0000,0x0000, 0x1873,0x0000,0x0000, -0x1873,0x1899,0x0000, 0x1875,0x0000,0x0000, 0x1877,0x0000,0x0000, -0x1879,0x0000,0x0000, 0x187B,0x0000,0x0000, 0x187B,0x1899,0x0000, -0x187D,0x0000,0x0000, 0x187F,0x0000,0x0000, 0x1881,0x0000,0x0000, -0x1883,0x0000,0x0000, 0x1883,0x1899,0x0000, 0x1885,0x0000,0x0000, -0x1887,0x0000,0x0000, 0x1889,0x0000,0x0000, 0x188B,0x0000,0x0000, -0x188D,0x0000,0x0000, 0x188F,0x0000,0x0000, 0x1891,0x0000,0x0000, -0x1893,0x0000,0x0000, 0x1895,0x0000,0x0000, 0x1897,0x0000,0x0000, -0x1899,0x0000,0x0000, 0x189B,0x0000,0x0000, 0x1857,0x1895,0x0000, -0x1885,0x0000,0x0000, 0x188D,0x0000,0x0000, 0x188F,0x0000,0x0000, -0xFBC0,0x8FBD,0x0000, 0x036C,0x0000,0x0000, 0x036D,0x0000,0x0000, -0x036E,0x0000,0x0000, 0x036F,0x0000,0x0000, 0x0370,0x0000,0x0000, -0x0371,0x0000,0x0000, 0x0372,0x0000,0x0000, 0x0373,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0374,0x0000,0x0000, 0x0375,0x0000,0x0000, -0x0376,0x0000,0x0000, 0x0377,0x0000,0x0000, 0x0378,0x0000,0x0000, -0x0379,0x0000,0x0000, 0xFBC0,0x8FCD,0x0000, 0xFBC0,0x8FCE,0x0000, -0x037A,0x0000,0x0000, 0xFBC0,0x8FD0,0x0000, 0xFBC0,0x8FD1,0x0000, -0xFBC0,0x8FD2,0x0000, 0xFBC0,0x8FD3,0x0000, 0xFBC0,0x8FD4,0x0000, -0xFBC0,0x8FD5,0x0000, 0xFBC0,0x8FD6,0x0000, 0xFBC0,0x8FD7,0x0000, -0xFBC0,0x8FD8,0x0000, 0xFBC0,0x8FD9,0x0000, 0xFBC0,0x8FDA,0x0000, -0xFBC0,0x8FDB,0x0000, 0xFBC0,0x8FDC,0x0000, 0xFBC0,0x8FDD,0x0000, -0xFBC0,0x8FDE,0x0000, 0xFBC0,0x8FDF,0x0000, 0xFBC0,0x8FE0,0x0000, -0xFBC0,0x8FE1,0x0000, 0xFBC0,0x8FE2,0x0000, 0xFBC0,0x8FE3,0x0000, -0xFBC0,0x8FE4,0x0000, 0xFBC0,0x8FE5,0x0000, 0xFBC0,0x8FE6,0x0000, -0xFBC0,0x8FE7,0x0000, 0xFBC0,0x8FE8,0x0000, 0xFBC0,0x8FE9,0x0000, -0xFBC0,0x8FEA,0x0000, 0xFBC0,0x8FEB,0x0000, 0xFBC0,0x8FEC,0x0000, -0xFBC0,0x8FED,0x0000, 0xFBC0,0x8FEE,0x0000, 0xFBC0,0x8FEF,0x0000, -0xFBC0,0x8FF0,0x0000, 0xFBC0,0x8FF1,0x0000, 0xFBC0,0x8FF2,0x0000, -0xFBC0,0x8FF3,0x0000, 0xFBC0,0x8FF4,0x0000, 0xFBC0,0x8FF5,0x0000, -0xFBC0,0x8FF6,0x0000, 0xFBC0,0x8FF7,0x0000, 0xFBC0,0x8FF8,0x0000, -0xFBC0,0x8FF9,0x0000, 0xFBC0,0x8FFA,0x0000, 0xFBC0,0x8FFB,0x0000, -0xFBC0,0x8FFC,0x0000, 0xFBC0,0x8FFD,0x0000, 0xFBC0,0x8FFE,0x0000, -0xFBC0,0x8FFF,0x0000 }; - -uint16 page010data[]= { /* 1000 (3 weights per char) */ -0x1931,0x0000,0x0000, 0x1932,0x0000,0x0000, 0x1933,0x0000,0x0000, -0x1934,0x0000,0x0000, 0x1935,0x0000,0x0000, 0x1936,0x0000,0x0000, -0x1937,0x0000,0x0000, 0x1938,0x0000,0x0000, 0x1939,0x0000,0x0000, -0x193A,0x0000,0x0000, 0x193B,0x0000,0x0000, 0x193C,0x0000,0x0000, -0x193D,0x0000,0x0000, 0x193E,0x0000,0x0000, 0x193F,0x0000,0x0000, -0x1940,0x0000,0x0000, 0x1941,0x0000,0x0000, 0x1942,0x0000,0x0000, -0x1943,0x0000,0x0000, 0x1944,0x0000,0x0000, 0x1945,0x0000,0x0000, -0x1946,0x0000,0x0000, 0x1947,0x0000,0x0000, 0x1948,0x0000,0x0000, -0x1949,0x0000,0x0000, 0x194A,0x0000,0x0000, 0x194B,0x0000,0x0000, -0x194C,0x0000,0x0000, 0x194D,0x0000,0x0000, 0x194E,0x0000,0x0000, -0x1951,0x0000,0x0000, 0x1952,0x0000,0x0000, 0x1953,0x0000,0x0000, -0x1954,0x0000,0x0000, 0xFBC0,0x9022,0x0000, 0x1955,0x0000,0x0000, -0x1956,0x0000,0x0000, 0x1957,0x0000,0x0000, 0x1958,0x0000,0x0000, -0x1959,0x0000,0x0000, 0xFBC0,0x9028,0x0000, 0x195A,0x0000,0x0000, -0x195B,0x0000,0x0000, 0xFBC0,0x902B,0x0000, 0x1960,0x0000,0x0000, -0x1961,0x0000,0x0000, 0x1962,0x0000,0x0000, 0x1963,0x0000,0x0000, -0x1964,0x0000,0x0000, 0x1965,0x0000,0x0000, 0x1966,0x0000,0x0000, -0xFBC0,0x9033,0x0000, 0xFBC0,0x9034,0x0000, 0xFBC0,0x9035,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x196B,0x0000,0x0000, 0xFBC0,0x903A,0x0000, 0xFBC0,0x903B,0x0000, -0xFBC0,0x903C,0x0000, 0xFBC0,0x903D,0x0000, 0xFBC0,0x903E,0x0000, -0xFBC0,0x903F,0x0000, 0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, -0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, -0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, -0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, 0x026C,0x0000,0x0000, -0x026D,0x0000,0x0000, 0x030E,0x0000,0x0000, 0x030F,0x0000,0x0000, -0x0310,0x0000,0x0000, 0x0311,0x0000,0x0000, 0x194F,0x0000,0x0000, -0x1950,0x0000,0x0000, 0x195C,0x0000,0x0000, 0x195D,0x0000,0x0000, -0x195E,0x0000,0x0000, 0x195F,0x0000,0x0000, 0x1967,0x0000,0x0000, -0x1968,0x0000,0x0000, 0x1969,0x0000,0x0000, 0x196A,0x0000,0x0000, -0xFBC0,0x905A,0x0000, 0xFBC0,0x905B,0x0000, 0xFBC0,0x905C,0x0000, -0xFBC0,0x905D,0x0000, 0xFBC0,0x905E,0x0000, 0xFBC0,0x905F,0x0000, -0xFBC0,0x9060,0x0000, 0xFBC0,0x9061,0x0000, 0xFBC0,0x9062,0x0000, -0xFBC0,0x9063,0x0000, 0xFBC0,0x9064,0x0000, 0xFBC0,0x9065,0x0000, -0xFBC0,0x9066,0x0000, 0xFBC0,0x9067,0x0000, 0xFBC0,0x9068,0x0000, -0xFBC0,0x9069,0x0000, 0xFBC0,0x906A,0x0000, 0xFBC0,0x906B,0x0000, -0xFBC0,0x906C,0x0000, 0xFBC0,0x906D,0x0000, 0xFBC0,0x906E,0x0000, -0xFBC0,0x906F,0x0000, 0xFBC0,0x9070,0x0000, 0xFBC0,0x9071,0x0000, -0xFBC0,0x9072,0x0000, 0xFBC0,0x9073,0x0000, 0xFBC0,0x9074,0x0000, -0xFBC0,0x9075,0x0000, 0xFBC0,0x9076,0x0000, 0xFBC0,0x9077,0x0000, -0xFBC0,0x9078,0x0000, 0xFBC0,0x9079,0x0000, 0xFBC0,0x907A,0x0000, -0xFBC0,0x907B,0x0000, 0xFBC0,0x907C,0x0000, 0xFBC0,0x907D,0x0000, -0xFBC0,0x907E,0x0000, 0xFBC0,0x907F,0x0000, 0xFBC0,0x9080,0x0000, -0xFBC0,0x9081,0x0000, 0xFBC0,0x9082,0x0000, 0xFBC0,0x9083,0x0000, -0xFBC0,0x9084,0x0000, 0xFBC0,0x9085,0x0000, 0xFBC0,0x9086,0x0000, -0xFBC0,0x9087,0x0000, 0xFBC0,0x9088,0x0000, 0xFBC0,0x9089,0x0000, -0xFBC0,0x908A,0x0000, 0xFBC0,0x908B,0x0000, 0xFBC0,0x908C,0x0000, -0xFBC0,0x908D,0x0000, 0xFBC0,0x908E,0x0000, 0xFBC0,0x908F,0x0000, -0xFBC0,0x9090,0x0000, 0xFBC0,0x9091,0x0000, 0xFBC0,0x9092,0x0000, -0xFBC0,0x9093,0x0000, 0xFBC0,0x9094,0x0000, 0xFBC0,0x9095,0x0000, -0xFBC0,0x9096,0x0000, 0xFBC0,0x9097,0x0000, 0xFBC0,0x9098,0x0000, -0xFBC0,0x9099,0x0000, 0xFBC0,0x909A,0x0000, 0xFBC0,0x909B,0x0000, -0xFBC0,0x909C,0x0000, 0xFBC0,0x909D,0x0000, 0xFBC0,0x909E,0x0000, -0xFBC0,0x909F,0x0000, 0x12E1,0x0000,0x0000, 0x12E2,0x0000,0x0000, -0x12E3,0x0000,0x0000, 0x12E4,0x0000,0x0000, 0x12E5,0x0000,0x0000, -0x12E6,0x0000,0x0000, 0x12E7,0x0000,0x0000, 0x12E9,0x0000,0x0000, -0x12EA,0x0000,0x0000, 0x12EB,0x0000,0x0000, 0x12EC,0x0000,0x0000, -0x12ED,0x0000,0x0000, 0x12EE,0x0000,0x0000, 0x12F0,0x0000,0x0000, -0x12F1,0x0000,0x0000, 0x12F2,0x0000,0x0000, 0x12F3,0x0000,0x0000, -0x12F4,0x0000,0x0000, 0x12F5,0x0000,0x0000, 0x12F7,0x0000,0x0000, -0x12F8,0x0000,0x0000, 0x12F9,0x0000,0x0000, 0x12FA,0x0000,0x0000, -0x12FB,0x0000,0x0000, 0x12FC,0x0000,0x0000, 0x12FD,0x0000,0x0000, -0x12FE,0x0000,0x0000, 0x12FF,0x0000,0x0000, 0x1300,0x0000,0x0000, -0x1301,0x0000,0x0000, 0x1302,0x0000,0x0000, 0x1304,0x0000,0x0000, -0x1305,0x0000,0x0000, 0x12E8,0x0000,0x0000, 0x12EF,0x0000,0x0000, -0x12F6,0x0000,0x0000, 0x1303,0x0000,0x0000, 0x1306,0x0000,0x0000, -0xFBC0,0x90C6,0x0000, 0xFBC0,0x90C7,0x0000, 0xFBC0,0x90C8,0x0000, -0xFBC0,0x90C9,0x0000, 0xFBC0,0x90CA,0x0000, 0xFBC0,0x90CB,0x0000, -0xFBC0,0x90CC,0x0000, 0xFBC0,0x90CD,0x0000, 0xFBC0,0x90CE,0x0000, -0xFBC0,0x90CF,0x0000, 0x12E1,0x0000,0x0000, 0x12E2,0x0000,0x0000, -0x12E3,0x0000,0x0000, 0x12E4,0x0000,0x0000, 0x12E5,0x0000,0x0000, -0x12E6,0x0000,0x0000, 0x12E7,0x0000,0x0000, 0x12E9,0x0000,0x0000, -0x12EA,0x0000,0x0000, 0x12EB,0x0000,0x0000, 0x12EC,0x0000,0x0000, -0x12ED,0x0000,0x0000, 0x12EE,0x0000,0x0000, 0x12F0,0x0000,0x0000, -0x12F1,0x0000,0x0000, 0x12F2,0x0000,0x0000, 0x12F3,0x0000,0x0000, -0x12F4,0x0000,0x0000, 0x12F5,0x0000,0x0000, 0x12F7,0x0000,0x0000, -0x12F8,0x0000,0x0000, 0x12F9,0x0000,0x0000, 0x12FA,0x0000,0x0000, -0x12FB,0x0000,0x0000, 0x12FC,0x0000,0x0000, 0x12FD,0x0000,0x0000, -0x12FE,0x0000,0x0000, 0x12FF,0x0000,0x0000, 0x1300,0x0000,0x0000, -0x1301,0x0000,0x0000, 0x1302,0x0000,0x0000, 0x1304,0x0000,0x0000, -0x1305,0x0000,0x0000, 0x12E8,0x0000,0x0000, 0x12EF,0x0000,0x0000, -0x12F6,0x0000,0x0000, 0x1303,0x0000,0x0000, 0x1306,0x0000,0x0000, -0x1307,0x0000,0x0000, 0x1308,0x0000,0x0000, 0x1309,0x0000,0x0000, -0xFBC0,0x90F9,0x0000, 0xFBC0,0x90FA,0x0000, 0x0271,0x0000,0x0000, -0xFBC0,0x90FC,0x0000, 0xFBC0,0x90FD,0x0000, 0xFBC0,0x90FE,0x0000, -0xFBC0,0x90FF,0x0000 }; - -uint16 page011data[]= { /* 1100 (3 weights per char) */ -0x1D62,0x0000,0x0000, 0x1D63,0x0000,0x0000, 0x1D64,0x0000,0x0000, -0x1D65,0x0000,0x0000, 0x1D66,0x0000,0x0000, 0x1D67,0x0000,0x0000, -0x1D68,0x0000,0x0000, 0x1D69,0x0000,0x0000, 0x1D6A,0x0000,0x0000, -0x1D6B,0x0000,0x0000, 0x1D6C,0x0000,0x0000, 0x1D6D,0x0000,0x0000, -0x1D6E,0x0000,0x0000, 0x1D6F,0x0000,0x0000, 0x1D70,0x0000,0x0000, -0x1D71,0x0000,0x0000, 0x1D72,0x0000,0x0000, 0x1D73,0x0000,0x0000, -0x1D74,0x0000,0x0000, 0x1D75,0x0000,0x0000, 0x1D76,0x0000,0x0000, -0x1D77,0x0000,0x0000, 0x1D78,0x0000,0x0000, 0x1D79,0x0000,0x0000, -0x1D7A,0x0000,0x0000, 0x1D7B,0x0000,0x0000, 0x1D7C,0x0000,0x0000, -0x1D7D,0x0000,0x0000, 0x1D7E,0x0000,0x0000, 0x1D7F,0x0000,0x0000, -0x1D80,0x0000,0x0000, 0x1D81,0x0000,0x0000, 0x1D82,0x0000,0x0000, -0x1D83,0x0000,0x0000, 0x1D84,0x0000,0x0000, 0x1D85,0x0000,0x0000, -0x1D86,0x0000,0x0000, 0x1D87,0x0000,0x0000, 0x1D88,0x0000,0x0000, -0x1D89,0x0000,0x0000, 0x1D8A,0x0000,0x0000, 0x1D8B,0x0000,0x0000, -0x1D8C,0x0000,0x0000, 0x1D8D,0x0000,0x0000, 0x1D8E,0x0000,0x0000, -0x1D8F,0x0000,0x0000, 0x1D90,0x0000,0x0000, 0x1D91,0x0000,0x0000, -0x1D92,0x0000,0x0000, 0x1D93,0x0000,0x0000, 0x1D94,0x0000,0x0000, -0x1D95,0x0000,0x0000, 0x1D96,0x0000,0x0000, 0x1D97,0x0000,0x0000, -0x1D98,0x0000,0x0000, 0x1D99,0x0000,0x0000, 0x1D9A,0x0000,0x0000, -0x1D9B,0x0000,0x0000, 0x1D9C,0x0000,0x0000, 0x1D9D,0x0000,0x0000, -0x1D9E,0x0000,0x0000, 0x1D9F,0x0000,0x0000, 0x1DA0,0x0000,0x0000, -0x1DA1,0x0000,0x0000, 0x1DA2,0x0000,0x0000, 0x1DA3,0x0000,0x0000, -0x1DA4,0x0000,0x0000, 0x1DA5,0x0000,0x0000, 0x1DA6,0x0000,0x0000, -0x1DA7,0x0000,0x0000, 0x1DA8,0x0000,0x0000, 0x1DA9,0x0000,0x0000, -0x1DAA,0x0000,0x0000, 0x1DAB,0x0000,0x0000, 0x1DAC,0x0000,0x0000, -0x1DAD,0x0000,0x0000, 0x1DAE,0x0000,0x0000, 0x1DAF,0x0000,0x0000, -0x1DB0,0x0000,0x0000, 0x1DB1,0x0000,0x0000, 0x1DB2,0x0000,0x0000, -0x1DB3,0x0000,0x0000, 0x1DB4,0x0000,0x0000, 0x1DB5,0x0000,0x0000, -0x1DB6,0x0000,0x0000, 0x1DB7,0x0000,0x0000, 0x1DB8,0x0000,0x0000, -0x1DB9,0x0000,0x0000, 0x1DBA,0x0000,0x0000, 0x1DBB,0x0000,0x0000, -0xFBC0,0x915A,0x0000, 0xFBC0,0x915B,0x0000, 0xFBC0,0x915C,0x0000, -0xFBC0,0x915D,0x0000, 0xFBC0,0x915E,0x0000, 0x1DBC,0x0000,0x0000, -0x1DBD,0x0000,0x0000, 0x1DBE,0x0000,0x0000, 0x1DBF,0x0000,0x0000, -0x1DC0,0x0000,0x0000, 0x1DC1,0x0000,0x0000, 0x1DC2,0x0000,0x0000, -0x1DC3,0x0000,0x0000, 0x1DC4,0x0000,0x0000, 0x1DC5,0x0000,0x0000, -0x1DC6,0x0000,0x0000, 0x1DC7,0x0000,0x0000, 0x1DC8,0x0000,0x0000, -0x1DC9,0x0000,0x0000, 0x1DCA,0x0000,0x0000, 0x1DCB,0x0000,0x0000, -0x1DCC,0x0000,0x0000, 0x1DCD,0x0000,0x0000, 0x1DCE,0x0000,0x0000, -0x1DCF,0x0000,0x0000, 0x1DD0,0x0000,0x0000, 0x1DD1,0x0000,0x0000, -0x1DD2,0x0000,0x0000, 0x1DD3,0x0000,0x0000, 0x1DD4,0x0000,0x0000, -0x1DD5,0x0000,0x0000, 0x1DD6,0x0000,0x0000, 0x1DD7,0x0000,0x0000, -0x1DD8,0x0000,0x0000, 0x1DD9,0x0000,0x0000, 0x1DDA,0x0000,0x0000, -0x1DDB,0x0000,0x0000, 0x1DDC,0x0000,0x0000, 0x1DDD,0x0000,0x0000, -0x1DDE,0x0000,0x0000, 0x1DDF,0x0000,0x0000, 0x1DE0,0x0000,0x0000, -0x1DE1,0x0000,0x0000, 0x1DE2,0x0000,0x0000, 0x1DE3,0x0000,0x0000, -0x1DE4,0x0000,0x0000, 0x1DE5,0x0000,0x0000, 0x1DE6,0x0000,0x0000, -0x1DE7,0x0000,0x0000, 0x1DE8,0x0000,0x0000, 0x1DE9,0x0000,0x0000, -0x1DEA,0x0000,0x0000, 0x1DEB,0x0000,0x0000, 0x1DEC,0x0000,0x0000, -0x1DED,0x0000,0x0000, 0x1DEE,0x0000,0x0000, 0x1DEF,0x0000,0x0000, -0x1DF0,0x0000,0x0000, 0x1DF1,0x0000,0x0000, 0x1DF2,0x0000,0x0000, -0x1DF3,0x0000,0x0000, 0x1DF4,0x0000,0x0000, 0x1DF5,0x0000,0x0000, -0x1DF6,0x0000,0x0000, 0x1DF7,0x0000,0x0000, 0x1DF8,0x0000,0x0000, -0x1DF9,0x0000,0x0000, 0x1DFA,0x0000,0x0000, 0x1DFB,0x0000,0x0000, -0x1DFC,0x0000,0x0000, 0x1DFD,0x0000,0x0000, 0x1DFE,0x0000,0x0000, -0x1DFF,0x0000,0x0000, 0xFBC0,0x91A3,0x0000, 0xFBC0,0x91A4,0x0000, -0xFBC0,0x91A5,0x0000, 0xFBC0,0x91A6,0x0000, 0xFBC0,0x91A7,0x0000, -0x1E00,0x0000,0x0000, 0x1E01,0x0000,0x0000, 0x1E02,0x0000,0x0000, -0x1E03,0x0000,0x0000, 0x1E04,0x0000,0x0000, 0x1E05,0x0000,0x0000, -0x1E06,0x0000,0x0000, 0x1E07,0x0000,0x0000, 0x1E08,0x0000,0x0000, -0x1E09,0x0000,0x0000, 0x1E0A,0x0000,0x0000, 0x1E0B,0x0000,0x0000, -0x1E0C,0x0000,0x0000, 0x1E0D,0x0000,0x0000, 0x1E0E,0x0000,0x0000, -0x1E0F,0x0000,0x0000, 0x1E10,0x0000,0x0000, 0x1E11,0x0000,0x0000, -0x1E12,0x0000,0x0000, 0x1E13,0x0000,0x0000, 0x1E14,0x0000,0x0000, -0x1E15,0x0000,0x0000, 0x1E16,0x0000,0x0000, 0x1E17,0x0000,0x0000, -0x1E18,0x0000,0x0000, 0x1E19,0x0000,0x0000, 0x1E1A,0x0000,0x0000, -0x1E1B,0x0000,0x0000, 0x1E1C,0x0000,0x0000, 0x1E1D,0x0000,0x0000, -0x1E1E,0x0000,0x0000, 0x1E1F,0x0000,0x0000, 0x1E20,0x0000,0x0000, -0x1E21,0x0000,0x0000, 0x1E22,0x0000,0x0000, 0x1E23,0x0000,0x0000, -0x1E24,0x0000,0x0000, 0x1E25,0x0000,0x0000, 0x1E26,0x0000,0x0000, -0x1E27,0x0000,0x0000, 0x1E28,0x0000,0x0000, 0x1E29,0x0000,0x0000, -0x1E2A,0x0000,0x0000, 0x1E2B,0x0000,0x0000, 0x1E2C,0x0000,0x0000, -0x1E2D,0x0000,0x0000, 0x1E2E,0x0000,0x0000, 0x1E2F,0x0000,0x0000, -0x1E30,0x0000,0x0000, 0x1E31,0x0000,0x0000, 0x1E32,0x0000,0x0000, -0x1E33,0x0000,0x0000, 0x1E34,0x0000,0x0000, 0x1E35,0x0000,0x0000, -0x1E36,0x0000,0x0000, 0x1E37,0x0000,0x0000, 0x1E38,0x0000,0x0000, -0x1E39,0x0000,0x0000, 0x1E3A,0x0000,0x0000, 0x1E3B,0x0000,0x0000, -0x1E3C,0x0000,0x0000, 0x1E3D,0x0000,0x0000, 0x1E3E,0x0000,0x0000, -0x1E3F,0x0000,0x0000, 0x1E40,0x0000,0x0000, 0x1E41,0x0000,0x0000, -0x1E42,0x0000,0x0000, 0x1E43,0x0000,0x0000, 0x1E44,0x0000,0x0000, -0x1E45,0x0000,0x0000, 0x1E46,0x0000,0x0000, 0x1E47,0x0000,0x0000, -0x1E48,0x0000,0x0000, 0x1E49,0x0000,0x0000, 0x1E4A,0x0000,0x0000, -0x1E4B,0x0000,0x0000, 0x1E4C,0x0000,0x0000, 0x1E4D,0x0000,0x0000, -0x1E4E,0x0000,0x0000, 0x1E4F,0x0000,0x0000, 0x1E50,0x0000,0x0000, -0x1E51,0x0000,0x0000, 0xFBC0,0x91FA,0x0000, 0xFBC0,0x91FB,0x0000, -0xFBC0,0x91FC,0x0000, 0xFBC0,0x91FD,0x0000, 0xFBC0,0x91FE,0x0000, -0xFBC0,0x91FF,0x0000 }; - -uint16 page012data[]= { /* 1200 (3 weights per char) */ -0x141C,0x0000,0x0000, 0x141D,0x0000,0x0000, 0x141E,0x0000,0x0000, -0x141F,0x0000,0x0000, 0x1420,0x0000,0x0000, 0x1421,0x0000,0x0000, -0x1422,0x0000,0x0000, 0xFBC0,0x9207,0x0000, 0x1423,0x0000,0x0000, -0x1424,0x0000,0x0000, 0x1425,0x0000,0x0000, 0x1426,0x0000,0x0000, -0x1427,0x0000,0x0000, 0x1428,0x0000,0x0000, 0x1429,0x0000,0x0000, -0x142A,0x0000,0x0000, 0x142B,0x0000,0x0000, 0x142C,0x0000,0x0000, -0x142D,0x0000,0x0000, 0x142E,0x0000,0x0000, 0x142F,0x0000,0x0000, -0x1430,0x0000,0x0000, 0x1431,0x0000,0x0000, 0x1432,0x0000,0x0000, -0x1433,0x0000,0x0000, 0x1434,0x0000,0x0000, 0x1435,0x0000,0x0000, -0x1436,0x0000,0x0000, 0x1437,0x0000,0x0000, 0x1438,0x0000,0x0000, -0x1439,0x0000,0x0000, 0x143A,0x0000,0x0000, 0x143B,0x0000,0x0000, -0x143C,0x0000,0x0000, 0x143D,0x0000,0x0000, 0x143E,0x0000,0x0000, -0x143F,0x0000,0x0000, 0x1440,0x0000,0x0000, 0x1441,0x0000,0x0000, -0x1442,0x0000,0x0000, 0x1443,0x0000,0x0000, 0x1444,0x0000,0x0000, -0x1445,0x0000,0x0000, 0x1446,0x0000,0x0000, 0x1447,0x0000,0x0000, -0x1448,0x0000,0x0000, 0x1449,0x0000,0x0000, 0x144A,0x0000,0x0000, -0x144B,0x0000,0x0000, 0x144C,0x0000,0x0000, 0x144D,0x0000,0x0000, -0x144E,0x0000,0x0000, 0x144F,0x0000,0x0000, 0x1450,0x0000,0x0000, -0x1451,0x0000,0x0000, 0x1452,0x0000,0x0000, 0x1453,0x0000,0x0000, -0x1454,0x0000,0x0000, 0x1455,0x0000,0x0000, 0x1456,0x0000,0x0000, -0x1457,0x0000,0x0000, 0x1458,0x0000,0x0000, 0x1459,0x0000,0x0000, -0x145A,0x0000,0x0000, 0x145B,0x0000,0x0000, 0x145C,0x0000,0x0000, -0x145D,0x0000,0x0000, 0x145E,0x0000,0x0000, 0x145F,0x0000,0x0000, -0x1460,0x0000,0x0000, 0x1461,0x0000,0x0000, 0xFBC0,0x9247,0x0000, -0x1462,0x0000,0x0000, 0xFBC0,0x9249,0x0000, 0x1463,0x0000,0x0000, -0x1464,0x0000,0x0000, 0x1465,0x0000,0x0000, 0x1466,0x0000,0x0000, -0xFBC0,0x924E,0x0000, 0xFBC0,0x924F,0x0000, 0x1467,0x0000,0x0000, -0x1468,0x0000,0x0000, 0x1469,0x0000,0x0000, 0x146A,0x0000,0x0000, -0x146B,0x0000,0x0000, 0x146C,0x0000,0x0000, 0x146D,0x0000,0x0000, -0xFBC0,0x9257,0x0000, 0x146E,0x0000,0x0000, 0xFBC0,0x9259,0x0000, -0x146F,0x0000,0x0000, 0x1470,0x0000,0x0000, 0x1471,0x0000,0x0000, -0x1472,0x0000,0x0000, 0xFBC0,0x925E,0x0000, 0xFBC0,0x925F,0x0000, -0x1473,0x0000,0x0000, 0x1474,0x0000,0x0000, 0x1475,0x0000,0x0000, -0x1476,0x0000,0x0000, 0x1477,0x0000,0x0000, 0x1478,0x0000,0x0000, -0x1479,0x0000,0x0000, 0x147A,0x0000,0x0000, 0x147B,0x0000,0x0000, -0x147C,0x0000,0x0000, 0x147D,0x0000,0x0000, 0x147E,0x0000,0x0000, -0x147F,0x0000,0x0000, 0x1480,0x0000,0x0000, 0x1481,0x0000,0x0000, -0x1482,0x0000,0x0000, 0x1483,0x0000,0x0000, 0x1484,0x0000,0x0000, -0x1485,0x0000,0x0000, 0x1486,0x0000,0x0000, 0x1487,0x0000,0x0000, -0x1488,0x0000,0x0000, 0x1489,0x0000,0x0000, 0x148A,0x0000,0x0000, -0x148B,0x0000,0x0000, 0x148C,0x0000,0x0000, 0x148D,0x0000,0x0000, -0x148E,0x0000,0x0000, 0x148F,0x0000,0x0000, 0x1490,0x0000,0x0000, -0x1491,0x0000,0x0000, 0x1492,0x0000,0x0000, 0x1493,0x0000,0x0000, -0x1494,0x0000,0x0000, 0x1495,0x0000,0x0000, 0x1496,0x0000,0x0000, -0x1497,0x0000,0x0000, 0x1498,0x0000,0x0000, 0x1499,0x0000,0x0000, -0xFBC0,0x9287,0x0000, 0x149A,0x0000,0x0000, 0xFBC0,0x9289,0x0000, -0x149B,0x0000,0x0000, 0x149C,0x0000,0x0000, 0x149D,0x0000,0x0000, -0x149E,0x0000,0x0000, 0xFBC0,0x928E,0x0000, 0xFBC0,0x928F,0x0000, -0x149F,0x0000,0x0000, 0x14A0,0x0000,0x0000, 0x14A1,0x0000,0x0000, -0x14A2,0x0000,0x0000, 0x14A3,0x0000,0x0000, 0x14A4,0x0000,0x0000, -0x14A5,0x0000,0x0000, 0x14A6,0x0000,0x0000, 0x14A7,0x0000,0x0000, -0x14A8,0x0000,0x0000, 0x14A9,0x0000,0x0000, 0x14AA,0x0000,0x0000, -0x14AB,0x0000,0x0000, 0x14AC,0x0000,0x0000, 0x14AD,0x0000,0x0000, -0x14AE,0x0000,0x0000, 0x14AF,0x0000,0x0000, 0x14B0,0x0000,0x0000, -0x14B1,0x0000,0x0000, 0x14B2,0x0000,0x0000, 0x14B3,0x0000,0x0000, -0x14B4,0x0000,0x0000, 0x14B5,0x0000,0x0000, 0x14B6,0x0000,0x0000, -0x14B7,0x0000,0x0000, 0x14B8,0x0000,0x0000, 0x14B9,0x0000,0x0000, -0x14BA,0x0000,0x0000, 0x14BB,0x0000,0x0000, 0x14BC,0x0000,0x0000, -0x14BD,0x0000,0x0000, 0xFBC0,0x92AF,0x0000, 0x14BE,0x0000,0x0000, -0xFBC0,0x92B1,0x0000, 0x14BF,0x0000,0x0000, 0x14C0,0x0000,0x0000, -0x14C1,0x0000,0x0000, 0x14C2,0x0000,0x0000, 0xFBC0,0x92B6,0x0000, -0xFBC0,0x92B7,0x0000, 0x14C3,0x0000,0x0000, 0x14C4,0x0000,0x0000, -0x14C5,0x0000,0x0000, 0x14C6,0x0000,0x0000, 0x14C7,0x0000,0x0000, -0x14C8,0x0000,0x0000, 0x14C9,0x0000,0x0000, 0xFBC0,0x92BF,0x0000, -0x14CA,0x0000,0x0000, 0xFBC0,0x92C1,0x0000, 0x14CB,0x0000,0x0000, -0x14CC,0x0000,0x0000, 0x14CD,0x0000,0x0000, 0x14CE,0x0000,0x0000, -0xFBC0,0x92C6,0x0000, 0xFBC0,0x92C7,0x0000, 0x14CF,0x0000,0x0000, -0x14D0,0x0000,0x0000, 0x14D1,0x0000,0x0000, 0x14D2,0x0000,0x0000, -0x14D3,0x0000,0x0000, 0x14D4,0x0000,0x0000, 0x14D5,0x0000,0x0000, -0xFBC0,0x92CF,0x0000, 0x14D6,0x0000,0x0000, 0x14D7,0x0000,0x0000, -0x14D8,0x0000,0x0000, 0x14D9,0x0000,0x0000, 0x14DA,0x0000,0x0000, -0x14DB,0x0000,0x0000, 0x14DC,0x0000,0x0000, 0xFBC0,0x92D7,0x0000, -0x14DD,0x0000,0x0000, 0x14DE,0x0000,0x0000, 0x14DF,0x0000,0x0000, -0x14E0,0x0000,0x0000, 0x14E1,0x0000,0x0000, 0x14E2,0x0000,0x0000, -0x14E3,0x0000,0x0000, 0x14E4,0x0000,0x0000, 0x14E5,0x0000,0x0000, -0x14E6,0x0000,0x0000, 0x14E7,0x0000,0x0000, 0x14E8,0x0000,0x0000, -0x14E9,0x0000,0x0000, 0x14EA,0x0000,0x0000, 0x14EB,0x0000,0x0000, -0x14EC,0x0000,0x0000, 0x14ED,0x0000,0x0000, 0x14EE,0x0000,0x0000, -0x14EF,0x0000,0x0000, 0x14F0,0x0000,0x0000, 0x14F1,0x0000,0x0000, -0x14F2,0x0000,0x0000, 0x14F3,0x0000,0x0000, 0xFBC0,0x92EF,0x0000, -0x14F4,0x0000,0x0000, 0x14F5,0x0000,0x0000, 0x14F6,0x0000,0x0000, -0x14F7,0x0000,0x0000, 0x14F8,0x0000,0x0000, 0x14F9,0x0000,0x0000, -0x14FA,0x0000,0x0000, 0x14FB,0x0000,0x0000, 0x14FC,0x0000,0x0000, -0x14FD,0x0000,0x0000, 0x14FE,0x0000,0x0000, 0x14FF,0x0000,0x0000, -0x1500,0x0000,0x0000, 0x1501,0x0000,0x0000, 0x1502,0x0000,0x0000, -0x1503,0x0000,0x0000 }; - -uint16 page013data[]= { /* 1300 (3 weights per char) */ -0x1504,0x0000,0x0000, 0x1505,0x0000,0x0000, 0x1506,0x0000,0x0000, -0x1507,0x0000,0x0000, 0x1508,0x0000,0x0000, 0x1509,0x0000,0x0000, -0x150A,0x0000,0x0000, 0x150B,0x0000,0x0000, 0x150C,0x0000,0x0000, -0x150D,0x0000,0x0000, 0x150E,0x0000,0x0000, 0x150F,0x0000,0x0000, -0x1510,0x0000,0x0000, 0x1511,0x0000,0x0000, 0x1512,0x0000,0x0000, -0xFBC0,0x930F,0x0000, 0x1513,0x0000,0x0000, 0xFBC0,0x9311,0x0000, -0x1514,0x0000,0x0000, 0x1515,0x0000,0x0000, 0x1516,0x0000,0x0000, -0x1517,0x0000,0x0000, 0xFBC0,0x9316,0x0000, 0xFBC0,0x9317,0x0000, -0x1518,0x0000,0x0000, 0x1519,0x0000,0x0000, 0x151A,0x0000,0x0000, -0x151B,0x0000,0x0000, 0x151C,0x0000,0x0000, 0x151D,0x0000,0x0000, -0x151E,0x0000,0x0000, 0xFBC0,0x931F,0x0000, 0x151F,0x0000,0x0000, -0x1520,0x0000,0x0000, 0x1521,0x0000,0x0000, 0x1522,0x0000,0x0000, -0x1523,0x0000,0x0000, 0x1524,0x0000,0x0000, 0x1525,0x0000,0x0000, -0x1526,0x0000,0x0000, 0x1527,0x0000,0x0000, 0x1528,0x0000,0x0000, -0x1529,0x0000,0x0000, 0x152A,0x0000,0x0000, 0x152B,0x0000,0x0000, -0x152C,0x0000,0x0000, 0x152D,0x0000,0x0000, 0x152E,0x0000,0x0000, -0x152F,0x0000,0x0000, 0x1530,0x0000,0x0000, 0x1531,0x0000,0x0000, -0x1532,0x0000,0x0000, 0x1533,0x0000,0x0000, 0x1534,0x0000,0x0000, -0x1535,0x0000,0x0000, 0x1536,0x0000,0x0000, 0x1537,0x0000,0x0000, -0x1538,0x0000,0x0000, 0x1539,0x0000,0x0000, 0x153A,0x0000,0x0000, -0x153B,0x0000,0x0000, 0x153C,0x0000,0x0000, 0x153D,0x0000,0x0000, -0x153E,0x0000,0x0000, 0x153F,0x0000,0x0000, 0x1540,0x0000,0x0000, -0x1541,0x0000,0x0000, 0x1542,0x0000,0x0000, 0x1543,0x0000,0x0000, -0x1544,0x0000,0x0000, 0x1545,0x0000,0x0000, 0xFBC0,0x9347,0x0000, -0x1546,0x0000,0x0000, 0x1547,0x0000,0x0000, 0x1548,0x0000,0x0000, -0x1549,0x0000,0x0000, 0x154A,0x0000,0x0000, 0x154B,0x0000,0x0000, -0x154C,0x0000,0x0000, 0x154D,0x0000,0x0000, 0x154E,0x0000,0x0000, -0x154F,0x0000,0x0000, 0x1550,0x0000,0x0000, 0x1551,0x0000,0x0000, -0x1552,0x0000,0x0000, 0x1553,0x0000,0x0000, 0x1554,0x0000,0x0000, -0x1555,0x0000,0x0000, 0x1556,0x0000,0x0000, 0x1557,0x0000,0x0000, -0x1558,0x0000,0x0000, 0xFBC0,0x935B,0x0000, 0xFBC0,0x935C,0x0000, -0xFBC0,0x935D,0x0000, 0xFBC0,0x935E,0x0000, 0xFBC0,0x935F,0x0000, -0xFBC0,0x9360,0x0000, 0x0245,0x0000,0x0000, 0x0262,0x0000,0x0000, -0x0246,0x0000,0x0000, 0x0247,0x0000,0x0000, 0x0248,0x0000,0x0000, -0x0249,0x0000,0x0000, 0x025A,0x0000,0x0000, 0x0272,0x0000,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0x0DCC,0x0000,0x0000, 0x0DCD,0x0000,0x0000, 0x0DCE,0x0000,0x0000, -0x0DCF,0x0000,0x0000, 0x0DD0,0x0000,0x0000, 0x0DD1,0x0000,0x0000, -0x0DD2,0x0000,0x0000, 0x0DD3,0x0000,0x0000, 0x0DD4,0x0000,0x0000, -0x0DD5,0x0000,0x0000, 0x0DD6,0x0000,0x0000, 0xFBC0,0x937D,0x0000, -0xFBC0,0x937E,0x0000, 0xFBC0,0x937F,0x0000, 0xFBC0,0x9380,0x0000, -0xFBC0,0x9381,0x0000, 0xFBC0,0x9382,0x0000, 0xFBC0,0x9383,0x0000, -0xFBC0,0x9384,0x0000, 0xFBC0,0x9385,0x0000, 0xFBC0,0x9386,0x0000, -0xFBC0,0x9387,0x0000, 0xFBC0,0x9388,0x0000, 0xFBC0,0x9389,0x0000, -0xFBC0,0x938A,0x0000, 0xFBC0,0x938B,0x0000, 0xFBC0,0x938C,0x0000, -0xFBC0,0x938D,0x0000, 0xFBC0,0x938E,0x0000, 0xFBC0,0x938F,0x0000, -0xFBC0,0x9390,0x0000, 0xFBC0,0x9391,0x0000, 0xFBC0,0x9392,0x0000, -0xFBC0,0x9393,0x0000, 0xFBC0,0x9394,0x0000, 0xFBC0,0x9395,0x0000, -0xFBC0,0x9396,0x0000, 0xFBC0,0x9397,0x0000, 0xFBC0,0x9398,0x0000, -0xFBC0,0x9399,0x0000, 0xFBC0,0x939A,0x0000, 0xFBC0,0x939B,0x0000, -0xFBC0,0x939C,0x0000, 0xFBC0,0x939D,0x0000, 0xFBC0,0x939E,0x0000, -0xFBC0,0x939F,0x0000, 0x1A59,0x0000,0x0000, 0x1A5A,0x0000,0x0000, -0x1A5B,0x0000,0x0000, 0x1A5C,0x0000,0x0000, 0x1A5D,0x0000,0x0000, -0x1A5E,0x0000,0x0000, 0x1A5F,0x0000,0x0000, 0x1A60,0x0000,0x0000, -0x1A61,0x0000,0x0000, 0x1A62,0x0000,0x0000, 0x1A63,0x0000,0x0000, -0x1A64,0x0000,0x0000, 0x1A65,0x0000,0x0000, 0x1A66,0x0000,0x0000, -0x1A67,0x0000,0x0000, 0x1A68,0x0000,0x0000, 0x1A69,0x0000,0x0000, -0x1A6A,0x0000,0x0000, 0x1A6B,0x0000,0x0000, 0x1A6C,0x0000,0x0000, -0x1A6D,0x0000,0x0000, 0x1A6E,0x0000,0x0000, 0x1A6F,0x0000,0x0000, -0x1A70,0x0000,0x0000, 0x1A71,0x0000,0x0000, 0x1A72,0x0000,0x0000, -0x1A73,0x0000,0x0000, 0x1A74,0x0000,0x0000, 0x1A75,0x0000,0x0000, -0x1A76,0x0000,0x0000, 0x1A77,0x0000,0x0000, 0x1A78,0x0000,0x0000, -0x1A79,0x0000,0x0000, 0x1A7A,0x0000,0x0000, 0x1A7B,0x0000,0x0000, -0x1A7C,0x0000,0x0000, 0x1A7D,0x0000,0x0000, 0x1A7E,0x0000,0x0000, -0x1A7F,0x0000,0x0000, 0x1A80,0x0000,0x0000, 0x1A81,0x0000,0x0000, -0x1A82,0x0000,0x0000, 0x1A83,0x0000,0x0000, 0x1A84,0x0000,0x0000, -0x1A85,0x0000,0x0000, 0x1A86,0x0000,0x0000, 0x1A87,0x0000,0x0000, -0x1A88,0x0000,0x0000, 0x1A89,0x0000,0x0000, 0x1A8A,0x0000,0x0000, -0x1A8B,0x0000,0x0000, 0x1A8C,0x0000,0x0000, 0x1A8D,0x0000,0x0000, -0x1A8E,0x0000,0x0000, 0x1A8F,0x0000,0x0000, 0x1A90,0x0000,0x0000, -0x1A91,0x0000,0x0000, 0x1A92,0x0000,0x0000, 0x1A93,0x0000,0x0000, -0x1A94,0x0000,0x0000, 0x1A95,0x0000,0x0000, 0x1A96,0x0000,0x0000, -0x1A97,0x0000,0x0000, 0x1A98,0x0000,0x0000, 0x1A99,0x0000,0x0000, -0x1A9A,0x0000,0x0000, 0x1A9B,0x0000,0x0000, 0x1A9C,0x0000,0x0000, -0x1A9D,0x0000,0x0000, 0x1A9E,0x0000,0x0000, 0x1A9F,0x0000,0x0000, -0x1AA0,0x0000,0x0000, 0x1AA1,0x0000,0x0000, 0x1AA2,0x0000,0x0000, -0x1AA3,0x0000,0x0000, 0x1AA4,0x0000,0x0000, 0x1AA5,0x0000,0x0000, -0x1AA6,0x0000,0x0000, 0x1AA7,0x0000,0x0000, 0x1AA8,0x0000,0x0000, -0x1AA9,0x0000,0x0000, 0x1AAA,0x0000,0x0000, 0x1AAB,0x0000,0x0000, -0x1AAC,0x0000,0x0000, 0x1AAD,0x0000,0x0000, 0xFBC0,0x93F5,0x0000, -0xFBC0,0x93F6,0x0000, 0xFBC0,0x93F7,0x0000, 0xFBC0,0x93F8,0x0000, -0xFBC0,0x93F9,0x0000, 0xFBC0,0x93FA,0x0000, 0xFBC0,0x93FB,0x0000, -0xFBC0,0x93FC,0x0000, 0xFBC0,0x93FD,0x0000, 0xFBC0,0x93FE,0x0000, -0xFBC0,0x93FF,0x0000 }; - -uint16 page014data[]= { /* 1400 (3 weights per char) */ -0xFBC0,0x9400,0x0000, 0x1AAE,0x0000,0x0000, 0x1AAF,0x0000,0x0000, -0x1AB0,0x0000,0x0000, 0x1AB1,0x0000,0x0000, 0x1AB2,0x0000,0x0000, -0x1AB3,0x0000,0x0000, 0x1AB4,0x0000,0x0000, 0x1AB5,0x0000,0x0000, -0x1AB6,0x0000,0x0000, 0x1AB7,0x0000,0x0000, 0x1AB8,0x0000,0x0000, -0x1AB9,0x0000,0x0000, 0x1ABA,0x0000,0x0000, 0x1ABB,0x0000,0x0000, -0x1ABC,0x0000,0x0000, 0x1ABD,0x0000,0x0000, 0x1ABE,0x0000,0x0000, -0x1ABF,0x0000,0x0000, 0x1AC0,0x0000,0x0000, 0x1AC1,0x0000,0x0000, -0x1AC2,0x0000,0x0000, 0x1AC3,0x0000,0x0000, 0x1AC4,0x0000,0x0000, -0x1AC5,0x0000,0x0000, 0x1AC6,0x0000,0x0000, 0x1AC7,0x0000,0x0000, -0x1AC8,0x0000,0x0000, 0x1AC9,0x0000,0x0000, 0x1ACA,0x0000,0x0000, -0x1ACB,0x0000,0x0000, 0x1ACC,0x0000,0x0000, 0x1ACD,0x0000,0x0000, -0x1ACE,0x0000,0x0000, 0x1ACF,0x0000,0x0000, 0x1AD0,0x0000,0x0000, -0x1AD1,0x0000,0x0000, 0x1AD2,0x0000,0x0000, 0x1AD3,0x0000,0x0000, -0x1AD4,0x0000,0x0000, 0x1AD5,0x0000,0x0000, 0x1AD6,0x0000,0x0000, -0x1AD7,0x0000,0x0000, 0x1AD8,0x0000,0x0000, 0x1AD9,0x0000,0x0000, -0x1ADA,0x0000,0x0000, 0x1ADB,0x0000,0x0000, 0x1ADC,0x0000,0x0000, -0x1ADD,0x0000,0x0000, 0x1ADE,0x0000,0x0000, 0x1ADF,0x0000,0x0000, -0x1AE0,0x0000,0x0000, 0x1AE1,0x0000,0x0000, 0x1AE2,0x0000,0x0000, -0x1AE3,0x0000,0x0000, 0x1AE4,0x0000,0x0000, 0x1AE5,0x0000,0x0000, -0x1AE6,0x0000,0x0000, 0x1AE7,0x0000,0x0000, 0x1AE8,0x0000,0x0000, -0x1AE9,0x0000,0x0000, 0x1AEA,0x0000,0x0000, 0x1AEB,0x0000,0x0000, -0x1AEC,0x0000,0x0000, 0x1AED,0x0000,0x0000, 0x1AEE,0x0000,0x0000, -0x1AEF,0x0000,0x0000, 0x1AF0,0x0000,0x0000, 0x1AF1,0x0000,0x0000, -0x1AF2,0x0000,0x0000, 0x1AF3,0x0000,0x0000, 0x1AF4,0x0000,0x0000, -0x1AF5,0x0000,0x0000, 0x1AF6,0x0000,0x0000, 0x1AF7,0x0000,0x0000, -0x1AF8,0x0000,0x0000, 0x1AF9,0x0000,0x0000, 0x1AFA,0x0000,0x0000, -0x1AFB,0x0000,0x0000, 0x1AFC,0x0000,0x0000, 0x1AFD,0x0000,0x0000, -0x1AFE,0x0000,0x0000, 0x1AFF,0x0000,0x0000, 0x1B00,0x0000,0x0000, -0x1B01,0x0000,0x0000, 0x1B02,0x0000,0x0000, 0x1B03,0x0000,0x0000, -0x1B04,0x0000,0x0000, 0x1B05,0x0000,0x0000, 0x1B06,0x0000,0x0000, -0x1B07,0x0000,0x0000, 0x1B08,0x0000,0x0000, 0x1B09,0x0000,0x0000, -0x1B0A,0x0000,0x0000, 0x1B0B,0x0000,0x0000, 0x1B0C,0x0000,0x0000, -0x1B0D,0x0000,0x0000, 0x1B0E,0x0000,0x0000, 0x1B0F,0x0000,0x0000, -0x1B10,0x0000,0x0000, 0x1B11,0x0000,0x0000, 0x1B12,0x0000,0x0000, -0x1B13,0x0000,0x0000, 0x1B14,0x0000,0x0000, 0x1B15,0x0000,0x0000, -0x1B16,0x0000,0x0000, 0x1B17,0x0000,0x0000, 0x1B18,0x0000,0x0000, -0x1B19,0x0000,0x0000, 0x1B1A,0x0000,0x0000, 0x1B1B,0x0000,0x0000, -0x1B1C,0x0000,0x0000, 0x1B1D,0x0000,0x0000, 0x1B1E,0x0000,0x0000, -0x1B1F,0x0000,0x0000, 0x1B20,0x0000,0x0000, 0x1B21,0x0000,0x0000, -0x1B22,0x0000,0x0000, 0x1B23,0x0000,0x0000, 0x1B24,0x0000,0x0000, -0x1B25,0x0000,0x0000, 0x1B26,0x0000,0x0000, 0x1B27,0x0000,0x0000, -0x1B28,0x0000,0x0000, 0x1B29,0x0000,0x0000, 0x1B2A,0x0000,0x0000, -0x1B2B,0x0000,0x0000, 0x1B2C,0x0000,0x0000, 0x1B2D,0x0000,0x0000, -0x1B2E,0x0000,0x0000, 0x1B2F,0x0000,0x0000, 0x1B30,0x0000,0x0000, -0x1B31,0x0000,0x0000, 0x1B32,0x0000,0x0000, 0x1B33,0x0000,0x0000, -0x1B34,0x0000,0x0000, 0x1B35,0x0000,0x0000, 0x1B36,0x0000,0x0000, -0x1B37,0x0000,0x0000, 0x1B38,0x0000,0x0000, 0x1B39,0x0000,0x0000, -0x1B3A,0x0000,0x0000, 0x1B3B,0x0000,0x0000, 0x1B3C,0x0000,0x0000, -0x1B3D,0x0000,0x0000, 0x1B3E,0x0000,0x0000, 0x1B3F,0x0000,0x0000, -0x1B40,0x0000,0x0000, 0x1B41,0x0000,0x0000, 0x1B42,0x0000,0x0000, -0x1B43,0x0000,0x0000, 0x1B44,0x0000,0x0000, 0x1B45,0x0000,0x0000, -0x1B46,0x0000,0x0000, 0x1B47,0x0000,0x0000, 0x1B48,0x0000,0x0000, -0x1B49,0x0000,0x0000, 0x1B4A,0x0000,0x0000, 0x1B4B,0x0000,0x0000, -0x1B4C,0x0000,0x0000, 0x1B4D,0x0000,0x0000, 0x1B4E,0x0000,0x0000, -0x1B4F,0x0000,0x0000, 0x1B50,0x0000,0x0000, 0x1B51,0x0000,0x0000, -0x1B52,0x0000,0x0000, 0x1B53,0x0000,0x0000, 0x1B54,0x0000,0x0000, -0x1B55,0x0000,0x0000, 0x1B56,0x0000,0x0000, 0x1B57,0x0000,0x0000, -0x1B58,0x0000,0x0000, 0x1B59,0x0000,0x0000, 0x1B5A,0x0000,0x0000, -0x1B5B,0x0000,0x0000, 0x1B5C,0x0000,0x0000, 0x1B5D,0x0000,0x0000, -0x1B5E,0x0000,0x0000, 0x1B5F,0x0000,0x0000, 0x1B60,0x0000,0x0000, -0x1B61,0x0000,0x0000, 0x1B62,0x0000,0x0000, 0x1B63,0x0000,0x0000, -0x1B64,0x0000,0x0000, 0x1B65,0x0000,0x0000, 0x1B66,0x0000,0x0000, -0x1B67,0x0000,0x0000, 0x1B68,0x0000,0x0000, 0x1B69,0x0000,0x0000, -0x1B6A,0x0000,0x0000, 0x1B6B,0x0000,0x0000, 0x1B6C,0x0000,0x0000, -0x1B6D,0x0000,0x0000, 0x1B6E,0x0000,0x0000, 0x1B6F,0x0000,0x0000, -0x1B70,0x0000,0x0000, 0x1B71,0x0000,0x0000, 0x1B72,0x0000,0x0000, -0x1B73,0x0000,0x0000, 0x1B74,0x0000,0x0000, 0x1B75,0x0000,0x0000, -0x1B76,0x0000,0x0000, 0x1B77,0x0000,0x0000, 0x1B78,0x0000,0x0000, -0x1B79,0x0000,0x0000, 0x1B7A,0x0000,0x0000, 0x1B7B,0x0000,0x0000, -0x1B7C,0x0000,0x0000, 0x1B7D,0x0000,0x0000, 0x1B7E,0x0000,0x0000, -0x1B7F,0x0000,0x0000, 0x1B80,0x0000,0x0000, 0x1B81,0x0000,0x0000, -0x1B82,0x0000,0x0000, 0x1B83,0x0000,0x0000, 0x1B84,0x0000,0x0000, -0x1B85,0x0000,0x0000, 0x1B86,0x0000,0x0000, 0x1B87,0x0000,0x0000, -0x1B88,0x0000,0x0000, 0x1B89,0x0000,0x0000, 0x1B8A,0x0000,0x0000, -0x1B8B,0x0000,0x0000, 0x1B8C,0x0000,0x0000, 0x1B8D,0x0000,0x0000, -0x1B8E,0x0000,0x0000, 0x1B8F,0x0000,0x0000, 0x1B90,0x0000,0x0000, -0x1B91,0x0000,0x0000, 0x1B92,0x0000,0x0000, 0x1B93,0x0000,0x0000, -0x1B94,0x0000,0x0000, 0x1B95,0x0000,0x0000, 0x1B96,0x0000,0x0000, -0x1B97,0x0000,0x0000, 0x1B98,0x0000,0x0000, 0x1B99,0x0000,0x0000, -0x1B9A,0x0000,0x0000, 0x1B9B,0x0000,0x0000, 0x1B9C,0x0000,0x0000, -0x1B9D,0x0000,0x0000, 0x1B9E,0x0000,0x0000, 0x1B9F,0x0000,0x0000, -0x1BA0,0x0000,0x0000, 0x1BA1,0x0000,0x0000, 0x1BA2,0x0000,0x0000, -0x1BA3,0x0000,0x0000, 0x1BA4,0x0000,0x0000, 0x1BA5,0x0000,0x0000, -0x1BA6,0x0000,0x0000, 0x1BA7,0x0000,0x0000, 0x1BA8,0x0000,0x0000, -0x1BA9,0x0000,0x0000, 0x1BAA,0x0000,0x0000, 0x1BAB,0x0000,0x0000, -0x1BAC,0x0000,0x0000 }; - -uint16 page015data[]= { /* 1500 (2 weights per char) */ -0x1BAD,0x0000, 0x1BAE,0x0000, 0x1BAF,0x0000, 0x1BB0,0x0000, -0x1BB1,0x0000, 0x1BB2,0x0000, 0x1BB3,0x0000, 0x1BB4,0x0000, -0x1BB5,0x0000, 0x1BB6,0x0000, 0x1BB7,0x0000, 0x1BB8,0x0000, -0x1BB9,0x0000, 0x1BBA,0x0000, 0x1BBB,0x0000, 0x1BBC,0x0000, -0x1BBD,0x0000, 0x1BBE,0x0000, 0x1BBF,0x0000, 0x1BC0,0x0000, -0x1BC1,0x0000, 0x1BC2,0x0000, 0x1BC3,0x0000, 0x1BC4,0x0000, -0x1BC5,0x0000, 0x1BC6,0x0000, 0x1BC7,0x0000, 0x1BC8,0x0000, -0x1BC9,0x0000, 0x1BCA,0x0000, 0x1BCB,0x0000, 0x1BCC,0x0000, -0x1BCD,0x0000, 0x1BCE,0x0000, 0x1BCF,0x0000, 0x1BD0,0x0000, -0x1BD1,0x0000, 0x1BD2,0x0000, 0x1BD3,0x0000, 0x1BD4,0x0000, -0x1BD5,0x0000, 0x1BD6,0x0000, 0x1BD7,0x0000, 0x1BD8,0x0000, -0x1BD9,0x0000, 0x1BDA,0x0000, 0x1BDB,0x0000, 0x1BDC,0x0000, -0x1BDD,0x0000, 0x1BDE,0x0000, 0x1BDF,0x0000, 0x1BE0,0x0000, -0x1BE1,0x0000, 0x1BE2,0x0000, 0x1BE3,0x0000, 0x1BE4,0x0000, -0x1BE5,0x0000, 0x1BE6,0x0000, 0x1BE7,0x0000, 0x1BE8,0x0000, -0x1BE9,0x0000, 0x1BEA,0x0000, 0x1BEB,0x0000, 0x1BEC,0x0000, -0x1BED,0x0000, 0x1BEE,0x0000, 0x1BEF,0x0000, 0x1BF0,0x0000, -0x1BF1,0x0000, 0x1BF2,0x0000, 0x1BF3,0x0000, 0x1BF4,0x0000, -0x1BF5,0x0000, 0x1BF6,0x0000, 0x1BF7,0x0000, 0x1BF8,0x0000, -0x1BF9,0x0000, 0x1BFA,0x0000, 0x1BFB,0x0000, 0x1BFC,0x0000, -0x1BFD,0x0000, 0x1BFE,0x0000, 0x1BFF,0x0000, 0x1C00,0x0000, -0x1C01,0x0000, 0x1C02,0x0000, 0x1C03,0x0000, 0x1C04,0x0000, -0x1C05,0x0000, 0x1C06,0x0000, 0x1C07,0x0000, 0x1C08,0x0000, -0x1C09,0x0000, 0x1C0A,0x0000, 0x1C0B,0x0000, 0x1C0C,0x0000, -0x1C0D,0x0000, 0x1C0E,0x0000, 0x1C0F,0x0000, 0x1C10,0x0000, -0x1C11,0x0000, 0x1C12,0x0000, 0x1C13,0x0000, 0x1C14,0x0000, -0x1C15,0x0000, 0x1C16,0x0000, 0x1C17,0x0000, 0x1C18,0x0000, -0x1C19,0x0000, 0x1C1A,0x0000, 0x1C1B,0x0000, 0x1C1C,0x0000, -0x1C1D,0x0000, 0x1C1E,0x0000, 0x1C1F,0x0000, 0x1C20,0x0000, -0x1C21,0x0000, 0x1C22,0x0000, 0x1C23,0x0000, 0x1C24,0x0000, -0x1C25,0x0000, 0x1C26,0x0000, 0x1C27,0x0000, 0x1C28,0x0000, -0x1C5B,0x0000, 0x1C29,0x0000, 0x1C2B,0x0000, 0x1C2C,0x0000, -0x1C2D,0x0000, 0x1C2E,0x0000, 0x1C2F,0x0000, 0x1C30,0x0000, -0x1C31,0x0000, 0x1C32,0x0000, 0x1C33,0x0000, 0x1C34,0x0000, -0x1C35,0x0000, 0x1C36,0x0000, 0x1C37,0x0000, 0x1C38,0x0000, -0x1C39,0x0000, 0x1C3A,0x0000, 0x1C3C,0x0000, 0x1C3D,0x0000, -0x1C3E,0x0000, 0x1C3F,0x0000, 0x1C40,0x0000, 0x1C41,0x0000, -0x1C42,0x0000, 0x1C43,0x0000, 0x1C4A,0x0000, 0x1C4B,0x0000, -0x1C4C,0x0000, 0x1C4D,0x0000, 0x1C4E,0x0000, 0x1C4F,0x0000, -0x1C50,0x0000, 0x1C51,0x0000, 0x1C52,0x0000, 0x1C53,0x0000, -0x1C54,0x0000, 0x1C55,0x0000, 0x1C56,0x0000, 0x1C57,0x0000, -0x1C58,0x0000, 0x1C59,0x0000, 0x1C5A,0x0000, 0x1C5C,0x0000, -0x1C5D,0x0000, 0x1C5E,0x0000, 0x1C5F,0x0000, 0x1C60,0x0000, -0x1C61,0x0000, 0x1C62,0x0000, 0x1C63,0x0000, 0x1C64,0x0000, -0x1C65,0x0000, 0x1C66,0x0000, 0x1C67,0x0000, 0x1C68,0x0000, -0x1C69,0x0000, 0x1C6A,0x0000, 0x1C6B,0x0000, 0x1C6C,0x0000, -0x1C6D,0x0000, 0x1C6E,0x0000, 0x1C6F,0x0000, 0x1C70,0x0000, -0x1C71,0x0000, 0x1C72,0x0000, 0x1C73,0x0000, 0x1C74,0x0000, -0x1C75,0x0000, 0x1C76,0x0000, 0x1C77,0x0000, 0x1C78,0x0000, -0x1C79,0x0000, 0x1C7A,0x0000, 0x1C7B,0x0000, 0x1C7C,0x0000, -0x1C7D,0x0000, 0x1C7E,0x0000, 0x1C7F,0x0000, 0x1C80,0x0000, -0x1C81,0x0000, 0x1C82,0x0000, 0x1C83,0x0000, 0x1C84,0x0000, -0x1C85,0x0000, 0x1C86,0x0000, 0x1C87,0x0000, 0x1C88,0x0000, -0x1C89,0x0000, 0x1C8A,0x0000, 0x1C8B,0x0000, 0x1C8C,0x0000, -0x1C8D,0x0000, 0x1C8E,0x0000, 0x1C8F,0x0000, 0x1C90,0x0000, -0x1C91,0x0000, 0x1C92,0x0000, 0x1C93,0x0000, 0x1C94,0x0000, -0x1C95,0x0000, 0x1C96,0x0000, 0x1C97,0x0000, 0x1C98,0x0000, -0x1C99,0x0000, 0x1C9A,0x0000, 0x1C9B,0x0000, 0x1C9C,0x0000, -0x1C9D,0x0000, 0x1C9E,0x0000, 0x1C9F,0x0000, 0x1CA0,0x0000, -0x1CA1,0x0000, 0x1CA2,0x0000, 0x1CA3,0x0000, 0x1CA4,0x0000, -0x1CA5,0x0000, 0x1CA6,0x0000, 0x1CA7,0x0000, 0x1CA8,0x0000, -0x1CA9,0x0000, 0x1CAA,0x0000, 0x1CAB,0x0000, 0x1CAC,0x0000, -0x1CAD,0x0000, 0x1CAE,0x0000, 0x1CAF,0x0000, 0x1CB0,0x0000, -0x1CB1,0x0000, 0x1CB2,0x0000, 0x1CB3,0x0000, 0x1CB4,0x0000 -}; - -uint16 page016data[]= { /* 1600 (3 weights per char) */ -0x1CB5,0x0000,0x0000, 0x1CB6,0x0000,0x0000, 0x1CB7,0x0000,0x0000, -0x1CB8,0x0000,0x0000, 0x1CB9,0x0000,0x0000, 0x1CBA,0x0000,0x0000, -0x1CBB,0x0000,0x0000, 0x1CBC,0x0000,0x0000, 0x1CBD,0x0000,0x0000, -0x1CBE,0x0000,0x0000, 0x1CBF,0x0000,0x0000, 0x1CC0,0x0000,0x0000, -0x1CC1,0x0000,0x0000, 0x1CC2,0x0000,0x0000, 0x1CC3,0x0000,0x0000, -0x1CC4,0x0000,0x0000, 0x1CC5,0x0000,0x0000, 0x1CC6,0x0000,0x0000, -0x1CC7,0x0000,0x0000, 0x1CC8,0x0000,0x0000, 0x1CC9,0x0000,0x0000, -0x1CCA,0x0000,0x0000, 0x1CCB,0x0000,0x0000, 0x1CCC,0x0000,0x0000, -0x1CCD,0x0000,0x0000, 0x1CCE,0x0000,0x0000, 0x1CCF,0x0000,0x0000, -0x1CD0,0x0000,0x0000, 0x1CD1,0x0000,0x0000, 0x1CD2,0x0000,0x0000, -0x1CD3,0x0000,0x0000, 0x1CD4,0x0000,0x0000, 0x1CD5,0x0000,0x0000, -0x1CD6,0x0000,0x0000, 0x1CD7,0x0000,0x0000, 0x1CD8,0x0000,0x0000, -0x1CD9,0x0000,0x0000, 0x1CDA,0x0000,0x0000, 0x1CDB,0x0000,0x0000, -0x1CDC,0x0000,0x0000, 0x1CDD,0x0000,0x0000, 0x1CDE,0x0000,0x0000, -0x1CDF,0x0000,0x0000, 0x1CE0,0x0000,0x0000, 0x1CE1,0x0000,0x0000, -0x1CE2,0x0000,0x0000, 0x1CE3,0x0000,0x0000, 0x1CE4,0x0000,0x0000, -0x1CE5,0x0000,0x0000, 0x1CE6,0x0000,0x0000, 0x1CE7,0x0000,0x0000, -0x1CE8,0x0000,0x0000, 0x1CE9,0x0000,0x0000, 0x1CEA,0x0000,0x0000, -0x1CEB,0x0000,0x0000, 0x1CEC,0x0000,0x0000, 0x1CED,0x0000,0x0000, -0x1CEE,0x0000,0x0000, 0x1CEF,0x0000,0x0000, 0x1CF0,0x0000,0x0000, -0x1CF1,0x0000,0x0000, 0x1CF2,0x0000,0x0000, 0x1CF3,0x0000,0x0000, -0x1CF4,0x0000,0x0000, 0x1CF5,0x0000,0x0000, 0x1CF6,0x0000,0x0000, -0x1CF7,0x0000,0x0000, 0x1CF8,0x0000,0x0000, 0x1CF9,0x0000,0x0000, -0x1CFA,0x0000,0x0000, 0x1CFB,0x0000,0x0000, 0x1CFC,0x0000,0x0000, -0x1CFD,0x0000,0x0000, 0x1CFE,0x0000,0x0000, 0x1CFF,0x0000,0x0000, -0x1D00,0x0000,0x0000, 0x1D01,0x0000,0x0000, 0x1D02,0x0000,0x0000, -0x1D03,0x0000,0x0000, 0x1D04,0x0000,0x0000, 0x1D05,0x0000,0x0000, -0x1D06,0x0000,0x0000, 0x1D07,0x0000,0x0000, 0x1D08,0x0000,0x0000, -0x1D09,0x0000,0x0000, 0x1D0A,0x0000,0x0000, 0x1D0B,0x0000,0x0000, -0x1D0C,0x0000,0x0000, 0x1D0D,0x0000,0x0000, 0x1D0E,0x0000,0x0000, -0x1D0F,0x0000,0x0000, 0x1D10,0x0000,0x0000, 0x1D11,0x0000,0x0000, -0x1D12,0x0000,0x0000, 0x1D13,0x0000,0x0000, 0x1D14,0x0000,0x0000, -0x1D15,0x0000,0x0000, 0x1D16,0x0000,0x0000, 0x1D17,0x0000,0x0000, -0x1D18,0x0000,0x0000, 0x1D19,0x0000,0x0000, 0x1D1A,0x0000,0x0000, -0x1D1B,0x0000,0x0000, 0x1D1C,0x0000,0x0000, 0x1D1D,0x0000,0x0000, -0x1D1E,0x0000,0x0000, 0x1D1F,0x0000,0x0000, 0x1D20,0x0000,0x0000, -0x1D21,0x0000,0x0000, 0x0316,0x0000,0x0000, 0x0265,0x0000,0x0000, -0x1C2A,0x0000,0x0000, 0x1C3B,0x0000,0x0000, 0x1C44,0x0000,0x0000, -0x1C45,0x0000,0x0000, 0x1C46,0x0000,0x0000, 0x1C47,0x0000,0x0000, -0x1C48,0x0000,0x0000, 0x1C49,0x0000,0x0000, 0xFBC0,0x9677,0x0000, -0xFBC0,0x9678,0x0000, 0xFBC0,0x9679,0x0000, 0xFBC0,0x967A,0x0000, -0xFBC0,0x967B,0x0000, 0xFBC0,0x967C,0x0000, 0xFBC0,0x967D,0x0000, -0xFBC0,0x967E,0x0000, 0xFBC0,0x967F,0x0000, 0x020A,0x0000,0x0000, -0x1D22,0x0000,0x0000, 0x1D23,0x0000,0x0000, 0x1D24,0x0000,0x0000, -0x1D25,0x0000,0x0000, 0x1D26,0x0000,0x0000, 0x1D27,0x0000,0x0000, -0x1D28,0x0000,0x0000, 0x1D29,0x0000,0x0000, 0x1D2A,0x0000,0x0000, -0x1D2B,0x0000,0x0000, 0x1D2C,0x0000,0x0000, 0x1D2D,0x0000,0x0000, -0x1D2E,0x0000,0x0000, 0x1D2F,0x0000,0x0000, 0x1D30,0x0000,0x0000, -0x1D31,0x0000,0x0000, 0x1D32,0x0000,0x0000, 0x1D33,0x0000,0x0000, -0x1D34,0x0000,0x0000, 0x1D35,0x0000,0x0000, 0x1D36,0x0000,0x0000, -0x1D37,0x0000,0x0000, 0x1D38,0x0000,0x0000, 0x1D39,0x0000,0x0000, -0x1D3A,0x0000,0x0000, 0x1D3B,0x0000,0x0000, 0x0292,0x0000,0x0000, -0x0293,0x0000,0x0000, 0xFBC0,0x969D,0x0000, 0xFBC0,0x969E,0x0000, -0xFBC0,0x969F,0x0000, 0x1D3C,0x0000,0x0000, 0x1D3C,0x0000,0x0000, -0x1D3D,0x0000,0x0000, 0x1D59,0x0000,0x0000, 0x1D3D,0x0000,0x0000, -0x1D3D,0x0000,0x0000, 0x1D3E,0x0000,0x0000, 0x1D3E,0x0000,0x0000, -0x1D3F,0x0000,0x0000, 0x1D3F,0x0000,0x0000, 0x1D57,0x0000,0x0000, -0x1D58,0x0000,0x0000, 0x1D3F,0x0000,0x0000, 0x1D3F,0x0000,0x0000, -0x1D3F,0x0000,0x0000, 0x1D40,0x0000,0x0000, 0x1D41,0x0000,0x0000, -0x1D42,0x0000,0x0000, 0x1D43,0x0000,0x0000, 0x1D43,0x0000,0x0000, -0x1D43,0x0000,0x0000, 0x1D43,0x0000,0x0000, 0x1D43,0x0000,0x0000, -0x1D44,0x0000,0x0000, 0x1D5C,0x0000,0x0000, 0x1D45,0x0000,0x0000, -0x1D46,0x0000,0x0000, 0x1D46,0x0000,0x0000, 0x1D46,0x0000,0x0000, -0x1D46,0x0000,0x0000, 0x1D47,0x0000,0x0000, 0x1D47,0x0000,0x0000, -0x1D47,0x0000,0x0000, 0x1D48,0x0000,0x0000, 0x1D48,0x0000,0x0000, -0x1D49,0x0000,0x0000, 0x1D49,0x0000,0x0000, 0x1D4A,0x0000,0x0000, -0x1D4A,0x0000,0x0000, 0x1D4B,0x0000,0x0000, 0x1D4C,0x0000,0x0000, -0x1D4D,0x0000,0x0000, 0x1D4E,0x0000,0x0000, 0x1D4E,0x0000,0x0000, -0x1D4E,0x0000,0x0000, 0x1D4E,0x0000,0x0000, 0x1D4E,0x0000,0x0000, -0x1D4F,0x0000,0x0000, 0x1D4F,0x0000,0x0000, 0x1D4F,0x0000,0x0000, -0x1D50,0x0000,0x0000, 0x1D50,0x0000,0x0000, 0x1D50,0x0000,0x0000, -0x1D4C,0x0000,0x0000, 0x1D51,0x0000,0x0000, 0x1D52,0x0000,0x0000, -0x1D52,0x0000,0x0000, 0x1D52,0x0000,0x0000, 0x1D53,0x0000,0x0000, -0x1D53,0x0000,0x0000, 0x1D54,0x0000,0x0000, 0x1D54,0x0000,0x0000, -0x1D55,0x0000,0x0000, 0x1D56,0x0000,0x0000, 0x1D5A,0x0000,0x0000, -0x1D5E,0x0000,0x0000, 0x1D5F,0x0000,0x0000, 0x1D5B,0x0000,0x0000, -0x1D5D,0x0000,0x0000, 0x1D60,0x0000,0x0000, 0x1D61,0x0000,0x0000, -0x1D61,0x0000,0x0000, 0x1D61,0x0000,0x0000, 0x1D45,0x0000,0x0000, -0x1D4E,0x0000,0x0000, 0x024E,0x0000,0x0000, 0x024F,0x0000,0x0000, -0x0250,0x0000,0x0000, 0x1D4A,0x1D53,0x0000, 0x1D52,0x1D52,0x0000, -0x1D3E,0x1D3E,0x0000, 0xFBC0,0x96F1,0x0000, 0xFBC0,0x96F2,0x0000, -0xFBC0,0x96F3,0x0000, 0xFBC0,0x96F4,0x0000, 0xFBC0,0x96F5,0x0000, -0xFBC0,0x96F6,0x0000, 0xFBC0,0x96F7,0x0000, 0xFBC0,0x96F8,0x0000, -0xFBC0,0x96F9,0x0000, 0xFBC0,0x96FA,0x0000, 0xFBC0,0x96FB,0x0000, -0xFBC0,0x96FC,0x0000, 0xFBC0,0x96FD,0x0000, 0xFBC0,0x96FE,0x0000, -0xFBC0,0x96FF,0x0000 }; - -uint16 page017data[]= { /* 1700 (3 weights per char) */ -0x18E2,0x0000,0x0000, 0x18E3,0x0000,0x0000, 0x18E4,0x0000,0x0000, -0x18E5,0x0000,0x0000, 0x18E6,0x0000,0x0000, 0x18E7,0x0000,0x0000, -0x18E8,0x0000,0x0000, 0x18E9,0x0000,0x0000, 0x18EA,0x0000,0x0000, -0x18EB,0x0000,0x0000, 0x18EC,0x0000,0x0000, 0x18ED,0x0000,0x0000, -0x18EE,0x0000,0x0000, 0xFBC0,0x970D,0x0000, 0x18EF,0x0000,0x0000, -0x18F0,0x0000,0x0000, 0x18F1,0x0000,0x0000, 0x18F2,0x0000,0x0000, -0x18F3,0x0000,0x0000, 0x18F4,0x0000,0x0000, 0x18F5,0x0000,0x0000, -0xFBC0,0x9715,0x0000, 0xFBC0,0x9716,0x0000, 0xFBC0,0x9717,0x0000, -0xFBC0,0x9718,0x0000, 0xFBC0,0x9719,0x0000, 0xFBC0,0x971A,0x0000, -0xFBC0,0x971B,0x0000, 0xFBC0,0x971C,0x0000, 0xFBC0,0x971D,0x0000, -0xFBC0,0x971E,0x0000, 0xFBC0,0x971F,0x0000, 0x18F6,0x0000,0x0000, -0x18F7,0x0000,0x0000, 0x18F8,0x0000,0x0000, 0x18F9,0x0000,0x0000, -0x18FA,0x0000,0x0000, 0x18FB,0x0000,0x0000, 0x18FC,0x0000,0x0000, -0x18FD,0x0000,0x0000, 0x18FE,0x0000,0x0000, 0x18FF,0x0000,0x0000, -0x1900,0x0000,0x0000, 0x1901,0x0000,0x0000, 0x1902,0x0000,0x0000, -0x1903,0x0000,0x0000, 0x1904,0x0000,0x0000, 0x1905,0x0000,0x0000, -0x1906,0x0000,0x0000, 0x1907,0x0000,0x0000, 0x1908,0x0000,0x0000, -0x1909,0x0000,0x0000, 0x190A,0x0000,0x0000, 0x026A,0x0000,0x0000, -0x026B,0x0000,0x0000, 0xFBC0,0x9737,0x0000, 0xFBC0,0x9738,0x0000, -0xFBC0,0x9739,0x0000, 0xFBC0,0x973A,0x0000, 0xFBC0,0x973B,0x0000, -0xFBC0,0x973C,0x0000, 0xFBC0,0x973D,0x0000, 0xFBC0,0x973E,0x0000, -0xFBC0,0x973F,0x0000, 0x190B,0x0000,0x0000, 0x190C,0x0000,0x0000, -0x190D,0x0000,0x0000, 0x190E,0x0000,0x0000, 0x190F,0x0000,0x0000, -0x1910,0x0000,0x0000, 0x1911,0x0000,0x0000, 0x1912,0x0000,0x0000, -0x1913,0x0000,0x0000, 0x1914,0x0000,0x0000, 0x1915,0x0000,0x0000, -0x1916,0x0000,0x0000, 0x1917,0x0000,0x0000, 0x1918,0x0000,0x0000, -0x1919,0x0000,0x0000, 0x191A,0x0000,0x0000, 0x191B,0x0000,0x0000, -0x191C,0x0000,0x0000, 0x191D,0x0000,0x0000, 0x191E,0x0000,0x0000, -0xFBC0,0x9754,0x0000, 0xFBC0,0x9755,0x0000, 0xFBC0,0x9756,0x0000, -0xFBC0,0x9757,0x0000, 0xFBC0,0x9758,0x0000, 0xFBC0,0x9759,0x0000, -0xFBC0,0x975A,0x0000, 0xFBC0,0x975B,0x0000, 0xFBC0,0x975C,0x0000, -0xFBC0,0x975D,0x0000, 0xFBC0,0x975E,0x0000, 0xFBC0,0x975F,0x0000, -0x191F,0x0000,0x0000, 0x1920,0x0000,0x0000, 0x1921,0x0000,0x0000, -0x1922,0x0000,0x0000, 0x1923,0x0000,0x0000, 0x1924,0x0000,0x0000, -0x1925,0x0000,0x0000, 0x1926,0x0000,0x0000, 0x1927,0x0000,0x0000, -0x1928,0x0000,0x0000, 0x1929,0x0000,0x0000, 0x192A,0x0000,0x0000, -0x192B,0x0000,0x0000, 0xFBC0,0x976D,0x0000, 0x192C,0x0000,0x0000, -0x192D,0x0000,0x0000, 0x192E,0x0000,0x0000, 0xFBC0,0x9771,0x0000, -0x192F,0x0000,0x0000, 0x1930,0x0000,0x0000, 0xFBC0,0x9774,0x0000, -0xFBC0,0x9775,0x0000, 0xFBC0,0x9776,0x0000, 0xFBC0,0x9777,0x0000, -0xFBC0,0x9778,0x0000, 0xFBC0,0x9779,0x0000, 0xFBC0,0x977A,0x0000, -0xFBC0,0x977B,0x0000, 0xFBC0,0x977C,0x0000, 0xFBC0,0x977D,0x0000, -0xFBC0,0x977E,0x0000, 0xFBC0,0x977F,0x0000, 0x196C,0x0000,0x0000, -0x196D,0x0000,0x0000, 0x196E,0x0000,0x0000, 0x196F,0x0000,0x0000, -0x1970,0x0000,0x0000, 0x1971,0x0000,0x0000, 0x1972,0x0000,0x0000, -0x1973,0x0000,0x0000, 0x1974,0x0000,0x0000, 0x1975,0x0000,0x0000, -0x1976,0x0000,0x0000, 0x1977,0x0000,0x0000, 0x1978,0x0000,0x0000, -0x1979,0x0000,0x0000, 0x197A,0x0000,0x0000, 0x197B,0x0000,0x0000, -0x197C,0x0000,0x0000, 0x197D,0x0000,0x0000, 0x197E,0x0000,0x0000, -0x197F,0x0000,0x0000, 0x1980,0x0000,0x0000, 0x1981,0x0000,0x0000, -0x1982,0x0000,0x0000, 0x1983,0x0000,0x0000, 0x1984,0x0000,0x0000, -0x1985,0x0000,0x0000, 0x1986,0x0000,0x0000, 0x1987,0x0000,0x0000, -0x1988,0x0000,0x0000, 0x1989,0x0000,0x0000, 0x198A,0x0000,0x0000, -0x198B,0x0000,0x0000, 0x198C,0x0000,0x0000, 0x198D,0x0000,0x0000, -0x198E,0x0000,0x0000, 0x1990,0x0000,0x0000, 0x1991,0x0000,0x0000, -0x1992,0x0000,0x0000, 0x1993,0x0000,0x0000, 0x1994,0x0000,0x0000, -0x1995,0x0000,0x0000, 0x1996,0x0000,0x0000, 0x1997,0x0000,0x0000, -0x1998,0x0000,0x0000, 0x1999,0x0000,0x0000, 0x199A,0x0000,0x0000, -0x199B,0x0000,0x0000, 0x199C,0x0000,0x0000, 0x199D,0x0000,0x0000, -0x199E,0x0000,0x0000, 0x199F,0x0000,0x0000, 0x19A0,0x0000,0x0000, -0x19A1,0x0000,0x0000, 0x19A2,0x0000,0x0000, 0x19A3,0x0000,0x0000, -0x19A4,0x0000,0x0000, 0x19A5,0x0000,0x0000, 0x19A6,0x0000,0x0000, -0x19A7,0x0000,0x0000, 0x19A8,0x0000,0x0000, 0x19A9,0x0000,0x0000, -0x19AA,0x0000,0x0000, 0x19AB,0x0000,0x0000, 0x19AC,0x0000,0x0000, -0x19AD,0x0000,0x0000, 0x19AE,0x0000,0x0000, 0x19AF,0x0000,0x0000, -0x19B0,0x0000,0x0000, 0x19B1,0x0000,0x0000, 0x19B2,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x19B3,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x026E,0x0000,0x0000, -0x026F,0x0000,0x0000, 0x024D,0x0000,0x0000, 0x0312,0x0000,0x0000, -0x0313,0x0000,0x0000, 0x0314,0x0000,0x0000, 0x0315,0x0000,0x0000, -0x0E17,0x0000,0x0000, 0x198F,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x97DE,0x0000, 0xFBC0,0x97DF,0x0000, 0x0E29,0x0000,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0xFBC0,0x97EA,0x0000, 0xFBC0,0x97EB,0x0000, 0xFBC0,0x97EC,0x0000, -0xFBC0,0x97ED,0x0000, 0xFBC0,0x97EE,0x0000, 0xFBC0,0x97EF,0x0000, -0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, -0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, -0x0E32,0x0000,0x0000, 0xFBC0,0x97FA,0x0000, 0xFBC0,0x97FB,0x0000, -0xFBC0,0x97FC,0x0000, 0xFBC0,0x97FD,0x0000, 0xFBC0,0x97FE,0x0000, -0xFBC0,0x97FF,0x0000 }; - -uint16 page018data[]= { /* 1800 (3 weights per char) */ -0x02F8,0x0000,0x0000, 0x025E,0x0000,0x0000, 0x0235,0x0000,0x0000, -0x0263,0x0000,0x0000, 0x024A,0x0000,0x0000, 0x024B,0x0000,0x0000, -0x0223,0x0000,0x0000, 0x0224,0x0000,0x0000, 0x0236,0x0000,0x0000, -0x0264,0x0000,0x0000, 0x02F9,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x980F,0x0000, 0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, -0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, -0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, -0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, 0xFBC0,0x981A,0x0000, -0xFBC0,0x981B,0x0000, 0xFBC0,0x981C,0x0000, 0xFBC0,0x981D,0x0000, -0xFBC0,0x981E,0x0000, 0xFBC0,0x981F,0x0000, 0x19DF,0x0000,0x0000, -0x19E1,0x0000,0x0000, 0x19E4,0x0000,0x0000, 0x19EA,0x0000,0x0000, -0x19EC,0x0000,0x0000, 0x19EF,0x0000,0x0000, 0x19F1,0x0000,0x0000, -0x19F4,0x0000,0x0000, 0x19F5,0x0000,0x0000, 0x19F6,0x0000,0x0000, -0x19FB,0x0000,0x0000, 0x19FD,0x0000,0x0000, 0x1A00,0x0000,0x0000, -0x1A02,0x0000,0x0000, 0x1A07,0x0000,0x0000, 0x1A09,0x0000,0x0000, -0x1A0A,0x0000,0x0000, 0x1A0B,0x0000,0x0000, 0x1A12,0x0000,0x0000, -0x1A15,0x0000,0x0000, 0x1A18,0x0000,0x0000, 0x1A1D,0x0000,0x0000, -0x1A21,0x0000,0x0000, 0x1A24,0x0000,0x0000, 0x1A26,0x0000,0x0000, -0x1A28,0x0000,0x0000, 0x1A2B,0x0000,0x0000, 0x1A30,0x0000,0x0000, -0x1A31,0x0000,0x0000, 0x1A34,0x0000,0x0000, 0x1A38,0x0000,0x0000, -0x1A3B,0x0000,0x0000, 0x1A3C,0x0000,0x0000, 0x1A3D,0x0000,0x0000, -0x1A3E,0x0000,0x0000, 0x19DE,0x0000,0x0000, 0x19E2,0x0000,0x0000, -0x19E5,0x0000,0x0000, 0x19EB,0x0000,0x0000, 0x19ED,0x0000,0x0000, -0x19F0,0x0000,0x0000, 0x19F2,0x0000,0x0000, 0x19F7,0x0000,0x0000, -0x19FC,0x0000,0x0000, 0x19FE,0x0000,0x0000, 0x1A01,0x0000,0x0000, -0x1A03,0x0000,0x0000, 0x1A08,0x0000,0x0000, 0x1A13,0x0000,0x0000, -0x1A16,0x0000,0x0000, 0x1A19,0x0000,0x0000, 0x1A1E,0x0000,0x0000, -0x1A32,0x0000,0x0000, 0x1A22,0x0000,0x0000, 0x1A27,0x0000,0x0000, -0x1A2C,0x0000,0x0000, 0x1A36,0x0000,0x0000, 0x1A39,0x0000,0x0000, -0x1A3F,0x0000,0x0000, 0x1A40,0x0000,0x0000, 0x1A1B,0x0000,0x0000, -0x19E3,0x0000,0x0000, 0x19E6,0x0000,0x0000, 0x19E9,0x0000,0x0000, -0x19F3,0x0000,0x0000, 0x19EE,0x0000,0x0000, 0x19F8,0x0000,0x0000, -0x1A2D,0x0000,0x0000, 0x1A04,0x0000,0x0000, 0x1A06,0x0000,0x0000, -0x19FF,0x0000,0x0000, 0x1A0C,0x0000,0x0000, 0x1A14,0x0000,0x0000, -0x1A17,0x0000,0x0000, 0x1A1F,0x0000,0x0000, 0x1A29,0x0000,0x0000, -0x1A37,0x0000,0x0000, 0x1A3A,0x0000,0x0000, 0x1A33,0x0000,0x0000, -0x1A35,0x0000,0x0000, 0x1A41,0x0000,0x0000, 0x1A1A,0x0000,0x0000, -0x1A23,0x0000,0x0000, 0x19E7,0x0000,0x0000, 0x1A2E,0x0000,0x0000, -0x1A25,0x0000,0x0000, 0x1A2A,0x0000,0x0000, 0x1A20,0x0000,0x0000, -0xFBC0,0x9878,0x0000, 0xFBC0,0x9879,0x0000, 0xFBC0,0x987A,0x0000, -0xFBC0,0x987B,0x0000, 0xFBC0,0x987C,0x0000, 0xFBC0,0x987D,0x0000, -0xFBC0,0x987E,0x0000, 0xFBC0,0x987F,0x0000, 0x19D7,0x0000,0x0000, -0x19D8,0x0000,0x0000, 0x19D9,0x0000,0x0000, 0x19DA,0x0000,0x0000, -0x19DB,0x0000,0x0000, 0x19DC,0x0000,0x0000, 0x19DD,0x0000,0x0000, -0x19E0,0x0000,0x0000, 0x19E8,0x0000,0x0000, 0x1A2F,0x0000,0x0000, -0x19F9,0x0000,0x0000, 0x1A1C,0x0000,0x0000, 0x1A42,0x0000,0x0000, -0x1A44,0x0000,0x0000, 0x1A45,0x0000,0x0000, 0x1A47,0x0000,0x0000, -0x1A48,0x0000,0x0000, 0x1A4B,0x0000,0x0000, 0x1A4D,0x0000,0x0000, -0x1A4E,0x0000,0x0000, 0x1A50,0x0000,0x0000, 0x1A52,0x0000,0x0000, -0x1A54,0x0000,0x0000, 0x1A55,0x0000,0x0000, 0x1A49,0x0000,0x0000, -0x1A53,0x0000,0x0000, 0x1A05,0x0000,0x0000, 0x19FA,0x0000,0x0000, -0x1A0D,0x0000,0x0000, 0x1A0E,0x0000,0x0000, 0x1A43,0x0000,0x0000, -0x1A46,0x0000,0x0000, 0x1A4A,0x0000,0x0000, 0x1A4C,0x0000,0x0000, -0x1A0F,0x0000,0x0000, 0x1A51,0x0000,0x0000, 0x1A10,0x0000,0x0000, -0x1A11,0x0000,0x0000, 0x1A56,0x0000,0x0000, 0x1A57,0x0000,0x0000, -0x1A4F,0x0000,0x0000, 0x1A58,0x0000,0x0000, 0xFBC0,0x98AA,0x0000, -0xFBC0,0x98AB,0x0000, 0xFBC0,0x98AC,0x0000, 0xFBC0,0x98AD,0x0000, -0xFBC0,0x98AE,0x0000, 0xFBC0,0x98AF,0x0000, 0xFBC0,0x98B0,0x0000, -0xFBC0,0x98B1,0x0000, 0xFBC0,0x98B2,0x0000, 0xFBC0,0x98B3,0x0000, -0xFBC0,0x98B4,0x0000, 0xFBC0,0x98B5,0x0000, 0xFBC0,0x98B6,0x0000, -0xFBC0,0x98B7,0x0000, 0xFBC0,0x98B8,0x0000, 0xFBC0,0x98B9,0x0000, -0xFBC0,0x98BA,0x0000, 0xFBC0,0x98BB,0x0000, 0xFBC0,0x98BC,0x0000, -0xFBC0,0x98BD,0x0000, 0xFBC0,0x98BE,0x0000, 0xFBC0,0x98BF,0x0000, -0xFBC0,0x98C0,0x0000, 0xFBC0,0x98C1,0x0000, 0xFBC0,0x98C2,0x0000, -0xFBC0,0x98C3,0x0000, 0xFBC0,0x98C4,0x0000, 0xFBC0,0x98C5,0x0000, -0xFBC0,0x98C6,0x0000, 0xFBC0,0x98C7,0x0000, 0xFBC0,0x98C8,0x0000, -0xFBC0,0x98C9,0x0000, 0xFBC0,0x98CA,0x0000, 0xFBC0,0x98CB,0x0000, -0xFBC0,0x98CC,0x0000, 0xFBC0,0x98CD,0x0000, 0xFBC0,0x98CE,0x0000, -0xFBC0,0x98CF,0x0000, 0xFBC0,0x98D0,0x0000, 0xFBC0,0x98D1,0x0000, -0xFBC0,0x98D2,0x0000, 0xFBC0,0x98D3,0x0000, 0xFBC0,0x98D4,0x0000, -0xFBC0,0x98D5,0x0000, 0xFBC0,0x98D6,0x0000, 0xFBC0,0x98D7,0x0000, -0xFBC0,0x98D8,0x0000, 0xFBC0,0x98D9,0x0000, 0xFBC0,0x98DA,0x0000, -0xFBC0,0x98DB,0x0000, 0xFBC0,0x98DC,0x0000, 0xFBC0,0x98DD,0x0000, -0xFBC0,0x98DE,0x0000, 0xFBC0,0x98DF,0x0000, 0xFBC0,0x98E0,0x0000, -0xFBC0,0x98E1,0x0000, 0xFBC0,0x98E2,0x0000, 0xFBC0,0x98E3,0x0000, -0xFBC0,0x98E4,0x0000, 0xFBC0,0x98E5,0x0000, 0xFBC0,0x98E6,0x0000, -0xFBC0,0x98E7,0x0000, 0xFBC0,0x98E8,0x0000, 0xFBC0,0x98E9,0x0000, -0xFBC0,0x98EA,0x0000, 0xFBC0,0x98EB,0x0000, 0xFBC0,0x98EC,0x0000, -0xFBC0,0x98ED,0x0000, 0xFBC0,0x98EE,0x0000, 0xFBC0,0x98EF,0x0000, -0xFBC0,0x98F0,0x0000, 0xFBC0,0x98F1,0x0000, 0xFBC0,0x98F2,0x0000, -0xFBC0,0x98F3,0x0000, 0xFBC0,0x98F4,0x0000, 0xFBC0,0x98F5,0x0000, -0xFBC0,0x98F6,0x0000, 0xFBC0,0x98F7,0x0000, 0xFBC0,0x98F8,0x0000, -0xFBC0,0x98F9,0x0000, 0xFBC0,0x98FA,0x0000, 0xFBC0,0x98FB,0x0000, -0xFBC0,0x98FC,0x0000, 0xFBC0,0x98FD,0x0000, 0xFBC0,0x98FE,0x0000, -0xFBC0,0x98FF,0x0000 }; - -uint16 page019data[]= { /* 1900 (3 weights per char) */ -0x18B0,0x0000,0x0000, 0x18B1,0x0000,0x0000, 0x18B2,0x0000,0x0000, -0x18B3,0x0000,0x0000, 0x18B4,0x0000,0x0000, 0x18B5,0x0000,0x0000, -0x18B6,0x0000,0x0000, 0x18B7,0x0000,0x0000, 0x18B8,0x0000,0x0000, -0x18B9,0x0000,0x0000, 0x18BA,0x0000,0x0000, 0x18BB,0x0000,0x0000, -0x18BC,0x0000,0x0000, 0x18BD,0x0000,0x0000, 0x18BE,0x0000,0x0000, -0x18BF,0x0000,0x0000, 0x18C0,0x0000,0x0000, 0x18C1,0x0000,0x0000, -0x18C2,0x0000,0x0000, 0x18C3,0x0000,0x0000, 0x18C4,0x0000,0x0000, -0x18C5,0x0000,0x0000, 0x18C6,0x0000,0x0000, 0x18C7,0x0000,0x0000, -0x18C8,0x0000,0x0000, 0x18C9,0x0000,0x0000, 0x18CA,0x0000,0x0000, -0x18CB,0x0000,0x0000, 0x18CC,0x0000,0x0000, 0xFBC0,0x991D,0x0000, -0xFBC0,0x991E,0x0000, 0xFBC0,0x991F,0x0000, 0x18CD,0x0000,0x0000, -0x18CE,0x0000,0x0000, 0x18CF,0x0000,0x0000, 0x18D0,0x0000,0x0000, -0x18D1,0x0000,0x0000, 0x18D2,0x0000,0x0000, 0x18D3,0x0000,0x0000, -0x18D4,0x0000,0x0000, 0x18D5,0x0000,0x0000, 0x18D6,0x0000,0x0000, -0x18D7,0x0000,0x0000, 0x18D8,0x0000,0x0000, 0xFBC0,0x992C,0x0000, -0xFBC0,0x992D,0x0000, 0xFBC0,0x992E,0x0000, 0xFBC0,0x992F,0x0000, -0x18D9,0x0000,0x0000, 0x18DA,0x0000,0x0000, 0x18DB,0x0000,0x0000, -0x18DC,0x0000,0x0000, 0x18DD,0x0000,0x0000, 0x18DE,0x0000,0x0000, -0x18DF,0x0000,0x0000, 0x18E0,0x0000,0x0000, 0x18E1,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC0,0x993C,0x0000, 0xFBC0,0x993D,0x0000, 0xFBC0,0x993E,0x0000, -0xFBC0,0x993F,0x0000, 0x030D,0x0000,0x0000, 0xFBC0,0x9941,0x0000, -0xFBC0,0x9942,0x0000, 0xFBC0,0x9943,0x0000, 0x0254,0x0000,0x0000, -0x025B,0x0000,0x0000, 0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, -0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, -0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, -0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, 0x19B4,0x0000,0x0000, -0x19B5,0x0000,0x0000, 0x19B6,0x0000,0x0000, 0x19B7,0x0000,0x0000, -0x19B8,0x0000,0x0000, 0x19B9,0x0000,0x0000, 0x19BA,0x0000,0x0000, -0x19BB,0x0000,0x0000, 0x19BC,0x0000,0x0000, 0x19BD,0x0000,0x0000, -0x19BE,0x0000,0x0000, 0x19BF,0x0000,0x0000, 0x19C0,0x0000,0x0000, -0x19C1,0x0000,0x0000, 0x19C2,0x0000,0x0000, 0x19C3,0x0000,0x0000, -0x19C4,0x0000,0x0000, 0x19C5,0x0000,0x0000, 0x19C6,0x0000,0x0000, -0x19C7,0x0000,0x0000, 0x19C8,0x0000,0x0000, 0x19C9,0x0000,0x0000, -0x19CA,0x0000,0x0000, 0x19CB,0x0000,0x0000, 0x19CC,0x0000,0x0000, -0x19CD,0x0000,0x0000, 0x19CE,0x0000,0x0000, 0x19CF,0x0000,0x0000, -0x19D0,0x0000,0x0000, 0x19D1,0x0000,0x0000, 0xFBC0,0x996E,0x0000, -0xFBC0,0x996F,0x0000, 0x19D2,0x0000,0x0000, 0x19D3,0x0000,0x0000, -0x19D4,0x0000,0x0000, 0x19D5,0x0000,0x0000, 0x19D6,0x0000,0x0000, -0xFBC0,0x9975,0x0000, 0xFBC0,0x9976,0x0000, 0xFBC0,0x9977,0x0000, -0xFBC0,0x9978,0x0000, 0xFBC0,0x9979,0x0000, 0xFBC0,0x997A,0x0000, -0xFBC0,0x997B,0x0000, 0xFBC0,0x997C,0x0000, 0xFBC0,0x997D,0x0000, -0xFBC0,0x997E,0x0000, 0xFBC0,0x997F,0x0000, 0xFBC0,0x9980,0x0000, -0xFBC0,0x9981,0x0000, 0xFBC0,0x9982,0x0000, 0xFBC0,0x9983,0x0000, -0xFBC0,0x9984,0x0000, 0xFBC0,0x9985,0x0000, 0xFBC0,0x9986,0x0000, -0xFBC0,0x9987,0x0000, 0xFBC0,0x9988,0x0000, 0xFBC0,0x9989,0x0000, -0xFBC0,0x998A,0x0000, 0xFBC0,0x998B,0x0000, 0xFBC0,0x998C,0x0000, -0xFBC0,0x998D,0x0000, 0xFBC0,0x998E,0x0000, 0xFBC0,0x998F,0x0000, -0xFBC0,0x9990,0x0000, 0xFBC0,0x9991,0x0000, 0xFBC0,0x9992,0x0000, -0xFBC0,0x9993,0x0000, 0xFBC0,0x9994,0x0000, 0xFBC0,0x9995,0x0000, -0xFBC0,0x9996,0x0000, 0xFBC0,0x9997,0x0000, 0xFBC0,0x9998,0x0000, -0xFBC0,0x9999,0x0000, 0xFBC0,0x999A,0x0000, 0xFBC0,0x999B,0x0000, -0xFBC0,0x999C,0x0000, 0xFBC0,0x999D,0x0000, 0xFBC0,0x999E,0x0000, -0xFBC0,0x999F,0x0000, 0xFBC0,0x99A0,0x0000, 0xFBC0,0x99A1,0x0000, -0xFBC0,0x99A2,0x0000, 0xFBC0,0x99A3,0x0000, 0xFBC0,0x99A4,0x0000, -0xFBC0,0x99A5,0x0000, 0xFBC0,0x99A6,0x0000, 0xFBC0,0x99A7,0x0000, -0xFBC0,0x99A8,0x0000, 0xFBC0,0x99A9,0x0000, 0xFBC0,0x99AA,0x0000, -0xFBC0,0x99AB,0x0000, 0xFBC0,0x99AC,0x0000, 0xFBC0,0x99AD,0x0000, -0xFBC0,0x99AE,0x0000, 0xFBC0,0x99AF,0x0000, 0xFBC0,0x99B0,0x0000, -0xFBC0,0x99B1,0x0000, 0xFBC0,0x99B2,0x0000, 0xFBC0,0x99B3,0x0000, -0xFBC0,0x99B4,0x0000, 0xFBC0,0x99B5,0x0000, 0xFBC0,0x99B6,0x0000, -0xFBC0,0x99B7,0x0000, 0xFBC0,0x99B8,0x0000, 0xFBC0,0x99B9,0x0000, -0xFBC0,0x99BA,0x0000, 0xFBC0,0x99BB,0x0000, 0xFBC0,0x99BC,0x0000, -0xFBC0,0x99BD,0x0000, 0xFBC0,0x99BE,0x0000, 0xFBC0,0x99BF,0x0000, -0xFBC0,0x99C0,0x0000, 0xFBC0,0x99C1,0x0000, 0xFBC0,0x99C2,0x0000, -0xFBC0,0x99C3,0x0000, 0xFBC0,0x99C4,0x0000, 0xFBC0,0x99C5,0x0000, -0xFBC0,0x99C6,0x0000, 0xFBC0,0x99C7,0x0000, 0xFBC0,0x99C8,0x0000, -0xFBC0,0x99C9,0x0000, 0xFBC0,0x99CA,0x0000, 0xFBC0,0x99CB,0x0000, -0xFBC0,0x99CC,0x0000, 0xFBC0,0x99CD,0x0000, 0xFBC0,0x99CE,0x0000, -0xFBC0,0x99CF,0x0000, 0xFBC0,0x99D0,0x0000, 0xFBC0,0x99D1,0x0000, -0xFBC0,0x99D2,0x0000, 0xFBC0,0x99D3,0x0000, 0xFBC0,0x99D4,0x0000, -0xFBC0,0x99D5,0x0000, 0xFBC0,0x99D6,0x0000, 0xFBC0,0x99D7,0x0000, -0xFBC0,0x99D8,0x0000, 0xFBC0,0x99D9,0x0000, 0xFBC0,0x99DA,0x0000, -0xFBC0,0x99DB,0x0000, 0xFBC0,0x99DC,0x0000, 0xFBC0,0x99DD,0x0000, -0xFBC0,0x99DE,0x0000, 0xFBC0,0x99DF,0x0000, 0x037B,0x0000,0x0000, -0x037C,0x0000,0x0000, 0x037D,0x0000,0x0000, 0x037E,0x0000,0x0000, -0x037F,0x0000,0x0000, 0x0380,0x0000,0x0000, 0x0381,0x0000,0x0000, -0x0382,0x0000,0x0000, 0x0383,0x0000,0x0000, 0x0384,0x0000,0x0000, -0x0385,0x0000,0x0000, 0x0386,0x0000,0x0000, 0x0387,0x0000,0x0000, -0x0388,0x0000,0x0000, 0x0389,0x0000,0x0000, 0x038A,0x0000,0x0000, -0x038B,0x0000,0x0000, 0x038C,0x0000,0x0000, 0x038D,0x0000,0x0000, -0x038E,0x0000,0x0000, 0x038F,0x0000,0x0000, 0x0390,0x0000,0x0000, -0x0391,0x0000,0x0000, 0x0392,0x0000,0x0000, 0x0393,0x0000,0x0000, -0x0394,0x0000,0x0000, 0x0395,0x0000,0x0000, 0x0396,0x0000,0x0000, -0x0397,0x0000,0x0000, 0x0398,0x0000,0x0000, 0x0399,0x0000,0x0000, -0x039A,0x0000,0x0000 }; - -uint16 page01Ddata[]= { /* 1D00 (3 weights per char) */ -0x0E37,0x0000,0x0000, 0x0E3C,0x0000,0x0000, 0x0E3D,0x0000,0x0000, -0x0E57,0x0000,0x0000, 0x0E64,0x0000,0x0000, 0x0E71,0x0000,0x0000, -0x0E8A,0x0000,0x0000, 0x0E8F,0x0000,0x0000, 0x0EA8,0x0000,0x0000, -0x0F07,0x0000,0x0000, 0x0F14,0x0000,0x0000, 0x0F25,0x0000,0x0000, -0x0F3A,0x0000,0x0000, 0x0F5F,0x0000,0x0000, 0x0F6D,0x0000,0x0000, -0x0F86,0x0000,0x0000, 0x0F96,0x0000,0x0000, 0x0F87,0x0000,0x0000, -0x0F97,0x0000,0x0000, 0x0F91,0x0000,0x0000, 0x0F8C,0x0000,0x0000, -0x0FA6,0x0000,0x0000, 0x0F98,0x0000,0x0000, 0x0F99,0x0000,0x0000, -0x0FAB,0x0000,0x0000, 0x0FC8,0x0000,0x0000, 0x0FCD,0x0000,0x0000, -0x1006,0x0000,0x0000, 0x1023,0x0000,0x0000, 0x1024,0x0000,0x0000, -0x1025,0x0000,0x0000, 0x103B,0x0000,0x0000, 0x1048,0x0000,0x0000, -0x1055,0x0000,0x0000, 0x106E,0x0000,0x0000, 0x1083,0x0000,0x0000, -0x10BA,0x0000,0x0000, 0x10BB,0x0000,0x0000, 0x10EB,0x0000,0x0000, -0x10F7,0x0000,0x0000, 0x10FD,0x0000,0x0000, 0x1101,0x0000,0x0000, -0x1108,0x0000,0x0000, 0x11B4,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E38,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E56,0x0000,0x0000, -0x0E6D,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E90,0x0000,0x0000, -0x0EC1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0F10,0x0000,0x0000, 0x0F21,0x0000,0x0000, 0x0F2E,0x0000,0x0000, -0x0F5B,0x0000,0x0000, 0x0F64,0x0000,0x0000, 0x0F6C,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0FA2,0x0000,0x0000, 0x0FA7,0x0000,0x0000, -0x0FC0,0x0000,0x0000, 0x1002,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x1051,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E3E,0x0000,0x0000, -0x0E42,0x0000,0x0000, 0x0E3D,0x0000,0x0000, 0x0E4A,0x0000,0x0000, -0x0E6D,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E94,0x0000,0x0000, -0x0E98,0x0000,0x0000, 0x0EA8,0x0000,0x0000, 0x0EC1,0x0000,0x0000, -0x0F07,0x0000,0x0000, 0x0F21,0x0000,0x0000, 0x0F5B,0x0000,0x0000, -0x0F7E,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F92,0x0000,0x0000, -0x0F98,0x0000,0x0000, 0x0F99,0x0000,0x0000, 0x0FA7,0x0000,0x0000, -0x1002,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x1024,0x0000,0x0000, -0x1037,0x0000,0x0000, 0x1044,0x0000,0x0000, 0x10BB,0x0000,0x0000, -0x10E9,0x0000,0x0000, 0x10EA,0x0000,0x0000, 0x10EC,0x0000,0x0000, -0x1105,0x0000,0x0000, 0x1106,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0FC0,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x1044,0x0000,0x0000, -0x10E9,0x0000,0x0000, 0x10EA,0x0000,0x0000, 0x1100,0x0000,0x0000, -0x1105,0x0000,0x0000, 0x1106,0x0000,0x0000, 0x1026,0x0000,0x0000, -0xFBC0,0x9D6C,0x0000, 0xFBC0,0x9D6D,0x0000, 0xFBC0,0x9D6E,0x0000, -0xFBC0,0x9D6F,0x0000, 0xFBC0,0x9D70,0x0000, 0xFBC0,0x9D71,0x0000, -0xFBC0,0x9D72,0x0000, 0xFBC0,0x9D73,0x0000, 0xFBC0,0x9D74,0x0000, -0xFBC0,0x9D75,0x0000, 0xFBC0,0x9D76,0x0000, 0xFBC0,0x9D77,0x0000, -0xFBC0,0x9D78,0x0000, 0xFBC0,0x9D79,0x0000, 0xFBC0,0x9D7A,0x0000, -0xFBC0,0x9D7B,0x0000, 0xFBC0,0x9D7C,0x0000, 0xFBC0,0x9D7D,0x0000, -0xFBC0,0x9D7E,0x0000, 0xFBC0,0x9D7F,0x0000, 0xFBC0,0x9D80,0x0000, -0xFBC0,0x9D81,0x0000, 0xFBC0,0x9D82,0x0000, 0xFBC0,0x9D83,0x0000, -0xFBC0,0x9D84,0x0000, 0xFBC0,0x9D85,0x0000, 0xFBC0,0x9D86,0x0000, -0xFBC0,0x9D87,0x0000, 0xFBC0,0x9D88,0x0000, 0xFBC0,0x9D89,0x0000, -0xFBC0,0x9D8A,0x0000, 0xFBC0,0x9D8B,0x0000, 0xFBC0,0x9D8C,0x0000, -0xFBC0,0x9D8D,0x0000, 0xFBC0,0x9D8E,0x0000, 0xFBC0,0x9D8F,0x0000, -0xFBC0,0x9D90,0x0000, 0xFBC0,0x9D91,0x0000, 0xFBC0,0x9D92,0x0000, -0xFBC0,0x9D93,0x0000, 0xFBC0,0x9D94,0x0000, 0xFBC0,0x9D95,0x0000, -0xFBC0,0x9D96,0x0000, 0xFBC0,0x9D97,0x0000, 0xFBC0,0x9D98,0x0000, -0xFBC0,0x9D99,0x0000, 0xFBC0,0x9D9A,0x0000, 0xFBC0,0x9D9B,0x0000, -0xFBC0,0x9D9C,0x0000, 0xFBC0,0x9D9D,0x0000, 0xFBC0,0x9D9E,0x0000, -0xFBC0,0x9D9F,0x0000, 0xFBC0,0x9DA0,0x0000, 0xFBC0,0x9DA1,0x0000, -0xFBC0,0x9DA2,0x0000, 0xFBC0,0x9DA3,0x0000, 0xFBC0,0x9DA4,0x0000, -0xFBC0,0x9DA5,0x0000, 0xFBC0,0x9DA6,0x0000, 0xFBC0,0x9DA7,0x0000, -0xFBC0,0x9DA8,0x0000, 0xFBC0,0x9DA9,0x0000, 0xFBC0,0x9DAA,0x0000, -0xFBC0,0x9DAB,0x0000, 0xFBC0,0x9DAC,0x0000, 0xFBC0,0x9DAD,0x0000, -0xFBC0,0x9DAE,0x0000, 0xFBC0,0x9DAF,0x0000, 0xFBC0,0x9DB0,0x0000, -0xFBC0,0x9DB1,0x0000, 0xFBC0,0x9DB2,0x0000, 0xFBC0,0x9DB3,0x0000, -0xFBC0,0x9DB4,0x0000, 0xFBC0,0x9DB5,0x0000, 0xFBC0,0x9DB6,0x0000, -0xFBC0,0x9DB7,0x0000, 0xFBC0,0x9DB8,0x0000, 0xFBC0,0x9DB9,0x0000, -0xFBC0,0x9DBA,0x0000, 0xFBC0,0x9DBB,0x0000, 0xFBC0,0x9DBC,0x0000, -0xFBC0,0x9DBD,0x0000, 0xFBC0,0x9DBE,0x0000, 0xFBC0,0x9DBF,0x0000, -0xFBC0,0x9DC0,0x0000, 0xFBC0,0x9DC1,0x0000, 0xFBC0,0x9DC2,0x0000, -0xFBC0,0x9DC3,0x0000, 0xFBC0,0x9DC4,0x0000, 0xFBC0,0x9DC5,0x0000, -0xFBC0,0x9DC6,0x0000, 0xFBC0,0x9DC7,0x0000, 0xFBC0,0x9DC8,0x0000, -0xFBC0,0x9DC9,0x0000, 0xFBC0,0x9DCA,0x0000, 0xFBC0,0x9DCB,0x0000, -0xFBC0,0x9DCC,0x0000, 0xFBC0,0x9DCD,0x0000, 0xFBC0,0x9DCE,0x0000, -0xFBC0,0x9DCF,0x0000, 0xFBC0,0x9DD0,0x0000, 0xFBC0,0x9DD1,0x0000, -0xFBC0,0x9DD2,0x0000, 0xFBC0,0x9DD3,0x0000, 0xFBC0,0x9DD4,0x0000, -0xFBC0,0x9DD5,0x0000, 0xFBC0,0x9DD6,0x0000, 0xFBC0,0x9DD7,0x0000, -0xFBC0,0x9DD8,0x0000, 0xFBC0,0x9DD9,0x0000, 0xFBC0,0x9DDA,0x0000, -0xFBC0,0x9DDB,0x0000, 0xFBC0,0x9DDC,0x0000, 0xFBC0,0x9DDD,0x0000, -0xFBC0,0x9DDE,0x0000, 0xFBC0,0x9DDF,0x0000, 0xFBC0,0x9DE0,0x0000, -0xFBC0,0x9DE1,0x0000, 0xFBC0,0x9DE2,0x0000, 0xFBC0,0x9DE3,0x0000, -0xFBC0,0x9DE4,0x0000, 0xFBC0,0x9DE5,0x0000, 0xFBC0,0x9DE6,0x0000, -0xFBC0,0x9DE7,0x0000, 0xFBC0,0x9DE8,0x0000, 0xFBC0,0x9DE9,0x0000, -0xFBC0,0x9DEA,0x0000, 0xFBC0,0x9DEB,0x0000, 0xFBC0,0x9DEC,0x0000, -0xFBC0,0x9DED,0x0000, 0xFBC0,0x9DEE,0x0000, 0xFBC0,0x9DEF,0x0000, -0xFBC0,0x9DF0,0x0000, 0xFBC0,0x9DF1,0x0000, 0xFBC0,0x9DF2,0x0000, -0xFBC0,0x9DF3,0x0000, 0xFBC0,0x9DF4,0x0000, 0xFBC0,0x9DF5,0x0000, -0xFBC0,0x9DF6,0x0000, 0xFBC0,0x9DF7,0x0000, 0xFBC0,0x9DF8,0x0000, -0xFBC0,0x9DF9,0x0000, 0xFBC0,0x9DFA,0x0000, 0xFBC0,0x9DFB,0x0000, -0xFBC0,0x9DFC,0x0000, 0xFBC0,0x9DFD,0x0000, 0xFBC0,0x9DFE,0x0000, -0xFBC0,0x9DFF,0x0000 }; - -uint16 page01Edata[]= { /* 1E00 (3 weights per char) */ -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E4A,0x0000,0x0000, -0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, -0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E60,0x0000,0x0000, -0x0E60,0x0000,0x0000, 0x0E6D,0x0000,0x0000, 0x0E6D,0x0000,0x0000, -0x0E6D,0x0000,0x0000, 0x0E6D,0x0000,0x0000, 0x0E6D,0x0000,0x0000, -0x0E6D,0x0000,0x0000, 0x0E6D,0x0000,0x0000, 0x0E6D,0x0000,0x0000, -0x0E6D,0x0000,0x0000, 0x0E6D,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0EB9,0x0000,0x0000, 0x0EB9,0x0000,0x0000, 0x0EC1,0x0000,0x0000, -0x0EC1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, -0x0EE1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, -0x0EE1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, -0x0EE1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0F21,0x0000,0x0000, 0x0F21,0x0000,0x0000, 0x0F21,0x0000,0x0000, -0x0F21,0x0000,0x0000, 0x0F21,0x0000,0x0000, 0x0F21,0x0000,0x0000, -0x0F2E,0x0000,0x0000, 0x0F2E,0x0000,0x0000, 0x0F2E,0x0000,0x0000, -0x0F2E,0x0000,0x0000, 0x0F2E,0x0000,0x0000, 0x0F2E,0x0000,0x0000, -0x0F2E,0x0000,0x0000, 0x0F2E,0x0000,0x0000, 0x0F5B,0x0000,0x0000, -0x0F5B,0x0000,0x0000, 0x0F5B,0x0000,0x0000, 0x0F5B,0x0000,0x0000, -0x0F5B,0x0000,0x0000, 0x0F5B,0x0000,0x0000, 0x0F64,0x0000,0x0000, -0x0F64,0x0000,0x0000, 0x0F64,0x0000,0x0000, 0x0F64,0x0000,0x0000, -0x0F64,0x0000,0x0000, 0x0F64,0x0000,0x0000, 0x0F64,0x0000,0x0000, -0x0F64,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0FA7,0x0000,0x0000, 0x0FA7,0x0000,0x0000, 0x0FA7,0x0000,0x0000, -0x0FA7,0x0000,0x0000, 0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, -0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, -0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, 0x0FC0,0x0000,0x0000, -0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, -0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, -0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, 0x0FEA,0x0000,0x0000, -0x0FEA,0x0000,0x0000, 0x1002,0x0000,0x0000, 0x1002,0x0000,0x0000, -0x1002,0x0000,0x0000, 0x1002,0x0000,0x0000, 0x1002,0x0000,0x0000, -0x1002,0x0000,0x0000, 0x1002,0x0000,0x0000, 0x1002,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x1044,0x0000,0x0000, 0x1044,0x0000,0x0000, -0x1044,0x0000,0x0000, 0x1044,0x0000,0x0000, 0x1051,0x0000,0x0000, -0x1051,0x0000,0x0000, 0x1051,0x0000,0x0000, 0x1051,0x0000,0x0000, -0x1051,0x0000,0x0000, 0x1051,0x0000,0x0000, 0x1051,0x0000,0x0000, -0x1051,0x0000,0x0000, 0x1051,0x0000,0x0000, 0x1051,0x0000,0x0000, -0x105A,0x0000,0x0000, 0x105A,0x0000,0x0000, 0x105A,0x0000,0x0000, -0x105A,0x0000,0x0000, 0x105E,0x0000,0x0000, 0x105E,0x0000,0x0000, -0x106A,0x0000,0x0000, 0x106A,0x0000,0x0000, 0x106A,0x0000,0x0000, -0x106A,0x0000,0x0000, 0x106A,0x0000,0x0000, 0x106A,0x0000,0x0000, -0x0EE1,0x0000,0x0000, 0x1002,0x0000,0x0000, 0x1051,0x0000,0x0000, -0x105E,0x0000,0x0000, 0x0E33,0x10B3,0x0000, 0x0FEA,0x0000,0x0000, -0xFBC0,0x9E9C,0x0000, 0xFBC0,0x9E9D,0x0000, 0xFBC0,0x9E9E,0x0000, -0xFBC0,0x9E9F,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x101F,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x105E,0x0000,0x0000, -0x105E,0x0000,0x0000, 0x105E,0x0000,0x0000, 0x105E,0x0000,0x0000, -0x105E,0x0000,0x0000, 0x105E,0x0000,0x0000, 0x105E,0x0000,0x0000, -0x105E,0x0000,0x0000, 0xFBC0,0x9EFA,0x0000, 0xFBC0,0x9EFB,0x0000, -0xFBC0,0x9EFC,0x0000, 0xFBC0,0x9EFD,0x0000, 0xFBC0,0x9EFE,0x0000, -0xFBC0,0x9EFF,0x0000 }; - -uint16 page01Fdata[]= { /* 1F00 (3 weights per char) */ -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10ED,0x0000,0x0000, 0x10ED,0x0000,0x0000, -0x10ED,0x0000,0x0000, 0x10ED,0x0000,0x0000, 0x10ED,0x0000,0x0000, -0x10ED,0x0000,0x0000, 0xFBC0,0x9F16,0x0000, 0xFBC0,0x9F17,0x0000, -0x10ED,0x0000,0x0000, 0x10ED,0x0000,0x0000, 0x10ED,0x0000,0x0000, -0x10ED,0x0000,0x0000, 0x10ED,0x0000,0x0000, 0x10ED,0x0000,0x0000, -0xFBC0,0x9F1E,0x0000, 0xFBC0,0x9F1F,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, -0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, -0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, -0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, -0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, -0x10F3,0x0000,0x0000, 0x10FB,0x0000,0x0000, 0x10FB,0x0000,0x0000, -0x10FB,0x0000,0x0000, 0x10FB,0x0000,0x0000, 0x10FB,0x0000,0x0000, -0x10FB,0x0000,0x0000, 0xFBC0,0x9F46,0x0000, 0xFBC0,0x9F47,0x0000, -0x10FB,0x0000,0x0000, 0x10FB,0x0000,0x0000, 0x10FB,0x0000,0x0000, -0x10FB,0x0000,0x0000, 0x10FB,0x0000,0x0000, 0x10FB,0x0000,0x0000, -0xFBC0,0x9F4E,0x0000, 0xFBC0,0x9F4F,0x0000, 0x1104,0x0000,0x0000, -0x1104,0x0000,0x0000, 0x1104,0x0000,0x0000, 0x1104,0x0000,0x0000, -0x1104,0x0000,0x0000, 0x1104,0x0000,0x0000, 0x1104,0x0000,0x0000, -0x1104,0x0000,0x0000, 0xFBC0,0x9F58,0x0000, 0x1104,0x0000,0x0000, -0xFBC0,0x9F5A,0x0000, 0x1104,0x0000,0x0000, 0xFBC0,0x9F5C,0x0000, -0x1104,0x0000,0x0000, 0xFBC0,0x9F5E,0x0000, 0x1104,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10ED,0x0000,0x0000, 0x10ED,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, -0x10FB,0x0000,0x0000, 0x10FB,0x0000,0x0000, 0x1104,0x0000,0x0000, -0x1104,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0xFBC0,0x9F7E,0x0000, 0xFBC0,0x9F7F,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0xFBC0,0x9FB5,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, -0x0217,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0x0217,0x0000,0x0000, -0x021D,0x0000,0x0000, 0x0214,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0xFBC0,0x9FC5,0x0000, -0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10ED,0x0000,0x0000, -0x10ED,0x0000,0x0000, 0x10F1,0x0000,0x0000, 0x10F1,0x0000,0x0000, -0x10F1,0x0000,0x0000, 0x0217,0x0000,0x0000, 0x0217,0x0000,0x0000, -0x0217,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, -0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0xFBC0,0x9FD4,0x0000, -0xFBC0,0x9FD5,0x0000, 0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, -0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, 0x10F3,0x0000,0x0000, -0x10F3,0x0000,0x0000, 0xFBC0,0x9FDC,0x0000, 0x0218,0x0000,0x0000, -0x0218,0x0000,0x0000, 0x0218,0x0000,0x0000, 0x1104,0x0000,0x0000, -0x1104,0x0000,0x0000, 0x1104,0x0000,0x0000, 0x1104,0x0000,0x0000, -0x1100,0x0000,0x0000, 0x1100,0x0000,0x0000, 0x1104,0x0000,0x0000, -0x1104,0x0000,0x0000, 0x1104,0x0000,0x0000, 0x1104,0x0000,0x0000, -0x1104,0x0000,0x0000, 0x1104,0x0000,0x0000, 0x1100,0x0000,0x0000, -0x0214,0x0000,0x0000, 0x0214,0x0000,0x0000, 0x020C,0x0000,0x0000, -0xFBC0,0x9FF0,0x0000, 0xFBC0,0x9FF1,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0xFBC0,0x9FF5,0x0000, -0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x10FB,0x0000,0x0000, -0x10FB,0x0000,0x0000, 0x1109,0x0000,0x0000, 0x1109,0x0000,0x0000, -0x1109,0x0000,0x0000, 0x020D,0x0000,0x0000, 0x0218,0x0000,0x0000, -0xFBC0,0x9FFF,0x0000 }; - -uint16 page020data[]= { /* 2000 (5 weights per char) */ -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0225,0x0000,0x0000,0x0000,0x0000, -0x0225,0x0000,0x0000,0x0000,0x0000, -0x0226,0x0000,0x0000,0x0000,0x0000, -0x0227,0x0000,0x0000,0x0000,0x0000, -0x0228,0x0000,0x0000,0x0000,0x0000, -0x0229,0x0000,0x0000,0x0000,0x0000, -0x0432,0x0000,0x0000,0x0000,0x0000, -0x021C,0x0000,0x0000,0x0000,0x0000, -0x0278,0x0000,0x0000,0x0000,0x0000, -0x0279,0x0000,0x0000,0x0000,0x0000, -0x027A,0x0000,0x0000,0x0000,0x0000, -0x027B,0x0000,0x0000,0x0000,0x0000, -0x027F,0x0000,0x0000,0x0000,0x0000, -0x0280,0x0000,0x0000,0x0000,0x0000, -0x0281,0x0000,0x0000,0x0000,0x0000, -0x0282,0x0000,0x0000,0x0000,0x0000, -0x02D8,0x0000,0x0000,0x0000,0x0000, -0x02D9,0x0000,0x0000,0x0000,0x0000, -0x02DA,0x0000,0x0000,0x0000,0x0000, -0x02DB,0x0000,0x0000,0x0000,0x0000, -0x025D,0x0000,0x0000,0x0000,0x0000, -0x025D,0x025D,0x0000,0x0000,0x0000, -0x025D,0x025D,0x025D,0x0000,0x0000, -0x02DC,0x0000,0x0000,0x0000,0x0000, -0x0207,0x0000,0x0000,0x0000,0x0000, -0x0208,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x02D5,0x0000,0x0000,0x0000,0x0000, -0x02D6,0x0000,0x0000,0x0000,0x0000, -0x02E0,0x0000,0x0000,0x0000,0x0000, -0x02E0,0x02E0,0x0000,0x0000,0x0000, -0x02E0,0x02E0,0x02E0,0x0000,0x0000, -0x02E1,0x0000,0x0000,0x0000,0x0000, -0x02E1,0x02E1,0x0000,0x0000,0x0000, -0x02E1,0x02E1,0x02E1,0x0000,0x0000, -0x02E4,0x0000,0x0000,0x0000,0x0000, -0x027C,0x0000,0x0000,0x0000,0x0000, -0x027D,0x0000,0x0000,0x0000,0x0000, -0x02E5,0x0000,0x0000,0x0000,0x0000, -0x0251,0x0251,0x0000,0x0000,0x0000, -0x025C,0x0000,0x0000,0x0000,0x0000, -0x0211,0x0000,0x0000,0x0000,0x0000, -0x02E6,0x0000,0x0000,0x0000,0x0000, -0x02E8,0x0000,0x0000,0x0000,0x0000, -0x02EA,0x0000,0x0000,0x0000,0x0000, -0x02EB,0x0000,0x0000,0x0000,0x0000, -0x02DD,0x0000,0x0000,0x0000,0x0000, -0x02CD,0x0000,0x0000,0x0000,0x0000, -0x0294,0x0000,0x0000,0x0000,0x0000, -0x0295,0x0000,0x0000,0x0000,0x0000, -0x0255,0x0255,0x0000,0x0000,0x0000, -0x0255,0x0251,0x0000,0x0000,0x0000, -0x0251,0x0255,0x0000,0x0000,0x0000, -0x02D1,0x0000,0x0000,0x0000,0x0000, -0x02C4,0x0000,0x0000,0x0000,0x0000, -0x02DE,0x0000,0x0000,0x0000,0x0000, -0x02DF,0x0000,0x0000,0x0000,0x0000, -0x02C9,0x0000,0x0000,0x0000,0x0000, -0x023C,0x0000,0x0000,0x0000,0x0000, -0x02E9,0x0000,0x0000,0x0000,0x0000, -0x02CA,0x0000,0x0000,0x0000,0x0000, -0x02D7,0x0000,0x0000,0x0000,0x0000, -0x022A,0x0000,0x0000,0x0000,0x0000, -0x02E7,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA055,0x0000,0x0000,0x0000, -0xFBC0,0xA056,0x0000,0x0000,0x0000, -0x02E0,0x02E0,0x02E0,0x02E0,0x0000, -0xFBC0,0xA058,0x0000,0x0000,0x0000, -0xFBC0,0xA059,0x0000,0x0000,0x0000, -0xFBC0,0xA05A,0x0000,0x0000,0x0000, -0xFBC0,0xA05B,0x0000,0x0000,0x0000, -0xFBC0,0xA05C,0x0000,0x0000,0x0000, -0xFBC0,0xA05D,0x0000,0x0000,0x0000, -0xFBC0,0xA05E,0x0000,0x0000,0x0000, -0x0209,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA064,0x0000,0x0000,0x0000, -0xFBC0,0xA065,0x0000,0x0000,0x0000, -0xFBC0,0xA066,0x0000,0x0000,0x0000, -0xFBC0,0xA067,0x0000,0x0000,0x0000, -0xFBC0,0xA068,0x0000,0x0000,0x0000, -0xFBC0,0xA069,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E29,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA072,0x0000,0x0000,0x0000, -0xFBC0,0xA073,0x0000,0x0000,0x0000, -0x0E2D,0x0000,0x0000,0x0000,0x0000, -0x0E2E,0x0000,0x0000,0x0000,0x0000, -0x0E2F,0x0000,0x0000,0x0000,0x0000, -0x0E30,0x0000,0x0000,0x0000,0x0000, -0x0E31,0x0000,0x0000,0x0000,0x0000, -0x0E32,0x0000,0x0000,0x0000,0x0000, -0x0428,0x0000,0x0000,0x0000,0x0000, -0x0434,0x0000,0x0000,0x0000,0x0000, -0x042D,0x0000,0x0000,0x0000,0x0000, -0x0288,0x0000,0x0000,0x0000,0x0000, -0x0289,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x0000,0x0000,0x0000,0x0000, -0x0E29,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0000,0x0000,0x0000,0x0000, -0x0E2E,0x0000,0x0000,0x0000,0x0000, -0x0E2F,0x0000,0x0000,0x0000,0x0000, -0x0E30,0x0000,0x0000,0x0000,0x0000, -0x0E31,0x0000,0x0000,0x0000,0x0000, -0x0E32,0x0000,0x0000,0x0000,0x0000, -0x0428,0x0000,0x0000,0x0000,0x0000, -0x0434,0x0000,0x0000,0x0000,0x0000, -0x042D,0x0000,0x0000,0x0000,0x0000, -0x0288,0x0000,0x0000,0x0000,0x0000, -0x0289,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA08F,0x0000,0x0000,0x0000, -0xFBC0,0xA090,0x0000,0x0000,0x0000, -0xFBC0,0xA091,0x0000,0x0000,0x0000, -0xFBC0,0xA092,0x0000,0x0000,0x0000, -0xFBC0,0xA093,0x0000,0x0000,0x0000, -0xFBC0,0xA094,0x0000,0x0000,0x0000, -0xFBC0,0xA095,0x0000,0x0000,0x0000, -0xFBC0,0xA096,0x0000,0x0000,0x0000, -0xFBC0,0xA097,0x0000,0x0000,0x0000, -0xFBC0,0xA098,0x0000,0x0000,0x0000, -0xFBC0,0xA099,0x0000,0x0000,0x0000, -0xFBC0,0xA09A,0x0000,0x0000,0x0000, -0xFBC0,0xA09B,0x0000,0x0000,0x0000, -0xFBC0,0xA09C,0x0000,0x0000,0x0000, -0xFBC0,0xA09D,0x0000,0x0000,0x0000, -0xFBC0,0xA09E,0x0000,0x0000,0x0000, -0xFBC0,0xA09F,0x0000,0x0000,0x0000, -0x0E18,0x0000,0x0000,0x0000,0x0000, -0x0E19,0x0000,0x0000,0x0000,0x0000, -0x0E1A,0x0000,0x0000,0x0000,0x0000, -0x0E1B,0x0000,0x0000,0x0000,0x0000, -0x0E1C,0x0000,0x0000,0x0000,0x0000, -0x0E1D,0x0000,0x0000,0x0000,0x0000, -0x0E1E,0x0000,0x0000,0x0000,0x0000, -0x0E1F,0x0000,0x0000,0x0000,0x0000, -0x0FC0,0x0FEA,0x0000,0x0000,0x0000, -0x0E20,0x0000,0x0000,0x0000,0x0000, -0x0E21,0x0000,0x0000,0x0000,0x0000, -0x0E22,0x0000,0x0000,0x0000,0x0000, -0x0E23,0x0000,0x0000,0x0000,0x0000, -0x0E24,0x0000,0x0000,0x0000,0x0000, -0x0E25,0x0000,0x0000,0x0000,0x0000, -0x0E26,0x0000,0x0000,0x0000,0x0000, -0x0E27,0x0000,0x0000,0x0000,0x0000, -0x0E28,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA0B2,0x0000,0x0000,0x0000, -0xFBC0,0xA0B3,0x0000,0x0000,0x0000, -0xFBC0,0xA0B4,0x0000,0x0000,0x0000, -0xFBC0,0xA0B5,0x0000,0x0000,0x0000, -0xFBC0,0xA0B6,0x0000,0x0000,0x0000, -0xFBC0,0xA0B7,0x0000,0x0000,0x0000, -0xFBC0,0xA0B8,0x0000,0x0000,0x0000, -0xFBC0,0xA0B9,0x0000,0x0000,0x0000, -0xFBC0,0xA0BA,0x0000,0x0000,0x0000, -0xFBC0,0xA0BB,0x0000,0x0000,0x0000, -0xFBC0,0xA0BC,0x0000,0x0000,0x0000, -0xFBC0,0xA0BD,0x0000,0x0000,0x0000, -0xFBC0,0xA0BE,0x0000,0x0000,0x0000, -0xFBC0,0xA0BF,0x0000,0x0000,0x0000, -0xFBC0,0xA0C0,0x0000,0x0000,0x0000, -0xFBC0,0xA0C1,0x0000,0x0000,0x0000, -0xFBC0,0xA0C2,0x0000,0x0000,0x0000, -0xFBC0,0xA0C3,0x0000,0x0000,0x0000, -0xFBC0,0xA0C4,0x0000,0x0000,0x0000, -0xFBC0,0xA0C5,0x0000,0x0000,0x0000, -0xFBC0,0xA0C6,0x0000,0x0000,0x0000, -0xFBC0,0xA0C7,0x0000,0x0000,0x0000, -0xFBC0,0xA0C8,0x0000,0x0000,0x0000, -0xFBC0,0xA0C9,0x0000,0x0000,0x0000, -0xFBC0,0xA0CA,0x0000,0x0000,0x0000, -0xFBC0,0xA0CB,0x0000,0x0000,0x0000, -0xFBC0,0xA0CC,0x0000,0x0000,0x0000, -0xFBC0,0xA0CD,0x0000,0x0000,0x0000, -0xFBC0,0xA0CE,0x0000,0x0000,0x0000, -0xFBC0,0xA0CF,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA0EB,0x0000,0x0000,0x0000, -0xFBC0,0xA0EC,0x0000,0x0000,0x0000, -0xFBC0,0xA0ED,0x0000,0x0000,0x0000, -0xFBC0,0xA0EE,0x0000,0x0000,0x0000, -0xFBC0,0xA0EF,0x0000,0x0000,0x0000, -0xFBC0,0xA0F0,0x0000,0x0000,0x0000, -0xFBC0,0xA0F1,0x0000,0x0000,0x0000, -0xFBC0,0xA0F2,0x0000,0x0000,0x0000, -0xFBC0,0xA0F3,0x0000,0x0000,0x0000, -0xFBC0,0xA0F4,0x0000,0x0000,0x0000, -0xFBC0,0xA0F5,0x0000,0x0000,0x0000, -0xFBC0,0xA0F6,0x0000,0x0000,0x0000, -0xFBC0,0xA0F7,0x0000,0x0000,0x0000, -0xFBC0,0xA0F8,0x0000,0x0000,0x0000, -0xFBC0,0xA0F9,0x0000,0x0000,0x0000, -0xFBC0,0xA0FA,0x0000,0x0000,0x0000, -0xFBC0,0xA0FB,0x0000,0x0000,0x0000, -0xFBC0,0xA0FC,0x0000,0x0000,0x0000, -0xFBC0,0xA0FD,0x0000,0x0000,0x0000, -0xFBC0,0xA0FE,0x0000,0x0000,0x0000, -0xFBC0,0xA0FF,0x0000,0x0000,0x0000 -}; - -uint16 page021data[]= { /* 2100 (5 weights per char) */ -0x0E33,0x02CC,0x0E60,0x0000,0x0000, -0x0E33,0x02CC,0x0FEA,0x0000,0x0000, -0x0E60,0x0000,0x0000,0x0000,0x0000, -0x034A,0x0E60,0x0000,0x0000,0x0000, -0x039B,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x02CC,0x0F82,0x0000,0x0000, -0x0E60,0x02CC,0x101F,0x0000,0x0000, -0x0E98,0x0000,0x0000,0x0000,0x0000, -0x039C,0x0000,0x0000,0x0000,0x0000, -0x034A,0x0EB9,0x0000,0x0000,0x0000, -0x0EC1,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0000,0x0000,0x0000,0x0000, -0x0EED,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000,0x0000, -0x0F2E,0x0000,0x0000,0x0000,0x0000, -0x0F2E,0x0000,0x0000,0x0000,0x0000, -0x039D,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x0F82,0x0000,0x0000,0x0000, -0x039E,0x0000,0x0000,0x0000,0x0000, -0x039F,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x0000,0x0000,0x0000,0x0000, -0x0FB4,0x0000,0x0000,0x0000,0x0000, -0x0FC0,0x0000,0x0000,0x0000,0x0000, -0x0FC0,0x0000,0x0000,0x0000,0x0000, -0x0FC0,0x0000,0x0000,0x0000,0x0000, -0x03A0,0x0000,0x0000,0x0000,0x0000, -0x03A1,0x0000,0x0000,0x0000,0x0000, -0x0FEA,0x0F5B,0x0000,0x0000,0x0000, -0x1002,0x0E8B,0x0F2E,0x0000,0x0000, -0x1002,0x0F5B,0x0000,0x0000,0x0000, -0x03A2,0x0000,0x0000,0x0000,0x0000, -0x106A,0x0000,0x0000,0x0000,0x0000, -0x03A3,0x0000,0x0000,0x0000,0x0000, -0x1109,0x0000,0x0000,0x0000,0x0000, -0x03A4,0x0000,0x0000,0x0000,0x0000, -0x106A,0x0000,0x0000,0x0000,0x0000, -0x03A5,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0000,0x0000,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000,0x0000, -0x0E4A,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0000,0x0000,0x0000,0x0000, -0x03A6,0x0000,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000,0x0000, -0x0EB9,0x0000,0x0000,0x0000,0x0000, -0x03A7,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0000,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000,0x0000, -0x1331,0x0000,0x0000,0x0000,0x0000, -0x1332,0x0000,0x0000,0x0000,0x0000, -0x1333,0x0000,0x0000,0x0000,0x0000, -0x1334,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000,0x0000, -0x03A8,0x0000,0x0000,0x0000,0x0000, -0x0EB9,0x0E33,0x105A,0x0000,0x0000, -0xFBC0,0xA13C,0x0000,0x0000,0x0000, -0x10EA,0x0000,0x0000,0x0000,0x0000, -0x10EA,0x0000,0x0000,0x0000,0x0000, -0x10FC,0x0000,0x0000,0x0000,0x0000, -0x0427,0x0000,0x0000,0x0000,0x0000, -0x03A9,0x0000,0x0000,0x0000,0x0000, -0x03AA,0x0000,0x0000,0x0000,0x0000, -0x03AB,0x0000,0x0000,0x0000,0x0000, -0x03AC,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0000,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000,0x0000, -0x0F10,0x0000,0x0000,0x0000,0x0000, -0x03AD,0x0000,0x0000,0x0000,0x0000, -0x02D0,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA14C,0x0000,0x0000,0x0000, -0xFBC0,0xA14D,0x0000,0x0000,0x0000, -0xFBC0,0xA14E,0x0000,0x0000,0x0000, -0xFBC0,0xA14F,0x0000,0x0000,0x0000, -0xFBC0,0xA150,0x0000,0x0000,0x0000, -0xFBC0,0xA151,0x0000,0x0000,0x0000, -0xFBC0,0xA152,0x0000,0x0000,0x0000, -0x0E2A,0x02CD,0x0E2C,0x0000,0x0000, -0x0E2B,0x02CD,0x0E2C,0x0000,0x0000, -0x0E2A,0x02CD,0x0E2E,0x0000,0x0000, -0x0E2B,0x02CD,0x0E2E,0x0000,0x0000, -0x0E2C,0x02CD,0x0E2E,0x0000,0x0000, -0x0E2D,0x02CD,0x0E2E,0x0000,0x0000, -0x0E2A,0x02CD,0x0E2F,0x0000,0x0000, -0x0E2E,0x02CD,0x0E2F,0x0000,0x0000, -0x0E2A,0x02CD,0x0E31,0x0000,0x0000, -0x0E2C,0x02CD,0x0E31,0x0000,0x0000, -0x0E2E,0x02CD,0x0E31,0x0000,0x0000, -0x0E30,0x02CD,0x0E31,0x0000,0x0000, -0x0E2A,0x02CD,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0EFB,0x0000,0x0000,0x0000, -0x0EFB,0x0EFB,0x0EFB,0x0000,0x0000, -0x0EFB,0x1044,0x0000,0x0000,0x0000, -0x1044,0x0000,0x0000,0x0000,0x0000, -0x1044,0x0EFB,0x0000,0x0000,0x0000, -0x1044,0x0EFB,0x0EFB,0x0000,0x0000, -0x1044,0x0EFB,0x0EFB,0x0EFB,0x0000, -0x0EFB,0x105A,0x0000,0x0000,0x0000, -0x105A,0x0000,0x0000,0x0000,0x0000, -0x105A,0x0EFB,0x0000,0x0000,0x0000, -0x105A,0x0EFB,0x0EFB,0x0000,0x0000, -0x0F2E,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0EFB,0x0000,0x0000,0x0000, -0x0EFB,0x0EFB,0x0EFB,0x0000,0x0000, -0x0EFB,0x1044,0x0000,0x0000,0x0000, -0x1044,0x0000,0x0000,0x0000,0x0000, -0x1044,0x0EFB,0x0000,0x0000,0x0000, -0x1044,0x0EFB,0x0EFB,0x0000,0x0000, -0x1044,0x0EFB,0x0EFB,0x0EFB,0x0000, -0x0EFB,0x105A,0x0000,0x0000,0x0000, -0x105A,0x0000,0x0000,0x0000,0x0000, -0x105A,0x0EFB,0x0000,0x0000,0x0000, -0x105A,0x0EFB,0x0EFB,0x0000,0x0000, -0x0F2E,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0000,0x0000,0x0000,0x0000, -0x0DD7,0x0000,0x0000,0x0000,0x0000, -0x0DD8,0x0000,0x0000,0x0000,0x0000, -0x0DD9,0x0000,0x0000,0x0000,0x0000, -0x0DDA,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA184,0x0000,0x0000,0x0000, -0xFBC0,0xA185,0x0000,0x0000,0x0000, -0xFBC0,0xA186,0x0000,0x0000,0x0000, -0xFBC0,0xA187,0x0000,0x0000,0x0000, -0xFBC0,0xA188,0x0000,0x0000,0x0000, -0xFBC0,0xA189,0x0000,0x0000,0x0000, -0xFBC0,0xA18A,0x0000,0x0000,0x0000, -0xFBC0,0xA18B,0x0000,0x0000,0x0000, -0xFBC0,0xA18C,0x0000,0x0000,0x0000, -0xFBC0,0xA18D,0x0000,0x0000,0x0000, -0xFBC0,0xA18E,0x0000,0x0000,0x0000, -0xFBC0,0xA18F,0x0000,0x0000,0x0000, -0x03AE,0x0000,0x0000,0x0000,0x0000, -0x03B0,0x0000,0x0000,0x0000,0x0000, -0x03AF,0x0000,0x0000,0x0000,0x0000, -0x03B1,0x0000,0x0000,0x0000,0x0000, -0x03B2,0x0000,0x0000,0x0000,0x0000, -0x03B3,0x0000,0x0000,0x0000,0x0000, -0x03B4,0x0000,0x0000,0x0000,0x0000, -0x03B5,0x0000,0x0000,0x0000,0x0000, -0x03B6,0x0000,0x0000,0x0000,0x0000, -0x03B7,0x0000,0x0000,0x0000,0x0000, -0x03AE,0x0000,0x0000,0x0000,0x0000, -0x03AF,0x0000,0x0000,0x0000,0x0000, -0x03B8,0x0000,0x0000,0x0000,0x0000, -0x03B9,0x0000,0x0000,0x0000,0x0000, -0x03BA,0x0000,0x0000,0x0000,0x0000, -0x03BB,0x0000,0x0000,0x0000,0x0000, -0x03BC,0x0000,0x0000,0x0000,0x0000, -0x03BD,0x0000,0x0000,0x0000,0x0000, -0x03BE,0x0000,0x0000,0x0000,0x0000, -0x03BF,0x0000,0x0000,0x0000,0x0000, -0x03C0,0x0000,0x0000,0x0000,0x0000, -0x03C1,0x0000,0x0000,0x0000,0x0000, -0x03C2,0x0000,0x0000,0x0000,0x0000, -0x03C3,0x0000,0x0000,0x0000,0x0000, -0x03C4,0x0000,0x0000,0x0000,0x0000, -0x03C5,0x0000,0x0000,0x0000,0x0000, -0x03C6,0x0000,0x0000,0x0000,0x0000, -0x03C7,0x0000,0x0000,0x0000,0x0000, -0x03C8,0x0000,0x0000,0x0000,0x0000, -0x03C9,0x0000,0x0000,0x0000,0x0000, -0x03B2,0x0000,0x0000,0x0000,0x0000, -0x03CA,0x0000,0x0000,0x0000,0x0000, -0x03CB,0x0000,0x0000,0x0000,0x0000, -0x03CC,0x0000,0x0000,0x0000,0x0000, -0x03CD,0x0000,0x0000,0x0000,0x0000, -0x03CE,0x0000,0x0000,0x0000,0x0000, -0x03CF,0x0000,0x0000,0x0000,0x0000, -0x03D0,0x0000,0x0000,0x0000,0x0000, -0x03D1,0x0000,0x0000,0x0000,0x0000, -0x03D2,0x0000,0x0000,0x0000,0x0000, -0x03D3,0x0000,0x0000,0x0000,0x0000, -0x03D4,0x0000,0x0000,0x0000,0x0000, -0x03D5,0x0000,0x0000,0x0000,0x0000, -0x03D6,0x0000,0x0000,0x0000,0x0000, -0x03D7,0x0000,0x0000,0x0000,0x0000, -0x03D8,0x0000,0x0000,0x0000,0x0000, -0x03D9,0x0000,0x0000,0x0000,0x0000, -0x03DA,0x0000,0x0000,0x0000,0x0000, -0x03DB,0x0000,0x0000,0x0000,0x0000, -0x03DC,0x0000,0x0000,0x0000,0x0000, -0x03DD,0x0000,0x0000,0x0000,0x0000, -0x03DE,0x0000,0x0000,0x0000,0x0000, -0x03DF,0x0000,0x0000,0x0000,0x0000, -0x03E0,0x0000,0x0000,0x0000,0x0000, -0x03E1,0x0000,0x0000,0x0000,0x0000, -0x03E2,0x0000,0x0000,0x0000,0x0000, -0x03E3,0x0000,0x0000,0x0000,0x0000, -0x03E4,0x0000,0x0000,0x0000,0x0000, -0x03E5,0x0000,0x0000,0x0000,0x0000, -0x03E6,0x0000,0x0000,0x0000,0x0000, -0x03E7,0x0000,0x0000,0x0000,0x0000, -0x03E8,0x0000,0x0000,0x0000,0x0000, -0x03EC,0x0000,0x0000,0x0000,0x0000, -0x03EA,0x0000,0x0000,0x0000,0x0000, -0x03E8,0x0000,0x0000,0x0000,0x0000, -0x03E9,0x0000,0x0000,0x0000,0x0000, -0x03EA,0x0000,0x0000,0x0000,0x0000, -0x03EB,0x0000,0x0000,0x0000,0x0000, -0x03EC,0x0000,0x0000,0x0000,0x0000, -0x03ED,0x0000,0x0000,0x0000,0x0000, -0x03EE,0x0000,0x0000,0x0000,0x0000, -0x03EF,0x0000,0x0000,0x0000,0x0000, -0x03F0,0x0000,0x0000,0x0000,0x0000, -0x03F1,0x0000,0x0000,0x0000,0x0000, -0x03F2,0x0000,0x0000,0x0000,0x0000, -0x03F3,0x0000,0x0000,0x0000,0x0000, -0x03F4,0x0000,0x0000,0x0000,0x0000, -0x03F5,0x0000,0x0000,0x0000,0x0000, -0x03F6,0x0000,0x0000,0x0000,0x0000, -0x03F7,0x0000,0x0000,0x0000,0x0000, -0x03F8,0x0000,0x0000,0x0000,0x0000, -0x03F9,0x0000,0x0000,0x0000,0x0000, -0x03FA,0x0000,0x0000,0x0000,0x0000, -0x03FB,0x0000,0x0000,0x0000,0x0000, -0x03FC,0x0000,0x0000,0x0000,0x0000, -0x03FD,0x0000,0x0000,0x0000,0x0000, -0x03FE,0x0000,0x0000,0x0000,0x0000, -0x03FF,0x0000,0x0000,0x0000,0x0000, -0x0400,0x0000,0x0000,0x0000,0x0000, -0x0401,0x0000,0x0000,0x0000,0x0000, -0x0402,0x0000,0x0000,0x0000,0x0000, -0x0403,0x0000,0x0000,0x0000,0x0000, -0x0404,0x0000,0x0000,0x0000,0x0000, -0x0405,0x0000,0x0000,0x0000,0x0000, -0x0406,0x0000,0x0000,0x0000,0x0000, -0x0407,0x0000,0x0000,0x0000,0x0000, -0x0408,0x0000,0x0000,0x0000,0x0000, -0x0409,0x0000,0x0000,0x0000,0x0000, -0x040A,0x0000,0x0000,0x0000,0x0000, -0x040B,0x0000,0x0000,0x0000,0x0000, -0x040C,0x0000,0x0000,0x0000,0x0000, -0x040D,0x0000,0x0000,0x0000,0x0000, -0x040E,0x0000,0x0000,0x0000,0x0000, -0x040F,0x0000,0x0000,0x0000,0x0000, -0x0410,0x0000,0x0000,0x0000,0x0000, -0x0411,0x0000,0x0000,0x0000,0x0000, -0x0412,0x0000,0x0000,0x0000,0x0000, -0x0413,0x0000,0x0000,0x0000,0x0000, -0x0414,0x0000,0x0000,0x0000,0x0000, -0x0415,0x0000,0x0000,0x0000,0x0000, -0x0416,0x0000,0x0000,0x0000,0x0000, -0x0417,0x0000,0x0000,0x0000,0x0000 -}; - -uint16 page022data[]= { /* 2200 (4 weights per char) */ -0x0418,0x0000,0x0000,0x0000, 0x0419,0x0000,0x0000,0x0000, -0x041A,0x0000,0x0000,0x0000, 0x041B,0x0000,0x0000,0x0000, -0x041B,0x0000,0x0000,0x0000, 0x041C,0x0000,0x0000,0x0000, -0x041D,0x0000,0x0000,0x0000, 0x041E,0x0000,0x0000,0x0000, -0x041F,0x0000,0x0000,0x0000, 0x041F,0x0000,0x0000,0x0000, -0x0420,0x0000,0x0000,0x0000, 0x0421,0x0000,0x0000,0x0000, -0x0421,0x0000,0x0000,0x0000, 0x0422,0x0000,0x0000,0x0000, -0x0424,0x0000,0x0000,0x0000, 0x0425,0x0000,0x0000,0x0000, -0x0426,0x0000,0x0000,0x0000, 0x0427,0x0000,0x0000,0x0000, -0x0434,0x0000,0x0000,0x0000, 0x0435,0x0000,0x0000,0x0000, -0x0436,0x0000,0x0000,0x0000, 0x0437,0x0000,0x0000,0x0000, -0x0438,0x0000,0x0000,0x0000, 0x0439,0x0000,0x0000,0x0000, -0x043A,0x0000,0x0000,0x0000, 0x043B,0x0000,0x0000,0x0000, -0x043C,0x0000,0x0000,0x0000, 0x043D,0x0000,0x0000,0x0000, -0x043E,0x0000,0x0000,0x0000, 0x043F,0x0000,0x0000,0x0000, -0x0440,0x0000,0x0000,0x0000, 0x0441,0x0000,0x0000,0x0000, -0x0442,0x0000,0x0000,0x0000, 0x0443,0x0000,0x0000,0x0000, -0x0444,0x0000,0x0000,0x0000, 0x0445,0x0000,0x0000,0x0000, -0x0445,0x0000,0x0000,0x0000, 0x0446,0x0000,0x0000,0x0000, -0x0446,0x0000,0x0000,0x0000, 0x0447,0x0000,0x0000,0x0000, -0x0448,0x0000,0x0000,0x0000, 0x0449,0x0000,0x0000,0x0000, -0x044A,0x0000,0x0000,0x0000, 0x044B,0x0000,0x0000,0x0000, -0x044B,0x044B,0x0000,0x0000, 0x044B,0x044B,0x044B,0x0000, -0x044C,0x0000,0x0000,0x0000, 0x044C,0x044C,0x0000,0x0000, -0x044C,0x044C,0x044C,0x0000, 0x044D,0x0000,0x0000,0x0000, -0x044E,0x0000,0x0000,0x0000, 0x044F,0x0000,0x0000,0x0000, -0x0450,0x0000,0x0000,0x0000, 0x0451,0x0000,0x0000,0x0000, -0x0452,0x0000,0x0000,0x0000, 0x0453,0x0000,0x0000,0x0000, -0x0454,0x0000,0x0000,0x0000, 0x0455,0x0000,0x0000,0x0000, -0x0456,0x0000,0x0000,0x0000, 0x0457,0x0000,0x0000,0x0000, -0x0458,0x0000,0x0000,0x0000, 0x0459,0x0000,0x0000,0x0000, -0x045A,0x0000,0x0000,0x0000, 0x045B,0x0000,0x0000,0x0000, -0x045C,0x0000,0x0000,0x0000, 0x0458,0x0000,0x0000,0x0000, -0x045D,0x0000,0x0000,0x0000, 0x045E,0x0000,0x0000,0x0000, -0x045E,0x0000,0x0000,0x0000, 0x045F,0x0000,0x0000,0x0000, -0x0460,0x0000,0x0000,0x0000, 0x045F,0x0000,0x0000,0x0000, -0x0461,0x0000,0x0000,0x0000, 0x0461,0x0000,0x0000,0x0000, -0x0462,0x0000,0x0000,0x0000, 0x0463,0x0000,0x0000,0x0000, -0x0464,0x0000,0x0000,0x0000, 0x0465,0x0000,0x0000,0x0000, -0x0466,0x0000,0x0000,0x0000, 0x0467,0x0000,0x0000,0x0000, -0x0468,0x0000,0x0000,0x0000, 0x0469,0x0000,0x0000,0x0000, -0x046A,0x0000,0x0000,0x0000, 0x046B,0x0000,0x0000,0x0000, -0x046C,0x0000,0x0000,0x0000, 0x046D,0x0000,0x0000,0x0000, -0x046E,0x0000,0x0000,0x0000, 0x046F,0x0000,0x0000,0x0000, -0x0470,0x0000,0x0000,0x0000, 0x0471,0x0000,0x0000,0x0000, -0x0472,0x0000,0x0000,0x0000, 0x0473,0x0000,0x0000,0x0000, -0x0474,0x0000,0x0000,0x0000, 0x0475,0x0000,0x0000,0x0000, -0x0476,0x0000,0x0000,0x0000, 0x0477,0x0000,0x0000,0x0000, -0x042D,0x0000,0x0000,0x0000, 0x0478,0x0000,0x0000,0x0000, -0x0478,0x0000,0x0000,0x0000, 0x0479,0x0000,0x0000,0x0000, -0x047A,0x0000,0x0000,0x0000, 0x047B,0x0000,0x0000,0x0000, -0x047C,0x0000,0x0000,0x0000, 0x047D,0x0000,0x0000,0x0000, -0x047E,0x0000,0x0000,0x0000, 0x047F,0x0000,0x0000,0x0000, -0x0480,0x0000,0x0000,0x0000, 0x0481,0x0000,0x0000,0x0000, -0x0482,0x0000,0x0000,0x0000, 0x0465,0x0000,0x0000,0x0000, -0x042C,0x0000,0x0000,0x0000, 0x042E,0x0000,0x0000,0x0000, -0x047A,0x0000,0x0000,0x0000, 0x047B,0x0000,0x0000,0x0000, -0x0483,0x0000,0x0000,0x0000, 0x0484,0x0000,0x0000,0x0000, -0x0483,0x0000,0x0000,0x0000, 0x0484,0x0000,0x0000,0x0000, -0x0485,0x0000,0x0000,0x0000, 0x0486,0x0000,0x0000,0x0000, -0x0485,0x0000,0x0000,0x0000, 0x0486,0x0000,0x0000,0x0000, -0x0487,0x0000,0x0000,0x0000, 0x0488,0x0000,0x0000,0x0000, -0x0489,0x0000,0x0000,0x0000, 0x048A,0x0000,0x0000,0x0000, -0x048B,0x0000,0x0000,0x0000, 0x048C,0x0000,0x0000,0x0000, -0x0487,0x0000,0x0000,0x0000, 0x0488,0x0000,0x0000,0x0000, -0x048D,0x0000,0x0000,0x0000, 0x048E,0x0000,0x0000,0x0000, -0x048D,0x0000,0x0000,0x0000, 0x048E,0x0000,0x0000,0x0000, -0x048F,0x0000,0x0000,0x0000, 0x0490,0x0000,0x0000,0x0000, -0x048F,0x0000,0x0000,0x0000, 0x0490,0x0000,0x0000,0x0000, -0x0491,0x0000,0x0000,0x0000, 0x0492,0x0000,0x0000,0x0000, -0x0493,0x0000,0x0000,0x0000, 0x0494,0x0000,0x0000,0x0000, -0x0495,0x0000,0x0000,0x0000, 0x0496,0x0000,0x0000,0x0000, -0x0497,0x0000,0x0000,0x0000, 0x0498,0x0000,0x0000,0x0000, -0x0499,0x0000,0x0000,0x0000, 0x049A,0x0000,0x0000,0x0000, -0x049B,0x0000,0x0000,0x0000, 0x049C,0x0000,0x0000,0x0000, -0x049D,0x0000,0x0000,0x0000, 0x049E,0x0000,0x0000,0x0000, -0x049F,0x0000,0x0000,0x0000, 0x04A0,0x0000,0x0000,0x0000, -0x04A1,0x0000,0x0000,0x0000, 0x04A2,0x0000,0x0000,0x0000, -0x04A3,0x0000,0x0000,0x0000, 0x04A4,0x0000,0x0000,0x0000, -0x04A5,0x0000,0x0000,0x0000, 0x04A6,0x0000,0x0000,0x0000, -0x04A7,0x0000,0x0000,0x0000, 0x04A8,0x0000,0x0000,0x0000, -0x04A9,0x0000,0x0000,0x0000, 0x04AA,0x0000,0x0000,0x0000, -0x04AB,0x0000,0x0000,0x0000, 0x04AC,0x0000,0x0000,0x0000, -0x04AD,0x0000,0x0000,0x0000, 0x04AE,0x0000,0x0000,0x0000, -0x04AF,0x0000,0x0000,0x0000, 0x04B0,0x0000,0x0000,0x0000, -0x04B1,0x0000,0x0000,0x0000, 0x04B2,0x0000,0x0000,0x0000, -0x04A9,0x0000,0x0000,0x0000, 0x04AF,0x0000,0x0000,0x0000, -0x04B0,0x0000,0x0000,0x0000, 0x04B2,0x0000,0x0000,0x0000, -0x04B3,0x0000,0x0000,0x0000, 0x04B4,0x0000,0x0000,0x0000, -0x04B5,0x0000,0x0000,0x0000, 0x04B6,0x0000,0x0000,0x0000, -0x04B7,0x0000,0x0000,0x0000, 0x04B8,0x0000,0x0000,0x0000, -0x04B9,0x0000,0x0000,0x0000, 0x04BA,0x0000,0x0000,0x0000, -0x04BB,0x0000,0x0000,0x0000, 0x04BC,0x0000,0x0000,0x0000, -0x04BD,0x0000,0x0000,0x0000, 0x04BE,0x0000,0x0000,0x0000, -0x04BF,0x0000,0x0000,0x0000, 0x04C0,0x0000,0x0000,0x0000, -0x04C1,0x0000,0x0000,0x0000, 0x04C2,0x0000,0x0000,0x0000, -0x04C3,0x0000,0x0000,0x0000, 0x04C4,0x0000,0x0000,0x0000, -0x04C5,0x0000,0x0000,0x0000, 0x04C6,0x0000,0x0000,0x0000, -0x04C7,0x0000,0x0000,0x0000, 0x04C8,0x0000,0x0000,0x0000, -0x04C9,0x0000,0x0000,0x0000, 0x04CA,0x0000,0x0000,0x0000, -0x04CB,0x0000,0x0000,0x0000, 0x04CC,0x0000,0x0000,0x0000, -0x04CD,0x0000,0x0000,0x0000, 0x04CE,0x0000,0x0000,0x0000, -0x04CF,0x0000,0x0000,0x0000, 0x04D0,0x0000,0x0000,0x0000, -0x04D1,0x0000,0x0000,0x0000, 0x04D2,0x0000,0x0000,0x0000, -0x04D3,0x0000,0x0000,0x0000, 0x04D4,0x0000,0x0000,0x0000, -0x04D5,0x0000,0x0000,0x0000, 0x04D6,0x0000,0x0000,0x0000, -0x04D7,0x0000,0x0000,0x0000, 0x04D8,0x0000,0x0000,0x0000, -0x04D9,0x0000,0x0000,0x0000, 0x04DA,0x0000,0x0000,0x0000, -0x04DB,0x0000,0x0000,0x0000, 0x04DC,0x0000,0x0000,0x0000, -0x04DD,0x0000,0x0000,0x0000, 0x04DE,0x0000,0x0000,0x0000, -0x04DF,0x0000,0x0000,0x0000, 0x04E0,0x0000,0x0000,0x0000, -0x04E1,0x0000,0x0000,0x0000, 0x04E2,0x0000,0x0000,0x0000, -0x0489,0x0000,0x0000,0x0000, 0x048A,0x0000,0x0000,0x0000, -0x0498,0x0000,0x0000,0x0000, 0x0499,0x0000,0x0000,0x0000, -0x04E3,0x0000,0x0000,0x0000, 0x04E4,0x0000,0x0000,0x0000, -0x04E5,0x0000,0x0000,0x0000, 0x04E6,0x0000,0x0000,0x0000, -0x04E7,0x0000,0x0000,0x0000, 0x04E8,0x0000,0x0000,0x0000, -0x04B5,0x0000,0x0000,0x0000, 0x04B6,0x0000,0x0000,0x0000, -0x04B7,0x0000,0x0000,0x0000, 0x04B8,0x0000,0x0000,0x0000, -0x04E9,0x0000,0x0000,0x0000, 0x04EA,0x0000,0x0000,0x0000, -0x04EB,0x0000,0x0000,0x0000, 0x04EC,0x0000,0x0000,0x0000, -0x04ED,0x0000,0x0000,0x0000, 0x04EE,0x0000,0x0000,0x0000, -0x04EF,0x0000,0x0000,0x0000, 0x04F0,0x0000,0x0000,0x0000, -0x04F1,0x0000,0x0000,0x0000, 0x04F2,0x0000,0x0000,0x0000, -0x04F3,0x0000,0x0000,0x0000, 0x04F4,0x0000,0x0000,0x0000, -0x04F5,0x0000,0x0000,0x0000, 0x04F6,0x0000,0x0000,0x0000, -0x04F7,0x0000,0x0000,0x0000, 0x04F8,0x0000,0x0000,0x0000, -0x04F9,0x0000,0x0000,0x0000, 0x04FA,0x0000,0x0000,0x0000 -}; - -uint16 page023data[]= { /* 2300 (3 weights per char) */ -0x04FB,0x0000,0x0000, 0x04FC,0x0000,0x0000, 0x04FD,0x0000,0x0000, -0x04FE,0x0000,0x0000, 0x04FF,0x0000,0x0000, 0x0500,0x0000,0x0000, -0x0501,0x0000,0x0000, 0x0502,0x0000,0x0000, 0x0503,0x0000,0x0000, -0x0504,0x0000,0x0000, 0x0505,0x0000,0x0000, 0x0506,0x0000,0x0000, -0x0507,0x0000,0x0000, 0x0508,0x0000,0x0000, 0x0509,0x0000,0x0000, -0x050A,0x0000,0x0000, 0x050B,0x0000,0x0000, 0x050C,0x0000,0x0000, -0x050D,0x0000,0x0000, 0x050E,0x0000,0x0000, 0x050F,0x0000,0x0000, -0x0510,0x0000,0x0000, 0x0511,0x0000,0x0000, 0x0512,0x0000,0x0000, -0x0513,0x0000,0x0000, 0x0514,0x0000,0x0000, 0x0515,0x0000,0x0000, -0x0516,0x0000,0x0000, 0x0517,0x0000,0x0000, 0x0518,0x0000,0x0000, -0x0519,0x0000,0x0000, 0x051A,0x0000,0x0000, 0x051B,0x0000,0x0000, -0x051C,0x0000,0x0000, 0x051D,0x0000,0x0000, 0x051E,0x0000,0x0000, -0x051F,0x0000,0x0000, 0x0520,0x0000,0x0000, 0x0521,0x0000,0x0000, -0x0522,0x0000,0x0000, 0x0523,0x0000,0x0000, 0x02AE,0x0000,0x0000, -0x02AF,0x0000,0x0000, 0x0524,0x0000,0x0000, 0x0525,0x0000,0x0000, -0x0526,0x0000,0x0000, 0x0527,0x0000,0x0000, 0x0528,0x0000,0x0000, -0x0529,0x0000,0x0000, 0x052A,0x0000,0x0000, 0x052B,0x0000,0x0000, -0x052C,0x0000,0x0000, 0x052D,0x0000,0x0000, 0x052E,0x0000,0x0000, -0x052F,0x0000,0x0000, 0x0530,0x0000,0x0000, 0x0531,0x0000,0x0000, -0x0532,0x0000,0x0000, 0x0533,0x0000,0x0000, 0x0534,0x0000,0x0000, -0x0535,0x0000,0x0000, 0x0536,0x0000,0x0000, 0x0537,0x0000,0x0000, -0x0538,0x0000,0x0000, 0x0539,0x0000,0x0000, 0x053A,0x0000,0x0000, -0x053B,0x0000,0x0000, 0x053C,0x0000,0x0000, 0x053D,0x0000,0x0000, -0x053E,0x0000,0x0000, 0x053F,0x0000,0x0000, 0x0540,0x0000,0x0000, -0x0541,0x0000,0x0000, 0x0542,0x0000,0x0000, 0x0543,0x0000,0x0000, -0x0544,0x0000,0x0000, 0x0545,0x0000,0x0000, 0x0546,0x0000,0x0000, -0x0547,0x0000,0x0000, 0x0548,0x0000,0x0000, 0x0549,0x0000,0x0000, -0x054A,0x0000,0x0000, 0x054B,0x0000,0x0000, 0x054C,0x0000,0x0000, -0x054D,0x0000,0x0000, 0x054E,0x0000,0x0000, 0x054F,0x0000,0x0000, -0x0550,0x0000,0x0000, 0x0551,0x0000,0x0000, 0x0552,0x0000,0x0000, -0x0553,0x0000,0x0000, 0x0554,0x0000,0x0000, 0x0555,0x0000,0x0000, -0x0556,0x0000,0x0000, 0x0557,0x0000,0x0000, 0x0558,0x0000,0x0000, -0x0559,0x0000,0x0000, 0x055A,0x0000,0x0000, 0x055B,0x0000,0x0000, -0x055C,0x0000,0x0000, 0x055D,0x0000,0x0000, 0x055E,0x0000,0x0000, -0x055F,0x0000,0x0000, 0x0560,0x0000,0x0000, 0x0561,0x0000,0x0000, -0x0562,0x0000,0x0000, 0x0563,0x0000,0x0000, 0x0564,0x0000,0x0000, -0x0565,0x0000,0x0000, 0x0566,0x0000,0x0000, 0x0567,0x0000,0x0000, -0x0568,0x0000,0x0000, 0x0569,0x0000,0x0000, 0x056A,0x0000,0x0000, -0x056B,0x0000,0x0000, 0x056C,0x0000,0x0000, 0x056D,0x0000,0x0000, -0x056E,0x0000,0x0000, 0x056F,0x0000,0x0000, 0x0570,0x0000,0x0000, -0x0571,0x0000,0x0000, 0x0572,0x0000,0x0000, 0x0573,0x0000,0x0000, -0x0574,0x0000,0x0000, 0x0575,0x0000,0x0000, 0x0576,0x0000,0x0000, -0x0577,0x0000,0x0000, 0x0578,0x0000,0x0000, 0x0579,0x0000,0x0000, -0x057A,0x0000,0x0000, 0x057B,0x0000,0x0000, 0x057C,0x0000,0x0000, -0x057D,0x0000,0x0000, 0x057E,0x0000,0x0000, 0x057F,0x0000,0x0000, -0x0580,0x0000,0x0000, 0x0581,0x0000,0x0000, 0x0582,0x0000,0x0000, -0x0583,0x0000,0x0000, 0x0584,0x0000,0x0000, 0x0585,0x0000,0x0000, -0x0586,0x0000,0x0000, 0x0587,0x0000,0x0000, 0x0588,0x0000,0x0000, -0x0589,0x0000,0x0000, 0x058A,0x0000,0x0000, 0x058B,0x0000,0x0000, -0x058C,0x0000,0x0000, 0x058D,0x0000,0x0000, 0x058E,0x0000,0x0000, -0x058F,0x0000,0x0000, 0x0590,0x0000,0x0000, 0x0591,0x0000,0x0000, -0x0592,0x0000,0x0000, 0x0593,0x0000,0x0000, 0x0594,0x0000,0x0000, -0x0595,0x0000,0x0000, 0x0596,0x0000,0x0000, 0x0597,0x0000,0x0000, -0x0598,0x0000,0x0000, 0x0599,0x0000,0x0000, 0x059A,0x0000,0x0000, -0x059B,0x0000,0x0000, 0x059C,0x0000,0x0000, 0x059D,0x0000,0x0000, -0x059E,0x0000,0x0000, 0x059F,0x0000,0x0000, 0x05A0,0x0000,0x0000, -0x05A1,0x0000,0x0000, 0x05A2,0x0000,0x0000, 0x05A3,0x0000,0x0000, -0x05A4,0x0000,0x0000, 0x05A5,0x0000,0x0000, 0x05A6,0x0000,0x0000, -0x05A7,0x0000,0x0000, 0x05A8,0x0000,0x0000, 0x05A9,0x0000,0x0000, -0x05AA,0x0000,0x0000, 0x05AB,0x0000,0x0000, 0x05AC,0x0000,0x0000, -0x05AD,0x0000,0x0000, 0x05AE,0x0000,0x0000, 0x05AF,0x0000,0x0000, -0x05B0,0x0000,0x0000, 0x05B1,0x0000,0x0000, 0x05B2,0x0000,0x0000, -0x05B3,0x0000,0x0000, 0x05B4,0x0000,0x0000, 0x05B5,0x0000,0x0000, -0x05B6,0x0000,0x0000, 0x05B7,0x0000,0x0000, 0x05B8,0x0000,0x0000, -0x05B9,0x0000,0x0000, 0x05BA,0x0000,0x0000, 0x05BB,0x0000,0x0000, -0x05BC,0x0000,0x0000, 0x05BD,0x0000,0x0000, 0x05BE,0x0000,0x0000, -0x05BF,0x0000,0x0000, 0x05C0,0x0000,0x0000, 0x05C1,0x0000,0x0000, -0x05C2,0x0000,0x0000, 0x05C3,0x0000,0x0000, 0x05C4,0x0000,0x0000, -0x05C5,0x0000,0x0000, 0x05C6,0x0000,0x0000, 0x05C7,0x0000,0x0000, -0x05C8,0x0000,0x0000, 0x05C9,0x0000,0x0000, 0xFBC0,0xA3D1,0x0000, -0xFBC0,0xA3D2,0x0000, 0xFBC0,0xA3D3,0x0000, 0xFBC0,0xA3D4,0x0000, -0xFBC0,0xA3D5,0x0000, 0xFBC0,0xA3D6,0x0000, 0xFBC0,0xA3D7,0x0000, -0xFBC0,0xA3D8,0x0000, 0xFBC0,0xA3D9,0x0000, 0xFBC0,0xA3DA,0x0000, -0xFBC0,0xA3DB,0x0000, 0xFBC0,0xA3DC,0x0000, 0xFBC0,0xA3DD,0x0000, -0xFBC0,0xA3DE,0x0000, 0xFBC0,0xA3DF,0x0000, 0xFBC0,0xA3E0,0x0000, -0xFBC0,0xA3E1,0x0000, 0xFBC0,0xA3E2,0x0000, 0xFBC0,0xA3E3,0x0000, -0xFBC0,0xA3E4,0x0000, 0xFBC0,0xA3E5,0x0000, 0xFBC0,0xA3E6,0x0000, -0xFBC0,0xA3E7,0x0000, 0xFBC0,0xA3E8,0x0000, 0xFBC0,0xA3E9,0x0000, -0xFBC0,0xA3EA,0x0000, 0xFBC0,0xA3EB,0x0000, 0xFBC0,0xA3EC,0x0000, -0xFBC0,0xA3ED,0x0000, 0xFBC0,0xA3EE,0x0000, 0xFBC0,0xA3EF,0x0000, -0xFBC0,0xA3F0,0x0000, 0xFBC0,0xA3F1,0x0000, 0xFBC0,0xA3F2,0x0000, -0xFBC0,0xA3F3,0x0000, 0xFBC0,0xA3F4,0x0000, 0xFBC0,0xA3F5,0x0000, -0xFBC0,0xA3F6,0x0000, 0xFBC0,0xA3F7,0x0000, 0xFBC0,0xA3F8,0x0000, -0xFBC0,0xA3F9,0x0000, 0xFBC0,0xA3FA,0x0000, 0xFBC0,0xA3FB,0x0000, -0xFBC0,0xA3FC,0x0000, 0xFBC0,0xA3FD,0x0000, 0xFBC0,0xA3FE,0x0000, -0xFBC0,0xA3FF,0x0000 }; - -uint16 page024data[]= { /* 2400 (5 weights per char) */ -0x05CA,0x0000,0x0000,0x0000,0x0000, -0x05CB,0x0000,0x0000,0x0000,0x0000, -0x05CC,0x0000,0x0000,0x0000,0x0000, -0x05CD,0x0000,0x0000,0x0000,0x0000, -0x05CE,0x0000,0x0000,0x0000,0x0000, -0x05CF,0x0000,0x0000,0x0000,0x0000, -0x05D0,0x0000,0x0000,0x0000,0x0000, -0x05D1,0x0000,0x0000,0x0000,0x0000, -0x05D2,0x0000,0x0000,0x0000,0x0000, -0x05D3,0x0000,0x0000,0x0000,0x0000, -0x05D4,0x0000,0x0000,0x0000,0x0000, -0x05D5,0x0000,0x0000,0x0000,0x0000, -0x05D6,0x0000,0x0000,0x0000,0x0000, -0x05D7,0x0000,0x0000,0x0000,0x0000, -0x05D8,0x0000,0x0000,0x0000,0x0000, -0x05D9,0x0000,0x0000,0x0000,0x0000, -0x05DA,0x0000,0x0000,0x0000,0x0000, -0x05DB,0x0000,0x0000,0x0000,0x0000, -0x05DC,0x0000,0x0000,0x0000,0x0000, -0x05DD,0x0000,0x0000,0x0000,0x0000, -0x05DE,0x0000,0x0000,0x0000,0x0000, -0x05DF,0x0000,0x0000,0x0000,0x0000, -0x05E0,0x0000,0x0000,0x0000,0x0000, -0x05E1,0x0000,0x0000,0x0000,0x0000, -0x05E2,0x0000,0x0000,0x0000,0x0000, -0x05E3,0x0000,0x0000,0x0000,0x0000, -0x05E4,0x0000,0x0000,0x0000,0x0000, -0x05E5,0x0000,0x0000,0x0000,0x0000, -0x05E6,0x0000,0x0000,0x0000,0x0000, -0x05E7,0x0000,0x0000,0x0000,0x0000, -0x05E8,0x0000,0x0000,0x0000,0x0000, -0x05E9,0x0000,0x0000,0x0000,0x0000, -0x05EA,0x0000,0x0000,0x0000,0x0000, -0x05EB,0x0000,0x0000,0x0000,0x0000, -0x05EC,0x0000,0x0000,0x0000,0x0000, -0x05ED,0x0000,0x0000,0x0000,0x0000, -0x05EE,0x0000,0x0000,0x0000,0x0000, -0x05EF,0x0000,0x0000,0x0000,0x0000, -0x05F0,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA427,0x0000,0x0000,0x0000, -0xFBC0,0xA428,0x0000,0x0000,0x0000, -0xFBC0,0xA429,0x0000,0x0000,0x0000, -0xFBC0,0xA42A,0x0000,0x0000,0x0000, -0xFBC0,0xA42B,0x0000,0x0000,0x0000, -0xFBC0,0xA42C,0x0000,0x0000,0x0000, -0xFBC0,0xA42D,0x0000,0x0000,0x0000, -0xFBC0,0xA42E,0x0000,0x0000,0x0000, -0xFBC0,0xA42F,0x0000,0x0000,0x0000, -0xFBC0,0xA430,0x0000,0x0000,0x0000, -0xFBC0,0xA431,0x0000,0x0000,0x0000, -0xFBC0,0xA432,0x0000,0x0000,0x0000, -0xFBC0,0xA433,0x0000,0x0000,0x0000, -0xFBC0,0xA434,0x0000,0x0000,0x0000, -0xFBC0,0xA435,0x0000,0x0000,0x0000, -0xFBC0,0xA436,0x0000,0x0000,0x0000, -0xFBC0,0xA437,0x0000,0x0000,0x0000, -0xFBC0,0xA438,0x0000,0x0000,0x0000, -0xFBC0,0xA439,0x0000,0x0000,0x0000, -0xFBC0,0xA43A,0x0000,0x0000,0x0000, -0xFBC0,0xA43B,0x0000,0x0000,0x0000, -0xFBC0,0xA43C,0x0000,0x0000,0x0000, -0xFBC0,0xA43D,0x0000,0x0000,0x0000, -0xFBC0,0xA43E,0x0000,0x0000,0x0000, -0xFBC0,0xA43F,0x0000,0x0000,0x0000, -0x05F1,0x0000,0x0000,0x0000,0x0000, -0x05F2,0x0000,0x0000,0x0000,0x0000, -0x05F3,0x0000,0x0000,0x0000,0x0000, -0x05F4,0x0000,0x0000,0x0000,0x0000, -0x05F5,0x0000,0x0000,0x0000,0x0000, -0x05F6,0x0000,0x0000,0x0000,0x0000, -0x05F7,0x0000,0x0000,0x0000,0x0000, -0x05F8,0x0000,0x0000,0x0000,0x0000, -0x05F9,0x0000,0x0000,0x0000,0x0000, -0x05FA,0x0000,0x0000,0x0000,0x0000, -0x05FB,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xA44B,0x0000,0x0000,0x0000, -0xFBC0,0xA44C,0x0000,0x0000,0x0000, -0xFBC0,0xA44D,0x0000,0x0000,0x0000, -0xFBC0,0xA44E,0x0000,0x0000,0x0000, -0xFBC0,0xA44F,0x0000,0x0000,0x0000, -0xFBC0,0xA450,0x0000,0x0000,0x0000, -0xFBC0,0xA451,0x0000,0x0000,0x0000, -0xFBC0,0xA452,0x0000,0x0000,0x0000, -0xFBC0,0xA453,0x0000,0x0000,0x0000, -0xFBC0,0xA454,0x0000,0x0000,0x0000, -0xFBC0,0xA455,0x0000,0x0000,0x0000, -0xFBC0,0xA456,0x0000,0x0000,0x0000, -0xFBC0,0xA457,0x0000,0x0000,0x0000, -0xFBC0,0xA458,0x0000,0x0000,0x0000, -0xFBC0,0xA459,0x0000,0x0000,0x0000, -0xFBC0,0xA45A,0x0000,0x0000,0x0000, -0xFBC0,0xA45B,0x0000,0x0000,0x0000, -0xFBC0,0xA45C,0x0000,0x0000,0x0000, -0xFBC0,0xA45D,0x0000,0x0000,0x0000, -0xFBC0,0xA45E,0x0000,0x0000,0x0000, -0xFBC0,0xA45F,0x0000,0x0000,0x0000, -0x0E2A,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0000,0x0000,0x0000,0x0000, -0x0E2E,0x0000,0x0000,0x0000,0x0000, -0x0E2F,0x0000,0x0000,0x0000,0x0000, -0x0E30,0x0000,0x0000,0x0000,0x0000, -0x0E31,0x0000,0x0000,0x0000,0x0000, -0x0E32,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E29,0x0000,0x0000,0x0000, -0x0E2A,0x0E2A,0x0000,0x0000,0x0000, -0x0E2A,0x0E2B,0x0000,0x0000,0x0000, -0x0E2A,0x0E2C,0x0000,0x0000,0x0000, -0x0E2A,0x0E2D,0x0000,0x0000,0x0000, -0x0E2A,0x0E2E,0x0000,0x0000,0x0000, -0x0E2A,0x0E2F,0x0000,0x0000,0x0000, -0x0E2A,0x0E30,0x0000,0x0000,0x0000, -0x0E2A,0x0E31,0x0000,0x0000,0x0000, -0x0E2A,0x0E32,0x0000,0x0000,0x0000, -0x0E2B,0x0E29,0x0000,0x0000,0x0000, -0x0288,0x0E2A,0x0289,0x0000,0x0000, -0x0288,0x0E2B,0x0289,0x0000,0x0000, -0x0288,0x0E2C,0x0289,0x0000,0x0000, -0x0288,0x0E2D,0x0289,0x0000,0x0000, -0x0288,0x0E2E,0x0289,0x0000,0x0000, -0x0288,0x0E2F,0x0289,0x0000,0x0000, -0x0288,0x0E30,0x0289,0x0000,0x0000, -0x0288,0x0E31,0x0289,0x0000,0x0000, -0x0288,0x0E32,0x0289,0x0000,0x0000, -0x0288,0x0E2A,0x0E29,0x0289,0x0000, -0x0288,0x0E2A,0x0E2A,0x0289,0x0000, -0x0288,0x0E2A,0x0E2B,0x0289,0x0000, -0x0288,0x0E2A,0x0E2C,0x0289,0x0000, -0x0288,0x0E2A,0x0E2D,0x0289,0x0000, -0x0288,0x0E2A,0x0E2E,0x0289,0x0000, -0x0288,0x0E2A,0x0E2F,0x0289,0x0000, -0x0288,0x0E2A,0x0E30,0x0289,0x0000, -0x0288,0x0E2A,0x0E31,0x0289,0x0000, -0x0288,0x0E2A,0x0E32,0x0289,0x0000, -0x0288,0x0E2B,0x0E29,0x0289,0x0000, -0x0E2A,0x025D,0x0000,0x0000,0x0000, -0x0E2B,0x025D,0x0000,0x0000,0x0000, -0x0E2C,0x025D,0x0000,0x0000,0x0000, -0x0E2D,0x025D,0x0000,0x0000,0x0000, -0x0E2E,0x025D,0x0000,0x0000,0x0000, -0x0E2F,0x025D,0x0000,0x0000,0x0000, -0x0E30,0x025D,0x0000,0x0000,0x0000, -0x0E31,0x025D,0x0000,0x0000,0x0000, -0x0E32,0x025D,0x0000,0x0000,0x0000, -0x0E2A,0x0E29,0x025D,0x0000,0x0000, -0x0E2A,0x0E2A,0x025D,0x0000,0x0000, -0x0E2A,0x0E2B,0x025D,0x0000,0x0000, -0x0E2A,0x0E2C,0x025D,0x0000,0x0000, -0x0E2A,0x0E2D,0x025D,0x0000,0x0000, -0x0E2A,0x0E2E,0x025D,0x0000,0x0000, -0x0E2A,0x0E2F,0x025D,0x0000,0x0000, -0x0E2A,0x0E30,0x025D,0x0000,0x0000, -0x0E2A,0x0E31,0x025D,0x0000,0x0000, -0x0E2A,0x0E32,0x025D,0x0000,0x0000, -0x0E2B,0x0E29,0x025D,0x0000,0x0000, -0x0288,0x0E33,0x0289,0x0000,0x0000, -0x0288,0x0E4A,0x0289,0x0000,0x0000, -0x0288,0x0E60,0x0289,0x0000,0x0000, -0x0288,0x0E6D,0x0289,0x0000,0x0000, -0x0288,0x0E8B,0x0289,0x0000,0x0000, -0x0288,0x0EB9,0x0289,0x0000,0x0000, -0x0288,0x0EC1,0x0289,0x0000,0x0000, -0x0288,0x0EE1,0x0289,0x0000,0x0000, -0x0288,0x0EFB,0x0289,0x0000,0x0000, -0x0288,0x0F10,0x0289,0x0000,0x0000, -0x0288,0x0F21,0x0289,0x0000,0x0000, -0x0288,0x0F2E,0x0289,0x0000,0x0000, -0x0288,0x0F5B,0x0289,0x0000,0x0000, -0x0288,0x0F64,0x0289,0x0000,0x0000, -0x0288,0x0F82,0x0289,0x0000,0x0000, -0x0288,0x0FA7,0x0289,0x0000,0x0000, -0x0288,0x0FB4,0x0289,0x0000,0x0000, -0x0288,0x0FC0,0x0289,0x0000,0x0000, -0x0288,0x0FEA,0x0289,0x0000,0x0000, -0x0288,0x1002,0x0289,0x0000,0x0000, -0x0288,0x101F,0x0289,0x0000,0x0000, -0x0288,0x1044,0x0289,0x0000,0x0000, -0x0288,0x1051,0x0289,0x0000,0x0000, -0x0288,0x105A,0x0289,0x0000,0x0000, -0x0288,0x105E,0x0289,0x0000,0x0000, -0x0288,0x106A,0x0289,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000,0x0000, -0x0E4A,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0000,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000,0x0000, -0x0EB9,0x0000,0x0000,0x0000,0x0000, -0x0EC1,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000,0x0000, -0x0F10,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0000,0x0000,0x0000,0x0000, -0x0F2E,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x0000,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x0000,0x0000,0x0000,0x0000, -0x0FB4,0x0000,0x0000,0x0000,0x0000, -0x0FC0,0x0000,0x0000,0x0000,0x0000, -0x0FEA,0x0000,0x0000,0x0000,0x0000, -0x1002,0x0000,0x0000,0x0000,0x0000, -0x101F,0x0000,0x0000,0x0000,0x0000, -0x1044,0x0000,0x0000,0x0000,0x0000, -0x1051,0x0000,0x0000,0x0000,0x0000, -0x105A,0x0000,0x0000,0x0000,0x0000, -0x105E,0x0000,0x0000,0x0000,0x0000, -0x106A,0x0000,0x0000,0x0000,0x0000, -0x0E33,0x0000,0x0000,0x0000,0x0000, -0x0E4A,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0000,0x0000,0x0000,0x0000, -0x0E8B,0x0000,0x0000,0x0000,0x0000, -0x0EB9,0x0000,0x0000,0x0000,0x0000, -0x0EC1,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0000,0x0000,0x0000,0x0000, -0x0F10,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0000,0x0000,0x0000,0x0000, -0x0F2E,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x0000,0x0000,0x0000,0x0000, -0x0F82,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x0000,0x0000,0x0000,0x0000, -0x0FB4,0x0000,0x0000,0x0000,0x0000, -0x0FC0,0x0000,0x0000,0x0000,0x0000, -0x0FEA,0x0000,0x0000,0x0000,0x0000, -0x1002,0x0000,0x0000,0x0000,0x0000, -0x101F,0x0000,0x0000,0x0000,0x0000, -0x1044,0x0000,0x0000,0x0000,0x0000, -0x1051,0x0000,0x0000,0x0000,0x0000, -0x105A,0x0000,0x0000,0x0000,0x0000, -0x105E,0x0000,0x0000,0x0000,0x0000, -0x106A,0x0000,0x0000,0x0000,0x0000, -0x0E29,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2A,0x0000,0x0000,0x0000, -0x0E2A,0x0E2B,0x0000,0x0000,0x0000, -0x0E2A,0x0E2C,0x0000,0x0000,0x0000, -0x0E2A,0x0E2D,0x0000,0x0000,0x0000, -0x0E2A,0x0E2E,0x0000,0x0000,0x0000, -0x0E2A,0x0E2F,0x0000,0x0000,0x0000, -0x0E2A,0x0E30,0x0000,0x0000,0x0000, -0x0E2A,0x0E31,0x0000,0x0000,0x0000, -0x0E2A,0x0E32,0x0000,0x0000,0x0000, -0x0E2B,0x0E29,0x0000,0x0000,0x0000, -0x0E2A,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0000,0x0000,0x0000,0x0000, -0x0E2E,0x0000,0x0000,0x0000,0x0000, -0x0E2F,0x0000,0x0000,0x0000,0x0000, -0x0E30,0x0000,0x0000,0x0000,0x0000, -0x0E31,0x0000,0x0000,0x0000,0x0000, -0x0E32,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E29,0x0000,0x0000,0x0000, -0x0E29,0x0000,0x0000,0x0000,0x0000 -}; - -uint16 page025data[]= { /* 2500 (2 weights per char) */ -0x05FC,0x0000, 0x05FD,0x0000, 0x05FE,0x0000, 0x05FF,0x0000, -0x0600,0x0000, 0x0601,0x0000, 0x0602,0x0000, 0x0603,0x0000, -0x0604,0x0000, 0x0605,0x0000, 0x0606,0x0000, 0x0607,0x0000, -0x0608,0x0000, 0x0609,0x0000, 0x060A,0x0000, 0x060B,0x0000, -0x060C,0x0000, 0x060D,0x0000, 0x060E,0x0000, 0x060F,0x0000, -0x0610,0x0000, 0x0611,0x0000, 0x0612,0x0000, 0x0613,0x0000, -0x0614,0x0000, 0x0615,0x0000, 0x0616,0x0000, 0x0617,0x0000, -0x0618,0x0000, 0x0619,0x0000, 0x061A,0x0000, 0x061B,0x0000, -0x061C,0x0000, 0x061D,0x0000, 0x061E,0x0000, 0x061F,0x0000, -0x0620,0x0000, 0x0621,0x0000, 0x0622,0x0000, 0x0623,0x0000, -0x0624,0x0000, 0x0625,0x0000, 0x0626,0x0000, 0x0627,0x0000, -0x0628,0x0000, 0x0629,0x0000, 0x062A,0x0000, 0x062B,0x0000, -0x062C,0x0000, 0x062D,0x0000, 0x062E,0x0000, 0x062F,0x0000, -0x0630,0x0000, 0x0631,0x0000, 0x0632,0x0000, 0x0633,0x0000, -0x0634,0x0000, 0x0635,0x0000, 0x0636,0x0000, 0x0637,0x0000, -0x0638,0x0000, 0x0639,0x0000, 0x063A,0x0000, 0x063B,0x0000, -0x063C,0x0000, 0x063D,0x0000, 0x063E,0x0000, 0x063F,0x0000, -0x0640,0x0000, 0x0641,0x0000, 0x0642,0x0000, 0x0643,0x0000, -0x0644,0x0000, 0x0645,0x0000, 0x0646,0x0000, 0x0647,0x0000, -0x0648,0x0000, 0x0649,0x0000, 0x064A,0x0000, 0x064B,0x0000, -0x064C,0x0000, 0x064D,0x0000, 0x064E,0x0000, 0x064F,0x0000, -0x0650,0x0000, 0x0651,0x0000, 0x0652,0x0000, 0x0653,0x0000, -0x0654,0x0000, 0x0655,0x0000, 0x0656,0x0000, 0x0657,0x0000, -0x0658,0x0000, 0x0659,0x0000, 0x065A,0x0000, 0x065B,0x0000, -0x065C,0x0000, 0x065D,0x0000, 0x065E,0x0000, 0x065F,0x0000, -0x0660,0x0000, 0x0661,0x0000, 0x0662,0x0000, 0x0663,0x0000, -0x0664,0x0000, 0x0665,0x0000, 0x0666,0x0000, 0x0667,0x0000, -0x0668,0x0000, 0x0669,0x0000, 0x066A,0x0000, 0x066B,0x0000, -0x066C,0x0000, 0x066D,0x0000, 0x066E,0x0000, 0x066F,0x0000, -0x0670,0x0000, 0x0671,0x0000, 0x0672,0x0000, 0x0673,0x0000, -0x0674,0x0000, 0x0675,0x0000, 0x0676,0x0000, 0x0677,0x0000, -0x0678,0x0000, 0x0679,0x0000, 0x067A,0x0000, 0x067B,0x0000, -0x067C,0x0000, 0x067D,0x0000, 0x067E,0x0000, 0x067F,0x0000, -0x0680,0x0000, 0x0681,0x0000, 0x0682,0x0000, 0x0683,0x0000, -0x0684,0x0000, 0x0685,0x0000, 0x0686,0x0000, 0x0687,0x0000, -0x0688,0x0000, 0x0689,0x0000, 0x068A,0x0000, 0x068B,0x0000, -0x068C,0x0000, 0x068D,0x0000, 0x068E,0x0000, 0x068F,0x0000, -0x0690,0x0000, 0x0691,0x0000, 0x0692,0x0000, 0x0693,0x0000, -0x0694,0x0000, 0x0695,0x0000, 0x0696,0x0000, 0x0697,0x0000, -0x0698,0x0000, 0x0699,0x0000, 0x069A,0x0000, 0x069B,0x0000, -0x069C,0x0000, 0x069D,0x0000, 0x069E,0x0000, 0x069F,0x0000, -0x06A0,0x0000, 0x06A1,0x0000, 0x06A2,0x0000, 0x06A3,0x0000, -0x06A4,0x0000, 0x06A5,0x0000, 0x06A6,0x0000, 0x06A7,0x0000, -0x06A8,0x0000, 0x06A9,0x0000, 0x06AA,0x0000, 0x06AB,0x0000, -0x06AC,0x0000, 0x06AD,0x0000, 0x06AE,0x0000, 0x06AF,0x0000, -0x06B0,0x0000, 0x06B1,0x0000, 0x06B2,0x0000, 0x06B3,0x0000, -0x06B4,0x0000, 0x06B5,0x0000, 0x06B6,0x0000, 0x06B7,0x0000, -0x06B8,0x0000, 0x06B9,0x0000, 0x06BA,0x0000, 0x06BB,0x0000, -0x06BC,0x0000, 0x06BD,0x0000, 0x06BE,0x0000, 0x06BF,0x0000, -0x06C0,0x0000, 0x06C1,0x0000, 0x06C2,0x0000, 0x06C3,0x0000, -0x06C4,0x0000, 0x06C5,0x0000, 0x06C6,0x0000, 0x06C7,0x0000, -0x06C8,0x0000, 0x06C9,0x0000, 0x06CA,0x0000, 0x06CB,0x0000, -0x06CC,0x0000, 0x06CD,0x0000, 0x06CE,0x0000, 0x06CF,0x0000, -0x06D0,0x0000, 0x06D1,0x0000, 0x06D2,0x0000, 0x06D3,0x0000, -0x06D4,0x0000, 0x06D5,0x0000, 0x06D6,0x0000, 0x06D7,0x0000, -0x06D8,0x0000, 0x06D9,0x0000, 0x06DA,0x0000, 0x06DB,0x0000, -0x06DC,0x0000, 0x06DD,0x0000, 0x06DE,0x0000, 0x06DF,0x0000, -0x06E0,0x0000, 0x06E1,0x0000, 0x06E2,0x0000, 0x06E3,0x0000, -0x06E4,0x0000, 0x06E5,0x0000, 0x06E6,0x0000, 0x06E7,0x0000, -0x06E8,0x0000, 0x06E9,0x0000, 0x06EA,0x0000, 0x06EB,0x0000, -0x06EC,0x0000, 0x06ED,0x0000, 0x06EE,0x0000, 0x06EF,0x0000, -0x06F0,0x0000, 0x06F1,0x0000, 0x06F2,0x0000, 0x06F3,0x0000, -0x06F4,0x0000, 0x06F5,0x0000, 0x06F6,0x0000, 0x06F7,0x0000, -0x06F8,0x0000, 0x06F9,0x0000, 0x06FA,0x0000, 0x06FB,0x0000 -}; - -uint16 page026data[]= { /* 2600 (3 weights per char) */ -0x06FC,0x0000,0x0000, 0x06FD,0x0000,0x0000, 0x06FE,0x0000,0x0000, -0x06FF,0x0000,0x0000, 0x0700,0x0000,0x0000, 0x0701,0x0000,0x0000, -0x0702,0x0000,0x0000, 0x0703,0x0000,0x0000, 0x0704,0x0000,0x0000, -0x0705,0x0000,0x0000, 0x0706,0x0000,0x0000, 0x0707,0x0000,0x0000, -0x0708,0x0000,0x0000, 0x0709,0x0000,0x0000, 0x070A,0x0000,0x0000, -0x070B,0x0000,0x0000, 0x070C,0x0000,0x0000, 0x070D,0x0000,0x0000, -0x070E,0x0000,0x0000, 0x070F,0x0000,0x0000, 0x0710,0x0000,0x0000, -0x0711,0x0000,0x0000, 0x0712,0x0000,0x0000, 0x0713,0x0000,0x0000, -0xFBC0,0xA618,0x0000, 0x0714,0x0000,0x0000, 0x0715,0x0000,0x0000, -0x0716,0x0000,0x0000, 0x0717,0x0000,0x0000, 0x0718,0x0000,0x0000, -0x0719,0x0000,0x0000, 0x071A,0x0000,0x0000, 0x071B,0x0000,0x0000, -0x071C,0x0000,0x0000, 0x071D,0x0000,0x0000, 0x071E,0x0000,0x0000, -0x071F,0x0000,0x0000, 0x0720,0x0000,0x0000, 0x0721,0x0000,0x0000, -0x0722,0x0000,0x0000, 0x0723,0x0000,0x0000, 0x0724,0x0000,0x0000, -0x0725,0x0000,0x0000, 0x0726,0x0000,0x0000, 0x0727,0x0000,0x0000, -0x0728,0x0000,0x0000, 0x0729,0x0000,0x0000, 0x072A,0x0000,0x0000, -0x0B2F,0x0000,0x0000, 0x0B30,0x0000,0x0000, 0x0B31,0x0000,0x0000, -0x0B32,0x0000,0x0000, 0x0B33,0x0000,0x0000, 0x0B34,0x0000,0x0000, -0x0B35,0x0000,0x0000, 0x0B36,0x0000,0x0000, 0x072B,0x0000,0x0000, -0x072C,0x0000,0x0000, 0x072D,0x0000,0x0000, 0x072E,0x0000,0x0000, -0x072F,0x0000,0x0000, 0x0730,0x0000,0x0000, 0x0731,0x0000,0x0000, -0x0732,0x0000,0x0000, 0x0733,0x0000,0x0000, 0x0734,0x0000,0x0000, -0x0735,0x0000,0x0000, 0x0736,0x0000,0x0000, 0x0737,0x0000,0x0000, -0x0738,0x0000,0x0000, 0x0739,0x0000,0x0000, 0x073A,0x0000,0x0000, -0x073B,0x0000,0x0000, 0x073C,0x0000,0x0000, 0x073D,0x0000,0x0000, -0x073E,0x0000,0x0000, 0x073F,0x0000,0x0000, 0x0740,0x0000,0x0000, -0x0741,0x0000,0x0000, 0x0742,0x0000,0x0000, 0x0743,0x0000,0x0000, -0x0744,0x0000,0x0000, 0x0745,0x0000,0x0000, 0x0746,0x0000,0x0000, -0x0747,0x0000,0x0000, 0x0748,0x0000,0x0000, 0x0749,0x0000,0x0000, -0x074A,0x0000,0x0000, 0x074B,0x0000,0x0000, 0x074C,0x0000,0x0000, -0x074D,0x0000,0x0000, 0x074E,0x0000,0x0000, 0x074F,0x0000,0x0000, -0x0750,0x0000,0x0000, 0x0751,0x0000,0x0000, 0x0752,0x0000,0x0000, -0x0753,0x0000,0x0000, 0x0754,0x0000,0x0000, 0x0755,0x0000,0x0000, -0x0756,0x0000,0x0000, 0x0757,0x0000,0x0000, 0x0758,0x0000,0x0000, -0x0759,0x0000,0x0000, 0x075A,0x0000,0x0000, 0x075B,0x0000,0x0000, -0x075C,0x0000,0x0000, 0x075D,0x0000,0x0000, 0x075E,0x0000,0x0000, -0x075F,0x0000,0x0000, 0x0D2B,0x0000,0x0000, 0x0D2C,0x0000,0x0000, -0x0D2D,0x0000,0x0000, 0x0760,0x0000,0x0000, 0x0761,0x0000,0x0000, -0x0762,0x0000,0x0000, 0x0763,0x0000,0x0000, 0x0764,0x0000,0x0000, -0x0765,0x0000,0x0000, 0x0766,0x0000,0x0000, 0x0767,0x0000,0x0000, -0x0768,0x0000,0x0000, 0x0769,0x0000,0x0000, 0x076A,0x0000,0x0000, -0x076B,0x0000,0x0000, 0x076C,0x0000,0x0000, 0x076D,0x0000,0x0000, -0xFBC0,0xA67E,0x0000, 0xFBC0,0xA67F,0x0000, 0x076E,0x0000,0x0000, -0x076F,0x0000,0x0000, 0x0770,0x0000,0x0000, 0x0771,0x0000,0x0000, -0x0772,0x0000,0x0000, 0x0773,0x0000,0x0000, 0x0774,0x0000,0x0000, -0x0775,0x0000,0x0000, 0x0776,0x0000,0x0000, 0x0777,0x0000,0x0000, -0x0B29,0x0000,0x0000, 0x0B2A,0x0000,0x0000, 0x0B2B,0x0000,0x0000, -0x0B2C,0x0000,0x0000, 0x0B2D,0x0000,0x0000, 0x0B2E,0x0000,0x0000, -0x0778,0x0000,0x0000, 0x0779,0x0000,0x0000, 0xFBC0,0xA692,0x0000, -0xFBC0,0xA693,0x0000, 0xFBC0,0xA694,0x0000, 0xFBC0,0xA695,0x0000, -0xFBC0,0xA696,0x0000, 0xFBC0,0xA697,0x0000, 0xFBC0,0xA698,0x0000, -0xFBC0,0xA699,0x0000, 0xFBC0,0xA69A,0x0000, 0xFBC0,0xA69B,0x0000, -0xFBC0,0xA69C,0x0000, 0xFBC0,0xA69D,0x0000, 0xFBC0,0xA69E,0x0000, -0xFBC0,0xA69F,0x0000, 0x077A,0x0000,0x0000, 0x077B,0x0000,0x0000, -0xFBC0,0xA6A2,0x0000, 0xFBC0,0xA6A3,0x0000, 0xFBC0,0xA6A4,0x0000, -0xFBC0,0xA6A5,0x0000, 0xFBC0,0xA6A6,0x0000, 0xFBC0,0xA6A7,0x0000, -0xFBC0,0xA6A8,0x0000, 0xFBC0,0xA6A9,0x0000, 0xFBC0,0xA6AA,0x0000, -0xFBC0,0xA6AB,0x0000, 0xFBC0,0xA6AC,0x0000, 0xFBC0,0xA6AD,0x0000, -0xFBC0,0xA6AE,0x0000, 0xFBC0,0xA6AF,0x0000, 0xFBC0,0xA6B0,0x0000, -0xFBC0,0xA6B1,0x0000, 0xFBC0,0xA6B2,0x0000, 0xFBC0,0xA6B3,0x0000, -0xFBC0,0xA6B4,0x0000, 0xFBC0,0xA6B5,0x0000, 0xFBC0,0xA6B6,0x0000, -0xFBC0,0xA6B7,0x0000, 0xFBC0,0xA6B8,0x0000, 0xFBC0,0xA6B9,0x0000, -0xFBC0,0xA6BA,0x0000, 0xFBC0,0xA6BB,0x0000, 0xFBC0,0xA6BC,0x0000, -0xFBC0,0xA6BD,0x0000, 0xFBC0,0xA6BE,0x0000, 0xFBC0,0xA6BF,0x0000, -0xFBC0,0xA6C0,0x0000, 0xFBC0,0xA6C1,0x0000, 0xFBC0,0xA6C2,0x0000, -0xFBC0,0xA6C3,0x0000, 0xFBC0,0xA6C4,0x0000, 0xFBC0,0xA6C5,0x0000, -0xFBC0,0xA6C6,0x0000, 0xFBC0,0xA6C7,0x0000, 0xFBC0,0xA6C8,0x0000, -0xFBC0,0xA6C9,0x0000, 0xFBC0,0xA6CA,0x0000, 0xFBC0,0xA6CB,0x0000, -0xFBC0,0xA6CC,0x0000, 0xFBC0,0xA6CD,0x0000, 0xFBC0,0xA6CE,0x0000, -0xFBC0,0xA6CF,0x0000, 0xFBC0,0xA6D0,0x0000, 0xFBC0,0xA6D1,0x0000, -0xFBC0,0xA6D2,0x0000, 0xFBC0,0xA6D3,0x0000, 0xFBC0,0xA6D4,0x0000, -0xFBC0,0xA6D5,0x0000, 0xFBC0,0xA6D6,0x0000, 0xFBC0,0xA6D7,0x0000, -0xFBC0,0xA6D8,0x0000, 0xFBC0,0xA6D9,0x0000, 0xFBC0,0xA6DA,0x0000, -0xFBC0,0xA6DB,0x0000, 0xFBC0,0xA6DC,0x0000, 0xFBC0,0xA6DD,0x0000, -0xFBC0,0xA6DE,0x0000, 0xFBC0,0xA6DF,0x0000, 0xFBC0,0xA6E0,0x0000, -0xFBC0,0xA6E1,0x0000, 0xFBC0,0xA6E2,0x0000, 0xFBC0,0xA6E3,0x0000, -0xFBC0,0xA6E4,0x0000, 0xFBC0,0xA6E5,0x0000, 0xFBC0,0xA6E6,0x0000, -0xFBC0,0xA6E7,0x0000, 0xFBC0,0xA6E8,0x0000, 0xFBC0,0xA6E9,0x0000, -0xFBC0,0xA6EA,0x0000, 0xFBC0,0xA6EB,0x0000, 0xFBC0,0xA6EC,0x0000, -0xFBC0,0xA6ED,0x0000, 0xFBC0,0xA6EE,0x0000, 0xFBC0,0xA6EF,0x0000, -0xFBC0,0xA6F0,0x0000, 0xFBC0,0xA6F1,0x0000, 0xFBC0,0xA6F2,0x0000, -0xFBC0,0xA6F3,0x0000, 0xFBC0,0xA6F4,0x0000, 0xFBC0,0xA6F5,0x0000, -0xFBC0,0xA6F6,0x0000, 0xFBC0,0xA6F7,0x0000, 0xFBC0,0xA6F8,0x0000, -0xFBC0,0xA6F9,0x0000, 0xFBC0,0xA6FA,0x0000, 0xFBC0,0xA6FB,0x0000, -0xFBC0,0xA6FC,0x0000, 0xFBC0,0xA6FD,0x0000, 0xFBC0,0xA6FE,0x0000, -0xFBC0,0xA6FF,0x0000 }; - -uint16 page027data[]= { /* 2700 (3 weights per char) */ -0xFBC0,0xA700,0x0000, 0x077C,0x0000,0x0000, 0x077D,0x0000,0x0000, -0x077E,0x0000,0x0000, 0x077F,0x0000,0x0000, 0xFBC0,0xA705,0x0000, -0x0780,0x0000,0x0000, 0x0781,0x0000,0x0000, 0x0782,0x0000,0x0000, -0x0783,0x0000,0x0000, 0xFBC0,0xA70A,0x0000, 0xFBC0,0xA70B,0x0000, -0x0784,0x0000,0x0000, 0x0785,0x0000,0x0000, 0x0786,0x0000,0x0000, -0x0787,0x0000,0x0000, 0x0788,0x0000,0x0000, 0x0789,0x0000,0x0000, -0x078A,0x0000,0x0000, 0x078B,0x0000,0x0000, 0x078C,0x0000,0x0000, -0x078D,0x0000,0x0000, 0x078E,0x0000,0x0000, 0x078F,0x0000,0x0000, -0x0790,0x0000,0x0000, 0x0791,0x0000,0x0000, 0x0792,0x0000,0x0000, -0x0793,0x0000,0x0000, 0x0794,0x0000,0x0000, 0x0795,0x0000,0x0000, -0x0796,0x0000,0x0000, 0x0797,0x0000,0x0000, 0x0798,0x0000,0x0000, -0x0799,0x0000,0x0000, 0x079A,0x0000,0x0000, 0x079B,0x0000,0x0000, -0x079C,0x0000,0x0000, 0x079D,0x0000,0x0000, 0x079E,0x0000,0x0000, -0x079F,0x0000,0x0000, 0xFBC0,0xA728,0x0000, 0x07A0,0x0000,0x0000, -0x07A1,0x0000,0x0000, 0x07A2,0x0000,0x0000, 0x07A3,0x0000,0x0000, -0x07A4,0x0000,0x0000, 0x07A5,0x0000,0x0000, 0x07A6,0x0000,0x0000, -0x07A7,0x0000,0x0000, 0x07A8,0x0000,0x0000, 0x07A9,0x0000,0x0000, -0x07AA,0x0000,0x0000, 0x07AB,0x0000,0x0000, 0x07AC,0x0000,0x0000, -0x07AD,0x0000,0x0000, 0x07AE,0x0000,0x0000, 0x07AF,0x0000,0x0000, -0x07B0,0x0000,0x0000, 0x07B1,0x0000,0x0000, 0x07B2,0x0000,0x0000, -0x07B3,0x0000,0x0000, 0x07B4,0x0000,0x0000, 0x07B5,0x0000,0x0000, -0x07B6,0x0000,0x0000, 0x07B7,0x0000,0x0000, 0x07B8,0x0000,0x0000, -0x07B9,0x0000,0x0000, 0x07BA,0x0000,0x0000, 0x07BB,0x0000,0x0000, -0x07BC,0x0000,0x0000, 0x07BD,0x0000,0x0000, 0x07BE,0x0000,0x0000, -0x07BF,0x0000,0x0000, 0x07C0,0x0000,0x0000, 0x07C1,0x0000,0x0000, -0x07C2,0x0000,0x0000, 0xFBC0,0xA74C,0x0000, 0x07C3,0x0000,0x0000, -0xFBC0,0xA74E,0x0000, 0x07C4,0x0000,0x0000, 0x07C5,0x0000,0x0000, -0x07C6,0x0000,0x0000, 0x07C7,0x0000,0x0000, 0xFBC0,0xA753,0x0000, -0xFBC0,0xA754,0x0000, 0xFBC0,0xA755,0x0000, 0x07C8,0x0000,0x0000, -0xFBC0,0xA757,0x0000, 0x07C9,0x0000,0x0000, 0x07CA,0x0000,0x0000, -0x07CB,0x0000,0x0000, 0x07CC,0x0000,0x0000, 0x07CD,0x0000,0x0000, -0x07CE,0x0000,0x0000, 0x07CF,0x0000,0x0000, 0xFBC0,0xA75F,0x0000, -0xFBC0,0xA760,0x0000, 0x07D0,0x0000,0x0000, 0x07D1,0x0000,0x0000, -0x07D2,0x0000,0x0000, 0x07D3,0x0000,0x0000, 0x07D4,0x0000,0x0000, -0x07D5,0x0000,0x0000, 0x07D6,0x0000,0x0000, 0x07D7,0x0000,0x0000, -0x07D8,0x0000,0x0000, 0x07D9,0x0000,0x0000, 0x07DA,0x0000,0x0000, -0x07DB,0x0000,0x0000, 0x07DC,0x0000,0x0000, 0x07DD,0x0000,0x0000, -0x07DE,0x0000,0x0000, 0x07DF,0x0000,0x0000, 0x07E0,0x0000,0x0000, -0x07E1,0x0000,0x0000, 0x07E2,0x0000,0x0000, 0x07E3,0x0000,0x0000, -0x07E4,0x0000,0x0000, 0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, -0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, -0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, -0x0E32,0x0000,0x0000, 0x0E2A,0x0E29,0x0000, 0x0E2A,0x0000,0x0000, -0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, -0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, -0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, 0x0E2A,0x0E29,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0x0E2A,0x0E29,0x0000, 0x07E5,0x0000,0x0000, 0xFBC0,0xA795,0x0000, -0xFBC0,0xA796,0x0000, 0xFBC0,0xA797,0x0000, 0x07E6,0x0000,0x0000, -0x07E7,0x0000,0x0000, 0x07E8,0x0000,0x0000, 0x07E9,0x0000,0x0000, -0x07EA,0x0000,0x0000, 0x07EB,0x0000,0x0000, 0x07EC,0x0000,0x0000, -0x07ED,0x0000,0x0000, 0x07EE,0x0000,0x0000, 0x07EF,0x0000,0x0000, -0x07F0,0x0000,0x0000, 0x07F1,0x0000,0x0000, 0x07F2,0x0000,0x0000, -0x07F3,0x0000,0x0000, 0x07F4,0x0000,0x0000, 0x07F5,0x0000,0x0000, -0x07F6,0x0000,0x0000, 0x07F7,0x0000,0x0000, 0x07F8,0x0000,0x0000, -0x07F9,0x0000,0x0000, 0x07FA,0x0000,0x0000, 0x07FB,0x0000,0x0000, -0x07FC,0x0000,0x0000, 0x07FD,0x0000,0x0000, 0xFBC0,0xA7B0,0x0000, -0x07FE,0x0000,0x0000, 0x07FF,0x0000,0x0000, 0x0800,0x0000,0x0000, -0x0801,0x0000,0x0000, 0x0802,0x0000,0x0000, 0x0803,0x0000,0x0000, -0x0804,0x0000,0x0000, 0x0805,0x0000,0x0000, 0x0806,0x0000,0x0000, -0x0807,0x0000,0x0000, 0x0808,0x0000,0x0000, 0x0809,0x0000,0x0000, -0x080A,0x0000,0x0000, 0x080B,0x0000,0x0000, 0xFBC0,0xA7BF,0x0000, -0xFBC0,0xA7C0,0x0000, 0xFBC0,0xA7C1,0x0000, 0xFBC0,0xA7C2,0x0000, -0xFBC0,0xA7C3,0x0000, 0xFBC0,0xA7C4,0x0000, 0xFBC0,0xA7C5,0x0000, -0xFBC0,0xA7C6,0x0000, 0xFBC0,0xA7C7,0x0000, 0xFBC0,0xA7C8,0x0000, -0xFBC0,0xA7C9,0x0000, 0xFBC0,0xA7CA,0x0000, 0xFBC0,0xA7CB,0x0000, -0xFBC0,0xA7CC,0x0000, 0xFBC0,0xA7CD,0x0000, 0xFBC0,0xA7CE,0x0000, -0xFBC0,0xA7CF,0x0000, 0x080C,0x0000,0x0000, 0x080D,0x0000,0x0000, -0x080E,0x0000,0x0000, 0x080F,0x0000,0x0000, 0x0810,0x0000,0x0000, -0x0811,0x0000,0x0000, 0x0812,0x0000,0x0000, 0x0813,0x0000,0x0000, -0x0814,0x0000,0x0000, 0x0815,0x0000,0x0000, 0x0816,0x0000,0x0000, -0x0817,0x0000,0x0000, 0x0818,0x0000,0x0000, 0x0819,0x0000,0x0000, -0x081A,0x0000,0x0000, 0x081B,0x0000,0x0000, 0x081C,0x0000,0x0000, -0x081D,0x0000,0x0000, 0x081E,0x0000,0x0000, 0x081F,0x0000,0x0000, -0x0820,0x0000,0x0000, 0x0821,0x0000,0x0000, 0x0822,0x0000,0x0000, -0x0823,0x0000,0x0000, 0x0824,0x0000,0x0000, 0x0825,0x0000,0x0000, -0x0826,0x0000,0x0000, 0x0827,0x0000,0x0000, 0xFBC0,0xA7EC,0x0000, -0xFBC0,0xA7ED,0x0000, 0xFBC0,0xA7EE,0x0000, 0xFBC0,0xA7EF,0x0000, -0x0828,0x0000,0x0000, 0x0829,0x0000,0x0000, 0x082A,0x0000,0x0000, -0x082B,0x0000,0x0000, 0x082C,0x0000,0x0000, 0x082D,0x0000,0x0000, -0x082E,0x0000,0x0000, 0x082F,0x0000,0x0000, 0x0830,0x0000,0x0000, -0x0831,0x0000,0x0000, 0x0832,0x0000,0x0000, 0x0833,0x0000,0x0000, -0x0834,0x0000,0x0000, 0x0835,0x0000,0x0000, 0x0836,0x0000,0x0000, -0x0837,0x0000,0x0000 }; - -uint16 page028data[]= { /* 2800 (2 weights per char) */ -0x0A29,0x0000, 0x0A2A,0x0000, 0x0A2B,0x0000, 0x0A2C,0x0000, -0x0A2D,0x0000, 0x0A2E,0x0000, 0x0A2F,0x0000, 0x0A30,0x0000, -0x0A31,0x0000, 0x0A32,0x0000, 0x0A33,0x0000, 0x0A34,0x0000, -0x0A35,0x0000, 0x0A36,0x0000, 0x0A37,0x0000, 0x0A38,0x0000, -0x0A39,0x0000, 0x0A3A,0x0000, 0x0A3B,0x0000, 0x0A3C,0x0000, -0x0A3D,0x0000, 0x0A3E,0x0000, 0x0A3F,0x0000, 0x0A40,0x0000, -0x0A41,0x0000, 0x0A42,0x0000, 0x0A43,0x0000, 0x0A44,0x0000, -0x0A45,0x0000, 0x0A46,0x0000, 0x0A47,0x0000, 0x0A48,0x0000, -0x0A49,0x0000, 0x0A4A,0x0000, 0x0A4B,0x0000, 0x0A4C,0x0000, -0x0A4D,0x0000, 0x0A4E,0x0000, 0x0A4F,0x0000, 0x0A50,0x0000, -0x0A51,0x0000, 0x0A52,0x0000, 0x0A53,0x0000, 0x0A54,0x0000, -0x0A55,0x0000, 0x0A56,0x0000, 0x0A57,0x0000, 0x0A58,0x0000, -0x0A59,0x0000, 0x0A5A,0x0000, 0x0A5B,0x0000, 0x0A5C,0x0000, -0x0A5D,0x0000, 0x0A5E,0x0000, 0x0A5F,0x0000, 0x0A60,0x0000, -0x0A61,0x0000, 0x0A62,0x0000, 0x0A63,0x0000, 0x0A64,0x0000, -0x0A65,0x0000, 0x0A66,0x0000, 0x0A67,0x0000, 0x0A68,0x0000, -0x0A69,0x0000, 0x0A6A,0x0000, 0x0A6B,0x0000, 0x0A6C,0x0000, -0x0A6D,0x0000, 0x0A6E,0x0000, 0x0A6F,0x0000, 0x0A70,0x0000, -0x0A71,0x0000, 0x0A72,0x0000, 0x0A73,0x0000, 0x0A74,0x0000, -0x0A75,0x0000, 0x0A76,0x0000, 0x0A77,0x0000, 0x0A78,0x0000, -0x0A79,0x0000, 0x0A7A,0x0000, 0x0A7B,0x0000, 0x0A7C,0x0000, -0x0A7D,0x0000, 0x0A7E,0x0000, 0x0A7F,0x0000, 0x0A80,0x0000, -0x0A81,0x0000, 0x0A82,0x0000, 0x0A83,0x0000, 0x0A84,0x0000, -0x0A85,0x0000, 0x0A86,0x0000, 0x0A87,0x0000, 0x0A88,0x0000, -0x0A89,0x0000, 0x0A8A,0x0000, 0x0A8B,0x0000, 0x0A8C,0x0000, -0x0A8D,0x0000, 0x0A8E,0x0000, 0x0A8F,0x0000, 0x0A90,0x0000, -0x0A91,0x0000, 0x0A92,0x0000, 0x0A93,0x0000, 0x0A94,0x0000, -0x0A95,0x0000, 0x0A96,0x0000, 0x0A97,0x0000, 0x0A98,0x0000, -0x0A99,0x0000, 0x0A9A,0x0000, 0x0A9B,0x0000, 0x0A9C,0x0000, -0x0A9D,0x0000, 0x0A9E,0x0000, 0x0A9F,0x0000, 0x0AA0,0x0000, -0x0AA1,0x0000, 0x0AA2,0x0000, 0x0AA3,0x0000, 0x0AA4,0x0000, -0x0AA5,0x0000, 0x0AA6,0x0000, 0x0AA7,0x0000, 0x0AA8,0x0000, -0x0AA9,0x0000, 0x0AAA,0x0000, 0x0AAB,0x0000, 0x0AAC,0x0000, -0x0AAD,0x0000, 0x0AAE,0x0000, 0x0AAF,0x0000, 0x0AB0,0x0000, -0x0AB1,0x0000, 0x0AB2,0x0000, 0x0AB3,0x0000, 0x0AB4,0x0000, -0x0AB5,0x0000, 0x0AB6,0x0000, 0x0AB7,0x0000, 0x0AB8,0x0000, -0x0AB9,0x0000, 0x0ABA,0x0000, 0x0ABB,0x0000, 0x0ABC,0x0000, -0x0ABD,0x0000, 0x0ABE,0x0000, 0x0ABF,0x0000, 0x0AC0,0x0000, -0x0AC1,0x0000, 0x0AC2,0x0000, 0x0AC3,0x0000, 0x0AC4,0x0000, -0x0AC5,0x0000, 0x0AC6,0x0000, 0x0AC7,0x0000, 0x0AC8,0x0000, -0x0AC9,0x0000, 0x0ACA,0x0000, 0x0ACB,0x0000, 0x0ACC,0x0000, -0x0ACD,0x0000, 0x0ACE,0x0000, 0x0ACF,0x0000, 0x0AD0,0x0000, -0x0AD1,0x0000, 0x0AD2,0x0000, 0x0AD3,0x0000, 0x0AD4,0x0000, -0x0AD5,0x0000, 0x0AD6,0x0000, 0x0AD7,0x0000, 0x0AD8,0x0000, -0x0AD9,0x0000, 0x0ADA,0x0000, 0x0ADB,0x0000, 0x0ADC,0x0000, -0x0ADD,0x0000, 0x0ADE,0x0000, 0x0ADF,0x0000, 0x0AE0,0x0000, -0x0AE1,0x0000, 0x0AE2,0x0000, 0x0AE3,0x0000, 0x0AE4,0x0000, -0x0AE5,0x0000, 0x0AE6,0x0000, 0x0AE7,0x0000, 0x0AE8,0x0000, -0x0AE9,0x0000, 0x0AEA,0x0000, 0x0AEB,0x0000, 0x0AEC,0x0000, -0x0AED,0x0000, 0x0AEE,0x0000, 0x0AEF,0x0000, 0x0AF0,0x0000, -0x0AF1,0x0000, 0x0AF2,0x0000, 0x0AF3,0x0000, 0x0AF4,0x0000, -0x0AF5,0x0000, 0x0AF6,0x0000, 0x0AF7,0x0000, 0x0AF8,0x0000, -0x0AF9,0x0000, 0x0AFA,0x0000, 0x0AFB,0x0000, 0x0AFC,0x0000, -0x0AFD,0x0000, 0x0AFE,0x0000, 0x0AFF,0x0000, 0x0B00,0x0000, -0x0B01,0x0000, 0x0B02,0x0000, 0x0B03,0x0000, 0x0B04,0x0000, -0x0B05,0x0000, 0x0B06,0x0000, 0x0B07,0x0000, 0x0B08,0x0000, -0x0B09,0x0000, 0x0B0A,0x0000, 0x0B0B,0x0000, 0x0B0C,0x0000, -0x0B0D,0x0000, 0x0B0E,0x0000, 0x0B0F,0x0000, 0x0B10,0x0000, -0x0B11,0x0000, 0x0B12,0x0000, 0x0B13,0x0000, 0x0B14,0x0000, -0x0B15,0x0000, 0x0B16,0x0000, 0x0B17,0x0000, 0x0B18,0x0000, -0x0B19,0x0000, 0x0B1A,0x0000, 0x0B1B,0x0000, 0x0B1C,0x0000, -0x0B1D,0x0000, 0x0B1E,0x0000, 0x0B1F,0x0000, 0x0B20,0x0000, -0x0B21,0x0000, 0x0B22,0x0000, 0x0B23,0x0000, 0x0B24,0x0000, -0x0B25,0x0000, 0x0B26,0x0000, 0x0B27,0x0000, 0x0B28,0x0000 -}; - -uint16 page029data[]= { /* 2900 (2 weights per char) */ -0x0838,0x0000, 0x0839,0x0000, 0x083A,0x0000, 0x083B,0x0000, -0x083C,0x0000, 0x083D,0x0000, 0x083E,0x0000, 0x083F,0x0000, -0x0840,0x0000, 0x0841,0x0000, 0x0842,0x0000, 0x0843,0x0000, -0x0844,0x0000, 0x0845,0x0000, 0x0846,0x0000, 0x0847,0x0000, -0x0848,0x0000, 0x0849,0x0000, 0x084A,0x0000, 0x084B,0x0000, -0x084C,0x0000, 0x084D,0x0000, 0x084E,0x0000, 0x084F,0x0000, -0x0850,0x0000, 0x0851,0x0000, 0x0852,0x0000, 0x0853,0x0000, -0x0854,0x0000, 0x0855,0x0000, 0x0856,0x0000, 0x0857,0x0000, -0x0858,0x0000, 0x0859,0x0000, 0x085A,0x0000, 0x085B,0x0000, -0x085C,0x0000, 0x085D,0x0000, 0x085E,0x0000, 0x085F,0x0000, -0x0860,0x0000, 0x0861,0x0000, 0x0862,0x0000, 0x0863,0x0000, -0x0864,0x0000, 0x0865,0x0000, 0x0866,0x0000, 0x0867,0x0000, -0x0868,0x0000, 0x0869,0x0000, 0x086A,0x0000, 0x086B,0x0000, -0x086C,0x0000, 0x086D,0x0000, 0x086E,0x0000, 0x086F,0x0000, -0x0870,0x0000, 0x0871,0x0000, 0x0872,0x0000, 0x0873,0x0000, -0x0874,0x0000, 0x0875,0x0000, 0x0876,0x0000, 0x0877,0x0000, -0x0878,0x0000, 0x0879,0x0000, 0x087A,0x0000, 0x087B,0x0000, -0x087C,0x0000, 0x087D,0x0000, 0x087E,0x0000, 0x087F,0x0000, -0x0880,0x0000, 0x0881,0x0000, 0x0882,0x0000, 0x0883,0x0000, -0x0884,0x0000, 0x0885,0x0000, 0x0886,0x0000, 0x0887,0x0000, -0x0888,0x0000, 0x0889,0x0000, 0x088A,0x0000, 0x088B,0x0000, -0x088C,0x0000, 0x088D,0x0000, 0x088E,0x0000, 0x088F,0x0000, -0x0890,0x0000, 0x0891,0x0000, 0x0892,0x0000, 0x0893,0x0000, -0x0894,0x0000, 0x0895,0x0000, 0x0896,0x0000, 0x0897,0x0000, -0x0898,0x0000, 0x0899,0x0000, 0x089A,0x0000, 0x089B,0x0000, -0x089C,0x0000, 0x089D,0x0000, 0x089E,0x0000, 0x089F,0x0000, -0x08A0,0x0000, 0x08A1,0x0000, 0x08A2,0x0000, 0x08A3,0x0000, -0x08A4,0x0000, 0x08A5,0x0000, 0x08A6,0x0000, 0x08A7,0x0000, -0x08A8,0x0000, 0x08A9,0x0000, 0x08AA,0x0000, 0x08AB,0x0000, -0x08AC,0x0000, 0x08AD,0x0000, 0x08AE,0x0000, 0x08AF,0x0000, -0x08B0,0x0000, 0x08B1,0x0000, 0x08B2,0x0000, 0x08B3,0x0000, -0x08B4,0x0000, 0x08B5,0x0000, 0x08B6,0x0000, 0x08B7,0x0000, -0x08B8,0x0000, 0x08B9,0x0000, 0x08BA,0x0000, 0x0298,0x0000, -0x0299,0x0000, 0x029A,0x0000, 0x029B,0x0000, 0x029C,0x0000, -0x029D,0x0000, 0x029E,0x0000, 0x029F,0x0000, 0x02A0,0x0000, -0x02A1,0x0000, 0x02A2,0x0000, 0x02A3,0x0000, 0x02A4,0x0000, -0x02A5,0x0000, 0x02A6,0x0000, 0x02A7,0x0000, 0x02A8,0x0000, -0x02A9,0x0000, 0x02AA,0x0000, 0x02AB,0x0000, 0x02AC,0x0000, -0x02AD,0x0000, 0x08BB,0x0000, 0x08BC,0x0000, 0x08BD,0x0000, -0x08BE,0x0000, 0x08BF,0x0000, 0x08C0,0x0000, 0x08C1,0x0000, -0x08C2,0x0000, 0x08C3,0x0000, 0x08C4,0x0000, 0x08C5,0x0000, -0x08C6,0x0000, 0x08C7,0x0000, 0x08C8,0x0000, 0x08C9,0x0000, -0x08CA,0x0000, 0x08CB,0x0000, 0x08CC,0x0000, 0x08CD,0x0000, -0x08CE,0x0000, 0x08CF,0x0000, 0x08D0,0x0000, 0x08D1,0x0000, -0x08D2,0x0000, 0x08D3,0x0000, 0x08D4,0x0000, 0x08D5,0x0000, -0x08D6,0x0000, 0x08D7,0x0000, 0x08D8,0x0000, 0x08D9,0x0000, -0x08DA,0x0000, 0x08DB,0x0000, 0x08DC,0x0000, 0x08DD,0x0000, -0x08DE,0x0000, 0x08DF,0x0000, 0x08E0,0x0000, 0x08E1,0x0000, -0x08E2,0x0000, 0x08E3,0x0000, 0x08E4,0x0000, 0x08E5,0x0000, -0x08E6,0x0000, 0x08E7,0x0000, 0x08E8,0x0000, 0x08E9,0x0000, -0x08EA,0x0000, 0x08EB,0x0000, 0x08EC,0x0000, 0x08ED,0x0000, -0x08EE,0x0000, 0x08EF,0x0000, 0x08F0,0x0000, 0x08F1,0x0000, -0x08F2,0x0000, 0x08F3,0x0000, 0x08F4,0x0000, 0x08F5,0x0000, -0x08F6,0x0000, 0x08F7,0x0000, 0x08F8,0x0000, 0x08F9,0x0000, -0x08FA,0x0000, 0x08FB,0x0000, 0x08FC,0x0000, 0x08FD,0x0000, -0x08FE,0x0000, 0x08FF,0x0000, 0x0900,0x0000, 0x0901,0x0000, -0x0902,0x0000, 0x0903,0x0000, 0x0904,0x0000, 0x0905,0x0000, -0x0906,0x0000, 0x0907,0x0000, 0x0908,0x0000, 0x0909,0x0000, -0x090A,0x0000, 0x090B,0x0000, 0x090C,0x0000, 0x090D,0x0000, -0x090E,0x0000, 0x090F,0x0000, 0x0910,0x0000, 0x0911,0x0000, -0x0912,0x0000, 0x0913,0x0000, 0x0914,0x0000, 0x0915,0x0000, -0x0916,0x0000, 0x0917,0x0000, 0x0918,0x0000, 0x0919,0x0000, -0x091A,0x0000, 0x091B,0x0000, 0x091C,0x0000, 0x091D,0x0000, -0x0296,0x0000, 0x0297,0x0000, 0x091E,0x0000, 0x091F,0x0000 -}; - -uint16 page02Adata[]= { /* 2A00 (5 weights per char) */ -0x0920,0x0000,0x0000,0x0000,0x0000, -0x0921,0x0000,0x0000,0x0000,0x0000, -0x0922,0x0000,0x0000,0x0000,0x0000, -0x0923,0x0000,0x0000,0x0000,0x0000, -0x0924,0x0000,0x0000,0x0000,0x0000, -0x0925,0x0000,0x0000,0x0000,0x0000, -0x0926,0x0000,0x0000,0x0000,0x0000, -0x0927,0x0000,0x0000,0x0000,0x0000, -0x0928,0x0000,0x0000,0x0000,0x0000, -0x0929,0x0000,0x0000,0x0000,0x0000, -0x092A,0x0000,0x0000,0x0000,0x0000, -0x092B,0x0000,0x0000,0x0000,0x0000, -0x044B,0x044B,0x044B,0x044B,0x0000, -0x092C,0x0000,0x0000,0x0000,0x0000, -0x092D,0x0000,0x0000,0x0000,0x0000, -0x092E,0x0000,0x0000,0x0000,0x0000, -0x092F,0x0000,0x0000,0x0000,0x0000, -0x0930,0x0000,0x0000,0x0000,0x0000, -0x0931,0x0000,0x0000,0x0000,0x0000, -0x0932,0x0000,0x0000,0x0000,0x0000, -0x0933,0x0000,0x0000,0x0000,0x0000, -0x0934,0x0000,0x0000,0x0000,0x0000, -0x0935,0x0000,0x0000,0x0000,0x0000, -0x0936,0x0000,0x0000,0x0000,0x0000, -0x0937,0x0000,0x0000,0x0000,0x0000, -0x0938,0x0000,0x0000,0x0000,0x0000, -0x0939,0x0000,0x0000,0x0000,0x0000, -0x093A,0x0000,0x0000,0x0000,0x0000, -0x093B,0x0000,0x0000,0x0000,0x0000, -0x093C,0x0000,0x0000,0x0000,0x0000, -0x093D,0x0000,0x0000,0x0000,0x0000, -0x093E,0x0000,0x0000,0x0000,0x0000, -0x093F,0x0000,0x0000,0x0000,0x0000, -0x0940,0x0000,0x0000,0x0000,0x0000, -0x0941,0x0000,0x0000,0x0000,0x0000, -0x0942,0x0000,0x0000,0x0000,0x0000, -0x0943,0x0000,0x0000,0x0000,0x0000, -0x0944,0x0000,0x0000,0x0000,0x0000, -0x0945,0x0000,0x0000,0x0000,0x0000, -0x0946,0x0000,0x0000,0x0000,0x0000, -0x0947,0x0000,0x0000,0x0000,0x0000, -0x0948,0x0000,0x0000,0x0000,0x0000, -0x0949,0x0000,0x0000,0x0000,0x0000, -0x094A,0x0000,0x0000,0x0000,0x0000, -0x094B,0x0000,0x0000,0x0000,0x0000, -0x094C,0x0000,0x0000,0x0000,0x0000, -0x094D,0x0000,0x0000,0x0000,0x0000, -0x094E,0x0000,0x0000,0x0000,0x0000, -0x094F,0x0000,0x0000,0x0000,0x0000, -0x0950,0x0000,0x0000,0x0000,0x0000, -0x0951,0x0000,0x0000,0x0000,0x0000, -0x0952,0x0000,0x0000,0x0000,0x0000, -0x0953,0x0000,0x0000,0x0000,0x0000, -0x0954,0x0000,0x0000,0x0000,0x0000, -0x0955,0x0000,0x0000,0x0000,0x0000, -0x0956,0x0000,0x0000,0x0000,0x0000, -0x0957,0x0000,0x0000,0x0000,0x0000, -0x0958,0x0000,0x0000,0x0000,0x0000, -0x0959,0x0000,0x0000,0x0000,0x0000, -0x095A,0x0000,0x0000,0x0000,0x0000, -0x095B,0x0000,0x0000,0x0000,0x0000, -0x095C,0x0000,0x0000,0x0000,0x0000, -0x095D,0x0000,0x0000,0x0000,0x0000, -0x095E,0x0000,0x0000,0x0000,0x0000, -0x095F,0x0000,0x0000,0x0000,0x0000, -0x0960,0x0000,0x0000,0x0000,0x0000, -0x0961,0x0000,0x0000,0x0000,0x0000, -0x0962,0x0000,0x0000,0x0000,0x0000, -0x0963,0x0000,0x0000,0x0000,0x0000, -0x0964,0x0000,0x0000,0x0000,0x0000, -0x0965,0x0000,0x0000,0x0000,0x0000, -0x0966,0x0000,0x0000,0x0000,0x0000, -0x0967,0x0000,0x0000,0x0000,0x0000, -0x0968,0x0000,0x0000,0x0000,0x0000, -0x0969,0x0000,0x0000,0x0000,0x0000, -0x096A,0x0000,0x0000,0x0000,0x0000, -0x096B,0x0000,0x0000,0x0000,0x0000, -0x096C,0x0000,0x0000,0x0000,0x0000, -0x096D,0x0000,0x0000,0x0000,0x0000, -0x096E,0x0000,0x0000,0x0000,0x0000, -0x096F,0x0000,0x0000,0x0000,0x0000, -0x0970,0x0000,0x0000,0x0000,0x0000, -0x0971,0x0000,0x0000,0x0000,0x0000, -0x0972,0x0000,0x0000,0x0000,0x0000, -0x0973,0x0000,0x0000,0x0000,0x0000, -0x0974,0x0000,0x0000,0x0000,0x0000, -0x0975,0x0000,0x0000,0x0000,0x0000, -0x0976,0x0000,0x0000,0x0000,0x0000, -0x0977,0x0000,0x0000,0x0000,0x0000, -0x0978,0x0000,0x0000,0x0000,0x0000, -0x0979,0x0000,0x0000,0x0000,0x0000, -0x097A,0x0000,0x0000,0x0000,0x0000, -0x097B,0x0000,0x0000,0x0000,0x0000, -0x097C,0x0000,0x0000,0x0000,0x0000, -0x097D,0x0000,0x0000,0x0000,0x0000, -0x097E,0x0000,0x0000,0x0000,0x0000, -0x097F,0x0000,0x0000,0x0000,0x0000, -0x0980,0x0000,0x0000,0x0000,0x0000, -0x0981,0x0000,0x0000,0x0000,0x0000, -0x0982,0x0000,0x0000,0x0000,0x0000, -0x0983,0x0000,0x0000,0x0000,0x0000, -0x0984,0x0000,0x0000,0x0000,0x0000, -0x0985,0x0000,0x0000,0x0000,0x0000, -0x0986,0x0000,0x0000,0x0000,0x0000, -0x0987,0x0000,0x0000,0x0000,0x0000, -0x0988,0x0000,0x0000,0x0000,0x0000, -0x0989,0x0000,0x0000,0x0000,0x0000, -0x098A,0x0000,0x0000,0x0000,0x0000, -0x098B,0x0000,0x0000,0x0000,0x0000, -0x098C,0x0000,0x0000,0x0000,0x0000, -0x098D,0x0000,0x0000,0x0000,0x0000, -0x098E,0x0000,0x0000,0x0000,0x0000, -0x098F,0x0000,0x0000,0x0000,0x0000, -0x0990,0x0000,0x0000,0x0000,0x0000, -0x0991,0x0000,0x0000,0x0000,0x0000, -0x0992,0x0000,0x0000,0x0000,0x0000, -0x023D,0x023D,0x042D,0x0000,0x0000, -0x042D,0x042D,0x0000,0x0000,0x0000, -0x042D,0x042D,0x042D,0x0000,0x0000, -0x0993,0x0000,0x0000,0x0000,0x0000, -0x0994,0x0000,0x0000,0x0000,0x0000, -0x0995,0x0000,0x0000,0x0000,0x0000, -0x0996,0x0000,0x0000,0x0000,0x0000, -0x0997,0x0000,0x0000,0x0000,0x0000, -0x0998,0x0000,0x0000,0x0000,0x0000, -0x0999,0x0000,0x0000,0x0000,0x0000, -0x099A,0x0000,0x0000,0x0000,0x0000, -0x099B,0x0000,0x0000,0x0000,0x0000, -0x099C,0x0000,0x0000,0x0000,0x0000, -0x099D,0x0000,0x0000,0x0000,0x0000, -0x099E,0x0000,0x0000,0x0000,0x0000, -0x099F,0x0000,0x0000,0x0000,0x0000, -0x09A0,0x0000,0x0000,0x0000,0x0000, -0x09A1,0x0000,0x0000,0x0000,0x0000, -0x09A2,0x0000,0x0000,0x0000,0x0000, -0x09A3,0x0000,0x0000,0x0000,0x0000, -0x09A4,0x0000,0x0000,0x0000,0x0000, -0x09A5,0x0000,0x0000,0x0000,0x0000, -0x09A6,0x0000,0x0000,0x0000,0x0000, -0x09A7,0x0000,0x0000,0x0000,0x0000, -0x09A8,0x0000,0x0000,0x0000,0x0000, -0x09A9,0x0000,0x0000,0x0000,0x0000, -0x09AA,0x0000,0x0000,0x0000,0x0000, -0x09AB,0x0000,0x0000,0x0000,0x0000, -0x09AC,0x0000,0x0000,0x0000,0x0000, -0x09AD,0x0000,0x0000,0x0000,0x0000, -0x09AE,0x0000,0x0000,0x0000,0x0000, -0x09AF,0x0000,0x0000,0x0000,0x0000, -0x09B0,0x0000,0x0000,0x0000,0x0000, -0x09B1,0x0000,0x0000,0x0000,0x0000, -0x09B2,0x0000,0x0000,0x0000,0x0000, -0x09B3,0x0000,0x0000,0x0000,0x0000, -0x09B4,0x0000,0x0000,0x0000,0x0000, -0x09B5,0x0000,0x0000,0x0000,0x0000, -0x09B6,0x0000,0x0000,0x0000,0x0000, -0x09B7,0x0000,0x0000,0x0000,0x0000, -0x09B8,0x0000,0x0000,0x0000,0x0000, -0x09B9,0x0000,0x0000,0x0000,0x0000, -0x09BA,0x0000,0x0000,0x0000,0x0000, -0x09BB,0x0000,0x0000,0x0000,0x0000, -0x09BC,0x0000,0x0000,0x0000,0x0000, -0x09BD,0x0000,0x0000,0x0000,0x0000, -0x09BE,0x0000,0x0000,0x0000,0x0000, -0x09BF,0x0000,0x0000,0x0000,0x0000, -0x09C0,0x0000,0x0000,0x0000,0x0000, -0x09C1,0x0000,0x0000,0x0000,0x0000, -0x09C2,0x0000,0x0000,0x0000,0x0000, -0x09C3,0x0000,0x0000,0x0000,0x0000, -0x09C4,0x0000,0x0000,0x0000,0x0000, -0x09C5,0x0000,0x0000,0x0000,0x0000, -0x09C6,0x0000,0x0000,0x0000,0x0000, -0x09C7,0x0000,0x0000,0x0000,0x0000, -0x09C8,0x0000,0x0000,0x0000,0x0000, -0x09C9,0x0000,0x0000,0x0000,0x0000, -0x09CA,0x0000,0x0000,0x0000,0x0000, -0x09CB,0x0000,0x0000,0x0000,0x0000, -0x09CC,0x0000,0x0000,0x0000,0x0000, -0x09CD,0x0000,0x0000,0x0000,0x0000, -0x09CE,0x0000,0x0000,0x0000,0x0000, -0x09CF,0x0000,0x0000,0x0000,0x0000, -0x09D0,0x0000,0x0000,0x0000,0x0000, -0x09D1,0x0000,0x0000,0x0000,0x0000, -0x09D2,0x0000,0x0000,0x0000,0x0000, -0x09D3,0x0000,0x0000,0x0000,0x0000, -0x09D4,0x0000,0x0000,0x0000,0x0000, -0x09D5,0x0000,0x0000,0x0000,0x0000, -0x09D6,0x0000,0x0000,0x0000,0x0000, -0x09D7,0x0000,0x0000,0x0000,0x0000, -0x09D8,0x0000,0x0000,0x0000,0x0000, -0x09D9,0x0000,0x0000,0x0000,0x0000, -0x09DA,0x0000,0x0000,0x0000,0x0000, -0x09DB,0x0000,0x0000,0x0000,0x0000, -0x09DC,0x0000,0x0000,0x0000,0x0000, -0x09DD,0x0000,0x0000,0x0000,0x0000, -0x09DE,0x0000,0x0000,0x0000,0x0000, -0x09DF,0x0000,0x0000,0x0000,0x0000, -0x09E0,0x0000,0x0000,0x0000,0x0000, -0x09E1,0x0000,0x0000,0x0000,0x0000, -0x09E2,0x0000,0x0000,0x0000,0x0000, -0x09E3,0x0000,0x0000,0x0000,0x0000, -0x09E4,0x0000,0x0000,0x0000,0x0000, -0x09E5,0x0000,0x0000,0x0000,0x0000, -0x09E6,0x0000,0x0000,0x0000,0x0000, -0x09E7,0x0000,0x0000,0x0000,0x0000, -0x09E8,0x0000,0x0000,0x0000,0x0000, -0x09E9,0x0000,0x0000,0x0000,0x0000, -0x09EA,0x0000,0x0000,0x0000,0x0000, -0x09EB,0x0000,0x0000,0x0000,0x0000, -0x09EC,0x0000,0x0000,0x0000,0x0000, -0x09ED,0x0000,0x0000,0x0000,0x0000, -0x09EE,0x0000,0x0000,0x0000,0x0000, -0x09EF,0x0000,0x0000,0x0000,0x0000, -0x09F0,0x0000,0x0000,0x0000,0x0000, -0x09F1,0x0000,0x0000,0x0000,0x0000, -0x09F2,0x0000,0x0000,0x0000,0x0000, -0x09F3,0x0000,0x0000,0x0000,0x0000, -0x09F4,0x0000,0x0000,0x0000,0x0000, -0x09F5,0x0000,0x0000,0x0000,0x0000, -0x09F6,0x0000,0x0000,0x0000,0x0000, -0x09F7,0x0000,0x0000,0x0000,0x0000, -0x09F8,0x0000,0x0000,0x0000,0x0000, -0x09F8,0x0000,0x0000,0x0000,0x0000, -0x09F9,0x0000,0x0000,0x0000,0x0000, -0x09FA,0x0000,0x0000,0x0000,0x0000, -0x09FB,0x0000,0x0000,0x0000,0x0000, -0x09FC,0x0000,0x0000,0x0000,0x0000, -0x09FD,0x0000,0x0000,0x0000,0x0000, -0x09FE,0x0000,0x0000,0x0000,0x0000, -0x09FF,0x0000,0x0000,0x0000,0x0000, -0x0A00,0x0000,0x0000,0x0000,0x0000, -0x0A01,0x0000,0x0000,0x0000,0x0000, -0x0A02,0x0000,0x0000,0x0000,0x0000, -0x0A03,0x0000,0x0000,0x0000,0x0000, -0x0A04,0x0000,0x0000,0x0000,0x0000, -0x0A05,0x0000,0x0000,0x0000,0x0000, -0x0A06,0x0000,0x0000,0x0000,0x0000, -0x0A07,0x0000,0x0000,0x0000,0x0000, -0x0A08,0x0000,0x0000,0x0000,0x0000, -0x0A09,0x0000,0x0000,0x0000,0x0000, -0x0A0A,0x0000,0x0000,0x0000,0x0000, -0x0A0B,0x0000,0x0000,0x0000,0x0000, -0x0A0C,0x0000,0x0000,0x0000,0x0000, -0x0A0D,0x0000,0x0000,0x0000,0x0000, -0x0A0E,0x0000,0x0000,0x0000,0x0000, -0x0A0F,0x0000,0x0000,0x0000,0x0000, -0x0A10,0x0000,0x0000,0x0000,0x0000, -0x0A11,0x0000,0x0000,0x0000,0x0000, -0x0A12,0x0000,0x0000,0x0000,0x0000, -0x0A13,0x0000,0x0000,0x0000,0x0000, -0x0A14,0x0000,0x0000,0x0000,0x0000, -0x0A15,0x0000,0x0000,0x0000,0x0000, -0x0A16,0x0000,0x0000,0x0000,0x0000, -0x0A17,0x0000,0x0000,0x0000,0x0000, -0x0A18,0x0000,0x0000,0x0000,0x0000, -0x0A19,0x0000,0x0000,0x0000,0x0000, -0x0A1A,0x0000,0x0000,0x0000,0x0000 -}; - -uint16 page02Bdata[]= { /* 2B00 (3 weights per char) */ -0x0A1B,0x0000,0x0000, 0x0A1C,0x0000,0x0000, 0x0A1D,0x0000,0x0000, -0x0A1E,0x0000,0x0000, 0x0A1F,0x0000,0x0000, 0x0A20,0x0000,0x0000, -0x0A21,0x0000,0x0000, 0x0A22,0x0000,0x0000, 0x0A23,0x0000,0x0000, -0x0A24,0x0000,0x0000, 0x0A25,0x0000,0x0000, 0x0A26,0x0000,0x0000, -0x0A27,0x0000,0x0000, 0x0A28,0x0000,0x0000, 0xFBC0,0xAB0E,0x0000, -0xFBC0,0xAB0F,0x0000, 0xFBC0,0xAB10,0x0000, 0xFBC0,0xAB11,0x0000, -0xFBC0,0xAB12,0x0000, 0xFBC0,0xAB13,0x0000, 0xFBC0,0xAB14,0x0000, -0xFBC0,0xAB15,0x0000, 0xFBC0,0xAB16,0x0000, 0xFBC0,0xAB17,0x0000, -0xFBC0,0xAB18,0x0000, 0xFBC0,0xAB19,0x0000, 0xFBC0,0xAB1A,0x0000, -0xFBC0,0xAB1B,0x0000, 0xFBC0,0xAB1C,0x0000, 0xFBC0,0xAB1D,0x0000, -0xFBC0,0xAB1E,0x0000, 0xFBC0,0xAB1F,0x0000, 0xFBC0,0xAB20,0x0000, -0xFBC0,0xAB21,0x0000, 0xFBC0,0xAB22,0x0000, 0xFBC0,0xAB23,0x0000, -0xFBC0,0xAB24,0x0000, 0xFBC0,0xAB25,0x0000, 0xFBC0,0xAB26,0x0000, -0xFBC0,0xAB27,0x0000, 0xFBC0,0xAB28,0x0000, 0xFBC0,0xAB29,0x0000, -0xFBC0,0xAB2A,0x0000, 0xFBC0,0xAB2B,0x0000, 0xFBC0,0xAB2C,0x0000, -0xFBC0,0xAB2D,0x0000, 0xFBC0,0xAB2E,0x0000, 0xFBC0,0xAB2F,0x0000, -0xFBC0,0xAB30,0x0000, 0xFBC0,0xAB31,0x0000, 0xFBC0,0xAB32,0x0000, -0xFBC0,0xAB33,0x0000, 0xFBC0,0xAB34,0x0000, 0xFBC0,0xAB35,0x0000, -0xFBC0,0xAB36,0x0000, 0xFBC0,0xAB37,0x0000, 0xFBC0,0xAB38,0x0000, -0xFBC0,0xAB39,0x0000, 0xFBC0,0xAB3A,0x0000, 0xFBC0,0xAB3B,0x0000, -0xFBC0,0xAB3C,0x0000, 0xFBC0,0xAB3D,0x0000, 0xFBC0,0xAB3E,0x0000, -0xFBC0,0xAB3F,0x0000, 0xFBC0,0xAB40,0x0000, 0xFBC0,0xAB41,0x0000, -0xFBC0,0xAB42,0x0000, 0xFBC0,0xAB43,0x0000, 0xFBC0,0xAB44,0x0000, -0xFBC0,0xAB45,0x0000, 0xFBC0,0xAB46,0x0000, 0xFBC0,0xAB47,0x0000, -0xFBC0,0xAB48,0x0000, 0xFBC0,0xAB49,0x0000, 0xFBC0,0xAB4A,0x0000, -0xFBC0,0xAB4B,0x0000, 0xFBC0,0xAB4C,0x0000, 0xFBC0,0xAB4D,0x0000, -0xFBC0,0xAB4E,0x0000, 0xFBC0,0xAB4F,0x0000, 0xFBC0,0xAB50,0x0000, -0xFBC0,0xAB51,0x0000, 0xFBC0,0xAB52,0x0000, 0xFBC0,0xAB53,0x0000, -0xFBC0,0xAB54,0x0000, 0xFBC0,0xAB55,0x0000, 0xFBC0,0xAB56,0x0000, -0xFBC0,0xAB57,0x0000, 0xFBC0,0xAB58,0x0000, 0xFBC0,0xAB59,0x0000, -0xFBC0,0xAB5A,0x0000, 0xFBC0,0xAB5B,0x0000, 0xFBC0,0xAB5C,0x0000, -0xFBC0,0xAB5D,0x0000, 0xFBC0,0xAB5E,0x0000, 0xFBC0,0xAB5F,0x0000, -0xFBC0,0xAB60,0x0000, 0xFBC0,0xAB61,0x0000, 0xFBC0,0xAB62,0x0000, -0xFBC0,0xAB63,0x0000, 0xFBC0,0xAB64,0x0000, 0xFBC0,0xAB65,0x0000, -0xFBC0,0xAB66,0x0000, 0xFBC0,0xAB67,0x0000, 0xFBC0,0xAB68,0x0000, -0xFBC0,0xAB69,0x0000, 0xFBC0,0xAB6A,0x0000, 0xFBC0,0xAB6B,0x0000, -0xFBC0,0xAB6C,0x0000, 0xFBC0,0xAB6D,0x0000, 0xFBC0,0xAB6E,0x0000, -0xFBC0,0xAB6F,0x0000, 0xFBC0,0xAB70,0x0000, 0xFBC0,0xAB71,0x0000, -0xFBC0,0xAB72,0x0000, 0xFBC0,0xAB73,0x0000, 0xFBC0,0xAB74,0x0000, -0xFBC0,0xAB75,0x0000, 0xFBC0,0xAB76,0x0000, 0xFBC0,0xAB77,0x0000, -0xFBC0,0xAB78,0x0000, 0xFBC0,0xAB79,0x0000, 0xFBC0,0xAB7A,0x0000, -0xFBC0,0xAB7B,0x0000, 0xFBC0,0xAB7C,0x0000, 0xFBC0,0xAB7D,0x0000, -0xFBC0,0xAB7E,0x0000, 0xFBC0,0xAB7F,0x0000, 0xFBC0,0xAB80,0x0000, -0xFBC0,0xAB81,0x0000, 0xFBC0,0xAB82,0x0000, 0xFBC0,0xAB83,0x0000, -0xFBC0,0xAB84,0x0000, 0xFBC0,0xAB85,0x0000, 0xFBC0,0xAB86,0x0000, -0xFBC0,0xAB87,0x0000, 0xFBC0,0xAB88,0x0000, 0xFBC0,0xAB89,0x0000, -0xFBC0,0xAB8A,0x0000, 0xFBC0,0xAB8B,0x0000, 0xFBC0,0xAB8C,0x0000, -0xFBC0,0xAB8D,0x0000, 0xFBC0,0xAB8E,0x0000, 0xFBC0,0xAB8F,0x0000, -0xFBC0,0xAB90,0x0000, 0xFBC0,0xAB91,0x0000, 0xFBC0,0xAB92,0x0000, -0xFBC0,0xAB93,0x0000, 0xFBC0,0xAB94,0x0000, 0xFBC0,0xAB95,0x0000, -0xFBC0,0xAB96,0x0000, 0xFBC0,0xAB97,0x0000, 0xFBC0,0xAB98,0x0000, -0xFBC0,0xAB99,0x0000, 0xFBC0,0xAB9A,0x0000, 0xFBC0,0xAB9B,0x0000, -0xFBC0,0xAB9C,0x0000, 0xFBC0,0xAB9D,0x0000, 0xFBC0,0xAB9E,0x0000, -0xFBC0,0xAB9F,0x0000, 0xFBC0,0xABA0,0x0000, 0xFBC0,0xABA1,0x0000, -0xFBC0,0xABA2,0x0000, 0xFBC0,0xABA3,0x0000, 0xFBC0,0xABA4,0x0000, -0xFBC0,0xABA5,0x0000, 0xFBC0,0xABA6,0x0000, 0xFBC0,0xABA7,0x0000, -0xFBC0,0xABA8,0x0000, 0xFBC0,0xABA9,0x0000, 0xFBC0,0xABAA,0x0000, -0xFBC0,0xABAB,0x0000, 0xFBC0,0xABAC,0x0000, 0xFBC0,0xABAD,0x0000, -0xFBC0,0xABAE,0x0000, 0xFBC0,0xABAF,0x0000, 0xFBC0,0xABB0,0x0000, -0xFBC0,0xABB1,0x0000, 0xFBC0,0xABB2,0x0000, 0xFBC0,0xABB3,0x0000, -0xFBC0,0xABB4,0x0000, 0xFBC0,0xABB5,0x0000, 0xFBC0,0xABB6,0x0000, -0xFBC0,0xABB7,0x0000, 0xFBC0,0xABB8,0x0000, 0xFBC0,0xABB9,0x0000, -0xFBC0,0xABBA,0x0000, 0xFBC0,0xABBB,0x0000, 0xFBC0,0xABBC,0x0000, -0xFBC0,0xABBD,0x0000, 0xFBC0,0xABBE,0x0000, 0xFBC0,0xABBF,0x0000, -0xFBC0,0xABC0,0x0000, 0xFBC0,0xABC1,0x0000, 0xFBC0,0xABC2,0x0000, -0xFBC0,0xABC3,0x0000, 0xFBC0,0xABC4,0x0000, 0xFBC0,0xABC5,0x0000, -0xFBC0,0xABC6,0x0000, 0xFBC0,0xABC7,0x0000, 0xFBC0,0xABC8,0x0000, -0xFBC0,0xABC9,0x0000, 0xFBC0,0xABCA,0x0000, 0xFBC0,0xABCB,0x0000, -0xFBC0,0xABCC,0x0000, 0xFBC0,0xABCD,0x0000, 0xFBC0,0xABCE,0x0000, -0xFBC0,0xABCF,0x0000, 0xFBC0,0xABD0,0x0000, 0xFBC0,0xABD1,0x0000, -0xFBC0,0xABD2,0x0000, 0xFBC0,0xABD3,0x0000, 0xFBC0,0xABD4,0x0000, -0xFBC0,0xABD5,0x0000, 0xFBC0,0xABD6,0x0000, 0xFBC0,0xABD7,0x0000, -0xFBC0,0xABD8,0x0000, 0xFBC0,0xABD9,0x0000, 0xFBC0,0xABDA,0x0000, -0xFBC0,0xABDB,0x0000, 0xFBC0,0xABDC,0x0000, 0xFBC0,0xABDD,0x0000, -0xFBC0,0xABDE,0x0000, 0xFBC0,0xABDF,0x0000, 0xFBC0,0xABE0,0x0000, -0xFBC0,0xABE1,0x0000, 0xFBC0,0xABE2,0x0000, 0xFBC0,0xABE3,0x0000, -0xFBC0,0xABE4,0x0000, 0xFBC0,0xABE5,0x0000, 0xFBC0,0xABE6,0x0000, -0xFBC0,0xABE7,0x0000, 0xFBC0,0xABE8,0x0000, 0xFBC0,0xABE9,0x0000, -0xFBC0,0xABEA,0x0000, 0xFBC0,0xABEB,0x0000, 0xFBC0,0xABEC,0x0000, -0xFBC0,0xABED,0x0000, 0xFBC0,0xABEE,0x0000, 0xFBC0,0xABEF,0x0000, -0xFBC0,0xABF0,0x0000, 0xFBC0,0xABF1,0x0000, 0xFBC0,0xABF2,0x0000, -0xFBC0,0xABF3,0x0000, 0xFBC0,0xABF4,0x0000, 0xFBC0,0xABF5,0x0000, -0xFBC0,0xABF6,0x0000, 0xFBC0,0xABF7,0x0000, 0xFBC0,0xABF8,0x0000, -0xFBC0,0xABF9,0x0000, 0xFBC0,0xABFA,0x0000, 0xFBC0,0xABFB,0x0000, -0xFBC0,0xABFC,0x0000, 0xFBC0,0xABFD,0x0000, 0xFBC0,0xABFE,0x0000, -0xFBC0,0xABFF,0x0000 }; - -uint16 page02Edata[]= { /* 2E00 (3 weights per char) */ -0xFBC0,0xAE00,0x0000, 0xFBC0,0xAE01,0x0000, 0xFBC0,0xAE02,0x0000, -0xFBC0,0xAE03,0x0000, 0xFBC0,0xAE04,0x0000, 0xFBC0,0xAE05,0x0000, -0xFBC0,0xAE06,0x0000, 0xFBC0,0xAE07,0x0000, 0xFBC0,0xAE08,0x0000, -0xFBC0,0xAE09,0x0000, 0xFBC0,0xAE0A,0x0000, 0xFBC0,0xAE0B,0x0000, -0xFBC0,0xAE0C,0x0000, 0xFBC0,0xAE0D,0x0000, 0xFBC0,0xAE0E,0x0000, -0xFBC0,0xAE0F,0x0000, 0xFBC0,0xAE10,0x0000, 0xFBC0,0xAE11,0x0000, -0xFBC0,0xAE12,0x0000, 0xFBC0,0xAE13,0x0000, 0xFBC0,0xAE14,0x0000, -0xFBC0,0xAE15,0x0000, 0xFBC0,0xAE16,0x0000, 0xFBC0,0xAE17,0x0000, -0xFBC0,0xAE18,0x0000, 0xFBC0,0xAE19,0x0000, 0xFBC0,0xAE1A,0x0000, -0xFBC0,0xAE1B,0x0000, 0xFBC0,0xAE1C,0x0000, 0xFBC0,0xAE1D,0x0000, -0xFBC0,0xAE1E,0x0000, 0xFBC0,0xAE1F,0x0000, 0xFBC0,0xAE20,0x0000, -0xFBC0,0xAE21,0x0000, 0xFBC0,0xAE22,0x0000, 0xFBC0,0xAE23,0x0000, -0xFBC0,0xAE24,0x0000, 0xFBC0,0xAE25,0x0000, 0xFBC0,0xAE26,0x0000, -0xFBC0,0xAE27,0x0000, 0xFBC0,0xAE28,0x0000, 0xFBC0,0xAE29,0x0000, -0xFBC0,0xAE2A,0x0000, 0xFBC0,0xAE2B,0x0000, 0xFBC0,0xAE2C,0x0000, -0xFBC0,0xAE2D,0x0000, 0xFBC0,0xAE2E,0x0000, 0xFBC0,0xAE2F,0x0000, -0xFBC0,0xAE30,0x0000, 0xFBC0,0xAE31,0x0000, 0xFBC0,0xAE32,0x0000, -0xFBC0,0xAE33,0x0000, 0xFBC0,0xAE34,0x0000, 0xFBC0,0xAE35,0x0000, -0xFBC0,0xAE36,0x0000, 0xFBC0,0xAE37,0x0000, 0xFBC0,0xAE38,0x0000, -0xFBC0,0xAE39,0x0000, 0xFBC0,0xAE3A,0x0000, 0xFBC0,0xAE3B,0x0000, -0xFBC0,0xAE3C,0x0000, 0xFBC0,0xAE3D,0x0000, 0xFBC0,0xAE3E,0x0000, -0xFBC0,0xAE3F,0x0000, 0xFBC0,0xAE40,0x0000, 0xFBC0,0xAE41,0x0000, -0xFBC0,0xAE42,0x0000, 0xFBC0,0xAE43,0x0000, 0xFBC0,0xAE44,0x0000, -0xFBC0,0xAE45,0x0000, 0xFBC0,0xAE46,0x0000, 0xFBC0,0xAE47,0x0000, -0xFBC0,0xAE48,0x0000, 0xFBC0,0xAE49,0x0000, 0xFBC0,0xAE4A,0x0000, -0xFBC0,0xAE4B,0x0000, 0xFBC0,0xAE4C,0x0000, 0xFBC0,0xAE4D,0x0000, -0xFBC0,0xAE4E,0x0000, 0xFBC0,0xAE4F,0x0000, 0xFBC0,0xAE50,0x0000, -0xFBC0,0xAE51,0x0000, 0xFBC0,0xAE52,0x0000, 0xFBC0,0xAE53,0x0000, -0xFBC0,0xAE54,0x0000, 0xFBC0,0xAE55,0x0000, 0xFBC0,0xAE56,0x0000, -0xFBC0,0xAE57,0x0000, 0xFBC0,0xAE58,0x0000, 0xFBC0,0xAE59,0x0000, -0xFBC0,0xAE5A,0x0000, 0xFBC0,0xAE5B,0x0000, 0xFBC0,0xAE5C,0x0000, -0xFBC0,0xAE5D,0x0000, 0xFBC0,0xAE5E,0x0000, 0xFBC0,0xAE5F,0x0000, -0xFBC0,0xAE60,0x0000, 0xFBC0,0xAE61,0x0000, 0xFBC0,0xAE62,0x0000, -0xFBC0,0xAE63,0x0000, 0xFBC0,0xAE64,0x0000, 0xFBC0,0xAE65,0x0000, -0xFBC0,0xAE66,0x0000, 0xFBC0,0xAE67,0x0000, 0xFBC0,0xAE68,0x0000, -0xFBC0,0xAE69,0x0000, 0xFBC0,0xAE6A,0x0000, 0xFBC0,0xAE6B,0x0000, -0xFBC0,0xAE6C,0x0000, 0xFBC0,0xAE6D,0x0000, 0xFBC0,0xAE6E,0x0000, -0xFBC0,0xAE6F,0x0000, 0xFBC0,0xAE70,0x0000, 0xFBC0,0xAE71,0x0000, -0xFBC0,0xAE72,0x0000, 0xFBC0,0xAE73,0x0000, 0xFBC0,0xAE74,0x0000, -0xFBC0,0xAE75,0x0000, 0xFBC0,0xAE76,0x0000, 0xFBC0,0xAE77,0x0000, -0xFBC0,0xAE78,0x0000, 0xFBC0,0xAE79,0x0000, 0xFBC0,0xAE7A,0x0000, -0xFBC0,0xAE7B,0x0000, 0xFBC0,0xAE7C,0x0000, 0xFBC0,0xAE7D,0x0000, -0xFBC0,0xAE7E,0x0000, 0xFBC0,0xAE7F,0x0000, 0xFB40,0xCE36,0x0000, -0xFB40,0xD382,0x0000, 0xFB40,0xCE5B,0x0000, 0xFB40,0xCE5A,0x0000, -0xFB40,0xCE59,0x0000, 0xFB40,0xCEBB,0x0000, 0xFB40,0xD182,0x0000, -0xFB40,0xD1E0,0x0000, 0xFB40,0xD200,0x0000, 0xFB40,0xD202,0x0000, -0xFB40,0xD35C,0x0000, 0xFB40,0xD369,0x0000, 0xFB40,0xDC0F,0x0000, -0xFB40,0xDC0F,0x0000, 0xFB40,0xDC22,0x0000, 0xFB40,0xDC23,0x0000, -0xFB40,0xDC22,0x0000, 0xFB40,0xDC23,0x0000, 0xFB40,0xDDF3,0x0000, -0xFB40,0xDE7A,0x0000, 0xFB40,0xDF51,0x0000, 0xFB40,0xDF50,0x0000, -0xFB40,0xDFC4,0x0000, 0xFB40,0xDFC3,0x0000, 0xFB40,0xE24C,0x0000, -0xFB40,0xE535,0x0000, 0xFBC0,0xAE9A,0x0000, 0xFB40,0xE5E1,0x0000, -0xFB40,0xE5E5,0x0000, 0xFB40,0xE708,0x0000, 0xFB40,0xEB7A,0x0000, -0xFB40,0xEBCD,0x0000, 0xFB40,0xEC11,0x0000, 0xFB40,0xEC35,0x0000, -0xFB40,0xEC3A,0x0000, 0xFB40,0xF06C,0x0000, 0xFB40,0xF22B,0x0000, -0xFB40,0xF22B,0x0000, 0xFB40,0xCE2C,0x0000, 0xFB40,0xF25B,0x0000, -0xFB40,0xF2AD,0x0000, 0xFB40,0xF38B,0x0000, 0xFB40,0xF58B,0x0000, -0xFB40,0xF6EE,0x0000, 0xFB40,0xF93A,0x0000, 0xFB40,0xF93B,0x0000, -0xFB40,0xFAF9,0x0000, 0xFB40,0xFCF9,0x0000, 0xFB40,0xFE9F,0x0000, -0xFB40,0xFF53,0x0000, 0xFB40,0xFF52,0x0000, 0xFB40,0xFF53,0x0000, -0xFB40,0xFF53,0x0000, 0xFB40,0xFF52,0x0000, 0xFB40,0xFF8A,0x0000, -0xFB40,0xFF8A,0x0000, 0xFB40,0xFF8B,0x0000, 0xFB41,0x8002,0x0000, -0xFB41,0x8080,0x0000, 0xFB41,0x807F,0x0000, 0xFB41,0x8089,0x0000, -0xFB41,0x81FC,0x0000, 0xFB41,0x8279,0x0000, 0xFB41,0x8279,0x0000, -0xFB41,0x8279,0x0000, 0xFB41,0x864E,0x0000, 0xFB41,0x8864,0x0000, -0xFB41,0x8980,0x0000, 0xFB41,0x897F,0x0000, 0xFB41,0x89C1,0x0000, -0xFB41,0x89D2,0x0000, 0xFB41,0x89D2,0x0000, 0xFB41,0x8BA0,0x0000, -0xFB41,0x8D1D,0x0000, 0xFB41,0x8DB3,0x0000, 0xFB41,0x8F66,0x0000, -0xFB41,0x8FB6,0x0000, 0xFB41,0x8FB6,0x0000, 0xFB41,0x8FB6,0x0000, -0xFB41,0x9091,0x0000, 0xFB41,0x9485,0x0000, 0xFB41,0x9577,0x0000, -0xFB41,0x9578,0x0000, 0xFB41,0x957F,0x0000, 0xFB41,0x95E8,0x0000, -0xFB41,0x961C,0x0000, 0xFB41,0x961D,0x0000, 0xFB41,0x96E8,0x0000, -0xFB41,0x9752,0x0000, 0xFB41,0x97E6,0x0000, 0xFB41,0x9875,0x0000, -0xFB41,0x98CE,0x0000, 0xFB41,0x98DE,0x0000, 0xFB41,0x98DF,0x0000, -0xFB41,0x98E0,0x0000, 0xFB41,0x98E0,0x0000, 0xFB41,0x9963,0x0000, -0xFB41,0x9996,0x0000, 0xFB41,0x9A6C,0x0000, 0xFB41,0x9AA8,0x0000, -0xFB41,0x9B3C,0x0000, 0xFB41,0x9C7C,0x0000, 0xFB41,0x9E1F,0x0000, -0xFB41,0x9E75,0x0000, 0xFB41,0x9EA6,0x0000, 0xFB41,0x9EC4,0x0000, -0xFB41,0x9EFE,0x0000, 0xFB41,0x9F4A,0x0000, 0xFB41,0x9F50,0x0000, -0xFB41,0x9F52,0x0000, 0xFB41,0x9F7F,0x0000, 0xFB41,0x9F8D,0x0000, -0xFB41,0x9F99,0x0000, 0xFB41,0x9F9C,0x0000, 0xFB41,0x9F9C,0x0000, -0xFB41,0x9F9F,0x0000, 0xFBC0,0xAEF4,0x0000, 0xFBC0,0xAEF5,0x0000, -0xFBC0,0xAEF6,0x0000, 0xFBC0,0xAEF7,0x0000, 0xFBC0,0xAEF8,0x0000, -0xFBC0,0xAEF9,0x0000, 0xFBC0,0xAEFA,0x0000, 0xFBC0,0xAEFB,0x0000, -0xFBC0,0xAEFC,0x0000, 0xFBC0,0xAEFD,0x0000, 0xFBC0,0xAEFE,0x0000, -0xFBC0,0xAEFF,0x0000 }; - -uint16 page02Fdata[]= { /* 2F00 (3 weights per char) */ -0xFB40,0xCE00,0x0000, 0xFB40,0xCE28,0x0000, 0xFB40,0xCE36,0x0000, -0xFB40,0xCE3F,0x0000, 0xFB40,0xCE59,0x0000, 0xFB40,0xCE85,0x0000, -0xFB40,0xCE8C,0x0000, 0xFB40,0xCEA0,0x0000, 0xFB40,0xCEBA,0x0000, -0xFB40,0xD13F,0x0000, 0xFB40,0xD165,0x0000, 0xFB40,0xD16B,0x0000, -0xFB40,0xD182,0x0000, 0xFB40,0xD196,0x0000, 0xFB40,0xD1AB,0x0000, -0xFB40,0xD1E0,0x0000, 0xFB40,0xD1F5,0x0000, 0xFB40,0xD200,0x0000, -0xFB40,0xD29B,0x0000, 0xFB40,0xD2F9,0x0000, 0xFB40,0xD315,0x0000, -0xFB40,0xD31A,0x0000, 0xFB40,0xD338,0x0000, 0xFB40,0xD341,0x0000, -0xFB40,0xD35C,0x0000, 0xFB40,0xD369,0x0000, 0xFB40,0xD382,0x0000, -0xFB40,0xD3B6,0x0000, 0xFB40,0xD3C8,0x0000, 0xFB40,0xD3E3,0x0000, -0xFB40,0xD6D7,0x0000, 0xFB40,0xD71F,0x0000, 0xFB40,0xD8EB,0x0000, -0xFB40,0xD902,0x0000, 0xFB40,0xD90A,0x0000, 0xFB40,0xD915,0x0000, -0xFB40,0xD927,0x0000, 0xFB40,0xD973,0x0000, 0xFB40,0xDB50,0x0000, -0xFB40,0xDB80,0x0000, 0xFB40,0xDBF8,0x0000, 0xFB40,0xDC0F,0x0000, -0xFB40,0xDC22,0x0000, 0xFB40,0xDC38,0x0000, 0xFB40,0xDC6E,0x0000, -0xFB40,0xDC71,0x0000, 0xFB40,0xDDDB,0x0000, 0xFB40,0xDDE5,0x0000, -0xFB40,0xDDF1,0x0000, 0xFB40,0xDDFE,0x0000, 0xFB40,0xDE72,0x0000, -0xFB40,0xDE7A,0x0000, 0xFB40,0xDE7F,0x0000, 0xFB40,0xDEF4,0x0000, -0xFB40,0xDEFE,0x0000, 0xFB40,0xDF0B,0x0000, 0xFB40,0xDF13,0x0000, -0xFB40,0xDF50,0x0000, 0xFB40,0xDF61,0x0000, 0xFB40,0xDF73,0x0000, -0xFB40,0xDFC3,0x0000, 0xFB40,0xE208,0x0000, 0xFB40,0xE236,0x0000, -0xFB40,0xE24B,0x0000, 0xFB40,0xE52F,0x0000, 0xFB40,0xE534,0x0000, -0xFB40,0xE587,0x0000, 0xFB40,0xE597,0x0000, 0xFB40,0xE5A4,0x0000, -0xFB40,0xE5B9,0x0000, 0xFB40,0xE5E0,0x0000, 0xFB40,0xE5E5,0x0000, -0xFB40,0xE6F0,0x0000, 0xFB40,0xE708,0x0000, 0xFB40,0xE728,0x0000, -0xFB40,0xEB20,0x0000, 0xFB40,0xEB62,0x0000, 0xFB40,0xEB79,0x0000, -0xFB40,0xEBB3,0x0000, 0xFB40,0xEBCB,0x0000, 0xFB40,0xEBD4,0x0000, -0xFB40,0xEBDB,0x0000, 0xFB40,0xEC0F,0x0000, 0xFB40,0xEC14,0x0000, -0xFB40,0xEC34,0x0000, 0xFB40,0xF06B,0x0000, 0xFB40,0xF22A,0x0000, -0xFB40,0xF236,0x0000, 0xFB40,0xF23B,0x0000, 0xFB40,0xF23F,0x0000, -0xFB40,0xF247,0x0000, 0xFB40,0xF259,0x0000, 0xFB40,0xF25B,0x0000, -0xFB40,0xF2AC,0x0000, 0xFB40,0xF384,0x0000, 0xFB40,0xF389,0x0000, -0xFB40,0xF4DC,0x0000, 0xFB40,0xF4E6,0x0000, 0xFB40,0xF518,0x0000, -0xFB40,0xF51F,0x0000, 0xFB40,0xF528,0x0000, 0xFB40,0xF530,0x0000, -0xFB40,0xF58B,0x0000, 0xFB40,0xF592,0x0000, 0xFB40,0xF676,0x0000, -0xFB40,0xF67D,0x0000, 0xFB40,0xF6AE,0x0000, 0xFB40,0xF6BF,0x0000, -0xFB40,0xF6EE,0x0000, 0xFB40,0xF7DB,0x0000, 0xFB40,0xF7E2,0x0000, -0xFB40,0xF7F3,0x0000, 0xFB40,0xF93A,0x0000, 0xFB40,0xF9B8,0x0000, -0xFB40,0xF9BE,0x0000, 0xFB40,0xFA74,0x0000, 0xFB40,0xFACB,0x0000, -0xFB40,0xFAF9,0x0000, 0xFB40,0xFC73,0x0000, 0xFB40,0xFCF8,0x0000, -0xFB40,0xFF36,0x0000, 0xFB40,0xFF51,0x0000, 0xFB40,0xFF8A,0x0000, -0xFB40,0xFFBD,0x0000, 0xFB41,0x8001,0x0000, 0xFB41,0x800C,0x0000, -0xFB41,0x8012,0x0000, 0xFB41,0x8033,0x0000, 0xFB41,0x807F,0x0000, -0xFB41,0x8089,0x0000, 0xFB41,0x81E3,0x0000, 0xFB41,0x81EA,0x0000, -0xFB41,0x81F3,0x0000, 0xFB41,0x81FC,0x0000, 0xFB41,0x820C,0x0000, -0xFB41,0x821B,0x0000, 0xFB41,0x821F,0x0000, 0xFB41,0x826E,0x0000, -0xFB41,0x8272,0x0000, 0xFB41,0x8278,0x0000, 0xFB41,0x864D,0x0000, -0xFB41,0x866B,0x0000, 0xFB41,0x8840,0x0000, 0xFB41,0x884C,0x0000, -0xFB41,0x8863,0x0000, 0xFB41,0x897E,0x0000, 0xFB41,0x898B,0x0000, -0xFB41,0x89D2,0x0000, 0xFB41,0x8A00,0x0000, 0xFB41,0x8C37,0x0000, -0xFB41,0x8C46,0x0000, 0xFB41,0x8C55,0x0000, 0xFB41,0x8C78,0x0000, -0xFB41,0x8C9D,0x0000, 0xFB41,0x8D64,0x0000, 0xFB41,0x8D70,0x0000, -0xFB41,0x8DB3,0x0000, 0xFB41,0x8EAB,0x0000, 0xFB41,0x8ECA,0x0000, -0xFB41,0x8F9B,0x0000, 0xFB41,0x8FB0,0x0000, 0xFB41,0x8FB5,0x0000, -0xFB41,0x9091,0x0000, 0xFB41,0x9149,0x0000, 0xFB41,0x91C6,0x0000, -0xFB41,0x91CC,0x0000, 0xFB41,0x91D1,0x0000, 0xFB41,0x9577,0x0000, -0xFB41,0x9580,0x0000, 0xFB41,0x961C,0x0000, 0xFB41,0x96B6,0x0000, -0xFB41,0x96B9,0x0000, 0xFB41,0x96E8,0x0000, 0xFB41,0x9751,0x0000, -0xFB41,0x975E,0x0000, 0xFB41,0x9762,0x0000, 0xFB41,0x9769,0x0000, -0xFB41,0x97CB,0x0000, 0xFB41,0x97ED,0x0000, 0xFB41,0x97F3,0x0000, -0xFB41,0x9801,0x0000, 0xFB41,0x98A8,0x0000, 0xFB41,0x98DB,0x0000, -0xFB41,0x98DF,0x0000, 0xFB41,0x9996,0x0000, 0xFB41,0x9999,0x0000, -0xFB41,0x99AC,0x0000, 0xFB41,0x9AA8,0x0000, 0xFB41,0x9AD8,0x0000, -0xFB41,0x9ADF,0x0000, 0xFB41,0x9B25,0x0000, 0xFB41,0x9B2F,0x0000, -0xFB41,0x9B32,0x0000, 0xFB41,0x9B3C,0x0000, 0xFB41,0x9B5A,0x0000, -0xFB41,0x9CE5,0x0000, 0xFB41,0x9E75,0x0000, 0xFB41,0x9E7F,0x0000, -0xFB41,0x9EA5,0x0000, 0xFB41,0x9EBB,0x0000, 0xFB41,0x9EC3,0x0000, -0xFB41,0x9ECD,0x0000, 0xFB41,0x9ED1,0x0000, 0xFB41,0x9EF9,0x0000, -0xFB41,0x9EFD,0x0000, 0xFB41,0x9F0E,0x0000, 0xFB41,0x9F13,0x0000, -0xFB41,0x9F20,0x0000, 0xFB41,0x9F3B,0x0000, 0xFB41,0x9F4A,0x0000, -0xFB41,0x9F52,0x0000, 0xFB41,0x9F8D,0x0000, 0xFB41,0x9F9C,0x0000, -0xFB41,0x9FA0,0x0000, 0xFBC0,0xAFD6,0x0000, 0xFBC0,0xAFD7,0x0000, -0xFBC0,0xAFD8,0x0000, 0xFBC0,0xAFD9,0x0000, 0xFBC0,0xAFDA,0x0000, -0xFBC0,0xAFDB,0x0000, 0xFBC0,0xAFDC,0x0000, 0xFBC0,0xAFDD,0x0000, -0xFBC0,0xAFDE,0x0000, 0xFBC0,0xAFDF,0x0000, 0xFBC0,0xAFE0,0x0000, -0xFBC0,0xAFE1,0x0000, 0xFBC0,0xAFE2,0x0000, 0xFBC0,0xAFE3,0x0000, -0xFBC0,0xAFE4,0x0000, 0xFBC0,0xAFE5,0x0000, 0xFBC0,0xAFE6,0x0000, -0xFBC0,0xAFE7,0x0000, 0xFBC0,0xAFE8,0x0000, 0xFBC0,0xAFE9,0x0000, -0xFBC0,0xAFEA,0x0000, 0xFBC0,0xAFEB,0x0000, 0xFBC0,0xAFEC,0x0000, -0xFBC0,0xAFED,0x0000, 0xFBC0,0xAFEE,0x0000, 0xFBC0,0xAFEF,0x0000, -0x0DAF,0x0000,0x0000, 0x0DB0,0x0000,0x0000, 0x0DB1,0x0000,0x0000, -0x0DB2,0x0000,0x0000, 0x0DB3,0x0000,0x0000, 0x0DB4,0x0000,0x0000, -0x0DB5,0x0000,0x0000, 0x0DB6,0x0000,0x0000, 0x0DB7,0x0000,0x0000, -0x0DB8,0x0000,0x0000, 0x0DB9,0x0000,0x0000, 0x0DBA,0x0000,0x0000, -0xFBC0,0xAFFC,0x0000, 0xFBC0,0xAFFD,0x0000, 0xFBC0,0xAFFE,0x0000, -0xFBC0,0xAFFF,0x0000 }; - -uint16 page030data[]= { /* 3000 (3 weights per char) */ -0x0209,0x0000,0x0000, 0x0237,0x0000,0x0000, 0x0266,0x0000,0x0000, -0x02E2,0x0000,0x0000, 0x0DBB,0x0000,0x0000, 0x0E05,0x0000,0x0000, -0x1E5D,0x1E73,0x0000, 0x0E29,0x0000,0x0000, 0x02AE,0x0000,0x0000, -0x02AF,0x0000,0x0000, 0x02B0,0x0000,0x0000, 0x02B1,0x0000,0x0000, -0x02B2,0x0000,0x0000, 0x02B3,0x0000,0x0000, 0x02B4,0x0000,0x0000, -0x02B5,0x0000,0x0000, 0x02B6,0x0000,0x0000, 0x02B7,0x0000,0x0000, -0x0DBC,0x0000,0x0000, 0x0DBD,0x0000,0x0000, 0x02B8,0x0000,0x0000, -0x02B9,0x0000,0x0000, 0x02BA,0x0000,0x0000, 0x02BB,0x0000,0x0000, -0x02BC,0x0000,0x0000, 0x02BD,0x0000,0x0000, 0x02BE,0x0000,0x0000, -0x02BF,0x0000,0x0000, 0x022B,0x0000,0x0000, 0x0283,0x0000,0x0000, -0x0284,0x0000,0x0000, 0x0285,0x0000,0x0000, 0x0DBE,0x0000,0x0000, -0x0E2A,0x0000,0x0000, 0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, -0x0E2D,0x0000,0x0000, 0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, -0x0E30,0x0000,0x0000, 0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x022C,0x0000,0x0000, 0x0E07,0x0000,0x0000, 0x0E07,0x0000,0x0000, -0x0E08,0x0000,0x0000, 0x0E08,0x0000,0x0000, 0x0E09,0x0000,0x0000, -0x0DBC,0x0000,0x0000, 0x0DBF,0x0000,0x0000, 0xFB40,0xD341,0x0000, -0xFB40,0xD344,0x0000, 0xFB40,0xD345,0x0000, 0x0E06,0x0000,0x0000, -0x1E70,0x1E5E,0x0000, 0x02E3,0x0000,0x0000, 0x0DC0,0x0000,0x0000, -0x0DC1,0x0000,0x0000, 0xFBC0,0xB040,0x0000, 0x1E52,0x0000,0x0000, -0x1E52,0x0000,0x0000, 0x1E53,0x0000,0x0000, 0x1E53,0x0000,0x0000, -0x1E54,0x0000,0x0000, 0x1E54,0x0000,0x0000, 0x1E55,0x0000,0x0000, -0x1E55,0x0000,0x0000, 0x1E56,0x0000,0x0000, 0x1E56,0x0000,0x0000, -0x1E57,0x0000,0x0000, 0x1E57,0x0000,0x0000, 0x1E58,0x0000,0x0000, -0x1E58,0x0000,0x0000, 0x1E59,0x0000,0x0000, 0x1E59,0x0000,0x0000, -0x1E5A,0x0000,0x0000, 0x1E5A,0x0000,0x0000, 0x1E5B,0x0000,0x0000, -0x1E5B,0x0000,0x0000, 0x1E5C,0x0000,0x0000, 0x1E5C,0x0000,0x0000, -0x1E5D,0x0000,0x0000, 0x1E5D,0x0000,0x0000, 0x1E5E,0x0000,0x0000, -0x1E5E,0x0000,0x0000, 0x1E5F,0x0000,0x0000, 0x1E5F,0x0000,0x0000, -0x1E60,0x0000,0x0000, 0x1E60,0x0000,0x0000, 0x1E61,0x0000,0x0000, -0x1E61,0x0000,0x0000, 0x1E62,0x0000,0x0000, 0x1E62,0x0000,0x0000, -0x1E63,0x0000,0x0000, 0x1E63,0x0000,0x0000, 0x1E63,0x0000,0x0000, -0x1E64,0x0000,0x0000, 0x1E64,0x0000,0x0000, 0x1E65,0x0000,0x0000, -0x1E65,0x0000,0x0000, 0x1E66,0x0000,0x0000, 0x1E67,0x0000,0x0000, -0x1E68,0x0000,0x0000, 0x1E69,0x0000,0x0000, 0x1E6A,0x0000,0x0000, -0x1E6B,0x0000,0x0000, 0x1E6B,0x0000,0x0000, 0x1E6B,0x0000,0x0000, -0x1E6C,0x0000,0x0000, 0x1E6C,0x0000,0x0000, 0x1E6C,0x0000,0x0000, -0x1E6D,0x0000,0x0000, 0x1E6D,0x0000,0x0000, 0x1E6D,0x0000,0x0000, -0x1E6E,0x0000,0x0000, 0x1E6E,0x0000,0x0000, 0x1E6E,0x0000,0x0000, -0x1E6F,0x0000,0x0000, 0x1E6F,0x0000,0x0000, 0x1E6F,0x0000,0x0000, -0x1E70,0x0000,0x0000, 0x1E71,0x0000,0x0000, 0x1E72,0x0000,0x0000, -0x1E73,0x0000,0x0000, 0x1E74,0x0000,0x0000, 0x1E75,0x0000,0x0000, -0x1E75,0x0000,0x0000, 0x1E76,0x0000,0x0000, 0x1E76,0x0000,0x0000, -0x1E77,0x0000,0x0000, 0x1E77,0x0000,0x0000, 0x1E78,0x0000,0x0000, -0x1E79,0x0000,0x0000, 0x1E7A,0x0000,0x0000, 0x1E7B,0x0000,0x0000, -0x1E7C,0x0000,0x0000, 0x1E7D,0x0000,0x0000, 0x1E7D,0x0000,0x0000, -0x1E7E,0x0000,0x0000, 0x1E7F,0x0000,0x0000, 0x1E80,0x0000,0x0000, -0x1E81,0x0000,0x0000, 0x1E54,0x0000,0x0000, 0x1E57,0x0000,0x0000, -0x1E5A,0x0000,0x0000, 0xFBC0,0xB097,0x0000, 0xFBC0,0xB098,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x021E,0x0000,0x0000, -0x021F,0x0000,0x0000, 0x0E0A,0x0000,0x0000, 0x0E0A,0x0000,0x0000, -0x1E77,0x1E79,0x0000, 0x022D,0x0000,0x0000, 0x1E52,0x0000,0x0000, -0x1E52,0x0000,0x0000, 0x1E53,0x0000,0x0000, 0x1E53,0x0000,0x0000, -0x1E54,0x0000,0x0000, 0x1E54,0x0000,0x0000, 0x1E55,0x0000,0x0000, -0x1E55,0x0000,0x0000, 0x1E56,0x0000,0x0000, 0x1E56,0x0000,0x0000, -0x1E57,0x0000,0x0000, 0x1E57,0x0000,0x0000, 0x1E58,0x0000,0x0000, -0x1E58,0x0000,0x0000, 0x1E59,0x0000,0x0000, 0x1E59,0x0000,0x0000, -0x1E5A,0x0000,0x0000, 0x1E5A,0x0000,0x0000, 0x1E5B,0x0000,0x0000, -0x1E5B,0x0000,0x0000, 0x1E5C,0x0000,0x0000, 0x1E5C,0x0000,0x0000, -0x1E5D,0x0000,0x0000, 0x1E5D,0x0000,0x0000, 0x1E5E,0x0000,0x0000, -0x1E5E,0x0000,0x0000, 0x1E5F,0x0000,0x0000, 0x1E5F,0x0000,0x0000, -0x1E60,0x0000,0x0000, 0x1E60,0x0000,0x0000, 0x1E61,0x0000,0x0000, -0x1E61,0x0000,0x0000, 0x1E62,0x0000,0x0000, 0x1E62,0x0000,0x0000, -0x1E63,0x0000,0x0000, 0x1E63,0x0000,0x0000, 0x1E63,0x0000,0x0000, -0x1E64,0x0000,0x0000, 0x1E64,0x0000,0x0000, 0x1E65,0x0000,0x0000, -0x1E65,0x0000,0x0000, 0x1E66,0x0000,0x0000, 0x1E67,0x0000,0x0000, -0x1E68,0x0000,0x0000, 0x1E69,0x0000,0x0000, 0x1E6A,0x0000,0x0000, -0x1E6B,0x0000,0x0000, 0x1E6B,0x0000,0x0000, 0x1E6B,0x0000,0x0000, -0x1E6C,0x0000,0x0000, 0x1E6C,0x0000,0x0000, 0x1E6C,0x0000,0x0000, -0x1E6D,0x0000,0x0000, 0x1E6D,0x0000,0x0000, 0x1E6D,0x0000,0x0000, -0x1E6E,0x0000,0x0000, 0x1E6E,0x0000,0x0000, 0x1E6E,0x0000,0x0000, -0x1E6F,0x0000,0x0000, 0x1E6F,0x0000,0x0000, 0x1E6F,0x0000,0x0000, -0x1E70,0x0000,0x0000, 0x1E71,0x0000,0x0000, 0x1E72,0x0000,0x0000, -0x1E73,0x0000,0x0000, 0x1E74,0x0000,0x0000, 0x1E75,0x0000,0x0000, -0x1E75,0x0000,0x0000, 0x1E76,0x0000,0x0000, 0x1E76,0x0000,0x0000, -0x1E77,0x0000,0x0000, 0x1E77,0x0000,0x0000, 0x1E78,0x0000,0x0000, -0x1E79,0x0000,0x0000, 0x1E7A,0x0000,0x0000, 0x1E7B,0x0000,0x0000, -0x1E7C,0x0000,0x0000, 0x1E7D,0x0000,0x0000, 0x1E7D,0x0000,0x0000, -0x1E7E,0x0000,0x0000, 0x1E7F,0x0000,0x0000, 0x1E80,0x0000,0x0000, -0x1E81,0x0000,0x0000, 0x1E54,0x0000,0x0000, 0x1E57,0x0000,0x0000, -0x1E5A,0x0000,0x0000, 0x1E7D,0x0000,0x0000, 0x1E7E,0x0000,0x0000, -0x1E7F,0x0000,0x0000, 0x1E80,0x0000,0x0000, 0x022E,0x0000,0x0000, -0x0E0B,0x0000,0x0000, 0x0E0C,0x0000,0x0000, 0x0E0C,0x0000,0x0000, -0x1E5B,0x1E65,0x0000 }; - -uint16 page031data[]= { /* 3100 (3 weights per char) */ -0xFBC0,0xB100,0x0000, 0xFBC0,0xB101,0x0000, 0xFBC0,0xB102,0x0000, -0xFBC0,0xB103,0x0000, 0xFBC0,0xB104,0x0000, 0x1E82,0x0000,0x0000, -0x1E83,0x0000,0x0000, 0x1E84,0x0000,0x0000, 0x1E85,0x0000,0x0000, -0x1E87,0x0000,0x0000, 0x1E88,0x0000,0x0000, 0x1E89,0x0000,0x0000, -0x1E8A,0x0000,0x0000, 0x1E8B,0x0000,0x0000, 0x1E8C,0x0000,0x0000, -0x1E8F,0x0000,0x0000, 0x1E90,0x0000,0x0000, 0x1E91,0x0000,0x0000, -0x1E92,0x0000,0x0000, 0x1E94,0x0000,0x0000, 0x1E95,0x0000,0x0000, -0x1E96,0x0000,0x0000, 0x1E97,0x0000,0x0000, 0x1E98,0x0000,0x0000, -0x1E99,0x0000,0x0000, 0x1E9A,0x0000,0x0000, 0x1E9B,0x0000,0x0000, -0x1E9C,0x0000,0x0000, 0x1E9E,0x0000,0x0000, 0x1E9F,0x0000,0x0000, -0x1EA1,0x0000,0x0000, 0x1EA2,0x0000,0x0000, 0x1EA3,0x0000,0x0000, -0x1EA4,0x0000,0x0000, 0x1EA5,0x0000,0x0000, 0x1EA6,0x0000,0x0000, -0x1EA7,0x0000,0x0000, 0x1EA9,0x0000,0x0000, 0x1EAD,0x0000,0x0000, -0x1EAE,0x0000,0x0000, 0x1EAF,0x0000,0x0000, 0x1EB0,0x0000,0x0000, -0x1E86,0x0000,0x0000, 0x1E8D,0x0000,0x0000, 0x1E93,0x0000,0x0000, -0xFBC0,0xB12D,0x0000, 0xFBC0,0xB12E,0x0000, 0xFBC0,0xB12F,0x0000, -0xFBC0,0xB130,0x0000, 0x1D62,0x0000,0x0000, 0x1D63,0x0000,0x0000, -0x1E02,0x0000,0x0000, 0x1D64,0x0000,0x0000, 0x1E04,0x0000,0x0000, -0x1E05,0x0000,0x0000, 0x1D65,0x0000,0x0000, 0x1D66,0x0000,0x0000, -0x1D67,0x0000,0x0000, 0x1E08,0x0000,0x0000, 0x1E09,0x0000,0x0000, -0x1E0A,0x0000,0x0000, 0x1E0B,0x0000,0x0000, 0x1E0C,0x0000,0x0000, -0x1E0D,0x0000,0x0000, 0x1D7C,0x0000,0x0000, 0x1D68,0x0000,0x0000, -0x1D69,0x0000,0x0000, 0x1D6A,0x0000,0x0000, 0x1D83,0x0000,0x0000, -0x1D6B,0x0000,0x0000, 0x1D6C,0x0000,0x0000, 0x1D6D,0x0000,0x0000, -0x1D6E,0x0000,0x0000, 0x1D6F,0x0000,0x0000, 0x1D70,0x0000,0x0000, -0x1D71,0x0000,0x0000, 0x1D72,0x0000,0x0000, 0x1D73,0x0000,0x0000, -0x1D74,0x0000,0x0000, 0x1DBE,0x0000,0x0000, 0x1DBF,0x0000,0x0000, -0x1DC0,0x0000,0x0000, 0x1DC1,0x0000,0x0000, 0x1DC2,0x0000,0x0000, -0x1DC3,0x0000,0x0000, 0x1DC4,0x0000,0x0000, 0x1DC5,0x0000,0x0000, -0x1DC6,0x0000,0x0000, 0x1DC7,0x0000,0x0000, 0x1DC8,0x0000,0x0000, -0x1DC9,0x0000,0x0000, 0x1DCA,0x0000,0x0000, 0x1DCB,0x0000,0x0000, -0x1DCC,0x0000,0x0000, 0x1DCD,0x0000,0x0000, 0x1DCE,0x0000,0x0000, -0x1DCF,0x0000,0x0000, 0x1DD0,0x0000,0x0000, 0x1DD1,0x0000,0x0000, -0x1DD2,0x0000,0x0000, 0x1DBD,0x0000,0x0000, 0x1D76,0x0000,0x0000, -0x1D77,0x0000,0x0000, 0x1E1F,0x0000,0x0000, 0x1E20,0x0000,0x0000, -0x1E24,0x0000,0x0000, 0x1E26,0x0000,0x0000, 0x1E2B,0x0000,0x0000, -0x1E2F,0x0000,0x0000, 0x1E31,0x0000,0x0000, 0x1D7E,0x0000,0x0000, -0x1E35,0x0000,0x0000, 0x1E37,0x0000,0x0000, 0x1D7F,0x0000,0x0000, -0x1D80,0x0000,0x0000, 0x1D82,0x0000,0x0000, 0x1D84,0x0000,0x0000, -0x1D85,0x0000,0x0000, 0x1D89,0x0000,0x0000, 0x1D8B,0x0000,0x0000, -0x1D8D,0x0000,0x0000, 0x1D8E,0x0000,0x0000, 0x1D8F,0x0000,0x0000, -0x1D90,0x0000,0x0000, 0x1D91,0x0000,0x0000, 0x1D94,0x0000,0x0000, -0x1D98,0x0000,0x0000, 0x1DA2,0x0000,0x0000, 0x1DA9,0x0000,0x0000, -0x1DAE,0x0000,0x0000, 0x1E49,0x0000,0x0000, 0x1E4A,0x0000,0x0000, -0x1DB9,0x0000,0x0000, 0x1DBA,0x0000,0x0000, 0x1DBB,0x0000,0x0000, -0x1DE1,0x0000,0x0000, 0x1DE2,0x0000,0x0000, 0x1DE5,0x0000,0x0000, -0x1DEE,0x0000,0x0000, 0x1DEF,0x0000,0x0000, 0x1DF1,0x0000,0x0000, -0x1DFB,0x0000,0x0000, 0x1DFE,0x0000,0x0000, 0xFBC0,0xB18F,0x0000, -0x0DC2,0x0000,0x0000, 0x0DC3,0x0000,0x0000, 0xFB40,0xCE00,0x0000, -0xFB40,0xCE8C,0x0000, 0xFB40,0xCE09,0x0000, 0xFB40,0xD6DB,0x0000, -0xFB40,0xCE0A,0x0000, 0xFB40,0xCE2D,0x0000, 0xFB40,0xCE0B,0x0000, -0xFB40,0xF532,0x0000, 0xFB40,0xCE59,0x0000, 0xFB40,0xCE19,0x0000, -0xFB40,0xCE01,0x0000, 0xFB40,0xD929,0x0000, 0xFB40,0xD730,0x0000, -0xFB40,0xCEBA,0x0000, 0x1E82,0x0000,0x0000, 0x1E98,0x0000,0x0000, -0x1E90,0x0000,0x0000, 0x1E8B,0x0000,0x0000, 0x1EA0,0x0000,0x0000, -0x1EA0,0x0000,0x0000, 0x1E9D,0x0000,0x0000, 0x1E9C,0x0000,0x0000, -0x1EAF,0x0000,0x0000, 0x1E9B,0x0000,0x0000, 0x1EAE,0x0000,0x0000, -0x1EAF,0x0000,0x0000, 0x1EAC,0x0000,0x0000, 0x1E8E,0x0000,0x0000, -0x1EA1,0x0000,0x0000, 0x1EA3,0x0000,0x0000, 0x1EAA,0x0000,0x0000, -0x1EAB,0x0000,0x0000, 0x1EA8,0x0000,0x0000, 0x1EAE,0x0000,0x0000, -0x1E83,0x0000,0x0000, 0x1E88,0x0000,0x0000, 0x1E8C,0x0000,0x0000, -0x1E8F,0x0000,0x0000, 0xFBC0,0xB1B8,0x0000, 0xFBC0,0xB1B9,0x0000, -0xFBC0,0xB1BA,0x0000, 0xFBC0,0xB1BB,0x0000, 0xFBC0,0xB1BC,0x0000, -0xFBC0,0xB1BD,0x0000, 0xFBC0,0xB1BE,0x0000, 0xFBC0,0xB1BF,0x0000, -0xFBC0,0xB1C0,0x0000, 0xFBC0,0xB1C1,0x0000, 0xFBC0,0xB1C2,0x0000, -0xFBC0,0xB1C3,0x0000, 0xFBC0,0xB1C4,0x0000, 0xFBC0,0xB1C5,0x0000, -0xFBC0,0xB1C6,0x0000, 0xFBC0,0xB1C7,0x0000, 0xFBC0,0xB1C8,0x0000, -0xFBC0,0xB1C9,0x0000, 0xFBC0,0xB1CA,0x0000, 0xFBC0,0xB1CB,0x0000, -0xFBC0,0xB1CC,0x0000, 0xFBC0,0xB1CD,0x0000, 0xFBC0,0xB1CE,0x0000, -0xFBC0,0xB1CF,0x0000, 0xFBC0,0xB1D0,0x0000, 0xFBC0,0xB1D1,0x0000, -0xFBC0,0xB1D2,0x0000, 0xFBC0,0xB1D3,0x0000, 0xFBC0,0xB1D4,0x0000, -0xFBC0,0xB1D5,0x0000, 0xFBC0,0xB1D6,0x0000, 0xFBC0,0xB1D7,0x0000, -0xFBC0,0xB1D8,0x0000, 0xFBC0,0xB1D9,0x0000, 0xFBC0,0xB1DA,0x0000, -0xFBC0,0xB1DB,0x0000, 0xFBC0,0xB1DC,0x0000, 0xFBC0,0xB1DD,0x0000, -0xFBC0,0xB1DE,0x0000, 0xFBC0,0xB1DF,0x0000, 0xFBC0,0xB1E0,0x0000, -0xFBC0,0xB1E1,0x0000, 0xFBC0,0xB1E2,0x0000, 0xFBC0,0xB1E3,0x0000, -0xFBC0,0xB1E4,0x0000, 0xFBC0,0xB1E5,0x0000, 0xFBC0,0xB1E6,0x0000, -0xFBC0,0xB1E7,0x0000, 0xFBC0,0xB1E8,0x0000, 0xFBC0,0xB1E9,0x0000, -0xFBC0,0xB1EA,0x0000, 0xFBC0,0xB1EB,0x0000, 0xFBC0,0xB1EC,0x0000, -0xFBC0,0xB1ED,0x0000, 0xFBC0,0xB1EE,0x0000, 0xFBC0,0xB1EF,0x0000, -0x1E59,0x0000,0x0000, 0x1E5D,0x0000,0x0000, 0x1E5E,0x0000,0x0000, -0x1E65,0x0000,0x0000, 0x1E68,0x0000,0x0000, 0x1E6B,0x0000,0x0000, -0x1E6C,0x0000,0x0000, 0x1E6D,0x0000,0x0000, 0x1E6E,0x0000,0x0000, -0x1E6F,0x0000,0x0000, 0x1E72,0x0000,0x0000, 0x1E78,0x0000,0x0000, -0x1E79,0x0000,0x0000, 0x1E7A,0x0000,0x0000, 0x1E7B,0x0000,0x0000, -0x1E7C,0x0000,0x0000 }; - -uint16 page032data[]= { /* 3200 (8 weights per char) */ -0x0288,0x1D62,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D64,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D65,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D67,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D68,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D69,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D6B,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D6D,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D6E,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D70,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D71,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D72,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D73,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D74,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D62,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D64,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D65,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D67,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D68,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D69,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D6B,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D6D,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D6E,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D70,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D71,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D72,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D73,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D74,0x1DBE,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D6E,0x1DCB,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0x1D6D,0x1DC6,0x1D6E,0x1DC2,0x1E03,0x0289,0x0000, -0x0288,0x1D6D,0x1DC6,0x1D74,0x1DCB,0x0289,0x0000,0x0000, -0xFBC0,0xB21F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xCE00,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xCE8C,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xCE09,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xD6DB,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xCE94,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xD16D,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xCE03,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xD16B,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xCE5D,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xD341,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xE708,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xF06B,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xEC34,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xE728,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB41,0x91D1,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xD71F,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xE5E5,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xE82A,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xE709,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xF93E,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xD40D,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xF279,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB41,0x8CA1,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xF95D,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xD2B4,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xCEE3,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xD47C,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xDB66,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xF6E3,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xCF01,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB41,0x8CC7,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xD354,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xF96D,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB40,0xCF11,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB41,0x81EA,0x0289,0x0000,0x0000,0x0000,0x0000, -0x0288,0xFB41,0x81F3,0x0289,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB244,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB245,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB246,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB247,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB248,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB249,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB24A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB24B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB24C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB24D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB24E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB24F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x1002,0x0E8B,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E30,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E31,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E32,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E29,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E2A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E2B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E2C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E2D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D62,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D64,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D65,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D67,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D68,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D69,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D6B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D6D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D6E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D70,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D71,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D72,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D73,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D74,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D62,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D64,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D65,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D67,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D68,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D69,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D6B,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D6D,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D6E,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D70,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D71,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D72,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D73,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D74,0x1DBE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1D70,0x1DBE,0x1E0F,0x1D62,0x1DC6,0x0000,0x0000,0x0000, -0x1D6E,0x1DCB,0x1D6D,0x1DD1,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB27E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0DC4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCE00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCE8C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCE09,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD6DB,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCE94,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD16D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCE03,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD16B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCE5D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD341,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xF06B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xEC34,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xE728,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB41,0x91D1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD71F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xE82A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xE709,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xF93E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD40D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xF279,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB41,0x8CA1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xF95D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD2B4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xF9D8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xF537,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD973,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB41,0x9069,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD12A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD370,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xECE8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB41,0x9805,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCF11,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD199,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xEB63,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCE0A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCE2D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCE0B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xDDE6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD3F3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD33B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xDB97,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xDB66,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xF6E3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xCF01,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB41,0x8CC7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD354,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD91C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E2F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E30,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E31,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E32,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E29,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E2A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E2B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E2C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E2D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E2F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E30,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E31,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0x0E32,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2E,0x0E29,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2E,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2F,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E30,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E31,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E32,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E29,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2A,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2B,0xFB40,0xE708,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0EC1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E8B,0x0FC0,0x0EC1,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E8B,0x1044,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F2E,0x1002,0x0E6D,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E52,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E53,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E54,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E55,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E56,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E57,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E58,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E59,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E60,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E61,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E62,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E63,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E64,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E66,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E67,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E68,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E69,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E70,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E71,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E72,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E73,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E74,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E75,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E76,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E77,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E78,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E79,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E80,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC0,0xB2FF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - -uint16 page033data[]= { /* 3300 (9 weights per char) */ -0x1E52,0x1E6B,0x0E0B,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E52,0x1E7A,0x1E6D,0x1E52,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E52,0x1E81,0x1E6E,0x1E52,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E52,0x0E0B,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E53,0x1E67,0x1E81,0x1E59,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E53,0x1E81,0x1E62,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E54,0x1E56,0x1E81,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E55,0x1E5E,0x1E59,0x0E0B,0x1E65,0x0000,0x0000,0x0000,0x0000, -0x1E55,0x0E0B,0x1E57,0x0E0B,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E56,0x1E81,0x1E5E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E56,0x0E0B,0x1E72,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E57,0x1E53,0x1E79,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E57,0x1E78,0x1E63,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E57,0x1E7C,0x1E79,0x0E0B,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E57,0x1E7C,0x1E81,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E57,0x1E81,0x1E70,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E58,0x1E57,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E58,0x1E67,0x0E0B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E58,0x1E76,0x1E79,0x0E0B,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E58,0x1E7A,0x1E61,0x0E0B,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E58,0x1E7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E58,0x1E7C,0x1E59,0x1E78,0x1E72,0x0000,0x0000,0x0000,0x0000, -0x1E58,0x1E7C,0x1E73,0x0E0B,0x1E65,0x1E7A,0x0000,0x0000,0x0000, -0x1E58,0x1E7C,0x1E7D,0x1E63,0x1E65,0x0000,0x0000,0x0000,0x0000, -0x1E59,0x1E78,0x1E72,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E59,0x1E78,0x1E72,0x1E65,0x1E81,0x0000,0x0000,0x0000,0x0000, -0x1E59,0x1E7A,0x1E5F,0x1E53,0x1E7C,0x0000,0x0000,0x0000,0x0000, -0x1E59,0x1E7C,0x0E0B,0x1E69,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5A,0x0E0B,0x1E5E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5B,0x1E7A,0x1E66,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5B,0x0E0B,0x1E6F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5C,0x1E53,0x1E59,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5C,0x1E81,0x1E62,0x0E0B,0x1E72,0x0000,0x0000,0x0000,0x0000, -0x1E5D,0x1E79,0x1E81,0x1E59,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5F,0x1E81,0x1E62,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E5F,0x1E81,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E61,0x0E0B,0x1E5E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E64,0x1E5D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E65,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E65,0x1E81,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E66,0x1E6A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6A,0x1E63,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6B,0x1E53,0x1E63,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6B,0x0E0B,0x1E5F,0x1E81,0x1E65,0x0000,0x0000,0x0000,0x0000, -0x1E6B,0x0E0B,0x1E63,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6B,0x0E0B,0x1E7B,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6C,0x1E52,0x1E5E,0x1E65,0x1E7A,0x0000,0x0000,0x0000,0x0000, -0x1E6C,0x1E59,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6C,0x1E5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6C,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6D,0x1E52,0x1E78,0x1E63,0x1E65,0x0000,0x0000,0x0000,0x0000, -0x1E6D,0x1E53,0x0E0B,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6D,0x1E63,0x1E5D,0x1E55,0x1E7A,0x0000,0x0000,0x0000,0x0000, -0x1E6D,0x1E78,0x1E81,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6E,0x1E59,0x1E61,0x0E0B,0x1E7A,0x0000,0x0000,0x0000,0x0000, -0x1E6E,0x1E60,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6E,0x1E67,0x1E6C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6E,0x1E7A,0x1E63,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6E,0x1E81,0x1E5E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6E,0x0E0B,0x1E5D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6E,0x0E0B,0x1E61,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6F,0x1E53,0x1E81,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6F,0x1E7A,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6F,0x1E81,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6F,0x1E81,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6F,0x0E0B,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E6F,0x0E0B,0x1E81,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E70,0x1E53,0x1E59,0x1E7C,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E70,0x1E53,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E70,0x1E63,0x1E6B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E70,0x1E7A,0x1E59,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E70,0x1E81,0x1E5D,0x1E77,0x1E81,0x0000,0x0000,0x0000,0x0000, -0x1E71,0x1E59,0x1E7C,0x1E81,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E71,0x1E79,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E71,0x1E79,0x1E6B,0x0E0B,0x1E7A,0x0000,0x0000,0x0000,0x0000, -0x1E73,0x1E57,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E73,0x1E57,0x1E65,0x1E81,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E73,0x0E0B,0x1E65,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E75,0x0E0B,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E75,0x0E0B,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E76,0x1E52,0x1E81,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E79,0x1E63,0x1E65,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E79,0x1E78,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7A,0x1E6C,0x0E0B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7A,0x0E0B,0x1E6D,0x1E7A,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7B,0x1E72,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1E7B,0x1E81,0x1E65,0x1E5A,0x1E81,0x0000,0x0000,0x0000,0x0000, -0x1E7D,0x1E63,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E29,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2E,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2F,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E30,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E31,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E32,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E29,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2A,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2B,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2C,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2D,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2E,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2F,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E30,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E31,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E32,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E29,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2A,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2B,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2C,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2D,0xFB40,0xF0B9,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0FA7,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E33,0x101F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E4A,0x0E33,0x0FC0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F82,0x1044,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x0E60,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0F5B,0x0E2B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0F5B,0x0E2C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x101F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xDE73,0xFB40,0xE210,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xE62D,0xFB40,0xD48C,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xD927,0xFB40,0xEB63,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xE60E,0xFB40,0xECBB,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFB40,0xE82A,0xFB40,0xDF0F,0xFB40,0xCF1A,0xFB40,0xF93E,0x0000, -0x0FA7,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x10F8,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0E4A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0E4A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EC1,0x0E4A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0E33,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0E60,0x0E33,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x0EB9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x0EB9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x10F8,0x0EB9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x10F8,0x0EC1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0EC1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0EC1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x106A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0EE1,0x106A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0EE1,0x106A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EC1,0x0EE1,0x106A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1002,0x0EE1,0x106A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x10F8,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EB9,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x10F8,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0F5B,0x0E2B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0F5B,0x0E2B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0E2B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0F5B,0x0E2B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0F5B,0x0E2C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0F5B,0x0E2C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0E2C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0F5B,0x0E2C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0437,0x0FEA,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0437,0x0FEA,0x0E2B,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0FA7,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0FA7,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EC1,0x0FA7,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FC0,0x0E33,0x0E6D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FC0,0x0E33,0x0E6D,0x0437,0x0FEA,0x0000,0x0000,0x0000,0x0000, -0x0FC0,0x0E33,0x0E6D,0x0437,0x0FEA,0x0E2B,0x0000,0x0000,0x0000, -0x0FA7,0x0FEA,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x0FEA,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x10F8,0x0FEA,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0FEA,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x1044,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x1044,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x10F8,0x1044,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x1044,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x1044,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x1044,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x1051,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F64,0x1051,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x10F8,0x1051,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x1051,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x1051,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x1051,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x1109,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x1109,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E33,0x025D,0x0F5B,0x025D,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E4A,0x0FB4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0E60,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0E6D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0437,0x0F21,0x0EC1,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E60,0x0F82,0x025D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E6D,0x0E4A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EC1,0x105E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0E33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EE1,0x0FA7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EFB,0x0F64,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0F21,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F21,0x1002,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F2E,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F2E,0x0F64,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F2E,0x0F82,0x0EC1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F2E,0x105A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0E4A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0EFB,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0F5B,0x0F82,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x0EE1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x025D,0x0F5B,0x025D,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x0FA7,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FA7,0x0FC0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FEA,0x0FC0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0FEA,0x1044,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1051,0x0E4A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1044,0x0437,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E33,0x0437,0x0F5B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2D,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2E,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2F,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E30,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E31,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E32,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E29,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2A,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2B,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2C,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2D,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2E,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E2F,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E30,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E31,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2A,0x0E32,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E29,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2A,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2B,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2C,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2D,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2E,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E2F,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E30,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E31,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2B,0x0E32,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E29,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0E2C,0x0E2A,0xFB40,0xE5E5,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0EC1,0x0E33,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - -uint16 page04Ddata[]= { /* 4D00 (3 weights per char) */ -0xFB80,0xCD00,0x0000, 0xFB80,0xCD01,0x0000, 0xFB80,0xCD02,0x0000, -0xFB80,0xCD03,0x0000, 0xFB80,0xCD04,0x0000, 0xFB80,0xCD05,0x0000, -0xFB80,0xCD06,0x0000, 0xFB80,0xCD07,0x0000, 0xFB80,0xCD08,0x0000, -0xFB80,0xCD09,0x0000, 0xFB80,0xCD0A,0x0000, 0xFB80,0xCD0B,0x0000, -0xFB80,0xCD0C,0x0000, 0xFB80,0xCD0D,0x0000, 0xFB80,0xCD0E,0x0000, -0xFB80,0xCD0F,0x0000, 0xFB80,0xCD10,0x0000, 0xFB80,0xCD11,0x0000, -0xFB80,0xCD12,0x0000, 0xFB80,0xCD13,0x0000, 0xFB80,0xCD14,0x0000, -0xFB80,0xCD15,0x0000, 0xFB80,0xCD16,0x0000, 0xFB80,0xCD17,0x0000, -0xFB80,0xCD18,0x0000, 0xFB80,0xCD19,0x0000, 0xFB80,0xCD1A,0x0000, -0xFB80,0xCD1B,0x0000, 0xFB80,0xCD1C,0x0000, 0xFB80,0xCD1D,0x0000, -0xFB80,0xCD1E,0x0000, 0xFB80,0xCD1F,0x0000, 0xFB80,0xCD20,0x0000, -0xFB80,0xCD21,0x0000, 0xFB80,0xCD22,0x0000, 0xFB80,0xCD23,0x0000, -0xFB80,0xCD24,0x0000, 0xFB80,0xCD25,0x0000, 0xFB80,0xCD26,0x0000, -0xFB80,0xCD27,0x0000, 0xFB80,0xCD28,0x0000, 0xFB80,0xCD29,0x0000, -0xFB80,0xCD2A,0x0000, 0xFB80,0xCD2B,0x0000, 0xFB80,0xCD2C,0x0000, -0xFB80,0xCD2D,0x0000, 0xFB80,0xCD2E,0x0000, 0xFB80,0xCD2F,0x0000, -0xFB80,0xCD30,0x0000, 0xFB80,0xCD31,0x0000, 0xFB80,0xCD32,0x0000, -0xFB80,0xCD33,0x0000, 0xFB80,0xCD34,0x0000, 0xFB80,0xCD35,0x0000, -0xFB80,0xCD36,0x0000, 0xFB80,0xCD37,0x0000, 0xFB80,0xCD38,0x0000, -0xFB80,0xCD39,0x0000, 0xFB80,0xCD3A,0x0000, 0xFB80,0xCD3B,0x0000, -0xFB80,0xCD3C,0x0000, 0xFB80,0xCD3D,0x0000, 0xFB80,0xCD3E,0x0000, -0xFB80,0xCD3F,0x0000, 0xFB80,0xCD40,0x0000, 0xFB80,0xCD41,0x0000, -0xFB80,0xCD42,0x0000, 0xFB80,0xCD43,0x0000, 0xFB80,0xCD44,0x0000, -0xFB80,0xCD45,0x0000, 0xFB80,0xCD46,0x0000, 0xFB80,0xCD47,0x0000, -0xFB80,0xCD48,0x0000, 0xFB80,0xCD49,0x0000, 0xFB80,0xCD4A,0x0000, -0xFB80,0xCD4B,0x0000, 0xFB80,0xCD4C,0x0000, 0xFB80,0xCD4D,0x0000, -0xFB80,0xCD4E,0x0000, 0xFB80,0xCD4F,0x0000, 0xFB80,0xCD50,0x0000, -0xFB80,0xCD51,0x0000, 0xFB80,0xCD52,0x0000, 0xFB80,0xCD53,0x0000, -0xFB80,0xCD54,0x0000, 0xFB80,0xCD55,0x0000, 0xFB80,0xCD56,0x0000, -0xFB80,0xCD57,0x0000, 0xFB80,0xCD58,0x0000, 0xFB80,0xCD59,0x0000, -0xFB80,0xCD5A,0x0000, 0xFB80,0xCD5B,0x0000, 0xFB80,0xCD5C,0x0000, -0xFB80,0xCD5D,0x0000, 0xFB80,0xCD5E,0x0000, 0xFB80,0xCD5F,0x0000, -0xFB80,0xCD60,0x0000, 0xFB80,0xCD61,0x0000, 0xFB80,0xCD62,0x0000, -0xFB80,0xCD63,0x0000, 0xFB80,0xCD64,0x0000, 0xFB80,0xCD65,0x0000, -0xFB80,0xCD66,0x0000, 0xFB80,0xCD67,0x0000, 0xFB80,0xCD68,0x0000, -0xFB80,0xCD69,0x0000, 0xFB80,0xCD6A,0x0000, 0xFB80,0xCD6B,0x0000, -0xFB80,0xCD6C,0x0000, 0xFB80,0xCD6D,0x0000, 0xFB80,0xCD6E,0x0000, -0xFB80,0xCD6F,0x0000, 0xFB80,0xCD70,0x0000, 0xFB80,0xCD71,0x0000, -0xFB80,0xCD72,0x0000, 0xFB80,0xCD73,0x0000, 0xFB80,0xCD74,0x0000, -0xFB80,0xCD75,0x0000, 0xFB80,0xCD76,0x0000, 0xFB80,0xCD77,0x0000, -0xFB80,0xCD78,0x0000, 0xFB80,0xCD79,0x0000, 0xFB80,0xCD7A,0x0000, -0xFB80,0xCD7B,0x0000, 0xFB80,0xCD7C,0x0000, 0xFB80,0xCD7D,0x0000, -0xFB80,0xCD7E,0x0000, 0xFB80,0xCD7F,0x0000, 0xFB80,0xCD80,0x0000, -0xFB80,0xCD81,0x0000, 0xFB80,0xCD82,0x0000, 0xFB80,0xCD83,0x0000, -0xFB80,0xCD84,0x0000, 0xFB80,0xCD85,0x0000, 0xFB80,0xCD86,0x0000, -0xFB80,0xCD87,0x0000, 0xFB80,0xCD88,0x0000, 0xFB80,0xCD89,0x0000, -0xFB80,0xCD8A,0x0000, 0xFB80,0xCD8B,0x0000, 0xFB80,0xCD8C,0x0000, -0xFB80,0xCD8D,0x0000, 0xFB80,0xCD8E,0x0000, 0xFB80,0xCD8F,0x0000, -0xFB80,0xCD90,0x0000, 0xFB80,0xCD91,0x0000, 0xFB80,0xCD92,0x0000, -0xFB80,0xCD93,0x0000, 0xFB80,0xCD94,0x0000, 0xFB80,0xCD95,0x0000, -0xFB80,0xCD96,0x0000, 0xFB80,0xCD97,0x0000, 0xFB80,0xCD98,0x0000, -0xFB80,0xCD99,0x0000, 0xFB80,0xCD9A,0x0000, 0xFB80,0xCD9B,0x0000, -0xFB80,0xCD9C,0x0000, 0xFB80,0xCD9D,0x0000, 0xFB80,0xCD9E,0x0000, -0xFB80,0xCD9F,0x0000, 0xFB80,0xCDA0,0x0000, 0xFB80,0xCDA1,0x0000, -0xFB80,0xCDA2,0x0000, 0xFB80,0xCDA3,0x0000, 0xFB80,0xCDA4,0x0000, -0xFB80,0xCDA5,0x0000, 0xFB80,0xCDA6,0x0000, 0xFB80,0xCDA7,0x0000, -0xFB80,0xCDA8,0x0000, 0xFB80,0xCDA9,0x0000, 0xFB80,0xCDAA,0x0000, -0xFB80,0xCDAB,0x0000, 0xFB80,0xCDAC,0x0000, 0xFB80,0xCDAD,0x0000, -0xFB80,0xCDAE,0x0000, 0xFB80,0xCDAF,0x0000, 0xFB80,0xCDB0,0x0000, -0xFB80,0xCDB1,0x0000, 0xFB80,0xCDB2,0x0000, 0xFB80,0xCDB3,0x0000, -0xFB80,0xCDB4,0x0000, 0xFB80,0xCDB5,0x0000, 0xFBC0,0xCDB6,0x0000, -0xFBC0,0xCDB7,0x0000, 0xFBC0,0xCDB8,0x0000, 0xFBC0,0xCDB9,0x0000, -0xFBC0,0xCDBA,0x0000, 0xFBC0,0xCDBB,0x0000, 0xFBC0,0xCDBC,0x0000, -0xFBC0,0xCDBD,0x0000, 0xFBC0,0xCDBE,0x0000, 0xFBC0,0xCDBF,0x0000, -0x0B37,0x0000,0x0000, 0x0B38,0x0000,0x0000, 0x0B39,0x0000,0x0000, -0x0B3A,0x0000,0x0000, 0x0B3B,0x0000,0x0000, 0x0B3C,0x0000,0x0000, -0x0B3D,0x0000,0x0000, 0x0B3E,0x0000,0x0000, 0x0B3F,0x0000,0x0000, -0x0B40,0x0000,0x0000, 0x0B41,0x0000,0x0000, 0x0B42,0x0000,0x0000, -0x0B43,0x0000,0x0000, 0x0B44,0x0000,0x0000, 0x0B45,0x0000,0x0000, -0x0B46,0x0000,0x0000, 0x0B47,0x0000,0x0000, 0x0B48,0x0000,0x0000, -0x0B49,0x0000,0x0000, 0x0B4A,0x0000,0x0000, 0x0B4B,0x0000,0x0000, -0x0B4C,0x0000,0x0000, 0x0B4D,0x0000,0x0000, 0x0B4E,0x0000,0x0000, -0x0B4F,0x0000,0x0000, 0x0B50,0x0000,0x0000, 0x0B51,0x0000,0x0000, -0x0B52,0x0000,0x0000, 0x0B53,0x0000,0x0000, 0x0B54,0x0000,0x0000, -0x0B55,0x0000,0x0000, 0x0B56,0x0000,0x0000, 0x0B57,0x0000,0x0000, -0x0B58,0x0000,0x0000, 0x0B59,0x0000,0x0000, 0x0B5A,0x0000,0x0000, -0x0B5B,0x0000,0x0000, 0x0B5C,0x0000,0x0000, 0x0B5D,0x0000,0x0000, -0x0B5E,0x0000,0x0000, 0x0B5F,0x0000,0x0000, 0x0B60,0x0000,0x0000, -0x0B61,0x0000,0x0000, 0x0B62,0x0000,0x0000, 0x0B63,0x0000,0x0000, -0x0B64,0x0000,0x0000, 0x0B65,0x0000,0x0000, 0x0B66,0x0000,0x0000, -0x0B67,0x0000,0x0000, 0x0B68,0x0000,0x0000, 0x0B69,0x0000,0x0000, -0x0B6A,0x0000,0x0000, 0x0B6B,0x0000,0x0000, 0x0B6C,0x0000,0x0000, -0x0B6D,0x0000,0x0000, 0x0B6E,0x0000,0x0000, 0x0B6F,0x0000,0x0000, -0x0B70,0x0000,0x0000, 0x0B71,0x0000,0x0000, 0x0B72,0x0000,0x0000, -0x0B73,0x0000,0x0000, 0x0B74,0x0000,0x0000, 0x0B75,0x0000,0x0000, -0x0B76,0x0000,0x0000 }; - -uint16 page0A0data[]= { /* A000 (2 weights per char) */ -0x1EB1,0x0000, 0x1EB2,0x0000, 0x1EB3,0x0000, 0x1EB4,0x0000, -0x1EB5,0x0000, 0x1EB6,0x0000, 0x1EB7,0x0000, 0x1EB8,0x0000, -0x1EB9,0x0000, 0x1EBA,0x0000, 0x1EBB,0x0000, 0x1EBC,0x0000, -0x1EBD,0x0000, 0x1EBE,0x0000, 0x1EBF,0x0000, 0x1EC0,0x0000, -0x1EC1,0x0000, 0x1EC2,0x0000, 0x1EC3,0x0000, 0x1EC4,0x0000, -0x1EC5,0x0000, 0x1EC6,0x0000, 0x1EC7,0x0000, 0x1EC8,0x0000, -0x1EC9,0x0000, 0x1ECA,0x0000, 0x1ECB,0x0000, 0x1ECC,0x0000, -0x1ECD,0x0000, 0x1ECE,0x0000, 0x1ECF,0x0000, 0x1ED0,0x0000, -0x1ED1,0x0000, 0x1ED2,0x0000, 0x1ED3,0x0000, 0x1ED4,0x0000, -0x1ED5,0x0000, 0x1ED6,0x0000, 0x1ED7,0x0000, 0x1ED8,0x0000, -0x1ED9,0x0000, 0x1EDA,0x0000, 0x1EDB,0x0000, 0x1EDC,0x0000, -0x1EDD,0x0000, 0x1EDE,0x0000, 0x1EDF,0x0000, 0x1EE0,0x0000, -0x1EE1,0x0000, 0x1EE2,0x0000, 0x1EE3,0x0000, 0x1EE4,0x0000, -0x1EE5,0x0000, 0x1EE6,0x0000, 0x1EE7,0x0000, 0x1EE8,0x0000, -0x1EE9,0x0000, 0x1EEA,0x0000, 0x1EEB,0x0000, 0x1EEC,0x0000, -0x1EED,0x0000, 0x1EEE,0x0000, 0x1EEF,0x0000, 0x1EF0,0x0000, -0x1EF1,0x0000, 0x1EF2,0x0000, 0x1EF3,0x0000, 0x1EF4,0x0000, -0x1EF5,0x0000, 0x1EF6,0x0000, 0x1EF7,0x0000, 0x1EF8,0x0000, -0x1EF9,0x0000, 0x1EFA,0x0000, 0x1EFB,0x0000, 0x1EFC,0x0000, -0x1EFD,0x0000, 0x1EFE,0x0000, 0x1EFF,0x0000, 0x1F00,0x0000, -0x1F01,0x0000, 0x1F02,0x0000, 0x1F03,0x0000, 0x1F04,0x0000, -0x1F05,0x0000, 0x1F06,0x0000, 0x1F07,0x0000, 0x1F08,0x0000, -0x1F09,0x0000, 0x1F0A,0x0000, 0x1F0B,0x0000, 0x1F0C,0x0000, -0x1F0D,0x0000, 0x1F0E,0x0000, 0x1F0F,0x0000, 0x1F10,0x0000, -0x1F11,0x0000, 0x1F12,0x0000, 0x1F13,0x0000, 0x1F14,0x0000, -0x1F15,0x0000, 0x1F16,0x0000, 0x1F17,0x0000, 0x1F18,0x0000, -0x1F19,0x0000, 0x1F1A,0x0000, 0x1F1B,0x0000, 0x1F1C,0x0000, -0x1F1D,0x0000, 0x1F1E,0x0000, 0x1F1F,0x0000, 0x1F20,0x0000, -0x1F21,0x0000, 0x1F22,0x0000, 0x1F23,0x0000, 0x1F24,0x0000, -0x1F25,0x0000, 0x1F26,0x0000, 0x1F27,0x0000, 0x1F28,0x0000, -0x1F29,0x0000, 0x1F2A,0x0000, 0x1F2B,0x0000, 0x1F2C,0x0000, -0x1F2D,0x0000, 0x1F2E,0x0000, 0x1F2F,0x0000, 0x1F30,0x0000, -0x1F31,0x0000, 0x1F32,0x0000, 0x1F33,0x0000, 0x1F34,0x0000, -0x1F35,0x0000, 0x1F36,0x0000, 0x1F37,0x0000, 0x1F38,0x0000, -0x1F39,0x0000, 0x1F3A,0x0000, 0x1F3B,0x0000, 0x1F3C,0x0000, -0x1F3D,0x0000, 0x1F3E,0x0000, 0x1F3F,0x0000, 0x1F40,0x0000, -0x1F41,0x0000, 0x1F42,0x0000, 0x1F43,0x0000, 0x1F44,0x0000, -0x1F45,0x0000, 0x1F46,0x0000, 0x1F47,0x0000, 0x1F48,0x0000, -0x1F49,0x0000, 0x1F4A,0x0000, 0x1F4B,0x0000, 0x1F4C,0x0000, -0x1F4D,0x0000, 0x1F4E,0x0000, 0x1F4F,0x0000, 0x1F50,0x0000, -0x1F51,0x0000, 0x1F52,0x0000, 0x1F53,0x0000, 0x1F54,0x0000, -0x1F55,0x0000, 0x1F56,0x0000, 0x1F57,0x0000, 0x1F58,0x0000, -0x1F59,0x0000, 0x1F5A,0x0000, 0x1F5B,0x0000, 0x1F5C,0x0000, -0x1F5D,0x0000, 0x1F5E,0x0000, 0x1F5F,0x0000, 0x1F60,0x0000, -0x1F61,0x0000, 0x1F62,0x0000, 0x1F63,0x0000, 0x1F64,0x0000, -0x1F65,0x0000, 0x1F66,0x0000, 0x1F67,0x0000, 0x1F68,0x0000, -0x1F69,0x0000, 0x1F6A,0x0000, 0x1F6B,0x0000, 0x1F6C,0x0000, -0x1F6D,0x0000, 0x1F6E,0x0000, 0x1F6F,0x0000, 0x1F70,0x0000, -0x1F71,0x0000, 0x1F72,0x0000, 0x1F73,0x0000, 0x1F74,0x0000, -0x1F75,0x0000, 0x1F76,0x0000, 0x1F77,0x0000, 0x1F78,0x0000, -0x1F79,0x0000, 0x1F7A,0x0000, 0x1F7B,0x0000, 0x1F7C,0x0000, -0x1F7D,0x0000, 0x1F7E,0x0000, 0x1F7F,0x0000, 0x1F80,0x0000, -0x1F81,0x0000, 0x1F82,0x0000, 0x1F83,0x0000, 0x1F84,0x0000, -0x1F85,0x0000, 0x1F86,0x0000, 0x1F87,0x0000, 0x1F88,0x0000, -0x1F89,0x0000, 0x1F8A,0x0000, 0x1F8B,0x0000, 0x1F8C,0x0000, -0x1F8D,0x0000, 0x1F8E,0x0000, 0x1F8F,0x0000, 0x1F90,0x0000, -0x1F91,0x0000, 0x1F92,0x0000, 0x1F93,0x0000, 0x1F94,0x0000, -0x1F95,0x0000, 0x1F96,0x0000, 0x1F97,0x0000, 0x1F98,0x0000, -0x1F99,0x0000, 0x1F9A,0x0000, 0x1F9B,0x0000, 0x1F9C,0x0000, -0x1F9D,0x0000, 0x1F9E,0x0000, 0x1F9F,0x0000, 0x1FA0,0x0000, -0x1FA1,0x0000, 0x1FA2,0x0000, 0x1FA3,0x0000, 0x1FA4,0x0000, -0x1FA5,0x0000, 0x1FA6,0x0000, 0x1FA7,0x0000, 0x1FA8,0x0000, -0x1FA9,0x0000, 0x1FAA,0x0000, 0x1FAB,0x0000, 0x1FAC,0x0000, -0x1FAD,0x0000, 0x1FAE,0x0000, 0x1FAF,0x0000, 0x1FB0,0x0000 -}; - -uint16 page0A1data[]= { /* A100 (2 weights per char) */ -0x1FB1,0x0000, 0x1FB2,0x0000, 0x1FB3,0x0000, 0x1FB4,0x0000, -0x1FB5,0x0000, 0x1FB6,0x0000, 0x1FB7,0x0000, 0x1FB8,0x0000, -0x1FB9,0x0000, 0x1FBA,0x0000, 0x1FBB,0x0000, 0x1FBC,0x0000, -0x1FBD,0x0000, 0x1FBE,0x0000, 0x1FBF,0x0000, 0x1FC0,0x0000, -0x1FC1,0x0000, 0x1FC2,0x0000, 0x1FC3,0x0000, 0x1FC4,0x0000, -0x1FC5,0x0000, 0x1FC6,0x0000, 0x1FC7,0x0000, 0x1FC8,0x0000, -0x1FC9,0x0000, 0x1FCA,0x0000, 0x1FCB,0x0000, 0x1FCC,0x0000, -0x1FCD,0x0000, 0x1FCE,0x0000, 0x1FCF,0x0000, 0x1FD0,0x0000, -0x1FD1,0x0000, 0x1FD2,0x0000, 0x1FD3,0x0000, 0x1FD4,0x0000, -0x1FD5,0x0000, 0x1FD6,0x0000, 0x1FD7,0x0000, 0x1FD8,0x0000, -0x1FD9,0x0000, 0x1FDA,0x0000, 0x1FDB,0x0000, 0x1FDC,0x0000, -0x1FDD,0x0000, 0x1FDE,0x0000, 0x1FDF,0x0000, 0x1FE0,0x0000, -0x1FE1,0x0000, 0x1FE2,0x0000, 0x1FE3,0x0000, 0x1FE4,0x0000, -0x1FE5,0x0000, 0x1FE6,0x0000, 0x1FE7,0x0000, 0x1FE8,0x0000, -0x1FE9,0x0000, 0x1FEA,0x0000, 0x1FEB,0x0000, 0x1FEC,0x0000, -0x1FED,0x0000, 0x1FEE,0x0000, 0x1FEF,0x0000, 0x1FF0,0x0000, -0x1FF1,0x0000, 0x1FF2,0x0000, 0x1FF3,0x0000, 0x1FF4,0x0000, -0x1FF5,0x0000, 0x1FF6,0x0000, 0x1FF7,0x0000, 0x1FF8,0x0000, -0x1FF9,0x0000, 0x1FFA,0x0000, 0x1FFB,0x0000, 0x1FFC,0x0000, -0x1FFD,0x0000, 0x1FFE,0x0000, 0x1FFF,0x0000, 0x2000,0x0000, -0x2001,0x0000, 0x2002,0x0000, 0x2003,0x0000, 0x2004,0x0000, -0x2005,0x0000, 0x2006,0x0000, 0x2007,0x0000, 0x2008,0x0000, -0x2009,0x0000, 0x200A,0x0000, 0x200B,0x0000, 0x200C,0x0000, -0x200D,0x0000, 0x200E,0x0000, 0x200F,0x0000, 0x2010,0x0000, -0x2011,0x0000, 0x2012,0x0000, 0x2013,0x0000, 0x2014,0x0000, -0x2015,0x0000, 0x2016,0x0000, 0x2017,0x0000, 0x2018,0x0000, -0x2019,0x0000, 0x201A,0x0000, 0x201B,0x0000, 0x201C,0x0000, -0x201D,0x0000, 0x201E,0x0000, 0x201F,0x0000, 0x2020,0x0000, -0x2021,0x0000, 0x2022,0x0000, 0x2023,0x0000, 0x2024,0x0000, -0x2025,0x0000, 0x2026,0x0000, 0x2027,0x0000, 0x2028,0x0000, -0x2029,0x0000, 0x202A,0x0000, 0x202B,0x0000, 0x202C,0x0000, -0x202D,0x0000, 0x202E,0x0000, 0x202F,0x0000, 0x2030,0x0000, -0x2031,0x0000, 0x2032,0x0000, 0x2033,0x0000, 0x2034,0x0000, -0x2035,0x0000, 0x2036,0x0000, 0x2037,0x0000, 0x2038,0x0000, -0x2039,0x0000, 0x203A,0x0000, 0x203B,0x0000, 0x203C,0x0000, -0x203D,0x0000, 0x203E,0x0000, 0x203F,0x0000, 0x2040,0x0000, -0x2041,0x0000, 0x2042,0x0000, 0x2043,0x0000, 0x2044,0x0000, -0x2045,0x0000, 0x2046,0x0000, 0x2047,0x0000, 0x2048,0x0000, -0x2049,0x0000, 0x204A,0x0000, 0x204B,0x0000, 0x204C,0x0000, -0x204D,0x0000, 0x204E,0x0000, 0x204F,0x0000, 0x2050,0x0000, -0x2051,0x0000, 0x2052,0x0000, 0x2053,0x0000, 0x2054,0x0000, -0x2055,0x0000, 0x2056,0x0000, 0x2057,0x0000, 0x2058,0x0000, -0x2059,0x0000, 0x205A,0x0000, 0x205B,0x0000, 0x205C,0x0000, -0x205D,0x0000, 0x205E,0x0000, 0x205F,0x0000, 0x2060,0x0000, -0x2061,0x0000, 0x2062,0x0000, 0x2063,0x0000, 0x2064,0x0000, -0x2065,0x0000, 0x2066,0x0000, 0x2067,0x0000, 0x2068,0x0000, -0x2069,0x0000, 0x206A,0x0000, 0x206B,0x0000, 0x206C,0x0000, -0x206D,0x0000, 0x206E,0x0000, 0x206F,0x0000, 0x2070,0x0000, -0x2071,0x0000, 0x2072,0x0000, 0x2073,0x0000, 0x2074,0x0000, -0x2075,0x0000, 0x2076,0x0000, 0x2077,0x0000, 0x2078,0x0000, -0x2079,0x0000, 0x207A,0x0000, 0x207B,0x0000, 0x207C,0x0000, -0x207D,0x0000, 0x207E,0x0000, 0x207F,0x0000, 0x2080,0x0000, -0x2081,0x0000, 0x2082,0x0000, 0x2083,0x0000, 0x2084,0x0000, -0x2085,0x0000, 0x2086,0x0000, 0x2087,0x0000, 0x2088,0x0000, -0x2089,0x0000, 0x208A,0x0000, 0x208B,0x0000, 0x208C,0x0000, -0x208D,0x0000, 0x208E,0x0000, 0x208F,0x0000, 0x2090,0x0000, -0x2091,0x0000, 0x2092,0x0000, 0x2093,0x0000, 0x2094,0x0000, -0x2095,0x0000, 0x2096,0x0000, 0x2097,0x0000, 0x2098,0x0000, -0x2099,0x0000, 0x209A,0x0000, 0x209B,0x0000, 0x209C,0x0000, -0x209D,0x0000, 0x209E,0x0000, 0x209F,0x0000, 0x20A0,0x0000, -0x20A1,0x0000, 0x20A2,0x0000, 0x20A3,0x0000, 0x20A4,0x0000, -0x20A5,0x0000, 0x20A6,0x0000, 0x20A7,0x0000, 0x20A8,0x0000, -0x20A9,0x0000, 0x20AA,0x0000, 0x20AB,0x0000, 0x20AC,0x0000, -0x20AD,0x0000, 0x20AE,0x0000, 0x20AF,0x0000, 0x20B0,0x0000 -}; - -uint16 page0A2data[]= { /* A200 (2 weights per char) */ -0x20B1,0x0000, 0x20B2,0x0000, 0x20B3,0x0000, 0x20B4,0x0000, -0x20B5,0x0000, 0x20B6,0x0000, 0x20B7,0x0000, 0x20B8,0x0000, -0x20B9,0x0000, 0x20BA,0x0000, 0x20BB,0x0000, 0x20BC,0x0000, -0x20BD,0x0000, 0x20BE,0x0000, 0x20BF,0x0000, 0x20C0,0x0000, -0x20C1,0x0000, 0x20C2,0x0000, 0x20C3,0x0000, 0x20C4,0x0000, -0x20C5,0x0000, 0x20C6,0x0000, 0x20C7,0x0000, 0x20C8,0x0000, -0x20C9,0x0000, 0x20CA,0x0000, 0x20CB,0x0000, 0x20CC,0x0000, -0x20CD,0x0000, 0x20CE,0x0000, 0x20CF,0x0000, 0x20D0,0x0000, -0x20D1,0x0000, 0x20D2,0x0000, 0x20D3,0x0000, 0x20D4,0x0000, -0x20D5,0x0000, 0x20D6,0x0000, 0x20D7,0x0000, 0x20D8,0x0000, -0x20D9,0x0000, 0x20DA,0x0000, 0x20DB,0x0000, 0x20DC,0x0000, -0x20DD,0x0000, 0x20DE,0x0000, 0x20DF,0x0000, 0x20E0,0x0000, -0x20E1,0x0000, 0x20E2,0x0000, 0x20E3,0x0000, 0x20E4,0x0000, -0x20E5,0x0000, 0x20E6,0x0000, 0x20E7,0x0000, 0x20E8,0x0000, -0x20E9,0x0000, 0x20EA,0x0000, 0x20EB,0x0000, 0x20EC,0x0000, -0x20ED,0x0000, 0x20EE,0x0000, 0x20EF,0x0000, 0x20F0,0x0000, -0x20F1,0x0000, 0x20F2,0x0000, 0x20F3,0x0000, 0x20F4,0x0000, -0x20F5,0x0000, 0x20F6,0x0000, 0x20F7,0x0000, 0x20F8,0x0000, -0x20F9,0x0000, 0x20FA,0x0000, 0x20FB,0x0000, 0x20FC,0x0000, -0x20FD,0x0000, 0x20FE,0x0000, 0x20FF,0x0000, 0x2100,0x0000, -0x2101,0x0000, 0x2102,0x0000, 0x2103,0x0000, 0x2104,0x0000, -0x2105,0x0000, 0x2106,0x0000, 0x2107,0x0000, 0x2108,0x0000, -0x2109,0x0000, 0x210A,0x0000, 0x210B,0x0000, 0x210C,0x0000, -0x210D,0x0000, 0x210E,0x0000, 0x210F,0x0000, 0x2110,0x0000, -0x2111,0x0000, 0x2112,0x0000, 0x2113,0x0000, 0x2114,0x0000, -0x2115,0x0000, 0x2116,0x0000, 0x2117,0x0000, 0x2118,0x0000, -0x2119,0x0000, 0x211A,0x0000, 0x211B,0x0000, 0x211C,0x0000, -0x211D,0x0000, 0x211E,0x0000, 0x211F,0x0000, 0x2120,0x0000, -0x2121,0x0000, 0x2122,0x0000, 0x2123,0x0000, 0x2124,0x0000, -0x2125,0x0000, 0x2126,0x0000, 0x2127,0x0000, 0x2128,0x0000, -0x2129,0x0000, 0x212A,0x0000, 0x212B,0x0000, 0x212C,0x0000, -0x212D,0x0000, 0x212E,0x0000, 0x212F,0x0000, 0x2130,0x0000, -0x2131,0x0000, 0x2132,0x0000, 0x2133,0x0000, 0x2134,0x0000, -0x2135,0x0000, 0x2136,0x0000, 0x2137,0x0000, 0x2138,0x0000, -0x2139,0x0000, 0x213A,0x0000, 0x213B,0x0000, 0x213C,0x0000, -0x213D,0x0000, 0x213E,0x0000, 0x213F,0x0000, 0x2140,0x0000, -0x2141,0x0000, 0x2142,0x0000, 0x2143,0x0000, 0x2144,0x0000, -0x2145,0x0000, 0x2146,0x0000, 0x2147,0x0000, 0x2148,0x0000, -0x2149,0x0000, 0x214A,0x0000, 0x214B,0x0000, 0x214C,0x0000, -0x214D,0x0000, 0x214E,0x0000, 0x214F,0x0000, 0x2150,0x0000, -0x2151,0x0000, 0x2152,0x0000, 0x2153,0x0000, 0x2154,0x0000, -0x2155,0x0000, 0x2156,0x0000, 0x2157,0x0000, 0x2158,0x0000, -0x2159,0x0000, 0x215A,0x0000, 0x215B,0x0000, 0x215C,0x0000, -0x215D,0x0000, 0x215E,0x0000, 0x215F,0x0000, 0x2160,0x0000, -0x2161,0x0000, 0x2162,0x0000, 0x2163,0x0000, 0x2164,0x0000, -0x2165,0x0000, 0x2166,0x0000, 0x2167,0x0000, 0x2168,0x0000, -0x2169,0x0000, 0x216A,0x0000, 0x216B,0x0000, 0x216C,0x0000, -0x216D,0x0000, 0x216E,0x0000, 0x216F,0x0000, 0x2170,0x0000, -0x2171,0x0000, 0x2172,0x0000, 0x2173,0x0000, 0x2174,0x0000, -0x2175,0x0000, 0x2176,0x0000, 0x2177,0x0000, 0x2178,0x0000, -0x2179,0x0000, 0x217A,0x0000, 0x217B,0x0000, 0x217C,0x0000, -0x217D,0x0000, 0x217E,0x0000, 0x217F,0x0000, 0x2180,0x0000, -0x2181,0x0000, 0x2182,0x0000, 0x2183,0x0000, 0x2184,0x0000, -0x2185,0x0000, 0x2186,0x0000, 0x2187,0x0000, 0x2188,0x0000, -0x2189,0x0000, 0x218A,0x0000, 0x218B,0x0000, 0x218C,0x0000, -0x218D,0x0000, 0x218E,0x0000, 0x218F,0x0000, 0x2190,0x0000, -0x2191,0x0000, 0x2192,0x0000, 0x2193,0x0000, 0x2194,0x0000, -0x2195,0x0000, 0x2196,0x0000, 0x2197,0x0000, 0x2198,0x0000, -0x2199,0x0000, 0x219A,0x0000, 0x219B,0x0000, 0x219C,0x0000, -0x219D,0x0000, 0x219E,0x0000, 0x219F,0x0000, 0x21A0,0x0000, -0x21A1,0x0000, 0x21A2,0x0000, 0x21A3,0x0000, 0x21A4,0x0000, -0x21A5,0x0000, 0x21A6,0x0000, 0x21A7,0x0000, 0x21A8,0x0000, -0x21A9,0x0000, 0x21AA,0x0000, 0x21AB,0x0000, 0x21AC,0x0000, -0x21AD,0x0000, 0x21AE,0x0000, 0x21AF,0x0000, 0x21B0,0x0000 -}; - -uint16 page0A3data[]= { /* A300 (2 weights per char) */ -0x21B1,0x0000, 0x21B2,0x0000, 0x21B3,0x0000, 0x21B4,0x0000, -0x21B5,0x0000, 0x21B6,0x0000, 0x21B7,0x0000, 0x21B8,0x0000, -0x21B9,0x0000, 0x21BA,0x0000, 0x21BB,0x0000, 0x21BC,0x0000, -0x21BD,0x0000, 0x21BE,0x0000, 0x21BF,0x0000, 0x21C0,0x0000, -0x21C1,0x0000, 0x21C2,0x0000, 0x21C3,0x0000, 0x21C4,0x0000, -0x21C5,0x0000, 0x21C6,0x0000, 0x21C7,0x0000, 0x21C8,0x0000, -0x21C9,0x0000, 0x21CA,0x0000, 0x21CB,0x0000, 0x21CC,0x0000, -0x21CD,0x0000, 0x21CE,0x0000, 0x21CF,0x0000, 0x21D0,0x0000, -0x21D1,0x0000, 0x21D2,0x0000, 0x21D3,0x0000, 0x21D4,0x0000, -0x21D5,0x0000, 0x21D6,0x0000, 0x21D7,0x0000, 0x21D8,0x0000, -0x21D9,0x0000, 0x21DA,0x0000, 0x21DB,0x0000, 0x21DC,0x0000, -0x21DD,0x0000, 0x21DE,0x0000, 0x21DF,0x0000, 0x21E0,0x0000, -0x21E1,0x0000, 0x21E2,0x0000, 0x21E3,0x0000, 0x21E4,0x0000, -0x21E5,0x0000, 0x21E6,0x0000, 0x21E7,0x0000, 0x21E8,0x0000, -0x21E9,0x0000, 0x21EA,0x0000, 0x21EB,0x0000, 0x21EC,0x0000, -0x21ED,0x0000, 0x21EE,0x0000, 0x21EF,0x0000, 0x21F0,0x0000, -0x21F1,0x0000, 0x21F2,0x0000, 0x21F3,0x0000, 0x21F4,0x0000, -0x21F5,0x0000, 0x21F6,0x0000, 0x21F7,0x0000, 0x21F8,0x0000, -0x21F9,0x0000, 0x21FA,0x0000, 0x21FB,0x0000, 0x21FC,0x0000, -0x21FD,0x0000, 0x21FE,0x0000, 0x21FF,0x0000, 0x2200,0x0000, -0x2201,0x0000, 0x2202,0x0000, 0x2203,0x0000, 0x2204,0x0000, -0x2205,0x0000, 0x2206,0x0000, 0x2207,0x0000, 0x2208,0x0000, -0x2209,0x0000, 0x220A,0x0000, 0x220B,0x0000, 0x220C,0x0000, -0x220D,0x0000, 0x220E,0x0000, 0x220F,0x0000, 0x2210,0x0000, -0x2211,0x0000, 0x2212,0x0000, 0x2213,0x0000, 0x2214,0x0000, -0x2215,0x0000, 0x2216,0x0000, 0x2217,0x0000, 0x2218,0x0000, -0x2219,0x0000, 0x221A,0x0000, 0x221B,0x0000, 0x221C,0x0000, -0x221D,0x0000, 0x221E,0x0000, 0x221F,0x0000, 0x2220,0x0000, -0x2221,0x0000, 0x2222,0x0000, 0x2223,0x0000, 0x2224,0x0000, -0x2225,0x0000, 0x2226,0x0000, 0x2227,0x0000, 0x2228,0x0000, -0x2229,0x0000, 0x222A,0x0000, 0x222B,0x0000, 0x222C,0x0000, -0x222D,0x0000, 0x222E,0x0000, 0x222F,0x0000, 0x2230,0x0000, -0x2231,0x0000, 0x2232,0x0000, 0x2233,0x0000, 0x2234,0x0000, -0x2235,0x0000, 0x2236,0x0000, 0x2237,0x0000, 0x2238,0x0000, -0x2239,0x0000, 0x223A,0x0000, 0x223B,0x0000, 0x223C,0x0000, -0x223D,0x0000, 0x223E,0x0000, 0x223F,0x0000, 0x2240,0x0000, -0x2241,0x0000, 0x2242,0x0000, 0x2243,0x0000, 0x2244,0x0000, -0x2245,0x0000, 0x2246,0x0000, 0x2247,0x0000, 0x2248,0x0000, -0x2249,0x0000, 0x224A,0x0000, 0x224B,0x0000, 0x224C,0x0000, -0x224D,0x0000, 0x224E,0x0000, 0x224F,0x0000, 0x2250,0x0000, -0x2251,0x0000, 0x2252,0x0000, 0x2253,0x0000, 0x2254,0x0000, -0x2255,0x0000, 0x2256,0x0000, 0x2257,0x0000, 0x2258,0x0000, -0x2259,0x0000, 0x225A,0x0000, 0x225B,0x0000, 0x225C,0x0000, -0x225D,0x0000, 0x225E,0x0000, 0x225F,0x0000, 0x2260,0x0000, -0x2261,0x0000, 0x2262,0x0000, 0x2263,0x0000, 0x2264,0x0000, -0x2265,0x0000, 0x2266,0x0000, 0x2267,0x0000, 0x2268,0x0000, -0x2269,0x0000, 0x226A,0x0000, 0x226B,0x0000, 0x226C,0x0000, -0x226D,0x0000, 0x226E,0x0000, 0x226F,0x0000, 0x2270,0x0000, -0x2271,0x0000, 0x2272,0x0000, 0x2273,0x0000, 0x2274,0x0000, -0x2275,0x0000, 0x2276,0x0000, 0x2277,0x0000, 0x2278,0x0000, -0x2279,0x0000, 0x227A,0x0000, 0x227B,0x0000, 0x227C,0x0000, -0x227D,0x0000, 0x227E,0x0000, 0x227F,0x0000, 0x2280,0x0000, -0x2281,0x0000, 0x2282,0x0000, 0x2283,0x0000, 0x2284,0x0000, -0x2285,0x0000, 0x2286,0x0000, 0x2287,0x0000, 0x2288,0x0000, -0x2289,0x0000, 0x228A,0x0000, 0x228B,0x0000, 0x228C,0x0000, -0x228D,0x0000, 0x228E,0x0000, 0x228F,0x0000, 0x2290,0x0000, -0x2291,0x0000, 0x2292,0x0000, 0x2293,0x0000, 0x2294,0x0000, -0x2295,0x0000, 0x2296,0x0000, 0x2297,0x0000, 0x2298,0x0000, -0x2299,0x0000, 0x229A,0x0000, 0x229B,0x0000, 0x229C,0x0000, -0x229D,0x0000, 0x229E,0x0000, 0x229F,0x0000, 0x22A0,0x0000, -0x22A1,0x0000, 0x22A2,0x0000, 0x22A3,0x0000, 0x22A4,0x0000, -0x22A5,0x0000, 0x22A6,0x0000, 0x22A7,0x0000, 0x22A8,0x0000, -0x22A9,0x0000, 0x22AA,0x0000, 0x22AB,0x0000, 0x22AC,0x0000, -0x22AD,0x0000, 0x22AE,0x0000, 0x22AF,0x0000, 0x22B0,0x0000 -}; - -uint16 page0A4data[]= { /* A400 (3 weights per char) */ -0x22B1,0x0000,0x0000, 0x22B2,0x0000,0x0000, 0x22B3,0x0000,0x0000, -0x22B4,0x0000,0x0000, 0x22B5,0x0000,0x0000, 0x22B6,0x0000,0x0000, -0x22B7,0x0000,0x0000, 0x22B8,0x0000,0x0000, 0x22B9,0x0000,0x0000, -0x22BA,0x0000,0x0000, 0x22BB,0x0000,0x0000, 0x22BC,0x0000,0x0000, -0x22BD,0x0000,0x0000, 0x22BE,0x0000,0x0000, 0x22BF,0x0000,0x0000, -0x22C0,0x0000,0x0000, 0x22C1,0x0000,0x0000, 0x22C2,0x0000,0x0000, -0x22C3,0x0000,0x0000, 0x22C4,0x0000,0x0000, 0x22C5,0x0000,0x0000, -0x22C6,0x0000,0x0000, 0x22C7,0x0000,0x0000, 0x22C8,0x0000,0x0000, -0x22C9,0x0000,0x0000, 0x22CA,0x0000,0x0000, 0x22CB,0x0000,0x0000, -0x22CC,0x0000,0x0000, 0x22CD,0x0000,0x0000, 0x22CE,0x0000,0x0000, -0x22CF,0x0000,0x0000, 0x22D0,0x0000,0x0000, 0x22D1,0x0000,0x0000, -0x22D2,0x0000,0x0000, 0x22D3,0x0000,0x0000, 0x22D4,0x0000,0x0000, -0x22D5,0x0000,0x0000, 0x22D6,0x0000,0x0000, 0x22D7,0x0000,0x0000, -0x22D8,0x0000,0x0000, 0x22D9,0x0000,0x0000, 0x22DA,0x0000,0x0000, -0x22DB,0x0000,0x0000, 0x22DC,0x0000,0x0000, 0x22DD,0x0000,0x0000, -0x22DE,0x0000,0x0000, 0x22DF,0x0000,0x0000, 0x22E0,0x0000,0x0000, -0x22E1,0x0000,0x0000, 0x22E2,0x0000,0x0000, 0x22E3,0x0000,0x0000, -0x22E4,0x0000,0x0000, 0x22E5,0x0000,0x0000, 0x22E6,0x0000,0x0000, -0x22E7,0x0000,0x0000, 0x22E8,0x0000,0x0000, 0x22E9,0x0000,0x0000, -0x22EA,0x0000,0x0000, 0x22EB,0x0000,0x0000, 0x22EC,0x0000,0x0000, -0x22ED,0x0000,0x0000, 0x22EE,0x0000,0x0000, 0x22EF,0x0000,0x0000, -0x22F0,0x0000,0x0000, 0x22F1,0x0000,0x0000, 0x22F2,0x0000,0x0000, -0x22F3,0x0000,0x0000, 0x22F4,0x0000,0x0000, 0x22F5,0x0000,0x0000, -0x22F6,0x0000,0x0000, 0x22F7,0x0000,0x0000, 0x22F8,0x0000,0x0000, -0x22F9,0x0000,0x0000, 0x22FA,0x0000,0x0000, 0x22FB,0x0000,0x0000, -0x22FC,0x0000,0x0000, 0x22FD,0x0000,0x0000, 0x22FE,0x0000,0x0000, -0x22FF,0x0000,0x0000, 0x2300,0x0000,0x0000, 0x2301,0x0000,0x0000, -0x2302,0x0000,0x0000, 0x2303,0x0000,0x0000, 0x2304,0x0000,0x0000, -0x2305,0x0000,0x0000, 0x2306,0x0000,0x0000, 0x2307,0x0000,0x0000, -0x2308,0x0000,0x0000, 0x2309,0x0000,0x0000, 0x230A,0x0000,0x0000, -0x230B,0x0000,0x0000, 0x230C,0x0000,0x0000, 0x230D,0x0000,0x0000, -0x230E,0x0000,0x0000, 0x230F,0x0000,0x0000, 0x2310,0x0000,0x0000, -0x2311,0x0000,0x0000, 0x2312,0x0000,0x0000, 0x2313,0x0000,0x0000, -0x2314,0x0000,0x0000, 0x2315,0x0000,0x0000, 0x2316,0x0000,0x0000, -0x2317,0x0000,0x0000, 0x2318,0x0000,0x0000, 0x2319,0x0000,0x0000, -0x231A,0x0000,0x0000, 0x231B,0x0000,0x0000, 0x231C,0x0000,0x0000, -0x231D,0x0000,0x0000, 0x231E,0x0000,0x0000, 0x231F,0x0000,0x0000, -0x2320,0x0000,0x0000, 0x2321,0x0000,0x0000, 0x2322,0x0000,0x0000, -0x2323,0x0000,0x0000, 0x2324,0x0000,0x0000, 0x2325,0x0000,0x0000, -0x2326,0x0000,0x0000, 0x2327,0x0000,0x0000, 0x2328,0x0000,0x0000, -0x2329,0x0000,0x0000, 0x232A,0x0000,0x0000, 0x232B,0x0000,0x0000, -0x232C,0x0000,0x0000, 0x232D,0x0000,0x0000, 0x232E,0x0000,0x0000, -0x232F,0x0000,0x0000, 0x2330,0x0000,0x0000, 0x2331,0x0000,0x0000, -0x2332,0x0000,0x0000, 0x2333,0x0000,0x0000, 0x2334,0x0000,0x0000, -0x2335,0x0000,0x0000, 0x2336,0x0000,0x0000, 0x2337,0x0000,0x0000, -0x2338,0x0000,0x0000, 0x2339,0x0000,0x0000, 0x233A,0x0000,0x0000, -0x233B,0x0000,0x0000, 0x233C,0x0000,0x0000, 0x233D,0x0000,0x0000, -0xFBC1,0xA48D,0x0000, 0xFBC1,0xA48E,0x0000, 0xFBC1,0xA48F,0x0000, -0x0BCE,0x0000,0x0000, 0x0BCF,0x0000,0x0000, 0x0BD0,0x0000,0x0000, -0x0BD1,0x0000,0x0000, 0x0BD2,0x0000,0x0000, 0x0BD3,0x0000,0x0000, -0x0BD4,0x0000,0x0000, 0x0BD5,0x0000,0x0000, 0x0BD6,0x0000,0x0000, -0x0BD7,0x0000,0x0000, 0x0BD8,0x0000,0x0000, 0x0BD9,0x0000,0x0000, -0x0BDA,0x0000,0x0000, 0x0BDB,0x0000,0x0000, 0x0BDC,0x0000,0x0000, -0x0BDD,0x0000,0x0000, 0x0BDE,0x0000,0x0000, 0x0BDF,0x0000,0x0000, -0x0BE0,0x0000,0x0000, 0x0BE1,0x0000,0x0000, 0x0BE2,0x0000,0x0000, -0x0BE3,0x0000,0x0000, 0x0BE4,0x0000,0x0000, 0x0BE5,0x0000,0x0000, -0x0BE6,0x0000,0x0000, 0x0BE7,0x0000,0x0000, 0x0BE8,0x0000,0x0000, -0x0BE9,0x0000,0x0000, 0x0BEA,0x0000,0x0000, 0x0BEB,0x0000,0x0000, -0x0BEC,0x0000,0x0000, 0x0BED,0x0000,0x0000, 0x0BEE,0x0000,0x0000, -0x0BEF,0x0000,0x0000, 0x0BF0,0x0000,0x0000, 0x0BF1,0x0000,0x0000, -0x0BF2,0x0000,0x0000, 0x0BF3,0x0000,0x0000, 0x0BF4,0x0000,0x0000, -0x0BF5,0x0000,0x0000, 0x0BF6,0x0000,0x0000, 0x0BF7,0x0000,0x0000, -0x0BF8,0x0000,0x0000, 0x0BF9,0x0000,0x0000, 0x0BFA,0x0000,0x0000, -0x0BFB,0x0000,0x0000, 0x0BFC,0x0000,0x0000, 0x0BFD,0x0000,0x0000, -0x0BFE,0x0000,0x0000, 0x0BFF,0x0000,0x0000, 0x0C00,0x0000,0x0000, -0x0C01,0x0000,0x0000, 0x0C02,0x0000,0x0000, 0x0C03,0x0000,0x0000, -0x0C04,0x0000,0x0000, 0xFBC1,0xA4C7,0x0000, 0xFBC1,0xA4C8,0x0000, -0xFBC1,0xA4C9,0x0000, 0xFBC1,0xA4CA,0x0000, 0xFBC1,0xA4CB,0x0000, -0xFBC1,0xA4CC,0x0000, 0xFBC1,0xA4CD,0x0000, 0xFBC1,0xA4CE,0x0000, -0xFBC1,0xA4CF,0x0000, 0xFBC1,0xA4D0,0x0000, 0xFBC1,0xA4D1,0x0000, -0xFBC1,0xA4D2,0x0000, 0xFBC1,0xA4D3,0x0000, 0xFBC1,0xA4D4,0x0000, -0xFBC1,0xA4D5,0x0000, 0xFBC1,0xA4D6,0x0000, 0xFBC1,0xA4D7,0x0000, -0xFBC1,0xA4D8,0x0000, 0xFBC1,0xA4D9,0x0000, 0xFBC1,0xA4DA,0x0000, -0xFBC1,0xA4DB,0x0000, 0xFBC1,0xA4DC,0x0000, 0xFBC1,0xA4DD,0x0000, -0xFBC1,0xA4DE,0x0000, 0xFBC1,0xA4DF,0x0000, 0xFBC1,0xA4E0,0x0000, -0xFBC1,0xA4E1,0x0000, 0xFBC1,0xA4E2,0x0000, 0xFBC1,0xA4E3,0x0000, -0xFBC1,0xA4E4,0x0000, 0xFBC1,0xA4E5,0x0000, 0xFBC1,0xA4E6,0x0000, -0xFBC1,0xA4E7,0x0000, 0xFBC1,0xA4E8,0x0000, 0xFBC1,0xA4E9,0x0000, -0xFBC1,0xA4EA,0x0000, 0xFBC1,0xA4EB,0x0000, 0xFBC1,0xA4EC,0x0000, -0xFBC1,0xA4ED,0x0000, 0xFBC1,0xA4EE,0x0000, 0xFBC1,0xA4EF,0x0000, -0xFBC1,0xA4F0,0x0000, 0xFBC1,0xA4F1,0x0000, 0xFBC1,0xA4F2,0x0000, -0xFBC1,0xA4F3,0x0000, 0xFBC1,0xA4F4,0x0000, 0xFBC1,0xA4F5,0x0000, -0xFBC1,0xA4F6,0x0000, 0xFBC1,0xA4F7,0x0000, 0xFBC1,0xA4F8,0x0000, -0xFBC1,0xA4F9,0x0000, 0xFBC1,0xA4FA,0x0000, 0xFBC1,0xA4FB,0x0000, -0xFBC1,0xA4FC,0x0000, 0xFBC1,0xA4FD,0x0000, 0xFBC1,0xA4FE,0x0000, -0xFBC1,0xA4FF,0x0000 }; - -uint16 page0F9data[]= { /* F900 (3 weights per char) */ -0xFB41,0x8C48,0x0000, 0xFB40,0xE6F4,0x0000, 0xFB41,0x8ECA,0x0000, -0xFB41,0x8CC8,0x0000, 0xFB40,0xEED1,0x0000, 0xFB40,0xCE32,0x0000, -0xFB40,0xD3E5,0x0000, 0xFB41,0x9F9C,0x0000, 0xFB41,0x9F9C,0x0000, -0xFB40,0xD951,0x0000, 0xFB41,0x91D1,0x0000, 0xFB40,0xD587,0x0000, -0xFB40,0xD948,0x0000, 0xFB40,0xE1F6,0x0000, 0xFB40,0xF669,0x0000, -0xFB40,0xFF85,0x0000, 0xFB41,0x863F,0x0000, 0xFB41,0x87BA,0x0000, -0xFB41,0x88F8,0x0000, 0xFB41,0x908F,0x0000, 0xFB40,0xEA02,0x0000, -0xFB40,0xED1B,0x0000, 0xFB40,0xF0D9,0x0000, 0xFB40,0xF3DE,0x0000, -0xFB41,0x843D,0x0000, 0xFB41,0x916A,0x0000, 0xFB41,0x99F1,0x0000, -0xFB40,0xCE82,0x0000, 0xFB40,0xD375,0x0000, 0xFB40,0xEB04,0x0000, -0xFB40,0xF21B,0x0000, 0xFB41,0x862D,0x0000, 0xFB41,0x9E1E,0x0000, -0xFB40,0xDD50,0x0000, 0xFB40,0xEFEB,0x0000, 0xFB41,0x85CD,0x0000, -0xFB41,0x8964,0x0000, 0xFB40,0xE2C9,0x0000, 0xFB41,0x81D8,0x0000, -0xFB41,0x881F,0x0000, 0xFB40,0xDECA,0x0000, 0xFB40,0xE717,0x0000, -0xFB40,0xED6A,0x0000, 0xFB40,0xF2FC,0x0000, 0xFB41,0x90CE,0x0000, -0xFB40,0xCF86,0x0000, 0xFB40,0xD1B7,0x0000, 0xFB40,0xD2DE,0x0000, -0xFB40,0xE4C4,0x0000, 0xFB40,0xEAD3,0x0000, 0xFB40,0xF210,0x0000, -0xFB40,0xF6E7,0x0000, 0xFB41,0x8001,0x0000, 0xFB41,0x8606,0x0000, -0xFB41,0x865C,0x0000, 0xFB41,0x8DEF,0x0000, 0xFB41,0x9732,0x0000, -0xFB41,0x9B6F,0x0000, 0xFB41,0x9DFA,0x0000, 0xFB40,0xF88C,0x0000, -0xFB40,0xF97F,0x0000, 0xFB40,0xFDA0,0x0000, 0xFB41,0x83C9,0x0000, -0xFB41,0x9304,0x0000, 0xFB41,0x9E7F,0x0000, 0xFB41,0x8AD6,0x0000, -0xFB40,0xD8DF,0x0000, 0xFB40,0xDF04,0x0000, 0xFB40,0xFC60,0x0000, -0xFB41,0x807E,0x0000, 0xFB40,0xF262,0x0000, 0xFB40,0xF8CA,0x0000, -0xFB41,0x8CC2,0x0000, 0xFB41,0x96F7,0x0000, 0xFB40,0xD8D8,0x0000, -0xFB40,0xDC62,0x0000, 0xFB40,0xEA13,0x0000, 0xFB40,0xEDDA,0x0000, -0xFB40,0xEF0F,0x0000, 0xFB40,0xFD2F,0x0000, 0xFB40,0xFE37,0x0000, -0xFB41,0x964B,0x0000, 0xFB40,0xD2D2,0x0000, 0xFB41,0x808B,0x0000, -0xFB40,0xD1DC,0x0000, 0xFB40,0xD1CC,0x0000, 0xFB40,0xFA1C,0x0000, -0xFB40,0xFDBE,0x0000, 0xFB41,0x83F1,0x0000, 0xFB41,0x9675,0x0000, -0xFB41,0x8B80,0x0000, 0xFB40,0xE2CF,0x0000, 0xFB40,0xEA02,0x0000, -0xFB41,0x8AFE,0x0000, 0xFB40,0xCE39,0x0000, 0xFB40,0xDBE7,0x0000, -0xFB40,0xE012,0x0000, 0xFB40,0xF387,0x0000, 0xFB40,0xF570,0x0000, -0xFB40,0xD317,0x0000, 0xFB40,0xF8FB,0x0000, 0xFB40,0xCFBF,0x0000, -0xFB40,0xDFA9,0x0000, 0xFB40,0xCE0D,0x0000, 0xFB40,0xECCC,0x0000, -0xFB40,0xE578,0x0000, 0xFB40,0xFD22,0x0000, 0xFB40,0xD3C3,0x0000, -0xFB40,0xD85E,0x0000, 0xFB40,0xF701,0x0000, 0xFB41,0x8449,0x0000, -0xFB41,0x8AAA,0x0000, 0xFB40,0xEBBA,0x0000, 0xFB41,0x8FB0,0x0000, -0xFB40,0xEC88,0x0000, 0xFB40,0xE2FE,0x0000, 0xFB41,0x82E5,0x0000, -0xFB40,0xE3A0,0x0000, 0xFB40,0xF565,0x0000, 0xFB40,0xCEAE,0x0000, -0xFB40,0xD169,0x0000, 0xFB40,0xD1C9,0x0000, 0xFB40,0xE881,0x0000, -0xFB40,0xFCE7,0x0000, 0xFB41,0x826F,0x0000, 0xFB41,0x8AD2,0x0000, -0xFB41,0x91CF,0x0000, 0xFB40,0xD2F5,0x0000, 0xFB40,0xD442,0x0000, -0xFB40,0xD973,0x0000, 0xFB40,0xDEEC,0x0000, 0xFB40,0xE5C5,0x0000, -0xFB40,0xEFFE,0x0000, 0xFB40,0xF92A,0x0000, 0xFB41,0x95AD,0x0000, -0xFB41,0x9A6A,0x0000, 0xFB41,0x9E97,0x0000, 0xFB41,0x9ECE,0x0000, -0xFB40,0xD29B,0x0000, 0xFB40,0xE6C6,0x0000, 0xFB40,0xEB77,0x0000, -0xFB41,0x8F62,0x0000, 0xFB40,0xDE74,0x0000, 0xFB40,0xE190,0x0000, -0xFB40,0xE200,0x0000, 0xFB40,0xE49A,0x0000, 0xFB40,0xEF23,0x0000, -0xFB40,0xF149,0x0000, 0xFB40,0xF489,0x0000, 0xFB40,0xF9CA,0x0000, -0xFB40,0xFDF4,0x0000, 0xFB41,0x806F,0x0000, 0xFB41,0x8F26,0x0000, -0xFB41,0x84EE,0x0000, 0xFB41,0x9023,0x0000, 0xFB41,0x934A,0x0000, -0xFB40,0xD217,0x0000, 0xFB40,0xD2A3,0x0000, 0xFB40,0xD4BD,0x0000, -0xFB40,0xF0C8,0x0000, 0xFB41,0x88C2,0x0000, 0xFB41,0x8AAA,0x0000, -0xFB40,0xDEC9,0x0000, 0xFB40,0xDFF5,0x0000, 0xFB40,0xE37B,0x0000, -0xFB40,0xEBAE,0x0000, 0xFB40,0xFC3E,0x0000, 0xFB40,0xF375,0x0000, -0xFB40,0xCEE4,0x0000, 0xFB40,0xD6F9,0x0000, 0xFB40,0xDBE7,0x0000, -0xFB40,0xDDBA,0x0000, 0xFB40,0xE01C,0x0000, 0xFB40,0xF3B2,0x0000, -0xFB40,0xF469,0x0000, 0xFB40,0xFF9A,0x0000, 0xFB41,0x8046,0x0000, -0xFB41,0x9234,0x0000, 0xFB41,0x96F6,0x0000, 0xFB41,0x9748,0x0000, -0xFB41,0x9818,0x0000, 0xFB40,0xCF8B,0x0000, 0xFB40,0xF9AE,0x0000, -0xFB41,0x91B4,0x0000, 0xFB41,0x96B8,0x0000, 0xFB40,0xE0E1,0x0000, -0xFB40,0xCE86,0x0000, 0xFB40,0xD0DA,0x0000, 0xFB40,0xDBEE,0x0000, -0xFB40,0xDC3F,0x0000, 0xFB40,0xE599,0x0000, 0xFB40,0xEA02,0x0000, -0xFB40,0xF1CE,0x0000, 0xFB40,0xF642,0x0000, 0xFB41,0x84FC,0x0000, -0xFB41,0x907C,0x0000, 0xFB41,0x9F8D,0x0000, 0xFB40,0xE688,0x0000, -0xFB41,0x962E,0x0000, 0xFB40,0xD289,0x0000, 0xFB40,0xE77B,0x0000, -0xFB40,0xE7F3,0x0000, 0xFB40,0xED41,0x0000, 0xFB40,0xEE9C,0x0000, -0xFB40,0xF409,0x0000, 0xFB40,0xF559,0x0000, 0xFB40,0xF86B,0x0000, -0xFB40,0xFD10,0x0000, 0xFB41,0x985E,0x0000, 0xFB40,0xD16D,0x0000, -0xFB40,0xE22E,0x0000, 0xFB41,0x9678,0x0000, 0xFB40,0xD02B,0x0000, -0xFB40,0xDD19,0x0000, 0xFB40,0xEDEA,0x0000, 0xFB41,0x8F2A,0x0000, -0xFB40,0xDF8B,0x0000, 0xFB40,0xE144,0x0000, 0xFB40,0xE817,0x0000, -0xFB40,0xF387,0x0000, 0xFB41,0x9686,0x0000, 0xFB40,0xD229,0x0000, -0xFB40,0xD40F,0x0000, 0xFB40,0xDC65,0x0000, 0xFB40,0xE613,0x0000, -0xFB40,0xE74E,0x0000, 0xFB40,0xE8A8,0x0000, 0xFB40,0xECE5,0x0000, -0xFB40,0xF406,0x0000, 0xFB40,0xF5E2,0x0000, 0xFB40,0xFF79,0x0000, -0xFB41,0x88CF,0x0000, 0xFB41,0x88E1,0x0000, 0xFB41,0x91CC,0x0000, -0xFB41,0x96E2,0x0000, 0xFB40,0xD33F,0x0000, 0xFB40,0xEEBA,0x0000, -0xFB40,0xD41D,0x0000, 0xFB40,0xF1D0,0x0000, 0xFB40,0xF498,0x0000, -0xFB41,0x85FA,0x0000, 0xFB41,0x96A3,0x0000, 0xFB41,0x9C57,0x0000, -0xFB41,0x9E9F,0x0000, 0xFB40,0xE797,0x0000, 0xFB40,0xEDCB,0x0000, -0xFB41,0x81E8,0x0000, 0xFB40,0xFACB,0x0000, 0xFB40,0xFB20,0x0000, -0xFB40,0xFC92,0x0000, 0xFB40,0xF2C0,0x0000, 0xFB40,0xF099,0x0000, -0xFB41,0x8B58,0x0000, 0xFB40,0xCEC0,0x0000, 0xFB41,0x8336,0x0000, -0xFB40,0xD23A,0x0000 }; - -uint16 page0FAdata[]= { /* FA00 (3 weights per char) */ -0xFB40,0xD207,0x0000, 0xFB40,0xDEA6,0x0000, 0xFB40,0xE2D3,0x0000, -0xFB40,0xFCD6,0x0000, 0xFB40,0xDB85,0x0000, 0xFB40,0xED1E,0x0000, -0xFB40,0xE6B4,0x0000, 0xFB41,0x8F3B,0x0000, 0xFB41,0x884C,0x0000, -0xFB41,0x964D,0x0000, 0xFB41,0x898B,0x0000, 0xFB40,0xDED3,0x0000, -0xFB40,0xD140,0x0000, 0xFB40,0xD5C0,0x0000, 0xFB41,0xFA0E,0x0000, -0xFB41,0xFA0F,0x0000, 0xFB40,0xD85A,0x0000, 0xFB41,0xFA11,0x0000, -0xFB40,0xE674,0x0000, 0xFB41,0xFA13,0x0000, 0xFB41,0xFA14,0x0000, -0xFB40,0xD1DE,0x0000, 0xFB40,0xF32A,0x0000, 0xFB40,0xF6CA,0x0000, -0xFB40,0xF93C,0x0000, 0xFB40,0xF95E,0x0000, 0xFB40,0xF965,0x0000, -0xFB40,0xF98F,0x0000, 0xFB41,0x9756,0x0000, 0xFB40,0xFCBE,0x0000, -0xFB40,0xFFBD,0x0000, 0xFB41,0xFA1F,0x0000, 0xFB41,0x8612,0x0000, -0xFB41,0xFA21,0x0000, 0xFB41,0x8AF8,0x0000, 0xFB41,0xFA23,0x0000, -0xFB41,0xFA24,0x0000, 0xFB41,0x9038,0x0000, 0xFB41,0x90FD,0x0000, -0xFB41,0xFA27,0x0000, 0xFB41,0xFA28,0x0000, 0xFB41,0xFA29,0x0000, -0xFB41,0x98EF,0x0000, 0xFB41,0x98FC,0x0000, 0xFB41,0x9928,0x0000, -0xFB41,0x9DB4,0x0000, 0xFBC1,0xFA2E,0x0000, 0xFBC1,0xFA2F,0x0000, -0xFB40,0xCFAE,0x0000, 0xFB40,0xD0E7,0x0000, 0xFB40,0xD14D,0x0000, -0xFB40,0xD2C9,0x0000, 0xFB40,0xD2E4,0x0000, 0xFB40,0xD351,0x0000, -0xFB40,0xD59D,0x0000, 0xFB40,0xD606,0x0000, 0xFB40,0xD668,0x0000, -0xFB40,0xD840,0x0000, 0xFB40,0xD8A8,0x0000, 0xFB40,0xDC64,0x0000, -0xFB40,0xDC6E,0x0000, 0xFB40,0xE094,0x0000, 0xFB40,0xE168,0x0000, -0xFB40,0xE18E,0x0000, 0xFB40,0xE1F2,0x0000, 0xFB40,0xE54F,0x0000, -0xFB40,0xE5E2,0x0000, 0xFB40,0xE691,0x0000, 0xFB40,0xE885,0x0000, -0xFB40,0xED77,0x0000, 0xFB40,0xEE1A,0x0000, 0xFB40,0xEF22,0x0000, -0xFB40,0xF16E,0x0000, 0xFB40,0xF22B,0x0000, 0xFB40,0xF422,0x0000, -0xFB40,0xF891,0x0000, 0xFB40,0xF93E,0x0000, 0xFB40,0xF949,0x0000, -0xFB40,0xF948,0x0000, 0xFB40,0xF950,0x0000, 0xFB40,0xF956,0x0000, -0xFB40,0xF95D,0x0000, 0xFB40,0xF98D,0x0000, 0xFB40,0xF98E,0x0000, -0xFB40,0xFA40,0x0000, 0xFB40,0xFA81,0x0000, 0xFB40,0xFBC0,0x0000, -0xFB40,0xFDF4,0x0000, 0xFB40,0xFE09,0x0000, 0xFB40,0xFE41,0x0000, -0xFB40,0xFF72,0x0000, 0xFB41,0x8005,0x0000, 0xFB41,0x81ED,0x0000, -0xFB41,0x8279,0x0000, 0xFB41,0x8279,0x0000, 0xFB41,0x8457,0x0000, -0xFB41,0x8910,0x0000, 0xFB41,0x8996,0x0000, 0xFB41,0x8B01,0x0000, -0xFB41,0x8B39,0x0000, 0xFB41,0x8CD3,0x0000, 0xFB41,0x8D08,0x0000, -0xFB41,0x8FB6,0x0000, 0xFB41,0x9038,0x0000, 0xFB41,0x96E3,0x0000, -0xFB41,0x97FF,0x0000, 0xFB41,0x983B,0x0000, 0xFBC1,0xFA6B,0x0000, -0xFBC1,0xFA6C,0x0000, 0xFBC1,0xFA6D,0x0000, 0xFBC1,0xFA6E,0x0000, -0xFBC1,0xFA6F,0x0000, 0xFBC1,0xFA70,0x0000, 0xFBC1,0xFA71,0x0000, -0xFBC1,0xFA72,0x0000, 0xFBC1,0xFA73,0x0000, 0xFBC1,0xFA74,0x0000, -0xFBC1,0xFA75,0x0000, 0xFBC1,0xFA76,0x0000, 0xFBC1,0xFA77,0x0000, -0xFBC1,0xFA78,0x0000, 0xFBC1,0xFA79,0x0000, 0xFBC1,0xFA7A,0x0000, -0xFBC1,0xFA7B,0x0000, 0xFBC1,0xFA7C,0x0000, 0xFBC1,0xFA7D,0x0000, -0xFBC1,0xFA7E,0x0000, 0xFBC1,0xFA7F,0x0000, 0xFBC1,0xFA80,0x0000, -0xFBC1,0xFA81,0x0000, 0xFBC1,0xFA82,0x0000, 0xFBC1,0xFA83,0x0000, -0xFBC1,0xFA84,0x0000, 0xFBC1,0xFA85,0x0000, 0xFBC1,0xFA86,0x0000, -0xFBC1,0xFA87,0x0000, 0xFBC1,0xFA88,0x0000, 0xFBC1,0xFA89,0x0000, -0xFBC1,0xFA8A,0x0000, 0xFBC1,0xFA8B,0x0000, 0xFBC1,0xFA8C,0x0000, -0xFBC1,0xFA8D,0x0000, 0xFBC1,0xFA8E,0x0000, 0xFBC1,0xFA8F,0x0000, -0xFBC1,0xFA90,0x0000, 0xFBC1,0xFA91,0x0000, 0xFBC1,0xFA92,0x0000, -0xFBC1,0xFA93,0x0000, 0xFBC1,0xFA94,0x0000, 0xFBC1,0xFA95,0x0000, -0xFBC1,0xFA96,0x0000, 0xFBC1,0xFA97,0x0000, 0xFBC1,0xFA98,0x0000, -0xFBC1,0xFA99,0x0000, 0xFBC1,0xFA9A,0x0000, 0xFBC1,0xFA9B,0x0000, -0xFBC1,0xFA9C,0x0000, 0xFBC1,0xFA9D,0x0000, 0xFBC1,0xFA9E,0x0000, -0xFBC1,0xFA9F,0x0000, 0xFBC1,0xFAA0,0x0000, 0xFBC1,0xFAA1,0x0000, -0xFBC1,0xFAA2,0x0000, 0xFBC1,0xFAA3,0x0000, 0xFBC1,0xFAA4,0x0000, -0xFBC1,0xFAA5,0x0000, 0xFBC1,0xFAA6,0x0000, 0xFBC1,0xFAA7,0x0000, -0xFBC1,0xFAA8,0x0000, 0xFBC1,0xFAA9,0x0000, 0xFBC1,0xFAAA,0x0000, -0xFBC1,0xFAAB,0x0000, 0xFBC1,0xFAAC,0x0000, 0xFBC1,0xFAAD,0x0000, -0xFBC1,0xFAAE,0x0000, 0xFBC1,0xFAAF,0x0000, 0xFBC1,0xFAB0,0x0000, -0xFBC1,0xFAB1,0x0000, 0xFBC1,0xFAB2,0x0000, 0xFBC1,0xFAB3,0x0000, -0xFBC1,0xFAB4,0x0000, 0xFBC1,0xFAB5,0x0000, 0xFBC1,0xFAB6,0x0000, -0xFBC1,0xFAB7,0x0000, 0xFBC1,0xFAB8,0x0000, 0xFBC1,0xFAB9,0x0000, -0xFBC1,0xFABA,0x0000, 0xFBC1,0xFABB,0x0000, 0xFBC1,0xFABC,0x0000, -0xFBC1,0xFABD,0x0000, 0xFBC1,0xFABE,0x0000, 0xFBC1,0xFABF,0x0000, -0xFBC1,0xFAC0,0x0000, 0xFBC1,0xFAC1,0x0000, 0xFBC1,0xFAC2,0x0000, -0xFBC1,0xFAC3,0x0000, 0xFBC1,0xFAC4,0x0000, 0xFBC1,0xFAC5,0x0000, -0xFBC1,0xFAC6,0x0000, 0xFBC1,0xFAC7,0x0000, 0xFBC1,0xFAC8,0x0000, -0xFBC1,0xFAC9,0x0000, 0xFBC1,0xFACA,0x0000, 0xFBC1,0xFACB,0x0000, -0xFBC1,0xFACC,0x0000, 0xFBC1,0xFACD,0x0000, 0xFBC1,0xFACE,0x0000, -0xFBC1,0xFACF,0x0000, 0xFBC1,0xFAD0,0x0000, 0xFBC1,0xFAD1,0x0000, -0xFBC1,0xFAD2,0x0000, 0xFBC1,0xFAD3,0x0000, 0xFBC1,0xFAD4,0x0000, -0xFBC1,0xFAD5,0x0000, 0xFBC1,0xFAD6,0x0000, 0xFBC1,0xFAD7,0x0000, -0xFBC1,0xFAD8,0x0000, 0xFBC1,0xFAD9,0x0000, 0xFBC1,0xFADA,0x0000, -0xFBC1,0xFADB,0x0000, 0xFBC1,0xFADC,0x0000, 0xFBC1,0xFADD,0x0000, -0xFBC1,0xFADE,0x0000, 0xFBC1,0xFADF,0x0000, 0xFBC1,0xFAE0,0x0000, -0xFBC1,0xFAE1,0x0000, 0xFBC1,0xFAE2,0x0000, 0xFBC1,0xFAE3,0x0000, -0xFBC1,0xFAE4,0x0000, 0xFBC1,0xFAE5,0x0000, 0xFBC1,0xFAE6,0x0000, -0xFBC1,0xFAE7,0x0000, 0xFBC1,0xFAE8,0x0000, 0xFBC1,0xFAE9,0x0000, -0xFBC1,0xFAEA,0x0000, 0xFBC1,0xFAEB,0x0000, 0xFBC1,0xFAEC,0x0000, -0xFBC1,0xFAED,0x0000, 0xFBC1,0xFAEE,0x0000, 0xFBC1,0xFAEF,0x0000, -0xFBC1,0xFAF0,0x0000, 0xFBC1,0xFAF1,0x0000, 0xFBC1,0xFAF2,0x0000, -0xFBC1,0xFAF3,0x0000, 0xFBC1,0xFAF4,0x0000, 0xFBC1,0xFAF5,0x0000, -0xFBC1,0xFAF6,0x0000, 0xFBC1,0xFAF7,0x0000, 0xFBC1,0xFAF8,0x0000, -0xFBC1,0xFAF9,0x0000, 0xFBC1,0xFAFA,0x0000, 0xFBC1,0xFAFB,0x0000, -0xFBC1,0xFAFC,0x0000, 0xFBC1,0xFAFD,0x0000, 0xFBC1,0xFAFE,0x0000, -0xFBC1,0xFAFF,0x0000 }; - -uint16 page0FBdata[]= { /* FB00 (4 weights per char) */ -0x0EB9,0x0EB9,0x0000,0x0000, 0x0EB9,0x0EFB,0x0000,0x0000, -0x0EB9,0x0F2E,0x0000,0x0000, 0x0EB9,0x0EB9,0x0EFB,0x0000, -0x0EB9,0x0EB9,0x0F2E,0x0000, 0x0FEA,0x1002,0x0000,0x0000, -0x0FEA,0x1002,0x0000,0x0000, 0xFBC1,0xFB07,0x0000,0x0000, -0xFBC1,0xFB08,0x0000,0x0000, 0xFBC1,0xFB09,0x0000,0x0000, -0xFBC1,0xFB0A,0x0000,0x0000, 0xFBC1,0xFB0B,0x0000,0x0000, -0xFBC1,0xFB0C,0x0000,0x0000, 0xFBC1,0xFB0D,0x0000,0x0000, -0xFBC1,0xFB0E,0x0000,0x0000, 0xFBC1,0xFB0F,0x0000,0x0000, -0xFBC1,0xFB10,0x0000,0x0000, 0xFBC1,0xFB11,0x0000,0x0000, -0xFBC1,0xFB12,0x0000,0x0000, 0x131D,0x131F,0x0000,0x0000, -0x131D,0x130E,0x0000,0x0000, 0x131D,0x1314,0x0000,0x0000, -0x1327,0x131F,0x0000,0x0000, 0x131D,0x1316,0x0000,0x0000, -0xFBC1,0xFB18,0x0000,0x0000, 0xFBC1,0xFB19,0x0000,0x0000, -0xFBC1,0xFB1A,0x0000,0x0000, 0xFBC1,0xFB1B,0x0000,0x0000, -0xFBC1,0xFB1C,0x0000,0x0000, 0x133A,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000, 0x133A,0x133A,0x0000,0x0000, -0x1340,0x0000,0x0000,0x0000, 0x1331,0x0000,0x0000,0x0000, -0x1334,0x0000,0x0000,0x0000, 0x1335,0x0000,0x0000,0x0000, -0x133B,0x0000,0x0000,0x0000, 0x133C,0x0000,0x0000,0x0000, -0x133D,0x0000,0x0000,0x0000, 0x1344,0x0000,0x0000,0x0000, -0x1346,0x0000,0x0000,0x0000, 0x0428,0x0000,0x0000,0x0000, -0x1345,0x0000,0x0000,0x0000, 0x1345,0x0000,0x0000,0x0000, -0x1345,0x0000,0x0000,0x0000, 0x1345,0x0000,0x0000,0x0000, -0x1331,0x0000,0x0000,0x0000, 0x1331,0x0000,0x0000,0x0000, -0x1331,0x0000,0x0000,0x0000, 0x1332,0x0000,0x0000,0x0000, -0x1333,0x0000,0x0000,0x0000, 0x1334,0x0000,0x0000,0x0000, -0x1335,0x0000,0x0000,0x0000, 0x1336,0x0000,0x0000,0x0000, -0x1337,0x0000,0x0000,0x0000, 0xFBC1,0xFB37,0x0000,0x0000, -0x1339,0x0000,0x0000,0x0000, 0x133A,0x0000,0x0000,0x0000, -0x133B,0x0000,0x0000,0x0000, 0x133B,0x0000,0x0000,0x0000, -0x133C,0x0000,0x0000,0x0000, 0xFBC1,0xFB3D,0x0000,0x0000, -0x133D,0x0000,0x0000,0x0000, 0xFBC1,0xFB3F,0x0000,0x0000, -0x133E,0x0000,0x0000,0x0000, 0x133F,0x0000,0x0000,0x0000, -0xFBC1,0xFB42,0x0000,0x0000, 0x1341,0x0000,0x0000,0x0000, -0x1341,0x0000,0x0000,0x0000, 0xFBC1,0xFB45,0x0000,0x0000, -0x1342,0x0000,0x0000,0x0000, 0x1343,0x0000,0x0000,0x0000, -0x1344,0x0000,0x0000,0x0000, 0x1345,0x0000,0x0000,0x0000, -0x1346,0x0000,0x0000,0x0000, 0x1336,0x0000,0x0000,0x0000, -0x1332,0x0000,0x0000,0x0000, 0x133B,0x0000,0x0000,0x0000, -0x1341,0x0000,0x0000,0x0000, 0x1331,0x133C,0x0000,0x0000, -0x134B,0x0000,0x0000,0x0000, 0x134B,0x0000,0x0000,0x0000, -0x1353,0x0000,0x0000,0x0000, 0x1353,0x0000,0x0000,0x0000, -0x1353,0x0000,0x0000,0x0000, 0x1353,0x0000,0x0000,0x0000, -0x1354,0x0000,0x0000,0x0000, 0x1354,0x0000,0x0000,0x0000, -0x1354,0x0000,0x0000,0x0000, 0x1354,0x0000,0x0000,0x0000, -0x1355,0x0000,0x0000,0x0000, 0x1355,0x0000,0x0000,0x0000, -0x1355,0x0000,0x0000,0x0000, 0x1355,0x0000,0x0000,0x0000, -0x135A,0x0000,0x0000,0x0000, 0x135A,0x0000,0x0000,0x0000, -0x135A,0x0000,0x0000,0x0000, 0x135A,0x0000,0x0000,0x0000, -0x135D,0x0000,0x0000,0x0000, 0x135D,0x0000,0x0000,0x0000, -0x135D,0x0000,0x0000,0x0000, 0x135D,0x0000,0x0000,0x0000, -0x1359,0x0000,0x0000,0x0000, 0x1359,0x0000,0x0000,0x0000, -0x1359,0x0000,0x0000,0x0000, 0x1359,0x0000,0x0000,0x0000, -0x1397,0x0000,0x0000,0x0000, 0x1397,0x0000,0x0000,0x0000, -0x1397,0x0000,0x0000,0x0000, 0x1397,0x0000,0x0000,0x0000, -0x1399,0x0000,0x0000,0x0000, 0x1399,0x0000,0x0000,0x0000, -0x1399,0x0000,0x0000,0x0000, 0x1399,0x0000,0x0000,0x0000, -0x1360,0x0000,0x0000,0x0000, 0x1360,0x0000,0x0000,0x0000, -0x1360,0x0000,0x0000,0x0000, 0x1360,0x0000,0x0000,0x0000, -0x135F,0x0000,0x0000,0x0000, 0x135F,0x0000,0x0000,0x0000, -0x135F,0x0000,0x0000,0x0000, 0x135F,0x0000,0x0000,0x0000, -0x1361,0x0000,0x0000,0x0000, 0x1361,0x0000,0x0000,0x0000, -0x1361,0x0000,0x0000,0x0000, 0x1361,0x0000,0x0000,0x0000, -0x1363,0x0000,0x0000,0x0000, 0x1363,0x0000,0x0000,0x0000, -0x1363,0x0000,0x0000,0x0000, 0x1363,0x0000,0x0000,0x0000, -0x1370,0x0000,0x0000,0x0000, 0x1370,0x0000,0x0000,0x0000, -0x136F,0x0000,0x0000,0x0000, 0x136F,0x0000,0x0000,0x0000, -0x1371,0x0000,0x0000,0x0000, 0x1371,0x0000,0x0000,0x0000, -0x136B,0x0000,0x0000,0x0000, 0x136B,0x0000,0x0000,0x0000, -0x137E,0x0000,0x0000,0x0000, 0x137E,0x0000,0x0000,0x0000, -0x1377,0x0000,0x0000,0x0000, 0x1377,0x0000,0x0000,0x0000, -0x139F,0x0000,0x0000,0x0000, 0x139F,0x0000,0x0000,0x0000, -0x139F,0x0000,0x0000,0x0000, 0x139F,0x0000,0x0000,0x0000, -0x13A5,0x0000,0x0000,0x0000, 0x13A5,0x0000,0x0000,0x0000, -0x13A5,0x0000,0x0000,0x0000, 0x13A5,0x0000,0x0000,0x0000, -0x13A9,0x0000,0x0000,0x0000, 0x13A9,0x0000,0x0000,0x0000, -0x13A9,0x0000,0x0000,0x0000, 0x13A9,0x0000,0x0000,0x0000, -0x13A7,0x0000,0x0000,0x0000, 0x13A7,0x0000,0x0000,0x0000, -0x13A7,0x0000,0x0000,0x0000, 0x13A7,0x0000,0x0000,0x0000, -0x13B2,0x0000,0x0000,0x0000, 0x13B2,0x0000,0x0000,0x0000, -0x13B3,0x0000,0x0000,0x0000, 0x13B3,0x0000,0x0000,0x0000, -0x13B3,0x0000,0x0000,0x0000, 0x13B3,0x0000,0x0000,0x0000, -0x13BC,0x0000,0x0000,0x0000, 0x13BC,0x0000,0x0000,0x0000, -0x13B9,0x0000,0x0000,0x0000, 0x13B9,0x0000,0x0000,0x0000, -0x13B9,0x0000,0x0000,0x0000, 0x13B9,0x0000,0x0000,0x0000, -0x13B8,0x0000,0x0000,0x0000, 0x13B8,0x0000,0x0000,0x0000, -0x13B8,0x0000,0x0000,0x0000, 0x13B8,0x0000,0x0000,0x0000, -0x13CE,0x0000,0x0000,0x0000, 0x13CE,0x0000,0x0000,0x0000, -0x13CE,0x0000,0x0000,0x0000, 0x13CE,0x0000,0x0000,0x0000, -0xFBC1,0xFBB2,0x0000,0x0000, 0xFBC1,0xFBB3,0x0000,0x0000, -0xFBC1,0xFBB4,0x0000,0x0000, 0xFBC1,0xFBB5,0x0000,0x0000, -0xFBC1,0xFBB6,0x0000,0x0000, 0xFBC1,0xFBB7,0x0000,0x0000, -0xFBC1,0xFBB8,0x0000,0x0000, 0xFBC1,0xFBB9,0x0000,0x0000, -0xFBC1,0xFBBA,0x0000,0x0000, 0xFBC1,0xFBBB,0x0000,0x0000, -0xFBC1,0xFBBC,0x0000,0x0000, 0xFBC1,0xFBBD,0x0000,0x0000, -0xFBC1,0xFBBE,0x0000,0x0000, 0xFBC1,0xFBBF,0x0000,0x0000, -0xFBC1,0xFBC0,0x0000,0x0000, 0xFBC1,0xFBC1,0x0000,0x0000, -0xFBC1,0xFBC2,0x0000,0x0000, 0xFBC1,0xFBC3,0x0000,0x0000, -0xFBC1,0xFBC4,0x0000,0x0000, 0xFBC1,0xFBC5,0x0000,0x0000, -0xFBC1,0xFBC6,0x0000,0x0000, 0xFBC1,0xFBC7,0x0000,0x0000, -0xFBC1,0xFBC8,0x0000,0x0000, 0xFBC1,0xFBC9,0x0000,0x0000, -0xFBC1,0xFBCA,0x0000,0x0000, 0xFBC1,0xFBCB,0x0000,0x0000, -0xFBC1,0xFBCC,0x0000,0x0000, 0xFBC1,0xFBCD,0x0000,0x0000, -0xFBC1,0xFBCE,0x0000,0x0000, 0xFBC1,0xFBCF,0x0000,0x0000, -0xFBC1,0xFBD0,0x0000,0x0000, 0xFBC1,0xFBD1,0x0000,0x0000, -0xFBC1,0xFBD2,0x0000,0x0000, 0x13A3,0x0000,0x0000,0x0000, -0x13A3,0x0000,0x0000,0x0000, 0x13A3,0x0000,0x0000,0x0000, -0x13A3,0x0000,0x0000,0x0000, 0x13C1,0x0000,0x0000,0x0000, -0x13C1,0x0000,0x0000,0x0000, 0x13C0,0x0000,0x0000,0x0000, -0x13C0,0x0000,0x0000,0x0000, 0x13C2,0x0000,0x0000,0x0000, -0x13C2,0x0000,0x0000,0x0000, 0x13C1,0x1347,0x0000,0x0000, -0x13C5,0x0000,0x0000,0x0000, 0x13C5,0x0000,0x0000,0x0000, -0x13BF,0x0000,0x0000,0x0000, 0x13BF,0x0000,0x0000,0x0000, -0x13C3,0x0000,0x0000,0x0000, 0x13C3,0x0000,0x0000,0x0000, -0x13CC,0x0000,0x0000,0x0000, 0x13CC,0x0000,0x0000,0x0000, -0x13CC,0x0000,0x0000,0x0000, 0x13CC,0x0000,0x0000,0x0000, -0x13C7,0x0000,0x0000,0x0000, 0x13C7,0x0000,0x0000,0x0000, -0x134F,0x1350,0x0000,0x0000, 0x134F,0x1350,0x0000,0x0000, -0x134F,0x13BC,0x0000,0x0000, 0x134F,0x13BC,0x0000,0x0000, -0x134F,0x13BD,0x0000,0x0000, 0x134F,0x13BD,0x0000,0x0000, -0x134F,0x13C1,0x0000,0x0000, 0x134F,0x13C1,0x0000,0x0000, -0x134F,0x13C0,0x0000,0x0000, 0x134F,0x13C0,0x0000,0x0000, -0x134F,0x13C2,0x0000,0x0000, 0x134F,0x13C2,0x0000,0x0000, -0x134F,0x13CC,0x0000,0x0000, 0x134F,0x13CC,0x0000,0x0000, -0x134F,0x13CC,0x0000,0x0000, 0x134F,0x13C7,0x0000,0x0000, -0x134F,0x13C7,0x0000,0x0000, 0x134F,0x13C7,0x0000,0x0000, -0x13C9,0x0000,0x0000,0x0000, 0x13C9,0x0000,0x0000,0x0000, -0x13C9,0x0000,0x0000,0x0000, 0x13C9,0x0000,0x0000,0x0000 -}; - -uint16 page0FCdata[]= { /* FC00 (3 weights per char) */ -0x134F,0x135E,0x0000, 0x134F,0x1364,0x0000, 0x134F,0x13B0,0x0000, -0x134F,0x13C7,0x0000, 0x134F,0x13C8,0x0000, 0x1352,0x135E,0x0000, -0x1352,0x1364,0x0000, 0x1352,0x1365,0x0000, 0x1352,0x13B0,0x0000, -0x1352,0x13C7,0x0000, 0x1352,0x13C8,0x0000, 0x1357,0x135E,0x0000, -0x1357,0x1364,0x0000, 0x1357,0x1365,0x0000, 0x1357,0x13B0,0x0000, -0x1357,0x13C7,0x0000, 0x1357,0x13C8,0x0000, 0x1358,0x135E,0x0000, -0x1358,0x13B0,0x0000, 0x1358,0x13C7,0x0000, 0x1358,0x13C8,0x0000, -0x135E,0x1364,0x0000, 0x135E,0x13B0,0x0000, 0x1364,0x135E,0x0000, -0x1364,0x13B0,0x0000, 0x1365,0x135E,0x0000, 0x1365,0x1364,0x0000, -0x1365,0x13B0,0x0000, 0x1381,0x135E,0x0000, 0x1381,0x1364,0x0000, -0x1381,0x1365,0x0000, 0x1381,0x13B0,0x0000, 0x1387,0x1364,0x0000, -0x1387,0x13B0,0x0000, 0x1388,0x135E,0x0000, 0x1388,0x1364,0x0000, -0x1388,0x1365,0x0000, 0x1388,0x13B0,0x0000, 0x138C,0x1364,0x0000, -0x138C,0x13B0,0x0000, 0x138D,0x13B0,0x0000, 0x138F,0x135E,0x0000, -0x138F,0x13B0,0x0000, 0x1390,0x135E,0x0000, 0x1390,0x13B0,0x0000, -0x1393,0x135E,0x0000, 0x1393,0x1364,0x0000, 0x1393,0x1365,0x0000, -0x1393,0x13B0,0x0000, 0x1393,0x13C7,0x0000, 0x1393,0x13C8,0x0000, -0x139B,0x1364,0x0000, 0x139B,0x13B0,0x0000, 0x139B,0x13C7,0x0000, -0x139B,0x13C8,0x0000, 0x139E,0x1350,0x0000, 0x139E,0x135E,0x0000, -0x139E,0x1364,0x0000, 0x139E,0x1365,0x0000, 0x139E,0x13AB,0x0000, -0x139E,0x13B0,0x0000, 0x139E,0x13C7,0x0000, 0x139E,0x13C8,0x0000, -0x13AB,0x135E,0x0000, 0x13AB,0x1364,0x0000, 0x13AB,0x1365,0x0000, -0x13AB,0x13B0,0x0000, 0x13AB,0x13C7,0x0000, 0x13AB,0x13C8,0x0000, -0x13B0,0x135E,0x0000, 0x13B0,0x1364,0x0000, 0x13B0,0x1365,0x0000, -0x13B0,0x13B0,0x0000, 0x13B0,0x13C7,0x0000, 0x13B0,0x13C8,0x0000, -0x13B1,0x135E,0x0000, 0x13B1,0x1364,0x0000, 0x13B1,0x1365,0x0000, -0x13B1,0x13B0,0x0000, 0x13B1,0x13C7,0x0000, 0x13B1,0x13C8,0x0000, -0x13B7,0x135E,0x0000, 0x13B7,0x13B0,0x0000, 0x13B7,0x13C7,0x0000, -0x13B7,0x13C8,0x0000, 0x13C8,0x135E,0x0000, 0x13C8,0x1364,0x0000, -0x13C8,0x1365,0x0000, 0x13C8,0x13B0,0x0000, 0x13C8,0x13C7,0x0000, -0x13C8,0x13C8,0x0000, 0x136A,0x0000,0x0000, 0x1375,0x0000,0x0000, -0x13C7,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x134F,0x1375,0x0000, 0x134F,0x1376,0x0000, -0x134F,0x13B0,0x0000, 0x134F,0x13B1,0x0000, 0x134F,0x13C7,0x0000, -0x134F,0x13C8,0x0000, 0x1352,0x1375,0x0000, 0x1352,0x1376,0x0000, -0x1352,0x13B0,0x0000, 0x1352,0x13B1,0x0000, 0x1352,0x13C7,0x0000, -0x1352,0x13C8,0x0000, 0x1357,0x1375,0x0000, 0x1357,0x1376,0x0000, -0x1357,0x13B0,0x0000, 0x1357,0x13B1,0x0000, 0x1357,0x13C7,0x0000, -0x1357,0x13C8,0x0000, 0x1358,0x1375,0x0000, 0x1358,0x1376,0x0000, -0x1358,0x13B0,0x0000, 0x1358,0x13B1,0x0000, 0x1358,0x13C7,0x0000, -0x1358,0x13C8,0x0000, 0x1393,0x13C7,0x0000, 0x1393,0x13C8,0x0000, -0x139B,0x13C7,0x0000, 0x139B,0x13C8,0x0000, 0x139E,0x1350,0x0000, -0x139E,0x13AB,0x0000, 0x139E,0x13B0,0x0000, 0x139E,0x13C7,0x0000, -0x139E,0x13C8,0x0000, 0x13AB,0x13B0,0x0000, 0x13AB,0x13C7,0x0000, -0x13AB,0x13C8,0x0000, 0x13B0,0x1350,0x0000, 0x13B0,0x13B0,0x0000, -0x13B1,0x1375,0x0000, 0x13B1,0x1376,0x0000, 0x13B1,0x13B0,0x0000, -0x13B1,0x13B1,0x0000, 0x13B1,0x13C7,0x0000, 0x13B1,0x13C8,0x0000, -0x13C7,0x0000,0x0000, 0x13C8,0x1375,0x0000, 0x13C8,0x1376,0x0000, -0x13C8,0x13B0,0x0000, 0x13C8,0x13B1,0x0000, 0x13C8,0x13C7,0x0000, -0x13C8,0x13C8,0x0000, 0x134F,0x135E,0x0000, 0x134F,0x1364,0x0000, -0x134F,0x1365,0x0000, 0x134F,0x13B0,0x0000, 0x134F,0x13B7,0x0000, -0x1352,0x135E,0x0000, 0x1352,0x1364,0x0000, 0x1352,0x1365,0x0000, -0x1352,0x13B0,0x0000, 0x1352,0x13B7,0x0000, 0x1357,0x135E,0x0000, -0x1357,0x1364,0x0000, 0x1357,0x1365,0x0000, 0x1357,0x13B0,0x0000, -0x1357,0x13B7,0x0000, 0x1358,0x13B0,0x0000, 0x135E,0x1364,0x0000, -0x135E,0x13B0,0x0000, 0x1364,0x135E,0x0000, 0x1364,0x13B0,0x0000, -0x1365,0x135E,0x0000, 0x1365,0x13B0,0x0000, 0x1381,0x135E,0x0000, -0x1381,0x1364,0x0000, 0x1381,0x1365,0x0000, 0x1381,0x13B0,0x0000, -0x1387,0x1364,0x0000, 0x1387,0x1365,0x0000, 0x1387,0x13B0,0x0000, -0x1388,0x135E,0x0000, 0x1388,0x1364,0x0000, 0x1388,0x1365,0x0000, -0x1388,0x13B0,0x0000, 0x138C,0x1364,0x0000, 0x138D,0x13B0,0x0000, -0x138F,0x135E,0x0000, 0x138F,0x13B0,0x0000, 0x1390,0x135E,0x0000, -0x1390,0x13B0,0x0000, 0x1393,0x135E,0x0000, 0x1393,0x1364,0x0000, -0x1393,0x1365,0x0000, 0x1393,0x13B0,0x0000, 0x139B,0x1364,0x0000, -0x139B,0x13B0,0x0000, 0x139E,0x135E,0x0000, 0x139E,0x1364,0x0000, -0x139E,0x1365,0x0000, 0x139E,0x13AB,0x0000, 0x139E,0x13B0,0x0000, -0x13AB,0x135E,0x0000, 0x13AB,0x1364,0x0000, 0x13AB,0x1365,0x0000, -0x13AB,0x13B0,0x0000, 0x13AB,0x13B7,0x0000, 0x13B0,0x135E,0x0000, -0x13B0,0x1364,0x0000, 0x13B0,0x1365,0x0000, 0x13B0,0x13B0,0x0000, -0x13B1,0x135E,0x0000, 0x13B1,0x1364,0x0000, 0x13B1,0x1365,0x0000, -0x13B1,0x13B0,0x0000, 0x13B1,0x13B7,0x0000, 0x13B7,0x135E,0x0000, -0x13B7,0x13B0,0x0000, 0x13B7,0x0000,0x0000, 0x13C8,0x135E,0x0000, -0x13C8,0x1364,0x0000, 0x13C8,0x1365,0x0000, 0x13C8,0x13B0,0x0000, -0x13C8,0x13B7,0x0000, 0x134F,0x13B0,0x0000, 0x134F,0x13B7,0x0000, -0x1352,0x13B0,0x0000, 0x1352,0x13B7,0x0000, 0x1357,0x13B0,0x0000, -0x1357,0x13B7,0x0000, 0x1358,0x13B0,0x0000, 0x1358,0x13B7,0x0000, -0x1381,0x13B0,0x0000, 0x1381,0x13B7,0x0000, 0x1382,0x13B0,0x0000, -0x1382,0x13B7,0x0000, 0x139E,0x13AB,0x0000, 0x139E,0x13B0,0x0000, -0x13AB,0x13B0,0x0000, 0x13B1,0x13B0,0x0000, 0x13B1,0x13B7,0x0000, -0x13C8,0x13B0,0x0000, 0x13C8,0x13B7,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x138C,0x13C7,0x0000, -0x138C,0x13C8,0x0000, 0x138F,0x13C7,0x0000, 0x138F,0x13C8,0x0000, -0x1390,0x13C7,0x0000, 0x1390,0x13C8,0x0000, 0x1381,0x13C7,0x0000, -0x1381,0x13C8,0x0000, 0x1382,0x13C7,0x0000, 0x1382,0x13C8,0x0000, -0x1364,0x13C7,0x0000 }; - -uint16 page0FDdata[]= { /* FD00 (9 weights per char) */ -0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1365,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1365,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1365,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1375,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x1375,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x1375,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x1375,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138C,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138C,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138F,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138F,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1390,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1390,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1364,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1365,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1365,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1365,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1375,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x1375,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x1375,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x1375,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1365,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x13B7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13B7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138C,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x1365,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1365,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138C,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138D,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1350,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1350,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x02C0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x02C1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD40,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD41,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD42,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD43,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD44,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD45,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD46,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD47,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD48,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD49,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD4A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD4B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD4C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD4D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD4E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD4F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x135E,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x1364,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x1364,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x1364,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x1365,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x13B0,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x13B0,0x1365,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1364,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1364,0x13B0,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x1364,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x135E,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x135E,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x13B0,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x1364,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x1364,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1364,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1364,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13B0,0x1365,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13B0,0x1365,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x1364,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x1365,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x1365,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138C,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138C,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138C,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138C,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138F,0x135E,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138F,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138F,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138F,0x13B0,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1390,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1390,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1390,0x13B0,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1393,0x1365,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1393,0x1365,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x139B,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x139B,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x1364,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x1364,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x135E,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x135E,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x1365,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x1365,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x1364,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x1364,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x135E,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x135E,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x1365,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x1365,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD90,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFD91,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x135E,0x1365,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B7,0x13B0,0x135E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B7,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x1364,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x1364,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x135E,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x135E,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x135E,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x13B0,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13C8,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13C8,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1352,0x1365,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x135E,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x1365,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x1365,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1357,0x13B0,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x1364,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x13B0,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x1365,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1382,0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1388,0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13C8,0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13C8,0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13C8,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x139B,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x139B,0x13B0,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x1364,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138F,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x139E,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x135E,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x1365,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x135E,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x139E,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13AB,0x135E,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x135E,0x1364,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1364,0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1393,0x13B0,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1352,0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x139E,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138F,0x135E,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x13B0,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1381,0x1365,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B1,0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDC8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDC9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDCA,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDCB,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDCC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDCD,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDCE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDCF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDD9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDDA,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDDB,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDDC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDDD,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDDE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDDF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDE9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDEA,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDEB,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDEC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDED,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDEE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDEF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x13AB,0x13CE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x139B,0x13AB,0x13CE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1350,0x13AB,0x13AB,0x13B7,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1350,0x139E,0x1352,0x1375,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13B0,0x1364,0x13B0,0x1369,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x13AB,0x138F,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1375,0x1381,0x13BD,0x13AB,0x0000,0x0000,0x0000,0x0000,0x0000, -0x138F,0x13AB,0x13C8,0x13B7,0x0000,0x0000,0x0000,0x0000,0x0000, -0x13BD,0x1381,0x13AB,0x13B0,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1387,0x13AB,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDFA,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x135E,0x13AB,0x0209,0x135E,0x13AB,0x1350,0x13AB,0x13B7,0x0000, -0x1375,0x13C9,0x1350,0x13AB,0x0000,0x0000,0x0000,0x0000,0x0000, -0x034F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDFE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0xFBC1,0xFDFF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - -uint16 page0FEdata[]= { /* FE00 (3 weights per char) */ -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0xFBC1,0xFE10,0x0000, 0xFBC1,0xFE11,0x0000, -0xFBC1,0xFE12,0x0000, 0xFBC1,0xFE13,0x0000, 0xFBC1,0xFE14,0x0000, -0xFBC1,0xFE15,0x0000, 0xFBC1,0xFE16,0x0000, 0xFBC1,0xFE17,0x0000, -0xFBC1,0xFE18,0x0000, 0xFBC1,0xFE19,0x0000, 0xFBC1,0xFE1A,0x0000, -0xFBC1,0xFE1B,0x0000, 0xFBC1,0xFE1C,0x0000, 0xFBC1,0xFE1D,0x0000, -0xFBC1,0xFE1E,0x0000, 0xFBC1,0xFE1F,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC1,0xFE24,0x0000, 0xFBC1,0xFE25,0x0000, 0xFBC1,0xFE26,0x0000, -0xFBC1,0xFE27,0x0000, 0xFBC1,0xFE28,0x0000, 0xFBC1,0xFE29,0x0000, -0xFBC1,0xFE2A,0x0000, 0xFBC1,0xFE2B,0x0000, 0xFBC1,0xFE2C,0x0000, -0xFBC1,0xFE2D,0x0000, 0xFBC1,0xFE2E,0x0000, 0xFBC1,0xFE2F,0x0000, -0x025D,0x025D,0x0000, 0x0228,0x0000,0x0000, 0x0227,0x0000,0x0000, -0x021B,0x0000,0x0000, 0x021B,0x0000,0x0000, 0x0288,0x0000,0x0000, -0x0289,0x0000,0x0000, 0x028C,0x0000,0x0000, 0x028D,0x0000,0x0000, -0x02B8,0x0000,0x0000, 0x02B9,0x0000,0x0000, 0x02B6,0x0000,0x0000, -0x02B7,0x0000,0x0000, 0x02B0,0x0000,0x0000, 0x02B1,0x0000,0x0000, -0x02AE,0x0000,0x0000, 0x02AF,0x0000,0x0000, 0x02B2,0x0000,0x0000, -0x02B3,0x0000,0x0000, 0x02B4,0x0000,0x0000, 0x02B5,0x0000,0x0000, -0x0238,0x0000,0x0000, 0x0239,0x0000,0x0000, 0x028A,0x0000,0x0000, -0x028B,0x0000,0x0000, 0x0211,0x0000,0x0000, 0x0211,0x0000,0x0000, -0x0211,0x0000,0x0000, 0x0211,0x0000,0x0000, 0x021B,0x0000,0x0000, -0x021B,0x0000,0x0000, 0x021B,0x0000,0x0000, 0x022F,0x0000,0x0000, -0x0237,0x0000,0x0000, 0x025D,0x0000,0x0000, 0xFBC1,0xFE53,0x0000, -0x023A,0x0000,0x0000, 0x023D,0x0000,0x0000, 0x0255,0x0000,0x0000, -0x0251,0x0000,0x0000, 0x0228,0x0000,0x0000, 0x0288,0x0000,0x0000, -0x0289,0x0000,0x0000, 0x028C,0x0000,0x0000, 0x028D,0x0000,0x0000, -0x02B8,0x0000,0x0000, 0x02B9,0x0000,0x0000, 0x02D2,0x0000,0x0000, -0x02CF,0x0000,0x0000, 0x02C8,0x0000,0x0000, 0x0428,0x0000,0x0000, -0x0221,0x0000,0x0000, 0x042C,0x0000,0x0000, 0x042E,0x0000,0x0000, -0x042D,0x0000,0x0000, 0xFBC1,0xFE67,0x0000, 0x02CE,0x0000,0x0000, -0x0E0F,0x0000,0x0000, 0x02D3,0x0000,0x0000, 0x02C7,0x0000,0x0000, -0xFBC1,0xFE6C,0x0000, 0xFBC1,0xFE6D,0x0000, 0xFBC1,0xFE6E,0x0000, -0xFBC1,0xFE6F,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0xFBC1,0xFE75,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x1347,0x0000,0x0000, -0x1348,0x0000,0x0000, 0x1348,0x0000,0x0000, 0x1349,0x0000,0x0000, -0x1349,0x0000,0x0000, 0x134C,0x0000,0x0000, 0x134C,0x0000,0x0000, -0x134D,0x0000,0x0000, 0x134D,0x0000,0x0000, 0x134F,0x0000,0x0000, -0x134F,0x0000,0x0000, 0x134F,0x0000,0x0000, 0x134F,0x0000,0x0000, -0x1350,0x0000,0x0000, 0x1350,0x0000,0x0000, 0x1352,0x0000,0x0000, -0x1352,0x0000,0x0000, 0x1352,0x0000,0x0000, 0x1352,0x0000,0x0000, -0x1356,0x0000,0x0000, 0x1356,0x0000,0x0000, 0x1357,0x0000,0x0000, -0x1357,0x0000,0x0000, 0x1357,0x0000,0x0000, 0x1357,0x0000,0x0000, -0x1358,0x0000,0x0000, 0x1358,0x0000,0x0000, 0x1358,0x0000,0x0000, -0x1358,0x0000,0x0000, 0x135E,0x0000,0x0000, 0x135E,0x0000,0x0000, -0x135E,0x0000,0x0000, 0x135E,0x0000,0x0000, 0x1364,0x0000,0x0000, -0x1364,0x0000,0x0000, 0x1364,0x0000,0x0000, 0x1364,0x0000,0x0000, -0x1365,0x0000,0x0000, 0x1365,0x0000,0x0000, 0x1365,0x0000,0x0000, -0x1365,0x0000,0x0000, 0x1369,0x0000,0x0000, 0x1369,0x0000,0x0000, -0x136A,0x0000,0x0000, 0x136A,0x0000,0x0000, 0x1375,0x0000,0x0000, -0x1375,0x0000,0x0000, 0x1376,0x0000,0x0000, 0x1376,0x0000,0x0000, -0x1381,0x0000,0x0000, 0x1381,0x0000,0x0000, 0x1381,0x0000,0x0000, -0x1381,0x0000,0x0000, 0x1382,0x0000,0x0000, 0x1382,0x0000,0x0000, -0x1382,0x0000,0x0000, 0x1382,0x0000,0x0000, 0x1387,0x0000,0x0000, -0x1387,0x0000,0x0000, 0x1387,0x0000,0x0000, 0x1387,0x0000,0x0000, -0x1388,0x0000,0x0000, 0x1388,0x0000,0x0000, 0x1388,0x0000,0x0000, -0x1388,0x0000,0x0000, 0x138C,0x0000,0x0000, 0x138C,0x0000,0x0000, -0x138C,0x0000,0x0000, 0x138C,0x0000,0x0000, 0x138D,0x0000,0x0000, -0x138D,0x0000,0x0000, 0x138D,0x0000,0x0000, 0x138D,0x0000,0x0000, -0x138F,0x0000,0x0000, 0x138F,0x0000,0x0000, 0x138F,0x0000,0x0000, -0x138F,0x0000,0x0000, 0x1390,0x0000,0x0000, 0x1390,0x0000,0x0000, -0x1390,0x0000,0x0000, 0x1390,0x0000,0x0000, 0x1393,0x0000,0x0000, -0x1393,0x0000,0x0000, 0x1393,0x0000,0x0000, 0x1393,0x0000,0x0000, -0x139B,0x0000,0x0000, 0x139B,0x0000,0x0000, 0x139B,0x0000,0x0000, -0x139B,0x0000,0x0000, 0x139E,0x0000,0x0000, 0x139E,0x0000,0x0000, -0x139E,0x0000,0x0000, 0x139E,0x0000,0x0000, 0x13AB,0x0000,0x0000, -0x13AB,0x0000,0x0000, 0x13AB,0x0000,0x0000, 0x13AB,0x0000,0x0000, -0x13B0,0x0000,0x0000, 0x13B0,0x0000,0x0000, 0x13B0,0x0000,0x0000, -0x13B0,0x0000,0x0000, 0x13B1,0x0000,0x0000, 0x13B1,0x0000,0x0000, -0x13B1,0x0000,0x0000, 0x13B1,0x0000,0x0000, 0x13B7,0x0000,0x0000, -0x13B7,0x0000,0x0000, 0x13B7,0x0000,0x0000, 0x13B7,0x0000,0x0000, -0x13BD,0x0000,0x0000, 0x13BD,0x0000,0x0000, 0x13C7,0x0000,0x0000, -0x13C7,0x0000,0x0000, 0x13C8,0x0000,0x0000, 0x13C8,0x0000,0x0000, -0x13C8,0x0000,0x0000, 0x13C8,0x0000,0x0000, 0x13AB,0x1348,0x0000, -0x13AB,0x1348,0x0000, 0x13AB,0x1349,0x0000, 0x13AB,0x1349,0x0000, -0x13AB,0x134D,0x0000, 0x13AB,0x134D,0x0000, 0x13AB,0x1350,0x0000, -0x13AB,0x1350,0x0000, 0xFBC1,0xFEFD,0x0000, 0xFBC1,0xFEFE,0x0000, -0x0000,0x0000,0x0000 }; - -uint16 page0FFdata[]= { /* FF00 (3 weights per char) */ -0xFBC1,0xFF00,0x0000, 0x0251,0x0000,0x0000, 0x027E,0x0000,0x0000, -0x02D2,0x0000,0x0000, 0x0E0F,0x0000,0x0000, 0x02D3,0x0000,0x0000, -0x02CF,0x0000,0x0000, 0x0277,0x0000,0x0000, 0x0288,0x0000,0x0000, -0x0289,0x0000,0x0000, 0x02C8,0x0000,0x0000, 0x0428,0x0000,0x0000, -0x022F,0x0000,0x0000, 0x0221,0x0000,0x0000, 0x025D,0x0000,0x0000, -0x02CC,0x0000,0x0000, 0x0E29,0x0000,0x0000, 0x0E2A,0x0000,0x0000, -0x0E2B,0x0000,0x0000, 0x0E2C,0x0000,0x0000, 0x0E2D,0x0000,0x0000, -0x0E2E,0x0000,0x0000, 0x0E2F,0x0000,0x0000, 0x0E30,0x0000,0x0000, -0x0E31,0x0000,0x0000, 0x0E32,0x0000,0x0000, 0x023D,0x0000,0x0000, -0x023A,0x0000,0x0000, 0x042C,0x0000,0x0000, 0x042D,0x0000,0x0000, -0x042E,0x0000,0x0000, 0x0255,0x0000,0x0000, 0x02C7,0x0000,0x0000, -0x0E33,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E60,0x0000,0x0000, -0x0E6D,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0EB9,0x0000,0x0000, -0x0EC1,0x0000,0x0000, 0x0EE1,0x0000,0x0000, 0x0EFB,0x0000,0x0000, -0x0F10,0x0000,0x0000, 0x0F21,0x0000,0x0000, 0x0F2E,0x0000,0x0000, -0x0F5B,0x0000,0x0000, 0x0F64,0x0000,0x0000, 0x0F82,0x0000,0x0000, -0x0FA7,0x0000,0x0000, 0x0FB4,0x0000,0x0000, 0x0FC0,0x0000,0x0000, -0x0FEA,0x0000,0x0000, 0x1002,0x0000,0x0000, 0x101F,0x0000,0x0000, -0x1044,0x0000,0x0000, 0x1051,0x0000,0x0000, 0x105A,0x0000,0x0000, -0x105E,0x0000,0x0000, 0x106A,0x0000,0x0000, 0x028A,0x0000,0x0000, -0x02CE,0x0000,0x0000, 0x028B,0x0000,0x0000, 0x020F,0x0000,0x0000, -0x021B,0x0000,0x0000, 0x020C,0x0000,0x0000, 0x0E33,0x0000,0x0000, -0x0E4A,0x0000,0x0000, 0x0E60,0x0000,0x0000, 0x0E6D,0x0000,0x0000, -0x0E8B,0x0000,0x0000, 0x0EB9,0x0000,0x0000, 0x0EC1,0x0000,0x0000, -0x0EE1,0x0000,0x0000, 0x0EFB,0x0000,0x0000, 0x0F10,0x0000,0x0000, -0x0F21,0x0000,0x0000, 0x0F2E,0x0000,0x0000, 0x0F5B,0x0000,0x0000, -0x0F64,0x0000,0x0000, 0x0F82,0x0000,0x0000, 0x0FA7,0x0000,0x0000, -0x0FB4,0x0000,0x0000, 0x0FC0,0x0000,0x0000, 0x0FEA,0x0000,0x0000, -0x1002,0x0000,0x0000, 0x101F,0x0000,0x0000, 0x1044,0x0000,0x0000, -0x1051,0x0000,0x0000, 0x105A,0x0000,0x0000, 0x105E,0x0000,0x0000, -0x106A,0x0000,0x0000, 0x028C,0x0000,0x0000, 0x0430,0x0000,0x0000, -0x028D,0x0000,0x0000, 0x0433,0x0000,0x0000, 0x029A,0x0000,0x0000, -0x029B,0x0000,0x0000, 0x0266,0x0000,0x0000, 0x02B2,0x0000,0x0000, -0x02B3,0x0000,0x0000, 0x0237,0x0000,0x0000, 0x022E,0x0000,0x0000, -0x1E80,0x0000,0x0000, 0x1E52,0x0000,0x0000, 0x1E53,0x0000,0x0000, -0x1E54,0x0000,0x0000, 0x1E55,0x0000,0x0000, 0x1E56,0x0000,0x0000, -0x1E75,0x0000,0x0000, 0x1E76,0x0000,0x0000, 0x1E77,0x0000,0x0000, -0x1E63,0x0000,0x0000, 0x0E0B,0x0000,0x0000, 0x1E52,0x0000,0x0000, -0x1E53,0x0000,0x0000, 0x1E54,0x0000,0x0000, 0x1E55,0x0000,0x0000, -0x1E56,0x0000,0x0000, 0x1E57,0x0000,0x0000, 0x1E58,0x0000,0x0000, -0x1E59,0x0000,0x0000, 0x1E5A,0x0000,0x0000, 0x1E5B,0x0000,0x0000, -0x1E5C,0x0000,0x0000, 0x1E5D,0x0000,0x0000, 0x1E5E,0x0000,0x0000, -0x1E5F,0x0000,0x0000, 0x1E60,0x0000,0x0000, 0x1E61,0x0000,0x0000, -0x1E62,0x0000,0x0000, 0x1E63,0x0000,0x0000, 0x1E64,0x0000,0x0000, -0x1E65,0x0000,0x0000, 0x1E66,0x0000,0x0000, 0x1E67,0x0000,0x0000, -0x1E68,0x0000,0x0000, 0x1E69,0x0000,0x0000, 0x1E6A,0x0000,0x0000, -0x1E6B,0x0000,0x0000, 0x1E6C,0x0000,0x0000, 0x1E6D,0x0000,0x0000, -0x1E6E,0x0000,0x0000, 0x1E6F,0x0000,0x0000, 0x1E70,0x0000,0x0000, -0x1E71,0x0000,0x0000, 0x1E72,0x0000,0x0000, 0x1E73,0x0000,0x0000, -0x1E74,0x0000,0x0000, 0x1E75,0x0000,0x0000, 0x1E76,0x0000,0x0000, -0x1E77,0x0000,0x0000, 0x1E78,0x0000,0x0000, 0x1E79,0x0000,0x0000, -0x1E7A,0x0000,0x0000, 0x1E7B,0x0000,0x0000, 0x1E7C,0x0000,0x0000, -0x1E7D,0x0000,0x0000, 0x1E81,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000, 0x1DBD,0x0000,0x0000, 0x1D62,0x0000,0x0000, -0x1D63,0x0000,0x0000, 0x1E02,0x0000,0x0000, 0x1D64,0x0000,0x0000, -0x1E04,0x0000,0x0000, 0x1E05,0x0000,0x0000, 0x1D65,0x0000,0x0000, -0x1D66,0x0000,0x0000, 0x1D67,0x0000,0x0000, 0x1E08,0x0000,0x0000, -0x1E09,0x0000,0x0000, 0x1E0A,0x0000,0x0000, 0x1E0B,0x0000,0x0000, -0x1E0C,0x0000,0x0000, 0x1E0D,0x0000,0x0000, 0x1D7C,0x0000,0x0000, -0x1D68,0x0000,0x0000, 0x1D69,0x0000,0x0000, 0x1D6A,0x0000,0x0000, -0x1D83,0x0000,0x0000, 0x1D6B,0x0000,0x0000, 0x1D6C,0x0000,0x0000, -0x1D6D,0x0000,0x0000, 0x1D6E,0x0000,0x0000, 0x1D6F,0x0000,0x0000, -0x1D70,0x0000,0x0000, 0x1D71,0x0000,0x0000, 0x1D72,0x0000,0x0000, -0x1D73,0x0000,0x0000, 0x1D74,0x0000,0x0000, 0xFBC1,0xFFBF,0x0000, -0xFBC1,0xFFC0,0x0000, 0xFBC1,0xFFC1,0x0000, 0x1DBE,0x0000,0x0000, -0x1DBF,0x0000,0x0000, 0x1DC0,0x0000,0x0000, 0x1DC1,0x0000,0x0000, -0x1DC2,0x0000,0x0000, 0x1DC3,0x0000,0x0000, 0xFBC1,0xFFC8,0x0000, -0xFBC1,0xFFC9,0x0000, 0x1DC4,0x0000,0x0000, 0x1DC5,0x0000,0x0000, -0x1DC6,0x0000,0x0000, 0x1DC7,0x0000,0x0000, 0x1DC8,0x0000,0x0000, -0x1DC9,0x0000,0x0000, 0xFBC1,0xFFD0,0x0000, 0xFBC1,0xFFD1,0x0000, -0x1DCA,0x0000,0x0000, 0x1DCB,0x0000,0x0000, 0x1DCC,0x0000,0x0000, -0x1DCD,0x0000,0x0000, 0x1DCE,0x0000,0x0000, 0x1DCF,0x0000,0x0000, -0xFBC1,0xFFD8,0x0000, 0xFBC1,0xFFD9,0x0000, 0x1DD0,0x0000,0x0000, -0x1DD1,0x0000,0x0000, 0x1DD2,0x0000,0x0000, 0xFBC1,0xFFDD,0x0000, -0xFBC1,0xFFDE,0x0000, 0xFBC1,0xFFDF,0x0000, 0x0E0E,0x0000,0x0000, -0x0E10,0x0000,0x0000, 0x042F,0x0000,0x0000, 0x0210,0x0000,0x0000, -0x0431,0x0000,0x0000, 0x0E11,0x0000,0x0000, 0x0E20,0x0000,0x0000, -0xFBC1,0xFFE7,0x0000, 0x05FE,0x0000,0x0000, 0x03AE,0x0000,0x0000, -0x03B0,0x0000,0x0000, 0x03AF,0x0000,0x0000, 0x03B1,0x0000,0x0000, -0x069C,0x0000,0x0000, 0x06C7,0x0000,0x0000, 0xFBC1,0xFFEF,0x0000, -0xFBC1,0xFFF0,0x0000, 0xFBC1,0xFFF1,0x0000, 0xFBC1,0xFFF2,0x0000, -0xFBC1,0xFFF3,0x0000, 0xFBC1,0xFFF4,0x0000, 0xFBC1,0xFFF5,0x0000, -0xFBC1,0xFFF6,0x0000, 0xFBC1,0xFFF7,0x0000, 0xFBC1,0xFFF8,0x0000, -0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, -0x0DC5,0x0000,0x0000, 0x0DC6,0x0000,0x0000, 0xFBC1,0xFFFE,0x0000, -0xFBC1,0xFFFF,0x0000 }; - -uchar uca_length[256]={ -4,3,3,4,3,3,3,3,0,3,3,3,3,3,3,3, -3,3,3,3,3,2,3,3,3,3,0,0,0,3,3,3, -5,5,4,3,5,2,3,3,2,2,5,3,0,0,3,3, -3,3,8,9,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -2,2,2,2,3,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,3,3,4,3,9,3,3 -}; -uint16 *uca_weight[256]={ -page000data,page001data,page002data,page003data, -page004data,page005data,page006data,page007data, -NULL ,page009data,page00Adata,page00Bdata, -page00Cdata,page00Ddata,page00Edata,page00Fdata, -page010data,page011data,page012data,page013data, -page014data,page015data,page016data,page017data, -page018data,page019data,NULL ,NULL , -NULL ,page01Ddata,page01Edata,page01Fdata, -page020data,page021data,page022data,page023data, -page024data,page025data,page026data,page027data, -page028data,page029data,page02Adata,page02Bdata, -NULL ,NULL ,page02Edata,page02Fdata, -page030data,page031data,page032data,page033data, -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,page04Ddata,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -page0A0data,page0A1data,page0A2data,page0A3data, -page0A4data,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,NULL ,NULL ,NULL , -NULL ,page0F9data,page0FAdata,page0FBdata, -page0FCdata,page0FDdata,page0FEdata,page0FFdata -}; - -/* - Some sources treat LETTER A WITH DIARESIS (00E4,00C4) - secondary greater than LETTER AE (00E6,00C6). - http://www.evertype.com/alphabets/icelandic.pdf - http://developer.mimer.com/collations/charts/icelandic.htm - - Other sources do not provide any special rules - for LETTER A WITH DIARESIS: - http://www.omniglot.com/writing/icelandic.htm - http://en.wikipedia.org/wiki/Icelandic_alphabet - http://oss.software.ibm.com/icu/charts/collation/is.html - - Let's go the first way. -*/ - -static const char icelandic[]= - "& A < \\u00E1 <<< \\u00C1 " - "& D < \\u00F0 <<< \\u00D0 " - "& E < \\u00E9 <<< \\u00C9 " - "& I < \\u00ED <<< \\u00CD " - "& O < \\u00F3 <<< \\u00D3 " - "& U < \\u00FA <<< \\u00DA " - "& Y < \\u00FD <<< \\u00DD " - "& Z < \\u00FE <<< \\u00DE " - "< \\u00E6 <<< \\u00C6 << \\u00E4 <<< \\u00C4 " - "< \\u00F6 <<< \\u00D6 << \\u00F8 <<< \\u00D8 " - "< \\u00E5 <<< \\u00C5 "; - -/* - Some sources treat I and Y primary different. - Other sources treat I and Y the same on primary level. - We'll go the first way. -*/ - -static const char latvian[]= - "& C < \\u010D <<< \\u010C " - "& G < \\u0123 <<< \\u0122 " - "& I < \\u0079 <<< \\u0059 " - "& K < \\u0137 <<< \\u0136 " - "& L < \\u013C <<< \\u013B " - "& N < \\u0146 <<< \\u0145 " - "& R < \\u0157 <<< \\u0156 " - "& S < \\u0161 <<< \\u0160 " - "& Z < \\u017E <<< \\u017D "; - - -static const char romanian[]= - "& A < \\u0103 <<< \\u0102 < \\u00E2 <<< \\u00C2 " - "& I < \\u00EE <<< \\u00CE " - "& S < \\u0219 <<< \\u0218 << \\u015F <<< \\u015E " - "& T < \\u021B <<< \\u021A << \\u0163 <<< \\u0162 "; - -static const char slovenian[]= - "& C < \\u010D <<< \\u010C " - "& S < \\u0161 <<< \\u0160 " - "& Z < \\u017E <<< \\u017D "; - - -static const char polish[]= - "& A < \\u0105 <<< \\u0104 " - "& C < \\u0107 <<< \\u0106 " - "& E < \\u0119 <<< \\u0118 " - "& L < \\u0142 <<< \\u0141 " - "& N < \\u0144 <<< \\u0143 " - "& O < \\u00F3 <<< \\u00D3 " - "& S < \\u015B <<< \\u015A " - "& Z < \\u017A <<< \\u0179 < \\u017C <<< \\u017B"; - -static const char estonian[]= - "& S < \\u0161 <<< \\u0160 " - " < \\u007A <<< \\u005A " - " < \\u017E <<< \\u017D " - "& W < \\u00F5 <<< \\u00D5 " - "< \\u00E4 <<< \\u00C4 " - "< \\u00F6 <<< \\u00D6 " - "< \\u00FC <<< \\u00DC "; - -static const char spanish[]= "& N < \\u00F1 <<< \\u00D1 "; - -/* - Some sources treat V and W as similar on primary level. - We'll treat V and W as different on primary level. -*/ - -static const char swedish[]= - "& Y <<\\u00FC <<< \\u00DC " - "& Z < \\u00E5 <<< \\u00C5 " - "< \\u00E4 <<< \\u00C4 << \\u00E6 <<< \\u00C6 " - "< \\u00F6 <<< \\u00D6 << \\u00F8 <<< \\u00D8 "; - -static const char turkish[]= - "& C < \\u00E7 <<< \\u00C7 " - "& G < \\u011F <<< \\u011E " - "& H < \\u0131 <<< \\u0049 " - "& O < \\u00F6 <<< \\u00D6 " - "& S < \\u015F <<< \\u015E " - "& U < \\u00FC <<< \\u00DC "; - - -static const char czech[]= - "& C < \\u010D <<< \\u010C " - "& H < ch <<< Ch <<< CH" - "& R < \\u0159 <<< \\u0158" - "& S < \\u0161 <<< \\u0160" - "& Z < \\u017E <<< \\u017D"; - -static const char danish[]= /* Also good for Norwegian */ - "& Y << \\u00FC <<< \\u00DC << \\u0171 <<< \\u0170" - "& Z < \\u00E6 <<< \\u00C6 << \\u00E4 <<< \\u00C4" - " < \\u00F8 <<< \\u00D8 << \\u00F6 <<< \\u00D6 << \\u0151 <<< \\u0150" - " < \\u00E5 <<< \\u00C5 << aa <<< Aa <<< AA"; - -static const char lithuanian[]= - "& C << ch <<< Ch <<< CH< \\u010D <<< \\u010C" - "& E << \\u0119 <<< \\u0118 << \\u0117 <<< \\u0116" - "& I << y <<< Y" - "& S < \\u0161 <<< \\u0160" - "& Z < \\u017E <<< \\u017D"; - -static const char slovak[]= - "& A < \\u00E4 <<< \\u00C4" - "& C < \\u010D <<< \\u010C" - "& H < ch <<< Ch <<< CH" - "& O < \\u00F4 <<< \\u00D4" - "& S < \\u0161 <<< \\u0160" - "& Z < \\u017E <<< \\u017D"; - -static const char spanish2[]= /* Also good for Asturian and Galician */ - "&C < ch <<< Ch <<< CH" - "&L < ll <<< Ll <<< LL" - "&N < \\u00F1 <<< \\u00D1"; - -static const char roman[]= /* i.e. Classical Latin */ - "& I << j <<< J " - "& V << u <<< U "; - -/* - Persian collation support was provided by - Jody McIntyre - - To: internals@lists.mysql.com - Subject: Persian UTF8 collation support - Date: 17.08.2004 - - Contraction is not implemented. Some implementations do perform - contraction but others do not, and it is able to sort all my test - strings correctly. - - Jody. -*/ -static const char persian[]= - "& \\u066D < \\u064E < \\uFE76 < \\uFE77 < \\u0650 < \\uFE7A < \\uFE7B" - " < \\u064F < \\uFE78 < \\uFE79 < \\u064B < \\uFE70 < \\uFE71" - " < \\u064D < \\uFE74 < \\u064C < \\uFE72" - "& \\uFE7F < \\u0653 < \\u0654 < \\u0655 < \\u0670" - "& \\u0669 < \\u0622 < \\u0627 < \\u0671 < \\u0621 < \\u0623 < \\u0625" - " < \\u0624 < \\u0626" - "& \\u0642 < \\u06A9 < \\u0643" - "& \\u0648 < \\u0647 < \\u0629 < \\u06C0 < \\u06CC < \\u0649 < \\u064A" - "& \\uFE80 < \\uFE81 < \\uFE82 < \\uFE8D < \\uFE8E < \\uFB50 < \\uFB51" - " < \\uFE80 < \\uFE83 < \\uFE84 < \\uFE87 < \\uFE88 < \\uFE85" - " < \\uFE86 < \\u0689 < \\u068A" - "& \\uFEAE < \\uFDFC" - "& \\uFED8 < \\uFB8E < \\uFB8F < \\uFB90 < \\uFB91 < \\uFED9 < \\uFEDA" - " < \\uFEDB < \\uFEDC" - "& \\uFEEE < \\uFEE9 < \\uFEEA < \\uFEEB < \\uFEEC < \\uFE93 < \\uFE94" - " < \\uFBA4 < \\uFBA5 < \\uFBFC < \\uFBFD < \\uFBFE < \\uFBFF" - " < \\uFEEF < \\uFEF0 < \\uFEF1 < \\uFEF2 < \\uFEF3 < \\uFEF4" - " < \\uFEF5 < \\uFEF6 < \\uFEF7 < \\uFEF8 < \\uFEF9 < \\uFEFA" - " < \\uFEFB < \\uFEFC"; - -/* - Esperanto tailoring. - Contributed by Bertilo Wennergren - September 1, 2005 -*/ -static const char esperanto[]= - "& C < \\u0109 <<< \\u0108" - "& G < \\u011D <<< \\u011C" - "& H < \\u0125 <<< \\u0124" - "& J < \\u0135 <<< \\u0134" - "& S < \\u015d <<< \\u015c" - "& U < \\u016d <<< \\u016c"; - -/* - A simplified version of Hungarian, without consonant contractions. -*/ -static const char hungarian[]= - "&O < \\u00F6 <<< \\u00D6 << \\u0151 <<< \\u0150" - "&U < \\u00FC <<< \\u00DC << \\u0171 <<< \\u0170"; - -/* - SCCII Part 1 : Collation Sequence (SLS1134) - 2006/11/24 - Harshula Jayasuriya - Language Technology Research Lab, University of Colombo / ICTA -*/ -#if 0 -static const char sinhala[]= - "& \\u0D96 < \\u0D82 < \\u0D83" - "& \\u0DA5 < \\u0DA4" - "& \\u0DD8 < \\u0DF2 < \\u0DDF < \\u0DF3" - "& \\u0DDE < \\u0DCA"; -#else -static const char sinhala[]= - "& \\u0D96 < \\u0D82 < \\u0D83 < \\u0D9A < \\u0D9B < \\u0D9C < \\u0D9D" - "< \\u0D9E < \\u0D9F < \\u0DA0 < \\u0DA1 < \\u0DA2 < \\u0DA3" - "< \\u0DA5 < \\u0DA4 < \\u0DA6" - "< \\u0DA7 < \\u0DA8 < \\u0DA9 < \\u0DAA < \\u0DAB < \\u0DAC" - "< \\u0DAD < \\u0DAE < \\u0DAF < \\u0DB0 < \\u0DB1" - "< \\u0DB3 < \\u0DB4 < \\u0DB5 < \\u0DB6 < \\u0DB7 < \\u0DB8" - "< \\u0DB9 < \\u0DBA < \\u0DBB < \\u0DBD < \\u0DC0 < \\u0DC1" - "< \\u0DC2 < \\u0DC3 < \\u0DC4 < \\u0DC5 < \\u0DC6" - "< \\u0DCF" - "< \\u0DD0 < \\u0DD1 < \\u0DD2 < \\u0DD3 < \\u0DD4 < \\u0DD6" - "< \\u0DD8 < \\u0DF2 < \\u0DDF < \\u0DF3 < \\u0DD9 < \\u0DDA" - "< \\u0DDB < \\u0DDC < \\u0DDD < \\u0DDE < \\u0DCA"; -#endif - - -/* - Unicode Collation Algorithm: - Collation element (weight) scanner, - for consequent scan of collations - weights from a string. -*/ -typedef struct my_uca_scanner_st -{ - const uint16 *wbeg; /* Beginning of the current weight string */ - const uchar *sbeg; /* Beginning of the input string */ - const uchar *send; /* End of the input string */ - uchar *uca_length; - uint16 **uca_weight; - uint16 *contractions; - uint16 implicit[2]; - int page; - int code; - CHARSET_INFO *cs; -} my_uca_scanner; - -/* - Charset dependent scanner part, to optimize - some character sets. -*/ -typedef struct my_uca_scanner_handler_st -{ - void (*init)(my_uca_scanner *scanner, CHARSET_INFO *cs, - const uchar *str, size_t length); - int (*next)(my_uca_scanner *scanner); -} my_uca_scanner_handler; - -static uint16 nochar[]= {0,0}; - - -#ifdef HAVE_CHARSET_ucs2 -/* - Initialize collation weight scanner - - SYNOPSIS: - my_uca_scanner_init() - scanner Pointer to an initialized scanner structure - cs Character set + collation information - str Beginning of the string - length Length of the string. - - NOTES: - Optimized for UCS2 - - RETURN - N/A -*/ - -static void my_uca_scanner_init_ucs2(my_uca_scanner *scanner, - CHARSET_INFO *cs __attribute__((unused)), - const uchar *str, size_t length) -{ - scanner->wbeg= nochar; - if (length) - { - scanner->sbeg= str; - scanner->send= str + length - 2; - scanner->uca_length= cs->sort_order; - scanner->uca_weight= cs->sort_order_big; - scanner->contractions= cs->contractions; - return; - } - - /* - Sometimes this function is called with - str=NULL and length=0, which should be - considered as an empty string. - - The above initialization is unsafe for such cases, - because scanner->send is initialized to (NULL-2), which is 0xFFFFFFFE. - Then we fall into an endless loop in my_uca_scanner_next_ucs2(). - - Do special initialization for the case when length=0. - Initialize scanner->sbeg to an address greater than scanner->send. - Next call of my_uca_scanner_next_ucs2() will correctly return with -1. - */ - scanner->sbeg= (uchar*) &nochar[1]; - scanner->send= (uchar*) &nochar[0]; -} - - -/* - Read next collation element (weight), i.e. converts - a stream of characters into a stream of their weights. - - SYNOPSIS: - my_uca_scanner_next() - scanner Address of a previously initialized scanner strucuture - - NOTES: - Optimized for UCS2 - - Checks if the current character's weight string has been fully scanned, - if no, then returns the next weight for this character, - else scans the next character and returns its first weight. - - Each character can have number weights from 0 to 8. - - Some characters do not have weights at all, 0 weights. - It means they are ignored during comparison. - - Examples: - 1. 0x0001 START OF HEADING, has no weights, ignored, does - not produce any weights. - 2. 0x0061 LATIN SMALL LETTER A, has one weight. - 0x0E33 will be returned - 3. 0x00DF LATIN SMALL LETTER SHARP S, aka SZ ligature, - has two weights. It will return 0x0FEA twice for two - consequent calls. - 4. 0x247D PATENTHESIZED NUMBER TEN, has four weights, - this function will return these numbers in four - consequent calls: 0x0288, 0x0E2A, 0x0E29, 0x0289 - 5. A string consisting of the above characters: - 0x0001 0x0061 0x00DF 0x247D - will return the following weights, one weight per call: - 0x0E33 0x0FEA 0x0FEA 0x0288, 0x0E2A, 0x0E29, 0x0289 - - RETURN - Next weight, a number between 0x0000 and 0xFFFF - Or -1 on error (END-OF-STRING or ILLEGAL MULTIBYTE SEQUENCE) -*/ - -static int my_uca_scanner_next_ucs2(my_uca_scanner *scanner) -{ - - /* - Check if the weights for the previous character have been - already fully scanned. If yes, then get the next character and - initialize wbeg and wlength to its weight string. - */ - - if (scanner->wbeg[0]) - return *scanner->wbeg++; - - do - { - uint16 **ucaw= scanner->uca_weight; - uchar *ucal= scanner->uca_length; - - if (scanner->sbeg > scanner->send) - return -1; - - scanner->page= (uchar)scanner->sbeg[0]; - scanner->code= (uchar)scanner->sbeg[1]; - scanner->sbeg+= 2; - - if (scanner->contractions && (scanner->sbeg <= scanner->send)) - { - int cweight; - - if (!scanner->page && !scanner->sbeg[0] && - (scanner->sbeg[1] > 0x40) && (scanner->sbeg[1] < 0x80) && - (scanner->code > 0x40) && (scanner->code < 0x80) && - (cweight= scanner->contractions[(scanner->code-0x40)*0x40+scanner->sbeg[1]-0x40])) - { - scanner->implicit[0]= 0; - scanner->wbeg= scanner->implicit; - scanner->sbeg+=2; - return cweight; - } - } - - if (!ucaw[scanner->page]) - goto implicit; - scanner->wbeg= ucaw[scanner->page] + scanner->code * ucal[scanner->page]; - } while (!scanner->wbeg[0]); - - return *scanner->wbeg++; - -implicit: - - scanner->code= (scanner->page << 8) + scanner->code; - scanner->implicit[0]= (scanner->code & 0x7FFF) | 0x8000; - scanner->implicit[1]= 0; - scanner->wbeg= scanner->implicit; - - scanner->page= scanner->page >> 7; - - if (scanner->code >= 0x3400 && scanner->code <= 0x4DB5) - scanner->page+= 0xFB80; - else if (scanner->code >= 0x4E00 && scanner->code <= 0x9FA5) - scanner->page+= 0xFB40; - else - scanner->page+= 0xFBC0; - - return scanner->page; -} - -static my_uca_scanner_handler my_ucs2_uca_scanner_handler= -{ - my_uca_scanner_init_ucs2, - my_uca_scanner_next_ucs2 -}; - -#endif - - -/* - The same two functions for any character set -*/ -static void my_uca_scanner_init_any(my_uca_scanner *scanner, - CHARSET_INFO *cs __attribute__((unused)), - const uchar *str, size_t length) -{ - /* Note, no needs to initialize scanner->wbeg */ - scanner->sbeg= str; - scanner->send= str + length; - scanner->wbeg= nochar; - scanner->uca_length= cs->sort_order; - scanner->uca_weight= cs->sort_order_big; - scanner->contractions= cs->contractions; - scanner->cs= cs; -} - -static int my_uca_scanner_next_any(my_uca_scanner *scanner) -{ - - /* - Check if the weights for the previous character have been - already fully scanned. If yes, then get the next character and - initialize wbeg and wlength to its weight string. - */ - - if (scanner->wbeg[0]) - return *scanner->wbeg++; - - do - { - uint16 **ucaw= scanner->uca_weight; - uchar *ucal= scanner->uca_length; - my_wc_t wc; - int mb_len; - - if (((mb_len= scanner->cs->cset->mb_wc(scanner->cs, &wc, - scanner->sbeg, - scanner->send)) <= 0)) - return -1; - - scanner->sbeg+= mb_len; - if (wc > 0xFFFF) - { - /* Return 0xFFFD as weight for all characters outside BMP */ - scanner->wbeg= nochar; - return 0xFFFD; - } - else - { - scanner->page= wc >> 8; - scanner->code= wc & 0xFF; - } - - if (scanner->contractions && !scanner->page && - (scanner->code > 0x40) && (scanner->code < 0x80)) - { - uint page1, code1, cweight; - - if (((mb_len= scanner->cs->cset->mb_wc(scanner->cs, &wc, - scanner->sbeg, - scanner->send)) >=0) && - (!(page1= (wc >> 8))) && - ((code1= (wc & 0xFF)) > 0x40) && - (code1 < 0x80) && - (cweight= scanner->contractions[(scanner->code-0x40)*0x40 + code1-0x40])) - { - scanner->implicit[0]= 0; - scanner->wbeg= scanner->implicit; - scanner->sbeg+= mb_len; - return cweight; - } - } - - if (!ucaw[scanner->page]) - goto implicit; - scanner->wbeg= ucaw[scanner->page] + scanner->code * ucal[scanner->page]; - } while (!scanner->wbeg[0]); - - return *scanner->wbeg++; - -implicit: - - scanner->code= (scanner->page << 8) + scanner->code; - scanner->implicit[0]= (scanner->code & 0x7FFF) | 0x8000; - scanner->implicit[1]= 0; - scanner->wbeg= scanner->implicit; - - scanner->page= scanner->page >> 7; - - if (scanner->code >= 0x3400 && scanner->code <= 0x4DB5) - scanner->page+= 0xFB80; - else if (scanner->code >= 0x4E00 && scanner->code <= 0x9FA5) - scanner->page+= 0xFB40; - else - scanner->page+= 0xFBC0; - - return scanner->page; -} - - -static my_uca_scanner_handler my_any_uca_scanner_handler= -{ - my_uca_scanner_init_any, - my_uca_scanner_next_any -}; - -/* - Compares two strings according to the collation - - SYNOPSIS: - my_strnncoll_uca() - cs Character set information - s First string - slen First string length - t Second string - tlen Seconf string length - - NOTES: - Initializes two weight scanners and gets weights - corresponding to two strings in a loop. If weights are not - the same at some step then returns their difference. - - In the while() comparison these situations are possible: - 1. (s_res>0) and (t_res>0) and (s_res == t_res) - Weights are the same so far, continue comparison - 2. (s_res>0) and (t_res>0) and (s_res!=t_res) - A difference has been found, return. - 3. (s_res>0) and (t_res<0) - We have reached the end of the second string, or found - an illegal multibyte sequence in the second string. - Return a positive number, i.e. the first string is bigger. - 4. (s_res<0) and (t_res>0) - We have reached the end of the first string, or found - an illegal multibyte sequence in the first string. - Return a negative number, i.e. the second string is bigger. - 5. (s_res<0) and (t_res<0) - Both scanners returned -1. It means we have riched - the end-of-string of illegal-sequence in both strings - at the same time. Return 0, strings are equal. - - RETURN - Difference between two strings, according to the collation: - 0 - means strings are equal - negative number - means the first string is smaller - positive number - means the first string is bigger -*/ - -static int my_strnncoll_uca(CHARSET_INFO *cs, - my_uca_scanner_handler *scanner_handler, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - my_uca_scanner sscanner; - my_uca_scanner tscanner; - int s_res; - int t_res; - - scanner_handler->init(&sscanner, cs, s, slen); - scanner_handler->init(&tscanner, cs, t, tlen); - - do - { - s_res= scanner_handler->next(&sscanner); - t_res= scanner_handler->next(&tscanner); - } while ( s_res == t_res && s_res >0); - - return (t_is_prefix && t_res < 0) ? 0 : (s_res - t_res); -} - -/* - Compares two strings according to the collation, - ignoring trailing spaces. - - SYNOPSIS: - my_strnncollsp_uca() - cs Character set information - s First string - slen First string length - t Second string - tlen Seconf string length - diff_if_only_endspace_difference - Set to 1 if the strings should be regarded as different - if they only difference in end space - - NOTES: - Works exactly the same with my_strnncoll_uca(), - but ignores trailing spaces. - - In the while() comparison these situations are possible: - 1. (s_res>0) and (t_res>0) and (s_res == t_res) - Weights are the same so far, continue comparison - 2. (s_res>0) and (t_res>0) and (s_res!=t_res) - A difference has been found, return. - 3. (s_res>0) and (t_res<0) - We have reached the end of the second string, or found - an illegal multibyte sequence in the second string. - Compare the first string to an infinite array of - space characters until difference is found, or until - the end of the first string. - 4. (s_res<0) and (t_res>0) - We have reached the end of the first string, or found - an illegal multibyte sequence in the first string. - Compare the second string to an infinite array of - space characters until difference is found or until - the end of the second steing. - 5. (s_res<0) and (t_res<0) - Both scanners returned -1. It means we have riched - the end-of-string of illegal-sequence in both strings - at the same time. Return 0, strings are equal. - - RETURN - Difference between two strings, according to the collation: - 0 - means strings are equal - negative number - means the first string is smaller - positive number - means the first string is bigger -*/ - -static int my_strnncollsp_uca(CHARSET_INFO *cs, - my_uca_scanner_handler *scanner_handler, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference) -{ - my_uca_scanner sscanner, tscanner; - int s_res, t_res; - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= 0; -#endif - - scanner_handler->init(&sscanner, cs, s, slen); - scanner_handler->init(&tscanner, cs, t, tlen); - - do - { - s_res= scanner_handler->next(&sscanner); - t_res= scanner_handler->next(&tscanner); - } while ( s_res == t_res && s_res >0); - - if (s_res > 0 && t_res < 0) - { - /* Calculate weight for SPACE character */ - t_res= cs->sort_order_big[0][0x20 * cs->sort_order[0]]; - - /* compare the first string to spaces */ - do - { - if (s_res != t_res) - return (s_res - t_res); - s_res= scanner_handler->next(&sscanner); - } while (s_res > 0); - return diff_if_only_endspace_difference ? 1 : 0; - } - - if (s_res < 0 && t_res > 0) - { - /* Calculate weight for SPACE character */ - s_res= cs->sort_order_big[0][0x20 * cs->sort_order[0]]; - - /* compare the second string to spaces */ - do - { - if (s_res != t_res) - return (s_res - t_res); - t_res= scanner_handler->next(&tscanner); - } while (t_res > 0); - return diff_if_only_endspace_difference ? -1 : 0; - } - - return ( s_res - t_res ); -} - -/* - Calculates hash value for the given string, - according to the collation, and ignoring trailing spaces. - - SYNOPSIS: - my_hash_sort_uca() - cs Character set information - s String - slen String's length - n1 First hash parameter - n2 Second hash parameter - - NOTES: - Scans consequently weights and updates - hash parameters n1 and n2. In a case insensitive collation, - upper and lower case of the same letter will return the same - weight sequence, and thus will produce the same hash values - in n1 and n2. - - RETURN - N/A -*/ - -static void my_hash_sort_uca(CHARSET_INFO *cs, - my_uca_scanner_handler *scanner_handler, - const uchar *s, size_t slen, - ulong *n1, ulong *n2) -{ - int s_res; - my_uca_scanner scanner; - - slen= cs->cset->lengthsp(cs, (char*) s, slen); - scanner_handler->init(&scanner, cs, s, slen); - - while ((s_res= scanner_handler->next(&scanner)) >0) - { - n1[0]^= (((n1[0] & 63)+n2[0])*(s_res >> 8))+ (n1[0] << 8); - n2[0]+=3; - n1[0]^= (((n1[0] & 63)+n2[0])*(s_res & 0xFF))+ (n1[0] << 8); - n2[0]+=3; - } -} - - -/* - For the given string creates its "binary image", suitable - to be used in binary comparison, i.e. in memcmp(). - - SYNOPSIS: - my_strnxfrm_uca() - cs Character set information - dst Where to write the image - dstlen Space available for the image, in bytes - src The source string - srclen Length of the source string, in bytes - - NOTES: - In a loop, scans weights from the source string and writes - them into the binary image. In a case insensitive collation, - upper and lower cases of the same letter will produce the - same image subsequences. When we have reached the end-of-string - or found an illegal multibyte sequence, the loop stops. - - It is impossible to restore the original string using its - binary image. - - Binary images are used for bulk comparison purposes, - e.g. in ORDER BY, when it is more efficient to create - a binary image and use it instead of weight scanner - for the original strings for every comparison. - - RETURN - Number of bytes that have been written into the binary image. -*/ - -static size_t my_strnxfrm_uca(CHARSET_INFO *cs, - my_uca_scanner_handler *scanner_handler, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - uchar *d0= dst; - uchar *de= dst + dstlen; - int s_res; - my_uca_scanner scanner; - scanner_handler->init(&scanner, cs, src, srclen); - - for (; dst < de && nweights && - (s_res= scanner_handler->next(&scanner)) > 0 ; nweights--) - { - *dst++= s_res >> 8; - if (dst < de) - *dst++= s_res & 0xFF; - } - - if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) - { - uint space_count= min((uint) (de - dst) / 2, nweights); - s_res= cs->sort_order_big[0][0x20 * cs->sort_order[0]]; - for (; space_count ; space_count--) - { - *dst++= s_res >> 8; - *dst++= s_res & 0xFF; - } - } - my_strxfrm_desc_and_reverse(d0, dst, flags, 0); - if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) - { - s_res= cs->sort_order_big[0][0x20 * cs->sort_order[0]]; - for ( ; dst < de; ) - { - *dst++= s_res >> 8; - if (dst < de) - *dst++= s_res & 0xFF; - } - } - return dst - d0; -} - - - -/* - This function compares if two characters are the same. - The sign +1 or -1 does not matter. The only - important thing is that the result is 0 or not 0. - This fact allows us to use memcmp() safely, on both - little-endian and big-endian machines. -*/ - -static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2) -{ - size_t page1= wc1 >> MY_UCA_PSHIFT; - size_t page2= wc2 >> MY_UCA_PSHIFT; - uchar *ucal= cs->sort_order; - uint16 **ucaw= cs->sort_order_big; - size_t length1= ucal[page1]; - size_t length2= ucal[page2]; - uint16 *weight1= ucaw[page1] + (wc1 & MY_UCA_CMASK) * ucal[page1]; - uint16 *weight2= ucaw[page2] + (wc2 & MY_UCA_CMASK) * ucal[page2]; - - if (!weight1 || !weight2) - return wc1 != wc2; - - if (length1 > length2) - return memcmp((const void*)weight1, (const void*)weight2, length2*2) ? - 1: weight1[length2]; - - if (length1 < length2) - return memcmp((const void*)weight1, (const void*)weight2, length1*2) ? - 1 : weight2[length1]; - - return memcmp((const void*)weight1, (const void*)weight2, length1*2); -} - -/* -** Compare string against string with wildcard -** 0 if matched -** -1 if not matched with wildcard -** 1 if matched with wildcard -*/ - -static -int my_wildcmp_uca(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - int result= -1; /* Not found, using wildcards */ - my_wc_t s_wc, w_wc; - int scan; - int (*mb_wc)(struct charset_info_st *, my_wc_t *, - const uchar *, const uchar *); - mb_wc= cs->cset->mb_wc; - - while (wildstr != wildend) - { - while (1) - { - my_bool escaped= 0; - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <= 0) - return 1; - - if (w_wc == (my_wc_t)w_many) - { - result= 1; /* Found an anchor char */ - break; - } - - wildstr+= scan; - if (w_wc == (my_wc_t)escape) - { - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <= 0) - return 1; - wildstr+= scan; - escaped= 1; - } - - if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, - (const uchar*)str_end)) <= 0) - return 1; - str+= scan; - - if (!escaped && w_wc == (my_wc_t)w_one) - { - result= 1; /* Found an anchor char */ - } - else - { - if (my_uca_charcmp(cs,s_wc,w_wc)) - return 1; - } - if (wildstr == wildend) - return (str != str_end); /* Match if both are at end */ - } - - - if (w_wc == (my_wc_t)w_many) - { /* Found w_many */ - - /* Remove any '%' and '_' from the wild search string */ - for ( ; wildstr != wildend ; ) - { - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <= 0) - return 1; - - if (w_wc == (my_wc_t)w_many) - { - wildstr+= scan; - continue; - } - - if (w_wc == (my_wc_t)w_one) - { - wildstr+= scan; - if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, - (const uchar*)str_end)) <= 0) - return 1; - str+= scan; - continue; - } - break; /* Not a wild character */ - } - - if (wildstr == wildend) - return 0; /* Ok if w_many is last */ - - if (str == str_end) - return -1; - - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <= 0) - return 1; - - if (w_wc == (my_wc_t)escape) - { - wildstr+= scan; - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <= 0) - return 1; - } - - while (1) - { - /* Skip until the first character from wildstr is found */ - while (str != str_end) - { - if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, - (const uchar*)str_end)) <= 0) - return 1; - - if (!my_uca_charcmp(cs,s_wc,w_wc)) - break; - str+= scan; - } - if (str == str_end) - return -1; - - result= my_wildcmp_uca(cs, str, str_end, wildstr, wildend, - escape, w_one, w_many); - - if (result <= 0) - return result; - - str+= scan; - } - } - } - return (str != str_end ? 1 : 0); -} - - -/* - Collation language is implemented according to - subset of ICU Collation Customization (tailorings): - http://icu.sourceforge.net/userguide/Collate_Customization.html - - Collation language elements: - Delimiters: - space - skipped - - := A-Z | a-z | \uXXXX - - Shift command: - := & - reset at this letter. - - Diff command: - := < - Identifies a primary difference. - := << - Identifies a secondary difference. - := <<< - Idenfifies a tertiary difference. - - - Collation rules: - := { } - - := - | - | - | - - := [ ] - - An example, Polish collation: - - &A < \u0105 <<< \u0104 - &C < \u0107 <<< \u0106 - &E < \u0119 <<< \u0118 - &L < \u0142 <<< \u0141 - &N < \u0144 <<< \u0143 - &O < \u00F3 <<< \u00D3 - &S < \u015B <<< \u015A - &Z < \u017A <<< \u017B -*/ - - -typedef enum my_coll_lexem_num_en -{ - MY_COLL_LEXEM_EOF = 0, - MY_COLL_LEXEM_DIFF = 1, - MY_COLL_LEXEM_SHIFT = 4, - MY_COLL_LEXEM_CHAR = 5, - MY_COLL_LEXEM_ERROR = 6 -} my_coll_lexem_num; - - -typedef struct my_coll_lexem_st -{ - const char *beg; - const char *end; - const char *prev; - int diff; - int code; -} MY_COLL_LEXEM; - - -/* - Initialize collation rule lexical anilizer - - SYNOPSIS - my_coll_lexem_init - lexem Lex analizer to init - str Const string to parse - str_end End of the string - USAGE - - RETURN VALUES - N/A -*/ - -static void my_coll_lexem_init(MY_COLL_LEXEM *lexem, - const char *str, const char *str_end) -{ - lexem->beg= str; - lexem->prev= str; - lexem->end= str_end; - lexem->diff= 0; - lexem->code= 0; -} - - -/* - Print collation customization expression parse error, with context. - - SYNOPSIS - my_coll_lexem_print_error - lexem Lex analizer to take context from - errstr sting to write error to - errsize errstr size - txt error message - USAGE - - RETURN VALUES - N/A -*/ - -static void my_coll_lexem_print_error(MY_COLL_LEXEM *lexem, - char *errstr, size_t errsize, - const char *txt) -{ - char tail[30]; - size_t len= lexem->end - lexem->prev; - strmake (tail, lexem->prev, (size_t) min(len, sizeof(tail)-1)); - errstr[errsize-1]= '\0'; - my_snprintf(errstr,errsize-1,"%s at '%s'", txt, tail); -} - - -/* - Convert a hex digit into its numeric value - - SYNOPSIS - ch2x - ch hex digit to convert - USAGE - - RETURN VALUES - an integer value in the range 0..15 - -1 on error -*/ - -static int ch2x(int ch) -{ - if (ch >= '0' && ch <= '9') - return ch - '0'; - - if (ch >= 'a' && ch <= 'f') - return 10 + ch - 'a'; - - if (ch >= 'A' && ch <= 'F') - return 10 + ch - 'A'; - - return -1; -} - - -/* - Collation language lexical parser: - Scans the next lexem. - - SYNOPSIS - my_coll_lexem_next - lexem Lex analizer, previously initialized by - my_coll_lexem_init. - USAGE - Call this function in a loop - - RETURN VALUES - Lexem number: eof, diff, shift, char or error. -*/ - -static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem) -{ - const char *beg; - my_coll_lexem_num rc; - - for (beg= lexem->beg ; beg < lexem->end ; beg++) - { - if (*beg == ' ' || *beg == '\t' || *beg == '\r' || *beg == '\n') - continue; - - if (*beg == '&') - { - beg++; - rc= MY_COLL_LEXEM_SHIFT; - goto ex; - } - - if (beg[0] == '=') - { - beg++; - rc= MY_COLL_LEXEM_DIFF; - goto ex; - } - - if (beg[0] == '<') - { - for (beg++, lexem->diff= 1; - (beg < lexem->end) && - (*beg == '<') && (lexem->diff<3); - beg++, lexem->diff++); - rc= MY_COLL_LEXEM_DIFF; - goto ex; - } - - if ((*beg >= 'a' && *beg <= 'z') || (*beg >= 'A' && *beg <= 'Z')) - { - lexem->code= *beg++; - rc= MY_COLL_LEXEM_CHAR; - goto ex; - } - - if ((*beg == '\\') && (beg+2 < lexem->end) && (beg[1] == 'u')) - { - int ch; - - beg+= 2; - lexem->code= 0; - while ((beg < lexem->end) && ((ch= ch2x(beg[0])) >= 0)) - { - lexem->code= (lexem->code << 4) + ch; - beg++; - } - rc= MY_COLL_LEXEM_CHAR; - goto ex; - } - - rc= MY_COLL_LEXEM_ERROR; - goto ex; - } - rc= MY_COLL_LEXEM_EOF; - -ex: - lexem->prev= lexem->beg; - lexem->beg= beg; - return rc; -} - - -/* - Collation rule item -*/ - -typedef struct my_coll_rule_item_st -{ - uint base; /* Base character */ - uint curr[2]; /* Current character */ - int diff[3]; /* Primary, Secondary and Tertiary difference */ -} MY_COLL_RULE; - - -/* - Collation language syntax parser. - Uses lexical parser. - - SYNOPSIS - my_coll_rule_parse - rule Collation rule list to load to. - str A string containin collation language expression. - str_end End of the string. - USAGE - - RETURN VALUES - A positive number means the number of rules loaded. - -1 means ERROR, e.g. too many items, syntax error, etc. -*/ - -static int my_coll_rule_parse(MY_COLL_RULE *rule, size_t mitems, - const char *str, const char *str_end, - char *errstr, size_t errsize) -{ - MY_COLL_LEXEM lexem; - my_coll_lexem_num lexnum; - my_coll_lexem_num prevlexnum= MY_COLL_LEXEM_ERROR; - MY_COLL_RULE item; - int state= 0; - size_t nitems= 0; - - /* Init all variables */ - errstr[0]= '\0'; - bzero(&item, sizeof(item)); - my_coll_lexem_init(&lexem, str, str_end); - - while ((lexnum= my_coll_lexem_next(&lexem))) - { - if (lexnum == MY_COLL_LEXEM_ERROR) - { - my_coll_lexem_print_error(&lexem,errstr,errsize-1,"Unknown character"); - return -1; - } - - switch (state) { - case 0: - if (lexnum != MY_COLL_LEXEM_SHIFT) - { - my_coll_lexem_print_error(&lexem,errstr,errsize-1,"& expected"); - return -1; - } - prevlexnum= lexnum; - state= 2; - continue; - - case 1: - if (lexnum != MY_COLL_LEXEM_SHIFT && lexnum != MY_COLL_LEXEM_DIFF) - { - my_coll_lexem_print_error(&lexem,errstr,errsize-1,"& or < expected"); - return -1; - } - prevlexnum= lexnum; - state= 2; - continue; - - case 2: - if (lexnum != MY_COLL_LEXEM_CHAR) - { - my_coll_lexem_print_error(&lexem,errstr,errsize-1,"character expected"); - return -1; - } - - if (prevlexnum == MY_COLL_LEXEM_SHIFT) - { - item.base= lexem.code; - item.diff[0]= 0; - item.diff[1]= 0; - item.diff[2]= 0; - } - else if (prevlexnum == MY_COLL_LEXEM_DIFF) - { - MY_COLL_LEXEM savlex; - savlex= lexem; - item.curr[0]= lexem.code; - if ((lexnum= my_coll_lexem_next(&lexem)) == MY_COLL_LEXEM_CHAR) - { - item.curr[1]= lexem.code; - } - else - { - item.curr[1]= 0; - lexem=savlex; /* Restore previous parser state */ - } - if (lexem.diff == 3) - { - item.diff[2]++; - } - else if (lexem.diff == 2) - { - item.diff[1]++; - item.diff[2]= 0; - } - else if (lexem.diff == 1) - { - item.diff[0]++; - item.diff[1]= 0; - item.diff[2]= 0; - } - else if (lexem.diff == 0) - { - item.diff[0]= item.diff[1]= item.diff[2]= 0; - } - if (nitems >= mitems) - { - my_coll_lexem_print_error(&lexem,errstr,errsize-1,"Too many rules"); - return -1; - } - rule[nitems++]= item; - } - else - { - my_coll_lexem_print_error(&lexem,errstr,errsize-1,"Should never happen"); - return -1; - } - state= 1; - continue; - } - } - return (int) nitems; -} - -#define MY_MAX_COLL_RULE 128 - -/* - This function copies an UCS2 collation from - the default Unicode Collation Algorithm (UCA) - weights applying tailorings, i.e. a set of - alternative weights for some characters. - - The default UCA weights are stored in uca_weight/uca_length. - They consist of 256 pages, 256 character each. - - If a page is not overwritten by tailoring rules, - it is copies as is from UCA as is. - - If a page contains some overwritten characters, it is - allocated. Untouched characters are copied from the - default weights. -*/ - -static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t)) -{ - MY_COLL_RULE rule[MY_MAX_COLL_RULE]; - char errstr[128]; - uchar *newlengths; - uint16 **newweights; - const uchar *deflengths= uca_length; - uint16 **defweights= uca_weight; - int rc, i; - int ncontractions= 0; - - if (!cs->tailoring) - return 1; - - /* Parse ICU Collation Customization expression */ - if ((rc= my_coll_rule_parse(rule, MY_MAX_COLL_RULE, - cs->tailoring, - cs->tailoring + strlen(cs->tailoring), - errstr, sizeof(errstr))) < 0) - { - /* - TODO: add error message reporting. - printf("Error: %d '%s'\n", rc, errstr); - */ - return 1; - } - - if (!(newweights= (uint16**) (*alloc)(256*sizeof(uint16*)))) - return 1; - bzero(newweights, 256*sizeof(uint16*)); - - if (!(newlengths= (uchar*) (*alloc)(256))) - return 1; - - memcpy(newlengths, deflengths, 256); - - /* - Calculate maximum lenghts for the pages - which will be overwritten. - */ - for (i=0; i < rc; i++) - { - if (!rule[i].curr[1]) /* If not a contraction */ - { - uint pageb= (rule[i].base >> 8) & 0xFF; - uint pagec= (rule[i].curr[0] >> 8) & 0xFF; - - if (newlengths[pagec] < deflengths[pageb]) - newlengths[pagec]= deflengths[pageb]; - } - else - ncontractions++; - } - - for (i=0; i < rc; i++) - { - uint pageb= (rule[i].base >> 8) & 0xFF; - uint pagec= (rule[i].curr[0] >> 8) & 0xFF; - uint chb, chc; - - if (rule[i].curr[1]) /* Skip contraction */ - continue; - - if (!newweights[pagec]) - { - /* Alloc new page and copy the default UCA weights */ - uint size= 256*newlengths[pagec]*sizeof(uint16); - - if (!(newweights[pagec]= (uint16*) (*alloc)(size))) - return 1; - bzero((void*) newweights[pagec], size); - - for (chc=0 ; chc < 256; chc++) - { - memcpy(newweights[pagec] + chc*newlengths[pagec], - defweights[pagec] + chc*deflengths[pagec], - deflengths[pagec]*sizeof(uint16)); - } - } - - /* - Aply the alternative rule: - shift to the base character and primary difference. - */ - chc= rule[i].curr[0] & 0xFF; - chb= rule[i].base & 0xFF; - memcpy(newweights[pagec] + chc*newlengths[pagec], - defweights[pageb] + chb*deflengths[pageb], - deflengths[pageb]*sizeof(uint16)); - /* Apply primary difference */ - newweights[pagec][chc*newlengths[pagec]]+= rule[i].diff[0]; - } - - /* Copy non-overwritten pages from the default UCA weights */ - for (i= 0; i < 256 ; i++) - { - if (!newweights[i]) - newweights[i]= defweights[i]; - } - - cs->sort_order= newlengths; - cs->sort_order_big= newweights; - cs->contractions= NULL; - - /* Now process contractions */ - if (ncontractions) - { - /* - 8K for weights for basic latin letter pairs, - plus 256 bytes for "is contraction part" flags. - */ - uint size= 0x40*0x40*sizeof(uint16) + 256; - char *contraction_flags; - if (!(cs->contractions= (uint16*) (*alloc)(size))) - return 1; - bzero((void*)cs->contractions, size); - contraction_flags= ((char*) cs->contractions) + 0x40*0x40; - for (i=0; i < rc; i++) - { - if (rule[i].curr[1]) - { - uint pageb= (rule[i].base >> 8) & 0xFF; - uint chb= rule[i].base & 0xFF; - uint16 *offsb= defweights[pageb] + chb*deflengths[pageb]; - uint offsc; - - if (offsb[1] || - rule[i].curr[0] < 0x40 || rule[i].curr[0] > 0x7f || - rule[i].curr[1] < 0x40 || rule[i].curr[1] > 0x7f) - { - /* - TODO: add error reporting; - We support only basic latin letters contractions at this point. - Also, We don't support contractions with weight longer than one. - Otherwise, we'd need much more memory. - */ - return 1; - } - offsc= (rule[i].curr[0]-0x40)*0x40+(rule[i].curr[1]-0x40); - - /* Copy base weight applying primary difference */ - cs->contractions[offsc]= offsb[0] + rule[i].diff[0]; - /* Mark both letters as "is contraction part */ - contraction_flags[rule[i].curr[0]]= 1; - contraction_flags[rule[i].curr[1]]= 1; - } - } - } - return 0; -} - - -/* - Universal CHARSET_INFO compatible wrappers - for the above internal functions. - Should work for any character set. -*/ - -static my_bool my_coll_init_uca(CHARSET_INFO *cs, void *(*alloc)(size_t)) -{ - cs->pad_char= ' '; - return create_tailoring(cs, alloc); -} - -static int my_strnncoll_any_uca(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - return my_strnncoll_uca(cs, &my_any_uca_scanner_handler, - s, slen, t, tlen, t_is_prefix); -} - -static int my_strnncollsp_any_uca(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference) -{ - return my_strnncollsp_uca(cs, &my_any_uca_scanner_handler, - s, slen, t, tlen, - diff_if_only_endspace_difference); -} - -static void my_hash_sort_any_uca(CHARSET_INFO *cs, - const uchar *s, size_t slen, - ulong *n1, ulong *n2) -{ - my_hash_sort_uca(cs, &my_any_uca_scanner_handler, s, slen, n1, n2); -} - -static size_t my_strnxfrm_any_uca(CHARSET_INFO *cs, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - return my_strnxfrm_uca(cs, &my_any_uca_scanner_handler, - dst, dstlen, nweights, src, srclen, flags); -} - - -#ifdef HAVE_CHARSET_ucs2 -/* - UCS2 optimized CHARSET_INFO compatible wrappers. -*/ -static int my_strnncoll_ucs2_uca(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - return my_strnncoll_uca(cs, &my_ucs2_uca_scanner_handler, - s, slen, t, tlen, t_is_prefix); -} - -static int my_strnncollsp_ucs2_uca(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference) -{ - return my_strnncollsp_uca(cs, &my_ucs2_uca_scanner_handler, - s, slen, t, tlen, - diff_if_only_endspace_difference); -} - -static void my_hash_sort_ucs2_uca(CHARSET_INFO *cs, - const uchar *s, size_t slen, - ulong *n1, ulong *n2) -{ - my_hash_sort_uca(cs, &my_ucs2_uca_scanner_handler, s, slen, n1, n2); -} - -static size_t my_strnxfrm_ucs2_uca(CHARSET_INFO *cs, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - return my_strnxfrm_uca(cs, &my_ucs2_uca_scanner_handler, - dst, dstlen, nweights, src, srclen, flags); -} - -MY_COLLATION_HANDLER my_collation_ucs2_uca_handler = -{ - my_coll_init_uca, /* init */ - my_strnncoll_ucs2_uca, - my_strnncollsp_ucs2_uca, - my_strnxfrm_ucs2_uca, - my_strnxfrmlen_simple, - my_like_range_ucs2, - my_wildcmp_uca, - NULL, - my_instr_mb, - my_hash_sort_ucs2_uca, - my_propagate_complex -}; - -CHARSET_INFO my_charset_ucs2_unicode_ci= -{ - 128,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_unicode_ci", /* name */ - "", /* comment */ - "", /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - uca_length, /* sort_order */ - NULL, /* contractions */ - uca_weight, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_icelandic_uca_ci= -{ - 129,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_icelandic_ci", /* name */ - "", /* comment */ - icelandic, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_latvian_uca_ci= -{ - 130,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_latvian_ci", /* name */ - "", /* comment */ - latvian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_romanian_uca_ci= -{ - 131,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_romanian_ci", /* name */ - "", /* comment */ - romanian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_slovenian_uca_ci= -{ - 132,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_slovenian_ci", /* name */ - "", /* comment */ - slovenian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_polish_uca_ci= -{ - 133,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_polish_ci", /* name */ - "", /* comment */ - polish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_estonian_uca_ci= -{ - 134,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_estonian_ci", /* name */ - "", /* comment */ - estonian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_spanish_uca_ci= -{ - 135,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_spanish_ci", /* name */ - "", /* comment */ - spanish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_swedish_uca_ci= -{ - 136,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_swedish_ci", /* name */ - "", /* comment */ - swedish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_turkish_uca_ci= -{ - 137,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_turkish_ci", /* name */ - "", /* comment */ - turkish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_turkish, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_czech_uca_ci= -{ - 138,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* csname */ - "ucs2_czech_ci", /* name */ - "", /* comment */ - czech, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - - -CHARSET_INFO my_charset_ucs2_danish_uca_ci= -{ - 139,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* csname */ - "ucs2_danish_ci", /* name */ - "", /* comment */ - danish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci= -{ - 140,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* csname */ - "ucs2_lithuanian_ci",/* name */ - "", /* comment */ - lithuanian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_slovak_uca_ci= -{ - 141,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* csname */ - "ucs2_slovak_ci", /* name */ - "", /* comment */ - slovak, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - -CHARSET_INFO my_charset_ucs2_spanish2_uca_ci= -{ - 142,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* csname */ - "ucs2_spanish2_ci", /* name */ - "", /* comment */ - spanish2, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - - -CHARSET_INFO my_charset_ucs2_roman_uca_ci= -{ - 143,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* csname */ - "ucs2_roman_ci", /* name */ - "", /* comment */ - roman, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - - -CHARSET_INFO my_charset_ucs2_persian_uca_ci= -{ - 144,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* csname */ - "ucs2_persian_ci", /* name */ - "", /* comment */ - persian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - - -CHARSET_INFO my_charset_ucs2_esperanto_uca_ci= -{ - 145,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* csname */ - "ucs2_esperanto_ci", /* name */ - "", /* comment */ - esperanto, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - - -CHARSET_INFO my_charset_ucs2_hungarian_uca_ci= -{ - 146,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* csname */ - "ucs2_hungarian_ci", /* name */ - "", /* comment */ - hungarian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - - -CHARSET_INFO my_charset_ucs2_sinhala_uca_ci= -{ - 147,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - "ucs2", /* csname */ - "ucs2_sinhala_ci", /* name */ - "", /* comment */ - sinhala, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_uca_handler -}; - - -#endif - - -#if defined(HAVE_CHARSET_utf8mb3) || defined(HAVE_CHARSET_utf8mb4) -/* - We consider bytes with code more than 127 as a letter. - This garantees that word boundaries work fine with regular - expressions. Note, there is no need to mark byte 255 as a - letter, it is illegal byte in UTF8. -*/ -static uchar ctype_utf8[]= -{ - 0, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16, - 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, - 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0 -}; - - -MY_COLLATION_HANDLER my_collation_any_uca_handler = -{ - my_coll_init_uca, /* init */ - my_strnncoll_any_uca, - my_strnncollsp_any_uca, - my_strnxfrm_any_uca, - my_strnxfrmlen_simple, - my_like_range_mb, - my_wildcmp_uca, - NULL, - my_instr_mb, - my_hash_sort_any_uca, - my_propagate_complex -}; - -#endif /* HAVE_CHARSET_utf8mb3 || HAVE_CHARSET_utf8mb4 */ - - -#ifdef HAVE_CHARSET_utf8mb3 - -extern MY_CHARSET_HANDLER my_charset_utf8mb3_handler; - -CHARSET_INFO my_charset_utf8mb3_unicode_ci= -{ - 192,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_unicode_ci",/* name */ - "", /* comment */ - "", /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - uca_length, /* sort_order */ - NULL, /* contractions */ - uca_weight, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - - -CHARSET_INFO my_charset_utf8mb3_icelandic_uca_ci= -{ - 193,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_icelandic_ci",/* name */ - "", /* comment */ - icelandic, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_latvian_uca_ci= -{ - 194,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_latvian_ci", /* name */ - "", /* comment */ - latvian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_romanian_uca_ci= -{ - 195,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_romanian_ci",/* name */ - "", /* comment */ - romanian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_slovenian_uca_ci= -{ - 196,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_slovenian_ci",/* name */ - "", /* comment */ - slovenian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_dort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_polish_uca_ci= -{ - 197,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_polish_ci", /* name */ - "", /* comment */ - polish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_estonian_uca_ci= -{ - 198,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_estonian_ci", /* name */ - "", /* comment */ - estonian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_spanish_uca_ci= -{ - 199,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_spanish_ci", /* name */ - "", /* comment */ - spanish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_swedish_uca_ci= -{ - 200,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_swedish_ci", /* name */ - "", /* comment */ - swedish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_turkish_uca_ci= -{ - 201,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_turkish_ci", /* name */ - "", /* comment */ - turkish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_turkish, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 2, /* caseup_multiply */ - 2, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_czech_uca_ci= -{ - 202,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_czech_ci", /* name */ - "", /* comment */ - czech, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - - -CHARSET_INFO my_charset_utf8mb3_danish_uca_ci= -{ - 203,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_danish_ci", /* name */ - "", /* comment */ - danish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_lithuanian_uca_ci= -{ - 204,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_lithuanian_ci",/* name */ - "", /* comment */ - lithuanian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_slovak_uca_ci= -{ - 205,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_slovak_ci", /* name */ - "", /* comment */ - slovak, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_spanish2_uca_ci= -{ - 206,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_spanish2_ci", /* name */ - "", /* comment */ - spanish2, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_roman_uca_ci= -{ - 207,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_roman_ci", /* name */ - "", /* comment */ - roman, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_persian_uca_ci= -{ - 208,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_persian_ci", /* name */ - "", /* comment */ - persian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_esperanto_uca_ci= -{ - 209,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_esperanto_ci",/* name */ - "", /* comment */ - esperanto, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_hungarian_uca_ci= -{ - 210,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* csname */ - MY_UTF8MB3 "_hungarian_ci",/* name */ - "", /* comment */ - hungarian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb3_sinhala_uca_ci= -{ - 211,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB3, /* cs name */ - MY_UTF8MB3 "_sinhala_ci",/* name */ - "", /* comment */ - sinhala, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 3, /* mbminlen */ - 3, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_any_uca_handler -}; - -#endif /* HAVE_CHARSET_utf8mb3 */ - - -#ifdef HAVE_CHARSET_utf8mb4 - -extern MY_CHARSET_HANDLER my_charset_utf8mb4_handler; - -CHARSET_INFO my_charset_utf8mb4_unicode_ci= -{ - 224,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_unicode_ci",/* name */ - "", /* comment */ - "", /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - uca_length, /* sort_order */ - NULL, /* contractions */ - uca_weight, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - - -CHARSET_INFO my_charset_utf8mb4_icelandic_uca_ci= -{ - 225,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_icelandic_ci",/* name */ - "", /* comment */ - icelandic, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_latvian_uca_ci= -{ - 226,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_latvian_ci", /* name */ - "", /* comment */ - latvian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_romanian_uca_ci= -{ - 227,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_romanian_ci", /* name */ - "", /* comment */ - romanian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_slovenian_uca_ci= -{ - 228,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_slovenian_ci",/* name */ - "", /* comment */ - slovenian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_polish_uca_ci= -{ - 229,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_polish_ci", /* name */ - "", /* comment */ - polish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_estonian_uca_ci= -{ - 230,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_estonian_ci", /* name */ - "", /* comment */ - estonian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_spanish_uca_ci= -{ - 231,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_spanish_ci", /* name */ - "", /* comment */ - spanish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_swedish_uca_ci= -{ - 232,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_swedish_ci", /* name */ - "", /* comment */ - swedish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_turkish_uca_ci= -{ - 233,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_turkish_ci", /* name */ - "", /* comment */ - turkish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_turkish, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 2, /* caseup_multiply */ - 2, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_czech_uca_ci= -{ - 234,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_czech_ci", /* name */ - "", /* comment */ - czech, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - - -CHARSET_INFO my_charset_utf8mb4_danish_uca_ci= -{ - 235,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_danish_ci", /* name */ - "", /* comment */ - danish, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_lithuanian_uca_ci= -{ - 236,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_lithuanian_ci",/* name */ - "", /* comment */ - lithuanian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_slovak_uca_ci= -{ - 237,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_slovak_ci", /* name */ - "", /* comment */ - slovak, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_spanish2_uca_ci= -{ - 238,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_spanish2_ci", /* name */ - "", /* comment */ - spanish2, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_roman_uca_ci= -{ - 239,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_roman_ci", /* name */ - "", /* comment */ - roman, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_persian_uca_ci= -{ - 240,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_persian_ci", /* name */ - "", /* comment */ - persian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_esperanto_uca_ci= -{ - 241,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_esperanto_ci",/* name */ - "", /* comment */ - esperanto, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_hungarian_uca_ci= -{ - 242,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_hungarian_ci",/* name */ - "", /* comment */ - hungarian, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -CHARSET_INFO my_charset_utf8mb4_sinhala_uca_ci= -{ - 243,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, - MY_UTF8MB4, /* csname */ - MY_UTF8MB4 "_sinhala_ci",/* name */ - "", /* comment */ - sinhala, /* tailoring */ - ctype_utf8, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_any_uca_handler -}; - -#endif /* HAVE_CHARSET_utf8mb4 */ - - -#ifdef HAVE_CHARSET_utf32 - -MY_COLLATION_HANDLER my_collation_utf32_uca_handler = -{ - my_coll_init_uca, /* init */ - my_strnncoll_any_uca, - my_strnncollsp_any_uca, - my_strnxfrm_any_uca, - my_strnxfrmlen_simple, - my_like_range_utf32, - my_wildcmp_uca, - NULL, - my_instr_mb, - my_hash_sort_any_uca, - my_propagate_complex -}; - -extern MY_CHARSET_HANDLER my_charset_utf32_handler; - -CHARSET_INFO my_charset_utf32_unicode_ci= -{ - 160,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_unicode_ci", /* name */ - "", /* comment */ - "", /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - uca_length, /* sort_order */ - NULL, /* contractions */ - uca_weight, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - - -CHARSET_INFO my_charset_utf32_icelandic_uca_ci= -{ - 161,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_icelandic_ci",/* name */ - "", /* comment */ - icelandic, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_latvian_uca_ci= -{ - 162,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_latvian_ci", /* name */ - "", /* comment */ - latvian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_romanian_uca_ci= -{ - 163,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_romanian_ci", /* name */ - "", /* comment */ - romanian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_slovenian_uca_ci= -{ - 164,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_slovenian_ci",/* name */ - "", /* comment */ - slovenian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_polish_uca_ci= -{ - 165,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_polish_ci", /* name */ - "", /* comment */ - polish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_estonian_uca_ci= -{ - 166,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_estonian_ci", /* name */ - "", /* comment */ - estonian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_spanish_uca_ci= -{ - 167,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_spanish_ci", /* name */ - "", /* comment */ - spanish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_swedish_uca_ci= -{ - 168,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_swedish_ci", /* name */ - "", /* comment */ - swedish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_turkish_uca_ci= -{ - 169,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_turkish_ci", /* name */ - "", /* comment */ - turkish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_turkish, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_czech_uca_ci= -{ - 170,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_czech_ci", /* name */ - "", /* comment */ - czech, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - - -CHARSET_INFO my_charset_utf32_danish_uca_ci= -{ - 171,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_danish_ci", /* name */ - "", /* comment */ - danish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_lithuanian_uca_ci= -{ - 172,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_lithuanian_ci",/* name */ - "", /* comment */ - lithuanian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_slovak_uca_ci= -{ - 173,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_slovak_ci", /* name */ - "", /* comment */ - slovak, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_spanish2_uca_ci= -{ - 174,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_spanish2_ci", /* name */ - "", /* comment */ - spanish2, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_roman_uca_ci= -{ - 175,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_roman_ci", /* name */ - "", /* comment */ - roman, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_persian_uca_ci= -{ - 176,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_persian_ci", /* name */ - "", /* comment */ - persian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_esperanto_uca_ci= -{ - 177,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_esperanto_ci",/* name */ - "", /* comment */ - esperanto, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_hungarian_uca_ci= -{ - 178,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_hungarian_ci",/* name */ - "", /* comment */ - hungarian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -CHARSET_INFO my_charset_utf32_sinhala_uca_ci= -{ - 179,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* csname */ - "utf32_sinhala_ci", /* name */ - "", /* comment */ - sinhala, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_uca_handler -}; - -#endif /* HAVE_CHARSET_utf32 */ - - -#ifdef HAVE_CHARSET_utf16 - - -MY_COLLATION_HANDLER my_collation_utf16_uca_handler = -{ - my_coll_init_uca, /* init */ - my_strnncoll_any_uca, - my_strnncollsp_any_uca, - my_strnxfrm_any_uca, - my_strnxfrmlen_simple, - my_like_range_utf16, - my_wildcmp_uca, - NULL, - my_instr_mb, - my_hash_sort_any_uca, - my_propagate_complex -}; - -extern MY_CHARSET_HANDLER my_charset_utf16_handler; - -CHARSET_INFO my_charset_utf16_unicode_ci= -{ - 101,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* csname */ - "utf16_unicode_ci", /* name */ - "", /* comment */ - "", /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - uca_length, /* sort_order */ - NULL, /* contractions */ - uca_weight, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - - -CHARSET_INFO my_charset_utf16_icelandic_uca_ci= -{ - 102,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* csname */ - "utf16_icelandic_ci",/* name */ - "", /* comment */ - icelandic, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_latvian_uca_ci= -{ - 103,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_latvian_ci", /* name */ - "", /* comment */ - latvian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_romanian_uca_ci= -{ - 104,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_romanian_ci", /* name */ - "", /* comment */ - romanian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_slovenian_uca_ci= -{ - 105,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_slovenian_ci",/* name */ - "", /* comment */ - slovenian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_polish_uca_ci= -{ - 106,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_polish_ci", /* name */ - "", /* comment */ - polish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_estonian_uca_ci= -{ - 107,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_estonian_ci", /* name */ - "", /* comment */ - estonian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_spanish_uca_ci= -{ - 108,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_spanish_ci", /* name */ - "", /* comment */ - spanish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_swedish_uca_ci= -{ - 109,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_swedish_ci", /* name */ - "", /* comment */ - swedish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_turkish_uca_ci= -{ - 110,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_turkish_ci", /* name */ - "", /* comment */ - turkish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_turkish, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_czech_uca_ci= -{ - 111,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_czech_ci", /* name */ - "", /* comment */ - czech, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - - -CHARSET_INFO my_charset_utf16_danish_uca_ci= -{ - 112,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_danish_ci", /* name */ - "", /* comment */ - danish, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_lithuanian_uca_ci= -{ - 113,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_lithuanian_ci",/* name */ - "", /* comment */ - lithuanian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_slovak_uca_ci= -{ - 114,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_slovak_ci", /* name */ - "", /* comment */ - slovak, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_spanish2_uca_ci= -{ - 115,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_spanish2_ci",/* name */ - "", /* comment */ - spanish2, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_roman_uca_ci= -{ - 116,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_roman_ci", /* name */ - "", /* comment */ - roman, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_persian_uca_ci= -{ - 117,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_persian_ci", /* name */ - "", /* comment */ - persian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_esperanto_uca_ci= -{ - 118,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_esperanto_ci",/* name */ - "", /* comment */ - esperanto, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_hungarian_uca_ci= -{ - 119,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_hungarian_ci",/* name */ - "", /* comment */ - hungarian, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default,/* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -CHARSET_INFO my_charset_utf16_sinhala_uca_ci= -{ - 120,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_sinhala_ci",/* name */ - "", /* comment */ - sinhala, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default,/* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 9, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_uca_handler -}; - -#endif /* HAVE_CHARSET_utf16 */ - - -#endif /* HAVE_UCA_COLLATIONS */ diff --git a/externals/mysql/strings/ctype-ucs2.c b/externals/mysql/strings/ctype-ucs2.c deleted file mode 100644 index 3f1495c496..0000000000 --- a/externals/mysql/strings/ctype-ucs2.c +++ /dev/null @@ -1,3592 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* UCS2 support. Written by Alexander Barkov */ - -#include -#include -#include "m_string.h" -#include "m_ctype.h" -#include -#include - - -#ifndef EILSEQ -#define EILSEQ ENOENT -#endif - -#undef ULONGLONG_MAX -#define ULONGLONG_MAX ~0ULL -#define MAX_NEGATIVE_NUMBER 0x8000000000000000ULL -#define INIT_CNT 9 -#define LFACTOR 1000000000ULL -#define LFACTOR1 10000000000ULL -#define LFACTOR2 100000000000ULL - -static unsigned long lfactor[9]= -{ - 1L, 10L, 100L, 1000L, 10000L, 100000L, 1000000L, 10000000L, 100000000L -}; - - -#define REPLACEMENT_CHAR 0xFFFD; - - -#if defined(HAVE_CHARSET_utf16) || defined(HAVE_CHARSET_ucs2) -#define HAVE_CHARSET_mb2 -#endif - - -#if defined(HAVE_CHARSET_mb2) || defined(HAVE_CHARSET_utf32) -#define HAVE_CHARSET_mb2_or_mb4 -#endif - - -#ifdef HAVE_CHARSET_mb2_or_mb4 -static inline int -my_bincmp(const uchar *s, const uchar *se, - const uchar *t, const uchar *te) -{ - int slen= (int) (se - s), tlen= (int) (te - t); - int len= min(slen, tlen); - int cmp= memcmp(s, t, len); - return cmp ? cmp : slen - tlen; -} - - -static size_t -my_caseup_str_mb2_or_mb4(CHARSET_INFO * cs __attribute__((unused)), - char * s __attribute__((unused))) -{ - DBUG_ASSERT(0); - return 0; -} - - -static size_t -my_casedn_str_mb2_or_mb4(CHARSET_INFO *cs __attribute__((unused)), - char * s __attribute__((unused))) -{ - DBUG_ASSERT(0); - return 0; -} - - -static int -my_strcasecmp_mb2_or_mb4(CHARSET_INFO *cs __attribute__((unused)), - const char *s __attribute__((unused)), - const char *t __attribute__((unused))) -{ - DBUG_ASSERT(0); - return 0; -} - - -static long -my_strntol_mb2_or_mb4(CHARSET_INFO *cs, - const char *nptr, size_t l, int base, - char **endptr, int *err) -{ - int negative= 0; - int overflow; - int cnv; - my_wc_t wc; - register unsigned int cutlim; - register uint32 cutoff; - register uint32 res; - register const uchar *s= (const uchar*) nptr; - register const uchar *e= (const uchar*) nptr+l; - const uchar *save; - - *err= 0; - do - { - if ((cnv= cs->cset->mb_wc(cs, &wc, s, e))>0) - { - switch (wc) - { - case ' ' : break; - case '\t': break; - case '-' : negative= !negative; break; - case '+' : break; - default : goto bs; - } - } - else /* No more characters or bad multibyte sequence */ - { - if (endptr != NULL ) - *endptr= (char*) s; - err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; - return 0; - } - s+= cnv; - } while (1); - -bs: - -#ifdef NOT_USED - if (base <= 0 || base == 1 || base > 36) - base = 10; -#endif - - overflow= 0; - res= 0; - save= s; - cutoff= ((uint32)~0L) / (uint32) base; - cutlim= (uint) (((uint32)~0L) % (uint32) base); - - do { - if ((cnv= cs->cset->mb_wc(cs, &wc, s, e)) > 0) - { - s+= cnv; - if (wc >= '0' && wc <= '9') - wc-= '0'; - else if (wc >= 'A' && wc <= 'Z') - wc= wc - 'A' + 10; - else if (wc >= 'a' && wc <= 'z') - wc= wc - 'a' + 10; - else - break; - if ((int)wc >= base) - break; - if (res > cutoff || (res == cutoff && wc > cutlim)) - overflow= 1; - else - { - res*= (uint32) base; - res+= wc; - } - } - else if (cnv == MY_CS_ILSEQ) - { - if (endptr !=NULL ) - *endptr = (char*) s; - err[0]= EILSEQ; - return 0; - } - else - { - /* No more characters */ - break; - } - } while(1); - - if (endptr != NULL) - *endptr = (char *) s; - - if (s == save) - { - err[0]= EDOM; - return 0L; - } - - if (negative) - { - if (res > (uint32) INT_MIN32) - overflow= 1; - } - else if (res > INT_MAX32) - overflow= 1; - - if (overflow) - { - err[0]= ERANGE; - return negative ? INT_MIN32 : INT_MAX32; - } - - return (negative ? -((long) res) : (long) res); -} - - -static ulong -my_strntoul_mb2_or_mb4(CHARSET_INFO *cs, - const char *nptr, size_t l, int base, - char **endptr, int *err) -{ - int negative= 0; - int overflow; - int cnv; - my_wc_t wc; - register unsigned int cutlim; - register uint32 cutoff; - register uint32 res; - register const uchar *s= (const uchar*) nptr; - register const uchar *e= (const uchar*) nptr + l; - const uchar *save; - - *err= 0; - do - { - if ((cnv= cs->cset->mb_wc(cs, &wc, s, e)) > 0) - { - switch (wc) - { - case ' ' : break; - case '\t': break; - case '-' : negative= !negative; break; - case '+' : break; - default : goto bs; - } - } - else /* No more characters or bad multibyte sequence */ - { - if (endptr !=NULL ) - *endptr= (char*)s; - err[0]= (cnv == MY_CS_ILSEQ) ? EILSEQ : EDOM; - return 0; - } - s+= cnv; - } while (1); - -bs: - -#ifdef NOT_USED - if (base <= 0 || base == 1 || base > 36) - base = 10; -#endif - - overflow= 0; - res= 0; - save= s; - cutoff= ((uint32)~0L) / (uint32) base; - cutlim= (uint) (((uint32)~0L) % (uint32) base); - - do - { - if ((cnv= cs->cset->mb_wc(cs, &wc, s, e)) > 0) - { - s+= cnv; - if (wc >= '0' && wc <= '9') - wc-= '0'; - else if (wc >= 'A' && wc <= 'Z') - wc= wc - 'A' + 10; - else if (wc >= 'a' && wc <= 'z') - wc= wc - 'a' + 10; - else - break; - if ((int) wc >= base) - break; - if (res > cutoff || (res == cutoff && wc > cutlim)) - overflow = 1; - else - { - res*= (uint32) base; - res+= wc; - } - } - else if (cnv == MY_CS_ILSEQ) - { - if (endptr != NULL ) - *endptr= (char*)s; - err[0]= EILSEQ; - return 0; - } - else - { - /* No more characters */ - break; - } - } while(1); - - if (endptr != NULL) - *endptr= (char *) s; - - if (s == save) - { - err[0]= EDOM; - return 0L; - } - - if (overflow) - { - err[0]= (ERANGE); - return (~(uint32) 0); - } - - return (negative ? -((long) res) : (long) res); -} - - -static longlong -my_strntoll_mb2_or_mb4(CHARSET_INFO *cs, - const char *nptr, size_t l, int base, - char **endptr, int *err) -{ - int negative=0; - int overflow; - int cnv; - my_wc_t wc; - register ulonglong cutoff; - register unsigned int cutlim; - register ulonglong res; - register const uchar *s= (const uchar*) nptr; - register const uchar *e= (const uchar*) nptr+l; - const uchar *save; - - *err= 0; - do - { - if ((cnv=cs->cset->mb_wc(cs,&wc,s,e))>0) - { - switch (wc) - { - case ' ' : break; - case '\t': break; - case '-' : negative= !negative; break; - case '+' : break; - default : goto bs; - } - } - else /* No more characters or bad multibyte sequence */ - { - if (endptr !=NULL ) - *endptr = (char*)s; - err[0] = (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; - return 0; - } - s+=cnv; - } while (1); - -bs: - -#ifdef NOT_USED - if (base <= 0 || base == 1 || base > 36) - base = 10; -#endif - - overflow = 0; - res = 0; - save = s; - cutoff = (~(ulonglong) 0) / (unsigned long int) base; - cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); - - do { - if ((cnv=cs->cset->mb_wc(cs,&wc,s,e))>0) - { - s+=cnv; - if ( wc>='0' && wc<='9') - wc -= '0'; - else if ( wc>='A' && wc<='Z') - wc = wc - 'A' + 10; - else if ( wc>='a' && wc<='z') - wc = wc - 'a' + 10; - else - break; - if ((int)wc >= base) - break; - if (res > cutoff || (res == cutoff && wc > cutlim)) - overflow = 1; - else - { - res *= (ulonglong) base; - res += wc; - } - } - else if (cnv==MY_CS_ILSEQ) - { - if (endptr !=NULL ) - *endptr = (char*)s; - err[0]=EILSEQ; - return 0; - } - else - { - /* No more characters */ - break; - } - } while(1); - - if (endptr != NULL) - *endptr = (char *) s; - - if (s == save) - { - err[0]=EDOM; - return 0L; - } - - if (negative) - { - if (res > (ulonglong) LONGLONG_MIN) - overflow = 1; - } - else if (res > (ulonglong) LONGLONG_MAX) - overflow = 1; - - if (overflow) - { - err[0]=ERANGE; - return negative ? LONGLONG_MIN : LONGLONG_MAX; - } - - return (negative ? -((longlong)res) : (longlong)res); -} - - -static ulonglong -my_strntoull_mb2_or_mb4(CHARSET_INFO *cs, - const char *nptr, size_t l, int base, - char **endptr, int *err) -{ - int negative= 0; - int overflow; - int cnv; - my_wc_t wc; - register ulonglong cutoff; - register unsigned int cutlim; - register ulonglong res; - register const uchar *s= (const uchar*) nptr; - register const uchar *e= (const uchar*) nptr + l; - const uchar *save; - - *err= 0; - do - { - if ((cnv= cs->cset->mb_wc(cs,&wc,s,e)) > 0) - { - switch (wc) - { - case ' ' : break; - case '\t': break; - case '-' : negative= !negative; break; - case '+' : break; - default : goto bs; - } - } - else /* No more characters or bad multibyte sequence */ - { - if (endptr !=NULL ) - *endptr = (char*)s; - err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; - return 0; - } - s+=cnv; - } while (1); - -bs: - -#ifdef NOT_USED - if (base <= 0 || base == 1 || base > 36) - base = 10; -#endif - - overflow = 0; - res = 0; - save = s; - cutoff = (~(ulonglong) 0) / (unsigned long int) base; - cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); - - do - { - if ((cnv=cs->cset->mb_wc(cs,&wc,s,e))>0) - { - s+=cnv; - if ( wc>='0' && wc<='9') - wc -= '0'; - else if ( wc>='A' && wc<='Z') - wc = wc - 'A' + 10; - else if ( wc>='a' && wc<='z') - wc = wc - 'a' + 10; - else - break; - if ((int)wc >= base) - break; - if (res > cutoff || (res == cutoff && wc > cutlim)) - overflow = 1; - else - { - res *= (ulonglong) base; - res += wc; - } - } - else if (cnv==MY_CS_ILSEQ) - { - if (endptr !=NULL ) - *endptr = (char*)s; - err[0]= EILSEQ; - return 0; - } - else - { - /* No more characters */ - break; - } - } while(1); - - if (endptr != NULL) - *endptr = (char *) s; - - if (s == save) - { - err[0]= EDOM; - return 0L; - } - - if (overflow) - { - err[0]= ERANGE; - return (~(ulonglong) 0); - } - - return (negative ? -((longlong) res) : (longlong) res); -} - - -static double -my_strntod_mb2_or_mb4(CHARSET_INFO *cs, - char *nptr, size_t length, - char **endptr, int *err) -{ - char buf[256]; - double res; - register char *b= buf; - register const uchar *s= (const uchar*) nptr; - const uchar *end; - my_wc_t wc; - int cnv; - - *err= 0; - /* Cut too long strings */ - if (length >= sizeof(buf)) - length= sizeof(buf) - 1; - end= s + length; - - while ((cnv= cs->cset->mb_wc(cs,&wc,s,end)) > 0) - { - s+= cnv; - if (wc > (int) (uchar) 'e' || !wc) - break; /* Can't be part of double */ - *b++= (char) wc; - } - - *endptr= b; - res= my_strtod(buf, endptr, err); - *endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf); - return res; -} - - -static ulonglong -my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs, - const char *nptr, size_t length, - int unsign_fl, - char **endptr, int *err) -{ - char buf[256], *b= buf; - ulonglong res; - const uchar *end, *s= (const uchar*) nptr; - my_wc_t wc; - int cnv; - - /* Cut too long strings */ - if (length >= sizeof(buf)) - length= sizeof(buf)-1; - end= s + length; - - while ((cnv= cs->cset->mb_wc(cs,&wc,s,end)) > 0) - { - s+= cnv; - if (wc > (int) (uchar) 'e' || !wc) - break; /* Can't be a number part */ - *b++= (char) wc; - } - - res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err); - *endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf); - return res; -} - - -/* - This is a fast version optimized for the case of radix 10 / -10 -*/ - -static size_t -my_l10tostr_mb2_or_mb4(CHARSET_INFO *cs, - char *dst, size_t len, int radix, long int val) -{ - char buffer[66]; - register char *p, *db, *de; - long int new_val; - int sl= 0; - unsigned long int uval = (unsigned long int) val; - - p= &buffer[sizeof(buffer) - 1]; - *p= '\0'; - - if (radix < 0) - { - if (val < 0) - { - sl= 1; - /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ - uval = (unsigned long int)0 - uval; - } - } - - new_val = (long) (uval / 10); - *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); - val= new_val; - - while (val != 0) - { - new_val= val / 10; - *--p= '0' + (char) (val - new_val * 10); - val= new_val; - } - - if (sl) - { - *--p= '-'; - } - - for ( db= dst, de= dst + len ; (dst < de) && *p ; p++) - { - int cnvres= cs->cset->wc_mb(cs,(my_wc_t)p[0],(uchar*) dst, (uchar*) de); - if (cnvres > 0) - dst+= cnvres; - else - break; - } - return (int) (dst - db); -} - - -static size_t -my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs, - char *dst, size_t len, int radix, longlong val) -{ - char buffer[65]; - register char *p, *db, *de; - long long_val; - int sl= 0; - ulonglong uval= (ulonglong) val; - - if (radix < 0) - { - if (val < 0) - { - sl= 1; - /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ - uval = (ulonglong)0 - uval; - } - } - - p= &buffer[sizeof(buffer)-1]; - *p='\0'; - - if (uval == 0) - { - *--p= '0'; - goto cnv; - } - - while (uval > (ulonglong) LONG_MAX) - { - ulonglong quo= uval/(uint) 10; - uint rem= (uint) (uval- quo* (uint) 10); - *--p= '0' + rem; - uval= quo; - } - - long_val= (long) uval; - while (long_val != 0) - { - long quo= long_val/10; - *--p= (char) ('0' + (long_val - quo*10)); - long_val= quo; - } - -cnv: - if (sl) - { - *--p= '-'; - } - - for ( db= dst, de= dst + len ; (dst < de) && *p ; p++) - { - int cnvres= cs->cset->wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de); - if (cnvres > 0) - dst+= cnvres; - else - break; - } - return (int) (dst -db); -} - -#endif - - -#ifdef HAVE_CHARSET_mb2 -static longlong -my_strtoll10_mb2(CHARSET_INFO *cs __attribute__((unused)), - const char *nptr, char **endptr, int *error) -{ - const char *s, *end, *start, *n_end, *true_end; - uchar c; - unsigned long i, j, k; - ulonglong li; - int negative; - ulong cutoff, cutoff2, cutoff3; - - s= nptr; - /* If fixed length string */ - if (endptr) - { - /* Make sure string length is even */ - end= s + ((*endptr - s) / 2) * 2; - while (s < end && !s[0] && (s[1] == ' ' || s[1] == '\t')) - s+= 2; - if (s == end) - goto no_conv; - } - else - { - /* We don't support null terminated strings in UCS2 */ - goto no_conv; - } - - /* Check for a sign. */ - negative= 0; - if (!s[0] && s[1] == '-') - { - *error= -1; /* Mark as negative number */ - negative= 1; - s+= 2; - if (s == end) - goto no_conv; - cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2; - cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100; - cutoff3= MAX_NEGATIVE_NUMBER % 100; - } - else - { - *error= 0; - if (!s[0] && s[1] == '+') - { - s+= 2; - if (s == end) - goto no_conv; - } - cutoff= ULONGLONG_MAX / LFACTOR2; - cutoff2= ULONGLONG_MAX % LFACTOR2 / 100; - cutoff3= ULONGLONG_MAX % 100; - } - - /* Handle case where we have a lot of pre-zero */ - if (!s[0] && s[1] == '0') - { - i= 0; - do - { - s+= 2; - if (s == end) - goto end_i; /* Return 0 */ - } - while (!s[0] && s[1] == '0'); - n_end= s + 2 * INIT_CNT; - } - else - { - /* Read first digit to check that it's a valid number */ - if (s[0] || (c= (s[1]-'0')) > 9) - goto no_conv; - i= c; - s+= 2; - n_end= s + 2 * (INIT_CNT-1); - } - - /* Handle first 9 digits and store them in i */ - if (n_end > end) - n_end= end; - for (; s != n_end ; s+= 2) - { - if (s[0] || (c= (s[1]-'0')) > 9) - goto end_i; - i= i*10+c; - } - if (s == end) - goto end_i; - - /* Handle next 9 digits and store them in j */ - j= 0; - start= s; /* Used to know how much to shift i */ - n_end= true_end= s + 2 * INIT_CNT; - if (n_end > end) - n_end= end; - do - { - if (s[0] || (c= (s[1]-'0')) > 9) - goto end_i_and_j; - j= j*10+c; - s+= 2; - } while (s != n_end); - if (s == end) - { - if (s != true_end) - goto end_i_and_j; - goto end3; - } - if (s[0] || (c= (s[1]-'0')) > 9) - goto end3; - - /* Handle the next 1 or 2 digits and store them in k */ - k=c; - s+= 2; - if (s == end || s[0] || (c= (s[1]-'0')) > 9) - goto end4; - k= k*10+c; - s+= 2; - *endptr= (char*) s; - - /* number string should have ended here */ - if (s != end && !s[0] && (c= (s[1]-'0')) <= 9) - goto overflow; - - /* Check that we didn't get an overflow with the last digit */ - if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) && - k > cutoff3))) - goto overflow; - li=i*LFACTOR2+ (ulonglong) j*100 + k; - return (longlong) li; - -overflow: /* *endptr is set here */ - *error= MY_ERRNO_ERANGE; - return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX; - -end_i: - *endptr= (char*) s; - return (negative ? ((longlong) -(long) i) : (longlong) i); - -end_i_and_j: - li= (ulonglong) i * lfactor[(size_t) (s-start) / 2] + j; - *endptr= (char*) s; - return (negative ? -((longlong) li) : (longlong) li); - -end3: - li=(ulonglong) i*LFACTOR+ (ulonglong) j; - *endptr= (char*) s; - return (negative ? -((longlong) li) : (longlong) li); - -end4: - li=(ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k; - *endptr= (char*) s; - if (negative) - { - if (li > MAX_NEGATIVE_NUMBER) - goto overflow; - return -((longlong) li); - } - return (longlong) li; - -no_conv: - /* There was no number to convert. */ - *error= MY_ERRNO_EDOM; - *endptr= (char *) nptr; - return 0; -} - - -static size_t -my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)), - const char *str, const char *end, int sequence_type) -{ - const char *str0= str; - end--; /* for easier loop condition, because of two bytes per character */ - - switch (sequence_type) - { - case MY_SEQ_SPACES: - for ( ; str < end; str+= 2) - { - if (str[0] != '\0' || str[1] != ' ') - break; - } - return (size_t) (str - str0); - default: - return 0; - } -} - - -static void -my_fill_mb2(CHARSET_INFO *cs __attribute__((unused)), - char *s, size_t l, int fill) -{ - for ( ; l >= 2; s[0]= 0, s[1]= fill, s+= 2, l-= 2); -} - - -static int -my_vsnprintf_mb2(char *dst, size_t n, const char* fmt, va_list ap) -{ - char *start=dst, *end= dst + n - 1; - for (; *fmt ; fmt++) - { - if (fmt[0] != '%') - { - if (dst == end) /* End of buffer */ - break; - - *dst++='\0'; - *dst++= *fmt; /* Copy ordinary char */ - continue; - } - - fmt++; - - /* Skip if max size is used (to be compatible with printf) */ - while ( (*fmt >= '0' && *fmt <= '9') || *fmt == '.' || *fmt == '-') - fmt++; - - if (*fmt == 'l') - fmt++; - - if (*fmt == 's') /* String parameter */ - { - char *par= va_arg(ap, char *); - size_t plen; - size_t left_len= (size_t)(end-dst); - if (!par) - par= (char*) "(null)"; - plen= strlen(par); - if (left_len <= plen * 2) - plen = left_len / 2 - 1; - - for ( ; plen ; plen--, dst+=2, par++) - { - dst[0]= '\0'; - dst[1]= par[0]; - } - continue; - } - else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ - { - int iarg; - char nbuf[16]; - char *pbuf= nbuf; - - if ((size_t) (end - dst) < 32) - break; - iarg= va_arg(ap, int); - if (*fmt == 'd') - int10_to_str((long) iarg, nbuf, -10); - else - int10_to_str((long) (uint) iarg, nbuf,10); - - for (; pbuf[0]; pbuf++) - { - *dst++= '\0'; - *dst++= *pbuf; - } - continue; - } - - /* We come here on '%%', unknown code or too long parameter */ - if (dst == end) - break; - *dst++= '\0'; - *dst++= '%'; /* % used as % or unknown code */ - } - - DBUG_ASSERT(dst <= end); - *dst='\0'; /* End of errmessage */ - return (size_t) (dst - start); -} - - -static size_t -my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)), - char* to, size_t n, const char* fmt, ...) -{ - va_list args; - va_start(args,fmt); - return my_vsnprintf_mb2(to, n, fmt, args); -} - - -static size_t -my_lengthsp_mb2(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr, size_t length) -{ - const char *end= ptr + length; - while (end > ptr + 1 && end[-1] == ' ' && end[-2] == '\0') - end-= 2; - return (size_t) (end - ptr); -} - -#endif - - -#ifdef HAVE_CHARSET_utf16 - -/* - D800..DB7F - Non-provate surrogate high (896 pages) - DB80..DBFF - Private surrogate high (128 pages) - DC00..DFFF - Surrogate low (1024 codes in a page) -*/ - -#define MY_UTF16_HIGH_HEAD(x) ((((uchar) (x)) & 0xFC) == 0xD8) -#define MY_UTF16_LOW_HEAD(x) ((((uchar) (x)) & 0xFC) == 0xDC) -#define MY_UTF16_SURROGATE(x) (((x) & 0xF800) == 0xD800) - -static int -my_utf16_uni(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc, const uchar *s, const uchar *e) -{ - if (s + 2 > e) - return MY_CS_TOOSMALL2; - - /* - High bytes: 0xD[89AB] = B'110110??' - Low bytes: 0xD[CDEF] = B'110111??' - Surrogate mask: 0xFC = B'11111100' - */ - - if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */ - { - if (s + 4 > e) - return MY_CS_TOOSMALL4; - - if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */ - return MY_CS_ILSEQ; - - /* - s[0]= 110110?? (<< 18) - s[1]= ???????? (<< 10) - s[2]= 110111?? (<< 8) - s[3]= ???????? (<< 0) - */ - - *pwc= ((s[0] & 3) << 18) + (s[1] << 10) + - ((s[2] & 3) << 8) + s[3] + 0x10000; - - return 4; - } - - if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */ - return MY_CS_ILSEQ; - - *pwc= (s[0] << 8) + s[1]; - return 2; -} - - -static int -my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, uchar *e) -{ - if (wc <= 0xFFFF) - { - if (s + 2 > e) - return MY_CS_TOOSMALL2; - if (MY_UTF16_SURROGATE(wc)) - return MY_CS_ILUNI; - *s++= (uchar) (wc >> 8); - *s= (uchar) (wc & 0xFF); - return 2; - } - - if (wc <= 0x10FFFF) - { - if (s + 4 > e) - return MY_CS_TOOSMALL4; - *s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8; - *s++= (uchar) (wc >> 10) & 0xFF; - *s++= (uchar) ((wc >> 8) & 3) | 0xDC; - *s= (uchar) wc & 0xFF; - return 4; - } - - return MY_CS_ILUNI; -} - - -static inline void -my_tolower_utf16(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) -{ - int page= *wc >> 8; - if (page < 256 && uni_plane[page]) - *wc= uni_plane[page][*wc & 0xFF].tolower; -} - - -static inline void -my_toupper_utf16(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) -{ - int page= *wc >> 8; - if (page < 256 && uni_plane[page]) - *wc= uni_plane[page][*wc & 0xFF].toupper; -} - - -static inline void -my_tosort_utf16(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) -{ - int page= *wc >> 8; - if (page < 256) - { - if (uni_plane[page]) - *wc= uni_plane[page][*wc & 0xFF].sort; - } - else - { - *wc= REPLACEMENT_CHAR; - } -} - - -static size_t -my_caseup_utf16(CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - my_wc_t wc; - int res; - char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src == dst && srclen == dstlen); - - while ((src < srcend) && - (res= my_utf16_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0) - { - my_toupper_utf16(uni_plane, &wc); - if (res != my_uni_utf16(cs, wc, (uchar*) src, (uchar*) srcend)) - break; - src+= res; - } - return srclen; -} - - -static void -my_hash_sort_utf16(CHARSET_INFO *cs, const uchar *s, size_t slen, - ulong *n1, ulong *n2) -{ - my_wc_t wc; - int res; - const uchar *e= s+slen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - - while (e > s + 1 && e[-1] == ' ' && e[-2] == '\0') - e-= 2; - - while ((s < e) && (res= my_utf16_uni(cs, &wc, (uchar *)s, (uchar*)e)) > 0) - { - my_tosort_utf16(uni_plane, &wc); - n1[0]^= (((n1[0] & 63) + n2[0]) * (wc & 0xFF)) + (n1[0] << 8); - n2[0]+= 3; - n1[0]^= (((n1[0] & 63) + n2[0]) * (wc >> 8)) + (n1[0] << 8); - n2[0]+= 3; - s+= res; - } -} - - -static size_t -my_casedn_utf16(CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - my_wc_t wc; - int res; - char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src == dst && srclen == dstlen); - - while ((src < srcend) && - (res= my_utf16_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0) - { - my_tolower_utf16(uni_plane, &wc); - if (res != my_uni_utf16(cs, wc, (uchar*) src, (uchar*) srcend)) - break; - src+= res; - } - return srclen; -} - - -static int -my_strnncoll_utf16(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - int s_res, t_res; - my_wc_t s_wc,t_wc; - const uchar *se= s + slen; - const uchar *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - while (s < se && t < te) - { - s_res= my_utf16_uni(cs, &s_wc, s, se); - t_res= my_utf16_uni(cs, &t_wc, t, te); - - if (s_res <= 0 || t_res <= 0) - { - /* Incorrect string, compare by char value */ - return my_bincmp(s, se, t, te); - } - - my_tosort_utf16(uni_plane, &s_wc); - my_tosort_utf16(uni_plane, &t_wc); - - if (s_wc != t_wc) - { - return s_wc > t_wc ? 1 : -1; - } - - s+= s_res; - t+= t_res; - } - return (int) (t_is_prefix ? (t - te) : ((se - s) - (te - t))); -} - - -/** - Compare strings, discarding end space - - If one string is shorter as the other, then we space extend the other - so that the strings have equal length. - - This will ensure that the following things hold: - - "a" == "a " - "a\0" < "a" - "a\0" < "a " - - @param cs Character set pinter. - @param a First string to compare. - @param a_length Length of 'a'. - @param b Second string to compare. - @param b_length Length of 'b'. - - IMPLEMENTATION - - @return Comparison result. - @retval Negative number, if a less than b. - @retval 0, if a is equal to b - @retval Positive number, if a > b -*/ - -static int -my_strnncollsp_utf16(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference) -{ - int res; - my_wc_t s_wc, t_wc; - const uchar *se= s + slen, *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - DBUG_ASSERT((slen % 2) == 0); - DBUG_ASSERT((tlen % 2) == 0); - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= FALSE; -#endif - - while (s < se && t < te) - { - int s_res= my_utf16_uni(cs, &s_wc, s, se); - int t_res= my_utf16_uni(cs, &t_wc, t, te); - - if (s_res <= 0 || t_res <= 0) - { - /* Incorrect string, compare bytewise */ - return my_bincmp(s, se, t, te); - } - - my_tosort_utf16(uni_plane, &s_wc); - my_tosort_utf16(uni_plane, &t_wc); - - if (s_wc != t_wc) - { - return s_wc > t_wc ? 1 : -1; - } - - s+= s_res; - t+= t_res; - } - - slen= (size_t) (se - s); - tlen= (size_t) (te - t); - res= 0; - - if (slen != tlen) - { - int s_res, swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 's' is bigger */ - if (slen < tlen) - { - slen= tlen; - s= t; - se= te; - swap= -1; - res= -res; - } - - for ( ; s < se; s+= s_res) - { - if ((s_res= my_utf16_uni(cs, &s_wc, s, se)) < 0) - { - DBUG_ASSERT(0); - return 0; - } - if (s_wc != ' ') - return (s_wc < ' ') ? -swap : swap; - } - } - return res; -} - - -static uint -my_ismbchar_utf16(CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused))) -{ - if (b + 2 > e) - return 0; - - if (MY_UTF16_HIGH_HEAD(*b)) - { - return (b + 4 <= e) && MY_UTF16_LOW_HEAD(b[2]) ? 4 : 0; - } - - if (MY_UTF16_LOW_HEAD(*b)) - return 0; - - return 2; -} - - -static uint -my_mbcharlen_utf16(CHARSET_INFO *cs __attribute__((unused)), - uint c __attribute__((unused))) -{ - return MY_UTF16_HIGH_HEAD(c) ? 4 : 2; -} - - -static size_t -my_numchars_utf16(CHARSET_INFO *cs, - const char *b, const char *e) -{ - size_t nchars= 0; - for ( ; ; nchars++) - { - size_t charlen= my_ismbchar_utf16(cs, b, e); - if (!charlen) - break; - b+= charlen; - } - return nchars; -} - - -static size_t -my_charpos_utf16(CHARSET_INFO *cs, - const char *b, const char *e, size_t pos) -{ - const char *b0= b; - uint charlen; - - for ( ; pos; b+= charlen, pos--) - { - if (!(charlen= my_ismbchar(cs, b, e))) - return (e + 2 - b0); /* Error, return pos outside the string */ - } - return (size_t) (pos ? (e + 2 - b0) : (b - b0)); -} - - -static size_t -my_well_formed_len_utf16(CHARSET_INFO *cs, - const char *b, const char *e, - size_t nchars, int *error) -{ - const char *b0= b; - uint charlen; - *error= 0; - - for ( ; nchars; b+= charlen, nchars--) - { - if (!(charlen= my_ismbchar(cs, b, e))) - { - *error= b < e ? 1 : 0; - break; - } - } - return (size_t) (b - b0); -} - - -static int -my_wildcmp_utf16_ci(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - return my_wildcmp_unicode(cs, str, str_end, wildstr, wildend, - escape, w_one, w_many, uni_plane); -} - - -static int -my_wildcmp_utf16_bin(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - return my_wildcmp_unicode(cs, str, str_end, wildstr, wildend, - escape, w_one, w_many, NULL); -} - - -static int -my_strnncoll_utf16_bin(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - int s_res,t_res; - my_wc_t s_wc,t_wc; - const uchar *se=s+slen; - const uchar *te=t+tlen; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - while ( s < se && t < te ) - { - s_res= my_utf16_uni(cs,&s_wc, s, se); - t_res= my_utf16_uni(cs,&t_wc, t, te); - - if (s_res <= 0 || t_res <= 0) - { - /* Incorrect string, compare by char value */ - return my_bincmp(s, se, t, te); - } - if (s_wc != t_wc) - { - return s_wc > t_wc ? 1 : -1; - } - - s+= s_res; - t+= t_res; - } - return (int) (t_is_prefix ? (t - te) : ((se - s) - (te - t))); -} - - -static int -my_strnncollsp_utf16_bin(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference) -{ - int res; - my_wc_t s_wc, t_wc; - const uchar *se= s + slen, *te= t + tlen; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - DBUG_ASSERT((slen % 2) == 0); - DBUG_ASSERT((tlen % 2) == 0); - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= FALSE; -#endif - - while (s < se && t < te) - { - int s_res= my_utf16_uni(cs, &s_wc, s, se); - int t_res= my_utf16_uni(cs, &t_wc, t, te); - - if (s_res <= 0 || t_res <= 0) - { - /* Incorrect string, compare bytewise */ - return my_bincmp(s, se, t, te); - } - - if (s_wc != t_wc) - { - return s_wc > t_wc ? 1 : -1; - } - - s+= s_res; - t+= t_res; - } - - slen= (size_t) (se - s); - tlen= (size_t) (te - t); - res= 0; - - if (slen != tlen) - { - int s_res, swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 's' is bigger */ - if (slen < tlen) - { - slen= tlen; - s= t; - se= te; - swap= -1; - res= -res; - } - - for ( ; s < se; s+= s_res) - { - if ((s_res= my_utf16_uni(cs, &s_wc, s, se)) < 0) - { - DBUG_ASSERT(0); - return 0; - } - if (s_wc != ' ') - return (s_wc < ' ') ? -swap : swap; - } - } - return res; -} - - -static void -my_hash_sort_utf16_bin(CHARSET_INFO *cs __attribute__((unused)), - const uchar *key, size_t len,ulong *nr1, ulong *nr2) -{ - const uchar *pos = key; - - key+= len; - - while (key > pos + 1 && key[-1] == ' ' && key[-2] == '\0') - key-= 2; - - for (; pos < (uchar*) key ; pos++) - { - nr1[0]^= (ulong) ((((uint) nr1[0] & 63) + nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); - nr2[0]+= 3; - } -} - - -/** - Calculate min_str and max_str that ranges a LIKE string. - - @param ptr Pointer to LIKE pattern. - @param ptr_length Length of LIKE pattern. - @param escape Escape character in LIKE. (Normally '\'). - All escape characters should be removed - from min_str and max_str. - @param res_length Length of min_str and max_str. - @param min_str Smallest case sensitive string that ranges LIKE. - Should be space padded to res_length. - @param max_str Largest case sensitive string that ranges LIKE. - Normally padded with the biggest character sort value. - - @return Optimization status. - @retval FALSE if LIKE pattern can be optimized - @rerval TRUE if LIKE can't be optimized. -*/ - -my_bool -my_like_range_utf16(CHARSET_INFO *cs, - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str,char *max_str, - size_t *min_length,size_t *max_length) -{ - const char *end=ptr+ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - size_t charlen= res_length / cs->mbmaxlen; - - for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0 - ; ptr+=2, charlen--) - { - if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end) - { - ptr+=2; /* Skip escape */ - *min_str++= *max_str++ = ptr[0]; - *min_str++= *max_str++ = ptr[1]; - continue; - } - if (ptr[0] == '\0' && ptr[1] == w_one) /* '_' in SQL */ - { - *min_str++= (char) (cs->min_sort_char >> 8); - *min_str++= (char) (cs->min_sort_char & 255); - *max_str++= (char) (cs->max_sort_char >> 8); - *max_str++= (char) (cs->max_sort_char & 255); - continue; - } - if (ptr[0] == '\0' && ptr[1] == w_many) /* '%' in SQL */ - { - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - do { - *min_str++ = 0; - *min_str++ = 0; - *max_str++ = (char) (cs->max_sort_char >> 8); - *max_str++ = (char) (cs->max_sort_char & 255); - } while (min_str + 1 < min_end); - return FALSE; - } - *min_str++= *max_str++ = ptr[0]; - *min_str++= *max_str++ = ptr[1]; - } - - /* Temporary fix for handling w_one at end of string (key compression) */ - { - char *tmp; - for (tmp= min_str ; tmp-1 > min_org && tmp[-1] == '\0' && tmp[-2]=='\0';) - { - *--tmp=' '; - *--tmp='\0'; - } - } - - *min_length= *max_length = (size_t) (min_str - min_org); - while (min_str + 1 < min_end) - { - *min_str++ = *max_str++ = '\0'; - *min_str++ = *max_str++ = ' '; /* Because if key compression */ - } - return FALSE; -} - - -static MY_COLLATION_HANDLER my_collation_utf16_general_ci_handler = -{ - NULL, /* init */ - my_strnncoll_utf16, - my_strnncollsp_utf16, - my_strnxfrm_unicode, - my_strnxfrmlen_simple, - my_like_range_utf16, - my_wildcmp_utf16_ci, - my_strcasecmp_mb2_or_mb4, - my_instr_mb, - my_hash_sort_utf16, - my_propagate_simple -}; - - -static MY_COLLATION_HANDLER my_collation_utf16_bin_handler = -{ - NULL, /* init */ - my_strnncoll_utf16_bin, - my_strnncollsp_utf16_bin, - my_strnxfrm_unicode, - my_strnxfrmlen_simple, - my_like_range_utf16, - my_wildcmp_utf16_bin, - my_strcasecmp_mb2_or_mb4, - my_instr_mb, - my_hash_sort_utf16_bin, - my_propagate_simple -}; - - -MY_CHARSET_HANDLER my_charset_utf16_handler= -{ - NULL, /* init */ - my_ismbchar_utf16, /* ismbchar */ - my_mbcharlen_utf16, /* mbcharlen */ - my_numchars_utf16, - my_charpos_utf16, - my_well_formed_len_utf16, - my_lengthsp_mb2, - my_numcells_mb, - my_utf16_uni, /* mb_wc */ - my_uni_utf16, /* wc_mb */ - my_mb_ctype_mb, - my_caseup_str_mb2_or_mb4, - my_casedn_str_mb2_or_mb4, - my_caseup_utf16, - my_casedn_utf16, - my_snprintf_mb2, - my_l10tostr_mb2_or_mb4, - my_ll10tostr_mb2_or_mb4, - my_fill_mb2, - my_strntol_mb2_or_mb4, - my_strntoul_mb2_or_mb4, - my_strntoll_mb2_or_mb4, - my_strntoull_mb2_or_mb4, - my_strntod_mb2_or_mb4, - my_strtoll10_mb2, - my_strntoull10rnd_mb2_or_mb4, - my_scan_mb2 -}; - - -CHARSET_INFO my_charset_utf16_general_ci= -{ - 54,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_general_ci", /* name */ - "UTF-16 Unicode", /* comment */ - NULL, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_general_ci_handler -}; - - -CHARSET_INFO my_charset_utf16_bin= -{ - 55,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_NONASCII, - "utf16", /* cs name */ - "utf16_bin", /* name */ - "UTF-16 Unicode", /* comment */ - NULL, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 4, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf16_handler, - &my_collation_utf16_bin_handler -}; - -#endif /* HAVE_CHARSET_utf16 */ - - -#ifdef HAVE_CHARSET_utf32 - -static int -my_utf32_uni(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc, const uchar *s, const uchar *e) -{ - if (s + 4 > e) - return MY_CS_TOOSMALL4; - *pwc= (s[0] << 24) + (s[1] << 16) + (s[2] << 8) + (s[3]); - return 4; -} - - -static int -my_uni_utf32(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, uchar *e) -{ - if (s + 4 > e) - return MY_CS_TOOSMALL4; - - s[0]= (uchar) (wc >> 24); - s[1]= (uchar) (wc >> 16) & 0xFF; - s[2]= (uchar) (wc >> 8) & 0xFF; - s[3]= (uchar) wc & 0xFF; - return 4; -} - - -static inline void -my_tolower_utf32(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) -{ - int page= *wc >> 8; - if (page < 256 && uni_plane[page]) - *wc= uni_plane[page][*wc & 0xFF].tolower; -} - - -static inline void -my_toupper_utf32(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) -{ - int page= *wc >> 8; - if (page < 256 && uni_plane[page]) - *wc= uni_plane[page][*wc & 0xFF].toupper; -} - - -static inline void -my_tosort_utf32(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) -{ - int page= *wc >> 8; - if (page < 256) - { - if (uni_plane[page]) - *wc= uni_plane[page][*wc & 0xFF].sort; - } - else - { - *wc= REPLACEMENT_CHAR; - } -} - - -static size_t -my_caseup_utf32(CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - my_wc_t wc; - int res; - char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src == dst && srclen == dstlen); - - while ((src < srcend) && - (res= my_utf32_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0) - { - my_toupper_utf32(uni_plane, &wc); - if (res != my_uni_utf32(cs, wc, (uchar*) src, (uchar*) srcend)) - break; - src+= res; - } - return srclen; -} - - -static inline void -my_hash_add(ulong *n1, ulong *n2, uint ch) -{ - n1[0]^= (((n1[0] & 63) + n2[0]) * (ch)) + (n1[0] << 8); - n2[0]+= 3; -} - - -static void -my_hash_sort_utf32(CHARSET_INFO *cs, const uchar *s, size_t slen, - ulong *n1, ulong *n2) -{ - my_wc_t wc; - int res; - const uchar *e= s + slen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - - /* Skip trailing spaces */ - while (e > s + 3 && e[-1] == ' ' && !e[-2] && !e[-3] && !e[-4]) - e-= 4; - - while ((res= my_utf32_uni(cs, &wc, (uchar*) s, (uchar*) e)) > 0) - { - my_tosort_utf32(uni_plane, &wc); - my_hash_add(n1, n2, (uint) (wc >> 24)); - my_hash_add(n1, n2, (uint) (wc >> 16) & 0xFF); - my_hash_add(n1, n2, (uint) (wc >> 8) & 0xFF); - my_hash_add(n1, n2, (uint) (wc & 0xFF)); - s+= res; - } -} - - -static size_t -my_casedn_utf32(CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - my_wc_t wc; - int res; - char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src == dst && srclen == dstlen); - - while ((res= my_utf32_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0) - { - my_tolower_utf32(uni_plane,&wc); - if (res != my_uni_utf32(cs, wc, (uchar*) src, (uchar*) srcend)) - break; - src+= res; - } - return srclen; -} - - -static int -my_strnncoll_utf32(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - my_wc_t s_wc,t_wc; - const uchar *se= s + slen; - const uchar *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - while (s < se && t < te) - { - int s_res= my_utf32_uni(cs, &s_wc, s, se); - int t_res= my_utf32_uni(cs, &t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0) - { - /* Incorrect string, compare by char value */ - return my_bincmp(s, se, t, te); - } - - my_tosort_utf32(uni_plane, &s_wc); - my_tosort_utf32(uni_plane, &t_wc); - - if (s_wc != t_wc) - { - return s_wc > t_wc ? 1 : -1; - } - - s+= s_res; - t+= t_res; - } - return (int) (t_is_prefix ? (t - te) : ((se - s) - (te - t))); -} - - -/** - Compare strings, discarding end space - - If one string is shorter as the other, then we space extend the other - so that the strings have equal length. - - This will ensure that the following things hold: - - "a" == "a " - "a\0" < "a" - "a\0" < "a " - - @param cs Character set pinter. - @param a First string to compare. - @param a_length Length of 'a'. - @param b Second string to compare. - @param b_length Length of 'b'. - - IMPLEMENTATION - - @return Comparison result. - @retval Negative number, if a less than b. - @retval 0, if a is equal to b - @retval Positive number, if a > b -*/ - - -static int -my_strnncollsp_utf32(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference) -{ - int res; - my_wc_t s_wc, t_wc; - const uchar *se= s + slen, *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - DBUG_ASSERT((slen % 4) == 0); - DBUG_ASSERT((tlen % 4) == 0); - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= FALSE; -#endif - - while ( s < se && t < te ) - { - int s_res= my_utf32_uni(cs, &s_wc, s, se); - int t_res= my_utf32_uni(cs, &t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0 ) - { - /* Incorrect string, compare bytewise */ - return my_bincmp(s, se, t, te); - } - - my_tosort_utf32(uni_plane, &s_wc); - my_tosort_utf32(uni_plane, &t_wc); - - if ( s_wc != t_wc ) - { - return s_wc > t_wc ? 1 : -1; - } - - s+= s_res; - t+= t_res; - } - - slen= (size_t) (se - s); - tlen= (size_t) (te - t); - res= 0; - - if (slen != tlen) - { - int s_res, swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 's' is bigger */ - if (slen < tlen) - { - slen= tlen; - s= t; - se= te; - swap= -1; - res= -res; - } - - for ( ; s < se; s+= s_res) - { - if ((s_res= my_utf32_uni(cs, &s_wc, s, se)) < 0) - { - DBUG_ASSERT(0); - return 0; - } - if (s_wc != ' ') - return (s_wc < ' ') ? -swap : swap; - } - } - return res; -} - - -static size_t -my_strnxfrmlen_utf32(CHARSET_INFO *cs __attribute__((unused)), size_t len) -{ - return len / 2; -} - - -static void -my_fill_utf32_for_strxfrm(CHARSET_INFO *cs __attribute__((unused)), - char *s, size_t slen, int fill) -{ - DBUG_ASSERT(fill <= 0xFFFF); - - for ( ; slen > 1; slen-= 2) - { - *s++= fill >> 8; - *s++= fill & 0xFF; - } - if (slen) - *s= 0x00; -} - - -size_t -my_strxfrm_pad_desc_and_reverse_utf32(CHARSET_INFO *cs, - uchar *str, uchar *frmend, uchar *strend, - uint nweights, uint flags, uint level) -{ - if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) - { - uint fill_length= min((uint) (strend - frmend), nweights * 2); - my_fill_utf32_for_strxfrm(cs, (char*) frmend, fill_length, cs->pad_char); - frmend+= fill_length; - } - my_strxfrm_desc_and_reverse(str, frmend, flags, level); - return frmend - str; -} - - -static uint -my_ismbchar_utf32(CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused))) -{ - return 4; -} - - -static uint -my_mbcharlen_utf32(CHARSET_INFO *cs __attribute__((unused)) , - uint c __attribute__((unused))) -{ - return 4; -} - - -static int -my_vsnprintf_utf32(char *dst, size_t n, const char* fmt, va_list ap) -{ - char *start= dst, *end= dst + n; - DBUG_ASSERT((n % 4) == 0); - for (; *fmt ; fmt++) - { - if (fmt[0] != '%') - { - if (dst >= end) /* End of buffer */ - break; - - *dst++= '\0'; - *dst++= '\0'; - *dst++= '\0'; - *dst++= *fmt; /* Copy ordinary char */ - continue; - } - - fmt++; - - /* Skip if max size is used (to be compatible with printf) */ - while ( (*fmt>='0' && *fmt<='9') || *fmt == '.' || *fmt == '-') - fmt++; - - if (*fmt == 'l') - fmt++; - - if (*fmt == 's') /* String parameter */ - { - reg2 char *par= va_arg(ap, char *); - size_t plen; - size_t left_len= (size_t)(end - dst); - if (!par) par= (char*)"(null)"; - plen= strlen(par); - if (left_len <= plen*4) - plen= left_len / 4 - 1; - - for ( ; plen ; plen--, dst+= 4, par++) - { - dst[0]= '\0'; - dst[1]= '\0'; - dst[2]= '\0'; - dst[3]= par[0]; - } - continue; - } - else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ - { - register int iarg; - char nbuf[16]; - char *pbuf= nbuf; - - if ((size_t) (end - dst) < 64) - break; - iarg= va_arg(ap, int); - if (*fmt == 'd') - int10_to_str((long) iarg, nbuf, -10); - else - int10_to_str((long) (uint) iarg,nbuf,10); - - for (; pbuf[0]; pbuf++) - { - *dst++= '\0'; - *dst++= '\0'; - *dst++= '\0'; - *dst++= *pbuf; - } - continue; - } - - /* We come here on '%%', unknown code or too long parameter */ - if (dst == end) - break; - *dst++= '\0'; - *dst++= '\0'; - *dst++= '\0'; - *dst++= '%'; /* % used as % or unknown code */ - } - - DBUG_ASSERT(dst < end); - *dst++= '\0'; - *dst++= '\0'; - *dst++= '\0'; - *dst++= '\0'; /* End of errmessage */ - return (size_t) (dst - start - 4); -} - - -static size_t -my_snprintf_utf32(CHARSET_INFO *cs __attribute__((unused)), - char* to, size_t n, const char* fmt, ...) -{ - va_list args; - va_start(args,fmt); - return my_vsnprintf_utf32(to, n, fmt, args); -} - - -static longlong -my_strtoll10_utf32(CHARSET_INFO *cs __attribute__((unused)), - const char *nptr, char **endptr, int *error) -{ - const char *s, *end, *start, *n_end, *true_end; - uchar c; - unsigned long i, j, k; - ulonglong li; - int negative; - ulong cutoff, cutoff2, cutoff3; - - s= nptr; - /* If fixed length string */ - if (endptr) - { - /* Make sure string length is even */ - end= s + ((*endptr - s) / 4) * 4; - while (s < end && !s[0] && !s[1] && !s[2] && - (s[3] == ' ' || s[3] == '\t')) - s+= 4; - if (s == end) - goto no_conv; - } - else - { - /* We don't support null terminated strings in UCS2 */ - goto no_conv; - } - - /* Check for a sign. */ - negative= 0; - if (!s[0] && !s[1] && !s[2] && s[3] == '-') - { - *error= -1; /* Mark as negative number */ - negative= 1; - s+= 4; - if (s == end) - goto no_conv; - cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2; - cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100; - cutoff3= MAX_NEGATIVE_NUMBER % 100; - } - else - { - *error= 0; - if (!s[0] && !s[1] && !s[2] && s[3] == '+') - { - s+= 4; - if (s == end) - goto no_conv; - } - cutoff= ULONGLONG_MAX / LFACTOR2; - cutoff2= ULONGLONG_MAX % LFACTOR2 / 100; - cutoff3= ULONGLONG_MAX % 100; - } - - /* Handle case where we have a lot of pre-zero */ - if (!s[0] && !s[1] && !s[2] && s[3] == '0') - { - i= 0; - do - { - s+= 4; - if (s == end) - goto end_i; /* Return 0 */ - } - while (!s[0] && !s[1] && !s[2] && s[3] == '0'); - n_end= s + 4 * INIT_CNT; - } - else - { - /* Read first digit to check that it's a valid number */ - if (s[0] || s[1] || s[2] || (c= (s[3]-'0')) > 9) - goto no_conv; - i= c; - s+= 4; - n_end= s + 4 * (INIT_CNT-1); - } - - /* Handle first 9 digits and store them in i */ - if (n_end > end) - n_end= end; - for (; s != n_end ; s+= 4) - { - if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9) - goto end_i; - i= i * 10 + c; - } - if (s == end) - goto end_i; - - /* Handle next 9 digits and store them in j */ - j= 0; - start= s; /* Used to know how much to shift i */ - n_end= true_end= s + 4 * INIT_CNT; - if (n_end > end) - n_end= end; - do - { - if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9) - goto end_i_and_j; - j= j * 10 + c; - s+= 4; - } while (s != n_end); - if (s == end) - { - if (s != true_end) - goto end_i_and_j; - goto end3; - } - if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9) - goto end3; - - /* Handle the next 1 or 2 digits and store them in k */ - k=c; - s+= 4; - if (s == end || s[0] || s[1] || s[2] || (c= (s[3]-'0')) > 9) - goto end4; - k= k * 10 + c; - s+= 2; - *endptr= (char*) s; - - /* number string should have ended here */ - if (s != end && !s[0] && !s[1] && !s[2] && (c= (s[3] - '0')) <= 9) - goto overflow; - - /* Check that we didn't get an overflow with the last digit */ - if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) && - k > cutoff3))) - goto overflow; - li= i * LFACTOR2+ (ulonglong) j * 100 + k; - return (longlong) li; - -overflow: /* *endptr is set here */ - *error= MY_ERRNO_ERANGE; - return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX; - -end_i: - *endptr= (char*) s; - return (negative ? ((longlong) -(long) i) : (longlong) i); - -end_i_and_j: - li= (ulonglong) i * lfactor[(size_t) (s-start) / 4] + j; - *endptr= (char*) s; - return (negative ? -((longlong) li) : (longlong) li); - -end3: - li= (ulonglong) i*LFACTOR+ (ulonglong) j; - *endptr= (char*) s; - return (negative ? -((longlong) li) : (longlong) li); - -end4: - li= (ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k; - *endptr= (char*) s; - if (negative) - { - if (li > MAX_NEGATIVE_NUMBER) - goto overflow; - return -((longlong) li); - } - return (longlong) li; - -no_conv: - /* There was no number to convert. */ - *error= MY_ERRNO_EDOM; - *endptr= (char *) nptr; - return 0; -} - - -static size_t -my_numchars_utf32(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e) -{ - return (size_t) (e - b) / 4; -} - - -static size_t -my_charpos_utf32(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, size_t pos) -{ - size_t string_length= (size_t) (e - b); - return pos * 4 > string_length ? string_length + 4 : pos * 4; -} - - -static size_t -my_well_formed_len_utf32(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, - size_t nchars, int *error) -{ - /* Ensure string length is divisible by 4 */ - const char *b0= b; - size_t length= e - b; - DBUG_ASSERT((length % 4) == 0); - *error= 0; - nchars*= 4; - if (length > nchars) - { - length= nchars; - e= b + nchars; - } - for (; b < e; b+= 4) - { - /* Don't accept characters greater than U+10FFFF */ - if (b[0] || (uchar) b[1] > 0x10) - { - *error= 1; - return b - b0; - } - } - return length; -} - - -static -void my_fill_utf32(CHARSET_INFO *cs, - char *s, size_t slen, int fill) -{ - char buf[10]; - uint buflen; - char *e= s + slen; - - DBUG_ASSERT((slen % 4) == 0); - - buflen= cs->cset->wc_mb(cs, (my_wc_t) fill, (uchar*) buf, - (uchar*) buf + sizeof(buf)); - DBUG_ASSERT(buflen == 4); - while (s < e) - { - memcpy(s, buf, 4); - s+= 4; - } -} - - -static size_t -my_lengthsp_utf32(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr, size_t length) -{ - const char *end= ptr + length; - DBUG_ASSERT((length % 4) == 0); - while (end > ptr + 3 && end[-1] == ' ' && !end[-2] && !end[-3] && !end[-4]) - end-= 4; - return (size_t) (end - ptr); -} - - -static int -my_wildcmp_utf32_ci(CHARSET_INFO *cs, - const char *str, const char *str_end, - const char *wildstr, const char *wildend, - int escape, int w_one, int w_many) -{ - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - return my_wildcmp_unicode(cs, str, str_end, wildstr, wildend, - escape, w_one, w_many, uni_plane); -} - - -static int -my_wildcmp_utf32_bin(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - return my_wildcmp_unicode(cs, str, str_end, wildstr, wildend, - escape, w_one, w_many, NULL); -} - - -static int -my_strnncoll_utf32_bin(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - my_wc_t s_wc, t_wc; - const uchar *se= s + slen; - const uchar *te= t + tlen; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - while (s < se && t < te) - { - int s_res= my_utf32_uni(cs, &s_wc, s, se); - int t_res= my_utf32_uni(cs, &t_wc, t, te); - - if (s_res <= 0 || t_res <= 0) - { - /* Incorrect string, compare by char value */ - return my_bincmp(s, se, t, te); - } - if (s_wc != t_wc) - { - return s_wc > t_wc ? 1 : -1; - } - - s+= s_res; - t+= t_res; - } - return (int) (t_is_prefix ? (t-te) : ((se - s) - (te - t))); -} - - -static inline my_wc_t -my_utf32_get(const uchar *s) -{ - return - ((my_wc_t) s[0] << 24) + - ((my_wc_t) s[1] << 16) + - ((my_wc_t) s[2] << 8) + - s[3]; -} - - -static int -my_strnncollsp_utf32_bin(CHARSET_INFO *cs __attribute__((unused)), - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference - __attribute__((unused))) -{ - const uchar *se, *te; - size_t minlen; - - DBUG_ASSERT((slen % 4) == 0); - DBUG_ASSERT((tlen % 4) == 0); - - se= s + slen; - te= t + tlen; - - for (minlen= min(slen, tlen); minlen; minlen-= 4) - { - my_wc_t s_wc= my_utf32_get(s); - my_wc_t t_wc= my_utf32_get(t); - if (s_wc != t_wc) - return s_wc > t_wc ? 1 : -1; - - s+= 4; - t+= 4; - } - - if (slen != tlen) - { - int swap= 1; - if (slen < tlen) - { - s= t; - se= te; - swap= -1; - } - - for ( ; s < se ; s+= 4) - { - my_wc_t s_wc= my_utf32_get(s); - if (s_wc != ' ') - return (s_wc < ' ') ? -swap : swap; - } - } - return 0; -} - - -/** - Calculate min_str and max_str that ranges a LIKE string. - - @param ptr Pointer to LIKE pattern. - @param ptr_length Length of LIKE pattern. - @param escape Escape character in LIKE. (Normally '\'). - All escape characters should be removed - from min_str and max_str. - @param res_length Length of min_str and max_str. - @param min_str Smallest case sensitive string that ranges LIKE. - Should be space padded to res_length. - @param max_str Largest case sensitive string that ranges LIKE. - Normally padded with the biggest character sort value. - - @return Optimization status. - @retval FALSE if LIKE pattern can be optimized - @rerval TRUE if LIKE can't be optimized. -*/ - -my_bool -my_like_range_utf32(CHARSET_INFO *cs, - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str,char *max_str, - size_t *min_length,size_t *max_length) -{ - const char *end= ptr + ptr_length; - char *min_org= min_str; - char *min_end= min_str + res_length; - char *max_end= max_str + res_length; - size_t charlen= res_length / cs->mbmaxlen; - - DBUG_ASSERT((res_length % 4) == 0); - - for ( ; charlen > 0; ptr+= 4, charlen--) - { - my_wc_t wc; - int res; - if ((res= my_utf32_uni(cs, &wc, ptr, end)) < 0) - { - my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char); - my_fill_utf32(cs, max_str, min_end - min_str, cs->max_sort_char); - /* min_length and max_legnth are not important */ - return TRUE; - } - - if (wc == (my_wc_t) escape) - { - ptr+= 4; /* Skip escape */ - if ((res= my_utf32_uni(cs, &wc, ptr, end)) < 0) - { - my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char); - my_fill_utf32(cs, max_str, max_end - min_str, cs->max_sort_char); - /* min_length and max_length are not important */ - return TRUE; - } - if (my_uni_utf32(cs, wc, min_str, min_end) != 4 || - my_uni_utf32(cs, wc, max_str, max_end) != 4) - goto pad_set_lengths; - *min_str++= 4; - *max_str++= 4; - continue; - } - - if (wc == (my_wc_t) w_one) - { - if (my_uni_utf32(cs, cs->min_sort_char, min_str, min_end) != 4 || - my_uni_utf32(cs, cs->max_sort_char, max_str, max_end) != 4) - goto pad_set_lengths; - min_str+= 4; - max_str+= 4; - continue; - } - - if (wc == (my_wc_t) w_many) - { - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? - (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - goto pad_min_max; - } - - /* Normal character */ - if (my_uni_utf32(cs, wc, min_str, min_end) != 4 || - my_uni_utf32(cs, wc, max_str, max_end) != 4) - goto pad_set_lengths; - min_str+= 4; - max_str+= 4; - } - -pad_set_lengths: - *min_length= *max_length= (size_t) (min_str - min_org); - -pad_min_max: - my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char); - my_fill_utf32(cs, max_str, max_end - max_str, cs->max_sort_char); - return FALSE; -} - - -static size_t -my_scan_utf32(CHARSET_INFO *cs, - const char *str, const char *end, int sequence_type) -{ - const char *str0= str; - - switch (sequence_type) - { - case MY_SEQ_SPACES: - for ( ; str < end; ) - { - my_wc_t wc; - int res= my_utf32_uni(cs, &wc, str, end); - if (res < 0 || wc != ' ') - break; - str+= res; - } - return (size_t) (str - str0); - default: - return 0; - } -} - - -static MY_COLLATION_HANDLER my_collation_utf32_general_ci_handler = -{ - NULL, /* init */ - my_strnncoll_utf32, - my_strnncollsp_utf32, - my_strnxfrm_unicode, - my_strnxfrmlen_utf32, - my_like_range_utf32, - my_wildcmp_utf32_ci, - my_strcasecmp_mb2_or_mb4, - my_instr_mb, - my_hash_sort_utf32, - my_propagate_simple -}; - - -static MY_COLLATION_HANDLER my_collation_utf32_bin_handler = -{ - NULL, /* init */ - my_strnncoll_utf32_bin, - my_strnncollsp_utf32_bin, - my_strnxfrm_unicode, - my_strnxfrmlen_utf32, - my_like_range_utf32, - my_wildcmp_utf32_bin, - my_strcasecmp_mb2_or_mb4, - my_instr_mb, - my_hash_sort_utf32, - my_propagate_simple -}; - - -MY_CHARSET_HANDLER my_charset_utf32_handler= -{ - NULL, /* init */ - my_ismbchar_utf32, - my_mbcharlen_utf32, - my_numchars_utf32, - my_charpos_utf32, - my_well_formed_len_utf32, - my_lengthsp_utf32, - my_numcells_mb, - my_utf32_uni, - my_uni_utf32, - my_mb_ctype_mb, - my_caseup_str_mb2_or_mb4, - my_casedn_str_mb2_or_mb4, - my_caseup_utf32, - my_casedn_utf32, - my_snprintf_utf32, - my_l10tostr_mb2_or_mb4, - my_ll10tostr_mb2_or_mb4, - my_fill_utf32, - my_strntol_mb2_or_mb4, - my_strntoul_mb2_or_mb4, - my_strntoll_mb2_or_mb4, - my_strntoull_mb2_or_mb4, - my_strntod_mb2_or_mb4, - my_strtoll10_utf32, - my_strntoull10rnd_mb2_or_mb4, - my_scan_utf32 -}; - - -CHARSET_INFO my_charset_utf32_general_ci= -{ - 60,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* cs name */ - "utf32_general_ci", /* name */ - "UTF-32 Unicode", /* comment */ - NULL, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_general_ci_handler -}; - - -CHARSET_INFO my_charset_utf32_bin= -{ - 61,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_NONASCII, - "utf32", /* cs name */ - "utf32_bin", /* name */ - "UTF-32 Unicode", /* comment */ - NULL, /* tailoring */ - NULL, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 4, /* mbminlen */ - 4, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf32_handler, - &my_collation_utf32_bin_handler -}; - - -#endif /* HAVE_CHARSET_utf32 */ - - -#ifdef HAVE_CHARSET_ucs2 - -static uchar ctype_ucs2[] = { - 0, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16, - 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, - 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 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 uchar to_lower_ucs2[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95, - 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - -static uchar to_upper_ucs2[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - - -static int my_ucs2_uni(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t * pwc, const uchar *s, const uchar *e) -{ - if (s+2 > e) /* Need 2 characters */ - return MY_CS_TOOSMALL2; - - *pwc= ((uchar)s[0]) * 256 + ((uchar)s[1]); - return 2; -} - -static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) , - my_wc_t wc, uchar *r, uchar *e) -{ - if ( r+2 > e ) - return MY_CS_TOOSMALL2; - - r[0]= (uchar) (wc >> 8); - r[1]= (uchar) (wc & 0xFF); - return 2; -} - - -static size_t my_caseup_ucs2(CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - my_wc_t wc; - int res; - char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src == dst && srclen == dstlen); - - while ((src < srcend) && - (res= my_ucs2_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0) - { - int plane= (wc>>8) & 0xFF; - wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].toupper : wc; - if (res != my_uni_ucs2(cs, wc, (uchar*) src, (uchar*) srcend)) - break; - src+= res; - } - return srclen; -} - - -static void my_hash_sort_ucs2(CHARSET_INFO *cs, const uchar *s, size_t slen, - ulong *n1, ulong *n2) -{ - my_wc_t wc; - int res; - const uchar *e=s+slen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - - while (e > s+1 && e[-1] == ' ' && e[-2] == '\0') - e-= 2; - - while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) - { - int plane = (wc>>8) & 0xFF; - wc = uni_plane[plane] ? uni_plane[plane][wc & 0xFF].sort : wc; - n1[0]^= (((n1[0] & 63)+n2[0])*(wc & 0xFF))+ (n1[0] << 8); - n2[0]+=3; - n1[0]^= (((n1[0] & 63)+n2[0])*(wc >> 8))+ (n1[0] << 8); - n2[0]+=3; - s+=res; - } -} - - -static size_t my_casedn_ucs2(CHARSET_INFO *cs, char *src, size_t srclen, - char *dst __attribute__((unused)), - size_t dstlen __attribute__((unused))) -{ - my_wc_t wc; - int res; - char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src == dst && srclen == dstlen); - - while ((src < srcend) && - (res= my_ucs2_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0) - { - int plane= (wc>>8) & 0xFF; - wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].tolower : wc; - if (res != my_uni_ucs2(cs, wc, (uchar*) src, (uchar*) srcend)) - break; - src+= res; - } - return srclen; -} - - -static int my_strnncoll_ucs2(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - int s_res,t_res; - my_wc_t s_wc,t_wc; - const uchar *se=s+slen; - const uchar *te=t+tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - LINT_INIT(s_wc); - - while ( s < se && t < te ) - { - int plane; - s_res=my_ucs2_uni(cs,&s_wc, s, se); - t_res=my_ucs2_uni(cs,&t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0 ) - { - /* Incorrect string, compare by char value */ - return ((int)s[0]-(int)t[0]); - } - - plane=(s_wc>>8) & 0xFF; - s_wc = uni_plane[plane] ? uni_plane[plane][s_wc & 0xFF].sort : s_wc; - plane=(t_wc>>8) & 0xFF; - t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc; - if ( s_wc != t_wc ) - { - return s_wc > t_wc ? 1 : -1; - } - - s+=s_res; - t+=t_res; - } - return (int) (t_is_prefix ? t-te : ((se-s) - (te-t))); -} - - -/** - Compare strings, discarding end space - - If one string is shorter as the other, then we space extend the other - so that the strings have equal length. - - This will ensure that the following things hold: - - "a" == "a " - "a\0" < "a" - "a\0" < "a " - - @param cs Character set pinter. - @param a First string to compare. - @param a_length Length of 'a'. - @param b Second string to compare. - @param b_length Length of 'b'. - - IMPLEMENTATION - - @return Comparison result. - @retval Negative number, if a less than b. - @retval 0, if a is equal to b - @retval Positive number, if a > b -*/ - -static int my_strnncollsp_ucs2(CHARSET_INFO *cs __attribute__((unused)), - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference - __attribute__((unused))) -{ - const uchar *se, *te; - size_t minlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - - /* extra safety to make sure the lengths are even numbers */ - slen&= ~1; - tlen&= ~1; - - se= s + slen; - te= t + tlen; - - for (minlen= min(slen, tlen); minlen; minlen-= 2) - { - int s_wc = uni_plane[s[0]] ? (int) uni_plane[s[0]][s[1]].sort : - (((int) s[0]) << 8) + (int) s[1]; - - int t_wc = uni_plane[t[0]] ? (int) uni_plane[t[0]][t[1]].sort : - (((int) t[0]) << 8) + (int) t[1]; - if ( s_wc != t_wc ) - return s_wc > t_wc ? 1 : -1; - - s+= 2; - t+= 2; - } - - if (slen != tlen) - { - int swap= 1; - if (slen < tlen) - { - s= t; - se= te; - swap= -1; - } - - for ( ; s < se ; s+= 2) - { - if (s[0] || s[1] != ' ') - return (s[0] == 0 && s[1] < ' ') ? -swap : swap; - } - } - return 0; -} - - -static uint my_ismbchar_ucs2(CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused))) -{ - return 2; -} - - -static uint my_mbcharlen_ucs2(CHARSET_INFO *cs __attribute__((unused)) , - uint c __attribute__((unused))) -{ - return 2; -} - - -static -size_t my_numchars_ucs2(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e) -{ - return (size_t) (e-b)/2; -} - - -static -size_t my_charpos_ucs2(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, size_t pos) -{ - size_t string_length= (size_t) (e - b); - return pos > string_length ? string_length + 2 : pos * 2; -} - - -static -size_t my_well_formed_len_ucs2(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, - size_t nchars, int *error) -{ - /* Ensure string length is dividable with 2 */ - size_t nbytes= ((size_t) (e-b)) & ~(size_t) 1; - *error= 0; - nchars*= 2; - return min(nbytes, nchars); -} - - -static -int my_wildcmp_ucs2_ci(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - return my_wildcmp_unicode(cs,str,str_end,wildstr,wildend, - escape,w_one,w_many,uni_plane); -} - - -static -int my_wildcmp_ucs2_bin(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - return my_wildcmp_unicode(cs,str,str_end,wildstr,wildend, - escape,w_one,w_many,NULL); -} - - -static -int my_strnncoll_ucs2_bin(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - int s_res,t_res; - my_wc_t s_wc,t_wc; - const uchar *se=s+slen; - const uchar *te=t+tlen; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - while ( s < se && t < te ) - { - s_res=my_ucs2_uni(cs,&s_wc, s, se); - t_res=my_ucs2_uni(cs,&t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0 ) - { - /* Incorrect string, compare by char value */ - return ((int)s[0]-(int)t[0]); - } - if ( s_wc != t_wc ) - { - return s_wc > t_wc ? 1 : -1; - } - - s+=s_res; - t+=t_res; - } - return (int) (t_is_prefix ? t-te : ((se-s) - (te-t))); -} - -static int my_strnncollsp_ucs2_bin(CHARSET_INFO *cs __attribute__((unused)), - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference - __attribute__((unused))) -{ - const uchar *se, *te; - size_t minlen; - - /* extra safety to make sure the lengths are even numbers */ - slen= (slen >> 1) << 1; - tlen= (tlen >> 1) << 1; - - se= s + slen; - te= t + tlen; - - for (minlen= min(slen, tlen); minlen; minlen-= 2) - { - int s_wc= s[0] * 256 + s[1]; - int t_wc= t[0] * 256 + t[1]; - if ( s_wc != t_wc ) - return s_wc > t_wc ? 1 : -1; - - s+= 2; - t+= 2; - } - - if (slen != tlen) - { - int swap= 1; - if (slen < tlen) - { - s= t; - se= te; - swap= -1; - } - - for ( ; s < se ; s+= 2) - { - if (s[0] || s[1] != ' ') - return (s[0] == 0 && s[1] < ' ') ? -swap : swap; - } - } - return 0; -} - - -static -void my_hash_sort_ucs2_bin(CHARSET_INFO *cs __attribute__((unused)), - const uchar *key, size_t len,ulong *nr1, ulong *nr2) -{ - const uchar *pos = key; - - key+= len; - - while (key > pos+1 && key[-1] == ' ' && key[-2] == '\0') - key-= 2; - - for (; pos < (uchar*) key ; pos++) - { - nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); - nr2[0]+=3; - } -} - - -/** - Calculate min_str and max_str that ranges a LIKE string. - - @param ptr Pointer to LIKE pattern. - @param ptr_length Length of LIKE pattern. - @param escape Escape character in LIKE. (Normally '\'). - All escape characters should be removed - from min_str and max_str. - @param res_length Length of min_str and max_str. - @param min_str Smallest case sensitive string that ranges LIKE. - Should be space padded to res_length. - @param max_str Largest case sensitive string that ranges LIKE. - Normally padded with the biggest character sort value. - - @return Optimization status. - @retval FALSE if LIKE pattern can be optimized - @rerval TRUE if LIKE can't be optimized. -*/ - -my_bool my_like_range_ucs2(CHARSET_INFO *cs, - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str,char *max_str, - size_t *min_length,size_t *max_length) -{ - const char *end=ptr+ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - size_t charlen= res_length / cs->mbmaxlen; - const char *contraction_flags= cs->contractions ? - ((const char*) cs->contractions) + 0x40*0x40 : NULL; - - for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0 - ; ptr+=2, charlen--) - { - if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end) - { - ptr+=2; /* Skip escape */ - *min_str++= *max_str++ = ptr[0]; - *min_str++= *max_str++ = ptr[1]; - continue; - } - if (ptr[0] == '\0' && ptr[1] == w_one) /* '_' in SQL */ - { - *min_str++= (char) (cs->min_sort_char >> 8); - *min_str++= (char) (cs->min_sort_char & 255); - *max_str++= (char) (cs->max_sort_char >> 8); - *max_str++= (char) (cs->max_sort_char & 255); - continue; - } - if (ptr[0] == '\0' && ptr[1] == w_many) /* '%' in SQL */ - { -fill_max_and_min: - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - do { - *min_str++ = 0; - *min_str++ = 0; - *max_str++ = (char) (cs->max_sort_char >> 8); - *max_str++ = (char) (cs->max_sort_char & 255); - } while (min_str + 1 < min_end); - return FALSE; - } - - if (contraction_flags && ptr + 3 < end && - ptr[0] == '\0' && contraction_flags[(uchar) ptr[1]]) - { - /* Contraction head found */ - if (ptr[2] == '\0' && (ptr[3] == w_one || ptr[3] == w_many)) - { - /* Contraction head followed by a wildcard, quit */ - goto fill_max_and_min; - } - - /* - Check if the second letter can be contraction part, - and if two letters really produce a contraction. - */ - if (ptr[2] == '\0' && contraction_flags[(uchar) ptr[3]] && - cs->contractions[(ptr[1]-0x40)*0x40 + ptr[3] - 0x40]) - { - /* Contraction found */ - if (charlen == 1 || min_str + 2 >= min_end) - { - /* Full contraction doesn't fit, quit */ - goto fill_max_and_min; - } - - /* Put contraction head */ - *min_str++= *max_str++= *ptr++; - *min_str++= *max_str++= *ptr++; - charlen--; - } - } - /* Put contraction tail, or a single character */ - *min_str++= *max_str++ = ptr[0]; - *min_str++= *max_str++ = ptr[1]; - } - - /* Temporary fix for handling w_one at end of string (key compression) */ - { - char *tmp; - for (tmp= min_str ; tmp-1 > min_org && tmp[-1] == '\0' && tmp[-2]=='\0';) - { - *--tmp=' '; - *--tmp='\0'; - } - } - - *min_length= *max_length = (size_t) (min_str - min_org); - while (min_str + 1 < min_end) - { - *min_str++ = *max_str++ = '\0'; - *min_str++ = *max_str++ = ' '; /* Because if key compression */ - } - return FALSE; -} - - -static MY_COLLATION_HANDLER my_collation_ucs2_general_ci_handler = -{ - NULL, /* init */ - my_strnncoll_ucs2, - my_strnncollsp_ucs2, - my_strnxfrm_unicode, - my_strnxfrmlen_simple, - my_like_range_ucs2, - my_wildcmp_ucs2_ci, - my_strcasecmp_mb2_or_mb4, - my_instr_mb, - my_hash_sort_ucs2, - my_propagate_simple -}; - - -static MY_COLLATION_HANDLER my_collation_ucs2_bin_handler = -{ - NULL, /* init */ - my_strnncoll_ucs2_bin, - my_strnncollsp_ucs2_bin, - my_strnxfrm_unicode, - my_strnxfrmlen_simple, - my_like_range_ucs2, - my_wildcmp_ucs2_bin, - my_strcasecmp_mb2_or_mb4, - my_instr_mb, - my_hash_sort_ucs2_bin, - my_propagate_simple -}; - - -MY_CHARSET_HANDLER my_charset_ucs2_handler= -{ - NULL, /* init */ - my_ismbchar_ucs2, /* ismbchar */ - my_mbcharlen_ucs2, /* mbcharlen */ - my_numchars_ucs2, - my_charpos_ucs2, - my_well_formed_len_ucs2, - my_lengthsp_mb2, - my_numcells_mb, - my_ucs2_uni, /* mb_wc */ - my_uni_ucs2, /* wc_mb */ - my_mb_ctype_mb, - my_caseup_str_mb2_or_mb4, - my_casedn_str_mb2_or_mb4, - my_caseup_ucs2, - my_casedn_ucs2, - my_snprintf_mb2, - my_l10tostr_mb2_or_mb4, - my_ll10tostr_mb2_or_mb4, - my_fill_mb2, - my_strntol_mb2_or_mb4, - my_strntoul_mb2_or_mb4, - my_strntoll_mb2_or_mb4, - my_strntoull_mb2_or_mb4, - my_strntod_mb2_or_mb4, - my_strtoll10_mb2, - my_strntoull10rnd_mb2_or_mb4, - my_scan_mb2 -}; - - -CHARSET_INFO my_charset_ucs2_general_ci= -{ - 35,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_general_ci", /* name */ - "UCS-2 Unicode", /* comment */ - NULL, /* tailoring */ - ctype_ucs2, /* ctype */ - to_lower_ucs2, /* to_lower */ - to_upper_ucs2, /* to_upper */ - to_upper_ucs2, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_general_ci_handler -}; - -CHARSET_INFO my_charset_ucs2_bin= -{ - 90,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_NONASCII, - "ucs2", /* cs name */ - "ucs2_bin", /* name */ - "UCS-2 Unicode", /* comment */ - NULL, /* tailoring */ - ctype_ucs2, /* ctype */ - to_lower_ucs2, /* to_lower */ - to_upper_ucs2, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 2, /* mbminlen */ - 2, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_ucs2_handler, - &my_collation_ucs2_bin_handler -}; - - -#endif /* HAVE_CHARSET_ucs2 */ diff --git a/externals/mysql/strings/ctype-ujis.c b/externals/mysql/strings/ctype-ujis.c deleted file mode 100644 index bdcc3f8004..0000000000 --- a/externals/mysql/strings/ctype-ujis.c +++ /dev/null @@ -1,8616 +0,0 @@ -/* Copyright (C) 2002 MySQL AB & tommy@valley.ne.jp. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* This file is for Japanese EUC charset, and created by tommy@valley.ne.jp. - */ - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. mbmaxlen_ujis=3 - */ - -#include -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_ujis - - -static uchar NEAR ctype_ujis[257] = -{ - 0, /* For standard library */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ - 0040, 0050, 0050, 0050, 0050, 0050, 0040, 0040, /* ^H - ^O */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^P - ^W */ - 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* ^X - ^Z ^[ ^\ ^] ^^ ^_ */ - 0110, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* SPC ! " # $ % ^ ' */ - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, /* ( ) * + , - . / */ - 0204, 0204, 0204, 0204, 0204, 0204, 0204, 0204, /* 0 1 2 3 4 5 6 7 */ - 0204, 0204, 0020, 0020, 0020, 0020, 0020, 0020, /* 8 9 : ; < = > ? */ - 0020, 0201, 0201, 0201, 0201, 0201, 0201, 0001, /* @ A B C D E F G */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* H I J K L M N O */ - 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, /* P Q R S T U V W */ - 0001, 0001, 0001, 0020, 0020, 0020, 0020, 0020, /* X Y Z [ \ ] ^ _ */ - 0020, 0202, 0202, 0202, 0202, 0202, 0202, 0002, /* ` a b c d e f g */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* h i j k l m n o */ - 0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002, /* p q r s t u v w */ - 0002, 0002, 0002, 0020, 0020, 0020, 0020, 0040, /* x y z { | } + DEL */ - 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, - 0000, 0000, 0000, 0000, 0000, 0000, 0020, 0020, - 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, - 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, - 0000, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, - 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000, -}; - -static uchar NEAR to_lower_ujis[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '[', '\\', ']', '^', '_', - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -static uchar NEAR to_upper_ujis[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' -}; - -static uchar NEAR sort_order_ujis[]= -{ - '\000','\001','\002','\003','\004','\005','\006','\007', - '\010','\011','\012','\013','\014','\015','\016','\017', - '\020','\021','\022','\023','\024','\025','\026','\027', - '\030','\031','\032','\033','\034','\035','\036','\037', - ' ', '!', '"', '#', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', ':', ';', '<', '=', '>', '?', - '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '{', '|', '}', '~', '\177', - (uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207', - (uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217', - (uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227', - (uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237', - (uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247', - (uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257', - (uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267', - (uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277', - (uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307', - (uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317', - (uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327', - (uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337', - (uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347', - (uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357', - (uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367', - (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375', (uchar) (uchar) '\376', (uchar) '\377' -}; - - -#define isujis(c) ((0xa1<=((c)&0xff) && ((c)&0xff)<=0xfe)) -#define iskata(c) ((0xa1<=((c)&0xff) && ((c)&0xff)<=0xdf)) -#define isujis_ss2(c) (((c)&0xff) == 0x8e) -#define isujis_ss3(c) (((c)&0xff) == 0x8f) - - -static uint ismbchar_ujis(CHARSET_INFO *cs __attribute__((unused)), - const char* p, const char *e) -{ - return ((*(uchar*)(p)<0x80)? 0:\ - isujis(*(p)) && (e)-(p)>1 && isujis(*((p)+1))? 2:\ - isujis_ss2(*(p)) && (e)-(p)>1 && iskata(*((p)+1))? 2:\ - isujis_ss3(*(p)) && (e)-(p)>2 && isujis(*((p)+1)) && isujis(*((p)+2))? 3:\ - 0); -} - -static uint mbcharlen_ujis(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return (isujis(c)? 2: isujis_ss2(c)? 2: isujis_ss3(c)? 3: 1); -} - - -static uint16 tab_jisx0201_uni[256]={ - 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x00A5,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x203E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0xFF61,0xFF62,0xFF63,0xFF64,0xFF65,0xFF66,0xFF67, -0xFF68,0xFF69,0xFF6A,0xFF6B,0xFF6C,0xFF6D,0xFF6E,0xFF6F, -0xFF70,0xFF71,0xFF72,0xFF73,0xFF74,0xFF75,0xFF76,0xFF77, -0xFF78,0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F, -0xFF80,0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87, -0xFF88,0xFF89,0xFF8A,0xFF8B,0xFF8C,0xFF8D,0xFF8E,0xFF8F, -0xFF90,0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97, -0xFF98,0xFF99,0xFF9A,0xFF9B,0xFF9C,0xFF9D,0xFF9E,0xFF9F, - 0, 0, 0, 0, 0, 0, 0, 0, - 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 int -my_mb_wc_jisx0201(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *wc,const uchar *s, - const uchar *e __attribute__((unused))) -{ - wc[0]=tab_jisx0201_uni[*s]; - return (!wc[0] && s[0]) ? -1 : 1; -} - - -static int -my_wc_mb_jisx0201(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, - uchar *e __attribute__((unused))) -{ - - if ((int) wc <= 0x7D) - { - *s = (uchar) wc; - return (wc == 0x5C) ? MY_CS_ILUNI : 1; - } - - if (wc >= 0xFF61 && wc <= 0xFF9F) - { - *s = (uchar) (wc - 0xFEC0); - return 1; - } - - return MY_CS_ILUNI; -} - - -/* page 0 0x2121-0x217E */ -static uint16 tab_jisx0208_uni0[]={ -0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B, -0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E, -0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD, -0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C, -0x301C,0x2016,0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C, -0x201D,0xFF08,0xFF09,0x3014,0x3015,0xFF3B,0xFF3D,0xFF5B, -0xFF5D,0x3008,0x3009,0x300A,0x300B,0x300C,0x300D,0x300E, -0x300F,0x3010,0x3011,0xFF0B,0x2212,0x00B1,0x00D7,0x00F7, -0xFF1D,0x2260,0xFF1C,0xFF1E,0x2266,0x2267,0x221E,0x2234, -0x2642,0x2640,0x00B0,0x2032,0x2033,0x2103,0xFFE5,0xFF04, -0x00A2,0x00A3,0xFF05,0xFF03,0xFF06,0xFF0A,0xFF20,0x00A7, -0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7}; - -/* page 1 0x2221-0x227E */ -static uint16 tab_jisx0208_uni1[]={ -0x25C6,0x25A1,0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x203B, -0x3012,0x2192,0x2190,0x2191,0x2193,0x3013, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x2208,0x220B,0x2286,0x2287,0x2282,0x2283,0x222A, -0x2229, 0, 0, 0, 0, 0, 0, 0, - 0,0x2227,0x2228,0x00AC,0x21D2,0x21D4,0x2200,0x2203, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x2220,0x22A5,0x2312,0x2202,0x2207, -0x2261,0x2252,0x226A,0x226B,0x221A,0x223D,0x221D,0x2235, -0x222B,0x222C, 0, 0, 0, 0, 0, 0, - 0,0x212B,0x2030,0x266F,0x266D,0x266A,0x2020,0x2021, -0x00B6, 0, 0, 0, 0,0x25EF}; - -/* page 2 0x2330-0x237A */ -static uint16 tab_jisx0208_uni2[]={ -0xFF10,0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17, -0xFF18,0xFF19, 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,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}; - -/* page 3 0x2421-0x2473 */ -static uint16 tab_jisx0208_uni3[]={ -0x3041,0x3042,0x3043,0x3044,0x3045,0x3046,0x3047,0x3048, -0x3049,0x304A,0x304B,0x304C,0x304D,0x304E,0x304F,0x3050, -0x3051,0x3052,0x3053,0x3054,0x3055,0x3056,0x3057,0x3058, -0x3059,0x305A,0x305B,0x305C,0x305D,0x305E,0x305F,0x3060, -0x3061,0x3062,0x3063,0x3064,0x3065,0x3066,0x3067,0x3068, -0x3069,0x306A,0x306B,0x306C,0x306D,0x306E,0x306F,0x3070, -0x3071,0x3072,0x3073,0x3074,0x3075,0x3076,0x3077,0x3078, -0x3079,0x307A,0x307B,0x307C,0x307D,0x307E,0x307F,0x3080, -0x3081,0x3082,0x3083,0x3084,0x3085,0x3086,0x3087,0x3088, -0x3089,0x308A,0x308B,0x308C,0x308D,0x308E,0x308F,0x3090, -0x3091,0x3092,0x3093}; - -/* page 4 0x2521-0x2576 */ -static uint16 tab_jisx0208_uni4[]={ -0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8, -0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0, -0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8, -0x30B9,0x30BA,0x30BB,0x30BC,0x30BD,0x30BE,0x30BF,0x30C0, -0x30C1,0x30C2,0x30C3,0x30C4,0x30C5,0x30C6,0x30C7,0x30C8, -0x30C9,0x30CA,0x30CB,0x30CC,0x30CD,0x30CE,0x30CF,0x30D0, -0x30D1,0x30D2,0x30D3,0x30D4,0x30D5,0x30D6,0x30D7,0x30D8, -0x30D9,0x30DA,0x30DB,0x30DC,0x30DD,0x30DE,0x30DF,0x30E0, -0x30E1,0x30E2,0x30E3,0x30E4,0x30E5,0x30E6,0x30E7,0x30E8, -0x30E9,0x30EA,0x30EB,0x30EC,0x30ED,0x30EE,0x30EF,0x30F0, -0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6}; - -/* page 5 0x2621-0x2658 */ -static uint16 tab_jisx0208_uni5[]={ -0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398, -0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0, -0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, - 0, 0, 0, 0, 0, 0, 0, 0, -0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8, -0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, -0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9 -}; - -/* page 6 0x2721-0x2771 */ -static uint16 tab_jisx0208_uni6[]={ -0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416, -0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, -0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, -0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, -0x042F, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0451,0x0436, -0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, -0x043F,0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446, -0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, -0x044F}; - -/* page 7 0x2821-0x2840 */ -static uint16 tab_jisx0208_uni7[]={ -0x2500,0x2502,0x250C,0x2510,0x2518,0x2514,0x251C,0x252C, -0x2524,0x2534,0x253C,0x2501,0x2503,0x250F,0x2513,0x251B, -0x2517,0x2523,0x2533,0x252B,0x253B,0x254B,0x2520,0x252F, -0x2528,0x2537,0x253F,0x251D,0x2530,0x2525,0x2538,0x2542 -}; - -/* page 8 0x3021-0x307E */ -static uint16 tab_jisx0208_uni8[]={ -0x4E9C,0x5516,0x5A03,0x963F,0x54C0,0x611B,0x6328,0x59F6, -0x9022,0x8475,0x831C,0x7A50,0x60AA,0x63E1,0x6E25,0x65ED, -0x8466,0x82A6,0x9BF5,0x6893,0x5727,0x65A1,0x6271,0x5B9B, -0x59D0,0x867B,0x98F4,0x7D62,0x7DBE,0x9B8E,0x6216,0x7C9F, -0x88B7,0x5B89,0x5EB5,0x6309,0x6697,0x6848,0x95C7,0x978D, -0x674F,0x4EE5,0x4F0A,0x4F4D,0x4F9D,0x5049,0x56F2,0x5937, -0x59D4,0x5A01,0x5C09,0x60DF,0x610F,0x6170,0x6613,0x6905, -0x70BA,0x754F,0x7570,0x79FB,0x7DAD,0x7DEF,0x80C3,0x840E, -0x8863,0x8B02,0x9055,0x907A,0x533B,0x4E95,0x4EA5,0x57DF, -0x80B2,0x90C1,0x78EF,0x4E00,0x58F1,0x6EA2,0x9038,0x7A32, -0x8328,0x828B,0x9C2F,0x5141,0x5370,0x54BD,0x54E1,0x56E0, -0x59FB,0x5F15,0x98F2,0x6DEB,0x80E4,0x852D}; - -/* page 9 0x3121-0x317E */ -static uint16 tab_jisx0208_uni9[]={ -0x9662,0x9670,0x96A0,0x97FB,0x540B,0x53F3,0x5B87,0x70CF, -0x7FBD,0x8FC2,0x96E8,0x536F,0x9D5C,0x7ABA,0x4E11,0x7893, -0x81FC,0x6E26,0x5618,0x5504,0x6B1D,0x851A,0x9C3B,0x59E5, -0x53A9,0x6D66,0x74DC,0x958F,0x5642,0x4E91,0x904B,0x96F2, -0x834F,0x990C,0x53E1,0x55B6,0x5B30,0x5F71,0x6620,0x66F3, -0x6804,0x6C38,0x6CF3,0x6D29,0x745B,0x76C8,0x7A4E,0x9834, -0x82F1,0x885B,0x8A60,0x92ED,0x6DB2,0x75AB,0x76CA,0x99C5, -0x60A6,0x8B01,0x8D8A,0x95B2,0x698E,0x53AD,0x5186,0x5712, -0x5830,0x5944,0x5BB4,0x5EF6,0x6028,0x63A9,0x63F4,0x6CBF, -0x6F14,0x708E,0x7114,0x7159,0x71D5,0x733F,0x7E01,0x8276, -0x82D1,0x8597,0x9060,0x925B,0x9D1B,0x5869,0x65BC,0x6C5A, -0x7525,0x51F9,0x592E,0x5965,0x5F80,0x5FDC}; - -/* page 10 0x3221-0x327E */ -static uint16 tab_jisx0208_uni10[]={ -0x62BC,0x65FA,0x6A2A,0x6B27,0x6BB4,0x738B,0x7FC1,0x8956, -0x9D2C,0x9D0E,0x9EC4,0x5CA1,0x6C96,0x837B,0x5104,0x5C4B, -0x61B6,0x81C6,0x6876,0x7261,0x4E59,0x4FFA,0x5378,0x6069, -0x6E29,0x7A4F,0x97F3,0x4E0B,0x5316,0x4EEE,0x4F55,0x4F3D, -0x4FA1,0x4F73,0x52A0,0x53EF,0x5609,0x590F,0x5AC1,0x5BB6, -0x5BE1,0x79D1,0x6687,0x679C,0x67B6,0x6B4C,0x6CB3,0x706B, -0x73C2,0x798D,0x79BE,0x7A3C,0x7B87,0x82B1,0x82DB,0x8304, -0x8377,0x83EF,0x83D3,0x8766,0x8AB2,0x5629,0x8CA8,0x8FE6, -0x904E,0x971E,0x868A,0x4FC4,0x5CE8,0x6211,0x7259,0x753B, -0x81E5,0x82BD,0x86FE,0x8CC0,0x96C5,0x9913,0x99D5,0x4ECB, -0x4F1A,0x89E3,0x56DE,0x584A,0x58CA,0x5EFB,0x5FEB,0x602A, -0x6094,0x6062,0x61D0,0x6212,0x62D0,0x6539}; - -/* page 11 0x3321-0x337E */ -static uint16 tab_jisx0208_uni11[]={ -0x9B41,0x6666,0x68B0,0x6D77,0x7070,0x754C,0x7686,0x7D75, -0x82A5,0x87F9,0x958B,0x968E,0x8C9D,0x51F1,0x52BE,0x5916, -0x54B3,0x5BB3,0x5D16,0x6168,0x6982,0x6DAF,0x788D,0x84CB, -0x8857,0x8A72,0x93A7,0x9AB8,0x6D6C,0x99A8,0x86D9,0x57A3, -0x67FF,0x86CE,0x920E,0x5283,0x5687,0x5404,0x5ED3,0x62E1, -0x64B9,0x683C,0x6838,0x6BBB,0x7372,0x78BA,0x7A6B,0x899A, -0x89D2,0x8D6B,0x8F03,0x90ED,0x95A3,0x9694,0x9769,0x5B66, -0x5CB3,0x697D,0x984D,0x984E,0x639B,0x7B20,0x6A2B,0x6A7F, -0x68B6,0x9C0D,0x6F5F,0x5272,0x559D,0x6070,0x62EC,0x6D3B, -0x6E07,0x6ED1,0x845B,0x8910,0x8F44,0x4E14,0x9C39,0x53F6, -0x691B,0x6A3A,0x9784,0x682A,0x515C,0x7AC3,0x84B2,0x91DC, -0x938C,0x565B,0x9D28,0x6822,0x8305,0x8431}; - -/* page 12 0x3421-0x347E */ -static uint16 tab_jisx0208_uni12[]={ -0x7CA5,0x5208,0x82C5,0x74E6,0x4E7E,0x4F83,0x51A0,0x5BD2, -0x520A,0x52D8,0x52E7,0x5DFB,0x559A,0x582A,0x59E6,0x5B8C, -0x5B98,0x5BDB,0x5E72,0x5E79,0x60A3,0x611F,0x6163,0x61BE, -0x63DB,0x6562,0x67D1,0x6853,0x68FA,0x6B3E,0x6B53,0x6C57, -0x6F22,0x6F97,0x6F45,0x74B0,0x7518,0x76E3,0x770B,0x7AFF, -0x7BA1,0x7C21,0x7DE9,0x7F36,0x7FF0,0x809D,0x8266,0x839E, -0x89B3,0x8ACC,0x8CAB,0x9084,0x9451,0x9593,0x9591,0x95A2, -0x9665,0x97D3,0x9928,0x8218,0x4E38,0x542B,0x5CB8,0x5DCC, -0x73A9,0x764C,0x773C,0x5CA9,0x7FEB,0x8D0B,0x96C1,0x9811, -0x9854,0x9858,0x4F01,0x4F0E,0x5371,0x559C,0x5668,0x57FA, -0x5947,0x5B09,0x5BC4,0x5C90,0x5E0C,0x5E7E,0x5FCC,0x63EE, -0x673A,0x65D7,0x65E2,0x671F,0x68CB,0x68C4}; - -/* page 13 0x3521-0x357E */ -static uint16 tab_jisx0208_uni13[]={ -0x6A5F,0x5E30,0x6BC5,0x6C17,0x6C7D,0x757F,0x7948,0x5B63, -0x7A00,0x7D00,0x5FBD,0x898F,0x8A18,0x8CB4,0x8D77,0x8ECC, -0x8F1D,0x98E2,0x9A0E,0x9B3C,0x4E80,0x507D,0x5100,0x5993, -0x5B9C,0x622F,0x6280,0x64EC,0x6B3A,0x72A0,0x7591,0x7947, -0x7FA9,0x87FB,0x8ABC,0x8B70,0x63AC,0x83CA,0x97A0,0x5409, -0x5403,0x55AB,0x6854,0x6A58,0x8A70,0x7827,0x6775,0x9ECD, -0x5374,0x5BA2,0x811A,0x8650,0x9006,0x4E18,0x4E45,0x4EC7, -0x4F11,0x53CA,0x5438,0x5BAE,0x5F13,0x6025,0x6551,0x673D, -0x6C42,0x6C72,0x6CE3,0x7078,0x7403,0x7A76,0x7AAE,0x7B08, -0x7D1A,0x7CFE,0x7D66,0x65E7,0x725B,0x53BB,0x5C45,0x5DE8, -0x62D2,0x62E0,0x6319,0x6E20,0x865A,0x8A31,0x8DDD,0x92F8, -0x6F01,0x79A6,0x9B5A,0x4EA8,0x4EAB,0x4EAC}; - -/* page 14 0x3621-0x367E */ -static uint16 tab_jisx0208_uni14[]={ -0x4F9B,0x4FA0,0x50D1,0x5147,0x7AF6,0x5171,0x51F6,0x5354, -0x5321,0x537F,0x53EB,0x55AC,0x5883,0x5CE1,0x5F37,0x5F4A, -0x602F,0x6050,0x606D,0x631F,0x6559,0x6A4B,0x6CC1,0x72C2, -0x72ED,0x77EF,0x80F8,0x8105,0x8208,0x854E,0x90F7,0x93E1, -0x97FF,0x9957,0x9A5A,0x4EF0,0x51DD,0x5C2D,0x6681,0x696D, -0x5C40,0x66F2,0x6975,0x7389,0x6850,0x7C81,0x50C5,0x52E4, -0x5747,0x5DFE,0x9326,0x65A4,0x6B23,0x6B3D,0x7434,0x7981, -0x79BD,0x7B4B,0x7DCA,0x82B9,0x83CC,0x887F,0x895F,0x8B39, -0x8FD1,0x91D1,0x541F,0x9280,0x4E5D,0x5036,0x53E5,0x533A, -0x72D7,0x7396,0x77E9,0x82E6,0x8EAF,0x99C6,0x99C8,0x99D2, -0x5177,0x611A,0x865E,0x55B0,0x7A7A,0x5076,0x5BD3,0x9047, -0x9685,0x4E32,0x6ADB,0x91E7,0x5C51,0x5C48}; - -/* page 15 0x3721-0x377E */ -static uint16 tab_jisx0208_uni15[]={ -0x6398,0x7A9F,0x6C93,0x9774,0x8F61,0x7AAA,0x718A,0x9688, -0x7C82,0x6817,0x7E70,0x6851,0x936C,0x52F2,0x541B,0x85AB, -0x8A13,0x7FA4,0x8ECD,0x90E1,0x5366,0x8888,0x7941,0x4FC2, -0x50BE,0x5211,0x5144,0x5553,0x572D,0x73EA,0x578B,0x5951, -0x5F62,0x5F84,0x6075,0x6176,0x6167,0x61A9,0x63B2,0x643A, -0x656C,0x666F,0x6842,0x6E13,0x7566,0x7A3D,0x7CFB,0x7D4C, -0x7D99,0x7E4B,0x7F6B,0x830E,0x834A,0x86CD,0x8A08,0x8A63, -0x8B66,0x8EFD,0x981A,0x9D8F,0x82B8,0x8FCE,0x9BE8,0x5287, -0x621F,0x6483,0x6FC0,0x9699,0x6841,0x5091,0x6B20,0x6C7A, -0x6F54,0x7A74,0x7D50,0x8840,0x8A23,0x6708,0x4EF6,0x5039, -0x5026,0x5065,0x517C,0x5238,0x5263,0x55A7,0x570F,0x5805, -0x5ACC,0x5EFA,0x61B2,0x61F8,0x62F3,0x6372}; - -/* page 16 0x3821-0x387E */ -static uint16 tab_jisx0208_uni16[]={ -0x691C,0x6A29,0x727D,0x72AC,0x732E,0x7814,0x786F,0x7D79, -0x770C,0x80A9,0x898B,0x8B19,0x8CE2,0x8ED2,0x9063,0x9375, -0x967A,0x9855,0x9A13,0x9E78,0x5143,0x539F,0x53B3,0x5E7B, -0x5F26,0x6E1B,0x6E90,0x7384,0x73FE,0x7D43,0x8237,0x8A00, -0x8AFA,0x9650,0x4E4E,0x500B,0x53E4,0x547C,0x56FA,0x59D1, -0x5B64,0x5DF1,0x5EAB,0x5F27,0x6238,0x6545,0x67AF,0x6E56, -0x72D0,0x7CCA,0x88B4,0x80A1,0x80E1,0x83F0,0x864E,0x8A87, -0x8DE8,0x9237,0x96C7,0x9867,0x9F13,0x4E94,0x4E92,0x4F0D, -0x5348,0x5449,0x543E,0x5A2F,0x5F8C,0x5FA1,0x609F,0x68A7, -0x6A8E,0x745A,0x7881,0x8A9E,0x8AA4,0x8B77,0x9190,0x4E5E, -0x9BC9,0x4EA4,0x4F7C,0x4FAF,0x5019,0x5016,0x5149,0x516C, -0x529F,0x52B9,0x52FE,0x539A,0x53E3,0x5411}; - -/* page 17 0x3921-0x397E */ -static uint16 tab_jisx0208_uni17[]={ -0x540E,0x5589,0x5751,0x57A2,0x597D,0x5B54,0x5B5D,0x5B8F, -0x5DE5,0x5DE7,0x5DF7,0x5E78,0x5E83,0x5E9A,0x5EB7,0x5F18, -0x6052,0x614C,0x6297,0x62D8,0x63A7,0x653B,0x6602,0x6643, -0x66F4,0x676D,0x6821,0x6897,0x69CB,0x6C5F,0x6D2A,0x6D69, -0x6E2F,0x6E9D,0x7532,0x7687,0x786C,0x7A3F,0x7CE0,0x7D05, -0x7D18,0x7D5E,0x7DB1,0x8015,0x8003,0x80AF,0x80B1,0x8154, -0x818F,0x822A,0x8352,0x884C,0x8861,0x8B1B,0x8CA2,0x8CFC, -0x90CA,0x9175,0x9271,0x783F,0x92FC,0x95A4,0x964D,0x9805, -0x9999,0x9AD8,0x9D3B,0x525B,0x52AB,0x53F7,0x5408,0x58D5, -0x62F7,0x6FE0,0x8C6A,0x8F5F,0x9EB9,0x514B,0x523B,0x544A, -0x56FD,0x7A40,0x9177,0x9D60,0x9ED2,0x7344,0x6F09,0x8170, -0x7511,0x5FFD,0x60DA,0x9AA8,0x72DB,0x8FBC}; - -/* page 18 0x3A21-0x3A7E */ -static uint16 tab_jisx0208_uni18[]={ -0x6B64,0x9803,0x4ECA,0x56F0,0x5764,0x58BE,0x5A5A,0x6068, -0x61C7,0x660F,0x6606,0x6839,0x68B1,0x6DF7,0x75D5,0x7D3A, -0x826E,0x9B42,0x4E9B,0x4F50,0x53C9,0x5506,0x5D6F,0x5DE6, -0x5DEE,0x67FB,0x6C99,0x7473,0x7802,0x8A50,0x9396,0x88DF, -0x5750,0x5EA7,0x632B,0x50B5,0x50AC,0x518D,0x6700,0x54C9, -0x585E,0x59BB,0x5BB0,0x5F69,0x624D,0x63A1,0x683D,0x6B73, -0x6E08,0x707D,0x91C7,0x7280,0x7815,0x7826,0x796D,0x658E, -0x7D30,0x83DC,0x88C1,0x8F09,0x969B,0x5264,0x5728,0x6750, -0x7F6A,0x8CA1,0x51B4,0x5742,0x962A,0x583A,0x698A,0x80B4, -0x54B2,0x5D0E,0x57FC,0x7895,0x9DFA,0x4F5C,0x524A,0x548B, -0x643E,0x6628,0x6714,0x67F5,0x7A84,0x7B56,0x7D22,0x932F, -0x685C,0x9BAD,0x7B39,0x5319,0x518A,0x5237}; - -/* page 19 0x3B21-0x3B7E */ -static uint16 tab_jisx0208_uni19[]={ -0x5BDF,0x62F6,0x64AE,0x64E6,0x672D,0x6BBA,0x85A9,0x96D1, -0x7690,0x9BD6,0x634C,0x9306,0x9BAB,0x76BF,0x6652,0x4E09, -0x5098,0x53C2,0x5C71,0x60E8,0x6492,0x6563,0x685F,0x71E6, -0x73CA,0x7523,0x7B97,0x7E82,0x8695,0x8B83,0x8CDB,0x9178, -0x9910,0x65AC,0x66AB,0x6B8B,0x4ED5,0x4ED4,0x4F3A,0x4F7F, -0x523A,0x53F8,0x53F2,0x55E3,0x56DB,0x58EB,0x59CB,0x59C9, -0x59FF,0x5B50,0x5C4D,0x5E02,0x5E2B,0x5FD7,0x601D,0x6307, -0x652F,0x5B5C,0x65AF,0x65BD,0x65E8,0x679D,0x6B62,0x6B7B, -0x6C0F,0x7345,0x7949,0x79C1,0x7CF8,0x7D19,0x7D2B,0x80A2, -0x8102,0x81F3,0x8996,0x8A5E,0x8A69,0x8A66,0x8A8C,0x8AEE, -0x8CC7,0x8CDC,0x96CC,0x98FC,0x6B6F,0x4E8B,0x4F3C,0x4F8D, -0x5150,0x5B57,0x5BFA,0x6148,0x6301,0x6642}; - -/* page 20 0x3C21-0x3C7E */ -static uint16 tab_jisx0208_uni20[]={ -0x6B21,0x6ECB,0x6CBB,0x723E,0x74BD,0x75D4,0x78C1,0x793A, -0x800C,0x8033,0x81EA,0x8494,0x8F9E,0x6C50,0x9E7F,0x5F0F, -0x8B58,0x9D2B,0x7AFA,0x8EF8,0x5B8D,0x96EB,0x4E03,0x53F1, -0x57F7,0x5931,0x5AC9,0x5BA4,0x6089,0x6E7F,0x6F06,0x75BE, -0x8CEA,0x5B9F,0x8500,0x7BE0,0x5072,0x67F4,0x829D,0x5C61, -0x854A,0x7E1E,0x820E,0x5199,0x5C04,0x6368,0x8D66,0x659C, -0x716E,0x793E,0x7D17,0x8005,0x8B1D,0x8ECA,0x906E,0x86C7, -0x90AA,0x501F,0x52FA,0x5C3A,0x6753,0x707C,0x7235,0x914C, -0x91C8,0x932B,0x82E5,0x5BC2,0x5F31,0x60F9,0x4E3B,0x53D6, -0x5B88,0x624B,0x6731,0x6B8A,0x72E9,0x73E0,0x7A2E,0x816B, -0x8DA3,0x9152,0x9996,0x5112,0x53D7,0x546A,0x5BFF,0x6388, -0x6A39,0x7DAC,0x9700,0x56DA,0x53CE,0x5468}; - -/* page 21 0x3D21-0x3D7E */ -static uint16 tab_jisx0208_uni21[]={ -0x5B97,0x5C31,0x5DDE,0x4FEE,0x6101,0x62FE,0x6D32,0x79C0, -0x79CB,0x7D42,0x7E4D,0x7FD2,0x81ED,0x821F,0x8490,0x8846, -0x8972,0x8B90,0x8E74,0x8F2F,0x9031,0x914B,0x916C,0x96C6, -0x919C,0x4EC0,0x4F4F,0x5145,0x5341,0x5F93,0x620E,0x67D4, -0x6C41,0x6E0B,0x7363,0x7E26,0x91CD,0x9283,0x53D4,0x5919, -0x5BBF,0x6DD1,0x795D,0x7E2E,0x7C9B,0x587E,0x719F,0x51FA, -0x8853,0x8FF0,0x4FCA,0x5CFB,0x6625,0x77AC,0x7AE3,0x821C, -0x99FF,0x51C6,0x5FAA,0x65EC,0x696F,0x6B89,0x6DF3,0x6E96, -0x6F64,0x76FE,0x7D14,0x5DE1,0x9075,0x9187,0x9806,0x51E6, -0x521D,0x6240,0x6691,0x66D9,0x6E1A,0x5EB6,0x7DD2,0x7F72, -0x66F8,0x85AF,0x85F7,0x8AF8,0x52A9,0x53D9,0x5973,0x5E8F, -0x5F90,0x6055,0x92E4,0x9664,0x50B7,0x511F}; - -/* page 22 0x3E21-0x3E7E */ -static uint16 tab_jisx0208_uni22[]={ -0x52DD,0x5320,0x5347,0x53EC,0x54E8,0x5546,0x5531,0x5617, -0x5968,0x59BE,0x5A3C,0x5BB5,0x5C06,0x5C0F,0x5C11,0x5C1A, -0x5E84,0x5E8A,0x5EE0,0x5F70,0x627F,0x6284,0x62DB,0x638C, -0x6377,0x6607,0x660C,0x662D,0x6676,0x677E,0x68A2,0x6A1F, -0x6A35,0x6CBC,0x6D88,0x6E09,0x6E58,0x713C,0x7126,0x7167, -0x75C7,0x7701,0x785D,0x7901,0x7965,0x79F0,0x7AE0,0x7B11, -0x7CA7,0x7D39,0x8096,0x83D6,0x848B,0x8549,0x885D,0x88F3, -0x8A1F,0x8A3C,0x8A54,0x8A73,0x8C61,0x8CDE,0x91A4,0x9266, -0x937E,0x9418,0x969C,0x9798,0x4E0A,0x4E08,0x4E1E,0x4E57, -0x5197,0x5270,0x57CE,0x5834,0x58CC,0x5B22,0x5E38,0x60C5, -0x64FE,0x6761,0x6756,0x6D44,0x72B6,0x7573,0x7A63,0x84B8, -0x8B72,0x91B8,0x9320,0x5631,0x57F4,0x98FE}; - -/* page 23 0x3F21-0x3F7E */ -static uint16 tab_jisx0208_uni23[]={ -0x62ED,0x690D,0x6B96,0x71ED,0x7E54,0x8077,0x8272,0x89E6, -0x98DF,0x8755,0x8FB1,0x5C3B,0x4F38,0x4FE1,0x4FB5,0x5507, -0x5A20,0x5BDD,0x5BE9,0x5FC3,0x614E,0x632F,0x65B0,0x664B, -0x68EE,0x699B,0x6D78,0x6DF1,0x7533,0x75B9,0x771F,0x795E, -0x79E6,0x7D33,0x81E3,0x82AF,0x85AA,0x89AA,0x8A3A,0x8EAB, -0x8F9B,0x9032,0x91DD,0x9707,0x4EBA,0x4EC1,0x5203,0x5875, -0x58EC,0x5C0B,0x751A,0x5C3D,0x814E,0x8A0A,0x8FC5,0x9663, -0x976D,0x7B25,0x8ACF,0x9808,0x9162,0x56F3,0x53A8,0x9017, -0x5439,0x5782,0x5E25,0x63A8,0x6C34,0x708A,0x7761,0x7C8B, -0x7FE0,0x8870,0x9042,0x9154,0x9310,0x9318,0x968F,0x745E, -0x9AC4,0x5D07,0x5D69,0x6570,0x67A2,0x8DA8,0x96DB,0x636E, -0x6749,0x6919,0x83C5,0x9817,0x96C0,0x88FE}; - -/* page 24 0x4021-0x407E */ -static uint16 tab_jisx0208_uni24[]={ -0x6F84,0x647A,0x5BF8,0x4E16,0x702C,0x755D,0x662F,0x51C4, -0x5236,0x52E2,0x59D3,0x5F81,0x6027,0x6210,0x653F,0x6574, -0x661F,0x6674,0x68F2,0x6816,0x6B63,0x6E05,0x7272,0x751F, -0x76DB,0x7CBE,0x8056,0x58F0,0x88FD,0x897F,0x8AA0,0x8A93, -0x8ACB,0x901D,0x9192,0x9752,0x9759,0x6589,0x7A0E,0x8106, -0x96BB,0x5E2D,0x60DC,0x621A,0x65A5,0x6614,0x6790,0x77F3, -0x7A4D,0x7C4D,0x7E3E,0x810A,0x8CAC,0x8D64,0x8DE1,0x8E5F, -0x78A9,0x5207,0x62D9,0x63A5,0x6442,0x6298,0x8A2D,0x7A83, -0x7BC0,0x8AAC,0x96EA,0x7D76,0x820C,0x8749,0x4ED9,0x5148, -0x5343,0x5360,0x5BA3,0x5C02,0x5C16,0x5DDD,0x6226,0x6247, -0x64B0,0x6813,0x6834,0x6CC9,0x6D45,0x6D17,0x67D3,0x6F5C, -0x714E,0x717D,0x65CB,0x7A7F,0x7BAD,0x7DDA}; - -/* page 25 0x4121-0x417E */ -static uint16 tab_jisx0208_uni25[]={ -0x7E4A,0x7FA8,0x817A,0x821B,0x8239,0x85A6,0x8A6E,0x8CCE, -0x8DF5,0x9078,0x9077,0x92AD,0x9291,0x9583,0x9BAE,0x524D, -0x5584,0x6F38,0x7136,0x5168,0x7985,0x7E55,0x81B3,0x7CCE, -0x564C,0x5851,0x5CA8,0x63AA,0x66FE,0x66FD,0x695A,0x72D9, -0x758F,0x758E,0x790E,0x7956,0x79DF,0x7C97,0x7D20,0x7D44, -0x8607,0x8A34,0x963B,0x9061,0x9F20,0x50E7,0x5275,0x53CC, -0x53E2,0x5009,0x55AA,0x58EE,0x594F,0x723D,0x5B8B,0x5C64, -0x531D,0x60E3,0x60F3,0x635C,0x6383,0x633F,0x63BB,0x64CD, -0x65E9,0x66F9,0x5DE3,0x69CD,0x69FD,0x6F15,0x71E5,0x4E89, -0x75E9,0x76F8,0x7A93,0x7CDF,0x7DCF,0x7D9C,0x8061,0x8349, -0x8358,0x846C,0x84BC,0x85FB,0x88C5,0x8D70,0x9001,0x906D, -0x9397,0x971C,0x9A12,0x50CF,0x5897,0x618E}; - -/* page 26 0x4221-0x427E */ -static uint16 tab_jisx0208_uni26[]={ -0x81D3,0x8535,0x8D08,0x9020,0x4FC3,0x5074,0x5247,0x5373, -0x606F,0x6349,0x675F,0x6E2C,0x8DB3,0x901F,0x4FD7,0x5C5E, -0x8CCA,0x65CF,0x7D9A,0x5352,0x8896,0x5176,0x63C3,0x5B58, -0x5B6B,0x5C0A,0x640D,0x6751,0x905C,0x4ED6,0x591A,0x592A, -0x6C70,0x8A51,0x553E,0x5815,0x59A5,0x60F0,0x6253,0x67C1, -0x8235,0x6955,0x9640,0x99C4,0x9A28,0x4F53,0x5806,0x5BFE, -0x8010,0x5CB1,0x5E2F,0x5F85,0x6020,0x614B,0x6234,0x66FF, -0x6CF0,0x6EDE,0x80CE,0x817F,0x82D4,0x888B,0x8CB8,0x9000, -0x902E,0x968A,0x9EDB,0x9BDB,0x4EE3,0x53F0,0x5927,0x7B2C, -0x918D,0x984C,0x9DF9,0x6EDD,0x7027,0x5353,0x5544,0x5B85, -0x6258,0x629E,0x62D3,0x6CA2,0x6FEF,0x7422,0x8A17,0x9438, -0x6FC1,0x8AFE,0x8338,0x51E7,0x86F8,0x53EA}; - -/* page 27 0x4321-0x437E */ -static uint16 tab_jisx0208_uni27[]={ -0x53E9,0x4F46,0x9054,0x8FB0,0x596A,0x8131,0x5DFD,0x7AEA, -0x8FBF,0x68DA,0x8C37,0x72F8,0x9C48,0x6A3D,0x8AB0,0x4E39, -0x5358,0x5606,0x5766,0x62C5,0x63A2,0x65E6,0x6B4E,0x6DE1, -0x6E5B,0x70AD,0x77ED,0x7AEF,0x7BAA,0x7DBB,0x803D,0x80C6, -0x86CB,0x8A95,0x935B,0x56E3,0x58C7,0x5F3E,0x65AD,0x6696, -0x6A80,0x6BB5,0x7537,0x8AC7,0x5024,0x77E5,0x5730,0x5F1B, -0x6065,0x667A,0x6C60,0x75F4,0x7A1A,0x7F6E,0x81F4,0x8718, -0x9045,0x99B3,0x7BC9,0x755C,0x7AF9,0x7B51,0x84C4,0x9010, -0x79E9,0x7A92,0x8336,0x5AE1,0x7740,0x4E2D,0x4EF2,0x5B99, -0x5FE0,0x62BD,0x663C,0x67F1,0x6CE8,0x866B,0x8877,0x8A3B, -0x914E,0x92F3,0x99D0,0x6A17,0x7026,0x732A,0x82E7,0x8457, -0x8CAF,0x4E01,0x5146,0x51CB,0x558B,0x5BF5}; - -/* page 28 0x4421-0x447E */ -static uint16 tab_jisx0208_uni28[]={ -0x5E16,0x5E33,0x5E81,0x5F14,0x5F35,0x5F6B,0x5FB4,0x61F2, -0x6311,0x66A2,0x671D,0x6F6E,0x7252,0x753A,0x773A,0x8074, -0x8139,0x8178,0x8776,0x8ABF,0x8ADC,0x8D85,0x8DF3,0x929A, -0x9577,0x9802,0x9CE5,0x52C5,0x6357,0x76F4,0x6715,0x6C88, -0x73CD,0x8CC3,0x93AE,0x9673,0x6D25,0x589C,0x690E,0x69CC, -0x8FFD,0x939A,0x75DB,0x901A,0x585A,0x6802,0x63B4,0x69FB, -0x4F43,0x6F2C,0x67D8,0x8FBB,0x8526,0x7DB4,0x9354,0x693F, -0x6F70,0x576A,0x58F7,0x5B2C,0x7D2C,0x722A,0x540A,0x91E3, -0x9DB4,0x4EAD,0x4F4E,0x505C,0x5075,0x5243,0x8C9E,0x5448, -0x5824,0x5B9A,0x5E1D,0x5E95,0x5EAD,0x5EF7,0x5F1F,0x608C, -0x62B5,0x633A,0x63D0,0x68AF,0x6C40,0x7887,0x798E,0x7A0B, -0x7DE0,0x8247,0x8A02,0x8AE6,0x8E44,0x9013}; - -/* page 29 0x4521-0x457E */ -static uint16 tab_jisx0208_uni29[]={ -0x90B8,0x912D,0x91D8,0x9F0E,0x6CE5,0x6458,0x64E2,0x6575, -0x6EF4,0x7684,0x7B1B,0x9069,0x93D1,0x6EBA,0x54F2,0x5FB9, -0x64A4,0x8F4D,0x8FED,0x9244,0x5178,0x586B,0x5929,0x5C55, -0x5E97,0x6DFB,0x7E8F,0x751C,0x8CBC,0x8EE2,0x985B,0x70B9, -0x4F1D,0x6BBF,0x6FB1,0x7530,0x96FB,0x514E,0x5410,0x5835, -0x5857,0x59AC,0x5C60,0x5F92,0x6597,0x675C,0x6E21,0x767B, -0x83DF,0x8CED,0x9014,0x90FD,0x934D,0x7825,0x783A,0x52AA, -0x5EA6,0x571F,0x5974,0x6012,0x5012,0x515A,0x51AC,0x51CD, -0x5200,0x5510,0x5854,0x5858,0x5957,0x5B95,0x5CF6,0x5D8B, -0x60BC,0x6295,0x642D,0x6771,0x6843,0x68BC,0x68DF,0x76D7, -0x6DD8,0x6E6F,0x6D9B,0x706F,0x71C8,0x5F53,0x75D8,0x7977, -0x7B49,0x7B54,0x7B52,0x7CD6,0x7D71,0x5230}; - -/* page 30 0x4621-0x467E */ -static uint16 tab_jisx0208_uni30[]={ -0x8463,0x8569,0x85E4,0x8A0E,0x8B04,0x8C46,0x8E0F,0x9003, -0x900F,0x9419,0x9676,0x982D,0x9A30,0x95D8,0x50CD,0x52D5, -0x540C,0x5802,0x5C0E,0x61A7,0x649E,0x6D1E,0x77B3,0x7AE5, -0x80F4,0x8404,0x9053,0x9285,0x5CE0,0x9D07,0x533F,0x5F97, -0x5FB3,0x6D9C,0x7279,0x7763,0x79BF,0x7BE4,0x6BD2,0x72EC, -0x8AAD,0x6803,0x6A61,0x51F8,0x7A81,0x6934,0x5C4A,0x9CF6, -0x82EB,0x5BC5,0x9149,0x701E,0x5678,0x5C6F,0x60C7,0x6566, -0x6C8C,0x8C5A,0x9041,0x9813,0x5451,0x66C7,0x920D,0x5948, -0x90A3,0x5185,0x4E4D,0x51EA,0x8599,0x8B0E,0x7058,0x637A, -0x934B,0x6962,0x99B4,0x7E04,0x7577,0x5357,0x6960,0x8EDF, -0x96E3,0x6C5D,0x4E8C,0x5C3C,0x5F10,0x8FE9,0x5302,0x8CD1, -0x8089,0x8679,0x5EFF,0x65E5,0x4E73,0x5165}; - -/* page 31 0x4721-0x477E */ -static uint16 tab_jisx0208_uni31[]={ -0x5982,0x5C3F,0x97EE,0x4EFB,0x598A,0x5FCD,0x8A8D,0x6FE1, -0x79B0,0x7962,0x5BE7,0x8471,0x732B,0x71B1,0x5E74,0x5FF5, -0x637B,0x649A,0x71C3,0x7C98,0x4E43,0x5EFC,0x4E4B,0x57DC, -0x56A2,0x60A9,0x6FC3,0x7D0D,0x80FD,0x8133,0x81BF,0x8FB2, -0x8997,0x86A4,0x5DF4,0x628A,0x64AD,0x8987,0x6777,0x6CE2, -0x6D3E,0x7436,0x7834,0x5A46,0x7F75,0x82AD,0x99AC,0x4FF3, -0x5EC3,0x62DD,0x6392,0x6557,0x676F,0x76C3,0x724C,0x80CC, -0x80BA,0x8F29,0x914D,0x500D,0x57F9,0x5A92,0x6885,0x6973, -0x7164,0x72FD,0x8CB7,0x58F2,0x8CE0,0x966A,0x9019,0x877F, -0x79E4,0x77E7,0x8429,0x4F2F,0x5265,0x535A,0x62CD,0x67CF, -0x6CCA,0x767D,0x7B94,0x7C95,0x8236,0x8584,0x8FEB,0x66DD, -0x6F20,0x7206,0x7E1B,0x83AB,0x99C1,0x9EA6}; - -/* page 32 0x4821-0x487E */ -static uint16 tab_jisx0208_uni32[]={ -0x51FD,0x7BB1,0x7872,0x7BB8,0x8087,0x7B48,0x6AE8,0x5E61, -0x808C,0x7551,0x7560,0x516B,0x9262,0x6E8C,0x767A,0x9197, -0x9AEA,0x4F10,0x7F70,0x629C,0x7B4F,0x95A5,0x9CE9,0x567A, -0x5859,0x86E4,0x96BC,0x4F34,0x5224,0x534A,0x53CD,0x53DB, -0x5E06,0x642C,0x6591,0x677F,0x6C3E,0x6C4E,0x7248,0x72AF, -0x73ED,0x7554,0x7E41,0x822C,0x85E9,0x8CA9,0x7BC4,0x91C6, -0x7169,0x9812,0x98EF,0x633D,0x6669,0x756A,0x76E4,0x78D0, -0x8543,0x86EE,0x532A,0x5351,0x5426,0x5983,0x5E87,0x5F7C, -0x60B2,0x6249,0x6279,0x62AB,0x6590,0x6BD4,0x6CCC,0x75B2, -0x76AE,0x7891,0x79D8,0x7DCB,0x7F77,0x80A5,0x88AB,0x8AB9, -0x8CBB,0x907F,0x975E,0x98DB,0x6A0B,0x7C38,0x5099,0x5C3E, -0x5FAE,0x6787,0x6BD8,0x7435,0x7709,0x7F8E}; - -/* page 33 0x4921-0x497E */ -static uint16 tab_jisx0208_uni33[]={ -0x9F3B,0x67CA,0x7A17,0x5339,0x758B,0x9AED,0x5F66,0x819D, -0x83F1,0x8098,0x5F3C,0x5FC5,0x7562,0x7B46,0x903C,0x6867, -0x59EB,0x5A9B,0x7D10,0x767E,0x8B2C,0x4FF5,0x5F6A,0x6A19, -0x6C37,0x6F02,0x74E2,0x7968,0x8868,0x8A55,0x8C79,0x5EDF, -0x63CF,0x75C5,0x79D2,0x82D7,0x9328,0x92F2,0x849C,0x86ED, -0x9C2D,0x54C1,0x5F6C,0x658C,0x6D5C,0x7015,0x8CA7,0x8CD3, -0x983B,0x654F,0x74F6,0x4E0D,0x4ED8,0x57E0,0x592B,0x5A66, -0x5BCC,0x51A8,0x5E03,0x5E9C,0x6016,0x6276,0x6577,0x65A7, -0x666E,0x6D6E,0x7236,0x7B26,0x8150,0x819A,0x8299,0x8B5C, -0x8CA0,0x8CE6,0x8D74,0x961C,0x9644,0x4FAE,0x64AB,0x6B66, -0x821E,0x8461,0x856A,0x90E8,0x5C01,0x6953,0x98A8,0x847A, -0x8557,0x4F0F,0x526F,0x5FA9,0x5E45,0x670D}; - -/* page 34 0x4A21-0x4A7E */ -static uint16 tab_jisx0208_uni34[]={ -0x798F,0x8179,0x8907,0x8986,0x6DF5,0x5F17,0x6255,0x6CB8, -0x4ECF,0x7269,0x9B92,0x5206,0x543B,0x5674,0x58B3,0x61A4, -0x626E,0x711A,0x596E,0x7C89,0x7CDE,0x7D1B,0x96F0,0x6587, -0x805E,0x4E19,0x4F75,0x5175,0x5840,0x5E63,0x5E73,0x5F0A, -0x67C4,0x4E26,0x853D,0x9589,0x965B,0x7C73,0x9801,0x50FB, -0x58C1,0x7656,0x78A7,0x5225,0x77A5,0x8511,0x7B86,0x504F, -0x5909,0x7247,0x7BC7,0x7DE8,0x8FBA,0x8FD4,0x904D,0x4FBF, -0x52C9,0x5A29,0x5F01,0x97AD,0x4FDD,0x8217,0x92EA,0x5703, -0x6355,0x6B69,0x752B,0x88DC,0x8F14,0x7A42,0x52DF,0x5893, -0x6155,0x620A,0x66AE,0x6BCD,0x7C3F,0x83E9,0x5023,0x4FF8, -0x5305,0x5446,0x5831,0x5949,0x5B9D,0x5CF0,0x5CEF,0x5D29, -0x5E96,0x62B1,0x6367,0x653E,0x65B9,0x670B}; - -/* page 35 0x4B21-0x4B7E */ -static uint16 tab_jisx0208_uni35[]={ -0x6CD5,0x6CE1,0x70F9,0x7832,0x7E2B,0x80DE,0x82B3,0x840C, -0x84EC,0x8702,0x8912,0x8A2A,0x8C4A,0x90A6,0x92D2,0x98FD, -0x9CF3,0x9D6C,0x4E4F,0x4EA1,0x508D,0x5256,0x574A,0x59A8, -0x5E3D,0x5FD8,0x5FD9,0x623F,0x66B4,0x671B,0x67D0,0x68D2, -0x5192,0x7D21,0x80AA,0x81A8,0x8B00,0x8C8C,0x8CBF,0x927E, -0x9632,0x5420,0x982C,0x5317,0x50D5,0x535C,0x58A8,0x64B2, -0x6734,0x7267,0x7766,0x7A46,0x91E6,0x52C3,0x6CA1,0x6B86, -0x5800,0x5E4C,0x5954,0x672C,0x7FFB,0x51E1,0x76C6,0x6469, -0x78E8,0x9B54,0x9EBB,0x57CB,0x59B9,0x6627,0x679A,0x6BCE, -0x54E9,0x69D9,0x5E55,0x819C,0x6795,0x9BAA,0x67FE,0x9C52, -0x685D,0x4EA6,0x4FE3,0x53C8,0x62B9,0x672B,0x6CAB,0x8FC4, -0x4FAD,0x7E6D,0x9EBF,0x4E07,0x6162,0x6E80}; - -/* page 36 0x4C21-0x4C7E */ -static uint16 tab_jisx0208_uni36[]={ -0x6F2B,0x8513,0x5473,0x672A,0x9B45,0x5DF3,0x7B95,0x5CAC, -0x5BC6,0x871C,0x6E4A,0x84D1,0x7A14,0x8108,0x5999,0x7C8D, -0x6C11,0x7720,0x52D9,0x5922,0x7121,0x725F,0x77DB,0x9727, -0x9D61,0x690B,0x5A7F,0x5A18,0x51A5,0x540D,0x547D,0x660E, -0x76DF,0x8FF7,0x9298,0x9CF4,0x59EA,0x725D,0x6EC5,0x514D, -0x68C9,0x7DBF,0x7DEC,0x9762,0x9EBA,0x6478,0x6A21,0x8302, -0x5984,0x5B5F,0x6BDB,0x731B,0x76F2,0x7DB2,0x8017,0x8499, -0x5132,0x6728,0x9ED9,0x76EE,0x6762,0x52FF,0x9905,0x5C24, -0x623B,0x7C7E,0x8CB0,0x554F,0x60B6,0x7D0B,0x9580,0x5301, -0x4E5F,0x51B6,0x591C,0x723A,0x8036,0x91CE,0x5F25,0x77E2, -0x5384,0x5F79,0x7D04,0x85AC,0x8A33,0x8E8D,0x9756,0x67F3, -0x85AE,0x9453,0x6109,0x6108,0x6CB9,0x7652}; - -/* page 37 0x4D21-0x4D7E */ -static uint16 tab_jisx0208_uni37[]={ -0x8AED,0x8F38,0x552F,0x4F51,0x512A,0x52C7,0x53CB,0x5BA5, -0x5E7D,0x60A0,0x6182,0x63D6,0x6709,0x67DA,0x6E67,0x6D8C, -0x7336,0x7337,0x7531,0x7950,0x88D5,0x8A98,0x904A,0x9091, -0x90F5,0x96C4,0x878D,0x5915,0x4E88,0x4F59,0x4E0E,0x8A89, -0x8F3F,0x9810,0x50AD,0x5E7C,0x5996,0x5BB9,0x5EB8,0x63DA, -0x63FA,0x64C1,0x66DC,0x694A,0x69D8,0x6D0B,0x6EB6,0x7194, -0x7528,0x7AAF,0x7F8A,0x8000,0x8449,0x84C9,0x8981,0x8B21, -0x8E0A,0x9065,0x967D,0x990A,0x617E,0x6291,0x6B32,0x6C83, -0x6D74,0x7FCC,0x7FFC,0x6DC0,0x7F85,0x87BA,0x88F8,0x6765, -0x83B1,0x983C,0x96F7,0x6D1B,0x7D61,0x843D,0x916A,0x4E71, -0x5375,0x5D50,0x6B04,0x6FEB,0x85CD,0x862D,0x89A7,0x5229, -0x540F,0x5C65,0x674E,0x68A8,0x7406,0x7483}; - -/* page 38 0x4E21-0x4E7E */ -static uint16 tab_jisx0208_uni38[]={ -0x75E2,0x88CF,0x88E1,0x91CC,0x96E2,0x9678,0x5F8B,0x7387, -0x7ACB,0x844E,0x63A0,0x7565,0x5289,0x6D41,0x6E9C,0x7409, -0x7559,0x786B,0x7C92,0x9686,0x7ADC,0x9F8D,0x4FB6,0x616E, -0x65C5,0x865C,0x4E86,0x4EAE,0x50DA,0x4E21,0x51CC,0x5BEE, -0x6599,0x6881,0x6DBC,0x731F,0x7642,0x77AD,0x7A1C,0x7CE7, -0x826F,0x8AD2,0x907C,0x91CF,0x9675,0x9818,0x529B,0x7DD1, -0x502B,0x5398,0x6797,0x6DCB,0x71D0,0x7433,0x81E8,0x8F2A, -0x96A3,0x9C57,0x9E9F,0x7460,0x5841,0x6D99,0x7D2F,0x985E, -0x4EE4,0x4F36,0x4F8B,0x51B7,0x52B1,0x5DBA,0x601C,0x73B2, -0x793C,0x82D3,0x9234,0x96B7,0x96F6,0x970A,0x9E97,0x9F62, -0x66A6,0x6B74,0x5217,0x52A3,0x70C8,0x88C2,0x5EC9,0x604B, -0x6190,0x6F23,0x7149,0x7C3E,0x7DF4,0x806F}; - -/* page 39 0x4F21-0x4F53 */ -static uint16 tab_jisx0208_uni39[]={ -0x84EE,0x9023,0x932C,0x5442,0x9B6F,0x6AD3,0x7089,0x8CC2, -0x8DEF,0x9732,0x52B4,0x5A41,0x5ECA,0x5F04,0x6717,0x697C, -0x6994,0x6D6A,0x6F0F,0x7262,0x72FC,0x7BED,0x8001,0x807E, -0x874B,0x90CE,0x516D,0x9E93,0x7984,0x808B,0x9332,0x8AD6, -0x502D,0x548C,0x8A71,0x6B6A,0x8CC4,0x8107,0x60D1,0x67A0, -0x9DF2,0x4E99,0x4E98,0x9C10,0x8A6B,0x85C1,0x8568,0x6900, -0x6E7E,0x7897,0x8155}; - -/* page 40 0x5021-0x507E */ -static uint16 tab_jisx0208_uni40[]={ -0x5F0C,0x4E10,0x4E15,0x4E2A,0x4E31,0x4E36,0x4E3C,0x4E3F, -0x4E42,0x4E56,0x4E58,0x4E82,0x4E85,0x8C6B,0x4E8A,0x8212, -0x5F0D,0x4E8E,0x4E9E,0x4E9F,0x4EA0,0x4EA2,0x4EB0,0x4EB3, -0x4EB6,0x4ECE,0x4ECD,0x4EC4,0x4EC6,0x4EC2,0x4ED7,0x4EDE, -0x4EED,0x4EDF,0x4EF7,0x4F09,0x4F5A,0x4F30,0x4F5B,0x4F5D, -0x4F57,0x4F47,0x4F76,0x4F88,0x4F8F,0x4F98,0x4F7B,0x4F69, -0x4F70,0x4F91,0x4F6F,0x4F86,0x4F96,0x5118,0x4FD4,0x4FDF, -0x4FCE,0x4FD8,0x4FDB,0x4FD1,0x4FDA,0x4FD0,0x4FE4,0x4FE5, -0x501A,0x5028,0x5014,0x502A,0x5025,0x5005,0x4F1C,0x4FF6, -0x5021,0x5029,0x502C,0x4FFE,0x4FEF,0x5011,0x5006,0x5043, -0x5047,0x6703,0x5055,0x5050,0x5048,0x505A,0x5056,0x506C, -0x5078,0x5080,0x509A,0x5085,0x50B4,0x50B2}; - -/* page 41 0x5121-0x517E */ -static uint16 tab_jisx0208_uni41[]={ -0x50C9,0x50CA,0x50B3,0x50C2,0x50D6,0x50DE,0x50E5,0x50ED, -0x50E3,0x50EE,0x50F9,0x50F5,0x5109,0x5101,0x5102,0x5116, -0x5115,0x5114,0x511A,0x5121,0x513A,0x5137,0x513C,0x513B, -0x513F,0x5140,0x5152,0x514C,0x5154,0x5162,0x7AF8,0x5169, -0x516A,0x516E,0x5180,0x5182,0x56D8,0x518C,0x5189,0x518F, -0x5191,0x5193,0x5195,0x5196,0x51A4,0x51A6,0x51A2,0x51A9, -0x51AA,0x51AB,0x51B3,0x51B1,0x51B2,0x51B0,0x51B5,0x51BD, -0x51C5,0x51C9,0x51DB,0x51E0,0x8655,0x51E9,0x51ED,0x51F0, -0x51F5,0x51FE,0x5204,0x520B,0x5214,0x520E,0x5227,0x522A, -0x522E,0x5233,0x5239,0x524F,0x5244,0x524B,0x524C,0x525E, -0x5254,0x526A,0x5274,0x5269,0x5273,0x527F,0x527D,0x528D, -0x5294,0x5292,0x5271,0x5288,0x5291,0x8FA8}; - -/* page 42 0x5221-0x527E */ -static uint16 tab_jisx0208_uni42[]={ -0x8FA7,0x52AC,0x52AD,0x52BC,0x52B5,0x52C1,0x52CD,0x52D7, -0x52DE,0x52E3,0x52E6,0x98ED,0x52E0,0x52F3,0x52F5,0x52F8, -0x52F9,0x5306,0x5308,0x7538,0x530D,0x5310,0x530F,0x5315, -0x531A,0x5323,0x532F,0x5331,0x5333,0x5338,0x5340,0x5346, -0x5345,0x4E17,0x5349,0x534D,0x51D6,0x535E,0x5369,0x536E, -0x5918,0x537B,0x5377,0x5382,0x5396,0x53A0,0x53A6,0x53A5, -0x53AE,0x53B0,0x53B6,0x53C3,0x7C12,0x96D9,0x53DF,0x66FC, -0x71EE,0x53EE,0x53E8,0x53ED,0x53FA,0x5401,0x543D,0x5440, -0x542C,0x542D,0x543C,0x542E,0x5436,0x5429,0x541D,0x544E, -0x548F,0x5475,0x548E,0x545F,0x5471,0x5477,0x5470,0x5492, -0x547B,0x5480,0x5476,0x5484,0x5490,0x5486,0x54C7,0x54A2, -0x54B8,0x54A5,0x54AC,0x54C4,0x54C8,0x54A8}; - -/* page 43 0x5321-0x537E */ -static uint16 tab_jisx0208_uni43[]={ -0x54AB,0x54C2,0x54A4,0x54BE,0x54BC,0x54D8,0x54E5,0x54E6, -0x550F,0x5514,0x54FD,0x54EE,0x54ED,0x54FA,0x54E2,0x5539, -0x5540,0x5563,0x554C,0x552E,0x555C,0x5545,0x5556,0x5557, -0x5538,0x5533,0x555D,0x5599,0x5580,0x54AF,0x558A,0x559F, -0x557B,0x557E,0x5598,0x559E,0x55AE,0x557C,0x5583,0x55A9, -0x5587,0x55A8,0x55DA,0x55C5,0x55DF,0x55C4,0x55DC,0x55E4, -0x55D4,0x5614,0x55F7,0x5616,0x55FE,0x55FD,0x561B,0x55F9, -0x564E,0x5650,0x71DF,0x5634,0x5636,0x5632,0x5638,0x566B, -0x5664,0x562F,0x566C,0x566A,0x5686,0x5680,0x568A,0x56A0, -0x5694,0x568F,0x56A5,0x56AE,0x56B6,0x56B4,0x56C2,0x56BC, -0x56C1,0x56C3,0x56C0,0x56C8,0x56CE,0x56D1,0x56D3,0x56D7, -0x56EE,0x56F9,0x5700,0x56FF,0x5704,0x5709}; - -/* page 44 0x5421-0x547E */ -static uint16 tab_jisx0208_uni44[]={ -0x5708,0x570B,0x570D,0x5713,0x5718,0x5716,0x55C7,0x571C, -0x5726,0x5737,0x5738,0x574E,0x573B,0x5740,0x574F,0x5769, -0x57C0,0x5788,0x5761,0x577F,0x5789,0x5793,0x57A0,0x57B3, -0x57A4,0x57AA,0x57B0,0x57C3,0x57C6,0x57D4,0x57D2,0x57D3, -0x580A,0x57D6,0x57E3,0x580B,0x5819,0x581D,0x5872,0x5821, -0x5862,0x584B,0x5870,0x6BC0,0x5852,0x583D,0x5879,0x5885, -0x58B9,0x589F,0x58AB,0x58BA,0x58DE,0x58BB,0x58B8,0x58AE, -0x58C5,0x58D3,0x58D1,0x58D7,0x58D9,0x58D8,0x58E5,0x58DC, -0x58E4,0x58DF,0x58EF,0x58FA,0x58F9,0x58FB,0x58FC,0x58FD, -0x5902,0x590A,0x5910,0x591B,0x68A6,0x5925,0x592C,0x592D, -0x5932,0x5938,0x593E,0x7AD2,0x5955,0x5950,0x594E,0x595A, -0x5958,0x5962,0x5960,0x5967,0x596C,0x5969}; - -/* page 45 0x5521-0x557E */ -static uint16 tab_jisx0208_uni45[]={ -0x5978,0x5981,0x599D,0x4F5E,0x4FAB,0x59A3,0x59B2,0x59C6, -0x59E8,0x59DC,0x598D,0x59D9,0x59DA,0x5A25,0x5A1F,0x5A11, -0x5A1C,0x5A09,0x5A1A,0x5A40,0x5A6C,0x5A49,0x5A35,0x5A36, -0x5A62,0x5A6A,0x5A9A,0x5ABC,0x5ABE,0x5ACB,0x5AC2,0x5ABD, -0x5AE3,0x5AD7,0x5AE6,0x5AE9,0x5AD6,0x5AFA,0x5AFB,0x5B0C, -0x5B0B,0x5B16,0x5B32,0x5AD0,0x5B2A,0x5B36,0x5B3E,0x5B43, -0x5B45,0x5B40,0x5B51,0x5B55,0x5B5A,0x5B5B,0x5B65,0x5B69, -0x5B70,0x5B73,0x5B75,0x5B78,0x6588,0x5B7A,0x5B80,0x5B83, -0x5BA6,0x5BB8,0x5BC3,0x5BC7,0x5BC9,0x5BD4,0x5BD0,0x5BE4, -0x5BE6,0x5BE2,0x5BDE,0x5BE5,0x5BEB,0x5BF0,0x5BF6,0x5BF3, -0x5C05,0x5C07,0x5C08,0x5C0D,0x5C13,0x5C20,0x5C22,0x5C28, -0x5C38,0x5C39,0x5C41,0x5C46,0x5C4E,0x5C53}; - -/* page 46 0x5621-0x567E */ -static uint16 tab_jisx0208_uni46[]={ -0x5C50,0x5C4F,0x5B71,0x5C6C,0x5C6E,0x4E62,0x5C76,0x5C79, -0x5C8C,0x5C91,0x5C94,0x599B,0x5CAB,0x5CBB,0x5CB6,0x5CBC, -0x5CB7,0x5CC5,0x5CBE,0x5CC7,0x5CD9,0x5CE9,0x5CFD,0x5CFA, -0x5CED,0x5D8C,0x5CEA,0x5D0B,0x5D15,0x5D17,0x5D5C,0x5D1F, -0x5D1B,0x5D11,0x5D14,0x5D22,0x5D1A,0x5D19,0x5D18,0x5D4C, -0x5D52,0x5D4E,0x5D4B,0x5D6C,0x5D73,0x5D76,0x5D87,0x5D84, -0x5D82,0x5DA2,0x5D9D,0x5DAC,0x5DAE,0x5DBD,0x5D90,0x5DB7, -0x5DBC,0x5DC9,0x5DCD,0x5DD3,0x5DD2,0x5DD6,0x5DDB,0x5DEB, -0x5DF2,0x5DF5,0x5E0B,0x5E1A,0x5E19,0x5E11,0x5E1B,0x5E36, -0x5E37,0x5E44,0x5E43,0x5E40,0x5E4E,0x5E57,0x5E54,0x5E5F, -0x5E62,0x5E64,0x5E47,0x5E75,0x5E76,0x5E7A,0x9EBC,0x5E7F, -0x5EA0,0x5EC1,0x5EC2,0x5EC8,0x5ED0,0x5ECF}; - -/* page 47 0x5721-0x577E */ -static uint16 tab_jisx0208_uni47[]={ -0x5ED6,0x5EE3,0x5EDD,0x5EDA,0x5EDB,0x5EE2,0x5EE1,0x5EE8, -0x5EE9,0x5EEC,0x5EF1,0x5EF3,0x5EF0,0x5EF4,0x5EF8,0x5EFE, -0x5F03,0x5F09,0x5F5D,0x5F5C,0x5F0B,0x5F11,0x5F16,0x5F29, -0x5F2D,0x5F38,0x5F41,0x5F48,0x5F4C,0x5F4E,0x5F2F,0x5F51, -0x5F56,0x5F57,0x5F59,0x5F61,0x5F6D,0x5F73,0x5F77,0x5F83, -0x5F82,0x5F7F,0x5F8A,0x5F88,0x5F91,0x5F87,0x5F9E,0x5F99, -0x5F98,0x5FA0,0x5FA8,0x5FAD,0x5FBC,0x5FD6,0x5FFB,0x5FE4, -0x5FF8,0x5FF1,0x5FDD,0x60B3,0x5FFF,0x6021,0x6060,0x6019, -0x6010,0x6029,0x600E,0x6031,0x601B,0x6015,0x602B,0x6026, -0x600F,0x603A,0x605A,0x6041,0x606A,0x6077,0x605F,0x604A, -0x6046,0x604D,0x6063,0x6043,0x6064,0x6042,0x606C,0x606B, -0x6059,0x6081,0x608D,0x60E7,0x6083,0x609A}; - -/* page 48 0x5821-0x587E */ -static uint16 tab_jisx0208_uni48[]={ -0x6084,0x609B,0x6096,0x6097,0x6092,0x60A7,0x608B,0x60E1, -0x60B8,0x60E0,0x60D3,0x60B4,0x5FF0,0x60BD,0x60C6,0x60B5, -0x60D8,0x614D,0x6115,0x6106,0x60F6,0x60F7,0x6100,0x60F4, -0x60FA,0x6103,0x6121,0x60FB,0x60F1,0x610D,0x610E,0x6147, -0x613E,0x6128,0x6127,0x614A,0x613F,0x613C,0x612C,0x6134, -0x613D,0x6142,0x6144,0x6173,0x6177,0x6158,0x6159,0x615A, -0x616B,0x6174,0x616F,0x6165,0x6171,0x615F,0x615D,0x6153, -0x6175,0x6199,0x6196,0x6187,0x61AC,0x6194,0x619A,0x618A, -0x6191,0x61AB,0x61AE,0x61CC,0x61CA,0x61C9,0x61F7,0x61C8, -0x61C3,0x61C6,0x61BA,0x61CB,0x7F79,0x61CD,0x61E6,0x61E3, -0x61F6,0x61FA,0x61F4,0x61FF,0x61FD,0x61FC,0x61FE,0x6200, -0x6208,0x6209,0x620D,0x620C,0x6214,0x621B}; - -/* page 49 0x5921-0x597E */ -static uint16 tab_jisx0208_uni49[]={ -0x621E,0x6221,0x622A,0x622E,0x6230,0x6232,0x6233,0x6241, -0x624E,0x625E,0x6263,0x625B,0x6260,0x6268,0x627C,0x6282, -0x6289,0x627E,0x6292,0x6293,0x6296,0x62D4,0x6283,0x6294, -0x62D7,0x62D1,0x62BB,0x62CF,0x62FF,0x62C6,0x64D4,0x62C8, -0x62DC,0x62CC,0x62CA,0x62C2,0x62C7,0x629B,0x62C9,0x630C, -0x62EE,0x62F1,0x6327,0x6302,0x6308,0x62EF,0x62F5,0x6350, -0x633E,0x634D,0x641C,0x634F,0x6396,0x638E,0x6380,0x63AB, -0x6376,0x63A3,0x638F,0x6389,0x639F,0x63B5,0x636B,0x6369, -0x63BE,0x63E9,0x63C0,0x63C6,0x63E3,0x63C9,0x63D2,0x63F6, -0x63C4,0x6416,0x6434,0x6406,0x6413,0x6426,0x6436,0x651D, -0x6417,0x6428,0x640F,0x6467,0x646F,0x6476,0x644E,0x652A, -0x6495,0x6493,0x64A5,0x64A9,0x6488,0x64BC}; - -/* page 50 0x5A21-0x5A7E */ -static uint16 tab_jisx0208_uni50[]={ -0x64DA,0x64D2,0x64C5,0x64C7,0x64BB,0x64D8,0x64C2,0x64F1, -0x64E7,0x8209,0x64E0,0x64E1,0x62AC,0x64E3,0x64EF,0x652C, -0x64F6,0x64F4,0x64F2,0x64FA,0x6500,0x64FD,0x6518,0x651C, -0x6505,0x6524,0x6523,0x652B,0x6534,0x6535,0x6537,0x6536, -0x6538,0x754B,0x6548,0x6556,0x6555,0x654D,0x6558,0x655E, -0x655D,0x6572,0x6578,0x6582,0x6583,0x8B8A,0x659B,0x659F, -0x65AB,0x65B7,0x65C3,0x65C6,0x65C1,0x65C4,0x65CC,0x65D2, -0x65DB,0x65D9,0x65E0,0x65E1,0x65F1,0x6772,0x660A,0x6603, -0x65FB,0x6773,0x6635,0x6636,0x6634,0x661C,0x664F,0x6644, -0x6649,0x6641,0x665E,0x665D,0x6664,0x6667,0x6668,0x665F, -0x6662,0x6670,0x6683,0x6688,0x668E,0x6689,0x6684,0x6698, -0x669D,0x66C1,0x66B9,0x66C9,0x66BE,0x66BC}; - -/* page 51 0x5B21-0x5B7E */ -static uint16 tab_jisx0208_uni51[]={ -0x66C4,0x66B8,0x66D6,0x66DA,0x66E0,0x663F,0x66E6,0x66E9, -0x66F0,0x66F5,0x66F7,0x670F,0x6716,0x671E,0x6726,0x6727, -0x9738,0x672E,0x673F,0x6736,0x6741,0x6738,0x6737,0x6746, -0x675E,0x6760,0x6759,0x6763,0x6764,0x6789,0x6770,0x67A9, -0x677C,0x676A,0x678C,0x678B,0x67A6,0x67A1,0x6785,0x67B7, -0x67EF,0x67B4,0x67EC,0x67B3,0x67E9,0x67B8,0x67E4,0x67DE, -0x67DD,0x67E2,0x67EE,0x67B9,0x67CE,0x67C6,0x67E7,0x6A9C, -0x681E,0x6846,0x6829,0x6840,0x684D,0x6832,0x684E,0x68B3, -0x682B,0x6859,0x6863,0x6877,0x687F,0x689F,0x688F,0x68AD, -0x6894,0x689D,0x689B,0x6883,0x6AAE,0x68B9,0x6874,0x68B5, -0x68A0,0x68BA,0x690F,0x688D,0x687E,0x6901,0x68CA,0x6908, -0x68D8,0x6922,0x6926,0x68E1,0x690C,0x68CD}; - -/* page 52 0x5C21-0x5C7E */ -static uint16 tab_jisx0208_uni52[]={ -0x68D4,0x68E7,0x68D5,0x6936,0x6912,0x6904,0x68D7,0x68E3, -0x6925,0x68F9,0x68E0,0x68EF,0x6928,0x692A,0x691A,0x6923, -0x6921,0x68C6,0x6979,0x6977,0x695C,0x6978,0x696B,0x6954, -0x697E,0x696E,0x6939,0x6974,0x693D,0x6959,0x6930,0x6961, -0x695E,0x695D,0x6981,0x696A,0x69B2,0x69AE,0x69D0,0x69BF, -0x69C1,0x69D3,0x69BE,0x69CE,0x5BE8,0x69CA,0x69DD,0x69BB, -0x69C3,0x69A7,0x6A2E,0x6991,0x69A0,0x699C,0x6995,0x69B4, -0x69DE,0x69E8,0x6A02,0x6A1B,0x69FF,0x6B0A,0x69F9,0x69F2, -0x69E7,0x6A05,0x69B1,0x6A1E,0x69ED,0x6A14,0x69EB,0x6A0A, -0x6A12,0x6AC1,0x6A23,0x6A13,0x6A44,0x6A0C,0x6A72,0x6A36, -0x6A78,0x6A47,0x6A62,0x6A59,0x6A66,0x6A48,0x6A38,0x6A22, -0x6A90,0x6A8D,0x6AA0,0x6A84,0x6AA2,0x6AA3}; - -/* page 53 0x5D21-0x5D7E */ -static uint16 tab_jisx0208_uni53[]={ -0x6A97,0x8617,0x6ABB,0x6AC3,0x6AC2,0x6AB8,0x6AB3,0x6AAC, -0x6ADE,0x6AD1,0x6ADF,0x6AAA,0x6ADA,0x6AEA,0x6AFB,0x6B05, -0x8616,0x6AFA,0x6B12,0x6B16,0x9B31,0x6B1F,0x6B38,0x6B37, -0x76DC,0x6B39,0x98EE,0x6B47,0x6B43,0x6B49,0x6B50,0x6B59, -0x6B54,0x6B5B,0x6B5F,0x6B61,0x6B78,0x6B79,0x6B7F,0x6B80, -0x6B84,0x6B83,0x6B8D,0x6B98,0x6B95,0x6B9E,0x6BA4,0x6BAA, -0x6BAB,0x6BAF,0x6BB2,0x6BB1,0x6BB3,0x6BB7,0x6BBC,0x6BC6, -0x6BCB,0x6BD3,0x6BDF,0x6BEC,0x6BEB,0x6BF3,0x6BEF,0x9EBE, -0x6C08,0x6C13,0x6C14,0x6C1B,0x6C24,0x6C23,0x6C5E,0x6C55, -0x6C62,0x6C6A,0x6C82,0x6C8D,0x6C9A,0x6C81,0x6C9B,0x6C7E, -0x6C68,0x6C73,0x6C92,0x6C90,0x6CC4,0x6CF1,0x6CD3,0x6CBD, -0x6CD7,0x6CC5,0x6CDD,0x6CAE,0x6CB1,0x6CBE}; - -/* page 54 0x5E21-0x5E7E */ -static uint16 tab_jisx0208_uni54[]={ -0x6CBA,0x6CDB,0x6CEF,0x6CD9,0x6CEA,0x6D1F,0x884D,0x6D36, -0x6D2B,0x6D3D,0x6D38,0x6D19,0x6D35,0x6D33,0x6D12,0x6D0C, -0x6D63,0x6D93,0x6D64,0x6D5A,0x6D79,0x6D59,0x6D8E,0x6D95, -0x6FE4,0x6D85,0x6DF9,0x6E15,0x6E0A,0x6DB5,0x6DC7,0x6DE6, -0x6DB8,0x6DC6,0x6DEC,0x6DDE,0x6DCC,0x6DE8,0x6DD2,0x6DC5, -0x6DFA,0x6DD9,0x6DE4,0x6DD5,0x6DEA,0x6DEE,0x6E2D,0x6E6E, -0x6E2E,0x6E19,0x6E72,0x6E5F,0x6E3E,0x6E23,0x6E6B,0x6E2B, -0x6E76,0x6E4D,0x6E1F,0x6E43,0x6E3A,0x6E4E,0x6E24,0x6EFF, -0x6E1D,0x6E38,0x6E82,0x6EAA,0x6E98,0x6EC9,0x6EB7,0x6ED3, -0x6EBD,0x6EAF,0x6EC4,0x6EB2,0x6ED4,0x6ED5,0x6E8F,0x6EA5, -0x6EC2,0x6E9F,0x6F41,0x6F11,0x704C,0x6EEC,0x6EF8,0x6EFE, -0x6F3F,0x6EF2,0x6F31,0x6EEF,0x6F32,0x6ECC}; - -/* page 55 0x5F21-0x5F7E */ -static uint16 tab_jisx0208_uni55[]={ -0x6F3E,0x6F13,0x6EF7,0x6F86,0x6F7A,0x6F78,0x6F81,0x6F80, -0x6F6F,0x6F5B,0x6FF3,0x6F6D,0x6F82,0x6F7C,0x6F58,0x6F8E, -0x6F91,0x6FC2,0x6F66,0x6FB3,0x6FA3,0x6FA1,0x6FA4,0x6FB9, -0x6FC6,0x6FAA,0x6FDF,0x6FD5,0x6FEC,0x6FD4,0x6FD8,0x6FF1, -0x6FEE,0x6FDB,0x7009,0x700B,0x6FFA,0x7011,0x7001,0x700F, -0x6FFE,0x701B,0x701A,0x6F74,0x701D,0x7018,0x701F,0x7030, -0x703E,0x7032,0x7051,0x7063,0x7099,0x7092,0x70AF,0x70F1, -0x70AC,0x70B8,0x70B3,0x70AE,0x70DF,0x70CB,0x70DD,0x70D9, -0x7109,0x70FD,0x711C,0x7119,0x7165,0x7155,0x7188,0x7166, -0x7162,0x714C,0x7156,0x716C,0x718F,0x71FB,0x7184,0x7195, -0x71A8,0x71AC,0x71D7,0x71B9,0x71BE,0x71D2,0x71C9,0x71D4, -0x71CE,0x71E0,0x71EC,0x71E7,0x71F5,0x71FC}; - -/* page 56 0x6021-0x607E */ -static uint16 tab_jisx0208_uni56[]={ -0x71F9,0x71FF,0x720D,0x7210,0x721B,0x7228,0x722D,0x722C, -0x7230,0x7232,0x723B,0x723C,0x723F,0x7240,0x7246,0x724B, -0x7258,0x7274,0x727E,0x7282,0x7281,0x7287,0x7292,0x7296, -0x72A2,0x72A7,0x72B9,0x72B2,0x72C3,0x72C6,0x72C4,0x72CE, -0x72D2,0x72E2,0x72E0,0x72E1,0x72F9,0x72F7,0x500F,0x7317, -0x730A,0x731C,0x7316,0x731D,0x7334,0x732F,0x7329,0x7325, -0x733E,0x734E,0x734F,0x9ED8,0x7357,0x736A,0x7368,0x7370, -0x7378,0x7375,0x737B,0x737A,0x73C8,0x73B3,0x73CE,0x73BB, -0x73C0,0x73E5,0x73EE,0x73DE,0x74A2,0x7405,0x746F,0x7425, -0x73F8,0x7432,0x743A,0x7455,0x743F,0x745F,0x7459,0x7441, -0x745C,0x7469,0x7470,0x7463,0x746A,0x7476,0x747E,0x748B, -0x749E,0x74A7,0x74CA,0x74CF,0x74D4,0x73F1}; - -/* page 57 0x6121-0x617E */ -static uint16 tab_jisx0208_uni57[]={ -0x74E0,0x74E3,0x74E7,0x74E9,0x74EE,0x74F2,0x74F0,0x74F1, -0x74F8,0x74F7,0x7504,0x7503,0x7505,0x750C,0x750E,0x750D, -0x7515,0x7513,0x751E,0x7526,0x752C,0x753C,0x7544,0x754D, -0x754A,0x7549,0x755B,0x7546,0x755A,0x7569,0x7564,0x7567, -0x756B,0x756D,0x7578,0x7576,0x7586,0x7587,0x7574,0x758A, -0x7589,0x7582,0x7594,0x759A,0x759D,0x75A5,0x75A3,0x75C2, -0x75B3,0x75C3,0x75B5,0x75BD,0x75B8,0x75BC,0x75B1,0x75CD, -0x75CA,0x75D2,0x75D9,0x75E3,0x75DE,0x75FE,0x75FF,0x75FC, -0x7601,0x75F0,0x75FA,0x75F2,0x75F3,0x760B,0x760D,0x7609, -0x761F,0x7627,0x7620,0x7621,0x7622,0x7624,0x7634,0x7630, -0x763B,0x7647,0x7648,0x7646,0x765C,0x7658,0x7661,0x7662, -0x7668,0x7669,0x766A,0x7667,0x766C,0x7670}; - -/* page 58 0x6221-0x627E */ -static uint16 tab_jisx0208_uni58[]={ -0x7672,0x7676,0x7678,0x767C,0x7680,0x7683,0x7688,0x768B, -0x768E,0x7696,0x7693,0x7699,0x769A,0x76B0,0x76B4,0x76B8, -0x76B9,0x76BA,0x76C2,0x76CD,0x76D6,0x76D2,0x76DE,0x76E1, -0x76E5,0x76E7,0x76EA,0x862F,0x76FB,0x7708,0x7707,0x7704, -0x7729,0x7724,0x771E,0x7725,0x7726,0x771B,0x7737,0x7738, -0x7747,0x775A,0x7768,0x776B,0x775B,0x7765,0x777F,0x777E, -0x7779,0x778E,0x778B,0x7791,0x77A0,0x779E,0x77B0,0x77B6, -0x77B9,0x77BF,0x77BC,0x77BD,0x77BB,0x77C7,0x77CD,0x77D7, -0x77DA,0x77DC,0x77E3,0x77EE,0x77FC,0x780C,0x7812,0x7926, -0x7820,0x792A,0x7845,0x788E,0x7874,0x7886,0x787C,0x789A, -0x788C,0x78A3,0x78B5,0x78AA,0x78AF,0x78D1,0x78C6,0x78CB, -0x78D4,0x78BE,0x78BC,0x78C5,0x78CA,0x78EC}; - -/* page 59 0x6321-0x637E */ -static uint16 tab_jisx0208_uni59[]={ -0x78E7,0x78DA,0x78FD,0x78F4,0x7907,0x7912,0x7911,0x7919, -0x792C,0x792B,0x7940,0x7960,0x7957,0x795F,0x795A,0x7955, -0x7953,0x797A,0x797F,0x798A,0x799D,0x79A7,0x9F4B,0x79AA, -0x79AE,0x79B3,0x79B9,0x79BA,0x79C9,0x79D5,0x79E7,0x79EC, -0x79E1,0x79E3,0x7A08,0x7A0D,0x7A18,0x7A19,0x7A20,0x7A1F, -0x7980,0x7A31,0x7A3B,0x7A3E,0x7A37,0x7A43,0x7A57,0x7A49, -0x7A61,0x7A62,0x7A69,0x9F9D,0x7A70,0x7A79,0x7A7D,0x7A88, -0x7A97,0x7A95,0x7A98,0x7A96,0x7AA9,0x7AC8,0x7AB0,0x7AB6, -0x7AC5,0x7AC4,0x7ABF,0x9083,0x7AC7,0x7ACA,0x7ACD,0x7ACF, -0x7AD5,0x7AD3,0x7AD9,0x7ADA,0x7ADD,0x7AE1,0x7AE2,0x7AE6, -0x7AED,0x7AF0,0x7B02,0x7B0F,0x7B0A,0x7B06,0x7B33,0x7B18, -0x7B19,0x7B1E,0x7B35,0x7B28,0x7B36,0x7B50}; - -/* page 60 0x6421-0x647E */ -static uint16 tab_jisx0208_uni60[]={ -0x7B7A,0x7B04,0x7B4D,0x7B0B,0x7B4C,0x7B45,0x7B75,0x7B65, -0x7B74,0x7B67,0x7B70,0x7B71,0x7B6C,0x7B6E,0x7B9D,0x7B98, -0x7B9F,0x7B8D,0x7B9C,0x7B9A,0x7B8B,0x7B92,0x7B8F,0x7B5D, -0x7B99,0x7BCB,0x7BC1,0x7BCC,0x7BCF,0x7BB4,0x7BC6,0x7BDD, -0x7BE9,0x7C11,0x7C14,0x7BE6,0x7BE5,0x7C60,0x7C00,0x7C07, -0x7C13,0x7BF3,0x7BF7,0x7C17,0x7C0D,0x7BF6,0x7C23,0x7C27, -0x7C2A,0x7C1F,0x7C37,0x7C2B,0x7C3D,0x7C4C,0x7C43,0x7C54, -0x7C4F,0x7C40,0x7C50,0x7C58,0x7C5F,0x7C64,0x7C56,0x7C65, -0x7C6C,0x7C75,0x7C83,0x7C90,0x7CA4,0x7CAD,0x7CA2,0x7CAB, -0x7CA1,0x7CA8,0x7CB3,0x7CB2,0x7CB1,0x7CAE,0x7CB9,0x7CBD, -0x7CC0,0x7CC5,0x7CC2,0x7CD8,0x7CD2,0x7CDC,0x7CE2,0x9B3B, -0x7CEF,0x7CF2,0x7CF4,0x7CF6,0x7CFA,0x7D06}; - -/* page 61 0x6521-0x657E */ -static uint16 tab_jisx0208_uni61[]={ -0x7D02,0x7D1C,0x7D15,0x7D0A,0x7D45,0x7D4B,0x7D2E,0x7D32, -0x7D3F,0x7D35,0x7D46,0x7D73,0x7D56,0x7D4E,0x7D72,0x7D68, -0x7D6E,0x7D4F,0x7D63,0x7D93,0x7D89,0x7D5B,0x7D8F,0x7D7D, -0x7D9B,0x7DBA,0x7DAE,0x7DA3,0x7DB5,0x7DC7,0x7DBD,0x7DAB, -0x7E3D,0x7DA2,0x7DAF,0x7DDC,0x7DB8,0x7D9F,0x7DB0,0x7DD8, -0x7DDD,0x7DE4,0x7DDE,0x7DFB,0x7DF2,0x7DE1,0x7E05,0x7E0A, -0x7E23,0x7E21,0x7E12,0x7E31,0x7E1F,0x7E09,0x7E0B,0x7E22, -0x7E46,0x7E66,0x7E3B,0x7E35,0x7E39,0x7E43,0x7E37,0x7E32, -0x7E3A,0x7E67,0x7E5D,0x7E56,0x7E5E,0x7E59,0x7E5A,0x7E79, -0x7E6A,0x7E69,0x7E7C,0x7E7B,0x7E83,0x7DD5,0x7E7D,0x8FAE, -0x7E7F,0x7E88,0x7E89,0x7E8C,0x7E92,0x7E90,0x7E93,0x7E94, -0x7E96,0x7E8E,0x7E9B,0x7E9C,0x7F38,0x7F3A}; - -/* page 62 0x6621-0x667E */ -static uint16 tab_jisx0208_uni62[]={ -0x7F45,0x7F4C,0x7F4D,0x7F4E,0x7F50,0x7F51,0x7F55,0x7F54, -0x7F58,0x7F5F,0x7F60,0x7F68,0x7F69,0x7F67,0x7F78,0x7F82, -0x7F86,0x7F83,0x7F88,0x7F87,0x7F8C,0x7F94,0x7F9E,0x7F9D, -0x7F9A,0x7FA3,0x7FAF,0x7FB2,0x7FB9,0x7FAE,0x7FB6,0x7FB8, -0x8B71,0x7FC5,0x7FC6,0x7FCA,0x7FD5,0x7FD4,0x7FE1,0x7FE6, -0x7FE9,0x7FF3,0x7FF9,0x98DC,0x8006,0x8004,0x800B,0x8012, -0x8018,0x8019,0x801C,0x8021,0x8028,0x803F,0x803B,0x804A, -0x8046,0x8052,0x8058,0x805A,0x805F,0x8062,0x8068,0x8073, -0x8072,0x8070,0x8076,0x8079,0x807D,0x807F,0x8084,0x8086, -0x8085,0x809B,0x8093,0x809A,0x80AD,0x5190,0x80AC,0x80DB, -0x80E5,0x80D9,0x80DD,0x80C4,0x80DA,0x80D6,0x8109,0x80EF, -0x80F1,0x811B,0x8129,0x8123,0x812F,0x814B}; - -/* page 63 0x6721-0x677E */ -static uint16 tab_jisx0208_uni63[]={ -0x968B,0x8146,0x813E,0x8153,0x8151,0x80FC,0x8171,0x816E, -0x8165,0x8166,0x8174,0x8183,0x8188,0x818A,0x8180,0x8182, -0x81A0,0x8195,0x81A4,0x81A3,0x815F,0x8193,0x81A9,0x81B0, -0x81B5,0x81BE,0x81B8,0x81BD,0x81C0,0x81C2,0x81BA,0x81C9, -0x81CD,0x81D1,0x81D9,0x81D8,0x81C8,0x81DA,0x81DF,0x81E0, -0x81E7,0x81FA,0x81FB,0x81FE,0x8201,0x8202,0x8205,0x8207, -0x820A,0x820D,0x8210,0x8216,0x8229,0x822B,0x8238,0x8233, -0x8240,0x8259,0x8258,0x825D,0x825A,0x825F,0x8264,0x8262, -0x8268,0x826A,0x826B,0x822E,0x8271,0x8277,0x8278,0x827E, -0x828D,0x8292,0x82AB,0x829F,0x82BB,0x82AC,0x82E1,0x82E3, -0x82DF,0x82D2,0x82F4,0x82F3,0x82FA,0x8393,0x8303,0x82FB, -0x82F9,0x82DE,0x8306,0x82DC,0x8309,0x82D9}; - -/* page 64 0x6821-0x687E */ -static uint16 tab_jisx0208_uni64[]={ -0x8335,0x8334,0x8316,0x8332,0x8331,0x8340,0x8339,0x8350, -0x8345,0x832F,0x832B,0x8317,0x8318,0x8385,0x839A,0x83AA, -0x839F,0x83A2,0x8396,0x8323,0x838E,0x8387,0x838A,0x837C, -0x83B5,0x8373,0x8375,0x83A0,0x8389,0x83A8,0x83F4,0x8413, -0x83EB,0x83CE,0x83FD,0x8403,0x83D8,0x840B,0x83C1,0x83F7, -0x8407,0x83E0,0x83F2,0x840D,0x8422,0x8420,0x83BD,0x8438, -0x8506,0x83FB,0x846D,0x842A,0x843C,0x855A,0x8484,0x8477, -0x846B,0x84AD,0x846E,0x8482,0x8469,0x8446,0x842C,0x846F, -0x8479,0x8435,0x84CA,0x8462,0x84B9,0x84BF,0x849F,0x84D9, -0x84CD,0x84BB,0x84DA,0x84D0,0x84C1,0x84C6,0x84D6,0x84A1, -0x8521,0x84FF,0x84F4,0x8517,0x8518,0x852C,0x851F,0x8515, -0x8514,0x84FC,0x8540,0x8563,0x8558,0x8548}; - -/* page 65 0x6921-0x697E */ -static uint16 tab_jisx0208_uni65[]={ -0x8541,0x8602,0x854B,0x8555,0x8580,0x85A4,0x8588,0x8591, -0x858A,0x85A8,0x856D,0x8594,0x859B,0x85EA,0x8587,0x859C, -0x8577,0x857E,0x8590,0x85C9,0x85BA,0x85CF,0x85B9,0x85D0, -0x85D5,0x85DD,0x85E5,0x85DC,0x85F9,0x860A,0x8613,0x860B, -0x85FE,0x85FA,0x8606,0x8622,0x861A,0x8630,0x863F,0x864D, -0x4E55,0x8654,0x865F,0x8667,0x8671,0x8693,0x86A3,0x86A9, -0x86AA,0x868B,0x868C,0x86B6,0x86AF,0x86C4,0x86C6,0x86B0, -0x86C9,0x8823,0x86AB,0x86D4,0x86DE,0x86E9,0x86EC,0x86DF, -0x86DB,0x86EF,0x8712,0x8706,0x8708,0x8700,0x8703,0x86FB, -0x8711,0x8709,0x870D,0x86F9,0x870A,0x8734,0x873F,0x8737, -0x873B,0x8725,0x8729,0x871A,0x8760,0x875F,0x8778,0x874C, -0x874E,0x8774,0x8757,0x8768,0x876E,0x8759}; - -/* page 66 0x6A21-0x6A7E */ -static uint16 tab_jisx0208_uni66[]={ -0x8753,0x8763,0x876A,0x8805,0x87A2,0x879F,0x8782,0x87AF, -0x87CB,0x87BD,0x87C0,0x87D0,0x96D6,0x87AB,0x87C4,0x87B3, -0x87C7,0x87C6,0x87BB,0x87EF,0x87F2,0x87E0,0x880F,0x880D, -0x87FE,0x87F6,0x87F7,0x880E,0x87D2,0x8811,0x8816,0x8815, -0x8822,0x8821,0x8831,0x8836,0x8839,0x8827,0x883B,0x8844, -0x8842,0x8852,0x8859,0x885E,0x8862,0x886B,0x8881,0x887E, -0x889E,0x8875,0x887D,0x88B5,0x8872,0x8882,0x8897,0x8892, -0x88AE,0x8899,0x88A2,0x888D,0x88A4,0x88B0,0x88BF,0x88B1, -0x88C3,0x88C4,0x88D4,0x88D8,0x88D9,0x88DD,0x88F9,0x8902, -0x88FC,0x88F4,0x88E8,0x88F2,0x8904,0x890C,0x890A,0x8913, -0x8943,0x891E,0x8925,0x892A,0x892B,0x8941,0x8944,0x893B, -0x8936,0x8938,0x894C,0x891D,0x8960,0x895E}; - -/* page 67 0x6B21-0x6B7E */ -static uint16 tab_jisx0208_uni67[]={ -0x8966,0x8964,0x896D,0x896A,0x896F,0x8974,0x8977,0x897E, -0x8983,0x8988,0x898A,0x8993,0x8998,0x89A1,0x89A9,0x89A6, -0x89AC,0x89AF,0x89B2,0x89BA,0x89BD,0x89BF,0x89C0,0x89DA, -0x89DC,0x89DD,0x89E7,0x89F4,0x89F8,0x8A03,0x8A16,0x8A10, -0x8A0C,0x8A1B,0x8A1D,0x8A25,0x8A36,0x8A41,0x8A5B,0x8A52, -0x8A46,0x8A48,0x8A7C,0x8A6D,0x8A6C,0x8A62,0x8A85,0x8A82, -0x8A84,0x8AA8,0x8AA1,0x8A91,0x8AA5,0x8AA6,0x8A9A,0x8AA3, -0x8AC4,0x8ACD,0x8AC2,0x8ADA,0x8AEB,0x8AF3,0x8AE7,0x8AE4, -0x8AF1,0x8B14,0x8AE0,0x8AE2,0x8AF7,0x8ADE,0x8ADB,0x8B0C, -0x8B07,0x8B1A,0x8AE1,0x8B16,0x8B10,0x8B17,0x8B20,0x8B33, -0x97AB,0x8B26,0x8B2B,0x8B3E,0x8B28,0x8B41,0x8B4C,0x8B4F, -0x8B4E,0x8B49,0x8B56,0x8B5B,0x8B5A,0x8B6B}; - -/* page 68 0x6C21-0x6C7E */ -static uint16 tab_jisx0208_uni68[]={ -0x8B5F,0x8B6C,0x8B6F,0x8B74,0x8B7D,0x8B80,0x8B8C,0x8B8E, -0x8B92,0x8B93,0x8B96,0x8B99,0x8B9A,0x8C3A,0x8C41,0x8C3F, -0x8C48,0x8C4C,0x8C4E,0x8C50,0x8C55,0x8C62,0x8C6C,0x8C78, -0x8C7A,0x8C82,0x8C89,0x8C85,0x8C8A,0x8C8D,0x8C8E,0x8C94, -0x8C7C,0x8C98,0x621D,0x8CAD,0x8CAA,0x8CBD,0x8CB2,0x8CB3, -0x8CAE,0x8CB6,0x8CC8,0x8CC1,0x8CE4,0x8CE3,0x8CDA,0x8CFD, -0x8CFA,0x8CFB,0x8D04,0x8D05,0x8D0A,0x8D07,0x8D0F,0x8D0D, -0x8D10,0x9F4E,0x8D13,0x8CCD,0x8D14,0x8D16,0x8D67,0x8D6D, -0x8D71,0x8D73,0x8D81,0x8D99,0x8DC2,0x8DBE,0x8DBA,0x8DCF, -0x8DDA,0x8DD6,0x8DCC,0x8DDB,0x8DCB,0x8DEA,0x8DEB,0x8DDF, -0x8DE3,0x8DFC,0x8E08,0x8E09,0x8DFF,0x8E1D,0x8E1E,0x8E10, -0x8E1F,0x8E42,0x8E35,0x8E30,0x8E34,0x8E4A}; - -/* page 69 0x6D21-0x6D7E */ -static uint16 tab_jisx0208_uni69[]={ -0x8E47,0x8E49,0x8E4C,0x8E50,0x8E48,0x8E59,0x8E64,0x8E60, -0x8E2A,0x8E63,0x8E55,0x8E76,0x8E72,0x8E7C,0x8E81,0x8E87, -0x8E85,0x8E84,0x8E8B,0x8E8A,0x8E93,0x8E91,0x8E94,0x8E99, -0x8EAA,0x8EA1,0x8EAC,0x8EB0,0x8EC6,0x8EB1,0x8EBE,0x8EC5, -0x8EC8,0x8ECB,0x8EDB,0x8EE3,0x8EFC,0x8EFB,0x8EEB,0x8EFE, -0x8F0A,0x8F05,0x8F15,0x8F12,0x8F19,0x8F13,0x8F1C,0x8F1F, -0x8F1B,0x8F0C,0x8F26,0x8F33,0x8F3B,0x8F39,0x8F45,0x8F42, -0x8F3E,0x8F4C,0x8F49,0x8F46,0x8F4E,0x8F57,0x8F5C,0x8F62, -0x8F63,0x8F64,0x8F9C,0x8F9F,0x8FA3,0x8FAD,0x8FAF,0x8FB7, -0x8FDA,0x8FE5,0x8FE2,0x8FEA,0x8FEF,0x9087,0x8FF4,0x9005, -0x8FF9,0x8FFA,0x9011,0x9015,0x9021,0x900D,0x901E,0x9016, -0x900B,0x9027,0x9036,0x9035,0x9039,0x8FF8}; - -/* page 70 0x6E21-0x6E7E */ -static uint16 tab_jisx0208_uni70[]={ -0x904F,0x9050,0x9051,0x9052,0x900E,0x9049,0x903E,0x9056, -0x9058,0x905E,0x9068,0x906F,0x9076,0x96A8,0x9072,0x9082, -0x907D,0x9081,0x9080,0x908A,0x9089,0x908F,0x90A8,0x90AF, -0x90B1,0x90B5,0x90E2,0x90E4,0x6248,0x90DB,0x9102,0x9112, -0x9119,0x9132,0x9130,0x914A,0x9156,0x9158,0x9163,0x9165, -0x9169,0x9173,0x9172,0x918B,0x9189,0x9182,0x91A2,0x91AB, -0x91AF,0x91AA,0x91B5,0x91B4,0x91BA,0x91C0,0x91C1,0x91C9, -0x91CB,0x91D0,0x91D6,0x91DF,0x91E1,0x91DB,0x91FC,0x91F5, -0x91F6,0x921E,0x91FF,0x9214,0x922C,0x9215,0x9211,0x925E, -0x9257,0x9245,0x9249,0x9264,0x9248,0x9295,0x923F,0x924B, -0x9250,0x929C,0x9296,0x9293,0x929B,0x925A,0x92CF,0x92B9, -0x92B7,0x92E9,0x930F,0x92FA,0x9344,0x932E}; - -/* page 71 0x6F21-0x6F7E */ -static uint16 tab_jisx0208_uni71[]={ -0x9319,0x9322,0x931A,0x9323,0x933A,0x9335,0x933B,0x935C, -0x9360,0x937C,0x936E,0x9356,0x93B0,0x93AC,0x93AD,0x9394, -0x93B9,0x93D6,0x93D7,0x93E8,0x93E5,0x93D8,0x93C3,0x93DD, -0x93D0,0x93C8,0x93E4,0x941A,0x9414,0x9413,0x9403,0x9407, -0x9410,0x9436,0x942B,0x9435,0x9421,0x943A,0x9441,0x9452, -0x9444,0x945B,0x9460,0x9462,0x945E,0x946A,0x9229,0x9470, -0x9475,0x9477,0x947D,0x945A,0x947C,0x947E,0x9481,0x947F, -0x9582,0x9587,0x958A,0x9594,0x9596,0x9598,0x9599,0x95A0, -0x95A8,0x95A7,0x95AD,0x95BC,0x95BB,0x95B9,0x95BE,0x95CA, -0x6FF6,0x95C3,0x95CD,0x95CC,0x95D5,0x95D4,0x95D6,0x95DC, -0x95E1,0x95E5,0x95E2,0x9621,0x9628,0x962E,0x962F,0x9642, -0x964C,0x964F,0x964B,0x9677,0x965C,0x965E}; - -/* page 72 0x7021-0x707E */ -static uint16 tab_jisx0208_uni72[]={ -0x965D,0x965F,0x9666,0x9672,0x966C,0x968D,0x9698,0x9695, -0x9697,0x96AA,0x96A7,0x96B1,0x96B2,0x96B0,0x96B4,0x96B6, -0x96B8,0x96B9,0x96CE,0x96CB,0x96C9,0x96CD,0x894D,0x96DC, -0x970D,0x96D5,0x96F9,0x9704,0x9706,0x9708,0x9713,0x970E, -0x9711,0x970F,0x9716,0x9719,0x9724,0x972A,0x9730,0x9739, -0x973D,0x973E,0x9744,0x9746,0x9748,0x9742,0x9749,0x975C, -0x9760,0x9764,0x9766,0x9768,0x52D2,0x976B,0x9771,0x9779, -0x9785,0x977C,0x9781,0x977A,0x9786,0x978B,0x978F,0x9790, -0x979C,0x97A8,0x97A6,0x97A3,0x97B3,0x97B4,0x97C3,0x97C6, -0x97C8,0x97CB,0x97DC,0x97ED,0x9F4F,0x97F2,0x7ADF,0x97F6, -0x97F5,0x980F,0x980C,0x9838,0x9824,0x9821,0x9837,0x983D, -0x9846,0x984F,0x984B,0x986B,0x986F,0x9870}; - -/* page 73 0x7121-0x717E */ -static uint16 tab_jisx0208_uni73[]={ -0x9871,0x9874,0x9873,0x98AA,0x98AF,0x98B1,0x98B6,0x98C4, -0x98C3,0x98C6,0x98E9,0x98EB,0x9903,0x9909,0x9912,0x9914, -0x9918,0x9921,0x991D,0x991E,0x9924,0x9920,0x992C,0x992E, -0x993D,0x993E,0x9942,0x9949,0x9945,0x9950,0x994B,0x9951, -0x9952,0x994C,0x9955,0x9997,0x9998,0x99A5,0x99AD,0x99AE, -0x99BC,0x99DF,0x99DB,0x99DD,0x99D8,0x99D1,0x99ED,0x99EE, -0x99F1,0x99F2,0x99FB,0x99F8,0x9A01,0x9A0F,0x9A05,0x99E2, -0x9A19,0x9A2B,0x9A37,0x9A45,0x9A42,0x9A40,0x9A43,0x9A3E, -0x9A55,0x9A4D,0x9A5B,0x9A57,0x9A5F,0x9A62,0x9A65,0x9A64, -0x9A69,0x9A6B,0x9A6A,0x9AAD,0x9AB0,0x9ABC,0x9AC0,0x9ACF, -0x9AD1,0x9AD3,0x9AD4,0x9ADE,0x9ADF,0x9AE2,0x9AE3,0x9AE6, -0x9AEF,0x9AEB,0x9AEE,0x9AF4,0x9AF1,0x9AF7}; - -/* page 74 0x7221-0x727E */ -static uint16 tab_jisx0208_uni74[]={ -0x9AFB,0x9B06,0x9B18,0x9B1A,0x9B1F,0x9B22,0x9B23,0x9B25, -0x9B27,0x9B28,0x9B29,0x9B2A,0x9B2E,0x9B2F,0x9B32,0x9B44, -0x9B43,0x9B4F,0x9B4D,0x9B4E,0x9B51,0x9B58,0x9B74,0x9B93, -0x9B83,0x9B91,0x9B96,0x9B97,0x9B9F,0x9BA0,0x9BA8,0x9BB4, -0x9BC0,0x9BCA,0x9BB9,0x9BC6,0x9BCF,0x9BD1,0x9BD2,0x9BE3, -0x9BE2,0x9BE4,0x9BD4,0x9BE1,0x9C3A,0x9BF2,0x9BF1,0x9BF0, -0x9C15,0x9C14,0x9C09,0x9C13,0x9C0C,0x9C06,0x9C08,0x9C12, -0x9C0A,0x9C04,0x9C2E,0x9C1B,0x9C25,0x9C24,0x9C21,0x9C30, -0x9C47,0x9C32,0x9C46,0x9C3E,0x9C5A,0x9C60,0x9C67,0x9C76, -0x9C78,0x9CE7,0x9CEC,0x9CF0,0x9D09,0x9D08,0x9CEB,0x9D03, -0x9D06,0x9D2A,0x9D26,0x9DAF,0x9D23,0x9D1F,0x9D44,0x9D15, -0x9D12,0x9D41,0x9D3F,0x9D3E,0x9D46,0x9D48}; - -/* page 75 0x7321-0x737E */ -static uint16 tab_jisx0208_uni75[]={ -0x9D5D,0x9D5E,0x9D64,0x9D51,0x9D50,0x9D59,0x9D72,0x9D89, -0x9D87,0x9DAB,0x9D6F,0x9D7A,0x9D9A,0x9DA4,0x9DA9,0x9DB2, -0x9DC4,0x9DC1,0x9DBB,0x9DB8,0x9DBA,0x9DC6,0x9DCF,0x9DC2, -0x9DD9,0x9DD3,0x9DF8,0x9DE6,0x9DED,0x9DEF,0x9DFD,0x9E1A, -0x9E1B,0x9E1E,0x9E75,0x9E79,0x9E7D,0x9E81,0x9E88,0x9E8B, -0x9E8C,0x9E92,0x9E95,0x9E91,0x9E9D,0x9EA5,0x9EA9,0x9EB8, -0x9EAA,0x9EAD,0x9761,0x9ECC,0x9ECE,0x9ECF,0x9ED0,0x9ED4, -0x9EDC,0x9EDE,0x9EDD,0x9EE0,0x9EE5,0x9EE8,0x9EEF,0x9EF4, -0x9EF6,0x9EF7,0x9EF9,0x9EFB,0x9EFC,0x9EFD,0x9F07,0x9F08, -0x76B7,0x9F15,0x9F21,0x9F2C,0x9F3E,0x9F4A,0x9F52,0x9F54, -0x9F63,0x9F5F,0x9F60,0x9F61,0x9F66,0x9F67,0x9F6C,0x9F6A, -0x9F77,0x9F72,0x9F76,0x9F95,0x9F9C,0x9FA0}; - -/* page 76 0x7421-0x7426 */ -static uint16 tab_jisx0208_uni76[]={ -0x582F,0x69C7,0x9059,0x7464,0x51DC,0x7199}; - -static int -my_jisx0208_uni_onechar(int code){ - if ((code>=0x2121)&&(code<=0x217E)) - return(tab_jisx0208_uni0[code-0x2121]); - if ((code>=0x2221)&&(code<=0x227E)) - return(tab_jisx0208_uni1[code-0x2221]); - if ((code>=0x2330)&&(code<=0x237A)) - return(tab_jisx0208_uni2[code-0x2330]); - if ((code>=0x2421)&&(code<=0x2473)) - return(tab_jisx0208_uni3[code-0x2421]); - if ((code>=0x2521)&&(code<=0x2576)) - return(tab_jisx0208_uni4[code-0x2521]); - if ((code>=0x2621)&&(code<=0x2658)) - return(tab_jisx0208_uni5[code-0x2621]); - if ((code>=0x2721)&&(code<=0x2771)) - return(tab_jisx0208_uni6[code-0x2721]); - if ((code>=0x2821)&&(code<=0x2840)) - return(tab_jisx0208_uni7[code-0x2821]); - if ((code>=0x3021)&&(code<=0x307E)) - return(tab_jisx0208_uni8[code-0x3021]); - if ((code>=0x3121)&&(code<=0x317E)) - return(tab_jisx0208_uni9[code-0x3121]); - if ((code>=0x3221)&&(code<=0x327E)) - return(tab_jisx0208_uni10[code-0x3221]); - if ((code>=0x3321)&&(code<=0x337E)) - return(tab_jisx0208_uni11[code-0x3321]); - if ((code>=0x3421)&&(code<=0x347E)) - return(tab_jisx0208_uni12[code-0x3421]); - if ((code>=0x3521)&&(code<=0x357E)) - return(tab_jisx0208_uni13[code-0x3521]); - if ((code>=0x3621)&&(code<=0x367E)) - return(tab_jisx0208_uni14[code-0x3621]); - if ((code>=0x3721)&&(code<=0x377E)) - return(tab_jisx0208_uni15[code-0x3721]); - if ((code>=0x3821)&&(code<=0x387E)) - return(tab_jisx0208_uni16[code-0x3821]); - if ((code>=0x3921)&&(code<=0x397E)) - return(tab_jisx0208_uni17[code-0x3921]); - if ((code>=0x3A21)&&(code<=0x3A7E)) - return(tab_jisx0208_uni18[code-0x3A21]); - if ((code>=0x3B21)&&(code<=0x3B7E)) - return(tab_jisx0208_uni19[code-0x3B21]); - if ((code>=0x3C21)&&(code<=0x3C7E)) - return(tab_jisx0208_uni20[code-0x3C21]); - if ((code>=0x3D21)&&(code<=0x3D7E)) - return(tab_jisx0208_uni21[code-0x3D21]); - if ((code>=0x3E21)&&(code<=0x3E7E)) - return(tab_jisx0208_uni22[code-0x3E21]); - if ((code>=0x3F21)&&(code<=0x3F7E)) - return(tab_jisx0208_uni23[code-0x3F21]); - if ((code>=0x4021)&&(code<=0x407E)) - return(tab_jisx0208_uni24[code-0x4021]); - if ((code>=0x4121)&&(code<=0x417E)) - return(tab_jisx0208_uni25[code-0x4121]); - if ((code>=0x4221)&&(code<=0x427E)) - return(tab_jisx0208_uni26[code-0x4221]); - if ((code>=0x4321)&&(code<=0x437E)) - return(tab_jisx0208_uni27[code-0x4321]); - if ((code>=0x4421)&&(code<=0x447E)) - return(tab_jisx0208_uni28[code-0x4421]); - if ((code>=0x4521)&&(code<=0x457E)) - return(tab_jisx0208_uni29[code-0x4521]); - if ((code>=0x4621)&&(code<=0x467E)) - return(tab_jisx0208_uni30[code-0x4621]); - if ((code>=0x4721)&&(code<=0x477E)) - return(tab_jisx0208_uni31[code-0x4721]); - if ((code>=0x4821)&&(code<=0x487E)) - return(tab_jisx0208_uni32[code-0x4821]); - if ((code>=0x4921)&&(code<=0x497E)) - return(tab_jisx0208_uni33[code-0x4921]); - if ((code>=0x4A21)&&(code<=0x4A7E)) - return(tab_jisx0208_uni34[code-0x4A21]); - if ((code>=0x4B21)&&(code<=0x4B7E)) - return(tab_jisx0208_uni35[code-0x4B21]); - if ((code>=0x4C21)&&(code<=0x4C7E)) - return(tab_jisx0208_uni36[code-0x4C21]); - if ((code>=0x4D21)&&(code<=0x4D7E)) - return(tab_jisx0208_uni37[code-0x4D21]); - if ((code>=0x4E21)&&(code<=0x4E7E)) - return(tab_jisx0208_uni38[code-0x4E21]); - if ((code>=0x4F21)&&(code<=0x4F53)) - return(tab_jisx0208_uni39[code-0x4F21]); - if ((code>=0x5021)&&(code<=0x507E)) - return(tab_jisx0208_uni40[code-0x5021]); - if ((code>=0x5121)&&(code<=0x517E)) - return(tab_jisx0208_uni41[code-0x5121]); - if ((code>=0x5221)&&(code<=0x527E)) - return(tab_jisx0208_uni42[code-0x5221]); - if ((code>=0x5321)&&(code<=0x537E)) - return(tab_jisx0208_uni43[code-0x5321]); - if ((code>=0x5421)&&(code<=0x547E)) - return(tab_jisx0208_uni44[code-0x5421]); - if ((code>=0x5521)&&(code<=0x557E)) - return(tab_jisx0208_uni45[code-0x5521]); - if ((code>=0x5621)&&(code<=0x567E)) - return(tab_jisx0208_uni46[code-0x5621]); - if ((code>=0x5721)&&(code<=0x577E)) - return(tab_jisx0208_uni47[code-0x5721]); - if ((code>=0x5821)&&(code<=0x587E)) - return(tab_jisx0208_uni48[code-0x5821]); - if ((code>=0x5921)&&(code<=0x597E)) - return(tab_jisx0208_uni49[code-0x5921]); - if ((code>=0x5A21)&&(code<=0x5A7E)) - return(tab_jisx0208_uni50[code-0x5A21]); - if ((code>=0x5B21)&&(code<=0x5B7E)) - return(tab_jisx0208_uni51[code-0x5B21]); - if ((code>=0x5C21)&&(code<=0x5C7E)) - return(tab_jisx0208_uni52[code-0x5C21]); - if ((code>=0x5D21)&&(code<=0x5D7E)) - return(tab_jisx0208_uni53[code-0x5D21]); - if ((code>=0x5E21)&&(code<=0x5E7E)) - return(tab_jisx0208_uni54[code-0x5E21]); - if ((code>=0x5F21)&&(code<=0x5F7E)) - return(tab_jisx0208_uni55[code-0x5F21]); - if ((code>=0x6021)&&(code<=0x607E)) - return(tab_jisx0208_uni56[code-0x6021]); - if ((code>=0x6121)&&(code<=0x617E)) - return(tab_jisx0208_uni57[code-0x6121]); - if ((code>=0x6221)&&(code<=0x627E)) - return(tab_jisx0208_uni58[code-0x6221]); - if ((code>=0x6321)&&(code<=0x637E)) - return(tab_jisx0208_uni59[code-0x6321]); - if ((code>=0x6421)&&(code<=0x647E)) - return(tab_jisx0208_uni60[code-0x6421]); - if ((code>=0x6521)&&(code<=0x657E)) - return(tab_jisx0208_uni61[code-0x6521]); - if ((code>=0x6621)&&(code<=0x667E)) - return(tab_jisx0208_uni62[code-0x6621]); - if ((code>=0x6721)&&(code<=0x677E)) - return(tab_jisx0208_uni63[code-0x6721]); - if ((code>=0x6821)&&(code<=0x687E)) - return(tab_jisx0208_uni64[code-0x6821]); - if ((code>=0x6921)&&(code<=0x697E)) - return(tab_jisx0208_uni65[code-0x6921]); - if ((code>=0x6A21)&&(code<=0x6A7E)) - return(tab_jisx0208_uni66[code-0x6A21]); - if ((code>=0x6B21)&&(code<=0x6B7E)) - return(tab_jisx0208_uni67[code-0x6B21]); - if ((code>=0x6C21)&&(code<=0x6C7E)) - return(tab_jisx0208_uni68[code-0x6C21]); - if ((code>=0x6D21)&&(code<=0x6D7E)) - return(tab_jisx0208_uni69[code-0x6D21]); - if ((code>=0x6E21)&&(code<=0x6E7E)) - return(tab_jisx0208_uni70[code-0x6E21]); - if ((code>=0x6F21)&&(code<=0x6F7E)) - return(tab_jisx0208_uni71[code-0x6F21]); - if ((code>=0x7021)&&(code<=0x707E)) - return(tab_jisx0208_uni72[code-0x7021]); - if ((code>=0x7121)&&(code<=0x717E)) - return(tab_jisx0208_uni73[code-0x7121]); - if ((code>=0x7221)&&(code<=0x727E)) - return(tab_jisx0208_uni74[code-0x7221]); - if ((code>=0x7321)&&(code<=0x737E)) - return(tab_jisx0208_uni75[code-0x7321]); - if ((code>=0x7421)&&(code<=0x7426)) - return(tab_jisx0208_uni76[code-0x7421]); - return(0); -} - - -/* page 0 0x005C-0x005C */ -static uint16 tab_uni_jisx02080[]={ -0x2140}; - -/* page 1 0x00A2-0x00B6 */ -static uint16 tab_uni_jisx02081[]={ -0x2171,0x2172, 0, 0, 0,0x2178,0x212F, 0, - 0, 0,0x224C, 0, 0, 0,0x216B,0x215E, - 0, 0,0x212D, 0,0x2279}; - -/* page 2 0x00D7-0x00D7 */ -static uint16 tab_uni_jisx02082[]={ -0x215F}; - -/* page 3 0x00F7-0x00F7 */ -static uint16 tab_uni_jisx02083[]={ -0x2160}; - -/* page 4 0x0391-0x03C9 */ -static uint16 tab_uni_jisx02084[]={ -0x2621,0x2622,0x2623,0x2624,0x2625,0x2626,0x2627,0x2628, -0x2629,0x262A,0x262B,0x262C,0x262D,0x262E,0x262F,0x2630, -0x2631, 0,0x2632,0x2633,0x2634,0x2635,0x2636,0x2637, -0x2638, 0, 0, 0, 0, 0, 0, 0, -0x2641,0x2642,0x2643,0x2644,0x2645,0x2646,0x2647,0x2648, -0x2649,0x264A,0x264B,0x264C,0x264D,0x264E,0x264F,0x2650, -0x2651, 0,0x2652,0x2653,0x2654,0x2655,0x2656,0x2657, -0x2658}; - -/* page 5 0x0401-0x0451 */ -static uint16 tab_uni_jisx02085[]={ -0x2727, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x2721, -0x2722,0x2723,0x2724,0x2725,0x2726,0x2728,0x2729,0x272A, -0x272B,0x272C,0x272D,0x272E,0x272F,0x2730,0x2731,0x2732, -0x2733,0x2734,0x2735,0x2736,0x2737,0x2738,0x2739,0x273A, -0x273B,0x273C,0x273D,0x273E,0x273F,0x2740,0x2741,0x2751, -0x2752,0x2753,0x2754,0x2755,0x2756,0x2758,0x2759,0x275A, -0x275B,0x275C,0x275D,0x275E,0x275F,0x2760,0x2761,0x2762, -0x2763,0x2764,0x2765,0x2766,0x2767,0x2768,0x2769,0x276A, -0x276B,0x276C,0x276D,0x276E,0x276F,0x2770,0x2771, 0, -0x2757}; - -/* page 6 0x2010-0x203B */ -static uint16 tab_uni_jisx02086[]={ -0x213E, 0, 0, 0, 0,0x213D,0x2142, 0, -0x2146,0x2147, 0, 0,0x2148,0x2149, 0, 0, -0x2277,0x2278, 0, 0, 0,0x2145,0x2144, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2273, 0,0x216C,0x216D, 0, 0, 0, 0, - 0, 0, 0,0x2228}; - -/* page 7 0x2103-0x2103 */ -static uint16 tab_uni_jisx02087[]={ -0x216E}; - -/* page 8 0x212B-0x212B */ -static uint16 tab_uni_jisx02088[]={ -0x2272}; - -/* page 9 0x2190-0x2193 */ -static uint16 tab_uni_jisx02089[]={ -0x222B,0x222C,0x222A,0x222D}; - -/* page 10 0x21D2-0x21D4 */ -static uint16 tab_uni_jisx020810[]={ -0x224D, 0,0x224E}; - -/* page 11 0x2200-0x223D */ -static uint16 tab_uni_jisx020811[]={ -0x224F, 0,0x225F,0x2250, 0, 0, 0,0x2260, -0x223A, 0, 0,0x223B, 0, 0, 0, 0, - 0, 0,0x215D, 0, 0, 0, 0, 0, - 0, 0,0x2265, 0, 0,0x2267,0x2167, 0, -0x225C, 0, 0, 0, 0, 0, 0,0x224A, -0x224B,0x2241,0x2240,0x2269,0x226A, 0, 0, 0, - 0, 0, 0, 0,0x2168,0x2268, 0, 0, - 0, 0, 0, 0, 0,0x2266}; - -/* page 12 0x2252-0x226B */ -static uint16 tab_uni_jisx020812[]={ -0x2262, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x2162,0x2261, - 0, 0, 0, 0,0x2165,0x2166, 0, 0, -0x2263,0x2264}; - -/* page 13 0x2282-0x2287 */ -static uint16 tab_uni_jisx020813[]={ -0x223E,0x223F, 0, 0,0x223C,0x223D}; - -/* page 14 0x22A5-0x22A5 */ -static uint16 tab_uni_jisx020814[]={ -0x225D}; - -/* page 15 0x2312-0x2312 */ -static uint16 tab_uni_jisx020815[]={ -0x225E}; - -/* page 16 0x2500-0x254B */ -static uint16 tab_uni_jisx020816[]={ -0x2821,0x282C,0x2822,0x282D, 0, 0, 0, 0, - 0, 0, 0, 0,0x2823, 0, 0,0x282E, -0x2824, 0, 0,0x282F,0x2826, 0, 0,0x2831, -0x2825, 0, 0,0x2830,0x2827,0x283C, 0, 0, -0x2837, 0, 0,0x2832,0x2829,0x283E, 0, 0, -0x2839, 0, 0,0x2834,0x2828, 0, 0,0x2838, -0x283D, 0, 0,0x2833,0x282A, 0, 0,0x283A, -0x283F, 0, 0,0x2835,0x282B, 0, 0,0x283B, - 0, 0,0x2840, 0, 0, 0, 0, 0, - 0, 0, 0,0x2836}; - -/* page 17 0x25A0-0x25CF */ -static uint16 tab_uni_jisx020817[]={ -0x2223,0x2222, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x2225,0x2224, 0, 0, 0, 0, - 0, 0, 0, 0,0x2227,0x2226, 0, 0, - 0, 0, 0, 0, 0, 0,0x2221,0x217E, - 0, 0, 0,0x217B, 0, 0,0x217D,0x217C -}; - -/* page 18 0x25EF-0x25EF */ -static uint16 tab_uni_jisx020818[]={ -0x227E}; - -/* page 19 0x2605-0x2606 */ -static uint16 tab_uni_jisx020819[]={ -0x217A,0x2179}; - -/* page 20 0x2640-0x2642 */ -static uint16 tab_uni_jisx020820[]={ -0x216A, 0,0x2169}; - -/* page 21 0x266A-0x266F */ -static uint16 tab_uni_jisx020821[]={ -0x2276, 0, 0,0x2275, 0,0x2274}; - -/* page 22 0x3000-0x301C */ -static uint16 tab_uni_jisx020822[]={ -0x2121,0x2122,0x2123,0x2137, 0,0x2139,0x213A,0x213B, -0x2152,0x2153,0x2154,0x2155,0x2156,0x2157,0x2158,0x2159, -0x215A,0x215B,0x2229,0x222E,0x214C,0x214D, 0, 0, - 0, 0, 0, 0,0x2141}; - -/* page 23 0x3041-0x30FE */ -static uint16 tab_uni_jisx020823[]={ -0x2421,0x2422,0x2423,0x2424,0x2425,0x2426,0x2427,0x2428, -0x2429,0x242A,0x242B,0x242C,0x242D,0x242E,0x242F,0x2430, -0x2431,0x2432,0x2433,0x2434,0x2435,0x2436,0x2437,0x2438, -0x2439,0x243A,0x243B,0x243C,0x243D,0x243E,0x243F,0x2440, -0x2441,0x2442,0x2443,0x2444,0x2445,0x2446,0x2447,0x2448, -0x2449,0x244A,0x244B,0x244C,0x244D,0x244E,0x244F,0x2450, -0x2451,0x2452,0x2453,0x2454,0x2455,0x2456,0x2457,0x2458, -0x2459,0x245A,0x245B,0x245C,0x245D,0x245E,0x245F,0x2460, -0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468, -0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,0x2470, -0x2471,0x2472,0x2473, 0, 0, 0, 0, 0, - 0, 0,0x212B,0x212C,0x2135,0x2136, 0, 0, -0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528, -0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530, -0x2531,0x2532,0x2533,0x2534,0x2535,0x2536,0x2537,0x2538, -0x2539,0x253A,0x253B,0x253C,0x253D,0x253E,0x253F,0x2540, -0x2541,0x2542,0x2543,0x2544,0x2545,0x2546,0x2547,0x2548, -0x2549,0x254A,0x254B,0x254C,0x254D,0x254E,0x254F,0x2550, -0x2551,0x2552,0x2553,0x2554,0x2555,0x2556,0x2557,0x2558, -0x2559,0x255A,0x255B,0x255C,0x255D,0x255E,0x255F,0x2560, -0x2561,0x2562,0x2563,0x2564,0x2565,0x2566,0x2567,0x2568, -0x2569,0x256A,0x256B,0x256C,0x256D,0x256E,0x256F,0x2570, -0x2571,0x2572,0x2573,0x2574,0x2575,0x2576, 0, 0, - 0, 0,0x2126,0x213C,0x2133,0x2134}; - -/* page 24 0x4E00-0x5516 */ -static uint16 tab_uni_jisx020824[]={ -0x306C,0x437A, 0,0x3C37, 0, 0, 0,0x4B7C, -0x3E66,0x3B30,0x3E65,0x323C, 0,0x4954,0x4D3F, 0, -0x5022,0x312F, 0, 0,0x336E,0x5023,0x4024,0x5242, -0x3556,0x4A3A, 0, 0, 0, 0,0x3E67, 0, - 0,0x4E3E, 0, 0, 0, 0,0x4A42, 0, - 0, 0,0x5024, 0, 0,0x4366, 0, 0, - 0,0x5025,0x367A, 0, 0, 0,0x5026, 0, -0x345D,0x4330, 0,0x3C67,0x5027, 0, 0,0x5028, - 0, 0,0x5029,0x4735, 0,0x3557, 0, 0, - 0, 0, 0,0x4737, 0,0x4663,0x3843,0x4B33, - 0, 0, 0, 0, 0,0x6949,0x502A,0x3E68, -0x502B,0x3235, 0, 0, 0,0x3665,0x3870,0x4C69, - 0, 0,0x5626, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4D70, 0,0x467D, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3425, 0, -0x3535, 0,0x502C, 0, 0,0x502D,0x4E3B, 0, -0x4D3D,0x4168,0x502F,0x3B76,0x4673, 0,0x5032, 0, - 0,0x313E,0x385F, 0,0x385E,0x3066, 0, 0, -0x4F4B,0x4F4A, 0,0x3A33,0x3021, 0,0x5033,0x5034, -0x5035,0x4B34,0x5036, 0,0x3872,0x3067,0x4B72, 0, -0x357C, 0, 0,0x357D,0x357E,0x4462,0x4E3C, 0, -0x5037, 0, 0,0x5038, 0, 0,0x5039, 0, - 0, 0,0x3F4D, 0, 0, 0, 0, 0, -0x3D3A,0x3F4E,0x503E, 0,0x503C, 0,0x503D,0x3558, - 0, 0,0x3A23,0x3270, 0,0x503B,0x503A,0x4A29, - 0, 0, 0, 0,0x3B46,0x3B45,0x423E,0x503F, -0x4955,0x4067, 0, 0, 0,0x2138,0x5040,0x5042, - 0, 0, 0,0x4265,0x4E61,0x304A, 0, 0, - 0, 0, 0, 0, 0,0x5041,0x323E, 0, -0x3644, 0,0x4367, 0, 0, 0,0x376F,0x5043, - 0, 0, 0,0x4724, 0, 0, 0, 0, - 0,0x346B, 0, 0, 0, 0, 0, 0, - 0,0x5044,0x304B, 0, 0,0x3860,0x346C,0x497A, -0x4832,0x3559, 0, 0, 0, 0, 0, 0, - 0, 0,0x3271, 0,0x5067,0x4541, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x476C, -0x5046, 0, 0, 0,0x483C, 0,0x4E62, 0, -0x3F2D, 0,0x3B47, 0,0x3B77,0x3240, 0, 0, - 0, 0, 0,0x4451, 0, 0,0x4322,0x504A, - 0, 0, 0, 0, 0,0x304C,0x4463,0x3D3B, -0x3A34,0x4D24, 0,0x424E, 0,0x323F, 0,0x5049, - 0,0x4D3E,0x5045,0x5047,0x3A6E,0x5048,0x5524, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5050, 0, 0, 0, 0, 0,0x5053, -0x5051, 0, 0,0x3242, 0,0x4A3B,0x504B, 0, - 0, 0, 0,0x504F,0x3873, 0, 0,0x3B48, - 0, 0, 0,0x3426, 0, 0,0x5054, 0, -0x504C, 0, 0,0x4E63, 0,0x3B78, 0,0x504D, - 0,0x5052, 0, 0, 0, 0,0x5055, 0, -0x504E, 0, 0,0x3621, 0,0x304D, 0, 0, -0x3622,0x3241, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5525, 0,0x4B79,0x496E,0x3874, - 0, 0, 0, 0, 0,0x3F2F,0x4E37, 0, - 0, 0, 0, 0, 0, 0, 0,0x4A58, - 0, 0,0x3738,0x4225,0x3264, 0, 0, 0, - 0, 0,0x3D53, 0, 0, 0,0x5059, 0, -0x505E,0x505C, 0, 0,0x5057, 0, 0,0x422F, -0x505A, 0,0x505D,0x505B, 0,0x4A5D, 0,0x5058, - 0,0x3F2E, 0,0x4B73,0x505F,0x5060, 0, 0, - 0, 0, 0, 0, 0, 0,0x3D24,0x506D, - 0, 0, 0,0x4750, 0,0x4936,0x5068, 0, -0x4A70, 0,0x3236, 0, 0, 0,0x506C, 0, - 0, 0, 0, 0, 0,0x5066,0x506F, 0, - 0,0x4152, 0,0x3844, 0,0x475C, 0,0x6047, - 0,0x506E,0x455D, 0,0x5063, 0,0x3876, 0, - 0,0x3875,0x5061, 0, 0, 0, 0,0x3C5A, - 0,0x5069, 0,0x4A6F,0x434D,0x5065,0x3771, 0, -0x5062,0x506A,0x5064,0x4E51,0x506B,0x4F41, 0, 0, - 0, 0, 0, 0, 0, 0,0x3666, 0, - 0,0x3770, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5070, 0, 0, 0,0x5071, -0x5075,0x304E, 0, 0, 0, 0, 0,0x4A50, -0x5074, 0, 0, 0, 0,0x5073,0x5077, 0, - 0, 0,0x5076, 0,0x4464, 0, 0, 0, - 0, 0, 0, 0, 0,0x3772, 0, 0, - 0, 0, 0, 0,0x5078, 0, 0, 0, - 0, 0,0x3C45, 0,0x4226,0x4465,0x3676, 0, -0x5079, 0, 0, 0, 0,0x3536, 0, 0, -0x507A, 0, 0, 0, 0,0x507C, 0, 0, - 0, 0, 0, 0, 0,0x4B35, 0, 0, - 0,0x3766, 0, 0, 0, 0, 0, 0, -0x3B31,0x4877,0x507B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3A45,0x4D43, 0, 0, - 0, 0,0x507E,0x5123,0x507D,0x3A44, 0,0x3D7D, - 0, 0, 0, 0, 0, 0,0x3739, 0, - 0, 0,0x5124, 0, 0,0x364F, 0, 0, - 0,0x5121,0x5122, 0, 0,0x462F, 0,0x417C, - 0,0x3623, 0, 0, 0,0x4B4D,0x5125, 0, - 0, 0,0x4E3D, 0, 0, 0,0x5126, 0, - 0, 0, 0,0x5129, 0,0x5127, 0,0x414E, - 0, 0, 0, 0, 0,0x5128,0x512A, 0, - 0, 0, 0, 0, 0,0x512C, 0, 0, - 0,0x512B, 0,0x4A48, 0, 0, 0, 0, -0x3537,0x512E,0x512F, 0,0x322F, 0, 0, 0, - 0,0x512D, 0, 0, 0, 0, 0, 0, - 0, 0,0x3C74, 0,0x5132,0x5131,0x5130, 0, -0x5056, 0,0x5133, 0, 0, 0, 0,0x3D7E, - 0,0x5134, 0, 0, 0, 0, 0, 0, - 0, 0,0x4D25, 0, 0, 0, 0, 0, - 0, 0,0x4C59, 0, 0, 0, 0,0x5136, - 0, 0,0x5135,0x5138,0x5137, 0, 0,0x5139, -0x513A,0x3074, 0,0x3835,0x373B,0x3D3C,0x437B,0x3624, -0x4068,0x3877, 0,0x396E,0x513C,0x4C48,0x4546, 0, -0x3B79, 0,0x513B, 0,0x513D, 0, 0, 0, - 0, 0,0x455E, 0,0x3375, 0, 0, 0, - 0, 0,0x513E, 0, 0,0x467E, 0, 0, -0x4134,0x5140,0x5141,0x482C,0x3878,0x4F3B,0x5142, 0, - 0,0x3626, 0, 0, 0,0x4A3C,0x4236,0x3671, -0x4535, 0, 0, 0,0x3773, 0, 0, 0, -0x5143, 0,0x5144, 0, 0,0x4662,0x315F, 0, - 0,0x5147,0x3A7D, 0,0x5146,0x3A46, 0,0x5148, -0x666E,0x5149,0x4B41,0x514A, 0,0x514B,0x514C,0x3E69, - 0,0x3C4C, 0, 0, 0, 0, 0, 0, -0x3427, 0,0x514F, 0,0x514D,0x4C3D,0x514E, 0, -0x495A,0x5150,0x5151,0x5152,0x455F, 0, 0, 0, -0x5156,0x5154,0x5155,0x5153,0x3A63,0x5157,0x4C6A,0x4E64, - 0, 0, 0, 0, 0,0x5158, 0, 0, - 0, 0, 0, 0,0x4028,0x5159,0x3D5A, 0, - 0,0x515A, 0,0x437C,0x4E3F,0x4560, 0, 0, - 0, 0, 0, 0, 0, 0,0x5245, 0, - 0, 0, 0,0x515B,0x7425,0x3645, 0, 0, -0x515C,0x4B5E, 0, 0, 0, 0,0x3D68,0x427C, - 0,0x515E,0x4664, 0, 0,0x515F, 0, 0, -0x5160,0x332E, 0, 0, 0,0x5161,0x3627, 0, -0x464C,0x317A,0x3D50, 0, 0,0x4821,0x5162, 0, -0x4561, 0, 0,0x3F4F,0x5163, 0,0x4A2C,0x405A, -0x3422, 0,0x3429,0x5164, 0, 0,0x5166, 0, - 0,0x373A, 0, 0,0x5165, 0, 0,0x4E73, - 0, 0, 0, 0, 0,0x3D69, 0, 0, - 0, 0, 0, 0,0x483D,0x4A4C, 0,0x5167, - 0,0x4D78,0x5168, 0, 0, 0,0x5169, 0, -0x457E, 0, 0,0x516A, 0, 0,0x4029,0x3A7E, -0x3774,0x516B,0x3B49,0x396F, 0, 0, 0, 0, - 0, 0, 0,0x4466,0x516D, 0, 0,0x4227, - 0, 0,0x3A6F,0x516E,0x516F,0x4130, 0,0x516C, - 0, 0, 0, 0,0x5171, 0,0x4B36, 0, - 0, 0, 0,0x3964, 0, 0,0x5170, 0, - 0, 0, 0,0x3775,0x3A5E,0x476D, 0, 0, - 0,0x5174,0x5172, 0, 0, 0, 0,0x497B, -0x3E6A,0x517B,0x3364,0x5175,0x5173,0x414F, 0, 0, - 0, 0, 0, 0, 0,0x5177, 0,0x5176, - 0, 0, 0,0x3344, 0, 0, 0,0x3760, -0x517C,0x4E2D, 0, 0, 0,0x5178, 0, 0, - 0,0x517D,0x517A, 0,0x5179, 0, 0, 0, - 0, 0, 0,0x4E4F, 0, 0, 0,0x3879, -0x3243, 0, 0,0x4E74, 0, 0, 0, 0, - 0,0x3D75,0x4558,0x3965,0x5222,0x5223, 0, 0, - 0,0x4E65, 0, 0,0x4F2B,0x5225, 0, 0, - 0,0x387A, 0, 0,0x5224, 0,0x332F, 0, - 0,0x5226, 0,0x4B56, 0,0x443C, 0,0x4D26, - 0,0x4A59, 0, 0, 0,0x5227, 0, 0, - 0, 0,0x7055, 0, 0,0x4630, 0,0x5228, -0x342A,0x4C33, 0, 0, 0,0x3E21,0x5229,0x4A67, -0x522D, 0,0x402A,0x522A,0x3650, 0,0x522B,0x342B, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x372E,0x522E, 0,0x522F, 0, 0, -0x5230,0x5231,0x3C5B, 0, 0, 0,0x387B,0x4C5E, - 0,0x4C68,0x4677, 0, 0,0x4A71,0x5232, 0, -0x5233, 0, 0, 0, 0,0x5235, 0,0x5237, -0x5236, 0, 0, 0, 0,0x5238,0x323D,0x4B4C, - 0,0x3A7C,0x5239, 0, 0,0x4159, 0, 0, -0x3E22,0x3629, 0,0x523A, 0, 0, 0, 0, - 0, 0,0x485B, 0, 0, 0, 0,0x523B, - 0,0x523C, 0,0x523D, 0, 0, 0, 0, -0x523E,0x4924,0x3668,0x3065, 0, 0, 0,0x463F, -0x523F,0x3D3D, 0,0x4069, 0,0x5241,0x5240,0x3E23, -0x3861,0x5243,0x483E, 0, 0,0x5244, 0, 0, - 0,0x485C,0x4234,0x426E,0x3628, 0, 0,0x466E, -0x4331, 0,0x476E, 0,0x4B4E, 0,0x5246, 0, -0x406A, 0, 0, 0, 0, 0,0x3735, 0, - 0,0x5247, 0, 0, 0, 0,0x5248,0x312C, -0x3075,0x346D, 0,0x4228,0x3551,0x4D71, 0,0x524B, -0x3237, 0, 0,0x524A, 0, 0, 0,0x362A, - 0, 0,0x524C, 0,0x4C71, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x524D, 0, -0x4E52, 0,0x387C, 0, 0, 0, 0,0x3836, -0x524E, 0, 0, 0, 0,0x5250,0x524F, 0, -0x3F5F,0x3139, 0, 0, 0,0x315E,0x5251, 0, -0x5252, 0, 0,0x3837, 0, 0,0x5253, 0, - 0, 0, 0,0x356E, 0, 0, 0, 0, - 0, 0,0x3B32,0x5254, 0, 0, 0, 0, -0x4B74,0x3A35,0x355A,0x4D27,0x4150,0x483F,0x3C7D, 0, - 0, 0, 0, 0,0x3D47, 0,0x3C68,0x3C75, - 0,0x3D76, 0,0x4840, 0, 0, 0,0x5257, - 0,0x3143,0x4151,0x387D,0x3845,0x3667, 0, 0, -0x525B,0x4321,0x427E,0x362B,0x3E24,0x525C,0x525A,0x3244, -0x4266,0x3C38,0x3B4B,0x3126, 0, 0,0x3370,0x3966, -0x3B4A, 0,0x525D, 0, 0, 0, 0, 0, - 0,0x525E, 0,0x3549,0x3346, 0, 0, 0, -0x3967,0x3548,0x445F,0x3125,0x4631,0x4C3E,0x3921,0x4D79, -0x4547,0x387E, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x372F, 0,0x5267, 0,0x3663, -0x4B4A, 0, 0, 0, 0, 0,0x485D, 0, - 0,0x5266, 0,0x345E,0x5261,0x5262,0x5264, 0, - 0, 0, 0, 0, 0, 0,0x5265, 0, -0x355B,0x3F61, 0,0x4A2D,0x5263,0x525F,0x3863, 0, -0x5260, 0,0x4F24, 0, 0, 0,0x4A72, 0, -0x4468,0x3862,0x3970, 0, 0, 0,0x5268, 0, - 0,0x465D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x526C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3C7E, 0,0x3C76, 0, 0, 0, 0, 0, -0x526F,0x526D, 0,0x4C23, 0,0x526A,0x5273,0x526E, - 0, 0, 0,0x5271,0x3846,0x4C3F, 0, 0, -0x5272, 0, 0, 0,0x5274, 0,0x5276, 0, - 0, 0, 0,0x3A70,0x4F42, 0,0x526B,0x5269, -0x5275, 0,0x5270, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5278, 0,0x5323,0x527A, 0, 0, -0x527E, 0, 0,0x5321,0x527B, 0, 0,0x533E, - 0, 0,0x3A69,0x3331, 0, 0, 0, 0, -0x5279, 0, 0, 0,0x5325,0x3076,0x5324, 0, -0x3025,0x494A,0x5322, 0,0x527C, 0, 0,0x5277, -0x527D,0x3A48, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5326, 0, 0, 0, 0, 0, 0, 0, - 0,0x3077,0x532F, 0, 0,0x5327,0x5328, 0, -0x3E25,0x4B69, 0, 0, 0,0x532D,0x532C, 0, - 0, 0,0x452F, 0, 0, 0, 0, 0, - 0, 0,0x532E, 0, 0,0x532B, 0, 0, - 0, 0, 0, 0,0x3134, 0,0x3A36,0x3F30, - 0, 0, 0, 0, 0, 0, 0,0x5329, -0x4562, 0, 0, 0,0x532A, 0,0x3022}; - -/* page 25 0x552E-0x5563 */ -static uint16 tab_uni_jisx020825[]={ -0x5334,0x4D23, 0,0x3E27, 0,0x533A, 0, 0, - 0, 0,0x5339,0x5330, 0, 0, 0, 0, -0x4243, 0,0x5331, 0, 0, 0,0x426F,0x5336, -0x3E26, 0, 0, 0, 0, 0,0x5333, 0, - 0,0x4C64, 0, 0, 0,0x373C, 0, 0, -0x5337,0x5338, 0, 0, 0, 0,0x5335,0x533B, - 0, 0, 0, 0, 0,0x5332}; - -/* page 26 0x557B-0x576A */ -static uint16 tab_uni_jisx020826[]={ -0x5341,0x5346, 0,0x5342, 0,0x533D, 0, 0, -0x5347,0x4131, 0, 0,0x5349, 0,0x3922,0x533F, -0x437D, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5343,0x533C,0x342D, - 0,0x346E,0x3365,0x5344,0x5340, 0, 0, 0, - 0, 0, 0, 0,0x3776,0x534A,0x5348,0x4153, -0x354A,0x362C, 0,0x5345, 0,0x3674, 0, 0, - 0, 0, 0,0x3144, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x534E,0x534C, 0,0x5427, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5351, 0, 0, 0, 0, 0,0x534B, - 0,0x534F, 0, 0,0x534D, 0, 0, 0, -0x3B4C,0x5350, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5353, 0,0x5358, 0, - 0, 0,0x5356,0x5355, 0, 0, 0, 0, - 0, 0, 0,0x4332, 0, 0,0x3245, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5352, 0,0x5354,0x3E28,0x3133, 0, 0, -0x5357, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x325E, 0, - 0, 0, 0, 0,0x5362, 0,0x3E7C,0x535E, - 0,0x535C, 0,0x535D, 0,0x535F, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x313D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4139, 0,0x5359, 0,0x535A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x337A, 0, 0, 0, 0, 0, 0, 0, - 0,0x5361, 0, 0, 0,0x346F, 0,0x5364, -0x5360,0x5363, 0, 0, 0, 0, 0, 0, - 0,0x4A2E, 0, 0, 0,0x4655, 0,0x4838, - 0, 0, 0, 0, 0,0x5366, 0, 0, - 0, 0, 0,0x5365,0x3345, 0, 0,0x5367, - 0, 0, 0, 0,0x536A, 0, 0, 0, - 0,0x5369, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5368, 0,0x4739, - 0, 0,0x536B, 0, 0, 0, 0, 0, - 0, 0, 0,0x536C, 0, 0, 0, 0, - 0,0x536E, 0,0x536D, 0, 0, 0, 0, - 0,0x5370, 0, 0, 0,0x5373,0x5371,0x536F, -0x5372, 0, 0, 0, 0,0x5374, 0, 0, - 0, 0, 0,0x5375, 0, 0,0x5376, 0, -0x5377, 0, 0, 0,0x5378,0x5145, 0,0x3C7C, -0x3B4D, 0, 0,0x3273, 0,0x3078, 0, 0, -0x4344, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5379, 0,0x3A24, 0,0x304F, -0x3F5E, 0, 0, 0, 0, 0,0x537A,0x3847, - 0, 0,0x3971, 0,0x537C,0x537B, 0, 0, -0x4A60,0x537D, 0, 0, 0,0x5421,0x537E, 0, -0x5422, 0,0x5423, 0,0x3777, 0, 0,0x3160, -0x5424, 0, 0,0x5426, 0,0x5425, 0, 0, - 0,0x5428, 0, 0,0x455A, 0, 0, 0, - 0, 0, 0,0x5429,0x3035,0x3A5F, 0, 0, - 0, 0,0x373D, 0, 0,0x434F, 0, 0, - 0, 0, 0, 0,0x542A,0x542B, 0, 0, -0x542D, 0, 0, 0, 0,0x542E, 0,0x3A64, - 0, 0, 0, 0,0x3651, 0, 0,0x4B37, - 0, 0, 0,0x542C,0x542F,0x3A41,0x3923, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5433, 0, - 0,0x3A25, 0,0x4333, 0, 0,0x5430,0x445A -}; - -/* page 27 0x577F-0x5A9B */ -static uint16 tab_uni_jisx020827[]={ -0x5434, 0, 0,0x3F62, 0, 0, 0, 0, - 0,0x5432,0x5435, 0,0x373F, 0, 0, 0, - 0, 0, 0, 0,0x5436, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5437, 0,0x3924,0x3340,0x5439, 0, 0, - 0, 0, 0,0x543A, 0, 0, 0, 0, - 0,0x543B, 0, 0,0x5438, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5431, 0, 0,0x543C, 0, 0,0x543D, - 0, 0, 0, 0,0x4B64, 0, 0,0x3E6B, - 0, 0, 0,0x543F,0x5440,0x543E, 0,0x5442, - 0, 0, 0, 0, 0,0x4738, 0, 0, -0x3068,0x4956, 0, 0,0x5443, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3E7D, 0, 0, -0x3C39, 0,0x475D,0x3470, 0,0x3A6B, 0, 0, - 0,0x4B59, 0,0x4632, 0, 0,0x3778,0x424F, - 0, 0, 0,0x5441,0x5444, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4244, 0, - 0, 0,0x5445, 0, 0, 0,0x5446, 0, - 0, 0,0x5448, 0, 0,0x4469, 0, 0, - 0, 0, 0,0x342E, 0, 0, 0, 0, -0x7421,0x3161,0x4A73, 0, 0,0x3E6C,0x4548, 0, - 0, 0, 0,0x3A66, 0, 0,0x544E, 0, - 0,0x4A3D,0x4E5D, 0, 0, 0, 0, 0, - 0, 0, 0,0x3274,0x544A, 0, 0, 0, - 0, 0,0x413A,0x544D, 0,0x4563, 0, 0, -0x4549,0x4564,0x4839,0x444D, 0, 0, 0,0x3A49, - 0, 0, 0,0x5449, 0, 0, 0, 0, - 0, 0,0x3176, 0,0x4536, 0, 0, 0, - 0,0x544B, 0,0x5447, 0, 0,0x3F50, 0, - 0, 0,0x544F, 0, 0, 0, 0,0x3D4E, - 0, 0, 0, 0,0x362D, 0,0x5450, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4A68, 0, 0, 0, -0x417D, 0, 0, 0, 0,0x4446, 0, 0, -0x5452, 0, 0, 0, 0, 0, 0, 0, - 0,0x4B4F, 0, 0,0x5453, 0, 0,0x5458, - 0, 0, 0, 0,0x4A2F, 0, 0, 0, - 0,0x5457,0x5451,0x5454,0x5456, 0, 0,0x3A26, - 0, 0,0x4A49, 0, 0, 0,0x5459, 0, -0x4345, 0, 0,0x3275, 0,0x3E6D, 0, 0, - 0, 0,0x545B, 0,0x545A, 0,0x3968, 0, -0x545C,0x545E,0x545D, 0, 0,0x5460, 0,0x5455, -0x5462, 0, 0, 0, 0,0x5461,0x545F, 0, - 0, 0, 0, 0,0x3B4E,0x3F51, 0,0x4154, -0x5463,0x403C,0x306D,0x4764, 0, 0, 0, 0, -0x445B, 0,0x5465,0x5464,0x5466,0x5467,0x5468, 0, - 0, 0, 0,0x5469, 0, 0, 0, 0, - 0, 0,0x4A51,0x546A, 0, 0, 0, 0, -0x3246,0x546B, 0, 0, 0, 0,0x4D3C,0x3330, - 0,0x5249,0x3D48,0x423F,0x546C,0x4C6B, 0, 0, - 0, 0, 0,0x4C34, 0, 0,0x546E, 0, -0x4267, 0,0x4537,0x4240,0x4957,0x546F,0x5470,0x317B, - 0, 0,0x3C3A,0x5471, 0, 0, 0, 0, -0x3050,0x5472, 0, 0, 0, 0, 0,0x5473, - 0, 0, 0, 0, 0,0x3162, 0, 0, -0x3471,0x4660,0x4A74, 0, 0, 0, 0,0x5477, -0x4155,0x5476,0x3740, 0, 0,0x4B5B,0x5475, 0, -0x4565,0x5479, 0,0x5478, 0, 0, 0, 0, - 0,0x547B, 0,0x547A, 0, 0,0x317C, 0, -0x547C,0x3E29,0x547E,0x4325, 0,0x547D, 0,0x4A33, - 0, 0, 0, 0,0x3D77,0x455B, 0, 0, - 0,0x5521, 0, 0, 0, 0,0x3925, 0, - 0, 0,0x5522,0x4721,0x485E,0x4C51, 0, 0, - 0, 0, 0,0x4725, 0, 0,0x552B, 0, - 0, 0, 0, 0,0x3538, 0, 0,0x4D45, - 0, 0,0x4C2F, 0,0x562C, 0,0x5523, 0, - 0, 0, 0, 0,0x5526, 0,0x4245, 0, - 0,0x4B38, 0, 0, 0,0x454A, 0, 0, - 0, 0, 0,0x5527, 0, 0, 0, 0, - 0, 0,0x4B65, 0,0x3A4A, 0, 0,0x3E2A, - 0, 0, 0, 0, 0, 0, 0,0x5528, - 0, 0,0x3B50, 0,0x3B4F, 0, 0, 0, - 0,0x3039,0x3848, 0,0x402B,0x3051, 0, 0, - 0, 0,0x552C,0x552D, 0,0x552A, 0, 0, - 0, 0, 0, 0, 0, 0,0x3138,0x342F, - 0,0x5529, 0,0x4C45,0x4931, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3028, - 0, 0, 0, 0,0x3079, 0, 0, 0, -0x3B51, 0,0x3052, 0,0x3023, 0, 0, 0, - 0, 0,0x5532, 0, 0, 0, 0, 0, - 0, 0,0x5530, 0, 0, 0, 0, 0, - 0,0x4C3C, 0,0x5533, 0,0x5531, 0, 0, -0x552F,0x3F31, 0, 0, 0, 0,0x552E, 0, - 0, 0,0x4A5A, 0, 0, 0, 0, 0, -0x3864, 0, 0, 0, 0, 0,0x5537,0x5538, - 0, 0, 0, 0, 0,0x3E2B, 0, 0, - 0,0x5534,0x4F2C, 0, 0, 0, 0,0x474C, - 0, 0,0x5536, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3A27, 0, 0, 0, 0, - 0, 0, 0,0x5539, 0, 0, 0,0x4958, - 0, 0, 0,0x553A, 0,0x5535, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4C3B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x475E, 0, 0, 0, 0, - 0, 0, 0,0x553B,0x4932}; - -/* page 28 0x5ABC-0x5D29 */ -static uint16 tab_uni_jisx020828[]={ -0x553C,0x5540,0x553D, 0, 0,0x3247,0x553F, 0, - 0, 0, 0, 0, 0,0x3C3B, 0,0x553E, -0x3779, 0, 0, 0,0x554C, 0, 0, 0, - 0, 0,0x5545,0x5542, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4364, 0,0x5541, - 0, 0,0x5543, 0, 0,0x5544, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5546,0x5547, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3472, 0,0x5549, -0x5548, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x554A, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3E6E, 0, - 0, 0, 0, 0, 0, 0,0x554D, 0, -0x445C, 0, 0, 0,0x3145, 0,0x554B, 0, - 0, 0,0x554E, 0, 0, 0, 0, 0, - 0, 0,0x554F, 0,0x5552, 0, 0,0x5550, - 0,0x5551, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3B52,0x5553, 0, 0, -0x3926,0x5554, 0,0x3B7A,0x4238, 0,0x5555,0x5556, -0x3B5A,0x3927, 0,0x4C52, 0, 0, 0,0x3528, -0x3849,0x5557,0x3358, 0, 0,0x5558, 0,0x4239, - 0, 0, 0, 0,0x5559,0x5623, 0,0x555A, - 0,0x555B, 0, 0,0x555C, 0,0x555E, 0, - 0, 0, 0, 0,0x555F, 0, 0,0x5560, - 0,0x4270, 0,0x3127,0x3C69,0x3042, 0,0x4157, -0x3430,0x3C35, 0,0x3928, 0, 0, 0, 0, - 0,0x4566, 0,0x3D21,0x3431,0x4368,0x446A,0x3038, -0x3539,0x4A75, 0,0x3C42, 0, 0,0x3552,0x406B, -0x3C3C,0x4D28,0x5561, 0, 0, 0, 0, 0, - 0, 0,0x355C, 0,0x3A4B, 0, 0,0x3332, -0x3163,0x3E2C,0x3248, 0,0x5562,0x4D46, 0, 0, - 0, 0, 0,0x3D49, 0, 0,0x3C64,0x5563, -0x3473,0x4652,0x4C29,0x5564, 0,0x5565, 0, 0, -0x4959, 0, 0, 0,0x5567, 0,0x3428,0x3677, -0x5566, 0, 0, 0, 0, 0, 0,0x3432, - 0,0x3F32,0x556B,0x3B21, 0,0x3249,0x556A, 0, -0x5568,0x556C,0x5569,0x472B,0x5C4D,0x3F33, 0,0x556D, - 0, 0,0x4E40, 0,0x556E, 0, 0,0x5570, - 0,0x437E,0x556F, 0,0x4023, 0,0x3B7B, 0, - 0, 0,0x4250,0x3C77, 0,0x4975,0x406C, 0, -0x3C4D,0x5571,0x3E2D,0x5572,0x5573,0x3053,0x423A,0x3F52, - 0,0x5574,0x4633,0x3E2E, 0,0x3E2F, 0,0x5575, - 0, 0,0x406D, 0, 0, 0,0x3E30, 0, - 0, 0, 0, 0,0x5576, 0,0x5577, 0, -0x4C60, 0, 0, 0,0x5578, 0, 0, 0, - 0,0x3646, 0, 0, 0,0x3D22, 0, 0, - 0, 0, 0, 0,0x5579,0x557A,0x3C5C,0x3F2C, -0x4674,0x3F54,0x4878,0x4722,0x3649,0x557B, 0, 0, - 0,0x356F,0x557C, 0,0x367E, 0,0x464F,0x3230, - 0,0x3B53,0x557D,0x5622,0x5621,0x367D, 0,0x557E, - 0,0x4538, 0, 0, 0, 0, 0, 0, - 0, 0,0x4230, 0,0x454B,0x3C48, 0, 0, -0x4158,0x4D7A, 0, 0, 0, 0, 0, 0, -0x5624, 0,0x5625,0x4656, 0,0x3B33, 0, 0, - 0, 0,0x5627, 0, 0,0x5628, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5629, 0, 0, 0,0x3474,0x562A, 0, 0, -0x562B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x322C, 0, 0, - 0, 0, 0, 0,0x413B,0x3464, 0,0x562D, -0x4C28, 0, 0, 0, 0,0x4252, 0,0x3359, - 0, 0,0x562F,0x5631,0x345F, 0, 0,0x562E, -0x5630, 0,0x5633, 0, 0, 0, 0, 0, - 0,0x5632, 0,0x5634, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5635, 0, 0, - 0, 0, 0, 0,0x463D,0x362E, 0, 0, - 0, 0, 0, 0,0x3265,0x5636,0x563B, 0, - 0,0x5639, 0,0x4A77,0x4A76, 0, 0, 0, - 0, 0,0x4567, 0, 0, 0,0x5638,0x3D54, - 0,0x5637, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3F72, 0, 0, 0,0x563C, - 0, 0,0x3A6A, 0, 0,0x5642, 0, 0, -0x5643,0x563D,0x3333,0x563E,0x5647,0x5646,0x5645,0x5641, - 0, 0, 0,0x5640, 0, 0,0x5644, 0, - 0, 0, 0, 0, 0,0x4A78}; - -/* page 29 0x5D4B-0x6BF3 */ -static uint16 tab_uni_jisx020829[]={ -0x564B,0x5648, 0,0x564A, 0,0x4D72, 0,0x5649, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x563F, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3F73, 0, - 0,0x564C, 0, 0,0x3A37, 0, 0, 0, -0x564D, 0, 0,0x564E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5651, - 0,0x5650, 0, 0,0x564F, 0, 0, 0, -0x4568,0x563A, 0, 0, 0,0x5657, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5653, 0, 0, 0, 0,0x5652, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5654, 0,0x5655, 0, 0, 0, 0, - 0, 0, 0, 0,0x5658, 0, 0,0x4E66, - 0,0x5659,0x5656, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x565A, 0, - 0,0x3460,0x565B, 0, 0, 0, 0,0x565D, -0x565C, 0, 0,0x565E, 0, 0, 0, 0, -0x565F, 0,0x406E,0x3D23, 0, 0,0x3D64, 0, -0x4163, 0,0x3929,0x3A38,0x392A,0x3570, 0, 0, -0x5660, 0, 0,0x3A39, 0, 0,0x384A,0x5661, -0x4C26,0x4743,0x5662, 0,0x392B, 0, 0, 0, -0x342C, 0,0x4327,0x3652, 0, 0, 0,0x3B54, -0x495B, 0, 0,0x4841, 0, 0, 0, 0, -0x5663,0x3475, 0, 0, 0, 0,0x5666, 0, - 0, 0, 0,0x4421, 0, 0,0x5665,0x5664, -0x5667, 0,0x446B, 0, 0, 0, 0, 0, - 0, 0,0x3F63, 0, 0, 0, 0, 0, -0x3B55, 0,0x404A, 0,0x4253,0x3522, 0, 0, -0x4422, 0, 0,0x5668,0x5669,0x3E6F, 0, 0, - 0, 0,0x4B39, 0, 0,0x566C, 0, 0, -0x566B,0x566A,0x497D, 0,0x5673, 0, 0, 0, - 0,0x4B5A, 0,0x566D, 0, 0, 0, 0, - 0,0x566F,0x4B6B, 0,0x566E, 0, 0, 0, - 0, 0, 0, 0,0x5670, 0,0x4828,0x5671, -0x4A3E,0x5672, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3433, -0x4A3F,0x472F,0x5674,0x5675, 0,0x392C,0x3434,0x5676, -0x3838,0x4D44,0x4D29,0x3476,0x5678, 0,0x4423, 0, -0x392D,0x3E31, 0, 0,0x485F, 0, 0,0x3E32, - 0, 0, 0, 0,0x3D78, 0, 0, 0, - 0, 0,0x446C,0x4A79,0x4539, 0, 0,0x392E, - 0,0x495C, 0, 0, 0,0x5679, 0, 0, - 0, 0, 0,0x4559,0x3A42, 0, 0, 0, -0x384B, 0,0x446D, 0, 0, 0, 0, 0, - 0, 0,0x3043,0x3D6E,0x392F,0x4D47, 0, 0, - 0, 0, 0, 0, 0, 0,0x567A,0x567B, -0x4751, 0, 0, 0, 0,0x567C,0x4E77,0x4F2D, - 0, 0, 0, 0,0x567E,0x567D, 0, 0, -0x3347, 0, 0,0x5721, 0, 0, 0,0x5724, -0x5725, 0,0x5723, 0,0x4940,0x3E33,0x5727,0x5726, -0x5722, 0, 0, 0, 0,0x5728,0x5729, 0, - 0,0x572A, 0, 0, 0,0x572D,0x572B, 0, -0x572C,0x572E, 0,0x3164,0x446E,0x572F, 0,0x377A, -0x3276,0x4736, 0,0x5730,0x467B, 0,0x4A5B, 0, -0x5731,0x4F2E, 0, 0, 0, 0,0x5732,0x4A40, -0x5735,0x5021,0x5031, 0,0x3C30,0x4675,0x5736, 0, -0x355D,0x4424,0x307A,0x5737,0x4A26,0x3930, 0, 0, -0x4350, 0, 0, 0,0x446F, 0, 0, 0, - 0, 0,0x4C6F,0x3839,0x384C, 0,0x5738, 0, - 0, 0,0x5739, 0,0x573F, 0,0x3C65, 0, - 0, 0,0x4425, 0,0x362F,0x573A, 0, 0, - 0,0x492B, 0,0x4346, 0, 0,0x573B, 0, - 0, 0, 0, 0, 0,0x573C, 0,0x3630, - 0,0x573D, 0,0x573E, 0, 0,0x5740, 0, -0x4576, 0, 0,0x5741,0x5742, 0,0x5743, 0, - 0,0x5734,0x5733, 0, 0, 0,0x5744,0x3741, - 0, 0, 0,0x4927, 0, 0,0x3A4C,0x4937, -0x4426,0x494B,0x5745, 0, 0,0x3E34,0x3146, 0, -0x5746, 0, 0, 0,0x5747, 0,0x4C72, 0, - 0,0x4860, 0, 0,0x574A,0x317D,0x402C,0x5749, -0x5748,0x3742,0x4254, 0,0x574E,0x574C, 0,0x574B, -0x4E27,0x3865, 0, 0, 0,0x3D79,0x574D,0x454C, -0x3D3E, 0, 0, 0,0x4640,0x5751,0x5750, 0, - 0, 0, 0,0x574F, 0,0x5752,0x3866, 0, - 0, 0, 0, 0, 0,0x5753,0x497C,0x3D5B, - 0, 0,0x5754,0x4879, 0, 0, 0, 0, -0x4641,0x4427, 0, 0, 0, 0,0x4530, 0, - 0,0x5755,0x352B, 0, 0, 0, 0, 0, -0x3F34, 0,0x492C, 0, 0, 0, 0, 0, - 0,0x3477,0x4726, 0, 0, 0, 0, 0, - 0, 0, 0,0x5756,0x3B56,0x4B3A,0x4B3B, 0, - 0,0x317E,0x575B, 0, 0,0x4369, 0, 0, - 0,0x5758, 0, 0, 0, 0, 0, 0, -0x3277, 0, 0, 0, 0,0x582D,0x575A, 0, - 0, 0,0x4730, 0, 0,0x5759, 0, 0, -0x5757, 0,0x397A, 0,0x575D, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5763,0x5769,0x5761, 0,0x455C, - 0, 0,0x5766,0x495D, 0, 0,0x5760, 0, -0x5765,0x4E67,0x3B57, 0, 0,0x4255,0x575E, 0, - 0, 0,0x355E,0x5768,0x402D,0x3165,0x5762,0x3278, -0x5767, 0, 0, 0,0x3631, 0,0x5764, 0, - 0, 0, 0, 0, 0, 0, 0,0x576A, - 0, 0, 0, 0, 0, 0,0x576C,0x5776, -0x5774, 0, 0,0x5771, 0, 0, 0,0x5770, -0x4E78, 0,0x5772, 0, 0,0x3632, 0,0x3931, - 0, 0,0x3D7A, 0, 0, 0,0x5779,0x576B, - 0, 0, 0, 0,0x576F,0x575F, 0,0x327A, -0x5773,0x5775,0x4351, 0, 0,0x3A28,0x3238,0x576D, -0x5778,0x5777,0x3633, 0,0x4229,0x3366, 0, 0, - 0, 0,0x3743, 0,0x576E, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x577A, 0, -0x577D,0x5821, 0, 0, 0, 0,0x3C3D, 0, -0x5827,0x4470,0x577B, 0, 0, 0, 0,0x5825, - 0,0x3279, 0,0x5823,0x5824, 0, 0,0x577E, -0x5822, 0, 0, 0,0x3867,0x4D2A, 0, 0, -0x3435, 0, 0,0x3159,0x5826, 0,0x473A,0x302D, - 0, 0, 0, 0, 0, 0, 0,0x4861, -0x575C,0x582C,0x5830,0x4C65, 0,0x5829, 0, 0, - 0,0x4569,0x582E, 0, 0, 0, 0, 0, - 0, 0,0x3E70,0x582F,0x4657, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4F47, 0, -0x582B, 0, 0, 0, 0,0x5831, 0,0x397B, - 0,0x404B, 0, 0,0x3054,0x582A,0x5828, 0, -0x415A, 0, 0, 0,0x577C,0x3B34, 0, 0, - 0, 0, 0, 0, 0,0x4246,0x583D, 0, -0x415B,0x5838, 0,0x5835,0x5836, 0,0x3C66,0x5839, -0x583C, 0, 0, 0, 0,0x5837,0x3D25, 0, -0x583A, 0, 0,0x5834, 0,0x4C7C,0x4C7B, 0, - 0, 0,0x583E,0x583F,0x3055, 0, 0, 0, - 0, 0,0x5833, 0, 0, 0, 0,0x3672, -0x3026, 0, 0, 0,0x3436, 0,0x583B, 0, - 0, 0, 0, 0,0x5843,0x5842, 0, 0, - 0,0x5847, 0, 0, 0, 0, 0, 0, - 0,0x5848, 0, 0, 0, 0, 0, 0, - 0,0x5846,0x5849,0x5841,0x5845, 0, 0,0x584A, - 0,0x584B, 0, 0,0x5840,0x3B7C, 0,0x5844, -0x4256,0x3932,0x5832,0x3F35, 0, 0, 0, 0, -0x5858, 0,0x4A69, 0, 0,0x584E,0x584F,0x5850, - 0, 0,0x5857, 0,0x5856, 0, 0,0x4B7D, -0x3437, 0,0x5854, 0,0x3745,0x3334, 0, 0, -0x5851, 0, 0,0x4E38,0x5853,0x3056,0x5855, 0, -0x584C,0x5852,0x5859,0x3744,0x584D, 0, 0, 0, - 0, 0, 0,0x4D5D, 0, 0, 0,0x4D2B, - 0, 0, 0, 0,0x585C, 0, 0,0x5860, - 0, 0, 0,0x417E, 0,0x4E79,0x5861, 0, - 0,0x585E, 0,0x585B, 0, 0,0x585A,0x585F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4A30, 0, 0,0x4634, 0,0x3746, 0, -0x5862,0x585D, 0,0x5863, 0, 0, 0,0x377B, - 0, 0, 0,0x3231, 0, 0, 0,0x586B, - 0, 0, 0,0x3438, 0, 0, 0, 0, -0x5869, 0, 0,0x586A,0x3A29,0x5868,0x5866,0x5865, -0x586C,0x5864,0x586E, 0, 0,0x327B, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5870, 0, 0,0x586F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4428, - 0,0x5873, 0,0x5871,0x5867,0x377C, 0,0x5872, - 0,0x5876,0x5875,0x5877,0x5874,0x5878, 0, 0, - 0, 0, 0, 0, 0,0x5879,0x587A,0x4A6A, - 0,0x587C,0x587B,0x3D3F, 0,0x402E,0x3266,0x327C, - 0,0x587D, 0,0x303F, 0, 0, 0,0x404C, -0x587E, 0,0x6C43,0x5921,0x3761, 0,0x5922, 0, - 0, 0, 0,0x406F, 0, 0, 0,0x5923, - 0, 0, 0,0x5924,0x353A,0x5925, 0,0x5926, -0x5927,0x4257, 0, 0, 0,0x384D, 0, 0, -0x4C61, 0, 0, 0,0x4B3C,0x3D6A,0x5928, 0, - 0, 0, 0, 0,0x4070,0x6E3D,0x4862, 0, -0x3C6A, 0,0x3A4D,0x5929, 0, 0, 0, 0, -0x4247, 0,0x4A27, 0, 0,0x4271, 0, 0, -0x592C, 0, 0,0x592A, 0,0x592D, 0, 0, -0x592B, 0, 0, 0, 0,0x592E, 0, 0, - 0, 0, 0,0x4A31, 0, 0,0x3037, 0, - 0, 0, 0,0x495E, 0, 0,0x4863, 0, - 0,0x592F, 0,0x5932,0x3E35,0x353B, 0,0x5930, -0x5937,0x3E36, 0, 0, 0, 0,0x5931,0x4744, - 0, 0, 0, 0, 0, 0,0x4D5E,0x5933, -0x5934,0x5938,0x456A,0x5935,0x3933,0x405E, 0, 0, -0x5946,0x4834, 0,0x4272, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4864,0x5A2D, 0, 0, 0, 0,0x4A7A, 0, - 0, 0,0x4471, 0, 0, 0,0x4B75, 0, -0x593B,0x3221,0x436A, 0, 0, 0, 0,0x5944, - 0, 0,0x4334,0x593E,0x5945,0x5940,0x5947,0x5943, - 0,0x5942,0x476F, 0,0x593C,0x327D,0x593A,0x3571, -0x4273,0x5936, 0, 0,0x5939,0x3934,0x405B, 0, -0x3E37,0x5941,0x4752, 0, 0,0x3572,0x3348, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3367,0x3F21,0x5949,0x594E, 0,0x594A, 0, -0x377D, 0,0x594F,0x3B22,0x3969, 0, 0, 0, - 0, 0, 0,0x3D26,0x593D, 0,0x3B7D,0x594C, - 0, 0, 0, 0,0x3B58,0x594D,0x3044, 0, - 0,0x5948, 0, 0, 0, 0,0x4429, 0, - 0, 0, 0, 0, 0, 0,0x3573, 0, - 0, 0, 0, 0,0x3634, 0, 0, 0, - 0, 0, 0, 0,0x594B,0x3027, 0, 0, -0x3A43, 0, 0, 0,0x3F36, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4472, - 0, 0,0x4854,0x5951,0x415E, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x422A, 0, - 0,0x3B2B,0x5952, 0,0x5954,0x5950, 0, 0, - 0, 0,0x4A61, 0,0x443D, 0, 0, 0, - 0,0x415C, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4A7B,0x3C4E,0x5960, 0, -0x595F, 0, 0,0x3F78, 0, 0, 0,0x377E, - 0, 0, 0,0x5959,0x3E39, 0, 0,0x4668, -0x4731, 0, 0, 0, 0,0x5957, 0, 0, -0x415D, 0, 0, 0, 0,0x3C78,0x595C, 0, - 0,0x3E38, 0,0x5956,0x595B, 0, 0,0x4753, - 0, 0, 0,0x5955, 0,0x3721, 0, 0, -0x335D, 0, 0, 0,0x595D,0x4E2B,0x3A4E,0x4335, -0x595A, 0,0x405C, 0,0x3935,0x3F64,0x3166,0x413C, -0x5958,0x3545, 0, 0, 0, 0, 0,0x3747, - 0,0x444F,0x595E, 0, 0, 0, 0, 0, -0x415F, 0, 0,0x5961, 0,0x5963, 0, 0, -0x4237,0x5969, 0,0x5964, 0, 0,0x5966, 0, - 0, 0, 0, 0,0x4941,0x4473, 0,0x5967, - 0, 0, 0,0x4D2C, 0, 0, 0,0x4D48, -0x3439, 0, 0, 0, 0, 0,0x302E, 0, -0x5965, 0, 0, 0, 0, 0,0x5962, 0, - 0, 0, 0,0x3478, 0, 0, 0, 0, - 0,0x3167, 0,0x5968, 0, 0, 0,0x4D49, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x596C, 0, 0, 0, 0, - 0, 0,0x423B, 0,0x5973, 0, 0, 0, -0x596D, 0, 0,0x596A,0x5971, 0, 0, 0, - 0,0x5953, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x596E, 0,0x5972, 0, 0, - 0,0x4842,0x456B, 0, 0, 0, 0, 0, - 0,0x596B, 0,0x596F, 0, 0, 0,0x3748, - 0, 0, 0,0x3A71, 0, 0, 0,0x405D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5977, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4526, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5974, 0,0x4B60, 0, - 0, 0, 0, 0,0x5975, 0, 0, 0, - 0, 0, 0,0x5976, 0,0x4C4E, 0,0x4022, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3762, 0, 0, 0, 0,0x597D, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3B35, -0x597A, 0,0x5979, 0, 0, 0, 0,0x4732, - 0, 0, 0,0x4635, 0, 0, 0, 0, - 0,0x4531,0x597B, 0, 0, 0,0x597C, 0, -0x496F, 0,0x4745,0x3B23, 0,0x4071, 0,0x4B50, - 0, 0, 0, 0, 0, 0,0x3349, 0, -0x5A25,0x597E, 0, 0, 0, 0,0x4D4A,0x5A27, - 0, 0,0x5A23, 0,0x5A24, 0, 0, 0, - 0, 0,0x4160, 0, 0, 0, 0,0x5A22, - 0,0x593F, 0, 0, 0,0x5A26, 0,0x5A21, - 0, 0, 0, 0, 0,0x5A2B,0x5A2C,0x4527, -0x5A2E, 0, 0,0x3B24,0x5A29, 0, 0, 0, - 0,0x353C, 0, 0,0x5A2F, 0,0x5A28,0x5A33, - 0,0x5A32, 0,0x5A31, 0, 0, 0,0x5A34, - 0, 0,0x5A36,0x3E71, 0,0x5A35, 0, 0, - 0, 0,0x5A39, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5A37, 0, 0, - 0,0x5A38,0x5970, 0, 0, 0, 0, 0, -0x5A3B,0x5A3A, 0, 0, 0, 0, 0,0x5978, -0x5A3C,0x5A30, 0, 0,0x3B59, 0, 0, 0, - 0,0x5A3D,0x5A3E,0x5A40,0x5A3F,0x5A41,0x327E, 0, -0x3936, 0, 0,0x4A7C,0x402F, 0, 0, 0, - 0, 0,0x384E, 0, 0,0x5A43, 0, 0, - 0, 0,0x5A46, 0,0x4952, 0,0x355F, 0, - 0, 0,0x5A45,0x5A44,0x4754,0x5A47,0x3635, 0, - 0, 0,0x5A49,0x5A48, 0, 0, 0,0x343A, -0x3B36, 0, 0,0x4658, 0, 0, 0, 0, - 0,0x3749, 0, 0, 0,0x3F74, 0,0x5A4A, - 0,0x4030,0x4528, 0,0x495F,0x5A4B, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5A4C, -0x5A4D, 0, 0, 0,0x4A38,0x555D,0x4046, 0, - 0,0x494C, 0,0x3A58, 0,0x4865,0x4843, 0, - 0, 0, 0, 0,0x454D, 0,0x4E41, 0, -0x5A4F,0x3C50, 0, 0,0x5A50, 0,0x3036, 0, - 0,0x3654,0x404D, 0,0x4960, 0, 0, 0, -0x5A51,0x3B42,0x4347, 0,0x3B5B,0x3F37, 0, 0, - 0, 0, 0, 0,0x5A52, 0,0x4A7D, 0, - 0,0x3177,0x3B5C, 0, 0, 0,0x5A55, 0, -0x5A53,0x5A56,0x4E39,0x5A54, 0, 0, 0, 0, -0x407B,0x5A57, 0, 0,0x4232, 0, 0,0x5A58, - 0, 0, 0, 0,0x347A, 0,0x5A5A, 0, -0x5A59, 0, 0, 0, 0,0x5A5B,0x5A5C,0x347B, - 0, 0,0x467C,0x4336,0x356C,0x3B5D,0x4161, 0, - 0,0x3D5C,0x3030, 0, 0, 0,0x5A5D, 0, - 0, 0, 0, 0, 0, 0, 0,0x3222, -0x5A61, 0, 0, 0, 0, 0, 0,0x3937, -0x5A60, 0, 0,0x3A2B,0x3E3A, 0, 0,0x5A5F, - 0,0x3E3B, 0,0x4C40,0x3A2A, 0, 0, 0, -0x3057,0x404E, 0, 0, 0, 0, 0, 0, - 0,0x5A66, 0, 0,0x4031,0x3147, 0, 0, - 0, 0,0x3D55, 0,0x4B66,0x3A72, 0, 0, - 0, 0,0x3E3C, 0,0x4027, 0, 0, 0, - 0,0x5A65,0x5A63,0x5A64, 0, 0, 0, 0, - 0,0x436B, 0, 0,0x5B26, 0,0x5A6A,0x3B7E, -0x3938,0x5A68, 0, 0, 0, 0,0x5A69, 0, -0x3F38, 0, 0, 0,0x5A67, 0, 0,0x3B2F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5A6C,0x5A6B,0x5A70, 0, 0,0x5A71, - 0,0x5A6D, 0,0x3322,0x5A6E,0x5A6F,0x4855, 0, - 0, 0, 0,0x4961,0x374A,0x5A72, 0, 0, - 0,0x4032, 0,0x3E3D, 0, 0, 0,0x4352, - 0, 0, 0, 0, 0, 0,0x3647, 0, -0x5A73,0x5A77, 0, 0,0x324B,0x5A74,0x5A76, 0, - 0, 0, 0,0x5A75, 0, 0,0x3D6B, 0, - 0, 0, 0,0x4348,0x3045,0x5A78, 0, 0, - 0, 0,0x5A79, 0, 0, 0, 0,0x442A, - 0, 0, 0,0x4E71, 0, 0, 0, 0, -0x3B43, 0, 0,0x4A6B, 0, 0, 0, 0, - 0,0x4B3D, 0, 0, 0,0x5B22,0x5A7B, 0, - 0,0x5A7E, 0,0x5A7D, 0, 0,0x5A7A, 0, - 0,0x5B21, 0, 0,0x465E, 0,0x5A7C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5B23, 0, 0,0x3D6C,0x5B24, - 0,0x4D4B,0x4778, 0, 0,0x5B25, 0, 0, - 0, 0, 0,0x5B27, 0, 0,0x5B28, 0, - 0, 0, 0, 0, 0,0x5B29, 0,0x364A, -0x3148,0x3939,0x5B2A, 0,0x5B2B,0x3D71,0x4162, 0, - 0,0x5258,0x413E,0x413D,0x4258,0x3A47, 0, 0, -0x5072, 0, 0, 0, 0,0x376E,0x4D2D, 0, -0x4A7E, 0,0x497E, 0,0x5B2C, 0, 0, 0, - 0,0x3A73,0x443F,0x5B2D,0x4F2F, 0, 0, 0, -0x4B3E, 0,0x442B,0x5B2E,0x347C, 0, 0, 0, - 0, 0, 0,0x5B2F,0x5B30,0x4C5A, 0,0x4C24, -0x4B76,0x4B5C,0x3B25,0x5B32, 0, 0,0x3C6B, 0, - 0,0x4B51, 0,0x5B34,0x5B37,0x5B36, 0,0x3479, - 0, 0,0x3560, 0,0x5B33, 0,0x5B35, 0, - 0, 0, 0,0x5B38, 0, 0,0x3F79, 0, - 0, 0, 0,0x4D7B,0x3049,0x3A60,0x423C, 0, -0x3C5D, 0, 0,0x3E73, 0, 0,0x5B3B, 0, - 0,0x454E, 0,0x5B39,0x422B,0x5B3A,0x3E72,0x4C5D, -0x5B3C,0x5B3D,0x4D68, 0, 0, 0, 0,0x5B42, - 0, 0,0x393A, 0,0x4755,0x5B3F,0x456C,0x5A5E, -0x5A62, 0,0x354F, 0,0x4747, 0, 0, 0, - 0,0x5B41, 0,0x3E3E,0x4844, 0, 0, 0, - 0, 0,0x5B47, 0,0x487A, 0,0x5B3E, 0, -0x5B44,0x5B43, 0, 0, 0,0x404F, 0, 0, - 0, 0,0x4B6D, 0,0x4E53, 0, 0,0x4B67, - 0,0x324C,0x3B5E, 0, 0,0x4F48,0x5B46,0x3F75, - 0, 0, 0,0x5B45, 0, 0,0x5B40, 0, - 0, 0, 0, 0,0x384F, 0, 0, 0, -0x5B4C,0x5B4A, 0,0x324D,0x5B48,0x5B4E,0x5B54, 0, - 0, 0, 0, 0, 0, 0,0x4248, 0, - 0,0x4A41, 0,0x5B56, 0, 0, 0,0x4922, - 0, 0, 0,0x5B55,0x4770,0x4B3F,0x343B, 0, -0x4077,0x3D40, 0, 0, 0,0x4453, 0,0x4D2E, - 0, 0,0x5B51,0x5B50, 0, 0, 0,0x5B52, - 0,0x5B4F, 0, 0,0x5B57, 0,0x5B4D, 0, - 0,0x5B4B, 0,0x5B53,0x5B49, 0,0x436C, 0, -0x4C78,0x3C46,0x3A74, 0, 0, 0, 0, 0, -0x3A3A, 0, 0,0x4B6F,0x3341, 0, 0,0x444E, -0x464A,0x3149, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4072, 0, 0,0x4034,0x372A, 0, 0, 0, - 0, 0, 0,0x5B59, 0, 0,0x393B,0x337C, - 0, 0, 0, 0, 0, 0,0x5B5B,0x3374, -0x5B61, 0, 0, 0, 0, 0, 0,0x5B5E, - 0,0x4073, 0, 0, 0,0x334B,0x3A2C, 0, - 0,0x334A,0x3A4F, 0, 0,0x5B5C,0x3765,0x374B, -0x456D, 0, 0,0x5B5A, 0,0x3046, 0, 0, - 0, 0,0x5B5D,0x5B5F, 0,0x364D,0x372C, 0, -0x343C,0x354B, 0, 0, 0, 0,0x5B62, 0, - 0,0x3A79,0x4B71, 0,0x3B37, 0, 0, 0, -0x5B63, 0, 0, 0,0x4930, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5B6F, 0,0x3233,0x5B64, 0, 0, 0, - 0, 0, 0,0x5B75,0x5B65, 0,0x4E42, 0, -0x5B6C, 0,0x475F, 0, 0, 0, 0, 0, - 0, 0,0x5B74, 0,0x5B67, 0, 0, 0, -0x3034,0x5B69, 0, 0,0x393C, 0, 0, 0, -0x5B6B, 0,0x5B6A, 0,0x5B66,0x5B71, 0,0x3E3F, - 0, 0, 0,0x546D,0x3868,0x4D7C, 0, 0, - 0, 0,0x5B68, 0,0x4474,0x3323,0x3A2D, 0, -0x5B60, 0,0x5B70,0x3361, 0, 0,0x5B6E,0x5B72, - 0,0x456E, 0, 0, 0, 0, 0, 0, - 0,0x347E, 0,0x5C32, 0, 0,0x4C49,0x5B77, -0x347D, 0,0x5B7E, 0, 0, 0, 0,0x4B40, - 0,0x5C21,0x5C23, 0,0x5C27,0x5B79, 0,0x432A, - 0, 0, 0, 0,0x456F,0x5C2B,0x5B7C, 0, -0x5C28, 0, 0, 0,0x5C22, 0, 0, 0, - 0, 0, 0,0x3F39,0x5C2C, 0, 0,0x4033, - 0, 0, 0, 0, 0, 0,0x5C2A,0x343D, - 0, 0, 0, 0, 0,0x4F50,0x5B76, 0, - 0,0x5C26,0x3058, 0, 0,0x5B78, 0, 0, -0x4C3A,0x5B7D,0x3F22,0x4447,0x5B73, 0, 0,0x5C25, - 0, 0, 0, 0, 0, 0,0x3F7A,0x5C2F, -0x3371,0x3821, 0, 0, 0, 0,0x5C31,0x5B7A, -0x5C30, 0,0x5C29,0x5B7B, 0,0x5C2D, 0,0x5C2E, - 0, 0, 0, 0, 0,0x5C3F, 0, 0, - 0,0x464E, 0,0x5C24, 0, 0,0x5C3B, 0, - 0, 0,0x5C3D, 0,0x4458, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4D4C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4976,0x5C38,0x424A, 0, 0, 0,0x5C3E,0x413F, - 0,0x5C35,0x5C42,0x5C41, 0,0x466F,0x5C40,0x466A, - 0, 0, 0, 0, 0, 0, 0,0x5C44, -0x5C37, 0,0x3648,0x5C3A,0x3D5D, 0, 0, 0, -0x4760,0x5C3C,0x364B, 0,0x5C34,0x5C36,0x5C33, 0, - 0,0x4F30,0x335A,0x5C39, 0, 0,0x5C43,0x3335, - 0, 0, 0, 0, 0, 0, 0,0x3A67, - 0, 0, 0,0x315D, 0, 0,0x5C54, 0, - 0,0x4F31,0x5C57, 0, 0, 0, 0, 0, -0x3F3A,0x5C56, 0, 0, 0,0x5C55, 0, 0, - 0, 0, 0, 0,0x5C52, 0, 0, 0, - 0, 0, 0,0x5C46, 0, 0,0x5C63,0x5C45, - 0,0x5C58, 0, 0, 0, 0, 0, 0, -0x5C50, 0, 0,0x5C4B,0x5C48, 0,0x5C49, 0, -0x5C51, 0, 0, 0,0x7422, 0, 0,0x5C4E, -0x393D,0x4448,0x4164,0x5C4C, 0,0x5C47, 0, 0, -0x5C4A, 0, 0, 0, 0,0x4D4D,0x4B6A, 0, - 0, 0,0x5C4F,0x5C59, 0, 0, 0, 0, - 0, 0, 0, 0,0x5C61,0x5C5A, 0, 0, -0x5C67, 0,0x5C65, 0, 0, 0, 0,0x5C60, - 0, 0, 0, 0, 0, 0,0x5C5F, 0, -0x4450, 0,0x4165, 0,0x5C5D, 0, 0,0x5C5B, - 0, 0,0x5C62, 0, 0, 0, 0,0x5C68, -0x4875,0x5C6E, 0, 0, 0, 0, 0,0x5C69, -0x5C6C,0x5C66, 0, 0,0x4374, 0,0x4938, 0, -0x5C5C, 0, 0,0x5C64,0x3E40, 0,0x4C4F,0x5C78, -0x5C6B, 0, 0, 0, 0, 0,0x3822,0x3223, -0x335F, 0, 0,0x5C53, 0, 0, 0, 0, - 0, 0,0x3E41,0x5C70, 0,0x5C77,0x3C79,0x3372, - 0, 0,0x432E, 0, 0, 0, 0, 0, - 0,0x5C6D, 0, 0,0x5C72,0x5C76, 0, 0, -0x3636, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x354C,0x5C74, 0, - 0, 0, 0, 0,0x3521, 0,0x464B,0x5C73, - 0, 0, 0,0x5C75, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5C6F, - 0, 0, 0, 0, 0,0x5C71, 0, 0, - 0, 0, 0, 0,0x3360,0x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, 0, 0, -0x5D4A,0x5D49, 0,0x4B58, 0, 0,0x3D5E,0x3C6C, -0x3B44, 0,0x5D4B, 0, 0, 0, 0, 0, - 0, 0,0x5D4D,0x3F23, 0,0x5D4C, 0, 0, - 0, 0, 0,0x5D4E, 0, 0, 0, 0, - 0,0x5D4F, 0, 0, 0, 0, 0,0x5D50, -0x5D51, 0, 0, 0,0x5D52, 0,0x5D54,0x5D53, -0x5D55,0x3225,0x434A, 0,0x5D56, 0, 0,0x3B26, -0x334C,0x5D57, 0, 0,0x4542,0x544C, 0, 0, - 0, 0,0x3523,0x5D58, 0, 0, 0, 0, -0x5D59, 0,0x4A6C,0x4B68, 0, 0, 0,0x4647, -0x5D5A,0x4866, 0, 0, 0,0x487B, 0, 0, -0x4C53, 0, 0, 0,0x5D5B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5D5D,0x5D5C, 0, 0,0x5D5F, 0, 0, 0, -0x5D5E}; - -/* page 30 0x6C08-0x6CF3 */ -static uint16 tab_uni_jisx020830[]={ -0x5D61, 0, 0, 0, 0, 0, 0,0x3B61, - 0,0x4C31, 0,0x5D62,0x5D63, 0, 0,0x3524, - 0, 0, 0,0x5D64, 0, 0, 0, 0, - 0, 0, 0,0x5D66,0x5D65, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3F65, 0, 0,0x4939, -0x314A, 0, 0, 0, 0, 0,0x4845, 0, -0x4475,0x3D41,0x3561, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4846, 0, -0x3C2E, 0, 0, 0, 0,0x5D68, 0,0x3440, - 0, 0,0x3178, 0, 0,0x4672,0x5D67,0x393E, -0x4353, 0,0x5D69, 0, 0, 0, 0, 0, -0x5D71, 0,0x5D6A, 0, 0, 0, 0, 0, -0x4241, 0,0x3562,0x5D72, 0, 0, 0, 0, - 0, 0,0x3768, 0, 0,0x3525,0x5D70, 0, - 0,0x5D6E,0x5D6B,0x4D60, 0, 0, 0, 0, -0x4440, 0, 0, 0,0x4659,0x5D6C, 0, 0, -0x5D74, 0,0x5D73,0x3723, 0, 0,0x322D, 0, - 0,0x3A3B,0x5D6D,0x5D6F, 0, 0, 0, 0, - 0,0x4B57,0x4274, 0, 0, 0, 0, 0, - 0, 0, 0,0x4B77, 0, 0,0x5D7C, 0, - 0,0x5D7D, 0,0x324F, 0, 0, 0, 0, -0x4A28,0x4C7D,0x5E21,0x3C23,0x3E42,0x5D78,0x5D7E,0x3168, - 0,0x3637, 0, 0,0x5D75,0x5D7A, 0, 0, - 0,0x4074,0x4771, 0,0x4867, 0, 0, 0, - 0, 0, 0,0x5D77, 0,0x4B21, 0,0x5D79, - 0,0x5E24, 0,0x5E22, 0,0x5D7B, 0, 0, - 0,0x4B22,0x4748,0x3563, 0,0x4525, 0, 0, -0x436D, 0,0x5E25, 0, 0, 0, 0,0x5E23, -0x4259,0x5D76, 0,0x314B}; - -/* page 31 0x6D0B-0x7409 */ -static uint16 tab_uni_jisx020831[]={ -0x4D4E,0x5E30, 0, 0, 0, 0, 0,0x5E2F, - 0, 0, 0, 0,0x4076, 0,0x5E2C, 0, -0x4D6C, 0, 0,0x4636,0x5E26, 0, 0, 0, - 0, 0,0x4445, 0, 0, 0,0x314C,0x393F, -0x5E29, 0, 0, 0, 0, 0, 0,0x3D27, -0x5E2E, 0,0x5E2D,0x5E28, 0,0x5E2B, 0, 0, -0x3368, 0,0x5E2A,0x4749, 0, 0,0x4E2E, 0, - 0,0x3E74,0x4075, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5E36,0x5E34, - 0,0x494D, 0, 0, 0, 0, 0, 0, -0x5E31,0x5E33, 0,0x313A, 0, 0,0x3940,0x4F32, - 0,0x333D, 0,0x4962, 0, 0, 0, 0, - 0,0x4D61, 0, 0,0x3324,0x3F3B,0x5E35, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5E3A, 0, 0,0x3E43, 0, 0, - 0,0x4D30, 0,0x5E37, 0, 0, 0, 0, -0x5E32, 0,0x5E38, 0, 0, 0,0x4E5E, 0, -0x4573,0x4642, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3336, 0, 0,0x3155, - 0, 0,0x5E3E, 0, 0,0x5E41, 0, 0, - 0,0x4E43, 0, 0, 0,0x4D64, 0, 0, - 0, 0,0x5E48,0x5E42,0x5E3F, 0, 0, 0, -0x4E54,0x5E45, 0, 0, 0, 0,0x3D4A,0x5E47, - 0, 0,0x5E4C, 0, 0,0x4571,0x5E4A, 0, - 0, 0, 0,0x5E44, 0, 0,0x4338, 0, - 0,0x5E4B, 0,0x5E40, 0,0x5E46, 0,0x5E4D, -0x307C,0x5E43, 0,0x5E4E, 0, 0,0x3F3C, 0, -0x3D5F, 0,0x4A25, 0,0x3A2E, 0,0x5E3B,0x5E49, -0x453A, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4036, 0,0x3369,0x3A51,0x3E44,0x5E3D, -0x3D42, 0, 0, 0, 0, 0, 0, 0, -0x374C, 0,0x5E3C, 0, 0, 0,0x5E52,0x3D6D, -0x383A, 0,0x5E61, 0,0x5E5B,0x3574,0x454F, 0, -0x5E56,0x5E5F,0x302F,0x3132, 0, 0,0x3239, 0, -0x5E58,0x422C,0x5E4F,0x5E51,0x3941, 0, 0, 0, - 0, 0, 0, 0, 0,0x5E62, 0,0x5E5D, - 0, 0, 0,0x5E55, 0, 0, 0, 0, -0x5E5C, 0, 0, 0, 0, 0, 0,0x4C2B, - 0, 0,0x5E5A,0x5E5E, 0, 0, 0, 0, - 0, 0, 0,0x3850, 0,0x3E45, 0, 0, -0x4339, 0, 0, 0,0x5E54, 0, 0, 0, - 0, 0, 0, 0,0x4D2F, 0, 0, 0, -0x5E57, 0, 0,0x5E50,0x4572, 0, 0,0x5E53, - 0, 0, 0,0x5E59, 0, 0, 0, 0, - 0, 0, 0,0x4F51,0x3C3E,0x4B7E, 0,0x5E63, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x482E, 0, 0,0x5E6F,0x383B, 0, 0, - 0, 0, 0,0x3D60, 0,0x5E65, 0, 0, - 0,0x4E2F,0x3942, 0,0x5E72, 0, 0,0x306E, - 0, 0,0x5E70, 0, 0, 0, 0,0x5E64, - 0, 0, 0, 0,0x5E6A, 0, 0,0x5E6C, - 0, 0, 0,0x4D4F,0x5E67, 0, 0,0x452E, - 0, 0,0x5E69, 0, 0, 0, 0,0x5E71, - 0,0x5E6B,0x4C47, 0, 0, 0,0x5E66, 0, -0x3C22,0x5E7E, 0, 0, 0, 0,0x336A, 0, -0x5E68,0x5E6D,0x5E6E, 0, 0, 0, 0, 0, - 0, 0,0x426C,0x425A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5E76, 0, 0,0x5E7C, 0, 0,0x5E7A, - 0,0x4529, 0, 0,0x5F23,0x5E77, 0, 0, - 0, 0, 0,0x5E78,0x5E60, 0,0x3579,0x493A, - 0, 0, 0,0x3C3F, 0, 0,0x3977, 0, - 0, 0, 0, 0,0x4F33, 0,0x5E74, 0, -0x5F22,0x3169,0x4166, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4779, 0,0x3441, -0x4E7A, 0, 0, 0, 0, 0, 0, 0, -0x4C21,0x4452, 0, 0, 0, 0,0x5E7B,0x5E7D, - 0, 0, 0, 0, 0,0x4132, 0, 0, - 0, 0, 0,0x5F21,0x5E79, 0,0x5E73, 0, - 0, 0,0x3443, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3769, 0, 0, 0,0x5F2F, 0, 0, -0x5F2A,0x4078, 0, 0,0x3363, 0, 0, 0, - 0,0x3D61, 0,0x5F33, 0, 0, 0, 0, - 0, 0,0x5F2C,0x442C,0x5F29,0x4459, 0, 0, - 0,0x5F4C, 0, 0, 0,0x5F26, 0,0x5F25, - 0,0x5F2E, 0, 0, 0,0x5F28,0x5F27,0x5F2D, - 0,0x4021, 0,0x5F24, 0, 0, 0, 0, - 0, 0, 0,0x5F30, 0, 0,0x5F31, 0, - 0, 0, 0, 0,0x3442, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5F36, 0, -0x5F35,0x5F37, 0, 0, 0, 0, 0,0x5F3A, - 0, 0, 0, 0, 0, 0,0x4543, 0, -0x5F34, 0, 0, 0, 0, 0,0x5F38, 0, - 0, 0, 0, 0, 0,0x3763,0x4279,0x5F32, -0x473B, 0, 0,0x5F39, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5F3E,0x5F3C, 0, 0,0x5F3F, 0, 0, -0x5F42, 0, 0, 0,0x5F3B,0x396A,0x4728, 0, - 0,0x5E39, 0, 0, 0, 0, 0, 0, -0x4D74,0x5F3D, 0,0x5F41,0x4275, 0,0x5F40, 0, -0x5F2B, 0, 0,0x6F69, 0, 0, 0,0x5F45, - 0, 0, 0,0x5F49, 0, 0,0x5F47, 0, - 0, 0, 0, 0, 0, 0,0x5F43, 0, -0x5F44, 0, 0, 0,0x5F48, 0,0x5F46, 0, - 0, 0,0x494E, 0, 0,0x5F4E, 0,0x5F4B, -0x5F4A, 0,0x5F4D,0x4654,0x5F4F, 0, 0, 0, - 0, 0, 0,0x4375,0x426D, 0, 0, 0, - 0,0x4025, 0, 0, 0,0x5F50, 0,0x5F52, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5F51, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5E75, 0, 0, 0, 0,0x5F53, 0, - 0, 0, 0, 0, 0,0x4667, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5F54, 0, 0, 0, 0, 0, 0, 0, -0x3250, 0, 0, 0,0x4574,0x3325, 0, 0, - 0, 0, 0, 0, 0,0x3564, 0, 0, - 0,0x3C5E,0x3A52, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,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0,0x3D4F, 0, 0, 0, - 0, 0, 0, 0, 0,0x5F71, 0, 0, - 0,0x5F72, 0, 0, 0, 0,0x472E, 0, - 0, 0, 0, 0, 0, 0,0x5F74, 0, - 0, 0, 0,0x5F75, 0, 0, 0, 0, -0x4733, 0, 0, 0, 0,0x4575,0x5F77, 0, - 0, 0, 0,0x5F79, 0,0x4E55, 0,0x5F76, - 0,0x5F78,0x316D, 0,0x5F73, 0, 0, 0, - 0, 0, 0, 0,0x535B,0x5F7A, 0, 0, - 0, 0,0x4167,0x3B38,0x5F7C, 0, 0, 0, - 0,0x5F7B,0x3F24,0x5259, 0, 0, 0, 0, - 0, 0,0x5F7D, 0, 0, 0,0x6021, 0, -0x5F6E,0x5F7E, 0, 0,0x6022, 0, 0, 0, - 0, 0, 0,0x477A, 0, 0, 0, 0, - 0, 0,0x6023, 0, 0,0x6024, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6025, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6026, 0,0x445E, - 0,0x6028,0x6027, 0, 0,0x6029, 0,0x602A, - 0, 0,0x3C5F,0x4963, 0, 0, 0,0x4C6C, -0x602B,0x602C,0x4156,0x3C24,0x602D,0x602E, 0, 0, - 0, 0, 0,0x602F,0x4A52,0x4847, 0, 0, -0x6030,0x4757, 0, 0, 0, 0, 0,0x442D, - 0, 0, 0, 0, 0,0x6031,0x3267, 0, -0x356D, 0,0x4C46, 0,0x4C36, 0,0x3234,0x4F34, - 0, 0, 0, 0,0x4B52, 0,0x4A2A, 0, - 0, 0, 0, 0, 0, 0, 0,0x4037, - 0,0x6032, 0, 0, 0, 0,0x4643, 0, - 0, 0,0x3823,0x6033, 0,0x3A54,0x6035,0x6034, - 0, 0, 0, 0,0x6036, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6037, - 0, 0, 0,0x6038, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x353E, 0,0x6039, - 0, 0, 0, 0,0x603A, 0, 0, 0, - 0,0x3824, 0, 0,0x4848, 0, 0,0x603C, - 0, 0, 0,0x3E75, 0, 0,0x603B, 0, - 0, 0, 0, 0, 0, 0, 0,0x3638, -0x603D,0x603F, 0,0x603E, 0, 0, 0, 0, - 0, 0, 0,0x6040, 0,0x3851, 0,0x6041, - 0, 0, 0, 0,0x3669, 0,0x4140, 0, -0x397D, 0, 0, 0, 0,0x6043,0x6044,0x6042, - 0, 0, 0, 0, 0, 0,0x3C6D, 0, - 0,0x4648,0x3639, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6046,0x432C,0x6045, 0, - 0,0x4F35,0x4762, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6049, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x604B,0x6048, 0, 0, 0, -0x4C54,0x604A,0x604C, 0,0x4E44, 0, 0, 0, - 0, 0,0x6050, 0, 0, 0,0x604F,0x4376, -0x472D, 0, 0,0x3825,0x604E, 0, 0, 0, - 0,0x604D, 0,0x4D31,0x4D32, 0, 0, 0, - 0, 0, 0,0x6051,0x316E, 0, 0, 0, - 0,0x3976,0x3B62, 0, 0, 0, 0, 0, - 0, 0, 0,0x6052,0x6053, 0, 0, 0, - 0, 0, 0, 0,0x6055, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3D43, 0, 0, 0, 0,0x6057, 0,0x6056, - 0, 0, 0, 0, 0,0x6058, 0,0x334D, - 0, 0,0x605A, 0, 0,0x6059, 0,0x605C, -0x605B, 0, 0, 0, 0, 0, 0, 0, - 0,0x383C, 0, 0,0x4E28, 0,0x364C, 0, -0x3226, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x366A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3461, 0, - 0, 0, 0, 0, 0, 0, 0,0x4E68, -0x605E, 0, 0, 0, 0, 0, 0, 0, -0x6060, 0, 0, 0, 0,0x6061, 0,0x3251, - 0, 0, 0, 0, 0,0x605D, 0,0x3B39, - 0, 0,0x4441,0x605F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6064, 0,0x3C6E, 0, 0, - 0, 0,0x6062, 0, 0, 0, 0,0x373E, - 0, 0,0x4849,0x6063, 0, 0,0x607E, 0, - 0, 0, 0, 0, 0,0x6069, 0, 0, - 0, 0, 0,0x383D, 0, 0, 0, 0, -0x3565, 0,0x6066,0x4D7D, 0, 0,0x4E30}; - -/* page 32 0x7422-0x7845 */ -static uint16 tab_uni_jisx020832[]={ -0x4276, 0, 0,0x6068, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x606A,0x4E56,0x3657,0x487C,0x474A, 0, 0, 0, -0x606B, 0, 0, 0, 0,0x606D, 0,0x6070, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x606C, 0, 0, 0,0x606F, -0x386A,0x314D,0x6071, 0,0x3F70,0x606E,0x4E5C, 0, - 0,0x6074,0x7424, 0, 0, 0, 0,0x6072, -0x6075, 0, 0, 0, 0,0x6067,0x6073, 0, - 0,0x3A3C, 0, 0,0x6076, 0, 0, 0, - 0, 0, 0, 0,0x6077, 0, 0, 0, - 0,0x4D7E, 0, 0, 0, 0, 0, 0, - 0,0x6078, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6079, 0, 0, 0, -0x6065, 0, 0, 0, 0,0x607A, 0, 0, - 0, 0, 0, 0, 0, 0,0x3444, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3C25, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x607B, 0, 0, 0, 0,0x607C, 0, 0, - 0, 0,0x607D, 0, 0, 0, 0, 0, - 0, 0,0x313B, 0, 0, 0,0x6121, 0, -0x493B,0x6122, 0, 0,0x3424,0x6123, 0,0x6124, - 0, 0, 0, 0,0x6125, 0,0x6127,0x6128, -0x6126, 0, 0, 0,0x4953,0x612A,0x6129, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x612C,0x612B,0x612D, 0, 0, 0, 0, - 0, 0,0x612E,0x6130,0x612F, 0, 0,0x3979, - 0,0x6132, 0,0x6131, 0, 0,0x3445, 0, -0x3F53, 0,0x453C, 0,0x6133,0x4038, 0, 0, - 0,0x3B3A, 0,0x3179,0x6134, 0,0x4D51, 0, - 0,0x4A63,0x6135, 0, 0, 0,0x4544,0x4D33, -0x3943,0x3F3D, 0, 0, 0,0x434B,0x5234, 0, -0x442E,0x3268,0x6136, 0, 0, 0, 0, 0, - 0, 0,0x6137, 0,0x613C, 0, 0,0x613A, -0x6139,0x5A42,0x3326,0x6138, 0,0x305A, 0,0x482A, - 0, 0,0x484A, 0, 0, 0, 0,0x4E31, -0x613D,0x613B,0x435C,0x4026, 0, 0,0x482B, 0, -0x492D, 0,0x613F,0x4E2C,0x374D,0x6140, 0,0x613E, -0x4856,0x6141, 0,0x6142, 0, 0,0x305B, 0, - 0,0x3E76,0x6147, 0,0x6144,0x466D,0x6143, 0, - 0, 0, 0, 0, 0,0x3526, 0, 0, -0x614A, 0, 0, 0,0x6145,0x6146, 0,0x6149, -0x6148,0x4925, 0, 0,0x4142,0x4141, 0,0x353F, - 0, 0,0x614B, 0, 0, 0, 0, 0, -0x614C, 0, 0,0x614D, 0, 0, 0, 0, - 0,0x614F, 0,0x614E, 0, 0, 0, 0, - 0,0x3156, 0, 0, 0, 0, 0,0x6157, -0x4868,0x6151, 0,0x6153, 0, 0,0x6155,0x3F3E, - 0, 0,0x6156,0x6154,0x3C40, 0, 0, 0, -0x6150,0x6152, 0,0x4942, 0,0x3E49, 0, 0, -0x6159, 0, 0,0x6158, 0, 0, 0, 0, -0x615A, 0,0x3C26,0x3A2F, 0, 0,0x4577,0x615B, - 0,0x444B, 0, 0,0x615D, 0, 0, 0, -0x4E21,0x615C, 0, 0, 0, 0, 0,0x4169, - 0, 0, 0, 0, 0, 0,0x6162, 0, -0x6164,0x6165,0x4354, 0, 0, 0, 0, 0, -0x6163, 0,0x6160, 0,0x615E,0x615F, 0,0x6161, - 0, 0, 0, 0, 0, 0, 0,0x6168, - 0,0x6166, 0,0x6167, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6169,0x616B,0x616C, -0x616D, 0,0x616E, 0, 0,0x616A, 0, 0, - 0, 0, 0, 0, 0, 0,0x6170, 0, - 0, 0,0x616F, 0, 0, 0, 0, 0, - 0,0x6171, 0, 0, 0, 0, 0, 0, -0x4E45, 0, 0, 0,0x6174,0x6172,0x6173, 0, - 0, 0,0x3462, 0, 0, 0, 0, 0, -0x4C7E, 0, 0, 0,0x4A4A, 0,0x6176, 0, - 0, 0,0x6175, 0, 0, 0, 0,0x6177, -0x6178, 0, 0, 0, 0,0x617C,0x6179,0x617A, -0x617B, 0,0x617D, 0, 0, 0,0x617E, 0, -0x6221, 0, 0, 0,0x6222, 0,0x6223, 0, -0x482F,0x4550,0x6224,0x4772,0x4934, 0,0x6225, 0, - 0,0x6226,0x452A, 0,0x3327,0x3944,0x6227, 0, - 0,0x6228, 0, 0,0x6229, 0,0x3B29, 0, - 0,0x622B, 0, 0,0x622A, 0, 0,0x622C, -0x622D, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4869, 0,0x622E, 0, - 0, 0,0x622F, 0, 0,0x7369,0x6230,0x6231, -0x6232, 0, 0, 0, 0,0x3B2E, 0, 0, -0x6233,0x4756, 0, 0,0x4B5F, 0,0x314E, 0, -0x3157, 0, 0,0x6234, 0, 0, 0, 0, -0x6236, 0, 0, 0,0x6235,0x4570, 0, 0, - 0,0x4039,0x5D39, 0,0x6237,0x4C41, 0,0x6238, - 0,0x3446,0x4857,0x6239, 0,0x623A, 0, 0, -0x623B, 0, 0, 0,0x4C5C, 0, 0, 0, -0x4C55, 0,0x443E, 0, 0, 0,0x416A, 0, - 0,0x623D, 0, 0,0x3D62, 0, 0,0x3E4A, - 0, 0,0x6240, 0, 0,0x623F,0x623E,0x487D, - 0,0x3447,0x3829, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6246, 0, 0,0x6243,0x3F3F,0x4C32, 0, - 0, 0,0x6242,0x6244,0x6245, 0, 0,0x6241, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6247,0x6248, 0, -0x442F, 0,0x3463, 0, 0, 0,0x4365, 0, - 0, 0, 0, 0, 0,0x6249, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x624A,0x624D, 0, 0, 0, 0, 0,0x3F67, - 0,0x4644, 0,0x624E,0x4B53, 0,0x624B, 0, - 0,0x624C, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6251, - 0, 0, 0, 0,0x6250,0x624F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6253, 0, 0,0x6252, 0, 0,0x6254, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6256, 0,0x6255, 0, - 0, 0, 0,0x4A4D, 0, 0, 0, 0, - 0, 0,0x3D56,0x4E46, 0, 0,0x6257, 0, - 0,0x4637, 0, 0,0x6258, 0, 0,0x6259, - 0,0x625D,0x625B,0x625C, 0,0x625A, 0, 0, - 0, 0, 0, 0, 0,0x625E, 0, 0, - 0, 0, 0,0x625F, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6260, 0, 0, -0x6261,0x4C37,0x6262, 0, 0, 0, 0, 0, -0x4C70,0x6263, 0,0x434E, 0,0x476A, 0,0x366B, - 0, 0, 0,0x433B,0x6264,0x363A, 0, 0, - 0,0x4050, 0, 0, 0, 0, 0, 0, - 0, 0,0x6265, 0, 0, 0, 0, 0, -0x3A3D, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6266, 0, 0, 0, 0, 0, -0x6267, 0,0x3826,0x3A55, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6269, 0, - 0, 0, 0,0x4556,0x3A56,0x354E, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4B24, 0,0x474B, 0, 0, 0, 0, 0, -0x4557, 0, 0, 0, 0,0x395C, 0, 0, - 0, 0, 0,0x626B}; - -/* page 33 0x785D-0x7E9C */ -static uint16 tab_uni_jisx020833[]={ -0x3E4B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4E32,0x3945, - 0, 0,0x3827, 0, 0,0x4823, 0,0x626D, - 0, 0, 0, 0, 0, 0, 0,0x626F, - 0, 0, 0, 0,0x386B, 0, 0, 0, - 0,0x626E,0x4476, 0, 0, 0, 0,0x6271, -0x3337,0x626C, 0, 0,0x486A, 0,0x3130, 0, -0x3A6C, 0,0x4F52, 0, 0,0x6270, 0, 0, - 0, 0, 0, 0, 0, 0,0x6272, 0, - 0, 0,0x4A4B, 0,0x4059,0x6274, 0, 0, - 0, 0,0x6275, 0, 0, 0, 0, 0, -0x6273, 0, 0, 0, 0,0x334E, 0,0x627B, - 0,0x627A, 0, 0,0x3C27, 0, 0, 0, -0x627C,0x6277, 0, 0, 0,0x627D,0x6278, 0, - 0, 0, 0,0x4858,0x6276, 0, 0,0x6279, - 0, 0, 0, 0, 0,0x6322, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6321,0x4B61, 0, 0, 0,0x627E, - 0, 0,0x306B, 0, 0, 0, 0,0x6324, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6323, 0, 0, 0,0x3E4C, 0, 0, 0, - 0, 0,0x6325, 0, 0, 0, 0, 0, - 0,0x4143, 0, 0,0x6327,0x6326, 0, 0, - 0, 0, 0, 0,0x6328, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6268, 0, 0, 0,0x626A,0x632A,0x6329, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3C28, 0,0x4E69, - 0,0x3C52, 0,0x632B,0x3737, 0, 0, 0, - 0, 0,0x3540,0x3527,0x3B63, 0, 0, 0, - 0, 0, 0,0x4D34, 0, 0,0x6331, 0, -0x6330,0x4144,0x632D, 0, 0,0x632F, 0, 0, -0x3D4B,0x3F40,0x632E,0x632C, 0,0x472A, 0, 0, -0x3E4D, 0, 0,0x493C, 0, 0, 0, 0, -0x3A57, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4578, 0, 0,0x6332, 0, 0, - 0, 0,0x6333,0x6349,0x3658, 0, 0,0x4F3D, -0x4135, 0, 0, 0, 0,0x6334, 0, 0, -0x3252,0x4477,0x4A21, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6335, 0, 0, 0, 0, 0, 0, 0, - 0,0x357A,0x6336, 0, 0,0x6338, 0, 0, - 0,0x6339, 0,0x4729, 0, 0,0x633A, 0, - 0, 0, 0, 0,0x633B,0x633C, 0, 0, -0x3659,0x3253,0x4645,0x3D28,0x3B64, 0, 0, 0, - 0, 0, 0, 0,0x633D, 0,0x3D29, 0, - 0, 0, 0, 0,0x324A,0x4943, 0, 0, -0x633E, 0, 0,0x486B, 0, 0, 0, 0, - 0, 0,0x4145, 0,0x6341, 0,0x6342,0x4769, - 0,0x3F41,0x633F, 0,0x4361, 0, 0,0x6340, - 0, 0, 0,0x3E4E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x305C, 0, - 0, 0, 0,0x3529, 0, 0, 0, 0, - 0, 0, 0,0x6343, 0, 0,0x4478, 0, -0x6344,0x4047, 0, 0, 0, 0, 0,0x4C2D, - 0, 0,0x4923,0x6345,0x6346,0x4355, 0,0x4E47, - 0, 0,0x6348,0x6347, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3C6F, 0, 0,0x634A,0x3070, 0, 0, - 0, 0,0x634D, 0, 0, 0,0x634B,0x3254, -0x374E,0x634C,0x3946,0x3972, 0,0x4A66,0x634E, 0, - 0,0x4B54, 0, 0,0x6350, 0, 0, 0, -0x4051,0x314F,0x323A,0x302C, 0, 0, 0, 0, - 0, 0,0x634F, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6351,0x6352,0x3E77, 0, - 0, 0, 0, 0,0x6353, 0,0x334F, 0, - 0, 0, 0,0x6355, 0, 0, 0,0x376A, - 0,0x3566, 0, 0,0x6356,0x3675, 0, 0, -0x6357, 0,0x407C, 0,0x464D, 0,0x4060,0x3A75, - 0, 0, 0,0x6358, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4362,0x416B, 0, -0x635A,0x635C,0x6359,0x635B, 0, 0, 0, 0, - 0, 0,0x3722, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x635D,0x3726, 0, 0, - 0,0x3567,0x4D52,0x635F, 0, 0, 0, 0, - 0,0x6360, 0, 0, 0,0x312E, 0, 0, - 0, 0,0x6363, 0, 0, 0,0x3376,0x6362, -0x6361, 0,0x6365,0x635E, 0,0x6366,0x4E29, 0, -0x6367, 0,0x6368, 0, 0,0x5474,0x636A, 0, -0x6369, 0, 0, 0,0x636B,0x636C, 0,0x4E35, -0x636D, 0,0x706F,0x3E4F,0x636E,0x636F,0x3D57, 0, -0x4638,0x6370, 0, 0, 0,0x4328, 0, 0, -0x6371, 0,0x433C,0x6372, 0, 0, 0, 0, - 0,0x3625, 0,0x513F,0x435D,0x3C33, 0, 0, - 0, 0,0x3448, 0, 0,0x6373, 0,0x6422, - 0,0x6376, 0,0x3568, 0,0x6375,0x6424, 0, - 0, 0,0x6374, 0,0x3E50, 0, 0, 0, - 0, 0, 0,0x6378,0x6379, 0,0x452B, 0, - 0,0x637A, 0,0x335E, 0, 0, 0, 0, -0x3F5A,0x4964, 0,0x637C, 0, 0, 0,0x4268, - 0, 0, 0, 0, 0, 0,0x6377, 0, -0x637B,0x637D, 0, 0,0x3A7B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6426,0x492E, 0,0x4826,0x4579, 0,0x365A,0x6425, -0x6423, 0,0x4835,0x637E,0x435E,0x457B, 0,0x457A, - 0,0x3A76, 0, 0, 0, 0, 0, 0, -0x6438, 0, 0, 0, 0, 0, 0, 0, -0x6428, 0,0x642A, 0, 0, 0, 0,0x642D, - 0,0x642E, 0,0x642B,0x642C, 0, 0,0x6429, -0x6427, 0, 0, 0, 0,0x6421, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4A4F,0x3255, 0, 0, 0,0x6435, 0, -0x6432, 0,0x6437, 0, 0,0x6436, 0,0x4773, -0x4C27, 0,0x3B3B,0x6430,0x6439,0x6434, 0,0x6433, -0x642F, 0,0x6431, 0,0x3449, 0, 0, 0, - 0, 0, 0, 0, 0,0x433D, 0, 0, -0x407D, 0, 0, 0,0x4822, 0, 0,0x643E, - 0, 0, 0,0x4824, 0, 0, 0, 0, - 0, 0, 0,0x4061,0x643B, 0, 0,0x484F, - 0,0x643F,0x4A53, 0,0x435B, 0,0x643A,0x643C, - 0, 0,0x643D, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6440, 0, 0,0x3C44, 0, 0, 0,0x4646, -0x6445,0x6444, 0, 0,0x6441, 0, 0, 0, -0x4F36, 0, 0, 0, 0, 0,0x644A, 0, - 0,0x644E,0x644B, 0, 0, 0, 0, 0, - 0, 0, 0,0x6447, 0, 0, 0, 0, - 0, 0,0x6448, 0, 0, 0, 0, 0, -0x644D, 0, 0, 0,0x6442,0x5255,0x6449,0x6443, - 0, 0,0x644C, 0, 0, 0, 0, 0, - 0, 0,0x6452, 0,0x344A, 0,0x644F, 0, - 0, 0,0x6450, 0, 0,0x6451,0x6454, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6453,0x4876, 0, 0, 0, 0, -0x6455,0x4E7C,0x4A6D,0x645A, 0, 0,0x6457, 0, - 0, 0, 0, 0, 0, 0, 0,0x6456, -0x4052, 0,0x6459,0x645B, 0, 0, 0,0x6458, - 0,0x645F, 0,0x645C, 0, 0, 0, 0, - 0, 0,0x645D,0x6446, 0, 0, 0,0x645E, -0x6460, 0, 0, 0, 0, 0, 0,0x6461, - 0, 0, 0, 0, 0, 0,0x4A46, 0, -0x6462, 0, 0, 0, 0, 0, 0, 0, - 0,0x4C62, 0, 0,0x364E,0x3729,0x6463, 0, - 0, 0, 0, 0,0x4A34, 0,0x3F68, 0, -0x4C30, 0, 0,0x6464, 0,0x4E33, 0, 0, -0x4774, 0,0x4146,0x4734, 0, 0,0x3D4D, 0, - 0, 0,0x3040, 0,0x6469,0x6467, 0,0x6465, -0x3421, 0,0x3E51,0x646A, 0, 0,0x6468, 0, -0x6466,0x646E, 0, 0,0x646D,0x646C,0x646B, 0, - 0, 0, 0, 0,0x646F, 0, 0, 0, -0x6470,0x403A, 0,0x6471, 0,0x6473, 0, 0, -0x6472, 0, 0, 0, 0,0x3852, 0, 0, - 0,0x4138, 0, 0, 0,0x6475, 0, 0, - 0,0x457C, 0,0x6474, 0, 0, 0,0x6476, - 0,0x4A35,0x416C,0x3947, 0,0x6477, 0, 0, - 0, 0,0x4E48, 0, 0, 0, 0, 0, - 0, 0,0x6479, 0, 0,0x647A, 0,0x647B, - 0,0x647C, 0,0x3B65, 0,0x647D,0x374F, 0, - 0,0x356A, 0,0x352A, 0,0x6521, 0,0x4C73, -0x3948,0x647E, 0, 0, 0,0x6524,0x4C66, 0, -0x473C, 0, 0,0x4933, 0, 0, 0,0x3D63, -0x6523, 0,0x3C53,0x3949,0x3B66,0x3569,0x4A36,0x6522, - 0, 0, 0,0x4147,0x4B42,0x3A77, 0, 0, - 0, 0, 0, 0, 0, 0,0x3B67,0x445D, - 0,0x6527,0x4E5F,0x3A59, 0,0x6528,0x3F42, 0, -0x652A, 0, 0, 0,0x3E52,0x3A30, 0, 0, - 0, 0,0x6529, 0, 0,0x3D2A,0x383E,0x4148, -0x6525,0x652B, 0, 0, 0, 0,0x6526,0x3750, - 0,0x652E,0x6532,0x376B, 0, 0, 0, 0, - 0,0x652D, 0, 0, 0, 0,0x6536, 0, - 0,0x394A, 0, 0,0x4D6D,0x303C,0x6533, 0, - 0,0x356B, 0,0x6530, 0, 0, 0, 0, - 0,0x6531, 0, 0,0x457D,0x652F,0x652C, 0, -0x3328,0x4064, 0, 0,0x3828, 0, 0, 0, -0x6538, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6535, 0, 0, 0, - 0, 0,0x6537, 0, 0, 0,0x6534, 0, - 0, 0, 0, 0,0x3751,0x4233,0x6539,0x416E, - 0, 0,0x6546, 0, 0,0x6542,0x653C, 0, - 0, 0, 0, 0, 0, 0,0x6540,0x3C7A, -0x305D,0x653B,0x6543,0x6547,0x394B,0x4C56, 0,0x4456, -0x653D, 0, 0,0x6545, 0,0x653A,0x433E, 0, -0x653F,0x303D,0x4C4A, 0, 0, 0, 0, 0, - 0, 0,0x653E, 0, 0,0x365B,0x486C, 0, - 0, 0,0x416D, 0,0x4E50,0x3D6F, 0, 0, -0x656E, 0, 0,0x6548, 0,0x407E, 0,0x6544, -0x6549,0x654B, 0,0x4479,0x654E, 0, 0,0x654A, - 0, 0, 0,0x4A54,0x344B, 0, 0,0x4C4B, - 0, 0,0x305E, 0, 0,0x654D, 0,0x4E7D, - 0, 0, 0, 0, 0, 0,0x654C, 0, - 0, 0, 0, 0,0x316F, 0, 0,0x466C, -0x654F, 0, 0, 0,0x6556,0x6550,0x6557, 0, - 0, 0, 0, 0, 0,0x6553, 0, 0, - 0, 0, 0, 0, 0, 0,0x477B, 0, - 0,0x3C4A,0x6555, 0,0x6552,0x6558,0x6551, 0, - 0,0x3D44, 0, 0, 0, 0,0x4B25, 0, - 0,0x3D4C, 0, 0,0x6554,0x6560, 0, 0, -0x655C, 0,0x655F, 0,0x655D,0x6561,0x655B, 0, -0x6541,0x4053, 0, 0,0x484B, 0,0x655E, 0, - 0,0x6559, 0, 0, 0,0x4121,0x3752, 0, -0x3D2B, 0, 0, 0, 0, 0, 0,0x3F25, -0x4136,0x6564, 0, 0,0x6566,0x6567, 0, 0, -0x6563,0x6565, 0, 0, 0, 0, 0, 0, - 0,0x655A,0x6562, 0,0x656A,0x6569, 0, 0, -0x4B7A, 0, 0,0x372B, 0, 0, 0, 0, - 0, 0, 0, 0,0x6568, 0,0x656C,0x656B, -0x656F, 0,0x6571, 0, 0,0x3B3C,0x656D, 0, - 0, 0, 0,0x6572,0x6573, 0, 0,0x6574, - 0,0x657A,0x453B,0x6576, 0,0x6575,0x6577,0x6578, - 0,0x6579, 0, 0, 0, 0,0x657B,0x657C -}; - -/* page 34 0x7F36-0x8358 */ -static uint16 tab_uni_jisx020834[]={ -0x344C, 0,0x657D, 0,0x657E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6621, - 0, 0, 0, 0, 0, 0,0x6622,0x6623, -0x6624, 0,0x6625,0x6626, 0, 0,0x6628,0x6627, - 0, 0,0x6629, 0, 0, 0, 0, 0, - 0,0x662A,0x662B, 0, 0, 0, 0, 0, - 0,0x662E,0x662C,0x662D,0x3A61,0x3753, 0, 0, -0x4356, 0,0x4833, 0,0x3D70, 0, 0,0x474D, - 0,0x486D,0x662F,0x586D, 0, 0, 0, 0, - 0, 0, 0, 0,0x6630,0x6632, 0,0x4D65, -0x6631,0x6634,0x6633, 0,0x4D53, 0,0x6635, 0, -0x487E, 0, 0, 0, 0, 0,0x6636, 0, - 0, 0, 0, 0,0x6639, 0, 0,0x6638, -0x6637, 0, 0, 0, 0,0x663A,0x3732, 0, - 0, 0,0x4122,0x3541, 0, 0, 0, 0, -0x663E,0x663B, 0, 0,0x663C, 0, 0, 0, -0x663F, 0,0x6640,0x663D, 0, 0, 0,0x3129, - 0, 0, 0,0x3227, 0, 0, 0,0x6642, -0x6643, 0, 0, 0,0x6644, 0,0x4D62, 0, - 0, 0, 0, 0,0x3D2C, 0,0x6646,0x6645, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3F69,0x6647, 0, 0, 0, 0, -0x6648, 0, 0,0x6649, 0,0x3465, 0, 0, - 0, 0,0x344D, 0, 0,0x664A, 0, 0, - 0, 0, 0,0x664B, 0,0x4B5D,0x4D63, 0, - 0, 0,0x4D54,0x4F37, 0,0x394D,0x664E,0x3C54, -0x664D, 0, 0, 0, 0,0x664F,0x3C29, 0, - 0, 0,0x4251, 0,0x6650, 0, 0,0x394C, - 0,0x4C57,0x6651,0x6652, 0, 0,0x6653, 0, - 0, 0, 0,0x6654, 0, 0, 0, 0, - 0, 0,0x6655, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3C2A, 0, 0, -0x4C6D, 0, 0, 0, 0,0x6657, 0,0x433F, - 0,0x6656, 0, 0, 0, 0, 0, 0, -0x6659, 0, 0, 0,0x6658, 0, 0, 0, - 0, 0, 0, 0,0x665A, 0, 0, 0, -0x403B, 0,0x665B, 0,0x665C, 0, 0, 0, -0x4A39,0x665D, 0,0x416F,0x665E, 0, 0, 0, - 0, 0,0x665F, 0, 0, 0, 0, 0, - 0,0x4E7E,0x6662, 0,0x6661,0x6660,0x4430, 0, -0x6663,0x3F26, 0,0x6664, 0, 0, 0,0x6665, -0x4F38,0x6666, 0, 0, 0, 0,0x6667,0x6669, -0x6668,0x4825, 0,0x4679, 0,0x4F3E,0x4829, 0, - 0, 0, 0, 0, 0,0x666B, 0, 0, -0x3E53, 0,0x492A, 0,0x666C,0x666A, 0,0x344E, - 0, 0, 0,0x3854,0x3B68, 0, 0,0x486E, - 0, 0, 0,0x382A,0x4B43, 0,0x666F,0x666D, - 0,0x394E, 0,0x394F,0x3069, 0,0x3A68, 0, - 0, 0, 0, 0,0x4759, 0, 0, 0, - 0, 0, 0, 0, 0,0x305F,0x6674, 0, -0x4340, 0, 0, 0, 0, 0,0x4758, 0, -0x425B, 0, 0, 0, 0, 0, 0, 0, -0x6676, 0, 0,0x6672,0x6675,0x6670, 0,0x6673, -0x4B26, 0, 0,0x3855, 0, 0,0x307D,0x6671, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6678, 0,0x6679, 0, 0,0x4639, 0, - 0, 0,0x363B, 0, 0, 0,0x6726,0x473D, - 0, 0, 0, 0,0x3B69, 0, 0,0x363C, -0x4048,0x4F46,0x4C2E,0x6677,0x4054, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3553,0x667A, 0, 0, - 0, 0, 0, 0, 0,0x667C, 0, 0, - 0, 0, 0,0x667B, 0, 0, 0, 0, - 0,0x667D, 0,0x4326, 0,0x473E, 0, 0, - 0, 0, 0,0x4431, 0, 0, 0, 0, -0x6723, 0, 0, 0, 0, 0, 0, 0, -0x6722, 0, 0, 0, 0,0x667E, 0, 0, -0x3F55, 0,0x4965,0x6725, 0,0x6724,0x3950,0x4F53, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6735, 0, 0, 0, 0, 0,0x6729, -0x672A, 0, 0, 0, 0,0x3C70, 0, 0, -0x6728, 0,0x3978,0x6727, 0, 0,0x672B, 0, - 0, 0,0x4432,0x4A22,0x4123, 0, 0, 0, - 0,0x425C,0x672F, 0,0x6730,0x672C, 0, 0, - 0, 0,0x672D, 0,0x672E, 0, 0, 0, - 0,0x3951, 0, 0, 0,0x6736, 0,0x6732, - 0, 0, 0, 0,0x4966, 0,0x4B6C,0x4928, - 0, 0,0x6731, 0, 0,0x6734,0x6733, 0, - 0, 0,0x4B44,0x6737, 0, 0, 0, 0, - 0, 0,0x6738, 0, 0,0x4137, 0,0x6739, - 0, 0,0x673B, 0,0x673F, 0, 0,0x673C, -0x673A,0x473F,0x673D, 0,0x673E, 0, 0, 0, -0x3232, 0,0x6745,0x6740, 0, 0, 0,0x6741, - 0, 0, 0,0x6742, 0,0x4221, 0, 0, - 0, 0,0x6744,0x6743,0x6746, 0, 0, 0, - 0,0x6747,0x6748, 0, 0,0x3F43, 0,0x3269, - 0,0x6749,0x4E57, 0,0x3C2B, 0, 0,0x3D2D, - 0, 0, 0, 0, 0,0x3B6A,0x4357, 0, - 0, 0, 0, 0,0x674A,0x674B,0x3131, 0, -0x674C, 0, 0,0x674D,0x674E, 0, 0,0x674F, - 0,0x6750,0x363D,0x5A2A,0x6751, 0,0x4065,0x6752, -0x3C4B, 0,0x6753, 0,0x5030, 0, 0, 0, -0x6754,0x4A5E,0x345C, 0, 0,0x4124,0x3D58, 0, -0x4971,0x3D2E, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6755,0x3952,0x6756,0x484C, 0, -0x6764, 0, 0, 0, 0,0x6758, 0,0x4249, -0x4775,0x383F,0x6757,0x4125, 0, 0, 0, 0, - 0, 0,0x6759, 0, 0, 0, 0, 0, - 0,0x447A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x675B,0x675A,0x675D, 0, 0,0x675C, - 0,0x675E, 0, 0,0x6760, 0,0x675F, 0, -0x344F, 0,0x6761, 0,0x6762,0x6763, 0, 0, -0x3A31,0x4E49, 0,0x6765,0x3F27, 0, 0, 0, -0x3170,0x6766,0x6767, 0, 0, 0, 0, 0, -0x6768, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3072, 0,0x6769, - 0, 0, 0, 0,0x676A, 0, 0, 0, - 0, 0, 0,0x4967, 0, 0, 0,0x3C47, - 0,0x676C, 0, 0, 0, 0, 0,0x3329, -0x3032, 0, 0, 0, 0,0x676B,0x676E,0x474E, - 0,0x3F44, 0,0x3256, 0,0x4B27, 0, 0, - 0, 0,0x375D,0x365C, 0,0x676D, 0,0x326A, - 0, 0, 0, 0, 0, 0, 0,0x3423, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3171,0x6772,0x4E6A,0x425D, 0, - 0,0x4944, 0,0x677E, 0,0x3257,0x677C, 0, -0x677A,0x6771, 0,0x676F, 0,0x6770, 0,0x3C63, -0x366C,0x4377, 0, 0, 0,0x4651, 0, 0, - 0, 0, 0,0x3151, 0,0x6774,0x6773, 0, - 0, 0, 0,0x6779,0x6775,0x6778, 0, 0, - 0, 0, 0, 0,0x4C50,0x6777,0x3258,0x337D, -0x677B, 0, 0,0x677D, 0, 0, 0, 0, -0x3754, 0, 0, 0, 0, 0, 0, 0, -0x6823,0x682C,0x682D, 0, 0, 0,0x302B, 0, - 0, 0, 0, 0, 0,0x6834, 0, 0, - 0, 0,0x3071, 0, 0,0x682B, 0, 0, - 0,0x682A, 0,0x6825,0x6824, 0,0x6822,0x6821, -0x4363, 0,0x427B,0x6827, 0, 0, 0, 0, - 0, 0,0x6826, 0, 0, 0, 0,0x6829, - 0, 0, 0,0x4170,0x3755, 0, 0, 0, - 0,0x3141,0x6828, 0,0x3953, 0, 0, 0, - 0, 0,0x4171}; - -/* page 35 0x8373-0x8B9A */ -static uint16 tab_uni_jisx020835[]={ -0x683A, 0,0x683B, 0,0x3259, 0, 0, 0, -0x322E,0x6838, 0, 0, 0, 0, 0, 0, - 0, 0,0x682E, 0,0x6836, 0,0x683D,0x6837, - 0, 0, 0,0x6835, 0, 0, 0, 0, -0x6776, 0, 0,0x6833, 0, 0, 0,0x682F, - 0, 0, 0,0x3450,0x6831,0x683C, 0,0x6832, - 0, 0, 0, 0, 0,0x683E, 0,0x6830, -0x477C, 0, 0, 0, 0, 0,0x4D69, 0, - 0, 0,0x6839, 0, 0, 0, 0, 0, - 0, 0,0x684F, 0, 0, 0,0x6847, 0, - 0, 0,0x3F7B, 0, 0, 0, 0,0x3546, - 0,0x365D, 0,0x6842, 0, 0, 0, 0, -0x325B, 0, 0,0x3E54, 0,0x6845, 0, 0, - 0,0x3A5A, 0, 0,0x4551,0x684A, 0, 0, - 0, 0, 0, 0, 0, 0,0x4A6E, 0, -0x6841, 0, 0, 0,0x325A,0x3856,0x4929,0x684B, - 0,0x683F, 0, 0,0x6848, 0, 0, 0, -0x6852, 0,0x6843, 0, 0, 0, 0, 0, -0x6844,0x463A, 0, 0,0x6849, 0, 0, 0, -0x6846,0x4B28,0x684C,0x3060, 0, 0, 0, 0, -0x6840, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x684E, 0,0x684D, - 0, 0, 0, 0, 0, 0,0x476B,0x6854, - 0,0x685F, 0, 0, 0, 0,0x337E, 0, - 0, 0,0x6862, 0, 0,0x6850, 0, 0, - 0,0x6855,0x4D6E, 0, 0, 0, 0, 0, - 0, 0, 0,0x685E, 0, 0,0x4D55, 0, - 0, 0, 0,0x4E2A, 0, 0, 0, 0, - 0, 0, 0, 0,0x4378, 0, 0, 0, -0x336B, 0, 0, 0, 0, 0,0x4972,0x6864, -0x4621, 0, 0,0x3031, 0, 0,0x685D, 0, -0x6859,0x4172,0x6853,0x685B,0x6860, 0,0x472C, 0, - 0, 0,0x302A, 0,0x6858, 0,0x6861,0x4978, - 0, 0, 0, 0, 0, 0, 0,0x685C, - 0,0x6857, 0, 0, 0, 0, 0, 0, -0x3E55, 0, 0, 0, 0,0x3D2F, 0, 0, - 0,0x3C2C, 0, 0, 0, 0,0x4C58, 0, - 0,0x4947, 0, 0,0x6867, 0,0x6870, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x685A, 0, 0, 0, 0,0x3377, - 0, 0, 0, 0, 0,0x3E78,0x6865, 0, -0x686A,0x4173, 0, 0,0x6866, 0,0x686D, 0, - 0,0x435F, 0,0x686E, 0, 0,0x4D56,0x6863, -0x3338, 0,0x6869, 0, 0,0x686C,0x4C2C, 0, - 0, 0, 0,0x686F, 0, 0,0x6868,0x686B, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4B29, 0,0x4F21, 0, 0, 0, 0, - 0,0x6873, 0, 0, 0, 0, 0, 0, - 0,0x687A, 0, 0,0x6872,0x3C43, 0, 0, - 0, 0, 0,0x6851, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4A4E, 0, -0x4C22,0x6879,0x6878, 0,0x6874,0x6875, 0,0x3136, - 0, 0, 0, 0,0x6877, 0,0x6871, 0, - 0, 0, 0,0x4455, 0, 0, 0, 0, - 0,0x6876,0x307E, 0, 0, 0, 0, 0, - 0, 0,0x4222, 0, 0, 0, 0, 0, - 0, 0,0x4A43, 0, 0,0x687B,0x6921, 0, -0x4859, 0, 0, 0, 0,0x687E,0x3E56,0x3C49, -0x6923, 0, 0,0x363E, 0, 0, 0, 0, - 0, 0,0x6924, 0,0x4979,0x687D, 0,0x6856, - 0, 0, 0, 0, 0, 0, 0, 0, -0x687C, 0, 0, 0, 0,0x4F4F,0x4622,0x4973, - 0, 0,0x692B, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6931, 0, 0, 0, - 0, 0, 0,0x6932, 0,0x6925, 0, 0, - 0,0x4776, 0, 0,0x692F,0x6927, 0,0x6929, - 0, 0, 0, 0, 0,0x6933,0x6928, 0, - 0,0x692C, 0, 0,0x3172, 0,0x4665, 0, -0x692D,0x6930, 0, 0, 0, 0, 0, 0, - 0,0x6926, 0,0x4126, 0,0x692A,0x3B27,0x3F45, -0x3730,0x4C74, 0,0x4C79,0x3D72, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6937,0x6935, - 0, 0, 0, 0, 0, 0,0x4F4E, 0, - 0, 0, 0, 0, 0, 0,0x6934, 0, - 0, 0,0x4D75, 0,0x6936,0x6938, 0, 0, - 0, 0,0x6939, 0, 0, 0, 0, 0, - 0,0x693C,0x693A, 0, 0, 0, 0, 0, - 0,0x4623,0x693B, 0, 0, 0,0x484D,0x692E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3D73, 0,0x693D,0x6942, -0x4174, 0, 0,0x6941, 0, 0, 0,0x6922, - 0, 0, 0,0x6943,0x4149, 0, 0,0x693E, -0x6940, 0, 0, 0, 0, 0, 0, 0, -0x693F, 0, 0,0x5D31,0x5D22, 0, 0,0x6945, - 0, 0, 0, 0, 0, 0, 0,0x6944, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4D76, 0,0x623C,0x6946, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6947, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6948,0x3857, 0,0x3554, 0, 0, - 0,0x694A,0x515D, 0, 0, 0, 0,0x3575, - 0,0x4E3A, 0,0x3673,0x694B, 0, 0, 0, - 0, 0, 0, 0,0x694C, 0, 0, 0, -0x436E, 0, 0, 0, 0, 0,0x694D, 0, - 0, 0, 0, 0, 0, 0,0x467A, 0, -0x303A, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3263, -0x6952,0x6953, 0, 0, 0, 0, 0, 0, -0x694E, 0,0x3B3D, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x694F,0x4742, 0, 0, 0, 0,0x6950,0x6951, -0x695B, 0, 0, 0,0x6955,0x6958, 0, 0, - 0, 0, 0,0x6954, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6956, 0,0x6957,0x3C58, 0,0x6959, 0, -0x4341, 0,0x3756,0x3342, 0, 0, 0, 0, - 0,0x695C, 0, 0, 0, 0,0x333F, 0, -0x6961, 0, 0,0x695D,0x6960, 0, 0, 0, - 0,0x483A, 0, 0, 0, 0,0x695E, 0, - 0,0x695F,0x4948,0x485A,0x6962, 0, 0, 0, - 0, 0, 0, 0, 0,0x427D,0x696C, 0, -0x6968, 0, 0,0x326B, 0,0x6966, 0,0x4B2A, -0x6967, 0, 0,0x6964, 0,0x6965,0x696A,0x696D, - 0, 0,0x696B, 0, 0, 0,0x6969,0x6963, - 0, 0, 0, 0, 0,0x4358, 0,0x6974, - 0,0x4C2A, 0, 0, 0, 0, 0, 0, - 0, 0,0x6972, 0, 0, 0,0x6973, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x696E, 0, 0,0x6970, 0, 0, 0, -0x6971, 0, 0, 0,0x696F, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4066, 0, -0x4F39,0x6978, 0,0x6979, 0, 0, 0, 0, -0x6A21, 0,0x3F2A, 0,0x697B, 0,0x697E, 0, - 0, 0, 0, 0,0x6976,0x6975, 0, 0, -0x6A22, 0, 0,0x325C, 0,0x697C, 0,0x6A23, - 0, 0, 0,0x697D, 0, 0, 0, 0, - 0,0x697A, 0,0x4433, 0,0x6977, 0, 0, - 0, 0, 0, 0,0x4768, 0, 0,0x6A27, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4D3B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6A26, 0, 0,0x6A25, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6A2E, 0, 0, 0,0x6A28, 0, 0, 0, -0x6A30, 0, 0, 0, 0, 0, 0,0x4D66, -0x6A33, 0,0x6A2A, 0, 0,0x6A2B, 0, 0, - 0,0x6A2F, 0,0x6A32,0x6A31, 0, 0, 0, -0x6A29, 0, 0, 0, 0,0x6A2C, 0,0x6A3D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6A36, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6A34, 0, 0,0x6A35, - 0, 0, 0,0x6A3A,0x6A3B, 0,0x332A, 0, -0x3542, 0, 0,0x6A39, 0, 0, 0, 0, - 0, 0,0x6A24, 0, 0, 0, 0, 0, - 0, 0,0x6A38,0x6A3C,0x6A37, 0,0x6A3E, 0, - 0, 0,0x6A40,0x6A3F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6A42,0x6A41, -0x695A, 0, 0, 0,0x6A46, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6A43, 0, - 0, 0, 0,0x6A44, 0, 0,0x6A45, 0, -0x6A47, 0, 0, 0, 0,0x376C, 0,0x6A49, - 0,0x6A48, 0,0x3D30, 0, 0, 0, 0, - 0,0x3954,0x5E27, 0, 0, 0, 0,0x6A4A, -0x3D51, 0, 0, 0,0x3339, 0,0x6A4B, 0, -0x3152, 0,0x3E57,0x6A4C, 0, 0,0x3955,0x6A4D, -0x3061, 0, 0, 0, 0,0x493D, 0, 0, -0x6A4E, 0, 0, 0, 0,0x3F6A, 0,0x6A55, - 0, 0,0x6A52, 0,0x436F, 0, 0, 0, - 0, 0,0x6A53,0x6A50,0x365E, 0,0x6A4F,0x6A56, - 0, 0, 0, 0, 0,0x3736, 0, 0, -0x425E, 0,0x6A5C, 0, 0, 0, 0,0x6A58, - 0, 0, 0,0x4235,0x6A57, 0,0x6A5A, 0, - 0, 0, 0,0x6A51, 0, 0, 0,0x6A5B, - 0,0x6A5D, 0, 0, 0, 0, 0, 0, -0x486F, 0, 0,0x6A59, 0,0x6A5E,0x6A60, 0, - 0,0x3853,0x6A54, 0,0x3041, 0, 0, 0, - 0, 0, 0, 0,0x6A5F, 0,0x3A5B,0x4E76, -0x6A61,0x6A62,0x4175, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4E22, 0, 0, 0, - 0,0x6A63,0x4D35, 0, 0,0x6A64,0x6A65, 0, - 0,0x4A64,0x6A66, 0,0x3A40, 0,0x4E23, 0, - 0, 0, 0, 0, 0,0x6A6B, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6A6C, -0x3E58,0x6A6A, 0, 0, 0,0x4D67,0x6A67, 0, - 0,0x6A69,0x403D,0x3F7E, 0, 0, 0,0x6A68, - 0,0x6A6D, 0, 0,0x4A23, 0, 0,0x6A6F, - 0,0x6A6E, 0, 0, 0,0x336C, 0,0x4B2B, -0x6A70, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6A7C,0x6A72, 0, 0, 0, 0, - 0, 0,0x6A73, 0, 0, 0, 0,0x6A74, -0x6A75, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6A79, 0,0x6A7A, 0, 0, -0x6A78, 0, 0, 0, 0, 0,0x6A76, 0, -0x6A71,0x6A77, 0, 0, 0, 0, 0, 0, - 0,0x6A7B,0x7037, 0, 0, 0, 0, 0, - 0, 0, 0,0x3228, 0, 0, 0, 0, - 0, 0, 0,0x6A7E,0x365F,0x6A7D, 0, 0, - 0,0x6B22, 0,0x6B21, 0, 0, 0,0x6B24, - 0, 0,0x6B23, 0,0x6B25, 0, 0,0x3D31, - 0,0x6B26, 0, 0,0x6B27, 0, 0, 0, - 0, 0, 0,0x6B28,0x403E, 0,0x4D57, 0, -0x6B29, 0, 0,0x4A24,0x4746,0x6B2A, 0,0x6B2B, -0x382B, 0, 0, 0,0x352C, 0, 0, 0, -0x6B2C, 0, 0,0x3B6B,0x4741,0x6B2D, 0,0x3350, - 0, 0, 0, 0, 0, 0,0x6B2E, 0, - 0, 0, 0,0x6B30,0x4D77, 0,0x6B2F,0x3F46, - 0,0x6B31, 0, 0,0x6B32, 0, 0,0x6B33, -0x3451, 0, 0, 0, 0, 0, 0,0x6B34, - 0, 0,0x6B35, 0,0x6B36,0x6B37, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3351, - 0, 0, 0, 0, 0, 0, 0,0x6B38, - 0,0x6B39,0x6B3A, 0, 0, 0, 0, 0, -0x3272, 0, 0,0x3F28,0x6B3B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6B3C, 0, 0, 0,0x6B3D, 0, 0, - 0, 0, 0, 0, 0,0x3840, 0,0x447B, -0x6B3E, 0, 0, 0, 0,0x3757, 0,0x3F56, - 0,0x6B41, 0,0x4624, 0,0x6B40, 0, 0, -0x3731, 0, 0,0x6B3F,0x4277,0x352D, 0, 0, -0x6B42, 0,0x6B43, 0,0x3E59, 0, 0, 0, -0x376D, 0,0x6B44, 0, 0, 0, 0,0x4B2C, - 0, 0,0x405F, 0, 0, 0,0x3576, 0, -0x4C75,0x414A, 0,0x6B45, 0, 0, 0,0x3F47, -0x4370,0x3E5A, 0, 0, 0, 0,0x6B46, 0, - 0, 0, 0,0x6B49, 0,0x6B4A, 0, 0, - 0, 0, 0, 0, 0,0x3A3E,0x4242,0x6B48, - 0,0x3E5B,0x493E, 0, 0, 0, 0, 0, -0x6B47, 0, 0,0x3B6C, 0,0x3153, 0,0x6B4E, -0x3758, 0, 0,0x3B6E, 0, 0,0x3B6D, 0, -0x4F4D,0x6B4D,0x6B4C,0x4127, 0,0x354D,0x4F43,0x333A, -0x3E5C, 0, 0, 0, 0, 0, 0, 0, - 0,0x6B4B, 0, 0, 0, 0, 0,0x6B50, - 0,0x6B51,0x6B4F, 0,0x3858, 0,0x4D40, 0, - 0,0x3B6F,0x4727, 0, 0, 0,0x6B54, 0, -0x4040, 0,0x4342, 0, 0,0x4D36, 0,0x6B57, - 0, 0, 0,0x386C, 0,0x403F,0x6B53, 0, -0x6B58,0x386D,0x6B55,0x6B56, 0,0x6B52, 0, 0, - 0,0x4062,0x4649, 0, 0,0x432F, 0,0x325D, - 0, 0, 0, 0, 0, 0,0x4870, 0, - 0,0x3543, 0, 0,0x4434, 0, 0,0x6B5B, - 0,0x6B59, 0, 0,0x434C, 0, 0, 0, -0x4041,0x3452,0x6B5A, 0,0x3F5B, 0, 0,0x4E4A, - 0, 0, 0,0x4F40, 0, 0, 0,0x6B5C, -0x6B67,0x4435, 0,0x6B66, 0,0x6B63,0x6B6B,0x6B64, - 0,0x6B60, 0,0x447C,0x6B5F, 0, 0, 0, -0x6B5D, 0,0x4D21,0x3B70, 0, 0,0x6B61, 0, -0x6B5E, 0, 0, 0,0x6B65,0x3D74, 0,0x3841, - 0, 0, 0,0x427A, 0,0x4B45,0x315A,0x3062, - 0,0x4625, 0, 0,0x6B69, 0, 0, 0, - 0,0x6B68, 0,0x4666, 0,0x6B6D, 0, 0, - 0,0x6B62, 0,0x6B6C,0x6B6E, 0,0x382C,0x6B6A, -0x3956, 0,0x3C55, 0, 0,0x6B6F,0x4D58, 0, - 0, 0, 0,0x6B72, 0,0x6B75, 0, 0, -0x6B73,0x4935, 0, 0, 0, 0, 0, 0, -0x6B70, 0, 0, 0, 0, 0,0x3660, 0, - 0, 0, 0,0x6B74, 0, 0,0x6B76, 0, - 0, 0, 0, 0, 0, 0,0x6B7A, 0, - 0,0x6B77, 0,0x6B79,0x6B78, 0, 0, 0, - 0, 0, 0,0x6B7B, 0,0x3C31, 0,0x6B7D, -0x6B7C,0x4968, 0, 0,0x6C21, 0, 0, 0, - 0, 0, 0,0x3759, 0, 0, 0, 0, -0x6B7E,0x6C22, 0, 0,0x6C23,0x3544,0x6641,0x3E79, - 0,0x6C24, 0, 0,0x386E, 0, 0, 0, - 0, 0,0x6C25, 0, 0,0x6C26, 0, 0, -0x3B3E, 0, 0, 0, 0, 0, 0,0x5A4E, - 0,0x6C27, 0,0x6C28, 0,0x3D32, 0,0x6C29, -0x6C2A, 0, 0,0x6C2B, 0, 0,0x6C2C,0x6C2D -}; - -/* page 36 0x8C37-0x8D16 */ -static uint16 tab_uni_jisx020836[]={ -0x432B, 0, 0,0x6C2E, 0, 0, 0, 0, -0x6C30, 0,0x6C2F, 0, 0, 0, 0,0x4626, - 0,0x6C31, 0,0x4B2D, 0,0x6C32, 0,0x6C33, - 0,0x6C34, 0, 0, 0, 0,0x6C35, 0, - 0, 0, 0,0x465A, 0, 0, 0, 0, - 0, 0,0x3E5D,0x6C36, 0, 0, 0, 0, - 0, 0, 0,0x396B,0x502E,0x6C37, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6C38,0x493F,0x6C39, 0,0x6C41, 0, 0, - 0, 0, 0,0x6C3A, 0, 0,0x6C3C, 0, - 0, 0,0x6C3B,0x6C3D, 0,0x4B46,0x6C3E,0x6C3F, - 0, 0, 0, 0, 0,0x6C40, 0, 0, - 0,0x6C42, 0, 0, 0, 0,0x332D,0x4467, - 0,0x4969,0x3A62,0x3957, 0, 0, 0, 0, -0x494F,0x325F,0x484E,0x6C45,0x3453,0x4055,0x6C44,0x6C49, -0x4379,0x4C63, 0,0x6C47,0x6C48,0x352E, 0,0x6C4A, -0x4763,0x425F, 0, 0,0x4871,0x453D,0x6C46, 0, -0x4B47,0x326C,0x6C4C,0x4F28,0x4442,0x4F45, 0, 0, -0x3B71,0x6C4B, 0,0x4231, 0, 0,0x6C5C,0x4128, - 0, 0,0x4678, 0,0x4950, 0, 0, 0, - 0, 0, 0,0x6C4F,0x3B3F,0x3B72, 0,0x3E5E, - 0,0x4765, 0,0x382D,0x6C4E,0x6C4D, 0,0x496A, - 0, 0, 0,0x3C41, 0, 0,0x4552, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6C51,0x6C52,0x3958,0x6C50, 0, - 0, 0, 0, 0, 0,0x6C53,0x6C54, 0, -0x6C56,0x4223, 0,0x6C55,0x3466, 0,0x6C58, 0, -0x6C57,0x6C59, 0, 0,0x6C5B,0x6C5D, 0,0x6C5E -}; - -/* page 37 0x8D64-0x8F64 */ -static uint16 tab_uni_jisx020837[]={ -0x4056, 0,0x3C4F,0x6C5F, 0, 0, 0,0x3352, - 0,0x6C60, 0, 0,0x4176,0x6C61, 0,0x6C62, -0x496B, 0, 0,0x352F, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6C63, 0, 0, - 0,0x4436, 0, 0, 0, 0,0x315B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6C64, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3C71, - 0, 0, 0, 0,0x3F76, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x422D, - 0, 0, 0, 0, 0, 0,0x6C67, 0, - 0, 0,0x6C66, 0, 0, 0,0x6C65, 0, - 0, 0, 0, 0, 0, 0, 0,0x6C6D, -0x6C6B, 0, 0,0x6C68, 0, 0, 0, 0, - 0, 0,0x6C6A, 0, 0, 0,0x6C69,0x6C6C, - 0,0x3577, 0,0x6C70, 0,0x4057, 0,0x6C71, - 0, 0, 0, 0,0x3859, 0,0x6C6E,0x6C6F, - 0, 0, 0,0x4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0, 0, 0,0x3C34, 0, 0,0x6D46, -0x6D45,0x375A,0x6D48, 0, 0, 0, 0,0x3353, - 0,0x6D4A, 0, 0, 0,0x3A5C,0x6D49, 0, -0x6D52, 0, 0, 0, 0, 0,0x6D4C,0x6D4E, -0x4A65,0x6D4B, 0, 0, 0,0x6D4D, 0,0x6D51, -0x6D4F,0x3531, 0,0x6D50, 0, 0, 0, 0, - 0, 0,0x6D53, 0, 0,0x475A,0x4E58, 0, - 0, 0, 0,0x3D34, 0, 0, 0,0x6D54, - 0, 0, 0, 0,0x4D22,0x6D56, 0,0x6D55, - 0, 0,0x6D59,0x4D41, 0, 0,0x6D58, 0, -0x336D,0x6D57,0x6D5C, 0, 0,0x6D5B, 0, 0, -0x6D5A,0x4532,0x6D5D, 0, 0, 0, 0, 0, - 0, 0, 0,0x6D5E, 0, 0, 0, 0, -0x6D5F, 0, 0,0x396C, 0,0x3725,0x6D60,0x6D61, -0x6D62}; - -/* page 38 0x8F9B-0x9132 */ -static uint16 tab_uni_jisx020838[]={ -0x3F49,0x6D63, 0,0x3C2D,0x6D64, 0, 0, 0, -0x6D65, 0, 0, 0,0x5221,0x517E, 0, 0, - 0, 0,0x6D66,0x6570,0x6D67,0x4324,0x3F2B,0x4740, - 0, 0, 0, 0,0x6D68, 0, 0,0x4A55, -0x4454,0x397E, 0, 0,0x4329, 0, 0,0x312A, - 0,0x4B78,0x3F57, 0, 0, 0, 0, 0, - 0, 0, 0,0x375E, 0, 0,0x3661, 0, - 0,0x4A56, 0, 0, 0, 0, 0,0x6D69, - 0, 0, 0, 0, 0, 0, 0,0x6D6B, - 0, 0,0x6D6A,0x3260, 0, 0,0x4676,0x6D6C, -0x4777, 0,0x4533, 0,0x6D6D,0x3D52, 0, 0, - 0,0x6D6F, 0, 0,0x4C42,0x6D7E,0x6D71,0x6D72, - 0, 0,0x4449, 0, 0,0x4260,0x4177, 0, -0x4628, 0,0x6D70,0x3555, 0, 0, 0, 0, -0x6D79, 0,0x6D76,0x6E25,0x4629,0x4360,0x6D73, 0, -0x447E,0x4553,0x6D74,0x6D78,0x3F60, 0,0x4767,0x444C, - 0, 0,0x4042,0x6D77,0x422E,0x4224,0x6D75,0x3029, -0x4F22, 0, 0, 0,0x6D7A, 0, 0, 0, - 0, 0, 0,0x4261, 0, 0,0x3D35,0x3F4A, - 0, 0,0x6D7C,0x6D7B, 0,0x306F,0x6D7D, 0, - 0,0x492F, 0,0x6E27, 0, 0,0x465B,0x3F6B, - 0, 0,0x4359, 0,0x3678, 0,0x6E26,0x4D37, -0x313F, 0,0x4A57,0x3261,0x6E21,0x6E22,0x6E23,0x6E24, -0x463B,0x4323,0x3063,0x6E28, 0,0x6E29,0x7423, 0, - 0,0x423D, 0,0x6E2A, 0,0x3173,0x414C, 0, -0x382F, 0,0x4D5A, 0, 0,0x6E2B,0x452C, 0, - 0, 0,0x4178,0x3C57,0x6E2C, 0, 0,0x6E2F, - 0, 0,0x3D65,0x6E2D,0x412B,0x412A, 0,0x3064, - 0,0x4E4B,0x6E31, 0,0x4872,0x6E33,0x6E32,0x6E30, -0x6364,0x3454, 0, 0,0x6D6E, 0,0x6E35,0x6E34, - 0, 0, 0, 0,0x6E36, 0,0x4D38, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4661, 0, 0,0x4B2E, 0,0x6E37, 0,0x3C59, - 0, 0, 0, 0,0x6E38, 0,0x6E39, 0, - 0, 0,0x6E3A, 0, 0,0x4521, 0, 0, - 0, 0, 0, 0, 0, 0,0x306A, 0, - 0, 0, 0, 0, 0, 0, 0,0x3959, - 0, 0, 0,0x4F3A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6E3E, 0, 0, 0, 0, 0,0x3734,0x6E3B, - 0,0x6E3C, 0, 0, 0,0x4974, 0, 0, - 0, 0,0x3354, 0, 0, 0, 0, 0, - 0, 0,0x4D39, 0,0x363F, 0, 0, 0, - 0, 0,0x4554, 0, 0, 0, 0,0x6E3F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x6E40, - 0, 0, 0, 0, 0, 0,0x6E41, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4522, 0, 0,0x6E43, 0,0x6E42 -}; - -/* page 39 0x9149-0x92B9 */ -static uint16 tab_uni_jisx020839[]={ -0x4653,0x6E44,0x3D36,0x3C60,0x475B,0x4371, 0, 0, - 0,0x3C72, 0,0x3F6C, 0,0x6E45, 0,0x6E46, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3F5D,0x6E47, 0,0x6E48, 0, 0, 0, -0x6E49,0x4D6F, 0,0x3D37, 0, 0, 0, 0, - 0,0x6E4B,0x6E4A, 0,0x395A, 0,0x3973,0x3B40, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6E4E, 0, 0, 0, 0,0x3D66, 0, -0x6E4D, 0,0x6E4C, 0,0x4269, 0, 0,0x386F, - 0,0x4043, 0, 0, 0, 0,0x4830, 0, - 0, 0, 0,0x3D39, 0, 0, 0, 0, - 0,0x6E4F, 0,0x3E5F, 0, 0, 0, 0, - 0,0x6E52,0x6E50, 0, 0, 0,0x6E51, 0, - 0, 0, 0,0x6E54,0x6E53, 0, 0,0x3E7A, - 0,0x6E55, 0, 0, 0, 0, 0,0x6E56, -0x6E57, 0, 0, 0, 0,0x4850,0x3A53,0x3C61, -0x6E58, 0,0x6E59,0x4E24,0x3D45,0x4C6E,0x4E4C,0x6E5A, -0x3662, 0, 0, 0, 0,0x6E5B, 0,0x4523, - 0, 0,0x6E5E,0x3378,0x3F4B, 0,0x6E5C, 0, -0x6E5D, 0,0x4460, 0, 0,0x4B55,0x367C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6E60,0x6E61, 0, 0, - 0, 0, 0,0x6E5F, 0, 0,0x6E63, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x465F,0x3343, 0, 0, -0x6E67, 0, 0,0x6E64,0x6E66, 0, 0, 0, - 0, 0, 0, 0, 0,0x6E62, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6F4F, 0, 0,0x6E65, 0, 0, 0, 0, - 0, 0, 0,0x4E6B, 0, 0,0x385A, 0, - 0, 0, 0, 0, 0, 0,0x6E6F, 0, - 0, 0, 0,0x4534,0x6E6A, 0, 0,0x6E6D, -0x6E6B, 0,0x6E70, 0, 0, 0, 0,0x6E71, - 0, 0, 0, 0, 0, 0,0x6E69, 0, - 0,0x6E76,0x3174, 0, 0,0x6E68, 0, 0, - 0,0x482D, 0,0x6E6C, 0,0x3E60, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x395B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4B48, 0,0x3664, - 0, 0,0x3D46, 0,0x463C, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x412D, 0,0x6E74, 0,0x6E6E,0x6E73, 0,0x4C43, - 0,0x4438,0x6E75,0x6E72, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x412C, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6E79, 0, -0x6E78}; - -/* page 40 0x92CF-0x93E8 */ -static uint16 tab_uni_jisx020840[]={ -0x6E77, 0, 0,0x4B2F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3D7B, 0, 0, - 0, 0,0x6E7A,0x4A5F, 0, 0,0x3154, 0, - 0, 0, 0,0x4946,0x4372, 0, 0, 0, - 0,0x3578, 0,0x6E7C, 0,0x395D, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3B2C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6E7B,0x3F6D, 0, 0, 0, 0, 0, 0, - 0,0x3F6E,0x6F21,0x6F23, 0, 0, 0, 0, - 0,0x3E7B, 0,0x6F22,0x6F24, 0, 0,0x3653, - 0,0x4945, 0, 0,0x3C62,0x4F23, 0,0x6E7E, -0x3A78, 0, 0,0x4F3F, 0, 0,0x6F26, 0, - 0, 0, 0,0x6F25,0x6F27, 0, 0, 0, - 0, 0, 0, 0, 0,0x6E7D, 0, 0, - 0, 0, 0, 0,0x4669, 0,0x4555, 0, - 0, 0, 0, 0, 0,0x4457, 0,0x6F2C, - 0, 0, 0, 0,0x4343,0x6F28, 0, 0, - 0,0x6F29, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x372D, 0,0x6F2B, - 0, 0, 0, 0, 0, 0,0x3830, 0, - 0, 0, 0, 0, 0,0x6F2A, 0,0x3E61, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3379, 0, 0, - 0, 0, 0, 0, 0,0x6F30, 0,0x3A3F, -0x4179, 0, 0,0x444A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x333B, 0, 0, 0, 0,0x6F2E,0x6F2F,0x4443, - 0,0x6F2D, 0, 0, 0, 0, 0, 0, - 0, 0,0x6F31, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6F37, 0, 0, 0, - 0,0x6F3A, 0, 0, 0, 0, 0, 0, - 0,0x6F39,0x452D, 0, 0, 0, 0,0x6F32, -0x6F33,0x6F36, 0, 0, 0, 0,0x6F38, 0, - 0, 0,0x3640, 0, 0,0x6F3B,0x6F35, 0, - 0,0x6F34}; - -/* page 41 0x9403-0x9481 */ -static uint16 tab_uni_jisx020841[]={ -0x6F3F, 0, 0, 0,0x6F40, 0, 0, 0, - 0, 0, 0, 0, 0,0x6F41, 0, 0, -0x6F3E,0x6F3D, 0, 0, 0,0x3E62,0x462A,0x6F3C, - 0, 0, 0, 0, 0, 0,0x6F45, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6F43, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6F44,0x6F42, 0,0x4278, 0,0x6F46, - 0, 0, 0, 0, 0, 0,0x6F47, 0, - 0,0x6F49, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3455,0x6F48, -0x4C7A, 0, 0, 0, 0, 0, 0,0x6F54, -0x6F4A, 0, 0,0x6F4D, 0,0x6F4B, 0,0x6F4C, - 0, 0, 0, 0, 0, 0, 0,0x6F4E, - 0, 0, 0, 0, 0,0x6F50, 0, 0, - 0, 0,0x6F51, 0,0x6F52, 0, 0, 0, - 0,0x6F55,0x6F53,0x6F56,0x6F58, 0,0x6F57}; - -/* page 42 0x9577-0x95E5 */ -static uint16 tab_uni_jisx020842[]={ -0x4439, 0, 0, 0, 0, 0, 0, 0, - 0,0x4C67, 0,0x6F59,0x412E, 0, 0, 0, -0x6F5A, 0,0x4A44,0x6F5B,0x332B, 0, 0, 0, -0x313C, 0,0x3457, 0,0x3456,0x6F5C, 0,0x6F5D, - 0,0x6F5E,0x6F5F, 0, 0, 0, 0, 0, - 0,0x6F60, 0,0x3458,0x3355,0x395E,0x4836, 0, -0x6F62,0x6F61, 0, 0, 0, 0,0x6F63, 0, - 0, 0, 0,0x315C, 0, 0, 0, 0, - 0, 0,0x6F66, 0,0x6F65,0x6F64, 0,0x6F67, - 0, 0, 0, 0,0x6F6A, 0, 0, 0, -0x3047, 0, 0,0x6F68, 0,0x6F6C,0x6F6B, 0, - 0, 0, 0, 0, 0,0x6F6E,0x6F6D,0x6F6F, - 0,0x462E, 0, 0, 0,0x6F70, 0, 0, - 0, 0,0x6F71,0x6F73, 0, 0,0x6F72}; - -/* page 43 0x961C-0x9874 */ -static uint16 tab_uni_jisx020843[]={ -0x496C, 0, 0, 0, 0,0x6F74, 0, 0, - 0, 0, 0, 0,0x6F75, 0,0x3A65, 0, - 0, 0,0x6F76,0x6F77, 0, 0,0x4B49, 0, - 0, 0, 0, 0, 0, 0, 0,0x414B, - 0, 0, 0,0x3024,0x424B, 0,0x6F78, 0, -0x496D, 0, 0, 0, 0, 0, 0,0x6F7B, -0x6F79,0x395F, 0,0x6F7A,0x3842, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4A45, -0x6F7D,0x7021,0x6F7E,0x7022, 0, 0,0x3121,0x3F58, -0x3D7C,0x3459,0x7023, 0, 0, 0,0x4766, 0, -0x7025, 0, 0, 0,0x3122, 0,0x7024,0x4444, - 0,0x4E4D,0x462B,0x6F7C,0x4E26, 0,0x3831, 0, - 0,0x4D5B, 0, 0, 0, 0, 0, 0, - 0,0x3679,0x4E34, 0,0x3728, 0,0x4262,0x6721, - 0,0x7026,0x332C,0x3F6F, 0, 0, 0, 0, -0x3356,0x7028, 0,0x7029,0x7027,0x3764, 0,0x3A5D, -0x3E63, 0, 0, 0,0x3123, 0, 0,0x4E59, - 0, 0, 0,0x702B,0x6E2E, 0,0x702A, 0, - 0, 0, 0, 0,0x702E,0x702C,0x702D, 0, -0x702F, 0,0x7030,0x4E6C,0x7031,0x7032, 0,0x4049, -0x483B, 0, 0, 0,0x3F7D,0x3467, 0, 0, -0x4D3A,0x326D,0x3D38,0x385B, 0,0x7035, 0,0x7034, -0x3B73,0x7036,0x7033, 0, 0,0x3B28, 0, 0, - 0,0x703A,0x6A2D, 0, 0,0x5256, 0,0x3F77, -0x7038, 0, 0, 0, 0, 0,0x4E25,0x4671, - 0, 0, 0, 0,0x312B, 0,0x4063,0x3C36, - 0, 0, 0, 0,0x4A37, 0,0x3140, 0, - 0, 0,0x4E6D,0x4D6B, 0,0x703B, 0,0x4545, - 0, 0, 0, 0,0x3C7B, 0, 0, 0, -0x703C, 0,0x703D,0x3F4C,0x703E, 0,0x4E6E, 0, - 0,0x7039,0x7040,0x7042, 0,0x7041, 0,0x703F, - 0, 0,0x7043, 0, 0,0x7044, 0, 0, -0x417A, 0,0x3262, 0, 0, 0, 0, 0, -0x7045, 0, 0,0x4C38, 0, 0,0x7046, 0, - 0, 0, 0, 0,0x7047, 0,0x4F2A, 0, - 0, 0, 0, 0,0x5B31,0x7048, 0, 0, - 0,0x7049,0x704A, 0, 0, 0,0x704E, 0, -0x704B, 0,0x704C, 0,0x704D,0x704F, 0, 0, - 0, 0, 0, 0, 0, 0,0x4044, 0, - 0, 0,0x4C77, 0, 0,0x4045, 0, 0, -0x7050, 0,0x4873, 0,0x7051,0x7353,0x4C4C, 0, -0x7052, 0,0x7053, 0,0x7054,0x3357, 0,0x7056, - 0,0x3F59, 0, 0, 0,0x7057, 0, 0, -0x3724, 0, 0, 0, 0,0x7058,0x705C, 0, -0x705A, 0, 0, 0, 0,0x705B, 0, 0, -0x3373,0x7059,0x705D, 0, 0, 0, 0,0x705E, - 0,0x3048, 0,0x705F,0x7060, 0, 0, 0, - 0, 0, 0, 0,0x3E64, 0, 0, 0, -0x7061, 0, 0, 0,0x3547, 0, 0,0x7064, - 0, 0,0x7063, 0,0x7062, 0, 0,0x6B71, - 0,0x4A5C, 0, 0, 0, 0, 0,0x7065, -0x7066, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x7067, - 0, 0,0x7068, 0,0x7069, 0, 0,0x706A, - 0, 0, 0, 0, 0, 0, 0,0x345A, - 0, 0, 0, 0, 0, 0, 0, 0, -0x706B, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x706C,0x4723, 0, 0, 0,0x706E,0x323B, - 0,0x7071,0x7070, 0, 0, 0, 0,0x3124, - 0, 0, 0,0x3641, 0,0x4A47,0x443A,0x3A22, - 0,0x3960,0x3D67, 0,0x3F5C, 0, 0, 0, -0x7073, 0, 0,0x7072,0x4D42,0x3468,0x4852,0x465C, - 0, 0, 0,0x3F7C,0x4E4E, 0,0x375B, 0, - 0, 0, 0, 0, 0,0x7076, 0, 0, -0x7075, 0, 0, 0, 0, 0, 0, 0, -0x4B4B,0x462C, 0, 0, 0, 0, 0, 0, -0x3150, 0, 0,0x7077,0x7074, 0, 0,0x4951, -0x4D6A,0x7078, 0, 0, 0, 0, 0, 0, - 0, 0,0x7079, 0, 0, 0, 0,0x707B, -0x426A,0x335B,0x335C,0x707A, 0, 0, 0, 0, -0x3469,0x3832, 0, 0,0x346A, 0, 0,0x453F, - 0, 0,0x4E60, 0, 0, 0, 0, 0, - 0, 0, 0,0x385C, 0, 0, 0,0x707C, - 0, 0, 0,0x707D,0x707E,0x7121, 0,0x7123, -0x7122}; - -/* page 44 0x98A8-0x98C6 */ -static uint16 tab_uni_jisx020844[]={ -0x4977, 0,0x7124, 0, 0, 0, 0,0x7125, - 0,0x7126, 0, 0, 0, 0,0x7127, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x7129,0x7128, 0,0x712A}; - -/* page 45 0x98DB-0x9957 */ -static uint16 tab_uni_jisx020845[]={ -0x4874,0x664C, 0, 0,0x3F29, 0, 0,0x3532, - 0, 0, 0, 0, 0, 0,0x712B, 0, -0x712C, 0,0x522C,0x5D3B,0x4853, 0, 0,0x307B, - 0,0x303B, 0, 0, 0, 0, 0, 0, - 0,0x3B74,0x4B30,0x3E7E, 0, 0, 0, 0, -0x712D, 0,0x4C5F, 0, 0, 0,0x712E,0x4D5C, - 0,0x3142, 0, 0, 0,0x3B41, 0,0x712F, -0x326E,0x7130, 0, 0, 0,0x7131, 0, 0, - 0, 0,0x7133,0x7134, 0,0x7136,0x7132, 0, - 0,0x7135, 0, 0, 0,0x345B, 0, 0, - 0,0x7137, 0,0x7138, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x7139,0x713A, 0, 0, 0,0x713B, - 0, 0,0x713D, 0, 0, 0,0x713C, 0, -0x713F,0x7142, 0, 0, 0,0x713E,0x7140,0x7141, - 0, 0,0x7143, 0,0x3642}; - -/* page 46 0x9996-0x9A6B */ -static uint16 tab_uni_jisx020846[]={ -0x3C73,0x7144,0x7145,0x3961, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x7146, - 0, 0,0x333E, 0, 0, 0,0x474F,0x7147, -0x7148, 0, 0, 0, 0,0x435A,0x466B, 0, - 0, 0, 0, 0, 0, 0,0x7149, 0, - 0, 0, 0,0x477D, 0, 0,0x424C,0x3158, -0x366E, 0,0x366F, 0, 0, 0, 0, 0, - 0, 0,0x4373,0x714E,0x3670, 0, 0,0x326F, - 0, 0,0x714D, 0, 0,0x714B, 0,0x714C, - 0,0x714A, 0, 0,0x7158, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x714F, -0x7150, 0, 0,0x7151,0x7152, 0, 0, 0, - 0, 0,0x7154, 0, 0,0x7153, 0, 0, - 0,0x3D59, 0,0x7155, 0, 0, 0,0x7157, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3533,0x7156, 0, 0,0x417B,0x3833, 0, 0, - 0, 0, 0,0x7159, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x424D, 0, 0,0x715A, 0, 0, - 0, 0,0x462D, 0, 0, 0, 0, 0, - 0,0x715B, 0, 0, 0, 0, 0, 0, -0x7160, 0,0x715E, 0,0x715D,0x715F, 0,0x715C, - 0, 0, 0, 0, 0, 0, 0,0x7162, - 0, 0, 0, 0, 0, 0, 0,0x7161, - 0,0x7164, 0, 0,0x3643,0x7163, 0, 0, - 0,0x7165, 0, 0,0x7166, 0,0x7168,0x7167, - 0, 0, 0,0x7169,0x716B,0x716A}; - -/* page 47 0x9AA8-0x9B5A */ -static uint16 tab_uni_jisx020847[]={ -0x397C, 0, 0, 0, 0,0x716C, 0, 0, -0x716D, 0, 0, 0, 0, 0, 0, 0, -0x333C, 0, 0, 0,0x716E, 0, 0, 0, -0x716F, 0, 0, 0,0x3F71, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x7170, - 0,0x7171, 0,0x7172,0x7173, 0, 0, 0, -0x3962, 0, 0, 0, 0, 0,0x7174,0x7175, - 0, 0,0x7176,0x7177, 0, 0,0x7178, 0, - 0, 0,0x4831,0x717A, 0,0x4926,0x717B,0x7179, - 0,0x717D, 0, 0,0x717C, 0, 0,0x717E, - 0, 0, 0,0x7221, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x7222, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x7223, 0,0x7224, 0, 0, 0, 0,0x7225, - 0, 0,0x7226,0x7227, 0,0x7228, 0,0x7229, -0x722A,0x722B,0x722C, 0, 0, 0,0x722D,0x722E, - 0,0x5D35,0x722F, 0, 0, 0, 0, 0, - 0, 0, 0,0x6478,0x3534, 0, 0, 0, - 0,0x3321,0x3A32,0x7231,0x7230,0x4C25, 0, 0, - 0, 0, 0, 0, 0,0x7233,0x7234,0x7232, - 0,0x7235, 0, 0,0x4B62, 0, 0, 0, -0x7236, 0,0x357B}; - -/* page 48 0x9B6F-0x9C78 */ -static uint16 tab_uni_jisx020848[]={ -0x4F25, 0, 0, 0, 0,0x7237, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x7239, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x303E, - 0, 0,0x723A,0x4A2B,0x7238, 0, 0,0x723B, -0x723C, 0, 0, 0, 0, 0, 0, 0, -0x723D,0x723E, 0, 0, 0, 0, 0, 0, - 0,0x723F, 0,0x4B6E,0x3B2D, 0,0x3A7A,0x412F, - 0, 0, 0, 0, 0,0x7240, 0, 0, - 0, 0,0x7243, 0, 0, 0, 0, 0, - 0,0x7241, 0, 0, 0, 0, 0,0x7244, - 0, 0,0x3871,0x7242, 0, 0, 0, 0, -0x7245, 0,0x7246,0x7247, 0,0x724B, 0,0x3B2A, - 0, 0, 0, 0,0x4264, 0, 0, 0, - 0, 0,0x724C,0x7249,0x7248,0x724A, 0, 0, - 0,0x375F, 0, 0, 0, 0, 0, 0, - 0,0x7250,0x724F,0x724E, 0, 0,0x3033, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x725A, 0,0x7256, - 0,0x7257,0x7253,0x7259, 0,0x7255,0x3362, 0, - 0,0x4F4C, 0,0x7258,0x7254,0x7252,0x7251, 0, - 0, 0, 0, 0,0x725C, 0, 0, 0, - 0, 0,0x725F, 0, 0,0x725E,0x725D, 0, - 0, 0, 0, 0, 0, 0,0x4949,0x725B, -0x3073,0x7260, 0,0x7262, 0, 0, 0, 0, - 0, 0,0x336F,0x724D,0x3137, 0, 0,0x7264, - 0, 0, 0, 0, 0, 0, 0,0x7263, -0x7261,0x432D, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4B70, 0, 0, 0, 0, -0x4E5A, 0, 0,0x7265, 0, 0, 0, 0, - 0,0x7266, 0, 0, 0, 0, 0, 0, -0x7267, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x7268, - 0,0x7269}; - -/* page 49 0x9CE5-0x9DFD */ -static uint16 tab_uni_jisx020849[]={ -0x443B, 0,0x726A, 0,0x4837, 0,0x726F,0x726B, - 0, 0, 0,0x726C, 0, 0,0x4B31,0x4C44, - 0,0x4650, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x7270, 0, - 0,0x7271,0x463E,0x726E,0x726D, 0, 0, 0, - 0,0x322A, 0, 0, 0,0x7279, 0, 0, -0x7278, 0, 0, 0, 0, 0,0x3175, 0, - 0, 0,0x7276, 0, 0, 0,0x7275, 0, - 0,0x7273, 0,0x337B, 0,0x7272,0x3C32,0x3229, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3963, 0, - 0,0x727C,0x727B, 0,0x727A, 0, 0,0x7277, - 0,0x727D, 0,0x727E, 0, 0, 0, 0, - 0, 0, 0,0x7325,0x7324, 0, 0, 0, - 0, 0, 0, 0,0x7326, 0, 0,0x312D, -0x7321,0x7322, 0,0x3974,0x4C39, 0, 0,0x7323, - 0, 0, 0, 0, 0, 0, 0,0x4B32, - 0, 0,0x732B, 0, 0,0x7327, 0, 0, - 0, 0, 0, 0, 0,0x732C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x7329, 0,0x7328, 0, 0, 0, - 0, 0,0x375C, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x732D, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x732E, - 0, 0, 0, 0,0x732F, 0,0x732A, 0, - 0, 0,0x7274, 0, 0,0x7330, 0,0x4461, - 0, 0, 0,0x7334, 0,0x7335,0x7333, 0, - 0, 0, 0, 0,0x7332,0x7338, 0,0x7331, - 0,0x7336, 0, 0, 0, 0, 0, 0, - 0, 0,0x7337, 0, 0, 0,0x733A, 0, - 0, 0, 0, 0,0x7339, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x733C, 0, 0, 0, 0, 0, 0, -0x733D, 0,0x733E, 0, 0,0x4F49, 0, 0, - 0, 0, 0,0x733B,0x426B,0x3A6D, 0, 0, -0x733F}; - -/* page 50 0x9E1A-0x9E1E */ -static uint16 tab_uni_jisx020850[]={ -0x7340,0x7341, 0, 0,0x7342}; - -/* page 51 0x9E75-0x9F77 */ -static uint16 tab_uni_jisx020851[]={ -0x7343, 0, 0,0x3834,0x7344, 0, 0, 0, -0x7345, 0,0x3C2F, 0,0x7346, 0, 0, 0, - 0, 0, 0,0x7347, 0, 0,0x7348,0x7349, - 0, 0, 0, 0,0x734C,0x734A,0x4F3C, 0, -0x734B, 0,0x4E6F, 0, 0, 0, 0, 0, -0x734D, 0,0x4E5B, 0, 0, 0, 0, 0, -0x734E,0x477E, 0, 0,0x734F,0x7351, 0, 0, -0x7352, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x7350,0x396D,0x4C4D,0x4B63,0x5677, - 0,0x5D60,0x4B7B, 0, 0, 0, 0,0x322B, - 0, 0, 0, 0, 0, 0, 0,0x7354, -0x3550,0x7355,0x7356,0x7357, 0,0x3975, 0,0x7358, - 0, 0, 0,0x6054,0x4C5B, 0,0x4263,0x7359, -0x735B,0x735A, 0,0x735C, 0, 0, 0, 0, -0x735D, 0, 0,0x735E, 0, 0, 0, 0, - 0, 0,0x735F, 0, 0, 0, 0,0x7360, - 0,0x7361,0x7362, 0,0x7363, 0,0x7364,0x7365, -0x7366, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x7367,0x7368, 0, 0, 0, 0, - 0,0x4524, 0, 0, 0, 0,0x385D, 0, -0x736A, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x414D,0x736B, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x736C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4921, 0, - 0,0x736D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x736E,0x6337, 0, - 0,0x6C5A,0x706D, 0, 0,0x736F, 0,0x7370, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x7372,0x7373,0x7374,0x4E70,0x7371, 0, - 0,0x7375,0x7376, 0, 0,0x7378, 0,0x7377, - 0, 0, 0, 0, 0,0x737A, 0, 0, - 0,0x737B,0x7379}; - -/* page 52 0x9F8D-0x9FA0 */ -static uint16 tab_uni_jisx020852[]={ -0x4E36, 0, 0, 0, 0, 0, 0, 0, -0x737C, 0, 0, 0, 0, 0, 0,0x737D, -0x6354, 0, 0,0x737E}; - -/* page 53 0xFF01-0xFF5D */ -static uint16 tab_uni_jisx020853[]={ -0x212A, 0,0x2174,0x2170,0x2173,0x2175, 0,0x214A, -0x214B,0x2176,0x215C,0x2124, 0,0x2125,0x213F,0x2330, -0x2331,0x2332,0x2333,0x2334,0x2335,0x2336,0x2337,0x2338, -0x2339,0x2127,0x2128,0x2163,0x2161,0x2164,0x2129,0x2177, -0x2341,0x2342,0x2343,0x2344,0x2345,0x2346,0x2347,0x2348, -0x2349,0x234A,0x234B,0x234C,0x234D,0x234E,0x234F,0x2350, -0x2351,0x2352,0x2353,0x2354,0x2355,0x2356,0x2357,0x2358, -0x2359,0x235A,0x214E, 0,0x214F,0x2130,0x2132,0x212E, -0x2361,0x2362,0x2363,0x2364,0x2365,0x2366,0x2367,0x2368, -0x2369,0x236A,0x236B,0x236C,0x236D,0x236E,0x236F,0x2370, -0x2371,0x2372,0x2373,0x2374,0x2375,0x2376,0x2377,0x2378, -0x2379,0x237A,0x2150,0x2143,0x2151}; - -/* page 54 0xFFE3-0xFFE5 */ -static uint16 tab_uni_jisx020854[]={ -0x2131, 0,0x216F}; - -static int -my_uni_jisx0208_onechar(int code){ - if ((code>=0x005C)&&(code<=0x005C)) - return(tab_uni_jisx02080[code-0x005C]); - if ((code>=0x00A2)&&(code<=0x00B6)) - return(tab_uni_jisx02081[code-0x00A2]); - if ((code>=0x00D7)&&(code<=0x00D7)) - return(tab_uni_jisx02082[code-0x00D7]); - if ((code>=0x00F7)&&(code<=0x00F7)) - return(tab_uni_jisx02083[code-0x00F7]); - if ((code>=0x0391)&&(code<=0x03C9)) - return(tab_uni_jisx02084[code-0x0391]); - if ((code>=0x0401)&&(code<=0x0451)) - return(tab_uni_jisx02085[code-0x0401]); - if ((code>=0x2010)&&(code<=0x203B)) - return(tab_uni_jisx02086[code-0x2010]); - if ((code>=0x2103)&&(code<=0x2103)) - return(tab_uni_jisx02087[code-0x2103]); - if ((code>=0x212B)&&(code<=0x212B)) - return(tab_uni_jisx02088[code-0x212B]); - if ((code>=0x2190)&&(code<=0x2193)) - return(tab_uni_jisx02089[code-0x2190]); - if ((code>=0x21D2)&&(code<=0x21D4)) - return(tab_uni_jisx020810[code-0x21D2]); - if ((code>=0x2200)&&(code<=0x223D)) - return(tab_uni_jisx020811[code-0x2200]); - if ((code>=0x2252)&&(code<=0x226B)) - return(tab_uni_jisx020812[code-0x2252]); - if ((code>=0x2282)&&(code<=0x2287)) - return(tab_uni_jisx020813[code-0x2282]); - if ((code>=0x22A5)&&(code<=0x22A5)) - return(tab_uni_jisx020814[code-0x22A5]); - if ((code>=0x2312)&&(code<=0x2312)) - return(tab_uni_jisx020815[code-0x2312]); - if ((code>=0x2500)&&(code<=0x254B)) - return(tab_uni_jisx020816[code-0x2500]); - if ((code>=0x25A0)&&(code<=0x25CF)) - return(tab_uni_jisx020817[code-0x25A0]); - if ((code>=0x25EF)&&(code<=0x25EF)) - return(tab_uni_jisx020818[code-0x25EF]); - if ((code>=0x2605)&&(code<=0x2606)) - return(tab_uni_jisx020819[code-0x2605]); - if ((code>=0x2640)&&(code<=0x2642)) - return(tab_uni_jisx020820[code-0x2640]); - if ((code>=0x266A)&&(code<=0x266F)) - return(tab_uni_jisx020821[code-0x266A]); - if ((code>=0x3000)&&(code<=0x301C)) - return(tab_uni_jisx020822[code-0x3000]); - if ((code>=0x3041)&&(code<=0x30FE)) - return(tab_uni_jisx020823[code-0x3041]); - if ((code>=0x4E00)&&(code<=0x5516)) - return(tab_uni_jisx020824[code-0x4E00]); - if ((code>=0x552E)&&(code<=0x5563)) - return(tab_uni_jisx020825[code-0x552E]); - if ((code>=0x557B)&&(code<=0x576A)) - return(tab_uni_jisx020826[code-0x557B]); - if ((code>=0x577F)&&(code<=0x5A9B)) - return(tab_uni_jisx020827[code-0x577F]); - if ((code>=0x5ABC)&&(code<=0x5D29)) - return(tab_uni_jisx020828[code-0x5ABC]); - if ((code>=0x5D4B)&&(code<=0x6BF3)) - return(tab_uni_jisx020829[code-0x5D4B]); - if ((code>=0x6C08)&&(code<=0x6CF3)) - return(tab_uni_jisx020830[code-0x6C08]); - if ((code>=0x6D0B)&&(code<=0x7409)) - return(tab_uni_jisx020831[code-0x6D0B]); - if ((code>=0x7422)&&(code<=0x7845)) - return(tab_uni_jisx020832[code-0x7422]); - if ((code>=0x785D)&&(code<=0x7E9C)) - return(tab_uni_jisx020833[code-0x785D]); - if ((code>=0x7F36)&&(code<=0x8358)) - return(tab_uni_jisx020834[code-0x7F36]); - if ((code>=0x8373)&&(code<=0x8B9A)) - return(tab_uni_jisx020835[code-0x8373]); - if ((code>=0x8C37)&&(code<=0x8D16)) - return(tab_uni_jisx020836[code-0x8C37]); - if ((code>=0x8D64)&&(code<=0x8F64)) - return(tab_uni_jisx020837[code-0x8D64]); - if ((code>=0x8F9B)&&(code<=0x9132)) - return(tab_uni_jisx020838[code-0x8F9B]); - if ((code>=0x9149)&&(code<=0x92B9)) - return(tab_uni_jisx020839[code-0x9149]); - if ((code>=0x92CF)&&(code<=0x93E8)) - return(tab_uni_jisx020840[code-0x92CF]); - if ((code>=0x9403)&&(code<=0x9481)) - return(tab_uni_jisx020841[code-0x9403]); - if ((code>=0x9577)&&(code<=0x95E5)) - return(tab_uni_jisx020842[code-0x9577]); - if ((code>=0x961C)&&(code<=0x9874)) - return(tab_uni_jisx020843[code-0x961C]); - if ((code>=0x98A8)&&(code<=0x98C6)) - return(tab_uni_jisx020844[code-0x98A8]); - if ((code>=0x98DB)&&(code<=0x9957)) - return(tab_uni_jisx020845[code-0x98DB]); - if ((code>=0x9996)&&(code<=0x9A6B)) - return(tab_uni_jisx020846[code-0x9996]); - if ((code>=0x9AA8)&&(code<=0x9B5A)) - return(tab_uni_jisx020847[code-0x9AA8]); - if ((code>=0x9B6F)&&(code<=0x9C78)) - return(tab_uni_jisx020848[code-0x9B6F]); - if ((code>=0x9CE5)&&(code<=0x9DFD)) - return(tab_uni_jisx020849[code-0x9CE5]); - if ((code>=0x9E1A)&&(code<=0x9E1E)) - return(tab_uni_jisx020850[code-0x9E1A]); - if ((code>=0x9E75)&&(code<=0x9F77)) - return(tab_uni_jisx020851[code-0x9E75]); - if ((code>=0x9F8D)&&(code<=0x9FA0)) - return(tab_uni_jisx020852[code-0x9F8D]); - if ((code>=0xFF01)&&(code<=0xFF5D)) - return(tab_uni_jisx020853[code-0xFF01]); - if ((code>=0xFFE3)&&(code<=0xFFE5)) - return(tab_uni_jisx020854[code-0xFFE3]); - return(0); -} - - - -/* page 0 0x007E-0x007E */ -static uint16 tab_uni_jisx02120[]={ -0x2237}; - -/* page 1 0x00A1-0x017E */ -static uint16 tab_uni_jisx02121[]={ -0x2242, 0, 0,0x2270, 0,0x2243, 0, 0, -0x226D,0x226C, 0, 0, 0,0x226E,0x2234, 0, - 0, 0, 0, 0, 0, 0, 0,0x2231, - 0,0x226B, 0, 0, 0, 0,0x2244,0x2A22, -0x2A21,0x2A24,0x2A2A,0x2A23,0x2A29,0x2921,0x2A2E,0x2A32, -0x2A31,0x2A34,0x2A33,0x2A40,0x2A3F,0x2A42,0x2A41, 0, -0x2A50,0x2A52,0x2A51,0x2A54,0x2A58,0x2A53, 0,0x292C, -0x2A63,0x2A62,0x2A65,0x2A64,0x2A72,0x2930,0x294E,0x2B22, -0x2B21,0x2B24,0x2B2A,0x2B23,0x2B29,0x2941,0x2B2E,0x2B32, -0x2B31,0x2B34,0x2B33,0x2B40,0x2B3F,0x2B42,0x2B41,0x2943, -0x2B50,0x2B52,0x2B51,0x2B54,0x2B58,0x2B53, 0,0x294C, -0x2B63,0x2B62,0x2B65,0x2B64,0x2B72,0x2950,0x2B73,0x2A27, -0x2B27,0x2A25,0x2B25,0x2A28,0x2B28,0x2A2B,0x2B2B,0x2A2C, -0x2B2C,0x2A2F,0x2B2F,0x2A2D,0x2B2D,0x2A30,0x2B30,0x2922, -0x2942,0x2A37,0x2B37, 0, 0,0x2A36,0x2B36,0x2A38, -0x2B38,0x2A35,0x2B35,0x2A3A,0x2B3A,0x2A3B,0x2B3B,0x2A3D, -0x2B3D,0x2A3C, 0,0x2A3E,0x2B3E,0x2924,0x2944,0x2A47, -0x2B47,0x2A45,0x2B45, 0, 0,0x2A46,0x2B46,0x2A44, -0x2945,0x2926,0x2946,0x2A48,0x2B48,0x2A49,0x2B49,0x2947, -0x2A4A,0x2B4A,0x2A4C,0x2B4C,0x2A4B,0x2B4B,0x2929,0x2949, -0x2928,0x2948,0x2A4D,0x2B4D,0x2A4F,0x2B4F,0x2A4E,0x2B4E, -0x294A,0x292B,0x294B,0x2A57,0x2B57, 0, 0,0x2A56, -0x2B56,0x292D,0x294D,0x2A59,0x2B59,0x2A5B,0x2B5B,0x2A5A, -0x2B5A,0x2A5C,0x2B5C,0x2A5D,0x2B5D,0x2A5F,0x2B5F,0x2A5E, -0x2B5E,0x2A61,0x2B61,0x2A60,0x2B60,0x292F,0x294F,0x2A6C, -0x2B6C,0x2A69,0x2B69,0x2A66,0x2B66,0x2A6B,0x2B6B,0x2A68, -0x2B68,0x2A6A,0x2B6A,0x2A71,0x2B71,0x2A74,0x2B74,0x2A73, -0x2A75,0x2B75,0x2A77,0x2B77,0x2A76,0x2B76}; - -/* page 2 0x01CD-0x01DC */ -static uint16 tab_uni_jisx02122[]={ -0x2A26,0x2B26,0x2A43,0x2B43,0x2A55,0x2B55,0x2A67,0x2B67, -0x2A70,0x2B70,0x2A6D,0x2B6D,0x2A6F,0x2B6F,0x2A6E,0x2B6E -}; - -/* page 3 0x01F5-0x01F5 */ -static uint16 tab_uni_jisx02123[]={ -0x2B39}; - -/* page 4 0x02C7-0x02DD */ -static uint16 tab_uni_jisx02124[]={ -0x2230, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x222F,0x2232,0x2236,0x2235, 0,0x2233}; - -/* page 5 0x0384-0x0390 */ -static uint16 tab_uni_jisx02125[]={ -0x2238,0x2239,0x2661, 0,0x2662,0x2663,0x2664, 0, -0x2667, 0,0x2669,0x266C,0x2676}; - -/* page 6 0x03AA-0x03CE */ -static uint16 tab_uni_jisx02126[]={ -0x2665,0x266A,0x2671,0x2672,0x2673,0x2674,0x267B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x2678, 0, 0, 0, 0, 0, 0, 0, -0x2675,0x267A,0x2677,0x2679,0x267C}; - -/* page 7 0x0402-0x040F */ -static uint16 tab_uni_jisx02127[]={ -0x2742,0x2743,0x2744,0x2745,0x2746,0x2747,0x2748,0x2749, -0x274A,0x274B,0x274C, 0,0x274D,0x274E}; - -/* page 8 0x0452-0x045F */ -static uint16 tab_uni_jisx02128[]={ -0x2772,0x2773,0x2774,0x2775,0x2776,0x2777,0x2778,0x2779, -0x277A,0x277B,0x277C, 0,0x277D,0x277E}; - -/* page 9 0x2116-0x2122 */ -static uint16 tab_uni_jisx02129[]={ -0x2271, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x226F}; - -/* page 10 0x4E02-0x4F19 */ -static uint16 tab_uni_jisx021210[]={ -0x3021, 0,0x3022,0x3023, 0, 0, 0, 0, - 0, 0,0x3024, 0, 0, 0, 0, 0, -0x3025, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3026, 0, 0, - 0,0x3027,0x3028, 0, 0, 0,0x3029, 0, - 0,0x302A, 0, 0,0x302B,0x302C,0x302D, 0, - 0, 0, 0,0x302E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x302F,0x3030, - 0, 0,0x3031, 0, 0,0x3032, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3033, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3034, 0,0x3035, 0, 0, 0, 0, 0, - 0,0x3036, 0, 0, 0, 0,0x3037,0x3038, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3039,0x303A, 0, 0, 0,0x303B, - 0, 0, 0, 0, 0,0x303C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x303D, 0, 0, 0, 0, - 0, 0, 0, 0,0x303E,0x303F, 0, 0, - 0, 0, 0,0x3040, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3041, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3042, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3043, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3044, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3045,0x3046, 0, 0, 0, 0,0x3047,0x3048, -0x3049, 0, 0, 0, 0, 0,0x304A, 0, - 0, 0, 0, 0, 0,0x304B, 0,0x304C, - 0,0x304D, 0,0x304E, 0, 0, 0, 0, - 0, 0, 0,0x304F,0x3050,0x3051,0x3052, 0, -0x3053,0x3054, 0, 0, 0, 0,0x3055, 0, - 0,0x3056,0x3057, 0, 0, 0, 0, 0, -0x3058, 0, 0,0x3059,0x305A,0x305B, 0,0x305C -}; - -/* page 11 0x4F2E-0x5166 */ -static uint16 tab_uni_jisx021211[]={ -0x305D, 0, 0,0x305E, 0,0x3060, 0,0x3061, - 0,0x3062, 0,0x3063, 0,0x3064, 0, 0, -0x3065, 0,0x3066, 0,0x3067, 0, 0, 0, - 0, 0,0x3068,0x3069, 0,0x306A,0x306B, 0, - 0, 0, 0, 0,0x306C, 0,0x306D, 0, -0x306E, 0,0x306F, 0, 0, 0, 0, 0, - 0,0x3070,0x305F, 0, 0,0x3071, 0, 0, - 0, 0, 0, 0,0x3072, 0,0x3073, 0, -0x3074, 0, 0,0x3075, 0, 0, 0, 0, - 0,0x3076,0x3077,0x3078,0x3079, 0, 0,0x307A, -0x307B, 0, 0,0x307C,0x307D, 0,0x307E,0x3121, - 0, 0, 0,0x3122,0x3123, 0,0x3124, 0, -0x3125, 0,0x3126, 0,0x3127,0x3128,0x3129, 0, - 0,0x312A, 0,0x312B,0x312C, 0, 0, 0, -0x312D,0x312E, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x312F, 0, 0, 0, - 0,0x3130, 0,0x3131, 0,0x3132,0x3133,0x3134, -0x3135, 0,0x3136,0x3137, 0, 0, 0,0x3138, -0x3139, 0,0x313A,0x313B, 0,0x313C,0x313D,0x313E, - 0,0x313F, 0, 0,0x3140, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3141, 0, - 0, 0,0x3142, 0,0x3143, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3144, 0,0x3145, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3146,0x3147, - 0,0x3148,0x3149,0x314A, 0, 0,0x314B, 0, - 0,0x314C, 0, 0,0x314D, 0,0x314E, 0, -0x314F, 0,0x3150, 0, 0,0x3151, 0, 0, - 0,0x3152,0x3153, 0, 0,0x3154,0x3155,0x3156, -0x3157, 0, 0, 0,0x3158, 0, 0, 0, - 0,0x3159, 0, 0, 0, 0, 0, 0, -0x315A, 0,0x315B, 0,0x315C,0x315D, 0,0x315E, - 0, 0, 0, 0, 0,0x3176, 0, 0, - 0, 0,0x315F,0x3160,0x3161, 0, 0,0x3162, -0x3163, 0, 0, 0,0x3164, 0,0x3165, 0, -0x3166, 0, 0,0x3167,0x3168,0x3169, 0, 0, - 0,0x316A, 0,0x316B, 0, 0, 0, 0, - 0,0x316C,0x316D, 0,0x316E,0x316F, 0, 0, -0x3170,0x3171, 0, 0,0x3172, 0, 0,0x3173, - 0, 0,0x3174,0x3175, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3177, 0,0x3178,0x3179, 0, -0x317A, 0, 0, 0,0x317B, 0, 0, 0, -0x317C,0x317D,0x317E, 0,0x3221,0x3222,0x3223, 0, -0x3224, 0, 0, 0, 0,0x3225,0x3226, 0, -0x3227,0x3228,0x3229,0x322A,0x322B, 0, 0, 0, - 0, 0, 0, 0,0x322C, 0, 0, 0, - 0,0x322D,0x322E, 0, 0, 0, 0, 0, - 0, 0, 0,0x322F,0x3230, 0, 0,0x3231, - 0, 0,0x3232, 0, 0,0x3233,0x3234, 0, - 0,0x3235, 0, 0, 0, 0,0x3236, 0, -0x3237, 0,0x3238, 0, 0,0x3239,0x323A, 0, - 0, 0,0x323B, 0, 0, 0,0x323C,0x323D, - 0,0x323E, 0, 0,0x323F, 0,0x3240, 0, -0x3241, 0,0x3242,0x3243, 0, 0, 0, 0, - 0,0x3244, 0,0x3245,0x3251, 0, 0, 0, -0x3246, 0, 0, 0,0x3247, 0, 0, 0, -0x3248, 0, 0, 0, 0,0x3249, 0, 0, -0x324A,0x324B,0x324C, 0, 0,0x324D,0x324E,0x324F, -0x3250, 0,0x3252, 0, 0, 0, 0, 0, - 0,0x3253, 0,0x3254, 0,0x3255,0x3256,0x3257, -0x3258, 0, 0, 0, 0,0x3259, 0, 0, - 0,0x325A,0x325B, 0, 0, 0,0x325C,0x325D, - 0,0x325E, 0,0x325F, 0,0x3260,0x3261,0x3262, - 0, 0,0x3263,0x3264, 0, 0, 0, 0, - 0, 0, 0, 0,0x3265, 0, 0, 0, - 0, 0, 0, 0,0x3266, 0, 0, 0, - 0,0x3267, 0, 0, 0,0x3268, 0,0x3269, - 0,0x326A,0x326B, 0, 0, 0, 0, 0, - 0,0x326C, 0, 0, 0, 0,0x326D, 0, -0x326E}; - -/* page 12 0x517E-0x5515 */ -static uint16 tab_uni_jisx021212[]={ -0x326F, 0, 0, 0, 0,0x3270,0x3271, 0, - 0, 0, 0, 0, 0,0x3272, 0, 0, -0x3273, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3274, 0, 0, 0, 0,0x3275, - 0, 0, 0,0x3276, 0,0x3277, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3278, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3279, 0,0x327A, 0,0x327B, 0, -0x327C,0x327D, 0, 0,0x327E, 0, 0, 0, - 0, 0,0x3321, 0, 0, 0, 0, 0, - 0,0x3322, 0,0x3323,0x3324,0x3325, 0,0x3326, - 0, 0,0x3327, 0, 0, 0, 0, 0, -0x3328, 0, 0, 0,0x3329, 0, 0,0x332A, - 0, 0, 0, 0, 0, 0, 0, 0, -0x332B, 0, 0, 0,0x332C,0x332D,0x332E, 0, - 0,0x332F, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3330,0x3331, 0, 0,0x3332, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3333,0x3334, 0,0x3335, -0x3336, 0,0x3337, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3338, 0, 0, 0, - 0, 0,0x3339, 0, 0, 0, 0, 0, - 0, 0, 0,0x333A,0x333B, 0, 0,0x333C, - 0, 0, 0, 0, 0, 0,0x333D, 0, - 0, 0, 0, 0, 0, 0, 0,0x333E, - 0, 0, 0,0x333F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3340, - 0,0x3341,0x3342, 0,0x3343, 0,0x3344, 0, - 0,0x3345,0x3346,0x3347, 0, 0, 0, 0, -0x3348, 0, 0, 0, 0, 0, 0, 0, -0x3349, 0, 0, 0, 0, 0, 0, 0, - 0,0x334A,0x334B,0x334C, 0, 0, 0, 0, - 0, 0,0x334D, 0,0x334E, 0, 0,0x334F, - 0, 0, 0, 0,0x3350, 0,0x3351, 0, - 0, 0, 0, 0, 0,0x3352, 0,0x3353, -0x3354,0x3355,0x3356, 0,0x3357, 0,0x3358, 0, - 0, 0, 0, 0, 0, 0,0x3359,0x335A, -0x335B,0x335C, 0, 0, 0, 0, 0, 0, - 0,0x335D,0x335E, 0, 0, 0, 0, 0, -0x335F,0x3360,0x3361, 0,0x3362,0x3363, 0,0x3364, - 0, 0,0x3365, 0, 0, 0,0x3366, 0, -0x3367, 0,0x3368, 0, 0, 0,0x3369, 0, - 0,0x336A, 0,0x336B, 0, 0,0x336C, 0, -0x336D, 0, 0, 0, 0,0x336E,0x336F, 0, - 0, 0, 0,0x3370, 0, 0, 0,0x3371, - 0, 0,0x3372,0x3373,0x3374, 0,0x3375, 0, - 0, 0,0x3376,0x3377, 0, 0,0x3378, 0, -0x3379,0x337A, 0, 0, 0, 0, 0, 0, - 0, 0,0x337B, 0, 0,0x337C, 0, 0, - 0, 0, 0, 0,0x337D,0x337E,0x3421, 0, - 0, 0, 0,0x3422, 0,0x3423, 0, 0, - 0, 0,0x3424, 0, 0,0x3425,0x3426, 0, -0x3427,0x3428, 0, 0, 0, 0, 0,0x3429, - 0,0x342A,0x342B,0x342C, 0,0x342D,0x342E,0x342F, - 0, 0,0x3430, 0,0x3431, 0, 0,0x3432, - 0, 0, 0, 0, 0, 0,0x3433,0x3434, -0x3435, 0, 0, 0,0x3436, 0, 0, 0, - 0, 0, 0, 0, 0,0x3438,0x3437, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3439, 0,0x343A, 0, 0, - 0, 0, 0,0x343B, 0,0x343C, 0,0x343D, - 0, 0, 0, 0, 0, 0,0x343E,0x343F, - 0, 0, 0, 0,0x3440, 0, 0, 0, - 0, 0, 0,0x3441, 0, 0, 0, 0, -0x3442, 0, 0, 0, 0,0x3443, 0, 0, - 0,0x3444,0x3445, 0, 0, 0, 0, 0, -0x3446, 0, 0, 0, 0,0x3447,0x3448, 0, - 0, 0, 0,0x3449, 0, 0, 0,0x344A, - 0, 0, 0,0x344B, 0, 0,0x344C, 0, - 0, 0, 0, 0,0x344D,0x344E, 0, 0, - 0,0x344F, 0, 0,0x3450, 0,0x3451,0x3452, - 0,0x3453,0x3454, 0,0x3455, 0, 0,0x3456, - 0, 0,0x3457, 0, 0, 0, 0,0x3458, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3459, 0, 0,0x345A,0x345B, 0,0x345C, - 0, 0, 0, 0,0x345D, 0, 0,0x345E, -0x345F, 0,0x3460, 0, 0, 0, 0, 0, -0x3461,0x3462, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3463, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3464, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3465, 0, 0, - 0, 0, 0, 0,0x3466, 0, 0, 0, - 0, 0, 0,0x3467, 0, 0, 0, 0, - 0,0x3468,0x3469, 0,0x346A, 0, 0, 0, - 0,0x346B, 0,0x346C, 0, 0,0x346D,0x346E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x346F,0x3470, 0, - 0,0x3471, 0, 0, 0, 0, 0,0x3472, - 0,0x3473, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3474, 0, 0, 0,0x3475, 0,0x3476, 0, -0x3477,0x3478, 0,0x3479, 0,0x347A, 0,0x347B, -0x347C, 0, 0, 0, 0, 0,0x347D, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x347E, 0,0x3521, 0,0x3522, 0,0x3523, - 0, 0,0x3524,0x3525, 0, 0, 0,0x3526, - 0, 0, 0,0x3527, 0, 0, 0,0x3528, -0x3529, 0, 0, 0, 0, 0,0x352A, 0, - 0,0x352B, 0,0x352C, 0, 0, 0, 0, -0x352D,0x352E, 0,0x352F,0x3530, 0, 0,0x3531, -0x3532, 0, 0,0x3533, 0, 0, 0, 0, - 0,0x3534, 0,0x3535,0x3536,0x3537, 0, 0, - 0,0x3538, 0, 0, 0, 0, 0, 0, -0x3539, 0, 0, 0,0x353A, 0, 0,0x353B, -0x353C, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x353D, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x353E, 0,0x353F, 0, - 0,0x3540, 0, 0, 0, 0, 0, 0, -0x3541, 0, 0, 0, 0, 0,0x3542, 0, -0x3543,0x3544,0x3545,0x3546, 0, 0, 0,0x3547, - 0, 0,0x3548,0x3549, 0, 0,0x354A,0x354B, -0x354C, 0, 0, 0, 0, 0, 0,0x354D -}; - -/* page 13 0x552A-0x5566 */ -static uint16 tab_uni_jisx021213[]={ -0x354E,0x354F, 0, 0, 0, 0, 0, 0, -0x3550, 0, 0,0x3551,0x3552, 0, 0, 0, - 0,0x3553,0x3554,0x3555, 0, 0, 0,0x3556, - 0, 0, 0, 0, 0,0x3557, 0,0x3558, -0x3559, 0, 0,0x355A, 0, 0,0x355B,0x355C, - 0, 0, 0, 0, 0, 0,0x355D, 0, -0x355E,0x355F, 0, 0,0x3560, 0,0x3561,0x3562, - 0, 0,0x3563, 0,0x3564}; - -/* page 14 0x557F-0x5C36 */ -static uint16 tab_uni_jisx021214[]={ -0x3565, 0,0x3566,0x3567, 0, 0, 0,0x3568, - 0,0x3569, 0, 0, 0, 0, 0,0x356A, -0x356B, 0,0x356C,0x356D,0x356E,0x356F, 0, 0, -0x3570, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3571,0x3572, 0, 0, - 0, 0, 0, 0, 0, 0,0x3573, 0, - 0, 0, 0,0x3574, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3575, 0,0x3576, 0,0x3577, 0, 0,0x3578, - 0, 0,0x3579, 0,0x357A,0x357B, 0,0x357C, - 0, 0,0x357D,0x357E,0x3621, 0, 0, 0, -0x3622,0x3623, 0, 0,0x3624, 0, 0,0x3625, - 0, 0, 0,0x3626, 0, 0, 0, 0, - 0, 0,0x3627, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3628, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3629, 0, 0, 0, 0, 0,0x362A, 0, - 0,0x362B, 0,0x362C, 0, 0,0x362D,0x362E, -0x362F,0x3630,0x3631,0x3632, 0, 0, 0, 0, - 0, 0,0x3633, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3634, 0, 0, - 0,0x3635, 0, 0,0x3636, 0,0x3637, 0, -0x3638, 0,0x3639, 0,0x363A,0x363B,0x363C, 0, -0x363D,0x363E,0x363F, 0,0x3640,0x3641, 0,0x3642, - 0, 0,0x3643, 0,0x3644, 0,0x3645, 0, -0x3646, 0, 0, 0, 0,0x3647, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3648, - 0,0x3649,0x364A,0x364B,0x364C, 0, 0,0x364D, - 0, 0,0x364E, 0, 0, 0,0x364F, 0, -0x3650, 0,0x3651,0x3652, 0, 0,0x3653, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3654,0x3655, 0, - 0,0x3656, 0, 0,0x3657,0x3658, 0, 0, - 0, 0, 0, 0, 0, 0,0x3659, 0, - 0, 0,0x365A,0x365B, 0, 0,0x365C,0x365D, -0x365E, 0, 0, 0, 0, 0, 0,0x365F, -0x3660,0x3661,0x3662, 0,0x3663,0x3664,0x3665, 0, - 0, 0,0x3666, 0,0x3667, 0, 0, 0, -0x3668, 0, 0, 0, 0, 0, 0,0x3669, - 0, 0, 0, 0, 0, 0,0x366A, 0, - 0, 0,0x366B,0x366C,0x366D,0x3670,0x3671, 0, -0x366E,0x366F, 0, 0, 0, 0, 0, 0, - 0, 0,0x3672, 0, 0,0x3673,0x3674, 0, -0x3675, 0,0x3676, 0, 0,0x3677,0x3678,0x3679, -0x367A,0x367B, 0, 0,0x367D, 0,0x367E, 0, - 0, 0,0x367C, 0, 0, 0, 0,0x3721, -0x3722, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3723,0x3724, 0, 0, 0, 0, -0x3725, 0, 0,0x3726, 0,0x3727, 0, 0, - 0, 0,0x3728, 0, 0, 0,0x3729, 0, - 0, 0, 0,0x372A,0x372B, 0,0x372C, 0, - 0,0x372D, 0,0x372E,0x372F,0x3730,0x3731, 0, - 0, 0,0x3732,0x3733, 0,0x3734, 0,0x3735, -0x3736, 0, 0, 0,0x3737,0x3738, 0, 0, - 0, 0, 0, 0, 0, 0,0x3739,0x373A, -0x373B, 0, 0, 0, 0, 0,0x373C,0x373D, - 0, 0, 0, 0, 0,0x373E,0x373F, 0, - 0, 0, 0,0x3740, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3741, 0, 0,0x3742, 0, -0x3743,0x3744, 0, 0,0x3745, 0,0x3746,0x3747, -0x3748,0x3749,0x374A, 0,0x374B,0x374C,0x374D, 0, -0x374E, 0,0x374F,0x3750,0x3751,0x3752, 0,0x3753, - 0, 0,0x3754, 0,0x3755, 0, 0, 0, - 0, 0, 0, 0, 0,0x3756, 0, 0, - 0, 0, 0, 0, 0,0x3757,0x3760, 0, -0x3758, 0,0x3759,0x375A, 0,0x375B,0x375C,0x375D, -0x375E, 0,0x375F, 0, 0, 0, 0, 0, -0x3761,0x3762,0x3763, 0, 0,0x3764, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3765, 0, 0, 0, 0,0x3766, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3767,0x3768, 0, 0, 0,0x3769, 0, 0, -0x376A, 0, 0, 0, 0, 0,0x376B, 0, - 0, 0, 0, 0, 0, 0,0x376C,0x376D, - 0, 0,0x377E, 0, 0,0x376E, 0,0x376F, -0x3770, 0,0x3771, 0, 0, 0,0x3772, 0, - 0,0x3773, 0, 0, 0, 0,0x3774,0x3775, - 0,0x3776, 0, 0, 0, 0,0x3777,0x3778, -0x3779, 0, 0, 0,0x377A,0x377B, 0, 0, - 0,0x377C,0x377D, 0, 0,0x3821,0x3822, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3823, 0, 0,0x3824, -0x3825,0x3826, 0, 0, 0, 0, 0,0x3827, -0x3828, 0, 0, 0, 0, 0,0x3829, 0, - 0, 0, 0,0x382A, 0, 0, 0, 0, - 0, 0,0x382B, 0, 0, 0, 0, 0, -0x382C, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x382D, 0, 0,0x382E,0x382F, 0, -0x3830,0x3831, 0, 0, 0, 0,0x3832, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3833, 0,0x3834, 0, 0,0x3835, 0, 0, -0x3836,0x3837, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x3838, 0, 0, 0,0x3839, 0, 0, -0x383A,0x383B,0x383C, 0, 0, 0, 0, 0, -0x383D,0x383E,0x383F,0x3840, 0,0x3841,0x3842, 0, -0x3843,0x3844, 0, 0, 0,0x3845, 0,0x3846, - 0, 0, 0, 0, 0, 0,0x3847, 0, - 0,0x3848,0x3849,0x384A, 0, 0, 0,0x384B, - 0, 0,0x384C, 0, 0, 0, 0, 0, - 0, 0,0x384D,0x384E, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x3850, 0, 0, - 0, 0, 0,0x3851, 0,0x384F, 0, 0, - 0,0x3852, 0, 0, 0, 0,0x3853,0x3854, - 0,0x3855, 0,0x3856, 0,0x3857, 0,0x3858, - 0, 0, 0,0x3859, 0, 0,0x385A, 0, - 0, 0,0x385B,0x385C, 0, 0, 0, 0, - 0, 0,0x385D, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x385E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x385F,0x3860, - 0, 0, 0, 0,0x3861,0x3862, 0, 0, - 0, 0, 0,0x3863,0x3864,0x3865, 0, 0, - 0, 0, 0, 0, 0, 0,0x3867, 0, - 0, 0,0x3868, 0,0x3869,0x386A, 0, 0, - 0,0x386B, 0, 0, 0, 0, 0, 0, -0x386C,0x386D, 0, 0,0x386E, 0,0x386F,0x3870, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3871, 0, 0, 0,0x3872, 0, 0,0x3873, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3874,0x3875, 0, 0, 0, - 0, 0,0x3876, 0,0x3877, 0,0x3878,0x3879, -0x387A, 0,0x387B, 0,0x387C, 0, 0, 0, - 0, 0, 0, 0,0x387D, 0,0x387E, 0, -0x3921, 0, 0,0x3922, 0, 0,0x3923,0x3924, - 0, 0,0x3925, 0,0x3926,0x3927, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x3928,0x3929, 0,0x392A, - 0, 0, 0,0x392B, 0, 0,0x392C, 0, -0x392D, 0, 0, 0, 0, 0, 0, 0, -0x392E, 0, 0, 0, 0,0x392F, 0, 0, -0x3930, 0, 0, 0, 0, 0,0x3931,0x3932, -0x3933,0x3934, 0, 0,0x3935, 0, 0, 0, -0x3936, 0, 0,0x3937, 0,0x3938, 0, 0, - 0, 0,0x3939, 0,0x393A,0x393B, 0, 0, - 0,0x393C, 0,0x393D, 0, 0,0x393E, 0, - 0, 0, 0,0x393F, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3940,0x3941, -0x3942, 0, 0, 0,0x3943,0x3944, 0, 0, -0x3945, 0, 0, 0, 0, 0, 0,0x3946, -0x3947, 0,0x3948,0x3949, 0,0x394A, 0, 0, -0x394B, 0, 0, 0, 0, 0, 0, 0, - 0,0x394C, 0, 0, 0,0x394D, 0, 0, - 0, 0, 0, 0, 0,0x394E,0x394F,0x3950, - 0, 0, 0,0x3951,0x3952, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3953, - 0, 0, 0, 0,0x3954,0x3955, 0, 0, -0x3956,0x3957, 0,0x3958, 0, 0,0x3959, 0, - 0,0x395A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x395B,0x395C, 0, -0x395D,0x395E, 0, 0, 0,0x395F, 0, 0, - 0,0x3960, 0, 0, 0, 0,0x3961, 0, - 0, 0, 0, 0, 0, 0, 0,0x3962, - 0, 0, 0, 0,0x3963, 0,0x3964, 0, -0x3965, 0, 0, 0, 0, 0,0x3966, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3967, 0, 0,0x3968,0x3969, 0, 0,0x396A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x396B, 0, 0, 0, - 0,0x396C, 0, 0,0x396D, 0, 0,0x396E, - 0, 0,0x396F, 0, 0,0x3970, 0,0x3971, -0x3972,0x3973, 0,0x3974, 0, 0, 0, 0, -0x3975, 0, 0, 0, 0,0x3976, 0, 0, - 0, 0,0x3977,0x3978,0x3979, 0,0x397A, 0, - 0,0x397B, 0,0x397C,0x397D, 0, 0, 0, -0x397E, 0, 0, 0, 0,0x3A21, 0,0x3A22, - 0,0x3A23, 0, 0, 0, 0, 0, 0, -0x3A24, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3A25, 0,0x3A26, 0, 0, - 0,0x3A27, 0, 0, 0, 0,0x3A28, 0, - 0, 0, 0,0x3A29, 0, 0, 0,0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0, 0, 0,0x3E3C,0x3E3D, -0x3E3E,0x3E3F,0x3E40, 0,0x3E41,0x3E42, 0,0x3E43, - 0, 0,0x3E44, 0,0x3E45, 0, 0, 0, -0x3E46, 0, 0, 0, 0, 0, 0, 0, -0x3E47,0x3E48, 0, 0, 0, 0,0x3E49,0x3E4A, - 0, 0, 0,0x3E4B,0x3E4C,0x3E4D, 0,0x3E4E, - 0, 0, 0, 0, 0, 0, 0,0x3E4F, - 0, 0, 0,0x3E50,0x3E51, 0, 0,0x3E52 -}; - -/* page 17 0x615E-0x6290 */ -static uint16 tab_uni_jisx021217[]={ -0x3E53, 0,0x3E54, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x3E55, 0, - 0, 0, 0, 0,0x3E56, 0, 0, 0, - 0, 0,0x3E57, 0, 0,0x3E58,0x3E59, 0, - 0,0x3E5A,0x3E5B,0x3E5C, 0,0x3E5D,0x3E5E, 0, - 0, 0, 0, 0, 0,0x3E5F, 0,0x3E60, - 0, 0, 0, 0,0x3E61,0x3E62, 0, 0, - 0,0x3E63,0x3E64, 0, 0, 0,0x3E65,0x3E66, - 0,0x3E67,0x3E68, 0, 0, 0, 0,0x3E69, - 0, 0,0x3E6A, 0,0x3E6B, 0, 0,0x3E6C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x3E6D,0x3E6E, 0, 0,0x3E6F, 0, - 0, 0,0x3E70,0x3E71,0x3E72, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x3E73,0x3E74, 0, 0, 0, 0, 0,0x3E75, - 0, 0, 0, 0, 0, 0,0x3E76,0x3E77, -0x3E78,0x3E79, 0,0x3E7A,0x3E7B, 0, 0,0x3E7E, - 0,0x3E7C, 0,0x3E7D, 0, 0,0x3F21,0x3F22, - 0,0x3F23, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3F24, 0,0x3F25,0x3F26, 0, - 0,0x3F27, 0, 0, 0, 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 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x3F64,0x3F65, 0, 0,0x3F66, - 0, 0, 0, 0, 0, 0, 0,0x3F67, -0x3F68, 0, 0,0x3F69, 0, 0,0x3F6A, 0, - 0, 0, 0,0x3F6B,0x3F6C,0x3F6D,0x3F6E, 0, -0x3F6F, 0, 0, 0,0x3F70,0x3F71, 0, 0, -0x3F72, 0, 0, 0,0x3F73,0x3F74,0x3F75, 0, - 0, 0,0x3F76, 0, 0,0x3F77, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x3F78, -0x3F79, 0, 0, 0, 0, 0,0x3F7A,0x3F7B, - 0, 0, 0,0x3F7C, 0, 0,0x3F7D,0x3F7E, - 0, 0,0x4021, 0, 0, 0,0x4022,0x4023, - 0,0x4024, 0, 0,0x4025, 0,0x4026, 0, - 0,0x4027, 0, 0,0x4028, 0, 0, 0, - 0, 0,0x4029, 0, 0, 0,0x402A,0x402B, - 0, 0, 0,0x402C,0x402D, 0, 0, 0, -0x402E, 0, 0, 0, 0, 0,0x402F, 0, -0x4030, 0, 0, 0, 0, 0, 0,0x4031, -0x4032,0x4033, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4034, - 0, 0, 0,0x4035, 0, 0, 0,0x4036, - 0, 0,0x4037, 0, 0, 0, 0, 0, -0x4038, 0, 0,0x4039, 0,0x403A,0x403B,0x403C, - 0, 0, 0, 0, 0, 0,0x403D, 0, - 0, 0,0x403E, 0, 0, 0, 0,0x403F, - 0, 0, 0, 0,0x4040, 0,0x4041, 0, - 0, 0, 0, 0,0x4042,0x4043, 0,0x4044, - 0, 0,0x4045,0x4046, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x4047,0x4048, 0, 0, 0, - 0, 0,0x4049, 0,0x404A, 0,0x404B, 0, - 0, 0,0x404C, 0, 0, 0, 0, 0, -0x404D, 0,0x404E, 0,0x404F, 0,0x4050,0x4051, - 0, 0, 0,0x4052,0x4053, 0, 0, 0, - 0,0x4054,0x4055, 0, 0, 0, 0,0x4056, - 0, 0, 0, 0, 0, 0, 0,0x4057, - 0,0x4058, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4059, 0, 0, - 0,0x405A, 0,0x405B,0x405C,0x405D,0x405E, 0, - 0, 0, 0, 0,0x405F,0x4060,0x4061,0x4062, - 0,0x4063,0x4064,0x4065, 0,0x4066, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4067, - 0, 0, 0, 0, 0,0x4068,0x4069, 0, - 0, 0, 0, 0, 0,0x406A, 0,0x406B, - 0, 0, 0, 0, 0, 0, 0,0x406C, - 0,0x406D, 0, 0, 0, 0, 0, 0, - 0,0x406E,0x406F,0x4070, 0, 0, 0, 0, - 0, 0,0x4071,0x4072, 0,0x4073, 0,0x4074, - 0,0x4075, 0,0x4076, 0,0x4077, 0, 0, -0x4078, 0,0x4079, 0, 0, 0,0x407A, 0, - 0, 0, 0, 0, 0,0x407B, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x407C, -0x407D,0x407E, 0, 0, 0, 0,0x4121, 0, - 0, 0, 0,0x4122,0x4123,0x4124,0x4125, 0, -0x4126, 0,0x4127,0x4128, 0, 0, 0,0x4129, - 0,0x412A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x412B,0x412C, - 0, 0, 0,0x412D,0x412E, 0, 0,0x412F, - 0, 0,0x4130, 0, 0, 0, 0,0x4131, - 0,0x4132, 0, 0, 0,0x4133, 0, 0, - 0,0x4134, 0,0x4135, 0, 0,0x4136, 0, - 0, 0,0x4137,0x4138,0x4139, 0, 0, 0, - 0,0x413A, 0, 0, 0,0x413B,0x413C, 0, -0x413D, 0, 0,0x413E, 0,0x413F, 0, 0, -0x4140,0x4141, 0, 0,0x4142, 0, 0, 0, -0x4143, 0, 0,0x4144, 0, 0, 0, 0, -0x4145, 0, 0,0x4146, 0, 0, 0, 0, - 0, 0, 0, 0,0x4147, 0,0x4148,0x4149, - 0, 0, 0, 0, 0,0x414A, 0, 0, - 0,0x414B, 0,0x414C, 0, 0, 0, 0, - 0, 0,0x414D, 0,0x414E, 0,0x414F, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4150,0x4151, 0, 0, 0, 0, 0, - 0,0x4152, 0, 0, 0,0x4153, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4154, 0, 0,0x4155, - 0, 0, 0,0x4156, 0, 0, 0,0x4157, - 0, 0, 0, 0,0x4158, 0, 0, 0, - 0, 0, 0, 0,0x4159, 0, 0,0x415A, - 0, 0,0x415B, 0, 0, 0, 0,0x415C, - 0, 0,0x415D, 0, 0,0x415E, 0, 0, -0x415F, 0, 0, 0, 0, 0, 0, 0, -0x4160, 0, 0, 0,0x4161,0x4162,0x4163, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4164, 0, 0,0x4165, 0, 0, 0, - 0, 0,0x4166,0x4167, 0, 0, 0, 0, -0x4168, 0,0x4169, 0, 0, 0,0x416A, 0, -0x416B, 0,0x416C, 0, 0, 0, 0, 0, - 0,0x416D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x416E, 0,0x416F, 0,0x4170,0x4171, - 0, 0, 0,0x4172, 0, 0, 0, 0, -0x4173,0x4174,0x4175, 0, 0, 0,0x4176, 0, - 0, 0,0x4177,0x4178, 0, 0, 0,0x4179, - 0, 0, 0,0x417A,0x417B, 0, 0,0x417C, -0x417D, 0, 0, 0, 0, 0, 0,0x417E, -0x4221, 0, 0,0x4222,0x4223,0x4224,0x4225, 0, -0x4226, 0, 0,0x4227,0x4228,0x4229,0x422A, 0, -0x422B, 0,0x422C,0x422D, 0,0x422E, 0, 0, - 0,0x4230, 0,0x422F, 0, 0, 0, 0, - 0, 0,0x4231, 0, 0, 0, 0,0x4232, -0x4233, 0, 0, 0,0x4234, 0,0x4235, 0, -0x4237, 0, 0,0x4236, 0, 0, 0, 0, - 0,0x4238,0x4239,0x423A, 0,0x423B,0x423C, 0, - 0, 0,0x423D,0x423E, 0, 0, 0, 0, - 0, 0, 0, 0,0x4240,0x4241,0x4242, 0, - 0, 0, 0, 0, 0,0x4244, 0,0x4245, - 0,0x4247,0x4248,0x4249, 0,0x424A,0x424C, 0, -0x4243,0x4246,0x424B, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x424D,0x424E,0x424F, - 0, 0,0x4250, 0,0x4251, 0, 0, 0, - 0, 0, 0,0x4252,0x4253,0x4254,0x4255, 0, - 0,0x4256,0x4257, 0, 0, 0,0x4258, 0, - 0, 0, 0, 0, 0, 0, 0,0x4259, - 0, 0, 0,0x425A,0x425B, 0, 0,0x425C, - 0, 0, 0, 0, 0,0x425D, 0, 0, - 0,0x425E,0x425F, 0,0x4260,0x4261, 0, 0, - 0, 0,0x4262, 0, 0, 0,0x4263, 0, -0x4264,0x4265, 0, 0, 0, 0,0x4266, 0, - 0, 0, 0, 0, 0,0x4267, 0, 0, - 0,0x4268, 0, 0, 0, 0, 0, 0, - 0, 0,0x4269, 0, 0,0x426A,0x426B, 0, -0x426C, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x426D,0x423F, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x426E, - 0,0x426F, 0, 0, 0, 0, 0, 0, -0x4270, 0, 0, 0, 0,0x4271, 0, 0, - 0, 0, 0,0x4272, 0, 0,0x4273, 0, - 0, 0,0x4274, 0,0x4275, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4276, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4277, 0, 0, 0, 0, 0, 0,0x4278, - 0,0x4279,0x427A, 0, 0, 0,0x427B, 0, - 0, 0, 0, 0, 0, 0,0x427C,0x427D, - 0, 0, 0, 0, 0, 0, 0,0x427E, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4321, 0, 0, 0, 0, 0,0x4322, 0, -0x4323, 0, 0, 0, 0, 0,0x4324, 0, -0x4325, 0, 0, 0, 0,0x4326, 0, 0, - 0, 0, 0,0x4327, 0, 0,0x4328, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4329,0x432A, 0,0x432B, 0,0x432C, 0, 0, -0x432D, 0,0x432E,0x432F, 0,0x4330}; - -/* page 19 0x67B0-0x67F9 */ -static uint16 tab_uni_jisx021219[]={ -0x4331,0x4332,0x4333, 0, 0,0x4334, 0, 0, - 0, 0, 0,0x4335,0x4336,0x4337, 0, 0, -0x4339, 0,0x433A,0x433B, 0,0x433C, 0, 0, -0x433D,0x433E, 0, 0, 0, 0, 0, 0, - 0, 0,0x433F, 0, 0, 0, 0,0x4340, - 0,0x4341, 0, 0,0x4342, 0, 0, 0, - 0,0x4343, 0, 0, 0, 0,0x4344, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4345, 0,0x4346, 0, 0, 0,0x4347,0x4348, - 0,0x4338}; - -/* page 20 0x6814-0x6917 */ -static uint16 tab_uni_jisx021220[]={ -0x434A, 0, 0, 0, 0,0x434B, 0, 0, - 0,0x434C, 0,0x434D, 0, 0, 0, 0, - 0, 0, 0,0x434F,0x434E, 0, 0, 0, -0x4350,0x4351, 0,0x4352,0x4353,0x4354, 0,0x4355, - 0, 0, 0, 0, 0, 0, 0,0x4356, - 0, 0, 0,0x4357, 0, 0, 0, 0, -0x4358,0x4359, 0, 0, 0, 0,0x435A, 0, -0x435B, 0, 0, 0, 0, 0,0x4349, 0, - 0,0x435C, 0,0x435D,0x435E, 0, 0,0x435F, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4360, - 0, 0,0x4361,0x4362,0x4363,0x4364,0x4365, 0, - 0,0x4366, 0, 0, 0,0x4367,0x4368,0x4369, -0x436A, 0, 0, 0, 0, 0,0x436B, 0, -0x436C, 0,0x436D, 0,0x436E, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x436F, 0,0x4370, 0,0x4371, 0, -0x4372, 0, 0, 0, 0,0x4373, 0,0x4374, - 0,0x4375, 0, 0, 0,0x4376,0x4377, 0, - 0, 0,0x4378, 0, 0, 0,0x4379, 0, - 0, 0, 0, 0, 0, 0, 0,0x437A, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x437B, 0, 0,0x437C, 0, 0, 0, -0x437D, 0, 0,0x437E,0x4421,0x4422, 0,0x4423, - 0, 0,0x4424, 0, 0,0x4425, 0, 0, -0x4426,0x4427, 0, 0, 0, 0, 0, 0, - 0,0x4428, 0, 0,0x4429, 0,0x442A,0x442B, -0x442C,0x442D, 0, 0,0x442E,0x442F, 0, 0, - 0,0x4430,0x4431, 0, 0, 0, 0,0x4432, -0x4433,0x4434, 0, 0, 0, 0, 0, 0, - 0, 0,0x4435, 0, 0,0x4436,0x4437, 0, - 0, 0, 0, 0,0x4438,0x4439, 0,0x443A, - 0, 0,0x443B,0x443C}; - -/* page 21 0x6931-0x6D3F */ -static uint16 tab_uni_jisx021221[]={ -0x443D, 0,0x443E, 0,0x443F, 0, 0,0x4440, - 0, 0,0x4441, 0, 0, 0, 0, 0, - 0,0x4442, 0, 0,0x4443, 0, 0, 0, -0x4444, 0, 0, 0, 0,0x4445, 0, 0, - 0, 0, 0, 0, 0, 0,0x4446, 0, - 0, 0,0x4447, 0, 0, 0, 0, 0, - 0, 0,0x4448,0x4449,0x444A,0x444B, 0,0x444C, -0x444D, 0, 0,0x444E, 0, 0, 0,0x444F, -0x4450,0x4451, 0, 0, 0, 0, 0, 0, - 0,0x4452,0x4453, 0, 0, 0,0x4454,0x4455, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4456, 0, 0, 0, - 0,0x4457, 0, 0, 0,0x4458, 0,0x4459, - 0, 0, 0, 0, 0, 0, 0, 0, -0x445A, 0, 0, 0,0x445B,0x445C, 0,0x445D, - 0, 0,0x445E, 0,0x445F, 0,0x4460, 0, - 0, 0, 0, 0, 0, 0,0x4461,0x4462, - 0,0x4463, 0,0x4464, 0, 0, 0, 0, - 0, 0, 0, 0,0x4465, 0, 0,0x4466, - 0, 0, 0, 0, 0, 0, 0, 0, -0x4467, 0, 0, 0, 0,0x4468,0x4469, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x446A, 0, 0,0x446B, 0, 0, 0, - 0, 0, 0, 0, 0,0x446C,0x446D, 0, -0x446E, 0,0x446F, 0,0x4470, 0, 0, 0, - 0, 0, 0, 0, 0,0x4471, 0,0x4472, -0x4473, 0,0x4474, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4475, 0, -0x4476, 0, 0, 0,0x4477, 0, 0, 0, - 0,0x4478, 0, 0,0x4479, 0, 0,0x447A, - 0, 0, 0,0x447B, 0, 0, 0,0x447C, - 0, 0, 0, 0, 0, 0, 0,0x447D, - 0,0x447E, 0,0x4521, 0, 0,0x4522, 0, - 0, 0,0x4523, 0, 0,0x4524,0x4525, 0, - 0, 0, 0, 0,0x4526,0x4527, 0, 0, -0x4528,0x4529, 0, 0, 0,0x452A, 0,0x452B, -0x452C,0x452D, 0, 0,0x452E,0x452F, 0, 0, - 0, 0,0x4530, 0, 0, 0, 0, 0, - 0, 0, 0,0x4531, 0, 0,0x4532, 0, - 0,0x4533, 0, 0, 0, 0, 0, 0, -0x4534, 0,0x4535, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4536, 0, 0, -0x4537, 0,0x4538, 0, 0,0x4539,0x453A, 0, -0x453B, 0,0x453C, 0, 0, 0, 0, 0, -0x453D, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x453E, 0,0x453F,0x4540,0x4541, 0, - 0, 0, 0, 0,0x4542, 0, 0, 0, - 0, 0,0x4543, 0, 0, 0,0x4544,0x4545, -0x4546, 0, 0,0x4547, 0, 0, 0, 0, - 0, 0, 0, 0,0x4548,0x4549,0x454A, 0, - 0, 0, 0, 0, 0,0x454B, 0,0x454D, -0x454C, 0, 0,0x454E, 0, 0, 0,0x454F, - 0, 0, 0,0x4550,0x4551,0x4552, 0, 0, - 0, 0, 0,0x4553,0x4554, 0, 0, 0, - 0, 0, 0,0x4555, 0, 0,0x4556, 0, - 0, 0, 0,0x4557, 0, 0, 0,0x4558, -0x4559,0x455A, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x455B,0x455C, 0, 0, 0, - 0,0x455D,0x455E, 0, 0,0x455F,0x4560, 0, -0x4561, 0, 0, 0, 0, 0,0x4562,0x4563, -0x4564, 0, 0, 0, 0, 0,0x4565, 0, - 0, 0,0x4566, 0, 0,0x4567, 0, 0, - 0, 0, 0,0x4568, 0, 0, 0,0x4569, - 0, 0,0x456A,0x456B, 0, 0,0x456C, 0, - 0, 0, 0, 0,0x456D,0x456E, 0, 0, - 0, 0,0x456F, 0, 0, 0,0x4570, 0, - 0, 0, 0, 0, 0,0x4571, 0, 0, - 0,0x4572, 0, 0,0x4573, 0, 0, 0, - 0,0x4574, 0, 0, 0,0x4575, 0,0x4576, - 0, 0, 0, 0,0x4577, 0, 0,0x4578, - 0, 0, 0, 0, 0, 0,0x4579, 0, - 0, 0,0x457A, 0, 0,0x457B, 0,0x457C, - 0, 0, 0, 0,0x457D, 0, 0, 0, - 0, 0, 0, 0,0x457E,0x4621, 0, 0, - 0,0x4622, 0, 0,0x4623, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4624, 0, - 0, 0,0x4625, 0, 0, 0,0x4626,0x4627, - 0,0x4628,0x4629, 0, 0, 0, 0,0x462A, -0x462B, 0, 0,0x462C,0x462D,0x462E, 0,0x462F, - 0, 0, 0, 0, 0, 0, 0,0x4630, -0x4631, 0, 0, 0,0x4632,0x4633, 0, 0, - 0, 0,0x4634,0x4635, 0, 0, 0, 0, -0x4636, 0, 0,0x4637, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4638, 0, 0, - 0,0x4639, 0, 0, 0, 0, 0, 0, -0x463A, 0,0x463B, 0, 0,0x463C,0x463D, 0, - 0, 0, 0, 0, 0,0x463E, 0, 0, -0x463F, 0, 0, 0, 0, 0,0x4640, 0, -0x4641, 0, 0, 0, 0, 0,0x4642, 0, - 0,0x4643, 0,0x4644,0x4645, 0, 0, 0, -0x4646, 0, 0, 0,0x4647,0x4648, 0,0x4649, - 0,0x464A, 0, 0, 0, 0, 0, 0, -0x464B, 0, 0, 0, 0, 0,0x464C, 0, - 0, 0, 0, 0, 0,0x464D,0x464E,0x464F, - 0, 0, 0,0x4650, 0,0x4651, 0, 0, - 0, 0,0x4652, 0,0x4653,0x4654, 0, 0, - 0,0x4655,0x4656, 0, 0, 0,0x4657, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4658,0x4659, 0,0x465A, 0,0x465B, 0, - 0,0x465C, 0,0x465D, 0, 0, 0, 0, -0x465E, 0,0x465F,0x4660, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x4736, 0, - 0, 0,0x4661, 0,0x4662, 0,0x4663, 0, - 0, 0, 0,0x4664, 0,0x4665, 0,0x4666, -0x4667, 0,0x4668, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4669,0x466A,0x466B, 0, -0x466C, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x466D,0x466E, 0,0x466F,0x4670, - 0, 0, 0,0x4671, 0, 0,0x4672, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4673, - 0,0x4674, 0,0x4675, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x4676, 0, 0, 0,0x4677, 0, 0, - 0, 0, 0, 0,0x4678, 0,0x4679,0x467A, -0x467B,0x467C, 0,0x467D, 0,0x467E, 0, 0, - 0,0x4721, 0,0x4722, 0, 0, 0,0x4723, - 0, 0, 0, 0, 0, 0,0x4724, 0, -0x4725, 0,0x4726,0x4727, 0,0x4728, 0, 0, - 0,0x4729, 0,0x472A, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x472B, 0, 0,0x472C, 0, - 0,0x472D, 0, 0, 0,0x472E,0x472F, 0, -0x4730, 0,0x4731, 0, 0, 0, 0, 0, - 0,0x4732, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4733,0x4734,0x4735, - 0, 0, 0, 0, 0,0x4737,0x4738, 0, -0x4739, 0, 0, 0, 0, 0, 0, 0, -0x473A, 0, 0,0x473B, 0, 0,0x473C}; - -/* page 22 0x6D57-0x6E04 */ -static uint16 tab_uni_jisx021222[]={ -0x473D, 0, 0, 0, 0, 0, 0,0x473E, -0x473F, 0,0x4740, 0, 0, 0,0x4741, 0, -0x4742, 0, 0, 0, 0, 0, 0, 0, -0x4743,0x4744, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4745, 0, 0, - 0, 0, 0,0x4746, 0, 0, 0, 0, -0x4747, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4748,0x4749, 0,0x474A, 0,0x474B, -0x474C,0x474D, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x474E, 0,0x474F, 0, 0, - 0, 0, 0, 0, 0,0x4750, 0, 0, -0x4751, 0,0x4752, 0, 0, 0,0x4753, 0, -0x4754, 0, 0, 0, 0,0x4755, 0, 0, - 0,0x4756, 0,0x4757, 0, 0, 0,0x4758, -0x4759, 0, 0, 0, 0, 0, 0,0x475A, - 0, 0, 0, 0,0x475B, 0,0x475C, 0, -0x475D,0x475E, 0,0x475F, 0, 0,0x4760, 0, - 0, 0,0x4761, 0, 0, 0, 0, 0, -0x4762,0x4763, 0, 0, 0,0x4764, 0,0x4765, - 0, 0, 0, 0, 0,0x4766, 0, 0, - 0,0x4767, 0, 0, 0,0x4768}; - -/* page 23 0x6E1E-0x6ECF */ -static uint16 tab_uni_jisx021223[]={ -0x4769, 0, 0, 0,0x476A, 0, 0, 0, - 0,0x476B, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x476C, 0, 0, 0, -0x476D, 0, 0,0x476E, 0,0x476F,0x4770, 0, - 0, 0, 0, 0, 0, 0,0x4771,0x4772, - 0, 0,0x4773,0x4774, 0,0x4775, 0, 0, - 0,0x4776, 0,0x4777,0x4778,0x4779,0x477A, 0, - 0,0x477B, 0, 0, 0, 0,0x477C,0x477D, -0x477E, 0, 0, 0,0x4821,0x4822, 0, 0, - 0, 0,0x4823, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4824, 0, 0, - 0, 0, 0, 0, 0,0x4825, 0,0x4826, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4827, - 0, 0, 0, 0, 0,0x4828, 0, 0, - 0, 0, 0,0x4829, 0, 0, 0, 0, - 0, 0,0x482A, 0, 0, 0, 0, 0, - 0,0x482B, 0, 0, 0, 0, 0,0x482C, -0x482D, 0, 0,0x482E, 0,0x482F, 0, 0, - 0, 0, 0, 0, 0,0x4830, 0, 0, - 0,0x4831,0x4832,0x4833, 0,0x4834, 0, 0, - 0,0x4835,0x4836, 0,0x4837, 0, 0,0x4838, -0x4839,0x483A}; - -/* page 24 0x6EEB-0x70E4 */ -static uint16 tab_uni_jisx021224[]={ -0x483B, 0,0x483C,0x483D, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x483E, 0, -0x483F, 0,0x4840, 0, 0, 0, 0, 0, - 0,0x4841, 0, 0, 0,0x4842, 0,0x4843, - 0,0x4844,0x4845, 0, 0, 0, 0, 0, - 0, 0, 0,0x4846, 0,0x4847, 0,0x4848, -0x4849, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x484A, 0, 0,0x484B,0x484C, - 0, 0,0x4853, 0,0x484D,0x484E, 0, 0, -0x484F, 0, 0,0x4850, 0, 0, 0, 0, -0x4851,0x4852, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4854, 0,0x4855,0x4856, -0x4857, 0, 0, 0,0x4858, 0,0x4859,0x485A, - 0, 0,0x485B,0x485C, 0, 0,0x485D,0x485E, - 0, 0, 0, 0, 0,0x485F, 0, 0, - 0,0x4860, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4861,0x4862, 0, 0, 0, 0, -0x4863, 0, 0, 0,0x4864,0x4865, 0, 0, -0x4866,0x4867,0x4868, 0, 0,0x4869, 0,0x486A, -0x486B,0x486C, 0,0x486D, 0, 0, 0,0x486E, - 0, 0, 0, 0,0x486F,0x4870, 0, 0, - 0, 0,0x4871,0x4872,0x4873,0x4874, 0, 0, - 0, 0, 0,0x4875,0x4876,0x4877, 0, 0, - 0, 0,0x4878,0x4879, 0, 0, 0, 0, - 0,0x487A, 0, 0, 0, 0, 0, 0, - 0, 0,0x487B, 0,0x487C,0x487D, 0,0x487E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4921, - 0, 0, 0,0x4922, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x4923,0x4924, 0, - 0, 0, 0, 0, 0,0x4925, 0, 0, - 0, 0,0x4926, 0, 0, 0,0x4927, 0, - 0,0x4928,0x4929, 0, 0,0x492A, 0, 0, - 0, 0,0x492B,0x492C,0x492D, 0, 0, 0, - 0, 0,0x492E, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x492F, 0, 0, 0, - 0, 0, 0, 0, 0,0x4930, 0, 0, -0x4931, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4932, 0, 0, 0, - 0,0x4933, 0, 0,0x4934, 0,0x4935, 0, - 0,0x4936, 0, 0, 0, 0, 0, 0, -0x4937,0x4938, 0, 0, 0,0x4939,0x493A,0x493B, -0x493C, 0, 0,0x4941, 0, 0, 0, 0, - 0,0x493D,0x493E, 0, 0, 0, 0, 0, - 0, 0,0x493F,0x4940, 0, 0, 0, 0, - 0,0x4942,0x4943, 0, 0, 0, 0, 0, - 0,0x4944, 0,0x4945, 0, 0, 0, 0, - 0, 0,0x4946,0x4947, 0, 0, 0, 0, - 0, 0, 0,0x4948, 0, 0,0x4949, 0, - 0, 0,0x494A,0x494B, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x494C,0x494D,0x494E,0x494F,0x4950, 0, 0, -0x4951, 0, 0, 0, 0, 0, 0, 0, - 0,0x4952, 0, 0, 0, 0, 0, 0, -0x4953, 0, 0, 0, 0,0x4954,0x4955, 0, - 0,0x4956, 0, 0,0x4957, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4958, - 0, 0, 0, 0, 0, 0,0x4959, 0, -0x495A,0x495B,0x495C,0x495D, 0,0x495E, 0, 0, - 0,0x495F, 0, 0, 0, 0, 0, 0, - 0,0x4960}; - -/* page 25 0x70FA-0x71DC */ -static uint16 tab_uni_jisx021225[]={ -0x4961, 0, 0, 0, 0, 0, 0, 0, - 0,0x4962,0x4963,0x4964,0x4965,0x4966, 0, 0, - 0,0x4967,0x4968, 0, 0,0x4969, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x496A, 0,0x496B, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x496C, 0,0x496D, 0,0x496E,0x496F,0x4970, - 0, 0, 0, 0, 0, 0,0x4971, 0, - 0, 0, 0, 0, 0, 0, 0,0x4972, - 0, 0, 0,0x4973,0x4974,0x4975, 0, 0, -0x4976,0x4977, 0, 0, 0, 0,0x4978, 0, -0x4979, 0, 0, 0, 0,0x497A, 0, 0, -0x497B, 0,0x497C, 0,0x497D, 0,0x497E, 0, - 0, 0, 0, 0, 0, 0,0x4A21, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x4A22, - 0, 0, 0, 0, 0, 0,0x4A23, 0, - 0, 0, 0,0x4A24,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0x4F61, 0,0x4F62, 0, - 0, 0,0x4F63, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x4F64, 0,0x4F65, 0, -0x4F66,0x4F67, 0,0x4F68,0x4F69, 0, 0, 0, -0x4F6A, 0,0x4F6B, 0, 0, 0,0x4F6C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4F6D, 0, 0, 0,0x4F6E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x4F6F, 0, 0, 0, 0,0x4F70, - 0, 0, 0, 0,0x4F71, 0, 0, 0, -0x4F72, 0, 0, 0, 0,0x4F74,0x4F75,0x4F76, - 0,0x4F73, 0, 0,0x4F77, 0, 0, 0, -0x4F78, 0, 0, 0,0x4F79,0x4F7A, 0, 0, -0x4F7B,0x4F7C,0x4F7D,0x4F7E, 0, 0, 0, 0, - 0, 0, 0,0x5021, 0,0x5022, 0,0x5023, - 0, 0, 0, 0, 0, 0, 0,0x5024, -0x5025,0x5026, 0, 0,0x5027, 0,0x5028, 0, - 0, 0,0x5029,0x502A, 0,0x502B,0x502C, 0, - 0, 0, 0,0x502E, 0, 0, 0,0x502F, -0x5030,0x5031, 0, 0,0x502D, 0,0x5032, 0, - 0, 0,0x5033, 0, 0, 0, 0, 0, - 0, 0,0x5034,0x5035, 0, 0,0x5037,0x5038, - 0, 0,0x5039,0x503A, 0, 0, 0,0x503B, -0x5036, 0, 0, 0, 0, 0,0x503C, 0, - 0, 0, 0, 0,0x503D, 0, 0, 0, -0x503E, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x503F, 0,0x5040, 0,0x5041,0x5042, -0x5043, 0, 0, 0, 0,0x5044, 0,0x5045, - 0,0x5046, 0, 0, 0,0x5047, 0, 0, - 0,0x5048, 0, 0,0x5049,0x504A, 0, 0, - 0, 0, 0,0x504B, 0,0x504C, 0,0x504D, - 0, 0, 0, 0,0x504E,0x504F,0x5050, 0, - 0, 0,0x5051,0x5052, 0, 0, 0,0x5053, - 0,0x5054, 0, 0,0x5055, 0, 0, 0, -0x5056, 0, 0,0x5057,0x5058, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5059, - 0,0x505A, 0,0x505B, 0, 0, 0, 0, - 0, 0,0x505C, 0, 0, 0, 0, 0, - 0,0x505D, 0,0x505E,0x505F, 0,0x5060, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5061,0x5062, 0, 0, 0, - 0,0x5063, 0,0x5064,0x5065,0x5066,0x5067, 0, -0x5068, 0, 0,0x5069,0x506A, 0, 0, 0, - 0,0x506B, 0, 0, 0, 0, 0, 0, -0x506C,0x506D, 0,0x506E, 0, 0, 0,0x506F, - 0,0x5070, 0, 0,0x5071, 0, 0, 0, -0x5072, 0, 0,0x5073, 0, 0, 0, 0, - 0, 0,0x5074, 0,0x5075, 0, 0,0x5076, -0x5077, 0,0x5078, 0, 0, 0, 0,0x5079, - 0, 0, 0, 0,0x507A, 0,0x507B, 0, - 0, 0,0x507C, 0, 0,0x507D,0x507E, 0, -0x5121, 0,0x5122, 0, 0,0x5123, 0, 0, - 0, 0,0x5124,0x5125, 0,0x5126, 0, 0, - 0,0x5127, 0, 0, 0, 0, 0, 0, -0x5128, 0, 0, 0,0x5129, 0, 0, 0, - 0, 0,0x512A,0x512B, 0, 0, 0,0x512C, - 0,0x512D,0x512E, 0,0x512F, 0, 0, 0, - 0,0x5130, 0, 0, 0,0x5131, 0, 0, - 0, 0, 0,0x5132, 0, 0,0x5133, 0, - 0,0x5134, 0, 0, 0, 0, 0,0x5135, - 0, 0, 0,0x5136, 0,0x5137, 0,0x5138, -0x5139, 0, 0, 0,0x513A,0x513B, 0, 0, -0x513C,0x513D,0x513E, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x513F,0x5140, 0,0x5141, -0x5142, 0, 0, 0,0x5143, 0, 0, 0, - 0, 0, 0, 0, 0,0x5144,0x5145, 0, - 0,0x5146, 0, 0,0x5147,0x5148, 0,0x5149, -0x514A, 0, 0, 0, 0,0x514B, 0,0x514C, - 0, 0,0x514D, 0, 0,0x514E, 0, 0, - 0, 0, 0, 0, 0,0x514F, 0, 0, -0x5150, 0, 0, 0, 0, 0,0x5151, 0, -0x5152, 0,0x5153, 0, 0,0x5154,0x5155, 0, - 0, 0,0x5156,0x5157, 0, 0, 0, 0, -0x5158,0x5159, 0, 0,0x515A, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x515B, 0, -0x515C, 0, 0,0x515D, 0, 0, 0, 0, - 0, 0, 0, 0,0x515E, 0, 0, 0, - 0, 0, 0,0x515F, 0,0x5160, 0, 0, - 0,0x5161, 0,0x5162,0x5163, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5164, 0, - 0,0x5165, 0, 0,0x5166, 0,0x5167, 0, - 0,0x5168, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5169, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x516A,0x516B, 0,0x516C,0x516D, 0, 0, 0, - 0,0x516E, 0, 0,0x516F, 0, 0, 0, - 0, 0, 0,0x5170, 0,0x5171,0x5172, 0, - 0, 0, 0, 0, 0, 0, 0,0x5173, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5174, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5175, - 0, 0, 0,0x5176, 0, 0, 0,0x5177, - 0,0x5178,0x5179,0x517A, 0,0x517B,0x517C,0x517D, -0x517E,0x5221, 0, 0,0x5222, 0, 0, 0, - 0, 0, 0, 0, 0,0x5223, 0,0x5224, -0x5225,0x5226, 0, 0, 0, 0, 0,0x5227, - 0, 0, 0, 0, 0, 0,0x5228, 0, - 0, 0, 0, 0, 0,0x5229, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x522A, 0, 0, 0,0x522B, 0,0x522C, 0, - 0,0x522D,0x522E, 0, 0,0x522F, 0,0x5230, - 0, 0,0x5231,0x5232, 0, 0, 0,0x5233, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5234, 0, 0, 0, - 0,0x5235, 0, 0, 0, 0,0x5236, 0, -0x5237,0x5238, 0, 0, 0, 0,0x5239, 0, - 0, 0, 0,0x523A, 0, 0,0x523B, 0, -0x523C, 0, 0, 0, 0,0x523D, 0, 0, - 0, 0, 0, 0,0x523E, 0, 0,0x523F, -0x5240, 0,0x5241, 0, 0,0x5242,0x5243, 0, - 0, 0,0x5244,0x5245,0x5246,0x5247, 0, 0, - 0, 0,0x5248, 0, 0,0x5249, 0, 0, -0x524A, 0,0x524B, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x524C, 0,0x524D,0x524E, - 0,0x524F,0x5250,0x5251, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5252, 0,0x5253, 0, 0, 0, 0, 0, - 0, 0,0x5254, 0,0x5255,0x5256, 0, 0, -0x5257,0x5258,0x5259, 0,0x525A, 0,0x525B, 0, - 0,0x525C,0x525D,0x525E,0x525F, 0,0x5260, 0, - 0,0x5261, 0,0x5262,0x5263, 0,0x5264,0x5265, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5266, 0,0x5267, 0, 0, 0, 0, -0x5268, 0, 0, 0, 0,0x5269,0x526A, 0, -0x526B, 0, 0, 0,0x526C, 0, 0, 0, - 0,0x526D, 0,0x526E,0x526F, 0,0x5270, 0, - 0,0x5271,0x5272, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5273, 0, - 0, 0,0x5274, 0, 0, 0, 0, 0, - 0,0x5276,0x5277,0x5278, 0,0x5275, 0, 0, - 0,0x5279,0x527A,0x527B,0x527C,0x527D,0x527E, 0, - 0,0x5321, 0,0x5322, 0, 0, 0,0x5323, - 0,0x5324, 0, 0, 0,0x5325,0x5326, 0, -0x5327, 0,0x5328, 0, 0, 0, 0, 0, - 0,0x5329, 0, 0,0x532A,0x532B, 0, 0, - 0, 0, 0, 0, 0, 0,0x532C,0x532D, - 0, 0, 0, 0, 0, 0, 0,0x532E, - 0, 0, 0, 0,0x532F, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5330, 0, -0x5331, 0, 0, 0, 0, 0,0x5332, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5333, 0, 0, 0, 0, 0,0x5334,0x5335, - 0, 0,0x5336,0x5337,0x5338, 0, 0,0x5339, - 0, 0, 0, 0,0x533A, 0, 0,0x533B, -0x533C,0x533D, 0, 0, 0,0x533E, 0,0x533F, - 0, 0, 0,0x5340,0x5341,0x5342, 0,0x5343, - 0,0x5344,0x5345, 0, 0,0x5346, 0, 0, - 0, 0, 0, 0, 0, 0,0x5347, 0, - 0,0x5348, 0,0x5349, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x534A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x534B, 0, 0, 0,0x534C, -0x534D,0x534E, 0, 0, 0, 0, 0,0x534F, - 0,0x5350,0x5351,0x5352, 0, 0,0x5353, 0, - 0, 0, 0, 0, 0,0x5354,0x5355, 0, - 0, 0, 0,0x5356, 0, 0,0x5357, 0, - 0, 0,0x5358, 0, 0,0x5359, 0, 0, - 0,0x535A, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x535B,0x535C,0x535D, 0, -0x535E,0x535F, 0, 0, 0, 0, 0,0x5360, -0x5361, 0, 0, 0, 0,0x5362, 0, 0, - 0,0x5363, 0,0x5364, 0, 0, 0,0x5365, - 0,0x5366,0x5367, 0,0x5368,0x5369, 0, 0, - 0, 0, 0, 0, 0,0x536A, 0,0x536B, - 0, 0,0x536C, 0, 0, 0, 0, 0, -0x536D, 0, 0, 0, 0, 0, 0, 0, -0x536E, 0,0x536F,0x5370, 0, 0, 0,0x5371, - 0,0x5372,0x5373,0x5374, 0,0x5375,0x5376, 0, -0x5377, 0, 0,0x5378,0x5379,0x537A, 0, 0, - 0,0x537B, 0, 0, 0, 0,0x537C,0x537D, - 0, 0, 0, 0, 0,0x537E,0x5421, 0, - 0, 0, 0, 0, 0, 0,0x5422,0x5423, - 0, 0,0x5424, 0, 0, 0, 0, 0, - 0, 0, 0,0x5425, 0, 0,0x5426,0x5427, - 0,0x5428, 0, 0, 0, 0, 0, 0, - 0, 0,0x5429,0x542A,0x542B,0x542C,0x542D, 0, - 0, 0, 0, 0,0x542E,0x542F,0x5430, 0, - 0, 0, 0, 0, 0, 0, 0,0x5431, - 0,0x5432, 0, 0, 0, 0, 0, 0, - 0, 0,0x5434, 0, 0,0x5435,0x5436, 0, - 0, 0,0x5437,0x5438, 0,0x5439, 0, 0, - 0,0x543A, 0, 0, 0,0x543B,0x543C, 0, - 0,0x543D,0x543E, 0, 0, 0, 0, 0, -0x5433, 0, 0, 0, 0, 0, 0, 0, -0x543F, 0, 0, 0, 0, 0, 0, 0, -0x5440,0x5441, 0, 0, 0,0x5442, 0,0x5443, - 0, 0, 0, 0,0x5444,0x5445, 0, 0, -0x5446, 0, 0, 0, 0, 0, 0,0x5447, -0x5448, 0, 0, 0,0x5449,0x544A, 0,0x544B, - 0, 0, 0,0x544C, 0, 0,0x544D, 0, - 0, 0, 0, 0, 0, 0, 0,0x544E, - 0, 0, 0, 0,0x544F,0x5450, 0,0x5451, - 0, 0, 0, 0, 0, 0,0x5452, 0, -0x5453, 0,0x5454, 0, 0, 0, 0, 0, -0x5455, 0, 0, 0, 0, 0, 0,0x5456, - 0,0x5457,0x5458, 0, 0,0x5459, 0, 0, - 0, 0, 0,0x545A, 0, 0,0x545B,0x545C, - 0, 0, 0,0x545D, 0, 0, 0, 0, -0x545E, 0, 0, 0, 0, 0,0x545F, 0, - 0,0x5460, 0, 0, 0, 0,0x5461,0x5462, - 0, 0,0x5463, 0, 0,0x5464, 0, 0, - 0,0x5465, 0, 0, 0,0x5466, 0, 0, -0x5467, 0,0x5468, 0, 0,0x5469,0x546A}; - -/* page 27 0x7F3B-0x8044 */ -static uint16 tab_uni_jisx021227[]={ -0x546C,0x546B,0x546D,0x546E,0x546F, 0, 0, 0, -0x5470,0x5471, 0, 0,0x5472, 0, 0, 0, - 0, 0, 0, 0,0x5473, 0, 0,0x5474, -0x5475, 0, 0, 0, 0, 0, 0, 0, -0x5476,0x5477,0x5478, 0, 0, 0,0x5479, 0, -0x547A,0x547B,0x547C,0x547D, 0, 0, 0, 0, - 0, 0,0x547E, 0, 0, 0,0x5521, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5522,0x5523,0x5524,0x5525, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5526, 0,0x5527, 0,0x5528,0x5529,0x552A, 0, - 0, 0, 0,0x552B,0x552C, 0, 0, 0, - 0,0x552D, 0, 0, 0, 0,0x552E,0x552F, - 0, 0, 0,0x5530, 0, 0, 0,0x5531, - 0, 0,0x5532, 0, 0, 0, 0, 0, - 0,0x5533, 0, 0, 0, 0, 0, 0, - 0,0x5534, 0, 0,0x5535,0x5536, 0, 0, -0x5537, 0, 0, 0, 0,0x5538, 0, 0, - 0, 0, 0,0x5539,0x553A, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x553B, 0, 0, 0,0x553C, 0, 0, 0, -0x553D, 0,0x553E, 0, 0,0x553F, 0, 0, - 0,0x5540, 0,0x5541,0x5542, 0, 0,0x5543, - 0, 0, 0, 0, 0, 0, 0,0x5544, - 0, 0,0x5545,0x5546,0x5547, 0, 0, 0, - 0, 0, 0, 0,0x5548,0x5549, 0,0x554A, - 0, 0,0x554B,0x554C,0x554D, 0,0x554E, 0, -0x554F,0x5550, 0,0x5551, 0, 0, 0, 0, - 0, 0,0x5552,0x5553,0x5554,0x5555, 0, 0, - 0,0x5556, 0,0x5557, 0, 0, 0, 0, - 0,0x5558, 0,0x5559, 0,0x555A, 0, 0, - 0,0x555B,0x555C, 0,0x555D, 0,0x555E,0x555F, - 0,0x5560, 0,0x5561, 0,0x5562, 0, 0, - 0,0x5563}; - -/* page 28 0x8060-0x8357 */ -static uint16 tab_uni_jisx021228[]={ -0x5564, 0, 0, 0,0x5565, 0,0x5566, 0, - 0, 0, 0, 0, 0,0x5567, 0, 0, - 0,0x5568, 0, 0, 0,0x5569, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x556A, 0, 0, 0, 0, 0, 0, -0x556B, 0, 0, 0, 0, 0,0x556C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x556D, 0,0x556E, 0, - 0, 0, 0, 0, 0, 0,0x556F,0x5570, - 0, 0, 0,0x5571, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5572,0x5573, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5574, 0, 0, 0, 0,0x5575, 0,0x5576, - 0, 0,0x5577, 0,0x5578,0x5579, 0,0x557A, -0x557B, 0, 0, 0, 0, 0, 0, 0, -0x557C, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x557D,0x557E, 0, -0x5621, 0,0x5622,0x5623, 0, 0,0x5624, 0, - 0,0x5625,0x5626, 0, 0, 0,0x5627, 0, - 0, 0, 0,0x5628, 0, 0, 0, 0, - 0, 0, 0,0x5629, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x562A,0x562B, -0x562C, 0, 0, 0,0x562D, 0,0x562E, 0, -0x562F, 0, 0, 0,0x5630, 0, 0,0x5631, - 0, 0, 0, 0,0x5632, 0, 0, 0, -0x5633, 0, 0, 0, 0,0x5634, 0, 0, - 0, 0,0x5635, 0,0x5636, 0, 0, 0, - 0, 0, 0, 0, 0,0x5637, 0,0x5638, - 0, 0,0x5639, 0,0x563A, 0, 0, 0, - 0, 0,0x563B, 0, 0, 0, 0,0x563C, - 0, 0, 0, 0, 0, 0, 0, 0, -0x563D,0x563E, 0, 0, 0, 0, 0,0x563F, -0x5640,0x5641, 0, 0, 0,0x5642, 0,0x5643, - 0, 0, 0, 0, 0, 0, 0,0x5644, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5645, 0, 0,0x5647,0x5648,0x5649, 0, - 0, 0, 0,0x564A, 0, 0,0x564B, 0, -0x5646, 0, 0, 0, 0, 0,0x564C, 0, -0x564D, 0, 0,0x564E, 0, 0,0x564F, 0, - 0, 0,0x5650, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5651, 0, - 0, 0,0x5652, 0,0x5653, 0, 0, 0, - 0, 0, 0,0x5654, 0, 0, 0, 0, - 0, 0, 0,0x5656, 0,0x5657, 0, 0, - 0, 0,0x5658,0x5655, 0, 0,0x5659,0x565A, - 0, 0, 0, 0, 0,0x565B, 0,0x565C, - 0, 0, 0,0x565D, 0,0x565E,0x565F, 0, - 0,0x5660, 0, 0,0x5661, 0, 0, 0, - 0, 0, 0,0x5662,0x5663, 0, 0, 0, -0x5664,0x5665,0x5666, 0, 0,0x5667,0x5668, 0, -0x5669,0x566A, 0, 0, 0,0x566B, 0,0x566C, -0x566D, 0, 0,0x566E, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x566F, - 0, 0, 0,0x5670,0x5671, 0, 0, 0, - 0,0x5672,0x5673, 0, 0,0x5674, 0, 0, - 0,0x5675,0x5676, 0, 0, 0, 0, 0, -0x5677, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5678, 0,0x5679, 0, 0, 0, - 0, 0,0x567A, 0, 0, 0, 0, 0, - 0, 0, 0,0x567B,0x567C,0x567D,0x567E, 0, - 0, 0, 0,0x5721, 0, 0,0x5722,0x5723, - 0,0x5724, 0, 0, 0, 0,0x5725, 0, - 0, 0, 0, 0,0x5726, 0, 0, 0, -0x5727, 0, 0,0x5728, 0, 0, 0,0x5729, - 0, 0, 0, 0, 0,0x572A, 0, 0, - 0, 0, 0, 0,0x572B, 0, 0, 0, - 0, 0, 0,0x572C, 0,0x572D, 0,0x572E, -0x572F,0x5730, 0,0x5731,0x5732, 0, 0,0x5733, - 0,0x5734,0x5735, 0, 0, 0,0x5736, 0, - 0,0x5737, 0, 0,0x5738, 0,0x5739, 0, -0x573A, 0,0x573B,0x573C, 0, 0, 0, 0, -0x573D,0x573E, 0,0x573F,0x5740, 0, 0,0x5741, -0x5742,0x5743,0x5744, 0, 0, 0,0x5745, 0, -0x5746, 0,0x5747, 0,0x5748, 0, 0,0x5749, - 0, 0,0x574A, 0,0x574B, 0,0x574C,0x574D, - 0, 0, 0, 0, 0, 0,0x574E, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x574F, 0, 0, 0, 0,0x5750, 0, 0, - 0, 0,0x5751, 0, 0, 0, 0, 0, -0x5752, 0,0x5753, 0,0x5754, 0, 0, 0, -0x5755, 0,0x5756, 0, 0,0x5757, 0,0x5758, - 0, 0, 0, 0, 0, 0,0x5759,0x575A, - 0, 0, 0, 0, 0,0x575B,0x575C, 0, -0x575D,0x575E, 0, 0, 0, 0, 0,0x575F, -0x5760, 0,0x5761,0x5762, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5764, 0,0x5765,0x5766,0x5767, - 0,0x5768,0x5769, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x576A,0x576B,0x576C, 0, -0x576D, 0, 0,0x576E, 0, 0, 0,0x576F, - 0, 0,0x5770, 0,0x5771,0x5772, 0, 0, - 0, 0,0x5773,0x5774,0x5775, 0, 0,0x5776, - 0, 0, 0, 0, 0,0x5777,0x5778, 0, - 0,0x5779, 0,0x583E,0x5763,0x577A,0x577B,0x577C -}; - -/* page 29 0x8370-0x8419 */ -static uint16 tab_uni_jisx021229[]={ -0x577D, 0, 0, 0, 0, 0, 0, 0, -0x577E, 0, 0, 0, 0,0x5821, 0,0x5822, -0x5823, 0,0x5824, 0,0x5825, 0,0x5826, 0, - 0, 0, 0, 0, 0,0x5827, 0, 0, - 0, 0,0x5828, 0,0x5829,0x582A, 0, 0, -0x582B,0x582C, 0,0x582D,0x582E,0x582F, 0, 0, - 0, 0, 0, 0, 0, 0,0x5830,0x5831, - 0,0x5832, 0, 0,0x5833,0x584C, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5834,0x5835, -0x5836, 0, 0, 0, 0, 0, 0,0x5837, - 0,0x5838, 0, 0, 0, 0, 0,0x5839, -0x583A,0x583B, 0, 0,0x583C, 0, 0, 0, - 0, 0, 0, 0, 0,0x583D, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x583F, 0,0x5840, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x5841, 0, -0x5842,0x5843, 0, 0,0x5844, 0, 0, 0, - 0,0x5845, 0, 0, 0, 0,0x5846, 0, - 0, 0,0x5847, 0, 0, 0, 0,0x5848, - 0,0x5849, 0, 0, 0,0x584A, 0, 0, - 0,0x584B}; - -/* page 30 0x842F-0x8880 */ -static uint16 tab_uni_jisx021230[]={ -0x584D, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x584E, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x584F, 0, -0x5850,0x5851, 0,0x5852, 0, 0,0x5853, 0, -0x5854, 0,0x5855,0x5856, 0, 0, 0,0x5857, - 0,0x5858,0x5859,0x585A, 0,0x585B, 0, 0, - 0,0x585C, 0, 0, 0,0x585D,0x585E, 0, -0x585F, 0, 0,0x5860, 0, 0, 0, 0, - 0,0x5861, 0, 0,0x5862,0x5863, 0,0x5864, - 0,0x5865, 0, 0, 0,0x5866,0x5867, 0, - 0, 0,0x5868, 0, 0, 0,0x5869, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x586A,0x586B, 0,0x586C, 0, - 0, 0, 0, 0, 0, 0, 0,0x586D, - 0, 0, 0, 0, 0, 0, 0,0x586E, - 0,0x586F,0x5870,0x5871, 0, 0, 0, 0, -0x5872, 0,0x5873, 0, 0,0x5874, 0, 0, - 0, 0, 0,0x5875, 0, 0,0x5876,0x5877, - 0,0x5878, 0,0x5879, 0, 0, 0, 0, -0x587A,0x587B, 0, 0, 0,0x587C, 0, 0, -0x587D, 0, 0, 0,0x587E, 0, 0, 0, - 0, 0, 0, 0, 0,0x5921, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5922, 0, 0,0x5923, 0, 0, 0, 0, -0x5924,0x5925,0x5926,0x5927, 0, 0, 0, 0, -0x5928, 0, 0,0x592A,0x592B, 0,0x592C, 0, - 0, 0, 0,0x592D,0x592E, 0, 0, 0, -0x592F, 0, 0, 0, 0,0x5930, 0,0x5931, - 0,0x5932, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x5933, 0,0x5934, - 0, 0, 0,0x5935,0x5936,0x5937,0x5938, 0, -0x5939, 0, 0,0x593A,0x593B, 0, 0, 0, -0x593C, 0, 0,0x5929,0x593D,0x593E, 0,0x593F, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5940, 0, 0, 0, 0, 0, 0,0x5941, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5942,0x5943,0x5944,0x5945,0x5946, 0, 0,0x5947, - 0, 0,0x5948, 0, 0,0x5949,0x594A,0x594B, -0x594C,0x594D,0x594E,0x594F, 0,0x5950, 0, 0, - 0, 0, 0, 0,0x5951, 0, 0, 0, -0x5952, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5953,0x5954,0x5955, 0,0x5956, 0, -0x5957, 0,0x5958, 0, 0, 0,0x5959,0x595A, - 0, 0,0x595B, 0,0x595C,0x595D, 0, 0, -0x595E, 0, 0, 0,0x595F, 0, 0, 0, - 0,0x5960, 0, 0, 0, 0,0x5961, 0, -0x5962,0x5963, 0,0x5964, 0, 0,0x5965, 0, -0x5966, 0, 0, 0, 0, 0,0x5974, 0, - 0, 0, 0, 0, 0,0x5967, 0,0x5968, -0x5969,0x596A, 0, 0, 0,0x596B,0x596C,0x596D, -0x596E, 0, 0,0x596F, 0, 0, 0, 0, -0x5970, 0, 0,0x5971,0x5972, 0, 0,0x5973, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x5975, 0,0x5976, 0, 0, 0, 0, -0x5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, 0, 0,0x5B56, - 0, 0, 0, 0, 0, 0,0x5B57,0x5B58, - 0, 0,0x5B59,0x5B5A, 0,0x5B5B, 0, 0, -0x5B5C, 0, 0,0x5B5D,0x5B5E,0x5B5F, 0, 0, - 0, 0, 0,0x5B60,0x5B61, 0,0x5B62, 0, - 0, 0,0x5B63, 0,0x5B64, 0, 0, 0, - 0,0x5B65, 0,0x5B66, 0, 0, 0, 0, -0x5B67, 0,0x5B68, 0,0x5B69, 0, 0,0x5B6A, - 0, 0,0x5B6B,0x5B6C,0x5B6D, 0, 0, 0, - 0,0x5B6E, 0,0x5B70,0x5B71,0x5B72, 0, 0, - 0,0x5B73,0x5B6F,0x5B74,0x5B75,0x5B76, 0,0x5B77, -0x5B78, 0, 0, 0, 0, 0, 0, 0, - 0,0x5B79, 0, 0, 0, 0,0x5B7A,0x5B7B, - 0,0x5B7C, 0,0x5B7D, 0, 0,0x5B7E, 0, - 0, 0, 0,0x5C21, 0,0x5C22, 0, 0, - 0, 0,0x5C23, 0,0x5C24, 0,0x5C25, 0, - 0,0x5C26,0x5C27,0x5C28,0x5C29, 0, 0,0x5C2A, - 0, 0,0x5C2B, 0, 0, 0,0x5C2C,0x5C2D, - 0,0x5C2E, 0,0x5C2F, 0,0x5C30, 0, 0, -0x5C31,0x5C32, 0, 0, 0,0x5C33, 0, 0, - 0, 0,0x5C34, 0, 0, 0, 0, 0, - 0, 0,0x5C35, 0, 0, 0, 0, 0, - 0, 0,0x5C36, 0,0x5C37, 0, 0, 0, - 0,0x5C38}; - -/* page 31 0x8898-0x89BC */ -static uint16 tab_uni_jisx021231[]={ -0x5C39, 0,0x5C3A,0x5C3B,0x5C3C, 0, 0,0x5C3D, -0x5C3E, 0, 0, 0, 0, 0, 0, 0, -0x5C3F, 0,0x5C40, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5C41, 0, 0,0x5C42,0x5C43, 0, -0x5C44, 0, 0, 0, 0, 0, 0, 0, - 0, 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0,0x5E66, 0,0x5E67, - 0,0x5E68, 0,0x5E69, 0, 0, 0,0x5E6A, - 0,0x5E6B, 0,0x5E6C,0x5E6D, 0, 0,0x5E6E, -0x5E6F,0x5E72, 0,0x5E70, 0,0x5E71, 0, 0, - 0, 0, 0,0x5E73,0x5E74, 0,0x5E75, 0, -0x5E76,0x5E77, 0, 0, 0,0x5E78, 0, 0, - 0, 0, 0,0x5E79, 0,0x5E7A,0x5E7B, 0, - 0, 0, 0,0x5E7C, 0, 0,0x5E7D, 0, - 0, 0, 0, 0, 0, 0,0x5E7E,0x5F21, - 0, 0, 0,0x5F22, 0, 0, 0, 0, -0x5F23, 0,0x5F24,0x5F25, 0, 0, 0, 0, - 0,0x5F26, 0,0x5F27,0x5F28, 0, 0, 0, - 0, 0, 0, 0,0x5F29}; - -/* page 34 0x8CB9-0x8D1B */ -static uint16 tab_uni_jisx021234[]={ -0x5F2A,0x5F2B, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x5F2C,0x5F2D, 0, 0, -0x5F2E, 0,0x5F2F, 0, 0, 0,0x5F30, 0, - 0, 0, 0, 0,0x5F32,0x5F31, 0, 0, -0x5F33, 0, 0, 0,0x5F34, 0, 0, 0, -0x5F35, 0, 0, 0, 0, 0, 0,0x5F36, - 0, 0, 0,0x5F37, 0, 0,0x5F38,0x5F39, - 0,0x5F3A, 0, 0,0x5F3B, 0,0x5F3C,0x5F3D, - 0, 0, 0, 0, 0,0x5F3E,0x5F3F, 0, -0x5F40, 0,0x5F41, 0, 0, 0, 0, 0, -0x5F42, 0, 0, 0, 0, 0, 0, 0, - 0,0x5F43, 0, 0, 0, 0,0x5F44, 0, - 0, 0,0x5F45}; - -/* page 35 0x8D65-0x8F65 */ -static uint16 tab_uni_jisx021235[]={ -0x5F46, 0, 0, 0,0x5F47, 0, 0,0x5F48, - 0,0x5F49, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x5F4A, 0, 0,0x5F4B, 0,0x5F4C, - 0, 0, 0,0x5F4D, 0, 0, 0, 0, -0x5F4E, 0, 0,0x5F4F,0x5F50, 0, 0, 0, -0x5F51, 0, 0, 0, 0, 0, 0, 0, - 0,0x5F52,0x5F53,0x5F54, 0, 0, 0, 0, - 0,0x5F55, 0, 0, 0, 0,0x5F56,0x5F57, - 0, 0,0x5F58, 0, 0,0x5F59, 0, 0, -0x5F5A, 0,0x5F5B, 0,0x5F5C, 0,0x5F5D,0x5F6F, - 0, 0, 0,0x5F5E, 0, 0, 0, 0, -0x5F5F,0x5F60,0x5F61,0x5F62, 0,0x5F63, 0, 0, - 0,0x5F64, 0, 0,0x5F65, 0, 0,0x5F66, -0x5F67, 0,0x5F68, 0,0x5F69, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x5F6A, -0x5F6B, 0,0x5F6C, 0, 0, 0, 0,0x5F6D, - 0, 0, 0,0x5F6E,0x5F70,0x5F71, 0,0x5F72, - 0, 0, 0, 0, 0, 0, 0, 0, -0x5F73, 0, 0, 0,0x5F74, 0, 0,0x5F75, -0x5F76,0x5F77, 0, 0, 0, 0,0x5F78, 0, - 0, 0, 0, 0,0x5F79, 0, 0,0x5F7A, - 0,0x5F7B, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x5F7C,0x5F7D,0x5F7E,0x6021, 0, - 0,0x6022,0x6023, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6024, 0,0x6025, 0, - 0,0x6026,0x6027,0x6028,0x6029, 0, 0, 0, -0x602A, 0, 0,0x602B,0x602C, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x602D, 0, -0x602E,0x602F,0x6030, 0, 0, 0, 0,0x6031, - 0, 0, 0, 0, 0, 0,0x6032,0x6033, -0x6034,0x6035, 0, 0,0x6036,0x6037, 0, 0, - 0, 0, 0, 0,0x6038, 0, 0,0x6039, -0x603A, 0,0x603B,0x603C,0x603D, 0, 0, 0, - 0, 0, 0, 0,0x603E,0x603F,0x6040, 0, - 0, 0, 0, 0, 0,0x6041,0x6042, 0, - 0, 0, 0, 0,0x6043, 0, 0, 0, - 0, 0, 0,0x6044, 0,0x6045, 0, 0, -0x6046, 0, 0, 0, 0,0x6047,0x6048, 0, -0x6049,0x604A, 0, 0, 0,0x604B, 0, 0, - 0, 0,0x604C, 0,0x604D, 0, 0, 0, -0x604E,0x604F, 0, 0, 0, 0,0x6050, 0, -0x6051, 0, 0, 0, 0,0x6052,0x6053, 0, - 0, 0, 0,0x6054,0x6055, 0,0x6056,0x6057, - 0, 0,0x6058, 0, 0, 0, 0, 0, - 0, 0,0x6059, 0,0x605A, 0, 0,0x605B, - 0, 0, 0, 0, 0, 0, 0,0x605C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x605D, 0, 0, 0, 0, -0x6064,0x605E, 0,0x605F,0x6060, 0, 0, 0, - 0, 0,0x6061, 0,0x6062,0x6063, 0, 0, - 0, 0, 0,0x6065, 0,0x6066, 0, 0, - 0, 0,0x6067,0x6068, 0, 0, 0, 0, - 0, 0,0x6069,0x606A, 0, 0, 0, 0, - 0,0x606B,0x606C,0x606D, 0, 0, 0, 0, - 0,0x606E, 0,0x606F,0x6070, 0,0x6071, 0, -0x6072, 0,0x6073,0x6074, 0, 0, 0,0x6075, -0x6076,0x6077, 0, 0, 0, 0, 0,0x6078, -0x6079,0x607A,0x607B, 0, 0,0x607C, 0, 0, - 0, 0, 0,0x607D,0x607E, 0,0x6121, 0, - 0, 0,0x6122, 0, 0, 0, 0, 0, - 0, 0,0x6123, 0,0x6124,0x6125,0x6126,0x6127, -0x6128, 0, 0,0x6129, 0, 0, 0, 0, -0x612A,0x612B, 0, 0, 0, 0, 0, 0, -0x612C}; - -/* page 36 0x8F9D-0x9484 */ -static uint16 tab_uni_jisx021236[]={ -0x612D, 0, 0,0x612E,0x612F, 0, 0,0x6130, -0x6131,0x6132, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6133,0x6134, 0,0x6135, 0, 0, 0, 0, - 0,0x6136, 0,0x6137,0x6138, 0, 0, 0, - 0,0x6139, 0, 0, 0,0x613A,0x613B, 0, -0x613C, 0, 0,0x613D, 0,0x613E,0x613F, 0, -0x6140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6141, 0, 0,0x6142,0x6143, - 0, 0, 0,0x6144, 0, 0, 0, 0, - 0,0x6145, 0, 0,0x6146, 0, 0, 0, -0x6147,0x6148, 0, 0, 0, 0,0x6149, 0, - 0,0x614A, 0, 0, 0,0x614B, 0,0x614C, - 0, 0, 0,0x614D, 0, 0, 0,0x614E, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x614F, 0, 0,0x6150, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6151,0x6152,0x6154, 0,0x6155, -0x6156, 0,0x6153, 0, 0, 0,0x6157,0x6158, - 0, 0,0x6159, 0, 0, 0, 0, 0, - 0, 0,0x615A, 0, 0, 0,0x615B,0x615C, - 0, 0, 0, 0, 0, 0, 0,0x615D, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x615E, 0, -0x615F, 0, 0, 0, 0,0x6160, 0, 0, - 0,0x6161,0x6162, 0, 0, 0, 0,0x6163, - 0, 0, 0,0x6164, 0, 0, 0,0x6165, - 0, 0, 0, 0,0x6166, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6167, 0, 0,0x6168, 0, 0,0x6169,0x616A, - 0,0x616B, 0,0x616C, 0, 0, 0, 0, -0x616D, 0,0x616E,0x616F,0x6170, 0,0x6171, 0, - 0, 0, 0,0x6172,0x6173,0x6174, 0, 0, -0x6175, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6176, 0,0x6177,0x6178,0x6179, - 0,0x617A, 0, 0, 0, 0, 0, 0, -0x617B,0x617D, 0, 0, 0, 0,0x617E,0x6221, -0x6222, 0,0x6223,0x6224, 0, 0, 0,0x617C, - 0, 0, 0, 0, 0,0x622D, 0, 0, -0x6225, 0,0x6226,0x6227,0x6228, 0, 0,0x6229, -0x622A, 0,0x622B, 0, 0, 0, 0, 0, -0x622C, 0, 0, 0, 0, 0,0x622F, 0, - 0, 0,0x6230,0x6231, 0, 0, 0,0x6232, - 0,0x622E, 0, 0, 0, 0, 0, 0, - 0,0x6233,0x6234,0x6235, 0, 0, 0,0x6236, -0x6237,0x6238, 0,0x6239, 0, 0, 0, 0, -0x623A, 0, 0,0x623B, 0, 0, 0,0x623C, - 0,0x623D,0x623E,0x623F, 0,0x6240, 0,0x6241, - 0,0x6242, 0,0x6243, 0,0x6245,0x6246, 0, -0x6244, 0,0x6247, 0,0x6248, 0, 0, 0, - 0,0x6249,0x624A, 0,0x624B, 0, 0,0x624C, - 0,0x624D,0x624E, 0,0x624F,0x6250, 0,0x6251, -0x6252, 0, 0, 0, 0, 0,0x6253, 0, - 0, 0,0x6254,0x6255, 0, 0, 0, 0, - 0, 0,0x6256, 0, 0, 0,0x6257, 0, - 0, 0,0x6258, 0,0x6259,0x625A,0x625B, 0, - 0, 0, 0, 0,0x625C, 0, 0,0x625D, - 0, 0,0x625E, 0, 0, 0, 0, 0, -0x625F, 0, 0, 0, 0, 0, 0,0x6260, - 0, 0, 0, 0,0x6261,0x6262,0x6263, 0, - 0, 0, 0, 0,0x6264, 0,0x6265, 0, -0x6266,0x6267, 0, 0, 0,0x6268, 0, 0, - 0,0x6269, 0, 0,0x626A, 0,0x626B,0x626C, -0x626D, 0, 0,0x626E, 0, 0, 0, 0, - 0,0x626F, 0, 0,0x6270, 0, 0, 0, - 0,0x6271, 0,0x6272, 0, 0, 0,0x6273, -0x6274,0x6275, 0,0x6276,0x6277,0x6278,0x6279, 0, - 0,0x627A, 0, 0, 0, 0,0x627B,0x627C, -0x627D, 0,0x627E, 0, 0,0x6321,0x6322, 0, -0x6323, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6324,0x6325, - 0, 0,0x6326, 0,0x6327,0x6328, 0, 0, - 0,0x6329, 0, 0, 0, 0, 0,0x632A, -0x632B, 0, 0, 0,0x632C,0x632D, 0,0x632E, -0x632F,0x6330,0x6331,0x6332,0x6333, 0, 0, 0, - 0, 0,0x6334, 0,0x6335, 0,0x6336, 0, -0x6337, 0, 0,0x6338,0x6339, 0, 0,0x633A, -0x633B,0x633C,0x633D, 0,0x633E,0x633F, 0,0x6340, - 0, 0, 0,0x6341, 0,0x6342,0x6343, 0, - 0,0x6344, 0,0x6345, 0, 0, 0,0x6346, -0x6347, 0, 0, 0, 0, 0,0x6348,0x6349, -0x634A,0x634B, 0,0x634C, 0, 0, 0, 0, - 0,0x634D,0x634E,0x634F, 0, 0,0x6350, 0, -0x6351,0x6352, 0,0x6353,0x6354,0x6355, 0,0x6356, - 0,0x6357, 0,0x6358, 0,0x6359,0x635A, 0, - 0,0x635B,0x635C, 0, 0,0x635D, 0, 0, -0x635E,0x635F,0x6360, 0,0x6361, 0, 0, 0, - 0, 0, 0,0x6362,0x6363, 0, 0,0x6364, -0x6365, 0, 0,0x6366,0x6367, 0, 0, 0, -0x6368, 0,0x6369,0x636A,0x636B, 0, 0, 0, - 0,0x636C,0x636D,0x636E, 0, 0, 0, 0, -0x636F,0x6370,0x6371,0x6372,0x6373, 0,0x6374,0x6375, -0x6376, 0,0x6377, 0, 0, 0, 0, 0, - 0, 0, 0,0x6378,0x6379,0x637A, 0, 0, -0x637B,0x637C, 0, 0, 0,0x637D, 0, 0, - 0, 0,0x637E, 0,0x6421, 0, 0, 0, - 0, 0,0x6422,0x6423, 0, 0, 0,0x6424, -0x6425, 0,0x6426,0x6427, 0, 0,0x6428, 0, - 0, 0,0x6429, 0, 0,0x642A, 0, 0, - 0,0x642B, 0,0x642C, 0,0x642D,0x642E,0x642F, -0x6430, 0,0x6431,0x6432,0x6433,0x6434,0x6435, 0, -0x6436,0x6437,0x6438,0x6439, 0, 0,0x643A,0x643B, -0x643C,0x643D, 0,0x643E, 0, 0,0x643F, 0, -0x6440, 0,0x6441,0x6442,0x6443, 0, 0,0x6444, -0x6445, 0,0x6446,0x6447,0x6448, 0,0x6449, 0, -0x644A, 0,0x644B,0x644C, 0, 0, 0,0x644D, - 0,0x644E, 0,0x644F, 0, 0, 0, 0, - 0, 0, 0, 0,0x6450, 0,0x6451, 0, - 0, 0,0x6452,0x6453, 0,0x6454, 0, 0, - 0, 0, 0,0x6455, 0, 0, 0, 0, -0x6456, 0, 0, 0,0x6457, 0, 0,0x6458, -0x6459, 0, 0, 0, 0, 0, 0,0x645A, -0x645B,0x645C,0x645D, 0,0x645E, 0, 0,0x645F, -0x6460, 0,0x6461, 0,0x6462,0x6463, 0, 0, - 0, 0, 0, 0, 0, 0,0x6464,0x6465, - 0,0x6466,0x6467, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6468,0x6469,0x646A, 0, 0, 0, - 0, 0, 0,0x646B,0x646C,0x646D, 0, 0, -0x646E, 0,0x646F,0x6470, 0,0x6471, 0, 0, - 0,0x6472, 0, 0, 0, 0, 0,0x6473, -0x6474, 0,0x6475, 0,0x6476,0x6477, 0, 0, -0x6478, 0,0x6479,0x647A,0x647B, 0,0x647C,0x647D, - 0,0x647E, 0, 0, 0,0x6521, 0, 0, -0x6522, 0,0x6523,0x6524,0x6525,0x6526, 0, 0, - 0, 0, 0,0x6527, 0,0x6528,0x6529, 0, -0x652A, 0,0x652B, 0, 0,0x652C, 0, 0, -0x652D, 0, 0,0x652E, 0, 0,0x652F, 0, - 0,0x6530, 0, 0,0x6531, 0,0x6532,0x6533, - 0,0x6534, 0,0x6535,0x653B, 0,0x6536, 0, - 0, 0, 0, 0, 0, 0, 0,0x6537, -0x6538,0x6539, 0, 0, 0,0x653A, 0, 0, - 0, 0, 0, 0,0x653C, 0, 0,0x653D, -0x653E,0x653F,0x6540, 0,0x6541,0x6542,0x6543,0x6544, -0x6545, 0, 0, 0, 0, 0,0x6546, 0, - 0, 0, 0, 0,0x6547, 0, 0,0x6548, - 0,0x6549,0x654A, 0, 0,0x654B, 0, 0, - 0,0x654C,0x654D, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x654F,0x6550,0x654E,0x6551,0x6552, 0, -0x6553, 0, 0, 0,0x6554,0x6555, 0,0x6556, - 0, 0, 0,0x6557,0x6558, 0, 0, 0, -0x6559,0x655A,0x655B, 0, 0, 0, 0, 0, -0x655C,0x655D,0x655E, 0, 0, 0, 0, 0, - 0, 0,0x655F, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6560,0x6561, 0,0x6562,0x6563,0x6564,0x6565, - 0, 0, 0, 0, 0, 0,0x6566, 0, -0x6568, 0,0x6567, 0, 0, 0,0x6569, 0, -0x656A, 0, 0,0x656B, 0,0x656C, 0,0x656D, - 0, 0, 0, 0, 0, 0, 0, 0, -0x656E, 0, 0, 0,0x656F, 0, 0,0x6570, - 0, 0,0x6571, 0,0x6572, 0,0x6573, 0, - 0, 0, 0,0x6574, 0, 0,0x6575, 0, -0x6576,0x6577,0x6578, 0,0x6579,0x657A, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x657C,0x657B -}; - -/* page 37 0x9578-0x95E6 */ -static uint16 tab_uni_jisx021237[]={ -0x657D,0x657E, 0, 0, 0, 0,0x6621, 0, - 0, 0, 0, 0,0x6622, 0, 0, 0, -0x6623, 0, 0, 0,0x6624,0x6625,0x6626, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6627,0x6628,0x6629, - 0,0x662A, 0, 0, 0, 0,0x662B, 0, - 0,0x662C, 0,0x662D,0x662E, 0, 0, 0, - 0, 0, 0, 0,0x662F, 0,0x6630, 0, - 0, 0,0x6631, 0, 0,0x6632, 0,0x6633, - 0, 0, 0, 0, 0, 0,0x6634, 0, -0x6635,0x6636, 0,0x6637, 0, 0, 0, 0, -0x6638,0x6639,0x663A,0x663B, 0, 0, 0, 0, - 0,0x663C,0x663D, 0, 0,0x663E,0x663F,0x6640, -0x6641, 0, 0, 0,0x6642, 0,0x6643}; - -/* page 38 0x961D-0x986C */ -static uint16 tab_uni_jisx021238[]={ -0x6644,0x6645, 0, 0, 0,0x6646, 0,0x6647, -0x6648,0x6649, 0, 0, 0, 0, 0,0x664A, - 0, 0, 0, 0,0x664B, 0,0x664C, 0, - 0, 0,0x664D,0x664E,0x664F,0x6650, 0,0x6651, -0x6652, 0, 0, 0,0x6653, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6654, 0,0x6655, - 0,0x6656,0x6657,0x6658, 0, 0, 0, 0, - 0, 0, 0, 0,0x6659, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x665A, 0, 0, 0, 0, 0,0x665B, - 0, 0, 0, 0, 0, 0,0x665C,0x665D, - 0,0x665E,0x665F, 0,0x6660,0x6661,0x6662,0x6663, - 0, 0, 0, 0,0x6664, 0, 0, 0, - 0, 0, 0, 0,0x6665, 0, 0, 0, - 0,0x6666, 0, 0, 0,0x6667, 0, 0, -0x6668, 0,0x6669, 0, 0, 0, 0,0x666A, -0x666B,0x666C, 0, 0,0x666D, 0, 0, 0, - 0,0x666E,0x666F, 0, 0, 0,0x6670, 0, - 0, 0, 0, 0, 0,0x6671, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6672, 0, 0, - 0, 0, 0, 0, 0,0x6673, 0, 0, - 0, 0, 0,0x6675, 0,0x6676, 0, 0, -0x6677,0x6678,0x6679, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x667A, 0, 0, 0, - 0, 0,0x667B, 0,0x667C, 0, 0, 0, - 0, 0, 0, 0, 0,0x667D, 0, 0, - 0, 0, 0, 0, 0,0x667E,0x6721, 0, -0x6722, 0, 0, 0,0x6723, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6724,0x6725, 0, -0x6726, 0, 0, 0,0x6727,0x6728,0x6729, 0, - 0, 0, 0,0x672A, 0, 0, 0, 0, - 0, 0, 0, 0,0x672B, 0,0x672C, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x672D, 0,0x672E, 0, - 0, 0, 0, 0, 0,0x672F, 0, 0, - 0,0x6730,0x6731, 0, 0, 0, 0, 0, -0x6732, 0,0x6733,0x6734, 0,0x6735,0x6736, 0, - 0, 0, 0, 0, 0, 0,0x6737, 0, - 0, 0,0x6738, 0, 0,0x6739, 0, 0, - 0,0x673A, 0, 0, 0, 0,0x673B, 0, - 0,0x673C,0x673D,0x673E, 0, 0,0x673F, 0, -0x6740, 0,0x6741,0x6742, 0, 0, 0, 0, - 0, 0, 0, 0,0x6743, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6744,0x6745,0x6746, 0,0x6747,0x6748, 0, 0, - 0,0x6749,0x674A, 0, 0,0x674B, 0, 0, - 0, 0, 0, 0, 0, 0, 0,0x674C, - 0,0x674D, 0, 0,0x674E,0x674F, 0, 0, -0x6750,0x6751, 0,0x6752,0x6753,0x6754, 0,0x6755, - 0,0x6756,0x6757, 0,0x6758, 0, 0,0x6759, -0x675A, 0,0x675B, 0,0x675C,0x675D, 0,0x675E, -0x675F,0x6760, 0,0x6761,0x6762, 0, 0,0x6763, - 0, 0,0x6764,0x6765,0x6766, 0,0x676A, 0, -0x6767,0x6768, 0,0x6769,0x676B, 0, 0,0x676C, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x676D, 0,0x676E, 0, 0,0x676F, - 0, 0,0x6770,0x6771, 0,0x6772, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,0x6773, 0, 0,0x6774, 0, 0, -0x6776,0x6777, 0, 0, 0, 0, 0,0x6778, - 0,0x6779, 0, 0,0x6775, 0, 0,0x677A, - 0,0x677B, 0,0x677C, 0, 0,0x677D, 0, -0x6828,0x677E, 0, 0, 0, 0,0x6821, 0, - 0,0x6822,0x6823,0x6824, 0,0x6825,0x6826, 0, -0x6827, 0, 0, 0, 0, 0, 0, 0, - 0,0x6829, 0, 0, 0, 0, 0,0x682A, - 0, 0,0x682B, 0, 0,0x682C, 0, 0, - 0, 0, 0, 0,0x682D,0x682E,0x682F, 0, - 0,0x6830,0x6831, 0,0x6832,0x6833, 0, 0, - 0, 0, 0, 0, 0,0x6834,0x6835, 0, -0x6836,0x6837, 0, 0, 0,0x6838, 0,0x6839 -}; - -/* page 39 0x98AB-0x98CC */ -static uint16 tab_uni_jisx021239[]={ -0x683A, 0,0x683B,0x683C, 0,0x683D, 0, 0, - 0,0x683E, 0, 0,0x683F,0x6840, 0,0x6841, -0x6842, 0, 0, 0,0x6843, 0, 0,0x6844, - 0, 0,0x6845, 0, 0,0x6846, 0, 0, - 0,0x6847}; - -/* page 40 0x98E1-0x9960 */ -static uint16 tab_uni_jisx021240[]={ -0x6848, 0,0x6849, 0,0x684A,0x684B,0x684C, 0, - 0,0x684D, 0, 0, 0, 0, 0, 0, - 0, 0,0x684E, 0, 0,0x684F, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6850, 0, 0, 0, 0,0x6851,0x6852, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6853, 0, 0, 0,0x6854,0x6855,0x6856, 0, - 0,0x6857,0x6858,0x6859, 0, 0,0x685A, 0, - 0,0x685B, 0, 0, 0,0x685C,0x685D, 0, - 0, 0,0x685E, 0, 0, 0, 0, 0, -0x685F,0x6860,0x6861,0x6862,0x6863, 0, 0, 0, -0x6864,0x6865,0x6866,0x6867, 0, 0, 0,0x6868, -0x6869, 0, 0, 0, 0,0x686A,0x686B,0x686C, - 0, 0, 0, 0,0x686D,0x686E, 0, 0, - 0, 0, 0,0x686F, 0, 0, 0,0x6870, -0x6871, 0,0x6872,0x6873, 0,0x6874,0x6875,0x6876 -}; - -/* page 41 0x999B-0x9A5D */ -static uint16 tab_uni_jisx021241[]={ -0x6877, 0,0x6878, 0,0x6879, 0, 0, 0, - 0, 0, 0,0x687A, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x687B,0x687C,0x687D, - 0, 0,0x687E, 0, 0, 0,0x6921,0x6922, - 0, 0,0x6923, 0,0x6924, 0, 0, 0, -0x6925, 0, 0, 0, 0, 0,0x6926, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x6927,0x6928, 0, 0, 0, 0,0x6929,0x692A, - 0,0x692B, 0,0x692C, 0, 0, 0, 0, - 0, 0, 0, 0,0x692D, 0, 0,0x692E, -0x692F,0x6930, 0, 0, 0,0x6931, 0, 0, - 0,0x6932,0x6933, 0, 0, 0,0x6934, 0, - 0, 0,0x6935,0x6936, 0, 0, 0,0x6937, -0x6938,0x6939, 0, 0, 0, 0, 0, 0, -0x693A,0x693B, 0, 0, 0,0x693C,0x693D, 0, - 0, 0, 0,0x693E, 0, 0, 0, 0, - 0, 0, 0,0x693F, 0,0x6940, 0,0x6941, -0x6942,0x6943, 0, 0,0x6944, 0, 0, 0, - 0, 0,0x6945,0x6946, 0, 0, 0, 0, -0x6947, 0,0x6948,0x6949, 0,0x694A, 0, 0, - 0, 0, 0, 0, 0, 0,0x694C, 0, - 0,0x694D, 0, 0,0x694B, 0, 0,0x694E, -0x694F,0x6950, 0,0x6951, 0, 0,0x6952, 0, - 0,0x6953, 0,0x6954, 0, 0, 0, 0, - 0, 0,0x6955}; - -/* page 42 0x9AAA-0x9C7B */ -static uint16 tab_uni_jisx021242[]={ -0x6956, 0,0x6957, 0,0x6958,0x6959, 0, 0, -0x695A, 0,0x695B,0x695C,0x695D, 0, 0,0x695E, - 0,0x695F, 0, 0,0x6960,0x6961, 0,0x6962, - 0,0x6963, 0, 0,0x6964, 0,0x6965, 0, - 0, 0, 0, 0,0x6966, 0,0x6967, 0, -0x6968, 0, 0,0x6969,0x696A,0x696B, 0, 0, - 0,0x696C,0x696D, 0, 0, 0,0x696E, 0, - 0, 0,0x696F,0x6970, 0,0x6971, 0,0x6972, - 0, 0,0x6973, 0, 0, 0, 0, 0, -0x6974,0x6975, 0,0x6976, 0, 0, 0,0x6977, -0x6978, 0, 0,0x6979, 0,0x697A,0x697B,0x697C, -0x697D,0x697E,0x6A21,0x6A22, 0, 0,0x6A23,0x6A24, - 0,0x6A25,0x6A26,0x6A27,0x6A28, 0,0x6A29, 0, -0x6A2A, 0, 0, 0,0x6A2B, 0, 0,0x6A2C, - 0,0x6A2D,0x6A2E, 0, 0, 0,0x6A2F, 0, - 0, 0, 0, 0,0x6A30, 0, 0, 0, - 0,0x6A31, 0,0x6A32, 0, 0, 0, 0, - 0,0x6A33,0x6A34,0x6A35, 0,0x6A36, 0,0x6A37, -0x6A38, 0, 0,0x6A39, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6A3A, 0, - 0,0x6A3B,0x6A3C, 0, 0, 0, 0, 0, - 0, 0, 0,0x6A3D,0x6A3E,0x6A3F, 0, 0, - 0,0x6A40, 0, 0,0x6A41, 0, 0,0x6A42, - 0,0x6A43, 0,0x6A44,0x6A45, 0,0x6A46, 0, -0x6A47,0x6A48,0x6A49,0x6A4A,0x6A4B, 0, 0, 0, - 0,0x6A4C, 0,0x6A4D, 0,0x6A4E,0x6A4F,0x6A50, - 0, 0, 0, 0, 0,0x6A51,0x6A52, 0, - 0, 0,0x6A53,0x6A54,0x6A55,0x6A56, 0,0x6A57, -0x6A58,0x6A59, 0,0x6A5A, 0,0x6A5B,0x6A5C, 0, - 0, 0,0x6A5D, 0, 0, 0, 0, 0, -0x6A5E, 0, 0,0x6A5F,0x6A60, 0, 0, 0, - 0, 0, 0, 0,0x6A61,0x6A62, 0,0x6A63, - 0, 0,0x6A64, 0, 0, 0,0x6A65,0x6A66, -0x6A67, 0, 0, 0, 0,0x6A68,0x6A69, 0, - 0,0x6A6A,0x6A6B, 0,0x6A6C,0x6A6D, 0,0x6A6E, - 0, 0, 0, 0, 0,0x6A6F,0x6A70, 0, - 0, 0, 0, 0,0x6A71, 0,0x6A72, 0, - 0, 0, 0, 0, 0,0x6A73,0x6A74, 0, - 0, 0, 0,0x6A75, 0,0x6A76, 0, 0, - 0, 0, 0,0x6A77, 0,0x6A78, 0, 0, -0x6A79,0x6A7A, 0, 0, 0,0x6A7B, 0, 0, - 0,0x6A7C, 0, 0, 0,0x6A7D,0x6A7E,0x6B21, -0x6B22, 0, 0,0x6B23, 0,0x6B24,0x6B25, 0, -0x6B26, 0, 0, 0, 0, 0, 0, 0, - 0,0x6B27, 0, 0, 0,0x6B28, 0,0x6B29, - 0, 0, 0, 0,0x6B2A, 0,0x6B2B,0x6B2C, -0x6B2D, 0,0x6B2E, 0,0x6B2F, 0, 0, 0, -0x6B30,0x6B31, 0, 0,0x6B32,0x6B33,0x6B34,0x6B35, -0x6B36, 0, 0, 0, 0, 0, 0,0x6B37, - 0, 0, 0,0x6B38,0x6B39,0x6B3A, 0, 0, - 0, 0, 0,0x6B3B, 0, 0, 0,0x6B3C, - 0,0x6B3D,0x6B3E,0x6B3F, 0, 0, 0,0x6B40, -0x6B41, 0, 0, 0,0x6B42,0x6B43,0x6B44, 0, - 0,0x6B45,0x6B46, 0,0x6B47, 0,0x6B48, 0, - 0,0x6B49,0x6B50,0x6B4A,0x6B4B,0x6B4C, 0, 0, - 0,0x6B4D, 0, 0, 0, 0,0x6B52,0x6B4E, -0x6B4F,0x6B51, 0, 0,0x6B53, 0,0x6B54, 0, -0x6B55, 0, 0,0x6B56, 0,0x6B57, 0, 0, - 0,0x6B58}; - -/* page 43 0x9CE6-0x9E1D */ -static uint16 tab_uni_jisx021243[]={ -0x6B59, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6B5A, 0, 0, 0, - 0,0x6B5B, 0,0x6B5C, 0, 0, 0, 0, - 0, 0, 0, 0,0x6B5E, 0, 0, 0, - 0, 0, 0, 0, 0,0x6B5D, 0, 0, - 0, 0, 0,0x6B5F, 0, 0, 0, 0, - 0,0x6B60,0x6B61, 0, 0,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0,0x6C51,0x6C52,0x6C53, 0, 0,0x6C54, -0x6C55, 0, 0,0x6C56, 0, 0,0x6C57,0x6C58 -}; - -/* page 44 0x9E7A-0x9FA5 */ -static uint16 tab_uni_jisx021244[]={ -0x6C59,0x6C5A,0x6C5B, 0, 0, 0,0x6C5C, 0, -0x6C5D,0x6C5E,0x6C5F,0x6C60, 0,0x6C61, 0, 0, - 0, 0, 0, 0,0x6C62,0x6C63, 0, 0, - 0, 0, 0, 0,0x6C64, 0,0x6C65, 0, - 0,0x6C66, 0, 0,0x6C67, 0, 0, 0, - 0, 0,0x6C68, 0, 0, 0,0x6C69, 0, - 0, 0,0x6C6A, 0,0x6C6B,0x6C6C,0x6C6D, 0, - 0,0x6C6E,0x6C6F,0x6C70, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,0x6C71, 0,0x6C72, 0, - 0,0x6C73, 0, 0, 0, 0, 0, 0, - 0, 0, 0,0x6C74, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6C75, 0, 0, - 0, 0,0x6C76, 0, 0,0x6C77, 0, 0, - 0, 0,0x6C78,0x6C79,0x6C7A, 0,0x6C7B,0x6C7C, -0x6C7D, 0, 0,0x6C7E, 0, 0,0x6D21, 0, - 0, 0, 0, 0, 0,0x6D22, 0, 0, -0x6D23,0x6D24, 0, 0, 0, 0, 0,0x6D25, - 0, 0, 0, 0, 0,0x6D26,0x6D27,0x6D28, -0x6D29, 0,0x6D2A, 0,0x6D2B,0x6D2C, 0,0x6D2D, -0x6D2E,0x6D2F, 0, 0, 0,0x6D30, 0, 0, -0x6D31, 0, 0, 0,0x6D32, 0, 0, 0, -0x6D33,0x6D34, 0, 0, 0,0x6D35, 0,0x6D36, -0x6D37, 0,0x6D38, 0, 0,0x6D39, 0,0x6D3A, -0x6D3B, 0,0x6D3C,0x6D3D, 0,0x6D3E, 0,0x6D3F, - 0,0x6D40,0x6D41,0x6D42,0x6D43,0x6D44, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0,0x6D45, 0,0x6D46,0x6D47,0x6D48,0x6D49, 0, -0x6D4A, 0, 0,0x6D4B,0x6D4C, 0, 0, 0, - 0, 0, 0, 0, 0, 0,0x6D4D,0x6D4E, - 0, 0, 0,0x6D4F,0x6D50,0x6D51,0x6D52,0x6D53, - 0,0x6D54, 0,0x6D55, 0, 0, 0, 0, -0x6D56, 0, 0,0x6D57, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,0x6D58,0x6D59,0x6D5A, -0x6D5B, 0,0x6D5C, 0,0x6D5D,0x6D5E, 0, 0, - 0, 0, 0, 0,0x6D5F, 0, 0,0x6D60, -0x6D61,0x6D62, 0,0x6D63}; - -static int -my_uni_jisx0212_onechar(int code){ - if ((code>=0x007E)&&(code<=0x007E)) - return(tab_uni_jisx02120[code-0x007E]); - if ((code>=0x00A1)&&(code<=0x017E)) - return(tab_uni_jisx02121[code-0x00A1]); - if ((code>=0x01CD)&&(code<=0x01DC)) - return(tab_uni_jisx02122[code-0x01CD]); - if ((code>=0x01F5)&&(code<=0x01F5)) - return(tab_uni_jisx02123[code-0x01F5]); - if ((code>=0x02C7)&&(code<=0x02DD)) - return(tab_uni_jisx02124[code-0x02C7]); - if ((code>=0x0384)&&(code<=0x0390)) - return(tab_uni_jisx02125[code-0x0384]); - if ((code>=0x03AA)&&(code<=0x03CE)) - return(tab_uni_jisx02126[code-0x03AA]); - if ((code>=0x0402)&&(code<=0x040F)) - return(tab_uni_jisx02127[code-0x0402]); - if ((code>=0x0452)&&(code<=0x045F)) - return(tab_uni_jisx02128[code-0x0452]); - if ((code>=0x2116)&&(code<=0x2122)) - return(tab_uni_jisx02129[code-0x2116]); - if ((code>=0x4E02)&&(code<=0x4F19)) - return(tab_uni_jisx021210[code-0x4E02]); - if ((code>=0x4F2E)&&(code<=0x5166)) - return(tab_uni_jisx021211[code-0x4F2E]); - if ((code>=0x517E)&&(code<=0x5515)) - return(tab_uni_jisx021212[code-0x517E]); - if ((code>=0x552A)&&(code<=0x5566)) - return(tab_uni_jisx021213[code-0x552A]); - if ((code>=0x557F)&&(code<=0x5C36)) - return(tab_uni_jisx021214[code-0x557F]); - if ((code>=0x5C59)&&(code<=0x5EEB)) - return(tab_uni_jisx021215[code-0x5C59]); - if ((code>=0x5F02)&&(code<=0x6149)) - return(tab_uni_jisx021216[code-0x5F02]); - if ((code>=0x615E)&&(code<=0x6290)) - return(tab_uni_jisx021217[code-0x615E]); - if ((code>=0x62A6)&&(code<=0x679B)) - return(tab_uni_jisx021218[code-0x62A6]); - if ((code>=0x67B0)&&(code<=0x67F9)) - return(tab_uni_jisx021219[code-0x67B0]); - if ((code>=0x6814)&&(code<=0x6917)) - return(tab_uni_jisx021220[code-0x6814]); - if ((code>=0x6931)&&(code<=0x6D3F)) - return(tab_uni_jisx021221[code-0x6931]); - if ((code>=0x6D57)&&(code<=0x6E04)) - return(tab_uni_jisx021222[code-0x6D57]); - if ((code>=0x6E1E)&&(code<=0x6ECF)) - return(tab_uni_jisx021223[code-0x6E1E]); - if ((code>=0x6EEB)&&(code<=0x70E4)) - return(tab_uni_jisx021224[code-0x6EEB]); - if ((code>=0x70FA)&&(code<=0x71DC)) - return(tab_uni_jisx021225[code-0x70FA]); - if ((code>=0x71F8)&&(code<=0x7E9E)) - return(tab_uni_jisx021226[code-0x71F8]); - if ((code>=0x7F3B)&&(code<=0x8044)) - return(tab_uni_jisx021227[code-0x7F3B]); - if ((code>=0x8060)&&(code<=0x8357)) - return(tab_uni_jisx021228[code-0x8060]); - if ((code>=0x8370)&&(code<=0x8419)) - return(tab_uni_jisx021229[code-0x8370]); - if ((code>=0x842F)&&(code<=0x8880)) - return(tab_uni_jisx021230[code-0x842F]); - if ((code>=0x8898)&&(code<=0x89BC)) - return(tab_uni_jisx021231[code-0x8898]); - if ((code>=0x89D4)&&(code<=0x8B9F)) - return(tab_uni_jisx021232[code-0x89D4]); - if ((code>=0x8C38)&&(code<=0x8CA4)) - return(tab_uni_jisx021233[code-0x8C38]); - if ((code>=0x8CB9)&&(code<=0x8D1B)) - return(tab_uni_jisx021234[code-0x8CB9]); - if ((code>=0x8D65)&&(code<=0x8F65)) - return(tab_uni_jisx021235[code-0x8D65]); - if ((code>=0x8F9D)&&(code<=0x9484)) - return(tab_uni_jisx021236[code-0x8F9D]); - if ((code>=0x9578)&&(code<=0x95E6)) - return(tab_uni_jisx021237[code-0x9578]); - if ((code>=0x961D)&&(code<=0x986C)) - return(tab_uni_jisx021238[code-0x961D]); - if ((code>=0x98AB)&&(code<=0x98CC)) - return(tab_uni_jisx021239[code-0x98AB]); - if ((code>=0x98E1)&&(code<=0x9960)) - return(tab_uni_jisx021240[code-0x98E1]); - if ((code>=0x999B)&&(code<=0x9A5D)) - return(tab_uni_jisx021241[code-0x999B]); - if ((code>=0x9AAA)&&(code<=0x9C7B)) - return(tab_uni_jisx021242[code-0x9AAA]); - if ((code>=0x9CE6)&&(code<=0x9E1D)) - return(tab_uni_jisx021243[code-0x9CE6]); - if ((code>=0x9E7A)&&(code<=0x9FA5)) - return(tab_uni_jisx021244[code-0x9E7A]); - return(0); -} - - -/* page 0 0x222F-0x2244 */ -static uint16 tab_jisx0212_uni0[]={ -0x02D8,0x02C7,0x00B8,0x02D9,0x02DD,0x00AF,0x02DB,0x02DA, -0x007E,0x0384,0x0385, 0, 0, 0, 0, 0, - 0, 0, 0,0x00A1,0x00A6,0x00BF}; - -/* page 1 0x226B-0x2271 */ -static uint16 tab_jisx0212_uni1[]={ -0x00BA,0x00AA,0x00A9,0x00AE,0x2122,0x00A4,0x2116}; - -/* page 2 0x2661-0x267C */ -static uint16 tab_jisx0212_uni2[]={ -0x0386,0x0388,0x0389,0x038A,0x03AA, 0,0x038C, 0, -0x038E,0x03AB, 0,0x038F, 0, 0, 0, 0, -0x03AC,0x03AD,0x03AE,0x03AF,0x03CA,0x0390,0x03CC,0x03C2, -0x03CD,0x03CB,0x03B0,0x03CE}; - -/* page 3 0x2742-0x274E */ -static uint16 tab_jisx0212_uni3[]={ -0x0402,0x0403,0x0404,0x0405,0x0406,0x0407,0x0408,0x0409, -0x040A,0x040B,0x040C,0x040E,0x040F}; - -/* page 4 0x2772-0x277E */ -static uint16 tab_jisx0212_uni4[]={ -0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459, -0x045A,0x045B,0x045C,0x045E,0x045F}; - -/* page 5 0x2921-0x2950 */ -static uint16 tab_jisx0212_uni5[]={ -0x00C6,0x0110, 0,0x0126, 0,0x0132, 0,0x0141, -0x013F, 0,0x014A,0x00D8,0x0152, 0,0x0166,0x00DE, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -0x00E6,0x0111,0x00F0,0x0127,0x0131,0x0133,0x0138,0x0142, -0x0140,0x0149,0x014B,0x00F8,0x0153,0x00DF,0x0167,0x00FE -}; - -/* page 6 0x2A21-0x2A77 */ -static uint16 tab_jisx0212_uni6[]={ -0x00C1,0x00C0,0x00C4,0x00C2,0x0102,0x01CD,0x0100,0x0104, -0x00C5,0x00C3,0x0106,0x0108,0x010C,0x00C7,0x010A,0x010E, -0x00C9,0x00C8,0x00CB,0x00CA,0x011A,0x0116,0x0112,0x0118, - 0,0x011C,0x011E,0x0122,0x0120,0x0124,0x00CD,0x00CC, -0x00CF,0x00CE,0x01CF,0x0130,0x012A,0x012E,0x0128,0x0134, -0x0136,0x0139,0x013D,0x013B,0x0143,0x0147,0x0145,0x00D1, -0x00D3,0x00D2,0x00D6,0x00D4,0x01D1,0x0150,0x014C,0x00D5, -0x0154,0x0158,0x0156,0x015A,0x015C,0x0160,0x015E,0x0164, -0x0162,0x00DA,0x00D9,0x00DC,0x00DB,0x016C,0x01D3,0x0170, -0x016A,0x0172,0x016E,0x0168,0x01D7,0x01DB,0x01D9,0x01D5, -0x0174,0x00DD,0x0178,0x0176,0x0179,0x017D,0x017B}; - -/* page 7 0x2B21-0x2B77 */ -static uint16 tab_jisx0212_uni7[]={ -0x00E1,0x00E0,0x00E4,0x00E2,0x0103,0x01CE,0x0101,0x0105, -0x00E5,0x00E3,0x0107,0x0109,0x010D,0x00E7,0x010B,0x010F, -0x00E9,0x00E8,0x00EB,0x00EA,0x011B,0x0117,0x0113,0x0119, -0x01F5,0x011D,0x011F, 0,0x0121,0x0125,0x00ED,0x00EC, -0x00EF,0x00EE,0x01D0, 0,0x012B,0x012F,0x0129,0x0135, -0x0137,0x013A,0x013E,0x013C,0x0144,0x0148,0x0146,0x00F1, -0x00F3,0x00F2,0x00F6,0x00F4,0x01D2,0x0151,0x014D,0x00F5, -0x0155,0x0159,0x0157,0x015B,0x015D,0x0161,0x015F,0x0165, -0x0163,0x00FA,0x00F9,0x00FC,0x00FB,0x016D,0x01D4,0x0171, -0x016B,0x0173,0x016F,0x0169,0x01D8,0x01DC,0x01DA,0x01D6, -0x0175,0x00FD,0x00FF,0x0177,0x017A,0x017E,0x017C}; - -/* page 8 0x3021-0x307E */ -static uint16 tab_jisx0212_uni8[]={ -0x4E02,0x4E04,0x4E05,0x4E0C,0x4E12,0x4E1F,0x4E23,0x4E24, -0x4E28,0x4E2B,0x4E2E,0x4E2F,0x4E30,0x4E35,0x4E40,0x4E41, -0x4E44,0x4E47,0x4E51,0x4E5A,0x4E5C,0x4E63,0x4E68,0x4E69, -0x4E74,0x4E75,0x4E79,0x4E7F,0x4E8D,0x4E96,0x4E97,0x4E9D, -0x4EAF,0x4EB9,0x4EC3,0x4ED0,0x4EDA,0x4EDB,0x4EE0,0x4EE1, -0x4EE2,0x4EE8,0x4EEF,0x4EF1,0x4EF3,0x4EF5,0x4EFD,0x4EFE, -0x4EFF,0x4F00,0x4F02,0x4F03,0x4F08,0x4F0B,0x4F0C,0x4F12, -0x4F15,0x4F16,0x4F17,0x4F19,0x4F2E,0x4F31,0x4F60,0x4F33, -0x4F35,0x4F37,0x4F39,0x4F3B,0x4F3E,0x4F40,0x4F42,0x4F48, -0x4F49,0x4F4B,0x4F4C,0x4F52,0x4F54,0x4F56,0x4F58,0x4F5F, -0x4F63,0x4F6A,0x4F6C,0x4F6E,0x4F71,0x4F77,0x4F78,0x4F79, -0x4F7A,0x4F7D,0x4F7E,0x4F81,0x4F82,0x4F84}; - -/* page 9 0x3121-0x317E */ -static uint16 tab_jisx0212_uni9[]={ -0x4F85,0x4F89,0x4F8A,0x4F8C,0x4F8E,0x4F90,0x4F92,0x4F93, -0x4F94,0x4F97,0x4F99,0x4F9A,0x4F9E,0x4F9F,0x4FB2,0x4FB7, -0x4FB9,0x4FBB,0x4FBC,0x4FBD,0x4FBE,0x4FC0,0x4FC1,0x4FC5, -0x4FC6,0x4FC8,0x4FC9,0x4FCB,0x4FCC,0x4FCD,0x4FCF,0x4FD2, -0x4FDC,0x4FE0,0x4FE2,0x4FF0,0x4FF2,0x4FFC,0x4FFD,0x4FFF, -0x5000,0x5001,0x5004,0x5007,0x500A,0x500C,0x500E,0x5010, -0x5013,0x5017,0x5018,0x501B,0x501C,0x501D,0x501E,0x5022, -0x5027,0x502E,0x5030,0x5032,0x5033,0x5035,0x5040,0x5041, -0x5042,0x5045,0x5046,0x504A,0x504C,0x504E,0x5051,0x5052, -0x5053,0x5057,0x5059,0x505F,0x5060,0x5062,0x5063,0x5066, -0x5067,0x506A,0x506D,0x5070,0x5071,0x503B,0x5081,0x5083, -0x5084,0x5086,0x508A,0x508E,0x508F,0x5090}; - -/* page 10 0x3221-0x327E */ -static uint16 tab_jisx0212_uni10[]={ -0x5092,0x5093,0x5094,0x5096,0x509B,0x509C,0x509E,0x509F, -0x50A0,0x50A1,0x50A2,0x50AA,0x50AF,0x50B0,0x50B9,0x50BA, -0x50BD,0x50C0,0x50C3,0x50C4,0x50C7,0x50CC,0x50CE,0x50D0, -0x50D3,0x50D4,0x50D8,0x50DC,0x50DD,0x50DF,0x50E2,0x50E4, -0x50E6,0x50E8,0x50E9,0x50EF,0x50F1,0x50F6,0x50FA,0x50FE, -0x5103,0x5106,0x5107,0x5108,0x510B,0x510C,0x510D,0x510E, -0x50F2,0x5110,0x5117,0x5119,0x511B,0x511C,0x511D,0x511E, -0x5123,0x5127,0x5128,0x512C,0x512D,0x512F,0x5131,0x5133, -0x5134,0x5135,0x5138,0x5139,0x5142,0x514A,0x514F,0x5153, -0x5155,0x5157,0x5158,0x515F,0x5164,0x5166,0x517E,0x5183, -0x5184,0x518B,0x518E,0x5198,0x519D,0x51A1,0x51A3,0x51AD, -0x51B8,0x51BA,0x51BC,0x51BE,0x51BF,0x51C2}; - -/* page 11 0x3321-0x337E */ -static uint16 tab_jisx0212_uni11[]={ -0x51C8,0x51CF,0x51D1,0x51D2,0x51D3,0x51D5,0x51D8,0x51DE, -0x51E2,0x51E5,0x51EE,0x51F2,0x51F3,0x51F4,0x51F7,0x5201, -0x5202,0x5205,0x5212,0x5213,0x5215,0x5216,0x5218,0x5222, -0x5228,0x5231,0x5232,0x5235,0x523C,0x5245,0x5249,0x5255, -0x5257,0x5258,0x525A,0x525C,0x525F,0x5260,0x5261,0x5266, -0x526E,0x5277,0x5278,0x5279,0x5280,0x5282,0x5285,0x528A, -0x528C,0x5293,0x5295,0x5296,0x5297,0x5298,0x529A,0x529C, -0x52A4,0x52A5,0x52A6,0x52A7,0x52AF,0x52B0,0x52B6,0x52B7, -0x52B8,0x52BA,0x52BB,0x52BD,0x52C0,0x52C4,0x52C6,0x52C8, -0x52CC,0x52CF,0x52D1,0x52D4,0x52D6,0x52DB,0x52DC,0x52E1, -0x52E5,0x52E8,0x52E9,0x52EA,0x52EC,0x52F0,0x52F1,0x52F4, -0x52F6,0x52F7,0x5300,0x5303,0x530A,0x530B}; - -/* page 12 0x3421-0x347E */ -static uint16 tab_jisx0212_uni12[]={ -0x530C,0x5311,0x5313,0x5318,0x531B,0x531C,0x531E,0x531F, -0x5325,0x5327,0x5328,0x5329,0x532B,0x532C,0x532D,0x5330, -0x5332,0x5335,0x533C,0x533D,0x533E,0x5342,0x534C,0x534B, -0x5359,0x535B,0x5361,0x5363,0x5365,0x536C,0x536D,0x5372, -0x5379,0x537E,0x5383,0x5387,0x5388,0x538E,0x5393,0x5394, -0x5399,0x539D,0x53A1,0x53A4,0x53AA,0x53AB,0x53AF,0x53B2, -0x53B4,0x53B5,0x53B7,0x53B8,0x53BA,0x53BD,0x53C0,0x53C5, -0x53CF,0x53D2,0x53D3,0x53D5,0x53DA,0x53DD,0x53DE,0x53E0, -0x53E6,0x53E7,0x53F5,0x5402,0x5413,0x541A,0x5421,0x5427, -0x5428,0x542A,0x542F,0x5431,0x5434,0x5435,0x5443,0x5444, -0x5447,0x544D,0x544F,0x545E,0x5462,0x5464,0x5466,0x5467, -0x5469,0x546B,0x546D,0x546E,0x5474,0x547F}; - -/* page 13 0x3521-0x357E */ -static uint16 tab_jisx0212_uni13[]={ -0x5481,0x5483,0x5485,0x5488,0x5489,0x548D,0x5491,0x5495, -0x5496,0x549C,0x549F,0x54A1,0x54A6,0x54A7,0x54A9,0x54AA, -0x54AD,0x54AE,0x54B1,0x54B7,0x54B9,0x54BA,0x54BB,0x54BF, -0x54C6,0x54CA,0x54CD,0x54CE,0x54E0,0x54EA,0x54EC,0x54EF, -0x54F6,0x54FC,0x54FE,0x54FF,0x5500,0x5501,0x5505,0x5508, -0x5509,0x550C,0x550D,0x550E,0x5515,0x552A,0x552B,0x5532, -0x5535,0x5536,0x553B,0x553C,0x553D,0x5541,0x5547,0x5549, -0x554A,0x554D,0x5550,0x5551,0x5558,0x555A,0x555B,0x555E, -0x5560,0x5561,0x5564,0x5566,0x557F,0x5581,0x5582,0x5586, -0x5588,0x558E,0x558F,0x5591,0x5592,0x5593,0x5594,0x5597, -0x55A3,0x55A4,0x55AD,0x55B2,0x55BF,0x55C1,0x55C3,0x55C6, -0x55C9,0x55CB,0x55CC,0x55CE,0x55D1,0x55D2}; - -/* page 14 0x3621-0x367E */ -static uint16 tab_jisx0212_uni14[]={ -0x55D3,0x55D7,0x55D8,0x55DB,0x55DE,0x55E2,0x55E9,0x55F6, -0x55FF,0x5605,0x5608,0x560A,0x560D,0x560E,0x560F,0x5610, -0x5611,0x5612,0x5619,0x562C,0x5630,0x5633,0x5635,0x5637, -0x5639,0x563B,0x563C,0x563D,0x563F,0x5640,0x5641,0x5643, -0x5644,0x5646,0x5649,0x564B,0x564D,0x564F,0x5654,0x565E, -0x5660,0x5661,0x5662,0x5663,0x5666,0x5669,0x566D,0x566F, -0x5671,0x5672,0x5675,0x5684,0x5685,0x5688,0x568B,0x568C, -0x5695,0x5699,0x569A,0x569D,0x569E,0x569F,0x56A6,0x56A7, -0x56A8,0x56A9,0x56AB,0x56AC,0x56AD,0x56B1,0x56B3,0x56B7, -0x56BE,0x56C5,0x56C9,0x56CA,0x56CB,0x56CF,0x56D0,0x56CC, -0x56CD,0x56D9,0x56DC,0x56DD,0x56DF,0x56E1,0x56E4,0x56E5, -0x56E6,0x56E7,0x56E8,0x56F1,0x56EB,0x56ED}; - -/* page 15 0x3721-0x377E */ -static uint16 tab_jisx0212_uni15[]={ -0x56F6,0x56F7,0x5701,0x5702,0x5707,0x570A,0x570C,0x5711, -0x5715,0x571A,0x571B,0x571D,0x5720,0x5722,0x5723,0x5724, -0x5725,0x5729,0x572A,0x572C,0x572E,0x572F,0x5733,0x5734, -0x573D,0x573E,0x573F,0x5745,0x5746,0x574C,0x574D,0x5752, -0x5762,0x5765,0x5767,0x5768,0x576B,0x576D,0x576E,0x576F, -0x5770,0x5771,0x5773,0x5774,0x5775,0x5777,0x5779,0x577A, -0x577B,0x577C,0x577E,0x5781,0x5783,0x578C,0x5794,0x5797, -0x5799,0x579A,0x579C,0x579D,0x579E,0x579F,0x57A1,0x5795, -0x57A7,0x57A8,0x57A9,0x57AC,0x57B8,0x57BD,0x57C7,0x57C8, -0x57CC,0x57CF,0x57D5,0x57DD,0x57DE,0x57E4,0x57E6,0x57E7, -0x57E9,0x57ED,0x57F0,0x57F5,0x57F6,0x57F8,0x57FD,0x57FE, -0x57FF,0x5803,0x5804,0x5808,0x5809,0x57E1}; - -/* page 16 0x3821-0x387E */ -static uint16 tab_jisx0212_uni16[]={ -0x580C,0x580D,0x581B,0x581E,0x581F,0x5820,0x5826,0x5827, -0x582D,0x5832,0x5839,0x583F,0x5849,0x584C,0x584D,0x584F, -0x5850,0x5855,0x585F,0x5861,0x5864,0x5867,0x5868,0x5878, -0x587C,0x587F,0x5880,0x5881,0x5887,0x5888,0x5889,0x588A, -0x588C,0x588D,0x588F,0x5890,0x5894,0x5896,0x589D,0x58A0, -0x58A1,0x58A2,0x58A6,0x58A9,0x58B1,0x58B2,0x58C4,0x58BC, -0x58C2,0x58C8,0x58CD,0x58CE,0x58D0,0x58D2,0x58D4,0x58D6, -0x58DA,0x58DD,0x58E1,0x58E2,0x58E9,0x58F3,0x5905,0x5906, -0x590B,0x590C,0x5912,0x5913,0x5914,0x8641,0x591D,0x5921, -0x5923,0x5924,0x5928,0x592F,0x5930,0x5933,0x5935,0x5936, -0x593F,0x5943,0x5946,0x5952,0x5953,0x5959,0x595B,0x595D, -0x595E,0x595F,0x5961,0x5963,0x596B,0x596D}; - -/* page 17 0x3921-0x397E */ -static uint16 tab_jisx0212_uni17[]={ -0x596F,0x5972,0x5975,0x5976,0x5979,0x597B,0x597C,0x598B, -0x598C,0x598E,0x5992,0x5995,0x5997,0x599F,0x59A4,0x59A7, -0x59AD,0x59AE,0x59AF,0x59B0,0x59B3,0x59B7,0x59BA,0x59BC, -0x59C1,0x59C3,0x59C4,0x59C8,0x59CA,0x59CD,0x59D2,0x59DD, -0x59DE,0x59DF,0x59E3,0x59E4,0x59E7,0x59EE,0x59EF,0x59F1, -0x59F2,0x59F4,0x59F7,0x5A00,0x5A04,0x5A0C,0x5A0D,0x5A0E, -0x5A12,0x5A13,0x5A1E,0x5A23,0x5A24,0x5A27,0x5A28,0x5A2A, -0x5A2D,0x5A30,0x5A44,0x5A45,0x5A47,0x5A48,0x5A4C,0x5A50, -0x5A55,0x5A5E,0x5A63,0x5A65,0x5A67,0x5A6D,0x5A77,0x5A7A, -0x5A7B,0x5A7E,0x5A8B,0x5A90,0x5A93,0x5A96,0x5A99,0x5A9C, -0x5A9E,0x5A9F,0x5AA0,0x5AA2,0x5AA7,0x5AAC,0x5AB1,0x5AB2, -0x5AB3,0x5AB5,0x5AB8,0x5ABA,0x5ABB,0x5ABF}; - -/* page 18 0x3A21-0x3A7E */ -static uint16 tab_jisx0212_uni18[]={ -0x5AC4,0x5AC6,0x5AC8,0x5ACF,0x5ADA,0x5ADC,0x5AE0,0x5AE5, -0x5AEA,0x5AEE,0x5AF5,0x5AF6,0x5AFD,0x5B00,0x5B01,0x5B08, -0x5B17,0x5B34,0x5B19,0x5B1B,0x5B1D,0x5B21,0x5B25,0x5B2D, -0x5B38,0x5B41,0x5B4B,0x5B4C,0x5B52,0x5B56,0x5B5E,0x5B68, -0x5B6E,0x5B6F,0x5B7C,0x5B7D,0x5B7E,0x5B7F,0x5B81,0x5B84, -0x5B86,0x5B8A,0x5B8E,0x5B90,0x5B91,0x5B93,0x5B94,0x5B96, -0x5BA8,0x5BA9,0x5BAC,0x5BAD,0x5BAF,0x5BB1,0x5BB2,0x5BB7, -0x5BBA,0x5BBC,0x5BC0,0x5BC1,0x5BCD,0x5BCF,0x5BD6,0x5BD7, -0x5BD8,0x5BD9,0x5BDA,0x5BE0,0x5BEF,0x5BF1,0x5BF4,0x5BFD, -0x5C0C,0x5C17,0x5C1E,0x5C1F,0x5C23,0x5C26,0x5C29,0x5C2B, -0x5C2C,0x5C2E,0x5C30,0x5C32,0x5C35,0x5C36,0x5C59,0x5C5A, -0x5C5C,0x5C62,0x5C63,0x5C67,0x5C68,0x5C69}; - -/* page 19 0x3B21-0x3B7E */ -static uint16 tab_jisx0212_uni19[]={ -0x5C6D,0x5C70,0x5C74,0x5C75,0x5C7A,0x5C7B,0x5C7C,0x5C7D, -0x5C87,0x5C88,0x5C8A,0x5C8F,0x5C92,0x5C9D,0x5C9F,0x5CA0, -0x5CA2,0x5CA3,0x5CA6,0x5CAA,0x5CB2,0x5CB4,0x5CB5,0x5CBA, -0x5CC9,0x5CCB,0x5CD2,0x5CDD,0x5CD7,0x5CEE,0x5CF1,0x5CF2, -0x5CF4,0x5D01,0x5D06,0x5D0D,0x5D12,0x5D2B,0x5D23,0x5D24, -0x5D26,0x5D27,0x5D31,0x5D34,0x5D39,0x5D3D,0x5D3F,0x5D42, -0x5D43,0x5D46,0x5D48,0x5D55,0x5D51,0x5D59,0x5D4A,0x5D5F, -0x5D60,0x5D61,0x5D62,0x5D64,0x5D6A,0x5D6D,0x5D70,0x5D79, -0x5D7A,0x5D7E,0x5D7F,0x5D81,0x5D83,0x5D88,0x5D8A,0x5D92, -0x5D93,0x5D94,0x5D95,0x5D99,0x5D9B,0x5D9F,0x5DA0,0x5DA7, -0x5DAB,0x5DB0,0x5DB4,0x5DB8,0x5DB9,0x5DC3,0x5DC7,0x5DCB, -0x5DD0,0x5DCE,0x5DD8,0x5DD9,0x5DE0,0x5DE4}; - -/* page 20 0x3C21-0x3C7E */ -static uint16 tab_jisx0212_uni20[]={ -0x5DE9,0x5DF8,0x5DF9,0x5E00,0x5E07,0x5E0D,0x5E12,0x5E14, -0x5E15,0x5E18,0x5E1F,0x5E20,0x5E2E,0x5E28,0x5E32,0x5E35, -0x5E3E,0x5E4B,0x5E50,0x5E49,0x5E51,0x5E56,0x5E58,0x5E5B, -0x5E5C,0x5E5E,0x5E68,0x5E6A,0x5E6B,0x5E6C,0x5E6D,0x5E6E, -0x5E70,0x5E80,0x5E8B,0x5E8E,0x5EA2,0x5EA4,0x5EA5,0x5EA8, -0x5EAA,0x5EAC,0x5EB1,0x5EB3,0x5EBD,0x5EBE,0x5EBF,0x5EC6, -0x5ECC,0x5ECB,0x5ECE,0x5ED1,0x5ED2,0x5ED4,0x5ED5,0x5EDC, -0x5EDE,0x5EE5,0x5EEB,0x5F02,0x5F06,0x5F07,0x5F08,0x5F0E, -0x5F19,0x5F1C,0x5F1D,0x5F21,0x5F22,0x5F23,0x5F24,0x5F28, -0x5F2B,0x5F2C,0x5F2E,0x5F30,0x5F34,0x5F36,0x5F3B,0x5F3D, -0x5F3F,0x5F40,0x5F44,0x5F45,0x5F47,0x5F4D,0x5F50,0x5F54, -0x5F58,0x5F5B,0x5F60,0x5F63,0x5F64,0x5F67}; - -/* page 21 0x3D21-0x3D7E */ -static uint16 tab_jisx0212_uni21[]={ -0x5F6F,0x5F72,0x5F74,0x5F75,0x5F78,0x5F7A,0x5F7D,0x5F7E, -0x5F89,0x5F8D,0x5F8F,0x5F96,0x5F9C,0x5F9D,0x5FA2,0x5FA7, -0x5FAB,0x5FA4,0x5FAC,0x5FAF,0x5FB0,0x5FB1,0x5FB8,0x5FC4, -0x5FC7,0x5FC8,0x5FC9,0x5FCB,0x5FD0,0x5FD1,0x5FD2,0x5FD3, -0x5FD4,0x5FDE,0x5FE1,0x5FE2,0x5FE8,0x5FE9,0x5FEA,0x5FEC, -0x5FED,0x5FEE,0x5FEF,0x5FF2,0x5FF3,0x5FF6,0x5FFA,0x5FFC, -0x6007,0x600A,0x600D,0x6013,0x6014,0x6017,0x6018,0x601A, -0x601F,0x6024,0x602D,0x6033,0x6035,0x6040,0x6047,0x6048, -0x6049,0x604C,0x6051,0x6054,0x6056,0x6057,0x605D,0x6061, -0x6067,0x6071,0x607E,0x607F,0x6082,0x6086,0x6088,0x608A, -0x608E,0x6091,0x6093,0x6095,0x6098,0x609D,0x609E,0x60A2, -0x60A4,0x60A5,0x60A8,0x60B0,0x60B1,0x60B7}; - -/* page 22 0x3E21-0x3E7E */ -static uint16 tab_jisx0212_uni22[]={ -0x60BB,0x60BE,0x60C2,0x60C4,0x60C8,0x60C9,0x60CA,0x60CB, -0x60CE,0x60CF,0x60D4,0x60D5,0x60D9,0x60DB,0x60DD,0x60DE, -0x60E2,0x60E5,0x60F2,0x60F5,0x60F8,0x60FC,0x60FD,0x6102, -0x6107,0x610A,0x610C,0x6110,0x6111,0x6112,0x6113,0x6114, -0x6116,0x6117,0x6119,0x611C,0x611E,0x6122,0x612A,0x612B, -0x6130,0x6131,0x6135,0x6136,0x6137,0x6139,0x6141,0x6145, -0x6146,0x6149,0x615E,0x6160,0x616C,0x6172,0x6178,0x617B, -0x617C,0x617F,0x6180,0x6181,0x6183,0x6184,0x618B,0x618D, -0x6192,0x6193,0x6197,0x6198,0x619C,0x619D,0x619F,0x61A0, -0x61A5,0x61A8,0x61AA,0x61AD,0x61B8,0x61B9,0x61BC,0x61C0, -0x61C1,0x61C2,0x61CE,0x61CF,0x61D5,0x61DC,0x61DD,0x61DE, -0x61DF,0x61E1,0x61E2,0x61E7,0x61E9,0x61E5}; - -/* page 23 0x3F21-0x3F7E */ -static uint16 tab_jisx0212_uni23[]={ -0x61EC,0x61ED,0x61EF,0x6201,0x6203,0x6204,0x6207,0x6213, -0x6215,0x621C,0x6220,0x6222,0x6223,0x6227,0x6229,0x622B, -0x6239,0x623D,0x6242,0x6243,0x6244,0x6246,0x624C,0x6250, -0x6251,0x6252,0x6254,0x6256,0x625A,0x625C,0x6264,0x626D, -0x626F,0x6273,0x627A,0x627D,0x628D,0x628E,0x628F,0x6290, -0x62A6,0x62A8,0x62B3,0x62B6,0x62B7,0x62BA,0x62BE,0x62BF, -0x62C4,0x62CE,0x62D5,0x62D6,0x62DA,0x62EA,0x62F2,0x62F4, -0x62FC,0x62FD,0x6303,0x6304,0x630A,0x630B,0x630D,0x6310, -0x6313,0x6316,0x6318,0x6329,0x632A,0x632D,0x6335,0x6336, -0x6339,0x633C,0x6341,0x6342,0x6343,0x6344,0x6346,0x634A, -0x634B,0x634E,0x6352,0x6353,0x6354,0x6358,0x635B,0x6365, -0x6366,0x636C,0x636D,0x6371,0x6374,0x6375}; - -/* page 24 0x4021-0x407E */ -static uint16 tab_jisx0212_uni24[]={ -0x6378,0x637C,0x637D,0x637F,0x6382,0x6384,0x6387,0x638A, -0x6390,0x6394,0x6395,0x6399,0x639A,0x639E,0x63A4,0x63A6, -0x63AD,0x63AE,0x63AF,0x63BD,0x63C1,0x63C5,0x63C8,0x63CE, -0x63D1,0x63D3,0x63D4,0x63D5,0x63DC,0x63E0,0x63E5,0x63EA, -0x63EC,0x63F2,0x63F3,0x63F5,0x63F8,0x63F9,0x6409,0x640A, -0x6410,0x6412,0x6414,0x6418,0x641E,0x6420,0x6422,0x6424, -0x6425,0x6429,0x642A,0x642F,0x6430,0x6435,0x643D,0x643F, -0x644B,0x644F,0x6451,0x6452,0x6453,0x6454,0x645A,0x645B, -0x645C,0x645D,0x645F,0x6460,0x6461,0x6463,0x646D,0x6473, -0x6474,0x647B,0x647D,0x6485,0x6487,0x648F,0x6490,0x6491, -0x6498,0x6499,0x649B,0x649D,0x649F,0x64A1,0x64A3,0x64A6, -0x64A8,0x64AC,0x64B3,0x64BD,0x64BE,0x64BF}; - -/* page 25 0x4121-0x417E */ -static uint16 tab_jisx0212_uni25[]={ -0x64C4,0x64C9,0x64CA,0x64CB,0x64CC,0x64CE,0x64D0,0x64D1, -0x64D5,0x64D7,0x64E4,0x64E5,0x64E9,0x64EA,0x64ED,0x64F0, -0x64F5,0x64F7,0x64FB,0x64FF,0x6501,0x6504,0x6508,0x6509, -0x650A,0x650F,0x6513,0x6514,0x6516,0x6519,0x651B,0x651E, -0x651F,0x6522,0x6526,0x6529,0x652E,0x6531,0x653A,0x653C, -0x653D,0x6543,0x6547,0x6549,0x6550,0x6552,0x6554,0x655F, -0x6560,0x6567,0x656B,0x657A,0x657D,0x6581,0x6585,0x658A, -0x6592,0x6595,0x6598,0x659D,0x65A0,0x65A3,0x65A6,0x65AE, -0x65B2,0x65B3,0x65B4,0x65BF,0x65C2,0x65C8,0x65C9,0x65CE, -0x65D0,0x65D4,0x65D6,0x65D8,0x65DF,0x65F0,0x65F2,0x65F4, -0x65F5,0x65F9,0x65FE,0x65FF,0x6600,0x6604,0x6608,0x6609, -0x660D,0x6611,0x6612,0x6615,0x6616,0x661D}; - -/* page 26 0x4221-0x427E */ -static uint16 tab_jisx0212_uni26[]={ -0x661E,0x6621,0x6622,0x6623,0x6624,0x6626,0x6629,0x662A, -0x662B,0x662C,0x662E,0x6630,0x6631,0x6633,0x6639,0x6637, -0x6640,0x6645,0x6646,0x664A,0x664C,0x6651,0x664E,0x6657, -0x6658,0x6659,0x665B,0x665C,0x6660,0x6661,0x66FB,0x666A, -0x666B,0x666C,0x667E,0x6673,0x6675,0x667F,0x6677,0x6678, -0x6679,0x667B,0x6680,0x667C,0x668B,0x668C,0x668D,0x6690, -0x6692,0x6699,0x669A,0x669B,0x669C,0x669F,0x66A0,0x66A4, -0x66AD,0x66B1,0x66B2,0x66B5,0x66BB,0x66BF,0x66C0,0x66C2, -0x66C3,0x66C8,0x66CC,0x66CE,0x66CF,0x66D4,0x66DB,0x66DF, -0x66E8,0x66EB,0x66EC,0x66EE,0x66FA,0x6705,0x6707,0x670E, -0x6713,0x6719,0x671C,0x6720,0x6722,0x6733,0x673E,0x6745, -0x6747,0x6748,0x674C,0x6754,0x6755,0x675D}; - -/* page 27 0x4321-0x437E */ -static uint16 tab_jisx0212_uni27[]={ -0x6766,0x676C,0x676E,0x6774,0x6776,0x677B,0x6781,0x6784, -0x678E,0x678F,0x6791,0x6793,0x6796,0x6798,0x6799,0x679B, -0x67B0,0x67B1,0x67B2,0x67B5,0x67BB,0x67BC,0x67BD,0x67F9, -0x67C0,0x67C2,0x67C3,0x67C5,0x67C8,0x67C9,0x67D2,0x67D7, -0x67D9,0x67DC,0x67E1,0x67E6,0x67F0,0x67F2,0x67F6,0x67F7, -0x6852,0x6814,0x6819,0x681D,0x681F,0x6828,0x6827,0x682C, -0x682D,0x682F,0x6830,0x6831,0x6833,0x683B,0x683F,0x6844, -0x6845,0x684A,0x684C,0x6855,0x6857,0x6858,0x685B,0x686B, -0x686E,0x686F,0x6870,0x6871,0x6872,0x6875,0x6879,0x687A, -0x687B,0x687C,0x6882,0x6884,0x6886,0x6888,0x6896,0x6898, -0x689A,0x689C,0x68A1,0x68A3,0x68A5,0x68A9,0x68AA,0x68AE, -0x68B2,0x68BB,0x68C5,0x68C8,0x68CC,0x68CF}; - -/* page 28 0x4421-0x447E */ -static uint16 tab_jisx0212_uni28[]={ -0x68D0,0x68D1,0x68D3,0x68D6,0x68D9,0x68DC,0x68DD,0x68E5, -0x68E8,0x68EA,0x68EB,0x68EC,0x68ED,0x68F0,0x68F1,0x68F5, -0x68F6,0x68FB,0x68FC,0x68FD,0x6906,0x6909,0x690A,0x6910, -0x6911,0x6913,0x6916,0x6917,0x6931,0x6933,0x6935,0x6938, -0x693B,0x6942,0x6945,0x6949,0x694E,0x6957,0x695B,0x6963, -0x6964,0x6965,0x6966,0x6968,0x6969,0x696C,0x6970,0x6971, -0x6972,0x697A,0x697B,0x697F,0x6980,0x698D,0x6992,0x6996, -0x6998,0x69A1,0x69A5,0x69A6,0x69A8,0x69AB,0x69AD,0x69AF, -0x69B7,0x69B8,0x69BA,0x69BC,0x69C5,0x69C8,0x69D1,0x69D6, -0x69D7,0x69E2,0x69E5,0x69EE,0x69EF,0x69F1,0x69F3,0x69F5, -0x69FE,0x6A00,0x6A01,0x6A03,0x6A0F,0x6A11,0x6A15,0x6A1A, -0x6A1D,0x6A20,0x6A24,0x6A28,0x6A30,0x6A32}; - -/* page 29 0x4521-0x457E */ -static uint16 tab_jisx0212_uni29[]={ -0x6A34,0x6A37,0x6A3B,0x6A3E,0x6A3F,0x6A45,0x6A46,0x6A49, -0x6A4A,0x6A4E,0x6A50,0x6A51,0x6A52,0x6A55,0x6A56,0x6A5B, -0x6A64,0x6A67,0x6A6A,0x6A71,0x6A73,0x6A7E,0x6A81,0x6A83, -0x6A86,0x6A87,0x6A89,0x6A8B,0x6A91,0x6A9B,0x6A9D,0x6A9E, -0x6A9F,0x6AA5,0x6AAB,0x6AAF,0x6AB0,0x6AB1,0x6AB4,0x6ABD, -0x6ABE,0x6ABF,0x6AC6,0x6AC9,0x6AC8,0x6ACC,0x6AD0,0x6AD4, -0x6AD5,0x6AD6,0x6ADC,0x6ADD,0x6AE4,0x6AE7,0x6AEC,0x6AF0, -0x6AF1,0x6AF2,0x6AFC,0x6AFD,0x6B02,0x6B03,0x6B06,0x6B07, -0x6B09,0x6B0F,0x6B10,0x6B11,0x6B17,0x6B1B,0x6B1E,0x6B24, -0x6B28,0x6B2B,0x6B2C,0x6B2F,0x6B35,0x6B36,0x6B3B,0x6B3F, -0x6B46,0x6B4A,0x6B4D,0x6B52,0x6B56,0x6B58,0x6B5D,0x6B60, -0x6B67,0x6B6B,0x6B6E,0x6B70,0x6B75,0x6B7D}; - -/* page 30 0x4621-0x467E */ -static uint16 tab_jisx0212_uni30[]={ -0x6B7E,0x6B82,0x6B85,0x6B97,0x6B9B,0x6B9F,0x6BA0,0x6BA2, -0x6BA3,0x6BA8,0x6BA9,0x6BAC,0x6BAD,0x6BAE,0x6BB0,0x6BB8, -0x6BB9,0x6BBD,0x6BBE,0x6BC3,0x6BC4,0x6BC9,0x6BCC,0x6BD6, -0x6BDA,0x6BE1,0x6BE3,0x6BE6,0x6BE7,0x6BEE,0x6BF1,0x6BF7, -0x6BF9,0x6BFF,0x6C02,0x6C04,0x6C05,0x6C09,0x6C0D,0x6C0E, -0x6C10,0x6C12,0x6C19,0x6C1F,0x6C26,0x6C27,0x6C28,0x6C2C, -0x6C2E,0x6C33,0x6C35,0x6C36,0x6C3A,0x6C3B,0x6C3F,0x6C4A, -0x6C4B,0x6C4D,0x6C4F,0x6C52,0x6C54,0x6C59,0x6C5B,0x6C5C, -0x6C6B,0x6C6D,0x6C6F,0x6C74,0x6C76,0x6C78,0x6C79,0x6C7B, -0x6C85,0x6C86,0x6C87,0x6C89,0x6C94,0x6C95,0x6C97,0x6C98, -0x6C9C,0x6C9F,0x6CB0,0x6CB2,0x6CB4,0x6CC2,0x6CC6,0x6CCD, -0x6CCF,0x6CD0,0x6CD1,0x6CD2,0x6CD4,0x6CD6}; - -/* page 31 0x4721-0x477E */ -static uint16 tab_jisx0212_uni31[]={ -0x6CDA,0x6CDC,0x6CE0,0x6CE7,0x6CE9,0x6CEB,0x6CEC,0x6CEE, -0x6CF2,0x6CF4,0x6D04,0x6D07,0x6D0A,0x6D0E,0x6D0F,0x6D11, -0x6D13,0x6D1A,0x6D26,0x6D27,0x6D28,0x6C67,0x6D2E,0x6D2F, -0x6D31,0x6D39,0x6D3C,0x6D3F,0x6D57,0x6D5E,0x6D5F,0x6D61, -0x6D65,0x6D67,0x6D6F,0x6D70,0x6D7C,0x6D82,0x6D87,0x6D91, -0x6D92,0x6D94,0x6D96,0x6D97,0x6D98,0x6DAA,0x6DAC,0x6DB4, -0x6DB7,0x6DB9,0x6DBD,0x6DBF,0x6DC4,0x6DC8,0x6DCA,0x6DCE, -0x6DCF,0x6DD6,0x6DDB,0x6DDD,0x6DDF,0x6DE0,0x6DE2,0x6DE5, -0x6DE9,0x6DEF,0x6DF0,0x6DF4,0x6DF6,0x6DFC,0x6E00,0x6E04, -0x6E1E,0x6E22,0x6E27,0x6E32,0x6E36,0x6E39,0x6E3B,0x6E3C, -0x6E44,0x6E45,0x6E48,0x6E49,0x6E4B,0x6E4F,0x6E51,0x6E52, -0x6E53,0x6E54,0x6E57,0x6E5C,0x6E5D,0x6E5E}; - -/* page 32 0x4821-0x487E */ -static uint16 tab_jisx0212_uni32[]={ -0x6E62,0x6E63,0x6E68,0x6E73,0x6E7B,0x6E7D,0x6E8D,0x6E93, -0x6E99,0x6EA0,0x6EA7,0x6EAD,0x6EAE,0x6EB1,0x6EB3,0x6EBB, -0x6EBF,0x6EC0,0x6EC1,0x6EC3,0x6EC7,0x6EC8,0x6ECA,0x6ECD, -0x6ECE,0x6ECF,0x6EEB,0x6EED,0x6EEE,0x6EF9,0x6EFB,0x6EFD, -0x6F04,0x6F08,0x6F0A,0x6F0C,0x6F0D,0x6F16,0x6F18,0x6F1A, -0x6F1B,0x6F26,0x6F29,0x6F2A,0x6F2F,0x6F30,0x6F33,0x6F36, -0x6F3B,0x6F3C,0x6F2D,0x6F4F,0x6F51,0x6F52,0x6F53,0x6F57, -0x6F59,0x6F5A,0x6F5D,0x6F5E,0x6F61,0x6F62,0x6F68,0x6F6C, -0x6F7D,0x6F7E,0x6F83,0x6F87,0x6F88,0x6F8B,0x6F8C,0x6F8D, -0x6F90,0x6F92,0x6F93,0x6F94,0x6F96,0x6F9A,0x6F9F,0x6FA0, -0x6FA5,0x6FA6,0x6FA7,0x6FA8,0x6FAE,0x6FAF,0x6FB0,0x6FB5, -0x6FB6,0x6FBC,0x6FC5,0x6FC7,0x6FC8,0x6FCA}; - -/* page 33 0x4921-0x497E */ -static uint16 tab_jisx0212_uni33[]={ -0x6FDA,0x6FDE,0x6FE8,0x6FE9,0x6FF0,0x6FF5,0x6FF9,0x6FFC, -0x6FFD,0x7000,0x7005,0x7006,0x7007,0x700D,0x7017,0x7020, -0x7023,0x702F,0x7034,0x7037,0x7039,0x703C,0x7043,0x7044, -0x7048,0x7049,0x704A,0x704B,0x7054,0x7055,0x705D,0x705E, -0x704E,0x7064,0x7065,0x706C,0x706E,0x7075,0x7076,0x707E, -0x7081,0x7085,0x7086,0x7094,0x7095,0x7096,0x7097,0x7098, -0x709B,0x70A4,0x70AB,0x70B0,0x70B1,0x70B4,0x70B7,0x70CA, -0x70D1,0x70D3,0x70D4,0x70D5,0x70D6,0x70D8,0x70DC,0x70E4, -0x70FA,0x7103,0x7104,0x7105,0x7106,0x7107,0x710B,0x710C, -0x710F,0x711E,0x7120,0x712B,0x712D,0x712F,0x7130,0x7131, -0x7138,0x7141,0x7145,0x7146,0x7147,0x714A,0x714B,0x7150, -0x7152,0x7157,0x715A,0x715C,0x715E,0x7160}; - -/* page 34 0x4A21-0x4A7E */ -static uint16 tab_jisx0212_uni34[]={ -0x7168,0x7179,0x7180,0x7185,0x7187,0x718C,0x7192,0x719A, -0x719B,0x71A0,0x71A2,0x71AF,0x71B0,0x71B2,0x71B3,0x71BA, -0x71BF,0x71C0,0x71C1,0x71C4,0x71CB,0x71CC,0x71D3,0x71D6, -0x71D9,0x71DA,0x71DC,0x71F8,0x71FE,0x7200,0x7207,0x7208, -0x7209,0x7213,0x7217,0x721A,0x721D,0x721F,0x7224,0x722B, -0x722F,0x7234,0x7238,0x7239,0x7241,0x7242,0x7243,0x7245, -0x724E,0x724F,0x7250,0x7253,0x7255,0x7256,0x725A,0x725C, -0x725E,0x7260,0x7263,0x7268,0x726B,0x726E,0x726F,0x7271, -0x7277,0x7278,0x727B,0x727C,0x727F,0x7284,0x7289,0x728D, -0x728E,0x7293,0x729B,0x72A8,0x72AD,0x72AE,0x72B1,0x72B4, -0x72BE,0x72C1,0x72C7,0x72C9,0x72CC,0x72D5,0x72D6,0x72D8, -0x72DF,0x72E5,0x72F3,0x72F4,0x72FA,0x72FB}; - -/* page 35 0x4B21-0x4B7E */ -static uint16 tab_jisx0212_uni35[]={ -0x72FE,0x7302,0x7304,0x7305,0x7307,0x730B,0x730D,0x7312, -0x7313,0x7318,0x7319,0x731E,0x7322,0x7324,0x7327,0x7328, -0x732C,0x7331,0x7332,0x7335,0x733A,0x733B,0x733D,0x7343, -0x734D,0x7350,0x7352,0x7356,0x7358,0x735D,0x735E,0x735F, -0x7360,0x7366,0x7367,0x7369,0x736B,0x736C,0x736E,0x736F, -0x7371,0x7377,0x7379,0x737C,0x7380,0x7381,0x7383,0x7385, -0x7386,0x738E,0x7390,0x7393,0x7395,0x7397,0x7398,0x739C, -0x739E,0x739F,0x73A0,0x73A2,0x73A5,0x73A6,0x73AA,0x73AB, -0x73AD,0x73B5,0x73B7,0x73B9,0x73BC,0x73BD,0x73BF,0x73C5, -0x73C6,0x73C9,0x73CB,0x73CC,0x73CF,0x73D2,0x73D3,0x73D6, -0x73D9,0x73DD,0x73E1,0x73E3,0x73E6,0x73E7,0x73E9,0x73F4, -0x73F5,0x73F7,0x73F9,0x73FA,0x73FB,0x73FD}; - -/* page 36 0x4C21-0x4C7E */ -static uint16 tab_jisx0212_uni36[]={ -0x73FF,0x7400,0x7401,0x7404,0x7407,0x740A,0x7411,0x741A, -0x741B,0x7424,0x7426,0x7428,0x7429,0x742A,0x742B,0x742C, -0x742D,0x742E,0x742F,0x7430,0x7431,0x7439,0x7440,0x7443, -0x7444,0x7446,0x7447,0x744B,0x744D,0x7451,0x7452,0x7457, -0x745D,0x7462,0x7466,0x7467,0x7468,0x746B,0x746D,0x746E, -0x7471,0x7472,0x7480,0x7481,0x7485,0x7486,0x7487,0x7489, -0x748F,0x7490,0x7491,0x7492,0x7498,0x7499,0x749A,0x749C, -0x749F,0x74A0,0x74A1,0x74A3,0x74A6,0x74A8,0x74A9,0x74AA, -0x74AB,0x74AE,0x74AF,0x74B1,0x74B2,0x74B5,0x74B9,0x74BB, -0x74BF,0x74C8,0x74C9,0x74CC,0x74D0,0x74D3,0x74D8,0x74DA, -0x74DB,0x74DE,0x74DF,0x74E4,0x74E8,0x74EA,0x74EB,0x74EF, -0x74F4,0x74FA,0x74FB,0x74FC,0x74FF,0x7506}; - -/* page 37 0x4D21-0x4D7E */ -static uint16 tab_jisx0212_uni37[]={ -0x7512,0x7516,0x7517,0x7520,0x7521,0x7524,0x7527,0x7529, -0x752A,0x752F,0x7536,0x7539,0x753D,0x753E,0x753F,0x7540, -0x7543,0x7547,0x7548,0x754E,0x7550,0x7552,0x7557,0x755E, -0x755F,0x7561,0x756F,0x7571,0x7579,0x757A,0x757B,0x757C, -0x757D,0x757E,0x7581,0x7585,0x7590,0x7592,0x7593,0x7595, -0x7599,0x759C,0x75A2,0x75A4,0x75B4,0x75BA,0x75BF,0x75C0, -0x75C1,0x75C4,0x75C6,0x75CC,0x75CE,0x75CF,0x75D7,0x75DC, -0x75DF,0x75E0,0x75E1,0x75E4,0x75E7,0x75EC,0x75EE,0x75EF, -0x75F1,0x75F9,0x7600,0x7602,0x7603,0x7604,0x7607,0x7608, -0x760A,0x760C,0x760F,0x7612,0x7613,0x7615,0x7616,0x7619, -0x761B,0x761C,0x761D,0x761E,0x7623,0x7625,0x7626,0x7629, -0x762D,0x7632,0x7633,0x7635,0x7638,0x7639}; - -/* page 38 0x4E21-0x4E7E */ -static uint16 tab_jisx0212_uni38[]={ -0x763A,0x763C,0x764A,0x7640,0x7641,0x7643,0x7644,0x7645, -0x7649,0x764B,0x7655,0x7659,0x765F,0x7664,0x7665,0x766D, -0x766E,0x766F,0x7671,0x7674,0x7681,0x7685,0x768C,0x768D, -0x7695,0x769B,0x769C,0x769D,0x769F,0x76A0,0x76A2,0x76A3, -0x76A4,0x76A5,0x76A6,0x76A7,0x76A8,0x76AA,0x76AD,0x76BD, -0x76C1,0x76C5,0x76C9,0x76CB,0x76CC,0x76CE,0x76D4,0x76D9, -0x76E0,0x76E6,0x76E8,0x76EC,0x76F0,0x76F1,0x76F6,0x76F9, -0x76FC,0x7700,0x7706,0x770A,0x770E,0x7712,0x7714,0x7715, -0x7717,0x7719,0x771A,0x771C,0x7722,0x7728,0x772D,0x772E, -0x772F,0x7734,0x7735,0x7736,0x7739,0x773D,0x773E,0x7742, -0x7745,0x7746,0x774A,0x774D,0x774E,0x774F,0x7752,0x7756, -0x7757,0x775C,0x775E,0x775F,0x7760,0x7762}; - -/* page 39 0x4F21-0x4F7E */ -static uint16 tab_jisx0212_uni39[]={ -0x7764,0x7767,0x776A,0x776C,0x7770,0x7772,0x7773,0x7774, -0x777A,0x777D,0x7780,0x7784,0x778C,0x778D,0x7794,0x7795, -0x7796,0x779A,0x779F,0x77A2,0x77A7,0x77AA,0x77AE,0x77AF, -0x77B1,0x77B5,0x77BE,0x77C3,0x77C9,0x77D1,0x77D2,0x77D5, -0x77D9,0x77DE,0x77DF,0x77E0,0x77E4,0x77E6,0x77EA,0x77EC, -0x77F0,0x77F1,0x77F4,0x77F8,0x77FB,0x7805,0x7806,0x7809, -0x780D,0x780E,0x7811,0x781D,0x7821,0x7822,0x7823,0x782D, -0x782E,0x7830,0x7835,0x7837,0x7843,0x7844,0x7847,0x7848, -0x784C,0x784E,0x7852,0x785C,0x785E,0x7860,0x7861,0x7863, -0x7864,0x7868,0x786A,0x786E,0x787A,0x787E,0x788A,0x788F, -0x7894,0x7898,0x78A1,0x789D,0x789E,0x789F,0x78A4,0x78A8, -0x78AC,0x78AD,0x78B0,0x78B1,0x78B2,0x78B3}; - -/* page 40 0x5021-0x507E */ -static uint16 tab_jisx0212_uni40[]={ -0x78BB,0x78BD,0x78BF,0x78C7,0x78C8,0x78C9,0x78CC,0x78CE, -0x78D2,0x78D3,0x78D5,0x78D6,0x78E4,0x78DB,0x78DF,0x78E0, -0x78E1,0x78E6,0x78EA,0x78F2,0x78F3,0x7900,0x78F6,0x78F7, -0x78FA,0x78FB,0x78FF,0x7906,0x790C,0x7910,0x791A,0x791C, -0x791E,0x791F,0x7920,0x7925,0x7927,0x7929,0x792D,0x7931, -0x7934,0x7935,0x793B,0x793D,0x793F,0x7944,0x7945,0x7946, -0x794A,0x794B,0x794F,0x7951,0x7954,0x7958,0x795B,0x795C, -0x7967,0x7969,0x796B,0x7972,0x7979,0x797B,0x797C,0x797E, -0x798B,0x798C,0x7991,0x7993,0x7994,0x7995,0x7996,0x7998, -0x799B,0x799C,0x79A1,0x79A8,0x79A9,0x79AB,0x79AF,0x79B1, -0x79B4,0x79B8,0x79BB,0x79C2,0x79C4,0x79C7,0x79C8,0x79CA, -0x79CF,0x79D4,0x79D6,0x79DA,0x79DD,0x79DE}; - -/* page 41 0x5121-0x517E */ -static uint16 tab_jisx0212_uni41[]={ -0x79E0,0x79E2,0x79E5,0x79EA,0x79EB,0x79ED,0x79F1,0x79F8, -0x79FC,0x7A02,0x7A03,0x7A07,0x7A09,0x7A0A,0x7A0C,0x7A11, -0x7A15,0x7A1B,0x7A1E,0x7A21,0x7A27,0x7A2B,0x7A2D,0x7A2F, -0x7A30,0x7A34,0x7A35,0x7A38,0x7A39,0x7A3A,0x7A44,0x7A45, -0x7A47,0x7A48,0x7A4C,0x7A55,0x7A56,0x7A59,0x7A5C,0x7A5D, -0x7A5F,0x7A60,0x7A65,0x7A67,0x7A6A,0x7A6D,0x7A75,0x7A78, -0x7A7E,0x7A80,0x7A82,0x7A85,0x7A86,0x7A8A,0x7A8B,0x7A90, -0x7A91,0x7A94,0x7A9E,0x7AA0,0x7AA3,0x7AAC,0x7AB3,0x7AB5, -0x7AB9,0x7ABB,0x7ABC,0x7AC6,0x7AC9,0x7ACC,0x7ACE,0x7AD1, -0x7ADB,0x7AE8,0x7AE9,0x7AEB,0x7AEC,0x7AF1,0x7AF4,0x7AFB, -0x7AFD,0x7AFE,0x7B07,0x7B14,0x7B1F,0x7B23,0x7B27,0x7B29, -0x7B2A,0x7B2B,0x7B2D,0x7B2E,0x7B2F,0x7B30}; - -/* page 42 0x5221-0x527E */ -static uint16 tab_jisx0212_uni42[]={ -0x7B31,0x7B34,0x7B3D,0x7B3F,0x7B40,0x7B41,0x7B47,0x7B4E, -0x7B55,0x7B60,0x7B64,0x7B66,0x7B69,0x7B6A,0x7B6D,0x7B6F, -0x7B72,0x7B73,0x7B77,0x7B84,0x7B89,0x7B8E,0x7B90,0x7B91, -0x7B96,0x7B9B,0x7B9E,0x7BA0,0x7BA5,0x7BAC,0x7BAF,0x7BB0, -0x7BB2,0x7BB5,0x7BB6,0x7BBA,0x7BBB,0x7BBC,0x7BBD,0x7BC2, -0x7BC5,0x7BC8,0x7BCA,0x7BD4,0x7BD6,0x7BD7,0x7BD9,0x7BDA, -0x7BDB,0x7BE8,0x7BEA,0x7BF2,0x7BF4,0x7BF5,0x7BF8,0x7BF9, -0x7BFA,0x7BFC,0x7BFE,0x7C01,0x7C02,0x7C03,0x7C04,0x7C06, -0x7C09,0x7C0B,0x7C0C,0x7C0E,0x7C0F,0x7C19,0x7C1B,0x7C20, -0x7C25,0x7C26,0x7C28,0x7C2C,0x7C31,0x7C33,0x7C34,0x7C36, -0x7C39,0x7C3A,0x7C46,0x7C4A,0x7C55,0x7C51,0x7C52,0x7C53, -0x7C59,0x7C5A,0x7C5B,0x7C5C,0x7C5D,0x7C5E}; - -/* page 43 0x5321-0x537E */ -static uint16 tab_jisx0212_uni43[]={ -0x7C61,0x7C63,0x7C67,0x7C69,0x7C6D,0x7C6E,0x7C70,0x7C72, -0x7C79,0x7C7C,0x7C7D,0x7C86,0x7C87,0x7C8F,0x7C94,0x7C9E, -0x7CA0,0x7CA6,0x7CB0,0x7CB6,0x7CB7,0x7CBA,0x7CBB,0x7CBC, -0x7CBF,0x7CC4,0x7CC7,0x7CC8,0x7CC9,0x7CCD,0x7CCF,0x7CD3, -0x7CD4,0x7CD5,0x7CD7,0x7CD9,0x7CDA,0x7CDD,0x7CE6,0x7CE9, -0x7CEB,0x7CF5,0x7D03,0x7D07,0x7D08,0x7D09,0x7D0F,0x7D11, -0x7D12,0x7D13,0x7D16,0x7D1D,0x7D1E,0x7D23,0x7D26,0x7D2A, -0x7D2D,0x7D31,0x7D3C,0x7D3D,0x7D3E,0x7D40,0x7D41,0x7D47, -0x7D48,0x7D4D,0x7D51,0x7D53,0x7D57,0x7D59,0x7D5A,0x7D5C, -0x7D5D,0x7D65,0x7D67,0x7D6A,0x7D70,0x7D78,0x7D7A,0x7D7B, -0x7D7F,0x7D81,0x7D82,0x7D83,0x7D85,0x7D86,0x7D88,0x7D8B, -0x7D8C,0x7D8D,0x7D91,0x7D96,0x7D97,0x7D9D}; - -/* page 44 0x5421-0x547E */ -static uint16 tab_jisx0212_uni44[]={ -0x7D9E,0x7DA6,0x7DA7,0x7DAA,0x7DB3,0x7DB6,0x7DB7,0x7DB9, -0x7DC2,0x7DC3,0x7DC4,0x7DC5,0x7DC6,0x7DCC,0x7DCD,0x7DCE, -0x7DD7,0x7DD9,0x7E00,0x7DE2,0x7DE5,0x7DE6,0x7DEA,0x7DEB, -0x7DED,0x7DF1,0x7DF5,0x7DF6,0x7DF9,0x7DFA,0x7E08,0x7E10, -0x7E11,0x7E15,0x7E17,0x7E1C,0x7E1D,0x7E20,0x7E27,0x7E28, -0x7E2C,0x7E2D,0x7E2F,0x7E33,0x7E36,0x7E3F,0x7E44,0x7E45, -0x7E47,0x7E4E,0x7E50,0x7E52,0x7E58,0x7E5F,0x7E61,0x7E62, -0x7E65,0x7E6B,0x7E6E,0x7E6F,0x7E73,0x7E78,0x7E7E,0x7E81, -0x7E86,0x7E87,0x7E8A,0x7E8D,0x7E91,0x7E95,0x7E98,0x7E9A, -0x7E9D,0x7E9E,0x7F3C,0x7F3B,0x7F3D,0x7F3E,0x7F3F,0x7F43, -0x7F44,0x7F47,0x7F4F,0x7F52,0x7F53,0x7F5B,0x7F5C,0x7F5D, -0x7F61,0x7F63,0x7F64,0x7F65,0x7F66,0x7F6D}; - -/* page 45 0x5521-0x557E */ -static uint16 tab_jisx0212_uni45[]={ -0x7F71,0x7F7D,0x7F7E,0x7F7F,0x7F80,0x7F8B,0x7F8D,0x7F8F, -0x7F90,0x7F91,0x7F96,0x7F97,0x7F9C,0x7FA1,0x7FA2,0x7FA6, -0x7FAA,0x7FAD,0x7FB4,0x7FBC,0x7FBF,0x7FC0,0x7FC3,0x7FC8, -0x7FCE,0x7FCF,0x7FDB,0x7FDF,0x7FE3,0x7FE5,0x7FE8,0x7FEC, -0x7FEE,0x7FEF,0x7FF2,0x7FFA,0x7FFD,0x7FFE,0x7FFF,0x8007, -0x8008,0x800A,0x800D,0x800E,0x800F,0x8011,0x8013,0x8014, -0x8016,0x801D,0x801E,0x801F,0x8020,0x8024,0x8026,0x802C, -0x802E,0x8030,0x8034,0x8035,0x8037,0x8039,0x803A,0x803C, -0x803E,0x8040,0x8044,0x8060,0x8064,0x8066,0x806D,0x8071, -0x8075,0x8081,0x8088,0x808E,0x809C,0x809E,0x80A6,0x80A7, -0x80AB,0x80B8,0x80B9,0x80C8,0x80CD,0x80CF,0x80D2,0x80D4, -0x80D5,0x80D7,0x80D8,0x80E0,0x80ED,0x80EE}; - -/* page 46 0x5621-0x567E */ -static uint16 tab_jisx0212_uni46[]={ -0x80F0,0x80F2,0x80F3,0x80F6,0x80F9,0x80FA,0x80FE,0x8103, -0x810B,0x8116,0x8117,0x8118,0x811C,0x811E,0x8120,0x8124, -0x8127,0x812C,0x8130,0x8135,0x813A,0x813C,0x8145,0x8147, -0x814A,0x814C,0x8152,0x8157,0x8160,0x8161,0x8167,0x8168, -0x8169,0x816D,0x816F,0x8177,0x8181,0x8190,0x8184,0x8185, -0x8186,0x818B,0x818E,0x8196,0x8198,0x819B,0x819E,0x81A2, -0x81AE,0x81B2,0x81B4,0x81BB,0x81CB,0x81C3,0x81C5,0x81CA, -0x81CE,0x81CF,0x81D5,0x81D7,0x81DB,0x81DD,0x81DE,0x81E1, -0x81E4,0x81EB,0x81EC,0x81F0,0x81F1,0x81F2,0x81F5,0x81F6, -0x81F8,0x81F9,0x81FD,0x81FF,0x8200,0x8203,0x820F,0x8213, -0x8214,0x8219,0x821A,0x821D,0x8221,0x8222,0x8228,0x8232, -0x8234,0x823A,0x8243,0x8244,0x8245,0x8246}; - -/* page 47 0x5721-0x577E */ -static uint16 tab_jisx0212_uni47[]={ -0x824B,0x824E,0x824F,0x8251,0x8256,0x825C,0x8260,0x8263, -0x8267,0x826D,0x8274,0x827B,0x827D,0x827F,0x8280,0x8281, -0x8283,0x8284,0x8287,0x8289,0x828A,0x828E,0x8291,0x8294, -0x8296,0x8298,0x829A,0x829B,0x82A0,0x82A1,0x82A3,0x82A4, -0x82A7,0x82A8,0x82A9,0x82AA,0x82AE,0x82B0,0x82B2,0x82B4, -0x82B7,0x82BA,0x82BC,0x82BE,0x82BF,0x82C6,0x82D0,0x82D5, -0x82DA,0x82E0,0x82E2,0x82E4,0x82E8,0x82EA,0x82ED,0x82EF, -0x82F6,0x82F7,0x82FD,0x82FE,0x8300,0x8301,0x8307,0x8308, -0x830A,0x830B,0x8354,0x831B,0x831D,0x831E,0x831F,0x8321, -0x8322,0x832C,0x832D,0x832E,0x8330,0x8333,0x8337,0x833A, -0x833C,0x833D,0x8342,0x8343,0x8344,0x8347,0x834D,0x834E, -0x8351,0x8355,0x8356,0x8357,0x8370,0x8378}; - -/* page 48 0x5821-0x587E */ -static uint16 tab_jisx0212_uni48[]={ -0x837D,0x837F,0x8380,0x8382,0x8384,0x8386,0x838D,0x8392, -0x8394,0x8395,0x8398,0x8399,0x839B,0x839C,0x839D,0x83A6, -0x83A7,0x83A9,0x83AC,0x83BE,0x83BF,0x83C0,0x83C7,0x83C9, -0x83CF,0x83D0,0x83D1,0x83D4,0x83DD,0x8353,0x83E8,0x83EA, -0x83F6,0x83F8,0x83F9,0x83FC,0x8401,0x8406,0x840A,0x840F, -0x8411,0x8415,0x8419,0x83AD,0x842F,0x8439,0x8445,0x8447, -0x8448,0x844A,0x844D,0x844F,0x8451,0x8452,0x8456,0x8458, -0x8459,0x845A,0x845C,0x8460,0x8464,0x8465,0x8467,0x846A, -0x8470,0x8473,0x8474,0x8476,0x8478,0x847C,0x847D,0x8481, -0x8485,0x8492,0x8493,0x8495,0x849E,0x84A6,0x84A8,0x84A9, -0x84AA,0x84AF,0x84B1,0x84B4,0x84BA,0x84BD,0x84BE,0x84C0, -0x84C2,0x84C7,0x84C8,0x84CC,0x84CF,0x84D3}; - -/* page 49 0x5921-0x597E */ -static uint16 tab_jisx0212_uni49[]={ -0x84DC,0x84E7,0x84EA,0x84EF,0x84F0,0x84F1,0x84F2,0x84F7, -0x8532,0x84FA,0x84FB,0x84FD,0x8502,0x8503,0x8507,0x850C, -0x850E,0x8510,0x851C,0x851E,0x8522,0x8523,0x8524,0x8525, -0x8527,0x852A,0x852B,0x852F,0x8533,0x8534,0x8536,0x853F, -0x8546,0x854F,0x8550,0x8551,0x8552,0x8553,0x8556,0x8559, -0x855C,0x855D,0x855E,0x855F,0x8560,0x8561,0x8562,0x8564, -0x856B,0x856F,0x8579,0x857A,0x857B,0x857D,0x857F,0x8581, -0x8585,0x8586,0x8589,0x858B,0x858C,0x858F,0x8593,0x8598, -0x859D,0x859F,0x85A0,0x85A2,0x85A5,0x85A7,0x85B4,0x85B6, -0x85B7,0x85B8,0x85BC,0x85BD,0x85BE,0x85BF,0x85C2,0x85C7, -0x85CA,0x85CB,0x85CE,0x85AD,0x85D8,0x85DA,0x85DF,0x85E0, -0x85E6,0x85E8,0x85ED,0x85F3,0x85F6,0x85FC}; - -/* page 50 0x5A21-0x5A7E */ -static uint16 tab_jisx0212_uni50[]={ -0x85FF,0x8600,0x8604,0x8605,0x860D,0x860E,0x8610,0x8611, -0x8612,0x8618,0x8619,0x861B,0x861E,0x8621,0x8627,0x8629, -0x8636,0x8638,0x863A,0x863C,0x863D,0x8640,0x8642,0x8646, -0x8652,0x8653,0x8656,0x8657,0x8658,0x8659,0x865D,0x8660, -0x8661,0x8662,0x8663,0x8664,0x8669,0x866C,0x866F,0x8675, -0x8676,0x8677,0x867A,0x868D,0x8691,0x8696,0x8698,0x869A, -0x869C,0x86A1,0x86A6,0x86A7,0x86A8,0x86AD,0x86B1,0x86B3, -0x86B4,0x86B5,0x86B7,0x86B8,0x86B9,0x86BF,0x86C0,0x86C1, -0x86C3,0x86C5,0x86D1,0x86D2,0x86D5,0x86D7,0x86DA,0x86DC, -0x86E0,0x86E3,0x86E5,0x86E7,0x8688,0x86FA,0x86FC,0x86FD, -0x8704,0x8705,0x8707,0x870B,0x870E,0x870F,0x8710,0x8713, -0x8714,0x8719,0x871E,0x871F,0x8721,0x8723}; - -/* page 51 0x5B21-0x5B7E */ -static uint16 tab_jisx0212_uni51[]={ -0x8728,0x872E,0x872F,0x8731,0x8732,0x8739,0x873A,0x873C, -0x873D,0x873E,0x8740,0x8743,0x8745,0x874D,0x8758,0x875D, -0x8761,0x8764,0x8765,0x876F,0x8771,0x8772,0x877B,0x8783, -0x8784,0x8785,0x8786,0x8787,0x8788,0x8789,0x878B,0x878C, -0x8790,0x8793,0x8795,0x8797,0x8798,0x8799,0x879E,0x87A0, -0x87A3,0x87A7,0x87AC,0x87AD,0x87AE,0x87B1,0x87B5,0x87BE, -0x87BF,0x87C1,0x87C8,0x87C9,0x87CA,0x87CE,0x87D5,0x87D6, -0x87D9,0x87DA,0x87DC,0x87DF,0x87E2,0x87E3,0x87E4,0x87EA, -0x87EB,0x87ED,0x87F1,0x87F3,0x87F8,0x87FA,0x87FF,0x8801, -0x8803,0x8806,0x8809,0x880A,0x880B,0x8810,0x8819,0x8812, -0x8813,0x8814,0x8818,0x881A,0x881B,0x881C,0x881E,0x881F, -0x8828,0x882D,0x882E,0x8830,0x8832,0x8835}; - -/* page 52 0x5C21-0x5C7E */ -static uint16 tab_jisx0212_uni52[]={ -0x883A,0x883C,0x8841,0x8843,0x8845,0x8848,0x8849,0x884A, -0x884B,0x884E,0x8851,0x8855,0x8856,0x8858,0x885A,0x885C, -0x885F,0x8860,0x8864,0x8869,0x8871,0x8879,0x887B,0x8880, -0x8898,0x889A,0x889B,0x889C,0x889F,0x88A0,0x88A8,0x88AA, -0x88BA,0x88BD,0x88BE,0x88C0,0x88CA,0x88CB,0x88CC,0x88CD, -0x88CE,0x88D1,0x88D2,0x88D3,0x88DB,0x88DE,0x88E7,0x88EF, -0x88F0,0x88F1,0x88F5,0x88F7,0x8901,0x8906,0x890D,0x890E, -0x890F,0x8915,0x8916,0x8918,0x8919,0x891A,0x891C,0x8920, -0x8926,0x8927,0x8928,0x8930,0x8931,0x8932,0x8935,0x8939, -0x893A,0x893E,0x8940,0x8942,0x8945,0x8946,0x8949,0x894F, -0x8952,0x8957,0x895A,0x895B,0x895C,0x8961,0x8962,0x8963, -0x896B,0x896E,0x8970,0x8973,0x8975,0x897A}; - -/* page 53 0x5D21-0x5D7E */ -static uint16 tab_jisx0212_uni53[]={ -0x897B,0x897C,0x897D,0x8989,0x898D,0x8990,0x8994,0x8995, -0x899B,0x899C,0x899F,0x89A0,0x89A5,0x89B0,0x89B4,0x89B5, -0x89B6,0x89B7,0x89BC,0x89D4,0x89D5,0x89D6,0x89D7,0x89D8, -0x89E5,0x89E9,0x89EB,0x89ED,0x89F1,0x89F3,0x89F6,0x89F9, -0x89FD,0x89FF,0x8A04,0x8A05,0x8A07,0x8A0F,0x8A11,0x8A12, -0x8A14,0x8A15,0x8A1E,0x8A20,0x8A22,0x8A24,0x8A26,0x8A2B, -0x8A2C,0x8A2F,0x8A35,0x8A37,0x8A3D,0x8A3E,0x8A40,0x8A43, -0x8A45,0x8A47,0x8A49,0x8A4D,0x8A4E,0x8A53,0x8A56,0x8A57, -0x8A58,0x8A5C,0x8A5D,0x8A61,0x8A65,0x8A67,0x8A75,0x8A76, -0x8A77,0x8A79,0x8A7A,0x8A7B,0x8A7E,0x8A7F,0x8A80,0x8A83, -0x8A86,0x8A8B,0x8A8F,0x8A90,0x8A92,0x8A96,0x8A97,0x8A99, -0x8A9F,0x8AA7,0x8AA9,0x8AAE,0x8AAF,0x8AB3}; - -/* page 54 0x5E21-0x5E7E */ -static uint16 tab_jisx0212_uni54[]={ -0x8AB6,0x8AB7,0x8ABB,0x8ABE,0x8AC3,0x8AC6,0x8AC8,0x8AC9, -0x8ACA,0x8AD1,0x8AD3,0x8AD4,0x8AD5,0x8AD7,0x8ADD,0x8ADF, -0x8AEC,0x8AF0,0x8AF4,0x8AF5,0x8AF6,0x8AFC,0x8AFF,0x8B05, -0x8B06,0x8B0B,0x8B11,0x8B1C,0x8B1E,0x8B1F,0x8B0A,0x8B2D, -0x8B30,0x8B37,0x8B3C,0x8B42,0x8B43,0x8B44,0x8B45,0x8B46, -0x8B48,0x8B52,0x8B53,0x8B54,0x8B59,0x8B4D,0x8B5E,0x8B63, -0x8B6D,0x8B76,0x8B78,0x8B79,0x8B7C,0x8B7E,0x8B81,0x8B84, -0x8B85,0x8B8B,0x8B8D,0x8B8F,0x8B94,0x8B95,0x8B9C,0x8B9E, -0x8B9F,0x8C38,0x8C39,0x8C3D,0x8C3E,0x8C45,0x8C47,0x8C49, -0x8C4B,0x8C4F,0x8C51,0x8C53,0x8C54,0x8C57,0x8C58,0x8C5B, -0x8C5D,0x8C59,0x8C63,0x8C64,0x8C66,0x8C68,0x8C69,0x8C6D, -0x8C73,0x8C75,0x8C76,0x8C7B,0x8C7E,0x8C86}; - -/* page 55 0x5F21-0x5F7E */ -static uint16 tab_jisx0212_uni55[]={ -0x8C87,0x8C8B,0x8C90,0x8C92,0x8C93,0x8C99,0x8C9B,0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ED1,0x8ED4,0x8EDC,0x8EE8,0x8EEE,0x8EF0,0x8EF1, -0x8EF7,0x8EF9,0x8EFA,0x8EED,0x8F00,0x8F02,0x8F07,0x8F08, -0x8F0F,0x8F10,0x8F16,0x8F17,0x8F18,0x8F1E,0x8F20,0x8F21, -0x8F23,0x8F25,0x8F27,0x8F28,0x8F2C,0x8F2D,0x8F2E,0x8F34, -0x8F35,0x8F36,0x8F37,0x8F3A,0x8F40,0x8F41}; - -/* page 57 0x6121-0x617E */ -static uint16 tab_jisx0212_uni57[]={ -0x8F43,0x8F47,0x8F4F,0x8F51,0x8F52,0x8F53,0x8F54,0x8F55, -0x8F58,0x8F5D,0x8F5E,0x8F65,0x8F9D,0x8FA0,0x8FA1,0x8FA4, -0x8FA5,0x8FA6,0x8FB5,0x8FB6,0x8FB8,0x8FBE,0x8FC0,0x8FC1, -0x8FC6,0x8FCA,0x8FCB,0x8FCD,0x8FD0,0x8FD2,0x8FD3,0x8FD5, -0x8FE0,0x8FE3,0x8FE4,0x8FE8,0x8FEE,0x8FF1,0x8FF5,0x8FF6, -0x8FFB,0x8FFE,0x9002,0x9004,0x9008,0x900C,0x9018,0x901B, -0x9028,0x9029,0x902F,0x902A,0x902C,0x902D,0x9033,0x9034, -0x9037,0x903F,0x9043,0x9044,0x904C,0x905B,0x905D,0x9062, -0x9066,0x9067,0x906C,0x9070,0x9074,0x9079,0x9085,0x9088, -0x908B,0x908C,0x908E,0x9090,0x9095,0x9097,0x9098,0x9099, -0x909B,0x90A0,0x90A1,0x90A2,0x90A5,0x90B0,0x90B2,0x90B3, -0x90B4,0x90B6,0x90BD,0x90CC,0x90BE,0x90C3}; - -/* page 58 0x6221-0x627E */ -static uint16 tab_jisx0212_uni58[]={ -0x90C4,0x90C5,0x90C7,0x90C8,0x90D5,0x90D7,0x90D8,0x90D9, -0x90DC,0x90DD,0x90DF,0x90E5,0x90D2,0x90F6,0x90EB,0x90EF, -0x90F0,0x90F4,0x90FE,0x90FF,0x9100,0x9104,0x9105,0x9106, -0x9108,0x910D,0x9110,0x9114,0x9116,0x9117,0x9118,0x911A, -0x911C,0x911E,0x9120,0x9125,0x9122,0x9123,0x9127,0x9129, -0x912E,0x912F,0x9131,0x9134,0x9136,0x9137,0x9139,0x913A, -0x913C,0x913D,0x9143,0x9147,0x9148,0x914F,0x9153,0x9157, -0x9159,0x915A,0x915B,0x9161,0x9164,0x9167,0x916D,0x9174, -0x9179,0x917A,0x917B,0x9181,0x9183,0x9185,0x9186,0x918A, -0x918E,0x9191,0x9193,0x9194,0x9195,0x9198,0x919E,0x91A1, -0x91A6,0x91A8,0x91AC,0x91AD,0x91AE,0x91B0,0x91B1,0x91B2, -0x91B3,0x91B6,0x91BB,0x91BC,0x91BD,0x91BF}; - -/* page 59 0x6321-0x637E */ -static uint16 tab_jisx0212_uni59[]={ -0x91C2,0x91C3,0x91C5,0x91D3,0x91D4,0x91D7,0x91D9,0x91DA, -0x91DE,0x91E4,0x91E5,0x91E9,0x91EA,0x91EC,0x91ED,0x91EE, -0x91EF,0x91F0,0x91F1,0x91F7,0x91F9,0x91FB,0x91FD,0x9200, -0x9201,0x9204,0x9205,0x9206,0x9207,0x9209,0x920A,0x920C, -0x9210,0x9212,0x9213,0x9216,0x9218,0x921C,0x921D,0x9223, -0x9224,0x9225,0x9226,0x9228,0x922E,0x922F,0x9230,0x9233, -0x9235,0x9236,0x9238,0x9239,0x923A,0x923C,0x923E,0x9240, -0x9242,0x9243,0x9246,0x9247,0x924A,0x924D,0x924E,0x924F, -0x9251,0x9258,0x9259,0x925C,0x925D,0x9260,0x9261,0x9265, -0x9267,0x9268,0x9269,0x926E,0x926F,0x9270,0x9275,0x9276, -0x9277,0x9278,0x9279,0x927B,0x927C,0x927D,0x927F,0x9288, -0x9289,0x928A,0x928D,0x928E,0x9292,0x9297}; - -/* page 60 0x6421-0x647E */ -static uint16 tab_jisx0212_uni60[]={ -0x9299,0x929F,0x92A0,0x92A4,0x92A5,0x92A7,0x92A8,0x92AB, -0x92AF,0x92B2,0x92B6,0x92B8,0x92BA,0x92BB,0x92BC,0x92BD, -0x92BF,0x92C0,0x92C1,0x92C2,0x92C3,0x92C5,0x92C6,0x92C7, -0x92C8,0x92CB,0x92CC,0x92CD,0x92CE,0x92D0,0x92D3,0x92D5, -0x92D7,0x92D8,0x92D9,0x92DC,0x92DD,0x92DF,0x92E0,0x92E1, -0x92E3,0x92E5,0x92E7,0x92E8,0x92EC,0x92EE,0x92F0,0x92F9, -0x92FB,0x92FF,0x9300,0x9302,0x9308,0x930D,0x9311,0x9314, -0x9315,0x931C,0x931D,0x931E,0x931F,0x9321,0x9324,0x9325, -0x9327,0x9329,0x932A,0x9333,0x9334,0x9336,0x9337,0x9347, -0x9348,0x9349,0x9350,0x9351,0x9352,0x9355,0x9357,0x9358, -0x935A,0x935E,0x9364,0x9365,0x9367,0x9369,0x936A,0x936D, -0x936F,0x9370,0x9371,0x9373,0x9374,0x9376}; - -/* page 61 0x6521-0x657E */ -static uint16 tab_jisx0212_uni61[]={ -0x937A,0x937D,0x937F,0x9380,0x9381,0x9382,0x9388,0x938A, -0x938B,0x938D,0x938F,0x9392,0x9395,0x9398,0x939B,0x939E, -0x93A1,0x93A3,0x93A4,0x93A6,0x93A8,0x93AB,0x93B4,0x93B5, -0x93B6,0x93BA,0x93A9,0x93C1,0x93C4,0x93C5,0x93C6,0x93C7, -0x93C9,0x93CA,0x93CB,0x93CC,0x93CD,0x93D3,0x93D9,0x93DC, -0x93DE,0x93DF,0x93E2,0x93E6,0x93E7,0x93F9,0x93F7,0x93F8, -0x93FA,0x93FB,0x93FD,0x9401,0x9402,0x9404,0x9408,0x9409, -0x940D,0x940E,0x940F,0x9415,0x9416,0x9417,0x941F,0x942E, -0x942F,0x9431,0x9432,0x9433,0x9434,0x943B,0x943F,0x943D, -0x9443,0x9445,0x9448,0x944A,0x944C,0x9455,0x9459,0x945C, -0x945F,0x9461,0x9463,0x9468,0x946B,0x946D,0x946E,0x946F, -0x9471,0x9472,0x9484,0x9483,0x9578,0x9579}; - -/* page 62 0x6621-0x667E */ -static uint16 tab_jisx0212_uni62[]={ -0x957E,0x9584,0x9588,0x958C,0x958D,0x958E,0x959D,0x959E, -0x959F,0x95A1,0x95A6,0x95A9,0x95AB,0x95AC,0x95B4,0x95B6, -0x95BA,0x95BD,0x95BF,0x95C6,0x95C8,0x95C9,0x95CB,0x95D0, -0x95D1,0x95D2,0x95D3,0x95D9,0x95DA,0x95DD,0x95DE,0x95DF, -0x95E0,0x95E4,0x95E6,0x961D,0x961E,0x9622,0x9624,0x9625, -0x9626,0x962C,0x9631,0x9633,0x9637,0x9638,0x9639,0x963A, -0x963C,0x963D,0x9641,0x9652,0x9654,0x9656,0x9657,0x9658, -0x9661,0x966E,0x9674,0x967B,0x967C,0x967E,0x967F,0x9681, -0x9682,0x9683,0x9684,0x9689,0x9691,0x9696,0x969A,0x969D, -0x969F,0x96A4,0x96A5,0x96A6,0x96A9,0x96AE,0x96AF,0x96B3, -0x96BA,0x96CA,0x96D2,0x5DB2,0x96D8,0x96DA,0x96DD,0x96DE, -0x96DF,0x96E9,0x96EF,0x96F1,0x96FA,0x9702}; - -/* page 63 0x6721-0x677E */ -static uint16 tab_jisx0212_uni63[]={ -0x9703,0x9705,0x9709,0x971A,0x971B,0x971D,0x9721,0x9722, -0x9723,0x9728,0x9731,0x9733,0x9741,0x9743,0x974A,0x974E, -0x974F,0x9755,0x9757,0x9758,0x975A,0x975B,0x9763,0x9767, -0x976A,0x976E,0x9773,0x9776,0x9777,0x9778,0x977B,0x977D, -0x977F,0x9780,0x9789,0x9795,0x9796,0x9797,0x9799,0x979A, -0x979E,0x979F,0x97A2,0x97AC,0x97AE,0x97B1,0x97B2,0x97B5, -0x97B6,0x97B8,0x97B9,0x97BA,0x97BC,0x97BE,0x97BF,0x97C1, -0x97C4,0x97C5,0x97C7,0x97C9,0x97CA,0x97CC,0x97CD,0x97CE, -0x97D0,0x97D1,0x97D4,0x97D7,0x97D8,0x97D9,0x97DD,0x97DE, -0x97E0,0x97DB,0x97E1,0x97E4,0x97EF,0x97F1,0x97F4,0x97F7, -0x97F8,0x97FA,0x9807,0x980A,0x9819,0x980D,0x980E,0x9814, -0x9816,0x981C,0x981E,0x9820,0x9823,0x9826}; - -/* page 64 0x6821-0x687E */ -static uint16 tab_jisx0212_uni64[]={ -0x982B,0x982E,0x982F,0x9830,0x9832,0x9833,0x9835,0x9825, -0x983E,0x9844,0x9847,0x984A,0x9851,0x9852,0x9853,0x9856, -0x9857,0x9859,0x985A,0x9862,0x9863,0x9865,0x9866,0x986A, -0x986C,0x98AB,0x98AD,0x98AE,0x98B0,0x98B4,0x98B7,0x98B8, -0x98BA,0x98BB,0x98BF,0x98C2,0x98C5,0x98C8,0x98CC,0x98E1, -0x98E3,0x98E5,0x98E6,0x98E7,0x98EA,0x98F3,0x98F6,0x9902, -0x9907,0x9908,0x9911,0x9915,0x9916,0x9917,0x991A,0x991B, -0x991C,0x991F,0x9922,0x9926,0x9927,0x992B,0x9931,0x9932, -0x9933,0x9934,0x9935,0x9939,0x993A,0x993B,0x993C,0x9940, -0x9941,0x9946,0x9947,0x9948,0x994D,0x994E,0x9954,0x9958, -0x9959,0x995B,0x995C,0x995E,0x995F,0x9960,0x999B,0x999D, -0x999F,0x99A6,0x99B0,0x99B1,0x99B2,0x99B5}; - -/* page 65 0x6921-0x697E */ -static uint16 tab_jisx0212_uni65[]={ -0x99B9,0x99BA,0x99BD,0x99BF,0x99C3,0x99C9,0x99D3,0x99D4, -0x99D9,0x99DA,0x99DC,0x99DE,0x99E7,0x99EA,0x99EB,0x99EC, -0x99F0,0x99F4,0x99F5,0x99F9,0x99FD,0x99FE,0x9A02,0x9A03, -0x9A04,0x9A0B,0x9A0C,0x9A10,0x9A11,0x9A16,0x9A1E,0x9A20, -0x9A22,0x9A23,0x9A24,0x9A27,0x9A2D,0x9A2E,0x9A33,0x9A35, -0x9A36,0x9A38,0x9A47,0x9A41,0x9A44,0x9A4A,0x9A4B,0x9A4C, -0x9A4E,0x9A51,0x9A54,0x9A56,0x9A5D,0x9AAA,0x9AAC,0x9AAE, -0x9AAF,0x9AB2,0x9AB4,0x9AB5,0x9AB6,0x9AB9,0x9ABB,0x9ABE, -0x9ABF,0x9AC1,0x9AC3,0x9AC6,0x9AC8,0x9ACE,0x9AD0,0x9AD2, -0x9AD5,0x9AD6,0x9AD7,0x9ADB,0x9ADC,0x9AE0,0x9AE4,0x9AE5, -0x9AE7,0x9AE9,0x9AEC,0x9AF2,0x9AF3,0x9AF5,0x9AF9,0x9AFA, -0x9AFD,0x9AFF,0x9B00,0x9B01,0x9B02,0x9B03}; - -/* page 66 0x6A21-0x6A7E */ -static uint16 tab_jisx0212_uni66[]={ -0x9B04,0x9B05,0x9B08,0x9B09,0x9B0B,0x9B0C,0x9B0D,0x9B0E, -0x9B10,0x9B12,0x9B16,0x9B19,0x9B1B,0x9B1C,0x9B20,0x9B26, -0x9B2B,0x9B2D,0x9B33,0x9B34,0x9B35,0x9B37,0x9B39,0x9B3A, -0x9B3D,0x9B48,0x9B4B,0x9B4C,0x9B55,0x9B56,0x9B57,0x9B5B, -0x9B5E,0x9B61,0x9B63,0x9B65,0x9B66,0x9B68,0x9B6A,0x9B6B, -0x9B6C,0x9B6D,0x9B6E,0x9B73,0x9B75,0x9B77,0x9B78,0x9B79, -0x9B7F,0x9B80,0x9B84,0x9B85,0x9B86,0x9B87,0x9B89,0x9B8A, -0x9B8B,0x9B8D,0x9B8F,0x9B90,0x9B94,0x9B9A,0x9B9D,0x9B9E, -0x9BA6,0x9BA7,0x9BA9,0x9BAC,0x9BB0,0x9BB1,0x9BB2,0x9BB7, -0x9BB8,0x9BBB,0x9BBC,0x9BBE,0x9BBF,0x9BC1,0x9BC7,0x9BC8, -0x9BCE,0x9BD0,0x9BD7,0x9BD8,0x9BDD,0x9BDF,0x9BE5,0x9BE7, -0x9BEA,0x9BEB,0x9BEF,0x9BF3,0x9BF7,0x9BF8}; - -/* page 67 0x6B21-0x6B7E */ -static uint16 tab_jisx0212_uni67[]={ -0x9BF9,0x9BFA,0x9BFD,0x9BFF,0x9C00,0x9C02,0x9C0B,0x9C0F, -0x9C11,0x9C16,0x9C18,0x9C19,0x9C1A,0x9C1C,0x9C1E,0x9C22, -0x9C23,0x9C26,0x9C27,0x9C28,0x9C29,0x9C2A,0x9C31,0x9C35, -0x9C36,0x9C37,0x9C3D,0x9C41,0x9C43,0x9C44,0x9C45,0x9C49, -0x9C4A,0x9C4E,0x9C4F,0x9C50,0x9C53,0x9C54,0x9C56,0x9C58, -0x9C5B,0x9C5D,0x9C5E,0x9C5F,0x9C63,0x9C69,0x9C6A,0x9C5C, -0x9C6B,0x9C68,0x9C6E,0x9C70,0x9C72,0x9C75,0x9C77,0x9C7B, -0x9CE6,0x9CF2,0x9CF7,0x9CF9,0x9D0B,0x9D02,0x9D11,0x9D17, -0x9D18,0x9D1C,0x9D1D,0x9D1E,0x9D2F,0x9D30,0x9D32,0x9D33, -0x9D34,0x9D3A,0x9D3C,0x9D45,0x9D3D,0x9D42,0x9D43,0x9D47, -0x9D4A,0x9D53,0x9D54,0x9D5F,0x9D63,0x9D62,0x9D65,0x9D69, -0x9D6A,0x9D6B,0x9D70,0x9D76,0x9D77,0x9D7B}; - -/* page 68 0x6C21-0x6C7E */ -static uint16 tab_jisx0212_uni68[]={ -0x9D7C,0x9D7E,0x9D83,0x9D84,0x9D86,0x9D8A,0x9D8D,0x9D8E, -0x9D92,0x9D93,0x9D95,0x9D96,0x9D97,0x9D98,0x9DA1,0x9DAA, -0x9DAC,0x9DAE,0x9DB1,0x9DB5,0x9DB9,0x9DBC,0x9DBF,0x9DC3, -0x9DC7,0x9DC9,0x9DCA,0x9DD4,0x9DD5,0x9DD6,0x9DD7,0x9DDA, -0x9DDE,0x9DDF,0x9DE0,0x9DE5,0x9DE7,0x9DE9,0x9DEB,0x9DEE, -0x9DF0,0x9DF3,0x9DF4,0x9DFE,0x9E0A,0x9E02,0x9E07,0x9E0E, -0x9E10,0x9E11,0x9E12,0x9E15,0x9E16,0x9E19,0x9E1C,0x9E1D, -0x9E7A,0x9E7B,0x9E7C,0x9E80,0x9E82,0x9E83,0x9E84,0x9E85, -0x9E87,0x9E8E,0x9E8F,0x9E96,0x9E98,0x9E9B,0x9E9E,0x9EA4, -0x9EA8,0x9EAC,0x9EAE,0x9EAF,0x9EB0,0x9EB3,0x9EB4,0x9EB5, -0x9EC6,0x9EC8,0x9ECB,0x9ED5,0x9EDF,0x9EE4,0x9EE7,0x9EEC, -0x9EED,0x9EEE,0x9EF0,0x9EF1,0x9EF2,0x9EF5}; - -/* page 69 0x6D21-0x6D63 */ -static uint16 tab_jisx0212_uni69[]={ -0x9EF8,0x9EFF,0x9F02,0x9F03,0x9F09,0x9F0F,0x9F10,0x9F11, -0x9F12,0x9F14,0x9F16,0x9F17,0x9F19,0x9F1A,0x9F1B,0x9F1F, -0x9F22,0x9F26,0x9F2A,0x9F2B,0x9F2F,0x9F31,0x9F32,0x9F34, -0x9F37,0x9F39,0x9F3A,0x9F3C,0x9F3D,0x9F3F,0x9F41,0x9F43, -0x9F44,0x9F45,0x9F46,0x9F47,0x9F53,0x9F55,0x9F56,0x9F57, -0x9F58,0x9F5A,0x9F5D,0x9F5E,0x9F68,0x9F69,0x9F6D,0x9F6E, -0x9F6F,0x9F70,0x9F71,0x9F73,0x9F75,0x9F7A,0x9F7D,0x9F8F, -0x9F90,0x9F91,0x9F92,0x9F94,0x9F96,0x9F97,0x9F9E,0x9FA1, -0x9FA2,0x9FA3,0x9FA5}; - -static int -my_jisx0212_uni_onechar(int code){ - if ((code>=0x222F)&&(code<=0x2244)) - return(tab_jisx0212_uni0[code-0x222F]); - if ((code>=0x226B)&&(code<=0x2271)) - return(tab_jisx0212_uni1[code-0x226B]); - if ((code>=0x2661)&&(code<=0x267C)) - return(tab_jisx0212_uni2[code-0x2661]); - if ((code>=0x2742)&&(code<=0x274E)) - return(tab_jisx0212_uni3[code-0x2742]); - if ((code>=0x2772)&&(code<=0x277E)) - return(tab_jisx0212_uni4[code-0x2772]); - if ((code>=0x2921)&&(code<=0x2950)) - return(tab_jisx0212_uni5[code-0x2921]); - if ((code>=0x2A21)&&(code<=0x2A77)) - return(tab_jisx0212_uni6[code-0x2A21]); - if ((code>=0x2B21)&&(code<=0x2B77)) - return(tab_jisx0212_uni7[code-0x2B21]); - if ((code>=0x3021)&&(code<=0x307E)) - return(tab_jisx0212_uni8[code-0x3021]); - if ((code>=0x3121)&&(code<=0x317E)) - return(tab_jisx0212_uni9[code-0x3121]); - if ((code>=0x3221)&&(code<=0x327E)) - return(tab_jisx0212_uni10[code-0x3221]); - if ((code>=0x3321)&&(code<=0x337E)) - return(tab_jisx0212_uni11[code-0x3321]); - if ((code>=0x3421)&&(code<=0x347E)) - return(tab_jisx0212_uni12[code-0x3421]); - if ((code>=0x3521)&&(code<=0x357E)) - return(tab_jisx0212_uni13[code-0x3521]); - if ((code>=0x3621)&&(code<=0x367E)) - return(tab_jisx0212_uni14[code-0x3621]); - if ((code>=0x3721)&&(code<=0x377E)) - return(tab_jisx0212_uni15[code-0x3721]); - if ((code>=0x3821)&&(code<=0x387E)) - return(tab_jisx0212_uni16[code-0x3821]); - if ((code>=0x3921)&&(code<=0x397E)) - return(tab_jisx0212_uni17[code-0x3921]); - if ((code>=0x3A21)&&(code<=0x3A7E)) - return(tab_jisx0212_uni18[code-0x3A21]); - if ((code>=0x3B21)&&(code<=0x3B7E)) - return(tab_jisx0212_uni19[code-0x3B21]); - if ((code>=0x3C21)&&(code<=0x3C7E)) - return(tab_jisx0212_uni20[code-0x3C21]); - if ((code>=0x3D21)&&(code<=0x3D7E)) - return(tab_jisx0212_uni21[code-0x3D21]); - if ((code>=0x3E21)&&(code<=0x3E7E)) - return(tab_jisx0212_uni22[code-0x3E21]); - if ((code>=0x3F21)&&(code<=0x3F7E)) - return(tab_jisx0212_uni23[code-0x3F21]); - if ((code>=0x4021)&&(code<=0x407E)) - return(tab_jisx0212_uni24[code-0x4021]); - if ((code>=0x4121)&&(code<=0x417E)) - return(tab_jisx0212_uni25[code-0x4121]); - if ((code>=0x4221)&&(code<=0x427E)) - return(tab_jisx0212_uni26[code-0x4221]); - if ((code>=0x4321)&&(code<=0x437E)) - return(tab_jisx0212_uni27[code-0x4321]); - if ((code>=0x4421)&&(code<=0x447E)) - return(tab_jisx0212_uni28[code-0x4421]); - if ((code>=0x4521)&&(code<=0x457E)) - return(tab_jisx0212_uni29[code-0x4521]); - if ((code>=0x4621)&&(code<=0x467E)) - return(tab_jisx0212_uni30[code-0x4621]); - if ((code>=0x4721)&&(code<=0x477E)) - return(tab_jisx0212_uni31[code-0x4721]); - if ((code>=0x4821)&&(code<=0x487E)) - return(tab_jisx0212_uni32[code-0x4821]); - if ((code>=0x4921)&&(code<=0x497E)) - return(tab_jisx0212_uni33[code-0x4921]); - if ((code>=0x4A21)&&(code<=0x4A7E)) - return(tab_jisx0212_uni34[code-0x4A21]); - if ((code>=0x4B21)&&(code<=0x4B7E)) - return(tab_jisx0212_uni35[code-0x4B21]); - if ((code>=0x4C21)&&(code<=0x4C7E)) - return(tab_jisx0212_uni36[code-0x4C21]); - if ((code>=0x4D21)&&(code<=0x4D7E)) - return(tab_jisx0212_uni37[code-0x4D21]); - if ((code>=0x4E21)&&(code<=0x4E7E)) - return(tab_jisx0212_uni38[code-0x4E21]); - if ((code>=0x4F21)&&(code<=0x4F7E)) - return(tab_jisx0212_uni39[code-0x4F21]); - if ((code>=0x5021)&&(code<=0x507E)) - return(tab_jisx0212_uni40[code-0x5021]); - if ((code>=0x5121)&&(code<=0x517E)) - return(tab_jisx0212_uni41[code-0x5121]); - if ((code>=0x5221)&&(code<=0x527E)) - return(tab_jisx0212_uni42[code-0x5221]); - if ((code>=0x5321)&&(code<=0x537E)) - return(tab_jisx0212_uni43[code-0x5321]); - if ((code>=0x5421)&&(code<=0x547E)) - return(tab_jisx0212_uni44[code-0x5421]); - if ((code>=0x5521)&&(code<=0x557E)) - return(tab_jisx0212_uni45[code-0x5521]); - if ((code>=0x5621)&&(code<=0x567E)) - return(tab_jisx0212_uni46[code-0x5621]); - if ((code>=0x5721)&&(code<=0x577E)) - return(tab_jisx0212_uni47[code-0x5721]); - if ((code>=0x5821)&&(code<=0x587E)) - return(tab_jisx0212_uni48[code-0x5821]); - if ((code>=0x5921)&&(code<=0x597E)) - return(tab_jisx0212_uni49[code-0x5921]); - if ((code>=0x5A21)&&(code<=0x5A7E)) - return(tab_jisx0212_uni50[code-0x5A21]); - if ((code>=0x5B21)&&(code<=0x5B7E)) - return(tab_jisx0212_uni51[code-0x5B21]); - if ((code>=0x5C21)&&(code<=0x5C7E)) - return(tab_jisx0212_uni52[code-0x5C21]); - if ((code>=0x5D21)&&(code<=0x5D7E)) - return(tab_jisx0212_uni53[code-0x5D21]); - if ((code>=0x5E21)&&(code<=0x5E7E)) - return(tab_jisx0212_uni54[code-0x5E21]); - if ((code>=0x5F21)&&(code<=0x5F7E)) - return(tab_jisx0212_uni55[code-0x5F21]); - if ((code>=0x6021)&&(code<=0x607E)) - return(tab_jisx0212_uni56[code-0x6021]); - if ((code>=0x6121)&&(code<=0x617E)) - return(tab_jisx0212_uni57[code-0x6121]); - if ((code>=0x6221)&&(code<=0x627E)) - return(tab_jisx0212_uni58[code-0x6221]); - if ((code>=0x6321)&&(code<=0x637E)) - return(tab_jisx0212_uni59[code-0x6321]); - if ((code>=0x6421)&&(code<=0x647E)) - return(tab_jisx0212_uni60[code-0x6421]); - if ((code>=0x6521)&&(code<=0x657E)) - return(tab_jisx0212_uni61[code-0x6521]); - if ((code>=0x6621)&&(code<=0x667E)) - return(tab_jisx0212_uni62[code-0x6621]); - if ((code>=0x6721)&&(code<=0x677E)) - return(tab_jisx0212_uni63[code-0x6721]); - if ((code>=0x6821)&&(code<=0x687E)) - return(tab_jisx0212_uni64[code-0x6821]); - if ((code>=0x6921)&&(code<=0x697E)) - return(tab_jisx0212_uni65[code-0x6921]); - if ((code>=0x6A21)&&(code<=0x6A7E)) - return(tab_jisx0212_uni66[code-0x6A21]); - if ((code>=0x6B21)&&(code<=0x6B7E)) - return(tab_jisx0212_uni67[code-0x6B21]); - if ((code>=0x6C21)&&(code<=0x6C7E)) - return(tab_jisx0212_uni68[code-0x6C21]); - if ((code>=0x6D21)&&(code<=0x6D63)) - return(tab_jisx0212_uni69[code-0x6D21]); - return(0); -} - - -/* - EUC-JP encoding subcomponents: - [x00-x7F] # ASCII/JIS-Roman (one-byte/character) - [x8E][xA0-xDF] # half-width katakana (two bytes/char) - [x8F][xA1-xFE][xA1-xFE] # JIS X 0212-1990 (three bytes/char) - [xA1-xFE][xA1-xFE] # JIS X 0208:1997 (two bytes/char) -*/ - -static -size_t my_well_formed_len_ujis(CHARSET_INFO *cs __attribute__((unused)), - const char *beg, const char *end, - size_t pos, int *error) -{ - const uchar *b= (uchar *) beg; - - for ( *error= 0 ; pos && b < (uchar*) end; pos--, b++) - { - char *chbeg; - uint ch= *b; - - if (ch <= 0x7F) /* one byte */ - continue; - - chbeg= (char *) b++; - if (b >= (uchar *) end) /* need more bytes */ - { - *error= 1; - return (size_t) (chbeg - beg); /* unexpected EOL */ - } - - if (ch == 0x8E) /* [x8E][xA0-xDF] */ - { - if (*b >= 0xA0 && *b <= 0xDF) - continue; - *error= 1; - return (size_t) (chbeg - beg); /* invalid sequence */ - } - - if (ch == 0x8F) /* [x8F][xA1-xFE][xA1-xFE] */ - { - ch= *b++; - if (b >= (uchar*) end) - { - *error= 1; - return (size_t) (chbeg - beg); /* unexpected EOL */ - } - } - - if (ch >= 0xA1 && ch <= 0xFE && - *b >= 0xA1 && *b <= 0xFE) /* [xA1-xFE][xA1-xFE] */ - continue; - *error= 1; - return (size_t) (chbeg - beg); /* invalid sequence */ - } - return (size_t) (b - (uchar *) beg); -} - - -static -size_t my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)), - const char *str, const char *str_end) -{ - size_t clen; - const uchar *b= (const uchar *) str; - const uchar *e= (const uchar *) str_end; - - for (clen= 0; b < e; ) - { - if (*b == 0x8E) - { - clen++; - b+= 2; - } - else if (*b == 0x8F) - { - clen+= 2; - b+= 3; - } - else if (*b & 0x80) - { - clen+= 2; - b+= 2; - } - else - { - clen++; - b++; - } - } - return clen; -} - - -static int -my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e) -{ - int c1,c2,c3; - - if (s >= e) - return MY_CS_TOOSMALL; - - c1=s[0]; - - /* Ascii code set */ - if (c1<=0x7F) - { - *pwc=c1; - return 1; - } - - if (s+2>e) - return MY_CS_TOOSMALL2; - - c2=s[1]; - - - /* JIS X 0208 code set */ - if (c1>=0xA1 && c1<=0xFE) - { - if (c2 < 0xA1 || c2 >0xFE) - return MY_CS_ILSEQ; - - if (c1 < 0xF5) - { - pwc[0]=my_jisx0208_uni_onechar( ((c1-0x80) << 8) + (c2-0x80)); - if (!pwc[0]) - return -2; - } - else - { - /* User defined range */ - pwc[0]=0xE000 + 94*(c1-0xF5) +(c2-0xA1); - } - return 2; - } - - /* JIS X 0201 code set (Half Width Tatakana) */ - if (c1==0x8E) - { - int ret; - - if (c2<0xA1 || c2>0xDF) - return MY_CS_ILSEQ; - - ret = my_mb_wc_jisx0201(cs,pwc,s+1,e); - if (ret!=1) - return -2; - return 2; - } - - /* JIS X 0212 code set */ - if (c1==0x8F) - { - if (c2<0xA1 || c2>=0xFF) - return MY_CS_ILSEQ; - - if (s+3>e) - return MY_CS_TOOSMALL3; - - c3=s[2]; - if (c3 < 0xA1 || c3>=0xFF) - return MY_CS_ILSEQ; - - if (c2<0xF5) - { - pwc[0]=my_jisx0212_uni_onechar((c2-0x80)*256 + (c3-0x80)); - if (!pwc[0]) - return -3; - } - else - { - /* User defined range */ - pwc[0]= 0xE3AC + 94*(c2-0xF5) + (c3-0xA1); - } - return 3; - } - - return MY_CS_ILSEQ; -} - - -static int -my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, uchar *s, uchar *e) -{ - uchar c1; - int jp; - - if (s >= e) - return MY_CS_TOOSMALL; - - if ((int) wc < 0x80) - { - *s= (uchar) wc; - return 1; - } - - if ((jp=my_uni_jisx0208_onechar(wc))) - { - if (s+2>e) - return MY_CS_TOOSMALL2; - - jp+=0x8080; - s[0]=jp>>8; - s[1]=jp&0xFF; - return 2; - } - - /* Half width Katakana */ - if (my_wc_mb_jisx0201(c,wc,s,e) == 1) - { - if (s+2>e) - return MY_CS_TOOSMALL2; - s[1]= s[0]; - s[0]= 0x8E; - return 2; - } - - - if ((jp=my_uni_jisx0212_onechar(wc))) - { - if (s+3>e) - return MY_CS_TOOSMALL3; - - jp+=0x8080; - s[0]=0x8F; - s[1]=jp>>8; - s[2]=jp&0xFF; - return 3; - } - - - /* User defined range */ - if (wc>=0xE000 && wc<0xE3AC) - { - if (s+2>e) - return MY_CS_TOOSMALL2; - - c1=((unsigned)(wc-0xE000)/94)+0xF5; - s[0]=c1; - c1=((unsigned)(wc-0xE000)%94)+0xa1; - s[1]=c1; - return 2; - } - - - /* User defined range */ - if (wc>=0xE3AC && wc<0xE758) - { - if (s+3>e) - return MY_CS_TOOSMALL3; - - s[0]=0x8F; - c1=((unsigned)(wc-0xE3AC)/94)+0xF5; - s[1]=c1; - c1=((unsigned)(wc-0xE3AC)%94)+0xa1; - s[2]=c1; - return 3; - } - - return MY_CS_ILUNI; -} - - -static MY_COLLATION_HANDLER my_collation_ci_handler = -{ - NULL, /* init */ - my_strnncoll_simple,/* strnncoll */ - my_strnncollsp_simple, - my_strnxfrm_mb, /* strnxfrm */ - my_strnxfrmlen_simple, - my_like_range_mb, /* like_range */ - my_wildcmp_mb, /* wildcmp */ - my_strcasecmp_mb, - my_instr_mb, - my_hash_sort_simple, - my_propagate_simple -}; - - -static MY_CHARSET_HANDLER my_charset_handler= -{ - NULL, /* init */ - ismbchar_ujis, - mbcharlen_ujis, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_ujis, - my_lengthsp_8bit, - my_numcells_eucjp, - my_mb_wc_euc_jp, /* mb_wc */ - my_wc_mb_euc_jp, /* wc_mb */ - my_mb_ctype_mb, - my_caseup_str_mb, - my_casedn_str_mb, - my_caseup_mb, - my_casedn_mb, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - - -CHARSET_INFO my_charset_ujis_japanese_ci= -{ - 12,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY, /* state */ - "ujis", /* cs name */ - "ujis_japanese_ci", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_ujis, - to_lower_ujis, - to_upper_ujis, - sort_order_ujis, - NULL, /* sort_order_big*/ - NULL, /* contractions */ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_ci_handler -}; - - -CHARSET_INFO my_charset_ujis_bin= -{ - 91,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT, /* state */ - "ujis", /* cs name */ - "ujis_bin", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_ujis, - to_lower_ujis, - to_upper_ujis, - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_handler, - &my_collation_mb_bin_handler -}; - - -#endif diff --git a/externals/mysql/strings/ctype-utf8.c b/externals/mysql/strings/ctype-utf8.c deleted file mode 100644 index f412d4ee4d..0000000000 --- a/externals/mysql/strings/ctype-utf8.c +++ /dev/null @@ -1,5308 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* UTF8 according RFC 2279 */ -/* Written by Alexander Barkov */ - -#include -#include "m_string.h" -#include "m_ctype.h" -#include - -#ifndef EILSEQ -#define EILSEQ ENOENT -#endif - - -#define MY_UTF8MB3_GENERAL_CI MY_UTF8MB3 "_general_ci" -#define MY_UTF8MB3_GENERAL_CS MY_UTF8MB3 "_general_cs" -#define MY_UTF8MB3_BIN MY_UTF8MB3 "_bin" -#define MY_UTF8MB4_GENERAL_CI MY_UTF8MB4 "_general_ci" -#define MY_UTF8MB4_GENERAL_CS MY_UTF8MB4 "_general_cs" -#define MY_UTF8MB4_BIN MY_UTF8MB4 "_bin" - - -#ifdef HAVE_CHARSET_utf8mb3 -#define HAVE_UNIDATA -#endif - -#ifdef HAVE_CHARSET_ucs2 -#define HAVE_UNIDATA -#endif - -#ifdef HAVE_CHARSET_utf8mb4 -#define HAVE_UNIDATA -#endif - -#ifdef HAVE_CHARSET_utf16 -#define HAVE_UNIDATA -#endif - -#ifdef HAVE_CHARSET_utf32 -#define HAVE_UNIDATA -#endif - -#ifdef HAVE_UNIDATA - -#include "my_uctype.h" - -static MY_UNICASE_INFO plane00[]={ - {0x0000,0x0000,0x0000}, {0x0001,0x0001,0x0001}, - {0x0002,0x0002,0x0002}, {0x0003,0x0003,0x0003}, - {0x0004,0x0004,0x0004}, {0x0005,0x0005,0x0005}, - {0x0006,0x0006,0x0006}, {0x0007,0x0007,0x0007}, - {0x0008,0x0008,0x0008}, {0x0009,0x0009,0x0009}, - {0x000A,0x000A,0x000A}, {0x000B,0x000B,0x000B}, - {0x000C,0x000C,0x000C}, {0x000D,0x000D,0x000D}, - {0x000E,0x000E,0x000E}, {0x000F,0x000F,0x000F}, - {0x0010,0x0010,0x0010}, {0x0011,0x0011,0x0011}, - {0x0012,0x0012,0x0012}, {0x0013,0x0013,0x0013}, - {0x0014,0x0014,0x0014}, {0x0015,0x0015,0x0015}, - {0x0016,0x0016,0x0016}, {0x0017,0x0017,0x0017}, - {0x0018,0x0018,0x0018}, {0x0019,0x0019,0x0019}, - {0x001A,0x001A,0x001A}, {0x001B,0x001B,0x001B}, - {0x001C,0x001C,0x001C}, {0x001D,0x001D,0x001D}, - {0x001E,0x001E,0x001E}, {0x001F,0x001F,0x001F}, - {0x0020,0x0020,0x0020}, {0x0021,0x0021,0x0021}, - {0x0022,0x0022,0x0022}, {0x0023,0x0023,0x0023}, - {0x0024,0x0024,0x0024}, {0x0025,0x0025,0x0025}, - {0x0026,0x0026,0x0026}, {0x0027,0x0027,0x0027}, - {0x0028,0x0028,0x0028}, {0x0029,0x0029,0x0029}, - {0x002A,0x002A,0x002A}, {0x002B,0x002B,0x002B}, - {0x002C,0x002C,0x002C}, {0x002D,0x002D,0x002D}, - {0x002E,0x002E,0x002E}, {0x002F,0x002F,0x002F}, - {0x0030,0x0030,0x0030}, {0x0031,0x0031,0x0031}, - {0x0032,0x0032,0x0032}, {0x0033,0x0033,0x0033}, - {0x0034,0x0034,0x0034}, {0x0035,0x0035,0x0035}, - {0x0036,0x0036,0x0036}, {0x0037,0x0037,0x0037}, - {0x0038,0x0038,0x0038}, {0x0039,0x0039,0x0039}, - {0x003A,0x003A,0x003A}, {0x003B,0x003B,0x003B}, - {0x003C,0x003C,0x003C}, {0x003D,0x003D,0x003D}, - {0x003E,0x003E,0x003E}, {0x003F,0x003F,0x003F}, - {0x0040,0x0040,0x0040}, {0x0041,0x0061,0x0041}, - {0x0042,0x0062,0x0042}, {0x0043,0x0063,0x0043}, - {0x0044,0x0064,0x0044}, {0x0045,0x0065,0x0045}, - {0x0046,0x0066,0x0046}, {0x0047,0x0067,0x0047}, - {0x0048,0x0068,0x0048}, {0x0049,0x0069,0x0049}, - {0x004A,0x006A,0x004A}, {0x004B,0x006B,0x004B}, - {0x004C,0x006C,0x004C}, {0x004D,0x006D,0x004D}, - {0x004E,0x006E,0x004E}, {0x004F,0x006F,0x004F}, - {0x0050,0x0070,0x0050}, {0x0051,0x0071,0x0051}, - {0x0052,0x0072,0x0052}, {0x0053,0x0073,0x0053}, - {0x0054,0x0074,0x0054}, {0x0055,0x0075,0x0055}, - {0x0056,0x0076,0x0056}, {0x0057,0x0077,0x0057}, - {0x0058,0x0078,0x0058}, {0x0059,0x0079,0x0059}, - {0x005A,0x007A,0x005A}, {0x005B,0x005B,0x005B}, - {0x005C,0x005C,0x005C}, {0x005D,0x005D,0x005D}, - {0x005E,0x005E,0x005E}, {0x005F,0x005F,0x005F}, - {0x0060,0x0060,0x0060}, {0x0041,0x0061,0x0041}, - {0x0042,0x0062,0x0042}, {0x0043,0x0063,0x0043}, - {0x0044,0x0064,0x0044}, {0x0045,0x0065,0x0045}, - {0x0046,0x0066,0x0046}, {0x0047,0x0067,0x0047}, - {0x0048,0x0068,0x0048}, {0x0049,0x0069,0x0049}, - {0x004A,0x006A,0x004A}, {0x004B,0x006B,0x004B}, - {0x004C,0x006C,0x004C}, {0x004D,0x006D,0x004D}, - {0x004E,0x006E,0x004E}, {0x004F,0x006F,0x004F}, - {0x0050,0x0070,0x0050}, {0x0051,0x0071,0x0051}, - {0x0052,0x0072,0x0052}, {0x0053,0x0073,0x0053}, - {0x0054,0x0074,0x0054}, {0x0055,0x0075,0x0055}, - {0x0056,0x0076,0x0056}, {0x0057,0x0077,0x0057}, - {0x0058,0x0078,0x0058}, {0x0059,0x0079,0x0059}, - {0x005A,0x007A,0x005A}, {0x007B,0x007B,0x007B}, - {0x007C,0x007C,0x007C}, {0x007D,0x007D,0x007D}, - {0x007E,0x007E,0x007E}, {0x007F,0x007F,0x007F}, - {0x0080,0x0080,0x0080}, {0x0081,0x0081,0x0081}, - {0x0082,0x0082,0x0082}, {0x0083,0x0083,0x0083}, - {0x0084,0x0084,0x0084}, {0x0085,0x0085,0x0085}, - {0x0086,0x0086,0x0086}, {0x0087,0x0087,0x0087}, - {0x0088,0x0088,0x0088}, {0x0089,0x0089,0x0089}, - {0x008A,0x008A,0x008A}, {0x008B,0x008B,0x008B}, - {0x008C,0x008C,0x008C}, {0x008D,0x008D,0x008D}, - {0x008E,0x008E,0x008E}, {0x008F,0x008F,0x008F}, - {0x0090,0x0090,0x0090}, {0x0091,0x0091,0x0091}, - {0x0092,0x0092,0x0092}, {0x0093,0x0093,0x0093}, - {0x0094,0x0094,0x0094}, {0x0095,0x0095,0x0095}, - {0x0096,0x0096,0x0096}, {0x0097,0x0097,0x0097}, - {0x0098,0x0098,0x0098}, {0x0099,0x0099,0x0099}, - {0x009A,0x009A,0x009A}, {0x009B,0x009B,0x009B}, - {0x009C,0x009C,0x009C}, {0x009D,0x009D,0x009D}, - {0x009E,0x009E,0x009E}, {0x009F,0x009F,0x009F}, - {0x00A0,0x00A0,0x00A0}, {0x00A1,0x00A1,0x00A1}, - {0x00A2,0x00A2,0x00A2}, {0x00A3,0x00A3,0x00A3}, - {0x00A4,0x00A4,0x00A4}, {0x00A5,0x00A5,0x00A5}, - {0x00A6,0x00A6,0x00A6}, {0x00A7,0x00A7,0x00A7}, - {0x00A8,0x00A8,0x00A8}, {0x00A9,0x00A9,0x00A9}, - {0x00AA,0x00AA,0x00AA}, {0x00AB,0x00AB,0x00AB}, - {0x00AC,0x00AC,0x00AC}, {0x00AD,0x00AD,0x00AD}, - {0x00AE,0x00AE,0x00AE}, {0x00AF,0x00AF,0x00AF}, - {0x00B0,0x00B0,0x00B0}, {0x00B1,0x00B1,0x00B1}, - {0x00B2,0x00B2,0x00B2}, {0x00B3,0x00B3,0x00B3}, - {0x00B4,0x00B4,0x00B4}, {0x039C,0x00B5,0x039C}, - {0x00B6,0x00B6,0x00B6}, {0x00B7,0x00B7,0x00B7}, - {0x00B8,0x00B8,0x00B8}, {0x00B9,0x00B9,0x00B9}, - {0x00BA,0x00BA,0x00BA}, {0x00BB,0x00BB,0x00BB}, - {0x00BC,0x00BC,0x00BC}, {0x00BD,0x00BD,0x00BD}, - {0x00BE,0x00BE,0x00BE}, {0x00BF,0x00BF,0x00BF}, - {0x00C0,0x00E0,0x0041}, {0x00C1,0x00E1,0x0041}, - {0x00C2,0x00E2,0x0041}, {0x00C3,0x00E3,0x0041}, - {0x00C4,0x00E4,0x0041}, {0x00C5,0x00E5,0x0041}, - {0x00C6,0x00E6,0x00C6}, {0x00C7,0x00E7,0x0043}, - {0x00C8,0x00E8,0x0045}, {0x00C9,0x00E9,0x0045}, - {0x00CA,0x00EA,0x0045}, {0x00CB,0x00EB,0x0045}, - {0x00CC,0x00EC,0x0049}, {0x00CD,0x00ED,0x0049}, - {0x00CE,0x00EE,0x0049}, {0x00CF,0x00EF,0x0049}, - {0x00D0,0x00F0,0x00D0}, {0x00D1,0x00F1,0x004E}, - {0x00D2,0x00F2,0x004F}, {0x00D3,0x00F3,0x004F}, - {0x00D4,0x00F4,0x004F}, {0x00D5,0x00F5,0x004F}, - {0x00D6,0x00F6,0x004F}, {0x00D7,0x00D7,0x00D7}, - {0x00D8,0x00F8,0x00D8}, {0x00D9,0x00F9,0x0055}, - {0x00DA,0x00FA,0x0055}, {0x00DB,0x00FB,0x0055}, - {0x00DC,0x00FC,0x0055}, {0x00DD,0x00FD,0x0059}, - {0x00DE,0x00FE,0x00DE}, {0x00DF,0x00DF,0x0053}, - {0x00C0,0x00E0,0x0041}, {0x00C1,0x00E1,0x0041}, - {0x00C2,0x00E2,0x0041}, {0x00C3,0x00E3,0x0041}, - {0x00C4,0x00E4,0x0041}, {0x00C5,0x00E5,0x0041}, - {0x00C6,0x00E6,0x00C6}, {0x00C7,0x00E7,0x0043}, - {0x00C8,0x00E8,0x0045}, {0x00C9,0x00E9,0x0045}, - {0x00CA,0x00EA,0x0045}, {0x00CB,0x00EB,0x0045}, - {0x00CC,0x00EC,0x0049}, {0x00CD,0x00ED,0x0049}, - {0x00CE,0x00EE,0x0049}, {0x00CF,0x00EF,0x0049}, - {0x00D0,0x00F0,0x00D0}, {0x00D1,0x00F1,0x004E}, - {0x00D2,0x00F2,0x004F}, {0x00D3,0x00F3,0x004F}, - {0x00D4,0x00F4,0x004F}, {0x00D5,0x00F5,0x004F}, - {0x00D6,0x00F6,0x004F}, {0x00F7,0x00F7,0x00F7}, - {0x00D8,0x00F8,0x00D8}, {0x00D9,0x00F9,0x0055}, - {0x00DA,0x00FA,0x0055}, {0x00DB,0x00FB,0x0055}, - {0x00DC,0x00FC,0x0055}, {0x00DD,0x00FD,0x0059}, - {0x00DE,0x00FE,0x00DE}, {0x0178,0x00FF,0x0059} -}; - - - -static MY_UNICASE_INFO plane01[]={ - {0x0100,0x0101,0x0041}, {0x0100,0x0101,0x0041}, - {0x0102,0x0103,0x0041}, {0x0102,0x0103,0x0041}, - {0x0104,0x0105,0x0041}, {0x0104,0x0105,0x0041}, - {0x0106,0x0107,0x0043}, {0x0106,0x0107,0x0043}, - {0x0108,0x0109,0x0043}, {0x0108,0x0109,0x0043}, - {0x010A,0x010B,0x0043}, {0x010A,0x010B,0x0043}, - {0x010C,0x010D,0x0043}, {0x010C,0x010D,0x0043}, - {0x010E,0x010F,0x0044}, {0x010E,0x010F,0x0044}, - {0x0110,0x0111,0x0110}, {0x0110,0x0111,0x0110}, - {0x0112,0x0113,0x0045}, {0x0112,0x0113,0x0045}, - {0x0114,0x0115,0x0045}, {0x0114,0x0115,0x0045}, - {0x0116,0x0117,0x0045}, {0x0116,0x0117,0x0045}, - {0x0118,0x0119,0x0045}, {0x0118,0x0119,0x0045}, - {0x011A,0x011B,0x0045}, {0x011A,0x011B,0x0045}, - {0x011C,0x011D,0x0047}, {0x011C,0x011D,0x0047}, - {0x011E,0x011F,0x0047}, {0x011E,0x011F,0x0047}, - {0x0120,0x0121,0x0047}, {0x0120,0x0121,0x0047}, - {0x0122,0x0123,0x0047}, {0x0122,0x0123,0x0047}, - {0x0124,0x0125,0x0048}, {0x0124,0x0125,0x0048}, - {0x0126,0x0127,0x0126}, {0x0126,0x0127,0x0126}, - {0x0128,0x0129,0x0049}, {0x0128,0x0129,0x0049}, - {0x012A,0x012B,0x0049}, {0x012A,0x012B,0x0049}, - {0x012C,0x012D,0x0049}, {0x012C,0x012D,0x0049}, - {0x012E,0x012F,0x0049}, {0x012E,0x012F,0x0049}, - {0x0130,0x0069,0x0049}, {0x0049,0x0131,0x0049}, - {0x0132,0x0133,0x0132}, {0x0132,0x0133,0x0132}, - {0x0134,0x0135,0x004A}, {0x0134,0x0135,0x004A}, - {0x0136,0x0137,0x004B}, {0x0136,0x0137,0x004B}, - {0x0138,0x0138,0x0138}, {0x0139,0x013A,0x004C}, - {0x0139,0x013A,0x004C}, {0x013B,0x013C,0x004C}, - {0x013B,0x013C,0x004C}, {0x013D,0x013E,0x004C}, - {0x013D,0x013E,0x004C}, {0x013F,0x0140,0x013F}, - {0x013F,0x0140,0x013F}, {0x0141,0x0142,0x0141}, - {0x0141,0x0142,0x0141}, {0x0143,0x0144,0x004E}, - {0x0143,0x0144,0x004E}, {0x0145,0x0146,0x004E}, - {0x0145,0x0146,0x004E}, {0x0147,0x0148,0x004E}, - {0x0147,0x0148,0x004E}, {0x0149,0x0149,0x0149}, - {0x014A,0x014B,0x014A}, {0x014A,0x014B,0x014A}, - {0x014C,0x014D,0x004F}, {0x014C,0x014D,0x004F}, - {0x014E,0x014F,0x004F}, {0x014E,0x014F,0x004F}, - {0x0150,0x0151,0x004F}, {0x0150,0x0151,0x004F}, - {0x0152,0x0153,0x0152}, {0x0152,0x0153,0x0152}, - {0x0154,0x0155,0x0052}, {0x0154,0x0155,0x0052}, - {0x0156,0x0157,0x0052}, {0x0156,0x0157,0x0052}, - {0x0158,0x0159,0x0052}, {0x0158,0x0159,0x0052}, - {0x015A,0x015B,0x0053}, {0x015A,0x015B,0x0053}, - {0x015C,0x015D,0x0053}, {0x015C,0x015D,0x0053}, - {0x015E,0x015F,0x0053}, {0x015E,0x015F,0x0053}, - {0x0160,0x0161,0x0053}, {0x0160,0x0161,0x0053}, - {0x0162,0x0163,0x0054}, {0x0162,0x0163,0x0054}, - {0x0164,0x0165,0x0054}, {0x0164,0x0165,0x0054}, - {0x0166,0x0167,0x0166}, {0x0166,0x0167,0x0166}, - {0x0168,0x0169,0x0055}, {0x0168,0x0169,0x0055}, - {0x016A,0x016B,0x0055}, {0x016A,0x016B,0x0055}, - {0x016C,0x016D,0x0055}, {0x016C,0x016D,0x0055}, - {0x016E,0x016F,0x0055}, {0x016E,0x016F,0x0055}, - {0x0170,0x0171,0x0055}, {0x0170,0x0171,0x0055}, - {0x0172,0x0173,0x0055}, {0x0172,0x0173,0x0055}, - {0x0174,0x0175,0x0057}, {0x0174,0x0175,0x0057}, - {0x0176,0x0177,0x0059}, {0x0176,0x0177,0x0059}, - {0x0178,0x00FF,0x0059}, {0x0179,0x017A,0x005A}, - {0x0179,0x017A,0x005A}, {0x017B,0x017C,0x005A}, - {0x017B,0x017C,0x005A}, {0x017D,0x017E,0x005A}, - {0x017D,0x017E,0x005A}, {0x0053,0x017F,0x0053}, - {0x0180,0x0180,0x0180}, {0x0181,0x0253,0x0181}, - {0x0182,0x0183,0x0182}, {0x0182,0x0183,0x0182}, - {0x0184,0x0185,0x0184}, {0x0184,0x0185,0x0184}, - {0x0186,0x0254,0x0186}, {0x0187,0x0188,0x0187}, - {0x0187,0x0188,0x0187}, {0x0189,0x0256,0x0189}, - {0x018A,0x0257,0x018A}, {0x018B,0x018C,0x018B}, - {0x018B,0x018C,0x018B}, {0x018D,0x018D,0x018D}, - {0x018E,0x01DD,0x018E}, {0x018F,0x0259,0x018F}, - {0x0190,0x025B,0x0190}, {0x0191,0x0192,0x0191}, - {0x0191,0x0192,0x0191}, {0x0193,0x0260,0x0193}, - {0x0194,0x0263,0x0194}, {0x01F6,0x0195,0x01F6}, - {0x0196,0x0269,0x0196}, {0x0197,0x0268,0x0197}, - {0x0198,0x0199,0x0198}, {0x0198,0x0199,0x0198}, - {0x019A,0x019A,0x019A}, {0x019B,0x019B,0x019B}, - {0x019C,0x026F,0x019C}, {0x019D,0x0272,0x019D}, - {0x019E,0x019E,0x019E}, {0x019F,0x0275,0x019F}, - {0x01A0,0x01A1,0x004F}, {0x01A0,0x01A1,0x004F}, - {0x01A2,0x01A3,0x01A2}, {0x01A2,0x01A3,0x01A2}, - {0x01A4,0x01A5,0x01A4}, {0x01A4,0x01A5,0x01A4}, - {0x01A6,0x0280,0x01A6}, {0x01A7,0x01A8,0x01A7}, - {0x01A7,0x01A8,0x01A7}, {0x01A9,0x0283,0x01A9}, - {0x01AA,0x01AA,0x01AA}, {0x01AB,0x01AB,0x01AB}, - {0x01AC,0x01AD,0x01AC}, {0x01AC,0x01AD,0x01AC}, - {0x01AE,0x0288,0x01AE}, {0x01AF,0x01B0,0x0055}, - {0x01AF,0x01B0,0x0055}, {0x01B1,0x028A,0x01B1}, - {0x01B2,0x028B,0x01B2}, {0x01B3,0x01B4,0x01B3}, - {0x01B3,0x01B4,0x01B3}, {0x01B5,0x01B6,0x01B5}, - {0x01B5,0x01B6,0x01B5}, {0x01B7,0x0292,0x01B7}, - {0x01B8,0x01B9,0x01B8}, {0x01B8,0x01B9,0x01B8}, - {0x01BA,0x01BA,0x01BA}, {0x01BB,0x01BB,0x01BB}, - {0x01BC,0x01BD,0x01BC}, {0x01BC,0x01BD,0x01BC}, - {0x01BE,0x01BE,0x01BE}, {0x01F7,0x01BF,0x01F7}, - {0x01C0,0x01C0,0x01C0}, {0x01C1,0x01C1,0x01C1}, - {0x01C2,0x01C2,0x01C2}, {0x01C3,0x01C3,0x01C3}, - {0x01C4,0x01C6,0x01C4}, {0x01C4,0x01C6,0x01C4}, - {0x01C4,0x01C6,0x01C4}, {0x01C7,0x01C9,0x01C7}, - {0x01C7,0x01C9,0x01C7}, {0x01C7,0x01C9,0x01C7}, - {0x01CA,0x01CC,0x01CA}, {0x01CA,0x01CC,0x01CA}, - {0x01CA,0x01CC,0x01CA}, {0x01CD,0x01CE,0x0041}, - {0x01CD,0x01CE,0x0041}, {0x01CF,0x01D0,0x0049}, - {0x01CF,0x01D0,0x0049}, {0x01D1,0x01D2,0x004F}, - {0x01D1,0x01D2,0x004F}, {0x01D3,0x01D4,0x0055}, - {0x01D3,0x01D4,0x0055}, {0x01D5,0x01D6,0x0055}, - {0x01D5,0x01D6,0x0055}, {0x01D7,0x01D8,0x0055}, - {0x01D7,0x01D8,0x0055}, {0x01D9,0x01DA,0x0055}, - {0x01D9,0x01DA,0x0055}, {0x01DB,0x01DC,0x0055}, - {0x01DB,0x01DC,0x0055}, {0x018E,0x01DD,0x018E}, - {0x01DE,0x01DF,0x0041}, {0x01DE,0x01DF,0x0041}, - {0x01E0,0x01E1,0x0041}, {0x01E0,0x01E1,0x0041}, - {0x01E2,0x01E3,0x00C6}, {0x01E2,0x01E3,0x00C6}, - {0x01E4,0x01E5,0x01E4}, {0x01E4,0x01E5,0x01E4}, - {0x01E6,0x01E7,0x0047}, {0x01E6,0x01E7,0x0047}, - {0x01E8,0x01E9,0x004B}, {0x01E8,0x01E9,0x004B}, - {0x01EA,0x01EB,0x004F}, {0x01EA,0x01EB,0x004F}, - {0x01EC,0x01ED,0x004F}, {0x01EC,0x01ED,0x004F}, - {0x01EE,0x01EF,0x01B7}, {0x01EE,0x01EF,0x01B7}, - {0x01F0,0x01F0,0x004A}, {0x01F1,0x01F3,0x01F1}, - {0x01F1,0x01F3,0x01F1}, {0x01F1,0x01F3,0x01F1}, - {0x01F4,0x01F5,0x0047}, {0x01F4,0x01F5,0x0047}, - {0x01F6,0x0195,0x01F6}, {0x01F7,0x01BF,0x01F7}, - {0x01F8,0x01F9,0x004E}, {0x01F8,0x01F9,0x004E}, - {0x01FA,0x01FB,0x0041}, {0x01FA,0x01FB,0x0041}, - {0x01FC,0x01FD,0x00C6}, {0x01FC,0x01FD,0x00C6}, - {0x01FE,0x01FF,0x00D8}, {0x01FE,0x01FF,0x00D8} -}; - -static MY_UNICASE_INFO plane02[]={ - {0x0200,0x0201,0x0041}, {0x0200,0x0201,0x0041}, - {0x0202,0x0203,0x0041}, {0x0202,0x0203,0x0041}, - {0x0204,0x0205,0x0045}, {0x0204,0x0205,0x0045}, - {0x0206,0x0207,0x0045}, {0x0206,0x0207,0x0045}, - {0x0208,0x0209,0x0049}, {0x0208,0x0209,0x0049}, - {0x020A,0x020B,0x0049}, {0x020A,0x020B,0x0049}, - {0x020C,0x020D,0x004F}, {0x020C,0x020D,0x004F}, - {0x020E,0x020F,0x004F}, {0x020E,0x020F,0x004F}, - {0x0210,0x0211,0x0052}, {0x0210,0x0211,0x0052}, - {0x0212,0x0213,0x0052}, {0x0212,0x0213,0x0052}, - {0x0214,0x0215,0x0055}, {0x0214,0x0215,0x0055}, - {0x0216,0x0217,0x0055}, {0x0216,0x0217,0x0055}, - {0x0218,0x0219,0x0053}, {0x0218,0x0219,0x0053}, - {0x021A,0x021B,0x0054}, {0x021A,0x021B,0x0054}, - {0x021C,0x021D,0x021C}, {0x021C,0x021D,0x021C}, - {0x021E,0x021F,0x0048}, {0x021E,0x021F,0x0048}, - {0x0220,0x0220,0x0220}, {0x0221,0x0221,0x0221}, - {0x0222,0x0223,0x0222}, {0x0222,0x0223,0x0222}, - {0x0224,0x0225,0x0224}, {0x0224,0x0225,0x0224}, - {0x0226,0x0227,0x0041}, {0x0226,0x0227,0x0041}, - {0x0228,0x0229,0x0045}, {0x0228,0x0229,0x0045}, - {0x022A,0x022B,0x004F}, {0x022A,0x022B,0x004F}, - {0x022C,0x022D,0x004F}, {0x022C,0x022D,0x004F}, - {0x022E,0x022F,0x004F}, {0x022E,0x022F,0x004F}, - {0x0230,0x0231,0x004F}, {0x0230,0x0231,0x004F}, - {0x0232,0x0233,0x0059}, {0x0232,0x0233,0x0059}, - {0x0234,0x0234,0x0234}, {0x0235,0x0235,0x0235}, - {0x0236,0x0236,0x0236}, {0x0237,0x0237,0x0237}, - {0x0238,0x0238,0x0238}, {0x0239,0x0239,0x0239}, - {0x023A,0x023A,0x023A}, {0x023B,0x023B,0x023B}, - {0x023C,0x023C,0x023C}, {0x023D,0x023D,0x023D}, - {0x023E,0x023E,0x023E}, {0x023F,0x023F,0x023F}, - {0x0240,0x0240,0x0240}, {0x0241,0x0241,0x0241}, - {0x0242,0x0242,0x0242}, {0x0243,0x0243,0x0243}, - {0x0244,0x0244,0x0244}, {0x0245,0x0245,0x0245}, - {0x0246,0x0246,0x0246}, {0x0247,0x0247,0x0247}, - {0x0248,0x0248,0x0248}, {0x0249,0x0249,0x0249}, - {0x024A,0x024A,0x024A}, {0x024B,0x024B,0x024B}, - {0x024C,0x024C,0x024C}, {0x024D,0x024D,0x024D}, - {0x024E,0x024E,0x024E}, {0x024F,0x024F,0x024F}, - {0x0250,0x0250,0x0250}, {0x0251,0x0251,0x0251}, - {0x0252,0x0252,0x0252}, {0x0181,0x0253,0x0181}, - {0x0186,0x0254,0x0186}, {0x0255,0x0255,0x0255}, - {0x0189,0x0256,0x0189}, {0x018A,0x0257,0x018A}, - {0x0258,0x0258,0x0258}, {0x018F,0x0259,0x018F}, - {0x025A,0x025A,0x025A}, {0x0190,0x025B,0x0190}, - {0x025C,0x025C,0x025C}, {0x025D,0x025D,0x025D}, - {0x025E,0x025E,0x025E}, {0x025F,0x025F,0x025F}, - {0x0193,0x0260,0x0193}, {0x0261,0x0261,0x0261}, - {0x0262,0x0262,0x0262}, {0x0194,0x0263,0x0194}, - {0x0264,0x0264,0x0264}, {0x0265,0x0265,0x0265}, - {0x0266,0x0266,0x0266}, {0x0267,0x0267,0x0267}, - {0x0197,0x0268,0x0197}, {0x0196,0x0269,0x0196}, - {0x026A,0x026A,0x026A}, {0x026B,0x026B,0x026B}, - {0x026C,0x026C,0x026C}, {0x026D,0x026D,0x026D}, - {0x026E,0x026E,0x026E}, {0x019C,0x026F,0x019C}, - {0x0270,0x0270,0x0270}, {0x0271,0x0271,0x0271}, - {0x019D,0x0272,0x019D}, {0x0273,0x0273,0x0273}, - {0x0274,0x0274,0x0274}, {0x019F,0x0275,0x019F}, - {0x0276,0x0276,0x0276}, {0x0277,0x0277,0x0277}, - {0x0278,0x0278,0x0278}, {0x0279,0x0279,0x0279}, - {0x027A,0x027A,0x027A}, {0x027B,0x027B,0x027B}, - {0x027C,0x027C,0x027C}, {0x027D,0x027D,0x027D}, - {0x027E,0x027E,0x027E}, {0x027F,0x027F,0x027F}, - {0x01A6,0x0280,0x01A6}, {0x0281,0x0281,0x0281}, - {0x0282,0x0282,0x0282}, {0x01A9,0x0283,0x01A9}, - {0x0284,0x0284,0x0284}, {0x0285,0x0285,0x0285}, - {0x0286,0x0286,0x0286}, {0x0287,0x0287,0x0287}, - {0x01AE,0x0288,0x01AE}, {0x0289,0x0289,0x0289}, - {0x01B1,0x028A,0x01B1}, {0x01B2,0x028B,0x01B2}, - {0x028C,0x028C,0x028C}, {0x028D,0x028D,0x028D}, - {0x028E,0x028E,0x028E}, {0x028F,0x028F,0x028F}, - {0x0290,0x0290,0x0290}, {0x0291,0x0291,0x0291}, - {0x01B7,0x0292,0x01B7}, {0x0293,0x0293,0x0293}, - {0x0294,0x0294,0x0294}, {0x0295,0x0295,0x0295}, - {0x0296,0x0296,0x0296}, {0x0297,0x0297,0x0297}, - {0x0298,0x0298,0x0298}, {0x0299,0x0299,0x0299}, - {0x029A,0x029A,0x029A}, {0x029B,0x029B,0x029B}, - {0x029C,0x029C,0x029C}, {0x029D,0x029D,0x029D}, - {0x029E,0x029E,0x029E}, {0x029F,0x029F,0x029F}, - {0x02A0,0x02A0,0x02A0}, {0x02A1,0x02A1,0x02A1}, - {0x02A2,0x02A2,0x02A2}, {0x02A3,0x02A3,0x02A3}, - {0x02A4,0x02A4,0x02A4}, {0x02A5,0x02A5,0x02A5}, - {0x02A6,0x02A6,0x02A6}, {0x02A7,0x02A7,0x02A7}, - {0x02A8,0x02A8,0x02A8}, {0x02A9,0x02A9,0x02A9}, - {0x02AA,0x02AA,0x02AA}, {0x02AB,0x02AB,0x02AB}, - {0x02AC,0x02AC,0x02AC}, {0x02AD,0x02AD,0x02AD}, - {0x02AE,0x02AE,0x02AE}, {0x02AF,0x02AF,0x02AF}, - {0x02B0,0x02B0,0x02B0}, {0x02B1,0x02B1,0x02B1}, - {0x02B2,0x02B2,0x02B2}, {0x02B3,0x02B3,0x02B3}, - {0x02B4,0x02B4,0x02B4}, {0x02B5,0x02B5,0x02B5}, - {0x02B6,0x02B6,0x02B6}, {0x02B7,0x02B7,0x02B7}, - {0x02B8,0x02B8,0x02B8}, {0x02B9,0x02B9,0x02B9}, - {0x02BA,0x02BA,0x02BA}, {0x02BB,0x02BB,0x02BB}, - {0x02BC,0x02BC,0x02BC}, {0x02BD,0x02BD,0x02BD}, - {0x02BE,0x02BE,0x02BE}, {0x02BF,0x02BF,0x02BF}, - {0x02C0,0x02C0,0x02C0}, {0x02C1,0x02C1,0x02C1}, - {0x02C2,0x02C2,0x02C2}, {0x02C3,0x02C3,0x02C3}, - {0x02C4,0x02C4,0x02C4}, {0x02C5,0x02C5,0x02C5}, - {0x02C6,0x02C6,0x02C6}, {0x02C7,0x02C7,0x02C7}, - {0x02C8,0x02C8,0x02C8}, {0x02C9,0x02C9,0x02C9}, - {0x02CA,0x02CA,0x02CA}, {0x02CB,0x02CB,0x02CB}, - {0x02CC,0x02CC,0x02CC}, {0x02CD,0x02CD,0x02CD}, - {0x02CE,0x02CE,0x02CE}, {0x02CF,0x02CF,0x02CF}, - {0x02D0,0x02D0,0x02D0}, {0x02D1,0x02D1,0x02D1}, - {0x02D2,0x02D2,0x02D2}, {0x02D3,0x02D3,0x02D3}, - {0x02D4,0x02D4,0x02D4}, {0x02D5,0x02D5,0x02D5}, - {0x02D6,0x02D6,0x02D6}, {0x02D7,0x02D7,0x02D7}, - {0x02D8,0x02D8,0x02D8}, {0x02D9,0x02D9,0x02D9}, - {0x02DA,0x02DA,0x02DA}, {0x02DB,0x02DB,0x02DB}, - {0x02DC,0x02DC,0x02DC}, {0x02DD,0x02DD,0x02DD}, - {0x02DE,0x02DE,0x02DE}, {0x02DF,0x02DF,0x02DF}, - {0x02E0,0x02E0,0x02E0}, {0x02E1,0x02E1,0x02E1}, - {0x02E2,0x02E2,0x02E2}, {0x02E3,0x02E3,0x02E3}, - {0x02E4,0x02E4,0x02E4}, {0x02E5,0x02E5,0x02E5}, - {0x02E6,0x02E6,0x02E6}, {0x02E7,0x02E7,0x02E7}, - {0x02E8,0x02E8,0x02E8}, {0x02E9,0x02E9,0x02E9}, - {0x02EA,0x02EA,0x02EA}, {0x02EB,0x02EB,0x02EB}, - {0x02EC,0x02EC,0x02EC}, {0x02ED,0x02ED,0x02ED}, - {0x02EE,0x02EE,0x02EE}, {0x02EF,0x02EF,0x02EF}, - {0x02F0,0x02F0,0x02F0}, {0x02F1,0x02F1,0x02F1}, - {0x02F2,0x02F2,0x02F2}, {0x02F3,0x02F3,0x02F3}, - {0x02F4,0x02F4,0x02F4}, {0x02F5,0x02F5,0x02F5}, - {0x02F6,0x02F6,0x02F6}, {0x02F7,0x02F7,0x02F7}, - {0x02F8,0x02F8,0x02F8}, {0x02F9,0x02F9,0x02F9}, - {0x02FA,0x02FA,0x02FA}, {0x02FB,0x02FB,0x02FB}, - {0x02FC,0x02FC,0x02FC}, {0x02FD,0x02FD,0x02FD}, - {0x02FE,0x02FE,0x02FE}, {0x02FF,0x02FF,0x02FF} -}; - -static MY_UNICASE_INFO plane03[]={ - {0x0300,0x0300,0x0300}, {0x0301,0x0301,0x0301}, - {0x0302,0x0302,0x0302}, {0x0303,0x0303,0x0303}, - {0x0304,0x0304,0x0304}, {0x0305,0x0305,0x0305}, - {0x0306,0x0306,0x0306}, {0x0307,0x0307,0x0307}, - {0x0308,0x0308,0x0308}, {0x0309,0x0309,0x0309}, - {0x030A,0x030A,0x030A}, {0x030B,0x030B,0x030B}, - {0x030C,0x030C,0x030C}, {0x030D,0x030D,0x030D}, - {0x030E,0x030E,0x030E}, {0x030F,0x030F,0x030F}, - {0x0310,0x0310,0x0310}, {0x0311,0x0311,0x0311}, - {0x0312,0x0312,0x0312}, {0x0313,0x0313,0x0313}, - {0x0314,0x0314,0x0314}, {0x0315,0x0315,0x0315}, - {0x0316,0x0316,0x0316}, {0x0317,0x0317,0x0317}, - {0x0318,0x0318,0x0318}, {0x0319,0x0319,0x0319}, - {0x031A,0x031A,0x031A}, {0x031B,0x031B,0x031B}, - {0x031C,0x031C,0x031C}, {0x031D,0x031D,0x031D}, - {0x031E,0x031E,0x031E}, {0x031F,0x031F,0x031F}, - {0x0320,0x0320,0x0320}, {0x0321,0x0321,0x0321}, - {0x0322,0x0322,0x0322}, {0x0323,0x0323,0x0323}, - {0x0324,0x0324,0x0324}, {0x0325,0x0325,0x0325}, - {0x0326,0x0326,0x0326}, {0x0327,0x0327,0x0327}, - {0x0328,0x0328,0x0328}, {0x0329,0x0329,0x0329}, - {0x032A,0x032A,0x032A}, {0x032B,0x032B,0x032B}, - {0x032C,0x032C,0x032C}, {0x032D,0x032D,0x032D}, - {0x032E,0x032E,0x032E}, {0x032F,0x032F,0x032F}, - {0x0330,0x0330,0x0330}, {0x0331,0x0331,0x0331}, - {0x0332,0x0332,0x0332}, {0x0333,0x0333,0x0333}, - {0x0334,0x0334,0x0334}, {0x0335,0x0335,0x0335}, - {0x0336,0x0336,0x0336}, {0x0337,0x0337,0x0337}, - {0x0338,0x0338,0x0338}, {0x0339,0x0339,0x0339}, - {0x033A,0x033A,0x033A}, {0x033B,0x033B,0x033B}, - {0x033C,0x033C,0x033C}, {0x033D,0x033D,0x033D}, - {0x033E,0x033E,0x033E}, {0x033F,0x033F,0x033F}, - {0x0340,0x0340,0x0340}, {0x0341,0x0341,0x0341}, - {0x0342,0x0342,0x0342}, {0x0343,0x0343,0x0343}, - {0x0344,0x0344,0x0344}, {0x0399,0x0345,0x0399}, - {0x0346,0x0346,0x0346}, {0x0347,0x0347,0x0347}, - {0x0348,0x0348,0x0348}, {0x0349,0x0349,0x0349}, - {0x034A,0x034A,0x034A}, {0x034B,0x034B,0x034B}, - {0x034C,0x034C,0x034C}, {0x034D,0x034D,0x034D}, - {0x034E,0x034E,0x034E}, {0x034F,0x034F,0x034F}, - {0x0350,0x0350,0x0350}, {0x0351,0x0351,0x0351}, - {0x0352,0x0352,0x0352}, {0x0353,0x0353,0x0353}, - {0x0354,0x0354,0x0354}, {0x0355,0x0355,0x0355}, - {0x0356,0x0356,0x0356}, {0x0357,0x0357,0x0357}, - {0x0358,0x0358,0x0358}, {0x0359,0x0359,0x0359}, - {0x035A,0x035A,0x035A}, {0x035B,0x035B,0x035B}, - {0x035C,0x035C,0x035C}, {0x035D,0x035D,0x035D}, - {0x035E,0x035E,0x035E}, {0x035F,0x035F,0x035F}, - {0x0360,0x0360,0x0360}, {0x0361,0x0361,0x0361}, - {0x0362,0x0362,0x0362}, {0x0363,0x0363,0x0363}, - {0x0364,0x0364,0x0364}, {0x0365,0x0365,0x0365}, - {0x0366,0x0366,0x0366}, {0x0367,0x0367,0x0367}, - {0x0368,0x0368,0x0368}, {0x0369,0x0369,0x0369}, - {0x036A,0x036A,0x036A}, {0x036B,0x036B,0x036B}, - {0x036C,0x036C,0x036C}, {0x036D,0x036D,0x036D}, - {0x036E,0x036E,0x036E}, {0x036F,0x036F,0x036F}, - {0x0370,0x0370,0x0370}, {0x0371,0x0371,0x0371}, - {0x0372,0x0372,0x0372}, {0x0373,0x0373,0x0373}, - {0x0374,0x0374,0x0374}, {0x0375,0x0375,0x0375}, - {0x0376,0x0376,0x0376}, {0x0377,0x0377,0x0377}, - {0x0378,0x0378,0x0378}, {0x0379,0x0379,0x0379}, - {0x037A,0x037A,0x037A}, {0x037B,0x037B,0x037B}, - {0x037C,0x037C,0x037C}, {0x037D,0x037D,0x037D}, - {0x037E,0x037E,0x037E}, {0x037F,0x037F,0x037F}, - {0x0380,0x0380,0x0380}, {0x0381,0x0381,0x0381}, - {0x0382,0x0382,0x0382}, {0x0383,0x0383,0x0383}, - {0x0384,0x0384,0x0384}, {0x0385,0x0385,0x0385}, - {0x0386,0x03AC,0x0391}, {0x0387,0x0387,0x0387}, - {0x0388,0x03AD,0x0395}, {0x0389,0x03AE,0x0397}, - {0x038A,0x03AF,0x0399}, {0x038B,0x038B,0x038B}, - {0x038C,0x03CC,0x039F}, {0x038D,0x038D,0x038D}, - {0x038E,0x03CD,0x03A5}, {0x038F,0x03CE,0x03A9}, - {0x0390,0x0390,0x0399}, {0x0391,0x03B1,0x0391}, - {0x0392,0x03B2,0x0392}, {0x0393,0x03B3,0x0393}, - {0x0394,0x03B4,0x0394}, {0x0395,0x03B5,0x0395}, - {0x0396,0x03B6,0x0396}, {0x0397,0x03B7,0x0397}, - {0x0398,0x03B8,0x0398}, {0x0399,0x03B9,0x0399}, - {0x039A,0x03BA,0x039A}, {0x039B,0x03BB,0x039B}, - {0x039C,0x03BC,0x039C}, {0x039D,0x03BD,0x039D}, - {0x039E,0x03BE,0x039E}, {0x039F,0x03BF,0x039F}, - {0x03A0,0x03C0,0x03A0}, {0x03A1,0x03C1,0x03A1}, - {0x03A2,0x03A2,0x03A2}, {0x03A3,0x03C3,0x03A3}, - {0x03A4,0x03C4,0x03A4}, {0x03A5,0x03C5,0x03A5}, - {0x03A6,0x03C6,0x03A6}, {0x03A7,0x03C7,0x03A7}, - {0x03A8,0x03C8,0x03A8}, {0x03A9,0x03C9,0x03A9}, - {0x03AA,0x03CA,0x0399}, {0x03AB,0x03CB,0x03A5}, - {0x0386,0x03AC,0x0391}, {0x0388,0x03AD,0x0395}, - {0x0389,0x03AE,0x0397}, {0x038A,0x03AF,0x0399}, - {0x03B0,0x03B0,0x03A5}, {0x0391,0x03B1,0x0391}, - {0x0392,0x03B2,0x0392}, {0x0393,0x03B3,0x0393}, - {0x0394,0x03B4,0x0394}, {0x0395,0x03B5,0x0395}, - {0x0396,0x03B6,0x0396}, {0x0397,0x03B7,0x0397}, - {0x0398,0x03B8,0x0398}, {0x0399,0x03B9,0x0399}, - {0x039A,0x03BA,0x039A}, {0x039B,0x03BB,0x039B}, - {0x039C,0x03BC,0x039C}, {0x039D,0x03BD,0x039D}, - {0x039E,0x03BE,0x039E}, {0x039F,0x03BF,0x039F}, - {0x03A0,0x03C0,0x03A0}, {0x03A1,0x03C1,0x03A1}, - {0x03A3,0x03C2,0x03A3}, {0x03A3,0x03C3,0x03A3}, - {0x03A4,0x03C4,0x03A4}, {0x03A5,0x03C5,0x03A5}, - {0x03A6,0x03C6,0x03A6}, {0x03A7,0x03C7,0x03A7}, - {0x03A8,0x03C8,0x03A8}, {0x03A9,0x03C9,0x03A9}, - {0x03AA,0x03CA,0x0399}, {0x03AB,0x03CB,0x03A5}, - {0x038C,0x03CC,0x039F}, {0x038E,0x03CD,0x03A5}, - {0x038F,0x03CE,0x03A9}, {0x03CF,0x03CF,0x03CF}, - {0x0392,0x03D0,0x0392}, {0x0398,0x03D1,0x0398}, - {0x03D2,0x03D2,0x03D2}, {0x03D3,0x03D3,0x03D2}, - {0x03D4,0x03D4,0x03D2}, {0x03A6,0x03D5,0x03A6}, - {0x03A0,0x03D6,0x03A0}, {0x03D7,0x03D7,0x03D7}, - {0x03D8,0x03D8,0x03D8}, {0x03D9,0x03D9,0x03D9}, - {0x03DA,0x03DB,0x03DA}, {0x03DA,0x03DB,0x03DA}, - {0x03DC,0x03DD,0x03DC}, {0x03DC,0x03DD,0x03DC}, - {0x03DE,0x03DF,0x03DE}, {0x03DE,0x03DF,0x03DE}, - {0x03E0,0x03E1,0x03E0}, {0x03E0,0x03E1,0x03E0}, - {0x03E2,0x03E3,0x03E2}, {0x03E2,0x03E3,0x03E2}, - {0x03E4,0x03E5,0x03E4}, {0x03E4,0x03E5,0x03E4}, - {0x03E6,0x03E7,0x03E6}, {0x03E6,0x03E7,0x03E6}, - {0x03E8,0x03E9,0x03E8}, {0x03E8,0x03E9,0x03E8}, - {0x03EA,0x03EB,0x03EA}, {0x03EA,0x03EB,0x03EA}, - {0x03EC,0x03ED,0x03EC}, {0x03EC,0x03ED,0x03EC}, - {0x03EE,0x03EF,0x03EE}, {0x03EE,0x03EF,0x03EE}, - {0x039A,0x03F0,0x039A}, {0x03A1,0x03F1,0x03A1}, - {0x03A3,0x03F2,0x03A3}, {0x03F3,0x03F3,0x03F3}, - {0x03F4,0x03F4,0x03F4}, {0x03F5,0x03F5,0x03F5}, - {0x03F6,0x03F6,0x03F6}, {0x03F7,0x03F7,0x03F7}, - {0x03F8,0x03F8,0x03F8}, {0x03F9,0x03F9,0x03F9}, - {0x03FA,0x03FA,0x03FA}, {0x03FB,0x03FB,0x03FB}, - {0x03FC,0x03FC,0x03FC}, {0x03FD,0x03FD,0x03FD}, - {0x03FE,0x03FE,0x03FE}, {0x03FF,0x03FF,0x03FF} -}; - -static MY_UNICASE_INFO plane04[]={ - {0x0400,0x0450,0x0415}, {0x0401,0x0451,0x0415}, - {0x0402,0x0452,0x0402}, {0x0403,0x0453,0x0413}, - {0x0404,0x0454,0x0404}, {0x0405,0x0455,0x0405}, - {0x0406,0x0456,0x0406}, {0x0407,0x0457,0x0406}, - {0x0408,0x0458,0x0408}, {0x0409,0x0459,0x0409}, - {0x040A,0x045A,0x040A}, {0x040B,0x045B,0x040B}, - {0x040C,0x045C,0x041A}, {0x040D,0x045D,0x0418}, - {0x040E,0x045E,0x0423}, {0x040F,0x045F,0x040F}, - {0x0410,0x0430,0x0410}, {0x0411,0x0431,0x0411}, - {0x0412,0x0432,0x0412}, {0x0413,0x0433,0x0413}, - {0x0414,0x0434,0x0414}, {0x0415,0x0435,0x0415}, - {0x0416,0x0436,0x0416}, {0x0417,0x0437,0x0417}, - {0x0418,0x0438,0x0418}, {0x0419,0x0439,0x0419}, - {0x041A,0x043A,0x041A}, {0x041B,0x043B,0x041B}, - {0x041C,0x043C,0x041C}, {0x041D,0x043D,0x041D}, - {0x041E,0x043E,0x041E}, {0x041F,0x043F,0x041F}, - {0x0420,0x0440,0x0420}, {0x0421,0x0441,0x0421}, - {0x0422,0x0442,0x0422}, {0x0423,0x0443,0x0423}, - {0x0424,0x0444,0x0424}, {0x0425,0x0445,0x0425}, - {0x0426,0x0446,0x0426}, {0x0427,0x0447,0x0427}, - {0x0428,0x0448,0x0428}, {0x0429,0x0449,0x0429}, - {0x042A,0x044A,0x042A}, {0x042B,0x044B,0x042B}, - {0x042C,0x044C,0x042C}, {0x042D,0x044D,0x042D}, - {0x042E,0x044E,0x042E}, {0x042F,0x044F,0x042F}, - {0x0410,0x0430,0x0410}, {0x0411,0x0431,0x0411}, - {0x0412,0x0432,0x0412}, {0x0413,0x0433,0x0413}, - {0x0414,0x0434,0x0414}, {0x0415,0x0435,0x0415}, - {0x0416,0x0436,0x0416}, {0x0417,0x0437,0x0417}, - {0x0418,0x0438,0x0418}, {0x0419,0x0439,0x0419}, - {0x041A,0x043A,0x041A}, {0x041B,0x043B,0x041B}, - {0x041C,0x043C,0x041C}, {0x041D,0x043D,0x041D}, - {0x041E,0x043E,0x041E}, {0x041F,0x043F,0x041F}, - {0x0420,0x0440,0x0420}, {0x0421,0x0441,0x0421}, - {0x0422,0x0442,0x0422}, {0x0423,0x0443,0x0423}, - {0x0424,0x0444,0x0424}, {0x0425,0x0445,0x0425}, - {0x0426,0x0446,0x0426}, {0x0427,0x0447,0x0427}, - {0x0428,0x0448,0x0428}, {0x0429,0x0449,0x0429}, - {0x042A,0x044A,0x042A}, {0x042B,0x044B,0x042B}, - {0x042C,0x044C,0x042C}, {0x042D,0x044D,0x042D}, - {0x042E,0x044E,0x042E}, {0x042F,0x044F,0x042F}, - {0x0400,0x0450,0x0415}, {0x0401,0x0451,0x0415}, - {0x0402,0x0452,0x0402}, {0x0403,0x0453,0x0413}, - {0x0404,0x0454,0x0404}, {0x0405,0x0455,0x0405}, - {0x0406,0x0456,0x0406}, {0x0407,0x0457,0x0406}, - {0x0408,0x0458,0x0408}, {0x0409,0x0459,0x0409}, - {0x040A,0x045A,0x040A}, {0x040B,0x045B,0x040B}, - {0x040C,0x045C,0x041A}, {0x040D,0x045D,0x0418}, - {0x040E,0x045E,0x0423}, {0x040F,0x045F,0x040F}, - {0x0460,0x0461,0x0460}, {0x0460,0x0461,0x0460}, - {0x0462,0x0463,0x0462}, {0x0462,0x0463,0x0462}, - {0x0464,0x0465,0x0464}, {0x0464,0x0465,0x0464}, - {0x0466,0x0467,0x0466}, {0x0466,0x0467,0x0466}, - {0x0468,0x0469,0x0468}, {0x0468,0x0469,0x0468}, - {0x046A,0x046B,0x046A}, {0x046A,0x046B,0x046A}, - {0x046C,0x046D,0x046C}, {0x046C,0x046D,0x046C}, - {0x046E,0x046F,0x046E}, {0x046E,0x046F,0x046E}, - {0x0470,0x0471,0x0470}, {0x0470,0x0471,0x0470}, - {0x0472,0x0473,0x0472}, {0x0472,0x0473,0x0472}, - {0x0474,0x0475,0x0474}, {0x0474,0x0475,0x0474}, - {0x0476,0x0477,0x0474}, {0x0476,0x0477,0x0474}, - {0x0478,0x0479,0x0478}, {0x0478,0x0479,0x0478}, - {0x047A,0x047B,0x047A}, {0x047A,0x047B,0x047A}, - {0x047C,0x047D,0x047C}, {0x047C,0x047D,0x047C}, - {0x047E,0x047F,0x047E}, {0x047E,0x047F,0x047E}, - {0x0480,0x0481,0x0480}, {0x0480,0x0481,0x0480}, - {0x0482,0x0482,0x0482}, {0x0483,0x0483,0x0483}, - {0x0484,0x0484,0x0484}, {0x0485,0x0485,0x0485}, - {0x0486,0x0486,0x0486}, {0x0487,0x0487,0x0487}, - {0x0488,0x0488,0x0488}, {0x0489,0x0489,0x0489}, - {0x048A,0x048A,0x048A}, {0x048B,0x048B,0x048B}, - {0x048C,0x048D,0x048C}, {0x048C,0x048D,0x048C}, - {0x048E,0x048F,0x048E}, {0x048E,0x048F,0x048E}, - {0x0490,0x0491,0x0490}, {0x0490,0x0491,0x0490}, - {0x0492,0x0493,0x0492}, {0x0492,0x0493,0x0492}, - {0x0494,0x0495,0x0494}, {0x0494,0x0495,0x0494}, - {0x0496,0x0497,0x0496}, {0x0496,0x0497,0x0496}, - {0x0498,0x0499,0x0498}, {0x0498,0x0499,0x0498}, - {0x049A,0x049B,0x049A}, {0x049A,0x049B,0x049A}, - {0x049C,0x049D,0x049C}, {0x049C,0x049D,0x049C}, - {0x049E,0x049F,0x049E}, {0x049E,0x049F,0x049E}, - {0x04A0,0x04A1,0x04A0}, {0x04A0,0x04A1,0x04A0}, - {0x04A2,0x04A3,0x04A2}, {0x04A2,0x04A3,0x04A2}, - {0x04A4,0x04A5,0x04A4}, {0x04A4,0x04A5,0x04A4}, - {0x04A6,0x04A7,0x04A6}, {0x04A6,0x04A7,0x04A6}, - {0x04A8,0x04A9,0x04A8}, {0x04A8,0x04A9,0x04A8}, - {0x04AA,0x04AB,0x04AA}, {0x04AA,0x04AB,0x04AA}, - {0x04AC,0x04AD,0x04AC}, {0x04AC,0x04AD,0x04AC}, - {0x04AE,0x04AF,0x04AE}, {0x04AE,0x04AF,0x04AE}, - {0x04B0,0x04B1,0x04B0}, {0x04B0,0x04B1,0x04B0}, - {0x04B2,0x04B3,0x04B2}, {0x04B2,0x04B3,0x04B2}, - {0x04B4,0x04B5,0x04B4}, {0x04B4,0x04B5,0x04B4}, - {0x04B6,0x04B7,0x04B6}, {0x04B6,0x04B7,0x04B6}, - {0x04B8,0x04B9,0x04B8}, {0x04B8,0x04B9,0x04B8}, - {0x04BA,0x04BB,0x04BA}, {0x04BA,0x04BB,0x04BA}, - {0x04BC,0x04BD,0x04BC}, {0x04BC,0x04BD,0x04BC}, - {0x04BE,0x04BF,0x04BE}, {0x04BE,0x04BF,0x04BE}, - {0x04C0,0x04C0,0x04C0}, {0x04C1,0x04C2,0x0416}, - {0x04C1,0x04C2,0x0416}, {0x04C3,0x04C4,0x04C3}, - {0x04C3,0x04C4,0x04C3}, {0x04C5,0x04C5,0x04C5}, - {0x04C6,0x04C6,0x04C6}, {0x04C7,0x04C8,0x04C7}, - {0x04C7,0x04C8,0x04C7}, {0x04C9,0x04C9,0x04C9}, - {0x04CA,0x04CA,0x04CA}, {0x04CB,0x04CC,0x04CB}, - {0x04CB,0x04CC,0x04CB}, {0x04CD,0x04CD,0x04CD}, - {0x04CE,0x04CE,0x04CE}, {0x04CF,0x04CF,0x04CF}, - {0x04D0,0x04D1,0x0410}, {0x04D0,0x04D1,0x0410}, - {0x04D2,0x04D3,0x0410}, {0x04D2,0x04D3,0x0410}, - {0x04D4,0x04D5,0x04D4}, {0x04D4,0x04D5,0x04D4}, - {0x04D6,0x04D7,0x0415}, {0x04D6,0x04D7,0x0415}, - {0x04D8,0x04D9,0x04D8}, {0x04D8,0x04D9,0x04D8}, - {0x04DA,0x04DB,0x04D8}, {0x04DA,0x04DB,0x04D8}, - {0x04DC,0x04DD,0x0416}, {0x04DC,0x04DD,0x0416}, - {0x04DE,0x04DF,0x0417}, {0x04DE,0x04DF,0x0417}, - {0x04E0,0x04E1,0x04E0}, {0x04E0,0x04E1,0x04E0}, - {0x04E2,0x04E3,0x0418}, {0x04E2,0x04E3,0x0418}, - {0x04E4,0x04E5,0x0418}, {0x04E4,0x04E5,0x0418}, - {0x04E6,0x04E7,0x041E}, {0x04E6,0x04E7,0x041E}, - {0x04E8,0x04E9,0x04E8}, {0x04E8,0x04E9,0x04E8}, - {0x04EA,0x04EB,0x04E8}, {0x04EA,0x04EB,0x04E8}, - {0x04EC,0x04ED,0x042D}, {0x04EC,0x04ED,0x042D}, - {0x04EE,0x04EF,0x0423}, {0x04EE,0x04EF,0x0423}, - {0x04F0,0x04F1,0x0423}, {0x04F0,0x04F1,0x0423}, - {0x04F2,0x04F3,0x0423}, {0x04F2,0x04F3,0x0423}, - {0x04F4,0x04F5,0x0427}, {0x04F4,0x04F5,0x0427}, - {0x04F6,0x04F6,0x04F6}, {0x04F7,0x04F7,0x04F7}, - {0x04F8,0x04F9,0x042B}, {0x04F8,0x04F9,0x042B}, - {0x04FA,0x04FA,0x04FA}, {0x04FB,0x04FB,0x04FB}, - {0x04FC,0x04FC,0x04FC}, {0x04FD,0x04FD,0x04FD}, - {0x04FE,0x04FE,0x04FE}, {0x04FF,0x04FF,0x04FF} -}; - -static MY_UNICASE_INFO plane05[]={ - {0x0500,0x0500,0x0500}, {0x0501,0x0501,0x0501}, - {0x0502,0x0502,0x0502}, {0x0503,0x0503,0x0503}, - {0x0504,0x0504,0x0504}, {0x0505,0x0505,0x0505}, - {0x0506,0x0506,0x0506}, {0x0507,0x0507,0x0507}, - {0x0508,0x0508,0x0508}, {0x0509,0x0509,0x0509}, - {0x050A,0x050A,0x050A}, {0x050B,0x050B,0x050B}, - {0x050C,0x050C,0x050C}, {0x050D,0x050D,0x050D}, - {0x050E,0x050E,0x050E}, {0x050F,0x050F,0x050F}, - {0x0510,0x0510,0x0510}, {0x0511,0x0511,0x0511}, - {0x0512,0x0512,0x0512}, {0x0513,0x0513,0x0513}, - {0x0514,0x0514,0x0514}, {0x0515,0x0515,0x0515}, - {0x0516,0x0516,0x0516}, {0x0517,0x0517,0x0517}, - {0x0518,0x0518,0x0518}, {0x0519,0x0519,0x0519}, - {0x051A,0x051A,0x051A}, {0x051B,0x051B,0x051B}, - {0x051C,0x051C,0x051C}, {0x051D,0x051D,0x051D}, - {0x051E,0x051E,0x051E}, {0x051F,0x051F,0x051F}, - {0x0520,0x0520,0x0520}, {0x0521,0x0521,0x0521}, - {0x0522,0x0522,0x0522}, {0x0523,0x0523,0x0523}, - {0x0524,0x0524,0x0524}, {0x0525,0x0525,0x0525}, - {0x0526,0x0526,0x0526}, {0x0527,0x0527,0x0527}, - {0x0528,0x0528,0x0528}, {0x0529,0x0529,0x0529}, - {0x052A,0x052A,0x052A}, {0x052B,0x052B,0x052B}, - {0x052C,0x052C,0x052C}, {0x052D,0x052D,0x052D}, - {0x052E,0x052E,0x052E}, {0x052F,0x052F,0x052F}, - {0x0530,0x0530,0x0530}, {0x0531,0x0561,0x0531}, - {0x0532,0x0562,0x0532}, {0x0533,0x0563,0x0533}, - {0x0534,0x0564,0x0534}, {0x0535,0x0565,0x0535}, - {0x0536,0x0566,0x0536}, {0x0537,0x0567,0x0537}, - {0x0538,0x0568,0x0538}, {0x0539,0x0569,0x0539}, - {0x053A,0x056A,0x053A}, {0x053B,0x056B,0x053B}, - {0x053C,0x056C,0x053C}, {0x053D,0x056D,0x053D}, - {0x053E,0x056E,0x053E}, {0x053F,0x056F,0x053F}, - {0x0540,0x0570,0x0540}, {0x0541,0x0571,0x0541}, - {0x0542,0x0572,0x0542}, {0x0543,0x0573,0x0543}, - {0x0544,0x0574,0x0544}, {0x0545,0x0575,0x0545}, - {0x0546,0x0576,0x0546}, {0x0547,0x0577,0x0547}, - {0x0548,0x0578,0x0548}, {0x0549,0x0579,0x0549}, - {0x054A,0x057A,0x054A}, {0x054B,0x057B,0x054B}, - {0x054C,0x057C,0x054C}, {0x054D,0x057D,0x054D}, - {0x054E,0x057E,0x054E}, {0x054F,0x057F,0x054F}, - {0x0550,0x0580,0x0550}, {0x0551,0x0581,0x0551}, - {0x0552,0x0582,0x0552}, {0x0553,0x0583,0x0553}, - {0x0554,0x0584,0x0554}, {0x0555,0x0585,0x0555}, - {0x0556,0x0586,0x0556}, {0x0557,0x0557,0x0557}, - {0x0558,0x0558,0x0558}, {0x0559,0x0559,0x0559}, - {0x055A,0x055A,0x055A}, {0x055B,0x055B,0x055B}, - {0x055C,0x055C,0x055C}, {0x055D,0x055D,0x055D}, - {0x055E,0x055E,0x055E}, {0x055F,0x055F,0x055F}, - {0x0560,0x0560,0x0560}, {0x0531,0x0561,0x0531}, - {0x0532,0x0562,0x0532}, {0x0533,0x0563,0x0533}, - {0x0534,0x0564,0x0534}, {0x0535,0x0565,0x0535}, - {0x0536,0x0566,0x0536}, {0x0537,0x0567,0x0537}, - {0x0538,0x0568,0x0538}, {0x0539,0x0569,0x0539}, - {0x053A,0x056A,0x053A}, {0x053B,0x056B,0x053B}, - {0x053C,0x056C,0x053C}, {0x053D,0x056D,0x053D}, - {0x053E,0x056E,0x053E}, {0x053F,0x056F,0x053F}, - {0x0540,0x0570,0x0540}, {0x0541,0x0571,0x0541}, - {0x0542,0x0572,0x0542}, {0x0543,0x0573,0x0543}, - {0x0544,0x0574,0x0544}, {0x0545,0x0575,0x0545}, - {0x0546,0x0576,0x0546}, {0x0547,0x0577,0x0547}, - {0x0548,0x0578,0x0548}, {0x0549,0x0579,0x0549}, - {0x054A,0x057A,0x054A}, {0x054B,0x057B,0x054B}, - {0x054C,0x057C,0x054C}, {0x054D,0x057D,0x054D}, - {0x054E,0x057E,0x054E}, {0x054F,0x057F,0x054F}, - {0x0550,0x0580,0x0550}, {0x0551,0x0581,0x0551}, - {0x0552,0x0582,0x0552}, {0x0553,0x0583,0x0553}, - {0x0554,0x0584,0x0554}, {0x0555,0x0585,0x0555}, - {0x0556,0x0586,0x0556}, {0x0587,0x0587,0x0587}, - {0x0588,0x0588,0x0588}, {0x0589,0x0589,0x0589}, - {0x058A,0x058A,0x058A}, {0x058B,0x058B,0x058B}, - {0x058C,0x058C,0x058C}, {0x058D,0x058D,0x058D}, - {0x058E,0x058E,0x058E}, {0x058F,0x058F,0x058F}, - {0x0590,0x0590,0x0590}, {0x0591,0x0591,0x0591}, - {0x0592,0x0592,0x0592}, {0x0593,0x0593,0x0593}, - {0x0594,0x0594,0x0594}, {0x0595,0x0595,0x0595}, - {0x0596,0x0596,0x0596}, {0x0597,0x0597,0x0597}, - {0x0598,0x0598,0x0598}, {0x0599,0x0599,0x0599}, - {0x059A,0x059A,0x059A}, {0x059B,0x059B,0x059B}, - {0x059C,0x059C,0x059C}, {0x059D,0x059D,0x059D}, - {0x059E,0x059E,0x059E}, {0x059F,0x059F,0x059F}, - {0x05A0,0x05A0,0x05A0}, {0x05A1,0x05A1,0x05A1}, - {0x05A2,0x05A2,0x05A2}, {0x05A3,0x05A3,0x05A3}, - {0x05A4,0x05A4,0x05A4}, {0x05A5,0x05A5,0x05A5}, - {0x05A6,0x05A6,0x05A6}, {0x05A7,0x05A7,0x05A7}, - {0x05A8,0x05A8,0x05A8}, {0x05A9,0x05A9,0x05A9}, - {0x05AA,0x05AA,0x05AA}, {0x05AB,0x05AB,0x05AB}, - {0x05AC,0x05AC,0x05AC}, {0x05AD,0x05AD,0x05AD}, - {0x05AE,0x05AE,0x05AE}, {0x05AF,0x05AF,0x05AF}, - {0x05B0,0x05B0,0x05B0}, {0x05B1,0x05B1,0x05B1}, - {0x05B2,0x05B2,0x05B2}, {0x05B3,0x05B3,0x05B3}, - {0x05B4,0x05B4,0x05B4}, {0x05B5,0x05B5,0x05B5}, - {0x05B6,0x05B6,0x05B6}, {0x05B7,0x05B7,0x05B7}, - {0x05B8,0x05B8,0x05B8}, {0x05B9,0x05B9,0x05B9}, - {0x05BA,0x05BA,0x05BA}, {0x05BB,0x05BB,0x05BB}, - {0x05BC,0x05BC,0x05BC}, {0x05BD,0x05BD,0x05BD}, - {0x05BE,0x05BE,0x05BE}, {0x05BF,0x05BF,0x05BF}, - {0x05C0,0x05C0,0x05C0}, {0x05C1,0x05C1,0x05C1}, - {0x05C2,0x05C2,0x05C2}, {0x05C3,0x05C3,0x05C3}, - {0x05C4,0x05C4,0x05C4}, {0x05C5,0x05C5,0x05C5}, - {0x05C6,0x05C6,0x05C6}, {0x05C7,0x05C7,0x05C7}, - {0x05C8,0x05C8,0x05C8}, {0x05C9,0x05C9,0x05C9}, - {0x05CA,0x05CA,0x05CA}, {0x05CB,0x05CB,0x05CB}, - {0x05CC,0x05CC,0x05CC}, {0x05CD,0x05CD,0x05CD}, - {0x05CE,0x05CE,0x05CE}, {0x05CF,0x05CF,0x05CF}, - {0x05D0,0x05D0,0x05D0}, {0x05D1,0x05D1,0x05D1}, - {0x05D2,0x05D2,0x05D2}, {0x05D3,0x05D3,0x05D3}, - {0x05D4,0x05D4,0x05D4}, {0x05D5,0x05D5,0x05D5}, - {0x05D6,0x05D6,0x05D6}, {0x05D7,0x05D7,0x05D7}, - {0x05D8,0x05D8,0x05D8}, {0x05D9,0x05D9,0x05D9}, - {0x05DA,0x05DA,0x05DA}, {0x05DB,0x05DB,0x05DB}, - {0x05DC,0x05DC,0x05DC}, {0x05DD,0x05DD,0x05DD}, - {0x05DE,0x05DE,0x05DE}, {0x05DF,0x05DF,0x05DF}, - {0x05E0,0x05E0,0x05E0}, {0x05E1,0x05E1,0x05E1}, - {0x05E2,0x05E2,0x05E2}, {0x05E3,0x05E3,0x05E3}, - {0x05E4,0x05E4,0x05E4}, {0x05E5,0x05E5,0x05E5}, - {0x05E6,0x05E6,0x05E6}, {0x05E7,0x05E7,0x05E7}, - {0x05E8,0x05E8,0x05E8}, {0x05E9,0x05E9,0x05E9}, - {0x05EA,0x05EA,0x05EA}, {0x05EB,0x05EB,0x05EB}, - {0x05EC,0x05EC,0x05EC}, {0x05ED,0x05ED,0x05ED}, - {0x05EE,0x05EE,0x05EE}, {0x05EF,0x05EF,0x05EF}, - {0x05F0,0x05F0,0x05F0}, {0x05F1,0x05F1,0x05F1}, - {0x05F2,0x05F2,0x05F2}, {0x05F3,0x05F3,0x05F3}, - {0x05F4,0x05F4,0x05F4}, {0x05F5,0x05F5,0x05F5}, - {0x05F6,0x05F6,0x05F6}, {0x05F7,0x05F7,0x05F7}, - {0x05F8,0x05F8,0x05F8}, {0x05F9,0x05F9,0x05F9}, - {0x05FA,0x05FA,0x05FA}, {0x05FB,0x05FB,0x05FB}, - {0x05FC,0x05FC,0x05FC}, {0x05FD,0x05FD,0x05FD}, - {0x05FE,0x05FE,0x05FE}, {0x05FF,0x05FF,0x05FF} -}; - -static MY_UNICASE_INFO plane1E[]={ - {0x1E00,0x1E01,0x0041}, {0x1E00,0x1E01,0x0041}, - {0x1E02,0x1E03,0x0042}, {0x1E02,0x1E03,0x0042}, - {0x1E04,0x1E05,0x0042}, {0x1E04,0x1E05,0x0042}, - {0x1E06,0x1E07,0x0042}, {0x1E06,0x1E07,0x0042}, - {0x1E08,0x1E09,0x0043}, {0x1E08,0x1E09,0x0043}, - {0x1E0A,0x1E0B,0x0044}, {0x1E0A,0x1E0B,0x0044}, - {0x1E0C,0x1E0D,0x0044}, {0x1E0C,0x1E0D,0x0044}, - {0x1E0E,0x1E0F,0x0044}, {0x1E0E,0x1E0F,0x0044}, - {0x1E10,0x1E11,0x0044}, {0x1E10,0x1E11,0x0044}, - {0x1E12,0x1E13,0x0044}, {0x1E12,0x1E13,0x0044}, - {0x1E14,0x1E15,0x0045}, {0x1E14,0x1E15,0x0045}, - {0x1E16,0x1E17,0x0045}, {0x1E16,0x1E17,0x0045}, - {0x1E18,0x1E19,0x0045}, {0x1E18,0x1E19,0x0045}, - {0x1E1A,0x1E1B,0x0045}, {0x1E1A,0x1E1B,0x0045}, - {0x1E1C,0x1E1D,0x0045}, {0x1E1C,0x1E1D,0x0045}, - {0x1E1E,0x1E1F,0x0046}, {0x1E1E,0x1E1F,0x0046}, - {0x1E20,0x1E21,0x0047}, {0x1E20,0x1E21,0x0047}, - {0x1E22,0x1E23,0x0048}, {0x1E22,0x1E23,0x0048}, - {0x1E24,0x1E25,0x0048}, {0x1E24,0x1E25,0x0048}, - {0x1E26,0x1E27,0x0048}, {0x1E26,0x1E27,0x0048}, - {0x1E28,0x1E29,0x0048}, {0x1E28,0x1E29,0x0048}, - {0x1E2A,0x1E2B,0x0048}, {0x1E2A,0x1E2B,0x0048}, - {0x1E2C,0x1E2D,0x0049}, {0x1E2C,0x1E2D,0x0049}, - {0x1E2E,0x1E2F,0x0049}, {0x1E2E,0x1E2F,0x0049}, - {0x1E30,0x1E31,0x004B}, {0x1E30,0x1E31,0x004B}, - {0x1E32,0x1E33,0x004B}, {0x1E32,0x1E33,0x004B}, - {0x1E34,0x1E35,0x004B}, {0x1E34,0x1E35,0x004B}, - {0x1E36,0x1E37,0x004C}, {0x1E36,0x1E37,0x004C}, - {0x1E38,0x1E39,0x004C}, {0x1E38,0x1E39,0x004C}, - {0x1E3A,0x1E3B,0x004C}, {0x1E3A,0x1E3B,0x004C}, - {0x1E3C,0x1E3D,0x004C}, {0x1E3C,0x1E3D,0x004C}, - {0x1E3E,0x1E3F,0x004D}, {0x1E3E,0x1E3F,0x004D}, - {0x1E40,0x1E41,0x004D}, {0x1E40,0x1E41,0x004D}, - {0x1E42,0x1E43,0x004D}, {0x1E42,0x1E43,0x004D}, - {0x1E44,0x1E45,0x004E}, {0x1E44,0x1E45,0x004E}, - {0x1E46,0x1E47,0x004E}, {0x1E46,0x1E47,0x004E}, - {0x1E48,0x1E49,0x004E}, {0x1E48,0x1E49,0x004E}, - {0x1E4A,0x1E4B,0x004E}, {0x1E4A,0x1E4B,0x004E}, - {0x1E4C,0x1E4D,0x004F}, {0x1E4C,0x1E4D,0x004F}, - {0x1E4E,0x1E4F,0x004F}, {0x1E4E,0x1E4F,0x004F}, - {0x1E50,0x1E51,0x004F}, {0x1E50,0x1E51,0x004F}, - {0x1E52,0x1E53,0x004F}, {0x1E52,0x1E53,0x004F}, - {0x1E54,0x1E55,0x0050}, {0x1E54,0x1E55,0x0050}, - {0x1E56,0x1E57,0x0050}, {0x1E56,0x1E57,0x0050}, - {0x1E58,0x1E59,0x0052}, {0x1E58,0x1E59,0x0052}, - {0x1E5A,0x1E5B,0x0052}, {0x1E5A,0x1E5B,0x0052}, - {0x1E5C,0x1E5D,0x0052}, {0x1E5C,0x1E5D,0x0052}, - {0x1E5E,0x1E5F,0x0052}, {0x1E5E,0x1E5F,0x0052}, - {0x1E60,0x1E61,0x0053}, {0x1E60,0x1E61,0x0053}, - {0x1E62,0x1E63,0x0053}, {0x1E62,0x1E63,0x0053}, - {0x1E64,0x1E65,0x0053}, {0x1E64,0x1E65,0x0053}, - {0x1E66,0x1E67,0x0053}, {0x1E66,0x1E67,0x0053}, - {0x1E68,0x1E69,0x0053}, {0x1E68,0x1E69,0x0053}, - {0x1E6A,0x1E6B,0x0054}, {0x1E6A,0x1E6B,0x0054}, - {0x1E6C,0x1E6D,0x0054}, {0x1E6C,0x1E6D,0x0054}, - {0x1E6E,0x1E6F,0x0054}, {0x1E6E,0x1E6F,0x0054}, - {0x1E70,0x1E71,0x0054}, {0x1E70,0x1E71,0x0054}, - {0x1E72,0x1E73,0x0055}, {0x1E72,0x1E73,0x0055}, - {0x1E74,0x1E75,0x0055}, {0x1E74,0x1E75,0x0055}, - {0x1E76,0x1E77,0x0055}, {0x1E76,0x1E77,0x0055}, - {0x1E78,0x1E79,0x0055}, {0x1E78,0x1E79,0x0055}, - {0x1E7A,0x1E7B,0x0055}, {0x1E7A,0x1E7B,0x0055}, - {0x1E7C,0x1E7D,0x0056}, {0x1E7C,0x1E7D,0x0056}, - {0x1E7E,0x1E7F,0x0056}, {0x1E7E,0x1E7F,0x0056}, - {0x1E80,0x1E81,0x0057}, {0x1E80,0x1E81,0x0057}, - {0x1E82,0x1E83,0x0057}, {0x1E82,0x1E83,0x0057}, - {0x1E84,0x1E85,0x0057}, {0x1E84,0x1E85,0x0057}, - {0x1E86,0x1E87,0x0057}, {0x1E86,0x1E87,0x0057}, - {0x1E88,0x1E89,0x0057}, {0x1E88,0x1E89,0x0057}, - {0x1E8A,0x1E8B,0x0058}, {0x1E8A,0x1E8B,0x0058}, - {0x1E8C,0x1E8D,0x0058}, {0x1E8C,0x1E8D,0x0058}, - {0x1E8E,0x1E8F,0x0059}, {0x1E8E,0x1E8F,0x0059}, - {0x1E90,0x1E91,0x005A}, {0x1E90,0x1E91,0x005A}, - {0x1E92,0x1E93,0x005A}, {0x1E92,0x1E93,0x005A}, - {0x1E94,0x1E95,0x005A}, {0x1E94,0x1E95,0x005A}, - {0x1E96,0x1E96,0x0048}, {0x1E97,0x1E97,0x0054}, - {0x1E98,0x1E98,0x0057}, {0x1E99,0x1E99,0x0059}, - {0x1E9A,0x1E9A,0x1E9A}, {0x1E60,0x1E9B,0x0053}, - {0x1E9C,0x1E9C,0x1E9C}, {0x1E9D,0x1E9D,0x1E9D}, - {0x1E9E,0x1E9E,0x1E9E}, {0x1E9F,0x1E9F,0x1E9F}, - {0x1EA0,0x1EA1,0x0041}, {0x1EA0,0x1EA1,0x0041}, - {0x1EA2,0x1EA3,0x0041}, {0x1EA2,0x1EA3,0x0041}, - {0x1EA4,0x1EA5,0x0041}, {0x1EA4,0x1EA5,0x0041}, - {0x1EA6,0x1EA7,0x0041}, {0x1EA6,0x1EA7,0x0041}, - {0x1EA8,0x1EA9,0x0041}, {0x1EA8,0x1EA9,0x0041}, - {0x1EAA,0x1EAB,0x0041}, {0x1EAA,0x1EAB,0x0041}, - {0x1EAC,0x1EAD,0x0041}, {0x1EAC,0x1EAD,0x0041}, - {0x1EAE,0x1EAF,0x0041}, {0x1EAE,0x1EAF,0x0041}, - {0x1EB0,0x1EB1,0x0041}, {0x1EB0,0x1EB1,0x0041}, - {0x1EB2,0x1EB3,0x0041}, {0x1EB2,0x1EB3,0x0041}, - {0x1EB4,0x1EB5,0x0041}, {0x1EB4,0x1EB5,0x0041}, - {0x1EB6,0x1EB7,0x0041}, {0x1EB6,0x1EB7,0x0041}, - {0x1EB8,0x1EB9,0x0045}, {0x1EB8,0x1EB9,0x0045}, - {0x1EBA,0x1EBB,0x0045}, {0x1EBA,0x1EBB,0x0045}, - {0x1EBC,0x1EBD,0x0045}, {0x1EBC,0x1EBD,0x0045}, - {0x1EBE,0x1EBF,0x0045}, {0x1EBE,0x1EBF,0x0045}, - {0x1EC0,0x1EC1,0x0045}, {0x1EC0,0x1EC1,0x0045}, - {0x1EC2,0x1EC3,0x0045}, {0x1EC2,0x1EC3,0x0045}, - {0x1EC4,0x1EC5,0x0045}, {0x1EC4,0x1EC5,0x0045}, - {0x1EC6,0x1EC7,0x0045}, {0x1EC6,0x1EC7,0x0045}, - {0x1EC8,0x1EC9,0x0049}, {0x1EC8,0x1EC9,0x0049}, - {0x1ECA,0x1ECB,0x0049}, {0x1ECA,0x1ECB,0x0049}, - {0x1ECC,0x1ECD,0x004F}, {0x1ECC,0x1ECD,0x004F}, - {0x1ECE,0x1ECF,0x004F}, {0x1ECE,0x1ECF,0x004F}, - {0x1ED0,0x1ED1,0x004F}, {0x1ED0,0x1ED1,0x004F}, - {0x1ED2,0x1ED3,0x004F}, {0x1ED2,0x1ED3,0x004F}, - {0x1ED4,0x1ED5,0x004F}, {0x1ED4,0x1ED5,0x004F}, - {0x1ED6,0x1ED7,0x004F}, {0x1ED6,0x1ED7,0x004F}, - {0x1ED8,0x1ED9,0x004F}, {0x1ED8,0x1ED9,0x004F}, - {0x1EDA,0x1EDB,0x004F}, {0x1EDA,0x1EDB,0x004F}, - {0x1EDC,0x1EDD,0x004F}, {0x1EDC,0x1EDD,0x004F}, - {0x1EDE,0x1EDF,0x004F}, {0x1EDE,0x1EDF,0x004F}, - {0x1EE0,0x1EE1,0x004F}, {0x1EE0,0x1EE1,0x004F}, - {0x1EE2,0x1EE3,0x004F}, {0x1EE2,0x1EE3,0x004F}, - {0x1EE4,0x1EE5,0x0055}, {0x1EE4,0x1EE5,0x0055}, - {0x1EE6,0x1EE7,0x0055}, {0x1EE6,0x1EE7,0x0055}, - {0x1EE8,0x1EE9,0x0055}, {0x1EE8,0x1EE9,0x0055}, - {0x1EEA,0x1EEB,0x0055}, {0x1EEA,0x1EEB,0x0055}, - {0x1EEC,0x1EED,0x0055}, {0x1EEC,0x1EED,0x0055}, - {0x1EEE,0x1EEF,0x0055}, {0x1EEE,0x1EEF,0x0055}, - {0x1EF0,0x1EF1,0x0055}, {0x1EF0,0x1EF1,0x0055}, - {0x1EF2,0x1EF3,0x0059}, {0x1EF2,0x1EF3,0x0059}, - {0x1EF4,0x1EF5,0x0059}, {0x1EF4,0x1EF5,0x0059}, - {0x1EF6,0x1EF7,0x0059}, {0x1EF6,0x1EF7,0x0059}, - {0x1EF8,0x1EF9,0x0059}, {0x1EF8,0x1EF9,0x0059}, - {0x1EFA,0x1EFA,0x1EFA}, {0x1EFB,0x1EFB,0x1EFB}, - {0x1EFC,0x1EFC,0x1EFC}, {0x1EFD,0x1EFD,0x1EFD}, - {0x1EFE,0x1EFE,0x1EFE}, {0x1EFF,0x1EFF,0x1EFF} -}; - -static MY_UNICASE_INFO plane1F[]={ - {0x1F08,0x1F00,0x0391}, {0x1F09,0x1F01,0x0391}, - {0x1F0A,0x1F02,0x0391}, {0x1F0B,0x1F03,0x0391}, - {0x1F0C,0x1F04,0x0391}, {0x1F0D,0x1F05,0x0391}, - {0x1F0E,0x1F06,0x0391}, {0x1F0F,0x1F07,0x0391}, - {0x1F08,0x1F00,0x0391}, {0x1F09,0x1F01,0x0391}, - {0x1F0A,0x1F02,0x0391}, {0x1F0B,0x1F03,0x0391}, - {0x1F0C,0x1F04,0x0391}, {0x1F0D,0x1F05,0x0391}, - {0x1F0E,0x1F06,0x0391}, {0x1F0F,0x1F07,0x0391}, - {0x1F18,0x1F10,0x0395}, {0x1F19,0x1F11,0x0395}, - {0x1F1A,0x1F12,0x0395}, {0x1F1B,0x1F13,0x0395}, - {0x1F1C,0x1F14,0x0395}, {0x1F1D,0x1F15,0x0395}, - {0x1F16,0x1F16,0x1F16}, {0x1F17,0x1F17,0x1F17}, - {0x1F18,0x1F10,0x0395}, {0x1F19,0x1F11,0x0395}, - {0x1F1A,0x1F12,0x0395}, {0x1F1B,0x1F13,0x0395}, - {0x1F1C,0x1F14,0x0395}, {0x1F1D,0x1F15,0x0395}, - {0x1F1E,0x1F1E,0x1F1E}, {0x1F1F,0x1F1F,0x1F1F}, - {0x1F28,0x1F20,0x0397}, {0x1F29,0x1F21,0x0397}, - {0x1F2A,0x1F22,0x0397}, {0x1F2B,0x1F23,0x0397}, - {0x1F2C,0x1F24,0x0397}, {0x1F2D,0x1F25,0x0397}, - {0x1F2E,0x1F26,0x0397}, {0x1F2F,0x1F27,0x0397}, - {0x1F28,0x1F20,0x0397}, {0x1F29,0x1F21,0x0397}, - {0x1F2A,0x1F22,0x0397}, {0x1F2B,0x1F23,0x0397}, - {0x1F2C,0x1F24,0x0397}, {0x1F2D,0x1F25,0x0397}, - {0x1F2E,0x1F26,0x0397}, {0x1F2F,0x1F27,0x0397}, - {0x1F38,0x1F30,0x0399}, {0x1F39,0x1F31,0x0399}, - {0x1F3A,0x1F32,0x0399}, {0x1F3B,0x1F33,0x0399}, - {0x1F3C,0x1F34,0x0399}, {0x1F3D,0x1F35,0x0399}, - {0x1F3E,0x1F36,0x0399}, {0x1F3F,0x1F37,0x0399}, - {0x1F38,0x1F30,0x0399}, {0x1F39,0x1F31,0x0399}, - {0x1F3A,0x1F32,0x0399}, {0x1F3B,0x1F33,0x0399}, - {0x1F3C,0x1F34,0x0399}, {0x1F3D,0x1F35,0x0399}, - {0x1F3E,0x1F36,0x0399}, {0x1F3F,0x1F37,0x0399}, - {0x1F48,0x1F40,0x039F}, {0x1F49,0x1F41,0x039F}, - {0x1F4A,0x1F42,0x039F}, {0x1F4B,0x1F43,0x039F}, - {0x1F4C,0x1F44,0x039F}, {0x1F4D,0x1F45,0x039F}, - {0x1F46,0x1F46,0x1F46}, {0x1F47,0x1F47,0x1F47}, - {0x1F48,0x1F40,0x039F}, {0x1F49,0x1F41,0x039F}, - {0x1F4A,0x1F42,0x039F}, {0x1F4B,0x1F43,0x039F}, - {0x1F4C,0x1F44,0x039F}, {0x1F4D,0x1F45,0x039F}, - {0x1F4E,0x1F4E,0x1F4E}, {0x1F4F,0x1F4F,0x1F4F}, - {0x1F50,0x1F50,0x03A5}, {0x1F59,0x1F51,0x03A5}, - {0x1F52,0x1F52,0x03A5}, {0x1F5B,0x1F53,0x03A5}, - {0x1F54,0x1F54,0x03A5}, {0x1F5D,0x1F55,0x03A5}, - {0x1F56,0x1F56,0x03A5}, {0x1F5F,0x1F57,0x03A5}, - {0x1F58,0x1F58,0x1F58}, {0x1F59,0x1F51,0x03A5}, - {0x1F5A,0x1F5A,0x1F5A}, {0x1F5B,0x1F53,0x03A5}, - {0x1F5C,0x1F5C,0x1F5C}, {0x1F5D,0x1F55,0x03A5}, - {0x1F5E,0x1F5E,0x1F5E}, {0x1F5F,0x1F57,0x03A5}, - {0x1F68,0x1F60,0x03A9}, {0x1F69,0x1F61,0x03A9}, - {0x1F6A,0x1F62,0x03A9}, {0x1F6B,0x1F63,0x03A9}, - {0x1F6C,0x1F64,0x03A9}, {0x1F6D,0x1F65,0x03A9}, - {0x1F6E,0x1F66,0x03A9}, {0x1F6F,0x1F67,0x03A9}, - {0x1F68,0x1F60,0x03A9}, {0x1F69,0x1F61,0x03A9}, - {0x1F6A,0x1F62,0x03A9}, {0x1F6B,0x1F63,0x03A9}, - {0x1F6C,0x1F64,0x03A9}, {0x1F6D,0x1F65,0x03A9}, - {0x1F6E,0x1F66,0x03A9}, {0x1F6F,0x1F67,0x03A9}, - {0x1FBA,0x1F70,0x0391}, {0x1FBB,0x1F71,0x1FBB}, - {0x1FC8,0x1F72,0x0395}, {0x1FC9,0x1F73,0x1FC9}, - {0x1FCA,0x1F74,0x0397}, {0x1FCB,0x1F75,0x1FCB}, - {0x1FDA,0x1F76,0x0399}, {0x1FDB,0x1F77,0x1FDB}, - {0x1FF8,0x1F78,0x039F}, {0x1FF9,0x1F79,0x1FF9}, - {0x1FEA,0x1F7A,0x03A5}, {0x1FEB,0x1F7B,0x1FEB}, - {0x1FFA,0x1F7C,0x03A9}, {0x1FFB,0x1F7D,0x1FFB}, - {0x1F7E,0x1F7E,0x1F7E}, {0x1F7F,0x1F7F,0x1F7F}, - {0x1F88,0x1F80,0x0391}, {0x1F89,0x1F81,0x0391}, - {0x1F8A,0x1F82,0x0391}, {0x1F8B,0x1F83,0x0391}, - {0x1F8C,0x1F84,0x0391}, {0x1F8D,0x1F85,0x0391}, - {0x1F8E,0x1F86,0x0391}, {0x1F8F,0x1F87,0x0391}, - {0x1F88,0x1F80,0x0391}, {0x1F89,0x1F81,0x0391}, - {0x1F8A,0x1F82,0x0391}, {0x1F8B,0x1F83,0x0391}, - {0x1F8C,0x1F84,0x0391}, {0x1F8D,0x1F85,0x0391}, - {0x1F8E,0x1F86,0x0391}, {0x1F8F,0x1F87,0x0391}, - {0x1F98,0x1F90,0x0397}, {0x1F99,0x1F91,0x0397}, - {0x1F9A,0x1F92,0x0397}, {0x1F9B,0x1F93,0x0397}, - {0x1F9C,0x1F94,0x0397}, {0x1F9D,0x1F95,0x0397}, - {0x1F9E,0x1F96,0x0397}, {0x1F9F,0x1F97,0x0397}, - {0x1F98,0x1F90,0x0397}, {0x1F99,0x1F91,0x0397}, - {0x1F9A,0x1F92,0x0397}, {0x1F9B,0x1F93,0x0397}, - {0x1F9C,0x1F94,0x0397}, {0x1F9D,0x1F95,0x0397}, - {0x1F9E,0x1F96,0x0397}, {0x1F9F,0x1F97,0x0397}, - {0x1FA8,0x1FA0,0x03A9}, {0x1FA9,0x1FA1,0x03A9}, - {0x1FAA,0x1FA2,0x03A9}, {0x1FAB,0x1FA3,0x03A9}, - {0x1FAC,0x1FA4,0x03A9}, {0x1FAD,0x1FA5,0x03A9}, - {0x1FAE,0x1FA6,0x03A9}, {0x1FAF,0x1FA7,0x03A9}, - {0x1FA8,0x1FA0,0x03A9}, {0x1FA9,0x1FA1,0x03A9}, - {0x1FAA,0x1FA2,0x03A9}, {0x1FAB,0x1FA3,0x03A9}, - {0x1FAC,0x1FA4,0x03A9}, {0x1FAD,0x1FA5,0x03A9}, - {0x1FAE,0x1FA6,0x03A9}, {0x1FAF,0x1FA7,0x03A9}, - {0x1FB8,0x1FB0,0x0391}, {0x1FB9,0x1FB1,0x0391}, - {0x1FB2,0x1FB2,0x0391}, {0x1FBC,0x1FB3,0x0391}, - {0x1FB4,0x1FB4,0x0391}, {0x1FB5,0x1FB5,0x1FB5}, - {0x1FB6,0x1FB6,0x0391}, {0x1FB7,0x1FB7,0x0391}, - {0x1FB8,0x1FB0,0x0391}, {0x1FB9,0x1FB1,0x0391}, - {0x1FBA,0x1F70,0x0391}, {0x1FBB,0x1F71,0x1FBB}, - {0x1FBC,0x1FB3,0x0391}, {0x1FBD,0x1FBD,0x1FBD}, - {0x0399,0x1FBE,0x0399}, {0x1FBF,0x1FBF,0x1FBF}, - {0x1FC0,0x1FC0,0x1FC0}, {0x1FC1,0x1FC1,0x1FC1}, - {0x1FC2,0x1FC2,0x0397}, {0x1FCC,0x1FC3,0x0397}, - {0x1FC4,0x1FC4,0x0397}, {0x1FC5,0x1FC5,0x1FC5}, - {0x1FC6,0x1FC6,0x0397}, {0x1FC7,0x1FC7,0x0397}, - {0x1FC8,0x1F72,0x0395}, {0x1FC9,0x1F73,0x1FC9}, - {0x1FCA,0x1F74,0x0397}, {0x1FCB,0x1F75,0x1FCB}, - {0x1FCC,0x1FC3,0x0397}, {0x1FCD,0x1FCD,0x1FCD}, - {0x1FCE,0x1FCE,0x1FCE}, {0x1FCF,0x1FCF,0x1FCF}, - {0x1FD8,0x1FD0,0x0399}, {0x1FD9,0x1FD1,0x0399}, - {0x1FD2,0x1FD2,0x0399}, {0x1FD3,0x1FD3,0x1FD3}, - {0x1FD4,0x1FD4,0x1FD4}, {0x1FD5,0x1FD5,0x1FD5}, - {0x1FD6,0x1FD6,0x0399}, {0x1FD7,0x1FD7,0x0399}, - {0x1FD8,0x1FD0,0x0399}, {0x1FD9,0x1FD1,0x0399}, - {0x1FDA,0x1F76,0x0399}, {0x1FDB,0x1F77,0x1FDB}, - {0x1FDC,0x1FDC,0x1FDC}, {0x1FDD,0x1FDD,0x1FDD}, - {0x1FDE,0x1FDE,0x1FDE}, {0x1FDF,0x1FDF,0x1FDF}, - {0x1FE8,0x1FE0,0x03A5}, {0x1FE9,0x1FE1,0x03A5}, - {0x1FE2,0x1FE2,0x03A5}, {0x1FE3,0x1FE3,0x1FE3}, - {0x1FE4,0x1FE4,0x03A1}, {0x1FEC,0x1FE5,0x03A1}, - {0x1FE6,0x1FE6,0x03A5}, {0x1FE7,0x1FE7,0x03A5}, - {0x1FE8,0x1FE0,0x03A5}, {0x1FE9,0x1FE1,0x03A5}, - {0x1FEA,0x1F7A,0x03A5}, {0x1FEB,0x1F7B,0x1FEB}, - {0x1FEC,0x1FE5,0x03A1}, {0x1FED,0x1FED,0x1FED}, - {0x1FEE,0x1FEE,0x1FEE}, {0x1FEF,0x1FEF,0x1FEF}, - {0x1FF0,0x1FF0,0x1FF0}, {0x1FF1,0x1FF1,0x1FF1}, - {0x1FF2,0x1FF2,0x03A9}, {0x1FFC,0x1FF3,0x03A9}, - {0x1FF4,0x1FF4,0x03A9}, {0x1FF5,0x1FF5,0x1FF5}, - {0x1FF6,0x1FF6,0x03A9}, {0x1FF7,0x1FF7,0x03A9}, - {0x1FF8,0x1F78,0x039F}, {0x1FF9,0x1F79,0x1FF9}, - {0x1FFA,0x1F7C,0x03A9}, {0x1FFB,0x1F7D,0x1FFB}, - {0x1FFC,0x1FF3,0x03A9}, {0x1FFD,0x1FFD,0x1FFD}, - {0x1FFE,0x1FFE,0x1FFE}, {0x1FFF,0x1FFF,0x1FFF} -}; - -static MY_UNICASE_INFO plane21[]={ - {0x2100,0x2100,0x2100}, {0x2101,0x2101,0x2101}, - {0x2102,0x2102,0x2102}, {0x2103,0x2103,0x2103}, - {0x2104,0x2104,0x2104}, {0x2105,0x2105,0x2105}, - {0x2106,0x2106,0x2106}, {0x2107,0x2107,0x2107}, - {0x2108,0x2108,0x2108}, {0x2109,0x2109,0x2109}, - {0x210A,0x210A,0x210A}, {0x210B,0x210B,0x210B}, - {0x210C,0x210C,0x210C}, {0x210D,0x210D,0x210D}, - {0x210E,0x210E,0x210E}, {0x210F,0x210F,0x210F}, - {0x2110,0x2110,0x2110}, {0x2111,0x2111,0x2111}, - {0x2112,0x2112,0x2112}, {0x2113,0x2113,0x2113}, - {0x2114,0x2114,0x2114}, {0x2115,0x2115,0x2115}, - {0x2116,0x2116,0x2116}, {0x2117,0x2117,0x2117}, - {0x2118,0x2118,0x2118}, {0x2119,0x2119,0x2119}, - {0x211A,0x211A,0x211A}, {0x211B,0x211B,0x211B}, - {0x211C,0x211C,0x211C}, {0x211D,0x211D,0x211D}, - {0x211E,0x211E,0x211E}, {0x211F,0x211F,0x211F}, - {0x2120,0x2120,0x2120}, {0x2121,0x2121,0x2121}, - {0x2122,0x2122,0x2122}, {0x2123,0x2123,0x2123}, - {0x2124,0x2124,0x2124}, {0x2125,0x2125,0x2125}, - {0x2126,0x03C9,0x2126}, {0x2127,0x2127,0x2127}, - {0x2128,0x2128,0x2128}, {0x2129,0x2129,0x2129}, - {0x212A,0x006B,0x212A}, {0x212B,0x00E5,0x212B}, - {0x212C,0x212C,0x212C}, {0x212D,0x212D,0x212D}, - {0x212E,0x212E,0x212E}, {0x212F,0x212F,0x212F}, - {0x2130,0x2130,0x2130}, {0x2131,0x2131,0x2131}, - {0x2132,0x2132,0x2132}, {0x2133,0x2133,0x2133}, - {0x2134,0x2134,0x2134}, {0x2135,0x2135,0x2135}, - {0x2136,0x2136,0x2136}, {0x2137,0x2137,0x2137}, - {0x2138,0x2138,0x2138}, {0x2139,0x2139,0x2139}, - {0x213A,0x213A,0x213A}, {0x213B,0x213B,0x213B}, - {0x213C,0x213C,0x213C}, {0x213D,0x213D,0x213D}, - {0x213E,0x213E,0x213E}, {0x213F,0x213F,0x213F}, - {0x2140,0x2140,0x2140}, {0x2141,0x2141,0x2141}, - {0x2142,0x2142,0x2142}, {0x2143,0x2143,0x2143}, - {0x2144,0x2144,0x2144}, {0x2145,0x2145,0x2145}, - {0x2146,0x2146,0x2146}, {0x2147,0x2147,0x2147}, - {0x2148,0x2148,0x2148}, {0x2149,0x2149,0x2149}, - {0x214A,0x214A,0x214A}, {0x214B,0x214B,0x214B}, - {0x214C,0x214C,0x214C}, {0x214D,0x214D,0x214D}, - {0x214E,0x214E,0x214E}, {0x214F,0x214F,0x214F}, - {0x2150,0x2150,0x2150}, {0x2151,0x2151,0x2151}, - {0x2152,0x2152,0x2152}, {0x2153,0x2153,0x2153}, - {0x2154,0x2154,0x2154}, {0x2155,0x2155,0x2155}, - {0x2156,0x2156,0x2156}, {0x2157,0x2157,0x2157}, - {0x2158,0x2158,0x2158}, {0x2159,0x2159,0x2159}, - {0x215A,0x215A,0x215A}, {0x215B,0x215B,0x215B}, - {0x215C,0x215C,0x215C}, {0x215D,0x215D,0x215D}, - {0x215E,0x215E,0x215E}, {0x215F,0x215F,0x215F}, - {0x2160,0x2170,0x2160}, {0x2161,0x2171,0x2161}, - {0x2162,0x2172,0x2162}, {0x2163,0x2173,0x2163}, - {0x2164,0x2174,0x2164}, {0x2165,0x2175,0x2165}, - {0x2166,0x2176,0x2166}, {0x2167,0x2177,0x2167}, - {0x2168,0x2178,0x2168}, {0x2169,0x2179,0x2169}, - {0x216A,0x217A,0x216A}, {0x216B,0x217B,0x216B}, - {0x216C,0x217C,0x216C}, {0x216D,0x217D,0x216D}, - {0x216E,0x217E,0x216E}, {0x216F,0x217F,0x216F}, - {0x2160,0x2170,0x2160}, {0x2161,0x2171,0x2161}, - {0x2162,0x2172,0x2162}, {0x2163,0x2173,0x2163}, - {0x2164,0x2174,0x2164}, {0x2165,0x2175,0x2165}, - {0x2166,0x2176,0x2166}, {0x2167,0x2177,0x2167}, - {0x2168,0x2178,0x2168}, {0x2169,0x2179,0x2169}, - {0x216A,0x217A,0x216A}, {0x216B,0x217B,0x216B}, - {0x216C,0x217C,0x216C}, {0x216D,0x217D,0x216D}, - {0x216E,0x217E,0x216E}, {0x216F,0x217F,0x216F}, - {0x2180,0x2180,0x2180}, {0x2181,0x2181,0x2181}, - {0x2182,0x2182,0x2182}, {0x2183,0x2183,0x2183}, - {0x2184,0x2184,0x2184}, {0x2185,0x2185,0x2185}, - {0x2186,0x2186,0x2186}, {0x2187,0x2187,0x2187}, - {0x2188,0x2188,0x2188}, {0x2189,0x2189,0x2189}, - {0x218A,0x218A,0x218A}, {0x218B,0x218B,0x218B}, - {0x218C,0x218C,0x218C}, {0x218D,0x218D,0x218D}, - {0x218E,0x218E,0x218E}, {0x218F,0x218F,0x218F}, - {0x2190,0x2190,0x2190}, {0x2191,0x2191,0x2191}, - {0x2192,0x2192,0x2192}, {0x2193,0x2193,0x2193}, - {0x2194,0x2194,0x2194}, {0x2195,0x2195,0x2195}, - {0x2196,0x2196,0x2196}, {0x2197,0x2197,0x2197}, - {0x2198,0x2198,0x2198}, {0x2199,0x2199,0x2199}, - {0x219A,0x219A,0x219A}, {0x219B,0x219B,0x219B}, - {0x219C,0x219C,0x219C}, {0x219D,0x219D,0x219D}, - {0x219E,0x219E,0x219E}, {0x219F,0x219F,0x219F}, - {0x21A0,0x21A0,0x21A0}, {0x21A1,0x21A1,0x21A1}, - {0x21A2,0x21A2,0x21A2}, {0x21A3,0x21A3,0x21A3}, - {0x21A4,0x21A4,0x21A4}, {0x21A5,0x21A5,0x21A5}, - {0x21A6,0x21A6,0x21A6}, {0x21A7,0x21A7,0x21A7}, - {0x21A8,0x21A8,0x21A8}, {0x21A9,0x21A9,0x21A9}, - {0x21AA,0x21AA,0x21AA}, {0x21AB,0x21AB,0x21AB}, - {0x21AC,0x21AC,0x21AC}, {0x21AD,0x21AD,0x21AD}, - {0x21AE,0x21AE,0x21AE}, {0x21AF,0x21AF,0x21AF}, - {0x21B0,0x21B0,0x21B0}, {0x21B1,0x21B1,0x21B1}, - {0x21B2,0x21B2,0x21B2}, {0x21B3,0x21B3,0x21B3}, - {0x21B4,0x21B4,0x21B4}, {0x21B5,0x21B5,0x21B5}, - {0x21B6,0x21B6,0x21B6}, {0x21B7,0x21B7,0x21B7}, - {0x21B8,0x21B8,0x21B8}, {0x21B9,0x21B9,0x21B9}, - {0x21BA,0x21BA,0x21BA}, {0x21BB,0x21BB,0x21BB}, - {0x21BC,0x21BC,0x21BC}, {0x21BD,0x21BD,0x21BD}, - {0x21BE,0x21BE,0x21BE}, {0x21BF,0x21BF,0x21BF}, - {0x21C0,0x21C0,0x21C0}, {0x21C1,0x21C1,0x21C1}, - {0x21C2,0x21C2,0x21C2}, {0x21C3,0x21C3,0x21C3}, - {0x21C4,0x21C4,0x21C4}, {0x21C5,0x21C5,0x21C5}, - {0x21C6,0x21C6,0x21C6}, {0x21C7,0x21C7,0x21C7}, - {0x21C8,0x21C8,0x21C8}, {0x21C9,0x21C9,0x21C9}, - {0x21CA,0x21CA,0x21CA}, {0x21CB,0x21CB,0x21CB}, - {0x21CC,0x21CC,0x21CC}, {0x21CD,0x21CD,0x21CD}, - {0x21CE,0x21CE,0x21CE}, {0x21CF,0x21CF,0x21CF}, - {0x21D0,0x21D0,0x21D0}, {0x21D1,0x21D1,0x21D1}, - {0x21D2,0x21D2,0x21D2}, {0x21D3,0x21D3,0x21D3}, - {0x21D4,0x21D4,0x21D4}, {0x21D5,0x21D5,0x21D5}, - {0x21D6,0x21D6,0x21D6}, {0x21D7,0x21D7,0x21D7}, - {0x21D8,0x21D8,0x21D8}, {0x21D9,0x21D9,0x21D9}, - {0x21DA,0x21DA,0x21DA}, {0x21DB,0x21DB,0x21DB}, - {0x21DC,0x21DC,0x21DC}, {0x21DD,0x21DD,0x21DD}, - {0x21DE,0x21DE,0x21DE}, {0x21DF,0x21DF,0x21DF}, - {0x21E0,0x21E0,0x21E0}, {0x21E1,0x21E1,0x21E1}, - {0x21E2,0x21E2,0x21E2}, {0x21E3,0x21E3,0x21E3}, - {0x21E4,0x21E4,0x21E4}, {0x21E5,0x21E5,0x21E5}, - {0x21E6,0x21E6,0x21E6}, {0x21E7,0x21E7,0x21E7}, - {0x21E8,0x21E8,0x21E8}, {0x21E9,0x21E9,0x21E9}, - {0x21EA,0x21EA,0x21EA}, {0x21EB,0x21EB,0x21EB}, - {0x21EC,0x21EC,0x21EC}, {0x21ED,0x21ED,0x21ED}, - {0x21EE,0x21EE,0x21EE}, {0x21EF,0x21EF,0x21EF}, - {0x21F0,0x21F0,0x21F0}, {0x21F1,0x21F1,0x21F1}, - {0x21F2,0x21F2,0x21F2}, {0x21F3,0x21F3,0x21F3}, - {0x21F4,0x21F4,0x21F4}, {0x21F5,0x21F5,0x21F5}, - {0x21F6,0x21F6,0x21F6}, {0x21F7,0x21F7,0x21F7}, - {0x21F8,0x21F8,0x21F8}, {0x21F9,0x21F9,0x21F9}, - {0x21FA,0x21FA,0x21FA}, {0x21FB,0x21FB,0x21FB}, - {0x21FC,0x21FC,0x21FC}, {0x21FD,0x21FD,0x21FD}, - {0x21FE,0x21FE,0x21FE}, {0x21FF,0x21FF,0x21FF} -}; - -static MY_UNICASE_INFO plane24[]={ - {0x2400,0x2400,0x2400}, {0x2401,0x2401,0x2401}, - {0x2402,0x2402,0x2402}, {0x2403,0x2403,0x2403}, - {0x2404,0x2404,0x2404}, {0x2405,0x2405,0x2405}, - {0x2406,0x2406,0x2406}, {0x2407,0x2407,0x2407}, - {0x2408,0x2408,0x2408}, {0x2409,0x2409,0x2409}, - {0x240A,0x240A,0x240A}, {0x240B,0x240B,0x240B}, - {0x240C,0x240C,0x240C}, {0x240D,0x240D,0x240D}, - {0x240E,0x240E,0x240E}, {0x240F,0x240F,0x240F}, - {0x2410,0x2410,0x2410}, {0x2411,0x2411,0x2411}, - {0x2412,0x2412,0x2412}, {0x2413,0x2413,0x2413}, - {0x2414,0x2414,0x2414}, {0x2415,0x2415,0x2415}, - {0x2416,0x2416,0x2416}, {0x2417,0x2417,0x2417}, - {0x2418,0x2418,0x2418}, {0x2419,0x2419,0x2419}, - {0x241A,0x241A,0x241A}, {0x241B,0x241B,0x241B}, - {0x241C,0x241C,0x241C}, {0x241D,0x241D,0x241D}, - {0x241E,0x241E,0x241E}, {0x241F,0x241F,0x241F}, - {0x2420,0x2420,0x2420}, {0x2421,0x2421,0x2421}, - {0x2422,0x2422,0x2422}, {0x2423,0x2423,0x2423}, - {0x2424,0x2424,0x2424}, {0x2425,0x2425,0x2425}, - {0x2426,0x2426,0x2426}, {0x2427,0x2427,0x2427}, - {0x2428,0x2428,0x2428}, {0x2429,0x2429,0x2429}, - {0x242A,0x242A,0x242A}, {0x242B,0x242B,0x242B}, - {0x242C,0x242C,0x242C}, {0x242D,0x242D,0x242D}, - {0x242E,0x242E,0x242E}, {0x242F,0x242F,0x242F}, - {0x2430,0x2430,0x2430}, {0x2431,0x2431,0x2431}, - {0x2432,0x2432,0x2432}, {0x2433,0x2433,0x2433}, - {0x2434,0x2434,0x2434}, {0x2435,0x2435,0x2435}, - {0x2436,0x2436,0x2436}, {0x2437,0x2437,0x2437}, - {0x2438,0x2438,0x2438}, {0x2439,0x2439,0x2439}, - {0x243A,0x243A,0x243A}, {0x243B,0x243B,0x243B}, - {0x243C,0x243C,0x243C}, {0x243D,0x243D,0x243D}, - {0x243E,0x243E,0x243E}, {0x243F,0x243F,0x243F}, - {0x2440,0x2440,0x2440}, {0x2441,0x2441,0x2441}, - {0x2442,0x2442,0x2442}, {0x2443,0x2443,0x2443}, - {0x2444,0x2444,0x2444}, {0x2445,0x2445,0x2445}, - {0x2446,0x2446,0x2446}, {0x2447,0x2447,0x2447}, - {0x2448,0x2448,0x2448}, {0x2449,0x2449,0x2449}, - {0x244A,0x244A,0x244A}, {0x244B,0x244B,0x244B}, - {0x244C,0x244C,0x244C}, {0x244D,0x244D,0x244D}, - {0x244E,0x244E,0x244E}, {0x244F,0x244F,0x244F}, - {0x2450,0x2450,0x2450}, {0x2451,0x2451,0x2451}, - {0x2452,0x2452,0x2452}, {0x2453,0x2453,0x2453}, - {0x2454,0x2454,0x2454}, {0x2455,0x2455,0x2455}, - {0x2456,0x2456,0x2456}, {0x2457,0x2457,0x2457}, - {0x2458,0x2458,0x2458}, {0x2459,0x2459,0x2459}, - {0x245A,0x245A,0x245A}, {0x245B,0x245B,0x245B}, - {0x245C,0x245C,0x245C}, {0x245D,0x245D,0x245D}, - {0x245E,0x245E,0x245E}, {0x245F,0x245F,0x245F}, - {0x2460,0x2460,0x2460}, {0x2461,0x2461,0x2461}, - {0x2462,0x2462,0x2462}, {0x2463,0x2463,0x2463}, - {0x2464,0x2464,0x2464}, {0x2465,0x2465,0x2465}, - {0x2466,0x2466,0x2466}, {0x2467,0x2467,0x2467}, - {0x2468,0x2468,0x2468}, {0x2469,0x2469,0x2469}, - {0x246A,0x246A,0x246A}, {0x246B,0x246B,0x246B}, - {0x246C,0x246C,0x246C}, {0x246D,0x246D,0x246D}, - {0x246E,0x246E,0x246E}, {0x246F,0x246F,0x246F}, - {0x2470,0x2470,0x2470}, {0x2471,0x2471,0x2471}, - {0x2472,0x2472,0x2472}, {0x2473,0x2473,0x2473}, - {0x2474,0x2474,0x2474}, {0x2475,0x2475,0x2475}, - {0x2476,0x2476,0x2476}, {0x2477,0x2477,0x2477}, - {0x2478,0x2478,0x2478}, {0x2479,0x2479,0x2479}, - {0x247A,0x247A,0x247A}, {0x247B,0x247B,0x247B}, - {0x247C,0x247C,0x247C}, {0x247D,0x247D,0x247D}, - {0x247E,0x247E,0x247E}, {0x247F,0x247F,0x247F}, - {0x2480,0x2480,0x2480}, {0x2481,0x2481,0x2481}, - {0x2482,0x2482,0x2482}, {0x2483,0x2483,0x2483}, - {0x2484,0x2484,0x2484}, {0x2485,0x2485,0x2485}, - {0x2486,0x2486,0x2486}, {0x2487,0x2487,0x2487}, - {0x2488,0x2488,0x2488}, {0x2489,0x2489,0x2489}, - {0x248A,0x248A,0x248A}, {0x248B,0x248B,0x248B}, - {0x248C,0x248C,0x248C}, {0x248D,0x248D,0x248D}, - {0x248E,0x248E,0x248E}, {0x248F,0x248F,0x248F}, - {0x2490,0x2490,0x2490}, {0x2491,0x2491,0x2491}, - {0x2492,0x2492,0x2492}, {0x2493,0x2493,0x2493}, - {0x2494,0x2494,0x2494}, {0x2495,0x2495,0x2495}, - {0x2496,0x2496,0x2496}, {0x2497,0x2497,0x2497}, - {0x2498,0x2498,0x2498}, {0x2499,0x2499,0x2499}, - {0x249A,0x249A,0x249A}, {0x249B,0x249B,0x249B}, - {0x249C,0x249C,0x249C}, {0x249D,0x249D,0x249D}, - {0x249E,0x249E,0x249E}, {0x249F,0x249F,0x249F}, - {0x24A0,0x24A0,0x24A0}, {0x24A1,0x24A1,0x24A1}, - {0x24A2,0x24A2,0x24A2}, {0x24A3,0x24A3,0x24A3}, - {0x24A4,0x24A4,0x24A4}, {0x24A5,0x24A5,0x24A5}, - {0x24A6,0x24A6,0x24A6}, {0x24A7,0x24A7,0x24A7}, - {0x24A8,0x24A8,0x24A8}, {0x24A9,0x24A9,0x24A9}, - {0x24AA,0x24AA,0x24AA}, {0x24AB,0x24AB,0x24AB}, - {0x24AC,0x24AC,0x24AC}, {0x24AD,0x24AD,0x24AD}, - {0x24AE,0x24AE,0x24AE}, {0x24AF,0x24AF,0x24AF}, - {0x24B0,0x24B0,0x24B0}, {0x24B1,0x24B1,0x24B1}, - {0x24B2,0x24B2,0x24B2}, {0x24B3,0x24B3,0x24B3}, - {0x24B4,0x24B4,0x24B4}, {0x24B5,0x24B5,0x24B5}, - {0x24B6,0x24D0,0x24B6}, {0x24B7,0x24D1,0x24B7}, - {0x24B8,0x24D2,0x24B8}, {0x24B9,0x24D3,0x24B9}, - {0x24BA,0x24D4,0x24BA}, {0x24BB,0x24D5,0x24BB}, - {0x24BC,0x24D6,0x24BC}, {0x24BD,0x24D7,0x24BD}, - {0x24BE,0x24D8,0x24BE}, {0x24BF,0x24D9,0x24BF}, - {0x24C0,0x24DA,0x24C0}, {0x24C1,0x24DB,0x24C1}, - {0x24C2,0x24DC,0x24C2}, {0x24C3,0x24DD,0x24C3}, - {0x24C4,0x24DE,0x24C4}, {0x24C5,0x24DF,0x24C5}, - {0x24C6,0x24E0,0x24C6}, {0x24C7,0x24E1,0x24C7}, - {0x24C8,0x24E2,0x24C8}, {0x24C9,0x24E3,0x24C9}, - {0x24CA,0x24E4,0x24CA}, {0x24CB,0x24E5,0x24CB}, - {0x24CC,0x24E6,0x24CC}, {0x24CD,0x24E7,0x24CD}, - {0x24CE,0x24E8,0x24CE}, {0x24CF,0x24E9,0x24CF}, - {0x24B6,0x24D0,0x24B6}, {0x24B7,0x24D1,0x24B7}, - {0x24B8,0x24D2,0x24B8}, {0x24B9,0x24D3,0x24B9}, - {0x24BA,0x24D4,0x24BA}, {0x24BB,0x24D5,0x24BB}, - {0x24BC,0x24D6,0x24BC}, {0x24BD,0x24D7,0x24BD}, - {0x24BE,0x24D8,0x24BE}, {0x24BF,0x24D9,0x24BF}, - {0x24C0,0x24DA,0x24C0}, {0x24C1,0x24DB,0x24C1}, - {0x24C2,0x24DC,0x24C2}, {0x24C3,0x24DD,0x24C3}, - {0x24C4,0x24DE,0x24C4}, {0x24C5,0x24DF,0x24C5}, - {0x24C6,0x24E0,0x24C6}, {0x24C7,0x24E1,0x24C7}, - {0x24C8,0x24E2,0x24C8}, {0x24C9,0x24E3,0x24C9}, - {0x24CA,0x24E4,0x24CA}, {0x24CB,0x24E5,0x24CB}, - {0x24CC,0x24E6,0x24CC}, {0x24CD,0x24E7,0x24CD}, - {0x24CE,0x24E8,0x24CE}, {0x24CF,0x24E9,0x24CF}, - {0x24EA,0x24EA,0x24EA}, {0x24EB,0x24EB,0x24EB}, - {0x24EC,0x24EC,0x24EC}, {0x24ED,0x24ED,0x24ED}, - {0x24EE,0x24EE,0x24EE}, {0x24EF,0x24EF,0x24EF}, - {0x24F0,0x24F0,0x24F0}, {0x24F1,0x24F1,0x24F1}, - {0x24F2,0x24F2,0x24F2}, {0x24F3,0x24F3,0x24F3}, - {0x24F4,0x24F4,0x24F4}, {0x24F5,0x24F5,0x24F5}, - {0x24F6,0x24F6,0x24F6}, {0x24F7,0x24F7,0x24F7}, - {0x24F8,0x24F8,0x24F8}, {0x24F9,0x24F9,0x24F9}, - {0x24FA,0x24FA,0x24FA}, {0x24FB,0x24FB,0x24FB}, - {0x24FC,0x24FC,0x24FC}, {0x24FD,0x24FD,0x24FD}, - {0x24FE,0x24FE,0x24FE}, {0x24FF,0x24FF,0x24FF} -}; - -static MY_UNICASE_INFO planeFF[]={ - {0xFF00,0xFF00,0xFF00}, {0xFF01,0xFF01,0xFF01}, - {0xFF02,0xFF02,0xFF02}, {0xFF03,0xFF03,0xFF03}, - {0xFF04,0xFF04,0xFF04}, {0xFF05,0xFF05,0xFF05}, - {0xFF06,0xFF06,0xFF06}, {0xFF07,0xFF07,0xFF07}, - {0xFF08,0xFF08,0xFF08}, {0xFF09,0xFF09,0xFF09}, - {0xFF0A,0xFF0A,0xFF0A}, {0xFF0B,0xFF0B,0xFF0B}, - {0xFF0C,0xFF0C,0xFF0C}, {0xFF0D,0xFF0D,0xFF0D}, - {0xFF0E,0xFF0E,0xFF0E}, {0xFF0F,0xFF0F,0xFF0F}, - {0xFF10,0xFF10,0xFF10}, {0xFF11,0xFF11,0xFF11}, - {0xFF12,0xFF12,0xFF12}, {0xFF13,0xFF13,0xFF13}, - {0xFF14,0xFF14,0xFF14}, {0xFF15,0xFF15,0xFF15}, - {0xFF16,0xFF16,0xFF16}, {0xFF17,0xFF17,0xFF17}, - {0xFF18,0xFF18,0xFF18}, {0xFF19,0xFF19,0xFF19}, - {0xFF1A,0xFF1A,0xFF1A}, {0xFF1B,0xFF1B,0xFF1B}, - {0xFF1C,0xFF1C,0xFF1C}, {0xFF1D,0xFF1D,0xFF1D}, - {0xFF1E,0xFF1E,0xFF1E}, {0xFF1F,0xFF1F,0xFF1F}, - {0xFF20,0xFF20,0xFF20}, {0xFF21,0xFF41,0xFF21}, - {0xFF22,0xFF42,0xFF22}, {0xFF23,0xFF43,0xFF23}, - {0xFF24,0xFF44,0xFF24}, {0xFF25,0xFF45,0xFF25}, - {0xFF26,0xFF46,0xFF26}, {0xFF27,0xFF47,0xFF27}, - {0xFF28,0xFF48,0xFF28}, {0xFF29,0xFF49,0xFF29}, - {0xFF2A,0xFF4A,0xFF2A}, {0xFF2B,0xFF4B,0xFF2B}, - {0xFF2C,0xFF4C,0xFF2C}, {0xFF2D,0xFF4D,0xFF2D}, - {0xFF2E,0xFF4E,0xFF2E}, {0xFF2F,0xFF4F,0xFF2F}, - {0xFF30,0xFF50,0xFF30}, {0xFF31,0xFF51,0xFF31}, - {0xFF32,0xFF52,0xFF32}, {0xFF33,0xFF53,0xFF33}, - {0xFF34,0xFF54,0xFF34}, {0xFF35,0xFF55,0xFF35}, - {0xFF36,0xFF56,0xFF36}, {0xFF37,0xFF57,0xFF37}, - {0xFF38,0xFF58,0xFF38}, {0xFF39,0xFF59,0xFF39}, - {0xFF3A,0xFF5A,0xFF3A}, {0xFF3B,0xFF3B,0xFF3B}, - {0xFF3C,0xFF3C,0xFF3C}, {0xFF3D,0xFF3D,0xFF3D}, - {0xFF3E,0xFF3E,0xFF3E}, {0xFF3F,0xFF3F,0xFF3F}, - {0xFF40,0xFF40,0xFF40}, {0xFF21,0xFF41,0xFF21}, - {0xFF22,0xFF42,0xFF22}, {0xFF23,0xFF43,0xFF23}, - {0xFF24,0xFF44,0xFF24}, {0xFF25,0xFF45,0xFF25}, - {0xFF26,0xFF46,0xFF26}, {0xFF27,0xFF47,0xFF27}, - {0xFF28,0xFF48,0xFF28}, {0xFF29,0xFF49,0xFF29}, - {0xFF2A,0xFF4A,0xFF2A}, {0xFF2B,0xFF4B,0xFF2B}, - {0xFF2C,0xFF4C,0xFF2C}, {0xFF2D,0xFF4D,0xFF2D}, - {0xFF2E,0xFF4E,0xFF2E}, {0xFF2F,0xFF4F,0xFF2F}, - {0xFF30,0xFF50,0xFF30}, {0xFF31,0xFF51,0xFF31}, - {0xFF32,0xFF52,0xFF32}, {0xFF33,0xFF53,0xFF33}, - {0xFF34,0xFF54,0xFF34}, {0xFF35,0xFF55,0xFF35}, - {0xFF36,0xFF56,0xFF36}, {0xFF37,0xFF57,0xFF37}, - {0xFF38,0xFF58,0xFF38}, {0xFF39,0xFF59,0xFF39}, - {0xFF3A,0xFF5A,0xFF3A}, {0xFF5B,0xFF5B,0xFF5B}, - {0xFF5C,0xFF5C,0xFF5C}, {0xFF5D,0xFF5D,0xFF5D}, - {0xFF5E,0xFF5E,0xFF5E}, {0xFF5F,0xFF5F,0xFF5F}, - {0xFF60,0xFF60,0xFF60}, {0xFF61,0xFF61,0xFF61}, - {0xFF62,0xFF62,0xFF62}, {0xFF63,0xFF63,0xFF63}, - {0xFF64,0xFF64,0xFF64}, {0xFF65,0xFF65,0xFF65}, - {0xFF66,0xFF66,0xFF66}, {0xFF67,0xFF67,0xFF67}, - {0xFF68,0xFF68,0xFF68}, {0xFF69,0xFF69,0xFF69}, - {0xFF6A,0xFF6A,0xFF6A}, {0xFF6B,0xFF6B,0xFF6B}, - {0xFF6C,0xFF6C,0xFF6C}, {0xFF6D,0xFF6D,0xFF6D}, - {0xFF6E,0xFF6E,0xFF6E}, {0xFF6F,0xFF6F,0xFF6F}, - {0xFF70,0xFF70,0xFF70}, {0xFF71,0xFF71,0xFF71}, - {0xFF72,0xFF72,0xFF72}, {0xFF73,0xFF73,0xFF73}, - {0xFF74,0xFF74,0xFF74}, {0xFF75,0xFF75,0xFF75}, - {0xFF76,0xFF76,0xFF76}, {0xFF77,0xFF77,0xFF77}, - {0xFF78,0xFF78,0xFF78}, {0xFF79,0xFF79,0xFF79}, - {0xFF7A,0xFF7A,0xFF7A}, {0xFF7B,0xFF7B,0xFF7B}, - {0xFF7C,0xFF7C,0xFF7C}, {0xFF7D,0xFF7D,0xFF7D}, - {0xFF7E,0xFF7E,0xFF7E}, {0xFF7F,0xFF7F,0xFF7F}, - {0xFF80,0xFF80,0xFF80}, {0xFF81,0xFF81,0xFF81}, - {0xFF82,0xFF82,0xFF82}, {0xFF83,0xFF83,0xFF83}, - {0xFF84,0xFF84,0xFF84}, {0xFF85,0xFF85,0xFF85}, - {0xFF86,0xFF86,0xFF86}, {0xFF87,0xFF87,0xFF87}, - {0xFF88,0xFF88,0xFF88}, {0xFF89,0xFF89,0xFF89}, - {0xFF8A,0xFF8A,0xFF8A}, {0xFF8B,0xFF8B,0xFF8B}, - {0xFF8C,0xFF8C,0xFF8C}, {0xFF8D,0xFF8D,0xFF8D}, - {0xFF8E,0xFF8E,0xFF8E}, {0xFF8F,0xFF8F,0xFF8F}, - {0xFF90,0xFF90,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{0xFFE9,0xFFE9,0xFFE9}, - {0xFFEA,0xFFEA,0xFFEA}, {0xFFEB,0xFFEB,0xFFEB}, - {0xFFEC,0xFFEC,0xFFEC}, {0xFFED,0xFFED,0xFFED}, - {0xFFEE,0xFFEE,0xFFEE}, {0xFFEF,0xFFEF,0xFFEF}, - {0xFFF0,0xFFF0,0xFFF0}, {0xFFF1,0xFFF1,0xFFF1}, - {0xFFF2,0xFFF2,0xFFF2}, {0xFFF3,0xFFF3,0xFFF3}, - {0xFFF4,0xFFF4,0xFFF4}, {0xFFF5,0xFFF5,0xFFF5}, - {0xFFF6,0xFFF6,0xFFF6}, {0xFFF7,0xFFF7,0xFFF7}, - {0xFFF8,0xFFF8,0xFFF8}, {0xFFF9,0xFFF9,0xFFF9}, - {0xFFFA,0xFFFA,0xFFFA}, {0xFFFB,0xFFFB,0xFFFB}, - {0xFFFC,0xFFFC,0xFFFC}, {0xFFFD,0xFFFD,0xFFFD}, - {0xFFFE,0xFFFE,0xFFFE}, {0xFFFF,0xFFFF,0xFFFF} -}; - -MY_UNICASE_INFO *my_unicase_default[256]={ - plane00, plane01, plane02, plane03, plane04, plane05, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, plane1E, plane1F, - NULL, plane21, NULL, NULL, plane24, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, planeFF - -}; - - -/* - Turkish lower/upper mapping: - 1. LOWER(0x0049 LATIN CAPITAL LETTER I) -> - 0x0131 LATIN SMALL LETTER DOTLESS I - 2. UPPER(0x0069 LATIN SMALL LETTER I) -> - 0x0130 LATIN CAPITAL LETTER I WITH DOT ABOVE -*/ - -static MY_UNICASE_INFO turk00[]= -{ - {0x0000,0x0000,0x0000}, {0x0001,0x0001,0x0001}, - {0x0002,0x0002,0x0002}, {0x0003,0x0003,0x0003}, - {0x0004,0x0004,0x0004}, {0x0005,0x0005,0x0005}, - {0x0006,0x0006,0x0006}, {0x0007,0x0007,0x0007}, - {0x0008,0x0008,0x0008}, {0x0009,0x0009,0x0009}, - {0x000A,0x000A,0x000A}, {0x000B,0x000B,0x000B}, - {0x000C,0x000C,0x000C}, {0x000D,0x000D,0x000D}, - {0x000E,0x000E,0x000E}, {0x000F,0x000F,0x000F}, - {0x0010,0x0010,0x0010}, {0x0011,0x0011,0x0011}, - {0x0012,0x0012,0x0012}, {0x0013,0x0013,0x0013}, - {0x0014,0x0014,0x0014}, {0x0015,0x0015,0x0015}, - {0x0016,0x0016,0x0016}, {0x0017,0x0017,0x0017}, - {0x0018,0x0018,0x0018}, {0x0019,0x0019,0x0019}, - {0x001A,0x001A,0x001A}, {0x001B,0x001B,0x001B}, - {0x001C,0x001C,0x001C}, {0x001D,0x001D,0x001D}, - {0x001E,0x001E,0x001E}, {0x001F,0x001F,0x001F}, - {0x0020,0x0020,0x0020}, {0x0021,0x0021,0x0021}, - {0x0022,0x0022,0x0022}, {0x0023,0x0023,0x0023}, - {0x0024,0x0024,0x0024}, {0x0025,0x0025,0x0025}, - {0x0026,0x0026,0x0026}, {0x0027,0x0027,0x0027}, - {0x0028,0x0028,0x0028}, {0x0029,0x0029,0x0029}, - {0x002A,0x002A,0x002A}, {0x002B,0x002B,0x002B}, - {0x002C,0x002C,0x002C}, {0x002D,0x002D,0x002D}, - {0x002E,0x002E,0x002E}, {0x002F,0x002F,0x002F}, - {0x0030,0x0030,0x0030}, {0x0031,0x0031,0x0031}, - {0x0032,0x0032,0x0032}, {0x0033,0x0033,0x0033}, - {0x0034,0x0034,0x0034}, {0x0035,0x0035,0x0035}, - {0x0036,0x0036,0x0036}, {0x0037,0x0037,0x0037}, - {0x0038,0x0038,0x0038}, {0x0039,0x0039,0x0039}, - {0x003A,0x003A,0x003A}, {0x003B,0x003B,0x003B}, - {0x003C,0x003C,0x003C}, {0x003D,0x003D,0x003D}, - {0x003E,0x003E,0x003E}, {0x003F,0x003F,0x003F}, - {0x0040,0x0040,0x0040}, {0x0041,0x0061,0x0041}, - {0x0042,0x0062,0x0042}, {0x0043,0x0063,0x0043}, - {0x0044,0x0064,0x0044}, {0x0045,0x0065,0x0045}, - {0x0046,0x0066,0x0046}, {0x0047,0x0067,0x0047}, - {0x0048,0x0068,0x0048}, {0x0049,0x0131,0x0049}, - {0x004A,0x006A,0x004A}, {0x004B,0x006B,0x004B}, - {0x004C,0x006C,0x004C}, {0x004D,0x006D,0x004D}, - {0x004E,0x006E,0x004E}, {0x004F,0x006F,0x004F}, - {0x0050,0x0070,0x0050}, {0x0051,0x0071,0x0051}, - {0x0052,0x0072,0x0052}, {0x0053,0x0073,0x0053}, - {0x0054,0x0074,0x0054}, {0x0055,0x0075,0x0055}, - {0x0056,0x0076,0x0056}, {0x0057,0x0077,0x0057}, - {0x0058,0x0078,0x0058}, {0x0059,0x0079,0x0059}, - {0x005A,0x007A,0x005A}, {0x005B,0x005B,0x005B}, - {0x005C,0x005C,0x005C}, {0x005D,0x005D,0x005D}, - {0x005E,0x005E,0x005E}, {0x005F,0x005F,0x005F}, - {0x0060,0x0060,0x0060}, {0x0041,0x0061,0x0041}, - {0x0042,0x0062,0x0042}, {0x0043,0x0063,0x0043}, - {0x0044,0x0064,0x0044}, {0x0045,0x0065,0x0045}, - {0x0046,0x0066,0x0046}, {0x0047,0x0067,0x0047}, - {0x0048,0x0068,0x0048}, {0x0130,0x0069,0x0049}, - {0x004A,0x006A,0x004A}, {0x004B,0x006B,0x004B}, - {0x004C,0x006C,0x004C}, {0x004D,0x006D,0x004D}, - {0x004E,0x006E,0x004E}, {0x004F,0x006F,0x004F}, - {0x0050,0x0070,0x0050}, {0x0051,0x0071,0x0051}, - {0x0052,0x0072,0x0052}, {0x0053,0x0073,0x0053}, - {0x0054,0x0074,0x0054}, {0x0055,0x0075,0x0055}, - {0x0056,0x0076,0x0056}, {0x0057,0x0077,0x0057}, - {0x0058,0x0078,0x0058}, {0x0059,0x0079,0x0059}, - {0x005A,0x007A,0x005A}, {0x007B,0x007B,0x007B}, - {0x007C,0x007C,0x007C}, {0x007D,0x007D,0x007D}, - {0x007E,0x007E,0x007E}, {0x007F,0x007F,0x007F}, - {0x0080,0x0080,0x0080}, {0x0081,0x0081,0x0081}, - {0x0082,0x0082,0x0082}, {0x0083,0x0083,0x0083}, - {0x0084,0x0084,0x0084}, {0x0085,0x0085,0x0085}, - {0x0086,0x0086,0x0086}, {0x0087,0x0087,0x0087}, - {0x0088,0x0088,0x0088}, {0x0089,0x0089,0x0089}, - {0x008A,0x008A,0x008A}, {0x008B,0x008B,0x008B}, - {0x008C,0x008C,0x008C}, {0x008D,0x008D,0x008D}, - {0x008E,0x008E,0x008E}, {0x008F,0x008F,0x008F}, - {0x0090,0x0090,0x0090}, {0x0091,0x0091,0x0091}, - {0x0092,0x0092,0x0092}, {0x0093,0x0093,0x0093}, - {0x0094,0x0094,0x0094}, {0x0095,0x0095,0x0095}, - {0x0096,0x0096,0x0096}, {0x0097,0x0097,0x0097}, - {0x0098,0x0098,0x0098}, {0x0099,0x0099,0x0099}, - {0x009A,0x009A,0x009A}, {0x009B,0x009B,0x009B}, - {0x009C,0x009C,0x009C}, {0x009D,0x009D,0x009D}, - {0x009E,0x009E,0x009E}, {0x009F,0x009F,0x009F}, - {0x00A0,0x00A0,0x00A0}, {0x00A1,0x00A1,0x00A1}, - {0x00A2,0x00A2,0x00A2}, {0x00A3,0x00A3,0x00A3}, - {0x00A4,0x00A4,0x00A4}, {0x00A5,0x00A5,0x00A5}, - {0x00A6,0x00A6,0x00A6}, {0x00A7,0x00A7,0x00A7}, - {0x00A8,0x00A8,0x00A8}, {0x00A9,0x00A9,0x00A9}, - {0x00AA,0x00AA,0x00AA}, {0x00AB,0x00AB,0x00AB}, - {0x00AC,0x00AC,0x00AC}, {0x00AD,0x00AD,0x00AD}, - {0x00AE,0x00AE,0x00AE}, {0x00AF,0x00AF,0x00AF}, - {0x00B0,0x00B0,0x00B0}, {0x00B1,0x00B1,0x00B1}, - {0x00B2,0x00B2,0x00B2}, {0x00B3,0x00B3,0x00B3}, - {0x00B4,0x00B4,0x00B4}, {0x039C,0x00B5,0x039C}, - {0x00B6,0x00B6,0x00B6}, {0x00B7,0x00B7,0x00B7}, - {0x00B8,0x00B8,0x00B8}, {0x00B9,0x00B9,0x00B9}, - {0x00BA,0x00BA,0x00BA}, {0x00BB,0x00BB,0x00BB}, - {0x00BC,0x00BC,0x00BC}, {0x00BD,0x00BD,0x00BD}, - {0x00BE,0x00BE,0x00BE}, {0x00BF,0x00BF,0x00BF}, - {0x00C0,0x00E0,0x0041}, {0x00C1,0x00E1,0x0041}, - {0x00C2,0x00E2,0x0041}, {0x00C3,0x00E3,0x0041}, - {0x00C4,0x00E4,0x0041}, {0x00C5,0x00E5,0x0041}, - {0x00C6,0x00E6,0x00C6}, {0x00C7,0x00E7,0x0043}, - {0x00C8,0x00E8,0x0045}, {0x00C9,0x00E9,0x0045}, - {0x00CA,0x00EA,0x0045}, {0x00CB,0x00EB,0x0045}, - {0x00CC,0x00EC,0x0049}, {0x00CD,0x00ED,0x0049}, - {0x00CE,0x00EE,0x0049}, {0x00CF,0x00EF,0x0049}, - {0x00D0,0x00F0,0x00D0}, {0x00D1,0x00F1,0x004E}, - {0x00D2,0x00F2,0x004F}, {0x00D3,0x00F3,0x004F}, - {0x00D4,0x00F4,0x004F}, {0x00D5,0x00F5,0x004F}, - {0x00D6,0x00F6,0x004F}, {0x00D7,0x00D7,0x00D7}, - {0x00D8,0x00F8,0x00D8}, {0x00D9,0x00F9,0x0055}, - {0x00DA,0x00FA,0x0055}, {0x00DB,0x00FB,0x0055}, - {0x00DC,0x00FC,0x0055}, {0x00DD,0x00FD,0x0059}, - {0x00DE,0x00FE,0x00DE}, {0x00DF,0x00DF,0x00DF}, - {0x00C0,0x00E0,0x0041}, {0x00C1,0x00E1,0x0041}, - {0x00C2,0x00E2,0x0041}, {0x00C3,0x00E3,0x0041}, - {0x00C4,0x00E4,0x0041}, {0x00C5,0x00E5,0x0041}, - {0x00C6,0x00E6,0x00C6}, {0x00C7,0x00E7,0x0043}, - {0x00C8,0x00E8,0x0045}, {0x00C9,0x00E9,0x0045}, - {0x00CA,0x00EA,0x0045}, {0x00CB,0x00EB,0x0045}, - {0x00CC,0x00EC,0x0049}, {0x00CD,0x00ED,0x0049}, - {0x00CE,0x00EE,0x0049}, {0x00CF,0x00EF,0x0049}, - {0x00D0,0x00F0,0x00D0}, {0x00D1,0x00F1,0x004E}, - {0x00D2,0x00F2,0x004F}, {0x00D3,0x00F3,0x004F}, - {0x00D4,0x00F4,0x004F}, {0x00D5,0x00F5,0x004F}, - {0x00D6,0x00F6,0x004F}, {0x00F7,0x00F7,0x00F7}, - {0x00D8,0x00F8,0x00D8}, {0x00D9,0x00F9,0x0055}, - {0x00DA,0x00FA,0x0055}, {0x00DB,0x00FB,0x0055}, - {0x00DC,0x00FC,0x0055}, {0x00DD,0x00FD,0x0059}, - {0x00DE,0x00FE,0x00DE}, {0x0178,0x00FF,0x0059} -}; - - - -MY_UNICASE_INFO *my_unicase_turkish[256]= -{ - turk00, plane01, plane02, plane03, plane04, plane05, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, plane1E, plane1F, - NULL, plane21, NULL, NULL, plane24, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, planeFF -}; - - - -/** - Compare string against string with wildcard - This function is used for utf8mb3, utf8mb4, ucs2, utf16, utf32 - - @param cs Character set. - @str String. - @str_end End of string. - @wildstr Wildcard pattern. - @wildend End of wildcard pattern. - @escape Escape characters, typically \\. - @w_one "One character", typically _. - @w_many "Many characters", typically %. - - @return Comparison result. - @retval 0 if matched. - @retval -1 if not matched with wildcard. - @retval 1 if matched with wildcard. -*/ - -int my_wildcmp_unicode(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many, - MY_UNICASE_INFO **weights) -{ - int result= -1; /* Not found, using wildcards */ - my_wc_t s_wc, w_wc; - int scan, plane; - int (*mb_wc)(struct charset_info_st *, my_wc_t *, - const uchar *, const uchar *); - mb_wc= cs->cset->mb_wc; - - while (wildstr != wildend) - { - while (1) - { - my_bool escaped= 0; - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <= 0) - return 1; - - if (w_wc == (my_wc_t)w_many) - { - result= 1; /* Found an anchor char */ - break; - } - - wildstr+= scan; - if (w_wc == (my_wc_t)escape && wildstr < wildend) - { - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <= 0) - return 1; - wildstr+= scan; - escaped= 1; - } - - if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, - (const uchar*)str_end)) <= 0) - return 1; - str+= scan; - - if (!escaped && w_wc == (my_wc_t)w_one) - { - result= 1; /* Found an anchor char */ - } - else - { - if (weights) - { - if (s_wc < 0x10000) - { - plane=(s_wc>>8) & 0xFF; - s_wc = weights[plane] ? weights[plane][s_wc & 0xFF].sort : s_wc; - } - if (w_wc < 0x10000) - { - plane=(w_wc>>8) & 0xFF; - w_wc = weights[plane] ? weights[plane][w_wc & 0xFF].sort : w_wc; - } - } - if (s_wc != w_wc) - return 1; /* No match */ - } - if (wildstr == wildend) - return (str != str_end); /* Match if both are at end */ - } - - - if (w_wc == (my_wc_t)w_many) - { /* Found w_many */ - - /* Remove any '%' and '_' from the wild search string */ - for (; wildstr != wildend ;) - { - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <= 0) - return 1; - - if (w_wc == (my_wc_t)w_many) - { - wildstr+= scan; - continue; - } - - if (w_wc == (my_wc_t)w_one) - { - wildstr+= scan; - if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, - (const uchar*)str_end)) <=0) - return 1; - str+= scan; - continue; - } - break; /* Not a wild character */ - } - - if (wildstr == wildend) - return 0; /* Ok if w_many is last */ - - if (str == str_end) - return -1; - - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <=0) - return 1; - wildstr+= scan; - - if (w_wc == (my_wc_t)escape) - { - if (wildstr < wildend) - { - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <=0) - return 1; - wildstr+= scan; - } - } - - while (1) - { - /* Skip until the first character from wildstr is found */ - while (str != str_end) - { - if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, - (const uchar*)str_end)) <=0) - return 1; - if (weights) - { - plane=(s_wc>>8) & 0xFF; - s_wc = weights[plane] ? weights[plane][s_wc & 0xFF].sort : s_wc; - plane=(w_wc>>8) & 0xFF; - w_wc = weights[plane] ? weights[plane][w_wc & 0xFF].sort : w_wc; - } - - if (s_wc == w_wc) - break; - str+= scan; - } - if (str == str_end) - return -1; - - str+= scan; - result= my_wildcmp_unicode(cs, str, str_end, wildstr, wildend, - escape, w_one, w_many, - weights); - if (result <= 0) - return result; - } - } - } - return (str != str_end ? 1 : 0); -} - - -/** - Pad buffer with weights for space characters. - - @details - This functions fills the buffer pointed by "str" - with weights of space character. Not more than - "nweights" weights are put. If at some iteration - step only a half of weight can fit - (which is possible if buffer length is an odd number) - then a half of this weight is put - this gives - a little bit better ORDER BY result for long strings. - - @str Buffer - @strend End of buffer - @nweights Number of weights - - @return Result length -*/ - -static size_t -my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights) -{ - uchar *str0; - DBUG_ASSERT(str && str <= strend); - for (str0= str; str < strend && nweights; nweights--) - { - *str++= 0x00; - if (str < strend) - *str++= 0x20; - } - return str - str0; -} - - -/** - Pad buffer with weights for space characters. - - @details - This functions fills the buffer pointed by "str" - with weights of space character. Putting half of weight - (when buffer length is an odd number) is OK. - - @str Buffer - @strend End of buffer - - @return Result length -*/ - -static size_t -my_strxfrm_pad_unicode(uchar *str, uchar *strend) -{ - uchar *str0= str; - DBUG_ASSERT(str && str <= strend); - for ( ; str < strend ; ) - { - *str++= 0x00; - if (str < strend) - *str++= 0x20; - } - return str - str0; -} - - -#define REPLACEMENT_CHAR 0xFFFD; - - -static inline void -my_tosort_unicode(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) -{ - int page= *wc >> 8; - if (page < 256) - { - if (uni_plane[page]) - *wc= uni_plane[page][*wc & 0xFF].sort; - } - else - { - *wc= REPLACEMENT_CHAR; - } -} - - -size_t -my_strnxfrm_unicode(CHARSET_INFO *cs, - uchar *dst, size_t dstlen, uint nweights, - const uchar *src, size_t srclen, uint flags) -{ - my_wc_t wc; - int res; - uchar *dst0= dst; - uchar *de= dst + dstlen; - const uchar *se= src + srclen; - MY_UNICASE_INFO **uni_plane= (cs->state & MY_CS_BINSORT) ? - NULL : cs->caseinfo; - LINT_INIT(wc); - DBUG_ASSERT(src); - - for (; dst < de && nweights; nweights--) - { - if ((res= cs->cset->mb_wc(cs, &wc, src, se)) <= 0) - break; - src+= res; - - if (uni_plane) - my_tosort_unicode(uni_plane, &wc); - - *dst++= (uchar) (wc >> 8); - if (dst < de) - *dst++= (uchar) (wc & 0xFF); - } - - if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) - dst+= my_strxfrm_pad_nweights_unicode(dst, de, nweights); - - my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); - - if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) - dst+= my_strxfrm_pad_unicode(dst, de); - return dst - dst0; -} - - - -#endif - - -#ifdef HAVE_CHARSET_utf8mb4 - -/* - We consider bytes with code more than 127 as a letter. - This garantees that word boundaries work fine with regular - expressions. Note, there is no need to mark byte 255 as a - letter, it is illegal byte in UTF8. -*/ -static uchar ctype_utf8mb4[]= -{ - 0, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16, - 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, - 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0 -}; - - -static uchar to_lower_utf8mb4[]= -{ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95, - 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - - -static uchar to_upper_utf8mb4[]= -{ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - - -static inline int -bincmp_utf8mb4(const uchar *s, const uchar *se, - const uchar *t, const uchar *te) -{ - int slen= (int) (se - s), tlen= (int) (te - t); - int len= min(slen, tlen); - int cmp= memcmp(s, t, len); - return cmp ? cmp : slen - tlen; -} - - -static int -my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t * pwc, const uchar *s, const uchar *e) -{ - uchar c; - - if (s >= e) - return MY_CS_TOOSMALL; - - c= s[0]; - if (c < 0x80) - { - *pwc= c; - return 1; - } - else if (c < 0xc2) - return MY_CS_ILSEQ; - else if (c < 0xe0) - { - if (s + 2 > e) /* We need 2 characters */ - return MY_CS_TOOSMALL2; - - if (!((s[1] ^ 0x80) < 0x40)) - return MY_CS_ILSEQ; - - *pwc= ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); - return 2; - } - else if (c < 0xf0) - { - if (s + 3 > e) /* We need 3 characters */ - return MY_CS_TOOSMALL3; - - if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && - (c >= 0xe1 || s[1] >= 0xa0))) - return MY_CS_ILSEQ; - - *pwc= ((my_wc_t) (c & 0x0f) << 12) | - ((my_wc_t) (s[1] ^ 0x80) << 6) | - (my_wc_t) (s[2] ^ 0x80); - return 3; - } - else if (c < 0xf5) - { - if (s + 4 > e) /* We need 4 characters */ - return MY_CS_TOOSMALL4; - - /* - UTF-8 quick four-byte mask: - 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - Encoding allows to encode U+00010000..U+001FFFFF - - The maximum character defined in the Unicode standard is U+0010FFFF. - Higher characters U+00110000..U+001FFFFF are not used. - - 11110000.10010000.10xxxxxx.10xxxxxx == F0.90.80.80 == U+00010000 (min) - 11110100.10001111.10111111.10111111 == F4.8F.BF.BF == U+0010FFFF (max) - - Valid codes: - [F0][90..BF][80..BF][80..BF] - [F1][80..BF][80..BF][80..BF] - [F2][80..BF][80..BF][80..BF] - [F3][80..BF][80..BF][80..BF] - [F4][80..8F][80..BF][80..BF] - */ - - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && - (c >= 0xf1 || s[1] >= 0x90) && - (c <= 0xf3 || s[1] <= 0x8F))) - return MY_CS_ILSEQ; - *pwc = ((my_wc_t) (c & 0x07) << 18) | - ((my_wc_t) (s[1] ^ 0x80) << 12) | - ((my_wc_t) (s[2] ^ 0x80) << 6) | - (my_wc_t) (s[3] ^ 0x80); - return 4; - } - return MY_CS_ILSEQ; -} - - -/* - The same as above, but without range check - for example, for a null-terminated string -*/ -static int -my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc, const uchar *s) -{ - uchar c; - - c= s[0]; - if (c < 0x80) - { - *pwc = c; - return 1; - } - - if (c < 0xc2) - return MY_CS_ILSEQ; - - if (c < 0xe0) - { - if (!((s[1] ^ 0x80) < 0x40)) - return MY_CS_ILSEQ; - - *pwc = ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); - return 2; - } - - if (c < 0xf0) - { - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (c >= 0xe1 || s[1] >= 0xa0))) - return MY_CS_ILSEQ; - *pwc= ((my_wc_t) (c & 0x0f) << 12) | - ((my_wc_t) (s[1] ^ 0x80) << 6) | - (my_wc_t) (s[2] ^ 0x80); - - return 3; - } - else if (c < 0xf5) - { - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && - (c >= 0xf1 || s[1] >= 0x90) && - (c <= 0xf3 || s[1] <= 0x8F))) - return MY_CS_ILSEQ; - *pwc = ((my_wc_t) (c & 0x07) << 18) | - ((my_wc_t) (s[1] ^ 0x80) << 12) | - ((my_wc_t) (s[2] ^ 0x80) << 6) | - (my_wc_t) (s[3] ^ 0x80); - return 4; - } - return MY_CS_ILSEQ; -} - - -static int -my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *r, uchar *e) -{ - int count; - - if (r >= e) - return MY_CS_TOOSMALL; - - if (wc < 0x80) - count= 1; - else if (wc < 0x800) - count= 2; - else if (wc < 0x10000) - count= 3; - else if (wc < 0x200000) - count= 4; - else return MY_CS_ILUNI; - - if (r + count > e) - return MY_CS_TOOSMALLN(count); - - switch (count) { - /* Fall through all cases!!! */ - case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000; - case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800; - case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0; - case 1: r[0] = (uchar) wc; - } - return count; -} - - -/* - The same as above, but without range check. -*/ -static int -my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *r) -{ - int count; - - if (wc < 0x80) - count= 1; - else if (wc < 0x800) - count= 2; - else if (wc < 0x10000) - count= 3; - else if (wc < 0x200000) - count= 4; - else - return MY_CS_ILUNI; - - switch (count) - { - /* Fall through all cases!!! */ - case 4: r[3]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x10000; - case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800; - case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0; - case 1: r[0]= (uchar) wc; - } - return count; -} - - -static inline void -my_tolower_utf8mb4(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) -{ - int page= *wc >> 8; - if (page < 256 && uni_plane[page]) - *wc= uni_plane[page][*wc & 0xFF].tolower; -} - - -static inline void -my_toupper_utf8mb4(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) -{ - int page= *wc >> 8; - if (page < 256 && uni_plane[page]) - *wc= uni_plane[page][*wc & 0xFF].toupper; -} - - -static size_t -my_caseup_utf8mb4(CHARSET_INFO *cs, char *src, size_t srclen, - char *dst, size_t dstlen) -{ - my_wc_t wc; - int srcres, dstres; - char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src != dst || cs->caseup_multiply == 1); - - while ((src < srcend) && - (srcres= my_mb_wc_utf8mb4(cs, &wc, - (uchar *) src, (uchar*) srcend)) > 0) - { - my_toupper_utf8mb4(uni_plane, &wc); - if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) - break; - src+= srcres; - dst+= dstres; - } - return (size_t) (dst - dst0); -} - - -static inline void -my_hash_add(ulong *n1, ulong *n2, uint ch) -{ - n1[0]^= (((n1[0] & 63) + n2[0]) * (ch)) + (n1[0] << 8); - n2[0]+= 3; -} - - -static void -my_hash_sort_utf8mb4(CHARSET_INFO *cs, const uchar *s, size_t slen, - ulong *n1, ulong *n2) -{ - my_wc_t wc; - int res; - const uchar *e= s + slen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - - /* - Remove end space. We do this to be able to compare - 'A ' and 'A' as identical - */ - while (e > s && e[-1] == ' ') - e--; - - while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0) - { - my_tosort_unicode(uni_plane, &wc); - my_hash_add(n1, n2, (uint) (wc & 0xFF)); - my_hash_add(n1, n2, (uint) (wc >> 8) & 0xFF); - if (wc > 0xFFFF) - { - /* - Put the highest byte only if it is non-zero, - to make hash functions for utf8mb3 and utf8mb4 - compatible for BMP characters. - This is useful to keep order of records in - test results, e.g. for "SHOW GRANTS". - */ - my_hash_add(n1, n2, (uint) (wc >> 16) & 0xFF); - } - s+= res; - } -} - - -static size_t -my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src) -{ - my_wc_t wc; - int srcres, dstres; - char *dst= src, *dst0= src; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(cs->caseup_multiply == 1); - - while (*src && - (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) - { - my_toupper_utf8mb4(uni_plane, &wc); - if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) - break; - src+= srcres; - dst+= dstres; - } - *dst= '\0'; - return (size_t) (dst - dst0); -} - - -static size_t -my_casedn_utf8mb4(CHARSET_INFO *cs, - char *src, size_t srclen, - char *dst, size_t dstlen) -{ - my_wc_t wc; - int srcres, dstres; - char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src != dst || cs->casedn_multiply == 1); - - while ((src < srcend) && - (srcres= my_mb_wc_utf8mb4(cs, &wc, - (uchar*) src, (uchar*) srcend)) > 0) - { - my_tolower_utf8mb4(uni_plane, &wc); - if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) - break; - src+= srcres; - dst+= dstres; - } - return (size_t) (dst - dst0); -} - - -static size_t -my_casedn_str_utf8mb4(CHARSET_INFO *cs, char *src) -{ - my_wc_t wc; - int srcres, dstres; - char *dst= src, *dst0= src; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(cs->casedn_multiply == 1); - - while (*src && - (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) - { - my_tolower_utf8mb4(uni_plane, &wc); - if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) - break; - src+= srcres; - dst+= dstres; - } - - /* - In rare cases lower string can be shorter than - the original string, for example: - - "U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE" - (which is 0xC4B0 in utf8, i.e. two bytes) - - is converted into - - "U+0069 LATIN SMALL LETTER I" - (which is 0x69 in utf8, i.e. one byte) - - So, we need to put '\0' terminator after converting. - */ - - *dst= '\0'; - return (size_t) (dst - dst0); -} - - -static int -my_strnncoll_utf8mb4(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - my_wc_t s_wc,t_wc; - const uchar *se= s + slen; - const uchar *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - while ( s < se && t < te ) - { - int s_res= my_mb_wc_utf8mb4(cs, &s_wc, s, se); - int t_res= my_mb_wc_utf8mb4(cs, &t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0 ) - { - /* Incorrect string, compare bytewise */ - return bincmp_utf8mb4(s, se, t, te); - } - - my_tosort_unicode(uni_plane, &s_wc); - my_tosort_unicode(uni_plane, &t_wc); - - if ( s_wc != t_wc ) - { - return s_wc > t_wc ? 1 : -1; - } - - s+= s_res; - t+= t_res; - } - return (int) (t_is_prefix ? (t - te) : ((se - s) - (te - t))); -} - - -/** - Compare strings, discarding end space - - If one string is shorter as the other, then we space extend the other - so that the strings have equal length. - - This will ensure that the following things hold: - - "a" == "a " - "a\0" < "a" - "a\0" < "a " - - @param cs Character set pinter. - @param a First string to compare. - @param a_length Length of 'a'. - @param b Second string to compare. - @param b_length Length of 'b'. - @param diff_if_only_endspace_difference - Set to 1 if the strings should be regarded as different - if they only difference in end space - - @return Comparison result. - @retval Negative number, if a less than b. - @retval 0, if a is equal to b - @retval Positive number, if a > b -*/ - -static int -my_strnncollsp_utf8mb4(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference) -{ - int res; - my_wc_t s_wc, t_wc; - const uchar *se= s + slen, *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= FALSE; -#endif - - while ( s < se && t < te ) - { - int s_res= my_mb_wc_utf8mb4(cs, &s_wc, s, se); - int t_res= my_mb_wc_utf8mb4(cs, &t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0 ) - { - /* Incorrect string, compare bytewise */ - return bincmp_utf8mb4(s, se, t, te); - } - - my_tosort_unicode(uni_plane, &s_wc); - my_tosort_unicode(uni_plane, &t_wc); - - if ( s_wc != t_wc ) - { - return s_wc > t_wc ? 1 : -1; - } - - s+=s_res; - t+=t_res; - } - - slen= (size_t) (se-s); - tlen= (size_t) (te-t); - res= 0; - - if (slen != tlen) - { - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - if (slen < tlen) - { - slen= tlen; - s= t; - se= te; - swap= -1; - res= -res; - } - /* - This following loop uses the fact that in UTF-8 - all multibyte characters are greater than space, - and all multibyte head characters are greater than - space. It means if we meet a character greater - than space, it always means that the longer string - is greater. So we can reuse the same loop from the - 8bit version, without having to process full multibute - sequences. - */ - for ( ; s < se; s++) - { - if (*s != ' ') - return (*s < ' ') ? -swap : swap; - } - } - return res; -} - - -/** - Compare 0-terminated UTF8 strings. - - @param cs character set handler - @param s First 0-terminated string to compare - @param t Second 0-terminated string to compare - - @return Comparison result. - @retval negative number if s < t - @retval positive number if s > t - @retval 0 is the strings are equal -*/ - -static int -my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t) -{ - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - while (s[0] && t[0]) - { - my_wc_t s_wc,t_wc; - - if ((uchar) s[0] < 128) - { - /* - s[0] is between 0 and 127. - It represents a single byte character. - Convert it into weight according to collation. - */ - s_wc= plane00[(uchar) s[0]].tolower; - s++; - } - else - { - int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s); - - /* - In the case of wrong multibyte sequence we will - call strcmp() for byte-to-byte comparison. - */ - if (res <= 0) - return strcmp(s, t); - s+= res; - - my_tolower_utf8mb4(uni_plane, &s_wc); - } - - - /* Do the same for the second string */ - - if ((uchar) t[0] < 128) - { - /* Convert single byte character into weight */ - t_wc= plane00[(uchar) t[0]].tolower; - t++; - } - else - { - int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t); - if (res <= 0) - return strcmp(s, t); - t+= res; - - my_tolower_utf8mb4(uni_plane, &t_wc); - } - - /* Now we have two weights, let's compare them */ - if ( s_wc != t_wc ) - return ((int) s_wc) - ((int) t_wc); - } - return ((int) (uchar) s[0]) - ((int) (uchar) t[0]); -} - - -static int -my_wildcmp_utf8mb4(CHARSET_INFO *cs, - const char *str, const char *strend, - const char *wildstr, const char *wildend, - int escape, int w_one, int w_many) -{ - return my_wildcmp_unicode(cs, str, strend, wildstr, wildend, - escape, w_one, w_many, cs->caseinfo); -} - - -static size_t -my_strnxfrmlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), size_t len) -{ - /* TODO: fix when working on WL "Unicode new version" */ - return (len * 2 + 2) / 4; -} - - -static uint -my_ismbchar_utf8mb4(CHARSET_INFO *cs, const char *b, const char *e) -{ - my_wc_t wc; - int res= my_mb_wc_utf8mb4(cs,&wc, (const uchar*)b, (const uchar*)e); - return (res > 1) ? res : 0; -} - - -static uint -my_mbcharlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), uint c) -{ - if (c < 0x80) - return 1; - if (c < 0xc2) - return 0; /* Illegal mb head */ - if (c < 0xe0) - return 2; - if (c < 0xf0) - return 3; - if (c < 0xf8) - return 4; - return 0; /* Illegal mb head */; -} - - -static MY_COLLATION_HANDLER my_collation_utf8mb4_general_ci_handler= -{ - NULL, /* init */ - my_strnncoll_utf8mb4, - my_strnncollsp_utf8mb4, - my_strnxfrm_unicode, - my_strnxfrmlen_utf8mb4, - my_like_range_mb, - my_wildcmp_utf8mb4, - my_strcasecmp_utf8mb4, - my_instr_mb, - my_hash_sort_utf8mb4, - my_propagate_complex -}; - - -static MY_COLLATION_HANDLER my_collation_utf8mb4_bin_handler = -{ - NULL, /* init */ - my_strnncoll_mb_bin, - my_strnncollsp_mb_bin, - my_strnxfrm_unicode, - my_strnxfrmlen_utf8mb4, - my_like_range_mb, - my_wildcmp_mb_bin, - my_strcasecmp_mb_bin, - my_instr_mb, - my_hash_sort_mb_bin, - my_propagate_simple -}; - - -MY_CHARSET_HANDLER my_charset_utf8mb4_handler= -{ - NULL, /* init */ - my_ismbchar_utf8mb4, - my_mbcharlen_utf8mb4, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_mb, - my_lengthsp_8bit, - my_numcells_mb, - my_mb_wc_utf8mb4, - my_wc_mb_utf8mb4, - my_mb_ctype_mb, - my_caseup_str_utf8mb4, - my_casedn_str_utf8mb4, - my_caseup_utf8mb4, - my_casedn_utf8mb4, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - - -CHARSET_INFO my_charset_utf8mb4_general_ci= -{ - 45,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE, /* state */ - MY_UTF8MB4, /* cs name */ - MY_UTF8MB4_GENERAL_CI,/* name */ - "UTF-8 Unicode", /* comment */ - NULL, /* tailoring */ - ctype_utf8mb4, /* ctype */ - to_lower_utf8mb4, /* to_lower */ - to_upper_utf8mb4, /* to_upper */ - to_upper_utf8mb4, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_utf8mb4_general_ci_handler -}; - - -CHARSET_INFO my_charset_utf8mb4_bin= -{ - 46,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE, /* state */ - MY_UTF8MB4, /* cs name */ - MY_UTF8MB4_BIN, /* name */ - "UTF-8 Unicode", /* comment */ - NULL, /* tailoring */ - ctype_utf8mb4, /* ctype */ - to_lower_utf8mb4, /* to_lower */ - to_upper_utf8mb4, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 4, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb4_handler, - &my_collation_utf8mb4_bin_handler -}; - -#endif /* HAVE_CHARSET_utf8mb4 */ - - -#ifdef HAVE_CHARSET_utf8mb3 - -/* - We consider bytes with code more than 127 as a letter. - This garantees that word boundaries work fine with regular - expressions. Note, there is no need to mark byte 255 as a - letter, it is illegal byte in UTF8. -*/ -static uchar ctype_utf8[] = { - 0, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16, - 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, - 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0 -}; - -/* The below are taken from usa7 implementation */ - -static uchar to_lower_utf8[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95, - 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - -static uchar to_upper_utf8[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - -static inline int bincmp(const uchar *s, const uchar *se, - const uchar *t, const uchar *te) -{ - int slen= (int) (se-s), tlen= (int) (te-t); - int len=min(slen,tlen); - int cmp= memcmp(s,t,len); - return cmp ? cmp : slen-tlen; -} - - -static int -my_mb_wc_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t * pwc, const uchar *s, const uchar *e) -{ - uchar c; - - if (s >= e) - return MY_CS_TOOSMALL; - - c= s[0]; - if (c < 0x80) - { - *pwc = c; - return 1; - } - else if (c < 0xc2) - return MY_CS_ILSEQ; - else if (c < 0xe0) - { - if (s+2 > e) /* We need 2 characters */ - return MY_CS_TOOSMALL2; - - if (!((s[1] ^ 0x80) < 0x40)) - return MY_CS_ILSEQ; - - *pwc = ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); - return 2; - } - else if (c < 0xf0) - { - if (s+3 > e) /* We need 3 characters */ - return MY_CS_TOOSMALL3; - - if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && - (c >= 0xe1 || s[1] >= 0xa0))) - return MY_CS_ILSEQ; - - *pwc = ((my_wc_t) (c & 0x0f) << 12) | - ((my_wc_t) (s[1] ^ 0x80) << 6) | - (my_wc_t) (s[2] ^ 0x80); - - return 3; - } -#ifdef UNICODE_32BIT - else if (c < 0xf8 && sizeof(my_wc_t)*8 >= 32) - { - if (s+4 > e) /* We need 4 characters */ - return MY_CS_TOOSMALL4; - - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && - (c >= 0xf1 || s[1] >= 0x90))) - return MY_CS_ILSEQ; - - *pwc = ((my_wc_t) (c & 0x07) << 18) | - ((my_wc_t) (s[1] ^ 0x80) << 12) | - ((my_wc_t) (s[2] ^ 0x80) << 6) | - (my_wc_t) (s[3] ^ 0x80); - - return 4; - } - else if (c < 0xfc && sizeof(my_wc_t)*8 >= 32) - { - if (s+5 >e) /* We need 5 characters */ - return MY_CS_TOOSMALL5; - - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && - (s[4] ^ 0x80) < 0x40 && - (c >= 0xf9 || s[1] >= 0x88))) - return MY_CS_ILSEQ; - - *pwc = ((my_wc_t) (c & 0x03) << 24) | - ((my_wc_t) (s[1] ^ 0x80) << 18) | - ((my_wc_t) (s[2] ^ 0x80) << 12) | - ((my_wc_t) (s[3] ^ 0x80) << 6) | - (my_wc_t) (s[4] ^ 0x80); - return 5; - } - else if (c < 0xfe && sizeof(my_wc_t)*8 >= 32) - { - if ( s+6 >e ) /* We need 6 characters */ - return MY_CS_TOOSMALL6; - - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && - (s[4] ^ 0x80) < 0x40 && - (s[5] ^ 0x80) < 0x40 && - (c >= 0xfd || s[1] >= 0x84))) - return MY_CS_ILSEQ; - - *pwc = ((my_wc_t) (c & 0x01) << 30) - | ((my_wc_t) (s[1] ^ 0x80) << 24) - | ((my_wc_t) (s[2] ^ 0x80) << 18) - | ((my_wc_t) (s[3] ^ 0x80) << 12) - | ((my_wc_t) (s[4] ^ 0x80) << 6) - | (my_wc_t) (s[5] ^ 0x80); - return 6; - } -#endif - return MY_CS_ILSEQ; -} - - -/* - The same as above, but without range check - for example, for a null-terminated string -*/ -static int -my_mb_wc_utf8mb3_no_range(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t * pwc, const uchar *s) -{ - uchar c; - - c= s[0]; - if (c < 0x80) - { - *pwc = c; - return 1; - } - - if (c < 0xc2) - return MY_CS_ILSEQ; - - if (c < 0xe0) - { - if (!((s[1] ^ 0x80) < 0x40)) - return MY_CS_ILSEQ; - - *pwc = ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); - return 2; - } - - if (c < 0xf0) - { - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (c >= 0xe1 || s[1] >= 0xa0))) - return MY_CS_ILSEQ; - - *pwc= ((my_wc_t) (c & 0x0f) << 12) | - ((my_wc_t) (s[1] ^ 0x80) << 6) | - (my_wc_t) (s[2] ^ 0x80); - - return 3; - } - return MY_CS_ILSEQ; -} - - -static int -my_wc_mb_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *r, uchar *e) -{ - int count; - - if (r >= e) - return MY_CS_TOOSMALL; - - if (wc < 0x80) - count = 1; - else if (wc < 0x800) - count = 2; - else if (wc < 0x10000) - count = 3; -#ifdef UNICODE_32BIT - else if (wc < 0x200000) - count = 4; - else if (wc < 0x4000000) - count = 5; - else if (wc <= 0x7fffffff) - count = 6; -#endif - else return MY_CS_ILUNI; - - /* - e is a character after the string r, not the last character of it. - Because of it (r+count > e), not (r+count-1 >e ) - */ - if ( r+count > e ) - return MY_CS_TOOSMALLN(count); - - switch (count) { - /* Fall through all cases!!! */ -#ifdef UNICODE_32BIT - case 6: r[5] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x4000000; - case 5: r[4] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x200000; - case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000; -#endif - case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800; - case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0; - case 1: r[0] = (uchar) wc; - } - return count; -} - - -/* - The same as above, but without range check. -*/ -static int -my_wc_mb_utf8mb3_no_range(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *r) -{ - int count; - - if (wc < 0x80) - count= 1; - else if (wc < 0x800) - count= 2; - else if (wc < 0x10000) - count= 3; - else - return MY_CS_ILUNI; - - switch (count) - { - /* Fall through all cases!!! */ - case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800; - case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0; - case 1: r[0]= (uchar) wc; - } - return count; -} - - -static size_t -my_caseup_utf8mb3(CHARSET_INFO *cs, char *src, size_t srclen, - char *dst, size_t dstlen) -{ - my_wc_t wc; - int srcres, dstres; - char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src != dst || cs->caseup_multiply == 1); - - while ((src < srcend) && - (srcres= my_mb_wc_utf8mb3(cs, &wc, - (uchar *) src, (uchar*) srcend)) > 0) - { - int plane= (wc>>8) & 0xFF; - wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].toupper : wc; - if ((dstres= my_wc_mb_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) - break; - src+= srcres; - dst+= dstres; - } - return (size_t) (dst - dst0); -} - - -static void -my_hash_sort_utf8mb3(CHARSET_INFO *cs, const uchar *s, size_t slen, - ulong *n1, ulong *n2) -{ - my_wc_t wc; - int res; - const uchar *e=s+slen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - - /* - Remove end space. We have to do this to be able to compare - 'A ' and 'A' as identical - */ - while (e > s && e[-1] == ' ') - e--; - - while ((s < e) && (res= my_mb_wc_utf8mb3(cs, &wc, - (uchar *)s, (uchar*)e)) > 0) - { - int plane = (wc>>8) & 0xFF; - wc = uni_plane[plane] ? uni_plane[plane][wc & 0xFF].sort : wc; - n1[0]^= (((n1[0] & 63)+n2[0])*(wc & 0xFF))+ (n1[0] << 8); - n2[0]+=3; - n1[0]^= (((n1[0] & 63)+n2[0])*(wc >> 8))+ (n1[0] << 8); - n2[0]+=3; - s+=res; - } -} - - -static size_t -my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src) -{ - my_wc_t wc; - int srcres, dstres; - char *dst= src, *dst0= src; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(cs->caseup_multiply == 1); - - while (*src && - (srcres= my_mb_wc_utf8mb3_no_range(cs, &wc, (uchar *) src)) > 0) - { - int plane= (wc>>8) & 0xFF; - wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].toupper : wc; - if ((dstres= my_wc_mb_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0) - break; - src+= srcres; - dst+= dstres; - } - *dst= '\0'; - return (size_t) (dst - dst0); -} - - -static size_t -my_casedn_utf8mb3(CHARSET_INFO *cs, char *src, size_t srclen, - char *dst, size_t dstlen) -{ - my_wc_t wc; - int srcres, dstres; - char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(src != dst || cs->casedn_multiply == 1); - - while ((src < srcend) && - (srcres= my_mb_wc_utf8mb3(cs, &wc, - (uchar*) src, (uchar*)srcend)) > 0) - { - int plane= (wc>>8) & 0xFF; - wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].tolower : wc; - if ((dstres= my_wc_mb_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) - break; - src+= srcres; - dst+= dstres; - } - return (size_t) (dst - dst0); -} - - -static size_t -my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src) -{ - my_wc_t wc; - int srcres, dstres; - char *dst= src, *dst0= src; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - DBUG_ASSERT(cs->casedn_multiply == 1); - - while (*src && - (srcres= my_mb_wc_utf8mb3_no_range(cs, &wc, (uchar *) src)) > 0) - { - int plane= (wc>>8) & 0xFF; - wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].tolower : wc; - if ((dstres= my_wc_mb_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0) - break; - src+= srcres; - dst+= dstres; - } - - /* - In rare cases lower string can be shorter than - the original string, for example: - - "U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE" - (which is 0xC4B0 in utf8, i.e. two bytes) - - is converted into - - "U+0069 LATIN SMALL LETTER I" - (which is 0x69 in utf8, i.e. one byte) - - So, we need to put '\0' terminator after converting. - */ - - *dst= '\0'; - return (size_t) (dst - dst0); -} - - -static int -my_strnncoll_utf8mb3(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - int s_res,t_res; - my_wc_t s_wc,t_wc; - const uchar *se=s+slen; - const uchar *te=t+tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - - while ( s < se && t < te ) - { - int plane; - s_res= my_mb_wc_utf8mb3(cs,&s_wc, s, se); - t_res= my_mb_wc_utf8mb3(cs,&t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0 ) - { - /* Incorrect string, compare bytewise */ - return bincmp(s, se, t, te); - } - - plane=(s_wc>>8) & 0xFF; - s_wc = uni_plane[plane] ? uni_plane[plane][s_wc & 0xFF].sort : s_wc; - plane=(t_wc>>8) & 0xFF; - t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc; - if ( s_wc != t_wc ) - { - return s_wc > t_wc ? 1 : -1; - } - - s+=s_res; - t+=t_res; - } - return (int) (t_is_prefix ? t-te : ((se-s) - (te-t))); -} - - -/** - Compare strings, discarding end space - - If one string is shorter as the other, then we space extend the other - so that the strings have equal length. - - This will ensure that the following things hold: - - "a" == "a " - "a\0" < "a" - "a\0" < "a " - - @param cs Character set pinter. - @param a First string to compare. - @param a_length Length of 'a'. - @param b Second string to compare. - @param b_length Length of 'b'. - @param diff_if_only_endspace_difference - Set to 1 if the strings should be regarded as different - if they only difference in end space - - @return Comparison result. - @retval Negative number, if a less than b. - @retval 0, if a is equal to b - @retval Positive number, if a > b -*/ - -static int -my_strnncollsp_utf8mb3(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference) -{ - int s_res, t_res, res; - my_wc_t s_wc,t_wc; - const uchar *se= s+slen, *te= t+tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - LINT_INIT(s_wc); - LINT_INIT(t_wc); - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= FALSE; -#endif - - while ( s < se && t < te ) - { - int plane; - s_res= my_mb_wc_utf8mb3(cs,&s_wc, s, se); - t_res= my_mb_wc_utf8mb3(cs,&t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0 ) - { - /* Incorrect string, compare bytewise */ - return bincmp(s, se, t, te); - } - - plane=(s_wc>>8) & 0xFF; - s_wc = uni_plane[plane] ? uni_plane[plane][s_wc & 0xFF].sort : s_wc; - plane=(t_wc>>8) & 0xFF; - t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc; - if ( s_wc != t_wc ) - { - return s_wc > t_wc ? 1 : -1; - } - - s+=s_res; - t+=t_res; - } - - slen= (size_t) (se-s); - tlen= (size_t) (te-t); - res= 0; - - if (slen != tlen) - { - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - if (slen < tlen) - { - slen= tlen; - s= t; - se= te; - swap= -1; - res= -res; - } - /* - This following loop uses the fact that in UTF-8 - all multibyte characters are greater than space, - and all multibyte head characters are greater than - space. It means if we meet a character greater - than space, it always means that the longer string - is greater. So we can reuse the same loop from the - 8bit version, without having to process full multibute - sequences. - */ - for ( ; s < se; s++) - { - if (*s != ' ') - return (*s < ' ') ? -swap : swap; - } - } - return res; -} - - -/* - Compare 0-terminated UTF8 strings. - - SYNOPSIS - my_strcasecmp_utf8mb3() - cs character set handler - s First 0-terminated string to compare - t Second 0-terminated string to compare - - IMPLEMENTATION - - RETURN - - negative number if s < t - - positive number if s > t - - 0 is the strings are equal -*/ - -static int -my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t) -{ - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - while (s[0] && t[0]) - { - my_wc_t s_wc,t_wc; - - if ((uchar) s[0] < 128) - { - /* - s[0] is between 0 and 127. - It represents a single byte character. - Convert it into weight according to collation. - */ - s_wc= plane00[(uchar) s[0]].tolower; - s++; - } - else - { - int plane, res; - - /* - Scan a multibyte character. - - In the future it is worth to write a special version of my_utf8_uni() - for 0-terminated strings which will not take in account length. Now - we call the regular version of my_utf8_uni() with s+3 in the - last argument. s+3 is enough to scan any multibyte sequence. - - Calling the regular version of my_utf8_uni is safe for 0-terminated - strings: we will never lose the end of the string: - If we have 0 character in the middle of a multibyte sequence, - then my_utf8_uni will always return a negative number, so the - loop with finish. - */ - - res= my_mb_wc_utf8mb3(cs, &s_wc, (const uchar*)s, (const uchar*) s + 3); - - /* - In the case of wrong multibyte sequence we will - call strcmp() for byte-to-byte comparison. - */ - if (res <= 0) - return strcmp(s, t); - s+= res; - - /* Convert Unicode code into weight according to collation */ - plane=(s_wc>>8) & 0xFF; - s_wc = uni_plane[plane] ? uni_plane[plane][s_wc & 0xFF].tolower : s_wc; - } - - - /* Do the same for the second string */ - - if ((uchar) t[0] < 128) - { - /* Convert single byte character into weight */ - t_wc= plane00[(uchar) t[0]].tolower; - t++; - } - else - { - int plane; - int res= my_mb_wc_utf8mb3(cs, &t_wc, - (const uchar*)t, (const uchar*) t + 3); - if (res <= 0) - return strcmp(s, t); - t+= res; - - /* Convert code into weight */ - plane=(t_wc>>8) & 0xFF; - t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].tolower : t_wc; - } - - /* Now we have two weights, let's compare them */ - if ( s_wc != t_wc ) - return ((int) s_wc) - ((int) t_wc); - } - return ((int)(uchar)s[0]) - ((int) (uchar) t[0]); -} - - -static int -my_wildcmp_utf8mb3(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many) -{ - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - return my_wildcmp_unicode(cs,str,str_end,wildstr,wildend, - escape,w_one,w_many,uni_plane); -} - - -static size_t -my_strnxfrmlen_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), size_t len) -{ - return (len * 2 + 2) / 3; -} - - -static uint -my_ismbchar_utf8mb3(CHARSET_INFO *cs, const char *b, const char *e) -{ - my_wc_t wc; - int res= my_mb_wc_utf8mb3(cs, &wc, (const uchar*) b, (const uchar*) e); - return (res>1) ? res : 0; -} - - -static uint -my_mbcharlen_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), uint c) -{ - if (c < 0x80) - return 1; - else if (c < 0xc2) - return 0; /* Illegal mb head */ - else if (c < 0xe0) - return 2; - else if (c < 0xf0) - return 3; -#ifdef UNICODE_32BIT - else if (c < 0xf8) - return 4; - else if (c < 0xfc) - return 5; - else if (c < 0xfe) - return 6; -#endif - return 0; /* Illegal mb head */; -} - - -static MY_COLLATION_HANDLER my_collation_utf8mb3_general_ci_handler = -{ - NULL, /* init */ - my_strnncoll_utf8mb3, - my_strnncollsp_utf8mb3, - my_strnxfrm_unicode, - my_strnxfrmlen_utf8mb3, - my_like_range_mb, - my_wildcmp_utf8mb3, - my_strcasecmp_utf8mb3, - my_instr_mb, - my_hash_sort_utf8mb3, - my_propagate_complex -}; - - -static MY_COLLATION_HANDLER my_collation_utf8mb3_bin_handler = -{ - NULL, /* init */ - my_strnncoll_mb_bin, - my_strnncollsp_mb_bin, - my_strnxfrm_unicode, - my_strnxfrmlen_utf8mb3, - my_like_range_mb, - my_wildcmp_mb_bin, - my_strcasecmp_mb_bin, - my_instr_mb, - my_hash_sort_mb_bin, - my_propagate_simple -}; - - -MY_CHARSET_HANDLER my_charset_utf8mb3_handler= -{ - NULL, /* init */ - my_ismbchar_utf8mb3, - my_mbcharlen_utf8mb3, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_mb, - my_lengthsp_8bit, - my_numcells_mb, - my_mb_wc_utf8mb3, - my_wc_mb_utf8mb3, - my_mb_ctype_mb, - my_caseup_str_utf8mb3, - my_casedn_str_utf8mb3, - my_caseup_utf8mb3, - my_casedn_utf8mb3, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - - -CHARSET_INFO my_charset_utf8mb3_general_ci= -{ - 33,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE, /* state */ - MY_UTF8MB3, /* cs name */ - MY_UTF8MB3_GENERAL_CI,/* name */ - "UTF-8 Unicode", /* comment */ - NULL, /* tailoring */ - ctype_utf8, /* ctype */ - to_lower_utf8, /* to_lower */ - to_upper_utf8, /* to_upper */ - to_upper_utf8, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_utf8mb3_general_ci_handler -}; - - -CHARSET_INFO my_charset_utf8mb3_bin= -{ - 83,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE, /* state */ - MY_UTF8MB3, /* cs name */ - MY_UTF8MB3_BIN, /* name */ - "UTF-8 Unicode", /* comment */ - NULL, /* tailoring */ - ctype_utf8, /* ctype */ - to_lower_utf8, /* to_lower */ - to_upper_utf8, /* to_upper */ - NULL, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_utf8mb3_bin_handler -}; - -#ifdef HAVE_UTF8_GENERAL_CS - -/* - * These functions bacically do the same as their original, except - * that they return 0 only when two comparing unicode strings are - * strictly the same in case-sensitive way. See "save_diff" local - * variable to what they actually do. - */ - -static int -my_strnncoll_utf8mb3_cs(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool t_is_prefix) -{ - int s_res,t_res; - my_wc_t s_wc,t_wc; - const uchar *se=s+slen; - const uchar *te=t+tlen; - int save_diff = 0; - int diff; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - - while ( s < se && t < te ) - { - int plane; - s_res= my_mb_wc_utf8mb3(cs, &s_wc, s, se); - t_res= my_mb_wc_utf8mb3(cs, &t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0 ) - - { - /* Incorrect string, compare by char value */ - return ((int)s[0]-(int)t[0]); - } - - if ( save_diff == 0 ) - { - save_diff = ((int)s_wc) - ((int)t_wc); - } - plane=(s_wc>>8) & 0xFF; - s_wc = uni_plane[plane] ? uni_plane[plane][s_wc & 0xFF].sort : s_wc; - plane=(t_wc>>8) & 0xFF; - t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc; - if ( s_wc != t_wc ) - { - return ((int) s_wc) - ((int) t_wc); - } - - s+=s_res; - t+=t_res; - } - diff = ( (se-s) - (te-t) ); - return t_is_prefix ? t-te : ((diff == 0) ? save_diff : diff); -} - -static int -my_strnncollsp_utf8mb3_cs(CHARSET_INFO *cs, - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference) -{ - int s_res, t_res, res; - my_wc_t s_wc, t_wc; - const uchar *se= s + slen; - const uchar *te= t + tlen; - int save_diff= 0; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; - -#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE - diff_if_only_endspace_difference= FALSE; -#endif - - while ( s < se && t < te ) - { - int plane; - s_res= my_mb_wc_utf8mb3(cs, &s_wc, s, se); - t_res= my_mb_wc_utf8mb3(cs, &t_wc, t, te); - - if ( s_res <= 0 || t_res <= 0 ) - { - /* Incorrect string, compare by char value */ - return ((int)s[0]-(int)t[0]); - } - - if ( save_diff == 0 ) - { - save_diff = ((int)s_wc) - ((int)t_wc); - } - plane=(s_wc>>8) & 0xFF; - s_wc = uni_plane[plane] ? uni_plane[plane][s_wc & 0xFF].sort : s_wc; - plane=(t_wc>>8) & 0xFF; - t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc; - if ( s_wc != t_wc ) - { - return ((int) s_wc) - ((int) t_wc); - } - - s+=s_res; - t+=t_res; - } - - slen= se-s; - tlen= te-t; - res= 0; - - if (slen != tlen) - { - int swap= 1; - if (diff_if_only_endspace_difference) - res= 1; /* Assume 'a' is bigger */ - if (slen < tlen) - { - slen= tlen; - s= t; - se= te; - swap= -1; - res= -res; - } - /* - This following loop uses the fact that in UTF-8 - all multibyte characters are greater than space, - and all multibyte head characters are greater than - space. It means if we meet a character greater - than space, it always means that the longer string - is greater. So we can reuse the same loop from the - 8bit version, without having to process full multibute - sequences. - */ - for ( ; s < se; s++) - { - if (*s != (uchar) ' ') - return (*s < (uchar) ' ') ? -swap : swap; - } - } - return save_diff; -} - - -static MY_COLLATION_HANDLER my_collation_utf8mb3_general_cs_handler = -{ - NULL, /* init */ - my_strnncoll_utf8mb3_cs, - my_strnncollsp_utf8mb3_cs, - my_strnxfrm_unicode, - my_strnxfrmlen_utf8mb3, - my_like_range_simple, - my_wildcmp_mb, - my_strcasecmp_utf8mb3, - my_instr_mb, - my_hash_sort_utf8mb3, - my_propagate_simple -}; - - -CHARSET_INFO my_charset_utf8mb3_general_cs= -{ - 254,0,0, /* number */ - MY_CS_COMPILED|MY_CS_UNICODE, /* state */ - MY_UTF8MB3, /* cs name */ - MY_UTF8MB3_GENERAL_CS,/* name */ - "UTF-8 Unicode", /* comment */ - NULL, /* tailoring */ - ctype_utf8, /* ctype */ - to_lower_utf8, /* to_lower */ - to_upper_utf8, /* to_upper */ - to_upper_utf8, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 3, /* mbmaxlen */ - 0, /* min_sort_char */ - 255, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_utf8mb3_handler, - &my_collation_utf8mb3_general_cs_handler -}; -#endif /* Cybozu Hack */ - - -/* - File system encoding components: - -Code range Pattern Number Used Unused Blocks ------------------------------------------------------------------------------ -00C0..017F [.][0..4][g..z] 5*20= 100 97 3 Latin1 Supplement + Ext A -0370..03FF [.][5..9][g..z] 5*20= 100 88 12 Greek + Coptic -0400..052F [.][g..z][0..6] 20*7= 140 140 137 Cyrillic -0530..058F [.][g..z][7..8] 20*2= 40 38 2 Armenian -2160..217F [.][g..z][9] 20*1= 20 16 4 Number Forms -0180..02AF [.][g..z][a..k] 28*11=220 203 17 Latin Ext B + IPA -1E00..0EFF [.][g..z][l..r] 20*7= 140 136 4 Latin Additional Extended -1F00..1FFF [.][g..z][s..z] 20*8= 160 144 16 Greek Extended -.... .... [.][a..f][g..z] 6*20= 120 0 120 RESERVED -24B6..24E9 [.][@][a..z] 26 26 0 Enclosed Alphanumerics -FF21..FF5A [.][a..z][@] 26 26 0 Full Width forms - -All other characters are encoded using five bytes: - -[.][0..9a..z][0..9a..z][0..9a..z][0..9a..z] - -*/ - - -static uint16 touni[5994]= -{ - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x00C0, - 0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8, - 0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0, - 0x00D1,0x00D2,0x00D3,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x00E0, - 0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8, - 0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0, - 0x00F1,0x00F2,0x00F3,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x00D4, - 0x00D5,0x00D6,0x0000,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC, - 0x00DD,0x00DE,0x0178,0x0100,0x0102,0x0104,0x0106,0x0108, - 0x010A,0x010C,0x010E,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x00F4, - 0x00F5,0x00F6,0x00DF,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC, - 0x00FD,0x00FE,0x00FF,0x0101,0x0103,0x0105,0x0107,0x0109, - 0x010B,0x010D,0x010F,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0110, - 0x0112,0x0114,0x0116,0x0118,0x011A,0x011C,0x011E,0x0120, - 0x0122,0x0124,0x0126,0x0128,0x012A,0x012C,0x012E,0x0000, - 0x0132,0x0134,0x0136,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0111, - 0x0113,0x0115,0x0117,0x0119,0x011B,0x011D,0x011F,0x0121, - 0x0123,0x0125,0x0127,0x0129,0x012B,0x012D,0x012F,0x0131, - 0x0133,0x0135,0x0137,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0139,0x013B,0x013D,0x013F,0x0141,0x0143,0x0145,0x0147, - 0x0000,0x014A,0x014C,0x014E,0x0150,0x0152,0x0154,0x0156, - 0x0158,0x015A,0x015C,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0138, - 0x013A,0x013C,0x013E,0x0140,0x0142,0x0144,0x0146,0x0148, - 0x0149,0x014B,0x014D,0x014F,0x0151,0x0153,0x0155,0x0157, - 0x0159,0x015B,0x015D,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x015E, - 0x0160,0x0162,0x0164,0x0166,0x0168,0x016A,0x016C,0x016E, - 0x0170,0x0172,0x0174,0x0176,0x0179,0x017B,0x017D,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x015F, - 0x0161,0x0163,0x0165,0x0167,0x0169,0x016B,0x016D,0x016F, - 0x0171,0x0173,0x0175,0x0177,0x017A,0x017C,0x017E,0x017F, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0390,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0386, - 0x0388,0x0389,0x038A,0x0000,0x0391,0x0000,0x0393,0x0394, - 0x0395,0x0396,0x0397,0x0000,0x0399,0x0000,0x039B,0x039C, - 0x039D,0x039E,0x039F,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03AC, - 0x03AD,0x03AE,0x03AF,0x03B0,0x03B1,0x03B2,0x03B3,0x03B4, - 0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC, - 0x03BD,0x03BE,0x03BF,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x03A1,0x0000,0x0000,0x03A4,0x03A5,0x0000,0x03A7,0x03A8, - 0x03A9,0x03AA,0x03AB,0x038C,0x038E,0x038F,0x0000,0x0392, - 0x0398,0x03D2,0x03D3,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03C0, - 0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8, - 0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x0000,0x03D0, - 0x03D1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03D4, - 0x03A6,0x03A0,0x0000,0x0000,0x03DA,0x03DC,0x03DE,0x03E0, - 0x03E2,0x03E4,0x03E6,0x03E8,0x03EA,0x03EC,0x03EE,0x039A, - 0x0000,0x03A3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x03D5,0x03D6,0x03D7,0x03D9,0x03DB,0x03DD,0x03DF,0x03E1, - 0x03E3,0x03E5,0x03E7,0x03E9,0x03EB,0x03ED,0x03EF,0x03F0, - 0x03F1,0x03F2,0x03F3,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x03FD,0x03FE,0x03FF,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03F5, - 0x03F6,0x03F8,0x03FB,0x03FC,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,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,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,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,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF21,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF22,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF23,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF24,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF25,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF26,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0410,0x0424,0x0408,0x0478,0x04A6,0x04CD,0x04F4,0x0000, - 0x0544,0x2160,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF27,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x01B3,0x01DE,0x0208,0x0230,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E00,0x1E28,0x1E50,0x1E78, - 0x1E60,0x1EBE,0x1EE6,0x1F08,0x1F2A,0x0000,0x1F6C,0x1F88, - 0x1FAC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0411,0x0425,0x0409,0x047A,0x04A8,0x0000,0x04F6,0x0531, - 0x0545,0x2161,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF28,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0182,0x01B5,0x01E0,0x020A,0x0232,0x0000,0x0000, - 0x019D,0x0000,0x0000,0x0000,0x1E02,0x1E2A,0x1E52,0x1E7A, - 0x0000,0x1EC0,0x1EE8,0x1F09,0x1F2B,0x0000,0x1F6D,0x1F89, - 0x1FAD,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0412,0x0426,0x040A,0x047C,0x04AA,0x04D0,0x04F8,0x0532, - 0x0546,0x2162,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF29,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0184,0x01B8,0x01E2,0x020C,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E04,0x1E2C,0x1E54,0x1E7C, - 0x0000,0x1EC2,0x1EEA,0x1F0A,0x1F2C,0x0000,0x1F6E,0x1F8A, - 0x1FAE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0413,0x0427,0x040B,0x047E,0x04AC,0x04D2,0x0000,0x0533, - 0x0547,0x2163,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF2A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0187,0x0000,0x01E4,0x020E,0x0000,0x0000,0x0193, - 0x0000,0x01AE,0x0000,0x0000,0x1E06,0x1E2E,0x1E56,0x1E7E, - 0x0000,0x1EC4,0x1EEC,0x1F0B,0x1F2D,0x0000,0x1F6F,0x1F8B, - 0x1FAF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0414,0x0428,0x040C,0x0480,0x04AE,0x04D4,0x0000,0x0534, - 0x0548,0x2164,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF2B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x018B,0x0000,0x01E6,0x0210,0x0000,0x0000,0x0000, - 0x019F,0x0000,0x0000,0x0000,0x1E08,0x1E30,0x1E58,0x1E80, - 0x0000,0x1EC6,0x1EEE,0x1F0C,0x1F2E,0x0000,0x1FBA,0x1F8C, - 0x1FB8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0415,0x0429,0x040D,0x0000,0x04B0,0x04D6,0x0000,0x0535, - 0x0549,0x2165,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF2C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x01E8,0x0212,0x0000,0x0000,0x0000, - 0x0000,0x01B1,0x0000,0x0000,0x1E0A,0x1E32,0x1E5A,0x1E82, - 0x1EA0,0x1EC8,0x1EF0,0x1F0D,0x1F2F,0x1F59,0x1FBB,0x1F8D, - 0x1FB9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0416,0x042A,0x040E,0x048A,0x04B2,0x04D8,0x0000,0x0536, - 0x054A,0x2166,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF2D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0191,0x0000,0x01EA,0x0214,0x0000,0x0000,0x0194, - 0x0000,0x01B2,0x0000,0x0000,0x1E0C,0x1E34,0x1E5C,0x1E84, - 0x1EA2,0x1ECA,0x1EF2,0x1F0E,0x1F38,0x0000,0x1FC8,0x1F8E, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0417,0x042B,0x040F,0x048C,0x04B4,0x04DA,0x0000,0x0537, - 0x054B,0x2167,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01F6,0x01BC,0x01EC,0x0216,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E0E,0x1E36,0x1E5E,0x1E86, - 0x1EA4,0x1ECC,0x1EF4,0x1F0F,0x1F39,0x1F5B,0x1FC9,0x1F8F, - 0x1FBC,0x1FE8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0418,0x042C,0x0460,0x048E,0x04B6,0x04DC,0x0000,0x0538, - 0x054C,0x2168,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF2F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0198,0x01C4,0x01EE,0x0218,0x023A,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E10,0x1E38,0x0000,0x1E88, - 0x1EA6,0x1ECE,0x1EF6,0x1F18,0x1F3A,0x0000,0x1FCA,0x1F98, - 0x0000,0x1FE9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0419,0x042D,0x0462,0x0490,0x04B8,0x04DE,0x0500,0x0539, - 0x054D,0x2169,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF30,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x023D,0x01C7,0x0000,0x021A,0x023B,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E12,0x1E3A,0x1E62,0x1E8A, - 0x1EA8,0x1ED0,0x1EF8,0x1F19,0x1F3B,0x1F5D,0x1FCB,0x1F99, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x041A,0x042E,0x0464,0x0492,0x04BA,0x04E0,0x0502,0x053A, - 0x054E,0x216A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF31,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x01CA,0x01F1,0x021C,0x023E,0x0181,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E14,0x1E3C,0x1E64,0x1E8C, - 0x1EAA,0x1ED2,0x0000,0x1F1A,0x1F3C,0x0000,0x1FDA,0x1F9A, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x041B,0x042F,0x0466,0x0494,0x04BC,0x04E2,0x0504,0x053B, - 0x054F,0x216B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF32,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0220,0x01CD,0x01F4,0x021E,0x0000,0x0186,0x0197, - 0x0000,0x0000,0x0000,0x0000,0x1E16,0x1E3E,0x1E66,0x1E8E, - 0x1EAC,0x1ED4,0x0000,0x1F1B,0x1F3D,0x1F5F,0x1FDB,0x1F9B, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x041C,0x0400,0x0468,0x0496,0x04BE,0x04E4,0x0506,0x053C, - 0x0550,0x216C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF33,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01A0,0x01CF,0x01F8,0x0000,0x0000,0x0000,0x0196, - 0x0000,0x0000,0x0000,0x0000,0x1E18,0x1E40,0x1E68,0x1E90, - 0x1EAE,0x1ED6,0x0000,0x1F1C,0x1F3E,0x0000,0x1FF8,0x1F9C, - 0x0000,0x1FEC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x041D,0x0401,0x046A,0x0498,0x04C0,0x04E6,0x0508,0x053D, - 0x0551,0x216D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF34,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01A2,0x01D1,0x01FA,0x0222,0x0000,0x0189,0x0000, - 0x0000,0x01B7,0x0000,0x0000,0x1E1A,0x1E42,0x1E6A,0x1E92, - 0x1EB0,0x1ED8,0x0000,0x1F1D,0x1F3F,0x0000,0x1FF9,0x1F9D, - 0x1FCC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x041E,0x0402,0x046C,0x049A,0x04C1,0x04E8,0x050A,0x053E, - 0x0552,0x216E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF35,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01A4,0x01D3,0x01FC,0x0224,0x0000,0x018A,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E1C,0x1E44,0x1E6C,0x1E94, - 0x1EB2,0x1EDA,0x0000,0x0000,0x1F48,0x0000,0x1FEA,0x1F9E, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x041F,0x0403,0x046E,0x049C,0x04C3,0x04EA,0x050C,0x053F, - 0x0553,0x216F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF36,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01A7,0x01D5,0x01FE,0x0226,0x0000,0x0000,0x0000, - 0x01A6,0x0241,0x0000,0x0000,0x1E1E,0x1E46,0x1E6E,0x0000, - 0x1EB4,0x1EDC,0x0000,0x0000,0x1F49,0x0000,0x1FEB,0x1F9F, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0420,0x0404,0x0470,0x049E,0x04C5,0x04EC,0x050E,0x0540, - 0x0554,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF37,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x01D7,0x0200,0x0228,0x0000,0x018F,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E20,0x1E48,0x1E70,0x0000, - 0x1EB6,0x1EDE,0x0000,0x0000,0x1F4A,0x1F68,0x1FFA,0x1FA8, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0421,0x0405,0x0472,0x04A0,0x04C7,0x04EE,0x0000,0x0541, - 0x0555,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF38,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x01D9,0x0202,0x022A,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E22,0x1E4A,0x1E72,0x0000, - 0x1EB8,0x1EE0,0x0000,0x0000,0x1F4B,0x1F69,0x1FFB,0x1FA9, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0422,0x0406,0x0474,0x04A2,0x04C9,0x04F0,0x0000,0x0542, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF39,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01AC,0x01DB,0x0204,0x022C,0x0000,0x0190,0x019C, - 0x01A9,0x0000,0x0000,0x0000,0x1E24,0x1E4C,0x1E74,0x0000, - 0x1EBA,0x1EE2,0x0000,0x1F28,0x1F4C,0x1F6A,0x0000,0x1FAA, - 0x1FD8,0x1FFC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0423,0x0407,0x0476,0x04A4,0x04CB,0x04F2,0x0000,0x0543, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF3A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01AF,0x018E,0x0206,0x022E,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1E26,0x1E4E,0x1E76,0x0000, - 0x1EBC,0x1EE4,0x0000,0x1F29,0x1F4D,0x1F6B,0x0000,0x1FAB, - 0x1FD9,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF41,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF42,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF43,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF44,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF45,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF46,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0430,0x0444,0x0458,0x0479,0x04A7,0x04CE,0x04F5,0x0000, - 0x0574,0x2170,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF47,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0180,0x01B4,0x01DF,0x0209,0x0231,0x0000,0x025D, - 0x0271,0x0285,0x0299,0x02AD,0x1E01,0x1E29,0x1E51,0x1E79, - 0x1E9B,0x1EBF,0x1EE7,0x1F00,0x1F22,0x0000,0x1F64,0x1F80, - 0x1FA4,0x1FD2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0431,0x0445,0x0459,0x047B,0x04A9,0x0000,0x04F7,0x0561, - 0x0575,0x2171,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF48,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0183,0x01B6,0x01E1,0x020B,0x0233,0x0000,0x025E, - 0x0272,0x0286,0x029A,0x02AE,0x1E03,0x1E2B,0x1E53,0x1E7B, - 0x0000,0x1EC1,0x1EE9,0x1F01,0x1F23,0x0000,0x1F65,0x1F81, - 0x1FA5,0x1FD3,0x1FF6,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0432,0x0446,0x045A,0x047D,0x04AB,0x04D1,0x04F9,0x0562, - 0x0576,0x2172,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF49,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0185,0x01B9,0x01E3,0x020D,0x0234,0x0000,0x025F, - 0x0273,0x0287,0x029B,0x02AF,0x1E05,0x1E2D,0x1E55,0x1E7D, - 0x0000,0x1EC3,0x1EEB,0x1F02,0x1F24,0x0000,0x1F66,0x1F82, - 0x1FA6,0x0000,0x1FF7,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0433,0x0447,0x045B,0x047F,0x04AD,0x04D3,0x0000,0x0563, - 0x0577,0x2173,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF4A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0188,0x01BA,0x01E5,0x020F,0x0235,0x0000,0x0260, - 0x0274,0x0288,0x029C,0x0000,0x1E07,0x1E2F,0x1E57,0x1E7F, - 0x0000,0x1EC5,0x1EED,0x1F03,0x1F25,0x0000,0x1F67,0x1F83, - 0x1FA7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0434,0x0448,0x045C,0x0481,0x04AF,0x04D5,0x0000,0x0564, - 0x0578,0x2174,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF4B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x018C,0x01BB,0x01E7,0x0211,0x0236,0x0000,0x0261, - 0x0275,0x0289,0x029D,0x0000,0x1E09,0x1E31,0x1E59,0x1E81, - 0x0000,0x1EC7,0x1EEF,0x1F04,0x1F26,0x1F50,0x1F70,0x1F84, - 0x1FB0,0x1FD6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0435,0x0449,0x045D,0x0000,0x04B1,0x04D7,0x0000,0x0565, - 0x0579,0x2175,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF4C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x018D,0x0000,0x01E9,0x0213,0x0237,0x0000,0x0262, - 0x0276,0x028A,0x029E,0x0000,0x1E0B,0x1E33,0x1E5B,0x1E83, - 0x1EA1,0x1EC9,0x1EF1,0x1F05,0x1F27,0x1F51,0x1F71,0x1F85, - 0x1FB1,0x1FD7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0436,0x044A,0x045E,0x048B,0x04B3,0x04D9,0x0000,0x0566, - 0x057A,0x2176,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF4D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0192,0x01BE,0x01EB,0x0215,0x0238,0x0000,0x0263, - 0x0277,0x028B,0x029F,0x0000,0x1E0D,0x1E35,0x1E5D,0x1E85, - 0x1EA3,0x1ECB,0x1EF3,0x1F06,0x1F30,0x1F52,0x1F72,0x1F86, - 0x1FB2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0437,0x044B,0x045F,0x048D,0x04B5,0x04DB,0x0000,0x0567, - 0x057B,0x2177,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF4E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0195,0x01BD,0x01ED,0x0217,0x0239,0x0250,0x0264, - 0x0278,0x028C,0x02A0,0x0000,0x1E0F,0x1E37,0x1E5F,0x1E87, - 0x1EA5,0x1ECD,0x1EF5,0x1F07,0x1F31,0x1F53,0x1F73,0x1F87, - 0x1FB3,0x1FE0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0438,0x044C,0x0461,0x048F,0x04B7,0x04DD,0x0000,0x0568, - 0x057C,0x2178,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF4F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0199,0x01C6,0x01EF,0x0219,0x0000,0x0251,0x0265, - 0x0279,0x028D,0x02A1,0x0000,0x1E11,0x1E39,0x1E61,0x1E89, - 0x1EA7,0x1ECF,0x1EF7,0x1F10,0x1F32,0x1F54,0x1F74,0x1F90, - 0x1FB4,0x1FE1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0439,0x044D,0x0463,0x0491,0x04B9,0x04DF,0x0501,0x0569, - 0x057D,0x2179,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF50,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x019A,0x01C9,0x01F0,0x021B,0x023C,0x0252,0x0266, - 0x027A,0x028E,0x02A2,0x0000,0x1E13,0x1E3B,0x1E63,0x1E8B, - 0x1EA9,0x1ED1,0x1EF9,0x1F11,0x1F33,0x1F55,0x1F75,0x1F91, - 0x0000,0x1FE2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x043A,0x044E,0x0465,0x0493,0x04BB,0x04E1,0x0503,0x056A, - 0x057E,0x217A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF51,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x019B,0x01CC,0x01F3,0x021D,0x0000,0x0253,0x0267, - 0x027B,0x028F,0x02A3,0x0000,0x1E15,0x1E3D,0x1E65,0x1E8D, - 0x1EAB,0x1ED3,0x0000,0x1F12,0x1F34,0x1F56,0x1F76,0x1F92, - 0x1FB6,0x1FE3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x043B,0x044F,0x0467,0x0495,0x04BD,0x04E3,0x0505,0x056B, - 0x057F,0x217B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF52,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x019E,0x01CE,0x01F5,0x021F,0x023F,0x0254,0x0268, - 0x027C,0x0290,0x02A4,0x0000,0x1E17,0x1E3F,0x1E67,0x1E8F, - 0x1EAD,0x1ED5,0x0000,0x1F13,0x1F35,0x1F57,0x1F77,0x1F93, - 0x1FB7,0x1FE4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x043C,0x0450,0x0469,0x0497,0x04BF,0x04E5,0x0507,0x056C, - 0x0580,0x217C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF53,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01A1,0x01D0,0x01F9,0x0221,0x0240,0x0255,0x0269, - 0x027D,0x0291,0x02A5,0x0000,0x1E19,0x1E41,0x1E69,0x1E91, - 0x1EAF,0x1ED7,0x0000,0x1F14,0x1F36,0x0000,0x1F78,0x1F94, - 0x1FC2,0x1FE5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x043D,0x0451,0x046B,0x0499,0x0000,0x04E7,0x0509,0x056D, - 0x0581,0x217D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF54,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01A3,0x01D2,0x01FB,0x0223,0x0000,0x0256,0x026A, - 0x027E,0x0292,0x02A6,0x0000,0x1E1B,0x1E43,0x1E6B,0x1E93, - 0x1EB1,0x1ED9,0x0000,0x1F15,0x1F37,0x0000,0x1F79,0x1F95, - 0x1FC3,0x1FE6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x043E,0x0452,0x046D,0x049B,0x04C2,0x04E9,0x050B,0x056E, - 0x0582,0x217E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF55,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01A5,0x01D4,0x01FD,0x0225,0x0000,0x0257,0x026B, - 0x027F,0x0293,0x02A7,0x0000,0x1E1D,0x1E45,0x1E6D,0x1E95, - 0x1EB3,0x1EDB,0x0000,0x0000,0x1F40,0x0000,0x1F7A,0x1F96, - 0x1FC4,0x1FE7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x043F,0x0453,0x046F,0x049D,0x04C4,0x04EB,0x050D,0x056F, - 0x0583,0x217F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF56,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01A8,0x01D6,0x01FF,0x0227,0x0000,0x0258,0x026C, - 0x0280,0x0294,0x02A8,0x0000,0x1E1F,0x1E47,0x1E6F,0x1E96, - 0x1EB5,0x1EDD,0x0000,0x0000,0x1F41,0x0000,0x1F7B,0x1F97, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0440,0x0454,0x0471,0x049F,0x04C6,0x04ED,0x050F,0x0570, - 0x0584,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF57,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01AA,0x01D8,0x0201,0x0229,0x0000,0x0259,0x026D, - 0x0281,0x0295,0x02A9,0x0000,0x1E21,0x1E49,0x1E71,0x1E97, - 0x1EB7,0x1EDF,0x0000,0x0000,0x1F42,0x1F60,0x1F7C,0x1FA0, - 0x1FC6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0441,0x0455,0x0473,0x04A1,0x04C8,0x04EF,0x0000,0x0571, - 0x0585,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF58,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01AB,0x01DA,0x0203,0x022B,0x0000,0x025A,0x026E, - 0x0282,0x0296,0x02AA,0x0000,0x1E23,0x1E4B,0x1E73,0x1E98, - 0x1EB9,0x1EE1,0x0000,0x0000,0x1F43,0x1F61,0x1F7D,0x1FA1, - 0x1FC7,0x1FF2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0442,0x0456,0x0475,0x04A3,0x04CA,0x04F1,0x0000,0x0572, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF59,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01AD,0x01DC,0x0205,0x022D,0x0000,0x025B,0x026F, - 0x0283,0x0297,0x02AB,0x0000,0x1E25,0x1E4D,0x1E75,0x1E99, - 0x1EBB,0x1EE3,0x0000,0x1F20,0x1F44,0x1F62,0x0000,0x1FA2, - 0x1FD0,0x1FF3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0443,0x0457,0x0477,0x04A5,0x04CC,0x04F3,0x0000,0x0573, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0xFF5A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x01B0,0x01DD,0x0207,0x022F,0x0000,0x025C,0x0270, - 0x0284,0x0298,0x02AC,0x0000,0x1E27,0x1E4F,0x1E77,0x1E9A, - 0x1EBD,0x1EE5,0x0000,0x1F21,0x1F45,0x1F63,0x0000,0x1FA3, - 0x1FD1,0x1FF4 -}; - - -/* 00C0-05FF */ -static uint16 uni_0C00_05FF[1344]= -{ - 0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, - 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026, - 0x0027,0x0028,0x0029,0x002A,0x0067,0x0068,0x0069,0x0000, - 0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x008A, - 0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E, - 0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, - 0x0047,0x0048,0x0049,0x004A,0x0087,0x0088,0x0089,0x0000, - 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092, - 0x0073,0x0093,0x0074,0x0094,0x0075,0x0095,0x0076,0x0096, - 0x0077,0x0097,0x0078,0x0098,0x0079,0x0099,0x007A,0x009A, - 0x00B7,0x00D7,0x00B8,0x00D8,0x00B9,0x00D9,0x00BA,0x00DA, - 0x00BB,0x00DB,0x00BC,0x00DC,0x00BD,0x00DD,0x00BE,0x00DE, - 0x00BF,0x00DF,0x00C0,0x00E0,0x00C1,0x00E1,0x00C2,0x00E2, - 0x00C3,0x00E3,0x00C4,0x00E4,0x00C5,0x00E5,0x00C6,0x00E6, - 0x0000,0x00E7,0x00C8,0x00E8,0x00C9,0x00E9,0x00CA,0x00EA, - 0x0127,0x0108,0x0128,0x0109,0x0129,0x010A,0x012A,0x010B, - 0x012B,0x010C,0x012C,0x010D,0x012D,0x010E,0x012E,0x010F, - 0x012F,0x0130,0x0111,0x0131,0x0112,0x0132,0x0113,0x0133, - 0x0114,0x0134,0x0115,0x0135,0x0116,0x0136,0x0117,0x0137, - 0x0118,0x0138,0x0119,0x0139,0x011A,0x013A,0x0157,0x0177, - 0x0158,0x0178,0x0159,0x0179,0x015A,0x017A,0x015B,0x017B, - 0x015C,0x017C,0x015D,0x017D,0x015E,0x017E,0x015F,0x017F, - 0x0160,0x0180,0x0161,0x0181,0x0162,0x0182,0x0163,0x0183, - 0x0072,0x0164,0x0184,0x0165,0x0185,0x0166,0x0186,0x0187, - 0x1161,0x0A86,0x07B1,0x11B1,0x0801,0x1201,0x0AD6,0x0851, - 0x1251,0x0B76,0x0BC6,0x08A1,0x12A1,0x12F1,0x0D52,0x0C66, - 0x0D06,0x0941,0x1341,0x0857,0x0947,0x1391,0x0B27,0x0AD7, - 0x09E1,0x13E1,0x1431,0x1481,0x0D07,0x07B8,0x14D1,0x08A8, - 0x0B21,0x1521,0x0B71,0x1571,0x0BC1,0x15C1,0x0C18,0x0C11, - 0x1611,0x0D08,0x1661,0x16B1,0x0D01,0x1701,0x0859,0x0D51, - 0x1751,0x08F9,0x0949,0x0762,0x1162,0x07B2,0x11B2,0x0B79, - 0x0802,0x1202,0x1252,0x12A2,0x0992,0x1392,0x1342,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x09E2,0x0000,0x13E2,0x0A32, - 0x0000,0x1432,0x0A82,0x0000,0x1482,0x0AD2,0x14D2,0x0B22, - 0x1522,0x0B72,0x1572,0x0BC2,0x15C2,0x0C12,0x1612,0x0C62, - 0x1662,0x0CB2,0x16B2,0x0D02,0x1702,0x1752,0x0763,0x1163, - 0x07B3,0x11B3,0x0803,0x1203,0x0853,0x1253,0x08A3,0x12A3, - 0x08F3,0x12F3,0x0943,0x1343,0x0993,0x1393,0x09E3,0x13E3, - 0x1433,0x0A83,0x0000,0x1483,0x0AD3,0x14D3,0x0991,0x0000, - 0x0B23,0x1523,0x0B73,0x1573,0x0BC3,0x15C3,0x0C13,0x1613, - 0x0C63,0x1663,0x0CB3,0x16B3,0x0D03,0x1703,0x0D53,0x1753, - 0x0764,0x1164,0x07B4,0x11B4,0x0804,0x1204,0x0854,0x1254, - 0x08A4,0x12A4,0x08F4,0x12F4,0x0944,0x1344,0x0994,0x1394, - 0x09E4,0x13E4,0x0A34,0x1434,0x0A84,0x1484,0x0AD4,0x14D4, - 0x0AD1,0x1524,0x0B74,0x1574,0x0BC4,0x15C4,0x0C14,0x1614, - 0x0C64,0x1664,0x0CB4,0x16B4,0x0D04,0x1704,0x0D54,0x1754, - 0x0765,0x1165,0x07B5,0x11B5,0x1205,0x1255,0x12A5,0x12F5, - 0x1345,0x1395,0x09E5,0x0A35,0x1435,0x0A31,0x0A85,0x14D5, - 0x1525,0x0C19,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x1396,0x13E6,0x1436,0x1486,0x14D6,0x1526,0x1576,0x15C6, - 0x1616,0x1666,0x16B6,0x1706,0x1756,0x1167,0x11B7,0x1207, - 0x1257,0x12A7,0x12F7,0x1347,0x1397,0x13E7,0x1437,0x1487, - 0x14D7,0x1527,0x1577,0x15C7,0x1617,0x1667,0x16B7,0x1707, - 0x1757,0x1168,0x11B8,0x1208,0x1258,0x12A8,0x12F8,0x1348, - 0x1398,0x13E8,0x1438,0x1488,0x14D8,0x1528,0x1578,0x15C8, - 0x1618,0x1668,0x16B8,0x1708,0x1758,0x1169,0x11B9,0x1209, - 0x1259,0x12A9,0x12F9,0x1349,0x1399,0x13E9,0x1439,0x1489, - 0x14D9,0x1529,0x1579,0x15C9,0x1619,0x1669,0x16B9,0x1709, - 0x1759,0x116A,0x11BA,0x120A,0x125A,0x12AA,0x12FA,0x134A, - 0x139A,0x13EA,0x143A,0x148A,0x14DA,0x152A,0x157A,0x15CA, - 0x161A,0x166A,0x16BA,0x170A,0x175A,0x116B,0x11BB,0x120B, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x01F7,0x0000, - 0x01F8,0x01F9,0x01FA,0x0000,0x0253,0x0000,0x0254,0x0255, - 0x01D9,0x01FC,0x0257,0x01FE,0x01FF,0x0200,0x0201,0x0202, - 0x0258,0x0204,0x02A7,0x0206,0x0207,0x0208,0x0209,0x020A, - 0x0299,0x0248,0x0000,0x02A9,0x024B,0x024C,0x0298,0x024E, - 0x024F,0x0250,0x0251,0x0252,0x0217,0x0218,0x0219,0x021A, - 0x021B,0x021C,0x021D,0x021E,0x021F,0x0220,0x0221,0x0222, - 0x0223,0x0224,0x0225,0x0226,0x0227,0x0228,0x0229,0x022A, - 0x0267,0x0268,0x0269,0x026A,0x026B,0x026C,0x026D,0x026E, - 0x026F,0x0270,0x0271,0x0272,0x0273,0x0274,0x0275,0x0000, - 0x0277,0x0278,0x0259,0x025A,0x0297,0x02B8,0x02B9,0x02BA, - 0x0000,0x02BB,0x029C,0x02BC,0x029D,0x02BD,0x029E,0x02BE, - 0x029F,0x02BF,0x02A0,0x02C0,0x02A1,0x02C1,0x02A2,0x02C2, - 0x02A3,0x02C3,0x02A4,0x02C4,0x02A5,0x02C5,0x02A6,0x02C6, - 0x02C7,0x02C8,0x02C9,0x02CA,0x0000,0x0307,0x0308,0x0000, - 0x0309,0x0000,0x0000,0x030A,0x030B,0x02EC,0x02ED,0x02EE, - 0x0AF1,0x0B41,0x0B91,0x0BE1,0x0C31,0x0C81,0x0CD1,0x0D21, - 0x0732,0x0782,0x07D2,0x0822,0x0872,0x08C2,0x0912,0x0962, - 0x0730,0x0780,0x07D0,0x0820,0x0870,0x08C0,0x0910,0x0960, - 0x09B0,0x0A00,0x0A50,0x0AA0,0x0AF0,0x0B40,0x0B90,0x0BE0, - 0x0C30,0x0C80,0x0CD0,0x0D20,0x0731,0x0781,0x07D1,0x0821, - 0x0871,0x08C1,0x0911,0x0961,0x09B1,0x0A01,0x0A51,0x0AA1, - 0x1130,0x1180,0x11D0,0x1220,0x1270,0x12C0,0x1310,0x1360, - 0x13B0,0x1400,0x1450,0x14A0,0x14F0,0x1540,0x1590,0x15E0, - 0x1630,0x1680,0x16D0,0x1720,0x1131,0x1181,0x11D1,0x1221, - 0x1271,0x12C1,0x1311,0x1361,0x13B1,0x1401,0x1451,0x14A1, - 0x14F1,0x1541,0x1591,0x15E1,0x1631,0x1681,0x16D1,0x1721, - 0x1132,0x1182,0x11D2,0x1222,0x1272,0x12C2,0x1312,0x1362, - 0x09B2,0x13B2,0x0A02,0x1402,0x0A52,0x1452,0x0AA2,0x14A2, - 0x0AF2,0x14F2,0x0B42,0x1542,0x0B92,0x1592,0x0BE2,0x15E2, - 0x0C32,0x1632,0x0C82,0x1682,0x0CD2,0x16D2,0x0D22,0x1722, - 0x0733,0x1133,0x0783,0x1183,0x07D3,0x11D3,0x0823,0x1223, - 0x0873,0x1273,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0913,0x1313,0x0963,0x1363,0x09B3,0x13B3, - 0x0A03,0x1403,0x0A53,0x1453,0x0AA3,0x14A3,0x0AF3,0x14F3, - 0x0B43,0x1543,0x0B93,0x1593,0x0BE3,0x15E3,0x0C33,0x1633, - 0x0C83,0x1683,0x0CD3,0x16D3,0x0D23,0x1723,0x0734,0x1134, - 0x0784,0x1184,0x07D4,0x11D4,0x0824,0x1224,0x0874,0x1274, - 0x08C4,0x12C4,0x0914,0x1314,0x0964,0x1364,0x09B4,0x13B4, - 0x0A04,0x1404,0x0A54,0x1454,0x0AA4,0x14A4,0x0AF4,0x14F4, - 0x0B44,0x0B94,0x1594,0x0BE4,0x15E4,0x0C34,0x1634,0x0C84, - 0x1684,0x0CD4,0x16D4,0x0D24,0x1724,0x0735,0x1135,0x0000, - 0x07D5,0x11D5,0x0825,0x1225,0x0875,0x1275,0x08C5,0x12C5, - 0x0915,0x1315,0x0965,0x1365,0x09B5,0x13B5,0x0A05,0x1405, - 0x0A55,0x1455,0x0AA5,0x14A5,0x0AF5,0x14F5,0x0B45,0x1545, - 0x0B95,0x1595,0x0BE5,0x15E5,0x0C35,0x1635,0x0C85,0x1685, - 0x0CD5,0x16D5,0x0D25,0x1725,0x0736,0x1136,0x0786,0x1186, - 0x07D6,0x11D6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0A06,0x1406,0x0A56,0x1456,0x0AA6,0x14A6,0x0AF6,0x14F6, - 0x0B46,0x1546,0x0B96,0x1596,0x0BE6,0x15E6,0x0C36,0x1636, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0787,0x07D7,0x0827,0x0877,0x08C7,0x0917,0x0967, - 0x09B7,0x0A07,0x0A57,0x0AA7,0x0AF7,0x0B47,0x0B97,0x0BE7, - 0x0C37,0x0C87,0x0CD7,0x0D27,0x0738,0x0788,0x07D8,0x0828, - 0x0878,0x08C8,0x0918,0x0968,0x09B8,0x0A08,0x0A58,0x0AA8, - 0x0AF8,0x0B48,0x0B98,0x0BE8,0x0C38,0x0C88,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x1187,0x11D7,0x1227,0x1277,0x12C7,0x1317,0x1367, - 0x13B7,0x1407,0x1457,0x14A7,0x14F7,0x1547,0x1597,0x15E7, - 0x1637,0x1687,0x16D7,0x1727,0x1138,0x1188,0x11D8,0x1228, - 0x1278,0x12C8,0x1318,0x1368,0x13B8,0x1408,0x1458,0x14A8, - 0x14F8,0x1548,0x1598,0x15E8,0x1638,0x1688,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - -/* 1E00-1FFF */ -static uint16 uni_1E00_1FFF[512]= -{ - 0x076C,0x116C,0x07BC,0x11BC,0x080C,0x120C,0x085C,0x125C, - 0x08AC,0x12AC,0x08FC,0x12FC,0x094C,0x134C,0x099C,0x139C, - 0x09EC,0x13EC,0x0A3C,0x143C,0x0A8C,0x148C,0x0ADC,0x14DC, - 0x0B2C,0x152C,0x0B7C,0x157C,0x0BCC,0x15CC,0x0C1C,0x161C, - 0x0C6C,0x166C,0x0CBC,0x16BC,0x0D0C,0x170C,0x0D5C,0x175C, - 0x076D,0x116D,0x07BD,0x11BD,0x080D,0x120D,0x085D,0x125D, - 0x08AD,0x12AD,0x08FD,0x12FD,0x094D,0x134D,0x099D,0x139D, - 0x09ED,0x13ED,0x0A3D,0x143D,0x0A8D,0x148D,0x0ADD,0x14DD, - 0x0B2D,0x152D,0x0B7D,0x157D,0x0BCD,0x15CD,0x0C1D,0x161D, - 0x0C6D,0x166D,0x0CBD,0x16BD,0x0D0D,0x170D,0x0D5D,0x175D, - 0x076E,0x116E,0x07BE,0x11BE,0x080E,0x120E,0x085E,0x125E, - 0x08AE,0x12AE,0x08FE,0x12FE,0x094E,0x134E,0x099E,0x139E, - 0x0770,0x13EE,0x0A3E,0x143E,0x0A8E,0x148E,0x0ADE,0x14DE, - 0x0B2E,0x152E,0x0B7E,0x157E,0x0BCE,0x15CE,0x0C1E,0x161E, - 0x0C6E,0x166E,0x0CBE,0x16BE,0x0D0E,0x170E,0x0D5E,0x175E, - 0x076F,0x116F,0x07BF,0x11BF,0x080F,0x120F,0x085F,0x125F, - 0x08AF,0x12AF,0x08FF,0x12FF,0x094F,0x134F,0x099F,0x139F, - 0x09EF,0x13EF,0x0A3F,0x143F,0x0A8F,0x148F,0x0ADF,0x14DF, - 0x0B2F,0x152F,0x0B7F,0x157F,0x0BCF,0x15CF,0x161F,0x166F, - 0x16BF,0x170F,0x175F,0x1170,0x0000,0x0000,0x0000,0x0000, - 0x0900,0x1300,0x0950,0x1350,0x09A0,0x13A0,0x09F0,0x13F0, - 0x0A40,0x1440,0x0A90,0x1490,0x0AE0,0x14E0,0x0B30,0x1530, - 0x0B80,0x1580,0x0BD0,0x15D0,0x0C20,0x1620,0x0C70,0x1670, - 0x0CC0,0x16C0,0x0D10,0x1710,0x0D60,0x1760,0x0771,0x1171, - 0x07C1,0x11C1,0x0811,0x1211,0x0861,0x1261,0x08B1,0x12B1, - 0x0901,0x1301,0x0951,0x1351,0x09A1,0x13A1,0x09F1,0x13F1, - 0x0A41,0x1441,0x0A91,0x1491,0x0AE1,0x14E1,0x0B31,0x1531, - 0x0B81,0x1581,0x0BD1,0x15D1,0x0C21,0x1621,0x0C71,0x1671, - 0x0CC1,0x16C1,0x0D11,0x1711,0x0D61,0x1761,0x0772,0x1172, - 0x07C2,0x11C2,0x0812,0x1212,0x0862,0x1262,0x08B2,0x12B2, - 0x0902,0x1302,0x0952,0x1352,0x09A2,0x13A2,0x09F2,0x13F2, - 0x0A42,0x1442,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x1173,0x11C3,0x1213,0x1263,0x12B3,0x1303,0x1353,0x13A3, - 0x0773,0x07C3,0x0813,0x0863,0x08B3,0x0903,0x0953,0x09A3, - 0x13F3,0x1443,0x1493,0x14E3,0x1533,0x1583,0x0000,0x0000, - 0x09F3,0x0A43,0x0A93,0x0AE3,0x0B33,0x0B83,0x0000,0x0000, - 0x1713,0x1763,0x1174,0x11C4,0x1214,0x1264,0x12B4,0x1304, - 0x0D13,0x0D63,0x0774,0x07C4,0x0814,0x0864,0x08B4,0x0904, - 0x1354,0x13A4,0x13F4,0x1444,0x1494,0x14E4,0x1534,0x1584, - 0x0954,0x09A4,0x09F4,0x0A44,0x0A94,0x0AE4,0x0B34,0x0B84, - 0x15D4,0x1624,0x1674,0x16C4,0x1714,0x1764,0x0000,0x0000, - 0x0BD4,0x0C24,0x0C74,0x0CC4,0x0D14,0x0D64,0x0000,0x0000, - 0x12B5,0x1305,0x1355,0x13A5,0x13F5,0x1445,0x1495,0x14E5, - 0x0000,0x0905,0x0000,0x09A5,0x0000,0x0A45,0x0000,0x0AE5, - 0x1675,0x16C5,0x1715,0x1765,0x1176,0x11C6,0x1216,0x1266, - 0x0C75,0x0CC5,0x0D15,0x0D65,0x0776,0x07C6,0x0816,0x0866, - 0x12B6,0x1306,0x1356,0x13A6,0x13F6,0x1446,0x1496,0x14E6, - 0x1536,0x1586,0x15D6,0x1626,0x1676,0x16C6,0x0000,0x0000, - 0x1177,0x11C7,0x1217,0x1267,0x12B7,0x1307,0x1357,0x13A7, - 0x0777,0x07C7,0x0817,0x0867,0x08B7,0x0907,0x0957,0x09A7, - 0x13F7,0x1447,0x1497,0x14E7,0x1537,0x1587,0x15D7,0x1627, - 0x09F7,0x0A47,0x0A97,0x0AE7,0x0B37,0x0B87,0x0BD7,0x0C27, - 0x1677,0x16C7,0x1717,0x1767,0x1178,0x11C8,0x1218,0x1268, - 0x0C77,0x0CC7,0x0D17,0x0D67,0x0778,0x07C8,0x0818,0x0868, - 0x12B8,0x1308,0x1358,0x13A8,0x13F8,0x0000,0x1498,0x14E8, - 0x08B8,0x0908,0x08B6,0x0906,0x09A8,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x1538,0x1588,0x15D8,0x0000,0x1678,0x16C8, - 0x0956,0x09A6,0x09F6,0x0A46,0x0B88,0x0000,0x0000,0x0000, - 0x1718,0x1768,0x1179,0x11C9,0x0000,0x0000,0x12B9,0x1309, - 0x0D18,0x0D68,0x0A96,0x0AE6,0x0000,0x0000,0x0000,0x0000, - 0x13A9,0x13F9,0x1449,0x1499,0x14E9,0x1539,0x1589,0x15D9, - 0x09A9,0x09F9,0x0BD6,0x0C26,0x0B39,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x16C9,0x1719,0x0000,0x0000,0x11CA,0x121A, - 0x0B36,0x0B86,0x0C76,0x0CC6,0x0D19,0x0000,0x0000,0x0000 -}; - - -/* 2160-217F */ -static uint16 uni_2160_217F[32]= -{ - 0x0739,0x0789,0x07D9,0x0829,0x0879,0x08C9,0x0919,0x0969, - 0x09B9,0x0A09,0x0A59,0x0AA9,0x0AF9,0x0B49,0x0B99,0x0BE9, - 0x1139,0x1189,0x11D9,0x1229,0x1279,0x12C9,0x1319,0x1369, - 0x13B9,0x1409,0x1459,0x14A9,0x14F9,0x1549,0x1599,0x15E9 -}; - - -/* 24B0-24EF */ -static uint16 uni_24B0_24EF[64]= -{ - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0511,0x0512, - 0x0513,0x0514,0x0515,0x0516,0x0517,0x0518,0x0519,0x051A, - 0x051B,0x051C,0x051D,0x051E,0x051F,0x0520,0x0521,0x0522, - 0x0523,0x0524,0x0525,0x0526,0x0527,0x0528,0x0529,0x052A, - 0x0531,0x0532,0x0533,0x0534,0x0535,0x0536,0x0537,0x0538, - 0x0539,0x053A,0x053B,0x053C,0x053D,0x053E,0x053F,0x0540, - 0x0541,0x0542,0x0543,0x0544,0x0545,0x0546,0x0547,0x0548, - 0x0549,0x054A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - -/* FF20-FF5F */ -static uint16 uni_FF20_FF5F[64]= -{ - 0x0000,0x0560,0x05B0,0x0600,0x0650,0x06A0,0x06F0,0x0740, - 0x0790,0x07E0,0x0830,0x0880,0x08D0,0x0920,0x0970,0x09C0, - 0x0A10,0x0A60,0x0AB0,0x0B00,0x0B50,0x0BA0,0x0BF0,0x0C40, - 0x0C90,0x0CE0,0x0D30,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0F60,0x0FB0,0x1000,0x1050,0x10A0,0x10F0,0x1140, - 0x1190,0x11E0,0x1230,0x1280,0x12D0,0x1320,0x1370,0x13C0, - 0x1410,0x1460,0x14B0,0x1500,0x1550,0x15A0,0x15F0,0x1640, - 0x1690,0x16E0,0x1730,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - - - -/* - Returns - a number 0..15, if a valid HEX digit in lower case, - -1 otherwise. -*/ - -static int hexlo(int x) -{ - static char hex_lo_digit[256]= - { - -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, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1, /* 0123456789:;<=>? */ - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* @ABCDEFGHIJKLMNO */ - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* PQRSTUVWXYZ[\]^_ */ - -1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* `abcdefghijklmno */ - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* pqrstuvwxyz{|}~. */ - -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, /* ................ */ - -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, /* ................ */ - }; - return hex_lo_digit[(unsigned int) x]; -} - - -/* - Safe characters: - '\0' NULL - A..Z capital letters, - a..z small letters - 0..9 digits - _ underscore -*/ -static char filename_safe_char[128]= -{ - 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, /* !"#$%&'()*+,-./ */ - 1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, /* 0123456789:;<=>? */ - 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* @ABCDEFGHIJKLMNO */ - 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, /* PQRSTUVWXYZ[\]^_ */ - 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* `abcdefghijklmno */ - 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz{|}~. */ -}; - -#define MY_FILENAME_ESCAPE '@' - -static int -my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t *pwc, const uchar *s, const uchar *e) -{ - int byte1, byte2; - if (s >= e) - return MY_CS_TOOSMALL; - - if (*s < 128 && filename_safe_char[*s]) - { - *pwc= *s; - return 1; - } - - if (*s != MY_FILENAME_ESCAPE) - return MY_CS_ILSEQ; - - if (s + 3 > e) - return MY_CS_TOOSMALL3; - - byte1= s[1]; - byte2= s[2]; - - if (byte1 >= 0x30 && byte1 <= 0x7F && - byte2 >= 0x30 && byte2 <= 0x7F) - { - int code= (byte1 - 0x30) * 80 + byte2 - 0x30; - if (code < 5994 && touni[code]) - { - *pwc= touni[code]; - return 3; - } - if (byte1 == '@' && byte2 == '@') - { - *pwc= 0; - return 3; - } - } - - if (s + 4 > e) - return MY_CS_TOOSMALL4; - - if ((byte1= hexlo(byte1)) >= 0 && - (byte2= hexlo(byte2)) >= 0) - { - int byte3= hexlo(s[3]); - int byte4= hexlo(s[4]); - if (byte3 >=0 && byte4 >=0) - { - *pwc= (byte1 << 12) + (byte2 << 8) + (byte3 << 4) + byte4; - return 5; - } - } - - return MY_CS_ILSEQ; -} - - -static int -my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)), - my_wc_t wc, uchar *s, uchar *e) -{ - int code; - char hex[]= "0123456789abcdef"; - if (wc < 128 && filename_safe_char[wc]) - { - *s= (uchar) wc; - return 1; - } - - if (s + 3 > e) - return MY_CS_TOOSMALL3; - - *s++= MY_FILENAME_ESCAPE; - if ((wc >= 0x00C0 && wc <= 0x05FF && (code= uni_0C00_05FF[wc - 0x00C0])) || - (wc >= 0x1E00 && wc <= 0x1FFF && (code= uni_1E00_1FFF[wc - 0x1E00])) || - (wc >= 0x2160 && wc <= 0x217F && (code= uni_2160_217F[wc - 0x2160])) || - (wc >= 0x24B0 && wc <= 0x24EF && (code= uni_24B0_24EF[wc - 0x24B0])) || - (wc >= 0xFF20 && wc <= 0xFF5F && (code= uni_FF20_FF5F[wc - 0xFF20]))) - { - *s++= (code / 80) + 0x30; - *s++= (code % 80) + 0x30; - return 3; - } - - /* Non letter */ - if (s + 5 > e) - return MY_CS_TOOSMALL5; - - *s++= hex[(wc >> 12) & 15]; - *s++= hex[(wc >> 8) & 15]; - *s++= hex[(wc >> 4) & 15]; - *s++= hex[(wc) & 15]; - return 5; -} - - -static MY_COLLATION_HANDLER my_collation_filename_handler = -{ - NULL, /* init */ - my_strnncoll_utf8mb3, - my_strnncollsp_utf8mb3, - my_strnxfrm_unicode, - my_strnxfrmlen_utf8mb3, - my_like_range_mb, - my_wildcmp_utf8mb3, - my_strcasecmp_utf8mb3, - my_instr_mb, - my_hash_sort_utf8mb3, - my_propagate_complex -}; - - -static MY_CHARSET_HANDLER my_charset_filename_handler= -{ - NULL, /* init */ - my_ismbchar_utf8mb3, - my_mbcharlen_utf8mb3, - my_numchars_mb, - my_charpos_mb, - my_well_formed_len_mb, - my_lengthsp_8bit, - my_numcells_mb, - my_mb_wc_filename, - my_wc_mb_filename, - my_mb_ctype_mb, - my_caseup_str_utf8mb3, - my_casedn_str_utf8mb3, - my_caseup_utf8mb3, - my_casedn_utf8mb3, - my_snprintf_8bit, - my_long10_to_str_8bit, - my_longlong10_to_str_8bit, - my_fill_8bit, - my_strntol_8bit, - my_strntoul_8bit, - my_strntoll_8bit, - my_strntoull_8bit, - my_strntod_8bit, - my_strtoll10_8bit, - my_strntoull10rnd_8bit, - my_scan_8bit -}; - - - -CHARSET_INFO my_charset_filename= -{ - 17,0,0, /* number */ - MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_HIDDEN|MY_CS_NONASCII, - "filename", /* cs name */ - "filename", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_utf8, /* ctype */ - to_lower_utf8, /* to_lower */ - to_upper_utf8, /* to_upper */ - to_upper_utf8, /* sort_order */ - NULL, /* contractions */ - NULL, /* sort_order_big*/ - NULL, /* tab_to_uni */ - NULL, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 1, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 5, /* mbmaxlen */ - 0, /* min_sort_char */ - 0xFFFF, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 1, /* levels_for_compare */ - 1, /* levels_for_order */ - &my_charset_filename_handler, - &my_collation_filename_handler -}; - -#ifdef MY_TEST_UTF8 -#include - -static void test_mb(CHARSET_INFO *cs, uchar *s) -{ - while(*s) - { - if (my_ismbhead_utf8(cs,*s)) - { - uint len=my_mbcharlen_utf8(cs,*s); - while(len--) - { - printf("%c",*s); - s++; - } - printf("\n"); - } - else - { - printf("%c\n",*s); - s++; - } - } -} - -int main() -{ - char str[1024]=" utf8 test проба ПЕРÐ� по-РУССКИ"; - CHARSET_INFO *cs; - - test_mb(cs,(uchar*)str); - - printf("orig :'%s'\n",str); - - my_caseup_utf8(cs,str,15); - printf("caseup :'%s'\n",str); - - my_caseup_str_utf8(cs,str); - printf("caseup_str:'%s'\n",str); - - my_casedn_utf8(cs,str,15); - printf("casedn :'%s'\n",str); - - my_casedn_str_utf8(cs,str); - printf("casedn_str:'%s'\n",str); - - return 0; -} - -#endif - -#endif /* HAVE_CHARSET_utf8mb3 */ diff --git a/externals/mysql/strings/ctype-win1250ch.c b/externals/mysql/strings/ctype-win1250ch.c deleted file mode 100644 index f0e4ae7456..0000000000 --- a/externals/mysql/strings/ctype-win1250ch.c +++ /dev/null @@ -1,794 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Shared, independent copyright: (C) 2001 Jan Pazdziora. - - Development of this software was supported by Neocortex, s.r.o. - MySQL AB expresses its gratitude to Jan for for giving us this software. - - Bug reports and suggestions are always welcome. - - This file implements the collating sequence for Windows-1250 - character set. It merely extends the binary sorting of US-ASCII - by adding characters with diacritical marks into proper places. - In addition, it sorts 'ch' between 'h' and 'i', and the sorting - is case sensitive, with uppercase being sorted first, in the - second pass. -*/ - -/* - * This comment is parsed by configure to create ctype.c, - * so don't change it unless you know what you are doing. - * - * .configure. strxfrm_multiply_win1250ch=2 - */ - -#include "my_global.h" -#include "m_string.h" -#include "m_ctype.h" - -#ifdef HAVE_CHARSET_cp1250 - - -static uint16 tab_cp1250_uni[256]={ - 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, -0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, -0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, -0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, -0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, -0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, -0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, -0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, -0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, -0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, -0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, -0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, -0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, -0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, -0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, -0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, -0x20AC, 0,0x201A, 0,0x201E,0x2026,0x2020,0x2021, - 0,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179, - 0,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, - 0,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A, -0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7, -0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B, -0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7, -0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C, -0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, -0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, -0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, -0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, -0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, -0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, -0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, -0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 -}; - - -/* 0000-00FD , 254 chars */ -static uchar tab_uni_cp1250_plane00[]={ -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, -0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, -0x40,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,0x5B,0x5C,0x5D,0x5E,0x5F, -0x60,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,0x7B,0x7C,0x7D,0x7E,0x7F, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0xA0,0x00,0x00,0x00,0xA4,0x00,0xA6,0xA7,0xA8,0xA9,0x00,0xAB,0xAC,0xAD,0xAE,0x00, -0xB0,0xB1,0x00,0x00,0xB4,0xB5,0xB6,0xB7,0xB8,0x00,0x00,0xBB,0x00,0x00,0x00,0x00, -0x00,0xC1,0xC2,0x00,0xC4,0x00,0x00,0xC7,0x00,0xC9,0x00,0xCB,0x00,0xCD,0xCE,0x00, -0x00,0x00,0x00,0xD3,0xD4,0x00,0xD6,0xD7,0x00,0x00,0xDA,0x00,0xDC,0xDD,0x00,0xDF, -0x00,0xE1,0xE2,0x00,0xE4,0x00,0x00,0xE7,0x00,0xE9,0x00,0xEB,0x00,0xED,0xEE,0x00, -0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD}; - -/* 0102-017E , 125 chars */ -static uchar tab_uni_cp1250_plane01[]={ -0xC3,0xE3,0xA5,0xB9,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0, -0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC5,0xE5,0x00,0x00,0xBC,0xBE,0x00,0x00,0xA3, -0xB3,0xD1,0xF1,0x00,0x00,0xD2,0xF2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD5,0xF5, -0x00,0x00,0xC0,0xE0,0x00,0x00,0xD8,0xF8,0x8C,0x9C,0x00,0x00,0xAA,0xBA,0x8A,0x9A, -0xDE,0xFE,0x8D,0x9D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD9,0xF9,0xDB,0xFB, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8F,0x9F,0xAF,0xBF,0x8E,0x9E}; - -/* 2013-20AC , 154 chars */ -static uchar tab_uni_cp1250_plane20[]={ -0x96,0x97,0x00,0x00,0x00,0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00,0x86,0x87,0x95, -0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0x9B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80}; - -/* 02C7-02DD , 23 chars */ -static uchar tab_uni_cp1250_plane02[]={ -0xA1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD}; - -/* 2122-2122 , 1 chars */ -static uchar tab_uni_cp1250_plane21[]={ -0x99}; - - -static MY_UNI_IDX idx_uni_cp1250[]={ - {0x0000,0x00FD,tab_uni_cp1250_plane00}, - {0x0102,0x017E,tab_uni_cp1250_plane01}, - {0x2013,0x20AC,tab_uni_cp1250_plane20}, - {0x02C7,0x02DD,tab_uni_cp1250_plane02}, - {0x2122,0x2122,tab_uni_cp1250_plane21}, - {0,0,NULL} -}; - - -static uchar NEAR ctype_win1250ch[] = { -0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x28, 0x28, 0x28, 0x28, 0x28, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x48, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, -0x84, 0x84, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -0x10, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x10, 0x10, 0x10, 0x10, 0x10, -0x10, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x02, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, -0x02, 0x02, 0x02, 0x10, 0x10, 0x10, 0x10, 0x20, -0x20, 0x20, 0x10, 0x20, 0x10, 0x10, 0x10, 0x10, -0x20, 0x10, 0x01, 0x10, 0x01, 0x01, 0x01, 0x01, -0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -0x20, 0x10, 0x02, 0x10, 0x02, 0x02, 0x02, 0x02, -0x48, 0x10, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, -0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x10, 0x01, -0x10, 0x10, 0x10, 0x02, 0x10, 0x10, 0x10, 0x10, -0x10, 0x02, 0x02, 0x10, 0x01, 0x10, 0x02, 0x02, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x10, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x10, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x10 -}; - -static uchar NEAR to_lower_win1250ch[] = { -0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, -0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, -0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, -0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, -0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, -0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, -0x40, 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, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, -0x60, 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, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, -0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -0x88, 0x89, 0x9a, 0x8b, 0x9c, 0x9d, 0x9e, 0x9f, -0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, -0xa0, 0xa1, 0xa2, 0xb3, 0xa4, 0xb9, 0xa6, 0xdf, -0xa8, 0xa9, 0xba, 0xab, 0xac, 0xad, 0xae, 0xbf, -0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, -0xb8, 0xb9, 0xba, 0xbb, 0xbe, 0xbd, 0xbe, 0xbf, -0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, -0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, -0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xd7, -0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf, -0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, -0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, -0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, -0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff -}; - -static uchar NEAR to_upper_win1250ch[] = { -0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, -0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, -0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, -0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, -0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, -0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, -0x40, 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, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, -0x60, 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, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, -0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -0x98, 0x99, 0x8a, 0x9b, 0x8c, 0x8d, 0x8e, 0x8f, -0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, -0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, -0xb0, 0xb1, 0xb2, 0xa3, 0xb4, 0xb5, 0xb6, 0xb7, -0xb8, 0xa5, 0xaa, 0xbb, 0xbc, 0xbd, 0xbc, 0xaf, -0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, -0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, -0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, -0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xa7, -0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, -0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, -0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xf7, -0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xff -}; - - - -static uchar NEAR sort_order_win1250ch[] = { -0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, -32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, -48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, -80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, -96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, -112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, -128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, -144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, -160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, -176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, -208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, -224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, -240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 -}; - -static uchar NEAR _sort_order_win1250ch1[] = { -0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, -0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, -0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, -0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, -/* space ord 32 0x20 */ -0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, -0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, -/* 0 ord 48 0x30 */ -0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, -0x9a, 0x9b, - /* colon ord 58 0x3a */ - 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, -0xa2, - /* A ord 65 0x41 */ - 0xa4, 0xa5, - /* C ord 67 0x43 */ - 0xff, 0xa8, 0xa9, 0xaa, 0xab, -0xac, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, -0xb5, 0xb6, - /* R ord 82 0x52 */ - 0xb7, - /* S ord 83 0x53 */ - 0xb9, 0xbc, 0xbd, 0xbe, 0xbf, -0xc0, 0xc1, 0xc2, - /* [ ord 91 0x5b */ - 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, -0xc9, - /* a ord 97 0x61 */ - 0xa4, 0xa5, 0xff, 0xa8, 0xa9, 0xaa, 0xab, -0xac, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, -0xb5, 0xb6, 0xb7, 0xb9, 0xbc, 0xbd, 0xbe, 0xbf, -0xc0, 0xc1, 0xc2, - /* { ord 123 0x7b */ - 0xca, 0xcb, 0xcc, 0xcd, 0x81, -0x81, 0x81, 0xce, 0x81, 0xcf, 0xd0, 0xd1, 0xd2, -0x81, 0xd3, - /* Scaron ord 138 0x8a */ - 0xba, 0xd4, 0xb9, 0xbc, 0xc3, 0xc2, -0x81, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, -0x81, 0xdc, 0xba, 0xdd, 0xb9, 0xbc, 0xc3, 0xc2, -/* nobreakspace ord 160 0xa0 */ -0x82, 0xde, 0xdf, 0xb1, 0xe0, 0xa4, 0xe1, 0xe2, -0xe3, 0xe4, 0xb9, 0xe5, 0xe6, 0xe7, 0xe8, 0xc2, -0xe9, 0xea, 0xeb, 0xb1, 0xed, 0xee, 0x81, 0xef, -/* cedilla ord 183 0xb8 */ -0xf0, 0xa4, 0xb9, 0xf1, 0xb1, 0xf2, 0xb1, 0xc2, -0xb7, 0xa4, 0xa4, 0xa4, 0xa4, 0xb1, 0xa6, 0xa6, -0xa7, 0xa9, 0xa9, 0xa9, 0xa9, 0xae, 0xae, 0xa8, -/* Eth ord 208 0xd0 */ -0xa8, 0xb3, 0xb3, 0xb4, 0xb4, 0xb4, 0xb4, 0xf3, -0xb8, 0xbd, 0xbd, 0xbd, 0xbd, 0xc1, 0xbc, 0xbb, -/* racute ord 224 0xe0 */ -0xb7, 0xa4, 0xa4, 0xa4, 0xa4, 0xb1, 0xa6, 0xa6, -0xa7, 0xa9, 0xa9, 0xa9, 0xa9, 0xae, 0xae, 0xa8, -/* eth ord 240 0xf0 */ -0xa8, 0xb3, 0xb3, 0xb4, 0xb4, 0xb4, 0xb4, 0xf4, -0xb8, 0xbd, 0xbd, 0xbd, 0xbd, 0xc1, 0xbc, 0xf5 -}; - -static uchar NEAR _sort_order_win1250ch2[] = { -0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, -0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, -0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, -0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, -/* space ord 32 0x20 */ -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -/* 0 ord 48 0x30 */ -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, - /* colon ord 58 0x3a */ - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, - /* A ord 65 0x41 */ - 0x01, 0x01, - /* C ord 67 0x43 */ - 0xff, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, - /* R ord 82 0x52 */ - 0x01, - /* S ord 83 0x53 */ - 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, - /* [ ord 91 0x5b */ - 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, - /* a ord 97 0x61 */ - 0x02, 0x02, 0xff, 0x02, 0x02, 0x02, 0x02, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, -0x02, 0x02, 0x02, - /* { ord 123 0x7b */ - 0x01, 0x01, 0x01, 0x01, 0x22, -0x23, 0x24, 0x01, 0x25, 0x01, 0x01, 0x01, 0x01, -0x26, 0x01, - /* Scaron ord 138 0x8a */ - 0x01, 0x01, 0x03, 0x03, 0x01, 0x05, -0x27, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x28, 0x01, 0x02, 0x01, 0x04, 0x04, 0x02, 0x06, -/* nobreakspace ord 160 0xa0 */ -0x02, 0x01, 0x01, 0x07, 0x01, 0x11, 0x01, 0x01, -0x01, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x03, -0x01, 0x01, 0x01, 0x08, 0x01, 0x01, 0x29, 0x01, -/* cedilla ord 184 0xb8 */ -0x01, 0x12, 0x06, 0x01, 0x05, 0x01, 0x06, 0x04, -0x03, 0x03, 0x05, 0x07, 0x09, 0x03, 0x03, 0x05, -0x01, 0x03, 0x09, 0x07, 0x05, 0x03, 0x05, 0x03, -/* Eth ord 208 0xd0 */ -0x05, 0x03, 0x05, 0x03, 0x05, 0x09, 0x07, 0x01, -0x01, 0x05, 0x03, 0x09, 0x07, 0x03, 0x05, 0x01, -/* racute ord 224 0xe0 */ -0x04, 0x04, 0x06, 0x08, 0x0a, 0x04, 0x04, 0x06, -0x02, 0x04, 0x0a, 0x08, 0x06, 0x04, 0x06, 0x04, -/* eth ord 240 0xf0 */ -0x06, 0x04, 0x06, 0x04, 0x06, 0x0a, 0x08, 0x01, -0x02, 0x06, 0x04, 0x0a, 0x08, 0x04, 0x06, 0x01 -}; - -struct wordvalue -{ - const uchar * word; - uchar pass1; - uchar pass2; -}; - -static struct wordvalue doubles[]= -{ - { (uchar*) "ch", 0xad, 0x03 }, - { (uchar*) "c", 0xa6, 0x02 }, - { (uchar*) "Ch", 0xad, 0x02 }, - { (uchar*) "CH", 0xad, 0x01 }, - { (uchar*) "C", 0xa6, 0x01 }, -}; - -/* - ml - a flag indicating whether automatically - switch to the secondary level, - or stop on the primary level -*/ - -#define NEXT_CMP_VALUE(src, p, pass, value, len, ml) \ - while (1) \ - { \ - if (IS_END(p, src, len)) \ - { \ - if (pass == 0 && ml && len > 0) \ - { \ - p= src; \ - pass++; \ - } \ - else \ - { \ - value= 0; \ - break; \ - } \ - } \ - value= (pass == 0) ? \ - _sort_order_win1250ch1[*p] : \ - _sort_order_win1250ch2[*p]; \ - if (value == 0xff) \ - { \ - int i; \ - for (i= 0; i < (int) array_elements(doubles); i++) \ - { \ - const uchar *patt= doubles[i].word; \ - const uchar *q= (const uchar *) p; \ - while (*patt && \ - !IS_END(q, src, len) && \ - (*patt == *q)) \ - { \ - patt++; \ - q++; \ - } \ - if (!(*patt)) \ - { \ - value= (int) ((pass == 0) ? \ - doubles[i].pass1 : \ - doubles[i].pass2); \ - p= (const uchar *) q - 1; \ - break; \ - } \ - } \ - } \ - p++; \ - break; \ - } - -#define IS_END(p, src, len) (((char *)p - (char *)src) >= (len)) - -static int my_strnncoll_win1250ch(CHARSET_INFO *cs __attribute__((unused)), - const uchar *s1, size_t len1, - const uchar *s2, size_t len2, - my_bool s2_is_prefix) -{ - int v1, v2; - const uchar *p1, * p2; - int pass1 = 0, pass2 = 0; - int diff; - - if (s2_is_prefix && len1 > len2) - len1=len2; - - p1 = s1; p2 = s2; - - do - { - NEXT_CMP_VALUE(s1, p1, pass1, v1, (int)len1, 1); - NEXT_CMP_VALUE(s2, p2, pass2, v2, (int)len2, 1); - if ((diff = v1 - v2)) - return diff; - } while (v1); - return 0; -} - - -/* - Compare strings, ignore trailing spaces -*/ - -static int -my_strnncollsp_win1250ch(CHARSET_INFO * cs __attribute__((unused)), - const uchar *s, size_t slen, - const uchar *t, size_t tlen, - my_bool diff_if_only_endspace_difference - __attribute__((unused))) -{ - int level; - - for (level= 0; level <= 3; level++) - { - const uchar *s1= s; - const uchar *t1= t; - - for (;;) - { - int sval, tval, diff; - NEXT_CMP_VALUE(s, s1, level, sval, (int) slen, 0); - NEXT_CMP_VALUE(t, t1, level, tval, (int) tlen, 0); - if (!sval) - { - sval= level ? _sort_order_win1250ch2[32] : _sort_order_win1250ch1[32]; - for (; tval;) - { - if ((diff= sval - tval)) - return diff; - NEXT_CMP_VALUE(t, t1, level, tval, (int) tlen, 0); - } - break; - } - else if (!tval) - { - tval= level ? _sort_order_win1250ch2[32] : _sort_order_win1250ch1[32]; - for (; sval;) - { - if ((diff= sval - tval)) - return diff; - NEXT_CMP_VALUE(s, s1, level, sval, (int) slen, 0); - } - break; - } - - if ((diff= sval - tval)) - return diff; - } - } - return 0; -} - - -static size_t -my_strnxfrm_win1250ch(CHARSET_INFO * cs __attribute__((unused)), - uchar *dst, size_t dstlen, uint nweights_arg, - const uchar *src, size_t srclen, uint flags) -{ - uint level; - uchar *dst0= dst; - uchar *de= dst + dstlen; - - if (!(flags & 0x03)) /* All levels by default */ - flags|= 0x03; - - for (level= 0; level <= 1; level++) - { - if (flags & (1 << level)) - { - uint nweights= nweights_arg; - const uchar *p= src; - int value; - uchar *dstl= dst; - - for (; dst < de && nweights; nweights--) - { - NEXT_CMP_VALUE(src, p, level, value, (int) srclen, 0); - if (!value) - break; - *dst++= value; - } - - if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) - { - uint pad_length= de - dst; - set_if_smaller(pad_length, nweights); - /* [82.01] - weights for space character */ - bfill(dst, pad_length, (int) (level ? 0x01 : 0x82)); - dst+= pad_length; - } - my_strxfrm_desc_and_reverse(dstl, dst, flags, level); - } - } - if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) - { - uint fill_length= de - dst; - cs->cset->fill(cs, (char*) dst, fill_length, 0); - dst= de; - } - return dst - dst0; -} - -#undef IS_END - - -static uchar NEAR like_range_prefix_min_win1250ch[]= -{ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, - 0x40, 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, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, - 0x60, 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, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, - 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, - 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, - 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, - 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, - 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, - 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, - 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, - 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, - 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, - 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, - 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF -}; - -/* - The letter "C" is a special case: - "CH" is sorted between "H" and "I". - prefix_max for "C" is "I": prefix_max[0x43] == 0x49 - prefix_max for "c" is "i": prefix_max[0x63] == 0x69 - For all other characters: prefix_max[i] == i -*/ - -static uchar NEAR like_range_prefix_max_win1250ch[]= -{ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, - 0x40, 0x41, 0x42, 0x49, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E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xFE, 0xFF -}; - -#define min_sort_char '\x20' -#define max_sort_char '\xff' - -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -static my_bool -my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr, size_t ptr_length, - pbool escape, pbool w_one, pbool w_many, - size_t res_length, - char *min_str, char *max_str, - size_t *min_length, size_t *max_length) -{ - - int only_min_found= 1; - const char *end = ptr + ptr_length; - char *min_org = min_str; - char *min_end = min_str + res_length; - - /* return 1; */ - - for (; ptr != end && min_str != min_end ; ptr++) - { - if (*ptr == escape && ptr+1 != end) - ptr++; /* Skip escape */ - else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */ - break; - *min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)]; - if (*min_str != min_sort_char) - only_min_found= 0; - min_str++; - *max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)]; - } - - if (cs->state & MY_CS_BINSORT) - *min_length= (size_t) (min_str - min_org); - else - { - /* 'a\0\0... is the smallest possible string */ - *min_length= res_length; - } - /* a\ff\ff... is the biggest possible string */ - *max_length= res_length; - - while (min_str != min_end) - { - *min_str++ = min_sort_char; - *max_str++ = max_sort_char; - } - return (only_min_found); -} - - -static MY_COLLATION_HANDLER my_collation_czech_ci_handler = -{ - NULL, /* init */ - my_strnncoll_win1250ch, - my_strnncollsp_win1250ch, - my_strnxfrm_win1250ch, - my_strnxfrmlen_simple, - my_like_range_win1250ch, - my_wildcmp_8bit, - my_strcasecmp_8bit, - my_instr_simple, - my_hash_sort_simple, - my_propagate_simple -}; - - -CHARSET_INFO my_charset_cp1250_czech_ci = -{ - 34,0,0, /* number */ - MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT, /* state */ - "cp1250", /* cs name */ - "cp1250_czech_cs", /* name */ - "", /* comment */ - NULL, /* tailoring */ - ctype_win1250ch, - to_lower_win1250ch, - to_upper_win1250ch, - sort_order_win1250ch, - NULL, /* contractions */ - NULL, /* sort_order_big*/ - tab_cp1250_uni, /* tab_to_uni */ - idx_uni_cp1250, /* tab_from_uni */ - my_unicase_default, /* caseinfo */ - NULL, /* state_map */ - NULL, /* ident_map */ - 2, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ - 1, /* mbminlen */ - 1, /* mbmaxlen */ - 0, /* min_sort_char */ - 0, /* max_sort_char */ - ' ', /* pad char */ - 0, /* escape_with_backslash_is_dangerous */ - 2, /* levels_for_compare */ - 2, /* levels_for_order */ - &my_charset_8bit_handler, - &my_collation_czech_ci_handler -}; - - -#endif /* HAVE_CHARSET_cp1250 */ diff --git a/externals/mysql/strings/ctype.c b/externals/mysql/strings/ctype.c deleted file mode 100644 index fe66860444..0000000000 --- a/externals/mysql/strings/ctype.c +++ /dev/null @@ -1,430 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#ifndef SCO -#include -#endif - - -/* - - This files implements routines which parse XML based - character set and collation description files. - - Unicode collations are encoded according to - - Unicode Technical Standard #35 - Locale Data Markup Language (LDML) - http://www.unicode.org/reports/tr35/ - - and converted into ICU string according to - - Collation Customization - http://oss.software.ibm.com/icu/userguide/Collate_Customization.html - -*/ - -static char *mstr(char *str,const char *src,uint l1,uint l2) -{ - l1= l1str; s++) - { - if (!strncmp(attr,s->str,len)) - return s; - } - return NULL; -} - -#define MY_CS_CSDESCR_SIZE 64 -#define MY_CS_TAILORING_SIZE 1024 - -typedef struct my_cs_file_info -{ - char csname[MY_CS_NAME_SIZE]; - char name[MY_CS_NAME_SIZE]; - uchar ctype[MY_CS_CTYPE_TABLE_SIZE]; - uchar to_lower[MY_CS_TO_LOWER_TABLE_SIZE]; - uchar to_upper[MY_CS_TO_UPPER_TABLE_SIZE]; - uchar sort_order[MY_CS_SORT_ORDER_TABLE_SIZE]; - uint16 tab_to_uni[MY_CS_TO_UNI_TABLE_SIZE]; - char comment[MY_CS_CSDESCR_SIZE]; - char tailoring[MY_CS_TAILORING_SIZE]; - size_t tailoring_length; - CHARSET_INFO cs; - int (*add_collation)(CHARSET_INFO *cs); -} MY_CHARSET_LOADER; - - - -static int fill_uchar(uchar *a,uint size,const char *str, uint len) -{ - uint i= 0; - const char *s, *b, *e=str+len; - - for (s=str ; s < e ; i++) - { - for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ; - b=s; - for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ; - if (s == b || i > size) - break; - a[i]= (uchar) strtoul(b,NULL,16); - } - return 0; -} - -static int fill_uint16(uint16 *a,uint size,const char *str, size_t len) -{ - uint i= 0; - - const char *s, *b, *e=str+len; - for (s=str ; s < e ; i++) - { - for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ; - b=s; - for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ; - if (s == b || i > size) - break; - a[i]= (uint16) strtol(b,NULL,16); - } - return 0; -} - - -static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len) -{ - struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; - struct my_cs_file_section_st *s= cs_file_sec(attr,len); - - if ( s && (s->state == _CS_CHARSET)) - bzero(&i->cs,sizeof(i->cs)); - - if (s && (s->state == _CS_COLLATION)) - i->tailoring_length= 0; - - return MY_XML_OK; -} - - -static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len) -{ - struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; - struct my_cs_file_section_st *s= cs_file_sec(attr,len); - int state= s ? s->state : 0; - int rc; - - switch(state){ - case _CS_COLLATION: - rc= i->add_collation ? i->add_collation(&i->cs) : MY_XML_OK; - break; - default: - rc=MY_XML_OK; - } - return rc; -} - - -static int cs_value(MY_XML_PARSER *st,const char *attr, size_t len) -{ - struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; - struct my_cs_file_section_st *s; - int state= (int)((s=cs_file_sec(st->attr, strlen(st->attr))) ? s->state : - 0); - - switch (state) { - case _CS_ID: - i->cs.number= strtol(attr,(char**)NULL,10); - break; - case _CS_BINARY_ID: - i->cs.binary_number= strtol(attr,(char**)NULL,10); - break; - case _CS_PRIMARY_ID: - i->cs.primary_number= strtol(attr,(char**)NULL,10); - break; - case _CS_COLNAME: - i->cs.name=mstr(i->name,attr,len,MY_CS_NAME_SIZE-1); - break; - case _CS_CSNAME: - i->cs.csname=mstr(i->csname,attr,len,MY_CS_NAME_SIZE-1); - break; - case _CS_CSDESCRIPT: - i->cs.comment=mstr(i->comment,attr,len,MY_CS_CSDESCR_SIZE-1); - break; - case _CS_FLAG: - if (!strncmp("primary",attr,len)) - i->cs.state|= MY_CS_PRIMARY; - else if (!strncmp("binary",attr,len)) - i->cs.state|= MY_CS_BINSORT; - else if (!strncmp("compiled",attr,len)) - i->cs.state|= MY_CS_COMPILED; - break; - case _CS_UPPERMAP: - fill_uchar(i->to_upper,MY_CS_TO_UPPER_TABLE_SIZE,attr,len); - i->cs.to_upper=i->to_upper; - break; - case _CS_LOWERMAP: - fill_uchar(i->to_lower,MY_CS_TO_LOWER_TABLE_SIZE,attr,len); - i->cs.to_lower=i->to_lower; - break; - case _CS_UNIMAP: - fill_uint16(i->tab_to_uni,MY_CS_TO_UNI_TABLE_SIZE,attr,len); - i->cs.tab_to_uni=i->tab_to_uni; - break; - case _CS_COLLMAP: - fill_uchar(i->sort_order,MY_CS_SORT_ORDER_TABLE_SIZE,attr,len); - i->cs.sort_order=i->sort_order; - break; - case _CS_CTYPEMAP: - fill_uchar(i->ctype,MY_CS_CTYPE_TABLE_SIZE,attr,len); - i->cs.ctype=i->ctype; - break; - case _CS_RESET: - case _CS_DIFF1: - case _CS_DIFF2: - case _CS_DIFF3: - case _CS_IDENTICAL: - { - /* - Convert collation description from - Locale Data Markup Language (LDML) - into ICU Collation Customization expression. - */ - char arg[16]; - const char *cmd[]= {"&","<","<<","<<<","="}; - i->cs.tailoring= i->tailoring; - mstr(arg,attr,len,sizeof(arg)-1); - if (i->tailoring_length + 20 < sizeof(i->tailoring)) - { - char *dst= i->tailoring_length + i->tailoring; - i->tailoring_length+= sprintf(dst," %s %s",cmd[state-_CS_RESET],arg); - } - } - } - return MY_XML_OK; -} - - -my_bool my_parse_charset_xml(const char *buf, size_t len, - int (*add_collation)(CHARSET_INFO *cs)) -{ - MY_XML_PARSER p; - struct my_cs_file_info i; - my_bool rc; - - my_xml_parser_create(&p); - my_xml_set_enter_handler(&p,cs_enter); - my_xml_set_value_handler(&p,cs_value); - my_xml_set_leave_handler(&p,cs_leave); - i.add_collation= add_collation; - my_xml_set_user_data(&p,(void*)&i); - rc= (my_xml_parse(&p,buf,len) == MY_XML_OK) ? FALSE : TRUE; - my_xml_parser_free(&p); - return rc; -} - - -/* - Check repertoire: detect pure ascii strings -*/ -uint -my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong length) -{ - const char *strend= str + length; - if (cs->mbminlen == 1) - { - for ( ; str < strend; str++) - { - if (((uchar) *str) > 0x7F) - return MY_REPERTOIRE_UNICODE30; - } - } - else - { - my_wc_t wc; - int chlen; - for (; - (chlen= cs->cset->mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0; - str+= chlen) - { - if (wc > 0x7F) - return MY_REPERTOIRE_UNICODE30; - } - } - return MY_REPERTOIRE_ASCII; -} - - -/* - Returns repertoire for charset -*/ -uint my_charset_repertoire(CHARSET_INFO *cs) -{ - return cs->state & MY_CS_PUREASCII ? - MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30; -} - - -/* - Detect whether a character set is ASCII compatible. - - Returns TRUE for: - - - all 8bit character sets whose Unicode mapping of 0x7B is '{' - (ignores swe7 which maps 0x7B to "LATIN LETTER A WITH DIAERESIS") - - - all multi-byte character sets having mbminlen == 1 - (ignores ucs2 whose mbminlen is 2) - - TODO: - - When merging to 5.2, this function should be changed - to check a new flag MY_CS_NONASCII, - - return (cs->flag & MY_CS_NONASCII) ? 0 : 1; - - This flag was previously added into 5.2 under terms - of WL#3759 "Optimize identifier conversion in client-server protocol" - especially to mark character sets not compatible with ASCII. - - We won't backport this flag to 5.0 or 5.1. - This function is Ok for 5.0 and 5.1, because we're not going - to introduce new tricky character sets between 5.0 and 5.2. -*/ -my_bool -my_charset_is_ascii_based(CHARSET_INFO *cs) -{ - return - (cs->mbmaxlen == 1 && cs->tab_to_uni && cs->tab_to_uni['{'] == '{') || - (cs->mbminlen == 1 && cs->mbmaxlen > 1); -} - - -/* - Detect if a character set is 8bit, - and it is pure ascii, i.e. doesn't have - characters outside U+0000..U+007F - This functions is shared between "conf_to_src" - and dynamic charsets loader in "mysqld". -*/ -my_bool -my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs) -{ - size_t code; - if (!cs->tab_to_uni) - return 0; - for (code= 0; code < 256; code++) - { - if (cs->tab_to_uni[code] > 0x7F) - return 0; - } - return 1; -} - - -/* - Shared function between conf_to_src and mysys. - Check if a 8bit character set is compatible with - ascii on the range 0x00..0x7F. -*/ -my_bool -my_charset_is_ascii_compatible(CHARSET_INFO *cs) -{ - uint i; - if (!cs->tab_to_uni) - return 1; - for (i= 0; i < 128; i++) - { - if (cs->tab_to_uni[i] != i) - return 0; - } - return 1; -} diff --git a/externals/mysql/strings/decimal.c b/externals/mysql/strings/decimal.c deleted file mode 100644 index df60bac6f1..0000000000 --- a/externals/mysql/strings/decimal.c +++ /dev/null @@ -1,3134 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#line 18 "decimal.c" - -/* -======================================================================= - NOTE: this library implements SQL standard "exact numeric" type - and is not at all generic, but rather intentinally crippled to - follow the standard :) -======================================================================= - Quoting the standard - (SQL:2003, Part 2 Foundations, aka ISO/IEC 9075-2:2003) - -4.4.2 Characteristics of numbers, page 27: - - An exact numeric type has a precision P and a scale S. P is a positive - integer that determines the number of significant digits in a - particular radix R, where R is either 2 or 10. S is a non-negative - integer. Every value of an exact numeric type of scale S is of the - form n*10^{-S}, where n is an integer such that ­-R^P <= n <= R^P. - - [...] - - If an assignment of some number would result in a loss of its most - significant digit, an exception condition is raised. If least - significant digits are lost, implementation-defined rounding or - truncating occurs, with no exception condition being raised. - - [...] - - Whenever an exact or approximate numeric value is assigned to an exact - numeric value site, an approximation of its value that preserves - leading significant digits after rounding or truncating is represented - in the declared type of the target. The value is converted to have the - precision and scale of the target. The choice of whether to truncate - or round is implementation-defined. - - [...] - - All numeric values between the smallest and the largest value, - inclusive, in a given exact numeric type have an approximation - obtained by rounding or truncation for that type; it is - implementation-defined which other numeric values have such - approximations. - -5.3 , page 143 - - ::= - [ [ ] ] - | - -6.1 , page 165: - - 19) The of an shall not be greater than - the of the . - - 20) For the s DECIMAL and NUMERIC: - - a) The maximum value of is implementation-defined. - shall not be greater than this value. - b) The maximum value of is implementation-defined. - shall not be greater than this maximum value. - - 21) NUMERIC specifies the data type exact numeric, with the decimal - precision and scale specified by the and . - - 22) DECIMAL specifies the data type exact numeric, with the decimal - scale specified by the and the implementation-defined - decimal precision equal to or greater than the value of the - specified . - -6.26 , page 241: - - 1) If the declared type of both operands of a dyadic arithmetic - operator is exact numeric, then the declared type of the result is - an implementation-defined exact numeric type, with precision and - scale determined as follows: - - a) Let S1 and S2 be the scale of the first and second operands - respectively. - b) The precision of the result of addition and subtraction is - implementation-defined, and the scale is the maximum of S1 and S2. - c) The precision of the result of multiplication is - implementation-defined, and the scale is S1 + S2. - d) The precision and scale of the result of division are - implementation-defined. -*/ - -#include -#include -#include -#include /* for my_alloca */ -#include -#include - -/* - Internally decimal numbers are stored base 10^9 (see DIG_BASE below) - So one variable of type decimal_digit_t is limited: - - 0 < decimal_digit <= DIG_MAX < DIG_BASE - - in the struct st_decimal_t: - - intg is the number of *decimal* digits (NOT number of decimal_digit_t's !) - before the point - frac - number of decimal digits after the point - buf is an array of decimal_digit_t's - len is the length of buf (length of allocated space) in decimal_digit_t's, - not in bytes -*/ -typedef decimal_digit_t dec1; -typedef longlong dec2; - -#define DIG_PER_DEC1 9 -#define DIG_MASK 100000000 -#define DIG_BASE 1000000000 -#define DIG_MAX (DIG_BASE-1) -#define DIG_BASE2 ((dec2)DIG_BASE * (dec2)DIG_BASE) -#define ROUND_UP(X) (((X)+DIG_PER_DEC1-1)/DIG_PER_DEC1) -static const dec1 powers10[DIG_PER_DEC1+1]={ - 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000}; -static const int dig2bytes[DIG_PER_DEC1+1]={0, 1, 1, 2, 2, 3, 3, 4, 4, 4}; -static const dec1 frac_max[DIG_PER_DEC1-1]={ - 900000000, 990000000, 999000000, - 999900000, 999990000, 999999000, - 999999900, 999999990 }; - -#ifdef HAVE_purify -#define sanity(d) DBUG_ASSERT((d)->len > 0) -#else -#define sanity(d) DBUG_ASSERT((d)->len >0 && ((d)->buf[0] | \ - (d)->buf[(d)->len-1] | 1)) -#endif - -#define FIX_INTG_FRAC_ERROR(len, intg1, frac1, error) \ - do \ - { \ - if (unlikely(intg1+frac1 > (len))) \ - { \ - if (unlikely(intg1 > (len))) \ - { \ - intg1=(len); \ - frac1=0; \ - error=E_DEC_OVERFLOW; \ - } \ - else \ - { \ - frac1=(len)-intg1; \ - error=E_DEC_TRUNCATED; \ - } \ - } \ - else \ - error=E_DEC_OK; \ - } while(0) - -#define ADD(to, from1, from2, carry) /* assume carry <= 1 */ \ - do \ - { \ - dec1 a=(from1)+(from2)+(carry); \ - DBUG_ASSERT((carry) <= 1); \ - if (((carry)= a >= DIG_BASE)) /* no division here! */ \ - a-=DIG_BASE; \ - (to)=a; \ - } while(0) - -#define ADD2(to, from1, from2, carry) \ - do \ - { \ - dec2 a=((dec2)(from1))+(from2)+(carry); \ - if (((carry)= a >= DIG_BASE)) \ - a-=DIG_BASE; \ - if (unlikely(a >= DIG_BASE)) \ - { \ - a-=DIG_BASE; \ - carry++; \ - } \ - (to)=(dec1) a; \ - } while(0) - -#define SUB(to, from1, from2, carry) /* to=from1-from2 */ \ - do \ - { \ - dec1 a=(from1)-(from2)-(carry); \ - if (((carry)= a < 0)) \ - a+=DIG_BASE; \ - (to)=a; \ - } while(0) - -#define SUB2(to, from1, from2, carry) /* to=from1-from2 */ \ - do \ - { \ - dec1 a=(from1)-(from2)-(carry); \ - if (((carry)= a < 0)) \ - a+=DIG_BASE; \ - if (unlikely(a < 0)) \ - { \ - a+=DIG_BASE; \ - carry++; \ - } \ - (to)=a; \ - } while(0) - -/* - Get maximum value for given precision and scale - - SYNOPSIS - max_decimal() - precision/scale - see decimal_bin_size() below - to - decimal where where the result will be stored - to->buf and to->len must be set. -*/ - -void max_decimal(int precision, int frac, decimal_t *to) -{ - int intpart; - dec1 *buf= to->buf; - DBUG_ASSERT(precision && precision >= frac); - - to->sign= 0; - if ((intpart= to->intg= (precision - frac))) - { - int firstdigits= intpart % DIG_PER_DEC1; - if (firstdigits) - *buf++= powers10[firstdigits] - 1; /* get 9 99 999 ... */ - for(intpart/= DIG_PER_DEC1; intpart; intpart--) - *buf++= DIG_MAX; - } - - if ((to->frac= frac)) - { - int lastdigits= frac % DIG_PER_DEC1; - for(frac/= DIG_PER_DEC1; frac; frac--) - *buf++= DIG_MAX; - if (lastdigits) - *buf= frac_max[lastdigits - 1]; - } -} - - -static dec1 *remove_leading_zeroes(decimal_t *from, int *intg_result) -{ - int intg= from->intg, i; - dec1 *buf0= from->buf; - i= ((intg - 1) % DIG_PER_DEC1) + 1; - while (intg > 0 && *buf0 == 0) - { - intg-= i; - i= DIG_PER_DEC1; - buf0++; - } - if (intg > 0) - { - for (i= (intg - 1) % DIG_PER_DEC1; *buf0 < powers10[i--]; intg--) ; - DBUG_ASSERT(intg > 0); - } - else - intg=0; - *intg_result= intg; - return buf0; -} - - -/* - Count actual length of fraction part (without ending zeroes) - - SYNOPSIS - decimal_actual_fraction() - from number for processing -*/ - -int decimal_actual_fraction(decimal_t *from) -{ - int frac= from->frac, i; - dec1 *buf0= from->buf + ROUND_UP(from->intg) + ROUND_UP(frac) - 1; - - if (frac == 0) - return 0; - - i= ((frac - 1) % DIG_PER_DEC1 + 1); - while (frac > 0 && *buf0 == 0) - { - frac-= i; - i= DIG_PER_DEC1; - buf0--; - } - if (frac > 0) - { - for (i= DIG_PER_DEC1 - ((frac - 1) % DIG_PER_DEC1); - *buf0 % powers10[i++] == 0; - frac--); - } - return frac; -} - - -/* - Convert decimal to its printable string representation - - SYNOPSIS - decimal2string() - from - value to convert - to - points to buffer where string representation - should be stored - *to_len - in: size of to buffer - out: length of the actually written string - fixed_precision - 0 if representation can be variable length and - fixed_decimals will not be checked in this case. - Put number as with fixed point position with this - number of digits (sign counted and decimal point is - counted) - fixed_decimals - number digits after point. - filler - character to fill gaps in case of fixed_precision > 0 - - RETURN VALUE - E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW -*/ - -int decimal2string(decimal_t *from, char *to, int *to_len, - int fixed_precision, int fixed_decimals, - char filler) -{ - int len, intg, frac= from->frac, i, intg_len, frac_len, fill; - /* number digits before decimal point */ - int fixed_intg= (fixed_precision ? - (fixed_precision - fixed_decimals) : 0); - int error=E_DEC_OK; - char *s=to; - dec1 *buf, *buf0=from->buf, tmp; - - DBUG_ASSERT(*to_len >= 2+from->sign); - - /* removing leading zeroes */ - buf0= remove_leading_zeroes(from, &intg); - if (unlikely(intg+frac==0)) - { - intg=1; - tmp=0; - buf0=&tmp; - } - - if (!(intg_len= fixed_precision ? fixed_intg : intg)) - intg_len= 1; - frac_len= fixed_precision ? fixed_decimals : frac; - len= from->sign + intg_len + test(frac) + frac_len; - if (fixed_precision) - { - if (frac > fixed_decimals) - { - error= E_DEC_TRUNCATED; - frac= fixed_decimals; - } - if (intg > fixed_intg) - { - error= E_DEC_OVERFLOW; - intg= fixed_intg; - } - } - else if (unlikely(len > --*to_len)) /* reserve one byte for \0 */ - { - int j= len-*to_len; - error= (frac && j <= frac + 1) ? E_DEC_TRUNCATED : E_DEC_OVERFLOW; - if (frac && j >= frac + 1) j--; - if (j > frac) - { - intg-= j-frac; - frac= 0; - } - else - frac-=j; - len= from->sign + intg_len + test(frac) + frac_len; - } - *to_len=len; - s[len]=0; - - if (from->sign) - *s++='-'; - - if (frac) - { - char *s1= s + intg_len; - fill= frac_len - frac; - buf=buf0+ROUND_UP(intg); - *s1++='.'; - for (; frac>0; frac-=DIG_PER_DEC1) - { - dec1 x=*buf++; - for (i=min(frac, DIG_PER_DEC1); i; i--) - { - dec1 y=x/DIG_MASK; - *s1++='0'+(uchar)y; - x-=y*DIG_MASK; - x*=10; - } - } - for(; fill; fill--) - *s1++=filler; - } - - fill= intg_len - intg; - if (intg == 0) - fill--; /* symbol 0 before digital point */ - for(; fill; fill--) - *s++=filler; - if (intg) - { - s+=intg; - for (buf=buf0+ROUND_UP(intg); intg>0; intg-=DIG_PER_DEC1) - { - dec1 x=*--buf; - for (i=min(intg, DIG_PER_DEC1); i; i--) - { - dec1 y=x/10; - *--s='0'+(uchar)(x-y*10); - x=y; - } - } - } - else - *s= '0'; - return error; -} - - -/* - Return bounds of decimal digits in the number - - SYNOPSIS - digits_bounds() - from - decimal number for processing - start_result - index (from 0 ) of first decimal digits will - be written by this address - end_result - index of position just after last decimal digit - be written by this address -*/ - -static void digits_bounds(decimal_t *from, int *start_result, int *end_result) -{ - int start, stop, i; - dec1 *buf_beg= from->buf; - dec1 *end= from->buf + ROUND_UP(from->intg) + ROUND_UP(from->frac); - dec1 *buf_end= end - 1; - - /* find non-zero digit from number begining */ - while (buf_beg < end && *buf_beg == 0) - buf_beg++; - - if (buf_beg >= end) - { - /* it is zero */ - *start_result= *end_result= 0; - return; - } - - /* find non-zero decimal digit from number begining */ - if (buf_beg == from->buf && from->intg) - { - start= DIG_PER_DEC1 - (i= ((from->intg-1) % DIG_PER_DEC1 + 1)); - i--; - } - else - { - i= DIG_PER_DEC1 - 1; - start= (int) ((buf_beg - from->buf) * DIG_PER_DEC1); - } - if (buf_beg < end) - for (; *buf_beg < powers10[i--]; start++) ; - *start_result= start; /* index of first decimal digit (from 0) */ - - /* find non-zero digit at the end */ - while (buf_end > buf_beg && *buf_end == 0) - buf_end--; - /* find non-zero decimal digit from the end */ - if (buf_end == end - 1 && from->frac) - { - stop= (int) (((buf_end - from->buf) * DIG_PER_DEC1 + - (i= ((from->frac - 1) % DIG_PER_DEC1 + 1)))); - i= DIG_PER_DEC1 - i + 1; - } - else - { - stop= (int) ((buf_end - from->buf + 1) * DIG_PER_DEC1); - i= 1; - } - for (; *buf_end % powers10[i++] == 0; stop--); - *end_result= stop; /* index of position after last decimal digit (from 0) */ -} - - -/* - Left shift for alignment of data in buffer - - SYNOPSIS - do_mini_left_shift() - dec pointer to decimal number which have to be shifted - shift number of decimal digits on which it should be shifted - beg/end bounds of decimal digits (see digits_bounds()) - - NOTE - Result fitting in the buffer should be garanted. - 'shift' have to be from 1 to DIG_PER_DEC1-1 (inclusive) -*/ - -void do_mini_left_shift(decimal_t *dec, int shift, int beg, int last) -{ - dec1 *from= dec->buf + ROUND_UP(beg + 1) - 1; - dec1 *end= dec->buf + ROUND_UP(last) - 1; - int c_shift= DIG_PER_DEC1 - shift; - DBUG_ASSERT(from >= dec->buf); - DBUG_ASSERT(end < dec->buf + dec->len); - if (beg % DIG_PER_DEC1 < shift) - *(from - 1)= (*from) / powers10[c_shift]; - for(; from < end; from++) - *from= ((*from % powers10[c_shift]) * powers10[shift] + - (*(from + 1)) / powers10[c_shift]); - *from= (*from % powers10[c_shift]) * powers10[shift]; -} - - -/* - Right shift for alignment of data in buffer - - SYNOPSIS - do_mini_left_shift() - dec pointer to decimal number which have to be shifted - shift number of decimal digits on which it should be shifted - beg/end bounds of decimal digits (see digits_bounds()) - - NOTE - Result fitting in the buffer should be garanted. - 'shift' have to be from 1 to DIG_PER_DEC1-1 (inclusive) -*/ - -void do_mini_right_shift(decimal_t *dec, int shift, int beg, int last) -{ - dec1 *from= dec->buf + ROUND_UP(last) - 1; - dec1 *end= dec->buf + ROUND_UP(beg + 1) - 1; - int c_shift= DIG_PER_DEC1 - shift; - DBUG_ASSERT(from < dec->buf + dec->len); - DBUG_ASSERT(end >= dec->buf); - if (DIG_PER_DEC1 - ((last - 1) % DIG_PER_DEC1 + 1) < shift) - *(from + 1)= (*from % powers10[shift]) * powers10[c_shift]; - for(; from > end; from--) - *from= (*from / powers10[shift] + - (*(from - 1) % powers10[shift]) * powers10[c_shift]); - *from= *from / powers10[shift]; -} - - -/* - Shift of decimal digits in given number (with rounding if it need) - - SYNOPSIS - decimal_shift() - dec number to be shifted - shift number of decimal positions - shift > 0 means shift to left shift - shift < 0 meand right shift - NOTE - In fact it is multipling on 10^shift. - RETURN - E_DEC_OK OK - E_DEC_OVERFLOW operation lead to overflow, number is untoched - E_DEC_TRUNCATED number was rounded to fit into buffer -*/ - -int decimal_shift(decimal_t *dec, int shift) -{ - /* index of first non zero digit (all indexes from 0) */ - int beg; - /* index of position after last decimal digit */ - int end; - /* index of digit position just after point */ - int point= ROUND_UP(dec->intg) * DIG_PER_DEC1; - /* new point position */ - int new_point= point + shift; - /* number of digits in result */ - int digits_int, digits_frac; - /* length of result and new fraction in big digits*/ - int new_len, new_frac_len; - /* return code */ - int err= E_DEC_OK; - int new_front; - - if (shift == 0) - return E_DEC_OK; - - digits_bounds(dec, &beg, &end); - - if (beg == end) - { - decimal_make_zero(dec); - return E_DEC_OK; - } - - digits_int= new_point - beg; - set_if_bigger(digits_int, 0); - digits_frac= end - new_point; - set_if_bigger(digits_frac, 0); - - if ((new_len= ROUND_UP(digits_int) + (new_frac_len= ROUND_UP(digits_frac))) > - dec->len) - { - int lack= new_len - dec->len; - int diff; - - if (new_frac_len < lack) - return E_DEC_OVERFLOW; /* lack more then we have in fraction */ - - /* cat off fraction part to allow new number to fit in our buffer */ - err= E_DEC_TRUNCATED; - new_frac_len-= lack; - diff= digits_frac - (new_frac_len * DIG_PER_DEC1); - /* Make rounding method as parameter? */ - decimal_round(dec, dec, end - point - diff, HALF_UP); - end-= diff; - digits_frac= new_frac_len * DIG_PER_DEC1; - - if (end <= beg) - { - /* - we lost all digits (they will be shifted out of buffer), so we can - just return 0 - */ - decimal_make_zero(dec); - return E_DEC_TRUNCATED; - } - } - - if (shift % DIG_PER_DEC1) - { - int l_mini_shift, r_mini_shift, mini_shift; - int do_left; - /* - Calculate left/right shift to align decimal digits inside our bug - digits correctly - */ - if (shift > 0) - { - l_mini_shift= shift % DIG_PER_DEC1; - r_mini_shift= DIG_PER_DEC1 - l_mini_shift; - /* - It is left shift so prefer left shift, but if we have not place from - left, we have to have it from right, because we checked length of - result - */ - do_left= l_mini_shift <= beg; - DBUG_ASSERT(do_left || (dec->len * DIG_PER_DEC1 - end) >= r_mini_shift); - } - else - { - r_mini_shift= (-shift) % DIG_PER_DEC1; - l_mini_shift= DIG_PER_DEC1 - r_mini_shift; - /* see comment above */ - do_left= !((dec->len * DIG_PER_DEC1 - end) >= r_mini_shift); - DBUG_ASSERT(!do_left || l_mini_shift <= beg); - } - if (do_left) - { - do_mini_left_shift(dec, l_mini_shift, beg, end); - mini_shift=- l_mini_shift; - } - else - { - do_mini_right_shift(dec, r_mini_shift, beg, end); - mini_shift= r_mini_shift; - } - new_point+= mini_shift; - /* - If number is shifted and correctly aligned in buffer we can - finish - */ - if (!(shift+= mini_shift) && (new_point - digits_int) < DIG_PER_DEC1) - { - dec->intg= digits_int; - dec->frac= digits_frac; - return err; /* already shifted as it should be */ - } - beg+= mini_shift; - end+= mini_shift; - } - - /* if new 'decimal front' is in first digit, we do not need move digits */ - if ((new_front= (new_point - digits_int)) >= DIG_PER_DEC1 || - new_front < 0) - { - /* need to move digits */ - int d_shift; - dec1 *to, *barier; - if (new_front > 0) - { - /* move left */ - d_shift= new_front / DIG_PER_DEC1; - to= dec->buf + (ROUND_UP(beg + 1) - 1 - d_shift); - barier= dec->buf + (ROUND_UP(end) - 1 - d_shift); - DBUG_ASSERT(to >= dec->buf); - DBUG_ASSERT(barier + d_shift < dec->buf + dec->len); - for(; to <= barier; to++) - *to= *(to + d_shift); - for(barier+= d_shift; to <= barier; to++) - *to= 0; - d_shift= -d_shift; - } - else - { - /* move right */ - d_shift= (1 - new_front) / DIG_PER_DEC1; - to= dec->buf + ROUND_UP(end) - 1 + d_shift; - barier= dec->buf + ROUND_UP(beg + 1) - 1 + d_shift; - DBUG_ASSERT(to < dec->buf + dec->len); - DBUG_ASSERT(barier - d_shift >= dec->buf); - for(; to >= barier; to--) - *to= *(to - d_shift); - for(barier-= d_shift; to >= barier; to--) - *to= 0; - } - d_shift*= DIG_PER_DEC1; - beg+= d_shift; - end+= d_shift; - new_point+= d_shift; - } - - /* - If there are gaps then fill ren with 0. - - Only one of following 'for' loops will work becouse beg <= end - */ - beg= ROUND_UP(beg + 1) - 1; - end= ROUND_UP(end) - 1; - DBUG_ASSERT(new_point >= 0); - - /* We don't want negative new_point below */ - if (new_point != 0) - new_point= ROUND_UP(new_point) - 1; - - if (new_point > end) - { - do - { - dec->buf[new_point]=0; - } while (--new_point > end); - } - else - { - for (; new_point < beg; new_point++) - dec->buf[new_point]= 0; - } - dec->intg= digits_int; - dec->frac= digits_frac; - return err; -} - - -/* - Convert string to decimal - - SYNOPSIS - internal_str2decl() - from - value to convert. Doesn't have to be \0 terminated! - to - decimal where where the result will be stored - to->buf and to->len must be set. - end - Pointer to pointer to end of string. Will on return be - set to the char after the last used character - fixed - use to->intg, to->frac as limits for input number - - NOTE - to->intg and to->frac can be modified even when fixed=1 - (but only decreased, in this case) - - RETURN VALUE - E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW/E_DEC_BAD_NUM/E_DEC_OOM - In case of E_DEC_FATAL_ERROR *to is set to decimal zero - (to make error handling easier) -*/ - -int -internal_str2dec(const char *from, decimal_t *to, char **end, my_bool fixed) -{ - const char *s= from, *s1, *endp, *end_of_string= *end; - int i, intg, frac, error, intg1, frac1; - dec1 x,*buf; - sanity(to); - - error= E_DEC_BAD_NUM; /* In case of bad number */ - while (s < end_of_string && my_isspace(&my_charset_latin1, *s)) - s++; - if (s == end_of_string) - goto fatal_error; - - if ((to->sign= (*s == '-'))) - s++; - else if (*s == '+') - s++; - - s1=s; - while (s < end_of_string && my_isdigit(&my_charset_latin1, *s)) - s++; - intg= (int) (s-s1); - if (s < end_of_string && *s=='.') - { - endp= s+1; - while (endp < end_of_string && my_isdigit(&my_charset_latin1, *endp)) - endp++; - frac= (int) (endp - s - 1); - } - else - { - frac= 0; - endp= s; - } - - *end= (char*) endp; - - if (frac+intg == 0) - goto fatal_error; - - error= 0; - if (fixed) - { - if (frac > to->frac) - { - error=E_DEC_TRUNCATED; - frac=to->frac; - } - if (intg > to->intg) - { - error=E_DEC_OVERFLOW; - intg=to->intg; - } - intg1=ROUND_UP(intg); - frac1=ROUND_UP(frac); - if (intg1+frac1 > to->len) - { - error= E_DEC_OOM; - goto fatal_error; - } - } - else - { - intg1=ROUND_UP(intg); - frac1=ROUND_UP(frac); - FIX_INTG_FRAC_ERROR(to->len, intg1, frac1, error); - if (unlikely(error)) - { - frac=frac1*DIG_PER_DEC1; - if (error == E_DEC_OVERFLOW) - intg=intg1*DIG_PER_DEC1; - } - } - /* Error is guranteed to be set here */ - to->intg=intg; - to->frac=frac; - - buf=to->buf+intg1; - s1=s; - - for (x=0, i=0; intg; intg--) - { - x+= (*--s - '0')*powers10[i]; - - if (unlikely(++i == DIG_PER_DEC1)) - { - *--buf=x; - x=0; - i=0; - } - } - if (i) - *--buf=x; - - buf=to->buf+intg1; - for (x=0, i=0; frac; frac--) - { - x= (*++s1 - '0') + x*10; - - if (unlikely(++i == DIG_PER_DEC1)) - { - *buf++=x; - x=0; - i=0; - } - } - if (i) - *buf=x*powers10[DIG_PER_DEC1-i]; - - /* Handle exponent */ - if (endp+1 < end_of_string && (*endp == 'e' || *endp == 'E')) - { - int str_error; - longlong exponent= my_strtoll10(endp+1, (char**) &end_of_string, - &str_error); - - if (end_of_string != endp +1) /* If at least one digit */ - { - *end= (char*) end_of_string; - if (str_error > 0) - { - error= E_DEC_BAD_NUM; - goto fatal_error; - } - if (exponent > INT_MAX/2 || (str_error == 0 && exponent < 0)) - { - error= E_DEC_OVERFLOW; - goto fatal_error; - } - if (exponent < INT_MIN/2 && error != E_DEC_OVERFLOW) - { - error= E_DEC_TRUNCATED; - goto fatal_error; - } - if (error != E_DEC_OVERFLOW) - error= decimal_shift(to, (int) exponent); - } - } - return error; - -fatal_error: - decimal_make_zero(to); - return error; -} - - -/* - Convert decimal to double - - SYNOPSIS - decimal2double() - from - value to convert - to - result will be stored there - - RETURN VALUE - E_DEC_OK/E_DEC_OVERFLOW/E_DEC_TRUNCATED -*/ - -int decimal2double(decimal_t *from, double *to) -{ - char strbuf[FLOATING_POINT_BUFFER], *end; - int len= sizeof(strbuf); - int rc, error; - - rc = decimal2string(from, strbuf, &len, 0, 0, 0); - end= strbuf + len; - - DBUG_PRINT("info", ("interm.: %s", strbuf)); - - *to= my_strtod(strbuf, &end, &error); - - DBUG_PRINT("info", ("result: %f (%lx)", *to, *(ulong *)to)); - - return (rc != E_DEC_OK) ? rc : (error ? E_DEC_OVERFLOW : E_DEC_OK); -} - -/* - Convert double to decimal - - SYNOPSIS - double2decimal() - from - value to convert - to - result will be stored there - - RETURN VALUE - E_DEC_OK/E_DEC_OVERFLOW/E_DEC_TRUNCATED -*/ - -int double2decimal(double from, decimal_t *to) -{ - char buff[FLOATING_POINT_BUFFER], *end; - int res; - DBUG_ENTER("double2decimal"); - end= buff + my_gcvt(from, MY_GCVT_ARG_DOUBLE, sizeof(buff) - 1, buff, NULL); - res= string2decimal(buff, to, &end); - DBUG_PRINT("exit", ("res: %d", res)); - DBUG_RETURN(res); -} - - -static int ull2dec(ulonglong from, decimal_t *to) -{ - int intg1, error=E_DEC_OK; - ulonglong x=from; - dec1 *buf; - - sanity(to); - - for (intg1=1; from >= DIG_BASE; intg1++, from/=DIG_BASE); - if (unlikely(intg1 > to->len)) - { - intg1=to->len; - error=E_DEC_OVERFLOW; - } - to->frac=0; - to->intg=intg1*DIG_PER_DEC1; - - for (buf=to->buf+intg1; intg1; intg1--) - { - ulonglong y=x/DIG_BASE; - *--buf=(dec1)(x-y*DIG_BASE); - x=y; - } - return error; -} - -int ulonglong2decimal(ulonglong from, decimal_t *to) -{ - to->sign=0; - return ull2dec(from, to); -} - -int longlong2decimal(longlong from, decimal_t *to) -{ - if ((to->sign= from < 0)) - return ull2dec(-from, to); - return ull2dec(from, to); -} - -int decimal2ulonglong(decimal_t *from, ulonglong *to) -{ - dec1 *buf=from->buf; - ulonglong x=0; - int intg, frac; - - if (from->sign) - { - *to=0ULL; - return E_DEC_OVERFLOW; - } - - for (intg=from->intg; intg > 0; intg-=DIG_PER_DEC1) - { - ulonglong y=x; - x=x*DIG_BASE + *buf++; - if (unlikely(y > ((ulonglong) ULONGLONG_MAX/DIG_BASE) || x < y)) - { - *to=ULONGLONG_MAX; - return E_DEC_OVERFLOW; - } - } - *to=x; - for (frac=from->frac; unlikely(frac > 0); frac-=DIG_PER_DEC1) - if (*buf++) - return E_DEC_TRUNCATED; - return E_DEC_OK; -} - -int decimal2longlong(decimal_t *from, longlong *to) -{ - dec1 *buf=from->buf; - longlong x=0; - int intg, frac; - - for (intg=from->intg; intg > 0; intg-=DIG_PER_DEC1) - { - longlong y=x; - /* - Attention: trick! - we're calculating -|from| instead of |from| here - because |LONGLONG_MIN| > LONGLONG_MAX - so we can convert -9223372036854775808 correctly - */ - x=x*DIG_BASE - *buf++; - if (unlikely(y < (LONGLONG_MIN/DIG_BASE) || x > y)) - { - /* - the decimal is bigger than any possible integer - return border integer depending on the sign - */ - *to= from->sign ? LONGLONG_MIN : LONGLONG_MAX; - return E_DEC_OVERFLOW; - } - } - /* boundary case: 9223372036854775808 */ - if (unlikely(from->sign==0 && x == LONGLONG_MIN)) - { - *to= LONGLONG_MAX; - return E_DEC_OVERFLOW; - } - - *to=from->sign ? x : -x; - for (frac=from->frac; unlikely(frac > 0); frac-=DIG_PER_DEC1) - if (*buf++) - return E_DEC_TRUNCATED; - return E_DEC_OK; -} - -/* - Convert decimal to its binary fixed-length representation - two representations of the same length can be compared with memcmp - with the correct -1/0/+1 result - - SYNOPSIS - decimal2bin() - from - value to convert - to - points to buffer where string representation should be stored - precision/scale - see decimal_bin_size() below - - NOTE - the buffer is assumed to be of the size decimal_bin_size(precision, scale) - - RETURN VALUE - E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW - - DESCRIPTION - for storage decimal numbers are converted to the "binary" format. - - This format has the following properties: - 1. length of the binary representation depends on the {precision, scale} - as provided by the caller and NOT on the intg/frac of the decimal to - convert. - 2. binary representations of the same {precision, scale} can be compared - with memcmp - with the same result as decimal_cmp() of the original - decimals (not taking into account possible precision loss during - conversion). - - This binary format is as follows: - 1. First the number is converted to have a requested precision and scale. - 2. Every full DIG_PER_DEC1 digits of intg part are stored in 4 bytes - as is - 3. The first intg % DIG_PER_DEC1 digits are stored in the reduced - number of bytes (enough bytes to store this number of digits - - see dig2bytes) - 4. same for frac - full decimal_digit_t's are stored as is, - the last frac % DIG_PER_DEC1 digits - in the reduced number of bytes. - 5. If the number is negative - every byte is inversed. - 5. The very first bit of the resulting byte array is inverted (because - memcmp compares unsigned bytes, see property 2 above) - - Example: - - 1234567890.1234 - - internally is represented as 3 decimal_digit_t's - - 1 234567890 123400000 - - (assuming we want a binary representation with precision=14, scale=4) - in hex it's - - 00-00-00-01 0D-FB-38-D2 07-5A-EF-40 - - now, middle decimal_digit_t is full - it stores 9 decimal digits. It goes - into binary representation as is: - - - ........... 0D-FB-38-D2 ............ - - First decimal_digit_t has only one decimal digit. We can store one digit in - one byte, no need to waste four: - - 01 0D-FB-38-D2 ............ - - now, last digit. It's 123400000. We can store 1234 in two bytes: - - 01 0D-FB-38-D2 04-D2 - - So, we've packed 12 bytes number in 7 bytes. - And now we invert the highest bit to get the final result: - - 81 0D FB 38 D2 04 D2 - - And for -1234567890.1234 it would be - - 7E F2 04 37 2D FB 2D -*/ -int decimal2bin(decimal_t *from, uchar *to, int precision, int frac) -{ - dec1 mask=from->sign ? -1 : 0, *buf1=from->buf, *stop1; - int error=E_DEC_OK, intg=precision-frac, - isize1, intg1, intg1x, from_intg, - intg0=intg/DIG_PER_DEC1, - frac0=frac/DIG_PER_DEC1, - intg0x=intg-intg0*DIG_PER_DEC1, - frac0x=frac-frac0*DIG_PER_DEC1, - frac1=from->frac/DIG_PER_DEC1, - frac1x=from->frac-frac1*DIG_PER_DEC1, - isize0=intg0*sizeof(dec1)+dig2bytes[intg0x], - fsize0=frac0*sizeof(dec1)+dig2bytes[frac0x], - fsize1=frac1*sizeof(dec1)+dig2bytes[frac1x]; - const int orig_isize0= isize0; - const int orig_fsize0= fsize0; - uchar *orig_to= to; - - buf1= remove_leading_zeroes(from, &from_intg); - - if (unlikely(from_intg+fsize1==0)) - { - mask=0; /* just in case */ - intg=1; - buf1=&mask; - } - - intg1=from_intg/DIG_PER_DEC1; - intg1x=from_intg-intg1*DIG_PER_DEC1; - isize1=intg1*sizeof(dec1)+dig2bytes[intg1x]; - - if (intg < from_intg) - { - buf1+=intg1-intg0+(intg1x>0)-(intg0x>0); - intg1=intg0; intg1x=intg0x; - error=E_DEC_OVERFLOW; - } - else if (isize0 > isize1) - { - while (isize0-- > isize1) - *to++= (char)mask; - } - if (fsize0 < fsize1) - { - frac1=frac0; frac1x=frac0x; - error=E_DEC_TRUNCATED; - } - else if (fsize0 > fsize1 && frac1x) - { - if (frac0 == frac1) - { - frac1x=frac0x; - fsize0= fsize1; - } - else - { - frac1++; - frac1x=0; - } - } - - /* intg1x part */ - if (intg1x) - { - int i=dig2bytes[intg1x]; - dec1 x=(*buf1++ % powers10[intg1x]) ^ mask; - switch (i) - { - case 1: mi_int1store(to, x); break; - case 2: mi_int2store(to, x); break; - case 3: mi_int3store(to, x); break; - case 4: mi_int4store(to, x); break; - default: DBUG_ASSERT(0); - } - to+=i; - } - - /* intg1+frac1 part */ - for (stop1=buf1+intg1+frac1; buf1 < stop1; to+=sizeof(dec1)) - { - dec1 x=*buf1++ ^ mask; - DBUG_ASSERT(sizeof(dec1) == 4); - mi_int4store(to, x); - } - - /* frac1x part */ - if (frac1x) - { - dec1 x; - int i=dig2bytes[frac1x], - lim=(frac1 < frac0 ? DIG_PER_DEC1 : frac0x); - while (frac1x < lim && dig2bytes[frac1x] == i) - frac1x++; - x=(*buf1 / powers10[DIG_PER_DEC1 - frac1x]) ^ mask; - switch (i) - { - case 1: mi_int1store(to, x); break; - case 2: mi_int2store(to, x); break; - case 3: mi_int3store(to, x); break; - case 4: mi_int4store(to, x); break; - default: DBUG_ASSERT(0); - } - to+=i; - } - if (fsize0 > fsize1) - { - uchar *to_end= orig_to + orig_fsize0 + orig_isize0; - - while (fsize0-- > fsize1 && to < to_end) - *to++= (uchar)mask; - } - orig_to[0]^= 0x80; - - /* Check that we have written the whole decimal and nothing more */ - DBUG_ASSERT(to == orig_to + orig_fsize0 + orig_isize0); - return error; -} - -/* - Restores decimal from its binary fixed-length representation - - SYNOPSIS - bin2decimal() - from - value to convert - to - result - precision/scale - see decimal_bin_size() below - - NOTE - see decimal2bin() - the buffer is assumed to be of the size decimal_bin_size(precision, scale) - - RETURN VALUE - E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW -*/ - -int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale) -{ - int error=E_DEC_OK, intg=precision-scale, - intg0=intg/DIG_PER_DEC1, frac0=scale/DIG_PER_DEC1, - intg0x=intg-intg0*DIG_PER_DEC1, frac0x=scale-frac0*DIG_PER_DEC1, - intg1=intg0+(intg0x>0), frac1=frac0+(frac0x>0); - dec1 *buf=to->buf, mask=(*from & 0x80) ? 0 : -1; - const uchar *stop; - uchar *d_copy; - int bin_size= decimal_bin_size(precision, scale); - - sanity(to); - d_copy= (uchar*) my_alloca(bin_size); - memcpy(d_copy, from, bin_size); - d_copy[0]^= 0x80; - from= d_copy; - - FIX_INTG_FRAC_ERROR(to->len, intg1, frac1, error); - if (unlikely(error)) - { - if (intg1 < intg0+(intg0x>0)) - { - from+=dig2bytes[intg0x]+sizeof(dec1)*(intg0-intg1); - frac0=frac0x=intg0x=0; - intg0=intg1; - } - else - { - frac0x=0; - frac0=frac1; - } - } - - to->sign=(mask != 0); - to->intg=intg0*DIG_PER_DEC1+intg0x; - to->frac=frac0*DIG_PER_DEC1+frac0x; - - if (intg0x) - { - int i=dig2bytes[intg0x]; - dec1 x; - LINT_INIT(x); - switch (i) - { - case 1: x=mi_sint1korr(from); break; - case 2: x=mi_sint2korr(from); break; - case 3: x=mi_sint3korr(from); break; - case 4: x=mi_sint4korr(from); break; - default: DBUG_ASSERT(0); - } - from+=i; - *buf=x ^ mask; - if (((ulonglong)*buf) >= (ulonglong) powers10[intg0x+1]) - goto err; - if (buf > to->buf || *buf != 0) - buf++; - else - to->intg-=intg0x; - } - for (stop=from+intg0*sizeof(dec1); from < stop; from+=sizeof(dec1)) - { - DBUG_ASSERT(sizeof(dec1) == 4); - *buf=mi_sint4korr(from) ^ mask; - if (((uint32)*buf) > DIG_MAX) - goto err; - if (buf > to->buf || *buf != 0) - buf++; - else - to->intg-=DIG_PER_DEC1; - } - DBUG_ASSERT(to->intg >=0); - for (stop=from+frac0*sizeof(dec1); from < stop; from+=sizeof(dec1)) - { - DBUG_ASSERT(sizeof(dec1) == 4); - *buf=mi_sint4korr(from) ^ mask; - if (((uint32)*buf) > DIG_MAX) - goto err; - buf++; - } - if (frac0x) - { - int i=dig2bytes[frac0x]; - dec1 x; - LINT_INIT(x); - switch (i) - { - case 1: x=mi_sint1korr(from); break; - case 2: x=mi_sint2korr(from); break; - case 3: x=mi_sint3korr(from); break; - case 4: x=mi_sint4korr(from); break; - default: DBUG_ASSERT(0); - } - *buf=(x ^ mask) * powers10[DIG_PER_DEC1 - frac0x]; - if (((uint32)*buf) > DIG_MAX) - goto err; - buf++; - } - my_afree(d_copy); - return error; - -err: - my_afree(d_copy); - decimal_make_zero(((decimal_t*) to)); - return(E_DEC_BAD_NUM); -} - -/* - Returns the size of array to hold a decimal with given precision and scale - - RETURN VALUE - size in dec1 - (multiply by sizeof(dec1) to get the size if bytes) -*/ - -int decimal_size(int precision, int scale) -{ - DBUG_ASSERT(scale >= 0 && precision > 0 && scale <= precision); - return ROUND_UP(precision-scale)+ROUND_UP(scale); -} - -/* - Returns the size of array to hold a binary representation of a decimal - - RETURN VALUE - size in bytes -*/ - -int decimal_bin_size(int precision, int scale) -{ - int intg=precision-scale, - intg0=intg/DIG_PER_DEC1, frac0=scale/DIG_PER_DEC1, - intg0x=intg-intg0*DIG_PER_DEC1, frac0x=scale-frac0*DIG_PER_DEC1; - - DBUG_ASSERT(scale >= 0 && precision > 0 && scale <= precision); - return intg0*sizeof(dec1)+dig2bytes[intg0x]+ - frac0*sizeof(dec1)+dig2bytes[frac0x]; -} - -/* - Rounds the decimal to "scale" digits - - SYNOPSIS - decimal_round() - from - decimal to round, - to - result buffer. from==to is allowed - scale - to what position to round. can be negative! - mode - round to nearest even or truncate - - NOTES - scale can be negative ! - one TRUNCATED error (line XXX below) isn't treated very logical :( - - RETURN VALUE - E_DEC_OK/E_DEC_TRUNCATED -*/ - -int -decimal_round(decimal_t *from, decimal_t *to, int scale, - decimal_round_mode mode) -{ - int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1, - frac1=ROUND_UP(from->frac), round_digit, - intg0=ROUND_UP(from->intg), error=E_DEC_OK, len=to->len, - intg1=ROUND_UP(from->intg + - (((intg0 + frac0)>0) && (from->buf[0] == DIG_MAX))); - dec1 *buf0=from->buf, *buf1=to->buf, x, y, carry=0; - int first_dig; - - sanity(to); - - LINT_INIT(round_digit); - switch (mode) { - case HALF_UP: - case HALF_EVEN: round_digit=5; break; - case CEILING: round_digit= from->sign ? 10 : 0; break; - case FLOOR: round_digit= from->sign ? 0 : 10; break; - case TRUNCATE: round_digit=10; break; - default: DBUG_ASSERT(0); - } - - if (unlikely(frac0+intg0 > len)) - { - frac0=len-intg0; - scale=frac0*DIG_PER_DEC1; - error=E_DEC_TRUNCATED; - } - - if (scale+from->intg < 0) - { - decimal_make_zero(to); - return E_DEC_OK; - } - - if (to != from || intg1>intg0) - { - dec1 *p0= buf0+intg0+max(frac1, frac0); - dec1 *p1= buf1+intg1+max(frac1, frac0); - - while (buf0 < p0) - *(--p1) = *(--p0); - if (unlikely(intg1 > intg0)) - to->buf[0]= 0; - - intg0= intg1; - buf0=to->buf; - buf1=to->buf; - to->sign=from->sign; - to->intg=min(intg0, len)*DIG_PER_DEC1; - } - - if (frac0 > frac1) - { - buf1+=intg0+frac1; - while (frac0-- > frac1) - *buf1++=0; - goto done; - } - - if (scale >= from->frac) - goto done; /* nothing to do */ - - buf0+=intg0+frac0-1; - buf1+=intg0+frac0-1; - if (scale == frac0*DIG_PER_DEC1) - { - int do_inc= FALSE; - DBUG_ASSERT(frac0+intg0 >= 0); - switch (round_digit) { - case 0: - { - dec1 *p0= buf0 + (frac1-frac0); - for (; p0 > buf0; p0--) - { - if (*p0) - { - do_inc= TRUE; - break; - } - } - break; - } - case 5: - { - x= buf0[1]/DIG_MASK; - do_inc= (x>5) || ((x == 5) && - (mode == HALF_UP || (frac0+intg0 > 0 && *buf0 & 1))); - break; - } - default: - break; - } - if (do_inc) - { - if (frac0+intg0>0) - (*buf1)++; - else - *(++buf1)=DIG_BASE; - } - else if (frac0+intg0==0) - { - decimal_make_zero(to); - return E_DEC_OK; - } - } - else - { - /* TODO - fix this code as it won't work for CEILING mode */ - int pos=frac0*DIG_PER_DEC1-scale-1; - DBUG_ASSERT(frac0+intg0 > 0); - x=*buf1 / powers10[pos]; - y=x % 10; - if (y > round_digit || - (round_digit == 5 && y == 5 && (mode == HALF_UP || (x/10) & 1))) - x+=10; - *buf1=powers10[pos]*(x-y); - } - /* - In case we're rounding e.g. 1.5e9 to 2.0e9, the decimal_digit_t's inside - the buffer are as follows. - - Before <1, 5e8> - After <2, 5e8> - - Hence we need to set the 2nd field to 0. - The same holds if we round 1.5e-9 to 2e-9. - */ - if (frac0 < frac1) - { - dec1 *buf= to->buf + ((scale == 0 && intg0 == 0) ? 1 : intg0 + frac0); - dec1 *end= to->buf + len; - - while (buf < end) - *buf++=0; - } - if (*buf1 >= DIG_BASE) - { - carry=1; - *buf1-=DIG_BASE; - while (carry && --buf1 >= to->buf) - ADD(*buf1, *buf1, 0, carry); - if (unlikely(carry)) - { - /* shifting the number to create space for new digit */ - if (frac0+intg0 >= len) - { - frac0--; - scale=frac0*DIG_PER_DEC1; - error=E_DEC_TRUNCATED; /* XXX */ - } - for (buf1=to->buf+intg0+max(frac0,0); buf1 > to->buf; buf1--) - { - buf1[0]=buf1[-1]; - } - *buf1=1; - to->intg++; - } - } - else - { - for (;;) - { - if (likely(*buf1)) - break; - if (buf1-- == to->buf) - { - /* making 'zero' with the proper scale */ - dec1 *p0= to->buf + frac0 + 1; - to->intg=1; - to->frac= max(scale, 0); - to->sign= 0; - for (buf1= to->buf; buf1 1000 case when we need to increase intg */ - first_dig= to->intg % DIG_PER_DEC1; - if (first_dig && (*buf1 >= powers10[first_dig])) - to->intg++; - - if (scale<0) - scale=0; - -done: - to->frac=scale; - return error; -} - -/* - Returns the size of the result of the operation - - SYNOPSIS - decimal_result_size() - from1 - operand of the unary operation or first operand of the - binary operation - from2 - second operand of the binary operation - op - operation. one char '+', '-', '*', '/' are allowed - others may be added later - param - extra param to the operation. unused for '+', '-', '*' - scale increment for '/' - - NOTE - returned valued may be larger than the actual buffer requred - in the operation, as decimal_result_size, by design, operates on - precision/scale values only and not on the actual decimal number - - RETURN VALUE - size of to->buf array in dec1 elements. to get size in bytes - multiply by sizeof(dec1) -*/ - -int decimal_result_size(decimal_t *from1, decimal_t *from2, char op, int param) -{ - switch (op) { - case '-': - return ROUND_UP(max(from1->intg, from2->intg)) + - ROUND_UP(max(from1->frac, from2->frac)); - case '+': - return ROUND_UP(max(from1->intg, from2->intg)+1) + - ROUND_UP(max(from1->frac, from2->frac)); - case '*': - return ROUND_UP(from1->intg+from2->intg)+ - ROUND_UP(from1->frac)+ROUND_UP(from2->frac); - case '/': - return ROUND_UP(from1->intg+from2->intg+1+from1->frac+from2->frac+param); - default: DBUG_ASSERT(0); - } - return -1; /* shut up the warning */ -} - -static int do_add(decimal_t *from1, decimal_t *from2, decimal_t *to) -{ - int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg), - frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac), - frac0=max(frac1, frac2), intg0=max(intg1, intg2), error; - dec1 *buf1, *buf2, *buf0, *stop, *stop2, x, carry; - - sanity(to); - - /* is there a need for extra word because of carry ? */ - x=intg1 > intg2 ? from1->buf[0] : - intg2 > intg1 ? from2->buf[0] : - from1->buf[0] + from2->buf[0] ; - if (unlikely(x > DIG_MAX-1)) /* yes, there is */ - { - intg0++; - to->buf[0]=0; /* safety */ - } - - FIX_INTG_FRAC_ERROR(to->len, intg0, frac0, error); - if (unlikely(error == E_DEC_OVERFLOW)) - { - max_decimal(to->len * DIG_PER_DEC1, 0, to); - return error; - } - - buf0=to->buf+intg0+frac0; - - to->sign=from1->sign; - to->frac=max(from1->frac, from2->frac); - to->intg=intg0*DIG_PER_DEC1; - if (unlikely(error)) - { - set_if_smaller(to->frac, frac0*DIG_PER_DEC1); - set_if_smaller(frac1, frac0); - set_if_smaller(frac2, frac0); - set_if_smaller(intg1, intg0); - set_if_smaller(intg2, intg0); - } - - /* part 1 - max(frac) ... min (frac) */ - if (frac1 > frac2) - { - buf1=from1->buf+intg1+frac1; - stop=from1->buf+intg1+frac2; - buf2=from2->buf+intg2+frac2; - stop2=from1->buf+(intg1 > intg2 ? intg1-intg2 : 0); - } - else - { - buf1=from2->buf+intg2+frac2; - stop=from2->buf+intg2+frac1; - buf2=from1->buf+intg1+frac1; - stop2=from2->buf+(intg2 > intg1 ? intg2-intg1 : 0); - } - while (buf1 > stop) - *--buf0=*--buf1; - - /* part 2 - min(frac) ... min(intg) */ - carry=0; - while (buf1 > stop2) - { - ADD(*--buf0, *--buf1, *--buf2, carry); - } - - /* part 3 - min(intg) ... max(intg) */ - buf1= intg1 > intg2 ? ((stop=from1->buf)+intg1-intg2) : - ((stop=from2->buf)+intg2-intg1) ; - while (buf1 > stop) - { - ADD(*--buf0, *--buf1, 0, carry); - } - - if (unlikely(carry)) - *--buf0=1; - DBUG_ASSERT(buf0 == to->buf || buf0 == to->buf+1); - - return error; -} - -/* to=from1-from2. - if to==0, return -1/0/+1 - the result of the comparison */ -static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) -{ - int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg), - frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac); - int frac0=max(frac1, frac2), error; - dec1 *buf1, *buf2, *buf0, *stop1, *stop2, *start1, *start2, carry=0; - - /* let carry:=1 if from2 > from1 */ - start1=buf1=from1->buf; stop1=buf1+intg1; - start2=buf2=from2->buf; stop2=buf2+intg2; - if (unlikely(*buf1 == 0)) - { - while (buf1 < stop1 && *buf1 == 0) - buf1++; - start1=buf1; - intg1= (int) (stop1-buf1); - } - if (unlikely(*buf2 == 0)) - { - while (buf2 < stop2 && *buf2 == 0) - buf2++; - start2=buf2; - intg2= (int) (stop2-buf2); - } - if (intg2 > intg1) - carry=1; - else if (intg2 == intg1) - { - dec1 *end1= stop1 + (frac1 - 1); - dec1 *end2= stop2 + (frac2 - 1); - while (unlikely((buf1 <= end1) && (*end1 == 0))) - end1--; - while (unlikely((buf2 <= end2) && (*end2 == 0))) - end2--; - frac1= (int) (end1 - stop1) + 1; - frac2= (int) (end2 - stop2) + 1; - while (buf1 <=end1 && buf2 <= end2 && *buf1 == *buf2) - buf1++, buf2++; - if (buf1 <= end1) - { - if (buf2 <= end2) - carry= *buf2 > *buf1; - else - carry= 0; - } - else - { - if (buf2 <= end2) - carry=1; - else /* short-circuit everything: from1 == from2 */ - { - if (to == 0) /* decimal_cmp() */ - return 0; - decimal_make_zero(to); - return E_DEC_OK; - } - } - } - - if (to == 0) /* decimal_cmp() */ - return carry == from1->sign ? 1 : -1; - - sanity(to); - - to->sign=from1->sign; - - /* ensure that always from1 > from2 (and intg1 >= intg2) */ - if (carry) - { - swap_variables(decimal_t *,from1,from1); - swap_variables(dec1 *,start1, start2); - swap_variables(int,intg1,intg2); - swap_variables(int,frac1,frac2); - to->sign= 1 - to->sign; - } - - FIX_INTG_FRAC_ERROR(to->len, intg1, frac0, error); - buf0=to->buf+intg1+frac0; - - to->frac=max(from1->frac, from2->frac); - to->intg=intg1*DIG_PER_DEC1; - if (unlikely(error)) - { - set_if_smaller(to->frac, frac0*DIG_PER_DEC1); - set_if_smaller(frac1, frac0); - set_if_smaller(frac2, frac0); - set_if_smaller(intg2, intg1); - } - carry=0; - - /* part 1 - max(frac) ... min (frac) */ - if (frac1 > frac2) - { - buf1=start1+intg1+frac1; - stop1=start1+intg1+frac2; - buf2=start2+intg2+frac2; - while (frac0-- > frac1) - *--buf0=0; - while (buf1 > stop1) - *--buf0=*--buf1; - } - else - { - buf1=start1+intg1+frac1; - buf2=start2+intg2+frac2; - stop2=start2+intg2+frac1; - while (frac0-- > frac2) - *--buf0=0; - while (buf2 > stop2) - { - SUB(*--buf0, 0, *--buf2, carry); - } - } - - /* part 2 - min(frac) ... intg2 */ - while (buf2 > start2) - { - SUB(*--buf0, *--buf1, *--buf2, carry); - } - - /* part 3 - intg2 ... intg1 */ - while (carry && buf1 > start1) - { - SUB(*--buf0, *--buf1, 0, carry); - } - - while (buf1 > start1) - *--buf0=*--buf1; - - while (buf0 > to->buf) - *--buf0=0; - - return error; -} - -int decimal_intg(decimal_t *from) -{ - int res; - dec1 *tmp_res; - tmp_res= remove_leading_zeroes(from, &res); - return res; -} - -int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to) -{ - if (likely(from1->sign == from2->sign)) - return do_add(from1, from2, to); - return do_sub(from1, from2, to); -} - -int decimal_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) -{ - if (likely(from1->sign == from2->sign)) - return do_sub(from1, from2, to); - return do_add(from1, from2, to); -} - -int decimal_cmp(decimal_t *from1, decimal_t *from2) -{ - if (likely(from1->sign == from2->sign)) - return do_sub(from1, from2, 0); - return from1->sign > from2->sign ? -1 : 1; -} - -int decimal_is_zero(decimal_t *from) -{ - dec1 *buf1=from->buf, - *end=buf1+ROUND_UP(from->intg)+ROUND_UP(from->frac); - while (buf1 < end) - if (*buf1++) - return 0; - return 1; -} - -/* - multiply two decimals - - SYNOPSIS - decimal_mul() - from1, from2 - factors - to - product - - RETURN VALUE - E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW; - - NOTES - in this implementation, with sizeof(dec1)=4 we have DIG_PER_DEC1=9, - and 63-digit number will take only 7 dec1 words (basically a 7-digit - "base 999999999" number). Thus there's no need in fast multiplication - algorithms, 7-digit numbers can be multiplied with a naive O(n*n) - method. - - XXX if this library is to be used with huge numbers of thousands of - digits, fast multiplication must be implemented. -*/ -int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to) -{ - int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg), - frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac), - intg0=ROUND_UP(from1->intg+from2->intg), - frac0=frac1+frac2, error, i, j, d_to_move; - dec1 *buf1=from1->buf+intg1, *buf2=from2->buf+intg2, *buf0, - *start2, *stop2, *stop1, *start0, carry; - - sanity(to); - - i=intg0; /* save 'ideal' values */ - j=frac0; - FIX_INTG_FRAC_ERROR(to->len, intg0, frac0, error); /* bound size */ - to->sign=from1->sign != from2->sign; - to->frac=from1->frac+from2->frac; /* store size in digits */ - to->intg=intg0*DIG_PER_DEC1; - - if (unlikely(error)) - { - set_if_smaller(to->frac, frac0*DIG_PER_DEC1); - set_if_smaller(to->intg, intg0*DIG_PER_DEC1); - if (unlikely(i > intg0)) /* bounded integer-part */ - { - i-=intg0; - j=i >> 1; - intg1-= j; - intg2-=i-j; - frac1=frac2=0; /* frac0 is already 0 here */ - } - else /* bounded fract part */ - { - j-=frac0; - i=j >> 1; - if (frac1 <= frac2) - { - frac1-= i; - frac2-=j-i; - } - else - { - frac2-= i; - frac1-=j-i; - } - } - } - start0=to->buf+intg0+frac0-1; - start2=buf2+frac2-1; - stop1=buf1-intg1; - stop2=buf2-intg2; - - bzero(to->buf, (intg0+frac0)*sizeof(dec1)); - - for (buf1+=frac1-1; buf1 >= stop1; buf1--, start0--) - { - carry=0; - for (buf0=start0, buf2=start2; buf2 >= stop2; buf2--, buf0--) - { - dec1 hi, lo; - dec2 p= ((dec2)*buf1) * ((dec2)*buf2); - hi=(dec1)(p/DIG_BASE); - lo=(dec1)(p-((dec2)hi)*DIG_BASE); - ADD2(*buf0, *buf0, lo, carry); - carry+=hi; - } - if (carry) - { - if (buf0 < to->buf) - return E_DEC_OVERFLOW; - ADD2(*buf0, *buf0, 0, carry); - } - for (buf0--; carry; buf0--) - { - if (buf0 < to->buf) - return E_DEC_OVERFLOW; - ADD(*buf0, *buf0, 0, carry); - } - } - - /* Now we have to check for -0.000 case */ - if (to->sign) - { - dec1 *buf= to->buf; - dec1 *end= to->buf + intg0 + frac0; - DBUG_ASSERT(buf != end); - for (;;) - { - if (*buf) - break; - if (++buf == end) - { - /* We got decimal zero */ - decimal_make_zero(to); - break; - } - } - } - buf1= to->buf; - d_to_move= intg0 + ROUND_UP(to->frac); - while (!*buf1 && (to->intg > DIG_PER_DEC1)) - { - buf1++; - to->intg-= DIG_PER_DEC1; - d_to_move--; - } - if (to->buf < buf1) - { - dec1 *cur_d= to->buf; - for (; d_to_move--; cur_d++, buf1++) - *cur_d= *buf1; - } - return error; -} - -/* - naive division algorithm (Knuth's Algorithm D in 4.3.1) - - it's ok for short numbers - also we're using alloca() to allocate a temporary buffer - - XXX if this library is to be used with huge numbers of thousands of - digits, fast division must be implemented and alloca should be - changed to malloc (or at least fallback to malloc if alloca() fails) - but then, decimal_mul() should be rewritten too :( -*/ -static int do_div_mod(decimal_t *from1, decimal_t *from2, - decimal_t *to, decimal_t *mod, int scale_incr) -{ - int frac1=ROUND_UP(from1->frac)*DIG_PER_DEC1, prec1=from1->intg+frac1, - frac2=ROUND_UP(from2->frac)*DIG_PER_DEC1, prec2=from2->intg+frac2, - error, i, intg0, frac0, len1, len2, dintg, div_mod=(!mod); - dec1 *buf0, *buf1=from1->buf, *buf2=from2->buf, *tmp1, - *start2, *stop2, *stop1, *stop0, norm2, carry, *start1, dcarry; - dec2 norm_factor, x, guess, y; - - LINT_INIT(error); - - if (mod) - to=mod; - - sanity(to); - - /* removing all the leading zeroes */ - i= ((prec2 - 1) % DIG_PER_DEC1) + 1; - while (prec2 > 0 && *buf2 == 0) - { - prec2-= i; - i= DIG_PER_DEC1; - buf2++; - } - if (prec2 <= 0) /* short-circuit everything: from2 == 0 */ - return E_DEC_DIV_ZERO; - for (i= (prec2 - 1) % DIG_PER_DEC1; *buf2 < powers10[i--]; prec2--) ; - DBUG_ASSERT(prec2 > 0); - - i=((prec1-1) % DIG_PER_DEC1)+1; - while (prec1 > 0 && *buf1 == 0) - { - prec1-=i; - i=DIG_PER_DEC1; - buf1++; - } - if (prec1 <= 0) - { /* short-circuit everything: from1 == 0 */ - decimal_make_zero(to); - return E_DEC_OK; - } - for (i=(prec1-1) % DIG_PER_DEC1; *buf1 < powers10[i--]; prec1--) ; - DBUG_ASSERT(prec1 > 0); - - /* let's fix scale_incr, taking into account frac1,frac2 increase */ - if ((scale_incr-= frac1 - from1->frac + frac2 - from2->frac) < 0) - scale_incr=0; - - dintg=(prec1-frac1)-(prec2-frac2)+(*buf1 >= *buf2); - if (dintg < 0) - { - dintg/=DIG_PER_DEC1; - intg0=0; - } - else - intg0=ROUND_UP(dintg); - if (mod) - { - /* we're calculating N1 % N2. - The result will have - frac=max(frac1, frac2), as for subtraction - intg=intg2 - */ - to->sign=from1->sign; - to->frac=max(from1->frac, from2->frac); - frac0=0; - } - else - { - /* - we're calculating N1/N2. N1 is in the buf1, has prec1 digits - N2 is in the buf2, has prec2 digits. Scales are frac1 and - frac2 accordingly. - Thus, the result will have - frac = ROUND_UP(frac1+frac2+scale_incr) - and - intg = (prec1-frac1) - (prec2-frac2) + 1 - prec = intg+frac - */ - frac0=ROUND_UP(frac1+frac2+scale_incr); - FIX_INTG_FRAC_ERROR(to->len, intg0, frac0, error); - to->sign=from1->sign != from2->sign; - to->intg=intg0*DIG_PER_DEC1; - to->frac=frac0*DIG_PER_DEC1; - } - buf0=to->buf; - stop0=buf0+intg0+frac0; - if (likely(div_mod)) - while (dintg++ < 0) - *buf0++=0; - - len1=(i=ROUND_UP(prec1))+ROUND_UP(2*frac2+scale_incr+1) + 1; - set_if_bigger(len1, 3); - if (!(tmp1=(dec1 *)my_alloca(len1*sizeof(dec1)))) - return E_DEC_OOM; - memcpy(tmp1, buf1, i*sizeof(dec1)); - bzero(tmp1+i, (len1-i)*sizeof(dec1)); - - start1=tmp1; - stop1=start1+len1; - start2=buf2; - stop2=buf2+ROUND_UP(prec2)-1; - - /* removing end zeroes */ - while (*stop2 == 0 && stop2 >= start2) - stop2--; - len2= (int) (stop2++ - start2); - - /* - calculating norm2 (normalized *start2) - we need *start2 to be large - (at least > DIG_BASE/2), but unlike Knuth's Alg. D we don't want to - normalize input numbers (as we don't make a copy of the divisor). - Thus we normalize first dec1 of buf2 only, and we'll normalize *start1 - on the fly for the purpose of guesstimation only. - It's also faster, as we're saving on normalization of buf2 - */ - norm_factor=DIG_BASE/(*start2+1); - norm2=(dec1)(norm_factor*start2[0]); - if (likely(len2>0)) - norm2+=(dec1)(norm_factor*start2[1]/DIG_BASE); - - if (*start1 < *start2) - dcarry=*start1++; - else - dcarry=0; - - /* main loop */ - for (; buf0 < stop0; buf0++) - { - /* short-circuit, if possible */ - if (unlikely(dcarry == 0 && *start1 < *start2)) - guess=0; - else - { - /* D3: make a guess */ - x=start1[0]+((dec2)dcarry)*DIG_BASE; - y=start1[1]; - guess=(norm_factor*x+norm_factor*y/DIG_BASE)/norm2; - if (unlikely(guess >= DIG_BASE)) - guess=DIG_BASE-1; - if (likely(len2>0)) - { - /* hmm, this is a suspicious trick - I removed normalization here */ - if (start2[1]*guess > (x-guess*start2[0])*DIG_BASE+y) - guess--; - if (unlikely(start2[1]*guess > (x-guess*start2[0])*DIG_BASE+y)) - guess--; - DBUG_ASSERT(start2[1]*guess <= (x-guess*start2[0])*DIG_BASE+y); - } - - /* D4: multiply and subtract */ - buf2=stop2; - buf1=start1+len2; - DBUG_ASSERT(buf1 < stop1); - for (carry=0; buf2 > start2; buf1--) - { - dec1 hi, lo; - x=guess * (*--buf2); - hi=(dec1)(x/DIG_BASE); - lo=(dec1)(x-((dec2)hi)*DIG_BASE); - SUB2(*buf1, *buf1, lo, carry); - carry+=hi; - } - carry= dcarry < carry; - - /* D5: check the remainder */ - if (unlikely(carry)) - { - /* D6: correct the guess */ - guess--; - buf2=stop2; - buf1=start1+len2; - for (carry=0; buf2 > start2; buf1--) - { - ADD(*buf1, *buf1, *--buf2, carry); - } - } - } - if (likely(div_mod)) - *buf0=(dec1)guess; - dcarry= *start1; - start1++; - } - if (mod) - { - /* - now the result is in tmp1, it has - intg=prec1-frac1 - frac=max(frac1, frac2)=to->frac - */ - if (dcarry) - *--start1=dcarry; - buf0=to->buf; - intg0=(int) (ROUND_UP(prec1-frac1)-(start1-tmp1)); - frac0=ROUND_UP(to->frac); - error=E_DEC_OK; - if (unlikely(frac0==0 && intg0==0)) - { - decimal_make_zero(to); - goto done; - } - if (intg0<=0) - { - if (unlikely(-intg0 >= to->len)) - { - decimal_make_zero(to); - error=E_DEC_TRUNCATED; - goto done; - } - stop1=start1+frac0; - frac0+=intg0; - to->intg=0; - while (intg0++ < 0) - *buf0++=0; - } - else - { - if (unlikely(intg0 > to->len)) - { - frac0=0; - intg0=to->len; - error=E_DEC_OVERFLOW; - goto done; - } - DBUG_ASSERT(intg0 <= ROUND_UP(from2->intg)); - stop1=start1+frac0+intg0; - to->intg=min(intg0*DIG_PER_DEC1, from2->intg); - } - if (unlikely(intg0+frac0 > to->len)) - { - stop1-=frac0+intg0-to->len; - frac0=to->len-intg0; - to->frac=frac0*DIG_PER_DEC1; - error=E_DEC_TRUNCATED; - } - DBUG_ASSERT(buf0 + (stop1 - start1) <= to->buf + to->len); - while (start1 < stop1) - *buf0++=*start1++; - } -done: - my_afree(tmp1); - return error; -} - -/* - division of two decimals - - SYNOPSIS - decimal_div() - from1 - dividend - from2 - divisor - to - quotient - - RETURN VALUE - E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW/E_DEC_DIV_ZERO; - - NOTES - see do_div_mod() -*/ - -int -decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to, int scale_incr) -{ - return do_div_mod(from1, from2, to, 0, scale_incr); -} - -/* - modulus - - SYNOPSIS - decimal_mod() - from1 - dividend - from2 - divisor - to - modulus - - RETURN VALUE - E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW/E_DEC_DIV_ZERO; - - NOTES - see do_div_mod() - - DESCRIPTION - the modulus R in R = M mod N - - is defined as - - 0 <= |R| < |M| - sign R == sign M - R = M - k*N, where k is integer - - thus, there's no requirement for M or N to be integers -*/ - -int decimal_mod(decimal_t *from1, decimal_t *from2, decimal_t *to) -{ - return do_div_mod(from1, from2, 0, to, 0); -} - -#ifdef MAIN - -int full= 0; -decimal_t a, b, c; -char buf1[100], buf2[100], buf3[100]; - -void dump_decimal(decimal_t *d) -{ - int i; - printf("/* intg=%d, frac=%d, sign=%d, buf[]={", d->intg, d->frac, d->sign); - for (i=0; i < ROUND_UP(d->frac)+ROUND_UP(d->intg)-1; i++) - printf("%09d, ", d->buf[i]); - printf("%09d} */ ", d->buf[i]); -} - - -void check_result_code(int actual, int want) -{ - if (actual != want) - { - printf("\n^^^^^^^^^^^^^ must return %d\n", want); - exit(1); - } -} - - -void print_decimal(decimal_t *d, const char *orig, int actual, int want) -{ - char s[100]; - int slen=sizeof(s); - - if (full) dump_decimal(d); - decimal2string(d, s, &slen, 0, 0, 0); - printf("'%s'", s); - check_result_code(actual, want); - if (orig && strcmp(orig, s)) - { - printf("\n^^^^^^^^^^^^^ must've been '%s'\n", orig); - exit(1); - } -} - -void test_d2s() -{ - char s[100]; - int slen, res; - - /***********************************/ - printf("==== decimal2string ====\n"); - a.buf[0]=12345; a.intg=5; a.frac=0; a.sign=0; - slen=sizeof(s); - res=decimal2string(&a, s, &slen, 0, 0, 0); - dump_decimal(&a); printf(" --> res=%d str='%s' len=%d\n", res, s, slen); - - a.buf[1]=987000000; a.frac=3; - slen=sizeof(s); - res=decimal2string(&a, s, &slen, 0, 0, 0); - dump_decimal(&a); printf(" --> res=%d str='%s' len=%d\n", res, s, slen); - - a.sign=1; - slen=sizeof(s); - res=decimal2string(&a, s, &slen, 0, 0, 0); - dump_decimal(&a); printf(" --> res=%d str='%s' len=%d\n", res, s, slen); - - slen=8; - res=decimal2string(&a, s, &slen, 0, 0, 0); - dump_decimal(&a); printf(" --> res=%d str='%s' len=%d\n", res, s, slen); - - slen=5; - res=decimal2string(&a, s, &slen, 0, 0, 0); - dump_decimal(&a); printf(" --> res=%d str='%s' len=%d\n", res, s, slen); - - a.buf[0]=987000000; a.frac=3; a.intg=0; - slen=sizeof(s); - res=decimal2string(&a, s, &slen, 0, 0, 0); - dump_decimal(&a); printf(" --> res=%d str='%s' len=%d\n", res, s, slen); -} - -void test_s2d(const char *s, const char *orig, int ex) -{ - char s1[100], *end; - int res; - sprintf(s1, "'%s'", s); - end= strend(s); - printf("len=%2d %-30s => res=%d ", a.len, s1, - (res= string2decimal(s, &a, &end))); - print_decimal(&a, orig, res, ex); - printf("\n"); -} - -void test_d2f(const char *s, int ex) -{ - char s1[100], *end; - double x; - int res; - - sprintf(s1, "'%s'", s); - end= strend(s); - string2decimal(s, &a, &end); - res=decimal2double(&a, &x); - if (full) dump_decimal(&a); - printf("%-40s => res=%d %.*g\n", s1, res, a.intg+a.frac, x); - check_result_code(res, ex); -} - -void test_d2b2d(const char *str, int p, int s, const char *orig, int ex) -{ - char s1[100], buf[100], *end; - int res, i, size=decimal_bin_size(p, s); - - sprintf(s1, "'%s'", str); - end= strend(str); - string2decimal(str, &a, &end); - res=decimal2bin(&a, buf, p, s); - printf("%-31s {%2d, %2d} => res=%d size=%-2d ", s1, p, s, res, size); - if (full) - { - printf("0x"); - for (i=0; i < size; i++) - printf("%02x", ((uchar *)buf)[i]); - } - res=bin2decimal(buf, &a, p, s); - printf(" => res=%d ", res); - print_decimal(&a, orig, res, ex); - printf("\n"); -} - -void test_f2d(double from, int ex) -{ - int res; - - res=double2decimal(from, &a); - printf("%-40.*f => res=%d ", DBL_DIG-2, from, res); - print_decimal(&a, 0, res, ex); - printf("\n"); -} - -void test_ull2d(ulonglong from, const char *orig, int ex) -{ - char s[100]; - int res; - - res=ulonglong2decimal(from, &a); - longlong10_to_str(from,s,10); - printf("%-40s => res=%d ", s, res); - print_decimal(&a, orig, res, ex); - printf("\n"); -} - -void test_ll2d(longlong from, const char *orig, int ex) -{ - char s[100]; - int res; - - res=longlong2decimal(from, &a); - longlong10_to_str(from,s,-10); - printf("%-40s => res=%d ", s, res); - print_decimal(&a, orig, res, ex); - printf("\n"); -} - -void test_d2ull(const char *s, const char *orig, int ex) -{ - char s1[100], *end; - ulonglong x; - int res; - - end= strend(s); - string2decimal(s, &a, &end); - res=decimal2ulonglong(&a, &x); - if (full) dump_decimal(&a); - longlong10_to_str(x,s1,10); - printf("%-40s => res=%d %s\n", s, res, s1); - check_result_code(res, ex); - if (orig && strcmp(orig, s1)) - { - printf("\n^^^^^^^^^^^^^ must've been '%s'\n", orig); - exit(1); - } -} - -void test_d2ll(const char *s, const char *orig, int ex) -{ - char s1[100], *end; - longlong x; - int res; - - end= strend(s); - string2decimal(s, &a, &end); - res=decimal2longlong(&a, &x); - if (full) dump_decimal(&a); - longlong10_to_str(x,s1,-10); - printf("%-40s => res=%d %s\n", s, res, s1); - check_result_code(res, ex); - if (orig && strcmp(orig, s1)) - { - printf("\n^^^^^^^^^^^^^ must've been '%s'\n", orig); - exit(1); - } -} - -void test_da(const char *s1, const char *s2, const char *orig, int ex) -{ - char s[100], *end; - int res; - sprintf(s, "'%s' + '%s'", s1, s2); - end= strend(s1); - string2decimal(s1, &a, &end); - end= strend(s2); - string2decimal(s2, &b, &end); - res=decimal_add(&a, &b, &c); - printf("%-40s => res=%d ", s, res); - print_decimal(&c, orig, res, ex); - printf("\n"); -} - -void test_ds(const char *s1, const char *s2, const char *orig, int ex) -{ - char s[100], *end; - int res; - sprintf(s, "'%s' - '%s'", s1, s2); - end= strend(s1); - string2decimal(s1, &a, &end); - end= strend(s2); - string2decimal(s2, &b, &end); - res=decimal_sub(&a, &b, &c); - printf("%-40s => res=%d ", s, res); - print_decimal(&c, orig, res, ex); - printf("\n"); -} - -void test_dc(const char *s1, const char *s2, int orig) -{ - char s[100], *end; - int res; - sprintf(s, "'%s' <=> '%s'", s1, s2); - end= strend(s1); - string2decimal(s1, &a, &end); - end= strend(s2); - string2decimal(s2, &b, &end); - res=decimal_cmp(&a, &b); - printf("%-40s => res=%d\n", s, res); - if (orig != res) - { - printf("\n^^^^^^^^^^^^^ must've been %d\n", orig); - exit(1); - } -} - -void test_dm(const char *s1, const char *s2, const char *orig, int ex) -{ - char s[100], *end; - int res; - sprintf(s, "'%s' * '%s'", s1, s2); - end= strend(s1); - string2decimal(s1, &a, &end); - end= strend(s2); - string2decimal(s2, &b, &end); - res=decimal_mul(&a, &b, &c); - printf("%-40s => res=%d ", s, res); - print_decimal(&c, orig, res, ex); - printf("\n"); -} - -void test_dv(const char *s1, const char *s2, const char *orig, int ex) -{ - char s[100], *end; - int res; - sprintf(s, "'%s' / '%s'", s1, s2); - end= strend(s1); - string2decimal(s1, &a, &end); - end= strend(s2); - string2decimal(s2, &b, &end); - res=decimal_div(&a, &b, &c, 5); - printf("%-40s => res=%d ", s, res); - check_result_code(res, ex); - if (res == E_DEC_DIV_ZERO) - printf("E_DEC_DIV_ZERO"); - else - print_decimal(&c, orig, res, ex); - printf("\n"); -} - -void test_md(const char *s1, const char *s2, const char *orig, int ex) -{ - char s[100], *end; - int res; - sprintf(s, "'%s' %% '%s'", s1, s2); - end= strend(s1); - string2decimal(s1, &a, &end); - end= strend(s2); - string2decimal(s2, &b, &end); - res=decimal_mod(&a, &b, &c); - printf("%-40s => res=%d ", s, res); - check_result_code(res, ex); - if (res == E_DEC_DIV_ZERO) - printf("E_DEC_DIV_ZERO"); - else - print_decimal(&c, orig, res, ex); - printf("\n"); -} - -const char *round_mode[]= -{"TRUNCATE", "HALF_EVEN", "HALF_UP", "CEILING", "FLOOR"}; - -void test_ro(const char *s1, int n, decimal_round_mode mode, const char *orig, - int ex) -{ - char s[100], *end; - int res; - sprintf(s, "'%s', %d, %s", s1, n, round_mode[mode]); - end= strend(s1); - string2decimal(s1, &a, &end); - res=decimal_round(&a, &b, n, mode); - printf("%-40s => res=%d ", s, res); - print_decimal(&b, orig, res, ex); - printf("\n"); -} - - -void test_mx(int precision, int frac, const char *orig) -{ - char s[100]; - sprintf(s, "%d, %d", precision, frac); - max_decimal(precision, frac, &a); - printf("%-40s => ", s); - print_decimal(&a, orig, 0, 0); - printf("\n"); -} - - -void test_pr(const char *s1, int prec, int dec, char filler, const char *orig, - int ex) -{ - char s[100], *end; - char s2[100]; - int slen= sizeof(s2); - int res; - - sprintf(s, filler ? "'%s', %d, %d, '%c'" : "'%s', %d, %d, '\\0'", - s1, prec, dec, filler); - end= strend(s1); - string2decimal(s1, &a, &end); - res= decimal2string(&a, s2, &slen, prec, dec, filler); - printf("%-40s => res=%d '%s'", s, res, s2); - check_result_code(res, ex); - if (orig && strcmp(orig, s2)) - { - printf("\n^^^^^^^^^^^^^ must've been '%s'\n", orig); - exit(1); - } - printf("\n"); -} - - -void test_sh(const char *s1, int shift, const char *orig, int ex) -{ - char s[100], *end; - int res; - sprintf(s, "'%s' %s %d", s1, ((shift < 0) ? ">>" : "<<"), abs(shift)); - end= strend(s1); - string2decimal(s1, &a, &end); - res= decimal_shift(&a, shift); - printf("%-40s => res=%d ", s, res); - print_decimal(&a, orig, res, ex); - printf("\n"); -} - - -void test_fr(const char *s1, const char *orig) -{ - char s[100], *end; - sprintf(s, "'%s'", s1); - printf("%-40s => ", s); - end= strend(s1); - string2decimal(s1, &a, &end); - a.frac= decimal_actual_fraction(&a); - print_decimal(&a, orig, 0, 0); - printf("\n"); -} - - -int main() -{ - a.buf=(void*)buf1; - a.len=sizeof(buf1)/sizeof(dec1); - b.buf=(void*)buf2; - b.len=sizeof(buf2)/sizeof(dec1); - c.buf=(void*)buf3; - c.len=sizeof(buf3)/sizeof(dec1); - - if (full) - test_d2s(); - - printf("==== string2decimal ====\n"); - test_s2d("12345", "12345", 0); - test_s2d("12345.", "12345", 0); - test_s2d("123.45", "123.45", 0); - test_s2d("-123.45", "-123.45", 0); - test_s2d(".00012345000098765", "0.00012345000098765", 0); - test_s2d(".12345000098765", "0.12345000098765", 0); - test_s2d("-.000000012345000098765", "-0.000000012345000098765", 0); - test_s2d("1234500009876.5", "1234500009876.5", 0); - a.len=1; - test_s2d("123450000098765", "98765", 2); - test_s2d("123450.000098765", "123450", 1); - a.len=sizeof(buf1)/sizeof(dec1); - test_s2d("123E5", "12300000", 0); - test_s2d("123E-2", "1.23", 0); - - printf("==== decimal2double ====\n"); - test_d2f("12345", 0); - test_d2f("123.45", 0); - test_d2f("-123.45", 0); - test_d2f("0.00012345000098765", 0); - test_d2f("1234500009876.5", 0); - - printf("==== double2decimal ====\n"); - test_f2d(12345, 0); - test_f2d(1.0/3, 0); - test_f2d(-123.45, 0); - test_f2d(0.00012345000098765, 0); - test_f2d(1234500009876.5, 0); - - printf("==== ulonglong2decimal ====\n"); - test_ull2d(12345ULL, "12345", 0); - test_ull2d(0ULL, "0", 0); - test_ull2d(18446744073709551615ULL, "18446744073709551615", 0); - - printf("==== decimal2ulonglong ====\n"); - test_d2ull("12345", "12345", 0); - test_d2ull("0", "0", 0); - test_d2ull("18446744073709551615", "18446744073709551615", 0); - test_d2ull("18446744073709551616", "18446744073", 2); - test_d2ull("-1", "0", 2); - test_d2ull("1.23", "1", 1); - test_d2ull("9999999999999999999999999.000", "9999999999999999", 2); - - printf("==== longlong2decimal ====\n"); - test_ll2d(-12345LL, "-12345", 0); - test_ll2d(-1LL, "-1", 0); - test_ll2d(-9223372036854775807LL, "-9223372036854775807", 0); - test_ll2d(9223372036854775808ULL, "-9223372036854775808", 0); - - printf("==== decimal2longlong ====\n"); - test_d2ll("18446744073709551615", "18446744073", 2); - test_d2ll("-1", "-1", 0); - test_d2ll("-1.23", "-1", 1); - test_d2ll("-9223372036854775807", "-9223372036854775807", 0); - test_d2ll("-9223372036854775808", "-9223372036854775808", 0); - test_d2ll("9223372036854775808", "9223372036854775807", 2); - - printf("==== do_add ====\n"); - test_da(".00012345000098765" ,"123.45", "123.45012345000098765", 0); - test_da(".1" ,".45", "0.55", 0); - test_da("1234500009876.5" ,".00012345000098765", "1234500009876.50012345000098765", 0); - test_da("9999909999999.5" ,".555", "9999910000000.055", 0); - test_da("99999999" ,"1", "100000000", 0); - test_da("989999999" ,"1", "990000000", 0); - test_da("999999999" ,"1", "1000000000", 0); - test_da("12345" ,"123.45", "12468.45", 0); - test_da("-12345" ,"-123.45", "-12468.45", 0); - test_ds("-12345" ,"123.45", "-12468.45", 0); - test_ds("12345" ,"-123.45", "12468.45", 0); - - printf("==== do_sub ====\n"); - test_ds(".00012345000098765", "123.45","-123.44987654999901235", 0); - test_ds("1234500009876.5", ".00012345000098765","1234500009876.49987654999901235", 0); - test_ds("9999900000000.5", ".555","9999899999999.945", 0); - test_ds("1111.5551", "1111.555","0.0001", 0); - test_ds(".555", ".555","0", 0); - test_ds("10000000", "1","9999999", 0); - test_ds("1000001000", ".1","1000000999.9", 0); - test_ds("1000000000", ".1","999999999.9", 0); - test_ds("12345", "123.45","12221.55", 0); - test_ds("-12345", "-123.45","-12221.55", 0); - test_da("-12345", "123.45","-12221.55", 0); - test_da("12345", "-123.45","12221.55", 0); - test_ds("123.45", "12345","-12221.55", 0); - test_ds("-123.45", "-12345","12221.55", 0); - test_da("123.45", "-12345","-12221.55", 0); - test_da("-123.45", "12345","12221.55", 0); - test_da("5", "-6.0","-1.0", 0); - - printf("==== decimal_mul ====\n"); - test_dm("12", "10","120", 0); - test_dm("-123.456", "98765.4321","-12193185.1853376", 0); - test_dm("-123456000000", "98765432100000","-12193185185337600000000000", 0); - test_dm("123456", "987654321","121931851853376", 0); - test_dm("123456", "9876543210","1219318518533760", 0); - test_dm("123", "0.01","1.23", 0); - test_dm("123", "0","0", 0); - - printf("==== decimal_div ====\n"); - test_dv("120", "10","12.000000000", 0); - test_dv("123", "0.01","12300.000000000", 0); - test_dv("120", "100000000000.00000","0.000000001200000000", 0); - test_dv("123", "0","", 4); - test_dv("0", "0", "", 4); - test_dv("-12193185.1853376", "98765.4321","-123.456000000000000000", 0); - test_dv("121931851853376", "987654321","123456.000000000", 0); - test_dv("0", "987","0", 0); - test_dv("1", "3","0.333333333", 0); - test_dv("1.000000000000", "3","0.333333333333333333", 0); - test_dv("1", "1","1.000000000", 0); - test_dv("0.0123456789012345678912345", "9999999999","0.000000000001234567890246913578148141", 0); - test_dv("10.333000000", "12.34500","0.837019036046982584042122316", 0); - test_dv("10.000000000060", "2","5.000000000030000000", 0); - - printf("==== decimal_mod ====\n"); - test_md("234","10","4", 0); - test_md("234.567","10.555","2.357", 0); - test_md("-234.567","10.555","-2.357", 0); - test_md("234.567","-10.555","2.357", 0); - c.buf[1]=0x3ABECA; - test_md("99999999999999999999999999999999999999","3","0", 0); - if (c.buf[1] != 0x3ABECA) - { - printf("%X - overflow\n", c.buf[1]); - exit(1); - } - - printf("==== decimal2bin/bin2decimal ====\n"); - test_d2b2d("-10.55", 4, 2,"-10.55", 0); - test_d2b2d("0.0123456789012345678912345", 30, 25,"0.0123456789012345678912345", 0); - test_d2b2d("12345", 5, 0,"12345", 0); - test_d2b2d("12345", 10, 3,"12345.000", 0); - test_d2b2d("123.45", 10, 3,"123.450", 0); - test_d2b2d("-123.45", 20, 10,"-123.4500000000", 0); - test_d2b2d(".00012345000098765", 15, 14,"0.00012345000098", 0); - test_d2b2d(".00012345000098765", 22, 20,"0.00012345000098765000", 0); - test_d2b2d(".12345000098765", 30, 20,"0.12345000098765000000", 0); - test_d2b2d("-.000000012345000098765", 30, 20,"-0.00000001234500009876", 0); - test_d2b2d("1234500009876.5", 30, 5,"1234500009876.50000", 0); - test_d2b2d("111111111.11", 10, 2,"11111111.11", 0); - test_d2b2d("000000000.01", 7, 3,"0.010", 0); - test_d2b2d("123.4", 10, 2, "123.40", 0); - - - printf("==== decimal_cmp ====\n"); - test_dc("12","13",-1); - test_dc("13","12",1); - test_dc("-10","10",-1); - test_dc("10","-10",1); - test_dc("-12","-13",1); - test_dc("0","12",-1); - test_dc("-10","0",-1); - test_dc("4","4",0); - - printf("==== decimal_round ====\n"); - test_ro("5678.123451",-4,TRUNCATE,"0", 0); - test_ro("5678.123451",-3,TRUNCATE,"5000", 0); - test_ro("5678.123451",-2,TRUNCATE,"5600", 0); - test_ro("5678.123451",-1,TRUNCATE,"5670", 0); - test_ro("5678.123451",0,TRUNCATE,"5678", 0); - test_ro("5678.123451",1,TRUNCATE,"5678.1", 0); - test_ro("5678.123451",2,TRUNCATE,"5678.12", 0); - test_ro("5678.123451",3,TRUNCATE,"5678.123", 0); - test_ro("5678.123451",4,TRUNCATE,"5678.1234", 0); - test_ro("5678.123451",5,TRUNCATE,"5678.12345", 0); - test_ro("5678.123451",6,TRUNCATE,"5678.123451", 0); - test_ro("-5678.123451",-4,TRUNCATE,"0", 0); - memset(buf2, 33, sizeof(buf2)); - test_ro("99999999999999999999999999999999999999",-31,TRUNCATE,"99999990000000000000000000000000000000", 0); - test_ro("15.1",0,HALF_UP,"15", 0); - test_ro("15.5",0,HALF_UP,"16", 0); - test_ro("15.9",0,HALF_UP,"16", 0); - test_ro("-15.1",0,HALF_UP,"-15", 0); - test_ro("-15.5",0,HALF_UP,"-16", 0); - test_ro("-15.9",0,HALF_UP,"-16", 0); - test_ro("15.1",1,HALF_UP,"15.1", 0); - test_ro("-15.1",1,HALF_UP,"-15.1", 0); - test_ro("15.17",1,HALF_UP,"15.2", 0); - test_ro("15.4",-1,HALF_UP,"20", 0); - test_ro("-15.4",-1,HALF_UP,"-20", 0); - test_ro("5.4",-1,HALF_UP,"10", 0); - test_ro(".999", 0, HALF_UP, "1", 0); - memset(buf2, 33, sizeof(buf2)); - test_ro("999999999", -9, HALF_UP, "1000000000", 0); - test_ro("15.1",0,HALF_EVEN,"15", 0); - test_ro("15.5",0,HALF_EVEN,"16", 0); - test_ro("14.5",0,HALF_EVEN,"14", 0); - test_ro("15.9",0,HALF_EVEN,"16", 0); - test_ro("15.1",0,CEILING,"16", 0); - test_ro("-15.1",0,CEILING,"-15", 0); - test_ro("15.1",0,FLOOR,"15", 0); - test_ro("-15.1",0,FLOOR,"-16", 0); - test_ro("999999999999999999999.999", 0, CEILING,"1000000000000000000000", 0); - test_ro("-999999999999999999999.999", 0, FLOOR,"-1000000000000000000000", 0); - - b.buf[0]=DIG_BASE+1; - b.buf++; - test_ro(".3", 0, HALF_UP, "0", 0); - b.buf--; - if (b.buf[0] != DIG_BASE+1) - { - printf("%d - underflow\n", b.buf[0]); - exit(1); - } - - printf("==== max_decimal ====\n"); - test_mx(1,1,"0.9"); - test_mx(1,0,"9"); - test_mx(2,1,"9.9"); - test_mx(4,2,"99.99"); - test_mx(6,3,"999.999"); - test_mx(8,4,"9999.9999"); - test_mx(10,5,"99999.99999"); - test_mx(12,6,"999999.999999"); - test_mx(14,7,"9999999.9999999"); - test_mx(16,8,"99999999.99999999"); - test_mx(18,9,"999999999.999999999"); - test_mx(20,10,"9999999999.9999999999"); - test_mx(20,20,"0.99999999999999999999"); - test_mx(20,0,"99999999999999999999"); - test_mx(40,20,"99999999999999999999.99999999999999999999"); - - printf("==== decimal2string ====\n"); - test_pr("123.123", 0, 0, 0, "123.123", 0); - test_pr("123.123", 7, 3, '0', "123.123", 0); - test_pr("123.123", 9, 3, '0', "00123.123", 0); - test_pr("123.123", 9, 4, '0', "0123.1230", 0); - test_pr("123.123", 9, 5, '0', "123.12300", 0); - test_pr("123.123", 9, 2, '0', "000123.12", 1); - test_pr("123.123", 9, 6, '0', "23.123000", 2); - - printf("==== decimal_shift ====\n"); - test_sh("123.123", 1, "1231.23", 0); - test_sh("123457189.123123456789000", 1, "1234571891.23123456789", 0); - test_sh("123457189.123123456789000", 4, "1234571891231.23456789", 0); - test_sh("123457189.123123456789000", 8, "12345718912312345.6789", 0); - test_sh("123457189.123123456789000", 9, "123457189123123456.789", 0); - test_sh("123457189.123123456789000", 10, "1234571891231234567.89", 0); - test_sh("123457189.123123456789000", 17, "12345718912312345678900000", 0); - test_sh("123457189.123123456789000", 18, "123457189123123456789000000", 0); - test_sh("123457189.123123456789000", 19, "1234571891231234567890000000", 0); - test_sh("123457189.123123456789000", 26, "12345718912312345678900000000000000", 0); - test_sh("123457189.123123456789000", 27, "123457189123123456789000000000000000", 0); - test_sh("123457189.123123456789000", 28, "1234571891231234567890000000000000000", 0); - test_sh("000000000000000000000000123457189.123123456789000", 26, "12345718912312345678900000000000000", 0); - test_sh("00000000123457189.123123456789000", 27, "123457189123123456789000000000000000", 0); - test_sh("00000000000000000123457189.123123456789000", 28, "1234571891231234567890000000000000000", 0); - test_sh("123", 1, "1230", 0); - test_sh("123", 10, "1230000000000", 0); - test_sh(".123", 1, "1.23", 0); - test_sh(".123", 10, "1230000000", 0); - test_sh(".123", 14, "12300000000000", 0); - test_sh("000.000", 1000, "0", 0); - test_sh("000.", 1000, "0", 0); - test_sh(".000", 1000, "0", 0); - test_sh("1", 1000, "1", 2); - test_sh("123.123", -1, "12.3123", 0); - test_sh("123987654321.123456789000", -1, "12398765432.1123456789", 0); - test_sh("123987654321.123456789000", -2, "1239876543.21123456789", 0); - test_sh("123987654321.123456789000", -3, "123987654.321123456789", 0); - test_sh("123987654321.123456789000", -8, "1239.87654321123456789", 0); - test_sh("123987654321.123456789000", -9, "123.987654321123456789", 0); - test_sh("123987654321.123456789000", -10, "12.3987654321123456789", 0); - test_sh("123987654321.123456789000", -11, "1.23987654321123456789", 0); - test_sh("123987654321.123456789000", -12, "0.123987654321123456789", 0); - test_sh("123987654321.123456789000", -13, "0.0123987654321123456789", 0); - test_sh("123987654321.123456789000", -14, "0.00123987654321123456789", 0); - test_sh("00000087654321.123456789000", -14, "0.00000087654321123456789", 0); - a.len= 2; - test_sh("123.123", -2, "1.23123", 0); - test_sh("123.123", -3, "0.123123", 0); - test_sh("123.123", -6, "0.000123123", 0); - test_sh("123.123", -7, "0.0000123123", 0); - test_sh("123.123", -15, "0.000000000000123123", 0); - test_sh("123.123", -16, "0.000000000000012312", 1); - test_sh("123.123", -17, "0.000000000000001231", 1); - test_sh("123.123", -18, "0.000000000000000123", 1); - test_sh("123.123", -19, "0.000000000000000012", 1); - test_sh("123.123", -20, "0.000000000000000001", 1); - test_sh("123.123", -21, "0", 1); - test_sh(".000000000123", -1, "0.0000000000123", 0); - test_sh(".000000000123", -6, "0.000000000000000123", 0); - test_sh(".000000000123", -7, "0.000000000000000012", 1); - test_sh(".000000000123", -8, "0.000000000000000001", 1); - test_sh(".000000000123", -9, "0", 1); - test_sh(".000000000123", 1, "0.00000000123", 0); - test_sh(".000000000123", 8, "0.0123", 0); - test_sh(".000000000123", 9, "0.123", 0); - test_sh(".000000000123", 10, "1.23", 0); - test_sh(".000000000123", 17, "12300000", 0); - test_sh(".000000000123", 18, "123000000", 0); - test_sh(".000000000123", 19, "1230000000", 0); - test_sh(".000000000123", 20, "12300000000", 0); - test_sh(".000000000123", 21, "123000000000", 0); - test_sh(".000000000123", 22, "1230000000000", 0); - test_sh(".000000000123", 23, "12300000000000", 0); - test_sh(".000000000123", 24, "123000000000000", 0); - test_sh(".000000000123", 25, "1230000000000000", 0); - test_sh(".000000000123", 26, "12300000000000000", 0); - test_sh(".000000000123", 27, "123000000000000000", 0); - test_sh(".000000000123", 28, "0.000000000123", 2); - test_sh("123456789.987654321", -1, "12345678.998765432", 1); - test_sh("123456789.987654321", -2, "1234567.899876543", 1); - test_sh("123456789.987654321", -8, "1.234567900", 1); - test_sh("123456789.987654321", -9, "0.123456789987654321", 0); - test_sh("123456789.987654321", -10, "0.012345678998765432", 1); - test_sh("123456789.987654321", -17, "0.000000001234567900", 1); - test_sh("123456789.987654321", -18, "0.000000000123456790", 1); - test_sh("123456789.987654321", -19, "0.000000000012345679", 1); - test_sh("123456789.987654321", -26, "0.000000000000000001", 1); - test_sh("123456789.987654321", -27, "0", 1); - test_sh("123456789.987654321", 1, "1234567900", 1); - test_sh("123456789.987654321", 2, "12345678999", 1); - test_sh("123456789.987654321", 4, "1234567899877", 1); - test_sh("123456789.987654321", 8, "12345678998765432", 1); - test_sh("123456789.987654321", 9, "123456789987654321", 0); - test_sh("123456789.987654321", 10, "123456789.987654321", 2); - test_sh("123456789.987654321", 0, "123456789.987654321", 0); - a.len= sizeof(buf1)/sizeof(dec1); - - printf("==== decimal_actual_fraction ====\n"); - test_fr("1.123456789000000000", "1.123456789"); - test_fr("1.12345678000000000", "1.12345678"); - test_fr("1.1234567000000000", "1.1234567"); - test_fr("1.123456000000000", "1.123456"); - test_fr("1.12345000000000", "1.12345"); - test_fr("1.1234000000000", "1.1234"); - test_fr("1.123000000000", "1.123"); - test_fr("1.12000000000", "1.12"); - test_fr("1.1000000000", "1.1"); - test_fr("1.000000000", "1"); - test_fr("1.0", "1"); - test_fr("10000000000000000000.0", "10000000000000000000"); - - return 0; -} -#endif diff --git a/externals/mysql/strings/do_ctype.c b/externals/mysql/strings/do_ctype.c deleted file mode 100644 index f33ddc5eb8..0000000000 --- a/externals/mysql/strings/do_ctype.c +++ /dev/null @@ -1,198 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Prints case-convert and sort-convert tabell on stdout. This is used to - make _ctype.c easyer */ - -#ifdef DBUG_OFF -#undef DBUG_OFF -#endif - -#include -#include -#include -#include "m_string.h" - -uchar NEAR to_upper[256]; -uchar NEAR to_lower[256],NEAR sort_order[256]; - -static int ascii_output=1; -static string tab_names[]={ "to_lower[]={","to_upper[]={","sort_order[]={" }; -static uchar* tabell[]= {to_lower,to_upper,sort_order}; - -void get_options(),init_case_convert(); - -main(argc,argv) -int argc; -char *argv[]; -{ - int i,j,ch; - DBUG_ENTER ("main"); - DBUG_PROCESS (argv[0]); - - get_options(&argc,&argv); - init_case_convert(); - puts("Tabells for caseconverts and sorttest of characters\n"); - for (i=0 ; i < 3 ; i++) - { - printf("uchar NEAR %s\n",tab_names[i]); - for (j=0 ; j <= 255 ; j++) - { - ch=(int) tabell[i][j]; - if (ascii_output && isprint(ch) && ! (ch & 128)) - { - if (strchr("\\'",(char) ch)) - printf("'\\%c', ",ch); - else - printf("'%c', ",ch); - } - else - printf("'\\%03o',",ch); - if ((j+1 & 7) == 0) - puts(""); - } - puts("};\n"); - } - DBUG_RETURN(0); -} /* main */ - - /* Read options */ - -void get_options(argc,argv) -register int *argc; -register char **argv[]; -{ - int help,version; - char *pos,*progname; - - progname= (*argv)[0]; - help=0; ascii_output=1; - while (--*argc >0 && *(pos = *(++*argv)) == '-' ) - { - while (*++pos) - { - version=0; - switch(*pos) { - case 'n': /* Numeric output */ - ascii_output=0; - break; - case '#': - DBUG_PUSH (++pos); - *(pos--) = '\0'; /* Skippa argument */ - break; - case 'V': - version=1; - case 'I': - case '?': - printf("%s Ver 1.0\n",progname); - if (version) - break; - puts("Output tabells of to_lower[], to_upper[] and sortorder[]\n"); - printf("Usage: %s [-n?I]\n",progname); - puts("Options: -? or -I \"Info\" -n \"numeric output\""); - break; - default: - fprintf(stderr,"illegal option: -%c\n",*pos); - break; - } - } - } - return; -} /* get_options */ - - - /* set up max character for which isupper() and toupper() gives */ - /* right answer. Is usually 127 or 255 */ - -#ifdef USE_INTERNAL_CTYPE -#define MAX_CHAR_OK CHAR_MAX /* All chars is right */ -#else -#define MAX_CHAR_OK 127 /* 7 Bit ascii */ -#endif - - /* Initiate arrays for case-conversation */ - -void init_case_convert() -{ - reg1 int16 i; - reg2 uchar *higher_pos,*lower_pos; - DBUG_ENTER("init_case_convert"); - - for (i=0 ; i <= MAX_CHAR_OK ; i++) - { - to_upper[i]= sort_order[i]= (islower(i) ? toupper(i) : (char) i); - to_lower[i]= (isupper(i) ? tolower(i) : (char) i); - } -#if MAX_CHAR_OK != 255 - for (i--; i++ < 255 ;) - to_upper[i]= sort_order[i]= to_lower[i]= (char) i; -#endif - -#ifdef MSDOS - higher_pos= (uchar *) "\217\216\231\232\220"; /* Extra chars to konv. */ - lower_pos= (uchar *) "\206\204\224\201\202"; -#else -#if defined(HPUX10) && ASCII_BITS_USED == 8 - higher_pos= (uchar *) "\xd0\xd8\xda\xdb\xdc\xd3"; - lower_pos= (uchar *) "\xd4\xcc\xce\xdf\xc9\xd7"; -#else -#ifdef USE_INTERNAL_CTYPE - higher_pos=lower_pos= (uchar* ) ""; /* System converts chars */ -#else -#if defined(DEC_MULTINATIONAL_CHAR) || defined(HP_MULTINATIONAL_CHAR) - higher_pos= (uchar *) "\305\304\326\311\334"; - lower_pos= (uchar *) "\345\344\366\351\374"; -#else - higher_pos= (uchar *) "[]\\@^"; - lower_pos= (uchar *) "{}|`~"; -#endif -#endif /* USE_INTERNAL_CTYPE */ -#endif /* HPUX10 */ -#endif /* MSDOS */ - - while (*higher_pos) - { - to_upper[ *lower_pos ] = sort_order[ *lower_pos ] = (char) *higher_pos; - to_lower[ *higher_pos++ ] = (char) *lower_pos++; - } - - /* sets upp sortorder; higer_pos character (upper and lower) is */ - /* changed to lower_pos character */ - -#ifdef MSDOS - higher_pos= (uchar *) "\217\216\231\232\220"; - lower_pos= (uchar *) "\216\217\231YE"; -#else -#if defined(HPUX10) && ASCII_BITS_USED == 8 - higher_pos= lower_pos= (uchar *) ""; /* Tecknen i r{tt ordning */ -#else -#ifdef USE_ISO_8859_1 /* As in USG5 ICL-386 */ - higher_pos= (uchar *) "\305\304\326\334\311"; - lower_pos= (uchar *) "\304\305\326YE"; -#else - higher_pos= (uchar *) "][\\~`"; /* R{tt ordning p} tecknen */ - lower_pos= (uchar *) "[\\]YE"; /* Ordning enligt ascii */ -#endif /* USE_ISO_8859_1 */ -#endif /* HPUX10 */ -#endif /* MSDOS */ - - while (*higher_pos) - { - sort_order[ *higher_pos ] = - sort_order[(uchar)to_lower[*higher_pos]] = *lower_pos; - higher_pos++; lower_pos++; - } - DBUG_VOID_RETURN; -} /* init_case_convert */ diff --git a/externals/mysql/strings/dtoa.c b/externals/mysql/strings/dtoa.c deleted file mode 100644 index 07e6dfc716..0000000000 --- a/externals/mysql/strings/dtoa.c +++ /dev/null @@ -1,2782 +0,0 @@ -/* Copyright (C) 2007 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/**************************************************************** - - This file incorporates work covered by the following copyright and - permission notice: - - The author of this software is David M. Gay. - - Copyright (c) 1991, 2000, 2001 by Lucent Technologies. - - Permission to use, copy, modify, and distribute this software for any - purpose without fee is hereby granted, provided that this entire notice - is included in all copies of any software which is or includes a copy - or modification of this software and in all copies of the supporting - documentation for such software. - - THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY - REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - - ***************************************************************/ - -#include /* for EOVERFLOW on Windows */ -#include -#include /* for memcpy and NOT_FIXED_DEC */ - -/** - Appears to suffice to not call malloc() in most cases. - @todo - see if it is possible to get rid of malloc(). - this constant is sufficient to avoid malloc() on all inputs I have tried. -*/ -#define DTOA_BUFF_SIZE (420 * sizeof(void *)) - -/* Magic value returned by dtoa() to indicate overflow */ -#define DTOA_OVERFLOW 9999 - -static double my_strtod_int(const char *, char **, int *, char *, size_t); -static char *dtoa(double, int, int, int *, int *, char **, char *, size_t); -static void dtoa_free(char *, char *, size_t); - -/** - @brief - Converts a given floating point number to a zero-terminated string - representation using the 'f' format. - - @details - This function is a wrapper around dtoa() to do the same as - sprintf(to, "%-.*f", precision, x), though the conversion is usually more - precise. The only difference is in handling [-,+]infinity and nan values, - in which case we print '0\0' to the output string and indicate an overflow. - - @param x the input floating point number. - @param precision the number of digits after the decimal point. - All properties of sprintf() apply: - - if the number of significant digits after the decimal - point is less than precision, the resulting string is - right-padded with zeros - - if the precision is 0, no decimal point appears - - if a decimal point appears, at least one digit appears - before it - @param to pointer to the output buffer. The longest string which - my_fcvt() can return is FLOATING_POINT_BUFFER bytes - (including the terminating '\0'). - @param error if not NULL, points to a location where the status of - conversion is stored upon return. - FALSE successful conversion - TRUE the input number is [-,+]infinity or nan. - The output string in this case is always '0'. - @return number of written characters (excluding terminating '\0') -*/ - -size_t my_fcvt(double x, int precision, char *to, my_bool *error) -{ - int decpt, sign, len, i; - char *res, *src, *end, *dst= to; - char buf[DTOA_BUFF_SIZE]; - DBUG_ASSERT(precision >= 0 && precision < NOT_FIXED_DEC && to != NULL); - - res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf)); - - if (decpt == DTOA_OVERFLOW) - { - dtoa_free(res, buf, sizeof(buf)); - *to++= '0'; - *to= '\0'; - if (error != NULL) - *error= TRUE; - return 1; - } - - src= res; - len= end - src; - - if (sign) - *dst++= '-'; - - if (decpt <= 0) - { - *dst++= '0'; - *dst++= '.'; - for (i= decpt; i < 0; i++) - *dst++= '0'; - } - - for (i= 1; i <= len; i++) - { - *dst++= *src++; - if (i == decpt && i < len) - *dst++= '.'; - } - while (i++ <= decpt) - *dst++= '0'; - - if (precision > 0) - { - if (len <= decpt) - *dst++= '.'; - - for (i= precision - max(0, (len - decpt)); i > 0; i--) - *dst++= '0'; - } - - *dst= '\0'; - if (error != NULL) - *error= FALSE; - - dtoa_free(res, buf, sizeof(buf)); - - return dst - to; -} - -/** - @brief - Converts a given floating point number to a zero-terminated string - representation with a given field width using the 'e' format - (aka scientific notation) or the 'f' one. - - @details - The format is chosen automatically to provide the most number of significant - digits (and thus, precision) with a given field width. In many cases, the - result is similar to that of sprintf(to, "%g", x) with a few notable - differences: - - the conversion is usually more precise than C library functions. - - there is no 'precision' argument. instead, we specify the number of - characters available for conversion (i.e. a field width). - - the result never exceeds the specified field width. If the field is too - short to contain even a rounded decimal representation, my_gcvt() - indicates overflow and truncates the output string to the specified width. - - float-type arguments are handled differently than double ones. For a - float input number (i.e. when the 'type' argument is MY_GCVT_ARG_FLOAT) - we deliberately limit the precision of conversion by FLT_DIG digits to - avoid garbage past the significant digits. - - unlike sprintf(), in cases where the 'e' format is preferred, we don't - zero-pad the exponent to save space for significant digits. The '+' sign - for a positive exponent does not appear for the same reason. - - @param x the input floating point number. - @param type is either MY_GCVT_ARG_FLOAT or MY_GCVT_ARG_DOUBLE. - Specifies the type of the input number (see notes above). - @param width field width in characters. The minimal field width to - hold any number representation (albeit rounded) is 7 - characters ("-Ne-NNN"). - @param to pointer to the output buffer. The result is always - zero-terminated, and the longest returned string is thus - 'width + 1' bytes. - @param error if not NULL, points to a location where the status of - conversion is stored upon return. - FALSE successful conversion - TRUE the input number is [-,+]infinity or nan. - The output string in this case is always '0'. - @return number of written characters (excluding terminating '\0') - - @todo - Check if it is possible and makes sense to do our own rounding on top of - dtoa() instead of calling dtoa() twice in (rare) cases when the resulting - string representation does not fit in the specified field width and we want - to re-round the input number with fewer significant digits. Examples: - - my_gcvt(-9e-3, ..., 4, ...); - my_gcvt(-9e-3, ..., 2, ...); - my_gcvt(1.87e-3, ..., 4, ...); - my_gcvt(55, ..., 1, ...); - - We do our best to minimize such cases by: - - - passing to dtoa() the field width as the number of significant digits - - - removing the sign of the number early (and decreasing the width before - passing it to dtoa()) - - - choosing the proper format to preserve the most number of significant - digits. -*/ - -size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to, - my_bool *error) -{ - int decpt, sign, len, exp_len; - char *res, *src, *end, *dst= to, *dend= dst + width; - char buf[DTOA_BUFF_SIZE]; - my_bool have_space, force_e_format; - DBUG_ASSERT(width > 0 && to != NULL); - - /* We want to remove '-' from equations early */ - if (x < 0.) - width--; - - res= dtoa(x, 4, type == MY_GCVT_ARG_DOUBLE ? width : min(width, FLT_DIG), - &decpt, &sign, &end, buf, sizeof(buf)); - if (decpt == DTOA_OVERFLOW) - { - dtoa_free(res, buf, sizeof(buf)); - *to++= '0'; - *to= '\0'; - if (error != NULL) - *error= TRUE; - return 1; - } - - if (error != NULL) - *error= FALSE; - - src= res; - len= end - res; - - /* - Number of digits in the exponent from the 'e' conversion. - The sign of the exponent is taken into account separetely, we don't need - to count it here. - */ - exp_len= 1 + (decpt >= 101 || decpt <= -99) + (decpt >= 11 || decpt <= -9); - - /* - Do we have enough space for all digits in the 'f' format? - Let 'len' be the number of significant digits returned by dtoa, - and F be the length of the resulting decimal representation. - Consider the following cases: - 1. decpt <= 0, i.e. we have "0.NNN" => F = len - decpt + 2 - 2. 0 < decpt < len, i.e. we have "NNN.NNN" => F = len + 1 - 3. len <= decpt, i.e. we have "NNN00" => F = decpt - */ - have_space= (decpt <= 0 ? len - decpt + 2 : - decpt > 0 && decpt < len ? len + 1 : - decpt) <= width; - /* - The following is true when no significant digits can be placed with the - specified field width using the 'f' format, and the 'e' format - will not be truncated. - */ - force_e_format= (decpt <= 0 && width <= 2 - decpt && width >= 3 + exp_len); - /* - Assume that we don't have enough space to place all significant digits in - the 'f' format. We have to choose between the 'e' format and the 'f' one - to keep as many significant digits as possible. - Let E and F be the lengths of decimal representaion in the 'e' and 'f' - formats, respectively. We want to use the 'f' format if, and only if F <= E. - Consider the following cases: - 1. decpt <= 0. - F = len - decpt + 2 (see above) - E = len + (len > 1) + 1 + 1 (decpt <= -99) + (decpt <= -9) + 1 - ("N.NNe-MMM") - (F <= E) <=> (len == 1 && decpt >= -1) || (len > 1 && decpt >= -2) - We also need to ensure that if the 'f' format is chosen, - the field width allows us to place at least one significant digit - (i.e. width > 2 - decpt). If not, we prefer the 'e' format. - 2. 0 < decpt < len - F = len + 1 (see above) - E = len + 1 + 1 + ... ("N.NNeMMM") - F is always less than E. - 3. len <= decpt <= width - In this case we have enough space to represent the number in the 'f' - format, so we prefer it with some exceptions. - 4. width < decpt - The number cannot be represented in the 'f' format at all, always use - the 'e' 'one. - */ - if ((have_space || - /* - Not enough space, let's see if the 'f' format provides the most number - of significant digits. - */ - ((decpt <= width && (decpt >= -1 || (decpt == -2 && - (len > 1 || !force_e_format)))) && - !force_e_format)) && - - /* - Use the 'e' format in some cases even if we have enough space for the - 'f' one. See comment for MAX_DECPT_FOR_F_FORMAT. - */ - (!have_space || (decpt >= -MAX_DECPT_FOR_F_FORMAT + 1 && - (decpt <= MAX_DECPT_FOR_F_FORMAT || len > decpt)))) - { - /* 'f' format */ - int i; - - width-= (decpt < len) + (decpt <= 0 ? 1 - decpt : 0); - - /* Do we have to truncate any digits? */ - if (width < len) - { - if (width < decpt) - { - if (error != NULL) - *error= TRUE; - width= decpt; - } - - /* - We want to truncate (len - width) least significant digits after the - decimal point. For this we are calling dtoa with mode=5, passing the - number of significant digits = (len-decpt) - (len-width) = width-decpt - */ - dtoa_free(res, buf, sizeof(buf)); - res= dtoa(x, 5, width - decpt, &decpt, &sign, &end, buf, sizeof(buf)); - src= res; - len= end - res; - } - - if (len == 0) - { - /* Underflow. Just print '0' and exit */ - *dst++= '0'; - goto end; - } - - /* - At this point we are sure we have enough space to put all digits - returned by dtoa - */ - if (sign && dst < dend) - *dst++= '-'; - if (decpt <= 0) - { - if (dst < dend) - *dst++= '0'; - if (len > 0 && dst < dend) - *dst++= '.'; - for (; decpt < 0 && dst < dend; decpt++) - *dst++= '0'; - } - - for (i= 1; i <= len && dst < dend; i++) - { - *dst++= *src++; - if (i == decpt && i < len && dst < dend) - *dst++= '.'; - } - while (i++ <= decpt && dst < dend) - *dst++= '0'; - } - else - { - /* 'e' format */ - int decpt_sign= 0; - - if (--decpt < 0) - { - decpt= -decpt; - width--; - decpt_sign= 1; - } - width-= 1 + exp_len; /* eNNN */ - - if (len > 1) - width--; - - if (width <= 0) - { - /* Overflow */ - if (error != NULL) - *error= TRUE; - width= 0; - } - - /* Do we have to truncate any digits? */ - if (width < len) - { - /* Yes, re-convert with a smaller width */ - dtoa_free(res, buf, sizeof(buf)); - res= dtoa(x, 4, width, &decpt, &sign, &end, buf, sizeof(buf)); - src= res; - len= end - res; - if (--decpt < 0) - decpt= -decpt; - } - /* - At this point we are sure we have enough space to put all digits - returned by dtoa - */ - if (sign && dst < dend) - *dst++= '-'; - if (dst < dend) - *dst++= *src++; - if (len > 1 && dst < dend) - { - *dst++= '.'; - while (src < end && dst < dend) - *dst++= *src++; - } - if (dst < dend) - *dst++= 'e'; - if (decpt_sign && dst < dend) - *dst++= '-'; - - if (decpt >= 100 && dst < dend) - { - *dst++= decpt / 100 + '0'; - decpt%= 100; - if (dst < dend) - *dst++= decpt / 10 + '0'; - } - else if (decpt >= 10 && dst < dend) - *dst++= decpt / 10 + '0'; - if (dst < dend) - *dst++= decpt % 10 + '0'; - - } - -end: - dtoa_free(res, buf, sizeof(buf)); - *dst= '\0'; - - return dst - to; -} - -/** - @brief - Converts string to double (string does not have to be zero-terminated) - - @details - This is a wrapper around dtoa's version of strtod(). - - @param str input string - @param end address of a pointer to the first character after the input - string. Upon return the pointer is set to point to the first - rejected character. - @param error Upon return is set to EOVERFLOW in case of underflow or - overflow. - - @return The resulting double value. In case of underflow, 0.0 is - returned. In case overflow, signed DBL_MAX is returned. -*/ - -double my_strtod(const char *str, char **end, int *error) -{ - char buf[DTOA_BUFF_SIZE]; - double res; - DBUG_ASSERT(str != NULL && end != NULL && *end != NULL && error != NULL); - - res= my_strtod_int(str, end, error, buf, sizeof(buf)); - return (*error == 0) ? res : (res < 0 ? -DBL_MAX : DBL_MAX); -} - - -double my_atof(const char *nptr) -{ - int error; - const char *end= nptr+65535; /* Should be enough */ - return (my_strtod(nptr, (char**) &end, &error)); -} - - -/**************************************************************** - * - * The author of this software is David M. Gay. - * - * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - ***************************************************************/ -/* Please send bug reports to David M. Gay (dmg at acm dot org, - * with " at " changed at "@" and " dot " changed to "."). */ - -/* - Original copy of the software is located at http://www.netlib.org/fp/dtoa.c - It was adjusted to serve MySQL server needs: - * strtod() was modified to not expect a zero-terminated string. - It now honors 'se' (end of string) argument as the input parameter, - not just as the output one. - * in dtoa(), in case of overflow/underflow/NaN result string now contains "0"; - decpt is set to DTOA_OVERFLOW to indicate overflow. - * support for VAX, IBM mainframe and 16-bit hardware removed - * we always assume that 64-bit integer type is available - * support for Kernigan-Ritchie style headers (pre-ANSI compilers) - removed - * all gcc warnings ironed out - * we always assume multithreaded environment, so we had to change - memory allocation procedures to use stack in most cases; - malloc is used as the last resort. - * pow5mult rewritten to use pre-calculated pow5 list instead of - the one generated on the fly. -*/ - - -/* - On a machine with IEEE extended-precision registers, it is - necessary to specify double-precision (53-bit) rounding precision - before invoking strtod or dtoa. If the machine uses (the equivalent - of) Intel 80x87 arithmetic, the call - _control87(PC_53, MCW_PC); - does this with many compilers. Whether this or another call is - appropriate depends on the compiler; for this to work, it may be - necessary to #include "float.h" or another system-dependent header - file. -*/ - -/* - #define Honor_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3 - and dtoa should round accordingly. - #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3 - and Honor_FLT_ROUNDS is not #defined. - - TODO: check if we can get rid of the above two -*/ - -typedef int32 Long; -typedef uint32 ULong; -typedef int64 LLong; -typedef uint64 ULLong; - -typedef union { double d; ULong L[2]; } U; - -#if defined(WORDS_BIGENDIAN) || (defined(__FLOAT_WORD_ORDER) && \ - (__FLOAT_WORD_ORDER == __BIG_ENDIAN)) -#define word0(x) ((U*)&x)->L[0] -#define word1(x) ((U*)&x)->L[1] -#else -#define word0(x) ((U*)&x)->L[1] -#define word1(x) ((U*)&x)->L[0] -#endif - -#define dval(x) ((U*)&x)->d - -/* #define P DBL_MANT_DIG */ -/* Ten_pmax= floor(P*log(2)/log(5)) */ -/* Bletch= (highest power of 2 < DBL_MAX_10_EXP) / 16 */ -/* Quick_max= floor((P-1)*log(FLT_RADIX)/log(10) - 1) */ -/* Int_max= floor(P*log(FLT_RADIX)/log(10) - 1) */ - -#define Exp_shift 20 -#define Exp_shift1 20 -#define Exp_msk1 0x100000 -#define Exp_mask 0x7ff00000 -#define P 53 -#define Bias 1023 -#define Emin (-1022) -#define Exp_1 0x3ff00000 -#define Exp_11 0x3ff00000 -#define Ebits 11 -#define Frac_mask 0xfffff -#define Frac_mask1 0xfffff -#define Ten_pmax 22 -#define Bletch 0x10 -#define Bndry_mask 0xfffff -#define Bndry_mask1 0xfffff -#define LSB 1 -#define Sign_bit 0x80000000 -#define Log2P 1 -#define Tiny1 1 -#define Quick_max 14 -#define Int_max 14 - -#ifndef Flt_Rounds -#ifdef FLT_ROUNDS -#define Flt_Rounds FLT_ROUNDS -#else -#define Flt_Rounds 1 -#endif -#endif /*Flt_Rounds*/ - -#ifdef Honor_FLT_ROUNDS -#define Rounding rounding -#undef Check_FLT_ROUNDS -#define Check_FLT_ROUNDS -#else -#define Rounding Flt_Rounds -#endif - -#define rounded_product(a,b) a*= b -#define rounded_quotient(a,b) a/= b - -#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) -#define Big1 0xffffffff -#define FFFFFFFF 0xffffffffUL - -/* This is tested to be enough for dtoa */ - -#define Kmax 15 - -#define Bcopy(x,y) memcpy((char *)&x->sign, (char *)&y->sign, \ - 2*sizeof(int) + y->wds*sizeof(ULong)) - -/* Arbitrary-length integer */ - -typedef struct Bigint -{ - union { - ULong *x; /* points right after this Bigint object */ - struct Bigint *next; /* to maintain free lists */ - } p; - int k; /* 2^k = maxwds */ - int maxwds; /* maximum length in 32-bit words */ - int sign; /* not zero if number is negative */ - int wds; /* current length in 32-bit words */ -} Bigint; - - -/* A simple stack-memory based allocator for Bigints */ - -typedef struct Stack_alloc -{ - char *begin; - char *free; - char *end; - /* - Having list of free blocks lets us reduce maximum required amount - of memory from ~4000 bytes to < 1680 (tested on x86). - */ - Bigint *freelist[Kmax+1]; -} Stack_alloc; - - -/* - Try to allocate object on stack, and resort to malloc if all - stack memory is used. Ensure allocated objects to be aligned by the pointer - size in order to not break the alignment rules when storing a pointer to a - Bigint. -*/ - -static Bigint *Balloc(int k, Stack_alloc *alloc) -{ - Bigint *rv; - if (k <= Kmax && alloc->freelist[k]) - { - rv= alloc->freelist[k]; - alloc->freelist[k]= rv->p.next; - } - else - { - int x, len; - - x= 1 << k; - len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP); - - if (alloc->free + len <= alloc->end) - { - rv= (Bigint*) alloc->free; - alloc->free+= len; - } - else - rv= (Bigint*) malloc(len); - - rv->k= k; - rv->maxwds= x; - } - rv->sign= rv->wds= 0; - rv->p.x= (ULong*) (rv + 1); - return rv; -} - - -/* - If object was allocated on stack, try putting it to the free - list. Otherwise call free(). -*/ - -static void Bfree(Bigint *v, Stack_alloc *alloc) -{ - char *gptr= (char*) v; /* generic pointer */ - if (gptr < alloc->begin || gptr >= alloc->end) - free(gptr); - else if (v->k <= Kmax) - { - /* - Maintain free lists only for stack objects: this way we don't - have to bother with freeing lists in the end of dtoa; - heap should not be used normally anyway. - */ - v->p.next= alloc->freelist[v->k]; - alloc->freelist[v->k]= v; - } -} - - -/* - This is to place return value of dtoa in: tries to use stack - as well, but passes by free lists management and just aligns len by - the pointer size in order to not break the alignment rules when storing a - pointer to a Bigint. -*/ - -static char *dtoa_alloc(int i, Stack_alloc *alloc) -{ - char *rv; - int aligned_size= MY_ALIGN(i, SIZEOF_CHARP); - if (alloc->free + aligned_size <= alloc->end) - { - rv= alloc->free; - alloc->free+= aligned_size; - } - else - rv= malloc(i); - return rv; -} - - -/* - dtoa_free() must be used to free values s returned by dtoa() - This is the counterpart of dtoa_alloc() -*/ - -static void dtoa_free(char *gptr, char *buf, size_t buf_size) -{ - if (gptr < buf || gptr >= buf + buf_size) - free(gptr); -} - - -/* Bigint arithmetic functions */ - -/* Multiply by m and add a */ - -static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) -{ - int i, wds; - ULong *x; - ULLong carry, y; - Bigint *b1; - - wds= b->wds; - x= b->p.x; - i= 0; - carry= a; - do - { - y= *x * (ULLong)m + carry; - carry= y >> 32; - *x++= (ULong)(y & FFFFFFFF); - } - while (++i < wds); - if (carry) - { - if (wds >= b->maxwds) - { - b1= Balloc(b->k+1, alloc); - Bcopy(b1, b); - Bfree(b, alloc); - b= b1; - } - b->p.x[wds++]= (ULong) carry; - b->wds= wds; - } - return b; -} - - -static Bigint *s2b(const char *s, int nd0, int nd, ULong y9, Stack_alloc *alloc) -{ - Bigint *b; - int i, k; - Long x, y; - - x= (nd + 8) / 9; - for (k= 0, y= 1; x > y; y <<= 1, k++) ; - b= Balloc(k, alloc); - b->p.x[0]= y9; - b->wds= 1; - - i= 9; - if (9 < nd0) - { - s+= 9; - do - b= multadd(b, 10, *s++ - '0', alloc); - while (++i < nd0); - s++; - } - else - s+= 10; - for(; i < nd; i++) - b= multadd(b, 10, *s++ - '0', alloc); - return b; -} - - -static int hi0bits(register ULong x) -{ - register int k= 0; - - if (!(x & 0xffff0000)) - { - k= 16; - x<<= 16; - } - if (!(x & 0xff000000)) - { - k+= 8; - x<<= 8; - } - if (!(x & 0xf0000000)) - { - k+= 4; - x<<= 4; - } - if (!(x & 0xc0000000)) - { - k+= 2; - x<<= 2; - } - if (!(x & 0x80000000)) - { - k++; - if (!(x & 0x40000000)) - return 32; - } - return k; -} - - -static int lo0bits(ULong *y) -{ - register int k; - register ULong x= *y; - - if (x & 7) - { - if (x & 1) - return 0; - if (x & 2) - { - *y= x >> 1; - return 1; - } - *y= x >> 2; - return 2; - } - k= 0; - if (!(x & 0xffff)) - { - k= 16; - x>>= 16; - } - if (!(x & 0xff)) - { - k+= 8; - x>>= 8; - } - if (!(x & 0xf)) - { - k+= 4; - x>>= 4; - } - if (!(x & 0x3)) - { - k+= 2; - x>>= 2; - } - if (!(x & 1)) - { - k++; - x>>= 1; - if (!x) - return 32; - } - *y= x; - return k; -} - - -/* Convert integer to Bigint number */ - -static Bigint *i2b(int i, Stack_alloc *alloc) -{ - Bigint *b; - - b= Balloc(1, alloc); - b->p.x[0]= i; - b->wds= 1; - return b; -} - - -/* Multiply two Bigint numbers */ - -static Bigint *mult(Bigint *a, Bigint *b, Stack_alloc *alloc) -{ - Bigint *c; - int k, wa, wb, wc; - ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; - ULong y; - ULLong carry, z; - - if (a->wds < b->wds) - { - c= a; - a= b; - b= c; - } - k= a->k; - wa= a->wds; - wb= b->wds; - wc= wa + wb; - if (wc > a->maxwds) - k++; - c= Balloc(k, alloc); - for (x= c->p.x, xa= x + wc; x < xa; x++) - *x= 0; - xa= a->p.x; - xae= xa + wa; - xb= b->p.x; - xbe= xb + wb; - xc0= c->p.x; - for (; xb < xbe; xc0++) - { - if ((y= *xb++)) - { - x= xa; - xc= xc0; - carry= 0; - do - { - z= *x++ * (ULLong)y + *xc + carry; - carry= z >> 32; - *xc++= (ULong) (z & FFFFFFFF); - } - while (x < xae); - *xc= (ULong) carry; - } - } - for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ; - c->wds= wc; - return c; -} - - -/* - Precalculated array of powers of 5: tested to be enough for - vasting majority of dtoa_r cases. -*/ - -static ULong powers5[]= -{ - 625UL, - - 390625UL, - - 2264035265UL, 35UL, - - 2242703233UL, 762134875UL, 1262UL, - - 3211403009UL, 1849224548UL, 3668416493UL, 3913284084UL, 1593091UL, - - 781532673UL, 64985353UL, 253049085UL, 594863151UL, 3553621484UL, - 3288652808UL, 3167596762UL, 2788392729UL, 3911132675UL, 590UL, - - 2553183233UL, 3201533787UL, 3638140786UL, 303378311UL, 1809731782UL, - 3477761648UL, 3583367183UL, 649228654UL, 2915460784UL, 487929380UL, - 1011012442UL, 1677677582UL, 3428152256UL, 1710878487UL, 1438394610UL, - 2161952759UL, 4100910556UL, 1608314830UL, 349175UL -}; - - -static Bigint p5_a[]= -{ - /* { x } - k - maxwds - sign - wds */ - { { powers5 }, 1, 1, 0, 1 }, - { { powers5 + 1 }, 1, 1, 0, 1 }, - { { powers5 + 2 }, 1, 2, 0, 2 }, - { { powers5 + 4 }, 2, 3, 0, 3 }, - { { powers5 + 7 }, 3, 5, 0, 5 }, - { { powers5 + 12 }, 4, 10, 0, 10 }, - { { powers5 + 22 }, 5, 19, 0, 19 } -}; - -#define P5A_MAX (sizeof(p5_a)/sizeof(*p5_a) - 1) - -static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc) -{ - Bigint *b1, *p5, *p51; - int i; - static int p05[3]= { 5, 25, 125 }; - - if ((i= k & 3)) - b= multadd(b, p05[i-1], 0, alloc); - - if (!(k>>= 2)) - return b; - p5= p5_a; - for (;;) - { - if (k & 1) - { - b1= mult(b, p5, alloc); - Bfree(b, alloc); - b= b1; - } - if (!(k>>= 1)) - break; - /* Calculate next power of 5 */ - if (p5 < p5_a + P5A_MAX) - ++p5; - else if (p5 == p5_a + P5A_MAX) - p5= mult(p5, p5, alloc); - else - { - p51= mult(p5, p5, alloc); - Bfree(p5, alloc); - p5= p51; - } - } - return b; -} - - -static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc) -{ - int i, k1, n, n1; - Bigint *b1; - ULong *x, *x1, *xe, z; - - n= k >> 5; - k1= b->k; - n1= n + b->wds + 1; - for (i= b->maxwds; n1 > i; i<<= 1) - k1++; - b1= Balloc(k1, alloc); - x1= b1->p.x; - for (i= 0; i < n; i++) - *x1++= 0; - x= b->p.x; - xe= x + b->wds; - if (k&= 0x1f) - { - k1= 32 - k; - z= 0; - do - { - *x1++= *x << k | z; - z= *x++ >> k1; - } - while (x < xe); - if ((*x1= z)) - ++n1; - } - else - do - *x1++= *x++; - while (x < xe); - b1->wds= n1 - 1; - Bfree(b, alloc); - return b1; -} - - -static int cmp(Bigint *a, Bigint *b) -{ - ULong *xa, *xa0, *xb, *xb0; - int i, j; - - i= a->wds; - j= b->wds; - if (i-= j) - return i; - xa0= a->p.x; - xa= xa0 + j; - xb0= b->p.x; - xb= xb0 + j; - for (;;) - { - if (*--xa != *--xb) - return *xa < *xb ? -1 : 1; - if (xa <= xa0) - break; - } - return 0; -} - - -static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc) -{ - Bigint *c; - int i, wa, wb; - ULong *xa, *xae, *xb, *xbe, *xc; - ULLong borrow, y; - - i= cmp(a,b); - if (!i) - { - c= Balloc(0, alloc); - c->wds= 1; - c->p.x[0]= 0; - return c; - } - if (i < 0) - { - c= a; - a= b; - b= c; - i= 1; - } - else - i= 0; - c= Balloc(a->k, alloc); - c->sign= i; - wa= a->wds; - xa= a->p.x; - xae= xa + wa; - wb= b->wds; - xb= b->p.x; - xbe= xb + wb; - xc= c->p.x; - borrow= 0; - do - { - y= (ULLong)*xa++ - *xb++ - borrow; - borrow= y >> 32 & (ULong)1; - *xc++= (ULong) (y & FFFFFFFF); - } - while (xb < xbe); - while (xa < xae) - { - y= *xa++ - borrow; - borrow= y >> 32 & (ULong)1; - *xc++= (ULong) (y & FFFFFFFF); - } - while (!*--xc) - wa--; - c->wds= wa; - return c; -} - - -static double ulp(double x) -{ - register Long L; - double a; - - L= (word0(x) & Exp_mask) - (P - 1)*Exp_msk1; - word0(a) = L; - word1(a) = 0; - return dval(a); -} - - -static double b2d(Bigint *a, int *e) -{ - ULong *xa, *xa0, w, y, z; - int k; - double d; -#define d0 word0(d) -#define d1 word1(d) - - xa0= a->p.x; - xa= xa0 + a->wds; - y= *--xa; - k= hi0bits(y); - *e= 32 - k; - if (k < Ebits) - { - d0= Exp_1 | y >> (Ebits - k); - w= xa > xa0 ? *--xa : 0; - d1= y << ((32-Ebits) + k) | w >> (Ebits - k); - goto ret_d; - } - z= xa > xa0 ? *--xa : 0; - if (k-= Ebits) - { - d0= Exp_1 | y << k | z >> (32 - k); - y= xa > xa0 ? *--xa : 0; - d1= z << k | y >> (32 - k); - } - else - { - d0= Exp_1 | y; - d1= z; - } - ret_d: -#undef d0 -#undef d1 - return dval(d); -} - - -static Bigint *d2b(double d, int *e, int *bits, Stack_alloc *alloc) -{ - Bigint *b; - int de, k; - ULong *x, y, z; - int i; -#define d0 word0(d) -#define d1 word1(d) - - b= Balloc(1, alloc); - x= b->p.x; - - z= d0 & Frac_mask; - d0 &= 0x7fffffff; /* clear sign bit, which we ignore */ - if ((de= (int)(d0 >> Exp_shift))) - z|= Exp_msk1; - if ((y= d1)) - { - if ((k= lo0bits(&y))) - { - x[0]= y | z << (32 - k); - z>>= k; - } - else - x[0]= y; - i= b->wds= (x[1]= z) ? 2 : 1; - } - else - { - k= lo0bits(&z); - x[0]= z; - i= b->wds= 1; - k+= 32; - } - if (de) - { - *e= de - Bias - (P-1) + k; - *bits= P - k; - } - else - { - *e= de - Bias - (P-1) + 1 + k; - *bits= 32*i - hi0bits(x[i-1]); - } - return b; -#undef d0 -#undef d1 -} - - -static double ratio(Bigint *a, Bigint *b) -{ - double da, db; - int k, ka, kb; - - dval(da)= b2d(a, &ka); - dval(db)= b2d(b, &kb); - k= ka - kb + 32*(a->wds - b->wds); - if (k > 0) - word0(da)+= k*Exp_msk1; - else - { - k= -k; - word0(db)+= k*Exp_msk1; - } - return dval(da) / dval(db); -} - -static const double tens[] = -{ - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - 1e20, 1e21, 1e22 -}; - -static const double bigtens[]= { 1e16, 1e32, 1e64, 1e128, 1e256 }; -static const double tinytens[]= -{ 1e-16, 1e-32, 1e-64, 1e-128, - 9007199254740992.*9007199254740992.e-256 /* = 2^106 * 1e-53 */ -}; -/* - The factor of 2^53 in tinytens[4] helps us avoid setting the underflow - flag unnecessarily. It leads to a song and dance at the end of strtod. -*/ -#define Scale_Bit 0x10 -#define n_bigtens 5 - -/* - strtod for IEEE--arithmetic machines. - - This strtod returns a nearest machine number to the input decimal - string (or sets errno to EOVERFLOW). Ties are broken by the IEEE round-even - rule. - - Inspired loosely by William D. Clinger's paper "How to Read Floating - Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. - - Modifications: - - 1. We only require IEEE (not IEEE double-extended). - 2. We get by with floating-point arithmetic in a case that - Clinger missed -- when we're computing d * 10^n - for a small integer d and the integer n is not too - much larger than 22 (the maximum integer k for which - we can represent 10^k exactly), we may be able to - compute (d*10^k) * 10^(e-k) with just one roundoff. - 3. Rather than a bit-at-a-time adjustment of the binary - result in the hard case, we use floating-point - arithmetic to determine the adjustment to within - one bit; only in really hard cases do we need to - compute a second residual. - 4. Because of 3., we don't need a large table of powers of 10 - for ten-to-e (just some small tables, e.g. of 10^k - for 0 <= k <= 22). -*/ - -static double my_strtod_int(const char *s00, char **se, int *error, char *buf, size_t buf_size) -{ - int scale; - int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign, - e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; - const char *s, *s0, *s1, *end = *se; - double aadj, aadj1, adj, rv, rv0; - Long L; - ULong y, z; - Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; -#ifdef SET_INEXACT - int inexact, oldinexact; -#endif -#ifdef Honor_FLT_ROUNDS - int rounding; -#endif - Stack_alloc alloc; - LINT_INIT(c); - - *error= 0; - - alloc.begin= alloc.free= buf; - alloc.end= buf + buf_size; - memset(alloc.freelist, 0, sizeof(alloc.freelist)); - - sign= nz0= nz= 0; - dval(rv)= 0.; - for (s= s00; s < end; s++) - switch (*s) { - case '-': - sign= 1; - /* no break */ - case '+': - s++; - goto break2; - case '\t': - case '\n': - case '\v': - case '\f': - case '\r': - case ' ': - continue; - default: - goto break2; - } - break2: - if (s >= end) - goto ret0; - - if (*s == '0') - { - nz0= 1; - while (++s < end && *s == '0') ; - if (s >= end) - goto ret; - } - s0= s; - y= z= 0; - for (nd= nf= 0; s < end && (c= *s) >= '0' && c <= '9'; nd++, s++) - if (nd < 9) - y= 10*y + c - '0'; - else if (nd < 16) - z= 10*z + c - '0'; - nd0= nd; - if (s < end - 1 && c == '.') - { - c= *++s; - if (!nd) - { - for (; s < end && c == '0'; c= *++s) - nz++; - if (s < end && c > '0' && c <= '9') - { - s0= s; - nf+= nz; - nz= 0; - goto have_dig; - } - goto dig_done; - } - for (; s < end && c >= '0' && c <= '9'; c = *++s) - { - have_dig: - nz++; - if (c-= '0') - { - nf+= nz; - for (i= 1; i < nz; i++) - if (nd++ < 9) - y*= 10; - else if (nd <= DBL_DIG + 1) - z*= 10; - if (nd++ < 9) - y= 10*y + c; - else if (nd <= DBL_DIG + 1) - z= 10*z + c; - nz= 0; - } - } - } - dig_done: - e= 0; - if (s < end && (c == 'e' || c == 'E')) - { - if (!nd && !nz && !nz0) - goto ret0; - s00= s; - esign= 0; - if (++s < end) - switch (c= *s) { - case '-': - esign= 1; - case '+': - c= *++s; - } - if (s < end && c >= '0' && c <= '9') - { - while (s < end && c == '0') - c= *++s; - if (s < end && c > '0' && c <= '9') { - L= c - '0'; - s1= s; - while (++s < end && (c= *s) >= '0' && c <= '9') - L= 10*L + c - '0'; - if (s - s1 > 8 || L > 19999) - /* Avoid confusion from exponents - * so large that e might overflow. - */ - e= 19999; /* safe for 16 bit ints */ - else - e= (int)L; - if (esign) - e= -e; - } - else - e= 0; - } - else - s= s00; - } - if (!nd) - { - if (!nz && !nz0) - { - ret0: - s= s00; - sign= 0; - } - goto ret; - } - e1= e -= nf; - - /* - Now we have nd0 digits, starting at s0, followed by a - decimal point, followed by nd-nd0 digits. The number we're - after is the integer represented by those digits times - 10**e - */ - - if (!nd0) - nd0= nd; - k= nd < DBL_DIG + 1 ? nd : DBL_DIG + 1; - dval(rv)= y; - if (k > 9) - { -#ifdef SET_INEXACT - if (k > DBL_DIG) - oldinexact = get_inexact(); -#endif - dval(rv)= tens[k - 9] * dval(rv) + z; - } - bd0= 0; - if (nd <= DBL_DIG -#ifndef Honor_FLT_ROUNDS - && Flt_Rounds == 1 -#endif - ) - { - if (!e) - goto ret; - if (e > 0) - { - if (e <= Ten_pmax) - { -#ifdef Honor_FLT_ROUNDS - /* round correctly FLT_ROUNDS = 2 or 3 */ - if (sign) - { - rv= -rv; - sign= 0; - } -#endif - /* rv = */ rounded_product(dval(rv), tens[e]); - goto ret; - } - i= DBL_DIG - nd; - if (e <= Ten_pmax + i) - { - /* - A fancier test would sometimes let us do - this for larger i values. - */ -#ifdef Honor_FLT_ROUNDS - /* round correctly FLT_ROUNDS = 2 or 3 */ - if (sign) - { - rv= -rv; - sign= 0; - } -#endif - e-= i; - dval(rv)*= tens[i]; - /* rv = */ rounded_product(dval(rv), tens[e]); - goto ret; - } - } -#ifndef Inaccurate_Divide - else if (e >= -Ten_pmax) - { -#ifdef Honor_FLT_ROUNDS - /* round correctly FLT_ROUNDS = 2 or 3 */ - if (sign) - { - rv= -rv; - sign= 0; - } -#endif - /* rv = */ rounded_quotient(dval(rv), tens[-e]); - goto ret; - } -#endif - } - e1+= nd - k; - -#ifdef SET_INEXACT - inexact= 1; - if (k <= DBL_DIG) - oldinexact= get_inexact(); -#endif - scale= 0; -#ifdef Honor_FLT_ROUNDS - if ((rounding= Flt_Rounds) >= 2) - { - if (sign) - rounding= rounding == 2 ? 0 : 2; - else - if (rounding != 2) - rounding= 0; - } -#endif - - /* Get starting approximation = rv * 10**e1 */ - - if (e1 > 0) - { - if ((i= e1 & 15)) - dval(rv)*= tens[i]; - if (e1&= ~15) - { - if (e1 > DBL_MAX_10_EXP) - { - ovfl: - *error= EOVERFLOW; - /* Can't trust HUGE_VAL */ -#ifdef Honor_FLT_ROUNDS - switch (rounding) - { - case 0: /* toward 0 */ - case 3: /* toward -infinity */ - word0(rv)= Big0; - word1(rv)= Big1; - break; - default: - word0(rv)= Exp_mask; - word1(rv)= 0; - } -#else /*Honor_FLT_ROUNDS*/ - word0(rv)= Exp_mask; - word1(rv)= 0; -#endif /*Honor_FLT_ROUNDS*/ -#ifdef SET_INEXACT - /* set overflow bit */ - dval(rv0)= 1e300; - dval(rv0)*= dval(rv0); -#endif - if (bd0) - goto retfree; - goto ret; - } - e1>>= 4; - for(j= 0; e1 > 1; j++, e1>>= 1) - if (e1 & 1) - dval(rv)*= bigtens[j]; - /* The last multiplication could overflow. */ - word0(rv)-= P*Exp_msk1; - dval(rv)*= bigtens[j]; - if ((z= word0(rv) & Exp_mask) > Exp_msk1 * (DBL_MAX_EXP + Bias - P)) - goto ovfl; - if (z > Exp_msk1 * (DBL_MAX_EXP + Bias - 1 - P)) - { - /* set to largest number (Can't trust DBL_MAX) */ - word0(rv)= Big0; - word1(rv)= Big1; - } - else - word0(rv)+= P*Exp_msk1; - } - } - else if (e1 < 0) - { - e1= -e1; - if ((i= e1 & 15)) - dval(rv)/= tens[i]; - if ((e1>>= 4)) - { - if (e1 >= 1 << n_bigtens) - goto undfl; - if (e1 & Scale_Bit) - scale= 2 * P; - for(j= 0; e1 > 0; j++, e1>>= 1) - if (e1 & 1) - dval(rv)*= tinytens[j]; - if (scale && (j = 2 * P + 1 - ((word0(rv) & Exp_mask) >> Exp_shift)) > 0) - { - /* scaled rv is denormal; zap j low bits */ - if (j >= 32) - { - word1(rv)= 0; - if (j >= 53) - word0(rv)= (P + 2) * Exp_msk1; - else - word0(rv)&= 0xffffffff << (j - 32); - } - else - word1(rv)&= 0xffffffff << j; - } - if (!dval(rv)) - { - undfl: - dval(rv)= 0.; - if (bd0) - goto retfree; - goto ret; - } - } - } - - /* Now the hard part -- adjusting rv to the correct value.*/ - - /* Put digits into bd: true value = bd * 10^e */ - - bd0= s2b(s0, nd0, nd, y, &alloc); - - for(;;) - { - bd= Balloc(bd0->k, &alloc); - Bcopy(bd, bd0); - bb= d2b(dval(rv), &bbe, &bbbits, &alloc); /* rv = bb * 2^bbe */ - bs= i2b(1, &alloc); - - if (e >= 0) - { - bb2= bb5= 0; - bd2= bd5= e; - } - else - { - bb2= bb5= -e; - bd2= bd5= 0; - } - if (bbe >= 0) - bb2+= bbe; - else - bd2-= bbe; - bs2= bb2; -#ifdef Honor_FLT_ROUNDS - if (rounding != 1) - bs2++; -#endif - j= bbe - scale; - i= j + bbbits - 1; /* logb(rv) */ - if (i < Emin) /* denormal */ - j+= P - Emin; - else - j= P + 1 - bbbits; - bb2+= j; - bd2+= j; - bd2+= scale; - i= bb2 < bd2 ? bb2 : bd2; - if (i > bs2) - i= bs2; - if (i > 0) - { - bb2-= i; - bd2-= i; - bs2-= i; - } - if (bb5 > 0) - { - bs= pow5mult(bs, bb5, &alloc); - bb1= mult(bs, bb, &alloc); - Bfree(bb, &alloc); - bb= bb1; - } - if (bb2 > 0) - bb= lshift(bb, bb2, &alloc); - if (bd5 > 0) - bd= pow5mult(bd, bd5, &alloc); - if (bd2 > 0) - bd= lshift(bd, bd2, &alloc); - if (bs2 > 0) - bs= lshift(bs, bs2, &alloc); - delta= diff(bb, bd, &alloc); - dsign= delta->sign; - delta->sign= 0; - i= cmp(delta, bs); -#ifdef Honor_FLT_ROUNDS - if (rounding != 1) - { - if (i < 0) - { - /* Error is less than an ulp */ - if (!delta->x[0] && delta->wds <= 1) - { - /* exact */ -#ifdef SET_INEXACT - inexact= 0; -#endif - break; - } - if (rounding) - { - if (dsign) - { - adj= 1.; - goto apply_adj; - } - } - else if (!dsign) - { - adj= -1.; - if (!word1(rv) && !(word0(rv) & Frac_mask)) - { - y= word0(rv) & Exp_mask; - if (!scale || y > 2*P*Exp_msk1) - { - delta= lshift(delta,Log2P); - if (cmp(delta, bs) <= 0) - adj= -0.5; - } - } - apply_adj: - if (scale && (y= word0(rv) & Exp_mask) <= 2 * P * Exp_msk1) - word0(adj)+= (2 * P + 1) * Exp_msk1 - y; - dval(rv)+= adj * ulp(dval(rv)); - } - break; - } - adj= ratio(delta, bs); - if (adj < 1.) - adj= 1.; - if (adj <= 0x7ffffffe) - { - /* adj = rounding ? ceil(adj) : floor(adj); */ - y= adj; - if (y != adj) - { - if (!((rounding >> 1) ^ dsign)) - y++; - adj= y; - } - } - if (scale && (y= word0(rv) & Exp_mask) <= 2 * P * Exp_msk1) - word0(adj)+= (2 * P + 1) * Exp_msk1 - y; - adj*= ulp(dval(rv)); - if (dsign) - dval(rv)+= adj; - else - dval(rv)-= adj; - goto cont; - } -#endif /*Honor_FLT_ROUNDS*/ - - if (i < 0) - { - /* - Error is less than half an ulp -- check for special case of mantissa - a power of two. - */ - if (dsign || word1(rv) || word0(rv) & Bndry_mask || - (word0(rv) & Exp_mask) <= (2 * P + 1) * Exp_msk1) - { -#ifdef SET_INEXACT - if (!delta->x[0] && delta->wds <= 1) - inexact= 0; -#endif - break; - } - if (!delta->p.x[0] && delta->wds <= 1) - { - /* exact result */ -#ifdef SET_INEXACT - inexact= 0; -#endif - break; - } - delta= lshift(delta, Log2P, &alloc); - if (cmp(delta, bs) > 0) - goto drop_down; - break; - } - if (i == 0) - { - /* exactly half-way between */ - if (dsign) - { - if ((word0(rv) & Bndry_mask1) == Bndry_mask1 && - word1(rv) == - ((scale && (y = word0(rv) & Exp_mask) <= 2 * P * Exp_msk1) ? - (0xffffffff & (0xffffffff << (2*P+1-(y>>Exp_shift)))) : - 0xffffffff)) - { - /*boundary case -- increment exponent*/ - word0(rv)= (word0(rv) & Exp_mask) + Exp_msk1; - word1(rv) = 0; - dsign = 0; - break; - } - } - else if (!(word0(rv) & Bndry_mask) && !word1(rv)) - { - drop_down: - /* boundary case -- decrement exponent */ - if (scale) - { - L= word0(rv) & Exp_mask; - if (L <= (2 *P + 1) * Exp_msk1) - { - if (L > (P + 2) * Exp_msk1) - /* round even ==> accept rv */ - break; - /* rv = smallest denormal */ - goto undfl; - } - } - L= (word0(rv) & Exp_mask) - Exp_msk1; - word0(rv)= L | Bndry_mask1; - word1(rv)= 0xffffffff; - break; - } - if (!(word1(rv) & LSB)) - break; - if (dsign) - dval(rv)+= ulp(dval(rv)); - else - { - dval(rv)-= ulp(dval(rv)); - if (!dval(rv)) - goto undfl; - } - dsign= 1 - dsign; - break; - } - if ((aadj= ratio(delta, bs)) <= 2.) - { - if (dsign) - aadj= aadj1= 1.; - else if (word1(rv) || word0(rv) & Bndry_mask) - { - if (word1(rv) == Tiny1 && !word0(rv)) - goto undfl; - aadj= 1.; - aadj1= -1.; - } - else - { - /* special case -- power of FLT_RADIX to be rounded down... */ - if (aadj < 2. / FLT_RADIX) - aadj= 1. / FLT_RADIX; - else - aadj*= 0.5; - aadj1= -aadj; - } - } - else - { - aadj*= 0.5; - aadj1= dsign ? aadj : -aadj; -#ifdef Check_FLT_ROUNDS - switch (Rounding) - { - case 2: /* towards +infinity */ - aadj1-= 0.5; - break; - case 0: /* towards 0 */ - case 3: /* towards -infinity */ - aadj1+= 0.5; - } -#else - if (Flt_Rounds == 0) - aadj1+= 0.5; -#endif /*Check_FLT_ROUNDS*/ - } - y= word0(rv) & Exp_mask; - - /* Check for overflow */ - - if (y == Exp_msk1 * (DBL_MAX_EXP + Bias - 1)) - { - dval(rv0)= dval(rv); - word0(rv)-= P * Exp_msk1; - adj= aadj1 * ulp(dval(rv)); - dval(rv)+= adj; - if ((word0(rv) & Exp_mask) >= Exp_msk1 * (DBL_MAX_EXP + Bias - P)) - { - if (word0(rv0) == Big0 && word1(rv0) == Big1) - goto ovfl; - word0(rv)= Big0; - word1(rv)= Big1; - goto cont; - } - else - word0(rv)+= P * Exp_msk1; - } - else - { - if (scale && y <= 2 * P * Exp_msk1) - { - if (aadj <= 0x7fffffff) - { - if ((z= (ULong) aadj) <= 0) - z= 1; - aadj= z; - aadj1= dsign ? aadj : -aadj; - } - word0(aadj1)+= (2 * P + 1) * Exp_msk1 - y; - } - adj = aadj1 * ulp(dval(rv)); - dval(rv) += adj; - } - z= word0(rv) & Exp_mask; -#ifndef SET_INEXACT - if (!scale) - if (y == z) - { - /* Can we stop now? */ - L= (Long)aadj; - aadj-= L; - /* The tolerances below are conservative. */ - if (dsign || word1(rv) || word0(rv) & Bndry_mask) - { - if (aadj < .4999999 || aadj > .5000001) - break; - } - else if (aadj < .4999999 / FLT_RADIX) - break; - } -#endif - cont: - Bfree(bb, &alloc); - Bfree(bd, &alloc); - Bfree(bs, &alloc); - Bfree(delta, &alloc); - } -#ifdef SET_INEXACT - if (inexact) - { - if (!oldinexact) - { - word0(rv0)= Exp_1 + (70 << Exp_shift); - word1(rv0)= 0; - dval(rv0)+= 1.; - } - } - else if (!oldinexact) - clear_inexact(); -#endif - if (scale) - { - word0(rv0)= Exp_1 - 2 * P * Exp_msk1; - word1(rv0)= 0; - dval(rv)*= dval(rv0); - } -#ifdef SET_INEXACT - if (inexact && !(word0(rv) & Exp_mask)) - { - /* set underflow bit */ - dval(rv0)= 1e-300; - dval(rv0)*= dval(rv0); - } -#endif - retfree: - Bfree(bb, &alloc); - Bfree(bd, &alloc); - Bfree(bs, &alloc); - Bfree(bd0, &alloc); - Bfree(delta, &alloc); - ret: - *se= (char *)s; - return sign ? -dval(rv) : dval(rv); -} - - -static int quorem(Bigint *b, Bigint *S) -{ - int n; - ULong *bx, *bxe, q, *sx, *sxe; - ULLong borrow, carry, y, ys; - - n= S->wds; - if (b->wds < n) - return 0; - sx= S->p.x; - sxe= sx + --n; - bx= b->p.x; - bxe= bx + n; - q= *bxe / (*sxe + 1); /* ensure q <= true quotient */ - if (q) - { - borrow= 0; - carry= 0; - do - { - ys= *sx++ * (ULLong)q + carry; - carry= ys >> 32; - y= *bx - (ys & FFFFFFFF) - borrow; - borrow= y >> 32 & (ULong)1; - *bx++= (ULong) (y & FFFFFFFF); - } - while (sx <= sxe); - if (!*bxe) - { - bx= b->p.x; - while (--bxe > bx && !*bxe) - --n; - b->wds= n; - } - } - if (cmp(b, S) >= 0) - { - q++; - borrow= 0; - carry= 0; - bx= b->p.x; - sx= S->p.x; - do - { - ys= *sx++ + carry; - carry= ys >> 32; - y= *bx - (ys & FFFFFFFF) - borrow; - borrow= y >> 32 & (ULong)1; - *bx++= (ULong) (y & FFFFFFFF); - } - while (sx <= sxe); - bx= b->p.x; - bxe= bx + n; - if (!*bxe) - { - while (--bxe > bx && !*bxe) - --n; - b->wds= n; - } - } - return q; -} - - -/* - dtoa for IEEE arithmetic (dmg): convert double to ASCII string. - - Inspired by "How to Print Floating-Point Numbers Accurately" by - Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 112-126]. - - Modifications: - 1. Rather than iterating, we use a simple numeric overestimate - to determine k= floor(log10(d)). We scale relevant - quantities using O(log2(k)) rather than O(k) multiplications. - 2. For some modes > 2 (corresponding to ecvt and fcvt), we don't - try to generate digits strictly left to right. Instead, we - compute with fewer bits and propagate the carry if necessary - when rounding the final digit up. This is often faster. - 3. Under the assumption that input will be rounded nearest, - mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22. - That is, we allow equality in stopping tests when the - round-nearest rule will give the same floating-point value - as would satisfaction of the stopping test with strict - inequality. - 4. We remove common factors of powers of 2 from relevant - quantities. - 5. When converting floating-point integers less than 1e16, - we use floating-point arithmetic rather than resorting - to multiple-precision integers. - 6. When asked to produce fewer than 15 digits, we first try - to get by with floating-point arithmetic; we resort to - multiple-precision integer arithmetic only if we cannot - guarantee that the floating-point calculation has given - the correctly rounded result. For k requested digits and - "uniformly" distributed input, the probability is - something like 10^(k-15) that we must resort to the Long - calculation. - */ - -static char *dtoa(double d, int mode, int ndigits, int *decpt, int *sign, - char **rve, char *buf, size_t buf_size) -{ - /* - Arguments ndigits, decpt, sign are similar to those - of ecvt and fcvt; trailing zeros are suppressed from - the returned string. If not null, *rve is set to point - to the end of the return value. If d is +-Infinity or NaN, - then *decpt is set to DTOA_OVERFLOW. - - mode: - 0 ==> shortest string that yields d when read in - and rounded to nearest. - 1 ==> like 0, but with Steele & White stopping rule; - e.g. with IEEE P754 arithmetic , mode 0 gives - 1e23 whereas mode 1 gives 9.999999999999999e22. - 2 ==> max(1,ndigits) significant digits. This gives a - return value similar to that of ecvt, except - that trailing zeros are suppressed. - 3 ==> through ndigits past the decimal point. This - gives a return value similar to that from fcvt, - except that trailing zeros are suppressed, and - ndigits can be negative. - 4,5 ==> similar to 2 and 3, respectively, but (in - round-nearest mode) with the tests of mode 0 to - possibly return a shorter string that rounds to d. - With IEEE arithmetic and compilation with - -DHonor_FLT_ROUNDS, modes 4 and 5 behave the same - as modes 2 and 3 when FLT_ROUNDS != 1. - 6-9 ==> Debugging modes similar to mode - 4: don't try - fast floating-point estimate (if applicable). - - Values of mode other than 0-9 are treated as mode 0. - - Sufficient space is allocated to the return value - to hold the suppressed trailing zeros. - */ - - int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, - j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, - spec_case, try_quick; - Long L; - int denorm; - ULong x; - Bigint *b, *b1, *delta, *mlo, *mhi, *S; - double d2, ds, eps; - char *s, *s0; -#ifdef Honor_FLT_ROUNDS - int rounding; -#endif - Stack_alloc alloc; - LINT_INIT(ilim); - LINT_INIT(ilim1); - - alloc.begin= alloc.free= buf; - alloc.end= buf + buf_size; - memset(alloc.freelist, 0, sizeof(alloc.freelist)); - - if (word0(d) & Sign_bit) - { - /* set sign for everything, including 0's and NaNs */ - *sign= 1; - word0(d) &= ~Sign_bit; /* clear sign bit */ - } - else - *sign= 0; - - /* If infinity, set decpt to DTOA_OVERFLOW, if 0 set it to 1 */ - if (((word0(d) & Exp_mask) == Exp_mask && (*decpt= DTOA_OVERFLOW)) || - (!dval(d) && (*decpt= 1))) - { - /* Infinity, NaN, 0 */ - char *res= (char*) dtoa_alloc(2, &alloc); - res[0]= '0'; - res[1]= '\0'; - if (rve) - *rve= res + 1; - return res; - } - -#ifdef Honor_FLT_ROUNDS - if ((rounding= Flt_Rounds) >= 2) - { - if (*sign) - rounding= rounding == 2 ? 0 : 2; - else - if (rounding != 2) - rounding= 0; - } -#endif - - b= d2b(dval(d), &be, &bbits, &alloc); - if ((i= (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)))) - { - dval(d2)= dval(d); - word0(d2) &= Frac_mask1; - word0(d2) |= Exp_11; - - /* - log(x) ~=~ log(1.5) + (x-1.5)/1.5 - log10(x) = log(x) / log(10) - ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10)) - log10(d)= (i-Bias)*log(2)/log(10) + log10(d2) - - This suggests computing an approximation k to log10(d) by - - k= (i - Bias)*0.301029995663981 - + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 ); - - We want k to be too large rather than too small. - The error in the first-order Taylor series approximation - is in our favor, so we just round up the constant enough - to compensate for any error in the multiplication of - (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077, - and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14, - adding 1e-13 to the constant term more than suffices. - Hence we adjust the constant term to 0.1760912590558. - (We could get a more accurate k by invoking log10, - but this is probably not worthwhile.) - */ - - i-= Bias; - denorm= 0; - } - else - { - /* d is denormalized */ - - i= bbits + be + (Bias + (P-1) - 1); - x= i > 32 ? word0(d) << (64 - i) | word1(d) >> (i - 32) - : word1(d) << (32 - i); - dval(d2)= x; - word0(d2)-= 31*Exp_msk1; /* adjust exponent */ - i-= (Bias + (P-1) - 1) + 1; - denorm= 1; - } - ds= (dval(d2)-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981; - k= (int)ds; - if (ds < 0. && ds != k) - k--; /* want k= floor(ds) */ - k_check= 1; - if (k >= 0 && k <= Ten_pmax) - { - if (dval(d) < tens[k]) - k--; - k_check= 0; - } - j= bbits - i - 1; - if (j >= 0) - { - b2= 0; - s2= j; - } - else - { - b2= -j; - s2= 0; - } - if (k >= 0) - { - b5= 0; - s5= k; - s2+= k; - } - else - { - b2-= k; - b5= -k; - s5= 0; - } - if (mode < 0 || mode > 9) - mode= 0; - -#ifdef Check_FLT_ROUNDS - try_quick= Rounding == 1; -#else - try_quick= 1; -#endif - - if (mode > 5) - { - mode-= 4; - try_quick= 0; - } - leftright= 1; - switch (mode) { - case 0: - case 1: - ilim= ilim1= -1; - i= 18; - ndigits= 0; - break; - case 2: - leftright= 0; - /* no break */ - case 4: - if (ndigits <= 0) - ndigits= 1; - ilim= ilim1= i= ndigits; - break; - case 3: - leftright= 0; - /* no break */ - case 5: - i= ndigits + k + 1; - ilim= i; - ilim1= i - 1; - if (i <= 0) - i= 1; - } - s= s0= dtoa_alloc(i, &alloc); - -#ifdef Honor_FLT_ROUNDS - if (mode > 1 && rounding != 1) - leftright= 0; -#endif - - if (ilim >= 0 && ilim <= Quick_max && try_quick) - { - /* Try to get by with floating-point arithmetic. */ - i= 0; - dval(d2)= dval(d); - k0= k; - ilim0= ilim; - ieps= 2; /* conservative */ - if (k > 0) - { - ds= tens[k&0xf]; - j= k >> 4; - if (j & Bletch) - { - /* prevent overflows */ - j&= Bletch - 1; - dval(d)/= bigtens[n_bigtens-1]; - ieps++; - } - for (; j; j>>= 1, i++) - { - if (j & 1) - { - ieps++; - ds*= bigtens[i]; - } - } - dval(d)/= ds; - } - else if ((j1= -k)) - { - dval(d)*= tens[j1 & 0xf]; - for (j= j1 >> 4; j; j>>= 1, i++) - { - if (j & 1) - { - ieps++; - dval(d)*= bigtens[i]; - } - } - } - if (k_check && dval(d) < 1. && ilim > 0) - { - if (ilim1 <= 0) - goto fast_failed; - ilim= ilim1; - k--; - dval(d)*= 10.; - ieps++; - } - dval(eps)= ieps*dval(d) + 7.; - word0(eps)-= (P-1)*Exp_msk1; - if (ilim == 0) - { - S= mhi= 0; - dval(d)-= 5.; - if (dval(d) > dval(eps)) - goto one_digit; - if (dval(d) < -dval(eps)) - goto no_digits; - goto fast_failed; - } - if (leftright) - { - /* Use Steele & White method of only generating digits needed. */ - dval(eps)= 0.5/tens[ilim-1] - dval(eps); - for (i= 0;;) - { - L= (Long) dval(d); - dval(d)-= L; - *s++= '0' + (int)L; - if (dval(d) < dval(eps)) - goto ret1; - if (1. - dval(d) < dval(eps)) - goto bump_up; - if (++i >= ilim) - break; - dval(eps)*= 10.; - dval(d)*= 10.; - } - } - else - { - /* Generate ilim digits, then fix them up. */ - dval(eps)*= tens[ilim-1]; - for (i= 1;; i++, dval(d)*= 10.) - { - L= (Long)(dval(d)); - if (!(dval(d)-= L)) - ilim= i; - *s++= '0' + (int)L; - if (i == ilim) - { - if (dval(d) > 0.5 + dval(eps)) - goto bump_up; - else if (dval(d) < 0.5 - dval(eps)) - { - while (*--s == '0'); - s++; - goto ret1; - } - break; - } - } - } - fast_failed: - s= s0; - dval(d)= dval(d2); - k= k0; - ilim= ilim0; - } - - /* Do we have a "small" integer? */ - - if (be >= 0 && k <= Int_max) - { - /* Yes. */ - ds= tens[k]; - if (ndigits < 0 && ilim <= 0) - { - S= mhi= 0; - if (ilim < 0 || dval(d) <= 5*ds) - goto no_digits; - goto one_digit; - } - for (i= 1;; i++, dval(d)*= 10.) - { - L= (Long)(dval(d) / ds); - dval(d)-= L*ds; -#ifdef Check_FLT_ROUNDS - /* If FLT_ROUNDS == 2, L will usually be high by 1 */ - if (dval(d) < 0) - { - L--; - dval(d)+= ds; - } -#endif - *s++= '0' + (int)L; - if (!dval(d)) - { - break; - } - if (i == ilim) - { -#ifdef Honor_FLT_ROUNDS - if (mode > 1) - { - switch (rounding) { - case 0: goto ret1; - case 2: goto bump_up; - } - } -#endif - dval(d)+= dval(d); - if (dval(d) > ds || (dval(d) == ds && L & 1)) - { -bump_up: - while (*--s == '9') - if (s == s0) - { - k++; - *s= '0'; - break; - } - ++*s++; - } - break; - } - } - goto ret1; - } - - m2= b2; - m5= b5; - mhi= mlo= 0; - if (leftright) - { - i = denorm ? be + (Bias + (P-1) - 1 + 1) : 1 + P - bbits; - b2+= i; - s2+= i; - mhi= i2b(1, &alloc); - } - if (m2 > 0 && s2 > 0) - { - i= m2 < s2 ? m2 : s2; - b2-= i; - m2-= i; - s2-= i; - } - if (b5 > 0) - { - if (leftright) - { - if (m5 > 0) - { - mhi= pow5mult(mhi, m5, &alloc); - b1= mult(mhi, b, &alloc); - Bfree(b, &alloc); - b= b1; - } - if ((j= b5 - m5)) - b= pow5mult(b, j, &alloc); - } - else - b= pow5mult(b, b5, &alloc); - } - S= i2b(1, &alloc); - if (s5 > 0) - S= pow5mult(S, s5, &alloc); - - /* Check for special case that d is a normalized power of 2. */ - - spec_case= 0; - if ((mode < 2 || leftright) -#ifdef Honor_FLT_ROUNDS - && rounding == 1 -#endif - ) - { - if (!word1(d) && !(word0(d) & Bndry_mask) && - word0(d) & (Exp_mask & ~Exp_msk1) - ) - { - /* The special case */ - b2+= Log2P; - s2+= Log2P; - spec_case= 1; - } - } - - /* - Arrange for convenient computation of quotients: - shift left if necessary so divisor has 4 leading 0 bits. - - Perhaps we should just compute leading 28 bits of S once - a nd for all and pass them and a shift to quorem, so it - can do shifts and ors to compute the numerator for q. - */ - if ((i= ((s5 ? 32 - hi0bits(S->p.x[S->wds-1]) : 1) + s2) & 0x1f)) - i= 32 - i; - if (i > 4) - { - i-= 4; - b2+= i; - m2+= i; - s2+= i; - } - else if (i < 4) - { - i+= 28; - b2+= i; - m2+= i; - s2+= i; - } - if (b2 > 0) - b= lshift(b, b2, &alloc); - if (s2 > 0) - S= lshift(S, s2, &alloc); - if (k_check) - { - if (cmp(b,S) < 0) - { - k--; - /* we botched the k estimate */ - b= multadd(b, 10, 0, &alloc); - if (leftright) - mhi= multadd(mhi, 10, 0, &alloc); - ilim= ilim1; - } - } - if (ilim <= 0 && (mode == 3 || mode == 5)) - { - if (ilim < 0 || cmp(b,S= multadd(S,5,0, &alloc)) <= 0) - { - /* no digits, fcvt style */ -no_digits: - k= -1 - ndigits; - goto ret; - } -one_digit: - *s++= '1'; - k++; - goto ret; - } - if (leftright) - { - if (m2 > 0) - mhi= lshift(mhi, m2, &alloc); - - /* - Compute mlo -- check for special case that d is a normalized power of 2. - */ - - mlo= mhi; - if (spec_case) - { - mhi= Balloc(mhi->k, &alloc); - Bcopy(mhi, mlo); - mhi= lshift(mhi, Log2P, &alloc); - } - - for (i= 1;;i++) - { - dig= quorem(b,S) + '0'; - /* Do we yet have the shortest decimal string that will round to d? */ - j= cmp(b, mlo); - delta= diff(S, mhi, &alloc); - j1= delta->sign ? 1 : cmp(b, delta); - Bfree(delta, &alloc); - if (j1 == 0 && mode != 1 && !(word1(d) & 1) -#ifdef Honor_FLT_ROUNDS - && rounding >= 1 -#endif - ) - { - if (dig == '9') - goto round_9_up; - if (j > 0) - dig++; - *s++= dig; - goto ret; - } - if (j < 0 || (j == 0 && mode != 1 && !(word1(d) & 1))) - { - if (!b->p.x[0] && b->wds <= 1) - { - goto accept_dig; - } -#ifdef Honor_FLT_ROUNDS - if (mode > 1) - switch (rounding) { - case 0: goto accept_dig; - case 2: goto keep_dig; - } -#endif /*Honor_FLT_ROUNDS*/ - if (j1 > 0) - { - b= lshift(b, 1, &alloc); - j1= cmp(b, S); - if ((j1 > 0 || (j1 == 0 && dig & 1)) - && dig++ == '9') - goto round_9_up; - } -accept_dig: - *s++= dig; - goto ret; - } - if (j1 > 0) - { -#ifdef Honor_FLT_ROUNDS - if (!rounding) - goto accept_dig; -#endif - if (dig == '9') - { /* possible if i == 1 */ -round_9_up: - *s++= '9'; - goto roundoff; - } - *s++= dig + 1; - goto ret; - } -#ifdef Honor_FLT_ROUNDS -keep_dig: -#endif - *s++= dig; - if (i == ilim) - break; - b= multadd(b, 10, 0, &alloc); - if (mlo == mhi) - mlo= mhi= multadd(mhi, 10, 0, &alloc); - else - { - mlo= multadd(mlo, 10, 0, &alloc); - mhi= multadd(mhi, 10, 0, &alloc); - } - } - } - else - for (i= 1;; i++) - { - *s++= dig= quorem(b,S) + '0'; - if (!b->p.x[0] && b->wds <= 1) - { - goto ret; - } - if (i >= ilim) - break; - b= multadd(b, 10, 0, &alloc); - } - - /* Round off last digit */ - -#ifdef Honor_FLT_ROUNDS - switch (rounding) { - case 0: goto trimzeros; - case 2: goto roundoff; - } -#endif - b= lshift(b, 1, &alloc); - j= cmp(b, S); - if (j > 0 || (j == 0 && dig & 1)) - { -roundoff: - while (*--s == '9') - if (s == s0) - { - k++; - *s++= '1'; - goto ret; - } - ++*s++; - } - else - { -#ifdef Honor_FLT_ROUNDS -trimzeros: -#endif - while (*--s == '0'); - s++; - } -ret: - Bfree(S, &alloc); - if (mhi) - { - if (mlo && mlo != mhi) - Bfree(mlo, &alloc); - Bfree(mhi, &alloc); - } -ret1: - Bfree(b, &alloc); - *s= 0; - *decpt= k + 1; - if (rve) - *rve= s; - return s0; -} diff --git a/externals/mysql/strings/dump_map.c b/externals/mysql/strings/dump_map.c deleted file mode 100644 index e2b8b7db07..0000000000 --- a/externals/mysql/strings/dump_map.c +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 2003-2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -#include -#include - -static void print_short_array(unsigned short *a, size_t width) -{ - int i; - printf("{\n"); - for (i=0; i<=0xFF; i++) - { - const char *fmt= (width==4) ? "0x%04X" : "0x%02X"; - printf(fmt,(int)a[i]); - printf("%s%s",i<0xFF?",":"",(i+1) % 8 ? "" :"\n"); - } - printf("};\n"); - -} - - - -int main(void) -{ - char str[160]; - unsigned short touni[256]; - unsigned short fromuni[65536]; - unsigned short fromstat[256]; - int i; - - bzero((void*)touni,sizeof(touni)); - bzero((void*)fromuni,sizeof(fromuni)); - bzero((void*)fromstat,sizeof(fromstat)); - - while (fgets(str,sizeof(str),stdin)) - { - unsigned int c,u; - - if ((str[0]=='#') || (2!=sscanf(str,"%x%x",&c,&u))) - continue; - if (c>0xFF || u>0xFFFF) - continue; - - touni[c]= u; - fromuni[u]= c; - } - - printf("unsigned short cs_to_uni[256]="); - print_short_array(touni, 4); - - for (i=0;i<=0xFF;i++) - { - fromstat[touni[i]>>8]++; - } - - for (i=0;i<=256;i++) - { - if (fromstat[i]) - { - printf("unsigned char pl%02X[256]=",i); - print_short_array(fromuni+i*256, 2); - } - } - - printf("unsigned short *uni_to_cs[256]={\n"); - for (i=0;i<=255;i++) - { - if (fromstat[i]) - printf("pl%02X",i); - else - printf("NULL"); - printf("%s%s",i<255?",":"",((i+1) % 8) ? "":"\n"); - } - printf("};\n"); - - return 0; -} diff --git a/externals/mysql/strings/int2str.c b/externals/mysql/strings/int2str.c deleted file mode 100644 index fba98aac3f..0000000000 --- a/externals/mysql/strings/int2str.c +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "m_string.h" - -/* - _dig_vec arrays are public because they are used in several outer places. -*/ -char NEAR _dig_vec_upper[] = - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; -char NEAR _dig_vec_lower[] = - "0123456789abcdefghijklmnopqrstuvwxyz"; - - -/* - Convert integer to its string representation in given scale of notation. - - SYNOPSIS - int2str() - val - value to convert - dst - points to buffer where string representation should be stored - radix - radix of scale of notation - upcase - set to 1 if we should use upper-case digits - - DESCRIPTION - Converts the (long) integer value to its character form and moves it to - the destination buffer followed by a terminating NUL. - If radix is -2..-36, val is taken to be SIGNED, if radix is 2..36, val is - taken to be UNSIGNED. That is, val is signed if and only if radix is. - All other radixes treated as bad and nothing will be changed in this case. - - For conversion to decimal representation (radix is -10 or 10) one can use - optimized int10_to_str() function. - - RETURN VALUE - Pointer to ending NUL character or NullS if radix is bad. -*/ - -char * -int2str(register long int val, register char *dst, register int radix, - int upcase) -{ - char buffer[65]; - register char *p; - long int new_val; - char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower; - ulong uval= (ulong) val; - - if (radix < 0) - { - if (radix < -36 || radix > -2) - return NullS; - if (val < 0) - { - *dst++ = '-'; - /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ - uval = (ulong)0 - uval; - } - radix = -radix; - } - else if (radix > 36 || radix < 2) - return NullS; - - /* - The slightly contorted code which follows is due to the fact that - few machines directly support unsigned long / and %. Certainly - the VAX C compiler generates a subroutine call. In the interests - of efficiency (hollow laugh) I let this happen for the first digit - only; after that "val" will be in range so that signed integer - division will do. Sorry 'bout that. CHECK THE CODE PRODUCED BY - YOUR C COMPILER. The first % and / should be unsigned, the second - % and / signed, but C compilers tend to be extraordinarily - sensitive to minor details of style. This works on a VAX, that's - all I claim for it. - */ - p = &buffer[sizeof(buffer)-1]; - *p = '\0'; - new_val= uval / (ulong) radix; - *--p = dig_vec[(uchar) (uval- (ulong) new_val*(ulong) radix)]; - val = new_val; -#ifdef HAVE_LDIV - while (val != 0) - { - ldiv_t res; - res=ldiv(val,radix); - *--p = dig_vec[res.rem]; - val= res.quot; - } -#else - while (val != 0) - { - new_val=val/radix; - *--p = dig_vec[(uchar) (val-new_val*radix)]; - val= new_val; - } -#endif - while ((*dst++ = *p++) != 0) ; - return dst-1; -} - - -/* - Converts integer to its string representation in decimal notation. - - SYNOPSIS - int10_to_str() - val - value to convert - dst - points to buffer where string representation should be stored - radix - flag that shows whenever val should be taken as signed or not - - DESCRIPTION - This is version of int2str() function which is optimized for normal case - of radix 10/-10. It takes only sign of radix parameter into account and - not its absolute value. - - RETURN VALUE - Pointer to ending NUL character. -*/ - -char *int10_to_str(long int val,char *dst,int radix) -{ - char buffer[65]; - register char *p; - long int new_val; - unsigned long int uval = (unsigned long int) val; - - if (radix < 0) /* -10 */ - { - if (val < 0) - { - *dst++ = '-'; - /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ - uval = (unsigned long int)0 - uval; - } - } - - p = &buffer[sizeof(buffer)-1]; - *p = '\0'; - new_val= (long) (uval / 10); - *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); - val = new_val; - - while (val != 0) - { - new_val=val/10; - *--p = '0' + (char) (val-new_val*10); - val= new_val; - } - while ((*dst++ = *p++) != 0) ; - return dst-1; -} diff --git a/externals/mysql/strings/is_prefix.c b/externals/mysql/strings/is_prefix.c deleted file mode 100644 index 451cd468b7..0000000000 --- a/externals/mysql/strings/is_prefix.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : is_prefix.c - Author : Michael Widenius - Defines: is_prefix() - - is_prefix(s, t) returns 1 if s starts with t. - A empty t is allways a prefix. -*/ - -#include -#include "m_string.h" - -int is_prefix(register const char *s, register const char *t) -{ - while (*t) - if (*s++ != *t++) return 0; - return 1; /* WRONG */ -} diff --git a/externals/mysql/strings/latin2.def b/externals/mysql/strings/latin2.def deleted file mode 100644 index 159d01894f..0000000000 --- a/externals/mysql/strings/latin2.def +++ /dev/null @@ -1,478 +0,0 @@ -; Character code definition file for latin2 languages (for use with cset) -; it's written for Czech, but may be used generally; works -; minimum for Slovenian alphabet too (or at least I hope so) -; -; Written by Jaromir Dolecek -; -; Notes of defined sorting order: -; Upper/Lower case is ignored -; All characters with the accents are sorted after appropriate -; character without accent in order: -; Xacute, Xring , Xcaron, Xslash, Xcedilla, Xogonek, Xcircumflex, -; Xbreve, Xhungarumlaut, Xdieresis, Xdotaccent -; -latin2 -*** -NUL 0 C -SOH C -STX C -ETX C -EOT C -ENQ C -ACK C -BEL C -BS C -HT CS -LF CS -VT CS -FF CS -CR CS -SO C -SI C -DLE C -DC1 C -DC2 C -DC3 C -DC4 C -NAK C -SYN C -ETB C -CAN C -EM C -SUB C -ESC C -FS C -GS C -RS C -US C -/space BS -/exclam P -/quotedbl P -/numbersign P -/dollar P -/percent P -/ampersand P -/quoteright P -/parenleft P -/parenright P -/asterisk P -/plus P -/comma P -/minus P -/period P -/slash P -/zero NX -/one NX -/two NX -/three NX -/four NX -/five NX -/six NX -/seven NX -/eight NX -/nine NX -/colon P -/semicolon P -/less P -/equal P -/greater P -/question P -/at P -/A UX -/B UX -/C UX -/D UX -/E UX -/F UX -/G U -/H U -/I U -/J U -/K U -/L U -/M U -/N U -/O U -/P U -/Q U -/R U -/S U -/T U -/U U -/V U -/W U -/X U -/Y U -/Z U -/bracketleft P -/backslash P -/bracketright P -/asciicircum P -/underscore P -/quoteleft P -/a LX -/b LX -/c LX -/d LX -/e LX -/f LX -/g L -/h L -/i L -/j L -/k L -/l L -/m L -/n L -/o L -/p L -/q L -/r L -/s L -/t L -/u L -/v L -/w L -/x L -/y L -/z L -/braceleft P -/bar P -/braceright P -/tilde P -NUL_ C -SOH_ C -STX_ C -ETX_ C -EOT_ C -ENQ_ C -ACK_ C -BEL_ C -BS_ C -HT_ CS -LF_ CS -VT_ CS -FF_ CS -CR_ CS -SO_ C -SI_ C -DLE_ C -DC1_ C -DC2_ C -DC3_ C -DC4_ C -NAK_ C -SYN_ C -ETB_ C -CAN_ C -EM_ C -SUB_ C -ESC_ C -FS_ C -GS_ C -RS_ C -US_ C -/space_ SB -/Aogonek U -/breve P -/Lslash U -/currency P -/Lcaron U -/Sacute U -/dieresis P -/Scaron 169 U -/Scedilla U -/Tcaron U -/Zacute U -/hyphen P -/Zcaron U -/Zdotaccent U -/degree P -/aogonek L -/ogonek P -/lslash L -/acute P -/lcaron L -/sacute L -/caron P -/cedilla P -/scaron L -/scedilla L -/tcaron L -/zacute L -/hungarumlaut P -/zcaron L -/zdotaccent L -/Racute U -/Aacute U -/Acircumflex U -/Abreve U -/Adieresis U -/Lacute U -/Cacute U -/Ccedilla U -/Ccaron U -/Eacute U -/Eogonek U -/Edieresis U -/Ecaron U -/Iacute U -/Icircumflex U -/Dcaron U -/Eth P -/Nacute U -/Ncaron U -/Oacute U -/Ocircumflex U -/Ohungarumlaut U -/Odieresis U -/multiply P -/Rcaron U -/Uring U -/Uacute U -/Uhungarumlaut U -/Udieresis U -/Yacute U -/Tcedilla U -/germandbls P -/racute L -/aacute L -/acircumflex L -/abreve L -/adieresis L -/lacute L -/cacute L -/ccedilla L -/ccaron L -/eacute L -/eogonek L -/edieresis L -/ecaron L -/iacute L -/icircumflex L -/dcaron L -/dbar L -/nacute L -/ncaron L -/oacute L -/ocircumflex L -/ohungarumlaut L -/odieresis L -/divide P -/rcaron L -/uring L -/uacute L -/uhungarumlaut L -/udieresis L -/yacute L -/tcedilla L -/dotaccent P -*** -/A /a -/B /b -/C /c -/D /d -/E /e -/F /f -/G /g -/H /h -/I /i -/J /j -/K /k -/L /l -/M /m -/N /n -/O /o -/P /p -/Q /q -/R /r -/S /s -/T /t -/U /u -/V /v -/W /w -/X /x -/Y /y -/Z /z -/Aogonek /aogonek -/Lslash /lslash -/Lcaron /lcaron -/Sacute /sacute -/Scaron /scaron -/Scedilla /scedilla -/Tcaron /tcaron -/Zacute /zacute -/Zcaron /zcaron -/Zdotaccent /zdotaccent -/Racute /racute -/Aacute /aacute -/Acircumflex /acircumflex -/Abreve /abreve -/Adieresis /adieresis -/Lacute /lacute -/Cacute /cacute -/Ccedilla /ccedilla -/Ccaron /ccaron -/Eacute /eacute -/Eogonek /eogonek -/Edieresis /edieresis -/Ecaron /ecaron -/Iacute /iacute -/Icircumflex /icircumflex -/Dcaron /dcaron -/Nacute /nacute -/Ncaron /ncaron -/Oacute /oacute -/Ocircumflex /ocircumflex -/Ohungarumlaut /ohungarumlaut -/Odieresis /odieresis -/Rcaron /rcaron -/Uring /uring -/Uacute /uacute -/Uhungarumlaut /uhungarumlaut -/Udieresis /udieresis -/Yacute /yacute -/Tcedilla /tcedilla -*** -NUL NUL_ -SOH SOH_ -STX STX_ -ETX ETX_ -EOT EOT_ -ENQ ENQ_ -ACK ACK_ -BEL BEL_ -BS BS_ -HT HT_ -LF LF_ -VT VT_ -FF FF_ -CR CR_ -SO SO_ -SI SI_ -DLE DLE_ -DC1 DC1_ -DC2 DC2_ -DC3 DC3_ -DC4 DC4_ -NAK NAK_ -SYN SYN_ -ETB ETB_ -CAN CAN_ -EM EM_ -SUB SUB_ -ESC ESC_ -FS FS_ -GS GS_ -RS RS_ -US US_ -/space -/exclam -/quotedbl -/numbersign -/dollar -/percent -/ampersand -/quoteright -/parenleft -/parenright -/asterisk -/plus -/comma -/minus -/period -/slash -/zero -/one -/two -/three -/four -/five -/six -/seven -/eight -/nine -/colon -/semicolon -/less -/equal -/greater -/question -/at -/A /a -/Aogonek /aogonek -/Aacute /aacute -/Acircumflex /acircumflex -/Abreve /abreve -/Adieresis /adieresis -/B /b -/C /c -/Cacute /cacute -/Ccaron /ccaron -/Ccedilla /ccedilla -/D /d -/Dcaron /dcaron -/E /e -/Eacute /eacute -/Ecaron /ecaron -/Eogonek /eogonek -/Edieresis /edieresis -/F /f -/G /g -/H /h -/I /i -/Icircumflex -/icircumflex -/Iacute /iacute -/J /j -/K /k -/L /l -/Lslash /lslash -/Lcaron /lcaron -/Lacute /lacute -/M /m -/N /n -/Nacute /nacute -/Ncaron /ncaron -/O /o -/Oacute /oacute -/Ocircumflex /ocircumflex -/Ohungarumlaut /ohungarumlaut -/Odieresis /odieresis -/P /p -/Q /q -/R /r -/Racute /racute -/Rcaron /rcaron -/S /s -/Sacute /sacute -/Scaron /scaron -/Scedilla /scedilla -/T /t -/Tcaron /tcaron -/Tcedilla /tcedilla -/U /u -/Uacute /uacute -/Uring /uring -/Uhungarumlaut /uhungarumlaut -/Udieresis /udieresis -/V /v -/W /w -/X /x -/Y /y -/Yacute /yacute -/Z /z -/Zacute /zacute -/Zcaron /zcaron -/Zdotaccent /zdotaccent -/bracketleft -/backslash -/bracketright -/asciicircum -/underscore -/quoteleft -/braceleft -/bar -/braceright -/tilde -*** diff --git a/externals/mysql/strings/llstr.c b/externals/mysql/strings/llstr.c deleted file mode 100644 index 643cf36a31..0000000000 --- a/externals/mysql/strings/llstr.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Defines: llstr(); - - llstr(value, buff); - - This function saves a longlong value in a buffer and returns the pointer to - the buffer. This is useful when trying to portable print longlong - variables with printf() as there is no usable printf() standard one can use. -*/ - - -#include -#include "m_string.h" - -char *llstr(longlong value,char *buff) -{ - longlong10_to_str(value,buff,-10); - return buff; -} - -char *ullstr(longlong value,char *buff) -{ - longlong10_to_str(value,buff,10); - return buff; -} diff --git a/externals/mysql/strings/longlong2str.c b/externals/mysql/strings/longlong2str.c deleted file mode 100644 index 641ae0955d..0000000000 --- a/externals/mysql/strings/longlong2str.c +++ /dev/null @@ -1,143 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Defines: longlong2str(); - - longlong2str(dst, radix, val) - converts the (longlong) integer "val" to character form and moves it to - the destination string "dst" followed by a terminating NUL. The - result is normally a pointer to this NUL character, but if the radix - is dud the result will be NullS and nothing will be changed. - - If radix is -2..-36, val is taken to be SIGNED. - If radix is 2.. 36, val is taken to be UNSIGNED. - That is, val is signed if and only if radix is. You will normally - use radix -10 only through itoa and ltoa, for radix 2, 8, or 16 - unsigned is what you generally want. - - _dig_vec is public just in case someone has a use for it. - The definitions of itoa and ltoa are actually macros in m_string.h, - but this is where the code is. - - Note: The standard itoa() returns a pointer to the argument, when int2str - returns the pointer to the end-null. - itoa assumes that 10 -base numbers are allways signed and other arn't. -*/ - -#include -#include "m_string.h" - -#ifndef ll2str - -/* - This assumes that longlong multiplication is faster than longlong division. -*/ - -char *ll2str(longlong val,char *dst,int radix, int upcase) -{ - char buffer[65]; - register char *p; - long long_val; - char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower; - ulonglong uval= (ulonglong) val; - - if (radix < 0) - { - if (radix < -36 || radix > -2) return (char*) 0; - if (val < 0) { - *dst++ = '-'; - /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ - uval = (ulonglong)0 - uval; - } - radix = -radix; - } - else - { - if (radix > 36 || radix < 2) return (char*) 0; - } - if (uval == 0) - { - *dst++='0'; - *dst='\0'; - return dst; - } - p = &buffer[sizeof(buffer)-1]; - *p = '\0'; - - while (uval > (ulonglong) LONG_MAX) - { - ulonglong quo= uval/(uint) radix; - uint rem= (uint) (uval- quo* (uint) radix); - *--p= dig_vec[rem]; - uval= quo; - } - long_val= (long) uval; - while (long_val != 0) - { - long quo= long_val/radix; - *--p= dig_vec[(uchar) (long_val - quo*radix)]; - long_val= quo; - } - while ((*dst++ = *p++) != 0) ; - return dst-1; -} -#endif - -#ifndef longlong10_to_str -char *longlong10_to_str(longlong val,char *dst,int radix) -{ - char buffer[65]; - register char *p; - long long_val; - ulonglong uval= (ulonglong) val; - - if (radix < 0) - { - if (val < 0) - { - *dst++ = '-'; - /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ - uval = (ulonglong)0 - uval; - } - } - - if (uval == 0) - { - *dst++='0'; - *dst='\0'; - return dst; - } - p = &buffer[sizeof(buffer)-1]; - *p = '\0'; - - while (uval > (ulonglong) LONG_MAX) - { - ulonglong quo= uval/(uint) 10; - uint rem= (uint) (uval- quo* (uint) 10); - *--p = _dig_vec_upper[rem]; - uval= quo; - } - long_val= (long) uval; - while (long_val != 0) - { - long quo= long_val/10; - *--p = _dig_vec_upper[(uchar) (long_val - quo*10)]; - long_val= quo; - } - while ((*dst++ = *p++) != 0) ; - return dst-1; -} -#endif diff --git a/externals/mysql/strings/longlong2str_asm.c b/externals/mysql/strings/longlong2str_asm.c deleted file mode 100644 index 9a2b86b570..0000000000 --- a/externals/mysql/strings/longlong2str_asm.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Wrapper for longlong2str.s - - We need this because the assembler code can't access the local variable - _dig_vector in a portable manner. -*/ - -#include -#include "m_string.h" - -extern char *longlong2str_with_dig_vector(longlong val,char *dst,int radix, - const char *dig_vector); - -char *ll2str(longlong val,char *dst,int radix, int upcase) -{ - return longlong2str_with_dig_vector(val, dst, radix, - upcase?_dig_vec_upper:_dig_vec_lower); -} diff --git a/externals/mysql/strings/my_strchr.c b/externals/mysql/strings/my_strchr.c deleted file mode 100644 index 6724bf39ff..0000000000 --- a/externals/mysql/strings/my_strchr.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2005 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - my_strchr(cs, str, end, c) returns a pointer to the first place in - str where c (1-byte character) occurs, or NULL if c does not occur - in str. This function is multi-byte safe. - TODO: should be moved to CHARSET_INFO if it's going to be called - frequently. -*/ - -#include -#include "m_string.h" -#include "m_ctype.h" - - -char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end, - pchar c) -{ - uint mbl; - while (str < end) - { - mbl= my_mbcharlen(cs, *(uchar *)str); - if (mbl < 2) - { - if (*str == c) - return((char *)str); - str++; - } - else - str+= mbl; - } - return(0); -} - diff --git a/externals/mysql/strings/my_strtoll10.c b/externals/mysql/strings/my_strtoll10.c deleted file mode 100644 index 8dba51e949..0000000000 --- a/externals/mysql/strings/my_strtoll10.c +++ /dev/null @@ -1,247 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include /* Needed for MY_ERRNO_ERANGE */ -#include - -#undef ULONGLONG_MAX -/* - Needed under MetroWerks Compiler, since MetroWerks compiler does not - properly handle a constant expression containing a mod operator -*/ -#if defined(__NETWARE__) && defined(__MWERKS__) -static ulonglong ulonglong_max= ~(ulonglong) 0; -#define ULONGLONG_MAX ulonglong_max -#else -#define ULONGLONG_MAX (~(ulonglong) 0) -#endif /* __NETWARE__ && __MWERKS__ */ -#define MAX_NEGATIVE_NUMBER ((ulonglong) 0x8000000000000000LL) -#define INIT_CNT 9 -#define LFACTOR 1000000000ULL -#define LFACTOR1 10000000000ULL -#define LFACTOR2 100000000000ULL - -static unsigned long lfactor[9]= -{ - 1L, 10L, 100L, 1000L, 10000L, 100000L, 1000000L, 10000000L, 100000000L -}; - -/* - Convert a string to an to unsigned long long integer value - - SYNOPSYS - my_strtoll10() - nptr in pointer to the string to be converted - endptr in/out pointer to the end of the string/ - pointer to the stop character - error out returned error code - - DESCRIPTION - This function takes the decimal representation of integer number - from string nptr and converts it to an signed or unsigned - long long integer value. - Space characters and tab are ignored. - A sign character might precede the digit characters. The number - may have any number of pre-zero digits. - - The function stops reading the string nptr at the first character - that is not a decimal digit. If endptr is not NULL then the function - will not read characters after *endptr. - - RETURN VALUES - Value of string as a signed/unsigned longlong integer - - if no error and endptr != NULL, it will be set to point at the character - after the number - - The error parameter contains information how things went: - -1 Number was an ok negative number - 0 ok - ERANGE If the the value of the converted number exceeded the - maximum negative/unsigned long long integer. - In this case the return value is ~0 if value was - positive and LONGLONG_MIN if value was negative. - EDOM If the string didn't contain any digits. In this case - the return value is 0. - - If endptr is not NULL the function will store the end pointer to - the stop character here. -*/ - - -longlong my_strtoll10(const char *nptr, char **endptr, int *error) -{ - const char *s, *end, *start, *n_end, *true_end; - char *dummy; - uchar c; - unsigned long i, j, k; - ulonglong li; - int negative; - ulong cutoff, cutoff2, cutoff3; - - s= nptr; - /* If fixed length string */ - if (endptr) - { - end= *endptr; - while (s != end && (*s == ' ' || *s == '\t')) - s++; - if (s == end) - goto no_conv; - } - else - { - endptr= &dummy; /* Easier end test */ - while (*s == ' ' || *s == '\t') - s++; - if (!*s) - goto no_conv; - /* This number must be big to guard against a lot of pre-zeros */ - end= s+65535; /* Can't be longer than this */ - } - - /* Check for a sign. */ - negative= 0; - if (*s == '-') - { - *error= -1; /* Mark as negative number */ - negative= 1; - if (++s == end) - goto no_conv; - cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2; - cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100; - cutoff3= MAX_NEGATIVE_NUMBER % 100; - } - else - { - *error= 0; - if (*s == '+') - { - if (++s == end) - goto no_conv; - } - cutoff= ULONGLONG_MAX / LFACTOR2; - cutoff2= ULONGLONG_MAX % LFACTOR2 / 100; - cutoff3= ULONGLONG_MAX % 100; - } - - /* Handle case where we have a lot of pre-zero */ - if (*s == '0') - { - i= 0; - do - { - if (++s == end) - goto end_i; /* Return 0 */ - } - while (*s == '0'); - n_end= s+ INIT_CNT; - } - else - { - /* Read first digit to check that it's a valid number */ - if ((c= (*s-'0')) > 9) - goto no_conv; - i= c; - n_end= ++s+ INIT_CNT-1; - } - - /* Handle first 9 digits and store them in i */ - if (n_end > end) - n_end= end; - for (; s != n_end ; s++) - { - if ((c= (*s-'0')) > 9) - goto end_i; - i= i*10+c; - } - if (s == end) - goto end_i; - - /* Handle next 9 digits and store them in j */ - j= 0; - start= s; /* Used to know how much to shift i */ - n_end= true_end= s + INIT_CNT; - if (n_end > end) - n_end= end; - do - { - if ((c= (*s-'0')) > 9) - goto end_i_and_j; - j= j*10+c; - } while (++s != n_end); - if (s == end) - { - if (s != true_end) - goto end_i_and_j; - goto end3; - } - if ((c= (*s-'0')) > 9) - goto end3; - - /* Handle the next 1 or 2 digits and store them in k */ - k=c; - if (++s == end || (c= (*s-'0')) > 9) - goto end4; - k= k*10+c; - *endptr= (char*) ++s; - - /* number string should have ended here */ - if (s != end && (c= (*s-'0')) <= 9) - goto overflow; - - /* Check that we didn't get an overflow with the last digit */ - if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) && - k > cutoff3))) - goto overflow; - li=i*LFACTOR2+ (ulonglong) j*100 + k; - return (longlong) li; - -overflow: /* *endptr is set here */ - *error= MY_ERRNO_ERANGE; - return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX; - -end_i: - *endptr= (char*) s; - return (negative ? ((longlong) -(long) i) : (longlong) i); - -end_i_and_j: - li= (ulonglong) i * lfactor[(uint) (s-start)] + j; - *endptr= (char*) s; - return (negative ? -((longlong) li) : (longlong) li); - -end3: - li=(ulonglong) i*LFACTOR+ (ulonglong) j; - *endptr= (char*) s; - return (negative ? -((longlong) li) : (longlong) li); - -end4: - li=(ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k; - *endptr= (char*) s; - if (negative) - { - if (li > MAX_NEGATIVE_NUMBER) - goto overflow; - return -((longlong) li); - } - return (longlong) li; - -no_conv: - /* There was no number to convert. */ - *error= MY_ERRNO_EDOM; - *endptr= (char *) nptr; - return 0; -} diff --git a/externals/mysql/strings/my_vsnprintf.c b/externals/mysql/strings/my_vsnprintf.c deleted file mode 100644 index ade53252db..0000000000 --- a/externals/mysql/strings/my_vsnprintf.c +++ /dev/null @@ -1,252 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include - -/* - Limited snprintf() implementations - - exported to plugins as a service, see the detailed documentation - around my_snprintf_service_st -*/ - -size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) -{ - char *start=to, *end=to+n-1; - size_t length, width; - uint pre_zero, have_longlong; - - for (; *fmt ; fmt++) - { - if (*fmt != '%') - { - if (to == end) /* End of buffer */ - break; - *to++= *fmt; /* Copy ordinary char */ - continue; - } - fmt++; /* skip '%' */ - /* Read max fill size (only used with %d and %u) */ - if (*fmt == '-') - fmt++; - length= width= 0; - pre_zero= have_longlong= 0; - if (*fmt == '*') - { - fmt++; - length= va_arg(ap, int); - } - else - for (; my_isdigit(&my_charset_latin1, *fmt); fmt++) - { - length= length * 10 + (uint)(*fmt - '0'); - if (!length) - pre_zero= 1; /* first digit was 0 */ - } - if (*fmt == '.') - { - fmt++; - if (*fmt == '*') - { - fmt++; - width= va_arg(ap, int); - } - else - { - for (; my_isdigit(&my_charset_latin1, *fmt); fmt++) - width= width * 10 + (uint)(*fmt - '0'); - } - } - else - width= SIZE_T_MAX; - if (*fmt == 'l') - { - fmt++; - if (*fmt != 'l') - have_longlong= (sizeof(long) == sizeof(longlong)); - else - { - fmt++; - have_longlong= 1; - } - } - else if (*fmt == 'z') - { - fmt++; - have_longlong= (sizeof(size_t) == sizeof(longlong)); - } - if (*fmt == 's') /* String parameter */ - { - reg2 char *par= va_arg(ap, char *); - size_t plen, left_len= (size_t) (end - to) + 1; - if (!par) - par = (char*) "(null)"; - plen= strnlen(par, width); - if (left_len <= plen) - plen = left_len - 1; - to= strnmov(to,par,plen); - continue; - } - else if (*fmt == 'b') /* Buffer parameter */ - { - char *par = va_arg(ap, char *); - DBUG_ASSERT(to <= end); - if (to + width + 1 > end) - width= end - to - 1; /* sign doesn't matter */ - memmove(to, par, width); - to+= width; - continue; - } - else if (*fmt == 'f' || *fmt == 'g') - { - double d= va_arg(ap, double); - if (width == SIZE_T_MAX) - width= FLT_DIG; /* width not set, use default */ - else if (width >= NOT_FIXED_DEC) - width= NOT_FIXED_DEC - 1; /* max.precision for my_fcvt() */ - width= min(width, (size_t)(end-to) - 1); - - if (*fmt == 'f') - to+= my_fcvt(d, (int)width , to, NULL); - else - to+= my_gcvt(d, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL); - } - else if (*fmt == 'd' || *fmt == 'u' || *fmt == 'x' || *fmt == 'X' || - *fmt == 'p') - { - /* Integer parameter */ - longlong larg; - size_t res_length, to_length; - char *store_start= to, *store_end; - char buff[32]; - if (*fmt == 'p') - { - have_longlong= (sizeof(void *) == sizeof(longlong)); - } - - if ((to_length= (size_t) (end-to)) < 16 || length) - store_start= buff; - if (have_longlong) - larg = va_arg(ap,longlong); - else if (*fmt == 'd') - larg = va_arg(ap, int); - else - larg= va_arg(ap, uint); - if (*fmt == 'd') - store_end= longlong10_to_str(larg, store_start, -10); - else if (*fmt == 'u') - store_end= longlong10_to_str(larg, store_start, 10); - else if (*fmt == 'p') - { - store_start[0]= '0'; - store_start[1]= 'x'; - store_end= ll2str(larg, store_start + 2, 16, 0); - } - else - { - DBUG_ASSERT(*fmt == 'X' || *fmt =='x'); - store_end= ll2str(larg, store_start, 16, (*fmt == 'X')); - } - - if ((res_length= (size_t) (store_end - store_start)) > to_length) - break; /* num doesn't fit in output */ - /* If %#d syntax was used, we have to pre-zero/pre-space the string */ - if (store_start == buff) - { - length= min(length, to_length); - if (res_length < length) - { - size_t diff= (length- res_length); - bfill(to, diff, pre_zero ? '0' : ' '); - to+= diff; - } - bmove(to, store_start, res_length); - } - to+= res_length; - continue; - } - else if (*fmt == 'c') /* Character parameter */ - { - register int larg; - if (to == end) - break; - larg = va_arg(ap, int); - *to++= (char) larg; - continue; - } - - /* We come here on '%%', unknown code or too long parameter */ - if (to == end) - break; - *to++='%'; /* % used as % or unknown code */ - } - DBUG_ASSERT(to <= end); - *to='\0'; /* End of errmessage */ - return (size_t) (to - start); -} - - -size_t my_snprintf(char* to, size_t n, const char* fmt, ...) -{ - size_t result; - va_list args; - va_start(args,fmt); - result= my_vsnprintf(to, n, fmt, args); - va_end(args); - return result; -} - -#ifdef MAIN -#define OVERRUN_SENTRY 250 -static void my_printf(const char * fmt, ...) -{ - char buf[33]; - int n; - va_list ar; - va_start(ar, fmt); - buf[sizeof(buf)-1]=OVERRUN_SENTRY; - n = my_vsnprintf(buf, sizeof(buf)-1,fmt, ar); - printf(buf); - printf("n=%d, strlen=%d\n", n, strlen(buf)); - if ((uchar) buf[sizeof(buf)-1] != OVERRUN_SENTRY) - { - fprintf(stderr, "Buffer overrun\n"); - abort(); - } - va_end(ar); -} - - -int main() -{ - - my_printf("Hello\n"); - my_printf("Hello int, %d\n", 1); - my_printf("Hello string '%s'\n", "I am a string"); - my_printf("Hello hack hack hack hack hack hack hack %d\n", 1); - my_printf("Hello %d hack %d\n", 1, 4); - my_printf("Hello %d hack hack hack hack hack %d\n", 1, 4); - my_printf("Hello '%s' hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh\n", "hack"); - my_printf("Hello hhhhhhhhhhhhhh %d sssssssssssssss\n", 1); - my_printf("Hello %u\n", 1); - my_printf("Hex: %lx '%6lx'\n", 32, 65); - my_printf("conn %ld to: '%-.64s' user: '%-.32s' host:\ - `%-.64s' (%-.64s)", 1, 0,0,0,0); - return 0; -} -#endif diff --git a/externals/mysql/strings/r_strinstr.c b/externals/mysql/strings/r_strinstr.c deleted file mode 100644 index fb1e0c5a09..0000000000 --- a/externals/mysql/strings/r_strinstr.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Author : David - strintstr(src, from, pat) looks for an instance of pat in src - backwards from pos from. pat is not a regex(3) pattern, it is a literal - string which must be matched exactly. - The result 0 if the pattern was not found else it is the start char of - the pattern counted from the begining of the string. -*/ - -#include -#include "m_string.h" - -size_t r_strinstr(reg1 const char * str, size_t from, reg4 const char * search) -{ - reg2 const char *i, *j; - size_t len = strlen(search); - /* pointer to the last char of buff */ - const char * start = str + from - 1; - /* pointer to the last char of search */ - const char * search_end = search + len - 1; - - skip: - while (start >= str) /* Cant be != because the first char */ - { - if (*start-- == *search_end) - { - i = start; j = search_end - 1; - while (j >= search && start > str) - if (*i-- != *j--) - goto skip; - return (size_t) ((start - len) - str + 3); - } - } - return (0); -} diff --git a/externals/mysql/strings/str2int.c b/externals/mysql/strings/str2int.c deleted file mode 100644 index c4a4c07eef..0000000000 --- a/externals/mysql/strings/str2int.c +++ /dev/null @@ -1,201 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - str2int(src, radix, lower, upper, &val) - converts the string pointed to by src to an integer and stores it in - val. It skips leading spaces and tabs (but not newlines, formfeeds, - backspaces), then it accepts an optional sign and a sequence of digits - in the specified radix. The result should satisfy lower <= *val <= upper. - The result is a pointer to the first character after the number; - trailing spaces will NOT be skipped. - - If an error is detected, the result will be NullS, the value put - in val will be 0, and errno will be set to - EDOM if there are no digits - ERANGE if the result would overflow or otherwise fail to lie - within the specified bounds. - Check that the bounds are right for your machine. - This looks amazingly complicated for what you probably thought was an - easy task. Coping with integer overflow and the asymmetric range of - twos complement machines is anything but easy. - - So that users of atoi and atol can check whether an error occured, - I have taken a wholly unprecedented step: errno is CLEARED if this - call has no problems. -*/ - -#include -#include "m_string.h" -#include "m_ctype.h" -#include "my_sys.h" /* defines errno */ -#include - -#define char_val(X) (X >= '0' && X <= '9' ? X-'0' :\ - X >= 'A' && X <= 'Z' ? X-'A'+10 :\ - X >= 'a' && X <= 'z' ? X-'a'+10 :\ - '\177') - -char *str2int(register const char *src, register int radix, long int lower, - long int upper, long int *val) -{ - int sign; /* is number negative (+1) or positive (-1) */ - int n; /* number of digits yet to be converted */ - long limit; /* "largest" possible valid input */ - long scale; /* the amount to multiply next digit by */ - long sofar; /* the running value */ - register int d; /* (negative of) next digit */ - char *start; - int digits[32]; /* Room for numbers */ - - /* Make sure *val is sensible in case of error */ - - *val = 0; - - /* Check that the radix is in the range 2..36 */ - -#ifndef DBUG_OFF - if (radix < 2 || radix > 36) { - errno=EDOM; - return NullS; - } -#endif - - /* The basic problem is: how do we handle the conversion of - a number without resorting to machine-specific code to - check for overflow? Obviously, we have to ensure that - no calculation can overflow. We are guaranteed that the - "lower" and "upper" arguments are valid machine integers. - On sign-and-magnitude, twos-complement, and ones-complement - machines all, if +|n| is representable, so is -|n|, but on - twos complement machines the converse is not true. So the - "maximum" representable number has a negative representative. - Limit is set to min(-|lower|,-|upper|); this is the "largest" - number we are concerned with. */ - - /* Calculate Limit using Scale as a scratch variable */ - - if ((limit = lower) > 0) limit = -limit; - if ((scale = upper) > 0) scale = -scale; - if (scale < limit) limit = scale; - - /* Skip leading spaces and check for a sign. - Note: because on a 2s complement machine MinLong is a valid - integer but |MinLong| is not, we have to keep the current - converted value (and the scale!) as *negative* numbers, - so the sign is the opposite of what you might expect. - */ - while (my_isspace(&my_charset_latin1,*src)) src++; - sign = -1; - if (*src == '+') src++; else - if (*src == '-') src++, sign = 1; - - /* Skip leading zeros so that we never compute a power of radix - in scale that we won't have a need for. Otherwise sticking - enough 0s in front of a number could cause the multiplication - to overflow when it neededn't. - */ - start=(char*) src; - while (*src == '0') src++; - - /* Move over the remaining digits. We have to convert from left - to left in order to avoid overflow. Answer is after last digit. - */ - - for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; - - /* Check that there is at least one digit */ - - if (start == src) { - errno=EDOM; - return NullS; - } - - /* The invariant we want to maintain is that src is just - to the right of n digits, we've converted k digits to - sofar, scale = -radix**k, and scale < sofar < 0. Now - if the final number is to be within the original - Limit, we must have (to the left)*scale+sofar >= Limit, - or (to the left)*scale >= Limit-sofar, i.e. the digits - to the left of src must form an integer <= (Limit-sofar)/(scale). - In particular, this is true of the next digit. In our - incremental calculation of Limit, - - IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| - */ - - for (sofar = 0, scale = -1; --n >= 1;) - { - if ((long) -(d=digits[n]) < limit) { - errno=ERANGE; - return NullS; - } - limit = (limit+d)/radix, sofar += d*scale; scale *= radix; - } - if (n == 0) - { - if ((long) -(d=digits[n]) < limit) /* get last digit */ - { - errno=ERANGE; - return NullS; - } - sofar+=d*scale; - } - - /* Now it might still happen that sofar = -32768 or its equivalent, - so we can't just multiply by the sign and check that the result - is in the range lower..upper. All of this caution is a right - pain in the neck. If only there were a standard routine which - says generate thus and such a signal on integer overflow... - But not enough machines can do it *SIGH*. - */ - if (sign < 0) - { - if (sofar < -LONG_MAX || (sofar= -sofar) > upper) - { - errno=ERANGE; - return NullS; - } - } - else if (sofar < lower) - { - errno=ERANGE; - return NullS; - } - *val = sofar; - errno=0; /* indicate that all went well */ - return (char*) src; -} - - /* Theese are so slow compared with ordinary, optimized atoi */ - -#ifdef WANT_OUR_ATOI - -int atoi(const char *src) -{ - long val; - str2int(src, 10, (long) INT_MIN, (long) INT_MAX, &val); - return (int) val; -} - - -long atol(const char *src) -{ - long val; - str2int(src, 10, LONG_MIN, LONG_MAX, &val); - return val; -} - -#endif /* WANT_OUR_ATOI */ diff --git a/externals/mysql/strings/str_alloc.c b/externals/mysql/strings/str_alloc.c deleted file mode 100644 index 615ad1ba1e..0000000000 --- a/externals/mysql/strings/str_alloc.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include - -static void *my_str_malloc_default(size_t size) -{ - void *ret= malloc(size); - if (!ret) - exit(1); - return ret; -} - -static void my_str_free_default(void *ptr) -{ - free(ptr); -} - -void *(*my_str_malloc)(size_t)= &my_str_malloc_default; -void (*my_str_free)(void *)= &my_str_free_default; diff --git a/externals/mysql/strings/str_test.c b/externals/mysql/strings/str_test.c deleted file mode 100644 index e4358196f2..0000000000 --- a/externals/mysql/strings/str_test.c +++ /dev/null @@ -1,277 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Test of all stringfunktions that is coded in assembler */ - -#include -#include -#include "m_string.h" - -#define F_LEN 8 -#define F_CHAR 'A' -#define F_FILL 'B' -#define T_LEN 15 -#define T_CHAR 'D' -#define T_FILL 'E' -#define F_PREFILL '0' -#define T_PREFILL '1' - -static char from_buff[100],to_buff[100]; -static char * from, *to; -static int errors,tests; -static int test_strarg(const char *name,...); -static void init_strings (void); /* Init from and to */ -void test_arg (const char *message,long func_value,long value); -int compare_buff(const char *message,char * b1,char * b2,int length, - pchar fill, pchar prefill); - -static int my_test(int a) -{ - return a ? 1 : 0; -} - -int main(void) -{ - static char v1[]="Monty",v2[]="on",v3[]="Montys",v4[]="ty",v5[]="gr", - v6[]="hohohoo",v7[]="hohoo",v8[]="hohooo",v9[]="t", - cont[]="qwet"; - errors=tests=0; - init_strings(); - - test_arg("bcmp(from,to,5)",(long) my_test(bcmp(from,to,5)),1L); - test_arg("bcmp(from,from,5)",(long) bcmp(from,from,5),0L); - - test_arg("bcmp(from,to,0)",(long) bcmp(from,to,0),0L); - test_arg("strend(from)",(long) strend(from),(long) from+F_LEN); - test_arg("strchr(v1,'M')",(long) strchr(v1,'M'),(long) v1); - test_arg("strchr(v1,'y')",(long) strchr(v1,'y'),(long) v1+4); - test_arg("strchr(v1,'x')",(long) strchr(v1,'x'),0L); - test_arg("strcont(v1,cont)",(long) strcont(v1,cont),(long) v1+3); - test_arg("strcont(v1,v2)",(long) strcont(v1,v2),(long) v1+1); - test_arg("strcont(v1,v5)",(long) strcont(v1,v5),0L); - test_arg("is_prefix(v3,v1)",(long) is_prefix(v3,v1),1L); - test_arg("is_prefix(v1,v3)",(long) is_prefix(v1,v3),0L); - test_arg("is_prefix(v3,v4)",(long) is_prefix(v3,v4),0L); - test_arg("strstr(v1,v1)",(long) strstr(v1,v1),(long) v1); - test_arg("strstr(v1,v2)",(long) strstr(v1,v2),(long) v1+1); - test_arg("strstr(v1,v4)",(long) strstr(v1,v4),(long) v1+3); - test_arg("strstr(v6,v7)",(long) strstr(v6,v7),(long) v6+2); - test_arg("strstr(v1,v9)",(long) strstr(v1,v9),(long) v1+3); - test_arg("strstr(v1,v3)",(long) strstr(v1,v3),0L); - test_arg("strstr(v1,v5)",(long) strstr(v1,v5),0L); - test_arg("strstr(v6,v8)",(long) strstr(v6,v8),0L); - - test_arg("strinstr(v1,v4)",(long) strinstr(v1,v4),4L); - test_arg("strinstr(v1,v5)",(long) strinstr(v1,v5),0L); - test_arg("strlen(from)",(long) strlen(from),(long) F_LEN); - test_arg("strlen(\"\")",(long) strlen(""),0L); -#ifdef HAVE_STRNLEN - test_arg("strnlen(from,3)",(long) strnlen(from,3),3L); - test_arg("strnlen(from,0)",(long) strnlen(from,0),0L); - test_arg("strnlen(from,1000)",(long) strnlen(from,1000),(long) F_LEN); -#endif - - test_strarg("bfill(to,4,' ')",(bfill(to,4,' '),0L),INT_MAX32,4,' ',0,0); - test_strarg("bfill(from,0,' ')",(bfill(from,0,' '),0L),INT_MAX32,0,0); - test_strarg("bzero(to,3)",(bzero(to,3),0L),INT_MAX32,3,0,0,0); - test_strarg("bzero(to,0)",(bzero(to,0),0L),INT_MAX32,0,0); - test_strarg("bmove(to,from,4)",(bmove(to,from,4),0L),INT_MAX32,4,F_CHAR, - 0,0); - test_strarg("bmove(to,from,0)",(bmove(to,from,0),0L),INT_MAX32,0,0); - test_strarg("bmove_upp(to+6,from+6,3)",(bmove_upp(to+6,from+6,3),0L),INT_MAX32, - 3,T_CHAR,3,F_CHAR,0,0); - test_strarg("bmove_upp(to,from,0)",(bmove_upp(to,from,0),0L),INT_MAX32,0,0); - test_strarg("bmove_align(to,from,8)",(bmove_align(to,from,8),0L),INT_MAX32, - 8,F_CHAR,0,0); - test_strarg("strappend(to,3,' ')",(strappend(to,3,' '),0L),INT_MAX32, - 3,T_CHAR,1,0,T_LEN-4,T_CHAR,1,0,0,0); - test_strarg("strappend(to,T_LEN+5,' ')",(strappend(to,T_LEN+5,' '),0L),INT_MAX32, - T_LEN,T_CHAR,5,' ',1,0,0,0); - test_strarg("strcat(to,from)",strcat(to,from),to,T_LEN,T_CHAR, - F_LEN,F_CHAR,1,0,0,0); - test_strarg("strcat(to,\"\")",strcat(to,""),INT_MAX32,0,0); - test_strarg("strfill(to,4,' ')",strfill(to,4,' '),to+4,4,' ',1,0,0,0); - test_strarg("strfill(from,0,' ')",strfill(from,0,' '),from,0,1,0,0); - test_strarg("strmake(to,from,4)",strmake(to,from,4),to+4,4,F_CHAR, - 1,0,0,0); - test_strarg("strmake(to,from,0)",strmake(to,from,0),to+0,1,0,0,0); - test_strarg("strmov(to,from)",strmov(to,from),to+F_LEN,F_LEN,F_CHAR,0,0); - test_strarg("strmov(to,\"\")",strmov(to,""),to,1,0,0,0); - test_strarg("strnmov(to,from,2)",strnmov(to,from,2),to+2,2,F_CHAR,0,0); - test_strarg("strnmov(to,from,F_LEN+5)",strnmov(to,from,F_LEN+5),to+F_LEN, - F_LEN,F_CHAR,1,0,0,0); - test_strarg("strnmov(to,\"\",2)",strnmov(to,"",2),to,1,0,0,0); - test_strarg("strxmov(to,from,\"!!\",NullS)",strxmov(to,from,"!!",NullS),to+F_LEN+2,F_LEN,F_CHAR,2,'!',0,0,0); - test_strarg("strxmov(to,NullS)",strxmov(to,NullS),to,1,0,0,0); - test_strarg("strxmov(to,from,from,from,from,from,'!!',from,NullS)",strxmov(to,from,from,from,from,from,"!!",from,NullS),to+F_LEN*6+2,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,2,'!',F_LEN,F_CHAR,1,0,0,0); - - test_strarg("strxnmov(to,100,from,\"!!\",NullS)",strxnmov(to,100,from,"!!",NullS),to+F_LEN+2,F_LEN,F_CHAR,2,'!',0,0,0); - test_strarg("strxnmov(to,2,NullS)",strxnmov(to,2,NullS),to,1,0,0,0); - test_strarg("strxnmov(to,100,from,from,from,from,from,'!!',from,NullS)",strxnmov(to,100,from,from,from,from,from,"!!",from,NullS),to+F_LEN*6+2,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,2,'!',F_LEN,F_CHAR,1,0,0,0); - test_strarg("strxnmov(to,2,\"!!!\",NullS)",strxnmov(to,2,"!!!",NullS),to+2,2,'!',0,0,0); - test_strarg("strxnmov(to,2,\"!!\",NullS)",strxnmov(to,2,"!!","xx",NullS),to+2,2,'!',0,0,0); - test_strarg("strxnmov(to,2,\"!\",\"x\",\"y\",NullS)",strxnmov(to,2,"!","x","y",NullS),to+2,1,'!',1,'x',0,0,0); - - test_strarg("bchange(to,2,from,4,6)",(bchange(to,2,from,4,6),0L),INT_MAX32, - 4,F_CHAR,2,T_CHAR,0,0); - - printf("tests: %d errors: %d\n",tests,errors); - if (errors) - fputs("--- Some functions doesn't work!! Fix them\n",stderr); - return(errors > 0); -} /* main */ - - - /* Init strings */ - -void init_strings(void) -{ - reg1 int i; - reg2 char *pos; - - from=from_buff+3; to=to_buff+3; - - pos=from_buff; *pos++= F_FILL; *pos++=F_FILL; *pos++=F_PREFILL; - for (i=0 ; i < F_LEN ; i++) - *pos++=F_CHAR; - *pos++=0; - for (i=0; i<50 ; i++) - *pos++= F_FILL; - - pos=to_buff; *pos++= T_FILL; *pos++=T_FILL; *pos++=T_PREFILL; - for (i=0 ; i < T_LEN ; i++) - *pos++=T_CHAR; - *pos++=0; - for (i=0; i<50 ; i++) - *pos++= T_FILL; -} /* init_strings */ - - - /* Test that function return rigth value */ - -void test_arg(const char *message, long int func_value, long int value) -{ - tests++; - printf("testing '%s'\n",message); - if (func_value != value) - { - printf("func: '%s' = %ld Should be: %ld\n",message,func_value,value); - errors++; - } -} /* test_arg */ - - /* Test function return value and from and to arrays */ - -static int test_strarg(const char *message,...) -{ - long func_value,value; - int error,length; - char chr,cmp_buff[100],*pos,*pos2; - va_list pvar; - - tests++; - va_start(pvar,message); - func_value=va_arg(pvar,long); - value=va_arg(pvar,long); - - printf("testing '%s'\n",message); - if (func_value != value && value != INT_MAX32) - { - printf("func: '%s' = %ld Should be: %ld\n",message,func_value,value); - errors++; - } - pos= cmp_buff; - while ((length = va_arg(pvar, int)) != 0) - { - chr= (char) (va_arg(pvar, int)); - while (length--) - *pos++=chr; - } - pos2=to+ (int)(pos-cmp_buff); - while (pos <= cmp_buff+T_LEN) - *pos++= *pos2++; - if (compare_buff(message,to,cmp_buff,(int) (pos-cmp_buff),T_FILL,T_PREFILL)) - { - init_strings(); - va_end(pvar); - return 1; - } - - pos= cmp_buff; - while ((length = va_arg(pvar, int)) != 0) - { - chr= (char) (va_arg(pvar, int)); - while (length--) - *pos++=chr; - } - pos2=from+ (int)(pos-cmp_buff); - while (pos <= cmp_buff+F_LEN) - *pos++= *pos2++; - error=compare_buff(message,from,cmp_buff,(int) (pos-cmp_buff),F_FILL,F_PREFILL); - init_strings(); - va_end(pvar); - return (error != 0); -} /* test_strarg */ - - - /* test if function made right value */ - -int compare_buff(const char *message, char * b1, char * b2, int length, - pchar fill, pchar prefill) -{ - int i,error=0; - - if (bcmp(b1,b2,length)) - { - errors++; - printf("func: '%s' Buffers differ\nIs: ",message); - for (i=0 ; i -#include "m_string.h" - - -void strappend(register char *s, size_t len, pchar fill) -{ - register char *endpos; - - endpos = s+len; - while (*s++); - s--; - while (s -#include "m_string.h" - -#if defined(MC68000) && defined(DS90) - -char *strcend(const char *s, pchar c) -{ -asm(" movl 4(a7),a0 "); -asm(" movl 8(a7),d1 "); -asm(".L2: movb (a0)+,d0 "); -asm(" cmpb d0,d1 "); -asm(" beq .L1 "); -asm(" tstb d0 "); -asm(" bne .L2 "); -asm(".L1: movl a0,d0 "); -asm(" subql #1,d0 "); -} - -#else - -char *strcend(register const char *s, register pchar c) -{ - for (;;) - { - if (*s == (char) c) return (char*) s; - if (!*s++) return (char*) s-1; - } -} - -#endif diff --git a/externals/mysql/strings/strcont.c b/externals/mysql/strings/strcont.c deleted file mode 100644 index 5a518a3550..0000000000 --- a/externals/mysql/strings/strcont.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : strcont.c - Author : Monty - Updated: 1988.07.27 - Defines: strcont() - - strcont(str, set) if str contanies any character in the string set. - The result is the position of the first found character in str, or NullS - if there isn't anything found. - -*/ - -#include -#include "m_string.h" - -char * strcont(reg1 const char *str,reg2 const char *set) -{ - reg3 char * start = (char *) set; - - while (*str) - { - while (*set) - { - if (*set++ == *str) - return ((char*) str); - } - set=start; str++; - } - return (NullS); -} /* strcont */ diff --git a/externals/mysql/strings/strend.c b/externals/mysql/strings/strend.c deleted file mode 100644 index 4dadf0675d..0000000000 --- a/externals/mysql/strings/strend.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* File : strend.c - Author : Richard A. O'Keefe. - Updated: 23 April 1984 - Defines: strend() - - strend(s) returns a character pointer to the NUL which ends s. That - is, strend(s)-s == strlen(s). This is useful for adding things at - the end of strings. It is redundant, because strchr(s,'\0') could - be used instead, but this is clearer and faster. - Beware: the asm version works only if strlen(s) < 65535. -*/ - -#include -#include "m_string.h" - -#if VaxAsm - -char *strend(s) -const char *s; -{ - asm("locc $0,$65535,*4(ap)"); - asm("movl r1,r0"); -} - -#else /* ~VaxAsm */ - -char *strend(register const char *s) -{ - while (*s++); - return (char*) (s-1); -} - -#endif /* VaxAsm */ diff --git a/externals/mysql/strings/strfill.c b/externals/mysql/strings/strfill.c deleted file mode 100644 index 4b1fe67b20..0000000000 --- a/externals/mysql/strings/strfill.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : strfill.c - Author : Monty - Updated: 1987.04.16 - Defines: strfill() - - strfill(dest, len, fill) makes a string of fill-characters. The result - string is of length == len. The des+len character is allways set to NULL. - strfill() returns pointer to dest+len; -*/ - -#include -#include "m_string.h" - -char * strfill(char *s, size_t len, pchar fill) -{ - while (len--) *s++ = fill; - *(s) = '\0'; - return(s); -} /* strfill */ diff --git a/externals/mysql/strings/strings-not-used.h b/externals/mysql/strings/strings-not-used.h deleted file mode 100644 index 3efaa8ab6e..0000000000 --- a/externals/mysql/strings/strings-not-used.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : strings.h - Author : Richard A. O'Keefe. - Updated: 1 June 1984 - Purpose: Header file for the "string(3C)" package. - - All the routines in this package are the original work of - R.A.O'Keefe. Any resemblance between them and any routines in - licensed software is due entirely to these routines having been - written using the "man 3 string" UNIX manual page, or in some cases - the "man 1 sort" manual page as a specification. See the READ-ME to - find the conditions under which these routines may be used & copied. -*/ - -#ifndef NullS - -#include /* Define standar vars */ -#include "m_string.h" - -#define NUL '\0' -#define _AlphabetSize 256 - -#endif /* NullS */ diff --git a/externals/mysql/strings/strinstr.c b/externals/mysql/strings/strinstr.c deleted file mode 100644 index dce498d61e..0000000000 --- a/externals/mysql/strings/strinstr.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : strinstr.c - Author : Monty & David - Updated: 1986.12.08 - Defines: strinstr() - - strinstr(src, pat) looks for an instance of pat in src. pat is not a - regex(3) pattern, it is a literal string which must be matched exactly. - The result 0 if the pattern was not found else it is the start char of - the pattern counted from the beginning of the string, where the first - char is 1. -*/ - -#include -#include "m_string.h" - -size_t strinstr(reg1 const char *str,reg4 const char *search) -{ - reg2 const char *i, *j; - const char *start= str; - - skip: - while (*str != '\0') - { - if (*str++ == *search) - { - i= str; j= search+1; - while (*j) - if (*i++ != *j++) goto skip; - return ((size_t) (str - start)); - } - } - return (0); -} diff --git a/externals/mysql/strings/strmake.c b/externals/mysql/strings/strmake.c deleted file mode 100644 index 903a1b8362..0000000000 --- a/externals/mysql/strings/strmake.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : strmake.c - Author : Michael Widenius - Updated: 20 Jul 1984 - Defines: strmake() - - strmake(dst,src,length) moves length characters, or until end, of src to - dst and appends a closing NUL to dst. - Note that if strlen(src) >= length then dst[length] will be set to \0 - strmake() returns pointer to closing null -*/ - -#include -#include "m_string.h" - -char *strmake(register char *dst, register const char *src, size_t length) -{ - while (length--) - { - if (! (*dst++ = *src++)) - { -#ifdef EXTRA_DEBUG - /* - 'length' is the maximum length of the string; the buffer needs - to be one character larger to accommodate the terminating - '\0'. This is easy to get wrong, so we make sure we write to - the entire length of the buffer to identify incorrect - buffer-sizes. We only initialism the "unused" part of the - buffer here, a) for efficiency, and b) because dst==src is - allowed, so initializing the entire buffer would overwrite the - source-string. Also, we write a character rather than '\0' as - this makes spotting these problems in the results easier. - - If we are using purify/valgrind, we only set one character at - end to be able to detect also wrong accesses after the end of - dst. - */ - if (length) - { -#ifdef HAVE_purify - dst[length-1]= 'Z'; -#else - bfill(dst, length-1, (int) 'Z'); -#endif /* HAVE_purify */ - } -#endif /* EXTRA_DEBUG */ - return dst-1; - } - } - *dst=0; - return dst; -} diff --git a/externals/mysql/strings/strmov.c b/externals/mysql/strings/strmov.c deleted file mode 100644 index 1393411dd8..0000000000 --- a/externals/mysql/strings/strmov.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - strmov(dst, src) moves all the characters of src (including the - closing NUL) to dst, and returns a pointer to the new closing NUL in - dst. The similar UNIX routine strcpy returns the old value of dst, - which I have never found useful. strmov(strmov(dst,a),b) moves a//b - into dst, which seems useful. -*/ - -#include -#include "m_string.h" - -#ifdef BAD_STRING_COMPILER -#undef strmov -#define strmov strmov_overlapp -#endif - -#ifndef strmov - -#if !defined(MC68000) && !defined(DS90) - -char *strmov(register char *dst, register const char *src) -{ - while ((*dst++ = *src++)) ; - return dst-1; -} - -#else - -char *strmov(dst, src) - char *dst, *src; -{ - asm(" movl 4(a7),a1 "); - asm(" movl 8(a7),a0 "); - asm(".L4: movb (a0)+,(a1)+ "); - asm(" jne .L4 "); - asm(" movl a1,d0 "); - asm(" subql #1,d0 "); -} - -#endif - -#endif /* strmov */ diff --git a/externals/mysql/strings/strnlen.c b/externals/mysql/strings/strnlen.c deleted file mode 100644 index 826cd5ae5d..0000000000 --- a/externals/mysql/strings/strnlen.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* File : strnlen.c - Author : Michael Widenius - Updated: 20 April 1984 - Defines: strnlen. - strnlen(s, len) returns the length of s or len if s is longer than len. -*/ - -#include -#include "m_string.h" - -#ifndef HAVE_STRNLEN - -size_t strnlen(register const char *s, register size_t maxlen) -{ - const char *end= (const char *)memchr(s, '\0', maxlen); - return end ? (size_t) (end - s) : maxlen; -} - -#endif diff --git a/externals/mysql/strings/strnmov.c b/externals/mysql/strings/strnmov.c deleted file mode 100644 index 7e26877637..0000000000 --- a/externals/mysql/strings/strnmov.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - strnmov(dst,src,length) moves length characters, or until end, of src to - dst and appends a closing NUL to dst if src is shorter than length. - The result is a pointer to the first NUL in dst, or is dst+n if dst was - truncated. -*/ - -#include -#include "m_string.h" - -char *strnmov(register char *dst, register const char *src, size_t n) -{ - while (n-- != 0) { - if (!(*dst++ = *src++)) { - return (char*) dst-1; - } - } - return dst; -} diff --git a/externals/mysql/strings/strstr.c b/externals/mysql/strings/strstr.c deleted file mode 100644 index a5b50d1204..0000000000 --- a/externals/mysql/strings/strstr.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* File : strstr.c - Author : Monty - Updated: 1986.11.24 - Defines: strstr() - - strstr(src, pat) looks for an instance of pat in src. pat is not a - regex(3) pattern, it is a literal string which must be matched exactly. - The result is a pointer to the first character of the located instance, - or NullS if pat does not occur in src. - -*/ - -#include -#include "m_string.h" - -#ifndef HAVE_STRSTR - -char *strstr(register const char *str,const char *search) -{ - register char *i,*j; - register char first= *search; - -skip: - while (*str != '\0') { - if (*str++ == first) { - i=(char*) str; j=(char*) search+1; - while (*j) - if (*i++ != *j++) goto skip; - return ((char*) str-1); - } - } - return ((char*) 0); -} /* strstr */ - -#endif diff --git a/externals/mysql/strings/strto.c b/externals/mysql/strings/strto.c deleted file mode 100644 index fcb0d800b8..0000000000 --- a/externals/mysql/strings/strto.c +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - strtol,strtoul,strtoll,strtoull - convert string to long, unsigned long, long long or unsigned long long. - strtoxx(char *src,char **ptr,int base) - converts the string pointed to by src to an long of appropriate long and - returnes it. It skips leading spaces and tabs (but not newlines, formfeeds, - backspaces), then it accepts an optional sign and a sequence of digits - in the specified radix. - If the value of ptr is not (char **)NULL, a pointer to the character - terminating the scan is returned in the location pointed to by ptr. - Trailing spaces will NOT be skipped. - - If an error is detected, the result will be LONG_MIN, 0 or LONG_MAX, - (or LONGLONG..) and errno will be set to - EDOM if there are no digits - ERANGE if the result would overflow. - the ptr will be set to src. - This file is based on the strtol from the the GNU C Library. - it can be compiled with the UNSIGNED and/or LONGLONG flag set -*/ - - -#if !defined(_global_h) || !defined(_m_string_h) -# error Calling file must include 'my_global.h' and 'm_string.h' - /* see 'strtoll.c' and 'strtoull.c' for the reasons */ -#endif - -#include "m_ctype.h" -#include "my_sys.h" /* defines errno */ -#include - -#undef strtoull -#undef strtoll -#undef strtoul -#undef strtol -#ifdef USE_LONGLONG -#define UTYPE_MAX (~(ulonglong) 0) -#define TYPE_MIN LONGLONG_MIN -#define TYPE_MAX LONGLONG_MAX -#define longtype longlong -#define ulongtype ulonglong -#ifdef USE_UNSIGNED -#define function ulongtype strtoull -#else -#define function longtype strtoll -#endif -#else -#define UTYPE_MAX (ulong) ~0L -#define TYPE_MIN LONG_MIN -#define TYPE_MAX LONG_MAX -#define longtype long -#define ulongtype unsigned long -#ifdef USE_UNSIGNED -#define function ulongtype strtoul -#else -#define function longtype strtol -#endif -#endif - - -/* Convert NPTR to an `unsigned long int' or `long int' in base BASE. - If BASE is 0 the base is determined by the presence of a leading - zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal. - If BASE is < 2 or > 36, it is reset to 10. - If ENDPTR is not NULL, a pointer to the character after the last - one converted is stored in *ENDPTR. */ - - -function (const char *nptr,char **endptr,int base) -{ - int negative; - register ulongtype cutoff; - register unsigned int cutlim; - register ulongtype i; - register const char *s; - register uchar c; - const char *save; - int overflow; - - if (base < 0 || base == 1 || base > 36) - base = 10; - - s = nptr; - - /* Skip white space. */ - while (my_isspace(&my_charset_latin1, *s)) - ++s; - if (*s == '\0') - { - goto noconv; - } - - /* Check for a sign. */ - negative= 0; - if (*s == '-') - { - negative = 1; - ++s; - } - else if (*s == '+') - { - ++s; - } - - - if (base == 16 && s[0] == '0' && my_toupper (&my_charset_latin1, s[1]) == 'X') - s += 2; - - /* If BASE is zero, figure it out ourselves. */ - if (base == 0) - { - if (*s == '0') - { - if (my_toupper (&my_charset_latin1, s[1]) == 'X') - { - s += 2; - base = 16; - } - else - base = 8; - } - else - base = 10; - } - - /* Save the pointer so we can check later if anything happened. */ - save = s; - - cutoff = UTYPE_MAX / (unsigned long int) base; - cutlim = (uint) (UTYPE_MAX % (unsigned long int) base); - - overflow = 0; - i = 0; - for (c = *s; c != '\0'; c = *++s) - { - if (my_isdigit (&my_charset_latin1, c)) - c -= '0'; - else if (my_isalpha (&my_charset_latin1, c)) - c = my_toupper (&my_charset_latin1, c) - 'A' + 10; - else - break; - if (c >= base) - break; - /* Check for overflow. */ - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (ulongtype) base; - i += c; - } - } - - /* Check if anything actually happened. */ - if (s == save) - goto noconv; - - /* Store in ENDPTR the address of one character - past the last character we converted. */ - if (endptr != NULL) - *endptr = (char *) s; - -#ifndef USE_UNSIGNED - /* Check for a value that is within the range of - `unsigned long int', but outside the range of `long int'. */ - if (negative) - { - if (i > (ulongtype) TYPE_MIN) - overflow = 1; - } - else if (i > (ulongtype) TYPE_MAX) - overflow = 1; -#endif - - if (overflow) - { - my_errno=ERANGE; -#ifdef USE_UNSIGNED - return UTYPE_MAX; -#else - return negative ? TYPE_MIN : TYPE_MAX; -#endif - } - - /* Return the result of the appropriate sign. */ - return (negative ? -((longtype) i) : (longtype) i); - -noconv: - /* There was no number to convert. */ - my_errno=EDOM; - if (endptr != NULL) - *endptr = (char *) nptr; - return 0L; -} diff --git a/externals/mysql/strings/strtol.c b/externals/mysql/strings/strtol.c deleted file mode 100644 index 42476b0226..0000000000 --- a/externals/mysql/strings/strtol.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This implements strtol() if needed */ - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - */ -#include -#include - -#if !defined(MSDOS) && !defined(HAVE_STRTOL) && !defined(__WIN__) -#include "strto.c" -#endif diff --git a/externals/mysql/strings/strtoll.c b/externals/mysql/strings/strtoll.c deleted file mode 100644 index cfb6fbd75e..0000000000 --- a/externals/mysql/strings/strtoll.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This implements strtoll() if needed */ - - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - This solves a problem on Tru64 where the C99 compiler has a prototype - for 'strtoll()' but no implementation, see "6.1 New C99 library functions" - in file '/usr/share/doclib/cc.dtk/release_notes.txt'. - */ -#include -#include - -#if !defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG) -#define USE_LONGLONG -#include "strto.c" -#endif diff --git a/externals/mysql/strings/strtoul.c b/externals/mysql/strings/strtoul.c deleted file mode 100644 index 3e2b51bc98..0000000000 --- a/externals/mysql/strings/strtoul.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This implements strtol() if needed */ - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - */ -#include -#include - -#if !defined(MSDOS) && !defined(HAVE_STRTOUL) -#define USE_UNSIGNED -#include "strto.c" -#endif diff --git a/externals/mysql/strings/strtoull.c b/externals/mysql/strings/strtoull.c deleted file mode 100644 index 94bf6904f8..0000000000 --- a/externals/mysql/strings/strtoull.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This implements strtoull() if needed */ - - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - This solves a problem on Tru64 where the C99 compiler has a prototype - for 'strtoull()' but no implementation, see "6.1 New C99 library functions" - in file '/usr/share/doclib/cc.dtk/release_notes.txt'. - */ -#include -#include - -#if !defined(HAVE_STRTOULL) && defined(HAVE_LONG_LONG) -#define USE_UNSIGNED -#define USE_LONGLONG -#include "strto.c" -#endif diff --git a/externals/mysql/strings/strxmov.c b/externals/mysql/strings/strxmov.c deleted file mode 100644 index 9dd2c93662..0000000000 --- a/externals/mysql/strings/strxmov.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* File : strxmov.c - Author : Richard A. O'Keefe. - Updated: 25 may 1984 - Defines: strxmov() - - strxmov(dst, src1, ..., srcn, NullS) - moves the concatenation of src1,...,srcn to dst, terminates it - with a NUL character, and returns a pointer to the terminating NUL. - It is just like strmov except that it concatenates multiple sources. - Beware: the last argument should be the null character pointer. - Take VERY great care not to omit it! Also be careful to use NullS - and NOT to use 0, as on some machines 0 is not the same size as a - character pointer, or not the same bit pattern as NullS. -*/ - -#include -#include "m_string.h" -#include - -char *strxmov(char *dst,const char *src, ...) -{ - va_list pvar; - - va_start(pvar,src); - while (src != NullS) { - while ((*dst++ = *src++)) ; - dst--; - src = va_arg(pvar, char *); - } - va_end(pvar); - *dst = 0; /* there might have been no sources! */ - return dst; -} diff --git a/externals/mysql/strings/strxnmov.c b/externals/mysql/strings/strxnmov.c deleted file mode 100644 index 16469be6e4..0000000000 --- a/externals/mysql/strings/strxnmov.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* File : strxnmov.c - Author : Richard A. O'Keefe. - Updated: 2 June 1984 - Defines: strxnmov() - - strxnmov(dst, len, src1, ..., srcn, NullS) - moves the first len characters of the concatenation of src1,...,srcn - to dst and add a closing NUL character. - It is just like strnmov except that it concatenates multiple sources. - Beware: the last argument should be the null character pointer. - Take VERY great care not to omit it! Also be careful to use NullS - and NOT to use 0, as on some machines 0 is not the same size as a - character pointer, or not the same bit pattern as NullS. - - NOTE - strxnmov is like strnmov in that it moves up to len - characters; dst will be padded on the right with one '\0' character. - if total-string-length >= length then dst[length] will be set to \0 -*/ - -#include -#include "m_string.h" -#include - -char *strxnmov(char *dst, size_t len, const char *src, ...) -{ - va_list pvar; - char *end_of_dst=dst+len; - - va_start(pvar,src); - while (src != NullS) - { - do - { - if (dst == end_of_dst) - goto end; - } - while ((*dst++ = *src++)); - dst--; - src = va_arg(pvar, char *); - } -end: - *dst=0; - va_end(pvar); - return dst; -} diff --git a/externals/mysql/strings/t_ctype.h b/externals/mysql/strings/t_ctype.h deleted file mode 100644 index af4f3ebbaa..0000000000 --- a/externals/mysql/strings/t_ctype.h +++ /dev/null @@ -1,258 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved. - Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved. - Permission to use, copy, modify, distribute and sell this software - and its documentation for any purpose is hereby granted without fee, - provided that the above copyright notice appear in all copies. - Smaphan Raruenrom and Pruet Boonma makes no representations about - the suitability of this software for any purpose. It is provided - "as is" without express or implied warranty. -*/ - -/* - LC_COLLATE category + Level information -*/ - -#ifndef _t_ctype_h -#define _t_ctype_h - -typedef unsigned char tchar; - -#define TOT_LEVELS 5 -#define LAST_LEVEL 4 /* TOT_LEVELS - 1 */ - -#define IGNORE 0 - - -/* level 1 symbols & order */ -enum l1_symbols { - L1_08 = TOT_LEVELS, - L1_18, - L1_28, - L1_38, - L1_48, - L1_58, - L1_68, - L1_78, - L1_88, - L1_98, - L1_A8, - L1_B8, - L1_C8, - L1_D8, - L1_E8, - L1_F8, - L1_G8, - L1_H8, - L1_I8, - L1_J8, - L1_K8, - L1_L8, - L1_M8, - L1_N8, - L1_O8, - L1_P8, - L1_Q8, - L1_R8, - L1_S8, - L1_T8, - L1_U8, - L1_V8, - L1_W8, - L1_X8, - L1_Y8, - L1_Z8, - L1_KO_KAI, - L1_KHO_KHAI, - L1_KHO_KHUAT, - L1_KHO_KHWAI, - L1_KHO_KHON, - L1_KHO_RAKHANG, - L1_NGO_NGU, - L1_CHO_CHAN, - L1_CHO_CHING, - L1_CHO_CHANG, - L1_SO_SO, - L1_CHO_CHOE, - L1_YO_YING, - L1_DO_CHADA, - L1_TO_PATAK, - L1_THO_THAN, - L1_THO_NANGMONTHO, - L1_THO_PHUTHAO, - L1_NO_NEN, - L1_DO_DEK, - L1_TO_TAO, - L1_THO_THUNG, - L1_THO_THAHAN, - L1_THO_THONG, - L1_NO_NU, - L1_BO_BAIMAI, - L1_PO_PLA, - L1_PHO_PHUNG, - L1_FO_FA, - L1_PHO_PHAN, - L1_FO_FAN, - L1_PHO_SAMPHAO, - L1_MO_MA, - L1_YO_YAK, - L1_RO_RUA, - L1_RU, - L1_LO_LING, - L1_LU, - L1_WO_WAEN, - L1_SO_SALA, - L1_SO_RUSI, - L1_SO_SUA, - L1_HO_HIP, - L1_LO_CHULA, - L1_O_ANG, - L1_HO_NOKHUK, - L1_NKHIT, - L1_SARA_A, - L1_MAI_HAN_AKAT, - L1_SARA_AA, - L1_SARA_AM, - L1_SARA_I, - L1_SARA_II, - L1_SARA_UE, - L1_SARA_UEE, - L1_SARA_U, - L1_SARA_UU, - L1_SARA_E, - L1_SARA_AE, - L1_SARA_O, - L1_SARA_AI_MAIMUAN, - L1_SARA_AI_MAIMALAI -}; - -/* level 2 symbols & order */ -enum l2_symbols { - L2_BLANK = TOT_LEVELS, - L2_THAII, - L2_YAMAK, - L2_PINTHU, - L2_GARAN, - L2_TYKHU, - L2_TONE1, - L2_TONE2, - L2_TONE3, - L2_TONE4 -}; - -/* level 3 symbols & order */ -enum l3_symbols { - L3_BLANK = TOT_LEVELS, - L3_SPACE, - L3_NB_SACE, - L3_LOW_LINE, - L3_HYPHEN, - L3_COMMA, - L3_SEMICOLON, - L3_COLON, - L3_EXCLAMATION, - L3_QUESTION, - L3_SOLIDUS, - L3_FULL_STOP, - L3_PAIYAN_NOI, - L3_MAI_YAMOK, - L3_GRAVE, - L3_CIRCUMFLEX, - L3_TILDE, - L3_APOSTROPHE, - L3_QUOTATION, - L3_L_PARANTHESIS, - L3_L_BRACKET, - L3_L_BRACE, - L3_R_BRACE, - L3_R_BRACKET, - L3_R_PARENTHESIS, - L3_AT, - L3_BAHT, - L3_DOLLAR, - L3_FONGMAN, - L3_ANGKHANKHU, - L3_KHOMUT, - L3_ASTERISK, - L3_BK_SOLIDUS, - L3_AMPERSAND, - L3_NUMBER, - L3_PERCENT, - L3_PLUS, - L3_LESS_THAN, - L3_EQUAL, - L3_GREATER_THAN, - L3_V_LINE -}; - -/* level 4 symbols & order */ -enum l4_symbols { - L4_BLANK = TOT_LEVELS, - L4_MIN, - L4_CAP, - L4_EXT -}; - -enum level_symbols { - L_UPRUPR = TOT_LEVELS, - L_UPPER, - L_MIDDLE, - L_LOWER -}; - -#define _is(c) (t_ctype[(c)][LAST_LEVEL]) -#define _level 8 -#define _consnt 16 -#define _ldvowel 32 -#define _fllwvowel 64 -#define _uprvowel 128 -#define _lwrvowel 256 -#define _tone 512 -#define _diacrt1 1024 -#define _diacrt2 2048 -#define _combine 4096 -#define _stone 8192 -#define _tdig 16384 -#define _rearvowel (_fllwvowel | _uprvowel | _lwrvowel) -#define _diacrt (_diacrt1 | _diacrt2) -#define levelof(c) ( _is(c) & _level ) -#define isthai(c) ( (c) >= 128 ) -#define istalpha(c) ( _is(c) & (_consnt|_ldvowel|_rearvowel|\ - _tone|_diacrt1|_diacrt2) ) -#define isconsnt(c) ( _is(c) & _consnt ) -#define isldvowel(c) ( _is(c) & _ldvowel ) -#define isfllwvowel(c) ( _is(c) & _fllwvowel ) -#define ismidvowel(c) ( _is(c) & (_ldvowel|_fllwvowel) ) -#define isuprvowel(c) ( _is(c) & _uprvowel ) -#define islwrvowel(c) ( _is(c) & _lwrvowel ) -#define isuprlwrvowel(c) ( _is(c) & (_lwrvowel | _uprvowel)) -#define isrearvowel(c) ( _is(c) & _rearvowel ) -#define isvowel(c) ( _is(c) & (_ldvowel|_rearvowel) ) -#define istone(c) ( _is(c) & _tone ) -#define isunldable(c) ( _is(c) & (_rearvowel|_tone|_diacrt1|_diacrt2) ) -#define iscombinable(c) ( _is(c) & _combine ) -#define istdigit(c) ( _is(c) & _tdig ) -#define isstone(c) ( _is(c) & _stone ) -#define isdiacrt1(c) ( _is(c) & _diacrt1) -#define isdiacrt2(c) ( _is(c) & _diacrt2) -#define isdiacrt(c) ( _is(c) & _diacrt) - -/* Function prototype called by sql/field.cc */ -void ThNormalize(uchar* ptr, uint field_length, const uchar* from, uint length); - -#endif diff --git a/externals/mysql/strings/uca-dump.c b/externals/mysql/strings/uca-dump.c deleted file mode 100644 index 774e940c7d..0000000000 --- a/externals/mysql/strings/uca-dump.c +++ /dev/null @@ -1,332 +0,0 @@ -/* Copyright (C) 2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -#include -#include -#include - -typedef unsigned char uchar; -typedef unsigned short uint16; - -struct uca_item_st -{ - uchar num; - uint16 weight[4][9]; -}; - -#if 0 -#define MY_UCA_NPAGES 1024 -#define MY_UCA_NCHARS 64 -#define MY_UCA_CMASK 63 -#define MY_UCA_PSHIFT 6 -#else -#define MY_UCA_NPAGES 256 -#define MY_UCA_NCHARS 256 -#define MY_UCA_CMASK 255 -#define MY_UCA_PSHIFT 8 -#endif - -static char *pname[]= {"", "2", "3"}; - -int main(int ac, char **av) -{ - char str[256]; - char *weights[64]; - struct uca_item_st uca[64*1024]; - size_t code, w; - int pageloaded[MY_UCA_NPAGES]; - - bzero(uca, sizeof(uca)); - bzero(pageloaded, sizeof(pageloaded)); - - while (fgets(str,sizeof(str),stdin)) - { - char *comment; - char *weight; - char *s; - size_t codenum; - - code= strtol(str,NULL,16); - - if (str[0]=='#' || (code > 0xFFFF)) - continue; - if ((comment=strchr(str,'#'))) - { - *comment++= '\0'; - for ( ; *comment==' ' ; comment++); - }else - continue; - - if ((weight=strchr(str,';'))) - { - *weight++= '\0'; - for ( ; *weight==' ' ; weight++); - } - else - continue; - - codenum= 0; - s= strtok(str, " \t"); - while (s) - { - s= strtok(NULL, " \t"); - codenum++; - } - - if (codenum>1) - { - /* Multi-character weight, - i.e. contraction. - Not supported yet. - */ - continue; - } - - uca[code].num= 0; - s= strtok(weight, " []"); - while (s) - { - weights[uca[code].num]= s; - s= strtok(NULL, " []"); - uca[code].num++; - } - - for (w=0; w < uca[code].num; w++) - { - size_t partnum; - - partnum= 0; - s= weights[w]; - while (*s) - { - char *endptr; - size_t part; - part= strtol(s+1,&endptr,16); - uca[code].weight[partnum][w]= part; - s= endptr; - partnum++; - } - } - /* Mark that a character from this page was loaded */ - pageloaded[code >> MY_UCA_PSHIFT]++; - } - - - - /* Now set implicit weights */ - for (code=0; code <= 0xFFFF; code++) - { - size_t base, aaaa, bbbb; - - if (uca[code].num) - continue; - - /* - 3400; - 4DB5; - 4E00; - 9FA5; - */ - - if (code >= 0x3400 && code <= 0x4DB5) - base= 0xFB80; - else if (code >= 0x4E00 && code <= 0x9FA5) - base= 0xFB40; - else - base= 0xFBC0; - - aaaa= base + (code >> 15); - bbbb= (code & 0x7FFF) | 0x8000; - uca[code].weight[0][0]= aaaa; - uca[code].weight[0][1]= bbbb; - - uca[code].weight[1][0]= 0x0020; - uca[code].weight[1][1]= 0x0000; - - uca[code].weight[2][0]= 0x0002; - uca[code].weight[2][1]= 0x0000; - - uca[code].weight[3][0]= 0x0001; - uca[code].weight[3][2]= 0x0000; - - uca[code].num= 2; - } - - printf("#include \"my_uca.h\"\n"); - - printf("#define MY_UCA_NPAGES %d\n",MY_UCA_NPAGES); - printf("#define MY_UCA_NCHARS %d\n",MY_UCA_NCHARS); - printf("#define MY_UCA_CMASK %d\n",MY_UCA_CMASK); - printf("#define MY_UCA_PSHIFT %d\n",MY_UCA_PSHIFT); - - for (w=0; w<3; w++) - { - size_t page; - int pagemaxlen[MY_UCA_NPAGES]; - - for (page=0; page < MY_UCA_NPAGES; page++) - { - size_t offs; - size_t maxnum= 0; - size_t nchars= 0; - size_t mchars; - size_t ndefs= 0; - - pagemaxlen[page]= 0; - - /* - Skip this page if no weights were loaded - */ - - if (!pageloaded[page]) - continue; - - /* - Calculate maximum weight - length for this page - */ - - for (offs=0; offs < MY_UCA_NCHARS; offs++) - { - size_t i, num; - - code= page*MY_UCA_NCHARS+offs; - - /* Calculate only non-zero weights */ - for (num=0, i=0; i < uca[code].num; i++) - if (uca[code].weight[w][i]) - num++; - - maxnum= maxnum < num ? num : maxnum; - - /* Check if default weight */ - if (w == 1 && num == 1) - { - /* 0020 0000 ... */ - if (uca[code].weight[w][0] == 0x0020) - ndefs++; - } - else if (w == 2 && num == 1) - { - /* 0002 0000 ... */ - if (uca[code].weight[w][0] == 0x0002) - ndefs++; - } - } - maxnum++; - - /* - If the page have only default weights - then no needs to dump it, skip. - */ - if (ndefs == MY_UCA_NCHARS) - { - continue; - } - switch (maxnum) - { - case 0: mchars= 8; break; - case 1: mchars= 8; break; - case 2: mchars= 8; break; - case 3: mchars= 9; break; - case 4: mchars= 8; break; - default: mchars= uca[code].num; - } - - pagemaxlen[page]= maxnum; - - - /* - Now print this page - */ - - - printf("uint16 page%03Xdata%s[]= { /* %04X (%d weights per char) */\n", - page, pname[w], page*MY_UCA_NCHARS, maxnum); - - for (offs=0; offs < MY_UCA_NCHARS; offs++) - { - uint16 weight[8]; - size_t num, i; - - code= page*MY_UCA_NCHARS+offs; - - bzero(weight,sizeof(weight)); - - /* Copy non-zero weights */ - for (num=0, i=0; i < uca[code].num; i++) - { - if (uca[code].weight[w][i]) - { - weight[num]= uca[code].weight[w][i]; - num++; - } - } - - for (i=0; i < maxnum; i++) - { - /* - Invert weights for secondary level to - sort upper case letters before their - lower case counter part. - */ - int tmp= weight[i]; - if (w == 2 && tmp) - tmp= (int)(0x20 - weight[i]); - - - printf("0x%04X", tmp); - if ((offs+1 != MY_UCA_NCHARS) || (i+1!=maxnum)) - printf(","); - nchars++; - } - if (nchars >=mchars) - { - printf("\n"); - nchars=0; - } - else - { - printf(" "); - } - } - printf("};\n\n"); - } - - printf("uchar uca_length%s[%d]={\n", pname[w], MY_UCA_NPAGES); - for (page=0; page < MY_UCA_NPAGES; page++) - { - printf("%d%s%s",pagemaxlen[page],page -#include -#include -*/ -#include -#include -#include -#include "m_ctype.h" - - -typedef struct my_ctype_name_st -{ - const char *name; - int val; -} MY_CTYPE_NAME_ST; - - -static MY_CTYPE_NAME_ST my_ctype_name[]= -{ - {"Lu", _MY_U}, /* Letter, Uppercase */ - {"Ll", _MY_L}, /* Letter, Lowercase */ - {"Lt", _MY_U}, /* Letter, Titlecase */ - {"Lm", _MY_L}, /* Letter, Modifier */ - {"Lo", _MY_L}, /* Letter, other */ - - {"Nd", _MY_NMR}, /* Number, Decimal Digit */ - {"Nl", _MY_NMR|_MY_U|_MY_L}, /* Number, Letter */ - {"No", _MY_NMR|_MY_PNT}, /* Number, Other */ - - {"Mn", _MY_L|_MY_PNT}, /* Mark, Nonspacing */ - {"Mc", _MY_L|_MY_PNT}, /* Mark, Spacing Combining */ - {"Me", _MY_L|_MY_PNT}, /* Mark, Enclosing */ - - {"Pc", _MY_PNT}, /* Punctuation, Connector */ - {"Pd", _MY_PNT}, /* Punctuation, Dash */ - {"Ps", _MY_PNT}, /* Punctuation, Open */ - {"Pe", _MY_PNT}, /* Punctuation, Close */ - {"Pi", _MY_PNT}, /* Punctuation, Initial quote */ - {"Pf", _MY_PNT}, /* Punctuation, Final quote */ - {"Po", _MY_PNT}, /* Punctuation, Other */ - - {"Sm", _MY_PNT}, /* Symbol, Math */ - {"Sc", _MY_PNT}, /* Symbol, Currency */ - {"Sk", _MY_PNT}, /* Symbol, Modifier */ - {"So", _MY_PNT}, /* Symbol, Other */ - - {"Zs", _MY_SPC}, /* Separator, Space */ - {"Zl", _MY_SPC}, /* Separator, Line */ - {"Zp", _MY_SPC}, /* Separator, Paragraph */ - - {"Cc", _MY_CTR}, /* Other, Control */ - {"Cf", _MY_CTR}, /* Other, Format */ - {"Cs", _MY_CTR}, /* Other, Surrogate */ - {"Co", _MY_CTR}, /* Other, Private Use */ - {"Cn", _MY_CTR}, /* Other, Not Assigned */ - {NULL, 0} -}; - - -static int -ctypestr2num(const char *tok) -{ - MY_CTYPE_NAME_ST *p; - for (p= my_ctype_name; p->name; p++) - { - if (!strncasecmp(p->name, tok, 2)) - return p->val; - } - return 0; -} - - -int main(int ac, char ** av) -{ - char str[1024]; - unsigned char ctypea[64*1024]; - size_t i; - size_t plane; - MY_UNI_CTYPE uctype[256]; - FILE *f= stdin; - - if (ac > 1 && av[1] && !(f= fopen(av[1],"r"))) - { - fprintf(stderr, "Can't open file %s\n", av[1]); - exit(1); - } - bzero(&ctypea,sizeof(ctypea)); - bzero(&uctype, sizeof(uctype)); - - printf("/*\n"); - printf(" Unicode ctype data\n"); - printf(" Generated from %s\n", av[1] ? av[1] : "stdin"); - printf("*/\n"); - - while(fgets(str, sizeof(str), f)) - { - size_t n= 0, code= 0; - char *s,*e; - int ctype= 0; - - for(s= str; s; ) - { - char *end; - char tok[1024]=""; - e=strchr(s,';'); - if(e) - { - strncpy(tok,s,(unsigned int)(e-s)); - tok[e-s]=0; - } - else - { - strcpy(tok,s); - } - - end=tok+strlen(tok); - - switch(n) - { - case 0: code= strtol(tok,&end,16);break; - case 2: ctype= ctypestr2num(tok);break; - } - - n++; - if(e) s=e+1; - else s=e; - } - if(code<=0xFFFF) - { - ctypea[code]= ctype; - } - } - - /* Fill digits */ - for (i= '0'; i <= '9'; i++) - ctypea[i]= _MY_NMR; - - for (i= 'a'; i <= 'z'; i++) - ctypea[i]|= _MY_X; - for (i= 'A'; i <= 'Z'; i++) - ctypea[i]|= _MY_X; - - - /* Fill ideographs */ - - /* CJK Ideographs Extension A (U+3400 - U+4DB5) */ - for(i=0x3400;i<=0x4DB5;i++) - { - ctypea[i]= _MY_L | _MY_U; - } - - /* CJK Ideographs (U+4E00 - U+9FA5) */ - for(i=0x4E00;i<=0x9FA5;i++){ - ctypea[i]= _MY_L | _MY_U; - } - - /* Hangul Syllables (U+AC00 - U+D7A3) */ - for(i=0xAC00;i<=0xD7A3;i++) - { - ctypea[i]= _MY_L | _MY_U; - } - - - /* Calc plane parameters */ - for(plane=0;plane<256;plane++) - { - size_t character; - uctype[plane].ctype= ctypea+plane*256; - - uctype[plane].pctype= uctype[plane].ctype[0]; - for(character=1;character<256;character++) - { - if (uctype[plane].ctype[character] != uctype[plane].pctype) - { - uctype[plane].pctype= 0; /* Mixed plane */ - break; - } - } - if (character==256) /* All the same, no needs to dump whole plane */ - uctype[plane].ctype= NULL; - } - - /* Dump mixed planes */ - for(plane=0;plane<256;plane++) - { - if(uctype[plane].ctype) - { - int charnum=0; - int num=0; - - printf("static unsigned char uctype_page%02X[256]=\n{\n",plane); - - for(charnum=0;charnum<256;charnum++) - { - int cod; - - cod=(plane<<8)+charnum; - printf(" %2d%s",uctype[plane].ctype[charnum],charnum<255?",":""); - - num++; - if(num==16) - { - printf("\n"); - num=0; - } - } - printf("};\n\n"); - } - } - - - /* Dump plane index */ - printf("MY_UNI_CTYPE my_uni_ctype[256]={\n"); - for(plane=0;plane<256;plane++) - { - char plane_name[128]="NULL"; - if(uctype[plane].ctype){ - sprintf(plane_name,"uctype_page%02X",plane); - } - printf("\t{%d,%s}%s\n",uctype[plane].pctype,plane_name,plane<255?",":""); - } - printf("};\n"); - - return 0; -} diff --git a/externals/mysql/strings/utr11-dump.c b/externals/mysql/strings/utr11-dump.c deleted file mode 100644 index a15f63025f..0000000000 --- a/externals/mysql/strings/utr11-dump.c +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (C) 2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -#include -#include -#include - - -/* - Dump an EastAsianWidth.txt file. - See http://www.unicode.org/reports/tr11/ for details. - Character types: - F - Full width = 1 - H - Half width = 0 - W - Wide = 1 - Na - Narrow = 0 - A - Ambiguous = 0 - N - Neutral = 0 -*/ - - -int main(int ac, char **av) -{ - char str[128]; - int errors= 0; - int plane[0x10000]; - int page[256]; - int i; - - memset(plane, 0, sizeof(plane)); - memset(page, 0, sizeof(page)); - - while (fgets(str, sizeof(str), stdin)) - { - int code1, code2, width; - char *end; - - if (str[0] == '#') - continue; - code1= strtol(str, &end, 16); - if (code1 < 0 || code1 > 0xFFFF) - continue; - if (end[0] == ';') /* One character */ - { - code2= code1; - } - else if (end[0] == '.' && end[1] == '.') /* Range */ - { - end+= 2; - code2= strtol(end, &end, 16); - if (code2 < 0 || code2 > 0xFFFF) - continue; - if (end[0] != ';') - { - errors++; - fprintf(stderr, "error: %s", str); - continue; - } - } - else - { - errors++; - fprintf(stderr, "error: %s", str); - continue; - } - - end++; - width= (end[0] == 'F' || end[0] == 'W') ? 1 : 0; - - for ( ; code1 <= code2; code1++) - { - plane[code1]= width; - } - } - - if (errors) - return 1; - - for (i=0; i < 256; i++) - { - int j; - int *p= plane + 256 * i; - page[i]= 0; - for (j=0; j < 256; j++) - { - page[i]+= p[j]; - } - if (page[i] != 0 && page[i] != 256) - { - printf("static char pg%02X[256]=\n{\n", i); - for (j=0; j < 256; j++) - { - printf("%d%s%s", p[j], j < 255 ? "," : "", (j + 1) % 32 ? "" : "\n"); - } - printf("};\n\n"); - } - } - - printf("static struct {int page; char *p;} utr11_data[256]=\n{\n"); - for (i=0; i < 256; i++) - { - if (page[i] == 0 || page[i] == 256) - { - int width= (page[i] == 256) ? 1 : 0; - printf("{%d,NULL}", width); - } - else - { - printf("{0,pg%02X}", i); - } - printf("%s%s", i < 255 ? "," : "", (i+1) % 8 ? "" : "\n"); - } - printf("};\n"); - return 0; -} diff --git a/externals/mysql/strings/xml.c b/externals/mysql/strings/xml.c deleted file mode 100644 index 1b697ec6b2..0000000000 --- a/externals/mysql/strings/xml.c +++ /dev/null @@ -1,496 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "my_global.h" -#include "m_string.h" -#include "my_xml.h" - - -#define MY_XML_UNKNOWN 'U' -#define MY_XML_EOF 'E' -#define MY_XML_STRING 'S' -#define MY_XML_IDENT 'I' -#define MY_XML_EQ '=' -#define MY_XML_LT '<' -#define MY_XML_GT '>' -#define MY_XML_SLASH '/' -#define MY_XML_COMMENT 'C' -#define MY_XML_TEXT 'T' -#define MY_XML_QUESTION '?' -#define MY_XML_EXCLAM '!' -#define MY_XML_CDATA 'D' - -typedef struct xml_attr_st -{ - const char *beg; - const char *end; -} MY_XML_ATTR; - - -/* - XML ctype: -*/ -#define MY_XML_ID0 0x01 /* Identifier initial character */ -#define MY_XML_ID1 0x02 /* Identifier medial character */ -#define MY_XML_SPC 0x08 /* Spacing character */ - - -/* - http://www.w3.org/TR/REC-xml/ - [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | - CombiningChar | Extender - [5] Name ::= (Letter | '_' | ':') (NameChar)* -*/ - -static char my_xml_ctype[256]= -{ -/*00*/ 0,0,0,0,0,0,0,0,0,8,8,0,0,8,0,0, -/*10*/ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -/*20*/ 8,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0, /* !"#$%&'()*+,-./ */ -/*30*/ 2,2,2,2,2,2,2,2,2,2,3,0,0,0,0,0, /* 0123456789:;<=>? */ -/*40*/ 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, /* @ABCDEFGHIJKLMNO */ -/*50*/ 3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,3, /* PQRSTUVWXYZ[\]^_ */ -/*60*/ 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, /* `abcdefghijklmno */ -/*70*/ 3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0, /* pqrstuvwxyz{|}~ */ -/*80*/ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -/*90*/ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -/*A0*/ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -/*B0*/ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -/*C0*/ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -/*D0*/ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -/*E0*/ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -/*F0*/ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 -}; - -#define my_xml_is_space(c) (my_xml_ctype[(uchar) (c)] & MY_XML_SPC) -#define my_xml_is_id0(c) (my_xml_ctype[(uchar) (c)] & MY_XML_ID0) -#define my_xml_is_id1(c) (my_xml_ctype[(uchar) (c)] & MY_XML_ID1) - - -static const char *lex2str(int lex) -{ - switch(lex) - { - case MY_XML_EOF: return "END-OF-INPUT"; - case MY_XML_STRING: return "STRING"; - case MY_XML_IDENT: return "IDENT"; - case MY_XML_CDATA: return "CDATA"; - case MY_XML_EQ: return "'='"; - case MY_XML_LT: return "'<'"; - case MY_XML_GT: return "'>'"; - case MY_XML_SLASH: return "'/'"; - case MY_XML_COMMENT: return "COMMENT"; - case MY_XML_TEXT: return "TEXT"; - case MY_XML_QUESTION: return "'?'"; - case MY_XML_EXCLAM: return "'!'"; - } - return "unknown token"; -} - -static void my_xml_norm_text(MY_XML_ATTR *a) -{ - for ( ; (a->beg < a->end) && my_xml_is_space(a->beg[0]) ; a->beg++ ); - for ( ; (a->beg < a->end) && my_xml_is_space(a->end[-1]) ; a->end-- ); -} - - -static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a) -{ - int lex; - - for (; ( p->cur < p->end) && my_xml_is_space(p->cur[0]) ; p->cur++); - - if (p->cur >= p->end) - { - a->beg=p->end; - a->end=p->end; - lex=MY_XML_EOF; - goto ret; - } - - a->beg=p->cur; - a->end=p->cur; - - if ((p->end - p->cur > 3) && !bcmp(p->cur,"", 3); p->cur++) - {} - if (!bcmp(p->cur, "-->", 3)) - p->cur+=3; - a->end=p->cur; - lex=MY_XML_COMMENT; - } - else if (!bcmp(p->cur, "cur+= 9; - for (; p->cur < p->end - 2 ; p->cur++) - { - if (p->cur[0] == ']' && p->cur[1] == ']' && p->cur[2] == '>') - { - p->cur+= 3; - a->end= p->cur; - break; - } - } - lex= MY_XML_CDATA; - } - else if (strchr("?=/<>!",p->cur[0])) - { - p->cur++; - a->end=p->cur; - lex=a->beg[0]; - } - else if ( (p->cur[0] == '"') || (p->cur[0] == '\'') ) - { - p->cur++; - for (; ( p->cur < p->end ) && (p->cur[0] != a->beg[0]); p->cur++) - {} - a->end=p->cur; - if (a->beg[0] == p->cur[0])p->cur++; - a->beg++; - if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION)) - my_xml_norm_text(a); - lex=MY_XML_STRING; - } - else if (my_xml_is_id0(p->cur[0])) - { - p->cur++; - while (p->cur < p->end && my_xml_is_id1(p->cur[0])) - p->cur++; - a->end=p->cur; - my_xml_norm_text(a); - lex=MY_XML_IDENT; - } - else - lex= MY_XML_UNKNOWN; - -#if 0 - printf("LEX=%s[%d]\n",lex2str(lex),a->end-a->beg); -#endif - -ret: - return lex; -} - - -static int my_xml_value(MY_XML_PARSER *st, const char *str, size_t len) -{ - return (st->value) ? (st->value)(st,str,len) : MY_XML_OK; -} - - -static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len) -{ - if ((size_t) (st->attrend-st->attr+len+1) > sizeof(st->attr)) - { - sprintf(st->errstr,"To deep XML"); - return MY_XML_ERROR; - } - if (st->attrend > st->attr) - { - st->attrend[0]= '/'; - st->attrend++; - } - memcpy(st->attrend,str,len); - st->attrend+=len; - st->attrend[0]='\0'; - if (st->flags & MY_XML_FLAG_RELATIVE_NAMES) - return st->enter ? st->enter(st, str, len) : MY_XML_OK; - else - return st->enter ? st->enter(st,st->attr,st->attrend-st->attr) : MY_XML_OK; -} - - -static void mstr(char *s,const char *src,size_t l1, size_t l2) -{ - l1 = l1attrend; (e>p->attr) && (e[0] != '/') ; e--); - glen = (size_t) ((e[0] == '/') ? (p->attrend-e-1) : p->attrend-e); - - if (str && (slen != glen)) - { - mstr(s,str,sizeof(s)-1,slen); - if (glen) - { - mstr(g,e+1,sizeof(g)-1,glen), - sprintf(p->errstr,"'' unexpected ('' wanted)",s,g); - } - else - sprintf(p->errstr,"'' unexpected (END-OF-INPUT wanted)", s); - return MY_XML_ERROR; - } - - if (p->flags & MY_XML_FLAG_RELATIVE_NAMES) - rc= p->leave_xml ? p->leave_xml(p, str, slen) : MY_XML_OK; - else - rc= (p->leave_xml ? p->leave_xml(p,p->attr,p->attrend-p->attr) : - MY_XML_OK); - - *e='\0'; - p->attrend=e; - - return rc; -} - - -int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len) -{ - p->attrend=p->attr; - p->beg=str; - p->cur=str; - p->end=str+len; - - while ( p->cur < p->end ) - { - MY_XML_ATTR a; - if (p->cur[0] == '<') - { - int lex; - int question=0; - int exclam=0; - - lex=my_xml_scan(p,&a); - - if (MY_XML_COMMENT == lex) - continue; - - if (lex == MY_XML_CDATA) - { - a.beg+= 9; - a.end-= 3; - my_xml_value(p, a.beg, (size_t) (a.end-a.beg)); - continue; - } - - lex=my_xml_scan(p,&a); - - if (MY_XML_SLASH == lex) - { - if (MY_XML_IDENT != (lex=my_xml_scan(p,&a))) - { - sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex)); - return MY_XML_ERROR; - } - if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))) - return MY_XML_ERROR; - lex=my_xml_scan(p,&a); - goto gt; - } - - if (MY_XML_EXCLAM == lex) - { - lex=my_xml_scan(p,&a); - exclam=1; - } - else if (MY_XML_QUESTION == lex) - { - lex=my_xml_scan(p,&a); - question=1; - } - - if (MY_XML_IDENT == lex) - { - p->current_node_type= MY_XML_NODE_TAG; - if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) - return MY_XML_ERROR; - } - else - { - sprintf(p->errstr,"%s unexpected (ident or '/' wanted)", - lex2str(lex)); - return MY_XML_ERROR; - } - - while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) || - ((MY_XML_STRING == lex && exclam))) - { - MY_XML_ATTR b; - if (MY_XML_EQ == (lex=my_xml_scan(p,&b))) - { - lex=my_xml_scan(p,&b); - if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) ) - { - p->current_node_type= MY_XML_NODE_ATTR; - if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) || - (MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) || - (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))) - return MY_XML_ERROR; - } - else - { - sprintf(p->errstr,"%s unexpected (ident or string wanted)", - lex2str(lex)); - return MY_XML_ERROR; - } - } - else if (MY_XML_IDENT == lex) - { - p->current_node_type= MY_XML_NODE_ATTR; - if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) || - (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))) - return MY_XML_ERROR; - } - else if ((MY_XML_STRING == lex) && exclam) - { - /* - We are in , e.g. - - - Just skip "SystemLiteral" and "PublicidLiteral" - */ - } - else - break; - } - - if (lex == MY_XML_SLASH) - { - if (MY_XML_OK != my_xml_leave(p,NULL,0)) - return MY_XML_ERROR; - lex=my_xml_scan(p,&a); - } - -gt: - if (question) - { - if (lex != MY_XML_QUESTION) - { - sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex)); - return MY_XML_ERROR; - } - if (MY_XML_OK != my_xml_leave(p,NULL,0)) - return MY_XML_ERROR; - lex=my_xml_scan(p,&a); - } - - if (exclam) - { - if (MY_XML_OK != my_xml_leave(p,NULL,0)) - return MY_XML_ERROR; - } - - if (lex != MY_XML_GT) - { - sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex)); - return MY_XML_ERROR; - } - } - else - { - a.beg=p->cur; - for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++); - a.end=p->cur; - - if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION)) - my_xml_norm_text(&a); - if (a.beg != a.end) - { - my_xml_value(p,a.beg,(size_t) (a.end-a.beg)); - } - } - } - - if (p->attr[0]) - { - sprintf(p->errstr,"unexpected END-OF-INPUT"); - return MY_XML_ERROR; - } - return MY_XML_OK; -} - - -void my_xml_parser_create(MY_XML_PARSER *p) -{ - bzero((void*)p,sizeof(p[0])); -} - - -void my_xml_parser_free(MY_XML_PARSER *p __attribute__((unused))) -{ -} - - -void my_xml_set_value_handler(MY_XML_PARSER *p, - int (*action)(MY_XML_PARSER *p, const char *s, - size_t l)) -{ - p->value=action; -} - -void my_xml_set_enter_handler(MY_XML_PARSER *p, - int (*action)(MY_XML_PARSER *p, const char *s, - size_t l)) -{ - p->enter=action; -} - - -void my_xml_set_leave_handler(MY_XML_PARSER *p, - int (*action)(MY_XML_PARSER *p, const char *s, - size_t l)) -{ - p->leave_xml=action; -} - - -void my_xml_set_user_data(MY_XML_PARSER *p, void *user_data) -{ - p->user_data=user_data; -} - - -const char *my_xml_error_string(MY_XML_PARSER *p) -{ - return p->errstr; -} - - -size_t my_xml_error_pos(MY_XML_PARSER *p) -{ - const char *beg=p->beg; - const char *s; - for ( s=p->beg ; scur; s++) - { - if (s[0] == '\n') - beg=s; - } - return (size_t) (p->cur-beg); -} - -uint my_xml_error_lineno(MY_XML_PARSER *p) -{ - uint res=0; - const char *s; - for (s=p->beg ; scur; s++) - { - if (s[0] == '\n') - res++; - } - return res; -} diff --git a/externals/mysql/t_ctype.h b/externals/mysql/t_ctype.h deleted file mode 100644 index 15600019cd..0000000000 --- a/externals/mysql/t_ctype.h +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved. - Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved. - Permission to use, copy, modify, distribute and sell this software - and its documentation for any purpose is hereby granted without fee, - provided that the above copyright notice appear in all copies. - Smaphan Raruenrom and Pruet Boonma makes no representations about - the suitability of this software for any purpose. It is provided - "as is" without express or implied warranty. -*/ - -/* LC_COLLATE category + Level information */ - -#ifndef _t_ctype_h -#define _t_ctype_h - -#define TOT_LEVELS 5 -#define LAST_LEVEL 4 /* TOT_LEVELS - 1 */ - -#define IGNORE 0 - - -/* level 1 symbols & order */ -enum l1_symbols { - L1_08 = TOT_LEVELS, - L1_18, - L1_28, - L1_38, - L1_48, - L1_58, - L1_68, - L1_78, - L1_88, - L1_98, - L1_A8, - L1_B8, - L1_C8, - L1_D8, - L1_E8, - L1_F8, - L1_G8, - L1_H8, - L1_I8, - L1_J8, - L1_K8, - L1_L8, - L1_M8, - L1_N8, - L1_O8, - L1_P8, - L1_Q8, - L1_R8, - L1_S8, - L1_T8, - L1_U8, - L1_V8, - L1_W8, - L1_X8, - L1_Y8, - L1_Z8, - L1_KO_KAI, - L1_KHO_KHAI, - L1_KHO_KHUAT, - L1_KHO_KHWAI, - L1_KHO_KHON, - L1_KHO_RAKHANG, - L1_NGO_NGU, - L1_CHO_CHAN, - L1_CHO_CHING, - L1_CHO_CHANG, - L1_SO_SO, - L1_CHO_CHOE, - L1_YO_YING, - L1_DO_CHADA, - L1_TO_PATAK, - L1_THO_THAN, - L1_THO_NANGMONTHO, - L1_THO_PHUTHAO, - L1_NO_NEN, - L1_DO_DEK, - L1_TO_TAO, - L1_THO_THUNG, - L1_THO_THAHAN, - L1_THO_THONG, - L1_NO_NU, - L1_BO_BAIMAI, - L1_PO_PLA, - L1_PHO_PHUNG, - L1_FO_FA, - L1_PHO_PHAN, - L1_FO_FAN, - L1_PHO_SAMPHAO, - L1_MO_MA, - L1_YO_YAK, - L1_RO_RUA, - L1_RU, - L1_LO_LING, - L1_LU, - L1_WO_WAEN, - L1_SO_SALA, - L1_SO_RUSI, - L1_SO_SUA, - L1_HO_HIP, - L1_LO_CHULA, - L1_O_ANG, - L1_HO_NOKHUK, - L1_NKHIT, - L1_SARA_A, - L1_MAI_HAN_AKAT, - L1_SARA_AA, - L1_SARA_AM, - L1_SARA_I, - L1_SARA_II, - L1_SARA_UE, - L1_SARA_UEE, - L1_SARA_U, - L1_SARA_UU, - L1_SARA_E, - L1_SARA_AE, - L1_SARA_O, - L1_SARA_AI_MAIMUAN, - L1_SARA_AI_MAIMALAI -}; - -/* level 2 symbols & order */ -enum l2_symbols { - L2_BLANK = TOT_LEVELS, - L2_THAII, - L2_YAMAK, - L2_PINTHU, - L2_GARAN, - L2_TYKHU, - L2_TONE1, - L2_TONE2, - L2_TONE3, - L2_TONE4 -}; - -/* level 3 symbols & order */ -enum l3_symbols { - L3_BLANK = TOT_LEVELS, - L3_SPACE, - L3_NB_SACE, - L3_LOW_LINE, - L3_HYPHEN, - L3_COMMA, - L3_SEMICOLON, - L3_COLON, - L3_EXCLAMATION, - L3_QUESTION, - L3_SOLIDUS, - L3_FULL_STOP, - L3_PAIYAN_NOI, - L3_MAI_YAMOK, - L3_GRAVE, - L3_CIRCUMFLEX, - L3_TILDE, - L3_APOSTROPHE, - L3_QUOTATION, - L3_L_PARANTHESIS, - L3_L_BRACKET, - L3_L_BRACE, - L3_R_BRACE, - L3_R_BRACKET, - L3_R_PARENTHESIS, - L3_AT, - L3_BAHT, - L3_DOLLAR, - L3_FONGMAN, - L3_ANGKHANKHU, - L3_KHOMUT, - L3_ASTERISK, - L3_BK_SOLIDUS, - L3_AMPERSAND, - L3_NUMBER, - L3_PERCENT, - L3_PLUS, - L3_LESS_THAN, - L3_EQUAL, - L3_GREATER_THAN, - L3_V_LINE -}; - -/* level 4 symbols & order */ -enum l4_symbols { - L4_BLANK = TOT_LEVELS, - L4_MIN, - L4_CAP, - L4_EXT -}; - -enum level_symbols { - L_UPRUPR = TOT_LEVELS, - L_UPPER, - L_MIDDLE, - L_LOWER -}; - -#define _is(c) (t_ctype[(c)][LAST_LEVEL]) -#define _level 8 -#define _consnt 16 -#define _ldvowel 32 -#define _fllwvowel 64 -#define _uprvowel 128 -#define _lwrvowel 256 -#define _tone 512 -#define _diacrt1 1024 -#define _diacrt2 2048 -#define _combine 4096 -#define _stone 8192 -#define _tdig 16384 -#define _rearvowel (_fllwvowel | _uprvowel | _lwrvowel) -#define _diacrt (_diacrt1 | _diacrt2) -#define levelof(c) ( _is(c) & _level ) -#define isthai(c) ( (c) >= 128 ) -#define istalpha(c) ( _is(c) & (_consnt|_ldvowel|_rearvowel|\ - _tone|_diacrt1|_diacrt2) ) -#define isconsnt(c) ( _is(c) & _consnt ) -#define isldvowel(c) ( _is(c) & _ldvowel ) -#define isfllwvowel(c) ( _is(c) & _fllwvowel ) -#define ismidvowel(c) ( _is(c) & (_ldvowel|_fllwvowel) ) -#define isuprvowel(c) ( _is(c) & _uprvowel ) -#define islwrvowel(c) ( _is(c) & _lwrvowel ) -#define isuprlwrvowel(c) ( _is(c) & (_lwrvowel | _uprvowel)) -#define isrearvowel(c) ( _is(c) & _rearvowel ) -#define isvowel(c) ( _is(c) & (_ldvowel|_rearvowel) ) -#define istone(c) ( _is(c) & _tone ) -#define isunldable(c) ( _is(c) & (_rearvowel|_tone|_diacrt1|_diacrt2) ) -#define iscombinable(c) ( _is(c) & _combine ) -#define istdigit(c) ( _is(c) & _tdig ) -#define isstone(c) ( _is(c) & _stone ) -#define isdiacrt1(c) ( _is(c) & _diacrt1) -#define isdiacrt2(c) ( _is(c) & _diacrt2) -#define isdiacrt(c) ( _is(c) & _diacrt) - -/* Function prototype called by sql/field.cc */ -void ThNormalize(uchar* ptr, uint field_length, const uchar* from, uint length); - -#endif diff --git a/externals/mysql/thr_alarm.h b/externals/mysql/thr_alarm.h deleted file mode 100644 index fb90603926..0000000000 --- a/externals/mysql/thr_alarm.h +++ /dev/null @@ -1,110 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Prototypes when using thr_alarm library functions */ - -#ifndef _thr_alarm_h -#define _thr_alarm_h -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef USE_ALARM_THREAD -#define USE_ONE_SIGNAL_HAND /* One must call process_alarm */ -#endif -#ifdef HAVE_rts_threads -#undef USE_ONE_SIGNAL_HAND -#define USE_ALARM_THREAD -#define THR_SERVER_ALARM SIGUSR1 -#else -#define THR_SERVER_ALARM SIGALRM -#endif - -typedef struct st_alarm_info -{ - ulong next_alarm_time; - uint active_alarms; - uint max_used_alarms; -} ALARM_INFO; - -void thr_alarm_info(ALARM_INFO *info); - -#if defined(DONT_USE_THR_ALARM) || !defined(THREAD) - -#define USE_ALARM_THREAD -#undef USE_ONE_SIGNAL_HAND - -typedef my_bool thr_alarm_t; -typedef my_bool ALARM; - -#define thr_alarm_init(A) (*(A))=0 -#define thr_alarm_in_use(A) (*(A) != 0) -#define thr_end_alarm(A) -#define thr_alarm(A,B,C) ((*(A)=1)-1) -/* The following should maybe be (*(A)) */ -#define thr_got_alarm(A) 0 -#define init_thr_alarm(A) -#define thr_alarm_kill(A) -#define resize_thr_alarm(N) -#define end_thr_alarm(A) - -#else -#if defined(__WIN__) -typedef struct st_thr_alarm_entry -{ - rf_SetTimer crono; -} thr_alarm_entry; - -#else /* System with posix threads */ - -typedef int thr_alarm_entry; - -#define thr_got_alarm(thr_alarm) (**(thr_alarm)) - -#endif /* __WIN__ */ - -typedef thr_alarm_entry* thr_alarm_t; - -typedef struct st_alarm { - ulong expire_time; - thr_alarm_entry alarmed; /* set when alarm is due */ - pthread_t thread; - my_thread_id thread_id; - my_bool malloced; -} ALARM; - -extern uint thr_client_alarm; -extern pthread_t alarm_thread; - -#define thr_alarm_init(A) (*(A))=0 -#define thr_alarm_in_use(A) (*(A)!= 0) -void init_thr_alarm(uint max_alarm); -void resize_thr_alarm(uint max_alarms); -my_bool thr_alarm(thr_alarm_t *alarmed, uint sec, ALARM *buff); -void thr_alarm_kill(my_thread_id thread_id); -void thr_end_alarm(thr_alarm_t *alarmed); -void end_thr_alarm(my_bool free_structures); -sig_handler process_alarm(int); -#ifndef thr_got_alarm -my_bool thr_got_alarm(thr_alarm_t *alrm); -#endif - - -#endif /* DONT_USE_THR_ALARM */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* _thr_alarm_h */ diff --git a/externals/mysql/thr_lock.h b/externals/mysql/thr_lock.h deleted file mode 100644 index 38f0478f27..0000000000 --- a/externals/mysql/thr_lock.h +++ /dev/null @@ -1,181 +0,0 @@ -/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* For use with thr_lock:s */ - -#ifndef _thr_lock_h -#define _thr_lock_h -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -struct st_thr_lock; -extern ulong locks_immediate,locks_waited ; - -/** - Lock types are used to request a lock on a table. Changes in this enumeration - might affect transactional locks as well. - Important: if a new lock type is added, a matching lock description - must be added to sql_test.cc's lock_descriptions array. - @see set_handler_table_locks - @see read_lock_type_for_table -*/ -enum thr_lock_type { TL_IGNORE=-1, - TL_UNLOCK, /* UNLOCK ANY LOCK */ - /* - Parser only! At open_tables() becomes TL_READ or - TL_READ_NO_INSERT depending on the binary log format - (SBR/RBR) and on the table category (log table). - Used for tables that are read by statements which - modify tables. - */ - TL_READ_DEFAULT, - TL_READ, /* Read lock */ - TL_READ_WITH_SHARED_LOCKS, - /* High prior. than TL_WRITE. Allow concurrent insert */ - TL_READ_HIGH_PRIORITY, - /* READ, Don't allow concurrent insert */ - TL_READ_NO_INSERT, - /* - Write lock, but allow other threads to read / write. - Used by BDB tables in MySQL to mark that someone is - reading/writing to the table. - */ - TL_WRITE_ALLOW_WRITE, - /* - Write lock, but allow other threads to read. - Used by ALTER TABLE in MySQL to allow readers - to use the table until ALTER TABLE is finished. - */ - TL_WRITE_ALLOW_READ, - /* - WRITE lock used by concurrent insert. Will allow - READ, if one could use concurrent insert on table. - */ - TL_WRITE_CONCURRENT_INSERT, - /* Write used by INSERT DELAYED. Allows READ locks */ - TL_WRITE_DELAYED, - /* - parser only! Late bound low_priority flag. - At open_tables() becomes thd->update_lock_default. - */ - TL_WRITE_DEFAULT, - /* WRITE lock that has lower priority than TL_READ */ - TL_WRITE_LOW_PRIORITY, - /* Normal WRITE lock */ - TL_WRITE, - /* Abort new lock request with an error */ - TL_WRITE_ONLY}; - -enum enum_thr_lock_result { THR_LOCK_SUCCESS= 0, THR_LOCK_ABORTED= 1, - THR_LOCK_WAIT_TIMEOUT= 2, THR_LOCK_DEADLOCK= 3 }; - - -extern ulong max_write_lock_count; -extern ulong table_lock_wait_timeout; -extern my_bool thr_lock_inited; -extern enum thr_lock_type thr_upgraded_concurrent_insert_lock; - -/* - A description of the thread which owns the lock. The address - of an instance of this structure is used to uniquely identify the thread. -*/ - -typedef struct st_thr_lock_info -{ - pthread_t thread; - my_thread_id thread_id; - ulong n_cursors; -} THR_LOCK_INFO; - -/* - Lock owner identifier. Globally identifies the lock owner within the - thread and among all the threads. The address of an instance of this - structure is used as id. -*/ - -typedef struct st_thr_lock_owner -{ - THR_LOCK_INFO *info; -} THR_LOCK_OWNER; - - -typedef struct st_thr_lock_data { - THR_LOCK_OWNER *owner; - struct st_thr_lock_data *next,**prev; - struct st_thr_lock *lock; - pthread_cond_t *cond; - enum thr_lock_type type; - void *status_param; /* Param to status functions */ - void *debug_print_param; -} THR_LOCK_DATA; - -struct st_lock_list { - THR_LOCK_DATA *data,**last; -}; - -typedef struct st_thr_lock { - LIST list; - pthread_mutex_t mutex; - struct st_lock_list read_wait; - struct st_lock_list read; - struct st_lock_list write_wait; - struct st_lock_list write; - /* write_lock_count is incremented for write locks and reset on read locks */ - ulong write_lock_count; - uint read_no_write_count; - void (*get_status)(void*, my_bool); /* When one gets a lock */ - void (*copy_status)(void*,void*); - void (*update_status)(void*); /* Before release of write */ - void (*restore_status)(void*); /* Before release of read */ - my_bool (*check_status)(void *); - my_bool allow_multiple_concurrent_insert; -} THR_LOCK; - - -extern LIST *thr_lock_thread_list; -extern pthread_mutex_t THR_LOCK_lock; - -my_bool init_thr_lock(void); /* Must be called once/thread */ -#define thr_lock_owner_init(owner, info_arg) (owner)->info= (info_arg) -void thr_lock_info_init(THR_LOCK_INFO *info); -void thr_lock_init(THR_LOCK *lock); -void thr_lock_delete(THR_LOCK *lock); -void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data, - void *status_param); -enum enum_thr_lock_result thr_lock(THR_LOCK_DATA *data, - THR_LOCK_OWNER *owner, - enum thr_lock_type lock_type); -void thr_unlock(THR_LOCK_DATA *data); -enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data, - uint count, THR_LOCK_OWNER *owner); -void thr_multi_unlock(THR_LOCK_DATA **data,uint count); -void -thr_lock_merge_status(THR_LOCK_DATA **data, uint count); -void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock); -my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread); -void thr_print_locks(void); /* For debugging */ -my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data, - enum thr_lock_type new_lock_type); -void thr_downgrade_write_lock(THR_LOCK_DATA *data, - enum thr_lock_type new_lock_type); -my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data); -#ifdef __cplusplus -} -#endif -#endif /* _thr_lock_h */ diff --git a/externals/mysql/typelib.h b/externals/mysql/typelib.h deleted file mode 100644 index 46106d1bda..0000000000 --- a/externals/mysql/typelib.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#ifndef _typelib_h -#define _typelib_h - -#include "my_alloc.h" - -typedef struct st_typelib { /* Different types saved here */ - unsigned int count; /* How many types */ - const char *name; /* Name of typelib */ - const char **type_names; - unsigned int *type_lengths; -} TYPELIB; - -extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position); -extern int find_type_or_exit(const char *x, TYPELIB *typelib, - const char *option); -extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name); -extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); -extern const char *get_type(TYPELIB *typelib,unsigned int nr); -extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from); - -extern TYPELIB sql_protocol_typelib; - -#endif /* _typelib_h */ diff --git a/externals/mysql/vio/test-ssl.c b/externals/mysql/vio/test-ssl.c deleted file mode 100644 index 855dc5fbb3..0000000000 --- a/externals/mysql/vio/test-ssl.c +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#if defined(HAVE_OPENSSL) && !defined(__NETWARE__) -#include -#include -#include -#include "mysql.h" -#include "errmsg.h" -#include -#include -#include -#include - -const char *VER="0.2"; - - -#ifndef DBUG_OFF -const char *default_dbug_option="d:t:O,-"; -#endif - -void -fatal_error( const char* r) -{ - perror(r); - exit(0); -} - -void -print_usage() -{ - printf("viossl-test: testing SSL virtual IO. Usage:\n"); - printf("viossl-test server-key server-cert client-key client-cert [CAfile] [CApath]\n"); -} - - -int -main(int argc, char** argv) -{ - char* server_key = 0, *server_cert = 0; - char* client_key = 0, *client_cert = 0; - char* ca_file = 0, *ca_path = 0; - char* cipher=0; - int child_pid,sv[2]; - my_bool unused; - struct st_VioSSLFd* ssl_acceptor= 0; - struct st_VioSSLFd* ssl_connector= 0; - Vio* client_vio=0, *server_vio=0; - MY_INIT(argv[0]); - DBUG_PROCESS(argv[0]); - DBUG_PUSH(default_dbug_option); - - if (argc<5) - { - print_usage(); - return 1; - } - - server_key = argv[1]; - server_cert = argv[2]; - client_key = argv[3]; - client_cert = argv[4]; - if (argc>5) - ca_file = argv[5]; - if (argc>6) - ca_path = argv[6]; - printf("Server key/cert : %s/%s\n", server_key, server_cert); - printf("Client key/cert : %s/%s\n", client_key, client_cert); - if (ca_file!=0) - printf("CAfile : %s\n", ca_file); - if (ca_path!=0) - printf("CApath : %s\n", ca_path); - - - if (socketpair(PF_UNIX, SOCK_STREAM, IPPROTO_IP, sv)==-1) - fatal_error("socketpair"); - - ssl_acceptor = new_VioSSLAcceptorFd(server_key, server_cert, ca_file, - ca_path, cipher); - ssl_connector = new_VioSSLConnectorFd(client_key, client_cert, ca_file, - ca_path, cipher); - - client_vio = (struct st_vio*)my_malloc(sizeof(struct st_vio),MYF(0)); - client_vio->sd = sv[0]; - client_vio->vioblocking(client_vio, 0, &unused); - sslconnect(ssl_connector,client_vio,60L); - server_vio = (struct st_vio*)my_malloc(sizeof(struct st_vio),MYF(0)); - server_vio->sd = sv[1]; - server_vio->vioblocking(client_vio, 0, &unused); - sslaccept(ssl_acceptor,server_vio,60L); - - printf("Socketpair: %d , %d\n", client_vio->sd, server_vio->sd); - - child_pid = fork(); - if (child_pid==-1) { - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - fatal_error("fork"); - } - if (child_pid==0) - { - /* child, therefore, client */ - char xbuf[100]; - int r = vio_read(client_vio,xbuf, sizeof(xbuf)); - if (r<=0) { - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - fatal_error("client:SSL_read"); - } - xbuf[r] = 0; - printf("client:got %s\n", xbuf); - my_free((uchar*)client_vio,MYF(0)); - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - } - else - { - const char* s = "Huhuhuh"; - int r = vio_write(server_vio,(uchar*)s, strlen(s)); - if (r<=0) { - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - fatal_error("server:SSL_write"); - } - my_free((uchar*)server_vio,MYF(0)); - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - } - return 0; -} -#else /* HAVE_OPENSSL */ - -int main() { -return 0; -} -#endif /* HAVE_OPENSSL */ diff --git a/externals/mysql/vio/test-sslclient.c b/externals/mysql/vio/test-sslclient.c deleted file mode 100644 index e1b8461397..0000000000 --- a/externals/mysql/vio/test-sslclient.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#ifdef HAVE_OPENSSL -#include -#include -#include -#include "mysql.h" -#include "errmsg.h" -#include -#include -#include -#include - -const char *VER="0.2"; - - -#ifndef DBUG_OFF -const char *default_dbug_option="d:t:O,-"; -#endif - -void -fatal_error( const char* r) -{ - perror(r); - exit(0); -} - -int -main( int argc __attribute__((unused)), - char** argv) -{ - char client_key[] = "../SSL/client-key.pem", client_cert[] = "../SSL/client-cert.pem"; - char ca_file[] = "../SSL/cacert.pem", *ca_path = 0, *cipher=0; - struct st_VioSSLFd* ssl_connector= 0; - struct sockaddr_in sa; - Vio* client_vio=0; - int err; - char xbuf[100]="Ohohhhhoh1234"; - MY_INIT(argv[0]); - DBUG_PROCESS(argv[0]); - DBUG_PUSH(default_dbug_option); - - printf("Client key/cert : %s/%s\n", client_key, client_cert); - if (ca_file!=0) - printf("CAfile : %s\n", ca_file); - if (ca_path!=0) - printf("CApath : %s\n", ca_path); - - ssl_connector = new_VioSSLConnectorFd(client_key, client_cert, ca_file, ca_path, cipher); - if(!ssl_connector) { - fatal_error("client:new_VioSSLConnectorFd failed"); - } - - /* ----------------------------------------------- */ - /* Create a socket and connect to server using normal socket calls. */ - - client_vio = vio_new(socket (AF_INET, SOCK_STREAM, 0), VIO_TYPE_TCPIP, TRUE); - - memset (&sa, '\0', sizeof(sa)); - sa.sin_family = AF_INET; - sa.sin_addr.s_addr = inet_addr ("127.0.0.1"); /* Server IP */ - sa.sin_port = htons (1111); /* Server Port number */ - - err = connect(client_vio->sd, (struct sockaddr*) &sa, - sizeof(sa)); - - /* ----------------------------------------------- */ - /* Now we have TCP conncetion. Start SSL negotiation. */ - read(client_vio->sd,xbuf, sizeof(xbuf)); - sslconnect(ssl_connector,client_vio,60L); - err = vio_read(client_vio,xbuf, sizeof(xbuf)); - if (err<=0) { - my_free((uchar*)ssl_connector,MYF(0)); - fatal_error("client:SSL_read"); - } - xbuf[err] = 0; - printf("client:got %s\n", xbuf); - my_free((uchar*)client_vio,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - return 0; -} -#else /* HAVE_OPENSSL */ - -int main() { -return 0; -} -#endif /* HAVE_OPENSSL */ diff --git a/externals/mysql/vio/test-sslserver.c b/externals/mysql/vio/test-sslserver.c deleted file mode 100644 index 8877dd3cbc..0000000000 --- a/externals/mysql/vio/test-sslserver.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#ifdef HAVE_OPENSSL -#include -#include -#include -#include "mysql.h" -#include "errmsg.h" -#include -#include -#include -#include - -const char *VER="0.2"; - - -#ifndef DBUG_OFF -const char *default_dbug_option="d:t:O,-"; -#endif - -#if 0 -static void -fatal_error( const char* r) -{ - perror(r); - exit(0); -} -#endif - -typedef struct { - int sd; - struct st_VioSSLFd* ssl_acceptor; -} TH_ARGS; - -static void -do_ssl_stuff( TH_ARGS* args) -{ - const char* s = "Huhuhuhuuu"; - Vio* server_vio; - int err; - DBUG_ENTER("do_ssl_stuff"); - - server_vio = vio_new(args->sd, VIO_TYPE_TCPIP, TRUE); - - /* ----------------------------------------------- */ - /* TCP connection is ready. Do server side SSL. */ - - err = write(server_vio->sd,(uchar*)s, strlen(s)); - sslaccept(args->ssl_acceptor,server_vio,60L); - err = server_vio->write(server_vio,(uchar*)s, strlen(s)); - DBUG_VOID_RETURN; -} - -static void* -client_thread( void* arg) -{ - my_thread_init(); - do_ssl_stuff((TH_ARGS*)arg); - return 0; -} - -int -main(int argc __attribute__((unused)), char** argv) -{ - char server_key[] = "../SSL/server-key.pem", - server_cert[] = "../SSL/server-cert.pem"; - char ca_file[] = "../SSL/cacert.pem", - *ca_path = 0, - *cipher = 0; - struct st_VioSSLFd* ssl_acceptor; - pthread_t th; - TH_ARGS th_args; - - - struct sockaddr_in sa_serv; - struct sockaddr_in sa_cli; - int listen_sd; - int err; - socklen_t client_len; - int reuseaddr = 1; /* better testing, uh? */ - - MY_INIT(argv[0]); - DBUG_PROCESS(argv[0]); - DBUG_PUSH(default_dbug_option); - - printf("Server key/cert : %s/%s\n", server_key, server_cert); - if (ca_file!=0) - - printf("CAfile : %s\n", ca_file); - if (ca_path!=0) - printf("CApath : %s\n", ca_path); - - th_args.ssl_acceptor = ssl_acceptor = new_VioSSLAcceptorFd(server_key, server_cert, ca_file, ca_path,cipher); - - /* ----------------------------------------------- */ - /* Prepare TCP socket for receiving connections */ - - listen_sd = socket (AF_INET, SOCK_STREAM, 0); - setsockopt(listen_sd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(&reuseaddr)); - - memset (&sa_serv, '\0', sizeof(sa_serv)); - sa_serv.sin_family = AF_INET; - sa_serv.sin_addr.s_addr = INADDR_ANY; - sa_serv.sin_port = htons (1111); /* Server Port number */ - - err = bind(listen_sd, (struct sockaddr*) &sa_serv, - sizeof (sa_serv)); - - /* Receive a TCP connection. */ - - err = listen (listen_sd, 5); - client_len = sizeof(sa_cli); - th_args.sd = accept (listen_sd, (struct sockaddr*) &sa_cli, &client_len); - close (listen_sd); - - printf ("Connection from %lx, port %x\n", - (long)sa_cli.sin_addr.s_addr, sa_cli.sin_port); - - /* ----------------------------------------------- */ - /* TCP connection is ready. Do server side SSL. */ - - err = pthread_create(&th, NULL, client_thread, (void*)&th_args); - DBUG_PRINT("info", ("pthread_create: %d", err)); - pthread_join(th, NULL); - -#if 0 - if (err<=0) { - my_free((uchar*)ssl_acceptor,MYF(0)); - fatal_error("server:SSL_write"); - } -#endif /* 0 */ - - my_free((uchar*)ssl_acceptor,MYF(0)); - return 0; -} -#else /* HAVE_OPENSSL */ - -int main() { -return 0; -} -#endif /* HAVE_OPENSSL */ diff --git a/externals/mysql/vio/vio.c b/externals/mysql/vio/vio.c deleted file mode 100644 index cc5f629e26..0000000000 --- a/externals/mysql/vio/vio.c +++ /dev/null @@ -1,242 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Note that we can't have assertion on file descriptors; The reason for - this is that during mysql shutdown, another thread can close a file - we are working on. In this case we should just return read errors from - the file descriptior. -*/ - -#include "vio_priv.h" - -/* - * Helper to fill most of the Vio* with defaults. - */ - -static void vio_init(Vio* vio, enum enum_vio_type type, - my_socket sd, HANDLE hPipe, uint flags) -{ - DBUG_ENTER("vio_init"); - DBUG_PRINT("enter", ("type: %d sd: %d flags: %d", type, sd, flags)); - -#ifndef HAVE_VIO_READ_BUFF - flags&= ~VIO_BUFFERED_READ; -#endif - bzero((char*) vio, sizeof(*vio)); - vio->type = type; - vio->sd = sd; - vio->hPipe = hPipe; - vio->localhost= flags & VIO_LOCALHOST; - if ((flags & VIO_BUFFERED_READ) && - !(vio->read_buffer= (char*)my_malloc(VIO_READ_BUFFER_SIZE, MYF(MY_WME)))) - flags&= ~VIO_BUFFERED_READ; -#ifdef __WIN__ - if (type == VIO_TYPE_NAMEDPIPE) - { - vio->viodelete =vio_delete; - vio->vioerrno =vio_errno; - vio->read =vio_read_pipe; - vio->write =vio_write_pipe; - vio->fastsend =vio_fastsend; - vio->viokeepalive =vio_keepalive; - vio->should_retry =vio_should_retry; - vio->was_interrupted=vio_was_interrupted; - vio->vioclose =vio_close_pipe; - vio->peer_addr =vio_peer_addr; - vio->vioblocking =vio_blocking; - vio->is_blocking =vio_is_blocking; - vio->timeout =vio_ignore_timeout; - } - else /* default is VIO_TYPE_TCPIP */ -#endif -#ifdef HAVE_SMEM - if (type == VIO_TYPE_SHARED_MEMORY) - { - vio->viodelete =vio_delete; - vio->vioerrno =vio_errno; - vio->read =vio_read_shared_memory; - vio->write =vio_write_shared_memory; - vio->fastsend =vio_fastsend; - vio->viokeepalive =vio_keepalive; - vio->should_retry =vio_should_retry; - vio->was_interrupted=vio_was_interrupted; - vio->vioclose =vio_close_shared_memory; - vio->peer_addr =vio_peer_addr; - vio->vioblocking =vio_blocking; - vio->is_blocking =vio_is_blocking; - vio->timeout =vio_ignore_timeout; - } - else -#endif -#ifdef HAVE_OPENSSL - if (type == VIO_TYPE_SSL) - { - vio->viodelete =vio_ssl_delete; - vio->vioerrno =vio_errno; - vio->read =vio_ssl_read; - vio->write =vio_ssl_write; - vio->fastsend =vio_fastsend; - vio->viokeepalive =vio_keepalive; - vio->should_retry =vio_should_retry; - vio->was_interrupted=vio_was_interrupted; - vio->vioclose =vio_ssl_close; - vio->peer_addr =vio_peer_addr; - vio->vioblocking =vio_ssl_blocking; - vio->is_blocking =vio_is_blocking; - vio->timeout =vio_timeout; - } - else /* default is VIO_TYPE_TCPIP */ -#endif /* HAVE_OPENSSL */ - { - vio->viodelete =vio_delete; - vio->vioerrno =vio_errno; - vio->read= (flags & VIO_BUFFERED_READ) ? vio_read_buff : vio_read; - vio->write =vio_write; - vio->fastsend =vio_fastsend; - vio->viokeepalive =vio_keepalive; - vio->should_retry =vio_should_retry; - vio->was_interrupted=vio_was_interrupted; - vio->vioclose =vio_close; - vio->peer_addr =vio_peer_addr; - vio->vioblocking =vio_blocking; - vio->is_blocking =vio_is_blocking; - vio->timeout =vio_timeout; - } - DBUG_VOID_RETURN; -} - - -/* Reset initialized VIO to use with another transport type */ - -void vio_reset(Vio* vio, enum enum_vio_type type, - my_socket sd, HANDLE hPipe, uint flags) -{ - my_free(vio->read_buffer, MYF(MY_ALLOW_ZERO_PTR)); - vio_init(vio, type, sd, hPipe, flags); -} - - -/* Open the socket or TCP/IP connection and read the fnctl() status */ - -Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags) -{ - Vio *vio; - DBUG_ENTER("vio_new"); - DBUG_PRINT("enter", ("sd: %d", sd)); - if ((vio = (Vio*) my_malloc(sizeof(*vio),MYF(MY_WME)))) - { - vio_init(vio, type, sd, 0, flags); - sprintf(vio->desc, - (vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"), - vio->sd); -#if !defined(__WIN__) -#if !defined(NO_FCNTL_NONBLOCK) - /* - We call fcntl() to set the flags and then immediately read them back - to make sure that we and the system are in agreement on the state of - things. - - An example of why we need to do this is FreeBSD (and apparently some - other BSD-derived systems, like Mac OS X), where the system sometimes - reports that the socket is set for non-blocking when it really will - block. - */ - fcntl(sd, F_SETFL, 0); - vio->fcntl_mode= fcntl(sd, F_GETFL); -#elif defined(HAVE_SYS_IOCTL_H) /* hpux */ - /* Non blocking sockets doesn't work good on HPUX 11.0 */ - (void) ioctl(sd,FIOSNBIO,0); - vio->fcntl_mode &= ~O_NONBLOCK; -#endif -#else /* !defined(__WIN__) */ - { - /* set to blocking mode by default */ - ulong arg=0, r; - r = ioctlsocket(sd,FIONBIO,(void*) &arg); - vio->fcntl_mode &= ~O_NONBLOCK; - } -#endif - } - DBUG_RETURN(vio); -} - - -#ifdef __WIN__ - -Vio *vio_new_win32pipe(HANDLE hPipe) -{ - Vio *vio; - DBUG_ENTER("vio_new_handle"); - if ((vio = (Vio*) my_malloc(sizeof(Vio),MYF(MY_WME)))) - { - vio_init(vio, VIO_TYPE_NAMEDPIPE, 0, hPipe, VIO_LOCALHOST); - strmov(vio->desc, "named pipe"); - } - DBUG_RETURN(vio); -} - -#ifdef HAVE_SMEM -Vio *vio_new_win32shared_memory(NET *net,HANDLE handle_file_map, HANDLE handle_map, - HANDLE event_server_wrote, HANDLE event_server_read, - HANDLE event_client_wrote, HANDLE event_client_read, - HANDLE event_conn_closed) -{ - Vio *vio; - DBUG_ENTER("vio_new_win32shared_memory"); - if ((vio = (Vio*) my_malloc(sizeof(Vio),MYF(MY_WME)))) - { - vio_init(vio, VIO_TYPE_SHARED_MEMORY, 0, 0, VIO_LOCALHOST); - vio->handle_file_map= handle_file_map; - vio->handle_map= handle_map; - vio->event_server_wrote= event_server_wrote; - vio->event_server_read= event_server_read; - vio->event_client_wrote= event_client_wrote; - vio->event_client_read= event_client_read; - vio->event_conn_closed= event_conn_closed; - vio->shared_memory_remain= 0; - vio->shared_memory_pos= handle_map; - vio->net= net; - strmov(vio->desc, "shared memory"); - } - DBUG_RETURN(vio); -} -#endif -#endif - - -void vio_delete(Vio* vio) -{ - if (!vio) - return; /* It must be safe to delete null pointers. */ - - if (vio->type != VIO_CLOSED) - vio->vioclose(vio); - my_free((uchar*) vio->read_buffer, MYF(MY_ALLOW_ZERO_PTR)); - my_free((uchar*) vio,MYF(0)); -} - - -/* - Cleanup memory allocated by vio or the - components below it when application finish - -*/ -void vio_end(void) -{ -#ifdef HAVE_YASSL - yaSSL_CleanUp(); -#endif -} diff --git a/externals/mysql/vio/vio_priv.h b/externals/mysql/vio/vio_priv.h deleted file mode 100644 index 54c18dd842..0000000000 --- a/externals/mysql/vio/vio_priv.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Structures and functions private to the vio package */ - -#define DONT_MAP_VIO -#include -#include -#include -#include -#include - -#ifndef __WIN__ -#include -#include -#endif - - -void vio_ignore_timeout(Vio *vio, uint which, uint timeout); -void vio_timeout(Vio *vio,uint which, uint timeout); - -#ifdef HAVE_OPENSSL -#include "my_net.h" /* needed because of struct in_addr */ - -size_t vio_ssl_read(Vio *vio,uchar* buf, size_t size); -size_t vio_ssl_write(Vio *vio,const uchar* buf, size_t size); - -/* When the workday is over... */ -int vio_ssl_close(Vio *vio); -void vio_ssl_delete(Vio *vio); - -int vio_ssl_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode); - -#endif /* HAVE_OPENSSL */ diff --git a/externals/mysql/vio/viosocket.c b/externals/mysql/vio/viosocket.c deleted file mode 100644 index e823f25c24..0000000000 --- a/externals/mysql/vio/viosocket.c +++ /dev/null @@ -1,714 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Note that we can't have assertion on file descriptors; The reason for - this is that during mysql shutdown, another thread can close a file - we are working on. In this case we should just return read errors from - the file descriptior. -*/ - -#include "vio_priv.h" - -int vio_errno(Vio *vio __attribute__((unused))) -{ - return socket_errno; /* On Win32 this mapped to WSAGetLastError() */ -} - - -size_t vio_read(Vio * vio, uchar* buf, size_t size) -{ - size_t r; - DBUG_ENTER("vio_read"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %u", vio->sd, buf, - (uint) size)); - - /* Ensure nobody uses vio_read_buff and vio_read simultaneously */ - DBUG_ASSERT(vio->read_end == vio->read_pos); -#ifdef __WIN__ - r = recv(vio->sd, buf, size,0); -#else - errno=0; /* For linux */ - r = read(vio->sd, buf, size); -#endif /* __WIN__ */ -#ifndef DBUG_OFF - if (r == (size_t) -1) - { - DBUG_PRINT("vio_error", ("Got error %d during read",errno)); - } -#endif /* DBUG_OFF */ - DBUG_PRINT("exit", ("%ld", (long) r)); - DBUG_RETURN(r); -} - - -/* - Buffered read: if average read size is small it may - reduce number of syscalls. -*/ - -size_t vio_read_buff(Vio *vio, uchar* buf, size_t size) -{ - size_t rc; -#define VIO_UNBUFFERED_READ_MIN_SIZE 2048 - DBUG_ENTER("vio_read_buff"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %u", vio->sd, buf, - (uint) size)); - - if (vio->read_pos < vio->read_end) - { - rc= min((size_t) (vio->read_end - vio->read_pos), size); - memcpy(buf, vio->read_pos, rc); - vio->read_pos+= rc; - /* - Do not try to read from the socket now even if rc < size: - vio_read can return -1 due to an error or non-blocking mode, and - the safest way to handle it is to move to a separate branch. - */ - } - else if (size < VIO_UNBUFFERED_READ_MIN_SIZE) - { - rc= vio_read(vio, (uchar*) vio->read_buffer, VIO_READ_BUFFER_SIZE); - if (rc != 0 && rc != (size_t) -1) - { - if (rc > size) - { - vio->read_pos= vio->read_buffer + size; - vio->read_end= vio->read_buffer + rc; - rc= size; - } - memcpy(buf, vio->read_buffer, rc); - } - } - else - rc= vio_read(vio, buf, size); - DBUG_RETURN(rc); -#undef VIO_UNBUFFERED_READ_MIN_SIZE -} - - -size_t vio_write(Vio * vio, const uchar* buf, size_t size) -{ - size_t r; - DBUG_ENTER("vio_write"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %u", vio->sd, buf, - (uint) size)); -#ifdef __WIN__ - r = send(vio->sd, buf, size,0); -#else - r = write(vio->sd, buf, size); -#endif /* __WIN__ */ -#ifndef DBUG_OFF - if (r == (size_t) -1) - { - DBUG_PRINT("vio_error", ("Got error on write: %d",socket_errno)); - } -#endif /* DBUG_OFF */ - DBUG_PRINT("exit", ("%u", (uint) r)); - DBUG_RETURN(r); -} - -int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode, - my_bool *old_mode) -{ - int r=0; - DBUG_ENTER("vio_blocking"); - - *old_mode= test(!(vio->fcntl_mode & O_NONBLOCK)); - DBUG_PRINT("enter", ("set_blocking_mode: %d old_mode: %d", - (int) set_blocking_mode, (int) *old_mode)); - -#if !defined(__WIN__) -#if !defined(NO_FCNTL_NONBLOCK) - if (vio->sd >= 0) - { - int old_fcntl=vio->fcntl_mode; - if (set_blocking_mode) - vio->fcntl_mode &= ~O_NONBLOCK; /* clear bit */ - else - vio->fcntl_mode |= O_NONBLOCK; /* set bit */ - if (old_fcntl != vio->fcntl_mode) - { - r= fcntl(vio->sd, F_SETFL, vio->fcntl_mode); - if (r == -1) - { - DBUG_PRINT("info", ("fcntl failed, errno %d", errno)); - vio->fcntl_mode= old_fcntl; - } - } - } -#else - r= set_blocking_mode ? 0 : 1; -#endif /* !defined(NO_FCNTL_NONBLOCK) */ -#else /* !defined(__WIN__) */ - if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY) - { - ulong arg; - int old_fcntl=vio->fcntl_mode; - if (set_blocking_mode) - { - arg = 0; - vio->fcntl_mode &= ~O_NONBLOCK; /* clear bit */ - } - else - { - arg = 1; - vio->fcntl_mode |= O_NONBLOCK; /* set bit */ - } - if (old_fcntl != vio->fcntl_mode) - r = ioctlsocket(vio->sd,FIONBIO,(void*) &arg); - } - else - r= test(!(vio->fcntl_mode & O_NONBLOCK)) != set_blocking_mode; -#endif /* !defined(__WIN__) */ - DBUG_PRINT("exit", ("%d", r)); - DBUG_RETURN(r); -} - -my_bool -vio_is_blocking(Vio * vio) -{ - my_bool r; - DBUG_ENTER("vio_is_blocking"); - r = !(vio->fcntl_mode & O_NONBLOCK); - DBUG_PRINT("exit", ("%d", (int) r)); - DBUG_RETURN(r); -} - - -int vio_fastsend(Vio * vio __attribute__((unused))) -{ - int r=0; - DBUG_ENTER("vio_fastsend"); - -#if defined(IPTOS_THROUGHPUT) - { - int tos = IPTOS_THROUGHPUT; - r= setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos)); - } -#endif /* IPTOS_THROUGHPUT */ - if (!r) - { -#ifdef __WIN__ - BOOL nodelay= 1; -#else - int nodelay = 1; -#endif - - r= setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, - IF_WIN(const char*, void*) &nodelay, - sizeof(nodelay)); - - } - if (r) - { - DBUG_PRINT("warning", ("Couldn't set socket option for fast send")); - r= -1; - } - DBUG_PRINT("exit", ("%d", r)); - DBUG_RETURN(r); -} - -int vio_keepalive(Vio* vio, my_bool set_keep_alive) -{ - int r=0; - uint opt = 0; - DBUG_ENTER("vio_keepalive"); - DBUG_PRINT("enter", ("sd: %d set_keep_alive: %d", vio->sd, (int) - set_keep_alive)); - if (vio->type != VIO_TYPE_NAMEDPIPE) - { - if (set_keep_alive) - opt = 1; - r = setsockopt(vio->sd, SOL_SOCKET, SO_KEEPALIVE, (char *) &opt, - sizeof(opt)); - } - DBUG_RETURN(r); -} - - -my_bool -vio_should_retry(Vio * vio __attribute__((unused))) -{ - int en = socket_errno; - return (en == SOCKET_EAGAIN || en == SOCKET_EINTR || - en == SOCKET_EWOULDBLOCK); -} - - -my_bool -vio_was_interrupted(Vio *vio __attribute__((unused))) -{ - int en= socket_errno; - return (en == SOCKET_EAGAIN || en == SOCKET_EINTR || - en == SOCKET_EWOULDBLOCK || en == SOCKET_ETIMEDOUT); -} - - -int vio_close(Vio * vio) -{ - int r=0; - DBUG_ENTER("vio_close"); -#ifdef _WIN32 - if (vio->type == VIO_TYPE_NAMEDPIPE) - { -#ifdef MYSQL_SERVER - CancelIo(vio->hPipe); - DisconnectNamedPipe(vio->hPipe); -#endif - r=CloseHandle(vio->hPipe); - } - else -#endif /* _WIN32 */ - if (vio->type != VIO_CLOSED) - { - DBUG_ASSERT(vio->sd >= 0); - if (shutdown(vio->sd, SHUT_RDWR)) - r= -1; - if (closesocket(vio->sd)) - r= -1; - } - if (r) - { - DBUG_PRINT("vio_error", ("close() failed, error: %d",socket_errno)); - /* FIXME: error handling (not critical for MySQL) */ - } - vio->type= VIO_CLOSED; - vio->sd= -1; - DBUG_RETURN(r); -} - - -const char *vio_description(Vio * vio) -{ - return vio->desc; -} - -enum enum_vio_type vio_type(Vio* vio) -{ - return vio->type; -} - -my_socket vio_fd(Vio* vio) -{ - return vio->sd; -} - -my_bool vio_peer_addr(Vio *vio, char *buf, uint16 *port, size_t buflen) -{ - DBUG_ENTER("vio_peer_addr"); - DBUG_PRINT("enter", ("sd: %d", vio->sd)); - - if (vio->localhost) - { - strmov(buf, "127.0.0.1"); - *port= 0; - } - else - { - int error; - char port_buf[NI_MAXSERV]; - socklen_t addrLen = sizeof(vio->remote); - if (getpeername(vio->sd, (struct sockaddr *) (&vio->remote), - &addrLen) != 0) - { - DBUG_PRINT("exit", ("getpeername gave error: %d", socket_errno)); - DBUG_RETURN(1); - } - vio->addrLen= (int)addrLen; - - if ((error= getnameinfo((struct sockaddr *)(&vio->remote), - addrLen, - buf, buflen, - port_buf, NI_MAXSERV, NI_NUMERICHOST|NI_NUMERICSERV))) - { - DBUG_PRINT("exit", ("getnameinfo gave error: %s", - gai_strerror(error))); - DBUG_RETURN(1); - } - - *port= (uint16)strtol(port_buf, (char **)NULL, 10); - - /* - A lot of users do not have IPv6 loopback resolving to localhost - correctly setup. Should this exist? No. If we do not do it though - we will be getting a lot of support questions from users who - have bad setups. This code should be removed by say... 2012. - -Brian - */ - if (!memcmp(buf, "::ffff:127.0.0.1", sizeof("::ffff:127.0.0.1"))) - strmov(buf, "127.0.0.1"); - } - DBUG_PRINT("exit", ("addr: %s", buf)); - DBUG_RETURN(0); -} - - -/* Return 0 if there is data to be read */ - -my_bool vio_poll_read(Vio *vio,uint timeout) -{ -#ifdef __WIN__ - int res; - my_socket fd= vio->sd; - fd_set readfds, errorfds; - struct timeval tm; - DBUG_ENTER("vio_poll"); - tm.tv_sec= timeout; - tm.tv_usec= 0; - FD_ZERO(&readfds); - FD_ZERO(&errorfds); - FD_SET(fd, &readfds); - FD_SET(fd, &errorfds); - /* The first argument is ignored on Windows, so a conversion to int is OK */ - if ((res= select((int) fd, &readfds, NULL, &errorfds, &tm) <= 0)) - { - DBUG_RETURN(res < 0 ? 0 : 1); - } - res= FD_ISSET(fd, &readfds) || FD_ISSET(fd, &errorfds); - DBUG_RETURN(!res); -#elif defined(HAVE_POLL) - struct pollfd fds; - int res; - DBUG_ENTER("vio_poll"); - fds.fd=vio->sd; - fds.events=POLLIN; - fds.revents=0; - if ((res=poll(&fds,1,(int) timeout*1000)) <= 0) - { - DBUG_RETURN(res < 0 ? 0 : 1); /* Don't return 1 on errors */ - } - DBUG_RETURN(fds.revents & (POLLIN | POLLERR | POLLHUP) ? 0 : 1); -#else - return 0; -#endif -} - - -my_bool vio_peek_read(Vio *vio, uint *bytes) -{ -#ifdef __WIN__ - int len; - if (ioctlsocket(vio->sd, FIONREAD, &len)) - return TRUE; - *bytes= len; - return FALSE; -#elif FIONREAD_IN_SYS_IOCTL - int len; - if (ioctl(vio->sd, FIONREAD, &len) < 0) - return TRUE; - *bytes= len; - return FALSE; -#else - char buf[1024]; - ssize_t res= recv(vio->sd, &buf, sizeof(buf), MSG_PEEK); - if (res < 0) - return TRUE; - *bytes= res; - return FALSE; -#endif -} - -void vio_timeout(Vio *vio, uint which, uint timeout) -{ -#if defined(SO_SNDTIMEO) && defined(SO_RCVTIMEO) - int r; - DBUG_ENTER("vio_timeout"); - - { -#ifdef __WIN__ - /* Windows expects time in milliseconds as int */ - int wait_timeout= (int) timeout * 1000; -#else - /* POSIX specifies time as struct timeval. */ - struct timeval wait_timeout; - wait_timeout.tv_sec= timeout; - wait_timeout.tv_usec= 0; -#endif - - r= setsockopt(vio->sd, SOL_SOCKET, which ? SO_SNDTIMEO : SO_RCVTIMEO, - IF_WIN(const char*, const void*)&wait_timeout, - sizeof(wait_timeout)); - - } - -#ifndef DBUG_OFF - if (r != 0) - DBUG_PRINT("error", ("setsockopt failed: %d, errno: %d", r, socket_errno)); -#endif - - DBUG_VOID_RETURN; -#else -/* - Platforms not suporting setting of socket timeout should either use - thr_alarm or just run without read/write timeout(s) -*/ -#endif -} - - -#ifdef __WIN__ -size_t vio_read_pipe(Vio * vio, uchar* buf, size_t size) -{ - DWORD length; - DBUG_ENTER("vio_read_pipe"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %u", vio->sd, buf, - (uint) size)); - - if (!ReadFile(vio->hPipe, buf, size, &length, NULL)) - DBUG_RETURN(-1); - - DBUG_PRINT("exit", ("%d", length)); - DBUG_RETURN((size_t) length); -} - - -size_t vio_write_pipe(Vio * vio, const uchar* buf, size_t size) -{ - DWORD length; - DBUG_ENTER("vio_write_pipe"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %u", vio->sd, buf, - (uint) size)); - - if (!WriteFile(vio->hPipe, (char*) buf, size, &length, NULL)) - DBUG_RETURN(-1); - - DBUG_PRINT("exit", ("%d", length)); - DBUG_RETURN((size_t) length); -} - -int vio_close_pipe(Vio * vio) -{ - int r; - DBUG_ENTER("vio_close_pipe"); -#ifdef MYSQL_SERVER - CancelIo(vio->hPipe); - DisconnectNamedPipe(vio->hPipe); -#endif - r=CloseHandle(vio->hPipe); - if (r) - { - DBUG_PRINT("vio_error", ("close() failed, error: %d",GetLastError())); - /* FIXME: error handling (not critical for MySQL) */ - } - vio->type= VIO_CLOSED; - vio->sd= -1; - DBUG_RETURN(r); -} - - -void vio_ignore_timeout(Vio *vio __attribute__((unused)), - uint which __attribute__((unused)), - uint timeout __attribute__((unused))) -{ -} - - -#ifdef HAVE_SMEM - -size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size) -{ - size_t length; - size_t remain_local; - char *current_postion; - HANDLE events[2]; - - DBUG_ENTER("vio_read_shared_memory"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %d", vio->sd, buf, - size)); - - remain_local = size; - current_postion=buf; - - events[0]= vio->event_server_wrote; - events[1]= vio->event_conn_closed; - - do - { - if (vio->shared_memory_remain == 0) - { - /* - WaitForMultipleObjects can return next values: - WAIT_OBJECT_0+0 - event from vio->event_server_wrote - WAIT_OBJECT_0+1 - event from vio->event_conn_closed. We can't read - anything - WAIT_ABANDONED_0 and WAIT_TIMEOUT - fail. We can't read anything - */ - if (WaitForMultipleObjects(array_elements(events), events, FALSE, - vio->net->read_timeout*1000) != WAIT_OBJECT_0) - { - DBUG_RETURN(-1); - }; - - vio->shared_memory_pos = vio->handle_map; - vio->shared_memory_remain = uint4korr((ulong*)vio->shared_memory_pos); - vio->shared_memory_pos+=4; - } - - length = size; - - if (vio->shared_memory_remain < length) - length = vio->shared_memory_remain; - if (length > remain_local) - length = remain_local; - - memcpy(current_postion,vio->shared_memory_pos,length); - - vio->shared_memory_remain-=length; - vio->shared_memory_pos+=length; - current_postion+=length; - remain_local-=length; - - if (!vio->shared_memory_remain) - { - if (!SetEvent(vio->event_client_read)) - DBUG_RETURN(-1); - } - } while (remain_local); - length = size; - - DBUG_PRINT("exit", ("%lu", (ulong) length)); - DBUG_RETURN(length); -} - - -size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size) -{ - size_t length, remain, sz; - HANDLE pos; - const uchar *current_postion; - HANDLE events[2]; - - DBUG_ENTER("vio_write_shared_memory"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %d", vio->sd, buf, - size)); - - remain = size; - current_postion = buf; - - events[0]= vio->event_server_read; - events[1]= vio->event_conn_closed; - - while (remain != 0) - { - if (WaitForMultipleObjects(array_elements(events), events, FALSE, - vio->net->write_timeout*1000) != WAIT_OBJECT_0) - { - DBUG_RETURN((size_t) -1); - } - - sz= (remain > shared_memory_buffer_length ? shared_memory_buffer_length : - remain); - - int4store(vio->handle_map,sz); - pos = vio->handle_map + 4; - memcpy(pos,current_postion,sz); - remain-=sz; - current_postion+=sz; - if (!SetEvent(vio->event_client_wrote)) - DBUG_RETURN((size_t) -1); - } - length = size; - - DBUG_PRINT("exit", ("%lu", (ulong) length)); - DBUG_RETURN(length); -} - - -/** - Close shared memory and DBUG_PRINT any errors that happen on closing. - @return Zero if all closing functions succeed, and nonzero otherwise. -*/ -int vio_close_shared_memory(Vio * vio) -{ - int error_count= 0; - DBUG_ENTER("vio_close_shared_memory"); - if (vio->type != VIO_CLOSED) - { - /* - Set event_conn_closed for notification of both client and server that - connection is closed - */ - SetEvent(vio->event_conn_closed); - /* - Close all handlers. UnmapViewOfFile and CloseHandle return non-zero - result if they are success. - */ - if (UnmapViewOfFile(vio->handle_map) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("UnmapViewOfFile() failed")); - } - if (CloseHandle(vio->event_server_wrote) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->esw) failed")); - } - if (CloseHandle(vio->event_server_read) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->esr) failed")); - } - if (CloseHandle(vio->event_client_wrote) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->ecw) failed")); - } - if (CloseHandle(vio->event_client_read) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->ecr) failed")); - } - if (CloseHandle(vio->handle_file_map) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->hfm) failed")); - } - if (CloseHandle(vio->event_conn_closed) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->ecc) failed")); - } - } - vio->type= VIO_CLOSED; - vio->sd= -1; - DBUG_RETURN(error_count); -} -#endif /* HAVE_SMEM */ -#endif /* __WIN__ */ - - -/** - Number of bytes in the read buffer. - - @return number of bytes in the read buffer or < 0 if error. -*/ - -ssize_t vio_pending(Vio *vio) -{ -#ifdef HAVE_OPENSSL - SSL *ssl= (SSL*) vio->ssl_arg; -#endif - - if (vio->read_pos < vio->read_end) - return vio->read_end - vio->read_pos; - -#ifdef HAVE_OPENSSL - if (ssl) - return SSL_pending(ssl); -#endif - - return 0; -} diff --git a/externals/mysql/vio/viossl.c b/externals/mysql/vio/viossl.c deleted file mode 100644 index 9cbd74034a..0000000000 --- a/externals/mysql/vio/viossl.c +++ /dev/null @@ -1,279 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Note that we can't have assertion on file descriptors; The reason for - this is that during mysql shutdown, another thread can close a file - we are working on. In this case we should just return read errors from - the file descriptior. -*/ - -#include "vio_priv.h" - -#ifdef HAVE_OPENSSL - -#ifdef __NETWARE__ - -/* yaSSL already uses BSD sockets */ -#ifndef HAVE_YASSL - -/* - The default OpenSSL implementation on NetWare uses WinSock. - This code allows us to use the BSD sockets. -*/ - -static int SSL_set_fd_bsd(SSL *s, int fd) -{ - int result= -1; - BIO_METHOD *BIO_s_bsdsocket(); - BIO *bio; - - if ((bio= BIO_new(BIO_s_bsdsocket()))) - { - result= BIO_set_fd(bio, fd, BIO_NOCLOSE); - SSL_set_bio(s, bio, bio); - } - return result; -} - -#define SSL_set_fd(A, B) SSL_set_fd_bsd((A), (B)) - -#endif /* HAVE_YASSL */ -#endif /* __NETWARE__ */ - - -static void -report_errors(SSL* ssl) -{ - unsigned long l; - const char *file; - const char *data; - int line, flags; -#ifndef DBUG_OFF - char buf[512]; -#endif - - DBUG_ENTER("report_errors"); - - while ((l= ERR_get_error_line_data(&file,&line,&data,&flags))) - { - DBUG_PRINT("error", ("OpenSSL: %s:%s:%d:%s\n", ERR_error_string(l,buf), - file,line,(flags&ERR_TXT_STRING)?data:"")) ; - } - - if (ssl) - DBUG_PRINT("error", ("error: %s", - ERR_error_string(SSL_get_error(ssl, l), buf))); - - DBUG_PRINT("info", ("socket_errno: %d", socket_errno)); - DBUG_VOID_RETURN; -} - - -size_t vio_ssl_read(Vio *vio, uchar* buf, size_t size) -{ - size_t r; - DBUG_ENTER("vio_ssl_read"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %u ssl: %p", - vio->sd, buf, (uint) size, vio->ssl_arg)); - - r= SSL_read((SSL*) vio->ssl_arg, buf, size); -#ifndef DBUG_OFF - if (r == (size_t) -1) - report_errors((SSL*) vio->ssl_arg); -#endif - DBUG_PRINT("exit", ("%u", (uint) r)); - DBUG_RETURN(r); -} - - -size_t vio_ssl_write(Vio *vio, const uchar* buf, size_t size) -{ - size_t r; - DBUG_ENTER("vio_ssl_write"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %u", vio->sd, - buf, (uint) size)); - - r= SSL_write((SSL*) vio->ssl_arg, buf, size); -#ifndef DBUG_OFF - if (r == (size_t) -1) - report_errors((SSL*) vio->ssl_arg); -#endif - DBUG_PRINT("exit", ("%u", (uint) r)); - DBUG_RETURN(r); -} - - -int vio_ssl_close(Vio *vio) -{ - int r= 0; - SSL *ssl= (SSL*)vio->ssl_arg; - DBUG_ENTER("vio_ssl_close"); - - if (ssl) - { - /* - THE SSL standard says that SSL sockets must send and receive a close_notify - alert on socket shutdown to avoid truncation attacks. However, this can - cause problems since we often hold a lock during shutdown and this IO can - take an unbounded amount of time to complete. Since our packets are self - describing with length, we aren't vunerable to these attacks. Therefore, - we just shutdown by closing the socket (quiet shutdown). - */ - SSL_set_quiet_shutdown(ssl, 1); - - switch ((r= SSL_shutdown(ssl))) { - case 1: - /* Shutdown successful */ - break; - case 0: - /* - Shutdown not yet finished - since the socket is going to - be closed there is no need to call SSL_shutdown() a second - time to wait for the other side to respond - */ - break; - default: /* Shutdown failed */ - DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d", - SSL_get_error(ssl, r))); - break; - } - } - DBUG_RETURN(vio_close(vio)); -} - - -void vio_ssl_delete(Vio *vio) -{ - if (!vio) - return; /* It must be safe to delete null pointer */ - - if (vio->type == VIO_TYPE_SSL) - vio_ssl_close(vio); /* Still open, close connection first */ - - if (vio->ssl_arg) - { - SSL_free((SSL*) vio->ssl_arg); - vio->ssl_arg= 0; - } - - vio_delete(vio); -} - -#ifndef EMBEDDED_LIBRARY -static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, - int (*connect_accept_func)(SSL*)) -{ - SSL *ssl; - my_bool unused; - my_bool was_blocking; - - DBUG_ENTER("ssl_do"); - DBUG_PRINT("enter", ("ptr: %p, sd: %d ctx: %p", - ptr, vio->sd, ptr->ssl_context)); - - /* Set socket to blocking if not already set */ - vio_blocking(vio, 1, &was_blocking); - - if (!(ssl= SSL_new(ptr->ssl_context))) - { - DBUG_PRINT("error", ("SSL_new failure")); - report_errors(ssl); - vio_blocking(vio, was_blocking, &unused); - DBUG_RETURN(1); - } - DBUG_PRINT("info", ("ssl: %p timeout: %ld", ssl, timeout)); - SSL_clear(ssl); - SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout); - SSL_set_fd(ssl, vio->sd); - - if (connect_accept_func(ssl) < 1) - { - DBUG_PRINT("error", ("SSL_connect/accept failure")); - report_errors(ssl); - SSL_free(ssl); - vio_blocking(vio, was_blocking, &unused); - DBUG_RETURN(1); - } - - /* - Connection succeeded. Install new function handlers, - change type, set sd to the fd used when connecting - and set pointer to the SSL structure - */ - vio_reset(vio, VIO_TYPE_SSL, SSL_get_fd(ssl), 0, 0); - vio->ssl_arg= (void*)ssl; - -#ifndef DBUG_OFF - { - /* Print some info about the peer */ - X509 *cert; - char buf[512]; - - DBUG_PRINT("info",("SSL connection succeeded")); - DBUG_PRINT("info",("Using cipher: '%s'" , SSL_get_cipher_name(ssl))); - - if ((cert= SSL_get_peer_certificate (ssl))) - { - DBUG_PRINT("info",("Peer certificate:")); - X509_NAME_oneline(X509_get_subject_name(cert), buf, sizeof(buf)); - DBUG_PRINT("info",("\t subject: '%s'", buf)); - X509_NAME_oneline(X509_get_issuer_name(cert), buf, sizeof(buf)); - DBUG_PRINT("info",("\t issuer: '%s'", buf)); - X509_free(cert); - } - else - DBUG_PRINT("info",("Peer does not have certificate.")); - - if (SSL_get_shared_ciphers(ssl, buf, sizeof(buf))) - { - DBUG_PRINT("info",("shared_ciphers: '%s'", buf)); - } - else - DBUG_PRINT("info",("no shared ciphers!")); - } -#endif - - DBUG_RETURN(0); -} - - -int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout) -{ - DBUG_ENTER("sslaccept"); - DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_accept)); -} - - -int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout) -{ - DBUG_ENTER("sslconnect"); - DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_connect)); -} -#endif /*EMBEDDED_LIBRARY*/ - -int vio_ssl_blocking(Vio *vio __attribute__((unused)), - my_bool set_blocking_mode, - my_bool *old_mode) -{ - /* Mode is always blocking */ - *old_mode= 1; - /* Return error if we try to change to non_blocking mode */ - return (set_blocking_mode ? 0 : 1); -} - - - -#endif /* HAVE_OPENSSL */ diff --git a/externals/mysql/vio/viosslfactories.c b/externals/mysql/vio/viosslfactories.c deleted file mode 100644 index 95dbd73d24..0000000000 --- a/externals/mysql/vio/viosslfactories.c +++ /dev/null @@ -1,385 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "vio_priv.h" - -#ifdef HAVE_OPENSSL - -static my_bool ssl_algorithms_added = FALSE; -static my_bool ssl_error_strings_loaded= FALSE; -static int verify_depth = 0; - -static unsigned char dh512_p[]= -{ - 0xDA,0x58,0x3C,0x16,0xD9,0x85,0x22,0x89,0xD0,0xE4,0xAF,0x75, - 0x6F,0x4C,0xCA,0x92,0xDD,0x4B,0xE5,0x33,0xB8,0x04,0xFB,0x0F, - 0xED,0x94,0xEF,0x9C,0x8A,0x44,0x03,0xED,0x57,0x46,0x50,0xD3, - 0x69,0x99,0xDB,0x29,0xD7,0x76,0x27,0x6B,0xA2,0xD3,0xD4,0x12, - 0xE2,0x18,0xF4,0xDD,0x1E,0x08,0x4C,0xF6,0xD8,0x00,0x3E,0x7C, - 0x47,0x74,0xE8,0x33, -}; - -static unsigned char dh512_g[]={ - 0x02, -}; - -static DH *get_dh512(void) -{ - DH *dh; - if ((dh=DH_new())) - { - dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL); - dh->g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL); - if (! dh->p || ! dh->g) - { - DH_free(dh); - dh=0; - } - } - return(dh); -} - - -static void -report_errors() -{ - unsigned long l; - const char* file; - const char* data; - int line,flags; - - DBUG_ENTER("report_errors"); - - while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) - { -#ifndef DBUG_OFF /* Avoid warning */ - char buf[200]; - DBUG_PRINT("error", ("OpenSSL: %s:%s:%d:%s\n", ERR_error_string(l,buf), - file,line,(flags & ERR_TXT_STRING) ? data : "")) ; -#endif - } - DBUG_VOID_RETURN; -} - - -static int -vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) -{ - DBUG_ENTER("vio_set_cert_stuff"); - DBUG_PRINT("enter", ("ctx: %p cert_file: %s key_file: %s", - ctx, cert_file, key_file)); - if (cert_file) - { - if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0) - { - DBUG_PRINT("error",("unable to get certificate from '%s'", cert_file)); - DBUG_EXECUTE("error", ERR_print_errors_fp(DBUG_FILE);); - fprintf(stderr, "SSL error: Unable to get certificate from '%s'\n", - cert_file); - fflush(stderr); - DBUG_RETURN(1); - } - - if (!key_file) - key_file= cert_file; - - if (SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM) <= 0) - { - DBUG_PRINT("error", ("unable to get private key from '%s'", key_file)); - DBUG_EXECUTE("error", ERR_print_errors_fp(DBUG_FILE);); - fprintf(stderr, "SSL error: Unable to get private key from '%s'\n", - key_file); - fflush(stderr); - DBUG_RETURN(1); - } - - /* - If we are using DSA, we can copy the parameters from the private key - Now we know that a key and cert have been set against the SSL context - */ - if (!SSL_CTX_check_private_key(ctx)) - { - DBUG_PRINT("error", - ("Private key does not match the certificate public key")); - DBUG_EXECUTE("error", ERR_print_errors_fp(DBUG_FILE);); - fprintf(stderr, - "SSL error: " - "Private key does not match the certificate public key\n"); - fflush(stderr); - DBUG_RETURN(1); - } - } - DBUG_RETURN(0); -} - - -static int -vio_verify_callback(int ok, X509_STORE_CTX *ctx) -{ - char buf[256]; - X509 *err_cert; - - DBUG_ENTER("vio_verify_callback"); - DBUG_PRINT("enter", ("ok: %d ctx: %p", ok, ctx)); - - err_cert= X509_STORE_CTX_get_current_cert(ctx); - X509_NAME_oneline(X509_get_subject_name(err_cert), buf, sizeof(buf)); - DBUG_PRINT("info", ("cert: %s", buf)); - if (!ok) - { - int err, depth; - err= X509_STORE_CTX_get_error(ctx); - depth= X509_STORE_CTX_get_error_depth(ctx); - - DBUG_PRINT("error",("verify error: %d '%s'",err, - X509_verify_cert_error_string(err))); - /* - Approve cert if depth is greater then "verify_depth", currently - verify_depth is always 0 and there is no way to increase it. - */ - if (verify_depth >= depth) - ok= 1; - } - switch (ctx->error) - { - case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: - X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256); - DBUG_PRINT("info",("issuer= %s\n", buf)); - break; - case X509_V_ERR_CERT_NOT_YET_VALID: - case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: - DBUG_PRINT("error", ("notBefore")); - /*ASN1_TIME_print_fp(stderr,X509_get_notBefore(ctx->current_cert));*/ - break; - case X509_V_ERR_CERT_HAS_EXPIRED: - case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: - DBUG_PRINT("error", ("notAfter error")); - /*ASN1_TIME_print_fp(stderr,X509_get_notAfter(ctx->current_cert));*/ - break; - } - DBUG_PRINT("exit", ("%d", ok)); - DBUG_RETURN(ok); -} - - -#ifdef __NETWARE__ - -/* NetWare SSL cleanup */ -void netware_ssl_cleanup() -{ - /* free memory from SSL_library_init() */ - EVP_cleanup(); - -/* OpenSSL NetWare port specific functions */ -#ifndef HAVE_YASSL - - /* free global X509 method */ - X509_STORE_method_cleanup(); - - /* free the thread_hash error table */ - ERR_free_state_table(); -#endif -} - - -/* NetWare SSL initialization */ -static void netware_ssl_init() -{ - /* cleanup OpenSSL library */ - NXVmRegisterExitHandler(netware_ssl_cleanup, NULL); -} - -#endif /* __NETWARE__ */ - - -static void check_ssl_init() -{ - if (!ssl_algorithms_added) - { - ssl_algorithms_added= TRUE; - SSL_library_init(); - OpenSSL_add_all_algorithms(); - - } - -#ifdef __NETWARE__ - netware_ssl_init(); -#endif - - if (!ssl_error_strings_loaded) - { - ssl_error_strings_loaded= TRUE; - SSL_load_error_strings(); - } -} - -#ifndef EMBEDDED_LIBRARY -/************************ VioSSLFd **********************************/ -static struct st_VioSSLFd * -new_VioSSLFd(const char *key_file, const char *cert_file, - const char *ca_file, const char *ca_path, - const char *cipher, SSL_METHOD *method) -{ - DH *dh; - struct st_VioSSLFd *ssl_fd; - DBUG_ENTER("new_VioSSLFd"); - DBUG_PRINT("enter", - ("key_file: '%s' cert_file: '%s' ca_file: '%s' ca_path: '%s' " - "cipher: '%s'", - key_file ? key_file : "NULL", - cert_file ? cert_file : "NULL", - ca_file ? ca_file : "NULL", - ca_path ? ca_path : "NULL", - cipher ? cipher : "NULL")); - - check_ssl_init(); - - if (!(ssl_fd= ((struct st_VioSSLFd*) - my_malloc(sizeof(struct st_VioSSLFd),MYF(0))))) - DBUG_RETURN(0); - - if (!(ssl_fd->ssl_context= SSL_CTX_new(method))) - { - DBUG_PRINT("error", ("SSL_CTX_new failed")); - report_errors(); - my_free((void*)ssl_fd,MYF(0)); - DBUG_RETURN(0); - } - - /* - Set the ciphers that can be used - NOTE: SSL_CTX_set_cipher_list will return 0 if - none of the provided ciphers could be selected - */ - if (cipher && - SSL_CTX_set_cipher_list(ssl_fd->ssl_context, cipher) == 0) - { - DBUG_PRINT("error", ("failed to set ciphers to use")); - report_errors(); - SSL_CTX_free(ssl_fd->ssl_context); - my_free((void*)ssl_fd,MYF(0)); - DBUG_RETURN(0); - } - - /* Load certs from the trusted ca */ - if (SSL_CTX_load_verify_locations(ssl_fd->ssl_context, ca_file, ca_path) == 0) - { - DBUG_PRINT("warning", ("SSL_CTX_load_verify_locations failed")); - if (SSL_CTX_set_default_verify_paths(ssl_fd->ssl_context) == 0) - { - DBUG_PRINT("error", ("SSL_CTX_set_default_verify_paths failed")); - report_errors(); - SSL_CTX_free(ssl_fd->ssl_context); - my_free((void*)ssl_fd,MYF(0)); - DBUG_RETURN(0); - } - } - - if (vio_set_cert_stuff(ssl_fd->ssl_context, cert_file, key_file)) - { - DBUG_PRINT("error", ("vio_set_cert_stuff failed")); - report_errors(); - SSL_CTX_free(ssl_fd->ssl_context); - my_free((void*)ssl_fd,MYF(0)); - DBUG_RETURN(0); - } - - /* DH stuff */ - dh=get_dh512(); - SSL_CTX_set_tmp_dh(ssl_fd->ssl_context, dh); - DH_free(dh); - - DBUG_PRINT("exit", ("OK 1")); - - DBUG_RETURN(ssl_fd); -} - - -/************************ VioSSLConnectorFd **********************************/ -struct st_VioSSLFd * -new_VioSSLConnectorFd(const char *key_file, const char *cert_file, - const char *ca_file, const char *ca_path, - const char *cipher) -{ - struct st_VioSSLFd *ssl_fd; - int verify= SSL_VERIFY_PEER; - - /* - Turn off verification of servers certificate if both - ca_file and ca_path is set to NULL - */ - if (ca_file == 0 && ca_path == 0) - verify= SSL_VERIFY_NONE; - - if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, - ca_path, cipher, TLSv1_client_method()))) - { - return 0; - } - - /* Init the VioSSLFd as a "connector" ie. the client side */ - - /* - The verify_callback function is used to control the behaviour - when the SSL_VERIFY_PEER flag is set. - */ - SSL_CTX_set_verify(ssl_fd->ssl_context, verify, vio_verify_callback); - - return ssl_fd; -} - - -/************************ VioSSLAcceptorFd **********************************/ -struct st_VioSSLFd * -new_VioSSLAcceptorFd(const char *key_file, const char *cert_file, - const char *ca_file, const char *ca_path, - const char *cipher) -{ - struct st_VioSSLFd *ssl_fd; - int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE; - if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, - ca_path, cipher, TLSv1_server_method()))) - { - return 0; - } - /* Init the the VioSSLFd as a "acceptor" ie. the server side */ - - /* Set max number of cached sessions, returns the previous size */ - SSL_CTX_sess_set_cache_size(ssl_fd->ssl_context, 128); - - /* - The verify_callback function is used to control the behaviour - when the SSL_VERIFY_PEER flag is set. - */ - SSL_CTX_set_verify(ssl_fd->ssl_context, verify, vio_verify_callback); - - /* - Set session_id - an identifier for this server session - Use the ssl_fd pointer - */ - SSL_CTX_set_session_id_context(ssl_fd->ssl_context, - (const unsigned char *)ssl_fd, - sizeof(ssl_fd)); - - return ssl_fd; -} - -void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd) -{ - SSL_CTX_free(fd->ssl_context); - my_free((uchar*) fd, MYF(0)); -} -#endif /*EMBEDDED_LIBRARY*/ -#endif /* HAVE_OPENSSL */ diff --git a/externals/mysql/vio/viotest-ssl.c b/externals/mysql/vio/viotest-ssl.c deleted file mode 100644 index b8abbac4ed..0000000000 --- a/externals/mysql/vio/viotest-ssl.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#ifdef HAVE_OPENSSL -#include -#include -#include -#include "mysql.h" -#include "errmsg.h" -#include -#include -#include -#include - -const char *VER="0.2"; - - -#ifndef DBUG_OFF -const char *default_dbug_option="d:t:O,/tmp/viotest-ssl.trace"; -#endif - -void -fatal_error(const char *r) -{ - perror(r); - exit(0); -} - -void -print_usage() -{ - printf("viossl-test: testing SSL virtual IO. Usage:\n"); - printf("viossl-test server-key server-cert client-key client-cert [CAfile] [CApath]\n"); -} - - -int main(int argc, char **argv) -{ - char* server_key = 0; - char* server_cert = 0; - char* client_key = 0; - char* client_cert = 0; - char* ca_file = 0; - char* ca_path = 0; - int child_pid,sv[2]; - struct st_VioSSLAcceptorFd* ssl_acceptor=0; - struct st_VioSSLConnectorFd* ssl_connector=0; - Vio* client_vio=0; - Vio* server_vio=0; - MY_INIT(argv[0]); - DBUG_PROCESS(argv[0]); - DBUG_PUSH(default_dbug_option); - - if (argc<5) - { - print_usage(); - return 1; - } - - server_key = argv[1]; - server_cert = argv[2]; - client_key = argv[3]; - client_cert = argv[4]; - if (argc>5) - ca_file = argv[5]; - if (argc>6) - ca_path = argv[6]; - printf("Server key/cert : %s/%s\n", server_key, server_cert); - printf("Client key/cert : %s/%s\n", client_key, client_cert); - if (ca_file!=0) - printf("CAfile : %s\n", ca_file); - if (ca_path!=0) - printf("CApath : %s\n", ca_path); - - - if (socketpair(PF_UNIX, SOCK_STREAM, IPPROTO_IP, sv)==-1) - fatal_error("socketpair"); - - ssl_acceptor = new_VioSSLAcceptorFd(server_key, server_cert, ca_file, - ca_path); - ssl_connector = new_VioSSLConnectorFd(client_key, client_cert, ca_file, - ca_path); - - client_vio = (Vio*)my_malloc(sizeof(struct st_vio),MYF(0)); - client_vio->sd = sv[0]; - sslconnect(ssl_connector,client_vio); - server_vio = (Vio*)my_malloc(sizeof(struct st_vio),MYF(0)); - server_vio->sd = sv[1]; - sslaccept(ssl_acceptor,server_vio); - - printf("Socketpair: %d , %d\n", client_vio->sd, server_vio->sd); - - child_pid = fork(); - if (child_pid==-1) - { - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - fatal_error("fork"); - } - if (child_pid==0) - { - /* child, therefore, client */ - char xbuf[100]; - int r = vio_ssl_read(client_vio,xbuf, sizeof(xbuf)); - if (r<=0) { - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - fatal_error("client:SSL_read"); - } - xbuf[r] = 0; - printf("client:got %s\n", xbuf); - my_free((uchar*)client_vio,MYF(0)); - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - sleep(1); - } - else - { - const char* s = "Huhuhuh"; - int r = vio_ssl_write(server_vio,(uchar*)s, strlen(s)); - if (r<=0) { - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - fatal_error("server:SSL_write"); - } - my_free((uchar*)server_vio,MYF(0)); - my_free((uchar*)ssl_acceptor,MYF(0)); - my_free((uchar*)ssl_connector,MYF(0)); - sleep(1); - } - return 0; -} -#else /* HAVE_OPENSSL */ - -int main() { -return 0; -} -#endif /* HAVE_OPENSSL */ diff --git a/externals/mysql/vio/viotest-sslconnect.cc b/externals/mysql/vio/viotest-sslconnect.cc deleted file mode 100644 index 89e1a6e7df..0000000000 --- a/externals/mysql/vio/viotest-sslconnect.cc +++ /dev/null @@ -1,80 +0,0 @@ - -/* -** Virtual I/O library -** Written by Andrei Errapart -*/ - -#include "all.h" - -#include -#include -#include -#include -#include - - -void -fatal_error( const char* r) -{ - perror(r); - exit(0); -} - -void -print_usage() -{ - printf("viotest-sslconnect: testing SSL virtual IO. Usage:\n"); - printf("viotest-sslconnect key cert\n"); -} - -int -main( int argc, - char** argv) -{ - char* key = 0; - char* cert = 0; - - if (argc<3) - { - print_usage(); - return 1; - } - - char ip[4] = {127, 0, 0, 1}; - unsigned long addr = (unsigned long) - ((unsigned long)ip[0]<<24L)| - ((unsigned long)ip[1]<<16L)| - ((unsigned long)ip[2]<< 8L)| - ((unsigned long)ip[3]); - int fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); - if (fd<0) - fatal_error("socket"); - struct sockaddr_in sa; - sa.sin_family = AF_INET; - sa.sin_port=htons(4433); - sa.sin_addr.s_addr=htonl(addr); - int sa_size = sizeof sa; - if (connect(fd, reinterpret_cast(&sa), sa_size)==-1) - fatal_error("connect"); - key = argv[1]; - cert = argv[2]; - printf("Key : %s\n", key); - printf("Cert : %s\n", cert); - - VIO_NS::VioSSLConnectorFd* ssl_connector = new VIO_NS::VioSSLConnectorFd(cert, key,0,0); - - VIO_NS::VioSSL* vio = ssl_connector->connect(fd); - - char xbuf[100]; - int r = vio->read(xbuf, sizeof(xbuf)); - if (r<=0) { - delete ssl_connector; - delete vio; - fatal_error("client:SSL_read"); - } - xbuf[r] = 0; - printf("client:got %s\n", xbuf); - delete vio; - delete ssl_connector; - return 0; -} diff --git a/externals/mysql/vio/viotest.cc b/externals/mysql/vio/viotest.cc deleted file mode 100644 index 490a9ca669..0000000000 --- a/externals/mysql/vio/viotest.cc +++ /dev/null @@ -1,47 +0,0 @@ -/* -** Virtual I/O library -** Written by Andrei Errapart -*/ - -#include "all.h" - -#include -#include -#include - -#include - -VIO_NS_USING; - -int -main( int argc, - char** argv) -{ - VioFd* fs = 0; - VioSocket* ss = 0; - int fd = -1; - char* hh = "hshshsh\n"; - - DBUG_ENTER("main"); - DBUG_PROCESS(argv[0]); - DBUG_PUSH("d:t"); - - fd = open("/dev/tty", O_WRONLY); - if (fd<0) - { - perror("open"); - return 1; - } - fs = new VioFd(fd); - ss = new VioSocket(fd); - if (fs->write(hh,strlen(hh)) < 0) - perror("write"); - ss->write(hh,strlen(hh)); - printf("peer_name:%s\n", ss->peer_name()); - printf("cipher_description:%s\n", ss->cipher_description()); - delete fs; - delete ss; - - DBUG_RETURN(0); -} - diff --git a/externals/mysql/violite.h b/externals/mysql/violite.h deleted file mode 100644 index 2720047b31..0000000000 --- a/externals/mysql/violite.h +++ /dev/null @@ -1,222 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - * Vio Lite. - * Purpose: include file for Vio that will work with C and C++ - */ - -#ifndef vio_violite_h_ -#define vio_violite_h_ - -#include "my_net.h" /* needed because of struct in_addr */ - - -/* Simple vio interface in C; The functions are implemented in violite.c */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -enum enum_vio_type -{ - VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE, - VIO_TYPE_SSL, VIO_TYPE_SHARED_MEMORY -}; - - -#define VIO_LOCALHOST 1 /* a localhost connection */ -#define VIO_BUFFERED_READ 2 /* use buffered read */ -#define VIO_READ_BUFFER_SIZE 16384 /* size of read buffer */ - -Vio* vio_new(my_socket sd, enum enum_vio_type type, uint flags); -#ifdef __WIN__ -Vio* vio_new_win32pipe(HANDLE hPipe); -Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map, - HANDLE handle_map, - HANDLE event_server_wrote, - HANDLE event_server_read, - HANDLE event_client_wrote, - HANDLE event_client_read, - HANDLE event_conn_closed); -size_t vio_read_pipe(Vio *vio, uchar * buf, size_t size); -size_t vio_write_pipe(Vio *vio, const uchar * buf, size_t size); -int vio_close_pipe(Vio * vio); -#else -#define HANDLE void * -#endif /* __WIN__ */ - -void vio_delete(Vio* vio); -int vio_close(Vio* vio); -void vio_reset(Vio* vio, enum enum_vio_type type, - my_socket sd, HANDLE hPipe, uint flags); -size_t vio_read(Vio *vio, uchar * buf, size_t size); -size_t vio_read_buff(Vio *vio, uchar * buf, size_t size); -size_t vio_write(Vio *vio, const uchar * buf, size_t size); -int vio_blocking(Vio *vio, my_bool onoff, my_bool *old_mode); -my_bool vio_is_blocking(Vio *vio); -/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible */ -int vio_fastsend(Vio *vio); -/* setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible */ -int vio_keepalive(Vio *vio, my_bool onoff); -/* Whenever we should retry the last read/write operation. */ -my_bool vio_should_retry(Vio *vio); -/* Check that operation was timed out */ -my_bool vio_was_interrupted(Vio *vio); -/* Short text description of the socket for those, who are curious.. */ -const char* vio_description(Vio *vio); -/* Return the type of the connection */ -enum enum_vio_type vio_type(Vio* vio); -/* Return last error number */ -int vio_errno(Vio*vio); -/* Get socket number */ -my_socket vio_fd(Vio*vio); -/* Remote peer's address and name in text form */ -my_bool vio_peer_addr(Vio *vio, char *buf, uint16 *port, size_t buflen); -my_bool vio_poll_read(Vio *vio,uint timeout); -my_bool vio_peek_read(Vio *vio, uint *bytes); -ssize_t vio_pending(Vio *vio); - -#ifdef HAVE_OPENSSL -#include -#if OPENSSL_VERSION_NUMBER < 0x0090700f -#define DES_cblock des_cblock -#define DES_key_schedule des_key_schedule -#define DES_set_key_unchecked(k,ks) des_set_key_unchecked((k),*(ks)) -#define DES_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e) des_ede3_cbc_encrypt((i),(o),(l),*(k1),*(k2),*(k3),(iv),(e)) -#endif - -#define HEADER_DES_LOCL_H dummy_something -#define YASSL_MYSQL_COMPATIBLE -#ifndef YASSL_PREFIX -#define YASSL_PREFIX -#endif -/* Set yaSSL to use same type as MySQL do for socket handles */ -typedef my_socket YASSL_SOCKET_T; -#define YASSL_SOCKET_T_DEFINED -#include -#include - -#ifndef EMBEDDED_LIBRARY - -struct st_VioSSLFd -{ - SSL_CTX *ssl_context; -}; - -int sslaccept(struct st_VioSSLFd*, Vio *, long timeout); -int sslconnect(struct st_VioSSLFd*, Vio *, long timeout); - -struct st_VioSSLFd -*new_VioSSLConnectorFd(const char *key_file, const char *cert_file, - const char *ca_file, const char *ca_path, - const char *cipher); -struct st_VioSSLFd -*new_VioSSLAcceptorFd(const char *key_file, const char *cert_file, - const char *ca_file,const char *ca_path, - const char *cipher); -void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd); -#endif /* ! EMBEDDED_LIBRARY */ -#endif /* HAVE_OPENSSL */ - -#ifdef HAVE_SMEM -size_t vio_read_shared_memory(Vio *vio, uchar * buf, size_t size); -size_t vio_write_shared_memory(Vio *vio, const uchar * buf, size_t size); -int vio_close_shared_memory(Vio * vio); -#endif - -void vio_end(void); - -#ifdef __cplusplus -} -#endif - -#if !defined(DONT_MAP_VIO) -#define vio_delete(vio) (vio)->viodelete(vio) -#define vio_errno(vio) (vio)->vioerrno(vio) -#define vio_read(vio, buf, size) ((vio)->read)(vio,buf,size) -#define vio_write(vio, buf, size) ((vio)->write)(vio, buf, size) -#define vio_blocking(vio, set_blocking_mode, old_mode)\ - (vio)->vioblocking(vio, set_blocking_mode, old_mode) -#define vio_is_blocking(vio) (vio)->is_blocking(vio) -#define vio_fastsend(vio) (vio)->fastsend(vio) -#define vio_keepalive(vio, set_keep_alive) (vio)->viokeepalive(vio, set_keep_alive) -#define vio_should_retry(vio) (vio)->should_retry(vio) -#define vio_was_interrupted(vio) (vio)->was_interrupted(vio) -#define vio_close(vio) ((vio)->vioclose)(vio) -#define vio_peer_addr(vio, buf, prt, buflen) (vio)->peer_addr(vio, buf, prt, buflen) -#define vio_timeout(vio, which, seconds) (vio)->timeout(vio, which, seconds) -#endif /* !defined(DONT_MAP_VIO) */ - -/* This enumerator is used in parser - should be always visible */ -enum SSL_type -{ - SSL_TYPE_NOT_SPECIFIED= -1, - SSL_TYPE_NONE, - SSL_TYPE_ANY, - SSL_TYPE_X509, - SSL_TYPE_SPECIFIED -}; - - -/* HFTODO - hide this if we don't want client in embedded server */ -/* This structure is for every connection on both sides */ -struct st_vio -{ - my_socket sd; /* my_socket - real or imaginary */ - HANDLE hPipe; - my_bool localhost; /* Are we from localhost? */ - int fcntl_mode; /* Buffered fcntl(sd,F_GETFL) */ - struct sockaddr_storage local; /* Local internet address */ - struct sockaddr_storage remote; /* Remote internet address */ - int addrLen; /* Length of remote address */ - enum enum_vio_type type; /* Type of connection */ - char desc[30]; /* String description */ - char *read_buffer; /* buffer for vio_read_buff */ - char *read_pos; /* start of unfetched data in the - read buffer */ - char *read_end; /* end of unfetched data */ - /* function pointers. They are similar for socket/SSL/whatever */ - void (*viodelete)(Vio*); - int (*vioerrno)(Vio*); - size_t (*read)(Vio*, uchar *, size_t); - size_t (*write)(Vio*, const uchar *, size_t); - int (*vioblocking)(Vio*, my_bool, my_bool *); - my_bool (*is_blocking)(Vio*); - int (*viokeepalive)(Vio*, my_bool); - int (*fastsend)(Vio*); - my_bool (*peer_addr)(Vio*, char *, uint16*, size_t); - void (*in_addr)(Vio*, struct sockaddr_storage*); - my_bool (*should_retry)(Vio*); - my_bool (*was_interrupted)(Vio*); - int (*vioclose)(Vio*); - void (*timeout)(Vio*, unsigned int which, unsigned int timeout); -#ifdef HAVE_OPENSSL - void *ssl_arg; -#endif -#ifdef HAVE_SMEM - HANDLE handle_file_map; - char *handle_map; - HANDLE event_server_wrote; - HANDLE event_server_read; - HANDLE event_client_wrote; - HANDLE event_client_read; - HANDLE event_conn_closed; - size_t shared_memory_remain; - char *shared_memory_pos; - NET *net; -#endif /* HAVE_SMEM */ -}; -#endif /* vio_violite_h_ */ diff --git a/externals/mysql/waiting_threads.h b/externals/mysql/waiting_threads.h deleted file mode 100644 index 1e58052993..0000000000 --- a/externals/mysql/waiting_threads.h +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright (C) 2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _waiting_threads_h -#define _waiting_threads_h - -#include -#include - -#include - -C_MODE_START - -typedef struct st_wt_resource_id WT_RESOURCE_ID; -typedef struct st_wt_resource WT_RESOURCE; - -typedef struct st_wt_resource_type { - my_bool (*compare)(const void *a, const void *b); - const void *(*make_key)(const WT_RESOURCE_ID *id, uint *len); /* not used */ -} WT_RESOURCE_TYPE; - -struct st_wt_resource_id { - ulonglong value; - const WT_RESOURCE_TYPE *type; -}; -/* the below differs from sizeof(WT_RESOURCE_ID) by the amount of padding */ -#define sizeof_WT_RESOURCE_ID (sizeof(ulonglong)+sizeof(void*)) - -#define WT_WAIT_STATS 24 -#define WT_CYCLE_STATS 32 -extern ulonglong wt_wait_table[WT_WAIT_STATS]; -extern uint32 wt_wait_stats[WT_WAIT_STATS+1]; -extern uint32 wt_cycle_stats[2][WT_CYCLE_STATS+1]; -extern uint32 wt_success_stats; - -typedef struct st_wt_thd { - /* - XXX - there's no protection (mutex) against concurrent access of the - dynarray below. it is assumed that a caller will have it anyway - (not to protect this array but to protect its own - caller's - - data structures), and we'll get it for free. A caller needs to - ensure that a blocker won't release a resource before a blocked - thread starts waiting, which is usually done with a mutex. - - If the above assumption is wrong, we'll need to add a mutex here. - */ - DYNAMIC_ARRAY my_resources; - /* - 'waiting_for' is modified under waiting_for->lock, and only by thd itself - 'waiting_for' is read lock-free (using pinning protocol), but a thd object - can read its own 'waiting_for' without any locks or tricks. - */ - WT_RESOURCE *waiting_for; - LF_PINS *pins; - - /* pointers to values */ - const ulong *timeout_short; - const ulong *deadlock_search_depth_short; - const ulong *timeout_long; - const ulong *deadlock_search_depth_long; - - /* - weight relates to the desirability of a transaction being killed if it's - part of a deadlock. In a deadlock situation transactions with lower weights - are killed first. - - Examples of using the weight to implement different selection strategies: - - 1. Latest - Keep all weights equal. - 2. Random - Assight weights at random. - (variant: modify a weight randomly before every lock request) - 3. Youngest - Set weight to -NOW() - 4. Minimum locks - count locks granted in your lock manager, store the value as a weight - 5. Minimum work - depends on the definition of "work". For example, store the number - of rows modifies in this transaction (or a length of REDO log for a - transaction) as a weight. - - It is only statistically relevant and is not protected by any locks. - */ - ulong volatile weight; - /* - 'killed' is indirectly protected by waiting_for->lock because - a killed thread needs to clear its 'waiting_for' and thus needs a lock. - That is a thread needs an exclusive lock to read 'killed' reliably. - But other threads may change 'killed' from 0 to 1, a shared - lock is enough for that. - */ - my_bool killed; -#ifndef DBUG_OFF - const char *name; -#endif -} WT_THD; - -#define WT_TIMEOUT ETIMEDOUT -#define WT_OK 0 -#define WT_DEADLOCK -1 -#define WT_DEPTH_EXCEEDED -2 -#define WT_FREE_TO_GO -3 - -void wt_init(void); -void wt_end(void); -void wt_thd_lazy_init(WT_THD *, const ulong *, const ulong *, const ulong *, const ulong *); -void wt_thd_destroy(WT_THD *); -int wt_thd_will_wait_for(WT_THD *, WT_THD *, const WT_RESOURCE_ID *); -int wt_thd_cond_timedwait(WT_THD *, pthread_mutex_t *); -void wt_thd_release(WT_THD *, const WT_RESOURCE_ID *); -#define wt_thd_release_all(THD) wt_thd_release((THD), 0) -my_bool wt_resource_id_memcmp(const void *, const void *); - -C_MODE_END - -#endif diff --git a/externals/mysql/win/VC90/libmysql.vcproj b/externals/mysql/win/VC90/libmysql.vcproj deleted file mode 100644 index 4534e1ab1a..0000000000 --- a/externals/mysql/win/VC90/libmysql.vcproj +++ /dev/null @@ -1,11143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/externals/mysql/win/libmysql.sln b/externals/mysql/win/libmysql.sln deleted file mode 100644 index 7d0f29bd24..0000000000 --- a/externals/mysql/win/libmysql.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmysql", "VC90\libmysql.vcproj", "{4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Debug|Win32.ActiveCfg = Debug|Win32 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Debug|Win32.Build.0 = Debug|Win32 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Debug|x64.ActiveCfg = Debug|x64 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Debug|x64.Build.0 = Debug|x64 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Release|Win32.ActiveCfg = Release|Win32 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Release|Win32.Build.0 = Release|Win32 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Release|x64.ActiveCfg = Release|x64 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/externals/mysql/wqueue.h b/externals/mysql/wqueue.h deleted file mode 100644 index 658f3d66f1..0000000000 --- a/externals/mysql/wqueue.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef _wqueue_h -#define _wqueue_h - -#include -#include - -/* info about requests in a waiting queue */ -typedef struct st_pagecache_wqueue -{ - struct st_my_thread_var *last_thread; /* circular list of waiting - threads */ -} WQUEUE; - -#ifdef THREAD -void wqueue_link_into_queue(WQUEUE *wqueue, struct st_my_thread_var *thread); -void wqueue_unlink_from_queue(WQUEUE *wqueue, struct st_my_thread_var *thread); -void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread); -void wqueue_add_and_wait(WQUEUE *wqueue, - struct st_my_thread_var *thread, - pthread_mutex_t *lock); -void wqueue_release_queue(WQUEUE *wqueue); -void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue); - -#endif - -#endif diff --git a/externals/openssl/aes.h b/externals/openssl/aes.h deleted file mode 100644 index 450f2b4051..0000000000 --- a/externals/openssl/aes.h +++ /dev/null @@ -1,148 +0,0 @@ -/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */ -/* ==================================================================== - * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - */ - -#ifndef HEADER_AES_H -#define HEADER_AES_H - -#include - -#ifdef OPENSSL_NO_AES -#error AES is disabled. -#endif - -#define AES_ENCRYPT 1 -#define AES_DECRYPT 0 - -/* Because array size can't be a const in C, the following two are macros. - Both sizes are in bytes. */ -#define AES_MAXNR 14 -#define AES_BLOCK_SIZE 16 - -#ifdef OPENSSL_FIPS -#define FIPS_AES_SIZE_T int -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* This should be a hidden type, but EVP requires that the size be known */ -struct aes_key_st { -#ifdef AES_LONG - unsigned long rd_key[4 *(AES_MAXNR + 1)]; -#else - unsigned int rd_key[4 *(AES_MAXNR + 1)]; -#endif - int rounds; -}; -typedef struct aes_key_st AES_KEY; - -const char *AES_options(void); - -int AES_set_encrypt_key(const unsigned char *userKey, const int bits, - AES_KEY *key); -int AES_set_decrypt_key(const unsigned char *userKey, const int bits, - AES_KEY *key); - -void AES_encrypt(const unsigned char *in, unsigned char *out, - const AES_KEY *key); -void AES_decrypt(const unsigned char *in, unsigned char *out, - const AES_KEY *key); - -void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, - const AES_KEY *key, const int enc); -void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, - const unsigned long length, const AES_KEY *key, - unsigned char *ivec, const int enc); -void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, - const unsigned long length, const AES_KEY *key, - unsigned char *ivec, int *num, const int enc); -void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, - const unsigned long length, const AES_KEY *key, - unsigned char *ivec, int *num, const int enc); -void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, - const unsigned long length, const AES_KEY *key, - unsigned char *ivec, int *num, const int enc); -void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out, - const int nbits,const AES_KEY *key, - unsigned char *ivec,const int enc); -void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, - const unsigned long length, const AES_KEY *key, - unsigned char *ivec, int *num); -void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out, - const unsigned long length, const AES_KEY *key, - unsigned char ivec[AES_BLOCK_SIZE], - unsigned char ecount_buf[AES_BLOCK_SIZE], - unsigned int *num); - -/* For IGE, see also http://www.links.org/files/openssl-ige.pdf */ -/* NB: the IV is _two_ blocks long */ -void AES_ige_encrypt(const unsigned char *in, unsigned char *out, - const unsigned long length, const AES_KEY *key, - unsigned char *ivec, const int enc); -/* NB: the IV is _four_ blocks long */ -void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out, - const unsigned long length, const AES_KEY *key, - const AES_KEY *key2, const unsigned char *ivec, - const int enc); - -int AES_wrap_key(AES_KEY *key, const unsigned char *iv, - unsigned char *out, - const unsigned char *in, unsigned int inlen); -int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, - unsigned char *out, - const unsigned char *in, unsigned int inlen); - -#ifdef __cplusplus -} -#endif - -#endif /* !HEADER_AES_H */ diff --git a/externals/openssl/asn1.h b/externals/openssl/asn1.h deleted file mode 100644 index e3385226d4..0000000000 --- a/externals/openssl/asn1.h +++ /dev/null @@ -1,1329 +0,0 @@ -/* crypto/asn1/asn1.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_ASN1_H -#define HEADER_ASN1_H - -#include -#include -#ifndef OPENSSL_NO_BIO -#include -#endif -#include -#include - -#include - -#include -#ifndef OPENSSL_NO_DEPRECATED -#include -#endif - -#ifdef OPENSSL_BUILD_SHLIBCRYPTO -# undef OPENSSL_EXTERN -# define OPENSSL_EXTERN OPENSSL_EXPORT -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define V_ASN1_UNIVERSAL 0x00 -#define V_ASN1_APPLICATION 0x40 -#define V_ASN1_CONTEXT_SPECIFIC 0x80 -#define V_ASN1_PRIVATE 0xc0 - -#define V_ASN1_CONSTRUCTED 0x20 -#define V_ASN1_PRIMITIVE_TAG 0x1f -#define V_ASN1_PRIMATIVE_TAG 0x1f - -#define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */ -#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */ -#define V_ASN1_ANY -4 /* used in ASN1 template code */ - -#define V_ASN1_NEG 0x100 /* negative flag */ - -#define V_ASN1_UNDEF -1 -#define V_ASN1_EOC 0 -#define V_ASN1_BOOLEAN 1 /**/ -#define V_ASN1_INTEGER 2 -#define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG) -#define V_ASN1_BIT_STRING 3 -#define V_ASN1_OCTET_STRING 4 -#define V_ASN1_NULL 5 -#define V_ASN1_OBJECT 6 -#define V_ASN1_OBJECT_DESCRIPTOR 7 -#define V_ASN1_EXTERNAL 8 -#define V_ASN1_REAL 9 -#define V_ASN1_ENUMERATED 10 -#define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG) -#define V_ASN1_UTF8STRING 12 -#define V_ASN1_SEQUENCE 16 -#define V_ASN1_SET 17 -#define V_ASN1_NUMERICSTRING 18 /**/ -#define V_ASN1_PRINTABLESTRING 19 -#define V_ASN1_T61STRING 20 -#define V_ASN1_TELETEXSTRING 20 /* alias */ -#define V_ASN1_VIDEOTEXSTRING 21 /**/ -#define V_ASN1_IA5STRING 22 -#define V_ASN1_UTCTIME 23 -#define V_ASN1_GENERALIZEDTIME 24 /**/ -#define V_ASN1_GRAPHICSTRING 25 /**/ -#define V_ASN1_ISO64STRING 26 /**/ -#define V_ASN1_VISIBLESTRING 26 /* alias */ -#define V_ASN1_GENERALSTRING 27 /**/ -#define V_ASN1_UNIVERSALSTRING 28 /**/ -#define V_ASN1_BMPSTRING 30 - -/* For use with d2i_ASN1_type_bytes() */ -#define B_ASN1_NUMERICSTRING 0x0001 -#define B_ASN1_PRINTABLESTRING 0x0002 -#define B_ASN1_T61STRING 0x0004 -#define B_ASN1_TELETEXSTRING 0x0004 -#define B_ASN1_VIDEOTEXSTRING 0x0008 -#define B_ASN1_IA5STRING 0x0010 -#define B_ASN1_GRAPHICSTRING 0x0020 -#define B_ASN1_ISO64STRING 0x0040 -#define B_ASN1_VISIBLESTRING 0x0040 -#define B_ASN1_GENERALSTRING 0x0080 -#define B_ASN1_UNIVERSALSTRING 0x0100 -#define B_ASN1_OCTET_STRING 0x0200 -#define B_ASN1_BIT_STRING 0x0400 -#define B_ASN1_BMPSTRING 0x0800 -#define B_ASN1_UNKNOWN 0x1000 -#define B_ASN1_UTF8STRING 0x2000 -#define B_ASN1_UTCTIME 0x4000 -#define B_ASN1_GENERALIZEDTIME 0x8000 -#define B_ASN1_SEQUENCE 0x10000 - -/* For use with ASN1_mbstring_copy() */ -#define MBSTRING_FLAG 0x1000 -#define MBSTRING_UTF8 (MBSTRING_FLAG) -#define MBSTRING_ASC (MBSTRING_FLAG|1) -#define MBSTRING_BMP (MBSTRING_FLAG|2) -#define MBSTRING_UNIV (MBSTRING_FLAG|4) - -#define SMIME_OLDMIME 0x400 -#define SMIME_CRLFEOL 0x800 -#define SMIME_STREAM 0x1000 - -struct X509_algor_st; -DECLARE_STACK_OF(X509_ALGOR) - -#define DECLARE_ASN1_SET_OF(type) /* filled in by mkstack.pl */ -#define IMPLEMENT_ASN1_SET_OF(type) /* nothing, no longer needed */ - -/* We MUST make sure that, except for constness, asn1_ctx_st and - asn1_const_ctx are exactly the same. Fortunately, as soon as - the old ASN1 parsing macros are gone, we can throw this away - as well... */ -typedef struct asn1_ctx_st - { - unsigned char *p;/* work char pointer */ - int eos; /* end of sequence read for indefinite encoding */ - int error; /* error code to use when returning an error */ - int inf; /* constructed if 0x20, indefinite is 0x21 */ - int tag; /* tag from last 'get object' */ - int xclass; /* class from last 'get object' */ - long slen; /* length of last 'get object' */ - unsigned char *max; /* largest value of p allowed */ - unsigned char *q;/* temporary variable */ - unsigned char **pp;/* variable */ - int line; /* used in error processing */ - } ASN1_CTX; - -typedef struct asn1_const_ctx_st - { - const unsigned char *p;/* work char pointer */ - int eos; /* end of sequence read for indefinite encoding */ - int error; /* error code to use when returning an error */ - int inf; /* constructed if 0x20, indefinite is 0x21 */ - int tag; /* tag from last 'get object' */ - int xclass; /* class from last 'get object' */ - long slen; /* length of last 'get object' */ - const unsigned char *max; /* largest value of p allowed */ - const unsigned char *q;/* temporary variable */ - const unsigned char **pp;/* variable */ - int line; /* used in error processing */ - } ASN1_const_CTX; - -/* These are used internally in the ASN1_OBJECT to keep track of - * whether the names and data need to be free()ed */ -#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */ -#define ASN1_OBJECT_FLAG_CRITICAL 0x02 /* critical x509v3 object id */ -#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */ -#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */ -typedef struct asn1_object_st - { - const char *sn,*ln; - int nid; - int length; - unsigned char *data; - int flags; /* Should we free this one */ - } ASN1_OBJECT; - -#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */ -/* This indicates that the ASN1_STRING is not a real value but just a place - * holder for the location where indefinite length constructed data should - * be inserted in the memory buffer - */ -#define ASN1_STRING_FLAG_NDEF 0x010 - -/* This flag is used by the CMS code to indicate that a string is not - * complete and is a place holder for content when it had all been - * accessed. The flag will be reset when content has been written to it. - */ -#define ASN1_STRING_FLAG_CONT 0x020 - -/* This is the base type that holds just about everything :-) */ -typedef struct asn1_string_st - { - int length; - int type; - unsigned char *data; - /* The value of the following field depends on the type being - * held. It is mostly being used for BIT_STRING so if the - * input data has a non-zero 'unused bits' value, it will be - * handled correctly */ - long flags; - } ASN1_STRING; - -/* ASN1_ENCODING structure: this is used to save the received - * encoding of an ASN1 type. This is useful to get round - * problems with invalid encodings which can break signatures. - */ - -typedef struct ASN1_ENCODING_st - { - unsigned char *enc; /* DER encoding */ - long len; /* Length of encoding */ - int modified; /* set to 1 if 'enc' is invalid */ - } ASN1_ENCODING; - -/* Used with ASN1 LONG type: if a long is set to this it is omitted */ -#define ASN1_LONG_UNDEF 0x7fffffffL - -#define STABLE_FLAGS_MALLOC 0x01 -#define STABLE_NO_MASK 0x02 -#define DIRSTRING_TYPE \ - (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING) -#define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING) - -typedef struct asn1_string_table_st { - int nid; - long minsize; - long maxsize; - unsigned long mask; - unsigned long flags; -} ASN1_STRING_TABLE; - -DECLARE_STACK_OF(ASN1_STRING_TABLE) - -/* size limits: this stuff is taken straight from RFC2459 */ - -#define ub_name 32768 -#define ub_common_name 64 -#define ub_locality_name 128 -#define ub_state_name 128 -#define ub_organization_name 64 -#define ub_organization_unit_name 64 -#define ub_title 64 -#define ub_email_address 128 - -/* Declarations for template structures: for full definitions - * see asn1t.h - */ -typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE; -typedef struct ASN1_ITEM_st ASN1_ITEM; -typedef struct ASN1_TLC_st ASN1_TLC; -/* This is just an opaque pointer */ -typedef struct ASN1_VALUE_st ASN1_VALUE; - -/* Declare ASN1 functions: the implement macro in in asn1t.h */ - -#define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type) - -#define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \ - DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, type) - -#define DECLARE_ASN1_FUNCTIONS_name(type, name) \ - DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ - DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name) - -#define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \ - DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ - DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) - -#define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \ - type *d2i_##name(type **a, const unsigned char **in, long len); \ - int i2d_##name(type *a, unsigned char **out); \ - DECLARE_ASN1_ITEM(itname) - -#define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \ - type *d2i_##name(type **a, const unsigned char **in, long len); \ - int i2d_##name(const type *a, unsigned char **out); \ - DECLARE_ASN1_ITEM(name) - -#define DECLARE_ASN1_NDEF_FUNCTION(name) \ - int i2d_##name##_NDEF(name *a, unsigned char **out); - -#define DECLARE_ASN1_FUNCTIONS_const(name) \ - DECLARE_ASN1_ALLOC_FUNCTIONS(name) \ - DECLARE_ASN1_ENCODE_FUNCTIONS_const(name, name) - -#define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ - type *name##_new(void); \ - void name##_free(type *a); - -#define D2I_OF(type) type *(*)(type **,const unsigned char **,long) -#define I2D_OF(type) int (*)(type *,unsigned char **) -#define I2D_OF_const(type) int (*)(const type *,unsigned char **) - -#define CHECKED_D2I_OF(type, d2i) \ - ((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0))) -#define CHECKED_I2D_OF(type, i2d) \ - ((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0))) -#define CHECKED_NEW_OF(type, xnew) \ - ((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0))) -#define CHECKED_PTR_OF(type, p) \ - ((void*) (1 ? p : (type*)0)) -#define CHECKED_PPTR_OF(type, p) \ - ((void**) (1 ? p : (type**)0)) - -#define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long) -#define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(type *,unsigned char **) -#define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type) - -TYPEDEF_D2I2D_OF(void); - -/* The following macros and typedefs allow an ASN1_ITEM - * to be embedded in a structure and referenced. Since - * the ASN1_ITEM pointers need to be globally accessible - * (possibly from shared libraries) they may exist in - * different forms. On platforms that support it the - * ASN1_ITEM structure itself will be globally exported. - * Other platforms will export a function that returns - * an ASN1_ITEM pointer. - * - * To handle both cases transparently the macros below - * should be used instead of hard coding an ASN1_ITEM - * pointer in a structure. - * - * The structure will look like this: - * - * typedef struct SOMETHING_st { - * ... - * ASN1_ITEM_EXP *iptr; - * ... - * } SOMETHING; - * - * It would be initialised as e.g.: - * - * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...}; - * - * and the actual pointer extracted with: - * - * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr); - * - * Finally an ASN1_ITEM pointer can be extracted from an - * appropriate reference with: ASN1_ITEM_rptr(X509). This - * would be used when a function takes an ASN1_ITEM * argument. - * - */ - -#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION - -/* ASN1_ITEM pointer exported type */ -typedef const ASN1_ITEM ASN1_ITEM_EXP; - -/* Macro to obtain ASN1_ITEM pointer from exported type */ -#define ASN1_ITEM_ptr(iptr) (iptr) - -/* Macro to include ASN1_ITEM pointer from base type */ -#define ASN1_ITEM_ref(iptr) (&(iptr##_it)) - -#define ASN1_ITEM_rptr(ref) (&(ref##_it)) - -#define DECLARE_ASN1_ITEM(name) \ - OPENSSL_EXTERN const ASN1_ITEM name##_it; - -#else - -/* Platforms that can't easily handle shared global variables are declared - * as functions returning ASN1_ITEM pointers. - */ - -/* ASN1_ITEM pointer exported type */ -typedef const ASN1_ITEM * ASN1_ITEM_EXP(void); - -/* Macro to obtain ASN1_ITEM pointer from exported type */ -#define ASN1_ITEM_ptr(iptr) (iptr()) - -/* Macro to include ASN1_ITEM pointer from base type */ -#define ASN1_ITEM_ref(iptr) (iptr##_it) - -#define ASN1_ITEM_rptr(ref) (ref##_it()) - -#define DECLARE_ASN1_ITEM(name) \ - const ASN1_ITEM * name##_it(void); - -#endif - -/* Parameters used by ASN1_STRING_print_ex() */ - -/* These determine which characters to escape: - * RFC2253 special characters, control characters and - * MSB set characters - */ - -#define ASN1_STRFLGS_ESC_2253 1 -#define ASN1_STRFLGS_ESC_CTRL 2 -#define ASN1_STRFLGS_ESC_MSB 4 - - -/* This flag determines how we do escaping: normally - * RC2253 backslash only, set this to use backslash and - * quote. - */ - -#define ASN1_STRFLGS_ESC_QUOTE 8 - - -/* These three flags are internal use only. */ - -/* Character is a valid PrintableString character */ -#define CHARTYPE_PRINTABLESTRING 0x10 -/* Character needs escaping if it is the first character */ -#define CHARTYPE_FIRST_ESC_2253 0x20 -/* Character needs escaping if it is the last character */ -#define CHARTYPE_LAST_ESC_2253 0x40 - -/* NB the internal flags are safely reused below by flags - * handled at the top level. - */ - -/* If this is set we convert all character strings - * to UTF8 first - */ - -#define ASN1_STRFLGS_UTF8_CONVERT 0x10 - -/* If this is set we don't attempt to interpret content: - * just assume all strings are 1 byte per character. This - * will produce some pretty odd looking output! - */ - -#define ASN1_STRFLGS_IGNORE_TYPE 0x20 - -/* If this is set we include the string type in the output */ -#define ASN1_STRFLGS_SHOW_TYPE 0x40 - -/* This determines which strings to display and which to - * 'dump' (hex dump of content octets or DER encoding). We can - * only dump non character strings or everything. If we - * don't dump 'unknown' they are interpreted as character - * strings with 1 octet per character and are subject to - * the usual escaping options. - */ - -#define ASN1_STRFLGS_DUMP_ALL 0x80 -#define ASN1_STRFLGS_DUMP_UNKNOWN 0x100 - -/* These determine what 'dumping' does, we can dump the - * content octets or the DER encoding: both use the - * RFC2253 #XXXXX notation. - */ - -#define ASN1_STRFLGS_DUMP_DER 0x200 - -/* All the string flags consistent with RFC2253, - * escaping control characters isn't essential in - * RFC2253 but it is advisable anyway. - */ - -#define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | \ - ASN1_STRFLGS_ESC_CTRL | \ - ASN1_STRFLGS_ESC_MSB | \ - ASN1_STRFLGS_UTF8_CONVERT | \ - ASN1_STRFLGS_DUMP_UNKNOWN | \ - ASN1_STRFLGS_DUMP_DER) - -DECLARE_STACK_OF(ASN1_INTEGER) -DECLARE_ASN1_SET_OF(ASN1_INTEGER) - -DECLARE_STACK_OF(ASN1_GENERALSTRING) - -typedef struct asn1_type_st - { - int type; - union { - char *ptr; - ASN1_BOOLEAN boolean; - ASN1_STRING * asn1_string; - ASN1_OBJECT * object; - ASN1_INTEGER * integer; - ASN1_ENUMERATED * enumerated; - ASN1_BIT_STRING * bit_string; - ASN1_OCTET_STRING * octet_string; - ASN1_PRINTABLESTRING * printablestring; - ASN1_T61STRING * t61string; - ASN1_IA5STRING * ia5string; - ASN1_GENERALSTRING * generalstring; - ASN1_BMPSTRING * bmpstring; - ASN1_UNIVERSALSTRING * universalstring; - ASN1_UTCTIME * utctime; - ASN1_GENERALIZEDTIME * generalizedtime; - ASN1_VISIBLESTRING * visiblestring; - ASN1_UTF8STRING * utf8string; - /* set and sequence are left complete and still - * contain the set or sequence bytes */ - ASN1_STRING * set; - ASN1_STRING * sequence; - ASN1_VALUE * asn1_value; - } value; - } ASN1_TYPE; - -DECLARE_STACK_OF(ASN1_TYPE) -DECLARE_ASN1_SET_OF(ASN1_TYPE) - -typedef struct asn1_method_st - { - i2d_of_void *i2d; - d2i_of_void *d2i; - void *(*create)(void); - void (*destroy)(void *); - } ASN1_METHOD; - -/* This is used when parsing some Netscape objects */ -typedef struct asn1_header_st - { - ASN1_OCTET_STRING *header; - void *data; - ASN1_METHOD *meth; - } ASN1_HEADER; - -/* This is used to contain a list of bit names */ -typedef struct BIT_STRING_BITNAME_st { - int bitnum; - const char *lname; - const char *sname; -} BIT_STRING_BITNAME; - - -#define M_ASN1_STRING_length(x) ((x)->length) -#define M_ASN1_STRING_length_set(x, n) ((x)->length = (n)) -#define M_ASN1_STRING_type(x) ((x)->type) -#define M_ASN1_STRING_data(x) ((x)->data) - -/* Macros for string operations */ -#define M_ASN1_BIT_STRING_new() (ASN1_BIT_STRING *)\ - ASN1_STRING_type_new(V_ASN1_BIT_STRING) -#define M_ASN1_BIT_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_ASN1_BIT_STRING_dup(a) (ASN1_BIT_STRING *)\ - ASN1_STRING_dup((ASN1_STRING *)a) -#define M_ASN1_BIT_STRING_cmp(a,b) ASN1_STRING_cmp(\ - (ASN1_STRING *)a,(ASN1_STRING *)b) -#define M_ASN1_BIT_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c) - -#define M_ASN1_INTEGER_new() (ASN1_INTEGER *)\ - ASN1_STRING_type_new(V_ASN1_INTEGER) -#define M_ASN1_INTEGER_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_ASN1_INTEGER_dup(a) (ASN1_INTEGER *)ASN1_STRING_dup((ASN1_STRING *)a) -#define M_ASN1_INTEGER_cmp(a,b) ASN1_STRING_cmp(\ - (ASN1_STRING *)a,(ASN1_STRING *)b) - -#define M_ASN1_ENUMERATED_new() (ASN1_ENUMERATED *)\ - ASN1_STRING_type_new(V_ASN1_ENUMERATED) -#define M_ASN1_ENUMERATED_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_ASN1_ENUMERATED_dup(a) (ASN1_ENUMERATED *)ASN1_STRING_dup((ASN1_STRING *)a) -#define M_ASN1_ENUMERATED_cmp(a,b) ASN1_STRING_cmp(\ - (ASN1_STRING *)a,(ASN1_STRING *)b) - -#define M_ASN1_OCTET_STRING_new() (ASN1_OCTET_STRING *)\ - ASN1_STRING_type_new(V_ASN1_OCTET_STRING) -#define M_ASN1_OCTET_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_ASN1_OCTET_STRING_dup(a) (ASN1_OCTET_STRING *)\ - ASN1_STRING_dup((ASN1_STRING *)a) -#define M_ASN1_OCTET_STRING_cmp(a,b) ASN1_STRING_cmp(\ - (ASN1_STRING *)a,(ASN1_STRING *)b) -#define M_ASN1_OCTET_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c) -#define M_ASN1_OCTET_STRING_print(a,b) ASN1_STRING_print(a,(ASN1_STRING *)b) -#define M_i2d_ASN1_OCTET_STRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_OCTET_STRING,\ - V_ASN1_UNIVERSAL) - -#define B_ASN1_TIME \ - B_ASN1_UTCTIME | \ - B_ASN1_GENERALIZEDTIME - -#define B_ASN1_PRINTABLE \ - B_ASN1_NUMERICSTRING| \ - B_ASN1_PRINTABLESTRING| \ - B_ASN1_T61STRING| \ - B_ASN1_IA5STRING| \ - B_ASN1_BIT_STRING| \ - B_ASN1_UNIVERSALSTRING|\ - B_ASN1_BMPSTRING|\ - B_ASN1_UTF8STRING|\ - B_ASN1_SEQUENCE|\ - B_ASN1_UNKNOWN - -#define B_ASN1_DIRECTORYSTRING \ - B_ASN1_PRINTABLESTRING| \ - B_ASN1_TELETEXSTRING|\ - B_ASN1_BMPSTRING|\ - B_ASN1_UNIVERSALSTRING|\ - B_ASN1_UTF8STRING - -#define B_ASN1_DISPLAYTEXT \ - B_ASN1_IA5STRING| \ - B_ASN1_VISIBLESTRING| \ - B_ASN1_BMPSTRING|\ - B_ASN1_UTF8STRING - -#define M_ASN1_PRINTABLE_new() ASN1_STRING_type_new(V_ASN1_T61STRING) -#define M_ASN1_PRINTABLE_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_ASN1_PRINTABLE(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\ - pp,a->type,V_ASN1_UNIVERSAL) -#define M_d2i_ASN1_PRINTABLE(a,pp,l) \ - d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \ - B_ASN1_PRINTABLE) - -#define M_DIRECTORYSTRING_new() ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING) -#define M_DIRECTORYSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_DIRECTORYSTRING(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\ - pp,a->type,V_ASN1_UNIVERSAL) -#define M_d2i_DIRECTORYSTRING(a,pp,l) \ - d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \ - B_ASN1_DIRECTORYSTRING) - -#define M_DISPLAYTEXT_new() ASN1_STRING_type_new(V_ASN1_VISIBLESTRING) -#define M_DISPLAYTEXT_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_DISPLAYTEXT(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\ - pp,a->type,V_ASN1_UNIVERSAL) -#define M_d2i_DISPLAYTEXT(a,pp,l) \ - d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \ - B_ASN1_DISPLAYTEXT) - -#define M_ASN1_PRINTABLESTRING_new() (ASN1_PRINTABLESTRING *)\ - ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING) -#define M_ASN1_PRINTABLESTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_ASN1_PRINTABLESTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_PRINTABLESTRING,\ - V_ASN1_UNIVERSAL) -#define M_d2i_ASN1_PRINTABLESTRING(a,pp,l) \ - (ASN1_PRINTABLESTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_PRINTABLESTRING) - -#define M_ASN1_T61STRING_new() (ASN1_T61STRING *)\ - ASN1_STRING_type_new(V_ASN1_T61STRING) -#define M_ASN1_T61STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_ASN1_T61STRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_T61STRING,\ - V_ASN1_UNIVERSAL) -#define M_d2i_ASN1_T61STRING(a,pp,l) \ - (ASN1_T61STRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_T61STRING) - -#define M_ASN1_IA5STRING_new() (ASN1_IA5STRING *)\ - ASN1_STRING_type_new(V_ASN1_IA5STRING) -#define M_ASN1_IA5STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_ASN1_IA5STRING_dup(a) \ - (ASN1_IA5STRING *)ASN1_STRING_dup((ASN1_STRING *)a) -#define M_i2d_ASN1_IA5STRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_IA5STRING,\ - V_ASN1_UNIVERSAL) -#define M_d2i_ASN1_IA5STRING(a,pp,l) \ - (ASN1_IA5STRING *)d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l,\ - B_ASN1_IA5STRING) - -#define M_ASN1_UTCTIME_new() (ASN1_UTCTIME *)\ - ASN1_STRING_type_new(V_ASN1_UTCTIME) -#define M_ASN1_UTCTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_ASN1_UTCTIME_dup(a) (ASN1_UTCTIME *)ASN1_STRING_dup((ASN1_STRING *)a) - -#define M_ASN1_GENERALIZEDTIME_new() (ASN1_GENERALIZEDTIME *)\ - ASN1_STRING_type_new(V_ASN1_GENERALIZEDTIME) -#define M_ASN1_GENERALIZEDTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_ASN1_GENERALIZEDTIME_dup(a) (ASN1_GENERALIZEDTIME *)ASN1_STRING_dup(\ - (ASN1_STRING *)a) - -#define M_ASN1_TIME_new() (ASN1_TIME *)\ - ASN1_STRING_type_new(V_ASN1_UTCTIME) -#define M_ASN1_TIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_ASN1_TIME_dup(a) (ASN1_TIME *)ASN1_STRING_dup((ASN1_STRING *)a) - -#define M_ASN1_GENERALSTRING_new() (ASN1_GENERALSTRING *)\ - ASN1_STRING_type_new(V_ASN1_GENERALSTRING) -#define M_ASN1_GENERALSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_ASN1_GENERALSTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_GENERALSTRING,\ - V_ASN1_UNIVERSAL) -#define M_d2i_ASN1_GENERALSTRING(a,pp,l) \ - (ASN1_GENERALSTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_GENERALSTRING) - -#define M_ASN1_UNIVERSALSTRING_new() (ASN1_UNIVERSALSTRING *)\ - ASN1_STRING_type_new(V_ASN1_UNIVERSALSTRING) -#define M_ASN1_UNIVERSALSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_ASN1_UNIVERSALSTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_UNIVERSALSTRING,\ - V_ASN1_UNIVERSAL) -#define M_d2i_ASN1_UNIVERSALSTRING(a,pp,l) \ - (ASN1_UNIVERSALSTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_UNIVERSALSTRING) - -#define M_ASN1_BMPSTRING_new() (ASN1_BMPSTRING *)\ - ASN1_STRING_type_new(V_ASN1_BMPSTRING) -#define M_ASN1_BMPSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_ASN1_BMPSTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_BMPSTRING,\ - V_ASN1_UNIVERSAL) -#define M_d2i_ASN1_BMPSTRING(a,pp,l) \ - (ASN1_BMPSTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_BMPSTRING) - -#define M_ASN1_VISIBLESTRING_new() (ASN1_VISIBLESTRING *)\ - ASN1_STRING_type_new(V_ASN1_VISIBLESTRING) -#define M_ASN1_VISIBLESTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_ASN1_VISIBLESTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_VISIBLESTRING,\ - V_ASN1_UNIVERSAL) -#define M_d2i_ASN1_VISIBLESTRING(a,pp,l) \ - (ASN1_VISIBLESTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_VISIBLESTRING) - -#define M_ASN1_UTF8STRING_new() (ASN1_UTF8STRING *)\ - ASN1_STRING_type_new(V_ASN1_UTF8STRING) -#define M_ASN1_UTF8STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -#define M_i2d_ASN1_UTF8STRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_UTF8STRING,\ - V_ASN1_UNIVERSAL) -#define M_d2i_ASN1_UTF8STRING(a,pp,l) \ - (ASN1_UTF8STRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING) - - /* for the is_set parameter to i2d_ASN1_SET */ -#define IS_SEQUENCE 0 -#define IS_SET 1 - -DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) - -int ASN1_TYPE_get(ASN1_TYPE *a); -void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); -int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); - -ASN1_OBJECT * ASN1_OBJECT_new(void ); -void ASN1_OBJECT_free(ASN1_OBJECT *a); -int i2d_ASN1_OBJECT(ASN1_OBJECT *a,unsigned char **pp); -ASN1_OBJECT * c2i_ASN1_OBJECT(ASN1_OBJECT **a,const unsigned char **pp, - long length); -ASN1_OBJECT * d2i_ASN1_OBJECT(ASN1_OBJECT **a,const unsigned char **pp, - long length); - -DECLARE_ASN1_ITEM(ASN1_OBJECT) - -DECLARE_STACK_OF(ASN1_OBJECT) -DECLARE_ASN1_SET_OF(ASN1_OBJECT) - -ASN1_STRING * ASN1_STRING_new(void); -void ASN1_STRING_free(ASN1_STRING *a); -ASN1_STRING * ASN1_STRING_dup(ASN1_STRING *a); -ASN1_STRING * ASN1_STRING_type_new(int type ); -int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b); - /* Since this is used to store all sorts of things, via macros, for now, make - its data void * */ -int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len); -void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len); -int ASN1_STRING_length(ASN1_STRING *x); -void ASN1_STRING_length_set(ASN1_STRING *x, int n); -int ASN1_STRING_type(ASN1_STRING *x); -unsigned char * ASN1_STRING_data(ASN1_STRING *x); - -DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING) -int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a,unsigned char **pp); -ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,const unsigned char **pp, - long length); -int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, - int length ); -int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value); -int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n); - -#ifndef OPENSSL_NO_BIO -int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, - BIT_STRING_BITNAME *tbl, int indent); -#endif -int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl); -int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value, - BIT_STRING_BITNAME *tbl); - -int i2d_ASN1_BOOLEAN(int a,unsigned char **pp); -int d2i_ASN1_BOOLEAN(int *a,const unsigned char **pp,long length); - -DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER) -int i2c_ASN1_INTEGER(ASN1_INTEGER *a,unsigned char **pp); -ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a,const unsigned char **pp, - long length); -ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a,const unsigned char **pp, - long length); -ASN1_INTEGER * ASN1_INTEGER_dup(ASN1_INTEGER *x); -int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y); - -DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED) - -int ASN1_UTCTIME_check(ASN1_UTCTIME *a); -ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t); -int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str); -int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); -#if 0 -time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s); -#endif - -int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a); -ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t); -int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str); - -DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING) -ASN1_OCTET_STRING * ASN1_OCTET_STRING_dup(ASN1_OCTET_STRING *a); -int ASN1_OCTET_STRING_cmp(ASN1_OCTET_STRING *a, ASN1_OCTET_STRING *b); -int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data, int len); - -DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING) -DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING) -DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING) -DECLARE_ASN1_FUNCTIONS(ASN1_NULL) -DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING) - -int UTF8_getc(const unsigned char *str, int len, unsigned long *val); -int UTF8_putc(unsigned char *str, int len, unsigned long value); - -DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE) - -DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING) -DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT) -DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING) -DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING) -DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING) -DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING) -DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME) -DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME) -DECLARE_ASN1_FUNCTIONS(ASN1_TIME) - -DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF) - -ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t); -int ASN1_TIME_check(ASN1_TIME *t); -ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out); - -int i2d_ASN1_SET(STACK *a, unsigned char **pp, - i2d_of_void *i2d, int ex_tag, int ex_class, int is_set); -STACK * d2i_ASN1_SET(STACK **a, const unsigned char **pp, long length, - d2i_of_void *d2i, void (*free_func)(void *), - int ex_tag, int ex_class); - -#ifndef OPENSSL_NO_BIO -int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); -int a2i_ASN1_INTEGER(BIO *bp,ASN1_INTEGER *bs,char *buf,int size); -int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a); -int a2i_ASN1_ENUMERATED(BIO *bp,ASN1_ENUMERATED *bs,char *buf,int size); -int i2a_ASN1_OBJECT(BIO *bp,ASN1_OBJECT *a); -int a2i_ASN1_STRING(BIO *bp,ASN1_STRING *bs,char *buf,int size); -int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type); -#endif -int i2t_ASN1_OBJECT(char *buf,int buf_len,ASN1_OBJECT *a); - -int a2d_ASN1_OBJECT(unsigned char *out,int olen, const char *buf, int num); -ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data,int len, - const char *sn, const char *ln); - -int ASN1_INTEGER_set(ASN1_INTEGER *a, long v); -long ASN1_INTEGER_get(ASN1_INTEGER *a); -ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai); -BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai,BIGNUM *bn); - -int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v); -long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a); -ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai); -BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai,BIGNUM *bn); - -/* General */ -/* given a string, return the correct type, max is the maximum length */ -int ASN1_PRINTABLE_type(const unsigned char *s, int max); - -int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass); -ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp, - long length, int Ptag, int Pclass); -unsigned long ASN1_tag2bit(int tag); -/* type is one or more of the B_ASN1_ values. */ -ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a,const unsigned char **pp, - long length,int type); - -/* PARSING */ -int asn1_Finish(ASN1_CTX *c); -int asn1_const_Finish(ASN1_const_CTX *c); - -/* SPECIALS */ -int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag, - int *pclass, long omax); -int ASN1_check_infinite_end(unsigned char **p,long len); -int ASN1_const_check_infinite_end(const unsigned char **p,long len); -void ASN1_put_object(unsigned char **pp, int constructed, int length, - int tag, int xclass); -int ASN1_put_eoc(unsigned char **pp); -int ASN1_object_size(int constructed, int length, int tag); - -/* Used to implement other functions */ -void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x); - -#define ASN1_dup_of(type,i2d,d2i,x) \ - ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \ - CHECKED_D2I_OF(type, d2i), \ - CHECKED_PTR_OF(type, x))) - -#define ASN1_dup_of_const(type,i2d,d2i,x) \ - ((type*)ASN1_dup(CHECKED_I2D_OF(const type, i2d), \ - CHECKED_D2I_OF(type, d2i), \ - CHECKED_PTR_OF(const type, x))) - -void *ASN1_item_dup(const ASN1_ITEM *it, void *x); - -/* ASN1 alloc/free macros for when a type is only used internally */ - -#define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type)) -#define M_ASN1_free_of(x, type) \ - ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type)) - -#ifndef OPENSSL_NO_FP_API -void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x); - -#define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \ - ((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \ - CHECKED_D2I_OF(type, d2i), \ - in, \ - CHECKED_PPTR_OF(type, x))) - -void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x); -int ASN1_i2d_fp(i2d_of_void *i2d,FILE *out,void *x); - -#define ASN1_i2d_fp_of(type,i2d,out,x) \ - (ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \ - out, \ - CHECKED_PTR_OF(type, x))) - -#define ASN1_i2d_fp_of_const(type,i2d,out,x) \ - (ASN1_i2d_fp(CHECKED_I2D_OF(const type, i2d), \ - out, \ - CHECKED_PTR_OF(const type, x))) - -int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x); -int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags); -#endif - -int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in); - -#ifndef OPENSSL_NO_BIO -void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x); - -#define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \ - ((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \ - CHECKED_D2I_OF(type, d2i), \ - in, \ - CHECKED_PPTR_OF(type, x))) - -void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x); -int ASN1_i2d_bio(i2d_of_void *i2d,BIO *out, unsigned char *x); - -#define ASN1_i2d_bio_of(type,i2d,out,x) \ - (ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \ - out, \ - CHECKED_PTR_OF(type, x))) - -#define ASN1_i2d_bio_of_const(type,i2d,out,x) \ - (ASN1_i2d_bio(CHECKED_I2D_OF(const type, i2d), \ - out, \ - CHECKED_PTR_OF(const type, x))) - -int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); -int ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a); -int ASN1_GENERALIZEDTIME_print(BIO *fp,ASN1_GENERALIZEDTIME *a); -int ASN1_TIME_print(BIO *fp,ASN1_TIME *a); -int ASN1_STRING_print(BIO *bp,ASN1_STRING *v); -int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags); -int ASN1_parse(BIO *bp,const unsigned char *pp,long len,int indent); -int ASN1_parse_dump(BIO *bp,const unsigned char *pp,long len,int indent,int dump); -#endif -const char *ASN1_tag2str(int tag); - -/* Used to load and write netscape format cert/key */ -int i2d_ASN1_HEADER(ASN1_HEADER *a,unsigned char **pp); -ASN1_HEADER *d2i_ASN1_HEADER(ASN1_HEADER **a,const unsigned char **pp, long length); -ASN1_HEADER *ASN1_HEADER_new(void ); -void ASN1_HEADER_free(ASN1_HEADER *a); - -int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s); - -/* Not used that much at this point, except for the first two */ -ASN1_METHOD *X509_asn1_meth(void); -ASN1_METHOD *RSAPrivateKey_asn1_meth(void); -ASN1_METHOD *ASN1_IA5STRING_asn1_meth(void); -ASN1_METHOD *ASN1_BIT_STRING_asn1_meth(void); - -int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, - unsigned char *data, int len); -int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, - unsigned char *data, int max_len); -int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, - unsigned char *data, int len); -int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num, - unsigned char *data, int max_len); - -STACK *ASN1_seq_unpack(const unsigned char *buf, int len, - d2i_of_void *d2i, void (*free_func)(void *)); -unsigned char *ASN1_seq_pack(STACK *safes, i2d_of_void *i2d, - unsigned char **buf, int *len ); -void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i); -void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); -ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, - ASN1_OCTET_STRING **oct); - -#define ASN1_pack_string_of(type,obj,i2d,oct) \ - (ASN1_pack_string(CHECKED_PTR_OF(type, obj), \ - CHECKED_I2D_OF(type, i2d), \ - oct)) - -ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); - -void ASN1_STRING_set_default_mask(unsigned long mask); -int ASN1_STRING_set_default_mask_asc(char *p); -unsigned long ASN1_STRING_get_default_mask(void); -int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, - int inform, unsigned long mask); -int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, - int inform, unsigned long mask, - long minsize, long maxsize); - -ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, - const unsigned char *in, int inlen, int inform, int nid); -ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid); -int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long); -void ASN1_STRING_TABLE_cleanup(void); - -/* ASN1 template functions */ - -/* Old API compatible functions */ -ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it); -void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it); -ASN1_VALUE * ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_ITEM *it); -int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); -int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); - -void ASN1_add_oid_module(void); - -ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf); -ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf); - -typedef int asn1_output_data_fn(BIO *out, BIO *data, ASN1_VALUE *val, int flags, - const ASN1_ITEM *it); - -int int_smime_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, - int ctype_nid, int econt_nid, - STACK_OF(X509_ALGOR) *mdalgs, - asn1_output_data_fn *data_fn, - const ASN1_ITEM *it); -ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_ASN1_strings(void); - -/* Error codes for the ASN1 functions. */ - -/* Function codes. */ -#define ASN1_F_A2D_ASN1_OBJECT 100 -#define ASN1_F_A2I_ASN1_ENUMERATED 101 -#define ASN1_F_A2I_ASN1_INTEGER 102 -#define ASN1_F_A2I_ASN1_STRING 103 -#define ASN1_F_APPEND_EXP 176 -#define ASN1_F_ASN1_BIT_STRING_SET_BIT 183 -#define ASN1_F_ASN1_CB 177 -#define ASN1_F_ASN1_CHECK_TLEN 104 -#define ASN1_F_ASN1_COLLATE_PRIMITIVE 105 -#define ASN1_F_ASN1_COLLECT 106 -#define ASN1_F_ASN1_D2I_EX_PRIMITIVE 108 -#define ASN1_F_ASN1_D2I_FP 109 -#define ASN1_F_ASN1_D2I_READ_BIO 107 -#define ASN1_F_ASN1_DIGEST 184 -#define ASN1_F_ASN1_DO_ADB 110 -#define ASN1_F_ASN1_DUP 111 -#define ASN1_F_ASN1_ENUMERATED_SET 112 -#define ASN1_F_ASN1_ENUMERATED_TO_BN 113 -#define ASN1_F_ASN1_EX_C2I 204 -#define ASN1_F_ASN1_FIND_END 190 -#define ASN1_F_ASN1_GENERALIZEDTIME_SET 185 -#define ASN1_F_ASN1_GENERATE_V3 178 -#define ASN1_F_ASN1_GET_OBJECT 114 -#define ASN1_F_ASN1_HEADER_NEW 115 -#define ASN1_F_ASN1_I2D_BIO 116 -#define ASN1_F_ASN1_I2D_FP 117 -#define ASN1_F_ASN1_INTEGER_SET 118 -#define ASN1_F_ASN1_INTEGER_TO_BN 119 -#define ASN1_F_ASN1_ITEM_D2I_FP 206 -#define ASN1_F_ASN1_ITEM_DUP 191 -#define ASN1_F_ASN1_ITEM_EX_COMBINE_NEW 121 -#define ASN1_F_ASN1_ITEM_EX_D2I 120 -#define ASN1_F_ASN1_ITEM_I2D_BIO 192 -#define ASN1_F_ASN1_ITEM_I2D_FP 193 -#define ASN1_F_ASN1_ITEM_PACK 198 -#define ASN1_F_ASN1_ITEM_SIGN 195 -#define ASN1_F_ASN1_ITEM_UNPACK 199 -#define ASN1_F_ASN1_ITEM_VERIFY 197 -#define ASN1_F_ASN1_MBSTRING_NCOPY 122 -#define ASN1_F_ASN1_OBJECT_NEW 123 -#define ASN1_F_ASN1_OUTPUT_DATA 207 -#define ASN1_F_ASN1_PACK_STRING 124 -#define ASN1_F_ASN1_PCTX_NEW 205 -#define ASN1_F_ASN1_PKCS5_PBE_SET 125 -#define ASN1_F_ASN1_SEQ_PACK 126 -#define ASN1_F_ASN1_SEQ_UNPACK 127 -#define ASN1_F_ASN1_SIGN 128 -#define ASN1_F_ASN1_STR2TYPE 179 -#define ASN1_F_ASN1_STRING_SET 186 -#define ASN1_F_ASN1_STRING_TABLE_ADD 129 -#define ASN1_F_ASN1_STRING_TYPE_NEW 130 -#define ASN1_F_ASN1_TEMPLATE_EX_D2I 132 -#define ASN1_F_ASN1_TEMPLATE_NEW 133 -#define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I 131 -#define ASN1_F_ASN1_TIME_SET 175 -#define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134 -#define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135 -#define ASN1_F_ASN1_UNPACK_STRING 136 -#define ASN1_F_ASN1_UTCTIME_SET 187 -#define ASN1_F_ASN1_VERIFY 137 -#define ASN1_F_B64_READ_ASN1 208 -#define ASN1_F_B64_WRITE_ASN1 209 -#define ASN1_F_BITSTR_CB 180 -#define ASN1_F_BN_TO_ASN1_ENUMERATED 138 -#define ASN1_F_BN_TO_ASN1_INTEGER 139 -#define ASN1_F_C2I_ASN1_BIT_STRING 189 -#define ASN1_F_C2I_ASN1_INTEGER 194 -#define ASN1_F_C2I_ASN1_OBJECT 196 -#define ASN1_F_COLLECT_DATA 140 -#define ASN1_F_D2I_ASN1_BIT_STRING 141 -#define ASN1_F_D2I_ASN1_BOOLEAN 142 -#define ASN1_F_D2I_ASN1_BYTES 143 -#define ASN1_F_D2I_ASN1_GENERALIZEDTIME 144 -#define ASN1_F_D2I_ASN1_HEADER 145 -#define ASN1_F_D2I_ASN1_INTEGER 146 -#define ASN1_F_D2I_ASN1_OBJECT 147 -#define ASN1_F_D2I_ASN1_SET 148 -#define ASN1_F_D2I_ASN1_TYPE_BYTES 149 -#define ASN1_F_D2I_ASN1_UINTEGER 150 -#define ASN1_F_D2I_ASN1_UTCTIME 151 -#define ASN1_F_D2I_NETSCAPE_RSA 152 -#define ASN1_F_D2I_NETSCAPE_RSA_2 153 -#define ASN1_F_D2I_PRIVATEKEY 154 -#define ASN1_F_D2I_PUBLICKEY 155 -#define ASN1_F_D2I_RSA_NET 200 -#define ASN1_F_D2I_RSA_NET_2 201 -#define ASN1_F_D2I_X509 156 -#define ASN1_F_D2I_X509_CINF 157 -#define ASN1_F_D2I_X509_PKEY 159 -#define ASN1_F_I2D_ASN1_SET 188 -#define ASN1_F_I2D_ASN1_TIME 160 -#define ASN1_F_I2D_DSA_PUBKEY 161 -#define ASN1_F_I2D_EC_PUBKEY 181 -#define ASN1_F_I2D_PRIVATEKEY 163 -#define ASN1_F_I2D_PUBLICKEY 164 -#define ASN1_F_I2D_RSA_NET 162 -#define ASN1_F_I2D_RSA_PUBKEY 165 -#define ASN1_F_LONG_C2I 166 -#define ASN1_F_OID_MODULE_INIT 174 -#define ASN1_F_PARSE_TAGGING 182 -#define ASN1_F_PKCS5_PBE2_SET 167 -#define ASN1_F_PKCS5_PBE_SET 202 -#define ASN1_F_SMIME_READ_ASN1 210 -#define ASN1_F_SMIME_TEXT 211 -#define ASN1_F_X509_CINF_NEW 168 -#define ASN1_F_X509_CRL_ADD0_REVOKED 169 -#define ASN1_F_X509_INFO_NEW 170 -#define ASN1_F_X509_NAME_ENCODE 203 -#define ASN1_F_X509_NAME_EX_D2I 158 -#define ASN1_F_X509_NAME_EX_NEW 171 -#define ASN1_F_X509_NEW 172 -#define ASN1_F_X509_PKEY_NEW 173 - -/* Reason codes. */ -#define ASN1_R_ADDING_OBJECT 171 -#define ASN1_R_ASN1_PARSE_ERROR 198 -#define ASN1_R_ASN1_SIG_PARSE_ERROR 199 -#define ASN1_R_AUX_ERROR 100 -#define ASN1_R_BAD_CLASS 101 -#define ASN1_R_BAD_OBJECT_HEADER 102 -#define ASN1_R_BAD_PASSWORD_READ 103 -#define ASN1_R_BAD_TAG 104 -#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 210 -#define ASN1_R_BN_LIB 105 -#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 -#define ASN1_R_BUFFER_TOO_SMALL 107 -#define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108 -#define ASN1_R_DATA_IS_WRONG 109 -#define ASN1_R_DECODE_ERROR 110 -#define ASN1_R_DECODING_ERROR 111 -#define ASN1_R_DEPTH_EXCEEDED 174 -#define ASN1_R_ENCODE_ERROR 112 -#define ASN1_R_ERROR_GETTING_TIME 173 -#define ASN1_R_ERROR_LOADING_SECTION 172 -#define ASN1_R_ERROR_PARSING_SET_ELEMENT 113 -#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114 -#define ASN1_R_EXPECTING_AN_INTEGER 115 -#define ASN1_R_EXPECTING_AN_OBJECT 116 -#define ASN1_R_EXPECTING_A_BOOLEAN 117 -#define ASN1_R_EXPECTING_A_TIME 118 -#define ASN1_R_EXPLICIT_LENGTH_MISMATCH 119 -#define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED 120 -#define ASN1_R_FIELD_MISSING 121 -#define ASN1_R_FIRST_NUM_TOO_LARGE 122 -#define ASN1_R_HEADER_TOO_LONG 123 -#define ASN1_R_ILLEGAL_BITSTRING_FORMAT 175 -#define ASN1_R_ILLEGAL_BOOLEAN 176 -#define ASN1_R_ILLEGAL_CHARACTERS 124 -#define ASN1_R_ILLEGAL_FORMAT 177 -#define ASN1_R_ILLEGAL_HEX 178 -#define ASN1_R_ILLEGAL_IMPLICIT_TAG 179 -#define ASN1_R_ILLEGAL_INTEGER 180 -#define ASN1_R_ILLEGAL_NESTED_TAGGING 181 -#define ASN1_R_ILLEGAL_NULL 125 -#define ASN1_R_ILLEGAL_NULL_VALUE 182 -#define ASN1_R_ILLEGAL_OBJECT 183 -#define ASN1_R_ILLEGAL_OPTIONAL_ANY 126 -#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 170 -#define ASN1_R_ILLEGAL_TAGGED_ANY 127 -#define ASN1_R_ILLEGAL_TIME_VALUE 184 -#define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185 -#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128 -#define ASN1_R_INVALID_BMPSTRING_LENGTH 129 -#define ASN1_R_INVALID_DIGIT 130 -#define ASN1_R_INVALID_MIME_TYPE 200 -#define ASN1_R_INVALID_MODIFIER 186 -#define ASN1_R_INVALID_NUMBER 187 -#define ASN1_R_INVALID_SEPARATOR 131 -#define ASN1_R_INVALID_TIME_FORMAT 132 -#define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133 -#define ASN1_R_INVALID_UTF8STRING 134 -#define ASN1_R_IV_TOO_LARGE 135 -#define ASN1_R_LENGTH_ERROR 136 -#define ASN1_R_LIST_ERROR 188 -#define ASN1_R_MIME_NO_CONTENT_TYPE 201 -#define ASN1_R_MIME_PARSE_ERROR 202 -#define ASN1_R_MIME_SIG_PARSE_ERROR 203 -#define ASN1_R_MISSING_EOC 137 -#define ASN1_R_MISSING_SECOND_NUMBER 138 -#define ASN1_R_MISSING_VALUE 189 -#define ASN1_R_MSTRING_NOT_UNIVERSAL 139 -#define ASN1_R_MSTRING_WRONG_TAG 140 -#define ASN1_R_NESTED_ASN1_STRING 197 -#define ASN1_R_NON_HEX_CHARACTERS 141 -#define ASN1_R_NOT_ASCII_FORMAT 190 -#define ASN1_R_NOT_ENOUGH_DATA 142 -#define ASN1_R_NO_CONTENT_TYPE 204 -#define ASN1_R_NO_MATCHING_CHOICE_TYPE 143 -#define ASN1_R_NO_MULTIPART_BODY_FAILURE 205 -#define ASN1_R_NO_MULTIPART_BOUNDARY 206 -#define ASN1_R_NO_SIG_CONTENT_TYPE 207 -#define ASN1_R_NULL_IS_WRONG_LENGTH 144 -#define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191 -#define ASN1_R_ODD_NUMBER_OF_CHARS 145 -#define ASN1_R_PRIVATE_KEY_HEADER_MISSING 146 -#define ASN1_R_SECOND_NUMBER_TOO_LARGE 147 -#define ASN1_R_SEQUENCE_LENGTH_MISMATCH 148 -#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149 -#define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192 -#define ASN1_R_SHORT_LINE 150 -#define ASN1_R_SIG_INVALID_MIME_TYPE 208 -#define ASN1_R_STREAMING_NOT_SUPPORTED 209 -#define ASN1_R_STRING_TOO_LONG 151 -#define ASN1_R_STRING_TOO_SHORT 152 -#define ASN1_R_TAG_VALUE_TOO_HIGH 153 -#define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154 -#define ASN1_R_TIME_NOT_ASCII_FORMAT 193 -#define ASN1_R_TOO_LONG 155 -#define ASN1_R_TYPE_NOT_CONSTRUCTED 156 -#define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157 -#define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158 -#define ASN1_R_UNEXPECTED_EOC 159 -#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 211 -#define ASN1_R_UNKNOWN_FORMAT 160 -#define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161 -#define ASN1_R_UNKNOWN_OBJECT_TYPE 162 -#define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163 -#define ASN1_R_UNKNOWN_TAG 194 -#define ASN1_R_UNKOWN_FORMAT 195 -#define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164 -#define ASN1_R_UNSUPPORTED_CIPHER 165 -#define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM 166 -#define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167 -#define ASN1_R_UNSUPPORTED_TYPE 196 -#define ASN1_R_WRONG_TAG 168 -#define ASN1_R_WRONG_TYPE 169 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/asn1_mac.h b/externals/openssl/asn1_mac.h deleted file mode 100644 index c7b79ec56d..0000000000 --- a/externals/openssl/asn1_mac.h +++ /dev/null @@ -1,572 +0,0 @@ -/* crypto/asn1/asn1_mac.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_ASN1_MAC_H -#define HEADER_ASN1_MAC_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef ASN1_MAC_ERR_LIB -#define ASN1_MAC_ERR_LIB ERR_LIB_ASN1 -#endif - -#define ASN1_MAC_H_err(f,r,line) \ - ERR_PUT_error(ASN1_MAC_ERR_LIB,(f),(r),__FILE__,(line)) - -#define M_ASN1_D2I_vars(a,type,func) \ - ASN1_const_CTX c; \ - type ret=NULL; \ - \ - c.pp=(const unsigned char **)pp; \ - c.q= *(const unsigned char **)pp; \ - c.error=ERR_R_NESTED_ASN1_ERROR; \ - if ((a == NULL) || ((*a) == NULL)) \ - { if ((ret=(type)func()) == NULL) \ - { c.line=__LINE__; goto err; } } \ - else ret=(*a); - -#define M_ASN1_D2I_Init() \ - c.p= *(const unsigned char **)pp; \ - c.max=(length == 0)?0:(c.p+length); - -#define M_ASN1_D2I_Finish_2(a) \ - if (!asn1_const_Finish(&c)) \ - { c.line=__LINE__; goto err; } \ - *(const unsigned char **)pp=c.p; \ - if (a != NULL) (*a)=ret; \ - return(ret); - -#define M_ASN1_D2I_Finish(a,func,e) \ - M_ASN1_D2I_Finish_2(a); \ -err:\ - ASN1_MAC_H_err((e),c.error,c.line); \ - asn1_add_error(*(const unsigned char **)pp,(int)(c.q- *pp)); \ - if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \ - return(NULL) - -#define M_ASN1_D2I_start_sequence() \ - if (!asn1_GetSequence(&c,&length)) \ - { c.line=__LINE__; goto err; } -/* Begin reading ASN1 without a surrounding sequence */ -#define M_ASN1_D2I_begin() \ - c.slen = length; - -/* End reading ASN1 with no check on length */ -#define M_ASN1_D2I_Finish_nolen(a, func, e) \ - *pp=c.p; \ - if (a != NULL) (*a)=ret; \ - return(ret); \ -err:\ - ASN1_MAC_H_err((e),c.error,c.line); \ - asn1_add_error(*pp,(int)(c.q- *pp)); \ - if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \ - return(NULL) - -#define M_ASN1_D2I_end_sequence() \ - (((c.inf&1) == 0)?(c.slen <= 0): \ - (c.eos=ASN1_const_check_infinite_end(&c.p,c.slen))) - -/* Don't use this with d2i_ASN1_BOOLEAN() */ -#define M_ASN1_D2I_get(b, func) \ - c.q=c.p; \ - if (func(&(b),&c.p,c.slen) == NULL) \ - {c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -/* Don't use this with d2i_ASN1_BOOLEAN() */ -#define M_ASN1_D2I_get_x(type,b,func) \ - c.q=c.p; \ - if (((D2I_OF(type))func)(&(b),&c.p,c.slen) == NULL) \ - {c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -/* use this instead () */ -#define M_ASN1_D2I_get_int(b,func) \ - c.q=c.p; \ - if (func(&(b),&c.p,c.slen) < 0) \ - {c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -#define M_ASN1_D2I_get_opt(b,func,type) \ - if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \ - == (V_ASN1_UNIVERSAL|(type)))) \ - { \ - M_ASN1_D2I_get(b,func); \ - } - -#define M_ASN1_D2I_get_imp(b,func, type) \ - M_ASN1_next=(_tmp& V_ASN1_CONSTRUCTED)|type; \ - c.q=c.p; \ - if (func(&(b),&c.p,c.slen) == NULL) \ - {c.line=__LINE__; M_ASN1_next_prev = _tmp; goto err; } \ - c.slen-=(c.p-c.q);\ - M_ASN1_next_prev=_tmp; - -#define M_ASN1_D2I_get_IMP_opt(b,func,tag,type) \ - if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) == \ - (V_ASN1_CONTEXT_SPECIFIC|(tag)))) \ - { \ - unsigned char _tmp = M_ASN1_next; \ - M_ASN1_D2I_get_imp(b,func, type);\ - } - -#define M_ASN1_D2I_get_set(r,func,free_func) \ - M_ASN1_D2I_get_imp_set(r,func,free_func, \ - V_ASN1_SET,V_ASN1_UNIVERSAL); - -#define M_ASN1_D2I_get_set_type(type,r,func,free_func) \ - M_ASN1_D2I_get_imp_set_type(type,r,func,free_func, \ - V_ASN1_SET,V_ASN1_UNIVERSAL); - -#define M_ASN1_D2I_get_set_opt(r,func,free_func) \ - if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \ - V_ASN1_CONSTRUCTED|V_ASN1_SET)))\ - { M_ASN1_D2I_get_set(r,func,free_func); } - -#define M_ASN1_D2I_get_set_opt_type(type,r,func,free_func) \ - if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \ - V_ASN1_CONSTRUCTED|V_ASN1_SET)))\ - { M_ASN1_D2I_get_set_type(type,r,func,free_func); } - -#define M_ASN1_I2D_len_SET_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_len_SET(a,f); - -#define M_ASN1_I2D_put_SET_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_put_SET(a,f); - -#define M_ASN1_I2D_put_SEQUENCE_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_put_SEQUENCE(a,f); - -#define M_ASN1_I2D_put_SEQUENCE_opt_type(type,a,f) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - M_ASN1_I2D_put_SEQUENCE_type(type,a,f); - -#define M_ASN1_D2I_get_IMP_set_opt(b,func,free_func,tag) \ - if ((c.slen != 0) && \ - (M_ASN1_next == \ - (V_ASN1_CONTEXT_SPECIFIC|V_ASN1_CONSTRUCTED|(tag))))\ - { \ - M_ASN1_D2I_get_imp_set(b,func,free_func,\ - tag,V_ASN1_CONTEXT_SPECIFIC); \ - } - -#define M_ASN1_D2I_get_IMP_set_opt_type(type,b,func,free_func,tag) \ - if ((c.slen != 0) && \ - (M_ASN1_next == \ - (V_ASN1_CONTEXT_SPECIFIC|V_ASN1_CONSTRUCTED|(tag))))\ - { \ - M_ASN1_D2I_get_imp_set_type(type,b,func,free_func,\ - tag,V_ASN1_CONTEXT_SPECIFIC); \ - } - -#define M_ASN1_D2I_get_seq(r,func,free_func) \ - M_ASN1_D2I_get_imp_set(r,func,free_func,\ - V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); - -#define M_ASN1_D2I_get_seq_type(type,r,func,free_func) \ - M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,\ - V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL) - -#define M_ASN1_D2I_get_seq_opt(r,func,free_func) \ - if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \ - V_ASN1_CONSTRUCTED|V_ASN1_SEQUENCE)))\ - { M_ASN1_D2I_get_seq(r,func,free_func); } - -#define M_ASN1_D2I_get_seq_opt_type(type,r,func,free_func) \ - if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \ - V_ASN1_CONSTRUCTED|V_ASN1_SEQUENCE)))\ - { M_ASN1_D2I_get_seq_type(type,r,func,free_func); } - -#define M_ASN1_D2I_get_IMP_set(r,func,free_func,x) \ - M_ASN1_D2I_get_imp_set(r,func,free_func,\ - x,V_ASN1_CONTEXT_SPECIFIC); - -#define M_ASN1_D2I_get_IMP_set_type(type,r,func,free_func,x) \ - M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,\ - x,V_ASN1_CONTEXT_SPECIFIC); - -#define M_ASN1_D2I_get_imp_set(r,func,free_func,a,b) \ - c.q=c.p; \ - if (d2i_ASN1_SET(&(r),&c.p,c.slen,(char *(*)())func,\ - (void (*)())free_func,a,b) == NULL) \ - { c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -#define M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,a,b) \ - c.q=c.p; \ - if (d2i_ASN1_SET_OF_##type(&(r),&c.p,c.slen,func,\ - free_func,a,b) == NULL) \ - { c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -#define M_ASN1_D2I_get_set_strings(r,func,a,b) \ - c.q=c.p; \ - if (d2i_ASN1_STRING_SET(&(r),&c.p,c.slen,a,b) == NULL) \ - { c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -#define M_ASN1_D2I_get_EXP_opt(r,func,tag) \ - if ((c.slen != 0L) && (M_ASN1_next == \ - (V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \ - { \ - int Tinf,Ttag,Tclass; \ - long Tlen; \ - \ - c.q=c.p; \ - Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \ - if (Tinf & 0x80) \ - { c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \ - c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) \ - Tlen = c.slen - (c.p - c.q) - 2; \ - if (func(&(r),&c.p,Tlen) == NULL) \ - { c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \ - Tlen = c.slen - (c.p - c.q); \ - if(!ASN1_const_check_infinite_end(&c.p, Tlen)) \ - { c.error=ERR_R_MISSING_ASN1_EOS; \ - c.line=__LINE__; goto err; } \ - }\ - c.slen-=(c.p-c.q); \ - } - -#define M_ASN1_D2I_get_EXP_set_opt(r,func,free_func,tag,b) \ - if ((c.slen != 0) && (M_ASN1_next == \ - (V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \ - { \ - int Tinf,Ttag,Tclass; \ - long Tlen; \ - \ - c.q=c.p; \ - Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \ - if (Tinf & 0x80) \ - { c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \ - c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) \ - Tlen = c.slen - (c.p - c.q) - 2; \ - if (d2i_ASN1_SET(&(r),&c.p,Tlen,(char *(*)())func, \ - (void (*)())free_func, \ - b,V_ASN1_UNIVERSAL) == NULL) \ - { c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \ - Tlen = c.slen - (c.p - c.q); \ - if(!ASN1_check_infinite_end(&c.p, Tlen)) \ - { c.error=ERR_R_MISSING_ASN1_EOS; \ - c.line=__LINE__; goto err; } \ - }\ - c.slen-=(c.p-c.q); \ - } - -#define M_ASN1_D2I_get_EXP_set_opt_type(type,r,func,free_func,tag,b) \ - if ((c.slen != 0) && (M_ASN1_next == \ - (V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \ - { \ - int Tinf,Ttag,Tclass; \ - long Tlen; \ - \ - c.q=c.p; \ - Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \ - if (Tinf & 0x80) \ - { c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \ - c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) \ - Tlen = c.slen - (c.p - c.q) - 2; \ - if (d2i_ASN1_SET_OF_##type(&(r),&c.p,Tlen,func, \ - free_func,b,V_ASN1_UNIVERSAL) == NULL) \ - { c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \ - Tlen = c.slen - (c.p - c.q); \ - if(!ASN1_check_infinite_end(&c.p, Tlen)) \ - { c.error=ERR_R_MISSING_ASN1_EOS; \ - c.line=__LINE__; goto err; } \ - }\ - c.slen-=(c.p-c.q); \ - } - -/* New macros */ -#define M_ASN1_New_Malloc(ret,type) \ - if ((ret=(type *)OPENSSL_malloc(sizeof(type))) == NULL) \ - { c.line=__LINE__; goto err2; } - -#define M_ASN1_New(arg,func) \ - if (((arg)=func()) == NULL) return(NULL) - -#define M_ASN1_New_Error(a) \ -/* err: ASN1_MAC_H_err((a),ERR_R_NESTED_ASN1_ERROR,c.line); \ - return(NULL);*/ \ - err2: ASN1_MAC_H_err((a),ERR_R_MALLOC_FAILURE,c.line); \ - return(NULL) - - -/* BIG UGLY WARNING! This is so damn ugly I wanna puke. Unfortunately, - some macros that use ASN1_const_CTX still insist on writing in the input - stream. ARGH! ARGH! ARGH! Let's get rid of this macro package. - Please? -- Richard Levitte */ -#define M_ASN1_next (*((unsigned char *)(c.p))) -#define M_ASN1_next_prev (*((unsigned char *)(c.q))) - -/*************************************************/ - -#define M_ASN1_I2D_vars(a) int r=0,ret=0; \ - unsigned char *p; \ - if (a == NULL) return(0) - -/* Length Macros */ -#define M_ASN1_I2D_len(a,f) ret+=f(a,NULL) -#define M_ASN1_I2D_len_IMP_opt(a,f) if (a != NULL) M_ASN1_I2D_len(a,f) - -#define M_ASN1_I2D_len_SET(a,f) \ - ret+=i2d_ASN1_SET(a,NULL,f,V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET); - -#define M_ASN1_I2D_len_SET_type(type,a,f) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,V_ASN1_SET, \ - V_ASN1_UNIVERSAL,IS_SET); - -#define M_ASN1_I2D_len_SEQUENCE(a,f) \ - ret+=i2d_ASN1_SET(a,NULL,f,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL, \ - IS_SEQUENCE); - -#define M_ASN1_I2D_len_SEQUENCE_type(type,a,f) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,V_ASN1_SEQUENCE, \ - V_ASN1_UNIVERSAL,IS_SEQUENCE) - -#define M_ASN1_I2D_len_SEQUENCE_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_len_SEQUENCE(a,f); - -#define M_ASN1_I2D_len_SEQUENCE_opt_type(type,a,f) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - M_ASN1_I2D_len_SEQUENCE_type(type,a,f); - -#define M_ASN1_I2D_len_IMP_SET(a,f,x) \ - ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC,IS_SET); - -#define M_ASN1_I2D_len_IMP_SET_type(type,a,f,x) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \ - V_ASN1_CONTEXT_SPECIFIC,IS_SET); - -#define M_ASN1_I2D_len_IMP_SET_opt(a,f,x) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SET); - -#define M_ASN1_I2D_len_IMP_SET_opt_type(type,a,f,x) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \ - V_ASN1_CONTEXT_SPECIFIC,IS_SET); - -#define M_ASN1_I2D_len_IMP_SEQUENCE(a,f,x) \ - ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); - -#define M_ASN1_I2D_len_IMP_SEQUENCE_opt(a,f,x) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); - -#define M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(type,a,f,x) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \ - V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); - -#define M_ASN1_I2D_len_EXP_opt(a,f,mtag,v) \ - if (a != NULL)\ - { \ - v=f(a,NULL); \ - ret+=ASN1_object_size(1,v,mtag); \ - } - -#define M_ASN1_I2D_len_EXP_SET_opt(a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_num(a) != 0))\ - { \ - v=i2d_ASN1_SET(a,NULL,f,tag,V_ASN1_UNIVERSAL,IS_SET); \ - ret+=ASN1_object_size(1,v,mtag); \ - } - -#define M_ASN1_I2D_len_EXP_SEQUENCE_opt(a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_num(a) != 0))\ - { \ - v=i2d_ASN1_SET(a,NULL,f,tag,V_ASN1_UNIVERSAL, \ - IS_SEQUENCE); \ - ret+=ASN1_object_size(1,v,mtag); \ - } - -#define M_ASN1_I2D_len_EXP_SEQUENCE_opt_type(type,a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_##type##_num(a) != 0))\ - { \ - v=i2d_ASN1_SET_OF_##type(a,NULL,f,tag, \ - V_ASN1_UNIVERSAL, \ - IS_SEQUENCE); \ - ret+=ASN1_object_size(1,v,mtag); \ - } - -/* Put Macros */ -#define M_ASN1_I2D_put(a,f) f(a,&p) - -#define M_ASN1_I2D_put_IMP_opt(a,f,t) \ - if (a != NULL) \ - { \ - unsigned char *q=p; \ - f(a,&p); \ - *q=(V_ASN1_CONTEXT_SPECIFIC|t|(*q&V_ASN1_CONSTRUCTED));\ - } - -#define M_ASN1_I2D_put_SET(a,f) i2d_ASN1_SET(a,&p,f,V_ASN1_SET,\ - V_ASN1_UNIVERSAL,IS_SET) -#define M_ASN1_I2D_put_SET_type(type,a,f) \ - i2d_ASN1_SET_OF_##type(a,&p,f,V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET) -#define M_ASN1_I2D_put_IMP_SET(a,f,x) i2d_ASN1_SET(a,&p,f,x,\ - V_ASN1_CONTEXT_SPECIFIC,IS_SET) -#define M_ASN1_I2D_put_IMP_SET_type(type,a,f,x) \ - i2d_ASN1_SET_OF_##type(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC,IS_SET) -#define M_ASN1_I2D_put_IMP_SEQUENCE(a,f,x) i2d_ASN1_SET(a,&p,f,x,\ - V_ASN1_CONTEXT_SPECIFIC,IS_SEQUENCE) - -#define M_ASN1_I2D_put_SEQUENCE(a,f) i2d_ASN1_SET(a,&p,f,V_ASN1_SEQUENCE,\ - V_ASN1_UNIVERSAL,IS_SEQUENCE) - -#define M_ASN1_I2D_put_SEQUENCE_type(type,a,f) \ - i2d_ASN1_SET_OF_##type(a,&p,f,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL, \ - IS_SEQUENCE) - -#define M_ASN1_I2D_put_SEQUENCE_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_put_SEQUENCE(a,f); - -#define M_ASN1_I2D_put_IMP_SET_opt(a,f,x) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - { i2d_ASN1_SET(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SET); } - -#define M_ASN1_I2D_put_IMP_SET_opt_type(type,a,f,x) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - { i2d_ASN1_SET_OF_##type(a,&p,f,x, \ - V_ASN1_CONTEXT_SPECIFIC, \ - IS_SET); } - -#define M_ASN1_I2D_put_IMP_SEQUENCE_opt(a,f,x) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - { i2d_ASN1_SET(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); } - -#define M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(type,a,f,x) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - { i2d_ASN1_SET_OF_##type(a,&p,f,x, \ - V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); } - -#define M_ASN1_I2D_put_EXP_opt(a,f,tag,v) \ - if (a != NULL) \ - { \ - ASN1_put_object(&p,1,v,tag,V_ASN1_CONTEXT_SPECIFIC); \ - f(a,&p); \ - } - -#define M_ASN1_I2D_put_EXP_SET_opt(a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - { \ - ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \ - i2d_ASN1_SET(a,&p,f,tag,V_ASN1_UNIVERSAL,IS_SET); \ - } - -#define M_ASN1_I2D_put_EXP_SEQUENCE_opt(a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - { \ - ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \ - i2d_ASN1_SET(a,&p,f,tag,V_ASN1_UNIVERSAL,IS_SEQUENCE); \ - } - -#define M_ASN1_I2D_put_EXP_SEQUENCE_opt_type(type,a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - { \ - ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \ - i2d_ASN1_SET_OF_##type(a,&p,f,tag,V_ASN1_UNIVERSAL, \ - IS_SEQUENCE); \ - } - -#define M_ASN1_I2D_seq_total() \ - r=ASN1_object_size(1,ret,V_ASN1_SEQUENCE); \ - if (pp == NULL) return(r); \ - p= *pp; \ - ASN1_put_object(&p,1,ret,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL) - -#define M_ASN1_I2D_INF_seq_start(tag,ctx) \ - *(p++)=(V_ASN1_CONSTRUCTED|(tag)|(ctx)); \ - *(p++)=0x80 - -#define M_ASN1_I2D_INF_seq_end() *(p++)=0x00; *(p++)=0x00 - -#define M_ASN1_I2D_finish() *pp=p; \ - return(r); - -int asn1_GetSequence(ASN1_const_CTX *c, long *length); -void asn1_add_error(const unsigned char *address,int offset); -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/externals/openssl/asn1t.h b/externals/openssl/asn1t.h deleted file mode 100644 index ac14f9415b..0000000000 --- a/externals/openssl/asn1t.h +++ /dev/null @@ -1,893 +0,0 @@ -/* asn1t.h */ -/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL - * project 2000. - */ -/* ==================================================================== - * Copyright (c) 2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -#ifndef HEADER_ASN1T_H -#define HEADER_ASN1T_H - -#include -#include -#include - -#ifdef OPENSSL_BUILD_SHLIBCRYPTO -# undef OPENSSL_EXTERN -# define OPENSSL_EXTERN OPENSSL_EXPORT -#endif - -/* ASN1 template defines, structures and functions */ - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION - -/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ -#define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr)) - - -/* Macros for start and end of ASN1_ITEM definition */ - -#define ASN1_ITEM_start(itname) \ - OPENSSL_GLOBAL const ASN1_ITEM itname##_it = { - -#define ASN1_ITEM_end(itname) \ - }; - -#else - -/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ -#define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr())) - - -/* Macros for start and end of ASN1_ITEM definition */ - -#define ASN1_ITEM_start(itname) \ - const ASN1_ITEM * itname##_it(void) \ - { \ - static const ASN1_ITEM local_it = { - -#define ASN1_ITEM_end(itname) \ - }; \ - return &local_it; \ - } - -#endif - - -/* Macros to aid ASN1 template writing */ - -#define ASN1_ITEM_TEMPLATE(tname) \ - static const ASN1_TEMPLATE tname##_item_tt - -#define ASN1_ITEM_TEMPLATE_END(tname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_PRIMITIVE,\ - -1,\ - &tname##_item_tt,\ - 0,\ - NULL,\ - 0,\ - #tname \ - ASN1_ITEM_end(tname) - - -/* This is a ASN1 type which just embeds a template */ - -/* This pair helps declare a SEQUENCE. We can do: - * - * ASN1_SEQUENCE(stname) = { - * ... SEQUENCE components ... - * } ASN1_SEQUENCE_END(stname) - * - * This will produce an ASN1_ITEM called stname_it - * for a structure called stname. - * - * If you want the same structure but a different - * name then use: - * - * ASN1_SEQUENCE(itname) = { - * ... SEQUENCE components ... - * } ASN1_SEQUENCE_END_name(stname, itname) - * - * This will create an item called itname_it using - * a structure called stname. - */ - -#define ASN1_SEQUENCE(tname) \ - static const ASN1_TEMPLATE tname##_seq_tt[] - -#define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname) - -#define ASN1_SEQUENCE_END_name(stname, tname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_SEQUENCE,\ - V_ASN1_SEQUENCE,\ - tname##_seq_tt,\ - sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ - NULL,\ - sizeof(stname),\ - #stname \ - ASN1_ITEM_end(tname) - -#define ASN1_NDEF_SEQUENCE(tname) \ - ASN1_SEQUENCE(tname) - -#define ASN1_NDEF_SEQUENCE_cb(tname, cb) \ - ASN1_SEQUENCE_cb(tname, cb) - -#define ASN1_SEQUENCE_cb(tname, cb) \ - static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \ - ASN1_SEQUENCE(tname) - -#define ASN1_BROKEN_SEQUENCE(tname) \ - static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_BROKEN, 0, 0, 0, 0}; \ - ASN1_SEQUENCE(tname) - -#define ASN1_SEQUENCE_ref(tname, cb, lck) \ - static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), lck, cb, 0}; \ - ASN1_SEQUENCE(tname) - -#define ASN1_SEQUENCE_enc(tname, enc, cb) \ - static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc)}; \ - ASN1_SEQUENCE(tname) - -#define ASN1_NDEF_SEQUENCE_END(tname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_NDEF_SEQUENCE,\ - V_ASN1_SEQUENCE,\ - tname##_seq_tt,\ - sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ - NULL,\ - sizeof(tname),\ - #tname \ - ASN1_ITEM_end(tname) - -#define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname) - -#define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) - -#define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) - -#define ASN1_SEQUENCE_END_ref(stname, tname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_SEQUENCE,\ - V_ASN1_SEQUENCE,\ - tname##_seq_tt,\ - sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ - &tname##_aux,\ - sizeof(stname),\ - #stname \ - ASN1_ITEM_end(tname) - - -/* This pair helps declare a CHOICE type. We can do: - * - * ASN1_CHOICE(chname) = { - * ... CHOICE options ... - * ASN1_CHOICE_END(chname) - * - * This will produce an ASN1_ITEM called chname_it - * for a structure called chname. The structure - * definition must look like this: - * typedef struct { - * int type; - * union { - * ASN1_SOMETHING *opt1; - * ASN1_SOMEOTHER *opt2; - * } value; - * } chname; - * - * the name of the selector must be 'type'. - * to use an alternative selector name use the - * ASN1_CHOICE_END_selector() version. - */ - -#define ASN1_CHOICE(tname) \ - static const ASN1_TEMPLATE tname##_ch_tt[] - -#define ASN1_CHOICE_cb(tname, cb) \ - static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \ - ASN1_CHOICE(tname) - -#define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname) - -#define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type) - -#define ASN1_CHOICE_END_selector(stname, tname, selname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_CHOICE,\ - offsetof(stname,selname) ,\ - tname##_ch_tt,\ - sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ - NULL,\ - sizeof(stname),\ - #stname \ - ASN1_ITEM_end(tname) - -#define ASN1_CHOICE_END_cb(stname, tname, selname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_CHOICE,\ - offsetof(stname,selname) ,\ - tname##_ch_tt,\ - sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ - &tname##_aux,\ - sizeof(stname),\ - #stname \ - ASN1_ITEM_end(tname) - -/* This helps with the template wrapper form of ASN1_ITEM */ - -#define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \ - (flags), (tag), 0,\ - #name, ASN1_ITEM_ref(type) } - -/* These help with SEQUENCE or CHOICE components */ - -/* used to declare other types */ - -#define ASN1_EX_TYPE(flags, tag, stname, field, type) { \ - (flags), (tag), offsetof(stname, field),\ - #field, ASN1_ITEM_ref(type) } - -/* used when the structure is combined with the parent */ - -#define ASN1_EX_COMBINE(flags, tag, type) { \ - (flags)|ASN1_TFLG_COMBINE, (tag), 0, NULL, ASN1_ITEM_ref(type) } - -/* implicit and explicit helper macros */ - -#define ASN1_IMP_EX(stname, field, type, tag, ex) \ - ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | ex, tag, stname, field, type) - -#define ASN1_EXP_EX(stname, field, type, tag, ex) \ - ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | ex, tag, stname, field, type) - -/* Any defined by macros: the field used is in the table itself */ - -#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION -#define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } -#define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } -#else -#define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb } -#define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb } -#endif -/* Plain simple type */ -#define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type) - -/* OPTIONAL simple type */ -#define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type) - -/* IMPLICIT tagged simple type */ -#define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0) - -/* IMPLICIT tagged OPTIONAL simple type */ -#define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL) - -/* Same as above but EXPLICIT */ - -#define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0) -#define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL) - -/* SEQUENCE OF type */ -#define ASN1_SEQUENCE_OF(stname, field, type) \ - ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type) - -/* OPTIONAL SEQUENCE OF */ -#define ASN1_SEQUENCE_OF_OPT(stname, field, type) \ - ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type) - -/* Same as above but for SET OF */ - -#define ASN1_SET_OF(stname, field, type) \ - ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type) - -#define ASN1_SET_OF_OPT(stname, field, type) \ - ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type) - -/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */ - -#define ASN1_IMP_SET_OF(stname, field, type, tag) \ - ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF) - -#define ASN1_EXP_SET_OF(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF) - -#define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \ - ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL) - -#define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL) - -#define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \ - ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF) - -#define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \ - ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL) - -#define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF) - -#define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL) - -/* EXPLICIT using indefinite length constructed form */ -#define ASN1_NDEF_EXP(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF) - -/* EXPLICIT OPTIONAL using indefinite length constructed form */ -#define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF) - -/* Macros for the ASN1_ADB structure */ - -#define ASN1_ADB(name) \ - static const ASN1_ADB_TABLE name##_adbtbl[] - -#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#define ASN1_ADB_END(name, flags, field, app_table, def, none) \ - ;\ - static const ASN1_ADB name##_adb = {\ - flags,\ - offsetof(name, field),\ - app_table,\ - name##_adbtbl,\ - sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ - def,\ - none\ - } - -#else - -#define ASN1_ADB_END(name, flags, field, app_table, def, none) \ - ;\ - static const ASN1_ITEM *name##_adb(void) \ - { \ - static const ASN1_ADB internal_adb = \ - {\ - flags,\ - offsetof(name, field),\ - app_table,\ - name##_adbtbl,\ - sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ - def,\ - none\ - }; \ - return (const ASN1_ITEM *) &internal_adb; \ - } \ - void dummy_function(void) - -#endif - -#define ADB_ENTRY(val, template) {val, template} - -#define ASN1_ADB_TEMPLATE(name) \ - static const ASN1_TEMPLATE name##_tt - -/* This is the ASN1 template structure that defines - * a wrapper round the actual type. It determines the - * actual position of the field in the value structure, - * various flags such as OPTIONAL and the field name. - */ - -struct ASN1_TEMPLATE_st { -unsigned long flags; /* Various flags */ -long tag; /* tag, not used if no tagging */ -unsigned long offset; /* Offset of this field in structure */ -#ifndef NO_ASN1_FIELD_NAMES -const char *field_name; /* Field name */ -#endif -ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */ -}; - -/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */ - -#define ASN1_TEMPLATE_item(t) (t->item_ptr) -#define ASN1_TEMPLATE_adb(t) (t->item_ptr) - -typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE; -typedef struct ASN1_ADB_st ASN1_ADB; - -struct ASN1_ADB_st { - unsigned long flags; /* Various flags */ - unsigned long offset; /* Offset of selector field */ - STACK_OF(ASN1_ADB_TABLE) **app_items; /* Application defined items */ - const ASN1_ADB_TABLE *tbl; /* Table of possible types */ - long tblcount; /* Number of entries in tbl */ - const ASN1_TEMPLATE *default_tt; /* Type to use if no match */ - const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */ -}; - -struct ASN1_ADB_TABLE_st { - long value; /* NID for an object or value for an int */ - const ASN1_TEMPLATE tt; /* item for this value */ -}; - -/* template flags */ - -/* Field is optional */ -#define ASN1_TFLG_OPTIONAL (0x1) - -/* Field is a SET OF */ -#define ASN1_TFLG_SET_OF (0x1 << 1) - -/* Field is a SEQUENCE OF */ -#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1) - -/* Special case: this refers to a SET OF that - * will be sorted into DER order when encoded *and* - * the corresponding STACK will be modified to match - * the new order. - */ -#define ASN1_TFLG_SET_ORDER (0x3 << 1) - -/* Mask for SET OF or SEQUENCE OF */ -#define ASN1_TFLG_SK_MASK (0x3 << 1) - -/* These flags mean the tag should be taken from the - * tag field. If EXPLICIT then the underlying type - * is used for the inner tag. - */ - -/* IMPLICIT tagging */ -#define ASN1_TFLG_IMPTAG (0x1 << 3) - - -/* EXPLICIT tagging, inner tag from underlying type */ -#define ASN1_TFLG_EXPTAG (0x2 << 3) - -#define ASN1_TFLG_TAG_MASK (0x3 << 3) - -/* context specific IMPLICIT */ -#define ASN1_TFLG_IMPLICIT ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT - -/* context specific EXPLICIT */ -#define ASN1_TFLG_EXPLICIT ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT - -/* If tagging is in force these determine the - * type of tag to use. Otherwise the tag is - * determined by the underlying type. These - * values reflect the actual octet format. - */ - -/* Universal tag */ -#define ASN1_TFLG_UNIVERSAL (0x0<<6) -/* Application tag */ -#define ASN1_TFLG_APPLICATION (0x1<<6) -/* Context specific tag */ -#define ASN1_TFLG_CONTEXT (0x2<<6) -/* Private tag */ -#define ASN1_TFLG_PRIVATE (0x3<<6) - -#define ASN1_TFLG_TAG_CLASS (0x3<<6) - -/* These are for ANY DEFINED BY type. In this case - * the 'item' field points to an ASN1_ADB structure - * which contains a table of values to decode the - * relevant type - */ - -#define ASN1_TFLG_ADB_MASK (0x3<<8) - -#define ASN1_TFLG_ADB_OID (0x1<<8) - -#define ASN1_TFLG_ADB_INT (0x1<<9) - -/* This flag means a parent structure is passed - * instead of the field: this is useful is a - * SEQUENCE is being combined with a CHOICE for - * example. Since this means the structure and - * item name will differ we need to use the - * ASN1_CHOICE_END_name() macro for example. - */ - -#define ASN1_TFLG_COMBINE (0x1<<10) - -/* This flag when present in a SEQUENCE OF, SET OF - * or EXPLICIT causes indefinite length constructed - * encoding to be used if required. - */ - -#define ASN1_TFLG_NDEF (0x1<<11) - -/* This is the actual ASN1 item itself */ - -struct ASN1_ITEM_st { -char itype; /* The item type, primitive, SEQUENCE, CHOICE or extern */ -long utype; /* underlying type */ -const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains the contents */ -long tcount; /* Number of templates if SEQUENCE or CHOICE */ -const void *funcs; /* functions that handle this type */ -long size; /* Structure size (usually)*/ -#ifndef NO_ASN1_FIELD_NAMES -const char *sname; /* Structure name */ -#endif -}; - -/* These are values for the itype field and - * determine how the type is interpreted. - * - * For PRIMITIVE types the underlying type - * determines the behaviour if items is NULL. - * - * Otherwise templates must contain a single - * template and the type is treated in the - * same way as the type specified in the template. - * - * For SEQUENCE types the templates field points - * to the members, the size field is the - * structure size. - * - * For CHOICE types the templates field points - * to each possible member (typically a union) - * and the 'size' field is the offset of the - * selector. - * - * The 'funcs' field is used for application - * specific functions. - * - * For COMPAT types the funcs field gives a - * set of functions that handle this type, this - * supports the old d2i, i2d convention. - * - * The EXTERN type uses a new style d2i/i2d. - * The new style should be used where possible - * because it avoids things like the d2i IMPLICIT - * hack. - * - * MSTRING is a multiple string type, it is used - * for a CHOICE of character strings where the - * actual strings all occupy an ASN1_STRING - * structure. In this case the 'utype' field - * has a special meaning, it is used as a mask - * of acceptable types using the B_ASN1 constants. - * - * NDEF_SEQUENCE is the same as SEQUENCE except - * that it will use indefinite length constructed - * encoding if requested. - * - */ - -#define ASN1_ITYPE_PRIMITIVE 0x0 - -#define ASN1_ITYPE_SEQUENCE 0x1 - -#define ASN1_ITYPE_CHOICE 0x2 - -#define ASN1_ITYPE_COMPAT 0x3 - -#define ASN1_ITYPE_EXTERN 0x4 - -#define ASN1_ITYPE_MSTRING 0x5 - -#define ASN1_ITYPE_NDEF_SEQUENCE 0x6 - -/* Cache for ASN1 tag and length, so we - * don't keep re-reading it for things - * like CHOICE - */ - -struct ASN1_TLC_st{ - char valid; /* Values below are valid */ - int ret; /* return value */ - long plen; /* length */ - int ptag; /* class value */ - int pclass; /* class value */ - int hdrlen; /* header length */ -}; - -/* Typedefs for ASN1 function pointers */ - -typedef ASN1_VALUE * ASN1_new_func(void); -typedef void ASN1_free_func(ASN1_VALUE *a); -typedef ASN1_VALUE * ASN1_d2i_func(ASN1_VALUE **a, const unsigned char ** in, long length); -typedef int ASN1_i2d_func(ASN1_VALUE * a, unsigned char **in); - -typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, - int tag, int aclass, char opt, ASN1_TLC *ctx); - -typedef int ASN1_ex_i2d(ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it, int tag, int aclass); -typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it); -typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it); - -typedef int ASN1_primitive_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it); -typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); - -typedef struct ASN1_COMPAT_FUNCS_st { - ASN1_new_func *asn1_new; - ASN1_free_func *asn1_free; - ASN1_d2i_func *asn1_d2i; - ASN1_i2d_func *asn1_i2d; -} ASN1_COMPAT_FUNCS; - -typedef struct ASN1_EXTERN_FUNCS_st { - void *app_data; - ASN1_ex_new_func *asn1_ex_new; - ASN1_ex_free_func *asn1_ex_free; - ASN1_ex_free_func *asn1_ex_clear; - ASN1_ex_d2i *asn1_ex_d2i; - ASN1_ex_i2d *asn1_ex_i2d; -} ASN1_EXTERN_FUNCS; - -typedef struct ASN1_PRIMITIVE_FUNCS_st { - void *app_data; - unsigned long flags; - ASN1_ex_new_func *prim_new; - ASN1_ex_free_func *prim_free; - ASN1_ex_free_func *prim_clear; - ASN1_primitive_c2i *prim_c2i; - ASN1_primitive_i2c *prim_i2c; -} ASN1_PRIMITIVE_FUNCS; - -/* This is the ASN1_AUX structure: it handles various - * miscellaneous requirements. For example the use of - * reference counts and an informational callback. - * - * The "informational callback" is called at various - * points during the ASN1 encoding and decoding. It can - * be used to provide minor customisation of the structures - * used. This is most useful where the supplied routines - * *almost* do the right thing but need some extra help - * at a few points. If the callback returns zero then - * it is assumed a fatal error has occurred and the - * main operation should be abandoned. - * - * If major changes in the default behaviour are required - * then an external type is more appropriate. - */ - -typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it); - -typedef struct ASN1_AUX_st { - void *app_data; - int flags; - int ref_offset; /* Offset of reference value */ - int ref_lock; /* Lock type to use */ - ASN1_aux_cb *asn1_cb; - int enc_offset; /* Offset of ASN1_ENCODING structure */ -} ASN1_AUX; - -/* Flags in ASN1_AUX */ - -/* Use a reference count */ -#define ASN1_AFLG_REFCOUNT 1 -/* Save the encoding of structure (useful for signatures) */ -#define ASN1_AFLG_ENCODING 2 -/* The Sequence length is invalid */ -#define ASN1_AFLG_BROKEN 4 - -/* operation values for asn1_cb */ - -#define ASN1_OP_NEW_PRE 0 -#define ASN1_OP_NEW_POST 1 -#define ASN1_OP_FREE_PRE 2 -#define ASN1_OP_FREE_POST 3 -#define ASN1_OP_D2I_PRE 4 -#define ASN1_OP_D2I_POST 5 -#define ASN1_OP_I2D_PRE 6 -#define ASN1_OP_I2D_POST 7 - -/* Macro to implement a primitive type */ -#define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0) -#define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \ - ASN1_ITEM_start(itname) \ - ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \ - ASN1_ITEM_end(itname) - -/* Macro to implement a multi string type */ -#define IMPLEMENT_ASN1_MSTRING(itname, mask) \ - ASN1_ITEM_start(itname) \ - ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \ - ASN1_ITEM_end(itname) - -/* Macro to implement an ASN1_ITEM in terms of old style funcs */ - -#define IMPLEMENT_COMPAT_ASN1(sname) IMPLEMENT_COMPAT_ASN1_type(sname, V_ASN1_SEQUENCE) - -#define IMPLEMENT_COMPAT_ASN1_type(sname, tag) \ - static const ASN1_COMPAT_FUNCS sname##_ff = { \ - (ASN1_new_func *)sname##_new, \ - (ASN1_free_func *)sname##_free, \ - (ASN1_d2i_func *)d2i_##sname, \ - (ASN1_i2d_func *)i2d_##sname, \ - }; \ - ASN1_ITEM_start(sname) \ - ASN1_ITYPE_COMPAT, \ - tag, \ - NULL, \ - 0, \ - &sname##_ff, \ - 0, \ - #sname \ - ASN1_ITEM_end(sname) - -#define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \ - ASN1_ITEM_start(sname) \ - ASN1_ITYPE_EXTERN, \ - tag, \ - NULL, \ - 0, \ - &fptrs, \ - 0, \ - #sname \ - ASN1_ITEM_end(sname) - -/* Macro to implement standard functions in terms of ASN1_ITEM structures */ - -#define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname) - -#define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname) - -#define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \ - IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname) - -#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \ - IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname) - -#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \ - stname *fname##_new(void) \ - { \ - return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \ - } \ - void fname##_free(stname *a) \ - { \ - ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \ - } - -#define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \ - IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \ - IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) - -#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \ - stname *d2i_##fname(stname **a, const unsigned char **in, long len) \ - { \ - return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\ - } \ - int i2d_##fname(stname *a, unsigned char **out) \ - { \ - return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\ - } - -#define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \ - int i2d_##stname##_NDEF(stname *a, unsigned char **out) \ - { \ - return ASN1_item_ndef_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\ - } - -/* This includes evil casts to remove const: they will go away when full - * ASN1 constification is done. - */ -#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \ - stname *d2i_##fname(stname **a, const unsigned char **in, long len) \ - { \ - return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\ - } \ - int i2d_##fname(const stname *a, unsigned char **out) \ - { \ - return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\ - } - -#define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \ - stname * stname##_dup(stname *x) \ - { \ - return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \ - } - -#define IMPLEMENT_ASN1_FUNCTIONS_const(name) \ - IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name) - -#define IMPLEMENT_ASN1_FUNCTIONS_const_fname(stname, itname, fname) \ - IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \ - IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) - -/* external definitions for primitive types */ - -DECLARE_ASN1_ITEM(ASN1_BOOLEAN) -DECLARE_ASN1_ITEM(ASN1_TBOOLEAN) -DECLARE_ASN1_ITEM(ASN1_FBOOLEAN) -DECLARE_ASN1_ITEM(ASN1_SEQUENCE) -DECLARE_ASN1_ITEM(CBIGNUM) -DECLARE_ASN1_ITEM(BIGNUM) -DECLARE_ASN1_ITEM(LONG) -DECLARE_ASN1_ITEM(ZLONG) - -DECLARE_STACK_OF(ASN1_VALUE) - -/* Functions used internally by the ASN1 code */ - -int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it); -void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it); -int ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); -int ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it); - -void ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); -int ASN1_template_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_TEMPLATE *tt); -int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, - int tag, int aclass, char opt, ASN1_TLC *ctx); - -int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it, int tag, int aclass); -int ASN1_template_i2d(ASN1_VALUE **pval, unsigned char **out, const ASN1_TEMPLATE *tt); -void ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it); - -int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it); -int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); - -int asn1_get_choice_selector(ASN1_VALUE **pval, const ASN1_ITEM *it); -int asn1_set_choice_selector(ASN1_VALUE **pval, int value, const ASN1_ITEM *it); - -ASN1_VALUE ** asn1_get_field_ptr(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); - -const ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, int nullerr); - -int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it); - -void asn1_enc_init(ASN1_VALUE **pval, const ASN1_ITEM *it); -void asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it); -int asn1_enc_restore(int *len, unsigned char **out, ASN1_VALUE **pval, const ASN1_ITEM *it); -int asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen, const ASN1_ITEM *it); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/bio.h b/externals/openssl/bio.h deleted file mode 100644 index cecb6a7207..0000000000 --- a/externals/openssl/bio.h +++ /dev/null @@ -1,776 +0,0 @@ -/* crypto/bio/bio.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_BIO_H -#define HEADER_BIO_H - -#include - -#ifndef OPENSSL_NO_FP_API -# include -#endif -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* These are the 'types' of BIOs */ -#define BIO_TYPE_NONE 0 -#define BIO_TYPE_MEM (1|0x0400) -#define BIO_TYPE_FILE (2|0x0400) - -#define BIO_TYPE_FD (4|0x0400|0x0100) -#define BIO_TYPE_SOCKET (5|0x0400|0x0100) -#define BIO_TYPE_NULL (6|0x0400) -#define BIO_TYPE_SSL (7|0x0200) -#define BIO_TYPE_MD (8|0x0200) /* passive filter */ -#define BIO_TYPE_BUFFER (9|0x0200) /* filter */ -#define BIO_TYPE_CIPHER (10|0x0200) /* filter */ -#define BIO_TYPE_BASE64 (11|0x0200) /* filter */ -#define BIO_TYPE_CONNECT (12|0x0400|0x0100) /* socket - connect */ -#define BIO_TYPE_ACCEPT (13|0x0400|0x0100) /* socket for accept */ -#define BIO_TYPE_PROXY_CLIENT (14|0x0200) /* client proxy BIO */ -#define BIO_TYPE_PROXY_SERVER (15|0x0200) /* server proxy BIO */ -#define BIO_TYPE_NBIO_TEST (16|0x0200) /* server proxy BIO */ -#define BIO_TYPE_NULL_FILTER (17|0x0200) -#define BIO_TYPE_BER (18|0x0200) /* BER -> bin filter */ -#define BIO_TYPE_BIO (19|0x0400) /* (half a) BIO pair */ -#define BIO_TYPE_LINEBUFFER (20|0x0200) /* filter */ -#define BIO_TYPE_DGRAM (21|0x0400|0x0100) -#define BIO_TYPE_COMP (23|0x0200) /* filter */ - -#define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */ -#define BIO_TYPE_FILTER 0x0200 -#define BIO_TYPE_SOURCE_SINK 0x0400 - -/* BIO_FILENAME_READ|BIO_CLOSE to open or close on free. - * BIO_set_fp(in,stdin,BIO_NOCLOSE); */ -#define BIO_NOCLOSE 0x00 -#define BIO_CLOSE 0x01 - -/* These are used in the following macros and are passed to - * BIO_ctrl() */ -#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */ -#define BIO_CTRL_EOF 2 /* opt - are we at the eof */ -#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */ -#define BIO_CTRL_SET 4 /* man - set the 'IO' type */ -#define BIO_CTRL_GET 5 /* man - get the 'IO' type */ -#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */ -#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */ -#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */ -#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */ -#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */ -#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */ -#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */ -#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */ -/* callback is int cb(BIO *bio,state,ret); */ -#define BIO_CTRL_SET_CALLBACK 14 /* opt - set callback function */ -#define BIO_CTRL_GET_CALLBACK 15 /* opt - set callback function */ - -#define BIO_CTRL_SET_FILENAME 30 /* BIO_s_file special */ - -/* dgram BIO stuff */ -#define BIO_CTRL_DGRAM_CONNECT 31 /* BIO dgram special */ -#define BIO_CTRL_DGRAM_SET_CONNECTED 32 /* allow for an externally - * connected socket to be - * passed in */ -#define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33 /* setsockopt, essentially */ -#define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34 /* getsockopt, essentially */ -#define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35 /* setsockopt, essentially */ -#define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36 /* getsockopt, essentially */ - -#define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37 /* flag whether the last */ -#define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38 /* I/O operation tiemd out */ - -/* #ifdef IP_MTU_DISCOVER */ -#define BIO_CTRL_DGRAM_MTU_DISCOVER 39 /* set DF bit on egress packets */ -/* #endif */ - -#define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */ -#define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */ -#define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for - * MTU. want to use this - * if asking the kernel - * fails */ - -#define BIO_CTRL_DGRAM_MTU_EXCEEDED 43 /* check whether the MTU - * was exceed in the - * previous write - * operation */ - -#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */ - - -/* modifiers */ -#define BIO_FP_READ 0x02 -#define BIO_FP_WRITE 0x04 -#define BIO_FP_APPEND 0x08 -#define BIO_FP_TEXT 0x10 - -#define BIO_FLAGS_READ 0x01 -#define BIO_FLAGS_WRITE 0x02 -#define BIO_FLAGS_IO_SPECIAL 0x04 -#define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL) -#define BIO_FLAGS_SHOULD_RETRY 0x08 -#ifndef BIO_FLAGS_UPLINK -/* "UPLINK" flag denotes file descriptors provided by application. - It defaults to 0, as most platforms don't require UPLINK interface. */ -#define BIO_FLAGS_UPLINK 0 -#endif - -/* Used in BIO_gethostbyname() */ -#define BIO_GHBN_CTRL_HITS 1 -#define BIO_GHBN_CTRL_MISSES 2 -#define BIO_GHBN_CTRL_CACHE_SIZE 3 -#define BIO_GHBN_CTRL_GET_ENTRY 4 -#define BIO_GHBN_CTRL_FLUSH 5 - -/* Mostly used in the SSL BIO */ -/* Not used anymore - * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10 - * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20 - * #define BIO_FLAGS_PROTOCOL_STARTUP 0x40 - */ - -#define BIO_FLAGS_BASE64_NO_NL 0x100 - -/* This is used with memory BIOs: it means we shouldn't free up or change the - * data in any way. - */ -#define BIO_FLAGS_MEM_RDONLY 0x200 - -typedef struct bio_st BIO; - -void BIO_set_flags(BIO *b, int flags); -int BIO_test_flags(const BIO *b, int flags); -void BIO_clear_flags(BIO *b, int flags); - -#define BIO_get_flags(b) BIO_test_flags(b, ~(0x0)) -#define BIO_set_retry_special(b) \ - BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY)) -#define BIO_set_retry_read(b) \ - BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY)) -#define BIO_set_retry_write(b) \ - BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY)) - -/* These are normally used internally in BIOs */ -#define BIO_clear_retry_flags(b) \ - BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY)) -#define BIO_get_retry_flags(b) \ - BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY)) - -/* These should be used by the application to tell why we should retry */ -#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ) -#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE) -#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL) -#define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS) -#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY) - -/* The next three are used in conjunction with the - * BIO_should_io_special() condition. After this returns true, - * BIO *BIO_get_retry_BIO(BIO *bio, int *reason); will walk the BIO - * stack and return the 'reason' for the special and the offending BIO. - * Given a BIO, BIO_get_retry_reason(bio) will return the code. */ -/* Returned from the SSL bio when the certificate retrieval code had an error */ -#define BIO_RR_SSL_X509_LOOKUP 0x01 -/* Returned from the connect BIO when a connect would have blocked */ -#define BIO_RR_CONNECT 0x02 -/* Returned from the accept BIO when an accept would have blocked */ -#define BIO_RR_ACCEPT 0x03 - -/* These are passed by the BIO callback */ -#define BIO_CB_FREE 0x01 -#define BIO_CB_READ 0x02 -#define BIO_CB_WRITE 0x03 -#define BIO_CB_PUTS 0x04 -#define BIO_CB_GETS 0x05 -#define BIO_CB_CTRL 0x06 - -/* The callback is called before and after the underling operation, - * The BIO_CB_RETURN flag indicates if it is after the call */ -#define BIO_CB_RETURN 0x80 -#define BIO_CB_return(a) ((a)|BIO_CB_RETURN)) -#define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN)) -#define BIO_cb_post(a) ((a)&BIO_CB_RETURN) - -long (*BIO_get_callback(const BIO *b)) (struct bio_st *,int,const char *,int, long,long); -void BIO_set_callback(BIO *b, - long (*callback)(struct bio_st *,int,const char *,int, long,long)); -char *BIO_get_callback_arg(const BIO *b); -void BIO_set_callback_arg(BIO *b, char *arg); - -const char * BIO_method_name(const BIO *b); -int BIO_method_type(const BIO *b); - -typedef void bio_info_cb(struct bio_st *, int, const char *, int, long, long); - -#ifndef OPENSSL_SYS_WIN16 -typedef struct bio_method_st - { - int type; - const char *name; - int (*bwrite)(BIO *, const char *, int); - int (*bread)(BIO *, char *, int); - int (*bputs)(BIO *, const char *); - int (*bgets)(BIO *, char *, int); - long (*ctrl)(BIO *, int, long, void *); - int (*create)(BIO *); - int (*destroy)(BIO *); - long (*callback_ctrl)(BIO *, int, bio_info_cb *); - } BIO_METHOD; -#else -typedef struct bio_method_st - { - int type; - const char *name; - int (_far *bwrite)(); - int (_far *bread)(); - int (_far *bputs)(); - int (_far *bgets)(); - long (_far *ctrl)(); - int (_far *create)(); - int (_far *destroy)(); - long (_far *callback_ctrl)(); - } BIO_METHOD; -#endif - -struct bio_st - { - BIO_METHOD *method; - /* bio, mode, argp, argi, argl, ret */ - long (*callback)(struct bio_st *,int,const char *,int, long,long); - char *cb_arg; /* first argument for the callback */ - - int init; - int shutdown; - int flags; /* extra storage */ - int retry_reason; - int num; - void *ptr; - struct bio_st *next_bio; /* used by filter BIOs */ - struct bio_st *prev_bio; /* used by filter BIOs */ - int references; - unsigned long num_read; - unsigned long num_write; - - CRYPTO_EX_DATA ex_data; - }; - -DECLARE_STACK_OF(BIO) - -typedef struct bio_f_buffer_ctx_struct - { - /* BIO *bio; */ /* this is now in the BIO struct */ - int ibuf_size; /* how big is the input buffer */ - int obuf_size; /* how big is the output buffer */ - - char *ibuf; /* the char array */ - int ibuf_len; /* how many bytes are in it */ - int ibuf_off; /* write/read offset */ - - char *obuf; /* the char array */ - int obuf_len; /* how many bytes are in it */ - int obuf_off; /* write/read offset */ - } BIO_F_BUFFER_CTX; - -/* connect BIO stuff */ -#define BIO_CONN_S_BEFORE 1 -#define BIO_CONN_S_GET_IP 2 -#define BIO_CONN_S_GET_PORT 3 -#define BIO_CONN_S_CREATE_SOCKET 4 -#define BIO_CONN_S_CONNECT 5 -#define BIO_CONN_S_OK 6 -#define BIO_CONN_S_BLOCKED_CONNECT 7 -#define BIO_CONN_S_NBIO 8 -/*#define BIO_CONN_get_param_hostname BIO_ctrl */ - -#define BIO_C_SET_CONNECT 100 -#define BIO_C_DO_STATE_MACHINE 101 -#define BIO_C_SET_NBIO 102 -#define BIO_C_SET_PROXY_PARAM 103 -#define BIO_C_SET_FD 104 -#define BIO_C_GET_FD 105 -#define BIO_C_SET_FILE_PTR 106 -#define BIO_C_GET_FILE_PTR 107 -#define BIO_C_SET_FILENAME 108 -#define BIO_C_SET_SSL 109 -#define BIO_C_GET_SSL 110 -#define BIO_C_SET_MD 111 -#define BIO_C_GET_MD 112 -#define BIO_C_GET_CIPHER_STATUS 113 -#define BIO_C_SET_BUF_MEM 114 -#define BIO_C_GET_BUF_MEM_PTR 115 -#define BIO_C_GET_BUFF_NUM_LINES 116 -#define BIO_C_SET_BUFF_SIZE 117 -#define BIO_C_SET_ACCEPT 118 -#define BIO_C_SSL_MODE 119 -#define BIO_C_GET_MD_CTX 120 -#define BIO_C_GET_PROXY_PARAM 121 -#define BIO_C_SET_BUFF_READ_DATA 122 /* data to read first */ -#define BIO_C_GET_CONNECT 123 -#define BIO_C_GET_ACCEPT 124 -#define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125 -#define BIO_C_GET_SSL_NUM_RENEGOTIATES 126 -#define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127 -#define BIO_C_FILE_SEEK 128 -#define BIO_C_GET_CIPHER_CTX 129 -#define BIO_C_SET_BUF_MEM_EOF_RETURN 130/*return end of input value*/ -#define BIO_C_SET_BIND_MODE 131 -#define BIO_C_GET_BIND_MODE 132 -#define BIO_C_FILE_TELL 133 -#define BIO_C_GET_SOCKS 134 -#define BIO_C_SET_SOCKS 135 - -#define BIO_C_SET_WRITE_BUF_SIZE 136/* for BIO_s_bio */ -#define BIO_C_GET_WRITE_BUF_SIZE 137 -#define BIO_C_MAKE_BIO_PAIR 138 -#define BIO_C_DESTROY_BIO_PAIR 139 -#define BIO_C_GET_WRITE_GUARANTEE 140 -#define BIO_C_GET_READ_REQUEST 141 -#define BIO_C_SHUTDOWN_WR 142 -#define BIO_C_NREAD0 143 -#define BIO_C_NREAD 144 -#define BIO_C_NWRITE0 145 -#define BIO_C_NWRITE 146 -#define BIO_C_RESET_READ_REQUEST 147 -#define BIO_C_SET_MD_CTX 148 - - -#define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg) -#define BIO_get_app_data(s) BIO_get_ex_data(s,0) - -/* BIO_s_connect() and BIO_s_socks4a_connect() */ -#define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0,(char *)name) -#define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1,(char *)port) -#define BIO_set_conn_ip(b,ip) BIO_ctrl(b,BIO_C_SET_CONNECT,2,(char *)ip) -#define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port) -#define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0) -#define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1) -#define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2) -#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3) - - -#define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) - -/* BIO_s_accept_socket() */ -#define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name) -#define BIO_get_accept_port(b) BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0) -/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */ -#define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?"a":NULL) -#define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(char *)bio) - -#define BIO_BIND_NORMAL 0 -#define BIO_BIND_REUSEADDR_IF_UNUSED 1 -#define BIO_BIND_REUSEADDR 2 -#define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL) -#define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL) - -#define BIO_do_connect(b) BIO_do_handshake(b) -#define BIO_do_accept(b) BIO_do_handshake(b) -#define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL) - -/* BIO_s_proxy_client() */ -#define BIO_set_url(b,url) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,0,(char *)(url)) -#define BIO_set_proxies(b,p) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,1,(char *)(p)) -/* BIO_set_nbio(b,n) */ -#define BIO_set_filter_bio(b,s) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,2,(char *)(s)) -/* BIO *BIO_get_filter_bio(BIO *bio); */ -#define BIO_set_proxy_cb(b,cb) BIO_callback_ctrl(b,BIO_C_SET_PROXY_PARAM,3,(void *(*cb)())) -#define BIO_set_proxy_header(b,sk) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,4,(char *)sk) -#define BIO_set_no_connect_return(b,bool) BIO_int_ctrl(b,BIO_C_SET_PROXY_PARAM,5,bool) - -#define BIO_get_proxy_header(b,skp) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,0,(char *)skp) -#define BIO_get_proxies(b,pxy_p) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,1,(char *)(pxy_p)) -#define BIO_get_url(b,url) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,2,(char *)(url)) -#define BIO_get_no_connect_return(b) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,5,NULL) - -#define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) -#define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c) - -#define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)fp) -#define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)fpp) - -#define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL) -#define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL) - -/* name is cast to lose const, but might be better to route through a function - so we can do it safely */ -#ifdef CONST_STRICT -/* If you are wondering why this isn't defined, its because CONST_STRICT is - * purely a compile-time kludge to allow const to be checked. - */ -int BIO_read_filename(BIO *b,const char *name); -#else -#define BIO_read_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ - BIO_CLOSE|BIO_FP_READ,(char *)name) -#endif -#define BIO_write_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ - BIO_CLOSE|BIO_FP_WRITE,name) -#define BIO_append_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ - BIO_CLOSE|BIO_FP_APPEND,name) -#define BIO_rw_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ - BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name) - -/* WARNING WARNING, this ups the reference count on the read bio of the - * SSL structure. This is because the ssl read BIO is now pointed to by - * the next_bio field in the bio. So when you free the BIO, make sure - * you are doing a BIO_free_all() to catch the underlying BIO. */ -#define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl) -#define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp) -#define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL) -#define BIO_set_ssl_renegotiate_bytes(b,num) \ - BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL); -#define BIO_get_num_renegotiates(b) \ - BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL); -#define BIO_set_ssl_renegotiate_timeout(b,seconds) \ - BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL); - -/* defined in evp.h */ -/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */ - -#define BIO_get_mem_data(b,pp) BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp) -#define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)bm) -#define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0,(char *)pp) -#define BIO_set_mem_eof_return(b,v) \ - BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL) - -/* For the BIO_f_buffer() type */ -#define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL) -#define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL) -#define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0) -#define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1) -#define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf) - -/* Don't use the next one unless you know what you are doing :-) */ -#define BIO_dup_state(b,ret) BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret)) - -#define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL) -#define BIO_eof(b) (int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL) -#define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL) -#define BIO_get_close(b) (int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL) -#define BIO_pending(b) (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL) -#define BIO_wpending(b) (int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL) -/* ...pending macros have inappropriate return type */ -size_t BIO_ctrl_pending(BIO *b); -size_t BIO_ctrl_wpending(BIO *b); -#define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL) -#define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \ - cbp) -#define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb) - -/* For the BIO_f_buffer() type */ -#define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL) - -/* For BIO_s_bio() */ -#define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL) -#define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL) -#define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2) -#define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL) -#define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL) -/* macros with inappropriate type -- but ...pending macros use int too: */ -#define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL) -#define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL) -size_t BIO_ctrl_get_write_guarantee(BIO *b); -size_t BIO_ctrl_get_read_request(BIO *b); -int BIO_ctrl_reset_read_request(BIO *b); - -/* ctrl macros for dgram */ -#define BIO_ctrl_dgram_connect(b,peer) \ - (int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)peer) -#define BIO_ctrl_set_connected(b, state, peer) \ - (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, state, (char *)peer) -#define BIO_dgram_recv_timedout(b) \ - (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL) -#define BIO_dgram_send_timedout(b) \ - (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL) -#define BIO_dgram_set_peer(b,peer) \ - (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer) - -/* These two aren't currently implemented */ -/* int BIO_get_ex_num(BIO *bio); */ -/* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */ -int BIO_set_ex_data(BIO *bio,int idx,void *data); -void *BIO_get_ex_data(BIO *bio,int idx); -int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -unsigned long BIO_number_read(BIO *bio); -unsigned long BIO_number_written(BIO *bio); - -# ifndef OPENSSL_NO_FP_API -# if defined(OPENSSL_SYS_WIN16) && defined(_WINDLL) -BIO_METHOD *BIO_s_file_internal(void); -BIO *BIO_new_file_internal(char *filename, char *mode); -BIO *BIO_new_fp_internal(FILE *stream, int close_flag); -# define BIO_s_file BIO_s_file_internal -# define BIO_new_file BIO_new_file_internal -# define BIO_new_fp BIO_new_fp_internal -# else /* FP_API */ -BIO_METHOD *BIO_s_file(void ); -BIO *BIO_new_file(const char *filename, const char *mode); -BIO *BIO_new_fp(FILE *stream, int close_flag); -# define BIO_s_file_internal BIO_s_file -# define BIO_new_file_internal BIO_new_file -# define BIO_new_fp_internal BIO_s_file -# endif /* FP_API */ -# endif -BIO * BIO_new(BIO_METHOD *type); -int BIO_set(BIO *a,BIO_METHOD *type); -int BIO_free(BIO *a); -void BIO_vfree(BIO *a); -int BIO_read(BIO *b, void *data, int len); -int BIO_gets(BIO *bp,char *buf, int size); -int BIO_write(BIO *b, const void *data, int len); -int BIO_puts(BIO *bp,const char *buf); -int BIO_indent(BIO *b,int indent,int max); -long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg); -long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const char *, int, long, long)); -char * BIO_ptr_ctrl(BIO *bp,int cmd,long larg); -long BIO_int_ctrl(BIO *bp,int cmd,long larg,int iarg); -BIO * BIO_push(BIO *b,BIO *append); -BIO * BIO_pop(BIO *b); -void BIO_free_all(BIO *a); -BIO * BIO_find_type(BIO *b,int bio_type); -BIO * BIO_next(BIO *b); -BIO * BIO_get_retry_BIO(BIO *bio, int *reason); -int BIO_get_retry_reason(BIO *bio); -BIO * BIO_dup_chain(BIO *in); - -int BIO_nread0(BIO *bio, char **buf); -int BIO_nread(BIO *bio, char **buf, int num); -int BIO_nwrite0(BIO *bio, char **buf); -int BIO_nwrite(BIO *bio, char **buf, int num); - -#ifndef OPENSSL_SYS_WIN16 -long BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi, - long argl,long ret); -#else -long _far _loadds BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi, - long argl,long ret); -#endif - -BIO_METHOD *BIO_s_mem(void); -BIO *BIO_new_mem_buf(void *buf, int len); -BIO_METHOD *BIO_s_socket(void); -BIO_METHOD *BIO_s_connect(void); -BIO_METHOD *BIO_s_accept(void); -BIO_METHOD *BIO_s_fd(void); -#ifndef OPENSSL_SYS_OS2 -BIO_METHOD *BIO_s_log(void); -#endif -BIO_METHOD *BIO_s_bio(void); -BIO_METHOD *BIO_s_null(void); -BIO_METHOD *BIO_f_null(void); -BIO_METHOD *BIO_f_buffer(void); -#ifdef OPENSSL_SYS_VMS -BIO_METHOD *BIO_f_linebuffer(void); -#endif -BIO_METHOD *BIO_f_nbio_test(void); -#ifndef OPENSSL_NO_DGRAM -BIO_METHOD *BIO_s_datagram(void); -#endif - -/* BIO_METHOD *BIO_f_ber(void); */ - -int BIO_sock_should_retry(int i); -int BIO_sock_non_fatal_error(int error); -int BIO_dgram_non_fatal_error(int error); - -int BIO_fd_should_retry(int i); -int BIO_fd_non_fatal_error(int error); -int BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u), - void *u, const char *s, int len); -int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), - void *u, const char *s, int len, int indent); -int BIO_dump(BIO *b,const char *bytes,int len); -int BIO_dump_indent(BIO *b,const char *bytes,int len,int indent); -#ifndef OPENSSL_NO_FP_API -int BIO_dump_fp(FILE *fp, const char *s, int len); -int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent); -#endif -struct hostent *BIO_gethostbyname(const char *name); -/* We might want a thread-safe interface too: - * struct hostent *BIO_gethostbyname_r(const char *name, - * struct hostent *result, void *buffer, size_t buflen); - * or something similar (caller allocates a struct hostent, - * pointed to by "result", and additional buffer space for the various - * substructures; if the buffer does not suffice, NULL is returned - * and an appropriate error code is set). - */ -int BIO_sock_error(int sock); -int BIO_socket_ioctl(int fd, long type, void *arg); -int BIO_socket_nbio(int fd,int mode); -int BIO_get_port(const char *str, unsigned short *port_ptr); -int BIO_get_host_ip(const char *str, unsigned char *ip); -int BIO_get_accept_socket(char *host_port,int mode); -int BIO_accept(int sock,char **ip_port); -int BIO_sock_init(void ); -void BIO_sock_cleanup(void); -int BIO_set_tcp_ndelay(int sock,int turn_on); - -BIO *BIO_new_socket(int sock, int close_flag); -BIO *BIO_new_dgram(int fd, int close_flag); -BIO *BIO_new_fd(int fd, int close_flag); -BIO *BIO_new_connect(char *host_port); -BIO *BIO_new_accept(char *host_port); - -int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, - BIO **bio2, size_t writebuf2); -/* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints. - * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. - * Size 0 uses default value. - */ - -void BIO_copy_next_retry(BIO *b); - -/*long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);*/ - -#ifdef __GNUC__ -# define __bio_h__attr__ __attribute__ -#else -# define __bio_h__attr__(x) -#endif -int BIO_printf(BIO *bio, const char *format, ...) - __bio_h__attr__((__format__(__printf__,2,3))); -int BIO_vprintf(BIO *bio, const char *format, va_list args) - __bio_h__attr__((__format__(__printf__,2,0))); -int BIO_snprintf(char *buf, size_t n, const char *format, ...) - __bio_h__attr__((__format__(__printf__,3,4))); -int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) - __bio_h__attr__((__format__(__printf__,3,0))); -#undef __bio_h__attr__ - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_BIO_strings(void); - -/* Error codes for the BIO functions. */ - -/* Function codes. */ -#define BIO_F_ACPT_STATE 100 -#define BIO_F_BIO_ACCEPT 101 -#define BIO_F_BIO_BER_GET_HEADER 102 -#define BIO_F_BIO_CALLBACK_CTRL 131 -#define BIO_F_BIO_CTRL 103 -#define BIO_F_BIO_GETHOSTBYNAME 120 -#define BIO_F_BIO_GETS 104 -#define BIO_F_BIO_GET_ACCEPT_SOCKET 105 -#define BIO_F_BIO_GET_HOST_IP 106 -#define BIO_F_BIO_GET_PORT 107 -#define BIO_F_BIO_MAKE_PAIR 121 -#define BIO_F_BIO_NEW 108 -#define BIO_F_BIO_NEW_FILE 109 -#define BIO_F_BIO_NEW_MEM_BUF 126 -#define BIO_F_BIO_NREAD 123 -#define BIO_F_BIO_NREAD0 124 -#define BIO_F_BIO_NWRITE 125 -#define BIO_F_BIO_NWRITE0 122 -#define BIO_F_BIO_PUTS 110 -#define BIO_F_BIO_READ 111 -#define BIO_F_BIO_SOCK_INIT 112 -#define BIO_F_BIO_WRITE 113 -#define BIO_F_BUFFER_CTRL 114 -#define BIO_F_CONN_CTRL 127 -#define BIO_F_CONN_STATE 115 -#define BIO_F_FILE_CTRL 116 -#define BIO_F_FILE_READ 130 -#define BIO_F_LINEBUFFER_CTRL 129 -#define BIO_F_MEM_READ 128 -#define BIO_F_MEM_WRITE 117 -#define BIO_F_SSL_NEW 118 -#define BIO_F_WSASTARTUP 119 - -/* Reason codes. */ -#define BIO_R_ACCEPT_ERROR 100 -#define BIO_R_BAD_FOPEN_MODE 101 -#define BIO_R_BAD_HOSTNAME_LOOKUP 102 -#define BIO_R_BROKEN_PIPE 124 -#define BIO_R_CONNECT_ERROR 103 -#define BIO_R_EOF_ON_MEMORY_BIO 127 -#define BIO_R_ERROR_SETTING_NBIO 104 -#define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET 105 -#define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET 106 -#define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107 -#define BIO_R_INVALID_ARGUMENT 125 -#define BIO_R_INVALID_IP_ADDRESS 108 -#define BIO_R_IN_USE 123 -#define BIO_R_KEEPALIVE 109 -#define BIO_R_NBIO_CONNECT_ERROR 110 -#define BIO_R_NO_ACCEPT_PORT_SPECIFIED 111 -#define BIO_R_NO_HOSTNAME_SPECIFIED 112 -#define BIO_R_NO_PORT_DEFINED 113 -#define BIO_R_NO_PORT_SPECIFIED 114 -#define BIO_R_NO_SUCH_FILE 128 -#define BIO_R_NULL_PARAMETER 115 -#define BIO_R_TAG_MISMATCH 116 -#define BIO_R_UNABLE_TO_BIND_SOCKET 117 -#define BIO_R_UNABLE_TO_CREATE_SOCKET 118 -#define BIO_R_UNABLE_TO_LISTEN_SOCKET 119 -#define BIO_R_UNINITIALIZED 120 -#define BIO_R_UNSUPPORTED_METHOD 121 -#define BIO_R_WRITE_TO_READ_ONLY_BIO 126 -#define BIO_R_WSASTARTUP 122 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/blowfish.h b/externals/openssl/blowfish.h deleted file mode 100644 index d24ffccb65..0000000000 --- a/externals/openssl/blowfish.h +++ /dev/null @@ -1,129 +0,0 @@ -/* crypto/bf/blowfish.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_BLOWFISH_H -#define HEADER_BLOWFISH_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef OPENSSL_NO_BF -#error BF is disabled. -#endif - -#define BF_ENCRYPT 1 -#define BF_DECRYPT 0 - -/* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * ! BF_LONG has to be at least 32 bits wide. If it's wider, then ! - * ! BF_LONG_LOG2 has to be defined along. ! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - -#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__) -#define BF_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -#define BF_LONG unsigned long -#define BF_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ -#else -#define BF_LONG unsigned int -#endif - -#define BF_ROUNDS 16 -#define BF_BLOCK 8 - -typedef struct bf_key_st - { - BF_LONG P[BF_ROUNDS+2]; - BF_LONG S[4*256]; - } BF_KEY; - -#ifdef OPENSSL_FIPS -void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data); -#endif -void BF_set_key(BF_KEY *key, int len, const unsigned char *data); - -void BF_encrypt(BF_LONG *data,const BF_KEY *key); -void BF_decrypt(BF_LONG *data,const BF_KEY *key); - -void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, - const BF_KEY *key, int enc); -void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, - const BF_KEY *schedule, unsigned char *ivec, int enc); -void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, - const BF_KEY *schedule, unsigned char *ivec, int *num, int enc); -void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, - const BF_KEY *schedule, unsigned char *ivec, int *num); -const char *BF_options(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/bn.h b/externals/openssl/bn.h deleted file mode 100644 index f1719a5877..0000000000 --- a/externals/openssl/bn.h +++ /dev/null @@ -1,855 +0,0 @@ -/* crypto/bn/bn.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * - * Portions of the attached software ("Contribution") are developed by - * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. - * - * The Contribution is licensed pursuant to the Eric Young open source - * license provided above. - * - * The binary polynomial arithmetic software is originally written by - * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. - * - */ - -#ifndef HEADER_BN_H -#define HEADER_BN_H - -#include -#ifndef OPENSSL_NO_FP_API -#include /* FILE */ -#endif -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* These preprocessor symbols control various aspects of the bignum headers and - * library code. They're not defined by any "normal" configuration, as they are - * intended for development and testing purposes. NB: defining all three can be - * useful for debugging application code as well as openssl itself. - * - * BN_DEBUG - turn on various debugging alterations to the bignum code - * BN_DEBUG_RAND - uses random poisoning of unused words to trip up - * mismanagement of bignum internals. You must also define BN_DEBUG. - */ -/* #define BN_DEBUG */ -/* #define BN_DEBUG_RAND */ - -#define BN_MUL_COMBA -#define BN_SQR_COMBA -#define BN_RECURSION - -/* This next option uses the C libraries (2 word)/(1 word) function. - * If it is not defined, I use my C version (which is slower). - * The reason for this flag is that when the particular C compiler - * library routine is used, and the library is linked with a different - * compiler, the library is missing. This mostly happens when the - * library is built with gcc and then linked using normal cc. This would - * be a common occurrence because gcc normally produces code that is - * 2 times faster than system compilers for the big number stuff. - * For machines with only one compiler (or shared libraries), this should - * be on. Again this in only really a problem on machines - * using "long long's", are 32bit, and are not using my assembler code. */ -#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || \ - defined(OPENSSL_SYS_WIN32) || defined(linux) -# ifndef BN_DIV2W -# define BN_DIV2W -# endif -#endif - -/* assuming long is 64bit - this is the DEC Alpha - * unsigned long long is only 64 bits :-(, don't define - * BN_LLONG for the DEC Alpha */ -#ifdef SIXTY_FOUR_BIT_LONG -#define BN_ULLONG unsigned long long -#define BN_ULONG unsigned long -#define BN_LONG long -#define BN_BITS 128 -#define BN_BYTES 8 -#define BN_BITS2 64 -#define BN_BITS4 32 -#define BN_MASK (0xffffffffffffffffffffffffffffffffLL) -#define BN_MASK2 (0xffffffffffffffffL) -#define BN_MASK2l (0xffffffffL) -#define BN_MASK2h (0xffffffff00000000L) -#define BN_MASK2h1 (0xffffffff80000000L) -#define BN_TBIT (0x8000000000000000L) -#define BN_DEC_CONV (10000000000000000000UL) -#define BN_DEC_FMT1 "%lu" -#define BN_DEC_FMT2 "%019lu" -#define BN_DEC_NUM 19 -#endif - -/* This is where the long long data type is 64 bits, but long is 32. - * For machines where there are 64bit registers, this is the mode to use. - * IRIX, on R4000 and above should use this mode, along with the relevant - * assembler code :-). Do NOT define BN_LLONG. - */ -#ifdef SIXTY_FOUR_BIT -#undef BN_LLONG -#undef BN_ULLONG -#define BN_ULONG unsigned long long -#define BN_LONG long long -#define BN_BITS 128 -#define BN_BYTES 8 -#define BN_BITS2 64 -#define BN_BITS4 32 -#define BN_MASK2 (0xffffffffffffffffLL) -#define BN_MASK2l (0xffffffffL) -#define BN_MASK2h (0xffffffff00000000LL) -#define BN_MASK2h1 (0xffffffff80000000LL) -#define BN_TBIT (0x8000000000000000LL) -#define BN_DEC_CONV (10000000000000000000ULL) -#define BN_DEC_FMT1 "%llu" -#define BN_DEC_FMT2 "%019llu" -#define BN_DEC_NUM 19 -#endif - -#ifdef THIRTY_TWO_BIT -#ifdef BN_LLONG -# if defined(OPENSSL_SYS_WIN32) && !defined(__GNUC__) -# define BN_ULLONG unsigned __int64 -# else -# define BN_ULLONG unsigned long long -# endif -#endif -#define BN_ULONG unsigned long -#define BN_LONG long -#define BN_BITS 64 -#define BN_BYTES 4 -#define BN_BITS2 32 -#define BN_BITS4 16 -#ifdef OPENSSL_SYS_WIN32 -/* VC++ doesn't like the LL suffix */ -#define BN_MASK (0xffffffffffffffffL) -#else -#define BN_MASK (0xffffffffffffffffLL) -#endif -#define BN_MASK2 (0xffffffffL) -#define BN_MASK2l (0xffff) -#define BN_MASK2h1 (0xffff8000L) -#define BN_MASK2h (0xffff0000L) -#define BN_TBIT (0x80000000L) -#define BN_DEC_CONV (1000000000L) -#define BN_DEC_FMT1 "%lu" -#define BN_DEC_FMT2 "%09lu" -#define BN_DEC_NUM 9 -#endif - -#ifdef SIXTEEN_BIT -#ifndef BN_DIV2W -#define BN_DIV2W -#endif -#define BN_ULLONG unsigned long -#define BN_ULONG unsigned short -#define BN_LONG short -#define BN_BITS 32 -#define BN_BYTES 2 -#define BN_BITS2 16 -#define BN_BITS4 8 -#define BN_MASK (0xffffffff) -#define BN_MASK2 (0xffff) -#define BN_MASK2l (0xff) -#define BN_MASK2h1 (0xff80) -#define BN_MASK2h (0xff00) -#define BN_TBIT (0x8000) -#define BN_DEC_CONV (100000) -#define BN_DEC_FMT1 "%u" -#define BN_DEC_FMT2 "%05u" -#define BN_DEC_NUM 5 -#endif - -#ifdef EIGHT_BIT -#ifndef BN_DIV2W -#define BN_DIV2W -#endif -#define BN_ULLONG unsigned short -#define BN_ULONG unsigned char -#define BN_LONG char -#define BN_BITS 16 -#define BN_BYTES 1 -#define BN_BITS2 8 -#define BN_BITS4 4 -#define BN_MASK (0xffff) -#define BN_MASK2 (0xff) -#define BN_MASK2l (0xf) -#define BN_MASK2h1 (0xf8) -#define BN_MASK2h (0xf0) -#define BN_TBIT (0x80) -#define BN_DEC_CONV (100) -#define BN_DEC_FMT1 "%u" -#define BN_DEC_FMT2 "%02u" -#define BN_DEC_NUM 2 -#endif - -#define BN_DEFAULT_BITS 1280 - -#define BN_FLG_MALLOCED 0x01 -#define BN_FLG_STATIC_DATA 0x02 -#define BN_FLG_CONSTTIME 0x04 /* avoid leaking exponent information through timing, - * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime, - * BN_div() will call BN_div_no_branch, - * BN_mod_inverse() will call BN_mod_inverse_no_branch. - */ - -#ifndef OPENSSL_NO_DEPRECATED -#define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME /* deprecated name for the flag */ - /* avoid leaking exponent information through timings - * (BN_mod_exp_mont() will call BN_mod_exp_mont_consttime) */ -#endif - -#ifndef OPENSSL_NO_DEPRECATED -#define BN_FLG_FREE 0x8000 /* used for debuging */ -#endif -#define BN_set_flags(b,n) ((b)->flags|=(n)) -#define BN_get_flags(b,n) ((b)->flags&(n)) - -/* get a clone of a BIGNUM with changed flags, for *temporary* use only - * (the two BIGNUMs cannot not be used in parallel!) */ -#define BN_with_flags(dest,b,n) ((dest)->d=(b)->d, \ - (dest)->top=(b)->top, \ - (dest)->dmax=(b)->dmax, \ - (dest)->neg=(b)->neg, \ - (dest)->flags=(((dest)->flags & BN_FLG_MALLOCED) \ - | ((b)->flags & ~BN_FLG_MALLOCED) \ - | BN_FLG_STATIC_DATA \ - | (n))) - -/* Already declared in ossl_typ.h */ -#if 0 -typedef struct bignum_st BIGNUM; -/* Used for temp variables (declaration hidden in bn_lcl.h) */ -typedef struct bignum_ctx BN_CTX; -typedef struct bn_blinding_st BN_BLINDING; -typedef struct bn_mont_ctx_st BN_MONT_CTX; -typedef struct bn_recp_ctx_st BN_RECP_CTX; -typedef struct bn_gencb_st BN_GENCB; -#endif - -struct bignum_st - { - BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ - int top; /* Index of last used d +1. */ - /* The next are internal book keeping for bn_expand. */ - int dmax; /* Size of the d array. */ - int neg; /* one if the number is negative */ - int flags; - }; - -/* Used for montgomery multiplication */ -struct bn_mont_ctx_st - { - int ri; /* number of bits in R */ - BIGNUM RR; /* used to convert to montgomery form */ - BIGNUM N; /* The modulus */ - BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 - * (Ni is only stored for bignum algorithm) */ -#if 0 - /* OpenSSL 0.9.9 preview: */ - BN_ULONG n0[2];/* least significant word(s) of Ni */ -#else - BN_ULONG n0; /* least significant word of Ni */ -#endif - int flags; - }; - -/* Used for reciprocal division/mod functions - * It cannot be shared between threads - */ -struct bn_recp_ctx_st - { - BIGNUM N; /* the divisor */ - BIGNUM Nr; /* the reciprocal */ - int num_bits; - int shift; - int flags; - }; - -/* Used for slow "generation" functions. */ -struct bn_gencb_st - { - unsigned int ver; /* To handle binary (in)compatibility */ - void *arg; /* callback-specific data */ - union - { - /* if(ver==1) - handles old style callbacks */ - void (*cb_1)(int, int, void *); - /* if(ver==2) - new callback style */ - int (*cb_2)(int, int, BN_GENCB *); - } cb; - }; -/* Wrapper function to make using BN_GENCB easier, */ -int BN_GENCB_call(BN_GENCB *cb, int a, int b); -/* Macro to populate a BN_GENCB structure with an "old"-style callback */ -#define BN_GENCB_set_old(gencb, callback, cb_arg) { \ - BN_GENCB *tmp_gencb = (gencb); \ - tmp_gencb->ver = 1; \ - tmp_gencb->arg = (cb_arg); \ - tmp_gencb->cb.cb_1 = (callback); } -/* Macro to populate a BN_GENCB structure with a "new"-style callback */ -#define BN_GENCB_set(gencb, callback, cb_arg) { \ - BN_GENCB *tmp_gencb = (gencb); \ - tmp_gencb->ver = 2; \ - tmp_gencb->arg = (cb_arg); \ - tmp_gencb->cb.cb_2 = (callback); } - -#define BN_prime_checks 0 /* default: select number of iterations - based on the size of the number */ - -/* number of Miller-Rabin iterations for an error rate of less than 2^-80 - * for random 'b'-bit input, b >= 100 (taken from table 4.4 in the Handbook - * of Applied Cryptography [Menezes, van Oorschot, Vanstone; CRC Press 1996]; - * original paper: Damgaard, Landrock, Pomerance: Average case error estimates - * for the strong probable prime test. -- Math. Comp. 61 (1993) 177-194) */ -#define BN_prime_checks_for_size(b) ((b) >= 1300 ? 2 : \ - (b) >= 850 ? 3 : \ - (b) >= 650 ? 4 : \ - (b) >= 550 ? 5 : \ - (b) >= 450 ? 6 : \ - (b) >= 400 ? 7 : \ - (b) >= 350 ? 8 : \ - (b) >= 300 ? 9 : \ - (b) >= 250 ? 12 : \ - (b) >= 200 ? 15 : \ - (b) >= 150 ? 18 : \ - /* b >= 100 */ 27) - -#define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) - -/* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */ -#define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \ - (((w) == 0) && ((a)->top == 0))) -#define BN_is_zero(a) ((a)->top == 0) -#define BN_is_one(a) (BN_abs_is_word((a),1) && !(a)->neg) -#define BN_is_word(a,w) (BN_abs_is_word((a),(w)) && (!(w) || !(a)->neg)) -#define BN_is_odd(a) (((a)->top > 0) && ((a)->d[0] & 1)) - -#define BN_one(a) (BN_set_word((a),1)) -#define BN_zero_ex(a) \ - do { \ - BIGNUM *_tmp_bn = (a); \ - _tmp_bn->top = 0; \ - _tmp_bn->neg = 0; \ - } while(0) -#ifdef OPENSSL_NO_DEPRECATED -#define BN_zero(a) BN_zero_ex(a) -#else -#define BN_zero(a) (BN_set_word((a),0)) -#endif - -const BIGNUM *BN_value_one(void); -char * BN_options(void); -BN_CTX *BN_CTX_new(void); -#ifndef OPENSSL_NO_DEPRECATED -void BN_CTX_init(BN_CTX *c); -#endif -void BN_CTX_free(BN_CTX *c); -void BN_CTX_start(BN_CTX *ctx); -BIGNUM *BN_CTX_get(BN_CTX *ctx); -void BN_CTX_end(BN_CTX *ctx); -int BN_rand(BIGNUM *rnd, int bits, int top,int bottom); -int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom); -int BN_rand_range(BIGNUM *rnd, const BIGNUM *range); -int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range); -int BN_num_bits(const BIGNUM *a); -int BN_num_bits_word(BN_ULONG); -BIGNUM *BN_new(void); -void BN_init(BIGNUM *); -void BN_clear_free(BIGNUM *a); -BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b); -void BN_swap(BIGNUM *a, BIGNUM *b); -BIGNUM *BN_bin2bn(const unsigned char *s,int len,BIGNUM *ret); -int BN_bn2bin(const BIGNUM *a, unsigned char *to); -BIGNUM *BN_mpi2bn(const unsigned char *s,int len,BIGNUM *ret); -int BN_bn2mpi(const BIGNUM *a, unsigned char *to); -int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); -int BN_sqr(BIGNUM *r, const BIGNUM *a,BN_CTX *ctx); -/** BN_set_negative sets sign of a BIGNUM - * \param b pointer to the BIGNUM object - * \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise - */ -void BN_set_negative(BIGNUM *b, int n); -/** BN_is_negative returns 1 if the BIGNUM is negative - * \param a pointer to the BIGNUM object - * \return 1 if a < 0 and 0 otherwise - */ -#define BN_is_negative(a) ((a)->neg != 0) - -int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, - BN_CTX *ctx); -#define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx)) -int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); -int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); -int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m); -int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); -int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m); -int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *m, BN_CTX *ctx); -int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); -int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); -int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m); -int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, BN_CTX *ctx); -int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m); - -BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w); -BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w); -int BN_mul_word(BIGNUM *a, BN_ULONG w); -int BN_add_word(BIGNUM *a, BN_ULONG w); -int BN_sub_word(BIGNUM *a, BN_ULONG w); -int BN_set_word(BIGNUM *a, BN_ULONG w); -BN_ULONG BN_get_word(const BIGNUM *a); - -int BN_cmp(const BIGNUM *a, const BIGNUM *b); -void BN_free(BIGNUM *a); -int BN_is_bit_set(const BIGNUM *a, int n); -int BN_lshift(BIGNUM *r, const BIGNUM *a, int n); -int BN_lshift1(BIGNUM *r, const BIGNUM *a); -int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,BN_CTX *ctx); - -int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m,BN_CTX *ctx); -int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); -int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); -int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); -int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1, - const BIGNUM *a2, const BIGNUM *p2,const BIGNUM *m, - BN_CTX *ctx,BN_MONT_CTX *m_ctx); -int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m,BN_CTX *ctx); - -int BN_mask_bits(BIGNUM *a,int n); -#ifndef OPENSSL_NO_FP_API -int BN_print_fp(FILE *fp, const BIGNUM *a); -#endif -#ifdef HEADER_BIO_H -int BN_print(BIO *fp, const BIGNUM *a); -#else -int BN_print(void *fp, const BIGNUM *a); -#endif -int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx); -int BN_rshift(BIGNUM *r, const BIGNUM *a, int n); -int BN_rshift1(BIGNUM *r, const BIGNUM *a); -void BN_clear(BIGNUM *a); -BIGNUM *BN_dup(const BIGNUM *a); -int BN_ucmp(const BIGNUM *a, const BIGNUM *b); -int BN_set_bit(BIGNUM *a, int n); -int BN_clear_bit(BIGNUM *a, int n); -char * BN_bn2hex(const BIGNUM *a); -char * BN_bn2dec(const BIGNUM *a); -int BN_hex2bn(BIGNUM **a, const char *str); -int BN_dec2bn(BIGNUM **a, const char *str); -int BN_gcd(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); -int BN_kronecker(const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); /* returns -2 for error */ -BIGNUM *BN_mod_inverse(BIGNUM *ret, - const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); -BIGNUM *BN_mod_sqrt(BIGNUM *ret, - const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); - -/* Deprecated versions */ -#ifndef OPENSSL_NO_DEPRECATED -BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe, - const BIGNUM *add, const BIGNUM *rem, - void (*callback)(int,int,void *),void *cb_arg); -int BN_is_prime(const BIGNUM *p,int nchecks, - void (*callback)(int,int,void *), - BN_CTX *ctx,void *cb_arg); -int BN_is_prime_fasttest(const BIGNUM *p,int nchecks, - void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg, - int do_trial_division); -#endif /* !defined(OPENSSL_NO_DEPRECATED) */ - -/* Newer versions */ -int BN_generate_prime_ex(BIGNUM *ret,int bits,int safe, const BIGNUM *add, - const BIGNUM *rem, BN_GENCB *cb); -int BN_is_prime_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, BN_GENCB *cb); -int BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, - int do_trial_division, BN_GENCB *cb); - -int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx); - -int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, - const BIGNUM *Xp, const BIGNUM *Xp1, const BIGNUM *Xp2, - const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb); -int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, - BIGNUM *Xp1, BIGNUM *Xp2, - const BIGNUM *Xp, - const BIGNUM *e, BN_CTX *ctx, - BN_GENCB *cb); - -BN_MONT_CTX *BN_MONT_CTX_new(void ); -void BN_MONT_CTX_init(BN_MONT_CTX *ctx); -int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b, - BN_MONT_CTX *mont, BN_CTX *ctx); -#define BN_to_montgomery(r,a,mont,ctx) BN_mod_mul_montgomery(\ - (r),(a),&((mont)->RR),(mont),(ctx)) -int BN_from_montgomery(BIGNUM *r,const BIGNUM *a, - BN_MONT_CTX *mont, BN_CTX *ctx); -void BN_MONT_CTX_free(BN_MONT_CTX *mont); -int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx); -BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to,BN_MONT_CTX *from); -BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock, - const BIGNUM *mod, BN_CTX *ctx); - -/* BN_BLINDING flags */ -#define BN_BLINDING_NO_UPDATE 0x00000001 -#define BN_BLINDING_NO_RECREATE 0x00000002 - -BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, /* const */ BIGNUM *mod); -void BN_BLINDING_free(BN_BLINDING *b); -int BN_BLINDING_update(BN_BLINDING *b,BN_CTX *ctx); -int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); -int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); -int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *); -int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *); -unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *); -void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long); -unsigned long BN_BLINDING_get_flags(const BN_BLINDING *); -void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long); -BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b, - const BIGNUM *e, /* const */ BIGNUM *m, BN_CTX *ctx, - int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx), - BN_MONT_CTX *m_ctx); - -#ifndef OPENSSL_NO_DEPRECATED -void BN_set_params(int mul,int high,int low,int mont); -int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */ -#endif - -void BN_RECP_CTX_init(BN_RECP_CTX *recp); -BN_RECP_CTX *BN_RECP_CTX_new(void); -void BN_RECP_CTX_free(BN_RECP_CTX *recp); -int BN_RECP_CTX_set(BN_RECP_CTX *recp,const BIGNUM *rdiv,BN_CTX *ctx); -int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, - BN_RECP_CTX *recp,BN_CTX *ctx); -int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx); -int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, - BN_RECP_CTX *recp, BN_CTX *ctx); - -/* Functions for arithmetic over binary polynomials represented by BIGNUMs. - * - * The BIGNUM::neg property of BIGNUMs representing binary polynomials is - * ignored. - * - * Note that input arguments are not const so that their bit arrays can - * be expanded to the appropriate size if needed. - */ - -int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); /*r = a + b*/ -#define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b) -int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); /*r=a mod p*/ -int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *p, BN_CTX *ctx); /* r = (a * b) mod p */ -int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - BN_CTX *ctx); /* r = (a * a) mod p */ -int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, - BN_CTX *ctx); /* r = (1 / b) mod p */ -int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *p, BN_CTX *ctx); /* r = (a / b) mod p */ -int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *p, BN_CTX *ctx); /* r = (a ^ b) mod p */ -int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - BN_CTX *ctx); /* r = sqrt(a) mod p */ -int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - BN_CTX *ctx); /* r^2 + r = a mod p */ -#define BN_GF2m_cmp(a, b) BN_ucmp((a), (b)) -/* Some functions allow for representation of the irreducible polynomials - * as an unsigned int[], say p. The irreducible f(t) is then of the form: - * t^p[0] + t^p[1] + ... + t^p[k] - * where m = p[0] > p[1] > ... > p[k] = 0. - */ -int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[]); - /* r = a mod p */ -int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const unsigned int p[], BN_CTX *ctx); /* r = (a * b) mod p */ -int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], - BN_CTX *ctx); /* r = (a * a) mod p */ -int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const unsigned int p[], - BN_CTX *ctx); /* r = (1 / b) mod p */ -int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const unsigned int p[], BN_CTX *ctx); /* r = (a / b) mod p */ -int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const unsigned int p[], BN_CTX *ctx); /* r = (a ^ b) mod p */ -int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, - const unsigned int p[], BN_CTX *ctx); /* r = sqrt(a) mod p */ -int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a, - const unsigned int p[], BN_CTX *ctx); /* r^2 + r = a mod p */ -int BN_GF2m_poly2arr(const BIGNUM *a, unsigned int p[], int max); -int BN_GF2m_arr2poly(const unsigned int p[], BIGNUM *a); - -/* faster mod functions for the 'NIST primes' - * 0 <= a < p^2 */ -int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); - -const BIGNUM *BN_get0_nist_prime_192(void); -const BIGNUM *BN_get0_nist_prime_224(void); -const BIGNUM *BN_get0_nist_prime_256(void); -const BIGNUM *BN_get0_nist_prime_384(void); -const BIGNUM *BN_get0_nist_prime_521(void); - -/* library internal functions */ - -#define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\ - (a):bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2)) -#define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) -BIGNUM *bn_expand2(BIGNUM *a, int words); -#ifndef OPENSSL_NO_DEPRECATED -BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */ -#endif - -/* Bignum consistency macros - * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from - * bignum data after direct manipulations on the data. There is also an - * "internal" macro, bn_check_top(), for verifying that there are no leading - * zeroes. Unfortunately, some auditing is required due to the fact that - * bn_fix_top() has become an overabused duct-tape because bignum data is - * occasionally passed around in an inconsistent state. So the following - * changes have been made to sort this out; - * - bn_fix_top()s implementation has been moved to bn_correct_top() - * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and - * bn_check_top() is as before. - * - if BN_DEBUG *is* defined; - * - bn_check_top() tries to pollute unused words even if the bignum 'top' is - * consistent. (ed: only if BN_DEBUG_RAND is defined) - * - bn_fix_top() maps to bn_check_top() rather than "fixing" anything. - * The idea is to have debug builds flag up inconsistent bignums when they - * occur. If that occurs in a bn_fix_top(), we examine the code in question; if - * the use of bn_fix_top() was appropriate (ie. it follows directly after code - * that manipulates the bignum) it is converted to bn_correct_top(), and if it - * was not appropriate, we convert it permanently to bn_check_top() and track - * down the cause of the bug. Eventually, no internal code should be using the - * bn_fix_top() macro. External applications and libraries should try this with - * their own code too, both in terms of building against the openssl headers - * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it - * defined. This not only improves external code, it provides more test - * coverage for openssl's own code. - */ - -#ifdef BN_DEBUG - -/* We only need assert() when debugging */ -#include - -#ifdef BN_DEBUG_RAND -/* To avoid "make update" cvs wars due to BN_DEBUG, use some tricks */ -#ifndef RAND_pseudo_bytes -int RAND_pseudo_bytes(unsigned char *buf,int num); -#define BN_DEBUG_TRIX -#endif -#define bn_pollute(a) \ - do { \ - const BIGNUM *_bnum1 = (a); \ - if(_bnum1->top < _bnum1->dmax) { \ - unsigned char _tmp_char; \ - /* We cast away const without the compiler knowing, any \ - * *genuinely* constant variables that aren't mutable \ - * wouldn't be constructed with top!=dmax. */ \ - BN_ULONG *_not_const; \ - memcpy(&_not_const, &_bnum1->d, sizeof(BN_ULONG*)); \ - RAND_pseudo_bytes(&_tmp_char, 1); \ - memset((unsigned char *)(_not_const + _bnum1->top), _tmp_char, \ - (_bnum1->dmax - _bnum1->top) * sizeof(BN_ULONG)); \ - } \ - } while(0) -#ifdef BN_DEBUG_TRIX -#undef RAND_pseudo_bytes -#endif -#else -#define bn_pollute(a) -#endif -#define bn_check_top(a) \ - do { \ - const BIGNUM *_bnum2 = (a); \ - if (_bnum2 != NULL) { \ - assert((_bnum2->top == 0) || \ - (_bnum2->d[_bnum2->top - 1] != 0)); \ - bn_pollute(_bnum2); \ - } \ - } while(0) - -#define bn_fix_top(a) bn_check_top(a) - -#else /* !BN_DEBUG */ - -#define bn_pollute(a) -#define bn_check_top(a) -#define bn_fix_top(a) bn_correct_top(a) - -#endif - -#define bn_correct_top(a) \ - { \ - BN_ULONG *ftl; \ - if ((a)->top > 0) \ - { \ - for (ftl= &((a)->d[(a)->top-1]); (a)->top > 0; (a)->top--) \ - if (*(ftl--)) break; \ - } \ - bn_pollute(a); \ - } - -BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w); -BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w); -void bn_sqr_words(BN_ULONG *rp, const BN_ULONG *ap, int num); -BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d); -BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int num); -BN_ULONG bn_sub_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int num); - -/* Primes from RFC 2409 */ -BIGNUM *get_rfc2409_prime_768(BIGNUM *bn); -BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn); - -/* Primes from RFC 3526 */ -BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn); - -int BN_bntest_rand(BIGNUM *rnd, int bits, int top,int bottom); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_BN_strings(void); - -/* Error codes for the BN functions. */ - -/* Function codes. */ -#define BN_F_BNRAND 127 -#define BN_F_BN_BLINDING_CONVERT_EX 100 -#define BN_F_BN_BLINDING_CREATE_PARAM 128 -#define BN_F_BN_BLINDING_INVERT_EX 101 -#define BN_F_BN_BLINDING_NEW 102 -#define BN_F_BN_BLINDING_UPDATE 103 -#define BN_F_BN_BN2DEC 104 -#define BN_F_BN_BN2HEX 105 -#define BN_F_BN_CTX_GET 116 -#define BN_F_BN_CTX_NEW 106 -#define BN_F_BN_CTX_START 129 -#define BN_F_BN_DIV 107 -#define BN_F_BN_DIV_NO_BRANCH 138 -#define BN_F_BN_DIV_RECP 130 -#define BN_F_BN_EXP 123 -#define BN_F_BN_EXPAND2 108 -#define BN_F_BN_EXPAND_INTERNAL 120 -#define BN_F_BN_GF2M_MOD 131 -#define BN_F_BN_GF2M_MOD_EXP 132 -#define BN_F_BN_GF2M_MOD_MUL 133 -#define BN_F_BN_GF2M_MOD_SOLVE_QUAD 134 -#define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 135 -#define BN_F_BN_GF2M_MOD_SQR 136 -#define BN_F_BN_GF2M_MOD_SQRT 137 -#define BN_F_BN_MOD_EXP2_MONT 118 -#define BN_F_BN_MOD_EXP_MONT 109 -#define BN_F_BN_MOD_EXP_MONT_CONSTTIME 124 -#define BN_F_BN_MOD_EXP_MONT_WORD 117 -#define BN_F_BN_MOD_EXP_RECP 125 -#define BN_F_BN_MOD_EXP_SIMPLE 126 -#define BN_F_BN_MOD_INVERSE 110 -#define BN_F_BN_MOD_INVERSE_NO_BRANCH 139 -#define BN_F_BN_MOD_LSHIFT_QUICK 119 -#define BN_F_BN_MOD_MUL_RECIPROCAL 111 -#define BN_F_BN_MOD_SQRT 121 -#define BN_F_BN_MPI2BN 112 -#define BN_F_BN_NEW 113 -#define BN_F_BN_RAND 114 -#define BN_F_BN_RAND_RANGE 122 -#define BN_F_BN_USUB 115 - -/* Reason codes. */ -#define BN_R_ARG2_LT_ARG3 100 -#define BN_R_BAD_RECIPROCAL 101 -#define BN_R_BIGNUM_TOO_LONG 114 -#define BN_R_CALLED_WITH_EVEN_MODULUS 102 -#define BN_R_DIV_BY_ZERO 103 -#define BN_R_ENCODING_ERROR 104 -#define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105 -#define BN_R_INPUT_NOT_REDUCED 110 -#define BN_R_INVALID_LENGTH 106 -#define BN_R_INVALID_RANGE 115 -#define BN_R_NOT_A_SQUARE 111 -#define BN_R_NOT_INITIALIZED 107 -#define BN_R_NO_INVERSE 108 -#define BN_R_NO_SOLUTION 116 -#define BN_R_P_IS_NOT_PRIME 112 -#define BN_R_TOO_MANY_ITERATIONS 113 -#define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/buffer.h b/externals/openssl/buffer.h deleted file mode 100644 index 669bc5eb36..0000000000 --- a/externals/openssl/buffer.h +++ /dev/null @@ -1,119 +0,0 @@ -/* crypto/buffer/buffer.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_BUFFER_H -#define HEADER_BUFFER_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#if !defined(NO_SYS_TYPES_H) -#include -#endif - -/* Already declared in ossl_typ.h */ -/* typedef struct buf_mem_st BUF_MEM; */ - -struct buf_mem_st - { - int length; /* current number of bytes */ - char *data; - int max; /* size of buffer */ - }; - -BUF_MEM *BUF_MEM_new(void); -void BUF_MEM_free(BUF_MEM *a); -int BUF_MEM_grow(BUF_MEM *str, int len); -int BUF_MEM_grow_clean(BUF_MEM *str, int len); -char * BUF_strdup(const char *str); -char * BUF_strndup(const char *str, size_t siz); -void * BUF_memdup(const void *data, size_t siz); - -/* safe string functions */ -size_t BUF_strlcpy(char *dst,const char *src,size_t siz); -size_t BUF_strlcat(char *dst,const char *src,size_t siz); - - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_BUF_strings(void); - -/* Error codes for the BUF functions. */ - -/* Function codes. */ -#define BUF_F_BUF_MEMDUP 103 -#define BUF_F_BUF_MEM_GROW 100 -#define BUF_F_BUF_MEM_GROW_CLEAN 105 -#define BUF_F_BUF_MEM_NEW 101 -#define BUF_F_BUF_STRDUP 102 -#define BUF_F_BUF_STRNDUP 104 - -/* Reason codes. */ - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/cast.h b/externals/openssl/cast.h deleted file mode 100644 index 1faf5806aa..0000000000 --- a/externals/openssl/cast.h +++ /dev/null @@ -1,107 +0,0 @@ -/* crypto/cast/cast.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_CAST_H -#define HEADER_CAST_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifdef OPENSSL_NO_CAST -#error CAST is disabled. -#endif - -#define CAST_ENCRYPT 1 -#define CAST_DECRYPT 0 - -#define CAST_LONG unsigned long - -#define CAST_BLOCK 8 -#define CAST_KEY_LENGTH 16 - -typedef struct cast_key_st - { - CAST_LONG data[32]; - int short_key; /* Use reduced rounds for short key */ - } CAST_KEY; - -#ifdef OPENSSL_FIPS -void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); -#endif -void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); -void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key, - int enc); -void CAST_encrypt(CAST_LONG *data,CAST_KEY *key); -void CAST_decrypt(CAST_LONG *data,CAST_KEY *key); -void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, - CAST_KEY *ks, unsigned char *iv, int enc); -void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, CAST_KEY *schedule, unsigned char *ivec, - int *num, int enc); -void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, CAST_KEY *schedule, unsigned char *ivec, - int *num); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/comp.h b/externals/openssl/comp.h deleted file mode 100644 index 4b405c7d49..0000000000 --- a/externals/openssl/comp.h +++ /dev/null @@ -1,80 +0,0 @@ - -#ifndef HEADER_COMP_H -#define HEADER_COMP_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct comp_ctx_st COMP_CTX; - -typedef struct comp_method_st - { - int type; /* NID for compression library */ - const char *name; /* A text string to identify the library */ - int (*init)(COMP_CTX *ctx); - void (*finish)(COMP_CTX *ctx); - int (*compress)(COMP_CTX *ctx, - unsigned char *out, unsigned int olen, - unsigned char *in, unsigned int ilen); - int (*expand)(COMP_CTX *ctx, - unsigned char *out, unsigned int olen, - unsigned char *in, unsigned int ilen); - /* The following two do NOTHING, but are kept for backward compatibility */ - long (*ctrl)(void); - long (*callback_ctrl)(void); - } COMP_METHOD; - -struct comp_ctx_st - { - COMP_METHOD *meth; - unsigned long compress_in; - unsigned long compress_out; - unsigned long expand_in; - unsigned long expand_out; - - CRYPTO_EX_DATA ex_data; - }; - - -COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); -void COMP_CTX_free(COMP_CTX *ctx); -int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, - unsigned char *in, int ilen); -int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, - unsigned char *in, int ilen); -COMP_METHOD *COMP_rle(void ); -COMP_METHOD *COMP_zlib(void ); -void COMP_zlib_cleanup(void); - -#ifdef HEADER_BIO_H -#ifdef ZLIB -BIO_METHOD *BIO_f_zlib(void); -#endif -#endif - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_COMP_strings(void); - -/* Error codes for the COMP functions. */ - -/* Function codes. */ -#define COMP_F_BIO_ZLIB_FLUSH 99 -#define COMP_F_BIO_ZLIB_NEW 100 -#define COMP_F_BIO_ZLIB_READ 101 -#define COMP_F_BIO_ZLIB_WRITE 102 - -/* Reason codes. */ -#define COMP_R_ZLIB_DEFLATE_ERROR 99 -#define COMP_R_ZLIB_INFLATE_ERROR 100 -#define COMP_R_ZLIB_NOT_SUPPORTED 101 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/conf.h b/externals/openssl/conf.h deleted file mode 100644 index 8aa06bc5ec..0000000000 --- a/externals/openssl/conf.h +++ /dev/null @@ -1,254 +0,0 @@ -/* crypto/conf/conf.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_CONF_H -#define HEADER_CONF_H - -#include -#include -#include -#include -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct - { - char *section; - char *name; - char *value; - } CONF_VALUE; - -DECLARE_STACK_OF(CONF_VALUE) -DECLARE_STACK_OF(CONF_MODULE) -DECLARE_STACK_OF(CONF_IMODULE) - -struct conf_st; -struct conf_method_st; -typedef struct conf_method_st CONF_METHOD; - -struct conf_method_st - { - const char *name; - CONF *(*create)(CONF_METHOD *meth); - int (*init)(CONF *conf); - int (*destroy)(CONF *conf); - int (*destroy_data)(CONF *conf); - int (*load_bio)(CONF *conf, BIO *bp, long *eline); - int (*dump)(const CONF *conf, BIO *bp); - int (*is_number)(const CONF *conf, char c); - int (*to_int)(const CONF *conf, char c); - int (*load)(CONF *conf, const char *name, long *eline); - }; - -/* Module definitions */ - -typedef struct conf_imodule_st CONF_IMODULE; -typedef struct conf_module_st CONF_MODULE; - -/* DSO module function typedefs */ -typedef int conf_init_func(CONF_IMODULE *md, const CONF *cnf); -typedef void conf_finish_func(CONF_IMODULE *md); - -#define CONF_MFLAGS_IGNORE_ERRORS 0x1 -#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2 -#define CONF_MFLAGS_SILENT 0x4 -#define CONF_MFLAGS_NO_DSO 0x8 -#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10 -#define CONF_MFLAGS_DEFAULT_SECTION 0x20 - -int CONF_set_default_method(CONF_METHOD *meth); -void CONF_set_nconf(CONF *conf,LHASH *hash); -LHASH *CONF_load(LHASH *conf,const char *file,long *eline); -#ifndef OPENSSL_NO_FP_API -LHASH *CONF_load_fp(LHASH *conf, FILE *fp,long *eline); -#endif -LHASH *CONF_load_bio(LHASH *conf, BIO *bp,long *eline); -STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf,const char *section); -char *CONF_get_string(LHASH *conf,const char *group,const char *name); -long CONF_get_number(LHASH *conf,const char *group,const char *name); -void CONF_free(LHASH *conf); -int CONF_dump_fp(LHASH *conf, FILE *out); -int CONF_dump_bio(LHASH *conf, BIO *out); - -void OPENSSL_config(const char *config_name); -void OPENSSL_no_config(void); - -/* New conf code. The semantics are different from the functions above. - If that wasn't the case, the above functions would have been replaced */ - -struct conf_st - { - CONF_METHOD *meth; - void *meth_data; - LHASH *data; - }; - -CONF *NCONF_new(CONF_METHOD *meth); -CONF_METHOD *NCONF_default(void); -CONF_METHOD *NCONF_WIN32(void); -#if 0 /* Just to give you an idea of what I have in mind */ -CONF_METHOD *NCONF_XML(void); -#endif -void NCONF_free(CONF *conf); -void NCONF_free_data(CONF *conf); - -int NCONF_load(CONF *conf,const char *file,long *eline); -#ifndef OPENSSL_NO_FP_API -int NCONF_load_fp(CONF *conf, FILE *fp,long *eline); -#endif -int NCONF_load_bio(CONF *conf, BIO *bp,long *eline); -STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,const char *section); -char *NCONF_get_string(const CONF *conf,const char *group,const char *name); -int NCONF_get_number_e(const CONF *conf,const char *group,const char *name, - long *result); -int NCONF_dump_fp(const CONF *conf, FILE *out); -int NCONF_dump_bio(const CONF *conf, BIO *out); - -#if 0 /* The following function has no error checking, - and should therefore be avoided */ -long NCONF_get_number(CONF *conf,char *group,char *name); -#else -#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) -#endif - -/* Module functions */ - -int CONF_modules_load(const CONF *cnf, const char *appname, - unsigned long flags); -int CONF_modules_load_file(const char *filename, const char *appname, - unsigned long flags); -void CONF_modules_unload(int all); -void CONF_modules_finish(void); -void CONF_modules_free(void); -int CONF_module_add(const char *name, conf_init_func *ifunc, - conf_finish_func *ffunc); - -const char *CONF_imodule_get_name(const CONF_IMODULE *md); -const char *CONF_imodule_get_value(const CONF_IMODULE *md); -void *CONF_imodule_get_usr_data(const CONF_IMODULE *md); -void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data); -CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md); -unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md); -void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags); -void *CONF_module_get_usr_data(CONF_MODULE *pmod); -void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data); - -char *CONF_get1_default_config_file(void); - -int CONF_parse_list(const char *list, int sep, int nospc, - int (*list_cb)(const char *elem, int len, void *usr), void *arg); - -void OPENSSL_load_builtin_modules(void); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_CONF_strings(void); - -/* Error codes for the CONF functions. */ - -/* Function codes. */ -#define CONF_F_CONF_DUMP_FP 104 -#define CONF_F_CONF_LOAD 100 -#define CONF_F_CONF_LOAD_BIO 102 -#define CONF_F_CONF_LOAD_FP 103 -#define CONF_F_CONF_MODULES_LOAD 116 -#define CONF_F_DEF_LOAD 120 -#define CONF_F_DEF_LOAD_BIO 121 -#define CONF_F_MODULE_INIT 115 -#define CONF_F_MODULE_LOAD_DSO 117 -#define CONF_F_MODULE_RUN 118 -#define CONF_F_NCONF_DUMP_BIO 105 -#define CONF_F_NCONF_DUMP_FP 106 -#define CONF_F_NCONF_GET_NUMBER 107 -#define CONF_F_NCONF_GET_NUMBER_E 112 -#define CONF_F_NCONF_GET_SECTION 108 -#define CONF_F_NCONF_GET_STRING 109 -#define CONF_F_NCONF_LOAD 113 -#define CONF_F_NCONF_LOAD_BIO 110 -#define CONF_F_NCONF_LOAD_FP 114 -#define CONF_F_NCONF_NEW 111 -#define CONF_F_STR_COPY 101 - -/* Reason codes. */ -#define CONF_R_ERROR_LOADING_DSO 110 -#define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 -#define CONF_R_MISSING_EQUAL_SIGN 101 -#define CONF_R_MISSING_FINISH_FUNCTION 111 -#define CONF_R_MISSING_INIT_FUNCTION 112 -#define CONF_R_MODULE_INITIALIZATION_ERROR 109 -#define CONF_R_NO_CLOSE_BRACE 102 -#define CONF_R_NO_CONF 105 -#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106 -#define CONF_R_NO_SECTION 107 -#define CONF_R_NO_SUCH_FILE 114 -#define CONF_R_NO_VALUE 108 -#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 -#define CONF_R_UNKNOWN_MODULE_NAME 113 -#define CONF_R_VARIABLE_HAS_NO_VALUE 104 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/conf_api.h b/externals/openssl/conf_api.h deleted file mode 100644 index ffe5ccd80a..0000000000 --- a/externals/openssl/conf_api.h +++ /dev/null @@ -1,90 +0,0 @@ -/* conf_api.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_CONF_API_H -#define HEADER_CONF_API_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Up until OpenSSL 0.9.5a, this was new_section */ -CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); -/* Up until OpenSSL 0.9.5a, this was get_section */ -CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); -/* Up until OpenSSL 0.9.5a, this was CONF_get_section */ -STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, - const char *section); - -int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); -char *_CONF_get_string(const CONF *conf, const char *section, - const char *name); -long _CONF_get_number(const CONF *conf, const char *section, const char *name); - -int _CONF_new_data(CONF *conf); -void _CONF_free_data(CONF *conf); - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/externals/openssl/crypto.h b/externals/openssl/crypto.h deleted file mode 100644 index 0e4fb0723c..0000000000 --- a/externals/openssl/crypto.h +++ /dev/null @@ -1,619 +0,0 @@ -/* crypto/crypto.h */ -/* ==================================================================== - * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECDH support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ - -#ifndef HEADER_CRYPTO_H -#define HEADER_CRYPTO_H - -#include - -#include - -#ifndef OPENSSL_NO_FP_API -#include -#endif - -#include -#include -#include -#include - -#ifdef CHARSET_EBCDIC -#include -#endif - -/* Resolve problems on some operating systems with symbol names that clash - one way or another */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Backward compatibility to SSLeay */ -/* This is more to be used to check the correct DLL is being used - * in the MS world. */ -#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER -#define SSLEAY_VERSION 0 -/* #define SSLEAY_OPTIONS 1 no longer supported */ -#define SSLEAY_CFLAGS 2 -#define SSLEAY_BUILT_ON 3 -#define SSLEAY_PLATFORM 4 -#define SSLEAY_DIR 5 - -/* Already declared in ossl_typ.h */ -#if 0 -typedef struct crypto_ex_data_st CRYPTO_EX_DATA; -/* Called when a new object is created */ -typedef int CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int idx, long argl, void *argp); -/* Called when an object is free()ed */ -typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int idx, long argl, void *argp); -/* Called when we need to dup an object */ -typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, - int idx, long argl, void *argp); -#endif - -/* A generic structure to pass assorted data in a expandable way */ -typedef struct openssl_item_st - { - int code; - void *value; /* Not used for flag attributes */ - size_t value_size; /* Max size of value for output, length for input */ - size_t *value_length; /* Returned length of value for output */ - } OPENSSL_ITEM; - - -/* When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock - * names in cryptlib.c - */ - -#define CRYPTO_LOCK_ERR 1 -#define CRYPTO_LOCK_EX_DATA 2 -#define CRYPTO_LOCK_X509 3 -#define CRYPTO_LOCK_X509_INFO 4 -#define CRYPTO_LOCK_X509_PKEY 5 -#define CRYPTO_LOCK_X509_CRL 6 -#define CRYPTO_LOCK_X509_REQ 7 -#define CRYPTO_LOCK_DSA 8 -#define CRYPTO_LOCK_RSA 9 -#define CRYPTO_LOCK_EVP_PKEY 10 -#define CRYPTO_LOCK_X509_STORE 11 -#define CRYPTO_LOCK_SSL_CTX 12 -#define CRYPTO_LOCK_SSL_CERT 13 -#define CRYPTO_LOCK_SSL_SESSION 14 -#define CRYPTO_LOCK_SSL_SESS_CERT 15 -#define CRYPTO_LOCK_SSL 16 -#define CRYPTO_LOCK_SSL_METHOD 17 -#define CRYPTO_LOCK_RAND 18 -#define CRYPTO_LOCK_RAND2 19 -#define CRYPTO_LOCK_MALLOC 20 -#define CRYPTO_LOCK_BIO 21 -#define CRYPTO_LOCK_GETHOSTBYNAME 22 -#define CRYPTO_LOCK_GETSERVBYNAME 23 -#define CRYPTO_LOCK_READDIR 24 -#define CRYPTO_LOCK_RSA_BLINDING 25 -#define CRYPTO_LOCK_DH 26 -#define CRYPTO_LOCK_MALLOC2 27 -#define CRYPTO_LOCK_DSO 28 -#define CRYPTO_LOCK_DYNLOCK 29 -#define CRYPTO_LOCK_ENGINE 30 -#define CRYPTO_LOCK_UI 31 -#define CRYPTO_LOCK_ECDSA 32 -#define CRYPTO_LOCK_EC 33 -#define CRYPTO_LOCK_ECDH 34 -#define CRYPTO_LOCK_BN 35 -#define CRYPTO_LOCK_EC_PRE_COMP 36 -#define CRYPTO_LOCK_STORE 37 -#define CRYPTO_LOCK_COMP 38 -#ifndef OPENSSL_FIPS -#define CRYPTO_NUM_LOCKS 39 -#else -#define CRYPTO_LOCK_FIPS 39 -#define CRYPTO_LOCK_FIPS2 40 -#define CRYPTO_NUM_LOCKS 41 -#endif - -#define CRYPTO_LOCK 1 -#define CRYPTO_UNLOCK 2 -#define CRYPTO_READ 4 -#define CRYPTO_WRITE 8 - -#ifndef OPENSSL_NO_LOCKING -#ifndef CRYPTO_w_lock -#define CRYPTO_w_lock(type) \ - CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) -#define CRYPTO_w_unlock(type) \ - CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) -#define CRYPTO_r_lock(type) \ - CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__) -#define CRYPTO_r_unlock(type) \ - CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__) -#define CRYPTO_add(addr,amount,type) \ - CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__) -#endif -#else -#define CRYPTO_w_lock(a) -#define CRYPTO_w_unlock(a) -#define CRYPTO_r_lock(a) -#define CRYPTO_r_unlock(a) -#define CRYPTO_add(a,b,c) ((*(a))+=(b)) -#endif - -/* Some applications as well as some parts of OpenSSL need to allocate - and deallocate locks in a dynamic fashion. The following typedef - makes this possible in a type-safe manner. */ -/* struct CRYPTO_dynlock_value has to be defined by the application. */ -typedef struct - { - int references; - struct CRYPTO_dynlock_value *data; - } CRYPTO_dynlock; - - -/* The following can be used to detect memory leaks in the SSLeay library. - * It used, it turns on malloc checking */ - -#define CRYPTO_MEM_CHECK_OFF 0x0 /* an enume */ -#define CRYPTO_MEM_CHECK_ON 0x1 /* a bit */ -#define CRYPTO_MEM_CHECK_ENABLE 0x2 /* a bit */ -#define CRYPTO_MEM_CHECK_DISABLE 0x3 /* an enume */ - -/* The following are bit values to turn on or off options connected to the - * malloc checking functionality */ - -/* Adds time to the memory checking information */ -#define V_CRYPTO_MDEBUG_TIME 0x1 /* a bit */ -/* Adds thread number to the memory checking information */ -#define V_CRYPTO_MDEBUG_THREAD 0x2 /* a bit */ - -#define V_CRYPTO_MDEBUG_ALL (V_CRYPTO_MDEBUG_TIME | V_CRYPTO_MDEBUG_THREAD) - - -/* predec of the BIO type */ -typedef struct bio_st BIO_dummy; - -struct crypto_ex_data_st - { - STACK *sk; - int dummy; /* gcc is screwing up this data structure :-( */ - }; - -/* This stuff is basically class callback functions - * The current classes are SSL_CTX, SSL, SSL_SESSION, and a few more */ - -typedef struct crypto_ex_data_func_st - { - long argl; /* Arbitary long */ - void *argp; /* Arbitary void * */ - CRYPTO_EX_new *new_func; - CRYPTO_EX_free *free_func; - CRYPTO_EX_dup *dup_func; - } CRYPTO_EX_DATA_FUNCS; - -DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) - -/* Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA - * entry. - */ - -#define CRYPTO_EX_INDEX_BIO 0 -#define CRYPTO_EX_INDEX_SSL 1 -#define CRYPTO_EX_INDEX_SSL_CTX 2 -#define CRYPTO_EX_INDEX_SSL_SESSION 3 -#define CRYPTO_EX_INDEX_X509_STORE 4 -#define CRYPTO_EX_INDEX_X509_STORE_CTX 5 -#define CRYPTO_EX_INDEX_RSA 6 -#define CRYPTO_EX_INDEX_DSA 7 -#define CRYPTO_EX_INDEX_DH 8 -#define CRYPTO_EX_INDEX_ENGINE 9 -#define CRYPTO_EX_INDEX_X509 10 -#define CRYPTO_EX_INDEX_UI 11 -#define CRYPTO_EX_INDEX_ECDSA 12 -#define CRYPTO_EX_INDEX_ECDH 13 -#define CRYPTO_EX_INDEX_COMP 14 -#define CRYPTO_EX_INDEX_STORE 15 - -/* Dynamically assigned indexes start from this value (don't use directly, use - * via CRYPTO_ex_data_new_class). */ -#define CRYPTO_EX_INDEX_USER 100 - - -/* This is the default callbacks, but we can have others as well: - * this is needed in Win32 where the application malloc and the - * library malloc may not be the same. - */ -#define CRYPTO_malloc_init() CRYPTO_set_mem_functions(\ - malloc, realloc, free) - -#if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD -# ifndef CRYPTO_MDEBUG /* avoid duplicate #define */ -# define CRYPTO_MDEBUG -# endif -#endif - -/* Set standard debugging functions (not done by default - * unless CRYPTO_MDEBUG is defined) */ -void CRYPTO_malloc_debug_init(void); - -int CRYPTO_mem_ctrl(int mode); -int CRYPTO_is_mem_check_on(void); - -/* for applications */ -#define MemCheck_start() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON) -#define MemCheck_stop() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF) - -/* for library-internal use */ -#define MemCheck_on() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE) -#define MemCheck_off() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE) -#define is_MemCheck_on() CRYPTO_is_mem_check_on() - -#define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__) -#define OPENSSL_strdup(str) CRYPTO_strdup((str),__FILE__,__LINE__) -#define OPENSSL_realloc(addr,num) \ - CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__) -#define OPENSSL_realloc_clean(addr,old_num,num) \ - CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__) -#define OPENSSL_remalloc(addr,num) \ - CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__) -#define OPENSSL_freeFunc CRYPTO_free -#define OPENSSL_free(addr) CRYPTO_free(addr) - -#define OPENSSL_malloc_locked(num) \ - CRYPTO_malloc_locked((int)num,__FILE__,__LINE__) -#define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr) - - -const char *SSLeay_version(int type); -unsigned long SSLeay(void); - -int OPENSSL_issetugid(void); - -/* An opaque type representing an implementation of "ex_data" support */ -typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL; -/* Return an opaque pointer to the current "ex_data" implementation */ -const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void); -/* Sets the "ex_data" implementation to be used (if it's not too late) */ -int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i); -/* Get a new "ex_data" class, and return the corresponding "class_index" */ -int CRYPTO_ex_data_new_class(void); -/* Within a given class, get/register a new index */ -int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, - CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, - CRYPTO_EX_free *free_func); -/* Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a given - * class (invokes whatever per-class callbacks are applicable) */ -int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); -int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to, - CRYPTO_EX_DATA *from); -void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); -/* Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular index - * (relative to the class type involved) */ -int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val); -void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad,int idx); -/* This function cleans up all "ex_data" state. It mustn't be called under - * potential race-conditions. */ -void CRYPTO_cleanup_all_ex_data(void); - -int CRYPTO_get_new_lockid(char *name); - -int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */ -void CRYPTO_lock(int mode, int type,const char *file,int line); -void CRYPTO_set_locking_callback(void (*func)(int mode,int type, - const char *file,int line)); -void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file, - int line); -void CRYPTO_set_add_lock_callback(int (*func)(int *num,int mount,int type, - const char *file, int line)); -int (*CRYPTO_get_add_lock_callback(void))(int *num,int mount,int type, - const char *file,int line); -void CRYPTO_set_id_callback(unsigned long (*func)(void)); -unsigned long (*CRYPTO_get_id_callback(void))(void); -unsigned long CRYPTO_thread_id(void); -const char *CRYPTO_get_lock_name(int type); -int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file, - int line); - -void int_CRYPTO_set_do_dynlock_callback( - void (*do_dynlock_cb)(int mode, int type, const char *file, int line)); - -int CRYPTO_get_new_dynlockid(void); -void CRYPTO_destroy_dynlockid(int i); -struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i); -void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(*dyn_create_function)(const char *file, int line)); -void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value *l, const char *file, int line)); -void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)(struct CRYPTO_dynlock_value *l, const char *file, int line)); -struct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void))(const char *file,int line); -void (*CRYPTO_get_dynlock_lock_callback(void))(int mode, struct CRYPTO_dynlock_value *l, const char *file,int line); -void (*CRYPTO_get_dynlock_destroy_callback(void))(struct CRYPTO_dynlock_value *l, const char *file,int line); - -/* CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- - * call the latter last if you need different functions */ -int CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *)); -int CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*free_func)(void *)); -int CRYPTO_set_mem_ex_functions(void *(*m)(size_t,const char *,int), - void *(*r)(void *,size_t,const char *,int), - void (*f)(void *)); -int CRYPTO_set_locked_mem_ex_functions(void *(*m)(size_t,const char *,int), - void (*free_func)(void *)); -int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int), - void (*r)(void *,void *,int,const char *,int,int), - void (*f)(void *,int), - void (*so)(long), - long (*go)(void)); -void CRYPTO_set_mem_info_functions( - int (*push_info_fn)(const char *info, const char *file, int line), - int (*pop_info_fn)(void), - int (*remove_all_info_fn)(void)); -void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *)); -void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)); -void CRYPTO_get_mem_ex_functions(void *(**m)(size_t,const char *,int), - void *(**r)(void *, size_t,const char *,int), - void (**f)(void *)); -void CRYPTO_get_locked_mem_ex_functions(void *(**m)(size_t,const char *,int), - void (**f)(void *)); -void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int), - void (**r)(void *,void *,int,const char *,int,int), - void (**f)(void *,int), - void (**so)(long), - long (**go)(void)); - -void *CRYPTO_malloc_locked(int num, const char *file, int line); -void CRYPTO_free_locked(void *); -void *CRYPTO_malloc(int num, const char *file, int line); -char *CRYPTO_strdup(const char *str, const char *file, int line); -void CRYPTO_free(void *); -void *CRYPTO_realloc(void *addr,int num, const char *file, int line); -void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file, - int line); -void *CRYPTO_remalloc(void *addr,int num, const char *file, int line); - -void OPENSSL_cleanse(void *ptr, size_t len); - -void CRYPTO_set_mem_debug_options(long bits); -long CRYPTO_get_mem_debug_options(void); - -#define CRYPTO_push_info(info) \ - CRYPTO_push_info_(info, __FILE__, __LINE__); -int CRYPTO_push_info_(const char *info, const char *file, int line); -int CRYPTO_pop_info(void); -int CRYPTO_remove_all_info(void); - - -/* Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro; - * used as default in CRYPTO_MDEBUG compilations): */ -/* The last argument has the following significance: - * - * 0: called before the actual memory allocation has taken place - * 1: called after the actual memory allocation has taken place - */ -void CRYPTO_dbg_malloc(void *addr,int num,const char *file,int line,int before_p); -void CRYPTO_dbg_realloc(void *addr1,void *addr2,int num,const char *file,int line,int before_p); -void CRYPTO_dbg_free(void *addr,int before_p); -/* Tell the debugging code about options. By default, the following values - * apply: - * - * 0: Clear all options. - * V_CRYPTO_MDEBUG_TIME (1): Set the "Show Time" option. - * V_CRYPTO_MDEBUG_THREAD (2): Set the "Show Thread Number" option. - * V_CRYPTO_MDEBUG_ALL (3): 1 + 2 - */ -void CRYPTO_dbg_set_options(long bits); -long CRYPTO_dbg_get_options(void); - -int CRYPTO_dbg_push_info(const char *info, const char *file, int line); -int CRYPTO_dbg_pop_info(void); -int CRYPTO_dbg_remove_all_info(void); - -#ifndef OPENSSL_NO_FP_API -void CRYPTO_mem_leaks_fp(FILE *); -#endif -void CRYPTO_mem_leaks(struct bio_st *bio); -/* unsigned long order, char *file, int line, int num_bytes, char *addr */ -typedef void *CRYPTO_MEM_LEAK_CB(unsigned long, const char *, int, int, void *); -void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb); - -/* die if we have to */ -void OpenSSLDie(const char *file,int line,const char *assertion); -#define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1)) - -unsigned long *OPENSSL_ia32cap_loc(void); -#define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc())) -int OPENSSL_isservice(void); - -#ifdef OPENSSL_FIPS -#define FIPS_ERROR_IGNORED(alg) OpenSSLDie(__FILE__, __LINE__, \ - alg " previous FIPS forbidden algorithm error ignored"); - -#define FIPS_BAD_ABORT(alg) OpenSSLDie(__FILE__, __LINE__, \ - #alg " Algorithm forbidden in FIPS mode"); - -#ifdef OPENSSL_FIPS_STRICT -#define FIPS_BAD_ALGORITHM(alg) FIPS_BAD_ABORT(alg) -#else -#define FIPS_BAD_ALGORITHM(alg) \ - { \ - FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_NON_FIPS_METHOD); \ - ERR_add_error_data(2, "Algorithm=", #alg); \ - return 0; \ - } -#endif - -/* Low level digest API blocking macro */ - -#define FIPS_NON_FIPS_MD_Init(alg) \ - int alg##_Init(alg##_CTX *c) \ - { \ - if (FIPS_mode()) \ - FIPS_BAD_ALGORITHM(alg) \ - return private_##alg##_Init(c); \ - } \ - int private_##alg##_Init(alg##_CTX *c) - -/* For ciphers the API often varies from cipher to cipher and each needs to - * be treated as a special case. Variable key length ciphers (Blowfish, RC4, - * CAST) however are very similar and can use a blocking macro. - */ - -#define FIPS_NON_FIPS_VCIPHER_Init(alg) \ - void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data) \ - { \ - if (FIPS_mode()) \ - FIPS_BAD_ABORT(alg) \ - private_##alg##_set_key(key, len, data); \ - } \ - void private_##alg##_set_key(alg##_KEY *key, int len, \ - const unsigned char *data) - -#else - -#define FIPS_NON_FIPS_VCIPHER_Init(alg) \ - void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data) - -#define FIPS_NON_FIPS_MD_Init(alg) \ - int alg##_Init(alg##_CTX *c) - -#endif /* def OPENSSL_FIPS */ - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_CRYPTO_strings(void); - -#define OPENSSL_HAVE_INIT 1 -void OPENSSL_init(void); - -/* Error codes for the CRYPTO functions. */ - -/* Function codes. */ -#define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 -#define CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID 103 -#define CRYPTO_F_CRYPTO_GET_NEW_LOCKID 101 -#define CRYPTO_F_CRYPTO_SET_EX_DATA 102 -#define CRYPTO_F_DEF_ADD_INDEX 104 -#define CRYPTO_F_DEF_GET_CLASS 105 -#define CRYPTO_F_INT_DUP_EX_DATA 106 -#define CRYPTO_F_INT_FREE_EX_DATA 107 -#define CRYPTO_F_INT_NEW_EX_DATA 108 - -/* Reason codes. */ -#define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK 100 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/des.h b/externals/openssl/des.h deleted file mode 100644 index 92b6663599..0000000000 --- a/externals/openssl/des.h +++ /dev/null @@ -1,245 +0,0 @@ -/* crypto/des/des.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_NEW_DES_H -#define HEADER_NEW_DES_H - -#include /* OPENSSL_EXTERN, OPENSSL_NO_DES, - DES_LONG (via openssl/opensslconf.h */ - -#ifdef OPENSSL_NO_DES -#error DES is disabled. -#endif - -#ifdef OPENSSL_BUILD_SHLIBCRYPTO -# undef OPENSSL_EXTERN -# define OPENSSL_EXTERN OPENSSL_EXPORT -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef unsigned char DES_cblock[8]; -typedef /* const */ unsigned char const_DES_cblock[8]; -/* With "const", gcc 2.8.1 on Solaris thinks that DES_cblock * - * and const_DES_cblock * are incompatible pointer types. */ - -typedef struct DES_ks - { - union - { - DES_cblock cblock; - /* make sure things are correct size on machines with - * 8 byte longs */ - DES_LONG deslong[2]; - } ks[16]; - } DES_key_schedule; - -#ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT -# ifndef OPENSSL_ENABLE_OLD_DES_SUPPORT -# define OPENSSL_ENABLE_OLD_DES_SUPPORT -# endif -#endif - -#ifdef OPENSSL_ENABLE_OLD_DES_SUPPORT -# include -#endif - -#define DES_KEY_SZ (sizeof(DES_cblock)) -#define DES_SCHEDULE_SZ (sizeof(DES_key_schedule)) - -#define DES_ENCRYPT 1 -#define DES_DECRYPT 0 - -#define DES_CBC_MODE 0 -#define DES_PCBC_MODE 1 - -#define DES_ecb2_encrypt(i,o,k1,k2,e) \ - DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) - -#define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ - DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) - -#define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ - DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) - -#define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ - DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) - -OPENSSL_DECLARE_GLOBAL(int,DES_check_key); /* defaults to false */ -#define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key) -OPENSSL_DECLARE_GLOBAL(int,DES_rw_mode); /* defaults to DES_PCBC_MODE */ -#define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode) - -const char *DES_options(void); -void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output, - DES_key_schedule *ks1,DES_key_schedule *ks2, - DES_key_schedule *ks3, int enc); -DES_LONG DES_cbc_cksum(const unsigned char *input,DES_cblock *output, - long length,DES_key_schedule *schedule, - const_DES_cblock *ivec); -/* DES_cbc_encrypt does not update the IV! Use DES_ncbc_encrypt instead. */ -void DES_cbc_encrypt(const unsigned char *input,unsigned char *output, - long length,DES_key_schedule *schedule,DES_cblock *ivec, - int enc); -void DES_ncbc_encrypt(const unsigned char *input,unsigned char *output, - long length,DES_key_schedule *schedule,DES_cblock *ivec, - int enc); -void DES_xcbc_encrypt(const unsigned char *input,unsigned char *output, - long length,DES_key_schedule *schedule,DES_cblock *ivec, - const_DES_cblock *inw,const_DES_cblock *outw,int enc); -void DES_cfb_encrypt(const unsigned char *in,unsigned char *out,int numbits, - long length,DES_key_schedule *schedule,DES_cblock *ivec, - int enc); -void DES_ecb_encrypt(const_DES_cblock *input,DES_cblock *output, - DES_key_schedule *ks,int enc); - -/* This is the DES encryption function that gets called by just about - every other DES routine in the library. You should not use this - function except to implement 'modes' of DES. I say this because the - functions that call this routine do the conversion from 'char *' to - long, and this needs to be done to make sure 'non-aligned' memory - access do not occur. The characters are loaded 'little endian'. - Data is a pointer to 2 unsigned long's and ks is the - DES_key_schedule to use. enc, is non zero specifies encryption, - zero if decryption. */ -void DES_encrypt1(DES_LONG *data,DES_key_schedule *ks, int enc); - -/* This functions is the same as DES_encrypt1() except that the DES - initial permutation (IP) and final permutation (FP) have been left - out. As for DES_encrypt1(), you should not use this function. - It is used by the routines in the library that implement triple DES. - IP() DES_encrypt2() DES_encrypt2() DES_encrypt2() FP() is the same - as DES_encrypt1() DES_encrypt1() DES_encrypt1() except faster :-). */ -void DES_encrypt2(DES_LONG *data,DES_key_schedule *ks, int enc); - -void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, - DES_key_schedule *ks2, DES_key_schedule *ks3); -void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, - DES_key_schedule *ks2, DES_key_schedule *ks3); -void DES_ede3_cbc_encrypt(const unsigned char *input,unsigned char *output, - long length, - DES_key_schedule *ks1,DES_key_schedule *ks2, - DES_key_schedule *ks3,DES_cblock *ivec,int enc); -void DES_ede3_cbcm_encrypt(const unsigned char *in,unsigned char *out, - long length, - DES_key_schedule *ks1,DES_key_schedule *ks2, - DES_key_schedule *ks3, - DES_cblock *ivec1,DES_cblock *ivec2, - int enc); -void DES_ede3_cfb64_encrypt(const unsigned char *in,unsigned char *out, - long length,DES_key_schedule *ks1, - DES_key_schedule *ks2,DES_key_schedule *ks3, - DES_cblock *ivec,int *num,int enc); -void DES_ede3_cfb_encrypt(const unsigned char *in,unsigned char *out, - int numbits,long length,DES_key_schedule *ks1, - DES_key_schedule *ks2,DES_key_schedule *ks3, - DES_cblock *ivec,int enc); -void DES_ede3_ofb64_encrypt(const unsigned char *in,unsigned char *out, - long length,DES_key_schedule *ks1, - DES_key_schedule *ks2,DES_key_schedule *ks3, - DES_cblock *ivec,int *num); -#if 0 -void DES_xwhite_in2out(const_DES_cblock *DES_key,const_DES_cblock *in_white, - DES_cblock *out_white); -#endif - -int DES_enc_read(int fd,void *buf,int len,DES_key_schedule *sched, - DES_cblock *iv); -int DES_enc_write(int fd,const void *buf,int len,DES_key_schedule *sched, - DES_cblock *iv); -char *DES_fcrypt(const char *buf,const char *salt, char *ret); -char *DES_crypt(const char *buf,const char *salt); -void DES_ofb_encrypt(const unsigned char *in,unsigned char *out,int numbits, - long length,DES_key_schedule *schedule,DES_cblock *ivec); -void DES_pcbc_encrypt(const unsigned char *input,unsigned char *output, - long length,DES_key_schedule *schedule,DES_cblock *ivec, - int enc); -DES_LONG DES_quad_cksum(const unsigned char *input,DES_cblock output[], - long length,int out_count,DES_cblock *seed); -int DES_random_key(DES_cblock *ret); -void DES_set_odd_parity(DES_cblock *key); -int DES_check_key_parity(const_DES_cblock *key); -int DES_is_weak_key(const_DES_cblock *key); -/* DES_set_key (= set_key = DES_key_sched = key_sched) calls - * DES_set_key_checked if global variable DES_check_key is set, - * DES_set_key_unchecked otherwise. */ -int DES_set_key(const_DES_cblock *key,DES_key_schedule *schedule); -int DES_key_sched(const_DES_cblock *key,DES_key_schedule *schedule); -int DES_set_key_checked(const_DES_cblock *key,DES_key_schedule *schedule); -void DES_set_key_unchecked(const_DES_cblock *key,DES_key_schedule *schedule); -void DES_string_to_key(const char *str,DES_cblock *key); -void DES_string_to_2keys(const char *str,DES_cblock *key1,DES_cblock *key2); -void DES_cfb64_encrypt(const unsigned char *in,unsigned char *out,long length, - DES_key_schedule *schedule,DES_cblock *ivec,int *num, - int enc); -void DES_ofb64_encrypt(const unsigned char *in,unsigned char *out,long length, - DES_key_schedule *schedule,DES_cblock *ivec,int *num); - -int DES_read_password(DES_cblock *key, const char *prompt, int verify); -int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, const char *prompt, - int verify); - -#define DES_fixup_key_parity DES_set_odd_parity - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/des_old.h b/externals/openssl/des_old.h deleted file mode 100644 index 2b2c372354..0000000000 --- a/externals/openssl/des_old.h +++ /dev/null @@ -1,446 +0,0 @@ -/* crypto/des/des_old.h -*- mode:C; c-file-style: "eay" -*- */ - -/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING - * - * The function names in here are deprecated and are only present to - * provide an interface compatible with openssl 0.9.6 and older as - * well as libdes. OpenSSL now provides functions where "des_" has - * been replaced with "DES_" in the names, to make it possible to - * make incompatible changes that are needed for C type security and - * other stuff. - * - * This include files has two compatibility modes: - * - * - If OPENSSL_DES_LIBDES_COMPATIBILITY is defined, you get an API - * that is compatible with libdes and SSLeay. - * - If OPENSSL_DES_LIBDES_COMPATIBILITY isn't defined, you get an - * API that is compatible with OpenSSL 0.9.5x to 0.9.6x. - * - * Note that these modes break earlier snapshots of OpenSSL, where - * libdes compatibility was the only available mode or (later on) the - * prefered compatibility mode. However, after much consideration - * (and more or less violent discussions with external parties), it - * was concluded that OpenSSL should be compatible with earlier versions - * of itself before anything else. Also, in all honesty, libdes is - * an old beast that shouldn't really be used any more. - * - * Please consider starting to use the DES_ functions rather than the - * des_ ones. The des_ functions will disappear completely before - * OpenSSL 1.0! - * - * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING - */ - -/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL - * project 2001. - */ -/* ==================================================================== - * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_DES_H -#define HEADER_DES_H - -#include /* OPENSSL_EXTERN, OPENSSL_NO_DES, DES_LONG */ - -#ifdef OPENSSL_NO_DES -#error DES is disabled. -#endif - -#ifndef HEADER_NEW_DES_H -#error You must include des.h, not des_old.h directly. -#endif - -#ifdef _KERBEROS_DES_H -#error replaces . -#endif - -#include - -#ifdef OPENSSL_BUILD_SHLIBCRYPTO -# undef OPENSSL_EXTERN -# define OPENSSL_EXTERN OPENSSL_EXPORT -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef _ -#undef _ -#endif - -typedef unsigned char _ossl_old_des_cblock[8]; -typedef struct _ossl_old_des_ks_struct - { - union { - _ossl_old_des_cblock _; - /* make sure things are correct size on machines with - * 8 byte longs */ - DES_LONG pad[2]; - } ks; - } _ossl_old_des_key_schedule[16]; - -#ifndef OPENSSL_DES_LIBDES_COMPATIBILITY -#define des_cblock DES_cblock -#define const_des_cblock const_DES_cblock -#define des_key_schedule DES_key_schedule -#define des_ecb3_encrypt(i,o,k1,k2,k3,e)\ - DES_ecb3_encrypt((i),(o),&(k1),&(k2),&(k3),(e)) -#define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\ - DES_ede3_cbc_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(e)) -#define des_ede3_cbcm_encrypt(i,o,l,k1,k2,k3,iv1,iv2,e)\ - DES_ede3_cbcm_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv1),(iv2),(e)) -#define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\ - DES_ede3_cfb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n),(e)) -#define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\ - DES_ede3_ofb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n)) -#define des_options()\ - DES_options() -#define des_cbc_cksum(i,o,l,k,iv)\ - DES_cbc_cksum((i),(o),(l),&(k),(iv)) -#define des_cbc_encrypt(i,o,l,k,iv,e)\ - DES_cbc_encrypt((i),(o),(l),&(k),(iv),(e)) -#define des_ncbc_encrypt(i,o,l,k,iv,e)\ - DES_ncbc_encrypt((i),(o),(l),&(k),(iv),(e)) -#define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\ - DES_xcbc_encrypt((i),(o),(l),&(k),(iv),(inw),(outw),(e)) -#define des_cfb_encrypt(i,o,n,l,k,iv,e)\ - DES_cfb_encrypt((i),(o),(n),(l),&(k),(iv),(e)) -#define des_ecb_encrypt(i,o,k,e)\ - DES_ecb_encrypt((i),(o),&(k),(e)) -#define des_encrypt1(d,k,e)\ - DES_encrypt1((d),&(k),(e)) -#define des_encrypt2(d,k,e)\ - DES_encrypt2((d),&(k),(e)) -#define des_encrypt3(d,k1,k2,k3)\ - DES_encrypt3((d),&(k1),&(k2),&(k3)) -#define des_decrypt3(d,k1,k2,k3)\ - DES_decrypt3((d),&(k1),&(k2),&(k3)) -#define des_xwhite_in2out(k,i,o)\ - DES_xwhite_in2out((k),(i),(o)) -#define des_enc_read(f,b,l,k,iv)\ - DES_enc_read((f),(b),(l),&(k),(iv)) -#define des_enc_write(f,b,l,k,iv)\ - DES_enc_write((f),(b),(l),&(k),(iv)) -#define des_fcrypt(b,s,r)\ - DES_fcrypt((b),(s),(r)) -#if 0 -#define des_crypt(b,s)\ - DES_crypt((b),(s)) -#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(__OpenBSD__) -#define crypt(b,s)\ - DES_crypt((b),(s)) -#endif -#endif -#define des_ofb_encrypt(i,o,n,l,k,iv)\ - DES_ofb_encrypt((i),(o),(n),(l),&(k),(iv)) -#define des_pcbc_encrypt(i,o,l,k,iv,e)\ - DES_pcbc_encrypt((i),(o),(l),&(k),(iv),(e)) -#define des_quad_cksum(i,o,l,c,s)\ - DES_quad_cksum((i),(o),(l),(c),(s)) -#define des_random_seed(k)\ - _ossl_096_des_random_seed((k)) -#define des_random_key(r)\ - DES_random_key((r)) -#define des_read_password(k,p,v) \ - DES_read_password((k),(p),(v)) -#define des_read_2passwords(k1,k2,p,v) \ - DES_read_2passwords((k1),(k2),(p),(v)) -#define des_set_odd_parity(k)\ - DES_set_odd_parity((k)) -#define des_check_key_parity(k)\ - DES_check_key_parity((k)) -#define des_is_weak_key(k)\ - DES_is_weak_key((k)) -#define des_set_key(k,ks)\ - DES_set_key((k),&(ks)) -#define des_key_sched(k,ks)\ - DES_key_sched((k),&(ks)) -#define des_set_key_checked(k,ks)\ - DES_set_key_checked((k),&(ks)) -#define des_set_key_unchecked(k,ks)\ - DES_set_key_unchecked((k),&(ks)) -#define des_string_to_key(s,k)\ - DES_string_to_key((s),(k)) -#define des_string_to_2keys(s,k1,k2)\ - DES_string_to_2keys((s),(k1),(k2)) -#define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\ - DES_cfb64_encrypt((i),(o),(l),&(ks),(iv),(n),(e)) -#define des_ofb64_encrypt(i,o,l,ks,iv,n)\ - DES_ofb64_encrypt((i),(o),(l),&(ks),(iv),(n)) - - -#define des_ecb2_encrypt(i,o,k1,k2,e) \ - des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) - -#define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ - des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) - -#define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ - des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) - -#define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ - des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) - -#define des_check_key DES_check_key -#define des_rw_mode DES_rw_mode -#else /* libdes compatibility */ -/* Map all symbol names to _ossl_old_des_* form, so we avoid all - clashes with libdes */ -#define des_cblock _ossl_old_des_cblock -#define des_key_schedule _ossl_old_des_key_schedule -#define des_ecb3_encrypt(i,o,k1,k2,k3,e)\ - _ossl_old_des_ecb3_encrypt((i),(o),(k1),(k2),(k3),(e)) -#define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\ - _ossl_old_des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(e)) -#define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\ - _ossl_old_des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n),(e)) -#define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\ - _ossl_old_des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n)) -#define des_options()\ - _ossl_old_des_options() -#define des_cbc_cksum(i,o,l,k,iv)\ - _ossl_old_des_cbc_cksum((i),(o),(l),(k),(iv)) -#define des_cbc_encrypt(i,o,l,k,iv,e)\ - _ossl_old_des_cbc_encrypt((i),(o),(l),(k),(iv),(e)) -#define des_ncbc_encrypt(i,o,l,k,iv,e)\ - _ossl_old_des_ncbc_encrypt((i),(o),(l),(k),(iv),(e)) -#define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\ - _ossl_old_des_xcbc_encrypt((i),(o),(l),(k),(iv),(inw),(outw),(e)) -#define des_cfb_encrypt(i,o,n,l,k,iv,e)\ - _ossl_old_des_cfb_encrypt((i),(o),(n),(l),(k),(iv),(e)) -#define des_ecb_encrypt(i,o,k,e)\ - _ossl_old_des_ecb_encrypt((i),(o),(k),(e)) -#define des_encrypt(d,k,e)\ - _ossl_old_des_encrypt((d),(k),(e)) -#define des_encrypt2(d,k,e)\ - _ossl_old_des_encrypt2((d),(k),(e)) -#define des_encrypt3(d,k1,k2,k3)\ - _ossl_old_des_encrypt3((d),(k1),(k2),(k3)) -#define des_decrypt3(d,k1,k2,k3)\ - _ossl_old_des_decrypt3((d),(k1),(k2),(k3)) -#define des_xwhite_in2out(k,i,o)\ - _ossl_old_des_xwhite_in2out((k),(i),(o)) -#define des_enc_read(f,b,l,k,iv)\ - _ossl_old_des_enc_read((f),(b),(l),(k),(iv)) -#define des_enc_write(f,b,l,k,iv)\ - _ossl_old_des_enc_write((f),(b),(l),(k),(iv)) -#define des_fcrypt(b,s,r)\ - _ossl_old_des_fcrypt((b),(s),(r)) -#define des_crypt(b,s)\ - _ossl_old_des_crypt((b),(s)) -#if 0 -#define crypt(b,s)\ - _ossl_old_crypt((b),(s)) -#endif -#define des_ofb_encrypt(i,o,n,l,k,iv)\ - _ossl_old_des_ofb_encrypt((i),(o),(n),(l),(k),(iv)) -#define des_pcbc_encrypt(i,o,l,k,iv,e)\ - _ossl_old_des_pcbc_encrypt((i),(o),(l),(k),(iv),(e)) -#define des_quad_cksum(i,o,l,c,s)\ - _ossl_old_des_quad_cksum((i),(o),(l),(c),(s)) -#define des_random_seed(k)\ - _ossl_old_des_random_seed((k)) -#define des_random_key(r)\ - _ossl_old_des_random_key((r)) -#define des_read_password(k,p,v) \ - _ossl_old_des_read_password((k),(p),(v)) -#define des_read_2passwords(k1,k2,p,v) \ - _ossl_old_des_read_2passwords((k1),(k2),(p),(v)) -#define des_set_odd_parity(k)\ - _ossl_old_des_set_odd_parity((k)) -#define des_is_weak_key(k)\ - _ossl_old_des_is_weak_key((k)) -#define des_set_key(k,ks)\ - _ossl_old_des_set_key((k),(ks)) -#define des_key_sched(k,ks)\ - _ossl_old_des_key_sched((k),(ks)) -#define des_string_to_key(s,k)\ - _ossl_old_des_string_to_key((s),(k)) -#define des_string_to_2keys(s,k1,k2)\ - _ossl_old_des_string_to_2keys((s),(k1),(k2)) -#define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\ - _ossl_old_des_cfb64_encrypt((i),(o),(l),(ks),(iv),(n),(e)) -#define des_ofb64_encrypt(i,o,l,ks,iv,n)\ - _ossl_old_des_ofb64_encrypt((i),(o),(l),(ks),(iv),(n)) - - -#define des_ecb2_encrypt(i,o,k1,k2,e) \ - des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) - -#define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ - des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) - -#define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ - des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) - -#define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ - des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) - -#define des_check_key DES_check_key -#define des_rw_mode DES_rw_mode -#endif - -const char *_ossl_old_des_options(void); -void _ossl_old_des_ecb3_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output, - _ossl_old_des_key_schedule ks1,_ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3, int enc); -DES_LONG _ossl_old_des_cbc_cksum(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output, - long length,_ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec); -void _ossl_old_des_cbc_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,long length, - _ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec,int enc); -void _ossl_old_des_ncbc_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,long length, - _ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec,int enc); -void _ossl_old_des_xcbc_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,long length, - _ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec, - _ossl_old_des_cblock *inw,_ossl_old_des_cblock *outw,int enc); -void _ossl_old_des_cfb_encrypt(unsigned char *in,unsigned char *out,int numbits, - long length,_ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec,int enc); -void _ossl_old_des_ecb_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output, - _ossl_old_des_key_schedule ks,int enc); -void _ossl_old_des_encrypt(DES_LONG *data,_ossl_old_des_key_schedule ks, int enc); -void _ossl_old_des_encrypt2(DES_LONG *data,_ossl_old_des_key_schedule ks, int enc); -void _ossl_old_des_encrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1, - _ossl_old_des_key_schedule ks2, _ossl_old_des_key_schedule ks3); -void _ossl_old_des_decrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1, - _ossl_old_des_key_schedule ks2, _ossl_old_des_key_schedule ks3); -void _ossl_old_des_ede3_cbc_encrypt(_ossl_old_des_cblock *input, _ossl_old_des_cblock *output, - long length, _ossl_old_des_key_schedule ks1, _ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3, _ossl_old_des_cblock *ivec, int enc); -void _ossl_old_des_ede3_cfb64_encrypt(unsigned char *in, unsigned char *out, - long length, _ossl_old_des_key_schedule ks1, _ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3, _ossl_old_des_cblock *ivec, int *num, int enc); -void _ossl_old_des_ede3_ofb64_encrypt(unsigned char *in, unsigned char *out, - long length, _ossl_old_des_key_schedule ks1, _ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3, _ossl_old_des_cblock *ivec, int *num); -#if 0 -void _ossl_old_des_xwhite_in2out(_ossl_old_des_cblock (*des_key), _ossl_old_des_cblock (*in_white), - _ossl_old_des_cblock (*out_white)); -#endif - -int _ossl_old_des_enc_read(int fd,char *buf,int len,_ossl_old_des_key_schedule sched, - _ossl_old_des_cblock *iv); -int _ossl_old_des_enc_write(int fd,char *buf,int len,_ossl_old_des_key_schedule sched, - _ossl_old_des_cblock *iv); -char *_ossl_old_des_fcrypt(const char *buf,const char *salt, char *ret); -char *_ossl_old_des_crypt(const char *buf,const char *salt); -#if !defined(PERL5) && !defined(NeXT) -char *_ossl_old_crypt(const char *buf,const char *salt); -#endif -void _ossl_old_des_ofb_encrypt(unsigned char *in,unsigned char *out, - int numbits,long length,_ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec); -void _ossl_old_des_pcbc_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output,long length, - _ossl_old_des_key_schedule schedule,_ossl_old_des_cblock *ivec,int enc); -DES_LONG _ossl_old_des_quad_cksum(_ossl_old_des_cblock *input,_ossl_old_des_cblock *output, - long length,int out_count,_ossl_old_des_cblock *seed); -void _ossl_old_des_random_seed(_ossl_old_des_cblock key); -void _ossl_old_des_random_key(_ossl_old_des_cblock ret); -int _ossl_old_des_read_password(_ossl_old_des_cblock *key,const char *prompt,int verify); -int _ossl_old_des_read_2passwords(_ossl_old_des_cblock *key1,_ossl_old_des_cblock *key2, - const char *prompt,int verify); -void _ossl_old_des_set_odd_parity(_ossl_old_des_cblock *key); -int _ossl_old_des_is_weak_key(_ossl_old_des_cblock *key); -int _ossl_old_des_set_key(_ossl_old_des_cblock *key,_ossl_old_des_key_schedule schedule); -int _ossl_old_des_key_sched(_ossl_old_des_cblock *key,_ossl_old_des_key_schedule schedule); -void _ossl_old_des_string_to_key(char *str,_ossl_old_des_cblock *key); -void _ossl_old_des_string_to_2keys(char *str,_ossl_old_des_cblock *key1,_ossl_old_des_cblock *key2); -void _ossl_old_des_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, - _ossl_old_des_key_schedule schedule, _ossl_old_des_cblock *ivec, int *num, int enc); -void _ossl_old_des_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, - _ossl_old_des_key_schedule schedule, _ossl_old_des_cblock *ivec, int *num); - -void _ossl_096_des_random_seed(des_cblock *key); - -/* The following definitions provide compatibility with the MIT Kerberos - * library. The _ossl_old_des_key_schedule structure is not binary compatible. */ - -#define _KERBEROS_DES_H - -#define KRBDES_ENCRYPT DES_ENCRYPT -#define KRBDES_DECRYPT DES_DECRYPT - -#ifdef KERBEROS -# define ENCRYPT DES_ENCRYPT -# define DECRYPT DES_DECRYPT -#endif - -#ifndef NCOMPAT -# define C_Block des_cblock -# define Key_schedule des_key_schedule -# define KEY_SZ DES_KEY_SZ -# define string_to_key des_string_to_key -# define read_pw_string des_read_pw_string -# define random_key des_random_key -# define pcbc_encrypt des_pcbc_encrypt -# define set_key des_set_key -# define key_sched des_key_sched -# define ecb_encrypt des_ecb_encrypt -# define cbc_encrypt des_cbc_encrypt -# define ncbc_encrypt des_ncbc_encrypt -# define xcbc_encrypt des_xcbc_encrypt -# define cbc_cksum des_cbc_cksum -# define quad_cksum des_quad_cksum -# define check_parity des_check_key_parity -#endif - -#define des_fixup_key_parity DES_fixup_key_parity - -#ifdef __cplusplus -} -#endif - -/* for DES_read_pw_string et al */ -#include - -#endif diff --git a/externals/openssl/dh.h b/externals/openssl/dh.h deleted file mode 100644 index 10475ac4b3..0000000000 --- a/externals/openssl/dh.h +++ /dev/null @@ -1,245 +0,0 @@ -/* crypto/dh/dh.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_DH_H -#define HEADER_DH_H - -#include - -#ifdef OPENSSL_NO_DH -#error DH is disabled. -#endif - -#ifndef OPENSSL_NO_BIO -#include -#endif -#include -#ifndef OPENSSL_NO_DEPRECATED -#include -#endif - -#ifndef OPENSSL_DH_MAX_MODULUS_BITS -# define OPENSSL_DH_MAX_MODULUS_BITS 10000 -#endif - -#define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024 - -#define DH_FLAG_CACHE_MONT_P 0x01 -#define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH - * implementation now uses constant time - * modular exponentiation for secret exponents - * by default. This flag causes the - * faster variable sliding window method to - * be used for all exponents. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Already defined in ossl_typ.h */ -/* typedef struct dh_st DH; */ -/* typedef struct dh_method DH_METHOD; */ - -struct dh_method - { - const char *name; - /* Methods here */ - int (*generate_key)(DH *dh); - int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh); - int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a, - const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *m_ctx); /* Can be null */ - - int (*init)(DH *dh); - int (*finish)(DH *dh); - int flags; - char *app_data; - /* If this is non-NULL, it will be used to generate parameters */ - int (*generate_params)(DH *dh, int prime_len, int generator, BN_GENCB *cb); - }; - -struct dh_st - { - /* This first argument is used to pick up errors when - * a DH is passed instead of a EVP_PKEY */ - int pad; - int version; - BIGNUM *p; - BIGNUM *g; - long length; /* optional */ - BIGNUM *pub_key; /* g^x */ - BIGNUM *priv_key; /* x */ - - int flags; - BN_MONT_CTX *method_mont_p; - /* Place holders if we want to do X9.42 DH */ - BIGNUM *q; - BIGNUM *j; - unsigned char *seed; - int seedlen; - BIGNUM *counter; - - int references; - CRYPTO_EX_DATA ex_data; - const DH_METHOD *meth; - ENGINE *engine; - }; - -#define DH_GENERATOR_2 2 -/* #define DH_GENERATOR_3 3 */ -#define DH_GENERATOR_5 5 - -/* DH_check error codes */ -#define DH_CHECK_P_NOT_PRIME 0x01 -#define DH_CHECK_P_NOT_SAFE_PRIME 0x02 -#define DH_UNABLE_TO_CHECK_GENERATOR 0x04 -#define DH_NOT_SUITABLE_GENERATOR 0x08 - -/* DH_check_pub_key error codes */ -#define DH_CHECK_PUBKEY_TOO_SMALL 0x01 -#define DH_CHECK_PUBKEY_TOO_LARGE 0x02 - -/* primes p where (p-1)/2 is prime too are called "safe"; we define - this for backward compatibility: */ -#define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME - -#define DHparams_dup(x) ASN1_dup_of_const(DH,i2d_DHparams,d2i_DHparams,x) -#define d2i_DHparams_fp(fp,x) (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ - (char *(*)())d2i_DHparams,(fp),(unsigned char **)(x)) -#define i2d_DHparams_fp(fp,x) ASN1_i2d_fp(i2d_DHparams,(fp), \ - (unsigned char *)(x)) -#define d2i_DHparams_bio(bp,x) ASN1_d2i_bio_of(DH,DH_new,d2i_DHparams,bp,x) -#define i2d_DHparams_bio(bp,x) ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x) - -const DH_METHOD *DH_OpenSSL(void); - -#ifdef OPENSSL_FIPS -DH * FIPS_dh_new(void); -void FIPS_dh_free(DH *dh); -#endif - -void DH_set_default_method(const DH_METHOD *meth); -const DH_METHOD *DH_get_default_method(void); -int DH_set_method(DH *dh, const DH_METHOD *meth); -DH *DH_new_method(ENGINE *engine); - -DH * DH_new(void); -void DH_free(DH *dh); -int DH_up_ref(DH *dh); -int DH_size(const DH *dh); -int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int DH_set_ex_data(DH *d, int idx, void *arg); -void *DH_get_ex_data(DH *d, int idx); - -/* Deprecated version */ -#ifndef OPENSSL_NO_DEPRECATED -DH * DH_generate_parameters(int prime_len,int generator, - void (*callback)(int,int,void *),void *cb_arg); -#endif /* !defined(OPENSSL_NO_DEPRECATED) */ - -/* New version */ -int DH_generate_parameters_ex(DH *dh, int prime_len,int generator, BN_GENCB *cb); - -int DH_check(const DH *dh,int *codes); -int DH_check_pub_key(const DH *dh,const BIGNUM *pub_key, int *codes); -int DH_generate_key(DH *dh); -int DH_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh); -DH * d2i_DHparams(DH **a,const unsigned char **pp, long length); -int i2d_DHparams(const DH *a,unsigned char **pp); -#ifndef OPENSSL_NO_FP_API -int DHparams_print_fp(FILE *fp, const DH *x); -#endif -#ifndef OPENSSL_NO_BIO -int DHparams_print(BIO *bp, const DH *x); -#else -int DHparams_print(char *bp, const DH *x); -#endif - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_DH_strings(void); - -/* Error codes for the DH functions. */ - -/* Function codes. */ -#define DH_F_COMPUTE_KEY 102 -#define DH_F_DHPARAMS_PRINT 100 -#define DH_F_DHPARAMS_PRINT_FP 101 -#define DH_F_DH_BUILTIN_GENPARAMS 106 -#define DH_F_DH_COMPUTE_KEY 107 -#define DH_F_DH_GENERATE_KEY 108 -#define DH_F_DH_GENERATE_PARAMETERS 109 -#define DH_F_DH_NEW_METHOD 105 -#define DH_F_GENERATE_KEY 103 -#define DH_F_GENERATE_PARAMETERS 104 - -/* Reason codes. */ -#define DH_R_BAD_GENERATOR 101 -#define DH_R_INVALID_PUBKEY 102 -#define DH_R_KEY_SIZE_TOO_SMALL 104 -#define DH_R_MODULUS_TOO_LARGE 103 -#define DH_R_NO_PRIVATE_VALUE 100 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/dsa.h b/externals/openssl/dsa.h deleted file mode 100644 index 702c50d6dc..0000000000 --- a/externals/openssl/dsa.h +++ /dev/null @@ -1,324 +0,0 @@ -/* crypto/dsa/dsa.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -/* - * The DSS routines are based on patches supplied by - * Steven Schoch . He basically did the - * work and I have just tweaked them a little to fit into my - * stylistic vision for SSLeay :-) */ - -#ifndef HEADER_DSA_H -#define HEADER_DSA_H - -#include - -#ifdef OPENSSL_NO_DSA -#error DSA is disabled. -#endif - -#ifndef OPENSSL_NO_BIO -#include -#endif -#include -#include - -#ifndef OPENSSL_NO_DEPRECATED -#include -#ifndef OPENSSL_NO_DH -# include -#endif -#endif - -#ifndef OPENSSL_DSA_MAX_MODULUS_BITS -# define OPENSSL_DSA_MAX_MODULUS_BITS 10000 -#endif - -#define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024 - -#define DSA_FLAG_CACHE_MONT_P 0x01 -#define DSA_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DSA - * implementation now uses constant time - * modular exponentiation for secret exponents - * by default. This flag causes the - * faster variable sliding window method to - * be used for all exponents. - */ - -/* If this flag is set the DSA method is FIPS compliant and can be used - * in FIPS mode. This is set in the validated module method. If an - * application sets this flag in its own methods it is its reposibility - * to ensure the result is compliant. - */ - -#define DSA_FLAG_FIPS_METHOD 0x0400 - -/* If this flag is set the operations normally disabled in FIPS mode are - * permitted it is then the applications responsibility to ensure that the - * usage is compliant. - */ - -#define DSA_FLAG_NON_FIPS_ALLOW 0x0400 - -#ifdef OPENSSL_FIPS -#define FIPS_DSA_SIZE_T int -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Already defined in ossl_typ.h */ -/* typedef struct dsa_st DSA; */ -/* typedef struct dsa_method DSA_METHOD; */ - -typedef struct DSA_SIG_st - { - BIGNUM *r; - BIGNUM *s; - } DSA_SIG; - -struct dsa_method - { - const char *name; - DSA_SIG * (*dsa_do_sign)(const unsigned char *dgst, int dlen, DSA *dsa); - int (*dsa_sign_setup)(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, - BIGNUM **rp); - int (*dsa_do_verify)(const unsigned char *dgst, int dgst_len, - DSA_SIG *sig, DSA *dsa); - int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, - BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *in_mont); - int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *m_ctx); /* Can be null */ - int (*init)(DSA *dsa); - int (*finish)(DSA *dsa); - int flags; - char *app_data; - /* If this is non-NULL, it is used to generate DSA parameters */ - int (*dsa_paramgen)(DSA *dsa, int bits, - unsigned char *seed, int seed_len, - int *counter_ret, unsigned long *h_ret, - BN_GENCB *cb); - /* If this is non-NULL, it is used to generate DSA keys */ - int (*dsa_keygen)(DSA *dsa); - }; - -struct dsa_st - { - /* This first variable is used to pick up errors where - * a DSA is passed instead of of a EVP_PKEY */ - int pad; - long version; - int write_params; - BIGNUM *p; - BIGNUM *q; /* == 20 */ - BIGNUM *g; - - BIGNUM *pub_key; /* y public key */ - BIGNUM *priv_key; /* x private key */ - - BIGNUM *kinv; /* Signing pre-calc */ - BIGNUM *r; /* Signing pre-calc */ - - int flags; - /* Normally used to cache montgomery values */ - BN_MONT_CTX *method_mont_p; - int references; - CRYPTO_EX_DATA ex_data; - const DSA_METHOD *meth; - /* functional reference if 'meth' is ENGINE-provided */ - ENGINE *engine; - }; - -#define DSAparams_dup(x) ASN1_dup_of_const(DSA,i2d_DSAparams,d2i_DSAparams,x) -#define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \ - (char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x)) -#define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \ - (unsigned char *)(x)) -#define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x) -#define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x) - - -DSA_SIG * DSA_SIG_new(void); -void DSA_SIG_free(DSA_SIG *a); -int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp); -DSA_SIG * d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length); - -DSA_SIG * DSA_do_sign(const unsigned char *dgst,int dlen,DSA *dsa); -int DSA_do_verify(const unsigned char *dgst,int dgst_len, - DSA_SIG *sig,DSA *dsa); - -const DSA_METHOD *DSA_OpenSSL(void); - -void DSA_set_default_method(const DSA_METHOD *); -const DSA_METHOD *DSA_get_default_method(void); -int DSA_set_method(DSA *dsa, const DSA_METHOD *); - -#ifdef OPENSSL_FIPS -DSA * FIPS_dsa_new(void); -void FIPS_dsa_free (DSA *r); -#endif - -DSA * DSA_new(void); -DSA * DSA_new_method(ENGINE *engine); -void DSA_free (DSA *r); -/* "up" the DSA object's reference count */ -int DSA_up_ref(DSA *r); -int DSA_size(const DSA *); - /* next 4 return -1 on error */ -int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); -int DSA_sign(int type,const unsigned char *dgst,int dlen, - unsigned char *sig, unsigned int *siglen, DSA *dsa); -int DSA_verify(int type,const unsigned char *dgst,int dgst_len, - const unsigned char *sigbuf, int siglen, DSA *dsa); -int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int DSA_set_ex_data(DSA *d, int idx, void *arg); -void *DSA_get_ex_data(DSA *d, int idx); - -DSA * d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length); -DSA * d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length); -DSA * d2i_DSAparams(DSA **a, const unsigned char **pp, long length); - -/* Deprecated version */ -#ifndef OPENSSL_NO_DEPRECATED -DSA * DSA_generate_parameters(int bits, - unsigned char *seed,int seed_len, - int *counter_ret, unsigned long *h_ret,void - (*callback)(int, int, void *),void *cb_arg); -#endif /* !defined(OPENSSL_NO_DEPRECATED) */ - -/* New version */ -int DSA_generate_parameters_ex(DSA *dsa, int bits, - unsigned char *seed,int seed_len, - int *counter_ret, unsigned long *h_ret, BN_GENCB *cb); - -int DSA_generate_key(DSA *a); -int i2d_DSAPublicKey(const DSA *a, unsigned char **pp); -int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp); -int i2d_DSAparams(const DSA *a,unsigned char **pp); - -#ifndef OPENSSL_NO_BIO -int DSAparams_print(BIO *bp, const DSA *x); -int DSA_print(BIO *bp, const DSA *x, int off); -#endif -#ifndef OPENSSL_NO_FP_API -int DSAparams_print_fp(FILE *fp, const DSA *x); -int DSA_print_fp(FILE *bp, const DSA *x, int off); -#endif - -#define DSS_prime_checks 50 -/* Primality test according to FIPS PUB 186[-1], Appendix 2.1: - * 50 rounds of Rabin-Miller */ -#define DSA_is_prime(n, callback, cb_arg) \ - BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg) - -#ifndef OPENSSL_NO_DH -/* Convert DSA structure (key or just parameters) into DH structure - * (be careful to avoid small subgroup attacks when using this!) */ -DH *DSA_dup_DH(const DSA *r); -#endif - -#ifdef OPENSSL_FIPS -int FIPS_dsa_sig_encode(unsigned char *out, DSA_SIG *sig); -int FIPS_dsa_sig_decode(DSA_SIG *sig, const unsigned char *in, int inlen); -#endif - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_DSA_strings(void); - -/* Error codes for the DSA functions. */ - -/* Function codes. */ -#define DSA_F_D2I_DSA_SIG 110 -#define DSA_F_DSAPARAMS_PRINT 100 -#define DSA_F_DSAPARAMS_PRINT_FP 101 -#define DSA_F_DSA_BUILTIN_KEYGEN 119 -#define DSA_F_DSA_BUILTIN_PARAMGEN 118 -#define DSA_F_DSA_DO_SIGN 112 -#define DSA_F_DSA_DO_VERIFY 113 -#define DSA_F_DSA_GENERATE_PARAMETERS 117 -#define DSA_F_DSA_NEW_METHOD 103 -#define DSA_F_DSA_PRINT 104 -#define DSA_F_DSA_PRINT_FP 105 -#define DSA_F_DSA_SET_DEFAULT_METHOD 115 -#define DSA_F_DSA_SET_METHOD 116 -#define DSA_F_DSA_SIGN 106 -#define DSA_F_DSA_SIGN_SETUP 107 -#define DSA_F_DSA_SIG_NEW 109 -#define DSA_F_DSA_VERIFY 108 -#define DSA_F_I2D_DSA_SIG 111 -#define DSA_F_SIG_CB 114 - -/* Reason codes. */ -#define DSA_R_BAD_Q_VALUE 102 -#define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100 -#define DSA_R_KEY_SIZE_TOO_SMALL 106 -#define DSA_R_MISSING_PARAMETERS 101 -#define DSA_R_MODULUS_TOO_LARGE 103 -#define DSA_R_NON_FIPS_METHOD 104 -#define DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE 105 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/dso.h b/externals/openssl/dso.h deleted file mode 100644 index 08730cef2f..0000000000 --- a/externals/openssl/dso.h +++ /dev/null @@ -1,369 +0,0 @@ -/* dso.h -*- mode:C; c-file-style: "eay" -*- */ -/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL - * project 2000. - */ -/* ==================================================================== - * Copyright (c) 2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_DSO_H -#define HEADER_DSO_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* These values are used as commands to DSO_ctrl() */ -#define DSO_CTRL_GET_FLAGS 1 -#define DSO_CTRL_SET_FLAGS 2 -#define DSO_CTRL_OR_FLAGS 3 - -/* By default, DSO_load() will translate the provided filename into a form - * typical for the platform (more specifically the DSO_METHOD) using the - * dso_name_converter function of the method. Eg. win32 will transform "blah" - * into "blah.dll", and dlfcn will transform it into "libblah.so". The - * behaviour can be overriden by setting the name_converter callback in the DSO - * object (using DSO_set_name_converter()). This callback could even utilise - * the DSO_METHOD's converter too if it only wants to override behaviour for - * one or two possible DSO methods. However, the following flag can be set in a - * DSO to prevent *any* native name-translation at all - eg. if the caller has - * prompted the user for a path to a driver library so the filename should be - * interpreted as-is. */ -#define DSO_FLAG_NO_NAME_TRANSLATION 0x01 -/* An extra flag to give if only the extension should be added as - * translation. This is obviously only of importance on Unix and - * other operating systems where the translation also may prefix - * the name with something, like 'lib', and ignored everywhere else. - * This flag is also ignored if DSO_FLAG_NO_NAME_TRANSLATION is used - * at the same time. */ -#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02 - -/* The following flag controls the translation of symbol names to upper - * case. This is currently only being implemented for OpenVMS. - */ -#define DSO_FLAG_UPCASE_SYMBOL 0x10 - -/* This flag loads the library with public symbols. - * Meaning: The exported symbols of this library are public - * to all libraries loaded after this library. - * At the moment only implemented in unix. - */ -#define DSO_FLAG_GLOBAL_SYMBOLS 0x20 - - -typedef void (*DSO_FUNC_TYPE)(void); - -typedef struct dso_st DSO; - -/* The function prototype used for method functions (or caller-provided - * callbacks) that transform filenames. They are passed a DSO structure pointer - * (or NULL if they are to be used independantly of a DSO object) and a - * filename to transform. They should either return NULL (if there is an error - * condition) or a newly allocated string containing the transformed form that - * the caller will need to free with OPENSSL_free() when done. */ -typedef char* (*DSO_NAME_CONVERTER_FUNC)(DSO *, const char *); -/* The function prototype used for method functions (or caller-provided - * callbacks) that merge two file specifications. They are passed a - * DSO structure pointer (or NULL if they are to be used independantly of - * a DSO object) and two file specifications to merge. They should - * either return NULL (if there is an error condition) or a newly allocated - * string containing the result of merging that the caller will need - * to free with OPENSSL_free() when done. - * Here, merging means that bits and pieces are taken from each of the - * file specifications and added together in whatever fashion that is - * sensible for the DSO method in question. The only rule that really - * applies is that if the two specification contain pieces of the same - * type, the copy from the first string takes priority. One could see - * it as the first specification is the one given by the user and the - * second being a bunch of defaults to add on if they're missing in the - * first. */ -typedef char* (*DSO_MERGER_FUNC)(DSO *, const char *, const char *); - -typedef struct dso_meth_st - { - const char *name; - /* Loads a shared library, NB: new DSO_METHODs must ensure that a - * successful load populates the loaded_filename field, and likewise a - * successful unload OPENSSL_frees and NULLs it out. */ - int (*dso_load)(DSO *dso); - /* Unloads a shared library */ - int (*dso_unload)(DSO *dso); - /* Binds a variable */ - void *(*dso_bind_var)(DSO *dso, const char *symname); - /* Binds a function - assumes a return type of DSO_FUNC_TYPE. - * This should be cast to the real function prototype by the - * caller. Platforms that don't have compatible representations - * for different prototypes (this is possible within ANSI C) - * are highly unlikely to have shared libraries at all, let - * alone a DSO_METHOD implemented for them. */ - DSO_FUNC_TYPE (*dso_bind_func)(DSO *dso, const char *symname); - -/* I don't think this would actually be used in any circumstances. */ -#if 0 - /* Unbinds a variable */ - int (*dso_unbind_var)(DSO *dso, char *symname, void *symptr); - /* Unbinds a function */ - int (*dso_unbind_func)(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); -#endif - /* The generic (yuck) "ctrl()" function. NB: Negative return - * values (rather than zero) indicate errors. */ - long (*dso_ctrl)(DSO *dso, int cmd, long larg, void *parg); - /* The default DSO_METHOD-specific function for converting filenames to - * a canonical native form. */ - DSO_NAME_CONVERTER_FUNC dso_name_converter; - /* The default DSO_METHOD-specific function for converting filenames to - * a canonical native form. */ - DSO_MERGER_FUNC dso_merger; - - /* [De]Initialisation handlers. */ - int (*init)(DSO *dso); - int (*finish)(DSO *dso); - } DSO_METHOD; - -/**********************************************************************/ -/* The low-level handle type used to refer to a loaded shared library */ - -struct dso_st - { - DSO_METHOD *meth; - /* Standard dlopen uses a (void *). Win32 uses a HANDLE. VMS - * doesn't use anything but will need to cache the filename - * for use in the dso_bind handler. All in all, let each - * method control its own destiny. "Handles" and such go in - * a STACK. */ - STACK *meth_data; - int references; - int flags; - /* For use by applications etc ... use this for your bits'n'pieces, - * don't touch meth_data! */ - CRYPTO_EX_DATA ex_data; - /* If this callback function pointer is set to non-NULL, then it will - * be used in DSO_load() in place of meth->dso_name_converter. NB: This - * should normally set using DSO_set_name_converter(). */ - DSO_NAME_CONVERTER_FUNC name_converter; - /* If this callback function pointer is set to non-NULL, then it will - * be used in DSO_load() in place of meth->dso_merger. NB: This - * should normally set using DSO_set_merger(). */ - DSO_MERGER_FUNC merger; - /* This is populated with (a copy of) the platform-independant - * filename used for this DSO. */ - char *filename; - /* This is populated with (a copy of) the translated filename by which - * the DSO was actually loaded. It is NULL iff the DSO is not currently - * loaded. NB: This is here because the filename translation process - * may involve a callback being invoked more than once not only to - * convert to a platform-specific form, but also to try different - * filenames in the process of trying to perform a load. As such, this - * variable can be used to indicate (a) whether this DSO structure - * corresponds to a loaded library or not, and (b) the filename with - * which it was actually loaded. */ - char *loaded_filename; - }; - - -DSO * DSO_new(void); -DSO * DSO_new_method(DSO_METHOD *method); -int DSO_free(DSO *dso); -int DSO_flags(DSO *dso); -int DSO_up_ref(DSO *dso); -long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg); - -/* This function sets the DSO's name_converter callback. If it is non-NULL, - * then it will be used instead of the associated DSO_METHOD's function. If - * oldcb is non-NULL then it is set to the function pointer value being - * replaced. Return value is non-zero for success. */ -int DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb, - DSO_NAME_CONVERTER_FUNC *oldcb); -/* These functions can be used to get/set the platform-independant filename - * used for a DSO. NB: set will fail if the DSO is already loaded. */ -const char *DSO_get_filename(DSO *dso); -int DSO_set_filename(DSO *dso, const char *filename); -/* This function will invoke the DSO's name_converter callback to translate a - * filename, or if the callback isn't set it will instead use the DSO_METHOD's - * converter. If "filename" is NULL, the "filename" in the DSO itself will be - * used. If the DSO_FLAG_NO_NAME_TRANSLATION flag is set, then the filename is - * simply duplicated. NB: This function is usually called from within a - * DSO_METHOD during the processing of a DSO_load() call, and is exposed so that - * caller-created DSO_METHODs can do the same thing. A non-NULL return value - * will need to be OPENSSL_free()'d. */ -char *DSO_convert_filename(DSO *dso, const char *filename); -/* This function will invoke the DSO's merger callback to merge two file - * specifications, or if the callback isn't set it will instead use the - * DSO_METHOD's merger. A non-NULL return value will need to be - * OPENSSL_free()'d. */ -char *DSO_merge(DSO *dso, const char *filespec1, const char *filespec2); -/* If the DSO is currently loaded, this returns the filename that it was loaded - * under, otherwise it returns NULL. So it is also useful as a test as to - * whether the DSO is currently loaded. NB: This will not necessarily return - * the same value as DSO_convert_filename(dso, dso->filename), because the - * DSO_METHOD's load function may have tried a variety of filenames (with - * and/or without the aid of the converters) before settling on the one it - * actually loaded. */ -const char *DSO_get_loaded_filename(DSO *dso); - -void DSO_set_default_method(DSO_METHOD *meth); -DSO_METHOD *DSO_get_default_method(void); -DSO_METHOD *DSO_get_method(DSO *dso); -DSO_METHOD *DSO_set_method(DSO *dso, DSO_METHOD *meth); - -/* The all-singing all-dancing load function, you normally pass NULL - * for the first and third parameters. Use DSO_up and DSO_free for - * subsequent reference count handling. Any flags passed in will be set - * in the constructed DSO after its init() function but before the - * load operation. If 'dso' is non-NULL, 'flags' is ignored. */ -DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags); - -/* This function binds to a variable inside a shared library. */ -void *DSO_bind_var(DSO *dso, const char *symname); - -/* This function binds to a function inside a shared library. */ -DSO_FUNC_TYPE DSO_bind_func(DSO *dso, const char *symname); - -/* This method is the default, but will beg, borrow, or steal whatever - * method should be the default on any particular platform (including - * DSO_METH_null() if necessary). */ -DSO_METHOD *DSO_METHOD_openssl(void); - -/* This method is defined for all platforms - if a platform has no - * DSO support then this will be the only method! */ -DSO_METHOD *DSO_METHOD_null(void); - -/* If DSO_DLFCN is defined, the standard dlfcn.h-style functions - * (dlopen, dlclose, dlsym, etc) will be used and incorporated into - * this method. If not, this method will return NULL. */ -DSO_METHOD *DSO_METHOD_dlfcn(void); - -/* If DSO_DL is defined, the standard dl.h-style functions (shl_load, - * shl_unload, shl_findsym, etc) will be used and incorporated into - * this method. If not, this method will return NULL. */ -DSO_METHOD *DSO_METHOD_dl(void); - -/* If WIN32 is defined, use DLLs. If not, return NULL. */ -DSO_METHOD *DSO_METHOD_win32(void); - -/* If VMS is defined, use shared images. If not, return NULL. */ -DSO_METHOD *DSO_METHOD_vms(void); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_DSO_strings(void); - -/* Error codes for the DSO functions. */ - -/* Function codes. */ -#define DSO_F_DLFCN_BIND_FUNC 100 -#define DSO_F_DLFCN_BIND_VAR 101 -#define DSO_F_DLFCN_LOAD 102 -#define DSO_F_DLFCN_MERGER 130 -#define DSO_F_DLFCN_NAME_CONVERTER 123 -#define DSO_F_DLFCN_UNLOAD 103 -#define DSO_F_DL_BIND_FUNC 104 -#define DSO_F_DL_BIND_VAR 105 -#define DSO_F_DL_LOAD 106 -#define DSO_F_DL_MERGER 131 -#define DSO_F_DL_NAME_CONVERTER 124 -#define DSO_F_DL_UNLOAD 107 -#define DSO_F_DSO_BIND_FUNC 108 -#define DSO_F_DSO_BIND_VAR 109 -#define DSO_F_DSO_CONVERT_FILENAME 126 -#define DSO_F_DSO_CTRL 110 -#define DSO_F_DSO_FREE 111 -#define DSO_F_DSO_GET_FILENAME 127 -#define DSO_F_DSO_GET_LOADED_FILENAME 128 -#define DSO_F_DSO_LOAD 112 -#define DSO_F_DSO_MERGE 132 -#define DSO_F_DSO_NEW_METHOD 113 -#define DSO_F_DSO_SET_FILENAME 129 -#define DSO_F_DSO_SET_NAME_CONVERTER 122 -#define DSO_F_DSO_UP_REF 114 -#define DSO_F_VMS_BIND_SYM 115 -#define DSO_F_VMS_LOAD 116 -#define DSO_F_VMS_MERGER 133 -#define DSO_F_VMS_UNLOAD 117 -#define DSO_F_WIN32_BIND_FUNC 118 -#define DSO_F_WIN32_BIND_VAR 119 -#define DSO_F_WIN32_JOINER 135 -#define DSO_F_WIN32_LOAD 120 -#define DSO_F_WIN32_MERGER 134 -#define DSO_F_WIN32_NAME_CONVERTER 125 -#define DSO_F_WIN32_SPLITTER 136 -#define DSO_F_WIN32_UNLOAD 121 - -/* Reason codes. */ -#define DSO_R_CTRL_FAILED 100 -#define DSO_R_DSO_ALREADY_LOADED 110 -#define DSO_R_EMPTY_FILE_STRUCTURE 113 -#define DSO_R_FAILURE 114 -#define DSO_R_FILENAME_TOO_BIG 101 -#define DSO_R_FINISH_FAILED 102 -#define DSO_R_INCORRECT_FILE_SYNTAX 115 -#define DSO_R_LOAD_FAILED 103 -#define DSO_R_NAME_TRANSLATION_FAILED 109 -#define DSO_R_NO_FILENAME 111 -#define DSO_R_NO_FILE_SPECIFICATION 116 -#define DSO_R_NULL_HANDLE 104 -#define DSO_R_SET_FILENAME_FAILED 112 -#define DSO_R_STACK_ERROR 105 -#define DSO_R_SYM_FAILURE 106 -#define DSO_R_UNLOAD_FAILED 107 -#define DSO_R_UNSUPPORTED 108 - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/dtls1.h b/externals/openssl/dtls1.h deleted file mode 100644 index f159d37110..0000000000 --- a/externals/openssl/dtls1.h +++ /dev/null @@ -1,218 +0,0 @@ -/* ssl/dtls1.h */ -/* - * DTLS implementation written by Nagendra Modadugu - * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. - */ -/* ==================================================================== - * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_DTLS1_H -#define HEADER_DTLS1_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define DTLS1_VERSION 0xFEFF -#define DTLS1_BAD_VER 0x0100 - -#if 0 -/* this alert description is not specified anywhere... */ -#define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 110 -#endif - -/* lengths of messages */ -#define DTLS1_COOKIE_LENGTH 32 - -#define DTLS1_RT_HEADER_LENGTH 13 - -#define DTLS1_HM_HEADER_LENGTH 12 - -#define DTLS1_HM_BAD_FRAGMENT -2 -#define DTLS1_HM_FRAGMENT_RETRY -3 - -#define DTLS1_CCS_HEADER_LENGTH 1 - -#ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE -#define DTLS1_AL_HEADER_LENGTH 7 -#else -#define DTLS1_AL_HEADER_LENGTH 2 -#endif - - -typedef struct dtls1_bitmap_st - { - PQ_64BIT map; - unsigned long length; /* sizeof the bitmap in bits */ - PQ_64BIT max_seq_num; /* max record number seen so far */ - } DTLS1_BITMAP; - -struct hm_header_st - { - unsigned char type; - unsigned long msg_len; - unsigned short seq; - unsigned long frag_off; - unsigned long frag_len; - unsigned int is_ccs; - }; - -struct ccs_header_st - { - unsigned char type; - unsigned short seq; - }; - -struct dtls1_timeout_st - { - /* Number of read timeouts so far */ - unsigned int read_timeouts; - - /* Number of write timeouts so far */ - unsigned int write_timeouts; - - /* Number of alerts received so far */ - unsigned int num_alerts; - }; - -typedef struct record_pqueue_st - { - unsigned short epoch; - pqueue q; - } record_pqueue; - -typedef struct hm_fragment_st - { - struct hm_header_st msg_header; - unsigned char *fragment; - } hm_fragment; - -typedef struct dtls1_state_st - { - unsigned int send_cookie; - unsigned char cookie[DTLS1_COOKIE_LENGTH]; - unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH]; - unsigned int cookie_len; - - /* - * The current data and handshake epoch. This is initially - * undefined, and starts at zero once the initial handshake is - * completed - */ - unsigned short r_epoch; - unsigned short w_epoch; - - /* records being received in the current epoch */ - DTLS1_BITMAP bitmap; - - /* renegotiation starts a new set of sequence numbers */ - DTLS1_BITMAP next_bitmap; - - /* handshake message numbers */ - unsigned short handshake_write_seq; - unsigned short next_handshake_write_seq; - - unsigned short handshake_read_seq; - - /* Received handshake records (processed and unprocessed) */ - record_pqueue unprocessed_rcds; - record_pqueue processed_rcds; - - /* Buffered handshake messages */ - pqueue buffered_messages; - - /* Buffered (sent) handshake records */ - pqueue sent_messages; - - unsigned int mtu; /* max wire packet size */ - - struct hm_header_st w_msg_hdr; - struct hm_header_st r_msg_hdr; - - struct dtls1_timeout_st timeout; - - /* storage for Alert/Handshake protocol data received but not - * yet processed by ssl3_read_bytes: */ - unsigned char alert_fragment[DTLS1_AL_HEADER_LENGTH]; - unsigned int alert_fragment_len; - unsigned char handshake_fragment[DTLS1_HM_HEADER_LENGTH]; - unsigned int handshake_fragment_len; - - unsigned int retransmitting; - - } DTLS1_STATE; - -typedef struct dtls1_record_data_st - { - unsigned char *packet; - unsigned int packet_length; - SSL3_BUFFER rbuf; - SSL3_RECORD rrec; - } DTLS1_RECORD_DATA; - - -/* Timeout multipliers (timeout slice is defined in apps/timeouts.h */ -#define DTLS1_TMO_READ_COUNT 2 -#define DTLS1_TMO_WRITE_COUNT 2 - -#define DTLS1_TMO_ALERT_COUNT 12 - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/e_os2.h b/externals/openssl/e_os2.h deleted file mode 100644 index 100265e237..0000000000 --- a/externals/openssl/e_os2.h +++ /dev/null @@ -1,280 +0,0 @@ -/* e_os2.h */ -/* ==================================================================== - * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#include - -#ifndef HEADER_E_OS2_H -#define HEADER_E_OS2_H - -#ifdef __cplusplus -extern "C" { -#endif - -/****************************************************************************** - * Detect operating systems. This probably needs completing. - * The result is that at least one OPENSSL_SYS_os macro should be defined. - * However, if none is defined, Unix is assumed. - **/ - -#define OPENSSL_SYS_UNIX - -/* ----------------------- Macintosh, before MacOS X ----------------------- */ -#if defined(__MWERKS__) && defined(macintosh) || defined(OPENSSL_SYSNAME_MAC) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_MACINTOSH_CLASSIC -#endif - -/* ----------------------- NetWare ----------------------------------------- */ -#if defined(NETWARE) || defined(OPENSSL_SYSNAME_NETWARE) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_NETWARE -#endif - -/* ---------------------- Microsoft operating systems ---------------------- */ - -/* Note that MSDOS actually denotes 32-bit environments running on top of - MS-DOS, such as DJGPP one. */ -#if defined(OPENSSL_SYSNAME_MSDOS) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_MSDOS -#endif - -/* For 32 bit environment, there seems to be the CygWin environment and then - all the others that try to do the same thing Microsoft does... */ -#if defined(OPENSSL_SYSNAME_UWIN) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WIN32_UWIN -#else -# if defined(__CYGWIN32__) || defined(OPENSSL_SYSNAME_CYGWIN32) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WIN32_CYGWIN -# else -# if defined(_WIN32) || defined(OPENSSL_SYSNAME_WIN32) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WIN32 -# endif -# if defined(OPENSSL_SYSNAME_WINNT) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WINNT -# endif -# if defined(OPENSSL_SYSNAME_WINCE) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WINCE -# endif -# endif -#endif - -/* Anything that tries to look like Microsoft is "Windows" */ -#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WINDOWS -# ifndef OPENSSL_SYS_MSDOS -# define OPENSSL_SYS_MSDOS -# endif -#endif - -/* DLL settings. This part is a bit tough, because it's up to the application - implementor how he or she will link the application, so it requires some - macro to be used. */ -#ifdef OPENSSL_SYS_WINDOWS -# ifndef OPENSSL_OPT_WINDLL -# if defined(_WINDLL) /* This is used when building OpenSSL to indicate that - DLL linkage should be used */ -# define OPENSSL_OPT_WINDLL -# endif -# endif -#endif - -/* -------------------------------- OpenVMS -------------------------------- */ -#if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYSNAME_VMS) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_VMS -# if defined(__DECC) -# define OPENSSL_SYS_VMS_DECC -# elif defined(__DECCXX) -# define OPENSSL_SYS_VMS_DECC -# define OPENSSL_SYS_VMS_DECCXX -# else -# define OPENSSL_SYS_VMS_NODECC -# endif -#endif - -/* --------------------------------- OS/2 ---------------------------------- */ -#if defined(__EMX__) || defined(__OS2__) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_OS2 -#endif - -/* --------------------------------- Unix ---------------------------------- */ -#ifdef OPENSSL_SYS_UNIX -# if defined(linux) || defined(__linux__) || defined(OPENSSL_SYSNAME_LINUX) -# define OPENSSL_SYS_LINUX -# endif -# ifdef OPENSSL_SYSNAME_MPE -# define OPENSSL_SYS_MPE -# endif -# ifdef OPENSSL_SYSNAME_SNI -# define OPENSSL_SYS_SNI -# endif -# ifdef OPENSSL_SYSNAME_ULTRASPARC -# define OPENSSL_SYS_ULTRASPARC -# endif -# ifdef OPENSSL_SYSNAME_NEWS4 -# define OPENSSL_SYS_NEWS4 -# endif -# ifdef OPENSSL_SYSNAME_MACOSX -# define OPENSSL_SYS_MACOSX -# endif -# ifdef OPENSSL_SYSNAME_MACOSX_RHAPSODY -# define OPENSSL_SYS_MACOSX_RHAPSODY -# define OPENSSL_SYS_MACOSX -# endif -# ifdef OPENSSL_SYSNAME_SUNOS -# define OPENSSL_SYS_SUNOS -#endif -# if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY) -# define OPENSSL_SYS_CRAY -# endif -# if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX) -# define OPENSSL_SYS_AIX -# endif -#endif - -/* --------------------------------- VOS ----------------------------------- */ -#ifdef OPENSSL_SYSNAME_VOS -# define OPENSSL_SYS_VOS -#endif - -/* ------------------------------- VxWorks --------------------------------- */ -#ifdef OPENSSL_SYSNAME_VXWORKS -# define OPENSSL_SYS_VXWORKS -#endif - -/** - * That's it for OS-specific stuff - *****************************************************************************/ - - -/* Specials for I/O an exit */ -#ifdef OPENSSL_SYS_MSDOS -# define OPENSSL_UNISTD_IO -# define OPENSSL_DECLARE_EXIT extern void exit(int); -#else -# define OPENSSL_UNISTD_IO OPENSSL_UNISTD -# define OPENSSL_DECLARE_EXIT /* declared in unistd.h */ -#endif - -/* Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare - certain global symbols that, with some compilers under VMS, have to be - defined and declared explicitely with globaldef and globalref. - Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare - DLL exports and imports for compilers under Win32. These are a little - more complicated to use. Basically, for any library that exports some - global variables, the following code must be present in the header file - that declares them, before OPENSSL_EXTERN is used: - - #ifdef SOME_BUILD_FLAG_MACRO - # undef OPENSSL_EXTERN - # define OPENSSL_EXTERN OPENSSL_EXPORT - #endif - - The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL - have some generally sensible values, and for OPENSSL_EXTERN to have the - value OPENSSL_IMPORT. -*/ - -#if defined(OPENSSL_SYS_VMS_NODECC) -# define OPENSSL_EXPORT globalref -# define OPENSSL_IMPORT globalref -# define OPENSSL_GLOBAL globaldef -#elif defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL) -# define OPENSSL_EXPORT extern __declspec(dllexport) -# define OPENSSL_IMPORT extern __declspec(dllimport) -# define OPENSSL_GLOBAL -#else -# define OPENSSL_EXPORT extern -# define OPENSSL_IMPORT extern -# define OPENSSL_GLOBAL -#endif -#define OPENSSL_EXTERN OPENSSL_IMPORT - -/* Macros to allow global variables to be reached through function calls when - required (if a shared library version requvres it, for example. - The way it's done allows definitions like this: - - // in foobar.c - OPENSSL_IMPLEMENT_GLOBAL(int,foobar) = 0; - // in foobar.h - OPENSSL_DECLARE_GLOBAL(int,foobar); - #define foobar OPENSSL_GLOBAL_REF(foobar) -*/ -#ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION -# define OPENSSL_IMPLEMENT_GLOBAL(type,name) \ - extern type _hide_##name; \ - type *_shadow_##name(void) { return &_hide_##name; } \ - static type _hide_##name -# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) -# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) -#else -# define OPENSSL_IMPLEMENT_GLOBAL(type,name) OPENSSL_GLOBAL type _shadow_##name -# define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name -# define OPENSSL_GLOBAL_REF(name) _shadow_##name -#endif - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/ebcdic.h b/externals/openssl/ebcdic.h deleted file mode 100644 index e970f12936..0000000000 --- a/externals/openssl/ebcdic.h +++ /dev/null @@ -1,20 +0,0 @@ -/* crypto/ebcdic.h */ - -#ifndef HEADER_EBCDIC_H -#define HEADER_EBCDIC_H - -#include - -/* Avoid name clashes with other applications */ -#define os_toascii _openssl_os_toascii -#define os_toebcdic _openssl_os_toebcdic -#define ebcdic2ascii _openssl_ebcdic2ascii -#define ascii2ebcdic _openssl_ascii2ebcdic - -extern const unsigned char os_toascii[256]; -extern const unsigned char os_toebcdic[256]; -void *ebcdic2ascii(void *dest, const void *srce, size_t count); -void *ascii2ebcdic(void *dest, const void *srce, size_t count); - -#endif - diff --git a/externals/openssl/ec.h b/externals/openssl/ec.h deleted file mode 100644 index 8bc2a235b1..0000000000 --- a/externals/openssl/ec.h +++ /dev/null @@ -1,526 +0,0 @@ -/* crypto/ec/ec.h */ -/* - * Originally written by Bodo Moeller for the OpenSSL project. - */ -/* ==================================================================== - * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * - * Portions of the attached software ("Contribution") are developed by - * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. - * - * The Contribution is licensed pursuant to the OpenSSL open source - * license provided above. - * - * The elliptic curve binary polynomial software is originally written by - * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. - * - */ - -#ifndef HEADER_EC_H -#define HEADER_EC_H - -#include - -#ifdef OPENSSL_NO_EC -#error EC is disabled. -#endif - -#include -#include -#ifndef OPENSSL_NO_DEPRECATED -#include -#endif - -#ifdef __cplusplus -extern "C" { -#elif defined(__SUNPRO_C) -# if __SUNPRO_C >= 0x520 -# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE) -# endif -#endif - - -#ifndef OPENSSL_ECC_MAX_FIELD_BITS -# define OPENSSL_ECC_MAX_FIELD_BITS 661 -#endif - -typedef enum { - /* values as defined in X9.62 (ECDSA) and elsewhere */ - POINT_CONVERSION_COMPRESSED = 2, - POINT_CONVERSION_UNCOMPRESSED = 4, - POINT_CONVERSION_HYBRID = 6 -} point_conversion_form_t; - - -typedef struct ec_method_st EC_METHOD; - -typedef struct ec_group_st - /* - EC_METHOD *meth; - -- field definition - -- curve coefficients - -- optional generator with associated information (order, cofactor) - -- optional extra data (precomputed table for fast computation of multiples of generator) - -- ASN1 stuff - */ - EC_GROUP; - -typedef struct ec_point_st EC_POINT; - - -/* EC_METHODs for curves over GF(p). - * EC_GFp_simple_method provides the basis for the optimized methods. - */ -const EC_METHOD *EC_GFp_simple_method(void); -const EC_METHOD *EC_GFp_mont_method(void); -const EC_METHOD *EC_GFp_nist_method(void); - -/* EC_METHOD for curves over GF(2^m). - */ -const EC_METHOD *EC_GF2m_simple_method(void); - - -EC_GROUP *EC_GROUP_new(const EC_METHOD *); -void EC_GROUP_free(EC_GROUP *); -void EC_GROUP_clear_free(EC_GROUP *); -int EC_GROUP_copy(EC_GROUP *, const EC_GROUP *); -EC_GROUP *EC_GROUP_dup(const EC_GROUP *); - -const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *); -int EC_METHOD_get_field_type(const EC_METHOD *); - -int EC_GROUP_set_generator(EC_GROUP *, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor); -const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *); -int EC_GROUP_get_order(const EC_GROUP *, BIGNUM *order, BN_CTX *); -int EC_GROUP_get_cofactor(const EC_GROUP *, BIGNUM *cofactor, BN_CTX *); - -void EC_GROUP_set_curve_name(EC_GROUP *, int nid); -int EC_GROUP_get_curve_name(const EC_GROUP *); - -void EC_GROUP_set_asn1_flag(EC_GROUP *, int flag); -int EC_GROUP_get_asn1_flag(const EC_GROUP *); - -void EC_GROUP_set_point_conversion_form(EC_GROUP *, point_conversion_form_t); -point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *); - -unsigned char *EC_GROUP_get0_seed(const EC_GROUP *); -size_t EC_GROUP_get_seed_len(const EC_GROUP *); -size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len); - -int EC_GROUP_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); -int EC_GROUP_get_curve_GFp(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); -int EC_GROUP_set_curve_GF2m(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); -int EC_GROUP_get_curve_GF2m(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); - -/* returns the number of bits needed to represent a field element */ -int EC_GROUP_get_degree(const EC_GROUP *); - -/* EC_GROUP_check() returns 1 if 'group' defines a valid group, 0 otherwise */ -int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx); -/* EC_GROUP_check_discriminant() returns 1 if the discriminant of the - * elliptic curve is not zero, 0 otherwise */ -int EC_GROUP_check_discriminant(const EC_GROUP *, BN_CTX *); - -/* EC_GROUP_cmp() returns 0 if both groups are equal and 1 otherwise */ -int EC_GROUP_cmp(const EC_GROUP *, const EC_GROUP *, BN_CTX *); - -/* EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() - * after choosing an appropriate EC_METHOD */ -EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); -EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); - -/* EC_GROUP_new_by_curve_name() creates a EC_GROUP structure - * specified by a curve name (in form of a NID) */ -EC_GROUP *EC_GROUP_new_by_curve_name(int nid); -/* handling of internal curves */ -typedef struct { - int nid; - const char *comment; - } EC_builtin_curve; -/* EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number - * of all available curves or zero if a error occurred. - * In case r ist not zero nitems EC_builtin_curve structures - * are filled with the data of the first nitems internal groups */ -size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems); - - -/* EC_POINT functions */ - -EC_POINT *EC_POINT_new(const EC_GROUP *); -void EC_POINT_free(EC_POINT *); -void EC_POINT_clear_free(EC_POINT *); -int EC_POINT_copy(EC_POINT *, const EC_POINT *); -EC_POINT *EC_POINT_dup(const EC_POINT *, const EC_GROUP *); - -const EC_METHOD *EC_POINT_method_of(const EC_POINT *); - -int EC_POINT_set_to_infinity(const EC_GROUP *, EC_POINT *); -int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *, EC_POINT *, - const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *); -int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *, const EC_POINT *, - BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *); -int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *, EC_POINT *, - const BIGNUM *x, const BIGNUM *y, BN_CTX *); -int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *, const EC_POINT *, - BIGNUM *x, BIGNUM *y, BN_CTX *); -int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *, EC_POINT *, - const BIGNUM *x, int y_bit, BN_CTX *); - -int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *, EC_POINT *, - const BIGNUM *x, const BIGNUM *y, BN_CTX *); -int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *, const EC_POINT *, - BIGNUM *x, BIGNUM *y, BN_CTX *); -int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *, EC_POINT *, - const BIGNUM *x, int y_bit, BN_CTX *); - -size_t EC_POINT_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, - unsigned char *buf, size_t len, BN_CTX *); -int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *, - const unsigned char *buf, size_t len, BN_CTX *); - -/* other interfaces to point2oct/oct2point: */ -BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *, - point_conversion_form_t form, BIGNUM *, BN_CTX *); -EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *, - EC_POINT *, BN_CTX *); -char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *, - point_conversion_form_t form, BN_CTX *); -EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *, - EC_POINT *, BN_CTX *); - -int EC_POINT_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *); -int EC_POINT_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *); -int EC_POINT_invert(const EC_GROUP *, EC_POINT *, BN_CTX *); - -int EC_POINT_is_at_infinity(const EC_GROUP *, const EC_POINT *); -int EC_POINT_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *); -int EC_POINT_cmp(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b, BN_CTX *); - -int EC_POINT_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *); -int EC_POINTs_make_affine(const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *); - - -int EC_POINTs_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, size_t num, const EC_POINT *[], const BIGNUM *[], BN_CTX *); -int EC_POINT_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, const EC_POINT *, const BIGNUM *, BN_CTX *); - -/* EC_GROUP_precompute_mult() stores multiples of generator for faster point multiplication */ -int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *); -/* EC_GROUP_have_precompute_mult() reports whether such precomputation has been done */ -int EC_GROUP_have_precompute_mult(const EC_GROUP *); - - - -/* ASN1 stuff */ - -/* EC_GROUP_get_basis_type() returns the NID of the basis type - * used to represent the field elements */ -int EC_GROUP_get_basis_type(const EC_GROUP *); -int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k); -int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1, - unsigned int *k2, unsigned int *k3); - -#define OPENSSL_EC_NAMED_CURVE 0x001 - -typedef struct ecpk_parameters_st ECPKPARAMETERS; - -EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len); -int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out); - -#define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x) -#define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x) -#define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \ - (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x)) -#define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \ - (unsigned char *)(x)) - -#ifndef OPENSSL_NO_BIO -int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off); -#endif -#ifndef OPENSSL_NO_FP_API -int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off); -#endif - -/* the EC_KEY stuff */ -typedef struct ec_key_st EC_KEY; - -/* some values for the encoding_flag */ -#define EC_PKEY_NO_PARAMETERS 0x001 -#define EC_PKEY_NO_PUBKEY 0x002 - -EC_KEY *EC_KEY_new(void); -EC_KEY *EC_KEY_new_by_curve_name(int nid); -void EC_KEY_free(EC_KEY *); -EC_KEY *EC_KEY_copy(EC_KEY *, const EC_KEY *); -EC_KEY *EC_KEY_dup(const EC_KEY *); - -int EC_KEY_up_ref(EC_KEY *); - -const EC_GROUP *EC_KEY_get0_group(const EC_KEY *); -int EC_KEY_set_group(EC_KEY *, const EC_GROUP *); -const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *); -int EC_KEY_set_private_key(EC_KEY *, const BIGNUM *); -const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *); -int EC_KEY_set_public_key(EC_KEY *, const EC_POINT *); -unsigned EC_KEY_get_enc_flags(const EC_KEY *); -void EC_KEY_set_enc_flags(EC_KEY *, unsigned int); -point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *); -void EC_KEY_set_conv_form(EC_KEY *, point_conversion_form_t); -/* functions to set/get method specific data */ -void *EC_KEY_get_key_method_data(EC_KEY *, - void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *)); -void EC_KEY_insert_key_method_data(EC_KEY *, void *data, - void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *)); -/* wrapper functions for the underlying EC_GROUP object */ -void EC_KEY_set_asn1_flag(EC_KEY *, int); -int EC_KEY_precompute_mult(EC_KEY *, BN_CTX *ctx); - -/* EC_KEY_generate_key() creates a ec private (public) key */ -int EC_KEY_generate_key(EC_KEY *); -/* EC_KEY_check_key() */ -int EC_KEY_check_key(const EC_KEY *); - -/* de- and encoding functions for SEC1 ECPrivateKey */ -EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len); -int i2d_ECPrivateKey(EC_KEY *a, unsigned char **out); -/* de- and encoding functions for EC parameters */ -EC_KEY *d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len); -int i2d_ECParameters(EC_KEY *a, unsigned char **out); -/* de- and encoding functions for EC public key - * (octet string, not DER -- hence 'o2i' and 'i2o') */ -EC_KEY *o2i_ECPublicKey(EC_KEY **a, const unsigned char **in, long len); -int i2o_ECPublicKey(EC_KEY *a, unsigned char **out); - -#ifndef OPENSSL_NO_BIO -int ECParameters_print(BIO *bp, const EC_KEY *x); -int EC_KEY_print(BIO *bp, const EC_KEY *x, int off); -#endif -#ifndef OPENSSL_NO_FP_API -int ECParameters_print_fp(FILE *fp, const EC_KEY *x); -int EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off); -#endif - -#define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x) - -#ifndef __cplusplus -#if defined(__SUNPRO_C) -# if __SUNPRO_C >= 0x520 -# pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE) -# endif -# endif -#endif - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_EC_strings(void); - -/* Error codes for the EC functions. */ - -/* Function codes. */ -#define EC_F_COMPUTE_WNAF 143 -#define EC_F_D2I_ECPARAMETERS 144 -#define EC_F_D2I_ECPKPARAMETERS 145 -#define EC_F_D2I_ECPRIVATEKEY 146 -#define EC_F_ECPARAMETERS_PRINT 147 -#define EC_F_ECPARAMETERS_PRINT_FP 148 -#define EC_F_ECPKPARAMETERS_PRINT 149 -#define EC_F_ECPKPARAMETERS_PRINT_FP 150 -#define EC_F_ECP_NIST_MOD_192 203 -#define EC_F_ECP_NIST_MOD_224 204 -#define EC_F_ECP_NIST_MOD_256 205 -#define EC_F_ECP_NIST_MOD_521 206 -#define EC_F_EC_ASN1_GROUP2CURVE 153 -#define EC_F_EC_ASN1_GROUP2FIELDID 154 -#define EC_F_EC_ASN1_GROUP2PARAMETERS 155 -#define EC_F_EC_ASN1_GROUP2PKPARAMETERS 156 -#define EC_F_EC_ASN1_PARAMETERS2GROUP 157 -#define EC_F_EC_ASN1_PKPARAMETERS2GROUP 158 -#define EC_F_EC_EX_DATA_SET_DATA 211 -#define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY 208 -#define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT 159 -#define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE 195 -#define EC_F_EC_GF2M_SIMPLE_OCT2POINT 160 -#define EC_F_EC_GF2M_SIMPLE_POINT2OCT 161 -#define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 162 -#define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 163 -#define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES 164 -#define EC_F_EC_GFP_MONT_FIELD_DECODE 133 -#define EC_F_EC_GFP_MONT_FIELD_ENCODE 134 -#define EC_F_EC_GFP_MONT_FIELD_MUL 131 -#define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE 209 -#define EC_F_EC_GFP_MONT_FIELD_SQR 132 -#define EC_F_EC_GFP_MONT_GROUP_SET_CURVE 189 -#define EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP 135 -#define EC_F_EC_GFP_NIST_FIELD_MUL 200 -#define EC_F_EC_GFP_NIST_FIELD_SQR 201 -#define EC_F_EC_GFP_NIST_GROUP_SET_CURVE 202 -#define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 165 -#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE 166 -#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP 100 -#define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR 101 -#define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102 -#define EC_F_EC_GFP_SIMPLE_OCT2POINT 103 -#define EC_F_EC_GFP_SIMPLE_POINT2OCT 104 -#define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137 -#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES 167 -#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105 -#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES 168 -#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128 -#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES 169 -#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129 -#define EC_F_EC_GROUP_CHECK 170 -#define EC_F_EC_GROUP_CHECK_DISCRIMINANT 171 -#define EC_F_EC_GROUP_COPY 106 -#define EC_F_EC_GROUP_GET0_GENERATOR 139 -#define EC_F_EC_GROUP_GET_COFACTOR 140 -#define EC_F_EC_GROUP_GET_CURVE_GF2M 172 -#define EC_F_EC_GROUP_GET_CURVE_GFP 130 -#define EC_F_EC_GROUP_GET_DEGREE 173 -#define EC_F_EC_GROUP_GET_ORDER 141 -#define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS 193 -#define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS 194 -#define EC_F_EC_GROUP_NEW 108 -#define EC_F_EC_GROUP_NEW_BY_CURVE_NAME 174 -#define EC_F_EC_GROUP_NEW_FROM_DATA 175 -#define EC_F_EC_GROUP_PRECOMPUTE_MULT 142 -#define EC_F_EC_GROUP_SET_CURVE_GF2M 176 -#define EC_F_EC_GROUP_SET_CURVE_GFP 109 -#define EC_F_EC_GROUP_SET_EXTRA_DATA 110 -#define EC_F_EC_GROUP_SET_GENERATOR 111 -#define EC_F_EC_KEY_CHECK_KEY 177 -#define EC_F_EC_KEY_COPY 178 -#define EC_F_EC_KEY_GENERATE_KEY 179 -#define EC_F_EC_KEY_NEW 182 -#define EC_F_EC_KEY_PRINT 180 -#define EC_F_EC_KEY_PRINT_FP 181 -#define EC_F_EC_POINTS_MAKE_AFFINE 136 -#define EC_F_EC_POINTS_MUL 138 -#define EC_F_EC_POINT_ADD 112 -#define EC_F_EC_POINT_CMP 113 -#define EC_F_EC_POINT_COPY 114 -#define EC_F_EC_POINT_DBL 115 -#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M 183 -#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116 -#define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117 -#define EC_F_EC_POINT_INVERT 210 -#define EC_F_EC_POINT_IS_AT_INFINITY 118 -#define EC_F_EC_POINT_IS_ON_CURVE 119 -#define EC_F_EC_POINT_MAKE_AFFINE 120 -#define EC_F_EC_POINT_MUL 184 -#define EC_F_EC_POINT_NEW 121 -#define EC_F_EC_POINT_OCT2POINT 122 -#define EC_F_EC_POINT_POINT2OCT 123 -#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 185 -#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124 -#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M 186 -#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125 -#define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126 -#define EC_F_EC_POINT_SET_TO_INFINITY 127 -#define EC_F_EC_PRE_COMP_DUP 207 -#define EC_F_EC_PRE_COMP_NEW 196 -#define EC_F_EC_WNAF_MUL 187 -#define EC_F_EC_WNAF_PRECOMPUTE_MULT 188 -#define EC_F_I2D_ECPARAMETERS 190 -#define EC_F_I2D_ECPKPARAMETERS 191 -#define EC_F_I2D_ECPRIVATEKEY 192 -#define EC_F_I2O_ECPUBLICKEY 151 -#define EC_F_O2I_ECPUBLICKEY 152 - -/* Reason codes. */ -#define EC_R_ASN1_ERROR 115 -#define EC_R_ASN1_UNKNOWN_FIELD 116 -#define EC_R_BUFFER_TOO_SMALL 100 -#define EC_R_D2I_ECPKPARAMETERS_FAILURE 117 -#define EC_R_DISCRIMINANT_IS_ZERO 118 -#define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 119 -#define EC_R_FIELD_TOO_LARGE 138 -#define EC_R_GROUP2PKPARAMETERS_FAILURE 120 -#define EC_R_I2D_ECPKPARAMETERS_FAILURE 121 -#define EC_R_INCOMPATIBLE_OBJECTS 101 -#define EC_R_INVALID_ARGUMENT 112 -#define EC_R_INVALID_COMPRESSED_POINT 110 -#define EC_R_INVALID_COMPRESSION_BIT 109 -#define EC_R_INVALID_ENCODING 102 -#define EC_R_INVALID_FIELD 103 -#define EC_R_INVALID_FORM 104 -#define EC_R_INVALID_GROUP_ORDER 122 -#define EC_R_INVALID_PENTANOMIAL_BASIS 132 -#define EC_R_INVALID_PRIVATE_KEY 123 -#define EC_R_INVALID_TRINOMIAL_BASIS 137 -#define EC_R_MISSING_PARAMETERS 124 -#define EC_R_MISSING_PRIVATE_KEY 125 -#define EC_R_NOT_A_NIST_PRIME 135 -#define EC_R_NOT_A_SUPPORTED_NIST_PRIME 136 -#define EC_R_NOT_IMPLEMENTED 126 -#define EC_R_NOT_INITIALIZED 111 -#define EC_R_NO_FIELD_MOD 133 -#define EC_R_PASSED_NULL_PARAMETER 134 -#define EC_R_PKPARAMETERS2GROUP_FAILURE 127 -#define EC_R_POINT_AT_INFINITY 106 -#define EC_R_POINT_IS_NOT_ON_CURVE 107 -#define EC_R_SLOT_FULL 108 -#define EC_R_UNDEFINED_GENERATOR 113 -#define EC_R_UNDEFINED_ORDER 128 -#define EC_R_UNKNOWN_GROUP 129 -#define EC_R_UNKNOWN_ORDER 114 -#define EC_R_UNSUPPORTED_FIELD 131 -#define EC_R_WRONG_ORDER 130 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/ecdh.h b/externals/openssl/ecdh.h deleted file mode 100644 index ee07aa0503..0000000000 --- a/externals/openssl/ecdh.h +++ /dev/null @@ -1,124 +0,0 @@ -/* crypto/ecdh/ecdh.h */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * - * The Elliptic Curve Public-Key Crypto Library (ECC Code) included - * herein is developed by SUN MICROSYSTEMS, INC., and is contributed - * to the OpenSSL project. - * - * The ECC Code is licensed pursuant to the OpenSSL open source - * license provided below. - * - * The ECDH software is originally written by Douglas Stebila of - * Sun Microsystems Laboratories. - * - */ -/* ==================================================================== - * Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -#ifndef HEADER_ECDH_H -#define HEADER_ECDH_H - -#include - -#ifdef OPENSSL_NO_ECDH -#error ECDH is disabled. -#endif - -#include -#include -#ifndef OPENSSL_NO_DEPRECATED -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -const ECDH_METHOD *ECDH_OpenSSL(void); - -void ECDH_set_default_method(const ECDH_METHOD *); -const ECDH_METHOD *ECDH_get_default_method(void); -int ECDH_set_method(EC_KEY *, const ECDH_METHOD *); - -int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, - void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); - -int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new - *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg); -void *ECDH_get_ex_data(EC_KEY *d, int idx); - - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_ECDH_strings(void); - -/* Error codes for the ECDH functions. */ - -/* Function codes. */ -#define ECDH_F_ECDH_COMPUTE_KEY 100 -#define ECDH_F_ECDH_DATA_NEW_METHOD 101 - -/* Reason codes. */ -#define ECDH_R_KDF_FAILED 102 -#define ECDH_R_NO_PRIVATE_VALUE 100 -#define ECDH_R_POINT_ARITHMETIC_FAILURE 101 - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/ecdsa.h b/externals/openssl/ecdsa.h deleted file mode 100644 index 1f85df7fa2..0000000000 --- a/externals/openssl/ecdsa.h +++ /dev/null @@ -1,272 +0,0 @@ -/* crypto/ecdsa/ecdsa.h */ -/** - * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions - * \author Written by Nils Larsch for the OpenSSL project - */ -/* ==================================================================== - * Copyright (c) 2000-2003 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -#ifndef HEADER_ECDSA_H -#define HEADER_ECDSA_H - -#include - -#ifdef OPENSSL_NO_ECDSA -#error ECDSA is disabled. -#endif - -#include -#include -#ifndef OPENSSL_NO_DEPRECATED -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct ECDSA_SIG_st - { - BIGNUM *r; - BIGNUM *s; - } ECDSA_SIG; - -/** ECDSA_SIG *ECDSA_SIG_new(void) - * allocates and initialize a ECDSA_SIG structure - * \return pointer to a ECDSA_SIG structure or NULL if an error occurred - */ -ECDSA_SIG *ECDSA_SIG_new(void); - -/** ECDSA_SIG_free - * frees a ECDSA_SIG structure - * \param a pointer to the ECDSA_SIG structure - */ -void ECDSA_SIG_free(ECDSA_SIG *a); - -/** i2d_ECDSA_SIG - * DER encode content of ECDSA_SIG object (note: this function modifies *pp - * (*pp += length of the DER encoded signature)). - * \param a pointer to the ECDSA_SIG object - * \param pp pointer to a unsigned char pointer for the output or NULL - * \return the length of the DER encoded ECDSA_SIG object or 0 - */ -int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **pp); - -/** d2i_ECDSA_SIG - * decodes a DER encoded ECDSA signature (note: this function changes *pp - * (*pp += len)). - * \param v pointer to ECDSA_SIG pointer (may be NULL) - * \param pp buffer with the DER encoded signature - * \param len bufferlength - * \return pointer to the decoded ECDSA_SIG structure (or NULL) - */ -ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **v, const unsigned char **pp, long len); - -/** ECDSA_do_sign - * computes the ECDSA signature of the given hash value using - * the supplied private key and returns the created signature. - * \param dgst pointer to the hash value - * \param dgst_len length of the hash value - * \param eckey pointer to the EC_KEY object containing a private EC key - * \return pointer to a ECDSA_SIG structure or NULL - */ -ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst,int dgst_len,EC_KEY *eckey); - -/** ECDSA_do_sign_ex - * computes ECDSA signature of a given hash value using the supplied - * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). - * \param dgst pointer to the hash value to sign - * \param dgstlen length of the hash value - * \param kinv optional pointer to a pre-computed inverse k - * \param rp optional pointer to the pre-computed rp value (see - * ECDSA_sign_setup - * \param eckey pointer to the EC_KEY object containing a private EC key - * \return pointer to a ECDSA_SIG structure or NULL - */ -ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen, - const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey); - -/** ECDSA_do_verify - * verifies that the supplied signature is a valid ECDSA - * signature of the supplied hash value using the supplied public key. - * \param dgst pointer to the hash value - * \param dgst_len length of the hash value - * \param sig pointer to the ECDSA_SIG structure - * \param eckey pointer to the EC_KEY object containing a public EC key - * \return 1 if the signature is valid, 0 if the signature is invalid and -1 on error - */ -int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, - const ECDSA_SIG *sig, EC_KEY* eckey); - -const ECDSA_METHOD *ECDSA_OpenSSL(void); - -/** ECDSA_set_default_method - * sets the default ECDSA method - * \param meth the new default ECDSA_METHOD - */ -void ECDSA_set_default_method(const ECDSA_METHOD *meth); - -/** ECDSA_get_default_method - * returns the default ECDSA method - * \return pointer to ECDSA_METHOD structure containing the default method - */ -const ECDSA_METHOD *ECDSA_get_default_method(void); - -/** ECDSA_set_method - * sets method to be used for the ECDSA operations - * \param eckey pointer to the EC_KEY object - * \param meth pointer to the new method - * \return 1 on success and 0 otherwise - */ -int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth); - -/** ECDSA_size - * returns the maximum length of the DER encoded signature - * \param eckey pointer to a EC_KEY object - * \return numbers of bytes required for the DER encoded signature - */ -int ECDSA_size(const EC_KEY *eckey); - -/** ECDSA_sign_setup - * precompute parts of the signing operation. - * \param eckey pointer to the EC_KEY object containing a private EC key - * \param ctx pointer to a BN_CTX object (may be NULL) - * \param kinv pointer to a BIGNUM pointer for the inverse of k - * \param rp pointer to a BIGNUM pointer for x coordinate of k * generator - * \return 1 on success and 0 otherwise - */ -int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, - BIGNUM **rp); - -/** ECDSA_sign - * computes ECDSA signature of a given hash value using the supplied - * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). - * \param type this parameter is ignored - * \param dgst pointer to the hash value to sign - * \param dgstlen length of the hash value - * \param sig buffer to hold the DER encoded signature - * \param siglen pointer to the length of the returned signature - * \param eckey pointer to the EC_KEY object containing a private EC key - * \return 1 on success and 0 otherwise - */ -int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen, - unsigned char *sig, unsigned int *siglen, EC_KEY *eckey); - - -/** ECDSA_sign_ex - * computes ECDSA signature of a given hash value using the supplied - * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). - * \param type this parameter is ignored - * \param dgst pointer to the hash value to sign - * \param dgstlen length of the hash value - * \param sig buffer to hold the DER encoded signature - * \param siglen pointer to the length of the returned signature - * \param kinv optional pointer to a pre-computed inverse k - * \param rp optional pointer to the pre-computed rp value (see - * ECDSA_sign_setup - * \param eckey pointer to the EC_KEY object containing a private EC key - * \return 1 on success and 0 otherwise - */ -int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen, - unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv, - const BIGNUM *rp, EC_KEY *eckey); - -/** ECDSA_verify - * verifies that the given signature is valid ECDSA signature - * of the supplied hash value using the specified public key. - * \param type this parameter is ignored - * \param dgst pointer to the hash value - * \param dgstlen length of the hash value - * \param sig pointer to the DER encoded signature - * \param siglen length of the DER encoded signature - * \param eckey pointer to the EC_KEY object containing a public EC key - * \return 1 if the signature is valid, 0 if the signature is invalid and -1 on error - */ -int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen, - const unsigned char *sig, int siglen, EC_KEY *eckey); - -/* the standard ex_data functions */ -int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new - *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg); -void *ECDSA_get_ex_data(EC_KEY *d, int idx); - - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_ECDSA_strings(void); - -/* Error codes for the ECDSA functions. */ - -/* Function codes. */ -#define ECDSA_F_ECDSA_DATA_NEW_METHOD 100 -#define ECDSA_F_ECDSA_DO_SIGN 101 -#define ECDSA_F_ECDSA_DO_VERIFY 102 -#define ECDSA_F_ECDSA_SIGN_SETUP 103 - -/* Reason codes. */ -#define ECDSA_R_BAD_SIGNATURE 100 -#define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 101 -#define ECDSA_R_ERR_EC_LIB 102 -#define ECDSA_R_MISSING_PARAMETERS 103 -#define ECDSA_R_NEED_NEW_SETUP_VALUES 106 -#define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104 -#define ECDSA_R_SIGNATURE_MALLOC_FAILED 105 - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/engine.h b/externals/openssl/engine.h deleted file mode 100644 index f503595ece..0000000000 --- a/externals/openssl/engine.h +++ /dev/null @@ -1,801 +0,0 @@ -/* openssl/engine.h */ -/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL - * project 2000. - */ -/* ==================================================================== - * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECDH support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ - -#ifndef HEADER_ENGINE_H -#define HEADER_ENGINE_H - -#include - -#ifdef OPENSSL_NO_ENGINE -#error ENGINE is disabled. -#endif - -#ifndef OPENSSL_NO_DEPRECATED -#include -#ifndef OPENSSL_NO_RSA -#include -#endif -#ifndef OPENSSL_NO_DSA -#include -#endif -#ifndef OPENSSL_NO_DH -#include -#endif -#ifndef OPENSSL_NO_ECDH -#include -#endif -#ifndef OPENSSL_NO_ECDSA -#include -#endif -#include -#include -#include -#include -#endif - -#include - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* These flags are used to control combinations of algorithm (methods) - * by bitwise "OR"ing. */ -#define ENGINE_METHOD_RSA (unsigned int)0x0001 -#define ENGINE_METHOD_DSA (unsigned int)0x0002 -#define ENGINE_METHOD_DH (unsigned int)0x0004 -#define ENGINE_METHOD_RAND (unsigned int)0x0008 -#define ENGINE_METHOD_ECDH (unsigned int)0x0010 -#define ENGINE_METHOD_ECDSA (unsigned int)0x0020 -#define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 -#define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 -#define ENGINE_METHOD_STORE (unsigned int)0x0100 -/* Obvious all-or-nothing cases. */ -#define ENGINE_METHOD_ALL (unsigned int)0xFFFF -#define ENGINE_METHOD_NONE (unsigned int)0x0000 - -/* This(ese) flag(s) controls behaviour of the ENGINE_TABLE mechanism used - * internally to control registration of ENGINE implementations, and can be set - * by ENGINE_set_table_flags(). The "NOINIT" flag prevents attempts to - * initialise registered ENGINEs if they are not already initialised. */ -#define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x0001 - -/* ENGINE flags that can be set by ENGINE_set_flags(). */ -/* #define ENGINE_FLAGS_MALLOCED 0x0001 */ /* Not used */ - -/* This flag is for ENGINEs that wish to handle the various 'CMD'-related - * control commands on their own. Without this flag, ENGINE_ctrl() handles these - * control commands on behalf of the ENGINE using their "cmd_defns" data. */ -#define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x0002 - -/* This flag is for ENGINEs who return new duplicate structures when found via - * "ENGINE_by_id()". When an ENGINE must store state (eg. if ENGINE_ctrl() - * commands are called in sequence as part of some stateful process like - * key-generation setup and execution), it can set this flag - then each attempt - * to obtain the ENGINE will result in it being copied into a new structure. - * Normally, ENGINEs don't declare this flag so ENGINE_by_id() just increments - * the existing ENGINE's structural reference count. */ -#define ENGINE_FLAGS_BY_ID_COPY (int)0x0004 - -/* ENGINEs can support their own command types, and these flags are used in - * ENGINE_CTRL_GET_CMD_FLAGS to indicate to the caller what kind of input each - * command expects. Currently only numeric and string input is supported. If a - * control command supports none of the _NUMERIC, _STRING, or _NO_INPUT options, - * then it is regarded as an "internal" control command - and not for use in - * config setting situations. As such, they're not available to the - * ENGINE_ctrl_cmd_string() function, only raw ENGINE_ctrl() access. Changes to - * this list of 'command types' should be reflected carefully in - * ENGINE_cmd_is_executable() and ENGINE_ctrl_cmd_string(). */ - -/* accepts a 'long' input value (3rd parameter to ENGINE_ctrl) */ -#define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001 -/* accepts string input (cast from 'void*' to 'const char *', 4th parameter to - * ENGINE_ctrl) */ -#define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002 -/* Indicates that the control command takes *no* input. Ie. the control command - * is unparameterised. */ -#define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004 -/* Indicates that the control command is internal. This control command won't - * be shown in any output, and is only usable through the ENGINE_ctrl_cmd() - * function. */ -#define ENGINE_CMD_FLAG_INTERNAL (unsigned int)0x0008 - -/* NB: These 3 control commands are deprecated and should not be used. ENGINEs - * relying on these commands should compile conditional support for - * compatibility (eg. if these symbols are defined) but should also migrate the - * same functionality to their own ENGINE-specific control functions that can be - * "discovered" by calling applications. The fact these control commands - * wouldn't be "executable" (ie. usable by text-based config) doesn't change the - * fact that application code can find and use them without requiring per-ENGINE - * hacking. */ - -/* These flags are used to tell the ctrl function what should be done. - * All command numbers are shared between all engines, even if some don't - * make sense to some engines. In such a case, they do nothing but return - * the error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED. */ -#define ENGINE_CTRL_SET_LOGSTREAM 1 -#define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2 -#define ENGINE_CTRL_HUP 3 /* Close and reinitialise any - handles/connections etc. */ -#define ENGINE_CTRL_SET_USER_INTERFACE 4 /* Alternative to callback */ -#define ENGINE_CTRL_SET_CALLBACK_DATA 5 /* User-specific data, used - when calling the password - callback and the user - interface */ -#define ENGINE_CTRL_LOAD_CONFIGURATION 6 /* Load a configuration, given - a string that represents a - file name or so */ -#define ENGINE_CTRL_LOAD_SECTION 7 /* Load data from a given - section in the already loaded - configuration */ - -/* These control commands allow an application to deal with an arbitrary engine - * in a dynamic way. Warn: Negative return values indicate errors FOR THESE - * COMMANDS because zero is used to indicate 'end-of-list'. Other commands, - * including ENGINE-specific command types, return zero for an error. - * - * An ENGINE can choose to implement these ctrl functions, and can internally - * manage things however it chooses - it does so by setting the - * ENGINE_FLAGS_MANUAL_CMD_CTRL flag (using ENGINE_set_flags()). Otherwise the - * ENGINE_ctrl() code handles this on the ENGINE's behalf using the cmd_defns - * data (set using ENGINE_set_cmd_defns()). This means an ENGINE's ctrl() - * handler need only implement its own commands - the above "meta" commands will - * be taken care of. */ - -/* Returns non-zero if the supplied ENGINE has a ctrl() handler. If "not", then - * all the remaining control commands will return failure, so it is worth - * checking this first if the caller is trying to "discover" the engine's - * capabilities and doesn't want errors generated unnecessarily. */ -#define ENGINE_CTRL_HAS_CTRL_FUNCTION 10 -/* Returns a positive command number for the first command supported by the - * engine. Returns zero if no ctrl commands are supported. */ -#define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11 -/* The 'long' argument specifies a command implemented by the engine, and the - * return value is the next command supported, or zero if there are no more. */ -#define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12 -/* The 'void*' argument is a command name (cast from 'const char *'), and the - * return value is the command that corresponds to it. */ -#define ENGINE_CTRL_GET_CMD_FROM_NAME 13 -/* The next two allow a command to be converted into its corresponding string - * form. In each case, the 'long' argument supplies the command. In the NAME_LEN - * case, the return value is the length of the command name (not counting a - * trailing EOL). In the NAME case, the 'void*' argument must be a string buffer - * large enough, and it will be populated with the name of the command (WITH a - * trailing EOL). */ -#define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14 -#define ENGINE_CTRL_GET_NAME_FROM_CMD 15 -/* The next two are similar but give a "short description" of a command. */ -#define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16 -#define ENGINE_CTRL_GET_DESC_FROM_CMD 17 -/* With this command, the return value is the OR'd combination of - * ENGINE_CMD_FLAG_*** values that indicate what kind of input a given - * engine-specific ctrl command expects. */ -#define ENGINE_CTRL_GET_CMD_FLAGS 18 - -/* ENGINE implementations should start the numbering of their own control - * commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc). */ -#define ENGINE_CMD_BASE 200 - -/* NB: These 2 nCipher "chil" control commands are deprecated, and their - * functionality is now available through ENGINE-specific control commands - * (exposed through the above-mentioned 'CMD'-handling). Code using these 2 - * commands should be migrated to the more general command handling before these - * are removed. */ - -/* Flags specific to the nCipher "chil" engine */ -#define ENGINE_CTRL_CHIL_SET_FORKCHECK 100 - /* Depending on the value of the (long)i argument, this sets or - * unsets the SimpleForkCheck flag in the CHIL API to enable or - * disable checking and workarounds for applications that fork(). - */ -#define ENGINE_CTRL_CHIL_NO_LOCKING 101 - /* This prevents the initialisation function from providing mutex - * callbacks to the nCipher library. */ - -/* If an ENGINE supports its own specific control commands and wishes the - * framework to handle the above 'ENGINE_CMD_***'-manipulation commands on its - * behalf, it should supply a null-terminated array of ENGINE_CMD_DEFN entries - * to ENGINE_set_cmd_defns(). It should also implement a ctrl() handler that - * supports the stated commands (ie. the "cmd_num" entries as described by the - * array). NB: The array must be ordered in increasing order of cmd_num. - * "null-terminated" means that the last ENGINE_CMD_DEFN element has cmd_num set - * to zero and/or cmd_name set to NULL. */ -typedef struct ENGINE_CMD_DEFN_st - { - unsigned int cmd_num; /* The command number */ - const char *cmd_name; /* The command name itself */ - const char *cmd_desc; /* A short description of the command */ - unsigned int cmd_flags; /* The input the command expects */ - } ENGINE_CMD_DEFN; - -/* Generic function pointer */ -typedef int (*ENGINE_GEN_FUNC_PTR)(void); -/* Generic function pointer taking no arguments */ -typedef int (*ENGINE_GEN_INT_FUNC_PTR)(ENGINE *); -/* Specific control function pointer */ -typedef int (*ENGINE_CTRL_FUNC_PTR)(ENGINE *, int, long, void *, void (*f)(void)); -/* Generic load_key function pointer */ -typedef EVP_PKEY * (*ENGINE_LOAD_KEY_PTR)(ENGINE *, const char *, - UI_METHOD *ui_method, void *callback_data); -typedef int (*ENGINE_SSL_CLIENT_CERT_PTR)(ENGINE *, SSL *ssl, - STACK_OF(X509_NAME) *ca_dn, X509 **pcert, EVP_PKEY **pkey, - STACK_OF(X509) **pother, UI_METHOD *ui_method, void *callback_data); -/* These callback types are for an ENGINE's handler for cipher and digest logic. - * These handlers have these prototypes; - * int foo(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid); - * int foo(ENGINE *e, const EVP_MD **digest, const int **nids, int nid); - * Looking at how to implement these handlers in the case of cipher support, if - * the framework wants the EVP_CIPHER for 'nid', it will call; - * foo(e, &p_evp_cipher, NULL, nid); (return zero for failure) - * If the framework wants a list of supported 'nid's, it will call; - * foo(e, NULL, &p_nids, 0); (returns number of 'nids' or -1 for error) - */ -/* Returns to a pointer to the array of supported cipher 'nid's. If the second - * parameter is non-NULL it is set to the size of the returned array. */ -typedef int (*ENGINE_CIPHERS_PTR)(ENGINE *, const EVP_CIPHER **, const int **, int); -typedef int (*ENGINE_DIGESTS_PTR)(ENGINE *, const EVP_MD **, const int **, int); - -/* STRUCTURE functions ... all of these functions deal with pointers to ENGINE - * structures where the pointers have a "structural reference". This means that - * their reference is to allowed access to the structure but it does not imply - * that the structure is functional. To simply increment or decrement the - * structural reference count, use ENGINE_by_id and ENGINE_free. NB: This is not - * required when iterating using ENGINE_get_next as it will automatically - * decrement the structural reference count of the "current" ENGINE and - * increment the structural reference count of the ENGINE it returns (unless it - * is NULL). */ - -/* Get the first/last "ENGINE" type available. */ -ENGINE *ENGINE_get_first(void); -ENGINE *ENGINE_get_last(void); -/* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */ -ENGINE *ENGINE_get_next(ENGINE *e); -ENGINE *ENGINE_get_prev(ENGINE *e); -/* Add another "ENGINE" type into the array. */ -int ENGINE_add(ENGINE *e); -/* Remove an existing "ENGINE" type from the array. */ -int ENGINE_remove(ENGINE *e); -/* Retrieve an engine from the list by its unique "id" value. */ -ENGINE *ENGINE_by_id(const char *id); -/* Add all the built-in engines. */ -void ENGINE_load_openssl(void); -void ENGINE_load_dynamic(void); -#ifndef OPENSSL_NO_STATIC_ENGINE -void ENGINE_load_4758cca(void); -void ENGINE_load_aep(void); -void ENGINE_load_atalla(void); -void ENGINE_load_chil(void); -void ENGINE_load_cswift(void); -#ifndef OPENSSL_NO_GMP -void ENGINE_load_gmp(void); -#endif -void ENGINE_load_nuron(void); -void ENGINE_load_sureware(void); -void ENGINE_load_ubsec(void); -#endif -void ENGINE_load_cryptodev(void); -void ENGINE_load_padlock(void); -void ENGINE_load_builtin_engines(void); -#ifndef OPENSSL_NO_CAPIENG -void ENGINE_load_capi(void); -#endif - -/* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation - * "registry" handling. */ -unsigned int ENGINE_get_table_flags(void); -void ENGINE_set_table_flags(unsigned int flags); - -/* Manage registration of ENGINEs per "table". For each type, there are 3 - * functions; - * ENGINE_register_***(e) - registers the implementation from 'e' (if it has one) - * ENGINE_unregister_***(e) - unregister the implementation from 'e' - * ENGINE_register_all_***() - call ENGINE_register_***() for each 'e' in the list - * Cleanup is automatically registered from each table when required, so - * ENGINE_cleanup() will reverse any "register" operations. */ - -int ENGINE_register_RSA(ENGINE *e); -void ENGINE_unregister_RSA(ENGINE *e); -void ENGINE_register_all_RSA(void); - -int ENGINE_register_DSA(ENGINE *e); -void ENGINE_unregister_DSA(ENGINE *e); -void ENGINE_register_all_DSA(void); - -int ENGINE_register_ECDH(ENGINE *e); -void ENGINE_unregister_ECDH(ENGINE *e); -void ENGINE_register_all_ECDH(void); - -int ENGINE_register_ECDSA(ENGINE *e); -void ENGINE_unregister_ECDSA(ENGINE *e); -void ENGINE_register_all_ECDSA(void); - -int ENGINE_register_DH(ENGINE *e); -void ENGINE_unregister_DH(ENGINE *e); -void ENGINE_register_all_DH(void); - -int ENGINE_register_RAND(ENGINE *e); -void ENGINE_unregister_RAND(ENGINE *e); -void ENGINE_register_all_RAND(void); - -int ENGINE_register_STORE(ENGINE *e); -void ENGINE_unregister_STORE(ENGINE *e); -void ENGINE_register_all_STORE(void); - -int ENGINE_register_ciphers(ENGINE *e); -void ENGINE_unregister_ciphers(ENGINE *e); -void ENGINE_register_all_ciphers(void); - -int ENGINE_register_digests(ENGINE *e); -void ENGINE_unregister_digests(ENGINE *e); -void ENGINE_register_all_digests(void); - -/* These functions register all support from the above categories. Note, use of - * these functions can result in static linkage of code your application may not - * need. If you only need a subset of functionality, consider using more - * selective initialisation. */ -int ENGINE_register_complete(ENGINE *e); -int ENGINE_register_all_complete(void); - -/* Send parametrised control commands to the engine. The possibilities to send - * down an integer, a pointer to data or a function pointer are provided. Any of - * the parameters may or may not be NULL, depending on the command number. In - * actuality, this function only requires a structural (rather than functional) - * reference to an engine, but many control commands may require the engine be - * functional. The caller should be aware of trying commands that require an - * operational ENGINE, and only use functional references in such situations. */ -int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void)); - -/* This function tests if an ENGINE-specific command is usable as a "setting". - * Eg. in an application's config file that gets processed through - * ENGINE_ctrl_cmd_string(). If this returns zero, it is not available to - * ENGINE_ctrl_cmd_string(), only ENGINE_ctrl(). */ -int ENGINE_cmd_is_executable(ENGINE *e, int cmd); - -/* This function works like ENGINE_ctrl() with the exception of taking a - * command name instead of a command number, and can handle optional commands. - * See the comment on ENGINE_ctrl_cmd_string() for an explanation on how to - * use the cmd_name and cmd_optional. */ -int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name, - long i, void *p, void (*f)(void), int cmd_optional); - -/* This function passes a command-name and argument to an ENGINE. The cmd_name - * is converted to a command number and the control command is called using - * 'arg' as an argument (unless the ENGINE doesn't support such a command, in - * which case no control command is called). The command is checked for input - * flags, and if necessary the argument will be converted to a numeric value. If - * cmd_optional is non-zero, then if the ENGINE doesn't support the given - * cmd_name the return value will be success anyway. This function is intended - * for applications to use so that users (or config files) can supply - * engine-specific config data to the ENGINE at run-time to control behaviour of - * specific engines. As such, it shouldn't be used for calling ENGINE_ctrl() - * functions that return data, deal with binary data, or that are otherwise - * supposed to be used directly through ENGINE_ctrl() in application code. Any - * "return" data from an ENGINE_ctrl() operation in this function will be lost - - * the return value is interpreted as failure if the return value is zero, - * success otherwise, and this function returns a boolean value as a result. In - * other words, vendors of 'ENGINE'-enabled devices should write ENGINE - * implementations with parameterisations that work in this scheme, so that - * compliant ENGINE-based applications can work consistently with the same - * configuration for the same ENGINE-enabled devices, across applications. */ -int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg, - int cmd_optional); - -/* These functions are useful for manufacturing new ENGINE structures. They - * don't address reference counting at all - one uses them to populate an ENGINE - * structure with personalised implementations of things prior to using it - * directly or adding it to the builtin ENGINE list in OpenSSL. These are also - * here so that the ENGINE structure doesn't have to be exposed and break binary - * compatibility! */ -ENGINE *ENGINE_new(void); -int ENGINE_free(ENGINE *e); -int ENGINE_up_ref(ENGINE *e); -int ENGINE_set_id(ENGINE *e, const char *id); -int ENGINE_set_name(ENGINE *e, const char *name); -int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); -int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); -int ENGINE_set_ECDH(ENGINE *e, const ECDH_METHOD *ecdh_meth); -int ENGINE_set_ECDSA(ENGINE *e, const ECDSA_METHOD *ecdsa_meth); -int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); -int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); -int ENGINE_set_STORE(ENGINE *e, const STORE_METHOD *store_meth); -int ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f); -int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f); -int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f); -int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f); -int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f); -int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f); -int ENGINE_set_load_ssl_client_cert_function(ENGINE *e, - ENGINE_SSL_CLIENT_CERT_PTR loadssl_f); -int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f); -int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f); -int ENGINE_set_flags(ENGINE *e, int flags); -int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns); -/* These functions allow control over any per-structure ENGINE data. */ -int ENGINE_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg); -void *ENGINE_get_ex_data(const ENGINE *e, int idx); - -/* This function cleans up anything that needs it. Eg. the ENGINE_add() function - * automatically ensures the list cleanup function is registered to be called - * from ENGINE_cleanup(). Similarly, all ENGINE_register_*** functions ensure - * ENGINE_cleanup() will clean up after them. */ -void ENGINE_cleanup(void); - -/* These return values from within the ENGINE structure. These can be useful - * with functional references as well as structural references - it depends - * which you obtained. Using the result for functional purposes if you only - * obtained a structural reference may be problematic! */ -const char *ENGINE_get_id(const ENGINE *e); -const char *ENGINE_get_name(const ENGINE *e); -const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); -const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); -const ECDH_METHOD *ENGINE_get_ECDH(const ENGINE *e); -const ECDSA_METHOD *ENGINE_get_ECDSA(const ENGINE *e); -const DH_METHOD *ENGINE_get_DH(const ENGINE *e); -const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); -const STORE_METHOD *ENGINE_get_STORE(const ENGINE *e); -ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e); -ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e); -ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e); -ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e); -ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e); -ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e); -ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e); -ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e); -ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e); -const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid); -const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid); -const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e); -int ENGINE_get_flags(const ENGINE *e); - -/* FUNCTIONAL functions. These functions deal with ENGINE structures - * that have (or will) be initialised for use. Broadly speaking, the - * structural functions are useful for iterating the list of available - * engine types, creating new engine types, and other "list" operations. - * These functions actually deal with ENGINEs that are to be used. As - * such these functions can fail (if applicable) when particular - * engines are unavailable - eg. if a hardware accelerator is not - * attached or not functioning correctly. Each ENGINE has 2 reference - * counts; structural and functional. Every time a functional reference - * is obtained or released, a corresponding structural reference is - * automatically obtained or released too. */ - -/* Initialise a engine type for use (or up its reference count if it's - * already in use). This will fail if the engine is not currently - * operational and cannot initialise. */ -int ENGINE_init(ENGINE *e); -/* Free a functional reference to a engine type. This does not require - * a corresponding call to ENGINE_free as it also releases a structural - * reference. */ -int ENGINE_finish(ENGINE *e); - -/* The following functions handle keys that are stored in some secondary - * location, handled by the engine. The storage may be on a card or - * whatever. */ -EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, - UI_METHOD *ui_method, void *callback_data); -EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, - UI_METHOD *ui_method, void *callback_data); -int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, - STACK_OF(X509_NAME) *ca_dn, X509 **pcert, EVP_PKEY **ppkey, - STACK_OF(X509) **pother, - UI_METHOD *ui_method, void *callback_data); - -/* This returns a pointer for the current ENGINE structure that - * is (by default) performing any RSA operations. The value returned - * is an incremented reference, so it should be free'd (ENGINE_finish) - * before it is discarded. */ -ENGINE *ENGINE_get_default_RSA(void); -/* Same for the other "methods" */ -ENGINE *ENGINE_get_default_DSA(void); -ENGINE *ENGINE_get_default_ECDH(void); -ENGINE *ENGINE_get_default_ECDSA(void); -ENGINE *ENGINE_get_default_DH(void); -ENGINE *ENGINE_get_default_RAND(void); -/* These functions can be used to get a functional reference to perform - * ciphering or digesting corresponding to "nid". */ -ENGINE *ENGINE_get_cipher_engine(int nid); -ENGINE *ENGINE_get_digest_engine(int nid); - -/* This sets a new default ENGINE structure for performing RSA - * operations. If the result is non-zero (success) then the ENGINE - * structure will have had its reference count up'd so the caller - * should still free their own reference 'e'. */ -int ENGINE_set_default_RSA(ENGINE *e); -int ENGINE_set_default_string(ENGINE *e, const char *def_list); -/* Same for the other "methods" */ -int ENGINE_set_default_DSA(ENGINE *e); -int ENGINE_set_default_ECDH(ENGINE *e); -int ENGINE_set_default_ECDSA(ENGINE *e); -int ENGINE_set_default_DH(ENGINE *e); -int ENGINE_set_default_RAND(ENGINE *e); -int ENGINE_set_default_ciphers(ENGINE *e); -int ENGINE_set_default_digests(ENGINE *e); - -/* The combination "set" - the flags are bitwise "OR"d from the - * ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()" - * function, this function can result in unnecessary static linkage. If your - * application requires only specific functionality, consider using more - * selective functions. */ -int ENGINE_set_default(ENGINE *e, unsigned int flags); - -void ENGINE_add_conf_module(void); - -/* Deprecated functions ... */ -/* int ENGINE_clear_defaults(void); */ - -/**************************/ -/* DYNAMIC ENGINE SUPPORT */ -/**************************/ - -/* Binary/behaviour compatibility levels */ -#define OSSL_DYNAMIC_VERSION (unsigned long)0x00020000 -/* Binary versions older than this are too old for us (whether we're a loader or - * a loadee) */ -#define OSSL_DYNAMIC_OLDEST (unsigned long)0x00020000 - -/* When compiling an ENGINE entirely as an external shared library, loadable by - * the "dynamic" ENGINE, these types are needed. The 'dynamic_fns' structure - * type provides the calling application's (or library's) error functionality - * and memory management function pointers to the loaded library. These should - * be used/set in the loaded library code so that the loading application's - * 'state' will be used/changed in all operations. The 'static_state' pointer - * allows the loaded library to know if it shares the same static data as the - * calling application (or library), and thus whether these callbacks need to be - * set or not. */ -typedef void *(*dyn_MEM_malloc_cb)(size_t); -typedef void *(*dyn_MEM_realloc_cb)(void *, size_t); -typedef void (*dyn_MEM_free_cb)(void *); -typedef struct st_dynamic_MEM_fns { - dyn_MEM_malloc_cb malloc_cb; - dyn_MEM_realloc_cb realloc_cb; - dyn_MEM_free_cb free_cb; - } dynamic_MEM_fns; -/* FIXME: Perhaps the memory and locking code (crypto.h) should declare and use - * these types so we (and any other dependant code) can simplify a bit?? */ -typedef void (*dyn_lock_locking_cb)(int,int,const char *,int); -typedef int (*dyn_lock_add_lock_cb)(int*,int,int,const char *,int); -typedef struct CRYPTO_dynlock_value *(*dyn_dynlock_create_cb)( - const char *,int); -typedef void (*dyn_dynlock_lock_cb)(int,struct CRYPTO_dynlock_value *, - const char *,int); -typedef void (*dyn_dynlock_destroy_cb)(struct CRYPTO_dynlock_value *, - const char *,int); -typedef struct st_dynamic_LOCK_fns { - dyn_lock_locking_cb lock_locking_cb; - dyn_lock_add_lock_cb lock_add_lock_cb; - dyn_dynlock_create_cb dynlock_create_cb; - dyn_dynlock_lock_cb dynlock_lock_cb; - dyn_dynlock_destroy_cb dynlock_destroy_cb; - } dynamic_LOCK_fns; -/* The top-level structure */ -typedef struct st_dynamic_fns { - void *static_state; - const ERR_FNS *err_fns; - const CRYPTO_EX_DATA_IMPL *ex_data_fns; - dynamic_MEM_fns mem_fns; - dynamic_LOCK_fns lock_fns; - } dynamic_fns; - -/* The version checking function should be of this prototype. NB: The - * ossl_version value passed in is the OSSL_DYNAMIC_VERSION of the loading code. - * If this function returns zero, it indicates a (potential) version - * incompatibility and the loaded library doesn't believe it can proceed. - * Otherwise, the returned value is the (latest) version supported by the - * loading library. The loader may still decide that the loaded code's version - * is unsatisfactory and could veto the load. The function is expected to - * be implemented with the symbol name "v_check", and a default implementation - * can be fully instantiated with IMPLEMENT_DYNAMIC_CHECK_FN(). */ -typedef unsigned long (*dynamic_v_check_fn)(unsigned long ossl_version); -#define IMPLEMENT_DYNAMIC_CHECK_FN() \ - OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \ - if(v >= OSSL_DYNAMIC_OLDEST) return OSSL_DYNAMIC_VERSION; \ - return 0; } - -/* This function is passed the ENGINE structure to initialise with its own - * function and command settings. It should not adjust the structural or - * functional reference counts. If this function returns zero, (a) the load will - * be aborted, (b) the previous ENGINE state will be memcpy'd back onto the - * structure, and (c) the shared library will be unloaded. So implementations - * should do their own internal cleanup in failure circumstances otherwise they - * could leak. The 'id' parameter, if non-NULL, represents the ENGINE id that - * the loader is looking for. If this is NULL, the shared library can choose to - * return failure or to initialise a 'default' ENGINE. If non-NULL, the shared - * library must initialise only an ENGINE matching the passed 'id'. The function - * is expected to be implemented with the symbol name "bind_engine". A standard - * implementation can be instantiated with IMPLEMENT_DYNAMIC_BIND_FN(fn) where - * the parameter 'fn' is a callback function that populates the ENGINE structure - * and returns an int value (zero for failure). 'fn' should have prototype; - * [static] int fn(ENGINE *e, const char *id); */ -typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id, - const dynamic_fns *fns); -#define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ - OPENSSL_EXPORT \ - int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \ - if(ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \ - if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \ - fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \ - return 0; \ - CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \ - CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \ - CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \ - CRYPTO_set_dynlock_lock_callback(fns->lock_fns.dynlock_lock_cb); \ - CRYPTO_set_dynlock_destroy_callback(fns->lock_fns.dynlock_destroy_cb); \ - if(!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \ - return 0; \ - if(!ERR_set_implementation(fns->err_fns)) return 0; \ - skip_cbs: \ - if(!fn(e,id)) return 0; \ - return 1; } - -/* If the loading application (or library) and the loaded ENGINE library share - * the same static data (eg. they're both dynamically linked to the same - * libcrypto.so) we need a way to avoid trying to set system callbacks - this - * would fail, and for the same reason that it's unnecessary to try. If the - * loaded ENGINE has (or gets from through the loader) its own copy of the - * libcrypto static data, we will need to set the callbacks. The easiest way to - * detect this is to have a function that returns a pointer to some static data - * and let the loading application and loaded ENGINE compare their respective - * values. */ -void *ENGINE_get_static_state(void); - -#if defined(__OpenBSD__) || defined(__FreeBSD__) -void ENGINE_setup_bsd_cryptodev(void); -#endif - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_ENGINE_strings(void); - -/* Error codes for the ENGINE functions. */ - -/* Function codes. */ -#define ENGINE_F_DYNAMIC_CTRL 180 -#define ENGINE_F_DYNAMIC_GET_DATA_CTX 181 -#define ENGINE_F_DYNAMIC_LOAD 182 -#define ENGINE_F_DYNAMIC_SET_DATA_CTX 183 -#define ENGINE_F_ENGINE_ADD 105 -#define ENGINE_F_ENGINE_BY_ID 106 -#define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE 170 -#define ENGINE_F_ENGINE_CTRL 142 -#define ENGINE_F_ENGINE_CTRL_CMD 178 -#define ENGINE_F_ENGINE_CTRL_CMD_STRING 171 -#define ENGINE_F_ENGINE_FINISH 107 -#define ENGINE_F_ENGINE_FREE_UTIL 108 -#define ENGINE_F_ENGINE_GET_CIPHER 185 -#define ENGINE_F_ENGINE_GET_DEFAULT_TYPE 177 -#define ENGINE_F_ENGINE_GET_DIGEST 186 -#define ENGINE_F_ENGINE_GET_NEXT 115 -#define ENGINE_F_ENGINE_GET_PREV 116 -#define ENGINE_F_ENGINE_INIT 119 -#define ENGINE_F_ENGINE_LIST_ADD 120 -#define ENGINE_F_ENGINE_LIST_REMOVE 121 -#define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150 -#define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151 -#define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 192 -#define ENGINE_F_ENGINE_NEW 122 -#define ENGINE_F_ENGINE_REMOVE 123 -#define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189 -#define ENGINE_F_ENGINE_SET_DEFAULT_TYPE 126 -#define ENGINE_F_ENGINE_SET_ID 129 -#define ENGINE_F_ENGINE_SET_NAME 130 -#define ENGINE_F_ENGINE_TABLE_REGISTER 184 -#define ENGINE_F_ENGINE_UNLOAD_KEY 152 -#define ENGINE_F_ENGINE_UNLOCKED_FINISH 191 -#define ENGINE_F_ENGINE_UP_REF 190 -#define ENGINE_F_INT_CTRL_HELPER 172 -#define ENGINE_F_INT_ENGINE_CONFIGURE 188 -#define ENGINE_F_INT_ENGINE_MODULE_INIT 187 -#define ENGINE_F_LOG_MESSAGE 141 - -/* Reason codes. */ -#define ENGINE_R_ALREADY_LOADED 100 -#define ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER 133 -#define ENGINE_R_CMD_NOT_EXECUTABLE 134 -#define ENGINE_R_COMMAND_TAKES_INPUT 135 -#define ENGINE_R_COMMAND_TAKES_NO_INPUT 136 -#define ENGINE_R_CONFLICTING_ENGINE_ID 103 -#define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119 -#define ENGINE_R_DH_NOT_IMPLEMENTED 139 -#define ENGINE_R_DSA_NOT_IMPLEMENTED 140 -#define ENGINE_R_DSO_FAILURE 104 -#define ENGINE_R_DSO_NOT_FOUND 132 -#define ENGINE_R_ENGINES_SECTION_ERROR 148 -#define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105 -#define ENGINE_R_ENGINE_SECTION_ERROR 149 -#define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128 -#define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129 -#define ENGINE_R_FINISH_FAILED 106 -#define ENGINE_R_GET_HANDLE_FAILED 107 -#define ENGINE_R_ID_OR_NAME_MISSING 108 -#define ENGINE_R_INIT_FAILED 109 -#define ENGINE_R_INTERNAL_LIST_ERROR 110 -#define ENGINE_R_INVALID_ARGUMENT 143 -#define ENGINE_R_INVALID_CMD_NAME 137 -#define ENGINE_R_INVALID_CMD_NUMBER 138 -#define ENGINE_R_INVALID_INIT_VALUE 151 -#define ENGINE_R_INVALID_STRING 150 -#define ENGINE_R_NOT_INITIALISED 117 -#define ENGINE_R_NOT_LOADED 112 -#define ENGINE_R_NO_CONTROL_FUNCTION 120 -#define ENGINE_R_NO_INDEX 144 -#define ENGINE_R_NO_LOAD_FUNCTION 125 -#define ENGINE_R_NO_REFERENCE 130 -#define ENGINE_R_NO_SUCH_ENGINE 116 -#define ENGINE_R_NO_UNLOAD_FUNCTION 126 -#define ENGINE_R_PROVIDE_PARAMETERS 113 -#define ENGINE_R_RSA_NOT_IMPLEMENTED 141 -#define ENGINE_R_UNIMPLEMENTED_CIPHER 146 -#define ENGINE_R_UNIMPLEMENTED_DIGEST 147 -#define ENGINE_R_VERSION_INCOMPATIBILITY 145 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/err.h b/externals/openssl/err.h deleted file mode 100644 index dcac415231..0000000000 --- a/externals/openssl/err.h +++ /dev/null @@ -1,330 +0,0 @@ -/* crypto/err/err.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_ERR_H -#define HEADER_ERR_H - -#include - -#ifndef OPENSSL_NO_FP_API -#include -#include -#endif - -#include -#ifndef OPENSSL_NO_BIO -#include -#endif -#ifndef OPENSSL_NO_LHASH -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef OPENSSL_NO_ERR -#define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,d,e) -#else -#define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,NULL,0) -#endif - -#include - -#define ERR_TXT_MALLOCED 0x01 -#define ERR_TXT_STRING 0x02 - -#define ERR_FLAG_MARK 0x01 - -#define ERR_NUM_ERRORS 16 -typedef struct err_state_st - { - unsigned long pid; - int err_flags[ERR_NUM_ERRORS]; - unsigned long err_buffer[ERR_NUM_ERRORS]; - char *err_data[ERR_NUM_ERRORS]; - int err_data_flags[ERR_NUM_ERRORS]; - const char *err_file[ERR_NUM_ERRORS]; - int err_line[ERR_NUM_ERRORS]; - int top,bottom; - } ERR_STATE; - -/* library */ -#define ERR_LIB_NONE 1 -#define ERR_LIB_SYS 2 -#define ERR_LIB_BN 3 -#define ERR_LIB_RSA 4 -#define ERR_LIB_DH 5 -#define ERR_LIB_EVP 6 -#define ERR_LIB_BUF 7 -#define ERR_LIB_OBJ 8 -#define ERR_LIB_PEM 9 -#define ERR_LIB_DSA 10 -#define ERR_LIB_X509 11 -/* #define ERR_LIB_METH 12 */ -#define ERR_LIB_ASN1 13 -#define ERR_LIB_CONF 14 -#define ERR_LIB_CRYPTO 15 -#define ERR_LIB_EC 16 -#define ERR_LIB_SSL 20 -/* #define ERR_LIB_SSL23 21 */ -/* #define ERR_LIB_SSL2 22 */ -/* #define ERR_LIB_SSL3 23 */ -/* #define ERR_LIB_RSAREF 30 */ -/* #define ERR_LIB_PROXY 31 */ -#define ERR_LIB_BIO 32 -#define ERR_LIB_PKCS7 33 -#define ERR_LIB_X509V3 34 -#define ERR_LIB_PKCS12 35 -#define ERR_LIB_RAND 36 -#define ERR_LIB_DSO 37 -#define ERR_LIB_ENGINE 38 -#define ERR_LIB_OCSP 39 -#define ERR_LIB_UI 40 -#define ERR_LIB_COMP 41 -#define ERR_LIB_ECDSA 42 -#define ERR_LIB_ECDH 43 -#define ERR_LIB_STORE 44 -#define ERR_LIB_FIPS 45 -#define ERR_LIB_CMS 46 -#define ERR_LIB_JPAKE 47 - -#define ERR_LIB_USER 128 - -#define SYSerr(f,r) ERR_PUT_error(ERR_LIB_SYS,(f),(r),__FILE__,__LINE__) -#define BNerr(f,r) ERR_PUT_error(ERR_LIB_BN,(f),(r),__FILE__,__LINE__) -#define RSAerr(f,r) ERR_PUT_error(ERR_LIB_RSA,(f),(r),__FILE__,__LINE__) -#define DHerr(f,r) ERR_PUT_error(ERR_LIB_DH,(f),(r),__FILE__,__LINE__) -#define EVPerr(f,r) ERR_PUT_error(ERR_LIB_EVP,(f),(r),__FILE__,__LINE__) -#define BUFerr(f,r) ERR_PUT_error(ERR_LIB_BUF,(f),(r),__FILE__,__LINE__) -#define OBJerr(f,r) ERR_PUT_error(ERR_LIB_OBJ,(f),(r),__FILE__,__LINE__) -#define PEMerr(f,r) ERR_PUT_error(ERR_LIB_PEM,(f),(r),__FILE__,__LINE__) -#define DSAerr(f,r) ERR_PUT_error(ERR_LIB_DSA,(f),(r),__FILE__,__LINE__) -#define X509err(f,r) ERR_PUT_error(ERR_LIB_X509,(f),(r),__FILE__,__LINE__) -#define ASN1err(f,r) ERR_PUT_error(ERR_LIB_ASN1,(f),(r),__FILE__,__LINE__) -#define CONFerr(f,r) ERR_PUT_error(ERR_LIB_CONF,(f),(r),__FILE__,__LINE__) -#define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),__FILE__,__LINE__) -#define ECerr(f,r) ERR_PUT_error(ERR_LIB_EC,(f),(r),__FILE__,__LINE__) -#define SSLerr(f,r) ERR_PUT_error(ERR_LIB_SSL,(f),(r),__FILE__,__LINE__) -#define BIOerr(f,r) ERR_PUT_error(ERR_LIB_BIO,(f),(r),__FILE__,__LINE__) -#define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),__FILE__,__LINE__) -#define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),__FILE__,__LINE__) -#define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),__FILE__,__LINE__) -#define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),__FILE__,__LINE__) -#define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),__FILE__,__LINE__) -#define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),__FILE__,__LINE__) -#define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__) -#define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__) -#define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__) -#define ECDSAerr(f,r) ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),__FILE__,__LINE__) -#define ECDHerr(f,r) ERR_PUT_error(ERR_LIB_ECDH,(f),(r),__FILE__,__LINE__) -#define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__) -#define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__) -#define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__) -#define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__) - -/* Borland C seems too stupid to be able to shift and do longs in - * the pre-processor :-( */ -#define ERR_PACK(l,f,r) (((((unsigned long)l)&0xffL)*0x1000000)| \ - ((((unsigned long)f)&0xfffL)*0x1000)| \ - ((((unsigned long)r)&0xfffL))) -#define ERR_GET_LIB(l) (int)((((unsigned long)l)>>24L)&0xffL) -#define ERR_GET_FUNC(l) (int)((((unsigned long)l)>>12L)&0xfffL) -#define ERR_GET_REASON(l) (int)((l)&0xfffL) -#define ERR_FATAL_ERROR(l) (int)((l)&ERR_R_FATAL) - - -/* OS functions */ -#define SYS_F_FOPEN 1 -#define SYS_F_CONNECT 2 -#define SYS_F_GETSERVBYNAME 3 -#define SYS_F_SOCKET 4 -#define SYS_F_IOCTLSOCKET 5 -#define SYS_F_BIND 6 -#define SYS_F_LISTEN 7 -#define SYS_F_ACCEPT 8 -#define SYS_F_WSASTARTUP 9 /* Winsock stuff */ -#define SYS_F_OPENDIR 10 -#define SYS_F_FREAD 11 - - -/* reasons */ -#define ERR_R_SYS_LIB ERR_LIB_SYS /* 2 */ -#define ERR_R_BN_LIB ERR_LIB_BN /* 3 */ -#define ERR_R_RSA_LIB ERR_LIB_RSA /* 4 */ -#define ERR_R_DH_LIB ERR_LIB_DH /* 5 */ -#define ERR_R_EVP_LIB ERR_LIB_EVP /* 6 */ -#define ERR_R_BUF_LIB ERR_LIB_BUF /* 7 */ -#define ERR_R_OBJ_LIB ERR_LIB_OBJ /* 8 */ -#define ERR_R_PEM_LIB ERR_LIB_PEM /* 9 */ -#define ERR_R_DSA_LIB ERR_LIB_DSA /* 10 */ -#define ERR_R_X509_LIB ERR_LIB_X509 /* 11 */ -#define ERR_R_ASN1_LIB ERR_LIB_ASN1 /* 13 */ -#define ERR_R_CONF_LIB ERR_LIB_CONF /* 14 */ -#define ERR_R_CRYPTO_LIB ERR_LIB_CRYPTO /* 15 */ -#define ERR_R_EC_LIB ERR_LIB_EC /* 16 */ -#define ERR_R_SSL_LIB ERR_LIB_SSL /* 20 */ -#define ERR_R_BIO_LIB ERR_LIB_BIO /* 32 */ -#define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 /* 33 */ -#define ERR_R_X509V3_LIB ERR_LIB_X509V3 /* 34 */ -#define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 /* 35 */ -#define ERR_R_RAND_LIB ERR_LIB_RAND /* 36 */ -#define ERR_R_DSO_LIB ERR_LIB_DSO /* 37 */ -#define ERR_R_ENGINE_LIB ERR_LIB_ENGINE /* 38 */ -#define ERR_R_OCSP_LIB ERR_LIB_OCSP /* 39 */ -#define ERR_R_UI_LIB ERR_LIB_UI /* 40 */ -#define ERR_R_COMP_LIB ERR_LIB_COMP /* 41 */ -#define ERR_R_ECDSA_LIB ERR_LIB_ECDSA /* 42 */ -#define ERR_R_ECDH_LIB ERR_LIB_ECDH /* 43 */ -#define ERR_R_STORE_LIB ERR_LIB_STORE /* 44 */ - -#define ERR_R_NESTED_ASN1_ERROR 58 -#define ERR_R_BAD_ASN1_OBJECT_HEADER 59 -#define ERR_R_BAD_GET_ASN1_OBJECT_CALL 60 -#define ERR_R_EXPECTING_AN_ASN1_SEQUENCE 61 -#define ERR_R_ASN1_LENGTH_MISMATCH 62 -#define ERR_R_MISSING_ASN1_EOS 63 - -/* fatal error */ -#define ERR_R_FATAL 64 -#define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) -#define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) -#define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) -#define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL) -#define ERR_R_DISABLED (5|ERR_R_FATAL) - -/* 99 is the maximum possible ERR_R_... code, higher values - * are reserved for the individual libraries */ - - -typedef struct ERR_string_data_st - { - unsigned long error; - const char *string; - } ERR_STRING_DATA; - -void ERR_put_error(int lib, int func,int reason,const char *file,int line); -void ERR_set_error_data(char *data,int flags); - -unsigned long ERR_get_error(void); -unsigned long ERR_get_error_line(const char **file,int *line); -unsigned long ERR_get_error_line_data(const char **file,int *line, - const char **data, int *flags); -unsigned long ERR_peek_error(void); -unsigned long ERR_peek_error_line(const char **file,int *line); -unsigned long ERR_peek_error_line_data(const char **file,int *line, - const char **data,int *flags); -unsigned long ERR_peek_last_error(void); -unsigned long ERR_peek_last_error_line(const char **file,int *line); -unsigned long ERR_peek_last_error_line_data(const char **file,int *line, - const char **data,int *flags); -void ERR_clear_error(void ); -char *ERR_error_string(unsigned long e,char *buf); -void ERR_error_string_n(unsigned long e, char *buf, size_t len); -const char *ERR_lib_error_string(unsigned long e); -const char *ERR_func_error_string(unsigned long e); -const char *ERR_reason_error_string(unsigned long e); -void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), - void *u); -#ifndef OPENSSL_NO_FP_API -void ERR_print_errors_fp(FILE *fp); -#endif -#ifndef OPENSSL_NO_BIO -void ERR_print_errors(BIO *bp); -void ERR_add_error_data(int num, ...); -#endif -void ERR_load_strings(int lib,ERR_STRING_DATA str[]); -void ERR_unload_strings(int lib,ERR_STRING_DATA str[]); -void ERR_load_ERR_strings(void); -void ERR_load_crypto_strings(void); -void ERR_free_strings(void); - -void ERR_remove_state(unsigned long pid); /* if zero we look it up */ -ERR_STATE *ERR_get_state(void); - -#ifndef OPENSSL_NO_LHASH -LHASH *ERR_get_string_table(void); -LHASH *ERR_get_err_state_table(void); -void ERR_release_err_state_table(LHASH **hash); -#endif - -int ERR_get_next_error_library(void); - -int ERR_set_mark(void); -int ERR_pop_to_mark(void); - -#ifdef OPENSSL_FIPS -void int_ERR_set_state_func(ERR_STATE *(*get_func)(void), - void (*remove_func)(unsigned long pid)); -void int_ERR_lib_init(void); -#endif - -/* Already defined in ossl_typ.h */ -/* typedef struct st_ERR_FNS ERR_FNS; */ -/* An application can use this function and provide the return value to loaded - * modules that should use the application's ERR state/functionality */ -const ERR_FNS *ERR_get_implementation(void); -/* A loaded module should call this function prior to any ERR operations using - * the application's "ERR_FNS". */ -int ERR_set_implementation(const ERR_FNS *fns); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/evp.h b/externals/openssl/evp.h deleted file mode 100644 index 79c097181f..0000000000 --- a/externals/openssl/evp.h +++ /dev/null @@ -1,1059 +0,0 @@ -/* crypto/evp/evp.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_ENVELOPE_H -#define HEADER_ENVELOPE_H - -#ifdef OPENSSL_ALGORITHM_DEFINES -# include -#else -# define OPENSSL_ALGORITHM_DEFINES -# include -# undef OPENSSL_ALGORITHM_DEFINES -#endif - -#include - -#include - -#ifndef OPENSSL_NO_BIO -#include -#endif - -#ifdef OPENSSL_FIPS -#include -#endif - -/* -#define EVP_RC2_KEY_SIZE 16 -#define EVP_RC4_KEY_SIZE 16 -#define EVP_BLOWFISH_KEY_SIZE 16 -#define EVP_CAST5_KEY_SIZE 16 -#define EVP_RC5_32_12_16_KEY_SIZE 16 -*/ -#define EVP_MAX_MD_SIZE 64 /* longest known is SHA512 */ -#define EVP_MAX_KEY_LENGTH 32 -#define EVP_MAX_IV_LENGTH 16 -#define EVP_MAX_BLOCK_LENGTH 32 - -#define PKCS5_SALT_LEN 8 -/* Default PKCS#5 iteration count */ -#define PKCS5_DEFAULT_ITER 2048 - -#include - -#define EVP_PK_RSA 0x0001 -#define EVP_PK_DSA 0x0002 -#define EVP_PK_DH 0x0004 -#define EVP_PK_EC 0x0008 -#define EVP_PKT_SIGN 0x0010 -#define EVP_PKT_ENC 0x0020 -#define EVP_PKT_EXCH 0x0040 -#define EVP_PKS_RSA 0x0100 -#define EVP_PKS_DSA 0x0200 -#define EVP_PKS_EC 0x0400 -#define EVP_PKT_EXP 0x1000 /* <= 512 bit key */ - -#define EVP_PKEY_NONE NID_undef -#define EVP_PKEY_RSA NID_rsaEncryption -#define EVP_PKEY_RSA2 NID_rsa -#define EVP_PKEY_DSA NID_dsa -#define EVP_PKEY_DSA1 NID_dsa_2 -#define EVP_PKEY_DSA2 NID_dsaWithSHA -#define EVP_PKEY_DSA3 NID_dsaWithSHA1 -#define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 -#define EVP_PKEY_DH NID_dhKeyAgreement -#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey - -#ifdef __cplusplus -extern "C" { -#endif - -/* Type needs to be a bit field - * Sub-type needs to be for variations on the method, as in, can it do - * arbitrary encryption.... */ -struct evp_pkey_st - { - int type; - int save_type; - int references; - union { - char *ptr; -#ifndef OPENSSL_NO_RSA - struct rsa_st *rsa; /* RSA */ -#endif -#ifndef OPENSSL_NO_DSA - struct dsa_st *dsa; /* DSA */ -#endif -#ifndef OPENSSL_NO_DH - struct dh_st *dh; /* DH */ -#endif -#ifndef OPENSSL_NO_EC - struct ec_key_st *ec; /* ECC */ -#endif - } pkey; - int save_parameters; - STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ - } /* EVP_PKEY */; - -#define EVP_PKEY_MO_SIGN 0x0001 -#define EVP_PKEY_MO_VERIFY 0x0002 -#define EVP_PKEY_MO_ENCRYPT 0x0004 -#define EVP_PKEY_MO_DECRYPT 0x0008 - -#if 0 -/* This structure is required to tie the message digest and signing together. - * The lookup can be done by md/pkey_method, oid, oid/pkey_method, or - * oid, md and pkey. - * This is required because for various smart-card perform the digest and - * signing/verification on-board. To handle this case, the specific - * EVP_MD and EVP_PKEY_METHODs need to be closely associated. - * When a PKEY is created, it will have a EVP_PKEY_METHOD associated with it. - * This can either be software or a token to provide the required low level - * routines. - */ -typedef struct evp_pkey_md_st - { - int oid; - EVP_MD *md; - EVP_PKEY_METHOD *pkey; - } EVP_PKEY_MD; - -#define EVP_rsa_md2() \ - EVP_PKEY_MD_add(NID_md2WithRSAEncryption,\ - EVP_rsa_pkcs1(),EVP_md2()) -#define EVP_rsa_md5() \ - EVP_PKEY_MD_add(NID_md5WithRSAEncryption,\ - EVP_rsa_pkcs1(),EVP_md5()) -#define EVP_rsa_sha0() \ - EVP_PKEY_MD_add(NID_shaWithRSAEncryption,\ - EVP_rsa_pkcs1(),EVP_sha()) -#define EVP_rsa_sha1() \ - EVP_PKEY_MD_add(NID_sha1WithRSAEncryption,\ - EVP_rsa_pkcs1(),EVP_sha1()) -#define EVP_rsa_ripemd160() \ - EVP_PKEY_MD_add(NID_ripemd160WithRSA,\ - EVP_rsa_pkcs1(),EVP_ripemd160()) -#define EVP_rsa_mdc2() \ - EVP_PKEY_MD_add(NID_mdc2WithRSA,\ - EVP_rsa_octet_string(),EVP_mdc2()) -#define EVP_dsa_sha() \ - EVP_PKEY_MD_add(NID_dsaWithSHA,\ - EVP_dsa(),EVP_sha()) -#define EVP_dsa_sha1() \ - EVP_PKEY_MD_add(NID_dsaWithSHA1,\ - EVP_dsa(),EVP_sha1()) - -typedef struct evp_pkey_method_st - { - char *name; - int flags; - int type; /* RSA, DSA, an SSLeay specific constant */ - int oid; /* For the pub-key type */ - int encrypt_oid; /* pub/priv key encryption */ - - int (*sign)(); - int (*verify)(); - struct { - int (*set)(); /* get and/or set the underlying type */ - int (*get)(); - int (*encrypt)(); - int (*decrypt)(); - int (*i2d)(); - int (*d2i)(); - int (*dup)(); - } pub,priv; - int (*set_asn1_parameters)(); - int (*get_asn1_parameters)(); - } EVP_PKEY_METHOD; -#endif - -#ifndef EVP_MD -struct env_md_st - { - int type; - int pkey_type; - int md_size; - unsigned long flags; - int (*init)(EVP_MD_CTX *ctx); - int (*update)(EVP_MD_CTX *ctx,const void *data,size_t count); - int (*final)(EVP_MD_CTX *ctx,unsigned char *md); - int (*copy)(EVP_MD_CTX *to,const EVP_MD_CTX *from); - int (*cleanup)(EVP_MD_CTX *ctx); - - /* FIXME: prototype these some day */ - int (*sign)(int type, const unsigned char *m, unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, void *key); - int (*verify)(int type, const unsigned char *m, unsigned int m_length, - const unsigned char *sigbuf, unsigned int siglen, - void *key); - int required_pkey_type[5]; /*EVP_PKEY_xxx */ - int block_size; - int ctx_size; /* how big does the ctx->md_data need to be */ - } /* EVP_MD */; - -typedef int evp_sign_method(int type,const unsigned char *m, - unsigned int m_length,unsigned char *sigret, - unsigned int *siglen, void *key); -typedef int evp_verify_method(int type,const unsigned char *m, - unsigned int m_length,const unsigned char *sigbuf, - unsigned int siglen, void *key); - -typedef struct - { - EVP_MD_CTX *mctx; - void *key; - } EVP_MD_SVCTX; - -#define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single - * block */ - -#define EVP_MD_FLAG_FIPS 0x0400 /* Note if suitable for use in FIPS mode */ - -#define EVP_MD_FLAG_SVCTX 0x0800 /* pass EVP_MD_SVCTX to sign/verify */ - -#define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0} - -#ifndef OPENSSL_NO_DSA -#define EVP_PKEY_DSA_method (evp_sign_method *)DSA_sign, \ - (evp_verify_method *)DSA_verify, \ - {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3, \ - EVP_PKEY_DSA4,0} -#else -#define EVP_PKEY_DSA_method EVP_PKEY_NULL_method -#endif - -#ifndef OPENSSL_NO_ECDSA -#define EVP_PKEY_ECDSA_method (evp_sign_method *)ECDSA_sign, \ - (evp_verify_method *)ECDSA_verify, \ - {EVP_PKEY_EC,0,0,0} -#else -#define EVP_PKEY_ECDSA_method EVP_PKEY_NULL_method -#endif - -#ifndef OPENSSL_NO_RSA -#define EVP_PKEY_RSA_method (evp_sign_method *)RSA_sign, \ - (evp_verify_method *)RSA_verify, \ - {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} -#define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \ - (evp_sign_method *)RSA_sign_ASN1_OCTET_STRING, \ - (evp_verify_method *)RSA_verify_ASN1_OCTET_STRING, \ - {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} -#else -#define EVP_PKEY_RSA_method EVP_PKEY_NULL_method -#define EVP_PKEY_RSA_ASN1_OCTET_STRING_method EVP_PKEY_NULL_method -#endif - -#endif /* !EVP_MD */ - -struct env_md_ctx_st - { - const EVP_MD *digest; - ENGINE *engine; /* functional reference if 'digest' is ENGINE-provided */ - unsigned long flags; - void *md_data; - } /* EVP_MD_CTX */; - -/* values for EVP_MD_CTX flags */ - -#define EVP_MD_CTX_FLAG_ONESHOT 0x0001 /* digest update will be called - * once only */ -#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been - * cleaned */ -#define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data - * in EVP_MD_CTX_cleanup */ -#define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008 /* Allow use of non FIPS digest - * in FIPS mode */ - -#define EVP_MD_CTX_FLAG_PAD_MASK 0xF0 /* RSA mode to use */ -#define EVP_MD_CTX_FLAG_PAD_PKCS1 0x00 /* PKCS#1 v1.5 mode */ -#define EVP_MD_CTX_FLAG_PAD_X931 0x10 /* X9.31 mode */ -#define EVP_MD_CTX_FLAG_PAD_PSS 0x20 /* PSS mode */ -#define M_EVP_MD_CTX_FLAG_PSS_SALT(ctx) \ - ((ctx->flags>>16) &0xFFFF) /* seed length */ -#define EVP_MD_CTX_FLAG_PSS_MDLEN 0xFFFF /* salt len same as digest */ -#define EVP_MD_CTX_FLAG_PSS_MREC 0xFFFE /* salt max or auto recovered */ - -struct evp_cipher_st - { - int nid; - int block_size; - int key_len; /* Default value for variable length ciphers */ - int iv_len; - unsigned long flags; /* Various flags */ - int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key, - const unsigned char *iv, int enc); /* init key */ - int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out, - const unsigned char *in, unsigned int inl);/* encrypt/decrypt data */ - int (*cleanup)(EVP_CIPHER_CTX *); /* cleanup ctx */ - int ctx_size; /* how big ctx->cipher_data needs to be */ - int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Populate a ASN1_TYPE with parameters */ - int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Get parameters from a ASN1_TYPE */ - int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Miscellaneous operations */ - void *app_data; /* Application data */ - } /* EVP_CIPHER */; - -/* Values for cipher flags */ - -/* Modes for ciphers */ - -#define EVP_CIPH_STREAM_CIPHER 0x0 -#define EVP_CIPH_ECB_MODE 0x1 -#define EVP_CIPH_CBC_MODE 0x2 -#define EVP_CIPH_CFB_MODE 0x3 -#define EVP_CIPH_OFB_MODE 0x4 -#define EVP_CIPH_MODE 0x7 -/* Set if variable length cipher */ -#define EVP_CIPH_VARIABLE_LENGTH 0x8 -/* Set if the iv handling should be done by the cipher itself */ -#define EVP_CIPH_CUSTOM_IV 0x10 -/* Set if the cipher's init() function should be called if key is NULL */ -#define EVP_CIPH_ALWAYS_CALL_INIT 0x20 -/* Call ctrl() to init cipher parameters */ -#define EVP_CIPH_CTRL_INIT 0x40 -/* Don't use standard key length function */ -#define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80 -/* Don't use standard block padding */ -#define EVP_CIPH_NO_PADDING 0x100 -/* cipher handles random key generation */ -#define EVP_CIPH_RAND_KEY 0x200 -/* Note if suitable for use in FIPS mode */ -#define EVP_CIPH_FLAG_FIPS 0x400 -/* Allow non FIPS cipher in FIPS mode */ -#define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0x800 -/* Allow use default ASN1 get/set iv */ -#define EVP_CIPH_FLAG_DEFAULT_ASN1 0x1000 -/* Buffer length in bits not bytes: CFB1 mode only */ -#define EVP_CIPH_FLAG_LENGTH_BITS 0x2000 - -/* ctrl() values */ - -#define EVP_CTRL_INIT 0x0 -#define EVP_CTRL_SET_KEY_LENGTH 0x1 -#define EVP_CTRL_GET_RC2_KEY_BITS 0x2 -#define EVP_CTRL_SET_RC2_KEY_BITS 0x3 -#define EVP_CTRL_GET_RC5_ROUNDS 0x4 -#define EVP_CTRL_SET_RC5_ROUNDS 0x5 -#define EVP_CTRL_RAND_KEY 0x6 - -typedef struct evp_cipher_info_st - { - const EVP_CIPHER *cipher; - unsigned char iv[EVP_MAX_IV_LENGTH]; - } EVP_CIPHER_INFO; - -struct evp_cipher_ctx_st - { - const EVP_CIPHER *cipher; - ENGINE *engine; /* functional reference if 'cipher' is ENGINE-provided */ - int encrypt; /* encrypt or decrypt */ - int buf_len; /* number we have left */ - - unsigned char oiv[EVP_MAX_IV_LENGTH]; /* original iv */ - unsigned char iv[EVP_MAX_IV_LENGTH]; /* working iv */ - unsigned char buf[EVP_MAX_BLOCK_LENGTH];/* saved partial block */ - int num; /* used by cfb/ofb mode */ - - void *app_data; /* application stuff */ - int key_len; /* May change for variable length cipher */ - unsigned long flags; /* Various flags */ - void *cipher_data; /* per EVP data */ - int final_used; - int block_mask; - unsigned char final[EVP_MAX_BLOCK_LENGTH];/* possible final block */ - } /* EVP_CIPHER_CTX */; - -typedef struct evp_Encode_Ctx_st - { - int num; /* number saved in a partial encode/decode */ - int length; /* The length is either the output line length - * (in input bytes) or the shortest input line - * length that is ok. Once decoding begins, - * the length is adjusted up each time a longer - * line is decoded */ - unsigned char enc_data[80]; /* data to encode */ - int line_num; /* number read on current line */ - int expect_nl; - } EVP_ENCODE_CTX; - -/* Password based encryption function */ -typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, - ASN1_TYPE *param, const EVP_CIPHER *cipher, - const EVP_MD *md, int en_de); - -#ifndef OPENSSL_NO_RSA -#define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\ - (char *)(rsa)) -#endif - -#ifndef OPENSSL_NO_DSA -#define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\ - (char *)(dsa)) -#endif - -#ifndef OPENSSL_NO_DH -#define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\ - (char *)(dh)) -#endif - -#ifndef OPENSSL_NO_EC -#define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\ - (char *)(eckey)) -#endif - -/* Add some extra combinations */ -#define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a)) -#define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a)) -#define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) -#define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) - -/* Macros to reduce FIPS dependencies: do NOT use in applications */ -#define M_EVP_MD_size(e) ((e)->md_size) -#define M_EVP_MD_block_size(e) ((e)->block_size) -#define M_EVP_MD_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs)) -#define M_EVP_MD_CTX_clear_flags(ctx,flgs) ((ctx)->flags&=~(flgs)) -#define M_EVP_MD_CTX_test_flags(ctx,flgs) ((ctx)->flags&(flgs)) -#define M_EVP_MD_type(e) ((e)->type) -#define M_EVP_MD_CTX_type(e) M_EVP_MD_type(M_EVP_MD_CTX_md(e)) -#define M_EVP_MD_CTX_md(e) ((e)->digest) - -#define M_EVP_CIPHER_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs)) - -int EVP_MD_type(const EVP_MD *md); -#define EVP_MD_nid(e) EVP_MD_type(e) -#define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e)) -int EVP_MD_pkey_type(const EVP_MD *md); -int EVP_MD_size(const EVP_MD *md); -int EVP_MD_block_size(const EVP_MD *md); - -const EVP_MD * EVP_MD_CTX_md(const EVP_MD_CTX *ctx); -#define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) -#define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) -#define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) - -int EVP_CIPHER_nid(const EVP_CIPHER *cipher); -#define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e)) -int EVP_CIPHER_block_size(const EVP_CIPHER *cipher); -int EVP_CIPHER_key_length(const EVP_CIPHER *cipher); -int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher); -unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher); -#define EVP_CIPHER_mode(e) (EVP_CIPHER_flags(e) & EVP_CIPH_MODE) - -const EVP_CIPHER * EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); -int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); -int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx); -int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx); -int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx); -void * EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); -void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); -#define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) -unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); -#define EVP_CIPHER_CTX_mode(e) (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE) - -#define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) -#define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) - -#define EVP_SignInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c) -#define EVP_SignInit(a,b) EVP_DigestInit(a,b) -#define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) -#define EVP_VerifyInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c) -#define EVP_VerifyInit(a,b) EVP_DigestInit(a,b) -#define EVP_VerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) -#define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e) -#define EVP_SealUpdate(a,b,c,d,e) EVP_EncryptUpdate(a,b,c,d,e) - -#ifdef CONST_STRICT -void BIO_set_md(BIO *,const EVP_MD *md); -#else -# define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)md) -#endif -#define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp) -#define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp) -#define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp) -#define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL) -#define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(char *)c_pp) - -int EVP_Cipher(EVP_CIPHER_CTX *c, - unsigned char *out, - const unsigned char *in, - unsigned int inl); - -#define EVP_add_cipher_alias(n,alias) \ - OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n)) -#define EVP_add_digest_alias(n,alias) \ - OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n)) -#define EVP_delete_cipher_alias(alias) \ - OBJ_NAME_remove(alias,OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS); -#define EVP_delete_digest_alias(alias) \ - OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS); - -void EVP_MD_CTX_init(EVP_MD_CTX *ctx); -int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx); -EVP_MD_CTX *EVP_MD_CTX_create(void); -void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); -int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in); -void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags); -void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); -int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx,int flags); -int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl); -int EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d, - size_t cnt); -int EVP_DigestFinal_ex(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); -int EVP_Digest(const void *data, size_t count, - unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl); - -int EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in); -int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type); -int EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); - -int EVP_read_pw_string(char *buf,int length,const char *prompt,int verify); -void EVP_set_pw_prompt(const char *prompt); -char * EVP_get_pw_prompt(void); - -int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md, - const unsigned char *salt, const unsigned char *data, - int datal, int count, unsigned char *key,unsigned char *iv); - -void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags); -void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags); -int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx,int flags); - -int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, - const unsigned char *key, const unsigned char *iv); -int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl, - const unsigned char *key, const unsigned char *iv); -int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, - int *outl, const unsigned char *in, int inl); -int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); -int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); - -int EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, - const unsigned char *key, const unsigned char *iv); -int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl, - const unsigned char *key, const unsigned char *iv); -int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, - int *outl, const unsigned char *in, int inl); -int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); -int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); - -int EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, - const unsigned char *key,const unsigned char *iv, - int enc); -int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl, - const unsigned char *key,const unsigned char *iv, - int enc); -int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, - int *outl, const unsigned char *in, int inl); -int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); -int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); - -int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s, - EVP_PKEY *pkey); - -int EVP_VerifyFinal(EVP_MD_CTX *ctx,const unsigned char *sigbuf, - unsigned int siglen,EVP_PKEY *pkey); - -int EVP_OpenInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, - const unsigned char *ek, int ekl, const unsigned char *iv, - EVP_PKEY *priv); -int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); - -int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, - unsigned char **ek, int *ekl, unsigned char *iv, - EVP_PKEY **pubk, int npubk); -int EVP_SealFinal(EVP_CIPHER_CTX *ctx,unsigned char *out,int *outl); - -void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); -void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl, - const unsigned char *in,int inl); -void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl); -int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); - -void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); -int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl, - const unsigned char *in, int inl); -int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned - char *out, int *outl); -int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); - -void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); -int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); -EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); -void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a); -int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); -int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad); -int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); -int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key); - -#ifndef OPENSSL_NO_BIO -BIO_METHOD *BIO_f_md(void); -BIO_METHOD *BIO_f_base64(void); -BIO_METHOD *BIO_f_cipher(void); -BIO_METHOD *BIO_f_reliable(void); -void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,const unsigned char *k, - const unsigned char *i, int enc); -#endif - -const EVP_MD *EVP_md_null(void); -#ifndef OPENSSL_NO_MD2 -const EVP_MD *EVP_md2(void); -#endif -#ifndef OPENSSL_NO_MD4 -const EVP_MD *EVP_md4(void); -#endif -#ifndef OPENSSL_NO_MD5 -const EVP_MD *EVP_md5(void); -#endif -#ifndef OPENSSL_NO_SHA -const EVP_MD *EVP_sha(void); -const EVP_MD *EVP_sha1(void); -const EVP_MD *EVP_dss(void); -const EVP_MD *EVP_dss1(void); -const EVP_MD *EVP_ecdsa(void); -#endif -#ifndef OPENSSL_NO_SHA256 -const EVP_MD *EVP_sha224(void); -const EVP_MD *EVP_sha256(void); -#endif -#ifndef OPENSSL_NO_SHA512 -const EVP_MD *EVP_sha384(void); -const EVP_MD *EVP_sha512(void); -#endif -#ifndef OPENSSL_NO_MDC2 -const EVP_MD *EVP_mdc2(void); -#endif -#ifndef OPENSSL_NO_RIPEMD -const EVP_MD *EVP_ripemd160(void); -#endif -const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */ -#ifndef OPENSSL_NO_DES -const EVP_CIPHER *EVP_des_ecb(void); -const EVP_CIPHER *EVP_des_ede(void); -const EVP_CIPHER *EVP_des_ede3(void); -const EVP_CIPHER *EVP_des_ede_ecb(void); -const EVP_CIPHER *EVP_des_ede3_ecb(void); -const EVP_CIPHER *EVP_des_cfb64(void); -# define EVP_des_cfb EVP_des_cfb64 -const EVP_CIPHER *EVP_des_cfb1(void); -const EVP_CIPHER *EVP_des_cfb8(void); -const EVP_CIPHER *EVP_des_ede_cfb64(void); -# define EVP_des_ede_cfb EVP_des_ede_cfb64 -#if 0 -const EVP_CIPHER *EVP_des_ede_cfb1(void); -const EVP_CIPHER *EVP_des_ede_cfb8(void); -#endif -const EVP_CIPHER *EVP_des_ede3_cfb64(void); -# define EVP_des_ede3_cfb EVP_des_ede3_cfb64 -const EVP_CIPHER *EVP_des_ede3_cfb1(void); -const EVP_CIPHER *EVP_des_ede3_cfb8(void); -const EVP_CIPHER *EVP_des_ofb(void); -const EVP_CIPHER *EVP_des_ede_ofb(void); -const EVP_CIPHER *EVP_des_ede3_ofb(void); -const EVP_CIPHER *EVP_des_cbc(void); -const EVP_CIPHER *EVP_des_ede_cbc(void); -const EVP_CIPHER *EVP_des_ede3_cbc(void); -const EVP_CIPHER *EVP_desx_cbc(void); -/* This should now be supported through the dev_crypto ENGINE. But also, why are - * rc4 and md5 declarations made here inside a "NO_DES" precompiler branch? */ -#if 0 -# ifdef OPENSSL_OPENBSD_DEV_CRYPTO -const EVP_CIPHER *EVP_dev_crypto_des_ede3_cbc(void); -const EVP_CIPHER *EVP_dev_crypto_rc4(void); -const EVP_MD *EVP_dev_crypto_md5(void); -# endif -#endif -#endif -#ifndef OPENSSL_NO_RC4 -const EVP_CIPHER *EVP_rc4(void); -const EVP_CIPHER *EVP_rc4_40(void); -#endif -#ifndef OPENSSL_NO_IDEA -const EVP_CIPHER *EVP_idea_ecb(void); -const EVP_CIPHER *EVP_idea_cfb64(void); -# define EVP_idea_cfb EVP_idea_cfb64 -const EVP_CIPHER *EVP_idea_ofb(void); -const EVP_CIPHER *EVP_idea_cbc(void); -#endif -#ifndef OPENSSL_NO_RC2 -const EVP_CIPHER *EVP_rc2_ecb(void); -const EVP_CIPHER *EVP_rc2_cbc(void); -const EVP_CIPHER *EVP_rc2_40_cbc(void); -const EVP_CIPHER *EVP_rc2_64_cbc(void); -const EVP_CIPHER *EVP_rc2_cfb64(void); -# define EVP_rc2_cfb EVP_rc2_cfb64 -const EVP_CIPHER *EVP_rc2_ofb(void); -#endif -#ifndef OPENSSL_NO_BF -const EVP_CIPHER *EVP_bf_ecb(void); -const EVP_CIPHER *EVP_bf_cbc(void); -const EVP_CIPHER *EVP_bf_cfb64(void); -# define EVP_bf_cfb EVP_bf_cfb64 -const EVP_CIPHER *EVP_bf_ofb(void); -#endif -#ifndef OPENSSL_NO_CAST -const EVP_CIPHER *EVP_cast5_ecb(void); -const EVP_CIPHER *EVP_cast5_cbc(void); -const EVP_CIPHER *EVP_cast5_cfb64(void); -# define EVP_cast5_cfb EVP_cast5_cfb64 -const EVP_CIPHER *EVP_cast5_ofb(void); -#endif -#ifndef OPENSSL_NO_RC5 -const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void); -const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void); -const EVP_CIPHER *EVP_rc5_32_12_16_cfb64(void); -# define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64 -const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void); -#endif -#ifndef OPENSSL_NO_AES -const EVP_CIPHER *EVP_aes_128_ecb(void); -const EVP_CIPHER *EVP_aes_128_cbc(void); -const EVP_CIPHER *EVP_aes_128_cfb1(void); -const EVP_CIPHER *EVP_aes_128_cfb8(void); -const EVP_CIPHER *EVP_aes_128_cfb128(void); -# define EVP_aes_128_cfb EVP_aes_128_cfb128 -const EVP_CIPHER *EVP_aes_128_ofb(void); -#if 0 -const EVP_CIPHER *EVP_aes_128_ctr(void); -#endif -const EVP_CIPHER *EVP_aes_192_ecb(void); -const EVP_CIPHER *EVP_aes_192_cbc(void); -const EVP_CIPHER *EVP_aes_192_cfb1(void); -const EVP_CIPHER *EVP_aes_192_cfb8(void); -const EVP_CIPHER *EVP_aes_192_cfb128(void); -# define EVP_aes_192_cfb EVP_aes_192_cfb128 -const EVP_CIPHER *EVP_aes_192_ofb(void); -#if 0 -const EVP_CIPHER *EVP_aes_192_ctr(void); -#endif -const EVP_CIPHER *EVP_aes_256_ecb(void); -const EVP_CIPHER *EVP_aes_256_cbc(void); -const EVP_CIPHER *EVP_aes_256_cfb1(void); -const EVP_CIPHER *EVP_aes_256_cfb8(void); -const EVP_CIPHER *EVP_aes_256_cfb128(void); -# define EVP_aes_256_cfb EVP_aes_256_cfb128 -const EVP_CIPHER *EVP_aes_256_ofb(void); -#if 0 -const EVP_CIPHER *EVP_aes_256_ctr(void); -#endif -#endif -#ifndef OPENSSL_NO_CAMELLIA -const EVP_CIPHER *EVP_camellia_128_ecb(void); -const EVP_CIPHER *EVP_camellia_128_cbc(void); -const EVP_CIPHER *EVP_camellia_128_cfb1(void); -const EVP_CIPHER *EVP_camellia_128_cfb8(void); -const EVP_CIPHER *EVP_camellia_128_cfb128(void); -# define EVP_camellia_128_cfb EVP_camellia_128_cfb128 -const EVP_CIPHER *EVP_camellia_128_ofb(void); -const EVP_CIPHER *EVP_camellia_192_ecb(void); -const EVP_CIPHER *EVP_camellia_192_cbc(void); -const EVP_CIPHER *EVP_camellia_192_cfb1(void); -const EVP_CIPHER *EVP_camellia_192_cfb8(void); -const EVP_CIPHER *EVP_camellia_192_cfb128(void); -# define EVP_camellia_192_cfb EVP_camellia_192_cfb128 -const EVP_CIPHER *EVP_camellia_192_ofb(void); -const EVP_CIPHER *EVP_camellia_256_ecb(void); -const EVP_CIPHER *EVP_camellia_256_cbc(void); -const EVP_CIPHER *EVP_camellia_256_cfb1(void); -const EVP_CIPHER *EVP_camellia_256_cfb8(void); -const EVP_CIPHER *EVP_camellia_256_cfb128(void); -# define EVP_camellia_256_cfb EVP_camellia_256_cfb128 -const EVP_CIPHER *EVP_camellia_256_ofb(void); -#endif - -#ifndef OPENSSL_NO_SEED -const EVP_CIPHER *EVP_seed_ecb(void); -const EVP_CIPHER *EVP_seed_cbc(void); -const EVP_CIPHER *EVP_seed_cfb128(void); -# define EVP_seed_cfb EVP_seed_cfb128 -const EVP_CIPHER *EVP_seed_ofb(void); -#endif - -void OPENSSL_add_all_algorithms_noconf(void); -void OPENSSL_add_all_algorithms_conf(void); - -#ifdef OPENSSL_LOAD_CONF -#define OpenSSL_add_all_algorithms() \ - OPENSSL_add_all_algorithms_conf() -#else -#define OpenSSL_add_all_algorithms() \ - OPENSSL_add_all_algorithms_noconf() -#endif - -void OpenSSL_add_all_ciphers(void); -void OpenSSL_add_all_digests(void); -#define SSLeay_add_all_algorithms() OpenSSL_add_all_algorithms() -#define SSLeay_add_all_ciphers() OpenSSL_add_all_ciphers() -#define SSLeay_add_all_digests() OpenSSL_add_all_digests() - -int EVP_add_cipher(const EVP_CIPHER *cipher); -int EVP_add_digest(const EVP_MD *digest); - -const EVP_CIPHER *EVP_get_cipherbyname(const char *name); -const EVP_MD *EVP_get_digestbyname(const char *name); -void EVP_cleanup(void); - -int EVP_PKEY_decrypt(unsigned char *dec_key, - const unsigned char *enc_key,int enc_key_len, - EVP_PKEY *private_key); -int EVP_PKEY_encrypt(unsigned char *enc_key, - const unsigned char *key,int key_len, - EVP_PKEY *pub_key); -int EVP_PKEY_type(int type); -int EVP_PKEY_bits(EVP_PKEY *pkey); -int EVP_PKEY_size(EVP_PKEY *pkey); -int EVP_PKEY_assign(EVP_PKEY *pkey,int type,char *key); - -#ifndef OPENSSL_NO_RSA -struct rsa_st; -int EVP_PKEY_set1_RSA(EVP_PKEY *pkey,struct rsa_st *key); -struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey); -#endif -#ifndef OPENSSL_NO_DSA -struct dsa_st; -int EVP_PKEY_set1_DSA(EVP_PKEY *pkey,struct dsa_st *key); -struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey); -#endif -#ifndef OPENSSL_NO_DH -struct dh_st; -int EVP_PKEY_set1_DH(EVP_PKEY *pkey,struct dh_st *key); -struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); -#endif -#ifndef OPENSSL_NO_EC -struct ec_key_st; -int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey,struct ec_key_st *key); -struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); -#endif - -EVP_PKEY * EVP_PKEY_new(void); -void EVP_PKEY_free(EVP_PKEY *pkey); - -EVP_PKEY * d2i_PublicKey(int type,EVP_PKEY **a, const unsigned char **pp, - long length); -int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp); - -EVP_PKEY * d2i_PrivateKey(int type,EVP_PKEY **a, const unsigned char **pp, - long length); -EVP_PKEY * d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, - long length); -int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp); - -int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); -int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); -int EVP_PKEY_save_parameters(EVP_PKEY *pkey,int mode); -int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); - -int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); - -int EVP_CIPHER_type(const EVP_CIPHER *ctx); - -/* calls methods */ -int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); -int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); - -/* These are used by EVP_CIPHER methods */ -int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c,ASN1_TYPE *type); -int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c,ASN1_TYPE *type); - -/* PKCS5 password based encryption */ -int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, - ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, - int en_de); -int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, - const unsigned char *salt, int saltlen, int iter, - int keylen, unsigned char *out); -int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, - ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, - int en_de); - -void PKCS5_PBE_add(void); - -int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, - ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); -int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md, - EVP_PBE_KEYGEN *keygen); -void EVP_PBE_cleanup(void); - -#ifdef OPENSSL_FIPS -#ifndef OPENSSL_NO_ENGINE -void int_EVP_MD_set_engine_callbacks( - int (*eng_md_init)(ENGINE *impl), - int (*eng_md_fin)(ENGINE *impl), - int (*eng_md_evp) - (EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl)); -void int_EVP_MD_init_engine_callbacks(void); -void int_EVP_CIPHER_set_engine_callbacks( - int (*eng_ciph_fin)(ENGINE *impl), - int (*eng_ciph_evp) - (EVP_CIPHER_CTX *ctx, const EVP_CIPHER **pciph, ENGINE *impl)); -void int_EVP_CIPHER_init_engine_callbacks(void); -#endif -#endif - -void EVP_add_alg_module(void); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_EVP_strings(void); - -/* Error codes for the EVP functions. */ - -/* Function codes. */ -#define EVP_F_AES_INIT_KEY 133 -#define EVP_F_ALG_MODULE_INIT 138 -#define EVP_F_CAMELLIA_INIT_KEY 159 -#define EVP_F_D2I_PKEY 100 -#define EVP_F_DO_EVP_ENC_ENGINE 140 -#define EVP_F_DO_EVP_ENC_ENGINE_FULL 141 -#define EVP_F_DO_EVP_MD_ENGINE 139 -#define EVP_F_DO_EVP_MD_ENGINE_FULL 142 -#define EVP_F_DSAPKEY2PKCS8 134 -#define EVP_F_DSA_PKEY2PKCS8 135 -#define EVP_F_ECDSA_PKEY2PKCS8 129 -#define EVP_F_ECKEY_PKEY2PKCS8 132 -#define EVP_F_EVP_CIPHERINIT 137 -#define EVP_F_EVP_CIPHERINIT_EX 123 -#define EVP_F_EVP_CIPHER_CTX_CTRL 124 -#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 -#define EVP_F_EVP_DECRYPTFINAL_EX 101 -#define EVP_F_EVP_DIGESTINIT 136 -#define EVP_F_EVP_DIGESTINIT_EX 128 -#define EVP_F_EVP_ENCRYPTFINAL_EX 127 -#define EVP_F_EVP_MD_CTX_COPY_EX 110 -#define EVP_F_EVP_OPENINIT 102 -#define EVP_F_EVP_PBE_ALG_ADD 115 -#define EVP_F_EVP_PBE_CIPHERINIT 116 -#define EVP_F_EVP_PKCS82PKEY 111 -#define EVP_F_EVP_PKEY2PKCS8_BROKEN 113 -#define EVP_F_EVP_PKEY_COPY_PARAMETERS 103 -#define EVP_F_EVP_PKEY_DECRYPT 104 -#define EVP_F_EVP_PKEY_ENCRYPT 105 -#define EVP_F_EVP_PKEY_GET1_DH 119 -#define EVP_F_EVP_PKEY_GET1_DSA 120 -#define EVP_F_EVP_PKEY_GET1_ECDSA 130 -#define EVP_F_EVP_PKEY_GET1_EC_KEY 131 -#define EVP_F_EVP_PKEY_GET1_RSA 121 -#define EVP_F_EVP_PKEY_NEW 106 -#define EVP_F_EVP_RIJNDAEL 126 -#define EVP_F_EVP_SIGNFINAL 107 -#define EVP_F_EVP_VERIFYFINAL 108 -#define EVP_F_PKCS5_PBE_KEYIVGEN 117 -#define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 -#define EVP_F_PKCS8_SET_BROKEN 112 -#define EVP_F_RC2_MAGIC_TO_METH 109 -#define EVP_F_RC5_CTRL 125 - -/* Reason codes. */ -#define EVP_R_AES_KEY_SETUP_FAILED 143 -#define EVP_R_ASN1_LIB 140 -#define EVP_R_BAD_BLOCK_LENGTH 136 -#define EVP_R_BAD_DECRYPT 100 -#define EVP_R_BAD_KEY_LENGTH 137 -#define EVP_R_BN_DECODE_ERROR 112 -#define EVP_R_BN_PUBKEY_ERROR 113 -#define EVP_R_CAMELLIA_KEY_SETUP_FAILED 157 -#define EVP_R_CIPHER_PARAMETER_ERROR 122 -#define EVP_R_CTRL_NOT_IMPLEMENTED 132 -#define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133 -#define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 -#define EVP_R_DECODE_ERROR 114 -#define EVP_R_DIFFERENT_KEY_TYPES 101 -#define EVP_R_DISABLED_FOR_FIPS 144 -#define EVP_R_ENCODE_ERROR 115 -#define EVP_R_ERROR_LOADING_SECTION 145 -#define EVP_R_ERROR_SETTING_FIPS_MODE 146 -#define EVP_R_EVP_PBE_CIPHERINIT_ERROR 119 -#define EVP_R_EXPECTING_AN_RSA_KEY 127 -#define EVP_R_EXPECTING_A_DH_KEY 128 -#define EVP_R_EXPECTING_A_DSA_KEY 129 -#define EVP_R_EXPECTING_A_ECDSA_KEY 141 -#define EVP_R_EXPECTING_A_EC_KEY 142 -#define EVP_R_FIPS_MODE_NOT_SUPPORTED 147 -#define EVP_R_INITIALIZATION_ERROR 134 -#define EVP_R_INPUT_NOT_INITIALIZED 111 -#define EVP_R_INVALID_FIPS_MODE 148 -#define EVP_R_INVALID_KEY_LENGTH 130 -#define EVP_R_IV_TOO_LARGE 102 -#define EVP_R_KEYGEN_FAILURE 120 -#define EVP_R_MISSING_PARAMETERS 103 -#define EVP_R_NO_CIPHER_SET 131 -#define EVP_R_NO_DIGEST_SET 139 -#define EVP_R_NO_DSA_PARAMETERS 116 -#define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104 -#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 -#define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117 -#define EVP_R_PUBLIC_KEY_NOT_RSA 106 -#define EVP_R_UNKNOWN_OPTION 149 -#define EVP_R_UNKNOWN_PBE_ALGORITHM 121 -#define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS 135 -#define EVP_R_UNSUPPORTED_CIPHER 107 -#define EVP_R_UNSUPPORTED_KEYLENGTH 123 -#define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 124 -#define EVP_R_UNSUPPORTED_KEY_SIZE 108 -#define EVP_R_UNSUPPORTED_PRF 125 -#define EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM 118 -#define EVP_R_UNSUPPORTED_SALT_TYPE 126 -#define EVP_R_WRONG_FINAL_BLOCK_LENGTH 109 -#define EVP_R_WRONG_PUBLIC_KEY_TYPE 110 -#define EVP_R_SEED_KEY_SETUP_FAILED 162 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/hmac.h b/externals/openssl/hmac.h deleted file mode 100644 index fc38ffb52b..0000000000 --- a/externals/openssl/hmac.h +++ /dev/null @@ -1,109 +0,0 @@ -/* crypto/hmac/hmac.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#ifndef HEADER_HMAC_H -#define HEADER_HMAC_H - -#include - -#ifdef OPENSSL_NO_HMAC -#error HMAC is disabled. -#endif - -#include - -#define HMAC_MAX_MD_CBLOCK 128 /* largest known is SHA512 */ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct hmac_ctx_st - { - const EVP_MD *md; - EVP_MD_CTX md_ctx; - EVP_MD_CTX i_ctx; - EVP_MD_CTX o_ctx; - unsigned int key_length; - unsigned char key[HMAC_MAX_MD_CBLOCK]; - } HMAC_CTX; - -#define HMAC_size(e) (EVP_MD_size((e)->md)) - - -void HMAC_CTX_init(HMAC_CTX *ctx); -void HMAC_CTX_cleanup(HMAC_CTX *ctx); - -#define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */ - -void HMAC_Init(HMAC_CTX *ctx, const void *key, int len, - const EVP_MD *md); /* deprecated */ -void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, - const EVP_MD *md, ENGINE *impl); -void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); -void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); -unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, - const unsigned char *d, size_t n, unsigned char *md, - unsigned int *md_len); - -void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/idea.h b/externals/openssl/idea.h deleted file mode 100644 index a137d4cbce..0000000000 --- a/externals/openssl/idea.h +++ /dev/null @@ -1,103 +0,0 @@ -/* crypto/idea/idea.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_IDEA_H -#define HEADER_IDEA_H - -#include /* IDEA_INT, OPENSSL_NO_IDEA */ - -#ifdef OPENSSL_NO_IDEA -#error IDEA is disabled. -#endif - -#define IDEA_ENCRYPT 1 -#define IDEA_DECRYPT 0 - -#define IDEA_BLOCK 8 -#define IDEA_KEY_LENGTH 16 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct idea_key_st - { - IDEA_INT data[9][6]; - } IDEA_KEY_SCHEDULE; - -const char *idea_options(void); -void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, - IDEA_KEY_SCHEDULE *ks); -#ifdef OPENSSL_FIPS -void private_idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); -#endif -void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); -void idea_set_decrypt_key(const IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); -void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, - long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); -void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, - int *num,int enc); -void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); -void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/krb5_asn.h b/externals/openssl/krb5_asn.h deleted file mode 100644 index 66c0629bcd..0000000000 --- a/externals/openssl/krb5_asn.h +++ /dev/null @@ -1,257 +0,0 @@ -/* krb5_asn.h */ -/* Written by Vern Staats for the OpenSSL project, -** using ocsp/{*.h,*asn*.c} as a starting point -*/ - -/* ==================================================================== - * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_KRB5_ASN_H -#define HEADER_KRB5_ASN_H - -/* -#include -*/ -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -/* ASN.1 from Kerberos RFC 1510 -*/ - -/* EncryptedData ::= SEQUENCE { -** etype[0] INTEGER, -- EncryptionType -** kvno[1] INTEGER OPTIONAL, -** cipher[2] OCTET STRING -- ciphertext -** } -*/ -typedef struct krb5_encdata_st - { - ASN1_INTEGER *etype; - ASN1_INTEGER *kvno; - ASN1_OCTET_STRING *cipher; - } KRB5_ENCDATA; - -DECLARE_STACK_OF(KRB5_ENCDATA) - -/* PrincipalName ::= SEQUENCE { -** name-type[0] INTEGER, -** name-string[1] SEQUENCE OF GeneralString -** } -*/ -typedef struct krb5_princname_st - { - ASN1_INTEGER *nametype; - STACK_OF(ASN1_GENERALSTRING) *namestring; - } KRB5_PRINCNAME; - -DECLARE_STACK_OF(KRB5_PRINCNAME) - - -/* Ticket ::= [APPLICATION 1] SEQUENCE { -** tkt-vno[0] INTEGER, -** realm[1] Realm, -** sname[2] PrincipalName, -** enc-part[3] EncryptedData -** } -*/ -typedef struct krb5_tktbody_st - { - ASN1_INTEGER *tktvno; - ASN1_GENERALSTRING *realm; - KRB5_PRINCNAME *sname; - KRB5_ENCDATA *encdata; - } KRB5_TKTBODY; - -typedef STACK_OF(KRB5_TKTBODY) KRB5_TICKET; -DECLARE_STACK_OF(KRB5_TKTBODY) - - -/* AP-REQ ::= [APPLICATION 14] SEQUENCE { -** pvno[0] INTEGER, -** msg-type[1] INTEGER, -** ap-options[2] APOptions, -** ticket[3] Ticket, -** authenticator[4] EncryptedData -** } -** -** APOptions ::= BIT STRING { -** reserved(0), use-session-key(1), mutual-required(2) } -*/ -typedef struct krb5_ap_req_st - { - ASN1_INTEGER *pvno; - ASN1_INTEGER *msgtype; - ASN1_BIT_STRING *apoptions; - KRB5_TICKET *ticket; - KRB5_ENCDATA *authenticator; - } KRB5_APREQBODY; - -typedef STACK_OF(KRB5_APREQBODY) KRB5_APREQ; -DECLARE_STACK_OF(KRB5_APREQBODY) - - -/* Authenticator Stuff */ - - -/* Checksum ::= SEQUENCE { -** cksumtype[0] INTEGER, -** checksum[1] OCTET STRING -** } -*/ -typedef struct krb5_checksum_st - { - ASN1_INTEGER *ctype; - ASN1_OCTET_STRING *checksum; - } KRB5_CHECKSUM; - -DECLARE_STACK_OF(KRB5_CHECKSUM) - - -/* EncryptionKey ::= SEQUENCE { -** keytype[0] INTEGER, -** keyvalue[1] OCTET STRING -** } -*/ -typedef struct krb5_encryptionkey_st - { - ASN1_INTEGER *ktype; - ASN1_OCTET_STRING *keyvalue; - } KRB5_ENCKEY; - -DECLARE_STACK_OF(KRB5_ENCKEY) - - -/* AuthorizationData ::= SEQUENCE OF SEQUENCE { -** ad-type[0] INTEGER, -** ad-data[1] OCTET STRING -** } -*/ -typedef struct krb5_authorization_st - { - ASN1_INTEGER *adtype; - ASN1_OCTET_STRING *addata; - } KRB5_AUTHDATA; - -DECLARE_STACK_OF(KRB5_AUTHDATA) - - -/* -- Unencrypted authenticator -** Authenticator ::= [APPLICATION 2] SEQUENCE { -** authenticator-vno[0] INTEGER, -** crealm[1] Realm, -** cname[2] PrincipalName, -** cksum[3] Checksum OPTIONAL, -** cusec[4] INTEGER, -** ctime[5] KerberosTime, -** subkey[6] EncryptionKey OPTIONAL, -** seq-number[7] INTEGER OPTIONAL, -** authorization-data[8] AuthorizationData OPTIONAL -** } -*/ -typedef struct krb5_authenticator_st - { - ASN1_INTEGER *avno; - ASN1_GENERALSTRING *crealm; - KRB5_PRINCNAME *cname; - KRB5_CHECKSUM *cksum; - ASN1_INTEGER *cusec; - ASN1_GENERALIZEDTIME *ctime; - KRB5_ENCKEY *subkey; - ASN1_INTEGER *seqnum; - KRB5_AUTHDATA *authorization; - } KRB5_AUTHENTBODY; - -typedef STACK_OF(KRB5_AUTHENTBODY) KRB5_AUTHENT; -DECLARE_STACK_OF(KRB5_AUTHENTBODY) - - -/* DECLARE_ASN1_FUNCTIONS(type) = DECLARE_ASN1_FUNCTIONS_name(type, type) = -** type *name##_new(void); -** void name##_free(type *a); -** DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name) = -** DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) = -** type *d2i_##name(type **a, const unsigned char **in, long len); -** int i2d_##name(type *a, unsigned char **out); -** DECLARE_ASN1_ITEM(itname) = OPENSSL_EXTERN const ASN1_ITEM itname##_it -*/ - -DECLARE_ASN1_FUNCTIONS(KRB5_ENCDATA) -DECLARE_ASN1_FUNCTIONS(KRB5_PRINCNAME) -DECLARE_ASN1_FUNCTIONS(KRB5_TKTBODY) -DECLARE_ASN1_FUNCTIONS(KRB5_APREQBODY) -DECLARE_ASN1_FUNCTIONS(KRB5_TICKET) -DECLARE_ASN1_FUNCTIONS(KRB5_APREQ) - -DECLARE_ASN1_FUNCTIONS(KRB5_CHECKSUM) -DECLARE_ASN1_FUNCTIONS(KRB5_ENCKEY) -DECLARE_ASN1_FUNCTIONS(KRB5_AUTHDATA) -DECLARE_ASN1_FUNCTIONS(KRB5_AUTHENTBODY) -DECLARE_ASN1_FUNCTIONS(KRB5_AUTHENT) - - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/externals/openssl/kssl.h b/externals/openssl/kssl.h deleted file mode 100644 index e920e1ceea..0000000000 --- a/externals/openssl/kssl.h +++ /dev/null @@ -1,180 +0,0 @@ -/* ssl/kssl.h -*- mode: C; c-file-style: "eay" -*- */ -/* Written by Vern Staats for the OpenSSL project 2000. - * project 2000. - */ -/* ==================================================================== - * Copyright (c) 2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -/* -** 19990701 VRS Started. -*/ - -#ifndef KSSL_H -#define KSSL_H - -#include - -#ifndef OPENSSL_NO_KRB5 - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Depending on which KRB5 implementation used, some types from -** the other may be missing. Resolve that here and now -*/ -#ifdef KRB5_HEIMDAL -typedef unsigned char krb5_octet; -#define FAR -#else - -#ifndef FAR -#define FAR -#endif - -#endif - -/* Uncomment this to debug kssl problems or -** to trace usage of the Kerberos session key -** -** #define KSSL_DEBUG -*/ - -#ifndef KRB5SVC -#define KRB5SVC "host" -#endif - -#ifndef KRB5KEYTAB -#define KRB5KEYTAB "/etc/krb5.keytab" -#endif - -#ifndef KRB5SENDAUTH -#define KRB5SENDAUTH 1 -#endif - -#ifndef KRB5CHECKAUTH -#define KRB5CHECKAUTH 1 -#endif - -#ifndef KSSL_CLOCKSKEW -#define KSSL_CLOCKSKEW 300; -#endif - -#define KSSL_ERR_MAX 255 -typedef struct kssl_err_st { - int reason; - char text[KSSL_ERR_MAX+1]; - } KSSL_ERR; - - -/* Context for passing -** (1) Kerberos session key to SSL, and -** (2) Config data between application and SSL lib -*/ -typedef struct kssl_ctx_st - { - /* used by: disposition: */ - char *service_name; /* C,S default ok (kssl) */ - char *service_host; /* C input, REQUIRED */ - char *client_princ; /* S output from krb5 ticket */ - char *keytab_file; /* S NULL (/etc/krb5.keytab) */ - char *cred_cache; /* C NULL (default) */ - krb5_enctype enctype; - int length; - krb5_octet FAR *key; - } KSSL_CTX; - -#define KSSL_CLIENT 1 -#define KSSL_SERVER 2 -#define KSSL_SERVICE 3 -#define KSSL_KEYTAB 4 - -#define KSSL_CTX_OK 0 -#define KSSL_CTX_ERR 1 -#define KSSL_NOMEM 2 - -/* Public (for use by applications that use OpenSSL with Kerberos 5 support */ -krb5_error_code kssl_ctx_setstring(KSSL_CTX *kssl_ctx, int which, char *text); -KSSL_CTX *kssl_ctx_new(void); -KSSL_CTX *kssl_ctx_free(KSSL_CTX *kssl_ctx); -void kssl_ctx_show(KSSL_CTX *kssl_ctx); -krb5_error_code kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which, - krb5_data *realm, krb5_data *entity, int nentities); -krb5_error_code kssl_cget_tkt(KSSL_CTX *kssl_ctx, krb5_data **enc_tktp, - krb5_data *authenp, KSSL_ERR *kssl_err); -krb5_error_code kssl_sget_tkt(KSSL_CTX *kssl_ctx, krb5_data *indata, - krb5_ticket_times *ttimes, KSSL_ERR *kssl_err); -krb5_error_code kssl_ctx_setkey(KSSL_CTX *kssl_ctx, krb5_keyblock *session); -void kssl_err_set(KSSL_ERR *kssl_err, int reason, char *text); -void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data); -krb5_error_code kssl_build_principal_2(krb5_context context, - krb5_principal *princ, int rlen, const char *realm, - int slen, const char *svc, int hlen, const char *host); -krb5_error_code kssl_validate_times(krb5_timestamp atime, - krb5_ticket_times *ttimes); -krb5_error_code kssl_check_authent(KSSL_CTX *kssl_ctx, krb5_data *authentp, - krb5_timestamp *atimep, KSSL_ERR *kssl_err); -unsigned char *kssl_skip_confound(krb5_enctype enctype, unsigned char *authn); - -#ifdef __cplusplus -} -#endif -#endif /* OPENSSL_NO_KRB5 */ -#endif /* KSSL_H */ - diff --git a/externals/openssl/lhash.h b/externals/openssl/lhash.h deleted file mode 100644 index 9ae674e6c3..0000000000 --- a/externals/openssl/lhash.h +++ /dev/null @@ -1,201 +0,0 @@ -/* crypto/lhash/lhash.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -/* Header for dynamic hash table routines - * Author - Eric Young - */ - -#ifndef HEADER_LHASH_H -#define HEADER_LHASH_H - -#include -#ifndef OPENSSL_NO_FP_API -#include -#endif - -#ifndef OPENSSL_NO_BIO -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct lhash_node_st - { - void *data; - struct lhash_node_st *next; -#ifndef OPENSSL_NO_HASH_COMP - unsigned long hash; -#endif - } LHASH_NODE; - -typedef int (*LHASH_COMP_FN_TYPE)(const void *, const void *); -typedef unsigned long (*LHASH_HASH_FN_TYPE)(const void *); -typedef void (*LHASH_DOALL_FN_TYPE)(void *); -typedef void (*LHASH_DOALL_ARG_FN_TYPE)(void *, void *); - -/* Macros for declaring and implementing type-safe wrappers for LHASH callbacks. - * This way, callbacks can be provided to LHASH structures without function - * pointer casting and the macro-defined callbacks provide per-variable casting - * before deferring to the underlying type-specific callbacks. NB: It is - * possible to place a "static" in front of both the DECLARE and IMPLEMENT - * macros if the functions are strictly internal. */ - -/* First: "hash" functions */ -#define DECLARE_LHASH_HASH_FN(f_name,o_type) \ - unsigned long f_name##_LHASH_HASH(const void *); -#define IMPLEMENT_LHASH_HASH_FN(f_name,o_type) \ - unsigned long f_name##_LHASH_HASH(const void *arg) { \ - o_type a = (o_type)arg; \ - return f_name(a); } -#define LHASH_HASH_FN(f_name) f_name##_LHASH_HASH - -/* Second: "compare" functions */ -#define DECLARE_LHASH_COMP_FN(f_name,o_type) \ - int f_name##_LHASH_COMP(const void *, const void *); -#define IMPLEMENT_LHASH_COMP_FN(f_name,o_type) \ - int f_name##_LHASH_COMP(const void *arg1, const void *arg2) { \ - o_type a = (o_type)arg1; \ - o_type b = (o_type)arg2; \ - return f_name(a,b); } -#define LHASH_COMP_FN(f_name) f_name##_LHASH_COMP - -/* Third: "doall" functions */ -#define DECLARE_LHASH_DOALL_FN(f_name,o_type) \ - void f_name##_LHASH_DOALL(void *); -#define IMPLEMENT_LHASH_DOALL_FN(f_name,o_type) \ - void f_name##_LHASH_DOALL(void *arg) { \ - o_type a = (o_type)arg; \ - f_name(a); } -#define LHASH_DOALL_FN(f_name) f_name##_LHASH_DOALL - -/* Fourth: "doall_arg" functions */ -#define DECLARE_LHASH_DOALL_ARG_FN(f_name,o_type,a_type) \ - void f_name##_LHASH_DOALL_ARG(void *, void *); -#define IMPLEMENT_LHASH_DOALL_ARG_FN(f_name,o_type,a_type) \ - void f_name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \ - o_type a = (o_type)arg1; \ - a_type b = (a_type)arg2; \ - f_name(a,b); } -#define LHASH_DOALL_ARG_FN(f_name) f_name##_LHASH_DOALL_ARG - -typedef struct lhash_st - { - LHASH_NODE **b; - LHASH_COMP_FN_TYPE comp; - LHASH_HASH_FN_TYPE hash; - unsigned int num_nodes; - unsigned int num_alloc_nodes; - unsigned int p; - unsigned int pmax; - unsigned long up_load; /* load times 256 */ - unsigned long down_load; /* load times 256 */ - unsigned long num_items; - - unsigned long num_expands; - unsigned long num_expand_reallocs; - unsigned long num_contracts; - unsigned long num_contract_reallocs; - unsigned long num_hash_calls; - unsigned long num_comp_calls; - unsigned long num_insert; - unsigned long num_replace; - unsigned long num_delete; - unsigned long num_no_delete; - unsigned long num_retrieve; - unsigned long num_retrieve_miss; - unsigned long num_hash_comps; - - int error; - } LHASH; - -#define LH_LOAD_MULT 256 - -/* Indicates a malloc() error in the last call, this is only bad - * in lh_insert(). */ -#define lh_error(lh) ((lh)->error) - -LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c); -void lh_free(LHASH *lh); -void *lh_insert(LHASH *lh, void *data); -void *lh_delete(LHASH *lh, const void *data); -void *lh_retrieve(LHASH *lh, const void *data); -void lh_doall(LHASH *lh, LHASH_DOALL_FN_TYPE func); -void lh_doall_arg(LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg); -unsigned long lh_strhash(const char *c); -unsigned long lh_num_items(const LHASH *lh); - -#ifndef OPENSSL_NO_FP_API -void lh_stats(const LHASH *lh, FILE *out); -void lh_node_stats(const LHASH *lh, FILE *out); -void lh_node_usage_stats(const LHASH *lh, FILE *out); -#endif - -#ifndef OPENSSL_NO_BIO -void lh_stats_bio(const LHASH *lh, BIO *out); -void lh_node_stats_bio(const LHASH *lh, BIO *out); -void lh_node_usage_stats_bio(const LHASH *lh, BIO *out); -#endif -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/externals/openssl/md2.h b/externals/openssl/md2.h deleted file mode 100644 index d59c9f2593..0000000000 --- a/externals/openssl/md2.h +++ /dev/null @@ -1,95 +0,0 @@ -/* crypto/md/md2.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_MD2_H -#define HEADER_MD2_H - -#include /* OPENSSL_NO_MD2, MD2_INT */ -#ifdef OPENSSL_NO_MD2 -#error MD2 is disabled. -#endif -#include - -#define MD2_DIGEST_LENGTH 16 -#define MD2_BLOCK 16 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct MD2state_st - { - unsigned int num; - unsigned char data[MD2_BLOCK]; - MD2_INT cksm[MD2_BLOCK]; - MD2_INT state[MD2_BLOCK]; - } MD2_CTX; - -const char *MD2_options(void); -#ifdef OPENSSL_FIPS -int private_MD2_Init(MD2_CTX *c); -#endif -int MD2_Init(MD2_CTX *c); -int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); -int MD2_Final(unsigned char *md, MD2_CTX *c); -unsigned char *MD2(const unsigned char *d, size_t n,unsigned char *md); -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/md4.h b/externals/openssl/md4.h deleted file mode 100644 index ba1fe4a6ee..0000000000 --- a/externals/openssl/md4.h +++ /dev/null @@ -1,120 +0,0 @@ -/* crypto/md4/md4.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_MD4_H -#define HEADER_MD4_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef OPENSSL_NO_MD4 -#error MD4 is disabled. -#endif - -/* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * ! MD4_LONG has to be at least 32 bits wide. If it's wider, then ! - * ! MD4_LONG_LOG2 has to be defined along. ! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - -#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__) -#define MD4_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -#define MD4_LONG unsigned long -#define MD4_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ -#else -#define MD4_LONG unsigned int -#endif - -#define MD4_CBLOCK 64 -#define MD4_LBLOCK (MD4_CBLOCK/4) -#define MD4_DIGEST_LENGTH 16 - -typedef struct MD4state_st - { - MD4_LONG A,B,C,D; - MD4_LONG Nl,Nh; - MD4_LONG data[MD4_LBLOCK]; - unsigned int num; - } MD4_CTX; - -#ifdef OPENSSL_FIPS -int private_MD4_Init(MD4_CTX *c); -#endif -int MD4_Init(MD4_CTX *c); -int MD4_Update(MD4_CTX *c, const void *data, size_t len); -int MD4_Final(unsigned char *md, MD4_CTX *c); -unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); -void MD4_Transform(MD4_CTX *c, const unsigned char *b); -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/md5.h b/externals/openssl/md5.h deleted file mode 100644 index 0761f84a27..0000000000 --- a/externals/openssl/md5.h +++ /dev/null @@ -1,120 +0,0 @@ -/* crypto/md5/md5.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_MD5_H -#define HEADER_MD5_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef OPENSSL_NO_MD5 -#error MD5 is disabled. -#endif - -/* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * ! MD5_LONG has to be at least 32 bits wide. If it's wider, then ! - * ! MD5_LONG_LOG2 has to be defined along. ! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - -#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__) -#define MD5_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -#define MD5_LONG unsigned long -#define MD5_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ -#else -#define MD5_LONG unsigned int -#endif - -#define MD5_CBLOCK 64 -#define MD5_LBLOCK (MD5_CBLOCK/4) -#define MD5_DIGEST_LENGTH 16 - -typedef struct MD5state_st - { - MD5_LONG A,B,C,D; - MD5_LONG Nl,Nh; - MD5_LONG data[MD5_LBLOCK]; - unsigned int num; - } MD5_CTX; - -#ifdef OPENSSL_FIPS -int private_MD5_Init(MD5_CTX *c); -#endif -int MD5_Init(MD5_CTX *c); -int MD5_Update(MD5_CTX *c, const void *data, size_t len); -int MD5_Final(unsigned char *md, MD5_CTX *c); -unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); -void MD5_Transform(MD5_CTX *c, const unsigned char *b); -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/obj_mac.h b/externals/openssl/obj_mac.h deleted file mode 100644 index ad5f7cfc10..0000000000 --- a/externals/openssl/obj_mac.h +++ /dev/null @@ -1,3775 +0,0 @@ -/* crypto/objects/obj_mac.h */ - -/* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the - * following command: - * perl objects.pl objects.txt obj_mac.num obj_mac.h - */ - -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#define SN_undef "UNDEF" -#define LN_undef "undefined" -#define NID_undef 0 -#define OBJ_undef 0L - -#define SN_itu_t "ITU-T" -#define LN_itu_t "itu-t" -#define NID_itu_t 645 -#define OBJ_itu_t 0L - -#define NID_ccitt 404 -#define OBJ_ccitt OBJ_itu_t - -#define SN_iso "ISO" -#define LN_iso "iso" -#define NID_iso 181 -#define OBJ_iso 1L - -#define SN_joint_iso_itu_t "JOINT-ISO-ITU-T" -#define LN_joint_iso_itu_t "joint-iso-itu-t" -#define NID_joint_iso_itu_t 646 -#define OBJ_joint_iso_itu_t 2L - -#define NID_joint_iso_ccitt 393 -#define OBJ_joint_iso_ccitt OBJ_joint_iso_itu_t - -#define SN_member_body "member-body" -#define LN_member_body "ISO Member Body" -#define NID_member_body 182 -#define OBJ_member_body OBJ_iso,2L - -#define SN_identified_organization "identified-organization" -#define NID_identified_organization 676 -#define OBJ_identified_organization OBJ_iso,3L - -#define SN_hmac_md5 "HMAC-MD5" -#define LN_hmac_md5 "hmac-md5" -#define NID_hmac_md5 780 -#define OBJ_hmac_md5 OBJ_identified_organization,6L,1L,5L,5L,8L,1L,1L - -#define SN_hmac_sha1 "HMAC-SHA1" -#define LN_hmac_sha1 "hmac-sha1" -#define NID_hmac_sha1 781 -#define OBJ_hmac_sha1 OBJ_identified_organization,6L,1L,5L,5L,8L,1L,2L - -#define SN_certicom_arc "certicom-arc" -#define NID_certicom_arc 677 -#define OBJ_certicom_arc OBJ_identified_organization,132L - -#define SN_international_organizations "international-organizations" -#define LN_international_organizations "International Organizations" -#define NID_international_organizations 647 -#define OBJ_international_organizations OBJ_joint_iso_itu_t,23L - -#define SN_wap "wap" -#define NID_wap 678 -#define OBJ_wap OBJ_international_organizations,43L - -#define SN_wap_wsg "wap-wsg" -#define NID_wap_wsg 679 -#define OBJ_wap_wsg OBJ_wap,13L - -#define SN_selected_attribute_types "selected-attribute-types" -#define LN_selected_attribute_types "Selected Attribute Types" -#define NID_selected_attribute_types 394 -#define OBJ_selected_attribute_types OBJ_joint_iso_itu_t,5L,1L,5L - -#define SN_clearance "clearance" -#define NID_clearance 395 -#define OBJ_clearance OBJ_selected_attribute_types,55L - -#define SN_ISO_US "ISO-US" -#define LN_ISO_US "ISO US Member Body" -#define NID_ISO_US 183 -#define OBJ_ISO_US OBJ_member_body,840L - -#define SN_X9_57 "X9-57" -#define LN_X9_57 "X9.57" -#define NID_X9_57 184 -#define OBJ_X9_57 OBJ_ISO_US,10040L - -#define SN_X9cm "X9cm" -#define LN_X9cm "X9.57 CM ?" -#define NID_X9cm 185 -#define OBJ_X9cm OBJ_X9_57,4L - -#define SN_dsa "DSA" -#define LN_dsa "dsaEncryption" -#define NID_dsa 116 -#define OBJ_dsa OBJ_X9cm,1L - -#define SN_dsaWithSHA1 "DSA-SHA1" -#define LN_dsaWithSHA1 "dsaWithSHA1" -#define NID_dsaWithSHA1 113 -#define OBJ_dsaWithSHA1 OBJ_X9cm,3L - -#define SN_ansi_X9_62 "ansi-X9-62" -#define LN_ansi_X9_62 "ANSI X9.62" -#define NID_ansi_X9_62 405 -#define OBJ_ansi_X9_62 OBJ_ISO_US,10045L - -#define OBJ_X9_62_id_fieldType OBJ_ansi_X9_62,1L - -#define SN_X9_62_prime_field "prime-field" -#define NID_X9_62_prime_field 406 -#define OBJ_X9_62_prime_field OBJ_X9_62_id_fieldType,1L - -#define SN_X9_62_characteristic_two_field "characteristic-two-field" -#define NID_X9_62_characteristic_two_field 407 -#define OBJ_X9_62_characteristic_two_field OBJ_X9_62_id_fieldType,2L - -#define SN_X9_62_id_characteristic_two_basis "id-characteristic-two-basis" -#define NID_X9_62_id_characteristic_two_basis 680 -#define OBJ_X9_62_id_characteristic_two_basis OBJ_X9_62_characteristic_two_field,3L - -#define SN_X9_62_onBasis "onBasis" -#define NID_X9_62_onBasis 681 -#define OBJ_X9_62_onBasis OBJ_X9_62_id_characteristic_two_basis,1L - -#define SN_X9_62_tpBasis "tpBasis" -#define NID_X9_62_tpBasis 682 -#define OBJ_X9_62_tpBasis OBJ_X9_62_id_characteristic_two_basis,2L - -#define SN_X9_62_ppBasis "ppBasis" -#define NID_X9_62_ppBasis 683 -#define OBJ_X9_62_ppBasis OBJ_X9_62_id_characteristic_two_basis,3L - -#define OBJ_X9_62_id_publicKeyType OBJ_ansi_X9_62,2L - -#define SN_X9_62_id_ecPublicKey "id-ecPublicKey" -#define NID_X9_62_id_ecPublicKey 408 -#define OBJ_X9_62_id_ecPublicKey OBJ_X9_62_id_publicKeyType,1L - -#define OBJ_X9_62_ellipticCurve OBJ_ansi_X9_62,3L - -#define OBJ_X9_62_c_TwoCurve OBJ_X9_62_ellipticCurve,0L - -#define SN_X9_62_c2pnb163v1 "c2pnb163v1" -#define NID_X9_62_c2pnb163v1 684 -#define OBJ_X9_62_c2pnb163v1 OBJ_X9_62_c_TwoCurve,1L - -#define SN_X9_62_c2pnb163v2 "c2pnb163v2" -#define NID_X9_62_c2pnb163v2 685 -#define OBJ_X9_62_c2pnb163v2 OBJ_X9_62_c_TwoCurve,2L - -#define SN_X9_62_c2pnb163v3 "c2pnb163v3" -#define NID_X9_62_c2pnb163v3 686 -#define OBJ_X9_62_c2pnb163v3 OBJ_X9_62_c_TwoCurve,3L - -#define SN_X9_62_c2pnb176v1 "c2pnb176v1" -#define NID_X9_62_c2pnb176v1 687 -#define OBJ_X9_62_c2pnb176v1 OBJ_X9_62_c_TwoCurve,4L - -#define SN_X9_62_c2tnb191v1 "c2tnb191v1" -#define NID_X9_62_c2tnb191v1 688 -#define OBJ_X9_62_c2tnb191v1 OBJ_X9_62_c_TwoCurve,5L - -#define SN_X9_62_c2tnb191v2 "c2tnb191v2" -#define NID_X9_62_c2tnb191v2 689 -#define OBJ_X9_62_c2tnb191v2 OBJ_X9_62_c_TwoCurve,6L - -#define SN_X9_62_c2tnb191v3 "c2tnb191v3" -#define NID_X9_62_c2tnb191v3 690 -#define OBJ_X9_62_c2tnb191v3 OBJ_X9_62_c_TwoCurve,7L - -#define SN_X9_62_c2onb191v4 "c2onb191v4" -#define NID_X9_62_c2onb191v4 691 -#define OBJ_X9_62_c2onb191v4 OBJ_X9_62_c_TwoCurve,8L - -#define SN_X9_62_c2onb191v5 "c2onb191v5" -#define NID_X9_62_c2onb191v5 692 -#define OBJ_X9_62_c2onb191v5 OBJ_X9_62_c_TwoCurve,9L - -#define SN_X9_62_c2pnb208w1 "c2pnb208w1" -#define NID_X9_62_c2pnb208w1 693 -#define OBJ_X9_62_c2pnb208w1 OBJ_X9_62_c_TwoCurve,10L - -#define SN_X9_62_c2tnb239v1 "c2tnb239v1" -#define NID_X9_62_c2tnb239v1 694 -#define OBJ_X9_62_c2tnb239v1 OBJ_X9_62_c_TwoCurve,11L - -#define SN_X9_62_c2tnb239v2 "c2tnb239v2" -#define NID_X9_62_c2tnb239v2 695 -#define OBJ_X9_62_c2tnb239v2 OBJ_X9_62_c_TwoCurve,12L - -#define SN_X9_62_c2tnb239v3 "c2tnb239v3" -#define NID_X9_62_c2tnb239v3 696 -#define OBJ_X9_62_c2tnb239v3 OBJ_X9_62_c_TwoCurve,13L - -#define SN_X9_62_c2onb239v4 "c2onb239v4" -#define NID_X9_62_c2onb239v4 697 -#define OBJ_X9_62_c2onb239v4 OBJ_X9_62_c_TwoCurve,14L - -#define SN_X9_62_c2onb239v5 "c2onb239v5" -#define NID_X9_62_c2onb239v5 698 -#define OBJ_X9_62_c2onb239v5 OBJ_X9_62_c_TwoCurve,15L - -#define SN_X9_62_c2pnb272w1 "c2pnb272w1" -#define NID_X9_62_c2pnb272w1 699 -#define OBJ_X9_62_c2pnb272w1 OBJ_X9_62_c_TwoCurve,16L - -#define SN_X9_62_c2pnb304w1 "c2pnb304w1" -#define NID_X9_62_c2pnb304w1 700 -#define OBJ_X9_62_c2pnb304w1 OBJ_X9_62_c_TwoCurve,17L - -#define SN_X9_62_c2tnb359v1 "c2tnb359v1" -#define NID_X9_62_c2tnb359v1 701 -#define OBJ_X9_62_c2tnb359v1 OBJ_X9_62_c_TwoCurve,18L - -#define SN_X9_62_c2pnb368w1 "c2pnb368w1" -#define NID_X9_62_c2pnb368w1 702 -#define OBJ_X9_62_c2pnb368w1 OBJ_X9_62_c_TwoCurve,19L - -#define SN_X9_62_c2tnb431r1 "c2tnb431r1" -#define NID_X9_62_c2tnb431r1 703 -#define OBJ_X9_62_c2tnb431r1 OBJ_X9_62_c_TwoCurve,20L - -#define OBJ_X9_62_primeCurve OBJ_X9_62_ellipticCurve,1L - -#define SN_X9_62_prime192v1 "prime192v1" -#define NID_X9_62_prime192v1 409 -#define OBJ_X9_62_prime192v1 OBJ_X9_62_primeCurve,1L - -#define SN_X9_62_prime192v2 "prime192v2" -#define NID_X9_62_prime192v2 410 -#define OBJ_X9_62_prime192v2 OBJ_X9_62_primeCurve,2L - -#define SN_X9_62_prime192v3 "prime192v3" -#define NID_X9_62_prime192v3 411 -#define OBJ_X9_62_prime192v3 OBJ_X9_62_primeCurve,3L - -#define SN_X9_62_prime239v1 "prime239v1" -#define NID_X9_62_prime239v1 412 -#define OBJ_X9_62_prime239v1 OBJ_X9_62_primeCurve,4L - -#define SN_X9_62_prime239v2 "prime239v2" -#define NID_X9_62_prime239v2 413 -#define OBJ_X9_62_prime239v2 OBJ_X9_62_primeCurve,5L - -#define SN_X9_62_prime239v3 "prime239v3" -#define NID_X9_62_prime239v3 414 -#define OBJ_X9_62_prime239v3 OBJ_X9_62_primeCurve,6L - -#define SN_X9_62_prime256v1 "prime256v1" -#define NID_X9_62_prime256v1 415 -#define OBJ_X9_62_prime256v1 OBJ_X9_62_primeCurve,7L - -#define OBJ_X9_62_id_ecSigType OBJ_ansi_X9_62,4L - -#define SN_ecdsa_with_SHA1 "ecdsa-with-SHA1" -#define NID_ecdsa_with_SHA1 416 -#define OBJ_ecdsa_with_SHA1 OBJ_X9_62_id_ecSigType,1L - -#define SN_ecdsa_with_Recommended "ecdsa-with-Recommended" -#define NID_ecdsa_with_Recommended 791 -#define OBJ_ecdsa_with_Recommended OBJ_X9_62_id_ecSigType,2L - -#define SN_ecdsa_with_Specified "ecdsa-with-Specified" -#define NID_ecdsa_with_Specified 792 -#define OBJ_ecdsa_with_Specified OBJ_X9_62_id_ecSigType,3L - -#define SN_ecdsa_with_SHA224 "ecdsa-with-SHA224" -#define NID_ecdsa_with_SHA224 793 -#define OBJ_ecdsa_with_SHA224 OBJ_ecdsa_with_Specified,1L - -#define SN_ecdsa_with_SHA256 "ecdsa-with-SHA256" -#define NID_ecdsa_with_SHA256 794 -#define OBJ_ecdsa_with_SHA256 OBJ_ecdsa_with_Specified,2L - -#define SN_ecdsa_with_SHA384 "ecdsa-with-SHA384" -#define NID_ecdsa_with_SHA384 795 -#define OBJ_ecdsa_with_SHA384 OBJ_ecdsa_with_Specified,3L - -#define SN_ecdsa_with_SHA512 "ecdsa-with-SHA512" -#define NID_ecdsa_with_SHA512 796 -#define OBJ_ecdsa_with_SHA512 OBJ_ecdsa_with_Specified,4L - -#define OBJ_secg_ellipticCurve OBJ_certicom_arc,0L - -#define SN_secp112r1 "secp112r1" -#define NID_secp112r1 704 -#define OBJ_secp112r1 OBJ_secg_ellipticCurve,6L - -#define SN_secp112r2 "secp112r2" -#define NID_secp112r2 705 -#define OBJ_secp112r2 OBJ_secg_ellipticCurve,7L - -#define SN_secp128r1 "secp128r1" -#define NID_secp128r1 706 -#define OBJ_secp128r1 OBJ_secg_ellipticCurve,28L - -#define SN_secp128r2 "secp128r2" -#define NID_secp128r2 707 -#define OBJ_secp128r2 OBJ_secg_ellipticCurve,29L - -#define SN_secp160k1 "secp160k1" -#define NID_secp160k1 708 -#define OBJ_secp160k1 OBJ_secg_ellipticCurve,9L - -#define SN_secp160r1 "secp160r1" -#define NID_secp160r1 709 -#define OBJ_secp160r1 OBJ_secg_ellipticCurve,8L - -#define SN_secp160r2 "secp160r2" -#define NID_secp160r2 710 -#define OBJ_secp160r2 OBJ_secg_ellipticCurve,30L - -#define SN_secp192k1 "secp192k1" -#define NID_secp192k1 711 -#define OBJ_secp192k1 OBJ_secg_ellipticCurve,31L - -#define SN_secp224k1 "secp224k1" -#define NID_secp224k1 712 -#define OBJ_secp224k1 OBJ_secg_ellipticCurve,32L - -#define SN_secp224r1 "secp224r1" -#define NID_secp224r1 713 -#define OBJ_secp224r1 OBJ_secg_ellipticCurve,33L - -#define SN_secp256k1 "secp256k1" -#define NID_secp256k1 714 -#define OBJ_secp256k1 OBJ_secg_ellipticCurve,10L - -#define SN_secp384r1 "secp384r1" -#define NID_secp384r1 715 -#define OBJ_secp384r1 OBJ_secg_ellipticCurve,34L - -#define SN_secp521r1 "secp521r1" -#define NID_secp521r1 716 -#define OBJ_secp521r1 OBJ_secg_ellipticCurve,35L - -#define SN_sect113r1 "sect113r1" -#define NID_sect113r1 717 -#define OBJ_sect113r1 OBJ_secg_ellipticCurve,4L - -#define SN_sect113r2 "sect113r2" -#define NID_sect113r2 718 -#define OBJ_sect113r2 OBJ_secg_ellipticCurve,5L - -#define SN_sect131r1 "sect131r1" -#define NID_sect131r1 719 -#define OBJ_sect131r1 OBJ_secg_ellipticCurve,22L - -#define SN_sect131r2 "sect131r2" -#define NID_sect131r2 720 -#define OBJ_sect131r2 OBJ_secg_ellipticCurve,23L - -#define SN_sect163k1 "sect163k1" -#define NID_sect163k1 721 -#define OBJ_sect163k1 OBJ_secg_ellipticCurve,1L - -#define SN_sect163r1 "sect163r1" -#define NID_sect163r1 722 -#define OBJ_sect163r1 OBJ_secg_ellipticCurve,2L - -#define SN_sect163r2 "sect163r2" -#define NID_sect163r2 723 -#define OBJ_sect163r2 OBJ_secg_ellipticCurve,15L - -#define SN_sect193r1 "sect193r1" -#define NID_sect193r1 724 -#define OBJ_sect193r1 OBJ_secg_ellipticCurve,24L - -#define SN_sect193r2 "sect193r2" -#define NID_sect193r2 725 -#define OBJ_sect193r2 OBJ_secg_ellipticCurve,25L - -#define SN_sect233k1 "sect233k1" -#define NID_sect233k1 726 -#define OBJ_sect233k1 OBJ_secg_ellipticCurve,26L - -#define SN_sect233r1 "sect233r1" -#define NID_sect233r1 727 -#define OBJ_sect233r1 OBJ_secg_ellipticCurve,27L - -#define SN_sect239k1 "sect239k1" -#define NID_sect239k1 728 -#define OBJ_sect239k1 OBJ_secg_ellipticCurve,3L - -#define SN_sect283k1 "sect283k1" -#define NID_sect283k1 729 -#define OBJ_sect283k1 OBJ_secg_ellipticCurve,16L - -#define SN_sect283r1 "sect283r1" -#define NID_sect283r1 730 -#define OBJ_sect283r1 OBJ_secg_ellipticCurve,17L - -#define SN_sect409k1 "sect409k1" -#define NID_sect409k1 731 -#define OBJ_sect409k1 OBJ_secg_ellipticCurve,36L - -#define SN_sect409r1 "sect409r1" -#define NID_sect409r1 732 -#define OBJ_sect409r1 OBJ_secg_ellipticCurve,37L - -#define SN_sect571k1 "sect571k1" -#define NID_sect571k1 733 -#define OBJ_sect571k1 OBJ_secg_ellipticCurve,38L - -#define SN_sect571r1 "sect571r1" -#define NID_sect571r1 734 -#define OBJ_sect571r1 OBJ_secg_ellipticCurve,39L - -#define OBJ_wap_wsg_idm_ecid OBJ_wap_wsg,4L - -#define SN_wap_wsg_idm_ecid_wtls1 "wap-wsg-idm-ecid-wtls1" -#define NID_wap_wsg_idm_ecid_wtls1 735 -#define OBJ_wap_wsg_idm_ecid_wtls1 OBJ_wap_wsg_idm_ecid,1L - -#define SN_wap_wsg_idm_ecid_wtls3 "wap-wsg-idm-ecid-wtls3" -#define NID_wap_wsg_idm_ecid_wtls3 736 -#define OBJ_wap_wsg_idm_ecid_wtls3 OBJ_wap_wsg_idm_ecid,3L - -#define SN_wap_wsg_idm_ecid_wtls4 "wap-wsg-idm-ecid-wtls4" -#define NID_wap_wsg_idm_ecid_wtls4 737 -#define OBJ_wap_wsg_idm_ecid_wtls4 OBJ_wap_wsg_idm_ecid,4L - -#define SN_wap_wsg_idm_ecid_wtls5 "wap-wsg-idm-ecid-wtls5" -#define NID_wap_wsg_idm_ecid_wtls5 738 -#define OBJ_wap_wsg_idm_ecid_wtls5 OBJ_wap_wsg_idm_ecid,5L - -#define SN_wap_wsg_idm_ecid_wtls6 "wap-wsg-idm-ecid-wtls6" -#define NID_wap_wsg_idm_ecid_wtls6 739 -#define OBJ_wap_wsg_idm_ecid_wtls6 OBJ_wap_wsg_idm_ecid,6L - -#define SN_wap_wsg_idm_ecid_wtls7 "wap-wsg-idm-ecid-wtls7" -#define NID_wap_wsg_idm_ecid_wtls7 740 -#define OBJ_wap_wsg_idm_ecid_wtls7 OBJ_wap_wsg_idm_ecid,7L - -#define SN_wap_wsg_idm_ecid_wtls8 "wap-wsg-idm-ecid-wtls8" -#define NID_wap_wsg_idm_ecid_wtls8 741 -#define OBJ_wap_wsg_idm_ecid_wtls8 OBJ_wap_wsg_idm_ecid,8L - -#define SN_wap_wsg_idm_ecid_wtls9 "wap-wsg-idm-ecid-wtls9" -#define NID_wap_wsg_idm_ecid_wtls9 742 -#define OBJ_wap_wsg_idm_ecid_wtls9 OBJ_wap_wsg_idm_ecid,9L - -#define SN_wap_wsg_idm_ecid_wtls10 "wap-wsg-idm-ecid-wtls10" -#define NID_wap_wsg_idm_ecid_wtls10 743 -#define OBJ_wap_wsg_idm_ecid_wtls10 OBJ_wap_wsg_idm_ecid,10L - -#define SN_wap_wsg_idm_ecid_wtls11 "wap-wsg-idm-ecid-wtls11" -#define NID_wap_wsg_idm_ecid_wtls11 744 -#define OBJ_wap_wsg_idm_ecid_wtls11 OBJ_wap_wsg_idm_ecid,11L - -#define SN_wap_wsg_idm_ecid_wtls12 "wap-wsg-idm-ecid-wtls12" -#define NID_wap_wsg_idm_ecid_wtls12 745 -#define OBJ_wap_wsg_idm_ecid_wtls12 OBJ_wap_wsg_idm_ecid,12L - -#define SN_cast5_cbc "CAST5-CBC" -#define LN_cast5_cbc "cast5-cbc" -#define NID_cast5_cbc 108 -#define OBJ_cast5_cbc OBJ_ISO_US,113533L,7L,66L,10L - -#define SN_cast5_ecb "CAST5-ECB" -#define LN_cast5_ecb "cast5-ecb" -#define NID_cast5_ecb 109 - -#define SN_cast5_cfb64 "CAST5-CFB" -#define LN_cast5_cfb64 "cast5-cfb" -#define NID_cast5_cfb64 110 - -#define SN_cast5_ofb64 "CAST5-OFB" -#define LN_cast5_ofb64 "cast5-ofb" -#define NID_cast5_ofb64 111 - -#define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" -#define NID_pbeWithMD5AndCast5_CBC 112 -#define OBJ_pbeWithMD5AndCast5_CBC OBJ_ISO_US,113533L,7L,66L,12L - -#define SN_id_PasswordBasedMAC "id-PasswordBasedMAC" -#define LN_id_PasswordBasedMAC "password based MAC" -#define NID_id_PasswordBasedMAC 782 -#define OBJ_id_PasswordBasedMAC OBJ_ISO_US,113533L,7L,66L,13L - -#define SN_id_DHBasedMac "id-DHBasedMac" -#define LN_id_DHBasedMac "Diffie-Hellman based MAC" -#define NID_id_DHBasedMac 783 -#define OBJ_id_DHBasedMac OBJ_ISO_US,113533L,7L,66L,30L - -#define SN_rsadsi "rsadsi" -#define LN_rsadsi "RSA Data Security, Inc." -#define NID_rsadsi 1 -#define OBJ_rsadsi OBJ_ISO_US,113549L - -#define SN_pkcs "pkcs" -#define LN_pkcs "RSA Data Security, Inc. PKCS" -#define NID_pkcs 2 -#define OBJ_pkcs OBJ_rsadsi,1L - -#define SN_pkcs1 "pkcs1" -#define NID_pkcs1 186 -#define OBJ_pkcs1 OBJ_pkcs,1L - -#define LN_rsaEncryption "rsaEncryption" -#define NID_rsaEncryption 6 -#define OBJ_rsaEncryption OBJ_pkcs1,1L - -#define SN_md2WithRSAEncryption "RSA-MD2" -#define LN_md2WithRSAEncryption "md2WithRSAEncryption" -#define NID_md2WithRSAEncryption 7 -#define OBJ_md2WithRSAEncryption OBJ_pkcs1,2L - -#define SN_md4WithRSAEncryption "RSA-MD4" -#define LN_md4WithRSAEncryption "md4WithRSAEncryption" -#define NID_md4WithRSAEncryption 396 -#define OBJ_md4WithRSAEncryption OBJ_pkcs1,3L - -#define SN_md5WithRSAEncryption "RSA-MD5" -#define LN_md5WithRSAEncryption "md5WithRSAEncryption" -#define NID_md5WithRSAEncryption 8 -#define OBJ_md5WithRSAEncryption OBJ_pkcs1,4L - -#define SN_sha1WithRSAEncryption "RSA-SHA1" -#define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" -#define NID_sha1WithRSAEncryption 65 -#define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L - -#define SN_sha256WithRSAEncryption "RSA-SHA256" -#define LN_sha256WithRSAEncryption "sha256WithRSAEncryption" -#define NID_sha256WithRSAEncryption 668 -#define OBJ_sha256WithRSAEncryption OBJ_pkcs1,11L - -#define SN_sha384WithRSAEncryption "RSA-SHA384" -#define LN_sha384WithRSAEncryption "sha384WithRSAEncryption" -#define NID_sha384WithRSAEncryption 669 -#define OBJ_sha384WithRSAEncryption OBJ_pkcs1,12L - -#define SN_sha512WithRSAEncryption "RSA-SHA512" -#define LN_sha512WithRSAEncryption "sha512WithRSAEncryption" -#define NID_sha512WithRSAEncryption 670 -#define OBJ_sha512WithRSAEncryption OBJ_pkcs1,13L - -#define SN_sha224WithRSAEncryption "RSA-SHA224" -#define LN_sha224WithRSAEncryption "sha224WithRSAEncryption" -#define NID_sha224WithRSAEncryption 671 -#define OBJ_sha224WithRSAEncryption OBJ_pkcs1,14L - -#define SN_pkcs3 "pkcs3" -#define NID_pkcs3 27 -#define OBJ_pkcs3 OBJ_pkcs,3L - -#define LN_dhKeyAgreement "dhKeyAgreement" -#define NID_dhKeyAgreement 28 -#define OBJ_dhKeyAgreement OBJ_pkcs3,1L - -#define SN_pkcs5 "pkcs5" -#define NID_pkcs5 187 -#define OBJ_pkcs5 OBJ_pkcs,5L - -#define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" -#define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" -#define NID_pbeWithMD2AndDES_CBC 9 -#define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs5,1L - -#define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" -#define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" -#define NID_pbeWithMD5AndDES_CBC 10 -#define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs5,3L - -#define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64" -#define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC" -#define NID_pbeWithMD2AndRC2_CBC 168 -#define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs5,4L - -#define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64" -#define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC" -#define NID_pbeWithMD5AndRC2_CBC 169 -#define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs5,6L - -#define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES" -#define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC" -#define NID_pbeWithSHA1AndDES_CBC 170 -#define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs5,10L - -#define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" -#define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" -#define NID_pbeWithSHA1AndRC2_CBC 68 -#define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs5,11L - -#define LN_id_pbkdf2 "PBKDF2" -#define NID_id_pbkdf2 69 -#define OBJ_id_pbkdf2 OBJ_pkcs5,12L - -#define LN_pbes2 "PBES2" -#define NID_pbes2 161 -#define OBJ_pbes2 OBJ_pkcs5,13L - -#define LN_pbmac1 "PBMAC1" -#define NID_pbmac1 162 -#define OBJ_pbmac1 OBJ_pkcs5,14L - -#define SN_pkcs7 "pkcs7" -#define NID_pkcs7 20 -#define OBJ_pkcs7 OBJ_pkcs,7L - -#define LN_pkcs7_data "pkcs7-data" -#define NID_pkcs7_data 21 -#define OBJ_pkcs7_data OBJ_pkcs7,1L - -#define LN_pkcs7_signed "pkcs7-signedData" -#define NID_pkcs7_signed 22 -#define OBJ_pkcs7_signed OBJ_pkcs7,2L - -#define LN_pkcs7_enveloped "pkcs7-envelopedData" -#define NID_pkcs7_enveloped 23 -#define OBJ_pkcs7_enveloped OBJ_pkcs7,3L - -#define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" -#define NID_pkcs7_signedAndEnveloped 24 -#define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L - -#define LN_pkcs7_digest "pkcs7-digestData" -#define NID_pkcs7_digest 25 -#define OBJ_pkcs7_digest OBJ_pkcs7,5L - -#define LN_pkcs7_encrypted "pkcs7-encryptedData" -#define NID_pkcs7_encrypted 26 -#define OBJ_pkcs7_encrypted OBJ_pkcs7,6L - -#define SN_pkcs9 "pkcs9" -#define NID_pkcs9 47 -#define OBJ_pkcs9 OBJ_pkcs,9L - -#define LN_pkcs9_emailAddress "emailAddress" -#define NID_pkcs9_emailAddress 48 -#define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L - -#define LN_pkcs9_unstructuredName "unstructuredName" -#define NID_pkcs9_unstructuredName 49 -#define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L - -#define LN_pkcs9_contentType "contentType" -#define NID_pkcs9_contentType 50 -#define OBJ_pkcs9_contentType OBJ_pkcs9,3L - -#define LN_pkcs9_messageDigest "messageDigest" -#define NID_pkcs9_messageDigest 51 -#define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L - -#define LN_pkcs9_signingTime "signingTime" -#define NID_pkcs9_signingTime 52 -#define OBJ_pkcs9_signingTime OBJ_pkcs9,5L - -#define LN_pkcs9_countersignature "countersignature" -#define NID_pkcs9_countersignature 53 -#define OBJ_pkcs9_countersignature OBJ_pkcs9,6L - -#define LN_pkcs9_challengePassword "challengePassword" -#define NID_pkcs9_challengePassword 54 -#define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L - -#define LN_pkcs9_unstructuredAddress "unstructuredAddress" -#define NID_pkcs9_unstructuredAddress 55 -#define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L - -#define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" -#define NID_pkcs9_extCertAttributes 56 -#define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L - -#define SN_ext_req "extReq" -#define LN_ext_req "Extension Request" -#define NID_ext_req 172 -#define OBJ_ext_req OBJ_pkcs9,14L - -#define SN_SMIMECapabilities "SMIME-CAPS" -#define LN_SMIMECapabilities "S/MIME Capabilities" -#define NID_SMIMECapabilities 167 -#define OBJ_SMIMECapabilities OBJ_pkcs9,15L - -#define SN_SMIME "SMIME" -#define LN_SMIME "S/MIME" -#define NID_SMIME 188 -#define OBJ_SMIME OBJ_pkcs9,16L - -#define SN_id_smime_mod "id-smime-mod" -#define NID_id_smime_mod 189 -#define OBJ_id_smime_mod OBJ_SMIME,0L - -#define SN_id_smime_ct "id-smime-ct" -#define NID_id_smime_ct 190 -#define OBJ_id_smime_ct OBJ_SMIME,1L - -#define SN_id_smime_aa "id-smime-aa" -#define NID_id_smime_aa 191 -#define OBJ_id_smime_aa OBJ_SMIME,2L - -#define SN_id_smime_alg "id-smime-alg" -#define NID_id_smime_alg 192 -#define OBJ_id_smime_alg OBJ_SMIME,3L - -#define SN_id_smime_cd "id-smime-cd" -#define NID_id_smime_cd 193 -#define OBJ_id_smime_cd OBJ_SMIME,4L - -#define SN_id_smime_spq "id-smime-spq" -#define NID_id_smime_spq 194 -#define OBJ_id_smime_spq OBJ_SMIME,5L - -#define SN_id_smime_cti "id-smime-cti" -#define NID_id_smime_cti 195 -#define OBJ_id_smime_cti OBJ_SMIME,6L - -#define SN_id_smime_mod_cms "id-smime-mod-cms" -#define NID_id_smime_mod_cms 196 -#define OBJ_id_smime_mod_cms OBJ_id_smime_mod,1L - -#define SN_id_smime_mod_ess "id-smime-mod-ess" -#define NID_id_smime_mod_ess 197 -#define OBJ_id_smime_mod_ess OBJ_id_smime_mod,2L - -#define SN_id_smime_mod_oid "id-smime-mod-oid" -#define NID_id_smime_mod_oid 198 -#define OBJ_id_smime_mod_oid OBJ_id_smime_mod,3L - -#define SN_id_smime_mod_msg_v3 "id-smime-mod-msg-v3" -#define NID_id_smime_mod_msg_v3 199 -#define OBJ_id_smime_mod_msg_v3 OBJ_id_smime_mod,4L - -#define SN_id_smime_mod_ets_eSignature_88 "id-smime-mod-ets-eSignature-88" -#define NID_id_smime_mod_ets_eSignature_88 200 -#define OBJ_id_smime_mod_ets_eSignature_88 OBJ_id_smime_mod,5L - -#define SN_id_smime_mod_ets_eSignature_97 "id-smime-mod-ets-eSignature-97" -#define NID_id_smime_mod_ets_eSignature_97 201 -#define OBJ_id_smime_mod_ets_eSignature_97 OBJ_id_smime_mod,6L - -#define SN_id_smime_mod_ets_eSigPolicy_88 "id-smime-mod-ets-eSigPolicy-88" -#define NID_id_smime_mod_ets_eSigPolicy_88 202 -#define OBJ_id_smime_mod_ets_eSigPolicy_88 OBJ_id_smime_mod,7L - -#define SN_id_smime_mod_ets_eSigPolicy_97 "id-smime-mod-ets-eSigPolicy-97" -#define NID_id_smime_mod_ets_eSigPolicy_97 203 -#define OBJ_id_smime_mod_ets_eSigPolicy_97 OBJ_id_smime_mod,8L - -#define SN_id_smime_ct_receipt "id-smime-ct-receipt" -#define NID_id_smime_ct_receipt 204 -#define OBJ_id_smime_ct_receipt OBJ_id_smime_ct,1L - -#define SN_id_smime_ct_authData "id-smime-ct-authData" -#define NID_id_smime_ct_authData 205 -#define OBJ_id_smime_ct_authData OBJ_id_smime_ct,2L - -#define SN_id_smime_ct_publishCert "id-smime-ct-publishCert" -#define NID_id_smime_ct_publishCert 206 -#define OBJ_id_smime_ct_publishCert OBJ_id_smime_ct,3L - -#define SN_id_smime_ct_TSTInfo "id-smime-ct-TSTInfo" -#define NID_id_smime_ct_TSTInfo 207 -#define OBJ_id_smime_ct_TSTInfo OBJ_id_smime_ct,4L - -#define SN_id_smime_ct_TDTInfo "id-smime-ct-TDTInfo" -#define NID_id_smime_ct_TDTInfo 208 -#define OBJ_id_smime_ct_TDTInfo OBJ_id_smime_ct,5L - -#define SN_id_smime_ct_contentInfo "id-smime-ct-contentInfo" -#define NID_id_smime_ct_contentInfo 209 -#define OBJ_id_smime_ct_contentInfo OBJ_id_smime_ct,6L - -#define SN_id_smime_ct_DVCSRequestData "id-smime-ct-DVCSRequestData" -#define NID_id_smime_ct_DVCSRequestData 210 -#define OBJ_id_smime_ct_DVCSRequestData OBJ_id_smime_ct,7L - -#define SN_id_smime_ct_DVCSResponseData "id-smime-ct-DVCSResponseData" -#define NID_id_smime_ct_DVCSResponseData 211 -#define OBJ_id_smime_ct_DVCSResponseData OBJ_id_smime_ct,8L - -#define SN_id_smime_ct_compressedData "id-smime-ct-compressedData" -#define NID_id_smime_ct_compressedData 786 -#define OBJ_id_smime_ct_compressedData OBJ_id_smime_ct,9L - -#define SN_id_ct_asciiTextWithCRLF "id-ct-asciiTextWithCRLF" -#define NID_id_ct_asciiTextWithCRLF 787 -#define OBJ_id_ct_asciiTextWithCRLF OBJ_id_smime_ct,27L - -#define SN_id_smime_aa_receiptRequest "id-smime-aa-receiptRequest" -#define NID_id_smime_aa_receiptRequest 212 -#define OBJ_id_smime_aa_receiptRequest OBJ_id_smime_aa,1L - -#define SN_id_smime_aa_securityLabel "id-smime-aa-securityLabel" -#define NID_id_smime_aa_securityLabel 213 -#define OBJ_id_smime_aa_securityLabel OBJ_id_smime_aa,2L - -#define SN_id_smime_aa_mlExpandHistory "id-smime-aa-mlExpandHistory" -#define NID_id_smime_aa_mlExpandHistory 214 -#define OBJ_id_smime_aa_mlExpandHistory OBJ_id_smime_aa,3L - -#define SN_id_smime_aa_contentHint "id-smime-aa-contentHint" -#define NID_id_smime_aa_contentHint 215 -#define OBJ_id_smime_aa_contentHint OBJ_id_smime_aa,4L - -#define SN_id_smime_aa_msgSigDigest "id-smime-aa-msgSigDigest" -#define NID_id_smime_aa_msgSigDigest 216 -#define OBJ_id_smime_aa_msgSigDigest OBJ_id_smime_aa,5L - -#define SN_id_smime_aa_encapContentType "id-smime-aa-encapContentType" -#define NID_id_smime_aa_encapContentType 217 -#define OBJ_id_smime_aa_encapContentType OBJ_id_smime_aa,6L - -#define SN_id_smime_aa_contentIdentifier "id-smime-aa-contentIdentifier" -#define NID_id_smime_aa_contentIdentifier 218 -#define OBJ_id_smime_aa_contentIdentifier OBJ_id_smime_aa,7L - -#define SN_id_smime_aa_macValue "id-smime-aa-macValue" -#define NID_id_smime_aa_macValue 219 -#define OBJ_id_smime_aa_macValue OBJ_id_smime_aa,8L - -#define SN_id_smime_aa_equivalentLabels "id-smime-aa-equivalentLabels" -#define NID_id_smime_aa_equivalentLabels 220 -#define OBJ_id_smime_aa_equivalentLabels OBJ_id_smime_aa,9L - -#define SN_id_smime_aa_contentReference "id-smime-aa-contentReference" -#define NID_id_smime_aa_contentReference 221 -#define OBJ_id_smime_aa_contentReference OBJ_id_smime_aa,10L - -#define SN_id_smime_aa_encrypKeyPref "id-smime-aa-encrypKeyPref" -#define NID_id_smime_aa_encrypKeyPref 222 -#define OBJ_id_smime_aa_encrypKeyPref OBJ_id_smime_aa,11L - -#define SN_id_smime_aa_signingCertificate "id-smime-aa-signingCertificate" -#define NID_id_smime_aa_signingCertificate 223 -#define OBJ_id_smime_aa_signingCertificate OBJ_id_smime_aa,12L - -#define SN_id_smime_aa_smimeEncryptCerts "id-smime-aa-smimeEncryptCerts" -#define NID_id_smime_aa_smimeEncryptCerts 224 -#define OBJ_id_smime_aa_smimeEncryptCerts OBJ_id_smime_aa,13L - -#define SN_id_smime_aa_timeStampToken "id-smime-aa-timeStampToken" -#define NID_id_smime_aa_timeStampToken 225 -#define OBJ_id_smime_aa_timeStampToken OBJ_id_smime_aa,14L - -#define SN_id_smime_aa_ets_sigPolicyId "id-smime-aa-ets-sigPolicyId" -#define NID_id_smime_aa_ets_sigPolicyId 226 -#define OBJ_id_smime_aa_ets_sigPolicyId OBJ_id_smime_aa,15L - -#define SN_id_smime_aa_ets_commitmentType "id-smime-aa-ets-commitmentType" -#define NID_id_smime_aa_ets_commitmentType 227 -#define OBJ_id_smime_aa_ets_commitmentType OBJ_id_smime_aa,16L - -#define SN_id_smime_aa_ets_signerLocation "id-smime-aa-ets-signerLocation" -#define NID_id_smime_aa_ets_signerLocation 228 -#define OBJ_id_smime_aa_ets_signerLocation OBJ_id_smime_aa,17L - -#define SN_id_smime_aa_ets_signerAttr "id-smime-aa-ets-signerAttr" -#define NID_id_smime_aa_ets_signerAttr 229 -#define OBJ_id_smime_aa_ets_signerAttr OBJ_id_smime_aa,18L - -#define SN_id_smime_aa_ets_otherSigCert "id-smime-aa-ets-otherSigCert" -#define NID_id_smime_aa_ets_otherSigCert 230 -#define OBJ_id_smime_aa_ets_otherSigCert OBJ_id_smime_aa,19L - -#define SN_id_smime_aa_ets_contentTimestamp "id-smime-aa-ets-contentTimestamp" -#define NID_id_smime_aa_ets_contentTimestamp 231 -#define OBJ_id_smime_aa_ets_contentTimestamp OBJ_id_smime_aa,20L - -#define SN_id_smime_aa_ets_CertificateRefs "id-smime-aa-ets-CertificateRefs" -#define NID_id_smime_aa_ets_CertificateRefs 232 -#define OBJ_id_smime_aa_ets_CertificateRefs OBJ_id_smime_aa,21L - -#define SN_id_smime_aa_ets_RevocationRefs "id-smime-aa-ets-RevocationRefs" -#define NID_id_smime_aa_ets_RevocationRefs 233 -#define OBJ_id_smime_aa_ets_RevocationRefs OBJ_id_smime_aa,22L - -#define SN_id_smime_aa_ets_certValues "id-smime-aa-ets-certValues" -#define NID_id_smime_aa_ets_certValues 234 -#define OBJ_id_smime_aa_ets_certValues OBJ_id_smime_aa,23L - -#define SN_id_smime_aa_ets_revocationValues "id-smime-aa-ets-revocationValues" -#define NID_id_smime_aa_ets_revocationValues 235 -#define OBJ_id_smime_aa_ets_revocationValues OBJ_id_smime_aa,24L - -#define SN_id_smime_aa_ets_escTimeStamp "id-smime-aa-ets-escTimeStamp" -#define NID_id_smime_aa_ets_escTimeStamp 236 -#define OBJ_id_smime_aa_ets_escTimeStamp OBJ_id_smime_aa,25L - -#define SN_id_smime_aa_ets_certCRLTimestamp "id-smime-aa-ets-certCRLTimestamp" -#define NID_id_smime_aa_ets_certCRLTimestamp 237 -#define OBJ_id_smime_aa_ets_certCRLTimestamp OBJ_id_smime_aa,26L - -#define SN_id_smime_aa_ets_archiveTimeStamp "id-smime-aa-ets-archiveTimeStamp" -#define NID_id_smime_aa_ets_archiveTimeStamp 238 -#define OBJ_id_smime_aa_ets_archiveTimeStamp OBJ_id_smime_aa,27L - -#define SN_id_smime_aa_signatureType "id-smime-aa-signatureType" -#define NID_id_smime_aa_signatureType 239 -#define OBJ_id_smime_aa_signatureType OBJ_id_smime_aa,28L - -#define SN_id_smime_aa_dvcs_dvc "id-smime-aa-dvcs-dvc" -#define NID_id_smime_aa_dvcs_dvc 240 -#define OBJ_id_smime_aa_dvcs_dvc OBJ_id_smime_aa,29L - -#define SN_id_smime_alg_ESDHwith3DES "id-smime-alg-ESDHwith3DES" -#define NID_id_smime_alg_ESDHwith3DES 241 -#define OBJ_id_smime_alg_ESDHwith3DES OBJ_id_smime_alg,1L - -#define SN_id_smime_alg_ESDHwithRC2 "id-smime-alg-ESDHwithRC2" -#define NID_id_smime_alg_ESDHwithRC2 242 -#define OBJ_id_smime_alg_ESDHwithRC2 OBJ_id_smime_alg,2L - -#define SN_id_smime_alg_3DESwrap "id-smime-alg-3DESwrap" -#define NID_id_smime_alg_3DESwrap 243 -#define OBJ_id_smime_alg_3DESwrap OBJ_id_smime_alg,3L - -#define SN_id_smime_alg_RC2wrap "id-smime-alg-RC2wrap" -#define NID_id_smime_alg_RC2wrap 244 -#define OBJ_id_smime_alg_RC2wrap OBJ_id_smime_alg,4L - -#define SN_id_smime_alg_ESDH "id-smime-alg-ESDH" -#define NID_id_smime_alg_ESDH 245 -#define OBJ_id_smime_alg_ESDH OBJ_id_smime_alg,5L - -#define SN_id_smime_alg_CMS3DESwrap "id-smime-alg-CMS3DESwrap" -#define NID_id_smime_alg_CMS3DESwrap 246 -#define OBJ_id_smime_alg_CMS3DESwrap OBJ_id_smime_alg,6L - -#define SN_id_smime_alg_CMSRC2wrap "id-smime-alg-CMSRC2wrap" -#define NID_id_smime_alg_CMSRC2wrap 247 -#define OBJ_id_smime_alg_CMSRC2wrap OBJ_id_smime_alg,7L - -#define SN_id_smime_cd_ldap "id-smime-cd-ldap" -#define NID_id_smime_cd_ldap 248 -#define OBJ_id_smime_cd_ldap OBJ_id_smime_cd,1L - -#define SN_id_smime_spq_ets_sqt_uri "id-smime-spq-ets-sqt-uri" -#define NID_id_smime_spq_ets_sqt_uri 249 -#define OBJ_id_smime_spq_ets_sqt_uri OBJ_id_smime_spq,1L - -#define SN_id_smime_spq_ets_sqt_unotice "id-smime-spq-ets-sqt-unotice" -#define NID_id_smime_spq_ets_sqt_unotice 250 -#define OBJ_id_smime_spq_ets_sqt_unotice OBJ_id_smime_spq,2L - -#define SN_id_smime_cti_ets_proofOfOrigin "id-smime-cti-ets-proofOfOrigin" -#define NID_id_smime_cti_ets_proofOfOrigin 251 -#define OBJ_id_smime_cti_ets_proofOfOrigin OBJ_id_smime_cti,1L - -#define SN_id_smime_cti_ets_proofOfReceipt "id-smime-cti-ets-proofOfReceipt" -#define NID_id_smime_cti_ets_proofOfReceipt 252 -#define OBJ_id_smime_cti_ets_proofOfReceipt OBJ_id_smime_cti,2L - -#define SN_id_smime_cti_ets_proofOfDelivery "id-smime-cti-ets-proofOfDelivery" -#define NID_id_smime_cti_ets_proofOfDelivery 253 -#define OBJ_id_smime_cti_ets_proofOfDelivery OBJ_id_smime_cti,3L - -#define SN_id_smime_cti_ets_proofOfSender "id-smime-cti-ets-proofOfSender" -#define NID_id_smime_cti_ets_proofOfSender 254 -#define OBJ_id_smime_cti_ets_proofOfSender OBJ_id_smime_cti,4L - -#define SN_id_smime_cti_ets_proofOfApproval "id-smime-cti-ets-proofOfApproval" -#define NID_id_smime_cti_ets_proofOfApproval 255 -#define OBJ_id_smime_cti_ets_proofOfApproval OBJ_id_smime_cti,5L - -#define SN_id_smime_cti_ets_proofOfCreation "id-smime-cti-ets-proofOfCreation" -#define NID_id_smime_cti_ets_proofOfCreation 256 -#define OBJ_id_smime_cti_ets_proofOfCreation OBJ_id_smime_cti,6L - -#define LN_friendlyName "friendlyName" -#define NID_friendlyName 156 -#define OBJ_friendlyName OBJ_pkcs9,20L - -#define LN_localKeyID "localKeyID" -#define NID_localKeyID 157 -#define OBJ_localKeyID OBJ_pkcs9,21L - -#define SN_ms_csp_name "CSPName" -#define LN_ms_csp_name "Microsoft CSP Name" -#define NID_ms_csp_name 417 -#define OBJ_ms_csp_name 1L,3L,6L,1L,4L,1L,311L,17L,1L - -#define SN_LocalKeySet "LocalKeySet" -#define LN_LocalKeySet "Microsoft Local Key set" -#define NID_LocalKeySet 856 -#define OBJ_LocalKeySet 1L,3L,6L,1L,4L,1L,311L,17L,2L - -#define OBJ_certTypes OBJ_pkcs9,22L - -#define LN_x509Certificate "x509Certificate" -#define NID_x509Certificate 158 -#define OBJ_x509Certificate OBJ_certTypes,1L - -#define LN_sdsiCertificate "sdsiCertificate" -#define NID_sdsiCertificate 159 -#define OBJ_sdsiCertificate OBJ_certTypes,2L - -#define OBJ_crlTypes OBJ_pkcs9,23L - -#define LN_x509Crl "x509Crl" -#define NID_x509Crl 160 -#define OBJ_x509Crl OBJ_crlTypes,1L - -#define OBJ_pkcs12 OBJ_pkcs,12L - -#define OBJ_pkcs12_pbeids OBJ_pkcs12,1L - -#define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128" -#define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4" -#define NID_pbe_WithSHA1And128BitRC4 144 -#define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids,1L - -#define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" -#define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" -#define NID_pbe_WithSHA1And40BitRC4 145 -#define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids,2L - -#define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES" -#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC" -#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146 -#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids,3L - -#define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES" -#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC" -#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147 -#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids,4L - -#define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128" -#define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC" -#define NID_pbe_WithSHA1And128BitRC2_CBC 148 -#define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids,5L - -#define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40" -#define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC" -#define NID_pbe_WithSHA1And40BitRC2_CBC 149 -#define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids,6L - -#define OBJ_pkcs12_Version1 OBJ_pkcs12,10L - -#define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1,1L - -#define LN_keyBag "keyBag" -#define NID_keyBag 150 -#define OBJ_keyBag OBJ_pkcs12_BagIds,1L - -#define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag" -#define NID_pkcs8ShroudedKeyBag 151 -#define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds,2L - -#define LN_certBag "certBag" -#define NID_certBag 152 -#define OBJ_certBag OBJ_pkcs12_BagIds,3L - -#define LN_crlBag "crlBag" -#define NID_crlBag 153 -#define OBJ_crlBag OBJ_pkcs12_BagIds,4L - -#define LN_secretBag "secretBag" -#define NID_secretBag 154 -#define OBJ_secretBag OBJ_pkcs12_BagIds,5L - -#define LN_safeContentsBag "safeContentsBag" -#define NID_safeContentsBag 155 -#define OBJ_safeContentsBag OBJ_pkcs12_BagIds,6L - -#define SN_md2 "MD2" -#define LN_md2 "md2" -#define NID_md2 3 -#define OBJ_md2 OBJ_rsadsi,2L,2L - -#define SN_md4 "MD4" -#define LN_md4 "md4" -#define NID_md4 257 -#define OBJ_md4 OBJ_rsadsi,2L,4L - -#define SN_md5 "MD5" -#define LN_md5 "md5" -#define NID_md5 4 -#define OBJ_md5 OBJ_rsadsi,2L,5L - -#define SN_md5_sha1 "MD5-SHA1" -#define LN_md5_sha1 "md5-sha1" -#define NID_md5_sha1 114 - -#define LN_hmacWithMD5 "hmacWithMD5" -#define NID_hmacWithMD5 797 -#define OBJ_hmacWithMD5 OBJ_rsadsi,2L,6L - -#define LN_hmacWithSHA1 "hmacWithSHA1" -#define NID_hmacWithSHA1 163 -#define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L - -#define LN_hmacWithSHA224 "hmacWithSHA224" -#define NID_hmacWithSHA224 798 -#define OBJ_hmacWithSHA224 OBJ_rsadsi,2L,8L - -#define LN_hmacWithSHA256 "hmacWithSHA256" -#define NID_hmacWithSHA256 799 -#define OBJ_hmacWithSHA256 OBJ_rsadsi,2L,9L - -#define LN_hmacWithSHA384 "hmacWithSHA384" -#define NID_hmacWithSHA384 800 -#define OBJ_hmacWithSHA384 OBJ_rsadsi,2L,10L - -#define LN_hmacWithSHA512 "hmacWithSHA512" -#define NID_hmacWithSHA512 801 -#define OBJ_hmacWithSHA512 OBJ_rsadsi,2L,11L - -#define SN_rc2_cbc "RC2-CBC" -#define LN_rc2_cbc "rc2-cbc" -#define NID_rc2_cbc 37 -#define OBJ_rc2_cbc OBJ_rsadsi,3L,2L - -#define SN_rc2_ecb "RC2-ECB" -#define LN_rc2_ecb "rc2-ecb" -#define NID_rc2_ecb 38 - -#define SN_rc2_cfb64 "RC2-CFB" -#define LN_rc2_cfb64 "rc2-cfb" -#define NID_rc2_cfb64 39 - -#define SN_rc2_ofb64 "RC2-OFB" -#define LN_rc2_ofb64 "rc2-ofb" -#define NID_rc2_ofb64 40 - -#define SN_rc2_40_cbc "RC2-40-CBC" -#define LN_rc2_40_cbc "rc2-40-cbc" -#define NID_rc2_40_cbc 98 - -#define SN_rc2_64_cbc "RC2-64-CBC" -#define LN_rc2_64_cbc "rc2-64-cbc" -#define NID_rc2_64_cbc 166 - -#define SN_rc4 "RC4" -#define LN_rc4 "rc4" -#define NID_rc4 5 -#define OBJ_rc4 OBJ_rsadsi,3L,4L - -#define SN_rc4_40 "RC4-40" -#define LN_rc4_40 "rc4-40" -#define NID_rc4_40 97 - -#define SN_des_ede3_cbc "DES-EDE3-CBC" -#define LN_des_ede3_cbc "des-ede3-cbc" -#define NID_des_ede3_cbc 44 -#define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L - -#define SN_rc5_cbc "RC5-CBC" -#define LN_rc5_cbc "rc5-cbc" -#define NID_rc5_cbc 120 -#define OBJ_rc5_cbc OBJ_rsadsi,3L,8L - -#define SN_rc5_ecb "RC5-ECB" -#define LN_rc5_ecb "rc5-ecb" -#define NID_rc5_ecb 121 - -#define SN_rc5_cfb64 "RC5-CFB" -#define LN_rc5_cfb64 "rc5-cfb" -#define NID_rc5_cfb64 122 - -#define SN_rc5_ofb64 "RC5-OFB" -#define LN_rc5_ofb64 "rc5-ofb" -#define NID_rc5_ofb64 123 - -#define SN_ms_ext_req "msExtReq" -#define LN_ms_ext_req "Microsoft Extension Request" -#define NID_ms_ext_req 171 -#define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L - -#define SN_ms_code_ind "msCodeInd" -#define LN_ms_code_ind "Microsoft Individual Code Signing" -#define NID_ms_code_ind 134 -#define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L - -#define SN_ms_code_com "msCodeCom" -#define LN_ms_code_com "Microsoft Commercial Code Signing" -#define NID_ms_code_com 135 -#define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L - -#define SN_ms_ctl_sign "msCTLSign" -#define LN_ms_ctl_sign "Microsoft Trust List Signing" -#define NID_ms_ctl_sign 136 -#define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L - -#define SN_ms_sgc "msSGC" -#define LN_ms_sgc "Microsoft Server Gated Crypto" -#define NID_ms_sgc 137 -#define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L - -#define SN_ms_efs "msEFS" -#define LN_ms_efs "Microsoft Encrypted File System" -#define NID_ms_efs 138 -#define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L - -#define SN_ms_smartcard_login "msSmartcardLogin" -#define LN_ms_smartcard_login "Microsoft Smartcardlogin" -#define NID_ms_smartcard_login 648 -#define OBJ_ms_smartcard_login 1L,3L,6L,1L,4L,1L,311L,20L,2L,2L - -#define SN_ms_upn "msUPN" -#define LN_ms_upn "Microsoft Universal Principal Name" -#define NID_ms_upn 649 -#define OBJ_ms_upn 1L,3L,6L,1L,4L,1L,311L,20L,2L,3L - -#define SN_idea_cbc "IDEA-CBC" -#define LN_idea_cbc "idea-cbc" -#define NID_idea_cbc 34 -#define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L - -#define SN_idea_ecb "IDEA-ECB" -#define LN_idea_ecb "idea-ecb" -#define NID_idea_ecb 36 - -#define SN_idea_cfb64 "IDEA-CFB" -#define LN_idea_cfb64 "idea-cfb" -#define NID_idea_cfb64 35 - -#define SN_idea_ofb64 "IDEA-OFB" -#define LN_idea_ofb64 "idea-ofb" -#define NID_idea_ofb64 46 - -#define SN_bf_cbc "BF-CBC" -#define LN_bf_cbc "bf-cbc" -#define NID_bf_cbc 91 -#define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L - -#define SN_bf_ecb "BF-ECB" -#define LN_bf_ecb "bf-ecb" -#define NID_bf_ecb 92 - -#define SN_bf_cfb64 "BF-CFB" -#define LN_bf_cfb64 "bf-cfb" -#define NID_bf_cfb64 93 - -#define SN_bf_ofb64 "BF-OFB" -#define LN_bf_ofb64 "bf-ofb" -#define NID_bf_ofb64 94 - -#define SN_id_pkix "PKIX" -#define NID_id_pkix 127 -#define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L - -#define SN_id_pkix_mod "id-pkix-mod" -#define NID_id_pkix_mod 258 -#define OBJ_id_pkix_mod OBJ_id_pkix,0L - -#define SN_id_pe "id-pe" -#define NID_id_pe 175 -#define OBJ_id_pe OBJ_id_pkix,1L - -#define SN_id_qt "id-qt" -#define NID_id_qt 259 -#define OBJ_id_qt OBJ_id_pkix,2L - -#define SN_id_kp "id-kp" -#define NID_id_kp 128 -#define OBJ_id_kp OBJ_id_pkix,3L - -#define SN_id_it "id-it" -#define NID_id_it 260 -#define OBJ_id_it OBJ_id_pkix,4L - -#define SN_id_pkip "id-pkip" -#define NID_id_pkip 261 -#define OBJ_id_pkip OBJ_id_pkix,5L - -#define SN_id_alg "id-alg" -#define NID_id_alg 262 -#define OBJ_id_alg OBJ_id_pkix,6L - -#define SN_id_cmc "id-cmc" -#define NID_id_cmc 263 -#define OBJ_id_cmc OBJ_id_pkix,7L - -#define SN_id_on "id-on" -#define NID_id_on 264 -#define OBJ_id_on OBJ_id_pkix,8L - -#define SN_id_pda "id-pda" -#define NID_id_pda 265 -#define OBJ_id_pda OBJ_id_pkix,9L - -#define SN_id_aca "id-aca" -#define NID_id_aca 266 -#define OBJ_id_aca OBJ_id_pkix,10L - -#define SN_id_qcs "id-qcs" -#define NID_id_qcs 267 -#define OBJ_id_qcs OBJ_id_pkix,11L - -#define SN_id_cct "id-cct" -#define NID_id_cct 268 -#define OBJ_id_cct OBJ_id_pkix,12L - -#define SN_id_ppl "id-ppl" -#define NID_id_ppl 662 -#define OBJ_id_ppl OBJ_id_pkix,21L - -#define SN_id_ad "id-ad" -#define NID_id_ad 176 -#define OBJ_id_ad OBJ_id_pkix,48L - -#define SN_id_pkix1_explicit_88 "id-pkix1-explicit-88" -#define NID_id_pkix1_explicit_88 269 -#define OBJ_id_pkix1_explicit_88 OBJ_id_pkix_mod,1L - -#define SN_id_pkix1_implicit_88 "id-pkix1-implicit-88" -#define NID_id_pkix1_implicit_88 270 -#define OBJ_id_pkix1_implicit_88 OBJ_id_pkix_mod,2L - -#define SN_id_pkix1_explicit_93 "id-pkix1-explicit-93" -#define NID_id_pkix1_explicit_93 271 -#define OBJ_id_pkix1_explicit_93 OBJ_id_pkix_mod,3L - -#define SN_id_pkix1_implicit_93 "id-pkix1-implicit-93" -#define NID_id_pkix1_implicit_93 272 -#define OBJ_id_pkix1_implicit_93 OBJ_id_pkix_mod,4L - -#define SN_id_mod_crmf "id-mod-crmf" -#define NID_id_mod_crmf 273 -#define OBJ_id_mod_crmf OBJ_id_pkix_mod,5L - -#define SN_id_mod_cmc "id-mod-cmc" -#define NID_id_mod_cmc 274 -#define OBJ_id_mod_cmc OBJ_id_pkix_mod,6L - -#define SN_id_mod_kea_profile_88 "id-mod-kea-profile-88" -#define NID_id_mod_kea_profile_88 275 -#define OBJ_id_mod_kea_profile_88 OBJ_id_pkix_mod,7L - -#define SN_id_mod_kea_profile_93 "id-mod-kea-profile-93" -#define NID_id_mod_kea_profile_93 276 -#define OBJ_id_mod_kea_profile_93 OBJ_id_pkix_mod,8L - -#define SN_id_mod_cmp "id-mod-cmp" -#define NID_id_mod_cmp 277 -#define OBJ_id_mod_cmp OBJ_id_pkix_mod,9L - -#define SN_id_mod_qualified_cert_88 "id-mod-qualified-cert-88" -#define NID_id_mod_qualified_cert_88 278 -#define OBJ_id_mod_qualified_cert_88 OBJ_id_pkix_mod,10L - -#define SN_id_mod_qualified_cert_93 "id-mod-qualified-cert-93" -#define NID_id_mod_qualified_cert_93 279 -#define OBJ_id_mod_qualified_cert_93 OBJ_id_pkix_mod,11L - -#define SN_id_mod_attribute_cert "id-mod-attribute-cert" -#define NID_id_mod_attribute_cert 280 -#define OBJ_id_mod_attribute_cert OBJ_id_pkix_mod,12L - -#define SN_id_mod_timestamp_protocol "id-mod-timestamp-protocol" -#define NID_id_mod_timestamp_protocol 281 -#define OBJ_id_mod_timestamp_protocol OBJ_id_pkix_mod,13L - -#define SN_id_mod_ocsp "id-mod-ocsp" -#define NID_id_mod_ocsp 282 -#define OBJ_id_mod_ocsp OBJ_id_pkix_mod,14L - -#define SN_id_mod_dvcs "id-mod-dvcs" -#define NID_id_mod_dvcs 283 -#define OBJ_id_mod_dvcs OBJ_id_pkix_mod,15L - -#define SN_id_mod_cmp2000 "id-mod-cmp2000" -#define NID_id_mod_cmp2000 284 -#define OBJ_id_mod_cmp2000 OBJ_id_pkix_mod,16L - -#define SN_info_access "authorityInfoAccess" -#define LN_info_access "Authority Information Access" -#define NID_info_access 177 -#define OBJ_info_access OBJ_id_pe,1L - -#define SN_biometricInfo "biometricInfo" -#define LN_biometricInfo "Biometric Info" -#define NID_biometricInfo 285 -#define OBJ_biometricInfo OBJ_id_pe,2L - -#define SN_qcStatements "qcStatements" -#define NID_qcStatements 286 -#define OBJ_qcStatements OBJ_id_pe,3L - -#define SN_ac_auditEntity "ac-auditEntity" -#define NID_ac_auditEntity 287 -#define OBJ_ac_auditEntity OBJ_id_pe,4L - -#define SN_ac_targeting "ac-targeting" -#define NID_ac_targeting 288 -#define OBJ_ac_targeting OBJ_id_pe,5L - -#define SN_aaControls "aaControls" -#define NID_aaControls 289 -#define OBJ_aaControls OBJ_id_pe,6L - -#define SN_sbgp_ipAddrBlock "sbgp-ipAddrBlock" -#define NID_sbgp_ipAddrBlock 290 -#define OBJ_sbgp_ipAddrBlock OBJ_id_pe,7L - -#define SN_sbgp_autonomousSysNum "sbgp-autonomousSysNum" -#define NID_sbgp_autonomousSysNum 291 -#define OBJ_sbgp_autonomousSysNum OBJ_id_pe,8L - -#define SN_sbgp_routerIdentifier "sbgp-routerIdentifier" -#define NID_sbgp_routerIdentifier 292 -#define OBJ_sbgp_routerIdentifier OBJ_id_pe,9L - -#define SN_ac_proxying "ac-proxying" -#define NID_ac_proxying 397 -#define OBJ_ac_proxying OBJ_id_pe,10L - -#define SN_sinfo_access "subjectInfoAccess" -#define LN_sinfo_access "Subject Information Access" -#define NID_sinfo_access 398 -#define OBJ_sinfo_access OBJ_id_pe,11L - -#define SN_proxyCertInfo "proxyCertInfo" -#define LN_proxyCertInfo "Proxy Certificate Information" -#define NID_proxyCertInfo 663 -#define OBJ_proxyCertInfo OBJ_id_pe,14L - -#define SN_id_qt_cps "id-qt-cps" -#define LN_id_qt_cps "Policy Qualifier CPS" -#define NID_id_qt_cps 164 -#define OBJ_id_qt_cps OBJ_id_qt,1L - -#define SN_id_qt_unotice "id-qt-unotice" -#define LN_id_qt_unotice "Policy Qualifier User Notice" -#define NID_id_qt_unotice 165 -#define OBJ_id_qt_unotice OBJ_id_qt,2L - -#define SN_textNotice "textNotice" -#define NID_textNotice 293 -#define OBJ_textNotice OBJ_id_qt,3L - -#define SN_server_auth "serverAuth" -#define LN_server_auth "TLS Web Server Authentication" -#define NID_server_auth 129 -#define OBJ_server_auth OBJ_id_kp,1L - -#define SN_client_auth "clientAuth" -#define LN_client_auth "TLS Web Client Authentication" -#define NID_client_auth 130 -#define OBJ_client_auth OBJ_id_kp,2L - -#define SN_code_sign "codeSigning" -#define LN_code_sign "Code Signing" -#define NID_code_sign 131 -#define OBJ_code_sign OBJ_id_kp,3L - -#define SN_email_protect "emailProtection" -#define LN_email_protect "E-mail Protection" -#define NID_email_protect 132 -#define OBJ_email_protect OBJ_id_kp,4L - -#define SN_ipsecEndSystem "ipsecEndSystem" -#define LN_ipsecEndSystem "IPSec End System" -#define NID_ipsecEndSystem 294 -#define OBJ_ipsecEndSystem OBJ_id_kp,5L - -#define SN_ipsecTunnel "ipsecTunnel" -#define LN_ipsecTunnel "IPSec Tunnel" -#define NID_ipsecTunnel 295 -#define OBJ_ipsecTunnel OBJ_id_kp,6L - -#define SN_ipsecUser "ipsecUser" -#define LN_ipsecUser "IPSec User" -#define NID_ipsecUser 296 -#define OBJ_ipsecUser OBJ_id_kp,7L - -#define SN_time_stamp "timeStamping" -#define LN_time_stamp "Time Stamping" -#define NID_time_stamp 133 -#define OBJ_time_stamp OBJ_id_kp,8L - -#define SN_OCSP_sign "OCSPSigning" -#define LN_OCSP_sign "OCSP Signing" -#define NID_OCSP_sign 180 -#define OBJ_OCSP_sign OBJ_id_kp,9L - -#define SN_dvcs "DVCS" -#define LN_dvcs "dvcs" -#define NID_dvcs 297 -#define OBJ_dvcs OBJ_id_kp,10L - -#define SN_id_it_caProtEncCert "id-it-caProtEncCert" -#define NID_id_it_caProtEncCert 298 -#define OBJ_id_it_caProtEncCert OBJ_id_it,1L - -#define SN_id_it_signKeyPairTypes "id-it-signKeyPairTypes" -#define NID_id_it_signKeyPairTypes 299 -#define OBJ_id_it_signKeyPairTypes OBJ_id_it,2L - -#define SN_id_it_encKeyPairTypes "id-it-encKeyPairTypes" -#define NID_id_it_encKeyPairTypes 300 -#define OBJ_id_it_encKeyPairTypes OBJ_id_it,3L - -#define SN_id_it_preferredSymmAlg "id-it-preferredSymmAlg" -#define NID_id_it_preferredSymmAlg 301 -#define OBJ_id_it_preferredSymmAlg OBJ_id_it,4L - -#define SN_id_it_caKeyUpdateInfo "id-it-caKeyUpdateInfo" -#define NID_id_it_caKeyUpdateInfo 302 -#define OBJ_id_it_caKeyUpdateInfo OBJ_id_it,5L - -#define SN_id_it_currentCRL "id-it-currentCRL" -#define NID_id_it_currentCRL 303 -#define OBJ_id_it_currentCRL OBJ_id_it,6L - -#define SN_id_it_unsupportedOIDs "id-it-unsupportedOIDs" -#define NID_id_it_unsupportedOIDs 304 -#define OBJ_id_it_unsupportedOIDs OBJ_id_it,7L - -#define SN_id_it_subscriptionRequest "id-it-subscriptionRequest" -#define NID_id_it_subscriptionRequest 305 -#define OBJ_id_it_subscriptionRequest OBJ_id_it,8L - -#define SN_id_it_subscriptionResponse "id-it-subscriptionResponse" -#define NID_id_it_subscriptionResponse 306 -#define OBJ_id_it_subscriptionResponse OBJ_id_it,9L - -#define SN_id_it_keyPairParamReq "id-it-keyPairParamReq" -#define NID_id_it_keyPairParamReq 307 -#define OBJ_id_it_keyPairParamReq OBJ_id_it,10L - -#define SN_id_it_keyPairParamRep "id-it-keyPairParamRep" -#define NID_id_it_keyPairParamRep 308 -#define OBJ_id_it_keyPairParamRep OBJ_id_it,11L - -#define SN_id_it_revPassphrase "id-it-revPassphrase" -#define NID_id_it_revPassphrase 309 -#define OBJ_id_it_revPassphrase OBJ_id_it,12L - -#define SN_id_it_implicitConfirm "id-it-implicitConfirm" -#define NID_id_it_implicitConfirm 310 -#define OBJ_id_it_implicitConfirm OBJ_id_it,13L - -#define SN_id_it_confirmWaitTime "id-it-confirmWaitTime" -#define NID_id_it_confirmWaitTime 311 -#define OBJ_id_it_confirmWaitTime OBJ_id_it,14L - -#define SN_id_it_origPKIMessage "id-it-origPKIMessage" -#define NID_id_it_origPKIMessage 312 -#define OBJ_id_it_origPKIMessage OBJ_id_it,15L - -#define SN_id_it_suppLangTags "id-it-suppLangTags" -#define NID_id_it_suppLangTags 784 -#define OBJ_id_it_suppLangTags OBJ_id_it,16L - -#define SN_id_regCtrl "id-regCtrl" -#define NID_id_regCtrl 313 -#define OBJ_id_regCtrl OBJ_id_pkip,1L - -#define SN_id_regInfo "id-regInfo" -#define NID_id_regInfo 314 -#define OBJ_id_regInfo OBJ_id_pkip,2L - -#define SN_id_regCtrl_regToken "id-regCtrl-regToken" -#define NID_id_regCtrl_regToken 315 -#define OBJ_id_regCtrl_regToken OBJ_id_regCtrl,1L - -#define SN_id_regCtrl_authenticator "id-regCtrl-authenticator" -#define NID_id_regCtrl_authenticator 316 -#define OBJ_id_regCtrl_authenticator OBJ_id_regCtrl,2L - -#define SN_id_regCtrl_pkiPublicationInfo "id-regCtrl-pkiPublicationInfo" -#define NID_id_regCtrl_pkiPublicationInfo 317 -#define OBJ_id_regCtrl_pkiPublicationInfo OBJ_id_regCtrl,3L - -#define SN_id_regCtrl_pkiArchiveOptions "id-regCtrl-pkiArchiveOptions" -#define NID_id_regCtrl_pkiArchiveOptions 318 -#define OBJ_id_regCtrl_pkiArchiveOptions OBJ_id_regCtrl,4L - -#define SN_id_regCtrl_oldCertID "id-regCtrl-oldCertID" -#define NID_id_regCtrl_oldCertID 319 -#define OBJ_id_regCtrl_oldCertID OBJ_id_regCtrl,5L - -#define SN_id_regCtrl_protocolEncrKey "id-regCtrl-protocolEncrKey" -#define NID_id_regCtrl_protocolEncrKey 320 -#define OBJ_id_regCtrl_protocolEncrKey OBJ_id_regCtrl,6L - -#define SN_id_regInfo_utf8Pairs "id-regInfo-utf8Pairs" -#define NID_id_regInfo_utf8Pairs 321 -#define OBJ_id_regInfo_utf8Pairs OBJ_id_regInfo,1L - -#define SN_id_regInfo_certReq "id-regInfo-certReq" -#define NID_id_regInfo_certReq 322 -#define OBJ_id_regInfo_certReq OBJ_id_regInfo,2L - -#define SN_id_alg_des40 "id-alg-des40" -#define NID_id_alg_des40 323 -#define OBJ_id_alg_des40 OBJ_id_alg,1L - -#define SN_id_alg_noSignature "id-alg-noSignature" -#define NID_id_alg_noSignature 324 -#define OBJ_id_alg_noSignature OBJ_id_alg,2L - -#define SN_id_alg_dh_sig_hmac_sha1 "id-alg-dh-sig-hmac-sha1" -#define NID_id_alg_dh_sig_hmac_sha1 325 -#define OBJ_id_alg_dh_sig_hmac_sha1 OBJ_id_alg,3L - -#define SN_id_alg_dh_pop "id-alg-dh-pop" -#define NID_id_alg_dh_pop 326 -#define OBJ_id_alg_dh_pop OBJ_id_alg,4L - -#define SN_id_cmc_statusInfo "id-cmc-statusInfo" -#define NID_id_cmc_statusInfo 327 -#define OBJ_id_cmc_statusInfo OBJ_id_cmc,1L - -#define SN_id_cmc_identification "id-cmc-identification" -#define NID_id_cmc_identification 328 -#define OBJ_id_cmc_identification OBJ_id_cmc,2L - -#define SN_id_cmc_identityProof "id-cmc-identityProof" -#define NID_id_cmc_identityProof 329 -#define OBJ_id_cmc_identityProof OBJ_id_cmc,3L - -#define SN_id_cmc_dataReturn "id-cmc-dataReturn" -#define NID_id_cmc_dataReturn 330 -#define OBJ_id_cmc_dataReturn OBJ_id_cmc,4L - -#define SN_id_cmc_transactionId "id-cmc-transactionId" -#define NID_id_cmc_transactionId 331 -#define OBJ_id_cmc_transactionId OBJ_id_cmc,5L - -#define SN_id_cmc_senderNonce "id-cmc-senderNonce" -#define NID_id_cmc_senderNonce 332 -#define OBJ_id_cmc_senderNonce OBJ_id_cmc,6L - -#define SN_id_cmc_recipientNonce "id-cmc-recipientNonce" -#define NID_id_cmc_recipientNonce 333 -#define OBJ_id_cmc_recipientNonce OBJ_id_cmc,7L - -#define SN_id_cmc_addExtensions "id-cmc-addExtensions" -#define NID_id_cmc_addExtensions 334 -#define OBJ_id_cmc_addExtensions OBJ_id_cmc,8L - -#define SN_id_cmc_encryptedPOP "id-cmc-encryptedPOP" -#define NID_id_cmc_encryptedPOP 335 -#define OBJ_id_cmc_encryptedPOP OBJ_id_cmc,9L - -#define SN_id_cmc_decryptedPOP "id-cmc-decryptedPOP" -#define NID_id_cmc_decryptedPOP 336 -#define OBJ_id_cmc_decryptedPOP OBJ_id_cmc,10L - -#define SN_id_cmc_lraPOPWitness "id-cmc-lraPOPWitness" -#define NID_id_cmc_lraPOPWitness 337 -#define OBJ_id_cmc_lraPOPWitness OBJ_id_cmc,11L - -#define SN_id_cmc_getCert "id-cmc-getCert" -#define NID_id_cmc_getCert 338 -#define OBJ_id_cmc_getCert OBJ_id_cmc,15L - -#define SN_id_cmc_getCRL "id-cmc-getCRL" -#define NID_id_cmc_getCRL 339 -#define OBJ_id_cmc_getCRL OBJ_id_cmc,16L - -#define SN_id_cmc_revokeRequest "id-cmc-revokeRequest" -#define NID_id_cmc_revokeRequest 340 -#define OBJ_id_cmc_revokeRequest OBJ_id_cmc,17L - -#define SN_id_cmc_regInfo "id-cmc-regInfo" -#define NID_id_cmc_regInfo 341 -#define OBJ_id_cmc_regInfo OBJ_id_cmc,18L - -#define SN_id_cmc_responseInfo "id-cmc-responseInfo" -#define NID_id_cmc_responseInfo 342 -#define OBJ_id_cmc_responseInfo OBJ_id_cmc,19L - -#define SN_id_cmc_queryPending "id-cmc-queryPending" -#define NID_id_cmc_queryPending 343 -#define OBJ_id_cmc_queryPending OBJ_id_cmc,21L - -#define SN_id_cmc_popLinkRandom "id-cmc-popLinkRandom" -#define NID_id_cmc_popLinkRandom 344 -#define OBJ_id_cmc_popLinkRandom OBJ_id_cmc,22L - -#define SN_id_cmc_popLinkWitness "id-cmc-popLinkWitness" -#define NID_id_cmc_popLinkWitness 345 -#define OBJ_id_cmc_popLinkWitness OBJ_id_cmc,23L - -#define SN_id_cmc_confirmCertAcceptance "id-cmc-confirmCertAcceptance" -#define NID_id_cmc_confirmCertAcceptance 346 -#define OBJ_id_cmc_confirmCertAcceptance OBJ_id_cmc,24L - -#define SN_id_on_personalData "id-on-personalData" -#define NID_id_on_personalData 347 -#define OBJ_id_on_personalData OBJ_id_on,1L - -#define SN_id_on_permanentIdentifier "id-on-permanentIdentifier" -#define LN_id_on_permanentIdentifier "Permanent Identifier" -#define NID_id_on_permanentIdentifier 858 -#define OBJ_id_on_permanentIdentifier OBJ_id_on,3L - -#define SN_id_pda_dateOfBirth "id-pda-dateOfBirth" -#define NID_id_pda_dateOfBirth 348 -#define OBJ_id_pda_dateOfBirth OBJ_id_pda,1L - -#define SN_id_pda_placeOfBirth "id-pda-placeOfBirth" -#define NID_id_pda_placeOfBirth 349 -#define OBJ_id_pda_placeOfBirth OBJ_id_pda,2L - -#define SN_id_pda_gender "id-pda-gender" -#define NID_id_pda_gender 351 -#define OBJ_id_pda_gender OBJ_id_pda,3L - -#define SN_id_pda_countryOfCitizenship "id-pda-countryOfCitizenship" -#define NID_id_pda_countryOfCitizenship 352 -#define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,4L - -#define SN_id_pda_countryOfResidence "id-pda-countryOfResidence" -#define NID_id_pda_countryOfResidence 353 -#define OBJ_id_pda_countryOfResidence OBJ_id_pda,5L - -#define SN_id_aca_authenticationInfo "id-aca-authenticationInfo" -#define NID_id_aca_authenticationInfo 354 -#define OBJ_id_aca_authenticationInfo OBJ_id_aca,1L - -#define SN_id_aca_accessIdentity "id-aca-accessIdentity" -#define NID_id_aca_accessIdentity 355 -#define OBJ_id_aca_accessIdentity OBJ_id_aca,2L - -#define SN_id_aca_chargingIdentity "id-aca-chargingIdentity" -#define NID_id_aca_chargingIdentity 356 -#define OBJ_id_aca_chargingIdentity OBJ_id_aca,3L - -#define SN_id_aca_group "id-aca-group" -#define NID_id_aca_group 357 -#define OBJ_id_aca_group OBJ_id_aca,4L - -#define SN_id_aca_role "id-aca-role" -#define NID_id_aca_role 358 -#define OBJ_id_aca_role OBJ_id_aca,5L - -#define SN_id_aca_encAttrs "id-aca-encAttrs" -#define NID_id_aca_encAttrs 399 -#define OBJ_id_aca_encAttrs OBJ_id_aca,6L - -#define SN_id_qcs_pkixQCSyntax_v1 "id-qcs-pkixQCSyntax-v1" -#define NID_id_qcs_pkixQCSyntax_v1 359 -#define OBJ_id_qcs_pkixQCSyntax_v1 OBJ_id_qcs,1L - -#define SN_id_cct_crs "id-cct-crs" -#define NID_id_cct_crs 360 -#define OBJ_id_cct_crs OBJ_id_cct,1L - -#define SN_id_cct_PKIData "id-cct-PKIData" -#define NID_id_cct_PKIData 361 -#define OBJ_id_cct_PKIData OBJ_id_cct,2L - -#define SN_id_cct_PKIResponse "id-cct-PKIResponse" -#define NID_id_cct_PKIResponse 362 -#define OBJ_id_cct_PKIResponse OBJ_id_cct,3L - -#define SN_id_ppl_anyLanguage "id-ppl-anyLanguage" -#define LN_id_ppl_anyLanguage "Any language" -#define NID_id_ppl_anyLanguage 664 -#define OBJ_id_ppl_anyLanguage OBJ_id_ppl,0L - -#define SN_id_ppl_inheritAll "id-ppl-inheritAll" -#define LN_id_ppl_inheritAll "Inherit all" -#define NID_id_ppl_inheritAll 665 -#define OBJ_id_ppl_inheritAll OBJ_id_ppl,1L - -#define SN_Independent "id-ppl-independent" -#define LN_Independent "Independent" -#define NID_Independent 667 -#define OBJ_Independent OBJ_id_ppl,2L - -#define SN_ad_OCSP "OCSP" -#define LN_ad_OCSP "OCSP" -#define NID_ad_OCSP 178 -#define OBJ_ad_OCSP OBJ_id_ad,1L - -#define SN_ad_ca_issuers "caIssuers" -#define LN_ad_ca_issuers "CA Issuers" -#define NID_ad_ca_issuers 179 -#define OBJ_ad_ca_issuers OBJ_id_ad,2L - -#define SN_ad_timeStamping "ad_timestamping" -#define LN_ad_timeStamping "AD Time Stamping" -#define NID_ad_timeStamping 363 -#define OBJ_ad_timeStamping OBJ_id_ad,3L - -#define SN_ad_dvcs "AD_DVCS" -#define LN_ad_dvcs "ad dvcs" -#define NID_ad_dvcs 364 -#define OBJ_ad_dvcs OBJ_id_ad,4L - -#define SN_caRepository "caRepository" -#define LN_caRepository "CA Repository" -#define NID_caRepository 785 -#define OBJ_caRepository OBJ_id_ad,5L - -#define OBJ_id_pkix_OCSP OBJ_ad_OCSP - -#define SN_id_pkix_OCSP_basic "basicOCSPResponse" -#define LN_id_pkix_OCSP_basic "Basic OCSP Response" -#define NID_id_pkix_OCSP_basic 365 -#define OBJ_id_pkix_OCSP_basic OBJ_id_pkix_OCSP,1L - -#define SN_id_pkix_OCSP_Nonce "Nonce" -#define LN_id_pkix_OCSP_Nonce "OCSP Nonce" -#define NID_id_pkix_OCSP_Nonce 366 -#define OBJ_id_pkix_OCSP_Nonce OBJ_id_pkix_OCSP,2L - -#define SN_id_pkix_OCSP_CrlID "CrlID" -#define LN_id_pkix_OCSP_CrlID "OCSP CRL ID" -#define NID_id_pkix_OCSP_CrlID 367 -#define OBJ_id_pkix_OCSP_CrlID OBJ_id_pkix_OCSP,3L - -#define SN_id_pkix_OCSP_acceptableResponses "acceptableResponses" -#define LN_id_pkix_OCSP_acceptableResponses "Acceptable OCSP Responses" -#define NID_id_pkix_OCSP_acceptableResponses 368 -#define OBJ_id_pkix_OCSP_acceptableResponses OBJ_id_pkix_OCSP,4L - -#define SN_id_pkix_OCSP_noCheck "noCheck" -#define LN_id_pkix_OCSP_noCheck "OCSP No Check" -#define NID_id_pkix_OCSP_noCheck 369 -#define OBJ_id_pkix_OCSP_noCheck OBJ_id_pkix_OCSP,5L - -#define SN_id_pkix_OCSP_archiveCutoff "archiveCutoff" -#define LN_id_pkix_OCSP_archiveCutoff "OCSP Archive Cutoff" -#define NID_id_pkix_OCSP_archiveCutoff 370 -#define OBJ_id_pkix_OCSP_archiveCutoff OBJ_id_pkix_OCSP,6L - -#define SN_id_pkix_OCSP_serviceLocator "serviceLocator" -#define LN_id_pkix_OCSP_serviceLocator "OCSP Service Locator" -#define NID_id_pkix_OCSP_serviceLocator 371 -#define OBJ_id_pkix_OCSP_serviceLocator OBJ_id_pkix_OCSP,7L - -#define SN_id_pkix_OCSP_extendedStatus "extendedStatus" -#define LN_id_pkix_OCSP_extendedStatus "Extended OCSP Status" -#define NID_id_pkix_OCSP_extendedStatus 372 -#define OBJ_id_pkix_OCSP_extendedStatus OBJ_id_pkix_OCSP,8L - -#define SN_id_pkix_OCSP_valid "valid" -#define NID_id_pkix_OCSP_valid 373 -#define OBJ_id_pkix_OCSP_valid OBJ_id_pkix_OCSP,9L - -#define SN_id_pkix_OCSP_path "path" -#define NID_id_pkix_OCSP_path 374 -#define OBJ_id_pkix_OCSP_path OBJ_id_pkix_OCSP,10L - -#define SN_id_pkix_OCSP_trustRoot "trustRoot" -#define LN_id_pkix_OCSP_trustRoot "Trust Root" -#define NID_id_pkix_OCSP_trustRoot 375 -#define OBJ_id_pkix_OCSP_trustRoot OBJ_id_pkix_OCSP,11L - -#define SN_algorithm "algorithm" -#define LN_algorithm "algorithm" -#define NID_algorithm 376 -#define OBJ_algorithm 1L,3L,14L,3L,2L - -#define SN_md5WithRSA "RSA-NP-MD5" -#define LN_md5WithRSA "md5WithRSA" -#define NID_md5WithRSA 104 -#define OBJ_md5WithRSA OBJ_algorithm,3L - -#define SN_des_ecb "DES-ECB" -#define LN_des_ecb "des-ecb" -#define NID_des_ecb 29 -#define OBJ_des_ecb OBJ_algorithm,6L - -#define SN_des_cbc "DES-CBC" -#define LN_des_cbc "des-cbc" -#define NID_des_cbc 31 -#define OBJ_des_cbc OBJ_algorithm,7L - -#define SN_des_ofb64 "DES-OFB" -#define LN_des_ofb64 "des-ofb" -#define NID_des_ofb64 45 -#define OBJ_des_ofb64 OBJ_algorithm,8L - -#define SN_des_cfb64 "DES-CFB" -#define LN_des_cfb64 "des-cfb" -#define NID_des_cfb64 30 -#define OBJ_des_cfb64 OBJ_algorithm,9L - -#define SN_rsaSignature "rsaSignature" -#define NID_rsaSignature 377 -#define OBJ_rsaSignature OBJ_algorithm,11L - -#define SN_dsa_2 "DSA-old" -#define LN_dsa_2 "dsaEncryption-old" -#define NID_dsa_2 67 -#define OBJ_dsa_2 OBJ_algorithm,12L - -#define SN_dsaWithSHA "DSA-SHA" -#define LN_dsaWithSHA "dsaWithSHA" -#define NID_dsaWithSHA 66 -#define OBJ_dsaWithSHA OBJ_algorithm,13L - -#define SN_shaWithRSAEncryption "RSA-SHA" -#define LN_shaWithRSAEncryption "shaWithRSAEncryption" -#define NID_shaWithRSAEncryption 42 -#define OBJ_shaWithRSAEncryption OBJ_algorithm,15L - -#define SN_des_ede_ecb "DES-EDE" -#define LN_des_ede_ecb "des-ede" -#define NID_des_ede_ecb 32 -#define OBJ_des_ede_ecb OBJ_algorithm,17L - -#define SN_des_ede3_ecb "DES-EDE3" -#define LN_des_ede3_ecb "des-ede3" -#define NID_des_ede3_ecb 33 - -#define SN_des_ede_cbc "DES-EDE-CBC" -#define LN_des_ede_cbc "des-ede-cbc" -#define NID_des_ede_cbc 43 - -#define SN_des_ede_cfb64 "DES-EDE-CFB" -#define LN_des_ede_cfb64 "des-ede-cfb" -#define NID_des_ede_cfb64 60 - -#define SN_des_ede3_cfb64 "DES-EDE3-CFB" -#define LN_des_ede3_cfb64 "des-ede3-cfb" -#define NID_des_ede3_cfb64 61 - -#define SN_des_ede_ofb64 "DES-EDE-OFB" -#define LN_des_ede_ofb64 "des-ede-ofb" -#define NID_des_ede_ofb64 62 - -#define SN_des_ede3_ofb64 "DES-EDE3-OFB" -#define LN_des_ede3_ofb64 "des-ede3-ofb" -#define NID_des_ede3_ofb64 63 - -#define SN_desx_cbc "DESX-CBC" -#define LN_desx_cbc "desx-cbc" -#define NID_desx_cbc 80 - -#define SN_sha "SHA" -#define LN_sha "sha" -#define NID_sha 41 -#define OBJ_sha OBJ_algorithm,18L - -#define SN_sha1 "SHA1" -#define LN_sha1 "sha1" -#define NID_sha1 64 -#define OBJ_sha1 OBJ_algorithm,26L - -#define SN_dsaWithSHA1_2 "DSA-SHA1-old" -#define LN_dsaWithSHA1_2 "dsaWithSHA1-old" -#define NID_dsaWithSHA1_2 70 -#define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L - -#define SN_sha1WithRSA "RSA-SHA1-2" -#define LN_sha1WithRSA "sha1WithRSA" -#define NID_sha1WithRSA 115 -#define OBJ_sha1WithRSA OBJ_algorithm,29L - -#define SN_ripemd160 "RIPEMD160" -#define LN_ripemd160 "ripemd160" -#define NID_ripemd160 117 -#define OBJ_ripemd160 1L,3L,36L,3L,2L,1L - -#define SN_ripemd160WithRSA "RSA-RIPEMD160" -#define LN_ripemd160WithRSA "ripemd160WithRSA" -#define NID_ripemd160WithRSA 119 -#define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L - -#define SN_sxnet "SXNetID" -#define LN_sxnet "Strong Extranet ID" -#define NID_sxnet 143 -#define OBJ_sxnet 1L,3L,101L,1L,4L,1L - -#define SN_X500 "X500" -#define LN_X500 "directory services (X.500)" -#define NID_X500 11 -#define OBJ_X500 2L,5L - -#define SN_X509 "X509" -#define NID_X509 12 -#define OBJ_X509 OBJ_X500,4L - -#define SN_commonName "CN" -#define LN_commonName "commonName" -#define NID_commonName 13 -#define OBJ_commonName OBJ_X509,3L - -#define SN_surname "SN" -#define LN_surname "surname" -#define NID_surname 100 -#define OBJ_surname OBJ_X509,4L - -#define LN_serialNumber "serialNumber" -#define NID_serialNumber 105 -#define OBJ_serialNumber OBJ_X509,5L - -#define SN_countryName "C" -#define LN_countryName "countryName" -#define NID_countryName 14 -#define OBJ_countryName OBJ_X509,6L - -#define SN_localityName "L" -#define LN_localityName "localityName" -#define NID_localityName 15 -#define OBJ_localityName OBJ_X509,7L - -#define SN_stateOrProvinceName "ST" -#define LN_stateOrProvinceName "stateOrProvinceName" -#define NID_stateOrProvinceName 16 -#define OBJ_stateOrProvinceName OBJ_X509,8L - -#define LN_streetAddress "streetAddress" -#define NID_streetAddress 660 -#define OBJ_streetAddress OBJ_X509,9L - -#define SN_organizationName "O" -#define LN_organizationName "organizationName" -#define NID_organizationName 17 -#define OBJ_organizationName OBJ_X509,10L - -#define SN_organizationalUnitName "OU" -#define LN_organizationalUnitName "organizationalUnitName" -#define NID_organizationalUnitName 18 -#define OBJ_organizationalUnitName OBJ_X509,11L - -#define LN_title "title" -#define NID_title 106 -#define OBJ_title OBJ_X509,12L - -#define LN_description "description" -#define NID_description 107 -#define OBJ_description OBJ_X509,13L - -#define LN_postalCode "postalCode" -#define NID_postalCode 661 -#define OBJ_postalCode OBJ_X509,17L - -#define SN_name "name" -#define LN_name "name" -#define NID_name 173 -#define OBJ_name OBJ_X509,41L - -#define SN_givenName "GN" -#define LN_givenName "givenName" -#define NID_givenName 99 -#define OBJ_givenName OBJ_X509,42L - -#define LN_initials "initials" -#define NID_initials 101 -#define OBJ_initials OBJ_X509,43L - -#define LN_generationQualifier "generationQualifier" -#define NID_generationQualifier 509 -#define OBJ_generationQualifier OBJ_X509,44L - -#define LN_x500UniqueIdentifier "x500UniqueIdentifier" -#define NID_x500UniqueIdentifier 503 -#define OBJ_x500UniqueIdentifier OBJ_X509,45L - -#define SN_dnQualifier "dnQualifier" -#define LN_dnQualifier "dnQualifier" -#define NID_dnQualifier 174 -#define OBJ_dnQualifier OBJ_X509,46L - -#define LN_pseudonym "pseudonym" -#define NID_pseudonym 510 -#define OBJ_pseudonym OBJ_X509,65L - -#define SN_role "role" -#define LN_role "role" -#define NID_role 400 -#define OBJ_role OBJ_X509,72L - -#define SN_X500algorithms "X500algorithms" -#define LN_X500algorithms "directory services - algorithms" -#define NID_X500algorithms 378 -#define OBJ_X500algorithms OBJ_X500,8L - -#define SN_rsa "RSA" -#define LN_rsa "rsa" -#define NID_rsa 19 -#define OBJ_rsa OBJ_X500algorithms,1L,1L - -#define SN_mdc2WithRSA "RSA-MDC2" -#define LN_mdc2WithRSA "mdc2WithRSA" -#define NID_mdc2WithRSA 96 -#define OBJ_mdc2WithRSA OBJ_X500algorithms,3L,100L - -#define SN_mdc2 "MDC2" -#define LN_mdc2 "mdc2" -#define NID_mdc2 95 -#define OBJ_mdc2 OBJ_X500algorithms,3L,101L - -#define SN_id_ce "id-ce" -#define NID_id_ce 81 -#define OBJ_id_ce OBJ_X500,29L - -#define SN_subject_directory_attributes "subjectDirectoryAttributes" -#define LN_subject_directory_attributes "X509v3 Subject Directory Attributes" -#define NID_subject_directory_attributes 769 -#define OBJ_subject_directory_attributes OBJ_id_ce,9L - -#define SN_subject_key_identifier "subjectKeyIdentifier" -#define LN_subject_key_identifier "X509v3 Subject Key Identifier" -#define NID_subject_key_identifier 82 -#define OBJ_subject_key_identifier OBJ_id_ce,14L - -#define SN_key_usage "keyUsage" -#define LN_key_usage "X509v3 Key Usage" -#define NID_key_usage 83 -#define OBJ_key_usage OBJ_id_ce,15L - -#define SN_private_key_usage_period "privateKeyUsagePeriod" -#define LN_private_key_usage_period "X509v3 Private Key Usage Period" -#define NID_private_key_usage_period 84 -#define OBJ_private_key_usage_period OBJ_id_ce,16L - -#define SN_subject_alt_name "subjectAltName" -#define LN_subject_alt_name "X509v3 Subject Alternative Name" -#define NID_subject_alt_name 85 -#define OBJ_subject_alt_name OBJ_id_ce,17L - -#define SN_issuer_alt_name "issuerAltName" -#define LN_issuer_alt_name "X509v3 Issuer Alternative Name" -#define NID_issuer_alt_name 86 -#define OBJ_issuer_alt_name OBJ_id_ce,18L - -#define SN_basic_constraints "basicConstraints" -#define LN_basic_constraints "X509v3 Basic Constraints" -#define NID_basic_constraints 87 -#define OBJ_basic_constraints OBJ_id_ce,19L - -#define SN_crl_number "crlNumber" -#define LN_crl_number "X509v3 CRL Number" -#define NID_crl_number 88 -#define OBJ_crl_number OBJ_id_ce,20L - -#define SN_crl_reason "CRLReason" -#define LN_crl_reason "X509v3 CRL Reason Code" -#define NID_crl_reason 141 -#define OBJ_crl_reason OBJ_id_ce,21L - -#define SN_invalidity_date "invalidityDate" -#define LN_invalidity_date "Invalidity Date" -#define NID_invalidity_date 142 -#define OBJ_invalidity_date OBJ_id_ce,24L - -#define SN_delta_crl "deltaCRL" -#define LN_delta_crl "X509v3 Delta CRL Indicator" -#define NID_delta_crl 140 -#define OBJ_delta_crl OBJ_id_ce,27L - -#define SN_issuing_distribution_point "issuingDistributionPoint" -#define LN_issuing_distribution_point "X509v3 Issuing Distrubution Point" -#define NID_issuing_distribution_point 770 -#define OBJ_issuing_distribution_point OBJ_id_ce,28L - -#define SN_certificate_issuer "certificateIssuer" -#define LN_certificate_issuer "X509v3 Certificate Issuer" -#define NID_certificate_issuer 771 -#define OBJ_certificate_issuer OBJ_id_ce,29L - -#define SN_name_constraints "nameConstraints" -#define LN_name_constraints "X509v3 Name Constraints" -#define NID_name_constraints 666 -#define OBJ_name_constraints OBJ_id_ce,30L - -#define SN_crl_distribution_points "crlDistributionPoints" -#define LN_crl_distribution_points "X509v3 CRL Distribution Points" -#define NID_crl_distribution_points 103 -#define OBJ_crl_distribution_points OBJ_id_ce,31L - -#define SN_certificate_policies "certificatePolicies" -#define LN_certificate_policies "X509v3 Certificate Policies" -#define NID_certificate_policies 89 -#define OBJ_certificate_policies OBJ_id_ce,32L - -#define SN_any_policy "anyPolicy" -#define LN_any_policy "X509v3 Any Policy" -#define NID_any_policy 746 -#define OBJ_any_policy OBJ_certificate_policies,0L - -#define SN_policy_mappings "policyMappings" -#define LN_policy_mappings "X509v3 Policy Mappings" -#define NID_policy_mappings 747 -#define OBJ_policy_mappings OBJ_id_ce,33L - -#define SN_authority_key_identifier "authorityKeyIdentifier" -#define LN_authority_key_identifier "X509v3 Authority Key Identifier" -#define NID_authority_key_identifier 90 -#define OBJ_authority_key_identifier OBJ_id_ce,35L - -#define SN_policy_constraints "policyConstraints" -#define LN_policy_constraints "X509v3 Policy Constraints" -#define NID_policy_constraints 401 -#define OBJ_policy_constraints OBJ_id_ce,36L - -#define SN_ext_key_usage "extendedKeyUsage" -#define LN_ext_key_usage "X509v3 Extended Key Usage" -#define NID_ext_key_usage 126 -#define OBJ_ext_key_usage OBJ_id_ce,37L - -#define SN_freshest_crl "freshestCRL" -#define LN_freshest_crl "X509v3 Freshest CRL" -#define NID_freshest_crl 857 -#define OBJ_freshest_crl OBJ_id_ce,46L - -#define SN_inhibit_any_policy "inhibitAnyPolicy" -#define LN_inhibit_any_policy "X509v3 Inhibit Any Policy" -#define NID_inhibit_any_policy 748 -#define OBJ_inhibit_any_policy OBJ_id_ce,54L - -#define SN_target_information "targetInformation" -#define LN_target_information "X509v3 AC Targeting" -#define NID_target_information 402 -#define OBJ_target_information OBJ_id_ce,55L - -#define SN_no_rev_avail "noRevAvail" -#define LN_no_rev_avail "X509v3 No Revocation Available" -#define NID_no_rev_avail 403 -#define OBJ_no_rev_avail OBJ_id_ce,56L - -#define SN_netscape "Netscape" -#define LN_netscape "Netscape Communications Corp." -#define NID_netscape 57 -#define OBJ_netscape 2L,16L,840L,1L,113730L - -#define SN_netscape_cert_extension "nsCertExt" -#define LN_netscape_cert_extension "Netscape Certificate Extension" -#define NID_netscape_cert_extension 58 -#define OBJ_netscape_cert_extension OBJ_netscape,1L - -#define SN_netscape_data_type "nsDataType" -#define LN_netscape_data_type "Netscape Data Type" -#define NID_netscape_data_type 59 -#define OBJ_netscape_data_type OBJ_netscape,2L - -#define SN_netscape_cert_type "nsCertType" -#define LN_netscape_cert_type "Netscape Cert Type" -#define NID_netscape_cert_type 71 -#define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L - -#define SN_netscape_base_url "nsBaseUrl" -#define LN_netscape_base_url "Netscape Base Url" -#define NID_netscape_base_url 72 -#define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L - -#define SN_netscape_revocation_url "nsRevocationUrl" -#define LN_netscape_revocation_url "Netscape Revocation Url" -#define NID_netscape_revocation_url 73 -#define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L - -#define SN_netscape_ca_revocation_url "nsCaRevocationUrl" -#define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" -#define NID_netscape_ca_revocation_url 74 -#define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L - -#define SN_netscape_renewal_url "nsRenewalUrl" -#define LN_netscape_renewal_url "Netscape Renewal Url" -#define NID_netscape_renewal_url 75 -#define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L - -#define SN_netscape_ca_policy_url "nsCaPolicyUrl" -#define LN_netscape_ca_policy_url "Netscape CA Policy Url" -#define NID_netscape_ca_policy_url 76 -#define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L - -#define SN_netscape_ssl_server_name "nsSslServerName" -#define LN_netscape_ssl_server_name "Netscape SSL Server Name" -#define NID_netscape_ssl_server_name 77 -#define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L - -#define SN_netscape_comment "nsComment" -#define LN_netscape_comment "Netscape Comment" -#define NID_netscape_comment 78 -#define OBJ_netscape_comment OBJ_netscape_cert_extension,13L - -#define SN_netscape_cert_sequence "nsCertSequence" -#define LN_netscape_cert_sequence "Netscape Certificate Sequence" -#define NID_netscape_cert_sequence 79 -#define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L - -#define SN_ns_sgc "nsSGC" -#define LN_ns_sgc "Netscape Server Gated Crypto" -#define NID_ns_sgc 139 -#define OBJ_ns_sgc OBJ_netscape,4L,1L - -#define SN_org "ORG" -#define LN_org "org" -#define NID_org 379 -#define OBJ_org OBJ_iso,3L - -#define SN_dod "DOD" -#define LN_dod "dod" -#define NID_dod 380 -#define OBJ_dod OBJ_org,6L - -#define SN_iana "IANA" -#define LN_iana "iana" -#define NID_iana 381 -#define OBJ_iana OBJ_dod,1L - -#define OBJ_internet OBJ_iana - -#define SN_Directory "directory" -#define LN_Directory "Directory" -#define NID_Directory 382 -#define OBJ_Directory OBJ_internet,1L - -#define SN_Management "mgmt" -#define LN_Management "Management" -#define NID_Management 383 -#define OBJ_Management OBJ_internet,2L - -#define SN_Experimental "experimental" -#define LN_Experimental "Experimental" -#define NID_Experimental 384 -#define OBJ_Experimental OBJ_internet,3L - -#define SN_Private "private" -#define LN_Private "Private" -#define NID_Private 385 -#define OBJ_Private OBJ_internet,4L - -#define SN_Security "security" -#define LN_Security "Security" -#define NID_Security 386 -#define OBJ_Security OBJ_internet,5L - -#define SN_SNMPv2 "snmpv2" -#define LN_SNMPv2 "SNMPv2" -#define NID_SNMPv2 387 -#define OBJ_SNMPv2 OBJ_internet,6L - -#define LN_Mail "Mail" -#define NID_Mail 388 -#define OBJ_Mail OBJ_internet,7L - -#define SN_Enterprises "enterprises" -#define LN_Enterprises "Enterprises" -#define NID_Enterprises 389 -#define OBJ_Enterprises OBJ_Private,1L - -#define SN_dcObject "dcobject" -#define LN_dcObject "dcObject" -#define NID_dcObject 390 -#define OBJ_dcObject OBJ_Enterprises,1466L,344L - -#define SN_mime_mhs "mime-mhs" -#define LN_mime_mhs "MIME MHS" -#define NID_mime_mhs 504 -#define OBJ_mime_mhs OBJ_Mail,1L - -#define SN_mime_mhs_headings "mime-mhs-headings" -#define LN_mime_mhs_headings "mime-mhs-headings" -#define NID_mime_mhs_headings 505 -#define OBJ_mime_mhs_headings OBJ_mime_mhs,1L - -#define SN_mime_mhs_bodies "mime-mhs-bodies" -#define LN_mime_mhs_bodies "mime-mhs-bodies" -#define NID_mime_mhs_bodies 506 -#define OBJ_mime_mhs_bodies OBJ_mime_mhs,2L - -#define SN_id_hex_partial_message "id-hex-partial-message" -#define LN_id_hex_partial_message "id-hex-partial-message" -#define NID_id_hex_partial_message 507 -#define OBJ_id_hex_partial_message OBJ_mime_mhs_headings,1L - -#define SN_id_hex_multipart_message "id-hex-multipart-message" -#define LN_id_hex_multipart_message "id-hex-multipart-message" -#define NID_id_hex_multipart_message 508 -#define OBJ_id_hex_multipart_message OBJ_mime_mhs_headings,2L - -#define SN_rle_compression "RLE" -#define LN_rle_compression "run length compression" -#define NID_rle_compression 124 -#define OBJ_rle_compression 1L,1L,1L,1L,666L,1L - -#define SN_zlib_compression "ZLIB" -#define LN_zlib_compression "zlib compression" -#define NID_zlib_compression 125 -#define OBJ_zlib_compression OBJ_id_smime_alg,8L - -#define OBJ_csor 2L,16L,840L,1L,101L,3L - -#define OBJ_nistAlgorithms OBJ_csor,4L - -#define OBJ_aes OBJ_nistAlgorithms,1L - -#define SN_aes_128_ecb "AES-128-ECB" -#define LN_aes_128_ecb "aes-128-ecb" -#define NID_aes_128_ecb 418 -#define OBJ_aes_128_ecb OBJ_aes,1L - -#define SN_aes_128_cbc "AES-128-CBC" -#define LN_aes_128_cbc "aes-128-cbc" -#define NID_aes_128_cbc 419 -#define OBJ_aes_128_cbc OBJ_aes,2L - -#define SN_aes_128_ofb128 "AES-128-OFB" -#define LN_aes_128_ofb128 "aes-128-ofb" -#define NID_aes_128_ofb128 420 -#define OBJ_aes_128_ofb128 OBJ_aes,3L - -#define SN_aes_128_cfb128 "AES-128-CFB" -#define LN_aes_128_cfb128 "aes-128-cfb" -#define NID_aes_128_cfb128 421 -#define OBJ_aes_128_cfb128 OBJ_aes,4L - -#define SN_aes_192_ecb "AES-192-ECB" -#define LN_aes_192_ecb "aes-192-ecb" -#define NID_aes_192_ecb 422 -#define OBJ_aes_192_ecb OBJ_aes,21L - -#define SN_aes_192_cbc "AES-192-CBC" -#define LN_aes_192_cbc "aes-192-cbc" -#define NID_aes_192_cbc 423 -#define OBJ_aes_192_cbc OBJ_aes,22L - -#define SN_aes_192_ofb128 "AES-192-OFB" -#define LN_aes_192_ofb128 "aes-192-ofb" -#define NID_aes_192_ofb128 424 -#define OBJ_aes_192_ofb128 OBJ_aes,23L - -#define SN_aes_192_cfb128 "AES-192-CFB" -#define LN_aes_192_cfb128 "aes-192-cfb" -#define NID_aes_192_cfb128 425 -#define OBJ_aes_192_cfb128 OBJ_aes,24L - -#define SN_aes_256_ecb "AES-256-ECB" -#define LN_aes_256_ecb "aes-256-ecb" -#define NID_aes_256_ecb 426 -#define OBJ_aes_256_ecb OBJ_aes,41L - -#define SN_aes_256_cbc "AES-256-CBC" -#define LN_aes_256_cbc "aes-256-cbc" -#define NID_aes_256_cbc 427 -#define OBJ_aes_256_cbc OBJ_aes,42L - -#define SN_aes_256_ofb128 "AES-256-OFB" -#define LN_aes_256_ofb128 "aes-256-ofb" -#define NID_aes_256_ofb128 428 -#define OBJ_aes_256_ofb128 OBJ_aes,43L - -#define SN_aes_256_cfb128 "AES-256-CFB" -#define LN_aes_256_cfb128 "aes-256-cfb" -#define NID_aes_256_cfb128 429 -#define OBJ_aes_256_cfb128 OBJ_aes,44L - -#define SN_aes_128_cfb1 "AES-128-CFB1" -#define LN_aes_128_cfb1 "aes-128-cfb1" -#define NID_aes_128_cfb1 650 - -#define SN_aes_192_cfb1 "AES-192-CFB1" -#define LN_aes_192_cfb1 "aes-192-cfb1" -#define NID_aes_192_cfb1 651 - -#define SN_aes_256_cfb1 "AES-256-CFB1" -#define LN_aes_256_cfb1 "aes-256-cfb1" -#define NID_aes_256_cfb1 652 - -#define SN_aes_128_cfb8 "AES-128-CFB8" -#define LN_aes_128_cfb8 "aes-128-cfb8" -#define NID_aes_128_cfb8 653 - -#define SN_aes_192_cfb8 "AES-192-CFB8" -#define LN_aes_192_cfb8 "aes-192-cfb8" -#define NID_aes_192_cfb8 654 - -#define SN_aes_256_cfb8 "AES-256-CFB8" -#define LN_aes_256_cfb8 "aes-256-cfb8" -#define NID_aes_256_cfb8 655 - -#define SN_des_cfb1 "DES-CFB1" -#define LN_des_cfb1 "des-cfb1" -#define NID_des_cfb1 656 - -#define SN_des_cfb8 "DES-CFB8" -#define LN_des_cfb8 "des-cfb8" -#define NID_des_cfb8 657 - -#define SN_des_ede3_cfb1 "DES-EDE3-CFB1" -#define LN_des_ede3_cfb1 "des-ede3-cfb1" -#define NID_des_ede3_cfb1 658 - -#define SN_des_ede3_cfb8 "DES-EDE3-CFB8" -#define LN_des_ede3_cfb8 "des-ede3-cfb8" -#define NID_des_ede3_cfb8 659 - -#define SN_id_aes128_wrap "id-aes128-wrap" -#define NID_id_aes128_wrap 788 -#define OBJ_id_aes128_wrap OBJ_aes,5L - -#define SN_id_aes192_wrap "id-aes192-wrap" -#define NID_id_aes192_wrap 789 -#define OBJ_id_aes192_wrap OBJ_aes,25L - -#define SN_id_aes256_wrap "id-aes256-wrap" -#define NID_id_aes256_wrap 790 -#define OBJ_id_aes256_wrap OBJ_aes,45L - -#define OBJ_nist_hashalgs OBJ_nistAlgorithms,2L - -#define SN_sha256 "SHA256" -#define LN_sha256 "sha256" -#define NID_sha256 672 -#define OBJ_sha256 OBJ_nist_hashalgs,1L - -#define SN_sha384 "SHA384" -#define LN_sha384 "sha384" -#define NID_sha384 673 -#define OBJ_sha384 OBJ_nist_hashalgs,2L - -#define SN_sha512 "SHA512" -#define LN_sha512 "sha512" -#define NID_sha512 674 -#define OBJ_sha512 OBJ_nist_hashalgs,3L - -#define SN_sha224 "SHA224" -#define LN_sha224 "sha224" -#define NID_sha224 675 -#define OBJ_sha224 OBJ_nist_hashalgs,4L - -#define OBJ_dsa_with_sha2 OBJ_nistAlgorithms,3L - -#define SN_dsa_with_SHA224 "dsa_with_SHA224" -#define NID_dsa_with_SHA224 802 -#define OBJ_dsa_with_SHA224 OBJ_dsa_with_sha2,1L - -#define SN_dsa_with_SHA256 "dsa_with_SHA256" -#define NID_dsa_with_SHA256 803 -#define OBJ_dsa_with_SHA256 OBJ_dsa_with_sha2,2L - -#define SN_hold_instruction_code "holdInstructionCode" -#define LN_hold_instruction_code "Hold Instruction Code" -#define NID_hold_instruction_code 430 -#define OBJ_hold_instruction_code OBJ_id_ce,23L - -#define OBJ_holdInstruction OBJ_X9_57,2L - -#define SN_hold_instruction_none "holdInstructionNone" -#define LN_hold_instruction_none "Hold Instruction None" -#define NID_hold_instruction_none 431 -#define OBJ_hold_instruction_none OBJ_holdInstruction,1L - -#define SN_hold_instruction_call_issuer "holdInstructionCallIssuer" -#define LN_hold_instruction_call_issuer "Hold Instruction Call Issuer" -#define NID_hold_instruction_call_issuer 432 -#define OBJ_hold_instruction_call_issuer OBJ_holdInstruction,2L - -#define SN_hold_instruction_reject "holdInstructionReject" -#define LN_hold_instruction_reject "Hold Instruction Reject" -#define NID_hold_instruction_reject 433 -#define OBJ_hold_instruction_reject OBJ_holdInstruction,3L - -#define SN_data "data" -#define NID_data 434 -#define OBJ_data OBJ_itu_t,9L - -#define SN_pss "pss" -#define NID_pss 435 -#define OBJ_pss OBJ_data,2342L - -#define SN_ucl "ucl" -#define NID_ucl 436 -#define OBJ_ucl OBJ_pss,19200300L - -#define SN_pilot "pilot" -#define NID_pilot 437 -#define OBJ_pilot OBJ_ucl,100L - -#define LN_pilotAttributeType "pilotAttributeType" -#define NID_pilotAttributeType 438 -#define OBJ_pilotAttributeType OBJ_pilot,1L - -#define LN_pilotAttributeSyntax "pilotAttributeSyntax" -#define NID_pilotAttributeSyntax 439 -#define OBJ_pilotAttributeSyntax OBJ_pilot,3L - -#define LN_pilotObjectClass "pilotObjectClass" -#define NID_pilotObjectClass 440 -#define OBJ_pilotObjectClass OBJ_pilot,4L - -#define LN_pilotGroups "pilotGroups" -#define NID_pilotGroups 441 -#define OBJ_pilotGroups OBJ_pilot,10L - -#define LN_iA5StringSyntax "iA5StringSyntax" -#define NID_iA5StringSyntax 442 -#define OBJ_iA5StringSyntax OBJ_pilotAttributeSyntax,4L - -#define LN_caseIgnoreIA5StringSyntax "caseIgnoreIA5StringSyntax" -#define NID_caseIgnoreIA5StringSyntax 443 -#define OBJ_caseIgnoreIA5StringSyntax OBJ_pilotAttributeSyntax,5L - -#define LN_pilotObject "pilotObject" -#define NID_pilotObject 444 -#define OBJ_pilotObject OBJ_pilotObjectClass,3L - -#define LN_pilotPerson "pilotPerson" -#define NID_pilotPerson 445 -#define OBJ_pilotPerson OBJ_pilotObjectClass,4L - -#define SN_account "account" -#define NID_account 446 -#define OBJ_account OBJ_pilotObjectClass,5L - -#define SN_document "document" -#define NID_document 447 -#define OBJ_document OBJ_pilotObjectClass,6L - -#define SN_room "room" -#define NID_room 448 -#define OBJ_room OBJ_pilotObjectClass,7L - -#define LN_documentSeries "documentSeries" -#define NID_documentSeries 449 -#define OBJ_documentSeries OBJ_pilotObjectClass,9L - -#define SN_Domain "domain" -#define LN_Domain "Domain" -#define NID_Domain 392 -#define OBJ_Domain OBJ_pilotObjectClass,13L - -#define LN_rFC822localPart "rFC822localPart" -#define NID_rFC822localPart 450 -#define OBJ_rFC822localPart OBJ_pilotObjectClass,14L - -#define LN_dNSDomain "dNSDomain" -#define NID_dNSDomain 451 -#define OBJ_dNSDomain OBJ_pilotObjectClass,15L - -#define LN_domainRelatedObject "domainRelatedObject" -#define NID_domainRelatedObject 452 -#define OBJ_domainRelatedObject OBJ_pilotObjectClass,17L - -#define LN_friendlyCountry "friendlyCountry" -#define NID_friendlyCountry 453 -#define OBJ_friendlyCountry OBJ_pilotObjectClass,18L - -#define LN_simpleSecurityObject "simpleSecurityObject" -#define NID_simpleSecurityObject 454 -#define OBJ_simpleSecurityObject OBJ_pilotObjectClass,19L - -#define LN_pilotOrganization "pilotOrganization" -#define NID_pilotOrganization 455 -#define OBJ_pilotOrganization OBJ_pilotObjectClass,20L - -#define LN_pilotDSA "pilotDSA" -#define NID_pilotDSA 456 -#define OBJ_pilotDSA OBJ_pilotObjectClass,21L - -#define LN_qualityLabelledData "qualityLabelledData" -#define NID_qualityLabelledData 457 -#define OBJ_qualityLabelledData OBJ_pilotObjectClass,22L - -#define SN_userId "UID" -#define LN_userId "userId" -#define NID_userId 458 -#define OBJ_userId OBJ_pilotAttributeType,1L - -#define LN_textEncodedORAddress "textEncodedORAddress" -#define NID_textEncodedORAddress 459 -#define OBJ_textEncodedORAddress OBJ_pilotAttributeType,2L - -#define SN_rfc822Mailbox "mail" -#define LN_rfc822Mailbox "rfc822Mailbox" -#define NID_rfc822Mailbox 460 -#define OBJ_rfc822Mailbox OBJ_pilotAttributeType,3L - -#define SN_info "info" -#define NID_info 461 -#define OBJ_info OBJ_pilotAttributeType,4L - -#define LN_favouriteDrink "favouriteDrink" -#define NID_favouriteDrink 462 -#define OBJ_favouriteDrink OBJ_pilotAttributeType,5L - -#define LN_roomNumber "roomNumber" -#define NID_roomNumber 463 -#define OBJ_roomNumber OBJ_pilotAttributeType,6L - -#define SN_photo "photo" -#define NID_photo 464 -#define OBJ_photo OBJ_pilotAttributeType,7L - -#define LN_userClass "userClass" -#define NID_userClass 465 -#define OBJ_userClass OBJ_pilotAttributeType,8L - -#define SN_host "host" -#define NID_host 466 -#define OBJ_host OBJ_pilotAttributeType,9L - -#define SN_manager "manager" -#define NID_manager 467 -#define OBJ_manager OBJ_pilotAttributeType,10L - -#define LN_documentIdentifier "documentIdentifier" -#define NID_documentIdentifier 468 -#define OBJ_documentIdentifier OBJ_pilotAttributeType,11L - -#define LN_documentTitle "documentTitle" -#define NID_documentTitle 469 -#define OBJ_documentTitle OBJ_pilotAttributeType,12L - -#define LN_documentVersion "documentVersion" -#define NID_documentVersion 470 -#define OBJ_documentVersion OBJ_pilotAttributeType,13L - -#define LN_documentAuthor "documentAuthor" -#define NID_documentAuthor 471 -#define OBJ_documentAuthor OBJ_pilotAttributeType,14L - -#define LN_documentLocation "documentLocation" -#define NID_documentLocation 472 -#define OBJ_documentLocation OBJ_pilotAttributeType,15L - -#define LN_homeTelephoneNumber "homeTelephoneNumber" -#define NID_homeTelephoneNumber 473 -#define OBJ_homeTelephoneNumber OBJ_pilotAttributeType,20L - -#define SN_secretary "secretary" -#define NID_secretary 474 -#define OBJ_secretary OBJ_pilotAttributeType,21L - -#define LN_otherMailbox "otherMailbox" -#define NID_otherMailbox 475 -#define OBJ_otherMailbox OBJ_pilotAttributeType,22L - -#define LN_lastModifiedTime "lastModifiedTime" -#define NID_lastModifiedTime 476 -#define OBJ_lastModifiedTime OBJ_pilotAttributeType,23L - -#define LN_lastModifiedBy "lastModifiedBy" -#define NID_lastModifiedBy 477 -#define OBJ_lastModifiedBy OBJ_pilotAttributeType,24L - -#define SN_domainComponent "DC" -#define LN_domainComponent "domainComponent" -#define NID_domainComponent 391 -#define OBJ_domainComponent OBJ_pilotAttributeType,25L - -#define LN_aRecord "aRecord" -#define NID_aRecord 478 -#define OBJ_aRecord OBJ_pilotAttributeType,26L - -#define LN_pilotAttributeType27 "pilotAttributeType27" -#define NID_pilotAttributeType27 479 -#define OBJ_pilotAttributeType27 OBJ_pilotAttributeType,27L - -#define LN_mXRecord "mXRecord" -#define NID_mXRecord 480 -#define OBJ_mXRecord OBJ_pilotAttributeType,28L - -#define LN_nSRecord "nSRecord" -#define NID_nSRecord 481 -#define OBJ_nSRecord OBJ_pilotAttributeType,29L - -#define LN_sOARecord "sOARecord" -#define NID_sOARecord 482 -#define OBJ_sOARecord OBJ_pilotAttributeType,30L - -#define LN_cNAMERecord "cNAMERecord" -#define NID_cNAMERecord 483 -#define OBJ_cNAMERecord OBJ_pilotAttributeType,31L - -#define LN_associatedDomain "associatedDomain" -#define NID_associatedDomain 484 -#define OBJ_associatedDomain OBJ_pilotAttributeType,37L - -#define LN_associatedName "associatedName" -#define NID_associatedName 485 -#define OBJ_associatedName OBJ_pilotAttributeType,38L - -#define LN_homePostalAddress "homePostalAddress" -#define NID_homePostalAddress 486 -#define OBJ_homePostalAddress OBJ_pilotAttributeType,39L - -#define LN_personalTitle "personalTitle" -#define NID_personalTitle 487 -#define OBJ_personalTitle OBJ_pilotAttributeType,40L - -#define LN_mobileTelephoneNumber "mobileTelephoneNumber" -#define NID_mobileTelephoneNumber 488 -#define OBJ_mobileTelephoneNumber OBJ_pilotAttributeType,41L - -#define LN_pagerTelephoneNumber "pagerTelephoneNumber" -#define NID_pagerTelephoneNumber 489 -#define OBJ_pagerTelephoneNumber OBJ_pilotAttributeType,42L - -#define LN_friendlyCountryName "friendlyCountryName" -#define NID_friendlyCountryName 490 -#define OBJ_friendlyCountryName OBJ_pilotAttributeType,43L - -#define LN_organizationalStatus "organizationalStatus" -#define NID_organizationalStatus 491 -#define OBJ_organizationalStatus OBJ_pilotAttributeType,45L - -#define LN_janetMailbox "janetMailbox" -#define NID_janetMailbox 492 -#define OBJ_janetMailbox OBJ_pilotAttributeType,46L - -#define LN_mailPreferenceOption "mailPreferenceOption" -#define NID_mailPreferenceOption 493 -#define OBJ_mailPreferenceOption OBJ_pilotAttributeType,47L - -#define LN_buildingName "buildingName" -#define NID_buildingName 494 -#define OBJ_buildingName OBJ_pilotAttributeType,48L - -#define LN_dSAQuality "dSAQuality" -#define NID_dSAQuality 495 -#define OBJ_dSAQuality OBJ_pilotAttributeType,49L - -#define LN_singleLevelQuality "singleLevelQuality" -#define NID_singleLevelQuality 496 -#define OBJ_singleLevelQuality OBJ_pilotAttributeType,50L - -#define LN_subtreeMinimumQuality "subtreeMinimumQuality" -#define NID_subtreeMinimumQuality 497 -#define OBJ_subtreeMinimumQuality OBJ_pilotAttributeType,51L - -#define LN_subtreeMaximumQuality "subtreeMaximumQuality" -#define NID_subtreeMaximumQuality 498 -#define OBJ_subtreeMaximumQuality OBJ_pilotAttributeType,52L - -#define LN_personalSignature "personalSignature" -#define NID_personalSignature 499 -#define OBJ_personalSignature OBJ_pilotAttributeType,53L - -#define LN_dITRedirect "dITRedirect" -#define NID_dITRedirect 500 -#define OBJ_dITRedirect OBJ_pilotAttributeType,54L - -#define SN_audio "audio" -#define NID_audio 501 -#define OBJ_audio OBJ_pilotAttributeType,55L - -#define LN_documentPublisher "documentPublisher" -#define NID_documentPublisher 502 -#define OBJ_documentPublisher OBJ_pilotAttributeType,56L - -#define SN_id_set "id-set" -#define LN_id_set "Secure Electronic Transactions" -#define NID_id_set 512 -#define OBJ_id_set OBJ_international_organizations,42L - -#define SN_set_ctype "set-ctype" -#define LN_set_ctype "content types" -#define NID_set_ctype 513 -#define OBJ_set_ctype OBJ_id_set,0L - -#define SN_set_msgExt "set-msgExt" -#define LN_set_msgExt "message extensions" -#define NID_set_msgExt 514 -#define OBJ_set_msgExt OBJ_id_set,1L - -#define SN_set_attr "set-attr" -#define NID_set_attr 515 -#define OBJ_set_attr OBJ_id_set,3L - -#define SN_set_policy "set-policy" -#define NID_set_policy 516 -#define OBJ_set_policy OBJ_id_set,5L - -#define SN_set_certExt "set-certExt" -#define LN_set_certExt "certificate extensions" -#define NID_set_certExt 517 -#define OBJ_set_certExt OBJ_id_set,7L - -#define SN_set_brand "set-brand" -#define NID_set_brand 518 -#define OBJ_set_brand OBJ_id_set,8L - -#define SN_setct_PANData "setct-PANData" -#define NID_setct_PANData 519 -#define OBJ_setct_PANData OBJ_set_ctype,0L - -#define SN_setct_PANToken "setct-PANToken" -#define NID_setct_PANToken 520 -#define OBJ_setct_PANToken OBJ_set_ctype,1L - -#define SN_setct_PANOnly "setct-PANOnly" -#define NID_setct_PANOnly 521 -#define OBJ_setct_PANOnly OBJ_set_ctype,2L - -#define SN_setct_OIData "setct-OIData" -#define NID_setct_OIData 522 -#define OBJ_setct_OIData OBJ_set_ctype,3L - -#define SN_setct_PI "setct-PI" -#define NID_setct_PI 523 -#define OBJ_setct_PI OBJ_set_ctype,4L - -#define SN_setct_PIData "setct-PIData" -#define NID_setct_PIData 524 -#define OBJ_setct_PIData OBJ_set_ctype,5L - -#define SN_setct_PIDataUnsigned "setct-PIDataUnsigned" -#define NID_setct_PIDataUnsigned 525 -#define OBJ_setct_PIDataUnsigned OBJ_set_ctype,6L - -#define SN_setct_HODInput "setct-HODInput" -#define NID_setct_HODInput 526 -#define OBJ_setct_HODInput OBJ_set_ctype,7L - -#define SN_setct_AuthResBaggage "setct-AuthResBaggage" -#define NID_setct_AuthResBaggage 527 -#define OBJ_setct_AuthResBaggage OBJ_set_ctype,8L - -#define SN_setct_AuthRevReqBaggage "setct-AuthRevReqBaggage" -#define NID_setct_AuthRevReqBaggage 528 -#define OBJ_setct_AuthRevReqBaggage OBJ_set_ctype,9L - -#define SN_setct_AuthRevResBaggage "setct-AuthRevResBaggage" -#define NID_setct_AuthRevResBaggage 529 -#define OBJ_setct_AuthRevResBaggage OBJ_set_ctype,10L - -#define SN_setct_CapTokenSeq "setct-CapTokenSeq" -#define NID_setct_CapTokenSeq 530 -#define OBJ_setct_CapTokenSeq OBJ_set_ctype,11L - -#define SN_setct_PInitResData "setct-PInitResData" -#define NID_setct_PInitResData 531 -#define OBJ_setct_PInitResData OBJ_set_ctype,12L - -#define SN_setct_PI_TBS "setct-PI-TBS" -#define NID_setct_PI_TBS 532 -#define OBJ_setct_PI_TBS OBJ_set_ctype,13L - -#define SN_setct_PResData "setct-PResData" -#define NID_setct_PResData 533 -#define OBJ_setct_PResData OBJ_set_ctype,14L - -#define SN_setct_AuthReqTBS "setct-AuthReqTBS" -#define NID_setct_AuthReqTBS 534 -#define OBJ_setct_AuthReqTBS OBJ_set_ctype,16L - -#define SN_setct_AuthResTBS "setct-AuthResTBS" -#define NID_setct_AuthResTBS 535 -#define OBJ_setct_AuthResTBS OBJ_set_ctype,17L - -#define SN_setct_AuthResTBSX "setct-AuthResTBSX" -#define NID_setct_AuthResTBSX 536 -#define OBJ_setct_AuthResTBSX OBJ_set_ctype,18L - -#define SN_setct_AuthTokenTBS "setct-AuthTokenTBS" -#define NID_setct_AuthTokenTBS 537 -#define OBJ_setct_AuthTokenTBS OBJ_set_ctype,19L - -#define SN_setct_CapTokenData "setct-CapTokenData" -#define NID_setct_CapTokenData 538 -#define OBJ_setct_CapTokenData OBJ_set_ctype,20L - -#define SN_setct_CapTokenTBS "setct-CapTokenTBS" -#define NID_setct_CapTokenTBS 539 -#define OBJ_setct_CapTokenTBS OBJ_set_ctype,21L - -#define SN_setct_AcqCardCodeMsg "setct-AcqCardCodeMsg" -#define NID_setct_AcqCardCodeMsg 540 -#define OBJ_setct_AcqCardCodeMsg OBJ_set_ctype,22L - -#define SN_setct_AuthRevReqTBS "setct-AuthRevReqTBS" -#define NID_setct_AuthRevReqTBS 541 -#define OBJ_setct_AuthRevReqTBS OBJ_set_ctype,23L - -#define SN_setct_AuthRevResData "setct-AuthRevResData" -#define NID_setct_AuthRevResData 542 -#define OBJ_setct_AuthRevResData OBJ_set_ctype,24L - -#define SN_setct_AuthRevResTBS "setct-AuthRevResTBS" -#define NID_setct_AuthRevResTBS 543 -#define OBJ_setct_AuthRevResTBS OBJ_set_ctype,25L - -#define SN_setct_CapReqTBS "setct-CapReqTBS" -#define NID_setct_CapReqTBS 544 -#define OBJ_setct_CapReqTBS OBJ_set_ctype,26L - -#define SN_setct_CapReqTBSX "setct-CapReqTBSX" -#define NID_setct_CapReqTBSX 545 -#define OBJ_setct_CapReqTBSX OBJ_set_ctype,27L - -#define SN_setct_CapResData "setct-CapResData" -#define NID_setct_CapResData 546 -#define OBJ_setct_CapResData OBJ_set_ctype,28L - -#define SN_setct_CapRevReqTBS "setct-CapRevReqTBS" -#define NID_setct_CapRevReqTBS 547 -#define OBJ_setct_CapRevReqTBS OBJ_set_ctype,29L - -#define SN_setct_CapRevReqTBSX "setct-CapRevReqTBSX" -#define NID_setct_CapRevReqTBSX 548 -#define OBJ_setct_CapRevReqTBSX OBJ_set_ctype,30L - -#define SN_setct_CapRevResData "setct-CapRevResData" -#define NID_setct_CapRevResData 549 -#define OBJ_setct_CapRevResData OBJ_set_ctype,31L - -#define SN_setct_CredReqTBS "setct-CredReqTBS" -#define NID_setct_CredReqTBS 550 -#define OBJ_setct_CredReqTBS OBJ_set_ctype,32L - -#define SN_setct_CredReqTBSX "setct-CredReqTBSX" -#define NID_setct_CredReqTBSX 551 -#define OBJ_setct_CredReqTBSX OBJ_set_ctype,33L - -#define SN_setct_CredResData "setct-CredResData" -#define NID_setct_CredResData 552 -#define OBJ_setct_CredResData OBJ_set_ctype,34L - -#define SN_setct_CredRevReqTBS "setct-CredRevReqTBS" -#define NID_setct_CredRevReqTBS 553 -#define OBJ_setct_CredRevReqTBS OBJ_set_ctype,35L - -#define SN_setct_CredRevReqTBSX "setct-CredRevReqTBSX" -#define NID_setct_CredRevReqTBSX 554 -#define OBJ_setct_CredRevReqTBSX OBJ_set_ctype,36L - -#define SN_setct_CredRevResData "setct-CredRevResData" -#define NID_setct_CredRevResData 555 -#define OBJ_setct_CredRevResData OBJ_set_ctype,37L - -#define SN_setct_PCertReqData "setct-PCertReqData" -#define NID_setct_PCertReqData 556 -#define OBJ_setct_PCertReqData OBJ_set_ctype,38L - -#define SN_setct_PCertResTBS "setct-PCertResTBS" -#define NID_setct_PCertResTBS 557 -#define OBJ_setct_PCertResTBS OBJ_set_ctype,39L - -#define SN_setct_BatchAdminReqData "setct-BatchAdminReqData" -#define NID_setct_BatchAdminReqData 558 -#define OBJ_setct_BatchAdminReqData OBJ_set_ctype,40L - -#define SN_setct_BatchAdminResData "setct-BatchAdminResData" -#define NID_setct_BatchAdminResData 559 -#define OBJ_setct_BatchAdminResData OBJ_set_ctype,41L - -#define SN_setct_CardCInitResTBS "setct-CardCInitResTBS" -#define NID_setct_CardCInitResTBS 560 -#define OBJ_setct_CardCInitResTBS OBJ_set_ctype,42L - -#define SN_setct_MeAqCInitResTBS "setct-MeAqCInitResTBS" -#define NID_setct_MeAqCInitResTBS 561 -#define OBJ_setct_MeAqCInitResTBS OBJ_set_ctype,43L - -#define SN_setct_RegFormResTBS "setct-RegFormResTBS" -#define NID_setct_RegFormResTBS 562 -#define OBJ_setct_RegFormResTBS OBJ_set_ctype,44L - -#define SN_setct_CertReqData "setct-CertReqData" -#define NID_setct_CertReqData 563 -#define OBJ_setct_CertReqData OBJ_set_ctype,45L - -#define SN_setct_CertReqTBS "setct-CertReqTBS" -#define NID_setct_CertReqTBS 564 -#define OBJ_setct_CertReqTBS OBJ_set_ctype,46L - -#define SN_setct_CertResData "setct-CertResData" -#define NID_setct_CertResData 565 -#define OBJ_setct_CertResData OBJ_set_ctype,47L - -#define SN_setct_CertInqReqTBS "setct-CertInqReqTBS" -#define NID_setct_CertInqReqTBS 566 -#define OBJ_setct_CertInqReqTBS OBJ_set_ctype,48L - -#define SN_setct_ErrorTBS "setct-ErrorTBS" -#define NID_setct_ErrorTBS 567 -#define OBJ_setct_ErrorTBS OBJ_set_ctype,49L - -#define SN_setct_PIDualSignedTBE "setct-PIDualSignedTBE" -#define NID_setct_PIDualSignedTBE 568 -#define OBJ_setct_PIDualSignedTBE OBJ_set_ctype,50L - -#define SN_setct_PIUnsignedTBE "setct-PIUnsignedTBE" -#define NID_setct_PIUnsignedTBE 569 -#define OBJ_setct_PIUnsignedTBE OBJ_set_ctype,51L - -#define SN_setct_AuthReqTBE "setct-AuthReqTBE" -#define NID_setct_AuthReqTBE 570 -#define OBJ_setct_AuthReqTBE OBJ_set_ctype,52L - -#define SN_setct_AuthResTBE "setct-AuthResTBE" -#define NID_setct_AuthResTBE 571 -#define OBJ_setct_AuthResTBE OBJ_set_ctype,53L - -#define SN_setct_AuthResTBEX "setct-AuthResTBEX" -#define NID_setct_AuthResTBEX 572 -#define OBJ_setct_AuthResTBEX OBJ_set_ctype,54L - -#define SN_setct_AuthTokenTBE "setct-AuthTokenTBE" -#define NID_setct_AuthTokenTBE 573 -#define OBJ_setct_AuthTokenTBE OBJ_set_ctype,55L - -#define SN_setct_CapTokenTBE "setct-CapTokenTBE" -#define NID_setct_CapTokenTBE 574 -#define OBJ_setct_CapTokenTBE OBJ_set_ctype,56L - -#define SN_setct_CapTokenTBEX "setct-CapTokenTBEX" -#define NID_setct_CapTokenTBEX 575 -#define OBJ_setct_CapTokenTBEX OBJ_set_ctype,57L - -#define SN_setct_AcqCardCodeMsgTBE "setct-AcqCardCodeMsgTBE" -#define NID_setct_AcqCardCodeMsgTBE 576 -#define OBJ_setct_AcqCardCodeMsgTBE OBJ_set_ctype,58L - -#define SN_setct_AuthRevReqTBE "setct-AuthRevReqTBE" -#define NID_setct_AuthRevReqTBE 577 -#define OBJ_setct_AuthRevReqTBE OBJ_set_ctype,59L - -#define SN_setct_AuthRevResTBE "setct-AuthRevResTBE" -#define NID_setct_AuthRevResTBE 578 -#define OBJ_setct_AuthRevResTBE OBJ_set_ctype,60L - -#define SN_setct_AuthRevResTBEB "setct-AuthRevResTBEB" -#define NID_setct_AuthRevResTBEB 579 -#define OBJ_setct_AuthRevResTBEB OBJ_set_ctype,61L - -#define SN_setct_CapReqTBE "setct-CapReqTBE" -#define NID_setct_CapReqTBE 580 -#define OBJ_setct_CapReqTBE OBJ_set_ctype,62L - -#define SN_setct_CapReqTBEX "setct-CapReqTBEX" -#define NID_setct_CapReqTBEX 581 -#define OBJ_setct_CapReqTBEX OBJ_set_ctype,63L - -#define SN_setct_CapResTBE "setct-CapResTBE" -#define NID_setct_CapResTBE 582 -#define OBJ_setct_CapResTBE OBJ_set_ctype,64L - -#define SN_setct_CapRevReqTBE "setct-CapRevReqTBE" -#define NID_setct_CapRevReqTBE 583 -#define OBJ_setct_CapRevReqTBE OBJ_set_ctype,65L - -#define SN_setct_CapRevReqTBEX "setct-CapRevReqTBEX" -#define NID_setct_CapRevReqTBEX 584 -#define OBJ_setct_CapRevReqTBEX OBJ_set_ctype,66L - -#define SN_setct_CapRevResTBE "setct-CapRevResTBE" -#define NID_setct_CapRevResTBE 585 -#define OBJ_setct_CapRevResTBE OBJ_set_ctype,67L - -#define SN_setct_CredReqTBE "setct-CredReqTBE" -#define NID_setct_CredReqTBE 586 -#define OBJ_setct_CredReqTBE OBJ_set_ctype,68L - -#define SN_setct_CredReqTBEX "setct-CredReqTBEX" -#define NID_setct_CredReqTBEX 587 -#define OBJ_setct_CredReqTBEX OBJ_set_ctype,69L - -#define SN_setct_CredResTBE "setct-CredResTBE" -#define NID_setct_CredResTBE 588 -#define OBJ_setct_CredResTBE OBJ_set_ctype,70L - -#define SN_setct_CredRevReqTBE "setct-CredRevReqTBE" -#define NID_setct_CredRevReqTBE 589 -#define OBJ_setct_CredRevReqTBE OBJ_set_ctype,71L - -#define SN_setct_CredRevReqTBEX "setct-CredRevReqTBEX" -#define NID_setct_CredRevReqTBEX 590 -#define OBJ_setct_CredRevReqTBEX OBJ_set_ctype,72L - -#define SN_setct_CredRevResTBE "setct-CredRevResTBE" -#define NID_setct_CredRevResTBE 591 -#define OBJ_setct_CredRevResTBE OBJ_set_ctype,73L - -#define SN_setct_BatchAdminReqTBE "setct-BatchAdminReqTBE" -#define NID_setct_BatchAdminReqTBE 592 -#define OBJ_setct_BatchAdminReqTBE OBJ_set_ctype,74L - -#define SN_setct_BatchAdminResTBE "setct-BatchAdminResTBE" -#define NID_setct_BatchAdminResTBE 593 -#define OBJ_setct_BatchAdminResTBE OBJ_set_ctype,75L - -#define SN_setct_RegFormReqTBE "setct-RegFormReqTBE" -#define NID_setct_RegFormReqTBE 594 -#define OBJ_setct_RegFormReqTBE OBJ_set_ctype,76L - -#define SN_setct_CertReqTBE "setct-CertReqTBE" -#define NID_setct_CertReqTBE 595 -#define OBJ_setct_CertReqTBE OBJ_set_ctype,77L - -#define SN_setct_CertReqTBEX "setct-CertReqTBEX" -#define NID_setct_CertReqTBEX 596 -#define OBJ_setct_CertReqTBEX OBJ_set_ctype,78L - -#define SN_setct_CertResTBE "setct-CertResTBE" -#define NID_setct_CertResTBE 597 -#define OBJ_setct_CertResTBE OBJ_set_ctype,79L - -#define SN_setct_CRLNotificationTBS "setct-CRLNotificationTBS" -#define NID_setct_CRLNotificationTBS 598 -#define OBJ_setct_CRLNotificationTBS OBJ_set_ctype,80L - -#define SN_setct_CRLNotificationResTBS "setct-CRLNotificationResTBS" -#define NID_setct_CRLNotificationResTBS 599 -#define OBJ_setct_CRLNotificationResTBS OBJ_set_ctype,81L - -#define SN_setct_BCIDistributionTBS "setct-BCIDistributionTBS" -#define NID_setct_BCIDistributionTBS 600 -#define OBJ_setct_BCIDistributionTBS OBJ_set_ctype,82L - -#define SN_setext_genCrypt "setext-genCrypt" -#define LN_setext_genCrypt "generic cryptogram" -#define NID_setext_genCrypt 601 -#define OBJ_setext_genCrypt OBJ_set_msgExt,1L - -#define SN_setext_miAuth "setext-miAuth" -#define LN_setext_miAuth "merchant initiated auth" -#define NID_setext_miAuth 602 -#define OBJ_setext_miAuth OBJ_set_msgExt,3L - -#define SN_setext_pinSecure "setext-pinSecure" -#define NID_setext_pinSecure 603 -#define OBJ_setext_pinSecure OBJ_set_msgExt,4L - -#define SN_setext_pinAny "setext-pinAny" -#define NID_setext_pinAny 604 -#define OBJ_setext_pinAny OBJ_set_msgExt,5L - -#define SN_setext_track2 "setext-track2" -#define NID_setext_track2 605 -#define OBJ_setext_track2 OBJ_set_msgExt,7L - -#define SN_setext_cv "setext-cv" -#define LN_setext_cv "additional verification" -#define NID_setext_cv 606 -#define OBJ_setext_cv OBJ_set_msgExt,8L - -#define SN_set_policy_root "set-policy-root" -#define NID_set_policy_root 607 -#define OBJ_set_policy_root OBJ_set_policy,0L - -#define SN_setCext_hashedRoot "setCext-hashedRoot" -#define NID_setCext_hashedRoot 608 -#define OBJ_setCext_hashedRoot OBJ_set_certExt,0L - -#define SN_setCext_certType "setCext-certType" -#define NID_setCext_certType 609 -#define OBJ_setCext_certType OBJ_set_certExt,1L - -#define SN_setCext_merchData "setCext-merchData" -#define NID_setCext_merchData 610 -#define OBJ_setCext_merchData OBJ_set_certExt,2L - -#define SN_setCext_cCertRequired "setCext-cCertRequired" -#define NID_setCext_cCertRequired 611 -#define OBJ_setCext_cCertRequired OBJ_set_certExt,3L - -#define SN_setCext_tunneling "setCext-tunneling" -#define NID_setCext_tunneling 612 -#define OBJ_setCext_tunneling OBJ_set_certExt,4L - -#define SN_setCext_setExt "setCext-setExt" -#define NID_setCext_setExt 613 -#define OBJ_setCext_setExt OBJ_set_certExt,5L - -#define SN_setCext_setQualf "setCext-setQualf" -#define NID_setCext_setQualf 614 -#define OBJ_setCext_setQualf OBJ_set_certExt,6L - -#define SN_setCext_PGWYcapabilities "setCext-PGWYcapabilities" -#define NID_setCext_PGWYcapabilities 615 -#define OBJ_setCext_PGWYcapabilities OBJ_set_certExt,7L - -#define SN_setCext_TokenIdentifier "setCext-TokenIdentifier" -#define NID_setCext_TokenIdentifier 616 -#define OBJ_setCext_TokenIdentifier OBJ_set_certExt,8L - -#define SN_setCext_Track2Data "setCext-Track2Data" -#define NID_setCext_Track2Data 617 -#define OBJ_setCext_Track2Data OBJ_set_certExt,9L - -#define SN_setCext_TokenType "setCext-TokenType" -#define NID_setCext_TokenType 618 -#define OBJ_setCext_TokenType OBJ_set_certExt,10L - -#define SN_setCext_IssuerCapabilities "setCext-IssuerCapabilities" -#define NID_setCext_IssuerCapabilities 619 -#define OBJ_setCext_IssuerCapabilities OBJ_set_certExt,11L - -#define SN_setAttr_Cert "setAttr-Cert" -#define NID_setAttr_Cert 620 -#define OBJ_setAttr_Cert OBJ_set_attr,0L - -#define SN_setAttr_PGWYcap "setAttr-PGWYcap" -#define LN_setAttr_PGWYcap "payment gateway capabilities" -#define NID_setAttr_PGWYcap 621 -#define OBJ_setAttr_PGWYcap OBJ_set_attr,1L - -#define SN_setAttr_TokenType "setAttr-TokenType" -#define NID_setAttr_TokenType 622 -#define OBJ_setAttr_TokenType OBJ_set_attr,2L - -#define SN_setAttr_IssCap "setAttr-IssCap" -#define LN_setAttr_IssCap "issuer capabilities" -#define NID_setAttr_IssCap 623 -#define OBJ_setAttr_IssCap OBJ_set_attr,3L - -#define SN_set_rootKeyThumb "set-rootKeyThumb" -#define NID_set_rootKeyThumb 624 -#define OBJ_set_rootKeyThumb OBJ_setAttr_Cert,0L - -#define SN_set_addPolicy "set-addPolicy" -#define NID_set_addPolicy 625 -#define OBJ_set_addPolicy OBJ_setAttr_Cert,1L - -#define SN_setAttr_Token_EMV "setAttr-Token-EMV" -#define NID_setAttr_Token_EMV 626 -#define OBJ_setAttr_Token_EMV OBJ_setAttr_TokenType,1L - -#define SN_setAttr_Token_B0Prime "setAttr-Token-B0Prime" -#define NID_setAttr_Token_B0Prime 627 -#define OBJ_setAttr_Token_B0Prime OBJ_setAttr_TokenType,2L - -#define SN_setAttr_IssCap_CVM "setAttr-IssCap-CVM" -#define NID_setAttr_IssCap_CVM 628 -#define OBJ_setAttr_IssCap_CVM OBJ_setAttr_IssCap,3L - -#define SN_setAttr_IssCap_T2 "setAttr-IssCap-T2" -#define NID_setAttr_IssCap_T2 629 -#define OBJ_setAttr_IssCap_T2 OBJ_setAttr_IssCap,4L - -#define SN_setAttr_IssCap_Sig "setAttr-IssCap-Sig" -#define NID_setAttr_IssCap_Sig 630 -#define OBJ_setAttr_IssCap_Sig OBJ_setAttr_IssCap,5L - -#define SN_setAttr_GenCryptgrm "setAttr-GenCryptgrm" -#define LN_setAttr_GenCryptgrm "generate cryptogram" -#define NID_setAttr_GenCryptgrm 631 -#define OBJ_setAttr_GenCryptgrm OBJ_setAttr_IssCap_CVM,1L - -#define SN_setAttr_T2Enc "setAttr-T2Enc" -#define LN_setAttr_T2Enc "encrypted track 2" -#define NID_setAttr_T2Enc 632 -#define OBJ_setAttr_T2Enc OBJ_setAttr_IssCap_T2,1L - -#define SN_setAttr_T2cleartxt "setAttr-T2cleartxt" -#define LN_setAttr_T2cleartxt "cleartext track 2" -#define NID_setAttr_T2cleartxt 633 -#define OBJ_setAttr_T2cleartxt OBJ_setAttr_IssCap_T2,2L - -#define SN_setAttr_TokICCsig "setAttr-TokICCsig" -#define LN_setAttr_TokICCsig "ICC or token signature" -#define NID_setAttr_TokICCsig 634 -#define OBJ_setAttr_TokICCsig OBJ_setAttr_IssCap_Sig,1L - -#define SN_setAttr_SecDevSig "setAttr-SecDevSig" -#define LN_setAttr_SecDevSig "secure device signature" -#define NID_setAttr_SecDevSig 635 -#define OBJ_setAttr_SecDevSig OBJ_setAttr_IssCap_Sig,2L - -#define SN_set_brand_IATA_ATA "set-brand-IATA-ATA" -#define NID_set_brand_IATA_ATA 636 -#define OBJ_set_brand_IATA_ATA OBJ_set_brand,1L - -#define SN_set_brand_Diners "set-brand-Diners" -#define NID_set_brand_Diners 637 -#define OBJ_set_brand_Diners OBJ_set_brand,30L - -#define SN_set_brand_AmericanExpress "set-brand-AmericanExpress" -#define NID_set_brand_AmericanExpress 638 -#define OBJ_set_brand_AmericanExpress OBJ_set_brand,34L - -#define SN_set_brand_JCB "set-brand-JCB" -#define NID_set_brand_JCB 639 -#define OBJ_set_brand_JCB OBJ_set_brand,35L - -#define SN_set_brand_Visa "set-brand-Visa" -#define NID_set_brand_Visa 640 -#define OBJ_set_brand_Visa OBJ_set_brand,4L - -#define SN_set_brand_MasterCard "set-brand-MasterCard" -#define NID_set_brand_MasterCard 641 -#define OBJ_set_brand_MasterCard OBJ_set_brand,5L - -#define SN_set_brand_Novus "set-brand-Novus" -#define NID_set_brand_Novus 642 -#define OBJ_set_brand_Novus OBJ_set_brand,6011L - -#define SN_des_cdmf "DES-CDMF" -#define LN_des_cdmf "des-cdmf" -#define NID_des_cdmf 643 -#define OBJ_des_cdmf OBJ_rsadsi,3L,10L - -#define SN_rsaOAEPEncryptionSET "rsaOAEPEncryptionSET" -#define NID_rsaOAEPEncryptionSET 644 -#define OBJ_rsaOAEPEncryptionSET OBJ_rsadsi,1L,1L,6L - -#define SN_ipsec3 "Oakley-EC2N-3" -#define LN_ipsec3 "ipsec3" -#define NID_ipsec3 749 - -#define SN_ipsec4 "Oakley-EC2N-4" -#define LN_ipsec4 "ipsec4" -#define NID_ipsec4 750 - -#define SN_whirlpool "whirlpool" -#define NID_whirlpool 804 -#define OBJ_whirlpool OBJ_iso,0L,10118L,3L,0L,55L - -#define SN_cryptopro "cryptopro" -#define NID_cryptopro 805 -#define OBJ_cryptopro OBJ_member_body,643L,2L,2L - -#define SN_cryptocom "cryptocom" -#define NID_cryptocom 806 -#define OBJ_cryptocom OBJ_member_body,643L,2L,9L - -#define SN_id_GostR3411_94_with_GostR3410_2001 "id-GostR3411-94-with-GostR3410-2001" -#define LN_id_GostR3411_94_with_GostR3410_2001 "GOST R 34.11-94 with GOST R 34.10-2001" -#define NID_id_GostR3411_94_with_GostR3410_2001 807 -#define OBJ_id_GostR3411_94_with_GostR3410_2001 OBJ_cryptopro,3L - -#define SN_id_GostR3411_94_with_GostR3410_94 "id-GostR3411-94-with-GostR3410-94" -#define LN_id_GostR3411_94_with_GostR3410_94 "GOST R 34.11-94 with GOST R 34.10-94" -#define NID_id_GostR3411_94_with_GostR3410_94 808 -#define OBJ_id_GostR3411_94_with_GostR3410_94 OBJ_cryptopro,4L - -#define SN_id_GostR3411_94 "md_gost94" -#define LN_id_GostR3411_94 "GOST R 34.11-94" -#define NID_id_GostR3411_94 809 -#define OBJ_id_GostR3411_94 OBJ_cryptopro,9L - -#define SN_id_HMACGostR3411_94 "id-HMACGostR3411-94" -#define LN_id_HMACGostR3411_94 "HMAC GOST 34.11-94" -#define NID_id_HMACGostR3411_94 810 -#define OBJ_id_HMACGostR3411_94 OBJ_cryptopro,10L - -#define SN_id_GostR3410_2001 "gost2001" -#define LN_id_GostR3410_2001 "GOST R 34.10-2001" -#define NID_id_GostR3410_2001 811 -#define OBJ_id_GostR3410_2001 OBJ_cryptopro,19L - -#define SN_id_GostR3410_94 "gost94" -#define LN_id_GostR3410_94 "GOST R 34.10-94" -#define NID_id_GostR3410_94 812 -#define OBJ_id_GostR3410_94 OBJ_cryptopro,20L - -#define SN_id_Gost28147_89 "gost89" -#define LN_id_Gost28147_89 "GOST 28147-89" -#define NID_id_Gost28147_89 813 -#define OBJ_id_Gost28147_89 OBJ_cryptopro,21L - -#define SN_gost89_cnt "gost89-cnt" -#define NID_gost89_cnt 814 - -#define SN_id_Gost28147_89_MAC "gost-mac" -#define LN_id_Gost28147_89_MAC "GOST 28147-89 MAC" -#define NID_id_Gost28147_89_MAC 815 -#define OBJ_id_Gost28147_89_MAC OBJ_cryptopro,22L - -#define SN_id_GostR3411_94_prf "prf-gostr3411-94" -#define LN_id_GostR3411_94_prf "GOST R 34.11-94 PRF" -#define NID_id_GostR3411_94_prf 816 -#define OBJ_id_GostR3411_94_prf OBJ_cryptopro,23L - -#define SN_id_GostR3410_2001DH "id-GostR3410-2001DH" -#define LN_id_GostR3410_2001DH "GOST R 34.10-2001 DH" -#define NID_id_GostR3410_2001DH 817 -#define OBJ_id_GostR3410_2001DH OBJ_cryptopro,98L - -#define SN_id_GostR3410_94DH "id-GostR3410-94DH" -#define LN_id_GostR3410_94DH "GOST R 34.10-94 DH" -#define NID_id_GostR3410_94DH 818 -#define OBJ_id_GostR3410_94DH OBJ_cryptopro,99L - -#define SN_id_Gost28147_89_CryptoPro_KeyMeshing "id-Gost28147-89-CryptoPro-KeyMeshing" -#define NID_id_Gost28147_89_CryptoPro_KeyMeshing 819 -#define OBJ_id_Gost28147_89_CryptoPro_KeyMeshing OBJ_cryptopro,14L,1L - -#define SN_id_Gost28147_89_None_KeyMeshing "id-Gost28147-89-None-KeyMeshing" -#define NID_id_Gost28147_89_None_KeyMeshing 820 -#define OBJ_id_Gost28147_89_None_KeyMeshing OBJ_cryptopro,14L,0L - -#define SN_id_GostR3411_94_TestParamSet "id-GostR3411-94-TestParamSet" -#define NID_id_GostR3411_94_TestParamSet 821 -#define OBJ_id_GostR3411_94_TestParamSet OBJ_cryptopro,30L,0L - -#define SN_id_GostR3411_94_CryptoProParamSet "id-GostR3411-94-CryptoProParamSet" -#define NID_id_GostR3411_94_CryptoProParamSet 822 -#define OBJ_id_GostR3411_94_CryptoProParamSet OBJ_cryptopro,30L,1L - -#define SN_id_Gost28147_89_TestParamSet "id-Gost28147-89-TestParamSet" -#define NID_id_Gost28147_89_TestParamSet 823 -#define OBJ_id_Gost28147_89_TestParamSet OBJ_cryptopro,31L,0L - -#define SN_id_Gost28147_89_CryptoPro_A_ParamSet "id-Gost28147-89-CryptoPro-A-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_A_ParamSet 824 -#define OBJ_id_Gost28147_89_CryptoPro_A_ParamSet OBJ_cryptopro,31L,1L - -#define SN_id_Gost28147_89_CryptoPro_B_ParamSet "id-Gost28147-89-CryptoPro-B-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_B_ParamSet 825 -#define OBJ_id_Gost28147_89_CryptoPro_B_ParamSet OBJ_cryptopro,31L,2L - -#define SN_id_Gost28147_89_CryptoPro_C_ParamSet "id-Gost28147-89-CryptoPro-C-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_C_ParamSet 826 -#define OBJ_id_Gost28147_89_CryptoPro_C_ParamSet OBJ_cryptopro,31L,3L - -#define SN_id_Gost28147_89_CryptoPro_D_ParamSet "id-Gost28147-89-CryptoPro-D-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_D_ParamSet 827 -#define OBJ_id_Gost28147_89_CryptoPro_D_ParamSet OBJ_cryptopro,31L,4L - -#define SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet "id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet 828 -#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet OBJ_cryptopro,31L,5L - -#define SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet "id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet 829 -#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet OBJ_cryptopro,31L,6L - -#define SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet "id-Gost28147-89-CryptoPro-RIC-1-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet 830 -#define OBJ_id_Gost28147_89_CryptoPro_RIC_1_ParamSet OBJ_cryptopro,31L,7L - -#define SN_id_GostR3410_94_TestParamSet "id-GostR3410-94-TestParamSet" -#define NID_id_GostR3410_94_TestParamSet 831 -#define OBJ_id_GostR3410_94_TestParamSet OBJ_cryptopro,32L,0L - -#define SN_id_GostR3410_94_CryptoPro_A_ParamSet "id-GostR3410-94-CryptoPro-A-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_A_ParamSet 832 -#define OBJ_id_GostR3410_94_CryptoPro_A_ParamSet OBJ_cryptopro,32L,2L - -#define SN_id_GostR3410_94_CryptoPro_B_ParamSet "id-GostR3410-94-CryptoPro-B-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_B_ParamSet 833 -#define OBJ_id_GostR3410_94_CryptoPro_B_ParamSet OBJ_cryptopro,32L,3L - -#define SN_id_GostR3410_94_CryptoPro_C_ParamSet "id-GostR3410-94-CryptoPro-C-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_C_ParamSet 834 -#define OBJ_id_GostR3410_94_CryptoPro_C_ParamSet OBJ_cryptopro,32L,4L - -#define SN_id_GostR3410_94_CryptoPro_D_ParamSet "id-GostR3410-94-CryptoPro-D-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_D_ParamSet 835 -#define OBJ_id_GostR3410_94_CryptoPro_D_ParamSet OBJ_cryptopro,32L,5L - -#define SN_id_GostR3410_94_CryptoPro_XchA_ParamSet "id-GostR3410-94-CryptoPro-XchA-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_XchA_ParamSet 836 -#define OBJ_id_GostR3410_94_CryptoPro_XchA_ParamSet OBJ_cryptopro,33L,1L - -#define SN_id_GostR3410_94_CryptoPro_XchB_ParamSet "id-GostR3410-94-CryptoPro-XchB-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_XchB_ParamSet 837 -#define OBJ_id_GostR3410_94_CryptoPro_XchB_ParamSet OBJ_cryptopro,33L,2L - -#define SN_id_GostR3410_94_CryptoPro_XchC_ParamSet "id-GostR3410-94-CryptoPro-XchC-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_XchC_ParamSet 838 -#define OBJ_id_GostR3410_94_CryptoPro_XchC_ParamSet OBJ_cryptopro,33L,3L - -#define SN_id_GostR3410_2001_TestParamSet "id-GostR3410-2001-TestParamSet" -#define NID_id_GostR3410_2001_TestParamSet 839 -#define OBJ_id_GostR3410_2001_TestParamSet OBJ_cryptopro,35L,0L - -#define SN_id_GostR3410_2001_CryptoPro_A_ParamSet "id-GostR3410-2001-CryptoPro-A-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_A_ParamSet 840 -#define OBJ_id_GostR3410_2001_CryptoPro_A_ParamSet OBJ_cryptopro,35L,1L - -#define SN_id_GostR3410_2001_CryptoPro_B_ParamSet "id-GostR3410-2001-CryptoPro-B-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_B_ParamSet 841 -#define OBJ_id_GostR3410_2001_CryptoPro_B_ParamSet OBJ_cryptopro,35L,2L - -#define SN_id_GostR3410_2001_CryptoPro_C_ParamSet "id-GostR3410-2001-CryptoPro-C-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_C_ParamSet 842 -#define OBJ_id_GostR3410_2001_CryptoPro_C_ParamSet OBJ_cryptopro,35L,3L - -#define SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet "id-GostR3410-2001-CryptoPro-XchA-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet 843 -#define OBJ_id_GostR3410_2001_CryptoPro_XchA_ParamSet OBJ_cryptopro,36L,0L - -#define SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet "id-GostR3410-2001-CryptoPro-XchB-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet 844 -#define OBJ_id_GostR3410_2001_CryptoPro_XchB_ParamSet OBJ_cryptopro,36L,1L - -#define SN_id_GostR3410_94_a "id-GostR3410-94-a" -#define NID_id_GostR3410_94_a 845 -#define OBJ_id_GostR3410_94_a OBJ_id_GostR3410_94,1L - -#define SN_id_GostR3410_94_aBis "id-GostR3410-94-aBis" -#define NID_id_GostR3410_94_aBis 846 -#define OBJ_id_GostR3410_94_aBis OBJ_id_GostR3410_94,2L - -#define SN_id_GostR3410_94_b "id-GostR3410-94-b" -#define NID_id_GostR3410_94_b 847 -#define OBJ_id_GostR3410_94_b OBJ_id_GostR3410_94,3L - -#define SN_id_GostR3410_94_bBis "id-GostR3410-94-bBis" -#define NID_id_GostR3410_94_bBis 848 -#define OBJ_id_GostR3410_94_bBis OBJ_id_GostR3410_94,4L - -#define SN_id_Gost28147_89_cc "id-Gost28147-89-cc" -#define LN_id_Gost28147_89_cc "GOST 28147-89 Cryptocom ParamSet" -#define NID_id_Gost28147_89_cc 849 -#define OBJ_id_Gost28147_89_cc OBJ_cryptocom,1L,6L,1L - -#define SN_id_GostR3410_94_cc "gost94cc" -#define LN_id_GostR3410_94_cc "GOST 34.10-94 Cryptocom" -#define NID_id_GostR3410_94_cc 850 -#define OBJ_id_GostR3410_94_cc OBJ_cryptocom,1L,5L,3L - -#define SN_id_GostR3410_2001_cc "gost2001cc" -#define LN_id_GostR3410_2001_cc "GOST 34.10-2001 Cryptocom" -#define NID_id_GostR3410_2001_cc 851 -#define OBJ_id_GostR3410_2001_cc OBJ_cryptocom,1L,5L,4L - -#define SN_id_GostR3411_94_with_GostR3410_94_cc "id-GostR3411-94-with-GostR3410-94-cc" -#define LN_id_GostR3411_94_with_GostR3410_94_cc "GOST R 34.11-94 with GOST R 34.10-94 Cryptocom" -#define NID_id_GostR3411_94_with_GostR3410_94_cc 852 -#define OBJ_id_GostR3411_94_with_GostR3410_94_cc OBJ_cryptocom,1L,3L,3L - -#define SN_id_GostR3411_94_with_GostR3410_2001_cc "id-GostR3411-94-with-GostR3410-2001-cc" -#define LN_id_GostR3411_94_with_GostR3410_2001_cc "GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom" -#define NID_id_GostR3411_94_with_GostR3410_2001_cc 853 -#define OBJ_id_GostR3411_94_with_GostR3410_2001_cc OBJ_cryptocom,1L,3L,4L - -#define SN_id_GostR3410_2001_ParamSet_cc "id-GostR3410-2001-ParamSet-cc" -#define LN_id_GostR3410_2001_ParamSet_cc "GOST R 3410-2001 Parameter Set Cryptocom" -#define NID_id_GostR3410_2001_ParamSet_cc 854 -#define OBJ_id_GostR3410_2001_ParamSet_cc OBJ_cryptocom,1L,8L,1L - -#define SN_camellia_128_cbc "CAMELLIA-128-CBC" -#define LN_camellia_128_cbc "camellia-128-cbc" -#define NID_camellia_128_cbc 751 -#define OBJ_camellia_128_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,2L - -#define SN_camellia_192_cbc "CAMELLIA-192-CBC" -#define LN_camellia_192_cbc "camellia-192-cbc" -#define NID_camellia_192_cbc 752 -#define OBJ_camellia_192_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,3L - -#define SN_camellia_256_cbc "CAMELLIA-256-CBC" -#define LN_camellia_256_cbc "camellia-256-cbc" -#define NID_camellia_256_cbc 753 -#define OBJ_camellia_256_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,4L - -#define OBJ_ntt_ds 0L,3L,4401L,5L - -#define OBJ_camellia OBJ_ntt_ds,3L,1L,9L - -#define SN_camellia_128_ecb "CAMELLIA-128-ECB" -#define LN_camellia_128_ecb "camellia-128-ecb" -#define NID_camellia_128_ecb 754 -#define OBJ_camellia_128_ecb OBJ_camellia,1L - -#define SN_camellia_128_ofb128 "CAMELLIA-128-OFB" -#define LN_camellia_128_ofb128 "camellia-128-ofb" -#define NID_camellia_128_ofb128 766 -#define OBJ_camellia_128_ofb128 OBJ_camellia,3L - -#define SN_camellia_128_cfb128 "CAMELLIA-128-CFB" -#define LN_camellia_128_cfb128 "camellia-128-cfb" -#define NID_camellia_128_cfb128 757 -#define OBJ_camellia_128_cfb128 OBJ_camellia,4L - -#define SN_camellia_192_ecb "CAMELLIA-192-ECB" -#define LN_camellia_192_ecb "camellia-192-ecb" -#define NID_camellia_192_ecb 755 -#define OBJ_camellia_192_ecb OBJ_camellia,21L - -#define SN_camellia_192_ofb128 "CAMELLIA-192-OFB" -#define LN_camellia_192_ofb128 "camellia-192-ofb" -#define NID_camellia_192_ofb128 767 -#define OBJ_camellia_192_ofb128 OBJ_camellia,23L - -#define SN_camellia_192_cfb128 "CAMELLIA-192-CFB" -#define LN_camellia_192_cfb128 "camellia-192-cfb" -#define NID_camellia_192_cfb128 758 -#define OBJ_camellia_192_cfb128 OBJ_camellia,24L - -#define SN_camellia_256_ecb "CAMELLIA-256-ECB" -#define LN_camellia_256_ecb "camellia-256-ecb" -#define NID_camellia_256_ecb 756 -#define OBJ_camellia_256_ecb OBJ_camellia,41L - -#define SN_camellia_256_ofb128 "CAMELLIA-256-OFB" -#define LN_camellia_256_ofb128 "camellia-256-ofb" -#define NID_camellia_256_ofb128 768 -#define OBJ_camellia_256_ofb128 OBJ_camellia,43L - -#define SN_camellia_256_cfb128 "CAMELLIA-256-CFB" -#define LN_camellia_256_cfb128 "camellia-256-cfb" -#define NID_camellia_256_cfb128 759 -#define OBJ_camellia_256_cfb128 OBJ_camellia,44L - -#define SN_camellia_128_cfb1 "CAMELLIA-128-CFB1" -#define LN_camellia_128_cfb1 "camellia-128-cfb1" -#define NID_camellia_128_cfb1 760 - -#define SN_camellia_192_cfb1 "CAMELLIA-192-CFB1" -#define LN_camellia_192_cfb1 "camellia-192-cfb1" -#define NID_camellia_192_cfb1 761 - -#define SN_camellia_256_cfb1 "CAMELLIA-256-CFB1" -#define LN_camellia_256_cfb1 "camellia-256-cfb1" -#define NID_camellia_256_cfb1 762 - -#define SN_camellia_128_cfb8 "CAMELLIA-128-CFB8" -#define LN_camellia_128_cfb8 "camellia-128-cfb8" -#define NID_camellia_128_cfb8 763 - -#define SN_camellia_192_cfb8 "CAMELLIA-192-CFB8" -#define LN_camellia_192_cfb8 "camellia-192-cfb8" -#define NID_camellia_192_cfb8 764 - -#define SN_camellia_256_cfb8 "CAMELLIA-256-CFB8" -#define LN_camellia_256_cfb8 "camellia-256-cfb8" -#define NID_camellia_256_cfb8 765 - -#define SN_kisa "KISA" -#define LN_kisa "kisa" -#define NID_kisa 773 -#define OBJ_kisa OBJ_member_body,410L,200004L - -#define SN_seed_ecb "SEED-ECB" -#define LN_seed_ecb "seed-ecb" -#define NID_seed_ecb 776 -#define OBJ_seed_ecb OBJ_kisa,1L,3L - -#define SN_seed_cbc "SEED-CBC" -#define LN_seed_cbc "seed-cbc" -#define NID_seed_cbc 777 -#define OBJ_seed_cbc OBJ_kisa,1L,4L - -#define SN_seed_cfb128 "SEED-CFB" -#define LN_seed_cfb128 "seed-cfb" -#define NID_seed_cfb128 779 -#define OBJ_seed_cfb128 OBJ_kisa,1L,5L - -#define SN_seed_ofb128 "SEED-OFB" -#define LN_seed_ofb128 "seed-ofb" -#define NID_seed_ofb128 778 -#define OBJ_seed_ofb128 OBJ_kisa,1L,6L - -#define SN_hmac "HMAC" -#define LN_hmac "hmac" -#define NID_hmac 855 - diff --git a/externals/openssl/objects.h b/externals/openssl/objects.h deleted file mode 100644 index b44abc3e68..0000000000 --- a/externals/openssl/objects.h +++ /dev/null @@ -1,1050 +0,0 @@ -/* crypto/objects/objects.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_OBJECTS_H -#define HEADER_OBJECTS_H - -#define USE_OBJ_MAC - -#ifdef USE_OBJ_MAC -#include -#else -#define SN_undef "UNDEF" -#define LN_undef "undefined" -#define NID_undef 0 -#define OBJ_undef 0L - -#define SN_Algorithm "Algorithm" -#define LN_algorithm "algorithm" -#define NID_algorithm 38 -#define OBJ_algorithm 1L,3L,14L,3L,2L - -#define LN_rsadsi "rsadsi" -#define NID_rsadsi 1 -#define OBJ_rsadsi 1L,2L,840L,113549L - -#define LN_pkcs "pkcs" -#define NID_pkcs 2 -#define OBJ_pkcs OBJ_rsadsi,1L - -#define SN_md2 "MD2" -#define LN_md2 "md2" -#define NID_md2 3 -#define OBJ_md2 OBJ_rsadsi,2L,2L - -#define SN_md5 "MD5" -#define LN_md5 "md5" -#define NID_md5 4 -#define OBJ_md5 OBJ_rsadsi,2L,5L - -#define SN_rc4 "RC4" -#define LN_rc4 "rc4" -#define NID_rc4 5 -#define OBJ_rc4 OBJ_rsadsi,3L,4L - -#define LN_rsaEncryption "rsaEncryption" -#define NID_rsaEncryption 6 -#define OBJ_rsaEncryption OBJ_pkcs,1L,1L - -#define SN_md2WithRSAEncryption "RSA-MD2" -#define LN_md2WithRSAEncryption "md2WithRSAEncryption" -#define NID_md2WithRSAEncryption 7 -#define OBJ_md2WithRSAEncryption OBJ_pkcs,1L,2L - -#define SN_md5WithRSAEncryption "RSA-MD5" -#define LN_md5WithRSAEncryption "md5WithRSAEncryption" -#define NID_md5WithRSAEncryption 8 -#define OBJ_md5WithRSAEncryption OBJ_pkcs,1L,4L - -#define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" -#define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" -#define NID_pbeWithMD2AndDES_CBC 9 -#define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs,5L,1L - -#define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" -#define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" -#define NID_pbeWithMD5AndDES_CBC 10 -#define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs,5L,3L - -#define LN_X500 "X500" -#define NID_X500 11 -#define OBJ_X500 2L,5L - -#define LN_X509 "X509" -#define NID_X509 12 -#define OBJ_X509 OBJ_X500,4L - -#define SN_commonName "CN" -#define LN_commonName "commonName" -#define NID_commonName 13 -#define OBJ_commonName OBJ_X509,3L - -#define SN_countryName "C" -#define LN_countryName "countryName" -#define NID_countryName 14 -#define OBJ_countryName OBJ_X509,6L - -#define SN_localityName "L" -#define LN_localityName "localityName" -#define NID_localityName 15 -#define OBJ_localityName OBJ_X509,7L - -/* Postal Address? PA */ - -/* should be "ST" (rfc1327) but MS uses 'S' */ -#define SN_stateOrProvinceName "ST" -#define LN_stateOrProvinceName "stateOrProvinceName" -#define NID_stateOrProvinceName 16 -#define OBJ_stateOrProvinceName OBJ_X509,8L - -#define SN_organizationName "O" -#define LN_organizationName "organizationName" -#define NID_organizationName 17 -#define OBJ_organizationName OBJ_X509,10L - -#define SN_organizationalUnitName "OU" -#define LN_organizationalUnitName "organizationalUnitName" -#define NID_organizationalUnitName 18 -#define OBJ_organizationalUnitName OBJ_X509,11L - -#define SN_rsa "RSA" -#define LN_rsa "rsa" -#define NID_rsa 19 -#define OBJ_rsa OBJ_X500,8L,1L,1L - -#define LN_pkcs7 "pkcs7" -#define NID_pkcs7 20 -#define OBJ_pkcs7 OBJ_pkcs,7L - -#define LN_pkcs7_data "pkcs7-data" -#define NID_pkcs7_data 21 -#define OBJ_pkcs7_data OBJ_pkcs7,1L - -#define LN_pkcs7_signed "pkcs7-signedData" -#define NID_pkcs7_signed 22 -#define OBJ_pkcs7_signed OBJ_pkcs7,2L - -#define LN_pkcs7_enveloped "pkcs7-envelopedData" -#define NID_pkcs7_enveloped 23 -#define OBJ_pkcs7_enveloped OBJ_pkcs7,3L - -#define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" -#define NID_pkcs7_signedAndEnveloped 24 -#define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L - -#define LN_pkcs7_digest "pkcs7-digestData" -#define NID_pkcs7_digest 25 -#define OBJ_pkcs7_digest OBJ_pkcs7,5L - -#define LN_pkcs7_encrypted "pkcs7-encryptedData" -#define NID_pkcs7_encrypted 26 -#define OBJ_pkcs7_encrypted OBJ_pkcs7,6L - -#define LN_pkcs3 "pkcs3" -#define NID_pkcs3 27 -#define OBJ_pkcs3 OBJ_pkcs,3L - -#define LN_dhKeyAgreement "dhKeyAgreement" -#define NID_dhKeyAgreement 28 -#define OBJ_dhKeyAgreement OBJ_pkcs3,1L - -#define SN_des_ecb "DES-ECB" -#define LN_des_ecb "des-ecb" -#define NID_des_ecb 29 -#define OBJ_des_ecb OBJ_algorithm,6L - -#define SN_des_cfb64 "DES-CFB" -#define LN_des_cfb64 "des-cfb" -#define NID_des_cfb64 30 -/* IV + num */ -#define OBJ_des_cfb64 OBJ_algorithm,9L - -#define SN_des_cbc "DES-CBC" -#define LN_des_cbc "des-cbc" -#define NID_des_cbc 31 -/* IV */ -#define OBJ_des_cbc OBJ_algorithm,7L - -#define SN_des_ede "DES-EDE" -#define LN_des_ede "des-ede" -#define NID_des_ede 32 -/* ?? */ -#define OBJ_des_ede OBJ_algorithm,17L - -#define SN_des_ede3 "DES-EDE3" -#define LN_des_ede3 "des-ede3" -#define NID_des_ede3 33 - -#define SN_idea_cbc "IDEA-CBC" -#define LN_idea_cbc "idea-cbc" -#define NID_idea_cbc 34 -#define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L - -#define SN_idea_cfb64 "IDEA-CFB" -#define LN_idea_cfb64 "idea-cfb" -#define NID_idea_cfb64 35 - -#define SN_idea_ecb "IDEA-ECB" -#define LN_idea_ecb "idea-ecb" -#define NID_idea_ecb 36 - -#define SN_rc2_cbc "RC2-CBC" -#define LN_rc2_cbc "rc2-cbc" -#define NID_rc2_cbc 37 -#define OBJ_rc2_cbc OBJ_rsadsi,3L,2L - -#define SN_rc2_ecb "RC2-ECB" -#define LN_rc2_ecb "rc2-ecb" -#define NID_rc2_ecb 38 - -#define SN_rc2_cfb64 "RC2-CFB" -#define LN_rc2_cfb64 "rc2-cfb" -#define NID_rc2_cfb64 39 - -#define SN_rc2_ofb64 "RC2-OFB" -#define LN_rc2_ofb64 "rc2-ofb" -#define NID_rc2_ofb64 40 - -#define SN_sha "SHA" -#define LN_sha "sha" -#define NID_sha 41 -#define OBJ_sha OBJ_algorithm,18L - -#define SN_shaWithRSAEncryption "RSA-SHA" -#define LN_shaWithRSAEncryption "shaWithRSAEncryption" -#define NID_shaWithRSAEncryption 42 -#define OBJ_shaWithRSAEncryption OBJ_algorithm,15L - -#define SN_des_ede_cbc "DES-EDE-CBC" -#define LN_des_ede_cbc "des-ede-cbc" -#define NID_des_ede_cbc 43 - -#define SN_des_ede3_cbc "DES-EDE3-CBC" -#define LN_des_ede3_cbc "des-ede3-cbc" -#define NID_des_ede3_cbc 44 -#define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L - -#define SN_des_ofb64 "DES-OFB" -#define LN_des_ofb64 "des-ofb" -#define NID_des_ofb64 45 -#define OBJ_des_ofb64 OBJ_algorithm,8L - -#define SN_idea_ofb64 "IDEA-OFB" -#define LN_idea_ofb64 "idea-ofb" -#define NID_idea_ofb64 46 - -#define LN_pkcs9 "pkcs9" -#define NID_pkcs9 47 -#define OBJ_pkcs9 OBJ_pkcs,9L - -#define SN_pkcs9_emailAddress "Email" -#define LN_pkcs9_emailAddress "emailAddress" -#define NID_pkcs9_emailAddress 48 -#define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L - -#define LN_pkcs9_unstructuredName "unstructuredName" -#define NID_pkcs9_unstructuredName 49 -#define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L - -#define LN_pkcs9_contentType "contentType" -#define NID_pkcs9_contentType 50 -#define OBJ_pkcs9_contentType OBJ_pkcs9,3L - -#define LN_pkcs9_messageDigest "messageDigest" -#define NID_pkcs9_messageDigest 51 -#define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L - -#define LN_pkcs9_signingTime "signingTime" -#define NID_pkcs9_signingTime 52 -#define OBJ_pkcs9_signingTime OBJ_pkcs9,5L - -#define LN_pkcs9_countersignature "countersignature" -#define NID_pkcs9_countersignature 53 -#define OBJ_pkcs9_countersignature OBJ_pkcs9,6L - -#define LN_pkcs9_challengePassword "challengePassword" -#define NID_pkcs9_challengePassword 54 -#define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L - -#define LN_pkcs9_unstructuredAddress "unstructuredAddress" -#define NID_pkcs9_unstructuredAddress 55 -#define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L - -#define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" -#define NID_pkcs9_extCertAttributes 56 -#define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L - -#define SN_netscape "Netscape" -#define LN_netscape "Netscape Communications Corp." -#define NID_netscape 57 -#define OBJ_netscape 2L,16L,840L,1L,113730L - -#define SN_netscape_cert_extension "nsCertExt" -#define LN_netscape_cert_extension "Netscape Certificate Extension" -#define NID_netscape_cert_extension 58 -#define OBJ_netscape_cert_extension OBJ_netscape,1L - -#define SN_netscape_data_type "nsDataType" -#define LN_netscape_data_type "Netscape Data Type" -#define NID_netscape_data_type 59 -#define OBJ_netscape_data_type OBJ_netscape,2L - -#define SN_des_ede_cfb64 "DES-EDE-CFB" -#define LN_des_ede_cfb64 "des-ede-cfb" -#define NID_des_ede_cfb64 60 - -#define SN_des_ede3_cfb64 "DES-EDE3-CFB" -#define LN_des_ede3_cfb64 "des-ede3-cfb" -#define NID_des_ede3_cfb64 61 - -#define SN_des_ede_ofb64 "DES-EDE-OFB" -#define LN_des_ede_ofb64 "des-ede-ofb" -#define NID_des_ede_ofb64 62 - -#define SN_des_ede3_ofb64 "DES-EDE3-OFB" -#define LN_des_ede3_ofb64 "des-ede3-ofb" -#define NID_des_ede3_ofb64 63 - -/* I'm not sure about the object ID */ -#define SN_sha1 "SHA1" -#define LN_sha1 "sha1" -#define NID_sha1 64 -#define OBJ_sha1 OBJ_algorithm,26L -/* 28 Jun 1996 - eay */ -/* #define OBJ_sha1 1L,3L,14L,2L,26L,05L <- wrong */ - -#define SN_sha1WithRSAEncryption "RSA-SHA1" -#define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" -#define NID_sha1WithRSAEncryption 65 -#define OBJ_sha1WithRSAEncryption OBJ_pkcs,1L,5L - -#define SN_dsaWithSHA "DSA-SHA" -#define LN_dsaWithSHA "dsaWithSHA" -#define NID_dsaWithSHA 66 -#define OBJ_dsaWithSHA OBJ_algorithm,13L - -#define SN_dsa_2 "DSA-old" -#define LN_dsa_2 "dsaEncryption-old" -#define NID_dsa_2 67 -#define OBJ_dsa_2 OBJ_algorithm,12L - -/* proposed by microsoft to RSA */ -#define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" -#define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" -#define NID_pbeWithSHA1AndRC2_CBC 68 -#define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs,5L,11L - -/* proposed by microsoft to RSA as pbeWithSHA1AndRC4: it is now - * defined explicitly in PKCS#5 v2.0 as id-PBKDF2 which is something - * completely different. - */ -#define LN_id_pbkdf2 "PBKDF2" -#define NID_id_pbkdf2 69 -#define OBJ_id_pbkdf2 OBJ_pkcs,5L,12L - -#define SN_dsaWithSHA1_2 "DSA-SHA1-old" -#define LN_dsaWithSHA1_2 "dsaWithSHA1-old" -#define NID_dsaWithSHA1_2 70 -/* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */ -#define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L - -#define SN_netscape_cert_type "nsCertType" -#define LN_netscape_cert_type "Netscape Cert Type" -#define NID_netscape_cert_type 71 -#define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L - -#define SN_netscape_base_url "nsBaseUrl" -#define LN_netscape_base_url "Netscape Base Url" -#define NID_netscape_base_url 72 -#define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L - -#define SN_netscape_revocation_url "nsRevocationUrl" -#define LN_netscape_revocation_url "Netscape Revocation Url" -#define NID_netscape_revocation_url 73 -#define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L - -#define SN_netscape_ca_revocation_url "nsCaRevocationUrl" -#define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" -#define NID_netscape_ca_revocation_url 74 -#define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L - -#define SN_netscape_renewal_url "nsRenewalUrl" -#define LN_netscape_renewal_url "Netscape Renewal Url" -#define NID_netscape_renewal_url 75 -#define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L - -#define SN_netscape_ca_policy_url "nsCaPolicyUrl" -#define LN_netscape_ca_policy_url "Netscape CA Policy Url" -#define NID_netscape_ca_policy_url 76 -#define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L - -#define SN_netscape_ssl_server_name "nsSslServerName" -#define LN_netscape_ssl_server_name "Netscape SSL Server Name" -#define NID_netscape_ssl_server_name 77 -#define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L - -#define SN_netscape_comment "nsComment" -#define LN_netscape_comment "Netscape Comment" -#define NID_netscape_comment 78 -#define OBJ_netscape_comment OBJ_netscape_cert_extension,13L - -#define SN_netscape_cert_sequence "nsCertSequence" -#define LN_netscape_cert_sequence "Netscape Certificate Sequence" -#define NID_netscape_cert_sequence 79 -#define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L - -#define SN_desx_cbc "DESX-CBC" -#define LN_desx_cbc "desx-cbc" -#define NID_desx_cbc 80 - -#define SN_id_ce "id-ce" -#define NID_id_ce 81 -#define OBJ_id_ce 2L,5L,29L - -#define SN_subject_key_identifier "subjectKeyIdentifier" -#define LN_subject_key_identifier "X509v3 Subject Key Identifier" -#define NID_subject_key_identifier 82 -#define OBJ_subject_key_identifier OBJ_id_ce,14L - -#define SN_key_usage "keyUsage" -#define LN_key_usage "X509v3 Key Usage" -#define NID_key_usage 83 -#define OBJ_key_usage OBJ_id_ce,15L - -#define SN_private_key_usage_period "privateKeyUsagePeriod" -#define LN_private_key_usage_period "X509v3 Private Key Usage Period" -#define NID_private_key_usage_period 84 -#define OBJ_private_key_usage_period OBJ_id_ce,16L - -#define SN_subject_alt_name "subjectAltName" -#define LN_subject_alt_name "X509v3 Subject Alternative Name" -#define NID_subject_alt_name 85 -#define OBJ_subject_alt_name OBJ_id_ce,17L - -#define SN_issuer_alt_name "issuerAltName" -#define LN_issuer_alt_name "X509v3 Issuer Alternative Name" -#define NID_issuer_alt_name 86 -#define OBJ_issuer_alt_name OBJ_id_ce,18L - -#define SN_basic_constraints "basicConstraints" -#define LN_basic_constraints "X509v3 Basic Constraints" -#define NID_basic_constraints 87 -#define OBJ_basic_constraints OBJ_id_ce,19L - -#define SN_crl_number "crlNumber" -#define LN_crl_number "X509v3 CRL Number" -#define NID_crl_number 88 -#define OBJ_crl_number OBJ_id_ce,20L - -#define SN_certificate_policies "certificatePolicies" -#define LN_certificate_policies "X509v3 Certificate Policies" -#define NID_certificate_policies 89 -#define OBJ_certificate_policies OBJ_id_ce,32L - -#define SN_authority_key_identifier "authorityKeyIdentifier" -#define LN_authority_key_identifier "X509v3 Authority Key Identifier" -#define NID_authority_key_identifier 90 -#define OBJ_authority_key_identifier OBJ_id_ce,35L - -#define SN_bf_cbc "BF-CBC" -#define LN_bf_cbc "bf-cbc" -#define NID_bf_cbc 91 -#define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L - -#define SN_bf_ecb "BF-ECB" -#define LN_bf_ecb "bf-ecb" -#define NID_bf_ecb 92 - -#define SN_bf_cfb64 "BF-CFB" -#define LN_bf_cfb64 "bf-cfb" -#define NID_bf_cfb64 93 - -#define SN_bf_ofb64 "BF-OFB" -#define LN_bf_ofb64 "bf-ofb" -#define NID_bf_ofb64 94 - -#define SN_mdc2 "MDC2" -#define LN_mdc2 "mdc2" -#define NID_mdc2 95 -#define OBJ_mdc2 2L,5L,8L,3L,101L -/* An alternative? 1L,3L,14L,3L,2L,19L */ - -#define SN_mdc2WithRSA "RSA-MDC2" -#define LN_mdc2WithRSA "mdc2withRSA" -#define NID_mdc2WithRSA 96 -#define OBJ_mdc2WithRSA 2L,5L,8L,3L,100L - -#define SN_rc4_40 "RC4-40" -#define LN_rc4_40 "rc4-40" -#define NID_rc4_40 97 - -#define SN_rc2_40_cbc "RC2-40-CBC" -#define LN_rc2_40_cbc "rc2-40-cbc" -#define NID_rc2_40_cbc 98 - -#define SN_givenName "G" -#define LN_givenName "givenName" -#define NID_givenName 99 -#define OBJ_givenName OBJ_X509,42L - -#define SN_surname "S" -#define LN_surname "surname" -#define NID_surname 100 -#define OBJ_surname OBJ_X509,4L - -#define SN_initials "I" -#define LN_initials "initials" -#define NID_initials 101 -#define OBJ_initials OBJ_X509,43L - -#define SN_uniqueIdentifier "UID" -#define LN_uniqueIdentifier "uniqueIdentifier" -#define NID_uniqueIdentifier 102 -#define OBJ_uniqueIdentifier OBJ_X509,45L - -#define SN_crl_distribution_points "crlDistributionPoints" -#define LN_crl_distribution_points "X509v3 CRL Distribution Points" -#define NID_crl_distribution_points 103 -#define OBJ_crl_distribution_points OBJ_id_ce,31L - -#define SN_md5WithRSA "RSA-NP-MD5" -#define LN_md5WithRSA "md5WithRSA" -#define NID_md5WithRSA 104 -#define OBJ_md5WithRSA OBJ_algorithm,3L - -#define SN_serialNumber "SN" -#define LN_serialNumber "serialNumber" -#define NID_serialNumber 105 -#define OBJ_serialNumber OBJ_X509,5L - -#define SN_title "T" -#define LN_title "title" -#define NID_title 106 -#define OBJ_title OBJ_X509,12L - -#define SN_description "D" -#define LN_description "description" -#define NID_description 107 -#define OBJ_description OBJ_X509,13L - -/* CAST5 is CAST-128, I'm just sticking with the documentation */ -#define SN_cast5_cbc "CAST5-CBC" -#define LN_cast5_cbc "cast5-cbc" -#define NID_cast5_cbc 108 -#define OBJ_cast5_cbc 1L,2L,840L,113533L,7L,66L,10L - -#define SN_cast5_ecb "CAST5-ECB" -#define LN_cast5_ecb "cast5-ecb" -#define NID_cast5_ecb 109 - -#define SN_cast5_cfb64 "CAST5-CFB" -#define LN_cast5_cfb64 "cast5-cfb" -#define NID_cast5_cfb64 110 - -#define SN_cast5_ofb64 "CAST5-OFB" -#define LN_cast5_ofb64 "cast5-ofb" -#define NID_cast5_ofb64 111 - -#define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" -#define NID_pbeWithMD5AndCast5_CBC 112 -#define OBJ_pbeWithMD5AndCast5_CBC 1L,2L,840L,113533L,7L,66L,12L - -/* This is one sun will soon be using :-( - * id-dsa-with-sha1 ID ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9cm(4) 3 } - */ -#define SN_dsaWithSHA1 "DSA-SHA1" -#define LN_dsaWithSHA1 "dsaWithSHA1" -#define NID_dsaWithSHA1 113 -#define OBJ_dsaWithSHA1 1L,2L,840L,10040L,4L,3L - -#define NID_md5_sha1 114 -#define SN_md5_sha1 "MD5-SHA1" -#define LN_md5_sha1 "md5-sha1" - -#define SN_sha1WithRSA "RSA-SHA1-2" -#define LN_sha1WithRSA "sha1WithRSA" -#define NID_sha1WithRSA 115 -#define OBJ_sha1WithRSA OBJ_algorithm,29L - -#define SN_dsa "DSA" -#define LN_dsa "dsaEncryption" -#define NID_dsa 116 -#define OBJ_dsa 1L,2L,840L,10040L,4L,1L - -#define SN_ripemd160 "RIPEMD160" -#define LN_ripemd160 "ripemd160" -#define NID_ripemd160 117 -#define OBJ_ripemd160 1L,3L,36L,3L,2L,1L - -/* The name should actually be rsaSignatureWithripemd160, but I'm going - * to continue using the convention I'm using with the other ciphers */ -#define SN_ripemd160WithRSA "RSA-RIPEMD160" -#define LN_ripemd160WithRSA "ripemd160WithRSA" -#define NID_ripemd160WithRSA 119 -#define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L - -/* Taken from rfc2040 - * RC5_CBC_Parameters ::= SEQUENCE { - * version INTEGER (v1_0(16)), - * rounds INTEGER (8..127), - * blockSizeInBits INTEGER (64, 128), - * iv OCTET STRING OPTIONAL - * } - */ -#define SN_rc5_cbc "RC5-CBC" -#define LN_rc5_cbc "rc5-cbc" -#define NID_rc5_cbc 120 -#define OBJ_rc5_cbc OBJ_rsadsi,3L,8L - -#define SN_rc5_ecb "RC5-ECB" -#define LN_rc5_ecb "rc5-ecb" -#define NID_rc5_ecb 121 - -#define SN_rc5_cfb64 "RC5-CFB" -#define LN_rc5_cfb64 "rc5-cfb" -#define NID_rc5_cfb64 122 - -#define SN_rc5_ofb64 "RC5-OFB" -#define LN_rc5_ofb64 "rc5-ofb" -#define NID_rc5_ofb64 123 - -#define SN_rle_compression "RLE" -#define LN_rle_compression "run length compression" -#define NID_rle_compression 124 -#define OBJ_rle_compression 1L,1L,1L,1L,666L,1L - -#define SN_zlib_compression "ZLIB" -#define LN_zlib_compression "zlib compression" -#define NID_zlib_compression 125 -#define OBJ_zlib_compression 1L,1L,1L,1L,666L,2L - -#define SN_ext_key_usage "extendedKeyUsage" -#define LN_ext_key_usage "X509v3 Extended Key Usage" -#define NID_ext_key_usage 126 -#define OBJ_ext_key_usage OBJ_id_ce,37 - -#define SN_id_pkix "PKIX" -#define NID_id_pkix 127 -#define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L - -#define SN_id_kp "id-kp" -#define NID_id_kp 128 -#define OBJ_id_kp OBJ_id_pkix,3L - -/* PKIX extended key usage OIDs */ - -#define SN_server_auth "serverAuth" -#define LN_server_auth "TLS Web Server Authentication" -#define NID_server_auth 129 -#define OBJ_server_auth OBJ_id_kp,1L - -#define SN_client_auth "clientAuth" -#define LN_client_auth "TLS Web Client Authentication" -#define NID_client_auth 130 -#define OBJ_client_auth OBJ_id_kp,2L - -#define SN_code_sign "codeSigning" -#define LN_code_sign "Code Signing" -#define NID_code_sign 131 -#define OBJ_code_sign OBJ_id_kp,3L - -#define SN_email_protect "emailProtection" -#define LN_email_protect "E-mail Protection" -#define NID_email_protect 132 -#define OBJ_email_protect OBJ_id_kp,4L - -#define SN_time_stamp "timeStamping" -#define LN_time_stamp "Time Stamping" -#define NID_time_stamp 133 -#define OBJ_time_stamp OBJ_id_kp,8L - -/* Additional extended key usage OIDs: Microsoft */ - -#define SN_ms_code_ind "msCodeInd" -#define LN_ms_code_ind "Microsoft Individual Code Signing" -#define NID_ms_code_ind 134 -#define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L - -#define SN_ms_code_com "msCodeCom" -#define LN_ms_code_com "Microsoft Commercial Code Signing" -#define NID_ms_code_com 135 -#define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L - -#define SN_ms_ctl_sign "msCTLSign" -#define LN_ms_ctl_sign "Microsoft Trust List Signing" -#define NID_ms_ctl_sign 136 -#define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L - -#define SN_ms_sgc "msSGC" -#define LN_ms_sgc "Microsoft Server Gated Crypto" -#define NID_ms_sgc 137 -#define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L - -#define SN_ms_efs "msEFS" -#define LN_ms_efs "Microsoft Encrypted File System" -#define NID_ms_efs 138 -#define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L - -/* Additional usage: Netscape */ - -#define SN_ns_sgc "nsSGC" -#define LN_ns_sgc "Netscape Server Gated Crypto" -#define NID_ns_sgc 139 -#define OBJ_ns_sgc OBJ_netscape,4L,1L - -#define SN_delta_crl "deltaCRL" -#define LN_delta_crl "X509v3 Delta CRL Indicator" -#define NID_delta_crl 140 -#define OBJ_delta_crl OBJ_id_ce,27L - -#define SN_crl_reason "CRLReason" -#define LN_crl_reason "CRL Reason Code" -#define NID_crl_reason 141 -#define OBJ_crl_reason OBJ_id_ce,21L - -#define SN_invalidity_date "invalidityDate" -#define LN_invalidity_date "Invalidity Date" -#define NID_invalidity_date 142 -#define OBJ_invalidity_date OBJ_id_ce,24L - -#define SN_sxnet "SXNetID" -#define LN_sxnet "Strong Extranet ID" -#define NID_sxnet 143 -#define OBJ_sxnet 1L,3L,101L,1L,4L,1L - -/* PKCS12 and related OBJECT IDENTIFIERS */ - -#define OBJ_pkcs12 OBJ_pkcs,12L -#define OBJ_pkcs12_pbeids OBJ_pkcs12, 1 - -#define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128" -#define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4" -#define NID_pbe_WithSHA1And128BitRC4 144 -#define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids, 1L - -#define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" -#define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" -#define NID_pbe_WithSHA1And40BitRC4 145 -#define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids, 2L - -#define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES" -#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC" -#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146 -#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 3L - -#define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES" -#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC" -#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147 -#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 4L - -#define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128" -#define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC" -#define NID_pbe_WithSHA1And128BitRC2_CBC 148 -#define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids, 5L - -#define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40" -#define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC" -#define NID_pbe_WithSHA1And40BitRC2_CBC 149 -#define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids, 6L - -#define OBJ_pkcs12_Version1 OBJ_pkcs12, 10L - -#define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1, 1L - -#define LN_keyBag "keyBag" -#define NID_keyBag 150 -#define OBJ_keyBag OBJ_pkcs12_BagIds, 1L - -#define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag" -#define NID_pkcs8ShroudedKeyBag 151 -#define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds, 2L - -#define LN_certBag "certBag" -#define NID_certBag 152 -#define OBJ_certBag OBJ_pkcs12_BagIds, 3L - -#define LN_crlBag "crlBag" -#define NID_crlBag 153 -#define OBJ_crlBag OBJ_pkcs12_BagIds, 4L - -#define LN_secretBag "secretBag" -#define NID_secretBag 154 -#define OBJ_secretBag OBJ_pkcs12_BagIds, 5L - -#define LN_safeContentsBag "safeContentsBag" -#define NID_safeContentsBag 155 -#define OBJ_safeContentsBag OBJ_pkcs12_BagIds, 6L - -#define LN_friendlyName "friendlyName" -#define NID_friendlyName 156 -#define OBJ_friendlyName OBJ_pkcs9, 20L - -#define LN_localKeyID "localKeyID" -#define NID_localKeyID 157 -#define OBJ_localKeyID OBJ_pkcs9, 21L - -#define OBJ_certTypes OBJ_pkcs9, 22L - -#define LN_x509Certificate "x509Certificate" -#define NID_x509Certificate 158 -#define OBJ_x509Certificate OBJ_certTypes, 1L - -#define LN_sdsiCertificate "sdsiCertificate" -#define NID_sdsiCertificate 159 -#define OBJ_sdsiCertificate OBJ_certTypes, 2L - -#define OBJ_crlTypes OBJ_pkcs9, 23L - -#define LN_x509Crl "x509Crl" -#define NID_x509Crl 160 -#define OBJ_x509Crl OBJ_crlTypes, 1L - -/* PKCS#5 v2 OIDs */ - -#define LN_pbes2 "PBES2" -#define NID_pbes2 161 -#define OBJ_pbes2 OBJ_pkcs,5L,13L - -#define LN_pbmac1 "PBMAC1" -#define NID_pbmac1 162 -#define OBJ_pbmac1 OBJ_pkcs,5L,14L - -#define LN_hmacWithSHA1 "hmacWithSHA1" -#define NID_hmacWithSHA1 163 -#define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L - -/* Policy Qualifier Ids */ - -#define LN_id_qt_cps "Policy Qualifier CPS" -#define SN_id_qt_cps "id-qt-cps" -#define NID_id_qt_cps 164 -#define OBJ_id_qt_cps OBJ_id_pkix,2L,1L - -#define LN_id_qt_unotice "Policy Qualifier User Notice" -#define SN_id_qt_unotice "id-qt-unotice" -#define NID_id_qt_unotice 165 -#define OBJ_id_qt_unotice OBJ_id_pkix,2L,2L - -#define SN_rc2_64_cbc "RC2-64-CBC" -#define LN_rc2_64_cbc "rc2-64-cbc" -#define NID_rc2_64_cbc 166 - -#define SN_SMIMECapabilities "SMIME-CAPS" -#define LN_SMIMECapabilities "S/MIME Capabilities" -#define NID_SMIMECapabilities 167 -#define OBJ_SMIMECapabilities OBJ_pkcs9,15L - -#define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64" -#define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC" -#define NID_pbeWithMD2AndRC2_CBC 168 -#define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs,5L,4L - -#define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64" -#define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC" -#define NID_pbeWithMD5AndRC2_CBC 169 -#define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs,5L,6L - -#define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES" -#define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC" -#define NID_pbeWithSHA1AndDES_CBC 170 -#define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs,5L,10L - -/* Extension request OIDs */ - -#define LN_ms_ext_req "Microsoft Extension Request" -#define SN_ms_ext_req "msExtReq" -#define NID_ms_ext_req 171 -#define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L - -#define LN_ext_req "Extension Request" -#define SN_ext_req "extReq" -#define NID_ext_req 172 -#define OBJ_ext_req OBJ_pkcs9,14L - -#define SN_name "name" -#define LN_name "name" -#define NID_name 173 -#define OBJ_name OBJ_X509,41L - -#define SN_dnQualifier "dnQualifier" -#define LN_dnQualifier "dnQualifier" -#define NID_dnQualifier 174 -#define OBJ_dnQualifier OBJ_X509,46L - -#define SN_id_pe "id-pe" -#define NID_id_pe 175 -#define OBJ_id_pe OBJ_id_pkix,1L - -#define SN_id_ad "id-ad" -#define NID_id_ad 176 -#define OBJ_id_ad OBJ_id_pkix,48L - -#define SN_info_access "authorityInfoAccess" -#define LN_info_access "Authority Information Access" -#define NID_info_access 177 -#define OBJ_info_access OBJ_id_pe,1L - -#define SN_ad_OCSP "OCSP" -#define LN_ad_OCSP "OCSP" -#define NID_ad_OCSP 178 -#define OBJ_ad_OCSP OBJ_id_ad,1L - -#define SN_ad_ca_issuers "caIssuers" -#define LN_ad_ca_issuers "CA Issuers" -#define NID_ad_ca_issuers 179 -#define OBJ_ad_ca_issuers OBJ_id_ad,2L - -#define SN_OCSP_sign "OCSPSigning" -#define LN_OCSP_sign "OCSP Signing" -#define NID_OCSP_sign 180 -#define OBJ_OCSP_sign OBJ_id_kp,9L -#endif /* USE_OBJ_MAC */ - -#include -#include - -#define OBJ_NAME_TYPE_UNDEF 0x00 -#define OBJ_NAME_TYPE_MD_METH 0x01 -#define OBJ_NAME_TYPE_CIPHER_METH 0x02 -#define OBJ_NAME_TYPE_PKEY_METH 0x03 -#define OBJ_NAME_TYPE_COMP_METH 0x04 -#define OBJ_NAME_TYPE_NUM 0x05 - -#define OBJ_NAME_ALIAS 0x8000 - -#define OBJ_BSEARCH_VALUE_ON_NOMATCH 0x01 -#define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 0x02 - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct obj_name_st - { - int type; - int alias; - const char *name; - const char *data; - } OBJ_NAME; - -#define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) - - -int OBJ_NAME_init(void); -int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), - int (*cmp_func)(const char *, const char *), - void (*free_func)(const char *, int, const char *)); -const char *OBJ_NAME_get(const char *name,int type); -int OBJ_NAME_add(const char *name,int type,const char *data); -int OBJ_NAME_remove(const char *name,int type); -void OBJ_NAME_cleanup(int type); /* -1 for everything */ -void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg), - void *arg); -void OBJ_NAME_do_all_sorted(int type,void (*fn)(const OBJ_NAME *,void *arg), - void *arg); - -ASN1_OBJECT * OBJ_dup(const ASN1_OBJECT *o); -ASN1_OBJECT * OBJ_nid2obj(int n); -const char * OBJ_nid2ln(int n); -const char * OBJ_nid2sn(int n); -int OBJ_obj2nid(const ASN1_OBJECT *o); -ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name); -int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name); -int OBJ_txt2nid(const char *s); -int OBJ_ln2nid(const char *s); -int OBJ_sn2nid(const char *s); -int OBJ_cmp(const ASN1_OBJECT *a,const ASN1_OBJECT *b); -const char * OBJ_bsearch(const char *key,const char *base,int num,int size, - int (*cmp)(const void *, const void *)); -const char * OBJ_bsearch_ex(const char *key,const char *base,int num, - int size, int (*cmp)(const void *, const void *), int flags); - -int OBJ_new_nid(int num); -int OBJ_add_object(const ASN1_OBJECT *obj); -int OBJ_create(const char *oid,const char *sn,const char *ln); -void OBJ_cleanup(void ); -int OBJ_create_objects(BIO *in); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_OBJ_strings(void); - -/* Error codes for the OBJ functions. */ - -/* Function codes. */ -#define OBJ_F_OBJ_ADD_OBJECT 105 -#define OBJ_F_OBJ_CREATE 100 -#define OBJ_F_OBJ_DUP 101 -#define OBJ_F_OBJ_NAME_NEW_INDEX 106 -#define OBJ_F_OBJ_NID2LN 102 -#define OBJ_F_OBJ_NID2OBJ 103 -#define OBJ_F_OBJ_NID2SN 104 - -/* Reason codes. */ -#define OBJ_R_MALLOC_FAILURE 100 -#define OBJ_R_UNKNOWN_NID 101 - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/ocsp.h b/externals/openssl/ocsp.h deleted file mode 100644 index a0577a717e..0000000000 --- a/externals/openssl/ocsp.h +++ /dev/null @@ -1,623 +0,0 @@ -/* ocsp.h */ -/* Written by Tom Titchener for the OpenSSL - * project. */ - -/* History: - This file was transfered to Richard Levitte from CertCo by Kathy - Weinhold in mid-spring 2000 to be included in OpenSSL or released - as a patch kit. */ - -/* ==================================================================== - * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_OCSP_H -#define HEADER_OCSP_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Various flags and values */ - -#define OCSP_DEFAULT_NONCE_LENGTH 16 - -#define OCSP_NOCERTS 0x1 -#define OCSP_NOINTERN 0x2 -#define OCSP_NOSIGS 0x4 -#define OCSP_NOCHAIN 0x8 -#define OCSP_NOVERIFY 0x10 -#define OCSP_NOEXPLICIT 0x20 -#define OCSP_NOCASIGN 0x40 -#define OCSP_NODELEGATED 0x80 -#define OCSP_NOCHECKS 0x100 -#define OCSP_TRUSTOTHER 0x200 -#define OCSP_RESPID_KEY 0x400 -#define OCSP_NOTIME 0x800 - -/* CertID ::= SEQUENCE { - * hashAlgorithm AlgorithmIdentifier, - * issuerNameHash OCTET STRING, -- Hash of Issuer's DN - * issuerKeyHash OCTET STRING, -- Hash of Issuers public key (excluding the tag & length fields) - * serialNumber CertificateSerialNumber } - */ -typedef struct ocsp_cert_id_st - { - X509_ALGOR *hashAlgorithm; - ASN1_OCTET_STRING *issuerNameHash; - ASN1_OCTET_STRING *issuerKeyHash; - ASN1_INTEGER *serialNumber; - } OCSP_CERTID; - -DECLARE_STACK_OF(OCSP_CERTID) - -/* Request ::= SEQUENCE { - * reqCert CertID, - * singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL } - */ -typedef struct ocsp_one_request_st - { - OCSP_CERTID *reqCert; - STACK_OF(X509_EXTENSION) *singleRequestExtensions; - } OCSP_ONEREQ; - -DECLARE_STACK_OF(OCSP_ONEREQ) -DECLARE_ASN1_SET_OF(OCSP_ONEREQ) - - -/* TBSRequest ::= SEQUENCE { - * version [0] EXPLICIT Version DEFAULT v1, - * requestorName [1] EXPLICIT GeneralName OPTIONAL, - * requestList SEQUENCE OF Request, - * requestExtensions [2] EXPLICIT Extensions OPTIONAL } - */ -typedef struct ocsp_req_info_st - { - ASN1_INTEGER *version; - GENERAL_NAME *requestorName; - STACK_OF(OCSP_ONEREQ) *requestList; - STACK_OF(X509_EXTENSION) *requestExtensions; - } OCSP_REQINFO; - -/* Signature ::= SEQUENCE { - * signatureAlgorithm AlgorithmIdentifier, - * signature BIT STRING, - * certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL } - */ -typedef struct ocsp_signature_st - { - X509_ALGOR *signatureAlgorithm; - ASN1_BIT_STRING *signature; - STACK_OF(X509) *certs; - } OCSP_SIGNATURE; - -/* OCSPRequest ::= SEQUENCE { - * tbsRequest TBSRequest, - * optionalSignature [0] EXPLICIT Signature OPTIONAL } - */ -typedef struct ocsp_request_st - { - OCSP_REQINFO *tbsRequest; - OCSP_SIGNATURE *optionalSignature; /* OPTIONAL */ - } OCSP_REQUEST; - -/* OCSPResponseStatus ::= ENUMERATED { - * successful (0), --Response has valid confirmations - * malformedRequest (1), --Illegal confirmation request - * internalError (2), --Internal error in issuer - * tryLater (3), --Try again later - * --(4) is not used - * sigRequired (5), --Must sign the request - * unauthorized (6) --Request unauthorized - * } - */ -#define OCSP_RESPONSE_STATUS_SUCCESSFUL 0 -#define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1 -#define OCSP_RESPONSE_STATUS_INTERNALERROR 2 -#define OCSP_RESPONSE_STATUS_TRYLATER 3 -#define OCSP_RESPONSE_STATUS_SIGREQUIRED 5 -#define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6 - -/* ResponseBytes ::= SEQUENCE { - * responseType OBJECT IDENTIFIER, - * response OCTET STRING } - */ -typedef struct ocsp_resp_bytes_st - { - ASN1_OBJECT *responseType; - ASN1_OCTET_STRING *response; - } OCSP_RESPBYTES; - -/* OCSPResponse ::= SEQUENCE { - * responseStatus OCSPResponseStatus, - * responseBytes [0] EXPLICIT ResponseBytes OPTIONAL } - */ -struct ocsp_response_st - { - ASN1_ENUMERATED *responseStatus; - OCSP_RESPBYTES *responseBytes; - }; - -/* ResponderID ::= CHOICE { - * byName [1] Name, - * byKey [2] KeyHash } - */ -#define V_OCSP_RESPID_NAME 0 -#define V_OCSP_RESPID_KEY 1 -struct ocsp_responder_id_st - { - int type; - union { - X509_NAME* byName; - ASN1_OCTET_STRING *byKey; - } value; - }; - -DECLARE_STACK_OF(OCSP_RESPID) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPID) - -/* KeyHash ::= OCTET STRING --SHA-1 hash of responder's public key - * --(excluding the tag and length fields) - */ - -/* RevokedInfo ::= SEQUENCE { - * revocationTime GeneralizedTime, - * revocationReason [0] EXPLICIT CRLReason OPTIONAL } - */ -typedef struct ocsp_revoked_info_st - { - ASN1_GENERALIZEDTIME *revocationTime; - ASN1_ENUMERATED *revocationReason; - } OCSP_REVOKEDINFO; - -/* CertStatus ::= CHOICE { - * good [0] IMPLICIT NULL, - * revoked [1] IMPLICIT RevokedInfo, - * unknown [2] IMPLICIT UnknownInfo } - */ -#define V_OCSP_CERTSTATUS_GOOD 0 -#define V_OCSP_CERTSTATUS_REVOKED 1 -#define V_OCSP_CERTSTATUS_UNKNOWN 2 -typedef struct ocsp_cert_status_st - { - int type; - union { - ASN1_NULL *good; - OCSP_REVOKEDINFO *revoked; - ASN1_NULL *unknown; - } value; - } OCSP_CERTSTATUS; - -/* SingleResponse ::= SEQUENCE { - * certID CertID, - * certStatus CertStatus, - * thisUpdate GeneralizedTime, - * nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL, - * singleExtensions [1] EXPLICIT Extensions OPTIONAL } - */ -typedef struct ocsp_single_response_st - { - OCSP_CERTID *certId; - OCSP_CERTSTATUS *certStatus; - ASN1_GENERALIZEDTIME *thisUpdate; - ASN1_GENERALIZEDTIME *nextUpdate; - STACK_OF(X509_EXTENSION) *singleExtensions; - } OCSP_SINGLERESP; - -DECLARE_STACK_OF(OCSP_SINGLERESP) -DECLARE_ASN1_SET_OF(OCSP_SINGLERESP) - -/* ResponseData ::= SEQUENCE { - * version [0] EXPLICIT Version DEFAULT v1, - * responderID ResponderID, - * producedAt GeneralizedTime, - * responses SEQUENCE OF SingleResponse, - * responseExtensions [1] EXPLICIT Extensions OPTIONAL } - */ -typedef struct ocsp_response_data_st - { - ASN1_INTEGER *version; - OCSP_RESPID *responderId; - ASN1_GENERALIZEDTIME *producedAt; - STACK_OF(OCSP_SINGLERESP) *responses; - STACK_OF(X509_EXTENSION) *responseExtensions; - } OCSP_RESPDATA; - -/* BasicOCSPResponse ::= SEQUENCE { - * tbsResponseData ResponseData, - * signatureAlgorithm AlgorithmIdentifier, - * signature BIT STRING, - * certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL } - */ - /* Note 1: - The value for "signature" is specified in the OCSP rfc2560 as follows: - "The value for the signature SHALL be computed on the hash of the DER - encoding ResponseData." This means that you must hash the DER-encoded - tbsResponseData, and then run it through a crypto-signing function, which - will (at least w/RSA) do a hash-'n'-private-encrypt operation. This seems - a bit odd, but that's the spec. Also note that the data structures do not - leave anywhere to independently specify the algorithm used for the initial - hash. So, we look at the signature-specification algorithm, and try to do - something intelligent. -- Kathy Weinhold, CertCo */ - /* Note 2: - It seems that the mentioned passage from RFC 2560 (section 4.2.1) is open - for interpretation. I've done tests against another responder, and found - that it doesn't do the double hashing that the RFC seems to say one - should. Therefore, all relevant functions take a flag saying which - variant should be used. -- Richard Levitte, OpenSSL team and CeloCom */ -typedef struct ocsp_basic_response_st - { - OCSP_RESPDATA *tbsResponseData; - X509_ALGOR *signatureAlgorithm; - ASN1_BIT_STRING *signature; - STACK_OF(X509) *certs; - } OCSP_BASICRESP; - -/* - * CRLReason ::= ENUMERATED { - * unspecified (0), - * keyCompromise (1), - * cACompromise (2), - * affiliationChanged (3), - * superseded (4), - * cessationOfOperation (5), - * certificateHold (6), - * removeFromCRL (8) } - */ -#define OCSP_REVOKED_STATUS_NOSTATUS -1 -#define OCSP_REVOKED_STATUS_UNSPECIFIED 0 -#define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1 -#define OCSP_REVOKED_STATUS_CACOMPROMISE 2 -#define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3 -#define OCSP_REVOKED_STATUS_SUPERSEDED 4 -#define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5 -#define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6 -#define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8 - -/* CrlID ::= SEQUENCE { - * crlUrl [0] EXPLICIT IA5String OPTIONAL, - * crlNum [1] EXPLICIT INTEGER OPTIONAL, - * crlTime [2] EXPLICIT GeneralizedTime OPTIONAL } - */ -typedef struct ocsp_crl_id_st - { - ASN1_IA5STRING *crlUrl; - ASN1_INTEGER *crlNum; - ASN1_GENERALIZEDTIME *crlTime; - } OCSP_CRLID; - -/* ServiceLocator ::= SEQUENCE { - * issuer Name, - * locator AuthorityInfoAccessSyntax OPTIONAL } - */ -typedef struct ocsp_service_locator_st - { - X509_NAME* issuer; - STACK_OF(ACCESS_DESCRIPTION) *locator; - } OCSP_SERVICELOC; - -#define PEM_STRING_OCSP_REQUEST "OCSP REQUEST" -#define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE" - -#define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p) - -#define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p) - -#define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,bp,(char **)x,cb,NULL) - -#define PEM_read_bio_OCSP_RESPONSE(bp,x,cb)(OCSP_RESPONSE *)PEM_ASN1_read_bio(\ - (char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,bp,(char **)x,cb,NULL) - -#define PEM_write_bio_OCSP_REQUEST(bp,o) \ - PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\ - bp,(char *)o, NULL,NULL,0,NULL,NULL) - -#define PEM_write_bio_OCSP_RESPONSE(bp,o) \ - PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\ - bp,(char *)o, NULL,NULL,0,NULL,NULL) - -#define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o) - -#define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o) - -#define OCSP_REQUEST_sign(o,pkey,md) \ - ASN1_item_sign(ASN1_ITEM_rptr(OCSP_REQINFO),\ - o->optionalSignature->signatureAlgorithm,NULL,\ - o->optionalSignature->signature,o->tbsRequest,pkey,md) - -#define OCSP_BASICRESP_sign(o,pkey,md,d) \ - ASN1_item_sign(ASN1_ITEM_rptr(OCSP_RESPDATA),o->signatureAlgorithm,NULL,\ - o->signature,o->tbsResponseData,pkey,md) - -#define OCSP_REQUEST_verify(a,r) ASN1_item_verify(ASN1_ITEM_rptr(OCSP_REQINFO),\ - a->optionalSignature->signatureAlgorithm,\ - a->optionalSignature->signature,a->tbsRequest,r) - -#define OCSP_BASICRESP_verify(a,r,d) ASN1_item_verify(ASN1_ITEM_rptr(OCSP_RESPDATA),\ - a->signatureAlgorithm,a->signature,a->tbsResponseData,r) - -#define ASN1_BIT_STRING_digest(data,type,md,len) \ - ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len) - -#define OCSP_CERTID_dup(cid) ASN1_dup_of(OCSP_CERTID,i2d_OCSP_CERTID,d2i_OCSP_CERTID,cid) - -#define OCSP_CERTSTATUS_dup(cs)\ - (OCSP_CERTSTATUS*)ASN1_dup((int(*)())i2d_OCSP_CERTSTATUS,\ - (char *(*)())d2i_OCSP_CERTSTATUS,(char *)(cs)) - -OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req); -OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, - int maxline); -int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx); -void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx); - -OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer); - -OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst, - X509_NAME *issuerName, - ASN1_BIT_STRING* issuerKey, - ASN1_INTEGER *serialNumber); - -OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid); - -int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len); -int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len); -int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs); -int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req); - -int OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm); -int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert); - -int OCSP_request_sign(OCSP_REQUEST *req, - X509 *signer, - EVP_PKEY *key, - const EVP_MD *dgst, - STACK_OF(X509) *certs, - unsigned long flags); - -int OCSP_response_status(OCSP_RESPONSE *resp); -OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp); - -int OCSP_resp_count(OCSP_BASICRESP *bs); -OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx); -int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last); -int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, - ASN1_GENERALIZEDTIME **revtime, - ASN1_GENERALIZEDTIME **thisupd, - ASN1_GENERALIZEDTIME **nextupd); -int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status, - int *reason, - ASN1_GENERALIZEDTIME **revtime, - ASN1_GENERALIZEDTIME **thisupd, - ASN1_GENERALIZEDTIME **nextupd); -int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, - ASN1_GENERALIZEDTIME *nextupd, - long sec, long maxsec); - -int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, X509_STORE *store, unsigned long flags); - -int OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pssl); - -int OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b); -int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b); - -int OCSP_request_onereq_count(OCSP_REQUEST *req); -OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i); -OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one); -int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, - ASN1_OCTET_STRING **pikeyHash, - ASN1_INTEGER **pserial, OCSP_CERTID *cid); -int OCSP_request_is_signed(OCSP_REQUEST *req); -OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs); -OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp, - OCSP_CERTID *cid, - int status, int reason, - ASN1_TIME *revtime, - ASN1_TIME *thisupd, ASN1_TIME *nextupd); -int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert); -int OCSP_basic_sign(OCSP_BASICRESP *brsp, - X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, - STACK_OF(X509) *certs, unsigned long flags); - -ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d, - void *data, STACK_OF(ASN1_OBJECT) *sk); -#define ASN1_STRING_encode_of(type,s,i2d,data,sk) \ - ASN1_STRING_encode(s, CHECKED_I2D_OF(type, i2d), data, sk) - -X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim); - -X509_EXTENSION *OCSP_accept_responses_new(char **oids); - -X509_EXTENSION *OCSP_archive_cutoff_new(char* tim); - -X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME* issuer, char **urls); - -int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x); -int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos); -int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, ASN1_OBJECT *obj, int lastpos); -int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos); -X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc); -X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc); -void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit, int *idx); -int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit, - unsigned long flags); -int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc); - -int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x); -int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos); -int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, ASN1_OBJECT *obj, int lastpos); -int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos); -X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc); -X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc); -void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx); -int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit, - unsigned long flags); -int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc); - -int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x); -int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos); -int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, ASN1_OBJECT *obj, int lastpos); -int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit, int lastpos); -X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc); -X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc); -void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit, int *idx); -int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value, int crit, - unsigned long flags); -int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc); - -int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x); -int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos); -int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, ASN1_OBJECT *obj, int lastpos); -int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit, int lastpos); -X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc); -X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc); -void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit, int *idx); -int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value, int crit, - unsigned long flags); -int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc); - -DECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP) -DECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS) -DECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO) -DECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPID) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES) -DECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ) -DECLARE_ASN1_FUNCTIONS(OCSP_CERTID) -DECLARE_ASN1_FUNCTIONS(OCSP_REQUEST) -DECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE) -DECLARE_ASN1_FUNCTIONS(OCSP_REQINFO) -DECLARE_ASN1_FUNCTIONS(OCSP_CRLID) -DECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC) - -char *OCSP_response_status_str(long s); -char *OCSP_cert_status_str(long s); -char *OCSP_crl_reason_str(long s); - -int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST* a, unsigned long flags); -int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o, unsigned long flags); - -int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, - X509_STORE *st, unsigned long flags); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_OCSP_strings(void); - -/* Error codes for the OCSP functions. */ - -/* Function codes. */ -#define OCSP_F_ASN1_STRING_ENCODE 100 -#define OCSP_F_D2I_OCSP_NONCE 102 -#define OCSP_F_OCSP_BASIC_ADD1_STATUS 103 -#define OCSP_F_OCSP_BASIC_SIGN 104 -#define OCSP_F_OCSP_BASIC_VERIFY 105 -#define OCSP_F_OCSP_CERT_ID_NEW 101 -#define OCSP_F_OCSP_CHECK_DELEGATED 106 -#define OCSP_F_OCSP_CHECK_IDS 107 -#define OCSP_F_OCSP_CHECK_ISSUER 108 -#define OCSP_F_OCSP_CHECK_VALIDITY 115 -#define OCSP_F_OCSP_MATCH_ISSUERID 109 -#define OCSP_F_OCSP_PARSE_URL 114 -#define OCSP_F_OCSP_REQUEST_SIGN 110 -#define OCSP_F_OCSP_REQUEST_VERIFY 116 -#define OCSP_F_OCSP_RESPONSE_GET1_BASIC 111 -#define OCSP_F_OCSP_SENDREQ_BIO 112 -#define OCSP_F_PARSE_HTTP_LINE1 117 -#define OCSP_F_REQUEST_VERIFY 113 - -/* Reason codes. */ -#define OCSP_R_BAD_DATA 100 -#define OCSP_R_CERTIFICATE_VERIFY_ERROR 101 -#define OCSP_R_DIGEST_ERR 102 -#define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD 122 -#define OCSP_R_ERROR_IN_THISUPDATE_FIELD 123 -#define OCSP_R_ERROR_PARSING_URL 121 -#define OCSP_R_MISSING_OCSPSIGNING_USAGE 103 -#define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE 124 -#define OCSP_R_NOT_BASIC_RESPONSE 104 -#define OCSP_R_NO_CERTIFICATES_IN_CHAIN 105 -#define OCSP_R_NO_CONTENT 106 -#define OCSP_R_NO_PUBLIC_KEY 107 -#define OCSP_R_NO_RESPONSE_DATA 108 -#define OCSP_R_NO_REVOKED_TIME 109 -#define OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 110 -#define OCSP_R_REQUEST_NOT_SIGNED 128 -#define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA 111 -#define OCSP_R_ROOT_CA_NOT_TRUSTED 112 -#define OCSP_R_SERVER_READ_ERROR 113 -#define OCSP_R_SERVER_RESPONSE_ERROR 114 -#define OCSP_R_SERVER_RESPONSE_PARSE_ERROR 115 -#define OCSP_R_SERVER_WRITE_ERROR 116 -#define OCSP_R_SIGNATURE_FAILURE 117 -#define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND 118 -#define OCSP_R_STATUS_EXPIRED 125 -#define OCSP_R_STATUS_NOT_YET_VALID 126 -#define OCSP_R_STATUS_TOO_OLD 127 -#define OCSP_R_UNKNOWN_MESSAGE_DIGEST 119 -#define OCSP_R_UNKNOWN_NID 120 -#define OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE 129 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/opensslconf.h b/externals/openssl/opensslconf.h deleted file mode 100644 index 2d571c894c..0000000000 --- a/externals/openssl/opensslconf.h +++ /dev/null @@ -1,259 +0,0 @@ -/* opensslconf.h */ -/* WARNING: Generated automatically from opensslconf.h.in by Configure. */ - -/* OpenSSL was configured with the following options: */ -#ifndef OPENSSL_SYSNAME_WIN32 -# define OPENSSL_SYSNAME_WIN32 -#endif -#ifndef OPENSSL_DOING_MAKEDEPEND - - -#ifndef OPENSSL_NO_CAMELLIA -# define OPENSSL_NO_CAMELLIA -#endif -#ifndef OPENSSL_NO_CAPIENG -# define OPENSSL_NO_CAPIENG -#endif -#ifndef OPENSSL_NO_CMS -# define OPENSSL_NO_CMS -#endif -#ifndef OPENSSL_NO_GMP -# define OPENSSL_NO_GMP -#endif -#ifndef OPENSSL_NO_JPAKE -# define OPENSSL_NO_JPAKE -#endif -#ifndef OPENSSL_NO_KRB5 -# define OPENSSL_NO_KRB5 -#endif -#ifndef OPENSSL_NO_MDC2 -# define OPENSSL_NO_MDC2 -#endif -#ifndef OPENSSL_NO_RC5 -# define OPENSSL_NO_RC5 -#endif -#ifndef OPENSSL_NO_RFC3779 -# define OPENSSL_NO_RFC3779 -#endif -#ifndef OPENSSL_NO_SEED -# define OPENSSL_NO_SEED -#endif - -#endif /* OPENSSL_DOING_MAKEDEPEND */ - -#ifndef OPENSSL_THREADS -# define OPENSSL_THREADS -#endif - -/* The OPENSSL_NO_* macros are also defined as NO_* if the application - asks for it. This is a transient feature that is provided for those - who haven't had the time to do the appropriate changes in their - applications. */ -#ifdef OPENSSL_ALGORITHM_DEFINES -# if defined(OPENSSL_NO_CAMELLIA) && !defined(NO_CAMELLIA) -# define NO_CAMELLIA -# endif -# if defined(OPENSSL_NO_CAPIENG) && !defined(NO_CAPIENG) -# define NO_CAPIENG -# endif -# if defined(OPENSSL_NO_CMS) && !defined(NO_CMS) -# define NO_CMS -# endif -# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) -# define NO_GMP -# endif -# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE) -# define NO_JPAKE -# endif -# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) -# define NO_KRB5 -# endif -# if defined(OPENSSL_NO_MDC2) && !defined(NO_MDC2) -# define NO_MDC2 -# endif -# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5) -# define NO_RC5 -# endif -# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779) -# define NO_RFC3779 -# endif -# if defined(OPENSSL_NO_SEED) && !defined(NO_SEED) -# define NO_SEED -# endif -#endif - -/* crypto/opensslconf.h.in */ - -#ifdef OPENSSL_DOING_MAKEDEPEND - -/* Include any symbols here that have to be explicitly set to enable a feature - * that should be visible to makedepend. - * - * [Our "make depend" doesn't actually look at this, we use actual build settings - * instead; we want to make it easy to remove subdirectories with disabled algorithms.] - */ - -#ifndef OPENSSL_FIPS -#define OPENSSL_FIPS -#endif - -#endif - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "g:/openssl/lib/engines" -#define OPENSSLDIR "g:/openssl/ssl" -#endif -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION -#define OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned long -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#undef DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/externals/openssl/opensslv.h b/externals/openssl/opensslv.h deleted file mode 100644 index c6207f76b2..0000000000 --- a/externals/openssl/opensslv.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef HEADER_OPENSSLV_H -#define HEADER_OPENSSLV_H - -/* Numeric release version identifier: - * MNNFFPPS: major minor fix patch status - * The status nibble has one of the values 0 for development, 1 to e for betas - * 1 to 14, and f for release. The patch level is exactly that. - * For example: - * 0.9.3-dev 0x00903000 - * 0.9.3-beta1 0x00903001 - * 0.9.3-beta2-dev 0x00903002 - * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) - * 0.9.3 0x0090300f - * 0.9.3a 0x0090301f - * 0.9.4 0x0090400f - * 1.2.3z 0x102031af - * - * For continuity reasons (because 0.9.5 is already out, and is coded - * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level - * part is slightly different, by setting the highest bit. This means - * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start - * with 0x0090600S... - * - * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) - * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for - * major minor fix final patch/beta) - */ -#define OPENSSL_VERSION_NUMBER 0x009080bfL -#ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8k-fips 25 Mar 2009" -#else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8k 25 Mar 2009" -#endif -#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT - - -/* The macros below are to be used for shared library (.so, .dll, ...) - * versioning. That kind of versioning works a bit differently between - * operating systems. The most usual scheme is to set a major and a minor - * number, and have the runtime loader check that the major number is equal - * to what it was at application link time, while the minor number has to - * be greater or equal to what it was at application link time. With this - * scheme, the version number is usually part of the file name, like this: - * - * libcrypto.so.0.9 - * - * Some unixen also make a softlink with the major verson number only: - * - * libcrypto.so.0 - * - * On Tru64 and IRIX 6.x it works a little bit differently. There, the - * shared library version is stored in the file, and is actually a series - * of versions, separated by colons. The rightmost version present in the - * library when linking an application is stored in the application to be - * matched at run time. When the application is run, a check is done to - * see if the library version stored in the application matches any of the - * versions in the version string of the library itself. - * This version string can be constructed in any way, depending on what - * kind of matching is desired. However, to implement the same scheme as - * the one used in the other unixen, all compatible versions, from lowest - * to highest, should be part of the string. Consecutive builds would - * give the following versions strings: - * - * 3.0 - * 3.0:3.1 - * 3.0:3.1:3.2 - * 4.0 - * 4.0:4.1 - * - * Notice how version 4 is completely incompatible with version, and - * therefore give the breach you can see. - * - * There may be other schemes as well that I haven't yet discovered. - * - * So, here's the way it works here: first of all, the library version - * number doesn't need at all to match the overall OpenSSL version. - * However, it's nice and more understandable if it actually does. - * The current library version is stored in the macro SHLIB_VERSION_NUMBER, - * which is just a piece of text in the format "M.m.e" (Major, minor, edit). - * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, - * we need to keep a history of version numbers, which is done in the - * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and - * should only keep the versions that are binary compatible with the current. - */ -#define SHLIB_VERSION_HISTORY "" -#define SHLIB_VERSION_NUMBER "0.9.8" - - -#endif /* HEADER_OPENSSLV_H */ diff --git a/externals/openssl/ossl_typ.h b/externals/openssl/ossl_typ.h deleted file mode 100644 index 0e7a380880..0000000000 --- a/externals/openssl/ossl_typ.h +++ /dev/null @@ -1,183 +0,0 @@ -/* ==================================================================== - * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_OPENSSL_TYPES_H -#define HEADER_OPENSSL_TYPES_H - -#include - -#ifdef NO_ASN1_TYPEDEFS -#define ASN1_INTEGER ASN1_STRING -#define ASN1_ENUMERATED ASN1_STRING -#define ASN1_BIT_STRING ASN1_STRING -#define ASN1_OCTET_STRING ASN1_STRING -#define ASN1_PRINTABLESTRING ASN1_STRING -#define ASN1_T61STRING ASN1_STRING -#define ASN1_IA5STRING ASN1_STRING -#define ASN1_UTCTIME ASN1_STRING -#define ASN1_GENERALIZEDTIME ASN1_STRING -#define ASN1_TIME ASN1_STRING -#define ASN1_GENERALSTRING ASN1_STRING -#define ASN1_UNIVERSALSTRING ASN1_STRING -#define ASN1_BMPSTRING ASN1_STRING -#define ASN1_VISIBLESTRING ASN1_STRING -#define ASN1_UTF8STRING ASN1_STRING -#define ASN1_BOOLEAN int -#define ASN1_NULL int -#else -typedef struct asn1_string_st ASN1_INTEGER; -typedef struct asn1_string_st ASN1_ENUMERATED; -typedef struct asn1_string_st ASN1_BIT_STRING; -typedef struct asn1_string_st ASN1_OCTET_STRING; -typedef struct asn1_string_st ASN1_PRINTABLESTRING; -typedef struct asn1_string_st ASN1_T61STRING; -typedef struct asn1_string_st ASN1_IA5STRING; -typedef struct asn1_string_st ASN1_GENERALSTRING; -typedef struct asn1_string_st ASN1_UNIVERSALSTRING; -typedef struct asn1_string_st ASN1_BMPSTRING; -typedef struct asn1_string_st ASN1_UTCTIME; -typedef struct asn1_string_st ASN1_TIME; -typedef struct asn1_string_st ASN1_GENERALIZEDTIME; -typedef struct asn1_string_st ASN1_VISIBLESTRING; -typedef struct asn1_string_st ASN1_UTF8STRING; -typedef int ASN1_BOOLEAN; -typedef int ASN1_NULL; -#endif - -#ifdef OPENSSL_SYS_WIN32 -#undef X509_NAME -#undef X509_EXTENSIONS -#undef X509_CERT_PAIR -#undef PKCS7_ISSUER_AND_SERIAL -#undef OCSP_REQUEST -#undef OCSP_RESPONSE -#endif - -#ifdef BIGNUM -#undef BIGNUM -#endif -typedef struct bignum_st BIGNUM; -typedef struct bignum_ctx BN_CTX; -typedef struct bn_blinding_st BN_BLINDING; -typedef struct bn_mont_ctx_st BN_MONT_CTX; -typedef struct bn_recp_ctx_st BN_RECP_CTX; -typedef struct bn_gencb_st BN_GENCB; - -typedef struct buf_mem_st BUF_MEM; - -typedef struct evp_cipher_st EVP_CIPHER; -typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; -typedef struct env_md_st EVP_MD; -typedef struct env_md_ctx_st EVP_MD_CTX; -typedef struct evp_pkey_st EVP_PKEY; - -typedef struct dh_st DH; -typedef struct dh_method DH_METHOD; - -typedef struct dsa_st DSA; -typedef struct dsa_method DSA_METHOD; - -typedef struct rsa_st RSA; -typedef struct rsa_meth_st RSA_METHOD; - -typedef struct rand_meth_st RAND_METHOD; - -typedef struct ecdh_method ECDH_METHOD; -typedef struct ecdsa_method ECDSA_METHOD; - -typedef struct x509_st X509; -typedef struct X509_algor_st X509_ALGOR; -typedef struct X509_crl_st X509_CRL; -typedef struct X509_name_st X509_NAME; -typedef struct x509_store_st X509_STORE; -typedef struct x509_store_ctx_st X509_STORE_CTX; -typedef struct ssl_st SSL; -typedef struct ssl_ctx_st SSL_CTX; - -typedef struct v3_ext_ctx X509V3_CTX; -typedef struct conf_st CONF; - -typedef struct store_st STORE; -typedef struct store_method_st STORE_METHOD; - -typedef struct ui_st UI; -typedef struct ui_method_st UI_METHOD; - -typedef struct st_ERR_FNS ERR_FNS; - -typedef struct engine_st ENGINE; - -typedef struct X509_POLICY_NODE_st X509_POLICY_NODE; -typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL; -typedef struct X509_POLICY_TREE_st X509_POLICY_TREE; -typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE; - - /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */ -#define DECLARE_PKCS12_STACK_OF(type) /* Nothing */ -#define IMPLEMENT_PKCS12_STACK_OF(type) /* Nothing */ - -typedef struct crypto_ex_data_st CRYPTO_EX_DATA; -/* Callback types for crypto.h */ -typedef int CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int idx, long argl, void *argp); -typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int idx, long argl, void *argp); -typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, - int idx, long argl, void *argp); - -typedef struct ocsp_req_ctx_st OCSP_REQ_CTX; -typedef struct ocsp_response_st OCSP_RESPONSE; -typedef struct ocsp_responder_id_st OCSP_RESPID; - -#endif /* def HEADER_OPENSSL_TYPES_H */ diff --git a/externals/openssl/pem.h b/externals/openssl/pem.h deleted file mode 100644 index 6c193f1cbf..0000000000 --- a/externals/openssl/pem.h +++ /dev/null @@ -1,782 +0,0 @@ -/* crypto/pem/pem.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_PEM_H -#define HEADER_PEM_H - -#include -#ifndef OPENSSL_NO_BIO -#include -#endif -#ifndef OPENSSL_NO_STACK -#include -#endif -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define PEM_BUFSIZE 1024 - -#define PEM_OBJ_UNDEF 0 -#define PEM_OBJ_X509 1 -#define PEM_OBJ_X509_REQ 2 -#define PEM_OBJ_CRL 3 -#define PEM_OBJ_SSL_SESSION 4 -#define PEM_OBJ_PRIV_KEY 10 -#define PEM_OBJ_PRIV_RSA 11 -#define PEM_OBJ_PRIV_DSA 12 -#define PEM_OBJ_PRIV_DH 13 -#define PEM_OBJ_PUB_RSA 14 -#define PEM_OBJ_PUB_DSA 15 -#define PEM_OBJ_PUB_DH 16 -#define PEM_OBJ_DHPARAMS 17 -#define PEM_OBJ_DSAPARAMS 18 -#define PEM_OBJ_PRIV_RSA_PUBLIC 19 -#define PEM_OBJ_PRIV_ECDSA 20 -#define PEM_OBJ_PUB_ECDSA 21 -#define PEM_OBJ_ECPARAMETERS 22 - -#define PEM_ERROR 30 -#define PEM_DEK_DES_CBC 40 -#define PEM_DEK_IDEA_CBC 45 -#define PEM_DEK_DES_EDE 50 -#define PEM_DEK_DES_ECB 60 -#define PEM_DEK_RSA 70 -#define PEM_DEK_RSA_MD2 80 -#define PEM_DEK_RSA_MD5 90 - -#define PEM_MD_MD2 NID_md2 -#define PEM_MD_MD5 NID_md5 -#define PEM_MD_SHA NID_sha -#define PEM_MD_MD2_RSA NID_md2WithRSAEncryption -#define PEM_MD_MD5_RSA NID_md5WithRSAEncryption -#define PEM_MD_SHA_RSA NID_sha1WithRSAEncryption - -#define PEM_STRING_X509_OLD "X509 CERTIFICATE" -#define PEM_STRING_X509 "CERTIFICATE" -#define PEM_STRING_X509_PAIR "CERTIFICATE PAIR" -#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE" -#define PEM_STRING_X509_REQ_OLD "NEW CERTIFICATE REQUEST" -#define PEM_STRING_X509_REQ "CERTIFICATE REQUEST" -#define PEM_STRING_X509_CRL "X509 CRL" -#define PEM_STRING_EVP_PKEY "ANY PRIVATE KEY" -#define PEM_STRING_PUBLIC "PUBLIC KEY" -#define PEM_STRING_RSA "RSA PRIVATE KEY" -#define PEM_STRING_RSA_PUBLIC "RSA PUBLIC KEY" -#define PEM_STRING_DSA "DSA PRIVATE KEY" -#define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY" -#define PEM_STRING_PKCS7 "PKCS7" -#define PEM_STRING_PKCS7_SIGNED "PKCS #7 SIGNED DATA" -#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY" -#define PEM_STRING_PKCS8INF "PRIVATE KEY" -#define PEM_STRING_DHPARAMS "DH PARAMETERS" -#define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS" -#define PEM_STRING_DSAPARAMS "DSA PARAMETERS" -#define PEM_STRING_ECDSA_PUBLIC "ECDSA PUBLIC KEY" -#define PEM_STRING_ECPARAMETERS "EC PARAMETERS" -#define PEM_STRING_ECPRIVATEKEY "EC PRIVATE KEY" -#define PEM_STRING_CMS "CMS" - - /* Note that this structure is initialised by PEM_SealInit and cleaned up - by PEM_SealFinal (at least for now) */ -typedef struct PEM_Encode_Seal_st - { - EVP_ENCODE_CTX encode; - EVP_MD_CTX md; - EVP_CIPHER_CTX cipher; - } PEM_ENCODE_SEAL_CTX; - -/* enc_type is one off */ -#define PEM_TYPE_ENCRYPTED 10 -#define PEM_TYPE_MIC_ONLY 20 -#define PEM_TYPE_MIC_CLEAR 30 -#define PEM_TYPE_CLEAR 40 - -typedef struct pem_recip_st - { - char *name; - X509_NAME *dn; - - int cipher; - int key_enc; - /* char iv[8]; unused and wrong size */ - } PEM_USER; - -typedef struct pem_ctx_st - { - int type; /* what type of object */ - - struct { - int version; - int mode; - } proc_type; - - char *domain; - - struct { - int cipher; - /* unused, and wrong size - unsigned char iv[8]; */ - } DEK_info; - - PEM_USER *originator; - - int num_recipient; - PEM_USER **recipient; - -#ifndef OPENSSL_NO_STACK - STACK *x509_chain; /* certificate chain */ -#else - char *x509_chain; /* certificate chain */ -#endif - EVP_MD *md; /* signature type */ - - int md_enc; /* is the md encrypted or not? */ - int md_len; /* length of md_data */ - char *md_data; /* message digest, could be pkey encrypted */ - - EVP_CIPHER *dec; /* date encryption cipher */ - int key_len; /* key length */ - unsigned char *key; /* key */ - /* unused, and wrong size - unsigned char iv[8]; */ - - - int data_enc; /* is the data encrypted */ - int data_len; - unsigned char *data; - } PEM_CTX; - -/* These macros make the PEM_read/PEM_write functions easier to maintain and - * write. Now they are all implemented with either: - * IMPLEMENT_PEM_rw(...) or IMPLEMENT_PEM_rw_cb(...) - */ - -#ifdef OPENSSL_NO_FP_API - -#define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/ -#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/ -#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/ -#define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/ -#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/ - -#else - -#define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ -type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ -{ \ - return (type*)PEM_ASN1_read(CHECKED_D2I_OF(type, d2i_##asn1), \ - str, fp, \ - CHECKED_PPTR_OF(type, x), \ - cb, u); \ -} - -#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ -int PEM_write_##name(FILE *fp, type *x) \ -{ \ - return PEM_ASN1_write(CHECKED_I2D_OF(type, i2d_##asn1), \ - str, fp, \ - CHECKED_PTR_OF(type, x), \ - NULL, NULL, 0, NULL, NULL); \ -} - -#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ -int PEM_write_##name(FILE *fp, const type *x) \ -{ \ - return PEM_ASN1_write(CHECKED_I2D_OF(const type, i2d_##asn1), \ - str, fp, \ - CHECKED_PTR_OF(const type, x), \ - NULL, NULL, 0, NULL, NULL); \ -} - -#define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ -int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, \ - void *u) \ - { \ - return PEM_ASN1_write(CHECKED_I2D_OF(type, i2d_##asn1), \ - str, fp, \ - CHECKED_PTR_OF(type, x), \ - enc, kstr, klen, cb, u); \ - } - -#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ -int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, \ - void *u) \ - { \ - return PEM_ASN1_write(CHECKED_I2D_OF(const type, i2d_##asn1), \ - str, fp, \ - CHECKED_PTR_OF(const type, x), \ - enc, kstr, klen, cb, u); \ - } - -#endif - -#define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ -type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ -{ \ - return (type*)PEM_ASN1_read_bio(CHECKED_D2I_OF(type, d2i_##asn1), \ - str, bp, \ - CHECKED_PPTR_OF(type, x), \ - cb, u); \ -} - -#define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ -int PEM_write_bio_##name(BIO *bp, type *x) \ -{ \ - return PEM_ASN1_write_bio(CHECKED_I2D_OF(type, i2d_##asn1), \ - str, bp, \ - CHECKED_PTR_OF(type, x), \ - NULL, NULL, 0, NULL, NULL); \ -} - -#define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ -int PEM_write_bio_##name(BIO *bp, const type *x) \ -{ \ - return PEM_ASN1_write_bio(CHECKED_I2D_OF(const type, i2d_##asn1), \ - str, bp, \ - CHECKED_PTR_OF(const type, x), \ - NULL, NULL, 0, NULL, NULL); \ -} - -#define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ -int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ - { \ - return PEM_ASN1_write_bio(CHECKED_I2D_OF(type, i2d_##asn1), \ - str, bp, \ - CHECKED_PTR_OF(type, x), \ - enc, kstr, klen, cb, u); \ - } - -#define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ -int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ - { \ - return PEM_ASN1_write_bio(CHECKED_I2D_OF(const type, i2d_##asn1), \ - str, bp, \ - CHECKED_PTR_OF(const type, x), \ - enc, kstr, klen, cb, u); \ - } - -#define IMPLEMENT_PEM_write(name, type, str, asn1) \ - IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ - IMPLEMENT_PEM_write_fp(name, type, str, asn1) - -#define IMPLEMENT_PEM_write_const(name, type, str, asn1) \ - IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ - IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) - -#define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) - -#define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) - -#define IMPLEMENT_PEM_read(name, type, str, asn1) \ - IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ - IMPLEMENT_PEM_read_fp(name, type, str, asn1) - -#define IMPLEMENT_PEM_rw(name, type, str, asn1) \ - IMPLEMENT_PEM_read(name, type, str, asn1) \ - IMPLEMENT_PEM_write(name, type, str, asn1) - -#define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \ - IMPLEMENT_PEM_read(name, type, str, asn1) \ - IMPLEMENT_PEM_write_const(name, type, str, asn1) - -#define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \ - IMPLEMENT_PEM_read(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb(name, type, str, asn1) - -/* These are the same except they are for the declarations */ - -#if defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_NO_FP_API) - -#define DECLARE_PEM_read_fp(name, type) /**/ -#define DECLARE_PEM_write_fp(name, type) /**/ -#define DECLARE_PEM_write_fp_const(name, type) /**/ -#define DECLARE_PEM_write_cb_fp(name, type) /**/ - -#else - -#define DECLARE_PEM_read_fp(name, type) \ - type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u); - -#define DECLARE_PEM_write_fp(name, type) \ - int PEM_write_##name(FILE *fp, type *x); - -#define DECLARE_PEM_write_fp_const(name, type) \ - int PEM_write_##name(FILE *fp, const type *x); - -#define DECLARE_PEM_write_cb_fp(name, type) \ - int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, void *u); - -#endif - -#ifndef OPENSSL_NO_BIO -#define DECLARE_PEM_read_bio(name, type) \ - type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u); - -#define DECLARE_PEM_write_bio(name, type) \ - int PEM_write_bio_##name(BIO *bp, type *x); - -#define DECLARE_PEM_write_bio_const(name, type) \ - int PEM_write_bio_##name(BIO *bp, const type *x); - -#define DECLARE_PEM_write_cb_bio(name, type) \ - int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, void *u); - -#else - -#define DECLARE_PEM_read_bio(name, type) /**/ -#define DECLARE_PEM_write_bio(name, type) /**/ -#define DECLARE_PEM_write_bio_const(name, type) /**/ -#define DECLARE_PEM_write_cb_bio(name, type) /**/ - -#endif - -#define DECLARE_PEM_write(name, type) \ - DECLARE_PEM_write_bio(name, type) \ - DECLARE_PEM_write_fp(name, type) - -#define DECLARE_PEM_write_const(name, type) \ - DECLARE_PEM_write_bio_const(name, type) \ - DECLARE_PEM_write_fp_const(name, type) - -#define DECLARE_PEM_write_cb(name, type) \ - DECLARE_PEM_write_cb_bio(name, type) \ - DECLARE_PEM_write_cb_fp(name, type) - -#define DECLARE_PEM_read(name, type) \ - DECLARE_PEM_read_bio(name, type) \ - DECLARE_PEM_read_fp(name, type) - -#define DECLARE_PEM_rw(name, type) \ - DECLARE_PEM_read(name, type) \ - DECLARE_PEM_write(name, type) - -#define DECLARE_PEM_rw_const(name, type) \ - DECLARE_PEM_read(name, type) \ - DECLARE_PEM_write_const(name, type) - -#define DECLARE_PEM_rw_cb(name, type) \ - DECLARE_PEM_read(name, type) \ - DECLARE_PEM_write_cb(name, type) - -#ifdef SSLEAY_MACROS - -#define PEM_write_SSL_SESSION(fp,x) \ - PEM_ASN1_write((int (*)())i2d_SSL_SESSION, \ - PEM_STRING_SSL_SESSION,fp, (char *)x, NULL,NULL,0,NULL,NULL) -#define PEM_write_X509(fp,x) \ - PEM_ASN1_write((int (*)())i2d_X509,PEM_STRING_X509,fp, \ - (char *)x, NULL,NULL,0,NULL,NULL) -#define PEM_write_X509_REQ(fp,x) PEM_ASN1_write( \ - (int (*)())i2d_X509_REQ,PEM_STRING_X509_REQ,fp,(char *)x, \ - NULL,NULL,0,NULL,NULL) -#define PEM_write_X509_CRL(fp,x) \ - PEM_ASN1_write((int (*)())i2d_X509_CRL,PEM_STRING_X509_CRL, \ - fp,(char *)x, NULL,NULL,0,NULL,NULL) -#define PEM_write_RSAPrivateKey(fp,x,enc,kstr,klen,cb,u) \ - PEM_ASN1_write((int (*)())i2d_RSAPrivateKey,PEM_STRING_RSA,fp,\ - (char *)x,enc,kstr,klen,cb,u) -#define PEM_write_RSAPublicKey(fp,x) \ - PEM_ASN1_write((int (*)())i2d_RSAPublicKey,\ - PEM_STRING_RSA_PUBLIC,fp,(char *)x,NULL,NULL,0,NULL,NULL) -#define PEM_write_DSAPrivateKey(fp,x,enc,kstr,klen,cb,u) \ - PEM_ASN1_write((int (*)())i2d_DSAPrivateKey,PEM_STRING_DSA,fp,\ - (char *)x,enc,kstr,klen,cb,u) -#define PEM_write_PrivateKey(bp,x,enc,kstr,klen,cb,u) \ - PEM_ASN1_write((int (*)())i2d_PrivateKey,\ - (((x)->type == EVP_PKEY_DSA)?PEM_STRING_DSA:PEM_STRING_RSA),\ - bp,(char *)x,enc,kstr,klen,cb,u) -#define PEM_write_PKCS7(fp,x) \ - PEM_ASN1_write((int (*)())i2d_PKCS7,PEM_STRING_PKCS7,fp, \ - (char *)x, NULL,NULL,0,NULL,NULL) -#define PEM_write_DHparams(fp,x) \ - PEM_ASN1_write((int (*)())i2d_DHparams,PEM_STRING_DHPARAMS,fp,\ - (char *)x,NULL,NULL,0,NULL,NULL) - -#define PEM_write_NETSCAPE_CERT_SEQUENCE(fp,x) \ - PEM_ASN1_write((int (*)())i2d_NETSCAPE_CERT_SEQUENCE, \ - PEM_STRING_X509,fp, \ - (char *)x, NULL,NULL,0,NULL,NULL) - -#define PEM_read_SSL_SESSION(fp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read( \ - (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,fp,(char **)x,cb,u) -#define PEM_read_X509(fp,x,cb,u) (X509 *)PEM_ASN1_read( \ - (char *(*)())d2i_X509,PEM_STRING_X509,fp,(char **)x,cb,u) -#define PEM_read_X509_REQ(fp,x,cb,u) (X509_REQ *)PEM_ASN1_read( \ - (char *(*)())d2i_X509_REQ,PEM_STRING_X509_REQ,fp,(char **)x,cb,u) -#define PEM_read_X509_CRL(fp,x,cb,u) (X509_CRL *)PEM_ASN1_read( \ - (char *(*)())d2i_X509_CRL,PEM_STRING_X509_CRL,fp,(char **)x,cb,u) -#define PEM_read_RSAPrivateKey(fp,x,cb,u) (RSA *)PEM_ASN1_read( \ - (char *(*)())d2i_RSAPrivateKey,PEM_STRING_RSA,fp,(char **)x,cb,u) -#define PEM_read_RSAPublicKey(fp,x,cb,u) (RSA *)PEM_ASN1_read( \ - (char *(*)())d2i_RSAPublicKey,PEM_STRING_RSA_PUBLIC,fp,(char **)x,cb,u) -#define PEM_read_DSAPrivateKey(fp,x,cb,u) (DSA *)PEM_ASN1_read( \ - (char *(*)())d2i_DSAPrivateKey,PEM_STRING_DSA,fp,(char **)x,cb,u) -#define PEM_read_PrivateKey(fp,x,cb,u) (EVP_PKEY *)PEM_ASN1_read( \ - (char *(*)())d2i_PrivateKey,PEM_STRING_EVP_PKEY,fp,(char **)x,cb,u) -#define PEM_read_PKCS7(fp,x,cb,u) (PKCS7 *)PEM_ASN1_read( \ - (char *(*)())d2i_PKCS7,PEM_STRING_PKCS7,fp,(char **)x,cb,u) -#define PEM_read_DHparams(fp,x,cb,u) (DH *)PEM_ASN1_read( \ - (char *(*)())d2i_DHparams,PEM_STRING_DHPARAMS,fp,(char **)x,cb,u) - -#define PEM_read_NETSCAPE_CERT_SEQUENCE(fp,x,cb,u) \ - (NETSCAPE_CERT_SEQUENCE *)PEM_ASN1_read( \ - (char *(*)())d2i_NETSCAPE_CERT_SEQUENCE,PEM_STRING_X509,fp,\ - (char **)x,cb,u) - -#define PEM_write_bio_X509(bp,x) \ - PEM_ASN1_write_bio((int (*)())i2d_X509,PEM_STRING_X509,bp, \ - (char *)x, NULL,NULL,0,NULL,NULL) -#define PEM_write_bio_X509_REQ(bp,x) PEM_ASN1_write_bio( \ - (int (*)())i2d_X509_REQ,PEM_STRING_X509_REQ,bp,(char *)x, \ - NULL,NULL,0,NULL,NULL) -#define PEM_write_bio_X509_CRL(bp,x) \ - PEM_ASN1_write_bio((int (*)())i2d_X509_CRL,PEM_STRING_X509_CRL,\ - bp,(char *)x, NULL,NULL,0,NULL,NULL) -#define PEM_write_bio_RSAPrivateKey(bp,x,enc,kstr,klen,cb,u) \ - PEM_ASN1_write_bio((int (*)())i2d_RSAPrivateKey,PEM_STRING_RSA,\ - bp,(char *)x,enc,kstr,klen,cb,u) -#define PEM_write_bio_RSAPublicKey(bp,x) \ - PEM_ASN1_write_bio((int (*)())i2d_RSAPublicKey, \ - PEM_STRING_RSA_PUBLIC,\ - bp,(char *)x,NULL,NULL,0,NULL,NULL) -#define PEM_write_bio_DSAPrivateKey(bp,x,enc,kstr,klen,cb,u) \ - PEM_ASN1_write_bio((int (*)())i2d_DSAPrivateKey,PEM_STRING_DSA,\ - bp,(char *)x,enc,kstr,klen,cb,u) -#define PEM_write_bio_PrivateKey(bp,x,enc,kstr,klen,cb,u) \ - PEM_ASN1_write_bio((int (*)())i2d_PrivateKey,\ - (((x)->type == EVP_PKEY_DSA)?PEM_STRING_DSA:PEM_STRING_RSA),\ - bp,(char *)x,enc,kstr,klen,cb,u) -#define PEM_write_bio_PKCS7(bp,x) \ - PEM_ASN1_write_bio((int (*)())i2d_PKCS7,PEM_STRING_PKCS7,bp, \ - (char *)x, NULL,NULL,0,NULL,NULL) -#define PEM_write_bio_DHparams(bp,x) \ - PEM_ASN1_write_bio((int (*)())i2d_DHparams,PEM_STRING_DHPARAMS,\ - bp,(char *)x,NULL,NULL,0,NULL,NULL) -#define PEM_write_bio_DSAparams(bp,x) \ - PEM_ASN1_write_bio((int (*)())i2d_DSAparams, \ - PEM_STRING_DSAPARAMS,bp,(char *)x,NULL,NULL,0,NULL,NULL) - -#define PEM_write_bio_NETSCAPE_CERT_SEQUENCE(bp,x) \ - PEM_ASN1_write_bio((int (*)())i2d_NETSCAPE_CERT_SEQUENCE, \ - PEM_STRING_X509,bp, \ - (char *)x, NULL,NULL,0,NULL,NULL) - -#define PEM_read_bio_X509(bp,x,cb,u) (X509 *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_X509,PEM_STRING_X509,bp,(char **)x,cb,u) -#define PEM_read_bio_X509_REQ(bp,x,cb,u) (X509_REQ *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_X509_REQ,PEM_STRING_X509_REQ,bp,(char **)x,cb,u) -#define PEM_read_bio_X509_CRL(bp,x,cb,u) (X509_CRL *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_X509_CRL,PEM_STRING_X509_CRL,bp,(char **)x,cb,u) -#define PEM_read_bio_RSAPrivateKey(bp,x,cb,u) (RSA *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_RSAPrivateKey,PEM_STRING_RSA,bp,(char **)x,cb,u) -#define PEM_read_bio_RSAPublicKey(bp,x,cb,u) (RSA *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_RSAPublicKey,PEM_STRING_RSA_PUBLIC,bp,(char **)x,cb,u) -#define PEM_read_bio_DSAPrivateKey(bp,x,cb,u) (DSA *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_DSAPrivateKey,PEM_STRING_DSA,bp,(char **)x,cb,u) -#define PEM_read_bio_PrivateKey(bp,x,cb,u) (EVP_PKEY *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_PrivateKey,PEM_STRING_EVP_PKEY,bp,(char **)x,cb,u) - -#define PEM_read_bio_PKCS7(bp,x,cb,u) (PKCS7 *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_PKCS7,PEM_STRING_PKCS7,bp,(char **)x,cb,u) -#define PEM_read_bio_DHparams(bp,x,cb,u) (DH *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_DHparams,PEM_STRING_DHPARAMS,bp,(char **)x,cb,u) -#define PEM_read_bio_DSAparams(bp,x,cb,u) (DSA *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_DSAparams,PEM_STRING_DSAPARAMS,bp,(char **)x,cb,u) - -#define PEM_read_bio_NETSCAPE_CERT_SEQUENCE(bp,x,cb,u) \ - (NETSCAPE_CERT_SEQUENCE *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_NETSCAPE_CERT_SEQUENCE,PEM_STRING_X509,bp,\ - (char **)x,cb,u) - -#endif - -#if 1 -/* "userdata": new with OpenSSL 0.9.4 */ -typedef int pem_password_cb(char *buf, int size, int rwflag, void *userdata); -#else -/* OpenSSL 0.9.3, 0.9.3a */ -typedef int pem_password_cb(char *buf, int size, int rwflag); -#endif - -int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); -int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len, - pem_password_cb *callback,void *u); - -#ifndef OPENSSL_NO_BIO -int PEM_read_bio(BIO *bp, char **name, char **header, - unsigned char **data,long *len); -int PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data, - long len); -int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp, - pem_password_cb *cb, void *u); -void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, - void **x, pem_password_cb *cb, void *u); - -#define PEM_ASN1_read_bio_of(type,d2i,name,bp,x,cb,u) \ - ((type*)PEM_ASN1_read_bio(CHECKED_D2I_OF(type, d2i), \ - name, bp, \ - CHECKED_PPTR_OF(type, x), \ - cb, u)) - -int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp,char *x, - const EVP_CIPHER *enc,unsigned char *kstr,int klen, - pem_password_cb *cb, void *u); - -#define PEM_ASN1_write_bio_of(type,i2d,name,bp,x,enc,kstr,klen,cb,u) \ - (PEM_ASN1_write_bio(CHECKED_I2D_OF(type, i2d), \ - name, bp, \ - CHECKED_PTR_OF(type, x), \ - enc, kstr, klen, cb, u)) - -STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); -int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc, - unsigned char *kstr, int klen, pem_password_cb *cd, void *u); -#endif - -#ifndef OPENSSL_SYS_WIN16 -int PEM_read(FILE *fp, char **name, char **header, - unsigned char **data,long *len); -int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len); -void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, - pem_password_cb *cb, void *u); -int PEM_ASN1_write(i2d_of_void *i2d,const char *name,FILE *fp, - char *x,const EVP_CIPHER *enc,unsigned char *kstr, - int klen,pem_password_cb *callback, void *u); -STACK_OF(X509_INFO) * PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, - pem_password_cb *cb, void *u); -#endif - -int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, - EVP_MD *md_type, unsigned char **ek, int *ekl, - unsigned char *iv, EVP_PKEY **pubk, int npubk); -void PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl, - unsigned char *in, int inl); -int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig,int *sigl, - unsigned char *out, int *outl, EVP_PKEY *priv); - -void PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); -void PEM_SignUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt); -int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, - unsigned int *siglen, EVP_PKEY *pkey); - -int PEM_def_callback(char *buf, int num, int w, void *key); -void PEM_proc_type(char *buf, int type); -void PEM_dek_info(char *buf, const char *type, int len, char *str); - -#ifndef SSLEAY_MACROS - -#include - -DECLARE_PEM_rw(X509, X509) - -DECLARE_PEM_rw(X509_AUX, X509) - -DECLARE_PEM_rw(X509_CERT_PAIR, X509_CERT_PAIR) - -DECLARE_PEM_rw(X509_REQ, X509_REQ) -DECLARE_PEM_write(X509_REQ_NEW, X509_REQ) - -DECLARE_PEM_rw(X509_CRL, X509_CRL) - -DECLARE_PEM_rw(PKCS7, PKCS7) - -DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE) - -DECLARE_PEM_rw(PKCS8, X509_SIG) - -DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO) - -#ifndef OPENSSL_NO_RSA - -DECLARE_PEM_rw_cb(RSAPrivateKey, RSA) - -DECLARE_PEM_rw_const(RSAPublicKey, RSA) -DECLARE_PEM_rw(RSA_PUBKEY, RSA) - -#endif - -#ifndef OPENSSL_NO_DSA - -DECLARE_PEM_rw_cb(DSAPrivateKey, DSA) - -DECLARE_PEM_rw(DSA_PUBKEY, DSA) - -DECLARE_PEM_rw_const(DSAparams, DSA) - -#endif - -#ifndef OPENSSL_NO_EC -DECLARE_PEM_rw_const(ECPKParameters, EC_GROUP) -DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY) -DECLARE_PEM_rw(EC_PUBKEY, EC_KEY) -#endif - -#ifndef OPENSSL_NO_DH - -DECLARE_PEM_rw_const(DHparams, DH) - -#endif - -DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) - -DECLARE_PEM_rw(PUBKEY, EVP_PKEY) - -int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, - char *kstr, int klen, - pem_password_cb *cb, void *u); -int PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *, - char *, int, pem_password_cb *, void *); -int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, - char *kstr, int klen, - pem_password_cb *cb, void *u); -int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, - char *kstr, int klen, - pem_password_cb *cb, void *u); -EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u); - -int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, - char *kstr, int klen, - pem_password_cb *cb, void *u); -int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, - char *kstr, int klen, - pem_password_cb *cb, void *u); -int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, - char *kstr, int klen, - pem_password_cb *cb, void *u); - -EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u); - -int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc, - char *kstr,int klen, pem_password_cb *cd, void *u); - -#endif /* SSLEAY_MACROS */ - - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_PEM_strings(void); - -/* Error codes for the PEM functions. */ - -/* Function codes. */ -#define PEM_F_D2I_PKCS8PRIVATEKEY_BIO 120 -#define PEM_F_D2I_PKCS8PRIVATEKEY_FP 121 -#define PEM_F_DO_PK8PKEY 126 -#define PEM_F_DO_PK8PKEY_FP 125 -#define PEM_F_LOAD_IV 101 -#define PEM_F_PEM_ASN1_READ 102 -#define PEM_F_PEM_ASN1_READ_BIO 103 -#define PEM_F_PEM_ASN1_WRITE 104 -#define PEM_F_PEM_ASN1_WRITE_BIO 105 -#define PEM_F_PEM_DEF_CALLBACK 100 -#define PEM_F_PEM_DO_HEADER 106 -#define PEM_F_PEM_F_PEM_WRITE_PKCS8PRIVATEKEY 118 -#define PEM_F_PEM_GET_EVP_CIPHER_INFO 107 -#define PEM_F_PEM_PK8PKEY 119 -#define PEM_F_PEM_READ 108 -#define PEM_F_PEM_READ_BIO 109 -#define PEM_F_PEM_READ_BIO_PRIVATEKEY 123 -#define PEM_F_PEM_READ_PRIVATEKEY 124 -#define PEM_F_PEM_SEALFINAL 110 -#define PEM_F_PEM_SEALINIT 111 -#define PEM_F_PEM_SIGNFINAL 112 -#define PEM_F_PEM_WRITE 113 -#define PEM_F_PEM_WRITE_BIO 114 -#define PEM_F_PEM_X509_INFO_READ 115 -#define PEM_F_PEM_X509_INFO_READ_BIO 116 -#define PEM_F_PEM_X509_INFO_WRITE_BIO 117 - -/* Reason codes. */ -#define PEM_R_BAD_BASE64_DECODE 100 -#define PEM_R_BAD_DECRYPT 101 -#define PEM_R_BAD_END_LINE 102 -#define PEM_R_BAD_IV_CHARS 103 -#define PEM_R_BAD_PASSWORD_READ 104 -#define PEM_R_ERROR_CONVERTING_PRIVATE_KEY 115 -#define PEM_R_NOT_DEK_INFO 105 -#define PEM_R_NOT_ENCRYPTED 106 -#define PEM_R_NOT_PROC_TYPE 107 -#define PEM_R_NO_START_LINE 108 -#define PEM_R_PROBLEMS_GETTING_PASSWORD 109 -#define PEM_R_PUBLIC_KEY_NO_RSA 110 -#define PEM_R_READ_KEY 111 -#define PEM_R_SHORT_HEADER 112 -#define PEM_R_UNSUPPORTED_CIPHER 113 -#define PEM_R_UNSUPPORTED_ENCRYPTION 114 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/pem2.h b/externals/openssl/pem2.h deleted file mode 100644 index 893030edcd..0000000000 --- a/externals/openssl/pem2.h +++ /dev/null @@ -1,71 +0,0 @@ -/* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -/* - * This header only exists to break a circular dependency between pem and err - * Ben 30 Jan 1999. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef HEADER_PEM_H -void ERR_load_PEM_strings(void); -#endif - -#ifdef __cplusplus -} -#endif - diff --git a/externals/openssl/pkcs12.h b/externals/openssl/pkcs12.h deleted file mode 100644 index 4bee605dc0..0000000000 --- a/externals/openssl/pkcs12.h +++ /dev/null @@ -1,333 +0,0 @@ -/* pkcs12.h */ -/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL - * project 1999. - */ -/* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_PKCS12_H -#define HEADER_PKCS12_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define PKCS12_KEY_ID 1 -#define PKCS12_IV_ID 2 -#define PKCS12_MAC_ID 3 - -/* Default iteration count */ -#ifndef PKCS12_DEFAULT_ITER -#define PKCS12_DEFAULT_ITER PKCS5_DEFAULT_ITER -#endif - -#define PKCS12_MAC_KEY_LENGTH 20 - -#define PKCS12_SALT_LEN 8 - -/* Uncomment out next line for unicode password and names, otherwise ASCII */ - -/*#define PBE_UNICODE*/ - -#ifdef PBE_UNICODE -#define PKCS12_key_gen PKCS12_key_gen_uni -#define PKCS12_add_friendlyname PKCS12_add_friendlyname_uni -#else -#define PKCS12_key_gen PKCS12_key_gen_asc -#define PKCS12_add_friendlyname PKCS12_add_friendlyname_asc -#endif - -/* MS key usage constants */ - -#define KEY_EX 0x10 -#define KEY_SIG 0x80 - -typedef struct { -X509_SIG *dinfo; -ASN1_OCTET_STRING *salt; -ASN1_INTEGER *iter; /* defaults to 1 */ -} PKCS12_MAC_DATA; - -typedef struct { -ASN1_INTEGER *version; -PKCS12_MAC_DATA *mac; -PKCS7 *authsafes; -} PKCS12; - -PREDECLARE_STACK_OF(PKCS12_SAFEBAG) - -typedef struct { -ASN1_OBJECT *type; -union { - struct pkcs12_bag_st *bag; /* secret, crl and certbag */ - struct pkcs8_priv_key_info_st *keybag; /* keybag */ - X509_SIG *shkeybag; /* shrouded key bag */ - STACK_OF(PKCS12_SAFEBAG) *safes; - ASN1_TYPE *other; -}value; -STACK_OF(X509_ATTRIBUTE) *attrib; -} PKCS12_SAFEBAG; - -DECLARE_STACK_OF(PKCS12_SAFEBAG) -DECLARE_ASN1_SET_OF(PKCS12_SAFEBAG) -DECLARE_PKCS12_STACK_OF(PKCS12_SAFEBAG) - -typedef struct pkcs12_bag_st { -ASN1_OBJECT *type; -union { - ASN1_OCTET_STRING *x509cert; - ASN1_OCTET_STRING *x509crl; - ASN1_OCTET_STRING *octet; - ASN1_IA5STRING *sdsicert; - ASN1_TYPE *other; /* Secret or other bag */ -}value; -} PKCS12_BAGS; - -#define PKCS12_ERROR 0 -#define PKCS12_OK 1 - -/* Compatibility macros */ - -#define M_PKCS12_x5092certbag PKCS12_x5092certbag -#define M_PKCS12_x509crl2certbag PKCS12_x509crl2certbag - -#define M_PKCS12_certbag2x509 PKCS12_certbag2x509 -#define M_PKCS12_certbag2x509crl PKCS12_certbag2x509crl - -#define M_PKCS12_unpack_p7data PKCS12_unpack_p7data -#define M_PKCS12_pack_authsafes PKCS12_pack_authsafes -#define M_PKCS12_unpack_authsafes PKCS12_unpack_authsafes -#define M_PKCS12_unpack_p7encdata PKCS12_unpack_p7encdata - -#define M_PKCS12_decrypt_skey PKCS12_decrypt_skey -#define M_PKCS8_decrypt PKCS8_decrypt - -#define M_PKCS12_bag_type(bg) OBJ_obj2nid((bg)->type) -#define M_PKCS12_cert_bag_type(bg) OBJ_obj2nid((bg)->value.bag->type) -#define M_PKCS12_crl_bag_type M_PKCS12_cert_bag_type - -#define PKCS12_get_attr(bag, attr_nid) \ - PKCS12_get_attr_gen(bag->attrib, attr_nid) - -#define PKCS8_get_attr(p8, attr_nid) \ - PKCS12_get_attr_gen(p8->attributes, attr_nid) - -#define PKCS12_mac_present(p12) ((p12)->mac ? 1 : 0) - - -PKCS12_SAFEBAG *PKCS12_x5092certbag(X509 *x509); -PKCS12_SAFEBAG *PKCS12_x509crl2certbag(X509_CRL *crl); -X509 *PKCS12_certbag2x509(PKCS12_SAFEBAG *bag); -X509_CRL *PKCS12_certbag2x509crl(PKCS12_SAFEBAG *bag); - -PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it, int nid1, - int nid2); -PKCS12_SAFEBAG *PKCS12_MAKE_KEYBAG(PKCS8_PRIV_KEY_INFO *p8); -PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(X509_SIG *p8, const char *pass, int passlen); -PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(PKCS12_SAFEBAG *bag, const char *pass, - int passlen); -X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, - const char *pass, int passlen, - unsigned char *salt, int saltlen, int iter, - PKCS8_PRIV_KEY_INFO *p8); -PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG(int pbe_nid, const char *pass, - int passlen, unsigned char *salt, - int saltlen, int iter, - PKCS8_PRIV_KEY_INFO *p8); -PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk); -STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7data(PKCS7 *p7); -PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, - unsigned char *salt, int saltlen, int iter, - STACK_OF(PKCS12_SAFEBAG) *bags); -STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass, int passlen); - -int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes); -STACK_OF(PKCS7) *PKCS12_unpack_authsafes(PKCS12 *p12); - -int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, int namelen); -int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name, - int namelen); -int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name, - int namelen); -int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag, const unsigned char *name, - int namelen); -int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage); -ASN1_TYPE *PKCS12_get_attr_gen(STACK_OF(X509_ATTRIBUTE) *attrs, int attr_nid); -char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag); -unsigned char *PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass, - int passlen, unsigned char *in, int inlen, - unsigned char **data, int *datalen, int en_de); -void * PKCS12_item_decrypt_d2i(X509_ALGOR *algor, const ASN1_ITEM *it, - const char *pass, int passlen, ASN1_OCTET_STRING *oct, int zbuf); -ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor, const ASN1_ITEM *it, - const char *pass, int passlen, - void *obj, int zbuf); -PKCS12 *PKCS12_init(int mode); -int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, - int saltlen, int id, int iter, int n, - unsigned char *out, const EVP_MD *md_type); -int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type); -int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, - ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md_type, - int en_de); -int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, - unsigned char *mac, unsigned int *maclen); -int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); -int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, - unsigned char *salt, int saltlen, int iter, - const EVP_MD *md_type); -int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, - int saltlen, const EVP_MD *md_type); -unsigned char *asc2uni(const char *asc, int asclen, unsigned char **uni, int *unilen); -char *uni2asc(unsigned char *uni, int unilen); - -DECLARE_ASN1_FUNCTIONS(PKCS12) -DECLARE_ASN1_FUNCTIONS(PKCS12_MAC_DATA) -DECLARE_ASN1_FUNCTIONS(PKCS12_SAFEBAG) -DECLARE_ASN1_FUNCTIONS(PKCS12_BAGS) - -DECLARE_ASN1_ITEM(PKCS12_SAFEBAGS) -DECLARE_ASN1_ITEM(PKCS12_AUTHSAFES) - -void PKCS12_PBE_add(void); -int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, - STACK_OF(X509) **ca); -PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, - STACK_OF(X509) *ca, int nid_key, int nid_cert, int iter, - int mac_iter, int keytype); - -PKCS12_SAFEBAG *PKCS12_add_cert(STACK_OF(PKCS12_SAFEBAG) **pbags, X509 *cert); -PKCS12_SAFEBAG *PKCS12_add_key(STACK_OF(PKCS12_SAFEBAG) **pbags, EVP_PKEY *key, - int key_usage, int iter, - int key_nid, char *pass); -int PKCS12_add_safe(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags, - int safe_nid, int iter, char *pass); -PKCS12 *PKCS12_add_safes(STACK_OF(PKCS7) *safes, int p7_nid); - -int i2d_PKCS12_bio(BIO *bp, PKCS12 *p12); -int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12); -PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12); -PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12); -int PKCS12_newpass(PKCS12 *p12, char *oldpass, char *newpass); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_PKCS12_strings(void); - -/* Error codes for the PKCS12 functions. */ - -/* Function codes. */ -#define PKCS12_F_PARSE_BAG 129 -#define PKCS12_F_PARSE_BAGS 103 -#define PKCS12_F_PKCS12_ADD_FRIENDLYNAME 100 -#define PKCS12_F_PKCS12_ADD_FRIENDLYNAME_ASC 127 -#define PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI 102 -#define PKCS12_F_PKCS12_ADD_LOCALKEYID 104 -#define PKCS12_F_PKCS12_CREATE 105 -#define PKCS12_F_PKCS12_GEN_MAC 107 -#define PKCS12_F_PKCS12_INIT 109 -#define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I 106 -#define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT 108 -#define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG 117 -#define PKCS12_F_PKCS12_KEY_GEN_ASC 110 -#define PKCS12_F_PKCS12_KEY_GEN_UNI 111 -#define PKCS12_F_PKCS12_MAKE_KEYBAG 112 -#define PKCS12_F_PKCS12_MAKE_SHKEYBAG 113 -#define PKCS12_F_PKCS12_NEWPASS 128 -#define PKCS12_F_PKCS12_PACK_P7DATA 114 -#define PKCS12_F_PKCS12_PACK_P7ENCDATA 115 -#define PKCS12_F_PKCS12_PARSE 118 -#define PKCS12_F_PKCS12_PBE_CRYPT 119 -#define PKCS12_F_PKCS12_PBE_KEYIVGEN 120 -#define PKCS12_F_PKCS12_SETUP_MAC 122 -#define PKCS12_F_PKCS12_SET_MAC 123 -#define PKCS12_F_PKCS12_UNPACK_AUTHSAFES 130 -#define PKCS12_F_PKCS12_UNPACK_P7DATA 131 -#define PKCS12_F_PKCS12_VERIFY_MAC 126 -#define PKCS12_F_PKCS8_ADD_KEYUSAGE 124 -#define PKCS12_F_PKCS8_ENCRYPT 125 - -/* Reason codes. */ -#define PKCS12_R_CANT_PACK_STRUCTURE 100 -#define PKCS12_R_CONTENT_TYPE_NOT_DATA 121 -#define PKCS12_R_DECODE_ERROR 101 -#define PKCS12_R_ENCODE_ERROR 102 -#define PKCS12_R_ENCRYPT_ERROR 103 -#define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE 120 -#define PKCS12_R_INVALID_NULL_ARGUMENT 104 -#define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105 -#define PKCS12_R_IV_GEN_ERROR 106 -#define PKCS12_R_KEY_GEN_ERROR 107 -#define PKCS12_R_MAC_ABSENT 108 -#define PKCS12_R_MAC_GENERATION_ERROR 109 -#define PKCS12_R_MAC_SETUP_ERROR 110 -#define PKCS12_R_MAC_STRING_SET_ERROR 111 -#define PKCS12_R_MAC_VERIFY_ERROR 112 -#define PKCS12_R_MAC_VERIFY_FAILURE 113 -#define PKCS12_R_PARSE_ERROR 114 -#define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR 115 -#define PKCS12_R_PKCS12_CIPHERFINAL_ERROR 116 -#define PKCS12_R_PKCS12_PBE_CRYPT_ERROR 117 -#define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM 118 -#define PKCS12_R_UNSUPPORTED_PKCS12_MODE 119 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/pkcs7.h b/externals/openssl/pkcs7.h deleted file mode 100644 index 457cfdd70a..0000000000 --- a/externals/openssl/pkcs7.h +++ /dev/null @@ -1,465 +0,0 @@ -/* crypto/pkcs7/pkcs7.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_PKCS7_H -#define HEADER_PKCS7_H - -#include -#include -#include - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef OPENSSL_SYS_WIN32 -/* Under Win32 thes are defined in wincrypt.h */ -#undef PKCS7_ISSUER_AND_SERIAL -#undef PKCS7_SIGNER_INFO -#endif - -/* -Encryption_ID DES-CBC -Digest_ID MD5 -Digest_Encryption_ID rsaEncryption -Key_Encryption_ID rsaEncryption -*/ - -typedef struct pkcs7_issuer_and_serial_st - { - X509_NAME *issuer; - ASN1_INTEGER *serial; - } PKCS7_ISSUER_AND_SERIAL; - -typedef struct pkcs7_signer_info_st - { - ASN1_INTEGER *version; /* version 1 */ - PKCS7_ISSUER_AND_SERIAL *issuer_and_serial; - X509_ALGOR *digest_alg; - STACK_OF(X509_ATTRIBUTE) *auth_attr; /* [ 0 ] */ - X509_ALGOR *digest_enc_alg; - ASN1_OCTET_STRING *enc_digest; - STACK_OF(X509_ATTRIBUTE) *unauth_attr; /* [ 1 ] */ - - /* The private key to sign with */ - EVP_PKEY *pkey; - } PKCS7_SIGNER_INFO; - -DECLARE_STACK_OF(PKCS7_SIGNER_INFO) -DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO) - -typedef struct pkcs7_recip_info_st - { - ASN1_INTEGER *version; /* version 0 */ - PKCS7_ISSUER_AND_SERIAL *issuer_and_serial; - X509_ALGOR *key_enc_algor; - ASN1_OCTET_STRING *enc_key; - X509 *cert; /* get the pub-key from this */ - } PKCS7_RECIP_INFO; - -DECLARE_STACK_OF(PKCS7_RECIP_INFO) -DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO) - -typedef struct pkcs7_signed_st - { - ASN1_INTEGER *version; /* version 1 */ - STACK_OF(X509_ALGOR) *md_algs; /* md used */ - STACK_OF(X509) *cert; /* [ 0 ] */ - STACK_OF(X509_CRL) *crl; /* [ 1 ] */ - STACK_OF(PKCS7_SIGNER_INFO) *signer_info; - - struct pkcs7_st *contents; - } PKCS7_SIGNED; -/* The above structure is very very similar to PKCS7_SIGN_ENVELOPE. - * How about merging the two */ - -typedef struct pkcs7_enc_content_st - { - ASN1_OBJECT *content_type; - X509_ALGOR *algorithm; - ASN1_OCTET_STRING *enc_data; /* [ 0 ] */ - const EVP_CIPHER *cipher; - } PKCS7_ENC_CONTENT; - -typedef struct pkcs7_enveloped_st - { - ASN1_INTEGER *version; /* version 0 */ - STACK_OF(PKCS7_RECIP_INFO) *recipientinfo; - PKCS7_ENC_CONTENT *enc_data; - } PKCS7_ENVELOPE; - -typedef struct pkcs7_signedandenveloped_st - { - ASN1_INTEGER *version; /* version 1 */ - STACK_OF(X509_ALGOR) *md_algs; /* md used */ - STACK_OF(X509) *cert; /* [ 0 ] */ - STACK_OF(X509_CRL) *crl; /* [ 1 ] */ - STACK_OF(PKCS7_SIGNER_INFO) *signer_info; - - PKCS7_ENC_CONTENT *enc_data; - STACK_OF(PKCS7_RECIP_INFO) *recipientinfo; - } PKCS7_SIGN_ENVELOPE; - -typedef struct pkcs7_digest_st - { - ASN1_INTEGER *version; /* version 0 */ - X509_ALGOR *md; /* md used */ - struct pkcs7_st *contents; - ASN1_OCTET_STRING *digest; - } PKCS7_DIGEST; - -typedef struct pkcs7_encrypted_st - { - ASN1_INTEGER *version; /* version 0 */ - PKCS7_ENC_CONTENT *enc_data; - } PKCS7_ENCRYPT; - -typedef struct pkcs7_st - { - /* The following is non NULL if it contains ASN1 encoding of - * this structure */ - unsigned char *asn1; - long length; - -#define PKCS7_S_HEADER 0 -#define PKCS7_S_BODY 1 -#define PKCS7_S_TAIL 2 - int state; /* used during processing */ - - int detached; - - ASN1_OBJECT *type; - /* content as defined by the type */ - /* all encryption/message digests are applied to the 'contents', - * leaving out the 'type' field. */ - union { - char *ptr; - - /* NID_pkcs7_data */ - ASN1_OCTET_STRING *data; - - /* NID_pkcs7_signed */ - PKCS7_SIGNED *sign; - - /* NID_pkcs7_enveloped */ - PKCS7_ENVELOPE *enveloped; - - /* NID_pkcs7_signedAndEnveloped */ - PKCS7_SIGN_ENVELOPE *signed_and_enveloped; - - /* NID_pkcs7_digest */ - PKCS7_DIGEST *digest; - - /* NID_pkcs7_encrypted */ - PKCS7_ENCRYPT *encrypted; - - /* Anything else */ - ASN1_TYPE *other; - } d; - } PKCS7; - -DECLARE_STACK_OF(PKCS7) -DECLARE_ASN1_SET_OF(PKCS7) -DECLARE_PKCS12_STACK_OF(PKCS7) - -#define PKCS7_OP_SET_DETACHED_SIGNATURE 1 -#define PKCS7_OP_GET_DETACHED_SIGNATURE 2 - -#define PKCS7_get_signed_attributes(si) ((si)->auth_attr) -#define PKCS7_get_attributes(si) ((si)->unauth_attr) - -#define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed) -#define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted) -#define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped) -#define PKCS7_type_is_signedAndEnveloped(a) \ - (OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped) -#define PKCS7_type_is_data(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_data) - -#define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest) - -#define PKCS7_set_detached(p,v) \ - PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL) -#define PKCS7_get_detached(p) \ - PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL) - -#define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7)) - -#ifdef SSLEAY_MACROS -#ifndef PKCS7_ISSUER_AND_SERIAL_digest -#define PKCS7_ISSUER_AND_SERIAL_digest(data,type,md,len) \ - ASN1_digest((int (*)())i2d_PKCS7_ISSUER_AND_SERIAL,type,\ - (char *)data,md,len) -#endif -#endif - -/* S/MIME related flags */ - -#define PKCS7_TEXT 0x1 -#define PKCS7_NOCERTS 0x2 -#define PKCS7_NOSIGS 0x4 -#define PKCS7_NOCHAIN 0x8 -#define PKCS7_NOINTERN 0x10 -#define PKCS7_NOVERIFY 0x20 -#define PKCS7_DETACHED 0x40 -#define PKCS7_BINARY 0x80 -#define PKCS7_NOATTR 0x100 -#define PKCS7_NOSMIMECAP 0x200 -#define PKCS7_NOOLDMIMETYPE 0x400 -#define PKCS7_CRLFEOL 0x800 -#define PKCS7_STREAM 0x1000 -#define PKCS7_NOCRL 0x2000 - -/* Flags: for compatibility with older code */ - -#define SMIME_TEXT PKCS7_TEXT -#define SMIME_NOCERTS PKCS7_NOCERTS -#define SMIME_NOSIGS PKCS7_NOSIGS -#define SMIME_NOCHAIN PKCS7_NOCHAIN -#define SMIME_NOINTERN PKCS7_NOINTERN -#define SMIME_NOVERIFY PKCS7_NOVERIFY -#define SMIME_DETACHED PKCS7_DETACHED -#define SMIME_BINARY PKCS7_BINARY -#define SMIME_NOATTR PKCS7_NOATTR - -DECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL) - -#ifndef SSLEAY_MACROS -int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,const EVP_MD *type, - unsigned char *md,unsigned int *len); -#ifndef OPENSSL_NO_FP_API -PKCS7 *d2i_PKCS7_fp(FILE *fp,PKCS7 **p7); -int i2d_PKCS7_fp(FILE *fp,PKCS7 *p7); -#endif -PKCS7 *PKCS7_dup(PKCS7 *p7); -PKCS7 *d2i_PKCS7_bio(BIO *bp,PKCS7 **p7); -int i2d_PKCS7_bio(BIO *bp,PKCS7 *p7); -#endif - -DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO) -DECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO) -DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNED) -DECLARE_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT) -DECLARE_ASN1_FUNCTIONS(PKCS7_ENVELOPE) -DECLARE_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE) -DECLARE_ASN1_FUNCTIONS(PKCS7_DIGEST) -DECLARE_ASN1_FUNCTIONS(PKCS7_ENCRYPT) -DECLARE_ASN1_FUNCTIONS(PKCS7) - -DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN) -DECLARE_ASN1_ITEM(PKCS7_ATTR_VERIFY) - -DECLARE_ASN1_NDEF_FUNCTION(PKCS7) - -long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg); - -int PKCS7_set_type(PKCS7 *p7, int type); -int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other); -int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data); -int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, - const EVP_MD *dgst); -int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i); -int PKCS7_add_certificate(PKCS7 *p7, X509 *x509); -int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509); -int PKCS7_content_new(PKCS7 *p7, int nid); -int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, - BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si); -int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, - X509 *x509); - -BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio); -int PKCS7_dataFinal(PKCS7 *p7, BIO *bio); -BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert); - - -PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509, - EVP_PKEY *pkey, const EVP_MD *dgst); -X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si); -int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md); -STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7); - -PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509); -int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri); -int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509); -int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher); - -PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx); -ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk); -int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si,int nid,int type, - void *data); -int PKCS7_add_attribute (PKCS7_SIGNER_INFO *p7si, int nid, int atrtype, - void *value); -ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid); -ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid); -int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si, - STACK_OF(X509_ATTRIBUTE) *sk); -int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,STACK_OF(X509_ATTRIBUTE) *sk); - - -PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, - BIO *data, int flags); -int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, - BIO *indata, BIO *out, int flags); -STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags); -PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, - int flags); -int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags); - -int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, - STACK_OF(X509_ALGOR) *cap); -STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si); -int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg); - -int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags); -PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont); -int SMIME_crlf_copy(BIO *in, BIO *out, int flags); -int SMIME_text(BIO *in, BIO *out); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_PKCS7_strings(void); - -/* Error codes for the PKCS7 functions. */ - -/* Function codes. */ -#define PKCS7_F_B64_READ_PKCS7 120 -#define PKCS7_F_B64_WRITE_PKCS7 121 -#define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP 118 -#define PKCS7_F_PKCS7_ADD_CERTIFICATE 100 -#define PKCS7_F_PKCS7_ADD_CRL 101 -#define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO 102 -#define PKCS7_F_PKCS7_ADD_SIGNER 103 -#define PKCS7_F_PKCS7_BIO_ADD_DIGEST 125 -#define PKCS7_F_PKCS7_CTRL 104 -#define PKCS7_F_PKCS7_DATADECODE 112 -#define PKCS7_F_PKCS7_DATAFINAL 128 -#define PKCS7_F_PKCS7_DATAINIT 105 -#define PKCS7_F_PKCS7_DATASIGN 106 -#define PKCS7_F_PKCS7_DATAVERIFY 107 -#define PKCS7_F_PKCS7_DECRYPT 114 -#define PKCS7_F_PKCS7_ENCRYPT 115 -#define PKCS7_F_PKCS7_FIND_DIGEST 127 -#define PKCS7_F_PKCS7_GET0_SIGNERS 124 -#define PKCS7_F_PKCS7_SET_CIPHER 108 -#define PKCS7_F_PKCS7_SET_CONTENT 109 -#define PKCS7_F_PKCS7_SET_DIGEST 126 -#define PKCS7_F_PKCS7_SET_TYPE 110 -#define PKCS7_F_PKCS7_SIGN 116 -#define PKCS7_F_PKCS7_SIGNATUREVERIFY 113 -#define PKCS7_F_PKCS7_SIMPLE_SMIMECAP 119 -#define PKCS7_F_PKCS7_VERIFY 117 -#define PKCS7_F_SMIME_READ_PKCS7 122 -#define PKCS7_F_SMIME_TEXT 123 - -/* Reason codes. */ -#define PKCS7_R_CERTIFICATE_VERIFY_ERROR 117 -#define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 144 -#define PKCS7_R_CIPHER_NOT_INITIALIZED 116 -#define PKCS7_R_CONTENT_AND_DATA_PRESENT 118 -#define PKCS7_R_DECODE_ERROR 130 -#define PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH 100 -#define PKCS7_R_DECRYPT_ERROR 119 -#define PKCS7_R_DIGEST_FAILURE 101 -#define PKCS7_R_ERROR_ADDING_RECIPIENT 120 -#define PKCS7_R_ERROR_SETTING_CIPHER 121 -#define PKCS7_R_INVALID_MIME_TYPE 131 -#define PKCS7_R_INVALID_NULL_POINTER 143 -#define PKCS7_R_MIME_NO_CONTENT_TYPE 132 -#define PKCS7_R_MIME_PARSE_ERROR 133 -#define PKCS7_R_MIME_SIG_PARSE_ERROR 134 -#define PKCS7_R_MISSING_CERIPEND_INFO 103 -#define PKCS7_R_NO_CONTENT 122 -#define PKCS7_R_NO_CONTENT_TYPE 135 -#define PKCS7_R_NO_MULTIPART_BODY_FAILURE 136 -#define PKCS7_R_NO_MULTIPART_BOUNDARY 137 -#define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE 115 -#define PKCS7_R_NO_RECIPIENT_MATCHES_KEY 146 -#define PKCS7_R_NO_SIGNATURES_ON_DATA 123 -#define PKCS7_R_NO_SIGNERS 142 -#define PKCS7_R_NO_SIG_CONTENT_TYPE 138 -#define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE 104 -#define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR 124 -#define PKCS7_R_PKCS7_DATAFINAL 126 -#define PKCS7_R_PKCS7_DATAFINAL_ERROR 125 -#define PKCS7_R_PKCS7_DATASIGN 145 -#define PKCS7_R_PKCS7_PARSE_ERROR 139 -#define PKCS7_R_PKCS7_SIG_PARSE_ERROR 140 -#define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 127 -#define PKCS7_R_SIGNATURE_FAILURE 105 -#define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND 128 -#define PKCS7_R_SIG_INVALID_MIME_TYPE 141 -#define PKCS7_R_SMIME_TEXT_ERROR 129 -#define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE 106 -#define PKCS7_R_UNABLE_TO_FIND_MEM_BIO 107 -#define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST 108 -#define PKCS7_R_UNKNOWN_DIGEST_TYPE 109 -#define PKCS7_R_UNKNOWN_OPERATION 110 -#define PKCS7_R_UNSUPPORTED_CIPHER_TYPE 111 -#define PKCS7_R_UNSUPPORTED_CONTENT_TYPE 112 -#define PKCS7_R_WRONG_CONTENT_TYPE 113 -#define PKCS7_R_WRONG_PKCS7_TYPE 114 - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/pq_compat.h b/externals/openssl/pq_compat.h deleted file mode 100644 index 7b2c32725c..0000000000 --- a/externals/openssl/pq_compat.h +++ /dev/null @@ -1,152 +0,0 @@ -/* crypto/pqueue/pqueue_compat.h */ -/* - * DTLS implementation written by Nagendra Modadugu - * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. - */ -/* ==================================================================== - * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_PQ_COMPAT_H -#define HEADER_PQ_COMPAT_H - -#include -#include - -/* - * The purpose of this header file is for supporting 64-bit integer - * manipulation on 32-bit (and lower) machines. Currently the only - * such environment is VMS, Utrix and those with smaller default integer - * sizes than 32 bits. For all such environment, we fall back to using - * BIGNUM. We may need to fine tune the conditions for systems that - * are incorrectly configured. - * - * The only clients of this code are (1) pqueue for priority, and - * (2) DTLS, for sequence number manipulation. - */ - -#if (defined(THIRTY_TWO_BIT) && !defined(BN_LLONG)) || defined(SIXTEEN_BIT) || defined(EIGHT_BIT) - -#define PQ_64BIT_IS_INTEGER 0 -#define PQ_64BIT_IS_BIGNUM 1 - -#define PQ_64BIT BIGNUM -#define PQ_64BIT_CTX BN_CTX - -#define pq_64bit_init(x) BN_init(x) -#define pq_64bit_free(x) BN_free(x) - -#define pq_64bit_ctx_new(ctx) BN_CTX_new() -#define pq_64bit_ctx_free(x) BN_CTX_free(x) - -#define pq_64bit_assign(x, y) BN_copy(x, y) -#define pq_64bit_assign_word(x, y) BN_set_word(x, y) -#define pq_64bit_gt(x, y) BN_ucmp(x, y) >= 1 ? 1 : 0 -#define pq_64bit_eq(x, y) BN_ucmp(x, y) == 0 ? 1 : 0 -#define pq_64bit_add_word(x, w) BN_add_word(x, w) -#define pq_64bit_sub(r, x, y) BN_sub(r, x, y) -#define pq_64bit_sub_word(x, w) BN_sub_word(x, w) -#define pq_64bit_mod(r, x, n, ctx) BN_mod(r, x, n, ctx) - -#define pq_64bit_bin2num(bn, bytes, len) BN_bin2bn(bytes, len, bn) -#define pq_64bit_num2bin(bn, bytes) BN_bn2bin(bn, bytes) -#define pq_64bit_get_word(x) BN_get_word(x) -#define pq_64bit_is_bit_set(x, offset) BN_is_bit_set(x, offset) -#define pq_64bit_lshift(r, x, shift) BN_lshift(r, x, shift) -#define pq_64bit_set_bit(x, num) BN_set_bit(x, num) -#define pq_64bit_get_length(x) BN_num_bits((x)) - -#else - -#define PQ_64BIT_IS_INTEGER 1 -#define PQ_64BIT_IS_BIGNUM 0 - -#if defined(SIXTY_FOUR_BIT) -#define PQ_64BIT BN_ULONG -#define PQ_64BIT_PRINT "%lld" -#elif defined(SIXTY_FOUR_BIT_LONG) -#define PQ_64BIT BN_ULONG -#define PQ_64BIT_PRINT "%ld" -#elif defined(THIRTY_TWO_BIT) -#define PQ_64BIT BN_ULLONG -#define PQ_64BIT_PRINT "%lld" -#endif - -#define PQ_64BIT_CTX void - -#define pq_64bit_init(x) -#define pq_64bit_free(x) -#define pq_64bit_ctx_new(ctx) (ctx) -#define pq_64bit_ctx_free(x) - -#define pq_64bit_assign(x, y) (*(x) = *(y)) -#define pq_64bit_assign_word(x, y) (*(x) = y) -#define pq_64bit_gt(x, y) (*(x) > *(y)) -#define pq_64bit_eq(x, y) (*(x) == *(y)) -#define pq_64bit_add_word(x, w) (*(x) = (*(x) + (w))) -#define pq_64bit_sub(r, x, y) (*(r) = (*(x) - *(y))) -#define pq_64bit_sub_word(x, w) (*(x) = (*(x) - (w))) -#define pq_64bit_mod(r, x, n, ctx) - -#define pq_64bit_bin2num(num, bytes, len) bytes_to_long_long(bytes, num) -#define pq_64bit_num2bin(num, bytes) long_long_to_bytes(num, bytes) -#define pq_64bit_get_word(x) *(x) -#define pq_64bit_lshift(r, x, shift) (*(r) = (*(x) << (shift))) -#define pq_64bit_set_bit(x, num) do { \ - PQ_64BIT mask = 1; \ - mask = mask << (num); \ - *(x) |= mask; \ - } while(0) -#endif /* OPENSSL_SYS_VMS */ - -#endif diff --git a/externals/openssl/pqueue.h b/externals/openssl/pqueue.h deleted file mode 100644 index cc6b001820..0000000000 --- a/externals/openssl/pqueue.h +++ /dev/null @@ -1,96 +0,0 @@ -/* crypto/pqueue/pqueue.h */ -/* - * DTLS implementation written by Nagendra Modadugu - * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. - */ -/* ==================================================================== - * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_PQUEUE_H -#define HEADER_PQUEUE_H - -#include -#include -#include - -#include - -typedef struct _pqueue *pqueue; - -typedef struct _pitem - { - PQ_64BIT priority; - void *data; - struct _pitem *next; - } pitem; - -typedef struct _pitem *piterator; - -pitem *pitem_new(PQ_64BIT priority, void *data); -void pitem_free(pitem *item); - -pqueue pqueue_new(void); -void pqueue_free(pqueue pq); - -pitem *pqueue_insert(pqueue pq, pitem *item); -pitem *pqueue_peek(pqueue pq); -pitem *pqueue_pop(pqueue pq); -pitem *pqueue_find(pqueue pq, PQ_64BIT priority); -pitem *pqueue_iterator(pqueue pq); -pitem *pqueue_next(piterator *iter); - -void pqueue_print(pqueue pq); - -#endif /* ! HEADER_PQUEUE_H */ - diff --git a/externals/openssl/rand.h b/externals/openssl/rand.h deleted file mode 100644 index ea89153cba..0000000000 --- a/externals/openssl/rand.h +++ /dev/null @@ -1,167 +0,0 @@ -/* crypto/rand/rand.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RAND_H -#define HEADER_RAND_H - -#include -#include -#include - -#if defined(OPENSSL_SYS_WINDOWS) -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(OPENSSL_FIPS) -#define FIPS_RAND_SIZE_T int -#endif - -/* Already defined in ossl_typ.h */ -/* typedef struct rand_meth_st RAND_METHOD; */ - -struct rand_meth_st - { - void (*seed)(const void *buf, int num); - int (*bytes)(unsigned char *buf, int num); - void (*cleanup)(void); - void (*add)(const void *buf, int num, double entropy); - int (*pseudorand)(unsigned char *buf, int num); - int (*status)(void); - }; - -#ifdef BN_DEBUG -extern int rand_predictable; -#endif - -int RAND_set_rand_method(const RAND_METHOD *meth); -const RAND_METHOD *RAND_get_rand_method(void); -#ifndef OPENSSL_NO_ENGINE -int RAND_set_rand_engine(ENGINE *engine); -#endif -RAND_METHOD *RAND_SSLeay(void); -void RAND_cleanup(void ); -int RAND_bytes(unsigned char *buf,int num); -int RAND_pseudo_bytes(unsigned char *buf,int num); -void RAND_seed(const void *buf,int num); -void RAND_add(const void *buf,int num,double entropy); -int RAND_load_file(const char *file,long max_bytes); -int RAND_write_file(const char *file); -const char *RAND_file_name(char *file,size_t num); -int RAND_status(void); -int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); -int RAND_egd(const char *path); -int RAND_egd_bytes(const char *path,int bytes); -int RAND_poll(void); -#ifndef OPENSSL_NO_ENGINE -#ifdef OPENSSL_FIPS -void int_RAND_init_engine_callbacks(void); -void int_RAND_set_callbacks( - int (*set_rand_func)(const RAND_METHOD *meth, - const RAND_METHOD **pmeth), - const RAND_METHOD *(*get_rand_func)(const RAND_METHOD **pmeth)); -#endif -#endif - -#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) - -void RAND_screen(void); -int RAND_event(UINT, WPARAM, LPARAM); - -#endif - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_RAND_strings(void); - -/* Error codes for the RAND functions. */ - -/* Function codes. */ -#define RAND_F_ENG_RAND_GET_RAND_METHOD 108 -#define RAND_F_FIPS_RAND 103 -#define RAND_F_FIPS_RAND_BYTES 102 -#define RAND_F_FIPS_RAND_GET_RAND_METHOD 109 -#define RAND_F_FIPS_RAND_SET_DT 106 -#define RAND_F_FIPS_SET_DT 104 -#define RAND_F_FIPS_SET_PRNG_SEED 107 -#define RAND_F_FIPS_SET_TEST_MODE 105 -#define RAND_F_RAND_GET_RAND_METHOD 101 -#define RAND_F_SSLEAY_RAND_BYTES 100 - -/* Reason codes. */ -#define RAND_R_NON_FIPS_METHOD 105 -#define RAND_R_NOT_IN_TEST_MODE 106 -#define RAND_R_NO_KEY_SET 107 -#define RAND_R_PRNG_ASKING_FOR_TOO_MUCH 101 -#define RAND_R_PRNG_ERROR 108 -#define RAND_R_PRNG_KEYED 109 -#define RAND_R_PRNG_NOT_REKEYED 102 -#define RAND_R_PRNG_NOT_RESEEDED 103 -#define RAND_R_PRNG_NOT_SEEDED 100 -#define RAND_R_PRNG_SEED_MUST_NOT_MATCH_KEY 110 -#define RAND_R_PRNG_STUCK 104 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/rc2.h b/externals/openssl/rc2.h deleted file mode 100644 index e542ec94ff..0000000000 --- a/externals/openssl/rc2.h +++ /dev/null @@ -1,103 +0,0 @@ -/* crypto/rc2/rc2.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RC2_H -#define HEADER_RC2_H - -#include /* OPENSSL_NO_RC2, RC2_INT */ -#ifdef OPENSSL_NO_RC2 -#error RC2 is disabled. -#endif - -#define RC2_ENCRYPT 1 -#define RC2_DECRYPT 0 - -#define RC2_BLOCK 8 -#define RC2_KEY_LENGTH 16 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct rc2_key_st - { - RC2_INT data[64]; - } RC2_KEY; - -#ifdef OPENSSL_FIPS -void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); -#endif -void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); -void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, - int enc); -void RC2_encrypt(unsigned long *data,RC2_KEY *key); -void RC2_decrypt(unsigned long *data,RC2_KEY *key); -void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, - RC2_KEY *ks, unsigned char *iv, int enc); -void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, RC2_KEY *schedule, unsigned char *ivec, - int *num, int enc); -void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, RC2_KEY *schedule, unsigned char *ivec, - int *num); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/rc4.h b/externals/openssl/rc4.h deleted file mode 100644 index 2d8620d33b..0000000000 --- a/externals/openssl/rc4.h +++ /dev/null @@ -1,90 +0,0 @@ -/* crypto/rc4/rc4.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RC4_H -#define HEADER_RC4_H - -#include /* OPENSSL_NO_RC4, RC4_INT */ -#ifdef OPENSSL_NO_RC4 -#error RC4 is disabled. -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct rc4_key_st - { - RC4_INT x,y; - RC4_INT data[256]; - } RC4_KEY; - - -const char *RC4_options(void); -#ifdef OPENSSL_FIPS -void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); -#endif -void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); -void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, - unsigned char *outdata); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/ripemd.h b/externals/openssl/ripemd.h deleted file mode 100644 index 3b6d04386d..0000000000 --- a/externals/openssl/ripemd.h +++ /dev/null @@ -1,106 +0,0 @@ -/* crypto/ripemd/ripemd.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RIPEMD_H -#define HEADER_RIPEMD_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef OPENSSL_NO_RIPEMD -#error RIPEMD is disabled. -#endif - -#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__) -#define RIPEMD160_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -#define RIPEMD160_LONG unsigned long -#define RIPEMD160_LONG_LOG2 3 -#else -#define RIPEMD160_LONG unsigned int -#endif - -#define RIPEMD160_CBLOCK 64 -#define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) -#define RIPEMD160_DIGEST_LENGTH 20 - -typedef struct RIPEMD160state_st - { - RIPEMD160_LONG A,B,C,D,E; - RIPEMD160_LONG Nl,Nh; - RIPEMD160_LONG data[RIPEMD160_LBLOCK]; - unsigned int num; - } RIPEMD160_CTX; -#ifdef OPENSSL_FIPS -int private_RIPEMD160_Init(RIPEMD160_CTX *c); -#endif -int RIPEMD160_Init(RIPEMD160_CTX *c); -int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); -int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); -unsigned char *RIPEMD160(const unsigned char *d, size_t n, - unsigned char *md); -void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/rsa.h b/externals/openssl/rsa.h deleted file mode 100644 index 5bb932ae15..0000000000 --- a/externals/openssl/rsa.h +++ /dev/null @@ -1,496 +0,0 @@ -/* crypto/rsa/rsa.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RSA_H -#define HEADER_RSA_H - -#include - -#ifndef OPENSSL_NO_BIO -#include -#endif -#include -#include -#ifndef OPENSSL_NO_DEPRECATED -#include -#endif - -#ifdef OPENSSL_NO_RSA -#error RSA is disabled. -#endif - -/* If this flag is set the RSA method is FIPS compliant and can be used - * in FIPS mode. This is set in the validated module method. If an - * application sets this flag in its own methods it is its reposibility - * to ensure the result is compliant. - */ - -#define RSA_FLAG_FIPS_METHOD 0x0400 - -/* If this flag is set the operations normally disabled in FIPS mode are - * permitted it is then the applications responsibility to ensure that the - * usage is compliant. - */ - -#define RSA_FLAG_NON_FIPS_ALLOW 0x0400 - -#ifdef OPENSSL_FIPS -#define FIPS_RSA_SIZE_T int -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Declared already in ossl_typ.h */ -/* typedef struct rsa_st RSA; */ -/* typedef struct rsa_meth_st RSA_METHOD; */ - -struct rsa_meth_st - { - const char *name; - int (*rsa_pub_enc)(int flen,const unsigned char *from, - unsigned char *to, - RSA *rsa,int padding); - int (*rsa_pub_dec)(int flen,const unsigned char *from, - unsigned char *to, - RSA *rsa,int padding); - int (*rsa_priv_enc)(int flen,const unsigned char *from, - unsigned char *to, - RSA *rsa,int padding); - int (*rsa_priv_dec)(int flen,const unsigned char *from, - unsigned char *to, - RSA *rsa,int padding); - int (*rsa_mod_exp)(BIGNUM *r0,const BIGNUM *I,RSA *rsa,BN_CTX *ctx); /* Can be null */ - int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *m_ctx); /* Can be null */ - int (*init)(RSA *rsa); /* called at new */ - int (*finish)(RSA *rsa); /* called at free */ - int flags; /* RSA_METHOD_FLAG_* things */ - char *app_data; /* may be needed! */ -/* New sign and verify functions: some libraries don't allow arbitrary data - * to be signed/verified: this allows them to be used. Note: for this to work - * the RSA_public_decrypt() and RSA_private_encrypt() should *NOT* be used - * RSA_sign(), RSA_verify() should be used instead. Note: for backwards - * compatibility this functionality is only enabled if the RSA_FLAG_SIGN_VER - * option is set in 'flags'. - */ - int (*rsa_sign)(int type, - const unsigned char *m, unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, const RSA *rsa); - int (*rsa_verify)(int dtype, - const unsigned char *m, unsigned int m_length, - unsigned char *sigbuf, unsigned int siglen, const RSA *rsa); -/* If this callback is NULL, the builtin software RSA key-gen will be used. This - * is for behavioural compatibility whilst the code gets rewired, but one day - * it would be nice to assume there are no such things as "builtin software" - * implementations. */ - int (*rsa_keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); - }; - -struct rsa_st - { - /* The first parameter is used to pickup errors where - * this is passed instead of aEVP_PKEY, it is set to 0 */ - int pad; - long version; - const RSA_METHOD *meth; - /* functional reference if 'meth' is ENGINE-provided */ - ENGINE *engine; - BIGNUM *n; - BIGNUM *e; - BIGNUM *d; - BIGNUM *p; - BIGNUM *q; - BIGNUM *dmp1; - BIGNUM *dmq1; - BIGNUM *iqmp; - /* be careful using this if the RSA structure is shared */ - CRYPTO_EX_DATA ex_data; - int references; - int flags; - - /* Used to cache montgomery values */ - BN_MONT_CTX *_method_mod_n; - BN_MONT_CTX *_method_mod_p; - BN_MONT_CTX *_method_mod_q; - - /* all BIGNUM values are actually in the following data, if it is not - * NULL */ - char *bignum_data; - BN_BLINDING *blinding; - BN_BLINDING *mt_blinding; - }; - -#ifndef OPENSSL_RSA_MAX_MODULUS_BITS -# define OPENSSL_RSA_MAX_MODULUS_BITS 16384 -#endif - -#define OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 1024 - -#ifndef OPENSSL_RSA_SMALL_MODULUS_BITS -# define OPENSSL_RSA_SMALL_MODULUS_BITS 3072 -#endif -#ifndef OPENSSL_RSA_MAX_PUBEXP_BITS -# define OPENSSL_RSA_MAX_PUBEXP_BITS 64 /* exponent limit enforced for "large" modulus only */ -#endif - -#define RSA_3 0x3L -#define RSA_F4 0x10001L - -#define RSA_METHOD_FLAG_NO_CHECK 0x0001 /* don't check pub/private match */ - -#define RSA_FLAG_CACHE_PUBLIC 0x0002 -#define RSA_FLAG_CACHE_PRIVATE 0x0004 -#define RSA_FLAG_BLINDING 0x0008 -#define RSA_FLAG_THREAD_SAFE 0x0010 -/* This flag means the private key operations will be handled by rsa_mod_exp - * and that they do not depend on the private key components being present: - * for example a key stored in external hardware. Without this flag bn_mod_exp - * gets called when private key components are absent. - */ -#define RSA_FLAG_EXT_PKEY 0x0020 - -/* This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify functions. - */ -#define RSA_FLAG_SIGN_VER 0x0040 - -#define RSA_FLAG_NO_BLINDING 0x0080 /* new with 0.9.6j and 0.9.7b; the built-in - * RSA implementation now uses blinding by - * default (ignoring RSA_FLAG_BLINDING), - * but other engines might not need it - */ -#define RSA_FLAG_NO_CONSTTIME 0x0100 /* new with 0.9.8f; the built-in RSA - * implementation now uses constant time - * operations by default in private key operations, - * e.g., constant time modular exponentiation, - * modular inverse without leaking branches, - * division without leaking branches. This - * flag disables these constant time - * operations and results in faster RSA - * private key operations. - */ -#ifndef OPENSSL_NO_DEPRECATED -#define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME /* deprecated name for the flag*/ - /* new with 0.9.7h; the built-in RSA - * implementation now uses constant time - * modular exponentiation for secret exponents - * by default. This flag causes the - * faster variable sliding window method to - * be used for all exponents. - */ -#endif - - -#define RSA_PKCS1_PADDING 1 -#define RSA_SSLV23_PADDING 2 -#define RSA_NO_PADDING 3 -#define RSA_PKCS1_OAEP_PADDING 4 -#define RSA_X931_PADDING 5 - -#define RSA_PKCS1_PADDING_SIZE 11 - -#define RSA_set_app_data(s,arg) RSA_set_ex_data(s,0,arg) -#define RSA_get_app_data(s) RSA_get_ex_data(s,0) - -RSA * RSA_new(void); -RSA * RSA_new_method(ENGINE *engine); -int RSA_size(const RSA *); - -/* Deprecated version */ -#ifndef OPENSSL_NO_DEPRECATED -RSA * RSA_generate_key(int bits, unsigned long e,void - (*callback)(int,int,void *),void *cb_arg); -#endif /* !defined(OPENSSL_NO_DEPRECATED) */ - -/* New version */ -int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); -int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2, - const BIGNUM *Xp1, const BIGNUM *Xp2, const BIGNUM *Xp, - const BIGNUM *Xq1, const BIGNUM *Xq2, const BIGNUM *Xq, - const BIGNUM *e, BN_GENCB *cb); -int RSA_X931_generate_key_ex(RSA *rsa, int bits, const BIGNUM *e, BN_GENCB *cb); - -int RSA_check_key(const RSA *); - /* next 4 return -1 on error */ -int RSA_public_encrypt(int flen, const unsigned char *from, - unsigned char *to, RSA *rsa,int padding); -int RSA_private_encrypt(int flen, const unsigned char *from, - unsigned char *to, RSA *rsa,int padding); -int RSA_public_decrypt(int flen, const unsigned char *from, - unsigned char *to, RSA *rsa,int padding); -int RSA_private_decrypt(int flen, const unsigned char *from, - unsigned char *to, RSA *rsa,int padding); -void RSA_free (RSA *r); -/* "up" the RSA object's reference count */ -int RSA_up_ref(RSA *r); - -int RSA_flags(const RSA *r); - -#ifdef OPENSSL_FIPS -RSA *FIPS_rsa_new(void); -void FIPS_rsa_free(RSA *r); -#endif - -void RSA_set_default_method(const RSA_METHOD *meth); -const RSA_METHOD *RSA_get_default_method(void); -const RSA_METHOD *RSA_get_method(const RSA *rsa); -int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); - -/* This function needs the memory locking malloc callbacks to be installed */ -int RSA_memory_lock(RSA *r); - -/* these are the actual SSLeay RSA functions */ -const RSA_METHOD *RSA_PKCS1_SSLeay(void); - -const RSA_METHOD *RSA_null_method(void); - -DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPublicKey) -DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPrivateKey) - -#ifndef OPENSSL_NO_FP_API -int RSA_print_fp(FILE *fp, const RSA *r,int offset); -#endif - -#ifndef OPENSSL_NO_BIO -int RSA_print(BIO *bp, const RSA *r,int offset); -#endif - -#ifndef OPENSSL_NO_RC4 -int i2d_RSA_NET(const RSA *a, unsigned char **pp, - int (*cb)(char *buf, int len, const char *prompt, int verify), - int sgckey); -RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length, - int (*cb)(char *buf, int len, const char *prompt, int verify), - int sgckey); - -int i2d_Netscape_RSA(const RSA *a, unsigned char **pp, - int (*cb)(char *buf, int len, const char *prompt, - int verify)); -RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length, - int (*cb)(char *buf, int len, const char *prompt, - int verify)); -#endif - -/* The following 2 functions sign and verify a X509_SIG ASN1 object - * inside PKCS#1 padded RSA encryption */ -int RSA_sign(int type, const unsigned char *m, unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, RSA *rsa); -int RSA_verify(int type, const unsigned char *m, unsigned int m_length, - unsigned char *sigbuf, unsigned int siglen, RSA *rsa); - -/* The following 2 function sign and verify a ASN1_OCTET_STRING - * object inside PKCS#1 padded RSA encryption */ -int RSA_sign_ASN1_OCTET_STRING(int type, - const unsigned char *m, unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, RSA *rsa); -int RSA_verify_ASN1_OCTET_STRING(int type, - const unsigned char *m, unsigned int m_length, - unsigned char *sigbuf, unsigned int siglen, RSA *rsa); - -int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); -void RSA_blinding_off(RSA *rsa); -BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); - -int RSA_padding_add_PKCS1_type_1(unsigned char *to,int tlen, - const unsigned char *f,int fl); -int RSA_padding_check_PKCS1_type_1(unsigned char *to,int tlen, - const unsigned char *f,int fl,int rsa_len); -int RSA_padding_add_PKCS1_type_2(unsigned char *to,int tlen, - const unsigned char *f,int fl); -int RSA_padding_check_PKCS1_type_2(unsigned char *to,int tlen, - const unsigned char *f,int fl,int rsa_len); -int PKCS1_MGF1(unsigned char *mask, long len, - const unsigned char *seed, long seedlen, const EVP_MD *dgst); -int RSA_padding_add_PKCS1_OAEP(unsigned char *to,int tlen, - const unsigned char *f,int fl, - const unsigned char *p,int pl); -int RSA_padding_check_PKCS1_OAEP(unsigned char *to,int tlen, - const unsigned char *f,int fl,int rsa_len, - const unsigned char *p,int pl); -int RSA_padding_add_SSLv23(unsigned char *to,int tlen, - const unsigned char *f,int fl); -int RSA_padding_check_SSLv23(unsigned char *to,int tlen, - const unsigned char *f,int fl,int rsa_len); -int RSA_padding_add_none(unsigned char *to,int tlen, - const unsigned char *f,int fl); -int RSA_padding_check_none(unsigned char *to,int tlen, - const unsigned char *f,int fl,int rsa_len); -int RSA_padding_add_X931(unsigned char *to,int tlen, - const unsigned char *f,int fl); -int RSA_padding_check_X931(unsigned char *to,int tlen, - const unsigned char *f,int fl,int rsa_len); -int RSA_X931_hash_id(int nid); - -int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash, - const EVP_MD *Hash, const unsigned char *EM, int sLen); -int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, - const unsigned char *mHash, - const EVP_MD *Hash, int sLen); - -int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int RSA_set_ex_data(RSA *r,int idx,void *arg); -void *RSA_get_ex_data(const RSA *r, int idx); - -RSA *RSAPublicKey_dup(RSA *rsa); -RSA *RSAPrivateKey_dup(RSA *rsa); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_RSA_strings(void); - -/* Error codes for the RSA functions. */ - -/* Function codes. */ -#define RSA_F_FIPS_RSA_SIGN 140 -#define RSA_F_FIPS_RSA_VERIFY 141 -#define RSA_F_MEMORY_LOCK 100 -#define RSA_F_RSA_BUILTIN_KEYGEN 129 -#define RSA_F_RSA_CHECK_KEY 123 -#define RSA_F_RSA_EAY_PRIVATE_DECRYPT 101 -#define RSA_F_RSA_EAY_PRIVATE_ENCRYPT 102 -#define RSA_F_RSA_EAY_PUBLIC_DECRYPT 103 -#define RSA_F_RSA_EAY_PUBLIC_ENCRYPT 104 -#define RSA_F_RSA_GENERATE_KEY 105 -#define RSA_F_RSA_MEMORY_LOCK 130 -#define RSA_F_RSA_NEW_METHOD 106 -#define RSA_F_RSA_NULL 124 -#define RSA_F_RSA_NULL_MOD_EXP 131 -#define RSA_F_RSA_NULL_PRIVATE_DECRYPT 132 -#define RSA_F_RSA_NULL_PRIVATE_ENCRYPT 133 -#define RSA_F_RSA_NULL_PUBLIC_DECRYPT 134 -#define RSA_F_RSA_NULL_PUBLIC_ENCRYPT 135 -#define RSA_F_RSA_PADDING_ADD_NONE 107 -#define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP 121 -#define RSA_F_RSA_PADDING_ADD_PKCS1_PSS 125 -#define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1 108 -#define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2 109 -#define RSA_F_RSA_PADDING_ADD_SSLV23 110 -#define RSA_F_RSA_PADDING_ADD_X931 127 -#define RSA_F_RSA_PADDING_CHECK_NONE 111 -#define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP 122 -#define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1 112 -#define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2 113 -#define RSA_F_RSA_PADDING_CHECK_SSLV23 114 -#define RSA_F_RSA_PADDING_CHECK_X931 128 -#define RSA_F_RSA_PRINT 115 -#define RSA_F_RSA_PRINT_FP 116 -#define RSA_F_RSA_PRIVATE_ENCRYPT 137 -#define RSA_F_RSA_PUBLIC_DECRYPT 138 -#define RSA_F_RSA_SETUP_BLINDING 136 -#define RSA_F_RSA_SET_DEFAULT_METHOD 139 -#define RSA_F_RSA_SET_METHOD 142 -#define RSA_F_RSA_SIGN 117 -#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118 -#define RSA_F_RSA_VERIFY 119 -#define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120 -#define RSA_F_RSA_VERIFY_PKCS1_PSS 126 - -/* Reason codes. */ -#define RSA_R_ALGORITHM_MISMATCH 100 -#define RSA_R_BAD_E_VALUE 101 -#define RSA_R_BAD_FIXED_HEADER_DECRYPT 102 -#define RSA_R_BAD_PAD_BYTE_COUNT 103 -#define RSA_R_BAD_SIGNATURE 104 -#define RSA_R_BLOCK_TYPE_IS_NOT_01 106 -#define RSA_R_BLOCK_TYPE_IS_NOT_02 107 -#define RSA_R_DATA_GREATER_THAN_MOD_LEN 108 -#define RSA_R_DATA_TOO_LARGE 109 -#define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 110 -#define RSA_R_DATA_TOO_LARGE_FOR_MODULUS 132 -#define RSA_R_DATA_TOO_SMALL 111 -#define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 122 -#define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112 -#define RSA_R_DMP1_NOT_CONGRUENT_TO_D 124 -#define RSA_R_DMQ1_NOT_CONGRUENT_TO_D 125 -#define RSA_R_D_E_NOT_CONGRUENT_TO_1 123 -#define RSA_R_FIRST_OCTET_INVALID 133 -#define RSA_R_INVALID_HEADER 137 -#define RSA_R_INVALID_MESSAGE_LENGTH 131 -#define RSA_R_INVALID_PADDING 138 -#define RSA_R_INVALID_TRAILER 139 -#define RSA_R_IQMP_NOT_INVERSE_OF_Q 126 -#define RSA_R_KEY_SIZE_TOO_SMALL 120 -#define RSA_R_LAST_OCTET_INVALID 134 -#define RSA_R_MODULUS_TOO_LARGE 105 -#define RSA_R_NON_FIPS_METHOD 141 -#define RSA_R_NO_PUBLIC_EXPONENT 140 -#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113 -#define RSA_R_N_DOES_NOT_EQUAL_P_Q 127 -#define RSA_R_OAEP_DECODING_ERROR 121 -#define RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE 142 -#define RSA_R_PADDING_CHECK_FAILED 114 -#define RSA_R_P_NOT_PRIME 128 -#define RSA_R_Q_NOT_PRIME 129 -#define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED 130 -#define RSA_R_SLEN_CHECK_FAILED 136 -#define RSA_R_SLEN_RECOVERY_FAILED 135 -#define RSA_R_SSLV3_ROLLBACK_ATTACK 115 -#define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116 -#define RSA_R_UNKNOWN_ALGORITHM_TYPE 117 -#define RSA_R_UNKNOWN_PADDING_TYPE 118 -#define RSA_R_WRONG_SIGNATURE_LENGTH 119 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/safestack.h b/externals/openssl/safestack.h deleted file mode 100644 index 40b17902e0..0000000000 --- a/externals/openssl/safestack.h +++ /dev/null @@ -1,2030 +0,0 @@ -/* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_SAFESTACK_H -#define HEADER_SAFESTACK_H - -#include - -#ifdef DEBUG_SAFESTACK - -#ifndef CHECKED_PTR_OF -#define CHECKED_PTR_OF(type, p) \ - ((void*) (1 ? p : (type*)0)) -#endif - -#define CHECKED_SK_FREE_FUNC(type, p) \ - ((void (*)(void *)) ((1 ? p : (void (*)(type *))0))) - -#define CHECKED_SK_CMP_FUNC(type, p) \ - ((int (*)(const char * const *, const char * const *)) \ - ((1 ? p : (int (*)(const type * const *, const type * const *))0))) - -#define STACK_OF(type) struct stack_st_##type -#define PREDECLARE_STACK_OF(type) STACK_OF(type); - -#define DECLARE_STACK_OF(type) \ -STACK_OF(type) \ - { \ - STACK stack; \ - }; - -#define IMPLEMENT_STACK_OF(type) /* nada (obsolete in new safestack approach)*/ - -/* SKM_sk_... stack macros are internal to safestack.h: - * never use them directly, use sk__... instead */ -#define SKM_sk_new(type, cmp) \ - ((STACK_OF(type) *)sk_new(CHECKED_SK_CMP_FUNC(type, cmp))) -#define SKM_sk_new_null(type) \ - ((STACK_OF(type) *)sk_new_null()) -#define SKM_sk_free(type, st) \ - sk_free(CHECKED_PTR_OF(STACK_OF(type), st)) -#define SKM_sk_num(type, st) \ - sk_num(CHECKED_PTR_OF(STACK_OF(type), st)) -#define SKM_sk_value(type, st,i) \ - ((type *)sk_value(CHECKED_PTR_OF(STACK_OF(type), st), i)) -#define SKM_sk_set(type, st,i,val) \ - sk_set(CHECKED_PTR_OF(STACK_OF(type), st), i, CHECKED_PTR_OF(type, val)) -#define SKM_sk_zero(type, st) \ - sk_zero(CHECKED_PTR_OF(STACK_OF(type), st)) -#define SKM_sk_push(type, st,val) \ - sk_push(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, val)) -#define SKM_sk_unshift(type, st,val) \ - sk_unshift(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, val)) -#define SKM_sk_find(type, st,val) \ - sk_find(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, val)) -#define SKM_sk_delete(type, st,i) \ - (type *)sk_delete(CHECKED_PTR_OF(STACK_OF(type), st), i) -#define SKM_sk_delete_ptr(type, st,ptr) \ - (type *)sk_delete_ptr(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, ptr)) -#define SKM_sk_insert(type, st,val,i) \ - sk_insert(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, val), i) -#define SKM_sk_set_cmp_func(type, st,cmp) \ - ((int (*)(const type * const *,const type * const *)) \ - sk_set_cmp_func(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_SK_CMP_FUNC(type, cmp))) -#define SKM_sk_dup(type, st) \ - (STACK_OF(type) *)sk_dup(CHECKED_PTR_OF(STACK_OF(type), st)) -#define SKM_sk_pop_free(type, st,free_func) \ - sk_pop_free(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_SK_FREE_FUNC(type, free_func)) -#define SKM_sk_shift(type, st) \ - (type *)sk_shift(CHECKED_PTR_OF(STACK_OF(type), st)) -#define SKM_sk_pop(type, st) \ - (type *)sk_pop(CHECKED_PTR_OF(STACK_OF(type), st)) -#define SKM_sk_sort(type, st) \ - sk_sort(CHECKED_PTR_OF(STACK_OF(type), st)) -#define SKM_sk_is_sorted(type, st) \ - sk_is_sorted(CHECKED_PTR_OF(STACK_OF(type), st)) - -#define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - (STACK_OF(type) *)d2i_ASN1_SET(CHECKED_PTR_OF(STACK_OF(type), st), \ - pp, length, \ - CHECKED_D2I_OF(type, d2i_func), \ - CHECKED_SK_FREE_FUNC(type, free_func), \ - ex_tag, ex_class) - -#define SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \ - i2d_ASN1_SET(CHECKED_PTR_OF(STACK_OF(type), st), pp, \ - CHECKED_I2D_OF(type, i2d_func), \ - ex_tag, ex_class, is_set) - -#define SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \ - ASN1_seq_pack(CHECKED_PTR_OF(STACK_OF(type), st), \ - CHECKED_I2D_OF(type, i2d_func), buf, len) - -#define SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \ - (STACK_OF(type) *)ASN1_seq_unpack(buf, len, CHECKED_D2I_OF(type, d2i_func), CHECKED_SK_FREE_FUNC(type, free_func)) - -#define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ - (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \ - CHECKED_D2I_OF(type, d2i_func), \ - CHECKED_SK_FREE_FUNC(type, free_func), \ - pass, passlen, oct, seq) - -#else - -#define STACK_OF(type) STACK -#define PREDECLARE_STACK_OF(type) /* nada */ -#define DECLARE_STACK_OF(type) /* nada */ -#define IMPLEMENT_STACK_OF(type) /* nada */ - -#define SKM_sk_new(type, cmp) \ - sk_new((int (*)(const char * const *, const char * const *))(cmp)) -#define SKM_sk_new_null(type) \ - sk_new_null() -#define SKM_sk_free(type, st) \ - sk_free(st) -#define SKM_sk_num(type, st) \ - sk_num(st) -#define SKM_sk_value(type, st,i) \ - ((type *)sk_value(st, i)) -#define SKM_sk_set(type, st,i,val) \ - ((type *)sk_set(st, i,(char *)val)) -#define SKM_sk_zero(type, st) \ - sk_zero(st) -#define SKM_sk_push(type, st,val) \ - sk_push(st, (char *)val) -#define SKM_sk_unshift(type, st,val) \ - sk_unshift(st, (char *)val) -#define SKM_sk_find(type, st,val) \ - sk_find(st, (char *)val) -#define SKM_sk_delete(type, st,i) \ - ((type *)sk_delete(st, i)) -#define SKM_sk_delete_ptr(type, st,ptr) \ - ((type *)sk_delete_ptr(st,(char *)ptr)) -#define SKM_sk_insert(type, st,val,i) \ - sk_insert(st, (char *)val, i) -#define SKM_sk_set_cmp_func(type, st,cmp) \ - ((int (*)(const type * const *,const type * const *)) \ - sk_set_cmp_func(st, (int (*)(const char * const *, const char * const *))(cmp))) -#define SKM_sk_dup(type, st) \ - sk_dup(st) -#define SKM_sk_pop_free(type, st,free_func) \ - sk_pop_free(st, (void (*)(void *))free_func) -#define SKM_sk_shift(type, st) \ - ((type *)sk_shift(st)) -#define SKM_sk_pop(type, st) \ - ((type *)sk_pop(st)) -#define SKM_sk_sort(type, st) \ - sk_sort(st) -#define SKM_sk_is_sorted(type, st) \ - sk_is_sorted(st) - -#define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - d2i_ASN1_SET(st,pp,length, (void *(*)(void ** ,const unsigned char ** ,long))d2i_func, (void (*)(void *))free_func, ex_tag,ex_class) -#define SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \ - i2d_ASN1_SET(st,pp,(int (*)(void *, unsigned char **))i2d_func,ex_tag,ex_class,is_set) - -#define SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \ - ASN1_seq_pack(st, (int (*)(void *, unsigned char **))i2d_func, buf, len) -#define SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \ - ASN1_seq_unpack(buf,len,(void *(*)(void **,const unsigned char **,long))d2i_func, (void(*)(void *))free_func) - -#define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ - ((STACK *)PKCS12_decrypt_d2i(algor,(char *(*)())d2i_func, (void(*)(void *))free_func,pass,passlen,oct,seq)) - -#endif - -/* This block of defines is updated by util/mkstack.pl, please do not touch! */ -#define sk_ACCESS_DESCRIPTION_new(st) SKM_sk_new(ACCESS_DESCRIPTION, (st)) -#define sk_ACCESS_DESCRIPTION_new_null() SKM_sk_new_null(ACCESS_DESCRIPTION) -#define sk_ACCESS_DESCRIPTION_free(st) SKM_sk_free(ACCESS_DESCRIPTION, (st)) -#define sk_ACCESS_DESCRIPTION_num(st) SKM_sk_num(ACCESS_DESCRIPTION, (st)) -#define sk_ACCESS_DESCRIPTION_value(st, i) SKM_sk_value(ACCESS_DESCRIPTION, (st), (i)) -#define sk_ACCESS_DESCRIPTION_set(st, i, val) SKM_sk_set(ACCESS_DESCRIPTION, (st), (i), (val)) -#define sk_ACCESS_DESCRIPTION_zero(st) SKM_sk_zero(ACCESS_DESCRIPTION, (st)) -#define sk_ACCESS_DESCRIPTION_push(st, val) SKM_sk_push(ACCESS_DESCRIPTION, (st), (val)) -#define sk_ACCESS_DESCRIPTION_unshift(st, val) SKM_sk_unshift(ACCESS_DESCRIPTION, (st), (val)) -#define sk_ACCESS_DESCRIPTION_find(st, val) SKM_sk_find(ACCESS_DESCRIPTION, (st), (val)) -#define sk_ACCESS_DESCRIPTION_find_ex(st, val) SKM_sk_find_ex(ACCESS_DESCRIPTION, (st), (val)) -#define sk_ACCESS_DESCRIPTION_delete(st, i) SKM_sk_delete(ACCESS_DESCRIPTION, (st), (i)) -#define sk_ACCESS_DESCRIPTION_delete_ptr(st, ptr) SKM_sk_delete_ptr(ACCESS_DESCRIPTION, (st), (ptr)) -#define sk_ACCESS_DESCRIPTION_insert(st, val, i) SKM_sk_insert(ACCESS_DESCRIPTION, (st), (val), (i)) -#define sk_ACCESS_DESCRIPTION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ACCESS_DESCRIPTION, (st), (cmp)) -#define sk_ACCESS_DESCRIPTION_dup(st) SKM_sk_dup(ACCESS_DESCRIPTION, st) -#define sk_ACCESS_DESCRIPTION_pop_free(st, free_func) SKM_sk_pop_free(ACCESS_DESCRIPTION, (st), (free_func)) -#define sk_ACCESS_DESCRIPTION_shift(st) SKM_sk_shift(ACCESS_DESCRIPTION, (st)) -#define sk_ACCESS_DESCRIPTION_pop(st) SKM_sk_pop(ACCESS_DESCRIPTION, (st)) -#define sk_ACCESS_DESCRIPTION_sort(st) SKM_sk_sort(ACCESS_DESCRIPTION, (st)) -#define sk_ACCESS_DESCRIPTION_is_sorted(st) SKM_sk_is_sorted(ACCESS_DESCRIPTION, (st)) - -#define sk_ASIdOrRange_new(st) SKM_sk_new(ASIdOrRange, (st)) -#define sk_ASIdOrRange_new_null() SKM_sk_new_null(ASIdOrRange) -#define sk_ASIdOrRange_free(st) SKM_sk_free(ASIdOrRange, (st)) -#define sk_ASIdOrRange_num(st) SKM_sk_num(ASIdOrRange, (st)) -#define sk_ASIdOrRange_value(st, i) SKM_sk_value(ASIdOrRange, (st), (i)) -#define sk_ASIdOrRange_set(st, i, val) SKM_sk_set(ASIdOrRange, (st), (i), (val)) -#define sk_ASIdOrRange_zero(st) SKM_sk_zero(ASIdOrRange, (st)) -#define sk_ASIdOrRange_push(st, val) SKM_sk_push(ASIdOrRange, (st), (val)) -#define sk_ASIdOrRange_unshift(st, val) SKM_sk_unshift(ASIdOrRange, (st), (val)) -#define sk_ASIdOrRange_find(st, val) SKM_sk_find(ASIdOrRange, (st), (val)) -#define sk_ASIdOrRange_find_ex(st, val) SKM_sk_find_ex(ASIdOrRange, (st), (val)) -#define sk_ASIdOrRange_delete(st, i) SKM_sk_delete(ASIdOrRange, (st), (i)) -#define sk_ASIdOrRange_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASIdOrRange, (st), (ptr)) -#define sk_ASIdOrRange_insert(st, val, i) SKM_sk_insert(ASIdOrRange, (st), (val), (i)) -#define sk_ASIdOrRange_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASIdOrRange, (st), (cmp)) -#define sk_ASIdOrRange_dup(st) SKM_sk_dup(ASIdOrRange, st) -#define sk_ASIdOrRange_pop_free(st, free_func) SKM_sk_pop_free(ASIdOrRange, (st), (free_func)) -#define sk_ASIdOrRange_shift(st) SKM_sk_shift(ASIdOrRange, (st)) -#define sk_ASIdOrRange_pop(st) SKM_sk_pop(ASIdOrRange, (st)) -#define sk_ASIdOrRange_sort(st) SKM_sk_sort(ASIdOrRange, (st)) -#define sk_ASIdOrRange_is_sorted(st) SKM_sk_is_sorted(ASIdOrRange, (st)) - -#define sk_ASN1_GENERALSTRING_new(st) SKM_sk_new(ASN1_GENERALSTRING, (st)) -#define sk_ASN1_GENERALSTRING_new_null() SKM_sk_new_null(ASN1_GENERALSTRING) -#define sk_ASN1_GENERALSTRING_free(st) SKM_sk_free(ASN1_GENERALSTRING, (st)) -#define sk_ASN1_GENERALSTRING_num(st) SKM_sk_num(ASN1_GENERALSTRING, (st)) -#define sk_ASN1_GENERALSTRING_value(st, i) SKM_sk_value(ASN1_GENERALSTRING, (st), (i)) -#define sk_ASN1_GENERALSTRING_set(st, i, val) SKM_sk_set(ASN1_GENERALSTRING, (st), (i), (val)) -#define sk_ASN1_GENERALSTRING_zero(st) SKM_sk_zero(ASN1_GENERALSTRING, (st)) -#define sk_ASN1_GENERALSTRING_push(st, val) SKM_sk_push(ASN1_GENERALSTRING, (st), (val)) -#define sk_ASN1_GENERALSTRING_unshift(st, val) SKM_sk_unshift(ASN1_GENERALSTRING, (st), (val)) -#define sk_ASN1_GENERALSTRING_find(st, val) SKM_sk_find(ASN1_GENERALSTRING, (st), (val)) -#define sk_ASN1_GENERALSTRING_find_ex(st, val) SKM_sk_find_ex(ASN1_GENERALSTRING, (st), (val)) -#define sk_ASN1_GENERALSTRING_delete(st, i) SKM_sk_delete(ASN1_GENERALSTRING, (st), (i)) -#define sk_ASN1_GENERALSTRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_GENERALSTRING, (st), (ptr)) -#define sk_ASN1_GENERALSTRING_insert(st, val, i) SKM_sk_insert(ASN1_GENERALSTRING, (st), (val), (i)) -#define sk_ASN1_GENERALSTRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_GENERALSTRING, (st), (cmp)) -#define sk_ASN1_GENERALSTRING_dup(st) SKM_sk_dup(ASN1_GENERALSTRING, st) -#define sk_ASN1_GENERALSTRING_pop_free(st, free_func) SKM_sk_pop_free(ASN1_GENERALSTRING, (st), (free_func)) -#define sk_ASN1_GENERALSTRING_shift(st) SKM_sk_shift(ASN1_GENERALSTRING, (st)) -#define sk_ASN1_GENERALSTRING_pop(st) SKM_sk_pop(ASN1_GENERALSTRING, (st)) -#define sk_ASN1_GENERALSTRING_sort(st) SKM_sk_sort(ASN1_GENERALSTRING, (st)) -#define sk_ASN1_GENERALSTRING_is_sorted(st) SKM_sk_is_sorted(ASN1_GENERALSTRING, (st)) - -#define sk_ASN1_INTEGER_new(st) SKM_sk_new(ASN1_INTEGER, (st)) -#define sk_ASN1_INTEGER_new_null() SKM_sk_new_null(ASN1_INTEGER) -#define sk_ASN1_INTEGER_free(st) SKM_sk_free(ASN1_INTEGER, (st)) -#define sk_ASN1_INTEGER_num(st) SKM_sk_num(ASN1_INTEGER, (st)) -#define sk_ASN1_INTEGER_value(st, i) SKM_sk_value(ASN1_INTEGER, (st), (i)) -#define sk_ASN1_INTEGER_set(st, i, val) SKM_sk_set(ASN1_INTEGER, (st), (i), (val)) -#define sk_ASN1_INTEGER_zero(st) SKM_sk_zero(ASN1_INTEGER, (st)) -#define sk_ASN1_INTEGER_push(st, val) SKM_sk_push(ASN1_INTEGER, (st), (val)) -#define sk_ASN1_INTEGER_unshift(st, val) SKM_sk_unshift(ASN1_INTEGER, (st), (val)) -#define sk_ASN1_INTEGER_find(st, val) SKM_sk_find(ASN1_INTEGER, (st), (val)) -#define sk_ASN1_INTEGER_find_ex(st, val) SKM_sk_find_ex(ASN1_INTEGER, (st), (val)) -#define sk_ASN1_INTEGER_delete(st, i) SKM_sk_delete(ASN1_INTEGER, (st), (i)) -#define sk_ASN1_INTEGER_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_INTEGER, (st), (ptr)) -#define sk_ASN1_INTEGER_insert(st, val, i) SKM_sk_insert(ASN1_INTEGER, (st), (val), (i)) -#define sk_ASN1_INTEGER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_INTEGER, (st), (cmp)) -#define sk_ASN1_INTEGER_dup(st) SKM_sk_dup(ASN1_INTEGER, st) -#define sk_ASN1_INTEGER_pop_free(st, free_func) SKM_sk_pop_free(ASN1_INTEGER, (st), (free_func)) -#define sk_ASN1_INTEGER_shift(st) SKM_sk_shift(ASN1_INTEGER, (st)) -#define sk_ASN1_INTEGER_pop(st) SKM_sk_pop(ASN1_INTEGER, (st)) -#define sk_ASN1_INTEGER_sort(st) SKM_sk_sort(ASN1_INTEGER, (st)) -#define sk_ASN1_INTEGER_is_sorted(st) SKM_sk_is_sorted(ASN1_INTEGER, (st)) - -#define sk_ASN1_OBJECT_new(st) SKM_sk_new(ASN1_OBJECT, (st)) -#define sk_ASN1_OBJECT_new_null() SKM_sk_new_null(ASN1_OBJECT) -#define sk_ASN1_OBJECT_free(st) SKM_sk_free(ASN1_OBJECT, (st)) -#define sk_ASN1_OBJECT_num(st) SKM_sk_num(ASN1_OBJECT, (st)) -#define sk_ASN1_OBJECT_value(st, i) SKM_sk_value(ASN1_OBJECT, (st), (i)) -#define sk_ASN1_OBJECT_set(st, i, val) SKM_sk_set(ASN1_OBJECT, (st), (i), (val)) -#define sk_ASN1_OBJECT_zero(st) SKM_sk_zero(ASN1_OBJECT, (st)) -#define sk_ASN1_OBJECT_push(st, val) SKM_sk_push(ASN1_OBJECT, (st), (val)) -#define sk_ASN1_OBJECT_unshift(st, val) SKM_sk_unshift(ASN1_OBJECT, (st), (val)) -#define sk_ASN1_OBJECT_find(st, val) SKM_sk_find(ASN1_OBJECT, (st), (val)) -#define sk_ASN1_OBJECT_find_ex(st, val) SKM_sk_find_ex(ASN1_OBJECT, (st), (val)) -#define sk_ASN1_OBJECT_delete(st, i) SKM_sk_delete(ASN1_OBJECT, (st), (i)) -#define sk_ASN1_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_OBJECT, (st), (ptr)) -#define sk_ASN1_OBJECT_insert(st, val, i) SKM_sk_insert(ASN1_OBJECT, (st), (val), (i)) -#define sk_ASN1_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_OBJECT, (st), (cmp)) -#define sk_ASN1_OBJECT_dup(st) SKM_sk_dup(ASN1_OBJECT, st) -#define sk_ASN1_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(ASN1_OBJECT, (st), (free_func)) -#define sk_ASN1_OBJECT_shift(st) SKM_sk_shift(ASN1_OBJECT, (st)) -#define sk_ASN1_OBJECT_pop(st) SKM_sk_pop(ASN1_OBJECT, (st)) -#define sk_ASN1_OBJECT_sort(st) SKM_sk_sort(ASN1_OBJECT, (st)) -#define sk_ASN1_OBJECT_is_sorted(st) SKM_sk_is_sorted(ASN1_OBJECT, (st)) - -#define sk_ASN1_STRING_TABLE_new(st) SKM_sk_new(ASN1_STRING_TABLE, (st)) -#define sk_ASN1_STRING_TABLE_new_null() SKM_sk_new_null(ASN1_STRING_TABLE) -#define sk_ASN1_STRING_TABLE_free(st) SKM_sk_free(ASN1_STRING_TABLE, (st)) -#define sk_ASN1_STRING_TABLE_num(st) SKM_sk_num(ASN1_STRING_TABLE, (st)) -#define sk_ASN1_STRING_TABLE_value(st, i) SKM_sk_value(ASN1_STRING_TABLE, (st), (i)) -#define sk_ASN1_STRING_TABLE_set(st, i, val) SKM_sk_set(ASN1_STRING_TABLE, (st), (i), (val)) -#define sk_ASN1_STRING_TABLE_zero(st) SKM_sk_zero(ASN1_STRING_TABLE, (st)) -#define sk_ASN1_STRING_TABLE_push(st, val) SKM_sk_push(ASN1_STRING_TABLE, (st), (val)) -#define sk_ASN1_STRING_TABLE_unshift(st, val) SKM_sk_unshift(ASN1_STRING_TABLE, (st), (val)) -#define sk_ASN1_STRING_TABLE_find(st, val) SKM_sk_find(ASN1_STRING_TABLE, (st), (val)) -#define sk_ASN1_STRING_TABLE_find_ex(st, val) SKM_sk_find_ex(ASN1_STRING_TABLE, (st), (val)) -#define sk_ASN1_STRING_TABLE_delete(st, i) SKM_sk_delete(ASN1_STRING_TABLE, (st), (i)) -#define sk_ASN1_STRING_TABLE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_STRING_TABLE, (st), (ptr)) -#define sk_ASN1_STRING_TABLE_insert(st, val, i) SKM_sk_insert(ASN1_STRING_TABLE, (st), (val), (i)) -#define sk_ASN1_STRING_TABLE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_STRING_TABLE, (st), (cmp)) -#define sk_ASN1_STRING_TABLE_dup(st) SKM_sk_dup(ASN1_STRING_TABLE, st) -#define sk_ASN1_STRING_TABLE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_STRING_TABLE, (st), (free_func)) -#define sk_ASN1_STRING_TABLE_shift(st) SKM_sk_shift(ASN1_STRING_TABLE, (st)) -#define sk_ASN1_STRING_TABLE_pop(st) SKM_sk_pop(ASN1_STRING_TABLE, (st)) -#define sk_ASN1_STRING_TABLE_sort(st) SKM_sk_sort(ASN1_STRING_TABLE, (st)) -#define sk_ASN1_STRING_TABLE_is_sorted(st) SKM_sk_is_sorted(ASN1_STRING_TABLE, (st)) - -#define sk_ASN1_TYPE_new(st) SKM_sk_new(ASN1_TYPE, (st)) -#define sk_ASN1_TYPE_new_null() SKM_sk_new_null(ASN1_TYPE) -#define sk_ASN1_TYPE_free(st) SKM_sk_free(ASN1_TYPE, (st)) -#define sk_ASN1_TYPE_num(st) SKM_sk_num(ASN1_TYPE, (st)) -#define sk_ASN1_TYPE_value(st, i) SKM_sk_value(ASN1_TYPE, (st), (i)) -#define sk_ASN1_TYPE_set(st, i, val) SKM_sk_set(ASN1_TYPE, (st), (i), (val)) -#define sk_ASN1_TYPE_zero(st) SKM_sk_zero(ASN1_TYPE, (st)) -#define sk_ASN1_TYPE_push(st, val) SKM_sk_push(ASN1_TYPE, (st), (val)) -#define sk_ASN1_TYPE_unshift(st, val) SKM_sk_unshift(ASN1_TYPE, (st), (val)) -#define sk_ASN1_TYPE_find(st, val) SKM_sk_find(ASN1_TYPE, (st), (val)) -#define sk_ASN1_TYPE_find_ex(st, val) SKM_sk_find_ex(ASN1_TYPE, (st), (val)) -#define sk_ASN1_TYPE_delete(st, i) SKM_sk_delete(ASN1_TYPE, (st), (i)) -#define sk_ASN1_TYPE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_TYPE, (st), (ptr)) -#define sk_ASN1_TYPE_insert(st, val, i) SKM_sk_insert(ASN1_TYPE, (st), (val), (i)) -#define sk_ASN1_TYPE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_TYPE, (st), (cmp)) -#define sk_ASN1_TYPE_dup(st) SKM_sk_dup(ASN1_TYPE, st) -#define sk_ASN1_TYPE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_TYPE, (st), (free_func)) -#define sk_ASN1_TYPE_shift(st) SKM_sk_shift(ASN1_TYPE, (st)) -#define sk_ASN1_TYPE_pop(st) SKM_sk_pop(ASN1_TYPE, (st)) -#define sk_ASN1_TYPE_sort(st) SKM_sk_sort(ASN1_TYPE, (st)) -#define sk_ASN1_TYPE_is_sorted(st) SKM_sk_is_sorted(ASN1_TYPE, (st)) - -#define sk_ASN1_VALUE_new(st) SKM_sk_new(ASN1_VALUE, (st)) -#define sk_ASN1_VALUE_new_null() SKM_sk_new_null(ASN1_VALUE) -#define sk_ASN1_VALUE_free(st) SKM_sk_free(ASN1_VALUE, (st)) -#define sk_ASN1_VALUE_num(st) SKM_sk_num(ASN1_VALUE, (st)) -#define sk_ASN1_VALUE_value(st, i) SKM_sk_value(ASN1_VALUE, (st), (i)) -#define sk_ASN1_VALUE_set(st, i, val) SKM_sk_set(ASN1_VALUE, (st), (i), (val)) -#define sk_ASN1_VALUE_zero(st) SKM_sk_zero(ASN1_VALUE, (st)) -#define sk_ASN1_VALUE_push(st, val) SKM_sk_push(ASN1_VALUE, (st), (val)) -#define sk_ASN1_VALUE_unshift(st, val) SKM_sk_unshift(ASN1_VALUE, (st), (val)) -#define sk_ASN1_VALUE_find(st, val) SKM_sk_find(ASN1_VALUE, (st), (val)) -#define sk_ASN1_VALUE_find_ex(st, val) SKM_sk_find_ex(ASN1_VALUE, (st), (val)) -#define sk_ASN1_VALUE_delete(st, i) SKM_sk_delete(ASN1_VALUE, (st), (i)) -#define sk_ASN1_VALUE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_VALUE, (st), (ptr)) -#define sk_ASN1_VALUE_insert(st, val, i) SKM_sk_insert(ASN1_VALUE, (st), (val), (i)) -#define sk_ASN1_VALUE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_VALUE, (st), (cmp)) -#define sk_ASN1_VALUE_dup(st) SKM_sk_dup(ASN1_VALUE, st) -#define sk_ASN1_VALUE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_VALUE, (st), (free_func)) -#define sk_ASN1_VALUE_shift(st) SKM_sk_shift(ASN1_VALUE, (st)) -#define sk_ASN1_VALUE_pop(st) SKM_sk_pop(ASN1_VALUE, (st)) -#define sk_ASN1_VALUE_sort(st) SKM_sk_sort(ASN1_VALUE, (st)) -#define sk_ASN1_VALUE_is_sorted(st) SKM_sk_is_sorted(ASN1_VALUE, (st)) - -#define sk_BIO_new(st) SKM_sk_new(BIO, (st)) -#define sk_BIO_new_null() SKM_sk_new_null(BIO) -#define sk_BIO_free(st) SKM_sk_free(BIO, (st)) -#define sk_BIO_num(st) SKM_sk_num(BIO, (st)) -#define sk_BIO_value(st, i) SKM_sk_value(BIO, (st), (i)) -#define sk_BIO_set(st, i, val) SKM_sk_set(BIO, (st), (i), (val)) -#define sk_BIO_zero(st) SKM_sk_zero(BIO, (st)) -#define sk_BIO_push(st, val) SKM_sk_push(BIO, (st), (val)) -#define sk_BIO_unshift(st, val) SKM_sk_unshift(BIO, (st), (val)) -#define sk_BIO_find(st, val) SKM_sk_find(BIO, (st), (val)) -#define sk_BIO_find_ex(st, val) SKM_sk_find_ex(BIO, (st), (val)) -#define sk_BIO_delete(st, i) SKM_sk_delete(BIO, (st), (i)) -#define sk_BIO_delete_ptr(st, ptr) SKM_sk_delete_ptr(BIO, (st), (ptr)) -#define sk_BIO_insert(st, val, i) SKM_sk_insert(BIO, (st), (val), (i)) -#define sk_BIO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BIO, (st), (cmp)) -#define sk_BIO_dup(st) SKM_sk_dup(BIO, st) -#define sk_BIO_pop_free(st, free_func) SKM_sk_pop_free(BIO, (st), (free_func)) -#define sk_BIO_shift(st) SKM_sk_shift(BIO, (st)) -#define sk_BIO_pop(st) SKM_sk_pop(BIO, (st)) -#define sk_BIO_sort(st) SKM_sk_sort(BIO, (st)) -#define sk_BIO_is_sorted(st) SKM_sk_is_sorted(BIO, (st)) - -#define sk_CMS_CertificateChoices_new(st) SKM_sk_new(CMS_CertificateChoices, (st)) -#define sk_CMS_CertificateChoices_new_null() SKM_sk_new_null(CMS_CertificateChoices) -#define sk_CMS_CertificateChoices_free(st) SKM_sk_free(CMS_CertificateChoices, (st)) -#define sk_CMS_CertificateChoices_num(st) SKM_sk_num(CMS_CertificateChoices, (st)) -#define sk_CMS_CertificateChoices_value(st, i) SKM_sk_value(CMS_CertificateChoices, (st), (i)) -#define sk_CMS_CertificateChoices_set(st, i, val) SKM_sk_set(CMS_CertificateChoices, (st), (i), (val)) -#define sk_CMS_CertificateChoices_zero(st) SKM_sk_zero(CMS_CertificateChoices, (st)) -#define sk_CMS_CertificateChoices_push(st, val) SKM_sk_push(CMS_CertificateChoices, (st), (val)) -#define sk_CMS_CertificateChoices_unshift(st, val) SKM_sk_unshift(CMS_CertificateChoices, (st), (val)) -#define sk_CMS_CertificateChoices_find(st, val) SKM_sk_find(CMS_CertificateChoices, (st), (val)) -#define sk_CMS_CertificateChoices_find_ex(st, val) SKM_sk_find_ex(CMS_CertificateChoices, (st), (val)) -#define sk_CMS_CertificateChoices_delete(st, i) SKM_sk_delete(CMS_CertificateChoices, (st), (i)) -#define sk_CMS_CertificateChoices_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_CertificateChoices, (st), (ptr)) -#define sk_CMS_CertificateChoices_insert(st, val, i) SKM_sk_insert(CMS_CertificateChoices, (st), (val), (i)) -#define sk_CMS_CertificateChoices_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_CertificateChoices, (st), (cmp)) -#define sk_CMS_CertificateChoices_dup(st) SKM_sk_dup(CMS_CertificateChoices, st) -#define sk_CMS_CertificateChoices_pop_free(st, free_func) SKM_sk_pop_free(CMS_CertificateChoices, (st), (free_func)) -#define sk_CMS_CertificateChoices_shift(st) SKM_sk_shift(CMS_CertificateChoices, (st)) -#define sk_CMS_CertificateChoices_pop(st) SKM_sk_pop(CMS_CertificateChoices, (st)) -#define sk_CMS_CertificateChoices_sort(st) SKM_sk_sort(CMS_CertificateChoices, (st)) -#define sk_CMS_CertificateChoices_is_sorted(st) SKM_sk_is_sorted(CMS_CertificateChoices, (st)) - -#define sk_CMS_RecipientInfo_new(st) SKM_sk_new(CMS_RecipientInfo, (st)) -#define sk_CMS_RecipientInfo_new_null() SKM_sk_new_null(CMS_RecipientInfo) -#define sk_CMS_RecipientInfo_free(st) SKM_sk_free(CMS_RecipientInfo, (st)) -#define sk_CMS_RecipientInfo_num(st) SKM_sk_num(CMS_RecipientInfo, (st)) -#define sk_CMS_RecipientInfo_value(st, i) SKM_sk_value(CMS_RecipientInfo, (st), (i)) -#define sk_CMS_RecipientInfo_set(st, i, val) SKM_sk_set(CMS_RecipientInfo, (st), (i), (val)) -#define sk_CMS_RecipientInfo_zero(st) SKM_sk_zero(CMS_RecipientInfo, (st)) -#define sk_CMS_RecipientInfo_push(st, val) SKM_sk_push(CMS_RecipientInfo, (st), (val)) -#define sk_CMS_RecipientInfo_unshift(st, val) SKM_sk_unshift(CMS_RecipientInfo, (st), (val)) -#define sk_CMS_RecipientInfo_find(st, val) SKM_sk_find(CMS_RecipientInfo, (st), (val)) -#define sk_CMS_RecipientInfo_find_ex(st, val) SKM_sk_find_ex(CMS_RecipientInfo, (st), (val)) -#define sk_CMS_RecipientInfo_delete(st, i) SKM_sk_delete(CMS_RecipientInfo, (st), (i)) -#define sk_CMS_RecipientInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RecipientInfo, (st), (ptr)) -#define sk_CMS_RecipientInfo_insert(st, val, i) SKM_sk_insert(CMS_RecipientInfo, (st), (val), (i)) -#define sk_CMS_RecipientInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RecipientInfo, (st), (cmp)) -#define sk_CMS_RecipientInfo_dup(st) SKM_sk_dup(CMS_RecipientInfo, st) -#define sk_CMS_RecipientInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_RecipientInfo, (st), (free_func)) -#define sk_CMS_RecipientInfo_shift(st) SKM_sk_shift(CMS_RecipientInfo, (st)) -#define sk_CMS_RecipientInfo_pop(st) SKM_sk_pop(CMS_RecipientInfo, (st)) -#define sk_CMS_RecipientInfo_sort(st) SKM_sk_sort(CMS_RecipientInfo, (st)) -#define sk_CMS_RecipientInfo_is_sorted(st) SKM_sk_is_sorted(CMS_RecipientInfo, (st)) - -#define sk_CMS_RevocationInfoChoice_new(st) SKM_sk_new(CMS_RevocationInfoChoice, (st)) -#define sk_CMS_RevocationInfoChoice_new_null() SKM_sk_new_null(CMS_RevocationInfoChoice) -#define sk_CMS_RevocationInfoChoice_free(st) SKM_sk_free(CMS_RevocationInfoChoice, (st)) -#define sk_CMS_RevocationInfoChoice_num(st) SKM_sk_num(CMS_RevocationInfoChoice, (st)) -#define sk_CMS_RevocationInfoChoice_value(st, i) SKM_sk_value(CMS_RevocationInfoChoice, (st), (i)) -#define sk_CMS_RevocationInfoChoice_set(st, i, val) SKM_sk_set(CMS_RevocationInfoChoice, (st), (i), (val)) -#define sk_CMS_RevocationInfoChoice_zero(st) SKM_sk_zero(CMS_RevocationInfoChoice, (st)) -#define sk_CMS_RevocationInfoChoice_push(st, val) SKM_sk_push(CMS_RevocationInfoChoice, (st), (val)) -#define sk_CMS_RevocationInfoChoice_unshift(st, val) SKM_sk_unshift(CMS_RevocationInfoChoice, (st), (val)) -#define sk_CMS_RevocationInfoChoice_find(st, val) SKM_sk_find(CMS_RevocationInfoChoice, (st), (val)) -#define sk_CMS_RevocationInfoChoice_find_ex(st, val) SKM_sk_find_ex(CMS_RevocationInfoChoice, (st), (val)) -#define sk_CMS_RevocationInfoChoice_delete(st, i) SKM_sk_delete(CMS_RevocationInfoChoice, (st), (i)) -#define sk_CMS_RevocationInfoChoice_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RevocationInfoChoice, (st), (ptr)) -#define sk_CMS_RevocationInfoChoice_insert(st, val, i) SKM_sk_insert(CMS_RevocationInfoChoice, (st), (val), (i)) -#define sk_CMS_RevocationInfoChoice_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RevocationInfoChoice, (st), (cmp)) -#define sk_CMS_RevocationInfoChoice_dup(st) SKM_sk_dup(CMS_RevocationInfoChoice, st) -#define sk_CMS_RevocationInfoChoice_pop_free(st, free_func) SKM_sk_pop_free(CMS_RevocationInfoChoice, (st), (free_func)) -#define sk_CMS_RevocationInfoChoice_shift(st) SKM_sk_shift(CMS_RevocationInfoChoice, (st)) -#define sk_CMS_RevocationInfoChoice_pop(st) SKM_sk_pop(CMS_RevocationInfoChoice, (st)) -#define sk_CMS_RevocationInfoChoice_sort(st) SKM_sk_sort(CMS_RevocationInfoChoice, (st)) -#define sk_CMS_RevocationInfoChoice_is_sorted(st) SKM_sk_is_sorted(CMS_RevocationInfoChoice, (st)) - -#define sk_CMS_SignerInfo_new(st) SKM_sk_new(CMS_SignerInfo, (st)) -#define sk_CMS_SignerInfo_new_null() SKM_sk_new_null(CMS_SignerInfo) -#define sk_CMS_SignerInfo_free(st) SKM_sk_free(CMS_SignerInfo, (st)) -#define sk_CMS_SignerInfo_num(st) SKM_sk_num(CMS_SignerInfo, (st)) -#define sk_CMS_SignerInfo_value(st, i) SKM_sk_value(CMS_SignerInfo, (st), (i)) -#define sk_CMS_SignerInfo_set(st, i, val) SKM_sk_set(CMS_SignerInfo, (st), (i), (val)) -#define sk_CMS_SignerInfo_zero(st) SKM_sk_zero(CMS_SignerInfo, (st)) -#define sk_CMS_SignerInfo_push(st, val) SKM_sk_push(CMS_SignerInfo, (st), (val)) -#define sk_CMS_SignerInfo_unshift(st, val) SKM_sk_unshift(CMS_SignerInfo, (st), (val)) -#define sk_CMS_SignerInfo_find(st, val) SKM_sk_find(CMS_SignerInfo, (st), (val)) -#define sk_CMS_SignerInfo_find_ex(st, val) SKM_sk_find_ex(CMS_SignerInfo, (st), (val)) -#define sk_CMS_SignerInfo_delete(st, i) SKM_sk_delete(CMS_SignerInfo, (st), (i)) -#define sk_CMS_SignerInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_SignerInfo, (st), (ptr)) -#define sk_CMS_SignerInfo_insert(st, val, i) SKM_sk_insert(CMS_SignerInfo, (st), (val), (i)) -#define sk_CMS_SignerInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_SignerInfo, (st), (cmp)) -#define sk_CMS_SignerInfo_dup(st) SKM_sk_dup(CMS_SignerInfo, st) -#define sk_CMS_SignerInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_SignerInfo, (st), (free_func)) -#define sk_CMS_SignerInfo_shift(st) SKM_sk_shift(CMS_SignerInfo, (st)) -#define sk_CMS_SignerInfo_pop(st) SKM_sk_pop(CMS_SignerInfo, (st)) -#define sk_CMS_SignerInfo_sort(st) SKM_sk_sort(CMS_SignerInfo, (st)) -#define sk_CMS_SignerInfo_is_sorted(st) SKM_sk_is_sorted(CMS_SignerInfo, (st)) - -#define sk_CONF_IMODULE_new(st) SKM_sk_new(CONF_IMODULE, (st)) -#define sk_CONF_IMODULE_new_null() SKM_sk_new_null(CONF_IMODULE) -#define sk_CONF_IMODULE_free(st) SKM_sk_free(CONF_IMODULE, (st)) -#define sk_CONF_IMODULE_num(st) SKM_sk_num(CONF_IMODULE, (st)) -#define sk_CONF_IMODULE_value(st, i) SKM_sk_value(CONF_IMODULE, (st), (i)) -#define sk_CONF_IMODULE_set(st, i, val) SKM_sk_set(CONF_IMODULE, (st), (i), (val)) -#define sk_CONF_IMODULE_zero(st) SKM_sk_zero(CONF_IMODULE, (st)) -#define sk_CONF_IMODULE_push(st, val) SKM_sk_push(CONF_IMODULE, (st), (val)) -#define sk_CONF_IMODULE_unshift(st, val) SKM_sk_unshift(CONF_IMODULE, (st), (val)) -#define sk_CONF_IMODULE_find(st, val) SKM_sk_find(CONF_IMODULE, (st), (val)) -#define sk_CONF_IMODULE_find_ex(st, val) SKM_sk_find_ex(CONF_IMODULE, (st), (val)) -#define sk_CONF_IMODULE_delete(st, i) SKM_sk_delete(CONF_IMODULE, (st), (i)) -#define sk_CONF_IMODULE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_IMODULE, (st), (ptr)) -#define sk_CONF_IMODULE_insert(st, val, i) SKM_sk_insert(CONF_IMODULE, (st), (val), (i)) -#define sk_CONF_IMODULE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_IMODULE, (st), (cmp)) -#define sk_CONF_IMODULE_dup(st) SKM_sk_dup(CONF_IMODULE, st) -#define sk_CONF_IMODULE_pop_free(st, free_func) SKM_sk_pop_free(CONF_IMODULE, (st), (free_func)) -#define sk_CONF_IMODULE_shift(st) SKM_sk_shift(CONF_IMODULE, (st)) -#define sk_CONF_IMODULE_pop(st) SKM_sk_pop(CONF_IMODULE, (st)) -#define sk_CONF_IMODULE_sort(st) SKM_sk_sort(CONF_IMODULE, (st)) -#define sk_CONF_IMODULE_is_sorted(st) SKM_sk_is_sorted(CONF_IMODULE, (st)) - -#define sk_CONF_MODULE_new(st) SKM_sk_new(CONF_MODULE, (st)) -#define sk_CONF_MODULE_new_null() SKM_sk_new_null(CONF_MODULE) -#define sk_CONF_MODULE_free(st) SKM_sk_free(CONF_MODULE, (st)) -#define sk_CONF_MODULE_num(st) SKM_sk_num(CONF_MODULE, (st)) -#define sk_CONF_MODULE_value(st, i) SKM_sk_value(CONF_MODULE, (st), (i)) -#define sk_CONF_MODULE_set(st, i, val) SKM_sk_set(CONF_MODULE, (st), (i), (val)) -#define sk_CONF_MODULE_zero(st) SKM_sk_zero(CONF_MODULE, (st)) -#define sk_CONF_MODULE_push(st, val) SKM_sk_push(CONF_MODULE, (st), (val)) -#define sk_CONF_MODULE_unshift(st, val) SKM_sk_unshift(CONF_MODULE, (st), (val)) -#define sk_CONF_MODULE_find(st, val) SKM_sk_find(CONF_MODULE, (st), (val)) -#define sk_CONF_MODULE_find_ex(st, val) SKM_sk_find_ex(CONF_MODULE, (st), (val)) -#define sk_CONF_MODULE_delete(st, i) SKM_sk_delete(CONF_MODULE, (st), (i)) -#define sk_CONF_MODULE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_MODULE, (st), (ptr)) -#define sk_CONF_MODULE_insert(st, val, i) SKM_sk_insert(CONF_MODULE, (st), (val), (i)) -#define sk_CONF_MODULE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_MODULE, (st), (cmp)) -#define sk_CONF_MODULE_dup(st) SKM_sk_dup(CONF_MODULE, st) -#define sk_CONF_MODULE_pop_free(st, free_func) SKM_sk_pop_free(CONF_MODULE, (st), (free_func)) -#define sk_CONF_MODULE_shift(st) SKM_sk_shift(CONF_MODULE, (st)) -#define sk_CONF_MODULE_pop(st) SKM_sk_pop(CONF_MODULE, (st)) -#define sk_CONF_MODULE_sort(st) SKM_sk_sort(CONF_MODULE, (st)) -#define sk_CONF_MODULE_is_sorted(st) SKM_sk_is_sorted(CONF_MODULE, (st)) - -#define sk_CONF_VALUE_new(st) SKM_sk_new(CONF_VALUE, (st)) -#define sk_CONF_VALUE_new_null() SKM_sk_new_null(CONF_VALUE) -#define sk_CONF_VALUE_free(st) SKM_sk_free(CONF_VALUE, (st)) -#define sk_CONF_VALUE_num(st) SKM_sk_num(CONF_VALUE, (st)) -#define sk_CONF_VALUE_value(st, i) SKM_sk_value(CONF_VALUE, (st), (i)) -#define sk_CONF_VALUE_set(st, i, val) SKM_sk_set(CONF_VALUE, (st), (i), (val)) -#define sk_CONF_VALUE_zero(st) SKM_sk_zero(CONF_VALUE, (st)) -#define sk_CONF_VALUE_push(st, val) SKM_sk_push(CONF_VALUE, (st), (val)) -#define sk_CONF_VALUE_unshift(st, val) SKM_sk_unshift(CONF_VALUE, (st), (val)) -#define sk_CONF_VALUE_find(st, val) SKM_sk_find(CONF_VALUE, (st), (val)) -#define sk_CONF_VALUE_find_ex(st, val) SKM_sk_find_ex(CONF_VALUE, (st), (val)) -#define sk_CONF_VALUE_delete(st, i) SKM_sk_delete(CONF_VALUE, (st), (i)) -#define sk_CONF_VALUE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_VALUE, (st), (ptr)) -#define sk_CONF_VALUE_insert(st, val, i) SKM_sk_insert(CONF_VALUE, (st), (val), (i)) -#define sk_CONF_VALUE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_VALUE, (st), (cmp)) -#define sk_CONF_VALUE_dup(st) SKM_sk_dup(CONF_VALUE, st) -#define sk_CONF_VALUE_pop_free(st, free_func) SKM_sk_pop_free(CONF_VALUE, (st), (free_func)) -#define sk_CONF_VALUE_shift(st) SKM_sk_shift(CONF_VALUE, (st)) -#define sk_CONF_VALUE_pop(st) SKM_sk_pop(CONF_VALUE, (st)) -#define sk_CONF_VALUE_sort(st) SKM_sk_sort(CONF_VALUE, (st)) -#define sk_CONF_VALUE_is_sorted(st) SKM_sk_is_sorted(CONF_VALUE, (st)) - -#define sk_CRYPTO_EX_DATA_FUNCS_new(st) SKM_sk_new(CRYPTO_EX_DATA_FUNCS, (st)) -#define sk_CRYPTO_EX_DATA_FUNCS_new_null() SKM_sk_new_null(CRYPTO_EX_DATA_FUNCS) -#define sk_CRYPTO_EX_DATA_FUNCS_free(st) SKM_sk_free(CRYPTO_EX_DATA_FUNCS, (st)) -#define sk_CRYPTO_EX_DATA_FUNCS_num(st) SKM_sk_num(CRYPTO_EX_DATA_FUNCS, (st)) -#define sk_CRYPTO_EX_DATA_FUNCS_value(st, i) SKM_sk_value(CRYPTO_EX_DATA_FUNCS, (st), (i)) -#define sk_CRYPTO_EX_DATA_FUNCS_set(st, i, val) SKM_sk_set(CRYPTO_EX_DATA_FUNCS, (st), (i), (val)) -#define sk_CRYPTO_EX_DATA_FUNCS_zero(st) SKM_sk_zero(CRYPTO_EX_DATA_FUNCS, (st)) -#define sk_CRYPTO_EX_DATA_FUNCS_push(st, val) SKM_sk_push(CRYPTO_EX_DATA_FUNCS, (st), (val)) -#define sk_CRYPTO_EX_DATA_FUNCS_unshift(st, val) SKM_sk_unshift(CRYPTO_EX_DATA_FUNCS, (st), (val)) -#define sk_CRYPTO_EX_DATA_FUNCS_find(st, val) SKM_sk_find(CRYPTO_EX_DATA_FUNCS, (st), (val)) -#define sk_CRYPTO_EX_DATA_FUNCS_find_ex(st, val) SKM_sk_find_ex(CRYPTO_EX_DATA_FUNCS, (st), (val)) -#define sk_CRYPTO_EX_DATA_FUNCS_delete(st, i) SKM_sk_delete(CRYPTO_EX_DATA_FUNCS, (st), (i)) -#define sk_CRYPTO_EX_DATA_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_EX_DATA_FUNCS, (st), (ptr)) -#define sk_CRYPTO_EX_DATA_FUNCS_insert(st, val, i) SKM_sk_insert(CRYPTO_EX_DATA_FUNCS, (st), (val), (i)) -#define sk_CRYPTO_EX_DATA_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_EX_DATA_FUNCS, (st), (cmp)) -#define sk_CRYPTO_EX_DATA_FUNCS_dup(st) SKM_sk_dup(CRYPTO_EX_DATA_FUNCS, st) -#define sk_CRYPTO_EX_DATA_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_EX_DATA_FUNCS, (st), (free_func)) -#define sk_CRYPTO_EX_DATA_FUNCS_shift(st) SKM_sk_shift(CRYPTO_EX_DATA_FUNCS, (st)) -#define sk_CRYPTO_EX_DATA_FUNCS_pop(st) SKM_sk_pop(CRYPTO_EX_DATA_FUNCS, (st)) -#define sk_CRYPTO_EX_DATA_FUNCS_sort(st) SKM_sk_sort(CRYPTO_EX_DATA_FUNCS, (st)) -#define sk_CRYPTO_EX_DATA_FUNCS_is_sorted(st) SKM_sk_is_sorted(CRYPTO_EX_DATA_FUNCS, (st)) - -#define sk_CRYPTO_dynlock_new(st) SKM_sk_new(CRYPTO_dynlock, (st)) -#define sk_CRYPTO_dynlock_new_null() SKM_sk_new_null(CRYPTO_dynlock) -#define sk_CRYPTO_dynlock_free(st) SKM_sk_free(CRYPTO_dynlock, (st)) -#define sk_CRYPTO_dynlock_num(st) SKM_sk_num(CRYPTO_dynlock, (st)) -#define sk_CRYPTO_dynlock_value(st, i) SKM_sk_value(CRYPTO_dynlock, (st), (i)) -#define sk_CRYPTO_dynlock_set(st, i, val) SKM_sk_set(CRYPTO_dynlock, (st), (i), (val)) -#define sk_CRYPTO_dynlock_zero(st) SKM_sk_zero(CRYPTO_dynlock, (st)) -#define sk_CRYPTO_dynlock_push(st, val) SKM_sk_push(CRYPTO_dynlock, (st), (val)) -#define sk_CRYPTO_dynlock_unshift(st, val) SKM_sk_unshift(CRYPTO_dynlock, (st), (val)) -#define sk_CRYPTO_dynlock_find(st, val) SKM_sk_find(CRYPTO_dynlock, (st), (val)) -#define sk_CRYPTO_dynlock_find_ex(st, val) SKM_sk_find_ex(CRYPTO_dynlock, (st), (val)) -#define sk_CRYPTO_dynlock_delete(st, i) SKM_sk_delete(CRYPTO_dynlock, (st), (i)) -#define sk_CRYPTO_dynlock_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_dynlock, (st), (ptr)) -#define sk_CRYPTO_dynlock_insert(st, val, i) SKM_sk_insert(CRYPTO_dynlock, (st), (val), (i)) -#define sk_CRYPTO_dynlock_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_dynlock, (st), (cmp)) -#define sk_CRYPTO_dynlock_dup(st) SKM_sk_dup(CRYPTO_dynlock, st) -#define sk_CRYPTO_dynlock_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_dynlock, (st), (free_func)) -#define sk_CRYPTO_dynlock_shift(st) SKM_sk_shift(CRYPTO_dynlock, (st)) -#define sk_CRYPTO_dynlock_pop(st) SKM_sk_pop(CRYPTO_dynlock, (st)) -#define sk_CRYPTO_dynlock_sort(st) SKM_sk_sort(CRYPTO_dynlock, (st)) -#define sk_CRYPTO_dynlock_is_sorted(st) SKM_sk_is_sorted(CRYPTO_dynlock, (st)) - -#define sk_DIST_POINT_new(st) SKM_sk_new(DIST_POINT, (st)) -#define sk_DIST_POINT_new_null() SKM_sk_new_null(DIST_POINT) -#define sk_DIST_POINT_free(st) SKM_sk_free(DIST_POINT, (st)) -#define sk_DIST_POINT_num(st) SKM_sk_num(DIST_POINT, (st)) -#define sk_DIST_POINT_value(st, i) SKM_sk_value(DIST_POINT, (st), (i)) -#define sk_DIST_POINT_set(st, i, val) SKM_sk_set(DIST_POINT, (st), (i), (val)) -#define sk_DIST_POINT_zero(st) SKM_sk_zero(DIST_POINT, (st)) -#define sk_DIST_POINT_push(st, val) SKM_sk_push(DIST_POINT, (st), (val)) -#define sk_DIST_POINT_unshift(st, val) SKM_sk_unshift(DIST_POINT, (st), (val)) -#define sk_DIST_POINT_find(st, val) SKM_sk_find(DIST_POINT, (st), (val)) -#define sk_DIST_POINT_find_ex(st, val) SKM_sk_find_ex(DIST_POINT, (st), (val)) -#define sk_DIST_POINT_delete(st, i) SKM_sk_delete(DIST_POINT, (st), (i)) -#define sk_DIST_POINT_delete_ptr(st, ptr) SKM_sk_delete_ptr(DIST_POINT, (st), (ptr)) -#define sk_DIST_POINT_insert(st, val, i) SKM_sk_insert(DIST_POINT, (st), (val), (i)) -#define sk_DIST_POINT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(DIST_POINT, (st), (cmp)) -#define sk_DIST_POINT_dup(st) SKM_sk_dup(DIST_POINT, st) -#define sk_DIST_POINT_pop_free(st, free_func) SKM_sk_pop_free(DIST_POINT, (st), (free_func)) -#define sk_DIST_POINT_shift(st) SKM_sk_shift(DIST_POINT, (st)) -#define sk_DIST_POINT_pop(st) SKM_sk_pop(DIST_POINT, (st)) -#define sk_DIST_POINT_sort(st) SKM_sk_sort(DIST_POINT, (st)) -#define sk_DIST_POINT_is_sorted(st) SKM_sk_is_sorted(DIST_POINT, (st)) - -#define sk_ENGINE_new(st) SKM_sk_new(ENGINE, (st)) -#define sk_ENGINE_new_null() SKM_sk_new_null(ENGINE) -#define sk_ENGINE_free(st) SKM_sk_free(ENGINE, (st)) -#define sk_ENGINE_num(st) SKM_sk_num(ENGINE, (st)) -#define sk_ENGINE_value(st, i) SKM_sk_value(ENGINE, (st), (i)) -#define sk_ENGINE_set(st, i, val) SKM_sk_set(ENGINE, (st), (i), (val)) -#define sk_ENGINE_zero(st) SKM_sk_zero(ENGINE, (st)) -#define sk_ENGINE_push(st, val) SKM_sk_push(ENGINE, (st), (val)) -#define sk_ENGINE_unshift(st, val) SKM_sk_unshift(ENGINE, (st), (val)) -#define sk_ENGINE_find(st, val) SKM_sk_find(ENGINE, (st), (val)) -#define sk_ENGINE_find_ex(st, val) SKM_sk_find_ex(ENGINE, (st), (val)) -#define sk_ENGINE_delete(st, i) SKM_sk_delete(ENGINE, (st), (i)) -#define sk_ENGINE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ENGINE, (st), (ptr)) -#define sk_ENGINE_insert(st, val, i) SKM_sk_insert(ENGINE, (st), (val), (i)) -#define sk_ENGINE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ENGINE, (st), (cmp)) -#define sk_ENGINE_dup(st) SKM_sk_dup(ENGINE, st) -#define sk_ENGINE_pop_free(st, free_func) SKM_sk_pop_free(ENGINE, (st), (free_func)) -#define sk_ENGINE_shift(st) SKM_sk_shift(ENGINE, (st)) -#define sk_ENGINE_pop(st) SKM_sk_pop(ENGINE, (st)) -#define sk_ENGINE_sort(st) SKM_sk_sort(ENGINE, (st)) -#define sk_ENGINE_is_sorted(st) SKM_sk_is_sorted(ENGINE, (st)) - -#define sk_ENGINE_CLEANUP_ITEM_new(st) SKM_sk_new(ENGINE_CLEANUP_ITEM, (st)) -#define sk_ENGINE_CLEANUP_ITEM_new_null() SKM_sk_new_null(ENGINE_CLEANUP_ITEM) -#define sk_ENGINE_CLEANUP_ITEM_free(st) SKM_sk_free(ENGINE_CLEANUP_ITEM, (st)) -#define sk_ENGINE_CLEANUP_ITEM_num(st) SKM_sk_num(ENGINE_CLEANUP_ITEM, (st)) -#define sk_ENGINE_CLEANUP_ITEM_value(st, i) SKM_sk_value(ENGINE_CLEANUP_ITEM, (st), (i)) -#define sk_ENGINE_CLEANUP_ITEM_set(st, i, val) SKM_sk_set(ENGINE_CLEANUP_ITEM, (st), (i), (val)) -#define sk_ENGINE_CLEANUP_ITEM_zero(st) SKM_sk_zero(ENGINE_CLEANUP_ITEM, (st)) -#define sk_ENGINE_CLEANUP_ITEM_push(st, val) SKM_sk_push(ENGINE_CLEANUP_ITEM, (st), (val)) -#define sk_ENGINE_CLEANUP_ITEM_unshift(st, val) SKM_sk_unshift(ENGINE_CLEANUP_ITEM, (st), (val)) -#define sk_ENGINE_CLEANUP_ITEM_find(st, val) SKM_sk_find(ENGINE_CLEANUP_ITEM, (st), (val)) -#define sk_ENGINE_CLEANUP_ITEM_find_ex(st, val) SKM_sk_find_ex(ENGINE_CLEANUP_ITEM, (st), (val)) -#define sk_ENGINE_CLEANUP_ITEM_delete(st, i) SKM_sk_delete(ENGINE_CLEANUP_ITEM, (st), (i)) -#define sk_ENGINE_CLEANUP_ITEM_delete_ptr(st, ptr) SKM_sk_delete_ptr(ENGINE_CLEANUP_ITEM, (st), (ptr)) -#define sk_ENGINE_CLEANUP_ITEM_insert(st, val, i) SKM_sk_insert(ENGINE_CLEANUP_ITEM, (st), (val), (i)) -#define sk_ENGINE_CLEANUP_ITEM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ENGINE_CLEANUP_ITEM, (st), (cmp)) -#define sk_ENGINE_CLEANUP_ITEM_dup(st) SKM_sk_dup(ENGINE_CLEANUP_ITEM, st) -#define sk_ENGINE_CLEANUP_ITEM_pop_free(st, free_func) SKM_sk_pop_free(ENGINE_CLEANUP_ITEM, (st), (free_func)) -#define sk_ENGINE_CLEANUP_ITEM_shift(st) SKM_sk_shift(ENGINE_CLEANUP_ITEM, (st)) -#define sk_ENGINE_CLEANUP_ITEM_pop(st) SKM_sk_pop(ENGINE_CLEANUP_ITEM, (st)) -#define sk_ENGINE_CLEANUP_ITEM_sort(st) SKM_sk_sort(ENGINE_CLEANUP_ITEM, (st)) -#define sk_ENGINE_CLEANUP_ITEM_is_sorted(st) SKM_sk_is_sorted(ENGINE_CLEANUP_ITEM, (st)) - -#define sk_GENERAL_NAME_new(st) SKM_sk_new(GENERAL_NAME, (st)) -#define sk_GENERAL_NAME_new_null() SKM_sk_new_null(GENERAL_NAME) -#define sk_GENERAL_NAME_free(st) SKM_sk_free(GENERAL_NAME, (st)) -#define sk_GENERAL_NAME_num(st) SKM_sk_num(GENERAL_NAME, (st)) -#define sk_GENERAL_NAME_value(st, i) SKM_sk_value(GENERAL_NAME, (st), (i)) -#define sk_GENERAL_NAME_set(st, i, val) SKM_sk_set(GENERAL_NAME, (st), (i), (val)) -#define sk_GENERAL_NAME_zero(st) SKM_sk_zero(GENERAL_NAME, (st)) -#define sk_GENERAL_NAME_push(st, val) SKM_sk_push(GENERAL_NAME, (st), (val)) -#define sk_GENERAL_NAME_unshift(st, val) SKM_sk_unshift(GENERAL_NAME, (st), (val)) -#define sk_GENERAL_NAME_find(st, val) SKM_sk_find(GENERAL_NAME, (st), (val)) -#define sk_GENERAL_NAME_find_ex(st, val) SKM_sk_find_ex(GENERAL_NAME, (st), (val)) -#define sk_GENERAL_NAME_delete(st, i) SKM_sk_delete(GENERAL_NAME, (st), (i)) -#define sk_GENERAL_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_NAME, (st), (ptr)) -#define sk_GENERAL_NAME_insert(st, val, i) SKM_sk_insert(GENERAL_NAME, (st), (val), (i)) -#define sk_GENERAL_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_NAME, (st), (cmp)) -#define sk_GENERAL_NAME_dup(st) SKM_sk_dup(GENERAL_NAME, st) -#define sk_GENERAL_NAME_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_NAME, (st), (free_func)) -#define sk_GENERAL_NAME_shift(st) SKM_sk_shift(GENERAL_NAME, (st)) -#define sk_GENERAL_NAME_pop(st) SKM_sk_pop(GENERAL_NAME, (st)) -#define sk_GENERAL_NAME_sort(st) SKM_sk_sort(GENERAL_NAME, (st)) -#define sk_GENERAL_NAME_is_sorted(st) SKM_sk_is_sorted(GENERAL_NAME, (st)) - -#define sk_GENERAL_NAMES_new(st) SKM_sk_new(GENERAL_NAMES, (st)) -#define sk_GENERAL_NAMES_new_null() SKM_sk_new_null(GENERAL_NAMES) -#define sk_GENERAL_NAMES_free(st) SKM_sk_free(GENERAL_NAMES, (st)) -#define sk_GENERAL_NAMES_num(st) SKM_sk_num(GENERAL_NAMES, (st)) -#define sk_GENERAL_NAMES_value(st, i) SKM_sk_value(GENERAL_NAMES, (st), (i)) -#define sk_GENERAL_NAMES_set(st, i, val) SKM_sk_set(GENERAL_NAMES, (st), (i), (val)) -#define sk_GENERAL_NAMES_zero(st) SKM_sk_zero(GENERAL_NAMES, (st)) -#define sk_GENERAL_NAMES_push(st, val) SKM_sk_push(GENERAL_NAMES, (st), (val)) -#define sk_GENERAL_NAMES_unshift(st, val) SKM_sk_unshift(GENERAL_NAMES, (st), (val)) -#define sk_GENERAL_NAMES_find(st, val) SKM_sk_find(GENERAL_NAMES, (st), (val)) -#define sk_GENERAL_NAMES_find_ex(st, val) SKM_sk_find_ex(GENERAL_NAMES, (st), (val)) -#define sk_GENERAL_NAMES_delete(st, i) SKM_sk_delete(GENERAL_NAMES, (st), (i)) -#define sk_GENERAL_NAMES_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_NAMES, (st), (ptr)) -#define sk_GENERAL_NAMES_insert(st, val, i) SKM_sk_insert(GENERAL_NAMES, (st), (val), (i)) -#define sk_GENERAL_NAMES_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_NAMES, (st), (cmp)) -#define sk_GENERAL_NAMES_dup(st) SKM_sk_dup(GENERAL_NAMES, st) -#define sk_GENERAL_NAMES_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_NAMES, (st), (free_func)) -#define sk_GENERAL_NAMES_shift(st) SKM_sk_shift(GENERAL_NAMES, (st)) -#define sk_GENERAL_NAMES_pop(st) SKM_sk_pop(GENERAL_NAMES, (st)) -#define sk_GENERAL_NAMES_sort(st) SKM_sk_sort(GENERAL_NAMES, (st)) -#define sk_GENERAL_NAMES_is_sorted(st) SKM_sk_is_sorted(GENERAL_NAMES, (st)) - -#define sk_GENERAL_SUBTREE_new(st) SKM_sk_new(GENERAL_SUBTREE, (st)) -#define sk_GENERAL_SUBTREE_new_null() SKM_sk_new_null(GENERAL_SUBTREE) -#define sk_GENERAL_SUBTREE_free(st) SKM_sk_free(GENERAL_SUBTREE, (st)) -#define sk_GENERAL_SUBTREE_num(st) SKM_sk_num(GENERAL_SUBTREE, (st)) -#define sk_GENERAL_SUBTREE_value(st, i) SKM_sk_value(GENERAL_SUBTREE, (st), (i)) -#define sk_GENERAL_SUBTREE_set(st, i, val) SKM_sk_set(GENERAL_SUBTREE, (st), (i), (val)) -#define sk_GENERAL_SUBTREE_zero(st) SKM_sk_zero(GENERAL_SUBTREE, (st)) -#define sk_GENERAL_SUBTREE_push(st, val) SKM_sk_push(GENERAL_SUBTREE, (st), (val)) -#define sk_GENERAL_SUBTREE_unshift(st, val) SKM_sk_unshift(GENERAL_SUBTREE, (st), (val)) -#define sk_GENERAL_SUBTREE_find(st, val) SKM_sk_find(GENERAL_SUBTREE, (st), (val)) -#define sk_GENERAL_SUBTREE_find_ex(st, val) SKM_sk_find_ex(GENERAL_SUBTREE, (st), (val)) -#define sk_GENERAL_SUBTREE_delete(st, i) SKM_sk_delete(GENERAL_SUBTREE, (st), (i)) -#define sk_GENERAL_SUBTREE_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_SUBTREE, (st), (ptr)) -#define sk_GENERAL_SUBTREE_insert(st, val, i) SKM_sk_insert(GENERAL_SUBTREE, (st), (val), (i)) -#define sk_GENERAL_SUBTREE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_SUBTREE, (st), (cmp)) -#define sk_GENERAL_SUBTREE_dup(st) SKM_sk_dup(GENERAL_SUBTREE, st) -#define sk_GENERAL_SUBTREE_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_SUBTREE, (st), (free_func)) -#define sk_GENERAL_SUBTREE_shift(st) SKM_sk_shift(GENERAL_SUBTREE, (st)) -#define sk_GENERAL_SUBTREE_pop(st) SKM_sk_pop(GENERAL_SUBTREE, (st)) -#define sk_GENERAL_SUBTREE_sort(st) SKM_sk_sort(GENERAL_SUBTREE, (st)) -#define sk_GENERAL_SUBTREE_is_sorted(st) SKM_sk_is_sorted(GENERAL_SUBTREE, (st)) - -#define sk_IPAddressFamily_new(st) SKM_sk_new(IPAddressFamily, (st)) -#define sk_IPAddressFamily_new_null() SKM_sk_new_null(IPAddressFamily) -#define sk_IPAddressFamily_free(st) SKM_sk_free(IPAddressFamily, (st)) -#define sk_IPAddressFamily_num(st) SKM_sk_num(IPAddressFamily, (st)) -#define sk_IPAddressFamily_value(st, i) SKM_sk_value(IPAddressFamily, (st), (i)) -#define sk_IPAddressFamily_set(st, i, val) SKM_sk_set(IPAddressFamily, (st), (i), (val)) -#define sk_IPAddressFamily_zero(st) SKM_sk_zero(IPAddressFamily, (st)) -#define sk_IPAddressFamily_push(st, val) SKM_sk_push(IPAddressFamily, (st), (val)) -#define sk_IPAddressFamily_unshift(st, val) SKM_sk_unshift(IPAddressFamily, (st), (val)) -#define sk_IPAddressFamily_find(st, val) SKM_sk_find(IPAddressFamily, (st), (val)) -#define sk_IPAddressFamily_find_ex(st, val) SKM_sk_find_ex(IPAddressFamily, (st), (val)) -#define sk_IPAddressFamily_delete(st, i) SKM_sk_delete(IPAddressFamily, (st), (i)) -#define sk_IPAddressFamily_delete_ptr(st, ptr) SKM_sk_delete_ptr(IPAddressFamily, (st), (ptr)) -#define sk_IPAddressFamily_insert(st, val, i) SKM_sk_insert(IPAddressFamily, (st), (val), (i)) -#define sk_IPAddressFamily_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(IPAddressFamily, (st), (cmp)) -#define sk_IPAddressFamily_dup(st) SKM_sk_dup(IPAddressFamily, st) -#define sk_IPAddressFamily_pop_free(st, free_func) SKM_sk_pop_free(IPAddressFamily, (st), (free_func)) -#define sk_IPAddressFamily_shift(st) SKM_sk_shift(IPAddressFamily, (st)) -#define sk_IPAddressFamily_pop(st) SKM_sk_pop(IPAddressFamily, (st)) -#define sk_IPAddressFamily_sort(st) SKM_sk_sort(IPAddressFamily, (st)) -#define sk_IPAddressFamily_is_sorted(st) SKM_sk_is_sorted(IPAddressFamily, (st)) - -#define sk_IPAddressOrRange_new(st) SKM_sk_new(IPAddressOrRange, (st)) -#define sk_IPAddressOrRange_new_null() SKM_sk_new_null(IPAddressOrRange) -#define sk_IPAddressOrRange_free(st) SKM_sk_free(IPAddressOrRange, (st)) -#define sk_IPAddressOrRange_num(st) SKM_sk_num(IPAddressOrRange, (st)) -#define sk_IPAddressOrRange_value(st, i) SKM_sk_value(IPAddressOrRange, (st), (i)) -#define sk_IPAddressOrRange_set(st, i, val) SKM_sk_set(IPAddressOrRange, (st), (i), (val)) -#define sk_IPAddressOrRange_zero(st) SKM_sk_zero(IPAddressOrRange, (st)) -#define sk_IPAddressOrRange_push(st, val) SKM_sk_push(IPAddressOrRange, (st), (val)) -#define sk_IPAddressOrRange_unshift(st, val) SKM_sk_unshift(IPAddressOrRange, (st), (val)) -#define sk_IPAddressOrRange_find(st, val) SKM_sk_find(IPAddressOrRange, (st), (val)) -#define sk_IPAddressOrRange_find_ex(st, val) SKM_sk_find_ex(IPAddressOrRange, (st), (val)) -#define sk_IPAddressOrRange_delete(st, i) SKM_sk_delete(IPAddressOrRange, (st), (i)) -#define sk_IPAddressOrRange_delete_ptr(st, ptr) SKM_sk_delete_ptr(IPAddressOrRange, (st), (ptr)) -#define sk_IPAddressOrRange_insert(st, val, i) SKM_sk_insert(IPAddressOrRange, (st), (val), (i)) -#define sk_IPAddressOrRange_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(IPAddressOrRange, (st), (cmp)) -#define sk_IPAddressOrRange_dup(st) SKM_sk_dup(IPAddressOrRange, st) -#define sk_IPAddressOrRange_pop_free(st, free_func) SKM_sk_pop_free(IPAddressOrRange, (st), (free_func)) -#define sk_IPAddressOrRange_shift(st) SKM_sk_shift(IPAddressOrRange, (st)) -#define sk_IPAddressOrRange_pop(st) SKM_sk_pop(IPAddressOrRange, (st)) -#define sk_IPAddressOrRange_sort(st) SKM_sk_sort(IPAddressOrRange, (st)) -#define sk_IPAddressOrRange_is_sorted(st) SKM_sk_is_sorted(IPAddressOrRange, (st)) - -#define sk_KRB5_APREQBODY_new(st) SKM_sk_new(KRB5_APREQBODY, (st)) -#define sk_KRB5_APREQBODY_new_null() SKM_sk_new_null(KRB5_APREQBODY) -#define sk_KRB5_APREQBODY_free(st) SKM_sk_free(KRB5_APREQBODY, (st)) -#define sk_KRB5_APREQBODY_num(st) SKM_sk_num(KRB5_APREQBODY, (st)) -#define sk_KRB5_APREQBODY_value(st, i) SKM_sk_value(KRB5_APREQBODY, (st), (i)) -#define sk_KRB5_APREQBODY_set(st, i, val) SKM_sk_set(KRB5_APREQBODY, (st), (i), (val)) -#define sk_KRB5_APREQBODY_zero(st) SKM_sk_zero(KRB5_APREQBODY, (st)) -#define sk_KRB5_APREQBODY_push(st, val) SKM_sk_push(KRB5_APREQBODY, (st), (val)) -#define sk_KRB5_APREQBODY_unshift(st, val) SKM_sk_unshift(KRB5_APREQBODY, (st), (val)) -#define sk_KRB5_APREQBODY_find(st, val) SKM_sk_find(KRB5_APREQBODY, (st), (val)) -#define sk_KRB5_APREQBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_APREQBODY, (st), (val)) -#define sk_KRB5_APREQBODY_delete(st, i) SKM_sk_delete(KRB5_APREQBODY, (st), (i)) -#define sk_KRB5_APREQBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_APREQBODY, (st), (ptr)) -#define sk_KRB5_APREQBODY_insert(st, val, i) SKM_sk_insert(KRB5_APREQBODY, (st), (val), (i)) -#define sk_KRB5_APREQBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_APREQBODY, (st), (cmp)) -#define sk_KRB5_APREQBODY_dup(st) SKM_sk_dup(KRB5_APREQBODY, st) -#define sk_KRB5_APREQBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_APREQBODY, (st), (free_func)) -#define sk_KRB5_APREQBODY_shift(st) SKM_sk_shift(KRB5_APREQBODY, (st)) -#define sk_KRB5_APREQBODY_pop(st) SKM_sk_pop(KRB5_APREQBODY, (st)) -#define sk_KRB5_APREQBODY_sort(st) SKM_sk_sort(KRB5_APREQBODY, (st)) -#define sk_KRB5_APREQBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_APREQBODY, (st)) - -#define sk_KRB5_AUTHDATA_new(st) SKM_sk_new(KRB5_AUTHDATA, (st)) -#define sk_KRB5_AUTHDATA_new_null() SKM_sk_new_null(KRB5_AUTHDATA) -#define sk_KRB5_AUTHDATA_free(st) SKM_sk_free(KRB5_AUTHDATA, (st)) -#define sk_KRB5_AUTHDATA_num(st) SKM_sk_num(KRB5_AUTHDATA, (st)) -#define sk_KRB5_AUTHDATA_value(st, i) SKM_sk_value(KRB5_AUTHDATA, (st), (i)) -#define sk_KRB5_AUTHDATA_set(st, i, val) SKM_sk_set(KRB5_AUTHDATA, (st), (i), (val)) -#define sk_KRB5_AUTHDATA_zero(st) SKM_sk_zero(KRB5_AUTHDATA, (st)) -#define sk_KRB5_AUTHDATA_push(st, val) SKM_sk_push(KRB5_AUTHDATA, (st), (val)) -#define sk_KRB5_AUTHDATA_unshift(st, val) SKM_sk_unshift(KRB5_AUTHDATA, (st), (val)) -#define sk_KRB5_AUTHDATA_find(st, val) SKM_sk_find(KRB5_AUTHDATA, (st), (val)) -#define sk_KRB5_AUTHDATA_find_ex(st, val) SKM_sk_find_ex(KRB5_AUTHDATA, (st), (val)) -#define sk_KRB5_AUTHDATA_delete(st, i) SKM_sk_delete(KRB5_AUTHDATA, (st), (i)) -#define sk_KRB5_AUTHDATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_AUTHDATA, (st), (ptr)) -#define sk_KRB5_AUTHDATA_insert(st, val, i) SKM_sk_insert(KRB5_AUTHDATA, (st), (val), (i)) -#define sk_KRB5_AUTHDATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_AUTHDATA, (st), (cmp)) -#define sk_KRB5_AUTHDATA_dup(st) SKM_sk_dup(KRB5_AUTHDATA, st) -#define sk_KRB5_AUTHDATA_pop_free(st, free_func) SKM_sk_pop_free(KRB5_AUTHDATA, (st), (free_func)) -#define sk_KRB5_AUTHDATA_shift(st) SKM_sk_shift(KRB5_AUTHDATA, (st)) -#define sk_KRB5_AUTHDATA_pop(st) SKM_sk_pop(KRB5_AUTHDATA, (st)) -#define sk_KRB5_AUTHDATA_sort(st) SKM_sk_sort(KRB5_AUTHDATA, (st)) -#define sk_KRB5_AUTHDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHDATA, (st)) - -#define sk_KRB5_AUTHENTBODY_new(st) SKM_sk_new(KRB5_AUTHENTBODY, (st)) -#define sk_KRB5_AUTHENTBODY_new_null() SKM_sk_new_null(KRB5_AUTHENTBODY) -#define sk_KRB5_AUTHENTBODY_free(st) SKM_sk_free(KRB5_AUTHENTBODY, (st)) -#define sk_KRB5_AUTHENTBODY_num(st) SKM_sk_num(KRB5_AUTHENTBODY, (st)) -#define sk_KRB5_AUTHENTBODY_value(st, i) SKM_sk_value(KRB5_AUTHENTBODY, (st), (i)) -#define sk_KRB5_AUTHENTBODY_set(st, i, val) SKM_sk_set(KRB5_AUTHENTBODY, (st), (i), (val)) -#define sk_KRB5_AUTHENTBODY_zero(st) SKM_sk_zero(KRB5_AUTHENTBODY, (st)) -#define sk_KRB5_AUTHENTBODY_push(st, val) SKM_sk_push(KRB5_AUTHENTBODY, (st), (val)) -#define sk_KRB5_AUTHENTBODY_unshift(st, val) SKM_sk_unshift(KRB5_AUTHENTBODY, (st), (val)) -#define sk_KRB5_AUTHENTBODY_find(st, val) SKM_sk_find(KRB5_AUTHENTBODY, (st), (val)) -#define sk_KRB5_AUTHENTBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_AUTHENTBODY, (st), (val)) -#define sk_KRB5_AUTHENTBODY_delete(st, i) SKM_sk_delete(KRB5_AUTHENTBODY, (st), (i)) -#define sk_KRB5_AUTHENTBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_AUTHENTBODY, (st), (ptr)) -#define sk_KRB5_AUTHENTBODY_insert(st, val, i) SKM_sk_insert(KRB5_AUTHENTBODY, (st), (val), (i)) -#define sk_KRB5_AUTHENTBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_AUTHENTBODY, (st), (cmp)) -#define sk_KRB5_AUTHENTBODY_dup(st) SKM_sk_dup(KRB5_AUTHENTBODY, st) -#define sk_KRB5_AUTHENTBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_AUTHENTBODY, (st), (free_func)) -#define sk_KRB5_AUTHENTBODY_shift(st) SKM_sk_shift(KRB5_AUTHENTBODY, (st)) -#define sk_KRB5_AUTHENTBODY_pop(st) SKM_sk_pop(KRB5_AUTHENTBODY, (st)) -#define sk_KRB5_AUTHENTBODY_sort(st) SKM_sk_sort(KRB5_AUTHENTBODY, (st)) -#define sk_KRB5_AUTHENTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHENTBODY, (st)) - -#define sk_KRB5_CHECKSUM_new(st) SKM_sk_new(KRB5_CHECKSUM, (st)) -#define sk_KRB5_CHECKSUM_new_null() SKM_sk_new_null(KRB5_CHECKSUM) -#define sk_KRB5_CHECKSUM_free(st) SKM_sk_free(KRB5_CHECKSUM, (st)) -#define sk_KRB5_CHECKSUM_num(st) SKM_sk_num(KRB5_CHECKSUM, (st)) -#define sk_KRB5_CHECKSUM_value(st, i) SKM_sk_value(KRB5_CHECKSUM, (st), (i)) -#define sk_KRB5_CHECKSUM_set(st, i, val) SKM_sk_set(KRB5_CHECKSUM, (st), (i), (val)) -#define sk_KRB5_CHECKSUM_zero(st) SKM_sk_zero(KRB5_CHECKSUM, (st)) -#define sk_KRB5_CHECKSUM_push(st, val) SKM_sk_push(KRB5_CHECKSUM, (st), (val)) -#define sk_KRB5_CHECKSUM_unshift(st, val) SKM_sk_unshift(KRB5_CHECKSUM, (st), (val)) -#define sk_KRB5_CHECKSUM_find(st, val) SKM_sk_find(KRB5_CHECKSUM, (st), (val)) -#define sk_KRB5_CHECKSUM_find_ex(st, val) SKM_sk_find_ex(KRB5_CHECKSUM, (st), (val)) -#define sk_KRB5_CHECKSUM_delete(st, i) SKM_sk_delete(KRB5_CHECKSUM, (st), (i)) -#define sk_KRB5_CHECKSUM_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_CHECKSUM, (st), (ptr)) -#define sk_KRB5_CHECKSUM_insert(st, val, i) SKM_sk_insert(KRB5_CHECKSUM, (st), (val), (i)) -#define sk_KRB5_CHECKSUM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_CHECKSUM, (st), (cmp)) -#define sk_KRB5_CHECKSUM_dup(st) SKM_sk_dup(KRB5_CHECKSUM, st) -#define sk_KRB5_CHECKSUM_pop_free(st, free_func) SKM_sk_pop_free(KRB5_CHECKSUM, (st), (free_func)) -#define sk_KRB5_CHECKSUM_shift(st) SKM_sk_shift(KRB5_CHECKSUM, (st)) -#define sk_KRB5_CHECKSUM_pop(st) SKM_sk_pop(KRB5_CHECKSUM, (st)) -#define sk_KRB5_CHECKSUM_sort(st) SKM_sk_sort(KRB5_CHECKSUM, (st)) -#define sk_KRB5_CHECKSUM_is_sorted(st) SKM_sk_is_sorted(KRB5_CHECKSUM, (st)) - -#define sk_KRB5_ENCDATA_new(st) SKM_sk_new(KRB5_ENCDATA, (st)) -#define sk_KRB5_ENCDATA_new_null() SKM_sk_new_null(KRB5_ENCDATA) -#define sk_KRB5_ENCDATA_free(st) SKM_sk_free(KRB5_ENCDATA, (st)) -#define sk_KRB5_ENCDATA_num(st) SKM_sk_num(KRB5_ENCDATA, (st)) -#define sk_KRB5_ENCDATA_value(st, i) SKM_sk_value(KRB5_ENCDATA, (st), (i)) -#define sk_KRB5_ENCDATA_set(st, i, val) SKM_sk_set(KRB5_ENCDATA, (st), (i), (val)) -#define sk_KRB5_ENCDATA_zero(st) SKM_sk_zero(KRB5_ENCDATA, (st)) -#define sk_KRB5_ENCDATA_push(st, val) SKM_sk_push(KRB5_ENCDATA, (st), (val)) -#define sk_KRB5_ENCDATA_unshift(st, val) SKM_sk_unshift(KRB5_ENCDATA, (st), (val)) -#define sk_KRB5_ENCDATA_find(st, val) SKM_sk_find(KRB5_ENCDATA, (st), (val)) -#define sk_KRB5_ENCDATA_find_ex(st, val) SKM_sk_find_ex(KRB5_ENCDATA, (st), (val)) -#define sk_KRB5_ENCDATA_delete(st, i) SKM_sk_delete(KRB5_ENCDATA, (st), (i)) -#define sk_KRB5_ENCDATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_ENCDATA, (st), (ptr)) -#define sk_KRB5_ENCDATA_insert(st, val, i) SKM_sk_insert(KRB5_ENCDATA, (st), (val), (i)) -#define sk_KRB5_ENCDATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_ENCDATA, (st), (cmp)) -#define sk_KRB5_ENCDATA_dup(st) SKM_sk_dup(KRB5_ENCDATA, st) -#define sk_KRB5_ENCDATA_pop_free(st, free_func) SKM_sk_pop_free(KRB5_ENCDATA, (st), (free_func)) -#define sk_KRB5_ENCDATA_shift(st) SKM_sk_shift(KRB5_ENCDATA, (st)) -#define sk_KRB5_ENCDATA_pop(st) SKM_sk_pop(KRB5_ENCDATA, (st)) -#define sk_KRB5_ENCDATA_sort(st) SKM_sk_sort(KRB5_ENCDATA, (st)) -#define sk_KRB5_ENCDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCDATA, (st)) - -#define sk_KRB5_ENCKEY_new(st) SKM_sk_new(KRB5_ENCKEY, (st)) -#define sk_KRB5_ENCKEY_new_null() SKM_sk_new_null(KRB5_ENCKEY) -#define sk_KRB5_ENCKEY_free(st) SKM_sk_free(KRB5_ENCKEY, (st)) -#define sk_KRB5_ENCKEY_num(st) SKM_sk_num(KRB5_ENCKEY, (st)) -#define sk_KRB5_ENCKEY_value(st, i) SKM_sk_value(KRB5_ENCKEY, (st), (i)) -#define sk_KRB5_ENCKEY_set(st, i, val) SKM_sk_set(KRB5_ENCKEY, (st), (i), (val)) -#define sk_KRB5_ENCKEY_zero(st) SKM_sk_zero(KRB5_ENCKEY, (st)) -#define sk_KRB5_ENCKEY_push(st, val) SKM_sk_push(KRB5_ENCKEY, (st), (val)) -#define sk_KRB5_ENCKEY_unshift(st, val) SKM_sk_unshift(KRB5_ENCKEY, (st), (val)) -#define sk_KRB5_ENCKEY_find(st, val) SKM_sk_find(KRB5_ENCKEY, (st), (val)) -#define sk_KRB5_ENCKEY_find_ex(st, val) SKM_sk_find_ex(KRB5_ENCKEY, (st), (val)) -#define sk_KRB5_ENCKEY_delete(st, i) SKM_sk_delete(KRB5_ENCKEY, (st), (i)) -#define sk_KRB5_ENCKEY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_ENCKEY, (st), (ptr)) -#define sk_KRB5_ENCKEY_insert(st, val, i) SKM_sk_insert(KRB5_ENCKEY, (st), (val), (i)) -#define sk_KRB5_ENCKEY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_ENCKEY, (st), (cmp)) -#define sk_KRB5_ENCKEY_dup(st) SKM_sk_dup(KRB5_ENCKEY, st) -#define sk_KRB5_ENCKEY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_ENCKEY, (st), (free_func)) -#define sk_KRB5_ENCKEY_shift(st) SKM_sk_shift(KRB5_ENCKEY, (st)) -#define sk_KRB5_ENCKEY_pop(st) SKM_sk_pop(KRB5_ENCKEY, (st)) -#define sk_KRB5_ENCKEY_sort(st) SKM_sk_sort(KRB5_ENCKEY, (st)) -#define sk_KRB5_ENCKEY_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCKEY, (st)) - -#define sk_KRB5_PRINCNAME_new(st) SKM_sk_new(KRB5_PRINCNAME, (st)) -#define sk_KRB5_PRINCNAME_new_null() SKM_sk_new_null(KRB5_PRINCNAME) -#define sk_KRB5_PRINCNAME_free(st) SKM_sk_free(KRB5_PRINCNAME, (st)) -#define sk_KRB5_PRINCNAME_num(st) SKM_sk_num(KRB5_PRINCNAME, (st)) -#define sk_KRB5_PRINCNAME_value(st, i) SKM_sk_value(KRB5_PRINCNAME, (st), (i)) -#define sk_KRB5_PRINCNAME_set(st, i, val) SKM_sk_set(KRB5_PRINCNAME, (st), (i), (val)) -#define sk_KRB5_PRINCNAME_zero(st) SKM_sk_zero(KRB5_PRINCNAME, (st)) -#define sk_KRB5_PRINCNAME_push(st, val) SKM_sk_push(KRB5_PRINCNAME, (st), (val)) -#define sk_KRB5_PRINCNAME_unshift(st, val) SKM_sk_unshift(KRB5_PRINCNAME, (st), (val)) -#define sk_KRB5_PRINCNAME_find(st, val) SKM_sk_find(KRB5_PRINCNAME, (st), (val)) -#define sk_KRB5_PRINCNAME_find_ex(st, val) SKM_sk_find_ex(KRB5_PRINCNAME, (st), (val)) -#define sk_KRB5_PRINCNAME_delete(st, i) SKM_sk_delete(KRB5_PRINCNAME, (st), (i)) -#define sk_KRB5_PRINCNAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_PRINCNAME, (st), (ptr)) -#define sk_KRB5_PRINCNAME_insert(st, val, i) SKM_sk_insert(KRB5_PRINCNAME, (st), (val), (i)) -#define sk_KRB5_PRINCNAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_PRINCNAME, (st), (cmp)) -#define sk_KRB5_PRINCNAME_dup(st) SKM_sk_dup(KRB5_PRINCNAME, st) -#define sk_KRB5_PRINCNAME_pop_free(st, free_func) SKM_sk_pop_free(KRB5_PRINCNAME, (st), (free_func)) -#define sk_KRB5_PRINCNAME_shift(st) SKM_sk_shift(KRB5_PRINCNAME, (st)) -#define sk_KRB5_PRINCNAME_pop(st) SKM_sk_pop(KRB5_PRINCNAME, (st)) -#define sk_KRB5_PRINCNAME_sort(st) SKM_sk_sort(KRB5_PRINCNAME, (st)) -#define sk_KRB5_PRINCNAME_is_sorted(st) SKM_sk_is_sorted(KRB5_PRINCNAME, (st)) - -#define sk_KRB5_TKTBODY_new(st) SKM_sk_new(KRB5_TKTBODY, (st)) -#define sk_KRB5_TKTBODY_new_null() SKM_sk_new_null(KRB5_TKTBODY) -#define sk_KRB5_TKTBODY_free(st) SKM_sk_free(KRB5_TKTBODY, (st)) -#define sk_KRB5_TKTBODY_num(st) SKM_sk_num(KRB5_TKTBODY, (st)) -#define sk_KRB5_TKTBODY_value(st, i) SKM_sk_value(KRB5_TKTBODY, (st), (i)) -#define sk_KRB5_TKTBODY_set(st, i, val) SKM_sk_set(KRB5_TKTBODY, (st), (i), (val)) -#define sk_KRB5_TKTBODY_zero(st) SKM_sk_zero(KRB5_TKTBODY, (st)) -#define sk_KRB5_TKTBODY_push(st, val) SKM_sk_push(KRB5_TKTBODY, (st), (val)) -#define sk_KRB5_TKTBODY_unshift(st, val) SKM_sk_unshift(KRB5_TKTBODY, (st), (val)) -#define sk_KRB5_TKTBODY_find(st, val) SKM_sk_find(KRB5_TKTBODY, (st), (val)) -#define sk_KRB5_TKTBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_TKTBODY, (st), (val)) -#define sk_KRB5_TKTBODY_delete(st, i) SKM_sk_delete(KRB5_TKTBODY, (st), (i)) -#define sk_KRB5_TKTBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_TKTBODY, (st), (ptr)) -#define sk_KRB5_TKTBODY_insert(st, val, i) SKM_sk_insert(KRB5_TKTBODY, (st), (val), (i)) -#define sk_KRB5_TKTBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_TKTBODY, (st), (cmp)) -#define sk_KRB5_TKTBODY_dup(st) SKM_sk_dup(KRB5_TKTBODY, st) -#define sk_KRB5_TKTBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_TKTBODY, (st), (free_func)) -#define sk_KRB5_TKTBODY_shift(st) SKM_sk_shift(KRB5_TKTBODY, (st)) -#define sk_KRB5_TKTBODY_pop(st) SKM_sk_pop(KRB5_TKTBODY, (st)) -#define sk_KRB5_TKTBODY_sort(st) SKM_sk_sort(KRB5_TKTBODY, (st)) -#define sk_KRB5_TKTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_TKTBODY, (st)) - -#define sk_MIME_HEADER_new(st) SKM_sk_new(MIME_HEADER, (st)) -#define sk_MIME_HEADER_new_null() SKM_sk_new_null(MIME_HEADER) -#define sk_MIME_HEADER_free(st) SKM_sk_free(MIME_HEADER, (st)) -#define sk_MIME_HEADER_num(st) SKM_sk_num(MIME_HEADER, (st)) -#define sk_MIME_HEADER_value(st, i) SKM_sk_value(MIME_HEADER, (st), (i)) -#define sk_MIME_HEADER_set(st, i, val) SKM_sk_set(MIME_HEADER, (st), (i), (val)) -#define sk_MIME_HEADER_zero(st) SKM_sk_zero(MIME_HEADER, (st)) -#define sk_MIME_HEADER_push(st, val) SKM_sk_push(MIME_HEADER, (st), (val)) -#define sk_MIME_HEADER_unshift(st, val) SKM_sk_unshift(MIME_HEADER, (st), (val)) -#define sk_MIME_HEADER_find(st, val) SKM_sk_find(MIME_HEADER, (st), (val)) -#define sk_MIME_HEADER_find_ex(st, val) SKM_sk_find_ex(MIME_HEADER, (st), (val)) -#define sk_MIME_HEADER_delete(st, i) SKM_sk_delete(MIME_HEADER, (st), (i)) -#define sk_MIME_HEADER_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_HEADER, (st), (ptr)) -#define sk_MIME_HEADER_insert(st, val, i) SKM_sk_insert(MIME_HEADER, (st), (val), (i)) -#define sk_MIME_HEADER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_HEADER, (st), (cmp)) -#define sk_MIME_HEADER_dup(st) SKM_sk_dup(MIME_HEADER, st) -#define sk_MIME_HEADER_pop_free(st, free_func) SKM_sk_pop_free(MIME_HEADER, (st), (free_func)) -#define sk_MIME_HEADER_shift(st) SKM_sk_shift(MIME_HEADER, (st)) -#define sk_MIME_HEADER_pop(st) SKM_sk_pop(MIME_HEADER, (st)) -#define sk_MIME_HEADER_sort(st) SKM_sk_sort(MIME_HEADER, (st)) -#define sk_MIME_HEADER_is_sorted(st) SKM_sk_is_sorted(MIME_HEADER, (st)) - -#define sk_MIME_HEADER_new(st) SKM_sk_new(MIME_HEADER, (st)) -#define sk_MIME_HEADER_new_null() SKM_sk_new_null(MIME_HEADER) -#define sk_MIME_HEADER_free(st) SKM_sk_free(MIME_HEADER, (st)) -#define sk_MIME_HEADER_num(st) SKM_sk_num(MIME_HEADER, (st)) -#define sk_MIME_HEADER_value(st, i) SKM_sk_value(MIME_HEADER, (st), (i)) -#define sk_MIME_HEADER_set(st, i, val) SKM_sk_set(MIME_HEADER, (st), (i), (val)) -#define sk_MIME_HEADER_zero(st) SKM_sk_zero(MIME_HEADER, (st)) -#define sk_MIME_HEADER_push(st, val) SKM_sk_push(MIME_HEADER, (st), (val)) -#define sk_MIME_HEADER_unshift(st, val) SKM_sk_unshift(MIME_HEADER, (st), (val)) -#define sk_MIME_HEADER_find(st, val) SKM_sk_find(MIME_HEADER, (st), (val)) -#define sk_MIME_HEADER_find_ex(st, val) SKM_sk_find_ex(MIME_HEADER, (st), (val)) -#define sk_MIME_HEADER_delete(st, i) SKM_sk_delete(MIME_HEADER, (st), (i)) -#define sk_MIME_HEADER_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_HEADER, (st), (ptr)) -#define sk_MIME_HEADER_insert(st, val, i) SKM_sk_insert(MIME_HEADER, (st), (val), (i)) -#define sk_MIME_HEADER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_HEADER, (st), (cmp)) -#define sk_MIME_HEADER_dup(st) SKM_sk_dup(MIME_HEADER, st) -#define sk_MIME_HEADER_pop_free(st, free_func) SKM_sk_pop_free(MIME_HEADER, (st), (free_func)) -#define sk_MIME_HEADER_shift(st) SKM_sk_shift(MIME_HEADER, (st)) -#define sk_MIME_HEADER_pop(st) SKM_sk_pop(MIME_HEADER, (st)) -#define sk_MIME_HEADER_sort(st) SKM_sk_sort(MIME_HEADER, (st)) -#define sk_MIME_HEADER_is_sorted(st) SKM_sk_is_sorted(MIME_HEADER, (st)) - -#define sk_MIME_PARAM_new(st) SKM_sk_new(MIME_PARAM, (st)) -#define sk_MIME_PARAM_new_null() SKM_sk_new_null(MIME_PARAM) -#define sk_MIME_PARAM_free(st) SKM_sk_free(MIME_PARAM, (st)) -#define sk_MIME_PARAM_num(st) SKM_sk_num(MIME_PARAM, (st)) -#define sk_MIME_PARAM_value(st, i) SKM_sk_value(MIME_PARAM, (st), (i)) -#define sk_MIME_PARAM_set(st, i, val) SKM_sk_set(MIME_PARAM, (st), (i), (val)) -#define sk_MIME_PARAM_zero(st) SKM_sk_zero(MIME_PARAM, (st)) -#define sk_MIME_PARAM_push(st, val) SKM_sk_push(MIME_PARAM, (st), (val)) -#define sk_MIME_PARAM_unshift(st, val) SKM_sk_unshift(MIME_PARAM, (st), (val)) -#define sk_MIME_PARAM_find(st, val) SKM_sk_find(MIME_PARAM, (st), (val)) -#define sk_MIME_PARAM_find_ex(st, val) SKM_sk_find_ex(MIME_PARAM, (st), (val)) -#define sk_MIME_PARAM_delete(st, i) SKM_sk_delete(MIME_PARAM, (st), (i)) -#define sk_MIME_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_PARAM, (st), (ptr)) -#define sk_MIME_PARAM_insert(st, val, i) SKM_sk_insert(MIME_PARAM, (st), (val), (i)) -#define sk_MIME_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_PARAM, (st), (cmp)) -#define sk_MIME_PARAM_dup(st) SKM_sk_dup(MIME_PARAM, st) -#define sk_MIME_PARAM_pop_free(st, free_func) SKM_sk_pop_free(MIME_PARAM, (st), (free_func)) -#define sk_MIME_PARAM_shift(st) SKM_sk_shift(MIME_PARAM, (st)) -#define sk_MIME_PARAM_pop(st) SKM_sk_pop(MIME_PARAM, (st)) -#define sk_MIME_PARAM_sort(st) SKM_sk_sort(MIME_PARAM, (st)) -#define sk_MIME_PARAM_is_sorted(st) SKM_sk_is_sorted(MIME_PARAM, (st)) - -#define sk_MIME_PARAM_new(st) SKM_sk_new(MIME_PARAM, (st)) -#define sk_MIME_PARAM_new_null() SKM_sk_new_null(MIME_PARAM) -#define sk_MIME_PARAM_free(st) SKM_sk_free(MIME_PARAM, (st)) -#define sk_MIME_PARAM_num(st) SKM_sk_num(MIME_PARAM, (st)) -#define sk_MIME_PARAM_value(st, i) SKM_sk_value(MIME_PARAM, (st), (i)) -#define sk_MIME_PARAM_set(st, i, val) SKM_sk_set(MIME_PARAM, (st), (i), (val)) -#define sk_MIME_PARAM_zero(st) SKM_sk_zero(MIME_PARAM, (st)) -#define sk_MIME_PARAM_push(st, val) SKM_sk_push(MIME_PARAM, (st), (val)) -#define sk_MIME_PARAM_unshift(st, val) SKM_sk_unshift(MIME_PARAM, (st), (val)) -#define sk_MIME_PARAM_find(st, val) SKM_sk_find(MIME_PARAM, (st), (val)) -#define sk_MIME_PARAM_find_ex(st, val) SKM_sk_find_ex(MIME_PARAM, (st), (val)) -#define sk_MIME_PARAM_delete(st, i) SKM_sk_delete(MIME_PARAM, (st), (i)) -#define sk_MIME_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_PARAM, (st), (ptr)) -#define sk_MIME_PARAM_insert(st, val, i) SKM_sk_insert(MIME_PARAM, (st), (val), (i)) -#define sk_MIME_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_PARAM, (st), (cmp)) -#define sk_MIME_PARAM_dup(st) SKM_sk_dup(MIME_PARAM, st) -#define sk_MIME_PARAM_pop_free(st, free_func) SKM_sk_pop_free(MIME_PARAM, (st), (free_func)) -#define sk_MIME_PARAM_shift(st) SKM_sk_shift(MIME_PARAM, (st)) -#define sk_MIME_PARAM_pop(st) SKM_sk_pop(MIME_PARAM, (st)) -#define sk_MIME_PARAM_sort(st) SKM_sk_sort(MIME_PARAM, (st)) -#define sk_MIME_PARAM_is_sorted(st) SKM_sk_is_sorted(MIME_PARAM, (st)) - -#define sk_NAME_FUNCS_new(st) SKM_sk_new(NAME_FUNCS, (st)) -#define sk_NAME_FUNCS_new_null() SKM_sk_new_null(NAME_FUNCS) -#define sk_NAME_FUNCS_free(st) SKM_sk_free(NAME_FUNCS, (st)) -#define sk_NAME_FUNCS_num(st) SKM_sk_num(NAME_FUNCS, (st)) -#define sk_NAME_FUNCS_value(st, i) SKM_sk_value(NAME_FUNCS, (st), (i)) -#define sk_NAME_FUNCS_set(st, i, val) SKM_sk_set(NAME_FUNCS, (st), (i), (val)) -#define sk_NAME_FUNCS_zero(st) SKM_sk_zero(NAME_FUNCS, (st)) -#define sk_NAME_FUNCS_push(st, val) SKM_sk_push(NAME_FUNCS, (st), (val)) -#define sk_NAME_FUNCS_unshift(st, val) SKM_sk_unshift(NAME_FUNCS, (st), (val)) -#define sk_NAME_FUNCS_find(st, val) SKM_sk_find(NAME_FUNCS, (st), (val)) -#define sk_NAME_FUNCS_find_ex(st, val) SKM_sk_find_ex(NAME_FUNCS, (st), (val)) -#define sk_NAME_FUNCS_delete(st, i) SKM_sk_delete(NAME_FUNCS, (st), (i)) -#define sk_NAME_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(NAME_FUNCS, (st), (ptr)) -#define sk_NAME_FUNCS_insert(st, val, i) SKM_sk_insert(NAME_FUNCS, (st), (val), (i)) -#define sk_NAME_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(NAME_FUNCS, (st), (cmp)) -#define sk_NAME_FUNCS_dup(st) SKM_sk_dup(NAME_FUNCS, st) -#define sk_NAME_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(NAME_FUNCS, (st), (free_func)) -#define sk_NAME_FUNCS_shift(st) SKM_sk_shift(NAME_FUNCS, (st)) -#define sk_NAME_FUNCS_pop(st) SKM_sk_pop(NAME_FUNCS, (st)) -#define sk_NAME_FUNCS_sort(st) SKM_sk_sort(NAME_FUNCS, (st)) -#define sk_NAME_FUNCS_is_sorted(st) SKM_sk_is_sorted(NAME_FUNCS, (st)) - -#define sk_OCSP_CERTID_new(st) SKM_sk_new(OCSP_CERTID, (st)) -#define sk_OCSP_CERTID_new_null() SKM_sk_new_null(OCSP_CERTID) -#define sk_OCSP_CERTID_free(st) SKM_sk_free(OCSP_CERTID, (st)) -#define sk_OCSP_CERTID_num(st) SKM_sk_num(OCSP_CERTID, (st)) -#define sk_OCSP_CERTID_value(st, i) SKM_sk_value(OCSP_CERTID, (st), (i)) -#define sk_OCSP_CERTID_set(st, i, val) SKM_sk_set(OCSP_CERTID, (st), (i), (val)) -#define sk_OCSP_CERTID_zero(st) SKM_sk_zero(OCSP_CERTID, (st)) -#define sk_OCSP_CERTID_push(st, val) SKM_sk_push(OCSP_CERTID, (st), (val)) -#define sk_OCSP_CERTID_unshift(st, val) SKM_sk_unshift(OCSP_CERTID, (st), (val)) -#define sk_OCSP_CERTID_find(st, val) SKM_sk_find(OCSP_CERTID, (st), (val)) -#define sk_OCSP_CERTID_find_ex(st, val) SKM_sk_find_ex(OCSP_CERTID, (st), (val)) -#define sk_OCSP_CERTID_delete(st, i) SKM_sk_delete(OCSP_CERTID, (st), (i)) -#define sk_OCSP_CERTID_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_CERTID, (st), (ptr)) -#define sk_OCSP_CERTID_insert(st, val, i) SKM_sk_insert(OCSP_CERTID, (st), (val), (i)) -#define sk_OCSP_CERTID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_CERTID, (st), (cmp)) -#define sk_OCSP_CERTID_dup(st) SKM_sk_dup(OCSP_CERTID, st) -#define sk_OCSP_CERTID_pop_free(st, free_func) SKM_sk_pop_free(OCSP_CERTID, (st), (free_func)) -#define sk_OCSP_CERTID_shift(st) SKM_sk_shift(OCSP_CERTID, (st)) -#define sk_OCSP_CERTID_pop(st) SKM_sk_pop(OCSP_CERTID, (st)) -#define sk_OCSP_CERTID_sort(st) SKM_sk_sort(OCSP_CERTID, (st)) -#define sk_OCSP_CERTID_is_sorted(st) SKM_sk_is_sorted(OCSP_CERTID, (st)) - -#define sk_OCSP_ONEREQ_new(st) SKM_sk_new(OCSP_ONEREQ, (st)) -#define sk_OCSP_ONEREQ_new_null() SKM_sk_new_null(OCSP_ONEREQ) -#define sk_OCSP_ONEREQ_free(st) SKM_sk_free(OCSP_ONEREQ, (st)) -#define sk_OCSP_ONEREQ_num(st) SKM_sk_num(OCSP_ONEREQ, (st)) -#define sk_OCSP_ONEREQ_value(st, i) SKM_sk_value(OCSP_ONEREQ, (st), (i)) -#define sk_OCSP_ONEREQ_set(st, i, val) SKM_sk_set(OCSP_ONEREQ, (st), (i), (val)) -#define sk_OCSP_ONEREQ_zero(st) SKM_sk_zero(OCSP_ONEREQ, (st)) -#define sk_OCSP_ONEREQ_push(st, val) SKM_sk_push(OCSP_ONEREQ, (st), (val)) -#define sk_OCSP_ONEREQ_unshift(st, val) SKM_sk_unshift(OCSP_ONEREQ, (st), (val)) -#define sk_OCSP_ONEREQ_find(st, val) SKM_sk_find(OCSP_ONEREQ, (st), (val)) -#define sk_OCSP_ONEREQ_find_ex(st, val) SKM_sk_find_ex(OCSP_ONEREQ, (st), (val)) -#define sk_OCSP_ONEREQ_delete(st, i) SKM_sk_delete(OCSP_ONEREQ, (st), (i)) -#define sk_OCSP_ONEREQ_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_ONEREQ, (st), (ptr)) -#define sk_OCSP_ONEREQ_insert(st, val, i) SKM_sk_insert(OCSP_ONEREQ, (st), (val), (i)) -#define sk_OCSP_ONEREQ_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_ONEREQ, (st), (cmp)) -#define sk_OCSP_ONEREQ_dup(st) SKM_sk_dup(OCSP_ONEREQ, st) -#define sk_OCSP_ONEREQ_pop_free(st, free_func) SKM_sk_pop_free(OCSP_ONEREQ, (st), (free_func)) -#define sk_OCSP_ONEREQ_shift(st) SKM_sk_shift(OCSP_ONEREQ, (st)) -#define sk_OCSP_ONEREQ_pop(st) SKM_sk_pop(OCSP_ONEREQ, (st)) -#define sk_OCSP_ONEREQ_sort(st) SKM_sk_sort(OCSP_ONEREQ, (st)) -#define sk_OCSP_ONEREQ_is_sorted(st) SKM_sk_is_sorted(OCSP_ONEREQ, (st)) - -#define sk_OCSP_RESPID_new(st) SKM_sk_new(OCSP_RESPID, (st)) -#define sk_OCSP_RESPID_new_null() SKM_sk_new_null(OCSP_RESPID) -#define sk_OCSP_RESPID_free(st) SKM_sk_free(OCSP_RESPID, (st)) -#define sk_OCSP_RESPID_num(st) SKM_sk_num(OCSP_RESPID, (st)) -#define sk_OCSP_RESPID_value(st, i) SKM_sk_value(OCSP_RESPID, (st), (i)) -#define sk_OCSP_RESPID_set(st, i, val) SKM_sk_set(OCSP_RESPID, (st), (i), (val)) -#define sk_OCSP_RESPID_zero(st) SKM_sk_zero(OCSP_RESPID, (st)) -#define sk_OCSP_RESPID_push(st, val) SKM_sk_push(OCSP_RESPID, (st), (val)) -#define sk_OCSP_RESPID_unshift(st, val) SKM_sk_unshift(OCSP_RESPID, (st), (val)) -#define sk_OCSP_RESPID_find(st, val) SKM_sk_find(OCSP_RESPID, (st), (val)) -#define sk_OCSP_RESPID_find_ex(st, val) SKM_sk_find_ex(OCSP_RESPID, (st), (val)) -#define sk_OCSP_RESPID_delete(st, i) SKM_sk_delete(OCSP_RESPID, (st), (i)) -#define sk_OCSP_RESPID_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_RESPID, (st), (ptr)) -#define sk_OCSP_RESPID_insert(st, val, i) SKM_sk_insert(OCSP_RESPID, (st), (val), (i)) -#define sk_OCSP_RESPID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_RESPID, (st), (cmp)) -#define sk_OCSP_RESPID_dup(st) SKM_sk_dup(OCSP_RESPID, st) -#define sk_OCSP_RESPID_pop_free(st, free_func) SKM_sk_pop_free(OCSP_RESPID, (st), (free_func)) -#define sk_OCSP_RESPID_shift(st) SKM_sk_shift(OCSP_RESPID, (st)) -#define sk_OCSP_RESPID_pop(st) SKM_sk_pop(OCSP_RESPID, (st)) -#define sk_OCSP_RESPID_sort(st) SKM_sk_sort(OCSP_RESPID, (st)) -#define sk_OCSP_RESPID_is_sorted(st) SKM_sk_is_sorted(OCSP_RESPID, (st)) - -#define sk_OCSP_SINGLERESP_new(st) SKM_sk_new(OCSP_SINGLERESP, (st)) -#define sk_OCSP_SINGLERESP_new_null() SKM_sk_new_null(OCSP_SINGLERESP) -#define sk_OCSP_SINGLERESP_free(st) SKM_sk_free(OCSP_SINGLERESP, (st)) -#define sk_OCSP_SINGLERESP_num(st) SKM_sk_num(OCSP_SINGLERESP, (st)) -#define sk_OCSP_SINGLERESP_value(st, i) SKM_sk_value(OCSP_SINGLERESP, (st), (i)) -#define sk_OCSP_SINGLERESP_set(st, i, val) SKM_sk_set(OCSP_SINGLERESP, (st), (i), (val)) -#define sk_OCSP_SINGLERESP_zero(st) SKM_sk_zero(OCSP_SINGLERESP, (st)) -#define sk_OCSP_SINGLERESP_push(st, val) SKM_sk_push(OCSP_SINGLERESP, (st), (val)) -#define sk_OCSP_SINGLERESP_unshift(st, val) SKM_sk_unshift(OCSP_SINGLERESP, (st), (val)) -#define sk_OCSP_SINGLERESP_find(st, val) SKM_sk_find(OCSP_SINGLERESP, (st), (val)) -#define sk_OCSP_SINGLERESP_find_ex(st, val) SKM_sk_find_ex(OCSP_SINGLERESP, (st), (val)) -#define sk_OCSP_SINGLERESP_delete(st, i) SKM_sk_delete(OCSP_SINGLERESP, (st), (i)) -#define sk_OCSP_SINGLERESP_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_SINGLERESP, (st), (ptr)) -#define sk_OCSP_SINGLERESP_insert(st, val, i) SKM_sk_insert(OCSP_SINGLERESP, (st), (val), (i)) -#define sk_OCSP_SINGLERESP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_SINGLERESP, (st), (cmp)) -#define sk_OCSP_SINGLERESP_dup(st) SKM_sk_dup(OCSP_SINGLERESP, st) -#define sk_OCSP_SINGLERESP_pop_free(st, free_func) SKM_sk_pop_free(OCSP_SINGLERESP, (st), (free_func)) -#define sk_OCSP_SINGLERESP_shift(st) SKM_sk_shift(OCSP_SINGLERESP, (st)) -#define sk_OCSP_SINGLERESP_pop(st) SKM_sk_pop(OCSP_SINGLERESP, (st)) -#define sk_OCSP_SINGLERESP_sort(st) SKM_sk_sort(OCSP_SINGLERESP, (st)) -#define sk_OCSP_SINGLERESP_is_sorted(st) SKM_sk_is_sorted(OCSP_SINGLERESP, (st)) - -#define sk_PKCS12_SAFEBAG_new(st) SKM_sk_new(PKCS12_SAFEBAG, (st)) -#define sk_PKCS12_SAFEBAG_new_null() SKM_sk_new_null(PKCS12_SAFEBAG) -#define sk_PKCS12_SAFEBAG_free(st) SKM_sk_free(PKCS12_SAFEBAG, (st)) -#define sk_PKCS12_SAFEBAG_num(st) SKM_sk_num(PKCS12_SAFEBAG, (st)) -#define sk_PKCS12_SAFEBAG_value(st, i) SKM_sk_value(PKCS12_SAFEBAG, (st), (i)) -#define sk_PKCS12_SAFEBAG_set(st, i, val) SKM_sk_set(PKCS12_SAFEBAG, (st), (i), (val)) -#define sk_PKCS12_SAFEBAG_zero(st) SKM_sk_zero(PKCS12_SAFEBAG, (st)) -#define sk_PKCS12_SAFEBAG_push(st, val) SKM_sk_push(PKCS12_SAFEBAG, (st), (val)) -#define sk_PKCS12_SAFEBAG_unshift(st, val) SKM_sk_unshift(PKCS12_SAFEBAG, (st), (val)) -#define sk_PKCS12_SAFEBAG_find(st, val) SKM_sk_find(PKCS12_SAFEBAG, (st), (val)) -#define sk_PKCS12_SAFEBAG_find_ex(st, val) SKM_sk_find_ex(PKCS12_SAFEBAG, (st), (val)) -#define sk_PKCS12_SAFEBAG_delete(st, i) SKM_sk_delete(PKCS12_SAFEBAG, (st), (i)) -#define sk_PKCS12_SAFEBAG_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS12_SAFEBAG, (st), (ptr)) -#define sk_PKCS12_SAFEBAG_insert(st, val, i) SKM_sk_insert(PKCS12_SAFEBAG, (st), (val), (i)) -#define sk_PKCS12_SAFEBAG_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS12_SAFEBAG, (st), (cmp)) -#define sk_PKCS12_SAFEBAG_dup(st) SKM_sk_dup(PKCS12_SAFEBAG, st) -#define sk_PKCS12_SAFEBAG_pop_free(st, free_func) SKM_sk_pop_free(PKCS12_SAFEBAG, (st), (free_func)) -#define sk_PKCS12_SAFEBAG_shift(st) SKM_sk_shift(PKCS12_SAFEBAG, (st)) -#define sk_PKCS12_SAFEBAG_pop(st) SKM_sk_pop(PKCS12_SAFEBAG, (st)) -#define sk_PKCS12_SAFEBAG_sort(st) SKM_sk_sort(PKCS12_SAFEBAG, (st)) -#define sk_PKCS12_SAFEBAG_is_sorted(st) SKM_sk_is_sorted(PKCS12_SAFEBAG, (st)) - -#define sk_PKCS7_new(st) SKM_sk_new(PKCS7, (st)) -#define sk_PKCS7_new_null() SKM_sk_new_null(PKCS7) -#define sk_PKCS7_free(st) SKM_sk_free(PKCS7, (st)) -#define sk_PKCS7_num(st) SKM_sk_num(PKCS7, (st)) -#define sk_PKCS7_value(st, i) SKM_sk_value(PKCS7, (st), (i)) -#define sk_PKCS7_set(st, i, val) SKM_sk_set(PKCS7, (st), (i), (val)) -#define sk_PKCS7_zero(st) SKM_sk_zero(PKCS7, (st)) -#define sk_PKCS7_push(st, val) SKM_sk_push(PKCS7, (st), (val)) -#define sk_PKCS7_unshift(st, val) SKM_sk_unshift(PKCS7, (st), (val)) -#define sk_PKCS7_find(st, val) SKM_sk_find(PKCS7, (st), (val)) -#define sk_PKCS7_find_ex(st, val) SKM_sk_find_ex(PKCS7, (st), (val)) -#define sk_PKCS7_delete(st, i) SKM_sk_delete(PKCS7, (st), (i)) -#define sk_PKCS7_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7, (st), (ptr)) -#define sk_PKCS7_insert(st, val, i) SKM_sk_insert(PKCS7, (st), (val), (i)) -#define sk_PKCS7_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7, (st), (cmp)) -#define sk_PKCS7_dup(st) SKM_sk_dup(PKCS7, st) -#define sk_PKCS7_pop_free(st, free_func) SKM_sk_pop_free(PKCS7, (st), (free_func)) -#define sk_PKCS7_shift(st) SKM_sk_shift(PKCS7, (st)) -#define sk_PKCS7_pop(st) SKM_sk_pop(PKCS7, (st)) -#define sk_PKCS7_sort(st) SKM_sk_sort(PKCS7, (st)) -#define sk_PKCS7_is_sorted(st) SKM_sk_is_sorted(PKCS7, (st)) - -#define sk_PKCS7_RECIP_INFO_new(st) SKM_sk_new(PKCS7_RECIP_INFO, (st)) -#define sk_PKCS7_RECIP_INFO_new_null() SKM_sk_new_null(PKCS7_RECIP_INFO) -#define sk_PKCS7_RECIP_INFO_free(st) SKM_sk_free(PKCS7_RECIP_INFO, (st)) -#define sk_PKCS7_RECIP_INFO_num(st) SKM_sk_num(PKCS7_RECIP_INFO, (st)) -#define sk_PKCS7_RECIP_INFO_value(st, i) SKM_sk_value(PKCS7_RECIP_INFO, (st), (i)) -#define sk_PKCS7_RECIP_INFO_set(st, i, val) SKM_sk_set(PKCS7_RECIP_INFO, (st), (i), (val)) -#define sk_PKCS7_RECIP_INFO_zero(st) SKM_sk_zero(PKCS7_RECIP_INFO, (st)) -#define sk_PKCS7_RECIP_INFO_push(st, val) SKM_sk_push(PKCS7_RECIP_INFO, (st), (val)) -#define sk_PKCS7_RECIP_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_RECIP_INFO, (st), (val)) -#define sk_PKCS7_RECIP_INFO_find(st, val) SKM_sk_find(PKCS7_RECIP_INFO, (st), (val)) -#define sk_PKCS7_RECIP_INFO_find_ex(st, val) SKM_sk_find_ex(PKCS7_RECIP_INFO, (st), (val)) -#define sk_PKCS7_RECIP_INFO_delete(st, i) SKM_sk_delete(PKCS7_RECIP_INFO, (st), (i)) -#define sk_PKCS7_RECIP_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_RECIP_INFO, (st), (ptr)) -#define sk_PKCS7_RECIP_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_RECIP_INFO, (st), (val), (i)) -#define sk_PKCS7_RECIP_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_RECIP_INFO, (st), (cmp)) -#define sk_PKCS7_RECIP_INFO_dup(st) SKM_sk_dup(PKCS7_RECIP_INFO, st) -#define sk_PKCS7_RECIP_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_RECIP_INFO, (st), (free_func)) -#define sk_PKCS7_RECIP_INFO_shift(st) SKM_sk_shift(PKCS7_RECIP_INFO, (st)) -#define sk_PKCS7_RECIP_INFO_pop(st) SKM_sk_pop(PKCS7_RECIP_INFO, (st)) -#define sk_PKCS7_RECIP_INFO_sort(st) SKM_sk_sort(PKCS7_RECIP_INFO, (st)) -#define sk_PKCS7_RECIP_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_RECIP_INFO, (st)) - -#define sk_PKCS7_SIGNER_INFO_new(st) SKM_sk_new(PKCS7_SIGNER_INFO, (st)) -#define sk_PKCS7_SIGNER_INFO_new_null() SKM_sk_new_null(PKCS7_SIGNER_INFO) -#define sk_PKCS7_SIGNER_INFO_free(st) SKM_sk_free(PKCS7_SIGNER_INFO, (st)) -#define sk_PKCS7_SIGNER_INFO_num(st) SKM_sk_num(PKCS7_SIGNER_INFO, (st)) -#define sk_PKCS7_SIGNER_INFO_value(st, i) SKM_sk_value(PKCS7_SIGNER_INFO, (st), (i)) -#define sk_PKCS7_SIGNER_INFO_set(st, i, val) SKM_sk_set(PKCS7_SIGNER_INFO, (st), (i), (val)) -#define sk_PKCS7_SIGNER_INFO_zero(st) SKM_sk_zero(PKCS7_SIGNER_INFO, (st)) -#define sk_PKCS7_SIGNER_INFO_push(st, val) SKM_sk_push(PKCS7_SIGNER_INFO, (st), (val)) -#define sk_PKCS7_SIGNER_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_SIGNER_INFO, (st), (val)) -#define sk_PKCS7_SIGNER_INFO_find(st, val) SKM_sk_find(PKCS7_SIGNER_INFO, (st), (val)) -#define sk_PKCS7_SIGNER_INFO_find_ex(st, val) SKM_sk_find_ex(PKCS7_SIGNER_INFO, (st), (val)) -#define sk_PKCS7_SIGNER_INFO_delete(st, i) SKM_sk_delete(PKCS7_SIGNER_INFO, (st), (i)) -#define sk_PKCS7_SIGNER_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_SIGNER_INFO, (st), (ptr)) -#define sk_PKCS7_SIGNER_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_SIGNER_INFO, (st), (val), (i)) -#define sk_PKCS7_SIGNER_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_SIGNER_INFO, (st), (cmp)) -#define sk_PKCS7_SIGNER_INFO_dup(st) SKM_sk_dup(PKCS7_SIGNER_INFO, st) -#define sk_PKCS7_SIGNER_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_SIGNER_INFO, (st), (free_func)) -#define sk_PKCS7_SIGNER_INFO_shift(st) SKM_sk_shift(PKCS7_SIGNER_INFO, (st)) -#define sk_PKCS7_SIGNER_INFO_pop(st) SKM_sk_pop(PKCS7_SIGNER_INFO, (st)) -#define sk_PKCS7_SIGNER_INFO_sort(st) SKM_sk_sort(PKCS7_SIGNER_INFO, (st)) -#define sk_PKCS7_SIGNER_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_SIGNER_INFO, (st)) - -#define sk_POLICYINFO_new(st) SKM_sk_new(POLICYINFO, (st)) -#define sk_POLICYINFO_new_null() SKM_sk_new_null(POLICYINFO) -#define sk_POLICYINFO_free(st) SKM_sk_free(POLICYINFO, (st)) -#define sk_POLICYINFO_num(st) SKM_sk_num(POLICYINFO, (st)) -#define sk_POLICYINFO_value(st, i) SKM_sk_value(POLICYINFO, (st), (i)) -#define sk_POLICYINFO_set(st, i, val) SKM_sk_set(POLICYINFO, (st), (i), (val)) -#define sk_POLICYINFO_zero(st) SKM_sk_zero(POLICYINFO, (st)) -#define sk_POLICYINFO_push(st, val) SKM_sk_push(POLICYINFO, (st), (val)) -#define sk_POLICYINFO_unshift(st, val) SKM_sk_unshift(POLICYINFO, (st), (val)) -#define sk_POLICYINFO_find(st, val) SKM_sk_find(POLICYINFO, (st), (val)) -#define sk_POLICYINFO_find_ex(st, val) SKM_sk_find_ex(POLICYINFO, (st), (val)) -#define sk_POLICYINFO_delete(st, i) SKM_sk_delete(POLICYINFO, (st), (i)) -#define sk_POLICYINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYINFO, (st), (ptr)) -#define sk_POLICYINFO_insert(st, val, i) SKM_sk_insert(POLICYINFO, (st), (val), (i)) -#define sk_POLICYINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYINFO, (st), (cmp)) -#define sk_POLICYINFO_dup(st) SKM_sk_dup(POLICYINFO, st) -#define sk_POLICYINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYINFO, (st), (free_func)) -#define sk_POLICYINFO_shift(st) SKM_sk_shift(POLICYINFO, (st)) -#define sk_POLICYINFO_pop(st) SKM_sk_pop(POLICYINFO, (st)) -#define sk_POLICYINFO_sort(st) SKM_sk_sort(POLICYINFO, (st)) -#define sk_POLICYINFO_is_sorted(st) SKM_sk_is_sorted(POLICYINFO, (st)) - -#define sk_POLICYQUALINFO_new(st) SKM_sk_new(POLICYQUALINFO, (st)) -#define sk_POLICYQUALINFO_new_null() SKM_sk_new_null(POLICYQUALINFO) -#define sk_POLICYQUALINFO_free(st) SKM_sk_free(POLICYQUALINFO, (st)) -#define sk_POLICYQUALINFO_num(st) SKM_sk_num(POLICYQUALINFO, (st)) -#define sk_POLICYQUALINFO_value(st, i) SKM_sk_value(POLICYQUALINFO, (st), (i)) -#define sk_POLICYQUALINFO_set(st, i, val) SKM_sk_set(POLICYQUALINFO, (st), (i), (val)) -#define sk_POLICYQUALINFO_zero(st) SKM_sk_zero(POLICYQUALINFO, (st)) -#define sk_POLICYQUALINFO_push(st, val) SKM_sk_push(POLICYQUALINFO, (st), (val)) -#define sk_POLICYQUALINFO_unshift(st, val) SKM_sk_unshift(POLICYQUALINFO, (st), (val)) -#define sk_POLICYQUALINFO_find(st, val) SKM_sk_find(POLICYQUALINFO, (st), (val)) -#define sk_POLICYQUALINFO_find_ex(st, val) SKM_sk_find_ex(POLICYQUALINFO, (st), (val)) -#define sk_POLICYQUALINFO_delete(st, i) SKM_sk_delete(POLICYQUALINFO, (st), (i)) -#define sk_POLICYQUALINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYQUALINFO, (st), (ptr)) -#define sk_POLICYQUALINFO_insert(st, val, i) SKM_sk_insert(POLICYQUALINFO, (st), (val), (i)) -#define sk_POLICYQUALINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYQUALINFO, (st), (cmp)) -#define sk_POLICYQUALINFO_dup(st) SKM_sk_dup(POLICYQUALINFO, st) -#define sk_POLICYQUALINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYQUALINFO, (st), (free_func)) -#define sk_POLICYQUALINFO_shift(st) SKM_sk_shift(POLICYQUALINFO, (st)) -#define sk_POLICYQUALINFO_pop(st) SKM_sk_pop(POLICYQUALINFO, (st)) -#define sk_POLICYQUALINFO_sort(st) SKM_sk_sort(POLICYQUALINFO, (st)) -#define sk_POLICYQUALINFO_is_sorted(st) SKM_sk_is_sorted(POLICYQUALINFO, (st)) - -#define sk_POLICY_MAPPING_new(st) SKM_sk_new(POLICY_MAPPING, (st)) -#define sk_POLICY_MAPPING_new_null() SKM_sk_new_null(POLICY_MAPPING) -#define sk_POLICY_MAPPING_free(st) SKM_sk_free(POLICY_MAPPING, (st)) -#define sk_POLICY_MAPPING_num(st) SKM_sk_num(POLICY_MAPPING, (st)) -#define sk_POLICY_MAPPING_value(st, i) SKM_sk_value(POLICY_MAPPING, (st), (i)) -#define sk_POLICY_MAPPING_set(st, i, val) SKM_sk_set(POLICY_MAPPING, (st), (i), (val)) -#define sk_POLICY_MAPPING_zero(st) SKM_sk_zero(POLICY_MAPPING, (st)) -#define sk_POLICY_MAPPING_push(st, val) SKM_sk_push(POLICY_MAPPING, (st), (val)) -#define sk_POLICY_MAPPING_unshift(st, val) SKM_sk_unshift(POLICY_MAPPING, (st), (val)) -#define sk_POLICY_MAPPING_find(st, val) SKM_sk_find(POLICY_MAPPING, (st), (val)) -#define sk_POLICY_MAPPING_find_ex(st, val) SKM_sk_find_ex(POLICY_MAPPING, (st), (val)) -#define sk_POLICY_MAPPING_delete(st, i) SKM_sk_delete(POLICY_MAPPING, (st), (i)) -#define sk_POLICY_MAPPING_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICY_MAPPING, (st), (ptr)) -#define sk_POLICY_MAPPING_insert(st, val, i) SKM_sk_insert(POLICY_MAPPING, (st), (val), (i)) -#define sk_POLICY_MAPPING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICY_MAPPING, (st), (cmp)) -#define sk_POLICY_MAPPING_dup(st) SKM_sk_dup(POLICY_MAPPING, st) -#define sk_POLICY_MAPPING_pop_free(st, free_func) SKM_sk_pop_free(POLICY_MAPPING, (st), (free_func)) -#define sk_POLICY_MAPPING_shift(st) SKM_sk_shift(POLICY_MAPPING, (st)) -#define sk_POLICY_MAPPING_pop(st) SKM_sk_pop(POLICY_MAPPING, (st)) -#define sk_POLICY_MAPPING_sort(st) SKM_sk_sort(POLICY_MAPPING, (st)) -#define sk_POLICY_MAPPING_is_sorted(st) SKM_sk_is_sorted(POLICY_MAPPING, (st)) - -#define sk_SSL_CIPHER_new(st) SKM_sk_new(SSL_CIPHER, (st)) -#define sk_SSL_CIPHER_new_null() SKM_sk_new_null(SSL_CIPHER) -#define sk_SSL_CIPHER_free(st) SKM_sk_free(SSL_CIPHER, (st)) -#define sk_SSL_CIPHER_num(st) SKM_sk_num(SSL_CIPHER, (st)) -#define sk_SSL_CIPHER_value(st, i) SKM_sk_value(SSL_CIPHER, (st), (i)) -#define sk_SSL_CIPHER_set(st, i, val) SKM_sk_set(SSL_CIPHER, (st), (i), (val)) -#define sk_SSL_CIPHER_zero(st) SKM_sk_zero(SSL_CIPHER, (st)) -#define sk_SSL_CIPHER_push(st, val) SKM_sk_push(SSL_CIPHER, (st), (val)) -#define sk_SSL_CIPHER_unshift(st, val) SKM_sk_unshift(SSL_CIPHER, (st), (val)) -#define sk_SSL_CIPHER_find(st, val) SKM_sk_find(SSL_CIPHER, (st), (val)) -#define sk_SSL_CIPHER_find_ex(st, val) SKM_sk_find_ex(SSL_CIPHER, (st), (val)) -#define sk_SSL_CIPHER_delete(st, i) SKM_sk_delete(SSL_CIPHER, (st), (i)) -#define sk_SSL_CIPHER_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_CIPHER, (st), (ptr)) -#define sk_SSL_CIPHER_insert(st, val, i) SKM_sk_insert(SSL_CIPHER, (st), (val), (i)) -#define sk_SSL_CIPHER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_CIPHER, (st), (cmp)) -#define sk_SSL_CIPHER_dup(st) SKM_sk_dup(SSL_CIPHER, st) -#define sk_SSL_CIPHER_pop_free(st, free_func) SKM_sk_pop_free(SSL_CIPHER, (st), (free_func)) -#define sk_SSL_CIPHER_shift(st) SKM_sk_shift(SSL_CIPHER, (st)) -#define sk_SSL_CIPHER_pop(st) SKM_sk_pop(SSL_CIPHER, (st)) -#define sk_SSL_CIPHER_sort(st) SKM_sk_sort(SSL_CIPHER, (st)) -#define sk_SSL_CIPHER_is_sorted(st) SKM_sk_is_sorted(SSL_CIPHER, (st)) - -#define sk_SSL_COMP_new(st) SKM_sk_new(SSL_COMP, (st)) -#define sk_SSL_COMP_new_null() SKM_sk_new_null(SSL_COMP) -#define sk_SSL_COMP_free(st) SKM_sk_free(SSL_COMP, (st)) -#define sk_SSL_COMP_num(st) SKM_sk_num(SSL_COMP, (st)) -#define sk_SSL_COMP_value(st, i) SKM_sk_value(SSL_COMP, (st), (i)) -#define sk_SSL_COMP_set(st, i, val) SKM_sk_set(SSL_COMP, (st), (i), (val)) -#define sk_SSL_COMP_zero(st) SKM_sk_zero(SSL_COMP, (st)) -#define sk_SSL_COMP_push(st, val) SKM_sk_push(SSL_COMP, (st), (val)) -#define sk_SSL_COMP_unshift(st, val) SKM_sk_unshift(SSL_COMP, (st), (val)) -#define sk_SSL_COMP_find(st, val) SKM_sk_find(SSL_COMP, (st), (val)) -#define sk_SSL_COMP_find_ex(st, val) SKM_sk_find_ex(SSL_COMP, (st), (val)) -#define sk_SSL_COMP_delete(st, i) SKM_sk_delete(SSL_COMP, (st), (i)) -#define sk_SSL_COMP_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_COMP, (st), (ptr)) -#define sk_SSL_COMP_insert(st, val, i) SKM_sk_insert(SSL_COMP, (st), (val), (i)) -#define sk_SSL_COMP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_COMP, (st), (cmp)) -#define sk_SSL_COMP_dup(st) SKM_sk_dup(SSL_COMP, st) -#define sk_SSL_COMP_pop_free(st, free_func) SKM_sk_pop_free(SSL_COMP, (st), (free_func)) -#define sk_SSL_COMP_shift(st) SKM_sk_shift(SSL_COMP, (st)) -#define sk_SSL_COMP_pop(st) SKM_sk_pop(SSL_COMP, (st)) -#define sk_SSL_COMP_sort(st) SKM_sk_sort(SSL_COMP, (st)) -#define sk_SSL_COMP_is_sorted(st) SKM_sk_is_sorted(SSL_COMP, (st)) - -#define sk_STORE_OBJECT_new(st) SKM_sk_new(STORE_OBJECT, (st)) -#define sk_STORE_OBJECT_new_null() SKM_sk_new_null(STORE_OBJECT) -#define sk_STORE_OBJECT_free(st) SKM_sk_free(STORE_OBJECT, (st)) -#define sk_STORE_OBJECT_num(st) SKM_sk_num(STORE_OBJECT, (st)) -#define sk_STORE_OBJECT_value(st, i) SKM_sk_value(STORE_OBJECT, (st), (i)) -#define sk_STORE_OBJECT_set(st, i, val) SKM_sk_set(STORE_OBJECT, (st), (i), (val)) -#define sk_STORE_OBJECT_zero(st) SKM_sk_zero(STORE_OBJECT, (st)) -#define sk_STORE_OBJECT_push(st, val) SKM_sk_push(STORE_OBJECT, (st), (val)) -#define sk_STORE_OBJECT_unshift(st, val) SKM_sk_unshift(STORE_OBJECT, (st), (val)) -#define sk_STORE_OBJECT_find(st, val) SKM_sk_find(STORE_OBJECT, (st), (val)) -#define sk_STORE_OBJECT_find_ex(st, val) SKM_sk_find_ex(STORE_OBJECT, (st), (val)) -#define sk_STORE_OBJECT_delete(st, i) SKM_sk_delete(STORE_OBJECT, (st), (i)) -#define sk_STORE_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(STORE_OBJECT, (st), (ptr)) -#define sk_STORE_OBJECT_insert(st, val, i) SKM_sk_insert(STORE_OBJECT, (st), (val), (i)) -#define sk_STORE_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STORE_OBJECT, (st), (cmp)) -#define sk_STORE_OBJECT_dup(st) SKM_sk_dup(STORE_OBJECT, st) -#define sk_STORE_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(STORE_OBJECT, (st), (free_func)) -#define sk_STORE_OBJECT_shift(st) SKM_sk_shift(STORE_OBJECT, (st)) -#define sk_STORE_OBJECT_pop(st) SKM_sk_pop(STORE_OBJECT, (st)) -#define sk_STORE_OBJECT_sort(st) SKM_sk_sort(STORE_OBJECT, (st)) -#define sk_STORE_OBJECT_is_sorted(st) SKM_sk_is_sorted(STORE_OBJECT, (st)) - -#define sk_SXNETID_new(st) SKM_sk_new(SXNETID, (st)) -#define sk_SXNETID_new_null() SKM_sk_new_null(SXNETID) -#define sk_SXNETID_free(st) SKM_sk_free(SXNETID, (st)) -#define sk_SXNETID_num(st) SKM_sk_num(SXNETID, (st)) -#define sk_SXNETID_value(st, i) SKM_sk_value(SXNETID, (st), (i)) -#define sk_SXNETID_set(st, i, val) SKM_sk_set(SXNETID, (st), (i), (val)) -#define sk_SXNETID_zero(st) SKM_sk_zero(SXNETID, (st)) -#define sk_SXNETID_push(st, val) SKM_sk_push(SXNETID, (st), (val)) -#define sk_SXNETID_unshift(st, val) SKM_sk_unshift(SXNETID, (st), (val)) -#define sk_SXNETID_find(st, val) SKM_sk_find(SXNETID, (st), (val)) -#define sk_SXNETID_find_ex(st, val) SKM_sk_find_ex(SXNETID, (st), (val)) -#define sk_SXNETID_delete(st, i) SKM_sk_delete(SXNETID, (st), (i)) -#define sk_SXNETID_delete_ptr(st, ptr) SKM_sk_delete_ptr(SXNETID, (st), (ptr)) -#define sk_SXNETID_insert(st, val, i) SKM_sk_insert(SXNETID, (st), (val), (i)) -#define sk_SXNETID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SXNETID, (st), (cmp)) -#define sk_SXNETID_dup(st) SKM_sk_dup(SXNETID, st) -#define sk_SXNETID_pop_free(st, free_func) SKM_sk_pop_free(SXNETID, (st), (free_func)) -#define sk_SXNETID_shift(st) SKM_sk_shift(SXNETID, (st)) -#define sk_SXNETID_pop(st) SKM_sk_pop(SXNETID, (st)) -#define sk_SXNETID_sort(st) SKM_sk_sort(SXNETID, (st)) -#define sk_SXNETID_is_sorted(st) SKM_sk_is_sorted(SXNETID, (st)) - -#define sk_UI_STRING_new(st) SKM_sk_new(UI_STRING, (st)) -#define sk_UI_STRING_new_null() SKM_sk_new_null(UI_STRING) -#define sk_UI_STRING_free(st) SKM_sk_free(UI_STRING, (st)) -#define sk_UI_STRING_num(st) SKM_sk_num(UI_STRING, (st)) -#define sk_UI_STRING_value(st, i) SKM_sk_value(UI_STRING, (st), (i)) -#define sk_UI_STRING_set(st, i, val) SKM_sk_set(UI_STRING, (st), (i), (val)) -#define sk_UI_STRING_zero(st) SKM_sk_zero(UI_STRING, (st)) -#define sk_UI_STRING_push(st, val) SKM_sk_push(UI_STRING, (st), (val)) -#define sk_UI_STRING_unshift(st, val) SKM_sk_unshift(UI_STRING, (st), (val)) -#define sk_UI_STRING_find(st, val) SKM_sk_find(UI_STRING, (st), (val)) -#define sk_UI_STRING_find_ex(st, val) SKM_sk_find_ex(UI_STRING, (st), (val)) -#define sk_UI_STRING_delete(st, i) SKM_sk_delete(UI_STRING, (st), (i)) -#define sk_UI_STRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(UI_STRING, (st), (ptr)) -#define sk_UI_STRING_insert(st, val, i) SKM_sk_insert(UI_STRING, (st), (val), (i)) -#define sk_UI_STRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(UI_STRING, (st), (cmp)) -#define sk_UI_STRING_dup(st) SKM_sk_dup(UI_STRING, st) -#define sk_UI_STRING_pop_free(st, free_func) SKM_sk_pop_free(UI_STRING, (st), (free_func)) -#define sk_UI_STRING_shift(st) SKM_sk_shift(UI_STRING, (st)) -#define sk_UI_STRING_pop(st) SKM_sk_pop(UI_STRING, (st)) -#define sk_UI_STRING_sort(st) SKM_sk_sort(UI_STRING, (st)) -#define sk_UI_STRING_is_sorted(st) SKM_sk_is_sorted(UI_STRING, (st)) - -#define sk_X509_new(st) SKM_sk_new(X509, (st)) -#define sk_X509_new_null() SKM_sk_new_null(X509) -#define sk_X509_free(st) SKM_sk_free(X509, (st)) -#define sk_X509_num(st) SKM_sk_num(X509, (st)) -#define sk_X509_value(st, i) SKM_sk_value(X509, (st), (i)) -#define sk_X509_set(st, i, val) SKM_sk_set(X509, (st), (i), (val)) -#define sk_X509_zero(st) SKM_sk_zero(X509, (st)) -#define sk_X509_push(st, val) SKM_sk_push(X509, (st), (val)) -#define sk_X509_unshift(st, val) SKM_sk_unshift(X509, (st), (val)) -#define sk_X509_find(st, val) SKM_sk_find(X509, (st), (val)) -#define sk_X509_find_ex(st, val) SKM_sk_find_ex(X509, (st), (val)) -#define sk_X509_delete(st, i) SKM_sk_delete(X509, (st), (i)) -#define sk_X509_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509, (st), (ptr)) -#define sk_X509_insert(st, val, i) SKM_sk_insert(X509, (st), (val), (i)) -#define sk_X509_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509, (st), (cmp)) -#define sk_X509_dup(st) SKM_sk_dup(X509, st) -#define sk_X509_pop_free(st, free_func) SKM_sk_pop_free(X509, (st), (free_func)) -#define sk_X509_shift(st) SKM_sk_shift(X509, (st)) -#define sk_X509_pop(st) SKM_sk_pop(X509, (st)) -#define sk_X509_sort(st) SKM_sk_sort(X509, (st)) -#define sk_X509_is_sorted(st) SKM_sk_is_sorted(X509, (st)) - -#define sk_X509V3_EXT_METHOD_new(st) SKM_sk_new(X509V3_EXT_METHOD, (st)) -#define sk_X509V3_EXT_METHOD_new_null() SKM_sk_new_null(X509V3_EXT_METHOD) -#define sk_X509V3_EXT_METHOD_free(st) SKM_sk_free(X509V3_EXT_METHOD, (st)) -#define sk_X509V3_EXT_METHOD_num(st) SKM_sk_num(X509V3_EXT_METHOD, (st)) -#define sk_X509V3_EXT_METHOD_value(st, i) SKM_sk_value(X509V3_EXT_METHOD, (st), (i)) -#define sk_X509V3_EXT_METHOD_set(st, i, val) SKM_sk_set(X509V3_EXT_METHOD, (st), (i), (val)) -#define sk_X509V3_EXT_METHOD_zero(st) SKM_sk_zero(X509V3_EXT_METHOD, (st)) -#define sk_X509V3_EXT_METHOD_push(st, val) SKM_sk_push(X509V3_EXT_METHOD, (st), (val)) -#define sk_X509V3_EXT_METHOD_unshift(st, val) SKM_sk_unshift(X509V3_EXT_METHOD, (st), (val)) -#define sk_X509V3_EXT_METHOD_find(st, val) SKM_sk_find(X509V3_EXT_METHOD, (st), (val)) -#define sk_X509V3_EXT_METHOD_find_ex(st, val) SKM_sk_find_ex(X509V3_EXT_METHOD, (st), (val)) -#define sk_X509V3_EXT_METHOD_delete(st, i) SKM_sk_delete(X509V3_EXT_METHOD, (st), (i)) -#define sk_X509V3_EXT_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509V3_EXT_METHOD, (st), (ptr)) -#define sk_X509V3_EXT_METHOD_insert(st, val, i) SKM_sk_insert(X509V3_EXT_METHOD, (st), (val), (i)) -#define sk_X509V3_EXT_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509V3_EXT_METHOD, (st), (cmp)) -#define sk_X509V3_EXT_METHOD_dup(st) SKM_sk_dup(X509V3_EXT_METHOD, st) -#define sk_X509V3_EXT_METHOD_pop_free(st, free_func) SKM_sk_pop_free(X509V3_EXT_METHOD, (st), (free_func)) -#define sk_X509V3_EXT_METHOD_shift(st) SKM_sk_shift(X509V3_EXT_METHOD, (st)) -#define sk_X509V3_EXT_METHOD_pop(st) SKM_sk_pop(X509V3_EXT_METHOD, (st)) -#define sk_X509V3_EXT_METHOD_sort(st) SKM_sk_sort(X509V3_EXT_METHOD, (st)) -#define sk_X509V3_EXT_METHOD_is_sorted(st) SKM_sk_is_sorted(X509V3_EXT_METHOD, (st)) - -#define sk_X509_ALGOR_new(st) SKM_sk_new(X509_ALGOR, (st)) -#define sk_X509_ALGOR_new_null() SKM_sk_new_null(X509_ALGOR) -#define sk_X509_ALGOR_free(st) SKM_sk_free(X509_ALGOR, (st)) -#define sk_X509_ALGOR_num(st) SKM_sk_num(X509_ALGOR, (st)) -#define sk_X509_ALGOR_value(st, i) SKM_sk_value(X509_ALGOR, (st), (i)) -#define sk_X509_ALGOR_set(st, i, val) SKM_sk_set(X509_ALGOR, (st), (i), (val)) -#define sk_X509_ALGOR_zero(st) SKM_sk_zero(X509_ALGOR, (st)) -#define sk_X509_ALGOR_push(st, val) SKM_sk_push(X509_ALGOR, (st), (val)) -#define sk_X509_ALGOR_unshift(st, val) SKM_sk_unshift(X509_ALGOR, (st), (val)) -#define sk_X509_ALGOR_find(st, val) SKM_sk_find(X509_ALGOR, (st), (val)) -#define sk_X509_ALGOR_find_ex(st, val) SKM_sk_find_ex(X509_ALGOR, (st), (val)) -#define sk_X509_ALGOR_delete(st, i) SKM_sk_delete(X509_ALGOR, (st), (i)) -#define sk_X509_ALGOR_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ALGOR, (st), (ptr)) -#define sk_X509_ALGOR_insert(st, val, i) SKM_sk_insert(X509_ALGOR, (st), (val), (i)) -#define sk_X509_ALGOR_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ALGOR, (st), (cmp)) -#define sk_X509_ALGOR_dup(st) SKM_sk_dup(X509_ALGOR, st) -#define sk_X509_ALGOR_pop_free(st, free_func) SKM_sk_pop_free(X509_ALGOR, (st), (free_func)) -#define sk_X509_ALGOR_shift(st) SKM_sk_shift(X509_ALGOR, (st)) -#define sk_X509_ALGOR_pop(st) SKM_sk_pop(X509_ALGOR, (st)) -#define sk_X509_ALGOR_sort(st) SKM_sk_sort(X509_ALGOR, (st)) -#define sk_X509_ALGOR_is_sorted(st) SKM_sk_is_sorted(X509_ALGOR, (st)) - -#define sk_X509_ATTRIBUTE_new(st) SKM_sk_new(X509_ATTRIBUTE, (st)) -#define sk_X509_ATTRIBUTE_new_null() SKM_sk_new_null(X509_ATTRIBUTE) -#define sk_X509_ATTRIBUTE_free(st) SKM_sk_free(X509_ATTRIBUTE, (st)) -#define sk_X509_ATTRIBUTE_num(st) SKM_sk_num(X509_ATTRIBUTE, (st)) -#define sk_X509_ATTRIBUTE_value(st, i) SKM_sk_value(X509_ATTRIBUTE, (st), (i)) -#define sk_X509_ATTRIBUTE_set(st, i, val) SKM_sk_set(X509_ATTRIBUTE, (st), (i), (val)) -#define sk_X509_ATTRIBUTE_zero(st) SKM_sk_zero(X509_ATTRIBUTE, (st)) -#define sk_X509_ATTRIBUTE_push(st, val) SKM_sk_push(X509_ATTRIBUTE, (st), (val)) -#define sk_X509_ATTRIBUTE_unshift(st, val) SKM_sk_unshift(X509_ATTRIBUTE, (st), (val)) -#define sk_X509_ATTRIBUTE_find(st, val) SKM_sk_find(X509_ATTRIBUTE, (st), (val)) -#define sk_X509_ATTRIBUTE_find_ex(st, val) SKM_sk_find_ex(X509_ATTRIBUTE, (st), (val)) -#define sk_X509_ATTRIBUTE_delete(st, i) SKM_sk_delete(X509_ATTRIBUTE, (st), (i)) -#define sk_X509_ATTRIBUTE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ATTRIBUTE, (st), (ptr)) -#define sk_X509_ATTRIBUTE_insert(st, val, i) SKM_sk_insert(X509_ATTRIBUTE, (st), (val), (i)) -#define sk_X509_ATTRIBUTE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ATTRIBUTE, (st), (cmp)) -#define sk_X509_ATTRIBUTE_dup(st) SKM_sk_dup(X509_ATTRIBUTE, st) -#define sk_X509_ATTRIBUTE_pop_free(st, free_func) SKM_sk_pop_free(X509_ATTRIBUTE, (st), (free_func)) -#define sk_X509_ATTRIBUTE_shift(st) SKM_sk_shift(X509_ATTRIBUTE, (st)) -#define sk_X509_ATTRIBUTE_pop(st) SKM_sk_pop(X509_ATTRIBUTE, (st)) -#define sk_X509_ATTRIBUTE_sort(st) SKM_sk_sort(X509_ATTRIBUTE, (st)) -#define sk_X509_ATTRIBUTE_is_sorted(st) SKM_sk_is_sorted(X509_ATTRIBUTE, (st)) - -#define sk_X509_CRL_new(st) SKM_sk_new(X509_CRL, (st)) -#define sk_X509_CRL_new_null() SKM_sk_new_null(X509_CRL) -#define sk_X509_CRL_free(st) SKM_sk_free(X509_CRL, (st)) -#define sk_X509_CRL_num(st) SKM_sk_num(X509_CRL, (st)) -#define sk_X509_CRL_value(st, i) SKM_sk_value(X509_CRL, (st), (i)) -#define sk_X509_CRL_set(st, i, val) SKM_sk_set(X509_CRL, (st), (i), (val)) -#define sk_X509_CRL_zero(st) SKM_sk_zero(X509_CRL, (st)) -#define sk_X509_CRL_push(st, val) SKM_sk_push(X509_CRL, (st), (val)) -#define sk_X509_CRL_unshift(st, val) SKM_sk_unshift(X509_CRL, (st), (val)) -#define sk_X509_CRL_find(st, val) SKM_sk_find(X509_CRL, (st), (val)) -#define sk_X509_CRL_find_ex(st, val) SKM_sk_find_ex(X509_CRL, (st), (val)) -#define sk_X509_CRL_delete(st, i) SKM_sk_delete(X509_CRL, (st), (i)) -#define sk_X509_CRL_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_CRL, (st), (ptr)) -#define sk_X509_CRL_insert(st, val, i) SKM_sk_insert(X509_CRL, (st), (val), (i)) -#define sk_X509_CRL_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_CRL, (st), (cmp)) -#define sk_X509_CRL_dup(st) SKM_sk_dup(X509_CRL, st) -#define sk_X509_CRL_pop_free(st, free_func) SKM_sk_pop_free(X509_CRL, (st), (free_func)) -#define sk_X509_CRL_shift(st) SKM_sk_shift(X509_CRL, (st)) -#define sk_X509_CRL_pop(st) SKM_sk_pop(X509_CRL, (st)) -#define sk_X509_CRL_sort(st) SKM_sk_sort(X509_CRL, (st)) -#define sk_X509_CRL_is_sorted(st) SKM_sk_is_sorted(X509_CRL, (st)) - -#define sk_X509_EXTENSION_new(st) SKM_sk_new(X509_EXTENSION, (st)) -#define sk_X509_EXTENSION_new_null() SKM_sk_new_null(X509_EXTENSION) -#define sk_X509_EXTENSION_free(st) SKM_sk_free(X509_EXTENSION, (st)) -#define sk_X509_EXTENSION_num(st) SKM_sk_num(X509_EXTENSION, (st)) -#define sk_X509_EXTENSION_value(st, i) SKM_sk_value(X509_EXTENSION, (st), (i)) -#define sk_X509_EXTENSION_set(st, i, val) SKM_sk_set(X509_EXTENSION, (st), (i), (val)) -#define sk_X509_EXTENSION_zero(st) SKM_sk_zero(X509_EXTENSION, (st)) -#define sk_X509_EXTENSION_push(st, val) SKM_sk_push(X509_EXTENSION, (st), (val)) -#define sk_X509_EXTENSION_unshift(st, val) SKM_sk_unshift(X509_EXTENSION, (st), (val)) -#define sk_X509_EXTENSION_find(st, val) SKM_sk_find(X509_EXTENSION, (st), (val)) -#define sk_X509_EXTENSION_find_ex(st, val) SKM_sk_find_ex(X509_EXTENSION, (st), (val)) -#define sk_X509_EXTENSION_delete(st, i) SKM_sk_delete(X509_EXTENSION, (st), (i)) -#define sk_X509_EXTENSION_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_EXTENSION, (st), (ptr)) -#define sk_X509_EXTENSION_insert(st, val, i) SKM_sk_insert(X509_EXTENSION, (st), (val), (i)) -#define sk_X509_EXTENSION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_EXTENSION, (st), (cmp)) -#define sk_X509_EXTENSION_dup(st) SKM_sk_dup(X509_EXTENSION, st) -#define sk_X509_EXTENSION_pop_free(st, free_func) SKM_sk_pop_free(X509_EXTENSION, (st), (free_func)) -#define sk_X509_EXTENSION_shift(st) SKM_sk_shift(X509_EXTENSION, (st)) -#define sk_X509_EXTENSION_pop(st) SKM_sk_pop(X509_EXTENSION, (st)) -#define sk_X509_EXTENSION_sort(st) SKM_sk_sort(X509_EXTENSION, (st)) -#define sk_X509_EXTENSION_is_sorted(st) SKM_sk_is_sorted(X509_EXTENSION, (st)) - -#define sk_X509_INFO_new(st) SKM_sk_new(X509_INFO, (st)) -#define sk_X509_INFO_new_null() SKM_sk_new_null(X509_INFO) -#define sk_X509_INFO_free(st) SKM_sk_free(X509_INFO, (st)) -#define sk_X509_INFO_num(st) SKM_sk_num(X509_INFO, (st)) -#define sk_X509_INFO_value(st, i) SKM_sk_value(X509_INFO, (st), (i)) -#define sk_X509_INFO_set(st, i, val) SKM_sk_set(X509_INFO, (st), (i), (val)) -#define sk_X509_INFO_zero(st) SKM_sk_zero(X509_INFO, (st)) -#define sk_X509_INFO_push(st, val) SKM_sk_push(X509_INFO, (st), (val)) -#define sk_X509_INFO_unshift(st, val) SKM_sk_unshift(X509_INFO, (st), (val)) -#define sk_X509_INFO_find(st, val) SKM_sk_find(X509_INFO, (st), (val)) -#define sk_X509_INFO_find_ex(st, val) SKM_sk_find_ex(X509_INFO, (st), (val)) -#define sk_X509_INFO_delete(st, i) SKM_sk_delete(X509_INFO, (st), (i)) -#define sk_X509_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_INFO, (st), (ptr)) -#define sk_X509_INFO_insert(st, val, i) SKM_sk_insert(X509_INFO, (st), (val), (i)) -#define sk_X509_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_INFO, (st), (cmp)) -#define sk_X509_INFO_dup(st) SKM_sk_dup(X509_INFO, st) -#define sk_X509_INFO_pop_free(st, free_func) SKM_sk_pop_free(X509_INFO, (st), (free_func)) -#define sk_X509_INFO_shift(st) SKM_sk_shift(X509_INFO, (st)) -#define sk_X509_INFO_pop(st) SKM_sk_pop(X509_INFO, (st)) -#define sk_X509_INFO_sort(st) SKM_sk_sort(X509_INFO, (st)) -#define sk_X509_INFO_is_sorted(st) SKM_sk_is_sorted(X509_INFO, (st)) - -#define sk_X509_LOOKUP_new(st) SKM_sk_new(X509_LOOKUP, (st)) -#define sk_X509_LOOKUP_new_null() SKM_sk_new_null(X509_LOOKUP) -#define sk_X509_LOOKUP_free(st) SKM_sk_free(X509_LOOKUP, (st)) -#define sk_X509_LOOKUP_num(st) SKM_sk_num(X509_LOOKUP, (st)) -#define sk_X509_LOOKUP_value(st, i) SKM_sk_value(X509_LOOKUP, (st), (i)) -#define sk_X509_LOOKUP_set(st, i, val) SKM_sk_set(X509_LOOKUP, (st), (i), (val)) -#define sk_X509_LOOKUP_zero(st) SKM_sk_zero(X509_LOOKUP, (st)) -#define sk_X509_LOOKUP_push(st, val) SKM_sk_push(X509_LOOKUP, (st), (val)) -#define sk_X509_LOOKUP_unshift(st, val) SKM_sk_unshift(X509_LOOKUP, (st), (val)) -#define sk_X509_LOOKUP_find(st, val) SKM_sk_find(X509_LOOKUP, (st), (val)) -#define sk_X509_LOOKUP_find_ex(st, val) SKM_sk_find_ex(X509_LOOKUP, (st), (val)) -#define sk_X509_LOOKUP_delete(st, i) SKM_sk_delete(X509_LOOKUP, (st), (i)) -#define sk_X509_LOOKUP_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_LOOKUP, (st), (ptr)) -#define sk_X509_LOOKUP_insert(st, val, i) SKM_sk_insert(X509_LOOKUP, (st), (val), (i)) -#define sk_X509_LOOKUP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_LOOKUP, (st), (cmp)) -#define sk_X509_LOOKUP_dup(st) SKM_sk_dup(X509_LOOKUP, st) -#define sk_X509_LOOKUP_pop_free(st, free_func) SKM_sk_pop_free(X509_LOOKUP, (st), (free_func)) -#define sk_X509_LOOKUP_shift(st) SKM_sk_shift(X509_LOOKUP, (st)) -#define sk_X509_LOOKUP_pop(st) SKM_sk_pop(X509_LOOKUP, (st)) -#define sk_X509_LOOKUP_sort(st) SKM_sk_sort(X509_LOOKUP, (st)) -#define sk_X509_LOOKUP_is_sorted(st) SKM_sk_is_sorted(X509_LOOKUP, (st)) - -#define sk_X509_NAME_new(st) SKM_sk_new(X509_NAME, (st)) -#define sk_X509_NAME_new_null() SKM_sk_new_null(X509_NAME) -#define sk_X509_NAME_free(st) SKM_sk_free(X509_NAME, (st)) -#define sk_X509_NAME_num(st) SKM_sk_num(X509_NAME, (st)) -#define sk_X509_NAME_value(st, i) SKM_sk_value(X509_NAME, (st), (i)) -#define sk_X509_NAME_set(st, i, val) SKM_sk_set(X509_NAME, (st), (i), (val)) -#define sk_X509_NAME_zero(st) SKM_sk_zero(X509_NAME, (st)) -#define sk_X509_NAME_push(st, val) SKM_sk_push(X509_NAME, (st), (val)) -#define sk_X509_NAME_unshift(st, val) SKM_sk_unshift(X509_NAME, (st), (val)) -#define sk_X509_NAME_find(st, val) SKM_sk_find(X509_NAME, (st), (val)) -#define sk_X509_NAME_find_ex(st, val) SKM_sk_find_ex(X509_NAME, (st), (val)) -#define sk_X509_NAME_delete(st, i) SKM_sk_delete(X509_NAME, (st), (i)) -#define sk_X509_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME, (st), (ptr)) -#define sk_X509_NAME_insert(st, val, i) SKM_sk_insert(X509_NAME, (st), (val), (i)) -#define sk_X509_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME, (st), (cmp)) -#define sk_X509_NAME_dup(st) SKM_sk_dup(X509_NAME, st) -#define sk_X509_NAME_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME, (st), (free_func)) -#define sk_X509_NAME_shift(st) SKM_sk_shift(X509_NAME, (st)) -#define sk_X509_NAME_pop(st) SKM_sk_pop(X509_NAME, (st)) -#define sk_X509_NAME_sort(st) SKM_sk_sort(X509_NAME, (st)) -#define sk_X509_NAME_is_sorted(st) SKM_sk_is_sorted(X509_NAME, (st)) - -#define sk_X509_NAME_ENTRY_new(st) SKM_sk_new(X509_NAME_ENTRY, (st)) -#define sk_X509_NAME_ENTRY_new_null() SKM_sk_new_null(X509_NAME_ENTRY) -#define sk_X509_NAME_ENTRY_free(st) SKM_sk_free(X509_NAME_ENTRY, (st)) -#define sk_X509_NAME_ENTRY_num(st) SKM_sk_num(X509_NAME_ENTRY, (st)) -#define sk_X509_NAME_ENTRY_value(st, i) SKM_sk_value(X509_NAME_ENTRY, (st), (i)) -#define sk_X509_NAME_ENTRY_set(st, i, val) SKM_sk_set(X509_NAME_ENTRY, (st), (i), (val)) -#define sk_X509_NAME_ENTRY_zero(st) SKM_sk_zero(X509_NAME_ENTRY, (st)) -#define sk_X509_NAME_ENTRY_push(st, val) SKM_sk_push(X509_NAME_ENTRY, (st), (val)) -#define sk_X509_NAME_ENTRY_unshift(st, val) SKM_sk_unshift(X509_NAME_ENTRY, (st), (val)) -#define sk_X509_NAME_ENTRY_find(st, val) SKM_sk_find(X509_NAME_ENTRY, (st), (val)) -#define sk_X509_NAME_ENTRY_find_ex(st, val) SKM_sk_find_ex(X509_NAME_ENTRY, (st), (val)) -#define sk_X509_NAME_ENTRY_delete(st, i) SKM_sk_delete(X509_NAME_ENTRY, (st), (i)) -#define sk_X509_NAME_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME_ENTRY, (st), (ptr)) -#define sk_X509_NAME_ENTRY_insert(st, val, i) SKM_sk_insert(X509_NAME_ENTRY, (st), (val), (i)) -#define sk_X509_NAME_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME_ENTRY, (st), (cmp)) -#define sk_X509_NAME_ENTRY_dup(st) SKM_sk_dup(X509_NAME_ENTRY, st) -#define sk_X509_NAME_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME_ENTRY, (st), (free_func)) -#define sk_X509_NAME_ENTRY_shift(st) SKM_sk_shift(X509_NAME_ENTRY, (st)) -#define sk_X509_NAME_ENTRY_pop(st) SKM_sk_pop(X509_NAME_ENTRY, (st)) -#define sk_X509_NAME_ENTRY_sort(st) SKM_sk_sort(X509_NAME_ENTRY, (st)) -#define sk_X509_NAME_ENTRY_is_sorted(st) SKM_sk_is_sorted(X509_NAME_ENTRY, (st)) - -#define sk_X509_OBJECT_new(st) SKM_sk_new(X509_OBJECT, (st)) -#define sk_X509_OBJECT_new_null() SKM_sk_new_null(X509_OBJECT) -#define sk_X509_OBJECT_free(st) SKM_sk_free(X509_OBJECT, (st)) -#define sk_X509_OBJECT_num(st) SKM_sk_num(X509_OBJECT, (st)) -#define sk_X509_OBJECT_value(st, i) SKM_sk_value(X509_OBJECT, (st), (i)) -#define sk_X509_OBJECT_set(st, i, val) SKM_sk_set(X509_OBJECT, (st), (i), (val)) -#define sk_X509_OBJECT_zero(st) SKM_sk_zero(X509_OBJECT, (st)) -#define sk_X509_OBJECT_push(st, val) SKM_sk_push(X509_OBJECT, (st), (val)) -#define sk_X509_OBJECT_unshift(st, val) SKM_sk_unshift(X509_OBJECT, (st), (val)) -#define sk_X509_OBJECT_find(st, val) SKM_sk_find(X509_OBJECT, (st), (val)) -#define sk_X509_OBJECT_find_ex(st, val) SKM_sk_find_ex(X509_OBJECT, (st), (val)) -#define sk_X509_OBJECT_delete(st, i) SKM_sk_delete(X509_OBJECT, (st), (i)) -#define sk_X509_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_OBJECT, (st), (ptr)) -#define sk_X509_OBJECT_insert(st, val, i) SKM_sk_insert(X509_OBJECT, (st), (val), (i)) -#define sk_X509_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_OBJECT, (st), (cmp)) -#define sk_X509_OBJECT_dup(st) SKM_sk_dup(X509_OBJECT, st) -#define sk_X509_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(X509_OBJECT, (st), (free_func)) -#define sk_X509_OBJECT_shift(st) SKM_sk_shift(X509_OBJECT, (st)) -#define sk_X509_OBJECT_pop(st) SKM_sk_pop(X509_OBJECT, (st)) -#define sk_X509_OBJECT_sort(st) SKM_sk_sort(X509_OBJECT, (st)) -#define sk_X509_OBJECT_is_sorted(st) SKM_sk_is_sorted(X509_OBJECT, (st)) - -#define sk_X509_POLICY_DATA_new(st) SKM_sk_new(X509_POLICY_DATA, (st)) -#define sk_X509_POLICY_DATA_new_null() SKM_sk_new_null(X509_POLICY_DATA) -#define sk_X509_POLICY_DATA_free(st) SKM_sk_free(X509_POLICY_DATA, (st)) -#define sk_X509_POLICY_DATA_num(st) SKM_sk_num(X509_POLICY_DATA, (st)) -#define sk_X509_POLICY_DATA_value(st, i) SKM_sk_value(X509_POLICY_DATA, (st), (i)) -#define sk_X509_POLICY_DATA_set(st, i, val) SKM_sk_set(X509_POLICY_DATA, (st), (i), (val)) -#define sk_X509_POLICY_DATA_zero(st) SKM_sk_zero(X509_POLICY_DATA, (st)) -#define sk_X509_POLICY_DATA_push(st, val) SKM_sk_push(X509_POLICY_DATA, (st), (val)) -#define sk_X509_POLICY_DATA_unshift(st, val) SKM_sk_unshift(X509_POLICY_DATA, (st), (val)) -#define sk_X509_POLICY_DATA_find(st, val) SKM_sk_find(X509_POLICY_DATA, (st), (val)) -#define sk_X509_POLICY_DATA_find_ex(st, val) SKM_sk_find_ex(X509_POLICY_DATA, (st), (val)) -#define sk_X509_POLICY_DATA_delete(st, i) SKM_sk_delete(X509_POLICY_DATA, (st), (i)) -#define sk_X509_POLICY_DATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_POLICY_DATA, (st), (ptr)) -#define sk_X509_POLICY_DATA_insert(st, val, i) SKM_sk_insert(X509_POLICY_DATA, (st), (val), (i)) -#define sk_X509_POLICY_DATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_POLICY_DATA, (st), (cmp)) -#define sk_X509_POLICY_DATA_dup(st) SKM_sk_dup(X509_POLICY_DATA, st) -#define sk_X509_POLICY_DATA_pop_free(st, free_func) SKM_sk_pop_free(X509_POLICY_DATA, (st), (free_func)) -#define sk_X509_POLICY_DATA_shift(st) SKM_sk_shift(X509_POLICY_DATA, (st)) -#define sk_X509_POLICY_DATA_pop(st) SKM_sk_pop(X509_POLICY_DATA, (st)) -#define sk_X509_POLICY_DATA_sort(st) SKM_sk_sort(X509_POLICY_DATA, (st)) -#define sk_X509_POLICY_DATA_is_sorted(st) SKM_sk_is_sorted(X509_POLICY_DATA, (st)) - -#define sk_X509_POLICY_NODE_new(st) SKM_sk_new(X509_POLICY_NODE, (st)) -#define sk_X509_POLICY_NODE_new_null() SKM_sk_new_null(X509_POLICY_NODE) -#define sk_X509_POLICY_NODE_free(st) SKM_sk_free(X509_POLICY_NODE, (st)) -#define sk_X509_POLICY_NODE_num(st) SKM_sk_num(X509_POLICY_NODE, (st)) -#define sk_X509_POLICY_NODE_value(st, i) SKM_sk_value(X509_POLICY_NODE, (st), (i)) -#define sk_X509_POLICY_NODE_set(st, i, val) SKM_sk_set(X509_POLICY_NODE, (st), (i), (val)) -#define sk_X509_POLICY_NODE_zero(st) SKM_sk_zero(X509_POLICY_NODE, (st)) -#define sk_X509_POLICY_NODE_push(st, val) SKM_sk_push(X509_POLICY_NODE, (st), (val)) -#define sk_X509_POLICY_NODE_unshift(st, val) SKM_sk_unshift(X509_POLICY_NODE, (st), (val)) -#define sk_X509_POLICY_NODE_find(st, val) SKM_sk_find(X509_POLICY_NODE, (st), (val)) -#define sk_X509_POLICY_NODE_find_ex(st, val) SKM_sk_find_ex(X509_POLICY_NODE, (st), (val)) -#define sk_X509_POLICY_NODE_delete(st, i) SKM_sk_delete(X509_POLICY_NODE, (st), (i)) -#define sk_X509_POLICY_NODE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_POLICY_NODE, (st), (ptr)) -#define sk_X509_POLICY_NODE_insert(st, val, i) SKM_sk_insert(X509_POLICY_NODE, (st), (val), (i)) -#define sk_X509_POLICY_NODE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_POLICY_NODE, (st), (cmp)) -#define sk_X509_POLICY_NODE_dup(st) SKM_sk_dup(X509_POLICY_NODE, st) -#define sk_X509_POLICY_NODE_pop_free(st, free_func) SKM_sk_pop_free(X509_POLICY_NODE, (st), (free_func)) -#define sk_X509_POLICY_NODE_shift(st) SKM_sk_shift(X509_POLICY_NODE, (st)) -#define sk_X509_POLICY_NODE_pop(st) SKM_sk_pop(X509_POLICY_NODE, (st)) -#define sk_X509_POLICY_NODE_sort(st) SKM_sk_sort(X509_POLICY_NODE, (st)) -#define sk_X509_POLICY_NODE_is_sorted(st) SKM_sk_is_sorted(X509_POLICY_NODE, (st)) - -#define sk_X509_POLICY_REF_new(st) SKM_sk_new(X509_POLICY_REF, (st)) -#define sk_X509_POLICY_REF_new_null() SKM_sk_new_null(X509_POLICY_REF) -#define sk_X509_POLICY_REF_free(st) SKM_sk_free(X509_POLICY_REF, (st)) -#define sk_X509_POLICY_REF_num(st) SKM_sk_num(X509_POLICY_REF, (st)) -#define sk_X509_POLICY_REF_value(st, i) SKM_sk_value(X509_POLICY_REF, (st), (i)) -#define sk_X509_POLICY_REF_set(st, i, val) SKM_sk_set(X509_POLICY_REF, (st), (i), (val)) -#define sk_X509_POLICY_REF_zero(st) SKM_sk_zero(X509_POLICY_REF, (st)) -#define sk_X509_POLICY_REF_push(st, val) SKM_sk_push(X509_POLICY_REF, (st), (val)) -#define sk_X509_POLICY_REF_unshift(st, val) SKM_sk_unshift(X509_POLICY_REF, (st), (val)) -#define sk_X509_POLICY_REF_find(st, val) SKM_sk_find(X509_POLICY_REF, (st), (val)) -#define sk_X509_POLICY_REF_find_ex(st, val) SKM_sk_find_ex(X509_POLICY_REF, (st), (val)) -#define sk_X509_POLICY_REF_delete(st, i) SKM_sk_delete(X509_POLICY_REF, (st), (i)) -#define sk_X509_POLICY_REF_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_POLICY_REF, (st), (ptr)) -#define sk_X509_POLICY_REF_insert(st, val, i) SKM_sk_insert(X509_POLICY_REF, (st), (val), (i)) -#define sk_X509_POLICY_REF_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_POLICY_REF, (st), (cmp)) -#define sk_X509_POLICY_REF_dup(st) SKM_sk_dup(X509_POLICY_REF, st) -#define sk_X509_POLICY_REF_pop_free(st, free_func) SKM_sk_pop_free(X509_POLICY_REF, (st), (free_func)) -#define sk_X509_POLICY_REF_shift(st) SKM_sk_shift(X509_POLICY_REF, (st)) -#define sk_X509_POLICY_REF_pop(st) SKM_sk_pop(X509_POLICY_REF, (st)) -#define sk_X509_POLICY_REF_sort(st) SKM_sk_sort(X509_POLICY_REF, (st)) -#define sk_X509_POLICY_REF_is_sorted(st) SKM_sk_is_sorted(X509_POLICY_REF, (st)) - -#define sk_X509_PURPOSE_new(st) SKM_sk_new(X509_PURPOSE, (st)) -#define sk_X509_PURPOSE_new_null() SKM_sk_new_null(X509_PURPOSE) -#define sk_X509_PURPOSE_free(st) SKM_sk_free(X509_PURPOSE, (st)) -#define sk_X509_PURPOSE_num(st) SKM_sk_num(X509_PURPOSE, (st)) -#define sk_X509_PURPOSE_value(st, i) SKM_sk_value(X509_PURPOSE, (st), (i)) -#define sk_X509_PURPOSE_set(st, i, val) SKM_sk_set(X509_PURPOSE, (st), (i), (val)) -#define sk_X509_PURPOSE_zero(st) SKM_sk_zero(X509_PURPOSE, (st)) -#define sk_X509_PURPOSE_push(st, val) SKM_sk_push(X509_PURPOSE, (st), (val)) -#define sk_X509_PURPOSE_unshift(st, val) SKM_sk_unshift(X509_PURPOSE, (st), (val)) -#define sk_X509_PURPOSE_find(st, val) SKM_sk_find(X509_PURPOSE, (st), (val)) -#define sk_X509_PURPOSE_find_ex(st, val) SKM_sk_find_ex(X509_PURPOSE, (st), (val)) -#define sk_X509_PURPOSE_delete(st, i) SKM_sk_delete(X509_PURPOSE, (st), (i)) -#define sk_X509_PURPOSE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_PURPOSE, (st), (ptr)) -#define sk_X509_PURPOSE_insert(st, val, i) SKM_sk_insert(X509_PURPOSE, (st), (val), (i)) -#define sk_X509_PURPOSE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_PURPOSE, (st), (cmp)) -#define sk_X509_PURPOSE_dup(st) SKM_sk_dup(X509_PURPOSE, st) -#define sk_X509_PURPOSE_pop_free(st, free_func) SKM_sk_pop_free(X509_PURPOSE, (st), (free_func)) -#define sk_X509_PURPOSE_shift(st) SKM_sk_shift(X509_PURPOSE, (st)) -#define sk_X509_PURPOSE_pop(st) SKM_sk_pop(X509_PURPOSE, (st)) -#define sk_X509_PURPOSE_sort(st) SKM_sk_sort(X509_PURPOSE, (st)) -#define sk_X509_PURPOSE_is_sorted(st) SKM_sk_is_sorted(X509_PURPOSE, (st)) - -#define sk_X509_REVOKED_new(st) SKM_sk_new(X509_REVOKED, (st)) -#define sk_X509_REVOKED_new_null() SKM_sk_new_null(X509_REVOKED) -#define sk_X509_REVOKED_free(st) SKM_sk_free(X509_REVOKED, (st)) -#define sk_X509_REVOKED_num(st) SKM_sk_num(X509_REVOKED, (st)) -#define sk_X509_REVOKED_value(st, i) SKM_sk_value(X509_REVOKED, (st), (i)) -#define sk_X509_REVOKED_set(st, i, val) SKM_sk_set(X509_REVOKED, (st), (i), (val)) -#define sk_X509_REVOKED_zero(st) SKM_sk_zero(X509_REVOKED, (st)) -#define sk_X509_REVOKED_push(st, val) SKM_sk_push(X509_REVOKED, (st), (val)) -#define sk_X509_REVOKED_unshift(st, val) SKM_sk_unshift(X509_REVOKED, (st), (val)) -#define sk_X509_REVOKED_find(st, val) SKM_sk_find(X509_REVOKED, (st), (val)) -#define sk_X509_REVOKED_find_ex(st, val) SKM_sk_find_ex(X509_REVOKED, (st), (val)) -#define sk_X509_REVOKED_delete(st, i) SKM_sk_delete(X509_REVOKED, (st), (i)) -#define sk_X509_REVOKED_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_REVOKED, (st), (ptr)) -#define sk_X509_REVOKED_insert(st, val, i) SKM_sk_insert(X509_REVOKED, (st), (val), (i)) -#define sk_X509_REVOKED_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_REVOKED, (st), (cmp)) -#define sk_X509_REVOKED_dup(st) SKM_sk_dup(X509_REVOKED, st) -#define sk_X509_REVOKED_pop_free(st, free_func) SKM_sk_pop_free(X509_REVOKED, (st), (free_func)) -#define sk_X509_REVOKED_shift(st) SKM_sk_shift(X509_REVOKED, (st)) -#define sk_X509_REVOKED_pop(st) SKM_sk_pop(X509_REVOKED, (st)) -#define sk_X509_REVOKED_sort(st) SKM_sk_sort(X509_REVOKED, (st)) -#define sk_X509_REVOKED_is_sorted(st) SKM_sk_is_sorted(X509_REVOKED, (st)) - -#define sk_X509_TRUST_new(st) SKM_sk_new(X509_TRUST, (st)) -#define sk_X509_TRUST_new_null() SKM_sk_new_null(X509_TRUST) -#define sk_X509_TRUST_free(st) SKM_sk_free(X509_TRUST, (st)) -#define sk_X509_TRUST_num(st) SKM_sk_num(X509_TRUST, (st)) -#define sk_X509_TRUST_value(st, i) SKM_sk_value(X509_TRUST, (st), (i)) -#define sk_X509_TRUST_set(st, i, val) SKM_sk_set(X509_TRUST, (st), (i), (val)) -#define sk_X509_TRUST_zero(st) SKM_sk_zero(X509_TRUST, (st)) -#define sk_X509_TRUST_push(st, val) SKM_sk_push(X509_TRUST, (st), (val)) -#define sk_X509_TRUST_unshift(st, val) SKM_sk_unshift(X509_TRUST, (st), (val)) -#define sk_X509_TRUST_find(st, val) SKM_sk_find(X509_TRUST, (st), (val)) -#define sk_X509_TRUST_find_ex(st, val) SKM_sk_find_ex(X509_TRUST, (st), (val)) -#define sk_X509_TRUST_delete(st, i) SKM_sk_delete(X509_TRUST, (st), (i)) -#define sk_X509_TRUST_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_TRUST, (st), (ptr)) -#define sk_X509_TRUST_insert(st, val, i) SKM_sk_insert(X509_TRUST, (st), (val), (i)) -#define sk_X509_TRUST_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_TRUST, (st), (cmp)) -#define sk_X509_TRUST_dup(st) SKM_sk_dup(X509_TRUST, st) -#define sk_X509_TRUST_pop_free(st, free_func) SKM_sk_pop_free(X509_TRUST, (st), (free_func)) -#define sk_X509_TRUST_shift(st) SKM_sk_shift(X509_TRUST, (st)) -#define sk_X509_TRUST_pop(st) SKM_sk_pop(X509_TRUST, (st)) -#define sk_X509_TRUST_sort(st) SKM_sk_sort(X509_TRUST, (st)) -#define sk_X509_TRUST_is_sorted(st) SKM_sk_is_sorted(X509_TRUST, (st)) - -#define sk_X509_VERIFY_PARAM_new(st) SKM_sk_new(X509_VERIFY_PARAM, (st)) -#define sk_X509_VERIFY_PARAM_new_null() SKM_sk_new_null(X509_VERIFY_PARAM) -#define sk_X509_VERIFY_PARAM_free(st) SKM_sk_free(X509_VERIFY_PARAM, (st)) -#define sk_X509_VERIFY_PARAM_num(st) SKM_sk_num(X509_VERIFY_PARAM, (st)) -#define sk_X509_VERIFY_PARAM_value(st, i) SKM_sk_value(X509_VERIFY_PARAM, (st), (i)) -#define sk_X509_VERIFY_PARAM_set(st, i, val) SKM_sk_set(X509_VERIFY_PARAM, (st), (i), (val)) -#define sk_X509_VERIFY_PARAM_zero(st) SKM_sk_zero(X509_VERIFY_PARAM, (st)) -#define sk_X509_VERIFY_PARAM_push(st, val) SKM_sk_push(X509_VERIFY_PARAM, (st), (val)) -#define sk_X509_VERIFY_PARAM_unshift(st, val) SKM_sk_unshift(X509_VERIFY_PARAM, (st), (val)) -#define sk_X509_VERIFY_PARAM_find(st, val) SKM_sk_find(X509_VERIFY_PARAM, (st), (val)) -#define sk_X509_VERIFY_PARAM_find_ex(st, val) SKM_sk_find_ex(X509_VERIFY_PARAM, (st), (val)) -#define sk_X509_VERIFY_PARAM_delete(st, i) SKM_sk_delete(X509_VERIFY_PARAM, (st), (i)) -#define sk_X509_VERIFY_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_VERIFY_PARAM, (st), (ptr)) -#define sk_X509_VERIFY_PARAM_insert(st, val, i) SKM_sk_insert(X509_VERIFY_PARAM, (st), (val), (i)) -#define sk_X509_VERIFY_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_VERIFY_PARAM, (st), (cmp)) -#define sk_X509_VERIFY_PARAM_dup(st) SKM_sk_dup(X509_VERIFY_PARAM, st) -#define sk_X509_VERIFY_PARAM_pop_free(st, free_func) SKM_sk_pop_free(X509_VERIFY_PARAM, (st), (free_func)) -#define sk_X509_VERIFY_PARAM_shift(st) SKM_sk_shift(X509_VERIFY_PARAM, (st)) -#define sk_X509_VERIFY_PARAM_pop(st) SKM_sk_pop(X509_VERIFY_PARAM, (st)) -#define sk_X509_VERIFY_PARAM_sort(st) SKM_sk_sort(X509_VERIFY_PARAM, (st)) -#define sk_X509_VERIFY_PARAM_is_sorted(st) SKM_sk_is_sorted(X509_VERIFY_PARAM, (st)) - -#define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ACCESS_DESCRIPTION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_ACCESS_DESCRIPTION(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ACCESS_DESCRIPTION, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_ACCESS_DESCRIPTION(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ACCESS_DESCRIPTION, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_ASN1_INTEGER(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ASN1_INTEGER, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_ASN1_INTEGER(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ASN1_INTEGER, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_ASN1_INTEGER(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ASN1_INTEGER, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_ASN1_INTEGER(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ASN1_INTEGER, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_ASN1_OBJECT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ASN1_OBJECT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_ASN1_OBJECT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ASN1_OBJECT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_ASN1_OBJECT(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ASN1_OBJECT, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_ASN1_OBJECT(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ASN1_OBJECT, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_ASN1_TYPE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ASN1_TYPE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_ASN1_TYPE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_ASN1_TYPE(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ASN1_TYPE, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_ASN1_TYPE(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ASN1_TYPE, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_DIST_POINT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(DIST_POINT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_DIST_POINT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(DIST_POINT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_DIST_POINT(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(DIST_POINT, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_DIST_POINT(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(DIST_POINT, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_GENERAL_NAME(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(GENERAL_NAME, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_GENERAL_NAME(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(GENERAL_NAME, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_GENERAL_NAME(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(GENERAL_NAME, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_GENERAL_NAME(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(GENERAL_NAME, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_OCSP_ONEREQ(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(OCSP_ONEREQ, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_OCSP_ONEREQ(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(OCSP_ONEREQ, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_OCSP_ONEREQ(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(OCSP_ONEREQ, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_OCSP_ONEREQ(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(OCSP_ONEREQ, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(OCSP_SINGLERESP, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(OCSP_SINGLERESP, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_OCSP_SINGLERESP(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(OCSP_SINGLERESP, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_OCSP_SINGLERESP(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(OCSP_SINGLERESP, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(PKCS12_SAFEBAG, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(PKCS12_SAFEBAG, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_PKCS12_SAFEBAG(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(PKCS12_SAFEBAG, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_PKCS12_SAFEBAG(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(PKCS12_SAFEBAG, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_PKCS7(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(PKCS7, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_PKCS7(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(PKCS7, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_PKCS7(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(PKCS7, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_PKCS7(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(PKCS7, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(PKCS7_RECIP_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(PKCS7_RECIP_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_PKCS7_RECIP_INFO(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(PKCS7_RECIP_INFO, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_PKCS7_RECIP_INFO(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(PKCS7_RECIP_INFO, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(PKCS7_SIGNER_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(PKCS7_SIGNER_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_PKCS7_SIGNER_INFO(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(PKCS7_SIGNER_INFO, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_PKCS7_SIGNER_INFO(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(PKCS7_SIGNER_INFO, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_POLICYINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(POLICYINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_POLICYINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(POLICYINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_POLICYINFO(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(POLICYINFO, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_POLICYINFO(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(POLICYINFO, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_POLICYQUALINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(POLICYQUALINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_POLICYQUALINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(POLICYQUALINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_POLICYQUALINFO(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(POLICYQUALINFO, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_POLICYQUALINFO(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(POLICYQUALINFO, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_SXNETID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(SXNETID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_SXNETID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(SXNETID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_SXNETID(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(SXNETID, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_SXNETID(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(SXNETID, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_X509(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_X509(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_X509(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_X509(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_X509_ALGOR(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_ALGOR, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_X509_ALGOR(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_ALGOR, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_X509_ALGOR(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_ALGOR, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_X509_ALGOR(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_ALGOR, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_ATTRIBUTE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_ATTRIBUTE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_X509_ATTRIBUTE(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_ATTRIBUTE, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_X509_ATTRIBUTE(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_ATTRIBUTE, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_X509_CRL(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_CRL, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_X509_CRL(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_CRL, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_X509_CRL(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_CRL, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_X509_CRL(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_CRL, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_X509_EXTENSION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_EXTENSION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_X509_EXTENSION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_EXTENSION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_X509_EXTENSION(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_EXTENSION, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_X509_EXTENSION(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_EXTENSION, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_NAME_ENTRY, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_NAME_ENTRY, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_X509_NAME_ENTRY(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_NAME_ENTRY, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_X509_NAME_ENTRY(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_NAME_ENTRY, (buf), (len), (d2i_func), (free_func)) - -#define d2i_ASN1_SET_OF_X509_REVOKED(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_REVOKED, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -#define i2d_ASN1_SET_OF_X509_REVOKED(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_REVOKED, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -#define ASN1_seq_pack_X509_REVOKED(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_REVOKED, (st), (i2d_func), (buf), (len)) -#define ASN1_seq_unpack_X509_REVOKED(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_REVOKED, (buf), (len), (d2i_func), (free_func)) - -#define PKCS12_decrypt_d2i_PKCS12_SAFEBAG(algor, d2i_func, free_func, pass, passlen, oct, seq) \ - SKM_PKCS12_decrypt_d2i(PKCS12_SAFEBAG, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) - -#define PKCS12_decrypt_d2i_PKCS7(algor, d2i_func, free_func, pass, passlen, oct, seq) \ - SKM_PKCS12_decrypt_d2i(PKCS7, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) -/* End of util/mkstack.pl block, you may now edit :-) */ - -#endif /* !defined HEADER_SAFESTACK_H */ diff --git a/externals/openssl/sha.h b/externals/openssl/sha.h deleted file mode 100644 index 47a2c29f66..0000000000 --- a/externals/openssl/sha.h +++ /dev/null @@ -1,203 +0,0 @@ -/* crypto/sha/sha.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_SHA_H -#define HEADER_SHA_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(OPENSSL_NO_SHA) || (defined(OPENSSL_NO_SHA0) && defined(OPENSSL_NO_SHA1)) -#error SHA is disabled. -#endif - -#if defined(OPENSSL_FIPS) -#define FIPS_SHA_SIZE_T size_t -#endif - -/* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then ! - * ! SHA_LONG_LOG2 has to be defined along. ! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - -#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__) -#define SHA_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -#define SHA_LONG unsigned long -#define SHA_LONG_LOG2 3 -#else -#define SHA_LONG unsigned int -#endif - -#define SHA_LBLOCK 16 -#define SHA_CBLOCK (SHA_LBLOCK*4) /* SHA treats input data as a - * contiguous array of 32 bit - * wide big-endian values. */ -#define SHA_LAST_BLOCK (SHA_CBLOCK-8) -#define SHA_DIGEST_LENGTH 20 - -typedef struct SHAstate_st - { - SHA_LONG h0,h1,h2,h3,h4; - SHA_LONG Nl,Nh; - SHA_LONG data[SHA_LBLOCK]; - unsigned int num; - } SHA_CTX; - -#ifndef OPENSSL_NO_SHA0 -#ifdef OPENSSL_FIPS -int private_SHA_Init(SHA_CTX *c); -#endif -int SHA_Init(SHA_CTX *c); -int SHA_Update(SHA_CTX *c, const void *data, size_t len); -int SHA_Final(unsigned char *md, SHA_CTX *c); -unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md); -void SHA_Transform(SHA_CTX *c, const unsigned char *data); -#endif -#ifndef OPENSSL_NO_SHA1 -int SHA1_Init(SHA_CTX *c); -int SHA1_Update(SHA_CTX *c, const void *data, size_t len); -int SHA1_Final(unsigned char *md, SHA_CTX *c); -unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); -void SHA1_Transform(SHA_CTX *c, const unsigned char *data); -#endif - -#define SHA256_CBLOCK (SHA_LBLOCK*4) /* SHA-256 treats input data as a - * contiguous array of 32 bit - * wide big-endian values. */ -#define SHA224_DIGEST_LENGTH 28 -#define SHA256_DIGEST_LENGTH 32 - -typedef struct SHA256state_st - { - SHA_LONG h[8]; - SHA_LONG Nl,Nh; - SHA_LONG data[SHA_LBLOCK]; - unsigned int num,md_len; - } SHA256_CTX; - -#ifndef OPENSSL_NO_SHA256 -int SHA224_Init(SHA256_CTX *c); -int SHA224_Update(SHA256_CTX *c, const void *data, size_t len); -int SHA224_Final(unsigned char *md, SHA256_CTX *c); -unsigned char *SHA224(const unsigned char *d, size_t n,unsigned char *md); -int SHA256_Init(SHA256_CTX *c); -int SHA256_Update(SHA256_CTX *c, const void *data, size_t len); -int SHA256_Final(unsigned char *md, SHA256_CTX *c); -unsigned char *SHA256(const unsigned char *d, size_t n,unsigned char *md); -void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); -#endif - -#define SHA384_DIGEST_LENGTH 48 -#define SHA512_DIGEST_LENGTH 64 - -#ifndef OPENSSL_NO_SHA512 -/* - * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 - * being exactly 64-bit wide. See Implementation Notes in sha512.c - * for further details. - */ -#define SHA512_CBLOCK (SHA_LBLOCK*8) /* SHA-512 treats input data as a - * contiguous array of 64 bit - * wide big-endian values. */ -#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) -#define SHA_LONG64 unsigned __int64 -#define U64(C) C##UI64 -#elif defined(__arch64__) -#define SHA_LONG64 unsigned long -#define U64(C) C##UL -#else -#define SHA_LONG64 unsigned long long -#define U64(C) C##ULL -#endif - -typedef struct SHA512state_st - { - SHA_LONG64 h[8]; - SHA_LONG64 Nl,Nh; - union { - SHA_LONG64 d[SHA_LBLOCK]; - unsigned char p[SHA512_CBLOCK]; - } u; - unsigned int num,md_len; - } SHA512_CTX; -#endif - -#ifndef OPENSSL_NO_SHA512 -int SHA384_Init(SHA512_CTX *c); -int SHA384_Update(SHA512_CTX *c, const void *data, size_t len); -int SHA384_Final(unsigned char *md, SHA512_CTX *c); -unsigned char *SHA384(const unsigned char *d, size_t n,unsigned char *md); -int SHA512_Init(SHA512_CTX *c); -int SHA512_Update(SHA512_CTX *c, const void *data, size_t len); -int SHA512_Final(unsigned char *md, SHA512_CTX *c); -unsigned char *SHA512(const unsigned char *d, size_t n,unsigned char *md); -void SHA512_Transform(SHA512_CTX *c, const unsigned char *data); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/externals/openssl/ssl.h b/externals/openssl/ssl.h deleted file mode 100644 index ff8a128d3c..0000000000 --- a/externals/openssl/ssl.h +++ /dev/null @@ -1,2075 +0,0 @@ -/* ssl/ssl.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECC cipher suite support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ - -#ifndef HEADER_SSL_H -#define HEADER_SSL_H - -#include - -#ifndef OPENSSL_NO_COMP -#include -#endif -#ifndef OPENSSL_NO_BIO -#include -#endif -#ifndef OPENSSL_NO_DEPRECATED -#ifndef OPENSSL_NO_X509 -#include -#endif -#include -#include -#include -#endif -#include -#include - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* SSLeay version number for ASN.1 encoding of the session information */ -/* Version 0 - initial version - * Version 1 - added the optional peer certificate - */ -#define SSL_SESSION_ASN1_VERSION 0x0001 - -/* text strings for the ciphers */ -#define SSL_TXT_NULL_WITH_MD5 SSL2_TXT_NULL_WITH_MD5 -#define SSL_TXT_RC4_128_WITH_MD5 SSL2_TXT_RC4_128_WITH_MD5 -#define SSL_TXT_RC4_128_EXPORT40_WITH_MD5 SSL2_TXT_RC4_128_EXPORT40_WITH_MD5 -#define SSL_TXT_RC2_128_CBC_WITH_MD5 SSL2_TXT_RC2_128_CBC_WITH_MD5 -#define SSL_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 -#define SSL_TXT_IDEA_128_CBC_WITH_MD5 SSL2_TXT_IDEA_128_CBC_WITH_MD5 -#define SSL_TXT_DES_64_CBC_WITH_MD5 SSL2_TXT_DES_64_CBC_WITH_MD5 -#define SSL_TXT_DES_64_CBC_WITH_SHA SSL2_TXT_DES_64_CBC_WITH_SHA -#define SSL_TXT_DES_192_EDE3_CBC_WITH_MD5 SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5 -#define SSL_TXT_DES_192_EDE3_CBC_WITH_SHA SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA - -/* VRS Additional Kerberos5 entries - */ -#define SSL_TXT_KRB5_DES_64_CBC_SHA SSL3_TXT_KRB5_DES_64_CBC_SHA -#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA -#define SSL_TXT_KRB5_RC4_128_SHA SSL3_TXT_KRB5_RC4_128_SHA -#define SSL_TXT_KRB5_IDEA_128_CBC_SHA SSL3_TXT_KRB5_IDEA_128_CBC_SHA -#define SSL_TXT_KRB5_DES_64_CBC_MD5 SSL3_TXT_KRB5_DES_64_CBC_MD5 -#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5 -#define SSL_TXT_KRB5_RC4_128_MD5 SSL3_TXT_KRB5_RC4_128_MD5 -#define SSL_TXT_KRB5_IDEA_128_CBC_MD5 SSL3_TXT_KRB5_IDEA_128_CBC_MD5 - -#define SSL_TXT_KRB5_DES_40_CBC_SHA SSL3_TXT_KRB5_DES_40_CBC_SHA -#define SSL_TXT_KRB5_RC2_40_CBC_SHA SSL3_TXT_KRB5_RC2_40_CBC_SHA -#define SSL_TXT_KRB5_RC4_40_SHA SSL3_TXT_KRB5_RC4_40_SHA -#define SSL_TXT_KRB5_DES_40_CBC_MD5 SSL3_TXT_KRB5_DES_40_CBC_MD5 -#define SSL_TXT_KRB5_RC2_40_CBC_MD5 SSL3_TXT_KRB5_RC2_40_CBC_MD5 -#define SSL_TXT_KRB5_RC4_40_MD5 SSL3_TXT_KRB5_RC4_40_MD5 - -#define SSL_TXT_KRB5_DES_40_CBC_SHA SSL3_TXT_KRB5_DES_40_CBC_SHA -#define SSL_TXT_KRB5_DES_40_CBC_MD5 SSL3_TXT_KRB5_DES_40_CBC_MD5 -#define SSL_TXT_KRB5_DES_64_CBC_SHA SSL3_TXT_KRB5_DES_64_CBC_SHA -#define SSL_TXT_KRB5_DES_64_CBC_MD5 SSL3_TXT_KRB5_DES_64_CBC_MD5 -#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA -#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5 -#define SSL_MAX_KRB5_PRINCIPAL_LENGTH 256 - -#define SSL_MAX_SSL_SESSION_ID_LENGTH 32 -#define SSL_MAX_SID_CTX_LENGTH 32 - -#define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES (512/8) -#define SSL_MAX_KEY_ARG_LENGTH 8 -#define SSL_MAX_MASTER_KEY_LENGTH 48 - -/* These are used to specify which ciphers to use and not to use */ -#define SSL_TXT_LOW "LOW" -#define SSL_TXT_MEDIUM "MEDIUM" -#define SSL_TXT_HIGH "HIGH" -#define SSL_TXT_FIPS "FIPS" -#define SSL_TXT_kFZA "kFZA" -#define SSL_TXT_aFZA "aFZA" -#define SSL_TXT_eFZA "eFZA" -#define SSL_TXT_FZA "FZA" - -#define SSL_TXT_aNULL "aNULL" -#define SSL_TXT_eNULL "eNULL" -#define SSL_TXT_NULL "NULL" - -#define SSL_TXT_kKRB5 "kKRB5" -#define SSL_TXT_aKRB5 "aKRB5" -#define SSL_TXT_KRB5 "KRB5" - -#define SSL_TXT_kRSA "kRSA" -#define SSL_TXT_kDHr "kDHr" -#define SSL_TXT_kDHd "kDHd" -#define SSL_TXT_kEDH "kEDH" -#define SSL_TXT_aRSA "aRSA" -#define SSL_TXT_aDSS "aDSS" -#define SSL_TXT_aDH "aDH" -#define SSL_TXT_DSS "DSS" -#define SSL_TXT_DH "DH" -#define SSL_TXT_EDH "EDH" -#define SSL_TXT_ADH "ADH" -#define SSL_TXT_RSA "RSA" -#define SSL_TXT_DES "DES" -#define SSL_TXT_3DES "3DES" -#define SSL_TXT_RC4 "RC4" -#define SSL_TXT_RC2 "RC2" -#define SSL_TXT_IDEA "IDEA" -#define SSL_TXT_SEED "SEED" -#define SSL_TXT_AES "AES" -#define SSL_TXT_CAMELLIA "CAMELLIA" -#define SSL_TXT_MD5 "MD5" -#define SSL_TXT_SHA1 "SHA1" -#define SSL_TXT_SHA "SHA" -#define SSL_TXT_EXP "EXP" -#define SSL_TXT_EXPORT "EXPORT" -#define SSL_TXT_EXP40 "EXPORT40" -#define SSL_TXT_EXP56 "EXPORT56" -#define SSL_TXT_SSLV2 "SSLv2" -#define SSL_TXT_SSLV3 "SSLv3" -#define SSL_TXT_TLSV1 "TLSv1" -#define SSL_TXT_ALL "ALL" -#define SSL_TXT_ECC "ECCdraft" /* ECC ciphersuites are not yet official */ - -/* - * COMPLEMENTOF* definitions. These identifiers are used to (de-select) - * ciphers normally not being used. - * Example: "RC4" will activate all ciphers using RC4 including ciphers - * without authentication, which would normally disabled by DEFAULT (due - * the "!ADH" being part of default). Therefore "RC4:!COMPLEMENTOFDEFAULT" - * will make sure that it is also disabled in the specific selection. - * COMPLEMENTOF* identifiers are portable between version, as adjustments - * to the default cipher setup will also be included here. - * - * COMPLEMENTOFDEFAULT does not experience the same special treatment that - * DEFAULT gets, as only selection is being done and no sorting as needed - * for DEFAULT. - */ -#define SSL_TXT_CMPALL "COMPLEMENTOFALL" -#define SSL_TXT_CMPDEF "COMPLEMENTOFDEFAULT" - -/* The following cipher list is used by default. - * It also is substituted when an application-defined cipher list string - * starts with 'DEFAULT'. */ -#define SSL_DEFAULT_CIPHER_LIST "AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH" /* low priority for RC4 */ - -/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */ -#define SSL_SENT_SHUTDOWN 1 -#define SSL_RECEIVED_SHUTDOWN 2 - -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if (defined(OPENSSL_NO_RSA) || defined(OPENSSL_NO_MD5)) && !defined(OPENSSL_NO_SSL2) -#define OPENSSL_NO_SSL2 -#endif - -#define SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1 -#define SSL_FILETYPE_PEM X509_FILETYPE_PEM - -/* This is needed to stop compilers complaining about the - * 'struct ssl_st *' function parameters used to prototype callbacks - * in SSL_CTX. */ -typedef struct ssl_st *ssl_crock_st; - -/* used to hold info on the particular ciphers used */ -typedef struct ssl_cipher_st - { - int valid; - const char *name; /* text name */ - unsigned long id; /* id, 4 bytes, first is version */ - unsigned long algorithms; /* what ciphers are used */ - unsigned long algo_strength; /* strength and export flags */ - unsigned long algorithm2; /* Extra flags */ - int strength_bits; /* Number of bits really used */ - int alg_bits; /* Number of bits for algorithm */ - unsigned long mask; /* used for matching */ - unsigned long mask_strength; /* also used for matching */ - } SSL_CIPHER; - -DECLARE_STACK_OF(SSL_CIPHER) - -/* Used to hold functions for SSLv2 or SSLv3/TLSv1 functions */ -typedef struct ssl_method_st - { - int version; - int (*ssl_new)(SSL *s); - void (*ssl_clear)(SSL *s); - void (*ssl_free)(SSL *s); - int (*ssl_accept)(SSL *s); - int (*ssl_connect)(SSL *s); - int (*ssl_read)(SSL *s,void *buf,int len); - int (*ssl_peek)(SSL *s,void *buf,int len); - int (*ssl_write)(SSL *s,const void *buf,int len); - int (*ssl_shutdown)(SSL *s); - int (*ssl_renegotiate)(SSL *s); - int (*ssl_renegotiate_check)(SSL *s); - long (*ssl_get_message)(SSL *s, int st1, int stn, int mt, long - max, int *ok); - int (*ssl_read_bytes)(SSL *s, int type, unsigned char *buf, int len, - int peek); - int (*ssl_write_bytes)(SSL *s, int type, const void *buf_, int len); - int (*ssl_dispatch_alert)(SSL *s); - long (*ssl_ctrl)(SSL *s,int cmd,long larg,void *parg); - long (*ssl_ctx_ctrl)(SSL_CTX *ctx,int cmd,long larg,void *parg); - SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr); - int (*put_cipher_by_char)(const SSL_CIPHER *cipher,unsigned char *ptr); - int (*ssl_pending)(const SSL *s); - int (*num_ciphers)(void); - SSL_CIPHER *(*get_cipher)(unsigned ncipher); - struct ssl_method_st *(*get_ssl_method)(int version); - long (*get_timeout)(void); - struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */ - int (*ssl_version)(void); - long (*ssl_callback_ctrl)(SSL *s, int cb_id, void (*fp)(void)); - long (*ssl_ctx_callback_ctrl)(SSL_CTX *s, int cb_id, void (*fp)(void)); - } SSL_METHOD; - -/* Lets make this into an ASN.1 type structure as follows - * SSL_SESSION_ID ::= SEQUENCE { - * version INTEGER, -- structure version number - * SSLversion INTEGER, -- SSL version number - * Cipher OCTET_STRING, -- the 3 byte cipher ID - * Session_ID OCTET_STRING, -- the Session ID - * Master_key OCTET_STRING, -- the master key - * KRB5_principal OCTET_STRING -- optional Kerberos principal - * Key_Arg [ 0 ] IMPLICIT OCTET_STRING, -- the optional Key argument - * Time [ 1 ] EXPLICIT INTEGER, -- optional Start Time - * Timeout [ 2 ] EXPLICIT INTEGER, -- optional Timeout ins seconds - * Peer [ 3 ] EXPLICIT X509, -- optional Peer Certificate - * Session_ID_context [ 4 ] EXPLICIT OCTET_STRING, -- the Session ID context - * Verify_result [ 5 ] EXPLICIT INTEGER -- X509_V_... code for `Peer' - * Compression [6] IMPLICIT ASN1_OBJECT -- compression OID XXXXX - * } - * Look in ssl/ssl_asn1.c for more details - * I'm using EXPLICIT tags so I can read the damn things using asn1parse :-). - */ -typedef struct ssl_session_st - { - int ssl_version; /* what ssl version session info is - * being kept in here? */ - - /* only really used in SSLv2 */ - unsigned int key_arg_length; - unsigned char key_arg[SSL_MAX_KEY_ARG_LENGTH]; - int master_key_length; - unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH]; - /* session_id - valid? */ - unsigned int session_id_length; - unsigned char session_id[SSL_MAX_SSL_SESSION_ID_LENGTH]; - /* this is used to determine whether the session is being reused in - * the appropriate context. It is up to the application to set this, - * via SSL_new */ - unsigned int sid_ctx_length; - unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH]; - -#ifndef OPENSSL_NO_KRB5 - unsigned int krb5_client_princ_len; - unsigned char krb5_client_princ[SSL_MAX_KRB5_PRINCIPAL_LENGTH]; -#endif /* OPENSSL_NO_KRB5 */ - - int not_resumable; - - /* The cert is the certificate used to establish this connection */ - struct sess_cert_st /* SESS_CERT */ *sess_cert; - - /* This is the cert for the other end. - * On clients, it will be the same as sess_cert->peer_key->x509 - * (the latter is not enough as sess_cert is not retained - * in the external representation of sessions, see ssl_asn1.c). */ - X509 *peer; - /* when app_verify_callback accepts a session where the peer's certificate - * is not ok, we must remember the error for session reuse: */ - long verify_result; /* only for servers */ - - int references; - long timeout; - long time; - - int compress_meth; /* Need to lookup the method */ - - SSL_CIPHER *cipher; - unsigned long cipher_id; /* when ASN.1 loaded, this - * needs to be used to load - * the 'cipher' structure */ - - STACK_OF(SSL_CIPHER) *ciphers; /* shared ciphers? */ - - CRYPTO_EX_DATA ex_data; /* application specific data */ - - /* These are used to make removal of session-ids more - * efficient and to implement a maximum cache size. */ - struct ssl_session_st *prev,*next; -#ifndef OPENSSL_NO_TLSEXT - char *tlsext_hostname; - /* RFC4507 info */ - unsigned char *tlsext_tick; /* Session ticket */ - size_t tlsext_ticklen; /* Session ticket length */ - long tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */ -#endif - } SSL_SESSION; - - -#define SSL_OP_MICROSOFT_SESS_ID_BUG 0x00000001L -#define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x00000002L -#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x00000008L -#define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x00000010L -#define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x00000020L -#define SSL_OP_MSIE_SSLV2_RSA_PADDING 0x00000040L /* no effect since 0.9.7h and 0.9.8b */ -#define SSL_OP_SSLEAY_080_CLIENT_DH_BUG 0x00000080L -#define SSL_OP_TLS_D5_BUG 0x00000100L -#define SSL_OP_TLS_BLOCK_PADDING_BUG 0x00000200L - -/* Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added - * in OpenSSL 0.9.6d. Usually (depending on the application protocol) - * the workaround is not needed. Unfortunately some broken SSL/TLS - * implementations cannot handle it at all, which is why we include - * it in SSL_OP_ALL. */ -#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 0x00000800L /* added in 0.9.6e */ - -/* SSL_OP_ALL: various bug workarounds that should be rather harmless. - * This used to be 0x000FFFFFL before 0.9.7. */ -#define SSL_OP_ALL 0x00000FFFL - -/* DTLS options */ -#define SSL_OP_NO_QUERY_MTU 0x00001000L -/* Turn on Cookie Exchange (on relevant for servers) */ -#define SSL_OP_COOKIE_EXCHANGE 0x00002000L -/* Don't use RFC4507 ticket extension */ -#define SSL_OP_NO_TICKET 0x00004000L - -/* As server, disallow session resumption on renegotiation */ -#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L -/* If set, always create a new key when using tmp_ecdh parameters */ -#define SSL_OP_SINGLE_ECDH_USE 0x00080000L -/* If set, always create a new key when using tmp_dh parameters */ -#define SSL_OP_SINGLE_DH_USE 0x00100000L -/* Set to always use the tmp_rsa key when doing RSA operations, - * even when this violates protocol specs */ -#define SSL_OP_EPHEMERAL_RSA 0x00200000L -/* Set on servers to choose the cipher according to the server's - * preferences */ -#define SSL_OP_CIPHER_SERVER_PREFERENCE 0x00400000L -/* If set, a server will allow a client to issue a SSLv3.0 version number - * as latest version supported in the premaster secret, even when TLSv1.0 - * (version 3.1) was announced in the client hello. Normally this is - * forbidden to prevent version rollback attacks. */ -#define SSL_OP_TLS_ROLLBACK_BUG 0x00800000L - -#define SSL_OP_NO_SSLv2 0x01000000L -#define SSL_OP_NO_SSLv3 0x02000000L -#define SSL_OP_NO_TLSv1 0x04000000L - -/* The next flag deliberately changes the ciphertest, this is a check - * for the PKCS#1 attack */ -#define SSL_OP_PKCS1_CHECK_1 0x08000000L -#define SSL_OP_PKCS1_CHECK_2 0x10000000L -#define SSL_OP_NETSCAPE_CA_DN_BUG 0x20000000L -#define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 0x40000000L - - -/* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success - * when just a single record has been written): */ -#define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001L -/* Make it possible to retry SSL_write() with changed buffer location - * (buffer contents must stay the same!); this is not the default to avoid - * the misconception that non-blocking SSL_write() behaves like - * non-blocking write(): */ -#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L -/* Never bother the application with retries if the transport - * is blocking: */ -#define SSL_MODE_AUTO_RETRY 0x00000004L -/* Don't attempt to automatically build certificate chain */ -#define SSL_MODE_NO_AUTO_CHAIN 0x00000008L - - -/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, - * they cannot be used to clear bits. */ - -#define SSL_CTX_set_options(ctx,op) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL) -#define SSL_CTX_get_options(ctx) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,0,NULL) -#define SSL_set_options(ssl,op) \ - SSL_ctrl((ssl),SSL_CTRL_OPTIONS,(op),NULL) -#define SSL_get_options(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_OPTIONS,0,NULL) - -#define SSL_CTX_set_mode(ctx,op) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL) -#define SSL_CTX_get_mode(ctx) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL) -#define SSL_set_mode(ssl,op) \ - SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL) -#define SSL_get_mode(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL) -#define SSL_set_mtu(ssl, mtu) \ - SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL) - - -void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); -void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); -#define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) -#define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) - - - -#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32) -#define SSL_MAX_CERT_LIST_DEFAULT 1024*30 /* 30k max cert list :-) */ -#else -#define SSL_MAX_CERT_LIST_DEFAULT 1024*100 /* 100k max cert list :-) */ -#endif - -#define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) - -/* This callback type is used inside SSL_CTX, SSL, and in the functions that set - * them. It is used to override the generation of SSL/TLS session IDs in a - * server. Return value should be zero on an error, non-zero to proceed. Also, - * callbacks should themselves check if the id they generate is unique otherwise - * the SSL handshake will fail with an error - callbacks can do this using the - * 'ssl' value they're passed by; - * SSL_has_matching_session_id(ssl, id, *id_len) - * The length value passed in is set at the maximum size the session ID can be. - * In SSLv2 this is 16 bytes, whereas SSLv3/TLSv1 it is 32 bytes. The callback - * can alter this length to be less if desired, but under SSLv2 session IDs are - * supposed to be fixed at 16 bytes so the id will be padded after the callback - * returns in this case. It is also an error for the callback to set the size to - * zero. */ -typedef int (*GEN_SESSION_CB)(const SSL *ssl, unsigned char *id, - unsigned int *id_len); - -typedef struct ssl_comp_st - { - int id; - const char *name; -#ifndef OPENSSL_NO_COMP - COMP_METHOD *method; -#else - char *method; -#endif - } SSL_COMP; - -DECLARE_STACK_OF(SSL_COMP) - -struct ssl_ctx_st - { - SSL_METHOD *method; - - STACK_OF(SSL_CIPHER) *cipher_list; - /* same as above but sorted for lookup */ - STACK_OF(SSL_CIPHER) *cipher_list_by_id; - - struct x509_store_st /* X509_STORE */ *cert_store; - struct lhash_st /* LHASH */ *sessions; /* a set of SSL_SESSIONs */ - /* Most session-ids that will be cached, default is - * SSL_SESSION_CACHE_MAX_SIZE_DEFAULT. 0 is unlimited. */ - unsigned long session_cache_size; - struct ssl_session_st *session_cache_head; - struct ssl_session_st *session_cache_tail; - - /* This can have one of 2 values, ored together, - * SSL_SESS_CACHE_CLIENT, - * SSL_SESS_CACHE_SERVER, - * Default is SSL_SESSION_CACHE_SERVER, which means only - * SSL_accept which cache SSL_SESSIONS. */ - int session_cache_mode; - - /* If timeout is not 0, it is the default timeout value set - * when SSL_new() is called. This has been put in to make - * life easier to set things up */ - long session_timeout; - - /* If this callback is not null, it will be called each - * time a session id is added to the cache. If this function - * returns 1, it means that the callback will do a - * SSL_SESSION_free() when it has finished using it. Otherwise, - * on 0, it means the callback has finished with it. - * If remove_session_cb is not null, it will be called when - * a session-id is removed from the cache. After the call, - * OpenSSL will SSL_SESSION_free() it. */ - int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess); - void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess); - SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, - unsigned char *data,int len,int *copy); - - struct - { - int sess_connect; /* SSL new conn - started */ - int sess_connect_renegotiate;/* SSL reneg - requested */ - int sess_connect_good; /* SSL new conne/reneg - finished */ - int sess_accept; /* SSL new accept - started */ - int sess_accept_renegotiate;/* SSL reneg - requested */ - int sess_accept_good; /* SSL accept/reneg - finished */ - int sess_miss; /* session lookup misses */ - int sess_timeout; /* reuse attempt on timeouted session */ - int sess_cache_full; /* session removed due to full cache */ - int sess_hit; /* session reuse actually done */ - int sess_cb_hit; /* session-id that was not - * in the cache was - * passed back via the callback. This - * indicates that the application is - * supplying session-id's from other - * processes - spooky :-) */ - } stats; - - int references; - - /* if defined, these override the X509_verify_cert() calls */ - int (*app_verify_callback)(X509_STORE_CTX *, void *); - void *app_verify_arg; - /* before OpenSSL 0.9.7, 'app_verify_arg' was ignored - * ('app_verify_callback' was called with just one argument) */ - - /* Default password callback. */ - pem_password_cb *default_passwd_callback; - - /* Default password callback user data. */ - void *default_passwd_callback_userdata; - - /* get client cert callback */ - int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey); - - /* cookie generate callback */ - int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie, - unsigned int *cookie_len); - - /* verify cookie callback */ - int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie, - unsigned int cookie_len); - - CRYPTO_EX_DATA ex_data; - - const EVP_MD *rsa_md5;/* For SSLv2 - name is 'ssl2-md5' */ - const EVP_MD *md5; /* For SSLv3/TLSv1 'ssl3-md5' */ - const EVP_MD *sha1; /* For SSLv3/TLSv1 'ssl3->sha1' */ - - STACK_OF(X509) *extra_certs; - STACK_OF(SSL_COMP) *comp_methods; /* stack of SSL_COMP, SSLv3/TLSv1 */ - - - /* Default values used when no per-SSL value is defined follow */ - - void (*info_callback)(const SSL *ssl,int type,int val); /* used if SSL's info_callback is NULL */ - - /* what we put in client cert requests */ - STACK_OF(X509_NAME) *client_CA; - - - /* Default values to use in SSL structures follow (these are copied by SSL_new) */ - - unsigned long options; - unsigned long mode; - long max_cert_list; - - struct cert_st /* CERT */ *cert; - int read_ahead; - - /* callback that allows applications to peek at protocol messages */ - void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); - void *msg_callback_arg; - - int verify_mode; - unsigned int sid_ctx_length; - unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH]; - int (*default_verify_callback)(int ok,X509_STORE_CTX *ctx); /* called 'verify_callback' in the SSL */ - - /* Default generate session ID callback. */ - GEN_SESSION_CB generate_session_id; - - X509_VERIFY_PARAM *param; - -#if 0 - int purpose; /* Purpose setting */ - int trust; /* Trust setting */ -#endif - - int quiet_shutdown; - -#ifndef OPENSSL_ENGINE - /* Engine to pass requests for client certs to - */ - ENGINE *client_cert_engine; -#endif - -#ifndef OPENSSL_NO_TLSEXT - /* TLS extensions servername callback */ - int (*tlsext_servername_callback)(SSL*, int *, void *); - void *tlsext_servername_arg; - /* RFC 4507 session ticket keys */ - unsigned char tlsext_tick_key_name[16]; - unsigned char tlsext_tick_hmac_key[16]; - unsigned char tlsext_tick_aes_key[16]; - /* Callback to support customisation of ticket key setting */ - int (*tlsext_ticket_key_cb)(SSL *ssl, - unsigned char *name, unsigned char *iv, - EVP_CIPHER_CTX *ectx, - HMAC_CTX *hctx, int enc); - - /* certificate status request info */ - /* Callback for status request */ - int (*tlsext_status_cb)(SSL *ssl, void *arg); - void *tlsext_status_arg; -#endif - - }; - -#define SSL_SESS_CACHE_OFF 0x0000 -#define SSL_SESS_CACHE_CLIENT 0x0001 -#define SSL_SESS_CACHE_SERVER 0x0002 -#define SSL_SESS_CACHE_BOTH (SSL_SESS_CACHE_CLIENT|SSL_SESS_CACHE_SERVER) -#define SSL_SESS_CACHE_NO_AUTO_CLEAR 0x0080 -/* enough comments already ... see SSL_CTX_set_session_cache_mode(3) */ -#define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 0x0100 -#define SSL_SESS_CACHE_NO_INTERNAL_STORE 0x0200 -#define SSL_SESS_CACHE_NO_INTERNAL \ - (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP|SSL_SESS_CACHE_NO_INTERNAL_STORE) - - struct lhash_st *SSL_CTX_sessions(SSL_CTX *ctx); -#define SSL_CTX_sess_number(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL) -#define SSL_CTX_sess_connect(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL) -#define SSL_CTX_sess_connect_good(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL) -#define SSL_CTX_sess_connect_renegotiate(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL) -#define SSL_CTX_sess_accept(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL) -#define SSL_CTX_sess_accept_renegotiate(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL) -#define SSL_CTX_sess_accept_good(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL) -#define SSL_CTX_sess_hits(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL) -#define SSL_CTX_sess_cb_hits(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL) -#define SSL_CTX_sess_misses(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL) -#define SSL_CTX_sess_timeouts(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL) -#define SSL_CTX_sess_cache_full(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL) - -void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess)); -int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(struct ssl_st *ssl, SSL_SESSION *sess); -void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess)); -void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(struct ssl_ctx_st *ctx, SSL_SESSION *sess); -void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, unsigned char *data,int len,int *copy)); -SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl, unsigned char *Data, int len, int *copy); -void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(const SSL *ssl,int type,int val)); -void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl,int type,int val); -void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey)); -int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey); -#ifndef OPENSSL_NO_ENGINE -int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e); -#endif -void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len)); -void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int cookie_len)); - -#define SSL_NOTHING 1 -#define SSL_WRITING 2 -#define SSL_READING 3 -#define SSL_X509_LOOKUP 4 - -/* These will only be used when doing non-blocking IO */ -#define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING) -#define SSL_want_read(s) (SSL_want(s) == SSL_READING) -#define SSL_want_write(s) (SSL_want(s) == SSL_WRITING) -#define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP) - -struct ssl_st - { - /* protocol version - * (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION, DTLS1_VERSION) - */ - int version; - int type; /* SSL_ST_CONNECT or SSL_ST_ACCEPT */ - - SSL_METHOD *method; /* SSLv3 */ - - /* There are 2 BIO's even though they are normally both the - * same. This is so data can be read and written to different - * handlers */ - -#ifndef OPENSSL_NO_BIO - BIO *rbio; /* used by SSL_read */ - BIO *wbio; /* used by SSL_write */ - BIO *bbio; /* used during session-id reuse to concatenate - * messages */ -#else - char *rbio; /* used by SSL_read */ - char *wbio; /* used by SSL_write */ - char *bbio; -#endif - /* This holds a variable that indicates what we were doing - * when a 0 or -1 is returned. This is needed for - * non-blocking IO so we know what request needs re-doing when - * in SSL_accept or SSL_connect */ - int rwstate; - - /* true when we are actually in SSL_accept() or SSL_connect() */ - int in_handshake; - int (*handshake_func)(SSL *); - - /* Imagine that here's a boolean member "init" that is - * switched as soon as SSL_set_{accept/connect}_state - * is called for the first time, so that "state" and - * "handshake_func" are properly initialized. But as - * handshake_func is == 0 until then, we use this - * test instead of an "init" member. - */ - - int server; /* are we the server side? - mostly used by SSL_clear*/ - - int new_session;/* 1 if we are to use a new session. - * 2 if we are a server and are inside a handshake - * (i.e. not just sending a HelloRequest) - * NB: For servers, the 'new' session may actually be a previously - * cached session or even the previous session unless - * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set */ - int quiet_shutdown;/* don't send shutdown packets */ - int shutdown; /* we have shut things down, 0x01 sent, 0x02 - * for received */ - int state; /* where we are */ - int rstate; /* where we are when reading */ - - BUF_MEM *init_buf; /* buffer used during init */ - void *init_msg; /* pointer to handshake message body, set by ssl3_get_message() */ - int init_num; /* amount read/written */ - int init_off; /* amount read/written */ - - /* used internally to point at a raw packet */ - unsigned char *packet; - unsigned int packet_length; - - struct ssl2_state_st *s2; /* SSLv2 variables */ - struct ssl3_state_st *s3; /* SSLv3 variables */ - struct dtls1_state_st *d1; /* DTLSv1 variables */ - - int read_ahead; /* Read as many input bytes as possible - * (for non-blocking reads) */ - - /* callback that allows applications to peek at protocol messages */ - void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); - void *msg_callback_arg; - - int hit; /* reusing a previous session */ - - X509_VERIFY_PARAM *param; - -#if 0 - int purpose; /* Purpose setting */ - int trust; /* Trust setting */ -#endif - - /* crypto */ - STACK_OF(SSL_CIPHER) *cipher_list; - STACK_OF(SSL_CIPHER) *cipher_list_by_id; - - /* These are the ones being used, the ones in SSL_SESSION are - * the ones to be 'copied' into these ones */ - - EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ - const EVP_MD *read_hash; /* used for mac generation */ -#ifndef OPENSSL_NO_COMP - COMP_CTX *expand; /* uncompress */ -#else - char *expand; -#endif - - EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ - const EVP_MD *write_hash; /* used for mac generation */ -#ifndef OPENSSL_NO_COMP - COMP_CTX *compress; /* compression */ -#else - char *compress; -#endif - - /* session info */ - - /* client cert? */ - /* This is used to hold the server certificate used */ - struct cert_st /* CERT */ *cert; - - /* the session_id_context is used to ensure sessions are only reused - * in the appropriate context */ - unsigned int sid_ctx_length; - unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH]; - - /* This can also be in the session once a session is established */ - SSL_SESSION *session; - - /* Default generate session ID callback. */ - GEN_SESSION_CB generate_session_id; - - /* Used in SSL2 and SSL3 */ - int verify_mode; /* 0 don't care about verify failure. - * 1 fail if verify fails */ - int (*verify_callback)(int ok,X509_STORE_CTX *ctx); /* fail if callback returns 0 */ - - void (*info_callback)(const SSL *ssl,int type,int val); /* optional informational callback */ - - int error; /* error bytes to be written */ - int error_code; /* actual code */ - -#ifndef OPENSSL_NO_KRB5 - KSSL_CTX *kssl_ctx; /* Kerberos 5 context */ -#endif /* OPENSSL_NO_KRB5 */ - - SSL_CTX *ctx; - /* set this flag to 1 and a sleep(1) is put into all SSL_read() - * and SSL_write() calls, good for nbio debuging :-) */ - int debug; - - /* extra application data */ - long verify_result; - CRYPTO_EX_DATA ex_data; - - /* for server side, keep the list of CA_dn we can use */ - STACK_OF(X509_NAME) *client_CA; - - int references; - unsigned long options; /* protocol behaviour */ - unsigned long mode; /* API behaviour */ - long max_cert_list; - int first_packet; - int client_version; /* what was passed, used for - * SSLv3/TLS rollback check */ -#ifndef OPENSSL_NO_TLSEXT - /* TLS extension debug callback */ - void (*tlsext_debug_cb)(SSL *s, int client_server, int type, - unsigned char *data, int len, - void *arg); - void *tlsext_debug_arg; - char *tlsext_hostname; - int servername_done; /* no further mod of servername - 0 : call the servername extension callback. - 1 : prepare 2, allow last ack just after in server callback. - 2 : don't call servername callback, no ack in server hello - */ - /* certificate status request info */ - /* Status type or -1 if no status type */ - int tlsext_status_type; - /* Expect OCSP CertificateStatus message */ - int tlsext_status_expected; - /* OCSP status request only */ - STACK_OF(OCSP_RESPID) *tlsext_ocsp_ids; - X509_EXTENSIONS *tlsext_ocsp_exts; - /* OCSP response received or to be sent */ - unsigned char *tlsext_ocsp_resp; - int tlsext_ocsp_resplen; - - /* RFC4507 session ticket expected to be received or sent */ - int tlsext_ticket_expected; - SSL_CTX * initial_ctx; /* initial ctx, used to store sessions */ -#define session_ctx initial_ctx -#else -#define session_ctx ctx -#endif - }; - -#ifdef __cplusplus -} -#endif - -#include -#include -#include /* This is mostly sslv3 with a few tweaks */ -#include /* Datagram TLS */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* compatibility */ -#define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg)) -#define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) -#define SSL_SESSION_set_app_data(s,a) (SSL_SESSION_set_ex_data(s,0,(char *)a)) -#define SSL_SESSION_get_app_data(s) (SSL_SESSION_get_ex_data(s,0)) -#define SSL_CTX_get_app_data(ctx) (SSL_CTX_get_ex_data(ctx,0)) -#define SSL_CTX_set_app_data(ctx,arg) (SSL_CTX_set_ex_data(ctx,0,(char *)arg)) - -/* The following are the possible values for ssl->state are are - * used to indicate where we are up to in the SSL connection establishment. - * The macros that follow are about the only things you should need to use - * and even then, only when using non-blocking IO. - * It can also be useful to work out where you were when the connection - * failed */ - -#define SSL_ST_CONNECT 0x1000 -#define SSL_ST_ACCEPT 0x2000 -#define SSL_ST_MASK 0x0FFF -#define SSL_ST_INIT (SSL_ST_CONNECT|SSL_ST_ACCEPT) -#define SSL_ST_BEFORE 0x4000 -#define SSL_ST_OK 0x03 -#define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT) - -#define SSL_CB_LOOP 0x01 -#define SSL_CB_EXIT 0x02 -#define SSL_CB_READ 0x04 -#define SSL_CB_WRITE 0x08 -#define SSL_CB_ALERT 0x4000 /* used in callback */ -#define SSL_CB_READ_ALERT (SSL_CB_ALERT|SSL_CB_READ) -#define SSL_CB_WRITE_ALERT (SSL_CB_ALERT|SSL_CB_WRITE) -#define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT|SSL_CB_LOOP) -#define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT|SSL_CB_EXIT) -#define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT|SSL_CB_LOOP) -#define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT|SSL_CB_EXIT) -#define SSL_CB_HANDSHAKE_START 0x10 -#define SSL_CB_HANDSHAKE_DONE 0x20 - -/* Is the SSL_connection established? */ -#define SSL_get_state(a) SSL_state(a) -#define SSL_is_init_finished(a) (SSL_state(a) == SSL_ST_OK) -#define SSL_in_init(a) (SSL_state(a)&SSL_ST_INIT) -#define SSL_in_before(a) (SSL_state(a)&SSL_ST_BEFORE) -#define SSL_in_connect_init(a) (SSL_state(a)&SSL_ST_CONNECT) -#define SSL_in_accept_init(a) (SSL_state(a)&SSL_ST_ACCEPT) - -/* The following 2 states are kept in ssl->rstate when reads fail, - * you should not need these */ -#define SSL_ST_READ_HEADER 0xF0 -#define SSL_ST_READ_BODY 0xF1 -#define SSL_ST_READ_DONE 0xF2 - -/* Obtain latest Finished message - * -- that we sent (SSL_get_finished) - * -- that we expected from peer (SSL_get_peer_finished). - * Returns length (0 == no Finished so far), copies up to 'count' bytes. */ -size_t SSL_get_finished(const SSL *s, void *buf, size_t count); -size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count); - -/* use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options - * are 'ored' with SSL_VERIFY_PEER if they are desired */ -#define SSL_VERIFY_NONE 0x00 -#define SSL_VERIFY_PEER 0x01 -#define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02 -#define SSL_VERIFY_CLIENT_ONCE 0x04 - -#define OpenSSL_add_ssl_algorithms() SSL_library_init() -#define SSLeay_add_ssl_algorithms() SSL_library_init() - -/* this is for backward compatibility */ -#if 0 /* NEW_SSLEAY */ -#define SSL_CTX_set_default_verify(a,b,c) SSL_CTX_set_verify(a,b,c) -#define SSL_set_pref_cipher(c,n) SSL_set_cipher_list(c,n) -#define SSL_add_session(a,b) SSL_CTX_add_session((a),(b)) -#define SSL_remove_session(a,b) SSL_CTX_remove_session((a),(b)) -#define SSL_flush_sessions(a,b) SSL_CTX_flush_sessions((a),(b)) -#endif -/* More backward compatibility */ -#define SSL_get_cipher(s) \ - SSL_CIPHER_get_name(SSL_get_current_cipher(s)) -#define SSL_get_cipher_bits(s,np) \ - SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np) -#define SSL_get_cipher_version(s) \ - SSL_CIPHER_get_version(SSL_get_current_cipher(s)) -#define SSL_get_cipher_name(s) \ - SSL_CIPHER_get_name(SSL_get_current_cipher(s)) -#define SSL_get_time(a) SSL_SESSION_get_time(a) -#define SSL_set_time(a,b) SSL_SESSION_set_time((a),(b)) -#define SSL_get_timeout(a) SSL_SESSION_get_timeout(a) -#define SSL_set_timeout(a,b) SSL_SESSION_set_timeout((a),(b)) - -#if 1 /*SSLEAY_MACROS*/ -#define d2i_SSL_SESSION_bio(bp,s_id) ASN1_d2i_bio_of(SSL_SESSION,SSL_SESSION_new,d2i_SSL_SESSION,bp,s_id) -#define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio_of(SSL_SESSION,i2d_SSL_SESSION,bp,s_id) -#define PEM_read_SSL_SESSION(fp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read( \ - (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,fp,(char **)x,cb,u) -#define PEM_read_bio_SSL_SESSION(bp,x,cb,u) PEM_ASN1_read_bio_of(SSL_SESSION,d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,bp,x,cb,u) -#define PEM_write_SSL_SESSION(fp,x) \ - PEM_ASN1_write((int (*)())i2d_SSL_SESSION, \ - PEM_STRING_SSL_SESSION,fp, (char *)x, NULL,NULL,0,NULL,NULL) -#define PEM_write_bio_SSL_SESSION(bp,x) \ - PEM_ASN1_write_bio_of(SSL_SESSION,i2d_SSL_SESSION,PEM_STRING_SSL_SESSION,bp,x,NULL,NULL,0,NULL,NULL) -#endif - -#define SSL_AD_REASON_OFFSET 1000 -/* These alert types are for SSLv3 and TLSv1 */ -#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY -#define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE /* fatal */ -#define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC /* fatal */ -#define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED -#define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW -#define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE/* fatal */ -#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE/* fatal */ -#define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE /* Not for TLS */ -#define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE -#define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE -#define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED -#define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED -#define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN -#define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER /* fatal */ -#define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA /* fatal */ -#define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED /* fatal */ -#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR /* fatal */ -#define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR -#define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION/* fatal */ -#define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION /* fatal */ -#define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY/* fatal */ -#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR /* fatal */ -#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED -#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION -#define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION -#define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE -#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME -#define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE - -#define SSL_ERROR_NONE 0 -#define SSL_ERROR_SSL 1 -#define SSL_ERROR_WANT_READ 2 -#define SSL_ERROR_WANT_WRITE 3 -#define SSL_ERROR_WANT_X509_LOOKUP 4 -#define SSL_ERROR_SYSCALL 5 /* look at error stack/return value/errno */ -#define SSL_ERROR_ZERO_RETURN 6 -#define SSL_ERROR_WANT_CONNECT 7 -#define SSL_ERROR_WANT_ACCEPT 8 - -#define SSL_CTRL_NEED_TMP_RSA 1 -#define SSL_CTRL_SET_TMP_RSA 2 -#define SSL_CTRL_SET_TMP_DH 3 -#define SSL_CTRL_SET_TMP_ECDH 4 -#define SSL_CTRL_SET_TMP_RSA_CB 5 -#define SSL_CTRL_SET_TMP_DH_CB 6 -#define SSL_CTRL_SET_TMP_ECDH_CB 7 - -#define SSL_CTRL_GET_SESSION_REUSED 8 -#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9 -#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10 -#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11 -#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12 -#define SSL_CTRL_GET_FLAGS 13 -#define SSL_CTRL_EXTRA_CHAIN_CERT 14 - -#define SSL_CTRL_SET_MSG_CALLBACK 15 -#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16 - -/* only applies to datagram connections */ -#define SSL_CTRL_SET_MTU 17 -/* Stats */ -#define SSL_CTRL_SESS_NUMBER 20 -#define SSL_CTRL_SESS_CONNECT 21 -#define SSL_CTRL_SESS_CONNECT_GOOD 22 -#define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23 -#define SSL_CTRL_SESS_ACCEPT 24 -#define SSL_CTRL_SESS_ACCEPT_GOOD 25 -#define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26 -#define SSL_CTRL_SESS_HIT 27 -#define SSL_CTRL_SESS_CB_HIT 28 -#define SSL_CTRL_SESS_MISSES 29 -#define SSL_CTRL_SESS_TIMEOUTS 30 -#define SSL_CTRL_SESS_CACHE_FULL 31 -#define SSL_CTRL_OPTIONS 32 -#define SSL_CTRL_MODE 33 - -#define SSL_CTRL_GET_READ_AHEAD 40 -#define SSL_CTRL_SET_READ_AHEAD 41 -#define SSL_CTRL_SET_SESS_CACHE_SIZE 42 -#define SSL_CTRL_GET_SESS_CACHE_SIZE 43 -#define SSL_CTRL_SET_SESS_CACHE_MODE 44 -#define SSL_CTRL_GET_SESS_CACHE_MODE 45 - -#define SSL_CTRL_GET_MAX_CERT_LIST 50 -#define SSL_CTRL_SET_MAX_CERT_LIST 51 - -/* see tls1.h for macros based on these */ -#ifndef OPENSSL_NO_TLSEXT -#define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB 53 -#define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54 -#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55 -#define SSL_CTRL_SET_TLSEXT_DEBUG_CB 56 -#define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57 -#define SSL_CTRL_GET_TLSEXT_TICKET_KEYS 58 -#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59 - -#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB 63 -#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64 -#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65 -#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66 -#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67 -#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68 -#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69 -#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70 -#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71 - -#define SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB 72 -#endif - -#define SSL_session_reused(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_GET_SESSION_REUSED,0,NULL) -#define SSL_num_renegotiations(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_GET_NUM_RENEGOTIATIONS,0,NULL) -#define SSL_clear_num_renegotiations(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS,0,NULL) -#define SSL_total_renegotiations(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_GET_TOTAL_RENEGOTIATIONS,0,NULL) - -#define SSL_CTX_need_tmp_RSA(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL) -#define SSL_CTX_set_tmp_rsa(ctx,rsa) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa) -#define SSL_CTX_set_tmp_dh(ctx,dh) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh) -#define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) - -#define SSL_need_tmp_RSA(ssl) \ - SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL) -#define SSL_set_tmp_rsa(ssl,rsa) \ - SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa) -#define SSL_set_tmp_dh(ssl,dh) \ - SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh) -#define SSL_set_tmp_ecdh(ssl,ecdh) \ - SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) - -#define SSL_CTX_add_extra_chain_cert(ctx,x509) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509) - -#ifndef OPENSSL_NO_BIO -BIO_METHOD *BIO_f_ssl(void); -BIO *BIO_new_ssl(SSL_CTX *ctx,int client); -BIO *BIO_new_ssl_connect(SSL_CTX *ctx); -BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx); -int BIO_ssl_copy_session_id(BIO *to,BIO *from); -void BIO_ssl_shutdown(BIO *ssl_bio); - -#endif - -int SSL_CTX_set_cipher_list(SSL_CTX *,const char *str); -SSL_CTX *SSL_CTX_new(SSL_METHOD *meth); -void SSL_CTX_free(SSL_CTX *); -long SSL_CTX_set_timeout(SSL_CTX *ctx,long t); -long SSL_CTX_get_timeout(const SSL_CTX *ctx); -X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *); -void SSL_CTX_set_cert_store(SSL_CTX *,X509_STORE *); -int SSL_want(const SSL *s); -int SSL_clear(SSL *s); - -void SSL_CTX_flush_sessions(SSL_CTX *ctx,long tm); - -SSL_CIPHER *SSL_get_current_cipher(const SSL *s); -int SSL_CIPHER_get_bits(const SSL_CIPHER *c,int *alg_bits); -char * SSL_CIPHER_get_version(const SSL_CIPHER *c); -const char * SSL_CIPHER_get_name(const SSL_CIPHER *c); - -int SSL_get_fd(const SSL *s); -int SSL_get_rfd(const SSL *s); -int SSL_get_wfd(const SSL *s); -const char * SSL_get_cipher_list(const SSL *s,int n); -char * SSL_get_shared_ciphers(const SSL *s, char *buf, int len); -int SSL_get_read_ahead(const SSL * s); -int SSL_pending(const SSL *s); -#ifndef OPENSSL_NO_SOCK -int SSL_set_fd(SSL *s, int fd); -int SSL_set_rfd(SSL *s, int fd); -int SSL_set_wfd(SSL *s, int fd); -#endif -#ifndef OPENSSL_NO_BIO -void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); -BIO * SSL_get_rbio(const SSL *s); -BIO * SSL_get_wbio(const SSL *s); -#endif -int SSL_set_cipher_list(SSL *s, const char *str); -void SSL_set_read_ahead(SSL *s, int yes); -int SSL_get_verify_mode(const SSL *s); -int SSL_get_verify_depth(const SSL *s); -int (*SSL_get_verify_callback(const SSL *s))(int,X509_STORE_CTX *); -void SSL_set_verify(SSL *s, int mode, - int (*callback)(int ok,X509_STORE_CTX *ctx)); -void SSL_set_verify_depth(SSL *s, int depth); -#ifndef OPENSSL_NO_RSA -int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa); -#endif -int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len); -int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey); -int SSL_use_PrivateKey_ASN1(int pk,SSL *ssl, const unsigned char *d, long len); -int SSL_use_certificate(SSL *ssl, X509 *x); -int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len); - -#ifndef OPENSSL_NO_STDIO -int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type); -int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type); -int SSL_use_certificate_file(SSL *ssl, const char *file, int type); -int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type); -int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type); -int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type); -int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM type */ -STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); -int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, - const char *file); -#ifndef OPENSSL_SYS_VMS -#ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */ -int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, - const char *dir); -#endif -#endif - -#endif - -void SSL_load_error_strings(void ); -const char *SSL_state_string(const SSL *s); -const char *SSL_rstate_string(const SSL *s); -const char *SSL_state_string_long(const SSL *s); -const char *SSL_rstate_string_long(const SSL *s); -long SSL_SESSION_get_time(const SSL_SESSION *s); -long SSL_SESSION_set_time(SSL_SESSION *s, long t); -long SSL_SESSION_get_timeout(const SSL_SESSION *s); -long SSL_SESSION_set_timeout(SSL_SESSION *s, long t); -void SSL_copy_session_id(SSL *to,const SSL *from); - -SSL_SESSION *SSL_SESSION_new(void); -unsigned long SSL_SESSION_hash(const SSL_SESSION *a); -int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b); -const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len); -#ifndef OPENSSL_NO_FP_API -int SSL_SESSION_print_fp(FILE *fp,const SSL_SESSION *ses); -#endif -#ifndef OPENSSL_NO_BIO -int SSL_SESSION_print(BIO *fp,const SSL_SESSION *ses); -#endif -void SSL_SESSION_free(SSL_SESSION *ses); -int i2d_SSL_SESSION(SSL_SESSION *in,unsigned char **pp); -int SSL_set_session(SSL *to, SSL_SESSION *session); -int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c); -int SSL_CTX_remove_session(SSL_CTX *,SSL_SESSION *c); -int SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB); -int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB); -int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, - unsigned int id_len); -SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,const unsigned char **pp, - long length); - -#ifdef HEADER_X509_H -X509 * SSL_get_peer_certificate(const SSL *s); -#endif - -STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s); - -int SSL_CTX_get_verify_mode(const SSL_CTX *ctx); -int SSL_CTX_get_verify_depth(const SSL_CTX *ctx); -int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int,X509_STORE_CTX *); -void SSL_CTX_set_verify(SSL_CTX *ctx,int mode, - int (*callback)(int, X509_STORE_CTX *)); -void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth); -void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *,void *), void *arg); -#ifndef OPENSSL_NO_RSA -int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa); -#endif -int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len); -int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey); -int SSL_CTX_use_PrivateKey_ASN1(int pk,SSL_CTX *ctx, - const unsigned char *d, long len); -int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x); -int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d); - -void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb); -void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u); - -int SSL_CTX_check_private_key(const SSL_CTX *ctx); -int SSL_check_private_key(const SSL *ctx); - -int SSL_CTX_set_session_id_context(SSL_CTX *ctx,const unsigned char *sid_ctx, - unsigned int sid_ctx_len); - -SSL * SSL_new(SSL_CTX *ctx); -int SSL_set_session_id_context(SSL *ssl,const unsigned char *sid_ctx, - unsigned int sid_ctx_len); - -int SSL_CTX_set_purpose(SSL_CTX *s, int purpose); -int SSL_set_purpose(SSL *s, int purpose); -int SSL_CTX_set_trust(SSL_CTX *s, int trust); -int SSL_set_trust(SSL *s, int trust); - -void SSL_free(SSL *ssl); -int SSL_accept(SSL *ssl); -int SSL_connect(SSL *ssl); -int SSL_read(SSL *ssl,void *buf,int num); -int SSL_peek(SSL *ssl,void *buf,int num); -int SSL_write(SSL *ssl,const void *buf,int num); -long SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg); -long SSL_callback_ctrl(SSL *, int, void (*)(void)); -long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg); -long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void)); - -int SSL_get_error(const SSL *s,int ret_code); -const char *SSL_get_version(const SSL *s); - -/* This sets the 'default' SSL version that SSL_new() will create */ -int SSL_CTX_set_ssl_version(SSL_CTX *ctx,SSL_METHOD *meth); - -SSL_METHOD *SSLv2_method(void); /* SSLv2 */ -SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */ -SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */ - -SSL_METHOD *SSLv3_method(void); /* SSLv3 */ -SSL_METHOD *SSLv3_server_method(void); /* SSLv3 */ -SSL_METHOD *SSLv3_client_method(void); /* SSLv3 */ - -SSL_METHOD *SSLv23_method(void); /* SSLv3 but can rollback to v2 */ -SSL_METHOD *SSLv23_server_method(void); /* SSLv3 but can rollback to v2 */ -SSL_METHOD *SSLv23_client_method(void); /* SSLv3 but can rollback to v2 */ - -SSL_METHOD *TLSv1_method(void); /* TLSv1.0 */ -SSL_METHOD *TLSv1_server_method(void); /* TLSv1.0 */ -SSL_METHOD *TLSv1_client_method(void); /* TLSv1.0 */ - -SSL_METHOD *DTLSv1_method(void); /* DTLSv1.0 */ -SSL_METHOD *DTLSv1_server_method(void); /* DTLSv1.0 */ -SSL_METHOD *DTLSv1_client_method(void); /* DTLSv1.0 */ - -STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s); - -int SSL_do_handshake(SSL *s); -int SSL_renegotiate(SSL *s); -int SSL_renegotiate_pending(SSL *s); -int SSL_shutdown(SSL *s); - -SSL_METHOD *SSL_get_ssl_method(SSL *s); -int SSL_set_ssl_method(SSL *s,SSL_METHOD *method); -const char *SSL_alert_type_string_long(int value); -const char *SSL_alert_type_string(int value); -const char *SSL_alert_desc_string_long(int value); -const char *SSL_alert_desc_string(int value); - -void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list); -void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list); -STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s); -STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *s); -int SSL_add_client_CA(SSL *ssl,X509 *x); -int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x); - -void SSL_set_connect_state(SSL *s); -void SSL_set_accept_state(SSL *s); - -long SSL_get_default_timeout(const SSL *s); - -int SSL_library_init(void ); - -char *SSL_CIPHER_description(SSL_CIPHER *,char *buf,int size); -STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk); - -SSL *SSL_dup(SSL *ssl); - -X509 *SSL_get_certificate(const SSL *ssl); -/* EVP_PKEY */ struct evp_pkey_st *SSL_get_privatekey(SSL *ssl); - -void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode); -int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx); -void SSL_set_quiet_shutdown(SSL *ssl,int mode); -int SSL_get_quiet_shutdown(const SSL *ssl); -void SSL_set_shutdown(SSL *ssl,int mode); -int SSL_get_shutdown(const SSL *ssl); -int SSL_version(const SSL *ssl); -int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx); -int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, - const char *CApath); -#define SSL_get0_session SSL_get_session /* just peek at pointer */ -SSL_SESSION *SSL_get_session(const SSL *ssl); -SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */ -SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl); -SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx); -void SSL_set_info_callback(SSL *ssl, - void (*cb)(const SSL *ssl,int type,int val)); -void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl,int type,int val); -int SSL_state(const SSL *ssl); - -void SSL_set_verify_result(SSL *ssl,long v); -long SSL_get_verify_result(const SSL *ssl); - -int SSL_set_ex_data(SSL *ssl,int idx,void *data); -void *SSL_get_ex_data(const SSL *ssl,int idx); -int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); - -int SSL_SESSION_set_ex_data(SSL_SESSION *ss,int idx,void *data); -void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss,int idx); -int SSL_SESSION_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); - -int SSL_CTX_set_ex_data(SSL_CTX *ssl,int idx,void *data); -void *SSL_CTX_get_ex_data(const SSL_CTX *ssl,int idx); -int SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); - -int SSL_get_ex_data_X509_STORE_CTX_idx(void ); - -#define SSL_CTX_sess_set_cache_size(ctx,t) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL) -#define SSL_CTX_sess_get_cache_size(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL) -#define SSL_CTX_set_session_cache_mode(ctx,m) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL) -#define SSL_CTX_get_session_cache_mode(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL) - -#define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx) -#define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m) -#define SSL_CTX_get_read_ahead(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL) -#define SSL_CTX_set_read_ahead(ctx,m) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL) -#define SSL_CTX_get_max_cert_list(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL) -#define SSL_CTX_set_max_cert_list(ctx,m) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL) -#define SSL_get_max_cert_list(ssl) \ - SSL_ctrl(ssl,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL) -#define SSL_set_max_cert_list(ssl,m) \ - SSL_ctrl(ssl,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL) - - /* NB: the keylength is only applicable when is_export is true */ -#ifndef OPENSSL_NO_RSA -void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, - RSA *(*cb)(SSL *ssl,int is_export, - int keylength)); - -void SSL_set_tmp_rsa_callback(SSL *ssl, - RSA *(*cb)(SSL *ssl,int is_export, - int keylength)); -#endif -#ifndef OPENSSL_NO_DH -void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, - DH *(*dh)(SSL *ssl,int is_export, - int keylength)); -void SSL_set_tmp_dh_callback(SSL *ssl, - DH *(*dh)(SSL *ssl,int is_export, - int keylength)); -#endif -#ifndef OPENSSL_NO_ECDH -void SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx, - EC_KEY *(*ecdh)(SSL *ssl,int is_export, - int keylength)); -void SSL_set_tmp_ecdh_callback(SSL *ssl, - EC_KEY *(*ecdh)(SSL *ssl,int is_export, - int keylength)); -#endif - -#ifndef OPENSSL_NO_COMP -const COMP_METHOD *SSL_get_current_compression(SSL *s); -const COMP_METHOD *SSL_get_current_expansion(SSL *s); -const char *SSL_COMP_get_name(const COMP_METHOD *comp); -STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void); -int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); -#else -const void *SSL_get_current_compression(SSL *s); -const void *SSL_get_current_expansion(SSL *s); -const char *SSL_COMP_get_name(const void *comp); -void *SSL_COMP_get_compression_methods(void); -int SSL_COMP_add_compression_method(int id,void *cm); -#endif - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_SSL_strings(void); - -/* Error codes for the SSL functions. */ - -/* Function codes. */ -#define SSL_F_CLIENT_CERTIFICATE 100 -#define SSL_F_CLIENT_FINISHED 167 -#define SSL_F_CLIENT_HELLO 101 -#define SSL_F_CLIENT_MASTER_KEY 102 -#define SSL_F_D2I_SSL_SESSION 103 -#define SSL_F_DO_DTLS1_WRITE 245 -#define SSL_F_DO_SSL3_WRITE 104 -#define SSL_F_DTLS1_ACCEPT 246 -#define SSL_F_DTLS1_BUFFER_RECORD 247 -#define SSL_F_DTLS1_CLIENT_HELLO 248 -#define SSL_F_DTLS1_CONNECT 249 -#define SSL_F_DTLS1_ENC 250 -#define SSL_F_DTLS1_GET_HELLO_VERIFY 251 -#define SSL_F_DTLS1_GET_MESSAGE 252 -#define SSL_F_DTLS1_GET_MESSAGE_FRAGMENT 253 -#define SSL_F_DTLS1_GET_RECORD 254 -#define SSL_F_DTLS1_OUTPUT_CERT_CHAIN 255 -#define SSL_F_DTLS1_PREPROCESS_FRAGMENT 277 -#define SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE 256 -#define SSL_F_DTLS1_PROCESS_RECORD 257 -#define SSL_F_DTLS1_READ_BYTES 258 -#define SSL_F_DTLS1_READ_FAILED 259 -#define SSL_F_DTLS1_SEND_CERTIFICATE_REQUEST 260 -#define SSL_F_DTLS1_SEND_CLIENT_CERTIFICATE 261 -#define SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE 262 -#define SSL_F_DTLS1_SEND_CLIENT_VERIFY 263 -#define SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST 264 -#define SSL_F_DTLS1_SEND_SERVER_CERTIFICATE 265 -#define SSL_F_DTLS1_SEND_SERVER_HELLO 266 -#define SSL_F_DTLS1_SEND_SERVER_KEY_EXCHANGE 267 -#define SSL_F_DTLS1_WRITE_APP_DATA_BYTES 268 -#define SSL_F_GET_CLIENT_FINISHED 105 -#define SSL_F_GET_CLIENT_HELLO 106 -#define SSL_F_GET_CLIENT_MASTER_KEY 107 -#define SSL_F_GET_SERVER_FINISHED 108 -#define SSL_F_GET_SERVER_HELLO 109 -#define SSL_F_GET_SERVER_VERIFY 110 -#define SSL_F_I2D_SSL_SESSION 111 -#define SSL_F_READ_N 112 -#define SSL_F_REQUEST_CERTIFICATE 113 -#define SSL_F_SERVER_FINISH 239 -#define SSL_F_SERVER_HELLO 114 -#define SSL_F_SERVER_VERIFY 240 -#define SSL_F_SSL23_ACCEPT 115 -#define SSL_F_SSL23_CLIENT_HELLO 116 -#define SSL_F_SSL23_CONNECT 117 -#define SSL_F_SSL23_GET_CLIENT_HELLO 118 -#define SSL_F_SSL23_GET_SERVER_HELLO 119 -#define SSL_F_SSL23_PEEK 237 -#define SSL_F_SSL23_READ 120 -#define SSL_F_SSL23_WRITE 121 -#define SSL_F_SSL2_ACCEPT 122 -#define SSL_F_SSL2_CONNECT 123 -#define SSL_F_SSL2_ENC_INIT 124 -#define SSL_F_SSL2_GENERATE_KEY_MATERIAL 241 -#define SSL_F_SSL2_PEEK 234 -#define SSL_F_SSL2_READ 125 -#define SSL_F_SSL2_READ_INTERNAL 236 -#define SSL_F_SSL2_SET_CERTIFICATE 126 -#define SSL_F_SSL2_WRITE 127 -#define SSL_F_SSL3_ACCEPT 128 -#define SSL_F_SSL3_CALLBACK_CTRL 233 -#define SSL_F_SSL3_CHANGE_CIPHER_STATE 129 -#define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130 -#define SSL_F_SSL3_CLIENT_HELLO 131 -#define SSL_F_SSL3_CONNECT 132 -#define SSL_F_SSL3_CTRL 213 -#define SSL_F_SSL3_CTX_CTRL 133 -#define SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC 279 -#define SSL_F_SSL3_ENC 134 -#define SSL_F_SSL3_GENERATE_KEY_BLOCK 238 -#define SSL_F_SSL3_GET_CERTIFICATE_REQUEST 135 -#define SSL_F_SSL3_GET_CERT_STATUS 288 -#define SSL_F_SSL3_GET_CERT_VERIFY 136 -#define SSL_F_SSL3_GET_CLIENT_CERTIFICATE 137 -#define SSL_F_SSL3_GET_CLIENT_HELLO 138 -#define SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE 139 -#define SSL_F_SSL3_GET_FINISHED 140 -#define SSL_F_SSL3_GET_KEY_EXCHANGE 141 -#define SSL_F_SSL3_GET_MESSAGE 142 -#define SSL_F_SSL3_GET_NEW_SESSION_TICKET 283 -#define SSL_F_SSL3_GET_RECORD 143 -#define SSL_F_SSL3_GET_SERVER_CERTIFICATE 144 -#define SSL_F_SSL3_GET_SERVER_DONE 145 -#define SSL_F_SSL3_GET_SERVER_HELLO 146 -#define SSL_F_SSL3_NEW_SESSION_TICKET 284 -#define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147 -#define SSL_F_SSL3_PEEK 235 -#define SSL_F_SSL3_READ_BYTES 148 -#define SSL_F_SSL3_READ_N 149 -#define SSL_F_SSL3_SEND_CERTIFICATE_REQUEST 150 -#define SSL_F_SSL3_SEND_CLIENT_CERTIFICATE 151 -#define SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE 152 -#define SSL_F_SSL3_SEND_CLIENT_VERIFY 153 -#define SSL_F_SSL3_SEND_SERVER_CERTIFICATE 154 -#define SSL_F_SSL3_SEND_SERVER_HELLO 242 -#define SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE 155 -#define SSL_F_SSL3_SETUP_BUFFERS 156 -#define SSL_F_SSL3_SETUP_KEY_BLOCK 157 -#define SSL_F_SSL3_WRITE_BYTES 158 -#define SSL_F_SSL3_WRITE_PENDING 159 -#define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT 272 -#define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215 -#define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216 -#define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT 273 -#define SSL_F_SSL_BAD_METHOD 160 -#define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161 -#define SSL_F_SSL_CERT_DUP 221 -#define SSL_F_SSL_CERT_INST 222 -#define SSL_F_SSL_CERT_INSTANTIATE 214 -#define SSL_F_SSL_CERT_NEW 162 -#define SSL_F_SSL_CHECK_PRIVATE_KEY 163 -#define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT 274 -#define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230 -#define SSL_F_SSL_CIPHER_STRENGTH_SORT 231 -#define SSL_F_SSL_CLEAR 164 -#define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165 -#define SSL_F_SSL_CREATE_CIPHER_LIST 166 -#define SSL_F_SSL_CTRL 232 -#define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 168 -#define SSL_F_SSL_CTX_NEW 169 -#define SSL_F_SSL_CTX_SET_CIPHER_LIST 269 -#define SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE 278 -#define SSL_F_SSL_CTX_SET_PURPOSE 226 -#define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT 219 -#define SSL_F_SSL_CTX_SET_SSL_VERSION 170 -#define SSL_F_SSL_CTX_SET_TRUST 229 -#define SSL_F_SSL_CTX_USE_CERTIFICATE 171 -#define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1 172 -#define SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE 220 -#define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE 173 -#define SSL_F_SSL_CTX_USE_PRIVATEKEY 174 -#define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1 175 -#define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE 176 -#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY 177 -#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1 178 -#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE 179 -#define SSL_F_SSL_DO_HANDSHAKE 180 -#define SSL_F_SSL_GET_NEW_SESSION 181 -#define SSL_F_SSL_GET_PREV_SESSION 217 -#define SSL_F_SSL_GET_SERVER_SEND_CERT 182 -#define SSL_F_SSL_GET_SIGN_PKEY 183 -#define SSL_F_SSL_INIT_WBIO_BUFFER 184 -#define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185 -#define SSL_F_SSL_NEW 186 -#define SSL_F_SSL_PEEK 270 -#define SSL_F_SSL_PREPARE_CLIENTHELLO_TLSEXT 275 -#define SSL_F_SSL_PREPARE_SERVERHELLO_TLSEXT 276 -#define SSL_F_SSL_READ 223 -#define SSL_F_SSL_RSA_PRIVATE_DECRYPT 187 -#define SSL_F_SSL_RSA_PUBLIC_ENCRYPT 188 -#define SSL_F_SSL_SESSION_NEW 189 -#define SSL_F_SSL_SESSION_PRINT_FP 190 -#define SSL_F_SSL_SESS_CERT_NEW 225 -#define SSL_F_SSL_SET_CERT 191 -#define SSL_F_SSL_SET_CIPHER_LIST 271 -#define SSL_F_SSL_SET_FD 192 -#define SSL_F_SSL_SET_PKEY 193 -#define SSL_F_SSL_SET_PURPOSE 227 -#define SSL_F_SSL_SET_RFD 194 -#define SSL_F_SSL_SET_SESSION 195 -#define SSL_F_SSL_SET_SESSION_ID_CONTEXT 218 -#define SSL_F_SSL_SET_TRUST 228 -#define SSL_F_SSL_SET_WFD 196 -#define SSL_F_SSL_SHUTDOWN 224 -#define SSL_F_SSL_UNDEFINED_CONST_FUNCTION 243 -#define SSL_F_SSL_UNDEFINED_FUNCTION 197 -#define SSL_F_SSL_UNDEFINED_VOID_FUNCTION 244 -#define SSL_F_SSL_USE_CERTIFICATE 198 -#define SSL_F_SSL_USE_CERTIFICATE_ASN1 199 -#define SSL_F_SSL_USE_CERTIFICATE_FILE 200 -#define SSL_F_SSL_USE_PRIVATEKEY 201 -#define SSL_F_SSL_USE_PRIVATEKEY_ASN1 202 -#define SSL_F_SSL_USE_PRIVATEKEY_FILE 203 -#define SSL_F_SSL_USE_RSAPRIVATEKEY 204 -#define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1 205 -#define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE 206 -#define SSL_F_SSL_VERIFY_CERT_CHAIN 207 -#define SSL_F_SSL_WRITE 208 -#define SSL_F_TLS1_CHANGE_CIPHER_STATE 209 -#define SSL_F_TLS1_ENC 210 -#define SSL_F_TLS1_SETUP_KEY_BLOCK 211 -#define SSL_F_WRITE_PENDING 212 - -/* Reason codes. */ -#define SSL_R_APP_DATA_IN_HANDSHAKE 100 -#define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272 -#define SSL_R_BAD_ALERT_RECORD 101 -#define SSL_R_BAD_AUTHENTICATION_TYPE 102 -#define SSL_R_BAD_CHANGE_CIPHER_SPEC 103 -#define SSL_R_BAD_CHECKSUM 104 -#define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106 -#define SSL_R_BAD_DECOMPRESSION 107 -#define SSL_R_BAD_DH_G_LENGTH 108 -#define SSL_R_BAD_DH_PUB_KEY_LENGTH 109 -#define SSL_R_BAD_DH_P_LENGTH 110 -#define SSL_R_BAD_DIGEST_LENGTH 111 -#define SSL_R_BAD_DSA_SIGNATURE 112 -#define SSL_R_BAD_ECC_CERT 304 -#define SSL_R_BAD_ECDSA_SIGNATURE 305 -#define SSL_R_BAD_ECPOINT 306 -#define SSL_R_BAD_HELLO_REQUEST 105 -#define SSL_R_BAD_LENGTH 271 -#define SSL_R_BAD_MAC_DECODE 113 -#define SSL_R_BAD_MESSAGE_TYPE 114 -#define SSL_R_BAD_PACKET_LENGTH 115 -#define SSL_R_BAD_PROTOCOL_VERSION_NUMBER 116 -#define SSL_R_BAD_RESPONSE_ARGUMENT 117 -#define SSL_R_BAD_RSA_DECRYPT 118 -#define SSL_R_BAD_RSA_ENCRYPT 119 -#define SSL_R_BAD_RSA_E_LENGTH 120 -#define SSL_R_BAD_RSA_MODULUS_LENGTH 121 -#define SSL_R_BAD_RSA_SIGNATURE 122 -#define SSL_R_BAD_SIGNATURE 123 -#define SSL_R_BAD_SSL_FILETYPE 124 -#define SSL_R_BAD_SSL_SESSION_ID_LENGTH 125 -#define SSL_R_BAD_STATE 126 -#define SSL_R_BAD_WRITE_RETRY 127 -#define SSL_R_BIO_NOT_SET 128 -#define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG 129 -#define SSL_R_BN_LIB 130 -#define SSL_R_CA_DN_LENGTH_MISMATCH 131 -#define SSL_R_CA_DN_TOO_LONG 132 -#define SSL_R_CCS_RECEIVED_EARLY 133 -#define SSL_R_CERTIFICATE_VERIFY_FAILED 134 -#define SSL_R_CERT_LENGTH_MISMATCH 135 -#define SSL_R_CHALLENGE_IS_DIFFERENT 136 -#define SSL_R_CIPHER_CODE_WRONG_LENGTH 137 -#define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138 -#define SSL_R_CIPHER_TABLE_SRC_ERROR 139 -#define SSL_R_CLIENTHELLO_TLSEXT 157 -#define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140 -#define SSL_R_COMPRESSION_FAILURE 141 -#define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE 307 -#define SSL_R_COMPRESSION_LIBRARY_ERROR 142 -#define SSL_R_CONNECTION_ID_IS_DIFFERENT 143 -#define SSL_R_CONNECTION_TYPE_NOT_SET 144 -#define SSL_R_COOKIE_MISMATCH 308 -#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145 -#define SSL_R_DATA_LENGTH_TOO_LONG 146 -#define SSL_R_DECRYPTION_FAILED 147 -#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 281 -#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148 -#define SSL_R_DIGEST_CHECK_FAILED 149 -#define SSL_R_DUPLICATE_COMPRESSION_ID 309 -#define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER 310 -#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150 -#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY 282 -#define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151 -#define SSL_R_EXCESSIVE_MESSAGE_SIZE 152 -#define SSL_R_EXTRA_DATA_IN_MESSAGE 153 -#define SSL_R_GOT_A_FIN_BEFORE_A_CCS 154 -#define SSL_R_HTTPS_PROXY_REQUEST 155 -#define SSL_R_HTTP_REQUEST 156 -#define SSL_R_ILLEGAL_PADDING 283 -#define SSL_R_INVALID_CHALLENGE_LENGTH 158 -#define SSL_R_INVALID_COMMAND 280 -#define SSL_R_INVALID_PURPOSE 278 -#define SSL_R_INVALID_STATUS_RESPONSE 316 -#define SSL_R_INVALID_TICKET_KEYS_LENGTH 275 -#define SSL_R_INVALID_TRUST 279 -#define SSL_R_KEY_ARG_TOO_LONG 284 -#define SSL_R_KRB5 285 -#define SSL_R_KRB5_C_CC_PRINC 286 -#define SSL_R_KRB5_C_GET_CRED 287 -#define SSL_R_KRB5_C_INIT 288 -#define SSL_R_KRB5_C_MK_REQ 289 -#define SSL_R_KRB5_S_BAD_TICKET 290 -#define SSL_R_KRB5_S_INIT 291 -#define SSL_R_KRB5_S_RD_REQ 292 -#define SSL_R_KRB5_S_TKT_EXPIRED 293 -#define SSL_R_KRB5_S_TKT_NYV 294 -#define SSL_R_KRB5_S_TKT_SKEW 295 -#define SSL_R_LENGTH_MISMATCH 159 -#define SSL_R_LENGTH_TOO_SHORT 160 -#define SSL_R_LIBRARY_BUG 274 -#define SSL_R_LIBRARY_HAS_NO_CIPHERS 161 -#define SSL_R_MESSAGE_TOO_LONG 296 -#define SSL_R_MISSING_DH_DSA_CERT 162 -#define SSL_R_MISSING_DH_KEY 163 -#define SSL_R_MISSING_DH_RSA_CERT 164 -#define SSL_R_MISSING_DSA_SIGNING_CERT 165 -#define SSL_R_MISSING_EXPORT_TMP_DH_KEY 166 -#define SSL_R_MISSING_EXPORT_TMP_RSA_KEY 167 -#define SSL_R_MISSING_RSA_CERTIFICATE 168 -#define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169 -#define SSL_R_MISSING_RSA_SIGNING_CERT 170 -#define SSL_R_MISSING_TMP_DH_KEY 171 -#define SSL_R_MISSING_TMP_ECDH_KEY 311 -#define SSL_R_MISSING_TMP_RSA_KEY 172 -#define SSL_R_MISSING_TMP_RSA_PKEY 173 -#define SSL_R_MISSING_VERIFY_MESSAGE 174 -#define SSL_R_NON_SSLV2_INITIAL_PACKET 175 -#define SSL_R_NO_CERTIFICATES_RETURNED 176 -#define SSL_R_NO_CERTIFICATE_ASSIGNED 177 -#define SSL_R_NO_CERTIFICATE_RETURNED 178 -#define SSL_R_NO_CERTIFICATE_SET 179 -#define SSL_R_NO_CERTIFICATE_SPECIFIED 180 -#define SSL_R_NO_CIPHERS_AVAILABLE 181 -#define SSL_R_NO_CIPHERS_PASSED 182 -#define SSL_R_NO_CIPHERS_SPECIFIED 183 -#define SSL_R_NO_CIPHER_LIST 184 -#define SSL_R_NO_CIPHER_MATCH 185 -#define SSL_R_NO_CLIENT_CERT_METHOD 317 -#define SSL_R_NO_CLIENT_CERT_RECEIVED 186 -#define SSL_R_NO_COMPRESSION_SPECIFIED 187 -#define SSL_R_NO_METHOD_SPECIFIED 188 -#define SSL_R_NO_PRIVATEKEY 189 -#define SSL_R_NO_PRIVATE_KEY_ASSIGNED 190 -#define SSL_R_NO_PROTOCOLS_AVAILABLE 191 -#define SSL_R_NO_PUBLICKEY 192 -#define SSL_R_NO_SHARED_CIPHER 193 -#define SSL_R_NO_VERIFY_CALLBACK 194 -#define SSL_R_NULL_SSL_CTX 195 -#define SSL_R_NULL_SSL_METHOD_PASSED 196 -#define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197 -#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE 297 -#define SSL_R_PACKET_LENGTH_TOO_LONG 198 -#define SSL_R_PARSE_TLSEXT 223 -#define SSL_R_PATH_TOO_LONG 270 -#define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199 -#define SSL_R_PEER_ERROR 200 -#define SSL_R_PEER_ERROR_CERTIFICATE 201 -#define SSL_R_PEER_ERROR_NO_CERTIFICATE 202 -#define SSL_R_PEER_ERROR_NO_CIPHER 203 -#define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 204 -#define SSL_R_PRE_MAC_LENGTH_TOO_LONG 205 -#define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS 206 -#define SSL_R_PROTOCOL_IS_SHUTDOWN 207 -#define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR 208 -#define SSL_R_PUBLIC_KEY_IS_NOT_RSA 209 -#define SSL_R_PUBLIC_KEY_NOT_RSA 210 -#define SSL_R_READ_BIO_NOT_SET 211 -#define SSL_R_READ_TIMEOUT_EXPIRED 312 -#define SSL_R_READ_WRONG_PACKET_TYPE 212 -#define SSL_R_RECORD_LENGTH_MISMATCH 213 -#define SSL_R_RECORD_TOO_LARGE 214 -#define SSL_R_RECORD_TOO_SMALL 298 -#define SSL_R_REQUIRED_CIPHER_MISSING 215 -#define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 -#define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 -#define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO 218 -#define SSL_R_SERVERHELLO_TLSEXT 224 -#define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277 -#define SSL_R_SHORT_READ 219 -#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 -#define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221 -#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG 299 -#define SSL_R_SSL3_EXT_INVALID_SERVERNAME 225 -#define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE 226 -#define SSL_R_SSL3_SESSION_ID_TOO_LONG 300 -#define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222 -#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 -#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 -#define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 -#define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 -#define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 -#define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 -#define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 -#define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 -#define SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 -#define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 -#define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043 -#define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION 228 -#define SSL_R_SSL_HANDSHAKE_FAILURE 229 -#define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS 230 -#define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED 301 -#define SSL_R_SSL_SESSION_ID_CONFLICT 302 -#define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG 273 -#define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH 303 -#define SSL_R_SSL_SESSION_ID_IS_DIFFERENT 231 -#define SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049 -#define SSL_R_TLSV1_ALERT_DECODE_ERROR 1050 -#define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021 -#define SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051 -#define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060 -#define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071 -#define SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 -#define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 -#define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070 -#define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022 -#define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048 -#define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090 -#define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER 232 -#define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST 227 -#define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233 -#define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG 234 -#define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER 235 -#define SSL_R_UNABLE_TO_DECODE_DH_CERTS 236 -#define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS 313 -#define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY 237 -#define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS 238 -#define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS 314 -#define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239 -#define SSL_R_UNABLE_TO_FIND_SSL_METHOD 240 -#define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES 241 -#define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES 242 -#define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243 -#define SSL_R_UNEXPECTED_MESSAGE 244 -#define SSL_R_UNEXPECTED_RECORD 245 -#define SSL_R_UNINITIALIZED 276 -#define SSL_R_UNKNOWN_ALERT_TYPE 246 -#define SSL_R_UNKNOWN_CERTIFICATE_TYPE 247 -#define SSL_R_UNKNOWN_CIPHER_RETURNED 248 -#define SSL_R_UNKNOWN_CIPHER_TYPE 249 -#define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE 250 -#define SSL_R_UNKNOWN_PKEY_TYPE 251 -#define SSL_R_UNKNOWN_PROTOCOL 252 -#define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE 253 -#define SSL_R_UNKNOWN_SSL_VERSION 254 -#define SSL_R_UNKNOWN_STATE 255 -#define SSL_R_UNSUPPORTED_CIPHER 256 -#define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257 -#define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE 315 -#define SSL_R_UNSUPPORTED_PROTOCOL 258 -#define SSL_R_UNSUPPORTED_SSL_VERSION 259 -#define SSL_R_UNSUPPORTED_STATUS_TYPE 329 -#define SSL_R_WRITE_BIO_NOT_SET 260 -#define SSL_R_WRONG_CIPHER_RETURNED 261 -#define SSL_R_WRONG_MESSAGE_TYPE 262 -#define SSL_R_WRONG_NUMBER_OF_KEY_BITS 263 -#define SSL_R_WRONG_SIGNATURE_LENGTH 264 -#define SSL_R_WRONG_SIGNATURE_SIZE 265 -#define SSL_R_WRONG_SSL_VERSION 266 -#define SSL_R_WRONG_VERSION_NUMBER 267 -#define SSL_R_X509_LIB 268 -#define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/ssl2.h b/externals/openssl/ssl2.h deleted file mode 100644 index 52c166e8c5..0000000000 --- a/externals/openssl/ssl2.h +++ /dev/null @@ -1,269 +0,0 @@ -/* ssl/ssl2.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_SSL2_H -#define HEADER_SSL2_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Protocol Version Codes */ -#define SSL2_VERSION 0x0002 -#define SSL2_VERSION_MAJOR 0x00 -#define SSL2_VERSION_MINOR 0x02 -/* #define SSL2_CLIENT_VERSION 0x0002 */ -/* #define SSL2_SERVER_VERSION 0x0002 */ - -/* Protocol Message Codes */ -#define SSL2_MT_ERROR 0 -#define SSL2_MT_CLIENT_HELLO 1 -#define SSL2_MT_CLIENT_MASTER_KEY 2 -#define SSL2_MT_CLIENT_FINISHED 3 -#define SSL2_MT_SERVER_HELLO 4 -#define SSL2_MT_SERVER_VERIFY 5 -#define SSL2_MT_SERVER_FINISHED 6 -#define SSL2_MT_REQUEST_CERTIFICATE 7 -#define SSL2_MT_CLIENT_CERTIFICATE 8 - -/* Error Message Codes */ -#define SSL2_PE_UNDEFINED_ERROR 0x0000 -#define SSL2_PE_NO_CIPHER 0x0001 -#define SSL2_PE_NO_CERTIFICATE 0x0002 -#define SSL2_PE_BAD_CERTIFICATE 0x0004 -#define SSL2_PE_UNSUPPORTED_CERTIFICATE_TYPE 0x0006 - -/* Cipher Kind Values */ -#define SSL2_CK_NULL_WITH_MD5 0x02000000 /* v3 */ -#define SSL2_CK_RC4_128_WITH_MD5 0x02010080 -#define SSL2_CK_RC4_128_EXPORT40_WITH_MD5 0x02020080 -#define SSL2_CK_RC2_128_CBC_WITH_MD5 0x02030080 -#define SSL2_CK_RC2_128_CBC_EXPORT40_WITH_MD5 0x02040080 -#define SSL2_CK_IDEA_128_CBC_WITH_MD5 0x02050080 -#define SSL2_CK_DES_64_CBC_WITH_MD5 0x02060040 -#define SSL2_CK_DES_64_CBC_WITH_SHA 0x02060140 /* v3 */ -#define SSL2_CK_DES_192_EDE3_CBC_WITH_MD5 0x020700c0 -#define SSL2_CK_DES_192_EDE3_CBC_WITH_SHA 0x020701c0 /* v3 */ -#define SSL2_CK_RC4_64_WITH_MD5 0x02080080 /* MS hack */ - -#define SSL2_CK_DES_64_CFB64_WITH_MD5_1 0x02ff0800 /* SSLeay */ -#define SSL2_CK_NULL 0x02ff0810 /* SSLeay */ - -#define SSL2_TXT_DES_64_CFB64_WITH_MD5_1 "DES-CFB-M1" -#define SSL2_TXT_NULL_WITH_MD5 "NULL-MD5" -#define SSL2_TXT_RC4_128_WITH_MD5 "RC4-MD5" -#define SSL2_TXT_RC4_128_EXPORT40_WITH_MD5 "EXP-RC4-MD5" -#define SSL2_TXT_RC2_128_CBC_WITH_MD5 "RC2-CBC-MD5" -#define SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 "EXP-RC2-CBC-MD5" -#define SSL2_TXT_IDEA_128_CBC_WITH_MD5 "IDEA-CBC-MD5" -#define SSL2_TXT_DES_64_CBC_WITH_MD5 "DES-CBC-MD5" -#define SSL2_TXT_DES_64_CBC_WITH_SHA "DES-CBC-SHA" -#define SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5 "DES-CBC3-MD5" -#define SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA "DES-CBC3-SHA" -#define SSL2_TXT_RC4_64_WITH_MD5 "RC4-64-MD5" - -#define SSL2_TXT_NULL "NULL" - -/* Flags for the SSL_CIPHER.algorithm2 field */ -#define SSL2_CF_5_BYTE_ENC 0x01 -#define SSL2_CF_8_BYTE_ENC 0x02 - -/* Certificate Type Codes */ -#define SSL2_CT_X509_CERTIFICATE 0x01 - -/* Authentication Type Code */ -#define SSL2_AT_MD5_WITH_RSA_ENCRYPTION 0x01 - -#define SSL2_MAX_SSL_SESSION_ID_LENGTH 32 - -/* Upper/Lower Bounds */ -#define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 -#ifdef OPENSSL_SYS_MPE -#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 29998u -#else -#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 32767u /* 2^15-1 */ -#endif -#define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /* 2^14-1 */ - -#define SSL2_CHALLENGE_LENGTH 16 -/*#define SSL2_CHALLENGE_LENGTH 32 */ -#define SSL2_MIN_CHALLENGE_LENGTH 16 -#define SSL2_MAX_CHALLENGE_LENGTH 32 -#define SSL2_CONNECTION_ID_LENGTH 16 -#define SSL2_MAX_CONNECTION_ID_LENGTH 16 -#define SSL2_SSL_SESSION_ID_LENGTH 16 -#define SSL2_MAX_CERT_CHALLENGE_LENGTH 32 -#define SSL2_MIN_CERT_CHALLENGE_LENGTH 16 -#define SSL2_MAX_KEY_MATERIAL_LENGTH 24 - -#ifndef HEADER_SSL_LOCL_H -#define CERT char -#endif - -typedef struct ssl2_state_st - { - int three_byte_header; - int clear_text; /* clear text */ - int escape; /* not used in SSLv2 */ - int ssl2_rollback; /* used if SSLv23 rolled back to SSLv2 */ - - /* non-blocking io info, used to make sure the same - * args were passwd */ - unsigned int wnum; /* number of bytes sent so far */ - int wpend_tot; - const unsigned char *wpend_buf; - - int wpend_off; /* offset to data to write */ - int wpend_len; /* number of bytes passwd to write */ - int wpend_ret; /* number of bytes to return to caller */ - - /* buffer raw data */ - int rbuf_left; - int rbuf_offs; - unsigned char *rbuf; - unsigned char *wbuf; - - unsigned char *write_ptr;/* used to point to the start due to - * 2/3 byte header. */ - - unsigned int padding; - unsigned int rlength; /* passed to ssl2_enc */ - int ract_data_length; /* Set when things are encrypted. */ - unsigned int wlength; /* passed to ssl2_enc */ - int wact_data_length; /* Set when things are decrypted. */ - unsigned char *ract_data; - unsigned char *wact_data; - unsigned char *mac_data; - - unsigned char *read_key; - unsigned char *write_key; - - /* Stuff specifically to do with this SSL session */ - unsigned int challenge_length; - unsigned char challenge[SSL2_MAX_CHALLENGE_LENGTH]; - unsigned int conn_id_length; - unsigned char conn_id[SSL2_MAX_CONNECTION_ID_LENGTH]; - unsigned int key_material_length; - unsigned char key_material[SSL2_MAX_KEY_MATERIAL_LENGTH*2]; - - unsigned long read_sequence; - unsigned long write_sequence; - - struct { - unsigned int conn_id_length; - unsigned int cert_type; - unsigned int cert_length; - unsigned int csl; - unsigned int clear; - unsigned int enc; - unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH]; - unsigned int cipher_spec_length; - unsigned int session_id_length; - unsigned int clen; - unsigned int rlen; - } tmp; - } SSL2_STATE; - -/* SSLv2 */ -/* client */ -#define SSL2_ST_SEND_CLIENT_HELLO_A (0x10|SSL_ST_CONNECT) -#define SSL2_ST_SEND_CLIENT_HELLO_B (0x11|SSL_ST_CONNECT) -#define SSL2_ST_GET_SERVER_HELLO_A (0x20|SSL_ST_CONNECT) -#define SSL2_ST_GET_SERVER_HELLO_B (0x21|SSL_ST_CONNECT) -#define SSL2_ST_SEND_CLIENT_MASTER_KEY_A (0x30|SSL_ST_CONNECT) -#define SSL2_ST_SEND_CLIENT_MASTER_KEY_B (0x31|SSL_ST_CONNECT) -#define SSL2_ST_SEND_CLIENT_FINISHED_A (0x40|SSL_ST_CONNECT) -#define SSL2_ST_SEND_CLIENT_FINISHED_B (0x41|SSL_ST_CONNECT) -#define SSL2_ST_SEND_CLIENT_CERTIFICATE_A (0x50|SSL_ST_CONNECT) -#define SSL2_ST_SEND_CLIENT_CERTIFICATE_B (0x51|SSL_ST_CONNECT) -#define SSL2_ST_SEND_CLIENT_CERTIFICATE_C (0x52|SSL_ST_CONNECT) -#define SSL2_ST_SEND_CLIENT_CERTIFICATE_D (0x53|SSL_ST_CONNECT) -#define SSL2_ST_GET_SERVER_VERIFY_A (0x60|SSL_ST_CONNECT) -#define SSL2_ST_GET_SERVER_VERIFY_B (0x61|SSL_ST_CONNECT) -#define SSL2_ST_GET_SERVER_FINISHED_A (0x70|SSL_ST_CONNECT) -#define SSL2_ST_GET_SERVER_FINISHED_B (0x71|SSL_ST_CONNECT) -#define SSL2_ST_CLIENT_START_ENCRYPTION (0x80|SSL_ST_CONNECT) -#define SSL2_ST_X509_GET_CLIENT_CERTIFICATE (0x90|SSL_ST_CONNECT) -/* server */ -#define SSL2_ST_GET_CLIENT_HELLO_A (0x10|SSL_ST_ACCEPT) -#define SSL2_ST_GET_CLIENT_HELLO_B (0x11|SSL_ST_ACCEPT) -#define SSL2_ST_GET_CLIENT_HELLO_C (0x12|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_SERVER_HELLO_A (0x20|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_SERVER_HELLO_B (0x21|SSL_ST_ACCEPT) -#define SSL2_ST_GET_CLIENT_MASTER_KEY_A (0x30|SSL_ST_ACCEPT) -#define SSL2_ST_GET_CLIENT_MASTER_KEY_B (0x31|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_SERVER_VERIFY_A (0x40|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_SERVER_VERIFY_B (0x41|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_SERVER_VERIFY_C (0x42|SSL_ST_ACCEPT) -#define SSL2_ST_GET_CLIENT_FINISHED_A (0x50|SSL_ST_ACCEPT) -#define SSL2_ST_GET_CLIENT_FINISHED_B (0x51|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_SERVER_FINISHED_A (0x60|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_SERVER_FINISHED_B (0x61|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_REQUEST_CERTIFICATE_A (0x70|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_REQUEST_CERTIFICATE_B (0x71|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_REQUEST_CERTIFICATE_C (0x72|SSL_ST_ACCEPT) -#define SSL2_ST_SEND_REQUEST_CERTIFICATE_D (0x73|SSL_ST_ACCEPT) -#define SSL2_ST_SERVER_START_ENCRYPTION (0x80|SSL_ST_ACCEPT) -#define SSL2_ST_X509_GET_SERVER_CERTIFICATE (0x90|SSL_ST_ACCEPT) - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/externals/openssl/ssl23.h b/externals/openssl/ssl23.h deleted file mode 100644 index 67bd8e9e95..0000000000 --- a/externals/openssl/ssl23.h +++ /dev/null @@ -1,84 +0,0 @@ -/* ssl/ssl23.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_SSL23_H -#define HEADER_SSL23_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*client */ -/* write to server */ -#define SSL23_ST_CW_CLNT_HELLO_A (0x210|SSL_ST_CONNECT) -#define SSL23_ST_CW_CLNT_HELLO_B (0x211|SSL_ST_CONNECT) -/* read from server */ -#define SSL23_ST_CR_SRVR_HELLO_A (0x220|SSL_ST_CONNECT) -#define SSL23_ST_CR_SRVR_HELLO_B (0x221|SSL_ST_CONNECT) - -/* server */ -/* read from client */ -#define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT) -#define SSL23_ST_SR_CLNT_HELLO_B (0x211|SSL_ST_ACCEPT) - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/externals/openssl/ssl3.h b/externals/openssl/ssl3.h deleted file mode 100644 index 4b1e2e9834..0000000000 --- a/externals/openssl/ssl3.h +++ /dev/null @@ -1,565 +0,0 @@ -/* ssl/ssl3.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECC cipher suite support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ - -#ifndef HEADER_SSL3_H -#define HEADER_SSL3_H - -#ifndef OPENSSL_NO_COMP -#include -#endif -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define SSL3_CK_RSA_NULL_MD5 0x03000001 -#define SSL3_CK_RSA_NULL_SHA 0x03000002 -#define SSL3_CK_RSA_RC4_40_MD5 0x03000003 -#define SSL3_CK_RSA_RC4_128_MD5 0x03000004 -#define SSL3_CK_RSA_RC4_128_SHA 0x03000005 -#define SSL3_CK_RSA_RC2_40_MD5 0x03000006 -#define SSL3_CK_RSA_IDEA_128_SHA 0x03000007 -#define SSL3_CK_RSA_DES_40_CBC_SHA 0x03000008 -#define SSL3_CK_RSA_DES_64_CBC_SHA 0x03000009 -#define SSL3_CK_RSA_DES_192_CBC3_SHA 0x0300000A - -#define SSL3_CK_DH_DSS_DES_40_CBC_SHA 0x0300000B -#define SSL3_CK_DH_DSS_DES_64_CBC_SHA 0x0300000C -#define SSL3_CK_DH_DSS_DES_192_CBC3_SHA 0x0300000D -#define SSL3_CK_DH_RSA_DES_40_CBC_SHA 0x0300000E -#define SSL3_CK_DH_RSA_DES_64_CBC_SHA 0x0300000F -#define SSL3_CK_DH_RSA_DES_192_CBC3_SHA 0x03000010 - -#define SSL3_CK_EDH_DSS_DES_40_CBC_SHA 0x03000011 -#define SSL3_CK_EDH_DSS_DES_64_CBC_SHA 0x03000012 -#define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA 0x03000013 -#define SSL3_CK_EDH_RSA_DES_40_CBC_SHA 0x03000014 -#define SSL3_CK_EDH_RSA_DES_64_CBC_SHA 0x03000015 -#define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA 0x03000016 - -#define SSL3_CK_ADH_RC4_40_MD5 0x03000017 -#define SSL3_CK_ADH_RC4_128_MD5 0x03000018 -#define SSL3_CK_ADH_DES_40_CBC_SHA 0x03000019 -#define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A -#define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B - -#define SSL3_CK_FZA_DMS_NULL_SHA 0x0300001C -#define SSL3_CK_FZA_DMS_FZA_SHA 0x0300001D -#if 0 /* Because it clashes with KRB5, is never used any more, and is safe - to remove according to David Hopwood - of the ietf-tls list */ -#define SSL3_CK_FZA_DMS_RC4_SHA 0x0300001E -#endif - -/* VRS Additional Kerberos5 entries - */ -#define SSL3_CK_KRB5_DES_64_CBC_SHA 0x0300001E -#define SSL3_CK_KRB5_DES_192_CBC3_SHA 0x0300001F -#define SSL3_CK_KRB5_RC4_128_SHA 0x03000020 -#define SSL3_CK_KRB5_IDEA_128_CBC_SHA 0x03000021 -#define SSL3_CK_KRB5_DES_64_CBC_MD5 0x03000022 -#define SSL3_CK_KRB5_DES_192_CBC3_MD5 0x03000023 -#define SSL3_CK_KRB5_RC4_128_MD5 0x03000024 -#define SSL3_CK_KRB5_IDEA_128_CBC_MD5 0x03000025 - -#define SSL3_CK_KRB5_DES_40_CBC_SHA 0x03000026 -#define SSL3_CK_KRB5_RC2_40_CBC_SHA 0x03000027 -#define SSL3_CK_KRB5_RC4_40_SHA 0x03000028 -#define SSL3_CK_KRB5_DES_40_CBC_MD5 0x03000029 -#define SSL3_CK_KRB5_RC2_40_CBC_MD5 0x0300002A -#define SSL3_CK_KRB5_RC4_40_MD5 0x0300002B - -#define SSL3_TXT_RSA_NULL_MD5 "NULL-MD5" -#define SSL3_TXT_RSA_NULL_SHA "NULL-SHA" -#define SSL3_TXT_RSA_RC4_40_MD5 "EXP-RC4-MD5" -#define SSL3_TXT_RSA_RC4_128_MD5 "RC4-MD5" -#define SSL3_TXT_RSA_RC4_128_SHA "RC4-SHA" -#define SSL3_TXT_RSA_RC2_40_MD5 "EXP-RC2-CBC-MD5" -#define SSL3_TXT_RSA_IDEA_128_SHA "IDEA-CBC-SHA" -#define SSL3_TXT_RSA_DES_40_CBC_SHA "EXP-DES-CBC-SHA" -#define SSL3_TXT_RSA_DES_64_CBC_SHA "DES-CBC-SHA" -#define SSL3_TXT_RSA_DES_192_CBC3_SHA "DES-CBC3-SHA" - -#define SSL3_TXT_DH_DSS_DES_40_CBC_SHA "EXP-DH-DSS-DES-CBC-SHA" -#define SSL3_TXT_DH_DSS_DES_64_CBC_SHA "DH-DSS-DES-CBC-SHA" -#define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA "DH-DSS-DES-CBC3-SHA" -#define SSL3_TXT_DH_RSA_DES_40_CBC_SHA "EXP-DH-RSA-DES-CBC-SHA" -#define SSL3_TXT_DH_RSA_DES_64_CBC_SHA "DH-RSA-DES-CBC-SHA" -#define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA "DH-RSA-DES-CBC3-SHA" - -#define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA "EXP-EDH-DSS-DES-CBC-SHA" -#define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA "EDH-DSS-DES-CBC-SHA" -#define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA "EDH-DSS-DES-CBC3-SHA" -#define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA "EXP-EDH-RSA-DES-CBC-SHA" -#define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA "EDH-RSA-DES-CBC-SHA" -#define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA "EDH-RSA-DES-CBC3-SHA" - -#define SSL3_TXT_ADH_RC4_40_MD5 "EXP-ADH-RC4-MD5" -#define SSL3_TXT_ADH_RC4_128_MD5 "ADH-RC4-MD5" -#define SSL3_TXT_ADH_DES_40_CBC_SHA "EXP-ADH-DES-CBC-SHA" -#define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA" -#define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA" - -#define SSL3_TXT_FZA_DMS_NULL_SHA "FZA-NULL-SHA" -#define SSL3_TXT_FZA_DMS_FZA_SHA "FZA-FZA-CBC-SHA" -#define SSL3_TXT_FZA_DMS_RC4_SHA "FZA-RC4-SHA" - -#define SSL3_TXT_KRB5_DES_64_CBC_SHA "KRB5-DES-CBC-SHA" -#define SSL3_TXT_KRB5_DES_192_CBC3_SHA "KRB5-DES-CBC3-SHA" -#define SSL3_TXT_KRB5_RC4_128_SHA "KRB5-RC4-SHA" -#define SSL3_TXT_KRB5_IDEA_128_CBC_SHA "KRB5-IDEA-CBC-SHA" -#define SSL3_TXT_KRB5_DES_64_CBC_MD5 "KRB5-DES-CBC-MD5" -#define SSL3_TXT_KRB5_DES_192_CBC3_MD5 "KRB5-DES-CBC3-MD5" -#define SSL3_TXT_KRB5_RC4_128_MD5 "KRB5-RC4-MD5" -#define SSL3_TXT_KRB5_IDEA_128_CBC_MD5 "KRB5-IDEA-CBC-MD5" - -#define SSL3_TXT_KRB5_DES_40_CBC_SHA "EXP-KRB5-DES-CBC-SHA" -#define SSL3_TXT_KRB5_RC2_40_CBC_SHA "EXP-KRB5-RC2-CBC-SHA" -#define SSL3_TXT_KRB5_RC4_40_SHA "EXP-KRB5-RC4-SHA" -#define SSL3_TXT_KRB5_DES_40_CBC_MD5 "EXP-KRB5-DES-CBC-MD5" -#define SSL3_TXT_KRB5_RC2_40_CBC_MD5 "EXP-KRB5-RC2-CBC-MD5" -#define SSL3_TXT_KRB5_RC4_40_MD5 "EXP-KRB5-RC4-MD5" - -#define SSL3_SSL_SESSION_ID_LENGTH 32 -#define SSL3_MAX_SSL_SESSION_ID_LENGTH 32 - -#define SSL3_MASTER_SECRET_SIZE 48 -#define SSL3_RANDOM_SIZE 32 -#define SSL3_SESSION_ID_SIZE 32 -#define SSL3_RT_HEADER_LENGTH 5 - -/* Due to MS stuffing up, this can change.... */ -#if defined(OPENSSL_SYS_WIN16) || \ - (defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32)) -#define SSL3_RT_MAX_EXTRA (14000) -#else -#define SSL3_RT_MAX_EXTRA (16384) -#endif - -#define SSL3_RT_MAX_PLAIN_LENGTH 16384 -#ifdef OPENSSL_NO_COMP -#define SSL3_RT_MAX_COMPRESSED_LENGTH SSL3_RT_MAX_PLAIN_LENGTH -#else -#define SSL3_RT_MAX_COMPRESSED_LENGTH (1024+SSL3_RT_MAX_PLAIN_LENGTH) -#endif -#define SSL3_RT_MAX_ENCRYPTED_LENGTH (1024+SSL3_RT_MAX_COMPRESSED_LENGTH) -#define SSL3_RT_MAX_PACKET_SIZE (SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH) -#define SSL3_RT_MAX_DATA_SIZE (1024*1024) - -#define SSL3_MD_CLIENT_FINISHED_CONST "\x43\x4C\x4E\x54" -#define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52" - -#define SSL3_VERSION 0x0300 -#define SSL3_VERSION_MAJOR 0x03 -#define SSL3_VERSION_MINOR 0x00 - -#define SSL3_RT_CHANGE_CIPHER_SPEC 20 -#define SSL3_RT_ALERT 21 -#define SSL3_RT_HANDSHAKE 22 -#define SSL3_RT_APPLICATION_DATA 23 - -#define SSL3_AL_WARNING 1 -#define SSL3_AL_FATAL 2 - -#define SSL3_AD_CLOSE_NOTIFY 0 -#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */ -#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */ -#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */ -#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */ -#define SSL3_AD_NO_CERTIFICATE 41 -#define SSL3_AD_BAD_CERTIFICATE 42 -#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43 -#define SSL3_AD_CERTIFICATE_REVOKED 44 -#define SSL3_AD_CERTIFICATE_EXPIRED 45 -#define SSL3_AD_CERTIFICATE_UNKNOWN 46 -#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */ - -typedef struct ssl3_record_st - { -/*r */ int type; /* type of record */ -/*rw*/ unsigned int length; /* How many bytes available */ -/*r */ unsigned int off; /* read/write offset into 'buf' */ -/*rw*/ unsigned char *data; /* pointer to the record data */ -/*rw*/ unsigned char *input; /* where the decode bytes are */ -/*r */ unsigned char *comp; /* only used with decompression - malloc()ed */ -/*r */ unsigned long epoch; /* epoch number, needed by DTLS1 */ -/*r */ PQ_64BIT seq_num; /* sequence number, needed by DTLS1 */ - } SSL3_RECORD; - -typedef struct ssl3_buffer_st - { - unsigned char *buf; /* at least SSL3_RT_MAX_PACKET_SIZE bytes, - * see ssl3_setup_buffers() */ - size_t len; /* buffer size */ - int offset; /* where to 'copy from' */ - int left; /* how many bytes left */ - } SSL3_BUFFER; - -#define SSL3_CT_RSA_SIGN 1 -#define SSL3_CT_DSS_SIGN 2 -#define SSL3_CT_RSA_FIXED_DH 3 -#define SSL3_CT_DSS_FIXED_DH 4 -#define SSL3_CT_RSA_EPHEMERAL_DH 5 -#define SSL3_CT_DSS_EPHEMERAL_DH 6 -#define SSL3_CT_FORTEZZA_DMS 20 -/* SSL3_CT_NUMBER is used to size arrays and it must be large - * enough to contain all of the cert types defined either for - * SSLv3 and TLSv1. - */ -#define SSL3_CT_NUMBER 7 - - -#define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001 -#define SSL3_FLAGS_DELAY_CLIENT_FINISHED 0x0002 -#define SSL3_FLAGS_POP_BUFFER 0x0004 -#define TLS1_FLAGS_TLS_PADDING_BUG 0x0008 - -typedef struct ssl3_state_st - { - long flags; - int delay_buf_pop_ret; - - unsigned char read_sequence[8]; - unsigned char read_mac_secret[EVP_MAX_MD_SIZE]; - unsigned char write_sequence[8]; - unsigned char write_mac_secret[EVP_MAX_MD_SIZE]; - - unsigned char server_random[SSL3_RANDOM_SIZE]; - unsigned char client_random[SSL3_RANDOM_SIZE]; - - /* flags for countermeasure against known-IV weakness */ - int need_empty_fragments; - int empty_fragment_done; - - SSL3_BUFFER rbuf; /* read IO goes into here */ - SSL3_BUFFER wbuf; /* write IO goes into here */ - - SSL3_RECORD rrec; /* each decoded record goes in here */ - SSL3_RECORD wrec; /* goes out from here */ - - /* storage for Alert/Handshake protocol data received but not - * yet processed by ssl3_read_bytes: */ - unsigned char alert_fragment[2]; - unsigned int alert_fragment_len; - unsigned char handshake_fragment[4]; - unsigned int handshake_fragment_len; - - /* partial write - check the numbers match */ - unsigned int wnum; /* number of bytes sent so far */ - int wpend_tot; /* number bytes written */ - int wpend_type; - int wpend_ret; /* number of bytes submitted */ - const unsigned char *wpend_buf; - - /* used during startup, digest all incoming/outgoing packets */ - EVP_MD_CTX finish_dgst1; - EVP_MD_CTX finish_dgst2; - - /* this is set whenerver we see a change_cipher_spec message - * come in when we are not looking for one */ - int change_cipher_spec; - - int warn_alert; - int fatal_alert; - /* we allow one fatal and one warning alert to be outstanding, - * send close alert via the warning alert */ - int alert_dispatch; - unsigned char send_alert[2]; - - /* This flag is set when we should renegotiate ASAP, basically when - * there is no more data in the read or write buffers */ - int renegotiate; - int total_renegotiations; - int num_renegotiations; - - int in_read_app_data; - - struct { - /* actually only needs to be 16+20 */ - unsigned char cert_verify_md[EVP_MAX_MD_SIZE*2]; - - /* actually only need to be 16+20 for SSLv3 and 12 for TLS */ - unsigned char finish_md[EVP_MAX_MD_SIZE*2]; - int finish_md_len; - unsigned char peer_finish_md[EVP_MAX_MD_SIZE*2]; - int peer_finish_md_len; - - unsigned long message_size; - int message_type; - - /* used to hold the new cipher we are going to use */ - SSL_CIPHER *new_cipher; -#ifndef OPENSSL_NO_DH - DH *dh; -#endif - -#ifndef OPENSSL_NO_ECDH - EC_KEY *ecdh; /* holds short lived ECDH key */ -#endif - - /* used when SSL_ST_FLUSH_DATA is entered */ - int next_state; - - int reuse_message; - - /* used for certificate requests */ - int cert_req; - int ctype_num; - char ctype[SSL3_CT_NUMBER]; - STACK_OF(X509_NAME) *ca_names; - - int use_rsa_tmp; - - int key_block_length; - unsigned char *key_block; - - const EVP_CIPHER *new_sym_enc; - const EVP_MD *new_hash; -#ifndef OPENSSL_NO_COMP - const SSL_COMP *new_compression; -#else - char *new_compression; -#endif - int cert_request; - } tmp; - - } SSL3_STATE; - - -/* SSLv3 */ -/*client */ -/* extra state */ -#define SSL3_ST_CW_FLUSH (0x100|SSL_ST_CONNECT) -/* write to server */ -#define SSL3_ST_CW_CLNT_HELLO_A (0x110|SSL_ST_CONNECT) -#define SSL3_ST_CW_CLNT_HELLO_B (0x111|SSL_ST_CONNECT) -/* read from server */ -#define SSL3_ST_CR_SRVR_HELLO_A (0x120|SSL_ST_CONNECT) -#define SSL3_ST_CR_SRVR_HELLO_B (0x121|SSL_ST_CONNECT) -#define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A (0x126|SSL_ST_CONNECT) -#define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B (0x127|SSL_ST_CONNECT) -#define SSL3_ST_CR_CERT_A (0x130|SSL_ST_CONNECT) -#define SSL3_ST_CR_CERT_B (0x131|SSL_ST_CONNECT) -#define SSL3_ST_CR_KEY_EXCH_A (0x140|SSL_ST_CONNECT) -#define SSL3_ST_CR_KEY_EXCH_B (0x141|SSL_ST_CONNECT) -#define SSL3_ST_CR_CERT_REQ_A (0x150|SSL_ST_CONNECT) -#define SSL3_ST_CR_CERT_REQ_B (0x151|SSL_ST_CONNECT) -#define SSL3_ST_CR_SRVR_DONE_A (0x160|SSL_ST_CONNECT) -#define SSL3_ST_CR_SRVR_DONE_B (0x161|SSL_ST_CONNECT) -/* write to server */ -#define SSL3_ST_CW_CERT_A (0x170|SSL_ST_CONNECT) -#define SSL3_ST_CW_CERT_B (0x171|SSL_ST_CONNECT) -#define SSL3_ST_CW_CERT_C (0x172|SSL_ST_CONNECT) -#define SSL3_ST_CW_CERT_D (0x173|SSL_ST_CONNECT) -#define SSL3_ST_CW_KEY_EXCH_A (0x180|SSL_ST_CONNECT) -#define SSL3_ST_CW_KEY_EXCH_B (0x181|SSL_ST_CONNECT) -#define SSL3_ST_CW_CERT_VRFY_A (0x190|SSL_ST_CONNECT) -#define SSL3_ST_CW_CERT_VRFY_B (0x191|SSL_ST_CONNECT) -#define SSL3_ST_CW_CHANGE_A (0x1A0|SSL_ST_CONNECT) -#define SSL3_ST_CW_CHANGE_B (0x1A1|SSL_ST_CONNECT) -#define SSL3_ST_CW_FINISHED_A (0x1B0|SSL_ST_CONNECT) -#define SSL3_ST_CW_FINISHED_B (0x1B1|SSL_ST_CONNECT) -/* read from server */ -#define SSL3_ST_CR_CHANGE_A (0x1C0|SSL_ST_CONNECT) -#define SSL3_ST_CR_CHANGE_B (0x1C1|SSL_ST_CONNECT) -#define SSL3_ST_CR_FINISHED_A (0x1D0|SSL_ST_CONNECT) -#define SSL3_ST_CR_FINISHED_B (0x1D1|SSL_ST_CONNECT) -#define SSL3_ST_CR_SESSION_TICKET_A (0x1E0|SSL_ST_CONNECT) -#define SSL3_ST_CR_SESSION_TICKET_B (0x1E1|SSL_ST_CONNECT) -#define SSL3_ST_CR_CERT_STATUS_A (0x1F0|SSL_ST_CONNECT) -#define SSL3_ST_CR_CERT_STATUS_B (0x1F1|SSL_ST_CONNECT) - -/* server */ -/* extra state */ -#define SSL3_ST_SW_FLUSH (0x100|SSL_ST_ACCEPT) -/* read from client */ -/* Do not change the number values, they do matter */ -#define SSL3_ST_SR_CLNT_HELLO_A (0x110|SSL_ST_ACCEPT) -#define SSL3_ST_SR_CLNT_HELLO_B (0x111|SSL_ST_ACCEPT) -#define SSL3_ST_SR_CLNT_HELLO_C (0x112|SSL_ST_ACCEPT) -/* write to client */ -#define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A (0x113|SSL_ST_ACCEPT) -#define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B (0x114|SSL_ST_ACCEPT) -#define SSL3_ST_SW_HELLO_REQ_A (0x120|SSL_ST_ACCEPT) -#define SSL3_ST_SW_HELLO_REQ_B (0x121|SSL_ST_ACCEPT) -#define SSL3_ST_SW_HELLO_REQ_C (0x122|SSL_ST_ACCEPT) -#define SSL3_ST_SW_SRVR_HELLO_A (0x130|SSL_ST_ACCEPT) -#define SSL3_ST_SW_SRVR_HELLO_B (0x131|SSL_ST_ACCEPT) -#define SSL3_ST_SW_CERT_A (0x140|SSL_ST_ACCEPT) -#define SSL3_ST_SW_CERT_B (0x141|SSL_ST_ACCEPT) -#define SSL3_ST_SW_KEY_EXCH_A (0x150|SSL_ST_ACCEPT) -#define SSL3_ST_SW_KEY_EXCH_B (0x151|SSL_ST_ACCEPT) -#define SSL3_ST_SW_CERT_REQ_A (0x160|SSL_ST_ACCEPT) -#define SSL3_ST_SW_CERT_REQ_B (0x161|SSL_ST_ACCEPT) -#define SSL3_ST_SW_SRVR_DONE_A (0x170|SSL_ST_ACCEPT) -#define SSL3_ST_SW_SRVR_DONE_B (0x171|SSL_ST_ACCEPT) -/* read from client */ -#define SSL3_ST_SR_CERT_A (0x180|SSL_ST_ACCEPT) -#define SSL3_ST_SR_CERT_B (0x181|SSL_ST_ACCEPT) -#define SSL3_ST_SR_KEY_EXCH_A (0x190|SSL_ST_ACCEPT) -#define SSL3_ST_SR_KEY_EXCH_B (0x191|SSL_ST_ACCEPT) -#define SSL3_ST_SR_CERT_VRFY_A (0x1A0|SSL_ST_ACCEPT) -#define SSL3_ST_SR_CERT_VRFY_B (0x1A1|SSL_ST_ACCEPT) -#define SSL3_ST_SR_CHANGE_A (0x1B0|SSL_ST_ACCEPT) -#define SSL3_ST_SR_CHANGE_B (0x1B1|SSL_ST_ACCEPT) -#define SSL3_ST_SR_FINISHED_A (0x1C0|SSL_ST_ACCEPT) -#define SSL3_ST_SR_FINISHED_B (0x1C1|SSL_ST_ACCEPT) -/* write to client */ -#define SSL3_ST_SW_CHANGE_A (0x1D0|SSL_ST_ACCEPT) -#define SSL3_ST_SW_CHANGE_B (0x1D1|SSL_ST_ACCEPT) -#define SSL3_ST_SW_FINISHED_A (0x1E0|SSL_ST_ACCEPT) -#define SSL3_ST_SW_FINISHED_B (0x1E1|SSL_ST_ACCEPT) -#define SSL3_ST_SW_SESSION_TICKET_A (0x1F0|SSL_ST_ACCEPT) -#define SSL3_ST_SW_SESSION_TICKET_B (0x1F1|SSL_ST_ACCEPT) -#define SSL3_ST_SW_CERT_STATUS_A (0x200|SSL_ST_ACCEPT) -#define SSL3_ST_SW_CERT_STATUS_B (0x201|SSL_ST_ACCEPT) - -#define SSL3_MT_HELLO_REQUEST 0 -#define SSL3_MT_CLIENT_HELLO 1 -#define SSL3_MT_SERVER_HELLO 2 -#define SSL3_MT_NEWSESSION_TICKET 4 -#define SSL3_MT_CERTIFICATE 11 -#define SSL3_MT_SERVER_KEY_EXCHANGE 12 -#define SSL3_MT_CERTIFICATE_REQUEST 13 -#define SSL3_MT_SERVER_DONE 14 -#define SSL3_MT_CERTIFICATE_VERIFY 15 -#define SSL3_MT_CLIENT_KEY_EXCHANGE 16 -#define SSL3_MT_FINISHED 20 -#define SSL3_MT_CERTIFICATE_STATUS 22 -#define DTLS1_MT_HELLO_VERIFY_REQUEST 3 - - -#define SSL3_MT_CCS 1 - -/* These are used when changing over to a new cipher */ -#define SSL3_CC_READ 0x01 -#define SSL3_CC_WRITE 0x02 -#define SSL3_CC_CLIENT 0x10 -#define SSL3_CC_SERVER 0x20 -#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT|SSL3_CC_WRITE) -#define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER|SSL3_CC_READ) -#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT|SSL3_CC_READ) -#define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER|SSL3_CC_WRITE) - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/stack.h b/externals/openssl/stack.h deleted file mode 100644 index 51d14d5bf7..0000000000 --- a/externals/openssl/stack.h +++ /dev/null @@ -1,110 +0,0 @@ -/* crypto/stack/stack.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_STACK_H -#define HEADER_STACK_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct stack_st - { - int num; - char **data; - int sorted; - - int num_alloc; - int (*comp)(const char * const *, const char * const *); - } STACK; - -#define M_sk_num(sk) ((sk) ? (sk)->num:-1) -#define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) - -int sk_num(const STACK *); -char *sk_value(const STACK *, int); - -char *sk_set(STACK *, int, char *); - -STACK *sk_new(int (*cmp)(const char * const *, const char * const *)); -STACK *sk_new_null(void); -void sk_free(STACK *); -void sk_pop_free(STACK *st, void (*func)(void *)); -int sk_insert(STACK *sk,char *data,int where); -char *sk_delete(STACK *st,int loc); -char *sk_delete_ptr(STACK *st, char *p); -int sk_find(STACK *st,char *data); -int sk_find_ex(STACK *st,char *data); -int sk_push(STACK *st,char *data); -int sk_unshift(STACK *st,char *data); -char *sk_shift(STACK *st); -char *sk_pop(STACK *st); -void sk_zero(STACK *st); -int (*sk_set_cmp_func(STACK *sk, int (*c)(const char * const *, - const char * const *))) - (const char * const *, const char * const *); -STACK *sk_dup(STACK *st); -void sk_sort(STACK *st); -int sk_is_sorted(const STACK *st); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/externals/openssl/store.h b/externals/openssl/store.h deleted file mode 100644 index 25f360892a..0000000000 --- a/externals/openssl/store.h +++ /dev/null @@ -1,555 +0,0 @@ -/* crypto/store/store.h -*- mode:C; c-file-style: "eay" -*- */ -/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL - * project 2003. - */ -/* ==================================================================== - * Copyright (c) 2003 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_STORE_H -#define HEADER_STORE_H - -#include -#ifndef OPENSSL_NO_DEPRECATED -#include -#include -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Already defined in ossl_typ.h */ -/* typedef struct store_st STORE; */ -/* typedef struct store_method_st STORE_METHOD; */ - - -/* All the following functions return 0, a negative number or NULL on error. - When everything is fine, they return a positive value or a non-NULL - pointer, all depending on their purpose. */ - -/* Creators and destructor. */ -STORE *STORE_new_method(const STORE_METHOD *method); -STORE *STORE_new_engine(ENGINE *engine); -void STORE_free(STORE *ui); - - -/* Give a user interface parametrised control commands. This can be used to - send down an integer, a data pointer or a function pointer, as well as - be used to get information from a STORE. */ -int STORE_ctrl(STORE *store, int cmd, long i, void *p, void (*f)(void)); - -/* A control to set the directory with keys and certificates. Used by the - built-in directory level method. */ -#define STORE_CTRL_SET_DIRECTORY 0x0001 -/* A control to set a file to load. Used by the built-in file level method. */ -#define STORE_CTRL_SET_FILE 0x0002 -/* A control to set a configuration file to load. Can be used by any method - that wishes to load a configuration file. */ -#define STORE_CTRL_SET_CONF_FILE 0x0003 -/* A control to set a the section of the loaded configuration file. Can be - used by any method that wishes to load a configuration file. */ -#define STORE_CTRL_SET_CONF_SECTION 0x0004 - - -/* Some methods may use extra data */ -#define STORE_set_app_data(s,arg) STORE_set_ex_data(s,0,arg) -#define STORE_get_app_data(s) STORE_get_ex_data(s,0) -int STORE_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int STORE_set_ex_data(STORE *r,int idx,void *arg); -void *STORE_get_ex_data(STORE *r, int idx); - -/* Use specific methods instead of the built-in one */ -const STORE_METHOD *STORE_get_method(STORE *store); -const STORE_METHOD *STORE_set_method(STORE *store, const STORE_METHOD *meth); - -/* The standard OpenSSL methods. */ -/* This is the in-memory method. It does everything except revoking and updating, - and is of course volatile. It's used by other methods that have an in-memory - cache. */ -const STORE_METHOD *STORE_Memory(void); -#if 0 /* Not yet implemented */ -/* This is the directory store. It does everything except revoking and updating, - and uses STORE_Memory() to cache things in memory. */ -const STORE_METHOD *STORE_Directory(void); -/* This is the file store. It does everything except revoking and updating, - and uses STORE_Memory() to cache things in memory. Certificates are added - to it with the store operation, and it will only get cached certificates. */ -const STORE_METHOD *STORE_File(void); -#endif - -/* Store functions take a type code for the type of data they should store - or fetch */ -typedef enum STORE_object_types - { - STORE_OBJECT_TYPE_X509_CERTIFICATE= 0x01, /* X509 * */ - STORE_OBJECT_TYPE_X509_CRL= 0x02, /* X509_CRL * */ - STORE_OBJECT_TYPE_PRIVATE_KEY= 0x03, /* EVP_PKEY * */ - STORE_OBJECT_TYPE_PUBLIC_KEY= 0x04, /* EVP_PKEY * */ - STORE_OBJECT_TYPE_NUMBER= 0x05, /* BIGNUM * */ - STORE_OBJECT_TYPE_ARBITRARY= 0x06, /* BUF_MEM * */ - STORE_OBJECT_TYPE_NUM= 0x06 /* The amount of known - object types */ - } STORE_OBJECT_TYPES; -/* List of text strings corresponding to the object types. */ -extern const char * const STORE_object_type_string[STORE_OBJECT_TYPE_NUM+1]; - -/* Some store functions take a parameter list. Those parameters come with - one of the following codes. The comments following the codes below indicate - what type the value should be a pointer to. */ -typedef enum STORE_params - { - STORE_PARAM_EVP_TYPE= 0x01, /* int */ - STORE_PARAM_BITS= 0x02, /* size_t */ - STORE_PARAM_KEY_PARAMETERS= 0x03, /* ??? */ - STORE_PARAM_KEY_NO_PARAMETERS= 0x04, /* N/A */ - STORE_PARAM_AUTH_PASSPHRASE= 0x05, /* char * */ - STORE_PARAM_AUTH_KRB5_TICKET= 0x06, /* void * */ - STORE_PARAM_TYPE_NUM= 0x06 /* The amount of known - parameter types */ - } STORE_PARAM_TYPES; -/* Parameter value sizes. -1 means unknown, anything else is the required size. */ -extern const int STORE_param_sizes[STORE_PARAM_TYPE_NUM+1]; - -/* Store functions take attribute lists. Those attributes come with codes. - The comments following the codes below indicate what type the value should - be a pointer to. */ -typedef enum STORE_attribs - { - STORE_ATTR_END= 0x00, - STORE_ATTR_FRIENDLYNAME= 0x01, /* C string */ - STORE_ATTR_KEYID= 0x02, /* 160 bit string (SHA1) */ - STORE_ATTR_ISSUERKEYID= 0x03, /* 160 bit string (SHA1) */ - STORE_ATTR_SUBJECTKEYID= 0x04, /* 160 bit string (SHA1) */ - STORE_ATTR_ISSUERSERIALHASH= 0x05, /* 160 bit string (SHA1) */ - STORE_ATTR_ISSUER= 0x06, /* X509_NAME * */ - STORE_ATTR_SERIAL= 0x07, /* BIGNUM * */ - STORE_ATTR_SUBJECT= 0x08, /* X509_NAME * */ - STORE_ATTR_CERTHASH= 0x09, /* 160 bit string (SHA1) */ - STORE_ATTR_EMAIL= 0x0a, /* C string */ - STORE_ATTR_FILENAME= 0x0b, /* C string */ - STORE_ATTR_TYPE_NUM= 0x0b, /* The amount of known - attribute types */ - STORE_ATTR_OR= 0xff /* This is a special - separator, which - expresses the OR - operation. */ - } STORE_ATTR_TYPES; -/* Attribute value sizes. -1 means unknown, anything else is the required size. */ -extern const int STORE_attr_sizes[STORE_ATTR_TYPE_NUM+1]; - -typedef enum STORE_certificate_status - { - STORE_X509_VALID= 0x00, - STORE_X509_EXPIRED= 0x01, - STORE_X509_SUSPENDED= 0x02, - STORE_X509_REVOKED= 0x03 - } STORE_CERTIFICATE_STATUS; - -/* Engine store functions will return a structure that contains all the necessary - * information, including revokation status for certificates. This is really not - * needed for application authors, as the ENGINE framework functions will extract - * the OpenSSL-specific information when at all possible. However, for engine - * authors, it's crucial to know this structure. */ -typedef struct STORE_OBJECT_st - { - STORE_OBJECT_TYPES type; - union - { - struct - { - STORE_CERTIFICATE_STATUS status; - X509 *certificate; - } x509; - X509_CRL *crl; - EVP_PKEY *key; - BIGNUM *number; - BUF_MEM *arbitrary; - } data; - } STORE_OBJECT; -DECLARE_STACK_OF(STORE_OBJECT) -STORE_OBJECT *STORE_OBJECT_new(void); -void STORE_OBJECT_free(STORE_OBJECT *data); - - - -/* The following functions handle the storage. They return 0, a negative number - or NULL on error, anything else on success. */ -X509 *STORE_get_certificate(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_store_certificate(STORE *e, X509 *data, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_modify_certificate(STORE *e, OPENSSL_ITEM search_attributes[], - OPENSSL_ITEM add_attributes[], OPENSSL_ITEM modify_attributes[], - OPENSSL_ITEM delete_attributes[], OPENSSL_ITEM parameters[]); -int STORE_revoke_certificate(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_delete_certificate(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -void *STORE_list_certificate_start(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -X509 *STORE_list_certificate_next(STORE *e, void *handle); -int STORE_list_certificate_end(STORE *e, void *handle); -int STORE_list_certificate_endp(STORE *e, void *handle); -EVP_PKEY *STORE_generate_key(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -EVP_PKEY *STORE_get_private_key(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_store_private_key(STORE *e, EVP_PKEY *data, - OPENSSL_ITEM attributes[], OPENSSL_ITEM parameters[]); -int STORE_modify_private_key(STORE *e, OPENSSL_ITEM search_attributes[], - OPENSSL_ITEM add_sttributes[], OPENSSL_ITEM modify_attributes[], - OPENSSL_ITEM delete_attributes[], OPENSSL_ITEM parameters[]); -int STORE_revoke_private_key(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_delete_private_key(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -void *STORE_list_private_key_start(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -EVP_PKEY *STORE_list_private_key_next(STORE *e, void *handle); -int STORE_list_private_key_end(STORE *e, void *handle); -int STORE_list_private_key_endp(STORE *e, void *handle); -EVP_PKEY *STORE_get_public_key(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_store_public_key(STORE *e, EVP_PKEY *data, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_modify_public_key(STORE *e, OPENSSL_ITEM search_attributes[], - OPENSSL_ITEM add_sttributes[], OPENSSL_ITEM modify_attributes[], - OPENSSL_ITEM delete_attributes[], OPENSSL_ITEM parameters[]); -int STORE_revoke_public_key(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_delete_public_key(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -void *STORE_list_public_key_start(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -EVP_PKEY *STORE_list_public_key_next(STORE *e, void *handle); -int STORE_list_public_key_end(STORE *e, void *handle); -int STORE_list_public_key_endp(STORE *e, void *handle); -X509_CRL *STORE_generate_crl(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -X509_CRL *STORE_get_crl(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_store_crl(STORE *e, X509_CRL *data, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_modify_crl(STORE *e, OPENSSL_ITEM search_attributes[], - OPENSSL_ITEM add_sttributes[], OPENSSL_ITEM modify_attributes[], - OPENSSL_ITEM delete_attributes[], OPENSSL_ITEM parameters[]); -int STORE_delete_crl(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -void *STORE_list_crl_start(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -X509_CRL *STORE_list_crl_next(STORE *e, void *handle); -int STORE_list_crl_end(STORE *e, void *handle); -int STORE_list_crl_endp(STORE *e, void *handle); -int STORE_store_number(STORE *e, BIGNUM *data, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_modify_number(STORE *e, OPENSSL_ITEM search_attributes[], - OPENSSL_ITEM add_sttributes[], OPENSSL_ITEM modify_attributes[], - OPENSSL_ITEM delete_attributes[], OPENSSL_ITEM parameters[]); -BIGNUM *STORE_get_number(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_delete_number(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_store_arbitrary(STORE *e, BUF_MEM *data, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_modify_arbitrary(STORE *e, OPENSSL_ITEM search_attributes[], - OPENSSL_ITEM add_sttributes[], OPENSSL_ITEM modify_attributes[], - OPENSSL_ITEM delete_attributes[], OPENSSL_ITEM parameters[]); -BUF_MEM *STORE_get_arbitrary(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); -int STORE_delete_arbitrary(STORE *e, OPENSSL_ITEM attributes[], - OPENSSL_ITEM parameters[]); - - -/* Create and manipulate methods */ -STORE_METHOD *STORE_create_method(char *name); -void STORE_destroy_method(STORE_METHOD *store_method); - -/* These callback types are use for store handlers */ -typedef int (*STORE_INITIALISE_FUNC_PTR)(STORE *); -typedef void (*STORE_CLEANUP_FUNC_PTR)(STORE *); -typedef STORE_OBJECT *(*STORE_GENERATE_OBJECT_FUNC_PTR)(STORE *, STORE_OBJECT_TYPES type, OPENSSL_ITEM attributes[], OPENSSL_ITEM parameters[]); -typedef STORE_OBJECT *(*STORE_GET_OBJECT_FUNC_PTR)(STORE *, STORE_OBJECT_TYPES type, OPENSSL_ITEM attributes[], OPENSSL_ITEM parameters[]); -typedef void *(*STORE_START_OBJECT_FUNC_PTR)(STORE *, STORE_OBJECT_TYPES type, OPENSSL_ITEM attributes[], OPENSSL_ITEM parameters[]); -typedef STORE_OBJECT *(*STORE_NEXT_OBJECT_FUNC_PTR)(STORE *, void *handle); -typedef int (*STORE_END_OBJECT_FUNC_PTR)(STORE *, void *handle); -typedef int (*STORE_HANDLE_OBJECT_FUNC_PTR)(STORE *, STORE_OBJECT_TYPES type, OPENSSL_ITEM attributes[], OPENSSL_ITEM parameters[]); -typedef int (*STORE_STORE_OBJECT_FUNC_PTR)(STORE *, STORE_OBJECT_TYPES type, STORE_OBJECT *data, OPENSSL_ITEM attributes[], OPENSSL_ITEM parameters[]); -typedef int (*STORE_MODIFY_OBJECT_FUNC_PTR)(STORE *, STORE_OBJECT_TYPES type, OPENSSL_ITEM search_attributes[], OPENSSL_ITEM add_attributes[], OPENSSL_ITEM modify_attributes[], OPENSSL_ITEM delete_attributes[], OPENSSL_ITEM parameters[]); -typedef int (*STORE_GENERIC_FUNC_PTR)(STORE *, OPENSSL_ITEM attributes[], OPENSSL_ITEM parameters[]); -typedef int (*STORE_CTRL_FUNC_PTR)(STORE *, int cmd, long l, void *p, void (*f)(void)); - -int STORE_method_set_initialise_function(STORE_METHOD *sm, STORE_INITIALISE_FUNC_PTR init_f); -int STORE_method_set_cleanup_function(STORE_METHOD *sm, STORE_CLEANUP_FUNC_PTR clean_f); -int STORE_method_set_generate_function(STORE_METHOD *sm, STORE_GENERATE_OBJECT_FUNC_PTR generate_f); -int STORE_method_set_get_function(STORE_METHOD *sm, STORE_GET_OBJECT_FUNC_PTR get_f); -int STORE_method_set_store_function(STORE_METHOD *sm, STORE_STORE_OBJECT_FUNC_PTR store_f); -int STORE_method_set_modify_function(STORE_METHOD *sm, STORE_MODIFY_OBJECT_FUNC_PTR store_f); -int STORE_method_set_revoke_function(STORE_METHOD *sm, STORE_HANDLE_OBJECT_FUNC_PTR revoke_f); -int STORE_method_set_delete_function(STORE_METHOD *sm, STORE_HANDLE_OBJECT_FUNC_PTR delete_f); -int STORE_method_set_list_start_function(STORE_METHOD *sm, STORE_START_OBJECT_FUNC_PTR list_start_f); -int STORE_method_set_list_next_function(STORE_METHOD *sm, STORE_NEXT_OBJECT_FUNC_PTR list_next_f); -int STORE_method_set_list_end_function(STORE_METHOD *sm, STORE_END_OBJECT_FUNC_PTR list_end_f); -int STORE_method_set_update_store_function(STORE_METHOD *sm, STORE_GENERIC_FUNC_PTR); -int STORE_method_set_lock_store_function(STORE_METHOD *sm, STORE_GENERIC_FUNC_PTR); -int STORE_method_set_unlock_store_function(STORE_METHOD *sm, STORE_GENERIC_FUNC_PTR); -int STORE_method_set_ctrl_function(STORE_METHOD *sm, STORE_CTRL_FUNC_PTR ctrl_f); - -STORE_INITIALISE_FUNC_PTR STORE_method_get_initialise_function(STORE_METHOD *sm); -STORE_CLEANUP_FUNC_PTR STORE_method_get_cleanup_function(STORE_METHOD *sm); -STORE_GENERATE_OBJECT_FUNC_PTR STORE_method_get_generate_function(STORE_METHOD *sm); -STORE_GET_OBJECT_FUNC_PTR STORE_method_get_get_function(STORE_METHOD *sm); -STORE_STORE_OBJECT_FUNC_PTR STORE_method_get_store_function(STORE_METHOD *sm); -STORE_MODIFY_OBJECT_FUNC_PTR STORE_method_get_modify_function(STORE_METHOD *sm); -STORE_HANDLE_OBJECT_FUNC_PTR STORE_method_get_revoke_function(STORE_METHOD *sm); -STORE_HANDLE_OBJECT_FUNC_PTR STORE_method_get_delete_function(STORE_METHOD *sm); -STORE_START_OBJECT_FUNC_PTR STORE_method_get_list_start_function(STORE_METHOD *sm); -STORE_NEXT_OBJECT_FUNC_PTR STORE_method_get_list_next_function(STORE_METHOD *sm); -STORE_END_OBJECT_FUNC_PTR STORE_method_get_list_end_function(STORE_METHOD *sm); -STORE_GENERIC_FUNC_PTR STORE_method_get_update_store_function(STORE_METHOD *sm); -STORE_GENERIC_FUNC_PTR STORE_method_get_lock_store_function(STORE_METHOD *sm); -STORE_GENERIC_FUNC_PTR STORE_method_get_unlock_store_function(STORE_METHOD *sm); -STORE_CTRL_FUNC_PTR STORE_method_get_ctrl_function(STORE_METHOD *sm); - -/* Method helper structures and functions. */ - -/* This structure is the result of parsing through the information in a list - of OPENSSL_ITEMs. It stores all the necessary information in a structured - way.*/ -typedef struct STORE_attr_info_st STORE_ATTR_INFO; - -/* Parse a list of OPENSSL_ITEMs and return a pointer to a STORE_ATTR_INFO. - Note that we do this in the list form, since the list of OPENSSL_ITEMs can - come in blocks separated with STORE_ATTR_OR. Note that the value returned - by STORE_parse_attrs_next() must be freed with STORE_ATTR_INFO_free(). */ -void *STORE_parse_attrs_start(OPENSSL_ITEM *attributes); -STORE_ATTR_INFO *STORE_parse_attrs_next(void *handle); -int STORE_parse_attrs_end(void *handle); -int STORE_parse_attrs_endp(void *handle); - -/* Creator and destructor */ -STORE_ATTR_INFO *STORE_ATTR_INFO_new(void); -int STORE_ATTR_INFO_free(STORE_ATTR_INFO *attrs); - -/* Manipulators */ -char *STORE_ATTR_INFO_get0_cstr(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code); -unsigned char *STORE_ATTR_INFO_get0_sha1str(STORE_ATTR_INFO *attrs, - STORE_ATTR_TYPES code); -X509_NAME *STORE_ATTR_INFO_get0_dn(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code); -BIGNUM *STORE_ATTR_INFO_get0_number(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code); -int STORE_ATTR_INFO_set_cstr(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, - char *cstr, size_t cstr_size); -int STORE_ATTR_INFO_set_sha1str(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, - unsigned char *sha1str, size_t sha1str_size); -int STORE_ATTR_INFO_set_dn(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, - X509_NAME *dn); -int STORE_ATTR_INFO_set_number(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, - BIGNUM *number); -int STORE_ATTR_INFO_modify_cstr(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, - char *cstr, size_t cstr_size); -int STORE_ATTR_INFO_modify_sha1str(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, - unsigned char *sha1str, size_t sha1str_size); -int STORE_ATTR_INFO_modify_dn(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, - X509_NAME *dn); -int STORE_ATTR_INFO_modify_number(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, - BIGNUM *number); - -/* Compare on basis of a bit pattern formed by the STORE_ATTR_TYPES values - in each contained attribute. */ -int STORE_ATTR_INFO_compare(STORE_ATTR_INFO *a, STORE_ATTR_INFO *b); -/* Check if the set of attributes in a is within the range of attributes - set in b. */ -int STORE_ATTR_INFO_in_range(STORE_ATTR_INFO *a, STORE_ATTR_INFO *b); -/* Check if the set of attributes in a are also set in b. */ -int STORE_ATTR_INFO_in(STORE_ATTR_INFO *a, STORE_ATTR_INFO *b); -/* Same as STORE_ATTR_INFO_in(), but also checks the attribute values. */ -int STORE_ATTR_INFO_in_ex(STORE_ATTR_INFO *a, STORE_ATTR_INFO *b); - - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_STORE_strings(void); - -/* Error codes for the STORE functions. */ - -/* Function codes. */ -#define STORE_F_MEM_DELETE 134 -#define STORE_F_MEM_GENERATE 135 -#define STORE_F_MEM_LIST_END 168 -#define STORE_F_MEM_LIST_NEXT 136 -#define STORE_F_MEM_LIST_START 137 -#define STORE_F_MEM_MODIFY 169 -#define STORE_F_MEM_STORE 138 -#define STORE_F_STORE_ATTR_INFO_GET0_CSTR 139 -#define STORE_F_STORE_ATTR_INFO_GET0_DN 140 -#define STORE_F_STORE_ATTR_INFO_GET0_NUMBER 141 -#define STORE_F_STORE_ATTR_INFO_GET0_SHA1STR 142 -#define STORE_F_STORE_ATTR_INFO_MODIFY_CSTR 143 -#define STORE_F_STORE_ATTR_INFO_MODIFY_DN 144 -#define STORE_F_STORE_ATTR_INFO_MODIFY_NUMBER 145 -#define STORE_F_STORE_ATTR_INFO_MODIFY_SHA1STR 146 -#define STORE_F_STORE_ATTR_INFO_SET_CSTR 147 -#define STORE_F_STORE_ATTR_INFO_SET_DN 148 -#define STORE_F_STORE_ATTR_INFO_SET_NUMBER 149 -#define STORE_F_STORE_ATTR_INFO_SET_SHA1STR 150 -#define STORE_F_STORE_CERTIFICATE 170 -#define STORE_F_STORE_CTRL 161 -#define STORE_F_STORE_DELETE_ARBITRARY 158 -#define STORE_F_STORE_DELETE_CERTIFICATE 102 -#define STORE_F_STORE_DELETE_CRL 103 -#define STORE_F_STORE_DELETE_NUMBER 104 -#define STORE_F_STORE_DELETE_PRIVATE_KEY 105 -#define STORE_F_STORE_DELETE_PUBLIC_KEY 106 -#define STORE_F_STORE_GENERATE_CRL 107 -#define STORE_F_STORE_GENERATE_KEY 108 -#define STORE_F_STORE_GET_ARBITRARY 159 -#define STORE_F_STORE_GET_CERTIFICATE 109 -#define STORE_F_STORE_GET_CRL 110 -#define STORE_F_STORE_GET_NUMBER 111 -#define STORE_F_STORE_GET_PRIVATE_KEY 112 -#define STORE_F_STORE_GET_PUBLIC_KEY 113 -#define STORE_F_STORE_LIST_CERTIFICATE_END 114 -#define STORE_F_STORE_LIST_CERTIFICATE_ENDP 153 -#define STORE_F_STORE_LIST_CERTIFICATE_NEXT 115 -#define STORE_F_STORE_LIST_CERTIFICATE_START 116 -#define STORE_F_STORE_LIST_CRL_END 117 -#define STORE_F_STORE_LIST_CRL_ENDP 154 -#define STORE_F_STORE_LIST_CRL_NEXT 118 -#define STORE_F_STORE_LIST_CRL_START 119 -#define STORE_F_STORE_LIST_PRIVATE_KEY_END 120 -#define STORE_F_STORE_LIST_PRIVATE_KEY_ENDP 155 -#define STORE_F_STORE_LIST_PRIVATE_KEY_NEXT 121 -#define STORE_F_STORE_LIST_PRIVATE_KEY_START 122 -#define STORE_F_STORE_LIST_PUBLIC_KEY_END 123 -#define STORE_F_STORE_LIST_PUBLIC_KEY_ENDP 156 -#define STORE_F_STORE_LIST_PUBLIC_KEY_NEXT 124 -#define STORE_F_STORE_LIST_PUBLIC_KEY_START 125 -#define STORE_F_STORE_MODIFY_ARBITRARY 162 -#define STORE_F_STORE_MODIFY_CERTIFICATE 163 -#define STORE_F_STORE_MODIFY_CRL 164 -#define STORE_F_STORE_MODIFY_NUMBER 165 -#define STORE_F_STORE_MODIFY_PRIVATE_KEY 166 -#define STORE_F_STORE_MODIFY_PUBLIC_KEY 167 -#define STORE_F_STORE_NEW_ENGINE 133 -#define STORE_F_STORE_NEW_METHOD 132 -#define STORE_F_STORE_PARSE_ATTRS_END 151 -#define STORE_F_STORE_PARSE_ATTRS_ENDP 172 -#define STORE_F_STORE_PARSE_ATTRS_NEXT 152 -#define STORE_F_STORE_PARSE_ATTRS_START 171 -#define STORE_F_STORE_REVOKE_CERTIFICATE 129 -#define STORE_F_STORE_REVOKE_PRIVATE_KEY 130 -#define STORE_F_STORE_REVOKE_PUBLIC_KEY 131 -#define STORE_F_STORE_STORE_ARBITRARY 157 -#define STORE_F_STORE_STORE_CERTIFICATE 100 -#define STORE_F_STORE_STORE_CRL 101 -#define STORE_F_STORE_STORE_NUMBER 126 -#define STORE_F_STORE_STORE_PRIVATE_KEY 127 -#define STORE_F_STORE_STORE_PUBLIC_KEY 128 - -/* Reason codes. */ -#define STORE_R_ALREADY_HAS_A_VALUE 127 -#define STORE_R_FAILED_DELETING_ARBITRARY 132 -#define STORE_R_FAILED_DELETING_CERTIFICATE 100 -#define STORE_R_FAILED_DELETING_KEY 101 -#define STORE_R_FAILED_DELETING_NUMBER 102 -#define STORE_R_FAILED_GENERATING_CRL 103 -#define STORE_R_FAILED_GENERATING_KEY 104 -#define STORE_R_FAILED_GETTING_ARBITRARY 133 -#define STORE_R_FAILED_GETTING_CERTIFICATE 105 -#define STORE_R_FAILED_GETTING_KEY 106 -#define STORE_R_FAILED_GETTING_NUMBER 107 -#define STORE_R_FAILED_LISTING_CERTIFICATES 108 -#define STORE_R_FAILED_LISTING_KEYS 109 -#define STORE_R_FAILED_MODIFYING_ARBITRARY 138 -#define STORE_R_FAILED_MODIFYING_CERTIFICATE 139 -#define STORE_R_FAILED_MODIFYING_CRL 140 -#define STORE_R_FAILED_MODIFYING_NUMBER 141 -#define STORE_R_FAILED_MODIFYING_PRIVATE_KEY 142 -#define STORE_R_FAILED_MODIFYING_PUBLIC_KEY 143 -#define STORE_R_FAILED_REVOKING_CERTIFICATE 110 -#define STORE_R_FAILED_REVOKING_KEY 111 -#define STORE_R_FAILED_STORING_ARBITRARY 134 -#define STORE_R_FAILED_STORING_CERTIFICATE 112 -#define STORE_R_FAILED_STORING_KEY 113 -#define STORE_R_FAILED_STORING_NUMBER 114 -#define STORE_R_NOT_IMPLEMENTED 128 -#define STORE_R_NO_CONTROL_FUNCTION 144 -#define STORE_R_NO_DELETE_ARBITRARY_FUNCTION 135 -#define STORE_R_NO_DELETE_NUMBER_FUNCTION 115 -#define STORE_R_NO_DELETE_OBJECT_FUNCTION 116 -#define STORE_R_NO_GENERATE_CRL_FUNCTION 117 -#define STORE_R_NO_GENERATE_OBJECT_FUNCTION 118 -#define STORE_R_NO_GET_OBJECT_ARBITRARY_FUNCTION 136 -#define STORE_R_NO_GET_OBJECT_FUNCTION 119 -#define STORE_R_NO_GET_OBJECT_NUMBER_FUNCTION 120 -#define STORE_R_NO_LIST_OBJECT_ENDP_FUNCTION 131 -#define STORE_R_NO_LIST_OBJECT_END_FUNCTION 121 -#define STORE_R_NO_LIST_OBJECT_NEXT_FUNCTION 122 -#define STORE_R_NO_LIST_OBJECT_START_FUNCTION 123 -#define STORE_R_NO_MODIFY_OBJECT_FUNCTION 145 -#define STORE_R_NO_REVOKE_OBJECT_FUNCTION 124 -#define STORE_R_NO_STORE 129 -#define STORE_R_NO_STORE_OBJECT_ARBITRARY_FUNCTION 137 -#define STORE_R_NO_STORE_OBJECT_FUNCTION 125 -#define STORE_R_NO_STORE_OBJECT_NUMBER_FUNCTION 126 -#define STORE_R_NO_VALUE 130 - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/symhacks.h b/externals/openssl/symhacks.h deleted file mode 100644 index 8728e6124d..0000000000 --- a/externals/openssl/symhacks.h +++ /dev/null @@ -1,409 +0,0 @@ -/* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_SYMHACKS_H -#define HEADER_SYMHACKS_H - -#include - -/* Hacks to solve the problem with linkers incapable of handling very long - symbol names. In the case of VMS, the limit is 31 characters on VMS for - VAX. */ -#ifdef OPENSSL_SYS_VMS - -/* Hack a long name in crypto/cryptlib.c */ -#undef int_CRYPTO_set_do_dynlock_callback -#define int_CRYPTO_set_do_dynlock_callback int_CRYPTO_set_do_dynlock_cb - -/* Hack a long name in crypto/ex_data.c */ -#undef CRYPTO_get_ex_data_implementation -#define CRYPTO_get_ex_data_implementation CRYPTO_get_ex_data_impl -#undef CRYPTO_set_ex_data_implementation -#define CRYPTO_set_ex_data_implementation CRYPTO_set_ex_data_impl - -/* Hack a long name in crypto/asn1/a_mbstr.c */ -#undef ASN1_STRING_set_default_mask_asc -#define ASN1_STRING_set_default_mask_asc ASN1_STRING_set_def_mask_asc - -#if 0 /* No longer needed, since safestack macro magic does the job */ -/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO) */ -#undef i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO -#define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO i2d_ASN1_SET_OF_PKCS7_SIGINF -#undef d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO -#define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO d2i_ASN1_SET_OF_PKCS7_SIGINF -#endif - -#if 0 /* No longer needed, since safestack macro magic does the job */ -/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO) */ -#undef i2d_ASN1_SET_OF_PKCS7_RECIP_INFO -#define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO i2d_ASN1_SET_OF_PKCS7_RECINF -#undef d2i_ASN1_SET_OF_PKCS7_RECIP_INFO -#define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO d2i_ASN1_SET_OF_PKCS7_RECINF -#endif - -#if 0 /* No longer needed, since safestack macro magic does the job */ -/* Hack the names created with DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) */ -#undef i2d_ASN1_SET_OF_ACCESS_DESCRIPTION -#define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION i2d_ASN1_SET_OF_ACC_DESC -#undef d2i_ASN1_SET_OF_ACCESS_DESCRIPTION -#define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION d2i_ASN1_SET_OF_ACC_DESC -#endif - -/* Hack the names created with DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE) */ -#undef PEM_read_NETSCAPE_CERT_SEQUENCE -#define PEM_read_NETSCAPE_CERT_SEQUENCE PEM_read_NS_CERT_SEQ -#undef PEM_write_NETSCAPE_CERT_SEQUENCE -#define PEM_write_NETSCAPE_CERT_SEQUENCE PEM_write_NS_CERT_SEQ -#undef PEM_read_bio_NETSCAPE_CERT_SEQUENCE -#define PEM_read_bio_NETSCAPE_CERT_SEQUENCE PEM_read_bio_NS_CERT_SEQ -#undef PEM_write_bio_NETSCAPE_CERT_SEQUENCE -#define PEM_write_bio_NETSCAPE_CERT_SEQUENCE PEM_write_bio_NS_CERT_SEQ -#undef PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE -#define PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE PEM_write_cb_bio_NS_CERT_SEQ - -/* Hack the names created with DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO) */ -#undef PEM_read_PKCS8_PRIV_KEY_INFO -#define PEM_read_PKCS8_PRIV_KEY_INFO PEM_read_P8_PRIV_KEY_INFO -#undef PEM_write_PKCS8_PRIV_KEY_INFO -#define PEM_write_PKCS8_PRIV_KEY_INFO PEM_write_P8_PRIV_KEY_INFO -#undef PEM_read_bio_PKCS8_PRIV_KEY_INFO -#define PEM_read_bio_PKCS8_PRIV_KEY_INFO PEM_read_bio_P8_PRIV_KEY_INFO -#undef PEM_write_bio_PKCS8_PRIV_KEY_INFO -#define PEM_write_bio_PKCS8_PRIV_KEY_INFO PEM_write_bio_P8_PRIV_KEY_INFO -#undef PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO -#define PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO PEM_wrt_cb_bio_P8_PRIV_KEY_INFO - -/* Hack other PEM names */ -#undef PEM_write_bio_PKCS8PrivateKey_nid -#define PEM_write_bio_PKCS8PrivateKey_nid PEM_write_bio_PKCS8PrivKey_nid - -/* Hack some long X509 names */ -#undef X509_REVOKED_get_ext_by_critical -#define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic -#undef X509_policy_tree_get0_user_policies -#define X509_policy_tree_get0_user_policies X509_pcy_tree_get0_usr_policies -#undef X509_policy_node_get0_qualifiers -#define X509_policy_node_get0_qualifiers X509_pcy_node_get0_qualifiers -#undef X509_STORE_CTX_get_explicit_policy -#define X509_STORE_CTX_get_explicit_policy X509_STORE_CTX_get_expl_policy - -/* Hack some long CRYPTO names */ -#undef CRYPTO_set_dynlock_destroy_callback -#define CRYPTO_set_dynlock_destroy_callback CRYPTO_set_dynlock_destroy_cb -#undef CRYPTO_set_dynlock_create_callback -#define CRYPTO_set_dynlock_create_callback CRYPTO_set_dynlock_create_cb -#undef CRYPTO_set_dynlock_lock_callback -#define CRYPTO_set_dynlock_lock_callback CRYPTO_set_dynlock_lock_cb -#undef CRYPTO_get_dynlock_lock_callback -#define CRYPTO_get_dynlock_lock_callback CRYPTO_get_dynlock_lock_cb -#undef CRYPTO_get_dynlock_destroy_callback -#define CRYPTO_get_dynlock_destroy_callback CRYPTO_get_dynlock_destroy_cb -#undef CRYPTO_get_dynlock_create_callback -#define CRYPTO_get_dynlock_create_callback CRYPTO_get_dynlock_create_cb -#undef CRYPTO_set_locked_mem_ex_functions -#define CRYPTO_set_locked_mem_ex_functions CRYPTO_set_locked_mem_ex_funcs -#undef CRYPTO_get_locked_mem_ex_functions -#define CRYPTO_get_locked_mem_ex_functions CRYPTO_get_locked_mem_ex_funcs - -/* Hack some long SSL names */ -#undef SSL_CTX_set_default_verify_paths -#define SSL_CTX_set_default_verify_paths SSL_CTX_set_def_verify_paths -#undef SSL_get_ex_data_X509_STORE_CTX_idx -#define SSL_get_ex_data_X509_STORE_CTX_idx SSL_get_ex_d_X509_STORE_CTX_idx -#undef SSL_add_file_cert_subjects_to_stack -#define SSL_add_file_cert_subjects_to_stack SSL_add_file_cert_subjs_to_stk -#undef SSL_add_dir_cert_subjects_to_stack -#define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_subjs_to_stk -#undef SSL_CTX_use_certificate_chain_file -#define SSL_CTX_use_certificate_chain_file SSL_CTX_use_cert_chain_file -#undef SSL_CTX_set_cert_verify_callback -#define SSL_CTX_set_cert_verify_callback SSL_CTX_set_cert_verify_cb -#undef SSL_CTX_set_default_passwd_cb_userdata -#define SSL_CTX_set_default_passwd_cb_userdata SSL_CTX_set_def_passwd_cb_ud -#undef SSL_COMP_get_compression_methods -#define SSL_COMP_get_compression_methods SSL_COMP_get_compress_methods - -/* Hack some long ENGINE names */ -#undef ENGINE_get_default_BN_mod_exp_crt -#define ENGINE_get_default_BN_mod_exp_crt ENGINE_get_def_BN_mod_exp_crt -#undef ENGINE_set_default_BN_mod_exp_crt -#define ENGINE_set_default_BN_mod_exp_crt ENGINE_set_def_BN_mod_exp_crt -#undef ENGINE_set_load_privkey_function -#define ENGINE_set_load_privkey_function ENGINE_set_load_privkey_fn -#undef ENGINE_get_load_privkey_function -#define ENGINE_get_load_privkey_function ENGINE_get_load_privkey_fn -#undef ENGINE_set_load_ssl_client_cert_function -#define ENGINE_set_load_ssl_client_cert_function \ - ENGINE_set_ld_ssl_clnt_cert_fn -#undef ENGINE_get_ssl_client_cert_function -#define ENGINE_get_ssl_client_cert_function ENGINE_get_ssl_client_cert_fn - -/* Hack some long OCSP names */ -#undef OCSP_REQUEST_get_ext_by_critical -#define OCSP_REQUEST_get_ext_by_critical OCSP_REQUEST_get_ext_by_crit -#undef OCSP_BASICRESP_get_ext_by_critical -#define OCSP_BASICRESP_get_ext_by_critical OCSP_BASICRESP_get_ext_by_crit -#undef OCSP_SINGLERESP_get_ext_by_critical -#define OCSP_SINGLERESP_get_ext_by_critical OCSP_SINGLERESP_get_ext_by_crit - -/* Hack some long DES names */ -#undef _ossl_old_des_ede3_cfb64_encrypt -#define _ossl_old_des_ede3_cfb64_encrypt _ossl_odes_ede3_cfb64_encrypt -#undef _ossl_old_des_ede3_ofb64_encrypt -#define _ossl_old_des_ede3_ofb64_encrypt _ossl_odes_ede3_ofb64_encrypt - -/* Hack some long EVP names */ -#undef OPENSSL_add_all_algorithms_noconf -#define OPENSSL_add_all_algorithms_noconf OPENSSL_add_all_algo_noconf -#undef OPENSSL_add_all_algorithms_conf -#define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf - -/* Hack some long EC names */ -#undef EC_GROUP_set_point_conversion_form -#define EC_GROUP_set_point_conversion_form EC_GROUP_set_point_conv_form -#undef EC_GROUP_get_point_conversion_form -#define EC_GROUP_get_point_conversion_form EC_GROUP_get_point_conv_form -#undef EC_GROUP_clear_free_all_extra_data -#define EC_GROUP_clear_free_all_extra_data EC_GROUP_clr_free_all_xtra_data -#undef EC_POINT_set_Jprojective_coordinates_GFp -#define EC_POINT_set_Jprojective_coordinates_GFp \ - EC_POINT_set_Jproj_coords_GFp -#undef EC_POINT_get_Jprojective_coordinates_GFp -#define EC_POINT_get_Jprojective_coordinates_GFp \ - EC_POINT_get_Jproj_coords_GFp -#undef EC_POINT_set_affine_coordinates_GFp -#define EC_POINT_set_affine_coordinates_GFp EC_POINT_set_affine_coords_GFp -#undef EC_POINT_get_affine_coordinates_GFp -#define EC_POINT_get_affine_coordinates_GFp EC_POINT_get_affine_coords_GFp -#undef EC_POINT_set_compressed_coordinates_GFp -#define EC_POINT_set_compressed_coordinates_GFp EC_POINT_set_compr_coords_GFp -#undef EC_POINT_set_affine_coordinates_GF2m -#define EC_POINT_set_affine_coordinates_GF2m EC_POINT_set_affine_coords_GF2m -#undef EC_POINT_get_affine_coordinates_GF2m -#define EC_POINT_get_affine_coordinates_GF2m EC_POINT_get_affine_coords_GF2m -#undef EC_POINT_set_compressed_coordinates_GF2m -#define EC_POINT_set_compressed_coordinates_GF2m \ - EC_POINT_set_compr_coords_GF2m -#undef ec_GF2m_simple_group_clear_finish -#define ec_GF2m_simple_group_clear_finish ec_GF2m_simple_grp_clr_finish -#undef ec_GF2m_simple_group_check_discriminant -#define ec_GF2m_simple_group_check_discriminant ec_GF2m_simple_grp_chk_discrim -#undef ec_GF2m_simple_point_clear_finish -#define ec_GF2m_simple_point_clear_finish ec_GF2m_simple_pt_clr_finish -#undef ec_GF2m_simple_point_set_to_infinity -#define ec_GF2m_simple_point_set_to_infinity ec_GF2m_simple_pt_set_to_inf -#undef ec_GF2m_simple_points_make_affine -#define ec_GF2m_simple_points_make_affine ec_GF2m_simple_pts_make_affine -#undef ec_GF2m_simple_point_set_affine_coordinates -#define ec_GF2m_simple_point_set_affine_coordinates \ - ec_GF2m_smp_pt_set_af_coords -#undef ec_GF2m_simple_point_get_affine_coordinates -#define ec_GF2m_simple_point_get_affine_coordinates \ - ec_GF2m_smp_pt_get_af_coords -#undef ec_GF2m_simple_set_compressed_coordinates -#define ec_GF2m_simple_set_compressed_coordinates \ - ec_GF2m_smp_set_compr_coords -#undef ec_GFp_simple_group_set_curve_GFp -#define ec_GFp_simple_group_set_curve_GFp ec_GFp_simple_grp_set_curve_GFp -#undef ec_GFp_simple_group_get_curve_GFp -#define ec_GFp_simple_group_get_curve_GFp ec_GFp_simple_grp_get_curve_GFp -#undef ec_GFp_simple_group_clear_finish -#define ec_GFp_simple_group_clear_finish ec_GFp_simple_grp_clear_finish -#undef ec_GFp_simple_group_set_generator -#define ec_GFp_simple_group_set_generator ec_GFp_simple_grp_set_generator -#undef ec_GFp_simple_group_get0_generator -#define ec_GFp_simple_group_get0_generator ec_GFp_simple_grp_gt0_generator -#undef ec_GFp_simple_group_get_cofactor -#define ec_GFp_simple_group_get_cofactor ec_GFp_simple_grp_get_cofactor -#undef ec_GFp_simple_point_clear_finish -#define ec_GFp_simple_point_clear_finish ec_GFp_simple_pt_clear_finish -#undef ec_GFp_simple_point_set_to_infinity -#define ec_GFp_simple_point_set_to_infinity ec_GFp_simple_pt_set_to_inf -#undef ec_GFp_simple_points_make_affine -#define ec_GFp_simple_points_make_affine ec_GFp_simple_pts_make_affine -#undef ec_GFp_simple_group_get_curve_GFp -#define ec_GFp_simple_group_get_curve_GFp ec_GFp_simple_grp_get_curve_GFp -#undef ec_GFp_simple_set_Jprojective_coordinates_GFp -#define ec_GFp_simple_set_Jprojective_coordinates_GFp \ - ec_GFp_smp_set_Jproj_coords_GFp -#undef ec_GFp_simple_get_Jprojective_coordinates_GFp -#define ec_GFp_simple_get_Jprojective_coordinates_GFp \ - ec_GFp_smp_get_Jproj_coords_GFp -#undef ec_GFp_simple_point_set_affine_coordinates_GFp -#define ec_GFp_simple_point_set_affine_coordinates_GFp \ - ec_GFp_smp_pt_set_af_coords_GFp -#undef ec_GFp_simple_point_get_affine_coordinates_GFp -#define ec_GFp_simple_point_get_affine_coordinates_GFp \ - ec_GFp_smp_pt_get_af_coords_GFp -#undef ec_GFp_simple_set_compressed_coordinates_GFp -#define ec_GFp_simple_set_compressed_coordinates_GFp \ - ec_GFp_smp_set_compr_coords_GFp -#undef ec_GFp_simple_point_set_affine_coordinates -#define ec_GFp_simple_point_set_affine_coordinates \ - ec_GFp_smp_pt_set_af_coords -#undef ec_GFp_simple_point_get_affine_coordinates -#define ec_GFp_simple_point_get_affine_coordinates \ - ec_GFp_smp_pt_get_af_coords -#undef ec_GFp_simple_set_compressed_coordinates -#define ec_GFp_simple_set_compressed_coordinates \ - ec_GFp_smp_set_compr_coords -#undef ec_GFp_simple_group_check_discriminant -#define ec_GFp_simple_group_check_discriminant ec_GFp_simple_grp_chk_discrim - -/* Hack som long STORE names */ -#undef STORE_method_set_initialise_function -#define STORE_method_set_initialise_function STORE_meth_set_initialise_fn -#undef STORE_method_set_cleanup_function -#define STORE_method_set_cleanup_function STORE_meth_set_cleanup_fn -#undef STORE_method_set_generate_function -#define STORE_method_set_generate_function STORE_meth_set_generate_fn -#undef STORE_method_set_modify_function -#define STORE_method_set_modify_function STORE_meth_set_modify_fn -#undef STORE_method_set_revoke_function -#define STORE_method_set_revoke_function STORE_meth_set_revoke_fn -#undef STORE_method_set_delete_function -#define STORE_method_set_delete_function STORE_meth_set_delete_fn -#undef STORE_method_set_list_start_function -#define STORE_method_set_list_start_function STORE_meth_set_list_start_fn -#undef STORE_method_set_list_next_function -#define STORE_method_set_list_next_function STORE_meth_set_list_next_fn -#undef STORE_method_set_list_end_function -#define STORE_method_set_list_end_function STORE_meth_set_list_end_fn -#undef STORE_method_set_update_store_function -#define STORE_method_set_update_store_function STORE_meth_set_update_store_fn -#undef STORE_method_set_lock_store_function -#define STORE_method_set_lock_store_function STORE_meth_set_lock_store_fn -#undef STORE_method_set_unlock_store_function -#define STORE_method_set_unlock_store_function STORE_meth_set_unlock_store_fn -#undef STORE_method_get_initialise_function -#define STORE_method_get_initialise_function STORE_meth_get_initialise_fn -#undef STORE_method_get_cleanup_function -#define STORE_method_get_cleanup_function STORE_meth_get_cleanup_fn -#undef STORE_method_get_generate_function -#define STORE_method_get_generate_function STORE_meth_get_generate_fn -#undef STORE_method_get_modify_function -#define STORE_method_get_modify_function STORE_meth_get_modify_fn -#undef STORE_method_get_revoke_function -#define STORE_method_get_revoke_function STORE_meth_get_revoke_fn -#undef STORE_method_get_delete_function -#define STORE_method_get_delete_function STORE_meth_get_delete_fn -#undef STORE_method_get_list_start_function -#define STORE_method_get_list_start_function STORE_meth_get_list_start_fn -#undef STORE_method_get_list_next_function -#define STORE_method_get_list_next_function STORE_meth_get_list_next_fn -#undef STORE_method_get_list_end_function -#define STORE_method_get_list_end_function STORE_meth_get_list_end_fn -#undef STORE_method_get_update_store_function -#define STORE_method_get_update_store_function STORE_meth_get_update_store_fn -#undef STORE_method_get_lock_store_function -#define STORE_method_get_lock_store_function STORE_meth_get_lock_store_fn -#undef STORE_method_get_unlock_store_function -#define STORE_method_get_unlock_store_function STORE_meth_get_unlock_store_fn - -/* Hack some long CMS names */ -#undef CMS_RecipientInfo_ktri_get0_algs -#define CMS_RecipientInfo_ktri_get0_algs CMS_RecipInfo_ktri_get0_algs -#undef CMS_RecipientInfo_ktri_get0_signer_id -#define CMS_RecipientInfo_ktri_get0_signer_id CMS_RecipInfo_ktri_get0_sigr_id -#undef CMS_OtherRevocationInfoFormat_it -#define CMS_OtherRevocationInfoFormat_it CMS_OtherRevocInfoFormat_it -#undef CMS_KeyAgreeRecipientIdentifier_it -#define CMS_KeyAgreeRecipientIdentifier_it CMS_KeyAgreeRecipIdentifier_it -#undef CMS_OriginatorIdentifierOrKey_it -#define CMS_OriginatorIdentifierOrKey_it CMS_OriginatorIdOrKey_it -#undef cms_SignerIdentifier_get0_signer_id -#define cms_SignerIdentifier_get0_signer_id cms_SignerId_get0_signer_id - -#endif /* defined OPENSSL_SYS_VMS */ - - -/* Case insensiteve linking causes problems.... */ -#if defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_OS2) -#undef ERR_load_CRYPTO_strings -#define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings -#undef OCSP_crlID_new -#define OCSP_crlID_new OCSP_crlID2_new - -#undef d2i_ECPARAMETERS -#define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS -#undef i2d_ECPARAMETERS -#define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS -#undef d2i_ECPKPARAMETERS -#define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS -#undef i2d_ECPKPARAMETERS -#define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS - -/* These functions do not seem to exist! However, I'm paranoid... - Original command in x509v3.h: - These functions are being redefined in another directory, - and clash when the linker is case-insensitive, so let's - hide them a little, by giving them an extra 'o' at the - beginning of the name... */ -#undef X509v3_cleanup_extensions -#define X509v3_cleanup_extensions oX509v3_cleanup_extensions -#undef X509v3_add_extension -#define X509v3_add_extension oX509v3_add_extension -#undef X509v3_add_netscape_extensions -#define X509v3_add_netscape_extensions oX509v3_add_netscape_extensions -#undef X509v3_add_standard_extensions -#define X509v3_add_standard_extensions oX509v3_add_standard_extensions - - -#endif - - -#endif /* ! defined HEADER_VMS_IDHACKS_H */ -/* This one clashes with CMS_data_create */ -#undef cms_Data_create -#define cms_Data_create priv_cms_Data_create diff --git a/externals/openssl/tls1.h b/externals/openssl/tls1.h deleted file mode 100644 index 2d1d293e1a..0000000000 --- a/externals/openssl/tls1.h +++ /dev/null @@ -1,407 +0,0 @@ -/* ssl/tls1.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * - * Portions of the attached software ("Contribution") are developed by - * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. - * - * The Contribution is licensed pursuant to the OpenSSL open source - * license provided above. - * - * ECC cipher suite support in OpenSSL originally written by - * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. - * - */ - -#ifndef HEADER_TLS1_H -#define HEADER_TLS1_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES 0 - -#define TLS1_VERSION 0x0301 -#define TLS1_VERSION_MAJOR 0x03 -#define TLS1_VERSION_MINOR 0x01 - -#define TLS1_AD_DECRYPTION_FAILED 21 -#define TLS1_AD_RECORD_OVERFLOW 22 -#define TLS1_AD_UNKNOWN_CA 48 /* fatal */ -#define TLS1_AD_ACCESS_DENIED 49 /* fatal */ -#define TLS1_AD_DECODE_ERROR 50 /* fatal */ -#define TLS1_AD_DECRYPT_ERROR 51 -#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */ -#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */ -#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */ -#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */ -#define TLS1_AD_USER_CANCELLED 90 -#define TLS1_AD_NO_RENEGOTIATION 100 -/* codes 110-114 are from RFC3546 */ -#define TLS1_AD_UNSUPPORTED_EXTENSION 110 -#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111 -#define TLS1_AD_UNRECOGNIZED_NAME 112 -#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113 -#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114 -#define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */ - -/* ExtensionType values from RFC 3546 */ -#define TLSEXT_TYPE_server_name 0 -#define TLSEXT_TYPE_max_fragment_length 1 -#define TLSEXT_TYPE_client_certificate_url 2 -#define TLSEXT_TYPE_trusted_ca_keys 3 -#define TLSEXT_TYPE_truncated_hmac 4 -#define TLSEXT_TYPE_status_request 5 -#define TLSEXT_TYPE_elliptic_curves 10 -#define TLSEXT_TYPE_ec_point_formats 11 -#define TLSEXT_TYPE_session_ticket 35 - -/* NameType value from RFC 3546 */ -#define TLSEXT_NAMETYPE_host_name 0 -/* status request value from RFC 3546 */ -#define TLSEXT_STATUSTYPE_ocsp 1 - -#ifndef OPENSSL_NO_TLSEXT - -#define TLSEXT_MAXLEN_host_name 255 - -const char *SSL_get_servername(const SSL *s, const int type) ; -int SSL_get_servername_type(const SSL *s) ; - -#define SSL_set_tlsext_host_name(s,name) \ -SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,(char *)name) - -#define SSL_set_tlsext_debug_callback(ssl, cb) \ -SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,(void (*)(void))cb) - -#define SSL_set_tlsext_debug_arg(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0, (void *)arg) - -#define SSL_set_tlsext_status_type(ssl, type) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type, NULL) - -#define SSL_get_tlsext_status_exts(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg) - -#define SSL_set_tlsext_status_exts(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg) - -#define SSL_get_tlsext_status_ids(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg) - -#define SSL_set_tlsext_status_ids(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg) - -#define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0, (void *)arg) - -#define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen, (void *)arg) - -#define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \ -SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb) - -#define SSL_TLSEXT_ERR_OK 0 -#define SSL_TLSEXT_ERR_ALERT_WARNING 1 -#define SSL_TLSEXT_ERR_ALERT_FATAL 2 -#define SSL_TLSEXT_ERR_NOACK 3 - -#define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \ -SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg) - -#define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLXEXT_TICKET_KEYS,(keylen),(keys)) -#define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLXEXT_TICKET_KEYS,(keylen),(keys)) - -#define SSL_CTX_set_tlsext_status_cb(ssl, cb) \ -SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb) - -#define SSL_CTX_set_tlsext_status_arg(ssl, arg) \ -SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg) - -#define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ -SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) - -#endif - -/* Additional TLS ciphersuites from draft-ietf-tls-56-bit-ciphersuites-00.txt - * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see - * s3_lib.c). We actually treat them like SSL 3.0 ciphers, which we probably - * shouldn't. */ -#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 -#define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 -#define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 -#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x03000063 -#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA 0x03000064 -#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065 -#define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066 - -/* AES ciphersuites from RFC3268 */ - -#define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F -#define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030 -#define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031 -#define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032 -#define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033 -#define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034 - -#define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035 -#define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036 -#define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037 -#define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038 -#define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039 -#define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A - -/* Camellia ciphersuites from RFC4132 */ -#define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000041 -#define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000042 -#define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000043 -#define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000044 -#define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000045 -#define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA 0x03000046 - -#define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000084 -#define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000085 -#define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000086 -#define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000087 -#define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000088 -#define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA 0x03000089 - -/* SEED ciphersuites from RFC4162 */ -#define TLS1_CK_RSA_WITH_SEED_SHA 0x03000096 -#define TLS1_CK_DH_DSS_WITH_SEED_SHA 0x03000097 -#define TLS1_CK_DH_RSA_WITH_SEED_SHA 0x03000098 -#define TLS1_CK_DHE_DSS_WITH_SEED_SHA 0x03000099 -#define TLS1_CK_DHE_RSA_WITH_SEED_SHA 0x0300009A -#define TLS1_CK_ADH_WITH_SEED_SHA 0x0300009B - -/* ECC ciphersuites from draft-ietf-tls-ecc-12.txt with changes soon to be in draft 13 */ -#define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001 -#define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002 -#define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003 -#define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004 -#define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005 - -#define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006 -#define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007 -#define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008 -#define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009 -#define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A - -#define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B -#define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C -#define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D -#define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E -#define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F - -#define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010 -#define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011 -#define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012 -#define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013 -#define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014 - -#define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015 -#define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016 -#define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017 -#define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018 -#define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019 - -/* XXX - * Inconsistency alert: - * The OpenSSL names of ciphers with ephemeral DH here include the string - * "DHE", while elsewhere it has always been "EDH". - * (The alias for the list of all such ciphers also is "EDH".) - * The specifications speak of "EDH"; maybe we should allow both forms - * for everything. */ -#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5" -#define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5" -#define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA" -#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DHE-DSS-DES-CBC-SHA" -#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA "EXP1024-RC4-SHA" -#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA "EXP1024-DHE-DSS-RC4-SHA" -#define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA" - -/* AES ciphersuites from RFC3268 */ -#define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA" -#define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA" -#define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA" -#define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA" -#define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA" -#define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA" - -#define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA" -#define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA" -#define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA" -#define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA" -#define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA" -#define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA" - -/* ECC ciphersuites from draft-ietf-tls-ecc-01.txt (Mar 15, 2001) */ -#define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA" -#define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA" -#define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA" -#define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA" -#define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA" - -#define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA" -#define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA" -#define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA" -#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA" -#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA" - -#define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA" -#define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA" -#define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA" -#define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA" -#define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA" - -#define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA" -#define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA" -#define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA" -#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA" -#define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA" - -#define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA" -#define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA" -#define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA" -#define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA" -#define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA" - -/* Camellia ciphersuites from RFC4132 */ -#define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA" -#define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA" -#define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA "DH-RSA-CAMELLIA128-SHA" -#define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "DHE-DSS-CAMELLIA128-SHA" -#define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "DHE-RSA-CAMELLIA128-SHA" -#define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA "ADH-CAMELLIA128-SHA" - -#define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA "CAMELLIA256-SHA" -#define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA "DH-DSS-CAMELLIA256-SHA" -#define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA "DH-RSA-CAMELLIA256-SHA" -#define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "DHE-DSS-CAMELLIA256-SHA" -#define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "DHE-RSA-CAMELLIA256-SHA" -#define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA "ADH-CAMELLIA256-SHA" - -/* SEED ciphersuites from RFC4162 */ -#define TLS1_TXT_RSA_WITH_SEED_SHA "SEED-SHA" -#define TLS1_TXT_DH_DSS_WITH_SEED_SHA "DH-DSS-SEED-SHA" -#define TLS1_TXT_DH_RSA_WITH_SEED_SHA "DH-RSA-SEED-SHA" -#define TLS1_TXT_DHE_DSS_WITH_SEED_SHA "DHE-DSS-SEED-SHA" -#define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA" -#define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA" - -#define TLS_CT_RSA_SIGN 1 -#define TLS_CT_DSS_SIGN 2 -#define TLS_CT_RSA_FIXED_DH 3 -#define TLS_CT_DSS_FIXED_DH 4 -#define TLS_CT_ECDSA_SIGN 64 -#define TLS_CT_RSA_FIXED_ECDH 65 -#define TLS_CT_ECDSA_FIXED_ECDH 66 -#define TLS_CT_NUMBER 7 - -#define TLS1_FINISH_MAC_LENGTH 12 - -#define TLS_MD_MAX_CONST_SIZE 20 -#define TLS_MD_CLIENT_FINISH_CONST "client finished" -#define TLS_MD_CLIENT_FINISH_CONST_SIZE 15 -#define TLS_MD_SERVER_FINISH_CONST "server finished" -#define TLS_MD_SERVER_FINISH_CONST_SIZE 15 -#define TLS_MD_SERVER_WRITE_KEY_CONST "server write key" -#define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16 -#define TLS_MD_KEY_EXPANSION_CONST "key expansion" -#define TLS_MD_KEY_EXPANSION_CONST_SIZE 13 -#define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key" -#define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16 -#define TLS_MD_SERVER_WRITE_KEY_CONST "server write key" -#define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16 -#define TLS_MD_IV_BLOCK_CONST "IV block" -#define TLS_MD_IV_BLOCK_CONST_SIZE 8 -#define TLS_MD_MASTER_SECRET_CONST "master secret" -#define TLS_MD_MASTER_SECRET_CONST_SIZE 13 - -#ifdef CHARSET_EBCDIC -#undef TLS_MD_CLIENT_FINISH_CONST -#define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64" /*client finished*/ -#undef TLS_MD_SERVER_FINISH_CONST -#define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64" /*server finished*/ -#undef TLS_MD_SERVER_WRITE_KEY_CONST -#define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*server write key*/ -#undef TLS_MD_KEY_EXPANSION_CONST -#define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e" /*key expansion*/ -#undef TLS_MD_CLIENT_WRITE_KEY_CONST -#define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*client write key*/ -#undef TLS_MD_SERVER_WRITE_KEY_CONST -#define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*server write key*/ -#undef TLS_MD_IV_BLOCK_CONST -#define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b" /*IV block*/ -#undef TLS_MD_MASTER_SECRET_CONST -#define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" /*master secret*/ -#endif - -#ifdef __cplusplus -} -#endif -#endif - - - diff --git a/externals/openssl/tmdiff.h b/externals/openssl/tmdiff.h deleted file mode 100644 index 0409edbaac..0000000000 --- a/externals/openssl/tmdiff.h +++ /dev/null @@ -1,94 +0,0 @@ -/* crypto/tmdiff.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -/* Header for dynamic hash table routines - * Author - Eric Young - */ -/* ... erm yeah, "dynamic hash tables" you say? - * - * And what would dynamic hash tables have to do with any of this code *now*? - * AFAICS, this code is only referenced by crypto/bn/exp.c which is an unused - * file that I doubt compiles any more. speed.c is the only thing that could - * use this (and it has nothing to do with hash tables), yet it instead has its - * own duplication of all this stuff and looks, if anything, more complete. See - * the corresponding note in apps/speed.c. - * The Bemused - Geoff - */ - -#ifndef HEADER_TMDIFF_H -#define HEADER_TMDIFF_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct ms_tm MS_TM; - -MS_TM *ms_time_new(void ); -void ms_time_free(MS_TM *a); -void ms_time_get(MS_TM *a); -double ms_time_diff(MS_TM *start, MS_TM *end); -int ms_time_cmp(const MS_TM *ap, const MS_TM *bp); - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/externals/openssl/txt_db.h b/externals/openssl/txt_db.h deleted file mode 100644 index e78ba87fa9..0000000000 --- a/externals/openssl/txt_db.h +++ /dev/null @@ -1,110 +0,0 @@ -/* crypto/txt_db/txt_db.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_TXT_DB_H -#define HEADER_TXT_DB_H - -#include -#ifndef OPENSSL_NO_BIO -#include -#endif -#include -#include - -#define DB_ERROR_OK 0 -#define DB_ERROR_MALLOC 1 -#define DB_ERROR_INDEX_CLASH 2 -#define DB_ERROR_INDEX_OUT_OF_RANGE 3 -#define DB_ERROR_NO_INDEX 4 -#define DB_ERROR_INSERT_INDEX_CLASH 5 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct txt_db_st - { - int num_fields; - STACK /* char ** */ *data; - LHASH **index; - int (**qual)(char **); - long error; - long arg1; - long arg2; - char **arg_row; - } TXT_DB; - -#ifndef OPENSSL_NO_BIO -TXT_DB *TXT_DB_read(BIO *in, int num); -long TXT_DB_write(BIO *out, TXT_DB *db); -#else -TXT_DB *TXT_DB_read(char *in, int num); -long TXT_DB_write(char *out, TXT_DB *db); -#endif -int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(char **), - LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); -void TXT_DB_free(TXT_DB *db); -char **TXT_DB_get_by_index(TXT_DB *db, int idx, char **value); -int TXT_DB_insert(TXT_DB *db,char **value); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/externals/openssl/ui.h b/externals/openssl/ui.h deleted file mode 100644 index 3a2f29e67e..0000000000 --- a/externals/openssl/ui.h +++ /dev/null @@ -1,382 +0,0 @@ -/* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ -/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL - * project 2001. - */ -/* ==================================================================== - * Copyright (c) 2001 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_UI_H -#define HEADER_UI_H - -#ifndef OPENSSL_NO_DEPRECATED -#include -#endif -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Declared already in ossl_typ.h */ -/* typedef struct ui_st UI; */ -/* typedef struct ui_method_st UI_METHOD; */ - - -/* All the following functions return -1 or NULL on error and in some cases - (UI_process()) -2 if interrupted or in some other way cancelled. - When everything is fine, they return 0, a positive value or a non-NULL - pointer, all depending on their purpose. */ - -/* Creators and destructor. */ -UI *UI_new(void); -UI *UI_new_method(const UI_METHOD *method); -void UI_free(UI *ui); - -/* The following functions are used to add strings to be printed and prompt - strings to prompt for data. The names are UI_{add,dup}__string - and UI_{add,dup}_input_boolean. - - UI_{add,dup}__string have the following meanings: - add add a text or prompt string. The pointers given to these - functions are used verbatim, no copying is done. - dup make a copy of the text or prompt string, then add the copy - to the collection of strings in the user interface. - - The function is a name for the functionality that the given - string shall be used for. It can be one of: - input use the string as data prompt. - verify use the string as verification prompt. This - is used to verify a previous input. - info use the string for informational output. - error use the string for error output. - Honestly, there's currently no difference between info and error for the - moment. - - UI_{add,dup}_input_boolean have the same semantics for "add" and "dup", - and are typically used when one wants to prompt for a yes/no response. - - - All of the functions in this group take a UI and a prompt string. - The string input and verify addition functions also take a flag argument, - a buffer for the result to end up with, a minimum input size and a maximum - input size (the result buffer MUST be large enough to be able to contain - the maximum number of characters). Additionally, the verify addition - functions takes another buffer to compare the result against. - The boolean input functions take an action description string (which should - be safe to ignore if the expected user action is obvious, for example with - a dialog box with an OK button and a Cancel button), a string of acceptable - characters to mean OK and to mean Cancel. The two last strings are checked - to make sure they don't have common characters. Additionally, the same - flag argument as for the string input is taken, as well as a result buffer. - The result buffer is required to be at least one byte long. Depending on - the answer, the first character from the OK or the Cancel character strings - will be stored in the first byte of the result buffer. No NUL will be - added, so the result is *not* a string. - - On success, the all return an index of the added information. That index - is usefull when retrieving results with UI_get0_result(). */ -int UI_add_input_string(UI *ui, const char *prompt, int flags, - char *result_buf, int minsize, int maxsize); -int UI_dup_input_string(UI *ui, const char *prompt, int flags, - char *result_buf, int minsize, int maxsize); -int UI_add_verify_string(UI *ui, const char *prompt, int flags, - char *result_buf, int minsize, int maxsize, const char *test_buf); -int UI_dup_verify_string(UI *ui, const char *prompt, int flags, - char *result_buf, int minsize, int maxsize, const char *test_buf); -int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc, - const char *ok_chars, const char *cancel_chars, - int flags, char *result_buf); -int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc, - const char *ok_chars, const char *cancel_chars, - int flags, char *result_buf); -int UI_add_info_string(UI *ui, const char *text); -int UI_dup_info_string(UI *ui, const char *text); -int UI_add_error_string(UI *ui, const char *text); -int UI_dup_error_string(UI *ui, const char *text); - -/* These are the possible flags. They can be or'ed together. */ -/* Use to have echoing of input */ -#define UI_INPUT_FLAG_ECHO 0x01 -/* Use a default password. Where that password is found is completely - up to the application, it might for example be in the user data set - with UI_add_user_data(). It is not recommended to have more than - one input in each UI being marked with this flag, or the application - might get confused. */ -#define UI_INPUT_FLAG_DEFAULT_PWD 0x02 - -/* The user of these routines may want to define flags of their own. The core - UI won't look at those, but will pass them on to the method routines. They - must use higher bits so they don't get confused with the UI bits above. - UI_INPUT_FLAG_USER_BASE tells which is the lowest bit to use. A good - example of use is this: - - #define MY_UI_FLAG1 (0x01 << UI_INPUT_FLAG_USER_BASE) - -*/ -#define UI_INPUT_FLAG_USER_BASE 16 - - -/* The following function helps construct a prompt. object_desc is a - textual short description of the object, for example "pass phrase", - and object_name is the name of the object (might be a card name or - a file name. - The returned string shall always be allocated on the heap with - OPENSSL_malloc(), and need to be free'd with OPENSSL_free(). - - If the ui_method doesn't contain a pointer to a user-defined prompt - constructor, a default string is built, looking like this: - - "Enter {object_desc} for {object_name}:" - - So, if object_desc has the value "pass phrase" and object_name has - the value "foo.key", the resulting string is: - - "Enter pass phrase for foo.key:" -*/ -char *UI_construct_prompt(UI *ui_method, - const char *object_desc, const char *object_name); - - -/* The following function is used to store a pointer to user-specific data. - Any previous such pointer will be returned and replaced. - - For callback purposes, this function makes a lot more sense than using - ex_data, since the latter requires that different parts of OpenSSL or - applications share the same ex_data index. - - Note that the UI_OpenSSL() method completely ignores the user data. - Other methods may not, however. */ -void *UI_add_user_data(UI *ui, void *user_data); -/* We need a user data retrieving function as well. */ -void *UI_get0_user_data(UI *ui); - -/* Return the result associated with a prompt given with the index i. */ -const char *UI_get0_result(UI *ui, int i); - -/* When all strings have been added, process the whole thing. */ -int UI_process(UI *ui); - -/* Give a user interface parametrised control commands. This can be used to - send down an integer, a data pointer or a function pointer, as well as - be used to get information from a UI. */ -int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f)(void)); - -/* The commands */ -/* Use UI_CONTROL_PRINT_ERRORS with the value 1 to have UI_process print the - OpenSSL error stack before printing any info or added error messages and - before any prompting. */ -#define UI_CTRL_PRINT_ERRORS 1 -/* Check if a UI_process() is possible to do again with the same instance of - a user interface. This makes UI_ctrl() return 1 if it is redoable, and 0 - if not. */ -#define UI_CTRL_IS_REDOABLE 2 - - -/* Some methods may use extra data */ -#define UI_set_app_data(s,arg) UI_set_ex_data(s,0,arg) -#define UI_get_app_data(s) UI_get_ex_data(s,0) -int UI_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int UI_set_ex_data(UI *r,int idx,void *arg); -void *UI_get_ex_data(UI *r, int idx); - -/* Use specific methods instead of the built-in one */ -void UI_set_default_method(const UI_METHOD *meth); -const UI_METHOD *UI_get_default_method(void); -const UI_METHOD *UI_get_method(UI *ui); -const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth); - -/* The method with all the built-in thingies */ -UI_METHOD *UI_OpenSSL(void); - - -/* ---------- For method writers ---------- */ -/* A method contains a number of functions that implement the low level - of the User Interface. The functions are: - - an opener This function starts a session, maybe by opening - a channel to a tty, or by opening a window. - a writer This function is called to write a given string, - maybe to the tty, maybe as a field label in a - window. - a flusher This function is called to flush everything that - has been output so far. It can be used to actually - display a dialog box after it has been built. - a reader This function is called to read a given prompt, - maybe from the tty, maybe from a field in a - window. Note that it's called wth all string - structures, not only the prompt ones, so it must - check such things itself. - a closer This function closes the session, maybe by closing - the channel to the tty, or closing the window. - - All these functions are expected to return: - - 0 on error. - 1 on success. - -1 on out-of-band events, for example if some prompting has - been canceled (by pressing Ctrl-C, for example). This is - only checked when returned by the flusher or the reader. - - The way this is used, the opener is first called, then the writer for all - strings, then the flusher, then the reader for all strings and finally the - closer. Note that if you want to prompt from a terminal or other command - line interface, the best is to have the reader also write the prompts - instead of having the writer do it. If you want to prompt from a dialog - box, the writer can be used to build up the contents of the box, and the - flusher to actually display the box and run the event loop until all data - has been given, after which the reader only grabs the given data and puts - them back into the UI strings. - - All method functions take a UI as argument. Additionally, the writer and - the reader take a UI_STRING. -*/ - -/* The UI_STRING type is the data structure that contains all the needed info - about a string or a prompt, including test data for a verification prompt. -*/ -DECLARE_STACK_OF(UI_STRING) -typedef struct ui_string_st UI_STRING; - -/* The different types of strings that are currently supported. - This is only needed by method authors. */ -enum UI_string_types - { - UIT_NONE=0, - UIT_PROMPT, /* Prompt for a string */ - UIT_VERIFY, /* Prompt for a string and verify */ - UIT_BOOLEAN, /* Prompt for a yes/no response */ - UIT_INFO, /* Send info to the user */ - UIT_ERROR /* Send an error message to the user */ - }; - -/* Create and manipulate methods */ -UI_METHOD *UI_create_method(char *name); -void UI_destroy_method(UI_METHOD *ui_method); -int UI_method_set_opener(UI_METHOD *method, int (*opener)(UI *ui)); -int UI_method_set_writer(UI_METHOD *method, int (*writer)(UI *ui, UI_STRING *uis)); -int UI_method_set_flusher(UI_METHOD *method, int (*flusher)(UI *ui)); -int UI_method_set_reader(UI_METHOD *method, int (*reader)(UI *ui, UI_STRING *uis)); -int UI_method_set_closer(UI_METHOD *method, int (*closer)(UI *ui)); -int (*UI_method_get_opener(UI_METHOD *method))(UI*); -int (*UI_method_get_writer(UI_METHOD *method))(UI*,UI_STRING*); -int (*UI_method_get_flusher(UI_METHOD *method))(UI*); -int (*UI_method_get_reader(UI_METHOD *method))(UI*,UI_STRING*); -int (*UI_method_get_closer(UI_METHOD *method))(UI*); - -/* The following functions are helpers for method writers to access relevant - data from a UI_STRING. */ - -/* Return type of the UI_STRING */ -enum UI_string_types UI_get_string_type(UI_STRING *uis); -/* Return input flags of the UI_STRING */ -int UI_get_input_flags(UI_STRING *uis); -/* Return the actual string to output (the prompt, info or error) */ -const char *UI_get0_output_string(UI_STRING *uis); -/* Return the optional action string to output (the boolean promtp instruction) */ -const char *UI_get0_action_string(UI_STRING *uis); -/* Return the result of a prompt */ -const char *UI_get0_result_string(UI_STRING *uis); -/* Return the string to test the result against. Only useful with verifies. */ -const char *UI_get0_test_string(UI_STRING *uis); -/* Return the required minimum size of the result */ -int UI_get_result_minsize(UI_STRING *uis); -/* Return the required maximum size of the result */ -int UI_get_result_maxsize(UI_STRING *uis); -/* Set the result of a UI_STRING. */ -int UI_set_result(UI *ui, UI_STRING *uis, const char *result); - - -/* A couple of popular utility functions */ -int UI_UTIL_read_pw_string(char *buf,int length,const char *prompt,int verify); -int UI_UTIL_read_pw(char *buf,char *buff,int size,const char *prompt,int verify); - - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_UI_strings(void); - -/* Error codes for the UI functions. */ - -/* Function codes. */ -#define UI_F_GENERAL_ALLOCATE_BOOLEAN 108 -#define UI_F_GENERAL_ALLOCATE_PROMPT 109 -#define UI_F_GENERAL_ALLOCATE_STRING 100 -#define UI_F_UI_CTRL 111 -#define UI_F_UI_DUP_ERROR_STRING 101 -#define UI_F_UI_DUP_INFO_STRING 102 -#define UI_F_UI_DUP_INPUT_BOOLEAN 110 -#define UI_F_UI_DUP_INPUT_STRING 103 -#define UI_F_UI_DUP_VERIFY_STRING 106 -#define UI_F_UI_GET0_RESULT 107 -#define UI_F_UI_NEW_METHOD 104 -#define UI_F_UI_SET_RESULT 105 - -/* Reason codes. */ -#define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS 104 -#define UI_R_INDEX_TOO_LARGE 102 -#define UI_R_INDEX_TOO_SMALL 103 -#define UI_R_NO_RESULT_BUFFER 105 -#define UI_R_RESULT_TOO_LARGE 100 -#define UI_R_RESULT_TOO_SMALL 101 -#define UI_R_UNKNOWN_CONTROL_COMMAND 106 - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/ui_compat.h b/externals/openssl/ui_compat.h deleted file mode 100644 index 4687853772..0000000000 --- a/externals/openssl/ui_compat.h +++ /dev/null @@ -1,84 +0,0 @@ -/* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ -/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL - * project 2001. - */ -/* ==================================================================== - * Copyright (c) 2001 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_UI_COMPAT_H -#define HEADER_UI_COMPAT_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* The following functions were previously part of the DES section, - and are provided here for backward compatibility reasons. */ - -#define des_read_pw_string(b,l,p,v) \ - _ossl_old_des_read_pw_string((b),(l),(p),(v)) -#define des_read_pw(b,bf,s,p,v) \ - _ossl_old_des_read_pw((b),(bf),(s),(p),(v)) - -int _ossl_old_des_read_pw_string(char *buf,int length,const char *prompt,int verify); -int _ossl_old_des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/externals/openssl/x509.h b/externals/openssl/x509.h deleted file mode 100644 index e71b5257e5..0000000000 --- a/externals/openssl/x509.h +++ /dev/null @@ -1,1355 +0,0 @@ -/* crypto/x509/x509.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECDH support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ - -#ifndef HEADER_X509_H -#define HEADER_X509_H - -#include -#include -#ifndef OPENSSL_NO_BUFFER -#include -#endif -#ifndef OPENSSL_NO_EVP -#include -#endif -#ifndef OPENSSL_NO_BIO -#include -#endif -#include -#include -#include - -#ifndef OPENSSL_NO_EC -#include -#endif - -#ifndef OPENSSL_NO_ECDSA -#include -#endif - -#ifndef OPENSSL_NO_ECDH -#include -#endif - -#ifndef OPENSSL_NO_DEPRECATED -#ifndef OPENSSL_NO_RSA -#include -#endif -#ifndef OPENSSL_NO_DSA -#include -#endif -#ifndef OPENSSL_NO_DH -#include -#endif -#endif - -#ifndef OPENSSL_NO_SHA -#include -#endif -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef OPENSSL_SYS_WIN32 -/* Under Win32 these are defined in wincrypt.h */ -#undef X509_NAME -#undef X509_CERT_PAIR -#endif - -#define X509_FILETYPE_PEM 1 -#define X509_FILETYPE_ASN1 2 -#define X509_FILETYPE_DEFAULT 3 - -#define X509v3_KU_DIGITAL_SIGNATURE 0x0080 -#define X509v3_KU_NON_REPUDIATION 0x0040 -#define X509v3_KU_KEY_ENCIPHERMENT 0x0020 -#define X509v3_KU_DATA_ENCIPHERMENT 0x0010 -#define X509v3_KU_KEY_AGREEMENT 0x0008 -#define X509v3_KU_KEY_CERT_SIGN 0x0004 -#define X509v3_KU_CRL_SIGN 0x0002 -#define X509v3_KU_ENCIPHER_ONLY 0x0001 -#define X509v3_KU_DECIPHER_ONLY 0x8000 -#define X509v3_KU_UNDEF 0xffff - -typedef struct X509_objects_st - { - int nid; - int (*a2i)(void); - int (*i2a)(void); - } X509_OBJECTS; - -struct X509_algor_st - { - ASN1_OBJECT *algorithm; - ASN1_TYPE *parameter; - } /* X509_ALGOR */; - -DECLARE_ASN1_SET_OF(X509_ALGOR) - -typedef STACK_OF(X509_ALGOR) X509_ALGORS; - -typedef struct X509_val_st - { - ASN1_TIME *notBefore; - ASN1_TIME *notAfter; - } X509_VAL; - -typedef struct X509_pubkey_st - { - X509_ALGOR *algor; - ASN1_BIT_STRING *public_key; - EVP_PKEY *pkey; - } X509_PUBKEY; - -typedef struct X509_sig_st - { - X509_ALGOR *algor; - ASN1_OCTET_STRING *digest; - } X509_SIG; - -typedef struct X509_name_entry_st - { - ASN1_OBJECT *object; - ASN1_STRING *value; - int set; - int size; /* temp variable */ - } X509_NAME_ENTRY; - -DECLARE_STACK_OF(X509_NAME_ENTRY) -DECLARE_ASN1_SET_OF(X509_NAME_ENTRY) - -/* we always keep X509_NAMEs in 2 forms. */ -struct X509_name_st - { - STACK_OF(X509_NAME_ENTRY) *entries; - int modified; /* true if 'bytes' needs to be built */ -#ifndef OPENSSL_NO_BUFFER - BUF_MEM *bytes; -#else - char *bytes; -#endif - unsigned long hash; /* Keep the hash around for lookups */ - } /* X509_NAME */; - -DECLARE_STACK_OF(X509_NAME) - -#define X509_EX_V_NETSCAPE_HACK 0x8000 -#define X509_EX_V_INIT 0x0001 -typedef struct X509_extension_st - { - ASN1_OBJECT *object; - ASN1_BOOLEAN critical; - ASN1_OCTET_STRING *value; - } X509_EXTENSION; - -typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS; - -DECLARE_STACK_OF(X509_EXTENSION) -DECLARE_ASN1_SET_OF(X509_EXTENSION) - -/* a sequence of these are used */ -typedef struct x509_attributes_st - { - ASN1_OBJECT *object; - int single; /* 0 for a set, 1 for a single item (which is wrong) */ - union { - char *ptr; -/* 0 */ STACK_OF(ASN1_TYPE) *set; -/* 1 */ ASN1_TYPE *single; - } value; - } X509_ATTRIBUTE; - -DECLARE_STACK_OF(X509_ATTRIBUTE) -DECLARE_ASN1_SET_OF(X509_ATTRIBUTE) - - -typedef struct X509_req_info_st - { - ASN1_ENCODING enc; - ASN1_INTEGER *version; - X509_NAME *subject; - X509_PUBKEY *pubkey; - /* d=2 hl=2 l= 0 cons: cont: 00 */ - STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ - } X509_REQ_INFO; - -typedef struct X509_req_st - { - X509_REQ_INFO *req_info; - X509_ALGOR *sig_alg; - ASN1_BIT_STRING *signature; - int references; - } X509_REQ; - -typedef struct x509_cinf_st - { - ASN1_INTEGER *version; /* [ 0 ] default of v1 */ - ASN1_INTEGER *serialNumber; - X509_ALGOR *signature; - X509_NAME *issuer; - X509_VAL *validity; - X509_NAME *subject; - X509_PUBKEY *key; - ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */ - ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */ - STACK_OF(X509_EXTENSION) *extensions; /* [ 3 ] optional in v3 */ - } X509_CINF; - -/* This stuff is certificate "auxiliary info" - * it contains details which are useful in certificate - * stores and databases. When used this is tagged onto - * the end of the certificate itself - */ - -typedef struct x509_cert_aux_st - { - STACK_OF(ASN1_OBJECT) *trust; /* trusted uses */ - STACK_OF(ASN1_OBJECT) *reject; /* rejected uses */ - ASN1_UTF8STRING *alias; /* "friendly name" */ - ASN1_OCTET_STRING *keyid; /* key id of private key */ - STACK_OF(X509_ALGOR) *other; /* other unspecified info */ - } X509_CERT_AUX; - -struct x509_st - { - X509_CINF *cert_info; - X509_ALGOR *sig_alg; - ASN1_BIT_STRING *signature; - int valid; - int references; - char *name; - CRYPTO_EX_DATA ex_data; - /* These contain copies of various extension values */ - long ex_pathlen; - long ex_pcpathlen; - unsigned long ex_flags; - unsigned long ex_kusage; - unsigned long ex_xkusage; - unsigned long ex_nscert; - ASN1_OCTET_STRING *skid; - struct AUTHORITY_KEYID_st *akid; - X509_POLICY_CACHE *policy_cache; -#ifndef OPENSSL_NO_RFC3779 - STACK_OF(IPAddressFamily) *rfc3779_addr; - struct ASIdentifiers_st *rfc3779_asid; -#endif -#ifndef OPENSSL_NO_SHA - unsigned char sha1_hash[SHA_DIGEST_LENGTH]; -#endif - X509_CERT_AUX *aux; - } /* X509 */; - -DECLARE_STACK_OF(X509) -DECLARE_ASN1_SET_OF(X509) - -/* This is used for a table of trust checking functions */ - -typedef struct x509_trust_st { - int trust; - int flags; - int (*check_trust)(struct x509_trust_st *, X509 *, int); - char *name; - int arg1; - void *arg2; -} X509_TRUST; - -DECLARE_STACK_OF(X509_TRUST) - -typedef struct x509_cert_pair_st { - X509 *forward; - X509 *reverse; -} X509_CERT_PAIR; - -/* standard trust ids */ - -#define X509_TRUST_DEFAULT -1 /* Only valid in purpose settings */ - -#define X509_TRUST_COMPAT 1 -#define X509_TRUST_SSL_CLIENT 2 -#define X509_TRUST_SSL_SERVER 3 -#define X509_TRUST_EMAIL 4 -#define X509_TRUST_OBJECT_SIGN 5 -#define X509_TRUST_OCSP_SIGN 6 -#define X509_TRUST_OCSP_REQUEST 7 - -/* Keep these up to date! */ -#define X509_TRUST_MIN 1 -#define X509_TRUST_MAX 7 - - -/* trust_flags values */ -#define X509_TRUST_DYNAMIC 1 -#define X509_TRUST_DYNAMIC_NAME 2 - -/* check_trust return codes */ - -#define X509_TRUST_TRUSTED 1 -#define X509_TRUST_REJECTED 2 -#define X509_TRUST_UNTRUSTED 3 - -/* Flags for X509_print_ex() */ - -#define X509_FLAG_COMPAT 0 -#define X509_FLAG_NO_HEADER 1L -#define X509_FLAG_NO_VERSION (1L << 1) -#define X509_FLAG_NO_SERIAL (1L << 2) -#define X509_FLAG_NO_SIGNAME (1L << 3) -#define X509_FLAG_NO_ISSUER (1L << 4) -#define X509_FLAG_NO_VALIDITY (1L << 5) -#define X509_FLAG_NO_SUBJECT (1L << 6) -#define X509_FLAG_NO_PUBKEY (1L << 7) -#define X509_FLAG_NO_EXTENSIONS (1L << 8) -#define X509_FLAG_NO_SIGDUMP (1L << 9) -#define X509_FLAG_NO_AUX (1L << 10) -#define X509_FLAG_NO_ATTRIBUTES (1L << 11) - -/* Flags specific to X509_NAME_print_ex() */ - -/* The field separator information */ - -#define XN_FLAG_SEP_MASK (0xf << 16) - -#define XN_FLAG_COMPAT 0 /* Traditional SSLeay: use old X509_NAME_print */ -#define XN_FLAG_SEP_COMMA_PLUS (1 << 16) /* RFC2253 ,+ */ -#define XN_FLAG_SEP_CPLUS_SPC (2 << 16) /* ,+ spaced: more readable */ -#define XN_FLAG_SEP_SPLUS_SPC (3 << 16) /* ;+ spaced */ -#define XN_FLAG_SEP_MULTILINE (4 << 16) /* One line per field */ - -#define XN_FLAG_DN_REV (1 << 20) /* Reverse DN order */ - -/* How the field name is shown */ - -#define XN_FLAG_FN_MASK (0x3 << 21) - -#define XN_FLAG_FN_SN 0 /* Object short name */ -#define XN_FLAG_FN_LN (1 << 21) /* Object long name */ -#define XN_FLAG_FN_OID (2 << 21) /* Always use OIDs */ -#define XN_FLAG_FN_NONE (3 << 21) /* No field names */ - -#define XN_FLAG_SPC_EQ (1 << 23) /* Put spaces round '=' */ - -/* This determines if we dump fields we don't recognise: - * RFC2253 requires this. - */ - -#define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24) - -#define XN_FLAG_FN_ALIGN (1 << 25) /* Align field names to 20 characters */ - -/* Complete set of RFC2253 flags */ - -#define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \ - XN_FLAG_SEP_COMMA_PLUS | \ - XN_FLAG_DN_REV | \ - XN_FLAG_FN_SN | \ - XN_FLAG_DUMP_UNKNOWN_FIELDS) - -/* readable oneline form */ - -#define XN_FLAG_ONELINE (ASN1_STRFLGS_RFC2253 | \ - ASN1_STRFLGS_ESC_QUOTE | \ - XN_FLAG_SEP_CPLUS_SPC | \ - XN_FLAG_SPC_EQ | \ - XN_FLAG_FN_SN) - -/* readable multiline form */ - -#define XN_FLAG_MULTILINE (ASN1_STRFLGS_ESC_CTRL | \ - ASN1_STRFLGS_ESC_MSB | \ - XN_FLAG_SEP_MULTILINE | \ - XN_FLAG_SPC_EQ | \ - XN_FLAG_FN_LN | \ - XN_FLAG_FN_ALIGN) - -typedef struct X509_revoked_st - { - ASN1_INTEGER *serialNumber; - ASN1_TIME *revocationDate; - STACK_OF(X509_EXTENSION) /* optional */ *extensions; - int sequence; /* load sequence */ - } X509_REVOKED; - -DECLARE_STACK_OF(X509_REVOKED) -DECLARE_ASN1_SET_OF(X509_REVOKED) - -typedef struct X509_crl_info_st - { - ASN1_INTEGER *version; - X509_ALGOR *sig_alg; - X509_NAME *issuer; - ASN1_TIME *lastUpdate; - ASN1_TIME *nextUpdate; - STACK_OF(X509_REVOKED) *revoked; - STACK_OF(X509_EXTENSION) /* [0] */ *extensions; - ASN1_ENCODING enc; - } X509_CRL_INFO; - -struct X509_crl_st - { - /* actual signature */ - X509_CRL_INFO *crl; - X509_ALGOR *sig_alg; - ASN1_BIT_STRING *signature; - int references; - } /* X509_CRL */; - -DECLARE_STACK_OF(X509_CRL) -DECLARE_ASN1_SET_OF(X509_CRL) - -typedef struct private_key_st - { - int version; - /* The PKCS#8 data types */ - X509_ALGOR *enc_algor; - ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */ - - /* When decrypted, the following will not be NULL */ - EVP_PKEY *dec_pkey; - - /* used to encrypt and decrypt */ - int key_length; - char *key_data; - int key_free; /* true if we should auto free key_data */ - - /* expanded version of 'enc_algor' */ - EVP_CIPHER_INFO cipher; - - int references; - } X509_PKEY; - -#ifndef OPENSSL_NO_EVP -typedef struct X509_info_st - { - X509 *x509; - X509_CRL *crl; - X509_PKEY *x_pkey; - - EVP_CIPHER_INFO enc_cipher; - int enc_len; - char *enc_data; - - int references; - } X509_INFO; - -DECLARE_STACK_OF(X509_INFO) -#endif - -/* The next 2 structures and their 8 routines were sent to me by - * Pat Richard and are used to manipulate - * Netscapes spki structures - useful if you are writing a CA web page - */ -typedef struct Netscape_spkac_st - { - X509_PUBKEY *pubkey; - ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */ - } NETSCAPE_SPKAC; - -typedef struct Netscape_spki_st - { - NETSCAPE_SPKAC *spkac; /* signed public key and challenge */ - X509_ALGOR *sig_algor; - ASN1_BIT_STRING *signature; - } NETSCAPE_SPKI; - -/* Netscape certificate sequence structure */ -typedef struct Netscape_certificate_sequence - { - ASN1_OBJECT *type; - STACK_OF(X509) *certs; - } NETSCAPE_CERT_SEQUENCE; - -/* Unused (and iv length is wrong) -typedef struct CBCParameter_st - { - unsigned char iv[8]; - } CBC_PARAM; -*/ - -/* Password based encryption structure */ - -typedef struct PBEPARAM_st { -ASN1_OCTET_STRING *salt; -ASN1_INTEGER *iter; -} PBEPARAM; - -/* Password based encryption V2 structures */ - -typedef struct PBE2PARAM_st { -X509_ALGOR *keyfunc; -X509_ALGOR *encryption; -} PBE2PARAM; - -typedef struct PBKDF2PARAM_st { -ASN1_TYPE *salt; /* Usually OCTET STRING but could be anything */ -ASN1_INTEGER *iter; -ASN1_INTEGER *keylength; -X509_ALGOR *prf; -} PBKDF2PARAM; - - -/* PKCS#8 private key info structure */ - -typedef struct pkcs8_priv_key_info_st - { - int broken; /* Flag for various broken formats */ -#define PKCS8_OK 0 -#define PKCS8_NO_OCTET 1 -#define PKCS8_EMBEDDED_PARAM 2 -#define PKCS8_NS_DB 3 - ASN1_INTEGER *version; - X509_ALGOR *pkeyalg; - ASN1_TYPE *pkey; /* Should be OCTET STRING but some are broken */ - STACK_OF(X509_ATTRIBUTE) *attributes; - } PKCS8_PRIV_KEY_INFO; - -#ifdef __cplusplus -} -#endif - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef SSLEAY_MACROS -#define X509_verify(a,r) ASN1_verify((int (*)())i2d_X509_CINF,a->sig_alg,\ - a->signature,(char *)a->cert_info,r) -#define X509_REQ_verify(a,r) ASN1_verify((int (*)())i2d_X509_REQ_INFO, \ - a->sig_alg,a->signature,(char *)a->req_info,r) -#define X509_CRL_verify(a,r) ASN1_verify((int (*)())i2d_X509_CRL_INFO, \ - a->sig_alg, a->signature,(char *)a->crl,r) - -#define X509_sign(x,pkey,md) \ - ASN1_sign((int (*)())i2d_X509_CINF, x->cert_info->signature, \ - x->sig_alg, x->signature, (char *)x->cert_info,pkey,md) -#define X509_REQ_sign(x,pkey,md) \ - ASN1_sign((int (*)())i2d_X509_REQ_INFO,x->sig_alg, NULL, \ - x->signature, (char *)x->req_info,pkey,md) -#define X509_CRL_sign(x,pkey,md) \ - ASN1_sign((int (*)())i2d_X509_CRL_INFO,x->crl->sig_alg,x->sig_alg, \ - x->signature, (char *)x->crl,pkey,md) -#define NETSCAPE_SPKI_sign(x,pkey,md) \ - ASN1_sign((int (*)())i2d_NETSCAPE_SPKAC, x->sig_algor,NULL, \ - x->signature, (char *)x->spkac,pkey,md) - -#define X509_dup(x509) (X509 *)ASN1_dup((int (*)())i2d_X509, \ - (char *(*)())d2i_X509,(char *)x509) -#define X509_ATTRIBUTE_dup(xa) (X509_ATTRIBUTE *)ASN1_dup(\ - (int (*)())i2d_X509_ATTRIBUTE, \ - (char *(*)())d2i_X509_ATTRIBUTE,(char *)xa) -#define X509_EXTENSION_dup(ex) (X509_EXTENSION *)ASN1_dup( \ - (int (*)())i2d_X509_EXTENSION, \ - (char *(*)())d2i_X509_EXTENSION,(char *)ex) -#define d2i_X509_fp(fp,x509) (X509 *)ASN1_d2i_fp((char *(*)())X509_new, \ - (char *(*)())d2i_X509, (fp),(unsigned char **)(x509)) -#define i2d_X509_fp(fp,x509) ASN1_i2d_fp(i2d_X509,fp,(unsigned char *)x509) -#define d2i_X509_bio(bp,x509) (X509 *)ASN1_d2i_bio((char *(*)())X509_new, \ - (char *(*)())d2i_X509, (bp),(unsigned char **)(x509)) -#define i2d_X509_bio(bp,x509) ASN1_i2d_bio(i2d_X509,bp,(unsigned char *)x509) - -#define X509_CRL_dup(crl) (X509_CRL *)ASN1_dup((int (*)())i2d_X509_CRL, \ - (char *(*)())d2i_X509_CRL,(char *)crl) -#define d2i_X509_CRL_fp(fp,crl) (X509_CRL *)ASN1_d2i_fp((char *(*)()) \ - X509_CRL_new,(char *(*)())d2i_X509_CRL, (fp),\ - (unsigned char **)(crl)) -#define i2d_X509_CRL_fp(fp,crl) ASN1_i2d_fp(i2d_X509_CRL,fp,\ - (unsigned char *)crl) -#define d2i_X509_CRL_bio(bp,crl) (X509_CRL *)ASN1_d2i_bio((char *(*)()) \ - X509_CRL_new,(char *(*)())d2i_X509_CRL, (bp),\ - (unsigned char **)(crl)) -#define i2d_X509_CRL_bio(bp,crl) ASN1_i2d_bio(i2d_X509_CRL,bp,\ - (unsigned char *)crl) - -#define PKCS7_dup(p7) (PKCS7 *)ASN1_dup((int (*)())i2d_PKCS7, \ - (char *(*)())d2i_PKCS7,(char *)p7) -#define d2i_PKCS7_fp(fp,p7) (PKCS7 *)ASN1_d2i_fp((char *(*)()) \ - PKCS7_new,(char *(*)())d2i_PKCS7, (fp),\ - (unsigned char **)(p7)) -#define i2d_PKCS7_fp(fp,p7) ASN1_i2d_fp(i2d_PKCS7,fp,\ - (unsigned char *)p7) -#define d2i_PKCS7_bio(bp,p7) (PKCS7 *)ASN1_d2i_bio((char *(*)()) \ - PKCS7_new,(char *(*)())d2i_PKCS7, (bp),\ - (unsigned char **)(p7)) -#define i2d_PKCS7_bio(bp,p7) ASN1_i2d_bio(i2d_PKCS7,bp,\ - (unsigned char *)p7) - -#define X509_REQ_dup(req) (X509_REQ *)ASN1_dup((int (*)())i2d_X509_REQ, \ - (char *(*)())d2i_X509_REQ,(char *)req) -#define d2i_X509_REQ_fp(fp,req) (X509_REQ *)ASN1_d2i_fp((char *(*)())\ - X509_REQ_new, (char *(*)())d2i_X509_REQ, (fp),\ - (unsigned char **)(req)) -#define i2d_X509_REQ_fp(fp,req) ASN1_i2d_fp(i2d_X509_REQ,fp,\ - (unsigned char *)req) -#define d2i_X509_REQ_bio(bp,req) (X509_REQ *)ASN1_d2i_bio((char *(*)())\ - X509_REQ_new, (char *(*)())d2i_X509_REQ, (bp),\ - (unsigned char **)(req)) -#define i2d_X509_REQ_bio(bp,req) ASN1_i2d_bio(i2d_X509_REQ,bp,\ - (unsigned char *)req) - -#define RSAPublicKey_dup(rsa) (RSA *)ASN1_dup((int (*)())i2d_RSAPublicKey, \ - (char *(*)())d2i_RSAPublicKey,(char *)rsa) -#define RSAPrivateKey_dup(rsa) (RSA *)ASN1_dup((int (*)())i2d_RSAPrivateKey, \ - (char *(*)())d2i_RSAPrivateKey,(char *)rsa) - -#define d2i_RSAPrivateKey_fp(fp,rsa) (RSA *)ASN1_d2i_fp((char *(*)())\ - RSA_new,(char *(*)())d2i_RSAPrivateKey, (fp), \ - (unsigned char **)(rsa)) -#define i2d_RSAPrivateKey_fp(fp,rsa) ASN1_i2d_fp(i2d_RSAPrivateKey,fp, \ - (unsigned char *)rsa) -#define d2i_RSAPrivateKey_bio(bp,rsa) (RSA *)ASN1_d2i_bio((char *(*)())\ - RSA_new,(char *(*)())d2i_RSAPrivateKey, (bp), \ - (unsigned char **)(rsa)) -#define i2d_RSAPrivateKey_bio(bp,rsa) ASN1_i2d_bio(i2d_RSAPrivateKey,bp, \ - (unsigned char *)rsa) - -#define d2i_RSAPublicKey_fp(fp,rsa) (RSA *)ASN1_d2i_fp((char *(*)())\ - RSA_new,(char *(*)())d2i_RSAPublicKey, (fp), \ - (unsigned char **)(rsa)) -#define i2d_RSAPublicKey_fp(fp,rsa) ASN1_i2d_fp(i2d_RSAPublicKey,fp, \ - (unsigned char *)rsa) -#define d2i_RSAPublicKey_bio(bp,rsa) (RSA *)ASN1_d2i_bio((char *(*)())\ - RSA_new,(char *(*)())d2i_RSAPublicKey, (bp), \ - (unsigned char **)(rsa)) -#define i2d_RSAPublicKey_bio(bp,rsa) ASN1_i2d_bio(i2d_RSAPublicKey,bp, \ - (unsigned char *)rsa) - -#define d2i_DSAPrivateKey_fp(fp,dsa) (DSA *)ASN1_d2i_fp((char *(*)())\ - DSA_new,(char *(*)())d2i_DSAPrivateKey, (fp), \ - (unsigned char **)(dsa)) -#define i2d_DSAPrivateKey_fp(fp,dsa) ASN1_i2d_fp(i2d_DSAPrivateKey,fp, \ - (unsigned char *)dsa) -#define d2i_DSAPrivateKey_bio(bp,dsa) (DSA *)ASN1_d2i_bio((char *(*)())\ - DSA_new,(char *(*)())d2i_DSAPrivateKey, (bp), \ - (unsigned char **)(dsa)) -#define i2d_DSAPrivateKey_bio(bp,dsa) ASN1_i2d_bio(i2d_DSAPrivateKey,bp, \ - (unsigned char *)dsa) - -#define d2i_ECPrivateKey_fp(fp,ecdsa) (EC_KEY *)ASN1_d2i_fp((char *(*)())\ - EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (fp), \ - (unsigned char **)(ecdsa)) -#define i2d_ECPrivateKey_fp(fp,ecdsa) ASN1_i2d_fp(i2d_ECPrivateKey,fp, \ - (unsigned char *)ecdsa) -#define d2i_ECPrivateKey_bio(bp,ecdsa) (EC_KEY *)ASN1_d2i_bio((char *(*)())\ - EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (bp), \ - (unsigned char **)(ecdsa)) -#define i2d_ECPrivateKey_bio(bp,ecdsa) ASN1_i2d_bio(i2d_ECPrivateKey,bp, \ - (unsigned char *)ecdsa) - -#define X509_ALGOR_dup(xn) (X509_ALGOR *)ASN1_dup((int (*)())i2d_X509_ALGOR,\ - (char *(*)())d2i_X509_ALGOR,(char *)xn) - -#define X509_NAME_dup(xn) (X509_NAME *)ASN1_dup((int (*)())i2d_X509_NAME, \ - (char *(*)())d2i_X509_NAME,(char *)xn) -#define X509_NAME_ENTRY_dup(ne) (X509_NAME_ENTRY *)ASN1_dup( \ - (int (*)())i2d_X509_NAME_ENTRY, \ - (char *(*)())d2i_X509_NAME_ENTRY,\ - (char *)ne) - -#define X509_digest(data,type,md,len) \ - ASN1_digest((int (*)())i2d_X509,type,(char *)data,md,len) -#define X509_NAME_digest(data,type,md,len) \ - ASN1_digest((int (*)())i2d_X509_NAME,type,(char *)data,md,len) -#ifndef PKCS7_ISSUER_AND_SERIAL_digest -#define PKCS7_ISSUER_AND_SERIAL_digest(data,type,md,len) \ - ASN1_digest((int (*)())i2d_PKCS7_ISSUER_AND_SERIAL,type,\ - (char *)data,md,len) -#endif -#endif - -#define X509_EXT_PACK_UNKNOWN 1 -#define X509_EXT_PACK_STRING 2 - -#define X509_get_version(x) ASN1_INTEGER_get((x)->cert_info->version) -/* #define X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */ -#define X509_get_notBefore(x) ((x)->cert_info->validity->notBefore) -#define X509_get_notAfter(x) ((x)->cert_info->validity->notAfter) -#define X509_extract_key(x) X509_get_pubkey(x) /*****/ -#define X509_REQ_get_version(x) ASN1_INTEGER_get((x)->req_info->version) -#define X509_REQ_get_subject_name(x) ((x)->req_info->subject) -#define X509_REQ_extract_key(a) X509_REQ_get_pubkey(a) -#define X509_name_cmp(a,b) X509_NAME_cmp((a),(b)) -#define X509_get_signature_type(x) EVP_PKEY_type(OBJ_obj2nid((x)->sig_alg->algorithm)) - -#define X509_CRL_get_version(x) ASN1_INTEGER_get((x)->crl->version) -#define X509_CRL_get_lastUpdate(x) ((x)->crl->lastUpdate) -#define X509_CRL_get_nextUpdate(x) ((x)->crl->nextUpdate) -#define X509_CRL_get_issuer(x) ((x)->crl->issuer) -#define X509_CRL_get_REVOKED(x) ((x)->crl->revoked) - -/* This one is only used so that a binary form can output, as in - * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf) */ -#define X509_get_X509_PUBKEY(x) ((x)->cert_info->key) - - -const char *X509_verify_cert_error_string(long n); - -#ifndef SSLEAY_MACROS -#ifndef OPENSSL_NO_EVP -int X509_verify(X509 *a, EVP_PKEY *r); - -int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r); -int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r); -int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r); - -NETSCAPE_SPKI * NETSCAPE_SPKI_b64_decode(const char *str, int len); -char * NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x); -EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x); -int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey); - -int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki); - -int X509_signature_print(BIO *bp,X509_ALGOR *alg, ASN1_STRING *sig); - -int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); -int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md); -int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md); -int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md); - -int X509_pubkey_digest(const X509 *data,const EVP_MD *type, - unsigned char *md, unsigned int *len); -int X509_digest(const X509 *data,const EVP_MD *type, - unsigned char *md, unsigned int *len); -int X509_CRL_digest(const X509_CRL *data,const EVP_MD *type, - unsigned char *md, unsigned int *len); -int X509_REQ_digest(const X509_REQ *data,const EVP_MD *type, - unsigned char *md, unsigned int *len); -int X509_NAME_digest(const X509_NAME *data,const EVP_MD *type, - unsigned char *md, unsigned int *len); -#endif - -#ifndef OPENSSL_NO_FP_API -X509 *d2i_X509_fp(FILE *fp, X509 **x509); -int i2d_X509_fp(FILE *fp,X509 *x509); -X509_CRL *d2i_X509_CRL_fp(FILE *fp,X509_CRL **crl); -int i2d_X509_CRL_fp(FILE *fp,X509_CRL *crl); -X509_REQ *d2i_X509_REQ_fp(FILE *fp,X509_REQ **req); -int i2d_X509_REQ_fp(FILE *fp,X509_REQ *req); -#ifndef OPENSSL_NO_RSA -RSA *d2i_RSAPrivateKey_fp(FILE *fp,RSA **rsa); -int i2d_RSAPrivateKey_fp(FILE *fp,RSA *rsa); -RSA *d2i_RSAPublicKey_fp(FILE *fp,RSA **rsa); -int i2d_RSAPublicKey_fp(FILE *fp,RSA *rsa); -RSA *d2i_RSA_PUBKEY_fp(FILE *fp,RSA **rsa); -int i2d_RSA_PUBKEY_fp(FILE *fp,RSA *rsa); -#endif -#ifndef OPENSSL_NO_DSA -DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa); -int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa); -DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); -int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa); -#endif -#ifndef OPENSSL_NO_EC -EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey); -int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey); -EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey); -int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey); -#endif -X509_SIG *d2i_PKCS8_fp(FILE *fp,X509_SIG **p8); -int i2d_PKCS8_fp(FILE *fp,X509_SIG *p8); -PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, - PKCS8_PRIV_KEY_INFO **p8inf); -int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,PKCS8_PRIV_KEY_INFO *p8inf); -int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key); -int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey); -EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a); -int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey); -EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a); -#endif - -#ifndef OPENSSL_NO_BIO -X509 *d2i_X509_bio(BIO *bp,X509 **x509); -int i2d_X509_bio(BIO *bp,X509 *x509); -X509_CRL *d2i_X509_CRL_bio(BIO *bp,X509_CRL **crl); -int i2d_X509_CRL_bio(BIO *bp,X509_CRL *crl); -X509_REQ *d2i_X509_REQ_bio(BIO *bp,X509_REQ **req); -int i2d_X509_REQ_bio(BIO *bp,X509_REQ *req); -#ifndef OPENSSL_NO_RSA -RSA *d2i_RSAPrivateKey_bio(BIO *bp,RSA **rsa); -int i2d_RSAPrivateKey_bio(BIO *bp,RSA *rsa); -RSA *d2i_RSAPublicKey_bio(BIO *bp,RSA **rsa); -int i2d_RSAPublicKey_bio(BIO *bp,RSA *rsa); -RSA *d2i_RSA_PUBKEY_bio(BIO *bp,RSA **rsa); -int i2d_RSA_PUBKEY_bio(BIO *bp,RSA *rsa); -#endif -#ifndef OPENSSL_NO_DSA -DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa); -int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa); -DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); -int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa); -#endif -#ifndef OPENSSL_NO_EC -EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey); -int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey); -EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey); -int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey); -#endif -X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8); -int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8); -PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, - PKCS8_PRIV_KEY_INFO **p8inf); -int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,PKCS8_PRIV_KEY_INFO *p8inf); -int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key); -int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey); -EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a); -int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey); -EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a); -#endif - -X509 *X509_dup(X509 *x509); -X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa); -X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex); -X509_CRL *X509_CRL_dup(X509_CRL *crl); -X509_REQ *X509_REQ_dup(X509_REQ *req); -X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); -int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval); -void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval, - X509_ALGOR *algor); - -X509_NAME *X509_NAME_dup(X509_NAME *xn); -X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); - -#endif /* !SSLEAY_MACROS */ - -int X509_cmp_time(ASN1_TIME *s, time_t *t); -int X509_cmp_current_time(ASN1_TIME *s); -ASN1_TIME * X509_time_adj(ASN1_TIME *s, long adj, time_t *t); -ASN1_TIME * X509_gmtime_adj(ASN1_TIME *s, long adj); - -const char * X509_get_default_cert_area(void ); -const char * X509_get_default_cert_dir(void ); -const char * X509_get_default_cert_file(void ); -const char * X509_get_default_cert_dir_env(void ); -const char * X509_get_default_cert_file_env(void ); -const char * X509_get_default_private_dir(void ); - -X509_REQ * X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); -X509 * X509_REQ_to_X509(X509_REQ *r, int days,EVP_PKEY *pkey); - -DECLARE_ASN1_FUNCTIONS(X509_ALGOR) -DECLARE_ASN1_ENCODE_FUNCTIONS(X509_ALGORS, X509_ALGORS, X509_ALGORS) -DECLARE_ASN1_FUNCTIONS(X509_VAL) - -DECLARE_ASN1_FUNCTIONS(X509_PUBKEY) - -int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey); -EVP_PKEY * X509_PUBKEY_get(X509_PUBKEY *key); -int X509_get_pubkey_parameters(EVP_PKEY *pkey, - STACK_OF(X509) *chain); -int i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp); -EVP_PKEY * d2i_PUBKEY(EVP_PKEY **a,const unsigned char **pp, - long length); -#ifndef OPENSSL_NO_RSA -int i2d_RSA_PUBKEY(RSA *a,unsigned char **pp); -RSA * d2i_RSA_PUBKEY(RSA **a,const unsigned char **pp, - long length); -#endif -#ifndef OPENSSL_NO_DSA -int i2d_DSA_PUBKEY(DSA *a,unsigned char **pp); -DSA * d2i_DSA_PUBKEY(DSA **a,const unsigned char **pp, - long length); -#endif -#ifndef OPENSSL_NO_EC -int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp); -EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, - long length); -#endif - -DECLARE_ASN1_FUNCTIONS(X509_SIG) -DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO) -DECLARE_ASN1_FUNCTIONS(X509_REQ) - -DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE) -X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); - -DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) -DECLARE_ASN1_ENCODE_FUNCTIONS(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS) - -DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) - -DECLARE_ASN1_FUNCTIONS(X509_NAME) - -int X509_NAME_set(X509_NAME **xn, X509_NAME *name); - -DECLARE_ASN1_FUNCTIONS(X509_CINF) - -DECLARE_ASN1_FUNCTIONS(X509) -DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) - -DECLARE_ASN1_FUNCTIONS(X509_CERT_PAIR) - -int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int X509_set_ex_data(X509 *r, int idx, void *arg); -void *X509_get_ex_data(X509 *r, int idx); -int i2d_X509_AUX(X509 *a,unsigned char **pp); -X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length); - -int X509_alias_set1(X509 *x, unsigned char *name, int len); -int X509_keyid_set1(X509 *x, unsigned char *id, int len); -unsigned char * X509_alias_get0(X509 *x, int *len); -unsigned char * X509_keyid_get0(X509 *x, int *len); -int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int); -int X509_TRUST_set(int *t, int trust); -int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); -int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj); -void X509_trust_clear(X509 *x); -void X509_reject_clear(X509 *x); - -DECLARE_ASN1_FUNCTIONS(X509_REVOKED) -DECLARE_ASN1_FUNCTIONS(X509_CRL_INFO) -DECLARE_ASN1_FUNCTIONS(X509_CRL) - -int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev); - -X509_PKEY * X509_PKEY_new(void ); -void X509_PKEY_free(X509_PKEY *a); -int i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp); -X509_PKEY * d2i_X509_PKEY(X509_PKEY **a,const unsigned char **pp,long length); - -DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) -DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) -DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE) - -#ifndef OPENSSL_NO_EVP -X509_INFO * X509_INFO_new(void); -void X509_INFO_free(X509_INFO *a); -char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); - -int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, - ASN1_BIT_STRING *signature,char *data,EVP_PKEY *pkey); - -int ASN1_digest(i2d_of_void *i2d,const EVP_MD *type,char *data, - unsigned char *md,unsigned int *len); - -int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, - X509_ALGOR *algor2, ASN1_BIT_STRING *signature, - char *data,EVP_PKEY *pkey, const EVP_MD *type); - -int ASN1_item_digest(const ASN1_ITEM *it,const EVP_MD *type,void *data, - unsigned char *md,unsigned int *len); - -int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1, - ASN1_BIT_STRING *signature,void *data,EVP_PKEY *pkey); - -int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, - ASN1_BIT_STRING *signature, - void *data, EVP_PKEY *pkey, const EVP_MD *type); -#endif - -int X509_set_version(X509 *x,long version); -int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial); -ASN1_INTEGER * X509_get_serialNumber(X509 *x); -int X509_set_issuer_name(X509 *x, X509_NAME *name); -X509_NAME * X509_get_issuer_name(X509 *a); -int X509_set_subject_name(X509 *x, X509_NAME *name); -X509_NAME * X509_get_subject_name(X509 *a); -int X509_set_notBefore(X509 *x, ASN1_TIME *tm); -int X509_set_notAfter(X509 *x, ASN1_TIME *tm); -int X509_set_pubkey(X509 *x, EVP_PKEY *pkey); -EVP_PKEY * X509_get_pubkey(X509 *x); -ASN1_BIT_STRING * X509_get0_pubkey_bitstr(const X509 *x); -int X509_certificate_type(X509 *x,EVP_PKEY *pubkey /* optional */); - -int X509_REQ_set_version(X509_REQ *x,long version); -int X509_REQ_set_subject_name(X509_REQ *req,X509_NAME *name); -int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey); -EVP_PKEY * X509_REQ_get_pubkey(X509_REQ *req); -int X509_REQ_extension_nid(int nid); -int * X509_REQ_get_extension_nids(void); -void X509_REQ_set_extension_nids(int *nids); -STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req); -int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts, - int nid); -int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts); -int X509_REQ_get_attr_count(const X509_REQ *req); -int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, - int lastpos); -int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj, - int lastpos); -X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc); -X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc); -int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr); -int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, - const ASN1_OBJECT *obj, int type, - const unsigned char *bytes, int len); -int X509_REQ_add1_attr_by_NID(X509_REQ *req, - int nid, int type, - const unsigned char *bytes, int len); -int X509_REQ_add1_attr_by_txt(X509_REQ *req, - const char *attrname, int type, - const unsigned char *bytes, int len); - -int X509_CRL_set_version(X509_CRL *x, long version); -int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); -int X509_CRL_set_lastUpdate(X509_CRL *x, ASN1_TIME *tm); -int X509_CRL_set_nextUpdate(X509_CRL *x, ASN1_TIME *tm); -int X509_CRL_sort(X509_CRL *crl); - -int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); -int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); - -int X509_REQ_check_private_key(X509_REQ *x509,EVP_PKEY *pkey); - -int X509_check_private_key(X509 *x509,EVP_PKEY *pkey); - -int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b); -unsigned long X509_issuer_and_serial_hash(X509 *a); - -int X509_issuer_name_cmp(const X509 *a, const X509 *b); -unsigned long X509_issuer_name_hash(X509 *a); - -int X509_subject_name_cmp(const X509 *a, const X509 *b); -unsigned long X509_subject_name_hash(X509 *x); - -int X509_cmp(const X509 *a, const X509 *b); -int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b); -unsigned long X509_NAME_hash(X509_NAME *x); - -int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b); -#ifndef OPENSSL_NO_FP_API -int X509_print_ex_fp(FILE *bp,X509 *x, unsigned long nmflag, unsigned long cflag); -int X509_print_fp(FILE *bp,X509 *x); -int X509_CRL_print_fp(FILE *bp,X509_CRL *x); -int X509_REQ_print_fp(FILE *bp,X509_REQ *req); -int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags); -#endif - -#ifndef OPENSSL_NO_BIO -int X509_NAME_print(BIO *bp, X509_NAME *name, int obase); -int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags); -int X509_print_ex(BIO *bp,X509 *x, unsigned long nmflag, unsigned long cflag); -int X509_print(BIO *bp,X509 *x); -int X509_ocspid_print(BIO *bp,X509 *x); -int X509_CERT_AUX_print(BIO *bp,X509_CERT_AUX *x, int indent); -int X509_CRL_print(BIO *bp,X509_CRL *x); -int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag, unsigned long cflag); -int X509_REQ_print(BIO *bp,X509_REQ *req); -#endif - -int X509_NAME_entry_count(X509_NAME *name); -int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, - char *buf,int len); -int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, - char *buf,int len); - -/* NOTE: you should be passsing -1, not 0 as lastpos. The functions that use - * lastpos, search after that position on. */ -int X509_NAME_get_index_by_NID(X509_NAME *name,int nid,int lastpos); -int X509_NAME_get_index_by_OBJ(X509_NAME *name,ASN1_OBJECT *obj, - int lastpos); -X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc); -X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); -int X509_NAME_add_entry(X509_NAME *name,X509_NAME_ENTRY *ne, - int loc, int set); -int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, - unsigned char *bytes, int len, int loc, int set); -int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, - unsigned char *bytes, int len, int loc, int set); -X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, - const char *field, int type, const unsigned char *bytes, int len); -X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, - int type,unsigned char *bytes, int len); -int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, - const unsigned char *bytes, int len, int loc, int set); -X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, - ASN1_OBJECT *obj, int type,const unsigned char *bytes, - int len); -int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, - ASN1_OBJECT *obj); -int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, - const unsigned char *bytes, int len); -ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne); -ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne); - -int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x); -int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x, - int nid, int lastpos); -int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x, - ASN1_OBJECT *obj,int lastpos); -int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x, - int crit, int lastpos); -X509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc); -X509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc); -STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x, - X509_EXTENSION *ex, int loc); - -int X509_get_ext_count(X509 *x); -int X509_get_ext_by_NID(X509 *x, int nid, int lastpos); -int X509_get_ext_by_OBJ(X509 *x,ASN1_OBJECT *obj,int lastpos); -int X509_get_ext_by_critical(X509 *x, int crit, int lastpos); -X509_EXTENSION *X509_get_ext(X509 *x, int loc); -X509_EXTENSION *X509_delete_ext(X509 *x, int loc); -int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc); -void * X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx); -int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, - unsigned long flags); - -int X509_CRL_get_ext_count(X509_CRL *x); -int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos); -int X509_CRL_get_ext_by_OBJ(X509_CRL *x,ASN1_OBJECT *obj,int lastpos); -int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos); -X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc); -X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc); -int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc); -void * X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx); -int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, - unsigned long flags); - -int X509_REVOKED_get_ext_count(X509_REVOKED *x); -int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos); -int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x,ASN1_OBJECT *obj,int lastpos); -int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos); -X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc); -X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); -int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc); -void * X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx); -int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, - unsigned long flags); - -X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, - int nid, int crit, ASN1_OCTET_STRING *data); -X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex, - ASN1_OBJECT *obj,int crit,ASN1_OCTET_STRING *data); -int X509_EXTENSION_set_object(X509_EXTENSION *ex,ASN1_OBJECT *obj); -int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit); -int X509_EXTENSION_set_data(X509_EXTENSION *ex, - ASN1_OCTET_STRING *data); -ASN1_OBJECT * X509_EXTENSION_get_object(X509_EXTENSION *ex); -ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne); -int X509_EXTENSION_get_critical(X509_EXTENSION *ex); - -int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x); -int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid, - int lastpos); -int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk, ASN1_OBJECT *obj, - int lastpos); -X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc); -X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc); -STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, - X509_ATTRIBUTE *attr); -STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, - const ASN1_OBJECT *obj, int type, - const unsigned char *bytes, int len); -STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, - int nid, int type, - const unsigned char *bytes, int len); -STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, - const char *attrname, int type, - const unsigned char *bytes, int len); -void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, - ASN1_OBJECT *obj, int lastpos, int type); -X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, - int atrtype, const void *data, int len); -X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, - const ASN1_OBJECT *obj, int atrtype, const void *data, int len); -X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, - const char *atrname, int type, const unsigned char *bytes, int len); -int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj); -int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, const void *data, int len); -void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, - int atrtype, void *data); -int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr); -ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); -ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); - -int EVP_PKEY_get_attr_count(const EVP_PKEY *key); -int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, - int lastpos); -int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj, - int lastpos); -X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc); -X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc); -int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr); -int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, - const ASN1_OBJECT *obj, int type, - const unsigned char *bytes, int len); -int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, - int nid, int type, - const unsigned char *bytes, int len); -int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, - const char *attrname, int type, - const unsigned char *bytes, int len); - -int X509_verify_cert(X509_STORE_CTX *ctx); - -/* lookup a cert from a X509 STACK */ -X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk,X509_NAME *name, - ASN1_INTEGER *serial); -X509 *X509_find_by_subject(STACK_OF(X509) *sk,X509_NAME *name); - -DECLARE_ASN1_FUNCTIONS(PBEPARAM) -DECLARE_ASN1_FUNCTIONS(PBE2PARAM) -DECLARE_ASN1_FUNCTIONS(PBKDF2PARAM) - -X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt, int saltlen); -X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, - unsigned char *salt, int saltlen); - -/* PKCS#8 utilities */ - -DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO) - -EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8); -PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey); -PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken); -PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken); - -int X509_check_trust(X509 *x, int id, int flags); -int X509_TRUST_get_count(void); -X509_TRUST * X509_TRUST_get0(int idx); -int X509_TRUST_get_by_id(int id); -int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), - char *name, int arg1, void *arg2); -void X509_TRUST_cleanup(void); -int X509_TRUST_get_flags(X509_TRUST *xp); -char *X509_TRUST_get0_name(X509_TRUST *xp); -int X509_TRUST_get_trust(X509_TRUST *xp); - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_X509_strings(void); - -/* Error codes for the X509 functions. */ - -/* Function codes. */ -#define X509_F_ADD_CERT_DIR 100 -#define X509_F_BY_FILE_CTRL 101 -#define X509_F_CHECK_POLICY 145 -#define X509_F_DIR_CTRL 102 -#define X509_F_GET_CERT_BY_SUBJECT 103 -#define X509_F_NETSCAPE_SPKI_B64_DECODE 129 -#define X509_F_NETSCAPE_SPKI_B64_ENCODE 130 -#define X509_F_X509AT_ADD1_ATTR 135 -#define X509_F_X509V3_ADD_EXT 104 -#define X509_F_X509_ATTRIBUTE_CREATE_BY_NID 136 -#define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ 137 -#define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT 140 -#define X509_F_X509_ATTRIBUTE_GET0_DATA 139 -#define X509_F_X509_ATTRIBUTE_SET1_DATA 138 -#define X509_F_X509_CHECK_PRIVATE_KEY 128 -#define X509_F_X509_CRL_PRINT_FP 147 -#define X509_F_X509_EXTENSION_CREATE_BY_NID 108 -#define X509_F_X509_EXTENSION_CREATE_BY_OBJ 109 -#define X509_F_X509_GET_PUBKEY_PARAMETERS 110 -#define X509_F_X509_LOAD_CERT_CRL_FILE 132 -#define X509_F_X509_LOAD_CERT_FILE 111 -#define X509_F_X509_LOAD_CRL_FILE 112 -#define X509_F_X509_NAME_ADD_ENTRY 113 -#define X509_F_X509_NAME_ENTRY_CREATE_BY_NID 114 -#define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT 131 -#define X509_F_X509_NAME_ENTRY_SET_OBJECT 115 -#define X509_F_X509_NAME_ONELINE 116 -#define X509_F_X509_NAME_PRINT 117 -#define X509_F_X509_PRINT_EX_FP 118 -#define X509_F_X509_PUBKEY_GET 119 -#define X509_F_X509_PUBKEY_SET 120 -#define X509_F_X509_REQ_CHECK_PRIVATE_KEY 144 -#define X509_F_X509_REQ_PRINT_EX 121 -#define X509_F_X509_REQ_PRINT_FP 122 -#define X509_F_X509_REQ_TO_X509 123 -#define X509_F_X509_STORE_ADD_CERT 124 -#define X509_F_X509_STORE_ADD_CRL 125 -#define X509_F_X509_STORE_CTX_GET1_ISSUER 146 -#define X509_F_X509_STORE_CTX_INIT 143 -#define X509_F_X509_STORE_CTX_NEW 142 -#define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 134 -#define X509_F_X509_TO_X509_REQ 126 -#define X509_F_X509_TRUST_ADD 133 -#define X509_F_X509_TRUST_SET 141 -#define X509_F_X509_VERIFY_CERT 127 - -/* Reason codes. */ -#define X509_R_BAD_X509_FILETYPE 100 -#define X509_R_BASE64_DECODE_ERROR 118 -#define X509_R_CANT_CHECK_DH_KEY 114 -#define X509_R_CERT_ALREADY_IN_HASH_TABLE 101 -#define X509_R_ERR_ASN1_LIB 102 -#define X509_R_INVALID_DIRECTORY 113 -#define X509_R_INVALID_FIELD_NAME 119 -#define X509_R_INVALID_TRUST 123 -#define X509_R_KEY_TYPE_MISMATCH 115 -#define X509_R_KEY_VALUES_MISMATCH 116 -#define X509_R_LOADING_CERT_DIR 103 -#define X509_R_LOADING_DEFAULTS 104 -#define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105 -#define X509_R_SHOULD_RETRY 106 -#define X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN 107 -#define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY 108 -#define X509_R_UNKNOWN_KEY_TYPE 117 -#define X509_R_UNKNOWN_NID 109 -#define X509_R_UNKNOWN_PURPOSE_ID 121 -#define X509_R_UNKNOWN_TRUST_ID 120 -#define X509_R_UNSUPPORTED_ALGORITHM 111 -#define X509_R_WRONG_LOOKUP_TYPE 112 -#define X509_R_WRONG_TYPE 122 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/openssl/x509_vfy.h b/externals/openssl/x509_vfy.h deleted file mode 100644 index 053920a458..0000000000 --- a/externals/openssl/x509_vfy.h +++ /dev/null @@ -1,532 +0,0 @@ -/* crypto/x509/x509_vfy.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_X509_H -#include -/* openssl/x509.h ends up #include-ing this file at about the only - * appropriate moment. */ -#endif - -#ifndef HEADER_X509_VFY_H -#define HEADER_X509_VFY_H - -#include -#ifndef OPENSSL_NO_LHASH -#include -#endif -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Outer object */ -typedef struct x509_hash_dir_st - { - int num_dirs; - char **dirs; - int *dirs_type; - int num_dirs_alloced; - } X509_HASH_DIR_CTX; - -typedef struct x509_file_st - { - int num_paths; /* number of paths to files or directories */ - int num_alloced; - char **paths; /* the list of paths or directories */ - int *path_type; - } X509_CERT_FILE_CTX; - -/*******************************/ -/* -SSL_CTX -> X509_STORE - -> X509_LOOKUP - ->X509_LOOKUP_METHOD - -> X509_LOOKUP - ->X509_LOOKUP_METHOD - -SSL -> X509_STORE_CTX - ->X509_STORE - -The X509_STORE holds the tables etc for verification stuff. -A X509_STORE_CTX is used while validating a single certificate. -The X509_STORE has X509_LOOKUPs for looking up certs. -The X509_STORE then calls a function to actually verify the -certificate chain. -*/ - -#define X509_LU_RETRY -1 -#define X509_LU_FAIL 0 -#define X509_LU_X509 1 -#define X509_LU_CRL 2 -#define X509_LU_PKEY 3 - -typedef struct x509_object_st - { - /* one of the above types */ - int type; - union { - char *ptr; - X509 *x509; - X509_CRL *crl; - EVP_PKEY *pkey; - } data; - } X509_OBJECT; - -typedef struct x509_lookup_st X509_LOOKUP; - -DECLARE_STACK_OF(X509_LOOKUP) -DECLARE_STACK_OF(X509_OBJECT) - -/* This is a static that defines the function interface */ -typedef struct x509_lookup_method_st - { - const char *name; - int (*new_item)(X509_LOOKUP *ctx); - void (*free)(X509_LOOKUP *ctx); - int (*init)(X509_LOOKUP *ctx); - int (*shutdown)(X509_LOOKUP *ctx); - int (*ctrl)(X509_LOOKUP *ctx,int cmd,const char *argc,long argl, - char **ret); - int (*get_by_subject)(X509_LOOKUP *ctx,int type,X509_NAME *name, - X509_OBJECT *ret); - int (*get_by_issuer_serial)(X509_LOOKUP *ctx,int type,X509_NAME *name, - ASN1_INTEGER *serial,X509_OBJECT *ret); - int (*get_by_fingerprint)(X509_LOOKUP *ctx,int type, - unsigned char *bytes,int len, - X509_OBJECT *ret); - int (*get_by_alias)(X509_LOOKUP *ctx,int type,char *str,int len, - X509_OBJECT *ret); - } X509_LOOKUP_METHOD; - -/* This structure hold all parameters associated with a verify operation - * by including an X509_VERIFY_PARAM structure in related structures the - * parameters used can be customized - */ - -typedef struct X509_VERIFY_PARAM_st - { - char *name; - time_t check_time; /* Time to use */ - unsigned long inh_flags; /* Inheritance flags */ - unsigned long flags; /* Various verify flags */ - int purpose; /* purpose to check untrusted certificates */ - int trust; /* trust setting to check */ - int depth; /* Verify depth */ - STACK_OF(ASN1_OBJECT) *policies; /* Permissible policies */ - } X509_VERIFY_PARAM; - -DECLARE_STACK_OF(X509_VERIFY_PARAM) - -/* This is used to hold everything. It is used for all certificate - * validation. Once we have a certificate chain, the 'verify' - * function is then called to actually check the cert chain. */ -struct x509_store_st - { - /* The following is a cache of trusted certs */ - int cache; /* if true, stash any hits */ - STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */ - - /* These are external lookup methods */ - STACK_OF(X509_LOOKUP) *get_cert_methods; - - X509_VERIFY_PARAM *param; - - /* Callbacks for various operations */ - int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */ - int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */ - int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */ - int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */ - int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */ - int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */ - int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */ - int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */ - int (*cleanup)(X509_STORE_CTX *ctx); - - CRYPTO_EX_DATA ex_data; - int references; - } /* X509_STORE */; - -int X509_STORE_set_depth(X509_STORE *store, int depth); - -#define X509_STORE_set_verify_cb_func(ctx,func) ((ctx)->verify_cb=(func)) -#define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func)) - -/* This is the functions plus an instance of the local variables. */ -struct x509_lookup_st - { - int init; /* have we been started */ - int skip; /* don't use us. */ - X509_LOOKUP_METHOD *method; /* the functions */ - char *method_data; /* method data */ - - X509_STORE *store_ctx; /* who owns us */ - } /* X509_LOOKUP */; - -/* This is a used when verifying cert chains. Since the - * gathering of the cert chain can take some time (and have to be - * 'retried', this needs to be kept and passed around. */ -struct x509_store_ctx_st /* X509_STORE_CTX */ - { - X509_STORE *ctx; - int current_method; /* used when looking up certs */ - - /* The following are set by the caller */ - X509 *cert; /* The cert to check */ - STACK_OF(X509) *untrusted; /* chain of X509s - untrusted - passed in */ - STACK_OF(X509_CRL) *crls; /* set of CRLs passed in */ - - X509_VERIFY_PARAM *param; - void *other_ctx; /* Other info for use with get_issuer() */ - - /* Callbacks for various operations */ - int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */ - int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */ - int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */ - int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */ - int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */ - int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */ - int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */ - int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */ - int (*check_policy)(X509_STORE_CTX *ctx); - int (*cleanup)(X509_STORE_CTX *ctx); - - /* The following is built up */ - int valid; /* if 0, rebuild chain */ - int last_untrusted; /* index of last untrusted cert */ - STACK_OF(X509) *chain; /* chain of X509s - built up and trusted */ - X509_POLICY_TREE *tree; /* Valid policy tree */ - - int explicit_policy; /* Require explicit policy value */ - - /* When something goes wrong, this is why */ - int error_depth; - int error; - X509 *current_cert; - X509 *current_issuer; /* cert currently being tested as valid issuer */ - X509_CRL *current_crl; /* current CRL */ - - CRYPTO_EX_DATA ex_data; - } /* X509_STORE_CTX */; - -void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth); - -#define X509_STORE_CTX_set_app_data(ctx,data) \ - X509_STORE_CTX_set_ex_data(ctx,0,data) -#define X509_STORE_CTX_get_app_data(ctx) \ - X509_STORE_CTX_get_ex_data(ctx,0) - -#define X509_L_FILE_LOAD 1 -#define X509_L_ADD_DIR 2 - -#define X509_LOOKUP_load_file(x,name,type) \ - X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL) - -#define X509_LOOKUP_add_dir(x,name,type) \ - X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL) - -#define X509_V_OK 0 -/* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */ - -#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 -#define X509_V_ERR_UNABLE_TO_GET_CRL 3 -#define X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE 4 -#define X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE 5 -#define X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 6 -#define X509_V_ERR_CERT_SIGNATURE_FAILURE 7 -#define X509_V_ERR_CRL_SIGNATURE_FAILURE 8 -#define X509_V_ERR_CERT_NOT_YET_VALID 9 -#define X509_V_ERR_CERT_HAS_EXPIRED 10 -#define X509_V_ERR_CRL_NOT_YET_VALID 11 -#define X509_V_ERR_CRL_HAS_EXPIRED 12 -#define X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD 13 -#define X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD 14 -#define X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD 15 -#define X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD 16 -#define X509_V_ERR_OUT_OF_MEM 17 -#define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT 18 -#define X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN 19 -#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY 20 -#define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21 -#define X509_V_ERR_CERT_CHAIN_TOO_LONG 22 -#define X509_V_ERR_CERT_REVOKED 23 -#define X509_V_ERR_INVALID_CA 24 -#define X509_V_ERR_PATH_LENGTH_EXCEEDED 25 -#define X509_V_ERR_INVALID_PURPOSE 26 -#define X509_V_ERR_CERT_UNTRUSTED 27 -#define X509_V_ERR_CERT_REJECTED 28 -/* These are 'informational' when looking for issuer cert */ -#define X509_V_ERR_SUBJECT_ISSUER_MISMATCH 29 -#define X509_V_ERR_AKID_SKID_MISMATCH 30 -#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31 -#define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32 - -#define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33 -#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 -#define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35 -#define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36 -#define X509_V_ERR_INVALID_NON_CA 37 -#define X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED 38 -#define X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE 39 -#define X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED 40 - -#define X509_V_ERR_INVALID_EXTENSION 41 -#define X509_V_ERR_INVALID_POLICY_EXTENSION 42 -#define X509_V_ERR_NO_EXPLICIT_POLICY 43 - -#define X509_V_ERR_UNNESTED_RESOURCE 44 - -/* The application is not happy */ -#define X509_V_ERR_APPLICATION_VERIFICATION 50 - -/* Certificate verify flags */ - -/* Send issuer+subject checks to verify_cb */ -#define X509_V_FLAG_CB_ISSUER_CHECK 0x1 -/* Use check time instead of current time */ -#define X509_V_FLAG_USE_CHECK_TIME 0x2 -/* Lookup CRLs */ -#define X509_V_FLAG_CRL_CHECK 0x4 -/* Lookup CRLs for whole chain */ -#define X509_V_FLAG_CRL_CHECK_ALL 0x8 -/* Ignore unhandled critical extensions */ -#define X509_V_FLAG_IGNORE_CRITICAL 0x10 -/* Disable workarounds for broken certificates */ -#define X509_V_FLAG_X509_STRICT 0x20 -/* Enable proxy certificate validation */ -#define X509_V_FLAG_ALLOW_PROXY_CERTS 0x40 -/* Enable policy checking */ -#define X509_V_FLAG_POLICY_CHECK 0x80 -/* Policy variable require-explicit-policy */ -#define X509_V_FLAG_EXPLICIT_POLICY 0x100 -/* Policy variable inhibit-any-policy */ -#define X509_V_FLAG_INHIBIT_ANY 0x200 -/* Policy variable inhibit-policy-mapping */ -#define X509_V_FLAG_INHIBIT_MAP 0x400 -/* Notify callback that policy is OK */ -#define X509_V_FLAG_NOTIFY_POLICY 0x800 - -#define X509_VP_FLAG_DEFAULT 0x1 -#define X509_VP_FLAG_OVERWRITE 0x2 -#define X509_VP_FLAG_RESET_FLAGS 0x4 -#define X509_VP_FLAG_LOCKED 0x8 -#define X509_VP_FLAG_ONCE 0x10 - -/* Internal use: mask of policy related options */ -#define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \ - | X509_V_FLAG_EXPLICIT_POLICY \ - | X509_V_FLAG_INHIBIT_ANY \ - | X509_V_FLAG_INHIBIT_MAP) - -int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type, - X509_NAME *name); -X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h,int type,X509_NAME *name); -X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x); -void X509_OBJECT_up_ref_count(X509_OBJECT *a); -void X509_OBJECT_free_contents(X509_OBJECT *a); -X509_STORE *X509_STORE_new(void ); -void X509_STORE_free(X509_STORE *v); - -int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags); -int X509_STORE_set_purpose(X509_STORE *ctx, int purpose); -int X509_STORE_set_trust(X509_STORE *ctx, int trust); -int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm); - -X509_STORE_CTX *X509_STORE_CTX_new(void); - -int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); - -void X509_STORE_CTX_free(X509_STORE_CTX *ctx); -int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, - X509 *x509, STACK_OF(X509) *chain); -void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); -void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); - -X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m); - -X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void); -X509_LOOKUP_METHOD *X509_LOOKUP_file(void); - -int X509_STORE_add_cert(X509_STORE *ctx, X509 *x); -int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x); - -int X509_STORE_get_by_subject(X509_STORE_CTX *vs,int type,X509_NAME *name, - X509_OBJECT *ret); - -int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, - long argl, char **ret); - -#ifndef OPENSSL_NO_STDIO -int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type); -int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); -int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type); -#endif - - -X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method); -void X509_LOOKUP_free(X509_LOOKUP *ctx); -int X509_LOOKUP_init(X509_LOOKUP *ctx); -int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name, - X509_OBJECT *ret); -int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, - ASN1_INTEGER *serial, X509_OBJECT *ret); -int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, - unsigned char *bytes, int len, X509_OBJECT *ret); -int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, - int len, X509_OBJECT *ret); -int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); - -#ifndef OPENSSL_NO_STDIO -int X509_STORE_load_locations (X509_STORE *ctx, - const char *file, const char *dir); -int X509_STORE_set_default_paths(X509_STORE *ctx); -#endif - -int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx,int idx,void *data); -void * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx); -int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); -void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s); -int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); -X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); -STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx); -STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx); -void X509_STORE_CTX_set_cert(X509_STORE_CTX *c,X509 *x); -void X509_STORE_CTX_set_chain(X509_STORE_CTX *c,STACK_OF(X509) *sk); -void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c,STACK_OF(X509_CRL) *sk); -int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose); -int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust); -int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, - int purpose, int trust); -void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags); -void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags, - time_t t); -void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, - int (*verify_cb)(int, X509_STORE_CTX *)); - -X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx); -int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx); - -X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx); -void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param); -int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name); - -/* X509_VERIFY_PARAM functions */ - -X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void); -void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param); -int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to, - const X509_VERIFY_PARAM *from); -int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to, - const X509_VERIFY_PARAM *from); -int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name); -int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, unsigned long flags); -int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param, - unsigned long flags); -unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param); -int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose); -int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust); -void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth); -void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t); -int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param, - ASN1_OBJECT *policy); -int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, - STACK_OF(ASN1_OBJECT) *policies); -int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param); - -int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param); -const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name); -void X509_VERIFY_PARAM_table_cleanup(void); - -int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy, - STACK_OF(X509) *certs, - STACK_OF(ASN1_OBJECT) *policy_oids, - unsigned int flags); - -void X509_policy_tree_free(X509_POLICY_TREE *tree); - -int X509_policy_tree_level_count(const X509_POLICY_TREE *tree); -X509_POLICY_LEVEL * - X509_policy_tree_get0_level(const X509_POLICY_TREE *tree, int i); - -STACK_OF(X509_POLICY_NODE) * - X509_policy_tree_get0_policies(const X509_POLICY_TREE *tree); - -STACK_OF(X509_POLICY_NODE) * - X509_policy_tree_get0_user_policies(const X509_POLICY_TREE *tree); - -int X509_policy_level_node_count(X509_POLICY_LEVEL *level); - -X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level, int i); - -const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node); - -STACK_OF(POLICYQUALINFO) * - X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node); -const X509_POLICY_NODE * - X509_policy_node_get0_parent(const X509_POLICY_NODE *node); - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/externals/openssl/x509v3.h b/externals/openssl/x509v3.h deleted file mode 100644 index 9ef83da755..0000000000 --- a/externals/openssl/x509v3.h +++ /dev/null @@ -1,922 +0,0 @@ -/* x509v3.h */ -/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL - * project 1999. - */ -/* ==================================================================== - * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -#ifndef HEADER_X509V3_H -#define HEADER_X509V3_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward reference */ -struct v3_ext_method; -struct v3_ext_ctx; - -/* Useful typedefs */ - -typedef void * (*X509V3_EXT_NEW)(void); -typedef void (*X509V3_EXT_FREE)(void *); -typedef void * (*X509V3_EXT_D2I)(void *, const unsigned char ** , long); -typedef int (*X509V3_EXT_I2D)(void *, unsigned char **); -typedef STACK_OF(CONF_VALUE) * (*X509V3_EXT_I2V)(struct v3_ext_method *method, void *ext, STACK_OF(CONF_VALUE) *extlist); -typedef void * (*X509V3_EXT_V2I)(struct v3_ext_method *method, struct v3_ext_ctx *ctx, STACK_OF(CONF_VALUE) *values); -typedef char * (*X509V3_EXT_I2S)(struct v3_ext_method *method, void *ext); -typedef void * (*X509V3_EXT_S2I)(struct v3_ext_method *method, struct v3_ext_ctx *ctx, const char *str); -typedef int (*X509V3_EXT_I2R)(struct v3_ext_method *method, void *ext, BIO *out, int indent); -typedef void * (*X509V3_EXT_R2I)(struct v3_ext_method *method, struct v3_ext_ctx *ctx, const char *str); - -/* V3 extension structure */ - -struct v3_ext_method { -int ext_nid; -int ext_flags; -/* If this is set the following four fields are ignored */ -ASN1_ITEM_EXP *it; -/* Old style ASN1 calls */ -X509V3_EXT_NEW ext_new; -X509V3_EXT_FREE ext_free; -X509V3_EXT_D2I d2i; -X509V3_EXT_I2D i2d; - -/* The following pair is used for string extensions */ -X509V3_EXT_I2S i2s; -X509V3_EXT_S2I s2i; - -/* The following pair is used for multi-valued extensions */ -X509V3_EXT_I2V i2v; -X509V3_EXT_V2I v2i; - -/* The following are used for raw extensions */ -X509V3_EXT_I2R i2r; -X509V3_EXT_R2I r2i; - -void *usr_data; /* Any extension specific data */ -}; - -typedef struct X509V3_CONF_METHOD_st { -char * (*get_string)(void *db, char *section, char *value); -STACK_OF(CONF_VALUE) * (*get_section)(void *db, char *section); -void (*free_string)(void *db, char * string); -void (*free_section)(void *db, STACK_OF(CONF_VALUE) *section); -} X509V3_CONF_METHOD; - -/* Context specific info */ -struct v3_ext_ctx { -#define CTX_TEST 0x1 -int flags; -X509 *issuer_cert; -X509 *subject_cert; -X509_REQ *subject_req; -X509_CRL *crl; -X509V3_CONF_METHOD *db_meth; -void *db; -/* Maybe more here */ -}; - -typedef struct v3_ext_method X509V3_EXT_METHOD; - -DECLARE_STACK_OF(X509V3_EXT_METHOD) - -/* ext_flags values */ -#define X509V3_EXT_DYNAMIC 0x1 -#define X509V3_EXT_CTX_DEP 0x2 -#define X509V3_EXT_MULTILINE 0x4 - -typedef BIT_STRING_BITNAME ENUMERATED_NAMES; - -typedef struct BASIC_CONSTRAINTS_st { -int ca; -ASN1_INTEGER *pathlen; -} BASIC_CONSTRAINTS; - - -typedef struct PKEY_USAGE_PERIOD_st { -ASN1_GENERALIZEDTIME *notBefore; -ASN1_GENERALIZEDTIME *notAfter; -} PKEY_USAGE_PERIOD; - -typedef struct otherName_st { -ASN1_OBJECT *type_id; -ASN1_TYPE *value; -} OTHERNAME; - -typedef struct EDIPartyName_st { - ASN1_STRING *nameAssigner; - ASN1_STRING *partyName; -} EDIPARTYNAME; - -typedef struct GENERAL_NAME_st { - -#define GEN_OTHERNAME 0 -#define GEN_EMAIL 1 -#define GEN_DNS 2 -#define GEN_X400 3 -#define GEN_DIRNAME 4 -#define GEN_EDIPARTY 5 -#define GEN_URI 6 -#define GEN_IPADD 7 -#define GEN_RID 8 - -int type; -union { - char *ptr; - OTHERNAME *otherName; /* otherName */ - ASN1_IA5STRING *rfc822Name; - ASN1_IA5STRING *dNSName; - ASN1_TYPE *x400Address; - X509_NAME *directoryName; - EDIPARTYNAME *ediPartyName; - ASN1_IA5STRING *uniformResourceIdentifier; - ASN1_OCTET_STRING *iPAddress; - ASN1_OBJECT *registeredID; - - /* Old names */ - ASN1_OCTET_STRING *ip; /* iPAddress */ - X509_NAME *dirn; /* dirn */ - ASN1_IA5STRING *ia5;/* rfc822Name, dNSName, uniformResourceIdentifier */ - ASN1_OBJECT *rid; /* registeredID */ - ASN1_TYPE *other; /* x400Address */ -} d; -} GENERAL_NAME; - -typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES; - -typedef struct ACCESS_DESCRIPTION_st { - ASN1_OBJECT *method; - GENERAL_NAME *location; -} ACCESS_DESCRIPTION; - -typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS; - -typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE; - -DECLARE_STACK_OF(GENERAL_NAME) -DECLARE_ASN1_SET_OF(GENERAL_NAME) - -DECLARE_STACK_OF(ACCESS_DESCRIPTION) -DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) - -typedef struct DIST_POINT_NAME_st { -int type; -union { - GENERAL_NAMES *fullname; - STACK_OF(X509_NAME_ENTRY) *relativename; -} name; -} DIST_POINT_NAME; - -typedef struct DIST_POINT_st { -DIST_POINT_NAME *distpoint; -ASN1_BIT_STRING *reasons; -GENERAL_NAMES *CRLissuer; -} DIST_POINT; - -typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS; - -DECLARE_STACK_OF(DIST_POINT) -DECLARE_ASN1_SET_OF(DIST_POINT) - -typedef struct AUTHORITY_KEYID_st { -ASN1_OCTET_STRING *keyid; -GENERAL_NAMES *issuer; -ASN1_INTEGER *serial; -} AUTHORITY_KEYID; - -/* Strong extranet structures */ - -typedef struct SXNET_ID_st { - ASN1_INTEGER *zone; - ASN1_OCTET_STRING *user; -} SXNETID; - -DECLARE_STACK_OF(SXNETID) -DECLARE_ASN1_SET_OF(SXNETID) - -typedef struct SXNET_st { - ASN1_INTEGER *version; - STACK_OF(SXNETID) *ids; -} SXNET; - -typedef struct NOTICEREF_st { - ASN1_STRING *organization; - STACK_OF(ASN1_INTEGER) *noticenos; -} NOTICEREF; - -typedef struct USERNOTICE_st { - NOTICEREF *noticeref; - ASN1_STRING *exptext; -} USERNOTICE; - -typedef struct POLICYQUALINFO_st { - ASN1_OBJECT *pqualid; - union { - ASN1_IA5STRING *cpsuri; - USERNOTICE *usernotice; - ASN1_TYPE *other; - } d; -} POLICYQUALINFO; - -DECLARE_STACK_OF(POLICYQUALINFO) -DECLARE_ASN1_SET_OF(POLICYQUALINFO) - -typedef struct POLICYINFO_st { - ASN1_OBJECT *policyid; - STACK_OF(POLICYQUALINFO) *qualifiers; -} POLICYINFO; - -typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES; - -DECLARE_STACK_OF(POLICYINFO) -DECLARE_ASN1_SET_OF(POLICYINFO) - -typedef struct POLICY_MAPPING_st { - ASN1_OBJECT *issuerDomainPolicy; - ASN1_OBJECT *subjectDomainPolicy; -} POLICY_MAPPING; - -DECLARE_STACK_OF(POLICY_MAPPING) - -typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS; - -typedef struct GENERAL_SUBTREE_st { - GENERAL_NAME *base; - ASN1_INTEGER *minimum; - ASN1_INTEGER *maximum; -} GENERAL_SUBTREE; - -DECLARE_STACK_OF(GENERAL_SUBTREE) - -typedef struct NAME_CONSTRAINTS_st { - STACK_OF(GENERAL_SUBTREE) *permittedSubtrees; - STACK_OF(GENERAL_SUBTREE) *excludedSubtrees; -} NAME_CONSTRAINTS; - -typedef struct POLICY_CONSTRAINTS_st { - ASN1_INTEGER *requireExplicitPolicy; - ASN1_INTEGER *inhibitPolicyMapping; -} POLICY_CONSTRAINTS; - -/* Proxy certificate structures, see RFC 3820 */ -typedef struct PROXY_POLICY_st - { - ASN1_OBJECT *policyLanguage; - ASN1_OCTET_STRING *policy; - } PROXY_POLICY; - -typedef struct PROXY_CERT_INFO_EXTENSION_st - { - ASN1_INTEGER *pcPathLengthConstraint; - PROXY_POLICY *proxyPolicy; - } PROXY_CERT_INFO_EXTENSION; - -DECLARE_ASN1_FUNCTIONS(PROXY_POLICY) -DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) - - -#define X509V3_conf_err(val) ERR_add_error_data(6, "section:", val->section, \ -",name:", val->name, ",value:", val->value); - -#define X509V3_set_ctx_test(ctx) \ - X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST) -#define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL; - -#define EXT_BITSTRING(nid, table) { nid, 0, ASN1_ITEM_ref(ASN1_BIT_STRING), \ - 0,0,0,0, \ - 0,0, \ - (X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \ - (X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \ - NULL, NULL, \ - table} - -#define EXT_IA5STRING(nid) { nid, 0, ASN1_ITEM_ref(ASN1_IA5STRING), \ - 0,0,0,0, \ - (X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \ - (X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \ - 0,0,0,0, \ - NULL} - -#define EXT_END { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - - -/* X509_PURPOSE stuff */ - -#define EXFLAG_BCONS 0x1 -#define EXFLAG_KUSAGE 0x2 -#define EXFLAG_XKUSAGE 0x4 -#define EXFLAG_NSCERT 0x8 - -#define EXFLAG_CA 0x10 -/* Really self issued not necessarily self signed */ -#define EXFLAG_SI 0x20 -#define EXFLAG_SS 0x20 -#define EXFLAG_V1 0x40 -#define EXFLAG_INVALID 0x80 -#define EXFLAG_SET 0x100 -#define EXFLAG_CRITICAL 0x200 -#define EXFLAG_PROXY 0x400 - -#define EXFLAG_INVALID_POLICY 0x800 - -#define KU_DIGITAL_SIGNATURE 0x0080 -#define KU_NON_REPUDIATION 0x0040 -#define KU_KEY_ENCIPHERMENT 0x0020 -#define KU_DATA_ENCIPHERMENT 0x0010 -#define KU_KEY_AGREEMENT 0x0008 -#define KU_KEY_CERT_SIGN 0x0004 -#define KU_CRL_SIGN 0x0002 -#define KU_ENCIPHER_ONLY 0x0001 -#define KU_DECIPHER_ONLY 0x8000 - -#define NS_SSL_CLIENT 0x80 -#define NS_SSL_SERVER 0x40 -#define NS_SMIME 0x20 -#define NS_OBJSIGN 0x10 -#define NS_SSL_CA 0x04 -#define NS_SMIME_CA 0x02 -#define NS_OBJSIGN_CA 0x01 -#define NS_ANY_CA (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA) - -#define XKU_SSL_SERVER 0x1 -#define XKU_SSL_CLIENT 0x2 -#define XKU_SMIME 0x4 -#define XKU_CODE_SIGN 0x8 -#define XKU_SGC 0x10 -#define XKU_OCSP_SIGN 0x20 -#define XKU_TIMESTAMP 0x40 -#define XKU_DVCS 0x80 - -#define X509_PURPOSE_DYNAMIC 0x1 -#define X509_PURPOSE_DYNAMIC_NAME 0x2 - -typedef struct x509_purpose_st { - int purpose; - int trust; /* Default trust ID */ - int flags; - int (*check_purpose)(const struct x509_purpose_st *, - const X509 *, int); - char *name; - char *sname; - void *usr_data; -} X509_PURPOSE; - -#define X509_PURPOSE_SSL_CLIENT 1 -#define X509_PURPOSE_SSL_SERVER 2 -#define X509_PURPOSE_NS_SSL_SERVER 3 -#define X509_PURPOSE_SMIME_SIGN 4 -#define X509_PURPOSE_SMIME_ENCRYPT 5 -#define X509_PURPOSE_CRL_SIGN 6 -#define X509_PURPOSE_ANY 7 -#define X509_PURPOSE_OCSP_HELPER 8 - -#define X509_PURPOSE_MIN 1 -#define X509_PURPOSE_MAX 8 - -/* Flags for X509V3_EXT_print() */ - -#define X509V3_EXT_UNKNOWN_MASK (0xfL << 16) -/* Return error for unknown extensions */ -#define X509V3_EXT_DEFAULT 0 -/* Print error for unknown extensions */ -#define X509V3_EXT_ERROR_UNKNOWN (1L << 16) -/* ASN1 parse unknown extensions */ -#define X509V3_EXT_PARSE_UNKNOWN (2L << 16) -/* BIO_dump unknown extensions */ -#define X509V3_EXT_DUMP_UNKNOWN (3L << 16) - -/* Flags for X509V3_add1_i2d */ - -#define X509V3_ADD_OP_MASK 0xfL -#define X509V3_ADD_DEFAULT 0L -#define X509V3_ADD_APPEND 1L -#define X509V3_ADD_REPLACE 2L -#define X509V3_ADD_REPLACE_EXISTING 3L -#define X509V3_ADD_KEEP_EXISTING 4L -#define X509V3_ADD_DELETE 5L -#define X509V3_ADD_SILENT 0x10 - -DECLARE_STACK_OF(X509_PURPOSE) - -DECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS) - -DECLARE_ASN1_FUNCTIONS(SXNET) -DECLARE_ASN1_FUNCTIONS(SXNETID) - -int SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen); -int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen); -int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, char *user, int userlen); - -ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, char *zone); -ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone); -ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone); - -DECLARE_ASN1_FUNCTIONS(AUTHORITY_KEYID) - -DECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) - -DECLARE_ASN1_FUNCTIONS(GENERAL_NAME) - - -ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, - X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); -STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, - ASN1_BIT_STRING *bits, - STACK_OF(CONF_VALUE) *extlist); - -STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, GENERAL_NAME *gen, STACK_OF(CONF_VALUE) *ret); -int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen); - -DECLARE_ASN1_FUNCTIONS(GENERAL_NAMES) - -STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, - GENERAL_NAMES *gen, STACK_OF(CONF_VALUE) *extlist); -GENERAL_NAMES *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method, - X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); - -DECLARE_ASN1_FUNCTIONS(OTHERNAME) -DECLARE_ASN1_FUNCTIONS(EDIPARTYNAME) - -char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5); -ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); - -DECLARE_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE) -int i2a_ACCESS_DESCRIPTION(BIO *bp, ACCESS_DESCRIPTION* a); - -DECLARE_ASN1_FUNCTIONS(CERTIFICATEPOLICIES) -DECLARE_ASN1_FUNCTIONS(POLICYINFO) -DECLARE_ASN1_FUNCTIONS(POLICYQUALINFO) -DECLARE_ASN1_FUNCTIONS(USERNOTICE) -DECLARE_ASN1_FUNCTIONS(NOTICEREF) - -DECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS) -DECLARE_ASN1_FUNCTIONS(DIST_POINT) -DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME) - -DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) -DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) - -DECLARE_ASN1_ITEM(POLICY_MAPPING) -DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING) -DECLARE_ASN1_ITEM(POLICY_MAPPINGS) - -DECLARE_ASN1_ITEM(GENERAL_SUBTREE) -DECLARE_ASN1_ALLOC_FUNCTIONS(GENERAL_SUBTREE) - -DECLARE_ASN1_ITEM(NAME_CONSTRAINTS) -DECLARE_ASN1_ALLOC_FUNCTIONS(NAME_CONSTRAINTS) - -DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS) -DECLARE_ASN1_ITEM(POLICY_CONSTRAINTS) - -#ifdef HEADER_CONF_H -GENERAL_NAME *v2i_GENERAL_NAME(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, - CONF_VALUE *cnf); -GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out, X509V3_EXT_METHOD *method, - X509V3_CTX *ctx, CONF_VALUE *cnf, int is_nc); -void X509V3_conf_free(CONF_VALUE *val); - -X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, char *value); -X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, char *name, char *value); -int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, char *section, STACK_OF(X509_EXTENSION) **sk); -int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509 *cert); -int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_REQ *req); -int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl); - -X509_EXTENSION *X509V3_EXT_conf_nid(LHASH *conf, X509V3_CTX *ctx, int ext_nid, char *value); -X509_EXTENSION *X509V3_EXT_conf(LHASH *conf, X509V3_CTX *ctx, char *name, char *value); -int X509V3_EXT_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509 *cert); -int X509V3_EXT_REQ_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509_REQ *req); -int X509V3_EXT_CRL_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl); - -int X509V3_add_value_bool_nf(char *name, int asn1_bool, - STACK_OF(CONF_VALUE) **extlist); -int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool); -int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint); -void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf); -void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH *lhash); -#endif - -char * X509V3_get_string(X509V3_CTX *ctx, char *name, char *section); -STACK_OF(CONF_VALUE) * X509V3_get_section(X509V3_CTX *ctx, char *section); -void X509V3_string_free(X509V3_CTX *ctx, char *str); -void X509V3_section_free( X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section); -void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject, - X509_REQ *req, X509_CRL *crl, int flags); - -int X509V3_add_value(const char *name, const char *value, - STACK_OF(CONF_VALUE) **extlist); -int X509V3_add_value_uchar(const char *name, const unsigned char *value, - STACK_OF(CONF_VALUE) **extlist); -int X509V3_add_value_bool(const char *name, int asn1_bool, - STACK_OF(CONF_VALUE) **extlist); -int X509V3_add_value_int(const char *name, ASN1_INTEGER *aint, - STACK_OF(CONF_VALUE) **extlist); -char * i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, ASN1_INTEGER *aint); -ASN1_INTEGER * s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, char *value); -char * i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, ASN1_ENUMERATED *aint); -char * i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth, ASN1_ENUMERATED *aint); -int X509V3_EXT_add(X509V3_EXT_METHOD *ext); -int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist); -int X509V3_EXT_add_alias(int nid_to, int nid_from); -void X509V3_EXT_cleanup(void); - -X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext); -X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid); -int X509V3_add_standard_extensions(void); -STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line); -void *X509V3_EXT_d2i(X509_EXTENSION *ext); -void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx); - - -X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc); -int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, int crit, unsigned long flags); - -char *hex_to_string(unsigned char *buffer, long len); -unsigned char *string_to_hex(char *str, long *len); -int name_cmp(const char *name, const char *cmp); - -void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, - int ml); -int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent); -int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); - -int X509V3_extensions_print(BIO *out, char *title, STACK_OF(X509_EXTENSION) *exts, unsigned long flag, int indent); - -int X509_check_ca(X509 *x); -int X509_check_purpose(X509 *x, int id, int ca); -int X509_supported_extension(X509_EXTENSION *ex); -int X509_PURPOSE_set(int *p, int purpose); -int X509_check_issued(X509 *issuer, X509 *subject); -int X509_PURPOSE_get_count(void); -X509_PURPOSE * X509_PURPOSE_get0(int idx); -int X509_PURPOSE_get_by_sname(char *sname); -int X509_PURPOSE_get_by_id(int id); -int X509_PURPOSE_add(int id, int trust, int flags, - int (*ck)(const X509_PURPOSE *, const X509 *, int), - char *name, char *sname, void *arg); -char *X509_PURPOSE_get0_name(X509_PURPOSE *xp); -char *X509_PURPOSE_get0_sname(X509_PURPOSE *xp); -int X509_PURPOSE_get_trust(X509_PURPOSE *xp); -void X509_PURPOSE_cleanup(void); -int X509_PURPOSE_get_id(X509_PURPOSE *); - -STACK *X509_get1_email(X509 *x); -STACK *X509_REQ_get1_email(X509_REQ *x); -void X509_email_free(STACK *sk); -STACK *X509_get1_ocsp(X509 *x); - -ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc); -ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc); -int a2i_ipadd(unsigned char *ipout, const char *ipasc); -int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE)*dn_sk, - unsigned long chtype); - -void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent); - -#ifndef OPENSSL_NO_RFC3779 - -typedef struct ASRange_st { - ASN1_INTEGER *min, *max; -} ASRange; - -#define ASIdOrRange_id 0 -#define ASIdOrRange_range 1 - -typedef struct ASIdOrRange_st { - int type; - union { - ASN1_INTEGER *id; - ASRange *range; - } u; -} ASIdOrRange; - -typedef STACK_OF(ASIdOrRange) ASIdOrRanges; -DECLARE_STACK_OF(ASIdOrRange) - -#define ASIdentifierChoice_inherit 0 -#define ASIdentifierChoice_asIdsOrRanges 1 - -typedef struct ASIdentifierChoice_st { - int type; - union { - ASN1_NULL *inherit; - ASIdOrRanges *asIdsOrRanges; - } u; -} ASIdentifierChoice; - -typedef struct ASIdentifiers_st { - ASIdentifierChoice *asnum, *rdi; -} ASIdentifiers; - -DECLARE_ASN1_FUNCTIONS(ASRange) -DECLARE_ASN1_FUNCTIONS(ASIdOrRange) -DECLARE_ASN1_FUNCTIONS(ASIdentifierChoice) -DECLARE_ASN1_FUNCTIONS(ASIdentifiers) - - -typedef struct IPAddressRange_st { - ASN1_BIT_STRING *min, *max; -} IPAddressRange; - -#define IPAddressOrRange_addressPrefix 0 -#define IPAddressOrRange_addressRange 1 - -typedef struct IPAddressOrRange_st { - int type; - union { - ASN1_BIT_STRING *addressPrefix; - IPAddressRange *addressRange; - } u; -} IPAddressOrRange; - -typedef STACK_OF(IPAddressOrRange) IPAddressOrRanges; -DECLARE_STACK_OF(IPAddressOrRange) - -#define IPAddressChoice_inherit 0 -#define IPAddressChoice_addressesOrRanges 1 - -typedef struct IPAddressChoice_st { - int type; - union { - ASN1_NULL *inherit; - IPAddressOrRanges *addressesOrRanges; - } u; -} IPAddressChoice; - -typedef struct IPAddressFamily_st { - ASN1_OCTET_STRING *addressFamily; - IPAddressChoice *ipAddressChoice; -} IPAddressFamily; - -typedef STACK_OF(IPAddressFamily) IPAddrBlocks; -DECLARE_STACK_OF(IPAddressFamily) - -DECLARE_ASN1_FUNCTIONS(IPAddressRange) -DECLARE_ASN1_FUNCTIONS(IPAddressOrRange) -DECLARE_ASN1_FUNCTIONS(IPAddressChoice) -DECLARE_ASN1_FUNCTIONS(IPAddressFamily) - -/* - * API tag for elements of the ASIdentifer SEQUENCE. - */ -#define V3_ASID_ASNUM 0 -#define V3_ASID_RDI 1 - -/* - * AFI values, assigned by IANA. It'd be nice to make the AFI - * handling code totally generic, but there are too many little things - * that would need to be defined for other address families for it to - * be worth the trouble. - */ -#define IANA_AFI_IPV4 1 -#define IANA_AFI_IPV6 2 - -/* - * Utilities to construct and extract values from RFC3779 extensions, - * since some of the encodings (particularly for IP address prefixes - * and ranges) are a bit tedious to work with directly. - */ -int v3_asid_add_inherit(ASIdentifiers *asid, int which); -int v3_asid_add_id_or_range(ASIdentifiers *asid, int which, - ASN1_INTEGER *min, ASN1_INTEGER *max); -int v3_addr_add_inherit(IPAddrBlocks *addr, - const unsigned afi, const unsigned *safi); -int v3_addr_add_prefix(IPAddrBlocks *addr, - const unsigned afi, const unsigned *safi, - unsigned char *a, const int prefixlen); -int v3_addr_add_range(IPAddrBlocks *addr, - const unsigned afi, const unsigned *safi, - unsigned char *min, unsigned char *max); -unsigned v3_addr_get_afi(const IPAddressFamily *f); -int v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi, - unsigned char *min, unsigned char *max, - const int length); - -/* - * Canonical forms. - */ -int v3_asid_is_canonical(ASIdentifiers *asid); -int v3_addr_is_canonical(IPAddrBlocks *addr); -int v3_asid_canonize(ASIdentifiers *asid); -int v3_addr_canonize(IPAddrBlocks *addr); - -/* - * Tests for inheritance and containment. - */ -int v3_asid_inherits(ASIdentifiers *asid); -int v3_addr_inherits(IPAddrBlocks *addr); -int v3_asid_subset(ASIdentifiers *a, ASIdentifiers *b); -int v3_addr_subset(IPAddrBlocks *a, IPAddrBlocks *b); - -/* - * Check whether RFC 3779 extensions nest properly in chains. - */ -int v3_asid_validate_path(X509_STORE_CTX *); -int v3_addr_validate_path(X509_STORE_CTX *); -int v3_asid_validate_resource_set(STACK_OF(X509) *chain, - ASIdentifiers *ext, - int allow_inheritance); -int v3_addr_validate_resource_set(STACK_OF(X509) *chain, - IPAddrBlocks *ext, - int allow_inheritance); - -#endif /* OPENSSL_NO_RFC3779 */ - -/* BEGIN ERROR CODES */ -/* The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_X509V3_strings(void); - -/* Error codes for the X509V3 functions. */ - -/* Function codes. */ -#define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE 156 -#define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL 157 -#define X509V3_F_COPY_EMAIL 122 -#define X509V3_F_COPY_ISSUER 123 -#define X509V3_F_DO_DIRNAME 144 -#define X509V3_F_DO_EXT_CONF 124 -#define X509V3_F_DO_EXT_I2D 135 -#define X509V3_F_DO_EXT_NCONF 151 -#define X509V3_F_DO_I2V_NAME_CONSTRAINTS 148 -#define X509V3_F_HEX_TO_STRING 111 -#define X509V3_F_I2S_ASN1_ENUMERATED 121 -#define X509V3_F_I2S_ASN1_IA5STRING 149 -#define X509V3_F_I2S_ASN1_INTEGER 120 -#define X509V3_F_I2V_AUTHORITY_INFO_ACCESS 138 -#define X509V3_F_NOTICE_SECTION 132 -#define X509V3_F_NREF_NOS 133 -#define X509V3_F_POLICY_SECTION 131 -#define X509V3_F_PROCESS_PCI_VALUE 150 -#define X509V3_F_R2I_CERTPOL 130 -#define X509V3_F_R2I_PCI 155 -#define X509V3_F_S2I_ASN1_IA5STRING 100 -#define X509V3_F_S2I_ASN1_INTEGER 108 -#define X509V3_F_S2I_ASN1_OCTET_STRING 112 -#define X509V3_F_S2I_ASN1_SKEY_ID 114 -#define X509V3_F_S2I_SKEY_ID 115 -#define X509V3_F_STRING_TO_HEX 113 -#define X509V3_F_SXNET_ADD_ID_ASC 125 -#define X509V3_F_SXNET_ADD_ID_INTEGER 126 -#define X509V3_F_SXNET_ADD_ID_ULONG 127 -#define X509V3_F_SXNET_GET_ID_ASC 128 -#define X509V3_F_SXNET_GET_ID_ULONG 129 -#define X509V3_F_V2I_ASIDENTIFIERS 158 -#define X509V3_F_V2I_ASN1_BIT_STRING 101 -#define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 139 -#define X509V3_F_V2I_AUTHORITY_KEYID 119 -#define X509V3_F_V2I_BASIC_CONSTRAINTS 102 -#define X509V3_F_V2I_CRLD 134 -#define X509V3_F_V2I_EXTENDED_KEY_USAGE 103 -#define X509V3_F_V2I_GENERAL_NAMES 118 -#define X509V3_F_V2I_GENERAL_NAME_EX 117 -#define X509V3_F_V2I_IPADDRBLOCKS 159 -#define X509V3_F_V2I_ISSUER_ALT 153 -#define X509V3_F_V2I_NAME_CONSTRAINTS 147 -#define X509V3_F_V2I_POLICY_CONSTRAINTS 146 -#define X509V3_F_V2I_POLICY_MAPPINGS 145 -#define X509V3_F_V2I_SUBJECT_ALT 154 -#define X509V3_F_V3_ADDR_VALIDATE_PATH_INTERNAL 160 -#define X509V3_F_V3_GENERIC_EXTENSION 116 -#define X509V3_F_X509V3_ADD1_I2D 140 -#define X509V3_F_X509V3_ADD_VALUE 105 -#define X509V3_F_X509V3_EXT_ADD 104 -#define X509V3_F_X509V3_EXT_ADD_ALIAS 106 -#define X509V3_F_X509V3_EXT_CONF 107 -#define X509V3_F_X509V3_EXT_I2D 136 -#define X509V3_F_X509V3_EXT_NCONF 152 -#define X509V3_F_X509V3_GET_SECTION 142 -#define X509V3_F_X509V3_GET_STRING 143 -#define X509V3_F_X509V3_GET_VALUE_BOOL 110 -#define X509V3_F_X509V3_PARSE_LIST 109 -#define X509V3_F_X509_PURPOSE_ADD 137 -#define X509V3_F_X509_PURPOSE_SET 141 - -/* Reason codes. */ -#define X509V3_R_BAD_IP_ADDRESS 118 -#define X509V3_R_BAD_OBJECT 119 -#define X509V3_R_BN_DEC2BN_ERROR 100 -#define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 -#define X509V3_R_DIRNAME_ERROR 149 -#define X509V3_R_DUPLICATE_ZONE_ID 133 -#define X509V3_R_ERROR_CONVERTING_ZONE 131 -#define X509V3_R_ERROR_CREATING_EXTENSION 144 -#define X509V3_R_ERROR_IN_EXTENSION 128 -#define X509V3_R_EXPECTED_A_SECTION_NAME 137 -#define X509V3_R_EXTENSION_EXISTS 145 -#define X509V3_R_EXTENSION_NAME_ERROR 115 -#define X509V3_R_EXTENSION_NOT_FOUND 102 -#define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103 -#define X509V3_R_EXTENSION_VALUE_ERROR 116 -#define X509V3_R_ILLEGAL_EMPTY_EXTENSION 151 -#define X509V3_R_ILLEGAL_HEX_DIGIT 113 -#define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 152 -#define X509V3_R_INVALID_ASNUMBER 160 -#define X509V3_R_INVALID_ASRANGE 161 -#define X509V3_R_INVALID_BOOLEAN_STRING 104 -#define X509V3_R_INVALID_EXTENSION_STRING 105 -#define X509V3_R_INVALID_INHERITANCE 162 -#define X509V3_R_INVALID_IPADDRESS 163 -#define X509V3_R_INVALID_NAME 106 -#define X509V3_R_INVALID_NULL_ARGUMENT 107 -#define X509V3_R_INVALID_NULL_NAME 108 -#define X509V3_R_INVALID_NULL_VALUE 109 -#define X509V3_R_INVALID_NUMBER 140 -#define X509V3_R_INVALID_NUMBERS 141 -#define X509V3_R_INVALID_OBJECT_IDENTIFIER 110 -#define X509V3_R_INVALID_OPTION 138 -#define X509V3_R_INVALID_POLICY_IDENTIFIER 134 -#define X509V3_R_INVALID_PROXY_POLICY_SETTING 153 -#define X509V3_R_INVALID_PURPOSE 146 -#define X509V3_R_INVALID_SAFI 164 -#define X509V3_R_INVALID_SECTION 135 -#define X509V3_R_INVALID_SYNTAX 143 -#define X509V3_R_ISSUER_DECODE_ERROR 126 -#define X509V3_R_MISSING_VALUE 124 -#define X509V3_R_NEED_ORGANIZATION_AND_NUMBERS 142 -#define X509V3_R_NO_CONFIG_DATABASE 136 -#define X509V3_R_NO_ISSUER_CERTIFICATE 121 -#define X509V3_R_NO_ISSUER_DETAILS 127 -#define X509V3_R_NO_POLICY_IDENTIFIER 139 -#define X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED 154 -#define X509V3_R_NO_PUBLIC_KEY 114 -#define X509V3_R_NO_SUBJECT_DETAILS 125 -#define X509V3_R_ODD_NUMBER_OF_DIGITS 112 -#define X509V3_R_OPERATION_NOT_DEFINED 148 -#define X509V3_R_OTHERNAME_ERROR 147 -#define X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED 155 -#define X509V3_R_POLICY_PATH_LENGTH 156 -#define X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED 157 -#define X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED 158 -#define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 159 -#define X509V3_R_SECTION_NOT_FOUND 150 -#define X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS 122 -#define X509V3_R_UNABLE_TO_GET_ISSUER_KEYID 123 -#define X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT 111 -#define X509V3_R_UNKNOWN_EXTENSION 129 -#define X509V3_R_UNKNOWN_EXTENSION_NAME 130 -#define X509V3_R_UNKNOWN_OPTION 120 -#define X509V3_R_UNSUPPORTED_OPTION 117 -#define X509V3_R_USER_TOO_LONG 132 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/externals/sockets/win/VC90/sockets.vcproj b/externals/sockets/win/VC90/sockets.vcproj deleted file mode 100644 index 3660ebeee9..0000000000 --- a/externals/sockets/win/VC90/sockets.vcproj +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/externals/sockets/win/sockets.sln b/externals/sockets/win/sockets.sln deleted file mode 100644 index 3ae708ebc8..0000000000 --- a/externals/sockets/win/sockets.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sockets", "VC90\sockets.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.ActiveCfg = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/externals/zlib/win/VC90/zlib.vcproj b/externals/zlib/win/VC90/zlib.vcproj deleted file mode 100644 index 8ffe8163ed..0000000000 --- a/externals/zlib/win/VC90/zlib.vcproj +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/externals/zlib/win/zlib.sln b/externals/zlib/win/zlib.sln deleted file mode 100644 index d1246b09b0..0000000000 --- a/externals/zlib/win/zlib.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.ActiveCfg = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/src/tools/ExtractorToolsVC90.sln b/src/tools/ExtractorToolsVC90.sln deleted file mode 100644 index 7881797979..0000000000 --- a/src/tools/ExtractorToolsVC90.sln +++ /dev/null @@ -1,80 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpq", "..\..\externals\libmpq\win\VC90\libmpq.vcproj", "{03AB0F44-628E-4855-99A0-C98A1EB52C50}" - ProjectSection(ProjectDependencies) = postProject - {CE773400-763E-4B71-B5E2-C9B60A752EB1} = {CE773400-763E-4B71-B5E2-C9B60A752EB1} - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "..\..\externals\bzip2\win\VC90\bzip2.vcproj", "{CE773400-763E-4B71-B5E2-C9B60A752EB1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\externals\zlib\win\VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\..\externals\g3dlite\win\VC90\g3dlite.vcproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}" - ProjectSection(ProjectDependencies) = postProject - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{69F789A6-BD04-454A-AC8E-A57AAE7FCF77}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapextractor", "map_extractor\VC90\VC90_mapextractor.vcproj", "{D7552D4F-408F-4F8E-859B-366659150CF4}" - ProjectSection(ProjectDependencies) = postProject - {03AB0F44-628E-4855-99A0-C98A1EB52C50} = {03AB0F44-628E-4855-99A0-C98A1EB52C50} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmap3assembler", "vmap3_assembler\VC90\VC90_vmap3assembler.vcproj", "{572FFF74-480C-4472-8ABF-81733BB4049D}" - ProjectSection(ProjectDependencies) = postProject - {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmap3extractor", "vmap3_extractor\VC90\VC90_vmap3extractor.vcproj", "{502602CC-98EA-4335-B922-C5C1DBF37604}" - ProjectSection(ProjectDependencies) = postProject - {03AB0F44-628E-4855-99A0-C98A1EB52C50} = {03AB0F44-628E-4855-99A0-C98A1EB52C50} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.ActiveCfg = Debug|Win32 - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.Build.0 = Debug|Win32 - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.ActiveCfg = Release|Win32 - {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.Build.0 = Release|Win32 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Debug|Win32.ActiveCfg = Debug|Win32 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Debug|Win32.Build.0 = Debug|Win32 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Release|Win32.ActiveCfg = Release|Win32 - {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Release|Win32.Build.0 = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32 - {D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.Build.0 = Debug|Win32 - {D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.ActiveCfg = Release|Win32 - {D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.Build.0 = Release|Win32 - {572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.ActiveCfg = Debug|Win32 - {572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.Build.0 = Debug|Win32 - {572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.ActiveCfg = Release|Win32 - {572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.Build.0 = Release|Win32 - {502602CC-98EA-4335-B922-C5C1DBF37604}.Debug|Win32.ActiveCfg = Debug|Win32 - {502602CC-98EA-4335-B922-C5C1DBF37604}.Debug|Win32.Build.0 = Debug|Win32 - {502602CC-98EA-4335-B922-C5C1DBF37604}.Release|Win32.ActiveCfg = Release|Win32 - {502602CC-98EA-4335-B922-C5C1DBF37604}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {CE773400-763E-4B71-B5E2-C9B60A752EB1} = {69F789A6-BD04-454A-AC8E-A57AAE7FCF77} - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {69F789A6-BD04-454A-AC8E-A57AAE7FCF77} - {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {69F789A6-BD04-454A-AC8E-A57AAE7FCF77} - {03AB0F44-628E-4855-99A0-C98A1EB52C50} = {69F789A6-BD04-454A-AC8E-A57AAE7FCF77} - EndGlobalSection -EndGlobal diff --git a/src/tools/map_extractor/VC90/VC90_mapextractor.vcproj b/src/tools/map_extractor/VC90/VC90_mapextractor.vcproj deleted file mode 100644 index 3cc367f0fc..0000000000 --- a/src/tools/map_extractor/VC90/VC90_mapextractor.vcproj +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/tools/vmap3_assembler/VC90/VC90_vmap3assembler.vcproj b/src/tools/vmap3_assembler/VC90/VC90_vmap3assembler.vcproj deleted file mode 100644 index 1f3376e71b..0000000000 --- a/src/tools/vmap3_assembler/VC90/VC90_vmap3assembler.vcproj +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/tools/vmap3_extractor/VC90/VC90_vmap3extractor.vcproj b/src/tools/vmap3_extractor/VC90/VC90_vmap3extractor.vcproj deleted file mode 100644 index 3dd343f384..0000000000 --- a/src/tools/vmap3_extractor/VC90/VC90_vmap3extractor.vcproj +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/TrinityCore&Script VC90.sln b/win/TrinityCore&Script VC90.sln deleted file mode 100644 index caaf56698f..0000000000 --- a/win/TrinityCore&Script VC90.sln +++ /dev/null @@ -1,163 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game", "VC90\game.vcproj", "{1DC6C4DA-A028-41F3-877D-D5400C594F88}" - ProjectSection(ProjectDependencies) = postProject - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "VC90\shared.vcproj", "{90297C34-F231-4DF4-848E-A74BCC0E40ED}" - ProjectSection(ProjectDependencies) = postProject - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} - {9DF7A84E-C644-4720-A79D-C98CB950E34C} = {9DF7A84E-C644-4720-A79D-C98CB950E34C} - {803F488E-4C5A-4866-8D5C-1E6C03C007C2} = {803F488E-4C5A-4866-8D5C-1E6C03C007C2} - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} = {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} - {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E} - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5} = {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrevision", "VC90\genrevision.vcproj", "{803F488E-4C5A-4866-8D5C-1E6C03C007C2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACE_Wrappers", "..\externals\ace\win\VC90\ace.vcproj", "{BD537C9A-FECA-1BAD-6757-8A6348EA12C8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\externals\zlib\win\VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\externals\g3dlite\win\VC90\g3dlite.vcproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sockets", "..\externals\sockets\win\VC90\sockets.vcproj", "{9DF7A84E-C644-4720-A79D-C98CB950E34C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmysql", "..\externals\mysql\win\VC90\libmysql.vcproj", "{4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}" - ProjectSection(ProjectDependencies) = postProject - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "authserver", "VC90\authserver.vcproj", "{563E9905-3657-460C-AE63-0AC39D162E23}" - ProjectSection(ProjectDependencies) = postProject - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "worldserver", "VC90\worldserver.vcproj", "{A3A04E47-43A2-4C08-90B3-029CEF558594}" - ProjectSection(ProjectDependencies) = postProject - {E8068D77-AB0B-4E1A-9D5E-A89205D925C2} = {E8068D77-AB0B-4E1A-9D5E-A89205D925C2} - {1DC6C4DA-A028-41F3-877D-D5400C594F88} = {1DC6C4DA-A028-41F3-877D-D5400C594F88} - {014331FB-7472-4465-9844-EEED2A79FE97} = {014331FB-7472-4465-9844-EEED2A79FE97} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsoap", "..\externals\gsoap\VC90\gsoap.vcproj", "{014331FB-7472-4465-9844-EEED2A79FE97}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scripts", "VC90\scripts.vcproj", "{E8068D77-AB0B-4E1A-9D5E-A89205D925C2}" - ProjectSection(ProjectDependencies) = postProject - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.ActiveCfg = Debug|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.Build.0 = Debug|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.ActiveCfg = Debug|x64 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.Build.0 = Debug|x64 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.ActiveCfg = Release|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.Build.0 = Release|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.ActiveCfg = Release|x64 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.Build.0 = Release|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.ActiveCfg = Debug|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.Build.0 = Debug|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.ActiveCfg = Debug|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.Build.0 = Debug|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.ActiveCfg = Release|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.Build.0 = Release|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.ActiveCfg = Release|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.Build.0 = Release|x64 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.ActiveCfg = Debug|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.Build.0 = Debug|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|x64.ActiveCfg = Debug|x64 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|x64.Build.0 = Debug|x64 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release|Win32.ActiveCfg = Release|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release|Win32.Build.0 = Release|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release|x64.ActiveCfg = Release|x64 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release|x64.Build.0 = Release|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.Build.0 = Debug|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.ActiveCfg = Debug|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.Build.0 = Debug|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.ActiveCfg = Release|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.Build.0 = Release|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.ActiveCfg = Release|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.Build.0 = Release|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.ActiveCfg = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64 - {9DF7A84E-C644-4720-A79D-C98CB950E34C}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DF7A84E-C644-4720-A79D-C98CB950E34C}.Debug|Win32.Build.0 = Debug|Win32 - {9DF7A84E-C644-4720-A79D-C98CB950E34C}.Debug|x64.ActiveCfg = Debug|x64 - {9DF7A84E-C644-4720-A79D-C98CB950E34C}.Debug|x64.Build.0 = Debug|x64 - {9DF7A84E-C644-4720-A79D-C98CB950E34C}.Release|Win32.ActiveCfg = Release|Win32 - {9DF7A84E-C644-4720-A79D-C98CB950E34C}.Release|Win32.Build.0 = Release|Win32 - {9DF7A84E-C644-4720-A79D-C98CB950E34C}.Release|x64.ActiveCfg = Release|x64 - {9DF7A84E-C644-4720-A79D-C98CB950E34C}.Release|x64.Build.0 = Release|x64 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Debug|Win32.ActiveCfg = Debug|Win32 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Debug|Win32.Build.0 = Debug|Win32 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Debug|x64.ActiveCfg = Debug|x64 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Debug|x64.Build.0 = Debug|x64 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Release|Win32.ActiveCfg = Release|Win32 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Release|Win32.Build.0 = Release|Win32 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Release|x64.ActiveCfg = Release|x64 - {4FBE4FC1-22DE-41A0-9AEB-CFD00EBAC7E5}.Release|x64.Build.0 = Release|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.ActiveCfg = Debug|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.Build.0 = Debug|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.ActiveCfg = Debug|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.Build.0 = Debug|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.ActiveCfg = Release|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.Build.0 = Release|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.ActiveCfg = Release|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.Build.0 = Release|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.ActiveCfg = Debug|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.Build.0 = Debug|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.ActiveCfg = Debug|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.Build.0 = Debug|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.ActiveCfg = Release|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.Build.0 = Release|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.ActiveCfg = Release|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.Build.0 = Release|x64 - {014331FB-7472-4465-9844-EEED2A79FE97}.Debug|Win32.ActiveCfg = Debug|Win32 - {014331FB-7472-4465-9844-EEED2A79FE97}.Debug|Win32.Build.0 = Debug|Win32 - {014331FB-7472-4465-9844-EEED2A79FE97}.Debug|x64.ActiveCfg = Debug|x64 - {014331FB-7472-4465-9844-EEED2A79FE97}.Debug|x64.Build.0 = Debug|x64 - {014331FB-7472-4465-9844-EEED2A79FE97}.Release|Win32.ActiveCfg = Release|Win32 - {014331FB-7472-4465-9844-EEED2A79FE97}.Release|Win32.Build.0 = Release|Win32 - {014331FB-7472-4465-9844-EEED2A79FE97}.Release|x64.ActiveCfg = Release|x64 - {014331FB-7472-4465-9844-EEED2A79FE97}.Release|x64.Build.0 = Release|x64 - {E8068D77-AB0B-4E1A-9D5E-A89205D925C2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E8068D77-AB0B-4E1A-9D5E-A89205D925C2}.Debug|Win32.Build.0 = Debug|Win32 - {E8068D77-AB0B-4E1A-9D5E-A89205D925C2}.Debug|x64.ActiveCfg = Debug|x64 - {E8068D77-AB0B-4E1A-9D5E-A89205D925C2}.Debug|x64.Build.0 = Debug|x64 - {E8068D77-AB0B-4E1A-9D5E-A89205D925C2}.Release|Win32.ActiveCfg = Release|Win32 - {E8068D77-AB0B-4E1A-9D5E-A89205D925C2}.Release|Win32.Build.0 = Release|Win32 - {E8068D77-AB0B-4E1A-9D5E-A89205D925C2}.Release|x64.ActiveCfg = Release|x64 - {E8068D77-AB0B-4E1A-9D5E-A89205D925C2}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal diff --git a/win/VC90/authserver.vcproj b/win/VC90/authserver.vcproj deleted file mode 100644 index cc38d95a07..0000000000 --- a/win/VC90/authserver.vcproj +++ /dev/null @@ -1,469 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC90/game.vcproj b/win/VC90/game.vcproj deleted file mode 100644 index d17c09960c..0000000000 --- a/win/VC90/game.vcproj +++ /dev/null @@ -1,2014 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC90/genrevision.vcproj b/win/VC90/genrevision.vcproj deleted file mode 100644 index 662a3e9a9e..0000000000 --- a/win/VC90/genrevision.vcproj +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC90/scripts.vcproj b/win/VC90/scripts.vcproj deleted file mode 100644 index 7a260c22ca..0000000000 --- a/win/VC90/scripts.vcproj +++ /dev/null @@ -1,3102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC90/shared.vcproj b/win/VC90/shared.vcproj deleted file mode 100644 index 4ad2f97aa5..0000000000 --- a/win/VC90/shared.vcproj +++ /dev/null @@ -1,747 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC90/worldserver.vcproj b/win/VC90/worldserver.vcproj deleted file mode 100644 index f9e1d67dbf..0000000000 --- a/win/VC90/worldserver.vcproj +++ /dev/null @@ -1,510 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -